PageSourceSearch

https://www.instagem.ai/assets/useInstagramProfiles-D_KQvT_K.js

js instagem.ai collected 2026-10-05 12:06:11 UTC 1,603 bytes, 1 lines download raw bytes

1import{G as C,r as t,x as l}from"./main-DX7XzkoU.js";const b=()=>{const{profiles:i,profilesLoading:g,profilesError:m,fetchProfiles:p,addProfileToCache:c,updateProfileInCache:n,removeProfileFromCache:f,setSelectedProfile:u}=C(),[d,a]=t.useState(!1),[y,s]=t.useState(null),P=t.useCallback(async o=>{try{a(!0),s(null);const e=await l.saveInstagramProfile(o);return c(e.profile),i.length===0&&u(e.profile),e}catch(e){const r=e instanceof Error?e.message:"Failed to add Instagram profile";throw s(r),new Error(r)}finally{a(!1)}},[c,i.length,u]),h=t.useCallback(async o=>{try{a(!0),s(null);const e=await l.updateInstagramProfile(o);return n(e),e}catch(e){const r=e instanceof Error?e.message:"Failed to update Instagram profile";throw s(r),new Error(r)}finally{a(!1)}},[n]),w=t.useCallback(async o=>{try{a(!0),s(null),await l.deleteInstagramProfile(o),f(o)}catch(e){const r=e instanceof Error?e.message:"Failed to delete Instagram profile";throw s(r),new Error(r)}finally{a(!1)}},[f]),E=t.useCallback(async o=>{try{a(!0),s(null);const e=await l.syncInstagramProfile(o);return n(e.profile),e}catch(e){const r=e instanceof Error?e.message:"Failed to sync Instagram profile";throw s(r),new Error(r)}finally{a(!1)}},[n]),I=t.useCallback(async o=>{try{a(!0),s(null);const e=await l.analyzeInstagramProfile(o);return n(e.profile),e}catch(e){const r=e instanceof Error?e.message:"Falha ao analisar perfil do Instagram";throw s(r),new Error(r)}finally{a(!1)}},[n]);return{profiles:i,loading:g||d,error:m||y,fetchProfiles:p,addProfile:P,updateProfile:h,deleteProfile:w,syncProfile:E,analyzeProfile:I}};export{b as u};

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.