var nliFDomain='https://l.bfmtv.com';var isOg=false;var subdomains=['bfmbusiness.bfmtv.com','l.bfmtv.com','l.rmc.fr','l.rmcbfmplay.com','l.rmcsport.fr','rmc.bfmtv.com','rmccrime.bfmtv.com','rmcsport.bfmtv.com','www.bfmtv.com'];var pvSampling=3;!function(e,n){var t=e._nli||(e._nli=[]);if(t.push===Array.prototype.push){var o=t.find(function(e){return"brand"===e[0]})?.[1]||null;e._nli.sendMetrics=function(e){var n=e.canonicalUrl||r();if(delete e.canonicalUrl,0!==Object.keys(e).length){if(c(n)){var t=function(e){return Object.keys(e).map(function(n){return encodeURIComponent(n)+"="+encodeURIComponent(e[n])}).join("&")}(e);l(nliFDomain+"/mcs.js?u="+encodeURIComponent(n)+"&"+t)}}else console.error("No metrics to send")},function(e){"/"===window.location.pathname||/bot|google|baidu|bing|msn|teoma|slurp|yandex/i.test(navigator.userAgent)||(i(e),setInterval(function(){var n=r();e!==n&&(i(n),e=n)},1e3))}(r())}function r(){var e=n.querySelector("meta[property='nli:url'], meta[name='nli:url']")?.content,t=n.querySelector("link[rel='canonical']")?.href,o=n.querySelector("meta[property='og:url']")?.content;return decodeURIComponent(e||(isOg?o||t||"":t||o||""))}function a(e){for(var n=["article:"+e,"og:article:"+e,"og:"+e],t=0;t<n.length;t++){var o=n[t],r=document.querySelector('meta[property="'+o+'"]')?.content,a=document.querySelector('meta[name="'+o+'"]')?.content,i=r||a;if(i&&!isNaN(Date.parse(i)))return new Date(i).toISOString()}return null}function i(e){var n=pvSampling<2?pvSampling:Math.floor(Math.random()*pvSampling)+1;if(e&&1===n&&c(e)){var t=function(e){var n=`s=${pvSampling}&b=${o}&u=${encodeURIComponent(e)}`,t=a("published_time"),r=a("modified_time");t&&(n+=`&d=${encodeURIComponent(t)}`);r&&(n+=`&md=${encodeURIComponent(r)}`);return n}(e);l(`${nliFDomain}/pv.js?${t}`)}}function c(e){var n=document.createElement("a");return n.href=e,subdomains.includes(n.hostname)}function l(e){var n=document.createElement("script");n.async=!0,n.src=e,n.onload=n.onerror=function(){n.remove()};var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)}}(window,document,location);
