PageSourceSearch

https://www.franceinfo.fr/assets/common/twig/templates/web-push-install/web-push-install-6b81d613.js

js franceinfo.fr collected 2026-09-24 07:45:59 UTC 4,457 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfranceinfo_package=self.webpackChunkfranceinfo_package||[]).push([[4652,7993,8543],{5613:function(i,t,n){n.d(t,{f:function(){return e}});const e={NL_EVENT_GROUP:90,WEB_PUSH:95,NOTIFICATION_APP:100,NOTIFICATION_JEUX:105,MATCH_PANEL:150,EVENT_BANNER:200,ALERT_INFO:300,BOOKMARK_BUTTON:350}},515:function(i,t,n){function e(i){!function(i,t,n,e,a){var o,s="Promise"in i,r={then:function(){return r},catch:function(i){return i(new Error("Airship SDK Error: Unsupported browser")),r}},c=s?new Promise(function(i,t){o=function(n,e){n?t(n):i(e)}}):r;c._async_setup=function(i){if(s)try{o(null,i(a))}catch(i){o(i)}},i.UA=c;var d=t.createElement("script");d.src=n,d.async=!0,d.id="_uasdk",d.rel="UA",t.head.appendChild(d)}(window,document,i.sdkUrl,0,{vapidPublicKey:i.vapidPublicKey,websitePushId:i.websitePushId,appKey:i.appKey,token:i.token,workerUrl:"/service-worker.js",components:{inAppAutomation:{enabled:!1}}})}n.d(t,{p:function(){return e}})},9982:function(i,t,n){var e=n(515),a=n(5613);function o(i,t,n){return(t=function(i){var t=function(i){if("object"!=typeof i||!i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}(i);return"symbol"==typeof t?t:t+""}(t))in i?Object.defineProperty(i,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):i[t]=n,i}const s=n.e(8760).then(n.bind(n,1941));class r{constructor(i,t,n,e){var a;this.config=i,this.piano=t,this.utils=n,this.stickyOrchestrator=e,o(this,"loadSdkPromise",null),o(this,"initalNotificationPermission",null===(a=window.Notification)||void 0===a?void 0:a.permission),o(this,"dialogEl",document.querySelector(".web-push-install__popin")),o(this,"dialog",void 0),o(this,"POPIN_DISPLAY_COOKIE_NAME","ftvi-web-push-popin-display"),this.init()}
1async init(){const i=(await n.e(3244).then(n.bind(n,5531))).default;this.dialog=new i(this.dialogEl,this.utils,this.stickyOrchestrator),await this.initPopin(),this.autoOptIn(),this.autoOptOut()}async autoOptIn(){var i;if("granted"===(null===(i=window.Notification)||void 0===i?void 0:i.permission)){var t;const i=await this.loadSdk();null!==(t=i.channel)&&void 0!==t&&t.optedIn||i.register()}}async autoOptOut(){var i;"denied"===(null===(i=window.Notification)||void 0===i?void 0:i.permission)&&await this.loadSdk()}loadSdk(){var i=this;return this.loadSdkPromise||(this.loadSdkPromise=new Promise(async function(t){const n=await i.config.getConfig();(0,e.p)(n.airship),window.UA.then(i=>{t(i)})})),this.loadSdkPromise}async initPopin(){var i=this;const t=await s;t.displayBanner({priority:a.f.WEB_PUSH,displayPromise:this.canBeDisplayed(),callback:()=>{this.loadSdk().then(()=>{this.dialog.show(),this.sendPrintEvent()})}}),t.updateLoadingState(this.constructor.name),this.dialog.onPrimary(async function(){i.dialog.hide(),(await i.loadSdk()).register().then(()=>{i.sendTrackingEvent("click.action","activer_les_notifications")},()=>{i.sendTrackingEvent("click.action","erreur_activer_les_notifications")})}),this.dialog.onSecondary(()=>{this.sendTrackingEvent("click.action","refuser_les_notifications"),this.onRefuse()}),this.dialog.onClose(()=>{this.sendTrackingEvent("click.action","refuser_les_notifications"),this.onRefuse()})}onRefuse(){this.utils.createCookie(this.POPIN_DISPLAY_COOKIE_NAME,"true",7,"days"),this.dialog.hide()}async canBeDisplayed(){var i;const t="true"===this.utils.readCookie(this.POPIN_DISPLAY_COOKIE_NAME),n="default"===(null===(i=window.Notification)||void 0===i?void 0:i.permission),e=await this.isAndroidAppInstalled();return Promise.resolve(!t&&n&&!e)}async isAndroidAppInstalled(){const i=await this.config.getConfig();return"getInstalledRelatedApps"in navigator&&!!(await navigator.getInstalledRelatedApps()).find(t=>t.id===i.playstoreAppId)}sendPrintEvent(){"default"===this.initalNotificationPermission&&this.piano.sendPrint({feature:"pop_in_activation_des_notifications"})}sendTrackingEvent(i="click",t=""){"default"===this.initalNotificationPermission&&this.piano.sendEvent(i,{feature:"pop_in_activation_des_notifications",click:t})}}new Promise(async i=>{(await s).addBannersLoading(r.name);const t=await(await n.e(3355).then(n.bind(n,6672))).default,e=await(await n.e(9292).then(n.bind(n,3703))).default,a=await n.e(9980).then(n.bind(n,2885)),o=await(await n.e(3708).then(n.bind(n,3157))).default;i(new r(t,e,a,o))})}},function(i){i(i.s=9982)}]);

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.