import{l as o}from"./p-de14d315.js";async function a(a,l){var r;let t=null;try{t=await(null===(r=null==o?void 0:o.getItem)||void 0===r?void 0:r.call(o,a))}catch(o){console.log("Error fetching data from cache with localforage",o);try{t=localStorage.getItem(a)?JSON.parse(localStorage.getItem(a)):null}catch(o){console.log("Error fetching data from cache with LocalStorage",o)}}return null===t&&void 0!==l?l:t}export{a as g}