import{s as e,a as s,h as t,A as a,B as r}from"./popup-C9isn0D2.js";const o=async()=>{try{const t=await e.getUserSession(),a=await s.refreshToken(t.refreshToken);if(a?.access_token&&a?.refresh_token)return await e.setUserSession(a.access_token,a.refresh_token),a.expires_in}catch(o){t(o,{method:a.REFRESH_TOKEN});const e=o?.response?.status;401!==e&&403!==e||chrome.runtime.sendMessage({type:r.RESET_REFRESH_TOKEN_TIMER,data:!0})}};export{o as refreshToken};
