PageSourceSearch

https://elperuano.pe/fenomeno-el-nino/js/core/sesion.js?v=D6rgLtiwuZM9Yw5phDZCA8pO93dlgq0AknFT4Mznk0Y

js elperuano.pe collected 2026-10-01 09:08:37 UTC 2,467 bytes, 1 lines download raw bytes

1!function(){"use strict";window.FELN=window.FELN||{};var e="https://www.gstatic.com/firebasejs/12.18.0/",t={apiKey:"AIzaSyBlKt4vgxTY-hhxHO1mR2ywRHF7dDk2_dQ",authDomain:"editora-labs-nfeln.firebaseapp.com",projectId:"editora-labs-nfeln",storageBucket:"editora-labs-nfeln.firebasestorage.app",messagingSenderId:"323286016340",appId:"1:323286016340:web:a3a5251c7df5c0bef7a8c1",measurementId:"G-VL5X76XZHE"},n=null,r=null,a=null,o=null,i=[],u="feln.sesion",s=function(){try{var e=localStorage.getItem(u);return e?JSON.parse(e):null}catch(e){return null}}();function c(e){try{e?(s={nombre:e.nombre,correo:e.correo,urlFoto:e.urlFoto},localStorage.setItem(u,JSON.stringify(s))):(s=null,localStorage.removeItem(u))}catch(e){}}function l(){i.forEach(function(e){try{e(a)}catch(e){console.warn("[sesion] un oyente fallo:",e)}})}function p(){return o||(o=async function(){var o=await(import(e+"firebase-app.js"));r=await(import(e+"firebase-auth.js")),n=r.getAuth(o.initializeApp(t));try{await r.setPersistence(n,r.browserLocalPersistence)}catch(e){}return new Promise(function(e){var t=!0;r.onAuthStateChanged(n,async function(n){if(!n)return a=null,c(null),l(),void(t&&(t=!1,e(null)));c(a={nombre:n.displayName,correo:n.email,urlFoto:n.photoURL,provisional:!0}),l(),t&&(t=!1,e(a));var r=await async function(e){try{var t=await fetch(FELN.apiBase+"/api/usuarios/sesion",{method:"POST",headers:{Authorization:"Bearer "+await e.getIdToken()}});if(!t.ok)throw new Error("HTTP "+t.status);return await t.json()}catch(e){return console.warn("[sesion] no se pudo registrar la sesion en el servidor:",e),null}}(n);r&&(a=r,c(r),l())})})}())}FELN.sesion={usuario:function(){return a},pista:function(){return s},lista:function(){return null!==o},preparar:p,entrar:async function(e){var t;await p(),"apple"===e?((t=new r.OAuthProvider("apple.com")).addScope("email"),t.addScope("name")):(t=new r.GoogleAuthProvider).setCustomParameters({prompt:"select_account"});try{await r.signInWithPopup(n,t)}catch(e){if(e&&("auth/popup-blocked"===e.code||"auth/operation-not-supported-in-this-environment"===e.code))return r.signInWithRedirect(n,t);if(e&&"auth/popup-closed-by-user"===e.code)return null;throw e}return a},salir:async function(){await p(),await r.signOut(n)},token:async function(){if(!n||!n.currentUser)return null;try{return await n.currentUser.getIdToken()}catch(e){return null}},alCambiar:function(e){return i.push(e),o&&e(a),function(){i=i.filter(function(t){return t!==e})}}}}();

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.