1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B7717Xy-.js","assets/index-DGLuA4rz.css"])))=>i.map(i=>d[i]); 2import{a,b as t,s as n,x as e,m as s,_ as r}from"./index-B7717Xy-.js";const{apiBaseUrl:c}=t,i=async()=>{const a=s(),t=null==a?void 0:a.currentUser,{getResilientAuthToken:n}=await r(async()=>{const{getResilientAuthToken:a}=await import("./index-B7717Xy-.js").then(a=>a.ff);return{getResilientAuthToken:a}},__vite__mapDeps([0,1])),e=t?await n():null;return e?{Authorization:"Bearer ".concat(e)}:{}},o={createStaff:async t=>{const n=await i(),e="".concat(c,"/staff");return(await a.post(e,t,{headers:n})).data},getStaff:async(t,s)=>{var r,o,u,d;const f=await i(),l={};(null==s?void 0:s.includeOrganizations)&&(l.include_organizations="true");const w=await n.get("currentUser"),h="".concat(c,"/my-organization/staff/").concat(t);if(e(null==w?void 0:w.role))try{return(await a.get(h,{headers:f,params:l})).data}catch(g){if(404===(null==(r=g.response)?void 0:r.status))return null;throw g}try{const n="".concat(c,"/staff/").concat(t);return(await a.get(n,{headers:f,params:l})).data}catch(g){if(404===(null==(o=g.response)?void 0:o.status))return null;if(403===(null==(u=g.response)?void 0:u.status))try{return(await a.get(h,{headers:f,params:l})).data}catch(y){if(404===(null==(d=y.response)?void 0:d.status))return null;throw y}throw g}},getStaffByUuid:async t=>{var n;try{const n=await i(),e="".concat(c,"/staff/by-uuid/").concat(t);return(await a.get(e,{headers:n})).data}catch(e){if(404===(null==(n=e.response)?void 0:n.status))return null;throw e}},listStaff:async(t,n=!1,e=100)=>{const s=await i(),r="".concat(c,"/staff"),o={org_id:t,include_inactive:n,limit:e};return(await a.get(r,{headers:s,params:o})).data.staff||[]},updateStaff:async(t,n)=>{const e=await i(),s="".concat(c,"/staff/").concat(t);return(await a.patch(s,n,{headers:e})).data},removeStaff:async(t,n)=>{const e=await i(),s="".concat(c,"/staff/").concat(t);return(await a.delete(s,{headers:e,data:{mode:n}})).data},getAssignedAnimals:async t=>{const n=await i(),e="".concat(c,"/staff/").concat(t,"/animals");return(await a.get(e,{headers:n})).data},getActivityLog:async(t,n=30)=>{const e=await i(),s="".concat(c,"/staff/").concat(t,"/activity"),r={days:n};return(await a.get(s,{headers:e,params:r})).data}};export{o as default}; 3//# sourceMappingURL=staffController-KQCBxUAz.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.