PageSourceSearch

https://ai-resume-analyzers.vercel.app/assets/puter-N-LIF3ap.js

js ai-resume-analyzers.vercel.app collected 2026-10-03 06:12:47 UTC 4,502 bytes, 1 lines download raw bytes

1import{z as I}from"./chunk-QMGIS6GS-DX0VMMAr.js";const j=a=>{let r;const s=new Set,i=(c,f)=>{const o=typeof c=="function"?c(r):c;if(!Object.is(o,r)){const g=r;r=f??(typeof o!="object"||o===null)?o:Object.assign({},r,o),s.forEach(p=>p(r,g))}},l=()=>r,h={setState:i,getState:l,getInitialState:()=>d,subscribe:c=>(s.add(c),()=>s.delete(c))},d=r=a(i,l,h);return h},x=a=>a?j(a):j,E=a=>a;function K(a,r=E){const s=I.useSyncExternalStore(a.subscribe,()=>r(a.getState()),()=>r(a.getInitialState()));return I.useDebugValue(s),s}const k=a=>{const r=x(a),s=i=>K(r,i);return Object.assign(s,r),s},F=a=>a?k(a):k,u=()=>typeof window<"u"&&window.puter?window.puter:null,V=F((a,r)=>{const s=t=>{a({error:t,isLoading:!1,auth:{user:null,isAuthenticated:!1,signIn:r().auth.signIn,signOut:r().auth.signOut,refreshUser:r().auth.refreshUser,checkAuthStatus:r().auth.checkAuthStatus,getUser:r().auth.getUser}})},i=async()=>{const t=u();if(!t)return s("Puter.js not available"),!1;a({isLoading:!0,error:null});try{if(await t.auth.isSignedIn()){const n=await t.auth.getUser();return a({auth:{user:n,isAuthenticated:!0,signIn:r().auth.signIn,signOut:r().auth.signOut,refreshUser:r().auth.refreshUser,checkAuthStatus:r().auth.checkAuthStatus,getUser:()=>n},isLoading:!1}),!0}else return a({auth:{user:null,isAuthenticated:!1,signIn:r().auth.signIn,signOut:r().auth.signOut,refreshUser:r().auth.refreshUser,checkAuthStatus:r().auth.checkAuthStatus,getUser:()=>null},isLoading:!1}),!1}catch(e){const n=e instanceof Error?e.message:"Failed to check auth status";return s(n),!1}},l=async()=>{const t=u();if(!t){s("Puter.js not available");return}a({isLoading:!0,error:null});try{await t.auth.signIn(),await i()}catch(e){const n=e instanceof Error?e.message:"Sign in failed";s(n)}},S=async()=>{const t=u();if(!t){s("Puter.js not available");return}a({isLoading:!0,error:null});try{await t.auth.signOut(),a({auth:{user:null,isAuthenticated:!1,signIn:r().auth.signIn,signOut:r().auth.signOut,refreshUser:r().auth.refreshUser,checkAuthStatus:r().auth.checkAuthStatus,getUser:()=>null},isLoading:!1})}catch(e){const n=e instanceof Error?e.message:"Sign out failed";s(n)}},b=async()=>{const t=u();if(!t){s("Puter.js not available");return}a({isLoading:!0,error:null});try{const e=await t.auth.getUser();a({auth:{user:e,isAuthenticated:!0,signIn:r().auth.signIn,signOut:r().auth.signOut,refreshUser:r().auth.refreshUser,checkAuthStatus:r().auth.checkAuthStatus,getUser:()=>e},isLoading:!1})}catch(e){const n=e instanceof Error?e.message:"Failed to refresh user";s(n)}},h=()=>{if(u()){a({puterReady:!0}),i();return}const e=setInterval(()=>{u()&&(clearInterval(e),a({puterReady:!0}),i())},100);setTimeout(()=>{clearInterval(e),u()||s("Puter.js failed to load within 10 seconds")},1e4)},d=async(t,e)=>{const n=u();if(!n){s("Puter.js not available");return}return n.fs.write(t,e)},c=async t=>{const e=u();if(!e){s("Puter.js not available");return}return e.fs.readdir(t)},f=async t=>{const e=u();if(!e){s("Puter.js not available");return}return e.fs.read(t)},o=async t=>{const e=u();if(!e){s("Puter.js not available");return}return e.fs.upload(t)},g=async t=>{const e=u();if(!e){s("Puter.js not available");return}return e.fs.delete(t)},p=async(t,e,n,y)=>{const v=u();if(!v){s("Puter.js not available");return}return v.ai.chat(t,e,n,y)},P=async(t,e)=>{const n=u();if(!n){s("Puter.js not available");return}return n.ai.chat([{role:"user",content:[{type:"file",puter_path:t},{type:"text",text:e}]}],{model:"claude-3-7-sonnet"})},U=async(t,e)=>{const n=u();if(!n){s("Puter.js not available");return}return n.ai.img2txt(t,e)},m=async t=>{const e=u();if(!e){s("Puter.js not available");return}return e.kv.get(t)},w=async(t,e)=>{const n=u();if(!n){s("Puter.js not available");return}return n.kv.set(t,e)},A=async t=>{const e=u();if(!e){s("Puter.js not available");return}return e.kv.delete(t)},O=async(t,e)=>{const n=u();if(!n){s("Puter.js not available");return}return e===void 0&&(e=!1),n.kv.list(t,e)},L=async()=>{const t=u();if(!t){s("Puter.js not available");return}return t.kv.flush()};return{isLoading:!0,error:null,puterReady:!1,auth:{user:null,isAuthenticated:!1,signIn:l,signOut:S,refreshUser:b,checkAuthStatus:i,getUser:()=>r().auth.user},fs:{write:(t,e)=>d(t,e),read:t=>f(t),readDir:t=>c(t),upload:t=>o(t),delete:t=>g(t)},ai:{chat:(t,e,n,y)=>p(t,e,n,y),feedback:(t,e)=>P(t,e),img2txt:(t,e)=>U(t,e)},kv:{get:t=>m(t),set:(t,e)=>w(t,e),delete:t=>A(t),list:(t,e)=>O(t,e),flush:()=>L()},init:h,clearError:()=>a({error:null})}});
1export{V 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.