!function(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t){!function(){"use strict";try{if(void 0===e)var e={};if(e.defaults={trackingHost:"tt.onthe.io",projectId:"26526",projectSignature:"f005c4a14eaf1b923b8df2d935767308",projectCodeId:"Et5BLNwqiW2L",projectCodeVersion:"122",projectUniquesBySuperdomain:"0",projectVisitsBySuperdomain:"0",projectVisitsDuration:"15",projectVideosWithoutMarkup:"1",holdingHash:"f117eb7666fa3c4a5f4b0fa35415b445",holdingId:"26526",crawlerFilter:"1",projectMainDomain:"",projectHeadlineTestingAudienceRatio:"100",setWidgetOnMainDomain:"0",conversions:"0",conversionsWithSubdomains:"0"},void 0===e)e={};if(e.doubleLoadingDetector=function(e,t){var i={init:function(){if("object"!=typeof window.__io&&(window.__io={}),window.__io.startedTrackers||(window.__io.startedTrackers=[]),-1!==window.__io.startedTrackers.indexOf(t.projectCodeId))return!0;window.__io.startedTrackers.push(t.projectCodeId)}};return i}(document,e.defaults),void 0===e)e={};if(e.helpers=function(t,i,r){var n={decodeURIrecursively:function(e){try{for(;decodeURIComponent(e)!=e;)e=decodeURIComponent(e)}catch(e){}return e},encodeURIonce:function(e){return encodeURIComponent(this.decodeURIrecursively(e))},bindOnUrlChange:function(e){var i=t.location.pathname;this.setIntervalSafe(t,function(){t.location.pathname!==i&&(i=t.location.pathname,e())},100)},bindOnElementInsertion:function(e,r,n){n||(n=i);var o=n.querySelectorAll(e);return o=t.Array.prototype.slice.call(o),this.setIntervalSafe(t,function(){var i,a=n.querySelectorAll(e);for(i=0;i2?n.hostname.replace(/^www\./,""):n.hostname,host:n.host,href:n.href,origin:n.origin,pathname:n.pathname,port:n.port,protocol:n.protocol,search:n.search}}catch(i){r={hash:"",hostname:t.location.hostname,hostnameNaked:t.location.hostname.split(".").length>2?t.location.hostname.replace(/^www\./,""):t.location.hostname,host:t.location.host,href:t.location.protocol+"//"+t.location.host+("/"===e.charAt(0)?e:"/"+e),origin:t.location.origin,pathname:e,port:t.location.port,protocol:t.location.protocol,search:""}}return"/"!==r.pathname.charAt(0)&&(r.pathname="/"+r.pathname),r},n.getMainDomain=function(){for(var e=0,r=this.parseURL(t.location.hostname).hostnameNaked,n=r.split("."),o="__io_test"+(new Date).getTime();e=10)){this.trackErrorMetric.errorsCount++;var n={title:"string"==typeof e?e:e.message+"\n\n"+e.stack,href:t.location.href,url:t.location.pathname,domain:t.location.hostname,page:i.title,user_agent:t.navigator.userAgent,referrer_uri:i.referrer};this.sendMetric(r,n)}},n.getMetricParamString=function(e,i){(i=this.cloneObjectShallow(i)).cdn_version=r.projectCodeVersion;var n=[];for(var o in i)""!==i[o]&&i.hasOwnProperty(o)&&n.push(o+":"+this.encodeURIonce(i[o]));var a=e+"["+n.join()+"]";return a=a.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(t.parseInt(arguments[1],16))}),"/?k[]="+r.projectId+":"+a},n.deferMetricToSendInBatch=function(e,i){if(this.deferMetricToSendInBatch.queue||(this.deferMetricToSendInBatch.queue=[]),this.deferMetricToSendInBatch.queue.push(this.getMetricParamString(e,i)),!this.deferMetricToSendInBatch.isQueueActive)var n=this.setIntervalSafe(t,function(){if(0===this.deferMetricToSendInBatch.queue.length)return this.deferMetricToSendInBatch.isQueueActive=!1,void t.clearInterval(n);this.deferMetricToSendInBatch.isQueueActive=!0;var e="";do{e+="&"+this.deferMetricToSendInBatch.queue.shift()}while(this.deferMetricToSendInBatch.queue.length&&(e+this.deferMetricToSendInBatch.queue[0]).length<1900);var i="https://"+r.trackingHost+"/"+e+"&s="+r.projectSignature+"&"+Date.now();this.sendGetRequest(i)}.bind(this),1e3)},n.sendMetric=function(e,t,i,n){var o="https://"+r.trackingHost+this.getMetricParamString(e,t)+"&s="+r.projectSignature+(i?"&_v="+i:"")+(n?"&__io="+this.getUserId():"")+"&"+Date.now();this.sendGetRequest(o)},n.hashFnv32a=function(e,t,i){var r,n,o=void 0===i?2166136261:i;for(r=0,n=e.length;r>>0).toString(16)).substr(-8):o>>>0},n.getStorageStatusLocal=function(){try{var e="__io_test"+(new Date).getTime();return t.localStorage.setItem(e,"1"),t.localStorage.removeItem(e),!0}catch(e){return!1}},n.getStorageStatusSession=function(){try{var e="__io_test"+(new Date).getTime();return t.sessionStorage.setItem(e,"1"),t.sessionStorage.removeItem(e),!0}catch(e){return!1}},n.setPreviousURI=function(e,t){var i={},n=!(!r||!r.projectId)&&this.getCookieValue("__io_nav_state"+r.projectId),o=this.getMainDomain();n&&(i=this.parseJSONSafe(n)||{});var a=new Date((new Date).getTime()+9e5).toUTCString(),s=r&&r.projectId?r.projectId:"";this.setCookie("__io_nav_state"+s,JSON.stringify({current:e,currentDomain:t||"",previous:i.current,previousDomain:i.currentDomain?i.currentDomain:""}),a,"/","."+o)},n.getPreviousURI=function(){var e={},t=!(!r||!r.projectId)&&this.getCookieValue("__io_nav_state"+r.projectId);if(t&&(e=this.parseJSONSafe(t)||{}),e.previous&&e.previous!==e.current)return e.previous},n.getPreviousDomain=function(){var e={},t=!(!r||!r.projectId)&&this.getCookieValue("__io_nav_state"+r.projectId);if(t&&(e=this.parseJSONSafe(t)||{}),e.previous&&e.previous!==e.current&&e.previousDomain)return e.previousDomain},n.setStorageItem=function(e,i,r){r=r?t.encodeURIComponent(r):r;try{switch(e){case"local":t.localStorage.setItem(i,r);break;case"session":t.sessionStorage.setItem(i,r);break;default:throw new Error("IO -- invalid storage type specified")}return!0}catch(e){this.trackErrorMetric(e)}},n.getStorageItem=function(e,i){var r;switch(e){case"local":r=t.localStorage.getItem(i);break;case"session":r=t.sessionStorage.getItem(i)}try{return r?t.decodeURIComponent(r):r}catch(e){this.trackErrorMetric(e)}},n.getPreviousPageTitle=function(){if(this.getStorageStatusSession()){var e,t,r=i.title;if(e=this.getStorageItem("session","__io_previous_title_a"),t=this.getStorageItem("session","__io_previous_title_b"),e===r){if(t)return t}else if(this.setStorageItem("session","__io_previous_title_a",r),e)return this.setStorageItem("session","__io_previous_title_b",e),e}},n.getLastestHeadlineTestIds=function(){if(this.getStorageStatusSession()){var e=this.parseJSONSafe(t.sessionStorage.getItem("__io_headline_testing_latest"));if(e&&"object"==typeof e)return e.lifetime<0?(t.sessionStorage.removeItem("__io_headline_testing_latest"),e={}):e.previousPathname!==t.location.pathname&&(e.previousPathname=t.location.pathname,--e.lifetime,t.sessionStorage.setItem("__io_headline_testing_latest",JSON.stringify(e))),{blockId:e.blockId||void 0,headlineId:e.headlineId||void 0}}},n.getSearchParam=function(e,i){var r=(i?this.parseURL(i).search:t.location.search).match("[?&]"+e+"=([^(&?)]*)");return r?r[r.length-1]:""},n.getCookieValue=function(e){var t=i.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)");return t?this.decodeURIrecursively(t[t.length-1]):""},n.setCookie=function(e,t,r,n,o,a){var s=new Date;s.setFullYear(s.getFullYear()+1),s=s.toUTCString(),r||(r=s),n||(n="/"),void 0!==t&&(t=encodeURIComponent(t));var c=e+"="+(t||"")+"; expires="+r+"; path="+n+(o?"; domain="+o:"")+(a?"; secure":"");i.cookie=c},n.deleteCookie=function(e,i,r){r===t.location.hostname&&(r=null),this.setCookie(e,null,"Thu, 01 Jan 1970 00:00:01 GMT",i,r)},n.getDepth=function(){return this.getDepthCookie()},n.getDepthCookie=function(){var e=new Date((new Date).getTime()+9e5).toUTCString(),i=this.hashFnv32a(t.location.pathname),r=this.getCookieValue("__io_d");if(!r||2!==r.split("_").length)return this.setCookie("__io_d","1_"+i,e,"/","."+this.getMainDomain()),1;var n=r.split("_")[1],o=t.parseInt(r.split("_")[0],10);if(i==n)return o||1;var a=(o||0)+1;return this.setCookie("__io_d",a+"_"+i,e,"/",this.getMainDomain()),a},n.getDepthSession=function(){var e=this.hashFnv32a(t.location.pathname),i=t.sessionStorage.getItem("__io_d");if(!i||2!==i.split("_").length)return t.sessionStorage.setItem("__io_d","1_"+e),1;var r=i.split("_")[1],n=t.parseInt(i.split("_")[0],10);if(e==r)return n||1;var o=(n||0)+1;return t.sessionStorage.setItem("__io_d",o+"_"+e),o},n.getUserId=function(){var e=this.getCookieValue("__io")||this.getRandomHash();return t.parseInt(r.projectUniquesBySuperdomain,10)?(this.deleteCookie("__io","/",t.location.hostname),e=this.getCookieValue("__io")||this.getRandomHash(),this.setCookie("__io",e,!1,"/","."+this.getMainDomain())):this.setCookie("__io",e),e},n.getReferrerCurrentExternal=function(e){if(!(e=e||i.referrer))return null;var n=this.parseURL(e).hostnameNaked,o=this.parseURL(t.location.hostname).hostnameNaked,a=!1;return""!==r.projectMainDomain&&(a=-1!==n.indexOf(r.projectMainDomain)),a?null:n===o?null:n},n.getReferrerCurrentFromParams=function(e){e=e||t.location.href;var i=this.getSearchParam("io_source",e),r=this.getSearchParam("io_utm_social",e),n="?f"===this.parseURL(e).search?"facebook_group":null,o=this.getSearchParam("utm_referrer",e),a=this.getSearchParam("utm_source",e),s=this.getSearchParam("source",e);return i||r||n||o||a||s},n.getReferrer=function(e,t){var i=this.getReferrerCurrentFromParams(t)||this.getReferrerCurrentExternal(e);return i?(this.setCookie("__io_r",i),i):this.getCookieValue("__io_r")},n.getReferrerFirst=function(e){var t=this.getCookieValue("__io_first_source"),i=this.getReferrer(e);return!t&&i?(this.setCookie("__io_first_source",i),i):t},n.getDeviceName=function(){var e=t.navigator.userAgent||"undefined",i="desktop",r=/Android|webOS|iPhone|PlayBook|iPad|iPod|IEMobile|BlackBerry|Mobile|Opera Mini/i.test(e),n=/Tablet|PlayBook|iPad/i.test(e)||/Android/i.test(e)&&!/Mobile/i.test(e)&&!/Opera Mini/i.test(e),o=/Android/i.test(e),a=/iPhone|iPad|iPod/i.test(e);return r&&(n?(i="tablet",i+=o?" (Android)":a?" (iOS)":" (Other)"):(i="smart",i+=o?" (Android)":a?" (iOS)":" (Other)")),i},n.getBrowserNameAndVersion=function(){var e,i,r=t.navigator.userAgent,n="";switch(!0){case-1!==(e=r.indexOf("OPR/")):n=r.substring(e+4);break;case-1!==(e=r.indexOf("Opera"))&&-1!==(e=r.indexOf("Version")):n=r.substring(e+8);break;case-1!==(e=r.indexOf("Opera")):n=r.substring(e+6);break;case-1!==(e=r.indexOf("MSIE")):n=r.substring(e+5);break;case-1!==(e=r.indexOf("Chrome")):n=r.substring(e+7);break;case-1!==(e=r.indexOf("Safari"))&&-1!==(e=r.indexOf("Version")):n=r.substring(e+8);break;case-1!==(e=r.indexOf("Safari")):n=r.substring(e+7);break;case-1!==(e=r.indexOf("Firefox")):n=r.substring(e+8);break;case-1!==r.indexOf("Trident")&&-1!==(e=r.indexOf("rv:")):n=r.substring(e+3).split(")")[0];break;case(e=r.lastIndexOf(" ")+1)<(e=r.lastIndexOf("/")):n=r.substring(e+1)}return n=n.split(";")[0].split(" ")[0],i=(i=t.parseInt(n,10))||"(unknown version)",this.getBrowserName()+" "+i},n.getUserLifeTime=function(){var e=i.cookie.match(/__io=([^;]+)/);return e?(e=e[1].split("_")[1],(e=Math.round((+Date.now()-e)/864e5))<0&&(e=0),0==e?e="0":e<7?e+="d":e=e<30?Math.round(e/7)+"w":Math.round(e/30)+"m",e):"0"},n.getUserLifeTimeNumber=function(){var e=i.cookie.match(/__io_lv=([^;]+)/);return e?(e=e[1],e=Math.round((+Date.now()-e)/864e5)):"0"},n.getUserType=function(){var e="";if(-1==i.cookie.indexOf("__io_lv=")){e="new";var t=new Date;t.setFullYear(t.getFullYear()+1),i.cookie="__io_lv="+ +Date.now()+"; expires="+t.toUTCString()+"; path=/"}else if(0==this.getUserLifeTime())e="new";else{var r=1*this.getUserLifeTimeNumber();e=r>30?"new":r>7?"returned":"constant";var n=new Date;n.setFullYear(n.getFullYear()+1),i.cookie="__io_lv="+ +Date.now()+"; expires="+n.toUTCString()+"; path=/"}return e},n.getUserTypeByProject=function(){var e="",t="__io_ut_state"+r.projectId,n="",o=this.getStorageStatusSession();if(o&&(e=this.getStorageItem("session",t)),-1===i.cookie.indexOf("__io_lv")){n="new";var a=new Date;a.setFullYear(a.getFullYear()+1),i.cookie="__io_lv="+ +Date.now()+"; expires="+a.toUTCString()+"; path=/"}else if(0==this.getUserLifeTime())n="new";else{var s=1*this.getUserLifeTimeNumber();n=s>30?"new":s>7?"returned":"constant";var c=new Date;c.setFullYear(c.getFullYear()+1),i.cookie="__io_lv="+ +Date.now()+"; expires="+c.toUTCString()+"; path=/"}return e||(o&&this.setStorageItem("session",t,n),n)},n.getBrowserName=function(){var e,r,n="[object OperaMini]"===Object.prototype.toString.call(t.operamini),o=!(n||(!t.opr||!t.opr.addons)&&!t.opera),a="undefined"!=typeof InstallTrigger,s=/constructor/i.test(t.HTMLElement)||"[object SafariRemoteNotification]"===Object.prototype.toString.call(this.getDeepPropertySafe(t,["safari","pushNotification"]))||"Apple Computer, Inc."===t.navigator.vendor,c=!!i.documentMode,l=[{name:"Opera",isCurrent:o},{name:"Firefox",isCurrent:a},{name:"Safari",isCurrent:s},{name:"IE",isCurrent:c},{name:"Edge",isCurrent:!c&&!!t.StyleMedia},{name:"Chrome",isCurrent:!(o||!t.chrome||!t.chrome.webstore&&!t.chrome.runtime)},{name:"Opera Mini",isCurrent:n}];for(r=0;r(new Date).getDate()&&(t=new Date((new Date).setHours(24,0,0,0)).toUTCString());var r=this.getCampaignResetStatus();return e&&!r?(this.setCookie("__io_session_id",e,t,"/",i),e):(e=this.getRandomHash(),this.setCookie("__io_session_id",e,t,"/",i),e)},n.setConversionsPageData=function(i){var r=this.getConversionsPageData(),n=JSON.stringify({previous:r.current||{},current:{url:i.url,domain:i.domain,category:i.category,author:i.author,pr:i.pr,depth:i.depth}});if(!this.getStorageStatusLocal()||t.parseInt(e.defaults.conversionsWithSubdomains,10)){var o=e.defaults.projectMainDomain||t.location.hostname;this.setCookie("__io_conversions_page",n,!1,"/",o)}else this.setStorageItem("local","__io_conversions_page",n)},n.getConversionsPageData=function(){var i={};return!this.getStorageStatusLocal()||t.parseInt(e.defaults.conversionsWithSubdomains,10)?this.parseJSONSafe(this.getCookieValue("__io_conversions_page"))||i:this.parseJSONSafe(this.getStorageItem("local","__io_conversions_page"))||i},n.parseLength=function(e){return e&&e.length?e.length:0},n.injectScriptBySrc=function(e,t){var r=i.getElementsByTagName("script")[0],n=i.createElement("script");n.id=t,n.async=!0,n.src=e,r.parentNode.insertBefore(n,r)},n.loadComponentAsync=function(e){try{return e.init()}catch(e){this.trackErrorMetric(e)}},n}(window,document,e.defaults),void 0===e)e={};if(e.debugCodeLoader=function(e,t){var i={flagName:"_io_debug_tracking",init:function(){var i=t.getSearchParam(this.flagName),r=t.getCookieValue(this.flagName),n=i||r;if(n){var o={id:e.projectCodeId+"_"+n,uri:"https://"+n+"_cdn.onthe.io/io.js/"+e.projectCodeId};if(!document.getElementById(o.id))return t.injectScriptBySrc(o.uri,o.id),!0}}};return i}(e.defaults,e.helpers),void 0===e)e={};if(e.nextPageMetricQueueService=function(e,t,i){var r={};r.storageKey="__io_next_page_metrics"+i.projectId,r._getQueue=function(){return t.parseJSONSafe(e.localStorage.getItem(this.storageKey))||[]},r.insertUpdate=function(i,r,n){if(t.getStorageStatusLocal()&&n){var o,a,s=this._getQueue();for(o=0;o0?0:i<-1?-1:i;return r=100-Math.abs(Math.floor(100*r)),Math.abs(r)},sendMetric:function(e){r.bindOnPageDescriptorAppearance(this.url,function(t){i.sendMetric(e,t.getSlices())})},tryToTrackReadabilityAndUnbind25:function(){this.getScrollPercent()<=25||(t.removeEventListener("scroll",this.boundHandles.tryToTrackReadabilityAndUnbind25),this.sendMetric("read_top"))},tryToTrackReadabilityAndUnbind50:function(){this.getScrollPercent()<=50||(t.removeEventListener("scroll",this.boundHandles.tryToTrackReadabilityAndUnbind50),this.sendMetric("read_middle"))},tryToTrackReadabilityAndUnbind75:function(){this.getScrollPercent()<=75||(t.removeEventListener("scroll",this.boundHandles.tryToTrackReadabilityAndUnbind75),this.sendMetric("read_bottom"))},tryToTrackReadabilityAndUnbind95:function(){this.getScrollPercent()<=95||(t.removeEventListener("scroll",this.boundHandles.tryToTrackReadabilityAndUnbind95),this.sendMetric("read_finished"))},bindEvents:function(){this.boundHandles={},this.boundHandles.tryToTrackReadabilityAndUnbind25=i.addEventListenerSafe(t,"scroll",this.tryToTrackReadabilityAndUnbind25.bind(this)),this.boundHandles.tryToTrackReadabilityAndUnbind50=i.addEventListenerSafe(t,"scroll",this.tryToTrackReadabilityAndUnbind50.bind(this)),this.boundHandles.tryToTrackReadabilityAndUnbind75=i.addEventListenerSafe(t,"scroll",this.tryToTrackReadabilityAndUnbind75.bind(this)),this.boundHandles.tryToTrackReadabilityAndUnbind95=i.addEventListenerSafe(t,"scroll",this.tryToTrackReadabilityAndUnbind95.bind(this))},init:function(e){this.element=e,this.url=e.getAttribute("data-io-article-url"),this.bindEvents()}},o={trackExistingArticles:function(){var e,r,o=t.querySelectorAll("[data-io-article-url]");for(e=0;e=0&&e.left<=(window.innerWidth||document.documentElement.clientWidth),right:e.right>=0&&e.left<=(window.innerWidth||document.documentElement.clientWidth),top:e.top>=0&&e.top<=(window.innerHeight||document.documentElement.clientHeight),bottom:e.bottom>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)};return(t.left||t.right)&&(t.top||t.bottom)}},o=e.createObject(n);o.elementSelector=t.projectVideosWithoutMarkup?"video[src], video source":"video[src][data-io-video-title], video[data-io-video-title] source",o.setAnInitialState=function(){this._state={},this._state.isStarted=!1,this._state.isViewed=!1,this._state.isFinished=!1,this._state.untrackedSeconds=0},o.collectMetadata=function(){this.setSlices(),this.previousVideoId&&this.slices.video_id!==this.previousVideoId&&this.setAnInitialState(),this.previousVideoId=this.slices.video_id},o.sendMetric=function(t){this.setSlicesFromConfig(function(){e.sendMetric(t,this.slices)}.bind(this))},o.bindEvents=function(t){this.setAnInitialState(),e.setIntervalSafe(window,function(){!this.element.paused&&this._state.isViewed&&(this._state.untrackedSeconds++,this._state.untrackedSeconds>=5&&(this._state.untrackedSeconds=0,this.collectMetadata(),this.sendMetric("video_time")))}.bind(this),1e3),e.setIntervalSafe(window,function(){this.isInView()&&!this._state.isViewed&&(this.collectMetadata(),this._state.isViewed=!0,this.sendMetric("video_view",this.slices))}.bind(this)),e.addEventListenerSafe(this.element,"timeupdate",function(){0!==window.parseFloat(this.element.currentTime)&&!this._state.isStarted&&this._state.isViewed&&(this.collectMetadata(),this._state.isStarted=!0,this.sendMetric("video_started"))}.bind(this)),e.addEventListenerSafe(this.element,"ended",function(){!this._state.isFinished&&this._state.isViewed&&this._state.isStarted&&(this.collectMetadata(),this._state.isFinished=!0,this.sendMetric("video_watch_finished"))}.bind(this))},o.setSlicesVideoJs=function(){if("function"==typeof window.videojs&&-1!==(this.element.getAttribute("class")||"").indexOf("vjs-tech")&&(this.slices.type="Video JS","object"==typeof e.getDeepPropertySafe(window,["videojs","players"])&&Object.keys(window.videojs.players).length)){var t,i,r;for(t in window.videojs.players)r||window.videojs.players.hasOwnProperty(t)&&window.videojs.players[t]&&"function"==typeof window.videojs.players[t].el&&(i=window.videojs.players[t].el())&&i.contains(this.element)&&(r=window.videojs.players[t]);if(r){var n=e.getDeepPropertySafe(r,["mediainfo","id"]);n&&(this.slices.video_id="videojs"+n)}}},o.setSlicesJwPlayer=function(){if("function"==typeof jwplayer&&"function"==typeof window.jwplayer().getContainer&&"function"==typeof window.jwplayer().getContainer().querySelector&&window.jwplayer().getContainer().querySelector(this.elementSelector)==this.element){this.slices.type="jwplayer";var t="string"!=typeof jwplayer.version||jwplayer.version[0]>6,i=e.getDeepPropertySafe(window.jwplayer(),["config","image","src"])||e.getDeepPropertySafe(window.jwplayer(),["config","image"]);if(t){this.slices.reference_time=e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","duration"])||e.getDeepPropertySafe(window.jwplayer().getConfig(),["duration"]);var r=e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","mediaid"])||e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","sources","0","file"]);r&&(this.slices.video_id=r),i=e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","images","0"])||e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","image"])||e.getDeepPropertySafe(window.jwplayer().getConfig(),["image"]),i=e.getDeepPropertySafe(i,["src"])||i;var n=e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","title"]);n&&(this.slices.title=n)}i&&(this.slices.image=i.split("//").pop())}},o.setSlicesVideoId=function(){var t=this.element.src||(this.element.getElementsByTagName("source")[0]||{}).src;this.element.attributes.getNamedItem("data-io-video-id")?this.slices.video_id=this.element.attributes.getNamedItem("data-io-video-id").value:t&&0===t.indexOf("blob:")&&this.element.attributes.getNamedItem("data-io-video-title")?this.slices.video_id=this.slices.title:t&&(t=e.parseURL(t),this.slices.video_id=t.hostname+t.pathname)},o.setSlices=function(){if(this.slices.type="html5",this.element.duration){var t=this.element.duration;t=window.parseFloat(t),(t=Math.round(t))&&(this.slices.reference_time=t)}if(this.element.poster){var i=e.parseURL(this.element.poster);this.slices.image=i.href.split(i.protocol).pop().slice("2")}this.element.attributes.getNamedItem("data-io-video-title")?this.slices.title=this.element.attributes.getNamedItem("data-io-video-title").value||"No Title":this.slices.title=document.title||"No Title",this.setSlicesVideoId(),this.setSlicesVideoJs(),this.setSlicesJwPlayer(),this.isEmbedded&&this.setSlicesEmbed()};var a=e.createObject(n);a.elementSelector='iframe[src*="//www.youtube.com/embed"], iframe[src*="//www.youtube-nocookie.com/embed"]',a.setSlices=function(){this.slices.type="youtube",this.isEmbedded&&this.setSlicesEmbed()},a.enableJsApi=function(){var t=-1!==this.element.src.indexOf("enablejsapi=1"),i=-1!==this.element.src.indexOf("origin=");t&&i&&this.element.dispatchEvent(new Event("ioVideoApiEnabled"));var r=e.addEventListenerSafe(this.element,"load",function(){this.element.dispatchEvent(new Event("ioVideoApiEnabled")),this.element.removeEventListener("load",r)}.bind(this));if(!t||!i){var n=e.parseURL(this.element.src),o=n.protocol+"//"+n.host+n.pathname+(n.search?n.search:"?")+(t?"":"&enablejsapi=1")+(i?"":"&origin="+e.encodeURIonce(window.location.origin))+(n.hash?"#"+n.hash:"");this.element.contentWindow.location.replace(o)}},a.getPlayerId=function(){var t=(this.element.src.match(/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=)|(?:list=))([^#\&\?]*).*/)||[])[1],i=e.getSearchParam("widgetid",this.element.src),r=this.element.id?(this.element.id.match(/widget([0-9]+)$/)||[])[1]-1:null;return i||r||t},a.processAnEvent=function(t){if(-1!==t.origin.indexOf("//www.youtube.com")||-1!==t.origin.indexOf("//www.youtube-nocookie.com")){var i,r=e.parseJSONSafe(t.data)||{},n=r.info||{},o=e.getDeepPropertySafe(r,["info","videoData","video_id"]),a=e.getDeepPropertySafe(r,["info","videoData","title"]),s=this.getPlayerId();o!=s&&r.id!=s||(n.duration&&(this.slices.reference_time=n.duration),n.currentTime&&(this.slices.time_int=n.currentTime),a&&(this.slices.title=a),o&&(this.slices.video_id=o,this.slices.image="img.youtube.com/vi/"+o+"/0.jpg"),this.slices.title&&this.slices.video_id&&(this.state.isReadyForTracking=!0,this.state.isViewed&&!this.state.isStarted&&n.currentTime&&this.trackStart(),i=n.currentTime&&window.parseInt(n.currentTime,10)===window.parseInt(this.slices.reference_time,10),this.state.isViewed&&this.state.isStarted&&!this.state.isFinished&&i&&this.trackEnd()))}},a.bindEvents=function(){this.boundFunctions.listenerViewIntervalId=e.setIntervalSafe(window,function(){this.isInView()&&this.state.isReadyForTracking&&(window.clearInterval(this.boundFunctions.listenerViewIntervalId),this.saveViewUrl(),this.setSlices(),this.trackView())}.bind(this)),this.boundFunctions.listenerApiEnabled=e.addEventListenerSafe(this.element,"ioVideoApiEnabled",function(){e.messageFrameWindow(this.element,{event:"listening",id:this.getPlayerId(),channel:"widget"}),this.element.removeEventListener("ioVideoApiEnabled",this.boundFunctions.listenerApiEnabled)}.bind(this)),this.boundFunctions.listenerApiEvents=e.addEventListenerSafe(window,"message",function(e){this.processAnEvent(e),this.state.isFinished&&(window.removeEventListener("beforeunload",this.boundFunctions.listenerLeave),window.removeEventListener("message",this.boundFunctions.listenerApiEvents))}.bind(this)),this.boundFunctions.listenerLeave=e.addEventListenerSafe(window,"beforeunload",function(){this.state.isLeft?window.removeEventListener("beforeunload",this.boundFunctions.listenerLeave):this.state.isStarted&&this.trackExitBeforeEnd()}.bind(this))};var s=e.createObject(n);s.elementSelector='iframe[src*="//player.vimeo.com/video"]',s.getVideoId=function(){return(e.decodeURIrecursively(this.element.src).match(/\/video\/(\d+)/)||[]).pop()},s.setSlices=function(){var e=this.getVideoId();this.slices.type="vimeo",this.slices.video_id=this.slices.type+e,this.slices.image="i.vimeocdn.com/video/"+e+"_480.jpg",this.isEmbedded&&this.setSlicesEmbed()},s.getPlayerId=function(){return e.getSearchParam("player_id",this.element.src)},s.enableJsApi=function(){if(-1===this.element.src.indexOf("player_id=")){var t=e.addEventListenerSafe(this.element,"load",function(){this.element.dispatchEvent(new Event("ioVideoApiEnabled")),this.element.removeEventListener("load",t)}.bind(this)),i=e.parseURL(this.element.src),r=i.protocol+"//"+i.host+i.pathname+(i.search?i.search:"?")+"&player_id="+this.getVideoId()+(i.hash?"#"+i.hash:"");this.element.src=r}else this.element.dispatchEvent(new Event("ioVideoApiEnabled"))},s.processAnEvent=function(t){if(-1!=t.origin.indexOf("//player.vimeo.com")){var i,r=e.parseJSONSafe(t.data);r&&r.player_id==this.getPlayerId()&&("getVideoTitle"===r.method&&r.value&&(this.slices.title=r.value),"getDuration"===r.method&&r.value&&(this.slices.reference_time=r.value),this.slices.title&&this.slices.reference_time&&(this.state.isReadyForTracking=!0,"playProgress"===r.event&&r.data&&(this.slices.reference_time=r.data.duration,this.slices.time_int=r.data.seconds,this.state.isViewed&&!this.state.isStarted&&this.trackStart(),i=r.data.duration&&r.data.seconds&&window.parseInt(r.data.duration,10)===window.parseInt(r.data.seconds,10),this.state.isViewed&&this.state.isStarted&&!this.state.isFinished&&i&&this.trackEnd())))}},s.bindEvents=function(){this.boundFunctions.listenerViewIntervalId=e.setIntervalSafe(window,function(){this.isInView()&&this.state.isReadyForTracking&&(window.clearInterval(this.boundFunctions.listenerViewIntervalId),this.saveViewUrl(),this.setSlices(),this.trackView())}.bind(this)),this.boundFunctions.listenerApiEnabled=e.addEventListenerSafe(this.element,"ioVideoApiEnabled",function(){e.messageFrameWindow(this.element,{method:"getVideoTitle"}),e.messageFrameWindow(this.element,{method:"getDuration"}),e.messageFrameWindow(this.element,{method:"addEventListener",value:"playProgress"}),this.element.removeEventListener("ioVideoApiEnabled",this.boundFunctions.listenerApiEnabled)}.bind(this)),this.boundFunctions.listenerApiEvents=e.addEventListenerSafe(window,"message",function(e){this.processAnEvent(e),this.state.isFinished&&(window.removeEventListener("beforeunload",this.boundFunctions.listenerLeave),window.removeEventListener("message",this.boundFunctions.listenerApiEvents))}.bind(this)),this.boundFunctions.listenerLeave=e.addEventListenerSafe(window,"beforeunload",function(){this.state.isLeft?window.removeEventListener("beforeunload",this.boundFunctions.listenerLeave):this.state.isStarted&&this.trackExitBeforeEnd()}.bind(this))};var c={};return c.VideoGeneric=n,c.VideoYoutube=a,c.VideoHTML5=o,c.VideoVimeo=s,c.trackVideosHTML5=function(){var t=e.createObject(e.ElementObserver);t.init(this.VideoHTML5.elementSelector),t.elementsFiltered=[],t.start(function(i){for(;i&&"VIDEO"!==i.nodeName;)i=i.parentElement;if(i&&-1===t.elementsFiltered.indexOf(i)){t.elementsFiltered.push(i);var r=e.createObject(this.VideoHTML5);r.init(i),r.bindEvents()}}.bind(this))},c.trackVideosYoutube=function(){var t=e.createObject(e.ElementObserver);t.init(this.VideoYoutube.elementSelector),t.start(function(t){var i=e.createObject(this.VideoYoutube);i.init(t),i.bindEvents(),i.enableJsApi()}.bind(this))},c.trackVideosVimeo=function(){var t=e.createObject(e.ElementObserver);t.init(this.VideoVimeo.elementSelector),t.start(function(t){var i=e.createObject(this.VideoVimeo);i.init(t),i.bindEvents(),i.enableJsApi()}.bind(this))},c.init=function(){this.trackVideosHTML5(),this.trackVideosYoutube(),this.trackVideosVimeo()},c}(e.helpers,e.defaults,e.configParser,e.nextPageMetricQueueService),void 0===e)e={};if(e.widgetLoader=function(e,t,i,r,n){var o={};return e._io_widget={},o.reload=function(){this.clearDOM(),this.insertIntoDOM(),r.bindOnPageDescriptorAppearance(e.location.href,function(t){e._io_widget.configSlices=t.getSlices(),e._io_widget.configArticleBlockUrl=t.data.page_url,e._io_widget.start()}.bind(this))},o.clearDOM=function(){for(var e=t.querySelectorAll('div[data-io-id="_io_widget_element"], script[data-io-id="_io_widget_element"]'),i=0;i=0&&n<=e.innerHeight},waitForSubscriptionBlockView:function(e){if(this.alreadyViewed||!this.slices)return!1;r.isScrolledIntoView(e)&&(this.alreadyViewed=!0,t.sendMetric("subscription_button_view",this.slices))},trackClick:function(){if(!this.slices)return!1;t.sendMetric("subscription_button_click",this.slices);var e=this.slices.first_source?this.slices.first_source:this.slices.referrer,i=location.host.replace("www.","").replace("m.",""),r=new Date((new Date).setHours(720,0,0,0)).toUTCString();t.setCookie("__io_subscription_source",e||"direct",r,"/",i),t.setCookie("__io_subscription_url",this.slices.url,r,"/",i)},listenForConfigAndPageMatchOnce:function(){i.bindOnPageDescriptorAppearance(e.location.href,function(e){r.slices=e.getSlices()})},listenForPageChanges:function(){t.bindOnUrlChange(this.listenForConfigAndPageMatchOnce.bind(this))},setSlices:function(){this.listenForConfigAndPageMatchOnce(),this.listenForPageChanges()},init:function(){this.setSlices();var e=t.createObject(t.ElementObserver);e.init(this.defaultBlockSelector),e.start(function(i){e.stop(),t.addEventListenerSafe(document,"scroll",function(){r.waitForSubscriptionBlockView(i)});var n=document.querySelectorAll(r.defaultButtonsSelector);if(0===t.parseLength(n))return!1;for(var o=0;o=e.pageYOffset&&r>=e.pageXOffset&&i+o<=e.pageYOffset+e.innerHeight&&r+n<=e.pageXOffset+e.innerWidth};var o={};return o.Target=n,o.getParentByChild=function(e,i){var r;for(r=0;r