import{wt as t}from"./flowdrop.es.js?v=2.0.0-beta.7";var a={Accept:"application/json","Content-Type":"application/json"};async function e(e,n){const o=n.config&&n.endpointKey?t(n.config,n.endpointKey):{...a,...n.baseHeaders};return n.authProvider&&Object.assign(o,await n.authProvider.getAuthHeaders()),e.headers&&Object.assign(o,e.headers),o}async function n(t,a={},n={}){const o=await e(a,n);let i=await fetch(t,{...a,headers:o});if(401===i.status&&n.authProvider?.onUnauthorized&&await n.authProvider.onUnauthorized()){const o=await e(a,n);i=await fetch(t,{...a,headers:o})}return 403===i.status&&n.authProvider?.onForbidden&&await n.authProvider.onForbidden(),i}export{n as t};
//# sourceMappingURL=flowdrop-fetch-with-auth.js.map