import{l as o}from"./p-60cf0cc2.js";async function a(a,c){var l;let r=null;try{r=await(null===(l=null==o?void 0:o.getItem)||void 0===l?void 0:l.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!==c?c:r}export{a as g}