Files
2026-11-16 01:39:59 +07:00

19 lines
820 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*! 20231212-21-RELEASE */
!function(e){e.TRC=e.TRC||{},e.TRC.sharedObjects=e.TRC.sharedObjects||{},e.TRC.sharedObjects.loadedScripts=e.TRC.sharedObjects.loadedScripts||{},e.TRC.sharedObjects.loadedPixels=e.TRC.sharedObjects.loadedPixels||{}}(window),function(){var win,doc;((e,t,r)=>{const i="trc_modal_hidden",o="trc_modal_mask",n="trc_modal_dialog",a="trc_close_modal",s=t.createElement("div"),l=t.createElement("div");let c,d="";function p(){u(l,i),u(s,i),r.dom.off(t,"keyup",m),r.dom.off(t,"click",g),r.dom.off(t.getElementById(a),"click",g),r.dom.off(e,"message",b)}function h(){u(l,o),u(l,i),u(s,n),u(s,i),_.appendChild(l),_.appendChild(s),t.body.appendChild(R),y(d),c=!0}const u=function(e,t){if(e.classList)return e.classList.add(t);r.dom.removeClass(e,t),e.className+=` ${t}`},m=e=>{const t=e.which||e.keyCode;27===t&&p()},g=e=>{const t=e.target||e.srcElement;t!==l&&t.id!==a||(r.dom.stopEvent(e),p())},b=e=>{/http(s)?:\/\/www\.taboola\.com/.test(e.origin)&&e.data&&1025==+e.data&&p()},f=function(e,t="no"){const r=[];return r.push(`<a id="${a}" class="trc_modal_close">&times;</a>\n <iframe class="trc_modal_frame" scrolling=${t} frameborder=0 allowTransparency=true src="${e}"></iframe>`),r.join("")},v=function(e,t){for(;e.tagName.toUpperCase()!==t.toUpperCase();)e=e.parentNode;return e},C=function(i){const o=v(i.target||i.srcElement,"A");i&&r.dom.stopEvent(i),c||h();const n=o.getAttribute("tblEnablesScrolling");s.innerHTML=f(o.href,n),r.dom.removeClass(l,"trc_modal_hidden"),r.dom.removeClass(s,"trc_modal_hidden"),r.dom.on(t,"keyup",m),r.dom.on(t,"click",g),r.dom.on(t.getElementById("trc_close_modal"),"click",g),r.dom.on(e,"message",b)},T=function(e){const r=t.createElement("div");return r.id=`tbl-aug-${Math.floor(2147483648*Math.random()).toString(36)}`,d=`#${r.id}`,e&&e.appendChild(r),r},y=function(e){TRC.dom.injectStyle(`${e} .trc_modal_dialog { width: 660px; height: 550px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding: 12px; border: 2px solid #417cc3; position: fixed; z-index: 9999999; background: #f7f9fc; top: 50%; left: 50%; margin-top: -250px; margin-left: -330px; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; -ms-box-sizing: content-box; -o-box-sizing: content-box; box-sizing: content-box; -webkit-box-shadow: black 0 0 18px 0; -moz-box-shadow: black 0 0 18px 0; -ms-box-shadow: black 0 0 18px 0; -o-box-shadow: black 0 0 18px 0; box-shadow: black 0 0 18px 0; -webkit-border-radius: 10px; -moz-border-radius: 10px; -ms-border-radius: 10px; -o-border-radius: 10px; border-radius: 10px; }${e} .trc_modal_mask { z-index: 9999998; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; opacity: 0.5; filter: alpha(opacity=50); }${e} .trc_modal_close { font-family: sans-serif !important; width: 30px !important; height: 30px !important; font-size: 30px !important; font-weight: bold !important; line-height: 28px !important; color: #fff !important; text-shadow: 0 1px 0 #000; opacity: 0.9; filter: alpha(opacity=90); background: #417cc3; padding: 0; cursor: pointer; border: 0; -webkit-appearance: none; text-align: center; position: absolute !important; top: -13px; right: -13px; text-decoration: none !important; z-index: 9; -webkit-border-radius: 15px !important; -moz-border-radius: 15px !important; -ms-border-radius: 15px !important; -o-border-radius: 15px !important; border-radius: 15px !important; }${e} .trc_modal_hidden { display: none !important; }${e} .trc_modal_frame { width: 100% !important; height: 550px !important; }`,null)},R=T(),w=T(R),_=T(w);r.aboutUs={open:C,close:p}})(window,document,TRC),win=window,doc=document,TRC.blocker=TRC.blocker||{states:{ABP_DETECTION_DISABLED:-2,ABP_NOT_DETECTED:0,ABP_DETECTED:1},createBlockDetectionDiv:function(e){var t=doc.createElement("div");return t.className=e,t.style.fontSize="12px",t.style.lineHeight="1",t.appendChild(doc.createTextNode(".")),doc.documentElement.appendChild(t),t},isBlockDetectedOnDiv:function(e){return e.offsetHeight?(TRC.pConsole("page","warn","No AdBlockPlus detected on div with class: "+e.className),!1):(TRC.pConsole("page","warn","AdBlockPlus detected on div with class: "+e.className),!0)},isBlockDetectedOnClassNames:function(e){var t,r=e.length,i;for(t=0;t<r;t++)if(e[t]){i=this.createBlockDetectionDiv(e[t]);try{if(this.isBlockDetectedOnDiv(i))return!0}catch(e){TRC.pConsole("page","error","unable to inspect offsetHeight of div with class: "+i.className)}finally{doc.documentElement.removeChild(i)}}return!1},setTopDocument:function(){try{doc=top.document||doc}catch(e){}},getBlockedState:function(e,t){return this.blockedState!==this.states.ABP_DETECTED||t?(this.setTopDocument(),this.blockedState=e&&this.isBlockDetectedOnClassNames(e)?this.states.ABP_DETECTED:this.states.ABP_NOT_DETECTED,this.blockedState):this.blockedState}},function(){TRC.amp={};var e=TRC.amp,t,r;e.getRboxContainer=function(){return t||(t=document.getElementsByClassName("trc_rbox_container")[0]),t},e.getAMPContainer=function(){return r||(r=document.getElementById("c"))},e.setAMPmodule=function(t){t.manualVisibilityTrigger=!0,t.disableReadMore=!0,t.slider=!1;var r=null,i=this.sendAMPResize,o=this.sendAMPFeedResize,n=t.global["amp-neg-threshold"]||5,a=t.global["amp-pos-threshold"]||100,s=t.global["amp-debounce-time"]||200,l=void 0!==t.amp_disable_resize?t.amp_disable_resize:t.global["amp-disable-resize"],c="function"==typeof t.global["amp-onrender"]?t.global["amp-onrender"]:function(){return!0};e.getAMPContainer().classList.add("tbl-amp-container"),TRC.eventDelegator.subscribe("onrender",function(t){var d={negative:n,positive:a};if(!c(t)||l)return!1;null===r&&(r=!(!t.container.placementData||!t.container.placementData.isFeedCard)),r?(e.getAMPContainer().style.position="static",o()):(i(d,TRC.lastVisibleRects?TRC.lastVisibleRects:null),TRC.listen("visible::"+t.placement,TRC.util.debounce(i.trcBind(this,d),s,!1,this)))})},e.sendAMPResize=function(t,r){var i=r?r.boundingClientRect.height:TRC.dom.getWindowHeight(),o=e.getRboxContainer().scrollHeight,n=i-o,a=n<0?t.negative:t.positive;Math.abs(n)>=a&&window.context.requestResize(void 0,o)},e.sendAMPFeedResize=function(){window.context.requestResize(void 0,e.getAMPContainer().offsetHeight+50),TRC.dispatch("ampFeedResize")}}(),function(e,t){TRC.aspect={before:function(e,t,r,i){var o=e[t];e[t]=function(){return i&&(e[t]=o),r.apply(this,arguments),o.apply(this,arguments)}},after:function(e,t,r,i){var o=e[t];e[t]=function(){i&&(e[t]=o);var n=o.apply(this,arguments);return r.apply(this,arguments),n}}}}(window,document);const MODULE$1="block-clicks",PREFIX$1="taboola",SHORT_PREFIX$1="tbl",GLOBAL_PREFIX="unintentional-clicks",GLOBAL_FRAUD_PREFIX$1=`${GLOBAL_PREFIX}-fraud`,GLOBAL_DEFAULT_PREFIX$1=`${GLOBAL_PREFIX}-default`,SHORT_NAME$1=`${SHORT_PREFIX$1}-${MODULE$1}`,getGlobalKey=(e,t)=>[e,t].join("-");var CONSTANTS$2={SHORT_NAME:SHORT_NAME$1,MODULE_NAME:`${PREFIX$1}-${MODULE$1}`,GLOBAL_PREFIX:GLOBAL_PREFIX,GLOBAL_FRAUD_PREFIX:GLOBAL_FRAUD_PREFIX$1,GLOBAL_DEFAULT_PREFIX:GLOBAL_DEFAULT_PREFIX$1,FORCE_PARAM:SHORT_NAME$1,EMULATE_PARAM:"trc_block_clicks",SUPPLY_FEATURE:{TYPE:"clickblocked",STATE:"reported"},SELECTORS:{STORY_WIDGET_CTA:"tbl-labels-arrow",TITLE:"video-title"},DEFAULT_CONFIG:{MARGIN:"0.5",FRAUD_FASTCLICK:"3000",GENERAL_FASTCLICK:"500"},SOURCE_CONFIG:{FRAUD:"fraud",FPP_ACTION:"fpp-action",DEFAULT:"default"},KEYS:{BLOCK_CLICKS_ACTION:"bca",BLOCK_CLICKS_DISABLED:"bcd",FAST_KEY:"uics",MARGIN_KEY:"uicm",RECURRING_KEY:"uicr"},GLOBAL_KEYS:{FRAUD_ENABLED:getGlobalKey(GLOBAL_FRAUD_PREFIX$1,"enable"),DEFAULT_ENABLED:getGlobalKey(GLOBAL_DEFAULT_PREFIX$1,"enable"),SEND_INIT_EVENT:getGlobalKey(GLOBAL_DEFAULT_PREFIX$1,"send-init-event")},TYPES:{MARGIN:"MARGINAL_BLOCK_CLICKS",FAST:"FAST_BLOCK_CLICKS"},EVENTS:{MARGINAL_BLOCK_CLICKS:"marginal_click_blocked",FAST_BLOCK_CLICKS:"fast_click_blocked",BLOCK_CLICKS_INIT:"block_clicks_init"}};class ItemMeasurements{static isEnabled(e){return TRC.util.isPercentEnabled(e.global,"enable-item-measurements")}static setAppearanceTime(e,t){try{if(!ItemMeasurements.isEnabled(e)||!t||t.appearanceTime)return;t.appearanceTime=Date.now()}catch(e){__trcError(`Error in ItemMeasurements.setAppearanceTime - ${e.message}`,e)}}static clearAppearanceTime(e,t){try{if(!ItemMeasurements.isEnabled(e)||!t||!t.appearanceTime)return;t.appearanceTime=null}catch(e){__trcError(`Error in ItemMeasurements.clearAppearanceTime - ${e.message}`,e)}}static getAppearanceTime(e,t){const r=e&&e.video_data&&e.video_data.appearanceTime;if(r)return r;const i=TRC.dom.closest(t.target||t.srcElement,`.videoCube`);return i&&i.appearanceTime?i.appearanceTime:null}static shouldIgnoreLoggerUrlPrefix(e,t){const r=TRC.util.isTrue(e.global["enable-ie-split-click-event"]);return r&&TRC.Browser.ie&&t>2048}static getVisibleToClickTime(e,t,r){const i=this.getAppearanceTime(t,e);return this.isBlockClicksWorkingOnItem(r)&&i?((Date.now()-i)/1e3).toFixed(2):null}static setVisibleToClickTime(e,t,r,i){try{if(!ItemMeasurements.isEnabled(e)||!t)return;t.visibleToClickTime=this.getVisibleToClickTime(r,i,t)}catch(r){__trcError(`Error in ItemMeasurements.setVisibleToClickTime - ${r.message}`,r)}}static isBlockClicksWorkingOnItem(e){return!!e.blockClickOn}static setVisibleToClickTimeParamObj(e,t,r){try{if(!(ItemMeasurements.isEnabled(e)&&r&&r.visibleToClickTime&&t))return;__trcCopyProps({vct:r.visibleToClickTime},t)}catch(e){__trcError(`Error in ItemMeasurements.setVisibleToClickTimeParamObj - ${e.message}`,e)}}static addVisibleToClickTimeToParamURL(e,t,r,i,o){try{if(!ItemMeasurements.isEnabled(e)||"string"!=typeof t||t.indexOf("&vct=")>-1)return t;const n=this.getVisibleToClickTime(r,i,o),a=`${t}&vct=${n}`;return this.shouldIgnoreLoggerUrlPrefix(e,a.length)?t:a}catch(e){return __trcError(`Error in ItemMeasurements.addVisibleToClickTimeToParamURL - ${e.message}`,e),t}}}TRC.ItemMeasurements=ItemMeasurements;const{SOURCE_CONFIG:SOURCE_CONFIG,DEFAULT_CONFIG:DEFAULT_CONFIG,KEYS:KEYS,SELECTORS:SELECTORS$1,EVENTS:EVENTS$1,SUPPLY_FEATURE:SUPPLY_FEATURE,TYPES:TYPES,GLOBAL_KEYS:GLOBAL_KEYS,GLOBAL_FRAUD_PREFIX:GLOBAL_FRAUD_PREFIX,GLOBAL_DEFAULT_PREFIX:GLOBAL_DEFAULT_PREFIX,EMULATE_PARAM:EMULATE_PARAM}=CONSTANTS$2;(()=>{class e{constructor(e,t,r){this.trcManager=e.trc,this.container=t,this.itemData=r,this.itemBlockClicksOn(),this.blockClicksSource=this.getBlockClicksSource(),this.blockClicksSource&&this.enableBlockingClicks(e),this.firstClick=!0,this.lastVisibleToClickTime=0}itemBlockClicksOn(){this.itemData.blockClickOn=!0}enableBlockingClicks(t){TRC.dom.on(this.container,"click",this.handleBlockClicks.trcBind(this),!0),this.config=this.getConfig(),this.isBlockingFastClicks=!0,this.isRecommendationReel=TRC.RecommendationReel.shouldInitRecommendationReel(t),this.observeItem(),this.isInitEventActive()&&!e.isInitEventSent&&(this.sendBlockClicksInitEvent(),e.isInitEventSent=!0)}getConfig(){return{marginValue:this.getBlockMarginalClicksValue(KEYS.MARGIN_KEY),delayTimeValue:this.getBlockFastClicksTimeoutInMilliseconds(KEYS.FAST_KEY),recurringClickDelay:this.getBlockFastClicksTimeoutInMilliseconds(KEYS.RECURRING_KEY)}}static getBlockClicksFromResponse(t){if(!t||!t.trc)return;const r=TRC.URL.prototype.getParameter.call(location.href,EMULATE_PARAM),i=r||t.trc[KEYS.BLOCK_CLICKS_ACTION];i&&(e.BCA=TRC.util.jsonParseSafe(i))}isInitEventActive(){const{global:e}=this.trcManager;return TRC.util.isTrue(e[GLOBAL_KEYS.SEND_INIT_EVENT])}getBlockMarginalClicksValue(t){const r=this.getClickValueByPriority(t);return e.isValidClickValue(r)?r:DEFAULT_CONFIG.MARGIN}getBlockFastClicksTimeoutInMilliseconds(t){const r=this.getClickValueByPriority(t);return e.isValidClickValue(r)?1e3*parseFloat(r):this.blockClicksSource===SOURCE_CONFIG.FRAUD?DEFAULT_CONFIG.FRAUD_FASTCLICK:DEFAULT_CONFIG.GENERAL_FASTCLICK}getBlockClicksSource(){return this.checkIsFraudEnabled()?SOURCE_CONFIG.FRAUD:e.BCA?e.isBlockClicksActionEnabled()&&SOURCE_CONFIG.FPP_ACTION||null:this.isEnabledByDefault()?SOURCE_CONFIG.DEFAULT:null}getClickValueByPriority(t){switch(this.blockClicksSource){case SOURCE_CONFIG.FRAUD:return this.trcManager.global[`${GLOBAL_FRAUD_PREFIX}-${t}`];case SOURCE_CONFIG.FPP_ACTION:return e.BCA[t];case SOURCE_CONFIG.DEFAULT:return this.trcManager.global[`${GLOBAL_DEFAULT_PREFIX}-${t}`];default:return null}}isEnabledByDefault(){const{global:e}=this.trcManager;return TRC.util.isTrue(e[GLOBAL_KEYS.DEFAULT_ENABLED])}static isBlockClicksActionEnabled(){const t=e.BCA[KEYS.BLOCK_CLICKS_DISABLED];return TRC.util.isFalse(t)}checkIsFraudEnabled(){const{global:e}=this.trcManager;return TRC.util.isTrue(e[GLOBAL_KEYS.FRAUD_ENABLED])}sendBlockClickEvent(e,t,r){const{TYPE:i,STATE:o}=SUPPLY_FEATURE,{visibleToClickTime:n,itemId:a}=r;let s=`blocking type: ${EVENTS$1[e]}, `;s+=`blocking src: ${this.blockClicksSource}, `,s+=`vct: ${n}, `,s+=`itemId: ${a}`;const l=`blocking value: ${t}`;TRC.util.sendSupplyFeature(i,o,s,l)}sendBlockClicksInitEvent(){this.trcManager.sendAbTestEvent(EVENTS$1.BLOCK_CLICKS_INIT,"block-clicks-manager")}getVisibleToClickTime(){const e=Date.now(),t=this.container&&this.container.video_data&&this.container.video_data.appearanceTime;return t?((e-t)/1e3).toFixed(2):null}handleBlockClicks(t){const{delayTimeValue:r,marginValue:i}=this.config||{};let o;try{o={visibleToClickTime:this.getVisibleToClickTime(),itemId:this.container.dataset.itemId}}catch(t){__trcError(`Error in BlockClicksManager.handleBlockClicks - ${t.message}`,t)}if(this.shouldBlockFastClick())return e.preventClickBubbling(t),this.sendBlockClickEvent(TYPES.FAST,r,o),void(this.firstClick&&(this.firstClick=!1));e.isLegitMarginalValue(i)&&this.isMarginalClick(t)&&this.isBlockAbleClick(t)&&(e.preventClickBubbling(t),this.sendBlockClickEvent(TYPES.MARGIN,i,o))}static isLegitMarginalValue(e){const t=parseFloat(e);return!isNaN(t)&&t>0}shouldBlockFastClick(){if(!this.config)return!1;const t=Number(this.getVisibleToClickTime());return!t||(this.firstClick||!e.BCA.enableRecurringClick?(this.lastVisibleToClickTime=t,t<=this.config.delayTimeValue/1e3):this.shouldBlockRecurringClick(t))}shouldBlockRecurringClick(e){const t=e-this.lastVisibleToClickTime;return this.lastVisibleToClickTime=e,t<=this.config.recurringClickDelay/1e3}isBlockAbleClick(e){return!(this.isRecommendationReel&&e.target.parentNode.className.indexOf(SELECTORS$1.STORY_WIDGET_CTA)>-1)&&!(e.target.className.indexOf(SELECTORS$1.TITLE)>-1)}isMarginalClick(e){const t=this.container.offsetWidth,r=this.container.offsetHeight,i=this.transformBlockMarginalClicksConfig(t,r),o=this.container.getBoundingClientRect(),n=e.clientX-o.left,a=e.clientY-o.top;return a<i.top||n>t-i.right||n<i.left||a>r-i.bottom}static preventClickBubbling(e){e.preventDefault(),e.stopPropagation()}transformBlockMarginalClicksConfig(t,r){const{marginValue:i}=this.config;return{top:e.calculatePercentage(i,r),right:e.calculatePercentage(i,t),bottom:e.calculatePercentage(i,r),left:e.calculatePercentage(i,t)}}static calculatePercentage(e,t){return parseFloat(e)/100*t}observeItem(){TRC.intersections.observe({targetElement:this.container,threshold:0,onExit:()=>{ItemMeasurements.clearAppearanceTime(this.trcManager,this.itemData),this.lastVisibleToClickTime=0,this.firstClick=!0},onEnter:()=>this.setAppearanceTime()})}setAppearanceTime(){ItemMeasurements.setAppearanceTime(this.trcManager,this.itemData)}static isValidClickValue(e){return!isNaN(parseFloat(e))}}TRC.BlockClicksManager=e})(),function(e,t){var r=function(){this.dom=!!t.getElementById&&1,this.dom&&(!t.importNode||(this.dom=2),!t.normalizeDocument||(this.dom=3));var r=this.opera=!!e.opera&&9,i,o;if(this.opera&&(!navigator.geolocation||(this.opera=10),!e.opera.version||(this.opera=parseFloat(e.opera.version()))),this.webView=navigator.userAgent.indexOf("; wv")>-1||(["iPad Simulator","iPad"].indexOf(navigator.platform)>-1||navigator.userAgent.indexOf("Mac")>-1&&"ontouchend"in document||/ip[honead]{2,4}(?:.*os\s(\w+)\slike\smac|;\sopera)/i.test(navigator.userAgent))&&!window.navigator.standalone&&!/safari/i.test(navigator.userAgent),this.ie=navigator.userAgent.match(/Trident/)&&/rv:11.0/i.test(navigator.userAgent)?11:"object"==typeof t.all&&!r&&("CSS1Compat"!=t.compatMode?6:e.XMLHttpRequest?Object.defineProperty?"object"!=typeof DOMImplementation||"function"!=typeof DOMImplementation.prototype.createDocument?8:e["msMatchMedia"]?10:9:7:6),this.webkit=!!e.openDatabase&&!this.opera,this.chrome=!(!this.webkit||!e.chrome),this.safari=this.webkit&&!this.chrome,this.safari&&(!t.compareDocumentPosition||(this.safari=4),!navigator["registerContentHandler"]||(this.safari=5),!e["matchMedia"]||(this.safari=6)),this.firefox=!!navigator.userAgent.match(/firefox/i),this.firefox){try{"function"==typeof t.createElement("canvas").getContext&&(this.firefox=1.5)}catch(e){}"object"==typeof e["globalStorage"]&&(this.firefox=2),!t.elementFromPoint||(this.firefox=3),!t.querySelector||(this.firefox=3.5),!t.getElementsByTagName("head")[0]["mozMatchesSelector"]||(this.firefox=3.6),!e.Uint8Array||(this.firefox=4),!Function.prototype["isGenerator"]||(this.firefox=5),!e["matchMedia"]||(this.firefox=6),!e.FileReader||!e.FileReader.prototype.readAsArrayBuffer||(this.firefox=7),!t.head||!t.head.insertAdjacentHTML||(this.firefox=8)}for(var n=["firefox","chrome","safari","webkit","khtml","ie","opera"],a=0;a<n.length;a++)!function(e,t){e[t+"Upto"]=function(e){return this[t]&&("number"!=typeof this[t]||this[t]<=e)},e[t+"Atleast"]=function(e){return this[t]&&("number"!=typeof this[t]||this[t]>=e)}}(this,n[a]);return this.compatibility={lineClamp:void 0!==t.createElement("div").style["webkitLineClamp"],cssTransforms:function(){for(var e=t.createElement("div"),r=["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;i<r.length;i++)if(void 0!==e.style[r[i]])return!0;return!1}(),passiveEvents:function(){var e=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){e=!0}}))}catch(e){}return e}()},this},i=function(){var e;this.isTouchDevice="ontouchstart"in window,this.deviceType=(e=navigator.userAgent.match(/iPhone|iPod|iPad/i))?e[0]:"other"},o={isEnabled:function(){return!!e.taboolaMobile}};TRC.Device=new i,TRC.Browser=new r,TRC.MobileSdk=o}(window,document),(()=>{class e{init(){this.bulkLoggers={availableBulkLogger:new TRC.TRCBulkLogger("bulk"),metricBulkLogger:new TRC.TRCBulkLogger("bulk-metrics")},this.eventToLogger={available:this.bulkLoggers.availableBulkLogger,metrics:this.bulkLoggers.metricBulkLogger,"required-viewability-available":this.bulkLoggers.availableBulkLogger},this.initialized=!0}bulkPost(e,t,r,i,o){this.initialized||this.init();const n=this.eventToLogger[t];if(!n)return TRC.TRCLogger.post(e,t,r,i,o),void __trcWarn(`Failed sending bulk event for eventType: ${t}, bulk is not currently supported`);n.bulkPost(e,t,r,i,o)}}TRC.BulkLoggerManager=new e})(),(()=>{class e{constructor(e,t,r){this.localStorage=e,this.cacheName=t,this.cacheTtl=r}isOverTtl(e){const t=(new Date).getTime();return t-e>this.cacheTtl}setCacheClean(e,t){const{localStorage:r,cacheName:i,cacheTtl:o}=this;TRC.Timeout.set(()=>{TRC.tlf&&console.time("in setCacheClean"),t.removeKey(e),r.setValue(i,__trcJSONify(t.getData())),TRC.tlf&&console.timeEnd("in setCacheClean")},o)}static removeKey(e,t){return!!t.getValue(e)&&(t.removeKey(e),!0)}cleanCache(e,t,r){const i=e||TRC.util.keys(t.getData());let o;for(let n=0;n<i.length;n++){o=i[n];const e=t.getValue(o);e&&(this.isOverTtl(e.s)&&r.removeKey(o))}this.localStorage.setValue(this.cacheName,__trcJSONify(t.getData()))}getCache(e){const t=this.localStorage.getValue(this.cacheName)||{};try{if(t)return e.getDummyStorage(TRC.util.jsonParseWithNative(t))}catch(t){return e.getDummyStorage()}}}TRC.CacheUtils=e})(),(()=>{const e="allowed-categories-map";class t{constructor(t){const{sourceCategory:r,global:i}=t.trc,{publisherId:o,dom:{addClass:n}}=TRC,a=i[e];let s={};if(this.text="",this.isCategoryCard=!0,this.sourceCategory=r,n(t.container,"tbl-category-card-enabled"),!r)return void this.sendEvent("No Source Category");a&&(s=a[o]||a);const l=s[r];l?(this.render=this.validateCategoryLogic(t),this.render&&(n(t.container,"tbl-category-card-rendered"),this.text=l.toUpperCase())):this.sendEvent("No category translation")}sendEvent(e){TRCImpl.sendAbTestEvent("category-card",`Channel: ${this.sourceCategory}, Result: ${e}`)}validateCategoryLogic(e){const{length:t=0}=e.recommendationList;if(!t)return!1;for(let r=0;r<t;r++){const t=e.recommendationList[r];if(!t.category)return this.sendEvent("No Category"),!1;if(this.sourceCategory!==t.category)return this.sendEvent(`fallback. item category is: ${t.category}`),!1}return!0}static enableCategoryCard(e){return!!e.trc.getProperty(e.mode_name,"enable-category-card",e.propertiesOverride)}}TRC.CategoryCard=t})(),((e,t,r)=>{const i=(e=[],t={})=>{p.isInitialized=!0,n(t),o(e),TRC.dom.injectStyle(`a.tbl-ccpa { font-weight: normal; font-size: 11px; Color: #999999; margin: 0 3px 0 0; text-decoration: none; font-family: Arial, Helvetica, sans-serif; float: right; } a.tbl-ccpa.tbl-ccpa-left { float: left; } a.tbl-ccpa.tbl-ccpa-right { float: right; }.logoDiv a.tbl-ccpa span { font-size: 11px; color: #999999; }div.tbl-feed-header.tbl-ccpa-container .tbl-ccpa { margin-top: 3px; }div.tbl-feed-header.tbl-ccpa-container div.tbl-feed-header-logo { display: inline-block; }.trc-widget-footer a.tbl-ccpa.tbl-cpa-pipe-before::before { content: '|'; margin-right: 2px; font-size: 11px; color: #999999; }.tbl-rtl .tb-ccpa-mobile { line-height: 11px; }.tbl-rtl .logoDiv.link-ccpa { display: inline-block; }.tbl-rtl div.tbl-feed-header .tbl-ccpa { margin-top: 0; }.tbl-rtl .trc-widget-footer a.tbl-ccpa { float: none; } .tbl-rtl .trc-widget-footer a.tbl-ccpa.tbl-cpa-pipe-before::before { content: ''; } .tbl-rtl .trc-widget-footer a.tbl-ccpa.tbl-cpa-pipe-before::after { content: '|'; margin-left: 2px; font-size: 11px; color: #999999; }`,null),d()},o=e=>{let t=p.config&&p.config.placement;if(t)return r.ccpa.placement=t,t;for(let r=0;r<e.length;r++){const i=e[r];if((t=i.dc||i.uuip||i.uip).toLowerCase().indexOf("below")>-1&&i.v.length>0)return p.placement=t,t}p.placement=t},n=({markup:e="CCPA Notice",href:t="https://ccparequest.taboola.com/",enableScrolling:r="yes",classList:i,style:o,inlineStyle:n="",location:a="beforeend",renderOnce:s=!0,placement:l=""})=>{const c=i?[...i,"tbl-ccpa"]:"tbl-ccpa";p.config={markup:e,href:t,enableScrolling:r,classList:c,style:o,inlineStyle:n,location:a,renderOnce:s,placement:l}},a=e=>{const{config:t,placement:r}=p;return t&&!t.renderOnce||r===e},s=(e,t={})=>{let r="tbl-ccpa-container";TRC.dom.isSmartPhone()&&(r+=" tb-ccpa-mobile"),TRC.dom.addClass(e,r);const i=TRC.util.merge({},p.config,t);TRC.PopupLink.create(e,i)},l=(e,t,r)=>{if(p.shouldCreateCcpa(t)){const t={};let i="";"RIGHT"===r?i=" tbl-ccpa-left":"LEFT"===r&&(i=" tbl-ccpa-right"),t.classList=`${p.config.classList}${i}`,p.create(e,t)}},c=e=>{if(e.isFeedCard||!a(e.placement))return;const t=e.getWidgetFooter();let r="";t.children.length>0&&(r=" tbl-cpa-pipe-before");const i={markup:`<span>${p.config.markup}</span>`,classList:`${p.config.classList} tbl-ccpa-on-widget${r}`,location:"afterbegin",wrapper:{type:"div",className:"logoDiv link-ccpa"}};e.hasAdChoicesLogo&&(i.children='<span class="trc_logos_v_align">&nbsp;</span>'),p.create(t,i)},d=function(e="taboola",t="Rendered",r=null){if(TRC.dom.isInIframe()){const e="in-iframe";r=r?[r,e].join(", "):e}const i={event_type:"ccpa",event_state:t,event_value:e,event_msg:r};TRCImpl.sendEvent("supply-feature",{d:JSON.stringify(i)},null)},p=r.ccpa={placement:"",isInitialized:!1,sendCcpaEvent:d,create:s,init:i,shouldCreateCcpa:a,renderOnWidgetFooter:c,renderOnHeaderFeed:l}})(window,document,TRC),function(){var e=0,t=1,r=2,i=3,o=5,n={taboola_default:"BOOx2jhOOx2mtAKABDENAqAAAAAYSAAA"},a={cmpStatus:i},s="",l={getConsentData:[]},c={getConsentData:1};function d(){a.gdprApplies=!0,a.consentData=n.taboola_default,a.consentPreset="taboola_default"}function p(e,t,r){return c[e]&&l[e].push(r),"tcf"===s?b():"iab"===s?u():void 0}function h(t){t.cmpStatus=e,f(t)}function u(){return!!window.__cmp&&(window.__cmp("getConsentData",null,h),!0)}function m(e,t){if(t&&("tcloaded"===e.eventStatus||"useractioncomplete"===e.eventStatus)){g(e),f(a);try{window.__tcfapi("removeEventListener",2,function(){},e.listenerId)}catch(e){__trcWarn("Error while calling __tcfapi:removeEventListener",e)}}}function g(t){a.cmpStatus=e,a.gdprApplies=t.gdprApplies,a.tcString=t.tcString,a.consentData=null}function b(){try{return window.__tcfapi("addEventListener",2,m),!0}catch(e){__trcWarn("Error while calling __tcfapi:addEventListener",e)}}function f(e){a=TRC.util.merge(a,e),v()}function v(){var e=l["getConsentData"];if(!0!==e.pushOverride){e.push=function(e){"function"==typeof e&&e(a)},e.pushOverride=!0;for(var t=0;t<e.length;t++)e[t](a)}}function C(e){try{window.__tcfapi("getTCData",2,function(t,r){r&&(g(t),a=TRC.util.merge(a,e))})}catch(e){__trcWarn("Error while calling __tcfapi:getTCData",e)}f()}TRC.consent=TRC.consent||{},TRC.consent.setPresets=function(e){n=TRC.util.merge(n,e)},TRC.consent.setConsent=function(t){"tcf"===s?C(t):TRC.consent.hasCMP()?(d(),t&&(a.cmpStatus=t.consentData?e:a.cmpStatus,a.consentPreset=t.consentData?"":a.consentPreset,(a=TRC.util.merge(a,t)).consentData=n[t.consentPreset]||a.consentData),f()):__trcError("TRC.consent.setConsent:- no consent source was set")},TRC.consent.getConsentStatus=function(){return a.cmpStatus},TRC.consent.hasCMP=function(){return!!s},TRC.consent.setConsentSource=function(e,r){return d(),s=e.source.toLowerCase()||s,n=TRC.util.merge(n,e.presets),TRC.cmp=p,a.cmpStatus=t,r&&(n=r),!0},TRC.consent.getAMPConsent=function(e){if(window.context)if(TRC.util.isEmptyString(window.context.initialConsentValue))if("function"==typeof window.context.getConsentState)try{window.context.getConsentState(function(t){1===t.consentState?e("true",null):2===t.consentState?e("false",null):e(null,null)})}catch(t){__trcError("Error while calling AMP getConsentState",t),e(null,null)}else e(null,null);else/\d[YN-]{3}$/.test(window.context.initialConsentValue)?(a.ccpaString=window.context.initialConsentValue,a.gdprApplies=null,a.consentData=null,a.tcString=null):(a.tcString=window.context.initialConsentValue,a.gdprApplies=!0,a.consentData=null),a.cmpStatus=o,e(null,a);else e(null,null)},window._trcIsUTactive&&(TRC.consent.setCurrentSource=function(e){s=e,l={getConsentData:[]},a={cmpStatus:i}})}(),(e=>{TRC.CLSReporter={listenStarted:!1,CLSEventsFilters:[],maxSelectors2Send:100,CLSSelectorsEnabled:!1,CLSSelectorsMessage:"",CLSSelectorsFilter:"selectors",generateQuerySelector(e){if(!e)return null;let t=e.tagName;return e.id?t+=`#${e.id}`:e.className&&(t+=`${e.className}`),t},getSelectorEventData(e){let t="";for(let r=0;r<e.sources.length;r++){const i=e.sources[r],{node:o}=i;if(o){const r=TRC.CLSReporter.generateQuerySelector(o);r&&(t+=`selector='${r}',val=${e.value}|`)}}return t},push(e){e&&e.prefixMessage&&TRC.CLSReporter.reportFilteredCLS(e.prefixMessage,e.eventFilter)},addCLSEventFilter(e,t){t===TRC.CLSReporter.CLSSelectorsFilter?TRC.CLSReporter.CLSSelectorsEnabled||(TRC.CLSReporter.CLSSelectorsEnabled=!0,TRC.CLSReporter.CLSSelectorsMessage=e):TRC.CLSReporter.CLSEventsFilters.push({prefixMessage:e,eventFilter:t,clsValue:0})},reportFilteredCLS(e,t){TRC.CLSReporter.addCLSEventFilter(e,t),TRC.CLSReporter.listenToCLSEventsAndReport()},listenToCLSEventsAndReport(){if(!TRC.CLSReporter.listenStarted&&TRC.performance){TRC.CLSReporter.listenStarted=!0;let t=0;TRC.listen("onCls",e=>{TRC.CLSReporter.CLSEventsFilters.forEach(t=>{t.eventFilter&&!t.eventFilter(e)||(t.clsValue+=e.value)}),TRC.CLSReporter.CLSSelectorsEnabled&&TRC.CLSReporter.maxSelectors2Send>t++&&(TRC.CLSReporter.CLSSelectorsMessage+=TRC.CLSReporter.getSelectorEventData(e))}),e.addEventListener("beforeunload",TRC.CLSReporter.fireCLSBeaconOnUnload.bind(this))}},fireCLSBeaconOnUnload(){TRC.CLSReporter.CLSEventsFilters.forEach(e=>{__trcWarnUsingBeacon(`${e.prefixMessage}:${e.clsValue.toFixed(6)}`)}),TRC.CLSReporter.CLSSelectorsEnabled&&__trcWarnUsingBeacon(TRC.CLSReporter.CLSSelectorsMessage)},init(){TRC.CLSEvents&&TRC.CLSEvents.forEach(e=>{TRC.CLSReporter.push(e)}),TRCImpl.global["cls-max-selectors"]&&(TRC.CLSReporter.maxSelectors2Send=TRCImpl.global["cls-max-selectors"]),TRCImpl.global["enable-cls-selectors"]&&TRC.CLSReporter.push({prefixMessage:"accumulating cls selectors:",eventFilter:TRC.CLSReporter.CLSSelectorsFilter})}}})(window),TRC.CustomModulesManager={registeredModules:{},getPath(e,t){switch(e){case void 0:case"ui-innovation":return`${this.PATH.UI}/${t}`;case"demand-formats":return`${this.PATH.DEMAND}/${t}`;default:return e}},setGlobalPaths(e){const t=e.global["cdn-taboola-path"]||"cdn.taboola.com";this.setGlobal=!0,this.CDN=TRC.shiftDomain(t),this.PATH={UI:e.global["ui-innovation-modules-path"]||"ui-ab-tests",DEMAND:"demand-formats"}},getCustomModulesFromResponse(e,t){if(!e||!e.trc)return;this.customModuleCga=TRC.Manager.prototype.parseClientGenericAction(e,"cga");const r={feedExtension:this.createModuleMap(e.trc.f,!0,"drp"),demandGenericAction:this.createModuleMap(e.trc.dcga,!1),clientGenericActionPageLevel:this.createModuleMap(this.customModuleCga,!1),clientGenericActionPlacementLevel:this.createModuleMap(e.trc.vl,!0,"cga"),externalVideoReel:this.createModuleMap(e.trc.vl,!0,"evr")};this.loadModules(r,t)},createModuleMap:(e,t,r)=>({root:e,loop:t,key:r}),loadModules(e,t){!this.setGlobal&&this.setGlobalPaths(t);const r=Object.keys(e);r.forEach(t=>{const r=e[t];r.root&&(r.loop?this.loadModulesFromChildren(r):this.loadModulesFromRoot(r))})},loadModulesFromChildren(e){Object.keys(e.root).forEach(t=>{const r=e.root[t];r&&r[e.key]&&r[e.key].customModules&&this.loadCustomModules(r[e.key].customModules,t)})},loadModulesFromRoot(e){e.root&&e.root.customModules&&this.loadCustomModules(e.root.customModules)},loadCustomModules(e,t){try{const r=__trcUnJSONify(e);Object.keys(r).forEach(e=>{if("dependencies"!==e){const i=e;this.loadModule(i,r[i],t)}})}catch(t){__trcError(`Error while trying to parse json custom module, error msg: ${t} ,module data: ${e}`)}},loadModule(e,t,r){let i=this.getModuleInfo(e);const o=i&&-1===i.feedsOriginPlacementNames.indexOf(r);if(o&&i.feedsOriginPlacementNames.push(r),i||!0===t.disable)return;i=this.registeredModules[e]={options:t,moduleName:e,feedsOriginPlacementNames:[r]};const n=this.getPath(t.path,e);if(this.shouldLoadResource(t.js)&&!i.jsRequested){TRC.customHooks||(TRC.customHooks={});const r=t.js||e;this.loadModuleResource(`${n}/${r}`,"js",e,i),i.jsRequested=!0}if(this.shouldLoadResource(t.css)&&!i.cssRequested){const r=t.css||e;this.loadModuleResource(`${n}/${r}`,"css",e,i),i.cssRequested=!0}},shouldLoadResource:e=>void 0===e||!TRC.util.isFalse(e),runHook(e,t,r,...i){this.dispatchHook(e,t,r,i)},dispatchHook(e,t,r,i){Object.keys(this.registeredModules).forEach(o=>{const n=this.getModuleInfo(o);this.isRelevantType(t,n,r)&&this.runCBOnModuleReady(o,()=>{const t=this.getModuleHook(n,e,r,...i);t&&t()})})},getModuleInfo(e){return this.registeredModules[e]},runCBOnModuleReady(e,t){const r=this.getModuleInfo(e);r&&r.ready?t():this.listenToModuleReady(e,t)},listenToModuleReady(e,t){TRC.listen(`TRC.${e}.ready`,t)},waitForModule(e,t){const{customModules:{dependencies:r}={}}=this.customModuleCga||{};if(!r)return t;const i=r[e];return i?()=>{TRC.CustomModulesManager.runCBOnModuleReady(i,t.trcBind(this))}:t},isRelevantType(e,t,r){const{uiModes:i,placements:o}=t.options;return!e||(r instanceof TRC.Feed?-1!==t.feedsOriginPlacementNames.indexOf(r.mainContainerPlacement)&&(!o||e&&o&&o.indexOf(e)>-1):r instanceof TRC.implClasses.TRCRBox?!i||e&&i&&i.indexOf(e)>-1:void 0)},getModuleHook(e,t,r,...i){const o=TRC.customHooks[e.moduleName];return o&&o.hooks&&o.hooks[t]&&o.hooks[t].trcBind(r,...i,r)},isEveryModuleNeededLoaded(e){const t=this.shouldLoadResource(e.options.js),r=this.shouldLoadResource(e.options.css);return!(t&&!e.jsReady||r&&!e.cssReady)},loadModuleResource(e,t,r,i,o=0){const n=`${TRC.PROTOCOL}//${this.CDN}/${e}.${t}`,a=TRCImpl.global["module-load-retry"]||2;TRC.net.loadScript(n,t,s=>{"error"===s.type?o>=a?__trcError(`Failed to load custom module resource ${n}`):TRC.CustomModulesManager.loadModuleResource(e,t,r,i,++o):(i[`${t}Ready`]=!0,this.isEveryModuleNeededLoaded(i)&&(i.ready=!0,TRC.dispatch(`TRC.${r}.ready`)))},!0)}},((e,t)=>{TRC.docVisibilityUtil=function(){let e="",r="";if(void 0!==t.hidden?(e="hidden",r="visibilitychange"):void 0!==t.msHidden?(e="msHidden",r="msvisibilitychange"):void 0!==t.webkitHidden&&(e="webkitHidden",r="webkitvisibilitychange"),!e)return{addEventListener:()=>{},isVisible:()=>null};function i(){return!t[e]}function o(e){t.addEventListener(r,()=>{e(i())},!1)}return{addEventListener:o,isVisible:i}}()})(window,document),TRC.lazyLoadingDependencies={"distance-from-article":[{fileName:"article-detection",objectName:"ArticleDetection"}],"share-buttons-detection":[{fileName:"article-detection",objectName:"ArticleDetection"}],"bid-detection":[{fileName:"distance-from-article",objectName:"DistanceFromArticle"}],"stories-vertical-ui":[{fileName:"stories-transition-manager",objectName:"StoriesTransitionsManager",isMandatory:!0},{fileName:"stories-video-manager",objectName:"StoriesVideoManager"}]},TRC.ModuleLoader={requestedModules:{},load(e,t,r,i,o){if(r=TRC.CustomModulesManager.waitForModule(e,r),o=void 0===o?window.TRCImpl&&TRCImpl.global&&TRCImpl.global["module-load-retry"]||2:o,t)r();else if(this.requestedModules[e]&&!i)this.requestedModules[e].callbacks.push(r);else{i||(this.requestedModules[e]={callbacks:[this.logSuccessToPerformance.trcBind(this,e),r]},TRC.performance&&TRC.performance.mark(`moduleLazyLoad${e}start`,null,"",e,"moduleLazyLoadTime",TRC.PerfEvenType.START));const n=this.toFingerPrintedName(e),a=TRC.lazyLoadingDependencies[e];if(!a||a.length<=0)TRC.loadTaboolaScript(n,!0,this.requestedModules[e].callbacks,i=>{this.loadErrorCallback(i,o,e,t,r,n)});else{const s=()=>{TRC.loadTaboolaScript(n,!0,t=>{this.invokeCallbackUponFullLoad(++c,a.length,e,t)},i=>{this.loadErrorCallback(i,o,e,t,r,n)})},l=this.createMandatoryTable(a)||{};let c=0;0===Object.keys(l).length&&s(),i||a.forEach(t=>{const{fileName:r}=t;this.load(t.fileName,TRC[t.objectName],t=>{this.invokeCallbackUponFullLoad(++c,a.length,e,t);try{!1===l[r]&&(l[r]=!0,this.isMandatoryModulesLoaded(l)&&s())}catch(e){__trcError(`failed to check mandatory module ${r}. Error is: ${e.message}`,e)}})})}}},createMandatoryTable:e=>Array.isArray(e)?e.reduce((e,t)=>(t.isMandatory&&(e[t.fileName]=!1),e),{}):{},isMandatoryModulesLoaded:e=>Object.keys(e).every(t=>e[t]),invokeCallbackUponFullLoad(e,t,r,i){if(e<t+1)return;const o=this.chainCallbacks(this.requestedModules[r].callbacks);o(i)},logSuccessToPerformance(e){TRC.performance&&TRC.performance.mark(`moduleLazyLoad${e}stop`,null,"",e,"moduleLazyLoadTime",TRC.PerfEvenType.STOP)},toFingerPrintedName(e){const t=`${TRC.hasES6Support()?"es6":"es5"}.js`;return`${e}.${TRC.version}.${t}`},chainCallbacks:e=>Array.isArray(e)?t=>{e.forEach(e=>e(t))}:"function"==typeof e?e:()=>{},loadErrorCallback(e,t,r,i,o,n){t>0?TRC.ModuleLoader.load(r,i,o,!0,--t):(this.logError(e,n),this.requestedModules[r]=null,TRC.dispatch("module-loader-failure",{moduleFile:r,moduleObj:i,fingerPrintedFileName:n}))},logError(e,t){__trcError(`failed to load module ${t}. Error is: ${e.message}`,e)}},(e=>{const t=!!e.navigator.sendBeacon;TRC.hasNetworkAsyncSupport=(()=>t),TRC.sendPostAsyncCall=((r,i)=>!!t&&(e.navigator.sendBeacon(r,i),!0))})(window),TRC.RBoxUsage={logUsage(e,{file:t="",method:r="",position:i="",skipCaching:o,extraData:n={}}={}){TRCImpl&&TRCImpl.global&&TRCImpl.global["disable-rbox-usage-logging"]||TRC.modDebug.logMessageToServer(4,e,{file:t,method:r,position:i,extraData:__trcJSONify(n)},o)}},(e=>{function t(e){const t=e.match(/http.*?\.js/);return t?t[0]:""}function r(){return TRC.util.isPercentEnabled(TRCImpl.global,"enable-loaf")}function i(e,t,r){const i=!!t.sourceLocation&&t.sourceLocation.indexOf(a)>-1;if(!i)return!1;const o=t.duration>TRC.TBTReporter.MAX_MS_FOR_SHORT_TASK,n=e[a]>r/2,s=o||n;return s}function o(t){const{parentEntity:r,entityId:i,effectiveBlockingTimeDelta:o,count:n}=t;r[i]||(r[i]=e.__trcCopyProps(s,{}));const a=r[i];a.duration+=o,a.count+=n,t.hasInteraction&&(a.countwithinteraction+=n,a.durationwithinteraction+=o),t.taboolaIsMajor&&(a.majorcount+=n,a.majorduration+=o,t.hasInteraction&&(a.majorcountwithinteraction+=n,a.majordurationwithinteraction+=o))}const n="total",a="taboola.com",s={count:0,countwithinteraction:0,duration:0,majorcountwithinteraction:0,majorcount:0,durationwithinteraction:0,majorduration:0,majordurationwithinteraction:0};function l(){const{performance:e}=window,t=e.now.bind(e),r=t();for(let i=0;i<1e6;i++){const e=i*i}return t()-r}TRC.TBTReporter={MAX_MS_FOR_SHORT_TASK:50,TBT:0,LOAF_ENTRY_TYPE:"long-animation-frame",TBT_REPORTED:!1,loafReport:{},loafCulpritsReport:{},getTBT(){return this.TBT},setTBT(e){this.TBT=e},isEntryTypeSupported(t){if(t===this.LOAF_ENTRY_TYPE){const e=window.PerformanceLongAnimationFrameTiming;return!!e}const r=e.PerformanceObserver&&e.PerformanceObserver.supportedEntryTypes;return!(!r||-1===r.indexOf(t))},isLoafSupported(){return this.isEntryTypeSupported(this.LOAF_ENTRY_TYPE)},addLongTasksObserver(){const t=new PerformanceObserver(this.longTasksListener.bind(this));try{return t.observe({type:"longtask",buffered:!0}),!0}catch(t){return t.message&&-1===t.message.indexOf("entryTypes")&&e.__trcError(`error in addLongTasksObserver: ${t.message}`),!1}},addLoafExperimentMetaTag(){const e=document.createElement("meta");e.httpEquiv="origin-trial",e.content=TRCImpl.global["loaf-token"],document.head.appendChild(e)},handleLongAnimationFrameScript(r,i,n){const l=TRCImpl.global["loaf-threshold"]||50,c=Math.max(n.duration-l,0),d=n.sourceLocation;if(!d)return"no_sourcelocation";const p=t(d);if(!p)return"no_sourceurl";const h=new URL(p),u=h.hostname;if(!u)return"no_hostname";const m=-1!==u.indexOf(a),g=()=>{const t=h.pathname.split("/").pop();t&&(r[u]||(r[u]={[t]:e.__trcCopyProps(s,{})}),o({parentEntity:r[u],entityId:t,effectiveBlockingTimeDelta:c,count:1}))};return m?g():o({count:1,parentEntity:i,entityId:u,effectiveBlockingTimeDelta:c}),u},summarizeNonTaboolaLoafReport(e,t){let r=0;TRC.util.objectForEach(e,i=>{r+=e[i].duration,e[i]&&o({parentEntity:this.loafReport.withtaboola,entityId:i,count:e[i].count,effectiveBlockingTimeDelta:e[i].duration,hasInteraction:t})}),o({parentEntity:this.loafReport.withtaboola,entityId:n,count:1,effectiveBlockingTimeDelta:r,hasInteraction:t})},summarizeTaboolaLoafReport(e,t,r){let i=0;TRC.util.objectForEach(e,a=>{let s=0;TRC.util.objectForEach(e[a],n=>{i+=e[a][n].duration,s+=e[a][n].duration,this.loafReport.taboola.domains[a]||(this.loafReport.taboola.domains[a]={}),o({parentEntity:this.loafReport.taboola.domains[a],entityId:n,count:e[a][n].count,effectiveBlockingTimeDelta:e[a][n].duration,hasInteraction:t,taboolaIsMajor:r})}),o({parentEntity:this.loafReport.taboola.domains[a],entityId:n,count:1,effectiveBlockingTimeDelta:s,hasInteraction:t,taboolaIsMajor:r})}),o({parentEntity:this.loafReport.taboola,entityId:n,count:1,effectiveBlockingTimeDelta:i,hasInteraction:t,taboolaIsMajor:r})},getCulpritRegex:()=>TRCImpl.global["loaf-culprits-regex"],addToCustomLoafReport(e){e.getEntries().forEach(e=>{e.scripts.forEach(e=>{const{sourceLocation:t}=e;if(!new RegExp(this.getCulpritRegex()).test(t))return;const r=t.match(/(\w+@)?(http.:\/\/)?(\w+\.\w+\.\w+)\/(.+)/);let i,o,n,a="";!r||r.length<5?i=t:[,a,o,n,i]=r,i||(i=t);const s=e.name?e.name.replace(o+n,""):"";this.loafCulpritsReport[i]?(this.loafCulpritsReport[i].count++,this.loafCulpritsReport[i].totalDuration+=e.duration):this.loafCulpritsReport[i]={count:1,funcName:a,name:s,totalDuration:e.duration},e.duration>50&&(this.loafCulpritsReport[i].bd||(this.loafCulpritsReport[i].bd=[]),this.loafCulpritsReport[i].bd.push(e.duration-50))})})},addToAggLoafReport(e){e.getEntries().forEach(e=>{if(0===e.blockingDuration)return;let t="no_scripts";const r=e.firstUIEventTimestamp>0,n={},a={},s={};let l;e.scripts.forEach((r,o)=>{const c=this.handleLongAnimationFrameScript(s,a,r);n[c]||(n[c]=0),n[c]+=r.duration;const d=0===o,p=d||n[c]>n[t];p&&(t=c),i(n,r,e.duration)&&(l=!0)});const c=Object.keys(s).length;if(c&&(Object.keys(a).length&&this.summarizeNonTaboolaLoafReport(a,r),this.summarizeTaboolaLoafReport(s,r,l)),o({parentEntity:this.loafReport,entityId:"global",effectiveBlockingTimeDelta:e.blockingDuration,count:1,hasInteraction:r,taboolaIsMajor:l}),r){const r=this.loafReport.global;e.blockingDuration>r.inpBlockingDuration&&(r.inpBlockingDuration=e.blockingDuration,r.inpOrigin=t),l&&(r.taboolaInpBlockingDuration=Math.max(r.taboolaInpBlockingDuration,e.blockingDuration))}})},longAnimationFramesHandler(e){r()&&this.addToAggLoafReport(e),this.getCulpritRegex()&&this.addToCustomLoafReport(e)},observeLoaf(){if(!r()&&!this.getCulpritRegex())return!1;const e=new PerformanceObserver(this.longAnimationFramesHandler.bind(this));return e.observe({type:this.LOAF_ENTRY_TYPE,buffered:!0}),!0},addLongAnimationFramesObserver(){try{return this.loafReport={taboola:{domains:{},total:e.__trcCopyProps(s,{})},withtaboola:{total:e.__trcCopyProps(s,{})},global:e.__trcCopyProps(s,{inpBlockingDuration:0,taboolaInpBlockingDuration:0})},this.loafCulpritsReport={},this.addLoafExperimentMetaTag(),this.isLoafSupported()?(__trcWarn(`loafSupported:true`),this.observeLoaf()):(__trcWarn(`loafSupported:false`),!1)}catch(t){return e.__trcWarn&&e.__trcWarn("failed to add taboola loaf to perf",t),!1}},addPerfMetric(e,t,r){const i={name:`generalMeasure_${e}`,entryType:"measure",startTime:t,duration:r};TRC.performance.measurements.push(i)},logLongAnimationFrames(){this.isLoafSupported()&&(r()&&e.__trcWarn(`loaf:${JSON.stringify(this.getLoAFReport())}`),this.getCulpritRegex()&&e.__trcWarn(`loafCulprits:${JSON.stringify(this.loafCulpritsReport)}`))},addTBT(e){this.setTBT(this.TBT+e)},isPerfActivated:()=>TRC.performance&&TRC.Performance&&TRC.performance instanceof TRC.Performance,longTasksListener(e){e.getEntries().forEach(e=>this.processLongTask(e))},getLoAFReport(){return this.loafReport},processLongTask(e){const t=e.duration-this.MAX_MS_FOR_SHORT_TASK;this.addTBT(t)},logMeasurements(){this.addPerfMetric("TBT",performance.now(),this.TBT),TRC.performance.logMeasurements(!0,!0)},reportTBT(){let t="";e.removeEventListener("visibilitychange",this.visibilityListener,!0),TRC.util.isPercentEnabled(TRCImpl.global,"enable-warn-tbt")&&(e.TRCImpl.tbtExperimentsVariantIdsStr&&(t=`&${e.TRCImpl.tbtExperimentsVariantIdsStr}`),e.__trcWarn(`TBT=${this.TBT}${t}`)),this.isPerfActivated()&&this.logMeasurements()},reportLoAF(){e.removeEventListener("visibilitychange",this.visibilityListener,!0),this.logLongAnimationFrames()},scheduleTbtReport(){this.visibilityListener=(()=>{"hidden"===document.visibilityState&&(this.TBT_REPORTED||(this.TBT_REPORTED=!0,(TRC.util.isPercentEnabled(TRCImpl.global,"enable-warn-tbt")||this.isPerfActivated())&&this.reportTBT(),(r()||this.getCulpritRegex())&&this.reportLoAF()))}),e.addEventListener("visibilitychange",this.visibilityListener,!0)},init(){if(TRC._trecsInit)return;if(!e.PerformanceObserver)return;if(l()>TRCImpl.global["browser-benchmark"])return;let t=!1,i=!1;(TRC.util.isPercentEnabled(TRCImpl.global,"enable-warn-tbt")||this.isPerfActivated())&&(t=this.addLongTasksObserver()),(r()||this.getCulpritRegex())&&(i=this.addLongAnimationFramesObserver()),(t||i)&&this.scheduleTbtReport()}}})(window),TRC.unifiedPlacementsProductsUtil={containersReset:(e,t)=>{Object.keys(e).forEach(r=>{const i=e[r].mainContainerId,o=document.querySelectorAll(`[${t}=${i}]`);for(let e=0;e<o.length;e++){const t=o[e],r=t.getAttribute(TRC.intersections.TARGET_ATTRIB);e>0?t.remove():(t.className=t.origClassName,t.innerHTML="",r&&TRC.intersections.unobserveAll(r))}})}};let isAvailable=!1;try{isAvailable=!(!window.HTMLElement||!window.customElements&&!document.registerElement)}catch(e){}const HTMLElementClass=isAvailable?window.HTMLElement:class e{};class GenericWebComponent extends HTMLElementClass{static get isAvailable(){return isAvailable}attachShadow({mode:e="open"}={}){if(super.attachShadow)return super.attachShadow({mode:e});if(super.createShadowRoot){super.createShadowRoot();const{shadowRoot:t}=this;return"open"!==e&&(this.shadowRoot=null),t}return null}static checkRegistration({name:e,component:t}={}){if(!isAvailable)return!1;try{return document.createElement(e)instanceof t}catch(e){}return!1}static registerElement({name:e,component:t}={}){if(!isAvailable)return!1;let r=!1;try{window.customElements?(window.customElements.get(e)||window.customElements.define(e,t),r=GenericWebComponent.checkRegistration({name:e,component:t})):document.registerElement&&document.isRegistered&&(document.isRegistered(e)||document.registerElement(e,t),r=GenericWebComponent.checkRegistration({name:e,component:t}))}catch(e){}return r||(isAvailable=!1),r}}try{const e=document.createElement("div"),t=document.createElement("div"),r=GenericWebComponent.prototype.attachShadow.call(e,{mode:"closed"}),i=GenericWebComponent.prototype.attachShadow.call(t);r&&null===e.shadowRoot&&i&&t.shadowRoot===i||(isAvailable=!1)}catch(e){isAvailable=!1}const attributes={rating:"rating",postRatingNumber:"post-rating-number",price:"price",separatedBy:"separated-by"};let styleHasLoaded$1=!1;class TblStarRating extends GenericWebComponent{connectedCallback(){loadedStyle$1(),this.classList.add("video-branding-flex-cta-rating"),this.render()}static get observedAttributes(){return Object.values(attributes)}attributeChangedCallback(e,t,r){r!==t&&this.render()}render(){this.innerHTML="";const e=[];try{this.hasAttribute(attributes.price)&&e.push(this.generatePriceElement()),this.hasAttribute(attributes.rating)&&(e.push(this.generateStarElement()),this.hasAttribute(attributes.postRatingNumber)&&e.push(this.generateStarNumberElement()));const t=this.getAttribute(attributes.separatedBy);e.forEach((e,r)=>{if(r){const e=createSeparator(t);this.appendChild(e)}this.appendChild(e)})}catch(e){}}get rating(){const e=+`${this.getAttribute(attributes.rating)}`||0;return e}generatePriceElement(){const e=this.getAttribute(attributes.price),t=document.createElement("span");return t.innerText=e,t.classList.add("video-branding-flex-cta-price-wrapper"),t}generateStarElement(){return drawStars({rating:this.rating})}generateStarNumberElement(){const e=document.createElement("span");return e.innerText=this.rating.toFixed(1),e}}function loadedStyle$1(){if(!styleHasLoaded$1){try{TRC.dom.injectStyle(`.videoCube .video-branding-flex-cta-stars-wrapper { display: inline-block; display: inline-flex; flex-direction: row; align-items: center; } .videoCube .video-branding-flex-cta-stars-wrapper .cta-rating-star { margin-right: 4px; height: 1em; width: 1em; }.videoCube .video-branding-flex-cta-rating { flex-basis: 100%; padding-bottom: 2px; padding-top: 2px; margin-top: 5px; direction: ltr; } .videoCube .video-branding-flex-cta-rating .video-branding-flex-cta-oval-wrapper { margin-left: 6px; margin-right: 6px; } .videoCube .video-branding-flex-cta-rating .video-branding-flex-cta-oval-wrapper .cta-rating-oval { vertical-align: middle; margin-bottom: 1px; height: 3px; width: 3px; } .videoCube .video-branding-flex-cta-rating .video-branding-flex-cta-price-wrapper { font-family: Helvetica Bold; font-size: 10px; color: #737373; }`,null)}catch(e){}styleHasLoaded$1=!0}}GenericWebComponent.registerElement({name:"tbl-star-rating",component:TblStarRating});const drawStars=({rating:e=0})=>{const t=`${Date.now().toString(34)}-${Math.random().toString(34)}`.replaceAll(".",""),r=(e,r)=>`\n <svg class="cta-rating-star"\n height="9px"\n version="1.1"\n viewBox="0 0 9 9"\n width="9px"\n xmlns="http://www.w3.org/2000/svg">\n <g fill="none" fill-rule="evenodd" stroke="none" stroke-width="1">\n <linearGradient id="lg${r}-${t}" x1="0" x2="1" y1="0.5" y2="0.5">\n <stop offset="0" stop-color="#737373" stop-opacity="1" />\n <stop offset="${e}" stop-color="#737373" stop-opacity="1" />\n <stop offset="${e}" stop-color="#737373" stop-opacity="0.5" />\n <stop offset="1" stop-color="#737373" stop-opacity="0.5" />\n </linearGradient>\n <g fill="url(#lg${r}-${t})" fill-rule="nonzero" transform="translate(-21, -19)">\n <polygon points="25.5 26.4626165 22.7188471 28 23.25 24.7437694 21 22.4376941 24.1094235 21.9626165 25.5 19 26.8905765 21.9626165 30 22.4376941 27.75 24.7437694 28.2811529 28">\n </polygon>\n </g>\n </g>\n </svg>`,i=document.createElement("span");return i.classList.add("video-branding-flex-cta-stars-wrapper"),i.innerHTML=Array(5).fill(0).map((t,i)=>r(Math.min(Math.max(e-i,0),1),i)).join(""),i},createSeparator=e=>{switch(e){case"oval":return createSvgOval()}const t=document.createElement("span");return t.innerHTML="&emsp;",t},createSvgOval=()=>{const e=document.createElement("span");return e.classList.add("video-branding-flex-cta-oval-wrapper"),e.innerHTML=`\n <svg class="cta-rating-oval"\n width="3px"\n height="3px"\n viewBox="0 0 3 3"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-172, -485)" fill="#666666" fill-rule="nonzero">\n <circle cx="173.5" cy="486.5" r="1.5">\n </circle>\n </g>\n </g>\n </svg>`,e};(()=>{class e{constructor(){this.cardIndexOnPage=0,this.globalConfig=[],this.horizontalMarginToFilter=.1,this.ctaChildrenParentGap=10,this.videoLabelBoxWidthRatio=.98,this.ctaButtonTextAmountOfChars=15,this.maxCharsForItemId=40,this.urlParams={},this.ctaButtons={}}static initialize(t,r){if(!TRC.ctaManager){if(!e.shouldCreateCTAManager(t,r))return;TRC.ctaManager=new e,TRC.ctaManager.setupFromConfig(t)}TRC.ctaManager.prepareDataForCTA(t,r)}static shouldCreateCTAManager(e,t){if(!e.trc.global["enable-cta-component"])return!1;const r=TRC.CTAManager.getPubConfigOverrideFromRboxResponse("enable-call-to-action-creative-component",e);return!(!r||"true"!==r)&&!!t.video_data["cta-text"]}static isCtaEnabledOnCurrentMode(t){try{if(t.trc.getProperty(t.mode_name,"ctaWidget"))return!0;if(TRC.MetricsManager.isMetricsEnabled(TRCImpl,TRC)){const r=e.createEventName("disabled_by_cp");e.prototype.reportMetrics.call({shouldReportUsageAndMetricEvent:!0},r),TRC.RBoxUsage.logUsage(`cta-_${(new Date).getTime()}`,{extraData:{event:r,mode:t.mode_name,v:"2"},file:"cta-manager"})}}catch(e){}return!1}static getButtonInnerHeight(){return 24}static getButtonHeight(){return TRC.CTAManager.getButtonInnerHeight()+7}static getPriceRatingHeight(){return 22}static getPubConfigOverrideFromRboxResponse(e,t){const r=t&&t.globalTrcResponseJSON&&t.globalTrcResponseJSON.dcga&&t.globalTrcResponseJSON.dcga.pubConfigOverride;return r&&r[e]}setupFromConfig(t){this.shouldReportAppInstall=TRC.util.isPercentEnabled(t.trc.global,"app-install-report"),this.shouldReportAbTestEvent=Math.random()<(t.trc.global["cta-abtest-report-percent"]||.03),this.shouldReportRenderedEvent=Math.random()<(t.trc.global["cta-render-report-percent"]||.05),this.shouldReportUsageAndMetricEvent=Math.random()<(t.trc.global["cta-metric-report-percent"]||.03),this.shouldReportUsageAndMetricEvent=this.shouldReportUsageAndMetricEvent&&TRC.MetricsManager&&TRC.MetricsManager.isMetricsEnabled(TRCImpl,TRC),this.shouldReport=this.shouldReportAbTestEvent||this.shouldReportUsageAndMetricEvent||this.shouldReportRenderedEvent,this.windowLocation=this.shouldReport?(window.location.href||"").slice(0,200):"",this.moduleName=e.getPubConfigOverrideFromRboxResponse("module-name",t),this.options={isInheritTitleColor:this.getPubConfigOverride("inherit-title-color",t,!0),style:{borderColor:this.getPubConfigOverride("border-color",t,!0),color:this.getPubConfigOverride("title-color",t,!0),fontSize:this.getPubConfigOverride("cta-font-size",t,!0),fontWeight:this.getPubConfigOverride("font-weight",t,!0)}}}getPubConfigOverride(t,r,i){const o=e.getPubConfigOverrideFromRboxResponse(t,r);return null!=o&&i&&(this.globalConfig[t]=o),null!=o?o:this.globalConfig[t]}renderCTAItems(t,r){this.ctaButtons&&Object.keys(this.ctaButtons).length&&TRC.ModuleLoader.load("cta-component",TRC.CallToActionComponent,()=>{const t=r.boxes,i={shouldAdjustHeight:!1,maxDesiredHeight:0};t.forEach(t=>{try{const o=this.getCtaData(t);if(!o)return;const n=new TRC.CallToActionComponent(t,o);o.callToActionComponent=n,n.renderCTAButton(i,r)}catch(r){throw this.sendEvent({itemContainer:t,name:r.message,type:e.sendEventTypes.error}),r}}),i.shouldAdjustHeight&&(t.forEach(e=>{const t=e.querySelector(".video-label-box");t&&(i.maxDesiredHeight=Math.max(t.offsetHeight,i.maxDesiredHeight))}),t.forEach(e=>{const t=this.getCtaData(e);if(this.fixVideoBoxHeight(e,i.maxDesiredHeight,t),!t)return;const{callToActionComponent:r}=t;r&&r.reportBack(e,t)}))})}fixVideoBoxHeight(t,r,i){const o=t.querySelector(".video-label-box");if(!o||t.video_data&&"true"===t.video_data["is-app-install"])return;if(t.rbox.ctaData.shouldAdjustAllItemsHeight){if(r<=0)return;const n=e.getReportOnOverflow(o,()=>{o.style["min-height"]=`${r}px`});return void(n&&this.sendEvent({itemContainer:t,ctaData:i,name:`fix_all_video_box_${n}`,type:e.sendEventTypes.report}))}const n=o.querySelector(".branding"),a=e.getDesiredVideoBoxHeight(o,n,i,t.rbox);if(a<=0)return;const s=e.getReportOnOverflow(o,()=>{o.style["min-height"]=`${a}px`;const t=e.getComputedStyleProp(o,"max-height",0);t>0&&t<a&&(o.style.maxHeight=`${a}px`)});s&&this.sendEvent({itemContainer:t,ctaData:i,name:`fix_video_box_${s}`,type:e.sendEventTypes.report})}static getReportOnOverflow(t,r){const i=e.getOverflowLabel(t);r();const o=e.getOverflowLabel(t);switch(!0){case!!o&&i===o:return`${o}_still_overflowing`;case!i&&!!o:return`${o}_overflowing`;case!!i&&!o:return`${i}_stopped_overflowing`;default:return""}}static getOverflowLabel(e){if(!e)return"";const t=e.offsetWidth+1<e.scrollWidth,r=e.offsetHeight+1<e.scrollHeight;switch(!0){case t&&r:return"width_and_height_are";case t:return"width_is";case r:return"height_is";default:return""}}static getDesiredVideoBoxHeight(t,r,i,o){let n=e.getVideoLabelBoxChildrenWithoutButtonHeight(t);if((!n||0===n)&&(n=e.getComputedStyleProp(t,"height"))<=0)return 0;if(null!=i&&!i.shouldRenderAsCTA||!r)return o.ctaData.shouldAdjustAllItemsHeight?n:0;const a=null!=i&&i.isPriceRating?e.getPriceRatingHeight():0,s=e.getHeightOfElementIncludeMargin(r),l=n+a-s+Math.max(e.getButtonHeight(),s);return l<=n?o.ctaData.shouldAdjustAllItemsHeight?n:0:l}prepareDataForCTA(t,r){if(!r.video_data["cta-text"]||!e.isCtaEnabledOnCurrentMode(t))return!1;this.ctaButtons[e.getItemId(r)]=this.getCtaData(r)||{};const i=this.getCtaData(r);try{t.ctaData=t.ctaData||{};const o=r.video_data;i.cardIndex=this.cardIndexOnPage++,i.index=o.itemIndex,i.placement=t.placement,i.itemId=this.shouldReport?(o["item-id"]||o.id||"").slice(0,this.maxCharsForItemId):"",this.sendEvent({itemContainer:r,ctaData:i,name:"has_cta_text"});const n=this.getFilterOutItemForCTAReason(t,r);if(n)return void this.sendEvent({itemContainer:r,ctaData:i,name:n,type:e.sendEventTypes.filter});i.shouldRenderAsCTA=!0,i.actionText=TRC.util.getHtmlDecodeText(o["cta-text"]).slice(0,this.ctaButtonTextAmountOfChars),i.price=o.fpr||o["cta-price"];const a=o["stars-rating"];a&&(i.rating=e.roundHalf(a)),i.isPriceRating=i.rating||i.price;const s=i.isPriceRating?"cta_app_render_candidate":"cta_render_candidate";if(this.sendEvent({itemContainer:r,ctaData:i,name:s}),t.ctaData.isInit)return;t.ctaData.isInit=!0,t.ctaData.hasCTAItem=!0,t.ctaData.isStream=e.isStream(t),t.ctaData.shouldAdjustAllItemsHeight=!t.ctaData.isStream&&!e.isSingleColumnWidget(t)}catch(t){throw this.sendEvent({itemContainer:r,ctaData:i,name:t.message,type:e.sendEventTypes.error}),__trcError("Error on prepareDataForCTA",t),t}}getCtaData(t){return this.ctaButtons[e.getItemId(t)]}static getItemId(e){return e.video_data.id}getFilterOutItemForCTAReason(t,r){const i=r.video_data;return e.isNotSyndicated(i)||e.isInNetwork(i)||e.isNextUp(t)||e.isDescriptionBlocked(i)||e.isDetailOrderBlocked(r)||e.hasLink(r)||this.areVideoLabelBoxOrBrandingBlocked(r)||e.isBelowMinWidth(r)||e.isHeroWidget(r)||e.isStoryWidget(r)||e.isNextUpWidget(r)||e.hasIcon(r)}static isNotSyndicated(e){return e.isSyndicated?null:"non_sc"}static isInNetwork(e){return e["is-in-network"]?"in_network":null}static isNextUp(e){const t=e.options&&e.options.trcResponse&&!!e.options.trcResponse.nup;return t?"next_up":null}static isDescriptionBlocked(t){const r=!window.TRCImpl||!window.TRCImpl.global||e.nullish(window.TRCImpl.global["enable-cta-with-description"],!0);return t.description&&!r?"item_with_description":null}static isDetailOrderBlocked(e){const t=e.detail_order;return t&&t.length&&"branding"===t[0]?"item_branding_before_title":null}static hasLink(e){const t=e.link;return t?null:"no_link"}areVideoLabelBoxOrBrandingBlocked(t){const r=t.querySelector(".video-label-box");if(!r)return"no_video_label_box";const i=r.querySelector(".branding");return i?this.isVideoLabelBoxHeightBlocked(r)||this.isVideoLabelBoxBoxSizingBlocked(r)||this.isBrandingMarginBlocked(i)||e.isBrandingPositionBlocked(i)||e.isBrandingInnerPositionBlocked(i)||e.isBrandingLogoPositionBlocked(i):"no_branding"}isVideoLabelBoxHeightBlocked(t){const r=e.getComputedStyleProp(t,"height");if(!r)return null;const i=e.getVideoLabelBoxChildrenWithoutButtonHeight(t);return r+this.ctaChildrenParentGap<i?"videoLabelBox_smaller_than_children":null}isVideoLabelBoxBoxSizingBlocked(t){const r=e.getComputedStyleProp(t,"boxSizing",null);if(r&&"border-box"===r)return null;const i=t.getBoundingClientRect();if(!i||i.width<=0)return null;const o=parseFloat(e.getComputedStyleProp(t,"width",0))/i.width;if(o<=this.videoLabelBoxWidthRatio)return null;const n=e.getComputedStyleProp(t,"paddingLeft",0),a=e.getComputedStyleProp(t,"paddingRight",0);return n>0||a>0?"padding_on_full_width":null}isBrandingMarginBlocked(t){const r=t.getBoundingClientRect();if(!(r&&r.width>0))return null;const i=parseFloat(e.getComputedStyleProp(t,"margin-left",0))/r.width;if(i>this.horizontalMarginToFilter)return"high_margin_left";const o=parseFloat(e.getComputedStyleProp(t,"margin-right",0))/r.width;return o>this.horizontalMarginToFilter?"high_margin_right":null}static isBrandingInnerPositionBlocked(t){const r=t.querySelector(".branding-inner");return r&&e.isElementPositionAbsolute(r)?"branding_inner_absolute_position":null}static isBrandingLogoPositionBlocked(t){const r=t.querySelector("div.logoDiv");return r&&e.isElementPositionAbsolute(r)?"branding_logo_div_inner_absolute_position":null}static isBrandingPositionBlocked(t){return e.isElementPositionAbsolute(t)?"branding_absolute_position_item_renderer":null}static isElementPositionAbsolute(t){const r=e.getComputedStyleProp(t,"position");return!(!r||"absolute"!==r)}static isBelowMinWidth(e){const t=e.getBoundingClientRect().width;return t>0&&t<170?"below_min_width":null}static isHeroWidget(e){return e.rbox.mode_name&&e.rbox.mode_name.indexOf("hero")>-1?"item_in_hero_widget":null}static isStoryWidget(e){return e.rbox.container.querySelector(".story-widget")?"item_in_reco_reel_story_widget":null}static isNextUpWidget(e){return TRC.dom.containsClass(e,"tbl-next-up-widget-item")?"item_next_up":null}static hasIcon(e){return e.querySelector(".added-icon-svg")?"item_branding_has_icon":null}static getVideoLabelBoxChildrenWithoutButtonHeight(t){let r=0;const i=["border-bottom-width","border-top-width","padding-bottom","padding-top"];if(i.forEach(i=>{r+=e.getComputedStyleProp(t,i)||0}),t.hasChildNodes()){const i=t.childNodes;for(let t=0;t<i.length;t++){const o=i[t];if(TRC.dom.containsClass(o,"video-cta-href"))continue;const n=e.getHeightOfElementIncludeMargin(o);r+=n}}return r}static getComputedStyleProp(e,t,r){const i=window.getComputedStyle(e),o=i[t];if(!o)return r||null;const n=parseInt(i[t],10);return isNaN(n)?i[t]:n}static getHeightOfElementIncludeMargin(t){const{offsetHeight:r}=t,i=e.getComputedStyleProp(t,"margin-top",0),o=e.getComputedStyleProp(t,"margin-bottom",0);return r+i+o}static nullish(e,t){return null==e?t:e}sendEvent({itemContainer:t,ctaData:r,name:i,type:o,description:n,eventNamePrefix:a,force:s}={}){if(r=r||{},__trcDebug(`${this.moduleName} ${i} ${o} ${n} ${t.innerText}`),!(this.shouldReport&&r||s))return;const l=a?`${a}${i}`:e.createEventName(i,o),c=this.createReportData(t,r,l,o,n),d={force:s};this.reportAbTestEvent(c,i,d),this.reportUsage(c,d),this.reportMetrics(l,d)}static createEventName(e,t){return TRC.CTAManager.sendEventTypes[t]||(t=TRC.CTAManager.sendEventTypes.event),`CTA-${t}-${e}`}createReportData(e,t,r,i,o){const n=this.options.style||{};return{v:"2",location:this.windowLocation,itemId:t.itemId,rating:t.rating,price:t.price,text:t.actionText,type:null!=i?i:"event",description:o,module:this.moduleName,event:r,cardIndexOnPage:t.cardIndex,index:t.index,placement:t.placement,innerText:e.innerText,config:{borderColor:n.borderColor,color:n.color,fontSize:n.fontSize,fontWeight:n.fontWeight,isInheritTitleColor:this.options.isInheritTitleColor}}}reportAbTestEvent(e,t,r){r=r||{};const i="rendered"===t&&this.shouldReportRenderedEvent;(this.shouldReportAbTestEvent||i||r.force)&&window.TRCImpl.sendAbTestEvent(this.moduleName,JSON.stringify(e))}reportUsage(e,t){t=t||{},(this.shouldReportUsageAndMetricEvent||t.force)&&TRC.RBoxUsage.logUsage(`cta-_${(new Date).getTime()}`,{extraData:e,file:"cta-manager"})}reportMetrics(e,t){((t=t||{}).force||this.shouldReportUsageAndMetricEvent&&e)&&TRC.MetricsManager.sendMetricsEvent(TRC,TRCImpl,{name:e,value:"1",type:"counter"},null)}static roundHalf(e){return Math.round(2*e)/2}static isStream(e){const t=e.trc.getProperty(e.mode_name,"widget-creator-layout",e.propertiesOverride);return"autowidget-template-stream"===t}static isSingleColumnWidget(e){const t=e.getEffectiveResponsiveRule();return!(!t||1!==t.cells)}}e.sendEventTypes={report:"report",filter:"filter",error:"error",event:"event"},TRC.CTAManager=e})(),(()=>{const e={},t="page view Id str";function r(){return window.crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"])}function i(e,t,r){return window.crypto.subtle.encrypt({name:"AES-GCM",iv:r,tagLength:128},t,e)}function o(e){return[...new Uint8Array(e)].map(e=>e.toString(16).padStart(2,"0")).join("")}const n=function(){let n=null;return window._trcIsUTactive&&(TRC.cryptoKeysUtils={resetPageViewUniqueIdPromise(){n=null}}),function(){return e.pvuid?Promise.resolve(e.pvuid):n||(n=n||r().then(e=>{const r=new Uint8Array([188,185,57,146,246,194,114,34,12,80,198,77]),o=new TextEncoder,n=o.encode(t);return i(n,e,r)}).then(t=>{const r=o(t);return e.pvuid=r,e.pvuid}))}}();TRC.cryptoKeysManager={getPageViewUniqueID:n},window._trcIsUTactive&&(TRC.cryptoKeysUtils.setPageViewUniqueID=function(t,r){e[t]=r},TRC.cryptoKeysUtils.PVUID_STR_LEN=32+2*t.length)})(),TRC.css=TRC.css||{},TRC.css.utils=(()=>{let e=0,t=0,r="";const i=4040,o=" style_split",n="{class},",a="vidiscovery-note";function s(e,r){const i=e.indexOf("@media")>=0?`${e.split("{")[0]}{`:"",o=(e=i?e.substring(e.indexOf("{")+1):e).split("{"),n=o.length>1?o[0].split("."):e.split("."),s=n.length;if(s<2)return i+e;const l=n[1];return __trcTrim(l)===a?i+e:(r[__trcTrim(l)]?(p(1),n[0]=`#${r[__trcTrim(l)].cssDivsArr.join(" #")} ${n[0]}`):(p(t),n[0]=m(n.join("."))+n[0]),o.length>1?(o[0]=n.join("."),i+o.join("{")):i+n.join("."))}function l(e,t){const r=e.split(","),n=r.length;let a="";if(u()>i&&(a=o,__trcDebug(`Number of augmented css rules before Split : ${u()}`),h(0)),null===t)return c(n<2?e:r,a);if(n<2)return a+s(e,t);for(let i=0;i<n&&(r[i]=s(r[i],t),!(r[i].indexOf("{")>=0&&i<n-1));i++);return a+r.join(",")}function c(e,t){const r=e.length;if("string"==typeof e)return p(1),t+e;for(let i=0;i<r&&(p(1),!(e[i].indexOf("{")>=0&&i<r-1));i++);return t+e.join(",")}function d(e,t){const r=e.split("}"),i=r.length;return i<2?l(e,t):(r.forEach(e=>l(e,t)),r.join("}"))}function p(t){e+=t}function h(t){e=t}function u(){return e}function m(e){return g(!1,!1).replace(new RegExp("{class}","gm"),e)}function g(e,i){let o;if("object"==typeof e){r="",Object.keys(e).forEach(i=>{"string"==typeof i&&""!==i&&(o=`#${e[i].cssDivsArr.join(" #")} `,r=`${r}${o} ${n}`),t++});const a=`#${i.iframe.join(" #")} ${n}`,s=`#${i.topDiv.join(" #")} ${n}`,l=r.slice(0,r.length-n.length);return r=`${a}${s}${l}`}return r}function b(e,t,r){const i=e.trc.vl,{modes:o}=r,n=o[TRC.inflate.COMMON];let a="",s="";return i&&i.forEach((i,l)=>{const c=f(e,i,l,r);c.forEach(e=>{TRC.injectedModes.indexOf(e)<0&&o[e]&&(a+=TRC.inflate.inflateStyle(e,TRC.inflate.inflateObject(n[TRC.inflate.STYLE],o[e][TRC.inflate.STYLE])),t&&o[e].mode_custom&&(s+=o[e].mode_custom),TRC.injectedModes.push(e))})}),{inflatedStyle:a,customCss:s}}function f(e,t,r,i){const{TRCRBox:o}=TRC.implClasses,n=i.preloadRequest[t.fpl||t.uuip||t.uip],a=o.prototype.calcModeName(i.addVariantProperties(null,e,r).trc,n?n.mode:void 0),s=v(a,t,n,i);let l=s?[s]:[];return t.multiWidget&&t.multiWidget.children&&(l=[...l,...C(t.multiWidget.children)]),l}function v(e,t,r,i){return i.modes[e]?e:i.modes[t.m]?t.m:r&&i.modes[r.mode]?r.mode:void 0}function C(e){let t=[];return e.forEach(e=>{e.children?t=[...t,...C(e.children)]:e.name&&t.push(e.name)}),t}return{bakeCss(e,t){const r=t.global["enable-custom-injection"];TRC.injectedModes=TRC.injectedModes||[];let i=TRC.injectedCustomStyle?"":t.defaults.style+t.global.style.rtl;const o=b(e,r,t);i+=o.inflatedStyle,i+=t.global.style.custom&&!TRC.injectedCustomStyle?t.global.style.custom:"",i+=r?o.customCss?o.customCss:"":t.global.style.mode_custom&&!TRC.injectedCustomStyle?t.global.style.mode_custom:"",(i+=TRC.injectedCustomStyle?"":TRC.dom.pullAggregatedStyle())&&(TRC.dom.injectStyle(i,null),TRC.injectedCustomStyle=!0)},setStyleTextIdPrefix(e,t,r){t&&g(t,r);const i=d(e,t);return __trcDebug(`Number of augmented css rules left : ${u()}`),h(0),i},setStyleElements(e){const t=e.split(o),r=t.length;r>1&&TRC.pConsole("page","debug","splitting css",""),t.forEach(e=>TRC.dom.injectStyle(e))},setStyleProperty(e,t,r,i){let{cssText:o}=e.style;o+=`;${t}:${r}${i?"!important":""}`,e.style.cssText=o},generateCssRuleWithVendorPrefixes(e,t){const r=[" -webkit-","-moz-","-ms-","-o-"],i="{property}: {value};",o=i.replace("{property}",e).replace("{value}",t),n=[];return r.forEach(e=>n.push(e+o)),n.push(o),n.join(" ")},escape:(()=>window.CSS&&window.CSS.escape||function(e){const t=function(e){this.message=e};(t.prototype=new Error).name="InvalidCharacterError";const r=String(e),{length:i}=r;let o=-1,n,a="";const s=r.charCodeAt(0);for(;++o<i;){if(0===(n=r.charCodeAt(o)))throw new t("Invalid character: the input contains U+0000.");n>=1&&n<=31||127===n||0===o&&n>=48&&n<=57||1===o&&n>=48&&n<=57&&45===s?a+=`\\${n.toString(16)} `:a+=n>=128||45===n||95===n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?r.charAt(o):`\\${r.charAt(o)}`}return a})()}})(window),TRC.css.Stack=function(e,t){const{stack:r,idPrefix:i="tab_"}=e,o={},n=document.createDocumentFragment(),a=t?document.head.appendChild(document.createElement("style")):null;r.forEach(e=>o[e.type]=TRC.dom.injectStyle(e.cssText||"",n,i+e.type)),this.injectAllStyles=function(){a?document.head.insertBefore(n,a):document.head.appendChild(n),TRC.styleInjected=!0},this.addStyle=function(e,t,r){const a=o[e],s=r?document:n,l=i+e;t&&(a?a.styleSheet?a.styleSheet.cssText+=t:a.appendChild(document.createTextNode(t)):o[e]=TRC.dom.injectStyle(t,s,l))}},TRC.css.responsive=function(){function e(e,t){return(99.99-e*t)/e}function t(t,r,i,o,n){const{rows:a,cells:s,margin:l}=t,c=e(s,l),d="rtl"===n?"right":"left";let p=`.${r} .videoCube{width: ${c}%; position: relative; float: ${d}; margin: 0 0 ${l}% 0; margin-${d}: ${l}%;}`;TRC&&TRCImpl&&TRC.util.isPercentEnabled(TRCImpl.global,"enable-responsive-float-fix")&&1!==s&&1!==a&&(p+=`.${r} :nth-child(${s}n+1 of .videoCube):not(:nth-child(1 of .videoCube)){clear:both;}`),i.push(p)}function r(e,t,r,i,o){const n="rtl"===o?"right":"left",a="rtl"===o?"left":"right",s=`.${t} .trc_rbox_div .videoCube {width: ${1==+e.cells?"100":"48"}%;}`,l=`.${t} .trc_header_left_column {width: ${1==+e.cells?"100":"48"}%;}`,c=`.${t} .trc_header_right_column {display: ${1==+e.cells?"none":"inline"};}`,d=`.${t} .trc_rbox_div div.videoCube:nth-of-type(-n+${e.rows}){float:${n};clear:${n};}`,p=`.${t} .trc_rbox_div div.videoCube:nth-of-type(n+${e.rows+1}){float:none;clear:${a};margin-${n}:auto;}`;r.push(p),r.push(d),r.push(s),r.push(l),r.push(c)}function i(e,t,r,i,n,a,s){const l=e.rows*e.cells,c=`.${t} div.videoCube:nth-of-type(-n+${l}){display:block;visibility:visible;}`,d=`.${t} div.videoCube:nth-of-type(n+${l+1}){display:none;visibility:hidden;}`;r.push(c),r.push(d),a&&o(e,t,r,s)}function o(e,t,r,i){const o=e.cells,n=o/i*100;r.push(`.${t} .trc_rbox_div { width: ${n}%; }`),r.push(`.${t} .trc_rbox_outer { overflow-x: scroll; -webkit-overflow-scrolling: touch; }`)}function n(e,t,r,i,o){const n="rtl"===r?"right":"left";return i?`.${t} .trc_rbox_div{margin-${n}:-${e.margin*e.cells/o}%;}`:`.${t} .trc_rbox_outer{margin-${n}:-${e.margin}%;}`}function a(e,r,i,o,a,s,l){const c=1==+e.cells?"video-label-box":"trc-main-label",d=`.${r} .trc_rbox_outer .videoCube .${c} {height:auto;}`,p=`.${r} .trc_rbox_outer .videoCube {margin-bottom:10px;}`,h=n(e,r,a,s,l),u=TRCImpl.global["disable-one-row-widget-auto-height"],m=(s||!u)&&1==+e.rows;(1==+e.cells||m)&&(i.push(d),i.push(p)),i.push(h),i.push(`.${r} .videoCube_aspect{padding-bottom:${e.ratio}%; width: 100%;}`),t(e,r,i,o,a)}return{injectedStyles:{},rulesToCssText(e,t,o,n,s,l,c,d){const p=[];let h,u,m;for(h=0;u=t[h];h++)(m=void 0!==u.min||void 0!==u.max)&&p.push("@media screen and "),void 0!==u.min&&(p.push(`(min-width: ${u.min}px) `),u.max&&p.push("and ")),void 0!==u.max&&p.push(`(max-width: ${u.max}px) `),m&&p.push("{"),s?r(u,e,p,n,l):a(u,e,p,n,l,c,d),i(u,e,p,o,n,c,d),m&&p.push("} ");return p.join("")},getRulePercentageWidth:e}}(),(()=>{const e={now:"Now",today:"Today",yesterday:"Yesterday",minutes:"{0} minutes ago",hour:"1 hour ago",hours:"{0} hours ago",days:"{0} days ago"};TRC._translationQueue=TRC._translationQueue||[],TRC._translationQueue.push({"time-ago":e});class t{static setTimeAgoCustomLanguage(){__trcWarn("TRCRbox.dateFormatDays - custom language is depreciated")}static dateFormatTimeAgo(r,i,o){let n;if(!r||0===parseInt(r,10)||isNaN(r))return __trcWarn(`TRCRbox.dateFormatDays - published_date cannot be parsed, it is ${r}`),"";n=new Date(1e3*parseInt(r,10));const a="time-ago",{getLabel:s}=TRC.translationManager,l=s({feature:"time-ago"})||e,c=new Date,d=Date.now()-n.getTime();try{if(d<30*t.minute)return s({feature:a,label:"now"});if(d<t.hour){const e=Math.floor(d/t.minute);return s({feature:a,label:"minutes",data:[e]})}if(d<7*t.hour){const e=Math.floor(d/t.hour);return 1===e?s({feature:a,label:"hour"}):!l["hours-above5"]||e<5?s({feature:a,label:"hours",data:[e]}):s({feature:a,label:"hours-above5",data:[e]})}if(d<24*t.hour&&c.getDate()===n.getDate())return s({feature:a,label:"today"});if(TRC.util.isTrue(TRCImpl.global["timeago-string-dates"]))return o.formatData("published-date",r);if(d<48*t.hour)return s({feature:a,label:"yesterday"});const e=Math.floor(d/t.day);return!l["days-above5"]||e<5?s({feature:a,label:"days",data:[e]}):s({feature:a,label:"days-above5",data:[e]})}catch(e){return __trcError(`TRCRbox.dateFormatDays - error in calculating time ago. this might be due to bad date or custom lang not properly init. date: ${r} lang: ${i}`),""}}static dateFormatISO(e){const t=new Date(1e3*parseInt(e,10)),r=t.getFullYear();let i=t.getMonth()+1,o=t.getDate();return o<10&&(o=`0${o}`),i<10&&(i=`0${i}`),`${r}-${i}-${o}`}static dateFormatAmerican(e){const t=new Date(1e3*parseInt(e,10)),r=t.getFullYear(),i=t.getMonth()+1,o=t.getDate();return`${i}/${o}/${r}`}static dateFormatEuropean(e){const t=new Date(1e3*parseInt(e,10)),r=t.getFullYear(),i=t.getMonth()+1,o=t.getDate();return`${o}/${i}/${r}`}}t.millisecond=1,t.second=1e3*t.millisecond,t.minute=60*t.second,t.hour=60*t.minute,t.day=24*t.hour,TRC.DateUtils=t})(),TRC.modDebug=function(e,t){var r=2,i,o=(n={},{setMessageCache:function(e){n[e]?n[e]+=1:n[e]=1},getMessageCount:function(e){return n[e]?n[e]:0}}),n;function a(e){switch(e){case 0:return"error";case.5:return"perf";case 1:return"warn";case 2:return"info";case 3:return"debug";case 4:return"usage";default:return}}return i={logMessageToServer:function(t,i,n,a,s){if(o.setMessageCache(i),o.getMessageCount(i)<=r||a){var l=e.TRCImpl&&TRCImpl.domain?TRCImpl.domain:"trc.taboola.com",c=e.TRCImpl?TRCImpl["normalize-log-param"]("publisher",TRC.publisherId):TRC.publisherId,d=__trcClientTimestamp(),p=TRC.newDebugLogger.logMsg.bind(TRC.newDebugLogger);e.TRCImpl&&e.TRCImpl.trcEventRoute&&e.TRCImpl.eventTypesToRoute.indexOf("debug")>-1?(p(e.TRCImpl.trcEventRoute,t,i,d,c,n,s),e.TRCImpl.enableTrcEventRouteExperiment&&p(l,t,i,d,c,n,s)):p(l,t,i,d,c,n,s)}},getType:a}}(window,document),(()=>{const e="-delta",t=(r,i)=>{if(r.children)r.children.forEach(e=>{t(e,i)});else if(r.name&&!o(r.name)&&r.dlt){const t=r.name+e;i.modes[t]?r.name=t:i.modes[r.name]&&__trcWarn(`Could not resolve Multi-Widget delta mode name ${t}`)}},r=(t,r)=>{const i=t.m+e;o(t.m)||(r.modes[i]?t.m=i:r.modes[t.m]&&__trcWarn(`Could not resolve Feed / Added Widget delta mode name ${i}`))},i=(t,r)=>{const i=r.preloadRequest[t.uip];if(i){if(o(i.mode))return;const t=i.mode+e;r.modes[t]?i.mode=i.mode_name=t:r.modes[i.mode]&&__trcWarn(`Could not resolve Widget delta mode name ${t}`)}else __trcWarn(`Delta mode replace: placement ${t.uip} is missing from preloadRequest`)},o=t=>new RegExp(`${e}$`).test(t);TRC.deltaModeAdapter={switchModeNamesIfInDeltaTest(e,o){o&&o.trc&&o.trc.vl&&o.trc.vl.length&&o.trc.vl.forEach(o=>{TRC.util.isTrue(o.dlt)&&(o.multiWidget?t(o.multiWidget,e):o.m?r(o,e):i(o,e))})}}})(),function(e,t){var r=[],i=null,o=!1,n,a,s;function l(e){try{if(i&&(TRC.Browser["ieUpto"](10)?t.detachEvent("onreadystatechange",i):(t.removeEventListener("DOMContentLoaded",arguments.callee,!1),TRC.Interval.clear(i))),TRC.dom.isReady)return;TRC.dom.isReady=!0,TRC.dom.onReady=function(e){e()};for(var o=0;o<r.length;o++)r[o]()}catch(e){__trcError("Error in DOMReady processing",e)}}function c(){return e.pageXOffset||t.body.scrollLeft}TRC.dom={injectedStyles:[],aggregatedStyles:"",isReady:!1,onReady:function(e,t){t?TRC.Timeout.set(e,10):r.push(e)},init:function(){if(!o)if(o=!0,t.readyState&&/loaded|complete/.test(t.readyState))l(!0);else{if(TRC.Browser["ieUpto"](10)){var r=t.createElement("div");!function(){try{r.doScroll("left")}catch(e){return void(r.to=TRC.Timeout.set(arguments.callee,10))}l()}(),t.attachEvent("onreadystatechange",i=function(){/loaded|complete/.test(t.readyState)&&(TRC.Timeout.clear(r.to),l())})}else{if(/interactive/.test(t.readyState))return void l(!0);t.addEventListener("DOMContentLoaded",l,!1),i=TRC.Interval.set(function(){/loaded|complete|interactive/.test(t.readyState)&&l()},10)}var n=e.onload;e.onload=function(){if(l(),n)try{n()}catch(e){}}}},on:e.addEventListener?function(e,t,r,i){var o={};"touchstart"!==t&&"touchmove"!==t||!TRC.Browser.compatibility.passiveEvents||(o["passive"]=!0),"boolean"==typeof i&&(o["capture"]=i),0===Object.keys(o).length?e.addEventListener(t,r):e.addEventListener(t,r,o)}:e.attachEvent?function(e,t,r){e.attachEvent("on"+t,r)}:void(el["on"+sType]=fn),off:e.removeEventListener?function(e,t,r){e.removeEventListener(t,r,!1)}:e.detachEvent?function(e,t,r){e.detachEvent("on"+t,r)}:void(el["on"+sType]=fn),getText:function(e){return e.textContent||e.innerText||e.innerHTML},lineHeight:function(e){var t;return e.computedClientHeight||(t=e.style.display,e.style.display="inline-block",e.computedClientHeight=parseFloat(getComputedStyle(e).height),e.style.display=t),e.computedClientHeight},isAncestor:function(e,t,r){for(t=r?t:t.parentNode;t&&t!==e&&9!=t.nodeType;)t=t.parentNode;return e===t},pullAggregatedStyle:function(){var e=this.aggregatedStyles;return this.aggregatedStyles="",e},aggregateStyles:function(e){TRC.styleInjected?this.injectStyle(e):this.aggregatedStyles+=e},injectStyle:function(e,r,i){var o=document.createElement("style"),r=r||t;return o.type="text/css",i&&(o.id=i),r.head?r.head.appendChild(o):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e)),this.injectStyleOverflowFix(e),TRC.styleInjected=!0,this.injectedStyles.push(o),o},injectStyleOverflowFix:function(e){if(TRC.Browser.ie&&31==document.styleSheets.length){var r=document.getElementById("trc_rbox_css_loaded");if(null==r&&((r=document.createElement("div")).id="trc_rbox_css_loaded",t.body.appendChild(r)),"hidden"!=document.trcGetCurrentStyle(r,"overflow")){var i=e.split("}"),o=null;try{for(var n=0;n<document.styleSheets.length;n++){var a=document.styleSheets[n];if(i.length+a.rules.length<=4096){o=a;break}}null!=o&&(o.cssText+=e)}catch(e){__trcError("Error in injectStyleOverflowFix processing",e)}}}},removeAllInjectedStyleSheets:function(){for(var e,t=0;t<this.injectedStyles.length;t++)(e=this.injectedStyles[t]).parentNode&&e.parentNode.removeChild(e);this.injectedStyles=[],this.aggregatedStyles="",TRC.styleInjected=!1,TRC.css.responsive.injectedStyles=[]},swapElements:function(e,t,r){return r&&TRC.dom.purgeEventHandlers(e),e&&e.parentNode&&e.parentNode.replaceChild(t,e),t},iterateOnNode:function(e,t){for(t(e),e=e.firstChild;e;)arguments.callee(e,t),e=e.nextSibling},purgeEventHandlers:function(e){try{TRC.dom.iterateOnNode(e,function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=null)})}catch(e){__trcError("TRC.dom.purgeEventHandlers : ",e.message)}},clearInnerElements:function(e){for(var t;t=e.firstChild;)this.purgeEventHandlers(t),e.removeChild(t)},stopEvent:function(e){return e.cancelBubble=!0,e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},addClass:function(e,t){e&&(e.className+=" "+t+" ")},removeClass:function(e,t){var r;if(e){if(e.classList)return e.classList.remove(t);r=new RegExp("s*"+t,"g"),e.className=e.className.replace(r,"")}},containsClass:function(e,t){return e&&e.className.split(" ").indexOf(t)>-1},detectAnimationEvent:function(e,t){var r="animation"+t,i={animation:"animation"+t,WebkitAnimation:"webkitAnimation"+t.charAt(0).toUpperCase()+t.slice(1),OAnimation:"oanimation"+t,MozAnimation:"animation"+t,MSAnimation:"MSAnimation"+t};return Object.keys(i).some(function(t){if(void 0!==e.style[t])return r=i[t],!0}),r},createHTMLElement:function(e,t){var r;return r=document.createElement(e),t&&Object.keys(t).length&&Object.keys(t).forEach(function(e){r[e]=t[e]}),r},elementMatchesSelector:function(e,t){var r,i;return["matches","msMatchesSelector","oMatchesSelector","mozMatchesSelector","webkitMatchesSelector"].some(function(t){return"function"==typeof e[t]&&(i=t),e[t]}),i?e[i](t):null},closest:function(e,t){if(TRC.util.isNativeFunction(e.closest))return e.closest(t);for(;!this.elementMatchesSelector(e,t);)if(!(e=e.parentElement))return null;return e},getWindowWidth:function(){return window.innerWidth?this.getWindowWidth=function(){return window.innerWidth}:0!=document.documentElement.clientWidth?this.getWindowWidth=function(){return document.documentElement.clientWidth}:this.getWindowWidth=function(){return document.body.clientWidth},this.getWindowWidth()},getWindowHeight:function(){return window.innerHeight?this.getWindowHeight=function(){return window.innerHeight}:0!=document.documentElement.clientHeight?this.getWindowHeight=function(){return document.documentElement.clientHeight}:this.getWindowHeight=function(){return document.body.clientHeight},this.getWindowHeight()},getDocumentWidth:function(){return Math.max(Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),Math.max(t.body.offsetWidth,t.documentElement.offsetWidth),Math.max(t.body.clientWidth,t.documentElement.clientWidth))},getDocumentHeight:function(){return Math.max(Math.max(t.body.scrollHeight,t.documentElement.scrollHeight),Math.max(t.body.offsetHeight,t.documentElement.offsetHeight),Math.max(t.body.clientHeight,t.documentElement.clientHeight))},getScreenDensity:function(){var e=window.devicePixelRatio&&window.devicePixelRatio.toFixed(3);return e||(e=-1),e},getPageVerticalScroll:function(){return e.pageYOffset||t.body.scrollTop},getScrollTop:function(t){return t===e?this.getPageVerticalScroll()||document.documentElement.scrollTop:t.scrollTop},getViewportVerticalRange:function(){var e=this.getPageVerticalScroll(),t;return{min:e,max:e+this.getWindowHeight()}},getViewportHorizontalRange:function(){var e=c(),t;return{min:e,max:e+this.getWindowWidth()}},getElementRect:function(e){return e.getBoundingClientRect()},isInIframe:function(t){try{return e.top!==e.self}catch(e){return"boolean"==typeof t&&t}},createAugmentingContainers:function(e,t){for(var r=[],i=null,o,n=0;n<e;n++)i=o=this.createAugmentingContainer(i),r.push(o);return t&&r[e-1].appendChild(t),r},createAugmentingContainer:function(e){var r=t.createElement("div");return r.id="tbl-aug-"+Math.floor(2147483648*Math.random()).toString(36),e&&e.appendChild(r),r},generateAugmentationPrefix:function(e){for(var t="",r=0;r<e.length;r++)t+="#"+e[r].id+" ";return t},isHighDensity:(s=window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 124dpi), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 48.8dpcm)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3)").matches)||window.devicePixelRatio&&window.devicePixelRatio>1.3,function(){return s}),isSmartPhone:(a=window.matchMedia&&window.matchMedia(" only screen and (min-device-width : 320px) and (max-device-width : 480px)").matches||/(iPhone|iPod)/g.test(navigator.userAgent),function(){return a}),isTablet:(n=window.matchMedia&&window.matchMedia(" only screen and (min-device-width : 768px) and (max-device-width : 1024px)").matches||/(iPhone|iPod)/g.test(navigator.userAgent),function(){return n}),isDesktop:function(){return!(this.isTablet()||this.isSmartPhone())},getOuterWidth:function(e){var t,r,i;return e.getBoundingClientRect().width+parseFloat(getComputedStyle(e).marginLeft)+parseFloat(getComputedStyle(e).marginRight)},isHtmlContent:function(e){return/(?:%3C|[<>&])/.test(e)},setContentToElement:function(e,t){TRC.dom.isHtmlContent(t)?e.innerHTML=t:e.innerText=t},getPageMetaPropertyValue:function(e){for(var t=document.head.getElementsByTagName("meta"),r=0;r<t.length;r++)if(t[r].getAttribute("property")===e)return t[r].content;return __trcDebug("Failed finding meta tag property : "+e+" value"),null},getJsonLdValueFromKey:function(e){for(var t=document.querySelectorAll('script[type="application/ld+json"]'),r=0;r<t.length;r++){var i=t[r],o;try{o=JSON.parse(i.innerText)}catch(e){return __trcWarn("Failed to parse json ld script: "+e),null}for(var n=Array.isArray(o)?o:[o],a=0;a<n.length;a++){var s=n[a];if(s[e])return s[e]}}return __trcDebug("Failed finding json ld property : "+e+" value"),null},decodeHtmlEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value}}}(window,document),(()=>{const e={ID:"id",TITLE:"title",THUMBNAIL:"thumb",FOUND:"found"};class t{constructor(e,t){this.trcManager=e,this.parentContainerSelector=t.parentContainerSelector,this.additionalLogDataBuilder=t.additionalLogDataBuilder,this.isDedupEventSent=!1,this.initReportedItemsMap(),this.trcManager.sendPubsGenericEvent("DEDUP_DEBUG","true"),TRC.modDebug.logMessageToServer(1,"Duplicated items monitoring enabled",{pcs:this.parentContainerSelector,vi:TRC.pageManager.getPageData()})}initReportedItemsMap(){this.reportedItems={},Object.keys(e).forEach(t=>{const r=e[t];this.reportedItems[r]=[]})}checkForDuplicatedItems(){if(this.isDedupEventSent)return;const t=[].slice.call(document.querySelectorAll(`${this.parentContainerSelector} .videoCube`));this.checkAndNotifyMetaDataDuplication(t,e.ID)||(this.checkAndNotifyMetaDataDuplication(t,e.TITLE),this.checkAndNotifyMetaDataDuplication(t,e.THUMBNAIL))}checkAndNotifyMetaDataDuplication(e,r){const i=`data-item-${r}`,o=e.map(e=>e.getAttribute(i)),n=e.filter(e=>t.isItemMetaDataFoundMoreThanOnce(e,o,i));if(n.length)return n.forEach(e=>this.notifyItemMetaDataDuplication(e,i,r)),!0}static isItemMetaDataFoundMoreThanOnce(e,t,r){const i=e.getAttribute(r);return t.indexOf(i)!==t.lastIndexOf(i)}notifyItemMetaDataDuplication(t,r,i){if(-1!==this.reportedItems[i].indexOf(t)||this.isDedupEventSent)return;const o=`DUP_${e.FOUND.toUpperCase()}`,n=t.getAttribute("data-item-id"),a=t.getAttribute(r),s={mdt:i,md:a,ii:n,pcs:this.parentContainerSelector,vi:TRC.pageManager.getPageData()};this.trcManager.sendPubsGenericEvent(o,n),"function"==typeof this.additionalLogDataBuilder&&__trcCopyProps(this.additionalLogDataBuilder(t),s),TRC.modDebug.logMessageToServer(1,"Duplicated item served",s,!0),this.reportedItems[i].push(t),this.isDedupEventSent=!0}}TRC.DuplicatedItemsMonitor=t})(),(()=>{const e=e=>{if(TRC.DynamicModulesHooks){const t=TRC.DynamicModulesHooks.filter(t=>t.type===e);if(t)return t}return[]},t=(e,t)=>{TRC.DynamicModulesHooks&&TRC.DynamicModulesHooks.forEach(r=>{r.type===e&&r.callback&&r.callback(t)})},r=(e,t)=>{try{const r={moduleName:e,data:t},i={data:r,type:"fallback"};TRCImpl.sendEvent("pubs-generic",{d:JSON.stringify(i)},{})}catch(e){__trcError(`error in DynamicModulesManager.sendEvent: ${e.message}`)}},i=e=>{const t=e.length<=1;if(t)return"/";const r="/"!==e[0];return r?`/${e}`:e};let o;const n=e=>{o||(o=document.createElement("a")),o.href=e;const t={};if(""!==o.search){let e;const r=/\??&?([^=]+)=([^&]+)/gi;for(;e=r.exec(o.search);)t[e[1]]=e[2]}return{hash:o.hash,host:o.host,hostname:o.hostname,href:o.href,origin:o.origin,pathname:i(o.pathname),search:t}},a=(e,t)=>{const r=n(e);if(0===Object.keys(r.search).length||!t)return r.pathname;let i=`${r.pathname}?`;const o=t.split(","),a=o.map(e=>e.trim());return a.forEach(e=>{r.search[e]&&(i+=`${e}=${r.search[e]}`)}),i};TRC.DynamicModulesManager={getDynamicModules:e,executeDynamicModules:t,sendEvent:r,parseArticleUrl:a}})(),function(e,t){"use strict";var r={},i=e.TRC,o;function n(e,t){e.innerHTML=r._tokenizeSingle(i.dom.getText(e),t)}function a(e,t){if(e){var r=o(function e(t){return t.className.search("title")>=0},e,"span"),i=o(function e(t){return t.className.search("description")>=0},e,"span");t.call(this,e,r,i)}}function s(e){return function(t){for(var r in t){var i;if(t.hasOwnProperty(r))t[r].boxes.forEach(function t(r){a(r.labelsBox,e),a(r.preLabelsBox,e)})}}}i.Ellipsis=r,r.doEllipsis=function(e){o=o||i.implClasses.TRCRBox.prototype.findElement,i.ellipsisPerf&&console.timeStamp("Taboola new ellipsis"),i.performance&&i.performance.mark("7.2.1",null,"Ellipsis","all","SmartEllipsis",i.PerfEvenType.START),r.measure(e),r.renderEllipsis(e),i.performance&&i.performance.mark("7.2.9",null,"Ellipsis","all","SmartEllipsis",i.PerfEvenType.STOP)},r.tokenize=function(e,t){return t=t in r._tokenizeStrategies?t:"word",s(function(e,i,o){e.trcEllipsisTokenized&&delete e.trcEllipsisTokenized;var a=r._tokenizeStrategies[t];i&&n(i,a),o&&n(o,a),e.trcEllipsisTokenized=!0})(e)},r.verifyTokenized=function(e){var t=!0;return s(function(e){t=t&&e.trcEllipsisTokenized})(e),t},r.measure=s(function(e,t,i){var o=t&&r._measureSingleElementSizes(t),n=i&&r._measureSingleElementSizes(i);e.trcEllipsisPositions={title:o,description:n}}),r.renderEllipsis=s(function(e,t,i){var o=e.trcEllipsisPositions;if(!o||t&&!o.title||i&&!o.description)__trcDebug("Calling renderEllipsis without measuring first. Skipping");else try{t&&r._repaintSingleEllipsis(t,o.title),i&&r._repaintSingleEllipsis(i,o.description)}catch(e){__trcDebug(e.message+". Skipping")}}),r._tokenizeStrategies={word:function(e){return{spaces:!0,tokens:e.split(/\s+/)}},letter:function(e){return{spaces:!1,tokens:e.match(/&[\w#]+;|./g)}}},r._tokenizeSingle=function(e,t){var r=t.call(this,e);return i.util.map(r.tokens,function(e){return" "===e?e:"<ins>"+e+"</ins>"}).join(r.spaces?" ":"")},r._measureSingleElementSizes=function(e){if(!e||!e.offsetHeight)return null;if(!e.firstChild||"INS"!=e.firstChild.tagName)return __trcDebug("Attempted to call measure on element before tokenize. Skipping");var t=o(function e(t){return t.className.search("lastLineEllipsis")>=0},e,"ins");if(t){var r=e.getElementsByTagName("ins");if(t.className.replace(/[\t\r\n\f]/g," ").indexOf("tblHideAllButFirst")>=0)for(var n=0;n<r.length;n++){var a;(a=r[n]).style.display=""}t.parentNode.removeChild(t)}for(var r=e.getElementsByTagName("ins"),s=i.dom.lineHeight(r[0]),l=Math.floor(parseFloat(getComputedStyle(e).height)/s)*s,c=l-s,d=e.offsetWidth,p=r[0].offsetWidth,h=[],u,m,n=0;n<r.length;n++){var a=r[n];void 0===u&&a.offsetTop>=c&&(u=r[n]),void 0!==u&&h.push(i.dom.getText(a)),!m&&a.offsetTop>=l&&(m=r[n-1])}return{lastLineStartsAt:u,lastVisibleWord:m,singleLineContent:h,elementWidth:d,firstWordWidth:p}},r._repaintSingleEllipsis=function(e,o){if(o.lastVisibleWord){var n=t.createElement("ins");i.dom.addClass(n,"lastLineEllipsis");var a=e.tokenizeStrategy||"word",s=r._tokenizeStrategies[a]("").spaces;if(n.appendChild(document.createTextNode(o.singleLineContent.join(s?" ":""))),e.insertBefore(n,o.lastLineStartsAt),"word"===a&&o.firstWordWidth>=o.elementWidth)for(var l=e.getElementsByTagName("ins"),c=0;c<l.length;c++){var d=l[c];-1==d.className.replace(/[\t\r\n\f]/g," ").indexOf("lastLineEllipsis")?d.style.display="none":d.className+=" tblHideAllButFirst"}}}}(window,document),TRC.eventDelegator=function(e,t){var r=[],i={},o;function n(e,t){var i;r[e]&&(a(i=r[e]["_all"],t||""),t&&r[e][t.container.id]&&a(i=r[e][t.container.id],t))}function a(e,t){if(e){var r,i=e.length;for(r=0;r<i;r++)try{"function"==typeof e[r]&&setTimeout(function(e,t){return function(){e(t)}}(e[r],t),0)}catch(e){__trcError("executeHandlers",e)}}}function s(e,t){var r;if(t)for(r in t)try{"function"==typeof e&&setTimeout(function(e,t){return function(){e(t)}}(e,t[r]),0)}catch(e){__trcError("executeHandlers",e)}else setTimeout(e,0)}function l(e){r[e]=[],r[e]["_all"]=[]}function c(e,t){r[e][t]=[]}var d={subscribe:function(e,t,o){r[e]||l(e),o?(r[e][o]||c(e,o),r[e][o].push(t),i[e]&&i[e][o]&&s(t,{mode:i[e][o]})):(r[e]["_all"].push(t),i[e]&&s(t,i[e]))},dispatch:function(e,t){i[e]=i[e]||{},t?i[e][t.container.id]=t:i[e]["_all"]={},n(e,t||null)},resetEvents:function(){i={}}};if(e._trcIsUTactive&&(d.processDelegatorsStack=n,d.executeHandlers=a,d.executePreviousEvents=s,d.delegatorsStack=r,d.eventsStack=i),TRC.subscriptionRegister)for(;TRC.subscriptionRegister.length;)o=TRC.subscriptionRegister.shift(),d.subscribe(o.event,o.handler,o.container);return d}(window,document),function(e,t){function r(e){return{detail:e}}function i(e){return"api::"+e}function o(e,t){TRC.dispatch(i(e),r(t))}function n(e,t){var r=TRC.TRCParser,i;return e=e||{},i={mode:r.parseModeName(e),placement:r.parsePlacementName(e),baseMode:r.parseBaseModeName(e),variant:r.parseTestVariant(e),itemCount:r.getItemCount(e)},t&&(i.container=t.container,i.items=t.apiData),i}TRC.EventsAPI={dispatchClick:function(e,t){var r=TRC.TRCParser,i;e=e||{},i=new TRC.ItemParser(e),t=t||{},o("click",{slot:i.getSlot(),id:i.getId(),type:i.getType(),title:i.getTitle(),url:i.getUrl(),linkTarget:i.getLinkTarget(),mode:r.parseModeName(t),placement:r.parsePlacementName(t),baseMode:r.parseBaseModeName(t),variant:r.parseTestVariant(t),itemCount:r.getItemCount(t)})},dispatchVisible:function(e,t){var r;o("visible",n(e,t))},dispatchRender:function(e,t){var r;o("render",n(e,t))},dispatchNoContent:function(e,t,r){var i={reason:e};t&&(i.placement=t),i.isFeedCard=r||!1,o("nocontent",i)},listen:function(e,t){TRC.listen(i(e),t,!0)},dispatchStoriesLoaded:function(){o("storiesLoaded")},dispatchStoriesCloseVerticalUi:function(){o("closedVerticalUI")},dispatchStoriesSwipeVerticalUi:function(e){o("swipeVerticalUI",e)},dispatchTrcImplAvailable:function(){o("trcImplAvailable")},dispatchPlacementNoRendered:function(e,t){var r=TRC.TRCParser,i;e=e||{},o("trcPlacementNotRendered",i={mode:r.parseModeName(e),placement:r.parsePlacementName(e),unifiedPlacement:e.unifiedPlacement||null,reason:t||null})},readmore:function(e,t){var r=TRC.TRCParser;t=t||{},o("readmore."+e,{mode:r.parseModeName(t),placement:r.parsePlacementName(t),variant:r.parseTestVariant(t)})},dispatchHp4uEvent:function(e){o("hp4uEvents",e)}}}(window,document),function(e,t){var r,i,o={},n=0;function a(e){void 0===o[e]&&(o[e]=[])}function s(e,t){a(e),o[e]=o[e].filter(function(e){return t!==e.id})}if(TRC.listen=TRC.listen||function(e,t,r){if("object"==typeof e&&e.length)return e.forEach(function(e){TRC.listen(e,t)}),null;a(e);var i={id:n++,handler:t,eventName:e,sync:r,remove:function(){s(this.eventName,this.id)}};return o[e].push(i),i},TRC.dispatch=TRC.dispatch||function(e,t){a(e);var n=r(e,t);o[e].forEach(function(e){if(e.sync)try{e.handler.call(this,n)}catch(e){}else i(function(){e.handler.call(this,n)}.trcBind(this))}.trcBind(this))},TRC.hasEvent=TRC.hasEvent||function(e){var t=o[e];return Array.isArray(t)&&t.length>0},t.addEventListener&&t.dispatchEvent)return t.addEventListener("trcFakeEvents",function(e){e.cx()},!1),r=function(e,r){var i=t.createEvent("Event");return i.initEvent(e,!1,!1),"[object Array]"===Object.prototype.toString.call(r)?i.data=r:"object"==typeof r?__trcCopyProps(r,i):i.data=r,i},void(i=function(e){var i=r("trcFakeEvents");i.cx=e,t.dispatchEvent(i)});t.documentElement.attachEvent("onpropertychange",function(e){"trcFakeEvents"==e.propertyName&&e.cx()}),r=function(e,r){var i;return r&&r.generator&&"ceo"===r.generator?(r.type=e,r):((i=t.createEventObject()).generator="ceo",i.type=e,"[object Array]"===Object.prototype.toString.call(r)?i.data=r:"object"==typeof r?__trcCopyProps(r,i):i.data=r,i)},i=function(e){var i=r("trcFakeEvents");i.cx=e,i.propertyName="trcFakeEvents",t.documentElement.fireEvent("onpropertychange",i)}}(window,document),function(e){var t=TRC.ExpandAnimationManager=function(t){TRC.RBoxUsage.logUsage("ExpandAnimationManager"),this.rbox=t,this.container=t.container,this.trcContainer=this.container._trc_container,TRC.css.utils.setStyleElements(this.createCSS()),this.trcContainer.className+=" trc_expandable",this.throttledExpandScrollHandler=this.scrollHandler.trcBind(this).trcThrottle(10),TRC.dom.on(e,"scroll",this.throttledExpandScrollHandler)};t.prototype.scrollHandler=function(){this.rbox.isInViewPort(this.container,0)?this.trcContainer.wasOutOfViewPort&&(this.trcContainer.className+=" trc_show",TRC.dom.off(window,"scroll",this.throttledExpandScrollHandler)):this.trcContainer.wasOutOfViewPort=!0},t.prototype.createCSS=function(){for(var e=[],t="#"+TRC.css.utils.escape(this.container.id),r=this.rbox.trc.getProperty(this.rbox.mode_name,"expand-animation-duration"),i=this.rbox.trc.getProperty(this.rbox.mode_name,"expand-animation-max-height"),o=[t+" .trc_rbox_container.trc_expandable {"+TRC.css.utils.generateCssRuleWithVendorPrefixes("transition-duration",r+"ms")+"}",t+" .trc_rbox_container.trc_expandable.trc_show { max-height: "+i+"px;}"],n=0;n<o.length;n++)e.push(o[n]);return e.join("")}}(window),(()=>{const e={collapsedHeight:490,expandButtonCaption:"Show More",collapseButtonCaption:"Show Less",fadeBackgroundColor:"#fff",fadeHeight:60,buttonTop:28,buttonBottom:10,fadeGradient:40};class t{constructor(t,r,i){this.externalCardMaxRetries=t.global["external-card-max-retries"]||5,this.externalCardRetryInterval=t.global["external-card-retry-interval"]||1e3,i=__trcCopyProps(e,{},i),this.init(r,i)}init(e,r,i=0){if(this.boxElement=document.getElementById(e),this.boxElement){if(this.boxElement.getBoundingClientRect().height<r.collapsedHeight)return void(i<this.externalCardMaxRetries?(i++,setTimeout(this.init.trcBind(this,e,r,i),this.externalCardRetryInterval)):TRC.dom.addClass(this.boxElement,"tbl-expandable-box-inactive"));TRC.dom.addClass(this.boxElement,"tbl-collapsed"),TRC.dom.injectStyle(t.getExpandableBoxCSS(e,r)),this.boxElement.appendChild(this.createExpandButton(r)),this.boxElement.appendChild(this.createCollapseButton(r)),this.listenToBoxClick()}else __trcError(`Cannot find expandable box element by ID: ${e}`)}createExpandButton(e){return this.createButton(e.expandButtonCaption,this.handleExpandClick,"tbl-expand-btn-container")}createCollapseButton(e){return this.createButton(e.collapseButtonCaption,this.handleCollapseClick,"tbl-collapse-btn-container")}createButton(e,t,r){const i=document.createElement("div"),o=document.createElement("a");return o.className+="tbl-expandable-box-btn",o.textContent?o.textContent=e:o.innerText=e,TRC.dom.on(o,"click",t.trcBind(this)),i.className=`tbl-expandable-box-btn-container ${r}`,i.appendChild(o),i}addExpandClasses(){TRC.dom.addClass(this.boxElement,"tbl-expanded"),TRC.dom.removeClass(this.boxElement,"tbl-collapsed"),this.isExpanded=!0}addCollapseClasses(){TRC.dom.addClass(this.boxElement,"tbl-collapsed"),TRC.dom.removeClass(this.boxElement,"tbl-expanded"),this.isExpanded=!1}handleExpandClick(e){e.preventDefault(),e.stopPropagation(),this.isExpanded||this.addExpandClasses()}handleCollapseClick(e){e.preventDefault(),e.stopPropagation(),this.addCollapseClasses(),this.boxElement.scrollIntoView&&this.boxElement.scrollIntoView()}static getExpandableBoxCSS(e,t){return`#${e}.tbl-expanded { max-height: inherit; } #${e}.tbl-expanded .tbl-collapse-btn-container { display: block; padding: 0 5px; }#${e}.tbl-collapsed { max-height: ${t.collapsedHeight}px; overflow: hidden; position: relative; } #${e}.tbl-collapsed .tbl-expand-btn-container { display: block; }#${e} .tbl-expandable-box-btn { margin: ${t.buttonTop}px 0 ${t.buttonBottom}px !important; display: inline-block !important; line-height: 38px !important; text-align: center !important; white-space: nowrap !important; vertical-align: middle !important; cursor: pointer !important; -webkit-touch-action: manipulation; -moz-touch-action: manipulation; -ms-touch-action: manipulation; -o-touch-action: manipulation; touch-action: manipulation; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; color: #326891 !important; background: #edf2f5 none !important; border: 1px solid #93abbc !important; height: 38px !important; width: 100% !important; font-size: 15px !important; font-weight: bold !important; border-radius: 3px !important; font-family: sans-serif !important; } #${e} .tbl-expandable-box-btn:hover { background-color: #bed0dc !important; border-color: #7399b3 !important; color: #326891 !important; }#${e} .tbl-expandable-box-btn-container { display: none; text-align: center; }#${e} .tbl-expand-btn-container { position: absolute; z-index: 100; left: 0; right: 0; bottom: 0; padding: ${t.fadeHeight}px 10px 0px 10px; box-sizing: border-box; background: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 0%, ${t.fadeBackgroundColor} ${t.fadeGradient}%, ${t.fadeBackgroundColor} 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(50%, ${t.fadeBackgroundColor}), color-stop(100%, ${t.fadeBackgroundColor})); background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, ${t.fadeBackgroundColor} ${t.fadeGradient}%, ${t.fadeBackgroundColor} 100%); background: -o-linear-gradient(top, rgba(255, 255, 255, 0) 0%, ${t.fadeBackgroundColor} ${t.fadeGradient}%, ${t.fadeBackgroundColor} 100%); background: -ms-linear-gradient(top, rgba(255, 255, 255, 0) 0%, ${t.fadeBackgroundColor} ${t.fadeGradient}%, ${t.fadeBackgroundColor} 100%); background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, ${t.fadeBackgroundColor} ${t.fadeGradient}%, ${t.fadeBackgroundColor} 100%); }`}listenToBoxClick(){TRC.listen("expandableBoxChildIFrameClick",e=>{e.container!==this.boxElement||this.isExpanded||this.addExpandClasses()})}}TRC.ExpandableBox=t})(),TRC.ExternalContainerAppender={MAX_RETRIES:50,TIMEOUT:100,move(e,t,r=0){if(document.querySelector)if(t){let i,o=!1;try{i=document.querySelector(e)}catch(t){__trcWarn(`Exception while trying to find external container with selector ${e}: ${t}`),o=!0}i?(t.appendChild(i),TRC.dispatch("trcContentReady",{container:t})):r<this.MAX_RETRIES&&!o?TRC.Timeout.set(this.move.trcBind(this,e,t,r+1),this.TIMEOUT):__trcWarn(`Could not find external container with selector ${e} to move`)}else __trcError(`Could not find target container for external container move`)}},function(){let e={};const t={},r={isPlacementApprovedToRender:()=>!0,hideFallbackElements(){return this},reportTimeToRender(){}};class i{constructor(e,{enable:t,elements_to_hide:r}={},{should_render:i}={}){this.originalPlacementName=e,this.isApprovedToRender=null,this.triedToHideFallbackElements=!1,this.enable=t,this.elements_to_hide=r,this.should_render=i}setIsApprovedToRender(){if(null===this.isApprovedToRender&&this.enable&&"function"==typeof this.should_render)try{this.should_render()?this.isApprovedToRender=!0:(this.isApprovedToRender=!1,c.report({type:"ERROR",reason:"notAllowedToRender",originalPlacementName:this.originalPlacementName}))}catch(e){this.isApprovedToRender=!1,__trcError("Fallback Error in should_render",e)}}isPlacementApprovedToRender(){return this.setIsApprovedToRender(),this.isApprovedToRender}hideFallbackElements({placement:e}){return this.isApprovedToRender&&!this.triedToHideFallbackElements&&(this.triedToHideFallbackElements=!0,this.hideElements(e)),this}reportTimeToRender({isCache:e,placement:t,recommendationList:r}){c.report({type:"placementData",timeToRendered:performance.now&&performance.now(),originalPlacementName:this.originalPlacementName,placementName:t,items:r?r.length:null,isCache:!!e})}hideElements(e){Array.isArray(this.elements_to_hide)&&this.elements_to_hide.forEach(t=>{const r=document.querySelectorAll(t);if(r.length)for(let e=0;e<r.length;++e)r[e].style.display="none";else c.report({type:"ERROR",reason:"noFallbackElements",placement:e})})}}const o=(e,t)=>{try{const r=e.fpl||e.uip,i=t[r];if(i&&i.skip_dom_render)return!1}catch(e){__trcError("Fallback shouldRenderPlacementByRequest Error",e)}return!0},n=(e,t)=>{try{return s(e,t).isPlacementApprovedToRender()}catch(e){__trcError("Fallback shouldRenderPlacement Error",e)}return!0},a=e=>{try{l(e).hideFallbackElements(e).reportTimeToRender(e)}catch(e){__trcError("Fallback Error in finalize",e,.2)}},s=({cga:t,fpl:o,uip:n},a={})=>{const s=o||n,l=e[s];if(l)return l;const c=t&&t.fallback;return c&&!l?(e[s]=new i(s,c,a[s]),e[s]):r},l=({response:t,placement:i})=>{const o=t.feedPlacement||i;return e[o]||r},c={report:e=>{if(TRC.util.isPercentEnabled(TRCImpl.global,"enable-fallback-events")){const t={data:JSON.stringify(e),type:"fallback"};TRCImpl.sendEvent("pubs-generic",{d:JSON.stringify(t)},{})}},runOnError:r=>{const{placement:i}=r,o=e[i],n=t[i];if(n&&"function"==typeof n)try{n()}catch(e){__trcError("Fallback Error in on_error",e)}o&&o.enable&&c.report({type:"ERROR",reason:"failedToRender",placement:i})},setOnError:({placement:e,on_error:r})=>{t[e]=r}};TRC.listen("onRboxFlowError",c.runOnError),TRC.fallbackApi={shouldRenderPlacement:n,shouldRenderPlacementByRequest:o,finalize:a,setOnError:c.setOnError},window._trcIsUTactive&&(TRC.fallbackApi.unitestsHelpers={fallbackUtils:c,getFallbackPlacement:l,build:s,clearFallbackPlacements:()=>{e={}}})}(),function(){let e=!1;function t(){try{!e&&r()&&(TRCImpl.sendAbTestEvent("isFeedViewIframe",window.top.TRC.pageManager.getPageData()),e=!0)}catch(e){__trcError("Error in TRC.FeedViewInIframeReport.report(): ",e)}}function r(){let e=!1,t,r;try{return TRC.dom.isInIframe(!0)&&(t=window.top&&window.top.TRC&&window.top.TRC.FeedView)&&(r=t.getSelectors(),e=window.frames&&window.frames.name===r.IFRAME_ID),e}catch(e){__trcError("Error in TRC.FeedViewInIframeReport.isFeedViewIframe(): ",e)}}TRC.FeedViewInIframeReport={report:t},window._trcIsUTactive&&(TRC.FeedViewInIframeReport.isFeedViewIframe=r)}(),(()=>{class e{constructor(t){e.loadFeedViewModuleWhenNeeded(),t.feedViewConfig=!0,TRC.hasFeedView=!0}static loadFeedViewModuleWhenNeeded(){const e=TRC.util.isRboxEncapsulated(TRC),t=TRC.dom.isInIframe(!0);e||t||TRC.feedViewModuleLoaded||TRC.ModuleLoader.load("feed-view",TRC.FeedView,()=>{TRC.feedViewModuleLoaded=!0})}static isFeedViewWidget(e,t){const r=e.getProperty(null,"feed-view-devices"),i=e.getProperty(null,"feed-view-enable"),o=e=>"all"===r||r===e;return!(TRC.util.isFalse(i)||TRC.util.isTrue(TRC.dom.isSmartPhone())&&TRC.util.isFalse(o("smart_phone"))||TRC.util.isFalse(TRC.dom.isSmartPhone())&&TRC.util.isFalse(o("desktop"))||TRC.util.isFalse(e.getProperty(t.mode_name,"mode-enable-feed-view"))||TRC.util.isTrue(TRC.hasFeedView)||e.global["disable-feed-view-top-referrer"])}}TRC.FeedViewWidgetLoaderManager=e})(),(()=>{class e{constructor(e,t){this.trcManager=e,this.trcCache=e.trcCache,this.firstIframe=t,this.renderedCardsPreviously=!1,this.feedContainerNum=TRC.feedContainerNum,this.shouldBreakForAMPSplitFeed=!1,this.CACHE_KEYS={F:"tbl_f",SYNC_FI:"tbl_syncFi",SYNC_FB:"tbl_syncFb",SYNC_VIEW_ID:"tbl_syncViewID",PUB_CARD_LOCS:"tbl_pubCardLocs",NEXT_IFRAME_TO_LOAD:"tbl_nextIframeToLoad",CURRENT_AMP_FRAME_NUM:"tbl_currentAmpFrameNum"}}cacheOrAssignFeedResponseData(e){!0===this.firstIframe&&!1===this.renderedCardsPreviously?(this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.F,e.trc.f),this.renderedCardsPreviously=!0):!1===this.renderedCardsPreviously&&!1===this.firstIframe&&(e.trc.f=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.F),this.renderedCardsPreviously=!0)}handleFeedIndexOffset(e){return e.fi=this.syncFi+1,e.fi}cacheLeftoverCards(e,t){const r={};__trcCopyProps(e,r);const i=TRC.TrcCache.extractKey(this.reqForCacheKey);this.trcCache&&this.trcCache.enableCacheViaStorageFlag(),r.trc.vl.splice(0,t+1),this.trcCache&&this.trcCache.cacheResponse(i,r)}handlePubCardInResponse(e,t){const r=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.PUB_CARD_LOCS),i=parseInt(TRC.pageManager.sessionStorageGetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD),10);i===parseInt(this.feedContainerNum,10)&&TRC.pageManager.sessionStorageSetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD,i+1);const o=t+1+this.oldSyncFi;-1===r.indexOf(o)&&this.currentAmpFrameNum<=this.feedContainerNum&&r.push(o),this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.PUB_CARD_LOCS,r),this.currentAmpFrameNum=r.length+1,TRC.currentAmpFrameNum=this.currentAmpFrameNum,this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.CURRENT_AMP_FRAME_NUM,this.currentAmpFrameNum),TRC.keyWriting=!0,this.cacheLeftoverCards(e,t),this.shouldBreakForAMPSplitFeed=!0}updateFeedIndexAndBatch(e){let t,r;this.oldSyncFi=this.syncFi,t=Number(this.oldSyncFi)+e.trc.vl.length;const i=Object.keys(e.trc.f),o=i[0];this.syncFb=parseInt(e.trc.f[o].nb,10),!0===e.cached&&(t-=r=e.trc.vl.length),this.syncFi=t,this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.SYNC_FI,t),this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.SYNC_FB,this.syncFb)}copyReqToReqForCacheKey(e){this.reqForCacheKey={},__trcCopyProps(e,this.reqForCacheKey)}static getPlacementId(e){return e&&e.placement?e.placement.split("|").pop().trim():""}detectDuplicateCards(t){const r=e.getPlacementId(t);null!==this.ampSplitFeedCache.getCacheData(r)?__trcError("Duplicate Card Index In AMP Split Feed"):this.ampSplitFeedCache.cacheData(r,!0)}detectSkippedCard(t){const r=e.getPlacementId(t),i=r.split(" "),o=i[0],n=i[1];if(isNaN(n))return void __trcError("Card name doesn't contain numeric index In AMP Split Feed");const a=`${o} ${parseInt(n,10)-1}`;n>1&&null===this.ampSplitFeedCache.getCacheData(a)&&__trcError("Card(s) Skipped In AMP Split Feed")}initParametersForSplitFeedFrames(){const e=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.SYNC_FI),t=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.SYNC_FB);this.syncFi=null===e?null:parseInt(e,10),this.syncFb=null===t?null:parseInt(t,10);const r=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.SYNC_VIEW_ID);null===r?this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.SYNC_VIEW_ID,TRC.pageManager.getPageData()):TRC.syncViewID=r;let i=this.ampSplitFeedCache.getCacheData(this.CACHE_KEYS.PUB_CARD_LOCS);i||(i=[],this.ampSplitFeedCache.cacheData(this.CACHE_KEYS.PUB_CARD_LOCS,i)),this.currentAmpFrameNum=i.length+1}checkAMPSplitFeedFlagsAndInit(e,t){this.nextIframeToLoad=TRC.pageManager.sessionStorageGetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD),this.sentIframeLoadFailed=!1,this.attemptCounter=0,this.MAX_ATTEMPTS=20,!this.nextIframeToLoad&&this.firstIframe&&(this.nextIframeToLoad="1",TRC.pageManager.sessionStorageSetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD,this.nextIframeToLoad)),this.nextIframeToLoad!==this.feedContainerNum?this.timeoutID=setTimeout(this.delayInit.trcBind(this,e,t),300):(this.didInit=!0,t(e))}static sendIframeLoadFailed(e){TRC.pConsole("errors","error","AMP split feed iframe",e,"blocked from out of order loading")}delayInit(t,r){try{this.attemptCounter++,!this.sentIframeLoadFailed&&this.attemptCounter>=this.MAX_ATTEMPTS&&(e.sendIframeLoadFailed(TRC.feedContainerNum),this.sentIframeLoadFailed=!0),this.nextIframeToLoad=TRC.pageManager.sessionStorageGetValue(this.CACHE_KEYS.NEXT_IFRAME_TO_LOAD),this.nextIframeToLoad===TRC.feedContainerNum?(this.didInit=!0,clearTimeout(this.timeoutID),r(t)):this.timeoutID=setTimeout(this.delayInit.trcBind(this,t,r),300)}catch(e){__trcError("AMP split feed - error in delaying iframe init",e)}}initAmpSplitFeedIframe(e){this.trcManager.trcCache&&this.trcManager.trcCache.reloadCache(),this.ampSplitFeedCache=new TRC.KeyValueCache({cacheName:"trc_amp_split_feed_cache",noTtl:!0}),this.initParametersForSplitFeedFrames(),this.trcManager.dispatchRequestWrapper(e)}static getAmpSplitFeedManager(e){const t=TRC.pageManager.sessionStorageIsSupported();return TRC.util.isTrue(e)&&!t?TRC.AmpSplitFeedManagerNoStorage:TRC.AmpSplitFeedManager}}class t extends e{constructor(e,r){super(e,r),this.cache={},r||t.hideContainer()}static hideContainer(){window.context&&window.context.requestResize(1,1).catch(()=>{__trcWarn("AmpSplitFeedManagerNoStorage: resize request rejected")})}checkAMPSplitFeedFlagsAndInit(e,t){if(this.didInit=!0,this.firstIframe)return t(e)}initAmpSplitFeedIframe(e){this.ampSplitFeedCache={cacheData:(e,t)=>{this.cache[e]=t},getCacheData:e=>void 0===this.cache[e]?null:this.cache[e]},this.initParametersForSplitFeedFrames(),this.trcManager.dispatchRequestWrapper(e)}handlePubCardInResponse(){this.shouldBreakForAMPSplitFeed=!0}}TRC.AmpSplitFeedManager=e,TRC.AmpSplitFeedManagerNoStorage=t})(),(()=>{const e="card-available",t="card-visible",r="card-interaction",i=["click"];class o{constructor(e,t,r,i){const{feedDynamicParameters:o}=t;this.trcManager=e,this.cardPlacementData=r,this.exactVisibleDistanceThresholdFromTop=o&&o.exactVisibleDistanceThresholdFromTop||this.trcManager.global["exact-visible-distance-threshold-from-top"]||200,this.listenToCardInteractionEvents(i)}sendEvent(e,t){TRC.TrcEventsLogger.sendPlacementEvent(this.trcManager,this.cardPlacementData,e,t)}handleRenderedCard(t){t.style.position="relative",this.sendEvent(e),this.observeCardVisibility(t)}listenToCardInteractionEvents(e){i.forEach(t=>{TRC.dom.on(e,t,this.sendCardInteractionEvent.trcBind(this,t)),"click"===t&&e.querySelector("iframe")&&TRC.dom.on(window,"blur",this.checkIfCardIFrameClickedAndLog.trcBind(this,e))})}checkIfCardIFrameClickedAndLog(e){const{activeElement:t}=document;t&&"iframe"===t.tagName.toLowerCase()&&(t===e||e.contains(t))&&this.sendCardInteractionEvent("click")}sendCardInteractionEvent(e){const t={id:Date.now(),type:e},i={d:JSON.stringify(t)};this.sendEvent(r,i)}observeCardVisibility(e){const r={targetElement:e,enableDelayedVisibilityCheck:!0,exactVisibleThresholdFromTop:this.exactVisibleDistanceThresholdFromTop,onTrigger:this.sendEvent.trcBind(this,t,null)};TRC.intersections.isInViewPort(r)}}TRC.CardEventsManager=o})(),(()=>{const e="tbl-feed-container",t="tbl-feed-card",r="tbl-feed-full-width",i="tbl-feed-partial-width",o="tbl-feed-abp",n="data-feed-container-num",a="data-feed-main-container-id",s="data-parent-placement-name",l="data-pub-lang",c={FULL_WIDTH:"FULL_WIDTH",PARTIAL_WIDTH:"PARTIAL_WIDTH"};class d{constructor(e,t,r){const i=__trcCopyProps(r,{});this.trcManager=e,this.container=t.container,this.origContainer=this.container,this.mainContainerId=this.container.id,this.mainContainerPlacement=t.placement,this.numContainers=1,this.testData=e.testData,this.experimentsData=e.experimentsData,this.experimentsHash=e.experimentsHash,this.options=r,this.numPendingPublisherCards=0,this.layout=r.mobileLayout||r.feedUi&&r.feedUi.layout,this.shouldDisableScopeCss=this.trcManager.global["disable-scope-feed-css"],this.firstCardRequestId=t.firstCardRequestId,this.unifiedPlacement=t.unifiedPlacement,this.feedInViewPort=!1,r.wasWidget&&(this.widgetToFeedHelper=new TRC.WidgetToFeedHelper(this,e,r.hasFeedUI)),r.videoSingleManager&&this.loadVideoSingleManager(t,e,r),!1!==r.hasFeedUI&&TRC.dom.injectStyle(this.createCss(r),null),i.afterPlacementContainerCreated=d.addFeedCardAttributes.trcBind(this),i.itemsParentContainerSelector=`[${a}="${this.mainContainerId}"]`,this.infiniteScrollEngine=new TRC.InfiniteScrollEngine(e,t,i),this.publisherCardsManager=new TRC.PublisherCardsManager(this,e,t,r);const o=d.getFeedConfig(r,"footerOverlayConfig","footerOverlay");o&&TRC.ModuleLoader.load("feed-footer-overlay",TRC.FooterOverlay,()=>{this.footerOverlay=new TRC.FooterOverlay(e,o)}),TRC.isAMPSplitFeed&&(this.numContainers=this.trcManager.ampSplitFeedManager.feedContainerNum),this.setMainContainerCssClassesAndAttributes(this.container,r),this.listenToCardContentReady(),this.header=this.createHeader(r.feedUi),TRC.Heatmap.isEnabled(this.trcManager)&&(this.heatmap=new TRC.Heatmap(e),TRC.dom.on(this.container,"click",e=>{this.heatmap.captureAndSendClickData(e)})),this.observeFeed()}handlePlacement(e){const t=e.trcResponse&&e.trcResponse.spl,r=e.trcResponse&&e.trcResponse.pcp,i=e.trcResponse&&e.trcResponse.scac?null:this.infiniteScrollEngine.numPlacements;return t?(this.infiniteScrollEngine.handlePlacement(e),this.publisherCardsManager.registerPublisherCardForHandling(e),void this.publisherCardsManager.handlePendingPublisherCards(0,i,null,t)):(TRC.isAMPSplitFeed&&(this.trcManager.ampSplitFeedManager.detectDuplicateCards(e),this.trcManager.ampSplitFeedManager.detectSkippedCard(e)),r?TRC.isAMPSplitFeed?void this.stopScrolling():(this.publisherCardsManager.registerPublisherCardForHandling(e),this.infiniteScrollEngine.numPlacements++,void this.numPendingPublisherCards++):(this.numPendingPublisherCards>0&&(this.publisherCardsManager.handlePendingPublisherCards(0,i,null,t),this.numPendingPublisherCards=0),this.infiniteScrollEngine.handlePlacement(e),this.trcManager["after-card-created"](e,i,this),void TRC.CustomModulesManager.runHook("after-card-created",this.mainContainerPlacement,this,e,i,this)))}stopScrolling(){this.infiniteScrollEngine.stopScrolling()}setIsAllowedToRequestMoreContent(e){this.infiniteScrollEngine.setIsAllowedToRequestMoreContent(e)}updateNextBatchNumber(e){this.infiniteScrollEngine.updateNextBatchNumber(e)}setMainContainerCssClassesAndAttributes(t,d){const p=[e];switch(this.layout){case c.FULL_WIDTH:p.push(r);break;case c.PARTIAL_WIDTH:p.push(i)}d.feedUi&&d.feedUi.cardFrame&&p.push(`tbl-feed-frame-${d.feedUi.cardFrame}`),TRC.blocker.blockedState>0&&p.push(o),TRC.dom.addClass(this.container,p.join(" ")),this.numContainers>1&&(this.container.id=`${this.mainContainerId}-split-num-${this.numContainers-1}`),t.setAttribute(n,this.numContainers),t.setAttribute(a,this.mainContainerId),t.setAttribute(s,this.mainContainerPlacement),this.trcManager.language&&t.setAttribute(l,this.trcManager.language)}createHeader(e){if(TRC.isAMPSplitFeed&&this.trcManager.ampSplitFeedManager&&1!==Number(this.trcManager.ampSplitFeedManager.feedContainerNum))return;const t=document.createElement("div"),r=document.createElement("div"),i=!(!e||!e.feedHeaderData),o=e&&e.logoPosition&&"NONE"!==e.logoPosition?e.logoPosition:null,n=o?`tbl-logo-${o.toLowerCase()}-position`:"";if(r.className="tbl-feed-header-logo",t.className=` tbl-feed-header ${n}`,t.appendChild(r),TRC.ccpa.renderOnHeaderFeed(t,this.unifiedPlacement,o),i){const r=d.createFeedHeaderTextElement(e.feedHeaderData.headerText);t.className+=" tbl-header-with-text",t.appendChild(r)}return this.container.insertBefore(t,this.container.firstChild),t}static createFeedHeaderTextElement(e){const t=document.createElement("div");return t.className="tbl-feed-header-text",t.innerText=e,t}static addFeedCardAttributes(e,t){e.setAttribute("tbl-feed-card",""),t.isStandaloneVideo&&d.setFeedVideoCardAttribute(e),d.setFeedCardVideoIndication(e,t)}static setFeedCardVideoIndication(e,t){t.trcResponse.nvb&&e.setAttribute("no-vbelow",""),t.trcResponse.nva&&e.setAttribute("no-vabove","")}static setFeedVideoCardAttribute(e){e.setAttribute("tbl-feed-video","")}listenToCardContentReady(){TRC.listen("trcContentReady",this.onTrcContentReady.trcBind(this))}onTrcContentReady(e){const{container:t}=e;if(t&&t.placementData){const{placementData:e}=t;if(!e.isFeedCard)return;this.onCardContentReady(t,e)}}onCardContentReady(e,r){const{style:i,id:o}=e,{trcResponse:n,expandOptions:a}=r;TRC.dom.addClass(e,t),n.cpad&&(i.padding=n.cpad),a&&(e.expandableBox=new TRC.ExpandableBox(this.trcManager,o,a),this.listenToBoxChildIFrameClick())}listenToBoxChildIFrameClick(){this.expandableBoxIFrameClickListener||(this.expandableBoxIFrameClickListener=!0,TRC.dom.on(window,"blur",()=>{const{activeElement:e}=document;e&&TRC.dom.elementMatchesSelector(e,`[${a}="${this.mainContainerId}"] .${t} iframe`)&&TRC.dispatch("expandableBoxChildIFrameClick",{container:TRC.dom.closest(e,` .${t}`)})}))}createCss(e){const t=[];e.feedCss?t.push(e.feedCss.replace(/{FEED_MAIN_CONTAINER_ID_ATT}/g,`[${a}="${this.mainContainerId}"]`)):t.push(d.getDefaultFeedCSS()),this.isFullWidthMobileFeed(e)&&t.push(this.getMobileFullWidthMarginsCss()),e.feedUi&&t.push(d.getFeedUiCss(e.feedUi,this.mainContainerId)),e.publisherFeedCss&&t.push(e.publisherFeedCss),t.push(e.feedCssOverride);let r=t.join("");return this.shouldDisableScopeCss||(r=d.scopeCss(r,this.mainContainerId)),r}static scopeCss(t,r){return t.replace(new RegExp(`.${e}`,"g"),`[${a}="${r}"]`)}getTestData(){return this.testData}getExperimentsData(){return this.experimentsData}getExperimentsHash(){return this.experimentsHash}static getFeedUiCss(e,t){const r=[],i=e.feedBackgroundColor||e.feedBackground,o=`[${a}="${t}"]`;if(r.push(`${o}[${n}] {background-color: ${i}; padding: ${e.feedPadding};}`),"NONE"===e.logoPosition?r.push(`${o} .tbl-feed-header .tbl-feed-header-logo {display:none;}`):r.push(`${o} .tbl-feed-header {padding: 0px 5px 10px 5px; background: transparent; text-align: initial; display: table; width: 100%;}`),e.feedHeaderData){const{headerFontSize:t="20px",headerFontFamily:i="Arial, Helvetica, sans-serif",headerColor:n="#000000",headerFontStyle:a="normal"}=e.feedHeaderData;r.push(`${o} .tbl-feed-header .tbl-feed-header-text {font-size: ${t}; color: ${n}; line-height: ${t}; font-family: ${i}; font-weight: ${a}}`)}return r.join("")}getMobileFullWidthMarginsCss(t){const i=t?this.container.parentNode:this.container,o=i.getBoundingClientRect(),a=-1*o.left,s=-1*(document.documentElement.clientWidth-o.width-Math.abs(a));let l=`#${this.container.id}.${e}.${r}`;return(a||s)&&i.offsetParent?(t&&(l+=`[${n}="${t}"]`),`@media screen and (max-width: 480px) {\n ${l} {\n margin-left: ${a}px;\n margin-right: ${s}px;\n }\n }`):""}static getDefaultFeedCSS(){return`.${e} { position: relative; margin-top: 20px; margin-bottom: 20px; -webkit-text-size-adjust: 100%; clear: both; } .${e} .tbl-feed-header { padding: 5px; background-color: #ffffff; display: inline-block; } .${e} .tbl-feed-header-logo { background: url(//cdn.taboola.com/static/f8/f89e1763-220d-4e09-ba69-9e040548fb7a.svg) no-repeat 0 0; background-size: contain; height: 11px; width: 76px; display: inline-block; } .${e} .tbl-loading-spinner { margin-bottom: 10px; } .${e} .${t} { margin-bottom: 10px; background-color: #ffffff; border: 1px solid #f1f1f1; } .${e} .${o} { max-width: 770px; margin: 20px auto 0; }/** Mobile CSS Rules **/@media screen and (max-width: 480px) { .${e} { padding: 0; background-color: #ffffff; } .${e} .tbl-feed-header { margin-left: 2px; padding: 5px 0; } .${e} .${t} { margin-bottom: 5px; padding-bottom: 5px; border-width: 0; border-bottom: 4px solid #f1f1f1; } .${e} .trc_header_ext, .${e} .trc-widget-footer { padding-right: 3px; } }/** End of Mobile CSS Rules **/`}getVideoManagerRequestData(){return{"session-data":TRC.pageManager.getPublisherValue(TRC.publisherId,"session-data"),req:this.firstCardRequestId}}loadVideoSingleManager(e,t,r){const i=__trcCopyProps(e,{},null),o=__trcCopyProps(r.videoSingleManager,{});o.parentFeedOptions=r,this.videoManager=new TRC.VideoTagLoader(t,o,i,null,this.getVideoManagerRequestData()),this.videoManager.loadVideo()}switchMainContainer(e){this.container=e,this.infiniteScrollEngine.switchMainContainer(this.container)}isFullWidthMobileFeed(e){const t=e.mobileLayout||this.layout;return t===c.FULL_WIDTH}getIsFirstBatch(){return this.infiniteScrollEngine.getIsFirstBatch()}static getFeedConfig(e,t,r){if(e){const i=this.getFeedDynamicParameter(e.feedDynamicParameters,t);return i||e[r]}return null}static getFeedDynamicParameter(e,t){if(e){const r=e[t];if(r)return JSON.parse(r)}return null}observeFeed(){TRC.intersections.observe({targetElement:this.container,onEnter:this.onFeedEnterViewport.trcBind(this),onExit:this.onFeedExitViewport.trcBind(this),rootMargin:"0px"})}onFeedEnterViewport(){this.feedInViewPort=!0,TRC.dispatch("feed-present-in-viewport",!0)}onFeedExitViewport(){this.feedInViewPort=!1,TRC.dispatch("feed-present-in-viewport",!1)}}TRC.Feed=d})(),(()=>{class e{constructor(e){this.trcManager=e,this.feeds={},this.invalidFeedsMap={},this.configs={}}handleFeedCardPlacement(t,r){r.isFeedCard=!0,e.setScaArray(r,t);const i=this.getOrCreateFeed(t),o=i&&i.options,n=o&&TRC.Feed.getFeedDynamicParameter(o.feedDynamicParameters,"feedViewConfig"),a=o&&o.feedView,s=o&&(n||a),l=n&&TRC.util.isFalse(n.isFeedView)?n.isFeedView:s;i&&(l&&(TRC.hasFeedView||this.trcManager.global["disable-feed-view-top-referrer"]||(TRC.hasFeedView=!0),TRC.FeedViewWidgetLoaderManager.loadFeedViewModuleWhenNeeded(),s&&s.enableAEClicks&&(i.enableAEClicks=!0),r.feedViewConfig=s),r.parentFeed=i,r.parentFeed.handlePlacement(r))}getOrCreateFeed(e){const t=e.fpl,r=this.getFeedConfig(t),i=this.feeds[t]||this.createNewFeed(r,t,e);if(window.__trcInfo(JSON.stringify({name:t,nb:r.nb||"",eof:r.eof||"",fti:r.fti||"",vsm:!!r.vsm})),i instanceof TRC.Feed)return r.eof&&i.stopScrolling(),r.nb&&i.updateNextBatchNumber(r.nb),i}createNewFeed(t,r,i){const{uuip:o,ri:n,sca:a}=i,{fcs:s,rooc:l,exm:c}=t,d=e.parseFeedOptionsFromResponse(t);c&&(TRC.util.sendSupplyFeature("EXPLORE_MORE","ADOPTED"),this.trcManager.enableExploreMore(t,r)),TRC.VirtualPlacementsManager.handleVirtualPlacement(this.trcManager,r);const p=this.trcManager.preloadRequest[r];if(p){if(p.isFeed=!0,!s||(p.container=this.getNewFeedContainer(p.container,r,s,l),p.container))return p.fti=t.fti,p.unifiedPlacement=o,p.firstCardRequestId=n,p.sca=a,this.feeds[r]=new TRC.Feed(this.trcManager,p,d)}else __trcDebug(`'createNewFeed' : placement '${r}' was not in the request - ignore`)}getNewFeedContainer(e,t,r,i){const o="feed",n={container:e,"container-selectors":r,"render-on-orig-container":i},a=this.trcManager.getWidgetContainer(n,o);if(a)return a;this.invalidFeedsMap[t]=!0}getFeedConfig(e){return this.configs&&this.configs[e]?this.configs[e]:{}}hasFeedConflict(e,t){return this.feeds[e]||this.hasFeedTestDataMismatch(t)}hasFeedTestDataMismatch(e){const t=this.feeds[e];if(!t)return!1;if(t.getTestData()!==this.trcManager.testData)return!0;const r=t.getExperimentsHash(),i=this.trcManager.experimentsHash;return r&&!i||!r&&i||r&&i&&r!==i}static setScaArray(e,t){e&&e.globalTrcResponseJSON&&e.globalTrcResponseJSON.sca&&(t.sca=e.globalTrcResponseJSON.sca)}static isExperimentDataEqual(e,t){const r=JSON.stringify(e),i=JSON.stringify(t);return r===i}static parseFeedOptionsFromResponse(e){return{nextBatchDistanceThreshold:e.nbdt,feedCss:e.css,feedCssOverride:e.fcss,publisherFeedCss:e.pfcss,mobileLayout:e.fml,videoSingleManager:e.vsm,feedUi:e.fui,feedNextUp:e.fnu,exploreMore:e.exm,footerOverlay:e.fov,feedDynamicParameters:e.drp,videoDisclosurePosition:e.vdp,uiDesignVersion:e.udv,wasWidget:TRC.util.isTrue(e.ww),firstBatchLazyLoadingEnabled:TRC.util.isTrue(e.fbll),hasFeedUI:void 0===e.hfu||TRC.util.isTrue(e.hfu),hasPreventReachingFooter:TRC.util.isTrue(e.prf),preventReachingFooterData:e.prfd,feedView:TRC.util.isTrue(e.fv)}}static createFeedScriptWidgetData(e,t){return{placement:e,scriptData:t,addWidget:!0}}static createFeedIframe(e,t){return{placement:e,iframeData:t,addWidget:!0,isIframeCard:!0,mode:t.m,mode_name:t.m}}static createPublisherCardData(e,t){return{placement:e,addWidget:!0,publisherCardData:t.pcp}}static createExternalWidgetData(e,t){return{placement:e,externalContainerSelector:t.es}}static isExternalContainerWidget(e){return void 0!==e.es&&null!==e.es}static isFeedScriptWidget(e){return e.fpl&&e.js}static isFeedIframe(e){return e.fpl&&e.ifr}static isPublisherCard(e){return e.fpl&&e.pcp}}TRC.FeedsManager=e})(),(()=>{const e=!!window.taboolaMobile,t=window.taboolaMobile&&window.taboolaMobile.isScrollSwitchEnabled&&window.taboolaMobile.isScrollSwitchEnabled();class r{constructor(r,i,o){this.trcManager=r,this.parentPlacementData=i,this.parentPlacementName=i.placement,this.container=i.container,this.origContainer=this.container,this.parentContainerId=this.container.id,this.afterPlacementContainerCreated=o.afterPlacementContainerCreated,this.nextBatchDistanceThreshold=o.nextBatchDistanceThreshold||2e3,this.numPlacements=1,this.scAdjacencyPlacements=0,this.feedDynamicParameters=o.feedDynamicParameters,this.uiBatchNumberCounter=1,this.isPendingNextBatch=!0,this.numOfConsecutiveFailedRequests=0,this.maxNumOfConsecutiveFailedRequests=this.trcManager.global["feed-max-num-of-consecutive-failed-requests"]||10,this.nbLoaderLayerEnabled=this.trcManager.global["enable-cls-loader-optim"],this.firstBatchLazyLoadingEnabled=o.firstBatchLazyLoadingEnabled,this.isFirstBatchRequest=!0,this.isRequestSent=!0,this.isLoadNextBatchAnchorObserveEnter=!1,this.currentBatchSuccessful=!1,this.enableManualLoadNextBatch=this.trcManager.manualVisibilityTrigger&&this.trcManager.global["enable-manual-visible"]||this.feedDynamicParameters&&this.feedDynamicParameters.manualLoadNextBatch,this.numPlaceholderItems=this.feedDynamicParameters&&this.feedDynamicParameters.numPlaceholderItems||3,this.itemsParentContainerSelector=o.itemsParentContainerSelector||`#${this.parentContainerId}`;const n=this.feedDynamicParameters&&this.feedDynamicParameters.rootSelectorScrollElement||this.trcManager.global["feed-load-next-batch-root-selector"];this.observerRootSelector=n||null,this.observerScrollElement=n&&document.querySelector(n)||window,this.feedObserverLoadNextBatch=this.feedDynamicParameters&&this.feedDynamicParameters.feedObserverLoadNextBatch,this.firstBatchDistanceThresholdFromTop=this.feedDynamicParameters&&this.feedDynamicParameters.firstBatchDistanceThresholdFromTop||this.trcManager.global["first-batch-distance-threshold-from-top"];const a=TRC.util.isTrue(this.trcManager.global["feed-observer-load-next-batch"]);(a||this.feedObserverLoadNextBatch&&!this.enableManualLoadNextBatch)&&(this.isLoadNextBatchUsingObserver=!0),e&&!t&&(this.isLoadNextBatchUsingObserver=!1),this.firstBatchDistanceThresholdFromTop&&!this.enableManualLoadNextBatch&&(this.throttledLoadRestOfBatchScrollHandler=this.loadRestOfBatchScrollHandler.trcBind(this,this.firstBatchDistanceThresholdFromTop).trcThrottle(10),TRC.dom.on(this.observerScrollElement,"scroll",this.throttledLoadRestOfBatchScrollHandler)),this.enableManualLoadNextBatch&&(this.lastManualRectsTop=0,this.listenToManualLoadNextBatchEvent()),this.feedDynamicParameters&&this.feedDynamicParameters.enableHistory&&(this.historyManager=new TRC.HistoryManager(r)),this.isLoadNextBatchUsingObserver&&this.createLoadNextBatchObserverAnchorElement();const s=TRC.Feed.getFeedConfig(o,"preventReachingFooterConfig","preventReachingFooterData");this.hasPreventReachingFooter=s&&void 0!==s.enable?TRC.util.isTrue(s.enable):o.hasPreventReachingFooter,s&&this.hasPreventReachingFooter&&TRC.PreventReachingTheFooter.init(this,s),this.listenToTrcResponse(),this.createLoadingIndicator(),this.initMonitoringOfDuplicatedItemsIfNeeded()}loadRestOfBatchScrollHandler(e){const t=this.isNearingStartOfPage(e);this.restOfFirstBatchLoaded||this.isCache?TRC.dom.off(this.observerScrollElement,"scroll",this.throttledLoadRestOfBatchScrollHandler):!this.restOfFirstBatchLoaded&&t&&(this.getNextBatch(),TRC.dom.off(this.observerScrollElement,"scroll",this.throttledLoadRestOfBatchScrollHandler))}createNewNextBatchAnchorObserver(){TRC.dom.off(this.observerScrollElement,"scroll",this.nextBatchObserverCreator),TRC.intersections.unobserve(this.loadNextBatchAnchorObserverId),this.ampFeedResizeListener&&this.ampFeedResizeListener.remove(),this.nextBatchObserverCreator=null,this.isLoadNextBatchAnchorObserveEnter=!1,this.observeNextBatchAnchor()}observeNextBatchAnchor(){if(e&&!t)return;const r=this.getNextBatchDistanceThreshold(),i={rootSelector:this.observerRootSelector,targetElement:this.loadNextBatchAnchorContainer,threshold:[0,.25,.5,.75,1],rootMargin:`0px 0px ${r}px 0px`,onEnter:this.getNextBatch.trcBind(this)};this.loadNextBatchAnchorObserverId=TRC.intersections.observe(i)}createLoadingSpinner(){this.spinnerContainer=document.createElement("div"),this.spinnerContainer.className+="tbl-loading-spinner tbl-hidden",this.container.appendChild(this.spinnerContainer)}createLoadingCardPlaceholder(){this.spinnerContainer=document.createElement("div"),TRC.ModuleLoader.load("feed-card-placeholder",TRC.FeedCardPlaceHolder,()=>{TRC.FeedCardPlaceHolder.createLoadingCardPlaceholder({direction:this.trcManager.direction,container:this.container,cardPlaceholder:this.spinnerContainer,numPlaceholderItems:this.numPlaceholderItems})})}reserveSpaceForLoader(e,t,r){if(this.nbLoaderLayerEnabled)if(t){const e=t.style.getPropertyValue("padding-bottom");t.style.removeProperty("padding-bottom"),r.style.setProperty("padding-bottom",`${e}`,"important")}else{let t;if(e)t=50;else if(TRC.dom.isSmartPhone()){const e=95,r=8;t=this.numPlaceholderItems*e+r}else{const e=173,r=40;t=this.numPlaceholderItems*e+r}r.style.setProperty("padding-bottom",`${t}px`,"important"),this.spinnerContainer.style.setProperty("position","absolute","important")}}createLoadingIndicator(){const e=this.trcManager.global["disable-nb-anim"];if(!e){const e=this.feedDynamicParameters&&"true"===this.feedDynamicParameters.disableLoadingCardsPlaceholder||this.trcManager.global["disable-loading-cards-placeholder"];e?this.createLoadingSpinner():this.createLoadingCardPlaceholder(),this.reserveSpaceForLoader(e,null,this.container)}}createLoadNextBatchObserverAnchorElement(){this.loadNextBatchAnchorContainer=document.createElement("div"),this.loadNextBatchAnchorContainer.className="tbl-batch-anchor",this.container.appendChild(this.loadNextBatchAnchorContainer),this.observeNextBatchAnchor()}stopScrolling(){if(this.preventReachingTheFooter&&this.preventReachingTheFooter.disable(),this.isLoadNextBatchUsingObserver)return this.isAllowedToRequestMoreContent=!1,void TRC.intersections.unobserve(this.loadNextBatchAnchorObserverId);this.enableManualLoadNextBatch?this.isAllowedToRequestMoreContent=!1:TRC.dom.off(this.observerScrollElement,"scroll",this.throttledScrollHandler)}hideLoadingSpinner(){this.spinnerContainer&&-1===this.spinnerContainer.className.indexOf("tbl-hidden")&&TRC.dom.addClass(this.spinnerContainer,"tbl-hidden")}showLoadingSpinner(){this.spinnerContainer&&TRC.dom.removeClass(this.spinnerContainer,"tbl-hidden")}listenToTrcResponse(){let e;e=this.hasPreventReachingFooter?this.onTrcResponsePreventReachingFooterWrapper.trcBind(this):this.onTrcResponse.trcBind(this),TRC.EventsAPI.listen("nocontent",this.onTrcNoContent.trcBind(this)),TRC.listen("trcResponseHandled",e),TRC.listen("resumeFeedRendering",e)}listenToManualLoadNextBatchEvent(){TRC.listen(`visible::${this.parentPlacementName}`,this.manualLoadNextBatchHandler.trcBind(this))}shouldEnableLoadNextBatch(e){const t=e.boundingClientRect.top<this.lastManualRectsTop,r=e.boundingClientRect.top+e.boundingClientRect.height-e.rootBounds.height,i=r<=this.getNextBatchDistanceThreshold();return i&&t}manualLoadNextBatchHandler(e){this.shouldEnableLoadNextBatch(e)&&this.getNextBatch(),this.lastManualRectsTop=e.boundingClientRect.top}isNearingStartOfPage(e){return e<=this.getScrollTop()}getNextBatchDistanceThreshold(){if(!this.isFirstBatchRequest)return this.nextBatchDistanceThreshold;const e=this.firstBatchLazyLoadingEnabled&&this.trcManager.global["feed-first-batch-distance-threshold"]||this.nextBatchDistanceThreshold;return this.trcManager.renderController.isLazyRenderEnabled?this.trcManager.renderController.getBatchThreshold(this,e):e}updateNextBatchNumber(e){this.trcNextBatchNumber=+e}getNextBatch(e){try{this.preventReachingTheFooter&&this.preventReachingTheFooter.lateRenderEnabled&&this.preventReachingTheFooter.handleGetNextBatch();const t={};if(!1===this.isAllowedToRequestMoreContent||this.isPendingNextBatch)return;if(this.isLoadNextBatchUsingObserver){if(!e&&this.isLoadNextBatchAnchorObserveEnter)return;this.isLoadNextBatchAnchorObserveEnter=!0}this.isFirstBatchRequest=!1,this.parentPlacementData.fb=this.trcNextBatchNumber||++this.uiBatchNumberCounter,this.restOfFirstBatchLoaded=!0,this.parentPlacementData.fi=this.numPlacements+this.scAdjacencyPlacements,t[this.parentPlacementName]=this.parentPlacementData,this.isPendingNextBatch=!0,this.showLoadingSpinner(),this.trcManager.dispatchLoadRequest(t),this.isRequestSent=!0}catch(e){__trcError("Failed to load next batch in getNextBatch()",e)}}getScrollTop(){return TRC.dom.getScrollTop(this.observerScrollElement)}static isVideoItemPreviewOn(e,t){return!(e.uimvip!==t.mode&&!e.evip)}handlePlacement(e){const t=document.createElement("div"),i=e.trcResponse.scac;if(this.feedDynamicParameters&&r.isVideoItemPreviewOn(this.feedDynamicParameters,e)&&(t.className="tbl-preview"),e.isCache){if(this.isCache=!0,this.cachedViewId=e.cachedViewId,!this.loadFromCacheEventSent){const t="backToFeed_loadFromCache",r=__trcJSONify({origViewId:this.cachedViewId,placement:e.placement,cardIndex:i?null:this.numPlacements});this.trcManager.sendAbTestEvent(t,r),this.loadFromCacheEventSent=!0}}else if(this.isCache&&!this.loadNotFromCacheEventSent){const t="backToFeed_loadNotFromCache",r=__trcJSONify({origViewId:this.cachedViewId,placement:e.placement,cardIndex:i?null:this.numPlacements});this.trcManager.sendAbTestEvent(t,r),this.loadNotFromCacheEventSent=!0}e.container=t,e.modeGroupOrder=this.numPlacements,i||t.setAttribute("data-card-index",this.numPlacements),t.placementData=e,this.uiBatchNumberCounter=+e.trcResponse.fb||this.uiBatchNumberCounter,this.parentContainerId&&(t.id=`${this.parentContainerId}${i?`-sca${this.scAdjacencyPlacements+1}`:`-pl${this.numPlacements}`}`,t.setAttribute("data-batch-num",this.uiBatchNumberCounter)),"function"==typeof this.afterPlacementContainerCreated&&this.afterPlacementContainerCreated(t,e),this.isLoadNextBatchUsingObserver?this.container.insertBefore(t,this.container.querySelector(".tbl-batch-anchor")):this.container.insertBefore(t,this.container.querySelector(".tbl-loading-spinner")),this.historyManager&&(this.historyManager.trackElement(t),this.historyManager.scrollToElementIfWasLastInViewPort(t)),i?this.scAdjacencyPlacements++:this.numPlacements++,(!e.trcResponse.v||e.trcResponse.v.length>0)&&(this.currentBatchSuccessful=!0)}switchMainContainer(e){this.nbLoaderLayerEnabled&&this.reserveSpaceForLoader(null,this.container,e),this.container=e,this.isLoadNextBatchUsingObserver&&this.container.appendChild(this.loadNextBatchAnchorContainer),this.container.appendChild(this.spinnerContainer)}onTrcResponsePreventReachingFooterWrapper(e){this.preventReachingTheFooter&&this.preventReachingTheFooter.preparePreventScroll(e)}onTrcNoContent(e){e.detail.placement||(this.currentBatchSuccessful=!1,this.onTrcResponse())}onTrcResponse(){if(this.isRequestSent){if(this.isRequestSent=!1,this.currentBatchSuccessful)this.numOfConsecutiveFailedRequests=0;else if(this.numOfConsecutiveFailedRequests++,this.numOfConsecutiveFailedRequests>=this.maxNumOfConsecutiveFailedRequests)return this.stopScrolling(),void this.hideLoadingSpinner();this.currentBatchSuccessful=!1,this.isPendingNextBatch=!1,this.preventReachingTheFooter&&!0===this.preventReachingTheFooter.isWaitToHide?this.preventReachingTheFooter.isWaitToHide=!1:this.hideLoadingSpinner(),this.isLoadNextBatchUsingObserver&&!this.nextBatchObserverCreator&&!1!==this.isAllowedToRequestMoreContent&&(this.nextBatchObserverCreator=this.createNewNextBatchAnchorObserver.trcBind(this).trcThrottle(10),TRC.dom.on(this.observerScrollElement,"scroll",this.nextBatchObserverCreator),this.ampFeedResizeListener=TRC.listen("ampFeedResize",this.nextBatchObserverCreator)),this.duplicatedItemsMonitor&&this.duplicatedItemsMonitor.checkForDuplicatedItems(),this.preventReachingTheFooter&&this.preventReachingTheFooter.isEnableLateRender&&(this.preventReachingTheFooter.isEnableLateRender=!1,this.getNextBatch(!0))}}setIsAllowedToRequestMoreContent(e){this.isAllowedToRequestMoreContent=e}getIsFirstBatch(){return this.isFirstBatchRequest}initMonitoringOfDuplicatedItemsIfNeeded(){if(this.shouldMonitorForDuplicatedItems()){const e={parentContainerSelector:this.itemsParentContainerSelector,additionalLogDataBuilder:e=>({cardIndex:TRC.dom.closest(e,"[data-card-index]").getAttribute("data-card-index")})};this.duplicatedItemsMonitor=new TRC.DuplicatedItemsMonitor(this.trcManager,e)}}shouldMonitorForDuplicatedItems(){return this.trcManager.global["monitor-dup-items-traffic-pct"]>100*Math.random()||-1!==["yes","true","1"].indexOf(TRC.URL.prototype.getParameter.call(location.href,"taboola_dedup_debug"))}}TRC.InfiniteScrollEngine=r})(),(()=>{class e{constructor(e){this.getConfig(e),this.trackFastScroller()}getConfig(e){this.lateRenderTimeout=parseInt(e.timeout,10)||5e3,this.fastScrollerTime=parseInt(e.fastScrollerTime,10)||1e4,this.maxCards=parseInt(e.maxCards,10)||5,this.detectCardNumber=parseInt(e.detectCardNumber,10)||5,this.trcManager=e.trcManager,this.infiniteScrollEngine=e.infiniteScrollEngine,this.cardOneTime=null,this.detectCardTime=null,this.observerTargets=[],this.onScroll=this.observeScroll.trcBind(this).trcThrottle(50),this.onEndKey=this.endKeyHandler.trcBind(this),this.isFastScroller=!1,this.prevPosition=window.pageYOffset,this.scrollThrottleTime=parseInt(e.scrollThrottleTime,10)||10,this.timeout=null,this.scrollTimeoutLength=parseInt(e.scrollTimeoutLength,10)||5e3,this.timeoutEnabled=!1,this.stopListenToBatch=!0,this.shouldPreventScrolling=!0,this.loadNextBatchAnchorContainer=e.infiniteScrollEngine.loadNextBatchAnchorContainer,this.isPreventScroll=!1}trackFastScroller(){TRC.dom.on(window,"scroll",this.onScroll),TRC.dom.on(document,"keydown",this.onEndKey)}unTrackFastScroller(){TRC.dom.off(window,"scroll",this.onScroll),TRC.dom.off(document,"keydown",this.onEndKey),this.observerTargets.forEach(e=>{TRC.intersections.unobserve(e)})}enableLateRender(){this.isFastScroller=!0,this.lateRenderEnabled=!0}observeScroll(){this.cardOne&&0!==this.cardOne.length||(this.cardOne=this.infiniteScrollEngine.origContainer.querySelector('[data-card-index="1"]'),this.cardOne&&this.observeCard(this.cardOne,this.saveCardVisibilityTime.trcBind(this,"cardOneTime"))),this.detectCard&&0!==this.detectCard.length||(this.detectCard=this.infiniteScrollEngine.origContainer.querySelector(`[data-card-index="${this.detectCardNumber}"]`),this.detectCard&&this.observeCard(this.detectCard,this.saveCardVisibilityTime.trcBind(this,"detectCardTime"))),this.detectCardTime&&this.cardOneTime&&(this.detectCardTime-this.cardOneTime<this.fastScrollerTime&&this.enableLateRender(),this.unTrackFastScroller())}observeCard(e,t){const r={targetElement:e,onEnter:t,threshold:.5},i=TRC.intersections.observe(r);this.observerTargets.push(i)}saveCardVisibilityTime(e){this[e]||(this[e]=(new Date).getTime())}endKeyHandler(){const e=window.event,{keyCode:t,metaKey:r}=e;this.lateRenderEnabled||(35===t||r&&40===t)&&(this.unTrackFastScroller(),this.enableLateRender())}handleGetNextBatch(){this.getNextBatchTime=(new Date).getTime()}handleBatch(e,t){const r=t.trc.vl.length;void 0===this.numOfCards&&(this.numOfCards=0),this.numOfCards+=r,this.isPreventScroll=!1,this.numOfCards>=this.maxCards&&(this.numOfCards=0,this.isPreventScroll=!0,this.isEnableLateRender=!0,this.preventScrollBelowAnchor()),this.stopListenToBatch||this.stopListenToScrollForPrevent()}listenToScrollForPrevent(){this.onScrollForPrevent=this.observeScrollForPrevent.trcBind(this),TRC.dom.on(window,"scroll",this.onScrollForPrevent),this.stopListenToBatch=!1}stopListenToScrollForPrevent(){TRC.dom.off(window,"scroll",this.onScrollForPrevent),TRC.dom.off(document,"keydown",this.onEndKeyOnPreventScroll),this.stopListenToBatch=!0,clearTimeout(this.timeout)}observeScrollForPrevent(){const e=(new Date).getTime();if(e-this.scrollEventTime<this.scrollThrottleTime)return;const t=TRC.dom.getScrollTop(window),r=this.prevPosition>t,i=this.infiniteScrollEngine.parentContainerId,o=document.getElementById(`${i}-pl${this.infiniteScrollEngine.numPlacements-1}`).scrollHeight,n=window.innerHeight-o/1.5,a=TRC.PreventReachingTheFooter.getOffsetFromTopOfPage(this.loadNextBatchAnchorContainer),s=a<t+n;if(!r&&s&&this.shouldPreventScrolling){const e=a-n;window.scrollTo(TRC.PreventReachingTheFooter.getWindowScrollLeft(),e),this.timeoutEnabled||this.enableScrollBelowAnchorOnTimeout()}this.prevPosition=TRC.dom.getScrollTop(window),this.scrollEventTime=(new Date).getTime()}enableScrollBelowAnchorOnTimeout(){this.timeout=setTimeout(()=>{this.shouldPreventScrolling=!1},this.scrollTimeoutLength),this.timeoutEnabled=!0}preventScrollBelowAnchor(){this.shouldPreventScrolling=!0,clearTimeout(this.timeout),this.timeoutEnabled=!1}static getWindowScrollLeft(){return window.scrollX?window.scrollX:document.documentElement.scrollLeft}static getOffsetFromTopOfPage(e){return e.getBoundingClientRect().top+window.pageYOffset}listenToKeysOnPreventScroll(){this.onEndKeyOnPreventScroll=this.endKeyHandlerOnPreventScroll.trcBind(this),TRC.dom.on(document,"keydown",this.onEndKeyOnPreventScroll)}endKeyHandlerOnPreventScroll(e){const t=e||window.event,{keyCode:r,metaKey:i}=t;(35===r||i&&40===r)&&window.scrollTo(0,TRC.PreventReachingTheFooter.getOffsetFromTopOfPage(this.loadNextBatchAnchorContainer)-window.innerHeight)}shouldLateRender(e){return this.isFastScroller&&this.isEnableLateRender&&e<this.lateRenderTimeout}preparePreventScroll(e){this.trcResponseTime=(new Date).getTime();const t=this.trcResponseTime-this.getNextBatchTime;if(!this.shouldLateRender(t))return void this.infiniteScrollEngine.onTrcResponse(e);const r=this.lateRenderTimeout-t;setTimeout(this.infiniteScrollEngine.onTrcResponse.trcBind(this.infiniteScrollEngine,e),r),this.trcResponseTime=null,this.getNextBatchTime=null,this.isWaitToHide=!0,this.isPreventScroll&&(this.listenToScrollForPrevent(),this.listenToKeysOnPreventScroll())}disable(){this.infiniteScrollEngine.hideLoadingSpinner(),this.isPreventScroll=!1,this.stopListenToScrollForPrevent()}static init(e,t){e.preventReachingTheFooter=new TRC.PreventReachingTheFooter({timeout:t.timeout,fastScrollerTime:t.fastScrollerTime,maxCards:t.maxCards,detectCardNumber:t.detectCardNumber,infiniteScrollEngine:e,trcManager:TRCImpl,scrollTimeoutLength:t.scrollTimeoutLength,scrollThrottleTime:t.scrollThrottleTime})}}TRC.PreventReachingTheFooter=e})(),(()=>{const e=5,t=1e3,r=100;class i{constructor(i,o,n,a){this.parentFeed=i,this.trcManager=o,this.options=a,this.container=i.container,this.origContainer=this.container,this.pendingPublisherCardsList=[],this.feedDynamicParameters=this.options.feedDynamicParameters,this.shouldStopFeedOnMissingPublisherCard=this.feedDynamicParameters&&"STOP"===this.feedDynamicParameters.missingPublisherCardFeedStrategy||"STOP"===this.trcManager.global["missing-publisher-card-feed-strategy"],this.shouldSendCardEvents=!(this.feedDynamicParameters&&this.feedDynamicParameters.disableSendingCardEvents||this.trcManager.global["disable-sending-card-events"]),this.publisherCardMaxRetries=o.global["feed-split-max-retries"]||e,this.publisherCardRetryInterval=o.global["feed-split-retry-interval"]||t,this.feedCardEventsMaxRetries=o.global["feed-card-events-max-retries"]||e,this.feedCardEventsRetryInterval=o.global["feed-card-events-retry-interval"]||t,this.feedCardEventsMinContainerHeight=o.global["feed-card-events-min-container-height"]||r}handlePendingPublisherCards(e=0,t,r,i){const o=(r=r||this.pendingPublisherCardsList[0]).trcResponse,n=i?"spl":"pcp",a=o[n],s=a.tps,l=a.sun||a.pun;let c,d=!1;try{c=document.querySelector(s)}catch(e){__trcWarn(`Exception while trying to find publisher card with selector ${s}: ${e}`),d=!0}if(!c||!c.parentNode)return this.parentFeed.setIsAllowedToRequestMoreContent(!1),void(e<this.publisherCardMaxRetries&&!d?(e++,setTimeout(this.handlePendingPublisherCards.trcBind(this,e,t,r,i),this.publisherCardRetryInterval)):(e=0,this.pendingPublisherCardsList.shift(),this.pendingPublisherCardsList.length?setTimeout(this.handlePendingPublisherCards.trcBind(this,e,t,this.pendingPublisherCardsList[0],i),this.publisherCardRetryInterval):(i||this.shouldStopFeedOnMissingPublisherCard?this.parentFeed.stopScrolling():(this.pendingPublisherCardsList=[],this.parentFeed.setIsAllowedToRequestMoreContent(!0),TRC.dispatch("resumeFeedRendering")),TRC.modDebug.logMessageToServer(1,`Load publisher card: ${l} on Card: ${t} with the anchor element selector: ${s} failed after ${this.publisherCardMaxRetries} retries`,{idx:"pc",pc:l,st:0,sel:s,slot:t,plat:this.trcManager.getPlatformCode()}))));this.createFeedContainerForResumeAfterPublisherCard(c,a),this.shouldSendCardEvents&&!i&&this.pendingPublisherCardsList.forEach(this.initCardEventsManager.trcBind(this)),TRC.modDebug.logMessageToServer(2,`Load publisher card: ${l} on Card: ${t} with the anchor element selector: ${s} succeed`,{idx:"pc",pc:l,st:1}),this.pendingPublisherCardsList=[],this.parentFeed.setIsAllowedToRequestMoreContent(!0);const{expandOptions:p}=r;p&&(c.id=c.id?c.id:`${Math.floor(2147483648*Math.random()).toString(36)}`,c.expandableBox=new TRC.ExpandableBox(this.trcManager,c.id,p)),e>0&&TRC.dispatch("resumeFeedRendering")}initCardEventsManager(e,t=0){const r=e.trcResponse.pcp.tps,i=document.querySelector(r);if(!i)return void(t<this.publisherCardMaxRetries&&(t++,setTimeout(this.initCardEventsManager.trcBind(this,e,t),this.feedCardEventsRetryInterval)));const o=new TRC.CardEventsManager(this.trcManager,this.options,e,i);this.checkIfCardRendered(o,i)}createFeedContainerForResumeAfterPublisherCard(e,t){const r=document.createElement("div"),o=this.parentFeed.container;if(this.parentFeed.numContainers++,this.parentFeed.switchMainContainer(r),this.parentFeed.setMainContainerCssClassesAndAttributes(r,this.options),e.parentNode.insertBefore(r,e.nextElementSibling),t&&(TRC.util.isTrue(t.scw)||TRC.util.isTrue(t.acw))&&(this.setPublisherCardContainerStyle(r),TRC.dom.on(window,"resize",this.setPublisherCardContainerStyle.trcBind(this,r))),i.sendWarnIfAnchorIsIncorrectlyPositioned(o,e),this.parentFeed.isFullWidthMobileFeed(this.options)){const e=this.parentFeed.getMobileFullWidthMarginsCss(this.parentFeed.numContainers);e&&TRC.dom.injectStyle(e,null)}}static sendWarnIfAnchorIsIncorrectlyPositioned(e,t){const r=t.getBoundingClientRect().top,i=e.getBoundingClientRect().top;r<i&&__trcWarn("anchor element is above the original feed container")}static getContainerWidth(e){return getComputedStyle(e).width}getPageDirection(){return"rtl"===this.trcManager.direction?"right":"left"}setPublisherCardContainerMargin(e){const t=this.getPageDirection(),r=this.origContainer.getBoundingClientRect()[t],i=e.getBoundingClientRect()[t];let o,n=1;if(r===i)return;"right"===t?(o="marginRight",n=-1):o="marginLeft";const a=parseInt(getComputedStyle(e)[o],10),s=r-i,l=(s+a)*n;e.style[o]=`${l}px`}setPublisherCardContainerStyle(e){const t=i.getContainerWidth(this.origContainer),r=i.getContainerWidth(e),{feedDynamicParameters:o}=this.options,n=o&&o.disableFeedSplitContainerAlignment||this.trcManager.global["disable-feed-split-container-alignment"],a=t===r;a&&n||(a||(e.style.width=t),n||this.setPublisherCardContainerMargin(e))}registerPublisherCardForHandling(e){this.pendingPublisherCardsList.unshift(e)}checkIfCardRendered(e,t,r=0){t.getBoundingClientRect().height<this.feedCardEventsMinContainerHeight?r<this.feedCardEventsMaxRetries&&(r++,setTimeout(this.checkIfCardRendered.trcBind(this,e,t,r),this.feedCardEventsRetryInterval)):e.handleRenderedCard(t)}}TRC.PublisherCardsManager=i})(),(()=>{const e="trc-w2f",t="trc-w2f-no-ui";class r{constructor(e,t,r){this.parentFeed=e,this.trcManager=t,this.hasFeedUI=r,this.setUpFeedContainer(),TRC.listen("trcResponseHandled",this.setContentTypeCssClass.trcBind(this))}setUpFeedContainer(){const r=this.parentFeed.container;r.className+=` ${e}`,!1===this.hasFeedUI&&(r.className+=` ${t}`)}setContentTypeCssClass(){const e=this.parentFeed.container,t=e.querySelectorAll(".videoCube.syndicatedItem").length,r=e.querySelectorAll(".videoCube:not(.syndicatedItem)").length;let i="sponsored";r&&(i=t?"hybrid":"organic"),this.parentFeed.container.className=this.parentFeed.container.className.replace(/\btrc-content-(hybrid|sponsored|organic)\b/g,""),this.parentFeed.container.className+=` trc-content-${i}`}addHeaderToFeed(e){this.parentFeed.header.appendChild(e),this.header=e}addFooterToFeed(e){this.footer=document.createElement("div"),this.footer.className="tbl-feed-footer",this.footer.appendChild(e),this.parentFeed.container.appendChild(this.footer)}getHeader(){return this.header}getFooter(){return this.footer}applyWidgetHeaderAndFooterStylesToFeed(t){if(this.headerAndFooterStylesApplied)return;const r=new RegExp(`(\\.${t})([^{]+\\.(trc_rbox_header|logoDiv|trc-widget-footer))`,"g"),i=new RegExp(`^(?![^}]*.${e}[^{]+).*$`,"gm");TRC.dom.injectedStyles.forEach(t=>{if(!r.test(t.innerText))return;let o=t.innerText.replace(r,`.${e}$2`);o=(o=(o=(o=o.replace(/\n/g,"")).replace(/}/g,"}\n")).replace(i,"")).replace(/\n/g,""),TRC.dom.injectStyle(o,document)}),this.headerAndFooterStylesApplied=!0}}TRC.WidgetToFeedHelper=r})(),(()=>{const e={TABOOLA_REMINDER:{name:"taboola_reminder",responseKey:"taboola-reminder",contentElementId:"tbl-taboola-reminder-inner",moduleFileName:"taboola-reminder",moduleClass:"TaboolaReminder",closeBtn:"tbl-taboola-reminder-closeBtn",closeBtnWrapper:"tbl-taboola-reminder-closeBtn-wrapper"},NEXT_UP:{name:"next_up",responseKey:"next-up-widget",contentElementId:"tbl-next-up-inner",moduleFileName:"next-up-widget",moduleClass:"NextUpWidget",closeBtn:"tbl-next-up-closeBtn",closeBtnWrapper:"tbl-next-up-closeBtn-wrapper"}};class t{constructor(e,r,i){t.isFloatingUnitOn?__trcWarn("Floating Unit: Trying To Add More Than One Floating Unit"):(t.isFloatingUnitOn=!0,this.formattedResponse=e,this.placementData=r,this.trcManager=i,this.videoList=this.formattedResponse.trc["video-list"],this.unit=t.getUnitByResponseKey(this.videoList),this.contentSelector=`#${this.unit.contentElementId}`,this.sendSupplyEvent("RENDERED"),this.initFloatingUnit())}sendSupplyEvent(e,t=null,r=null){const i={event_type:this.unit.name,event_state:e,event_value:t,event_msg:r};TRCImpl.sendEvent("supply-feature",{d:JSON.stringify(i)},null)}static getUnitByResponseKey(t){let r;return Object.keys(e).some(i=>{const o=e[i];return!!t[o.responseKey]&&(r=o,!0)}),r}initFloatingUnit(){this.createElementForFloatingUnitContent(),this.setFloatingUnitOptions(),this.definePlacementDataContainerSelector(),this.lazyLoadModules()}definePlacementDataContainerSelector(){this.placementData["container-selectors"]=[{container:this.contentSelector,location:"first",shouldCreateContainer:!0,isFloatingUnit:!0}]}setFloatingUnitOptions(){this.floatingUnitOptions=this.videoList[this.unit.responseKey]||{},this.floatingUnitOptions.unit=this.unit}setNextUpSpecificOptions(){this.floatingUnitOptions.nupOverlayConfig=this.trcManager.global["nup-overlay-config"]?JSON.parse(this.trcManager.global["nup-overlay-config"]):{}}lazyLoadModules(){TRC.ModuleLoader.load("floating-unit",TRC.FloatingUnit,(()=>{this.lazyLoadChildClass()}).trcBind(this))}lazyLoadChildClass(){this.unit.responseKey===e.NEXT_UP.responseKey&&this.setNextUpSpecificOptions(),TRC.ModuleLoader.load(this.unit.moduleFileName,TRC[this.unit.moduleClass],(()=>{const e=TRC[this.unit.moduleClass];new e(this.floatingUnitOptions,this.trcManager,this.contentElement,this.placementData),this.trcManager.initRBoxDrawingIfPlacementEligible(this.placementData)}).trcBind(this))}createElementForFloatingUnitContent(){const e=document.createElement("div");e.id=this.unit.contentElementId,e.className=this.unit.contentElementId,TRC.dom.addClass(e,"tbl-hidden"),this.contentElement=document.body.appendChild(e)}static isFloatingUnit(e){return e&&!!t.getUnitByResponseKey(e)}}t.isFloatingUnitOn=!1,TRC.FloatingUnitGenerator=t})(),function(){var t=1000075,r={},i="",o;function n(e,n,a,s,p){var h;i=l(),o=TRCImpl.additional_data&&TRCImpl.additional_data.sdkd||{};var m=c(),g=s.global["fraud-detection-script-url"]||"https://js.ad-score.com/score.min.js?pid="+t+"#",b=r={tid:d(),l1:e,l4:a,uid:n,tt:"g",pub_domain:m,ref:a};o.appid?b["l3"]=b["pub_app"]=o.appid:b["l3"]=TRC.platform_code,h=TRC.URL.prototype.switchProtocol.call(g,TRC.PROTOCOL)+TRC.util.keys(b).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(b[e])}).join("&"),this.isInitialized=!0,u(h,{impressionUTID:{enabled:!0===s.global["fraud-enable-impression-utid"],publisherId:e,userId:n,viewId:p}})}function a(i,o,n,a,s,l){setTimeout(function(){try{if(TRC.clickFraudDetect.isLoaded){var c={},d=TRC.clickFraudDetect.impressionUTID;TRC.util.keys(r).forEach(function(e){c[e]=r[e]}),c["pid"]=""+t,c["l2"]=i,c["l3"]=c["l3"]||TRC.platform_code,c["l4"]=a,c["l5"]=s,c["l6"]="clicked",c["uid"]=o,c["utid"]=d?d+"_"+n:n,c["isTRCUrl"]=l,adScore("send","adclick",{},c)}else __trcWarn("Fraud script did not render",e)}catch(e){__trcWarn("fraudScriptCallback: Error in fraud detection",e)}},0)}function s(){return TRC.MobileSdk.isEnabled()}function l(){if(!s())return TRC.isAMP&&window.context&&window.context.canonicalUrl||TRC.pageManager.getTopMostWindow().location.href;var e=TRC._taboolaClone&&TRC._taboolaClone.filter(function(e){return!!e.url});return e&&e.url||window.location.href}function c(){var e=document.createElement("a");return e.href=i||l(),e.hostname}function d(){return s()?"_InAPP":"PHON"===TRC.platform_code?"_MW":"_Desktop"}function p(e){TRC.clickFraudDetect.isLoaded=!0,__trcWarn("protected media: onFraudScriptLoaded"),e.impressionUTID.enabled&&h(e.impressionUTID)}function h(e){var r=[e.viewId,e.publisherId,e.userId].join("-");if(e.publisherId&&e.userId&&e.viewId)try{window.adScore("set","utid",{},{pid:t,utid:r}),TRC.clickFraudDetect.impressionUTID=r}catch(e){__trcError("Failed to set fraud UTID on impression",e)}else __trcError("Error in clickFraudDetect.setImpressionUTID: missing parameters")}function u(e,t){if(__trcWarn("protected media: loadFraudScript"),!TRC.botDetected)try{TRC.net.loadScript(e,"js",p.bind(null,t),null,!0)}catch(e){__trcWarn("loadFraudScript: Error appending fraud script",e)}}TRC.clickFraudDetect={init:n,fraudScriptCallback:a,isInitialized:!1,isLoaded:!1,impressionUTID:null}}(),TRC.util=function(win,doc){var modObject={isType:function(e,t){return t=t.charAt(0).toUpperCase()+t.substr(1),Object.prototype.toString.call(e)=="[object "+t+"]"},hasKeys:function(e){var t;if(this.isType(e,"object"))if(Object.keys&&!Object.propertyIsEnumerable("keys")){if(Object.keys(e).length>0)return!0}else for(t in e)if(e.hasOwnProperty(t))return!0;return!1},getRandomIds:function(e){for(var t=0;t<e.len;t++)e.arr[t]=e.prefix+Math.floor(Math.random()*Math.pow(10,e.strength)+1)+e.suffix},getHtmlDecodeText:(element=doc.createElement("div"),decodeSpecialCharacters=function(){var e={amp:"&",apos:"'","#x27":"'","#x2F":"/","#39":"'","#47":"/",lt:"<",gt:">",nbsp:" ",quot:'"'},t=/&(#(?:x[0-9a-f]+|\d+)|[a-z]+);?/gi;function r(t,r){return"#"===r[0]?String.fromCharCode("x"===r[1].toLowerCase()?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):e[r]||t}return function(e){return e.replace(t,r)}}(),function(e){if("string"!=typeof e)return"";if(!TRC.dom.isHtmlContent(e))return e;var t=decodeSpecialCharacters(e);return TRC.dom.isHtmlContent(t)?(element.innerHTML=encodeURI(e),t=element.textContent||element.innerText,decodeURI(t)):t}),isEmptyString:function(e){return!e||/^\s*$/.test(e)},keys:function(){"use strict";if(Object.keys)return function(e){return"object"==typeof e||"function"==typeof e&&null!==e?Object.keys(e):[]};var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=r.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))return[];var n=[],a,s;for(a in o)e.call(o,a)&&n.push(a);if(t)for(s=0;s<i;s++)e.call(o,r[s])&&n.push(r[s]);return n}}(),merge:function(e){"use strict";if(void 0===e||null===e)return null;for(var t=TRC.util,r=1;r<arguments.length;r++){var i=arguments[r];if(void 0!==i&&null!==i)for(var o=t.keys(i),n=0,a,s=o.length;n<s;n++)e[a=o[n]]=i[a]}return e},debounce:function(e,t,r,i){var o;return function(){var n=i||window,a=arguments,s=function(){o=null,r||e.apply(n,a)},l=r&&!o;clearTimeout(o),o=setTimeout(s,t),l&&e.apply(n,a)}},retry:function(e,t,r,i){var o=0,n=!1;return function a(){setTimeout(function(){n=e.apply(e,i),++o<r&&!n&&a()},t)}},preprocessJsonString:function(e){return"string"!=typeof e?"":([{regex:/({|\[)\s*'/g,replace:'$1"'},{regex:/'\s*(:|}|,|\])/g,replace:'"$1'},{regex:/(:|,)\s*'/g,replace:'$1"'},{regex:/(?:([^"\s:\[{,])"([^"\s:,\]}]))/g,replace:'$1\\"$2'}].forEach(function(t){e=e.replace(t.regex,t.replace)}),e);var t},jsonParseWithNative:function(e){try{return JSON.parse(e)}catch(t){return TRC.util.jsonParseWithEval(e)}},jsonParseCustomNative:function(e){if(win.TRCImpl&&win.TRCImpl.global&&TRC.util.isTrue(TRCImpl.global["enable-json-parse-preprocess"]))try{return JSON.parse(TRC.util.preprocessJsonString(e))}catch(t){return __trcWarn("JSON Preprocess failed: '"+e+"'"),null}return TRC.util.jsonParseWithEval(e)},jsonParseWithEval:function(text){try{return eval("("+String(text)+")")}catch(e){throw new Error("JSON parse error - invalid input!")}},jsonParseSafe:function(e,t){try{return"string"==typeof e?JSON.parse(e):e}catch(r){return __trcDebug("invalid json in: "+(t?e[t]:e)),{}}},isNativeFunction:function(e){return/\{\s*\[native code\]\s*\}/.test(""+e)},filterObj:function(e,t){var r={};for(var i in t)t.hasOwnProperty(i)&&e.call(this,t[i],i,t)&&(r[i]=t[i]);return r},textIsRTL:function(e){if(!e)return!1;var t="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜︀-﹯﻽-￿",r="֑-߿יִ-﷿ﹰ-ﻼ",i=e.match(new RegExp("^[^"+t+r+"]*(?:(["+t+"]+)|(["+r+"]+))"));return!(!i||!i[2])},isArray:function(e){return!(!e||Array!==e.constructor)},toArray:function(e){return[].slice.call(e)},map:function(e,t,r){if(Array.prototype.map)return e.map(t,r);var i,o,n;if(null==e)throw new TypeError(" array is null or not defined");var a=Object(e),s=a.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(i=r),o=new Array(s),n=0;n<s;){var l,c;n in a&&(l=a[n],c=t.call(i,l,n,a),o[n]=c),n++}return o},isTrue:function(e){return"true"===e||!0===e||"1"===e},isFalse:function(e){return!e||"false"===e},isDefined:function(e){return void 0!==e},isNotDefined:function(e){return void 0===e||null===e},isEnabledByDefault:function(e){return!TRC.util.isDefined(e)||TRC.util.isTrue(e)},getPositiveNumber:function(e,t){var r=Number(e);return r>0?r:t},isNumber:function(e){if(TRC.util.isType(e,"string")){if(!e.trim())return!1}else if(!TRC.util.isType(e,"number"))return!1;return e-e+1>=0},parseTimeout:function(e,t){var r;return t=void 0!==t?t:-1,void 0!==e?parseInt(e,10):t},splitUrlParts:(linkElement=document.createElement("a"),function(e){return e?(linkElement.href=e,{search:linkElement.search}):{}}),hashString:function(e){var t=0;if(0==e.length)return t;for(var r=0;r<e.length;r++){var i;t=(t<<5)-t+e.charCodeAt(r),t&=t}return t},isPercentEnabled:(flags={},window._trcIsUTactive&&(TRC._rolledFlagsByPercent=flags),function(e,t){if(void 0===flags[t]||null===flags[t]){var r=Math.random();flags[t]="true"===e[t]||r<=+e[t]}return flags[t]}),haveMutualKeys:function(e,t){if(!(e&&TRC.util.hasKeys(e)&&t&&TRC.util.hasKeys(t)))return!1;var r=TRC.util.merge({},e,t);return Object.keys(r).length<Object.keys(e).length+Object.keys(t).length},objectForEach:function(e,t){Object.keys(e).forEach(function(r){t(r,e[r])})},isAmp:function(e){return!!e.isAMP},isMobileSDK:function(e){return!(!e.mobile||!e.mobile.reportClick)},isRboxEncapsulated:function(e){return!(!this.isAmp(e)&&!this.isMobileSDK(e))},formatString:function(e,t){var r;return r=t&&0!==t.length?e.replace(/\{(\d+)\}/g,function(e,r){var i=r[0];return void 0!==t[i]?t[i]:e}):e},addSupportForGoogleFonts:function(){var e;(TRCImpl&&TRCImpl.global["google-fonts"]||[]).forEach(function(e){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css");var r="https://fonts.googleapis.com/css2?family="+e+":ital,wght@0,100;0,200;"+"0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;"+"1,900&display=swap";t.setAttribute("href",r),document.head.appendChild(t)})},getFeatureFlagData:function(e){return win.TRCImpl&&win.TRCImpl.global?win.TRCImpl.global[e]:null},isMixpanelEventDisabled:function(e){var t=this.getFeatureFlagData("disabled-mixpanel-events");return!!t&&(t=t.map(function(e){return e.toUpperCase()})).indexOf(e.toUpperCase())>-1},sendSupplyFeature:function(e,t,r,i,o,n,a,s,l){if("string"==typeof e&&"string"==typeof t){var c={event_type:e,event_state:t,event_value:"string"==typeof i?i:"",event_msg:"string"==typeof r?r:"",event_key:"string"==typeof o?o:""};"function"==typeof win.TRCImpl.sendEvent&&win.TRCImpl.sendEvent("supply-feature",{d:win.__trcJSONify(c)},n,a,s,l)}},generateUid:function(e){for(var t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=r.length,o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t},getCookieByName:function(e){for(var t=e+"=",r,i=("; "+document.cookie).split(";"),o=0;o<i.length;o++)for(var n=i[o];" "===n.charAt(0);)if(0===(n=n.substring(1,n.length)).indexOf(t))return n.substring(t.length,n.length);return null}},flags,linkElement,element,decodeSpecialCharacters;return modObject}(window,document),window.__trcCopyProps=function(e,t,r){for(i in e)t[i]=e[i];if(r)for(var i in r)t[i]=r[i];return t},window.__trcFromError=function(e){return TRC.Browser.ie&&e.message?e.message+"["+e.number+": "+e.name+"]":e.message?e.message+(e.fileName?e.fileName+":"+e.lineNumber:""):e},window.__trcClientTimestamp=function(){var e=new Date,t=e.getHours(),r=e.getMinutes(),i=e.getSeconds()+e.getMilliseconds()/1e3;return(t<10?"0":"")+t+":"+(r<10?"0":"")+r+":"+(i<10?"0":"")+i.toFixed(3)},window.__trcLog=function e(t,r,i,o,n){function a(e){return e&&e.stack&&window.TRCImpl&&TRC.util&&TRC.util.isPercentEnabled(window.TRCImpl.global,"rbox-error-stack-reporting-pct")}function s(){return window.TRCImpl&&TRC.util&&0===t&&TRC.util.isPercentEnabled(window.TRCImpl.global,"rbox-error-fullUrl")}function l(){var e=TRCImpl&&TRCImpl.global["rbox-err-url-max-length"]||250,t=window.location.href.substr(0,e);return TRC.util.isAmp(TRC)&&context&&context.data&&(t=context&&context.data.url),t}function c(e,t){return Math.random()<=+t&&(e<=window.trc_debug_level||document.cookie&&document.cookie.search("taboola-debug")>0)}if(TRC.pConsole("page",TRC.modDebug.getType(t),r,r),"0"==t&&TRC.pConsole("errors",TRC.modDebug.getType(t),r,r),!(window.trc_debug_level<t)){"object"==typeof window.console&&console.log(r);try{if((isNaN(o)||null===o)&&(o=1),c(t,o)){var d={pct:o};if(a(i)){var p=TRCImpl&&TRCImpl.global["rbox-err-stack-max-length"]||250;d.errStack=i.stack.substr(0,p)}s()&&(d.fullUrl=l()),TRC.modDebug.logMessageToServer(t,r,d,n)}}catch(e){}}},window.__trcError=function(e,t,r){__trcLog(0,e+(t?": "+__trcFromError(t):""),t,r),t&&t.stack&&void 0!==window.console&&console.trace&&console.trace()},window.__trcDebug=function(e,t,r){__trcLog(3,e,t,r)},window.__trcInfo=function(e,t,r){TRC.util.isPercentEnabled(TRCImpl.global,"trcinfo-sample-rate")&&__trcLog(2,e,t,r)},window.__trcWarn=function(e,t,r){__trcLog(1,e+(t?"("+t+")":""),t,r)},window.__trcWarnUsingBeacon=function e(t,r,i){__trcLog(1,t+(r?"("+r+")":""),r,i,!0)},window.__trcDOMWalker=function(e,t){for(t(e),e=e.firstChild;e;)arguments.callee(e,t),e=e.nextSibling},window.__trcJSONify=function(e){return window.JSON.stringify(e)},window.__trcUnJSONify=function(e){try{return"string"==typeof e?TRC.util.jsonParseWithNative(e):e}catch(t){throw new Error("JSON parse update error - invalid input! "+e)}},void 0===document.trcGetCurrentStyle&&(document.trcGetCurrentStyle=function(e,t,r){if("string"==typeof e&&(e=document.getElementById(e)),window.getComputedStyle){var i=window.getComputedStyle(e,r);return i?i.getPropertyValue(t):r?null:e.style[t]}return t=t.replace(/-(\w)/,function(e,t){return t.toUpperCase()}),e.currentStyle[t]}),window.__trcTrim=function(e){return e.replace(/^\s+|\s+$/g,"")},window.__trcGetElementsByClass=function(e,t,r){var i=[],o=new RegExp("(^|\\s)"+e+"(\\s|$)"),n,a,s;for(r=r||document,t=t||"*",a=(n=r.getElementsByTagName(t)).length,s=0;s<a;s++)o.test(n[s].className)&&i.push(n[s]);return i},window.__trcToArray=function(e,t){var r;for(r in e)e.hasOwnProperty(r)&&t.push([r,e[r]])},window.__trcObjectCreate=function(e){if("function"==typeof Object.create)return Object.create(e);var t=function(){};if(e!==Object(e)&&null!==e)throw TypeError("Argument must be an object, or null");t.prototype=e||{};var r=new t;return t.prototype=null,null===e&&(r.__proto__=null),r},Function.prototype.trcBind||(Function.prototype.trcBind=Function.prototype.bind),void 0===Function.prototype.trcThrottle&&(Function.prototype.trcThrottle=function(e){var t,r=this;return function(){var i=arguments;t&&clearTimeout(t),t=setTimeout(function(){r.apply(r,i)},e)}}),void 0===document.head&&(document.head=document.getElementsByTagName("head")[0]),TRC.GoogleAds=function(){return"object"==typeof window.console&&console.log("TRC.GoogleAds is Deprecated"),{draw:function(){}}},TRC.math=TRC.math||function(e,t){function r(e,t,r){return void 0===r||0==+r?Math[e](t):(t=+t,r=+r,isNaN(t)||"number"!=typeof r||r%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-r:-r)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+r:r))))}return{roundByDecimal:function e(t,r){var i=t/r,o=i.toFixed(0),n=i-o;return o*r+r*Math.round(n)},round10:function(e,t){return r("round",e,t)}}}(window,document),(()=>{const e="trc_rbox_div",t="videoCube",r="item-thumbnail-href",i="item-label-href";class o{constructor(e){this.trcManager=e,this.itemAppearanceTime={}}static isEnabled(e){return TRC.util.isPercentEnabled(e.global,"enable-rbox-heatmap")}captureItemTime(e){this.itemAppearanceTime[e]=Date.now()}captureAndSendClickData(n){if(!c(n)||s(n))return;const a=o.collectClickHeatmapCardData(n);function s(e){return TRC.dom.closest(e.target,`a.${r}`)||TRC.dom.closest(e.target,`a.${i}`)}function l(e){return TRC.dom.closest(e.target,`.${t}`)}function c(t){return TRC.dom.closest(t.target,`.${e}`)}l(n)&&(a["item-d"]=this.collectClickHeatmapItemData(n)),this.trcManager.sendEvent("heatmap",{d:JSON.stringify(a)},{})}static collectEventTargetData(r,i){const n=i?e:t,a=TRC.dom.containsClass(r.target,n),s=a?r.target:TRC.dom.closest(r.target,`.${n}`),l=s.getClientRects()[0],c=a?{x:0,y:0}:r.target.getClientRects()[0],[d,p]=o.getClickPoints(r,c),h=a?d:Math.abs((c.x||c.left)-(l.x||l.left))+d,u=a?p:Math.abs((c.y||c.top)-(l.y||l.top))+p;return{el:s,x:h,y:u,h:l.height,w:l.width}}static collectClickHeatmapCardData(e){const t=o.collectEventTargetData(e,!0);return{x:t.x,y:t.y,h:t.h,w:t.w,"c-time":Math.floor(e.timeStamp)}}collectClickHeatmapItemData(e){const t=o.collectEventTargetData(e,!1),r=this.itemAppearanceTime[t.el.video_data.id],i={x:t.x,y:t.y,h:t.h,w:t.w,slot:t.el.video_data.itemIndex,"ap-time":r};return i}static getClickPoints(e,t){if(r(e)){const r={x:t.x||t.left,y:t.y||t.top};return[e.touches[0].clientX-r.x,e.touches[0].clientY-r.y]}return[e.offsetX,e.offsetY];function r(e){return e.touches}}}TRC.Heatmap=o})(),(()=>{let e,t=.1,r=.3,i=!1;const o={},n=["4","254"],a=function({mybox:e,containerElm:i}){o[e.id]=e;const n=!(!e.trcResponse||!e.trcResponse.vtag)&&e.trcResponse.vtag,a=!!n.advancedVideoConfiguration&&n.advancedVideoConfiguration;if(!n||!s(n.unitType,a))return!1;if(a){const e=a["mid-article-hip-rbox-percent-inview-to-report"],i=a["mid-article-hip-min-percent-to-display"];t=e?Number(e):t,r=i?Number(i):t}l(e.id,i),i.classList.add("tbl-invisible"),TRC.listen("noAdjacInFirstWF",t=>{e.trcResponse.scac&&(TRC.trcHipCloseUnit=TRC.trcHipCloseUnit?TRC.trcHipCloseUnit:{},TRC.trcHipCloseUnit[t.data]=!0),TRCImpl.sendAbTestEvent("HipLostNoAdjacInFirstWF","HipLost"),p(t.data)})},s=(e,t)=>(!t||"true"!==t["mid-article-hip-opt-out"])&&-1!==n.indexOf(e.toString()),l=(e,t)=>{c(e,t),d(e,t)},c=(r,i)=>{const o=[];for(let e=10*t;e<=10;e++){const t=e/100;o.push(t)}const n={targetElement:i,threshold:o,onEnter:u.trcBind(this,r)};e=TRC.intersections.observe(n)},d=(e,t)=>{const i={targetElement:t,threshold:[r],onEnter:h.trcBind(this,e),disableDuplicatePrevention:!0},o=TRC.intersections.observe(i);TRC.listen("adjacAdPlaying",m.trcBind(this,o)),TRC.listen("rBoxVisible",m.trcBind(this,o))},p=e=>{const{container:t}=o[e];t.classList.remove("tbl-invisible"),TRC.dispatch("rBoxVisible",e),TRC.trcHipContainersShowing=TRC.trcHipContainersShowing?TRC.trcHipContainersShowing:{},TRC.trcHipContainersShowing[e]=!0},h=(e,t)=>{TRCImpl.sendAbTestEvent("HipLostRboxInViewPort",Math.floor(100*t.intersectionRatio)),p(e)},u=(r,o)=>{o.intersectionRatio>t&&!i?(i=!0,TRCImpl.sendAbTestEvent("rboxViewPortIntersection",Math.floor(100*o.intersectionRatio))):o.intersectionRatio<t&&i&&(TRCImpl.sendAbTestEvent("rboxOutOfViewPort",Math.floor(100*o.intersectionRatio)),m(e))},m=e=>{TRC.intersections.unobserve(e)};TRC.HighImpactPlacement={handleHighImpactPlacement:a},window._trcIsUTactive&&(TRC.HighImpactPlacement.reportRboxInViewPort=u,TRC.HighImpactPlacement.checkIfHIP=s),TRC.listen("beforeBoxRender",a)})(),function(){var e="trc_vp_els",t=5;function r(e){this.trcManager=e,this.sessionStorage=TRC.pageManager.getLocalStorageImplementation("strict-w3c-storage","session"),this.lastViewportElementData=this.getVPElementsHistory()[e.getItemId()],e.trcCache.enableCacheViaStorageFlag()}r.prototype.trackElement=function(e){TRC.dom.on(e,"click",this.storeElementPosition.trcBind(this,e))},r.prototype.scrollToElementIfWasLastInViewPort=function(e){var t,r=this.trcManager;this.lastViewportElementData&&e.id===this.lastViewportElementData.id&&(delete(t=this.getVPElementsHistory())[this.trcManager.getItemId()],this.storeVPElementsHistory(t),"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),setTimeout(function(){e.scrollIntoView(!1);var t={abTestsEventType:"simple",name:"backToFeed_backToCard",type:__trcJSONify({origViewId:e.placementData.cachedViewId,viewId:TRC.pageManager.getPageData(),placement:e.getAttribute("data-placement-name"),cardIndex:e.getAttribute("data-card-index")}),eventTime:(new Date).getTime()};r.sendEvent("abtests",{"unescape-d":encodeURIComponent(__trcJSONify(t))},null,!1,null,null)},0))},r.prototype.storeElementPosition=function(e){var t=this.getVPElementsHistory();t[this.trcManager.getItemId()]={id:e.id,s:(new Date).getTime()};var r={abTestsEventType:"simple",name:"backToFeed_exitFromCard",type:__trcJSONify({viewId:TRC.pageManager.getPageData(),placement:e.getAttribute("data-placement-name"),cardIndex:e.getAttribute("data-card-index")}),eventTime:(new Date).getTime()};this.trcManager.sendEvent("abtests",{"unescape-d":encodeURIComponent(__trcJSONify(r))},null,!1,null,null),this.storeVPElementsHistory(t)},r.prototype.storeVPElementsHistory=function(t){t=this.removeEntriesToLimit(t),this.sessionStorage.setValue(e,__trcJSONify(t))},r.prototype.getVPElementsHistory=function(){var t=this.sessionStorage.getValue(e)||"{}";return TRC.util.jsonParseWithNative(t)},r.prototype.removeEntriesToLimit=function(e){var r={},i;if(TRC.util.keys(e).length<=t)return e;for(var o in e)e.hasOwnProperty(o)&&(r[e[o].s]=o);for((i=TRC.util.keys(r)).sort();i.length>t;)i.shift();for(var n in r)r.hasOwnProperty(n)&&-1===i.indexOf(n)&&delete e[r[n]];return e},TRC.HistoryManager=r}(),(({history:e})=>{function t(){e.back()}function r(){e.forward()}function i(){return e.state}function o(t){e.pushState(t,document.title)}function n(t){e.replaceState(t,document.title)}function a(t){let r=i();null==r&&(r={}),Object.assign(r,t),e.replaceState(r,document.title)}function s(){return"complete"!==window.document.readyState}function l(e,t,r){const o=TRC.Interval.set(()=>{s()||TRC.Interval.clear(o),i()&&t(i())&&(e(),TRC.Interval.clear(o))},r)}function c(e,t){const r=Object.assign({stateCheck:null,stateCheckIntervalTime:200},t||{});TRC.dom.on(window,"popstate",e),s()&&r.stateCheck&&l(e,r.stateCheck,r.stateCheckIntervalTime)}TRC.historyApi={pushState:o,replaceState:n,appendState:a,back:t,forward:r,currentState:i,onPopState:c}})(window),(()=>{const e="https://images.taboola.com/taboola/image/fetch";TRC.imageUtils={firstImageID:"",getImageUrlBasedOnCloudinaryApi(t,r,i=e){const o=this.cloudinaryEncoding(t);return[i,r,o].join("/")},cloudinaryEncoding(e){if(null===e||void 0===e)return"";let t=void 0,r=void 0,i="",o=0;const n=`${e}`,a=n.length;for(t=r=0;o<a;){const e=n.charCodeAt(o);let a=null;e<128?r++:a=e>127&&e<2048?String.fromCharCode(e>>6|192,63&e|128):String.fromCharCode(e>>12|224,e>>6&63|128,63&e|128),null!==a&&(r>t&&(i+=n.slice(t,r)),i+=a,t=r=o+1),o++}return r>t&&(i+=n.slice(t,a)),escape(i)},markLoadPerformance(e){if(!TRC.performance)return;const t=Date.now();this.firstImageID||(this.firstImageID=t),TRC.performance.mark(`imgLoad${t}start`,null,"",t,"imgLoadTime",TRC.PerfEvenType.START),t===this.firstImageID&&TRC.performance.mark("firstImgLoadstart",null,"","firstImage","firstImgLoadTime",TRC.PerfEvenType.MARK),TRC.dom.on(e,"load",()=>(TRC.performance.mark(`imgLoad${t}stop`,null,"",t,"imgLoadTime",TRC.PerfEvenType.STOP),!0))}}})(),
/** @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function(e,t){"use strict";if("IntersectionObserver"in e&&"IntersectionObserverEntry"in e&&"intersectionRatio"in e.IntersectionObserverEntry.prototype)"isIntersecting"in e.IntersectionObserverEntry.prototype||Object.defineProperty(e.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var r=[];o.prototype.THROTTLE_TIMEOUT=1e3,o.prototype.POLL_INTERVAL=null,o.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections()}},o.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},o.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,r){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==r[t-1]})},o.prototype._parseRootMargin=function(e){var t,r=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return r[1]=r[1]||r[0],r[2]=r[2]||r[0],r[3]=r[3]||r[1],r},o.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this._checkForIntersections(),this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(e,"resize",this._checkForIntersections,!0),s(t,"scroll",this._checkForIntersections,!0),"MutationObserver"in e&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},o.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,l(e,"resize",this._checkForIntersections,!0),l(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},o.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(r){var o=r.element,a=d(o),s=this._rootContainsTarget(o),l=r.entry,c=e&&s&&this._computeTargetAndRootIntersection(o,t),p=r.entry=new i({time:n(),target:o,boundingClientRect:a,rootBounds:t,intersectionRect:c});l?e&&s?this._hasCrossedThreshold(l,p)&&this._queuedEntries.push(p):l&&l.isIntersecting&&this._queuedEntries.push(p):this._queuedEntries.push(p)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},o.prototype._computeTargetAndRootIntersection=function(r,i){var o=e.getComputedStyle(r);if(o&&"none"!==o.display){for(var n,a=d(r),s=u(r),l=!1;!l;){var p=null,h=1==s.nodeType?e.getComputedStyle(s):{};if(!h||"none"===h.display)return;if(s==this.root||s==t?(l=!0,p=i):s!=t.body&&s!=t.documentElement&&"visible"!=h.overflow&&(p=d(s)),p&&!(a=c(p,a)))break;s=u(s)}return a}},o.prototype._getRootRect=function(){var e;if(this.root)e=d(this.root);else{var r=t.documentElement,i=t.body;e={top:0,left:0,right:r.clientWidth||i.clientWidth,width:r.clientWidth||i.clientWidth,bottom:r.clientHeight||i.clientHeight,height:r.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},o.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,r){return"px"==t.unit?t.value:t.value*(r%2?e.width:e.height)/100}),r={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return r.width=r.right-r.left,r.height=r.bottom-r.top,r},o.prototype._hasCrossedThreshold=function(e,t){var r=e&&e.isIntersecting?e.intersectionRatio||0:-1,i=t.isIntersecting?t.intersectionRatio||0:-1;if(r!==i)for(var o=0;o<this.thresholds.length;o++){var n=this.thresholds[o];if(n==r||n==i||n<r!=n<i)return!0}},o.prototype._rootIsInDom=function(){return!this.root||h(t,this.root)},o.prototype._rootContainsTarget=function(e){return h(this.root||t,e)},o.prototype._registerInstance=function(){r.indexOf(this)<0&&r.push(this)},o.prototype._unregisterInstance=function(){var e=r.indexOf(this);-1!=e&&r.splice(e,1)},TRC.IntersectionObserver=o,TRC.IntersectionObserverEntry=i}function i(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,r=t.width*t.height,i=this.intersectionRect,o=i.width*i.height;this.intersectionRatio=r?o/r:this.isIntersecting?1:0}function o(e,t){var r=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(r.root&&1!=r.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=a(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(r.rootMargin),this.thresholds=this._initThresholds(r.threshold),this.root=r.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function n(){return e.performance&&performance.now&&performance.now()}function a(e,t){var r=null;return function(){r||(r=setTimeout(function(){e(),r=null},t))}}function s(e,t,r,i){"function"==typeof e.addEventListener?e.addEventListener(t,r,i||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,r)}function l(e,t,r,i){"function"==typeof e.removeEventListener?e.removeEventListener(t,r,i||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,r)}function c(e,t){var r=Math.max(e.top,t.top),i=Math.min(e.bottom,t.bottom),o=Math.max(e.left,t.left),n=Math.min(e.right,t.right),a=n-o,s=i-r;return a>=0&&s>=0&&{top:r,bottom:i,left:o,right:n,width:a,height:s}}function d(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function p(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function h(e,t){for(var r=t;r;){if(r==e)return!0;r=u(r)}return!1}function u(e){var t=e.parentNode;return t&&11==t.nodeType&&t.host?t.host:t}}(window,document),TRC.intersections=function(e,t){var r=0,i={},o={},n="observeId";function a(){}var s=!1;try{s=!!window.top._tbframe}catch(e){}function l(e,t){if(TRC.util.isArray(e.threshold))for(var r=0;r<e.threshold.length;r++){var i=e.threshold[r];-1===t.indexOf(i)&&t.push(e.threshold)}else-1===t.indexOf(e.threshold)&&t.push(e.threshold)}function c(e,r,i,o){var n,a,l,c,p,h=t;return s&&TRCImpl.global["enable-tbframe-visible-support"]&&(h=i.target&&i.target.ownerDocument||document),e.disableCheckOverlay||r!==TRC.intersections.visibilityState.IN_VIEW_PORT_VISIBLE||(n=w(h,o.centerX,o.centerY),isNaN(e.exactVisibleThresholdFromTop)||(a=h.elementFromPoint(o.centerX,i.boundingClientRect.top+e.exactVisibleThresholdFromTop)),TRC.util.isPercentEnabled(TRCImpl.global,"enable-full-overlay-check")&&(l=h.elementFromPoint(o.centerX,o.top),c=h.elementFromPoint(o.centerX,o.bottom),p=!d(l,i.target)&&!d(c,i.target)),(!d(n,i.target)&&!d(a,i.target)||p)&&(r=TRC.intersections.visibilityState.IN_VIEW_PORT_NOT_VISIBLE,i.intersectionRatio>=1&&null!==n&&TRC.intersections.observePolling(e))),r}function d(e,t){return e&&(e===t||t.contains(e)||"getAttribute"in e&&e.getAttribute("data-tbl-friendly-overlay"))}function p(e,t,r,i){return r.height>=i||e<=r.right&&t<=r.bottom&&t>0}function h(e){var t,r;return d(u(e),e)}function u(e){var r,i=m(e.getBoundingClientRect()),o=i.targetElementCenterX,n=i.targetElementCenterY;return t.elementFromPoint(o,n)}function m(e){return g(e,["mm"]).mm}function g(e,t){var r={};return t.forEach(function(t){r[t]=i(e,t)}),r;function i(e,t){switch(t){case"lt":return o(e,0,0);case"mt":return o(e,.5,0);case"rt":return o(e,1,0);case"lm":return o(e,0,.5);case"mm":return o(e,.5,.5);case"rm":return o(e,1,.5);case"lb":return o(e,0,1);case"mb":return o(e,.5,1);case"rb":return o(e,1,1);default:__trcWarn("intersections.getPointInElementByPosition - pos parameter not recognized. pos is: "+t)}}function o(e,t,r){return{targetElementCenterX:e.left+Math.round((e.right-e.left)*t),targetElementCenterY:e.top+Math.round((e.bottom-e.top)*r)}}}function b(e,t){t===TRC.intersections.visibilityState.IN_VIEW_PORT_VISIBLE&&TRC.intersections.unObservePolling(e)}function f(e,t,r){t.onTrigger(e,t.observer,r,t.lastBoundingClientRect),b(r,t)}function v(e){TRC.Timeout.clear(e.visibleTimeout),delete e.visibleTimeout}function C(e,t,r){var i=TRC.util.isPercentEnabled(TRCImpl.global,"enable-only-full-visible-event"),o=e.visibilityState===TRC.intersections.visibilityState.IN_VIEW_PORT_VISIBLE;i&&!o||t.isEnter&&e.isVisible&&("function"!=typeof t.visibleWidgetPredicate||t.visibleWidgetPredicate())&&(delete e.isVisible,e.visibilityReported=!0,f(e,t,r))}function T(e,t,r){v(e),e.visibilityReported||C(e,t,r)}function y(e,t,r){var i=TRCImpl&&TRCImpl.global["visibility-intersection-api-delay"]||1e3,o=r===TRC.intersections.visibilityState.IN_VIEW_PORT_VISIBLE&&!e.visibleTimeout||TRC.intersections.forceEnableDelayedVisibilityState();t.enableDelayedVisibilityCheck?o&&(e.isVisible=!0,e.lastVisibleBoundingClientRect=t.lastBoundingClientRect,e.lastVisibleBoundingClientRect.pageXOffset=t.geometryOffsets.pageXOffset,e.lastVisibleBoundingClientRect.pageYOffset=t.geometryOffsets.pageYOffset,e.visibleTimeout=TRC.Timeout.set(T.trcBind(this,e,t,r),i)):f(e,t,r)}function R(e,t,r){var i=t.target,o,n,a;e.isEnter=t.isIntersecting,e.isExit=!e.isEnter,e.intersection=t.intersectionRatio,e.isEnter?e.onEnter(t,i,e.observer):e.isExit&&(i.visibleTimeout&&v(i),i.isVisible=!1,e.onExit(t,i,e.observer),TRC.intersections.unObservePolling(e));var s=m(o=t.boundingClientRect),l={centerX:s.targetElementCenterX,centerY:s.targetElementCenterY,top:o.top,bottom:o.top+o.height};return n=TRCImpl&&TRCImpl.global["visibility-threshold-override"]||0,t.isIntersecting&&t.intersectionRatio>=n&&p(l.centerX,l.centerY,t.intersectionRect,e.exactVisibleThresholdFromTop)?i.visibilityState=a=TRC.intersections.visibilityState.IN_VIEW_PORT_VISIBLE:t.isIntersecting?i.visibilityState=a=TRC.intersections.visibilityState.IN_VIEW_PORT_NOT_VISIBLE:i.visibilityState=a=TRC.intersections.visibilityState.NOT_IN_VIEW_PORT,a=c(e,a,t,l),TRC.util.isPercentEnabled(TRCImpl.global,"disable-overlay-visibility-report-fix")||(i.visibilityState=a),r.disableDuplicatePrevention?y(i,e,a):e.lastEventId&&e.lastEventId===a||(y(i,e,a),e.lastEventId=a),a}function w(e,t,r){return e.elementFromPoint(t-1,r-1)||e.elementFromPoint(t+1,r+1)}var _={getPointsOnElement:g,TARGET_ATTRIB:n,visibilityState:{IN_VIEW_PORT_VISIBLE:1,IN_VIEW_PORT_NOT_VISIBLE:2,NOT_IN_VIEW_PORT:3},observe:function(e){var t,s,c,d=e.disableCheckOverlay?[0,.5]:[0,.25,.5,.75,1];function p(t){for(var r,o=0;o<t.length;o++){var a=t[o];if(a.target.getAttribute(n)||!TRC.util.isPercentEnabled(TRCImpl.global,"intersection-should-not-throw-error-on-missing-attribute")){r=a.target.getAttribute(n).split(" ");for(var s=0;s<r.length;s++){var l=r[s],c=i[l];c.lastBoundingClientRect=a.boundingClientRect,c.geometryOffsets={pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset},c&&c.observer.tblObserverKey===this.tblObserverKey&&R(c,a,e)}}}}if(e.targetElement&&null!==e.threshold&&(e.onEnter||e.onExit||e.onTrigger)){t=e.targetElement,s="tbl-observe-"+r,c=t.getAttribute(n)?t.getAttribute(n)+" "+s:s,t.setAttribute(n,c),r++,l(e,d),i[s]={targetSelector:s,targetElement:t,isEnter:null,isExit:null,intersection:null,disableCheckOverlay:e.disableCheckOverlay,disableDuplicatePrevention:e.disableDuplicatePrevention,enableDelayedVisibilityCheck:e.enableDelayedVisibilityCheck,visibleWidgetPredicate:e.visibleWidgetPredicate,exactVisibleThresholdFromTop:e.exactVisibleThresholdFromTop,threshold:e.threshold,onExit:e.onExit||a,onEnter:e.onEnter||a,onTrigger:e.onTrigger||a,boundingClientRect:null};var h={root:e.rootSelector||null,rootMargin:e.rootMargin||"0px",threshold:e.threshold},u=TRC.util.hashString(JSON.stringify(h)),m;return o[u]?m=o[u]:(h.root=h.root&&document.querySelector(h.root),m=TRC.IntersectionObserver?new TRC.IntersectionObserver(p.trcBind(h),h):new IntersectionObserver(p.trcBind(h),h),"MutationObserver"in window||(m.POLL_INTERVAL=TRCImpl.global["intersections-polyfill-poll-interval"]||500),h.tblObserverKey=m.tblObserverKey=u,o[u]=m),i[s].observer=m,m.observe(t),s}__trcDebug("missing params for intersectionHandler")},isInViewPort:function(e){var t=TRCImpl.global["visibility-threshold"]||e.disableCheckOverlay?[0,.5]:[0,.25,.5,.75,1],r={rootSelector:e.rootSelector||null,targetElement:e.targetElement,threshold:t,rootMargin:"0px",disableCheckOverlay:e.disableCheckOverlay,disableDuplicatePrevention:e.disableDuplicatePrevention,enableDelayedVisibilityCheck:e.enableDelayedVisibilityCheck,visibleWidgetPredicate:e.visibleWidgetPredicate,exactVisibleThresholdFromTop:e.exactVisibleThresholdFromTop,onTrigger:e.onTrigger,onEnter:e.onEnter};return this.observe(r)},unobserve:function(e){var t=i[e],r,o;if(t)return o=(r=(t=i[e].targetElement).getAttribute(n).split(" ")).indexOf(e),1===r.length&&(i[e].observer.unobserve(t),t.removeAttribute(n)),o>-1&&r.length>1&&(r.splice(o,1),t.setAttribute(n,r.join(" "))),delete i[e];__trcLog("missing target element for unobserve")},unobserveAll:function(e){for(var t=e.split(" "),r=0;r<t.length;r++)this.unobserve(t[r])},getIntersectionState:function(){return i},observePolling:function(e){var t=500;this.observedElementsInPolling[e.targetSelector]||(this.observedElementsInPolling[e.targetSelector]={target:e.targetElement,state:e},e.underPolling=!0,this.observedElementsInPollingCounter++),this.observedElementsInPollingCounter>0&&this.startPolling(t)},unObservePolling:function(e){this.observedElementsInPolling[e.targetSelector]&&(delete this.observedElementsInPolling[e.targetSelector],this.observedElementsInPollingCounter--,e.underPolling=!1),0===this.observedElementsInPollingCounter&&this.stopPolling()},stopPolling:function(){clearInterval(this.pollingInterval),this.pollingInterval=null},startPolling:function(e){this.pollingInterval||(this.pollingInterval=setInterval(function(){var e,t=!1,r,i,o=_.observedElementsInPolling;for(var n in o)if(o.hasOwnProperty(n)&&(t=h((e=o[n]).target))){if(!e.target.getAttribute(_.TARGET_ATTRIB)&&TRC.util.isPercentEnabled(TRCImpl.global,"intersection-should-not-throw-error-on-missing-attribute"))continue;r=e.target.getAttribute(_.TARGET_ATTRIB).split(" "),i=_.getIntersectionState();for(var a=0;a<r.length;a++){var s=r[a];y(e.target,i[s],_.visibilityState.IN_VIEW_PORT_VISIBLE)}_.unObservePolling(e.state)}},e))},observedElementsInPolling:{},observedElementsInPollingCounter:0,forceEnableDelayedVisibilityState:function(){return!1}};return _}(window,document),(()=>{const e="tbl_creative_preview",t="tbl_should_override_all_slots",r="tbl_should_repeat_override_items",i="additional-properties",o="tbl_properties_override",n="placement-properties",a="original_item_fallback",s={sentUsageLog:!1,overriddenPlacements:{},encodeText:!1},l=!1,c=!0,d={autoTriggerConfig:{hover:"true",viewabilityConfig:{percentage:"5",time:"0"}},repeat:"true",scriptUrlTemplate:"//15.taboola.com/tbp?oid=15&pubid=166277&tagid=948107&pstn=[pstn]&cb=[cb]&callback={CALLBACK_NAME}",unitBootSrc:"//vidstat.taboola.com/vpaid/units/{version}/creatives/creative_js.js"},p="tbl_pvideo_version",h="27_6_17",u=(e,t)=>{if(!s.isEnabled(e.global["enable-item-override"]))return;s.encodeText=s.encodeText||!!e.global["item-override-encode-fields"];const r=s.getNewItemFromUrl();v(r);const[i]=r,o=t&&t.trc&&t.trc.vl||[];r&&i&&o.length&&(E(r,t),s.handleOverrideItems(o,r))};s.handleOverrideItems=((e,r)=>{let i;i=s.getValueFromUrl(t,l)?R(e,r):y(e,r[0].itemType),s.overrideItems(i,r),m(e,r)});const m=(e,r)=>{0!==r.length&&(s.getValueFromUrl(t,l)?e.forEach(e=>{b(r[0],e,n)}):b(r[0],e[0],n))},g=(e,t)=>{const r=e[t];return r?TRC.util.jsonParseSafe(r,t):{}},b=(e,t,r)=>{const i=g(e,r);i&&s.replaceFields(t,i,Object.keys(i))};s.overrideItems=((e,t)=>{e.length>0&&t&&e.forEach((r,i)=>{const o=i%t.length;s.overrideItem(e[i],t[o])})}),s.overrideItem=((e,t)=>{s.replaceFields(e,t,["thumbnail","title","description","branding-text","uploader","cropping"]),b(t,e,i),s.getValueFromUrl(a)||(e.url="#")}),s.replaceFields=((e,t,r)=>{const i=s.getValueFromUrl(a);return r.forEach(r=>{const o=e[r],n="object"==typeof t[r]&&null!=t[r];e[r]=n?s.replaceFields({},t[r],Object.keys(t[r])):s.replaceField(t[r],r),!n&&i&&(e[r]=e[r]||o)}),e}),s.replaceField=((e,t)=>{let r,i;if("thumbnail"===t&&(r={ignoreAmpersand:!0}),f(e)){const t=JSON.parse(e);i=JSON.stringify(s.replaceFields({},t,Object.keys(t)))}else i=s.replaceString(e,r);return i}),s.replaceString=((e,t)=>s.encodeText&&"string"==typeof e?TRC.text.encodeHTML(e,t):e);const f=e=>{try{return"string"==typeof e&&"object"==typeof JSON.parse(e)}catch(e){return!1}},v=e=>{if(!s.sentUsageLog){const t=e?e.map(e=>e&&e.creativeId||null):null;TRC.RBoxUsage.logUsage("TRC.ItemOverride",{extraData:{creativeIds:t,url:window.location.href}}),s.sentUsageLog=!0}};s.isEnabled=(e=>e&&s.isItemOverrideUrlParam()),s.isItemOverrideUrlParam=(()=>location.search.indexOf(e)>=0);const C=(e,t)=>!!e[t]||!(e["is-syndicated"]||e["is-in-network"]||e["is-native"])&&"is-organic"===t,T=(e,t)=>{if(!t)return e[0];for(let r=0;r<e.length;r++)if(C(e[r],t))return e[r]},y=(e,t)=>{const{overriddenPlacements:r={}}=s,i=[],n=s.getValueFromUrl(o);let a,l;return e.forEach(e=>{l=e.uuip||e.uip;const{v:o}=e;o&&l&&!r[l]&&(a=T(o,t))&&(i.push(a),r[l]=!0,n&&S(e,n))}),i},R=(e,t)=>{const i=s.getValueFromUrl(r,c),n=[],a=s.getValueFromUrl(o);return i||w(e,t),e.forEach(e=>{e.v&&(e.v.forEach(e=>{n.push(e)}),a&&S(e,a))}),n},w=(e,t)=>{let r=t.length;for(let i=0;i<e.length;i++){const t=e[i].v;t&&(t.length>=r?_(e,i+1,r):(r-=t.length,i===e.length-1&&r>0&&x(t,r)))}},_=(e,t,r)=>{e.splice(t),e[t-1].v.splice(r)},x=(e,t)=>{for(let r=0;r<t;r++)e.push(Object.assign({},e[0]))};s.getValueFromUrl=((e,t)=>{try{const r=TRC.URL.prototype.getParameter.call(window.location.search,e,decodeURIComponent);let i=JSON.parse(r);return(void 0===i||null===i&&t)&&(i=t),i}catch(t){return __trcDebug(`invalid data in url param ${e}`),null}}),s.getNewItemFromUrl=(()=>{let t=s.getValueFromUrl(e);return Array.isArray(t)||(t=[t]),t}),TRC.ItemOverride={run:u},window._trcIsUTactive&&(TRC.ItemOverride.privateProps=s);const E=(e,t)=>{const r=s.getValueFromUrl(p,h);d.unitBootSrc=d.unitBootSrc.replace("{version}",r);for(let o=0;o<e.length;o++)if(e[o]&&e[o][i]&&e[o][i]["pvideo-url"]){for(let e=0;e<t.trc.vl.length;e++)t.trc.vl[e].pvc=d;return}},S=function(e,t){try{if(!e||!t)return;const r=e=>JSON.stringify(e).replace(/(^\{)|(\}$)/g,"");let i={};e.po&&(i=JSON.parse(`{${e.po}}`.replace(/'/g,`"`)));const o=TRC.util.merge({},i,t);e.po=r(o)}catch(e){}}})(),function(){function e(e){this._data=e}e.prototype.getId=function(){return this._data.id},e.prototype.getLinkTarget=function(){return this._data.linkTarget},e.prototype.getUrl=function(){return this._data.url},e.prototype.getTitle=function(){return this._data.title},e.prototype.getType=function(){var e=this._data;return e["is-syndicated"]?"sponsored":e["is-in-network"]?"exchange":e["is-native"]?"native":"organic"},e.prototype.getSlot=function(){return this._data.itemIndex},TRC.ItemParser=e}(),(()=>{class e{constructor(e,t=!1){if(this.onlyClean=t,this.pm=TRC.pageManager,this.storageType=e.storageType||"session",this.localStorage=this.pm.getLocalStorageImplementation("strict-w3c-storage",this.storageType),this.keyValueCache=null,this.cacheTtl=e.ttl||1e3*60*20,this.noTtl=e.noTtl||!1,this.cacheName=e.cacheName||"key_value_cache",this.cacheUtils=new TRC.CacheUtils(this.localStorage,this.cacheName,this.cacheTtl),!localStorage)return{isValidCache:!1};this.isValidCache=!0,this.init()}cacheData(e,t){const r=this.setCacheData(e,t);return this.localStorage.setValue(this.cacheName,__trcJSONify(this.keyValueCache.getData())),r}setCacheData(e,t){const r=(new Date).getTime();try{this.keyValueCache.setValue(e,{value:t,s:r}),!1===this.noTtl&&this.setCacheClean(e)}catch(e){return!1}return!0}getCacheData(e){const t=this.keyValueCache.getValue(e);return!0===this.noTtl&&t||t&&!this.isOverTtl(this.keyValueCache.getValue(e).s)?this.keyValueCache.getValue(e).value:null}isOverTtl(e){return this.cacheUtils.isOverTtl(e)}setCacheClean(e){this.cacheUtils.setCacheClean(e,this.keyValueCache)}cleanCache(e){this.cacheUtils.cleanCache(e,this.keyValueCache,this)}removeKey(e){TRC.CacheUtils.removeKey(e,this.keyValueCache)}getKeyValueCache(){return this.cacheUtils.getCache(this.pm)}init(){if(this.onlyClean)return this.localStorage.removeKey(this.cacheName),!1;this.keyValueCache=this.getKeyValueCache();const e=TRC.util.keys(this.keyValueCache.getData());return this.cleanCache(e),!0}}TRC.KeyValueCache=e})(window,document),(()=>{let e=!1,t=[];window._trcIsUTactive&&(TRC.forceRAFtoRun=(()=>{e=!1}));const r=TRC.LineClamp={fixBoxOverflow(e,t,i,o,n,a,s,l){let c=!1;if(null==e)return;if(s&&(c=r.setupBoxLineClamp(e)))return;if(l&&!c)return __trcDebug("Skipping fixBoxOverflow due to feature flag.");if(TRC.ellipsisPerf&&console.timeStamp("Taboola old ellipsis"),e.clientHeight<=0||e.clientWidth<=0)return;let d=!1;e.parentNode.font=r.getFontSize(e);const p=e.innerHTML;e.innerText="";const h=r.add_span(null,"H",e),u=Math.max(h.offsetHeight,h.clientHeight),m=Math.max(0,e.scrollHeight-e.clientHeight);for(e.removeChild(h),TRC.dom.setContentToElement(e,p),r.addInlineElementsForMeasure(e.inlineDetailsElements,e,!0),e.inlineDetailsElementsHTML=e.innerHTML.replace(p,""),t=t.replace(/^\s+|\s+$/g,"");e.clientHeight+m+u/2<e.scrollHeight&&t.length;)d=!0,t=r.truncateOverflowingText(e,t,i),e.inlineDetailsElementsHTML&&(e.innerHTML+=e.inlineDetailsElementsHTML);r.hideClonedElementsAfterMeasure(n,a),TRC.Browser.ie&&!d&&(e.style.height="auto")},setupBoxLineClamp(i){const o=parseInt(document.trcGetCurrentStyle(i,"line-height"),10),n=parseInt(document.trcGetCurrentStyle(i,"height"),10),a=o&&n?Math.round(n/o).toString():null;return!!a&&(t.push({domElm:i,numLine:a}),window._trcIsUTactive&&(TRC._lineClampCache=t),!!e||(requestAnimationFrame(()=>{t.forEach(e=>{const t=e&&e.domElm,i=e&&e.numLine;TRC.dom.addClass(t,"trc_ellipsis"),TRC.css.utils.setStyleProperty(t,"-webkit-line-clamp",i,!1),t.parentNode.font=r.getFontSize(t)}),e=!1,t=[]}),e=!0,!0))},getFontSize(e){let t=0,r=!1,i=document.trcGetCurrentStyle(e,"font-size");const o=["px","pt","em","ch"];for(;!r&&t<o.length;){if(i.indexOf(o[t])){switch(i=parseInt(i,10),o[t]){case"px":break;case"pt":i/=.75;break;case"em":case"ch":i*=10}r=!0}t++}return i},add_span(e,t,r){const i=document.createElement("span");return null!=e&&(i.className=e),null!=t&&("object"==typeof t?i.appendChild(t):TRC.dom.setContentToElement(i,t)),void 0!==r&&r.appendChild(i),i},addInlineElementsForMeasure(e,t,i){let o,n,a;for(let s=0;e&&s<e.length;s++)o=e[s],!(n=r.findElement(e=>{const r=e.className.search(o)>=0&&e.parentNode===t;return r},t))&&o&&((a=document.createElement("span")).className="trc_inline_detail_spacer",a.innerHTML=" ",t.appendChild(a),t.appendChild(i?o.cloneNode(!0):o))},findElement(e,t,r,i){void 0===t&&(t=document),void 0===r&&(r="*");const o=t.getElementsByTagName(r);for(let n=0;n<o.length;n++)if(e(o[n]))return o[n];return i},truncateOverflowingText(e,t,i){t=i&&t.search(/\s/)>=0?t.replace(/\s+\S+$/,""):t.substr(0,t.length-1);const o=e.getElementsByTagName("bde");let n;e.inlineDetailsElementsHTML&&o.length&&(n=e.innerHTML.replace(e.inlineDetailsElementsHTML,""),TRC.dom.setContentToElement(e,n)),e.getElementsByTagName("span").length>0&&e.removeChild(e.getElementsByTagName("span")[0]);const a=o.length>0?o[0]:e;return TRC.dom.setContentToElement(a,t),r.add_span(null,r.createEllipsis(),e),t},hideClonedElementsAfterMeasure(e,t){let i,o;for(let n=0;e&&n<e.length;n++)i=e[n],(o=r.findElement(e=>{const r=e.className.search(i)>=0&&e.parentNode===t;return r},t,"span"))&&(o.style.display="none")},createEllipsis:()=>document.createTextNode("…")}})(),function(e,t){var r={source:"|v|h|c|t|s|p|o|z|video|home|category|text|search|photo|other|content_hub",target:"|v|p|t|m|video|photo|text|mix|"},i="v",o=function(e,t){return e=e.toLowerCase(),-1!==r[t].indexOf("|"+e+"|")?"content_hub"===e?"z":e.substr(0,1):(__trcError('illegal parameter "'+e+'" was passed to trc_ListOriginBuilder method: "set'+t.substr(0,1).toUpperCase()+t.substr(1)+'" \nUsing "video" instead'),"v")},n=TRC.ListOriginBuilder=function(e,t){this.setSource(e||i),this.setTarget(t||"v")};n.prototype.setSource=function(e){i=o(e,"source")},n.prototype.getSource=function(){return i},n.prototype.setTarget=function(e){this.target=o(e,"target")},n.prototype.getTarget=function(){return this.target},n.prototype.toString=function(){return(i+"2"+this.target).replace(/v2v/,"blended")},n.prototype.isHomePage=function(){return"h"===i}}(window,document),(()=>{const e={};class t{static metricIncrement(t){e[t]=e[t]||0,e[t]++}static getMetricValue(t){return e[t]||0}static isMetricsEnabled(e,t){return t.util.isPercentEnabled(e.global,"rbox-metrics-enabled")&&e.global["bulk-metrics-events-strategy"]&&e.global["rbox-post-events-as-ajax"]}static sendMetricsEvent(e,r,i,o,n){try{if(!n&&!t.isMetricsEnabled(r,e))return;const a=t.formatMetricsData(e,i);r.sendEvent("metrics",a,null,!1,o,null,n)}catch(e){__trcError("Failed to send Metrics event",e)}}static formatMetricsData(e,t){return{dimensions:JSON.stringify({publisher:e.publisherId,"integration-type":r(e)}),type:t.type,metricName:t.name,value:t.value};function r(e){return t(e)&&"SDK"||r(e)&&"AMP"||"normal";function t(e){return!(!e.mobile||!e.mobile.reportClick)}function r(e){return e.isAMP}}}}window._trcIsUTactive&&(t.setMetricValue=function(t,r){e[t]=r}),TRC.MetricsManager=t})(),(()=>{const e=[];let t;class r{static loadMixpanelScript(r,i,o){const n=TRC.Mixpanel;try{if(t||n.requested)return void(t&&!e[r]&&n.initMixpanelProject(r));n.requested=!0,n.mixpanelScript(),n.initMixpanelProject(r),n.onMixpanelLoad(i)}catch(e){n.onMixpanelError(e,o)}}static mixpanelScript(){var e,r,i,o,n,a;e=document,(r=t||[]).__SV||(t=r,r._i=[],r.init=function(e,t,i){function o(e,t){var r=t.split(".");2==r.length&&(e=e[r[0]],t=r[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}var s=r;for(void 0!==i?s=r[i]=[]:i="mixpanel",s.people=s.people||[],s.toString=function(e){var t="mixpanel";return"mixpanel"!==i&&(t+="."+i),e||(t+=" (stub)"),t},s.people.toString=function(){return s.toString(1)+".people (stub)"},n="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),a=0;a<n.length;a++)o(s,n[a]);var l="set set_once union unset remove delete".split(" ");s.get_group=function(){function e(e){t[e]=function(){call2_args=arguments,call2=[e].concat(Array.prototype.slice.call(call2_args,0)),s.push([r,call2])}}for(var t={},r=["get_group"].concat(Array.prototype.slice.call(arguments,0)),i=0;i<l.length;i++)e(l[i]);return t},r._i.push([e,t,i])},r.__SV=1.2,(i=e.createElement("script")).type="text/javascript",i.async=!0,i.src="undefined"!=typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",(o=e.getElementsByTagName("script")[0]).parentNode.insertBefore(i,o))}static initMixpanelProject(r){e.push(r),t.init(r,{batch_requests:!0})}static isMixPanelLoaded(){return!!t}static onMixpanelLoad(e){TRC.dispatch("mixpanelScriptSucceeded"),e&&e()}static onMixpanelError(e,t){__trcError("Failed to load mixpanel script",e),TRC.Mixpanel.mixpanelScriptFailed=!0,TRC.dispatch("mixpanelScriptFailed"),t&&t()}static sendMixpanelEvent(e,r={},i){if(TRC.util.isMixpanelEventDisabled(e))return;if(!t)return void __trcWarn(`No Mixpanel instance - ${e}`);const{publisherId:o,pageManager:n}=TRC,{sessionId:a,formattedTRCRequest:s,experimentsData:l}=TRCImpl,c=i||{pubId:o,sessionId:a,taboolaUserId:n&&n.getUserId(),pageViewId:n&&n.getPageData(),pageType:s&&s.it,experimentsData:l},d=TRC.util.merge({},r,c);t.identify(c.taboolaUserId),t.people.set({"Taboola User ID":c.taboolaUserId}),t.track(e,d)}}TRC.Mixpanel=r,window._trcIsUTactive&&(TRC.Mixpanel.getInstance=(()=>t),TRC.Mixpanel.setInstance=(e=>t=e),TRC.Mixpanel.clearInstance=(()=>t=void 0))})(window),TRC.multiWidget={init({originalContainer:e,multiWidget:t,widgetOptions:r,initRBox:i,trcManager:o}){const n=e;this.trcManager=o;const a="rtl"===this.trcManager.direction,s=[t];return e.parentNode?(r.multiWidgetRecItems=[].slice.call(r.response.trc["video-list"].video),!r.multiWidgetRecItems.length&&this.trcManager.global["mw-display-none-on-no-items-to-render"]&&(e.style.display="none"),TRC.multiWidget.recursiveBuild.call(this,{widgetsArr:s,containerElm:n,depth:0,parentLayout:s,widgetOptions:r,initRBox:i,isRTL:a}),n.className+=" trc_multi_widget",n):null},recursiveBuild({widgetsArr:e,containerElm:t,depth:r,parentLayout:i,widgetOptions:o,initRBox:n,isRTL:a}){i.isRTL=a,e.forEach(e=>{const s=__trcCopyProps(e,{});if(s.children){if(!s.children.length)return;const e=TRC.multiWidget.createWrapper(s);t.appendChild(e),t=e,TRC.multiWidget.addMargin(t.previousSibling,i),TRC.multiWidget.recursiveBuild.call(this,{widgetsArr:s.children,depth:r+1,parentLayout:s,containerElm:t,widgetOptions:o,initRBox:n,isRTL:a})}else{const e=TRC.multiWidget.createWidget.call(this,{layout:s,widgetOptions:o,initRBox:n,isRTL:a});t.appendChild(e),TRC.multiWidget.addMargin(e.previousSibling,i)}s.flexSize&&(s.container.style.msFlex=s.container.style.flex=s.flexSize,s.container.style.overflow="hidden")})},addMargin(e,{gap:t,orientation:r,isRTL:i}){if(!e||!t)return;const o=i?"Left":"Right",n=`margin${"V"===r?"Bottom":o}`;e.style[n]=t},createWrapper(e){const t=document.createElement("div");return t.className+=" trc_multi_widget_container","V"===e.orientation&&(t.style.msFlexDirection=t.style.flexDirection="column"),e.container=t,t},createWidget({layout:e,widgetOptions:t,initRBox:r}){e.container=document.createElement("div");const{container:i,name:o}=e;return this.ensureValidContainer(i),o&&i.setAttribute("widget-name",o),t.mode_name=t.mode=t.response.trc["video-list"]["base-mode"]=e.name,t.multiWidgetModeLevelData=TRC.multiWidget.formatMultiWidgetPO(e),e.RBox=r.call(this,i,t),i},formatMultiWidgetPO(e){if(e.po){const t=__trcCopyProps(e,{});return t["properties-override"]=TRC.util.jsonParseCustomNative(`{${e.po}}`),t}return e}},TRC.net=function(e,t){var r=[],i;return{loadScript:function(e,r,i,o,n){var a=t.getElementsByTagName("script")[0],s=null;if("js"==r)(s=t.createElement("script")).type="text/javascript",s.src=TRC.shiftDomain(e),s.charset="UTF-8",o?s.setAttribute("defer","defer"):n&&s.setAttribute("async","async");else{if("css"!=r)throw new Error("External reference loaded must be of type 'js' or 'css'!");(s=t.createElement("link")).rel="stylesheet",s.type="text/css",s.href=e}return"function"==typeof i&&(s.addEventListener("load",i,!1),s.addEventListener("error",i,!1)),a.parentNode.insertBefore(s,a),s},fireSimpleHttpRequest:function(e){var t=new Image;t.src=e,r.push(t)},fireBeaconHttpRequest:function(t){e.navigator&&navigator.sendBeacon&&navigator.sendBeacon(t)}}}(window,document),(()=>{const e={timeStamp:"tim=",type:"type=",message:"msg=",debugLevel:"llvl=",id:"id="},t=TRC.PROTOCOL,r=function(e){const t=[];return Object.keys(e).forEach(r=>{t.push(`${encodeURIComponent(r)}=${encodeURIComponent(e[r])}`)}),t.join("&")};let i=0;function o(){return window.TRCImpl&&TRC.util.isPercentEnabled(window.TRCImpl.global,"new-logging-mechanism-on")}function n(e,t){t?TRC.net.fireBeaconHttpRequest(e):TRC.net.fireSimpleHttpRequest(e)}function a(e,r,i,n,a,l,c){if(o()&&window.SubtleCrypto)return TRC.cryptoKeysManager.getPageViewUniqueID().then(o=>{this.logMsgToServer(`${t}//${e}/${a}/log/2/debug?${s(r,i,n,l,o)}`,c)}).catch(()=>{this.logMsgToServer(`${t}//${e}/${a}/log/2/debug?${s(r,i,n,l)}`,c)});this.logMsgToServer(`${t}//${e}/${a}/log/2/debug?${s(r,i,n,l)}`)}function s(t,n,a,s,l){const c=window.TRCImpl&&window.TRCImpl.getSystemFlag("loaderType");return`${e.timeStamp+encodeURIComponent(a)}&${e.type}${encodeURIComponent(TRC.modDebug.getType(t))}&${e.message}${encodeURIComponent(n)}${window.trc_debug_level>1?`&${e.debugLevel}${window.trc_debug_level}`:""}&${e.id}${Math.floor(1e4*Math.random())}${window.TRC.version?`&cv=${window.TRC.version}`:""}${c?`&lt=${c}`:""}${o()&&window.SubtleCrypto&&l?`&uuid=${l}&dcc=${++i}`:""}${s?`&${r(s)}`:""}`}TRC.newDebugLogger={logMsg:a,logMsgToServer:n},window._trcIsUTactive&&(TRC.newDebugLogger.getLogParams=s,TRC.newDebugLogger.resetCounter=function(){i=0})})(),(()=>{const e="ack";TRC.pageLevelFeaturesManager={features:{"explore-more":{responseKey:"exm",enableInIframe:!0,functionCall:(e,t)=>{TRC.pageLevelFeaturesManager.getFeatureOnFeedLevel(e,t)}},"virtual-placement":{responseKey:"vpl",enableInIframe:!0,functionCall:(e,t)=>{TRC.pageLevelFeaturesManager.getFeatureOnPageLevel(e,t)}},vignette:{responseKey:"vig",enableInIframe:!0,functionCall:(e,t)=>{TRC.pageLevelFeaturesManager.getFeatureOnProdsLevel(e,t)}}},pageLevelFeatures:{},disableFeatureOnIframe(){const{pageLevelFeatures:e}=TRC.pageLevelFeaturesManager,t=window.self!==window.top;if(t){const t=Object.keys(this.features);for(let r=0;r<t.length;r++){const i=t[r],{responseKey:o}=this.features[i],n=TRCImpl.global[`enable-${o}-inside-iframe`];let{enableInIframe:a}=this.features[i];if(void 0!==n&&(a=n),!1===a){const t=this.getPlfKey(o);e[t]=!0}}}},getFeature(e){Object.keys(this.features).forEach(t=>{const r=this.features[t],i=r.responseKey,o=this.pageLevelFeatures[i];if(!o)try{r.functionCall(e,i)}catch(e){__trcError("Error in functionCall in pageLevelFeaturesManager",e)}})},getFeatureOnFeedLevel(e,t){const r=e.trc.f,i=r&&Object.keys(r);if(i)for(let o=0;o<i.length;o++){const e=r[i[o]],n=e[t];if(n){const e=this.getPlfKey(t);return this.pageLevelFeatures[e]=!0}}},getFeatureOnPageLevel(e,t){if(e.trc&&e.trc[t]){const e=this.getPlfKey(t);return this.pageLevelFeatures[e]=!0}},getPlfKey:t=>`${e}_${t}`,getFeatureOnProdsLevel(e,t){if(e.trc&&e.trc.prods&&e.trc.prods[t]){const e=this.getPlfKey(t);this.pageLevelFeatures[e]=!0}}}})(),(()=>{let e=null;class t{static init(e){t.setReferrer(e),e["keep-referrer-in-session"]&&!TRC.dom.isInIframe()&&TRC.pageManager.sessionStorageSetValue("tbl-session-referrer",location.href)}static updateReferrer(t){e=t}static getReferrer(){return e}static setReferrer(t){function r(){const e=document.head.getElementsByTagName("link");for(let t=0;t<e.length;t++)if("referrer"===e[t].rel)return e[t].href}function i(){let e="";try{return(e=top.window.TRC&&top.window.TRC.hasFeedView?decodeURI(document.referrer):decodeURI(top.window.document.referrer))&&!/https?:\/\/(\w+)\.taboola(syndication)?\.com/.test(e)?e.substr(0,400):e.split("?")[0]}catch(e){__trcDebug("TRC.Manager.getReferrer : rendering in cross domain iframe")}}function o(e){if(e["keep-referrer-in-session"]){const e=TRC.pageManager.sessionStorageGetValue("tbl-session-referrer");if(e&&location.hostname===new TRC.URL(e).host)return e}}e=e||r()||i()||o(t)||""}}TRC.PageReferrer=t})(),function(e,t){e.TRC=e.TRC||{};var r,i=!1,o="taboola global",n="trctestcookie";function a(){for(var e="trc_cookie_storage",t={},r=document.cookie.split(/;\s+/),i=0;i<r.length;i++){var o=TRC.text.lsplit(r[i],"=",2),n=unescape(o[0]),a=unescape(o[1]);if(n==e){for(var s=a.split("|"),l=0;l<s.length;l++){var o=s[l].split("=");t[unescape(o[0])]=unescape(o[1])}break}}return this.save=function(){var r=new Array,i,o;for(var n in t)t.hasOwnProperty(n)&&null!=t[n]&&(r[r.length]=escape(n)+"="+escape(t[n]));i=r.length>0?1:-1,o=new Date((new Date).getTime()+365*i*864e5);var a=this.getDomain();void 0!==document.cookie&&(document.cookie=e+"="+escape(r.join("|"))+";domain="+a+";path=/;expires="+o.toUTCString())},this.getDomain=function(){return!0===TRCImpl.global["store-first-party-cookie-in-subdomain"]||"true"===TRCImpl.global["store-first-party-cookie-in-subdomain"]?d.getPageSubDomain():""},this.getValue=function(e){return t.hasOwnProperty(e)?t[e]:null},this.setValue=function(e,r){t[e]=r,this.save()},this.removeKey=function(e){delete t[e],this.save()},this.delete=function(){t={},this.save()},this}function s(e){var t=e||{};return this.getValue=function(e){return t[e]?t[e]:null},this.setValue=function(e,r){t[e]=r},this.removeKey=function(e){delete t[e]},this.getData=function(){return t},this.delete=function(){t={}},this}function l(t){return this.getValue=function(r){return e[t+"Storage"].getItem(r)},this.setValue=function(r,i){try{e[t+"Storage"].setItem(r,i)}catch(e){}},this.removeKey=function(r){try{e[t+"Storage"].removeItem(r)}catch(e){}},this}function c(t){try{if(TRC.useStorageDetection){var r=e[t+"Storage"],i=(new Date).getTime()+"",o="_taboolaStorageDetection";if(r.setItem(o,i),r.getItem(o)===i&&(r.removeItem(o),r))return new l(t)}}catch(e){return null}}var d=function(){return this.publisher_id=null,this.item_id=null,this.page_id=null,this.state={},this.stateStack=[],this.getPageSubDomain=function(){return this.getPageDomainFromHostName(t.location.hostname)},this.getPageDomainFromHostName=function(e){var t="";try{var r=e.split(".").reverse();t="."+r[1]+"."+r[0],r.length>=3&&r[1].match(/^(com|edu|gov|net|mil|org|nom|co|name|info|biz)$/i)&&(t="."+r[2]+"."+r[1]+"."+r[0])}catch(e){}return t},this.getLocalStorageImplementation=function(t,r){if(null!=this.state.privateStorageImpl&&"strict-w3c-storage"!=t)return this.state.privateStorageImpl;var i=e.TRCImpl?e.TRCImpl.global:{};switch(t=t||(i["local-storage-usage"]?i["local-storage-usage"]:"prefer-w3c-storage")){case"strict-w3c-storage":return c("session"===r?"session":"local");case"prefer-w3c-storage":var o=c("local");if(o)return this.state.privateStorageImpl=o;case"prefer-cookies":try{if(this.canWriteCookies())return this.state.privateStorageImpl=new a}catch(e){}default:return this.state.privateStorageImpl=new s}},this.getFirstPartyCookie=function(){if(this.state.firstPartyCookie)return this.state.firstPartyCookie;var e=this.getLocalStorageImplementation();if(e instanceof a||e instanceof s)return this.state.firstPartyCookie=e;try{if(this.canWriteCookies())return this.state.firstPartyCookie=new a}catch(e){}return this.state.firstPartyCookie=new s},this.canWriteCookies=function(){var t,r;return(e.TRCImpl?e.TRCImpl.global:{})["use-trctestcookie"]?(document.cookie=n+"=ok",r=-1!==document.cookie.indexOf(n),document.cookie=n+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;",r):e.navigator.cookieEnabled},this.getDummyStorage=function(e){return new s(e)},this.trcParseParams=function(e){if(e&&!owner.item_id)for(var t=e.split("&"),r=0;r<t.length;r++){var i=TRC.text.lsplit(t[r],"=",2);switch(unescape(i[0])){case"item_id":owner.item_id=unescape(i[1]);break;case"publisher_id":owner.publisher_id=unescape(i[1])}}},this.trcGetPublisherParams=function(){for(var e=document.getElementsByTagName("script"),t=0;t<e.length;t++){var r=e[t].src.split("taboola(syndication)?.com/libtrc/")[1];if(r&&e[t].src.search(/taboola(syndication)?.com.*page_management/)>=0){var i=(r=r.split("?")[0]).split("/");owner.page_id=i[0],i.length>2&&(owner.page_id+="/"+i[1]),owner.trcParseParams(e[t].src.split("?")[1])}}},this.getPageData=function(){var e=this.getTopMostWindow();return e.taboola_view_id||(e.taboola_view_id=(new Date).getTime()),TRC.isAMPSplitFeed&&void 0!==TRC.syncViewID&&""!==TRC.syncViewID?TRC.syncViewID:e.taboola_view_id},this.storeValue=function(e,t){this.storePublisherValue(o,e,t)},this.removeKey=function(e){this.removePublisherKey(o,e)},this.getValue=function(e){return this.getPublisherValue(o,e)},this.storePublisherValue=function(e,t,r){var i;this.isNotAllowedToWriteValue(t,r)||(i=this.buildKeyWithPublisher(e,t),this.getLocalStorageImplementation().setValue(i,r),this.addKeyToStoredKeysList(i))},this.isNotAllowedToWriteValue=function(e,t){return null==t||void 0==t||TRC.doNotTrack&&!this.isAllowedKeyWhenDoNotTrack(e)},this.buildKeyWithPublisher=function(e,t){return e+":"+t},this.getPublisherValue=function(e,t){return TRC.doNotTrack&&!this.isAllowedKeyWhenDoNotTrack(t)?null:this.getLocalStorageImplementation().getValue(this.buildKeyWithPublisher(e,t))},this.removePublisherKey=function(e,t){return this.getLocalStorageImplementation().removeKey(this.buildKeyWithPublisher(e,t))},this.removeAllKeys=function(){for(var e=this.getStoredKeysList(),t=[],r,i=0;i<e.length;i++)r=e[i],this.isAllowedKeyWhenDoNotTrack(r)?t.push(r):this.getLocalStorageImplementation().removeKey(r);this.setStoredKeysList(t)},this.addKeyToStoredKeysList=function(e){var t=this.getStoredKeysList();-1===t.indexOf(e)&&(t.push(e),this.setStoredKeysList(t))},this.getStoredKeysList=function(){var e=this.getLocalStorageImplementation().getValue(this.buildKeyWithPublisher(o,"local-storage-keys")),t;try{t=TRC.util.jsonParseWithNative(e)||[]}catch(e){t=[],__trcError("Could not parse local storage keys",e)}return t},this.setStoredKeysList=function(e){var t;try{t=__trcJSONify(e),this.getLocalStorageImplementation().setValue(this.buildKeyWithPublisher(o,"local-storage-keys"),t)}catch(e){return void __trcError("Could not stringify local storage keys",e)}},this.isAllowedKeyWhenDoNotTrack=function(t){var r,i=(e.TRCImpl&&e.TRCImpl.global||{})["dnt-allowed-keys"]||["session-id"],o;return null!==t&&void 0!==t&&(o=t.split(":")[1]||t,-1!==i.indexOf(o))},this.removeUserId=function(){TRC.pageManager.removeKey("user-id"),TRCImpl.global["store-userid-first-party-cookie"]&&this.getFirstPartyCookie().removeKey(this.buildKeyWithPublisher(o,"user-id"))},this.storeUserId=function(e,t){this.isNotAllowedToWriteValue("user-id",e)||(t?this.getFirstPartyCookie().delete():(this.storePublisherValue(o,"user-id",e),TRCImpl.global["store-userid-first-party-cookie"]&&this.getFirstPartyCookie()!==this.getLocalStorageImplementation()&&this.getFirstPartyCookie().setValue(this.buildKeyWithPublisher(o,"user-id"),e)))},this.getUserId=function(){return TRC.user_id||TRC.pageManager.getValue("user-id")},this.storeSessionId=function(e,t){this.isNotAllowedToWriteValue("session-id",e)||(t?this.getFirstPartyCookie().delete():1==TRCImpl.global["store-sessiondata-first-party-cookie"]&&this.getFirstPartyCookie()!==this.getLocalStorageImplementation()&&this.getFirstPartyCookie().setValue(this.buildKeyWithPublisher(o,"session-data"),e))},this.getUserIdFirstPartyCookie=function(){return this.getFirstPartyCookie().getValue(this.buildKeyWithPublisher(o,"user-id"))},this.getUserIdFromReferrer=function(){var e=this.getReferrer();return e&&e.indexOf("taboola")>-1?TRC.URL.prototype.getParameter.call(e,"ui"):null},this.getTopMostWindow=function(){var t;try{if((t=e.top).TRC=t.TRC||{},t.TRC||(t=e),!TRCImpl||!TRCImpl.global||!TRCImpl.global["disable-strict-top-window-check"])var r=t.location}catch(r){t=e}return t},this.additionalDispatchParams=function(){null==this.state.moreDispatchParams&&(this.state.moreDispatchParams=this.getCurrentURL().filtered);var t=e.TRCImpl&&e.TRCImpl.trcForce?e.TRCImpl.trcForce:void 0,r,i;return 0!==this.state.moreDispatchParams.length||t?"&"+this.mergeDispatchValues(t).join("&"):""},this.mergeDispatchValues=function(e){if(!e)return this.state.moreDispatchParams;var t=TRC.util.merge({},e);return this.state.moreDispatchParams.length>0&&this.state.moreDispatchParams.forEach(function(e){var r=e.split("=");t[r[0]]=r[1]}),Object.keys(t).map(function(e){return e+"="+t[e]})},this.getForceTrcCache=function(){return i},this.getCurrentURL=function(){var t=TRC.isAMP&&e.context&&e.context.canonicalUrl||e.location.href,r=new TRC.URL(t),o=[],n=[],a=function(e){return function(t){t&&(0==t.search("trc_")||"taboola-debug"==t?(i=new Boolean(t.match(/trc_cache/)).valueOf(),n.push(t)):e&&o.push(t))}};e.context&&e.context.location&&e.context.location.search.replace(/^\?/,"").split(/&/).forEach(a(!1)),r.search.replace(/^\?/,"").split(/&/).forEach(a(!0)),r.search=o.length>0?"?"+o.join("&"):"";var s=new String(r.toString());return s.filtered=n,s},this.sessionStorageGetValue=function(e){var t=this.getLocalStorageImplementation("strict-w3c-storage","session");return t&&t.getValue(e)||null},this.sessionStorageIsSupported=function(){return void 0!==this.state.sessionStorageImpl?!!this.state.sessionStorageImpl:(this.state.sessionStorageImpl=this.getLocalStorageImplementation("strict-w3c-storage","session"),!!this.state.sessionStorageImpl)},this.sessionStorageSetValue=function(e,t){var r=this.getLocalStorageImplementation("strict-w3c-storage","session");r&&r.setValue(e,t)},this.sessionStorageRemoveKey=function(e){var t=this.getLocalStorageImplementation("strict-w3c-storage","session");t&&t.removeKey(e)},this.initState=function(){void 0===this.state&&(this.state={}),this.state.privateStorageImpl=null,this.state.sessionStorageImpl=void 0,this.state.m_publisherDomains={host:[],path:[],query:[]},this.state.moreDispatchParams=null},this.getReferrer=function(){return TRC.PageReferrer.getReferrer()},this.updateReferrer=function(e){TRC.PageReferrer.updateReferrer(e)},this.initReferrer=function(e){TRC.PageReferrer.init(e)},this.pushState=function(){this.stateStack.push(this.state),delete this.state,this.initState()},this.popState=function(){this.stateStack.length>0&&(this.state=this.stateStack.pop())},this.initState(),this};d.getPageData=function(){return r.getPageData()},d.storeValue=function(e,t){return r.storeValue(e,t)},d.storePublisherValue=function(e,t,i){return r.storePublisherValue(e,t,i)},d.getValue=function(e){return r.getValue(e)},d.getPublisherValue=function(e,t){return r.getPublisherValue(e,t)},d.additionalDispatchParams=function(){return r.additionalDispatchParams()},d.getCurrentURL=function(){return r.getCurrentURL()},d.getPageSubDomain=function(){return r.getPageSubDomain()},d.pushState=function(){return r.pushState()},d.popState=function(){return r.popState()},TRC.pageManager=r=TRC.pageManager||new d,e.PageManager=e.PageManager||d}(window,document),(()=>{const e={item:"i",placement:"p"};class t{constructor(){this.postData={}}setFullItemList(e){"object"==typeof e?this.postData.fil=__trcJSONify(e):"string"==typeof e&&(this.postData.fil=e)}setScreenHeight(e){this.postData.sh=e}setScreenWidth(e){this.postData.sw=e}setScreenDensity(e){this.postData.sde=e}setBrowserWidth(e){this.postData.bw=e}setBrowserHeight(e){this.postData.bh=e}setDocumentWidth(e){this.postData.dw=e}setDocumentHeight(e){this.postData.dh=e}setArticlePos(e){this.postData.bad=e}setContainerPos(e){this.postData.cd=e}setContainerWidth(e){this.postData.mw=e}setVisibleLevel(t){this.postData.vl=t?e.item:e.placement}setFirstVisibleEvent(e){this.postData.fve=e}setNewVisibleSent(){this.postData.nwv=!0}getAll(){return this.postData}getSpecificItemsPostData(e){try{let{fil:t}=this.postData;"string"==typeof t&&(t=__trcUnJSONify(t)),t&&(t=t.filter(t=>t&&e.indexOf(t.tii)>-1));const r=new TRC.PlacementEventPostData;return r.setFullItemList(t),r}catch(e){return __trcWarn("getSpecificItemsPostData error ",e),this}}}TRC.PlacementEventPostData=t})(),((e,t,r)=>{const i=(e,t)=>{const{style:r="",location:i="beforeend"}=t;r&&TRC.dom.injectStyle(r),e.insertAdjacentHTML(i,o(t)),n(a(i,e))},o=e=>{const{markup:t="",href:r="#",enableScrolling:i="no",classList:o="",children:n="",inlineStyle:a="",wrapper:s}=e;let l=`<a tblenablesscrolling="${i}" href="${r}" \n class="${o}" style="${a}" rel="nofollow" target="_blank"\n >${t}${n}</a>`;return s&&(l=`<${s.type} class="${s.className}">${l}</${s.type}>`),l},n=e=>{TRC.Device.isTouchDevice||TRC.dom.isInIframe()||TRCImpl.global["ccpa-new-tab"]||TRC.dom.on(e,"click",e=>TRC.aboutUs.open(e)||!1),TRC.dom.containsClass(e,"link-ccpa")&&TRC.dom.on(e,"click",()=>TRC.ccpa.sendCcpaEvent("taboola","CLICKED"))},a=(e,t)=>{switch(e){case"beforebegin":return t.previousElementSibling;case"afterbegin":return t.firstElementChild;case"beforeend":return t.lastElementChild;case"afterend":return t.nextElementSibling;default:return t.firstElementChild}};r.PopupLink={create:i}})(window,document,TRC),function(e,t){var r=TRC.PostRenderQueue=function(){return this.backend=[],this};r.prototype.pushBack=function(e,t){__trcDebug("postRenderQueue.pushBack("+e+")"),this.backend.push({name:e,func:t})},r.prototype.pushFront=function(e,t){__trcDebug("postRenderQueue.pushFront("+e+")"),this.backend.unshift({name:e,func:t})},r.prototype.popFront=function(){if(0==this.backend.length)return null;var e=this.backend.shift();return"function"==typeof e?{name:"unknown",func:e}:e}}(window,document),((e,t)=>{const r="tbl-forkorts-article",i=` ${r} ${r}-active`,o=`tbl-read-more-box-btn`,n="tbl-read-more-button-arrow",a="Read%20More",s=400;function l(e,t){const r=TRC.translationManager.getLabel({feature:"read-more",label:"DEFAULT_CAPTION"})||a;return{caption:e&&e.caption||t&&t.caption||r&&decodeURIComponent(r),boxSelector:e&&e.boxSelector||t&&t.boxSelector||null,threshold:e&&e.threshold||t&&t.threshold||1100,backgroundColor:e&&e.backgroundColor||t&&t.backgroundColor||"#fff",minimizedSize:e&&e.minimizedSize||t&&t.minimizedSize||800,scrollSize:e&&e.scrollSize||t&&t.scrollSize||800,buttonTop:e&&e.buttonTop||t&&t.buttonTop||48,buttonBottom:e&&e.buttonBottom||t&&t.buttonBottom||28,divTop:e&&e.divTop||t&&t.divTop||75,gradient:e&&e.gradient||t&&t.gradient||40,cutoffType:e&&e.cutoffType||t&&t.cutoffType||"ARTICLE",anchorSelector:e&&e.anchorSelector||t&&t.anchorSelector||null,lengthFromAnchorElementType:e&&e.lengthFromAnchorElementType||t&&t.lengthFromAnchorElementType||"BELOW",lengthFromAnchorElement:e&&e.lengthFromAnchorElement||t&&t.lengthFromAnchorElement||30}}function c(e){return`.${r} { max-height: inherit; } .${r}.tbl-forkorts-article-active { max-height: calc(${e.minimizedSize}px - 35px); overflow: hidden; position: relative; }.tbl-read-more-box { position: absolute; z-index: 4; left: 0; right: 0; /* there's a small line between the start of the feed/widget aand you can see the content there. so i placed the gradient 2px lower. */ bottom: -2px; display: none; text-align: center; padding: ${e.divTop}px 12px calc(50px - 35px); background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 10%, ${e.backgroundColor} 60%, ${e.backgroundColor} 100%); } .tbl-read-more-box .tbl-read-more-btn { background: #F7F7F7; border: 1px solid #bebebe; border-radius: 24px; color: #5C5C5C; width: 130px; margin: -6px 0 40px 0; padding: 8px 20px 8px 25px; height: 30px; line-height: 14px; font-size: 14px; font-weight: 500; text-align: center; } .tbl-read-more-box .tbl-read-more-btn.tbl-rtl-read-more-btn { padding: 8px 25px 8px 20px; } .tbl-read-more-box .tbl-read-more-btn.tbl-rtl-read-more-btn .tbl-read-more-button-arrow { margin: 0 6px 0 0; } .tbl-read-more-box .tbl-read-more-btn .tbl-read-more-button-arrow { width: 8px; height: 8px; margin: 0 0 0 6px; } .tbl-read-more-box .tbl-read-more-btn:hover { cursor: pointer; text-decoration: none; background: #ececec; color: #5C5C5C; }.${r}-active .tbl-read-more-box { display: block; }`}function d(){return e.pageYOffset||t.documentElement.scrollTop||t.body.scrollTop}function p(e){const i=t.querySelector(`.${r}`);e.preventDefault(),e.stopPropagation(),i.classList.remove(`${r}-active`),i.style.maxHeight="",TRC.readMoreVisible=!1,f.call(this,"clicked","true",null),TRC.EventsAPI.readmore("click",this.response&&this.response.trc),TRC.dispatch("readMoreClicked")}function h(e,r){const i=t.createElement("div");return i.className=`tbl-read-more-box`,i.innerHTML=`<a \n id="${o}_${r}" \n class="tbl-read-more-btn ${"rtl"===TRCImpl.direction?"tbl-rtl-read-more-btn":""}"\n href="#" \n > \n ${e.caption}\n ${u()}\n </a>`,i}function u(){return`\n <svg class='${n}' viewBox="0 0 8 6" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path \n d="M6.85381 0.203525L3.99181 3.06553L1.12981 0.203525C1.00407 0.0820867 0.835672 0.0148905 0.660874 0.0164095C0.486076 0.0179284 0.318868 0.088041 0.195262 0.211646C0.0716568 0.335252 0.00154415 0.50246 2.52017e-05 0.677258C-0.00149374 0.852056 0.0657025 1.02046 0.187141 1.14619L3.52047 4.47953C3.64549 4.60451 3.81503 4.67472 3.99181 4.67472C4.16858 4.67472 4.33812 4.60451 4.46314 4.47953L7.79647 1.14619C7.86015 1.08469 7.91094 1.01113 7.94588 0.929795C7.98081 0.848459 7.99921 0.760979 7.99997 0.67246C8.00074 0.58394 7.98388 0.496154 7.95036 0.414223C7.91683 0.332292 7.86733 0.257857 7.80474 0.195262C7.74214 0.132667 7.66771 0.083165 7.58578 0.0496444C7.50385 0.0161238 7.41606 -0.00074404 7.32754 2.51711e-05C7.23902 0.000794382 7.15154 0.0191852 7.0702 0.0541246C6.98887 0.0890639 6.91531 0.139852 6.85381 0.203525Z"\n fill="#BCBCBC"\n />\n </svg>\n `}function m(r,i){const o=r.context||i.context;"parent"===o&&(e=e.parent,t=e.parent.document),"top"===o&&(e=e.top,t=e.top.document)}function g(e,r){const i=r||"kortWidgetCssStyle";let o=t.querySelector(`#${i}`);o&&o.parentNode.removeChild(o),(o=t.createElement("div")).id=i,o.innerHTML=`&shy;<style>${e}</style>`,t.documentElement.appendChild(o)}function b(e,r,i){let o,n;if("PAGE_ELEMENT"===e.cutoffType&&(n=t.querySelector(e.anchorSelector))){const t=n.getBoundingClientRect(),a=r.getBoundingClientRect();"ABOVE"===e.lengthFromAnchorElementType?o=t.top-a.top-e.lengthFromAnchorElement:(o=t.bottom-a.top+e.lengthFromAnchorElement,o+=i.getBoundingClientRect().height)}return o}function f(e,t,r){if(TRC.util.isPercentEnabled(TRCImpl.global,"read-more-events-enabled")){const i={event_type:"read_more",event_state:e,event_value:t,event_msg:r};this.sendEvent("supply-feature",{d:JSON.stringify(i)},null)}}function v(e,t,r){function i(e){for(;-1===e.className.indexOf("trc_related_container")||e.parentNode.className.indexOf("trc_related_container")>-1;)e=e.parentNode;return e}const o=i(e.container),n=d(),a=r.getBoundingClientRect().top+n;if(n<t.scrollSize)return{scrollHeight:n,renderHeight:t.minimizedSize+a,articleRenderOffset:t.minimizedSize};const l=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),c=o.getBoundingClientRect().top,p=c-l;if(p<2*s)return null;const h=n+l,u={scrollHeight:n,renderHeight:h+s,articleRenderOffset:h+s-a};return u}function C(n){const a=s(n);function s(n){try{const a=f.trcBind(n);TRC.tlf&&console.time("init Read More"),a("Available",!0,null);const s=l(n.readMorePageConfig,n.readMoreConfig);if(m(n.readMorePageConfig,n.readMoreConfig),!e.matchMedia)return a("Rendered",!1,"match media is not supported"),!1;if(!s.boxSelector)return a("Rendered",!1,"no box selector defined"),!1;const u=t.querySelector(s.boxSelector);if(!u)return a("Rendered",!1,"box content not detected"),!1;if(t.querySelector(`.${r}`)===u)return a("Rendered",!1,"box content already in use"),!1;let C=!(d()>=s.scrollSize);if(TRCImpl.global["read-more-scroll-fast-enabled"]&&(C=v(n,s,u))&&s.minimizedSize<C.articleRenderOffset&&(s.minimizedSize=C.articleRenderOffset),!C||u.offsetHeight<s.threshold)return a("Rendered",!1,"dimensions exception"),!1;u.className+=i,g(c(s));const T=h(s,n.id);u.appendChild(T);const y=b(s,u,T);y&&(u.style.maxHeight=`${y}px`),TRC.CLSReporter.addCLSEventFilter({prefixMessage:"Send CLS report from Read-More"}),TRC.readMoreVisible=!0,TRC.dispatch("readMoreRendered"),TRC.EventsAPI.readmore("render",n.response&&n.response.trc),TRCImpl.global["read-more-scroll-fast-enabled"]&&TRCImpl.sendAbTestEvent("rendered",{renderingHeight:C.renderHeight,scrollHeight:C.scrollHeight}),t.querySelector(`#${o}_${n.id}`).addEventListener("click",p.trcBind(n),!1),a("Rendered",!0,null);const R={targetElement:T,onEnter:()=>{a("Visible",!0,null),TRC.intersections.unobserve(w)}},w=TRC.intersections.observe(R);return TRC.tlf&&console.timeEnd("init Read More"),!0}catch(e){return __trcError("Error read more init",e),!1}}a||TRC.EventsAPI.readmore("none",n.response&&n.response.trc)}TRC._translationQueue=TRC._translationQueue||[],TRC._translationQueue.push({"read-more":{DEFAULT_CAPTION:a}}),TRC.setReadMore=C})(window,document);const CLASSES={SLIDER:"tbl-reco-reel-slider",SLIDER_CLOSE:"tbl-reco-reel-slider-close",SLIDER_CLOSE_HOVER:"tbl-close-hover",SLIDER_MOBILE:"tbl-slider-mobile",SLIDER_DESKTOP:"tbl-slider-desktop",SLIDER_OVERLAY:"tbl-slider-overlay",SLIDER_CONTROLLERS:"tbl-slider-controllers",SHOW_SLIDER_OVERLAY:"tbl-slider-show",SLIDER_CONTROL:"tbl-slider-control",SLIDER_PLAY:"tbl-slider-play",SLIDER_NAVIGATION:"tbl-slider-navigation",SLIDER_CLOSE_BUTTON:"tbl-slider-close",SLIDER_ARROW:"tbl-slider-arrow-btn",SLIDER_CLOSE_BTN:"tbl-slider-close-btn",PAUSE:"tbl-slider-pause",HIDDEN:"tbl-hidden",TEXT_CONTAINER:"tbl-text-container",MIN_DESIGN_WRAPPER:"tbl-reco-reel-min-design",START_CTA_ANIMATION:"tbl-start-cta"},ATTRIBUTES={FRIENDLY_OVERLAY:"data-tbl-friendly-overlay"},DIRECTIONS={BOTTOM:"bottom",LEFT:"left"},POSITIONS={ABOVE_RECOREEL:"above",BELOW_RECOREEL:"below"},ANIMATION_STATUS={PAUSED:"paused",RUNNING:"running"},PLATFORMS={DESKTOP:"desktop",MOBILE:"mobile"},SELECTORS={TITLE_BACKGROUND:".tbl-text-under-title-background"},CONTROL_BUTTON_TYPES={BACK:"back",PLAY:"play",PAUSE:"pause",FORWARD:"forward",CLOSE:"close",NAVIGATE:"navigate",MUTE:"mute"},ADD="addClass",REMOVE="removeClass",TICK_CYCLE=150,CONTROLLERS_FADE_DURATION=2e3,CLIENT_PROPERTIES={ENABLE_SLIDER:"recommendationReel-enable-slider",NAVIGATION_TEXT:"recommendationReel-slider-navigation-text",BELOW_ONLY:"recommendationReel-slider-below-only",BELOW_FIRST_ITEM_ONLY:"recommendationReel-slide-below-first-item-only",START_FROM_SLIDER:"recommendationReel-slider-start-from-slider",SLIDER_POSITION:"recommendationReel-slider-position",TEXT_UNDER_SLIDER_IN_ONLY:"recommendationReel-slider-text-under-slide-in-only",DISCLOSURE_LINK_TEXT:"disclosure-link-text-sponsored",IS_VIDEO_REEL:"recommendationReel-is-videoreel",AUTO_PAUSE:"recommendationReel-auto-pause",IS_MINUTELY_DESIGN:"recommendationReel-is-min-adx",CTA_TEXT:"recommendationReel-min-adx-cta-text",VERTICAL_LINE_COLOR:"recommendationReel-min-adx-line-color",PROGRESS_BAR_COLOR:"recommendationReel-min-adx-progress-color",REEL_INTERVAL:"recommendationReel-interval"},DEFAULT_REEL_INTERVAL=7,EVENT_TYPES={RECO_REEL_SLIDER:"RECO_REEL_SLIDER",CONFIGURATION:"CONFIGURED",VISIBLE:"VISIBLE",INTERACTION:"INTERACTION",AVAILABLE:"AVAILABLE",DEFAULT:"default - detach both ways"},EVENT_VALUES={EVENT_VALUES_LIST:["belowOnly","belowOnlyFirstSlider","shouldStartFromSlider"]},CONTROL_BUTTONS$1={[CONTROL_BUTTON_TYPES.BACK]:`<svg width="39" height="38" viewBox="0 0 39 38" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g filter="url(#filter0_d)">\n <rect x="11" y="12.137" width="3.27471" height="14.1904" fill="white"/>\n <path d="M27.1615 11.0844C27.0293 11.0181 26.8811 10.99 26.7338 11.0032C26.5865 11.0164 26.4457 11.0704 26.3274 11.1592L16.7761 18.3226C16.6773 18.3967 16.5971 18.4929 16.5418 18.6034C16.4865 18.7139 16.4578 18.8358 16.4578 18.9593C16.4578 19.0829 16.4865 19.2048 16.5418 19.3153C16.5971 19.4258 16.6773 19.522 16.7761 19.5961L26.3274 26.7595C26.4651 26.8629 26.6327 26.9187 26.8049 26.9187C26.9287 26.9182 27.0507 26.8894 27.1615 26.8343C27.2936 26.7682 27.4046 26.6666 27.4822 26.5409C27.5598 26.4152 27.6009 26.2705 27.6009 26.1228V11.7959C27.6009 11.6482 27.5598 11.5035 27.4822 11.3778C27.4046 11.2521 27.2936 11.1505 27.1615 11.0844Z" fill="white"/>\n </g>\n <defs>\n <filter id="filter0_d" x="0" y="0" width="38.6009" height="37.9187" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n <feFlood flood-opacity="0" result="BackgroundImageFix"/>\n <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>\n <feOffset/>\n <feGaussianBlur stdDeviation="5.5"/>\n <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.64 0"/>\n <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>\n <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>\n </filter>\n </defs>\n </svg>`,[CONTROL_BUTTON_TYPES.PLAY]:`<svg width="35" height="38" viewBox="0 0 35 38" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g filter="url(#filter1_d)">\n <path d="M11.4787 11.0844C11.6228 11.0181 11.7841 10.99 11.9446 11.0032C12.1052 11.0164 12.2585 11.0704 12.3874 11.1592L22.7932 18.3226C22.9009 18.3967 22.9883 18.4929 23.0485 18.6034C23.1087 18.7139 23.14 18.8358 23.14 18.9593C23.14 19.0829 23.1087 19.2048 23.0485 19.3153C22.9883 19.4258 22.9009 19.522 22.7932 19.5961L12.3874 26.7595C12.2373 26.8629 12.0548 26.9187 11.8672 26.9187C11.7323 26.9182 11.5994 26.8894 11.4787 26.8343C11.3348 26.7682 11.2139 26.6666 11.1293 26.5409C11.0448 26.4152 11 26.2705 11 26.1228V11.7959C11 11.6482 11.0448 11.5035 11.1293 11.3778C11.2139 11.2521 11.3348 11.1505 11.4787 11.0844Z" fill="white"/>\n </g>\n <defs>\n <filter id="filter1_d" x="0" y="0" width="34.14" height="37.9187" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n <feFlood flood-opacity="0" result="BackgroundImageFix"/>\n <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>\n <feOffset/>\n <feGaussianBlur stdDeviation="5.5"/>\n <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.64 0"/>\n <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>\n <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>\n </filter>\n </defs>\n </svg>`,[CONTROL_BUTTON_TYPES.PAUSE]:`<svg width="33" height="38" viewBox="0 0 33 38" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g filter="url(#filter2_d)">\n <rect x="11" y="11.0455" width="3.82049" height="15.8278" fill="white"/>\n <rect x="18.0952" y="11.0455" width="3.82049" height="15.8278" fill="white"/>\n </g>\n <defs>\n <filter id="filter2_d" x="0" y="0.0454712" width="32.9157" height="37.8278" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n <feFlood flood-opacity="0" result="BackgroundImageFix"/>\n <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>\n <feOffset/>\n <feGaussianBlur stdDeviation="5.5"/>\n <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.64 0"/>\n <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>\n <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>\n </filter>\n </defs>\n </svg>`,[CONTROL_BUTTON_TYPES.FORWARD]:`<svg width="39" height="38" viewBox="0 0 39 38" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g filter="url(#filter3_d)">\n <rect width="3.27471" height="14.1904" transform="matrix(-1 0 0 1 28.0001 12.137)" fill="white"/>\n <path d="M11.8385 11.0844C11.9708 11.0181 12.1189 10.99 12.2663 11.0032C12.4136 11.0164 12.5543 11.0704 12.6727 11.1592L22.2239 18.3226C22.3228 18.3967 22.403 18.4929 22.4583 18.6034C22.5135 18.7139 22.5423 18.8358 22.5423 18.9593C22.5423 19.0829 22.5135 19.2048 22.4583 19.3153C22.403 19.4258 22.3228 19.522 22.2239 19.5961L12.6727 26.7595C12.5349 26.8629 12.3673 26.9187 12.1951 26.9187C12.0714 26.9182 11.9494 26.8894 11.8385 26.8343C11.7065 26.7682 11.5955 26.6666 11.5179 26.5409C11.4403 26.4152 11.3992 26.2705 11.3992 26.1228V11.7959C11.3992 11.6482 11.4403 11.5035 11.5179 11.3778C11.5955 11.2521 11.7065 11.1505 11.8385 11.0844Z" fill="white"/>\n </g>\n <defs>\n <filter id="filter3_d" x="0.39917" y="0" width="38.6009" height="37.9187" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n <feFlood flood-opacity="0" result="BackgroundImageFix"/>\n <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>\n <feOffset/>\n <feGaussianBlur stdDeviation="5.5"/>\n <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.64 0"/>\n <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>\n <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>\n </filter>\n </defs>\n </svg>`,[CONTROL_BUTTON_TYPES.MUTE]:`<svg height="100%" width="100%" viewBox="0 0 33 33">\n <path d="m 21.48,17.98 c 0,-1.77 -1.02,-3.29 -2.5,-4.03 v 2.21 l 2.45,2.45 c .03,-0.2 .05,-0.41 .05,-0.63 z m 2.5,0 c 0,.94 -0.2,1.82 -0.54,2.64 l 1.51,1.51 c .66,-1.24 1.03,-2.65 1.03,-4.15 0,-4.28 -2.99,-7.86 -7,-8.76 v 2.05 c 2.89,.86 5,3.54 5,6.71 z M 9.25,8.98 l -1.27,1.26 4.72,4.73 H 7.98 v 6 H 11.98 l 5,5 v -6.73 l 4.25,4.25 c -0.67,.52 -1.42,.93 -2.25,1.18 v 2.06 c 1.38,-0.31 2.63,-0.95 3.69,-1.81 l 2.04,2.05 1.27,-1.27 -9,-9 -7.72,-7.72 z m 7.72,.99 -2.09,2.08 2.09,2.09 V 9.98 z" fill="white">\n </path>\n </svg>`};class SliderEventManager{static handleSliderEvents(e,t,r){if(!e)return;const{handleSliderConfigEvent:i,sliderSendEvent:o,sliderEventTimer:n}=SliderEventManager;switch(e){case EVENT_TYPES.CONFIGURATION:i(t);break;case EVENT_TYPES.INTERACTION:o(e,t);break;case EVENT_TYPES.AVAILABLE:n(e,r);break;case EVENT_TYPES.VISIBLE:r&&!r.sliderFirstVisible?(n(e,r),r.sliderFirstVisible=!0):o(e)}}static handleSliderConfigEvent(e){if(!e)return;const t=[];EVENT_VALUES.EVENT_VALUES_LIST.forEach(r=>{TRC.util.isTrue(e[r])&&t.push(r)});const r=t.length<1?EVENT_TYPES.DEFAULT:t;SliderEventManager.sliderSendEvent(EVENT_TYPES.CONFIGURATION,r)}static sliderEventTimer(e,t){if(!e)return;const r=performance.now()-t.sliderEventTimer;SliderEventManager.sliderSendEvent(e,r)}static sliderSendEvent(e,t){const r={event_type:EVENT_TYPES.RECO_REEL_SLIDER,event_state:e,event_value:Array.isArray(t)?t.join(","):t};TRCImpl.sendEvent("supply-feature",{d:JSON.stringify(r)},null)}}var SliderEventManager$1={handleSliderEvents:SliderEventManager.handleSliderEvents};class RecommendationReelSlider{constructor(e){this.rbox=e,this.trcManager=e.trc,this.modeName=e.options.mode_name,this.numberOfInstances=0,this.IntersectionObserver=TRC.IntersectionObserver||window.IntersectionObserver,this.options=this.getOptions(),!RecommendationReelSlider.isStyleInjected&&RecommendationReelSlider.injectStyle(),SliderEventManager$1.handleSliderEvents(EVENT_TYPES.CONFIGURATION,this.options)}static getInstance(e){return RecommendationReelSlider.instance=new RecommendationReelSlider(e.rbox)}getOptions(){return{onlyNewRecoReel:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.TEXT_UNDER_SLIDER_IN_ONLY,this.rbox.propertiesOverride),belowOnly:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.BELOW_ONLY,this.rbox.propertiesOverride),belowOnlyFirstSlider:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.BELOW_FIRST_ITEM_ONLY,this.rbox.propertiesOverride),shouldStartFromSlider:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.START_FROM_SLIDER,this.rbox.propertiesOverride),position:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.SLIDER_POSITION,this.rbox.propertiesOverride),navigationText:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.NAVIGATION_TEXT,this.rbox.propertiesOverride),text:this.trcManager.getProperty(this.modeName,CLIENT_PROPERTIES.DISCLOSURE_LINK_TEXT,this.rbox.propertiesOverride)}}static injectStyle(){TRC.dom.injectStyle(`.tbl-reco-reel-slider { animation: tbl-slideInRight 0.5s forwards; position: fixed !important; width: 100% !important; max-width: 200px; margin-top: 0 !important; top: 50%; right: 0; } @media (min-width: 1024px) { .tbl-reco-reel-slider { max-width: 400px; } } .tbl-reco-reel-slider.tbl-slider-left { animation: tbl-slideInLeft 0.5s forwards; right: unset; left: 0; } .tbl-reco-reel-slider.tbl-slider-bottom { top: unset; bottom: 0; } .tbl-reco-reel-slider.tbl-reco-reel-slider-close { animation: tbl-slideOutRight 0.5s forwards; } .tbl-reco-reel-slider.tbl-reco-reel-slider-close.tbl-slider-left { animation: tbl-slideOutLeft 0.5s forwards; } .tbl-reco-reel-slider .tbl-story-progressBar-overflow-wrp { height: 30% !important; } .tbl-reco-reel-slider .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp { height: 100% !important; } .tbl-reco-reel-slider .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar { height: 50% !important; } .tbl-reco-reel-slider .item-label-href { bottom: 0; top: unset; height: auto; left: 3% !important; position: absolute; } .tbl-reco-reel-slider .item-label-href > * { top: unset !important; } .tbl-reco-reel-slider .item-label-href .tbl-text-under-title-background-wrapper { width: 100% !important; height: 100% !important; bottom: 0; display: block; } @media (min-width: 1024px) { .tbl-reco-reel-slider .item-label-href .tbl-text-under-title-background-wrapper { font-size: 15px; } } .tbl-reco-reel-slider .item-label-href .tbl-text-under-title-background-wrapper .tbl-text-under-title-background { display: block; width: 100%; height: 100%; } .tbl-reco-reel-slider .item-label-href .tbl-ui-line-wrapper { height: 100% !important; } .tbl-reco-reel-slider .item-label-href .tbl-ui-line-wrapper .tbl-ui-line { display: block; width: 100%; } .tbl-reco-reel-slider .item-label-href .video-label-box.trc-main-label { position: static !important; } @media (min-width: 1024px) { .tbl-reco-reel-slider .item-label-href .video-label-box.trc-main-label { padding: 5px 0; } } .tbl-reco-reel-slider .thumbBlock_holder { height: 100%; } .tbl-reco-reel-slider .tbl-text-under-title-background.label-show .tbl-text-container { background: #EBEBEB; color: #9E9E9E; font-size: 12px; font-weight: 600; position: absolute; z-index: 333; right: 0; top: -20px; padding: 0 10px; display: block !important; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-text-under-title-background.label-show .tbl-text-container { font-size: 15px; } } .tbl-reco-reel-slider .video-label-box .video-title { overflow: revert; margin: 3px 5px !important; -webkit-line-clamp: 2 !important; font-size: 12px; line-height: 15px; } @media (min-width: 1024px) { .tbl-reco-reel-slider .video-label-box .video-title { font-size: 15px; margin: 0 6px !important; line-height: 16px; } } .tbl-reco-reel-slider .video-label-box .branding { display: none !important; } .tbl-reco-reel-slider .thumbBlock .thumbnail-emblem.top-left { width: 20px; height: 20px; top: 12%; left: 5%; } @media (min-width: 1024px) { .tbl-reco-reel-slider .thumbBlock .thumbnail-emblem.top-left { width: 45px; height: 45px; top: 8%; left: 4%; } } .tbl-reco-reel-slider .tbl-slider-arrow-btn { position: absolute; top: calc(50% - 15px); width: 40px; height: 40px; z-index: 2; display: flex; align-items: center; padding: 0 5px; justify-content: flex-end; } @media (min-width: 1024px) { .tbl-reco-reel-slider .tbl-slider-arrow-btn { top: calc(50% - 10px); justify-content: center; padding: 0; } } .tbl-reco-reel-slider .tbl-slider-arrow-btn.tbl-arrow-right { right: 0; } .tbl-reco-reel-slider .tbl-slider-arrow-btn.tbl-arrow-left { -webkit-transform: scaleX(-1); -moz-transform: scaleX(-1); -ms-transform: scaleX(-1); -o-transform: scaleX(-1); transform: scaleX(-1); } .tbl-reco-reel-slider .tbl-slider-arrow-btn svg { filter: drop-shadow(0px 0px 2px #00000066); }.tbl-slider-close-btn { position: fixed; z-index: 333; right: 0; display: flex; justify-content: center; align-items: center; width: 22px; height: 22px; background-color: #C7C7C7; } @media (min-width: 1024px) { .tbl-slider-close-btn { width: 25px; height: 25px; } }.tbl-text-under-title-background .tbl-text-container { display: none; }@keyframes tbl-slideInRight { 0% { transform: translateX(100%); } 100% { transform: translateX(0); } }@keyframes tbl-slideOutRight { 0% { transform: translateX(0); } 100% { transform: translateX(100%); } }@keyframes tbl-slideInLeft { 0% { transform: translateX(-100%); } 100% { transform: translateX(0); } }@keyframes tbl-slideOutLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }`),RecommendationReelSlider.isStyleInjected=!0}createSlider(e){try{const{isTextUnderSlideIn:t}=e,{setSliderContainer:r,isInViewport:i}=RecommendationReelSlider;if(this.options.onlyNewRecoReel&&!t)return;this.numberOfInstances++,e.firstSlider=1===this.numberOfInstances,e.sliderEventTimer=performance.now();const o=e.calcCardHeight();r(e),this.arrows=t&&RecommendationReelSlider.createArrowBtns(e),this.closeBtn=this.createCloseBtn(e),this.supportMultipleSliders(e,o),i(e.sliderContainer)||this.startFromSlider(e,o),this.initRecoreelObserver(e,o),this.handleSponsoredItems(e),SliderEventManager$1.handleSliderEvents(EVENT_TYPES.AVAILABLE,null,e)}catch(e){__trcError(`Failed to create recommendation reel slider - ${e.message}`)}}handleSponsoredItems(e){e.items.forEach(e=>{if(!(e&&e.video_data&&e.video_data["is-syndicated"]))return;const t=e.querySelector(SELECTORS.TITLE_BACKGROUND);this.textContainer=TRC.dom.createHTMLElement("span",{className:CLASSES.TEXT_CONTAINER,innerText:this.options.text}),this.setTextContainerBackground(e,t),t.insertAdjacentElement("afterbegin",this.textContainer)})}setTextContainerBackground(e,t){const r=getComputedStyle(t).backgroundColor;r&&(this.textContainer.style.backgroundColor=r)}static setSliderContainer(e){e.sliderContainer=e.isTextUnderSlideIn?e.internalc.parentNode:e.container}supportMultipleSliders(e,t){2===this.numberOfInstances&&this.addMultipleSlidersSupport(),RecommendationReelSlider.listenToSliderStop(e,t)}addMultipleSlidersSupport(){const e=RecommendationReelSlider.onSliderEnd;RecommendationReelSlider.onSliderEnd=((t,r)=>{if(!t.sliderActive)return r.itemHeight=TRC.RecommendationReel.getOuter("height",r.item),void TRC.dispatch("tbl-recommendation-reel-slider-stop");e.call(this,t,r),TRC.dispatch("tbl-recommendation-reel-slider-stop")})}startFromSlider(e,t){if(!this.options.shouldStartFromSlider||1!==this.numberOfInstances)return;const r=TRC.listen("item-image-loaded",i=>{this.rbox.boxes&&this.rbox.boxes.length&&this.rbox.boxes[0]===i.container&&(TRC.dom.removeClass(e.mainContainer,"tbl-invisible"),this.onSliderStart(e,t),r.remove())})}static isInViewport(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}static listenToSliderStop(e,t){TRC.listen("tbl-recommendation-reel-slider-stop",()=>{e.sliderActive&&RecommendationReelSlider.onSliderEnd(e,t)})}initRecoreelObserver(e,t){const r=TRC.dom.detectAnimationEvent(e.sliderContainer,"end")||"animationend";TRC.dom.on(e.sliderContainer,r,()=>this.onSliderAnimationEnd(e,t));const{mainContainer:i}=e,o={root:null,rootMargin:"0px",threshold:[.5]};e.sliderObserver=new this.IntersectionObserver(([r])=>{const{ABOVE_RECOREEL:i,BELOW_RECOREEL:o}=POSITIONS,n=r.intersectionRect.y?i:o,a=this.options.belowOnlyFirstSlider&&e.firstSlider||this.options.belowOnly;if(0!==r.intersectionRatio&&(n!==i||!a))return r.isIntersecting?this.onSliderEnd(e,t):void this.onSliderStart(e,t,r)},o),e.sliderObserver.observe(i)}static setContainerStaticHeight(e,t,r){const i=r&&r.boundingClientRect&&r.boundingClientRect.height;e.mainContainer.style.height=`${i||t.itemHeight}px`}static removeContainerStaticHeight(e){e.mainContainer.style.removeProperty("height")}fastScrollSupport(e){RecommendationReelSlider.preventSliderClose(e),TRC.dom.removeClass(e.sliderContainer,CLASSES.SLIDER_CLOSE),this.toggleSliderArrows("removeClass"),RecommendationReelSlider.toggleElementVisible("removeClass",this.closeBtn),RecommendationReelSlider.toggleElementVisible("addClass",e.controls),e.sliderActive=!0}static preventSliderClose(e){clearTimeout(e.isCloseAnimationRunning),e.isCloseAnimationRunning=null}onSliderStart(e,t,r){const{setContainerStaticHeight:i,reCalculateSliderSize:o}=RecommendationReelSlider;if(e.isCloseAnimationRunning)return this.fastScrollSupport(e);i(e,t,r),this.setSliderFixedPosition(e.sliderContainer,ADD),TRC.dom.addClass(e.sliderContainer,CLASSES.SLIDER),o(e,t),this.toggleSliderArrows("removeClass"),this.setCloseBtnBottomSpace(e),RecommendationReelSlider.toggleElementVisible("removeClass",this.closeBtn),RecommendationReelSlider.toggleElementVisible("addClass",e.controls),TRC.dispatch("tbl-recommendation-reel-slider-open"),e.sliderActive=!0,SliderEventManager$1.handleSliderEvents(EVENT_TYPES.VISIBLE,null,e)}setSliderFixedPosition(e,t){const{position:r}=this.options;r.split(" ").forEach(r=>{switch(r){case DIRECTIONS.LEFT:case DIRECTIONS.BOTTOM:TRC.dom[t](e,`tbl-slider-${r}`)}})}onSliderAnimationEnd(e,t){if(!e.isCloseAnimationRunning)return;const{reCalculateSliderSize:r,removeContainerStaticHeight:i}=RecommendationReelSlider;TRC.dom.addClass(e.sliderContainer,CLASSES.HIDDEN),setTimeout(()=>{if(null===e.isCloseAnimationRunning)return TRC.dom.removeClass(e.sliderContainer,CLASSES.HIDDEN);TRC.dom.removeClass(e.sliderContainer,CLASSES.SLIDER),TRC.dom.removeClass(e.sliderContainer,CLASSES.SLIDER_CLOSE),this.setSliderFixedPosition(e.sliderContainer,REMOVE),TRC.dom.removeClass(e.sliderContainer,CLASSES.HIDDEN),r(e,t),i(e),e.isCloseAnimationRunning=null,TRC.dispatch("tbl-recommendation-reel-slider-close")},TICK_CYCLE)}onSliderEnd(e){e.sliderActive&&(TRC.dom.addClass(e.sliderContainer,CLASSES.SLIDER_CLOSE),this.toggleSliderArrows("addClass"),RecommendationReelSlider.toggleElementVisible("addClass",this.closeBtn),RecommendationReelSlider.toggleElementVisible("removeClass",e.controls),e.isCloseAnimationRunning=!0,e.sliderActive=!1)}static reCalculateSliderSize(e,t){e.recalculateWidgetSize(t),e.isTextUnderSlideIn&&e.calcLabelBoxSizes()}static createArrowBtns(e){return e.isWithVideoLayout?[]:["left","right"].map(t=>{const r=document.createElement("div");return r.className=`${CLASSES.SLIDER_ARROW} tbl-arrow-${t}`,r.insertAdjacentHTML("beforeend",RecommendationReelSlider.addASvgArrow()),TRC.dom.on(r,"click",e.slideCard.trcBind(e)),e.internalc&&e.internalc.parentNode&&e.internalc.parentNode.appendChild(r),r})}static addASvgArrow(){return`<svg width="10px" height="20px" viewBox="0 0 17 29" version="1.1" xmlns="http://www.w3.org/2000/svg">\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Desktop-4-cards" transform="translate(-1073.000000, -436.000000)" fill="#FFFDFD" fill-rule="nonzero">\n <g id="Group" transform="translate(1081.500000, 450.500000) scale(-1, 1) translate(-1081.500000, -450.500000) translate(1073.000000, 436.000000)">\n <polygon id="Rectangle-5" transform="translate(8.294336, 8.495231) rotate(45.000000) translate(-8.294336, -8.495231) " points="7.05498966 -1.37457069 9.68971053 -1.39537442 9.53368258 18.3650322 6.8989617 18.3858359"></polygon>\n <polygon id="Rectangle-5" transform="translate(8.294336, 20.257858) scale(1, -1) rotate(45.000000) translate(-8.294336, -20.257858) " points="7.05498966 10.3880565 9.68971053 10.3672528 9.53368258 30.1276594 6.8989617 30.1484631"></polygon>\n </g>\n'\n </g>\n'\n </g>\n'\n </svg>`}toggleSliderArrows(e){const{HIDDEN:t}=CLASSES;this.arrows.forEach(r=>{TRC.dom[e](r,t)})}createCloseBtn(e){const t=document.createElement("div");return TRC.dom.addClass(t,`${CLASSES.SLIDER_CLOSE_BTN} ${CLASSES.HIDDEN}`),t.insertAdjacentHTML("beforeend",RecommendationReelSlider.addCloseBtnSVG()),TRC.dom.on(t,"click",()=>{this.onSliderEnd.trcBind(this,e)(),e.sliderObserver.unobserve(e.mainContainer)}),e.container&&e.container.appendChild(t),t}setCloseBtnBottomSpace(){this.closeBtn.style.bottom=`${this.rbox.internalContainer&&this.rbox.internalContainer.clientHeight}px`}static addCloseBtnSVG(){const e=10;return`<svg width="${e}" height="${e}" viewBox="0 0 ${e} ${e}" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0 0 0L${e} ${e}" stroke="#ffffff" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M${e} 0 ${e} 0L0 ${e}" stroke="#ffffff" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>`}static toggleElementVisible(e,t){const{HIDDEN:r}=CLASSES;TRC.dom[e](t,r)}}class ReelCTA{constructor(e){this.wrap=createCtaElement(e.text,e.clickCB),!ReelCTA.injected&&ReelCTA.injectStyle(e.duration)}static injectStyle(e){TRC.dom.injectStyle(`.tbl-rr-cta { text-align: right; margin-bottom: 10px; } .tbl-rr-cta-text { line-height: 27px; font-family: Arial, serif; font-size: 14px; } .tbl-rr-cta-inner { display: inline-block; padding: 2px 15px; border-radius: 6px; border: 1px solid #E4E4E4; background-color: #E4E4E4; position: relative; overflow: hidden; z-index: 2; -webkit-animation-play-state: inherit; -moz-animation-play-state: inherit; -ms-animation-play-state: inherit; -o-animation-play-state: inherit; animation-play-state: inherit; } .tbl-rr-cta-inner:hover { cursor: pointer; } .tbl-rr-cta-inner::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background-color: #CBCBCB; z-index: -1; -webkit-animation-play-state: inherit; -moz-animation-play-state: inherit; -ms-animation-play-state: inherit; -o-animation-play-state: inherit; animation-play-state: inherit; -webkit-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; animation-fill-mode: forwards; } .tbl-rr-cta.tbl-start-cta .tbl-rr-cta-inner::before { -webkit-animation: ${e}s linear 0s 1 normal tbl-rr-fillBackground; -moz-animation: ${e}s linear 0s 1 normal tbl-rr-fillBackground; -ms-animation: ${e}s linear 0s 1 normal tbl-rr-fillBackground; -o-animation: ${e}s linear 0s 1 normal tbl-rr-fillBackground; animation: ${e}s linear 0s 1 normal tbl-rr-fillBackground; }@keyframes tbl-rr-fillBackground { 0% { left: -100%; } 100% { left: 0; } }`),ReelCTA.injected=!0}start(){this.wrap.classList.remove(CLASSES.START_CTA_ANIMATION),setTimeout(()=>{requestAnimationFrame(()=>{this.wrap.classList.add(CLASSES.START_CTA_ANIMATION)})},10)}setState(e){if(e===CONTROL_BUTTON_TYPES.PLAY)return this.wrap.classList.add(CLASSES.START_CTA_ANIMATION),this.wrap.style.webkitAnimationPlayState=ANIMATION_STATUS.RUNNING,void(this.wrap.style.animationPlayState=ANIMATION_STATUS.RUNNING);this.wrap.style.webkitAnimationPlayState=ANIMATION_STATUS.PAUSED,this.wrap.style.animationPlayState=ANIMATION_STATUS.PAUSED}}function createCtaElement(e,t){const r=document.createElement("div");r.className="tbl-rr-cta";const i=document.createElement("div");i.className="tbl-rr-cta-inner";const o=document.createElement("span");return o.className="tbl-rr-cta-text",o.textContent=TRC.text.htmlUnescape(e),i.appendChild(o),r.appendChild(i),t&&r.addEventListener("click",t),r}var components_es6={ReelCTA:ReelCTA};const defaultVideoAttributes=["loop","muted","playsinline"],EVENT_ID="recommendation-video-reel",VIDEO_URL_ATTRIBUTE="ovideo-url",VIDEO_REEL_ITEM="tbl-vrl-item",VIDEO_REEL_IDENTIFIER="tbl-vrl",DEFAULT_ANIMATION_DURATION=1e3,CONTROL_BUTTONS=[CONTROL_BUTTON_TYPES.PLAY,CONTROL_BUTTON_TYPES.PAUSE,CONTROL_BUTTON_TYPES.MUTE,CONTROL_BUTTON_TYPES.BACK,CONTROL_BUTTON_TYPES.FORWARD];class VideoReel{constructor(e){this.rbox=e,this.videoElements={},this.videoLoaders=[],this.itemTypes=[],this.isReadyToPlay=!1,this.placementData=e.recommendationList,this.setupVideoElements(),this.setVideoDesign(),VideoReel.injectStyles(),this.startLoading()}registerItemType(e){const t=getPlacementItemType(e);this.itemTypes.push(t)}setupVideoElements(){const e=Array.prototype.slice.call(this.rbox.boxes);e.forEach((e,t)=>{const r=this.placementData[t]||{},i=r[VIDEO_URL_ATTRIBUTE];if(this.registerItemType(r),!i)return;const o=e.querySelector(".thumbBlock_holder");TRC.dom.addClass(o,`${VIDEO_REEL_IDENTIFIER} ${VIDEO_REEL_ITEM}`);const n=()=>{const e=this._createVideoElement(i,t);o.appendChild(e)};this.videoLoaders.push(n)})}startLoading(){const e="VOC"===this.itemTypes[0];e?this.loadFirstVideo():this.showUnit()}setAsReady(){this.isReadyToPlay=!0}loadNextClips(){if(this.videoLoaders.length>0){const e=this.videoLoaders.shift();e()}}showUnit(){this.loadNextClips(),this.setAsReady(),this.startReelAnimation()}loadFirstVideo(){const e=this.videoLoaders.shift();e(),this.firstVideoTimeout=setTimeout(this.showUnit.bind(this),5e3)}reportFullCycle(){this.fullCycleIsReported||(this.fullCycleIsReported=!0,this.sendAbTestEvent("fullCycle"))}_createVideoElement(e,t){const r=_createWrapper(),i=_createVideoTag(e);return defaultVideoAttributes.forEach(e=>{i.setAttribute(e,"")}),this.videoElements[t]=i,i.addEventListener("error",e=>{const o=i.error?i.error.message||i.error.code:e.message;this.handleVideoError(t,o,r)},{once:!0}),i.addEventListener("canplaythrough",()=>{r.appendChild(i),i.classList.add("tbl-vid-active"),this.onReadyToPlay(t)},{once:!0}),r}handleVideoError(e,t,r){TRC.dom.removeClass(r.parentNode,VIDEO_REEL_ITEM),delete this.videoElements[e];const i=this.placementData[e].id;__trcError(`#${e} VOC error: ${t}:${i}`);const o=0===e;if(o)return clearTimeout(this.firstVideoTimeout),void this.showUnit();this.loadNextClips()}start(e,t){this.startReelCB=e,this.isReadyToPlay&&this.startReelAnimation();const r=this.videoElements[t];if(r)try{r.play()}catch(e){__trcWarn("error auto-playing first video: ",e)}}handleNextVideo(e,t){const r=this.videoElements[e];if(r){const e=()=>{try{r.pause(),r.currentTime=0}catch(e){__trcWarn("error pausing finished video: ",e)}};setTimeout(e,DEFAULT_ANIMATION_DURATION)}updateItemIndicator(this.itemIndicator,t+1),this.ctaButton&&this.ctaButton.start();const i=this.videoElements[t];if(i)try{i.play()}catch(e){__trcWarn("error playing next video: ",e)}}toggleMiddleControl(e,t){const r=this.videoElements[e];if(r){this.ctaButton&&this.ctaButton.setState(t);try{t===CONTROL_BUTTON_TYPES.PLAY?r.play():t===CONTROL_BUTTON_TYPES.PAUSE&&r.pause()}catch(e){__trcWarn(`error toggle ${t} video `,e)}this.sendAbTestEvent(t)}}startReelAnimation(){if(!this.startReelCB)return;const e=this.rbox.boxes[0];e.style.zIndex=1,this.startReelCB(),this.startReelCB=void 0,setTimeout(()=>{this.ctaButton&&this.ctaButton.setState(CONTROL_BUTTON_TYPES.PLAY),setTimeout(()=>{e.style.zIndex=null},100)},0)}reportVisible(e,t){const r=this.itemTypes[e];this.sendAbTestEvent(`${t}_${r}`)}onReadyToPlay(e){this.sendAbTestEvent(`#${e} VOC readyToPlay`);const t=0===e;if(t)return clearTimeout(this.firstVideoTimeout),void this.showUnit();this.loadNextClips()}getProgressBarStyle(e){const t=`width: ${100/e}%`;return this.layout.adx,t}getDesignTypeClass(){return this.layout.class}setLayoutOptions(e){this.layout=e}isWithVideoLayout(){return!!this.layout}setAdxVideoDesign(){const e=getModeProperty(this.rbox,CLIENT_PROPERTIES.VERTICAL_LINE_COLOR),t=getModeProperty(this.rbox,CLIENT_PROPERTIES.PROGRESS_BAR_COLOR);injectMinutelyAdxCompliantStyles(e,t),TRC.dom.injectStyle("@import url(//fonts.googleapis.com/css?family=Roboto+Condensed);"),this.setLayoutOptions({class:CLASSES.MIN_DESIGN_WRAPPER,controlButtons:CONTROL_BUTTONS,adx:!0})}setVideoDesign(){const e=getModeProperty(this.rbox,CLIENT_PROPERTIES.IS_MINUTELY_DESIGN);e&&this.setAdxVideoDesign()}getControlButtons(){return this.layout.controlButtons}static initiate(e){const t=TRC.util.isTrue(getModeProperty(e,CLIENT_PROPERTIES.IS_VIDEO_REEL));if(t)return new VideoReel(e)}static injectStyles(){VideoReel.cssLoaded||(TRC.dom.injectStyle(`.tbl-vrl-item .thumbBlock { background-image: unset !important; }.tbl-vrl-item .tbl-vrl-video-wrapper { height: 100%; width: 100%; background-color: transparent; background-size: auto; text-align: center; overflow: hidden; display: block; position: absolute; top: 0; z-index: 9999; } .tbl-vrl-item .tbl-vrl-video-wrapper video { width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; -o-object-fit: contain; -o-object-position: 50% 50%; display: none; } .tbl-vrl-item .tbl-vrl-video-wrapper video.tbl-vid-active { display: block; }`),VideoReel.cssLoaded=!0)}addCta(e){const t=this.ctaButton=_addCtaButton(this.rbox);if(!t)return;const r=()=>{const t=e.querySelector(".videoCube.tbl-show-item .item-label-href");t&&(this.sendAbTestEvent("ctaClick"),t.click())};t.wrap.addEventListener("click",r),e.insertAdjacentElement("afterbegin",t.wrap)}createAdditionalLayout(e,t){this.addCta(t),this.addItemIndicator(e)}addItemIndicator(e){const t=this.rbox.recommendationList.length;this.itemIndicator=addCurrentItemIndicator(e,t)}sendAbTestEvent(e){const t={abTestsEventType:"simple",name:EVENT_ID,type:e,eventTime:(new Date).getTime()};this._sendEvent("abtests",t)}_sendEvent(e,t){const r={d:JSON.stringify(t),ri:this.rbox.reqId};this.rbox.trc.sendEvent(e,r,{})}}function _addCtaButton(e){const t=getCtaOptions(e);if(t.text)return new ReelCTA(t)}function getCtaOptions(e){const t=getModeProperty(e,CLIENT_PROPERTIES.CTA_TEXT);if(!t)return{};const r=getModeProperty(e,CLIENT_PROPERTIES.REEL_INTERVAL),i=(r?+r:DEFAULT_REEL_INTERVAL)+.9;return{text:t,duration:i}}function injectMinutelyAdxCompliantStyles(e,t){TRC.dom.injectStyle(`div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-rr-item-indicator { float: right; color: white; line-height: 40px; font-family: Arial, serif; margin-right: 10px; }div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-rr-current-indicator { font-weight: bold; }div.tbl-reco-reel.tbl-reco-reel-min-design ._cm-native-ad-bottom { background-color: #0000005c; }div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-reco-reel-progressBar-overflow-wrp { width: 100%; bottom: 40px; top: unset; height: 5px !important; } div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar { margin: 0; top: 0; height: 5px; } div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner { background-color: ${t}; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp { padding: 0; height: 5px; background: transparent; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .tbl-recommendation-reel .item-label-href .tbl-text-under-title-background { top: 0; height: 100%; width: 100%; display: block; -webkit-transition: all .3s; -moz-transition: all .3s; -ms-transition: all .3s; -o-transition: all .3s; transition: all .3s; position: relative; background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(1, 0, 0, 0.8) 100%); background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(1, 0, 0, 0.8))); background: -o-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(1, 0, 0, 0.8) 100%); background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(1, 0, 0, 0.8) 100%); pointer-events: none; opacity: 0; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .tbl-recommendation-reel .item-label-href .tbl-text-under-title-background.label-show { opacity: 1; pointer-events: all; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .item-label-href .video-label-box { margin-left: 10px; padding-left: 10px; width: 90%; position: relative; top: 0; } div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .item-label-href .video-label-box .video-title { margin: 10px 0 7px 7px; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper { left: 15px; height: 100%; top: 0; } div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .tbl-ui-line { background: ${e}; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper { top: 0; width: 100%; height: calc(100% + 15px); left: 0; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer a.item-label-href { position: absolute; bottom: 55px; left: 0; width: 100%; } div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer a.item-label-href span { color: white; background: transparent; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .videoCube .thumbBlock_holder .thumbBlock_placeholder { background-color: black; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .videoCube .item-label-href .video-label-box .video-description { left: 0; opacity: 0; -webkit-transition: all .3s; -moz-transition: all .3s; -ms-transition: all .3s; -o-transition: all .3s; transition: all .3s; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .videoCube .item-label-href .video-label-box .branding { left: 0; opacity: 0; -webkit-transition: all .3s; -moz-transition: all .3s; -ms-transition: all .3s; -o-transition: all .3s; transition: all .3s; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .videoCube .item-label-href .video-label-box .video-description.label-show { opacity: 1; }div.tbl-reco-reel.tbl-reco-reel-min-design .trc_rbox_outer .videoCube .item-label-href .video-label-box .branding.label-show { opacity: 1; }div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-text-under-controls { display: block !important; position: absolute; bottom: 0; height: 40px; width: 100%; z-index: 9; background: black; right: 0; } div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-text-under-controls .tbl-play, div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-text-under-controls .tbl-pause { margin-left: 10px; }div.tbl-reco-reel.tbl-reco-reel-min-design .tbl-recommendation-reel .tbl-text-under-branding-background { background: transparent; }div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp { padding: 0; height: 5px; background: transparent; }div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar { margin: 0; top: 0; height: 5px; }div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href, div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-story-touch-device .trc_rbox_outer .item-label-href { left: 0; width: 100%; } div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .video-label-box, div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-story-touch-device .trc_rbox_outer .item-label-href .video-label-box { margin-left: 10px; padding-left: 10px; width: 90%; position: relative; top: 0; } div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper { top: 0; } div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper, div.tbl-reco-reel.tbl-reco-reel-min-design.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper { top: 0; }`)}function updateItemIndicator(e,t){e&&(e.textContent=t)}function addCurrentItemIndicator(e,t){const r=document.createElement("div");r.className="tbl-rr-item-indicator";const i=document.createElement("span");i.className="tbl-rr-current-indicator",i.textContent="1";const o=document.createElement("span");return o.textContent=` / ${t}`,r.appendChild(i),r.appendChild(o),e.appendChild(r),i}function getModeProperty(e,t){return e.trc.getProperty(e.mode_name,t,e.propertiesOverride)}function _createVideoTag(e){const t=document.createElement("video"),r=TRC.URL.prototype.switchProtocol.call(e,TRC.PROTOCOL),[i]=r.split("!-#");return t.setAttribute("preload","auto"),t.setAttribute("src",`${i}`),t.muted=!0,t}function getPlacementItemType(e){return e[VIDEO_URL_ATTRIBUTE]?"VOC":e["is-syndicated"]?"SC":e["is-native"]?"NT":e["is-in-network"]?"AE":e["is-dc"]?"TN":"OC"}function _createWrapper(){const e=document.createElement("div");return e.className="tbl-vrl-video-wrapper",e}!function(){const e={RECO_REEL:"tbl-reco-reel story-widget",PROGRESS_BAR:"tbl-reco-reel-progressBar tbl-story-progressBar",PROGRESS_BAR_WRAPPER:"tbl-reco-reel-progressBar-wrp tbl-story-progressBar-wrp",PROGRESS_BAR_WRAPPER_TEXT_OVER:"tbl-reco-reel-progressBar-wrp-text-over tbl-story-progressBar-wrp-text-over",PROGRESS_BAR_OVERFLOW_WRAPPER:"tbl-reco-reel-progressBar-overflow-wrp tbl-story-progressBar-overflow-wrp",TOUCH_DEVICE:"tbl-reco-reel-touch-device tbl-story-touch-device",DESKTOP:"tbl-reco-reel-desktop tbl-story-desktop",TEXT_OVER:"tbl-reco-reel-text-over story-widget-text-over",TEXT_UNDER_SLIDE_IN:"tbl-reco-reel-text-under-slide-in story-widget-text-under-slide-in",TEXT_UNDER_RTL:"tbl-reco-reel-text-under-rtl story-widget-text-under-rtl",SHOW_ITEM:"tbl-show-item",NEXT_ITEM:"tbl-next-item",REMOVE_LEFT:"tbl-remove-item",REMOVE_RIGHT:"tbl-remove-item-to-right",IMAGE_HOLDER:"thumbBlock_holder",ZOOM_IN:TRC.Browser.ie?"":"tbl-zoom-in-item",PROGRESS_RUNNER:"tbl-progress-runner",PROGRESS_ANIM:"tbl-progress-anim",PREVENT_CLICK:"tbl-prevent-click-progressBar",ARROW_BUTTON:"tbl-arrow-btn",CLICKABLE_AREA:"tbl-clickable-area-btn",TEXT_UNDER_CONTROLS:"tbl-text-under-controls",HIDDEN:"tbl-hidden",LABEL_SHOW:"label-show",ANIMATION_ZOOM_IN:"tbl-animation-zoom-In",EXPAND:"tbl-expand-container"},t={SLIDE_OUT_LEFT:"tbl-animation-slide-out-left",SLIDE_OUT_RIGHT:"tbl-animation-slide-out-right",PROGRESS_BAR_ANIMATION:"tbl-animation-progress-bar"},r={LABELS:".item-label-href",LABELS_BOX:".item-label-href .video-label-box",LABELS_BRANDING:".item-label-href .branding",LABELS_GRADIENT_CONTAINER:"tbl-text-over-container",LABELS_GRADIENT_OVERLAY:"tbl-text-over",LABELS_ALIGN:"tbl-text-over-align",LABELS_ALIGN_LEFT:"tbl-text-over-labels-left",LABELS_ALIGN_RIGHT:"tbl-text-over-labels-right",VIDEO_TITLE:"video-title"},i=[t.SLIDE_OUT_LEFT,t.SLIDE_OUT_RIGHT],o=56,n=.15,a=100,s=300,l=270,c=-38,d=-35,p=40,h=[CONTROL_BUTTON_TYPES.BACK,CONTROL_BUTTON_TYPES.PLAY,CONTROL_BUTTON_TYPES.PAUSE,CONTROL_BUTTON_TYPES.FORWARD],u={play:ANIMATION_STATUS.RUNNING,pause:ANIMATION_STATUS.PAUSED};class m{constructor(t){this.props=m.GetRecommendationReelProps(t),this.active=!1,this.finishFirstCycle=!1,this.browserWidth=TRC.dom.getWindowWidth()||m.getDefaultWidthByDevice(),this.internalc=t.internalContainer,this.mainContainer=t.container,this.rboxContainer=this.mainContainer.firstElementChild,this.rbox=t,this.setNumOfItems(t.responsiveRules),this.items=Array.prototype.slice.call(t.boxes,0,this.amountOfItems),this.intervalLength=this.props.recoReelInterval,this.debugWidget=-1!==window.location.search.indexOf("tbl-debug=true"),this.isTouchDevice=TRC.Device.isTouchDevice,this.deviceType=this.isTouchDevice?e.TOUCH_DEVICE:e.DESKTOP,this.calcImageHeight(),this.thumbnailPosition=t.getThumbnailPosition(),this.isTextOver="under"===this.thumbnailPosition,this.direction=m.getDirection(t),this.isTextUnderSlideIn=m.checkIsTextUnderSlideIn(t)&&!this.isTextOver,this.enableSlider=this.getBooleanProperty(CLIENT_PROPERTIES.ENABLE_SLIDER),this.waitForVideoDemand=m.checkIfNeedToWaitForVideoDemand(t),this.initiateVideoReel(),this.enableSlider&&(this.recommendationReelSlider=RecommendationReelSlider.getInstance(this)),this.isWithLabelAnimation=this.isTextUnderSlideIn&&!this.isWithVideoLayout,this.state={previousItem:null,showItem:this.items[0],showNextItem:this.items[1],activePB:null,previousPosition:null,currentPosition:0},this.instanceType=this.getInstanceType(),!m.cssLoaded&&m.setDefaultCss();const r=TRC.listen("trcContentReady",e=>{e.container===this.mainContainer&&this.initContainer(r)})}initiateVideoReel(){this.videoReel=VideoReel.initiate(this.rbox),this.videoReel&&!this.isTextOver&&(this.isWithVideoLayout=this.videoReel.isWithVideoLayout(),this.isWithVideoLayout&&(this.isTextUnderSlideIn=!0))}static getDefaultWidthByDevice(){return window.taboolaMobile&&window.taboolaBridge||TRC.dom.isSmartPhone()?360:TRC.dom.isTablet()?768:TRC.dom.isDesktop()?1280:360}static shouldInitRecommendationReel(e){return TRC.util.isTrue(m.getProperty(e,"recommendationReel","storyWidget"))}static GetRecommendationReelProps(e){return{recoReelInterval:m.getProperty(e,"interval","storyWidget-story-interval")||DEFAULT_REEL_INTERVAL}}static checkIsTextUnderSlideIn(e){return TRC.util.isTrue(m.getProperty(e,"enable-text-under-slide-in","storyWidget-recommendation-reel-enable-text-under-slide-in"))}static checkIfNeedToWaitForVideoDemand(e){return TRC.util.isTrue(m.getProperty(e,"wait-for-video-demand","recommendationReel-wait-for-video-demand"))}static getProperty(e,t,r){return e.trc.getProperty(e.mode_name,t,e.propertiesOverride)||e.trc.getProperty(e.mode_name,r,e.propertiesOverride)}static setTextOverForRecommendationReel(e,t){const i=document.createElement("span"),o=this.getDirection(e);TRC.dom.addClass(i,r.LABELS_GRADIENT_OVERLAY),t.link.appendChild(i),TRC.dom.addClass(t.link,r.LABELS_GRADIENT_CONTAINER),this.alignLabelsBox(t,o),this.addArrowIcon(t.link,o)}getBooleanProperty(e){return TRC.util.isTrue(this.rbox.trc.getProperty(this.rbox.mode_name,e,this.rbox.propertiesOverride))}calcImageHeight(){this.imageHeight=m.getOuter("height",this.items[0].querySelector(`.${e.IMAGE_HOLDER}`)),this.imageWidth=m.getOuter("width",this.items[0].querySelector(`.${e.IMAGE_HOLDER}`))}initContainer(t){try{t.remove();const r=this.getRecoReelTypeContainerClass();setTimeout(()=>{this.container=this.mainContainer.querySelector(".trc_rbox_container"),TRC.dom.addClass(this.container,`${e.RECO_REEL} ${r} ${this.deviceType}`),TRC.dom.addClass(this.internalc,"tbl-recommendation-reel"),this.init(),this.waitForVideoDemand&&(this.toggleContainerExpandClass("addClass"),this.waitForVideoDemandReady())},0)}catch(e){__trcError("error on reco reel initialisation",e)}}init(){this.isTextUnderSlideIn&&(this.addLabelsBoxAnimatedElements(),this.calcLabelBoxSizes()),this.calcImageHeight(),this.buildRecommendationReel(),this.setDynamicCss(),TRC.dispatch("widgetHeightReady"),this.resizeIfAMPFeed(),this.enableSlider&&this.recommendationReelSlider.createSlider(this);const e=this.getIntersectionOptions();TRC.intersections.observe(e)}waitForVideoDemandReady(){this.toggleWidgetFooterVisibility("hide"),TRC.listen("showVideoRecoReel",()=>{this.waitForVideoDemand=!1,this.startTheReel(),setTimeout(()=>{this.toggleWidgetFooterVisibility("show"),this.toggleContainerExpandClass("removeClass")},500)})}toggleWidgetFooterVisibility(t){if(this.widgetFooter=this.widgetFooter||this.mainContainer.querySelector(".trc-widget-footer"),this.widgetFooter){const r="hide"===t?"addClass":"removeClass";TRC.dom[r](this.widgetFooter,`${e.HIDDEN}`)}}toggleContainerExpandClass(t){this.mainContainer&&TRC.dom[t](this.mainContainer,`${e.EXPAND}`)}getIntersectionOptions(){const e=this.getBooleanProperty(CLIENT_PROPERTIES.AUTO_PAUSE),t={targetElement:this.internalc,onEnter:e?this.togglePlayState.bind(this):this.startTheReel.bind(this),onExit:e?this.togglePauseState.bind(this):this.stopTheReel.bind(this)};return e&&(t.threshold=[.5]),t}resizeIfAMPFeed(){try{TRC&&TRC.isAMP&&TRC.amp&&"function"==typeof TRC.amp.sendAMPFeedResize&&this.rbox&&this.rbox.isFeedCard&&TRC.amp.sendAMPFeedResize()}catch(e){__trcWarn("error in resize amp feed",e)}}buildRecommendationReel(){if(this.rbox.trc.sendAbTestEvent(this.instanceType,"available"),this.listenToAnimationEvents(),this.arrows=[],this.clickedAreas=[],this.progressBar=this.createProgressBar(),this.internalc.parentNode.appendChild(this.progressBar),this.allowRecalculateSize=!0,this.deviceType===e.DESKTOP)this.arrows=[],this.isTextUnderSlideIn||(this.arrows=this.createArrowBtns(),TRC.dom.on(this.internalc,"mouseover",this.playStateAnimation.trcBind(this,"paused")),TRC.dom.on(this.internalc,"mouseleave",this.playStateAnimation.trcBind(this,"running")));else{this.clickedAreas=this.createMobileClickedArea();const t=document.createElement("div");t.className=e.PREVENT_CLICK,this.progressBar.appendChild(t)}const t=this.calcCardHeight();this.createLayout(t),TRC.dom.on(window,"resize",TRC.util.debounce(()=>{this.recalculateWidgetSize(t),this.isTextUnderSlideIn&&this.calcLabelBoxSizes()},100,!1,this))}_createTextUnderLayout(e){this.createControls(),this.responsiveAlignmentTextUnder(e)}createLayout(e){if(this.isWithVideoLayout)return this._createTextUnderLayout(e),void this.videoReel.createAdditionalLayout(this.controls,this.mainContainer);this.isTextUnderSlideIn?this._createTextUnderLayout(e):this.responsiveAlignment(e)}recalculateWidgetSize(e){e.item.style.removeProperty("top"),e.itemHeight=m.getOuter("height",e.item),this.isTextUnderSlideIn?this.responsiveAlignmentTextUnder(e):this.responsiveAlignment(e)}static getConsts(){return{CSS_CLASSES:e,CSS_ANIMATION:t,SLIDE_EVENTS:i,ARROW_SIZE:o,PROGRESS_BAR_HEIGHT:a}}setNumOfItems(e){const t=this.rbox.boxes.length;this.amountOfItems=t,e&&e.forEach(e=>{const r=e.min<this.browserWidth&&(this.browserWidth<e.max||void 0===e.max),i=e.rows*e.cells,o=i<=t;r&&(this.amountOfItems=o?i:t)})}getRecoReelTypeContainerClass(){let t="";return this.isTextUnderSlideIn?(t=e.TEXT_UNDER_SLIDE_IN,"rtl"===this.direction&&(t+=` ${e.TEXT_UNDER_RTL}`),this.isWithVideoLayout&&(t+=` ${this.videoReel.getDesignTypeClass()}`)):this.isTextOver&&(t=e.TEXT_OVER),t}static setDefaultCss(){m.cssLoaded=!0,TRC.dom.injectStyle(`div.tbl-reco-reel, div.story-widget { position: relative; /*DEFAULTS */ /*EVENTS*/ /*PROGRESS BAR */ /*ARROWS */ } div.tbl-reco-reel .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow, div.story-widget .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow { position: absolute; } div.tbl-reco-reel .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align { width: 91%; } div.tbl-reco-reel .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-labels-right, div.story-widget .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-labels-right { right: 0; left: auto; } div.tbl-reco-reel .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-labels-left, div.story-widget .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-labels-left { left: 0; right: auto; } div.tbl-reco-reel.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp { position: absolute; width: 100%; font-size: 0; background: -webkit-linear-gradient(top, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); background: -webkit-gradient(linear, left top, left bottom, from(rgba(1, 0, 0, 0.8)), to(rgba(0, 0, 0, 0))); background: -o-linear-gradient(top, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); background: linear-gradient(to bottom, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); } div.tbl-reco-reel.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.story-widget.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.story-widget.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.story-widget.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.story-widget.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar { top: 5px; height: 2px; } div.tbl-reco-reel.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar, div.tbl-reco-reel.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-prevent-click-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar, div.tbl-reco-reel.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-prevent-click-progressBar, div.story-widget.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar, div.story-widget.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-prevent-click-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar, div.story-widget.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-prevent-click-progressBar { pointer-events: auto; } div.tbl-reco-reel.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align, div.tbl-reco-reel.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align { bottom: 0; } div.tbl-reco-reel.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow, div.tbl-reco-reel.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow, div.story-widget.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow, div.story-widget.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow { bottom: 10px; } div.tbl-reco-reel.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-right, div.tbl-reco-reel.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-right, div.story-widget.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-right, div.story-widget.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-right { right: 3%; } div.tbl-reco-reel.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-left, div.tbl-reco-reel.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-left, div.story-widget.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-left, div.story-widget.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-left { left: 3%; } div.tbl-reco-reel:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop:hover .tbl-story-progressBar-wrp, div.tbl-reco-reel:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop:hover .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel:not(.story-widget-text-under-slide-in).tbl-story-desktop:hover .tbl-story-progressBar-wrp, div.tbl-reco-reel:not(.story-widget-text-under-slide-in).tbl-story-desktop:hover .tbl-reco-reel-progressBar-wrp, div.story-widget:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop:hover .tbl-story-progressBar-wrp, div.story-widget:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop:hover .tbl-reco-reel-progressBar-wrp, div.story-widget:not(.story-widget-text-under-slide-in).tbl-story-desktop:hover .tbl-story-progressBar-wrp, div.story-widget:not(.story-widget-text-under-slide-in).tbl-story-desktop:hover .tbl-reco-reel-progressBar-wrp { opacity: 0; transform: translateY(100px); } div.tbl-reco-reel:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop:hover .tbl-story-progressBar-wrp-text-over, div.tbl-reco-reel:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop:hover .tbl-reco-reel-progressBar-wrp-text-over, div.tbl-reco-reel:not(.story-widget-text-under-slide-in).tbl-story-desktop:hover .tbl-story-progressBar-wrp-text-over, div.tbl-reco-reel:not(.story-widget-text-under-slide-in).tbl-story-desktop:hover .tbl-reco-reel-progressBar-wrp-text-over, div.story-widget:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop:hover .tbl-story-progressBar-wrp-text-over, div.story-widget:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop:hover .tbl-reco-reel-progressBar-wrp-text-over, div.story-widget:not(.story-widget-text-under-slide-in).tbl-story-desktop:hover .tbl-story-progressBar-wrp-text-over, div.story-widget:not(.story-widget-text-under-slide-in).tbl-story-desktop:hover .tbl-reco-reel-progressBar-wrp-text-over { opacity: 1; transform: none; } div.tbl-reco-reel:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop .tbl-text-over-container .video-label-box.tbl-text-over-align, div.tbl-reco-reel:not(.story-widget-text-under-slide-in).tbl-story-desktop .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget:not(.story-widget-text-under-slide-in).tbl-story-desktop .tbl-text-over-container .video-label-box.tbl-text-over-align { bottom: 15px; } div.tbl-reco-reel:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow, div.tbl-reco-reel:not(.story-widget-text-under-slide-in).tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow, div.story-widget:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow, div.story-widget:not(.story-widget-text-under-slide-in).tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow { bottom: 20px; } div.tbl-reco-reel:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow-right, div.tbl-reco-reel:not(.story-widget-text-under-slide-in).tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow-right, div.story-widget:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow-right, div.story-widget:not(.story-widget-text-under-slide-in).tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow-right { right: 4%; } div.tbl-reco-reel:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow-left, div.tbl-reco-reel:not(.story-widget-text-under-slide-in).tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow-left, div.story-widget:not(.tbl-reco-reel-text-under-slide-in).tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow-left, div.story-widget:not(.story-widget-text-under-slide-in).tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow-left { left: 4%; } div.tbl-reco-reel .trc_rbox_outer, div.story-widget .trc_rbox_outer { margin: 0; } div.tbl-reco-reel .trc_rbox_outer .trc_rbox_div, div.story-widget .trc_rbox_outer .trc_rbox_div { overflow: hidden; } div.tbl-reco-reel .trc_rbox_outer .videoCube, div.story-widget .trc_rbox_outer .videoCube { position: absolute; width: 100%; margin: 0; bottom: 0; } div.tbl-reco-reel .trc_rbox_outer .videoCube .thumbBlock_holder, div.story-widget .trc_rbox_outer .videoCube .thumbBlock_holder { overflow: hidden; z-index: -1; } div.tbl-reco-reel .trc_rbox_outer .videoCube .thumbBlock_holder .thumbBlock_placeholder, div.story-widget .trc_rbox_outer .videoCube .thumbBlock_holder .thumbBlock_placeholder { background-color: #aeaeae; position: absolute; top: 0; left: 0; width: 100%; height: 100%; } div.tbl-reco-reel .trc_rbox_outer .videoCube .thumbBlock_holder .thumbBlock_placeholder svg, div.story-widget .trc_rbox_outer .videoCube .thumbBlock_holder .thumbBlock_placeholder svg { width: 100px; height: 100px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } div.tbl-reco-reel .trc_rbox_outer .videoCube .thumbBlock_holder .thumbBlock, div.story-widget .trc_rbox_outer .videoCube .thumbBlock_holder .thumbBlock { -webkit-transform: scale(1.00); -moz-transform: scale(1.00); -ms-transform: scale(1.00); -o-transform: scale(1.00); transform: scale(1.00); } div.tbl-reco-reel .trc_rbox_outer .videoCube .video-label-box, div.story-widget .trc_rbox_outer .videoCube .video-label-box { z-index: -1; opacity: 0; } div.tbl-reco-reel .trc_rbox_outer .videoCube .item-label-href.tbl-text-over-container, div.story-widget .trc_rbox_outer .videoCube .item-label-href.tbl-text-over-container { z-index: -1; opacity: 0; } div.tbl-reco-reel .trc_rbox_outer .videoCube .item-label-href.tbl-text-over-container .video-label-box, div.story-widget .trc_rbox_outer .videoCube .item-label-href.tbl-text-over-container .video-label-box { z-index: auto; opacity: 1; } div.tbl-reco-reel .videoCube.tbl-show-item, div.story-widget .videoCube.tbl-show-item { z-index: 1; } div.tbl-reco-reel .videoCube.tbl-show-item .thumbBlock_holder, div.story-widget .videoCube.tbl-show-item .thumbBlock_holder { z-index: 1; } div.tbl-reco-reel .videoCube.tbl-show-item .video-label-box, div.story-widget .videoCube.tbl-show-item .video-label-box { z-index: 1; -webkit-animation: tbl-animation-fade-in 1s; -moz-animation: tbl-animation-fade-in 1s; -ms-animation: tbl-animation-fade-in 1s; -o-animation: tbl-animation-fade-in 1s; animation: tbl-animation-fade-in 1s; -webkit-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; animation-fill-mode: forwards; } div.tbl-reco-reel .videoCube.tbl-show-item .item-label-href.tbl-text-over-container, div.story-widget .videoCube.tbl-show-item .item-label-href.tbl-text-over-container { z-index: 1; -webkit-animation: tbl-animation-fade-in 1s; -moz-animation: tbl-animation-fade-in 1s; -ms-animation: tbl-animation-fade-in 1s; -o-animation: tbl-animation-fade-in 1s; animation: tbl-animation-fade-in 1s; -webkit-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; animation-fill-mode: forwards; } div.tbl-reco-reel .videoCube.tbl-show-item .item-label-href.tbl-text-over-container .video-label-box, div.story-widget .videoCube.tbl-show-item .item-label-href.tbl-text-over-container .video-label-box { animation: none; z-index: auto; } div.tbl-reco-reel .videoCube.tbl-show-item .tbl-labels-arrow-right, div.story-widget .videoCube.tbl-show-item .tbl-labels-arrow-right { z-index: 1; -webkit-animation: tbl-animation-fade-in 1s; -moz-animation: tbl-animation-fade-in 1s; -ms-animation: tbl-animation-fade-in 1s; -o-animation: tbl-animation-fade-in 1s; animation: tbl-animation-fade-in 1s; -webkit-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; animation-fill-mode: forwards; } div.tbl-reco-reel .videoCube.tbl-show-item .tbl-labels-arrow-left, div.story-widget .videoCube.tbl-show-item .tbl-labels-arrow-left { z-index: 1; -webkit-animation: tbl-animation-fade-in 1s; -moz-animation: tbl-animation-fade-in 1s; -ms-animation: tbl-animation-fade-in 1s; -o-animation: tbl-animation-fade-in 1s; animation: tbl-animation-fade-in 1s; -webkit-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; animation-fill-mode: forwards; } div.tbl-reco-reel .videoCube.tbl-remove-item .thumbBlock_holder, div.story-widget .videoCube.tbl-remove-item .thumbBlock_holder { -webkit-animation: tbl-animation-slide-out-left 0.75s; -moz-animation: tbl-animation-slide-out-left 0.75s; -ms-animation: tbl-animation-slide-out-left 0.75s; -o-animation: tbl-animation-slide-out-left 0.75s; animation: tbl-animation-slide-out-left 0.75s; } div.tbl-reco-reel .videoCube.tbl-remove-item .video-label-box, div.story-widget .videoCube.tbl-remove-item .video-label-box { -webkit-animation: tbl-animation-fade-out 1s; -moz-animation: tbl-animation-fade-out 1s; -ms-animation: tbl-animation-fade-out 1s; -o-animation: tbl-animation-fade-out 1s; animation: tbl-animation-fade-out 1s; opacity: 0; } div.tbl-reco-reel .videoCube.tbl-remove-item .item-label-href.tbl-text-over-container, div.story-widget .videoCube.tbl-remove-item .item-label-href.tbl-text-over-container { -webkit-animation: tbl-animation-fade-out 1s; -moz-animation: tbl-animation-fade-out 1s; -ms-animation: tbl-animation-fade-out 1s; -o-animation: tbl-animation-fade-out 1s; animation: tbl-animation-fade-out 1s; opacity: 0; } div.tbl-reco-reel .videoCube.tbl-remove-item .item-label-href.tbl-text-over-container .video-label-box, div.story-widget .videoCube.tbl-remove-item .item-label-href.tbl-text-over-container .video-label-box { animation: none; } div.tbl-reco-reel .videoCube.tbl-remove-item .tbl-labels-arrow-right, div.story-widget .videoCube.tbl-remove-item .tbl-labels-arrow-right { -webkit-animation: tbl-animation-fade-out 1s; -moz-animation: tbl-animation-fade-out 1s; -ms-animation: tbl-animation-fade-out 1s; -o-animation: tbl-animation-fade-out 1s; animation: tbl-animation-fade-out 1s; opacity: 0; } div.tbl-reco-reel .videoCube.tbl-remove-item .tbl-labels-arrow-left, div.story-widget .videoCube.tbl-remove-item .tbl-labels-arrow-left { -webkit-animation: tbl-animation-fade-out 1s; -moz-animation: tbl-animation-fade-out 1s; -ms-animation: tbl-animation-fade-out 1s; -o-animation: tbl-animation-fade-out 1s; animation: tbl-animation-fade-out 1s; opacity: 0; } div.tbl-reco-reel .videoCube.tbl-remove-item-to-right .thumbBlock_holder, div.story-widget .videoCube.tbl-remove-item-to-right .thumbBlock_holder { -webkit-animation: tbl-animation-slide-out-right 0.75s; animation: tbl-animation-slide-out-right 0.75s; } div.tbl-reco-reel .videoCube.tbl-remove-item-to-right .video-label-box, div.story-widget .videoCube.tbl-remove-item-to-right .video-label-box { -webkit-animation: tbl-animation-fade-out 1s; -moz-animation: tbl-animation-fade-out 1s; -ms-animation: tbl-animation-fade-out 1s; -o-animation: tbl-animation-fade-out 1s; animation: tbl-animation-fade-out 1s; opacity: 0; } div.tbl-reco-reel .videoCube.tbl-remove-item-to-right .item-label-href.tbl-text-over-container, div.story-widget .videoCube.tbl-remove-item-to-right .item-label-href.tbl-text-over-container { -webkit-animation: tbl-animation-fade-out 1s; -moz-animation: tbl-animation-fade-out 1s; -ms-animation: tbl-animation-fade-out 1s; -o-animation: tbl-animation-fade-out 1s; animation: tbl-animation-fade-out 1s; opacity: 0; } div.tbl-reco-reel .videoCube.tbl-remove-item-to-right .item-label-href.tbl-text-over-container .video-label-box, div.story-widget .videoCube.tbl-remove-item-to-right .item-label-href.tbl-text-over-container .video-label-box { animation: none; } div.tbl-reco-reel .videoCube.tbl-next-item .video-label-box, div.story-widget .videoCube.tbl-next-item .video-label-box { opacity: 0; } div.tbl-reco-reel .videoCube.tbl-next-item .item-label-href.tbl-text-over-container, div.story-widget .videoCube.tbl-next-item .item-label-href.tbl-text-over-container { opacity: 0; } div.tbl-reco-reel .videoCube.tbl-next-item .item-label-href.tbl-text-over-container .video-label-box, div.story-widget .videoCube.tbl-next-item .item-label-href.tbl-text-over-container .video-label-box { opacity: 0; } div.tbl-reco-reel .videoCube.tbl-next-item .thumbBlock_holder, div.story-widget .videoCube.tbl-next-item .thumbBlock_holder { z-index: 0; } div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp, div.story-widget .tbl-story-progressBar-overflow-wrp, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp { z-index: 9; position: absolute; pointer-events: none; overflow: hidden; width: 100%; } div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp { direction: ltr; width: 100%; box-sizing: border-box; position: absolute; padding: 0 4%; background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(1, 0, 0, 0.8) 100%); background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(1, 0, 0, 0.8))); background: -o-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(1, 0, 0, 0.8) 100%); background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(1, 0, 0, 0.8) 100%); opacity: 1; } div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar { position: relative; top: 85px; display: inline-block; vertical-align: top; /* set bars to the absolute top container when using inline block */ width: 23%; height: 3px; background-color: rgba(255, 255, 255, 0.4); margin: 0 1%; overflow: hidden; } div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar span.tbl-progress-runner, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar span.tbl-progress-runner, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar span.tbl-progress-runner, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar span.tbl-progress-runner, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar span.tbl-progress-runner, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar span.tbl-progress-runner, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar span.tbl-progress-runner, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar span.tbl-progress-runner, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar span.tbl-progress-runner { width: 100%; height: 100%; position: absolute; left: 0; overflow: hidden; display: block; background-color: #fcfcfc; } div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar .tbl-progress-anim, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar .tbl-progress-anim, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar .tbl-progress-anim, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar .tbl-progress-anim, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar .tbl-progress-anim, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar .tbl-progress-anim, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar .tbl-progress-anim, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar .tbl-progress-anim, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar .tbl-progress-anim, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar .tbl-progress-anim, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar .tbl-progress-anim, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar .tbl-progress-anim, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar .tbl-progress-anim, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar .tbl-progress-anim, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar .tbl-progress-anim, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar .tbl-progress-anim { -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp-text-over, div.tbl-reco-reel .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp-text-over, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp-text-over, div.tbl-reco-reel .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp-text-over, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp-text-over, div.story-widget .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp-text-over, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp-text-over, div.story-widget .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp-text-over { padding: 0 3%; background: none; } div.tbl-reco-reel .tbl-arrow-btn, div.story-widget .tbl-arrow-btn { position: absolute; background-color: rgba(0, 0, 0, 0.419608); z-index: 2; font-size: 40px; text-align: center; color: #ffffff; cursor: pointer; line-height: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; -webkit-transition: transform 1s; -moz-transition: transform 1s; -ms-transition: transform 1s; -o-transition: transform 1s; transition: transform 1s; display: none; } div.tbl-reco-reel .tbl-arrow-btn svg, div.story-widget .tbl-arrow-btn svg { transform: translateY(50%); margin: auto; } div.tbl-reco-reel .tbl-arrow-btn.tbl-arrow-left, div.story-widget .tbl-arrow-btn.tbl-arrow-left { -webkit-transform: scaleX(-1); -moz-transform: scaleX(-1); -ms-transform: scaleX(-1); -o-transform: scaleX(-1); transform: scaleX(-1); } div.tbl-reco-reel .tbl-clickable-area-btn, div.story-widget .tbl-clickable-area-btn { position: absolute; z-index: 2; } div.tbl-reco-reel .tbl-clickable-area-btn.tbl-clickable-area-back, div.story-widget .tbl-clickable-area-btn.tbl-clickable-area-back { left: 0; } div.tbl-reco-reel .tbl-clickable-area-btn.tbl-clickable-area-forward, div.story-widget .tbl-clickable-area-btn.tbl-clickable-area-forward { right: 0; }.trc_related_container.tbl-expand-container { position: absolute; left: 0; top: 0; width: 100%; opacity: 0; }@-webkit-keyframes tbl-animation-slide-out-left { 0% { -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); -ms-transform: translateX(-100%); -o-transform: translateX(-100%); transform: translateX(-100%); } }@keyframes tbl-animation-slide-out-left { 0% { -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); -ms-transform: translateX(-100%); -o-transform: translateX(-100%); transform: translateX(-100%); } }@-webkit-keyframes tbl-animation-slide-out-right { 0% { -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(100%); -moz-transform: translateX(100%); -ms-transform: translateX(100%); -o-transform: translateX(100%); transform: translateX(100%); } }@keyframes tbl-animation-slide-out-right { 0% { -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(100%); -moz-transform: translateX(100%); -ms-transform: translateX(100%); -o-transform: translateX(100%); transform: translateX(100%); } }@-webkit-keyframes tbl-animation-fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }@keyframes tbl-animation-fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }@-webkit-keyframes tbl-animation-fade-out { 0% { opacity: 1; } 100% { opacity: 0; } }@keyframes tbl-animation-fade-out { 0% { opacity: 1; } 100% { opacity: 0; } }@-webkit-keyframes tbl-animation-zoom-In { 0% { -webkit-transform: scale(1.00); -moz-transform: scale(1.00); -ms-transform: scale(1.00); -o-transform: scale(1.00); transform: scale(1.00); } 100% { -webkit-transform: scale(1.1); -moz-transform: scale(1.1); -ms-transform: scale(1.1); -o-transform: scale(1.1); transform: scale(1.1); } }@keyframes tbl-animation-zoom-In { 0% { -webkit-transform: scale(1.00); -moz-transform: scale(1.00); -ms-transform: scale(1.00); -o-transform: scale(1.00); transform: scale(1.00); } 100% { -webkit-transform: scale(1.1); -moz-transform: scale(1.1); -ms-transform: scale(1.1); -o-transform: scale(1.1); transform: scale(1.1); } }@-webkit-keyframes tbl-animation-progress-bar { 0% { -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(100%); -moz-transform: translateX(100%); -ms-transform: translateX(100%); -o-transform: translateX(100%); transform: translateX(100%); } }@keyframes tbl-animation-progress-bar { 0% { -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(100%); -moz-transform: translateX(100%); -ms-transform: translateX(100%); -o-transform: translateX(100%); transform: translateX(100%); } }`),TRC.dom.injectStyle(`div.tbl-reco-reel.tbl-reco-reel-text-over, div.story-widget.story-widget-text-over { position: relative; /*DEFAULTS */ /*EVENTS*/ /*PROGRESS BAR */ } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow, div.story-widget.story-widget-text-over .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow { position: absolute; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget.story-widget-text-over .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align { width: 91%; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-labels-right, div.story-widget.story-widget-text-over .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-labels-right { right: 0; left: auto; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-labels-left, div.story-widget.story-widget-text-over .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-labels-left { left: 0; right: auto; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-story-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-story-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-reco-reel-touch-device .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-reco-reel-touch-device .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp { background: -webkit-linear-gradient(top, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); background: -webkit-gradient(linear, left top, left bottom, from(rgba(1, 0, 0, 0.8)), to(rgba(0, 0, 0, 0))); background: -o-linear-gradient(top, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); background: linear-gradient(to bottom, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget.story-widget-text-over.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget.story-widget-text-over.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .video-label-box.tbl-text-over-align { bottom: 0; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow, div.story-widget.story-widget-text-over.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow, div.story-widget.story-widget-text-over.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow { bottom: 10px; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-right, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-right, div.story-widget.story-widget-text-over.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-right, div.story-widget.story-widget-text-over.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-right { right: 3%; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-left, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-left, div.story-widget.story-widget-text-over.tbl-story-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-left, div.story-widget.story-widget-text-over.tbl-reco-reel-touch-device .videoCube.thumbnail_under .tbl-text-over-container .tbl-labels-arrow-left { left: 3%; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-desktop:hover .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-desktop:hover .tbl-reco-reel-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-desktop:hover .tbl-story-progressBar-wrp, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-desktop:hover .tbl-reco-reel-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-story-desktop:hover .tbl-story-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-story-desktop:hover .tbl-reco-reel-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-reco-reel-desktop:hover .tbl-story-progressBar-wrp, div.story-widget.story-widget-text-over.tbl-reco-reel-desktop:hover .tbl-reco-reel-progressBar-wrp { opacity: 0; transform: translateY(100px); } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-desktop:hover .tbl-story-progressBar-wrp-text-over, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-desktop:hover .tbl-reco-reel-progressBar-wrp-text-over, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-desktop:hover .tbl-story-progressBar-wrp-text-over, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-desktop:hover .tbl-reco-reel-progressBar-wrp-text-over, div.story-widget.story-widget-text-over.tbl-story-desktop:hover .tbl-story-progressBar-wrp-text-over, div.story-widget.story-widget-text-over.tbl-story-desktop:hover .tbl-reco-reel-progressBar-wrp-text-over, div.story-widget.story-widget-text-over.tbl-reco-reel-desktop:hover .tbl-story-progressBar-wrp-text-over, div.story-widget.story-widget-text-over.tbl-reco-reel-desktop:hover .tbl-reco-reel-progressBar-wrp-text-over { opacity: 1; transform: none; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-desktop .tbl-text-over-container .video-label-box.tbl-text-over-align, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-desktop .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget.story-widget-text-over.tbl-story-desktop .tbl-text-over-container .video-label-box.tbl-text-over-align, div.story-widget.story-widget-text-over.tbl-reco-reel-desktop .tbl-text-over-container .video-label-box.tbl-text-over-align { bottom: 15px; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow, div.story-widget.story-widget-text-over.tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow, div.story-widget.story-widget-text-over.tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow { bottom: 20px; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow-right, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow-right, div.story-widget.story-widget-text-over.tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow-right, div.story-widget.story-widget-text-over.tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow-right { right: 4%; } div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow-left, div.tbl-reco-reel.tbl-reco-reel-text-over.tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow-left, div.story-widget.story-widget-text-over.tbl-story-desktop .tbl-text-over-container .tbl-labels-arrow-left, div.story-widget.story-widget-text-over.tbl-reco-reel-desktop .tbl-text-over-container .tbl-labels-arrow-left { left: 4%; } div.tbl-reco-reel.tbl-reco-reel-text-over .trc_rbox_outer .videoCube .item-label-href.tbl-text-over-container, div.story-widget.story-widget-text-over .trc_rbox_outer .videoCube .item-label-href.tbl-text-over-container { z-index: -1; opacity: 0; } div.tbl-reco-reel.tbl-reco-reel-text-over .trc_rbox_outer .videoCube .item-label-href.tbl-text-over-container .video-label-box, div.story-widget.story-widget-text-over .trc_rbox_outer .videoCube .item-label-href.tbl-text-over-container .video-label-box { opacity: 1; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.tbl-show-item .item-label-href.tbl-text-over-container, div.story-widget.story-widget-text-over .videoCube.tbl-show-item .item-label-href.tbl-text-over-container { z-index: 1; -webkit-animation: tbl-animation-fade-in 1s; -moz-animation: tbl-animation-fade-in 1s; -ms-animation: tbl-animation-fade-in 1s; -o-animation: tbl-animation-fade-in 1s; animation: tbl-animation-fade-in 1s; -webkit-animation-fill-mode: forwards; -moz-animation-fill-mode: forwards; -ms-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; animation-fill-mode: forwards; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.tbl-show-item .item-label-href.tbl-text-over-container .video-label-box, div.story-widget.story-widget-text-over .videoCube.tbl-show-item .item-label-href.tbl-text-over-container .video-label-box { animation: none; z-index: auto; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.tbl-remove-item .item-label-href.tbl-text-over-container, div.story-widget.story-widget-text-over .videoCube.tbl-remove-item .item-label-href.tbl-text-over-container { -webkit-animation: tbl-animation-fade-out 1s; -moz-animation: tbl-animation-fade-out 1s; -ms-animation: tbl-animation-fade-out 1s; -o-animation: tbl-animation-fade-out 1s; animation: tbl-animation-fade-out 1s; opacity: 0; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.tbl-remove-item .item-label-href.tbl-text-over-container .video-label-box, div.story-widget.story-widget-text-over .videoCube.tbl-remove-item .item-label-href.tbl-text-over-container .video-label-box { animation: none; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.tbl-remove-item-to-right .item-label-href.tbl-text-over-container, div.story-widget.story-widget-text-over .videoCube.tbl-remove-item-to-right .item-label-href.tbl-text-over-container { -webkit-animation: tbl-animation-fade-out 1s; -moz-animation: tbl-animation-fade-out 1s; -ms-animation: tbl-animation-fade-out 1s; -o-animation: tbl-animation-fade-out 1s; animation: tbl-animation-fade-out 1s; opacity: 0; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.tbl-remove-item-to-right .item-label-href.tbl-text-over-container .video-label-box, div.story-widget.story-widget-text-over .videoCube.tbl-remove-item-to-right .item-label-href.tbl-text-over-container .video-label-box { animation: none; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.tbl-next-item .item-label-href.tbl-text-over-container, div.story-widget.story-widget-text-over .videoCube.tbl-next-item .item-label-href.tbl-text-over-container { opacity: 0; } div.tbl-reco-reel.tbl-reco-reel-text-over .videoCube.tbl-next-item .item-label-href.tbl-text-over-container .video-label-box, div.story-widget.story-widget-text-over .videoCube.tbl-next-item .item-label-href.tbl-text-over-container .video-label-box { opacity: 0; } div.tbl-reco-reel.tbl-reco-reel-text-over .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp-text-over, div.tbl-reco-reel.tbl-reco-reel-text-over .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp-text-over, div.tbl-reco-reel.tbl-reco-reel-text-over .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp-text-over, div.tbl-reco-reel.tbl-reco-reel-text-over .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp-text-over, div.story-widget.story-widget-text-over .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp-text-over, div.story-widget.story-widget-text-over .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp-text-over, div.story-widget.story-widget-text-over .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp-text-over, div.story-widget.story-widget-text-over .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp-text-over { padding: 0 3%; background: none; }`),TRC.dom.injectStyle(`.tbl-reco-reel-text-under-slide-in .tbl-ui-line, .story-widget-text-under-slide-in .tbl-ui-line { background-color: #333333; }.tbl-reco-reel-text-under-slide-in .tbl-text-under-title-background, .story-widget-text-under-slide-in .tbl-text-under-title-background { background-color: #EBEBEB; }.tbl-reco-reel.tbl-reco-reel-text-under-slide-in, .story-widget.story-widget-text-under-slide-in { /*Here added weak selectors for css client properties to be able to override SW styles*/ /* Device specifics */ /*DEFAULTS */ /*PROGRESS BAR */ /* Control buttons */ } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .video-label-box, .story-widget.story-widget-text-under-slide-in .video-label-box { margin: 0; max-height: initial; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .video-title, .story-widget.story-widget-text-under-slide-in .video-title { max-height: initial; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .branding, .story-widget.story-widget-text-under-slide-in .branding { display: inline-block; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href { left: 10px; width: 90%; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .video-label-box, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .video-label-box, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .video-label-box, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .video-label-box, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper { top: -35px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .video-label-box .video-title, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .video-title, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper .video-title, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .video-label-box .video-title, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .video-title, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper .video-title, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .video-label-box .video-title, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .video-title, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper .video-title, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .video-label-box .video-title, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .video-title, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper .video-title { margin: 10px 0 10px 7px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-story-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-touch-device .trc_rbox_outer .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar { top: 7px; height: 2px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer { /*EVENTS*/ } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href { position: absolute; left: 20px; width: 90%; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box { position: absolute; top: -38px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-title, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-description, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-title, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-description, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding { z-index: 0; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-title, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-title { position: relative; margin: 10px 0 10px 7px; left: 5px; opacity: 0; transition: opacity .3s; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-title.label-show, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-title.label-show { opacity: 1; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding .tbl-text-under-branding-background, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding .tbl-text-under-branding-background { position: absolute; display: inline; top: 0; left: -5px; width: 122%; height: 100%; z-index: -1; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding.tbl-branding-on-top, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding.tbl-branding-on-top { top: -2px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-description, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-description, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding { margin: 0 0 0 12px; position: relative; left: -110%; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-description.label-show, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding.label-show, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .video-description.label-show, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .video-label-box .branding.label-show { left: 0; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper { position: absolute; top: -38px; left: 0; display: block; overflow: hidden; width: 5px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .tbl-ui-line, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .tbl-ui-line { position: absolute; top: 0; left: 0; right: 0; bottom: 100%; transition: bottom .3s; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .tbl-ui-line.label-show, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper .tbl-ui-line.label-show { bottom: 0; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper { position: absolute; top: -38px; left: 5px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper .tbl-text-under-title-background, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper .tbl-text-under-title-background { position: absolute; top: 0; height: 100%; width: 0; transition: width .3s; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper .tbl-text-under-title-background.label-show, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper .tbl-text-under-title-background.label-show { width: 100%; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item { z-index: 1; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item .thumbBlock_holder, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item .thumbBlock_holder { z-index: 1; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item .item-label-href .video-label-box .video-title, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item .item-label-href .video-label-box .video-description, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item .item-label-href .video-label-box .branding, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item .item-label-href .video-label-box .video-title, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item .item-label-href .video-label-box .video-description, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .videoCube.tbl-show-item .item-label-href .video-label-box .branding { z-index: 2; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .videoCube.tbl-remove-item .thumbBlock_holder, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .videoCube.tbl-remove-item .thumbBlock_holder { -webkit-animation: tbl-animation-slide-out-left 0.75s; -moz-animation: tbl-animation-slide-out-left 0.75s; -ms-animation: tbl-animation-slide-out-left 0.75s; -o-animation: tbl-animation-slide-out-left 0.75s; animation: tbl-animation-slide-out-left 0.75s; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .trc_rbox_outer .videoCube.tbl-next-item .thumbBlock_holder, .story-widget.story-widget-text-under-slide-in .trc_rbox_outer .videoCube.tbl-next-item .thumbBlock_holder { z-index: 0; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-story-progressBar-overflow-wrp, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp, .story-widget.story-widget-text-under-slide-in .tbl-story-progressBar-overflow-wrp, .story-widget.story-widget-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp { top: 0; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, .story-widget.story-widget-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, .story-widget.story-widget-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, .story-widget.story-widget-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, .story-widget.story-widget-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp { background: -webkit-linear-gradient(top, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); background: -webkit-gradient(linear, left top, left bottom, from(rgba(1, 0, 0, 0.8)), to(rgba(0, 0, 0, 0))); background: -o-linear-gradient(top, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); background: linear-gradient(to bottom, rgba(1, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-reco-reel-progressBar, .story-widget.story-widget-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-story-progressBar, .story-widget.story-widget-text-under-slide-in .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-reco-reel-progressBar { top: 10px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-text-under-controls, .story-widget.story-widget-text-under-slide-in .tbl-text-under-controls { position: absolute; right: 10px; z-index: 2; direction: ltr; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-text-under-controls span, .story-widget.story-widget-text-under-slide-in .tbl-text-under-controls span { cursor: pointer; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in .tbl-text-under-controls span svg, .story-widget.story-widget-text-under-slide-in .tbl-text-under-controls span svg { width: 33px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href { left: auto; right: 20px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-title, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-title, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-title, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-title { margin: 10px 7px 10px 0; left: auto; right: 5px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-description, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-description, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-description, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-description, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding { position: relative; margin: 0 12px 0 0; left: auto; right: -110%; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding .tbl-text-under-branding-background, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding .tbl-text-under-branding-background, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding .tbl-text-under-branding-background, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding .tbl-text-under-branding-background { left: auto; right: -5px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-description.label-show, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding.label-show, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-description.label-show, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding.label-show, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-description.label-show, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding.label-show, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .video-description.label-show, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .video-label-box .branding.label-show { left: auto; right: 0; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .tbl-ui-line-wrapper { left: auto; right: 0; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .trc_rbox_outer .item-label-href .tbl-text-under-title-background-wrapper { left: auto; right: 5px; } .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.tbl-reco-reel-text-under-rtl .tbl-text-under-controls, .tbl-reco-reel.tbl-reco-reel-text-under-slide-in.story-widget-text-under-rtl .tbl-text-under-controls, .story-widget.story-widget-text-under-slide-in.tbl-reco-reel-text-under-rtl .tbl-text-under-controls, .story-widget.story-widget-text-under-slide-in.story-widget-text-under-rtl .tbl-text-under-controls { right: auto; left: 10px; }`)}setDynamicCss(){const e=`${this.intervalLength}s`,t=`${+this.intervalLength+.5}s`,r=`${o}`,i=this.rbox.mode_name,n=this.isTouchDevice&&Math.round(.3*this.imageHeight)||a,s=this.isTouchDevice?Math.round(.15*this.imageHeight):0,l=this.imageHeight-a;TRC.dom.injectStyle(`.tbl-reco-reel.tbl-story-touch-device .${i} .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar, .tbl-reco-reel.tbl-story-touch-device .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-prevent-click-progressBar, .tbl-reco-reel.tbl-reco-reel-touch-device .${i} .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar, .tbl-reco-reel.tbl-reco-reel-touch-device .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-prevent-click-progressBar, .story-widget.tbl-story-touch-device .${i} .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar, .story-widget.tbl-story-touch-device .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-prevent-click-progressBar, .story-widget.tbl-reco-reel-touch-device .${i} .tbl-story-progressBar-overflow-wrp .tbl-prevent-click-progressBar, .story-widget.tbl-reco-reel-touch-device .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-prevent-click-progressBar { height: ${s}px; }.tbl-reco-reel .${i}, .story-widget .${i} { /*EVENTS*/ } .tbl-reco-reel .${i} .videoCube.tbl-show-item.tbl-zoom-in-item .thumbBlock_holder .thumbBlock, .story-widget .${i} .videoCube.tbl-show-item.tbl-zoom-in-item .thumbBlock_holder .thumbBlock { -webkit-animation: tbl-animation-zoom-In ${t} ease-in; -moz-animation: tbl-animation-zoom-In ${t} ease-in; -ms-animation: tbl-animation-zoom-In ${t} ease-in; -o-animation: tbl-animation-zoom-In ${t} ease-in; animation: tbl-animation-zoom-In ${t} ease-in; } .tbl-reco-reel .${i} .tbl-story-progressBar-overflow-wrp, .tbl-reco-reel .${i} .tbl-reco-reel-progressBar-overflow-wrp, .story-widget .${i} .tbl-story-progressBar-overflow-wrp, .story-widget .${i} .tbl-reco-reel-progressBar-overflow-wrp { height: ${n}px; } .tbl-reco-reel .${i} .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, .tbl-reco-reel .${i} .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, .tbl-reco-reel .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, .tbl-reco-reel .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, .story-widget .${i} .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp, .story-widget .${i} .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp, .story-widget .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp, .story-widget .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp { height: ${n}px; -webkit--webkit-transition: all 1s; -moz--webkit-transition: all 1s; -ms--webkit-transition: all 1s; -o--webkit-transition: all 1s; -webkit-transition: all 1s; } .tbl-reco-reel .${i} .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-progress-anim, .tbl-reco-reel .${i} .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-progress-anim, .tbl-reco-reel .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-progress-anim, .tbl-reco-reel .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-progress-anim, .story-widget .${i} .tbl-story-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-progress-anim, .story-widget .${i} .tbl-story-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-progress-anim, .story-widget .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-story-progressBar-wrp .tbl-progress-anim, .story-widget .${i} .tbl-reco-reel-progressBar-overflow-wrp .tbl-reco-reel-progressBar-wrp .tbl-progress-anim { -webkit-animation: tbl-animation-progress-bar ${e} linear; -moz-animation: tbl-animation-progress-bar ${e} linear; -ms-animation: tbl-animation-progress-bar ${e} linear; -o-animation: tbl-animation-progress-bar ${e} linear; animation: tbl-animation-progress-bar ${e} linear; } .tbl-reco-reel .${i} .tbl-arrow-btn, .story-widget .${i} .tbl-arrow-btn { height: ${r}px; width: ${r}px; display: block; } .tbl-reco-reel .${i} .tbl-clickable-area-btn, .story-widget .${i} .tbl-clickable-area-btn { top: ${s}px; width: ${r}px; height: ${this.imageHeight-s}px; } .tbl-reco-reel .${i} .tbl-arrow-btn.tbl-arrow-left, .story-widget .${i} .tbl-arrow-btn.tbl-arrow-left { left: ${-1*r}px; } .tbl-reco-reel .${i} .tbl-arrow-btn.tbl-arrow-right, .story-widget .${i} .tbl-arrow-btn.tbl-arrow-right { right: ${-1*r}px; }.tbl-reco-reel.tbl-story-desktop .${i}:hover .tbl-arrow-btn.tbl-arrow-left, .tbl-reco-reel.tbl-reco-reel-desktop .${i}:hover .tbl-arrow-btn.tbl-arrow-left, .story-widget.tbl-story-desktop .${i}:hover .tbl-arrow-btn.tbl-arrow-left, .story-widget.tbl-reco-reel-desktop .${i}:hover .tbl-arrow-btn.tbl-arrow-left { -webkit-transform: scaleX(-1) translateX(${-1*r}px); -moz-transform: scaleX(-1) translateX(${-1*r}px); -ms-transform: scaleX(-1) translateX(${-1*r}px); -o-transform: scaleX(-1) translateX(${-1*r}px); transform: scaleX(-1) translateX(${-1*r}px); }.tbl-reco-reel.tbl-story-desktop .${i}:hover .tbl-arrow-btn.tbl-arrow-right, .tbl-reco-reel.tbl-reco-reel-desktop .${i}:hover .tbl-arrow-btn.tbl-arrow-right, .story-widget.tbl-story-desktop .${i}:hover .tbl-arrow-btn.tbl-arrow-right, .story-widget.tbl-reco-reel-desktop .${i}:hover .tbl-arrow-btn.tbl-arrow-right { -webkit-transform: translateX(${-1*r}px); -moz-transform: translateX(${-1*r}px); -ms-transform: translateX(${-1*r}px); -o-transform: translateX(${-1*r}px); transform: translateX(${-1*r}px); }`)}listenToAnimationEvents(){const e=TRC.dom.detectAnimationEvent(this.container,"end")||"animationend",t=TRC.dom.detectAnimationEvent(this.container,"start")||"animationstart";TRC.dom.on(this.container,t,e=>this.animationStartHandler(e)),TRC.dom.on(this.container,e,e=>this.animationEndHandler(e))}static getOuter(e,t){return t&&t.getBoundingClientRect()[e]}static addASvgArrow(){return`<svg width="17px" height="29px" viewBox="0 0 17 29" version="1.1" xmlns="http://www.w3.org/2000/svg">\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Desktop-4-cards" transform="translate(-1073.000000, -436.000000)" fill="#FFFDFD" fill-rule="nonzero">\n <g id="Group" transform="translate(1081.500000, 450.500000) scale(-1, 1) translate(-1081.500000, -450.500000) translate(1073.000000, 436.000000)">\n <polygon id="Rectangle-5" transform="translate(8.294336, 8.495231) rotate(45.000000) translate(-8.294336, -8.495231) " points="7.05498966 -1.37457069 9.68971053 -1.39537442 9.53368258 18.3650322 6.8989617 18.3858359"></polygon>\n <polygon id="Rectangle-5" transform="translate(8.294336, 20.257858) scale(1, -1) rotate(45.000000) translate(-8.294336, -20.257858) " points="7.05498966 10.3880565 9.68971053 10.3672528 9.53368258 30.1276594 6.8989617 30.1484631"></polygon>\n </g>\n'\n </g>\n'\n </g>\n'\n </svg>`}static addASvgPlaceHolder(){return`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"\n viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">\n <rect fill="none" stroke="#fff" stroke-width="4" x="25" y="25" width="50" height="50">\n <animateTransform\n attributeName="transform"\n dur="0.5s"\n from="0 50 50"\n to="180 50 50"\n type="rotate"\n id="strokeBox"\n attributeType="XML"\n begin="rectBox.end"/>\n </rect>\n <rect x="27" y="27" fill="#fff" width="46" height="50">\n <animate\n attributeName="height"\n dur="1.3s"\n attributeType="XML"\n from="50" \n to="0"\n id="rectBox" \n fill="freeze"\n begin="0s;strokeBox.end"/>\n </rect>\n </svg>`}static addArrowIcon(e,t){let r;r="ltr"===t?`<div class="tbl-labels-arrow tbl-labels-arrow-right">\n <?xml version="1.0" encoding="UTF-8"?>\n <svg width="23px" height="23px" viewBox="0 0 23 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group 3</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">\n <g id="Mobile-SC-CTA" transform="translate(-320.000000, -479.000000)" stroke="#FFFFFF">\n <g id="Group-3" transform="translate(321.000000, 480.000000)">\n <polyline id="Path" points="8.2173913 5.47826087 13.6956522 10.0434783 8.2173913 14.6086957"></polyline>\n <circle id="Oval" cx="10.5" cy="10.5" r="10.5"></circle>\n </g>\n </g>\n </g>\n </svg>\n </div>`:`<div class="tbl-labels-arrow tbl-labels-arrow-left">\n <?xml version="1.0" encoding="UTF-8" standalone="no"?>\n\n <svg width="23px" height="23px"\n viewBox="0 0 23 23"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <title id="title37">Group 3</title>\n <desc id="desc39">Created with Sketch.</desc>\n <g transform="rotate(180,11.5,11.5)"\n stroke-linejoin="round"\n stroke-linecap="round"\n fill-rule="evenodd"\n fill="none"\n stroke-width="1"\n stroke="none"\n id="Page-1">\n <g stroke="#ffffff" transform="translate(-320,-479)" id="Mobile-SC-CTA">\n <g transform="translate(321,480)" id="Group-3">\n <polyline points="8.2173913 5.47826087 13.6956522 10.0434783 8.2173913 14.6086957" id="Path" />\n <circle r="10.5" cy="10.5" cx="10.5" id="Oval" />\n </g>\n </g>\n </g>\n </svg>\n </div>`,e.insertAdjacentHTML("beforeend",r)}createControls(){this.controls=document.createElement("div"),TRC.dom.addClass(this.controls,e.TEXT_UNDER_CONTROLS);const t=this.isWithVideoLayout?this.videoReel.getControlButtons():h;t.forEach(e=>this[`${e}Button`]=this.createControlButton(e)),this.internalc.parentNode.insertAdjacentElement("beforeend",this.controls)}createControlButton(t){const r=document.createElement("span");t===CONTROL_BUTTON_TYPES.PLAY&&TRC.dom.addClass(r,e.HIDDEN),TRC.dom.addClass(r,`tbl-${t}`),r.innerHTML=CONTROL_BUTTONS$1[t];const i=this.generateControlButtonOnClick(t);return TRC.dom.on(r,"click",i),this.controls.insertAdjacentElement("beforeend",r),r}generateControlButtonOnClick(e){switch(e){case CONTROL_BUTTON_TYPES.BACK:case CONTROL_BUTTON_TYPES.FORWARD:return TRC.util.debounce(()=>{this.animationInProgress||(this.toggleMiddleControlButton(CONTROL_BUTTON_TYPES.PLAY),this.slideCard(e===CONTROL_BUTTON_TYPES.BACK?"right":"left",!0))},s,!0,this);case CONTROL_BUTTON_TYPES.PAUSE:case CONTROL_BUTTON_TYPES.PLAY:return this.toggleMiddleControlButton.trcBind(this,e)}}toggleMiddleControlButton(t){if(!this.animationInProgress)switch(this.videoReel&&this.videoReel.toggleMiddleControl(this.state.currentPosition,t),this.playStateAnimation(u[t]),t){case CONTROL_BUTTON_TYPES.PLAY:TRC.dom.addClass(this.playButton,e.HIDDEN),TRC.dom.removeClass(this.pauseButton,e.HIDDEN);break;case CONTROL_BUTTON_TYPES.PAUSE:TRC.dom.addClass(this.pauseButton,e.HIDDEN),TRC.dom.removeClass(this.playButton,e.HIDDEN)}}static getDirection(e){const t=e.trc.getProperty(e.mode_name,"direction",e.propertiesOverride);return TRC.direction||t||"ltr"}static alignLabelsBox(e,t){const i="rtl"===t?r.LABELS_ALIGN_RIGHT:r.LABELS_ALIGN_LEFT;TRC.dom.addClass(e.labelsBox,r.LABELS_ALIGN),TRC.dom.addClass(e.labelsBox,i)}listenToSwipeEvents(e){const t={start:{screenX:0,screenY:0},end:{screenX:0,screenY:0}};TRC.dom.on(e,"touchstart",e=>{t.start={screenX:e.changedTouches[0].screenX,screenY:e.changedTouches[0].screenY}}),TRC.dom.on(e,"touchend",r=>{t.end={screenX:r.changedTouches[0].screenX,screenY:r.changedTouches[0].screenY},this.handleGesture(e,t)})}handleGesture(e,t){const{start:r,end:i}=t,o=e.getBoundingClientRect(),{width:n,height:a}=o,s=(i.screenX-r.screenX)/n,l=(i.screenY-r.screenY)/a,c=.25;return s>l&&s>c?this.slideCard("right",!0):s<l&&s<-c?this.slideCard("left",!0):void 0}calcCardHeight(){let t={itemHeight:0,item:null};return this.items.forEach((r,i)=>{0===i&&(t.item=r);const o=r.querySelector(".thumbBlock_holder");o&&o.insertAdjacentHTML("afterbegin",`<div class="thumbBlock_placeholder">${m.addASvgPlaceHolder()}</div>`);const n=m.getOuter("height",r);r.style.top=0,n>t.itemHeight&&(t={itemHeight:n,item:r}),this.isTouchDevice&&this.listenToSwipeEvents(r.querySelector(`.${e.IMAGE_HOLDER}`))}),t}responsiveAlignment(e){const{progressBar:t,arrows:r,clickedAreas:i}=this;e.item.style.top=0,this.calcImageHeight(),e.itemHeight>0&&(this.internalc.style.height=`${e.itemHeight}px`);const s=this.items[0];let l=0;s&&s.pre_detail_order&&s.pre_detail_order.length>0&&(l+=m.getOuter("height",s.preLabelsBox));const c=`${this.imageHeight-a+l}px`;t.firstChild.style.top=0,t.style.top=this.isTouchDevice?`${l}px`:c,r.forEach(e=>{e.style.top=`${(this.imageHeight+l)/2-o/2}px`}),i.forEach(e=>{e.style.width=`${this.imageWidth*n}px`})}responsiveAlignmentTextUnder(e){const{controls:t,clickedAreas:r}=this;e.item.style.top=0,this.calcImageHeight();let i=0;this.items.forEach(e=>{const t=m.getOuter("height",e.querySelector(".video-label-box"));i<t&&(i=t)}),e.itemHeight>0&&(this.isWithVideoLayout?this.internalc.style.height=`${e.itemHeight+p}px`:this.internalc.style.height=`${e.itemHeight+i+d}px`);let o=.25;const a=parseInt(this.imageHeight,10);a<=l?(o=.37,!TRC.dom.containsClass(this.container,"tbl-reco-reel-touch-device")&&TRC.dom.addClass(this.container,"tbl-reco-reel-touch-device"),TRC.dom.removeClass(this.container,"tbl-reco-reel-desktop")):(!TRC.dom.containsClass(this.container,"tbl-reco-reel-desktop")&&TRC.dom.addClass(this.container,"tbl-reco-reel-desktop"),TRC.dom.removeClass(this.container,"tbl-reco-reel-touch-device")),this.isWithVideoLayout||(t.style.top=`${a-a*o}px`),this.isTouchDevice&&r.forEach(e=>{e.style.width=`${this.imageWidth*n}px`})}static calcLabelsTopByDetailsOrder(e){const t=e.querySelector(r.LABELS_BOX),i=TRC.dom.isDesktop();let o=i?c:d;const n=t.children;for(let a=0;a<n.length;a++){const e=n[a];if(TRC.dom.containsClass(e,r.VIDEO_TITLE))break;const t=getComputedStyle(e).height,i=parseInt(t,10);i>0?o-=i:e.style.display="none"}return i&&o!==c||!i&&o!==d?o:""}static insertBrandingBackground(e){const t=e.querySelector(r.LABELS_BRANDING);TRC.dom.addClass(t,"tbl-branding-on-top");const i=`<span class="tbl-text-under-branding-background"></span>`;t.insertAdjacentHTML("beforeend",i)}addLabelsBoxAnimatedElements(){this.items.forEach(e=>{const t=e.querySelector(r.LABELS),i=m.calcLabelsTopByDetailsOrder(e);if(i){const t=e.querySelector(r.LABELS_BOX);t.style.top=`${i}px`,m.insertBrandingBackground(e)}const o=` <span class="tbl-text-under-title-background-wrapper">\n <span class="tbl-text-under-title-background"></span></span>\n <span class="tbl-ui-line-wrapper">\n <span class="tbl-ui-line"></span></span>\n `;t.insertAdjacentHTML("afterbegin",o)})}playStateAnimation(e){const{activePB:t,showItem:r}=this.state,i=r.querySelector(".thumbBlock"),o=t.firstChild;o&&(o.style.webkitAnimationPlayState=e,o.style.animationPlayState=e),i&&(i.style.webkitAnimationPlayState=e,i.style.animationPlayState=e)}createProgressBar(){const t=document.createElement("div");t.className=e.PROGRESS_BAR_OVERFLOW_WRAPPER;const r=document.createElement("div");return r.className=e.PROGRESS_BAR_WRAPPER,"under"===this.thumbnailPosition&&TRC.dom.addClass(r,e.PROGRESS_BAR_WRAPPER_TEXT_OVER),r.insertAdjacentHTML("afterbegin",this.createProgressUnits()),this.progressBars=Array.prototype.slice.call(r.childNodes),this.state.activePB=this.progressBars[0],t.appendChild(r),t}createProgressUnits(){let t="";const r=this.isWithVideoLayout?this.videoReel.getProgressBarStyle(this.amountOfItems):`width: ${100/this.amountOfItems-2}%`;for(let i=0;this.amountOfItems>i;i++)t+=`<div class="${e.PROGRESS_BAR}" style="${r}" data-progress-bar-index="${i}"><span class="${e.PROGRESS_RUNNER}"></span></div>`;return`${t}`}createArrowBtns(){return["left","right"].map(t=>{const r=document.createElement("div");return r.className=`${e.ARROW_BUTTON} tbl-arrow-${t}`,r.insertAdjacentHTML("beforeend",m.addASvgArrow()),TRC.dom.on(r,"click",this.slideCard.trcBind(this)),this.internalc.parentNode.appendChild(r),r})}createMobileClickedArea(){return this.isWithVideoLayout?[]:[CONTROL_BUTTON_TYPES.BACK,CONTROL_BUTTON_TYPES.FORWARD].map(t=>{const r=document.createElement("div");r.style.height=`${this.calcImageHeight()}px`;const i=this.isTextUnderSlideIn?this.generateControlButtonOnClick(t):this.slideCard.trcBind(this);return r.className=`${e.CLICKABLE_AREA} tbl-clickable-area-${t}`,TRC.dom.on(r,"click",i),this.internalc.parentNode.appendChild(r),r})}togglePlayState(){this.container?this.toggleMiddleControlButton(CONTROL_BUTTON_TYPES.PLAY):this.startTheReel()}startTheReel(){if(!this.waitForVideoDemand){if(this.isImageHeightChanged()&&this.allowRecalculateSize){this.allowRecalculateSize=!1;const e=this.calcCardHeight();this.recalculateWidgetSize(e)}this.active=!0,this.videoReel?this.videoReel.start(this.restartAnimation.bind(this),this.state.currentPosition):this.restartAnimation()}}getInstanceType(){return this.videoReel?"recommendation-video-reel":"recommendation-reel"}isImageHeightChanged(){const{imageHeight:e}=this;return this.calcImageHeight(),e!==this.imageHeight}togglePauseState(){this.container?this.toggleMiddleControlButton(CONTROL_BUTTON_TYPES.PAUSE):this.stopTheReel()}stopTheReel(){this.active=!1,this.videoReel&&this.videoReel.toggleMiddleControl(this.state.currentPosition,"pause")}restartAnimation(){setTimeout(()=>{this.isTextUnderSlideIn&&this.calcLabelBoxSizes(),this.updateItem(),this.updateCarouselIteration("left")})}slideCard(e,t){if(this.disableClickEvents)return!1;const r=m.resolveAnimationDirection(e,t),{showItem:i}=this.state;return TRCImpl.sendAbTestEvent(this.instanceType,`click_${"left"===r?"right":"left"}`),this.isWithLabelAnimation?this.hideAnimatedLabelBox(i,this.updateIteration.trcBind(this,r)):this.updateIteration(r),!0}static resolveAnimationDirection(t,r){let i;return i=r?t:TRC.dom.containsClass(t.currentTarget,e.ARROW_BUTTON)||TRC.dom.containsClass(t.currentTarget,CLASSES.SLIDER_ARROW)?TRC.dom.containsClass(t.currentTarget,"tbl-arrow-left")?"right":"left":TRC.dom.containsClass(t.currentTarget,e.CLICKABLE_AREA)&&TRC.dom.containsClass(t.currentTarget,"tbl-clickable-area-back")?"right":"left"}updateIteration(t){t=t||"left",this.debugWidget&&this.debugSlider();let r=1;const{showNextItem:i,currentPosition:o}=this.state;if("right"===t){let t;TRC.dom.removeClass(i,e.NEXT_ITEM),o?(r=-1,t=o-1):t=r=this.amountOfItems-1,TRC.dom.addClass(this.items[t],e.NEXT_ITEM)}const n=+o+r===this.amountOfItems?0:o+r;this.setState({showPosition:n,nextShowPosition:Number(n+1)===this.amountOfItems?0:n+1}),this.updateCarouselIteration(t),this.videoReel&&this.videoReel.handleNextVideo(this.state.previousPosition,this.state.currentPosition)}sendRvAvailableIfNeeded(e){try{const t=this.rbox.recommendationList[e];if(!this.shouldSendRvAvailable(t))return;TRC.dispatch(`required-viewability-available::${t["item-id"]}`),t.rvAvailableSent=!0}catch(e){__trcWarn("error while sending rv available for reco reel: ",e)}}shouldSendRvAvailable(e){return this.rbox.trc.global["rv-available-for-reco-reel"]&&e.rv&&!e.rvAvailableSent}setState({showPosition:e,nextShowPosition:t}){const r=this.items[e],i=this.items[t],o=this.progressBars[e];return this.state={previousItem:this.state.showItem,showItem:r,showNextItem:i,activePB:o,previousPosition:this.state.currentPosition,currentPosition:e}}isFirstIteration(){return null===this.state.previousPosition}updateCarouselIteration(t){if(!this.active)return;const{REMOVE_LEFT:r,REMOVE_RIGHT:i}=e,o="left"===t?r:i,{previousPosition:n}=this.state;!this.isFirstIteration()&&this.slideAnimation(o),this.updateProgressBar(),this.progressBars.length-1===n&&(this.finishFirstCycle=!0,this.videoReel&&this.videoReel.reportFullCycle())}debugSlider(){const t={},r=["SHOW_ITEM","NEXT_ITEM","REMOVE_LEFT","REMOVE_RIGHT","ZOOM_IN"];this.items.forEach((i,o)=>{t[`item_${o}`]={},Object.keys(e).forEach(i=>{-1!==r.indexOf(i)&&(t[`item_${o}`][i]=TRC.dom.containsClass(e[i])?"X":null)})}),console.log(`%c card ${this.container.dataset.cardIndex}`,`background: #5${10*this.container.dataset.cardIndex}; color: white`),console.table(t)}slideAnimation(t=e.REMOVE_LEFT){const r=this.state.previousPosition,i=this.items[r];TRC.dom.addClass(i,t)}updateProgressBar(){const{activePB:t,currentPosition:r,previousPosition:i}=this.state;this.isFirstIteration()||TRC.dom.removeClass(this.progressBars[i].firstChild,e.PROGRESS_ANIM),TRC.dom.addClass(t.firstChild,e.PROGRESS_ANIM),this.progressBars.forEach((e,t)=>{e.firstChild.style.left=r>t?"0":"-100%"})}updateItem(){const{showItem:t,showNextItem:r,currentPosition:i}=this.state;if(this.clearThePreviousItem(),document.querySelector(`.${e.SHOW_ITEM}`)&&this.clearAll(),TRC.dom.addClass(t,`${e.SHOW_ITEM} ${e.ZOOM_IN}`),TRC.dom.removeClass(t,e.NEXT_ITEM),TRC.dom.addClass(r,e.NEXT_ITEM),!this.finishFirstCycle){const e=`Visible_${i+1}`;this.videoReel?this.videoReel.reportVisible(i,e):TRCImpl.sendAbTestEvent(this.instanceType,e),this.sendRvAvailableIfNeeded(i)}}clearThePreviousItem(){const{previousItem:e}=this.state;return!!e&&(m.clearClassNames(e),!0)}clearAll(){this.items.forEach(e=>(m.clearClassNames(e),!0))}static clearClassNames(t){TRC.dom.removeClass(t,e.SHOW_ITEM),TRC.dom.removeClass(t,e.REMOVE_LEFT),TRC.dom.removeClass(t,e.REMOVE_RIGHT),e.ZOOM_IN&&TRC.dom.removeClass(t,e.ZOOM_IN)}calcLabelBoxSizes(){this.isWithVideoLayout||requestAnimationFrame(()=>{this.items.forEach(e=>{const t=e.querySelector(".item-label-href .video-title"),r=e.querySelector(".item-label-href .tbl-ui-line-wrapper"),i=e.querySelector(".item-label-href .tbl-text-under-title-background-wrapper"),o=getComputedStyle(t);e.titleElemsAndSizes={line:r,background:i,titleHeight:`${parseInt(o.height,10)+20}px`,titleWidth:`${parseInt(o.width,10)+20}px`}}),this.items.forEach(e=>{const{line:t,background:r,titleHeight:i,titleWidth:o}=e.titleElemsAndSizes;t&&(t.style.height=i),r&&(r.style.height=i,r.style.width=o)})})}static getLabelBoxElements(e){return{href:e.querySelector(".item-label-href"),title:e.querySelector(".item-label-href .video-title"),background:e.querySelector(".item-label-href .tbl-text-under-title-background"),branding:e.querySelector(".item-label-href .branding"),description:e.querySelector(".item-label-href .video-description"),line:e.querySelector(".item-label-href .tbl-ui-line")}}showAnimatedLabelBox(t){const r=m.getLabelBoxElements(t);Object.keys(r).forEach(t=>{TRC.dom.removeClass(r[t],e.LABEL_SHOW)}),r.href&&(r.href.style.zIndex="2"),TRC.dom.addClass(r.line,e.LABEL_SHOW),setTimeout(()=>{TRC.dom.addClass(r.background,e.LABEL_SHOW),TRC.dom.addClass(r.branding,e.LABEL_SHOW),TRC.dom.addClass(r.description,e.LABEL_SHOW),setTimeout(()=>{TRC.dom.addClass(r.title,e.LABEL_SHOW),this.animationInProgress=!1},s)},s)}hideAnimatedLabelBox(t,r){if(this.animationInProgress)return;this.animationInProgress=!0;const i=m.getLabelBoxElements(t);TRC.dom.removeClass(i.title,e.LABEL_SHOW),setTimeout(()=>{TRC.dom.removeClass(i.background,e.LABEL_SHOW),TRC.dom.removeClass(i.branding,e.LABEL_SHOW),TRC.dom.removeClass(i.description,e.LABEL_SHOW),setTimeout(()=>{TRC.dom.removeClass(i.line,e.LABEL_SHOW),setTimeout(()=>{i.href&&(i.href.style.zIndex="-1"),r()},s)},s)},s)}animationStartHandler(e){if(this.isWithLabelAnimation){const{showItem:r}=this.state;e.animationName===t.PROGRESS_BAR_ANIMATION&&this.showAnimatedLabelBox(r)}-1!==i.indexOf(e.animationName)&&(this.disableClickEvents=!0)}animationEndHandler(e){if(e.animationName===t.PROGRESS_BAR_ANIMATION)if(this.disableClickEvents=!1,this.isWithLabelAnimation){const{showItem:e}=this.state;this.hideAnimatedLabelBox(e,this.updateIteration.trcBind(this))}else this.updateIteration();-1!==i.indexOf(e.animationName)&&(this.disableClickEvents=!1,this.updateItem())}static setRVAvailableListener(e,t,r,i,o){const n={rvpm:0};TRC.util.merge(n,i);const a=TRC.listen(`required-viewability-available::${o}`,function(){this.sendRequiredViewabilityAvailableEvent(n,r,o),t.rvAvailableRecoReelObserver.remove()}.trcBind(e));t.rvAvailableRecoReelObserver=a}static isPlacementRecoReel(e,t){return t.global["force-set-reco-reel-container-value"]&&e.uip&&e.uip===t.global["force-set-reco-reel-container-value"]}static setContainerForRRPlacement(e,t,r){if(!(r&&"object"==typeof r&&t&&e&&e.cs))return void __trcWarn(`tried to set placement for Reco reel and failed. placementData: ${e},\n preloadRequest:${t}, feedsData: ${r}.`);const i=Object.keys(r)[0],o=t[i],n=e.cs[0];n&&o&&o.container&&(n.container=`#${o.container.id}`)}}TRC.RecommendationReel=m}();var recommendationReel_es6=TRC.RecommendationReel;(()=>{const e="Feed - Explore More",t="api::render",r=5,i=1,o="2500px",n={threshold:0,disableCheckOverlay:!0,root:null};class a{constructor(e){this.trcManager=e,this.cardsCounters={},this.lazyBatches={},this.init()}init(){this.isLazyRenderEnabled="boolean"==typeof this.isLazyRenderEnabled?this.isLazyRenderEnabled:this.checkLazyRenderEnabled(),this.isLazyRenderEnabled&&this.setLazyConfig()}checkLazyRenderEnabled(){const{global:e,yieldingEnabled:t,framework:r}=this.trcManager,i=!(!e||!e["lazy-render-enable"]),o=!t,n=!r,a=!TRC.dom.isInIframe(!0);return i&&o&&n&&a}setLazyConfig(){const t=this.trcManager.global["lazy-render"]||{},{excPlc:r,sbKill:i,dispatchPlacements:o,raKill:n}=t;function s(t){return t&&TRC.util.isArray(t)?t.indexOf(e)>-1?t:t.concat([e]):[e]}this.lazyConfig={excludePlacements:s(r),sbKill:TRC.util.isTrue(i),dispatchPlacements:a.getDispatchPlacements(o),raKill:TRC.util.isTrue(n)},this.lazyConfig.sbKill&&(TRC.pageLevelFeaturesManager.pageLevelFeatures.sb_kill=!0),this.placementsConfigs={},__trcCopyProps(a.proxyPlacementLevelConfigs(t),this.lazyConfig)}getPlacementConfig(e,t){const{unifiedPlacement:r}=t;return this.isFppEnabled(r)&&this.placementsConfigs[r][e]||this.lazyConfig[e]}setPlacementsConfig(e){e&&Object.keys(e).forEach(t=>{this.placementsConfigs[t]=a.proxyPlacementLevelConfigs(e[t])})}static proxyPlacementLevelConfigs(e){const{enable:t,rootMargin:n,minCards:a,maxBatch:s,fullLazyBatch:l,dispatchEnabled:c}=e;return{enable:TRC.util.isTrue(t),minCards:TRC.util.isNumber(a)?parseInt(a,10):r,maxBatch:TRC.util.isNumber(s)?parseInt(s,10):i,rootMargin:"string"==typeof n&&n.indexOf("px")>1?n:o,fullLazyBatch:TRC.util.isTrue(l),dispatchEnabled:TRC.util.isTrue(c)}}static getDispatchPlacements(e){return Array.isArray(e)?e:"string"==typeof e?__trcUnJSONify(e):[]}static hasVideo(e){if(e.trcResponse&&e.trcResponse.vtag)return!0}isLazyBatch(e,t){return!!(this.getPlacementConfig("maxBatch",t)>=e||t.isCache)}addResponse(e){const t=e.trc.vl;this.onePlacementRendered=!1,e.trc.f?this.updateCardsCounters(t):this.onePlacementRendered=!0}updateCardsCounters(e){e.forEach(e=>{if(e.fb){const{uuip:t,fb:r}=e;this.cardsCounters[t]=this.cardsCounters[t]||{},this.cardsCounters[t][r]=this.cardsCounters[t][r]?++this.cardsCounters[t][r]:1}})}placementRender(e){(void 0!==e.container||e.addWidget)&&(this.trcManager.yieldingEnabled?this.yieldRenderer(e):this.isLazyRenderEnabled&&this.isLazyPlacement(e)?this.lazyRenderer(e):this.standardRenderer(e))}getBatchThreshold(e,t){const{uiBatchNumberCounter:r,parentPlacementData:i}=e;if(this.isValidLazyPlacement(i)&&this.isLazyBatch(r,i)){const e=this.getNumberOfCards(i.unifiedPlacement,r),o=this.getPlacementConfig("minCards",i);return e&&e>o?Math.floor(t*o/e):t}return t}getNumberOfCards(e,t){try{return this.cardsCounters[e][t]}catch(r){return __trcError(`failed to get number of cards for lazy rendering :- ${e} | ${t}`),0}}isValidLazyPlacement(e){const{unifiedPlacement:t,placement:r}=e,i=t||r;if(a.hasVideo(e))return!1;if(e.isStories){const t=this.trcManager.storiesManager.stories[e.parentStories.unifiedPlacementName];if(t.isFirstCardRendered)return t.isFirstCardRendered=!0,!1}if(e.isHp4u)return!1;if(e.isDynamicLinks)return!1;if(this.isFppEnabled(i))return!0;if(this.isFppDisabled(i)||!this.lazyConfig.enable)return!1;const o=this.lazyConfig.excludePlacements.indexOf(i)>-1,n=!(!e.trcResponse||!e.trcResponse.nup);return!n&&!o}isFppEnabled(e){const t=this.placementsConfigs[e];return!(!t||!TRC.util.isTrue(t.enable))}isFppDisabled(e){const t=this.placementsConfigs[e];return!(!t||!TRC.util.isFalse(t.enable))}yieldRenderer(e){this.trcManager.loadRBoxDrawQueue(e)}standardRenderer(e){this.onePlacementRendered=!1,this.trcManager.internalDrawRBox(e)}static getRootElement(e){return e.parentFeed&&e.parentFeed.infiniteScrollEngine.observerScrollElement.children?e.parentFeed.infiniteScrollEngine.observerScrollElement:null}lazyRenderer(e){const t=this.getPlacementConfig("minCards",e),{unifiedPlacement:r}=e;if(void 0===r||e.modeGroupOrder>t){const t=this.getPlacementConfig("fullLazyBatch",e),{dispatchPlacements:i}=this.lazyConfig,o=this.getPlacementConfig("dispatchEnabled",e)||i.indexOf(r)>-1;o?this.dispatchPlacements(e):r&&t&&this.lazyBatches[r]?this.pushLazyBatchPlacement(e):this.setObserverParams(e),this.trcManager.global["send-eager-available-for-lazy-placements"]&&TRC.availableEventCoordinator.get(this.trcManager).sendAvailableEventsForPlacement(e)}else this.standardRenderer(e)}dispatchPlacements(e){this.pushLazyBatchPlacement(e),this.listener||(this.listener=TRC.listen("render-placement",e=>{this.lazyRenderBatch(e.placement,e.cb)}))}setObserverParams(e){const t=this.getObserverConfig(e),r=TRC.IntersectionObserver?new TRC.IntersectionObserver(t.onEnter,t.observerParams):new IntersectionObserver(t.onEnter,t.observerParams);r.observe(e.container)}isLazyPlacement(e){return!(this.onRenderApiKill()||this.onePlacementRendered||!e.container||!this.isValidLazyPlacement(e))&&(!e.trcResponse.fb||this.isLazyBatch(e.trcResponse.fb,e))}onRenderApiKill(){return!(!this.lazyConfig.raKill||!TRC.hasEvent(t))}pushLazyBatchPlacement(e){const t=this.lazyBatches[e.unifiedPlacement];t?this.lazyBatches[e.unifiedPlacement].push(e):this.lazyBatches[e.unifiedPlacement]=[e]}lazyRenderBatch(e,t){const r=this.lazyBatches[e];r&&(r.forEach(e=>this.standardRenderer(e)),delete this.lazyBatches[e]),t&&t()}getObserverConfig(e){let t;const r=__trcCopyProps(n,{});return r.root=a.getRootElement(e),r.rootMargin=this.getPlacementConfig("rootMargin",e),this.getPlacementConfig("fullLazyBatch",e)?(this.pushLazyBatchPlacement(e),t=this.lazyRenderBatch.trcBind(this,e.unifiedPlacement)):t=this.trcManager.internalDrawRBox.trcBind(this.trcManager,e),{targetElement:e.container,observerParams:r,onEnter:(r,i)=>{r[0].isIntersecting&&(t(),i.unobserve(e.container))}}}}TRC.RenderControl=a})(),(()=>{const e="tbl_rtus_id",t=1,r=2,i=42,o=91,n="RealTimeUserSyncMain",a="RealTimeUserSyncCallback";class s{constructor(e){this.trc=e,this.localStorage=e.pageManager.getLocalStorageImplementation()}applyRtus(){this.trc.ccpaPs?(this._log("ccpaPushTriggerRtus"),this._validateCcpaConsentAndCallRtusWithCcpaParams(this.trc.ccpaPs)):"function"==typeof window.__uspapi?this._applyRtusWithCcpa():"function"==typeof window.__tcfapi?this._applyRtusWithGdpr():"function"==typeof window.__cmp?this._log("gdprV1"):(this._log("default"),this._triggerRtusCall(""))}_applyRtusWithCcpa(){window.__uspapi("getUSPData",t,(e,t)=>{try{t?(this._log("ccpaApiTriggerRtus"),this._validateCcpaConsentAndCallRtusWithCcpaParams(e.uspString)):this._log("ccpaApiFail")}catch(e){this._log("ccpaApiError")}})}_validateCcpaConsentAndCallRtusWithCcpaParams(e){if("Y"===e.charAt(2))return;const t=`&us_privacy=${e}&gdpr=0&gdpr_consent=&gdpr_pd=`;this._triggerRtusCall(t)}_applyRtusWithGdpr(){window.__tcfapi("getTCData",r,(e,t)=>{try{t?TRC.Rtus.shouldCallRtusWithGdprParams(e)?(this._log("gdprV2triggerRtus"),this._callRtusWithGdprParams(e)):this._log("gdprV2notTriggerRtus"):this._log("gdprV2fail")}catch(e){this._log("gdprV2error")}},[i,o])}static shouldCallRtusWithGdprParams(e){return TRC.Rtus.isGdprNotApplies(e)||TRC.Rtus.hasConsent(e)}static isGdprNotApplies(e){return!e.gdprApplies}static hasConsent(e){const{consents:t}=e.vendor||{};return t[i]&&t[o]}_callRtusWithGdprParams(e){const t=`&us_privacy=&gdpr=${e.gdprApplies?1:0}&gdpr_consent=${e.tcString}&gdpr_pd=0`;this._triggerRtusCall(t)}_triggerRtusCall(t){const r="getRTUS",i=`//gum.criteo.com/sync?c=72&r=2&j=TRC.${r}${t}`;this._setRtusCallback(r),this.trc.performance&&this.trc.performance.mark(`${n}Start`,null,n,0,n,this.trc.PerfEvenType.START),this.trc.performance&&this.trc.performance.mark(`${a}Start`,null,a,0,a,this.trc.PerfEvenType.START);try{this.trc.net.loadScript(i,"js",null,null,!0),this.trc.pConsole("page","info","injected RTUS service")}catch(e){__trcWarn("Error during RTUS loading asset file: ",e)}try{this.trc.rtbRealTimeUserId=this.localStorage.getValue(e)}catch(e){__trcWarn("Error during fetching RTUI from local storage: ",e)}}_setRtusCallback(t){this.trc[t]=(t=>{try{this.trc.performance&&this.trc.performance.mark(`${a}Stop`,null,a,0,a,this.trc.PerfEvenType.STOP);const{status:r,userid:i}=t||{};"OK"===r?(this.trc.rtbRealTimeUserId=i,this.localStorage.setValue(e,i)):(this.trc.rtbRealTimeUserId=null,this.localStorage.removeKey(e))}catch(e){__trcWarn("Error during RTUS callback: ",e)}})}_log(e){TRCImpl&&TRCImpl.global&&!TRCImpl.global["allow-rtus-usage-logging"]||this.trc.RBoxUsage.logUsage("rtus",{file:"rtus.js",method:"injectRtus",position:e})}}TRC.Rtus=s})(),TRC.ScriptRenderer={render(e,t){e&&e.js?(e.normalizedTag=TRC.text.htmlUnescape(e.js),this.renderInIframe(this.createIframe(t.container),e)):__trcError("could not find script to render")},createIframe(e){if(!e)return void __trcError("could not find container to create Iframe within");const t=document.createElement("iframe");return t.style.border=t.frameBorder=t.border="0",t.style.display="block",t.scrolling="no",e.appendChild(t),t},renderInIframe(e,t){if(!e)return void __trcError("could not find iframe to render within");let r=e.contentWindow||e.contentDocument;r.document&&(r=r.document),this.setOuterIframeStyle(e,t),this.runTagInIframe(r,t.normalizedTag),this.resetStyleInIframe(r)},setOuterIframeStyle(e,t){e.style.width=t.w||"0px",e.style.height=t.h||"0px"},runTagInIframe(e,t){void 0!==t&&null!==t?(e.open(),e.write(t),e.close()):__trcError("could not find normalizedTag to render")},resetStyleInIframe(e){const t=e.createElement("style"),r="body { margin: 0px }";t.type="text/css",t.styleSheet?t.styleSheet.cssText=r:t.appendChild(e.createTextNode(r)),e.getElementsByTagName("head")[0].appendChild(t)}},function(e,t){TRC.SpotlightLoader={load:function(e){this.shouldLoad(e)&&(this.loadedScript?TRC.dispatch("trc_afterRboxDraw"):(__trcDebug("Detected Spotlight Administrator("+e.trc["pi"]+")"),TRC.backstageDomainPrefix=e.trc["bdp"],TRC.backstageDomainSuffix=e.trc["bds"],this.loadedScript=TRC.URL.prototype.switchProtocol.call(TRC.getBackstageUrl()+"resources/js/1.1.0/spotlight.js",TRC.PROTOCOL),TRC.Manager.prototype.loadExternal(this.loadedScript,"js")))},shouldLoad:function(e){return!(!t.querySelectorAll||TRC.Device.isTouchDevice||!e||!e.trc||"1"!=e.trc["sl"])},registerOnMainContainer:function(e,t){e&&this.shouldLoad(t)&&e.setAttribute("data-spotlight-publisher-id",t.trc["pi"])}}}(window,document),(()=>{class e{constructor(e,t){this._createInstanceList(e,t)}_createInstanceList(e,t){if(TRC[t]||__trcError(`${t} does not exist under TRC`,null),TRC[t].instances){if(TRC[t].instances[e])throw new Error("instance already exists under this uniqueid");return void(TRC[t].instances[e]=this)}const r=function(e){return TRC[this].instances?TRC[this].instances[e]:null};TRC[t].instances={},TRC[t].getInstance=r.bind(t),TRC[t].instances[e]=this}}TRC.StoriesBase=e})(),TRC.listen("stories-initiation",()=>{const e={CAROUSEL_ANIMATION:"bouncing-animation",CAROUSEL_CONTAINER:"tbl-stories-carousel-container",CAROUSEL_TOPICS_WRAPPER:"tbl-stories-topics-wrapper",CAROUSEL_TOPIC_CONTAINER:"tbl-stories-topics-container",CAROUSEL_TOPIC_IMAGE_WRAPPER:"tbl-stories-topic-image-wrapper",CAROUSEL_TOPIC_TITLE:"tbl-stories-topic-title",CAROUSEL_TOPIC_IMAGE:"tbl-stories-topic-image",CAROUSEL_TOPIC_CLICK_LOADING:"tbl-stories-topic-loading",CAROUSEL_ONBOARDING:"tbl-stories-onboarding",CAROUSEL_ONBOARDING_STATIC:"tbl-stories-onboarding-static",CAROUSEL_READY:"tbl-stories-carousel-ready"},t={CATEGORIES_DISPLAYED:"categoriesDisplayed"},r={cs:"#4472c4",ce:"#00b5d9"},i={TOPIC_CLICKED:"topic-click"},o={LONG_VISIBLE_TIMEOUT:3e3,ON_BOARDING_TEXT:"New! Click to view visual Stories",ON_BOARDING_COLOR:"#2676F7",ON_BOARDING_FIRST_WORDS:1};class n extends TRC.StoriesBase{constructor(e,t){super(e,"StoriesCarousel");try{this.unifiedPlacementName=e,this.eventsManager=TRC.StoriesEventsManager.getInstance(e),this.options=this.getCarouselOptions(),this.injectCarouselStyle(),this.createCarouselLayout(),this.setStickyStories(t),this.eventsManager.observeCarousel(this)}catch(e){this.eventsManager.onError(`StoriesCarousel instance`,e)}}injectCarouselStyle(){const{onBoardingColor:e,extendedStyle:t}=this.options;TRC.dom.injectStyle(`.tbl-stories-carousel-container { box-sizing: initial; float: initial; padding: initial; width: initial; vertical-align: initial; border: initial; }.tbl-stories-carousel-container .tbl-stories-topic-image { top: 0; left: 0; bottom: 0; right: 0; }.bouncing-animation > li { transform: translateY(-100%); -webkit-animation: bouncingDown 1s ease-in-out 1s forwards; -moz-animation: bouncingDown 1s ease-in-out 1s forwards; -ms-animation: bouncingDown 1s ease-in-out 1s forwards; -o-animation: bouncingDown 1s ease-in-out 1s forwards; animation: bouncingDown 1s ease-in-out 1s forwards; }.bouncing-animation > li:nth-child(1) { -webkit-animation: bouncingDown 1s ease-in-out 0.1s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.1s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.1s forwards; -o-animation: bouncingDown 1s ease-in-out 0.1s forwards; animation: bouncingDown 1s ease-in-out 0.1s forwards; }.bouncing-animation > li:nth-child(2) { -webkit-animation: bouncingDown 1s ease-in-out 0.2s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.2s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.2s forwards; -o-animation: bouncingDown 1s ease-in-out 0.2s forwards; animation: bouncingDown 1s ease-in-out 0.2s forwards; }.bouncing-animation > li:nth-child(3) { -webkit-animation: bouncingDown 1s ease-in-out 0.3s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.3s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.3s forwards; -o-animation: bouncingDown 1s ease-in-out 0.3s forwards; animation: bouncingDown 1s ease-in-out 0.3s forwards; }.bouncing-animation > li:nth-child(4) { -webkit-animation: bouncingDown 1s ease-in-out 0.4s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.4s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.4s forwards; -o-animation: bouncingDown 1s ease-in-out 0.4s forwards; animation: bouncingDown 1s ease-in-out 0.4s forwards; }.bouncing-animation > li:nth-child(5) { -webkit-animation: bouncingDown 1s ease-in-out 0.5s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.5s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.5s forwards; -o-animation: bouncingDown 1s ease-in-out 0.5s forwards; animation: bouncingDown 1s ease-in-out 0.5s forwards; }.bouncing-animation > li:nth-child(6) { -webkit-animation: bouncingDown 1s ease-in-out 0.6s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.6s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.6s forwards; -o-animation: bouncingDown 1s ease-in-out 0.6s forwards; animation: bouncingDown 1s ease-in-out 0.6s forwards; }.bouncing-animation > li:nth-child(7) { -webkit-animation: bouncingDown 1s ease-in-out 0.7s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.7s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.7s forwards; -o-animation: bouncingDown 1s ease-in-out 0.7s forwards; animation: bouncingDown 1s ease-in-out 0.7s forwards; }.bouncing-animation > li:nth-child(8) { -webkit-animation: bouncingDown 1s ease-in-out 0.8s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.8s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.8s forwards; -o-animation: bouncingDown 1s ease-in-out 0.8s forwards; animation: bouncingDown 1s ease-in-out 0.8s forwards; }.bouncing-animation > li:nth-child(9) { -webkit-animation: bouncingDown 1s ease-in-out 0.9s forwards; -moz-animation: bouncingDown 1s ease-in-out 0.9s forwards; -ms-animation: bouncingDown 1s ease-in-out 0.9s forwards; -o-animation: bouncingDown 1s ease-in-out 0.9s forwards; animation: bouncingDown 1s ease-in-out 0.9s forwards; }.bouncing-animation > li:nth-child(10) { -webkit-animation: bouncingDown 1s ease-in-out 1s forwards; -moz-animation: bouncingDown 1s ease-in-out 1s forwards; -ms-animation: bouncingDown 1s ease-in-out 1s forwards; -o-animation: bouncingDown 1s ease-in-out 1s forwards; animation: bouncingDown 1s ease-in-out 1s forwards; }.tbl-stories-carousel-container { position: relative; overflow: hidden; } .tbl-stories-carousel-container .tbl-stories-topics-wrapper { overflow-y: hidden; overflow-x: scroll; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; margin: 0; padding: 0 5px; z-index: 0; } .tbl-stories-carousel-container .tbl-stories-topics-wrapper::-webkit-scrollbar { display: none; } .tbl-stories-carousel-container .tbl-stories-topics-container { list-style: none; text-align: center; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; width: 72px; position: relative; } .tbl-stories-carousel-container .tbl-stories-topic-image-wrapper { height: 64px; width: 64px; position: relative; left: 0; top: 0; border-radius: 32px; margin: 0 4px; z-index: 0; } .tbl-stories-carousel-container .tbl-stories-topic-image-wrapper svg { vertical-align: inherit; fill: transparent; } .tbl-stories-carousel-container .tbl-stories-topic-title { position: relative; bottom: 0; left: 0; width: 100%; font-size: 12px; font-weight: normal; font-style: normal; display: block; padding: 4px 0 0; word-break: break-word; word-wrap: break-word; } .tbl-stories-carousel-container .tbl-stories-topic-loading svg { animation: tbl-stories-rotate 2s infinite linear; -webkit-animation: tbl-stories-rotate 2s infinite linear; } .tbl-stories-carousel-container .tbl-stories-topic-loading .tbl-stories-topic-image { filter: grayscale(100%); } .tbl-stories-carousel-container .tbl-stories-onboarding { position: absolute; opacity: 0; background-color: ${e}; color: #fcfcfc; padding: 0 15px; z-index: 1; right: 0; -webkit-transform: translateX(-100vh); -ms-transform: translateX(-100vh); transform: translateX(-100vh); border-radius: 16px 0 0 16px; font-size: 12px; height: 30px; line-height: 30px; top: 0; } .tbl-stories-carousel-container .tbl-stories-onboarding-static { position: relative; font-size: 14px; color: initial; padding: 5px 15px; z-index: 1; line-height: initial; overflow-y: hidden; } .tbl-stories-carousel-container .tbl-stories-topic-image { width: 60px; height: 60px; border: 2px solid #fcfcfc; position: absolute; border-radius: 50%; z-index: 1; opacity: 0; transition: opacity 1s ease-in, filter 1s ease-in; box-sizing: border-box; margin: auto; overflow: auto; } .tbl-stories-carousel-container.tbl-stories-carousel-ready .tbl-stories-topic-image { opacity: 1; } .tbl-stories-carousel-container.tbl-stories-carousel-ready .tbl-stories-onboarding { -webkit-animation: tbl-stories-onboarding-fade 6s linear; animation: tbl-stories-onboarding-fade 6s linear; -webkit-animation-delay: 2s; animation-delay: 2s; }@-webkit-keyframes tbl-stories-rotate { from { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); } to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }@keyframes tbl-stories-rotate { from { -webkit-transform: rotate(-360deg); transform: rotate(-360deg); } to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }@-webkit-keyframes tbl-stories-onboarding-fade { 0%, 100% { -webkit-transform: translate(0, -10px); transform: translate(0, -10px); opacity: 0; } 10%, 90% { -webkit-transform: translate(0, -10px); transform: translate(0, -10px); opacity: 0.8; } }@keyframes tbl-stories-onboarding-fade { 0%, 100% { -webkit-transform: translate(0, -10px); transform: translate(0, -10px); opacity: 0; } 10%, 90% { -webkit-transform: translate(0, -10px); transform: translate(0, -10px); opacity: 0.8; } }@-webkit-keyframes bouncingDown { 0% { -webkit-transform: translateY(-100%); } 50% { -webkit-transform: translateY(10px); } 100% { -webkit-transform: translateY(0); } }@keyframes bouncingDown { 0% { transform: translateY(-100%); } 50% { transform: translateY(10px); } 100% { transform: translateY(0); } }`),t&&TRC.dom.injectStyle(t)}carouselReady(){requestAnimationFrame(()=>{TRC.dom.addClass(this.carouselContainer,e.CAROUSEL_READY),TRC.dom.addClass(this.topicsList,e.CAROUSEL_ANIMATION)})}getCarouselOptions(){const{options:e}=this.eventsManager;let{cc:t}=e.storiesUi;t||(t={});let{ob:i}=t;return i||(i={}),{extendedStyle:t.style||"",topicBorderColor:t.tc||r,onBoardingEnableTooltip:!!i.obet||!1,onBoardingColor:i.obc||o.ON_BOARDING_COLOR,onBoardingText:i.obtxt||o.ON_BOARDING_TEXT,onBoardingFirstWordsNum:i.obfwn?parseInt(i.obfwn,10):o.ON_BOARDING_FIRST_WORDS,useCloudinaryCroppingForThumbs:void 0===t.clcrt||TRC.util.isTrue(t.clcrt),visibleDuration:t.vsd?parseInt(t.vsd,10):o.LONG_VISIBLE_TIMEOUT,stickyStories:t.stcy,randomTopicImage:t.rndTpcImage||""}}createCarouselLayout(){this.carouselContainer=TRC.dom.createHTMLElement("nav",{className:e.CAROUSEL_CONTAINER}),this.topicsList=TRC.dom.createHTMLElement("ul",{className:e.CAROUSEL_TOPICS_WRAPPER}),this.carouselContainer.insertAdjacentHTML("afterbegin",this.getOnBoarding()),this.carouselContainer.appendChild(this.topicsList)}addTopic(e){this.topicsList.insertAdjacentElement("beforeend",this.getTopicElement(e))}getTopicElement({id:t,imageUrl:r,title:i,slotPosition:o}){const n=TRC.dom.createHTMLElement("li",{className:e.CAROUSEL_TOPIC_CONTAINER,topicName:i,topicPosition:o,topicId:t}),a=`<div class="${e.CAROUSEL_TOPIC_IMAGE_WRAPPER}">\n <img alt="${t}" class="${e.CAROUSEL_TOPIC_IMAGE}" src="${r}" onerror="this.style.display='none'">\n ${this.getBorderTopic()}\n </div>`,s=`<label class="${e.CAROUSEL_TOPIC_TITLE}">${i}</label>`;return n.insertAdjacentHTML("afterbegin",`${a}${s}`),TRC.CustomModulesManager.runHook("stories-topic-rendered",null,this,t,n,i),TRC.dom.on(n,"click",this.carouselTopicClickHandler.trcBind(this,t)),this.eventsManager.observeCarouselTopic(n),n}carouselTopicClickHandler(e,r){const o=TRC.Stories.getInstance(this.unifiedPlacementName),a=o.topics[e],{videoTag:s}=o.options;n.clickOnCarouselTopicLoadingIndication(r.currentTarget),TRC.StoriesVerticalUi?o.renderVerticalUiPlacements(a):TRC.listen("vertical-ui-loaded",o.renderVerticalUiPlacements.trcBind(o,a));const l=a.title,c=a.slotPosition;this.eventsManager.sendEvent(i.TOPIC_CLICKED,{ab:[l,c],mxp:{topicName:l,topicPosition:c}}),s&&TRC.StoriesVideoManager&&TRC.dispatch(t.CATEGORIES_DISPLAYED)}carouselSDKTopicClickHandler(e){const t=TRC.Stories.getInstance(this.unifiedPlacementName),r=t.topics[e];TRC.StoriesVerticalUi?t.renderVerticalUiPlacements(r,!0):TRC.listen("vertical-ui-loaded",t.renderVerticalUiPlacements.trcBind(t,r))}getBorderTopic(){const{topicBorderColor:e}=this.options;return`<svg height="64px" width="64px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" xml:space="preserve"> \n <linearGradient id="topic-background-grad" x1="0%" y1="0%" x2="100%" y2="0%">\n <stop offset="0%" style="stop-color:${e.cs};stop-opacity:1"></stop>\n <stop offset="100%" style="stop-color:${e.ce};stop-opacity:1"></stop>\n </linearGradient>\n <circle cx="50" cy="50" r="50" fill="url(#topic-background-grad)"></circle>\n </svg>`}getImageURL(e){const{randomTopicImage:t}=this.options,r=TRC.util.isTrue(t)?Math.floor(Math.random()*e.length):0;return e.length>0?e[r].thumbnail:""}getTopicImage(e,t){const r="g_auto,c_thumb,w_128,h_128,fl_advanced_resize,e_sharpen,q_auto:best,f_auto",{useCloudinaryCroppingForThumbs:i}=this.options;let o=this.getImageURL(t);return e&&(o=e),i?TRC.imageUtils.getImageUrlBasedOnCloudinaryApi(o,r):o}static clickOnCarouselTopicLoadingIndication(t){TRC.dom.addClass(t,e.CAROUSEL_TOPIC_CLICK_LOADING),TRC.Timeout.set(()=>{TRC.dom.removeClass(t,e.CAROUSEL_TOPIC_CLICK_LOADING)},2e3)}getOnBoarding(){const{onBoardingText:t,onBoardingFirstWordsNum:r,onBoardingColor:i,onBoardingEnableTooltip:o}=this.options;if(o)return`<div class="${e.CAROUSEL_ONBOARDING}">${t}</div>`;const[a,s]=n.getOnBoardingSliced(t,r);return`<div class="${e.CAROUSEL_ONBOARDING_STATIC}">\n <span class="tbl-stories-onboarding-static-first-words" style="color: ${i}">${a}</span> ${s}</div>`}static getOnBoardingSliced(e,t){t=t<0?0:t;const r=e.split(" ");return[r.slice(0,t).join(" "),r.slice(t,r.length).join(" ")]}setStickyStories(e){this.stickyStories=null,this.options.stickyStories&&(this.stickyStories=new TRC.StoriesSticky(e,this.options.stickyStories,this.unifiedPlacementName))}}TRC.StoriesCarousel=n}),TRC.listen("stories-initiation",()=>{const e={VISIBLE:"visible",LONG_VISIBLE:"long-visible",TOPIC_VISIBLE:"topic-visible"};class t extends TRC.StoriesBase{constructor(e,t){super(t,"StoriesEventsManager"),this.options=e,this.unifiedPlacementName=t}sendLifeCycleEvents(e){try{const{responseEnd:t}=window.performance.timing,r=Date.now(),i=r-t;this.sendEvent(e,{ab:[i],mxp:{timeFromLoad:i}})}catch(e){this.onError("sendLifeCycleEvents",e)}}sendDefaultEvent(e,t,r=[]){const{topicName:i,topicPosition:o,itemPosition:n}=t,a={};r.forEach((e,t)=>{a[`extraData_${++t}`]=e}),a.topicName=i,a.topicPosition=o,a.itemPosition=n;const s={ab:[i,o,n,...r],mxp:a};this.sendEvent(e,s)}sendEvent(e,{ab:r,mxp:i}){const o=`stories-${e}`;t.sendAbEvent(o,r.join("_")),this.sendMixpanelEvent(o,i)}sendMixpanelEvent(e,t){this.options.enableMixpanel&&(TRC.Mixpanel.isMixPanelLoaded()?TRC.Mixpanel.sendMixpanelEvent(e,t):TRC.listen("mixpanelScriptSucceeded",()=>{TRC.Mixpanel.sendMixpanelEvent(e,t)}))}static sendAbEvent(e,t){TRCImpl.sendAbTestEvent(e,t)}onError(e,t,r=__trcWarn){let i={};t?i={errorMsg:`${e} - error: ${t.message}`,errorStack:t.stack}:i.errorMsg=e,this.sendMixpanelEvent("stories-error",i),r(`stories ${i.errorMsg}`,t)}observeCarousel({carouselContainer:e,options:t}){const r=TRC.intersections.observe({targetElement:e,onEnter:()=>{this.onCarouselVisible(r,t.visibleDuration)},onExit:()=>{TRC.Timeout.clear(this.visibleTimeoutId)},threshold:.5})}onCarouselVisible(t,r){const{options:i}=TRC.Stories.getInstance(this.unifiedPlacementName);this.sendLifeCycleEvents(e.VISIBLE),this.visibleTimeoutId=TRC.Timeout.set(()=>{TRC.intersections.unobserve(t),TRC.Timeout.clear(this.visibleTimeoutId),this.sendLifeCycleEvents(e.LONG_VISIBLE),TRC.CustomModulesManager.runHook("stories-long-visible",null,this,i.storiesUi)},r)}observeCarouselTopic(t){let r;const i={targetElement:t,onEnter:({target:t})=>{TRC.intersections.unobserve(r);const{topicName:i,topicPosition:o}=t;this.sendEvent(e.TOPIC_VISIBLE,{ab:[i,o],mxp:{topicName:i,topicPosition:o}})},threshold:.5};r=TRC.intersections.observe(i)}}TRC.StoriesEventsManager=t}),TRC.listen("stories-initiation",()=>{class e extends TRC.StoriesBase{constructor(e,t){super(t,"StoriesHistoryController"),this._historyApi=TRC.historyApi,this._inactiveKey=`${e}-open`,this._activeKey=`${e}-close`,this._applyOpen=[],this._applyClose=[],this._currentArgs=[],this._reason="History controller init",this._setupEventListeners()}onOpen(e){this._applyOpen.push(e)}onClose(e){this._applyClose.push(e)}_setupEventListeners(){this._historyApi.onPopState(()=>{this.isInactive()?this._close():this.isActive()&&this._open()},{stateCheck:e=>e[this._inactiveKey]}),this.isActive()&&this.close()}isActive(){const e=this._historyApi.currentState();return e&&e[this._activeKey]}isInactive(){const e=this._historyApi.currentState();return e&&e[this._inactiveKey]}_open(){this._applyOpen.forEach(e=>e(...this._currentArgs))}open(...e){this._currentArgs=e,this._open(),this.isActive()||(this._historyApi.appendState({[this._inactiveKey]:!0}),this._historyApi.pushState({[this._activeKey]:!0}))}_close(){const e=this._reason||"Browser back";delete this._reason,this._applyClose.forEach(t=>t(e))}close(e){this._reason=e,this._historyApi.back()}}TRC.StoriesHistoryController=e}),(()=>{const e={"stories-transition-manager":!0,"stories-vertical-ui":!0},t="017c7c2cd4672abad2a2cf4d9d7fbb13";class r{constructor(e){this.trcManager=e,this.stories={},this.configs={},TRC.Stories||TRC.dispatch("stories-initiation")}static lazyLoadStoriesModules(){TRC.StoriesVerticalUi||TRC.ModuleLoader.load("stories-vertical-ui",TRC.StoriesVerticalUi,()=>{TRC.dispatch("vertical-ui-loaded")})}lazyLoadFailure(t,r){e[t.moduleFile]&&(r.forEach(e=>this.stories[e].collapseContainer()),__trcWarn(`failed to load ${t.moduleFile}, stories collapsed`))}createNewStories({s:e,cga:i},o){try{TRC.listen("module-loader-failure",t=>this.lazyLoadFailure(t,Object.keys(e))),r.lazyLoadStoriesModules(),Object.keys(e).forEach(n=>{if(this.stories[n])return void __trcWarn(`Stories already created for '${n}'`);const a=r.getOptions(e,i,n,o);a.enableMixpanel&&TRC.Mixpanel.loadMixpanelScript(t),TRC.listen("vp-selector-not-found",()=>this.stories.storiesContainerNotCreated=!0),TRC.VirtualPlacementsManager.handleVirtualPlacement(this.trcManager,n),this.stories.storiesContainerNotCreated||(TRC.CustomModulesManager.runHook("stories-init",null,this),this.stories[n]=new TRC.Stories(this.trcManager,n,a))})}catch(e){__trcWarn(`Stories - failed to create Stories Instance`,e.message)}}handleStoryPlacement(e,t){this.stories.storiesContainerNotCreated||(t.isStories=!0,t.parentStories=this.getRelevantStories(e),t.parentStories.handlePlacement(t))}getRelevantStories(e){return this.stories[e.stpl]}static getOptions(e,t,i,o){const n=e[i],a=t&&t.storiesExtendConfig&&t.storiesExtendConfig[i],s=r.parseStoriesOptionsFromResponse(n);return r.overrideOptionsConfiguration("cc",s,a),r.overrideOptionsConfiguration("vui",s,a),s.storiesPlacementsAmount=o,s}static overrideOptionsConfiguration(e,t,r){r&&r[e]&&t.storiesUi&&t.storiesUi[e]&&(t.storiesUi[e]=TRC.util.merge(t.storiesUi[e],r[e]))}static parseStoriesOptionsFromResponse({sti:e,sui:t,fv:r,st:i,vtag:o,dm:n,dir:a}=null){return{storiesProductId:e,storiesUi:t||{},enableFeedView:TRC.util.isTrue(r),injectScStrategy:i||"static",enableMixpanel:TRC.util.isTrue(n)||!0,videoTag:o,direction:a}}}TRC.StoriesManager=r})(),TRC.listen("stories-initiation",()=>{const e={STICKY_ACTIVE:"tbl-stories-sticky-active",STICKY_HIDDEN:"tbl-stories-sticky-hidden",STICKY_SCROLL_UP:"tbl-stories-sticky-scroll-direction-up",STICKY_SCROLL_DOWN:"tbl-stories-sticky-scroll-direction-down",STICKY_STYLE_ID:"tbl-sticky-style"},t={SHOW:"SHOW",HIDE:"HIDE"},r={UP:"UP",DOWN:"DOWN"},i="#fff";class o extends TRC.StoriesBase{constructor(e,t,r){super(r,"StoriesSticky"),this.storiesContainer=e,this.eventsManager=TRC.StoriesEventsManager.getInstance(r),this.feedInViewPort=!1,this.isStickyActive=!1,this.options=this.getStickyOptions(t),this.options.enabled&&(o.injectStickyStyles(this.options),this.setStickyScrollListener(),this.listenForFeedInViewPort(),void 0===this.options.topScrollDownValue&&this.setPublisherHeaderListener())}setStickyScrollListener(){this.lastScrollTop=TRC.dom.getScrollTop(window),this.initialScroll=!0,TRC.dom.on(window,"scroll",this.onScroll.trcBind(this))}setPublisherHeaderListener(){try{const e=new ResizeObserver(e=>{[].slice.call(e).forEach(e=>{const{height:t}=e.contentRect;this.options.topScrollDownValue=this.options.topScrollUpValue=`${t}px`})});e.observe(this.publisherHeaderEl)}catch(e){this.eventsManager.onError(`Error creating resizeObserver for sticky stories`,e)}}listenForFeedInViewPort(){TRC.listen("feed-present-in-viewport",({data:e})=>{this.feedInViewPort=TRC.util.isTrue(e)})}static injectStickyStyles({stickyBackgroundColor:e,zIndex:t,topScrollDownValue:r}){TRC.dom.injectStyle(`.tbl-stories-container { transition: transform 1s, top 0.5s; z-index: ${t}; } .tbl-stories-container.tbl-stories-sticky-active { background: ${e}; top: 0; position: sticky; border-bottom: 1px solid #ccc; } .tbl-stories-container.tbl-stories-sticky-hidden { top: -100%; }`)}getStickyOptions(e){const{e:t,uthrsld:r,scrldwn:o,isc:n,zi:a,bgc:s,off:l}=e,c=e.slctr||"header";this.publisherHeaderEl=document.querySelector(c),this.publisherHeaderEl||this.eventsManager.onError(`Sticky Stories header was not found on the page: ${c}`);const d=parseInt(e.thrsld||this.getHeaderComputedStyle("height"),10);return{enabled:"false"!==t&&!!this.publisherHeaderEl,zIndex:this.getZIndex(a),stickyScrollDownDepth:o?parseInt(o,10):1e3,ignoreScrollChanges:n?parseInt(n,10):30,stickyBackgroundColor:s||i,topScrollDownValue:d,topScrollUpValue:r?parseInt(r,10):d,disableStickyOffset:l}}getZIndex(e){return e?parseInt(e,10):(e=this.getHeaderComputedStyle("zIndex"),TRC.util.isNumber(e)?parseInt(e,10)-1:e)}getHeaderComputedStyle(e){if(this.publisherHeaderEl)return this._getComputedStyle||(this._getComputedStyle=getComputedStyle(this.publisherHeaderEl)),this._getComputedStyle[e]}onScroll(){requestAnimationFrame(()=>{this.toggleStoriesOnScroll()})}toggleStoriesOnScroll(){const e=TRC.dom.getScrollTop(window);if(this.shouldIgnoreScrollChanges(e))return;const t=this.getStickyScrollDirection(e),r=this.getTrigger(e,t),i=this.shouldToggleSticky(r);i&&this.toggleStickyStories(r);const o=this.shouldChangeTopPosition(i,t);o&&this.changeTopPosition(t),this.lastScrollTop=e<=0?0:e,this.direction=t}shouldIgnoreScrollChanges(e){const t=Math.abs(this.lastScrollTop-e);return t<this.options.ignoreScrollChanges}getStickyScrollDirection(e){return this.lastScrollTop>e?r.UP:r.DOWN}getTrigger(e,i){const{disableStickyOffset:o,topScrollDownValue:n,topScrollUpValue:a,stickyScrollDownDepth:s}=this.options,l=!!o&&o>e;this.storiesCarouselTopPosition=this.storiesContainer.getBoundingClientRect().top;const c=this.storiesCarouselTopPosition>a;if(l||c)return t.HIDE;const d=+n+s,p=e>=d;return i===r.DOWN&&p?t.HIDE:t.SHOW}shouldToggleSticky(e){if(this.initialScroll)return this.initialScroll=!1,!1;const r=e===t.SHOW;return this.isStickyActive?!r:!!r&&!this.feedInViewPort}toggleStickyStories(r){r===t.HIDE&&(TRC.dom.addClass(this.storiesContainer,e.STICKY_HIDDEN),TRC.dom.removeClass(this.storiesContainer,e.STICKY_ACTIVE),this.storiesContainer.style.transform=""),r===t.SHOW&&(TRC.dom.removeClass(this.storiesContainer,e.STICKY_HIDDEN),TRC.dom.addClass(this.storiesContainer,e.STICKY_ACTIVE)),this.isStickyActive=!this.isStickyActive}calcTranslateY(e){const t=/(matrix(?:3d)*\((?:(?:-*\d+(?:\.\d+)*, ){13}|(?:-*\d+(?:\.\d+)*, ){5}))(-*\d+(?:\.\d+)*)((?:, -*\d+(?:\.\d+)*)*\))/,r=getComputedStyle(this.storiesContainer).transform;return t.test(r)?r.replace(t,`$1${e}$3`):`translateY(${e}px)`}shouldChangeTopPosition(e,t){const{topScrollDownValue:r,topScrollUpValue:i}=this.options,o=r!==i,n=this.direction!==t;return!!this.isStickyActive&&(e||o&&n)}changeTopPosition(e){const{topScrollUpValue:t,topScrollDownValue:i}=this.options,o=e===r.UP;this.storiesContainer.style.transform=o?this.calcTranslateY(t):this.calcTranslateY(i)}}TRC.StoriesSticky=o}),TRC.listen("stories-initiation",()=>{const e={STORIES_CONTAINER:"tbl-stories-container",PLACEMENTS_CONTAINER:"tbl-stories-placements-container",CAROUSEL_CONTAINER:"tbl-stories-carousel-container",STORIES_PLACEMENT:"tbl-stories-placement",STORIES_RTL:"tbl-stories-rtl"},t={MAIN_CONTAINER_ID:"data-stories-main-container-id",STORY_INDEX:"data-story-index",STORY_TOPIC_INDEX:"data-story-topic-index",STORY_TOPIC:"data-story-topic"},r={AVAILABLE:"available",COLLAPSED:"collapsed",COLLAPSED_TOPIC:"collapsed-topic",VIDEO_PLAYING:"video-playing",TOPIC_SWIPED:"topic-swiped"};class i extends TRC.StoriesBase{constructor(e,t,o){if(super(t,"Stories"),this.trcManager=e,this.storiesPlacements={},this.topics={},this.isFirstCardRendered=!1,this.options=o,this.unifiedPlacementName=t,this.numPlacements=0,this.numTopics=0,this.placementData=e.preloadRequest[t],this.container=this.placementData.container,this.parentContainerId=this.container.id,new TRC.StoriesHistoryController(`tbl-stories-${this.parentContainerId}`,t),this.topicMinAmount=4,this.storiesHeight=e.global["default-stories-height"],this.enableClsReducer=e.global["enable-cls-reducer"]||!1,this.eventsManager=new TRC.StoriesEventsManager(o,t),this.isRtl=this.options.direction||"rtl"===this.trcManager.direction,this.isVideoInitiated=!1,this.placementData.isStories=!0,!this.isLazyRenderEnabled()){const e=`lazy render disabled: ${this.unifiedPlacementName}`;return this.eventsManager.sendEvent(r.COLLAPSED,{ab:[e],mxp:{errorMsg:e}}),this.collapseContainer(),void __trcWarn(e)}TRC.listen("trcContentReady",e=>this.initVideoTag(e)),i.injectCss(),this.createStoriesContainer(),this.eventsManager.sendLifeCycleEvents(r.AVAILABLE);try{new TRC.StoriesCarousel(t,this.container)}catch(e){this.eventsManager.onError(`failed to create StoriesCarousel`,e),this.collapseContainer()}}isLazyRenderEnabled(){const{isLazyRenderEnabled:e,placementsConfigs:t}=this.trcManager.renderController,r=`Stories - ${this.unifiedPlacementName}`,i=t?t[r]:{};return e&&i&&i.enable}shouldLoadVideo(e){return this.options.videoTag&&!this.isVideoInitiated&&e.isStories&&e.trc["mode-before-video-load"](e)}initVideoTag({trcbox:e}){if(this.shouldLoadVideo(e)){const t={placement:e.placement,container:e.container};this.isVideoInitiated=!0,this.videoTagLoader=new TRC.VideoTagLoader(e.trc,this.options.videoTag,t,e,e.response.trc),this.videoTagLoader.loadVideo()}}static createBlurImageBox(e){const t=document.createElement("div");e.appendChild(t),e.blurImageStoriesBox=t}static injectCss(){TRC.dom.injectStyle(`.tbl-stories-container { width: 100vw; font-family: helvetica, arial, sans-serif; -webkit-overflow-scrolling: auto; padding: 0 0 5px; } .tbl-stories-container.tbl-stories-rtl { direction: rtl; } .tbl-stories-container .tbl-stories-placement { display: none; } .tbl-stories-container svg { /*override publisher css on svg tag*/ vertical-align: inherit; fill: transparent; }.tbl-feed-view-parent-wrapper body.tbl-stories-show { position: initial; overflow: initial; }`)}createStoriesContainer(){TRC.dom.addClass(this.container,e.STORIES_CONTAINER),this.isRtl&&TRC.dom.addClass(this.container,e.STORIES_RTL),this.container.setAttribute(t.MAIN_CONTAINER_ID,this.unifiedPlacementName),this.placementsContainer=TRC.dom.createHTMLElement("section",{className:e.PLACEMENTS_CONTAINER})}handlePlacement(i){try{if(this.storiesColapsed)return;const{placement:o,trcResponse:n}=i;if(this.storiesPlacements[o])return void this.eventsManager.onError(`placement already created for '${o}'`);const a=i.trcResponse.v.length;if(!a)return this.options.storiesPlacementsAmount--,this.eventsManager.sendEvent(r.COLLAPSED_TOPIC,{ab:[o,this.numPlacements+1],mxp:{topicName:o,topicPosition:this.numPlacements+1}}),void this.isStoriesLastPlacement();const s=document.createElement("section");i.container=s,i.modeGroupOrder=++this.numPlacements,s.setAttribute(t.STORY_INDEX,this.numPlacements),s.placementData=i,s.id=`${this.parentContainerId}-pl${this.numPlacements}`,TRC.dom.addClass(s,e.STORIES_PLACEMENT),this.handleTopicRelatedPlacement(s,n,i),this.placementsContainer.appendChild(s),this.isStoriesLastPlacement(),this.storiesPlacements[o]=i}catch(e){this.eventsManager.onError(`failed to handlePlacement`,e),this.collapseContainer()}}collapseContainer(){this.storiesColapsed=!0,TRC.dom.addClass(this.container,"tbl-hidden")}isStoriesLastPlacement(){if(this.options.storiesPlacementsAmount===this.numPlacements){if(this.numTopics<this.topicMinAmount){__trcWarn(`Stories Collapsed - Topics Rendered: ${this.numTopics}`);const e=`topics length is : ${this.numTopics}`;return this.eventsManager.sendEvent(r.COLLAPSED,{ab:[e],mxp:{errorMsg:e}}),void this.collapseContainer()}this.clsReducer(()=>{const e=TRC.StoriesCarousel.getInstance(this.unifiedPlacementName),{carouselContainer:t}=e;this.container.appendChild(t),this.container.appendChild(this.placementsContainer),e.carouselReady()}),TRC.EventsAPI.dispatchStoriesLoaded()}}clsReducer(e){const{virtualPlacementsMap:t}=this.trcManager.virtualPlacementsManager;this.enableClsReducer&&t[this.unifiedPlacementName]?(window.scroll({top:this.storiesHeight}),TRC.Timeout.set(e,0)):e()}renderVerticalUiPlacements(e,t){try{let r=TRC.StoriesVerticalUi.getInstance&&TRC.StoriesVerticalUi.getInstance(this.unifiedPlacementName);r||(r=new TRC.StoriesVerticalUi(this.unifiedPlacementName)),t&&r.handleVerticalUiLayout(),r.openVerticalUi(e)}catch(e){this.eventsManager.onError("renderVerticalUiPlacements",e)}}handleTopicRelatedPlacement(e,r,o){const{categoryId:n,categoryTitle:a,categoryImage:s}=i.getPlacementCategoryData(r),l=TRC.StoriesCarousel.getInstance(this.unifiedPlacementName);if(!n)return;this.loadFeedView(o),e.setAttribute(t.STORY_TOPIC,n),e.setAttribute(t.STORY_TOPIC_INDEX,++this.numTopics);const c={id:n,title:a||n,imageUrl:l.getTopicImage(s,r.v),slotPosition:this.numPlacements,placementContainer:e};this.topics[n]=o.topicData=c,l.addTopic(c)}static getPlacementCategoryData(e){const{cid:t,ct:r,ciu:i}=e;return{categoryId:t,categoryTitle:r,categoryImage:i}}loadFeedView(e){if(this.options.enableFeedView){new TRC.FeedViewWidgetLoaderManager(e);const{fvConfig:t}=this.options.storiesUi.vui;t&&(e.feedViewConfig=t)}}}TRC.Stories=i});class ClassTreeFactory{constructor(e={}){this.Class=this.constructor,this.settings=e,this.settings.classTreeArr=this.settings.classTreeArr||[]}sub(e){const t=JSON.parse(JSON.stringify(this.settings));return t.classTreeArr.push(e),new this.Class(t)}mixin(...e){const t=e.reduceRight((e,t)=>t(e),this.Class);return new t(this.settings)}}const MetricReporterMixin=e=>(class extends e{constructor(e={}){super(e),this.settings.classTreeArr=this.settings.classTreeArr||[],this.id=this.settings.classTreeArr.slice(-1)[0]||""}sendRboxMetricsEvent({eventName:e,value:t,type:r}={}){TRC.MetricsManager&&TRC.MetricsManager.sendMetricsEvent(TRC,TRCImpl,{name:`${this.id}-${e}`,value:t,type:r},null)}logUsage({file:e="",extraData:t={}}={}){TRC.RBoxUsage&&TRC.RBoxUsage.logUsage&&TRC.RBoxUsage.logUsage(`${this.id}-event-${Date.now()}`,{extraData:t,file:e})}}),classTreeFactory$2=new ClassTreeFactory,metricReporter$1=classTreeFactory$2.mixin(MetricReporterMixin);var Promise$1="undefined"!=typeof Promise&&Promise||PromisePolyFill;const statuses={PENDING:{},FULFILLED:{},REJECTED:{}};function PromisePolyFill(e){const t=[],r=[],i=l(statuses.FULFILLED),o=l(statuses.REJECTED);let n=statuses.PENDING,a,s;function l(e){return function(i){n===statuses.PENDING&&(a=i,wait(s=makeDispatcher((n=e)===statuses.FULFILLED?t:r,a)))}}try{e(i,o)}catch(e){o(e)}const c={then(e,i){const o=new PromisePolyFill((a,l)=>{const c=function(e,t,r){"function"==typeof e?t.push(t=>{let r;try{r=e(t),resolve(o,r,a,l)}catch(e){l(e)}}):t.push(r)};c(e,t,a),c(i,r,l),n!==statuses.PENDING&&wait(s)});return o},catch:function(e){return this.then(null,e)}};return c}function wait(e){setTimeout(e,0)}function makeDispatcher(e,t){return function(){let r;for(;r=e.shift();)r(t)}}function resolve(e,t,r,i){let o;if(t===e)throw new TypeError("A promise's fulfillment handler cannot return the same promise");if(t instanceof PromisePolyFill)t.then(r,i);else if(!t||"object"!=typeof t&&"function"!=typeof t)r(t);else{try{o=t.then}catch(e){return void i(e)}if("function"==typeof o){let a;function n(t){a||(a=!0,resolve(e,t,r,i))}const s=function(e){a||(a=!0,i(e))};try{o.call(t,n,s)}catch(e){a||(i(e),a=!0)}}else r(t)}}PromisePolyFill.all=function(e){return new PromisePolyFill((t,r)=>{const i=[];let o,n;if(e.length)for(o=n=e.length;n--;)a(n);else t(i);function a(n){e[n].then(e=>{i[n]=e,--o||t(i)},r)}})},PromisePolyFill.race=function(e){return new PromisePolyFill((t,r)=>{e.forEach(e=>{e.then(t,r)})})},PromisePolyFill.resolve=function(e){return new PromisePolyFill(t=>{t(e)})},PromisePolyFill.reject=function(e){return new PromisePolyFill((t,r)=>{r(e)})};const TIME_BETWEEN_EVENTS=100,MAX_MS_BETWEEN_EVENTS=2e3,SCROLL_END_TIMEOUT=500;class ScrollManager{constructor(){if(ScrollManager.instance)return ScrollManager.instance;ScrollManager.instance=this,this.ppsDetection=!1,this.lastTimeStamp=0,this.pps=0,TRC.dom.on(window,"scroll",this.onScroll.trcBind(this).trcThrottle(TIME_BETWEEN_EVENTS))}onScroll(e){clearTimeout(this.scrollEnd),this.pps=0;const t=e.timeStamp-this.lastTimeStamp;this.lastTimeStamp=e.timeStamp;const r=window.scrollY-this.lastScrollTop;this.lastScrollTop=window.scrollY,t<MAX_MS_BETWEEN_EVENTS&&this.changePPS(r/t*1e3),this.scrollEnd=setTimeout(this.onScrollEnd.bind(this),SCROLL_END_TIMEOUT)}getPps(){return this.pps}changePPS(e){this.pps=e}onScrollEnd(){this.changePPS(0)}}var dynamicContentLoader='<!DOCTYPE html> <html> <head> <script> !function(){"use strict";!function(){window.TBC=window.TBC||{};var e,t,n=window.TBC.cmd=window.TBC.cmd||[],o={connection:!!window.postMessage},i={validateApiActionArguments:function(e,t){if("object"!=typeof t[0].sizeObject&&"object"!=typeof t[0].iframeArgs&&"function"!=typeof t[1])throw new TypeError("invalid argument supplied for "+e+"()")},init:function(){e={},t={},window.addEventListener("message",i.receiveMessage),i.switchCmd(),i.executeCmd(),i.isMobileSDK()&&i.registerTrcClicks()},registerTrcClicks:function(){document.body?document.body.addEventListener("click",function(e){var t=i.extractItemData(e.target);t&&(e.preventDefault(),TBC.click(t))},!0):requestAnimationFrame(i.registerTrcClicks)},extractItemData:function(e){return"BODY"===e.nodeName?null:"A"===e.nodeName?i.collectElementData(e):e.parentElement?i.extractItemData(e.parentElement):null},collectElementData:function(e){var t={url:e.href};if(t.isCardClick=!!e.parentElement.video_data,t.isCardClick){t.video_data=e.parentElement.video_data;var n=i.getPlacementParentElement(e);t.placement_name=n.dataset.placementName,t.is_organic=!n.querySelector("."+TRC.SPONSORED_CONTAINER_CLASS_NAME)}return t},getPlacementParentElement:function(e){for(var t=document.querySelectorAll("[data-placement-name]")||[],n=0;n<t.length;n++)if(t[n].contains(e))return t[n];return null},switchCmd:function(){n.push=function(e){"function"==typeof e&&e()}},executeCmd:function(){for(var e;e=n.shift();)"function"==typeof e&&e()},receiveMessage:function(t){var n,o=t.data;o&&o.action&&(n=e[o.action])&&(delete e[o.action],n(o.dimension,o.message))},sendMessage:function(e,t){var n={id:i.getIframeId(),action:e,payload:t};window.parent.postMessage(n,"*")},doAction:function(t,n){i.validateApiActionArguments(t,n),o.connection?e[t]||(e[t]=n[1],i.sendMessage(t,n[0])):n[1](null,"Taboola Connect is not supported")},getValueFromParent:function(e){var t=i.getParamValueFromHash(e),n=frameElement&&frameElement.getAttribute(e);return t||n||""},getIframeId:function(){return i.getValueFromParent("tbcId")},isMobileSDK:function(){return"true"===i.getValueFromParent("isMobileSDK")},getParamValueFromHash:function(e){var t=location.hash.match(new RegExp("(#|&)"+e+"=([^&]*)"));return t?t[2]:""}};TBC.rendered=function(e,n){t.rendered||(t.rendered=1,i.doAction("rendered",[{sizeObject:e},n]))},TBC.expand=function(e,t){i.doAction("expand",[{sizeObject:e},t])},TBC.collapse=function(e,t){i.doAction("collapse",[{sizeObject:e},t])},TBC.getMaxHeight=function(e){i.doAction("maxHeight",[{},e])},TBC.click=function(e,t){"function"==typeof e?i.doAction("click",[{},e]):i.doAction("click",[{sizeObject:e},t])},TBC.openInIframe=function(e,t){i.doAction("openInIframe",[{iframeArgs:e},t])},TBC.error=function(e){i.doAction("error",[e,function(){return e}])},TBC.supports=function(){return o},TBC.reportMetrics=function(e){o.connection&&i.sendMessage("reportMetrics",e)},i.init(),window._trcIsUTactive&&(TBC.privateMethods=i)}()}();<\/script><script>!function(){"use strict";function n(n){const t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"},e=/&(?:amp|lt|gt|quot|#(0+)?39);/g,r=RegExp(e.source);return n&&r.test(n)?n.replace(e,n=>t[n]||"\'"):n||""}function t(t,r){try{const o=n(r?t:function(n){try{return decodeURIComponent(n)}catch(t){return n}}(t));return JSON.parse(`{"key": "${o}"}`).key}catch(n){return e({name:"error-format_html_error",data:{errorMessage:n}}),TBC.cmd.push(()=>{TBC.error(`error while parsing html string: e=${n} str=${t}`)}),""}}function e(n){try{TBC.cmd.push(()=>{TBC.reportMetrics&&TBC.reportMetrics(n)})}catch(n){}}function r(){return!0}function o(n,t,r){const o={};t&&(o.height=t);const c=`<body style="margin: 0">\\n <div class="display-thumbnail" style="margin: 0 auto; width: ${r}px">\\n ${n}\\n </div>\\n </body>\\n <script>\\n TBC.cmd.push(function() {\\n TBC.rendered(${JSON.stringify(o)});\\n });\\n <\\/script>`;document.open(),document.write(c),document.close(),window.parent.addEventListener("blur",function(){try{const t=window.parent.document.activeElement.name;if(!t)return;const r=function(n){try{const t=(new DOMParser).parseFromString(n,"text/html");return t.documentElement&&t.documentElement.textContent}catch(n){return""}}(t.replace(/\\\\/g,""));r===n&&TBC.cmd.push(()=>{TBC.click(()=>{})})}catch(n){e({name:"error-handle-focus-iframe"}),TBC.cmd.push(()=>{TBC.error(`error while handle focus iframe: e=${n}`)})}}),window.parent.addEventListener("visibilitychange",function(){window.parent.hidden||window.parent.focus()}),window.parent.focus()}function c(n,t){const o=function(n,t){const e=new(window.XDomainRequest||window.XMLHttpRequest);return e.open(n,t),e.onload=r,e.onerror=r,e.ontimeout=r,e.onprogress=r,e}("GET",n.content);o.onload=function(n,t,r){return function(){let{responseText:o}=n;e({name:`event-response_status_${n.status}`}),!o||o.length<=0?e({name:"event-empty_response_text"}):(r&&(o=function(n,t,r){try{const o=n.replace(/%%TABOOLA:\\s*([\\w-]+)%%/gi,(n,e)=>{let o=t[e]||"";return r&&r.encodeUrl&&"url"===e&&(o=encodeURIComponent(o)),o}),c="&redir={encodeURIComponent(originalItemData.url || \'\')}";return l(o,t.clickUrl+c)}catch(r){return e({name:"error-replace_macros_exception",data:{errorMessage:r,id:t&&t.id.slice(0,40)}}),n}}(o,r)),i(o,t),a("dcl-url-rendered",t))}}(o,n,t),o.onerror=function(){e({name:"error-fetching_url"})},o.send()}function i(n,t){const e=parseInt(t.width,10)||function(){if(!window.innerWidth)return 0!==document.documentElement.clientWidth?document.documentElement.clientWidth:document.body?document.body.clientWidth:0;return window.innerWidth}(),r=parseFloat(t.ratio);o(n,parseInt(t.height,10)||r*e,e)}function a(n,t){window.TRCImpl&&window.isReportAbTestData&&TRCImpl.sendAbTestEvent(n,JSON.stringify(t))}function s({contentToParse:n,isRtb:e,queryStringObj:r}={}){return function(n){try{return JSON.parse(n)}catch(n){return null}}(n)||t(n||r&&r.c||"",e)}function u(n){return frameElement&&frameElement.getAttribute(n)||""}function d(t){!function(){try{window.TRCImpl=parent&&parent.TRCImpl||{},window.TRC=parent&&parent.TRC||{}}catch(n){}}();try{let r;const d=t.contentString;if(d&&e({name:`event-content_type_${(r=s({contentToParse:d,isRtb:t.isRtb})).contentType||"unknown"}`}),r&&r.contentType===m.URL&&r.content)window.isReportAbTestData=window.TRC.util.isPercentEnabled(window.TRCImpl.global,"is-report-dcl-events"),a("dcl-fetch-url",r),c(r,t.originalItemData);else if(r&&r.contentType===m.MARKUP&&r.content){const e=`&redir=${encodeURIComponent(t.originalItemData.url)}`;r.content=l(r.content,t.originalItemData.clickUrl+e),i(n(r.content),r)}else{const n=function(){try{const n=location.search.slice(1).split("&"),t={};return n.forEach(n=>{const[e,r]=n.split("=");t[e]=r}),JSON.parse(JSON.stringify(t))}catch(n){return{}}}();o(r=r||s({contentToParse:d,isRtb:t.isRtb,queryStringObj:n}),u("height"),u("width"))}}catch(n){e({name:"error-dynamic_content_loader",data:{errorMessage:n}})}}function l(n,t){return t?(-1!==(n=(n=n.replace(/%%CLICK_URL%%&url/g,"%%CLICK_URL%%&xgl=")).replace(/%%CLICK_URL%%/g,t)).indexOf("CLICK_URL")&&e({name:"error-click_url_replace",data:{content:n}}),n):n}const m={URL:"url",MARKUP:"markup"};window.TBC=window.TBC||{},window.TBC.cmd=window.TBC.cmd||[],window.addEventListener("message",function(n){const t=n.data;t&&t.shouldInit&&d(t)}),window.document.documentMode&&d({contentString:window.name})}(); <\/script> </head> <body style=\'margin: 0\'> </body> </html> ';const consumer$1=e=>(class t extends e{constructor(...e){super(...e),this.boundedEventListener=this.eventListener.bind(this)}messageHandler(e,t){}eventListener(e){const{data:t,source:r}=e;if(!Array.isArray(t))return;const i=(...e)=>responseTo(r,e);this.messageHandler(t,i)}register(){window.addEventListener("message",this.boundedEventListener),window.parent&&window.parent!==window&&responseTo(window.parent,["init"])}}),producer$1=e=>{let t=null;try{t=new Set}catch(e){}return class r extends(consumer$1(e)){eventListener(e){if(!t)return;const{source:r}=e;try{if(!t.has(r.frameElement)&&r!==window.parent)return}catch(e){return}super.eventListener(e)}register(e){t&&e.iframe&&(t.add(e.iframe),super.register())}}};var postMessenger_es6={consumer:consumer$1,producer:producer$1};function responseTo(e,t){setTimeout(()=>{e.postMessage(t,"*")},0)}const singleArrayReducer=(e,t)=>e.concat(t),recursiveRipping=e=>{try{if(!e)return[];if(e instanceof window.CSSFontFaceRule)return[[e.cssText]];if(e instanceof window.StyleSheetList)return Array.from(e).map(recursiveRipping).reduce(singleArrayReducer,[]);if(!e.cssRules)return[];const t=Array.from(e.cssRules);return t.length?t.map(recursiveRipping).filter(e=>e.length).map(t=>{const r=e instanceof window.CSSMediaRule,i=r&&e.conditionText?[`@media ${e.conditionText}`]:[];return t.map(e=>i.concat(e))}).reduce(singleArrayReducer,[]):[]}catch(e){return[]}},extractor=e=>e?["font","color"].map(t=>e[t]?`${t}: ${e[t]};`:"").join(""):"",getAllFontFaces=()=>recursiveRipping(window.document.styleSheets),getFirstComputedStyles=()=>{try{const e=[],t=document.querySelector(".video-cta-button");if(t){const r=window.getComputedStyle(t);if(r){const t="[taboola-cta]";e.push([`*${t}${t}${t} {${extractor(r)}}`])}}const r=t&&t.closest&&t.closest(".video-label-box")||document.querySelector(".video-label-box"),i=r&&r.querySelector(".video-title")||document.querySelector(".video-title"),o=i&&window.getComputedStyle(i);if(o){const t="[taboola-title]";e.push([`*${t}${t}${t} {${extractor(o)}}`])}const n=r&&r.querySelector(".branding-inner")||document.querySelector(".branding-inner"),a=n&&window.getComputedStyle(n);if(a){const t="[taboola-branding]";e.push([`*${t}${t}${t} {${extractor(a)}}`])}return e}catch(e){return[]}},unzip=e=>e.map(e=>e.slice().reduceRight((e,t)=>e?`${t}{${e}}`:t)).join("\n");var styleInjector_utils_es6={getAllFontFaces:getAllFontFaces,getFirstComputedStyles:getFirstComputedStyles,unzip:unzip};const label="style-injector",consumer=e=>{const t=document.createElement("style");return class r extends e{messageHandler(e,r){if(super.messageHandler(e,r),e[0]===label)try{const r=Array.isArray(e[1])?e[1]:[];t.innerHTML=unzip(r),document.head.appendChild(t)}catch(e){}}}},producer=e=>{let t=null;return class r extends e{messageHandler(e,r){"init"===e[0]&&(t=t||getAllFontFaces(),r(label,getFirstComputedStyles().concat(t))),super.messageHandler(e,r)}}};var styleInjector_es6={consumer:consumer,producer:producer};const classTreeFactory$1=new ClassTreeFactory,mainIframeConnector=classTreeFactory$1.mixin(producer,producer$1);!function(){var e=TRC.taboolaConnect={},t=!1,r={},i=!!(TRC&&TRC.mobile&&TRC.mobile.reportClick),o="dynamic-content-loader",n=metricReporter$1.sub("HTML");function a(e){if(e.itemData&&e.itemData.thumbnail){var t=TRC.imageUtils.getImageUrlBasedOnCloudinaryApi(e.itemData.thumbnail,"f_auto")||e.itemData.thumbnail;e.backgroundContainer.style["background-image"]='url("'+t+'")',TRC.dom.addClass(e.container,"tbl-banner-to-native"),TRC.dom.addClass(e.container,"tbl-banner-to-native-hidden"),TRC.dom.addClass(e.backgroundContainer,"tbl-banner-to-native-hidden")}}function s(e){e.backgroundContainer.style.height=e.height+"px",e.container.style.height=e.height+"px"}function l(e){return e.width?e.width+"px":"100%"}function c(e,t){"available"===t&&TRC.dispatch("available::"+e.placementName+e.signature,{container:e.container}),"click"===t&&TRC.dispatch("click::"+e.placementName)}function d(e,t){var r;return TRC.URL.prototype.getParameter.call(e,t)}function p(t){var r={shouldInit:!0,isRtb:t&&t.config&&t.config.isRtb};try{return t.config&&t.config.attributes&&t.config.attributes.name?(r.contentString=t.config.attributes.name,r):r}catch(i){return t.config=t.config||{},e.reportMetrics({name:"error-creating_initial_post_message",data:{errorMessage:i},isRtb:t.config.isRtb}),r}}function h(e,t){for(var r in e)t.setAttribute(r,e[r])}function u(e,t){for(var r in t)e=addHashParam(e,r,t[r]);return e}function m(e,t,r){var i=t.config["max-height"]&&parseInt(t.config["max-height"]);i&&parseInt(r.height)>i&&(r.height=i),e.height=e.style.height=parseInt(r.height)+"px"}function g(e){switch((e=e||{}).isRtb){case!0:return"-rtb";case!1:return"-non_rtb";default:return""}}function b(t){try{var r=this.contentWindow||this.contentDocument,i=t.currentTarget.options||{};this.removeEventListener("load",b),r.document.open(),r.document.write(dynamicContentLoader),r.document.close();var o=p({config:i.config});o.originalItemData=TRC.util.merge({},i.itemData,{clickUrl:i.clickUrl}),e.postMessage(this,o,"*")}catch(t){e.reportMetrics({name:"event-unfriendly-error-writing-dcl",data:{errorMessage:t},isRtb:i.config&&i.config.isRtb})}}e.createIframe=function(t){var o=t.container,n=t.src,a=t.config;if(!o)return __trcError("could not find container to create Iframe within"),void e.reportMetrics({name:"error-iframe_container_missing",isRtb:a.isRtb});var s=a||{},c=Math.floor(2147483648*Math.random()).toString(36),d=document.createElement("iframe"),m=t.localDynamicContentLoader;if(mainIframeConnector.register({iframe:d}),s.attributes&&h(s.attributes,d),d.style.border=d.frameBorder=d.border="0",d.style.display="block",d.style.height=parseInt(a.height)?parseInt(a.height)+"px":"0px",d.style.width="100%",d.scrolling="no",d.sandbox=s.sandbox||"allow-same-origin allow-scripts allow-popups allow-forms",d.isRtb=a.isRtb,s.fifr?(d.style.maxWidth=TRCImpl.global["html-card-max-width"]||"800px",d.style.margin="0 auto",d.setAttribute("tbcId",c),d.setAttribute("isMobileSDK",i),e.reportMetrics({name:"event-iframe_friendly",data:{id:c},isRtb:a.isRtb}),a.isRtb||TRC.Browser.ie||(d.name=""),m&&(d.setAttribute("localDcl",!0),d.options=t,d.addEventListener("load",b),e.reportMetrics({name:"event-local_dcl",data:{id:c},isRtb:a.isRtb}))):(m?(h({height:t.height,width:t.width,tbcId:c,isMobileSDK:i,lang:t.language||window.navigator.language,localDcl:!0},d),d.options=t,d.addEventListener("load",b),e.reportMetrics({name:"event-local_dcl",data:{id:c},isRtb:a.isRtb})):(n=u(n,{tbcId:c,lang:t.language||window.navigator.language}),i&&(n=addHashParam(n,"isMobileSDK",""+i)),d.src=n),e.reportMetrics({name:"event-iframe_non_friendly",data:{id:c,iframeSource:n},isRtb:a.isRtb})),r[c]={origin:t.origin,placementName:t.placementName,frame:d,config:a,container:o,backgroundContainer:t.backgroundContainer,localDcl:t.localDynamicContentLoader,signature:t.uniqueId},o.innerHTML="",t.renderBannerAsNative){var g=TRC.util.isPercentEnabled(TRCImpl.global,"adjust-banner-height")||!TRC.dom.isDesktop();TRC.dom.addClass(d,g?"tbl-banner-to-native-iframe":"tbl-banner-to-native-iframe-desktop");var f=document.createElement("div");f.style.margin="auto",f.style.width=l(t),o.appendChild(f),f.appendChild(d)}else o.appendChild(d);if(a.isRtb)return d;if(s.fifr&&!m){if(TRC.Browser.ie)return e.lazyLoadDynamicContentLoader(d),d;var v=p({config:s});v.originalItemData=TRC.util.merge({},t.itemData,{clickUrl:t.clickUrl}),e.lazyLoadDynamicContentLoader(d).then(function(){e.postMessage(d,v,"*")}).catch(function(r){e.reportMetrics({name:"error-lazy_load_dcl_failed",data:{id:t.itemData&&t.itemData.id,error:r},isRtb:a.isRtb})})}return d},e.lazyLoadDynamicContentLoader=function(e){return new Promise$1(function(t,r){TRC.ModuleLoader.load(o,TRC.dcl,function(){var i=e.contentWindow||e.contentDocument;i?(i.document.open(),i.document.write(TRC.dcl),i.document.close(),window.setTimeout(function(){t()},0)):r()}.trcBind(e))})},e.receiveMessage=function(t){var i=t.data;if(i&&r[i.id]){var o=r[i.id].config||{},n;(n=void 0!==o.origin?o.origin:r[i.id].localDcl||"true"===o.fifr?window.location.origin:r[i.id].origin)===t.origin?this[i.action]&&this[i.action](i.payload?i.payload:{sizeObject:i.sizeObject},r[i.id]):e.reportMetrics({name:"event-message_origin_different",data:{messageOrigin:t.origin,comparedOrigin:n},isRtb:o.isRtb})}},e.openInIframe=function(t,r){var i=r.frame,o=r.container,n=t.iframeArgs,a={isSmallIOS:function(){return TRCImpl["small-ios-device"].indexOf(TRC.Device.deviceType)>=0},getPublisherBrandingName:function(){return n.publisherName},trc:TRCImpl},s={title:n.title,url:n.logger_url,logger_url:n.logger_url};new TRC.FeedView(a,s,o),e.postMessage(i,{action:"openInIframe",message:"openInIframe done",dimension:{height:i.style.height}},"*")},window.addHashParam=function(e,t,r){var i,o=t+"="+r;if(e.indexOf("#")>0){var n=e.slice(-1);return e+(o="&"===n||"#"===n?o:"&"+o)}return e+"#"+o},e.createRvObserver=function(e){var t={targetElement:e.container,rootMargin:e.rvMargin+"px",onEnter:function(){var t=e.videoBoxContainer||e.container;TRC.dom.closest(t,".tbl-invisible")||(!e.maxPixelPerSecond||e.scrollManager.getPps()<parseInt(e.maxPixelPerSecond))&&(TRC.intersections.unobserve(e.container.getAttribute("displayRvTargetId")),t.style.removeProperty("height"),this.createIframe(e),e.renderBannerAsNative&&(e.videoBoxContainer.style.visibility="visible",s(e),a(e)))}.bind(this)};e.container.setAttribute("displayRvTargetId",TRC.intersections.observe(t))},e.getOrigin=function(e){return e.match(/^(https:|http:)?\/\/[^/]+/i)[0]},e.postMessage=function(t,r,i){t.contentWindow||e.reportMetrics({name:"error-post_message_contentWindow_missing",data:{message:r,origin:i},isRtb:t.isRtb}),t.contentWindow.postMessage(r,i)},e.rendered=function(t,r){var i=r.frame,o=r.container,n=t.sizeObject,a=r.backgroundContainer;m(i,r,n),TRC.dom.containsClass(o,"tbl-banner-to-native-hidden")&&(TRC.dom.removeClass(o,"tbl-banner-to-native-hidden"),o.style.removeProperty("height")),TRC.dom.removeClass(a,"tbl-banner-to-native-hidden"),o.className+=" tbl-feed-card",c(r,"available");var s={action:"rendered",message:"rendered done",dimension:{height:i.style.height}},l=TRCImpl.global["start-magazine-url"];l&&r.origin===l&&(s.publisherId=TRC.publisherId,s.placementName=r.placementName),e.postMessage(i,s,"*");var d=r&&r.config||{};e.reportMetrics({name:"event-rendered",isRtb:d.isRtb})},e.expand=function(t,r){var i=r.frame,o;m(i,r,t.sizeObject),e.postMessage(i,{action:"expand",message:"expand done",dimension:{height:i.style.height}},"*")},e.click=function(t,r){var i=r.frame,o=t.sizeObject;o&&m(i,r,o),c(r,"click"),e.postMessage(i,{action:"click",message:"click done",dimension:{height:i.style.height}},"*"),TRC.mobile&&TRC.mobile.reportClick&&TRC.mobile.reportClick(t.sizeObject);var n=r&&r.config||{};e.reportMetrics({name:"event-clicked",isRtb:n.isRtb})},e.collapse=function(t,r){var i=r.frame,o;m(i,r,t.sizeObject),e.postMessage(i,{action:"collapse",message:"collapse done",dimension:{height:i.style.height}},"*")},e.maxHeight=function(t,r){var i=r.frame,o=r.config["max-height"]?r.config["max-height"]:"";e.postMessage(i,{action:"maxHeight",message:o,dimension:{height:i.style.height}},"*")},e.createCard=function(r){if(e.reportMetrics({name:"event-available",isRtb:r.config.isRtb}),!r.config.fifr){var i=this.getOrigin(r.config.origin||r.src);if(!i)return __trcError("non valid origin for third party card"),void e.reportMetrics({name:"error-invalid_third_party_card_origin",isRtb:r.config.isRtb})}if(t||(window.addEventListener("message",this.receiveMessage.bind(this),!1),t=!0),r.rvMargin){if(r.maxPixelPerSecond){var o=r.videoBoxContainer||r.container;r.scrollManager=new ScrollManager,o.style.height=0}r.container.style.height=r.height+"px",this.createRvObserver(TRC.util.merge({},r,{origin:i}))}else this.createIframe(TRC.util.merge({},r,{origin:i})),r.renderBannerAsNative&&(s(r),a(r))},e.error=function(t,r){__trcWarn("External error report to taboola-connect: "+t);var i=r&&r.config||{};e.reportMetrics({name:"error-external",data:t,isRtb:i.isRtb})},e.reportMetrics=function(e,t){try{if(!TRC.util||!TRCImpl.global||!TRC.util.isPercentEnabled(TRCImpl.global,"html-track-events")||"object"!=typeof e)return;var r=g(e);!r&&t&&t.config&&(r=g(t.config)),n.sendRboxMetricsEvent({eventName:e.name+r,value:"1",type:"counter"}),n.logUsage({file:"taboola-connect.js",extraData:{eventName:e.name+r,data:e.data||null}})}catch(e){}},window._trcIsUTactive&&(TRC.taboolaConnect.addHashParam=addHashParam)}();class TasksExecutorQueue{constructor(){this.tasks=[],this.runningTask=null}add(e){return this.tasks.push(e),1===this.tasks.length&&this.callNext(),this}callNext(){if(this.tasks.length)if("function"==typeof this.tasks[0]){[this.runningTask]=this.tasks;let e=!1;const t=()=>{e||(e=!0,this.tasks.shift(),this.callNext())};this.runningTask.cancel=(()=>{e=!0}),this.runningTask(t)}else this.tasks.shift(),this.callNext()}resetQueue(){this.runningTask&&this.runningTask.cancel(),this.tasks=[]}}TRC.TasksExecutorQueue=TasksExecutorQueue,window,document,TRC.text={replaceAll(e,t,r,i){let o;return void 0!==t&&void 0!==r&&t!==r?(o=new RegExp(t,"gi"),e.replace(o,"function"==typeof r&&"object"==typeof i?r.trcBind(i):r)):e},lsplit(e,t,r){const i=e.split(t);return i.slice(0,r-1).concat(i.length>=r?i.slice(r-1).join(t):[])},parseCSV(e){const t=e.split(","),r=[];for(;t.length;){let e=t.shift();if('"'===e[0]){do{if('"'===e.slice(1).replace(/""/g,"").slice(-1))break;e+=`,${t.shift()}`}while(t.length);r.push(e.slice(1,e.length-1).replace(/""/g,'"'))}else r.push(e)}return r},toStringList(e){if(!e)return[];if(!(e instanceof Array))return[`${e}`];const t=[];return e.forEach(e=>{e&&t.push(`${e}`)}),t},htmlUnescape:e=>String(e).replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#34;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&"),encodeHTML:(e,t={})=>"string"==typeof e&&(t.ignoreAmpersand||(e=e.replace(/&/g,"&amp;")),e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")),toLowerCamelCase(e){if(-1===e.indexOf("-"))return e;const t=e.toLowerCase().split("-").map(e=>e.charAt(0).toUpperCase()+e.substr(1)).join("");return t.charAt(0).toLowerCase()+t.substr(1)},splitAndJoin(e,t){let r=e.split(".");return r=(r=r.map(e=>t(e))).join(".")},isEndWith(e,t){if(!String.prototype.endsWith){const{length:r}=e;return e.substring(r-t.length,r)===t}return e.endsWith(t)}},(()=>{let e=!1;const t={POSITION:{SPONSORED:"syndicated-static-text-position",ORGANIC:"organic-static-text-position",EMBLEM:"emblem-position"},TEXT:{SPONSORED:"syndicated-static-text",ORGANIC:"organic-static-text"},SHOW_ORGANIC_FIXED_LABEL:"organic-show-static-text",EMBLEM:"emblem"},r={EMBLEM_WRAPPER:"thumbnail-emblem",STATIC_TEXT:"static-text",FIXED_LABEL:"tbl-fixed-label",BIG_LABEL:"tbl-big-label",SMALL_LABEL:"tbl-small-label"};class i{constructor(e,r,o){const{categoryCard:n,recommendationList:a,add_span:s}=o,l=r?"SPONSORED":"ORGANIC";if(this.categoryCard=n,this.getModeClientProperty=o.getModeClientProperty.trcBind(o),this.size=a&&a.length,this.addSpan=s,this.emblemSrc=this.getModeClientProperty(t.EMBLEM),this.fixedLabelPosition=this.getFixedLabelPosition(r,t.POSITION[l]),this.fixedLabelText=this.getModeClientProperty(t.TEXT[l]),this.emblemSrc&&"null"!==this.emblemSrc&&(i.setCss(),this.emblemPosition=this.getModeClientProperty(t.POSITION.EMBLEM)||"top-left",this.addEmblem(e,l)),!this.emblemRenderd||this.isEmblemAndTextNotOnSamePosition()){if(this.categoryCard&&this.categoryCard.isCategoryCard&&!this.categoryCard.render)return;this.addFixedLabel(e,r)}}static setCss(){e||(e=!0,TRC.dom.injectStyle(`.thumbnail-emblem { height: 35px; width: 35px; }.trc_related_container .thumbnail-emblem.bottom-right, .trc_related_container .static-text.bottom-right { bottom: 0; right: 0; background-position: bottom; }.trc_related_container .thumbnail-emblem.top-right, .trc_related_container .static-text.top-right { top: 0; right: 0; background-position: top; }.trc_related_container .thumbnail-emblem.bottom-left, .trc_related_container .static-text.bottom-left { bottom: 0; left: 0; background-position: bottom; }.trc_related_container .thumbnail-emblem.top-left, .trc_related_container .static-text.top-left { top: 0; left: 0; background-position: top; }.trc_related_container .thumbnail-emblem.top, .trc_related_container .static-text.top { width: 100%; top: 0; }.trc_related_container .thumbnail-emblem.bottom, .trc_related_container .static-text.bottom { width: 100%; bottom: 0; padding: 2px 0; }.trc_related_container .videoCube .thumbBlock .static-text { position: absolute; z-index: 1; margin: 0; padding: 5px; display: block; opacity: 0.7; } .trc_related_container .videoCube .thumbBlock .static-text.tbl-fixed-label { opacity: 1; padding: 0 5px; text-align: center; } .trc_related_container .videoCube .thumbBlock .static-text.tbl-fixed-label.tbl-small-label { min-width: 107px; min-height: 27px; line-height: 27px; letter-spacing: 0.31px; } .trc_related_container .videoCube .thumbBlock .static-text.tbl-fixed-label.tbl-big-label { min-width: 140px; min-height: 33px; font-size: 14px; line-height: 33px; letter-spacing: 0.39px; }.trc_related_container .thumbnail-emblem { background-position-x: center; }`))}isEmblemAndTextNotOnSamePosition(){return this.emblemRenderd&&this.fixedLabelPosition!==this.emblemPosition}addEmblem(e){this.emblemRenderd=!0;const t=this.addSpan(r.EMBLEM_WRAPPER,null,e);t.style.backgroundImage=`url('${this.emblemSrc}')`,TRC.dom.addClass(t,this.emblemPosition)}addFixedLabel(e,o){const n=[r.STATIC_TEXT],a=document.createElement("span");if(!o){const e=this.getModeClientProperty(t.SHOW_ORGANIC_FIXED_LABEL);if(!e)return;n.push(r.FIXED_LABEL),n.push(1===this.size?r.BIG_LABEL:r.SMALL_LABEL),this.categoryCard&&this.categoryCard.render&&(this.fixedLabelText=this.categoryCard.text)}i.setCss(),n.push(this.fixedLabelPosition),a.className=n.join(" "),this.fixedLabelText&&a.appendChild(document.createTextNode(this.fixedLabelText)),e.appendChild(a)}getFixedLabelPosition(e,t){const r=e?"top-right":"bottom-left";return this.getModeClientProperty(t)||r}}TRC.ThumbnailOverlayComponents=i})(),(e=>{const t="tn_t_on",r=TRC.pageManager.getLocalStorageImplementation("strict-w3c-storage","session");let i=TRC.taboolaNews&&TRC.taboolaNews.timeOn,o=!1;if(!i&&r)try{i=JSON.parse(r.getValue(t)),o=!0}catch(e){__trcError("Error occurred while trying to read Taboola News data from SessionStorage but object data was corrupted.")}if(!i)return;function n(){const t=(new Date).getTime();if(!TRC.isAMP)return e.performance&&e.performance.timing&&e.performance.timing.navigationStart||t;try{const r=JSON.parse(e.context.ca).attributes._context.initialIntersection.time||t;return new Date(e.context.startTime-r)}catch(e){return t}}!o&&r&&r.setValue(t,JSON.stringify(i));let a=n(),s=-1,l=0;function c(e){e?a=(new Date).getTime():(s=(new Date).getTime(),l+=1,TRCImpl.sendAbTestEvent&&TRCImpl.sendAbTestEvent("taboola_news_timeon",`${l.toString()}::${(s-a).toString()}`,null,!0))}TRC.docVisibilityUtil.addEventListener(c)})(window),function(){function e(e){var t=document.createElement("script");return t.setAttribute("async",""),t.setAttribute("src",e),t}function t(t,i){var o=document.createElement("span"),n="";a(o,"span");for(var s=0;s<i.length;s++)n=i[s].tag&&i[s].tag.useScript?e(i[s].tag.url):r(i[s].tag||i[s],t),o.appendChild(n);t.appendChild(o)}function r(e,t){var r=document.createElement("iframe");return a(r,"iFrame"),e&&t?(e&&e.trackableObject?(r.src="javascript:'<html><head></head><body>"+e.html+e.trackableObject+"</body></html>'",TRC.dom.on(r,"load",function(){e.trackableObject.indexOf("moat_trackable")>-1&&i(TRC.TrackingScriptLoader.prepareMoatTrackableObject(r,t))})):e.html?r.src="javascript:'<html><head></head><body>"+e.html+"</body></html>'":r.src="javascript:'<html><head></head><body>"+e+"</body></html>'",r):r}function i(e){if(e)try{__trcDebug("dispatching adLoaded event for MOAT"),e.dispatchEvent(new CustomEvent("adLoaded",{bubbles:!0,cancelable:!1}))}catch(e){}}function o(e,t){try{TRC.dom.addClass(e,t)}catch(e){__trcError("Error occurred while trying to add tblUniqueTagId To Relevant videoBoxContainer")}}function n(e,t,r){var i,o=[];try{for(var n=0;n<e.length;n++)i=TRC.TrackingScriptIdAppender&&TRC.TrackingScriptIdAppender.setTagDetails(e[n],t,r),o.push(i)}catch(t){return __trcError("Error occurred while trying to add tblUniqueTagId To Relevant Js Tags"),e}return o}function a(e,t){e.id="script-tracking-"+t+"-"+parseInt(1e4*Math.random(),10),e.name=e.id,e.width=0,e.height=0,e.style.display="none"}TRC.TrackingScriptLoader={TRC_SCRIPT_TAGS_ATTRIBUTE:"viewability-tags",renderScriptTagIntoVideoBox:function(e,r,i,a,s,l){try{if(e&&r&&r[this.TRC_SCRIPT_TAGS_ATTRIBUTE]&&r[this.TRC_SCRIPT_TAGS_ATTRIBUTE].length>0){var c=n(r[this.TRC_SCRIPT_TAGS_ATTRIBUTE],i,a);if(o(e,i),!TRC.MobileSdk.isEnabled())if(l&&s){var d={targetElement:e,rootMargin:s+"px",onEnter:function(){t(e,c),TRC.intersections.unobserve(e.getAttribute("lazyLoadTagsObserverTargetId"))}.bind(this)};e.setAttribute("lazyLoadTagsObserverTargetId",TRC.intersections.observe(d))}else t(e,c)}else __trcDebug("renderScriptTagIntoVideoBox: videoBoxContainer/recommendation is null or TRC_SCRIPT_TAGS_ATTRIBUTE not exist")}catch(e){__trcError("failed to add JS script tracking - "+e.message)}},prepareMoatTrackableObject:function(e,t){if(e&&e.contentDocument&&t){var r;if(!(r=e.contentDocument.querySelector(".moat_trackable")))return;return r.moatObject={adElement:t,adLoaded:1,creativeType:"banner",versions:"1"},r}__trcError("Error occurred while trying to prepare trackable object for MOAT")}}}(),function(){var e="adsafeprotected.com",t="ias_adpath",r=".{uniqueId}",i="><\/script>",o="cdn.doubleverify.com",n="btreg",a="doubleclick.net",s="z.moatads.com",l="taboolaTrackable",c="cdn.adnxs.com",d="dom_id",p=";css_selector=.{uniqueId}",h="j.adlooxtracking.com",u="targetelt",m=".{uniqueId}",g,b="({paramName}=.*?)(&|$|;)",f=new RegExp('(src|SRC)\\s*=\\s*"?(.+?)\\"|\\|s>'),v=[new C(e,t,r,y,!1,null),new C(o,n,null,R,!1,null),new C(s,l,null,w,!0,S),new C(a,null,null,_,!1,null),new C(c,d,p,x,!1,null),new C(h,u,m,E,!1,null)];function C(e,t,r,i,o,n){this.tagDomain=e,this.tagParamName=t,this.uniqueParamFormat=r,this.tagUrlExtractor=i,this.hasTrackableObject=o,this.trackableObjectCreator=n}function T(e,t){var r="{paramName}",i=t.match(new RegExp(TRC.text.replaceAll(b,r,e,null)));return i&&(i[1]||i[0])||null}function y(e){var t=e.indexOf(i),r=e.slice(0,t);return this.extractSrcValue(r)}function R(e){return this.extractSrcValue(e)}function w(e){return this.extractSrcValue(e)}function _(e){return this.extractSrcValue(e)}function x(e){return this.extractSrcValue(e)}function E(e){return this.extractSrcValue(e)}function S(){return'<div class="moat_trackable" style="display: none;"></div>'}C.prototype.isMatchingTagDomain=function(e){return-1!==e.indexOf(this.tagDomain)},C.prototype.shouldAddTrackableObject=function(){return this.hasTrackableObject},C.prototype.appendId=function(e,t){try{var r=this.tagUrlExtractor(e),i="";if(r){if(this.tagParamName){t=this.formatUniqueId(t);var o=T(this.tagParamName,r);return i=o?r.replace(o,this.tagParamName+"="+t):r+this.getUrlParamsSeparator(r)+this.tagParamName+"="+t,{html:e.replace(r,i),url:i}}return{html:e,url:r}}}catch(t){return __trcWarn("failed to append unique Id to a specific tag: "+e),e}return e},C.prototype.extractSrcValue=function(e){var t=f.exec(e),r;return t[t.length-1].replace(/^"+|"+$/g,"")},C.prototype.formatUniqueId=function(e){return this.uniqueParamFormat?this.uniqueParamFormat.replace("{uniqueId}",e):e},C.prototype.getUrlParamsSeparator=function(e){return-1!==e.indexOf("?")||-1!==e.indexOf("#")?"&":"?"},C.prototype.createTrackableObject=function(){return this.trackableObjectCreator()},TRC.TrackingScriptIdAppender={setTagDetails:function(e,t,r){if(!e||!t)return e;for(var i=0;i<v.length;i++){var o=v[i];if(o.isMatchingTagDomain(e)){var n={};return n.tag=o.appendId(e,t),r&&v[i].tagDomain in r&&(n.tag.useScript=!0),o.shouldAddTrackableObject()&&(n.tag.trackableObject=o.createTrackableObject()),n}}return e}}}(),(()=>{const e="stop_tslt",t={};let r={},i={};function o(e){const{feature:t,label:r="",data:o=[]}=e,n=t+r+JSON.stringify(o),a=i[n];return a?{cached:!0,translation:a}:{cached:!1,translationId:n}}function n(e,t){const r=a(e),{label:i,data:o}=t,n=r[i];return n?o?TRC.util.formatString(n,o):n:r}function a(e){const i=r[e];return i||(__trcWarn(`TRC.TranslationsManager - missing feature in translationMap: ${e}.`),t[e])}function s(e){Object.keys(e).forEach(t=>{TRC.translationManager.register(t,e[t])})}TRC.translationManager={getLabel:e=>{const a=e.feature;if(!r[a]&&!t[a])return;const{cached:s,translation:l,translationId:c}=o(e);if(s)return l;const d=n(a,e);return d?(i[c]=d,d):void 0},setTranslations:t=>{t&&TRC.util.hasKeys(t)&&(r=t,i={},TRC.pageLevelFeaturesManager.pageLevelFeatures[e]=!0)},register:(e,r)=>{t[e]=r}},TRC._translationQueue||(TRC._translationQueue=[]),TRC._translationQueue.forEach(s),TRC._translationQueue.push=s})(),(e=>{e.TRC=e.TRC||{};const t="disable",r=0;let i,o;class n{constructor(e){this.bulkingStrategy={delay:(()=>{let t=[];const r=(r,i,o,a,s)=>{t.push(o),1===t.length&&setTimeout(()=>{const i=n.buildParamsForBulkEvent(t);if((s=s||{}).bulkSize=t.length,TRC.util.isPercentEnabled(TRCImpl.global,"bulk-body-debug-sample-rate")){const e=i.events;TRC.RBoxUsage.logUsage("Debug body size of bulk events",{extraData:{name:"bulk_body_debug",method:"bulkPost",body:{type:typeof e,size:(e&&e.length)+0}}})}TRC.TRCLogger.post(r,e,i,a,s),t=[]},n.getDelayConfig(i))};return r.events=t,r})(),sendFirstThenDelay:(()=>{const e={},t=(t,r,i,o,a)=>{e[r]?this.bulkingStrategy.delay(t,r,i,o,a):((a=a||{}).bulkSize=1,TRC.TRCLogger.post(t,"bulk",n.buildParamsForBulkEvent([i]),o,a),e[r]=!0)};return t.events=e,t})()},window._trcIsUTactive&&(this.getEventState=function(e){return this.bulkingStrategy[e].events}.bind(this))}static getDelayConfig(e){return"number"==typeof TRCImpl.global[`bulk-${e}-events-delay`]?TRCImpl.global[`bulk-${e}-events-delay`]:"number"==typeof TRCImpl.global[`bulk-events-delay`]?TRCImpl.global[`bulk-events-delay`]:r}static buildParamsForBulkEvent(e){return e.forEach(e=>{e.data=TRC.TRCLogger.formatParams(e.data)}),{sd:o,ui:i,events:__trcJSONify(e)}}static buildBulkEventParam(e,t){return{type:e,timestamp:Date.now(),data:t}}getValidBulkingMethod(e){if(e&&e!==t){const t=this.bulkingStrategy[e];if("function"==typeof t)return t}return null}bulkPost(e,r,a,s,l){const c=TRCImpl.global[`bulk-${r}-events-strategy`]||t,d=this.getValidBulkingMethod(c);d?(o=o||a.sd,i=i||a.ui,d(e,r,n.buildBulkEventParam(r,a),s,l)):(TRC.TRCLogger.post(e,r,a,s,l),c!==t&&__trcWarn(`FailedSendingBulkEvent for eventType: ${r}, with strategy: ${c}`))}}e.TRC.TRCBulkLogger=TRC.TRCBulkLogger=n})(window),(()=>{class e{constructor(e,t=!1){if(this.onlyClean=t,this.pm=TRC.pageManager,this.storageType=e.storageType||"session",this.localStorage=this.pm.getLocalStorageImplementation("strict-w3c-storage",this.storageType),this.currentSize=0,this.trcCache=null,this.trcCacheByPlacement=null,this.cacheSize=e.cacheSize||5,this.cacheTtl=e.ttl||1e3*60*20,this.disableFeedCache=e.disableFeedCache,this.trcCacheName=e.cacheName||"trc_cache",this.trcCacheByPlacementName=`${this.trcCacheName}_by_placement`,this.TRC_CACHE_ACTIVE_STORAGE_KEY="trc_cache_active",this.cacheUtils=new TRC.CacheUtils(this.localStorage,this.trcCacheName,this.cacheTtl),this.cacheByPlacementUtils=new TRC.CacheUtils(this.localStorage,this.trcCacheByPlacementName,this.cacheTtl),!this.localStorage)return{isValidCache:!1};this.isValidCache=!0,this.init()}extractAndResolveKey(e){const t=TRC.TrcCache.extractKey(e);return this.getFeedRelatedKeyFromCache(this.trcCacheByPlacement,this.trcCache,t)||t}static extractKey(t){const r=t.it,i=t.ii,o=[];let n=`${r}=${i}`;for(let e=0;e<t.r.length;e++)o.push(`,${t.r[e].uip}=${t.r[e].uim}`);return e.sortByPlacements(o),n+=o.join(),TRC.isAMPSplitFeed&&void 0!==TRC.currentAmpFrameNum&&(!0===TRC.keyWriting?(n+=TRC.currentAmpFrameNum,TRC.keyWriting=!1):n+=TRC.feedContainerNum),n}cacheResponse(e,t){TRC.tlf&&console.time("in cacheResponse");const r=this.setCacheResponse(e,t);return this.currentSize>this.cacheSize&&this.removeToLimit(),this.localStorage.setValue(this.trcCacheName,__trcJSONify(this.trcCache.getData())),this.localStorage.setValue(this.trcCacheByPlacementName,__trcJSONify(this.trcCacheByPlacement.getData())),TRC.tlf&&console.timeEnd("in cacheResponse"),r}setCacheResponse(t,r){const i=(new Date).getTime(),o=this.trcCache.getData();let n;try{if((n=o[t])&&n.r.trc.f)TRC.TrcCache.updateFeedConfigPropsInCache(r.trc.f,n.r.trc.f),TRC.TrcCache.addNewFeedCardsToCachedResponse(r.trc.vl,n.r.trc.vl);else{const o={s:i,r:r,vi:this.pm.getPageData()},n=!(!r.trc||!r.trc.cga)&&!!r.trc.cga.selectiveCache;n&&(o.is=n),this.trcCache.setValue(t,o),e.splitKeyToPlacementLookupKeys(t).forEach(e=>{this.trcCacheByPlacement.setValue(e,t)}),this.currentSize++,this.setCacheClean(t)}}catch(e){return __trcError("setCacheResponse Error",e),!1}return!0}getCacheResponse(e){TRC.tlf&&console.time("in getCacheResponse");const t=this.trcCache.getValue(e);if(t&&!this.isOverTtl(this.trcCache.getValue(e).s)){TRC.tlf&&console.timeEnd("in getCacheResponse");const t=this.trcCache.getValue(e);return{response:t.r,viewId:t.vi,isSelective:t.is}}return TRC.tlf&&console.timeEnd("in getCacheResponse"),null}isOverTtl(e){this.cacheUtils.isOverTtl(e)}static splitKeyToPlacementLookupKeys(e){const t=(e,t,r)=>0!==t&&e?`${r[0]},${e}`:null;return"string"!=typeof e?[]:e.split(",").map(t).filter(e=>null!==e)}setCacheClean(t){this.cacheUtils.setCacheClean(t,this.trcCache),e.splitKeyToPlacementLookupKeys(t).forEach(e=>this.cacheByPlacementUtils.setCacheClean(e,this.trcCacheByPlacement))}cleanCache(t){const r=e=>e.reduce((e,t)=>e.concat(t),[]);this.cacheUtils.cleanCache(t,this.trcCache,this);const i=r(t.map(e.splitKeyToPlacementLookupKeys));this.cacheByPlacementUtils.cleanCache(i,this.trcCacheByPlacement,this)}removeKey(t){const r=TRC.CacheUtils.removeKey(t,this.trcCache);!0===r&&this.currentSize--,e.splitKeyToPlacementLookupKeys(r).forEach(e=>{TRC.CacheUtils.removeKey(e,this.trcCacheByPlacement)})}getTrcCache(){return this.cacheUtils.getCache(this.pm)}getTrcCacheByPlacement(){return this.cacheByPlacementUtils.getCache(this.pm)}removeToLimit(e){e=e||TRC.util.keys(this.trcCache.getData());const t=this.currentSize-this.cacheSize;let r;this.sortByStamp(e);for(let i=0;i<t;i++)r=e.shift(),this.removeKey(r)}static sortByPlacements(e){let t,r;for(let i=1;i<=e.length-1;++i){for(t=e[i],r=i;r>0&&e[r-1]>=t;)e[r]=e[r-1],--r;e[r]=t}}sortByStamp(e){let t,r;for(let i=1;i<=e.length-1;++i)for(r=i;r>0&&this.trcCache.getValue(e[r-1]).s>=t;)t=e[r],e[r]=this.keys[r-1],e[r]=t,--r}reloadCache(){this.trcCache=this.getTrcCache(),this.trcCacheByPlacement=this.getTrcCacheByPlacement()}init(){if(TRC.tlf&&console.time("in init cache trc"),this.onlyClean)return void this.localStorage.removeKey(this.trcCacheName);this.trcCache=this.getTrcCache(),this.trcCacheByPlacement=this.getTrcCacheByPlacement();const e=TRC.util.keys(this.trcCache.getData());this.currentSize=e.length,this.cleanCache(e),this.currentSize>this.cacheSize&&this.removeToLimit(e),TRC.tlf&&console.timeEnd("in init cache trc")}enableCacheViaStorageFlag(){this.localStorage.setValue(this.TRC_CACHE_ACTIVE_STORAGE_KEY,"true")}isCacheEnabledViaStorageFlag(){return"true"===this.localStorage.getValue(this.TRC_CACHE_ACTIVE_STORAGE_KEY)}getFeedRelatedKeyFromCache(e,t,r){const i=e.getData(),o=r.split(",");if(o.length>2)return;if(this.disableFeedCache)return;const n=t.getValue(r);if(n)return n.r&&n.r.trc&&n.r.trc.f?r:void 0;const a=`${o[0]},${o[1]}`;return i[a]}static addNewFeedCardsToCachedResponse(e,t){e.forEach(e=>{let r;for(let i=0;i<t.length;i++)if(e.uip===t[i].uip){t[i]=e,r=!0;break}r||t.push(e)})}static updateFeedConfigPropsInCache(e,t){e&&t&&Object.keys(e).forEach(r=>{Object.keys(t).some(i=>{if(i===r){const o=e[r],n=t[i];return n.nb=o.nb,n.eof=o.eof,!0}return!1})})}shouldRequestUseViewIdFromCache(e,t,r,i){const o=e&&e.response&&i.cachedResponses[t];return o&&(this.isCacheEnabledViaStorageFlag()||!i.global["disable-trc-cache-reuse-view-id"]&&r)}}TRC.TrcCache=e})(window,document),(()=>{const e=TRC.TrcEventsLogger={};e.sendPlacementEvent=function(e,t,r,i,o,n,a,s){let l=!1;const c=t.trcResponse,d=t.globalTrcResponseJSON,p=c.ri,h=d.sd,u=t.placement,m=Math.floor(1e5*Math.random()),g={ri:p,sd:e.getSessionData(h),ui:TRC.pageManager.getUserId(),pi:e.getItemId(),wi:d.wi,pt:e.getItemType(),vi:t.cachedViewId||TRC.pageManager.getPageData()},b=function(){l||(l=!0,a&&a())};t.cachedViewId&&(g.cache="1"),__trcCopyProps(i,g),n?(TRC.pConsole(u,"info",`sending event type: ${r}`,g,"object"),e.log1(r,g,o,b,u)):e.logTrcEvent(r,g,o,b);const f=null;TRC.performance&&"card-visible"===r&&TRC.performance.mark(`11.0.${m}`,f,u,p,"card-visible",TRC.PerfEvenType.MARK),"number"==typeof s&&TRC.Timeout.set(b,s)}})(),function(e,t){TRC.TRCParser={parseModeName:function(e){return e.mode||null},parsePlacementName:function(e){return e.placement||null},parseABModeName:function(e,t){var r=this.parseTestVariant(t);return null===r?null:"ab_"+e+"_"+r},parseBaseModeName:function(e){if("object"!=typeof e)return null;var t=e["video-list"];return"object"==typeof t&&t["base-mode"]?t["base-mode"]:null},parseTestVariant:function(e){var t;return"object"!=typeof e?null:(t=e["video-list"],e.uvpw&&"object"==typeof t&&t["test-variant"]?t["test-variant"]:void 0===e["test-variant"]?null:e["test-variant"])},IsBaseModeAndABModeExist:function(e){var t=this.parseBaseModeName(e),r=this.parseTestVariant(e);return!(!t||!r)},parseBaseModeAndABModeName:function(e){var t=this.parseTestVariant(e),r=this.parseBaseModeName(e);return null!==r&&null!==t?"ab_"+r+"_"+t:null},getItemCount:function(e){return e["video-list"].video?e["video-list"].video.length:0},hasVariantMismatch:function(e){var t=e["test-variant"],r=e["video-list"]["test-variant"];return!(!t||!r)&&t!==r}}}(window,document),(()=>{let e="";const t="rbox:serving-piggyback-enabled";TRC.TrcRequestPiggyBack={setPiggyBackData:(r,i)=>{i.global[t]&&r&&r.trc&&r.trc.srpg&&(e=r.trc.srpg)},getPiggyBackData:r=>r.global[t]&&e?e:""}})();const _globalsAuctions={};let initPrebidEvents$1=!0;const isBidderDataExist$1=(e,t,r,i)=>{const{adUnits:o}=_globalsAuctions[e][t];return void 0!==o&&void 0!==o[r].bidders&&void 0!==o[r].bidders[i]},iterateAllAdUnits=(e,t)=>{const{adUnits:r,auctionId:i}=e;if(_globalsAuctions[t]){const o=_globalsAuctions[t];o[i]={},o[i].timestamp=e.timestamp,o[i].adUnits={},r.forEach(e=>{const{bids:t,code:r,ortb2Imp:n}=e;o[i].adUnits[r]||(o[i].adUnits[r]={},o[i].adUnits[r].bidders={});const{bidders:a}=o[i].adUnits[r];t.forEach(e=>{const{bidder:t}=e;a[t]={auctionId:i,adUnit:r,ortb2Imp:n,bidder:t,winner:!1}})})}},sendAuctionData=(e,t)=>{if(_globalsAuctions[t][e]){const r=_globalsAuctions[t],{adUnits:i}=r[e];Object.keys(i).map(e=>i[e]).forEach(e=>{const{bidders:t}=e;Object.keys(t).map(e=>t[e]).filter(e=>void 0!==e.bidderData).forEach(e=>{TRCImpl.sendAbTestEvent("header_bidding",e)})}),delete r[e]}},addBidsData$1=(e,t)=>{const{bidsReceived:r,auctionId:i}=e;r.forEach(e=>{const{size:r,originalCpm:o,cpm:n,originalCurrency:a,currency:s,bidder:l,mediaType:c,adUnitCode:d}=e;if(isBidderDataExist$1(t,i,d,l)){const e=_globalsAuctions[t][i].adUnits[d].bidders[l];e.bidderData={size:r,originalCpm:o,cpm:n,originalCurrency:a,currency:s,mediaType:c}}})},addWinData=(e,t)=>{const{bidder:r,adUnitCode:i,auctionId:o,size:n}=e;if(isBidderDataExist$1(t,o,i,r)){const e=_globalsAuctions[t][o].adUnits[i].bidders[r];e.bidderData.winSize=n,e.winner=!0}},updateMissedAuctions$1=(e,t,r)=>{const i=[];return r.getEvents().filter(e=>"auctionEnd"===e.eventType||"bidWon"===e.eventType).forEach(r=>{if(r.args.timestamp<e||void 0===r.args.timestamp)switch(r.eventType){case"auctionEnd":addAuctionData(r.args,t),i.push(r.args.auctionId);break;case"bidWon":addWinData(r.args,t)}}),i},reportMissedAuctions$1=(e,t)=>{e.length>0&&e.forEach(e=>{sendAuctionData(e,t)})},catchUp=(e,t,r)=>{const i=updateMissedAuctions$1(e,t,r);reportMissedAuctions$1(i,t)};function addAuctionData(e,t){iterateAllAdUnits(e,t),console.debug("test"),addBidsData$1(e,t)}function addEventListeners(){const e=[];let t=!1;setTimeout(()=>{t=!0},8e3);const r=()=>{const i=window._pbjsGlobals||[];i.length>0&&i.forEach(t=>{e.includes(t)||(addSingleEventListener(t),e.push(t))}),t||setTimeout(()=>r(),1e3)};r()}const addPbjsToModel$1=e=>{_globalsAuctions[e]||(_globalsAuctions[e]={})},TIME_TO_WAIT_FOR_WIN_EVENTS=2e3;function addSingleEventListener(e){const t=window[e];t&&"function"==typeof t.getEvents&&(addPbjsToModel$1(e),t.onEvent("auctionEnd",(t,r=e)=>{try{const{auctionId:e}=t;console.debug(e,r),addAuctionData(t,r),TRC.Timeout.set(()=>{sendAuctionData(e,r)},TIME_TO_WAIT_FOR_WIN_EVENTS)}catch(e){__trcWarn("failed to obtain data from prebid event, no data will be sent",e)}}),t.onEvent("bidWon",(t,r=e)=>{try{addWinData(t,r)}catch(e){__trcWarn("failed to process prebid win event",e)}}),catchUp(Date.now(),e,t))}function scanPrebidEvents(){initPrebidEvents$1&&(initPrebidEvents$1=!1,console.debug("test1"),addEventListeners())}const MODULE="vignette",PREFIX="taboola",SHORT_PREFIX="tbl",SHORT_NAME=`${SHORT_PREFIX}-${MODULE}`,getSelectorName=e=>[SHORT_NAME,e].join("-"),getPropertyName=e=>`${MODULE}-${e}`;var CONSTANTS$1={SHORT_NAME:SHORT_NAME,MODULE_NAME:`${PREFIX}-${MODULE}`,FORCE_PARAM:SHORT_NAME,MIXPANEL_PROJECT_ID:"8f908b612eebb4c2386577e264b153fa",SCANNING_LOGIC_NEW:"new-scanning",SELECTORS:{CONTAINER:SHORT_NAME,RBOX_CONTAINER:"trc_rbox",SHOW_VIGNETTE:getSelectorName("show"),TABOOLA_VIGNETTE_HANDLED:getSelectorName("handled"),OPPORTUNITY_VIGNETTE:getSelectorName("opportunity"),ATTRIBUTION:getSelectorName("attribution"),DESKTOP_DISCLOSURE:`.trc_desktop_disclosure_link`,CLOSE_BUTTON:{WRAPPER:getSelectorName("close-btn-wrp"),SVG:getSelectorName("close-btn")},BLOCK_CLICKS:getSelectorName("unintentional-clicks"),ACTION_BUTTON:{BASE:getSelectorName("btn"),OPEN:getSelectorName("btn-open"),CLOSE:getSelectorName("btn-close"),WRAPPER:getSelectorName("btns-wrp")},BACKGROUND:{BASE:getSelectorName("background"),CONTAINER:getSelectorName("background-container"),IMG:getSelectorName("background-image"),SCREEN:getSelectorName("background-screen")},LOADER:{WRP:getSelectorName("loader-wrp"),SVG:getSelectorName("loader")},TABOOLA_LINKS:{ITEM_LABEL:"item-label-href",ITEM_THUMBNAIL:"item-thumbnail-href"}},EVENTS:{BEFORE_LOAD:"before-load",SCRIPT_LOADED:"script-loaded",LINK_CLICKED:"link-clicked",CONTAINER_VISIBLE:"container-visible",MISSED:"missed",CLOSE:"close",REDIRECT:"redirect",SESSION_STORAGE_UNSUPPORTED:"session-storage-unsupported",SKIP_VIGNETTE:"skip-vignette"},DEFAULT_EXCLUDE_BY_SELECTORS:[".item-label-href",".item-thumbnail-href"],CSS_PROPERTIES:["screenBackgroundColor","screenBackgroundOpacity","xButtonSize","xButtonBackgroundColor","xButtonColor","xButtonPosition","closeButtonFontSize","closeButtonFontColor","closeButtonFontFamily","closeButtonBackgroundColor","closeButtonHoverColor","closeButtonText","openButtonFontSize","openButtonFontColor","openButtonFontFamily","openButtonBackgroundColor","openButtonHoverColor","openButtonText","buttonsTopSpacing"].map(getPropertyName),SIZES:{DESK_SCREEN_VIGNETTE_RATIO:2.55}};const{MODULE_NAME:MODULE_NAME,EVENTS:EVENTS,MIXPANEL_PROJECT_ID:MIXPANEL_PROJECT_ID,FORCE_PARAM:FORCE_PARAM,SCANNING_LOGIC_NEW:SCANNING_LOGIC_NEW}=CONSTANTS$1;class VignetteManager{constructor(e,t,r){this.sendEvent(EVENTS.BEFORE_LOAD),this.trcManager=r,this.config=e,this.placementData=t,this.placementName=e.placementName,this.forceDebugMode=VignetteManager.shouldEnableDebugMode(),this.instance=null,this._CONSTANTS=CONSTANTS$1,TRC.util.isPercentEnabled(e,"mixpanelSample")&&TRC.Mixpanel.loadMixpanelScript(MIXPANEL_PROJECT_ID),this.shouldRender()&&this.loadVignette()}shouldRender(){try{const{v:e,cs:t}=this.placementData;return TRCImpl.framework?this.shouldSkipVignette("framework loaded",TRCImpl.framework):TRC.dom.isInIframe(!0)?this.shouldSkipVignette("loaded in iframe"):e.length?VignetteManager.isSyndicatedItem(e)?!!VignetteManager.isAddWidgetConfigured(t)||this.shouldSkipVignette("add widget not configured"):this.shouldSkipVignette("organic content"):this.shouldSkipVignette("no recommendations")}catch(e){this.onError("shouldRender",e.message)}}static isVignettePlacement(e,t){if(!e)return;const r=Object.keys(e).length>0?e:TRC.vignetteManager&&TRC.vignetteManager.config;return r&&r.placementName===t}static isDrawingVignette(e){return e===MODULE_NAME}shouldSkipVignette(e,t=""){this.skipVignette=!0,this.sendEvent(EVENTS.SKIP_VIGNETTE,{skipVignette:{reason:e,details:t}})}loadVignette(){this.hideVignetteOnRender();const e=`${MODULE_NAME}-${SCANNING_LOGIC_NEW}`;TRC.ModuleLoader.load(e,TRC.TaboolaVignette,()=>{this.instance=new TRC.TaboolaVignette(this)})}static isAddWidgetConfigured(e){if(e){const{shouldCreateContainer:t}=e[0];return 1===parseInt(t,10)}return!1}hideVignetteOnRender(){const{placementName:e}=this;TRC.dom.injectStyle(`[data-placement-name="${e}"] { position: fixed; right: -1200%; }`)}static isSyndicatedItem(e){return e.some(e=>e["is-syndicated"]&&TRC.util.isTrue(e["is-syndicated"]))}sendEvent(e,t){const r=`${MODULE_NAME}-${e}`;this.forceDebugMode||(TRCImpl.sendAbTestEvent(r,JSON.stringify(t)),TRC.Mixpanel.isMixPanelLoaded()&&TRC.Mixpanel.sendMixpanelEvent(r,t))}onError(e,t,r,i=__trcError){i(`Error::prod ${MODULE_NAME}-${e} ${t}`),TRC.Mixpanel.isMixPanelLoaded()&&TRC.Mixpanel.sendMixpanelEvent(`${MODULE_NAME}-prod-error`,{errorMsg:t,errorName:e,stackTrace:r})}static shouldEnableDebugMode(){return!!TRC.URL.prototype.getParameter.call(window.location.search,FORCE_PARAM)}static getVignetteConfig(e,t,r){let i=n(t);if(!TRC.util.isTrue(r["get-vignette-config-from-products"])||!i){i=i||{};const t=o(e)||{};return TRC.util.merge({},i,t)}return i||{};function o(e){return e&&e.vignette}function n(e){if(!(e&&e.trc&&e.trc.prods&&e.trc.prods.vig))return null;const t=e.trc.prods.vig,r=TRC.util.merge({},t,{placementName:t.plc});return delete r.plc,r}}static initVignetteIfNotExists(e,t,r){return!TRC.vignetteManager&&(TRC.vignetteManager=new VignetteManager(e,t,r),!TRC.vignetteManager.skipVignette)}}function hasSuperUTFSeq(e){const t=e.split("").map(e=>e.charCodeAt(0));let r=0;for(let i=0;i<t.length;i++){if(isSuperUTF(t[i])||(r=0),r>=3)return!0;r++}return!1}function isSuperUTF(e){return e>1200}class ConfigOverrides{constructor(e){this.trcManager=e}initPubConfigGenericActionOverride(e,t,r){const i=!(!e||!e.pubConfigOverride),o=!!(t&&t.pubConfigOverride&&t.pubConfigOverride.global),n=!!(r&&r.pubConfigOverride&&r.pubConfigOverride.global);(i||o||n)&&(i&&this.trcManager.isExpoTest()&&TRC.util.haveMutualKeys(e.pubConfigOverride,TRC.overrideGlobalConfig)&&__trcError(`client generic action override publisher config used in an expo test! expo test:${this.trcManager.getSystemFlag("experimentID")},override is:${JSON.stringify(e.pubConfigOverride)} expo is:${JSON.stringify(TRC.overrideGlobalConfig)}`),i&&o&&ConfigOverrides.checkForMutualConfigs({type:"cga",obj:e.pubConfigOverride},{type:"dcga",obj:t.pubConfigOverride.global}),i&&n&&ConfigOverrides.checkForMutualConfigs({type:"cga",obj:e.pubConfigOverride},{type:"vcga",obj:r.pubConfigOverride.global}),this.isExpoTest&&o&&ConfigOverrides.checkForMutualConfigs({type:"expo",obj:TRC.overrideGlobalConfig},{type:"dcga",obj:t.pubConfigOverride.global}),this.isExpoTest&&n&&ConfigOverrides.checkForMutualConfigs({type:"expo",obj:TRC.overrideGlobalConfig},{type:"vcga",obj:r.pubConfigOverride.global}),TRC.util.merge(this.trcManager.global,i?e.pubConfigOverride:{},n?r.pubConfigOverride.global:{},o?t.pubConfigOverride.global:{}))}static checkForMutualConfigs(e,t){e.obj&&t.obj&&TRC.util.haveMutualKeys(e.obj,t.obj)&&__trcWarn(`configuration override in: ${e.type}=${JSON.stringify(e.obj)} with ${t.type}=${t.obj}`)}}const ON_HIDE_STR="-OnHide",REPORT_TYPE="intervention";class AdHeavyManager{constructor(e){if("function"!=typeof window.ReportingObserver||!e.global["enable-hai-report"])return{status:"not supported"};this.trcManager=e,this.reportingObserver=new window.ReportingObserver(this.sendReports.bind(this,!1),{types:[REPORT_TYPE],buffered:!1}),this.reportingObserver.observe(),window.addEventListener("pagehide",this.onHideCallback.bind(this)),this.status="supported"}onHideCallback(){const e=this.reportingObserver.takeRecords();this.sendReports(!0,e)}sendReports(e,t){let r="";"net"!==(r=e?AdHeavyManager.getInterventionType(t.filter(e=>e.type===REPORT_TYPE)):AdHeavyManager.getInterventionType(t))&&"cpu"!==r||(TRC.MetricsManager.sendMetricsEvent(TRC,this.trcManager,{name:`intervention-${r}${e?ON_HIDE_STR:""}`,value:1,type:"counter"},null,!0),this.trcManager.sendAbTestEvent("intervention",`${r}${e?ON_HIDE_STR:""}`,null,!0,!0))}static getInterventionType(e){try{return e.length?AdHeavyManager.extractInterventionType(e[0].body.message):"other"}catch(e){return"type-error"}}static extractInterventionType(e){return e?e.toLowerCase().indexOf("network usage")>0?"net":e.toLowerCase().indexOf("cpu usage")>0?"cpu":e:"unknown"}}const ID_PROVIDERS_STORAGE_KEY="idproviders",EXTERNAL_PARTNERS_IDS_ATTRIBUTE_NAME="rbox:rtb:real-time-user-sync:intent-iq:external-partners-ids";function getIiqIdProvidersData(){try{const e=TRCImpl.global[EXTERNAL_PARTNERS_IDS_ATTRIBUTE_NAME];if(void 0===e||0===e.length)return;const t=TRC.pageManager.getLocalStorageImplementation().getValue(ID_PROVIDERS_STORAGE_KEY);if(null===t)return;const r=JSON.parse(t),i=r.INTENT_IQ,o=i.c2c;if(void 0===o||0===o.length)return;const n={};if(o.forEach(t=>{const r=t.pid;e.indexOf(r)>-1&&(n[r]=t.uid)}),0===Object.keys(n).length)return;return{INTENT_IQ:n}}catch(e){__trcWarn("Error during getIiqIdProvidersData: ",e)}}function killSwitchEnabled(e,t){try{const r=e.fpl,i=e.hpl,o=e.uip,n=o||r||i;return isServerKillSwitchEnabled(n,t)}catch(e){__trcError("SectionFront personalization killSwitchEnabled Error",e)}return!1}function isPlacementValidForKillSwitch(e,t){let r=!1;return-1!==e.indexOf(t)||(e.forEach(e=>{if(TRC.text.isEndWith(e,"$")){const i=new RegExp(e);i.test(t)&&(r=!0)}}),r)}function isServerKillSwitchEnabled(e,t){return!!validateKillSwitchSetting(t)&&isPlacementValidForKillSwitch(t.ks.pl,e)}function validateKillSwitchSetting(e){try{const t=e.ks.pl||[];if(!e||!e.ks||!t.length)return!1;const r=TRC.URL.prototype.getParameter.call(location.href,"tbl_force_taboola",!1);return!(parseInt(r,10)||"true"===r)}catch(e){return!1}}TRC.opDisabled=TRC.opDisabled||!1,(()=>{class e{constructor(e){this.trcManager=e,this.hp4uPlacements={}}handleHp4uPlacement(e,t){const r=this.hp4uPlacements[e.hpl]||this.createNewPlacement(e.hpl);t&&!t.container&&(t.container=r.container)}createNewPlacement(e){const t=this.trcManager.preloadRequest[e];return t.isHp4u=!0,this.hp4uPlacements[e]=t,t}}TRC.Hp4uManager=e})();const _globalsAuctionsV3={},_globalsReportedAuctions={};let _winsTimeout=2e3,initPrebidEvents=!0,_isAddPlacement=!0,crawlerID=0,firstAuctionFound=!1,firstAuctionReported=!1,firstAuctionId=null;const SALT="RUl2QU54VNERVSF",INDEX_TO_ADD_SALT=17,ENCODING_SHIFT=5,generateUUID=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0,r="x"===e?t:3&t|8;return r.toString(16)});function setFirstAuctionId(e){const t=e.getEvents();for(let r=0;r<t.length;r++)if("auctionEnd"===t[r].eventType){firstAuctionFound=!0,firstAuctionId=t[r].args.auctionId;break}}const updateIfFirstAuction=e=>{firstAuctionReported||e.auctionId!==firstAuctionId||(firstAuctionReported=!0,e.isFirst=!0)},isBidderDataExist=(e,t,r,i,o)=>{const{adUnits:n}=_globalsAuctionsV3[e][t];return void 0!==n&&void 0!==n[`${r}&&${i}`].bidders&&void 0!==n[`${r}&&${i}`].bidders[o]},buildBidder=e=>{const t={};return t.bidder=e.bidder,t.isWinner=!1,t.madeOffer=!1,t.noBidResponse=!1,t},buildWinBidder=e=>{const t={};return t.bidder=e.bidder,t.isWinner=!0,t.madeOffer=!0,t.noBidResponse=!1,t.cpm=e.cpm,t.originalCpm=e.originalCpm,t.size=e.size,t.mediaType=e.mediaType,t.currency=e.currency,t.originalCurrency=e.originalCurrency,t},updateTaboolaTagId=(e,t)=>{try{e.tagId=t.params.tagId}catch(e){__trcWarn("error on header bidding, tagIdOf taboola bidder not found",e)}},buildAdUnit=e=>{const{bids:t,code:r,ortb2Imp:i,transactionId:o}=e,n={};return n.adUnitCode=r,n.transactionId=o,n.ortb2Imp=i,n.tagId=null,n.winnersCount=0,n.bidders={},t.forEach(e=>{"taboola"===e.bidder&&updateTaboolaTagId(n,e),n.bidders[e.bidder]=buildBidder(e)}),n};function extractPlacementFromBids(e){const t={};for(let r=0;r<e.length;r++){const{ad:i,transactionId:o}=e[r];if(i&&"string"==typeof i){const[,e]=i.match(/placement:\s*'([^']+)'/)||[];e&&(t[o]=e)}}return t}const buildAuction=(e,t)=>{const{auctionId:r,timestamp:i,auctionEnd:o,elapsedTime:n,adUnits:a,bidsReceived:s}=e;if(_globalsAuctionsV3[t]){_globalsAuctionsV3[t][r]={};const e=_globalsAuctionsV3[t][r];e.auctionId=r,e.crawlerInstanceID=crawlerID,e.timestamp=i,e.auctionEnd=o,e.elapsedTime=n,e.isFirst=!1,e.instance=t,e.version=_globalsAuctionsV3[t].version,e.adUnits={};const l=_isAddPlacement?extractPlacementFromBids(s):{};a.forEach(t=>{const{code:r,transactionId:i}=t;e.adUnits[`${r}&&${i}`]=buildAdUnit(t),void 0!==l[i]&&(e.adUnits[`${r}&&${i}`].placement=l[i])})}},buildWinAuctionAndAddToGlobal=(e,t)=>{const{auctionId:r,adUnitCode:i,transactionId:o,bidder:n,requestTimestamp:a}=e;if(_globalsAuctionsV3[t]){_globalsAuctionsV3[t][r]={};const s=_globalsAuctionsV3[t][r];s.auctionId=r,s.crawlerInstanceID=crawlerID,s.timestamp=a,s.auctionEnd=a,s.elapsedTime=a,s.isFirst=!1,s.instance=t,s.version=_globalsAuctionsV3[t].version,s.adUnits={};const l={};l.adUnitCode=i,l.transactionId=o,l.ortb2Imp=null,l.tagId=null,l.winnersCount=0,l.bidders={},extractTaboolaTagId(n,l,e),l.bidders[n]=buildWinBidder(e),s.adUnits[`${i}&&${o}`]=l}else __trcWarn(`buildWinAuctionAndAddToGlobal missing global : ${t}`)};function extractTaboolaTagId(e,t,r){if("taboola"===e)try{t.tagId=r.params[0].tagId}catch(e){__trcWarn("error on header bidding, tagIdOf taboola bidder not found",e)}}const sendAuctionDataV3=(e,t,r,i=!0)=>{if(_globalsAuctionsV3[t][e]){if(_globalsReportedAuctions[e])return void __trcDebug(`already _globalsReportedAuctions has auctionId : ${e}`);const o=_globalsAuctionsV3[t];i&&!firstAuctionFound&&setFirstAuctionId(r),updateIfFirstAuction(o[e]),o[e].requestId=generateUUID();const n=JSON.stringify(o[e]);if(isStringValid(n)){const t=btoa(n),r=processAuction(t),i={auction:r};TRCImpl.sendEvent("prebid-crawler",null,i,!1,null,3e3,!0),_globalsReportedAuctions[e]=!0}}else __trcWarn(`sendAuctionDataV3 missing auctionId : ${e}`)},processAuction=function(e){try{const t=e.substring(0,INDEX_TO_ADD_SALT)+SALT+e.substring(INDEX_TO_ADD_SALT);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t.charCodeAt(e)+ENCODING_SHIFT);return r}catch(t){return e}},addBidRequestData=function(e,t){const{bidderRequests:r}=e,{auctionId:i}=e,o=_globalsAuctionsV3[t][i];let n=null;for(let a=0;a<r.length;a++){const e=r[a],{bids:t}=e;for(let r=0;r<t.length;r++){const e=t[r];if(void 0!==e.ortb2){n=e.ortb2;break}}if(null!==n)break}o.ortb2=n},isStringValid=e=>"string"==typeof e&&e.trim().length>0,addBidsData=(e,t)=>{const{bidsReceived:r,auctionId:i}=e;r.forEach(e=>{const{size:r,originalCpm:o,cpm:n,originalCurrency:a,currency:s,bidder:l,mediaType:c,adUnitCode:d,transactionId:p}=e;if(isBidderDataExist(t,i,d,p,l)){const e=_globalsAuctionsV3[t][i].adUnits[`${d}&&${p}`].bidders[l];e.size=r,e.mediaType=c,e.cpm=n,e.currency=s,e.originalCpm=o,e.originalCurrency=a,e.madeOffer=!0}})},addWinDataV3=(e,t)=>{const{bidder:r,adUnitCode:i,auctionId:o,size:n,transactionId:a}=e;if(isBidderDataExist(t,o,i,a,r)){const e=_globalsAuctionsV3[t][o].adUnits[`${i}&&${a}`];e.winnersCount++,e.bidders[r].winSize=n,e.bidders[r].isWinner=!0}},updateMissedAuctions=(e,t,r)=>{const i=[];return r.getEvents().filter(e=>"auctionEnd"===e.eventType||"bidWon"===e.eventType).forEach(r=>{if(r.args.timestamp<e||void 0===r.args.timestamp)switch(r.eventType){case"auctionEnd":addAuctionDataV3(r.args,t),i.push(r.args.auctionId);break;case"bidWon":addWinDataV3(r.args,t)}}),i},reportMissedAuctions=(e,t,r)=>{e.length>0&&e.forEach(e=>{sendAuctionDataV3(e,t,r)})},catchUpV3=(e,t,r)=>{const i=updateMissedAuctions(e,t,r);reportMissedAuctions(i,t,r)};function addAuctionDataV3(e,t){buildAuction(e,t),addBidRequestData(e,t),addBidsData(e,t)}function addEventListenersV3(){const e=[];let t=!1;setTimeout(()=>{t=!0},8e3);const r=()=>{const i=window._pbjsGlobals||[];i.length>0&&i.forEach(t=>{e.includes(t)||(addSingleEventListenerV3(t),e.push(t))}),t||setTimeout(()=>r(),1e3)};r()}const addPbjsToModel=(e,t)=>{_globalsAuctionsV3[e]||(_globalsAuctionsV3[e]={},_globalsAuctionsV3[e].version=t.version)};function addSingleEventListenerV3(e){try{const t=window[e];t&&"function"==typeof t.getEvents&&(addPbjsToModel(e,t),t.onEvent("auctionEnd",(r,i=e)=>{try{const{auctionId:e}=r;addAuctionDataV3(r,i),TRC.Timeout.set(()=>{sendAuctionDataV3(e,i,t)},_winsTimeout)}catch(e){__trcWarn("failed on auctionEnd onEvent, no data will be sent",e)}}),t.onEvent("bidWon",(r,i=e)=>{try{buildWinAuctionAndAddToGlobal(r,e),addWinDataV3(r,i),sendAuctionDataV3(r.auctionId,i,t)}catch(e){__trcWarn("failed to process prebid bidWon event",e)}}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&catchUpV3(Date.now(),e,t)}),catchUpV3(Date.now(),e,t))}catch(e){__trcWarn("header-bidding error addSingleEventListenerV3",e)}}function scanPrebidEventsV3(e,t){initPrebidEvents&&(initPrebidEvents=!1,crawlerID=generateUUID(),addEventListenersV3(),_winsTimeout=e,_isAddPlacement=t)}function isDynamicLinksRecommendation(e){return e.dlupc||e.dlurl}function createAddedDynamicLinksData(e){return{placement:e,isDynamicLinks:!0,addWidget:!0}}(()=>{class e{constructor(e){this.trcManager=e,this.dynamicLinksPlacements={}}handleDynamicLinksPlacement(e,t){const r=this.dynamicLinksPlacements[e.uuip]||this.createNewPlacement(e.uuip);t&&!t.container&&(t.container=r.container)}createNewPlacement(e){const t=this.trcManager.preloadRequest[e];return t.isDynamicLinks=!0,this.dynamicLinksPlacements[e]=t,t}}TRC.DynamicLinksManager=e})(),function(win,doc){var TRANSPORT_FORM_ELEMENT="trc-transport-form-element";function initEventsRedirectParams(e,t,r){if(this.enableTrcEventRoute||e.trc.el2r&&TRC.util.isArray(e.trc.el2r)){try{e.trc.el2r&&(this.eventTypesToRoute=e.trc.el2r)}catch(e){__trcError("TRC.parseResponse: even list to route is not a valid json",e)}e.trc.route&&(t=e.trc.route.split(":")[1],r=this.global["trc-event-route-template"]||"<dc>-trc-events.taboola.com",this.trcEventRoute=r.replace("<dc>",t.toLocaleLowerCase()))}}var Manager=TRC.Manager=function(e,t){this.feedsManager=new window.TRC.FeedsManager(this),this.storiesManager=new window.TRC.StoriesManager(this),this.hp4uManager=new window.TRC.Hp4uManager(this),this.dynamicLinksManager=new window.TRC.DynamicLinksManager(this),this.totalModeCounter=0,this.renderedModeCounter=0;var r=500;function i(e,t){var r;if((t?t.global:{})["disable-yield"])return!1;if(TRC.URL.prototype.getParameter.call(win.location.href,"yield-batch"))return!0;var i=!1;return Object.keys(e).forEach(function(t){var r;void 0!==e[t].modeGroupOrder&&(i=!0)},this),i}function o(e){try{var t=window.sessionStorage&&window.sessionStorage.getItem("tbl_disable_cache");e["enable-trc-cache"]&&(t||TRC.URL.prototype.getParameter.call(location.href,"tbl_disable_cache"))&&(window.sessionStorage.setItem("tbl_disable_cache","true"),e["enable-trc-cache"]=!1)}catch(e){}}this.numOfResetCssDivs=3,this.eventLogger=[],this.eventCounter={},this.NO_CONTENT={noItems:"NO_ITEMS",mute:"MUTE",error:"ERROR",timeOut:"TIMEOUT"},this.cloudinarySortedRatios,this.cachedResponses={},this.pendingRequests=[],this.iframePixelReporter,this.virtualPlacementsManager=new TRC.VirtualPlacementsManager,this.reset=function(){this.reset=!0,TRC.dispatch("trcReset"),this.clearPageElements(),this.widgetContainerReset(),TRC.unifiedPlacementsProductsUtil.containersReset(this.feedsManager.feeds,"data-feed-main-container-id"),TRC.unifiedPlacementsProductsUtil.containersReset(this.storiesManager.stories,"data-stories-main-container-id"),Object.keys(TRC.callbacks).forEach(function(e){e.search("recommendations")>=0&&(TRC.callbacks[e]=function(){})}),this.global["enable-old-preloadRequestLoader"]&&this.preloadRequestLoader&&(TRC.Timeout.clear(this.preloadRequestLoader.timeout),this.clearPreloadRequestLoader());try{delete win.trc_video_id,delete win.trc_article_id,delete win.trc_item_url,delete win.trc_adPlayer}catch(e){win.trc_video_id=null,win.trc_article_id=null,win.trc_item_url=null,win.trc_adPlayer=null}finally{this.global["enable-old-preloadRequestLoader"]||this.clearPreloadRequestLoaderAndResetQueue()}},this.renderRBox=function(e){var t=TRC.dom.closest(e.getContainer(),".trc_rbox_container");function r(){try{t.style.display="none"}catch(e){__trcError("Failed to hide main container on Error",e)}}e.load(r)},this.getConfig=function(e,t){return void 0!==e[t]?e[t]:void 0!==win["trc_"+t]&&null!=win["trc_"+t]?e[t]=win["trc_"+t]:(void 0!==this[t]&&this[t],e[t]=this[t])},this.getItemId=function(){var e=this.itemid;return win.trc_video_id||""===win.trc_video_id?e=win.trc_video_id:(win.trc_article_id||""===win.trc_article_id)&&(e=win.trc_article_id),""===e&&(e=this.getAutoItemMeta("item-id",null,this.urlPreNormalizer,this["normalize-item-id"])),this.itemid=e},this.getGlobalRequestId=function(){return TRC.events_ri},this.getGlobalSessionData=function(){return TRC.session_data},this.getSessionId=function(){return this.sessionId},this.getPlatformCode=function(){return TRC.platform_code},this.getReferrer=function(){return TRC.pageManager.getReferrer()},this.getItemUrlQueryString=function(){if(this.itemUrlQueryString)return this.itemUrlQueryString;var e=TRC.pageManager.getTopMostWindow(),t=this.global["item-query-string-max-length"]||400,r;if(TRC.isAMP){var i=document.referrer;window.context&&window.context.sourceUrl&&(i=window.context.sourceUrl);var o=TRC.util.splitUrlParts(i);this.itemUrlQueryString=o.search||""}else this.itemUrlQueryString=e.location.search;return this.itemUrlQueryString.length>t&&(r=this.itemUrlQueryString.substring(0,t-1),this.itemUrlQueryString=r.substring(0,r.lastIndexOf("&"))),this.itemUrlQueryString},this.getListSize=function(e){return e.visible&&"rbox-only-video"!==e.mode?this.calculateAutoListSize(e):0},this.getListId=function(e){return"rbox-only-video"===e.mode?"rbox-invisible-widget":e.list_id||"rbox-tracking"===e.mode?e.mode:"rbox-"+(e.visible?e.origin.toString():"tracking")},this.getExtraResponsiveRecom=function(e){var t=this.getProperty(e.mode_name,"responsive-extra-columns"),r=this.getProperty(e.mode_name,"rows");return t?t*(r||1):0},this.getResponsiveRecommendations=function(e){var t,r=0,i,o,n,a="function"==typeof win.matchMedia;t=this.getMatchMediaRuleMaxWidth(e,a);for(var s=0,l=e.length;s<l;s++)i=(n=e[s]).cells*n.rows,o=a&&(win.matchMedia("(min-width: "+n.minWidth+"px)"+(isNaN(n.maxWidth)?"":" and (max-width: "+n.maxWidth+"px)")).matches||win.matchMedia("screen and (min-height: "+n.minWidth+"px)"+(isNaN(n.maxWidth)?"":" and (max-height: "+n.maxWidth+"px)")+" and (orientation: portrait)").matches),(isNaN(t)||n.minWidth<=t||t<0||o)&&r<i&&(r=i);return{listSize:r,rule:r?n:null}},this.getMatchMediaRuleMaxWidth=function(e,t){var r,i;if(!t)return screen.width;for(var o=0,n=e.length;o<n;o++)if(i=e[o],(r=win.matchMedia("screen and (min-device-width: "+i.minWidth+"px)"+(isNaN(i.maxWidth)?"":" and (max-device-width: "+i.maxWidth+"px)"))).matches)return i.maxWidth},this.calculateAutoListSize=function(e){var t=this.getProperty(e.mode_name,"list-size"),r=0,i=this.getProperty(e.mode_name,"responsive-rules"),o=null,n,a;if(this.getProperty(e.mode_name,"mode-is-responsive")){if(i&&i.length)return o=this.getResponsiveRecommendations(i),e.matched_rule=o.rule,o.listSize;r=this.getExtraResponsiveRecom(e)}if(a=t+r,e.autoSize=this.getProperty(e.mode_name,"auto-size"),!e.autoSize)return e.autoSize=!1,a;if(0==(n=Math.floor(e.container.clientWidth>0?e.container.clientWidth:e.container.offsetWidth)))return e.autoSize=!1,a;for(var s=this.getProperty(e.mode_name,"auto-size-rules"),l=0;l<s.length;l++)parseInt(s[l].minWc)<=n&&n<=parseInt(s[l].maxWc)&&(e.AutoSizeRule=s[l]);return e.AutoSizeRule?(e.rows=this.getProperty(e.mode_name,"rows"),e.rows<=1?this.modes[e.mode_name]["list-size"]=e.AutoSizeRule.n+r:this.modes[e.mode_name]["list-size"]=e.AutoSizeRule.n*e.rows+r):0},this.calculateAutoSizeParameters=function(e){var t,r;if(this.calculateAutoListSize(e),e.AutoSizeRule)for(var i=Math.floor(e.container.clientWidth>0?e.container.clientWidth:e.container.offsetWidth),o=e.AutoSizeRule.minWsRange;o<=e.AutoSizeRule.maxWsRange;o++)if(t=(i-(e.AutoSizeRule.n-1)*o)/e.AutoSizeRule.n,(r=parseInt(t))==t){e.AutoSizeRule.Wi=t,e.AutoSizeRule.Ws=o;break}},this.getItemUrl=function(){var e=this.itemurl;return(win.trc_item_url||null==this.itemurl)&&(e=this.getAutoItemMeta("item-url",null,this.urlPreNormalizer,this["normalize-item-url"])),this.itemurl=e},this.getBrowserUrl=function(){var e;return(TRC.isAMP?win.context:win).location.href},this.getUrlVideoPubId=function(e){var t=this.getAutoItemMeta("item-id",e,this.urlPreNormalizer,this["normalize-item-id"]);return this.getUrlPath(t)},this.getUrlPath=function(e){return e?e.split(/[?#]/)[0]:""},this.urlPreNormalizer=function(e,t){var r=this["prenormalize-"+e],i;if(!r)return t;(r["truncate-at"]||[]).forEach(function(e){var r=t.search(e);r>=0&&(t=t.substr(0,r))});for(var o=new win.TRC.URL(t),n=Object.keys(r),a=0;a<n.length;a++){var s=n[a];if(r[s])switch(s){case"host":delete o.host;break;case"trailing-dirsep":for(;"/"===o.pathname.substr(o.pathname.length-1);)o.pathname=o.pathname.substr(0,o.pathname.length-1);break;case"query":var l=[],c=o.search.replace(/^\?/,"").split("&"),i;"string"==typeof(i=r[s])&&(i=new RegExp(i));var d=function(e){if(i instanceof Array){for(var t=0;t<i.length;t++)if(e===i[t])return!0;return!1}return i instanceof RegExp&&i.test(e)};c.forEach(function(e){d(decodeURIComponent(e.split("=")[0]))&&l.push(e)}),o.search=(l.length?"?":"")+l.join("&");break;case"fragment":var p=o.hash.replace(/^#/,"");"string"==typeof(i=r[s])&&(i=new RegExp(i)),o.hash="",i instanceof RegExp&&i.test(p)?o.hash="#"+p:i instanceof Array&&i.forEach(function(e){p.search(e)>=0&&(o.hash="#"+p)})}}return o.pathname||(o.pathname="/"),"item-id"===e?o.toString().toLowerCase():o.toString()},this.genCallback=function(e){var t="recommendations_"+(TRC.callbacks.auto_gen_callback_seq=TRC.callbacks.auto_gen_callback_seq+1||1);return TRC.callbacks[t]=e,"TRC.callbacks."+t},this.formatTRCRequest=function(e,t,r){try{e.hasOwnProperty("rbox-tracking")&&Object.keys&&Object.keys(e).length>1&&delete e["rbox-tracking"],TRC.pageLevelFeaturesManager.disableFeatureOnIframe();var i=new this.GlobalRequetParams,o;return(TRC.isOptim("geom")&&!r||!TRC.isOptim("geom"))&&(this.setGlobalParmas(i,t),this.setGlobalParamsDecorators(i)),i.setPlacementsParamsArray(this.getPlacementsRequestParams(e,i,r)),TRC.pConsole("recommendations","debug","hook : normalize-request-param",this["normalize-request-param"].toString(),"string"),i.setAll(this["normalize-request-param"](i.getAll(),null)),TRC.DynamicModulesManager.getDynamicModules("normalize-request-param").forEach(function(e){var t=e.callback(i.getAll());t&&"globalRequestParams"===t.toString()&&i.setAll(t)}),this.setNewPlacementsInRequest(e,i),TRC.pConsole("recommendations","info","formatted request",i.getAll(),"object"),i.getAll()}catch(e){__trcError("TRC.formatTRCRequest",e)}},this.setGlobalParmas=function(e,t){var r=e,i=TRCImpl?TRCImpl.global:{};r.setItemId(this.getItemId()),r.setTemplate(TRC.pageTemplate),r.setItemType(t||this.getItemType()),r.setSessionData(this.getSessionData(TRC.session_data)),r.setUserId(this.getUserId(TRC.user_id)),i["store-userid-first-party-cookie"]&&r.setUserIdFirstPartyCookie(TRC.pageManager.getUserIdFirstPartyCookie()),r.setLoaderBuildTime(this.global.bakeTime),r.setViewId(TRC.pageManager.getPageData()),r.setClientVersion(this.version),r.setPublisherVersion(this.getPublisherVersion()),r.setItemUrl(this.getItemUrl()),r.setDeviceId(this.deviceId),r.setUnifiedId(this.unifiedId),r.setUserType(this.userType),r.setPaywall(this.paywall),r.setPremium(this.premium),r.setAdvertorialSource(this.advertorialSource),r.setExternalPageView(this.external_page_view),r.setBlockVideoLoader(this.blockVideoLoader?"1":"0"),r.setWebComponentsAvailability(GenericWebComponent.isAvailable),r.setUserLanguages(this.getUserLanguages()),i["load-user-agent-data"]&&r.setUserAgentData(this.getUserAgentData()),r.setExperimentVariant(this.getExperimentVariant(this.getSystemFlag("experimentID"))),this.consentState&&(r.setCmpStatus(this.consentState.cmpStatus),r.setGdprApplies(this.consentState.gdprApplies),r.setConsentDaisyBit(this.consentState.consentData),r.setConsentTcString(this.consentState.tcString,this.global["max-tcs-size"]),r.setGdprWasTimeout(this.consentState.wasTimeout)),TRC.consentData&&(r.setCmpStatus(TRC.consentData.cmpStatus),r.setGdprApplies(TRC.consentData.gdprApplies),r.setConsentDaisyBit(TRC.consentData.consentDaisyBit)),this.getUSPData(function(e){TRC.ccpaPs=e}),r.setCex(TRC.cexConsentData),r.setCcpaDns(TRC.ccpaCdns),r.setCcpaPs(TRC.ccpaPs),r.setExcludedPublishers(TRC.exp),r.setGeoCoordinates(TRC.geo),r.setBlockThumbnailVideoLoader(this.blockThumbnailVideoLoader?"1":"0"),r.setGoogleTopicsApi(i["topics-enabled"]),void 0!==navigator.connection&&(r.setConnectionType(navigator.connection.type),r.setConnectionSpeed(navigator.connection.effectiveType)),r.setPageLevelFeature(TRC.pageLevelFeaturesManager.pageLevelFeatures),r.setTrcPiggyBack(TRC.TrcRequestPiggyBack.getPiggyBackData(this));var o=i["oc-recrawl-settings-"+TRC.publisherId];if(this.validateRecrawlSettings(o)&&r.setItemRecrawlData(this.getAutoRecrawlData(o.fields)),r.setCseg(TRC.cseg),this.global["pass-browser-url"]){var n=this.getBrowserUrl();r.setBrowserUrl(n)}r.setUrlVideoPubId(this.getUrlVideoPubId(n)),r.setBlockerList(this.global["blocker-list"])},this.setNewPlacementsInRequest=function(e,t){var r,i,o=t.getPlacementsParamsArray();if(e)for(var n=0,a=o.length;n<a;n++)r=o[n].uip,i=o[n].orig_uip,e[r]||(e[r]=e[i],e[i]=e[r],e[i].new_uip=r)},this.setRequestMetaData=function(e){var t={};this.tags&&this.tags.length&&(t.k=this.tags.join(","));var r=this.metadata;Object.keys(r).forEach(function(e){r[e]&&(t[this.parseMetaName(e)]=r[e])},this),TRC.util.hasKeys(t)&&e.setMetaData(t)},this.parseMetaName=function(e){switch(e){case"user":return"u";case"uploader":return"U";case"content-rating":return"c";case"publish-date":return"t";case"duration":return"d";case"category":return"x";case"v":case"r":default:return e}},this.getPlacementsRequestParams=function(e,t,r){for(var i=[],o,n=TRC.util.keys(e),a,s,l=0;l<n.length;l++)a=e[s=n[l]],__trcInfo(a.placement+" "+a.mode_name),a.placement&&(this.setModeGlobalParamsDecorators(t,a),(o=this.createNewPlacementParams(a,e[s],r)).setAll(this["normalize-request-param"](o.getAll(),a.mode_name)),i.push(o.getAll()));return i},this.createNewPlacementParams=function(e,t,r){var i=new this.PlacementParams;return i.setListId(this.getListId(e)),i.setListSize(this.getListSize(e)),i.setUIMode(this.computeUIM(t)),i.setUIPlacement(e.placement),i.setOriginalUIPlacement(e.placement),this.setPlacementParamsDecorators(i,e,r),i},this.setPlacementParamsDecorators=function(e,t,r){var i=this.getProperty(t.mode_name,"required-attributes");if("string"==typeof i&&"none"!==i&&e.setRequiredAttr(i),t.dfp&&t.dfp.campaign_id&&e.setNativeCampaignID(t.dfp.campaign_id),t.category&&e.setAllowedCategories(t.category),this.enablePlacementGeometry&&(TRC.isOptim("geom")&&!r||!TRC.isOptim("geom"))&&this.addGeometryPlacementData(e,t.container),t.exclude&&e.setExclusions(TRC.text.toStringList(t.exclude)),t.fi&&(TRC.isAMPSplitFeed&&(t.fi=this.ampSplitFeedManager.handleFeedIndexOffset(t)),e.setFeedIndex(t.fi)),t.fb){if(TRC.isAMPSplitFeed){var o=Number(this.ampSplitFeedManager.syncFb);null!==o&&(t.fb=o)}e.setFeedBatch(t.fb)}t.fti&&e.setFeedTemplateId(t.fti)},this.addGeometryPageData=function(e,t){try{TRC.tlf&&console.time("page geometry"),e.setArticlePos(this.getGeometryPageData(t)),e.setScreenWidth(window.screen.availWidth),e.setScreenHeight(window.screen.availHeight),e.setBrowserWidth(TRC.dom.getWindowWidth()),TRC.tlf&&console.timeEnd("page geometry")}catch(t){e.bad=-5}},this.addGeometryExtendedPageData=function(e){try{TRC.tlf&&console.time("page geometry extended"),e.setScreenDensity(TRC.dom.getScreenDensity()),e.setBrowserHeight(TRC.dom.getWindowHeight()),e.setDocumentWidth(TRC.dom.getDocumentWidth()),e.setDocumentHeight(TRC.dom.getDocumentHeight()),TRC.tlf&&console.timeEnd("page geometry extended")}catch(t){e.bad=-6}},this.addGeometryPlacementData=function(e,t){try{TRC.tlf&&console.time("mode geometry - "+e.getAll().uim),e.setContainerPos(this.getPosFromDocTop(t,"top"));var r=this.getModeWidth(t);e.setContainerWidth(r),0===r&&this.global["send-alternate-container-width"]&&e.setAlternateContainerWidth(this.getAlternateContainerWidth(t)),TRC.tlf&&console.timeEnd("mode geometry - "+e.getAll().uim)}catch(t){e.cd=-5}},this.getAlternateContainerWidth=function(e){var t=document.createElement("div");t.style.visibility="hidden",t.style.height="0px",t.innerHTML=Array(100).fill(".").join(" "),e.appendChild(t);var r=this.getModeWidth(e);return e.removeChild(t),r},this.getModeWidth=function(e){return e.getBoundingClientRect().width},this.getGeometryPageData=function(e){var t,r;switch(!0){case"function"!=typeof doc.querySelector:return-4;case"string"==typeof e:return this.computeGeometryPageData(e);case e instanceof Array&&e.length>0:for(r=0;r<e.length;r++)if((t=this.computeGeometryPageData(e))>-1)return t;return-2;default:return-1}},this.computeGeometryPageData=function(e){try{var t=doc.querySelector(e);return t?this.getPosFromDocTop(t,"bottom"):-2}catch(e){return-3}},this.getPosFromDocTop=function(e,t){return e.getBoundingClientRect()[t]+TRC.dom.getPageVerticalScroll()},this.computeAdditionalData=function(){var e=this.ad_first_request&&!TRC.adFirstRequestSent,t={};if(this.additional_data||e)return this.additional_data&&TRC.util.merge(t,this.additional_data),e&&(TRC.util.merge(t,this.ad_first_request),TRC.adFirstRequestSent=!0),t},this.setGlobalParamsDecorators=function(e){if(TRC.pageManager.getValue("past-exclusions")&&e.setPastExclusions(TRC.pageManager.getValue("past-exclusions")),this.excludedItems&&e.setExclusions(TRC.text.toStringList(this.excludedItems)),this.getReferrer()&&e.setReferrer(this.getReferrer()),this.enablePageGeometry&&this.addGeometryPageData(e,this.global["page-geometry-selectors"]),this.enablePageGeometryExtended&&this.addGeometryExtendedPageData(e),this.setRequestMetaData(e),!0===this.global["send-item-query-string-in-req"]&&e.setItemUrlQueryString(this.getItemUrlQueryString()),TRC.networkId&&e.setNetworkID(TRC.networkId),this.tracking_codes&&e.setUTMParams(this.buildUTMParams(this.tracking_codes)),(this.additional_data||this.ad_first_request)&&e.setAdditionalData(this.computeAdditionalData()),TRC.rtbRealTimeUserId&&(TRC.performance&&TRC.performance.mark("RealTimeUserSyncMainStop",null,"RealTimeUserSyncMain",0,"RealTimeUserSyncMain",TRC.PerfEvenType.STOP),e.setRtui(TRC.rtbRealTimeUserId)),this.global["send-id-providers-data"]){var t=getIiqIdProvidersData();e.setIdProvidersData(t)}},Manager.prototype.buildUTMParams=function(e){var t=[];return Object.keys(e).forEach(function(r){t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]))}),t.join("&")},this.setModeGlobalParamsDecorators=function(e,t){this.setPlayerGlobalParams(e,t),0==t.origin.toString().indexOf("h2")&&e.setItemId("_homepage_")},this.setPlayerGlobalParams=function(e,t){e.setItemId(t.item_id),e.setItemType(t.item_type),e.setItemUrl(t.item_url)},this.computeUIM=function(e){var t=e.mode_name,r,i,o;return t+(this.global["disable-network-uim"]||void 0===TRC.networkId?"":":pub="+TRC.networkId)+(TRC.blocker.blockedState>-2&&this.global["use-abp-uim"]?":abp="+TRC.blocker.blockedState:"")+(this.global["use-calibration-uim"]&&this.getProperty(t,"mode-is-responsive")?this.computeCalbUIM(e):"")},this.computeCalbUIM=function(e){if(!e.matched_rule)return"";var t=TRC.implClasses.TRCRBox,r=this.modes[e.mode_name],i=e.matched_rule,o="none"!==r["thumbnail-position"]&&r["thumbnail-position"]||void 0,n=o?TRC.math.round10(t.prototype.getRuleAspectRatio(i,"ratio")||t.prototype.getThumbAspectRatio(r,"ratio")||t.prototype.DEFAULT_THUMB_RATIO,-1):void 0,a=o?this.caclculateThumbnailWidth(e.container,i):void 0;return":type=responsive,rows="+i.rows+",cells="+i.cells+",thumb-pos="+o+(o&&"none"!=o?",thumb-ratio="+n+",thumb-width="+a:"")},this.caclculateThumbnailWidth=function(e,t){var r=TRC.css.responsive.getRulePercentageWidth(t.cells,t.margin.h)/100,i,o=50;return e&&r?(i=parseInt(e.clientWidth>0?e.clientWidth:e.offsetWidth,10),TRC.math.roundByDecimal(i*r,o)):null},this.dispatchLoadRequest=function(e){this.global["enable-old-preloadRequestLoader"]?this.performDispatchLoadRequest(e):TRC.recoRequestsQueue.add(this.performDispatchLoadRequest.bind(this,e))},this.getCalculatedTimeout=function(){var e=TRC.URL.prototype.getParameter.call(location.href,"trc_debug");return TRC.util.isTrue(e)||"yes"===e?0:this.getProperty(null,"timeout")||8e3},this.timeoutForNextBatch=function(e,t){TRC.Timeout.set(function(){e.callee.apply(this,[].slice.call(e).concat([!0]))}.trcBind(this),t)},this.performDispatchLoadRequest=function(e,t){if(TRC.util.hasKeys(e)){var r=arguments;if(this.global["enable-old-preloadRequestLoader"]&&this.preloadRequestLoader&&!this.global["disable-simultaneous-req-protection"])this.timeoutForNextBatch(r,100);else{var i=!!(Object.keys(e)&&Object.keys(e)[0]&&e[Object.keys(e)[0]]&&e[Object.keys(e)[0]].fb);if(!(TRC.isAMP&&i&&this.global["feed-batches"]&&"true"===this.global["feed-batches"].nextFbBlock)){if(TRC.isAMP&&i&&this.global["feed-batches"]&&this.global["feed-batches"].nextFbTimeout&&this.allowTimeout)return this.allowTimeout=!1,void this.timeoutForNextBatch(r,1e3*this.global["feed-batches"].nextFbTimeout);this.allowTimeout||(this.allowTimeout=!0);var o=this.getCalculatedTimeout(),n,a,s=!1;if(this.preloadRequest=e,null!=this.getItemId()){this.delayedDispatchLoadRequest=null;try{if(this.formattedTRCRequest=n=this.formatTRCRequest(this.preloadRequest),TRC.isAMPSplitFeed&&this.ampSplitFeedManager.copyReqToReqForCacheKey(n),TRC.utm.push((new Date).getTime()-TRC.utm.start),this.isValidForCache(n.it)&&(s=this.activateTrcCache(n,this.trcCache,this.trcCacheItemType,this.handleLoadResponse,this)))return"function"==typeof t&&t(),void(TRC.usingCacheForPageRefresh=!this.trcCache.isCacheEnabledViaStorageFlag());n.cb=this.genCallback(this.handleLoadResponse.trcBind(this,n.cacheKey)),this.useAlternativeDomain(e)&&this.global["requests-domain-alternative"]&&(n.trcDomain=TRC.shiftDomain(this.global["requests-domain-alternative"])),a=this.createRequestUrl(n);var l=void 0===this.global["enable-trc-ajax"]||TRC.util.isTrue(this.global["enable-trc-ajax"]);if(TRC.workerInited||TRC.initWorkerIfAvailable(a,o),TRC.worker?this.callTrcByWorker(a,n,o):l?this.callTrcByAjax(a,n,o,t):this.callTrc(a,n,o,t),delete n.cacheKey,l&&TRC.externalLoadRequest)return;TRC.MetricsManager.sendMetricsEvent(TRC,this,{name:"LoadRequestSent",value:"1",type:"counter"},null)}catch(e){__trcError("TRC.dispatchLoadRequest: Error in request processing",e)}}else this.delayedDispatchLoadRequest=this.dispatchLoadRequest.trcBind(this,e)}}}},this.useAlternativeDomain=function(e){for(var t=!1,r=Object.keys(e),i=0;i<r.length;i++){var o;if(e[r[i]].alternative_domain){t=!0;break}}return t},this.isValidForCache=function(e){return!!(this.trcCache&&this.trcCache.isValidCache&&(this.trcCache.isCacheEnabledViaStorageFlag()||this.trcCacheItemType[e]&&(""===this.trcParams||TRC.pageManager.getForceTrcCache())))},this.activateTrcCache=function(e,t,r,i,o){if(!e.r&&!e.r.length)return!1;void 0===TRC.currentAmpFrameNum&&(TRC.currentAmpFrameNum=1);var n=t.extractAndResolveKey(e),a=t.getCacheResponse(n),s="c"===r[e.it];if(a&&a.response&&!this.cachedResponses[n]){if(s||t.isCacheEnabledViaStorageFlag()||a.isSelective)return this.setCachedResponse(a,i,o),this.cachedResponses[n]=!0,!0;"d"===r[e.it]&&(e.cache=1,e.cacheKey=n)}else e.cacheKey=n,t.shouldRequestUseViewIdFromCache(a,n,s,this)&&(e.vi=a.viewId);return!1},this.setCachedResponse=function(e,t,r){e.response.cached=!0,e.response.cachedViewId=e.viewId,TRC.Timeout.set(t.trcBind(r,null,e.response,!0),0),TRC.pConsole("recommendations","warn","using cached recommendations","")},this.createRequestUrl=function(e){this.systemFlags&&this.systemFlags.loaderType&&(e.lt=this.systemFlags.loaderType);var t="";e.cache&&(t="&cache=1",delete e.cache);var r=e.trcDomain?e.trcDomain:this.domain;this.global["load-user-agent-data"]&&!e.uad&&(e.uad=this.getUserAgentData());var i=protocol+"//"+r+"/"+encodeURIComponent(TRC.publisherId)+"/trc/3/json?"+"tim="+encodeURIComponent(__trcClientTimestamp())+(this.trcByPass?"&trc_skip_failover=yes&":"&")+(this.enableTrcRoute&&this.trcRoute?"route="+this.trcRoute+"&":"")+(this.enableExperimentsVariantIdEvent&&this.experimentsVariantIdParamsStr?this.experimentsVariantIdParamsStr+"&":"")+(this.getLoaderTypesValue()?this.getLoaderTypesValue()+"&":"")+"data="+encodeURIComponent(__trcJSONify(e))+this.getOptOut()+TRC.pageManager.additionalDispatchParams()+t+(win.trc_debug_level>1?"&llvl="+win.trc_debug_level:"");return this.enableTrcEventRouteExperiment&&(i+="&trc_evi=21|1434|2154"),i},this.abortLoadRequest=function(e,t){TRC.externalLoadRequest?this.clearPreloadRequestLoaderAndCallNext():(e?TRC.EventsAPI.dispatchNoContent(TRCImpl.NO_CONTENT.timeOut):TRC.EventsAPI.dispatchNoContent(TRCImpl.NO_CONTENT.error),Object.keys(this.preloadRequest).forEach(function(r){if(!(r.search("rbox-tracking")>=0)){e&&(e=!1,__trcWarn("TRC.abortLoadRequest: pv3 timeout"),t&&(TRC.callbacks[t.replace("TRC.callbacks.","")]=function(){})),TRC.dispatch("onRboxFlowError",{placement:r});var i=this.preloadRequest[r];delete this.preloadRequest[r],i.loadRBoxRequestFailed=!0,this.internalDrawRBox(i)}},this),this.clearPreloadRequestLoaderAndCallNext())},this.getOptOut=function(){return void 0!==this.userOptOut&&null!==this.userOptOut&&[!0,"true",!1,"false"].indexOf(this.userOptOut)>-1?"&user.opt_out="+this.userOptOut:""},this.handleLoadResponseFailure=function(e){TRC.performance&&TRC.performance.mark("5.1.8",null,"TrcPv3",this.lastReqId,"pv3call",TRC.PerfEvenType.STOP),null==this.preloadRequestLoader||!this.global["disable-simultaneous-req-protection"]&&e&&e.target&&this.preloadRequestLoader.src!==e.target.src||(__trcError("Server did not respond to loadRBox"),this.abortLoadRequest())},this.isActivePlacementData=function(e,t){return!e.new_uip||t===e.new_uip},this.sendUserIdsMapping=function(e){if(this.global["user-mapping-enabled"]&&!e.trc.DNT&&!e.trc.cm&&TRC.user_id){var t=TRC.pageManager.getUserIdFromReferrer();if(t&&TRC.user_id!==t){var r=[];r.push("uils="+TRC.user_id),r.push("uiref="+t);var i=new Image;return i.src=TRC.PROTOCOL+"//trc.taboola.com/sg/taboola-rbox/1/um/?"+r.join("&"),i}}},this.handleLoadResponse=function(e,t,r){TRC.performance&&TRC.performance.mark("handleLoadResponseStart",null,"handleLoadResponse","","handleLoadResponse",TRC.PerfEvenType.START),this.global["disable-delta-mode-switch"]||TRC.deltaModeAdapter.switchModeNamesIfInDeltaTest(this,t),this.cssLiteInject&&TRC.css.utils.bakeCss(t,this),TRC.ItemOverride.run(this,t);var i,o=TRCImpl?TRCImpl.global:{};function n(){this.parseResponse(t,r),TRC.util.isPercentEnabled(this.global,"enable-feed-view-iframe-report")&&TRC.FeedViewInIframeReport.report(),this.global["enable-old-preloadRequestLoader"]&&this.checkPreloadRequest(i),this.global["smart-ellipsis"]&&TRC.dom.on(win,"resize",TRC.util.debounce(this._repaintEllipsis,500,!1,this)),this.clearPreloadRequestLoaderAndCallNext();try{TRC.SpotlightLoader.load(t)}catch(e){__trcError("Error while trying to load Spotlight")}TRC.tlf&&console.timeEnd("in handleLoadResponse"),TRC.tlf&&console.timeStamp("end handleLoadResponse"),TRC.performance&&TRC.performance.mark("6.0.9",null,"TrcPv3","","pv3prase",TRC.PerfEvenType.STOP)}try{if(TRC.tlf&&console.timeStamp("start handleLoadResponse(pv3)"),TRC.tlf&&console.time("in handleLoadResponse"),TRC.performance&&TRC.performance.mark("6.0.1",null,"TrcPv3","","pv3prase",TRC.PerfEvenType.START),TRC.pConsole("recommendations","info","recommendations response",t,t.trc.verbose?"verbose":"object"),TRC.pConsole("","time","recommendations loaded",""),TRC.utm.push((new Date).getTime()-TRC.utm.start),t&&t.trc&&t.trc.f)for(var a=Object.keys(t.trc.f),s=0;s<a.length;s++){var l=a[s];if(this.feedsManager&&this.feedsManager.feeds&&this.feedsManager.feeds[l]){var c=this.feedsManager.feeds[l];if(c&&c.infiniteScrollEngine&&c.infiniteScrollEngine.preventReachingTheFooter){var d=c.infiniteScrollEngine.preventReachingTheFooter;d&&d.lateRenderEnabled&&c.infiniteScrollEngine.preventReachingTheFooter.handleBatch(e,t)}}}if(t&&t.trc&&t.trc.ui){this.watchedItem=t.trc.wi,this.globaleRequestId=t.trc.vl&&t.trc.vl.length?t.trc.vl[0].ri:this.globaleRequestId,TRC.events_ri=this.globaleRequestId,TRC.session_data=t&&t.trc?t.trc.sd:null,TRC.platform_code=t&&t.trc?t.trc.plc:null,TRC.user_id=t.trc.ui||null,TRC.isOptim("defer-events")?setTimeout(function(){TRC.eventDelegator.dispatch("user_id_ready")},0):TRC.eventDelegator.dispatch("user_id_ready"),TRC.eventDelegator.dispatch("user_id_ready");var p=TRC.util.parseTimeout(this.global["defer-cookie-sync"]);t.trc.stp&&(-1===p?TRC.dispatch("send_user_id",t.trc.stp):setTimeout(function(){TRC.dispatch("send_user_id",t.trc.stp)},p)),t.trc.jst&&(-1===p?TRC.dispatch("load_script_tags",t.trc.jst):setTimeout(function(){TRC.dispatch("load_script_tags",t.trc.jst)},p)),TRC.responseLoaded=!0,TRC.alertVVResponseLoaded&&TRC.alertVVResponseLoaded(TRC.version)}TRC.CustomModulesManager.getCustomModulesFromResponse(t,this),!TRC.BlockClicksManager.BCA&&TRC.BlockClicksManager.getBlockClicksFromResponse(t);var h=t&&t.trc&&t.trc.trecsFiltered;if(!(t&&t.trc&&t.trc.vl&&t.trc.vl.length||h))return TRC.externalLoadRequest||(__trcError("Invalid response from server: "+t),TRC.MetricsManager.sendMetricsEvent(TRC,this,{name:"EmptyResponse",value:"1",type:"counter"},null)),void this.abortLoadRequest();t.trc.tc&&!TRC.taboolaConsole&&TRC.Manager.prototype.loadExternal("//c2.taboola.com/console/console_loader.js","js"),TRC.UserIdMerger.notifyPossibleUserChange(this,TRC.publisherId,t.trc.ui,t.trc.sd),t.trc.cm||TRC.pageManager.storePublisherValue(TRC.publisherId,"session-data",t.trc.sd),TRC.TrcRequestPiggyBack.setPiggyBackData(t,this),TRC.translationManager.setTranslations(t.trc.tslt),t.trc.DNT&&"TRUE"===t.trc.DNT.toUpperCase()?(TRC.doNotTrack=!0,TRC.pageManager.removeAllKeys(),TRC.pageManager.removeUserId()):(TRC.pageManager.storeUserId(t.trc.ui,t.trc.cm),!0!==o["store-sessiondata-first-party-cookie"]&&"true"!==o["store-sessiondata-first-party-cookie"]||TRC.pageManager.storeSessionId(t.trc.sd,t.trc.cm),TRC.pConsole("page","debug","Storing user-id: "+t.trc.ui)),this.sendUserIdsMapping(t),e&&(this.trcCache.cacheResponse(e,t,TRC.pageManager.state.moreDispatchParams),this.cachedResponses[e]=!0),o["disable-page-level-feature"]||TRC.pageLevelFeaturesManager.getFeature(t),n.call(this),this.global["enable-old-preloadRequestLoader"]?this.handleLoadResponseFailure():this.checkPreloadRequest(),TRC.util.isPercentEnabled(this.global,"header-bidding-enabled")&&(this.global["header-bidding-v3"]?scanPrebidEventsV3(this.global["header-bidding-wait-for-win-events-timeout"],this.global["header-bidding-is-add-placement"]):scanPrebidEvents()),this.triggerAfterHandleLoadResponseCustomModuleHook(e,t,r),TRC.dispatch("trcResponseHandled",{res:t}),TRC.performance&&TRC.performance.mark("handleLoadResponseStop",null,"handleLoadResponse","","handleLoadResponse",TRC.PerfEvenType.STOP)}catch(e){__trcError("Error in TRC.handleLoadResponse : ",e)}},this.triggerAfterHandleLoadResponseCustomModuleHook=function(e,t,r){TRC.CustomModulesManager.runHook("after-handle-load-response",null,this,[e,t,r])},this.parseResponse=function(e,r){var o,n,a,s,l,c={},d,p,h,u=e.trc.vl;this.yieldingEnabled=i(this.preloadRequest,this),this.testData=e.trc.td,this.experimentsData=e.trc.evi,this.experimentsHash=e.trc.evh,this.sourceCategory=e.trc.scat,this.visibleOnItemLevel=e.trc.voil,e.trc.vpl&&(this.virtualPlacementsManager.response=e.trc.vpl);var m=this.parseClientGenericAction(e,"cga"),g=this.parseClientGenericAction(e,"dcga"),b=this.parseClientGenericAction(e,"vcga");this.initCcpa(m,e),this.configOverrides.initPubConfigGenericActionOverride(m,g,b);var f=VignetteManager.getVignetteConfig(m,e,this.global),v,C;if(this.renderController.setLazyConfig(),this.renderController.setPlacementsConfig(e.trc.lzr),this.enableTrcRoute&&(d=e.trc.route)&&(this.trcRoute=d),this.enableLoaderCacheBuster)try{window.fetch&&window.Request&&"deflated"===this.systemFlags.loaderType?(v=TRC.PROTOCOL+"//cdn.taboola.com/libtrc/"+t.publisher+"/loader.js",e.trc.lfr&&(C=new Request(v,{cache:"reload",mode:"no-cors"}),fetch(C))):__trcDebug("Cache Bust not supported")}catch(e){__trcError("failed to run cache busting on this browser on: "+v,e)}if(initEventsRedirectParams.call(this,e,p,h),this.experimentsData&&(this.tbtExperimentsVariantIdsStr=this.buildExperimentsVariantIdParams(),this.enableExperimentsVariantIdEvent&&(this.experimentsVariantIdParamsStr=this.tbtExperimentsVariantIdsStr)),e.trc.s){var T=u.filter(function(e){return!!e.stpl});this.storiesManager.createNewStories(e.trc,T.length)}var y=e.trc.f;for(TRC.isAMPSplitFeed&&(y?(this.ampSplitFeedManager.updateFeedIndexAndBatch(e),this.ampSplitFeedManager.cacheOrAssignFeedResponseData(e)):__trcWarn("AMP split feed detected but response don't have feed")),__trcCopyProps(y,this.feedsManager.configs),this.renderController.addResponse(e),a=0;a<u.length;a++){var R,w;if(s=u[a],VignetteManager.isVignettePlacement(f,s.uip))if(!VignetteManager.initVignetteIfNotExists(f,s,this))continue;if(this.global["force-set-reco-reel-container"]&&TRC.RecommendationReel.isPlacementRecoReel(u[a],this)&&TRC.RecommendationReel.setContainerForRRPlacement(u[a],this.preloadRequest,e.trc.f),s.pcp&&TRC.isAMPSplitFeed&&this.ampSplitFeedManager.handlePubCardInResponse(e,a),o=s.uip,this.global["disable-skip-placement"]||!this.shouldSkipPlacement(s,e))if(this.sessionId=e.trc.si,void 0!==(n=this.getOrCreatePlacementData(o,s)))if(n.unifiedPlacement=s.uuip,n.globalTrcResponseJSON=e.trc,n.trcResponse=s,this.currentRecommendation=s,!TRC.fallbackApi.shouldRenderPlacement(s,this.preloadRequest)||killSwitchEnabled(s,e.trc.op))TRC.EventsAPI.dispatchPlacementNoRendered(n,"notAllowedToRender");else if(o.search("rbox-tracking")>=0)n.response=this.formatPlacementRecommendations(e,a);else if(this.feedsManager.hasFeedConflict(o,s.fpl))__trcWarn("Feed conflict detected for '"+o+"' with feed placement '"+s.fpl+"' and test data '"+this.td+"' and '"+JSON.stringify(this.experimentsData)+"'"),TRC.EventsAPI.dispatchNoContent(TRCImpl.NO_CONTENT.noItems,o,!0);else{if(s.et&&(n.expandOptions=this.getExpandOptions(s)),n.isCache=r,e.cachedViewId&&(n.cachedViewId=e.cachedViewId),s.fpl){if(this.feedsManager.invalidFeedsMap[s.fpl])continue;if(this.feedsManager.handleFeedCardPlacement(s,n),!n.parentFeed)continue}else s.stpl?this.storiesManager.handleStoryPlacement(s,n):s.hpl?this.hp4uManager.handleHp4uPlacement(s,n):(s.dlupc||s.dlurl)&&this.dynamicLinksManager.handleDynamicLinksPlacement(s,n);if(TRC.isAMPSplitFeed&&!0===this.ampSplitFeedManager.shouldBreakForAMPSplitFeed)break;if(!n.scriptData&&!n.publisherCardData)if(s.es)TRC.ExternalContainerAppender.move(s.es,n.container);else if(this.isStandaloneVideo(s))n.videoTagLoader=new TRC.VideoTagLoader(this,s.vtag,n,null,{"session-data":e.trc.sd,req:s.ri}),n.videoTagLoader.loadVideo();else if(l=this.formatPlacementRecommendations(e,a,c),n.response=l,this.addFormattedResponseToWidgetAddedFromTrc(s,l,n.addWidget),n.response){n.dc&&delete n.dc;var _=l.trc["video-list"];TRC.FloatingUnitGenerator.isFloatingUnit(_)?this.floatingUnitGenerator=new TRC.FloatingUnitGenerator(l,n,this):(_&&(n["container-selectors"]=_["container-selectors"],n["render-on-orig-container"]=_["render-on-orig-container"]),!s.fpl&&TRC.FeedViewWidgetLoaderManager.isFeedViewWidget(this,n)&&new TRC.FeedViewWidgetLoaderManager(n),this.initRBoxDrawingIfPlacementEligible(n))}}else __trcWarn("Invalid placement in server response "+o);else __trcDebug("'parseResponse' : Skip on placement '"+o+"'")}if(c.text&&(TRC.cssStack?TRC.cssStack.addStyle("override",c.text,TRC.styleInjected):TRC.dom.injectStyle(c.text)),this.yieldingEnabled){var x=this.global?this.global:{},E=x["yield-delay"]?x["yield-delay"]:0;this.executeRBoxDrawQueue(E)}TRC.unmaskedIpParser.parse(e)},this.checkPreloadRequest=function(){var e=TRC.util.parseTimeout(this.global["defer-scripts-render"]);Object.keys(this.preloadRequest).forEach(function(t){var r=win.placementData=this.preloadRequest[t];if(r&&(this.placementShouldHaveResponseData(r,t)&&!this.placementHasResponseData(r)&&(__trcWarn("Server did not provide response for '"+t+'"!'),delete this.preloadRequest[t],this.shouldRetryFailedPlacementRequest(r)?this.retryFailedPlacementRequest(t,r):TRC.dispatch("onRboxFlowError",{placement:t})),this.isActivePlacementData(r,t)&&r.dc&&r.dc.renderAd(),r.scriptData&&(-1!==e?setTimeout(function(e,t){TRC.ScriptRenderer.render(t.scriptData,t)}.trcBind(null,r.scriptData,r),e):TRC.ScriptRenderer.render(r.scriptData,r)),!this.shouldRenderBannerAsNative(r)&&this.isCreateTaboolaConnectCard(r))){var i=this.getTaboolaConnectCardConfig(r);if(!i)return void TRC.MetricsManager.sendMetricsEvent(TRC,TRCImpl,{name:"HTML-filter-no_connect_card_config",value:"1",type:"counter"},null);TRC.taboolaConnect.createCard(i)}},this)},this.shouldRenderBannerAsNative=function(e,t){return t=t||e.trcResponse&&e.trcResponse.v&&e.trcResponse.v[0],this.global["display-ad-to-native"]&&t&&t.rban},this.isCreateTaboolaConnectCard=function(e,t){var r=e.trcResponse&&e.trcResponse.ifr,i=t&&t.ifrObj;return!!e.iframeData||!!r||!!i},this.getTaboolaConnectCardConfig=function(e,t){var r=e.trcResponse&&e.trcResponse.config,i=e.trcResponse||{},o=i.cd||{},n=e.iframeData||{},a=t&&t.ifrObj||{},s=n.config||r||a.config||{},l="tb-jp"===this.language?"ja-JP":this.language,c=n.url||i&&i.url||a.url,d=this.getItemSignature(i),p;t=t||(n&&n.v?n.v[0]:{});var h="";if(s.isRtb=null,t||i.v&&i.v.length>0){p=t||i.v[0];var u=e.multiWidgetModeLevelData&&e.multiWidgetModeLevelData.RBox?e.multiWidgetModeLevelData.RBox.id:e.container._trcRboxId,m=this.boxes[u],g="true"===p["is-rtb"];if(s.isRtb=g,!m){var b=g?"-rtb":"-non_rtb";return TRC.MetricsManager.sendMetricsEvent(TRC,TRCImpl,{name:"HTML-error-no_rbox"+b,value:"1",type:"counter"},null),null}p=__trcCopyProps(p,{},{isSyndicated:p["is-syndicated"]||p["is-in-network"]||p["is-native"],isPhoto:"photo"===p.type,isText:"text"===p.type,imageIframe:p.hasOwnProperty("image-iframe")&&p["image-iframe"],tags:"string"==typeof p.tags?TRC.text.parseCSV(p.tags):[],placement:m.placement,mode:m.mode}),0===Object.keys(t).length&&(t=p),h=m.createVideoBoxClickUrl(p)}return{itemData:p,container:e.container,src:c,config:s,placementName:e.placement,language:l,clickUrl:h,rvMargin:!!(t&&t.rvpm&&t.rv)&&t.rvpm,maxPixelPerSecond:this.getPixelPerSecond(t),localDynamicContentLoader:this.shouldUseLocalDcl(t),renderBannerAsNative:this.shouldRenderBannerAsNative(e,t),uniqueId:d||"",height:o.ch||0,width:o.cw||0}},this.getItemSignature=function(e){return e&&e.v&&e.v[0]&&e.v[0].rvpm&&(e.v[0].sig||e.ri)||""},this.getPixelPerSecond=function(e){return e&&e.rvpps&&e.rv?e.rvpps:this.global["display-rv-maxpps"]},this.initRBoxDrawingIfPlacementEligible=function(e){this.renderController.placementRender(e)},this.buildExperimentsVariantIdParams=function(){var e=this.global["rbox-reported-experiments-layers"]||[2,6,48,50];return this.experimentsVariantIdParamsStr="",this.experimentsVariantIdParamsMap=Object.keys(this.experimentsData).reduce(function(t,r){return e.indexOf(Number(r))>-1&&(t["tvi"+r]=this.experimentsData[r].split("|")[1]),t}.trcBind(this),{}),TRC.TRCLogger.formatParams(this.experimentsVariantIdParamsMap)},this.addFormattedResponseToWidgetAddedFromTrc=function(e,t,r){r&&(this.preloadRequest[e.uip].response=t)},this.shouldUseLocalDcl=function(e){return e&&void 0!==typeof e.rvdcl&&e.rv?"true"==e.rvdcl:TRC.util.isPercentEnabled(this.global,"enable-local-dcl")},this.getWidgetContainer=function(e,t){var r=e.container,i=!(0==e["render-on-orig-container"]);if(!doc.querySelectorAll)return r;var o=this.getOrCreateContainerForMoveOrAddWidget(e["container-selectors"],r,t);return o||(i?r:(__trcWarn("TRC.getWidgetContainer: Not falling back to original container even though could not find valid container when trying to move "+t),null))},this.getOrCreateContainerForMoveOrAddWidget=function(e,t,r){if(e)try{for(var i=0;i<e.length;i++){var o=__trcCopyProps(e[i],{});this.global["immutable-placement-data-on-add-widget"]&&(o=e[i]);var n=this.getOrCreateContainer(o,t);if(n)return n}__trcWarn("TRC.extractValidContainer: Could not find any valid container when trying to move "+r)}catch(e){__trcError("TRC.extractValidContainer: Error occured while trying to find valid container",e)}return null},this.getOrCreateContainer=function(e,t){var r=this.getAddedContainerSelector(e),i=e.shouldCreateContainer,o=doc.querySelectorAll(r);if(o&&1===o.length){TRC.util.isTrue(i)&&(e.shouldCreateContainer=!1,o=[this.createNewContainer(e.location,o[0],e.id)]);var n=this.ensureValidContainer(o[0]);if(n===t)return t;if(n)return e.isFloatingUnit||this.cleanContainerClasses(t),n}else TRC.dispatch("vp-selector-not-found")},this.getAddedContainerSelector=function(e){var t=e.container;if(t)return t;var r=e.originalPlacementName;if(r){var i=this.preloadRequest,o;return Object.keys(i).some(function(e){if(e===r){var t=i[e].original_container;return o="#"+t,!0}}),o}},this.createNewContainer=function(e,t,r){var i,o,n,a=!1===this.global["add-widgets-id-prefix"]?"":"tbl_";return i=doc.createElement("div"),o=r||a+(new Date).getTime(),i.id=o,(n=this.getLocationContainer(e))&&t.insertAdjacentElement(n,i),i},this.getLocationContainer=function(e){switch(e){case"first":return"afterbegin";case"last":return"beforeend";case"before":return"beforebegin";case"after":return"afterend";default:return""}},this.cleanContainerClasses=function(e){e&&(e.className="")},this.addVariantProperties=function(e,t,r){var i=t.trc.vl[r],o=e||{trc:{"video-list":{}}};return o.trc["test-variant"]=t.trc.t,o.trc.uvpw=t.trc.uvpw,o.trc["video-list"]["base-mode"]=i.m,o.trc["video-list"]["test-variant"]=i.t,o},this.formatPlacementRecommendations=function(e,t,r){var i=e.trc.vl[t],o,n=this.preloadRequest[i.uip]||{},a={trc:{req:i.ri,"session-id":e.trc.si,"session-data":e.trc.sd,"user-id":e.trc.ui,"watched-item":e.trc.wi,"country-code":e.trc.cc,"test-variant":e.trc.t,"is-provider":!!e.trc.iframeData,uvpw:e.trc.uvpw,placement:i.uip,mode:n.mode,DNT:e.trc.DNT,cpb:e.trc.cpb,sl:e.trc.sl,pi:e.trc.pi,bdp:e.trc.bdp,ppb:i.ppb,"test-data":e.trc.td,"placement-group":i.pg,"organic-personalization":e.trc.op}};return(i.prty||i.caty)&&(a.trc.prty=i.prty,a.trc.caty=i.caty),e.cached&&(a.cached=!0,a.cachedViewId=e.cachedViewId),i.dc&&"tbl"!==i.typ?a.trc.tag=i:a.trc["video-list"]={video:i.v,"base-mode":i.m,"test-variant":i.t,"properties-override":i.po&&TRC.util.jsonParseCustomNative("{"+i.po+"}")||null,"container-selectors":i.cs,"next-up-widget":i.nup,"removed-widget":i.rw,"taboola-reminder":i.tr,"render-on-orig-container":i.rooc,vtag:i.vtag,pvc:i.pvc},e.trc.cm&&(a.trc["consent-missing"]=e.trc.cm),(o=i.csso)&&(r.text=this.getModeOverrideCss(r,o,n)),i.fpl&&(a.feedPlacement=i.fpl),e.trc.evi&&(a.experimentsData=e.trc.evi),this.addVariantProperties(a,e,t)},this.getModeOverrideCss=function(e,t,r){if(t.indexOf("$container_id$")>-1)try{t=TRC.text.replaceAll(t,"\\$container_id\\$","#"+r.container.id,null)}catch(e){t=TRC.text.replaceAll(t,"\\$container_id\\$","",null)}return e.text?e.text+t:t},this.loadSpotlight=function(){document.querySelectorAll&&(this.spotlightLoaded?TRC.dispatch("trc_afterRboxDraw"):(this.spotlightLoaded=TRC.URL.prototype.switchProtocol.call(TRC.getBackstageUrl()+"resources/js/1.1.0/spotlight.js",protocol),this.loadExternal(this.spotlightLoaded,"js")))},this.sendUserIdTags=function(e){return this.sendExternalTracking(e.data,win.TRC.sharedObjects.loadedPixels)},this.initFrameworks=function(e){"amp"===e&&TRC.amp?TRC.amp.setAMPmodule(this):"mobile-sdk"===e&&(this.manualVisibilityTrigger=!0)},this.init=function(e){TRC.tlf&&console.timeStamp("init TRCImpl");var i=TRC.URL.prototype.getParameter.call(location.href,"trc_abp"),n;if(__trcCopyProps(e,this),TRC.util.hasKeys(this["trc-network-mapping"])){TRC.networkId=TRC.publisherId,this.shiftPublisherId(this["trc-network-mapping"]);var a=this["network-pubs-global"];a&&a[TRC.publisherId]&&TRC.util.merge(this.global,a[TRC.publisherId])}t.framework&&this.initFrameworks(t.framework),this.boxes={},this.unique_placement_count={},this.tags=[],this.metadata={},this.trcRequestDelay=this.global["trc-request-delay"]||r,this.trcByPass=!0===this["trc-skip-failover"],this.enablePageGeometry=this.global["has-page-geometry"],this.enablePageGeometryExtended=this.global["has-page-geometry-extended"],this.enableSlotsGeometry=this.global["has-slots-geometry"],this.enableSlotsSaliency=this.global["has-slots-saliency"],this.cssLiteInject=this.global["enable-mode-injection"]&&!(window.navigator&&"string"==typeof window.navigator.userAgent&&/(iPhone|iPad)(?=.*AppleWebKit)(?!.*CriOS)/i.test(window.navigator.userAgent)),this.spatialSlotsThrottleMax=this.global["spatial-slots-throttle-max"],this.spatialSlotsThrottleTH=this.global["spatial-slots-throttle-th"],this.spatialSlotsThrottleTHPerPage=this.global["spatial-slots-throttle-th-per-page"],this.enablePlacementGeometry=this.global["has-mode-geometry"],this.maxRetriesPerFailedPlacementRequest=this.global["max-retries-per-failed-placement-req"]||1,doc.browsingTopics&&this.global["topics-enabled"]&&TRC.ModuleLoader.load("google-topics-api",TRC.GoogleTopicsApi,function(){}),this.configForPostEvent={available:this.global["send-avail-as-post"],visible:this.global["send-event-as-post"],"new-visible":this.global["send-event-as-post"],explore:this.global["send-explore-as-post"],"content-hub-available":this.global["send-avail-as-post"],"content-hub-visible":this.global["send-event-as-post"],"content-hub-explore":this.global["send-explore-as-post"],"required-viewability-available":this.global["send-rv-avail-as-post"],perf:!0,"rtb-win":!0,metrics:!0,"api-rtb-win":!0,"prebid-crawler":!0},this.configForGetEvent={available:this.global["send-avail-as-get"],visible:this.global["send-visible-as-get"],"new-visible":this.global["send-visible-as-get"],explore:this.global["send-explore-as-get"],"content-hub-available":this.global["send-avail-as-get"],"content-hub-visible":this.global["send-visible-as-get"],"content-hub-explore":this.global["send-explore-as-get"],"required-viewability-available":this.global["send-rv-avail-as-get"],perf:!1,"rtb-win":!1,metrics:!1,"api-rtb-win":!1},this.trcRoute=null,this.enableTrcRoute=!0===this.global["enable-trc-route"],this.enableLoaderCacheBuster=!0===this.global["enable-loader-cache-buster"],this.eventTypesToRoute=this.global["event-types-to-route"]||[],this.enableTrcEventRoute=this.eventTypesToRoute.length>0,this.trcEventRoute=this.enableTrcEventRoute?this.global["default-event-route"]||!1:null,this.enableTrcEventRouteExperiment=!0===this.global["enable-trc-event-route-experiment"],this.enableExperimentsVariantIdEvent=this.global["enable-experiments-variant-id-event"],this.enableLoaderTypeEvent=this.global["enable-loader-type-event"],this.isDeferredAvailable=this.global["enable-deferred-available"],this.enableExpoImageTag=!1!==this.global["enable-expo-img-tag"],this.trcParams=TRC.pageManager.additionalDispatchParams(),this.trcCacheClean=this.global["clean-trc-cache"],o(this.global),this.trcCache=this.global["enable-trc-cache"]?new TRC.TrcCache(this.global["trc-cache-conf"]||{}):null,this.trcCacheItemType=this.global["trc-cache-it"],this.disableReadMore=!1===this.global["enable-read-more"]||!1===this.disableReadMore,this.blockVideoLoader=this.shouldBlockVideoLoader(this.global["block-video-prob"]),this.blockThumbnailVideoLoader=this.shouldBlockThumbnailVideoLoader(this.global["block-thumbnail-video-prob"]),this.global["enable-consent"]&&this.setConsentConfig(this.consentConfigOverride,this.global["consent-presets"]),TRC.getBackstageUrl=function(){var e=TRC.backstageDomainPrefix||"backstage",t=TRC.backstageDomainSuffix||"taboola.com";return this["backstage-domain-url"]||"https://"+e+"."+t+"/backstage/"}.trcBind(this),i?this.setABPEmulation(i):this.global["abp-detection-enabled"]?TRC.blocker.blockedState=TRC.blocker.getBlockedState(this.global["abp-detection-class-names"]||["banner_ad","sponsored_ad"],this.global["abp-ignore-cached-state"]):TRC.blocker.blockedState=TRC.blocker.states.ABP_DETECTION_DISABLED,TRC.styleInjected||this.cssLiteInject||this.bakedStyelInjection(),this.domain=TRC.shiftDomain(this.global["requests-domain"]?this.global["requests-domain"]:"trc.taboola.com"),this.origin instanceof Array||(this.origin=[this.origin]),null!=this.userMetadata?this.metadata.user=__trcJSONify(this.userMetadata):void 0===win.trc_user_id?this.metadata.user=this["get-user"]():this.metadata.user=win.trc_user_id;try{TRC.pConsole("page","debug","Hook : publisher_start",this["publisher-start"].toString()),this["publisher-start"]()}catch(e){__trcError("Error running publisher-start",e)}try{TRC.DynamicModulesManager.executeDynamicModules("publisher-start",this.global)}catch(e){__trcError("Error running Dynamic module start",e)}this.metadata.uploader=this["get-creator"](),this.tags=this["get-tags"]();try{this.metadata.v=this["get-views"](),this.metadata.r=this["get-rating"](),this.metafields.split(",").forEach(function(e){e&&(this.metadata[e]=this["get-"+e]?this["get-"+e]():this.readMetaTag(e))}.trcBind(this))}catch(e){}if(this.initFraudDetection(),this.configOverrides=new ConfigOverrides(this),TRC.listen("send_user_id",this.sendUserIdTags.trcBind(this)),TRC.listen("load_script_tags",this.loadScriptTags.trcBind(this)),window.context&&window.context.data&&window.context.data.feedContainerNum&&parseInt(window.context.data.feedContainerNum,10)>=1&&(TRC.isAMPSplitFeed=!0,TRC.feedContainerNum=window.context.data.feedContainerNum),!!(!TRC.mobile||!TRC.mobile.reportClick)&&!TRC.isAMP&&TRC.util.isPercentEnabled(this.global,"spa-detection-enabled")){var s=!1;TRC.listen("trcResponseHandled",function(){s=!0,TRC.SpaDetector&&TRC.SpaDetector.getInstance(this).sendSpaData()}),TRC.ModuleLoader.load("spa-detector",TRC.SpaDetector,function(){var e=TRC.SpaDetector.getInstance(this);s&&e.sendSpaData()}.trcBind(this))}TRC.util.isPercentEnabled(this.global,"guarantee-card-clash-detection")&&TRC.ModuleLoader.load("card-interference-detector",TRC.CardInterferenceDetector,function(){}),TRC.pageManager.initReferrer(this.global),this.renderController=new TRC.RenderControl(this),this.init=function(){},TRC.isPageLoaded=!1,this.trcCacheClean&&!this.trcCache&&(this.trcCache=new TRC.TrcCache({},!0),this.trcCache=null),this.listenToRenderedModes(),this.global["enable-always-track"]&&!TRC.pushedRboxTracking&&(l(),TRC.pushedRboxTracking=!0),TRC.adHeavyManager||(TRC.adHeavyManager=new AdHeavyManager(this))},this.initFraudDetection=function(){if(this.shouldEnableFraudDetection()){__trcWarn("protected media: enableFraudDetection");var e=this.global.test_for_fraud_from_tag_loader?"fraud-consent":"trcResponseHandled";TRC.listen(e,this.enableFraudDetection.trcBind(this))}};var n=null;this.getExpoImageTag=function(){return null!==n?n:(n="",this.enableExpoImageTag&&null!==this.getSystemFlag("imageExternal")&&(n="tb_expo_img="+this.getSystemFlag("imageExternal")),n)};var a=null,s=null;function l(){if(document.body){var e="rbox-tracking",t=e+"-div";if(!document.getElementById(t)){var r=document.createElement("div");r.id=t,document.body.appendChild(r).style.display="none"}win._taboola.push({mode:e,container:t})}}return this.getLoaderTypesValue=function(){if(s)return a;if(a="",s={},!this.enableLoaderTypeEvent)return a;this.systemFlags.loaderType&&(a="lti="+this.systemFlags.loaderType,s.lti=this.systemFlags.loaderType);var e=this.systemFlags.eventExternal;return e?(Object.keys(e).forEach(function(t){a+=(a?"&":"")+"ex_"+t+"="+e[t],s["ex_"+t]=e[t]}),a):a},this.getLoaderTypesObject=function(){return s||this.getLoaderTypesValue(),s},this.stackedStyleInjection=function(e,t,r,i){TRC.cssStack||(TRC.cssStack=new TRC.css.Stack({idPrefix:"tab_",stack:[{type:"default",cssText:e+(r||"")},{type:"mode",cssText:""},{type:"publisher",cssText:t},{type:"custom",cssText:""}]},i))},this.bakedStyelInjection=function(){var e=this.defaults.style+this.global.style;this.global["css-ie-split"]&&TRC.Browser.ieUpto(9)?TRC.css.utils.setStyleElements(TRC.css.utils.setStyleTextIdPrefix(e,null)):TRC.dom.injectStyle(e)},this.setABPEmulation=function(e){TRC.blocker.blockedState=e,this.global["abp-detection-enabled"]=!0,this.global["use-abp-uim"]=!0,TRC.pConsole("page","warn","emulating Ad Blocker Plus detection.")},this.setConsentConfig=function(e,t){TRC.consent.hasCMP()||(t&&TRC.consent.setPresets(t),e?TRC.consent.setConsentSource(TRC.util.merge({source:"iab_override"},e)):"function"==typeof window.__tcfapi?TRC.consent.setConsentSource({source:"tcf"}):"function"==typeof window.__cmp&&TRC.consent.setConsentSource({source:"iab"}))},this.countTrcContainerMissingError=0,this.ensureValidContainer=function(e,t){var r=e,i="trc_related_container",o,n,a=" "+i+" trc_spotlight_widget"+(TRC.dom.isInIframe(!0)?" trc_in_iframe":"")+("rtl"===this.direction?" tbl-rtl":"");if("string"==typeof e&&(e=document.getElementById(e),t&&!e))return null;if("object"!=typeof e&&(e=null),null!=e){if(e.className.match(i))return e;for(;e.hasChildNodes();)e.removeChild(e.firstChild);return e.origClassName=e.className,e.className+=a,e}return null!=(e=document.getElementById(i))?(e.className.search(i)<=0&&(e.origClassName=e.className),e.className+=a,e):document.body?(this.countTrcContainerMissingError<2&&(this.countTrcContainerMissingError+=1,__trcError("Didn't manage to find TRC container for R-Box with ID "+r+" (retry="+this.countTrcContainerMissingError+") "+(TRC.dom.isReady?"(Document is Ready)":"")+"!")),null):null},this.getPublisherVersion=function(){return"default"},this.getItemType=function(){switch(TRC.listOrigin.getSource()){case"h":return"home";case"c":return"category";case"t":return"text";case"s":return"search";case"p":return"photo";case"o":return"other";case"z":return"content_hub";case"v":default:return"video"}},this.getUserLanguages=function(){return navigator.languages?navigator.languages:navigator.language?[navigator.language]:[]},this.getUserAgentData=function(){return TRC.userAgentDataObject},this.playVideo=function(e){TRC.RBoxUsage.logUsage("TRCImpl.playVideo");try{TRC.dispatch("videoPlaying",e)}catch(e){__trcError("Problem in playVideo:videoPlaying",e)}if(void 0!==e.id&&win.trc_video_id!=e.id){var t=TRC.listOrigin.getSource();void 0===e.url&&(win.trc_video_id||"v"!==t?e.url=null:(e.url=this.getAutoItemMeta("item-url",null,this.urlPreNormalizer,this["normalize-item-url"]),this.trc_url_auto_detection=e.id)),win.trc_video_id=e.id,win.trc_item_url=e.url,null!=this.delayedDispatchLoadRequest&&this.delayedDispatchLoadRequest()}},this.setUser=function(e){this.userMetadata=e,TRC.pConsole("page","info","user meta data ",e,"object")},this.calculatePlacement=function(e){if(e.mode_name.search("rbox-tracking")>=0)return e.mode_name;var t=e.mode_name+(e.category?"!"+e.category:"");return void 0!==this.unique_placement_count[t]&&(t+="#"+ ++this.unique_placement_count[t]),t},this.computeRBoxOptions=function(e){return"string"==typeof e&&(e={mode_name:e}),e.pubOpts?e:(e.pubOpts=__trcCopyProps(e,{}),e.on_error&&TRC.fallbackApi.setOnError(e),e.tracking=(this.tracking?this.tracking:"")+(e.tracking?e.tracking:""),e.target_type=e.target_type||this.target_type||this.getProperty(e.mode_name,"target_type")||"video",e.origin=new TRC.ListOriginBuilder(TRC.listOrigin.getSource(),e.target_type),e.mode_name=!!e.mode&&e.mode||!!e.mode_name&&e.mode_name||!!win.trc_mode_name&&win.trc_mode_name||"rbox-"+e.origin.toString(),e.mode_name=e.mode_name.replace(/\s+/g,""),e.category=!!e.category&&e.category,e.link_target=e.link_target||this.link_target,void 0===e.placement&&(e.placement=this.calculatePlacement(e)),this.unique_placement_count[e.placement]=0,e.visible="boolean"==typeof e.visible?e.visible:!this.invisible,"string"==typeof e.autoplaybox&&(e.autoplaybox=document.getElementById(e.autoplaybox)),!e.player&&!0!==e.slider&&e.visible&&(e.original_container=e.container,e.container=this.ensureValidContainer(e.container)),e.addWidget||(e.response=null),e.computed=!0,e)},this.listenToPlayer=function(e,t){var r="trc_related_container",i="rtl"===this.direction?" tbl-rtl":"",o=TRC.listen("videoPlaying",function(n){var a=document.getElementById(n.player_id),s;a?TRC.dom.isAncestor(t,a,!0)?(o.remove(),TRC.listen("videoPlaying",function(e){e.player_id===t.player_id?s.style.left="-999999em":__trcError("TRC.listenToPlayer: wrong player_id was used for videoPlaying")}),t.player_id=n.player_id,e.container&&("string"==typeof e.container&&(e.container=document.getElementById(e.container)),s=e.container),s||(e.container=s=document.createElement("div")),s.className=r+" trc-inplayer-rbox"+i,s.style.left="-999999em",s.style.width=a.offsetWidth+"px",s.style.marginTop="-"+a.offsetHeight+"px",t.appendChild(s),TRC.kaltura_API&&TRC.Browser.firefox&&(delete TRC.kaltura_API,TRC.kaltura_support()),e.getListId=function(){return"rplayer-after"},e.list_id=e.getListId(),e.loaded=!0,this.internalDrawRBox(e)):__trcError("TRC.listenToPlayer: object with player_id wasn't found in playerContainer that was passed"):__trcError("TRC.listenToPlayer: wrong player_id was passed")}.trcBind(this));TRC.listen("videoDone",function(r){var i=e.container;i?r.player_id===t.player_id?i.style.left="0":__trcError("TRC.listenToPlayer: wrong player_id was used for videoDone"):__trcError("TRC.listenToPlayer:videoDone mainContainer wasn't found")}),TRC.ooyala_API&&(TRC.listen("ooyala_stateChanged",function(r){var i=e.container;i&&(r.player_id===t.player_id?i.style.left="-999999em":__trcError("TRC.listenToPlayer: wrong player_id was used for ooyala_stateChanged"))}),TRC.listen("ooyala_activePanelChanged",function(r){var i=e.container;i&&(r.player_id===t.player_id?i.style.left="more"===r.activePanel||"info"===r.activePanel?"0":"-999999em":__trcError("TRC.listenToPlayer: wrong player_id was used for ooyala_activePanelChanged"))}))},this.loadRBoxDrawQueue=function e(t){function r(e){if(!this.urlOverrideYieldArr){var t=TRC.URL.prototype.getParameter.call(win.location.href,"yield-batch");this.urlOverrideYieldArr=t?t.split("|"):[]}return this.urlOverrideYieldArr.indexOf(e)>-1}if(r(t.placement)&&(t.modeGroupOrder=0),this.itemsToDraw=this.itemsToDraw||[],this.itemsToDrawWithoutOrder=this.itemsToDrawWithoutOrder||[],void 0!==t.modeGroupOrder){var i=parseInt(t.modeGroupOrder,10);isNaN(i)?this.itemsToDrawWithoutOrder.push(t):(this.itemsToDraw[i]=this.itemsToDraw[i]||[],this.itemsToDraw[i].push(t))}else this.itemsToDrawWithoutOrder.push(t)},this.executeRBoxDrawQueue=function e(t,r){TRC.yieldingOrderArr=TRC.yieldingOrderArr||[];var r=r||0;TRC.taboola_yield_report&&0==r&&(console.time("executeRBoxDrawQ"),performance.mark("start executeRBoxDrawQueue")),this.itemsToDrawWithoutOrder.length>0&&(this.itemsToDraw.push(this.itemsToDrawWithoutOrder),this.itemsToDrawWithoutOrder=[]);var i=this.itemsToDraw.shift();if(TRC.yieldingOrderArr.push(i?i.length:0),i){TRC.taboola_yield_report&&(console.time("executeRBoxDrawQueue batch-"+r),performance.mark("start executeRBoxDrawQueue batch-"+r));var o={};i.forEach(function e(t){var r=this.internalDrawRBox(t);r&&(o[r.id]=r)}.trcBind(this)),TRC.dispatch("batchrender",{data:{boxes:o}}),TRC.taboola_yield_report&&(console.timeEnd("executeRBoxDrawQueue batch-"+r),performance.mark("end executeRBoxDrawQueue batch-"+r))}var n=function(e,t){this.executeRBoxDrawQueue(e,t)}.bind(this);if(this.itemsToDraw.length>0)i?TRC.Timeout.set(function(){n(t,++r)},t):n(t,++r);else{TRC.taboola_yield_report&&(console.timeEnd("executeRBoxDrawQ"),performance.mark("end executeRBoxDrawQueue"),performance.measure("total rbox rendering time","start executeRBoxDrawQueue","end executeRBoxDrawQueue"));var a=this;r>0&&(a={boxes:{}}),TRC.dispatch("allrender",{data:a})}},this.internalDrawRBox=function(e){var t,r="widget";if(e.container=this.getWidgetContainer(e,r),(e=this.computeRBoxOptions(e)).player){var i=e.player;return delete e.player,void this.listenToPlayer(e,document.getElementById(i))}if(t=e.container){if(e.visible||(t.style.display="none"),e.spotlight&&t.setAttribute("data-spotlight-publisher-id",e["spotlight-publisher-id"]),null!=e.response||!this.loadCalled||void 0===this.preloadRequest[e.placement]||(e.response=this.preloadRequest[e.placement].response,__trcCopyProps(e,this.preloadRequest[e.placement]),null!=e.response)){try{TRC.SpotlightLoader.registerOnMainContainer(t,e.response)}catch(e){__trcError("Error while trying to register Spotlight data on main container")}return e.trcResponse&&e.trcResponse.multiWidget?(TRC.multiWidget.init.call(this,{originalContainer:t,multiWidget:e.trcResponse.multiWidget,widgetOptions:e,initRBox:this.initRBox,trcManager:this}),this.boxes):this.initRBox.call(this,t,e)}this.preloadRequest[e.placement].container=e.container}},this.handleAMPSplitFeedRequest=function(e){var t=this.global["enable-ampsplitfeedfix"],r;if(TRC.AmpSplitFeedManager=TRC.AmpSplitFeedManager.getAmpSplitFeedManager(t),void 0===this.ampSplitFeedManager){var i=1===parseInt(TRC.feedContainerNum,10);this.ampSplitFeedManager=new TRC.AmpSplitFeedManager(this,i)}if(this.ampSplitFeedManager&&(this.ampSplitFeedManager.initAmpSplitFeedIframe&&!0!==this.ampSplitFeedManager.didInit)){var o=this.ampSplitFeedManager.initAmpSplitFeedIframe.trcBind(this.ampSplitFeedManager);this.ampSplitFeedManager.checkAMPSplitFeedFlagsAndInit(e,o)}},this.handlePushedRequest=function(e){this.global["disable-skip-load-request"]||!this.shouldSkipPushedRequest(e)?TRC.isAMPSplitFeed?this.handleAMPSplitFeedRequest(e):e[Object.keys(e)[0]]&&e[Object.keys(e)[0]].rec?(this.preloadRequest=e,this.handleLoadResponse("",e[Object.keys(e)[0]].rec)):this.dispatchRequestWrapper(e):__trcDebug("'handlePushedRequest' : Skip on push request")},this.dispatchRequestWrapper=function(e){this.loadCalled=!0,this.dispatchLoadRequest(e),this.isPendingLoadRBox=!1},this.dispatchCMPRequest=function(e,t){var r=parseInt(1e5*Math.random());this.pendingRequests[r]=1,TRC.cmp("getConsentData",null,function(i){e.pendingRequests[r]&&(delete e.pendingRequests[r],e.consentState=i,e.handlePushedRequest(t))}),this.global["max-wait-for-cmp"]&&TRC.Timeout.set(function(){e.pendingRequests[r]&&TRC.consent.setConsent({wasTimeout:!0})},this.global["max-wait-for-cmp"])},this.dispatchAmpConsentRequest=function(e,t){if(!1===this.global["amp-consent-enable"])e.handlePushedRequest(t);else{var r=parseInt(1e5*Math.random());this.pendingRequests[r]=1,TRC.consent.getAMPConsent(function(i,o){e.pendingRequests[r]&&(delete e.pendingRequests[r],o&&(e.consentState=o,TRC.ccpaPs=o.ccpaString),TRC.cexConsentData=i,e.handlePushedRequest(t))}),this.global["max-wait-for-cmp"]&&TRC.Timeout.set(function(){e.pendingRequests[r]&&(e.consentState={wasTimeout:!0})},this.global["max-wait-for-cmp"])}},this.getUSPData=function(e){if(!1!==this.global["ccpa-ps-enable"]){var t=TRC.util.getCookieByName("usprivacy");if("function"==typeof __uspapi)try{__uspapi("getUSPData",1,function(r,i){i&&r?e(r.uspString):t&&e(t)})}catch(r){__trcError("Error while calling __uspapi for getUSPData",r),t&&e(t)}else t&&e(t)}},this.loadRBox=function(){var e=arguments,t=Array.prototype.slice.call(arguments),r={},i,o=40,n=this;if(!(t.length<1))try{if(this.isPendingLoadRBox||this.preloadRequestLoader)return void setTimeout(function(){this.loadRBox.apply(this,e)}.trcBind(this),100);t[0]instanceof Array&&(t=t[0]),this.till_request_count=0;for(var a=0;a<t.length;a++)t[a].player||this.till_request_count++;function s(e,t){var r={};r[t.placement]=t,this.handlePushedRequest(r)}for(;t.length;){var l=t.shift();try{l.placement&&l.mode&&__trcInfo(JSON.stringify(l))}catch(e){__trcWarn("failed to send Placement commands")}if((i=this.computeRBoxOptions(__trcCopyProps(l,{}))).player||!0===i.slider)!0===i.slider&&this.createContainerForEscalatorWidget(i),TRC.Timeout.set(s.trcBind(this,r,i),0);else{if(r[i.placement])throw new Error("Placement '"+i.placement+"' is not unique in loadRBox()!");r[i.placement]=i,function(e,t,r){if(this.isPendingLoadRBox=!0,e.container&&1===e.container.nodeType)this.till_request_count--;else{if(!TRC.dom.isReady)return!e.player&&e.visible&&(e.container=this.ensureValidContainer(e.original_container)),void(arguments.callee&&TRC.Timeout.set(arguments.callee.trcBind(this,e,t,r),t));this.error("Invalid container provided for request "+e.placement+" ("+e.container+")!"),delete r[e.placement],this.till_request_count--}this.till_request_count<=0&&(TRC.isAMP?this.dispatchAmpConsentRequest(n,r):TRC.consent.hasCMP()?this.dispatchCMPRequest(n,r):this.handlePushedRequest(r))}.trcBind(this,i,o,r)()}}}catch(e){throw __trcError("Error in loadRBox()",e),e}},this.getAutoRecrawlValue=function(e){var t;return"json"===e.t&&e.n?t=TRC.dom.getJsonLdValueFromKey(e.n):"tag"===e.t&&e.n&&(t=TRC.dom.getPageMetaPropertyValue(e.n)),!t&&e.f&&(t=this.getAutoRecrawlValue(e.f)),t},this.getAutoRecrawlData=function(e){var t={};return Object.keys(e).forEach(function(r){var i=e[r],o=this.getAutoRecrawlValue(i);o&&(t[r]=o)},this),t},this.validateRecrawlSettings=function(e){if(e&&e.fields&&e.sampleRate){var t,r=-1!==(e.pageType&&Array.isArray(e.pageType)?e.pageType:["t","p","v"]).indexOf(TRC.listOrigin.getSource());return TRC.util.isPercentEnabled(e,"sampleRate")&&r}return!1},this.getExperimentVariant=function(e){var t=[];e&&t.push(e);var r=this.global["publisher-experiments"],i=TRC.pubExperiment&&r?r[TRC.pubExperiment]:null;return i&&t.push(i),t.join(",")||void 0},this.parseLoaderParams(t),TRC.dom.init(),this.init(e),this},protocol=TRC.PROTOCOL;TRC.recoRequestsQueue=new TRC.TasksExecutorQueue,Manager.prototype["list-size"]=0,Manager.prototype.MAX_RETRY=2,Manager.prototype.drawInterface=!1,Manager.prototype.delayedDispatchLoadRequest=null,Manager.prototype.invisible=!1,Manager.prototype.excludedItems=null,Manager.prototype.boxes={},Manager.prototype.itemid=null,Manager.prototype.itemurl=null,Manager.prototype.tags=[],Manager.prototype.metadata={},Manager.prototype.userMetadata=null,Manager.prototype.loadCalled=!1,Manager.prototype.unique_placement_count={},Manager.prototype.trc_url_auto_detection=null,Manager.prototype.shiftPublisherId=function(e){var t=TRC.URL.prototype.getParameter.call(location.href,"taboola_sim_domain")||TRC.URL.prototype.getParameter.call(location.href,"fakeurl"),r=win.trc_map_url&&new TRC.URL(win.trc_map_url),i=win.trc_item_url&&new TRC.URL(win.trc_item_url),o=r||i||null,n=(t||(o?o.host:null)||location.host).toLowerCase(),a=(t||(o?o.href:null)||location.href).toLowerCase(),s=e[n],l="/",c=["m","mobile","www2","www3"],d,p,h,u,m,g;if(!s){for(win.__trcToArray(e,d=[]),d.sort(function(e,t){return e[0].length>t[0].length?-1:e[0].length<t[0].length?1:0}),p=0,h=d.length;p<h;p++)if((u=d[p][0].toLowerCase()).indexOf(l)>0){if(a.match(u)){s=d[p][1];break}if(u.indexOf("www.")>-1&&a.match(u.replace("www.",""))){s=d[p][1];break}}else if(n.match(u)){s=d[p][1];break}if(!s&&n.indexOf("www.")<0){for(p=0,h=c.length;p<h&&(m=new RegExp("(https://|http://|^)"+c[p]+"."),!(s=e[g=n.replace(m,"www.")]));p++);s||(s=e[g="www."+n])}}TRC.publisherId=s||"unknown-site-on-"+TRC.publisherId,TRC.pConsole("page","info","in 'Network-Solution' : publisher-id was set to - "+TRC.publisherId,"")},Manager.prototype.widgetContainerReset=function(){Object.keys(this.boxes).forEach(function(e){var t=this.boxes[e].container,r;if(t){for(r=t.getAttribute(TRC.intersections.TARGET_ATTRIB),t.className=t.origClassName,delete t._trc_container,delete t._trc_anonbox;t.hasChildNodes();)t.removeChild(t.lastChild);r&&TRC.intersections.unobserveAll(r)}TRC.Timeout.reset(),TRC.Interval.reset(),delete this.boxes[e]},this)},Manager.prototype.getProperty=function(e,t,r){return r&&r.hasOwnProperty(t)&&void 0!==r[t]?r[t]:void 0===this.modes||void 0===this.modes[e]||void 0===this.modes[e][t]?this[t]:TRC.propertiesOverride&&void 0!==TRC.propertiesOverride[t]?TRC.propertiesOverride[t]:this.modes[e][t]},Manager.prototype.runHook=function(e,t,r,i,o){var n=Array.prototype.slice.call(arguments,5),a=this.getFunction(t,r,i,n);return o&&TRC.CustomModulesManager.dispatchHook(r,t,e,n),a},Manager.prototype.getFunction=function(e,t,r,i){this.global["disable-runHook"]&&(i=Array.prototype.slice.call(arguments,3));var o=this.getProperty(e,t,r);if("function"==typeof o)return TRC.pConsole(e,"debug","Hook : "+t,o.toString(),"function"),o.apply(this,i)},Manager.prototype.readMetaTag=function(e){for(var t=document.head.getElementsByTagName("meta"),r=null,i=0;i<t.length;i++)if(t[i].name){if(t[i].name.toLowerCase()==="item-"+e.toLowerCase())return t[i].content;t[i].name.toLowerCase()===e.toLowerCase()&&(r=t[i].content)}return r},Manager.prototype.get_intent=function(){var e=win.location.href,t=TRC.pageManager.getPublisherValue(TRC.publisherId,"auto-play-intent");if(null!=t){var r=t.split(":");if(parseInt(r[0])>(new Date).getTime()-3e4&&r[1]==this.getItemId())return void 0!==r[2]?r[2]:"n"}return e.search(this.getItemId())>=0?"s":"u"},Manager.prototype["get-creator"]=function(){return this.readMetaTag("uploader")||this.readMetaTag("creator")},Manager.prototype["get-tags"]=function(){},TRC.implClasses=TRC.implClasses||{},Manager.prototype.logTrcEvent=function(e,t,r,i,o,n){var a=!1,s,l,c,d,p;if(t.tim=win.__trcClientTimestamp(),t.id=parseInt(1e4*Math.random()),t.llvl=win.trc_debug_level,this.global["tmp-disable-cv"]||(t.cv=this.version),this.configForPostEvent[e])try{if(s=this.global["send-full-list"]&&r?__trcCopyProps(t,{},r):t,d=this.shouldPostEventAsAjax(e),c=(l=(p=this.global["rbox-ajax-post-events-full-rollout"])?"":"new-")+e,d)try{this.logPostTrcEventAsAjax(c,s,n)}catch(n){!1!==this.configForGetEvent[e]&&p||(t.fbe=1,this.logGetTrcEvent(c,t,i,r,o))}p||this.logPostTrcEvent(e,s)}catch(e){a=!0,__trcError("Error in sending post event",e)}(a||!1!==this.configForGetEvent[e]||!0!==this.configForPostEvent[e])&&((!1===this.configForGetEvent[e]||a)&&(t.fbe=1),this.logGetTrcEvent(e,t,i,r,o))},Manager.prototype.isValidForFill=function(e,t){try{if(("available"===e||"visible"===e)&&this.global["enable-get-fil"]&&this.global["get-fil-n-items"]>=this.preloadRequest[t].response.trc["video-list"].video.length)return!0}catch(e){}return!1},Manager.prototype.shouldEnableFraudDetection=function(){var e,t,r;return!!this.global.test_for_fraud&&(0!==(t=this.global["fraud-traffic-percentage"])&&(t=t||10,(r=Math.floor(100*Math.random()))<=t))},Manager.prototype.enableFraudDetection=function(){if(!TRC.clickFraudDetect.isInitialized)try{TRC.clickFraudDetect.init(TRC.publisherId,TRC.pageManager.getUserId(),this.getReferrer(),this,TRC.pageManager.getPageData())}catch(e){__trcWarn("failed to init fraud detection")}},Manager.prototype.logGetTrcEvent=function(e,t,r,i,o){this.trcEventRoute&&this.eventTypesToRoute.indexOf(e)>-1?(this.logGetTrcEventImpl(this.trcEventRoute,e,t,r,i,o),this.enableTrcEventRouteExperiment&&this.logGetTrcEventImpl(this.domain,e,t,r,i,o)):this.logGetTrcEventImpl(this.domain,e,t,r,i,o)},Manager.prototype.logGetTrcEventImpl=function(e,t,r,i,o,n){var a,s;TRC.tlf&&console.time("in logGetTrcEvent - "+t),Object.keys(r).forEach(function(e){r[e]=this["normalize-log-param"](e,r[e])},this),t=this["normalize-log-param"]("type",t),this.isValidForFill(t,n)&&(r=__trcCopyProps(r,{},o));try{a=this.composeGetURL(t,r,e),s=new Image,this.eventLogger.push(s),i&&(s.onload=s.onerror=function(){if("function"==typeof i)try{i()}catch(e){__trcError("Error in event callback",e)}return!0}),s.src=a}catch(e){__trcError("Error in sending event",e)}TRC.tlf&&console.timeEnd("in logGetTrcEvent - "+t),TRC.performance&&"available"===t&&TRC.performance.mark("8.1.9"),TRC.performance&&"visible"===t&&TRC.performance.mark("9.1.9")},Manager.prototype.logPostTrcEvent=function(e,t){this.trcEventRoute&&this.eventTypesToRoute.indexOf(e)>-1?(this.logPostTrcEventImpl(this.trcEventRoute,e,t),this.enableTrcEventRouteExperiment&&this.logPostTrcEventImpl(this.domain,e,t)):this.logPostTrcEventImpl(this.domain,e,t)},Manager.prototype.logPostTrcEventImpl=function(e,t,r){TRC.tlf&&console.time("in logPostTrcEvent - "+t);var i=this["normalize-log-param"]("publisher",TRC.publisherId),t,o="tb-trc-transportFrame-"+(t=this["normalize-log-param"]("type",t))+"-"+r.id,n=this.getTransportForm(o),a=document.getElementById(o),s;if(Object.keys(r).forEach(function(e){var t=doc.createElement("input");t.name=("_"===e.charAt(0)?e.substr(1):e).replace(/unescape-/g,""),t.type="hidden",t.value=this["normalize-log-param"](e,r[e]),n.appendChild(t)},this),!a)throw new Error("post iframe can be created");TRC.Browser.ie&&((s=a.contentDocument?a.contentDocument:a.contentWindow.document).write(""),s.close());var l=[];this.trcByPass&&l.push("trc_skip_failover=yes"),this.enableTrcRoute&&this.trcRoute&&l.push("route="+this.trcRoute),this.enableExperimentsVariantIdEvent&&this.experimentsVariantIdParamsStr&&l.push(this.experimentsVariantIdParamsStr),this.getLoaderTypesValue()&&l.push(this.getLoaderTypesValue()),n.action=protocol+"//"+e+"/"+i+"/log/3/"+escape(t)+(l.length>0?"?"+l.join("&"):""),n.submit(),TRC.tlf&&console.timeEnd("in logPostTrcEvent - "+t),TRC.performance&&"available"===t&&TRC.performance.mark("8.2.9"),TRC.performance&&"visible"===t&&TRC.performance.mark("9.2.9")},Manager.prototype.getTransportForm=function(e){var t,r;return(r=doc.createElement("form")).className="trc-hidden "+TRANSPORT_FORM_ELEMENT,r.target=e,r.style.display="none",r.method="post",doc.body.appendChild(r),(t=doc.createElement("span")).className=TRANSPORT_FORM_ELEMENT,t.innerHTML='<iframe class="trc-hidden" id="'+e+'" name="'+e+'" width="0" height="0" style="display:none"></iframe>',doc.body.appendChild(t),r},Manager.prototype.shouldPostEventAsAjax=function(e){var t=this.global["rbox-post-events-as-ajax"];return t&&("boolean"==typeof t||-1!==t.indexOf(e))},Manager.prototype.logPostTrcEventAsAjax=function(e,t,r){var i=!1,o=win.XDomainRequest||TRC.Browser.ieUpto(9);if(!o)try{this.queryParamsObj=__trcCopyProps(this.experimentsVariantIdParamsMap,{}),this.enableTrcRoute&&this.trcRoute&&(this.queryParamsObj.route=this.trcRoute),__trcCopyProps(this.getLoaderTypesObject(),this.queryParamsObj);var n=function(i,o){!r&&TRC.util.isPercentEnabled(i.global,"enable-bulk-events")&&i.global["bulk-"+e+"-events-strategy"]?TRC.BulkLoggerManager.bulkPost(o,e,t,null,i.queryParamsObj):TRC.TRCLogger.post(o,e,t,null,i.queryParamsObj,r)};this.trcEventRoute&&this.eventTypesToRoute.indexOf(e)>-1?(n(this,protocol+"//"+this.trcEventRoute),this.enableTrcEventRouteExperiment&&n(this,protocol+"//"+this.domain)):n(this,protocol+"//"+this.domain)}catch(e){i=!0,__trcError("Error in sending post event as ajax",e)}(o||i)&&this.logPostTrcEvent(e,t)},Manager.prototype.log1=function(e,t,r,i,o,n){var a=e+":"+(o||t.li+t.ii)+t.ri;t.ii&&t.it&&(a=e+":"+t.li+t.ii+t.ri),this.eventCounter[a]?this.eventCounter[a]++:("function"==typeof n?n():this.logTrcEvent(e,t,r,i,o),this.eventCounter[a]=1)},Manager.prototype.loadExternal=function(){return TRC.net.loadScript.apply(null,arguments)},Manager.prototype.parseLoaderParams=function(e){Object.keys(e).forEach(function(t){var r=e[t];if("unknown"!==r)switch("auto"===r&&(r=""),t){case"visible":this.invisible=!("boolean"==typeof r?r:"false"!=r);break;case"video":win.trc_video_id=r,TRC.listOrigin.setSource("v");break;case"url":win.trc_item_url=r;break;case"mapUrl":win.trc_map_url=r;break;case"article":win.trc_article_id=r,TRC.listOrigin.setSource("t");break;case"category":win.trc_article_id=r,TRC.listOrigin.setSource("c");break;case"home":case"homepage":win.trc_article_id=r,TRC.listOrigin.setSource("h");break;case"search":win.trc_article_id=r,TRC.listOrigin.setSource("s");break;case"photo":win.trc_article_id=r,TRC.listOrigin.setSource("p");break;case"other":win.trc_article_id=r,TRC.listOrigin.setSource("o");break;case"content_hub":win.trc_article_id=r,TRC.listOrigin.setSource("z");break;case"link_target":this.link_target=r;break;case"video_source":this.video_source=r;break;case"callback":this.video_player_callback=r;break;case"player_reference":this.video_player_reference=r;break;case"target_type":TRC.listOrigin.setTarget(this.target_type=r);break;case"exclude":this.excludedItems=r instanceof Array?r:[r];break;case"tracking":this.tracking=r;break;case"referrer":TRC.pageManager.updateReferrer(r);break;case"amp_disable_resize":this.amp_disable_resize=r;break;case"user_opt_out":this.userOptOut=!(!r||"false"==r||"0"==r)||r;break;case"device":this.deviceId=r;break;case"unified_id":this.unifiedId=r;break;case"user_type":this.userType=r;break;case"paywall":this.paywall=r;break;case"premium":this.premium=!!r;break;case"advertorial_source":this.advertorialSource=r;break;case"external_page_view":window.TRCImpl&&TRCImpl.global["override-external_page_view"]&&(TRCImpl.external_page_view=r),this.external_page_view=r;break;case"tracking_codes":this.tracking_codes=r;break;case"additional_data":this.additional_data=r;break;case"ad_first_request":this.ad_first_request=r;break;case"framework":this.framework=r;break;case"iab_alternative_config":this.consentConfigOverride=r;break;case"consentMessage":TRC.consent.setConsent(r)}},this)},Manager.prototype.getItemByMetaValue=function(e){for(var t=document.head.getElementsByTagName("meta"),r=0;r<t.length;r++)if(t[r].name==e)return t[r].content;return null},Manager.prototype.getItemByCanonicalValue=function(e,t){for(var r=document.head.getElementsByTagName("link"),i=0;i<r.length;i++)if("canonical"==r[i].rel)return t.call(this,e,r[i].href);return null},Manager.prototype.getItemByOgValue=function(e,t){for(var r=document.head.getElementsByTagName("meta"),i=0;i<r.length;i++)if("og:url"==r[i].getAttribute("property")&&r[i].content.length>5){var o=this.global["encode-irregular-og:url"]&&hasSuperUTFSeq(r[i].content)?encodeURI(r[i].content):r[i].content;return t.call(this,e,o)}return null},Manager.prototype.getItemByLocationValue=function(e,t){return t.call(this,e,TRC.pageManager.getCurrentURL().toString())},Manager.prototype.getItemByParamUrl=function(e,t){return!win.trc_item_url||"item-id"!=e&&"item-url"!=e?null:t.call(this,e,win.trc_item_url)},Manager.prototype.getAutoItemMeta=function(e,t,r,i){var o=["paramUrl","meta","canonical","og","location"],n={paramUrl:"getItemByParamUrl",meta:"getItemByMetaValue",canonical:"getItemByCanonicalValue",og:"getItemByOgValue",location:"getItemByLocationValue"},a=this.global["url-extract-order"]?this.global["url-extract-order"]:o,s=0,l,c,d;for(a.push("location"),t=t?r.call(this,e,t):null;s<a.length&&TRC.util.isEmptyString(t);){c=a[s],l=this[n[a[s]]];try{t=l?l.call(this,e,r):null}catch(e){if(!this.global["tmp-catch-item-url-err"])throw new Error(e.message);t=""}s++}return"item-url"==e&&"getItemByParamUrl"==c?t:(d="getItemByLocationValue"!=c,t=i?i.call(this,t,win.trc_video_id?"video":"text",d):t)},Manager.prototype.getEventParams=function(e){return{ri:e&&e.ri||TRC.events_ri,sd:this.getSessionData(TRC.session_data),ui:TRC.pageManager.getUserId(),pi:this.getItemId(),wi:this.watchedItem?this.watchedItem:null,pt:this.getItemType(),vi:TRC.pageManager.getPageData()}},Manager.prototype.sendEvent=function(e,t,r,i,o,n,a){var s=!1,l=this.getEventParams(),c=function(){s||(s=!0,o&&o())};__trcCopyProps(t,l),i?(this.log1(e,l,r,c,this.placement),TRC.pConsole("page","info","event type : "+e+" - this event will be sent only once for the widget",l,"object")):(this.logTrcEvent(e,l,r,c,null,a),TRC.pConsole("page","info","sending event type : "+e,l,"object")),"number"==typeof n&&TRC.Timeout.set(c,n)},Manager.prototype.getSystemFlag=function(e){return this.systemFlags&&void 0!==this.systemFlags[e]?this.systemFlags[e]:null},Manager.prototype.getSessionData=function(e){var t=TRC.pageManager.getPublisherValue(TRC.publisherId,"session-data"),r,i;return(!0===this.global["prefer-response-session-data"]||!t)&&e?e:t},Manager.prototype.getUserId=function(e){var t;return TRC.pageManager.getValue("user-id")||e||TRC.pageManager.getUserIdFromReferrer()||null},Manager.prototype.GlobalRequetParams=function(){var e={id:parseInt(1e3*Math.random()),toString:function(){return"globalRequestParams"}};this.setItemId=function(t){t&&(e.ii=t)},this.setTemplate=function(t){t&&(e.tmpl=t)},this.setItemType=function(t){t&&(e.it=t)},this.setItemRecrawlData=function(t){t&&"object"==typeof t&&Object.keys(t).length>0&&(e.ar=t)},this.setSessionData=function(t){e.sd=t},this.setUserId=function(t){e.ui=t},this.setLoaderBuildTime=function(t){t&&(e.lbt=t)},this.setUserIdFirstPartyCookie=function(t){e.uifp=t},this.setUserLanguages=function(t){t&&(e.ul=t)},this.setUserAgentData=function(t){t&&(e.uad=t)},this.setCmpStatus=function(t){"number"==typeof t&&(e.cmps=t)},this.setConsentDaisyBit=function(t){"string"==typeof t&&(e.cdb=t)},this.setConsentTcString=function(t,r){"string"==typeof t&&(!r||t.length<r)&&(e.tcs=t)},this.setCmpStatus=function(t){"number"==typeof t&&(e.cmps=t)},this.setGdprApplies=function(t){"boolean"==typeof t&&(e.ga=t)},this.setGdprWasTimeout=function(t){"boolean"==typeof t&&(e.gwto=t)},this.setCex=function(t){t&&"string"==typeof t&&(e.cex=t)},this.setCcpaDns=function(t){t&&"string"==typeof t&&(e.ccpa_dns=t)},this.setCcpaPs=function(t){t&&"string"==typeof t&&(e.ccpa_ps=t)},this.setExcludedPublishers=function(t){t&&"string"==typeof t&&(e.exp=t)},this.setGeoCoordinates=function(t){t&&(e.geo=t)},this.setCseg=function(t){t&&"string"==typeof t&&(e.cseg=t)},this.setViewId=function(t){e.vi=t},this.setClientVersion=function(t){e.cv=t},this.setPublisherVersion=function(t){e.uiv=t},this.setItemUrl=function(t){t&&(e.u=t)},this.setBrowserUrl=function(t){t&&"string"==typeof t&&(e.bu=t)},this.setUrlVideoPubId=function(t){t&&"string"==typeof t&&(e.vpi=t)},this.setPlacementsParamsArray=function(t){e.r=t},this.getPlacementsParamsArray=function(){return e.r},this.setExperimentVariant=function(t){t&&(e.pev=t)},this.setPastExclusions=function(t){e.px=t},this.setScreenHeight=function(t){e.sh=t},this.setScreenWidth=function(t){e.sw=t},this.setBrowserWidth=function(t){e.bw=t},this.setArticlePos=function(t){e.bad=t},this.setScreenDensity=function(t){e.sde=t},this.setBrowserHeight=function(t){e.bh=t},this.setDocumentWidth=function(t){e.dw=t},this.setDocumentHeight=function(t){e.dh=t},this.setExclusions=function(t){e.ex=t},this.enableTrcTesMode=function(){e.y=!0},this.setReferrer=function(t){e.e=t},this.setMetaData=function(t){e.m=t},this.setItemUrlQueryString=function(t){t&&(e.qs=t)},this.setNetworkID=function(t){e.nsid=t},this.getId=function(){return e.id},this.setAll=function(t){t&&(e=t)},this.getAll=function(){return e},this.setRtui=function(t){e.rtui=t},this.setIdProvidersData=function(t){void 0!==t&&(e.idpd=t)},this.setDeviceId=function(t){t&&(e.did=t)},this.setUnifiedId=function(t){t&&(e.unuid=t)},this.setUserType=function(t){t&&(e.usrtyp=t)},this.setPaywall=function(t){t&&(e.pywl=t)},this.setPremium=function(t){t&&(e.prem=t)},this.setAdvertorialSource=function(t){t&&(e.advrtsrc=t)},this.setExternalPageView=function(t){t&&(e.extpvid=t)},this.setUTMParams=function(t){t&&(e.pp=t)},this.setBlockVideoLoader=function(t){t&&(e.bv=t)},this.setWebComponentsAvailability=function(t){t&&(e.wc=t)},this.setGoogleTopicsApi=function(t){if(t&&TRC.GoogleTopicsApi){var r=TRC.GoogleTopicsApi.readGoogleTopicsApiFromLocalStorage();r&&(e.top=r)}},this.setBlockThumbnailVideoLoader=function(t){t&&(e.btv=t)},this.setConnectionType=function(t){t&&(e.con=t)},this.setConnectionSpeed=function(t){t&&(e.cos=t)},this.setAdditionalData=function(t){t&&(e.ad=t)},this.setPageLevelFeature=function(t){t&&Object.keys(t).length>0&&(e.plf=t)},this.setTrcPiggyBack=function(t){t&&(e.srpg=t)},this.setBlockerList=function(t){var r="all";if(t)if("string"==typeof t)if(t.toLowerCase()!==r){var i=t.split(",").map(function(e){return parseInt(e)}).filter(function(e){return!isNaN(e)});i.length?e.bl=i:__trcError("blocker-list config is invalid")}else e.bl=[];else __trcError("blocker-list should be of type string")}},Manager.prototype.PlacementParams=function(){var e={};this.setListId=function(t){e.li=t},this.setListSize=function(t){e.s=t},this.setUIMode=function(t){e.uim=t},this.setUIPlacement=function(t){e.uip=t},this.setContainerPos=function(t){e.cd=t},this.setContainerWidth=function(t){e.mw=t},this.setAlternateContainerWidth=function(t){e.amw=t},this.setOriginalUIPlacement=function(t){e.orig_uip=t},this.setRequiredAttr=function(t){e.ra=t},this.setAllowedCategories=function(t){e.ac=t},this.setNativeCampaignID=function(t){e.nvcid=t},this.setExclusions=function(t){e.ex=t},this.setAll=function(t){e=t},this.getAll=function(){return e},this.setFeedBatch=function(t){e.fb=t},this.setFeedTemplateId=function(t){e.fti=t},this.setFeedIndex=function(t){e.fi=t}},Manager.prototype.log=__trcLog,Manager.prototype.error=__trcError,Manager.prototype.warn=__trcWarn,Manager.prototype.info=__trcInfo,Manager.prototype.debug=__trcDebug,Manager.prototype._repaintEllipsis=function(e){var t=e.data&&e.data.boxes;TRC.Ellipsis.doEllipsis(TRC.util.filterObj(function(e){return e.shouldUseSmartEllipsis()},t||this.boxes))},Manager.prototype.sendExternalTracking=function(e,t){if(!TRC.botDetected){var r=this.generatePixelsMarkup(e,t),i,o=this.shouldWritePixelsToIframe(e);try{r&&(o&&(o=this.appendPixelsToIFrame(r)),o||((i=doc.createElement("span")).innerHTML=r,doc.body.appendChild(i)))}catch(e){__trcError("Error in Manager.sendExternalTracking",e)}return r}},Manager.prototype.shouldWritePixelsToIframe=function(e){return e&&this.isInternalPixels(e)||void 0===this.global["disable-iframe-for-tracking-pixel"]||!this.global["disable-iframe-for-tracking-pixel"]},Manager.prototype.isInternalPixels=function(e){for(var t=0;t<e.length;t++){var r;if(this.stripDomainFromPixel(e[t]).indexOf("taboola.com")>-1)return!0}return!1},Manager.prototype.stripDomainFromPixel=function(e){var t=e.replace(/(http[s]*:\/\/)|(^\/\/)/,"");return t.indexOf("?")>-1&&(t=t.substring(0,t.indexOf("?"))),t.indexOf("/")>-1&&(t=t.substring(0,t.indexOf("/"))),t},Manager.prototype.loadScriptTags=function(e){var t=e.data,r,i,o=win.TRC.sharedObjects.loadedScripts,n=[];for(i=0;t&&i<t.length;i++)if((r=t[i])&&!o[r])try{o[r]=!0,r=TRC.URL.prototype.switchProtocol.call(r,TRC.PROTOCOL),n.push(TRC.net.loadScript(r,"js",null,null,!0))}catch(e){__trcWarn("Error appending script at position "+i+", url="+r,e)}return n},Manager.prototype.listenToRenderedModes=function(){TRC.eventDelegator.subscribe("onrender",function(){this.renderedModeCounter++,this.renderedModeCounter!==this.totalModeCounter||TRC.yieldingEnabled||TRC.dispatch("allrender",{data:this})}.trcBind(this))},Manager.prototype.generatePixelsMarkup=function(e,t){for(var r="",i,o,n=0;e&&n<e.length;n++)(i=e[n])&&(!t||t&&!t[i])&&(t&&(t[i]=!0),(o=TRC.text.encodeHTML(i))&&(r+='<img width="0" height="0" src="'+TRC.URL.prototype.switchProtocol.call(o,protocol,!0)+'">'));return r},Manager.prototype.appendPixelsToIFrame=function(e){var t=/<img [^>]*src="([^"]+)"[^>]*>/gm,r;return(r=this.global["disable-unified-iframe-pixel-reporter"]?this.appendPixelsToIFrameMultipleIframes(e):this.appendPixelsToIFrameUnifiedIframes(e))&&this.global["track-external-pixel-traffic"]&&this.global["track-external-pixel-traffic"]>100*Math.random()&&TRC.modDebug.logMessageToServer(1,"fire external pixel",{idx:"pix",plat:this.getPlatformCode(),urls:e.match(t)}),r},Manager.prototype.appendPixelsToIFrameUnifiedIframes=function(e){var t,r="trc-pixel-iframe-"+parseInt(1e4*Math.random(),10),i,o,n=!1,a;if(e){try{this.iframePixelReporter?i=this.iframePixelReporter:(t=this.getPixelWrapper(r),doc.body.appendChild(t),i=doc.getElementById(r),this.iframePixelReporter=i),o=i.contentDocument?i.contentDocument:i.contentWindow.document,(a=doc.createElement("span")).innerHTML=e,o.body.appendChild(a),n=!0,o.close()}catch(e){__trcDebug("Failed to create IFrame for external tracking")}return n}},Manager.prototype.appendPixelsToIFrameMultipleIframes=function(e){var t="trc-pixel-iframe-"+parseInt(1e4*Math.random(),10),r,i,o,n=!1;if(e){try{i=this.getPixelWrapper(t),doc.body.appendChild(i),r=doc.getElementById(t),this.iframePixelReporter=r,(o=r.contentDocument?r.contentDocument:r.contentWindow.document).body.innerHTML=e,n=!0,o.close()}catch(e){__trcDebug("Failed to create IFrame for external tracking")}return n}},Manager.prototype.getPixelWrapper=function(e){var t;return!this.global["disable-iframe-span-wrapping"]||TRC.Browser.ieUpto(8)?(t=doc.createElement("span")).innerHTML='<iframe class="trc-hidden" id="'+e+'" name="'+e+'" width="0" height="0" style="display:none"></iframe>':((t=doc.createElement("iframe")).className="trc-hidden",t.id=e,t.name=e,t.style.height="0px",t.style.width="0px",t.style.display="none"),t},Manager.prototype.isRemovedWidget=function(e){var t;return!(!e||!e["removed-widget"])&&!!this.global["prevent-avail-for-removed-widget"]},Manager.prototype.placementShouldHaveResponseData=function(e,t){return!(!(t.search("rbox-tracking")<0)||e.isFeed||e.isStories||e.isIframeCard||e.externalContainerSelector||e.isStandaloneVideo||e.scriptData||e.publisherCardData||e.isHp4u||e.isDynamicLinks)},Manager.prototype.placementHasResponseData=function(e){return null!=e.response||e.dc},Manager.prototype.getOrCreatePlacementData=function(e,t){var r=this.preloadRequest[e];return r||(r=this.createPlacementData(e,t))&&(this.preloadRequest[e]=r),r},Manager.prototype.createPlacementData=function(e,t){return this.isRegularWidget(t)?this.createAddedWidgetData(e,t):this.isStandaloneVideo(t)?this.createStandaloneVideoWidgetData(e,t):TRC.FeedsManager.isFeedIframe(t)?TRC.FeedsManager.createFeedIframe(e,t):TRC.FeedsManager.isFeedScriptWidget(t)?TRC.FeedsManager.createFeedScriptWidgetData(e,t):TRC.FeedsManager.isExternalContainerWidget(t)?TRC.FeedsManager.createExternalWidgetData(e,t):TRC.FeedsManager.isPublisherCard(t)?TRC.FeedsManager.createPublisherCardData(e,t):this.isHp4uCard(t)?this.createAddedHp4uData(e):isDynamicLinksRecommendation(t)?createAddedDynamicLinksData(e):void 0},Manager.prototype.isRegularWidget=function(e){return e.m&&!e.ifr},Manager.prototype.isHp4uCard=function(e){return e.hpl},Manager.prototype.createAddedWidgetData=function(e,t){return{placement:e,mode:t.m,mode_name:t.m,addWidget:!0}},Manager.prototype.createAddedHp4uData=function(e){return{placement:e,isHp4u:!0,addWidget:!0}},Manager.prototype.isStandaloneVideo=function(e){return e.vtag&&e.vtag.position===TRC.VideoTagLoader.prototype.LOCATION_TYPES.STANDALONE},Manager.prototype.createStandaloneVideoWidgetData=function(e){return{placement:e,isStandaloneVideo:!0}},Manager.prototype.getSortedCloudinaryRatios=function(){var e,t,r;if(!this.cloudinarySortedRatios){t=this.global["cloudinary-aspect-ratios-list"]||[[1,2],[1,1.9],[1,1.8],[9,16],[1,1.7],[1,1.6],[1,1.5],[1,1.4],[3,4],[1,1.3],[1,1.2],[1,1.1],[1,1],[1,.9],[6,5],[1,.8],[4,3],[1,.7],[3,2],[1,.6],[16,9],[2,1]],e=[];for(var i=0;i<t.length;i++)r=t[i],e[i]=r[0]/r[1];this.cloudinarySortedRatios=e.sort()}return this.cloudinarySortedRatios},Manager.prototype.getExpandOptions=function(e){var t={expandType:e.et};return e.ch&&(t.collapsedHeight=e.ch),e.ebc&&(t.expandButtonCaption=e.ebc),e.cbc&&(t.collapseButtonCaption=e.cbc),t},Manager.prototype.clearPageElements=function(){this.clearTransportFrames(),this.clearUserXElements(),this.clearStyleSheets()},Manager.prototype.clearTransportFrames=function(){var e;document.querySelector&&[].slice.call(document.querySelectorAll("."+TRANSPORT_FORM_ELEMENT)).forEach(function(e){e.parentNode.removeChild(e)})},Manager.prototype.clearUserXElements=function(){TRC.userX&&TRC.userX.reset()},Manager.prototype.clearStyleSheets=function(){this.global["clear-styles-on-reset"]&&TRC.dom.removeAllInjectedStyleSheets()},Manager.prototype.shouldBlockVideoLoader=function(e){var t=!1;return isNaN(e)||(t=Math.random()<e/100),TRC.pConsole("page","info","Blocked video: "+t+", block-video-prob: "+e,"string"),t},Manager.prototype.shouldBlockThumbnailVideoLoader=function(e){var t=!1;return isNaN(e)||(t=Math.random()<e/100),TRC.pConsole("page","info","Blocked thumbnail video: "+t+", block-Thumbnail-video-prob: "+e,"string"),t},Manager.prototype.getPublisherVersionPropertyWithFallbackToNetwork=function(e){return this[e][TRC.publisherId]||TRC.networkId&&this[e][TRC.networkId]},Manager.prototype.getSiteNameOgValue=function(){return this.siteName||(this.siteName=TRC.dom.getPageMetaPropertyValue("og:site_name")),this.siteName},Manager.prototype.composeGetURL=function(e,t,r){var i=this["normalize-log-param"]("publisher",TRC.publisherId),o=protocol+"//"+(r||this.domain)+"/"+i+"/log/3/"+escape(e)+"?";return o+=this.trcByPass?"trc_skip_failover=yes&":"",o+=this.enableTrcRoute&&this.trcRoute?"route="+this.trcRoute+"&":"",o+=this.enableExperimentsVariantIdEvent&&this.experimentsVariantIdParamsStr?this.experimentsVariantIdParamsStr+"&":"",o+=this.getLoaderTypesValue()?this.getLoaderTypesValue()+"&":"",Object.keys(t).forEach(function(e){win.nam="_"==e.charAt(0)?e.substr(1):e,void 0!==t[e]&&null!=t[e]&&(0==e.indexOf("unescape-")?o+=e.replace("unescape-","")+"="+t[e]+"&":o+=escape(nam)+"="+escape(t[e])+"&")}),o},Manager.prototype.sendPubsGenericEvent=function(e,t,r,i){var o={data:JSON.stringify(t),type:e,eventTime:(new Date).getTime()};this.generateEvent("pubs-generic",o,r,i)},Manager.prototype.sendAbTestEvent=function(e,t,r,i){var o={abTestsEventType:"simple",name:e,type:t,eventTime:(new Date).getTime()};this.generateEvent("abtests",o,r,i)},Manager.prototype.sendExternalRevenueEvent=function(e,t,r,i){var o={name:e,payload:t,eventTime:(new Date).getTime()};this.generateEvent("external-revenue",o,r,i)},Manager.prototype.generateEvent=function(e,t,r,i,o){var n={"unescape-d":encodeURIComponent(__trcJSONify(t))};if(i&&TRC.hasNetworkAsyncSupport()){n.tim=__trcClientTimestamp(),n.id=parseInt(1e4*Math.random()),n.llvl=win.trc_debug_level,__trcCopyProps(this.getEventParams(o),n);var a=this.composeGetURL(e,n,this.trcEventRoute);TRC.sendPostAsyncCall(a)}else this.sendEvent(e,n,null,!1,r,null,i)},Manager.prototype.shouldSkipRender=function(){return!!this.currentRecommendation&&(!!this.currentRecommendation.hpl||!TRC.fallbackApi.shouldRenderPlacementByRequest(this.currentRecommendation,this.preloadRequest))},Manager.prototype.initRBox=function(e,t){var r=new TRC.implClasses.TRCRBox(t.origin.toString(),t,this);return TRC.dispatch("preBoxRender",{mybox:r}),this.shouldSkipRender()?r:(e._trcRboxId=r.id,this.boxes[r.id]=r,e._trc_container||(e._trc_container=document.createElement("div"),e._trc_container.className="trc_rbox_container",e._trc_anonbox=document.createElement("div"),e._trc_container.appendChild(e._trc_anonbox),e.appendChild(e._trc_container),r.outermostContainer=e),TRC.dispatch("beforeBoxRender",{mybox:r,containerElm:e,boxesList:this.boxes}),r.render(e._trc_anonbox),this.renderRBox(r),win.TRC.trc_drawRBox=!0,r)},Manager.prototype.shouldRetryFailedPlacementRequest=function(e){return!e.addWidget&&!e.fpl&&(!e.numFailedRequests||e.numFailedRequests<this.maxRetriesPerFailedPlacementRequest)},Manager.prototype.retryFailedPlacementRequest=function(e,t){t.numFailedRequests=t.numFailedRequests||0;var r={};r[e]=t,t.numFailedRequests++,this.dispatchLoadRequest(r)},Manager.prototype.createContainerForEscalatorWidget=function(e){e.container=document.createElement("div"),e.container.id="trc_rbox_slider_"+Math.floor(2147483648*Math.random()).toString(36),e.container.className="trc_related_container"},Manager.prototype.callTrc=function(e,t,r,i){TRC.isAMPSplitFeed&&this.ampSplitFeedManager.ampSplitFeedCache.getCacheData("tbl_syncViewID")!==t.vi&&__trcError("View ID Not Synched Between AMP Split Feed iFrames"),this.preloadRequestLoader=this.loadExternal(e,"js",this.handleLoadResponseFailure.trcBind(this),!0),this.preloadRequestLoader.doneCurrentRequest=i,this.preloadRequestLoader.timeout=TRC.Timeout.set(this.abortLoadRequest.trcBind(this,!0,t.cb),r),this.lastReqId=t.id,TRC.performance&&TRC.performance.mark("5.1.0",null,"TrcPv3",this.lastReqId,"pv3call",TRC.PerfEvenType.START),TRC.pConsole("","time","dispatch recommendation request","")},Manager.prototype.callTrcByWorker=function(url,req,timeout){TRC.performance&&TRC.performance.mark("5.1.0",null,"TrcPv3",this.lastReqId,"pv3call",TRC.PerfEvenType.START),this.lastReqId=req.id,TRC.worker.xhr(url,timeout,function(data){try{eval(data)}catch(e){__trcError("TRC.worker: Worker Error in trc response",e)}},this.handleLoadResponseFailure.bind(this)),TRC.pConsole("","time","dispatch recommendation request","")},Manager.prototype.callTrcByAjax=function(e,t,r,i){TRC.performance&&TRC.performance.mark("5.1.0",null,"TrcPv3",this.lastReqId,"pv3call",TRC.PerfEvenType.START),this.lastReqId=t.id;var o=function(e,r){this.handleLoadResponseFailure(),this.abortLoadRequest(!0,t.cb),r&&r(e)}.trcBind(this),n=this.handleLoadResponse.trcBind(this,t.cacheKey);if(this.preloadRequestLoader={},this.preloadRequestLoader.doneCurrentRequest=i,TRC.externalLoadRequest)TRC.externalLoadRequest({responseCallback:n,errorCallback:o,abortRequestCallBack:this.abortLoadRequest.trcBind(this),requestedPlacements:t.r.map(function(e){return e.orig_uip})});else{var a=new XMLHttpRequest;a.open("GET",e,!0),a.setRequestHeader("Content-Type","text/plain"),a.withCredentials=!0,a.timeout=r,a.addEventListener("readystatechange",this.handleTrcAjaxResponseStatus.trcBind(this,a,n,o)),a.addEventListener("error",function(){o("Network error",window.__trcWarn)}),a.addEventListener("timeout",function(){o("Network timeout: "+r,window.__trcWarn)}),a.send(""),TRC.pConsole("","time","dispatch recommendation request",""),window._trcIsUTactive&&(TRC.ajaxFailureHandler=o)}},Manager.prototype.handleTrcAjaxResponseStatus=function(e,t,r){if(4===e.readyState&&0!==e.status)if(e.status<200||e.status>=300)r("Ajax status code not valid",window.__trcWarn);else{var i=e.responseText,o;if(!i||i.indexOf('{"trc":{}}')>-1)return r("Invalid ajax response from server",window.__trcWarn),void TRC.MetricsManager.sendMetricsEvent(TRC,this,{name:"EmptyResponse",value:"1",type:"counter"},null);if(i.indexOf("TRC.callbacks.mute()")>-1)TRC.callbacks.mute();else{var n,a=TRC.util.isEnabledByDefault(this.global["enable-breakline-in-json"])?/^[^{]*([^]*)\)$/:/^[^{]*(.*)\)$/,s=i.match(a);if(s)try{t(JSON.parse(s[1]))}catch(e){r("TRC response not a valid JSON",window.__trcError)}else r("Can't validate TRC response, JSON extract with regex failed",window.__trcError)}}},Manager.prototype.clearPreloadRequestLoader=function(){this.preloadRequestLoader&&(TRC.Timeout.clear(this.preloadRequestLoader.timeout),this.preloadRequestLoader.parentNode&&this.preloadRequestLoader.parentNode.removeChild(this.preloadRequestLoader),this.preloadRequestLoader=null)},Manager.prototype.clearPreloadRequestLoaderAndCallNext=function(){var e;this.preloadRequestLoader&&"function"==typeof this.preloadRequestLoader.doneCurrentRequest&&(e=this.preloadRequestLoader.doneCurrentRequest),this.clearPreloadRequestLoader(),e&&e()},Manager.prototype.clearPreloadRequestLoaderAndResetQueue=function(){this.clearPreloadRequestLoader(),TRC.recoRequestsQueue.resetQueue()},Manager.prototype.enableExploreMore=function(e,t){e.shouldNotCopyPublisherHeaderHtml=this.global.shouldNotCopyPublisherHeaderHtml||!1,this.loadExploreMoreModule(e);var r=this.createAndAppendExploreMoreContainer(e.exm.container);this.setPlacementDataInPreloadRequest(t,r),TRC.exploreMoreInitialized=!0},Manager.prototype.setPlacementDataInPreloadRequest=function(e,t){this.preloadRequest[e]=this.computeRBoxOptions({container:t,placement:e,target_type:"mix",addedWidget:!0})},Manager.prototype.createAndAppendExploreMoreContainer=function(e){var t=document.createElement("div"),r;return t.id=e,TRC.dom.addClass(t,"tbl-invisible"),TRC.util.isTrue(this.global["enable-explore-more-new-display"])?(t.style.display="none",TRC.dom.addClass(t,"tbl-new-display"),document.documentElement.insertAdjacentElement("afterbegin",t)):document.body.appendChild(t),t},Manager.prototype.loadExploreMoreModule=function(e){TRC.ModuleLoader.load("explore-more",TRC.ExploreMore,function(){this.exploreMore=new TRC.ExploreMore(this,e)}.trcBind(this))},Manager.prototype.shouldSkipPlacement=function(e,t){return!!TRC.exploreMoreInitialized&&(TRC.ExploreMore&&TRC.ExploreMore.shouldSkipPlacement(e,t,this.feedsManager))},Manager.prototype.shouldSkipPushedRequest=function(e){return!!TRC.exploreMoreInitialized&&(TRC.ExploreMore&&TRC.ExploreMore.shouldSkipPushedRequest(e))},Manager.prototype.parseClientGenericAction=function(e,t){var r=this.emulateCga(t)||e.trc[t];if(r)return TRC.util.jsonParseSafe(r)},Manager.prototype.emulateCga=function(e){return TRC.URL.prototype.getParameter.call(location.href,"trc_"+e)},Manager.prototype.initCcpa=function(e,t){var r=e&&e.ccpa;this.global["disable-ccpa"]||!r||!TRC.ccpa||TRC.ccpa.isInitialized&&TRC.ccpa.browserUrl===this.getBrowserUrl()||(TRC.ccpaPs?(TRC.ccpa.isInitialized=!0,TRC.ccpa.sendCcpaEvent("publisher")):TRC.ccpa.init(t.trc.vl,e.ccpa),TRC.ccpa.browserUrl=this.getBrowserUrl())},Manager.prototype.isExpoTest=function(){return!!this.getSystemFlag("experimentID")}}(window,document);const isPerformanceSupported=!!(window.performance&&window.performance.mark&&window.performance.measure),MeasurePerformanceMixin=e=>(class extends e{constructor(e={}){super(e),this.settings.classTreeArr=this.settings.classTreeArr||[],this.id=this.settings.classTreeArr.slice(-1)[0]||"",this.markEventMap={}}mark(e,t){if(!isPerformanceSupported)return null;const r=this.settings.classTreeArr.slice(-2)[0]||"",i=`${r}-${e}-${t}`;return TRC.performance?TRC.performance.mark(i,null,"",this.id,`${r}-${e}`,t):(window.performance.mark(i),i)}start(e){if(!isPerformanceSupported)return null;const t=TRC.PerfEvenType?TRC.PerfEvenType.START:"start";return this.markEventMap[e]=this.mark(e,t),this.markEventMap[e]}stop(e){if(!isPerformanceSupported)return null;const t=this.markEventMap[e];if(!t)return null;const r=TRC.PerfEvenType?TRC.PerfEvenType.STOP:"stop",i=this.mark(e,r),o=window.performance.measure(e,t,i);return delete this.markEventMap[e],o?{startTime:o.startTime,duration:o.duration}:null}}),classTreeFactory=new ClassTreeFactory,measurePerformance=classTreeFactory.mixin(MeasurePerformanceMixin);!function(){var pVideoLoaderPerformance=(new ClassTreeFactory).mixin(MeasurePerformanceMixin,MetricReporterMixin).sub("motion-ads");function sendEvent(e){setTimeout(function(){TRC.RBoxUsage&&TRC.RBoxUsage.logUsage&&((e=e||{}).label=e.label||"no-label",e.label="motion-ads-"+e.label,TRC.RBoxUsage.logUsage("motion-ads-event-"+Date.now(),{extraData:e,file:"p-old-video-loader"}))},0)}TRC.InvokePOldVideoLoader=function(){var random=Math.random();TRC.POldVideoLoader=function e(t,r,i,o,n,a){this.blockVideo=o.blockThumbnailVideoLoader,this.itemPerformance=pVideoLoaderPerformance.sub(n),this.metricsEvents=a||[],this.shouldTrackEvents()&&this.metricsEvents.forEach(function(e){this.itemPerformance.start(e)}.bind(this)),this.blockVideo||(TRC.VideoLoader.call(this,t.trc,r,t.placement,t.container,i),this.rbox=t)},TRC.POldVideoLoader.prototype=__trcObjectCreate(TRC.VideoLoader.prototype),TRC.VideoLoader.prototype.ITEM_ID_SEPARATOR="~~",TRC.POldVideoLoader.prototype.getCallbacksObjectKey=function(){return"pVideoCallbacks"},TRC.POldVideoLoader.prototype.genVideoCallback=function(videoCallbackParams){var videoCallbackName=this.generateCallbackName(),that=this;return TRC.pVideoCallbacks[videoCallbackName]=function(data){if(TRCImpl.global["enable-video-ajax"]){if(!TRC.VideoTagLoader.prototype.isXHRDone(data.target))return;TRC.performance&&TRC.performance.mark("videoAjaxStop",null,"","","videoAjaxRoundtrip",TRC.PerfEvenType.STOP),data=TRC.VideoTagLoader.prototype.parseTBResponse(data.target.responseText)}if(TRC.performance&&TRC.performance.mark("videoJsonpRequestStop",null,"","","videoJsonpRequestTime",TRC.PerfEvenType.STOP),data=data||{},data.tags&&data.tags[0]){var unitBootSrc=data.tags[0].unitBootSrc||that.videoConfig.unitBootSrc,script=document.createElement("script");script.src=unitBootSrc,script.setAttribute("type","text/javascript"),script.setAttribute("src",unitBootSrc),script.onload=function(){var unit=eval(data.tags[0].url),viewabilityConfig=that.videoConfig["autoTriggerConfig"]["viewabilityConfig"];-1==viewabilityConfig.time&&(viewabilityConfig.time=0,viewabilityConfig.percentage=101),unit.set("pVideoUrl",videoCallbackParams.url),unit.set("playerContainer",videoCallbackParams.playerContainer),unit.set("components.PosterView",{isActive:!0,imageLocation:videoCallbackParams.poster}),unit.set("customization.placeHolder.background-color","black"),unit.set("viewPercent",viewabilityConfig.percentage),unit.set("secondsInView",viewabilityConfig.time),unit.set("isPlayOnHover",that.videoConfig["autoTriggerConfig"]["hover"]),unit.set("isRepeat",that.videoConfig.repeat);var trackEvents=that.shouldTrackEvents();if(trackEvents){var videoDataForEvent=that.getVideoDataForEvent(videoCallbackParams.itemIndex,videoCallbackParams.itemId);unit.on("error",function(){that.sendDebugEvent("error",videoDataForEvent)}),unit.on("eligible",function(){that.sendDebugEvent("eligible",videoDataForEvent)}),unit.on("play",function(e){that.sendDebugEvent("play",videoDataForEvent,e)}),unit.on("render",function(){that.sendDebugEvent("rendered",videoDataForEvent)}),unit.on("quarterly",function(e){that.sendDebugEvent("quarterly",videoDataForEvent,e)}),unit.on("complete",function(){that.sendDebugEvent("complete",videoDataForEvent)}),unit.on("render",function(){setTimeout(function(){var e=that.rbox.element.querySelector("video");that.metricsEvents.forEach(function(t){e.addEventListener(t,function(){var e={label:"event-"+t,itemIndex:videoCallbackParams.itemIndex,itemId:videoCallbackParams.itemId},r=that.itemPerformance.stop(t);r&&(e.measureObj=r,pVideoLoaderPerformance.sendRboxMetricsEvent({eventName:"old-duration-"+t,value:Math.round(e.measureObj.duration),type:"histogram"})),pVideoLoaderPerformance.sendRboxMetricsEvent({eventName:"old-event-"+t,value:"1",type:"counter"}),sendEvent(e)},{once:!0})})},0)})}TRC.tlf&&console.timeEnd("in setVideoPlayerLoad"),TRC.tlf&&console.timeStamp("end setVideoPlayerLoad"),sendEvent({label:"script-loaded",trackEvents:trackEvents,itemIndex:videoCallbackParams.itemIndex,itemId:videoCallbackParams.itemId})},document.getElementsByTagName("head")[0].appendChild(script)}},"TRC."+this.getCallbacksObjectKey()+"."+videoCallbackName},TRC.POldVideoLoader.prototype.shouldTrackEvents=function(){return!!("undefined"!=typeof TRCImpl&&TRCImpl&&TRCImpl.global&&TRCImpl.global["motion-ads-track-events"]>=random)},TRC.POldVideoLoader.prototype.sendDebugEvent=function(e,t,r){var i,o=window.trc_debug_level;i={event:e,data:r||null,rii:t.rii,placement:t.placement,mode:t.modeName,itemIndex:t.itemIndex,itemId:t.itemId},window.trc_debug_level=3,__trcDebug("Performance Video Event: "+JSON.stringify(i)),window.trc_debug_level=o},TRC.POldVideoLoader.prototype.getVideoDataForEvent=function(e,t){return{rii:this.rbox["response"]["trc"]["req"],placement:this.rbox["placement"],modeName:this.rbox["mode_name"],itemIndex:e,itemId:this.extractRealItemId(t)}},TRC.POldVideoLoader.prototype.extractRealItemId=function(e){if(!e)return null;var t=e.split(this.ITEM_ID_SEPARATOR)[2];return t&&t.length>0&&!isNaN(parseFloat(t))&&isFinite(t)?t:null},TRC.POldVideoLoader.prototype.loadVideo=function(e,t){var r,i,o,n=TRC.VideoLoader.prototype.loadVideo.call(this,e);return n&&t&&(r=(o=t.container.getElementsByClassName("thumbBlock_holder"))&&o[0])&&t.isCreatePVideoOverlay&&(i=TRC.pVideoOverlay.create(t.video_data,t.language,t.isSendEvents),r.appendChild(i)),n}}}();class ESLogger{static get DEFAULT_UPDATE_INTERVAL(){return 5e3}static get MINIMUM_UPDATE_INTERVAL(){return 250}static get LOADER_VARIANT(){return window.TRCImpl&&window.TRCImpl.systemFlags&&window.TRCImpl.systemFlags.loaderType}static get updateIntervalTime(){let e;try{const t=TRCImpl.global["rbox-es-events-interval"];e=t?Math.max(parseInt(t,10),ESLogger.MINIMUM_UPDATE_INTERVAL):ESLogger.DEFAULT_UPDATE_INTERVAL}catch(t){e=ESLogger.DEFAULT_UPDATE_INTERVAL}return e}constructor({id:e,name:t,index:r}){this.index=r,this.created=Date.now(),this.data={_id:e||TRC.util.generateUid(40),name:t,updatesCount:0,variant:ESLogger.LOADER_VARIANT},this._sendData=TRC.util.debounce(this._sendData.trcBind(this),ESLogger.updateIntervalTime,!1,this)}push({key:e,valueObj:t={}}){this.data&&(this._addTimeStamp(t),this._shouldAppend(e)?(this._converToArray(e),this.data[e].push(t)):this.data[e]=t,this._sendData())}_addTimeStamp(e){e.time=Date.now()-this.created}_shouldAppend(e){return Object.prototype.hasOwnProperty.call(this.data,e)}_converToArray(e){Array.isArray(this.data[e])||(this.data[e]=[this.data[e]])}_sendData(){this.data&&this.data.updatesCount++,this._dataChanged=!1,TRC.TRCLogger.reportES(this)}}const pVideoLoaderPerformance=(new ClassTreeFactory).mixin(MeasurePerformanceMixin,MetricReporterMixin).sub("motion-ads");let styleInjected=!1;class PVideoLoader{constructor({id:e}={}){this.itemPerformance=pVideoLoaderPerformance.sub(e),this.initElasticLogger({id:e}),this.occuredEvents={}}static loadVideo({playerContainer:e,poster:t,url:r,itemIndex:i,itemId:o,overlayData:n,trcRBox:a}={}){const s=new PVideoLoader({id:o});try{const{cloudinaryUrlPrefix:e}=PVideoLoader;e&&(r=e+encodeURIComponent(r))}catch(e){s.sendMetric({label:`resolution_adjustment_error-${e}`,itemIndex:i,itemId:o})}return s.loadVideo({playerContainer:e,poster:t,url:r,itemIndex:i,itemId:o,overlayData:n,trcRBox:a})}initElasticLogger({id:e}={}){this.eslogger=new ESLogger({name:"motion-ads",index:"adexperience"});let t=0;try{t=e.replace(/(^~~V1~~)|(~~.+$)/g,"")}catch(e){t=0}this.eslogger.push({key:"started",valueObj:{itemId:e,cleanItemId:t,checkInView:PVideoLoader.shouldCheckIfInViewport,preloadAttr:PVideoLoader.preloadAttribute,viewportMargin:PVideoLoader.viewportCheckerMargin}})}loadVideo({playerContainer:e,poster:t,url:r,itemIndex:i,itemId:o,overlayData:n,trcRBox:a}={}){let s=null;return PVideoLoader.shouldLoadOldVersion&&(s=PVideoLoader.loadOldVersion({playerContainer:e,poster:t,url:r,itemIndex:i,itemId:o,overlayData:n,trcRBox:a})),this.eslogger.push({key:"loadVideo",valueObj:{url:r,itemIndex:i,poster:t,placement:n&&n.video_data&&n.video_data.placement}}),this.sendMetric({label:PVideoLoader.videoEventForAvailable,itemIndex:i,itemId:o}),(s=s||PVideoLoader.isInViewport(e).then(()=>new Promise$1((n,a)=>{PVideoLoader.injectStyleOnce();const s=PVideoLoader.createVideoTag(r);this.addMetricEventListeners({videoNode:s,itemId:o,itemIndex:i});const l=PVideoLoader.createWrapper(s),c=loadPoster(t).then(()=>{l.style["background-image"]=t}),d=c.catch(()=>{this.sendMetric({label:`poster-cannot-be-loaded`,itemIndex:i,itemId:o})}),p=e=>{s.parentElement&&s.parentElement.removeChild(s),c.then(()=>{l.className=l.className.replace(/is-playing/g,"").trim(),l.style["background-image"]=t}),a(new Error("motion ads event error",{cause:e}))},h=()=>{s.style.visibility&&d.then(()=>{s.style.visibility="visible",l.className+=" is-playing ",l.style["background-image"]=""}),this.sendMetric({label:PVideoLoader.videoEventForFirstFrame,itemIndex:i,itemId:o,measureObj:this.itemPerformance.stop(PVideoLoader.videoEventForFirstFrame)}),n()};s.addEventListener(PVideoLoader.videoEventsForStatusChange.error,p,{once:!0}),s.addEventListener(PVideoLoader.videoEventsForStatusChange.visible,h,{once:!0}),e.className+=" motion-ads-wrapper ",e.appendChild(l),s.muted=!0,s.play(),PVideoLoader.videoRetryPlayTimeout&&window.setTimeout(()=>{s&&!this.occuredEvents.playing&&(this.eslogger.push({key:"retry-video-play",valueObj:{timeout:PVideoLoader.videoRetryPlayTimeout}}),s.play())},PVideoLoader.videoRetryPlayTimeout)}))).catch(()=>{this.sendMetric({label:`load-video-error`,itemIndex:i,itemId:o})}),s}addMetricEventListeners({videoNode:e,itemIndex:t,itemId:r}){const i=e=>{const{type:i}=e||{},o={label:i,itemIndex:t,itemId:r,measureObj:e.measureObj};this.sendMetric(o)};this.itemPerformance.start(PVideoLoader.videoEventForFirstFrame),PVideoLoader.videoEventNamesForMetrics.forEach(t=>{this.itemPerformance.start(t),e.addEventListener(t,e=>{this.occuredEvents[t]=!0;const r=this.itemPerformance.stop(t);e.measureObj=r,i(e)},{once:!0})})}sendMetric(e={}){this.eslogger.push({key:`event_${e.label}`}),PVideoLoader.shouldSendMetrics&&setTimeout(()=>{PVideoLoader.logUsage(e),PVideoLoader.sendRBoxMetricsEvent(e)},0)}static logUsage(e){const t={checkInView:PVideoLoader.shouldCheckIfInViewport,preloadAttr:PVideoLoader.preloadAttribute,viewportMargin:PVideoLoader.viewportCheckerMargin};pVideoLoaderPerformance.logUsage({extraData:TRC.util.merge(t,e,{label:`motion-ads-${e.label}`,oldVersion:PVideoLoader.shouldLoadOldVersion}),file:"p-video-loader"})}static sendRBoxMetricsEvent(e={}){e.measureObj&&pVideoLoaderPerformance.sendRboxMetricsEvent({eventName:`duration-${e.label}`,value:Math.round(e.measureObj.duration),type:"histogram"}),pVideoLoaderPerformance.sendRboxMetricsEvent({eventName:`event-${e.label}`,value:"1",type:"counter"})}static createWrapper(e){const t=document.createElement("div");return t.className="motion-ads-container",t.appendChild(e),t}static createVideoTag(e){const t=document.createElement("video");t.setAttribute("preload","auto"),t.style.visibility="hidden",PVideoLoader.videoAttributesToSetAsTrue.forEach(e=>{t.setAttribute(e,"")});const r=PVideoLoader.preloadAttribute;return r?t.setAttribute("preload",r):t.setAttribute("autoplay",""),t.setAttribute("src",e),t}static loadOldVersion({playerContainer:e,poster:t,url:r,itemIndex:i,itemId:o,overlayData:n,trcRBox:a}={}){const s=new PVideoLoader({id:o});return s.loadOldVersion({playerContainer:e,poster:t,url:r,itemIndex:i,itemId:o,overlayData:n,trcRBox:a})}loadOldVersion({playerContainer:e,poster:t,url:r,itemIndex:i,itemId:o,overlayData:n,trcRBox:a}={}){return new Promise$1(s=>{const{trc:l}=a,c=a.response||{},d=c.trc,p=d&&d["video-list"]&&d["video-list"].pvc,h=new TRC.POldVideoLoader(a,p,d,l,o,PVideoLoader.videoEventNamesForMetrics);h.loadVideo({playerContainer:e,url:r,poster:t,itemIndex:i,itemId:o},n),this.sendMetric({label:`old-version-execution`,itemIndex:i,itemId:o}),s()})}static isInViewport(e){return PVideoLoader.shouldCheckIfInViewport&&"undefined"!=typeof TRC&&TRC.intersections&&TRC.intersections.isInViewPort?new Promise$1(t=>{const r=TRC.intersections.observe({targetElement:e,enableDelayedVisibilityCheck:!0,rootMargin:PVideoLoader.viewportCheckerMargin,onEnter:()=>{t(),TRC.intersections.unobserve(r)}})}):Promise$1.resolve()}static injectStyleOnce(){styleInjected||(TRC.dom.injectStyle(`.motion-ads-wrapper { overflow: hidden; } .motion-ads-wrapper .motion-ads-container { height: 100%; width: 100%; background-color: transparent; background-size: auto; text-align: center; overflow: hidden; display: block; } .motion-ads-wrapper .motion-ads-container.is-playing { background-color: black; } .motion-ads-wrapper .motion-ads-container video { width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; -o-object-fit: contain; -o-object-position: 50% 50%; }`,null),styleInjected=!0)}static get videoAttributesToSetAsTrue(){return["loop","muted","playsinline"]}static get videoEventsForStatusChange(){return{visible:"canplaythrough",error:"error"}}static get videoEventForAvailable(){return"available"}static get videoEventForFirstFrame(){return"first-frame"}static get videoEventNamesForMetrics(){return["error","canplaythrough","ended","loadeddata","loadedmetadata","pause","play","playing"]}static get cloudinaryUrlPrefix(){const e=`${getGlobalValue("motion-ads-cloudinary-prefix")}`.trim().split(",").filter(e=>/(^q_auto:)|(^fps_)/.test(e)).join(",");return e?`https://videos.taboola.com/taboola/video/fetch/${e}/`:""}static get videoRetryPlayTimeout(){return+getGlobalValue("motion-ads-retry-play-timeout")||0}static get preloadAttribute(){const e=`${getGlobalValue("motion-ads-preload-attribute")}`.trim();return/^(auto|metadata|none)$/.test(e)?e:""}static get viewportCheckerMargin(){const e=Number(getGlobalValue("motion-ads-viewport-lazy-load-margin"))||0;return`${(100*e).toFixed(2)}%`}static get shouldCheckIfInViewport(){return checkGlobalFlag("motion-ads-viewport-lazy-load")}static get shouldSendMetrics(){return checkGlobalFlag("motion-ads-track-events")}static get shouldLoadOldVersion(){return checkGlobalFlag("motion-ads-load-old-version")&&!!TRC.POldVideoLoader}}function getGlobalValue(e){return"undefined"!=typeof TRCImpl&&TRCImpl&&TRCImpl.global&&TRCImpl.global[e]}function checkGlobalFlag(e){return!!("undefined"!=typeof TRCImpl&&TRCImpl&&TRCImpl.global&&"undefined"!=typeof TRC&&TRC&&TRC.util&&TRC.util.isPercentEnabled(TRCImpl.global,e))}function loadPoster(e){return new Promise$1((t,r)=>{const i=new Image;i.onload=(()=>t()),i.onerror=(e=>r(e)),i.src=e})}const filename$1="trcrbox-ui-branding-utils",createScBranding=({trcRBoxUI:e,video:t,labelsBox:r})=>{switch(loadedStyle(),!0){case"true"===t["is-app-install"]:return generateAppInstallBranding({trcRBoxUI:e,video:t,labelsBox:r});case!!t["branding-text"]:return e.add_span("branding",e.formatData("syndicator",t["branding-text"]),r);case!!t["branding-url"]:return e.add_span("branding",`<img src='${t["branding-url"]}'>`,r)}};var brandingUtils_es6={createScBranding:createScBranding};const appInstallMetricReporter=metricReporter$1.sub("app_install"),brandingHook="app-install-branding-title",generateAppInstallBranding=({trcRBoxUI:e,video:t,labelsBox:r})=>{const i=buildAppInstallReporter({trcRBoxUI:e,video:t});if(reportAppInstallPreRender({reporter:i,video:t}),!t["branding-url"]||!t["branding-text"])return;const o=TblStarRating.isAvailable&&t["stars-rating"]?`<tbl-star-rating rating="${t["stars-rating"]}" post-rating-number></tbl-star-rating>`:"",n=`\n <span class="app-install-branding-wrapper">\n <img class="app-install-logo" src="${t["branding-url"]}">\n <span class="app-install-branding-text">\n <div class="${brandingHook}">\n <span class="app-install-branding-text-inner">${e.formatData("syndicator",t["branding-text"])}</span>\n </div>\n ${o}\n </span>\n <span>\n `,a=e.add_span("branding",n,r),s=e.add_span(null,e.trc.getProperty(e.mode_name,"disclosure-link-text-sponsored",e.propertiesOverride)),l=a.querySelector&&a.querySelector(`.${brandingHook}`);return l&&s&&(l.appendChild&&l.appendChild(generateSpanSeparator()),e.generateLinksBox(l,s,"","disclosure","sponsored","bottom")),i({eventName:appInstallReportEventMap.hasRendered,finished:!0}),a},generateSpanSeparator=()=>{const e=document.createElement("span");return e.innerHTML="&nbsp;|&nbsp;",e};let styleHasLoaded=!1;const loadedStyle=()=>{if(!styleHasLoaded){try{TRC.dom.injectStyle(`.app-install-branding-wrapper { display: inline-block; display: inline-flex; flex-direction: row; align-items: stretch; gap: 5px; width: 100%; min-height: 100%; } .app-install-branding-wrapper .app-install-branding-text { margin: 0; display: flex; flex-direction: column; width: calc(100% - (36px + 5px)); } .app-install-branding-wrapper .app-install-branding-text .video-branding-flex-cta-rating { padding: 0; margin: 0; line-height: 1; display: flex; align-items: flex-end; direction: inherit; } .app-install-branding-wrapper .app-install-branding-title { line-height: 1; display: inline; }tbl-app-install-grid .app-install-branding-wrapper .app-install-branding-title { display: flex; align-items: center; flex-wrap: wrap; }tbl-app-install-grid .branding.branding.branding { line-height: 1; float: none; direction: inherit; min-height: 36px; display: flex; } tbl-app-install-grid .branding.branding.branding .app-install-branding-wrapper { min-height: 36px; } tbl-app-install-grid .branding.branding.branding .app-install-branding-text-inner { max-width: calc(100% - 11px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; } tbl-app-install-grid .branding.branding.branding:before, tbl-app-install-grid .branding.branding.branding:after { display: none; }`,null)}catch(e){}styleHasLoaded=!0}},appInstallReportEventMap={hasAppInstall:`event-has_app_install`,hasRendered:"event-label_box_rendered",noBrandingText:`error-no_branding_text`,noLogo:`error-no_logo`,noStarRating:`event-no_star_rating`,noCTA:`error-no_cta`},reportAppInstallPreRender=({reporter:e,video:t})=>{e({eventName:appInstallReportEventMap.hasAppInstall}),t["branding-text"]||e({eventName:appInstallReportEventMap.noBrandingText}),t["branding-url"]||e({eventName:appInstallReportEventMap.noLogo}),t["stars-rating"]||e({eventName:appInstallReportEventMap.noStarRating}),t["cta-text"]||e({eventName:appInstallReportEventMap.noCTA})},buildAppInstallReporter=({trcRBoxUI:e,video:t})=>{const r="app-install-report";if(!TRC.util.isPercentEnabled(e.trc.global,r))return()=>{};const i=(t.id||t["item-id"]||"").slice(0,40),o={itemId:i};return t["branding-text"]||(o["no branding"]=!0),t["branding-url"]||(o["no logo"]=!0),t["stars-rating"]||(o["no rating"]=!0),t["cta-text"]||(o["no cta"]=!0),({eventName:e,finished:r})=>{r&&(t["is-app-install-branding-rendered"]=!0),setTimeout(()=>{appInstallMetricReporter.logUsage({file:filename$1,extraData:TRC.util.merge({},o,{eventName:e})}),appInstallMetricReporter.sendRboxMetricsEvent({eventName:e,value:"1",type:"counter"})},0)}};class DisplayInSlotManager{constructor(e){this.displayInSlotItemsArr=[],this.nativeItemsArr=[],this.buildItemsArrays(e.v)}buildItemsArrays(e){e.forEach(e=>{DisplayInSlotManager.isItemDisplayInSlot(e)?(this.displayInSlotItemsArr.push(e),this.displayInSlotItemsArr.length>1&&__trcWarn("DisplayInSlotManager error: Should be only 1 displayInSlot per placement")):this.nativeItemsArr.push(e)})}isExistDisplayInSlot(){return Boolean(this.getDisplayInSlotItemData())}getDisplayInSlotItemData(){return this.displayInSlotItemsArr[0]}getDisplayInSlotItemsIds(){return DisplayInSlotManager.getItemsIds(this.displayInSlotItemsArr)}getNativeItemsArr(){return this.nativeItemsArr}getNativeItemsIds(){return DisplayInSlotManager.getItemsIds(this.nativeItemsArr)}sendAvailableEvent(e,t,r){try{const i=this.getDisplayInSlotItemData(),o=TRC.util.merge({ii:i["item-id"],it:i.type},t),n=r.getSpecificItemsPostData(this.getDisplayInSlotItemsIds());e.sendAvailableEvent(o,n,!1,!0)}catch(e){__trcWarn("DisplayInSlotManager sendAvailableEvent error ",e)}}static getItemsIds(e){return e.map(e=>e["item-id"])}static isItemDisplayInSlot(e){return Boolean(e&&e.ifrObj)}static isResponseHasDisplayInSlotItem(e){if(e&&e.v&&e.v.length>0)for(let t=0;t<e.v.length;t++){const r=e.v[t];if(this.isItemDisplayInSlot(r))return!0}return!1}static createVideoBoxAspectWithBackgroundImage(e,t,r){const i=document.createElement("div");i.className="videoCube_aspect tbl-banner-to-native-image-desktop",i.style["background-image"]=`url("${r}")`;const o=e.firstElementChild;e.insertBefore(i,o),TRC.dom.addClass(t,"display-to-native-item-box"),t.thumbnail_aspect=i}}const safeTags=["a","abbr","address","article","aside","area","b","bdi","bdo","blockquote","body","br","caption","cite","code","col","colgroup","data","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","head","header","hr","html","i","img","ins","kbd","label","legend","li","link","main","map","mark","nav","ol","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","small","span","strong","style","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","title","tr","u","ul","var","wbr","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","style","svg","switch","symbol","text","textPath","title","tspan","use","view"],sanitize=e=>{const t=document.createElement("template");t.innerHTML=e;const r=t.content||t;let i=!1;Array.prototype.slice.call(r.querySelectorAll(`${safeTags.map(e=>`:not(${e})`).join("")},*[is]`)).reverse().forEach(e=>{const t=e.parentElement||r;"SCRIPT"!==e.tagName&&Array.prototype.slice.call(e.childNodes).forEach(r=>{t.insertBefore(r,e)}),t.removeChild(e),i=!0});const o=["href","xlink:href"],n=/^(#|https?:\/\/)/i,a=e=>{const t=o.reduce((t,r)=>e.hasAttribute(r)||t,!1);(/^(a|area)$/i.test(e.tagName)||t)&&(o.forEach(t=>{const r=e.getAttribute(t);r&&!n.test(r)&&(e.removeAttribute(t),i=!0)}),e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer"))},s=e=>{let t=getAttributeNames(e);(t=t.filter(e=>/^(on\w+|formaction|to)$/i.test(e))).forEach(t=>{e.removeAttribute(t),i=!0})},l=document.createTreeWalker(r,NodeFilter.SHOW_ALL&~NodeFilter.SHOW_TEXT);let{currentNode:c}=l;for(;c=l.nextNode();)c.hasAttribute&&c.getAttribute&&c.removeAttribute&&(a(c),s(c));return{hasSanitized:i,html:t.innerHTML}};var disclamer_utils_es6={sanitize:sanitize};const getAttributeNames=e=>{if(e.getAttributeNames)return e.getAttributeNames();const{attributes:t}=e;if(!t)return[];const{length:r}=t;if(!r)return[];const i=[];for(let o=0;o<r;o++)i[o]=t[o].name;return i};class TblDisclaimer extends GenericWebComponent{constructor(){super(),this._reporterObj={reporterId:"tbl_disclaimer",isReportingEnabledFlag:"tbl_disclaimer-metric-report"},this.createReporter(),this.attachShadow(),this.animationTimeStamp=0,this._isScrollEnd=!1,this.observerId="",this.itemId="",this.autoScrollObj={fps:24,pps:24,delay:2e3,allowAutoScroll:!0,animationStarted:!1},this.requestAnimationFrameId=0}static get reportTypes(){return{event:"event",error:"error",filter:"filter"}}static get reportNameToReportObjMap(){return{available:{eventType:TblDisclaimer.reportTypes.event,eventName:"available"},visible:{eventType:TblDisclaimer.reportTypes.event,eventName:"visible"},innerLinkClicked:{eventType:TblDisclaimer.reportTypes.event,eventName:"innerLinkClicked"},userScrolled:{eventType:TblDisclaimer.reportTypes.event,eventName:"user_scrolled"},disclaimerNoHeight:{eventType:TblDisclaimer.reportTypes.error,eventName:"disclaimer_no_height"},disclaimerNoOverflowAuto:{eventType:TblDisclaimer.reportTypes.error,eventName:"disclaimer_no_overflow_auto"},disclaimerNoScrollbar:{eventType:TblDisclaimer.reportTypes.error,eventName:"disclaimer_no_scrollbar"},autoScrollDidntStart:{eventType:TblDisclaimer.reportTypes.error,eventName:"auto_scroll_didnt_start"},closestNotSupported:{eventType:TblDisclaimer.reportTypes.error,eventName:"closest_not_supported"},forcingLinkAttribute:{eventType:TblDisclaimer.reportTypes.error,eventName:"forcing_link_attribute"},appendStyles:{eventType:TblDisclaimer.reportTypes.error,eventName:"append_styles"},failedToFetchMarkup:{eventType:TblDisclaimer.reportTypes.error,eventName:"failed_fetching_markup"},hasSanitized:{eventType:TblDisclaimer.reportTypes.event,eventName:"bad_markup_has_been_sanitized"}}}get isScrollEnd(){return this._isScrollEnd}set isScrollEnd(e){this._isScrollEnd=e,!0===e&&(this.cancelRequestAnimationFrame(),this.removeInteractionEvents())}set markup(e){try{let t;(t=e.match("^https?:\\/\\/")?this.fetchMarkup(e):Promise$1.resolve(e)).then(e=>{this.markupText=e;const t=this.createElementStructure();this.createEvents(t),this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.available)}).catch(e=>{e&&this.reportMetrics({eventType:TblDisclaimer.reportTypes.error,eventName:`set_markup_promise_${e}`})})}catch(e){this.reportMetrics({eventType:TblDisclaimer.reportTypes.error,eventName:`set_markup_${e}`})}}get isMetricReportingEnabled(){return TRC.util.isPercentEnabled(TRCImpl.global,this._reporterObj.isReportingEnabledFlag)}set reporterObj({reporterId:e=this._reporterObj.reporterId,isReportingEnabledFlag:t=this._reporterObj.isReportingEnabledFlag}){this._reporterObj={reporterId:e,isReportingEnabledFlag:t},this.metricReporter&&(this.metricReporter.id=e)}fetchMarkup(e){return new Promise$1((t,r)=>{const i=new window.XMLHttpRequest;i.open("GET",e,!0),i.onload=(()=>{this.reportMetrics({eventType:TblDisclaimer.reportTypes.event,eventName:`markup_fetch_status_${i.status}`}),200===i.status?t(i.responseText):r()}),i.onerror=(()=>{this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.failedToFetchMarkup),r()}),i.send()})}createElementStructure(){this.shadowRoot.innerHTML="";const e=this.generateStyles();this.shadowRoot.appendChild(e);const t=document.createElement("div");t.classList.add("disclaimer-container"),this.innerContainer=document.createElement("div"),this.innerContainer.classList.add("inner-container");const r=sanitize(this.markupText);return this.innerContainer.innerHTML=r.html,t.appendChild(this.innerContainer),this.shadowRoot.appendChild(t),sanitize.hasSanitized&&this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.hasSanitized),t}testAndReportDisclaimer(){if(!this.isMetricReportingEnabled)return;const e=window.getComputedStyle(this);parseInt(e.height,10)<=1&&this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.disclaimerNoHeight),"auto"!==e.overflow?this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.disclaimerNoOverflowAuto):this.scrollHeight<=this.clientHeight&&this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.disclaimerNoScrollbar),window.setTimeout(()=>{0===this.scrollTop&&this.autoScrollObj.allowAutoScroll&&!this.isScrollEnd&&this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.autoScrollDidntStart)},this.autoScrollObj.delay+2e3)}allowOnlyInternalLinks(e){e.onclick=(e=>{if(e.stopPropagation(),!TRC.dom.closest(e.target,"a"))return!1;this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.innerLinkClicked)})}createEvents(e){this.allowOnlyInternalLinks(e),this.pauseAutoScrollOnUserInteractionEvents(),this.initiateAutoScrollWhenAdOnViewport()}forceLinkAttributes(e){try{const t=e.querySelectorAll("a");Array.prototype.forEach.call(t,e=>{e.href&&"#"!==e.href&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer"))})}catch(e){this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.forcingLinkAttribute)}}initiateAutoScrollWhenAdOnViewport(){this.observerId=TRC.intersections.isInViewPort({targetElement:this,enableDelayedVisibilityCheck:!0,onEnter:()=>{this.autoScrollObj.animationStarted||(this.reportMetrics({eventType:"event",eventName:`visible`}),this.unsubscribeFromObserver(),this.autoScrollObj.animationStarted=!0,this.waitWithInitialAnimation=!0,this.autoScroll(),this.testAndReportDisclaimer())}})}unsubscribeFromObserver(){try{this.observerId&&(TRC.intersections.unobserve(this.observerId),this.observerId="")}catch(e){this.reportMetrics({eventType:TblDisclaimer.reportTypes.error,eventName:`unobserve_${e}`})}}autoScroll(){try{if(this.startingAnimationTime||(this.startingAnimationTime=performance.now()),!this.autoScrollObj.allowAutoScroll||this.isScrollEnd)return;const e=performance.now()-this.startingAnimationTime;if(!this.waitWithInitialAnimation){if(this.isScrollEnd=this.offsetHeight+this.scrollTop>=this.innerContainer.offsetHeight+this.innerContainer.offsetTop-1,this.isScrollEnd)return;this.lastTickTimestamp=performance.now();const t=e/1e3*this.autoScrollObj.fps;this.scrollTo({top:Math.round(t),behavior:"smooth"})}window.setTimeout(()=>{this.waitWithInitialAnimation&&e>this.autoScrollObj.delay&&(this.waitWithInitialAnimation=!1,this.startingAnimationTime=performance.now()),window.cancelAnimationFrame(this.requestAnimationFrameId),this.requestAnimationFrameId=window.requestAnimationFrame(()=>this.autoScroll())},1e3/this.autoScrollObj.fps)}catch(e){this.reportMetrics({eventType:TblDisclaimer.reportTypes.error,eventName:`autoscroll_${e}`})}}cancelRequestAnimationFrame(){this.requestAnimationFrameId&&(window.cancelAnimationFrame(this.requestAnimationFrameId),this.requestAnimationFrameId=0)}adjustStartingAnimationTimeAfterPause(){this.startingAnimationTime+=performance.now()-this.lastTickTimestamp}pauseAutoScrollOnUserInteractionEvents(){const e={};window.AbortController&&(this.abortSignal=new window.AbortController,e.signal=this.abortSignal.signal);let t=0;const r=()=>{t=this.scrollTop,this.autoScrollObj.allowAutoScroll=!1,this.cancelRequestAnimationFrame()},i=()=>{this.isScrollEnd||this.endAutoScrollOnUserInteraction(t,this.scrollTop)||(this.autoScrollObj.allowAutoScroll=!0,this.adjustStartingAnimationTimeAfterPause(),this.autoScroll())},o=()=>{"visible"===document.visibilityState?i():r()},n=TRC.util.debounce(()=>{this.isScrollEnd||this.endAutoScrollOnUserInteraction(t,this.scrollTop)},200,!0,this);this.addEventListener("mousewheel",n,e),this.addEventListener("mouseenter",r,e),this.addEventListener("touchstart",r,e),this.addEventListener("mouseleave",i,e),this.addEventListener("touchend",i,e),document.addEventListener("visibilitychange",o,e)}endAutoScrollOnUserInteraction(e,t){const r=5;return Math.abs(e-t)>=r&&(this.isScrollEnd=!0,this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.userScrolled),!0)}removeInteractionEvents(){this.abortSignal&&(this.abortSignal.abort(),this.abortSignal=null)}createReporter(){this.metricReporter||(TblDisclaimer.metricReporter||(TblDisclaimer.metricReporter=metricReporter$1.sub(this._reporterObj.reporterId)),this.metricReporter=TblDisclaimer.metricReporter)}generateStyles(){try{const e=document.createElement("style");return e.innerHTML=":host { scroll-behavior: smooth; position: relative; width: 100%; height: 100%; overflow: auto; cursor: default; background: #fff; /* firefox */ scrollbar-color: #888 #f1f1f1; scrollbar-width: thin; /* webkit */ } :host::-webkit-scrollbar { width: 5px; } :host::-webkit-scrollbar-track { background: #f1f1f1; } :host::-webkit-scrollbar-thumb { background: #888; } :host::-webkit-scrollbar-thumb:hover { background: #555; }.disclaimer-container { position: absolute; left: 0; right: 0; top: 0; bottom: 0; font-size: 15px; line-height: 1.5; line-height: clamp(20px, 1.5em, 30px); color: #000; -webkit-text-fill-color: #000; font-weight: 400; } .disclaimer-container img { max-width: 100%; object-fit: contain; }.warning-container { border: 1px solid #000; margin: 1em; padding: 0 10%; text-align: center; font-weight: bold; }",e}catch(e){this.reportMetrics(TblDisclaimer.reportNameToReportObjMap.appendStyles)}}disconnectedCallback(){this.removeInteractionEvents()}reportMetrics({eventType:e="event",eventName:t="",itemId:r=this.itemId}={}){if(!this.isMetricReportingEnabled)return;const i={eventName:`${e}-${t}`,itemId:r};window.setTimeout(()=>{this.metricReporter.logUsage({extraData:i,file:"tbl_disclaimer"}),this.metricReporter.sendRboxMetricsEvent({eventName:i.eventName,value:"1",type:"counter"})},0)}}GenericWebComponent.registerElement({name:"tbl-disclaimer",component:TblDisclaimer});class ISIManager{constructor({videoBoxContainer:e}={}){this.reporterObj={reporterId:"isi_manager",isReportingEnabledFlag:"isi-metric-report"},this.createReporter(),this.injectStyle(),this.videoBoxContainer=e,this.data=e?e.video_data:{},this.thumbnailLinkDomElement=this.videoBoxContainer&&this.videoBoxContainer.thumbBlock?TRC.dom.closest(this.videoBoxContainer.thumbBlock,".item-thumbnail-href"):null,this.template=document.createElement("template")}static get reportTypes(){return{event:"event",error:"error",filter:"filter"}}static get reportNameToReportObjMap(){return{hasIsi:{eventType:ISIManager.reportTypes.event,eventName:"has_isi"},webComponentNotSupported:{eventType:ISIManager.reportTypes.filter,eventName:"web_component_not_supported"},noVideoBoxContainer:{eventType:ISIManager.reportTypes.filter,eventName:"no_video_box_container"},noThumbnailLinkElement:{eventType:ISIManager.reportTypes.filter,eventName:"no_thumbnail_link_element"},noDisclaimerMarkup:{eventType:ISIManager.reportTypes.filter,eventName:"no_disclaimer_markup"},styleInjectError:{eventType:ISIManager.reportTypes.error,eventName:"style_inject_error"},noLogo:{eventType:ISIManager.reportTypes.error,eventName:"no_logo"}}}get isMetricReportingEnabled(){return TRC.util.isPercentEnabled(TRCImpl.global,this.reporterObj.isReportingEnabledFlag)}static initialize({videoBoxContainer:e}={}){const t=new ISIManager({videoBoxContainer:e});try{if(!t.isISISupported())return;t.itemId=(t.data.id||t.data["item-id"]||"").slice(0,40),t.addISIClassesToVideoBoxContainer(),t.createAndAppendDisclaimerComponent(),t.reportIfLogoDoesNotExist()}catch(e){t.reportMetrics({eventType:ISIManager.reportTypes.error,eventName:`initialize_${e}`})}}isISISupported(){return"true"===this.data["is-isi-card"]&&(this.reportMetrics(ISIManager.reportNameToReportObjMap.hasIsi),GenericWebComponent.isAvailable?this.videoBoxContainer?this.thumbnailLinkDomElement?!!this.data.disclaimer||(this.reportMetrics(ISIManager.reportNameToReportObjMap.noDisclaimerMarkup),!1):(this.reportMetrics(ISIManager.reportNameToReportObjMap.noThumbnailLinkElement),!1):(this.reportMetrics(ISIManager.reportNameToReportObjMap.noVideoBoxContainer),!1):(this.reportMetrics(ISIManager.reportNameToReportObjMap.webComponentNotSupported),!1))}addISIClassesToVideoBoxContainer(){this.videoBoxContainer.classList.add("tbl-isi-card"),this.thumbnailLinkDomElement.classList.add("tbl-isi-container")}createAndAppendDisclaimerComponent(){try{const e=document.createElement("tbl-disclaimer");e.itemId=this.itemId,e.reporterObj={reporterId:"isi_disclaimer",isReportingEnabledFlag:this.reporterObj.isReportingEnabledFlag},e.markup=TRC.text.htmlUnescape(this.data.disclaimer),this.thumbnailLinkDomElement.appendChild(e)}catch(e){this.reportMetrics({eventType:ISIManager.reportTypes.error,eventName:`create_append_disclaimer_${e}`})}}injectStyle(){try{if(ISIManager.styleInjected)return;TRC.dom.injectStyle(`.tbl-isi-card .tbl-isi-container { position: relative; display: grid; grid-template-rows: 0.5fr 0.5fr; }.tbl-isi-card .thumbBlock_holder { min-height: 100%; height: 100%; } .tbl-isi-card .thumbBlock_holder .thumbBlock .thumbnail-emblem { width: 20%; height: 50%; background-size: contain; margin: 2%; background-position: 0 0; }`,null),ISIManager.styleInjected=!0}catch(e){this.reportMetrics(ISIManager.reportNameToReportObjMap.styleInjectError)}}createReporter(){ISIManager.metricReporter||(ISIManager.metricReporter=metricReporter$1.sub(this.reporterObj.reporterId)),this.metricReporter=ISIManager.metricReporter}reportMetrics({eventType:e="event",eventName:t="",itemId:r=this.itemId||""}={}){if(!this.isMetricReportingEnabled)return;const i={eventName:`${e}-${t}`,itemId:r};window.setTimeout(()=>{this.metricReporter.logUsage({extraData:i,file:"isi_manager"}),this.metricReporter.sendRboxMetricsEvent({eventName:i.eventName,value:"1",type:"counter"})},0)}reportIfLogoDoesNotExist(){window.setTimeout(()=>{this.thumbnailLinkDomElement.querySelector(".thumbnail-emblem")||this.reportMetrics(ISIManager.reportNameToReportObjMap.noLogo)},0)}}class NewCta{constructor({styleSettings:e,data:t}={}){this.styleSettings=e,this.data=t,this.button=this.createButton(),this.setCtaButtonStyle(this.styleSettings),this.ctaAnchor=this.createCtaAnchorElement(),this.ctaAnchor.appendChild(this.button)}createButton(){const e=TRC.dom.createHTMLElement("button");e.type="button",e.classList.add("video-cta-button","video-cta-style");const t=40;return e.innerText=this.data.label.slice(0,t),e}createCtaAnchorElement(){const e=TRC.dom.createHTMLElement("a");return e.classList.add("video-cta-href"),e.target="_blank",e.rel="nofollow noopener",e.href=this.data.link,e}setCtaButtonStyle(e){Object.keys(e).forEach(t=>{e[t]&&(this.button.style[t]=e[t])})}getDomElement(){return this.ctaAnchor}}class GenericGridComponent extends GenericWebComponent{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(this.constructor.generateInnerStyle()),this.hook=this.constructor.generateInnerDomStructure(),this.shadowRoot.appendChild(this.hook)}static get gridRolesArray(){return["branding","title","description","thumbnail","cta"]}static generateInnerDomStructure(){const e=document.createElement("div");return e.classList.add("grid-container"),GenericGridComponent.gridRolesArray.forEach(t=>{const r=document.createElement("div");r.setAttribute("grid-role",t);const i=document.createElement("slot");i.setAttribute("name",t),r.appendChild(i),e.appendChild(r)}),e}static generateInnerStyle(){const e=document.createElement("style");return e.innerHTML=`a, a:link { text-decoration: none; outline: none; }.grid-container { display: grid; gap: 5px; grid-template: "branding cta" "thumbnail thumbnail" "title title" "description description"; grid-template-columns: minmax(0, 1fr); }div[grid-role=cta] { grid-area: cta; display: flex; }div[grid-role=branding] { grid-area: branding; }div[grid-role=title] { grid-area: title; }div[grid-role=description] { grid-area: description; }div[grid-role=thumbnail] { grid-area: thumbnail; }`,e}setWrapperLink(e){const{hook:t}=this;this.shadowRoot.insertBefore(e,t),e.appendChild(t),this.hook=e}}class TblAppInstallGrid extends GenericGridComponent{static generateInnerDomStructure(){const e=super.generateInnerDomStructure();return e.classList.add("app-install"),e}static generateInnerStyle(){const e=super.generateInnerStyle(),t=document.createDocumentFragment();t.appendChild(e);const r=document.createElement("style");return r.innerHTML=`:host([version="2"]) .app-install { grid-template: "thumbnail thumbnail" "title title" "description description" "branding cta"; grid-template-columns: minmax(0, 1fr); }`,t.appendChild(r),t}}let newCtaManagerInstance;GenericGridComponent.registerElement({name:"tbl-app-install-grid",component:TblAppInstallGrid});class NewCtaManager{constructor({rbox:e}={}){this.globalConfig=[],this.styleSettings=null,this.metricReporter=metricReporter$1.sub("New_CTA"),this.trcImpl=e.trc,this.createInitialStyleSettings({rbox:e}),this.subscribeToOnRenderEvent()}static get reportTypes(){return{event:"event",error:"error",filter:"filter",report:"report"}}static get reportNameToReportObjMap(){return{disableByCp:{eventType:NewCtaManager.reportTypes.event,eventName:"disabled_by_cp"},hasCta:{eventType:NewCtaManager.reportTypes.event,eventName:"has_cta"},available:{eventType:NewCtaManager.reportTypes.event,eventName:"available"},visible:{eventType:NewCtaManager.reportTypes.event,eventName:"visible"},ctaButtonClicked:{eventType:NewCtaManager.reportTypes.event,eventName:"cta_button_clicked"},appInstallRendered:{eventType:NewCtaManager.reportTypes.event,eventName:"cta_rendered"},appInstallLabelBoxAndCtaRendered:{eventType:NewCtaManager.reportTypes.event,eventName:"label_box_and_cta_rendered"},ctaBottomCut:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_cta_bottom_cut"},brandingWidthThreshold:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_branding_width_threshold"},brandingPositionAbsolute:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_branding_absolute"},brandingOverlappingCta:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_branding_overlapping"},brandingMissingPostRender:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_branding_missing"},footerDisclosure:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_footer_disclosure"},disclosureEllipsis:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_disclosure_ellipsis"},noBranding:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_no_branding"},ctaAlignmentOverflow:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_alignment_overflow"},appInstallNoSpace:{eventType:NewCtaManager.reportTypes.filter,eventName:"post_render_app_install_no_space"},ctaAlignmentOverflowFix:{eventType:NewCtaManager.reportTypes.report,eventName:"alignment_overflow_fix"},ctaAlignmentPaddingFix:{eventType:NewCtaManager.reportTypes.report,eventName:"alignment_padding_fix"},itemContainerHidden:{eventType:NewCtaManager.reportTypes.report,eventName:"item_container_hidden"},noItemId:{eventType:NewCtaManager.reportTypes.error,eventName:"no_item_id"}}}static getInstance(){return newCtaManagerInstance}static injectStyle(){NewCtaManager.styleInjected||(TRC.dom.injectStyle(`.videoCube a.video-cta-style { width: 100%; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: center; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.video-label-box-cta-non-ie { justify-content: space-between; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.app-install-full-grid.app-install-full-grid { align-items: center; align-content: center; display: grid; grid-template-columns: 8fr 2fr; min-width: 100%; width: 100%; padding: 0; margin: 0 0 8px; direction: inherit; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.app-install-full-grid.app-install-full-grid .video-cta-href { min-width: 65px; max-height: 36px; min-height: 36px; height: 36px; margin: 0; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.app-install-full-grid.app-install-full-grid.app-install-bottom { row-gap: 3px; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.app-install-full-grid.app-install-full-grid.app-install-bottom .video-title { grid-column: 1 / -1; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.app-install-full-grid.app-install-full-grid.app-install-bottom .video-description { grid-column: 1 / -1; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.app-install-full-grid.app-install-full-grid .video-cta-button { min-height: 100%; height: 100%; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.app-install-full-grid.app-install-full-grid .video-branding-flex-cta-item { white-space: normal; overflow: visible; text-overflow: clip; padding: 0; border: 0; margin: 0; display: flex; height: 100%; min-height: 100%; direction: inherit; } .videoCube a.video-cta-style span.video-label-box.video-label-box-cta.app-install-full-grid.app-install-full-grid .video-branding-flex-cta-item::after { display: none; } .videoCube a.video-cta-style span.video-label-flex-cta-item { flex-basis: 100%; } .videoCube a.video-cta-style span.video-branding-flex-cta-item { margin-top: 1px; flex-grow: 1; flex-basis: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.videoCube a.video-cta-href { display: inline-block; margin-top: 1px; margin-inline-start: 2px; padding: 0; max-width: 100%; min-width: 72px; min-width: calc(min(100%, 72px)); bottom: 0; vertical-align: top; position: relative; box-sizing: content-box; flex-shrink: 0; font-size: 10px; line-height: 13.2px; } .videoCube a.video-cta-href button.video-cta-button { margin: 0; height: 24px; font-size: 10px; line-height: 13.2px; border-radius: 4px; border: 1px solid; background-color: inherit; border-color: #999999; text-transform: none; letter-spacing: normal; box-sizing: border-box; font-weight: 400; cursor: pointer; outline: none; font-family: Helvetica; padding: 1px 4px; width: 100%; min-width: 1px; opacity: 1; box-shadow: none; user-select: none; transition: none; text-decoration: none; transform: none; } .videoCube a.video-cta-href button.video-cta-button:hover { color: inherit; border-color: inherit; background-color: inherit; letter-spacing: normal; }tbl-app-install-grid .video-cta-href.video-cta-href.video-cta-href { padding: 0; } tbl-app-install-grid .video-cta-href.video-cta-href.video-cta-href, tbl-app-install-grid .video-cta-href.video-cta-href.video-cta-href .video-cta-button { min-width: 100%; min-height: 36px; max-width: 100%; height: 36px; margin: 0; } tbl-app-install-grid .video-cta-href.video-cta-href.video-cta-href .video-cta-button { padding: 0 5px; white-space: nowrap; }`,null),NewCtaManager.styleInjected=!0)}static initialize({rbox:e,itemContainer:t}={}){try{const r=NewCtaManager.getItemId(t);if(!TRC.util.isPercentEnabled(e.trc.global,"enable-cta-component"))return!1;if(NewCtaManager.blockedOnPubConfig)return!1;if(!newCtaManagerInstance){const t=NewCtaManager.getPubConfigOverrideFromRboxResponse({configAttribute:"enable-call-to-action-creative-component",rbox:e});if(!t||"true"!==t)return NewCtaManager.blockedOnPubConfig=!0,!1;NewCtaManager.injectStyle(),newCtaManagerInstance=new NewCtaManager({rbox:e})}if(newCtaManagerInstance.trcImpl=e.trc,!e.trc.getProperty(e.mode_name,"ctaWidget"))return newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.disableByCp,{itemId:r})),!1;if(!t.video_data["cta-text"])return!1;newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.hasCta,{itemId:r}));const i=NewCtaManager.getFilterOutItemForCTAReason({rbox:e,itemContainer:t});return i?(newCtaManagerInstance.reportMetrics({eventType:NewCtaManager.reportTypes.filter,eventName:i,itemId:r}),!1):newCtaManagerInstance.createCtaButton({itemContainer:t})}catch(e){if(__trcError("NewCtaManager error",e),!newCtaManagerInstance)return;newCtaManagerInstance.reportMetrics({eventType:NewCtaManager.reportTypes.error,eventName:`initialize error${e}`,itemId:NewCtaManager.getItemId(t)})}}static getItemId(e){const t=e.video_data,r=40;return(t.id||t["item-id"]||"").slice(0,r)}static reportIfBrandingCausingProblems({branding:e,cta:t,itemContainer:r,itemId:i,additionalData:o}={}){let n;if(e.offsetWidth){const r=e.parentNode;if(!r||!r.offsetWidth||e.parentNode!==t.parentNode)return!1;t.offsetWidth+e.offsetWidth>r.offsetWidth&&(n=NewCtaManager.reportNameToReportObjMap.brandingOverlappingCta)}else n=NewCtaManager.reportNameToReportObjMap.brandingMissingPostRender;return!!n&&(newCtaManagerInstance.reportMetrics(TRC.util.merge({},n,{itemId:i,additionalData:o})),NewCtaManager.removeCtaFromDom({ctaDomElement:t,itemContainer:r}),!0)}static checkForCtaProblems({rbox:e,itemContainer:t}={}){const r=NewCtaManager.getItemId(t);try{const i=t.ctaInstance.getDomElement(),o={mode:e.mode_name,itemIndex:t.video_data.itemIndex};if(t.gridComponent instanceof TblAppInstallGrid){const e=t.querySelector(".app-install-branding-wrapper");return void(e.clientWidth<e.scrollWidth&&(newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.appInstallNoSpace,{itemId:r,additionalData:o})),NewCtaManager.removeCtaFromDom({ctaDomElement:i,itemContainer:t})))}const n=t.querySelector(".video-label-box .branding");if(!n)return newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.noBranding,{itemId:r,additionalData:o})),void NewCtaManager.removeCtaFromDom({ctaDomElement:i,itemContainer:t});if(t.rbox.footer&&t.rbox.footer instanceof Element){const e=NewCtaManager.getComputedStyleProp({element:t.rbox.footer,propertyName:"margin"});if(e<0&&t.video_data.itemIndex===t.rbox.boxes.length-1)return newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.footerDisclosure,{itemId:r,additionalData:o})),void NewCtaManager.removeCtaFromDom({ctaDomElement:i,itemContainer:t})}const a=e.trc.getProperty(e.mode_name,"disclosure-link-text-sponsored",e.propertiesOverride),s=t.querySelector(".branding-inner")||n;if(a&&s){const e=30,n=s.offsetWidth<s.scrollWidth,a=s.offsetWidth<e;if(n&&a)return newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.brandingWidthThreshold,{itemId:r,additionalData:o})),void NewCtaManager.removeCtaFromDom({ctaDomElement:i,itemContainer:t})}const l=NewCtaManager.getComputedStyleProp({element:n,propertyName:"position"});if(l&&"absolute"===l)return newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.brandingPositionAbsolute,{itemId:r,additionalData:o})),void NewCtaManager.removeCtaFromDom({ctaDomElement:i,itemContainer:t});const c=i.offsetTop-n.offsetTop,d=5;if(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth){if(NewCtaManager.reportIfBrandingCausingProblems({branding:n,cta:i,itemContainer:t,itemId:r,additionalData:o}))return;if(!(c>0))return newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.ctaAlignmentOverflow,{itemId:r,additionalData:o})),void NewCtaManager.removeCtaFromDom({ctaDomElement:i,itemContainer:t});i.style.marginTop=`-${2*c}px`,newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.ctaAlignmentOverflowFix,{itemId:r,additionalData:o}))}else if(c>d){if(NewCtaManager.reportIfBrandingCausingProblems({branding:n,cta:i,itemContainer:t,itemId:r,additionalData:o}))return;i.style.marginTop=`-${c}px`,newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.ctaAlignmentPaddingFix,{itemId:r,additionalData:o}))}if(i.offsetTop+i.offsetHeight>t.offsetHeight)return newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.ctaBottomCut,{itemId:r,additionalData:o})),void NewCtaManager.removeCtaFromDom({ctaDomElement:i,itemContainer:t});window.setTimeout(()=>{if(!i.parentNode||!n)return;const e=NewCtaManager.getComputedStyleProp({element:n,propertyName:"display"}),a=t.querySelector(".link-disclosure");if("flex"!==e&&s&&n&&n.scrollWidth>n.offsetWidth){let e=!1;if(a)e=!0;else{const t=s&&window.getComputedStyle(s,"::after").content;if(t&&"none"!==t)try{e=!!JSON.parse(t||"").trim()}catch(e){}}e&&(newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.disclosureEllipsis,{itemId:r,additionalData:o})),NewCtaManager.removeCtaFromDom({ctaDomElement:i,itemContainer:t}))}},0);const p={cta:i,branding:n};Object.keys(p).forEach(e=>{const t=p[e];if(!t)return;const i=NewCtaManager.getComputedStyleProp({element:t,propertyName:"order"});i&&parseInt(i,10)&&newCtaManagerInstance.reportMetrics({eventType:NewCtaManager.reportTypes.report,eventName:`publisher_order_${e}`,itemId:r})})}catch(e){newCtaManagerInstance.reportMetrics({eventType:NewCtaManager.reportTypes.error,eventName:`checkForCtaProblems_${e}`,itemId:r})}}static removeCtaFromDom({ctaDomElement:e,itemContainer:t}={}){if(!e.parentNode)return;e.parentNode.removeChild(e);const r=NewCtaManager.getVideoLabelBoxLink(t);r&&"true"!==t.video_data["is-app-install"]&&(r.classList.remove("video-cta-style"),r.classList.add("video-cta-style-removed"))}static getFilterOutItemForCTAReason({rbox:e,itemContainer:t}){return NewCtaManager.isNextUp(e)||(TRC.util.isPercentEnabled(e.trc.global,"cta-ignore-detail-order")?null:NewCtaManager.isDetailOrderBlocked(t))||NewCtaManager.hasLink(t)||NewCtaManager.isHeroWidget(t)||NewCtaManager.isStoryWidget(e)||NewCtaManager.areVideoLabelBoxAndBrandingExist(t)||NewCtaManager.isInNetwork(t)}static isNextUp(e){const t=e.options&&e.options.trcResponse&&!!e.options.trcResponse.nup;return t?"next_up":null}static isDetailOrderBlocked(e){const t=e.detail_order;return t&&t.length&&"branding"===t[0]?"item_branding_before_title":null}static hasLink(e){if(e.gridComponent instanceof TblAppInstallGrid)return e.gridComponent.hook?void 0:"no_link_grid_component";const t=e.link;return t?null:"no_link"}static isHeroWidget(e){return e.rbox.mode_name&&e.rbox.mode_name.indexOf("hero")>-1?"item_in_hero_widget":null}static isStoryWidget(e){return TRC.RecommendationReel.shouldInitRecommendationReel(e)?"item_in_reco_reel_story_widget":null}static areVideoLabelBoxAndBrandingExist(e){if(e.gridComponent instanceof TblAppInstallGrid)return;const t=e.querySelector(".video-label-box");if(!t)return"no_video_label_box";const r=t.querySelector(".branding");return r?void 0:"no_branding"}static isInNetwork(e){return e.video_data["is-in-network"]?"in_network":null}static getComputedStyleProp({element:e,propertyName:t,defaultValue:r}={}){const i=window.getComputedStyle(e)[t];if(!i)return r||null;const o=parseInt(i,10);return isNaN(o)?i:o}static getPubConfigOverrideFromRboxResponse({configAttribute:e,rbox:t}={}){const r=t&&t.globalTrcResponseJSON&&t.globalTrcResponseJSON.dcga&&t.globalTrcResponseJSON.dcga.pubConfigOverride;return r&&r[e]}static addCtaToVideoLabelBox({ctaDomElement:e,videoLabelBox:t,branding:r,itemContainer:i}={}){const o=NewCtaManager.getVideoLabelBoxLink(i);if(o&&(o.classList.add("video-cta-style"),i.rbox.isFeedCard||o.classList.add("non-feed-cta-item")),t.classList.add("video-label-box-cta"),"true"===i.video_data["is-app-install"]){t.classList.add("app-install-full-grid");const e=i.rbox.trc&&i.rbox.trc.getProperty(i.rbox.mode_name,"app-install-version",i.rbox.propertiesOverride);"2"===e&&t.classList.add("app-install-bottom")}TRC.Browser.ie||t.classList.add("video-label-box-cta-non-ie");const n=t.querySelectorAll(".video-label");if(n)for(let a=0;a<n.length;a++){const e=n[a];e.classList.add("video-label-flex-cta-item")}r.classList.add("video-branding-flex-cta-item"),NewCtaManager.isDetailOrderBlocked(i)?t.insertBefore(e,r.nextSibling):t.appendChild(e)}static getVideoLabelBoxLink(e){const t=e.querySelector(".item-label-href"),r=!t||!e.link||e.link===t;return r?e.link:t}get shouldReportMetrics(){return TRC.util.isPercentEnabled(this.trcImpl.global,"report-cta-metrics")}get shouldReportAppInstall(){return TRC.util.isPercentEnabled(this.trcImpl.global,"app-install-report")}reportMetrics({eventType:e="event",eventName:t="",itemId:r="",additionalData:i}={}){if(!this.shouldReportMetrics)return;const o={eventName:`${e}-${t}`,itemId:r};i&&(o.additionalData=i),window.setTimeout(()=>{this.metricReporter.logUsage({extraData:o,file:"new-cta-manager"}),this.metricReporter.sendRboxMetricsEvent({eventName:o.eventName,value:"1",type:"counter"})},0)}subscribeToOnRenderEvent(){TRC.eventDelegator.subscribe("onrender",e=>{let t,r;if(!(t=this.trcImpl.boxes[e.container._trcRboxId]))try{const r=e.container.querySelectorAll("[data-item-id]");if((t=r[0].rbox).ctaPostRenderFix)return;t.boxes=r,t.ctaPostRenderFix=!0}catch(e){return}t&&t.boxes.forEach(e=>{e.ctaInstance&&(e.offsetWidth?(r||(r=this.adjustColorsAfterRender({rbox:t,itemContainer:e})),r&&e.ctaInstance.setCtaButtonStyle(r),NewCtaManager.checkForCtaProblems({rbox:t,itemContainer:e}),delete e.ctaInstance):newCtaManagerInstance.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.itemContainerHidden,{itemId:NewCtaManager.getItemId(e),additionalData:{mode:t.mode_name,itemIndex:e.video_data.itemIndex}})))})})}subscribeToVisibilityEvent({ctaDomElement:e,itemContainer:t}={}){if(!this.shouldReportMetrics)return!1;const r=TRC.intersections.isInViewPort({targetElement:t,enableDelayedVisibilityCheck:!0,onEnter:()=>{r&&(TRC.intersections.unobserve(r),e.parentNode&&this.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.visible,{itemId:NewCtaManager.getItemId(t)})))}})}getPubConfigOverride({configAttribute:e,rbox:t,isGlobal:r}={}){const i=NewCtaManager.getPubConfigOverrideFromRboxResponse({configAttribute:e,rbox:t});return null!=i&&r&&(this.globalConfig[e]=i),null!=i?i:this.globalConfig[e]}createInitialStyleSettings({rbox:e}={}){const t={borderColor:this.getPubConfigOverride({configAttribute:"border-color",rbox:e,isGlobal:!0}),color:this.getPubConfigOverride({configAttribute:"title-color",rbox:e,isGlobal:!0}),fontSize:this.getPubConfigOverride({configAttribute:"cta-font-size",rbox:e,isGlobal:!0}),fontWeight:this.getPubConfigOverride({configAttribute:"font-weight",rbox:e,isGlobal:!0})};this.styleSettings=t}reportAppInstall({itemId:e}={}){if(!this.shouldReportAppInstall)return;const t=metricReporter$1.sub("app_install"),r={metricReporter:t,shouldReportMetrics:!0};this.reportMetrics.call(r,TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.appInstallRendered,{itemId:e})),this.reportMetrics.call(r,TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.appInstallLabelBoxAndCtaRendered,{itemId:e}))}createCtaButtonForAppInstall({itemContainer:e}={}){const t={link:`${e.gridComponent.hook.logger_url}&cta=true`,label:TRC.util.getHtmlDecodeText(e.video_data["cta-text"])},r=new NewCta({styleSettings:this.styleSettings,data:t}),i=r.getDomElement();i.setAttribute("slot","cta"),e.gridComponent.appendChild(i);const o=NewCtaManager.getItemId(e);return e.ctaInstance=r,this.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.available,{itemId:o})),i.onclick=(()=>{this.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.ctaButtonClicked,{itemId:o}))}),this.subscribeToVisibilityEvent({ctaDomElement:r.getDomElement(),itemContainer:e}),this.reportAppInstall({itemId:o}),r}createCtaButton({itemContainer:e}={}){if(e.gridComponent instanceof TblAppInstallGrid)return this.createCtaButtonForAppInstall({itemContainer:e});const t=NewCtaManager.getItemId(e),r=e.querySelector(".video-label-box"),i=r.querySelector(".branding"),o={link:`${e.link.logger_url}&cta=true`,label:TRC.util.getHtmlDecodeText(e.video_data["cta-text"])},n=new NewCta({styleSettings:this.styleSettings,data:o}),a=n.getDomElement();return NewCtaManager.addCtaToVideoLabelBox({ctaDomElement:a,videoLabelBox:r,branding:i,itemContainer:e}),e.ctaInstance=n,this.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.available,{itemId:t})),a.onclick=(()=>{this.reportMetrics(TRC.util.merge({},NewCtaManager.reportNameToReportObjMap.ctaButtonClicked,{itemId:t}))}),this.subscribeToVisibilityEvent({ctaDomElement:n.getDomElement(),itemContainer:e}),"true"===e.video_data["is-app-install"]&&this.reportAppInstall({itemId:t}),n}adjustColorsAfterRender({rbox:e,itemContainer:t}={}){try{const r=t.gridComponent instanceof TblAppInstallGrid?t.querySelector(".app-install-branding-title"):t.querySelector(".video-label-box .branding");if(!r)return;const i={"font-family":NewCtaManager.getComputedStyleProp({element:r,propertyName:"font-family"})};if(this.getPubConfigOverride({configAttribute:"inherit-title-color",rbox:e,isGlobal:!0})){const e=t.querySelector(".video-title");if(!e)return i;i.color=NewCtaManager.getComputedStyleProp({element:e,propertyName:"color"}),i["border-color"]=NewCtaManager.getComputedStyleProp({element:e,propertyName:"border-color"})}else this.getPubConfigOverride({configAttribute:"title-color",rbox:e,isGlobal:!0})||(i.color=NewCtaManager.getComputedStyleProp({element:r,propertyName:"color"}));return i}catch(e){this.reportMetrics({eventType:NewCtaManager.reportTypes.error,eventName:`adjust_colors_render_${e}`,itemId:NewCtaManager.getItemId(t)})}}}const constants={FETCH_PREFIX:"https://images.taboola.com/taboola/image/fetch/"},filename="trcrbox-ui-image-utils",metricReporter=metricReporter$1.sub("image_utils"),computeImageOptimizationConfig=({trcRBoxUI:e,imgContDim:t,video:r})=>{const i={};try{const o=e.trc;i.allowedRatiosSorted=o.getSortedCloudinaryRatios(),i.imageMinRatio=i.allowedRatiosSorted[0],i.imageSizeFactor=e.getImageSizeFactor(),i.imageMinWidth=o.getProperty(e.mode_name,"image-min-width",e.propertiesOverride)||110,i.imageMaxWidth=o.getProperty(e.mode_name,"image-max-dimension",e.propertiesOverride)||1500,i.imageSizeRound=parseInt(e.customImageSizeRound,10)||o.getProperty(e.mode_name,"image-size-round",e.propertiesOverride)||20,i.imageMaxRatio=o.getProperty(e.mode_name,"image-max-ratio",e.propertiesOverride)||i.allowedRatiosSorted[i.allowedRatiosSorted.length-1],i.computedWidth=Math.min(Math.ceil(Math.max(t.width*i.imageSizeFactor,i.imageMinWidth)/i.imageSizeRound)*i.imageSizeRound,i.imageMaxWidth),i.computedRatio=Math.max(Math.min(e.getAllowedRatio(t),i.imageMaxRatio),i.imageMinRatio),i.computedHeight=Math.ceil(i.computedWidth*i.computedRatio)}catch(t){const i=buildAReporterCallback({trcRBoxUI:e,video:r});i({eventName:reportEventMap.computeImageOptimizationConfigError,error:t.toString()})}return i},parseCroppingPrefix=({trcRBoxUI:e,video:t,imageOptimizationConfig:r})=>{const i=buildAReporterCallback({trcRBoxUI:e,video:t});try{const o=e.trc;if(!t.cropping||!TRC.util.isPercentEnabled(e.trc.global,"image-cropping-active"))return"";const n=o.global["image-cropping-ratios-list"];if(!n||!n.length)return i({eventName:reportEventMap.parseCroppingPrefix.noRatioList,length:n&&n.length}),"";const a=n.map(([e,t])=>Math.abs(t/e-r.computedRatio)),s=a.reduce((e,t,r)=>a[e]>t?r:e,0),l=n[s];if(!l)return"";const c=l[1]/l[0];let{crop:d}=JSON.parse(t.cropping.replace(/&#34;/g,'"'));d=Array.isArray(d)?d:Object.values(d);let p=null;for(const e in d){const t=d[e];if(t.ratio&&c===t.ratio.h/t.ratio.w){p=t;break}}if(!p)return i({eventName:reportEventMap.parseCroppingPrefix.NoMatch}),"";i({eventName:reportEventMap.parseCroppingPrefix.Match});const{area:h}=p,u=+(1/c).toFixed(4),m=["w","x","y"].map(e=>`${e}_${h[e]}`),g=["c_crop","f_jpg","q_auto","e_sharpen",`ar_${u}`].concat(m),b=`${constants.FETCH_PREFIX}${g.join(encodeURIComponent(","))}/`;return b}catch(e){i({eventName:reportEventMap.parseCroppingPrefix.Error,error:e.toString()})}return""};var imageUtils={constants:constants,computeImageOptimizationConfig:computeImageOptimizationConfig,parseCroppingPrefix:parseCroppingPrefix};const reportEventMap={computeImageOptimizationConfigError:"error-compute_image_optimization_dictionary",parseCroppingPrefix:{NoMatch:"event-cropping_did_not_matched",Match:"event-cropping_matched",Error:"error-parse_cropping_data",noRatioList:"error-no_ratio_list"}},buildAReporterCallback=({trcRBoxUI:e,video:t})=>{const r="image-cropping-report";if(!TRC.util.isPercentEnabled(e.trc.global,r))return()=>{};const i=((t=t||{}).id||t["item-id"]||"").slice(0,40),o=!!t.cropping,n={itemId:i,isCropping:o};return e=>{e=e||{};const{eventName:t}=e;setTimeout(()=>{metricReporter.logUsage({file:filename,extraData:TRC.util.merge({},e,n,{eventName:t})}),metricReporter.sendRboxMetricsEvent({eventName:t,value:"1",type:"counter"})},0)}},responsiveReporter=metricReporter$1.sub("responsive-utils"),placementIdPostRenderCellsMap={};let fixResponsiveWidgetResizeHandler;const checkForCssPseudoSupport=e=>{const t=document.createElement("div");let r=!1;try{t.querySelector(e),r=!0}catch(e){}return r},pseudoSupportMap={nthChildOf:checkForCssPseudoSupport(":nth-child(1 of .videoCube)")},reportingFlag="responsive-utils-report",responsiveReportEventMap={preFixingResponsiveWidget:"event-pre_fixing_responsive_widget",fixingResponsiveWidget:`event-fixing_responsive_widget`,placementRenderedOk:`event-placement_rendered_ok`,placementLayoutShift:`event-placement_layout_shift`,checkingResponsiveWidget:"event-checking_responsive_widget",checkingOverflowingCards:"event-checking_overflowing_cards",overflowingCardsFound:"event-overflowing_cards_found",responsiveFixError:"error-responsive_fix_error",checkingResponsiveError:`error-checking_responsive_error`},sendEvent=({rbox:e,dataObj:t,eventName:r,id:i=""}={})=>{try{if(!TRC.util.isPercentEnabled(e.trc.global,reportingFlag))return;const o=TRC.util.merge({},t,{mode:e.mode,publisher:e.publisher,eventName:r,id:i});responsiveReporter.logUsage({file:"responsive-utils",extraData:o}),responsiveReporter.sendRboxMetricsEvent({eventName:r,value:"1",type:"counter"})}catch(e){}},listenToResizeEventIfFirstTime=()=>{if(!fixResponsiveWidgetResizeHandler){fixResponsiveWidgetResizeHandler=!0;const e=500;window.TRC.dom.on(window,"resize",TRC.util.debounce(()=>{TRCImpl.boxes&&Object.keys(TRCImpl.boxes).forEach(e=>{const t=TRCImpl.boxes[e];t&&fixResponsiveWidget({rbox:t,isTriggeredByResize:!0})})},e,!1))}},handleResponsiveWidget=({rbox:e}={})=>{TRC&&TRC.util&&(fixResponsiveWidget({rbox:e}),checkResponsiveWidget({rbox:e}),checkOverflowingCards({rbox:e}))},checkOverflowingCards=({rbox:e}={})=>{try{if(!TRC.util.isPercentEnabled(e.trc.global,reportingFlag))return;const t=TRC.Fader();t(()=>{e.boxes.forEach(t=>{t.offsetWidth&&(sendEvent({rbox:e,eventName:responsiveReportEventMap.checkingOverflowingCards}),t.scrollHeight>t.clientHeight+1&&sendEvent({rbox:e,eventName:responsiveReportEventMap.overflowingCardsFound}))})})}catch(e){}},fixResponsiveWidget=({rbox:e,isTriggeredByResize:t=!1}={})=>{if(!TRC.util.isPercentEnabled(e.trc.global,"enable-responsive-float-fix"))return!1;try{const r=e.trc.getProperty(e.mode_name,"responsive-rules",e.propertiesOverride);if(!r)return!1;if(!e.boxes.length)return!1;sendEvent({rbox:e,dataObj:{isTriggeredByResize:t},eventName:responsiveReportEventMap.preFixingResponsiveWidget}),listenToResizeEventIfFirstTime();const i=e.getEffectiveResponsiveRule();if(i&&(1===i.cells||1===i.rows))return!1;const o=i?i.cells:-1,n=e.boxes[0].parentNode?Math.floor(e.boxes[0].parentNode.offsetWidth):null;if(!n)return!1;const a=Math.floor(n/e.boxes[0].getBoundingClientRect().width),s=e.boxes[0].offsetWidth,l=e.boxes.length>1&&s&&e.boxes[1].offsetWidth&&s>=2*e.boxes[1].offsetWidth,c=!placementIdPostRenderCellsMap[e.id]&&o===a,d=placementIdPostRenderCellsMap[e.id]===a;if(pseudoSupportMap.nthChildOf&&!l&&a&&(c||d))return!1;let p=o;const h=t&&!l&&!c&&!d&&placementIdPostRenderCellsMap[e.id];h&&(p=placementIdPostRenderCellsMap[e.id]),placementIdPostRenderCellsMap[e.id]=a;let u=!0;return e.boxes.forEach(e=>{e.offsetWidth&&s!==e.offsetWidth&&(u=!1)}),e.boxes.filter(e=>TRC.dom.containsClass(e,"videoCube")).forEach((e,t)=>{t&&(u&&t%a==0?e.style.clear="both":t%p==0&&(e.style.clear="none"))}),sendEvent({rbox:e,dataObj:{areAllCardsWithSameWidth:u,isTriggeredByResize:t},eventName:responsiveReportEventMap.fixingResponsiveWidget}),!0}catch(r){return sendEvent({rbox:e,dataObj:{isTriggeredByResize:t},eventName:`${responsiveReportEventMap.responsiveFixError}_${r}`}),!1}},getFloatLayoutShiftElementObj=({floatDirection:e,previousRow:t,currentItem:r}={})=>{let i,o;if(t.length)for(let n=0;n<t.length;n++){const a="left"===e?t[n].offsetLeft>=r.offsetLeft:t[n].offsetLeft<=r.offsetLeft;if(a){const e={};t.forEach(t=>{t.offsetHeight&&(e[t.offsetHeight]=e[t.offsetHeight]||[],e[t.offsetHeight].push(t))});const r=Object.keys(e);if(t.length>2&&2===r.length&&1===e[r[0]].length&&e[r[0]][0]===t[n]?i=t[n]:(1===e[r[r.length-1]].length?[i]=e[r[r.length-1]]:i=t[n-1]||t[n],o=!0),!i.offsetHeight)return null}}return{rootCauseElement:i,isCardBiggerThanOthers:o}},checkResponsiveWidget=({rbox:e}={})=>{if(!TRC.util.isPercentEnabled(e.trc.global,reportingFlag))return;const t=TRC.Fader();t(()=>{try{const t=e.boxes;if(t.length<=1)return;const r=window.getComputedStyle(t[0]).float;if("none"===r)return;if(!t[0].offsetWidth||!t[0].parentElement.offsetWidth)return;if(t[0].offsetWidth/window.innerWidth>.8||t[0].offsetWidth/t[0].parentElement.offsetWidth>.8)return;sendEvent({rbox:e,eventName:responsiveReportEventMap.checkingResponsiveWidget});let i=[],o=[],n=!1;o.push(t[0]);for(let a=1;a<t.length;a++){const s=t[a-1],l=t[a];if(!n&&l.querySelector(".video-cta-button")&&(n=!0),s.offsetTop!==l.offsetTop){const t=o[0];if(t.offsetHeight+t.offsetTop>l.offsetTop&&t.offsetWidth>2*l.offsetWidth)break;let a;if(i=o.slice(),o=[],"left"===r&&l.offsetLeft>=t.offsetLeft+t.offsetWidth?a=getFloatLayoutShiftElementObj({floatDirection:r,previousRow:i,currentItem:l}):"right"===r&&l.offsetLeft<t.offsetLeft&&(a=getFloatLayoutShiftElementObj({floatDirection:r,previousRow:i,currentItem:l})),a){const{rootCauseElement:t}=a,r=t&&t.video_data["item-id"]?t.video_data["item-id"].slice(0,40):"",i=t&&t.querySelector(".video-cta-button");return void sendEvent({rbox:e,dataObj:{rootCauseElement:t,isBiggerThanOthers:a.isCardBiggerThanOthers,hasCta:n,isBrokenBecauseOfCta:i,id:r,isBroken:!0},eventName:responsiveReportEventMap.placementLayoutShift})}}o.length&&l.offsetLeft===o[0].offsetLeft&&(i=o.slice(),o=[]),o.push(l)}sendEvent({rbox:e,dataObj:{hasCta:n,isBroken:!1},eventName:responsiveReportEventMap.placementRenderedOk})}catch(t){sendEvent({rbox:e,eventName:`${responsiveReportEventMap.checkingResponsiveError}_${t}`})}})};var responsiveUtils_es6={handleResponsiveWidget:handleResponsiveWidget};class BeaconUtils{static sendBeaconRequest(e,t){return"function"==typeof window.navigator.sendBeacon&&window.navigator.sendBeacon(e,TRC.TRCLogger.formatBeaconParams(t))}}!function(e,t){var r="sponsored",i="https://";function o(){return document.createTextNode(" ")}function n(){return document.createTextNode("…")}TRC.implClasses=TRC.implClasses||{},TRC.PVideoLoader=PVideoLoader;var a=TRC.implClasses.TRCRBox=function(e,t,r){return this._id=Math.floor(1e5*Math.random()),this.fixHeight=t.height,this.domain=r.domain,this.origin=e,this.header=!1,this.id="trc_"+this._id,this.response=this.request=null,__trcCopyProps(t,this),this.loaded=!!this.loaded&&this.loaded,this.element=null,this.listContainer=null,this.retryCount=0,this.drawList=!1,this.forceItemType=!1,this.trc=r,this.util=TRC.util,this.timeoutId=null,this.errorHandler="",this.boxes=[],this.recommendationList=null,this.use_cdn=!0===this.trc.getProperty(this.mode_name,"use-cdn-recommendations",this.propertiesOverride),this.postRenderQueue=new TRC["PostRenderQueue"],this.src=null,this.fullEventItemsHash={},this.isCssImportant=this.trc.getProperty(this.mode_name,"use-css-important",this.propertiesOverride),this.publisher=TRC.publisherId,this.smallIOSDevice=this.trc["small-ios-device"]||"iPhone|iPod",this.isSmallIOS=this.smallIOSDevice.indexOf(TRC.Device.deviceType)>=0,this.isFeedCard=t.isFeedCard,this.enableFeedView=t.feedViewConfig||this.trc.global["enable-feed-view"]||!1,this.iosLinkTarget=this.trc.getProperty(this.mode_name,"ios-sc-link-target-mode",this.propertiesOverride)||this.trc.global["ios-sc-link-target"],this.defaultLinkTarget=this.trc.global["link-target-conf"]||{NAV:"_self",NT:"_blank",SP:"_blank"},this.linkTargetConf=this.isSmallIOS&&this.iosLinkTarget?this.iosLinkTarget:this.trc["link-target-conf"],this.ntHandlerEnabled=this.trc.global["publisher-onclick-nt-enabled"],this.organicRedirParam=this.trc.global["organic-redirect-param"],this.shiftRedirOnclick=this.trc.global["shift-redir-onclick"],this.useRedirect=TRC.util.isAmp(TRC)?this.trc.global["enable-organic-redirect-on-amp"]:this.trc.global["enable-organic-redirect"],this.useRedirectOnLink=this.trc.global["use-redirect-on-link"],this.adcItemTypes=this.trc.global["adchoice-item-types"]||{"is-organic":!1,"is-in-network":!1,"is-syndicated":!0,"is-native":!0},this.sendClickPiggyBack=this.trc.global["send-pb-in-click"],this.imagesAltUrls=this.trc.global["images-alt-urls"]||[],this.disableResponsiveCSSReuse=this.trc.global["disable-responsive-css-reuse"],this.disableViolationMeasurementOnPaywall=this.trc.global["disable-violation-measurement-paywall"]||!1,this.disableViolationSelectorOnPaywall=this.trc.global["paywall-violation-disabled-selector"]||null,this.rvVisibleTimeout=this.trc.global["display-rv-visible-timeout"]||null,this.options=t,this.apiData=[],this.lazyLoadImageObserversIds=[],this.isMultiWidget=t.trcResponse&&t.trcResponse.multiWidget,this.multiWidgetModeLevelData=this.isMultiWidget&&t.multiWidgetModeLevelData,TRC.util.isPercentEnabled(this.trc.global,"custom-image-size-round-percent")&&(this.customImageSizeRound=this.trc.global["custom-image-size-round-value"]),this},s=imageUtils.constants.FETCH_PREFIX,l="h_{h},w_{w}",c=s+"f_jpg%2Cq_80%2Ch_{h}%2Cw_{w}%2Cc_fill%2Cg_faces%2Ce_sharpen/",d=s+"fl_lossy%2Cf_gif%2Ch_{h}%2Cw_{w}%2Cc_fill%2Cg_faces:auto%2Ce_sharpen/",p=s+"$pw_{w}%2C$ph_{h}/t_tbl-cnd/",h=TRC.PROTOCOL,u,m;a.prototype.DEFAULT_THUMB_RATIO=.8,a.prototype.getImageUrlPrefix=function(){return c},a.prototype.getListId=function(){return this.visible?"rbox-"+this.origin:"rbox-tracking"},a.prototype.getSessionId=function(){return this.response&&this.response.trc?this.response.trc["session-id"]:null},a.prototype.getItemType=function(){return this.forceItemType?this.forceItemType:this.trc.getItemType()},a.prototype.generateHeader=function(e){var t=this.getWidgetToFeedHelper(),r=document.createElement("div"),i=document.createElement("span"),o=this.trc.getProperty(this.mode_name,"header",this.propertiesOverride),n=this.trc.getProperty(this.mode_name,"header-right",this.propertiesOverride),a="No Header"!==n;if(r.id=this.id.replace("trc_","trc_header_"),r.className="trc_rbox_header trc_rbox_border_elm",i.className="trc_rbox_header_span",this.generateHeaderIcon(i),r["ext"]=document.createElement("div"),r["ext"].className="trc_header_ext",r.appendChild(r["ext"]),a)this.generateHeaderPart(i,o,"trc_header_left_column trc_header_left_part"),this.generateHeaderPart(i,n,"trc_header_right_column trc_header_right_part");else{var s="No Header"!==o?o:"";i.insertAdjacentHTML("beforeend",s)}return r["titleBox"]=i,r.appendChild(i),t&&!t.getHeader()?t.addHeaderToFeed(r):e.appendChild(r),r},a.prototype.generateHeaderIcon=function(e){var t,r,i,o=this.trc.getProperty(this.mode_name,"header-icon",this.propertiesOverride)||"NONE";"CUSTOM"===o?i=this.trc.getProperty(this.mode_name,"header-icon-url",this.propertiesOverride):"PUBLISHER_LOGO"===o&&(i=this.trc.getPublisherVersionPropertyWithFallbackToNetwork("publisher-logo")),i&&((r=document.createElement("img")).className="trc_rbox_header_icon_img trc_img",r.src=TRC.URL.prototype.switchProtocol.call(i,h),(t=document.createElement("div")).className="trc_rbox_header_icon_div",t.appendChild(r),e.appendChild(t),e.className+=" trc_rbox_header_icon_span")},a.prototype.generateHeaderPart=function(e,t,r){var i=document.createElement("span");i.className="trc_inner_header "+(r||""),i.insertAdjacentHTML("beforeend",t),e.appendChild(i)},a.prototype.render=function(e){this.element=document.createElement("div"),this.element.id=this.id.replace("trc_","trc_wrapper_"),this.element.className="trc_rbox "+this.mode_name,this.element.style.overflow="hidden",this.element.modeName=this.mode_name,e.appendChild(this.element),this.element.style.display="none",!0===this.trc.getProperty(this.mode_name,"has-expand-animation",this.propertiesOverride)&&new TRC.ExpandAnimationManager(this)},a.prototype.setTargetItemsList=function(e,t,r){if(t)for(var i=0,o=t.length;i<o;i++)e[t[i]["item-id"]]={tii:t[i]["item-id"],tipt:this.getProviderType(t[i]),tit:t[i]["type"],tids:r}},a.prototype.getJsonTargetItemsList=function(e){var t=[],r;for(r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t},a.prototype.getProviderType=function(e,t){return e["is-syndicated"]?t?"sponsored":"SP":e["is-in-network"]?t?"exchange":"NT":e["is-native"]?t?"native":"NAV":t?"organic":"RC"},a.prototype.setApiItemsData=function(e){this.apiData.push({url:e.url,slot:e.itemIndex,id:e.id,type:this.getProviderType(e,!0),title:e.title})},a.prototype.isReadMoreDevice=function(e){for(var t=e.split("|"),r={smart_phone:TRC.dom.isSmartPhone(),tablet:TRC.dom.isTablet(),desktop:TRC.dom.isDesktop()},i=0;i<t.length;i++){if("all"===t[i])return!0;if(r[t[i]])return!0}return!1},a.prototype.getReadMoreConfig=function(){var e=this.trc.getProperty(this.mode_name,"read-more-config",this.propertiesOverride)||{};return e.boxSelector=this.trc.getProperty(this.mode_name,"read-more-box-selector",this.propertiesOverride),e.threshold=this.trc.getProperty(this.mode_name,"read-more-threshold",this.propertiesOverride),e.minimizedSize=this.trc.getProperty(this.mode_name,"read-more-minimized-size",this.propertiesOverride),e.caption=this.trc.getProperty(this.mode_name,"read-more-caption",this.propertiesOverride),e.cutoffType=this.trc.getProperty(this.mode_name,"read-more-cutoff-from-type",this.propertiesOverride),e.anchorSelector=this.trc.getProperty(this.mode_name,"read-more-anchor-selector",this.propertiesOverride),e.lengthFromAnchorElementType=this.trc.getProperty(this.mode_name,"read-more-cutoff-length-type",this.propertiesOverride),e.lengthFromAnchorElement=this.trc.getProperty(this.mode_name,"read-more-cutoff-length-from-anchor-element",this.propertiesOverride),e.modeDevices=this.trc.getProperty(this.mode_name,"read-more-mode-devices",this.propertiesOverride),e},a.prototype.isNoRecommendationsMode=function(){return"rbox-tracking"==this.getListId()||"rbox-only-video"===this.mode_name},a.prototype.calcModeName=function(e,t){var r,i;return TRC.TRCParser.IsBaseModeAndABModeExist(e)?TRC.TRCParser.parseBaseModeAndABModeName(e):(r=TRC.TRCParser.parseBaseModeName(e))?r:(i=TRC.TRCParser.parseTestVariant(e))?(TRC.pConsole(this.mode_name,"info","test variant = "+i),TRC.TRCParser.parseABModeName(t,e)):void 0},a.prototype.loadScriptCallback=function(e,t){this.propertiesOverride=this.getPropertiesOverride(t),this.isProviderIframe=this.trcResponse&&this.trcResponse.hasOwnProperty("ifr")&&this.trcResponse.ifr,this.isDisplayToNative=this.isProviderIframe&&this.trc.shouldRenderBannerAsNative(this),DisplayInSlotManager.isResponseHasDisplayInSlotItem(this.trcResponse)&&(this.displayInSlotManager=new DisplayInSlotManager(this.trcResponse),this.isExistDisplayInSlot=this.displayInSlotManager.isExistDisplayInSlot());var r="TRCRBox.loadScriptCallback"+"(retry="+this.retryCount+")",i=t.trc,o,n=this.response&&this.response.trc["DNT"]&&"TRUE"===this.response.trc["DNT"].toUpperCase(),a=TRC.TRCParser,s,l,c,d,p=this.trc.getProperty(this.mode_name,"thumbnail-position",this.propertiesOverride);if(__trcDebug("Enter "+r),this.abortRequest(),this.utm=this.requestTime&&[this.requestTime,(new Date).getTime()-TRC.utm.start],e&&(this.trc.trcCache.cacheResponse(e,t,TRC.pageManager.state.moreDispatchParams),this.trc.cachedResponses[e]=!0),!this.isValidResponse(i)){__trcError("Exit "+r+": request format error");var h=this.response.feedPlacement||this.placement;return TRC.dispatch("onRboxFlowError",{placement:h}),void TRC.EventsAPI.dispatchNoContent(this.trc.NO_CONTENT.noItems,this.placement,this.isFeedCard)}if(TRC.UserIdMerger.notifyPossibleUserChange(this.trc,TRC.publisherId,i["user-id"],i["session-data"]),i["consent-missing"]||TRC.pageManager.storePublisherValue(TRC.publisherId,"session-data",i["session-data"]),t.trc["DNT"]&&"TRUE"===t.trc["DNT"].toUpperCase()?(TRC.doNotTrack=!0,TRC.pageManager.removeAllKeys(),TRC.pageManager.removeUserId()):TRC.pageManager.storeUserId(i["user-id"],i["consent-missing"]),this.drawList)__trcWarn("Exit "+r+": got another response after already drawing");else{this.response=t,this.isResponseFromCache()&&(this.cachedViewId=this.response.cachedViewId),this.setTargetItemsList(this.fullEventItemsHash,i["video-list"].video,"a"),(c=new TRC.PlacementEventPostData).setFullItemList(this.getJsonTargetItemsList(this.fullEventItemsHash)),d=this.createUtmParam(),void 0!==this.modeGroupOrder&&this.util.merge(d,{mgo:this.modeGroupOrder});var u=TRC.availableEventCoordinator.get(this.trc),m=this.response&&this.response.trc&&u.availableReportedPlacements.indexOf(this.response.trc.placement)>-1;this.isResponsive=this.trc.getProperty(this.mode_name,"mode-is-responsive",this.propertiesOverride),this.recommendationList=this.isMultiWidget?this.multiWidgetRecItems.splice(0,this.getCurrentListSize()):i["video-list"].video||[];var g=this.placement.indexOf("Injected")>-1,b=this.recommendationList.length>0,f,v;if(!this.isNoRecommendationsMode()&&!b)return g||__trcError("Exit "+r+": no items in response - "+this.mode_name),void this.handleNoItemInResponse(i,r,m,d,c);if(this.isProviderIframe||this.isExistDisplayInSlot){if(TRC.listen("available::"+this.placement+this.trc.getItemSignature(this.trcResponse),function(e){var t=this.displayInSlotManager&&this.displayInSlotManager.getDisplayInSlotItemData(),r;if(!1!==(t?t.ifrObj.config:this.trcResponse.config)["send-events"]){if(m||(t?this.displayInSlotManager.sendAvailableEvent(this,d,c):this.sendAvailableEvent(d,c,!1,!0)),i["video-list"].video){var o=t||i["video-list"].video[0];if(o&&o.rv&&o.rvpm){var n={rvpm:o.rvpm};this.util.merge(n,d),this.sendRequiredViewabilityAvailableEvent(n,c,o["item-id"])}}var a=function(){TRC.intersections.isInViewPort({targetElement:e.container,enableDelayedVisibilityCheck:!0,onTrigger:function(){this.recommendationList.length&&this.visibilityReporter.calculateVisibleItems(null,!0,this.recommendationList),this.visibilityReporter.reportVisibility()}.trcBind(this)})};this.visibilityReporter=new TRC.WidgetVisibilityReporter(this),o&&o.rv&&o.rvpm&&this.rvVisibleTimeout?setTimeout(function(){a.call(this)}.trcBind(this),this.rvVisibleTimeout):a.call(this),this.registerProviderClicks(this.recommendationList)}var s=Boolean(t),l=t?this.displayInSlotManager.getDisplayInSlotItemsIds():null;this.sendPlacementTrackingPixelsOnce("i",l,s)}.trcBind(this)),this.isExistDisplayInSlot&&!m){var C=c.getSpecificItemsPostData(this.displayInSlotManager.getNativeItemsIds());this.sendAvailableEvent(d,C,!1,!0)}}else m||this.sendAvailableEvent(d,c,!1,!1);var T=this["rtb-win"];if(T){var y=T["ep"];y?this.sendEvent(y,T):this.sendEvent("rtb-win",T)}if(this.itemsTypes=this.getItemsTypesList(this.recommendationList),this.privacyId=this.getPrivacyId(this.recommendationList),this.orig_name=this.mode_name,this.orig_placement=this.placement,!this.isProviderIframe)if(this.isExistDisplayInSlot){var R=this.displayInSlotManager.getNativeItemsIds();this.sendPlacementTrackingPixelsOnce("i",R,!0)}else this.trc.global["enable-rv-available"]?this.handleAvailableTrackingPixels():this.sendPlacementTrackingPixelsOnce("i");if(o=this.calcModeName(t.trc,this.mode_name),this.changeModeName(o,!0,"mode - "+o+" has no config :- fallback - "+this.mode_name),this.isProviderIframe||this.isNoRecommendationsMode()||void 0!==this.trc.modes[this.mode_name]){s=this.trc.getProperty(this.mode_name,"auto-size",this.propertiesOverride),l="none"!=this.trc.getProperty(this.mode_name,"thumbnail-position",this.propertiesOverride),this.useNativeLineClamp=TRC.Browser.compatibility.lineClamp&&!this.trc.getProperty(this.mode_name,"details-inline-with-title",this.propertiesOverride)&&this.trc.getProperty(this.mode_name,"use-browser-line-clamp",this.propertiesOverride),this.widgetCreatorLayout=this.trc.getProperty(this.mode_name,"widget-creator-layout",this.propertiesOverride),this.isWCTextLinks="autowidget-template-text-links"===this.widgetCreatorLayout,this.isCarousel="scrolling"===this.trc.getProperty(this.mode_name,"navigation-type",this.propertiesOverride),this.trc.global["vignette-lazy-load"]&&VignetteManager&&VignetteManager.isDrawingVignette(this.placement)?this.shouldLazyLoadImages=!1:this.shouldLazyLoadImages=this.trc.getProperty(this.mode_name,"has-thumbs-image-lazy-load",this.propertiesOverride)||this.trc.global["thumbnail-image-lazy-load"],this.link_target=this.link_target||this.trc.getProperty(this.mode_name,"link-target")||"normal",__trcDebug("Exit "+r+": success"),this.drawList=!0,this.hasReadMore=!0!==this.trc.disableReadMore&&this.trc.getProperty(this.mode_name,"enable-read-more",this.propertiesOverride),this.readMorePageConfig=this["read_more"]||{},this.readMoreConfig=this.getReadMoreConfig(),this.readMoreDevices=this.trc.getProperty(this.mode_name,"read-more-mode-devices",this.propertiesOverride)||this.trc["read-more-devices"],this.getWidgetToFeedHelper()&&this.getWidgetToFeedHelper().applyWidgetHeaderAndFooterStylesToFeed(this.mode_name),this.callPreRenderHooks(),this.trc.getProperty(this.mode_name,"pending-archive")&&TRC.modDebug.logMessageToServer(0,"PENDING_ARCHIVE_MODE_ERROR["+this.mode_name+"]",{"event-type":"ARCHIVE_MODE_ERROR"}),TRC.setReadMore&&this.hasReadMore&&this.isReadMoreDevice(this.readMoreDevices)?TRC.isOptim("defer-read-more")?setTimeout(function(){TRC.setReadMore(this)}.trcBind(this),0):TRC.setReadMore(this):TRC.EventsAPI.readmore("none",this.response&&this.response.trc),this.trc.yieldingEnabled||this.trc.totalModeCounter++;var w=null;try{this.reqId=this.response.trc.req}catch(e){this.reqId=-1}TRC.performance&&TRC.performance.mark("7.0.1."+this._id,w,this.mode_name,this.reqId,"rendering",TRC.PerfEvenType.REQ_LEVEL_START),this.container&&this.container.setAttribute("data-placement-name",this.placement),this.isProviderIframe&&!this.isDisplayToNative||(TRC.CategoryCard.enableCategoryCard(this)&&(this.categoryCard=new TRC.CategoryCard(this)),this.isResponsive&&!this.isWCTextLinks?(this.generateResponsiveOuters(this.element),this.drawResponsiveList(i,c,d),this.postHandleRecommendationsResponseData(i,t,p,l,n,w)):"rbox-only-video"===t.trc.mode?(this.postHandleRecommendationsResponseData(i,t,p,l,n,w),this.postRender()):(s&&this.container&&0==this.container.clientWidth&&(this.container.style.width="100%"),TRC.ModuleLoader.load("non-responsive-widget",this.drawListBody,function(){this.generateVisibleParts(),this.drawListBody(i),this.postHandleRecommendationsResponseData(i,t,p,l,n,w)}.trcBind(this))))}else __trcError("TRCRBox.loadScriptCallback: Mode name '"+this.mode_name+"' doesn't exist in configuration file ")}},a.prototype.handleNoItemInResponse=function(e,t,r,i,o){TRC.EventsAPI.dispatchRender(e),this.abortRendering(),r||this.sendAvailableEvent(i,o,!0,!1);var n=this.response.feedPlacement||this.placement;TRC.dispatch("onRboxFlowError",{placement:n}),TRC.EventsAPI.dispatchNoContent(this.trc.NO_CONTENT.noItems,this.placement,this.isFeedCard)},a.prototype.isValidResponse=function(e){return e&&e["video-list"]&&e["video-list"].video||this.isProviderIframe||this.isExistDisplayInSlot},a.prototype.getPropertiesOverride=function(e){if(e.trc&&e.trc["video-list"])return this.isMultiWidget?this.multiWidgetModeLevelData&&this.multiWidgetModeLevelData["properties-override"]:e.trc["video-list"]["properties-override"]},a.prototype.handleAvailableTrackingPixels=function(){try{var e=this.response.trc["video-list"].video,t=[];this.rvAvailableIds=[];for(var r=0;r<e.length;r++){var i=e[r];i.rv&&i.rvpm?this.rvAvailableIds.push(i["item-id"]):t.push(i["item-id"])}this.rvAvailableIds.length>0?t.length>0&&this.sendPlacementTrackingPixelsOnce("i",t):this.sendPlacementTrackingPixelsOnce("i")}catch(e){__trcWarn("Handle RvAvailable TrackingPixels error: ",e)}},a.prototype.postHandleRecommendationsResponseData=function(e,t,r,i,o,n){if(this.shouldLazyLoadImages&&(this.lazyLoadViewportMarginThreshold=this.trc.getProperty(this.mode_name,"thumbs-image-lazy-load-margins",this.propertiesOverride)||this.trc.global["thumbs-image-lazy-load-margins"]||"600px 1500px 600px 1500px",this.isCarousel&&"none"!==r&&this.createCarouselContainerImgLazyLoadObserver()),TRC.RecommendationReel.shouldInitRecommendationReel(this)&&new TRC.RecommendationReel(this),TRC.performance&&TRC.performance.mark("7.0.9."+this._id,n,this.mode_name,this.reqId,"rendering",TRC.PerfEvenType.REQ_LEVEL_STOP),TRC.dispatch("trcContentReady",{container:this.container,trcbox:this}),e&&e["video-list"]&&e["video-list"].vtag&&this.trc["mode-before-video-load"](this)){TRC.performance&&TRC.performance.mark("10.0.1."+this._id,null,"videotag","","videoTagLoad",TRC.PerfEvenType.START);var a={placement:this.placement,container:this.container};this.videoTagLoader=new TRC.VideoTagLoader(this.trc,e["video-list"].vtag,a,this,this.response.trc),this.videoTagLoader.loadVideo(),TRC.performance&&TRC.performance.mark("10.0.9."+this._id,null,"videotag","","videoTagLoad",TRC.PerfEvenType.STOP)}try{TRC.SpotlightLoader.registerOnMainContainer(this.container,t),TRC.SpotlightLoader.load(this.response)}catch(e){__trcError("Error while trying to load Spotlight")}this.shouldInitRTBUserAdChoice(i,o)&&TRC.ModuleLoader.load("user-adchoice",TRC.userAdChoice,this.initRTBUserAdChoice.trcBind(this)),this.shouldInitTaboolaChoice(i,o)&&TRC.ModuleLoader.load("userx",TRC.userX,this.initTaboolaChoice.trcBind(this)),this.shouldInitSliderManager()&&(TRC.RBoxUsage.logUsage("Init Escalator"),TRC.ModuleLoader.load("slider",TRC.SliderManager,function(){new TRC.SliderManager(this)}.trcBind(this)))},a.prototype.shouldInitTaboolaChoice=function(e,t){var r=this.trc.global["has-userx"]&&this.trc.getProperty(this.mode_name,"mode-has-userx",this.propertiesOverride),i=this.options&&this.options.trcResponse&&!!this.options.trcResponse.nup;return TRC.pConsole(this.mode_name,"info","has user X = "+r,""),r&&e&&!t&&!TRC.Device.isTouchDevice&&!TRC.SpotlightLoader.loadedScript&&!i},a.prototype.initTaboolaChoice=function(){if(TRC.userX&&!TRC.userX.isInitialized)try{TRC.userX.init(this.trc)}catch(e){__trcDebug("failed to init Taboola Choice",e)}try{TRC.userX.initForMode(this)}catch(e){__trcDebug("failed to init Taboola Choice for mode "+this.mode_name)}},a.prototype.shouldInitRTBUserAdChoice=function(e,t){return this.trc.global["show-rtb-ad-choices-icon"]&&e&&!t&&!TRC.SpotlightLoader.loadedScript&&this.recommendationList&&this.recommendationList.some(function(e){return e.plink})},a.prototype.initRTBUserAdChoice=function(){if(!TRC.userAdChoice.isInitialized)try{TRC.userAdChoice.init()}catch(e){__trcDebug("failed to init RTB Choice")}try{TRC.userAdChoice.initForMode(this)}catch(e){__trcDebug("failed to init RTB Choice for mode "+this.mode_name)}},a.prototype.shouldInitSliderManager=function(){return(!0===this.slider||!0===this.trc.getProperty(this.mode_name,"slider",this.propertiesOverride))&&!1!==this.trc.slider},a.prototype.callPreRenderHooks=function(){var e=this.trc.getProperty(this.mode_name,"mode-start"),t=this.trc["mode-pub-start"];try{"function"==typeof t&&(t(this,this.container),TRC.CustomModulesManager.runHook("mode-pub-start",null,this,this,this.container)),"function"==typeof e&&e(this,this.container)}catch(e){__trcError("Error in pre rendered hooks - "+e.message)}},a.prototype.registerProviderClicks=function(e){for(var t,r=0;r<e.length;r++){t=e[r],TRC.listen("click::"+this.placement,function(){this.isExistDisplayInSlot&&(t=this.displayInSlotManager.getDisplayInSlotItemData()),this.reportClick(t,{it:t.type,ii:t["item-id"],p:t["is-syndicated"]?t.publisher:"",li:this.getListId()},null,!1),this.trc.sendExternalTracking(this.getAllExternalTrackingURLsList()["c"])}.trcBind(this));break}},a.prototype.changeModeName=function(e,t,r){e&&(void 0!==this.trc.modes[e]?(this.mode_name=e,this.element.className="trc_rbox"+" "+this.mode_name):this.trc.global["send-variant-warning"]&&(t?__trcWarn(r):__trcDebug(r)))},a.prototype.abortRequest=function(){this.timeoutId&&(TRC.Timeout.clear(this.timeoutId),this.timeoutId=null),this.request&&(this.request.parentNode.removeChild(this.request),this.request=null)},a.prototype.abortRendering=function(){var e="TRCRBox.abortRendering"+"(retry="+this.retryCount+")";switch(__trcDebug("Called "+e),this.drawList=!0,typeof this.errorHandler){case"string":return void(null!=this.listContainer&&this.listContainer.appendChild(document.createTextNode("Error getting recommendations: "+this.errorHandler)));case"function":return void this["errorHandler"]()}},a.prototype.getContainer=function(){return this.element.parentNode},a.prototype.sendEvent=function(e,t,r,i,o,n,a){var s=!1,l=this.trc.formattedTRCRequest&&this.trc.formattedTRCRequest.tmpl,c=this.response.trc["placement-group"],d=this.response&&this.response.trc?this.response.trc["session-data"]:null,p={ri:this.response?this.response.trc["req"]:null,sd:this.trc.getSessionData(d),ui:TRC.pageManager.getUserId(),pi:this.trc.getItemId(),wi:this.response?this.response.trc["watched-item"]:null,pt:this.getItemType(),vi:this.cachedViewId||TRC.pageManager.getPageData(),li:this.getListId()},h=function(){s||(s=!0,o&&o())};this.isResponseFromCache()&&(p.cache="1"),this.trc.formattedTRCRequest&&this.trc.formattedTRCRequest.ad&&(p.ad=__trcJSONify(this.trc.formattedTRCRequest.ad)),this.trc.systemFlags&&"normal"!==this.trc.systemFlags.loaderType&&(p.lt=this.trc.systemFlags.loaderType),this.response.trc&&(this.trc.global["tmp-use-pb-params"]&&this.trc.configForPostEvent[e]||"click"===e&&this.sendClickPiggyBack)&&(this.response.trc["ppb"]&&(t.ppb=this.response.trc["ppb"]),this.response.trc["cpb"]&&(t.cpb=this.response.trc["cpb"]),this.response.trc["prty"]&&(t.prty=this.response.trc["prty"]),this.response.trc["caty"]&&(t.caty=this.response.trc["caty"])),"click"==e&&"nt"==t.prt&&(p={}),l&&(p.tmpl=l),c&&(p.pg=c),__trcCopyProps(t,p),i?(TRC.pConsole(this.mode_name,"info","sending event type : "+e,p,"object"),this.trc.log1(e,p,r,h,this.placement,a)):this.trc.logTrcEvent(e,p,r,h,null,a);var u=null;TRC.performance&&"visible"==e&&TRC.performance.mark("11.0."+this._id,u,this.mode_name,this.reqId,"visible",TRC.PerfEvenType.MARK),"number"==typeof n&&TRC.Timeout.set(h,n)},a.prototype.load=function(e){if(this.errorHandler=e,this.loadRBoxRequestFailed)return __trcError("loadRBox failed, aborting."),void this.abortRendering();var t;({})[this.placement]=this,this.loadScriptCallback(null,this.response),this.detectBids(),this.measureDistanceFromArticle(),this.searchArticleAndFeedAreaForElements(),this.takePageScreenshot()},a.prototype.detectBids=function(){TRC.util.isPercentEnabled(this.trc.global,"enable-bid-detection")&&TRC.ModuleLoader.load("bid-detection",TRC.BidDetection,function(){TRC.bidDetector||(TRC.bidDetector=new TRC.BidDetection(this.response.trc),TRC.bidDetector.detect())}.trcBind(this))},a.prototype.isDistanceViolationEnabled=function(){var e=function(){if(!TRC.isPaywallSelectorEventSent){var e={event_type:"PAYWALL_BY_SELECTOR",event_state:"REPORTED",event_value:!0};TRCImpl.sendEvent("supply-feature",{d:JSON.stringify(e)},null),TRC.isPaywallSelectorEventSent=!0}};return!TRC.dom.isInIframe()&&(!TRC.util.isRboxEncapsulated(TRC)&&((!TRC.util.isTrue(this.trc.paywall)||!this.disableViolationMeasurementOnPaywall)&&(document.querySelector(this.disableViolationSelectorOnPaywall)?(e(),!1):!!TRC.util.isPercentEnabled(this.trc.global,"enable-distance-from-article"))))},a.prototype.measureDistanceFromArticle=function(){this.isDistanceViolationEnabled()&&TRC.ModuleLoader.load("distance-from-article",TRC.DistanceFromArticle,function(){TRC.DistanceFromArticle.measureAndReport(this.trc.global["distance-violation-minimal-article-text-percentage"])}.bind(this));try{TRC.util.isRboxEncapsulated(TRC)||TRC.dom.isInIframe()||!TRC.util.isPercentEnabled(this.trc.global,"monitor-article-distance-from-feed-percentage")||TRC.ModuleLoader.load("distance-from-article",TRC.DistanceFromArticle,function(){const e=TRC.util.sendSupplyFeature.trcBind(TRC.util);TRC.DistanceFromArticle.reportArticleDistanceFromFeed(e)}.bind(this))}catch(e){__trcError("Error in TRCRBox.measureDistanceFromArticle",e)}},a.prototype.searchArticleAndFeedAreaForElements=function(){TRC.util.isPercentEnabled(this.trc.global,"article-and-feed-area-scanner-report-percentage")&&TRC.ModuleLoader.load("article-and-feed-area-scanner",TRC.ArticleAndFeedAreaScanner,function(){TRC.ArticleAndFeedAreaScanner.initScanner()}.bind(this))},a.prototype.takePageScreenshot=function(){!TRC.util.isRboxEncapsulated(TRC)&&TRC.util.isPercentEnabled(this.trc.global,"screenshot-capture-enabled")&&TRC.ModuleLoader.load("screenshot-capture",TRC.screenshotCaputre,function(){TRC.screenshotCaputre.init(document.body,{keepImages:!0})}.trcBind(this))},a.prototype.getBoundingClientRect=function(e,t){var r;return t?{left:t.boundingClientRect.left+e.left,right:t.boundingClientRect.right+e.left,top:t.boundingClientRect.top+e.top,bottom:t.boundingClientRect.top+e.bottom,width:t.boundingClientRect.width,height:t.boundingClientRect.height}:e},a.prototype.clearChilds=function(e){for(;e.hasChildNodes();)e.removeChild(e.lastChild)},a.prototype.hasDuration=function(){for(var e,t=this.trc.getProperty(this.mode_name,"detail-order",this.propertiesOverride).split(","),r=0;e=t[r];r++)if("duration"==e)return!0;return!1},a.prototype.cleanStyleDimensions=function(e){var t=null;try{__trcDOMWalker(e,function(e){e.style.cssText&&(e.style.width="",e.style.height=""),-1!==(e.className+"").indexOf("video-duration")&&(t=e)})}catch(e){}return t},a.prototype.createBillboard=function(){var e=__trcGetElementsByClass("trc_rbox_outer","div",this.element)[0];if(!e)return null;var t=document.createElement("div");return this.billboard=t,t.className="trc_billboard",t.style.width="auto",e.parentNode.insertBefore(t,e),e.style.clear="both",t},a.prototype.checkForBlocking=function(){var e,t,r,i,o,n,a,s,l="",c=[],d=[],p=[];if(this.trc.global["enable-old-abp-check"]){for(e=0;t=this.boxes[e];e++){try{(o=t.video_data["is-in-network"]||t.video_data["is-native"])||(i=t.video_data["is-syndicated"])}catch(e){}n=o?d:i?p:c,t&&1===t.nodeType&&t.childNodes.length?(a=document.trcGetCurrentStyle(t,"-moz-binding"),r=document.trcGetCurrentStyle(t,"orphans"),"hidden"!=(s=document.trcGetCurrentStyle(t,"visibility"))&&("none"==document.trcGetCurrentStyle(t,"display")?("4321"==document.trcGetCurrentStyle(t,"orphans")&&(l=l||"adblockplus"),n.push(1)):a&&"none"!=a&&(l=l||"adblockplus",n.push(1)))):n.push(1)}(c.length||p.length||d.length)&&__trcWarn("blocked:"+c.length+"-"+d.length+"-"+p.length+"-"+(l||"unknown"))}},a.prototype.setVideoPlayerLoad=function(e,t,r,i,o,n){try{PVideoLoader.loadVideo({playerContainer:e,url:t,poster:r,itemIndex:i,itemId:o,overlayData:n,trcRBox:this}),TRC.tlf&&console.time("in setVideoPlayerLoad")}catch(e){__trcWarn("Error in setVideoPlayerLoad",e)}},a.prototype.getThumbnailsDimensions=function(e){var t=e.boundingClientRect,r;return{width:Math.ceil(t.width),height:Math.ceil(t.height)}},a.prototype.removeCarouselItemImgLazyLoadObserver=function(e){for(var e=e.split(" "),t,r=0;r<e.length;r++)-1!==(t=this.lazyLoadImageObserversIds.indexOf(e[r]))&&(TRC.intersections.unobserve(this.lazyLoadImageObserversIds[t]),this.lazyLoadImageObserversIds.splice(t,1))},a.prototype.createCarouselContainerImgLazyLoadObserver=function(){var e={targetElement:this.container,threshold:0,rootMargin:this.lazyLoadViewportMarginThreshold,disableCheckOverlay:!0,onEnter:this.createCarouselItemImgLazyLoadObserver.trcBind(this)};this.lazyLoadImageObserversIds.push(TRC.intersections.observe(e))},a.prototype.loadCarouselItemImage=function(e,t,r,i,o,n,a,s,l,c){var d=this.getThumbnailsDimensions(a),p=s.getAttribute(TRC.intersections.TARGET_ATTRIB);this.setImageLoad(e,t,r,i,o,n,!0,d),p&&this.removeCarouselItemImgLazyLoadObserver(p)},a.prototype.createCarouselItemImgLazyLoadObserver=function(e,t,r,i){for(var o,n=t.getAttribute(TRC.intersections.TARGET_ATTRIB),a=0;a<this.boxes.length;a++)o={rootSelector:"#"+this.outerBox.id,targetElement:this.boxes[a].thumbBlock,threshold:0,rootMargin:this.lazyLoadViewportMarginThreshold,onEnter:this.loadCarouselItemImage.trcBind(this,this.boxes[a].img,this.boxes[a],this.boxes[a].img_src,100,this.boxes[a].thumbBlock,this.trc.global["thumb-lazy-load-switch"])},this.lazyLoadImageObserversIds.push(TRC.intersections.observe(o));n&&this.removeCarouselItemImgLazyLoadObserver(n)},a.prototype.lazyLoadImage=function(e,t,r,i,o,n,a,s,l,c){var d=this.getThumbnailsDimensions(a),p=s.getAttribute(TRC.intersections.TARGET_ATTRIB);this.setImageLoad(e,t,r,i,o,n,!0,d),p&&this.removeCarouselItemImgLazyLoadObserver(p)},a.prototype.alternateImgBaseUrl=function(e){return TRC.imageCounter++,e.replace("images.taboola.com",this.imagesAltUrls[TRC.imageCounter%this.imagesAltUrls.length])},a.prototype.setImageLoad=function(e,t,r,i,o,n,a,s){var l,c,d,p,u,m,g,b,f;if(g=TRC.util.isPercentEnabled(this.trc.global,"cloudinary-encode")?TRC.imageUtils.cloudinaryEncoding(r):this.trc.global["tmp-image-utf8-encode"]?encodeURIComponent(r):escape(r),!a&&this.shouldLazyLoadImages){if(this.isCarousel)return;return b={targetElement:o,threshold:0,rootMargin:this.lazyLoadViewportMarginThreshold,disableCheckOverlay:!0,onEnter:this.lazyLoadImage.trcBind(this,e,t,r,i,o,n)},void this.lazyLoadImageObserversIds.push(TRC.intersections.observe(b))}if(m=a?s:this.getContainerDim(o,t,this.isHiddenItem(t)),o.imgContDim=m,!i&&!m){var v=!this.trc.global.hasOwnProperty("enable-default-aspect-ratio")||this.trc.global["enable-default-aspect-ratio"];if(t.rbox&&t.rbox.isStories)m={width:screen.availWidth,height:screen.availHeight};else if(v){var C=this.trc.global["default-image-aspect-ratio"]||9/16,T=Math.min(screen.availWidth,1e3);m={width:T,height:Math.round(T*C)}}}if(m){var y=imageUtils.computeImageOptimizationConfig({trcRBoxUI:this,video:t.video_data,imgContDim:m});p=this.getImageOptimizationUrlByItemRtbProp({itemData:t.video_data,imageOptimizationConfig:y}),r=this.getImageOptimizePrefix({imageOptimizePrefix:p,imageOptimizationConfig:y})+g}else{if(i)return void TRC.Timeout.set(this.setImageLoad.trcBind(this,e,t,r,--i,o,n,a,s),50);__trcInfo("Failed to load image through cloudinary service because of missing dimensions:"+this.mode_name)}l=t.video_data["pvideo-url"],c=t.video_data.itemIndex,d=t.video_data["item-id"],this.imagesAltUrls.length>0&&(r=this.alternateImgBaseUrl(r)),this.trc.getExpoImageTag()&&(r+=(-1===r.indexOf("?")?"?":"&")+this.trc.getExpoImageTag()),t.img_src=r=TRC.URL.prototype.switchProtocol.call(r,h),e.src=r,TRC.imageUtils.markLoadPerformance(e),l&&(u={isCreatePVideoOverlay:this.trc.getProperty(this.mode_name,"p-video-overlay",this.propertiesOverride),video_data:t.video_data,container:t,language:this.trc["language"],isSendEvents:this.trc.global["p-video-overlay-send-events"]},o=this.isResponsive?o:o.firstChild,this.setVideoPlayerLoad(o,l,r,c,d,u))},a.prototype.getImageOptimizationUrlByItemRtbProp=function(e){var t=e.itemData,r=e.imageOptimizationConfig;if(this.imageOptimizePrefixFlag=!0,t["is-rtb"])return this.rtbImageOptimizePrefix=this.rtbImageOptimizePrefix||this.getImageOptimizationUrl(t);if(t["cropping"]){var i=imageUtils.parseCroppingPrefix({trcRBoxUI:this,imageOptimizationConfig:r,video:t});if(i)return i}return(t["thumbnail-transformations"]||t["is-gift"])&&this.trc.global["image-optimization-url-per-item-is-enabled"]?this.getImageOptimizationUrl(t):this.imageOptimizePrefix=this.imageOptimizePrefix||this.getImageOptimizationUrl(t)},a.prototype.setImagePrefixUrl=function(e){var t="image-url-prefix",r=c,i;return e["is-rtb"]?(t="rtb-image-url-prefix",r=p):e["is-gift"]?(t="gif-url-prefix",r=d):e["thumbnail-transformations"]&&(i=s+l+","+e["thumbnail-transformations"]+"/"),TRC.shiftDomain(i||this.trc.getProperty(this.mode_name,t,this.propertiesOverride)||this.trc.global[t]||r)},a.prototype.handleGifPrefixParams=function(e){var t=this.trc.global["gif-fade-effect-in-ms"],r,i;return t&&"0"!==t&&(i=encodeURIComponent(",e_fade:{fade},e_fade:-{fade}".replace(new RegExp("{fade}","g"),t)),e=e.substr(0,e.length-1)+i+(e.lastIndexOf("/")===e.length-1?"/":"")),e},a.prototype.forceGifPrefixUrl=function(){return TRC.shiftDomain(this.trc.getProperty(this.mode_name,"gif-url-prefix",this.propertiesOverride)||this.trc.global["gif-url-prefix"]||d)},a.prototype.getImageOptimizationUrl=function(e){var t=this.setImagePrefixUrl(e),r=this.trc.global["images-host"],i=this.trc.getProperty(this.mode_name,"images-radius",this.propertiesOverride),o=e["is-gift"],n;return e["pvideo-url"]&&e.thumbnail&&e.thumbnail.indexOf(".gif")>-1&&(t=this.forceGifPrefixUrl(),o=!0),r&&r.length>2&&((n=new TRC.URL(t)).host=r,t=n.toString()),i&&"0"!=i&&(t=o?t.replace(new RegExp("f_gif"),"f_gif%2Cr_"+i):(t=t.replace(/f_jpg(%2C)?/,"")).replace(/fetch\//,"fetch/f_png%2C"+"r_"+i+"%2C")),o&&(t=this.handleGifPrefixParams(t)),t},a.prototype.isHiddenItem=function(e){return"none"===t.trcGetCurrentStyle(e,"display",null)},a.prototype.getContainerDim=function(e,t,r){var i,o,n=100;if(r){if(this.cachedImageDim)return this.cachedImageDim}else{if(i=TRC.dom.getElementRect(e),TRC.util.isEnabledByDefault(this.trc.global["enable-img-dim-fix"])&&TRC.Browser.webView){o=window.screen.width;var a=this.trc.global["webview-img-max-width"]||500;o=o>a?a:o;var s=Math.ceil(i.bottom-i.top||this.getAspectHeight(t)||o*this.getThumbAspectRatio(this.trc.modes[this.mode_name],"ratio")||n),l=Math.ceil(i.right-i.left);return n=Math.ceil(s/l*o),this.cachedImageDim={width:o,height:n}}if(o=Math.ceil(i.right-i.left))return n=Math.ceil(i.bottom-i.top||this.getAspectHeight(t)||o*this.getThumbAspectRatio(this.trc.modes[this.mode_name],"ratio")||n),this.cachedImageDim={width:o,height:n}}return null},a.prototype.getAspectHeight=function(e){var t;return e.thumbnail_aspect?(t=TRC.dom.getElementRect(e.thumbnail_aspect)).bottom-t.top:0},a.prototype.getImageOptimizePrefix=function(e){var t=e.imageOptimizePrefix,r=e.imageOptimizationConfig;return TRC.performance&&TRC.performance.mark("7.1.1."+this._id),t=t.replace(new RegExp("{w}","g"),r.computedWidth.toString()).replace(new RegExp("{h}","g"),r.computedHeight.toString()),TRC.performance&&TRC.performance.mark("7.1.9."+this._id),t},a.prototype.getImageSizeFactor=function(){var e=this.trc.getProperty(this.mode_name,"image-size-factor",this.propertiesOverride)||1.2;return this.trc.global["use-dpr-images"]&&this.trc.getProperty(this.mode_name,"use-dpr-images",this.propertiesOverride)&&TRC.dom.isHighDensity()&&(e=this.trc.getProperty(this.mode_name,"image-dpr-factor",this.propertiesOverride)||e),e},a.prototype.getAllowedRatio=function(e){for(var t=this.trc.getSortedCloudinaryRatios(),r=this.trc.getProperty(this.mode_name,"image-allowed-ratio-diff",this.propertiesOverride)||.01,i=1*e.height/e.width,o=Math.abs(i-r),n=0;n<t.length;n++){var a=t[n];if(!isNaN(a)&&a>=o)return a}return i},a.prototype.isInViewPort=function(e,t){var r=TRC.visibility.getMinViewPortOffsets(this.container);return!(r<0&&Math.abs(r)>t)},a.prototype.createUtmParam=function(){return{utm:TRC.utm.join(",")+(this.utm?","+this.utm.join(","):"")}},a.prototype.postRender=function(e){if(e){var t=this.postRenderQueue.popFront();if(null==t)return void __trcDebug("TRCRBox.postRender: finished");try{t.func.call(this),TRC.pConsole(this.mode_name,"debug","executing postRender functions - see info",t.func.toString())}catch(e){__trcError("Error in TRCRBox.postRender while executing "+t.name,e)}}__trcInfo("Finish Rendering "+(this.response.trc?this.response.trc.placement:"")),TRC.Timeout.set(this.postRender.trcBind(this,!0),0)},a.prototype.getPopupUrl=function(){return this.trc.getProperty(this.mode_name,"popup-custom-url",this.propertiesOverride)||"popup.taboola.com/"+(this.trc["language"]||"en")},a.prototype.check_visibility=function(){for(var e=0;e<this.boxes.length;e++){var t=this.boxes[e];this.itemMaxHeight&&(t.style.height=this.itemMaxHeight+"px")}},a.prototype.findElement=function(e,t,r,i){void 0===t&&(t=document),void 0===r&&(r="*");for(var o=t.getElementsByTagName(r),n=0;n<o.length;n++)if(e(o[n]))return o[n];return i},a.prototype.findElements=function(e,t,r){for(var i=[],o=0;e&&o<e.length;o++){var n=e[o],a=this.findElement(function(e){return e.className.search(n)>=0},t,"span");a&&(r&&(a=a.cloneNode(!0)),i.push(a))}return i},a.prototype.getLinkTarget=function(e,t,r){var i;return(i=t&&t[e]||r[e])||(i="_blank"),i},a.prototype.addPiggyBackParams=function(e){if(e)return e+"&ppb="+this.response.trc["ppb"]+"&cpb="+this.response.trc["cpb"]},a.prototype.detectItemFromSameHost=function(e,t){if(e===t||this.trc["detect-item-from-same-host"](e,t))return!0;for(var r=e.split(".").reverse().join(""),i=t.split(".").reverse().join(""),o=6,n=!0,a=0;a<o;a++)if(r[a]!==i[a]){n=!1;break}return n},a.prototype.createVideoLinkRel=function(e,t,i){var o;return(this.trc.global["allow-nofollow-for-exchange"]||!e["is-in-network"]||e["is-in-network"]&&!t)&&(o="nofollow",this.trc.global["disable-noopener-for-links"]||"_blank"!==i||(o+=" noopener")),this.trc.global["disable-sponsored-for-links"]||e["is-in-network"]||e["is-dc"]||(o+=" "+r),o},a.prototype.changeVideoHrefToReportClick=function(e,t,r,i,o){!o.directLink&&e&&(e.href=this.getVideoLoggerUrlToReportClickWithMetrics(t,r,i,o))},a.prototype.getVideoLoggerUrlToReportClickWithMetrics=function(e,t,r,i){var o=ItemMeasurements.addVisibleToClickTimeToParamURL(this.trc,e,t,r,i);return this.attachHeatMapDataToLink(o,t)},a.prototype.reportClick=function(e,t,r,i,o,n){ItemMeasurements.setVisibleToClickTimeParamObj(this.trc,t,e),this.sendEvent("click",t,r,i,o,n)},a.prototype.reportClickAsync=function(e,t,r,i,o){var n=this.getVideoLoggerUrlToReportClickWithMetrics(t,r,i,o);n=TRC.URL.prototype.removeParamFromUrl(n,"redir"),BeaconUtils.sendBeaconRequest(n,{})||TRC.pConsole(this.mode_name,"error","Failed sending click url using sendBeacon = "+n)},a.prototype.createVideoLink=function(e,t,r){var o=document.createElement("a"),n=this.ntHandlerEnabled&&e["is-in-network"],a,s,l=this.sendClickPiggyBack?this.addPiggyBackParams(e.logger_url):e.logger_url,c=!0!==this.trc.global["disable-stop-propagation"],d=TRC.pageManager.getTopMostWindow().location.hostname,p=TRC.URL(e["url"]).host,h,u;if(o.setAttribute("attributionsrc",""),e["urlp"]){var m=e["urlp"];for(var g in m)if(m.hasOwnProperty(g)){var b=m[g];o.setAttributeNS(null,g,b)}}var f=!1;if(u=this.detectItemFromSameHost(d,p),e["is-in-network"]&&TRC.hasFeedView&&this.parentFeed&&this.parentFeed.enableAEClicks&&(u?(e.scParams=e.scParams||{},e.original_url=e.original_url||e.url,f=!0):(this.feedViewExchangeFallbackEventData={eventType:"fallback",original_url:d,target_url:p},this.shouldSendFeedViewExchangeFallbackEvent=!0)),n&&(e.hasNtClckHnadler=!0),TRC.isOptim("title-decode")?o.title=t:o.title=TRC.util.getHtmlDecodeText(t),e.link_target=this.link_target,!e.isSyndicated||n||f)o.href=e.url,"blank"!=this.link_target?TRC.util.isAmp(TRC)&&this.trc.global["amp_target"]?o.target=this.trc.global["amp_target"]:o.target="_parent":(o.target="_blank",o.onmousedown=function(e){((e=e||event).target||e.srcElement).target="_blank"}),e["is-in-network"]&&(e.scParams.prt="nt"),this.organicRedirParam&&(l=l.replace("&url=","&"+this.organicRedirParam+"=")),this.useRedirect&&this.useRedirectOnLink&&(o.href=l),o.onmousedown=function(t){this.changeVideoHrefToReportClick(o,l,t,r,e)}.trcBind(this),o.onclick=this.videoLinkClickHandler.trcBind(this,r,e,o,l);else{var v,C="rhrf";e["thrf"]?o.href=TRC.URL.prototype.removeAllUrlParametersAndFragment(e.url):e[C]?o.href=i:o.href=e.url,a=this.getLinkTarget(this.getProviderType(e),this.linkTargetConf,this.defaultLinkTarget),(h=this.createVideoLinkRel(e,u,a))&&(o.rel=h),o.logger_url=l.replace("&url=","&redir=")+(e["is-in-network"]?"&prt=nt":"")+(e["is-native"]?"&prt=nav":""),o.target=a,1==this.trc.global["enable-ie-split-click-event"]&&TRC.Browser.ie&&(s=o.logger_url.length>2048),!0===this.trc.global["touchstart-enabled"]&&TRC.dom.on(o,"touchstart",function(t){this.changeVideoHrefToReportClick(o,o.logger_url,t,r,e),o.isTouchPropagation=1,c&&t.stopPropagation()}.trcBind(this)),o.onmousedown=function(t){if(((t=t||event).target||t.srcElement).target=a,o.isTouchPropagation)return!0;s||this.changeVideoHrefToReportClick(o,o.logger_url,t,r,e)}.trcBind(this),(this.isDisplayToNative||DisplayInSlotManager.isItemDisplayInSlot(e))&&(o.onmouseout=function(e){this.brandingTitleStyleToNative(e)}.trcBind(this),o.onmouseover=function(e){this.brandingEventStyle(e)||this.brandingTitleStyleToNative(e)}.trcBind(this)),o.onclick=function(t){if((this.isDisplayToNative||DisplayInSlotManager.isItemDisplayInSlot(e))&&!this.brandingEventStyle(t))return this.brandingTitleStyleToNative(t),!1;try{if(TRC.clickFraudDetect.isInitialized&&e["is-syndicated"]){var i=o.search.match(/[^&??=]+/g),n=i.indexOf("ri"),a="";if(n>-1&&(a+=i[n+1]),(n=i.indexOf("ii"))>-1){var l=i[n+1].match(/^~~V1~~(-?[\d]{10,})/);a+=l?"_"+l[1]:""}var c=o.href.indexOf("trc.taboola.com")>=0;TRC.clickFraudDetect.fraudScriptCallback(this.placement,TRC.pageManager.getUserId(),a,this.trc.referrer,e.itemIndex,c)}}catch(e){__trcError("Publisher 'onclick' Fraud handler had an error",e)}return this.shouldSendFeedViewExchangeFallbackEvent&&this.trc.sendAbTestEvent("feedView_ae",this.feedViewExchangeFallbackEventData),this.trc.sendExternalTracking(this.getItemExternalTrackingURLsList(e)["c"]),e.directLink?(this.reportClickAsync(o,o.logger_url,t,r,e),!0):!!o.isTouchPropagation||(s?this.reportClick(e,{ii:e["item-id"],it:e.type},null,!1):this.shiftRedirOnclick&&this.changeVideoHrefToReportClick(o,o.logger_url,t,r,e),!0)}.trcBind(this)}return this.trc.global["events-api-click-enabled"]&&TRC.dom.on(o,"click",function(t){var r=o.target;e.linkTarget=r,"_blank"===r?setTimeout(function(){TRC.EventsAPI.dispatchClick(e,this.response.trc)}.trcBind(this),0):TRC.EventsAPI.dispatchClick(e,this.response.trc)}.trcBind(this)),o},a.prototype.brandingEventStyle=function(e){var t;return!!TRC.dom.closest(e.target,".attribution-disclosure-link-sponsored")&&(e.target.classList.add("tbl-branding-title-to-native"),!0)},a.prototype.brandingTitleStyleToNative=function(e){e.target.classList.add("tbl-title-to-native"),e.target.style.color="inherit"},a.prototype.attachHeatMapDataToLink=function(e,t){if(!TRC.Heatmap.isEnabled(this.trc)||!this.listContainer.heatmap)return e;try{var r=this.listContainer.heatmap,i=TRC.Heatmap.collectClickHeatmapCardData(t),o;return i["item-d"]=r.collectClickHeatmapItemData(t),e+"&"+"d="+JSON.stringify(i)}catch(t){return __trcError("Error in trcrbox-ui.attachHeatMapDataToLink - "+t,t),e}},a.prototype.videoLinkClickHandler=(u=2e3,m=function(e,t,r,i){return r.target="_blank",i?!!TRC.Browser["firefoxUpto"](8)||(e.clickLink(r.href,r.target),!1):(r.href=t.url,this.reportClick(t,{ii:t["item-id"],it:t.type},null,!1),!0)},function(t,r,i,o,n){n=n||event,ItemMeasurements.setVisibleToClickTime(this.trc,r,n,t),r&&(r.logger_url=ItemMeasurements.addVisibleToClickTimeToParamURL(this.trc,r.logger_url,n,t,r));var a=!(!TRC.feedViewModuleLoaded||!TRC.FeedView.openIfFeedView(this,r,i)),s=r.link_target,l=this.useRedirect;switch("embed"!==s&&this.trc.sendExternalTracking(this.getItemExternalTrackingURLsList(r)["c"]),s){case"feedView":break;case"blank":(n.target||n.srcElement).target="_blank",l&&this.changeVideoHrefToReportClick(i,o,n,t,r),a=m(this,r,i,l);break;default:if(l&&"local"!=r.link_target&&"function"!=typeof this.onclick&&"function"!=typeof this.trc.onclick)this.shiftRedirOnclick&&this.changeVideoHrefToReportClick(i,o,n,t,r),a=!0;else{var c=this.publisherClickHandler.trcBind(this,r,this.clickLink.trcBind(this,r.url));this.reportClick(r,r.hasNtClckHnadler?r.scParams:{ii:r["item-id"],it:r.type},null,!1,c,u)}}return r.url!=r.original_url&&__trcDebug("url:"+r.original_url+", changed to:"+r.url+", on page:"+e.location.href),a||(n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation()),a}),a.prototype.clickLink=function(t,r){TRC.Browser["firefoxUpto"](8)&&(e.location.href=t);var i=document.createElement("a");if(i.href=t,i.target=r||"_parent",i.style.visibility="hidden",document.body.appendChild(i),i.click)i.click();else{var o=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,button:0});i.dispatchEvent(o)}},a.prototype.publisherClickHandler=function(e,t){var r=__trcCopyProps(e,{});delete r["item-id"],delete r.link;try{if("function"==typeof this.onclick&&!this.onclick.call(this.pubOpts,r))return!1;if("function"==typeof this.trc.onclick&&!this.trc.onclick.call(this.pubOpts,r))return!1}catch(e){__trcError("Publisher 'onclick' handler had an error",e)}return t()},a.prototype.add_span=function(e,t,r){var i=document.createElement("span");return null!=e&&(i.className=e),null!=t&&("object"==typeof t?i.appendChild(t):TRC.dom.setContentToElement(i,t)),void 0!==r&&r.appendChild(i),i},a.prototype.genBidiLabel=function(e,t,r){var i,o,n=TRC.util.textIsRTL(t),a=o=t,s="video-label "+r;if(this.shouldUseSmartEllipsis()){var l=this.trc.getProperty(this.mode_name,"tokenize-strategy")||"word",c=TRC.Ellipsis._tokenizeStrategies[l],d;a=TRC.Ellipsis._tokenizeSingle(o.innerHTML||o,c),s+=" trc-smart-ellipsis","ltr"===this.trc.direction&&(n?s+=" tbl-rtl-label":"title"!==r&&(s+=" tbl-ltr-label"))}return i=this.add_span(s,a,e),e[r]=i,i.isRTL=n,i.tokenizeStrategy=l,i},a.prototype.handlePublishedDate=function(e,t){var r="published-date",i,o=this.trc.getProperty(this.mode_name,"format-x-days-ago",this.propertiesOverride)?TRC.DateUtils.dateFormatTimeAgo(e[r],this.trc.language,this):this.formatData(r,e[r]),n;if("with-branding"===this.trc.getProperty(this.mode_name,"published-date-position",this.propertiesOverride)){var a=t.querySelector(".branding"),s;a&&TRC.dom.addClass(a,"inline-branding"),o=" "+(this.trc.getProperty(this.mode_name,"branding-separator",this.propertiesOverride)||"|")+" "+o}this.add_span("video-label video-published-date",o,t)},a.prototype.buildLabelBox=function(e,t,r){var i,o,n,a=-1!==r.indexOf("title"),s=this.trc.getProperty(this.mode_name,"enable-title-icon-on-sc",this.propertiesOverride),l=t.isSyndicated&&a&&s,c;for((!t.isSyndicated&&a||l)&&this.createTitleAndIconContainer(e),i=0;i<r.length;i++)switch(o=r[i]){case"title":var d=this.genBidiLabel(e,t.title,"video-title");d&&d.setAttribute&&d.setAttribute("slot","title");break;case"uploader":void 0!==t.uploader&&this.add_span("video-label video-uploader",this.formatData("uploader",t.uploader),e);break;case"category":var p="";p=this.isStories&&!t.isSyndicated?this.parentStories.storiesPlacements[this.options.placement].topicData.title:t.category,this.trc.global["disable-decode-category-text"]||(p=TRC.dom.decodeHtmlEntities(p)),void 0!==t.category&&(p=p.split(";")[0].split("//")[0]),this.add_span("video-label video-category",this.formatData("category",decodeURIComponent(p)),e);break;case"views":this.add_span("video-label video-views",this.formatData("views",t["views"]),e);break;case"rating":this.add_span("video-label video-rating",this.formatData("rating",t["rating"]),e);break;case"description":var h=this.genBidiLabel(e,t.description,"video-description");h&&h.setAttribute&&h.setAttribute("slot","description"),h.title='"Description: '+this.removeHtmlTags(t.description)+'"';break;case"duration":void 0!==t.duration&&""!=t.duration&&this.add_span("video-label video-duration-detail",this.formatData("duration",t.duration),e);break;case"branding":n=t.isSyndicated?this.shouldHandleScBrandingWithSponsoredLink()&&"true"!==t["is-app-install"]?this.createScBrandingWithSponsoredLink(t,e):this.createScBranding(t,e):this.createOrganicBranding(t,e),e["branding"]=n,n&&n.setAttribute&&n.setAttribute("slot","branding");break;case"url":break;case"published-date":this.handlePublishedDate(t,e);break;default:void 0!==t[o]&&t[o]&&this.add_span("video-label video-"+o,this.formatData(o,t[o]),e)}},a.prototype.shouldHandleScBrandingWithSponsoredLink=function(){return"after_branding"===this.getDisclosurePosition()},a.prototype.getDisclosurePosition=function(){return this.disclosurePosition||(this.disclosurePosition=this.trc.getProperty(this.mode_name,"disclosure-position",this.propertiesOverride)),this.disclosurePosition},a.prototype.getDisclosureAlignment=function(){return this.disclosureAlignment||(this.disclosureAlignment=this.trc.getProperty(this.mode_name,"disclosure-alignment",this.propertiesOverride)),this.disclosureAlignment},a.prototype.createScBrandingWithSponsoredLink=function(e,t){var r,i,o;if(r=this.trc.getProperty(this.mode_name,"branding-separator",this.propertiesOverride),this.branding=this.add_span("branding composite-branding",null,t),this.add_span("branding-inner",this.formatData("syndicator",e["branding-text"]),this.branding),i=this.trc.getProperty(this.mode_name,"disclosure-link-text-sponsored",this.propertiesOverride))return"right"!==(o=this.getDisclosureAlignment())&&this.add_span("branding-separator",r,this.branding),this.renderDisclosureLinkWithBranding(this.branding,i,o),this.branding},a.prototype.createScBranding=function(e,t){return createScBranding({trcRBoxUI:this,video:e,labelsBox:t})},a.prototype.createOrganicBranding=function(e,t){return this.add_span("branding",this.formatData("syndicator",this.getPublisherBrandingName()),t)},a.prototype.createTitleAndIconContainer=function(e){var t,r,i,o=this.trc.getProperty(this.mode_name,"title-icon",this.propertiesOverride)||"NONE";"CUSTOM"===o?i=this.trc.getProperty(this.mode_name,"title-icon-url",this.propertiesOverride):"PUBLISHER_LOGO"===o&&(i=this.trc.getPublisherVersionPropertyWithFallbackToNetwork("publisher-logo")),i&&(t=document.createElement("span"),r=document.createElement("img"),t.className="video-icon-container",r.className="video-icon-img trc_img",r.src=TRC.URL.prototype.switchProtocol.call(i,h),e.className+=" label-box-with-title-icon",t.appendChild(r),e.appendChild(t))},a.prototype.isUsingImageOptimizationService=function(e){var t=this.trc.global["images-host"]?this.trc.global["images-host"]:"images.taboola.com";return e.indexOf(t)>-1},a.prototype.isTaboolaCDNImage=function(e){return e.match(/cdn.taboola.com\/.*thumbnails\S/)},a.prototype.logImageError=function(e,t,r,i){var o=i?i+" ":"",n=this.trc.global["rbox-image-error-reporting-pct"]||.1;__trcWarn("Failed to load "+o+"thumbnail "+e+" for item="+t+", loading "+r+" thumbnail instead",null,n)},a.prototype.getFallbackImageForTaboolaCDNImage=function(e,t,r){var i=this.isUsingImageOptimizationService(e),o=e.search(/\Shttp\S/),n=unescape(e.slice(o+1)),a=TRC.URL.prototype.switchProtocol.call(i?unescape(n):n,r);return this.logImageError(e,t,a,"taboola CDN"),a},a.prototype.getFallbackImageForNonTaboolaCDNImage=function(e,t,r){var i=e.src,o=this.isUsingImageOptimizationService(i),n=i.search(/\Shttp\S/),a=o&&unescape(e.src.slice(n+1)),s="https:"!==r||a&&0===a.indexOf(r)||this.trc.global["always-allow-orig-image-fallback"];return n>5&&o&&s?this.getOrigImageFromOptimizationUrl(e.src,a,t):this.getDefaultThumbnail(e,t,r)},a.prototype.getOrigImageFromOptimizationUrl=function(e,t,r){return this.logImageError(e,r,t),t},a.prototype.getDefaultThumbnail=function(e,t,r){var i=this.trc.getProperty(this.mode_name,"default-thumbnail",this.propertiesOverride),o=TRC.URL.prototype.switchProtocol.call("undefined"!=i?i:"",r);return e.onerror=null,this.logImageError(e.src,t,"default"),o},a.prototype.getRuleAspectRatio=function(e,t){return!(!e["virtualThumbWidth"]||!e["virtualThumbHeight"]||isNaN(e["virtualThumbWidth"])||isNaN(e["virtualThumbHeight"]))&&("ratio"==t?e["virtualThumbHeight"]/e["virtualThumbWidth"]:e["virtualThumbHeight"]/e["virtualThumbWidth"]*100)},a.prototype.getThumbAspectRatio=function(e,t){try{var r=e["thumbnail-height"]/e["thumbnail-width"];return"ratio"==t?r:Math.round(100*r)}catch(e){return __trcWarn("getThumbAspectRatio",e.message),null}},a.prototype.getThumbnailURL=function(e,t,r){if(void 0===e["thumb-size"])return e["thumbnail"];for(var i=[{w:e["thumb-size"].split("x")[0],h:e["thumb-size"].split("x")[1],u:e["thumbnail"]}],o=1;void 0!==e["thumb-size-"+o];o++)i.push({w:e["thumb-size-"+o].split("x")[0],h:e["thumb-size-"+o].split("x")[1],u:e["thumbnail-"+o]});i=i.sort(function(e,t){return e.w*e.h-t.w*t.h});for(var n=0;n<i.length;n++)if(t*r<=i[n].w*i[n].h)return i[n].u;return i.pop().u},a.prototype.addTaboolaLogo=function(){this.renderAdchoicesLink(this.getAdchoiceConfig(),this.itemsTypes,this.adcItemTypes),this.renderAttributionLink(),this.renderDisclosureLink(),this.addClearingDiv(),this.addWidgetContentType(),TRC.ccpa.renderOnWidgetFooter(this)},a.prototype.renderAttributionLink=function(){var e=this.add_span(null,this.trc.getProperty(this.mode_name,"attribution-text",this.propertiesOverride)),t=this.trc.getProperty(this.mode_name,"attribution-position",this.propertiesOverride),r=this.trc["attribution"]&&"none"!=t,i=this.trc.getProperty(this.mode_name,"hide-attribution-when-no-place",this.propertiesOverride),o=this.trc["attribution-disclosure-direction"];r&&("top"===t?this.isContainerNarrowForAttribution()?i||this.generateLinksBox(this.getWidgetFooter(),e,o,"attribution",null,"bottom"):this.generateLinksBox(this.header.ext,e,o,"attribution",null,"top"):this.generateLinksBox(this.getWidgetFooter(),e,o,"attribution",null,"bottom"))},a.prototype.isContainerNarrowForAttribution=function(){if(TRC.isOptim("attribution")&&this.isFeedCard)return!1;var e=this.trc.getProperty(this.mode_name,"min-width-for-attribution",this.propertiesOverride),t=this.container.clientWidth||this.container.offsetWidth;return t&&e>t},a.prototype.adcHoverHandler=function(e,t){var r=__trcGetElementsByClass("trc_adc_b_logo",null,e)[0];r.style.display=t?"inline-block":"none"},a.prototype.isAdchoicesEnabled=function(e,t,r){return!!e&&("off"!=e.status&&!!this.isAdchoiceItemTypes(t,r))},a.prototype.isAdchoiceItemTypes=function(e,t){for(var r in e)if(t[r])return!0;return!1},a.prototype.getAdchoiceConfig=function(){var e=this.trc.getProperty(this.mode_name,"adchoice-position",this.propertiesOverride);return{status:this.trc.global["has-adchoice"]&&"none"!==e?"on":"off",position:e,url:this.trc.getProperty(this.mode_name,"adchoice-target-url",this.propertiesOverride)||this.trc.global["adchoice-url"],enableBig:this.trc.getProperty(this.mode_name,"adchoice-large",this.propertiesOverride)}},a.prototype.getAdchoicesPosition=function(e,t){var r="top";return"auto"===e?(r="none"===t?r:t,this.isContainerNarrowForAttribution()&&(r="bottom")):r=e,r},a.prototype.renderAdchoicesLink=function(e,t,r){if(this.hasAdChoicesLogo=this.isAdchoicesEnabled(e,t,r),this.hasAdChoicesLogo){var i=null,n=this.getAdchoicesPosition(e.position,this.trc.getProperty(this.mode_name,"attribution-position",this.propertiesOverride)),s,l=e.url||null,c=this.trc["attribution-disclosure-direction"];(i=this.add_span("trc_adc_wrapper",null)).appendChild(this.add_span("trc_adc_s_logo",null)),e.enableBig&&i.appendChild(this.add_span("trc_adc_b_logo",null)),i.appendChild(o()),s="top"===n?this.generateLinksBox(this.header.ext,i,c,"adc",null,"top",l):this.generateLinksBox(this.getWidgetFooter(),i,c,"adc",null,n,l),e.enableBig&&(s.onmouseover=function(){a.prototype.adcHoverHandler(this,!0)},s.onmouseout=function(){a.prototype.adcHoverHandler(this,!1)})}},a.prototype.generateLinksBox=function(e,t,r,i,n,a,s,l){var c,d=document.createElement("div"),p=["trc_desktop_"+i+"_link","trc_mobile_"+i+"_link"],h,u=this.getPopupUrl(),m=TRC.PROTOCOL+"//"+TRC.shiftDomain(u)+"/?"+this.getAttributionLinkParams(),g=s||m,b="sponsored",f=function(e){return TRC.aboutUs.open(e)||!1};if(e){for(c=0;c<p.length;c++){if((h=document.createElement("a")).className=p[c]+" trc_attribution_position_"+(a||"bottom"),h.rel="nofollow",this.trc.global["disable-sponsored-for-links"]||(h.rel+=" "+b),this.trc.global["disable-noopener-for-links"]||(h.rel+=" noopener"),h.appendChild(t.cloneNode(!0)),h.href=g,h.target="_blank",this.hasAdChoicesLogo){var v=this.add_span("trc_logos_v_align",null);v.appendChild(o()),h.appendChild(v)}c||(h.onclick=f),d.appendChild(h)}return"rtl"===r&&(d.style.cssFloat=d.style.styleFloat="left"),d.className="logoDiv link-"+i+" "+(n?" attribution-disclosure-link-"+n:"")+(l?" align-"+i+"-"+l:""),e.appendChild(d),d}},a.prototype.getAttributionLinkParams=function(){var e=["template=colorbox","utm_source="+this.publisher,"utm_medium=referral","utm_content="+this.mode_name+":"+this.placement+":"+(this.trc["test-variant"]||"")];return!this.trc.global["show-rtb-ad-choices-icon"]&&this.privacyId&&e.push("plink="+this.privacyId),e.join("&")},a.prototype.addWidgetContentType=function(){var e=this.getWidgetContentType(this.itemsTypes);this.element.className+=" trc-content-"+e+" "},a.prototype.getWidgetContentType=function(e){var t=e["is-syndicated"]||e["is-in-network"]||e["is-native"];return t&&e["is-organic"]?"hybrid":t?"sponsored":"organic"},a.prototype.getItemsTypesList=function(e){for(var t={},r=0,i;i=e[r];r++)i["is-syndicated"]?t["is-syndicated"]=!0:i["is-in-network"]?t["is-in-network"]=!0:i["is-native"]?t["is-native"]=!0:t["is-organic"]=!0,i["is-adc"]&&(t["is-adc"]=!0);return t},a.prototype.getPrivacyId=function(e){for(var t=0,r;r=e[t];t++)if(r["plink"])return r["plink"];return null},a.prototype.getWidgetFooter=function(){var e=this.getWidgetToFeedHelper();return this.footer||(this.footer=document.createElement("div"),this.footer.className="trc-widget-footer",e&&!e.getFooter()?e.addFooterToFeed(this.footer):this.element.appendChild(this.footer)),this.footer},a.prototype.renderDisclosureLink=function(){var e=this.trc.getProperty(this.mode_name,"min-width-for-disclosure",this.propertiesOverride),t=this.trc.getProperty(this.mode_name,"hide-disclosure-when-no-place",this.propertiesOverride),r=this.add_span(null,this.trc.getProperty(this.mode_name,"disclosure-link-text-sponsored",this.propertiesOverride)),i=this.add_span(null,this.trc.getProperty(this.mode_name,"disclosure-link-text-hybrid",this.propertiesOverride)),o,n=this.trc["attribution-disclosure-direction"];"none"!==this.getDisclosurePosition()&&"after_branding"!==this.getDisclosurePosition()&&(o=this.isFeedCard&&TRC.isOptim("disclosure")?0:this.container.clientWidth||this.container.offsetWidth,"bottom"!==this.getDisclosurePosition()&&this.isHeaderExtContainerAvailable()&&(!o||o>=e)?(this.generateLinksBox(this.header.ext,r,n,"disclosure","sponsored","top"),this.generateLinksBox(this.header.ext,i,n,"disclosure","hybrid","top")):t||(this.generateLinksBox(this.getWidgetFooter(),r,n,"disclosure","sponsored","bottom"),this.generateLinksBox(this.getWidgetFooter(),i,n,"disclosure","hybrid","bottom")))},a.prototype.renderDisclosureLinkWithBranding=function(e,t){var r=this.add_span(null,t),i="right"===this.getDisclosureAlignment()?this.trc.direction:null;this.generateLinksBox(e,r,i,"disclosure","sponsored",this.getDisclosurePosition(),null,this.getDisclosureAlignment())},a.prototype.isHeaderExtContainerAvailable=function(){return this.header.ext&&"No Header"!=this.trc.getProperty(this.mode_name,"header",this.propertiesOverride)},a.prototype.addClearingDiv=function(){var e=document.createElement("div");e.className="trc_clearer",this.element.appendChild(e)},a.prototype.genDuration=function(e){var t=this.formatDuration(e),r=document.createElement("dt");r.style.position="absolute",r.style.overflow="hidden",r.style.height="auto",r.style.width="auto",r.style.zIndex=48,r.style.right=0;var i=document.createElement("div");return i.style.zIndex=50,i.style.paddingLeft="4px",i.style.paddingRight="4px",i.innerText=t,r.appendChild(i),r},a.prototype.fixBoxOverflow=function(e,t,r,i,o,n){return TRC.util.isPercentEnabled(TRCImpl.global,"enable-new-ellipsis-module")?TRC.LineClamp.fixBoxOverflow(e,t,r,i,o,n,this.useNativeLineClamp,this.shouldUseSmartEllipsis()):this.legacyFixBoxOverflow(e,t,r,i,o,n)},a.prototype.legacyFixBoxOverflow=function(e,t,r,i,o,n){var a=!1;if(!(null==e||this.useNativeLineClamp&&(a=this.setupBoxLineClamp(e)))){if(this.shouldUseSmartEllipsis()&&!a)return __trcDebug("Skipping fixBoxOverflow due to feature flag.");if(TRC.ellipsisPerf&&console.timeStamp("Taboola old ellipsis"),!(e.clientHeight<=0||e.clientWidth<=0)){var s=!1;e.parentNode.font=this.getFontSize(e);var l=e.innerHTML;e.innerText="";var c=this.add_span(null,"H",e),d=Math.max(c.offsetHeight,c.clientHeight),p=Math.max(0,e.scrollHeight-e.clientHeight);for(e.removeChild(c),TRC.dom.setContentToElement(e,l),this.addInlineElementsForMeasure(e.inlineDetailsElements,e,!0),e.inlineDetailsElementsHTML=e.innerHTML.replace(l,""),t=t.replace(/^\s+|\s+$/g,"");e.clientHeight+p+d/2<e.scrollHeight&&t.length;)s=!0,t=this.truncateOverflowingText(e,t,r),e.inlineDetailsElementsHTML&&(e.innerHTML+=e.inlineDetailsElementsHTML);this.hideClonedElementsAfterMeasure(o,n),TRC.Browser.ie&&!s&&(e.style.height="auto")}}},a.prototype.setupBoxLineClamp=function(e){TRC.dom.removeClass(e,"trc_ellipsis");var t=parseInt(document.trcGetCurrentStyle(e,"line-height"),10),r=parseInt(document.trcGetCurrentStyle(e,"height"),10),i=t&&r?Math.round(r/t).toString():null;return!(!i||e.isRTL||"rtl"==document.trcGetCurrentStyle(e,"direction"))&&(TRC.dom.addClass(e,"trc_ellipsis"),TRC.css.utils.setStyleProperty(e,"-webkit-line-clamp",i,!1),e.parentNode.font=this.getFontSize(e),!0)},a.prototype.truncateOverflowingText=function(e,t,r){t=r&&t.search(/\s/)>=0?t.replace(/\s+\S+$/,""):t.substr(0,t.length-1);var i=e.getElementsByTagName("bde");if(e.inlineDetailsElementsHTML&&i.length){var o=e.innerHTML.replace(e.inlineDetailsElementsHTML,"");TRC.dom.setContentToElement(e,o)}e.getElementsByTagName("span").length>0&&e.removeChild(e.getElementsByTagName("span")[0]);var a=i.length>0?i[0]:e;return TRC.dom.setContentToElement(a,t),this.add_span(null,n(),e),t},a.prototype.addInlineElementsForMeasure=function(e,t,r){for(var i,o,n,a=0;e&&a<e.length;a++)i=e[a],!(o=this.findElement(function(e){return e.className.search(i)>=0&&e.parentNode===t},t))&&i&&((n=document.createElement("span")).className="trc_inline_detail_spacer",n.innerHTML=" ",t.appendChild(n),t.appendChild(r?i.cloneNode(!0):i))},a.prototype.hideClonedElementsAfterMeasure=function(e,t){for(var r,i,o=0;e&&o<e.length;o++)r=e[o],(i=this.findElement(function(e){return e.className.search(r)>=0&&e.parentNode===t},t,"span"))&&(i.style.display="none")},a.prototype.removeHtmlTags=function(e){return null!=e?e.replace(new RegExp("<[^>]+>","g"),""):null},a.prototype.formatData=function(e,t){var r=this.trc.getProperty(this.mode_name,"format-"+e,this.propertiesOverride);return"function"==typeof(r=r||"%s")?r.call(this,t):((e.search("duration")>=0||e.search("Duration")>=0)&&(t=this.formatDuration(t)),void 0===t&&(t=""),r.replace(new RegExp("%\\w"),'<dt style="display:inline">'+t+"</dt>"))},a.prototype.formatDuration=function(e){var t=parseInt(e/3600);t>=1?e%=3600:t=0;var r=parseInt(e/60),i=parseInt(e%60);return"number"!=typeof t||"number"!=typeof r||"number"!=typeof i||isNaN(t)||isNaN(r)||isNaN(i)||e<1?"":(t>=1?t+":":"")+(r<10?"0":"")+r+":"+(i<10?"0":"")+i},a.prototype.formatNumber=function(e){return void 0===e?"":this.trc.runHook(this,this.mode_name,"format-number",this.propertiesOverride,!1,e)},a.prototype.dateFormatISO=TRC.DateUtils.dateFormatISO,a.prototype.dateFormatAmerican=TRC.DateUtils.dateFormatAmerican,a.prototype.dateFormatEuropean=TRC.DateUtils.dateFormatEuropean,a.prototype.getFontSize=function(e){for(var t=0,r=!1,i=document.trcGetCurrentStyle(e,"font-size"),o=["px","pt","em","ch"];!r&&t<o.length;){if(i.indexOf(o[t])){switch(i=parseInt(i),o[t]){case"px":break;case"pt":i/=.75;break;case"em":case"ch":i*=10}r=!0}t++}return i},a.prototype.sendExploreEvent=function(){this.exploreTimeoutId&&(TRC.Timeout.clear(this.exploreTimeoutId),this.exploreTimeoutId=null),this.sendEvent("explore",{},null,!0)},a.prototype.onMouseOverExploreTrackerHandler=function(t,r){var i=(r=r||e.event).target||r.srcElement;i!=this.container&&null!=this.exploreTimeoutId||i==this.container&&null!=this.exploreTimeoutId||(this.exploreTimeoutId=TRC.Timeout.set(this.sendExploreEvent.trcBind(this),t))},a.prototype.setExploreTracker=function(){var e=0;this.exploreTimeoutId=null,void 0!==this.trc.global&&(e=this.trc.global["explore-delay"]?this.trc.global["explore-delay"]:e),this.container.onmouseover=this.onMouseOverExploreTrackerHandler.trcBind(this,e),0!=e&&(this.container.onmouseout=this.onMouseOutExploreTrackerHandler.trcBind(this))},a.prototype.onMouseOutExploreTrackerHandler=function(t){t=t||e.event;var r=this.container.getBoundingClientRect();t.clientX>=r.left&&t.clientX<r.right&&t.clientY>=r.top&&t.clientY<r.bottom||this.exploreTimeoutId&&(TRC.Timeout.clear(this.exploreTimeoutId),this.exploreTimeoutId=null)},a.prototype.resetBoxes=function(){this.boxes=[]},a.prototype.setResponsiveRules=function(e,t){var r=this.trc.getProperty(this.mode_name,"responsive-rules",this.propertiesOverride);r?this.setOnStandardResponsiveRules(e,t,r):this.setOnAutoSizeResponsiveRules(e,t,this.trc.getProperty(this.mode_name,"auto-size-rules",this.propertiesOverride))},a.prototype.setOnStandardResponsiveRules=function(e,t,r){var i=this.trc.getProperty(this.mode_name,"rows",this.propertiesOverride),o=1,n,a=this.trc.getProperty(this.mode_name,"carousel-min-items",this.propertiesOverride)||1.33;try{n=this.responsiveRules=[];for(var s=0,l=r.length;s<l;s++)n[s]={rows:r[s].rows||i||o,cells:r[s].cells,min:r[s].minWidth,max:r[s].maxWidth,margin:r[s].margin.h,ratio:this.getRuleAspectRatio(r[s])||this.getThumbAspectRatio(this.trc.modes[this.mode_name])||100*this.DEFAULT_THUMB_RATIO};TRC.css.responsive.injectedStyles[e]&&!this.disableResponsiveCSSReuse||(TRC.css.utils.setStyleElements(TRC.css.responsive.rulesToCssText(e,this.responsiveRules,t,!1,this.isWCTextLinks,this.trc.direction,this.isCarousel,a)),TRC.css.responsive.injectedStyles[e]=!0)}catch(e){__trcError("Error in setOnStandardResponsiveRules : ",e.message)}},a.prototype.setOnAutoSizeResponsiveRules=function(e,t,r){var i=TRC.dom.getWindowWidth(),o=this.container.clientWidth>0?this.container.clientWidth:this.container.offsetWidth,n=i/o,a=this.trc.getProperty(this.mode_name,"rows",this.propertiesOverride),s=1,l,c=this.trc.getProperty(this.mode_name,"carousel-min-items",this.propertiesOverride);try{l=this.responsiveRules=[];for(var d=0,p=r.length;d<p;d++)l[d]={rows:r[d].rows||a||s,cells:r[d].n,min:n*r[d]["minWc"],margin:Math.round((r[d]["maxWsRange"]+r[d]["minWsRange"])/2)/o*100,ratio:this.getThumbAspectRatio(this.trc.modes[this.mode_name])||r[d].ratio||100*this.DEFAULT_THUMB_RATIO};TRC.css.responsive.injectedStyles[e]&&!this.disableResponsiveCSSReuse||(TRC.css.utils.setStyleElements(TRC.css.responsive.rulesToCssText(e,this.responsiveRules,t,!1,!1,this.trc.direction),this.isCarousel,c),TRC.css.responsive.injectedStyles[e]=!0)}catch(e){__trcError("Error in setOnAutoSizeResponsiveRules : ",e.message)}},a.prototype.setMetaAttribute=function(e){e.meta={},__trcCopyProps(this.trc,e.meta),delete e.meta["video-list"]},a.prototype.drawResponsiveList=function(t,r,i){TRC.tlf&&console.timeStamp("start mode - "+this.mode_name),TRC.tlf&&console.group("mode - "+this.mode_name),TRC.tlf&&console.time("mode rendering");var o=this.listContainer,n=document.createElement("div"),a=this.recommendationList.length,s=0,l=1e3,c=TRC.dom.closest(this.getContainer(),".trc_related_container"),d="trc_elastic";TRC.pConsole(this.mode_name,"debug","start drawing responsive mode - see info",this.trc.getProperty(this.mode_name,"responsive-rules",this.propertiesOverride),"object"),this.internalContainer=n,this.orientation=this.trc.getProperty(this.mode_name,"orientation",this.propertiesOverride);var p=this.disableResponsiveCSSReuse?this.id:this.mode_name;if(TRC.dom.addClass(c,d+" "+d+"_"+p),this.resetBoxes(),n.id="internal_"+this.id,TRC.dom.clearInnerElements(o),o.appendChild(n),this.setExploreTracker(),this.setMetaAttribute(n),this.firstVideo=null,this.setResponsiveRules(d+"_"+p,a),this.pasreRecommendationList(a,this.hasDuration(),n,r,i),this.renderCTA(n,this),handleResponsiveWidget({rbox:this}),this.trc.global["smart-ellipsis"]||(this.isClassFilter?TRC.listen("IE_ClassShift",this.fixResponsiveVideoBoxes.trcBind(this)):(TRC.dom.on(e,"resize",this.fixResponsiveVideoBoxes.trcBind(this).trcThrottle(500)),TRC.listen("videoCubeChange",this.fixResponsiveVideoBoxes.trcBind(this)))),!this.boxes.length||this.boxes.length<=0){var h=this.response.feedPlacement||this.placement;TRC.dispatch("onRboxFlowError",{placement:h})}TRC.dom.addClass(this.boxes[0],"trc-first-recommendation trc-spotlight-first-recommendation"),this.postRenderQueue.pushBack("list-suffix,publisher-end",function(e){this.trc.runHook(this,this.mode_name,"list-suffix",this.propertiesOverride,!0,e,this),this.trc["publisher-end"](this.id),TRC.CustomModulesManager.runHook("publisher-end",null,this,this.id)}.trcBind(this,n)),this.postRenderQueue.pushBack("checkForBlocking",this.checkForBlocking.trcBind(this)),this.postRender(),this.visibleTimeoutId=null,void 0!==this.trc.global&&(s=this.trc.global["visible-delay"]?this.trc.global["visible-delay"]:s,l=this.trc.global["visible-cycle"]?this.trc.global["visible-cycle"]:l),TRC.MetricsManager.sendMetricsEvent(TRC,this.trc,{name:"UiItemsRendered",value:TRC.MetricsManager.getMetricValue("UiItemsRendered"),type:"counter"},null),TRC.fallbackApi.finalize(this),TRC.Heatmap.isEnabled(this.trc)&&this.attachHeatMapToContainer(c),this.visibilityReporter=new TRC.WidgetVisibilityReporter(this),TRC.eventDelegator.dispatch("onrender",{name:this.mode_name,container:this.container,placement:this.orig_placement}),TRC.EventsAPI.dispatchRender(t,this),TRC.tlf&&console.timeEnd("mode rendering"),TRC.tlf&&console.groupEnd()},a.prototype.attachHeatMapToContainer=function(e){this.isFeedCard?this.listContainer.heatmap=this.getCurrentFeed(e).heatmap:(this.listContainer.heatmap=new TRC.Heatmap(this.trc),TRC.dom.on(this.listContainer,"click",function(e){this.listContainer.heatmap.captureAndSendClickData(e)}.bind(this)))},a.prototype.getCurrentFeed=function(e){var t=this.trc.feedsManager.feeds,r=e.getAttribute("data-placement-name");for(var i in t)if(t.hasOwnProperty(i)&&r.indexOf(i)>-1)return t[i]},a.prototype.createVideoBoxDirectURL=function(e){var t=e.video_data,r=t.url;try{if(!t.isSyndicated){t.original_url=r;var i=this.formatTrackingParam()||this.tracking;(r=this.trc.runHook(this,this.mode_name,"change-url",this.propertiesOverride,!1,r,e,i))===t.original_url&&i&&(r=TRC.URL.prototype.addParamsToUrl(r,i))}t.url=r,e.directURL=r}catch(e){__trcError("Error in createVideoBoxDirectURL",e)}},a.prototype.formatTrackingParam=function(){var e=this.getModeClientProperty("organic-tracking-params");if(e)return Object.keys(e).reduce(function(t,r,i){return t+(0!==i?"&":"")+r+"="+e[r]},"")},a.prototype.createVideoBoxClickUrlParams=function(e,t){var r=this.response&&this.response.trc?this.response.trc["session-data"]:null,i={pi:this.trc.getItemId(),ri:this.response.trc["req"],sd:this.trc.getSessionData(r),ui:TRC.pageManager.getUserId(),it:e.type,ii:e["item-id"],pt:this.getItemType(),li:this.getListId(),sig:e.sig,url:t,vi:this.cachedViewId||TRC.pageManager.getPageData(),p:e.isSyndicated?e.publisher:"",r:Math.floor(100*Math.random())},o=this.trc.formattedTRCRequest&&this.trc.formattedTRCRequest.tmpl,n=this.response.trc["placement-group"];return o&&(i.tmpl=o),n&&(i.pg=n),i},a.prototype.createVideoBoxClickUrlWithParams=function(e){var t=[],r;for(var i in e)e.hasOwnProperty(i)&&e[i]&&(this.trc["normalize-log-param"](i,e[i]),t.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i])));return r=h+"//"+this.domain+"/"+encodeURIComponent(this.trc["normalize-log-param"]("publisher",TRC.publisherId))+"/log/3/click?"+t.join("&"),this.trc.enableExperimentsVariantIdEvent&&this.trc.experimentsVariantIdParamsStr&&(r+="&"+this.trc.experimentsVariantIdParamsStr),this.trc.getLoaderTypesValue()&&(r+="&"+this.trc.getLoaderTypesValue()),r},a.prototype.createVideoBoxClickUrl=function(e,t){var r=this.createVideoBoxClickUrlParams(e,t);return this.createVideoBoxClickUrlWithParams(r)},a.prototype.fixResponsiveBoxTitleAndDesc=function(e){var t=e.labelsBox,r=e.video_data,i=e.link,o=this.getDetailSpansFromLabelsBoxes("title",e),n=this.getDetailSpansFromLabelsBoxes("description",e),a=function(){r.thumbUnder&&t.font&&(i.style.fontSize=t.font+"px")};try{if(!this.trc.global["smart-ellipsis"])for(var s=0;s<o.length;s++)TRC.dom.setContentToElement(o[s],e.getAttribute("data-item-title"));setTimeout(function(){for(var t=0;t<o.length;t++)this.fixBoxOverflow(o[t],e.getAttribute("data-item-title"),!1,"false"!=r["truncate-title"]);a()}.trcBind(this),0),n.length&&setTimeout(function(){for(var e=0;e<n.length;e++)this.fixBoxOverflow(n[e],r["description"],!0,!0)}.trcBind(this),0)}catch(e){__trcError("Problem in fixResponsiveBoxTitleAndDesc",e)}},a.prototype.getDetailSpansFromLabelsBoxes=function(e,t){var r=t.querySelectorAll('.video-label-box [class*="'+e+'"]');return[].slice.call(r)},a.prototype.createVideoBoxLabels=function(e){var t=document.createElement("span");return this.setVideoBoxLabelsClass(t),e.appendChild(t),t},a.prototype.setVideoBoxLabelsClass=function(e){e.className="video-label-box"},a.prototype.createThumbBlockHolder=function(e,r,i,o){var n=t.createElement("div");if(n.className="thumbBlock_holder",r.appendChild(n),this.createVideoBoxThumbBlock(e,n,i),this.isDisplayToNative||DisplayInSlotManager.isItemDisplayInSlot(o)){var a=t.createElement("div"),s={backgroundHolder:a,holder:n,videoBoxContainer:e,video:o};this.showDisplayAdAsNative(s),!TRC.util.isPercentEnabled(this.trc.global,"adjust-banner-height")&&TRC.dom.isDesktop()?DisplayInSlotManager.createVideoBoxAspectWithBackgroundImage(n,e,o.thumbnail):(TRC.dom.addClass(a,"thumbBlock_holder_background_image"),r.insertBefore(a,r.firstChild))}else this.createVideoBoxAspect(n,e)},a.prototype.createVideoBoxAspect=function(e,t){var r=document.createElement("div");r.className="videoCube_aspect",e.appendChild(r),t.thumbnail_aspect=r},a.prototype.showDisplayAdAsNative=function(e){var t=e.holder,r=e.backgroundHolder,i=e.videoBoxContainer,o=e.video;if(this.trc.isCreateTaboolaConnectCard(this.options,o)){var n=this.trc.getTaboolaConnectCardConfig(this.options,o);if(!n)return void TRC.MetricsManager.sendMetricsEvent(TRC,TRCImpl,{name:"HTML-filter-no_connect_card_config",value:"1",type:"counter"},null);this.sendMetricsDisplayAdAsNative(n.itemData,i.thumbnail_position),n.rvMargin&&(i.style.visibility="hidden"),n.backgroundContainer=r,n.container=t,n.videoBoxContainer=i,TRC.taboolaConnect.createCard(n)}},a.prototype.sendMetricsDisplayAdAsNative=function(e,t){e.thumbnail||this.sendDisplayAdAsNativeEvent("DisplayToNativeMissingBackgroundImage"),e.title||this.sendDisplayAdAsNativeEvent("DisplayToNativeMissingTitle"),e.description||this.sendDisplayAdAsNativeEvent("DisplayToNativeMissingDescription"),"start"!==t&&void 0!==t||this.sendDisplayAdAsNativeEvent("DisplayToNativeShouldBlockCurrentMode")},a.prototype.sendDisplayAdAsNativeEvent=function(e){TRC.MetricsManager.sendMetricsEvent(TRC,TRCImpl,{name:e,value:"1",type:"counter"},null)},a.prototype.drawVideoBoxThumbnailLink=function(e,t,r,i){var o;return e.img_src=this.getThumbnailURL(r,this.trc.getProperty(this.mode_name,"thumbnail-width",this.propertiesOverride),this.trc.getProperty(this.mode_name,"thumbnail-height",this.propertiesOverride)),o=this.createVideoLink(r,i,e),e.thumbLink=o,TRC.dom.addClass(o,"item-thumbnail-href"),this.createThumbBlockHolder(e,o,t,r),o&&o.setAttribute&&o.setAttribute("slot","thumbnail"),o},a.prototype.createVideoBoxThumbBlock=function(e,t,r){var i=document.createElement("span"),o="",n=e.video_data;r||"video"!=n.type||void 0===n.duration||""==n.duration||"0"==n.duration||(o=this.genDuration(n.duration)),i.className="thumbBlock",n.imageIframe&&(i.style.backgroundImage="none",this.drawImageIframe(i,n.imageIframe,(e.link||e.preLink).logger_url),e.hasFloatingButton=!0),e.thumbBlock=i,t.appendChild(i)},a.prototype.setVideoBoxImageHandlers=function(e,t,r){e.onerror=this.responsiveImageOnErrorHandler.trcBind(this,e,t,r,h),e.onload=this.responsiveImageOnLoadHandler.trcBind(this,e,t,r)},a.prototype.responsiveImageOnErrorHandler=function(e,t,r,i){var o=e.src,n=o.search(/\Shttp\S/),a=r["item-id"];if(n>5&&this.isTaboolaCDNImage(o)&&!TRC.Browser.ie)return o=this.getFallbackImageForTaboolaCDNImage(o,a,i),void(t.img_src=e.src=o);o=this.getFallbackImageForNonTaboolaCDNImage(e,a,i),t.thumbBlock.style.backgroundImage="URL('"+o+"')"},a.prototype.responsiveImageOnLoadHandler=function e(t,r,i){t&&t.complete?this.appendVideoBoxImage(r):TRC.Timeout.set(e.trcBind(this,r.thumbBlock,t),50)},a.prototype.fixResponsiveVideoImage=function(e,t,r){var i;if(this.imageOptimizePrefixFlag)return t.style.visibility="visible",t.style.width="100%",void(t.style.height="100%");var o=null,n=e.thumbBlock,a=o?o.right-o.left:n.clientWidth,s=o?o.bottom-o.top:n.clientHeight,l,c,d,p,h,u=this.isCssImportant,m=TRC.css.utils;if(0!=s&&0!=a&&0!=t.height)try{(l=a/s)>(c=this.getImageAspectRatio(t))?(d=Math.floor(a/c),p=Math.floor((s-d)/2),m.setStyleProperty(t,"width",a+"px",u),0!=p&&(t.style.position="relative",m.setStyleProperty(t,"top",p+"px",u))):(i=Math.floor(s*c),h=Math.floor((a-i)/2),m.setStyleProperty(t,"height",s+"px",u),0!=h&&(t.style.position="relative","ltr"==this.trc.direction?m.setStyleProperty(t,"left",h+"px",u):m.setStyleProperty(t,"left",-1*h+"px",u))),t.style.visibility="visible"}catch(e){alert(e.message),__trcError("Error in fixResponsiveVideoImage : ",e.message)}else r||TRC.Timeout.set(this.fixResponsiveVideoImage.trcBind(this,e,t,!0),500)},a.prototype.getImageAspectRatio=function(e){return e.trcRatio||(e.trcRatio=e.width/e.height),e.trcRatio},a.prototype.createVideoBoxImageLoader=function(e){var t=new Image,r=e.video_data,i=e.thumbBlock;this.trc.global["thumb-lazy-load-switch"]&&this.updateThumbnailStack(t),t.style.visibility="hidden",e.img=t,this.setVideoBoxImageHandlers(t,e,r),this.trc.global["use-delay-image-load"]?TRC.Timeout.set(this.setImageLoad.trcBind(this,t,e,e.img_src,100,i,this.trc.global["thumb-lazy-load-switch"]),10):this.setImageLoad(t,e,e.img_src,100,i,this.trc.global["thumb-lazy-load-switch"]),this.add_span("thumbnail-overlay",null,i),r.isSyndicated&&this.addVideoBoxBranding(i,r),new TRC.ThumbnailOverlayComponents(i,r.isSyndicated,this)},a.prototype.updateThumbnailStack=function(e){this.thumbnailImageStack=this.thumbnailImageStack||[],this.thumbnailImageStack.push(e)},a.prototype.addVideoBoxBranding=function(e,t){var r=document.createElement("span");r.className="branding",t["branding-text"]?r.appendChild(document.createTextNode(this.formatData("syndicator",t["branding-text"]))):t["branding-url"]&&this.createBrandingImage(r,t["branding-url"]),e.appendChild(r)},a.prototype.createBrandingImage=function(e,r){var i=t.createElement("img");i.src=r,e.appendChild(i)},a.prototype.createVideoBoxThumbLink=function(e,t){try{var r=e.video_data,i=e.thumbnail_position,o=this.drawVideoBoxThumbnailLink(e,t,r,e.getAttribute("data-item-title"));if(e.gridComponent instanceof TblAppInstallGrid)return void e.gridComponent.appendChild(o);if("under"===i){if(o.title=e.link.title="",e.insertBefore(o,e.link),TRC.RecommendationReel.shouldInitRecommendationReel(this))TRC.RecommendationReel.setTextOverForRecommendationReel(this,e);else{var n=document.createElement("span");TRC.dom.addClass(e.link,"tbl-text-over-container"),TRC.dom.addClass(n,"tbl-text-over"),e.link.appendChild(n)}this.findElement(function(e){return e.className.search("title")>=0},e.labelsBox,"span",null),r.thumbUnder=!0}else"bottom"===i?e.appendChild(o):e.insertBefore(o,e.link)}catch(e){__trcError("Error in createVideoBoxThumbLink",e)}},a.prototype.setVideoBoxDataAttr=function(e,t){e.setAttribute("data-item-id",t["item-id"]),e.setAttribute("data-item-title",t.title),e.setAttribute("data-item-thumb",this.getThumbnailURL(t,100,80)),e.setAttribute("data-item-syndicated",!!t.isSyndicated)},a.prototype.getThumbnailPosition=function(e,t){return t||this.trc.getProperty(this.mode_name,"thumbnail-position",this.propertiesOverride)},a.prototype.webComponentAppInstallVersionSupport=function(e){return TblAppInstallGrid.isAvailable&&e&&"true"===e["is-app-install"]&&(+e["app-install-version"]||+this.trc.global["web-component-app-install-version"])||0},a.prototype.drawResponsiveVideoBox=function(e,t,r,i,o,n,a,s){var l=this.videoBoxContainer=document.createElement("div");try{t=__trcCopyProps(t,{},{isSyndicated:t["is-syndicated"]||t["is-in-network"]||t["is-native"],isPhoto:"photo"===t.type,isText:"text"===t.type,imageIframe:t.hasOwnProperty("image-iframe")&&t["image-iframe"],tags:"string"==typeof t.tags?TRC.text.parseCSV(t.tags):[],placement:this.placement,mode:this.mode,urlp:t["urlp"],directLink:t["udl"]});var c=this.webComponentAppInstallVersionSupport(t);if("true"===t["is-app-install"]&&c){var d=document.createElement("tbl-app-install-grid");d.setAttribute&&d.setAttribute("version",c),d instanceof TblAppInstallGrid&&(l.gridComponent=d,l.appendChild(d))}new TRC.BlockClicksManager(this,l,t),this.setApiItemsData(t),this.createResponsiveVideoBox(l,t,o,n),"none"!==l.thumbnail_position&&this.createVideoBoxThumbLink(l,r),this.isStories&&TRC.Stories.createBlurImageBox(l),this.createResponsiveLabelsBoxes(l);var p=t.rvpm;if(!TRC.botDetected&&t[TRC.TrackingScriptLoader.TRC_SCRIPT_TAGS_ATTRIBUTE]&&t[TRC.TrackingScriptLoader.TRC_SCRIPT_TAGS_ATTRIBUTE].length>0){var h=this.outermostContainer.id||this.placement.split(" ").join("-");h+="-"+t["itemIndex"],TRC.TrackingScriptLoader.renderScriptTagIntoVideoBox(l,t,h,this.trc.global["view-tags-domains-url"],p,t.rv)}return this.setRequiredViewabilityAvailableObserver(t.rv,l,a,s,t["item-id"],p),this.trc.runHook(this,this.mode_name,"item-renderer",this.propertiesOverride,!0,l,l.video_data),TRC.util.isPercentEnabled(this.trc.global,"new-cta-enabled")?NewCtaManager.initialize({rbox:this,itemContainer:l}):TRC.CTAManager.initialize(this,l),ISIManager.initialize({videoBoxContainer:l}),e.appendChild(l),this.fixResponsiveBoxTitleAndDesc(l),this.boxes.push(l),this.shouldHandleScBrandingWithSponsoredLink()&&TRC.Browser.ieUpto(10)&&this.handleBrandingWithDisclosureContainerWidth(),t.imageIframe||this.createVideoBoxImageLoader(l),TRC.MetricsManager.metricIncrement("UiItemsRendered"),l}catch(e){__trcError("Error in drawResponsiveVideoBox",e)}return null},a.prototype.createResponsiveLabelsBoxes=function(e){this.buildLabelBox(e.preLabelsBox,e.video_data,e.pre_detail_order),this.buildLabelBox(e.labelsBox,e.video_data,e.detail_order)},a.prototype.renderCTA=function(e,t){TRC.ctaManager&&TRC.ctaManager.renderCTAItems(e,t)},a.prototype.handleBrandingWithDisclosureContainerWidth=function(){var e=this.branding;if(e){var t=e.querySelector(".branding-inner"),r=e.querySelector(".branding-separator"),i=e.querySelector(".logoDiv"),o=r&&TRC.dom.getOuterWidth(r),n=TRC.dom.getOuterWidth(i);t.style.maxWidth="calc(100% - "+(o+n)+"px)"}},a.prototype.createResponsiveVideoBox=function(e,t,r,i){e.rbox=this,e.video_data=t,e.thumbnail_position=this.getThumbnailPosition(t,i||null),this.setVideoBoxDataAttr(e,t),this.setVideoBoxClassName(e),this.createVideoBoxDirectURL(e),t.logger_url=this.createVideoBoxClickUrl(e.video_data,e.directURL),e.setAttribute("data-item-title",t.title),this.setVideoBoxDetailsOrder(e,r||null),this.createDetailsLabelsContainers(e)},a.prototype.createDetailsLabelsContainers=function(e){var t=0;e.pre_detail_order.length>0&&(this.createVideoBoxPreThumbnailLink(e),t++),e.detail_order.length>0&&(this.createVideoBoxAfterThumbnailLink(e),t++),t>1&&TRC.dom.addClass(e,"trc-split-label")},a.prototype.setVideoBoxClassName=function(e){var t=0,r=this.isResponsive,i=this.trc.getProperty(this.mode_name,"orientation",this.propertiesOverride),o=TRC.SYNDICATED_CLASS_NAME;this.setVideoBoxClassName=function(e){var n=e.video_data;e.className="videoCube "+"trc_spotlight_item "+"origin-"+n.origin+" thumbnail_"+e.thumbnail_position+(n.isSyndicated?" "+o:"")+(n["is-in-network"]?" inNetworkItem":"")+(n["is-native"]?" tabNativeItem":"")+(n.isPhoto?" photoItem":"")+(n.isText?" textItem":"")+" "+(r?"videoCube_"+(t+=1)+"_child":i)},this.setVideoBoxClassName(e)},a.prototype.setVideoBoxDetailsOrder=function(e,t){var r=t||this.trc.getProperty(this.mode_name,"detail-order"+(e.video_data.isSyndicated?"-syndicated":""),this.propertiesOverride),i=this.trc.getProperty(this.mode_name,"before-detail-order"+(e.video_data.isSyndicated?"-syndicated":""),this.propertiesOverride);e.detail_order=r?r.split(","):[],e.pre_detail_order=i?i.split(","):[]},a.prototype.createVideoBoxAfterThumbnailLink=function(e){var t=e.video_data,r=e.getAttribute("data-item-title"),i=this.createVideoLink(t,r,e);if(e.gridComponent instanceof TblAppInstallGrid)return e.labelsBox=e.gridComponent,e.gridComponent.setWrapperLink(i),void(e.link=i);e.labelsBox=this.createVideoBoxLabels(i),e.appendChild(i),e.link=i,TRC.dom.addClass(i,"item-label-href"),TRC.dom.addClass(e.labelsBox,"trc-main-label")},a.prototype.createVideoBoxPreThumbnailLink=function(e){if(e.gridComponent instanceof TblAppInstallGrid)e.preLabelsBox=e.gridComponent;else{var t=e.video_data,r=e.getAttribute("data-item-title"),i=this.createVideoLink(t,r,e);e.preLabelsBox=this.createVideoBoxLabels(i),e.appendChild(i),e.preLink=i,TRC.dom.addClass(i,"item-label-href"),TRC.dom.addClass(e.preLabelsBox,"trc-pre-label"),TRC.dom.addClass(e,"item-has-pre-label")}},a.prototype.appendVideoBoxImage=function(e){try{(null!=e.img_src||this.trc.global["thumb-lazy-load-switch"])&&(void 0===e.image_div?(TRC.dispatch("item-image-loaded",{videoData:e.video_data,container:e}),e.thumbBlock.style.backgroundImage="URL('"+e.img_src+"')"):(e.thumbBlock.appendChild(e.image_div),e.image_div.appendChild(e.img),e.img.style.visibility="visible"))}catch(e){__trcError("Pager thumbnail images fixing errors",e)}},a.prototype.pasreRecommendationList=function(e,t,r,i,o){var n,a;this.stopBoxRendering=!1;for(var s=0;s<e;s++){TRC.tlf&&0===s&&console.time("item rendering"),(n=this.recommendationList[s]).itemIndex=s,null==this.firstVideo&&"video"==n.type&&(this.firstVideo=n);try{this.trc.runHook(this,this.mode_name,"item-data-filter",this.propertiesOverride,!1,n),this.fixHeight&&!this.stopBoxRendering?(a=this.drawResponsiveVideoBox(r,n,t,this.orientation,null,null,i,o),this.stopBoxRendering=this.hasMaxHeightExploitation(parseInt(document.trcGetCurrentStyle(this.container,"height"),10),this.fixHeight),this.stopBoxRendering&&this.safeRemoveItem(a)):this.fixHeight||this.drawResponsiveVideoBox(r,n,t,this.orientation,null,null,i,o)}catch(e){__trcError("Error in pasreRecommendationList",e)}TRC.tlf&&0==s&&console.timeEnd("item rendering")}},a.prototype.safeRemoveItem=function(e){var t=e.parentNode;TRC.dom.clearInnerElements(e),t.removeChild(e)},a.prototype.hasMaxHeightExploitation=function(e,t){return t<=e},a.prototype.fixResponsiveVideoBoxes=function(){for(var e=this.boxes,t=0,r=e.length;t<r;t++)this.fixResponsiveBoxTitleAndDesc(e[t])},a.prototype.generateResponsiveOuters=function(e){if(null==this.listContainer){this.header=this.generateHeader(e);var r=t.createElement("div");r.id=this.id.replace("trc_","outer_"),r.className="trc_rbox_outer",this.generateResponsiveRBoxDiv(r),e.appendChild(r),this.outerBox=r,this.addTaboolaLogo(),e.style.display="block",__trcInfo("Start Rendering "+(this.response.trc?this.response.trc.placement:""))}},a.prototype.generateResponsiveRBoxDiv=function(e){var r=t.createElement("div");r.id=this.getListId(),r.className="trc_rbox_div trc_rbox_border_elm",e.appendChild(r),this.listContainer=r},a.prototype.getSpecificExternalTrackingURLsList=function(e,t){var r=this.response.trc["video-list"].video,i=[],o;try{for(var n=0;r&&n<r.length;n++)t&&t.indexOf(r[n]["item-id"])>-1&&(o=this.getItemExternalTrackingURLsList(r[n])).hasOwnProperty(e)&&(i=i.concat(o[e]));return i}catch(e){return __trcError("Error in TRCRBox.getSpecificExternalTrackingURLsList"),[]}},a.prototype.getAllExternalTrackingURLsList=function(){var e=this.response.trc["video-list"].video,t;try{if(!this.externalTrackingURLsList){this.externalTrackingURLsList={};for(var r=0;e&&r<e.length;r++)for(var i in t=this.getItemExternalTrackingURLsList(e[r]))t.hasOwnProperty(i)&&(this.externalTrackingURLsList[i]||(this.externalTrackingURLsList[i]=[]),this.externalTrackingURLsList[i]=this.externalTrackingURLsList[i].concat(t[i]))}return this.externalTrackingURLsList}catch(e){return __trcError("Error in TRCRBox.getAllExternalTrackingURLsList"),{}}},a.prototype.getItemExternalTrackingURLsList=function(e){var t=e["item-id"],r=e["itp"],i,o,n,a={};if(!t)return __trcDebug("Item does not have id. External tracking pixel will not be sent if defined"),[];try{if(this.externalTrackingURLsListByItemId||(this.externalTrackingURLsListByItemId={}),!this.externalTrackingURLsListByItemId[t]){for(var s=0;r&&s<r.length;s++)o=(i=r[s])["t"],n=i["u"],o&&n&&(a[o]||(a[o]=[]),a[o].push(n));this.externalTrackingURLsListByItemId[t]=a}return this.externalTrackingURLsListByItemId[t]}catch(e){return __trcError("Error in TRCRBox.getItemExternalTrackingURLsList"),[]}},a.prototype.sendPlacementTrackingPixelsOnce=function(e,t,r){r?this.sendSpecificTrackingPixelsOfType(e,t):this.trc.log1(e,{ri:this.response.trc.req},null,null,this.placement,t?this.sendSpecificTrackingPixelsOfType.trcBind(this,e,t):this.sendAllTrackingPixelsOfType.trcBind(this,e))},a.prototype.sendAllTrackingPixelsOfType=function(e){this.trc.sendExternalTracking(this.getAllExternalTrackingURLsList()[e])},a.prototype.sendTrackingPixelsForSpecificItem=function(e,t){e&&t&&this.trc.log1(e,{ri:this.response.trc.req,ii:t,li:this.getListId()},null,null,null,this.sendSpecificTrackingPixelsOfType.trcBind(this,e,[t]))},a.prototype.sendSpecificTrackingPixelsOfType=function(e,t){this.trc.sendExternalTracking(this.getSpecificExternalTrackingURLsList(e,t))},a.prototype.shouldUseSmartEllipsis=function(){return this.trc.global["smart-ellipsis"]&&("enableAndOverrideModeFlag"===this.trc.global["smart-ellipsis"]||this.trc.getProperty(this.mode_name,"smart-ellipsis"))},a.prototype.getEffectiveResponsiveRule=function(t,r,i){if(t=t||this.responsiveRules,r=r||"min",i=i||"max","function"!=typeof e["matchMedia"]||!this.isResponsive||!t)return null;for(var o=0;o<t.length;o++)if(e["matchMedia"]("screen and (min-width: "+t[o][r]+"px)"+(isNaN(t[o][i])?"":" and (max-width: "+t[o][i]+"px)")).matches)return t[o];return null},a.prototype.getCurrentListSize=function(){var e=this.trc.getProperty(this.mode_name,"responsive-rules",this.propertiesOverride),t=this.getEffectiveResponsiveRule(e,"minWidth","maxWidth");return this.isResponsive&&t?t.rows*t.cells:this.trc.getListSize(this)},a.prototype.drawImageIframe=function(e,t,r){t=t||"",r=r&&r.replace(/&redir=[^&]*/,"")+"&redir=",e.innerHTML=t.replace("${CLICK_URL_ESC}",encodeURIComponent(r))},a.prototype.getWidgetToFeedHelper=function(){return this.parentFeed&&this.parentFeed.widgetToFeedHelper},a.prototype.getPublisherBrandingName=function(){if(!this.publisherBrandingText){var e=this.trc.getPublisherVersionPropertyWithFallbackToNetwork("publisher-branding")||"";this.publisherBrandingText=TRC.text.encodeHTML(e)||this.trc.getSiteNameOgValue()||""}return this.publisherBrandingText},a.prototype.sendAvailableEvent=function(e,t,r,i){var o=this.isResponseFromCache()&&!this.trc.global["send-available-for-cached-response"],n=this.trc.isRemovedWidget(this.response.trc["video-list"]);if(!o&&!n)if(!i&&this.trc.isDeferredAvailable){TRC.performance&&TRC.performance.mark("8.0.1."+this._id);var a=this.sendEvent.trcBind(this,"available",this.util.merge(e,{df:1}),t.getAll(),!0);r?TRC.Timeout.set(a,0):this.postRenderQueue.pushBack("available",a)}else this.sendEvent("available",e,t.getAll(),!0)},a.prototype.sendRequiredViewabilityAvailableEvent=function(e,t,r){var i=t.getSpecificItemsPostData([r]);this.sendEvent("required-viewability-available",e,i.getAll()),this.trc.global["enable-rv-available"]&&this.rvAvailableIds&&this.rvAvailableIds.length>0&&this.sendTrackingPixelsForSpecificItem("i",r)},a.prototype.isResponseFromCache=function(){return this.response&&this.response.cached},a.prototype.getModeClientProperty=function(e){return this.trc.getProperty(this.mode_name,e,this.propertiesOverride)},a.prototype.setRequiredViewabilityAvailableObserver=function(e,t,r,i,o,n){this.trc.global["enable-rv-available"]&&e&&!this.isProviderIframe&&!this.isExistDisplayInSlot&&(this.trc.global["rv-available-for-reco-reel"]&&TRC.RecommendationReel.shouldInitRecommendationReel(this)?TRC.RecommendationReel.setRVAvailableListener(this,t,r,i,o):n&&this.setRVAvailableObserverByMargin(t,r,i,o,n))},a.prototype.setRVAvailableObserverByMargin=function(e,t,r,i,o){var n={rvpm:o};this.util.merge(n,r);var a={targetElement:e,rootMargin:o+"px",onEnter:function(){TRC.dom.closest(e,".tbl-invisible")||(this.sendRequiredViewabilityAvailableEvent(n,t,i),TRC.intersections.unobserve(e.getAttribute("rvAvailableObserverTargetId")))}.bind(this)};e.setAttribute("rvAvailableObserverTargetId",TRC.intersections.observe(a))}}(window,document),function(e,t){var r=TRC.URL=function(e){var t=TRC.text.lsplit;if(!e)throw new Error("Invalid URL!");this.href=e;var r=t(e,"#",2);return this.hash=r.length>1?"#"+r.pop():"",r=t(e=r[0],"?",2),this.search=r.length>1?"?"+r.pop():"",r=t(e=r[0],"://",2),this.protocol=r.length>1?r.shift()+":":"",r=t(e=r[0],"/",2),this.pathname=r.length>1?"/"+r.pop():"/",r=t(e=r[0],"@",2),this.auth=r.length>1?r.shift():"",r=t(e=r[0],":",2),this.port=r.length>1?parseInt(r.pop()):0,this.host=r[0],this},i={"http:":1,"https:":1};r.prototype.toString=function(e){return(this.host?this.protocol+"//"+(this.auth?this.auth+"@":"")+this.host+(this.port?":"+this.port:""):"")+this.pathname+this.search+(e?"":this.hash||"")},r.prototype.switchProtocol=function(e,t){var r=this instanceof TRC.URL?this:new TRC.URL(this),o;return i[e]&&(t&&"https:"==r.protocol||(r.protocol=e)),(o=r.toString(!1)).length>1?o:""},r.prototype.getParameter=function(e,t){var r=TRC.URL.prototype.getQueryStringObj.call(this);for(var i in r)if(unescape(i)==e)return t?t(r[i]):unescape(r[i]);return null},r.prototype.getQueryStringObj=function(){for(var e,t=(this instanceof TRC.URL?this:new TRC.URL(this)).search.substr(1).split(/&/),r={},i=0;i<t.length;i++)if(t[i]){var o=t[i].split(new RegExp("="),2);r[o[0]]=o[1]}return r},r.prototype.addParamsToUrl=function(e,t){var r=e.split("#");return r[0]+(r[0].search("\\?")>=0?"&":"?")+t+(r[1]?"#"+r[1]:"")},r.prototype.removeParamFromUrl=function(e,t){var r=e.split("?");if(r.length>=2){for(var i=r[0],o,n=[],a=r[1].split("&"),s=0;s<a.length;s++){var l;a[s].split("=")[0]!==t&&n.push(a[s])}return n.length>0?i+"?"+n.join("&"):i}return e},r.prototype.removeAllUrlParametersAndFragment=function(e){var t=e.indexOf("?"),r=-1!==t?e.substr(0,t):e,i=r.indexOf("#");return-1!==i?r.substr(0,i):r}}(window,document),function(e,t){e.TRC=e.TRC||{},TRC.UserIdMerger={notifyPossibleUserChange:function(e,t,r,i){var o,n,a;e.global["rbox-enable-fix-user-id-event"]&&(o=TRC.pageManager.getValue("user-id"),n=TRC.pageManager.getPublisherValue(t,"session-data"),this.multipleUsersExist(r,o)&&this.sendUserIdFixEvent(e,o,r,n,i))},multipleUsersExist:function(e,t){return t&&e&&t!==e},sendUserIdFixEvent:function(e,t,r,i,o){var n={time:(new Date).getTime(),fromUser:t,toUser:r,fromSD:i,toSD:o};e.sendEvent("fix-user-id",n)}}}(window,document),((e,t,r)=>{const i={cancel:"CANCEL",goto:"GO TO"},o=(r=r||{dom:{stopEvent(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},on(e,t,r){e.addEventListener(t,r)},addClass(e,t){e.className+=` ${t} `},removeClass(e,t){const r=new RegExp(`s*${t}`,"g");e.className=e.className.replace(r,"")}},global:{"p-video-overlay-send-events":!1}}).dom;TRC._translationQueue=TRC._translationQueue||[],TRC._translationQueue.push({"p-video-overlay":i});let n={},a;const s=function(e,t){if(!a)return;const i={itemId:t["item-id"],publisher:t.publisher,syndicatorId:t["syndicator-id"]};TRCImpl.sendAbTestEvent&&TRCImpl.sendAbTestEvent(e,__trcJSONify(i)),r.modDebug.logMessageToServer(1,e,i)},l=function(e){if(!e||!e.length)return"";const t=e.replace(/(^\w+:|^)\/\//,"");return t.replace(/\/.*/,"")},c=function(e){const t=e.className.match(/p-video-overlay-show/);o[t?"removeClass":"addClass"](e,"p-video-overlay-show")},d=function(e,t){c(t.currentTarget.firstElementChild),void 0===t.gotoSyndicator&&s("p-video-overlay__display-overlay",e),t.gotoSyndicator||o.stopEvent(t)},p=function(e,t,r){s(t.msg,e),r.gotoSyndicator=t.flag},h=function(e,t,r){const i=o.createHTMLElement("div",{className:e||""});return"function"==typeof t&&o.on(i,"click",t),r&&r.length&&r.forEach&&r.forEach(e=>{i.appendChild(e)}),i},u=function(e){const t=o.createHTMLElement("span",{className:"p-video-back-action-label",innerText:n.cancel||i.cancel}),r=h("p-video-overlay-action p-video-back-action",p.bind(this,e,{msg:"p-video-overlay__hide-overlay",flag:!1}),[t]);return r},m=function(e){const t=o.createHTMLElement("span",{className:"p-video-goto-action-label",innerText:n.goto||i.goto}),r=o.createHTMLElement("span",{className:"p-video-goto-action-url",innerHTML:e["branding-text"]}),a=h("p-video-overlay-action p-video-goto-action",p.bind(this,e,{msg:"p-video-overlay__go-to-syndicator-page",flag:!0}),[t,r]);return a},g=function(e){const t=u(e),r=m(e),i=h("p-video-overlay",null,[r,t]);return i},b=function(e,t,r){const o=g(e);a=r,n=TRC.translationManager.getLabel({feature:"p-video-overlay"})||i;const l=h("p-video-overlay-container",d.bind(this,e),[o]);return s("p-video-overlay__overlay-created-on-item",e),l};r.pVideoOverlay={create:b,createVideoPlayerOverlayElement:g,createActionElement:h,createGotoActionElement:m,createBackActionElement:u,actionClickHandler:p,videoOverlayClickHandler:d,videoOverlayToggleDisplay:c,stripUrl:l,sendDebugEvent:s}})(window,document,TRC),(()=>{class BaseVideoUnitLoader{constructor(e){this.videoConfig=e}loadUnit(videoCallbackData){TRC.performance&&TRC.performance.mark("videoEvalBaseLoadUnitStart",null,"","","videoEvalBaseLoadUnitTime",TRC.PerfEvenType.START);const unit=eval(videoCallbackData.tags[0].url);TRC.performance&&TRC.performance.mark("videoEvalBaseLoadUnitStop",null,"","","videoEvalBaseLoadUnitTime",TRC.PerfEvenType.STOP);const{rawJsonValue:rawJsonValue}=this.videoConfig;return this.setUnitParams(unit,rawJsonValue),unit}getVideoContainerSelector(){return null}setUnitParams(e){const{advancedVideoConfiguration:t}=this.videoConfig,r={detachToSlider:!0,unitType:!0,parentFeedOptions:!0,rawJsonValue:!0};Object.keys(this.videoConfig).forEach(t=>{this.videoConfig[t]&&(r[t]||e.set(t,this.videoConfig[t]))}),BaseVideoUnitLoader.setAdvancedVideoConfiguration(e,t);const i=this.videoConfig.aggLevel||1,o={level:i};i>1&&e.set("preset",o)}static setAdvancedVideoConfiguration(e,t){t&&Object.keys(t).forEach(r=>{const i=TRC.text.splitAndJoin(r,TRC.text.toLowerCamelCase);BaseVideoUnitLoader.setToUnit(e,t,r,i)})}static setToUnit(e,t,r,i){const o={unitType:!0,parentFeedOptions:!0,rawJsonValue:!0};"IN_WIDGET"!==t.unitType&&(o.detachToSlider=!0);const n={"additionalCss.zIndex":"additionalCss.z-index"};o[i]||(n[i]?e.set(n[i],t[r]):e.set(i,t[r]))}}TRC.BaseVideoUnitLoader=BaseVideoUnitLoader})(),(()=>{class SingleVideoManagerUnitLoader extends TRC.BaseVideoUnitLoader{constructor(e,t){super(e),this.trcManager=t,this.parentFeedOptions=e.parentFeedOptions}loadUnit(videoCallbackData){TRC.performance&&TRC.performance.mark("videoEvalSingleManagerLoadUnitStart",null,"","","videoEvalSingleManagerLoadUnitTime",TRC.PerfEvenType.START);const unit=eval(videoCallbackData.tags[0].url);return TRC.performance&&TRC.performance.mark("videoEvalSingleManagerLoadUnitStop",null,"","","videoEvalSingleManagerLoadUnitTime",TRC.PerfEvenType.STOP),this.setUnitParams(unit),unit}getVideoContainerSelector(){return null}setUnitParams(e){super.setUnitParams(e);const t=this.videoConfig.distanceRepeat||0,r=TRC.util.isTrue(this.videoConfig.startFromSlider),i=TRC.util.isTrue(this.videoConfig.detachToSlider),o=TRC.util.isTrue(this.videoConfig.detachToSliderAnimation),n=this.videoConfig.videoAbTest||null,a=this.videoConfig.startCard||null,s=this.videoConfig.maxVideoCards||null,l=this.videoConfig.permanentCard||null,{feedDynamicParameters:c}=this.parentFeedOptions,d=c&&c.videoDisclosurePosition||this.parentFeedOptions.videoDisclosurePosition||this.trcManager.global["video-disclosure-position"],p=this.parentFeedOptions&&this.parentFeedOptions.uiDesignVersion;e.set("distanceRepeat",t),e.set("detachToSlider.isStartFromSlider",r),e.set("detachToSlider.isDetachToSlider",i),e.set("detachToSlider.animation",o),e.set("abTest",n),a&&e.set("startCard",a),s&&e.set("maxVideoCards",s),l&&e.set("permanentCard",l),d&&e.set("components.adChoice.position",d),p>=3&&(e.set("components.adChoice.title.style.color","#999999"),e.set("components.adChoice.title.logoStyle.display","none"))}}TRC.SingleVideoManagerUnitLoader=SingleVideoManagerUnitLoader})(),(()=>{class SliderVideoUnitLoader extends TRC.BaseVideoUnitLoader{loadUnit(videoCallbackData){let unit;TRC.performance&&TRC.performance.mark("videoEvalSliderLoadUnitStart",null,"","","videoEvalSliderLoadUnitTime",TRC.PerfEvenType.START);try{unit=eval(videoCallbackData.tags[0].url)}catch(e){__trcWarn(`video debug: SliderVideoUnitLoader loadUnit ${TRCImpl.experimentsData&&TRCImpl.experimentsData["2"]||""}`,e)}return TRC.performance&&TRC.performance.mark("videoEvalSliderLoadUnitStop",null,"","","videoEvalSliderLoadUnitTime",TRC.PerfEvenType.STOP),this.setUnitParams(unit),unit}getVideoContainerSelector(){return null}setUnitParams(e){super.setUnitParams(e)}}TRC.SliderVideoUnitLoader=SliderVideoUnitLoader})(),(()=>{class StandaloneVideoUnitLoader extends TRC.BaseVideoUnitLoader{constructor(e,t){super(e),this.options=t}loadUnit(videoCallbackData,videoContainer){this.setCmTag(videoContainer),TRC.performance&&TRC.performance.mark("videoEvalStandaloneLoadUnitStart",null,"","","videoEvalStandaloneLoadUnitTime",TRC.PerfEvenType.START);const unit=eval(videoCallbackData.tags[0].url);return TRC.performance&&TRC.performance.mark("videoEvalStandaloneLoadUnitStop",null,"","","videoEvalStandaloneLoadUnitTime",TRC.PerfEvenType.STOP),this.setupVideo(videoContainer,unit),unit}getVideoContainerSelector(e){return e&&e.id?`#${e.id}`:(__trcWarn("Cannot get a selector for standalone video container - Taboola publisher container must be defined and have an ID"),null)}setCmTag(e){window.cmTag.set("isCustomEvents",!0),window.cmTag.set("width",e.getBoundingClientRect().width),window.cmTag.set("customization",this.options.videoCssCustomization)}setupVideo(e,t){let r=!1;const i=TRC.util.isTrue(this.videoConfig.startFromSlider),o=TRC.util.isTrue(this.videoConfig.detachToSlider),n=TRC.util.isTrue(this.videoConfig.detachToSliderAnimation),a=function(){!r&&TRC.visibility.isInViewPortWithOffset(e,-50)&&(t.play&&"function"==typeof t.play&&t.play(e),r=!0,TRC.dispatch("trcContentReady",{container:e}),TRC.dom.off(window,"scroll",a))};t.set("detachToSlider.isStartFromSlider",i),t.set("detachToSlider.isDetachToSlider",o),t.set("detachToSlider.animation",n),t.on("ready",()=>{a(),r||TRC.dom.on(window,"scroll",a)})}}TRC.StandaloneVideoUnitLoader=StandaloneVideoUnitLoader})(),(()=>{class VideoAsItemUnitLoader extends TRC.BaseVideoUnitLoader{constructor(e,t,r){super(e),this.options=t,this.rbox=r,this.allowExpandInViewport=TRC.util.isTrue(e.allowExpandInViewport),this.replaceWidgetItems=TRC.util.isTrue(e.replaceWidgetItems),this.disableFitToSizeForSingleColumn=TRC.util.isTrue(e.disableFitToSizeForSingleColumn),this.isContainerRatioValidForTakeOver=!1,this.getContainerDimensions(t.container)}loadUnit(videoCallbackData,videoContainer){const itemsToHide=this.getSponsoredItemsToHide();let unit;if(!this.replaceWidgetItems||itemsToHide&&itemsToHide.length){const slotItem=this.getSlotWidgetItem();if(slotItem){const slotItemComputedStyle=getComputedStyle(slotItem);this.setCmTag(slotItem,slotItemComputedStyle),TRC.performance&&TRC.performance.mark("videoEvalItemLoadUnitStart",null,"","","videoEvalItemLoadUnitTime",TRC.PerfEvenType.START),unit=eval(videoCallbackData.tags[0].url),TRC.performance&&TRC.performance.mark("videoEvalItemLoadUnitStop",null,"","","videoEvalItemLoadUnitTime",TRC.PerfEvenType.STOP),this.setUnitParams(unit),this.setupVideo(unit,itemsToHide,videoContainer,slotItemComputedStyle)}}return unit}getVideoContainerSelector(e){const t=this.createVideoContainer(e);return t?`#${t.id}`:null}createVideoContainer(e){const t=document.createElement("figure"),r=this.getSlotWidgetItem(),i=r&&r.parentNode;return r&&i&&e?(e.id?t.id=e.id:t.id=Math.floor(2147483648*Math.random()).toString(36),t.id+="-video",i.insertBefore(t,r),t):(__trcWarn("Could not create video container selector for integrated widget - nowhere to append the video container"),null)}setCmTag(e,t){const r=this.getUnitContainerStyle(e,t);window.cmTag.set("isCustomEvents",!0),window.cmTag.set("width",parseInt(r.width,10)),window.cmTag.set("customization",this.getUnitCustomization(e,r)),window.cmTag.set("isFitToSize",this.isFitToSizeVideo()),window.cmTag.set("openingEffect",this.videoConfig.expandEffect),window.cmTag.set("isContainerRatioNotValidForTakeOver",!this.isContainerRatioValidForTakeOver),window.cmTag.set("rboxContainerRatio",this.containerRatio)}getUnitCustomization(e,t){const r={};if(r.unitContainer=t,!this.isFitToSizeVideo()){const t=e.querySelector(".thumbBlock_holder"),i=e.querySelector(".video-label-box .video-title"),o=e.querySelector(".video-label-box .branding");r.placeHolder=getComputedStyle(t),r.titleContainer={title:getComputedStyle(i),branding:getComputedStyle(o)}}return r}isFitToSizeVideo(){if(!this.disableFitToSizeForSingleColumn)return!0;const e=this.rbox.getEffectiveResponsiveRule();return!e||1!==e.cells}getUnitContainerStyle(e,t){const r=parseFloat(t.marginLeft),i=parseFloat(t.marginRight),o=parseFloat(t.width),n=this.getNumOfSlotsToOccupy(),a=Math.ceil(o*n+(r+i)*(n-1));return{width:`${a}px`,height:t.height}}setTakeOverUnitContainerStyle(e,t){const r=this.getUnitContainerStyle(e,t),i=this.rbox.getEffectiveResponsiveRule(),o=parseFloat(t.marginTop),n=parseFloat(t.marginBottom),a=parseFloat(t.height),s=i.rows;r.height=Math.ceil(a*s+(o+n)*(s-1)),TRC.dispatch("widgetTakeoverSizeChange",{width:parseInt(r.width,10),customization:this.getUnitCustomization(e,r)})}setupVideo(e,t,r,i){const{allowExpandInViewport:o}=this,n=this.rbox.container;let a=this.getSlotWidgetItem();this.setVideoContainerInitialStyle(r,i),e.on("ready",i=>{if(i&&i.isTakeoverWidget&&i.isContainerRatioValidForTakeOver){this.setPlacementSingleAdConf(),a=this.getMaxHeightSlot();const e=getComputedStyle(a);this.setTakeOverUnitContainerStyle(a,e),this.setVideoContainerInitialStyle(r,e),r.style.zIndex=999}!o&&TRC.visibility.isInViewPortWithOffset(a,0)||(n&&TRC.dom.addClass(n,"iw_video_frame"),this.replaceWidgetItems?t&&t.length?(parseInt(this.videoConfig.expandEffect,10)?e.on("renderAnimation:completed",VideoAsItemUnitLoader.displayVideoInsteadOfItems.trcBind(this,r,t)):VideoAsItemUnitLoader.displayVideoInsteadOfItems(r,t),e.play&&"function"==typeof e.play&&e.play(r)):__trcDebug("Not enough sponsored items to hide - aborting integrated widget video load"):e.play&&"function"==typeof e.play&&e.play(r))})}setVideoContainerInitialStyle(e,t){const r=this.getSlotWidgetItem(),i=parseFloat(t.marginLeft),o=this.getOuterRBoxComputedStyle(),n=parseFloat(o.marginLeft),a=r.offsetLeft-i-(n+i);e.style.position="absolute",e.style.float=t.float,e.style.top=`${r.offsetTop}px`,e.style.left=`${a}px`,e.style.width="auto",e.style.marginLeft=t.marginLeft,e.style.marginRight=t.marginRight,e.style.marginTop=t.marginTop,e.style.marginBottom=t.marginBottom,this.replaceWidgetItems||(e.style.zIndex=90)}getOuterRBoxComputedStyle(){const e=this.rbox.outerBox;return getComputedStyle(e)}static displayVideoInsteadOfItems(e,t){VideoAsItemUnitLoader.hideWidgetItems(t),e.style.position="static"}static hideWidgetItems(e){e.forEach(e=>{e.style.display="none",e.style.visibility="hidden"})}getSlotWidgetItem(){if(this.slotWidgetItem)return this.slotWidgetItem;const e=this.getWidgetItems(),t=this.getInsertionPointSlotNumber()-1;return isNaN(t)?void 0:this.slotWidgetItem=e[t]}getInsertionPointSlotNumber(){const e=this.getWidgetItems(),t=parseInt(this.videoConfig.slot,10);if(void 0!==this.insertionPointSlotNumber)return this.insertionPointSlotNumber;if(!isNaN(t)&&t>0){if(this.allowExpandInViewport)return this.insertionPointSlotNumber=t;let r;for(let i=t;i<=e.length;i++)if(r=i-1,!TRC.visibility.isInViewPortWithOffset(e[r],0))return this.insertionPointSlotNumber=i}return __trcWarn(`video tag loader - unknown slot (${t}) for integrated widget implementation`),null}getSponsoredItemsToHide(){const e=this.getWidgetItems(),t=this.getInsertionPointSlotNumber(),r=this.getNumOfSlotsToOccupy(),i=[];let o=e.length,n,a;for(;o>=t;o--)if((n=e[a=o-1]).video_data["is-syndicated"]&&null!==n.offsetParent&&(i.push(n),i.length===r))return i;return __trcWarn("video tag loader - didn't find enough sponsored items for integrated widget replacement"),null}getWidgetItems(){return this.rbox.boxes}getNumOfSlotsToOccupy(){const e=this.videoConfig.slotMaxSize||2,t=this.getInsertionPointSlotNumber();if(void 0===this.numOfSlotsToOccupy){const r=this.rbox.getEffectiveResponsiveRule();if(r){const i=t%r.cells||r.cells,o=r.cells-i+1;this.numOfSlotsToOccupy=Math.min(o,e)}else this.numOfSlotsToOccupy=e}return this.numOfSlotsToOccupy}setPlacementSingleAdConf(){this.videoConfig.slot=1,this.videoConfig.slotMaxSize=99,this.slotWidgetItem=null,this.insertionPointSlotNumber=void 0,this.numOfSlotsToOccupy=void 0,this.isTakeoverWidget=!0}getContainerDimensions(e){if(e){const t=e.getBoundingClientRect();this.containerWidth=t.width,this.containerHeight=t.height,this.containerRatio=this.containerWidth/this.containerHeight,this.containerRatio<2.36&&this.containerRatio>1&&(this.isContainerRatioValidForTakeOver=!0)}}getMaxHeightSlot(){const e=this.getWidgetItems();let t=-1,r=e[0];for(let i=0;i<e.length;i++){const o=parseInt(getComputedStyle(e[i]).height,10);o>t&&(t=o,r=e[i])}return r}}TRC.VideoAsItemUnitLoader=VideoAsItemUnitLoader})(),(()=>{class WidgetAdjacentVideoUnitLoader extends TRC.BaseVideoUnitLoader{loadUnit(videoCallbackData){TRC.performance&&TRC.performance.mark("videoEvalWidgetLoadUnitStart",null,"","","videoEvalWidgetLoadUnitTime",TRC.PerfEvenType.START);const unit=eval(videoCallbackData.tags[0].url);return TRC.performance&&TRC.performance.mark("videoEvalWidgetLoadUnitStop",null,"","","videoEvalWidgetLoadUnitTime",TRC.PerfEvenType.STOP),this.setUnitParams(unit),unit}getVideoContainerSelector(e){if(this.videoConfig.position){const t=this.createVideoContainer(e);return`#${t.id}`}return null}createVideoContainer(e){const t=document.createElement("div"),r=e._trc_container;if(e.id?t.id=e.id:t.id=Math.floor(2147483648*Math.random()).toString(36),t.id+="-video",!r)return __trcWarn("Cannot generate a selector for widget adjacent video container - widget container is not found"),null;let i;switch(this.videoConfig.position){case"above":i=r;break;case"below":i=r.nextSibling;break;default:__trcWarn(`Unknown position in video config: ${this.videoConfig.position}`)}return e.insertBefore(t,i),t}}TRC.WidgetAdjacentVideoUnitLoader=WidgetAdjacentVideoUnitLoader})(),TRC.InvokeVideoLoader=function(){var e=50;TRC.VideoLoader=function e(t,r,i,o,n){this.trcManager=t,this.videoConfig=r,this.placement=i,this.unifiedPlacement=r.unifiedPlacement,this.taboolaContainer=o,this.trcResponse=n,this.consentData=t.consentState||TRC.consentData||{},this.genieVideoLayers=this.trcManager.global["genie-video-layers"]||[50,61,62]},TRC.VideoLoader.prototype.CALLBACK_NAME_PREFIX="videoCallback",TRC.VideoLoader.prototype.valueOrEmptyString=function(e){return null!==e&&void 0!==e?e:""},TRC.VideoLoader.prototype.loadVideo=function(e){if(t(this.videoConfig))__trcDebug("video loader - not loading. Filler detected");else if(TRC.botDetected)__trcDebug("video loader - not loading. Bot detected.");else if(this.blockVideo)__trcDebug("video loader - not loading. Video was blocked due to configuration.");else{if(!TRC.Browser["ieUpto"](10)){var o=this.genVideoCallback(e);if(this.trcManager.global["use-unit-fetcher-response-instead-of-tb"]&&this.videoConfig.unitFetcherResponse)return r(this.videoConfig.unitFetcherResponse,o),!0;var n=this.videoConfig.scriptUrlTemplate,a=TRC.util.isTrue(TRCImpl.global["enable-video-ajax"]);TRC.pConsole("video loader","info","loading video for placement: "+this.placement);var s=TRC.URL.prototype.getParameter.call(location.href,"video-integration-variant");if(null===s&&(s=this.trcManager.global["video-integration-variant"]),n){var l=document.createElement("script");l.id=this.taboolaContainer.id+"-v-loader",l.src=i.trcBind(this,e,s,TRC.shiftDomain(n),o)(),TRC.performance&&TRC.performance.mark("videoJsonpRequestStart",null,"","","videoJsonpRequestTime",TRC.PerfEvenType.START),a?this.loadVideoByAjax(l.src,o):this.taboolaContainer.appendChild(l)}else TRC.pConsole("video loader","error","error while loading video for placement: "+this.placement+". missing script url template in response");return!0}__trcDebug("video loader - not loading. Unsupported browser.")}};var t=function(e){var t;return!!(TRCImpl.global["enable-filler-block"]&&e&&e.unitFetcherResponse&&e.unitFetcherResponse.indexOf("fillerResponse=true")>0)},r=function(e,t){var r={target:{status:200,readyState:XMLHttpRequest.DONE,responseText:t.toString()+"("+e.toString()+")"}},i;l(t)(r)},i=function(t,r,i,n){for(var s=0;s<this.genieVideoLayers.length;s++){var l=this.genieVideoLayers[s],c="{GENIE_VIDEO_"+l+"_VARIANT}";i=i.replace(c,this.valueOrEmptyString(this.getGenieVariantIdByLayer(l)))}return i.replace("{PUBLISHER_NAME}",TRC.publisherId).replace("{UNIT_TYPE}",encodeURIComponent(this.videoConfig.unitType)).replace("{UNIT_LOCATION}",encodeURIComponent(this.valueOrEmptyString(this.videoConfig.unitLocation))).replace("{SOURCE_PAGE_TYPE}",this.trcManager.getItemType()).replace("{PLACEMENT_NAME}",encodeURIComponent(this.getPlacementName())).replace("{UNIFIED_PLACEMENT_NAME}",encodeURIComponent(this.valueOrEmptyString(this.getUnifiedPlacementName()))).replace("{USER_ID}",TRC.pageManager.getUserId()).replace("{CALLBACK_NAME}",n).replace("{REFERRER}",encodeURIComponent(this.trcManager.getReferrer())).replace("{PAGE_URL}",encodeURIComponent(this.valueOrEmptyString(this.getItemUrlForVideo()))).replace("{CACHE_BUSTER}",this.getScriptCacheBuster()).replace("{PLATFORM}",this.valueOrEmptyString(this.videoConfig.platform)).replace("{NORM_PLATFORM}",this.valueOrEmptyString(this.videoConfig.fullyNormalizedPlatform)).replace("{COUNTRY}",this.valueOrEmptyString(this.videoConfig.country)).replace("{TAG_ID}",this.valueOrEmptyString(this.videoConfig.tagId)).replace("{VARIANT}",this.valueOrEmptyString(this.videoConfig.variant)).replace("{INTEGRATION_VARIANT}",this.valueOrEmptyString(r)).replace("{SESSION_ID}",this.valueOrEmptyString(this.trcManager.getSessionId())).replace("{SOURCE_ITEM_ID}",this.valueOrEmptyString(this.trcManager.getItemId())).replace("{VIEW_ID}",this.valueOrEmptyString(TRC.pageManager.getPageData())).replace("{GEO_LAT}",this.valueOrEmptyString((a("loc")||{}).lat)).replace("{GEO_ING}",this.valueOrEmptyString((a("loc")||{}).ing)).replace("{DEVICE_IFA}",this.valueOrEmptyString(this.trcManager.deviceId)).replace("{APP_ID}",this.valueOrEmptyString(a("appid"))).replace("{SESSION_DATA}",this.valueOrEmptyString(this.getSessionData())).replace("{REQUEST_ID}",this.valueOrEmptyString(this.getRequestId())).replace("{APP_NAME}",this.valueOrEmptyString(a("app"))).replace("{CONSENT_DAISY_BIT}",this.valueOrEmptyString(this.getConsentString())).replace("{GDPR_APPLIES}",this.valueOrEmptyString(this.getGdprApplies())).replace("{OPEN_EXCHANGE_ENABLED}",this.valueOrEmptyString(this.getOpenExchangeEnabled())).replace("{EXTERNAL_VIEW_ID}",this.valueOrEmptyString(this.getExternalViewId())).replace("{SOURCE_ITEM_ID}",this.valueOrEmptyString(this.getSourceItemId())).replace("{SOURCE_ITEM_ID_INT}",this.valueOrEmptyString(this.getSourceItemId())).replace("{PUBLISHER_ID}",this.valueOrEmptyString(this.getPublisherId())).replace("{SDK_NAME}",encodeURIComponent(this.valueOrEmptyString(a("sdkt")))).replace("{SDK_VERSION}",this.valueOrEmptyString(a("sdkv"))).replace("{OS}",encodeURIComponent(this.valueOrEmptyString(a("os")))).replace("{USER_ID_SOURCE}",this.valueOrEmptyString(this.getUserIdSource())).replace("{FAGG}",this.valueOrEmptyString(this.videoConfig.aggLevel||1)).replace("{CCPA_DNS}",this.valueOrEmptyString(this.getCcpaDoNotSell())).replace("{CCPA_PRIVACY}",this.valueOrEmptyString(this.getCcpaPrivacyString())).replace("{REGION}",this.valueOrEmptyString(this.getRegion())).replace("{HAS_GDPR_CONSENT}",this.valueOrEmptyString(this.getHasGDPRConsent())).replace("{TCF_VERSION}",this.valueOrEmptyString(this.getTCFVersion())).replace("{CMP_STATUS}",this.valueOrEmptyString(this.consentData.cmpStatus)).replace("{TABOOLA_NETWORK_ID}",this.valueOrEmptyString(this.getTaboolaNetworkId())).replace("{AB_TEST_PERCENT}",this.valueOrEmptyString(o("vidABTestPercent"))).replace("{AB_TEST_LAYER}",this.valueOrEmptyString(o("vidABTestLayer"))).replace("{GENIE_VIDEO_VARIANT}",this.valueOrEmptyString(this.getGenieVariantIdByLayer(e)))},o=function(e){try{var t;return TRC.URL.prototype.getParameter.call(n(),"tb_"+e,!1)}catch(e){return""}},n=function(){return window.TRCImpl.getItemUrlQueryString&&"function"==typeof window.TRCImpl.getItemUrlQueryString?window.TRCImpl.getItemUrlQueryString()||"":document.location.search},a=function(e){if(s()&&void 0!==TRCImpl.additional_data.sdkd[e])return TRCImpl.additional_data.sdkd[e]},s=function(){return void 0!==TRCImpl.additional_data&&void 0!==TRCImpl.additional_data.sdkd};TRC.VideoLoader.prototype.loadVideoByAjax=function(e,t){var r=new XMLHttpRequest;r.open("GET",this.addProtocolToUrl(e),!0),r.setRequestHeader("Content-Type","text/plain"),r.withCredentials=!0,r.addEventListener("readystatechange",l(t)),TRC.performance&&TRC.performance.mark("videoAjaxStart",null,"","","videoAjaxRoundtrip",TRC.PerfEvenType.START),r.send(null)},TRC.VideoLoader.prototype.addProtocolToUrl=function(e){return 0===e.indexOf("//")&&(e=TRC.PROTOCOL+e),e};var l=function(e){for(var t=e.split(".")||[],r=window,i=0;i<t.length;i++){var o=t[i];if(!r[o]){r=function(){};break}r=r[o]}return r};TRC.VideoLoader.prototype.generateCallbackName=function(){var e,t=this.getCallbacksObjectKey();return TRC[t]=TRC[t]||{},e=TRC[t].auto_gen_callback_seq=TRC[t].auto_gen_callback_seq+1||1,this.CALLBACK_NAME_PREFIX+e},TRC.VideoLoader.prototype.genVideoCallback=function(){throw new Error("This is an abstract method that should be inherited.")},TRC.VideoLoader.prototype.getCallbacksObjectKey=function(){throw new Error("This is an abstract method that should be inherited.")},TRC.VideoLoader.prototype.getItemUrlForVideo=function(){var e=[],t="",r,i,o,n,a;if(!(r=this.trcManager.getItemUrl()))return null;if(i=this.getVideoParametersToKeep(),(o=(o=this.getWindowLocationSearch()).substr(1)).length){e=o.split("&");for(var s=0;s<e.length;s++)(n=e[s].split("=")[0]).length&&-1!==i.indexOf(n)&&-1===r.indexOf(n.concat("="))&&(t=t.concat(n,"=",e[s].split("=")[1],"&"));t.length>=1&&(t=t.substring(0,t.length-1),t=(a=-1===r.indexOf("?")?"?":"&").concat(t)),r=r.concat(t)}return r},TRC.VideoLoader.prototype.getSessionData=function(){return this.trcResponse["session-data"]},TRC.VideoLoader.prototype.getRequestId=function(){return this.trcResponse["req"]},TRC.VideoLoader.prototype.getPlacementName=function(){return this.videoConfig.placement||this.placement},TRC.VideoLoader.prototype.getUnifiedPlacementName=function(){return this.unifiedPlacement},TRC.VideoLoader.prototype.getExternalViewId=function(){return this.videoConfig.rid},TRC.VideoLoader.prototype.getOpenExchangeEnabled=function(){return this.videoConfig.oee},TRC.VideoLoader.prototype.getSourceItemId=function(){return this.videoConfig.sii},TRC.VideoLoader.prototype.getScriptCacheBuster=function(){return(new Date).getTime().toString()},TRC.VideoLoader.prototype.getWindowLocationSearch=function(){return window.location.search||""},TRC.VideoLoader.prototype.getVideoParametersToKeep=function(){return this.trcManager.global["video-tag-keep-url-params"]||["vstaging","keyword","customTB"]},TRC.VideoLoader.prototype.getPublisherId=function(){return this.videoConfig.tpubid},TRC.VideoLoader.prototype.getUserIdSource=function(){return this.videoConfig.uis},TRC.VideoLoader.prototype.getCcpaDoNotSell=function(){return this.videoConfig.ccpaDns},TRC.VideoLoader.prototype.getCcpaPrivacyString=function(){return this.videoConfig.ccpaPrivacy},TRC.VideoLoader.prototype.getRegion=function(){return this.videoConfig.region},TRC.VideoLoader.prototype.getHasGDPRConsent=function(){return this.videoConfig.hasGDPRConsent},TRC.VideoLoader.prototype.getConsentDaisyBit=function(){return this.consentData.consentData||this.consentData.consentDaisyBit},TRC.VideoLoader.prototype.getTCFVersionByConsentStr=function(){return this.consentData.tcString?2:this.getConsentDaisyBit()?1:void 0},TRC.VideoLoader.prototype.getTCFVersionByMethodImpl=function(){return"function"==typeof window.__tcfapi?2:"function"==typeof window.__cmp?1:void 0},TRC.VideoLoader.prototype.getTCFVersion=function(){return this.videoConfig.tcfVersion||this.getTCFVersionByConsentStr()||this.getTCFVersionByMethodImpl()},TRC.VideoLoader.prototype.getConsentString=function(){return 2==this.getTCFVersion()?this.consentData.tcString:this.getConsentDaisyBit()},TRC.VideoLoader.prototype.getTaboolaNetworkId=function(){return this.videoConfig.tnetid},TRC.VideoLoader.prototype.getGenieVariantIdByLayer=function(e){return this.trcManager.experimentsData&&this.trcManager.experimentsData[e]?this.trcManager.experimentsData[e].split("|")[1]:null},TRC.VideoLoader.prototype.getGdprApplies=function(){return this.trcManager.global["video-gdpr-applies-use-requires-consent"]?this.videoConfig.gdprApplies:this.consentData.gdprApplies}},TRC.InvokeVideoTagLoader=function(){TRC.VideoTagLoader=function e(t,r,i,o,n){o&&"rbox-only-video"===o.mode&&(this.invisibleContainer="#"+i.container.id),this.blockVideo=this.shouldBlockVideoLoader(t.blockVideoLoader,t.global["block-video-prob"])||!t["before-video-load"](),this.blockVideo?t.sendAbTestEvent("blockedVideo",1):(TRC.VideoLoader.call(this,t,r,i.placement,i.container,n),this.options=i,this.videoConfig=r,this.videoConfig.isHip=this.isHip(o),this.videoConfig.rboxContainerId=o&&o.id,this.unitLoader=this.initUnitLoader(r,i,o,t))},TRC.VideoTagLoader.prototype=__trcObjectCreate(TRC.VideoLoader.prototype),TRC.VideoTagLoader.prototype.LOCATION_TYPES={ABOVE:"above",BELOW:"below",ITEM:"item",STANDALONE:"standalone",SINGLE_MANAGER:"singleManager"},TRC.VideoTagLoader.prototype.initUnitLoader=function(e,t,r,i){switch(e.position){case this.LOCATION_TYPES.STANDALONE:return new TRC.StandaloneVideoUnitLoader(e,t);case this.LOCATION_TYPES.ITEM:return new TRC.VideoAsItemUnitLoader(e,t,r);case this.LOCATION_TYPES.SINGLE_MANAGER:return new TRC.SingleVideoManagerUnitLoader(e,i);case this.LOCATION_TYPES.ABOVE:case this.LOCATION_TYPES.BELOW:return new TRC.WidgetAdjacentVideoUnitLoader(e);default:return new TRC.SliderVideoUnitLoader(e)}},TRC.VideoTagLoader.prototype.setGlobalUnitParams=function(e){this.trcManager&&this.trcManager.framework&&"mobile-sdk"===this.trcManager.framework&&(e.set("isSDK",!0),e.set("widgetPlacement",this.getPlacementName())),this.options&&this.options.isFeed&&this.options.container&&e.set("feedContainer",this.options.container);var t=this.getPlacementName();this.options&&this.options.sca&&this.isFeedHasSC(this.options.sca,t)&&e.set("placementWithScAdjacency",t),TRC.filledImpressions=TRC.filledImpressions||[],e.on("filledImpression",function(e){TRC.filledImpressions.push(e)})},TRC.VideoTagLoader.prototype.getCallbacksObjectKey=function(){return"videoTagCallbacks"},TRC.VideoTagLoader.prototype.shouldBlockVideoLoader=function(e,t){var r=e||!1;return r||(isNaN(t)||(r=Math.random()<t/100),TRC.pConsole("page","info","Blocked video: "+r+", block-video-prob: "+t,"string"),r)},TRC.VideoTagLoader.prototype.genVideoCallback=function(){var e=this.generateCallbackName(),t=this;return TRC.videoTagCallbacks[e]=function(e){if(TRCImpl.global["enable-video-ajax"]){if(!t.isXHRDone(e.target))return;TRC.performance&&TRC.performance.mark("videoAjaxStop",null,"","","videoAjaxRoundtrip",TRC.PerfEvenType.STOP),e=t.parseTBResponse(e.target.responseText)}var r,i;if(TRC.performance&&TRC.performance.mark("videoJsonpRequestStop",null,"","","videoJsonpRequestTime",TRC.PerfEvenType.STOP),(e=e||{}).tags&&e.tags[0]){(r=t.getLiteUnitVersion(e.tags[0].liteUnitBootSrc||t.videoConfig.liteUnitBootSrc))||(r=e.tags[0].unitBootSrc||t.videoConfig.unitBootSrc),window.TRC.liteUnit&&(r=t.getLiteUnitFromTRCConfig(r));var o=t.getVideoMacrosLiteUnitVersion(e.tags[0].url);o&&-1===window.location.href.indexOf("static-test-files.taboolasyndication")&&(r=t.replaceVersion(r,o));var n=TRC.isAMP?window.context.location.search:window.TRCImpl.getItemUrlQueryString()||"";(n.indexOf("tb_liteUnitUrl")>-1||n.indexOf("tb_liteUnitVersion")>-1)&&(r=t.getVersionFromUrl(r,n)),(i=document.createElement("script")).src=r,i.crossOrigin="anonymous",i.onload=function(){window.TRC=window.TRC||{},window.TRC.liteUnit=window.TRC.liteUnit||{},TRCImpl.global["enable-mw-no-items-exit"]?window.TRC.liteUnit.abTest="scadjtst1_vA":TRCImpl.global["enable-mw-content-ready-margins"]?window.TRC.liteUnit.abTest="scadjtst1_vB":TRCImpl.global["enable-mw-control"]&&(window.TRC.liteUnit.abTest="scadjtst1_vC"),window.TRC.liteUnit&&window.TRC.liteUnit.abTest&&(window.cmTag.set("pixels.startWithABT.isFire",!0),window.cmTag.push("abTest",window.TRC.liteUnit.abTest));var r=t.videoConfig.containerSelector||t.unitLoader.getVideoContainerSelector(t.taboolaContainer)||t.invisibleContainer,i;if(r&&(window.cmTag.set("parentSelector",r),i=document.querySelector(r)),t.isFillerBlock(e))__trcDebug("video loader - not loading. Filler detected");else{var o=t.unitLoader.loadUnit(e,i);o&&t.setGlobalUnitParams(o)}},document.getElementsByTagName("head")[0].appendChild(i)}},"TRC."+this.getCallbacksObjectKey()+"."+e},TRC.VideoTagLoader.prototype.isFillerBlock=function(e){var t;return!!(TRCImpl.global["enable-filler-block"]&&e.tags[0].url.indexOf("fillerResponse=true")>0)},TRC.VideoTagLoader.prototype.isXHRDone=function(e){return 200===e.status&&e.readyState===XMLHttpRequest.DONE},TRC.VideoTagLoader.prototype.parseTBResponse=function(e){var t;try{TRC.performance&&TRC.performance.mark("videoAjaxParsingStart",null,"","","videoAjaxParsing",TRC.PerfEvenType.START),t=JSON.parse(this.extractJSONFromResponse(e))}catch(e){t=void 0,__trcError("video debug: VideoTagLoader exception "+(TRCImpl.experimentsData&&TRCImpl.experimentsData["2"]||""),e)}finally{TRC.performance&&TRC.performance.mark("videoAjaxParsingStop",null,"","","videoAjaxParsing",TRC.PerfEvenType.STOP)}return t},TRC.VideoTagLoader.prototype.extractJSONFromResponse=function(e){return e.slice(e.indexOf("(")+1,e.lastIndexOf(")"))},TRC.VideoTagLoader.prototype.getLiteUnitVersion=function(e){if(this.isLiteUnitUrlValid(e)&&"lite-unit-boot-src"!==(e=decodeURIComponent(e))){var t=this.getUnitType();if(t)return e.replace("{{UNIT_TYPE}}",t).replace("{{PLATFORM}}",TRC.dom.isDesktop()?"Desktop":"Mobile")}return""},TRC.VideoTagLoader.prototype.isLiteUnitUrlValid=function(e){if("string"!=typeof e)return!1;if(!e)return!1;var t=new TRC.URL(/^http/.test(e)?e:"https:"+e).host;const r=this.ALLOWED_LITE_UNIT_URLS_DOMAINS.indexOf(t)>-1;return r||__trcWarn("Invalid lite unit url was supplied.\nProvided url: "+e),r},TRC.VideoTagLoader.prototype.ALLOWED_LITE_UNIT_URLS_DOMAINS=["localhost","vidstat.taboola.com"],TRC.VideoTagLoader.prototype.getUnitType=function(){for(var e in this.UNIT_TYPES)if(this.UNIT_TYPES[e].indexOf(this.videoConfig.unitType)>-1)return e;return""},TRC.VideoTagLoader.prototype.UNIT_TYPES={Slider:["46","59"],Inline:["193","198","199","194","216","48","32","215"],WidgetItem:["226","227","248","4","5"],FeedManager:["244","245","247"],VideoForPerformance:["232","233"],RecoReelWidget:["254","255"],StoriesWidget:["143","144"],Instream:["107","108"],ExcoPlayer:["242","243"],MidArticleSlider:["147","148"]},TRC.VideoTagLoader.prototype.getLiteUnitFromTRCConfig=function(e){return window.TRC.liteUnit.liteUnitVersion&&(e=this.getLiteUnitVersion(window.TRC.liteUnit.liteUnitVersion)),window.TRC.liteUnit.version&&(e=this.replaceVersion(e,window.TRC.liteUnit.version)),e},TRC.VideoTagLoader.prototype.replaceVersion=function(e,t){return e.replace(/\d+[_|.]\d+[_|.]\d+/,t)},TRC.VideoTagLoader.prototype.getVideoMacrosLiteUnitVersion=function(e){for(var t=new RegExp("liteUnitVersion","gi"),r=void 0;t.exec(e);)r=t.lastIndex;if(void 0!==r){var i=(e=(e=e.substring(r)).substring(2,e.indexOf(");"))).replace(/\'|\"|\s+/g,"");if(i)return i}},TRC.VideoTagLoader.prototype.getVersionFromUrl=function(e,t){var r=void 0,i=void 0;return t.split("&").forEach(function(e){e.indexOf("tb_liteUnitUrl")>-1?r=e.split("=")[1]:e.indexOf("tb_liteUnitVersion")>-1&&(i=e.split("=")[1])}),r&&(e=this.getLiteUnitVersion(r)),i&&(e=this.replaceVersion(e,i)),e},TRC.VideoTagLoader.prototype.isFeedHasSC=function(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1},TRC.VideoTagLoader.prototype.isHip=function(e){var t=["4","254"];if(!e||!e.trcResponse||!e.trcResponse.vtag)return!1;var r=e.trcResponse.vtag;return(!r.advancedVideoConfiguration||"true"!==r.advancedVideoConfiguration["mid-article-hip-opt-out"])&&r.unitType&&t.indexOf(r.unitType.toString())>-1}},(()=>{class e{constructor(){this.virtualPlacementsMap={},this.response={}}static handleVirtualPlacement(e,t){const{virtualPlacementsManager:r}=e,i=r.response[t];if(i){const o=__trcCopyProps(i,{});o.id=t,r.createVirtualPlacement(o,t,e)}}createVirtualPlacement(e,t,r){if(!e||this.virtualPlacementsMap[t])return;this.virtualPlacementsMap[t]=e;const i=r.getOrCreateContainer(e);r.setPlacementDataInPreloadRequest(t,i)}}TRC.VirtualPlacementsManager=e})(),TRC.visibility=TRC.visibility||{},TRC.visibility=function(e,t){function r(e){var t=TRC.dom.getViewportVerticalRange(),r=TRC.dom.getElementRect(e);return r.top<0?Math.max(r.top,r.bottom):t.max-r.top-t.min}function i(e){var t=TRC.dom.getViewportHorizontalRange(),r=TRC.dom.getElementRect(e);return r.left<0?Math.max(r.left,r.right):t.max-r.left-t.min}var o={getViewPortOffsets:function(e){var t,o;return{verticalOffset:r(e),horizontalOffset:i(e)}},getMinViewPortOffsets:function(e){var t=this.getViewPortOffsets(e);return t.verticalOffset<0&&t.horizontalOffset<0?Math.max(t.verticalOffset,t.horizontalOffset):Math.min(t.verticalOffset,t.horizontalOffset)},isInViewPortWithOffset:function(e,t){var r;return!(this.getMinViewPortOffsets(e)<(t=t||0))}};return e._trcIsUTactive&&(o.getVerticalVPShift=r,o.getHorizontalVPShift=i),o}(window,document),(()=>{const e={init(){this.initiated=!0,this.selector=".video-title",TRC.listen("trcResponseHandled",this.checkEncoding.bind(this))},getText(e){const t=document.querySelector(e);return t?t.textContent:""},searchBadEncoding(e){const t=/×.×.×.×/;return t.exec(e)},checkEncoding(){if(TRCImpl.global["disable-bad-encoding-report"])return;const e=this.getText(this.selector),t=this.searchBadEncoding(e);t&&__trcWarn(`Found bad encoding: ${t}`)}};e.init(),window._trcIsUTactive&&(TRC.widgetBadEncodingReporter=e)})(),(()=>{const e={defaultMaxSlotsGeometryPerPage:50,maxDefaultThrottleNumber:1e3,defaultThresholdThrottleNumber:10};class t{constructor(e){this.rBoxWidget=e,this.trcManager=this.rBoxWidget.trc,this.widgetContainer=this.rBoxWidget.container,this.widgetItems=this.rBoxWidget.boxes,this.uiModeName=this.rBoxWidget.mode_name,this.MIN_VISIBLE_ITMES=this.trcManager.global["min-visible-items"]||1,this.enableVisibleOnItemLevel=t.isVisibleOnItemLevelEnabled(this.trcManager),this.sendNewVisibleItemsOnly=this.trcManager.global["send-newvp-items-only"],this.init()}init(){this.resetVisibilityData(),this.rBoxWidget.isProviderIframe||(this.isManualVisibilityMode()?TRC.listen(`visible::${this.rBoxWidget.orig_placement}`,this.reportManualVisibilityIfVisibleByRects.trcBind(this)):this.initVisibilityObserver())}resetVisibilityData(){this.organicVisibleItems={},this.sponsoredVisibleItems={},this.exchangeVisibleItems={},this.nativeVisibleItems={},this.visibleItemsIdxList=[]}isManualVisibilityMode(){return!((this.rBoxWidget.isFeedCard||window.AMP_MODE)&&"mobile-sdk"!==this.trcManager.framework||!this.rBoxWidget.manualVisibilityTrigger&&!this.trcManager.manualVisibilityTrigger||!this.trcManager.global["enable-manual-visible"])}reportVisibility(){const e=new TRC.PlacementEventPostData,r=this.trcManager.getProperty(this.uiModeName,"thumbnail-position",this.rBoxWidget.propertiesOverride),i=[],o=[],n=[],a=[],s=[],l=[],c=[],d=[],p=[],h=[],u=[];if((this.enableVisibleOnItemLevel||!this.visibilityReported)&&(Object.keys(this.organicVisibleItems).forEach(e=>{i.push(this.organicVisibleItems[e].id),n.push(this.organicVisibleItems[e].type)}),Object.keys(this.sponsoredVisibleItems).forEach(e=>{o.push(this.sponsoredVisibleItems[e].id),a.push(this.sponsoredVisibleItems[e].type),c.push(this.sponsoredVisibleItems[e].publisher)}),Object.keys(this.exchangeVisibleItems).forEach(e=>{s.push(this.exchangeVisibleItems[e].id),l.push(this.exchangeVisibleItems[e].type),d.push(this.exchangeVisibleItems[e].publisher)}),Object.keys(this.nativeVisibleItems).forEach(e=>{p.push(this.nativeVisibleItems[e].id),h.push(this.nativeVisibleItems[e].type),u.push(this.nativeVisibleItems[e].publisher)}),i.length>0||o.length>0||s.length>0||p.length>0||this.rBoxWidget.isProviderIframe)){TRC.pConsole(this.uiModeName,"info","sending new visible event","");let m=this.rBoxWidget.getJsonTargetItemsList(this.rBoxWidget.fullEventItemsHash);e.setVisibleLevel(this.enableVisibleOnItemLevel),this.enableVisibleOnItemLevel&&(this.sendNewVisibleItemsOnly&&(e.setNewVisibleSent(),m=t.getNewVisibleEvents(m)),e.setFirstVisibleEvent(!this.visibilityReported)),e.setFullItemList(m),this.enableVisibleOnItemLevel&&e.setFirstVisibleEvent(!this.visibilityReported),this.trcManager.enablePageGeometry&&this.trcManager.addGeometryPageData(e,this.trcManager.global["page-geometry-selectors"]),this.trcManager.enablePageGeometryExtended&&this.trcManager.addGeometryExtendedPageData(e),this.trcManager.enablePlacementGeometry&&this.trcManager.addGeometryPlacementData(e,this.widgetContainer),TRC.EventsAPI.dispatchVisible(this.rBoxWidget.response.trc,this);const g={il:i.join(","),sil:o.join(","),ilt:n.join(","),navil:p.join(","),silt:a.join(","),ntil:s.join(","),ntilt:l.join(","),navilt:h.join(","),niltp:d.join(","),siltp:c.join(","),naviltp:u.join(","),tp:r};this.processSpatialSlotsData(g),this.rBoxWidget.sendEvent("visible",g,e.getAll(),!this.enableVisibleOnItemLevel),this.enableVisibleOnItemLevel?this.rBoxWidget.sendPlacementTrackingPixelsOnce("vi",this.visibleItemsId,!0):!this.trcManager.global["disable-external-visibility-once"]&&this.externalVisibleSent||(this.rBoxWidget.sendPlacementTrackingPixelsOnce("vi"),this.externalVisibleSent=!0),this.trcManager.global["disable-runHook"]?(this.trcManager.getFunction(this.uiModeName,"after-visible",this.rBoxWidget.propertiesOverride,this.rBoxWidget.internalContainer,this),TRC.CustomModulesManager.runHook("after-visible",this.uiModeName,this,this.rBoxWidget.propertiesOverride,this.rBoxWidget.internalContainer,this)):this.trcManager.runHook(this,this.uiModeName,"after-visible",this.rBoxWidget.propertiesOverride,!0,this.rBoxWidget.internalContainer,this),this.visibilityReported=!0}}static getNewVisibleEvents(e){return e.filter(e=>"newvp"===e.tids)}static isSpatialEnabled(e){return TRC.util.isPercentEnabled(e.global,"enable-spatial-data-per-page")||e.spatialSlotsThrottleTHPerPage}static isVisibleOnItemLevelEnabled(e){return e.visibleOnItemLevel||TRC.util.isPercentEnabled(e.global,"visible-on-item-level")}processSpatialSlotsData(r){if(this.rBoxWidget.isProviderIframe)return;if(!t.isSpatialEnabled(this.trcManager))return;if(!this.isThrottleValidated())return;const i=this.trcManager.global["max-slots-geometry-per-page"]||e.defaultMaxSlotsGeometryPerPage,o=[],n=[],a=[];let s=null;this.trcManager.enableSlotsSaliency&&(s=window.getComputedStyle(window.document.body)),this.visibleItemsIdxList.slice(-i).forEach(e=>{const r=this.rBoxWidget.boxes[e];this.trcManager.enableSlotsGeometry&&t.processVisibleItemGeometry(r,o,n),this.trcManager.enableSlotsSaliency&&t.processVisibleItemSaliency(r,s,a)});const l=[];if(0===o.length&&a.length>0){const e=a.map(e=>e.id);e.forEach((e,t)=>{const r=a[t];delete r.id,l.push({id:e,ssd:r})}),r.spatialData=__trcJSONify(l)}else if(o.length>0&&0===a.length){const e=o.map(e=>e.id);e.forEach((e,t)=>{const r=o[t];delete r.id;const i=n[t];i&&delete i.id,l.push({id:e,sgd:r,tgd:i})}),r.spatialData=__trcJSONify(l)}else if(o.length>0&&a.length>0){const e=o.map(e=>e.id);e.forEach((e,t)=>{const r=o[t];delete r.id;const i=a[t];delete i.id;const s=n[t];delete s.id,l.push({id:e,sgd:r,ssd:i,tgd:s})}),r.spatialData=__trcJSONify(l)}}isThrottleValidated(){const t=this.trcManager.spatialSlotsThrottleMax||e.maxDefaultThrottleNumber;let r=this.trcManager.spatialSlotsThrottleTH;if("number"!=typeof r&&(r=e.defaultThresholdThrottleNumber),r!==t){if(!(r>0))return!1;{const e=Math.floor(Math.random()*t);if(e>r)return!1}}return!0}static processVisibleItemGeometry(e,r,i){let o={id:e.video_data["item-id"]||-1,x:-1,y:-1,h:-1,w:-1};if(e.lastVisibleBoundingClientRect){const t=(e.lastVisibleBoundingClientRect.left+e.lastVisibleBoundingClientRect.pageXOffset).toFixed(2),r=(e.lastVisibleBoundingClientRect.top+e.lastVisibleBoundingClientRect.pageYOffset).toFixed(2);o={id:e.video_data["item-id"],x:t,y:r,h:e.lastVisibleBoundingClientRect.height.toFixed(2),w:e.lastVisibleBoundingClientRect.width.toFixed(2)}}t.processVisibleItemThumbnailDimension(e,i),r.push(o)}static processVisibleItemSaliency(e,t,r){const i=window.getComputedStyle(e),o={id:e.video_data["item-id"],fsi:i.getPropertyValue("font-size"),fst:i.getPropertyValue("font-style"),fn:i.getPropertyValue("font-family"),cbg:i.getPropertyValue("background-color"),dbg:t.getPropertyValue("background-color")};r.push(o)}static processVisibleItemThumbnailDimension(e,t){const r={id:e.video_data["item-id"]||-1,h:e.thumbBlock&&e.thumbBlock.imgContDim&&e.thumbBlock.imgContDim.height.toString()||-1,w:e.thumbBlock&&e.thumbBlock.imgContDim&&e.thumbBlock.imgContDim.width.toString()||-1};t.push(r)}calculateVisibleItems(e,r,i){const o=i||this.rBoxWidget.boxes;let n=0;return this.visibleItemsIdxList=[],this.visibleItemsId=[],o.forEach((i,o)=>{const a=i.video_data||i,s=this.rBoxWidget.fullEventItemsHash[a["item-id"]];r||i.isVisible||e&&this.isElementVisibleByRects(i,e)?(a["is-syndicated"]?t.addVisibleItemToList(this.sponsoredVisibleItems,a,"is-syndicated"):a["is-in-network"]?t.addVisibleItemToList(this.exchangeVisibleItems,a,"is-in-network"):a["is-native"]?t.addVisibleItemToList(this.nativeVisibleItems,a,"is-native"):t.addVisibleItemToList(this.organicVisibleItems,a,"is-organic"),this.setVisibleValues(s),(!this.enableVisibleOnItemLevel||this.enableVisibleOnItemLevel&&s&&"newvp"===s.tids)&&(n++,this.enableVisibleOnItemLevel&&this.visibleItemsId.push(a["item-id"])),this.visibleItemsIdxList.push(o)):"newvp"===s.tids?s.tids="vp":"vp"!==s.tids&&"newvp"!==s.tids&&(s.tids="nvp",this.enableVisibleOnItemLevel&&a.srvopl&&this.visibleItemsId.push(a["item-id"]))}),n}setVisibleValues(e){this.enableVisibleOnItemLevel?"newvp"===e.tids?e.tids="vp":"vp"!==e.tids&&(e.tids="newvp"):e.tids="vp"}static addVisibleItemToList(e,t){e[t["item-id"]]={id:t["item-id"],type:t.type,publisher:t.publisher}}isVisibleWidget(){return this.calculateVisibleItems()>=this.MIN_VISIBLE_ITMES||!this.enableVisibleOnItemLevel&&this.widgetContainer.isVisible}initVisibilityObserver(){const e=this.reportVisibility.trcBind(this),t=this.isVisibleWidget.trcBind(this);if(TRC.tlf&&console.time(`visibility - ${this.uiModeName}`),this.resetVisibilityData(),!this.isVisibilityObserverInitialized){const r={targetElement:this.widgetContainer,enableDelayedVisibilityCheck:!0,visibleWidgetPredicate:t,onTrigger:e,onEnter:()=>{TRC.util.isPercentEnabled(this.trcManager.global,"guarantee-card-clash-detection")&&TRC.ModuleLoader.load("card-interference-detector",TRC.CardInterferenceDetector,()=>{TRC.CardInterferenceDetector.detectCardInterrupted(this.widgetContainer)})}};TRC.intersections.isInViewPort(r);const i=this.rBoxWidget.listContainer&&this.rBoxWidget.listContainer.heatmap;this.widgetItems.forEach(r=>{const o={targetElement:r,enableDelayedVisibilityCheck:!0,visibleWidgetPredicate:t,onTrigger:e,onEnter:()=>{i&&i.captureItemTime(r.video_data.id)}};TRC.intersections.isInViewPort(o)}),this.isVisibilityObserverInitialized=!0}TRC.tlf&&console.timeEnd(`visibility - ${this.uiModeName}`)}reportManualVisibilityIfVisibleByRects(e){(this.calculateVisibleItems(e)>=this.MIN_VISIBLE_ITMES||this.isElementVisibleByRects(this.widgetContainer,e)&&!this.enableVisibleOnItemLevel)&&this.reportVisibility()}isElementVisibleByRects(e,r){const i=(e=e||this.widgetContainer).getBoundingClientRect();if(!t.hasVolume(i))return!1;const o=this.rBoxWidget.getBoundingClientRect(i,r),n=o.left+Math.round((o.right-o.left)/2),a=o.top+Math.round((o.bottom-o.top)/2),s=TRC.Browser.operaUpto(10.1)||TRC.Browser.safariUpto(4)?document.elementFromPoint(n+document.body.scrollLeft,a+document.body.scrollTop):document.elementFromPoint(n,a),l=t.getRootBounds(r),c=n>0&&n<l.maxX&&a>0&&a<l.maxY;return r?c:c&&s&&t.isAncestor(s,e)}static hasVolume(e){return e.top!==e.bottom}static getRootBounds(e){const t={};return e?(t.maxX=e.rootBounds.width,t.maxY=e.rootBounds.height,t):(t.maxX="CSS1Compat"===document.compatMode&&document.documentElement.clientWidth||document.body.clientWidth,t.maxY="CSS1Compat"===document.compatMode&&document.documentElement.clientHeight||document.body.clientHeight,t)}static isAncestor(e,r){return!(!e.parentNode||e.parentNode===document.documentElement&&e!==r)&&(e===r||t.isAncestor(e.parentNode,r))}}TRC.WidgetVisibilityReporter=t})(),(()=>{const e=-1;class t{constructor(e){this.initialUrl=e.initialUrl,this.initialUrlTimeout=e.initialUrlTimeout,this.initialUrl&&(this.initialUrlPending=!0);const r=new Worker(t._buildBlob(this.initialUrl,this.initialUrlTimeout));TRC.URL=TRC.URL||TRC.webkitURL,r.onmessage=this.onWorkerMessage.bind(this),this.worker=r,this.contextCallbacks={},this.context=0}handshake(e){const t={type:"handshake",_context:this._generateContextId()};this.contextCallbacks[t._context]={resolve:e},this.worker.postMessage(t)}xhr(t,r,i,o){const n={url:t,timeout:r||8e3,type:"xhr",_context:this._generateContextId()};t===this.initialUrl&&this.initialUrlPending&&(n._context=e),this.initialUrlPending=!1,this.contextCallbacks[n._context]={resolve:i,reject:o},n._context!==e&&this.worker.postMessage(n)}onWorkerMessage(e){const t=e.data,{_context:r,type:i,error:o}=t,n=this.contextCallbacks[r]||{},{resolve:a,reject:s}=n,l="xhrBlob"===i?t.buffer:t.result;a&&"function"==typeof a&&!o?a(l||{}):"function"==typeof s&&s(),delete this.contextCallbacks[r]}_generateContextId(){return++this.context}static _buildBlob(e,t){e=e||"";let r=`/*! 20231212-21-RELEASE */\n\nfunction onHandshake(t){const e={_context:t,type:"handshake"};self.postMessage(e)}function fetch(t,e,o,n){t=t.replace("/trc/3/json?","/trc/3/json?wrkr=1&");const r=new XMLHttpRequest;r.withCredentials=!0,r.onreadystatechange=function(){r.readyState<4||200!==r.status||4===r.readyState&&o(r)},r.onerror=function(t){(new Image).src="http://trc.taboola.com/xhrworker-errors/log/2/debug?tim=10:24:11.81&type=xhrerror",n(t)},r.ontimeout=function(t){(new Image).src="http://trc.taboola.com/xhrworker-errors/log/2/debug?tim=10:24:11.81&type=xhrtimeout",n(t)},r.open("GET",t,!0),e&&(r.timeout=e),r.send("")}self.addEventListener("message",t=>{const e=t.data,{url:o,timeout:n,_context:r,type:s}=e;if("handshake"===s)return onHandshake(r);fetch(o,n,t=>{const e=t.responseText,o={result:e,type:s,_context:r};self.postMessage(o)},()=>{const t={error:!0,type:s,_context:r};self.postMessage(t)})},!1);const initialUrl="%%initialUrl%%",initialTimeout="%%timeout%%"||8e3;initialUrl&&fetch(initialUrl,initialTimeout,t=>{const e=t.responseText,o={result:e,_context:-1,type:"xhr"};postMessage(o)},()=>{const t={_context:-1,error:!0,type:"xhr"};postMessage(t)});`;r=(r=r.replace("%%initialUrl%%",e)).replace("%%timeout%%",t||"");const i=new Blob([r],{type:"text/javascript"});return window.URL.createObjectURL(i)}}TRC.initWorkerIfAvailable=function(e,r){if(TRC.workerInited=!0,!TRC.worker&&window.Worker&&window.URL&&window.URL.createObjectURL&&TRCImpl.global["xhr-worker"]){const i=new t({initialUrl:e,timeout:r});TRC.worker=i;const o=setTimeout(()=>{__trcError("worker timeout"),n=(()=>{}),TRC.worker=!1},200);let n=()=>clearTimeout(o);i.handshake(()=>n())}},TRC.WebWorker=t})(),(()=>{let e=null;class t{constructor(e){this.trcManager=e,this.availableReportedPlacements=[],this.fullEventItemsHash={},this.utm="",this.modeGroupOrder=null}getEventItemHash(){return this.fullEventItemsHash}updateUtm(e){this.utm=e}updateModeOrderGroup(e){this.modeGroupOrder=e}ExcludeDueToAMP(){return!(!this.trcManager.global["do-not-send-eager-availables-on-AMP"]||!TRC.isAMP)}sendAvailableEventsForPlacement(e){if(this.ExcludeDueToAMP())return;const r=this.trcManager.preloadRequest[e.placement],i=r&&r.response;if(!i||!i.trc)return;const{trc:o}=i;if(!o||!o.placement||this.availableReportedPlacements.indexOf(o.placement)>-1)return;this.availableReportedPlacements.push(i.trc.placement),t.setTargetItemsList(this.fullEventItemsHash,o["video-list"].video,"a");const n=new TRC.PlacementEventPostData;n.setFullItemList(t.getJsonTargetItemsList(this.fullEventItemsHash));const a={utm:TRC.utm.join(",")+(this.utm?`,${this.utm.join(",")}`:"")};this.modeGroupOrder&&TRC.util.merge(a,{mgo:this.modeGroupOrder}),this.sendAvailableEvents(i,e,a,n)}sendAvailableEvents(e,t,r,i){const o=e&&e.cached;if(o&&!this.trcManager.global["send-available-for-cached-response"])return;const n=this.trcManager.isRemovedWidget(e.trc["video-list"]);n||(this.addRboxParams(r,e,t),this.trcManager.sendEvent("available",r,i.getAll(),!0))}static setTargetItemsList(e,r,i){if(!r)return;let o=0;const n=r.length;for(;o<n;o++)e[r[o]["item-id"]]={tii:r[o]["item-id"],tipt:t.getProviderType(r[o]),tit:r[o].type,tids:i}}static getJsonTargetItemsList(e){const t=[];return Object.keys(e).forEach(r=>t.push(e[r])),t}static getProviderType(e,t){return e["is-syndicated"]?t?"sponsored":"SP":e["is-in-network"]?t?"exchange":"NT":e["is-native"]?t?"native":"NAV":t?"organic":"RC"}static get(r){return e||(e=new t(r))}static getListId(e){return e.visible?`rbox-${e.origin}`:"rbox-tracking"}addRboxParams(e,r,i){const o={};o.li=t.getListId(i),r&&r.cached&&(o.cache="1"),this.trcManager.formattedTRCRequest&&this.trcManager.formattedTRCRequest.ad&&(o.ad=__trcJSONify(this.trcManager.formattedTRCRequest.ad)),this.trcManager.systemFlags&&"normal"!==this.trcManager.systemFlags.loaderType&&(o.lt=this.trcManager.systemFlags.loaderType),r.trc&&this.trcManager.global["tmp-use-pb-params"]&&this.trcManager.configForPostEvent.available&&(r.trc.ppb&&(e.ppb=r.trc.ppb),r.trc.cpb&&(e.cpb=r.trc.cpb),r.trc.prty&&(e.prty=r.trc.prty),r.trc.caty&&(e.caty=r.trc.caty));const n=this.trcManager.formattedTRCRequest&&this.trcManager.formattedTRCRequest.tmpl,a=r.trc&&r.trc["placement-group"];return n&&(o.tmpl=n),a&&(o.pg=a),__trcCopyProps(o,e),e}getReportedPlacements(){return this.availableReportedPlacements}}TRC.availableEventCoordinator=t,window._trcIsUTactive&&(t.prototype.setEventItemHash=function(e){this.fullEventItemsHash=e})})(),(e=>{class t{constructor(){this.unmaskedIp=null}parse(e){this.unmaskedIp=e&&e.trc&&e.trc.umip||null}get(){return this.unmaskedIp}}e.unmaskedIpParser=e.unmaskedIpParser||new t})(TRC);var CONSTANTS={STYLESHEET:``,BLOCK_CLICKS:"taboola-unit-unintentional-clicks"};function getAllDynamicConfig(e,t){return e[t]?TRC.util.merge({},e,e[t]):e}function getFromDynamicConfig(e,t,r,i){if(!e)return null;const o=getDynamicParameter(e[i],t);return o||e[r]}function getDynamicParameter(e,t){if(!e)return null;const r=e[t];return r?JSON.parse(r):null}function setElementblockMarginalclicks(e,t){TRC.dom.on(e,"click",r=>{isMarginalClick(r,e,t)&&preventClickBubbling(r)})}function isMarginalClick(e,t,r){const i=t.offsetWidth,o=t.offsetHeight,n=transformBlockMarginalClicksConfig(i,o,r),a=t.getBoundingClientRect(),s=e.clientX-a.left,l=e.clientY-a.top;return l<n.vertical||s>i-n.horizontal||s<n.horizontal||l>o-n.vertical}function preventClickBubbling(e){e.preventDefault(),e.stopPropagation()}function calculatePercentage(e,t){return e/100*t}function handleValueType(e,t){const r=parseFloat(e);return isNaN(r)?0:"string"==typeof e&&-1!==e.indexOf("px")?r:calculatePercentage(r,t)}function transformBlockMarginalClicksConfig(e,t,r){return{vertical:handleValueType(r,t),horizontal:handleValueType(r,e)}}(()=>{class e{constructor(t){e.styleRendered||e.InjectUnitStyle(),t?(this.productContainer=e.getProductContainer(t),this.productContainer?this.baseContainer=this.createBaseContainer():__trcWarn(`taboola unit could not find a viable container, got ${this.productContainer}`)):__trcWarn(`taboola unit got no valid placement name, got ${t}`)}static InjectUnitStyle(){TRC.dom.injectStyle(CONSTANTS.STYLESHEET),e.styleRendered=!0}createBaseContainer(){const e=TRC.dom.createHTMLElement("section",{className:"taboola-unit"});return this.productContainer.parentNode.insertBefore(e,this.productContainer),e.appendChild(this.productContainer),e}static getProductContainer(e){try{return document.querySelector(`[data-placement-name="${e}"]`)}catch(t){__trcError(`Error in getProductContainer in Taboola unit for placement: ${e}`)}}blockUnintentionalClicks(e){TRC.dom.on(this.baseContainer,"click",e=>{this.isBlockingClicks&&(e.preventDefault(),e.stopPropagation())},!0),e<=0||(TRC.dom.addClass(this.baseContainer,CONSTANTS.BLOCK_CLICKS),this.isBlockingClicks=!0,TRC.Timeout.set(()=>{TRC.dom.removeClass(this.baseContainer,CONSTANTS.BLOCK_CLICKS),this.isBlockingClicks=!1},e))}static blockElementMarginalClicks(e,t){setElementblockMarginalclicks(e,t)}static getFromDynamicConfig(e,t,r,i){return getFromDynamicConfig(e,t,r,i)}static getDynamicParameter(e,t){return getDynamicParameter(e,t)}static getAllDynamicConfig(e,t){return getAllDynamicConfig(e,t)}}TRC.TaboolaUnit=e})()}(),function(e,t){e.TRC=e.TRC||{};var r=function(){return!0},i=function(r,i,o,n){var a=r+"/"+encodeURIComponent(o||e.TRC.publisherId)+"/log/3"+"/"+i;return n&&(a+="?"+t.TRCLogger.formatParams(n)),a},o=function(t,i,o){var a,s=new(e.XDomainRequest||e.XMLHttpRequest);return s.open(t,i),s.onload=r,s.onerror=r,s.ontimeout=r,s.onprogress=r,s.withCredentials=!0,o&&n(s,o),s},n=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setRequestHeader(r,t[r])};e.TRC.TRCLogger=t.TRCLogger={post:function(r,n,a,s,l,c){var d=i(r,n,s,l),p=o("POST",d);c&&"function"==typeof e.navigator.sendBeacon?e.navigator.sendBeacon(d,t.TRCLogger.formatBeaconParams(a)):(p.setRequestHeader&&p.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),p.send(t.TRCLogger.formatParams(a)))},get:function(e,t,r,n){if(r.headers){var a=r.headers;delete r.headers}var s=i(e,t,n,r),l;o("GET",s,a).send()},formatParams:function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")},formatBeaconParams:function(e){var t="",r;for(var i in e)e.hasOwnProperty(i)&&(t+=i+"="+encodeURIComponent(e[i])+"&");return new Blob([t.slice(0,-1)],{type:"application/x-www-form-urlencoded"})},reportES:function(e){if(t&&t.util&&t.util.isPercentEnabled(TRCImpl.global,"enable-rbox-es-events")){var r=TRCImpl&&TRCImpl.global&&TRCImpl.global["rbox-es-events-url"]||"https://vidanalytics.taboola.com/putes";r=r+"/"+e.index;var i={timestamp:(new Date).toISOString(),name:e.name};for(var o in e.data)i[o]=e.data[o];if("function"==typeof navigator.sendBeacon)navigator.sendBeacon(r,JSON.stringify(i));else{var n=new XMLHttpRequest;n.open("POST",r,!0),n.send(JSON.stringify(i))}}}}}(window,window["${jsScope}".indexOf("{jsScope}")>=0?"TRC":"${jsScope}"]),function(win,doc){TRC.performance&&TRC.performance.mark("4.0");var protocol=TRC.PROTOCOL,getParameter=TRC.URL.prototype.getParameter,taboolaConsole=getParameter.call(location.href,"trc_console"),timers,div;function invokeInheritedModules(){TRC.InvokeVideoLoader(),TRC.InvokePOldVideoLoader(),TRC.InvokeVideoTagLoader()}win.trc_debug_level=getParameter.call(location.href,"taboola-debug"),TRC.tlf=!!getParameter.call(location.href,"taboola-perf"),TRC.taboola_yield_report=!!getParameter.call(location.href,"taboola-yield-report"),taboolaConsole&&"yes"===taboolaConsole.toLowerCase()&&(TRC.taboolaConsole=!0,TRC.Manager.prototype.loadExternal("http://c2.taboola.com/console/console_loader.js","js")),isNaN(parseInt(win.trc_debug_level))&&(trc_debug_level=2),TRC.callbacks={mute:function(){var e=TRCImpl.boxes,t;if(TRCImpl.clearPreloadRequestLoaderAndCallNext(),TRC.Timeout.reset(),e)for(t in e)e[t].request=null;TRC.EventsAPI.dispatchNoContent(TRCImpl.NO_CONTENT.mute),TRC.pConsole("warning - mute!","warn","server returned mute","")}},TRC.trc_drawRBox=!1,TRC.listOrigin=new TRC.ListOriginBuilder,TRC.baseDomain=TRC.baseDomain||protocol+"//cdn.taboola.com/libtrc/"+TRC.publisherId+"/",TRC.prototype=TRC.prototype||{},TRC.Interval=function(){var intervals={};return{set:function(callback,interval){var aArgs=Array.prototype.slice.call(arguments,2),intervalId=win.setInterval(function(){"function"==typeof callback?callback.apply(null,aArgs):eval(callback)},interval);return intervals[intervalId.toString()]=1,intervalId},clear:function(e){e&&(win.clearInterval(e),delete intervals[e.toString()])},reset:function(){for(intervalId in intervals)win.clearInterval(intervalId),delete intervals[intervalId.toString()]}}}(),TRC.Timeout=(timers={},{set:function(e,t){var r=win.setTimeout(function(){delete timers[r.toString()],e()},t);return timers[r.toString()]=1,r},clear:function(e){e&&(win.clearTimeout(e),delete timers[e.toString()])},reset:function(){var e;for(e in timers)win.clearTimeout(e),delete timers[e.toString()]}}),TRC.trcReady=function(){try{TRC.pConsole("page","debug","libtrc : calling TRC.ready",""),invokeInheritedModules(),TRC.implLoaded=!0;var e=TRC.ready({style:".trc_rbox_container{direction:ltr;text-align:left}.trc_rbox_container [class*=span]{float:none;margin-left:0}.trc_multi_widget_container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.trc_multi_widget_container .trc_rbox_div{margin:0}.trc_rbox_header{border:0 solid;overflow:hidden;vertical-align:middle}.trc_rbox_container .trc_img{display:inline-block!important}.trc_rbox_header_icon_div{display:table-cell;vertical-align:baseline}.trc_rbox_header .trc_rbox_header_icon_div .trc_rbox_header_icon_img{vertical-align:middle;width:auto}.trc_rbox_header_icon_span{display:inline-table}.in_trc_header{position:relative!important;float:right;margin:0}#trc_rbox_css_loaded{overflow:hidden;width:0;height:0}.trc_rbox{margin-top:0}.trc_rbox_div{margin:0 0 3px;direction:ltr;padding:0;box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;overflow:auto;position:relative;width:auto;border:solid #ccc 1px}.loading-animation span{display:block}.videoCube{zoom:1;cursor:pointer;float:none;overflow:hidden;box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box}.videoCube_hover,div.videoCube:hover{cursor:pointer}.videoCube span.video-title:hover,.videoCube_hover span.video-title{text-decoration:underline}.videoCube a{text-decoration:none;border:0;color:#000;cursor:pointer}.videoCube a,.videoCube a:hover,.videoCube a:link,.videoCube_hover a{text-decoration:none!important;outline:0}.videoCube a .thumbBlock{float:left;display:block;overflow:hidden!important}.videoCube a img,.videoCube img{border:0;display:block;margin:0;height:auto;width:auto}.videoCube a img.app-install-logo,.videoCube img.app-install-logo{display:inline-block;max-height:36px;min-height:36px;height:36px;max-width:36px;min-width:36px;width:36px;object-fit:contain}.videoCube .video-label{display:block;overflow:hidden}.videoCube .video-label{width:auto!important;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.videoCube .video-label-box.label-box-with-title-icon{display:table}.video-icon-container{float:left;display:table-cell;vertical-align:baseline}.video-icon-img{vertical-align:middle}.videoCube .video-duration{height:0;float:left;position:relative;color:#fff;font-size:11px}.videoCube .video-duration dt{border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;background-color:#000;opacity:.6}.videoCube span.video-label.trc_ellipsis{position:relative;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.videoCube span.video-label.trc-smart-ellipsis{position:relative;overflow:hidden}.videoCube span.video-label.trc-smart-ellipsis ins{display:inline-block;text-decoration:inherit}.videoCube span.video-label.trc-smart-ellipsis.tbl-ltr-label{direction:ltr}.videoCube span.video-label.trc-smart-ellipsis.tbl-ltr-label ins{float:left;margin-right:5px;direction:ltr}.videoCube span.video-label.trc-smart-ellipsis.tbl-rtl-label{float:right;direction:rtl;width:100%!important}.videoCube span.video-label.trc-smart-ellipsis.tbl-rtl-label ins{float:right;margin-left:5px;direction:rtl}.videoCube span.video-label.trc-smart-ellipsis ins.lastLineEllipsis{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;width:100%}.video-duration.video-duration-detail div{color:#fff}.trc_rbox .sponsored{position:relative;display:block;overflow:visible;height:auto;width:auto;padding-right:0;text-align:right;font-size:9px}.trc_rbox_div{height:410px}.videoCube{direction:ltr;font-size:11px;margin:0;color:#000;border-width:0}.videoCube.vertical:first-child{border-top:0;margin-top:0}.videoCube.horizontal:first-child{border-left:0;margin-left:0}.videoCube_hover,div.videoCube:hover{background-color:#ebf0ff;color:#000}.videoCube .thumbBlock{margin:0;border-style:solid}.videoCube a img,.videoCube img{border-color:#ececec}.videoCube .video-label-box{margin-left:81px}.videoCube .video-label dt{font-weight:700}.videoCube .video-title{height:auto;margin-bottom:3px;white-space:normal}.videoCube .trc_inline_detail_spacer{display:inline-block;white-space:pre}.loading-animation{font-family:sans;font-size:1.5em;text-align:center;color:gray;height:100%}.trc_rbox_header{font-family:Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;text-decoration:none;color:#000}.trc_header_right_part{position:absolute;left:50%;top:0}.branding_div{overflow:visible;float:right}.branding_div img{height:20px}.videoCube .branding .logoDiv{font-size:inherit;line-height:inherit;background:0 0;margin:0;padding:0}.videoCube .branding .logoDiv a{vertical-align:inherit;color:inherit;line-height:inherit}.videoCube .branding .logoDiv a span{vertical-align:inherit}.trc_related_container .videoCube .branding .attribution-disclosure-link-sponsored{display:inline-block;float:none}.trc_related_container .videoCube .branding .attribution-disclosure-link-sponsored.align-disclosure-right{float:right;margin-left:auto;padding-left:2px}.videoCube .video-label-box .branding.composite-branding{display:-webkit-box;display:-ms-flexbox;display:flex}.branding.composite-branding>*{display:inline-block;vertical-align:bottom}.branding .branding-separator{margin:0 2px;font-weight:400}.branding .branding-inner{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.video-label-box span.branding.inline-branding{display:inline-block}.trc_related_container div.horizontal{float:left;box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box}.trc_related_container DIV.videoCube.thumbnail_bottom .thumbBlock,.trc_related_container DIV.videoCube.thumbnail_top .thumbBlock{float:none}.vidiscovery-note{display:none}.videoCube .thumbBlock .trc_sponsored_overlay_base{display:block;width:auto;margin-left:0;position:absolute;color:#fff!important}.videoCube .thumbBlock .trc_sponsored_overlay{opacity:.6;display:block;position:absolute}.videoCube .thumbBlock .trc_sponsored_overlay_base .sponsored{position:relative;display:block;overflow:visible;width:auto;text-align:center;padding:0 5px;margin-top:0}.videoCube .thumbBlock .trc_sponsored_overlay_base.round .trc_sponsored_overlay{border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px}.videoCube .thumbBlock .trc_sponsored_overlay_base.round{margin-left:4px}.thumbnail-emblem,.videoCube .thumbnail-overlay,.videoCube:hover .thumbnail-overlay,.videoCube_hover .thumbnail-overlay{position:absolute;background:transparent no-repeat;background-size:contain;z-index:50}.thumbnail_bottom{padding-bottom:8px}.trc_related_container .logoDiv{font-family:Arial,Helvetica,sans-serif;white-space:nowrap;font-size:9px}.trc_related_container .logoDiv a{font-size:9px;text-decoration:none!important;color:#000;margin-right:1px;vertical-align:text-bottom}.logoDiv a span:hover{text-decoration:underline}.trc_rbox_header .logoDiv{font-size:1em}.trc_tl .trc_rbox_header .logoDiv{position:relative;z-index:1}.trc_tl .trc_rbox_header_span .trc_header_right_column{position:absolute;width:48%;left:52%;top:0}.trc_tl .trc_rbox_div .videoCube.horizontal{clear:left}.trc_tl .trc_rbox_div .videoCube.trc_tl_right_col{float:none;clear:right;margin-left:auto}.trc_tl .videoCube .video-title .branding{line-height:1.3em}.trc_tl .videoCube:hover span.branding,.trc_tl .videoCube_hover span.branding{text-decoration:none}.trc_tl .trc_rbox_div .videoCube.thumbnail_none a{vertical-align:top;overflow:visible}.trc_tl .videoCube .video-label-box{display:inline-block;vertical-align:top;width:100%}.trc_rbox_container.trc_expandable{overflow:hidden;max-height:0;transition-property:max-height;-webkit-transition-property:max-height;-moz-transition-property:max-height;-o-transition-property:max-height;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0)}.trc_related_container .videoCube .thumbBlock .branding{position:absolute;bottom:0;z-index:1;width:100%;margin:0;padding:5px 0;text-align:center}.syndicatedItem .branding{margin:0}.trc-inplayer-rbox{background:#333;background:rgba(30,30,30,.9);bottom:0;position:absolute;height:300px;text-align:center}.trc-inplayer-rbox .trc_rbox_container{margin:50px auto 0;width:640px}.trc_rbox.trc-auto-size{width:100%;height:100%}.videoCube.thumbnail_under .video-title{min-height:2.58em}.videoCube.thumbnail_under .tbl-text-over-container{width:100%;position:absolute;z-index:1;left:0;bottom:0;min-height:66%;max-height:66%;padding-top:2px;padding-bottom:2px;line-height:1.25em}.videoCube.thumbnail_under .tbl-text-over-container .tbl-text-over{height:100%;width:100%;position:absolute;background:linear-gradient(to bottom,rgba(0,0,0,0) 0,rgba(0,0,0,.8) 100%)}.videoCube.thumbnail_under .tbl-text-over-container span.branding,.videoCube.thumbnail_under .tbl-text-over-container span.video-description,.videoCube.thumbnail_under .tbl-text-over-container span.video-title{position:relative;z-index:1;padding:0 8px;margin:0}.videoCube.thumbnail_under .tbl-text-over-container span.video-title{margin-bottom:6px;min-height:auto}.videoCube.thumbnail_under .tbl-text-over-container .video-label-box{position:absolute;bottom:0;left:0;width:100%;padding:0 8px 6px 8px;min-height:auto}.trc-auto-size .trc_rbox_outer .trc_rbox_div{height:auto;width:auto}.trc-auto-size .trc_rbox_div .videoCube{height:auto}.trc-auto-size .trc_rbox_div .videoCube.trc-first-recommendation{margin-top:0}.trc_rbox .trc_rbox_outer .trc_rbox_div .videoCube.trc-first-in-row{margin-left:0}.trc_elastic .trc_rbox{width:auto}.trc_elastic .videoCube{overflow:hidden}.trc_elastic .videoCube .thumbBlock{background:transparent no-repeat center center;background-size:cover;position:absolute;display:inline-block;top:0;right:0;bottom:0;left:0;margin-left:0;margin-right:0}.trc_elastic .thumbBlock_holder{position:relative;width:100%}.trc_elastic .thumbnail_start .thumbBlock_holder{float:left;margin-right:10px}.trc_elastic .thumbnail_start.item-has-pre-label .thumbBlock_holder{margin-right:0}.trc_elastic .videoCube_aspect{width:1px}.trc_elastic .trc_rbox .trc_rbox_div{height:auto}.trc_elastic .thumbnail_start .trc-pre-label{float:left;padding-right:10px}.trc_elastic .thumbnail_start.trc-split-label .trc-main-label{float:left;padding-left:10px}.trc_elastic .video-label-box{display:block}.trc_elastic .thumbnail_start .video-label-box{box-sizing:border-box}.trc_user_adChoice_btn{background:url(//cdn.taboola.com/static/c5/c5ef96bc-30ab-456a-b3d5-a84f367c6a46.svg) no-repeat scroll 0 0 #fff;border-radius:0 0 0 5px;width:16px;height:16px;position:absolute;right:0;top:0;z-index:9000;cursor:pointer;border-width:2px 0 2px 4px;border-style:solid;border-color:#fff;opacity:.7;background-size:contain;visibility:hidden}.videoCube:hover .trc_user_adChoice_btn,.videoCube_hover .trc_user_adChoice_btn{visibility:visible}.videoCube .trc_user_adChoice_btn_static{visibility:visible}.p-video-overlay-container{position:absolute;width:100%;height:100%;top:0;left:0;background-color:transparent}.p-video-overlay.p-video-overlay-show{display:flex}.p-video-overlay{display:none;background-color:#000;opacity:.7;width:100%;height:100%;flex-direction:column}.p-video-overlay-action{color:#fff;width:100%;direction:ltr;text-align:center;display:flex;justify-content:center;flex-direction:column}.p-video-overlay-action.p-video-back-action{height:34%}.p-video-back-action-label{font-family:Helvetica Neue,serif;font-size:14px;font-weight:200;letter-spacing:1px}.p-video-overlay-action.p-video-goto-action{height:66%}.p-video-goto-action-url{font-family:Helvetica Neue,serif;font-size:24px;font-weight:400;text-decoration:underline;margin-top:5px}.p-video-goto-action-label{font-family:Helvetica Neue,serif;font-size:14px;font-weight:100;letter-spacing:1px}.trc_related_container .trc_clearer{clear:both;height:0;overflow:hidden;font-size:0;line-height:0;visibility:hidden}.link-adc{float:right!important}.trc-widget-footer .logoDiv{line-height:normal;padding-bottom:5px}.trc-widget-footer .link-adc a .trc_adc_wrapper,.trc_header_ext .link-adc a .trc_adc_wrapper{height:12px;width:18px;display:inline-block;padding-left:1px;margin-bottom:2px}.trc-widget-footer .link-adc a .trc_adc_b_logo,.trc-widget-footer .link-adc a .trc_adc_s_logo,.trc_header_ext .link-adc a .trc_adc_b_logo,.trc_header_ext .link-adc a .trc_adc_s_logo{vertical-align:middle;height:15px;display:inline-block;margin-top:-1px}.trc-widget-footer .link-adc a .trc_adc_s_logo,.trc_header_ext .link-adc a .trc_adc_s_logo{width:12px;height:14px;background:url(//cdn.taboola.com/static/c5/c5ef96bc-30ab-456a-b3d5-a84f367c6a46.svg) no-repeat;background-size:contain;vertical-align:middle}.trc-widget-footer .link-adc a .trc_adc_b_logo,.trc_header_ext .link-adc a .trc_adc_b_logo{width:77px;background:#fff url(//cdn.taboola.com/libtrc/static/thumbnails/0781f9c5a8637d1e162874f157460048.png) no-repeat!important;right:-1px;display:none;position:absolute}.logoDiv .trc_mobile_adc_link,.logoDiv .trc_mobile_attribution_link,.logoDiv .trc_mobile_disclosure_link{display:none}.logoDiv .trc_desktop_adc_link,.logoDiv .trc_desktop_attribution_link,.logoDiv .trc_desktop_disclosure_link{display:inline}@media screen and (max-width:767px){.logoDiv .trc_mobile_disclosure_link{display:inline}.logoDiv .trc_mobile_attribution_link{display:inline}.logoDiv .trc_mobile_adc_link{display:inline}.logoDiv .trc_desktop_disclosure_link{display:none}.logoDiv .trc_desktop_attribution_link{display:none}.logoDiv .trc_desktop_adc_link{display:none}}.trc_in_iframe .logoDiv .trc_mobile_attribution_link,.trc_in_iframe .logoDiv .trc_mobile_disclosure_link{display:inline}.trc_in_iframe .logoDiv .trc_desktop_attribution_link,.trc_in_iframe .logoDiv .trc_desktop_disclosure_link{display:none}.trc_related_container .logoDiv,.trc_related_container .trc_header_ext .logoDiv{float:right}.trc_related_container .logoDiv+.logoDiv{margin-right:2px}.trc_related_container .attribution-disclosure-link-hybrid,.trc_related_container .attribution-disclosure-link-sponsored{display:none}.trc-w2f.trc-content-sponsored .attribution-disclosure-link-sponsored,.trc_related_container .trc-content-sponsored .attribution-disclosure-link-sponsored{display:block}.trc-w2f.trc-content-hybrid .attribution-disclosure-link-hybrid,.trc_related_container .trc-content-hybrid .attribution-disclosure-link-hybrid{display:block}.trc_related_container .trc-widget-footer:hover a span,.trc_related_container .trc_header_ext:hover a span{text-decoration:underline!important}.logoDiv a span.trc_logos_v_align{display:inline-block!important;font-size:15px!important;line-height:1em!important;width:0!important}.trc_related_container .trc-widget-footer:hover a span.trc_adc_wrapper,.trc_related_container .trc-widget-footer:hover a span.trc_logos_v_align,.trc_related_container .trc_header_ext:hover a span.trc_adc_wrapper,.trc_related_container .trc_header_ext:hover a span.trc_logos_v_align{text-decoration:none!important}.trc_related_container .trc_rbox_header_span .trc_header_right_column{display:none}.trc_related_container img{max-width:none}.trc_related_container{clear:both}.tbl-loading-spinner{width:100%;height:40px;background:url(//cdn.taboola.com/static/91/91a25024-792d-4b52-84e6-ad1478c3f552.gif) center center no-repeat;background-size:40px}.tbl-hidden{display:none!important}.tbl-invisible{opacity:0;pointer-events:none}.tbl-batch-anchor{width:100%;height:1px}.iw_video_frame .trc_rbox_div{overflow:hidden}.trc-w2f .trc_rbox .trc-widget-footer,.trc-w2f .trc_rbox .trc_rbox_header{display:none!important}.tbl-banner-to-native{width:100%;cursor:auto;box-shadow:none!important;background-position:center;background-repeat:no-repeat;background-size:cover;margin-bottom:0!important;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}@media screen and (min-width:768px){.tbl-banner-to-native{backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}}.tbl-banner-to-native-hidden{background-size:0 0}.tbl-banner-to-native-iframe{backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.tbl-banner-to-native-iframe-desktop{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tbl-banner-to-native-image-desktop{background-size:cover;filter:blur(4px);-webkit-filter:blur(4px)}span.video-label.video-title.tbl-title-to-native{text-decoration:none;cursor:default}.tbl-branding-title-to-native{text-decoration:underline;cursor:pointer}div.display-to-native-item-box.display-to-native-item-box,span.video-label-box.trc-main-label.tbl-title-to-native{cursor:auto}.thumbBlock_holder_background_image{position:absolute;width:100%;background-position:center;background-repeat:no-repeat;background-size:cover}"});function t(e){try{if(e.global["smart-ellipsis"]&&!TRC.ellipsisListening&&e._repaintEllipsis&&(TRC.listen("ellipsis",e._repaintEllipsis.trcBind(e)),TRC.listen("allrender",e._repaintEllipsis.trcBind(e)),TRC.listen("batchrender",e._repaintEllipsis.trcBind(e)),TRC.ellipsisListening=!0),e._repaintEllipsis||__trcWarn("instance._repaintEllipsis is undefined or null"),TRC.CLSReporter&&TRC.CLSReporter.init(),TRC.TBTReporter&&TRC.TBTReporter.init(),!e.invisible)return;TRC.dom.onReady(function(){div?(div.innerHTML="",div.style.display="none"):(div=doc.createElement("div"),doc.body.appendChild(div).style.display="none"),_taboola.push({mode:"rbox-tracking",container:div})})}catch(e){__trcError("Error in libtrc initialization runManagerInstance",e)}}"function"==typeof e.then?e.then(t):t(e)}catch(e){__trcError("Error in libtrc initialization",e)}},TRC.pConsole("","time","impl file loaded",""),TRC.utm.push((new Date).getTime()-TRC.utm.start),TRC.tlf&&console.timeStamp("call trcReady"),TRC.trcReady()}(window,document);