1(()=>{"use strict";const e=window.wp.htmlEntities;class t{constructor(e,t={},i=[]){this.initialState=e,this.possibleStates=t,this.stateArgs=i,this.state=null;for(const e of Object.values(this.possibleStates))e.stateMachine=this}step(){null===this.state&&(this.state=this.initialState,this.possibleStates[this.state].enter(...this.stateArgs)),this.possibleStates[this.state].execute(...this.stateArgs)}transition(e,...t){this.state=e,this.possibleStates[this.state].enter(...this.stateArgs,...t)}}class i{enter(){}execute(){}}class s extends t{constructor(e,t={},i=[],s={}){if(super(e,t,i),!("playerWrap"in s&&s.playerWrap instanceof HTMLElement&&"player"in s&&s.player instanceof HTMLElement&&"sizeHelper"in s&&s.sizeHelper instanceof HTMLElement))throw new Error("The markup is not correct!");this.$playerwrap=s.playerWrap,this.$player=s.player,this.$helper=s.sizeHelper,this.$header=document.querySelector("#header"),this.$mainNav=document.querySelector("ul.main-nav"),this.$wpadminbar=document.querySelector("#wpadminbar"),this.initialPlayerHeight=this.getHeight(this.$player),this.initialPlayerWidth=this.getWidth(this.$player),this.playerRatio=this.initialPlayerHeight/this.initialPlayerWidth,this.anchorAdObserver=null;let a=document.querySelector(".footer-share-bar .fsb-desktop iframe"),o="fsb-desktop";if(a||(a=document.querySelector(".mobile-anchor iframe"),o="mobile-anchor"),a){const e=a.closest(`.${o}`).offsetHeight;this.anchorAdObserver=new ResizeObserver(t=>{for(const i of t){const{top:t}=i.target.getBoundingClientRect();if(0===t)return;const s=!!i.target.src,a=document.querySelector("#IL_INSEARCH"),o=a?110:0,r=!s&&!a&&e<=50?150:0,n=window.innerHeight-t;this.$playerwrap.style.bottom=Math.max(0,n,e,o,r)+"px"}}),window.googletag=window.googletag||{cmd:[]},googletag.cmd.push(()=>{googletag.pubads().addEventListener("slotOnload",e=>{const t=e.slot.getSlotElementId();if(t.includes("anchor")){const e=document.querySelector(`[id="${t}"] iframe`);this.anchorAdObserver.observe(e)}})}),this.anchorAdObserver.observe(a)}}getOffset(e){const t=e.getBoundingClientRect();return{top:t.top+window.scrollY,left:t.left+window.scrollX}}getOuterHeight(e,t=!1){let i=e.offsetHeight;if(t){const t=getComputedStyle(e);i+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return i}getHeight(e){const t=getComputedStyle(e);return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)}getWidth(e){const t=getComputedStyle(e);return e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}getMainNavOffset(){let e=0;return null===this.$mainNav||null===this.$header?0:(this.$mainNav.offsetTop>=this.getHeight(this.$header)&&(e=this.getHeight(this.$mainNav)),e)}getHeaderOffset(){let e=0;return this.$wpadminbar&&(e+=this.getHeight(this.$wpadminbar)),e}}let a=370;window.matchMedia("(max-width: 40em)").matches&&(a=220);class o extends i{constructor(){super(),this.offsetHelper=0}enter(){const e=Math.min(this.stateMachine.getWidth(this.stateMachine.$player.parentElement),a);this.stateMachine.$helper.style.height=this.stateMachine.getOuterHeight(this.stateMachine.$playerwrap,!0)+"px",this.stateMachine.$player.style.width=e+"px",this.stateMachine.$player.style.height=e*this.stateMachine.playerRatio+"px",this.stateMachine.$player.style.maxWidth="100%",this.stateMachine.$playerwrap.classList.add("sticky"),this.stateMachine.$playerwrap.style.display="none",this.stateMachine.$playerwrap.offsetWidth,this.stateMachine.$playerwrap.style.display=""}execute(){const e=this.stateMachine.getHeaderOffset()+this.stateMachine.getMainNavOffset();this.offsetHelper!==e&&(this.offsetHelper=e),this.stateMachine.entry.isIntersecting&&this.stateMachine.transition("unstick")}}class r extends i{enter(){this.stateMachine.$player.style.width=this.stateMachine.initialPlayerWidth+"px",this.stateMachine.$player.style.height=this.stateMachine.initialPlayerHeight+"px",this.stateMachine.$player.style.maxWidth="100%",this.stateMachine.$playerwrap.classList.remove("sticky"),this.stateMachine.$playerwrap.style.display="none",this.stateMachine.$playerwrap.offsetWidth,this.stateMachine.$playerwrap.style.display="",this.stateMachine.$helper.style.height="0",this.stateMachine.entry.isIntersecting||this.stateMachine.transition("stick")}execute(){this.stateMachine.entry.isIntersecting||this.stateMachine.transition("stick")}}class n extends i{enter(){this.stateMachine.$player.style.width=this.stateMachine.initialPlayerWidth+"px",this.stateMachine.$player.style.height=this.stateMachine.initialPlayerHeight+"px",this.stateMachine.$player.style.maxWidth="100%",this.stateMachine.$playerwrap.classList.remove("sticky"),this.stateMachine.$helper.style.height="0",this.stateMachine.anchorAdObserver&&this.stateMachine.anchorAdObserver.disconnect()}}class d extends i{enter(e){window.addEventListener("scroll",()=>{e?e.play()?.then(()=>{this.stateMachine.entry.isIntersecting?this.stateMachine.transition("unstick"):this.stateMachine.transition("stick")}):this.stateMachine.entry.isIntersecting?this.stateMachine.transition("unstick"):this.stateMachine.transition("stick")},{once:!0})}}const c=window.wp.components,l=window.wp.element,h=window.wp.i18n,p=window.wp.url,u=e=>{const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift():null},A=window.ReactJSXRuntime;function y(e,t){return new Promise((i,s)=>{if(!t)return void s("must pass video ID");const a=s=>{try{const o=JSON.parse(s.data);e===o.event&&t===o.id&&(window.removeEventListener("message",a),i(window.zypePlayers[t]))}catch(e){}};window.addEventListener("message",a)})}function g(e,t,i={},s=!1){const a=new URL(t),o=[];for(const e in i)o.push(e+"="+i[e]);return"undefined"!=typeof OnetrustActiveGroups&&OnetrustActiveGroups.includes("C0004")?(a.searchParams.set("rdp",0),a.searchParams.set("npa",0)):(a.searchParams.set("rdp",1),a.searchParams.set("npa",1)),a.searchParams.set("vid",e),a.searchParams.set("vpmute",s?1:0),a.searchParams.set("cust_params",o.join("&")),a.toString()}const v={},m=new WeakMap;function f(e){return m.has(e)||m.set(e,{eventListenersInitialized:!1,adsScheduledBySource:new Set}),m.get(e)}const w=new URLSearchParams(window.location.search),M=w.get("utm_medium")?.toLowerCase(),_=(e,t)=>
1{var i;if(!v[t])return void console.warn(`No video event data found for video ID ${t}`);const s=null!==(i=videoBridge?.eventCat)&&void 0!==i?i:"zype_shortcode";let a=0;const{quartilesReached:o,videoTitle:r,currentTimeFunction:n,duration:d,contentType:c,stickyStateMachine:l}=v[t];o&&(o.first&&(a=25),o.second&&(a=50),o.third&&(a=75),o.fourth&&(a=100));let h=videoBridge?.video_show;var p;h||(h=null!==(p=videoBridge?.video_content_category)&&void 0!==p?p:void 0);let u="stick"===l?.state?"floating":"inline";"video_hub"===s&&(u="hub");const A={video_stage:e,video_environment:s,video_id:t,video_title:null!=r?r:void 0,video_duration:d,video_current_time:"function"==typeof n?n():void 0,video_percent:a,video_provider:"zype",content_type:c||"editorial",video_category:h,page_type:"zype_shortcode"===s?"article":s,player_surface:u};v[t]?.errorMessage&&(A.error_message=String(v[t].errorMessage).slice(0,100)),window.iOneGA.sendEventDirectly("video_event",A),delete v[t].errorMessage,delete v[t].contentType};function E(t,i={},a){const c=new URL(t);let l;l="cpc"===M||"true"===c.searchParams.get("autoplay"),c.searchParams.set("autoplay","false"),i.isAudioOnly&&c.searchParams.set("audio","true"),y("zype:setupcomplete",i.videoId).then(t=>{videoBridge?.options?.disablesticky||function(e,t){let i;const a=new IntersectionObserver(e=>{e.forEach(e=>{i.entry=e,i.step()})},{rootMargin:"0px",threshold:.25}),c=t.matches("#zype-shortcode-wrapper")?t:t.querySelector("#zype-shortcode-wrapper"),l="cpc"===M?"stick":"wait";c&&(a.observe(c),i=new s(l,{wait:new d,unstick:new r,stick:new o,stop:new n},[],{playerWrap:t.querySelector("#zype-shortcode-player"),player:t.querySelector("#zype-shortcode-player .zype-shortcode"),sizeHelper:t.querySelector("#zype-shortcode-cls-helper")}),v[e]={},v[e].stickyStateMachine=i,t.querySelectorAll(".ione-video__close-button").forEach(e=>{e.addEventListener("click",()=>{i.transition("stop"),a.disconnect()})}))}(i.videoId,a),function(t,i={},s){var a,o;const r=f(t);if(r.eventListenersInitialized)return;r.eventListenersInitialized=!0;const{videoId:n,videoTitle:d}=i;v[n]={...null!==(a=v[n])&&void 0!==a?a:{},duration:null!==(o=t.getDuration())&&void 0!==o?o:null,currentTimeFunction:t.getCurrentTime.bind(t),videoTitle:d,playerReady:!0,firstFrameViewed:!1,quartilesReached:{first:!1,second:!1,third:!1,fourth:!1}},_("player_ready",n);const c=s.querySelector(".ione-video__video-title");c&&(c.textContent.length||(c.textContent=(0,e.decodeEntities)(d))),y("zype:firstframeviewed",n).then(()=>{v[n].firstFrameViewed=!0,_("video_start",n)}),t.on("timechanged",e=>{if(0<v[n].duration){const t=e.time/v[n].duration*100;25<=t&&!1===v[n].quartilesReached.first&&(v[n].quartilesReached.first=!0,_("video_progress",n)),50<=t&&!1===v[n].quartilesReached.second&&(v[n].quartilesReached.second=!0,_("video_progress",n)),75<=t&&!1===v[n].quartilesReached.third&&(v[n].quartilesReached.third=!0,_("video_progress",n))}}),t.on("playbackfinished",()=>{!1===v[n].quartilesReached.fourth&&(v[n].quartilesReached.fourth=!0,_("video_complete",n))}),["adstarted","admanifestloaded","adskipped","adfinished"].forEach(e=>{t.on(e,e=>{let t=e.type;switch(t){case"admanifestloaded":t="ad_loaded";break;case"adstarted":t="ad_started";break;case"adskipped":t="ad_skipped";break;case"adfinished":t="ad_complete"}v[n].contentType="advertisement",_(t,n)})}),["play","paused","seeked","viewmodechanged","muted","unmuted","error"].forEach(e=>{t.on(e,e=>{let t=e.type;switch(t){case"play":t="video_play";break;case"paused":t="video_pause";break;case"seeked":t="video_seek";break;case"viewmodechanged":t="fullscreen"===e.to?"video_fullscreen":"fullscreen"===e.from?"video_exit_fullscreen":"";break;case"muted":t="video_mute";break;case"unmuted":t="video_unmute";break;case"error":t="video_error",v[n].errorMessage=e.message;break;default:t=""}t&&_(t,n)})})}(t,i,a);const c=e=>{t.off("sourceloaded",c);const s=f(t),a=function(e,t={}){var i,s;return null!==(i=null!==(s=e?.source?.url)&&void 0!==s?s:e?.source?.title)&&void 0!==i?i:t.videoId}(e,i);!function(e,t={}){var i,s;const{videoId:a}=t;v[a]={...null!==(i=v[a])&&void 0!==i?i:{},duration:null!==(s=e.getDuration())&&void 0!==s?s:null,quartilesReached:{first:!1,second:!1,third:!1,fourth:!1}}}(t,i),-1!==videoBridge.options.ad_exclusions.indexOf(i.videoId)||s.adsScheduledBySource.has(a)?console.log("Zype Player Adapter: THIS VIDEO WONT GET ADS"):(function(e,t={}
1,i=!1){const s={postID:videoBridge.postId,category:videoBridge.categories.join(","),tag:videoBridge.tags.join(",")};if(M&&(s.utm_medium=M),videoBridge.options.ad_tag&&e.ads.schedule({tag:{url:g(t.videoId,videoBridge.options.ad_tag,s,i),type:"vast"},id:"Preroll",position:"pre"}),videoBridge.options.ad_tag_midroll){var a;const o=null!==(a=t.adBreaks)&&void 0!==a?a:new Set;if(o.size>0){let a=0;for(const r of o)e.ads.schedule({tag:{url:g(t.videoId,videoBridge.options.ad_tag_midroll,s,i),type:"vast"},id:`midroll_${a}`,position:r}),a++}else{const a=parseInt(e.getDuration(),10),o=[];a>480&&a<900?o.push("50%"):a>=900&&a<1200?(o.push("33%"),o.push("66%")):a>=1200&&(o.push("25%"),o.push("50%"),o.push("75%")),o.forEach((a,o)=>{e.ads.schedule({tag:{url:g(t.videoId,videoBridge.options.ad_tag_midroll,s,i),type:"vast"},id:`midroll_${o}`,position:a})})}}}(t,i,l),s.adsScheduledBySource.add(a)),l&&async function({muted:e=!0}={}){const t=document.createElement("video");t.muted=e,t.playsInline=!0,t.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwEAAAAAAAK8EU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHWTbuMU6uEElTDZ1OsggGRTbuMU6uEHFO7a1OsggKm7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsCrXsYMPQkBNgIxMYXZmNjIuMy4xMDBXQYxMYXZmNjIuMy4xMDBEiYhAj0AAAAAAABZUrmtAta4BAAAAAAAAR9eBAXPFiMyZZj7rURiKnIEAIrWcg3VuZIiBAIaFVl9WUDmDgQEj44OEO5rKAOCYsIEBuoEBmoECVbCMVbGBAFW7gQFVuYECrgEAAAAAAABc14ECc8WINSO6HRbhC3CcgQAitZyDdW5kiIEAhoZBX09QVVNWqoNjLqBWu4QExLQAg4EC4ZGfgQG1iEC/QAAAAAAAYmSBEGOik09wdXNIZWFkAQE4AUAfAAAAAAASVMNnQNlzc59jwIBnyJlFo4dFTkNPREVSRIeMTGF2ZjYyLjMuMTAwc3PaY8CLY8WIzJlmPutRGIpnyKVFo4dFTkNPREVSRIeYTGF2YzYyLjExLjEwMCBsaWJ2cHgtdnA5Z8ihRaOIRFVSQVRJT05Eh5MwMDowMDowMS4wMDAwMDAwMDAAc3PXY8CLY8WINSO6HRbhC3BnyKJFo4dFTkNPREVSRIeVTGF2YzYyLjExLjEwMCBsaWJvcHVzZ8ihRaOIRFVSQVRJT05Eh5MwMDowMDowMC4wMDAwMDAwMDAAH0O2dbHngQCjrIEAAICiSYNC4AAAAAYAOCQcGEoAACAgABG///+mlH/////TSj/////ppQAAHFO7a5G7j7OBALeK94EB8YICcPCBAw==";try{return await t.play(),t.pause(),!0}catch(e){return!1}}({muted:!1}).then(e=>{e&&"video_hub"===videoBridge.eventCat||t.mute(),t.play()})};t.on("sourceloaded",c)});const h=document.createElement("script");h.src=c.toString(),h.async=!0,document.body.appendChild(h)}function b(e){const t=e.replace(".js",".json");return new Promise((e,i)=>{fetch(t,{headers:{Accept:"application/json"}}).then(e=>{if(!e.ok)throw e.status;return e.json()}).then(t=>{void 0===t.response||void 0===t.response.video||void 0===t.response.video.title?i(new Error("Invalid video data response")):e(t.response.video)}).catch(e=>{console.error("ERROR GETTING VIDEO DATA:",e),i(e)})})}function k(e,t){return new Promise((i,s)=>{fetch(`https://api.zype.com/videos/${e}/ad_timings?api_key=${t}`,{method:"GET",headers:{Accept:"application/json"}}).then(e=>{if(!e.ok)throw e.status;return e.json()}).then(e=>{const t=new Set,s=e.response;s.length>0&&s.forEach(e=>{e.ad_timings.forEach(e=>{0!==e.time&&t.add(e.hms_time)})}),i(t)}).catch(e=>{s("Error getting ad timings:",e)})})}document.querySelectorAll(".zype-shortcode").forEach(async function(e){var t,i;const s=null!==(t=null!==(i=e.closest(".ione-video"))&&void 0!==i?i:e.parentElement)&&void 0!==t?t:e,a={videoId:e.dataset.videoid,videoTitle:"",adBreaks:null,adobeRequired:e.dataset.adoberequired};let o=e.dataset.url;if("1"===a.adobeRequired){const t=await async function(e){let t=(0,l.createRoot)(e);t.render((0,A.jsx)("div",{className:"ione-adobe-check",children:(0,A.jsxs)("p",{children:[(0,A.jsx)(c.Spinner,{}),(0,h.__)("Checking if the video is availableâ¦","ione-modules")]})}));const i=u("ione_zype_session_id"),s=u("ione_adobe_device_code");if(i&&s)try{const e=await fetch("/wp-json/ione/v1/adobe-auth-media-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:i})}),s=await e.json();if(e?.ok&&"string"==typeof s?.media_token)return t.unmount(),s.media_token;console.log(s)}catch(e){console.error(e.message)}t.unmount();const a=(0,p.addQueryArgs)("/videos/watch-login/",{redirect:window.location.href});return videoBridge.postId&&0>=parseInt(videoBridge.postId)?(t=(0,l.createRoot)(e),t.render((0,A.jsx)("div",{className:"ione-adobe-check",children:(0,A.jsxs)("p",{children:[(0,h.__)("Please login to your Cable Provider to watch this video.","ione-modules"),(0,A.jsx)("a",{href:a,children:(0,h.__)("Login here","ione-modules")})]})}))):window.location.href=a,!1}(e);if(!t)return;const i=new URL(o);i.searchParams.set("adobe_media_token",t),o=i.toString()}if("yes"===e.dataset.isplaylist)E(o,a,s);else{const t=new URL(o).searchParams.get("api_key");Promise.all([b(o).catch(e=>(console.error("Error getting video data:",e),{title:""})),k(e.dataset.videoid,t).catch(e=>(console.error("Error getting ad timings:",e),null)),(r={id:e.dataset.videoid,readOnlyKey:!1},new Promise((e,t)=>
1{if("object"!=typeof r||null===r||!r.id||"object"!=typeof videoBridge||null===videoBridge)return void e(!1);const i=videoBridge.read_only_key||!1,s=r.readOnlyKey||i,a=r.id;if(!s)return void e(!1);const o=new URLSearchParams;o.append("api_key",s);const n=new AbortController,d=setTimeout(()=>n.abort(),5e3);fetch(`https://api.zype.com/videos/${a}/self_hosted?${o.toString()}`,{method:"GET",headers:{Accept:"application/json"},signal:n.signal}).then(e=>{if(clearTimeout(d),!e.ok)throw new Error(`Zype API ${e.status}`);return e.json()}).then(t=>{const i=Array.isArray(t?.response)&&t.response[0]&&Array.isArray(t.response[0].outputs)?t.response[0].outputs:[];let s=!0;for(let e=0;e<i.length;e++)if(Number(i[e]?.aspect_ratio)>0){s=!1;break}e(s)}).catch(e=>{clearTimeout(d),t(e)})})).catch(e=>(console.warn("videoIsAudioOnly failed, defaulting to false",e),!1))]).then(([e,t,i])=>{a.videoTitle=e.title,a.adBreaks=t,a.isAudioOnly=i,E(o,a,s)})}var r})})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.