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