1"use strict";(self.webpackChunkfranceinfo_package=self.webpackChunkfranceinfo_package||[]).push([[9292],{3703:function(t,e,i){function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function s(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.r(e);class a{constructor(t,e){this.auth=t,this.utils=e,s(this,"CLICK_CLASS","ftvi-click"),s(this,"PRINT_CLASS","ftvi-print"),s(this,"CLICK_VALUE_ATTRIBUTE","data-click-object"),s(this,"PRINT_VALUE_ATTRIBUTE","data-print-object"),s(this,"VENDOR_ID","atinterne-D22mcTNf"),s(this,"STORAGE_PREVIOUS_EVENT_DATA_KEY","fi_previous_event_data"),s(this,"pianoAnalytics",void 0),s(this,"cookieDomain",`.${document.location.hostname.split(".").slice(-2).join(".")}`),s(this,"loadSdkPromise",null),s(this,"eventCommonData",void 0)}
1async init(){await this.loadPiano(),this.sendPageHit(),this.registerEvent()}sendPageHit(){window.addEventListener("pageshow",t=>{t.persisted&&this.sendEvent("page.display",pianoAnalyticsPageDisplay)}),this.sendEvent("page.display",pianoAnalyticsPageDisplay)}async loadPiano(){var t=this;return this.loadSdkPromise||(this.loadSdkPromise=new Promise(e=>{!async function(){window.pdl=window.pdl||{},window.pdl.migration={browserId:{source:"PA"}},window.pdl.requireConsent=!0,window.pdl.consent_items={PA:{properties:{"*":"essential",user_id:"optional"},events:{"*":"essential"}}},window._pac=window._pac||{},window._pac.cookieDomain=t.cookieDomain;const n=await i.e(2014).then(i.t.bind(i,4569,23));({pianoAnalytics:t.pianoAnalytics,pianoAnalytics:window.pianoAnalytics}=n),await t.configurePrivacyMode(),t.pianoAnalytics.setConfigurations({site:pianoAnalyticsConfig.site,collectDomain:"https://logs1238.xiti.com"}),e(!0)}()})),this.loadSdkPromise}async configurePrivacyMode(){this.pianoAnalytics.consent.setMode("essential"),this.configureOptOut(),await this.configureOptIn()}configureOptOut(){"true"!==window.localStorage.getItem("optoutAT")?document.addEventListener("cmp::optout::true",()=>{this.pianoAnalytics.consent.setMode("opt-out")}):this.pianoAnalytics.consent.setMode("opt-out")}async configureOptIn(){const t=await(await i.e(6247).then(i.bind(i,4416))).default;await t.getConsentFromVendorId(this.VENDOR_ID)&&this.pianoAnalytics.consent.setMode("opt-in"),t.onVendorStatusChange(this.VENDOR_ID,t=>{"true"!==window.localStorage.getItem("optoutAT")&&("accepted"!==t?this.pianoAnalytics.consent.setMode("essential"):this.pianoAnalytics.consent.setMode("opt-in"))})}getOriginPageInfos(){if(!document.referrer)return{};try{const t=JSON.parse(sessionStorage.getItem(this.STORAGE_PREVIOUS_EVENT_DATA_KEY));return t&&t.page_type?document.referrer!==t.href?{}:{origin_page:t.page,origin_page_type:t.page_type}:{}}catch(t){return{}}}sanitizeObject(t){let e={};"undefined"!=typeof pianoNullableKeys&&Array.isArray(pianoNullableKeys)&&(e=Object.fromEntries(pianoNullableKeys.map(t=>[t,null])));for(const e of Object.keys(t))"string"==typeof t[e]&&"user_id"!==e&&(t[e]=t[e].replaceAll("-","_"));return o(o({},e),t)}countClicks(){const t=document.querySelectorAll(`.${this.CLICK_CLASS}`);for(const e of t)e.addEventListener("click",()=>{const t=e.getAttribute(this.CLICK_VALUE_ATTRIBUTE);t&&this.sendClick(JSON.parse(t))}),e.classList.remove(this.CLICK_CLASS),e.classList.add(`${this.CLICK_CLASS}--binded`)}countPrints(){const t=document.querySelectorAll(`.${this.PRINT_CLASS}`);for(const e of t)this.utils.onAreaVisible(e,()=>{const t=e.getAttribute(this.PRINT_VALUE_ATTRIBUTE);t&&this.sendPrint(JSON.parse(t))},{threshold:.5,offset:"0px"}),e.classList.remove(this.PRINT_CLASS),e.classList.add(`${this.PRINT_CLASS}--binded`)}registerEvent(){this.countClicks(),this.countPrints(),window.addEventListener("beforeunload",()=>{const{page:t,page_type:e}=this.eventCommonData;sessionStorage.setItem(this.STORAGE_PREVIOUS_EVENT_DATA_KEY,JSON.stringify({page:t,page_type:e,href:window.location.href}))}),document.addEventListener("EsiBlock::replaceBlockByEsiContent",()=>{this.countClicks(),this.countPrints()})}sendClick(t){this.pianoAnalytics&&this.eventCommonData?this.dispatchEvent("click.action",t):this.sendEvent("click.action",t)}sendPrint(t){this.sendEvent("publisher.impression",t)}async sendEvent(t,e){await this.loadPiano(),await this.getCachedEventCommonData(),this.dispatchEvent(t,e)}dispatchEvent(t,e){"file:"===window.location.protocol||this.pianoAnalytics.sendEvent(t,this.sanitizeObject(o(o({},this.eventCommonData),this.transformDataEvent(e))))}setEventCommonData(t){this.eventCommonData=t}async getCachedEventCommonData(){return this.eventCommonData||await this.buildEventCommonData(),this.eventCommonData}async buildEventCommonData(t=pianoAnalyticsPageDisplay){const e=this.auth.getCachedIsUserLogged()?await this.auth.getUserPublicId():null;this.eventCommonData=o(o(o({site:String(pianoAnalyticsConfig.site),visitor_login_status:String(!!e)},t),e&&{user_id:e}),this.getOriginPageInfos())}transformDataEvent(t){const e={},i={position:t=>String(t)};let n=!1;
1return Object.entries(i).forEach(([i,o])=>{i in t&&(e[i]=o(t[i]),n=!0)}),n?o(o({},t),e):t}}e.default=new Promise(t=>{(async()=>{const e=await(await i.e(4895).then(i.bind(i,4284))).default,n=await i.e(9980).then(i.bind(i,2885));t(new a(e,n))})()})}}]);
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.