{"version":3,"file":"BYyQDH8F.js","sources":["../../../../src/middleware/get-client-agent.ts"],"sourcesContent":["import type {Agent} from \"~/models/services/Agent\";\nimport {USERS_SERVICE} from \"~/data/ServicesConstants\";\n\nexport default defineNuxtRouteMiddleware(async () => {\n if (import.meta.server) return\n try {\n const axiosRequest = await useNuxtApp().$getApi(USERS_SERVICE);\n const {data} = await axiosRequest.get('/agent/current-user')\n const agent = useState('agent')\n agent.value = data\n } catch (error) {\n console.log(error)\n }\n\n\n})"],"names":["getClientAgent","defineNuxtRouteMiddleware","__temp","__restore","axiosRequest","__executeAsync","useNuxtApp","USERS_SERVICE","data","agent","useState","error"],"mappings":"iEAII,MAAwBA,EAAAC,EAAA,SAAA,CAAA,IAAAC,EAAAC,EAEpB,GAAA,CACA,MAAMC,GAAe,CAAAF,EAAAC,CAAA,EAAAE,EAAA,IAAAC,IAAiB,QAAqBC,CAAA,CAAA,EAAAL,EAAA,MAAAA,EAAAC,EAAA,EAAAD,GACrD,CAAA,KAAAM,CAAA,MAAsCL,CAAA,EAAAE,EAAA,IAAAD,EAAA,IAAA,qBAAA,CAAA,EAAAF,EAAA,MAAAA,EAAAC,EAAA,EAAAD,GACtCO,EAAQC,EAAA,OAAA,UACFF,CACZ,OAAAG,EAAiB,CACrB,QAAA,IAAAA,CAAA,CAGH"}