!function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},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:"31534",projectSignature:"c5a21a9c65a35d0c82ba2d367aef9d65",projectCodeId:"sJeFLa7tlWoG",projectCodeVersion:"7",projectUniquesBySuperdomain:"0",projectVisitsBySuperdomain:"0",projectVisitsDuration:"15",projectVideosWithoutMarkup:"",holdingHash:"1c88aab2411860d54778a971efdb400f",holdingId:"18466",crawlerFilter:"0",projectMainDomain:"",projectHeadlineTestingAudienceRatio:"0",setWidgetOnMainDomain:"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,n){var r={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,n,r){r||(r=i);var o=r.querySelectorAll(e);return o=t.Array.prototype.slice.call(o),this.setIntervalSafe(t,function(){var i,s=r.querySelectorAll(e);for(i=0;i<s.length;i++)-1===t.Array.prototype.indexOf.call(o,s[i])&&(o.push(s[i]),n(s[i]))},1e3)}};return r.ElementObserver={lookupDelay:1e3,init:function(e,t){this.elements=[],this.selector=e,this.parentElement=t||i,this.state={running:!1},this.intervalId=null},insertIgnoreAnElement:function(e){-1===this.elements.indexOf(e)&&(this.elements.push(e),this.callback(e))},start:function(e){this.state.running=!0,this.callback=e;var i,n=this.parentElement.querySelectorAll(this.selector);for(i=0;i<n.length;i++){if(!this.state.running)return;this.insertIgnoreAnElement(n[i])}this.intervalId&&(t.clearInterval(this.intervalId),this.intervalId=null),this.intervalId=this._setIntervalSafe(t,function(){if(!this.state.running)return t.clearInterval(this.intervalId),void(this.intervalId=null);var e,i=this.parentElement.querySelectorAll(this.selector);for(e=0;e<i.length;e++){if(!this.state.running)return;this.insertIgnoreAnElement(i[e])}}.bind(this),this.lookupDelay)},stop:function(){this.state.running=!1},_setIntervalSafe:function(){return this.setIntervalSafe.apply(this,arguments)}.bind(r)},r.sendGetRequest=function(e){if(t.XMLHttpRequest instanceof t.Object)this.getRemoteContent(e);else{var n=i.createElement("img");n.width=1,n.height=1,n.src=e}},r.getRemoteContent=function(e,i){i||(i=function(){});var n=new t.XMLHttpRequest;n.onreadystatechange=function(){this.readyState===t.XMLHttpRequest.DONE&&(200===this.status?i(this.responseText):i(void 0))},n.open("GET",e,!0),n.send()},r.getEnumerableKeys=function(e){var t,i=[];for(t in e)e.hasOwnProperty(t)&&i.push(t);return i},r.getDeepPropertySafe=function(e,t){var i;try{for(i=0;i<t.length;i++)e=e[t[i]];return e}catch(e){return}},r.parseJSONSafe=function(e){try{return t.JSON.parse(e)}catch(e){return}},r.parseURL=function(e){var n,r=i.createElement("a");r.href=e;try{n={hash:r.hash,hostname:r.hostname,hostnameNaked:r.hostname.split(".").length>2?r.hostname.replace(/^www\./,""):r.hostname,host:r.host,href:r.href,origin:r.origin,pathname:r.pathname,port:r.port,protocol:r.protocol,search:r.search}}catch(i){n={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"/"!==n.pathname.charAt(0)&&(n.pathname="/"+n.pathname),n},r.getMainDomain=function(){for(var e=0,n=this.parseURL(t.location.hostname).hostnameNaked,r=n.split("."),o="__io_test"+(new Date).getTime();e<r.length-1&&-1===i.cookie.indexOf(o+"=1");){var s=new Date;s.setMinutes(s.getMinutes()+1);var a=s.toUTCString();n=r.slice(-1-++e).join("."),this.setCookie(o,1,a,"/",n,null)}return this.setCookie(o,null,"Thu, 01 Jan 1970 00:00:01 GMT","/",n,null),n},r.messageWindow=function(e,t){e.postMessage(JSON.stringify(t),"*")},r.messageFrameWindow=function(e,t){this.messageWindow(e.contentWindow,t)},r.createObject=function(e){if("function"==typeof t.Object.create)return t.Object.create(e);function i(){}return i.prototype=e,new i},r.cloneObjectShallow=function(e){return t.JSON.parse(t.JSON.stringify(e))},r.identifyArray=function(e){return!(!e||"object"!=typeof e||"[object Array]"!==Object.prototype.toString.call(e))},r.setIntervalSafe=function(e,t,i){return e.setInterval(function(){try{t.apply(null,arguments)}catch(e){this.trackErrorMetric(e)}}.bind(this),i)},r.addEventListenerSafe=function(e,t,i){var n=function(){try{i.apply(null,arguments)}catch(e){this.trackErrorMetric(e)}}.bind(this);return e.addEventListener(t,n),n},r.trackErrorMetric=function(e,n){if(n=n||"error_script",this.trackErrorMetric.errorsCount=parseInt(this.trackErrorMetric.errorsCount,10)||0,!(this.trackErrorMetric.errorsCount>=10)){this.trackErrorMetric.errorsCount++;var r={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(n,r)}},r.getMetricParamString=function(e,i){(i=this.cloneObjectShallow(i)).cdn_version=n.projectCodeVersion;var r=[];for(var o in i)""!==i[o]&&i.hasOwnProperty(o)&&r.push(o+":"+this.encodeURIonce(i[o]));var s=e+"["+r.join()+"]";return s=s.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(t.parseInt(arguments[1],16))}),"/?k[]="+n.projectId+":"+s},r.deferMetricToSendInBatch=function(e,i){if(this.deferMetricToSendInBatch.queue||(this.deferMetricToSendInBatch.queue=[]),this.deferMetricToSendInBatch.queue.push(this.getMetricParamString(e,i)),!this.deferMetricToSendInBatch.isQueueActive)var r=this.setIntervalSafe(t,function(){if(0===this.deferMetricToSendInBatch.queue.length)return this.deferMetricToSendInBatch.isQueueActive=!1,void t.clearInterval(r);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://"+n.trackingHost+"/"+e+"&s="+n.projectSignature+"&"+Date.now();this.sendGetRequest(i)}.bind(this),1e3)},r.sendMetric=function(e,t,i,r){var o="https://"+n.trackingHost+this.getMetricParamString(e,t)+"&s="+n.projectSignature+(i?"&_v="+i:"")+(r?"&__io="+this.getUserId():"")+"&"+Date.now();this.sendGetRequest(o)},r.hashFnv32a=function(e,t,i){var n,r,o=void 0===i?2166136261:i;for(n=0,r=e.length;n<r;n++)o^=e.charCodeAt(n),o+=(o<<1)+(o<<4)+(o<<7)+(o<<8)+(o<<24);return t?("0000000"+(o>>>0).toString(16)).substr(-8):o>>>0},r.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}},r.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}},r.setPreviousURI=function(e,t){var i={},r=!(!n||!n.projectId)&&this.getCookieValue("__io_nav_state"+n.projectId),o=this.getMainDomain();r&&(i=this.parseJSONSafe(r)||{});var s=new Date((new Date).getTime()+9e5).toUTCString(),a=n&&n.projectId?n.projectId:"";this.setCookie("__io_nav_state"+a,JSON.stringify({current:e,currentDomain:t||"",previous:i.current,previousDomain:i.currentDomain?i.currentDomain:""}),s,"/","."+o)},r.getPreviousURI=function(){var e={},t=!(!n||!n.projectId)&&this.getCookieValue("__io_nav_state"+n.projectId);if(t&&(e=this.parseJSONSafe(t)||{}),e.previous&&e.previous!==e.current)return e.previous},r.getPreviousDomain=function(){var e={},t=!(!n||!n.projectId)&&this.getCookieValue("__io_nav_state"+n.projectId);if(t&&(e=this.parseJSONSafe(t)||{}),e.previous&&e.previous!==e.current&&e.previousDomain)return e.previousDomain},r.setStorageItem=function(e,i,n){n=n?t.encodeURIComponent(n):n;try{switch(e){case"local":t.localStorage.setItem(i,n);break;case"session":t.sessionStorage.setItem(i,n);break;default:throw new Error("IO -- invalid storage type specified")}return!0}catch(e){this.trackErrorMetric(e)}},r.getStorageItem=function(e,i){var n;switch(e){case"local":n=t.localStorage.getItem(i);break;case"session":n=t.sessionStorage.getItem(i)}try{return n?t.decodeURIComponent(n):n}catch(e){this.trackErrorMetric(e)}},r.getPreviousPageTitle=function(){if(this.getStorageStatusSession()){var e,t,n=i.title;if(e=this.getStorageItem("session","__io_previous_title_a"),t=this.getStorageItem("session","__io_previous_title_b"),e===n){if(t)return t}else if(this.setStorageItem("session","__io_previous_title_a",n),e)return this.setStorageItem("session","__io_previous_title_b",e),e}},r.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}}},r.getSearchParam=function(e,i){var n=(i?this.parseURL(i).search:t.location.search).match("[?&]"+e+"=([^(&?)]*)");return n?n[n.length-1]:""},r.getCookieValue=function(e){var t=i.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)");return t?this.decodeURIrecursively(t[t.length-1]):""},r.setCookie=function(e,t,n,r,o,s){var a=new Date;a.setFullYear(a.getFullYear()+1),a=a.toUTCString(),n||(n=a),r||(r="/"),void 0!==t&&(t=encodeURIComponent(t));var c=e+"="+(t||"")+"; expires="+n+"; path="+r+(o?"; domain="+o:"")+(s?"; secure":"");i.cookie=c},r.deleteCookie=function(e,i,n){n===t.location.hostname&&(n=null),this.setCookie(e,null,"Thu, 01 Jan 1970 00:00:01 GMT",i,n)},r.getDepth=function(){return this.getDepthCookie()},r.getDepthCookie=function(){var e=new Date((new Date).getTime()+9e5).toUTCString(),i=this.hashFnv32a(t.location.pathname),n=this.getCookieValue("__io_d");if(!n||2!==n.split("_").length)return this.setCookie("__io_d","1_"+i,e,"/","."+this.getMainDomain()),1;var r=n.split("_")[1],o=t.parseInt(n.split("_")[0],10);if(i==r)return o||1;var s=(o||0)+1;return this.setCookie("__io_d",s+"_"+i,e,"/",this.getMainDomain()),s},r.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 n=i.split("_")[1],r=t.parseInt(i.split("_")[0],10);if(e==n)return r||1;var o=(r||0)+1;return t.sessionStorage.setItem("__io_d",o+"_"+e),o},r.getUserId=function(){var e=this.getCookieValue("__io")||this.getRandomHash();return t.parseInt(n.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},r.getReferrerCurrentExternal=function(e){if(!(e=e||i.referrer))return null;var r=this.parseURL(e).hostnameNaked,o=this.parseURL(t.location.hostname).hostnameNaked,s=!1;return""!==n.projectMainDomain&&(s=-1!==r.indexOf(n.projectMainDomain)),s?null:r===o?null:r},r.getReferrerCurrentFromParams=function(e){e=e||t.location.href;var i=this.getSearchParam("io_source",e),n=this.getSearchParam("io_utm_social",e),r="?f"===this.parseURL(e).search?"facebook_group":null,o=this.getSearchParam("utm_referrer",e),s=this.getSearchParam("utm_source",e),a=this.getSearchParam("source",e);return i||n||r||o||s||a},r.getReferrer=function(e,t){var i=this.getReferrerCurrentFromParams(t)||this.getReferrerCurrentExternal(e);return i?(this.setCookie("__io_r",i),i):this.getCookieValue("__io_r")},r.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},r.getDeviceName=function(){var e=t.navigator.userAgent||"undefined",i="desktop",n=/Android|webOS|iPhone|PlayBook|iPad|iPod|IEMobile|BlackBerry|Mobile|Opera Mini/i.test(e),r=/Tablet|PlayBook|iPad/i.test(e)||/Android/i.test(e)&&!/Mobile/i.test(e)&&!/Opera Mini/i.test(e),o=/Android/i.test(e),s=/iPhone|iPad|iPod/i.test(e);return n&&(r?(i="tablet",i+=o?" (Android)":s?" (iOS)":" (Other)"):(i="smart",i+=o?" (Android)":s?" (iOS)":" (Other)")),i},r.getBrowserNameAndVersion=function(){var e,i,n=t.navigator.userAgent,r="";switch(!0){case-1!==(e=n.indexOf("OPR/")):r=n.substring(e+4);break;case-1!==(e=n.indexOf("Opera"))&&-1!==(e=n.indexOf("Version")):r=n.substring(e+8);break;case-1!==(e=n.indexOf("Opera")):r=n.substring(e+6);break;case-1!==(e=n.indexOf("MSIE")):r=n.substring(e+5);break;case-1!==(e=n.indexOf("Chrome")):r=n.substring(e+7);break;case-1!==(e=n.indexOf("Safari"))&&-1!==(e=n.indexOf("Version")):r=n.substring(e+8);break;case-1!==(e=n.indexOf("Safari")):r=n.substring(e+7);break;case-1!==(e=n.indexOf("Firefox")):r=n.substring(e+8);break;case-1!==n.indexOf("Trident")&&-1!==(e=n.indexOf("rv:")):r=n.substring(e+3).split(")")[0];break;case(e=n.lastIndexOf(" ")+1)<(e=n.lastIndexOf("/")):r=n.substring(e+1)}return r=r.split(";")[0].split(" ")[0],i=(i=t.parseInt(r,10))||"(unknown version)",this.getBrowserName()+" "+i},r.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"},r.getUserLifeTimeNumber=function(){var e=i.cookie.match(/__io_lv=([^;]+)/);return e?(e=e[1],e=Math.round((+Date.now()-e)/864e5)):"0"},r.getUserType=function(){var e="";if(-1==i.cookie.indexOf("__io_lv="))e="new",(t=new Date).setFullYear(t.getFullYear()+1),i.cookie="__io_lv="+ +Date.now()+"; expires="+t.toUTCString()+"; path=/";else if(0==this.getUserLifeTime())e="new";else{var t,n=1*this.getUserLifeTimeNumber();e=n>30?"new":n>7?"returned":"constant",(t=new Date).setFullYear(t.getFullYear()+1),i.cookie="__io_lv="+ +Date.now()+"; expires="+t.toUTCString()+"; path=/"}return e},r.getUserTypeByProject=function(){var e="",t="__io_ut_state"+n.projectId,r="",o=this.getStorageStatusSession();if(o&&(e=this.getStorageItem("session",t)),-1===i.cookie.indexOf("__io_lv"))r="new",(s=new Date).setFullYear(s.getFullYear()+1),i.cookie="__io_lv="+ +Date.now()+"; expires="+s.toUTCString()+"; path=/";else if(0==this.getUserLifeTime())r="new";else{var s,a=1*this.getUserLifeTimeNumber();r=a>30?"new":a>7?"returned":"constant",(s=new Date).setFullYear(s.getFullYear()+1),i.cookie="__io_lv="+ +Date.now()+"; expires="+s.toUTCString()+"; path=/"}return e||(o&&this.setStorageItem("session",t,r),r)},r.getBrowserName=function(){var e,n,r="[object OperaMini]"===Object.prototype.toString.call(t.operamini),o=!(r||(!t.opr||!t.opr.addons)&&!t.opera),s="undefined"!=typeof InstallTrigger,a=/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,d=[{name:"Opera",isCurrent:o},{name:"Firefox",isCurrent:s},{name:"Safari",isCurrent:a},{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:r}];for(n=0;n<d.length;n++)if(d[n].isCurrent){if(e)return"Other";e=d[n].name}return e||"Other"},r.getReferenceTimeFromWordsCount=function(e){return Math.round(t.parseInt(e,10)/(190/60))},r.getTextFromElement=function(e){var t,i,n="",r=["SCRIPT","STYLE","NOSCRIPT","VIDEO"];for(i=0;i<e.childNodes.length;i++)t=e.childNodes[i],-1===r.indexOf(t.nodeName)&&(1===t.nodeType?n+=this.getTextFromElement(t):3===t.nodeType&&(n+=t.nodeValue));return n},r.getReferenceTimeFromBlock=function(e){var t,n;if(t=i.querySelector(e))return n=this.getTextFromElement(t).trim().split(/\s+/).length,this.getReferenceTimeFromWordsCount(n)},r.getSortedSemver=function(e){return e.sort(function(e,i){var n,r,o=/(\.0+)+$/,s=e.replace(o,"").split("."),a=i.replace(o,"").split("."),c=Math.min(s.length,a.length);for(n=0;n<c;n++)if(r=t.parseInt(s[n],10)-t.parseInt(a[n],10))return r;return s.length-a.length})},r.getRandomHash=function(){return Math.floor(68719476736*(1+Math.random())).toString(16).substring(1)+"."+Math.floor(68719476736*(1+Math.random())).toString(16).substring(1)+"_"+Date.now()},r.getUTMCampaign=function(){var e={},t={};return i.referrer&&(t=this.parseURL(i.referrer)),e.referrerHostname=t.hostname||"",e.gclid=this.getSearchParam("gclid")||"",e.campaign=this.getSearchParam("utm_campaign")||"",e},r.getPreviousUTMCampaign=function(){var e=this.parseJSONSafe(this.getCookieValue("__io_pr_utm_campaign"))||{};return e.referrerHostname=e.referrerHostname||"",e.gclid=e.gclid||"",e.campaign=e.campaign||"",e},r.setPreviousUTMCampaign=function(e){if(e){var t="."+this.getMainDomain(),i={};null!==e.referrerHostname&&void 0!==e.referrerHostname&&""!==e.referrerHostname&&(i.referrerHostname=e.referrerHostname),null!==e.gclid&&void 0!==e.gclid&&""!==e.gclid&&(i.gclid=e.gclid),null!==e.campaign&&void 0!==e.campaign&&""!==e.campaign&&(i.campaign=e.campaign),this.setCookie("__io_pr_utm_campaign",JSON.stringify(i),null,"/",t)}},r.getCampaignResetStatus=function(){var e=this.getMainDomain();if(i.referrer&&-1===i.referrer.indexOf(e)){var t=this.getUTMCampaign(),n=this.getPreviousUTMCampaign();if(t.referrerHostname!==n.referrerHostname||t.gclid!==n.gclid||t.campaign!==n.campaign)return this.setPreviousUTMCampaign(t),!0}return!1},r.getSessionId=function(){var e=this.getCookieValue("__io_session_id"),t=new Date((new Date).getTime()+18e5).toUTCString(),i="."+this.getMainDomain();new Date((new Date).getTime()+18e5).getDate()>(new Date).getDate()&&(t=new Date((new Date).setHours(24,0,0,0)).toUTCString());var n=this.getCampaignResetStatus();return e&&!n?(this.setCookie("__io_session_id",e,t,"/",i),e):(e=this.getRandomHash(),this.setCookie("__io_session_id",e,t,"/",i),e)},r.setConversionsPageData=function(i){var n=this.getConversionsPageData(),r=JSON.stringify({previous:n.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",r,!1,"/",o)}else this.setStorageItem("local","__io_conversions_page",r)},r.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},r.injectScriptBySrc=function(e,t){var n=i.getElementsByTagName("script")[0],r=i.createElement("script");r.id=t,r.async=!0,r.src=e,n.parentNode.insertBefore(r,n)},r.loadComponentAsync=function(e){try{return e.init()}catch(e){this.trackErrorMetric(e)}},r}(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),n=t.getCookieValue(this.flagName),r=i||n;if(r){var o={id:e.projectCodeId+"_"+r,uri:"https://"+r+"_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 n={};n.storageKey="__io_next_page_metrics"+i.projectId,n._getQueue=function(){return t.parseJSONSafe(e.localStorage.getItem(this.storageKey))||[]},n.insertUpdate=function(i,n,r){if(t.getStorageStatusLocal()&&r){var o,s,a=this._getQueue();for(o=0;o<a.length;o++)a[o].key===r&&(a[o].name=i,a[o].data=n,s=!0);s||a.push({name:i,data:n,key:r}),e.localStorage.setItem(this.storageKey,JSON.stringify(a))}},n.insert=function(i,n,r){if(t.getStorageStatusLocal()){var o=this._getQueue();o.push({name:i,data:n,key:r||void 0}),e.localStorage.setItem(this.storageKey,JSON.stringify(o))}},n.clearBySending=function(){if(t.getStorageStatusLocal()){var i,n=this._getQueue();if(n)for(e.localStorage.removeItem(this.storageKey),i=0;i<n.length;i++)n[i].name&&n[i].data&&t.deferMetricToSendInBatch(n[i].name,n[i].data)}};var r={};return(r=n).init=function(){this.clearBySending()},r}(window,e.helpers,e.defaults),void 0===e)e={};if(e.api=function(e){var t={hostFunctionSource:function(){try{window[window.ioObject].a.push(arguments),window[window.ioObject].forward(arguments)}catch(t){try{e.trackErrorMetric(t)}catch(e){}}}};return t.hostFunctionSource.subscribe=function(e){window[window.ioObject].callbacks.push(e);for(var t=0;t<window[window.ioObject].a.length;t++)try{e(window[window.ioObject].a[t])}catch(e){}},t.hostFunctionSource.forward=function(e){if(window[window.ioObject].callbacks.length)for(var t=0;t<window[window.ioObject].callbacks.length;t++)try{window[window.ioObject].callbacks[t](e)}catch(e){}},t.updateHostFunction=function(){var e=this.hostFunctionSource.bind({});e.subscribe=this.hostFunctionSource.subscribe.bind({}),e.forward=this.hostFunctionSource.forward.bind({}),e.a=window[window.ioObject]&&window[window.ioObject].a||[],e.callbacks=window[window.ioObject]&&window[window.ioObject].callbacks||[],window[window.ioObject]=e},t.init=function(){window.ioObject&&this.updateHostFunction()},t}(e.helpers),void 0===e)e={};if(e.configParser=function(e,t,i){var n={appendDefaultSlices:function(t,n){if(i.decodeURIrecursively(t.url)!==i.decodeURIrecursively(e.location.pathname)&&(t.url_real=e.location.pathname),!t.reference_time){var r=i.getReferenceTimeFromBlock('[data-io-article-url="'+n+'"]');r&&(t.reference_time=r)}var o=i.getLastestHeadlineTestIds();o&&(t.ab_block_id=o.blockId,t.ab_headline_id=o.headlineId),t.user_agent=e.navigator.userAgent,t.pr=i.getPreviousURI(),t.pr_domain=i.getPreviousDomain(),t.device=i.getDeviceName(),t.browser_version=i.getBrowserNameAndVersion(),t.browser=i.getBrowserName(),t.referrer=i.getReferrer(null,n),t.first_source=i.getReferrerFirst(),t.depth=i.getDepth(),t.user_type=i.getUserTypeByProject(),t.user_id=i.getUserId(),t.session_id=i.getSessionId()},transformSliceValue:function(e){return String(e).trim()},transformSliceValuePlural:function(e){var t,i,n=[];for(t=0;t<e.length;t++)(i=this.transformSliceValue(e[t]))&&-1===n.indexOf(i)&&n.push(i);return n.join("|")},getSlicesFromPageDescriptor:function(e){var t,n,r,o={};for(t in e)if(e.hasOwnProperty(t)&&(n=e[t])&&(n=i.identifyArray(n)?this.transformSliceValuePlural(n):this.transformSliceValue(n)))switch(t){case"page_url":r=i.parseURL(n),o.url||(o.url=r.pathname,o.domain=r.hostname),o.domain||"main"!==e.page_type||(o.domain=r.hostname);break;case"page_url_canonical":if("main"===e.page_type)break;r=i.parseURL(n),o.domain=r.hostname,o.url=r.pathname+r.search;break;case"page_title":o.page=n;break;case"page_type":o.page_type=n,"article"===n&&(o.author||(o.author="No Author"),o.category||(o.category="No Category")),"main"===n&&(o.url="/");break;case"page_language":o.language=n;break;case"article_authors":"article"===e.page_type&&(o.author=n);break;case"article_categories":o.category=n;break;case"article_subcategories":o.sub_category=n;break;case"article_type":o.type_article=n;break;case"article_word_count":o.reference_time=i.getReferenceTimeFromWordsCount(n);break;case"article_publication_date":o.pub_date=n;break;case"tags":o.article_tags=n;break;default:o[t]=n}return o.page||(o.page="No Title"),o},getLatestConfig:function(){if("[object Object]"===String(e._io_config)){var t=i.getSortedSemver(i.getEnumerableKeys(e._io_config)).pop();return e._io_config[t]}}},r={init:function(e){return this.data=e,this},getSlices:function(){var e=n.getSlicesFromPageDescriptor(this.data);return n.appendDefaultSlices(e,this.data.page_url,e.url),e},defaultTypes:["main","article","default"],optInPageTypes:["video-embed"],getPageType:function(){var e=String(this.data.page_type).trim();return-1===this.defaultTypes.indexOf(e)&&-1===this.optInPageTypes.indexOf(e)&&(e="default"),e}};return n.PageDescriptor=r,n.getPageDescriptor=function(t,n){n||(n=this.PageDescriptor.defaultTypes);var r=this.getLatestConfig();if(r){var o,s,a,c=t?i.parseURL(t).pathname:e.location.pathname;"/"!==(c=i.decodeURIrecursively(c)).slice(-1)&&(c+="/");for(var d=r.length;d--;)(o=r[d]).page_url&&(s=i.parseURL(o.page_url).pathname,"/"!==(s=i.decodeURIrecursively(s)).slice(-1)&&(s+="/"),s===c&&(a=i.createObject(this.PageDescriptor).init(o)));return a?-1===n.indexOf(a.getPageType())?null:a:null}},n.bindOnPageDescriptorAppearance=function(t,n,r){var o=this.getPageDescriptor(t,r);if(o)n(o);else var s=i.setIntervalSafe(e,function(){var i=this.getPageDescriptor(t,r);i&&(e.clearInterval(s),n(i))}.bind(this),100)},n}(window,document,e.helpers),void 0===e)e={};if(e.apiIntegraion=function(t,i,n){var r={flaternUpsertObjectValues:function(e){var n;for(n in e)e.hasOwnProperty(n)&&(t.identifyArray(e[n])?e[n]=i.transformSliceValuePlural(e[n]):e[n]=i.transformSliceValue(e[n]))},processConfigEvent:function(e,n,r){i.bindOnPageDescriptorAppearance(e,function(e){var i,o=e.getSlices();for(i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);o.platform="js_api",t.sendMetric(n,o)})},normilizeInputObject:function(e){var i,n,r={};for(n in e)if(e.hasOwnProperty(n)&&null!==e[n]&&(!t.identifyArray(e[n])||e[n].join("").trim())&&("[object String]"!==Object.prototype.toString.call(e[n])||e[n].trim()))if(i=String.prototype.trim.call(n),t.identifyArray(e[n])){if(!e[n].join("").trim())continue;r[i]=e[n]}else"[object String]"===Object.prototype.toString.call(e[n])?r[i]=e[n].trim():r[i]=e[n];return r},processConversionsEvent:function(e,n){i.bindOnPageDescriptorAppearance(window.location.href,function(i){var r=i.getSlices(),o=t.getConversionsPageData();n?o.previous={url:n}:o.previous||(o.previous={}),t.sendMetric("goals",{goal:e,url:o.previous.url||"/no-conversion-page-data",domain:o.previous.domain||r.domain,category:o.previous.category||"No Category",author:o.previous.author||"No Author",pr:o.previous.pr,depth:o.previous.depth,referrer:r.referrer,referrer_uri:r.referrer_uri,platform:r.platform,device:r.device})})},delegatedCallback:function(r){try{if("object"!=typeof r)return;var o=r[0];"object"==typeof o&&o.event&&o.config_page_url&&i?(o=this.normilizeInputObject(o),this.flaternUpsertObjectValues(o),this.processConfigEvent(o.config_page_url,o.event,o)):"object"==typeof o&&o.event&&o.goal_name&&"goal"===o.event?(o=this.normilizeInputObject(o),this.flaternUpsertObjectValues(o),this.processConversionsEvent(o.goal_name,o.url||null)):"object"==typeof o&&o.event&&e.eventAPI&&(n.transformEventHook(o),o.platform="js_api",n.parseAndSendEventAsMetric(o))}catch(e){t.trackErrorMetric(e)}},init:function(){if(window.ioObject){if(!window[window.ioObject]||!window[window.ioObject].subscribe)throw new Error("IO: Could not find API on the host object. API component may be missing.");if(!t)throw new Error("IO: required Helpers component is missing");window[window.ioObject].subscribe(this.delegatedCallback.bind(this))}}};return r}(e.helpers,e.configParser,e.eventAPI),void 0===e)e={};if(e.uniqueTracker=function(e,t,i,n){var r={init:function(){n.bindOnPageDescriptorAppearance(e.location.href,function(n){var r="__io_unique_"+t.projectId,o=document.cookie.match(new RegExp(r+"=([^;]+)"));if(-1==document.cookie.indexOf(r+"=")||o&&o[1]&&o[1]!=(new Date).getDate()){var s=new Date((new Date).setYear((new Date).getFullYear()+1)).toUTCString(),a=r+"="+(new Date).getDate()+"; expires="+s+"; path=/";if(e.parseInt(t.projectUniquesBySuperdomain,10)){var c=e.location.hostname.replace(/^www\./,"");t.projectMainDomain&&-1!==e.location.hostname.indexOf(t.projectMainDomain)&&(c=t.projectMainDomain),a+=";domain=."+c}document.cookie=a,i.sendMetric("uniques_instantly",n.getSlices())}})}};return r}(window,e.defaults,e.helpers,e.configParser),void 0===e)e={};if(e.holdingUniqueTracker=function(e,t,i){var n={setStateCookie:function(i){var n=i+"=1; expires="+new Date((new Date).setHours(24,0,0,0)).toUTCString()+"; path=/";e.parseInt(t.projectUniquesBySuperdomain,10)&&(n+=";domain=."+e.location.hostname.replace(/^www\./,"")),document.cookie=n},sendHoldingMetric:function(e){var n="https://"+t.trackingHost+"/?k[]="+t.holdingId+":uniques_holding&s="+t.projectSignature+"&__io="+(e||i.getUserId())+"&"+Date.now();i.sendGetRequest(n)},init:function(){if(t.holdingHash&&t.holdingId&&-1===document.cookie.indexOf("__io_uh")&&(this.setStateCookie("__io_uh"),!document.getElementById("io-holdingjs"))){var n="https://"+t.trackingHost+"/uniques/?current="+(new Date).getDate()+"&holding="+t.holdingHash+"&hash_user="+i.getUserId()+"&"+Date.now();i.injectScriptBySrc(n,"io-holdingjs");var r=i.setIntervalSafe(e,function(){if(void 0!==e._io_uniques_holing_params){if(e.clearInterval(r),"track"===e._io_uniques_holing_params)return this.sendHoldingMetric();var i=e._io_uniques_holing_params.match(new RegExp("(?:^|; )"+("io_uid"+t.holdingHash).replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")),n=e._io_uniques_holing_params.match(new RegExp("(?:^|; )"+"io_user_hash".replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));(i&&i[1]&&i[1]!=(new Date).getDate()||!i)&&this.sendHoldingMetric(n[1])}}.bind(this),250)}}};return n}(window,e.defaults,e.helpers),void 0===e)e={};if(e.visitTracker=function(e,t,i,n){var r={init:function(){var r="__io_visit_"+i.projectId;n.bindOnPageDescriptorAppearance(e.location.href,function(n){if(-1===document.cookie.indexOf(r)){var o=e.parseInt(i.projectVisitsDuration,10),s=r+"=1; expires="+new Date((new Date).getTime()+60*o*1e3).toUTCString()+";  path=/";if(e.parseInt(i.projectVisitsBySuperdomain,10)){var a=e.location.hostname.replace(/^www\./,"");i.projectMainDomain&&-1!==e.location.hostname.indexOf(i.projectMainDomain)&&(a=i.projectMainDomain),s+=";domain=."+a}document.cookie=s,t.sendMetric("visits_instantly",n.getSlices(),null,!0)}})}};return r}(window,e.helpers,e.defaults,e.configParser),void 0===e)e={};if(e.viewTracker=function(e,t,i){var n={listenForConfigAndPageMatchOnce:function(){i.bindOnPageDescriptorAppearance(e.location.href,function(e){var i=e.getSlices();t.sendMetric("pageviews",i)}.bind(this))},listenForPageChnages:function(){t.bindOnUrlChange(this.listenForConfigAndPageMatchOnce.bind(this))},init:function(){this.listenForConfigAndPageMatchOnce(),this.listenForPageChnages()}};return n}(window,e.helpers,e.configParser),void 0===e)e={};if(e.readabilityTracker=function(e,t,i,n){var r={getScrollPercent:function(){var t=this.element.getBoundingClientRect().bottom-this.element.getBoundingClientRect().top;if(!t)return 0;var i=(e.innerHeight-this.element.getBoundingClientRect().bottom)/t,n=i>0?0:i<-1?-1:i;return n=100-Math.abs(Math.floor(100*n)),Math.abs(n)},sendMetric:function(e){n.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,n,o=t.querySelectorAll("[data-io-article-url]");for(e=0;e<o.length;e++)(n=i.createObject(r)).init(o[e]),this.instances.push(n)},listenForNewArticles:function(){i.bindOnElementInsertion("[data-io-article-url]",function(e){var t=i.createObject(r);t.init(e),this.instances.push(t)}.bind(this))},init:function(){this.instances=this.instances||[],this.trackExistingArticles(),this.listenForNewArticles()}};return{init:function(){o.init()},ArticleReadabilityTracker:o,ArticleToRead:r}}(window,document,e.helpers,e.configParser),void 0===e)e={};if(e.timeTracker=function(e,t,i,n){var r={allowedSlices:["url","ab_block_id","ab_headline_id","device","user_status","type_article","user_id"],init:function(){i.setIntervalSafe(e,function(){("function"!=typeof t.hasFocus||t.hasFocus())&&(t.hidden||n.bindOnPageDescriptorAppearance(e.location.href,function(e){var t=e.getSlices();if(t.url){for(var n={},r=0;r<this.allowedSlices.length;r++)t.hasOwnProperty(this.allowedSlices[r])&&(n[this.allowedSlices[r]]=t[this.allowedSlices[r]]);i.sendMetric("time",n)}}.bind(this)))}.bind(this),1e4)}};return r}(window,document,e.helpers,e.configParser),void 0===e)e={};if(e.videoTracker=function(e,t,i,n){var r={init:function(e){this.element=e,this.boundFunctions={},this.viewUrl=void 0,this.slices={title:document.title,type:void 0,time_int:void 0,reference_time:void 0},this.state={isViewed:!1,isStarted:!1,isFinished:!1,isLeft:!1,isReadyForTracking:!1},this.isEmbedded=!1,this.setEmbeddedFlag()},saveViewUrl:function(){this.viewUrl=window.location.href},trackView:function(){this.state.isViewed||(this.state.isViewed=!0,this.setSlicesFromConfig(function(){e.sendMetric("video_view",this.slices)}.bind(this)))},trackStart:function(){this.state.isStarted||(this.state.isStarted=!0,this.setSlicesFromConfig(function(){e.sendMetric("video_started",this.slices)}.bind(this)))},trackEnd:function(){this.state.isFinished||(this.state.isFinished=!0,this.state.isLeft=!0,this.setSlicesFromConfig(function(){e.sendMetric("video_watch_finished",this.slices),e.sendMetric("video_left",this.slices)}.bind(this)))},trackExitBeforeEnd:function(){this.state.isLeft||(this.state.isLeft=!0,this.setSlicesFromConfig(function(){e.getStorageStatusLocal()?n.insert("video_left",this.slices):e.sendMetric("video_left",this.slices)}.bind(this)))},setEmbeddedFlag:function(){i.bindOnPageDescriptorAppearance(this.viewUrl,function(e){"video-embed"===e.getPageType()&&(this.isEmbedded=!0)}.bind(this),["main","article","default","video-embed"])},setSlicesFromConfig:function(e,t){i.bindOnPageDescriptorAppearance(this.viewUrl,function(i){var n,r=i.getSlices(),o=t||this.slices;for(n in r)r.hasOwnProperty(n)&&(o.hasOwnProperty(n)||(o[n]=r[n]));e()}.bind(this),["main","article","default","video-embed"])},setSlicesEmbed:function(){var t,i;if(t=document.referrer){var n=t;n=e.decodeURIrecursively(n),n=e.parseURL(n),this.slices.domain=n.hostname,this.slices.url=n.pathname,this.slices.page=n.hostname+n.pathname}else this.slices.domain=window.location.hostname,this.slices.url=window.location.pathname,this.slices.page=window.top===window?"Direct Page Open":"Other Embed Methods";try{i=window.top.document.referrer}catch(e){}i&&(this.slices.referrer=e.getReferrer(i))},getBoundingClientRect:function(){var e;try{e=this.element.getBoundingClientRect()}catch(t){e={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0}}return e},isInView:function(){var e=this.getBoundingClientRect(),t={left:e.left>=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(r);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,n;for(t in window.videojs.players)n||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)&&(n=window.videojs.players[t]);if(n){var r=e.getDeepPropertySafe(n,["mediainfo","id"]);r&&(this.slices.video_id="videojs"+r)}}},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 n=e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","mediaid"])||e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","sources","0","file"]);n&&(this.slices.video_id=n),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 r=e.getDeepPropertySafe(window.jwplayer().getConfig(),["playlistItem","title"]);r&&(this.slices.title=r)}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 s=e.createObject(r);s.elementSelector='iframe[src*="//www.youtube.com/embed"], iframe[src*="//www.youtube-nocookie.com/embed"]',s.setSlices=function(){this.slices.type="youtube",this.isEmbedded&&this.setSlicesEmbed()},s.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 n=e.addEventListenerSafe(this.element,"load",function(){this.element.dispatchEvent(new Event("ioVideoApiEnabled")),this.element.removeEventListener("load",n)}.bind(this));if(!t||!i){var r=e.parseURL(this.element.src),o=r.protocol+"//"+r.host+r.pathname+(r.search?r.search:"?")+(t?"":"&enablejsapi=1")+(i?"":"&origin="+e.encodeURIonce(window.location.origin))+(r.hash?"#"+r.hash:"");this.element.contentWindow.location.replace(o)}},s.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),n=this.element.id?(this.element.id.match(/widget([0-9]+)$/)||[])[1]-1:null;return i||n||t},s.processAnEvent=function(t){if(-1!==t.origin.indexOf("//www.youtube.com")||-1!==t.origin.indexOf("//www.youtube-nocookie.com")){var i,n=e.parseJSONSafe(t.data)||{},r=n.info||{},o=e.getDeepPropertySafe(n,["info","videoData","video_id"]),s=e.getDeepPropertySafe(n,["info","videoData","title"]),a=this.getPlayerId();o!=a&&n.id!=a||(r.duration&&(this.slices.reference_time=r.duration),r.currentTime&&(this.slices.time_int=r.currentTime),s&&(this.slices.title=s),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&&r.currentTime&&this.trackStart(),i=r.currentTime&&window.parseInt(r.currentTime,10)===window.parseInt(this.slices.reference_time,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,{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 a=e.createObject(r);a.elementSelector='iframe[src*="//player.vimeo.com/video"]',a.getVideoId=function(){return(e.decodeURIrecursively(this.element.src).match(/\/video\/(\d+)/)||[]).pop()},a.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()},a.getPlayerId=function(){return e.getSearchParam("player_id",this.element.src)},a.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),n=i.protocol+"//"+i.host+i.pathname+(i.search?i.search:"?")+"&player_id="+this.getVideoId()+(i.hash?"#"+i.hash:"");this.element.src=n}else this.element.dispatchEvent(new Event("ioVideoApiEnabled"))},a.processAnEvent=function(t){if(-1!=t.origin.indexOf("//player.vimeo.com")){var i,n=e.parseJSONSafe(t.data);n&&n.player_id==this.getPlayerId()&&("getVideoTitle"===n.method&&n.value&&(this.slices.title=n.value),"getDuration"===n.method&&n.value&&(this.slices.reference_time=n.value),this.slices.title&&this.slices.reference_time&&(this.state.isReadyForTracking=!0,"playProgress"===n.event&&n.data&&(this.slices.reference_time=n.data.duration,this.slices.time_int=n.data.seconds,this.state.isViewed&&!this.state.isStarted&&this.trackStart(),i=n.data.duration&&n.data.seconds&&window.parseInt(n.data.duration,10)===window.parseInt(n.data.seconds,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,{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=r,c.VideoYoutube=s,c.VideoHTML5=o,c.VideoVimeo=a,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 n=e.createObject(this.VideoHTML5);n.init(i),n.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,n,r){var o={reload:function(){this.clearDOM(),this.insertIntoDOM(),n.bindOnPageDescriptorAppearance(e.location.href,function(e){_io_widget.configSlices=e.getSlices(),_io_widget.configArticleBlockUrl=e.data.page_url,_io_widget.start()}.bind(this))},clearDOM:function(){for(var e=t.querySelectorAll('div[data-io-id="_io_widget_element"], script[data-io-id="_io_widget_element"]'),i=0;i<e.length;i++)e[i].remove()},insertIntoDOM:function(){var e=t.createElement("div"),i=t.createElement("script");i.type="text/javascript",i.text=this.data.widget.js,e.style.position="static",i.id="_io_widget_element_div",i.dataset.ioId=e.dataset.ioId="_io_widget_element",e.innerHTML=this.data.widget.html,t.body.appendChild(e),t.body.appendChild(i)},startWidget:function(e){this.clearDOM(),this.insertIntoDOM(),_io_widget.configSlices=e.getSlices(),_io_widget.configArticleBlockUrl=e.data.page_url,_io_widget.start(this.data.widget.type,this.data.widget.overall)},load:function(i,n,o){e._io_widget={id:n,hash:i};var s=new XMLHttpRequest,a=function(){var e=r.getCookieValue("_io_widget_debug");return"https://"+(e=e?e+"_":"")+"widget.onthe.io"}(),c={id:n,hash:i,title:t.title,force_type:"main_new",path:e.location.pathname+e.location.search};s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onreadystatechange=function(){if(4==s.readyState&&200==s.status){var i=JSON.parse(s.responseText);if(!i)return;this.data=i;var n=r.setIntervalSafe(e,function(){t.body&&(e.clearInterval(n),this.startWidget(o))}.bind(this),1e3)}}.bind(this);var d="";for(var l in c)d+=l+"="+encodeURIComponent(c[l])+"&";s.send(d)},init:function(){var o=(e.location.hash.match(/^#client-widget-([a-z0-9_]{32})/i)||[]).pop(),s=(t.cookie.match(/_io_widget=([a-z0-9_]{32})/i)||[]).pop(),a=(e.location.search.match(/\?widget-token=([a-z0-9_]{64})/i)||[]).pop(),c=(e.location.hash.match(/_widget-token-([a-z0-9_]{64})/i)||[]).pop(),d=(t.cookie.match(/_io_widget_token=([a-z0-9_]{64})/i)||[]).pop(),l=o||s,h=a||c||d;if(l){var u=new Date((new Date).setFullYear((new Date).getFullYear()+1)).toUTCString(),f=e.location.hostname.replace(/^www\./i,""),p=e.location.pathname;e.parseInt(i.setWidgetOnMainDomain,10)&&(f=r.getMainDomain(),p="/"),t.cookie="_io_widget="+l+"; expires="+u+"; domain="+f+"; path="+p;var g=e.location.search;if(h&&(g=e.location.search.replace(/\?widget-token=([a-z0-9_]{64})/i,""),t.cookie="_io_widget_token="+h+"; expires="+u+"; domain="+f+"; path="+p),o){var m=e.location.protocol+"//"+e.location.hostname+e.location.pathname+g;history.pushState("",t.title,m)}n.bindOnPageDescriptorAppearance(e.location.href,function(e){this.load(l,i.projectId,e)}.bind(this)),r.bindOnUrlChange(this.reload.bind(this))}}};return o}(window,document,e.defaults,e.configParser,e.helpers),void 0===e)e={};if(e.instantArticlesTracker=function(e,t){var i={trackPageviews:function(){var i=t.parseURL(e.ia_document.shareURL);t.sendMetric("pageviews_instant",{url:i.pathname,domain:i.hostname,depth:1,referrer:"fb_ia",device:"smart (Other)",page_type:"article",user_id:t.getUserId(),session_id:t.getSessionId()})},trackTime:function(){t.setIntervalSafe(e,function(){t.sendMetric("time",{url:t.parseURL(e.ia_document.shareURL).pathname})},1e4)},init:function(){if(e.ia_document)return this.trackPageviews(),!0}};return i}(window,e.helpers),void 0===e)e={};if(e.ctrTracker=function(){var e={init:function(){}};return e}(),void 0===e)e={};if(e.onClickViewTracker=function(e,t,i,n){var r={bindOneElement:function(t){i.addEventListenerSafe(t,"click",function(){n.bindOnPageDescriptorAppearance(e.location.href,function(e){i.sendMetric("pageviews",e.getSlices())})})},bindExistingElemets:function(i){var n=t.querySelectorAll(i);n=e.Array.prototype.slice.call(n);for(var r=0;r<n.length;r++)this.bindOneElement(n[r])},listenForNewElements:function(e){i.bindOnElementInsertion(e,function(e){this.bindOneElement(e)}.bind(this))},init:function(){"undefined"!=typeof customCode_onClickViewSelector&&(this.bindExistingElemets(customCode_onClickViewSelector),this.listenForNewElements(customCode_onClickViewSelector))}};return r}(window,document,e.helpers,e.configParser),void 0===e)e={};if(e.subscriptionsTracker=function(e,t,i){var n={defaultBlockSelector:".io-subscription-block",defaultButtonsSelector:".io-subscription-button",alreadyViewed:!1,slices:{},getBoundingClientRect:function(e){var t;try{t=e.getBoundingClientRect()}catch(e){t={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0}}return t},isScrolledIntoView:function(t){var i=this.getBoundingClientRect(t),n=i.top,r=i.bottom;return n>=0&&r<=e.innerHeight},waitForSubscriptionBlockView:function(e){if(this.alreadyViewed||!this.slices)return!1;n.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.",""),n=new Date((new Date).setHours(720,0,0,0)).toUTCString();t.setCookie("__io_subscription_source",e||"direct",n,"/",i),t.setCookie("__io_subscription_url",this.slices.url,n,"/",i)},listenForConfigAndPageMatchOnce:function(){i.bindOnPageDescriptorAppearance(e.location.href,function(e){n.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(){n.waitForSubscriptionBlockView(i)});var r=document.querySelectorAll(n.defaultButtonsSelector);if(0==r.length)return!1;for(var o=0;o<r.length;o++){var s=r[o];t.addEventListenerSafe(s,"click",function(){n.trackClick()})}}.bind(this))}};return n}(window,e.helpers,e.configParser),void 0===e)e={};if(e.previousPageWatcher=function(e,t,i){var n={listenForConfigAndPageMatchOnce:function(){i.bindOnPageDescriptorAppearance(e.location.href,function(e){var i=e.getSlices();t.setPreviousURI(i.url,i.domain),"disabled"!==i.page_conversion&&t.setConversionsPageData(i)}.bind(this))},listenForPageChnages:function(){t.bindOnUrlChange(this.listenForConfigAndPageMatchOnce.bind(this))},init:function(){"object"!=typeof e.__io&&(e.__io={}),e.__io.isPreviousPageWatcherInitialized||(e.__io.isPreviousPageWatcherInitialized=!0,i?(this.listenForConfigAndPageMatchOnce(),this.listenForPageChnages()):(t.setPreviousURI(e.location.pathname,e.location.hostname),t.bindOnUrlChange(function(){t.setPreviousURI(e.location.pathname,e.location.hostname)})))}};return n}(window,e.helpers,e.configParser),e.helpers.loadComponentAsync(e.debugCodeLoader))return;try{void 0}catch(t){e.helpers.trackErrorMetric(t)}if(e.helpers.loadComponentAsync(e.doubleLoadingDetector))return;if(e.helpers.loadComponentAsync(e.instantArticlesTracker))return;e.helpers.loadComponentAsync(e.previousPageWatcher),e.helpers.loadComponentAsync(e.nextPageMetricQueueService),e.helpers.loadComponentAsync(e.api),e.helpers.loadComponentAsync(e.apiIntegraion),e.helpers.loadComponentAsync(e.uniqueTracker),e.helpers.loadComponentAsync(e.holdingUniqueTracker),e.helpers.loadComponentAsync(e.visitTracker),e.helpers.loadComponentAsync(e.viewTracker),e.helpers.loadComponentAsync(e.readabilityTracker),e.helpers.loadComponentAsync(e.timeTracker),e.helpers.loadComponentAsync(e.videoTracker),e.helpers.loadComponentAsync(e.widgetLoader),e.helpers.loadComponentAsync(e.onClickViewTracker),e.helpers.loadComponentAsync(e.subscriptionsTracker)}catch(t){try{e.helpers.trackErrorMetric(t)}catch(e){}}}()}]);