//#region src/routes/code/+page.server.ts
var load = async ({ fetch }) => {
	const resp = await fetch("/api/nexus");
	if (!resp.ok) return {
		communities: [],
		edges: [],
		totalNodes: 0,
		totalRelations: 0,
		empty: true,
		emptyReason: resp.status === 503 ? "nexus.db not available" : `API error ${resp.status}`
	};
	const payload = await resp.json();
	return {
		communities: payload.communities,
		edges: payload.edges,
		totalNodes: payload.totalNodes,
		totalRelations: payload.totalRelations,
		empty: payload.communities.length === 0,
		emptyReason: payload.communities.length === 0 ? "No communities indexed yet. Run `cleo nexus analyze` to populate nexus.db." : null
	};
};

var _page_server_ts = /*#__PURE__*/Object.freeze({
	__proto__: null,
	load: load
});

const index = 15;
let component_cache;
const component = async () => component_cache ??= (await import('./_page.svelte-b_jJgI54.js')).default;
const server_id = "src/routes/code/+page.server.ts";
const imports = ["_app/immutable/nodes/15.DshOFWqG.js","_app/immutable/chunks/CQQRJ2Hr.js","_app/immutable/chunks/DyGQ_VXC.js","_app/immutable/chunks/DrKWWDpL.js","_app/immutable/chunks/DKX-2-1g.js","_app/immutable/chunks/CQCxd1p9.js","_app/immutable/chunks/D8NsLz6i.js","_app/immutable/chunks/o1PZ6Kzq.js","_app/immutable/chunks/RptFUp2P.js","_app/immutable/chunks/CEqOYim7.js","_app/immutable/chunks/CqF5Lomf.js"];
const stylesheets = ["_app/immutable/assets/cluster-label-layer.aRgASjnn.css","_app/immutable/assets/no-face-up.BlswZ73M.css","_app/immutable/assets/nexus-adapter.DuSZKvuH.css","_app/immutable/assets/Tabs.CU9_rsWl.css","_app/immutable/assets/ui.CH-9N9-0.css","_app/immutable/assets/15.CdtiwMjj.css"];
const fonts = [];

export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
//# sourceMappingURL=15-WnzT69a1.js.map
