@mycelish/cli 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/migrator/scanners.d.ts.map +1 -1
- package/dist/core/migrator/scanners.js +96 -23
- package/dist/core/migrator/scanners.js.map +1 -1
- package/dist/core/migrator.test.js +12 -7
- package/dist/core/migrator.test.js.map +1 -1
- package/dist/dashboard/assets/{index-BjDoq18L.js → index-Dnbmbu4D.js} +1 -1
- package/dist/dashboard/index.html +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanners.d.ts","sourceRoot":"","sources":["../../../src/core/migrator/scanners.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,cAAc,EAEpB,MAAM,gBAAgB,CAAC;AA2CxB;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAe7D;AAyBD,wBAAsB,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC,CA6I9D;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC,CAkFzD;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC,CA8B1D;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"scanners.d.ts","sourceRoot":"","sources":["../../../src/core/migrator/scanners.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,cAAc,EAEpB,MAAM,gBAAgB,CAAC;AA2CxB;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAe7D;AAyBD,wBAAsB,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC,CA6I9D;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC,CAkFzD;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC,CA8B1D;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC,CAgJ5D;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC,CA8F5D;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC,CAkEzD;AAED,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA6BtE;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAS9D"}
|
|
@@ -362,17 +362,6 @@ export async function scanOpenClaw() {
|
|
|
362
362
|
// Strip // comments for JSON5 compat (only at line start or after whitespace)
|
|
363
363
|
raw = raw.replace(/^\s*\/\/.*$/gm, "");
|
|
364
364
|
const config = JSON.parse(raw);
|
|
365
|
-
// Skills from skills.entries[]
|
|
366
|
-
if (config.skills?.entries) {
|
|
367
|
-
for (const entry of config.skills.entries) {
|
|
368
|
-
result.skills.push({
|
|
369
|
-
name: entry.name,
|
|
370
|
-
path: entry.path ?? "",
|
|
371
|
-
source: "openclaw",
|
|
372
|
-
metadata: { enabled: String(entry.enabled ?? true) },
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
365
|
// MCPs from plugins.entries[] where type === "mcp-adapter"
|
|
377
366
|
if (config.plugins?.entries) {
|
|
378
367
|
for (const entry of config.plugins.entries) {
|
|
@@ -380,31 +369,115 @@ export async function scanOpenClaw() {
|
|
|
380
369
|
result.mcps.push({
|
|
381
370
|
name: entry.name,
|
|
382
371
|
config: {
|
|
383
|
-
command: entry.
|
|
384
|
-
args: entry.
|
|
372
|
+
command: entry.command ?? "",
|
|
373
|
+
args: entry.args ?? [],
|
|
374
|
+
env: entry.env,
|
|
385
375
|
},
|
|
386
376
|
source: "openclaw",
|
|
387
377
|
});
|
|
388
378
|
}
|
|
389
379
|
}
|
|
390
380
|
}
|
|
381
|
+
// Agents from agents.list[]
|
|
382
|
+
if (Array.isArray(config.agents?.list)) {
|
|
383
|
+
for (const agent of config.agents.list) {
|
|
384
|
+
if (agent.id) {
|
|
385
|
+
result.components.push({
|
|
386
|
+
type: "agent",
|
|
387
|
+
name: agent.id,
|
|
388
|
+
path: path.join(home, ".openclaw", "openclaw.json"),
|
|
389
|
+
metadata: {
|
|
390
|
+
isDefault: String(agent.default ?? false),
|
|
391
|
+
workspace: agent.workspace ?? "",
|
|
392
|
+
},
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
catch {
|
|
400
|
+
// ignore
|
|
401
|
+
}
|
|
402
|
+
try {
|
|
403
|
+
// Skills: ~/.openclaw/skills (managed) + ~/.openclaw/workspace/skills (workspace)
|
|
404
|
+
// Precedence: workspace > managed > bundled (we skip bundled)
|
|
405
|
+
const seen = new Set();
|
|
406
|
+
for (const skillsDir of [
|
|
407
|
+
path.join(home, ".openclaw", "workspace", "skills"),
|
|
408
|
+
path.join(home, ".openclaw", "skills"),
|
|
409
|
+
]) {
|
|
410
|
+
const skillFiles = await globDir(skillsDir, /SKILL\.md$/);
|
|
411
|
+
for (const skillPath of skillFiles) {
|
|
412
|
+
const content = await readFileIfExists(skillPath);
|
|
413
|
+
if (content) {
|
|
414
|
+
const parsed = parseSkillMd(content);
|
|
415
|
+
const name = parsed.name || path.basename(path.dirname(skillPath));
|
|
416
|
+
if (seen.has(name))
|
|
417
|
+
continue; // workspace wins over managed
|
|
418
|
+
seen.add(name);
|
|
419
|
+
result.skills.push({
|
|
420
|
+
name,
|
|
421
|
+
path: skillPath,
|
|
422
|
+
source: "openclaw",
|
|
423
|
+
metadata: { description: parsed.description },
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
} // end for skillsDir
|
|
428
|
+
}
|
|
429
|
+
catch {
|
|
430
|
+
// ignore
|
|
431
|
+
}
|
|
432
|
+
try {
|
|
433
|
+
// Skills in project subdirs: ~/.openclaw/workspace/projects/**/SKILL.md
|
|
434
|
+
const projectsDir = path.join(home, ".openclaw", "workspace", "projects");
|
|
435
|
+
const projectSkillFiles = await globDir(projectsDir, /SKILL\.md$/);
|
|
436
|
+
for (const skillPath of projectSkillFiles) {
|
|
437
|
+
const content = await readFileIfExists(skillPath);
|
|
438
|
+
if (content) {
|
|
439
|
+
const parsed = parseSkillMd(content);
|
|
440
|
+
result.skills.push({
|
|
441
|
+
name: parsed.name || path.basename(path.dirname(skillPath)),
|
|
442
|
+
path: skillPath,
|
|
443
|
+
source: "openclaw",
|
|
444
|
+
metadata: { description: parsed.description },
|
|
445
|
+
});
|
|
446
|
+
}
|
|
391
447
|
}
|
|
392
448
|
}
|
|
393
449
|
catch {
|
|
394
450
|
// ignore
|
|
395
451
|
}
|
|
396
452
|
try {
|
|
397
|
-
// Memory: workspace MEMORY.md
|
|
398
|
-
const
|
|
399
|
-
const
|
|
400
|
-
|
|
453
|
+
// Memory: workspace MEMORY.md + AGENTS.md
|
|
454
|
+
const workspaceDir = path.join(home, ".openclaw", "workspace");
|
|
455
|
+
for (const memFile of ["MEMORY.md", "AGENTS.md"]) {
|
|
456
|
+
const memPath = path.join(workspaceDir, memFile);
|
|
401
457
|
const content = await readFileIfExists(memPath);
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
458
|
+
if (content) {
|
|
459
|
+
result.memory.push({
|
|
460
|
+
name: memFile.replace(/\.md$/, ""),
|
|
461
|
+
path: memPath,
|
|
462
|
+
source: "openclaw",
|
|
463
|
+
scope: "shared",
|
|
464
|
+
content,
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
catch {
|
|
470
|
+
// ignore
|
|
471
|
+
}
|
|
472
|
+
try {
|
|
473
|
+
// Workspace agents: ~/.openclaw/workspace/agents/*.md
|
|
474
|
+
const agentsDir = path.join(home, ".openclaw", "workspace", "agents");
|
|
475
|
+
const agentFiles = await globDir(agentsDir, /\.md$/);
|
|
476
|
+
for (const agentPath of agentFiles) {
|
|
477
|
+
result.components.push({
|
|
478
|
+
type: "agent",
|
|
479
|
+
name: path.basename(agentPath, ".md"),
|
|
480
|
+
path: agentPath,
|
|
408
481
|
});
|
|
409
482
|
}
|
|
410
483
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanners.js","sourceRoot":"","sources":["../../../src/core/migrator/scanners.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EAGL,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAiB,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E;;;;;;;;GAQG;AACH,SAAS,kBAAkB,CAAC,IAAY,EAAE,OAAe;IACvD,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEjC,8DAA8D;IAC9D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9C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AAC;QAC/C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -244,15 +244,17 @@ describe("scanners", () => {
|
|
|
244
244
|
});
|
|
245
245
|
});
|
|
246
246
|
describe("scanOpenClaw", () => {
|
|
247
|
-
it("parses
|
|
247
|
+
it("parses MCP adapters with correct field mapping", async () => {
|
|
248
248
|
const config = {
|
|
249
|
-
skills: { entries: [{ name: "oc-skill", path: "/p", enabled: true }] },
|
|
250
249
|
plugins: {
|
|
251
250
|
entries: [
|
|
252
|
-
{ name: "oc-mcp", type: "mcp-adapter",
|
|
251
|
+
{ name: "oc-mcp", type: "mcp-adapter", command: "npx", args: ["-y", "some-mcp"], env: { KEY: "val" } },
|
|
253
252
|
{ name: "not-mcp", type: "other" },
|
|
254
253
|
],
|
|
255
254
|
},
|
|
255
|
+
agents: {
|
|
256
|
+
list: [{ id: "main", default: true, workspace: "~/.openclaw/workspace" }],
|
|
257
|
+
},
|
|
256
258
|
};
|
|
257
259
|
mockDeps(makeFsMock({
|
|
258
260
|
readFile: vi.fn().mockImplementation(async (p) => {
|
|
@@ -263,13 +265,16 @@ describe("scanners", () => {
|
|
|
263
265
|
}));
|
|
264
266
|
const { scanOpenClaw } = await import("./migrator/index.js");
|
|
265
267
|
const result = await scanOpenClaw();
|
|
266
|
-
expect(result.skills).toHaveLength(1);
|
|
267
|
-
expect(result.skills[0].name).toBe("oc-skill");
|
|
268
268
|
expect(result.mcps).toHaveLength(1);
|
|
269
269
|
expect(result.mcps[0].name).toBe("oc-mcp");
|
|
270
|
+
expect(result.mcps[0].config.command).toBe("npx");
|
|
271
|
+
expect(result.mcps[0].config.args).toEqual(["-y", "some-mcp"]);
|
|
272
|
+
expect(result.mcps[0].config.env).toEqual({ KEY: "val" });
|
|
273
|
+
expect(result.components).toHaveLength(1);
|
|
274
|
+
expect(result.components[0].name).toBe("main");
|
|
270
275
|
});
|
|
271
276
|
it("handles JSON with // comments", async () => {
|
|
272
|
-
const raw = `{\n// comment\n"
|
|
277
|
+
const raw = `{\n// comment\n"plugins": { "entries": [] }\n}`;
|
|
273
278
|
mockDeps(makeFsMock({
|
|
274
279
|
readFile: vi.fn().mockImplementation(async (p) => {
|
|
275
280
|
if (p.includes("openclaw.json"))
|
|
@@ -279,7 +284,7 @@ describe("scanners", () => {
|
|
|
279
284
|
}));
|
|
280
285
|
const { scanOpenClaw } = await import("./migrator/index.js");
|
|
281
286
|
const result = await scanOpenClaw();
|
|
282
|
-
expect(result.
|
|
287
|
+
expect(result.mcps).toEqual([]);
|
|
283
288
|
});
|
|
284
289
|
});
|
|
285
290
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrator.test.js","sourceRoot":"","sources":["../../src/core/migrator.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EACL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAU7B,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,SAAS,SAAS,CAAC,IAAY,EAAE,MAAc,EAAE,WAAkB;IACjE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,IAAI,EAAE,EAAE,MAAM,EAAE,MAAa,EAAE,WAAW,EAAE,CAAC;AAC7E,CAAC;AAED,SAAS,OAAO,CAAC,IAAY,EAAE,MAAc,EAAE,OAAO,GAAG,KAAK,EAAE,OAAiB,EAAE;IACjF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAa,EAAE,CAAC;AACpE,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,MAAc;IAC9C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,IAAI,KAAK,EAAE,MAAM,E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B,CAAC,CAAC;YAC7D,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;YACtC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;QAC5B,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;YAC5C,MAAM,aAAa,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;YAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;YACnD,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAC;YAC7D,MAAM,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;YAC5E,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC;YACtG,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -106,7 +106,7 @@ Error generating stack: `+l.message+`
|
|
|
106
106
|
|
|
107
107
|
`)}S.write("payload.value = newResult;"),S.write("return payload;");const H=S.compile();return(E,M)=>H(v,E,M)};let c;const u=Pc,d=!N1.jitless,m=d&&fT.value,y=o.catchall;let g;e._zod.parse=(v,S)=>{g??(g=i.value);const w=v.value;return u(w)?d&&m&&S?.async===!1&&S.jitless!==!0?(c||(c=s(o.shape)),v=c(v,S),y?U1([],w,v,S,g,e):v):a(v,S):(v.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),v)}});function zv(e,o,a,i){for(const c of e)if(c.issues.length===0)return o.value=c.value,o;const s=e.filter(c=>!Yr(c));return s.length===1?(o.value=s[0].value,s[0]):(o.issues.push({code:"invalid_union",input:o.value,inst:a,errors:e.map(c=>c.issues.map(u=>ea(u,i,Wo())))}),o)}const XA=fe("$ZodUnion",(e,o)=>{ut.init(e,o),Ie(e._zod,"optin",()=>o.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Ie(e._zod,"optout",()=>o.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Ie(e._zod,"values",()=>{if(o.options.every(s=>s._zod.values))return new Set(o.options.flatMap(s=>Array.from(s._zod.values)))}),Ie(e._zod,"pattern",()=>{if(o.options.every(s=>s._zod.pattern)){const s=o.options.map(c=>c._zod.pattern);return new RegExp(`^(${s.map(c=>sm(c.source)).join("|")})$`)}});const a=o.options.length===1,i=o.options[0]._zod.run;e._zod.parse=(s,c)=>{if(a)return i(s,c);let u=!1;const d=[];for(const p of o.options){const m=p._zod.run({value:s.value,issues:[]},c);if(m instanceof Promise)d.push(m),u=!0;else{if(m.issues.length===0)return m;d.push(m)}}return u?Promise.all(d).then(p=>zv(p,s,e,c)):zv(d,s,e,c)}}),PA=fe("$ZodIntersection",(e,o)=>{ut.init(e,o),e._zod.parse=(a,i)=>{const s=a.value,c=o.left._zod.run({value:s,issues:[]},i),u=o.right._zod.run({value:s,issues:[]},i);return c instanceof Promise||u instanceof Promise?Promise.all([c,u]).then(([p,m])=>Tv(a,p,m)):Tv(a,c,u)}});function Oh(e,o){if(e===o)return{valid:!0,data:e};if(e instanceof Date&&o instanceof Date&&+e==+o)return{valid:!0,data:e};if(oi(e)&&oi(o)){const a=Object.keys(o),i=Object.keys(e).filter(c=>a.indexOf(c)!==-1),s={...e,...o};for(const c of i){const u=Oh(e[c],o[c]);if(!u.valid)return{valid:!1,mergeErrorPath:[c,...u.mergeErrorPath]};s[c]=u.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(o)){if(e.length!==o.length)return{valid:!1,mergeErrorPath:[]};const a=[];for(let i=0;i<e.length;i++){const s=e[i],c=o[i],u=Oh(s,c);if(!u.valid)return{valid:!1,mergeErrorPath:[i,...u.mergeErrorPath]};a.push(u.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function Tv(e,o,a){const i=new Map;let s;for(const d of o.issues)if(d.code==="unrecognized_keys"){s??(s=d);for(const p of d.keys)i.has(p)||i.set(p,{}),i.get(p).l=!0}else e.issues.push(d);for(const d of a.issues)if(d.code==="unrecognized_keys")for(const p of d.keys)i.has(p)||i.set(p,{}),i.get(p).r=!0;else e.issues.push(d);const c=[...i].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(c.length&&s&&e.issues.push({...s,keys:c}),Yr(e))return e;const u=Oh(o.value,a.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const QA=fe("$ZodRecord",(e,o)=>{ut.init(e,o),e._zod.parse=(a,i)=>{const s=a.value;if(!oi(s))return a.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),a;const c=[],u=o.keyType._zod.values;if(u){a.value={};const d=new Set;for(const m of u)if(typeof m=="string"||typeof m=="number"||typeof m=="symbol"){d.add(typeof m=="number"?m.toString():m);const y=o.valueType._zod.run({value:s[m],issues:[]},i);y instanceof Promise?c.push(y.then(g=>{g.issues.length&&a.issues.push(...qr(m,g.issues)),a.value[m]=g.value})):(y.issues.length&&a.issues.push(...qr(m,y.issues)),a.value[m]=y.value)}let p;for(const m in s)d.has(m)||(p=p??[],p.push(m));p&&p.length>0&&a.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:p})}else{a.value={};for(const d of Reflect.ownKeys(s)){if(d==="__proto__")continue;let p=o.keyType._zod.run({value:d,issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&eA.test(d)&&p.issues.length){const g=o.keyType._zod.run({value:Number(d),issues:[]},i);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(p=g)}if(p.issues.length){o.mode==="loose"?a.value[d]=s[d]:a.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(g=>ea(g,i,Wo())),input:d,path:[d],inst:e});continue}const y=o.valueType._zod.run({value:s[d],issues:[]},i);y instanceof Promise?c.push(y.then(g=>{g.issues.length&&a.issues.push(...qr(d,g.issues)),a.value[p.value]=g.value})):(y.issues.length&&a.issues.push(...qr(d,y.issues)),a.value[p.value]=y.value)}}return c.length?Promise.all(c).then(()=>a):a}}),KA=fe("$ZodEnum",(e,o)=>{ut.init(e,o);const a=z1(o.entries),i=new Set(a);e._zod.values=i,e._zod.pattern=new RegExp(`^(${a.filter(s=>dT.has(typeof s)).map(s=>typeof s=="string"?hu(s):s.toString()).join("|")})$`),e._zod.parse=(s,c)=>{const u=s.value;return i.has(u)||s.issues.push({code:"invalid_value",values:a,input:u,inst:e}),s}}),JA=fe("$ZodTransform",(e,o)=>{ut.init(e,o),e._zod.parse=(a,i)=>{if(i.direction==="backward")throw new C1(e.constructor.name);const s=o.transform(a.value,a);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(u=>(a.value=u,a));if(s instanceof Promise)throw new Xr;return a.value=s,a}});function Av(e,o){return e.issues.length&&o===void 0?{issues:[],value:void 0}:e}const Z1=fe("$ZodOptional",(e,o)=>{ut.init(e,o),e._zod.optin="optional",e._zod.optout="optional",Ie(e._zod,"values",()=>o.innerType._zod.values?new Set([...o.innerType._zod.values,void 0]):void 0),Ie(e._zod,"pattern",()=>{const a=o.innerType._zod.pattern;return a?new RegExp(`^(${sm(a.source)})?$`):void 0}),e._zod.parse=(a,i)=>{if(o.innerType._zod.optin==="optional"){const s=o.innerType._zod.run(a,i);return s instanceof Promise?s.then(c=>Av(c,a.value)):Av(s,a.value)}return a.value===void 0?a:o.innerType._zod.run(a,i)}}),FA=fe("$ZodExactOptional",(e,o)=>{Z1.init(e,o),Ie(e._zod,"values",()=>o.innerType._zod.values),Ie(e._zod,"pattern",()=>o.innerType._zod.pattern),e._zod.parse=(a,i)=>o.innerType._zod.run(a,i)}),WA=fe("$ZodNullable",(e,o)=>{ut.init(e,o),Ie(e._zod,"optin",()=>o.innerType._zod.optin),Ie(e._zod,"optout",()=>o.innerType._zod.optout),Ie(e._zod,"pattern",()=>{const a=o.innerType._zod.pattern;return a?new RegExp(`^(${sm(a.source)}|null)$`):void 0}),Ie(e._zod,"values",()=>o.innerType._zod.values?new Set([...o.innerType._zod.values,null]):void 0),e._zod.parse=(a,i)=>a.value===null?a:o.innerType._zod.run(a,i)}),eM=fe("$ZodDefault",(e,o)=>{ut.init(e,o),e._zod.optin="optional",Ie(e._zod,"values",()=>o.innerType._zod.values),e._zod.parse=(a,i)=>{if(i.direction==="backward")return o.innerType._zod.run(a,i);if(a.value===void 0)return a.value=o.defaultValue,a;const s=o.innerType._zod.run(a,i);return s instanceof Promise?s.then(c=>Mv(c,o)):Mv(s,o)}});function Mv(e,o){return e.value===void 0&&(e.value=o.defaultValue),e}const tM=fe("$ZodPrefault",(e,o)=>{ut.init(e,o),e._zod.optin="optional",Ie(e._zod,"values",()=>o.innerType._zod.values),e._zod.parse=(a,i)=>(i.direction==="backward"||a.value===void 0&&(a.value=o.defaultValue),o.innerType._zod.run(a,i))}),nM=fe("$ZodNonOptional",(e,o)=>{ut.init(e,o),Ie(e._zod,"values",()=>{const a=o.innerType._zod.values;return a?new Set([...a].filter(i=>i!==void 0)):void 0}),e._zod.parse=(a,i)=>{const s=o.innerType._zod.run(a,i);return s instanceof Promise?s.then(c=>kv(c,e)):kv(s,e)}});function kv(e,o){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:o}),e}const oM=fe("$ZodCatch",(e,o)=>{ut.init(e,o),Ie(e._zod,"optin",()=>o.innerType._zod.optin),Ie(e._zod,"optout",()=>o.innerType._zod.optout),Ie(e._zod,"values",()=>o.innerType._zod.values),e._zod.parse=(a,i)=>{if(i.direction==="backward")return o.innerType._zod.run(a,i);const s=o.innerType._zod.run(a,i);return s instanceof Promise?s.then(c=>(a.value=c.value,c.issues.length&&(a.value=o.catchValue({...a,error:{issues:c.issues.map(u=>ea(u,i,Wo()))},input:a.value}),a.issues=[]),a)):(a.value=s.value,s.issues.length&&(a.value=o.catchValue({...a,error:{issues:s.issues.map(c=>ea(c,i,Wo()))},input:a.value}),a.issues=[]),a)}}),aM=fe("$ZodPipe",(e,o)=>{ut.init(e,o),Ie(e._zod,"values",()=>o.in._zod.values),Ie(e._zod,"optin",()=>o.in._zod.optin),Ie(e._zod,"optout",()=>o.out._zod.optout),Ie(e._zod,"propValues",()=>o.in._zod.propValues),e._zod.parse=(a,i)=>{if(i.direction==="backward"){const c=o.out._zod.run(a,i);return c instanceof Promise?c.then(u=>vc(u,o.in,i)):vc(c,o.in,i)}const s=o.in._zod.run(a,i);return s instanceof Promise?s.then(c=>vc(c,o.out,i)):vc(s,o.out,i)}});function vc(e,o,a){return e.issues.length?(e.aborted=!0,e):o._zod.run({value:e.value,issues:e.issues},a)}const rM=fe("$ZodReadonly",(e,o)=>{ut.init(e,o),Ie(e._zod,"propValues",()=>o.innerType._zod.propValues),Ie(e._zod,"values",()=>o.innerType._zod.values),Ie(e._zod,"optin",()=>o.innerType?._zod?.optin),Ie(e._zod,"optout",()=>o.innerType?._zod?.optout),e._zod.parse=(a,i)=>{if(i.direction==="backward")return o.innerType._zod.run(a,i);const s=o.innerType._zod.run(a,i);return s instanceof Promise?s.then(Ov):Ov(s)}});function Ov(e){return e.value=Object.freeze(e.value),e}const iM=fe("$ZodCustom",(e,o)=>{Zn.init(e,o),ut.init(e,o),e._zod.parse=(a,i)=>a,e._zod.check=a=>{const i=a.value,s=o.fn(i);if(s instanceof Promise)return s.then(c=>Dv(c,a,i,e));Dv(s,a,i,e)}});function Dv(e,o,a,i){if(!e){const s={code:"custom",input:a,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),o.issues.push(Cl(s))}}var jv;class lM{constructor(){this._map=new WeakMap,this._idmap=new Map}add(o,...a){const i=a[0];return this._map.set(o,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,o),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(o){const a=this._map.get(o);return a&&typeof a=="object"&&"id"in a&&this._idmap.delete(a.id),this._map.delete(o),this}get(o){const a=o._zod.parent;if(a){const i={...this.get(a)??{}};delete i.id;const s={...i,...this._map.get(o)};return Object.keys(s).length?s:void 0}return this._map.get(o)}has(o){return this._map.has(o)}}function sM(){return new lM}(jv=globalThis).__zod_globalRegistry??(jv.__zod_globalRegistry=sM());const ul=globalThis.__zod_globalRegistry;function cM(e,o){return new e({type:"string",...Ce(o)})}function uM(e,o){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ce(o)})}function Rv(e,o){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ce(o)})}function fM(e,o){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ce(o)})}function dM(e,o){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ce(o)})}function hM(e,o){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ce(o)})}function mM(e,o){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ce(o)})}function pM(e,o){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ce(o)})}function gM(e,o){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ce(o)})}function yM(e,o){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ce(o)})}function vM(e,o){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ce(o)})}function bM(e,o){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ce(o)})}function xM(e,o){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ce(o)})}function SM(e,o){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ce(o)})}function wM(e,o){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ce(o)})}function _M(e,o){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ce(o)})}function EM(e,o){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ce(o)})}function CM(e,o){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ce(o)})}function NM(e,o){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ce(o)})}function zM(e,o){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ce(o)})}function TM(e,o){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ce(o)})}function AM(e,o){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ce(o)})}function MM(e,o){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ce(o)})}function kM(e,o){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ce(o)})}function OM(e,o){return new e({type:"string",format:"date",check:"string_format",...Ce(o)})}function DM(e,o){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ce(o)})}function jM(e,o){return new e({type:"string",format:"duration",check:"string_format",...Ce(o)})}function RM(e,o){return new e({type:"boolean",...Ce(o)})}function LM(e){return new e({type:"unknown"})}function HM(e,o){return new e({type:"never",...Ce(o)})}function B1(e,o){return new aA({check:"max_length",...Ce(o),maximum:e})}function Kc(e,o){return new rA({check:"min_length",...Ce(o),minimum:e})}function $1(e,o){return new iA({check:"length_equals",...Ce(o),length:e})}function UM(e,o){return new lA({check:"string_format",format:"regex",...Ce(o),pattern:e})}function ZM(e){return new sA({check:"string_format",format:"lowercase",...Ce(e)})}function BM(e){return new cA({check:"string_format",format:"uppercase",...Ce(e)})}function $M(e,o){return new uA({check:"string_format",format:"includes",...Ce(o),includes:e})}function VM(e,o){return new fA({check:"string_format",format:"starts_with",...Ce(o),prefix:e})}function YM(e,o){return new dA({check:"string_format",format:"ends_with",...Ce(o),suffix:e})}function li(e){return new hA({check:"overwrite",tx:e})}function qM(e){return li(o=>o.normalize(e))}function GM(){return li(e=>e.trim())}function IM(){return li(e=>e.toLowerCase())}function XM(){return li(e=>e.toUpperCase())}function PM(){return li(e=>uT(e))}function QM(e,o,a){return new e({type:"array",element:o,...Ce(a)})}function KM(e,o,a){return new e({type:"custom",check:"custom",fn:o,...Ce(a)})}function JM(e){const o=FM(a=>(a.addIssue=i=>{if(typeof i=="string")a.issues.push(Cl(i,a.value,o._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=a.value),s.inst??(s.inst=o),s.continue??(s.continue=!o._zod.def.abort),a.issues.push(Cl(s))}},e(a.value,a)));return o}function FM(e,o){const a=new Zn({check:"custom",...Ce(o)});return a._zod.check=e,a}function V1(e){let o=e?.target??"draft-2020-12";return o==="draft-4"&&(o="draft-04"),o==="draft-7"&&(o="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ul,target:o,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function bt(e,o,a={path:[],schemaPath:[]}){var i;const s=e._zod.def,c=o.seen.get(e);if(c)return c.count++,a.schemaPath.includes(e)&&(c.cycle=a.path),c.schema;const u={schema:{},count:1,cycle:void 0,path:a.path};o.seen.set(e,u);const d=e._zod.toJSONSchema?.();if(d)u.schema=d;else{const y={...a,schemaPath:[...a.schemaPath,e],path:a.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(o,u.schema,y);else{const v=u.schema,S=o.processors[s.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);S(e,o,v,y)}const g=e._zod.parent;g&&(u.ref||(u.ref=g),bt(g,o,y),o.seen.get(g).isParent=!0)}const p=o.metadataRegistry.get(e);return p&&Object.assign(u.schema,p),o.io==="input"&&Lt(e)&&(delete u.schema.examples,delete u.schema.default),o.io==="input"&&u.schema._prefault&&((i=u.schema).default??(i.default=u.schema._prefault)),delete u.schema._prefault,o.seen.get(e).schema}function Y1(e,o){const a=e.seen.get(o);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const u of e.seen.entries()){const d=e.metadataRegistry.get(u[0])?.id;if(d){const p=i.get(d);if(p&&p!==u[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(d,u[0])}}const s=u=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(u[0])?.id,v=e.external.uri??(w=>w);if(g)return{ref:v(g)};const S=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=S,{defId:S,ref:`${v("__shared")}#/${d}/${S}`}}if(u[1]===a)return{ref:"#"};const m=`#/${d}/`,y=u[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:m+y}},c=u=>{if(u[1].schema.$ref)return;const d=u[1],{ref:p,defId:m}=s(u);d.def={...d.schema},m&&(d.defId=m);const y=d.schema;for(const g in y)delete y[g];y.$ref=p};if(e.cycles==="throw")for(const u of e.seen.entries()){const d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
108
108
|
|
|
109
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(o===u[0]){c(u);continue}if(e.external){const m=e.external.registry.get(u[0])?.id;if(o!==u[0]&&m){c(u);continue}}if(e.metadataRegistry.get(u[0])?.id){c(u);continue}if(d.cycle){c(u);continue}if(d.count>1&&e.reused==="ref"){c(u);continue}}}function q1(e,o){const a=e.seen.get(o);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=u=>{const d=e.seen.get(u);if(d.ref===null)return;const p=d.def??d.schema,m={...p},y=d.ref;if(d.ref=null,y){i(y);const v=e.seen.get(y),S=v.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(S)):Object.assign(p,S),Object.assign(p,m),u._zod.parent===y)for(const _ in p)_==="$ref"||_==="allOf"||_ in m||delete p[_];if(S.$ref&&v.def)for(const _ in p)_==="$ref"||_==="allOf"||_ in v.def&&JSON.stringify(p[_])===JSON.stringify(v.def[_])&&delete p[_]}const g=u._zod.parent;if(g&&g!==y){i(g);const v=e.seen.get(g);if(v?.schema.$ref&&(p.$ref=v.schema.$ref,v.def))for(const S in p)S==="$ref"||S==="allOf"||S in v.def&&JSON.stringify(p[S])===JSON.stringify(v.def[S])&&delete p[S]}e.override({zodSchema:u,jsonSchema:p,path:d.path??[]})};for(const u of[...e.seen.entries()].reverse())i(u[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(o)?.id;if(!u)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(u)}Object.assign(s,a.def??a.schema);const c=e.external?.defs??{};for(const u of e.seen.entries()){const d=u[1];d.def&&d.defId&&(c[d.defId]=d.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?s.$defs=c:s.definitions=c);try{const u=JSON.parse(JSON.stringify(s));return Object.defineProperty(u,"~standard",{value:{...o["~standard"],jsonSchema:{input:Jc(o,"input",e.processors),output:Jc(o,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Lt(e,o){const a=o??{seen:new Set};if(a.seen.has(e))return!1;a.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Lt(i.element,a);if(i.type==="set")return Lt(i.valueType,a);if(i.type==="lazy")return Lt(i.getter(),a);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Lt(i.innerType,a);if(i.type==="intersection")return Lt(i.left,a)||Lt(i.right,a);if(i.type==="record"||i.type==="map")return Lt(i.keyType,a)||Lt(i.valueType,a);if(i.type==="pipe")return Lt(i.in,a)||Lt(i.out,a);if(i.type==="object"){for(const s in i.shape)if(Lt(i.shape[s],a))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(Lt(s,a))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(Lt(s,a))return!0;return!!(i.rest&&Lt(i.rest,a))}return!1}const WM=(e,o={})=>a=>{const i=V1({...a,processors:o});return bt(e,i),Y1(i,e),q1(i,e)},Jc=(e,o,a={})=>i=>{const{libraryOptions:s,target:c}=i??{},u=V1({...s??{},target:c,io:o,processors:a});return bt(e,u),Y1(u,e),q1(u,e)},ek={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tk=(e,o,a,i)=>{const s=a;s.type="string";const{minimum:c,maximum:u,format:d,patterns:p,contentEncoding:m}=e._zod.bag;if(typeof c=="number"&&(s.minLength=c),typeof u=="number"&&(s.maxLength=u),d&&(s.format=ek[d]??d,s.format===""&&delete s.format,d==="time"&&delete s.format),m&&(s.contentEncoding=m),p&&p.size>0){const y=[...p];y.length===1?s.pattern=y[0].source:y.length>1&&(s.allOf=[...y.map(g=>({...o.target==="draft-07"||o.target==="draft-04"||o.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},nk=(e,o,a,i)=>{a.type="boolean"},ok=(e,o,a,i)=>{a.not={}},ak=(e,o,a,i)=>{},rk=(e,o,a,i)=>{const s=e._zod.def,c=z1(s.entries);c.every(u=>typeof u=="number")&&(a.type="number"),c.every(u=>typeof u=="string")&&(a.type="string"),a.enum=c},ik=(e,o,a,i)=>{if(o.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},lk=(e,o,a,i)=>{if(o.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},sk=(e,o,a,i)=>{const s=a,c=e._zod.def,{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(s.minItems=u),typeof d=="number"&&(s.maxItems=d),s.type="array",s.items=bt(c.element,o,{...i,path:[...i.path,"items"]})},ck=(e,o,a,i)=>{const s=a,c=e._zod.def;s.type="object",s.properties={};const u=c.shape;for(const m in u)s.properties[m]=bt(u[m],o,{...i,path:[...i.path,"properties",m]});const d=new Set(Object.keys(u)),p=new Set([...d].filter(m=>{const y=c.shape[m]._zod;return o.io==="input"?y.optin===void 0:y.optout===void 0}));p.size>0&&(s.required=Array.from(p)),c.catchall?._zod.def.type==="never"?s.additionalProperties=!1:c.catchall?c.catchall&&(s.additionalProperties=bt(c.catchall,o,{...i,path:[...i.path,"additionalProperties"]})):o.io==="output"&&(s.additionalProperties=!1)},uk=(e,o,a,i)=>{const s=e._zod.def,c=s.inclusive===!1,u=s.options.map((d,p)=>bt(d,o,{...i,path:[...i.path,c?"oneOf":"anyOf",p]}));c?a.oneOf=u:a.anyOf=u},fk=(e,o,a,i)=>{const s=e._zod.def,c=bt(s.left,o,{...i,path:[...i.path,"allOf",0]}),u=bt(s.right,o,{...i,path:[...i.path,"allOf",1]}),d=m=>"allOf"in m&&Object.keys(m).length===1,p=[...d(c)?c.allOf:[c],...d(u)?u.allOf:[u]];a.allOf=p},dk=(e,o,a,i)=>{const s=a,c=e._zod.def;s.type="object";const u=c.keyType,p=u._zod.bag?.patterns;if(c.mode==="loose"&&p&&p.size>0){const y=bt(c.valueType,o,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const g of p)s.patternProperties[g.source]=y}else(o.target==="draft-07"||o.target==="draft-2020-12")&&(s.propertyNames=bt(c.keyType,o,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=bt(c.valueType,o,{...i,path:[...i.path,"additionalProperties"]});const m=u._zod.values;if(m){const y=[...m].filter(g=>typeof g=="string"||typeof g=="number");y.length>0&&(s.required=y)}},hk=(e,o,a,i)=>{const s=e._zod.def,c=bt(s.innerType,o,i),u=o.seen.get(e);o.target==="openapi-3.0"?(u.ref=s.innerType,a.nullable=!0):a.anyOf=[c,{type:"null"}]},mk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType},pk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType,a.default=JSON.parse(JSON.stringify(s.defaultValue))},gk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType,o.io==="input"&&(a._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},yk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType;let u;try{u=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}a.default=u},vk=(e,o,a,i)=>{const s=e._zod.def,c=o.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;bt(c,o,i);const u=o.seen.get(e);u.ref=c},bk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType,a.readOnly=!0},G1=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType},xk=fe("ZodISODateTime",(e,o)=>{zA.init(e,o),ot.init(e,o)});function Sk(e){return kM(xk,e)}const wk=fe("ZodISODate",(e,o)=>{TA.init(e,o),ot.init(e,o)});function _k(e){return OM(wk,e)}const Ek=fe("ZodISOTime",(e,o)=>{AA.init(e,o),ot.init(e,o)});function Ck(e){return DM(Ek,e)}const Nk=fe("ZodISODuration",(e,o)=>{MA.init(e,o),ot.init(e,o)});function zk(e){return jM(Nk,e)}const Tk=(e,o)=>{k1.init(e,o),e.name="ZodError",Object.defineProperties(e,{format:{value:a=>wT(e,a)},flatten:{value:a=>ST(e,a)},addIssue:{value:a=>{e.issues.push(a),e.message=JSON.stringify(e.issues,kh,2)}},addIssues:{value:a=>{e.issues.push(...a),e.message=JSON.stringify(e.issues,kh,2)}},isEmpty:{get(){return e.issues.length===0}}})},gn=fe("ZodError",Tk,{Parent:Error}),Ak=um(gn),Mk=fm(gn),kk=mu(gn),Ok=pu(gn),Dk=CT(gn),jk=NT(gn),Rk=zT(gn),Lk=TT(gn),Hk=AT(gn),Uk=MT(gn),Zk=kT(gn),Bk=OT(gn),ft=fe("ZodType",(e,o)=>(ut.init(e,o),Object.assign(e["~standard"],{jsonSchema:{input:Jc(e,"input"),output:Jc(e,"output")}}),e.toJSONSchema=WM(e,{}),e.def=o,e.type=o.type,Object.defineProperty(e,"_def",{value:o}),e.check=(...a)=>e.clone(aa(o,{checks:[...o.checks??[],...a.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(a,i)=>ra(e,a,i),e.brand=()=>e,e.register=((a,i)=>(a.add(e,i),e)),e.parse=(a,i)=>Ak(e,a,i,{callee:e.parse}),e.safeParse=(a,i)=>kk(e,a,i),e.parseAsync=async(a,i)=>Mk(e,a,i,{callee:e.parseAsync}),e.safeParseAsync=async(a,i)=>Ok(e,a,i),e.spa=e.safeParseAsync,e.encode=(a,i)=>Dk(e,a,i),e.decode=(a,i)=>jk(e,a,i),e.encodeAsync=async(a,i)=>Rk(e,a,i),e.decodeAsync=async(a,i)=>Lk(e,a,i),e.safeEncode=(a,i)=>Hk(e,a,i),e.safeDecode=(a,i)=>Uk(e,a,i),e.safeEncodeAsync=async(a,i)=>Zk(e,a,i),e.safeDecodeAsync=async(a,i)=>Bk(e,a,i),e.refine=(a,i)=>e.check(OO(a,i)),e.superRefine=a=>e.check(DO(a)),e.overwrite=a=>e.check(li(a)),e.optional=()=>Uv(e),e.exactOptional=()=>bO(e),e.nullable=()=>Zv(e),e.nullish=()=>Uv(Zv(e)),e.nonoptional=a=>CO(e,a),e.array=()=>ho(e),e.or=a=>dO([e,a]),e.and=a=>mO(e,a),e.transform=a=>Bv(e,yO(a)),e.default=a=>wO(e,a),e.prefault=a=>EO(e,a),e.catch=a=>zO(e,a),e.pipe=a=>Bv(e,a),e.readonly=()=>MO(e),e.describe=a=>{const i=e.clone();return ul.add(i,{description:a}),i},Object.defineProperty(e,"description",{get(){return ul.get(e)?.description},configurable:!0}),e.meta=(...a)=>{if(a.length===0)return ul.get(e);const i=e.clone();return ul.add(i,a[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=a=>a(e),e)),I1=fe("_ZodString",(e,o)=>{dm.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(i,s,c)=>tk(e,i,s);const a=e._zod.bag;e.format=a.format??null,e.minLength=a.minimum??null,e.maxLength=a.maximum??null,e.regex=(...i)=>e.check(UM(...i)),e.includes=(...i)=>e.check($M(...i)),e.startsWith=(...i)=>e.check(VM(...i)),e.endsWith=(...i)=>e.check(YM(...i)),e.min=(...i)=>e.check(Kc(...i)),e.max=(...i)=>e.check(B1(...i)),e.length=(...i)=>e.check($1(...i)),e.nonempty=(...i)=>e.check(Kc(1,...i)),e.lowercase=i=>e.check(ZM(i)),e.uppercase=i=>e.check(BM(i)),e.trim=()=>e.check(GM()),e.normalize=(...i)=>e.check(qM(...i)),e.toLowerCase=()=>e.check(IM()),e.toUpperCase=()=>e.check(XM()),e.slugify=()=>e.check(PM())}),$k=fe("ZodString",(e,o)=>{dm.init(e,o),I1.init(e,o),e.email=a=>e.check(uM(Vk,a)),e.url=a=>e.check(pM(Yk,a)),e.jwt=a=>e.check(MM(aO,a)),e.emoji=a=>e.check(gM(qk,a)),e.guid=a=>e.check(Rv(Lv,a)),e.uuid=a=>e.check(fM(bc,a)),e.uuidv4=a=>e.check(dM(bc,a)),e.uuidv6=a=>e.check(hM(bc,a)),e.uuidv7=a=>e.check(mM(bc,a)),e.nanoid=a=>e.check(yM(Gk,a)),e.guid=a=>e.check(Rv(Lv,a)),e.cuid=a=>e.check(vM(Ik,a)),e.cuid2=a=>e.check(bM(Xk,a)),e.ulid=a=>e.check(xM(Pk,a)),e.base64=a=>e.check(zM(tO,a)),e.base64url=a=>e.check(TM(nO,a)),e.xid=a=>e.check(SM(Qk,a)),e.ksuid=a=>e.check(wM(Kk,a)),e.ipv4=a=>e.check(_M(Jk,a)),e.ipv6=a=>e.check(EM(Fk,a)),e.cidrv4=a=>e.check(CM(Wk,a)),e.cidrv6=a=>e.check(NM(eO,a)),e.e164=a=>e.check(AM(oO,a)),e.datetime=a=>e.check(Sk(a)),e.date=a=>e.check(_k(a)),e.time=a=>e.check(Ck(a)),e.duration=a=>e.check(zk(a))});function Ht(e){return cM($k,e)}const ot=fe("ZodStringFormat",(e,o)=>{nt.init(e,o),I1.init(e,o)}),Vk=fe("ZodEmail",(e,o)=>{vA.init(e,o),ot.init(e,o)}),Lv=fe("ZodGUID",(e,o)=>{gA.init(e,o),ot.init(e,o)}),bc=fe("ZodUUID",(e,o)=>{yA.init(e,o),ot.init(e,o)}),Yk=fe("ZodURL",(e,o)=>{bA.init(e,o),ot.init(e,o)}),qk=fe("ZodEmoji",(e,o)=>{xA.init(e,o),ot.init(e,o)}),Gk=fe("ZodNanoID",(e,o)=>{SA.init(e,o),ot.init(e,o)}),Ik=fe("ZodCUID",(e,o)=>{wA.init(e,o),ot.init(e,o)}),Xk=fe("ZodCUID2",(e,o)=>{_A.init(e,o),ot.init(e,o)}),Pk=fe("ZodULID",(e,o)=>{EA.init(e,o),ot.init(e,o)}),Qk=fe("ZodXID",(e,o)=>{CA.init(e,o),ot.init(e,o)}),Kk=fe("ZodKSUID",(e,o)=>{NA.init(e,o),ot.init(e,o)}),Jk=fe("ZodIPv4",(e,o)=>{kA.init(e,o),ot.init(e,o)}),Fk=fe("ZodIPv6",(e,o)=>{OA.init(e,o),ot.init(e,o)}),Wk=fe("ZodCIDRv4",(e,o)=>{DA.init(e,o),ot.init(e,o)}),eO=fe("ZodCIDRv6",(e,o)=>{jA.init(e,o),ot.init(e,o)}),tO=fe("ZodBase64",(e,o)=>{RA.init(e,o),ot.init(e,o)}),nO=fe("ZodBase64URL",(e,o)=>{HA.init(e,o),ot.init(e,o)}),oO=fe("ZodE164",(e,o)=>{UA.init(e,o),ot.init(e,o)}),aO=fe("ZodJWT",(e,o)=>{BA.init(e,o),ot.init(e,o)}),rO=fe("ZodBoolean",(e,o)=>{$A.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>nk(e,a,i)});function hm(e){return RM(rO,e)}const iO=fe("ZodUnknown",(e,o)=>{VA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>ak()});function Hv(){return LM(iO)}const lO=fe("ZodNever",(e,o)=>{YA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>ok(e,a,i)});function sO(e){return HM(lO,e)}const cO=fe("ZodArray",(e,o)=>{qA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>sk(e,a,i,s),e.element=o.element,e.min=(a,i)=>e.check(Kc(a,i)),e.nonempty=a=>e.check(Kc(1,a)),e.max=(a,i)=>e.check(B1(a,i)),e.length=(a,i)=>e.check($1(a,i)),e.unwrap=()=>e.element});function ho(e,o){return QM(cO,e,o)}const uO=fe("ZodObject",(e,o)=>{IA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>ck(e,a,i,s),Ie(e,"shape",()=>o.shape),e.keyof=()=>mm(Object.keys(e._zod.def.shape)),e.catchall=a=>e.clone({...e._zod.def,catchall:a}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Hv()}),e.loose=()=>e.clone({...e._zod.def,catchall:Hv()}),e.strict=()=>e.clone({...e._zod.def,catchall:sO()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=a=>gT(e,a),e.safeExtend=a=>yT(e,a),e.merge=a=>vT(e,a),e.pick=a=>mT(e,a),e.omit=a=>pT(e,a),e.partial=(...a)=>bT(X1,e,a[0]),e.required=(...a)=>xT(P1,e,a[0])});function ta(e,o){const a={type:"object",shape:e??{},...Ce(o)};return new uO(a)}const fO=fe("ZodUnion",(e,o)=>{XA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>uk(e,a,i,s),e.options=o.options});function dO(e,o){return new fO({type:"union",options:e,...Ce(o)})}const hO=fe("ZodIntersection",(e,o)=>{PA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>fk(e,a,i,s)});function mO(e,o){return new hO({type:"intersection",left:e,right:o})}const pO=fe("ZodRecord",(e,o)=>{QA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>dk(e,a,i,s),e.keyType=o.keyType,e.valueType=o.valueType});function ai(e,o,a){return new pO({type:"record",keyType:e,valueType:o,...Ce(a)})}const Dh=fe("ZodEnum",(e,o)=>{KA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(i,s,c)=>rk(e,i,s),e.enum=o.entries,e.options=Object.values(o.entries);const a=new Set(Object.keys(o.entries));e.extract=(i,s)=>{const c={};for(const u of i)if(a.has(u))c[u]=o.entries[u];else throw new Error(`Key ${u} not found in enum`);return new Dh({...o,checks:[],...Ce(s),entries:c})},e.exclude=(i,s)=>{const c={...o.entries};for(const u of i)if(a.has(u))delete c[u];else throw new Error(`Key ${u} not found in enum`);return new Dh({...o,checks:[],...Ce(s),entries:c})}});function mm(e,o){const a=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Dh({type:"enum",entries:a,...Ce(o)})}const gO=fe("ZodTransform",(e,o)=>{JA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>lk(e,a),e._zod.parse=(a,i)=>{if(i.direction==="backward")throw new C1(e.constructor.name);a.addIssue=c=>{if(typeof c=="string")a.issues.push(Cl(c,a.value,o));else{const u=c;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=a.value),u.inst??(u.inst=e),a.issues.push(Cl(u))}};const s=o.transform(a.value,a);return s instanceof Promise?s.then(c=>(a.value=c,a)):(a.value=s,a)}});function yO(e){return new gO({type:"transform",transform:e})}const X1=fe("ZodOptional",(e,o)=>{Z1.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>G1(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function Uv(e){return new X1({type:"optional",innerType:e})}const vO=fe("ZodExactOptional",(e,o)=>{FA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>G1(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function bO(e){return new vO({type:"optional",innerType:e})}const xO=fe("ZodNullable",(e,o)=>{WA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>hk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function Zv(e){return new xO({type:"nullable",innerType:e})}const SO=fe("ZodDefault",(e,o)=>{eM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>pk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wO(e,o){return new SO({type:"default",innerType:e,get defaultValue(){return typeof o=="function"?o():A1(o)}})}const _O=fe("ZodPrefault",(e,o)=>{tM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>gk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function EO(e,o){return new _O({type:"prefault",innerType:e,get defaultValue(){return typeof o=="function"?o():A1(o)}})}const P1=fe("ZodNonOptional",(e,o)=>{nM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>mk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function CO(e,o){return new P1({type:"nonoptional",innerType:e,...Ce(o)})}const NO=fe("ZodCatch",(e,o)=>{oM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>yk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zO(e,o){return new NO({type:"catch",innerType:e,catchValue:typeof o=="function"?o:()=>o})}const TO=fe("ZodPipe",(e,o)=>{aM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>vk(e,a,i,s),e.in=o.in,e.out=o.out});function Bv(e,o){return new TO({type:"pipe",in:e,out:o})}const AO=fe("ZodReadonly",(e,o)=>{rM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>bk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function MO(e){return new AO({type:"readonly",innerType:e})}const kO=fe("ZodCustom",(e,o)=>{iM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>ik(e,a)});function OO(e,o={}){return KM(kO,e,o)}function DO(e){return JM(e)}const $v={id:"claude-code",display:{name:"Claude Code",icon:"claude",color:"#D97706"},cli:{command:"claude",mcp:{add:["mcp","add-json"],remove:["mcp","remove"]}},paths:{mcp:"~/.claude.json",projectMcp:".claude/mcp.json",skills:"~/.claude/skills",projectSkills:".claude/skills/",globalMemory:"~/.claude/CLAUDE.md",projectMemory:"CLAUDE.md",agents:"~/.claude/agents/",projectAgents:".claude/agents/",rules:null,hooks:"~/.claude/settings.json",commands:null,backupDirs:["~/.claude","~/"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","agents","hooks"],enabled:!0,memoryMaxLines:200},Vv={id:"codex",display:{name:"Codex CLI",icon:"openai",color:"#10A37F"},cli:{command:"codex",mcp:{add:["mcp","add"],remove:["mcp","remove"]}},paths:{mcp:"~/.codex/config.toml",projectMcp:null,skills:"~/.codex/skills",projectSkills:null,globalMemory:"~/.codex/AGENTS.md",projectMemory:"AGENTS.md",agents:null,projectAgents:null,rules:".codex/rules/",hooks:"~/.codex/config.toml",commands:null,backupDirs:["~/.codex"]},mcp:{format:"toml",key:"mcp.servers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","rules","hooks"],enabled:!0,memoryMaxLines:null},Yv={id:"gemini-cli",display:{name:"Gemini CLI",icon:"gemini",color:"#4285F4"},cli:{command:"gemini",mcp:{add:["mcp","add"],remove:["mcp","remove"],enable:["mcp","enable"],disable:["mcp","disable"]}},paths:{mcp:"~/.gemini/settings.json",projectMcp:null,skills:"~/.gemini/extensions",projectSkills:null,globalMemory:"~/.gemini/GEMINI.md",projectMemory:"GEMINI.md",agents:null,projectAgents:null,rules:null,hooks:"~/.gemini/settings.json",commands:null,backupDirs:["~/.gemini"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","hooks"],enabled:!0,memoryMaxLines:null},qv={id:"opencode",display:{name:"OpenCode",icon:"opencode",color:"#6366F1"},cli:null,paths:{mcp:"~/.config/opencode/opencode.json",projectMcp:null,skills:"~/.config/opencode/plugin",projectSkills:null,globalMemory:"~/.opencode/context.md",projectMemory:null,agents:"~/.config/opencode/agents/",projectAgents:".opencode/agents/",rules:null,hooks:"~/.config/opencode/settings.json",commands:"~/.config/opencode/commands/",backupDirs:["~/.config/opencode"]},mcp:{format:"json",key:"mcp",entryShape:"opencode"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","agents","hooks","commands"],enabled:!0,memoryMaxLines:null},Gv={id:"openclaw",display:{name:"OpenClaw",icon:"openclaw",color:"#EC4899"},cli:null,paths:{mcp:"~/.openclaw/openclaw.json",projectMcp:null,skills:"~/.openclaw/skills",projectSkills:null,globalMemory:"~/.openclaw/MEMORY.md",projectMemory:null,agents:null,projectAgents:null,rules:null,hooks:"~/.openclaw/hooks/",commands:null,backupDirs:["~/.openclaw"]},mcp:{format:"json",key:"plugins.entries",entryShape:"openclaw"},scopes:["shared","personal"],capabilities:["mcp","skills","memory","hooks"],enabled:!0,memoryMaxLines:null},Iv={id:"aider",display:{name:"Aider",icon:"aider",color:"#22C55E"},cli:null,paths:{mcp:"~/.aider/mcp-servers.json",projectMcp:null,skills:"~/.aider/plugins",projectSkills:null,globalMemory:"~/.aider/MEMORY.md",projectMemory:null,agents:null,projectAgents:null,rules:"CONVENTIONS.md",hooks:null,commands:null,backupDirs:["~/.aider"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","rules"],enabled:!0,memoryMaxLines:null},Xv={id:"cursor",display:{name:"Cursor",icon:"cursor",color:"#00D4AA"},cli:{command:"cursor"},paths:{mcp:"~/.cursor/mcp.json",projectMcp:".cursor/mcp.json",skills:null,projectSkills:null,globalMemory:null,projectMemory:".cursorrules",agents:null,projectAgents:".cursor/agents/",rules:".cursor/rules/",hooks:".cursor/hooks.json",commands:".cursor/commands/",backupDirs:["~/.cursor"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","memory","rules","agents","hooks","commands"],enabled:!0,memoryMaxLines:null},Pv={id:"vscode",display:{name:"VS Code",icon:"vscode",color:"#007ACC"},cli:{command:"code"},paths:{mcp:{darwin:"~/Library/Application Support/Code/User/mcp.json",linux:"~/.config/Code/User/mcp.json",win32:"%APPDATA%/Code/User/mcp.json"},projectMcp:".vscode/mcp.json",skills:null,projectSkills:".github/skills/",globalMemory:null,projectMemory:".github/copilot-instructions.md",agents:null,projectAgents:".github/agents/",rules:".github/instructions/",hooks:null,commands:null,backupDirs:[]},mcp:{format:"jsonc",key:"servers",entryShape:"vscode"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","agents","rules"],enabled:!0,memoryMaxLines:null},Qv={id:"antigravity",display:{name:"Antigravity",icon:"antigravity",color:"#FF6B35"},cli:{command:"agy"},paths:{mcp:"~/.gemini/antigravity/mcp_config.json",projectMcp:null,skills:"~/.gemini/antigravity/skills/",projectSkills:".agent/skills/",globalMemory:"~/.gemini/antigravity/rules.md",projectMemory:".antigravity/rules.md",agents:null,projectAgents:".agent/",rules:null,hooks:null,commands:null,backupDirs:["~/.gemini/antigravity"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","agents"],enabled:!0,memoryMaxLines:null},pm={[$v.id]:$v,[Vv.id]:Vv,[Yv.id]:Yv,[qv.id]:qv,[Gv.id]:Gv,[Iv.id]:Iv,[Xv.id]:Xv,[Pv.id]:Pv,[Qv.id]:Qv},jO=Object.keys(pm),RO=jO,Va=mm(RO),Q1=ta({command:Ht(),args:ho(Ht()).optional(),env:ai(Ht(),Ht()).optional(),enabled:hm().optional().default(!0),tools:ho(Va).optional(),excludeTools:ho(Va).optional()});ta({mcps:ai(Ht(),Q1)});const LO=ta({name:Ht(),description:Ht().optional(),version:Ht().optional(),author:Ht().optional(),tools:ho(Va).optional(),excludeTools:ho(Va).optional(),enabled:hm().optional().default(!0)}),HO=mm(["shared","coding","personal"]),UO=ta({syncTo:ho(Va),excludeFrom:ho(Va).optional(),path:Ht(),files:ho(Ht())}),K1=ta({scopes:ai(HO,UO)});ta({version:Ht(),tools:ai(Va,ta({enabled:hm()})),memory:K1});ta({hostname:Ht(),mcps:ai(Ht(),Q1.partial()).optional(),skills:ai(Ht(),LO.partial()).optional(),memory:K1.partial().optional()});function ZO({svg:e,size:o=16}){const a=e.replace(/<svg\b/,`<svg width="${o}" height="${o}"`);return x.jsx("span",{dangerouslySetInnerHTML:{__html:a},style:{display:"inline-flex",lineHeight:0}})}const BO={claude:tT,openai:nT,gemini:oT,opencode:aT,openclaw:rT,aider:iT,cursor:lT,vscode:sT,antigravity:cT},$O=Object.fromEntries(Object.values(pm).map(e=>[e.display.name,x.jsx(ZO,{svg:BO[e.display.icon]??""})]));function gm({status:e}){const o={synced:"bg-green-500 shadow-green-500/50",pending:"bg-yellow-500 shadow-yellow-500/50",error:"bg-red-500 shadow-red-500/50",disabled:"bg-gray-500",not_installed:"bg-gray-700 border border-gray-500"};return x.jsx("span",{"data-testid":`node-status-${e}`,className:Le("inline-block w-2.5 h-2.5 rounded-full shadow-sm",o[e])})}function VO({data:e,sourcePosition:o,targetPosition:a}){const i=e.installed!==!1;return x.jsxs("div",{className:Le("px-4 py-3 rounded-lg border-2 bg-card shadow-lg min-w-[130px] transition-colors",i?"border-primary/60 hover:border-primary":"border-gray-600 opacity-50"),children:[x.jsx(pn,{type:"target",position:a??he.Top,className:"!bg-primary !w-3 !h-3"}),x.jsxs("div",{className:"flex items-center gap-2",children:[$O[e.name]??null,x.jsx(gm,{status:i?e.status:"not_installed"}),x.jsx("span",{className:Le("font-medium text-sm",!i&&"text-gray-500"),children:e.name})]}),!i&&x.jsx("div",{className:"text-[10px] text-gray-500 mt-1",children:"Not installed"}),x.jsx(pn,{type:"source",position:o??he.Bottom,className:"!bg-primary !w-3 !h-3"})]})}const YO=N.memo(VO);function qO({data:e,sourcePosition:o,targetPosition:a}){const i=e.enabled!==!1,s={skill:{border:"border-blue-500/60",bg:"bg-[#0c1529]"},mcp:{border:"border-purple-500/60",bg:"bg-[#150c29]"},memory:{border:"border-amber-500/60",bg:"bg-[#1a1408]"}},c=s[e.type]||s.skill;return x.jsxs("div",{className:Le("px-3 py-2 rounded-md border shadow-md min-w-[110px] transition-colors hover:border-white/40",c.border,c.bg,!i&&"opacity-50"),children:[x.jsx(pn,{type:"target",position:a??he.Top,className:"!bg-muted !w-2 !h-2"}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(gm,{status:i?e.status:"disabled"}),x.jsx("span",{className:"text-sm font-medium truncate max-w-[100px]",children:e.name}),x.jsx("button",{role:"switch","aria-checked":i,"aria-label":`Toggle ${e.name}`,onClick:u=>{u.stopPropagation(),e.onToggle?.(e.type,e.name,!i)},className:Le("ml-auto relative inline-flex h-4 w-7 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors",i?"bg-primary":"bg-muted"),children:x.jsx("span",{className:Le("pointer-events-none inline-block h-3 w-3 rounded-full bg-white shadow-sm transition-transform",i?"translate-x-3":"translate-x-0")})})]}),x.jsx("div",{className:"text-[10px] text-muted-foreground mt-0.5 uppercase tracking-wider",children:e.type}),x.jsx(pn,{type:"source",position:o??he.Bottom,className:"!bg-muted !w-2 !h-2"})]})}const GO=N.memo(qO);const J1=(...e)=>e.filter((o,a,i)=>!!o&&o.trim()!==""&&i.indexOf(o)===a).join(" ").trim();const IO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const XO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,a,i)=>i?i.toUpperCase():a.toLowerCase());const Kv=e=>{const o=XO(e);return o.charAt(0).toUpperCase()+o.slice(1)};var PO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const QO=e=>{for(const o in e)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};const KO=N.forwardRef(({color:e="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:s="",children:c,iconNode:u,...d},p)=>N.createElement("svg",{ref:p,...PO,width:o,height:o,stroke:e,strokeWidth:i?Number(a)*24/Number(o):a,className:J1("lucide",s),...!c&&!QO(d)&&{"aria-hidden":"true"},...d},[...u.map(([m,y])=>N.createElement(m,y)),...Array.isArray(c)?c:[c]]));const Ll=(e,o)=>{const a=N.forwardRef(({className:i,...s},c)=>N.createElement(KO,{ref:c,iconNode:o,className:J1(`lucide-${IO(Kv(e))}`,`lucide-${e}`,i),...s}));return a.displayName=Kv(e),a};const JO=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],F1=Ll("bot",JO);const FO=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],W1=Ll("library",FO);const WO=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],eS=Ll("sparkles",WO);const e6=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],tS=Ll("terminal",e6);const t6=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],nS=Ll("webhook",t6);function n6({data:e,sourcePosition:o,targetPosition:a}){const i=e.enabled!==!1;return x.jsxs("div",{className:Le("px-3 py-2 rounded-md border shadow-md min-w-[110px] transition-colors hover:border-white/40 cursor-pointer","border-teal-500/60","bg-[#081a1a]",!i&&"opacity-50"),onClick:()=>e.onClick?.(e.name),children:[x.jsx(pn,{type:"target",position:a??he.Top,className:"!bg-muted !w-2 !h-2"}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(gm,{status:i?"synced":"disabled"}),x.jsx("span",{className:"text-sm font-medium truncate max-w-[120px]",children:e.name}),x.jsx("button",{role:"switch","aria-checked":i,"aria-label":`Toggle ${e.name}`,onClick:s=>{s.stopPropagation(),e.onToggle?.(e.name,!i)},className:Le("ml-auto relative inline-flex h-4 w-7 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors",i?"bg-primary":"bg-muted"),children:x.jsx("span",{className:Le("pointer-events-none inline-block h-3 w-3 rounded-full bg-white shadow-sm transition-transform",i?"translate-x-3":"translate-x-0")})})]}),x.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5 text-[10px] text-muted-foreground",children:[e.skillCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Skills",children:[x.jsx(eS,{size:10,className:"text-purple-400"}),e.skillCount]}),e.agentCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Agents",children:[x.jsx(F1,{size:10,className:"text-emerald-400"}),e.agentCount]}),e.commandCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Commands",children:[x.jsx(tS,{size:10,className:"text-blue-400"}),e.commandCount]}),e.hookCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Hooks",children:[x.jsx(nS,{size:10,className:"text-amber-400"}),e.hookCount]}),e.libCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Libraries",children:[x.jsx(W1,{size:10,className:"text-pink-400"}),e.libCount]})]}),x.jsx(pn,{type:"source",position:o??he.Bottom,className:"!bg-muted !w-2 !h-2"})]})}const o6=N.memo(n6);function a6({data:e,sourcePosition:o,targetPosition:a}){return x.jsxs("div",{className:"px-4 py-3 rounded-lg border-2 border-dashed border-muted-foreground/40 bg-card/50 shadow-md min-w-[130px] cursor-pointer hover:border-primary/60 hover:bg-card transition-colors",onClick:()=>e.onClick?.(),children:[x.jsx(pn,{type:"target",position:a??he.Top,className:"!bg-muted !w-3 !h-3"}),x.jsxs("div",{className:"flex items-center gap-2 justify-center",children:[x.jsx("span",{className:"text-lg text-muted-foreground",children:"+"}),x.jsx("span",{className:"font-medium text-sm text-muted-foreground",children:"Add Tool"})]}),x.jsx(pn,{type:"source",position:o??he.Bottom,className:"!bg-muted !w-3 !h-3"})]})}const r6=N.memo(a6),Ya={tool:{width:160,height:60},addTool:{width:160,height:60},resource:{width:170,height:58},plugin:{width:180,height:68}},na={width:160,height:55},jn={skill:"#3b82f6",mcp:"#a855f7",memory:"#f59e0b",plugin:"#14b8a6",custom:"#6b7280",disabled:"#ef4444"},il={synced:"#22c55e",pending:"#eab308",error:"#ef4444",not_installed:"#374151",fallback:"#6b7280"},ml={strokeWidth:1.5,disabledDashArray:"5,5",disabledOpacity:.4},Ma={strokeDasharray:"6,4",opacity:.55,fontSize:13,labelBgOpacity:.9,labelBgRadius:8,labelPadding:[5,5]},mn={horizontalSpacing:180,addToolSpacing:160,layers:{top:0,middle:200,bottom:400}},Jv={color:"#333",gap:20},Fv="smoothstep",jh="DOWN",Hr={layout:"mycelium:graph:layout",edgeType:"mycelium:graph:edgeType",radialMode:"mycelium:graph:radialMode"},Rh="sectors";function xc(e,o){const a=new Map;for(const g of e)g.installed&&a.set(g.toolId,{id:g.toolId,name:g.toolName,installed:!0});const i=Array.from(a.values()).map(g=>({id:g.id,name:g.name,status:o.tools[g.id]!==!1?"synced":"disabled",installed:!0})),s=new Map,c=[];for(const g of e)for(const v of g.skills)if(v.marketplace&&v.pluginName){const S=`${v.marketplace}/${v.pluginName}`,w=s.get(S);w?w.skills.includes(v.name)||w.skills.push(v.name):s.set(S,{marketplace:v.marketplace,skills:[v.name],enabled:o.skills[v.name]!==!1})}else c.push({name:v.name,status:"pending",enabled:o.skills[v.name]!==!1,connectedTools:[g.toolId]});const u=Array.from(s.entries()).map(([g,v])=>({name:g.split("/")[1]||g,marketplace:v.marketplace,componentCount:v.skills.length,enabled:v.skills.some(w=>o.skills[w]!==!1),skills:v.skills})),d=new Set,p=[];for(const g of e)for(const v of g.mcps)d.has(v.name)||(d.add(v.name),p.push({name:v.name,status:"pending",enabled:o.mcps[v.name]!==!1,connectedTools:[g.toolId]}));const m=new Set,y=[];for(const g of e)for(const v of g.memory)m.has(v.name)||(m.add(v.name),y.push({name:v.name,scope:"shared",status:"pending"}));return{tools:i,skills:c,mcps:p,memory:y,plugins:u}}const i6=Object.values(pm).map(e=>({id:e.id,name:e.display.name,status:"synced",installed:!0}));function Sc(e,o){return{stroke:e,strokeWidth:ml.strokeWidth,...o?{}:{strokeDasharray:ml.disabledDashArray,opacity:ml.disabledOpacity}}}function l6(e,o,a,i){const s=[],c=[],u=e?.tools||i6,d=a?u:u.filter(m=>m.installed!==!1);d.forEach((m,y)=>{s.push({id:`tool-${m.id}`,type:"tool",position:{x:y*mn.horizontalSpacing,y:mn.layers.middle},data:{name:m.name,status:m.status,installed:m.installed,__elkLayer:"NONE"}})});const p=new Set;return e?.plugins?.forEach(m=>{m.skills.forEach(y=>p.add(y))}),e?.plugins?.forEach((m,y)=>{const g=`plugin-${m.name}`;s.push({id:g,type:"plugin",position:{x:y*mn.horizontalSpacing,y:mn.layers.top},data:{__elkLayer:"FIRST",name:m.name,marketplace:m.marketplace,componentCount:m.componentCount,skillCount:m.skills?.length??0,agentCount:m.agents?.length??0,commandCount:m.commands?.length??0,hookCount:m.hooks?.length??0,libCount:m.libs?.length??0,enabled:m.enabled,onToggle:(v,S)=>i.onPluginToggle?.(v,S),onClick:v=>i.onPluginClick?.(v)}}),d.filter(v=>v.installed).forEach(v=>{c.push({id:`${g}-to-tool-${v.id}`,source:g,target:`tool-${v.id}`,animated:m.enabled,style:Sc(jn.plugin,m.enabled)})})}),e?.skills.forEach((m,y)=>{if(p.has(m.name))return;const g=`skill-${m.name}`;s.push({id:g,type:"resource",position:{x:y*mn.horizontalSpacing,y:mn.layers.top},data:{name:m.name,type:"skill",status:m.status,enabled:m.enabled,onToggle:i.handleToggle,__elkLayer:"FIRST"}});const v=m.enabled!==!1;(m.connectedTools||d.filter(w=>w.installed).map(w=>w.id)).forEach(w=>{d.some(_=>_.id===w)&&c.push({id:`${g}-to-${w}`,source:g,target:`tool-${w}`,animated:v&&m.status==="synced",style:Sc(jn.skill,v)})})}),e?.mcps.forEach((m,y)=>{const g=`mcp-${m.name}`;s.push({id:g,type:"resource",position:{x:y*mn.horizontalSpacing,y:mn.layers.bottom},data:{name:m.name,type:"mcp",status:m.status,enabled:m.enabled,onToggle:i.handleToggle}});const v=m.enabled!==!1;(m.connectedTools||d.filter(w=>w.installed).map(w=>w.id)).forEach(w=>{d.some(_=>_.id===w)&&c.push({id:`tool-${w}-to-${g}`,source:`tool-${w}`,target:g,animated:v&&m.status==="synced",style:Sc(jn.mcp,v)})})}),e?.memory.forEach((m,y)=>{const g=`memory-${m.name}`;s.push({id:g,type:"resource",position:{x:y*mn.horizontalSpacing,y:mn.layers.bottom},data:{name:m.name,type:"memory",status:m.status,onToggle:i.handleToggle,__elkLayer:"LAST"}});let v;m.scope==="personal"?v=["openclaw"]:m.scope==="coding"?v=d.filter(S=>S.id!=="openclaw"&&S.installed).map(S=>S.id):v=d.filter(S=>S.installed).map(S=>S.id),v.forEach(S=>{d.some(w=>w.id===S)&&c.push({id:`tool-${S}-to-${g}`,source:`tool-${S}`,target:g,animated:m.status==="synced",style:Sc(jn.memory,!0)})})}),o==="migrate"&&s.push({id:"add-tool",type:"addTool",position:{x:d.length*mn.addToolSpacing,y:mn.layers.top},data:{onClick:i.onAddTool}}),{initialNodes:s,initialEdges:c}}function Lh(e){return e.type==="tool"||e.type==="addTool"?"tool":e.type==="plugin"?"plugin":e.data?.type==="skill"?"skill":e.data?.type==="mcp"?"mcp":e.data?.type==="memory"?"memory":"other"}const s6=["plugin","skill","tool","mcp","memory"];function yu(e){const o=new Map;for(const a of s6)o.set(a,[]);for(const a of e){const i=Lh(a);o.has(i)||o.set(i,[]),o.get(i).push(a)}return o}function c6(e,o,a){const i=a==="RIGHT",s=yu(e),c=30,u=120,d=[],p=[[...s.get("plugin")??[],...s.get("skill")??[]],s.get("tool")??[],s.get("mcp")??[],s.get("memory")??[]].filter(w=>w.length>0),m=w=>{const _=w.measured;return _?.width&&_?.height?{width:_.width,height:_.height}:Ya[w.type||""]||na},y=p.map(w=>w.reduce((_,T)=>{const z=m(T);return _+(i?z.height:z.width)},0)),g=p.map((w,_)=>y[_]+(w.length-1)*c),v=Math.max(...g);let S=0;for(let w=0;w<p.length;w++){const _=p[w],T=g[w],z=(v-T)/2;let H=0,E=z;for(const M of _){const R=m(M),D=i?R.width:R.height,O=i?R.height:R.width;H=Math.max(H,D),d.push({...M,zIndex:10,position:i?{x:S,y:E}:{x:E,y:S},sourcePosition:i?he.Right:he.Bottom,targetPosition:i?he.Left:he.Top}),E+=O+c}S+=H+u}return{nodes:d,edges:o}}function oS(e){const o=new Map;return e.forEach((a,i)=>{o.set(a.id,i/e.length*2*Math.PI-Math.PI/2)}),o}function aS(e,o){const a=new Map;for(const i of e){if(o.has(i.source)){const s=a.get(i.target)??[];s.push(i.source),a.set(i.target,s)}if(o.has(i.target)){const s=a.get(i.source)??[];s.push(i.target),a.set(i.source,s)}}return a}function Fc(e,o,a){const i=o.get(e.id)??[];if(i.length===0)return Math.PI;const s=i.map(d=>a.get(d)??0),c=s.reduce((d,p)=>d+Math.sin(p),0),u=s.reduce((d,p)=>d+Math.cos(p),0);return Math.atan2(c/s.length,u/s.length)}function Wc(e,o,a,i,s){const c=Ya[e.type||""]?.width??na.width,u=Ya[e.type||""]?.height??na.height;return{...e,zIndex:10,position:{x:o+i*Math.cos(s)-c/2,y:a+i*Math.sin(s)-u/2},sourcePosition:he.Bottom,targetPosition:he.Top}}function u6(e,o,a=40,i=30,s=50){const c=s/100,u=[];let d=o;for(const p of e){if(p.length===0){u.push(d);continue}const m=Math.max(...p.map(w=>Ya[w.type||""]?.width??na.width)),y=Math.max(...p.map(w=>Ya[w.type||""]?.height??na.height)),g=p.length*(m+i)/(2*Math.PI)*c,v=d+Math.max(m,y)*c+a,S=Math.max(g,v);u.push(S),d=S}return u}function f6(e,o,a=60,i=150,s=50){const c=yu(e),u=c.get("tool")??[],d=u.length<=1?0:i,p=oS(u),m=aS(o,p),y=[[...c.get("plugin")??[],...c.get("skill")??[]],c.get("mcp")??[],c.get("memory")??[]],g=u6(y,d,a,a/2,s),v=Math.max(d,...g),S=v+200,w=v+200,_=[];for(const T of u)_.push(Wc(T,S,w,d,p.get(T.id)));for(let T=0;T<y.length;T++){if(y[T].length===0)continue;const z=[...y[T]].sort((H,E)=>Fc(H,m,p)-Fc(E,m,p));z.forEach((H,E)=>{_.push(Wc(H,S,w,g[T],E/z.length*2*Math.PI-Math.PI/2))})}return{nodes:_,edges:o}}function d6(e,o,a=60,i=150,s=50){const c=yu(e),u=c.get("tool")??[],d=oS(u),p=aS(o,d),m=u.length<=1?0:i,y=[{cat:["plugin"],centerAngle:-Math.PI*3/4,label:"Plugins (top-left)"},{cat:["memory"],centerAngle:-Math.PI/4,label:"Memory (top-right)"},{cat:["skill"],centerAngle:Math.PI*3/4,label:"Skills (bottom-left)"},{cat:["mcp"],centerAngle:Math.PI/4,label:"MCPs (bottom-right)"}],g=Math.PI/2,v=g*.42,S=[];for(const I of y){const W=[];for(const L of I.cat)W.push(...c.get(L)??[]);S.push(W)}const w=6,_=40,T=na.width,z=Math.max(...S.map(I=>I.length),1),H=Math.min(w,z),E=s/100,M=H*(T+_)/g*E,R=Math.max(m+a,M),D=a+40,O=Math.max(...S.map(I=>Math.ceil(I.length/w)),1),Z=R+O*D+100,$=Z+200,oe=Z+200,q=[];for(const I of u)q.push(Wc(I,$,oe,m,d.get(I.id)));for(let I=0;I<y.length;I++){const W=y[I],L=S[I];if(L.length===0)continue;const Y=[...L].sort((U,j)=>Fc(U,p,d)-Fc(j,p,d)),A=Math.ceil(Y.length/w);for(let U=0;U<A;U++){const j=Y.slice(U*w,(U+1)*w),Q=R+U*D;j.forEach((re,k)=>{const V=j.length<=1?0:(k/(j.length-1)-.5)*2*v;q.push(Wc(re,$,oe,Q,W.centerAngle+V))})}}return{nodes:q,edges:o}}function h6(e,o,a=60,i=150,s=50){const d=(yu(e).get("tool")??[]).length<=1?0:i,p=a*(1+s/50),m={tool:d,plugin:d+p,skill:d+p,mcp:d+p*2,memory:d+p*3},y=d+p*3+200,g=y+200,v=y+200,S=[...e],w=new Map,_=[],T=new Map,z=new Map;for(const R of S){const D=Lh(R),O=m[D]??d+300,Z=T.get(O)??0;T.set(O,Z+1)}for(const[R]of T)z.set(R,0);for(const R of S){const D=Lh(R),O=m[D]??d+300,Z=T.get(O)??1,$=z.get(O)??0;z.set(O,$+1);const oe=$/Z*2*Math.PI-Math.PI/2;w.set(R.id,_.length),_.push({node:R,x:g+O*Math.cos(oe),y:v+O*Math.sin(oe),vx:0,vy:0,targetR:O,fixed:D==="tool"})}const H=80,E=.3;for(let R=0;R<H;R++){const D=1-R/H;for(const O of o){const Z=w.get(O.source),$=w.get(O.target);if(Z===void 0||$===void 0)continue;const oe=_[Z],q=_[$],I=q.x-oe.x,W=q.y-oe.y,L=Math.sqrt(I*I+W*W)||1,Y=Math.abs(oe.targetR-q.targetR)*.8+100,A=(L-Y)/L*.02*D;oe.fixed||(oe.vx+=I*A,oe.vy+=W*A),q.fixed||(q.vx-=I*A,q.vy-=W*A)}for(let O=0;O<_.length;O++)if(!_[O].fixed)for(let Z=O+1;Z<_.length;Z++){const $=_[Z].x-_[O].x,oe=_[Z].y-_[O].y,q=Math.sqrt($*$+oe*oe)||1,I=200;if(q<I){const W=(I-q)/q*.25*D;_[O].fixed||(_[O].vx-=$*W,_[O].vy-=oe*W),_[Z].fixed||(_[Z].vx+=$*W,_[Z].vy+=oe*W)}}for(const O of _){if(O.fixed)continue;O.x+=O.vx*E,O.y+=O.vy*E,O.vx*=.7,O.vy*=.7;const Z=O.x-g,$=O.y-v,oe=Math.sqrt(Z*Z+$*$)||1,q=Math.atan2($,Z),I=oe+(O.targetR-oe)*.3;O.x=g+I*Math.cos(q),O.y=v+I*Math.sin(q)}}return{nodes:_.map(R=>{const D=Ya[R.node.type||""]?.width??na.width,O=Ya[R.node.type||""]?.height??na.height;return{...R.node,zIndex:10,position:{x:R.x-D/2,y:R.y-O/2},sourcePosition:he.Bottom,targetPosition:he.Top}}),edges:o}}function m6(e,o,a="hybrid",i=60,s=150,c=50){switch(a){case"sectors":return d6(e,o,i,s,c);case"force":return h6(e,o,i,s,c);default:return f6(e,o,i,s,c)}}async function wc(e,o,a=jh,i=Rh,s=60,c=150,u=50){return a==="RADIAL"?m6(e,o,i,s,c,u):c6(e,o,a)}const p6={tool:YO,resource:GO,plugin:o6,addTool:r6};function rS({data:e,mode:o="dashboard",onNodeClick:a,onToggle:i,onPluginToggle:s,onPluginClick:c,onMcpClick:u,onSkillClick:d,onAddTool:p,onEdgeToggle:m,disabledEdges:y,showUninstalledTools:g=!1}){const[v,S,w]=_4([]),[_,T,z]=E4([]),H=N.useRef(null),[E,M]=N.useState(()=>{try{return localStorage.getItem(Hr.layout)||jh}catch{return jh}}),[R,D]=N.useState(()=>{try{return localStorage.getItem(Hr.edgeType)||Fv}catch{return Fv}}),[O,Z]=N.useState(()=>{try{return localStorage.getItem(Hr.radialMode)||Rh}catch{return Rh}}),[$,oe]=N.useState(60),[q,I]=N.useState(150),[W,L]=N.useState(50),Y=N.useMemo(()=>{try{return new URLSearchParams(window.location.search).has("debug")}catch{return!1}},[]),A=N.useCallback(me=>{M(me);try{localStorage.setItem(Hr.layout,me)}catch{}},[]),U=N.useCallback(me=>{D(me);try{localStorage.setItem(Hr.edgeType,me)}catch{}},[]),j=N.useCallback(me=>{Z(me);try{localStorage.setItem(Hr.radialMode,me)}catch{}},[]),[Q,re]=N.useState(new Set),k=y??Q,V=N.useRef(i);V.current=i;const F=N.useRef(s);F.current=s;const ee=N.useRef(c);ee.current=c;const P=N.useRef(p);P.current=p;const se=N.useCallback((me,ze,it)=>{V.current?.({type:me,name:ze,enabled:it})},[]),ne=N.useMemo(()=>({handleToggle:se,onToggle:me=>V.current?.(me),onPluginToggle:(me,ze)=>F.current?.(me,ze),onPluginClick:me=>ee.current?.(me),onAddTool:()=>P.current?.()}),[se]),{initialNodes:le,initialEdges:de}=N.useMemo(()=>l6(e,o,g,ne),[e,o,g,ne]),Ee=N.useMemo(()=>_.map(me=>k.has(me.id)?{...me,animated:!1,interactionWidth:30,style:{stroke:jn.disabled,strokeWidth:ml.strokeWidth,strokeDasharray:Ma.strokeDasharray,opacity:Ma.opacity},label:"✕",labelStyle:{fill:jn.disabled,fontSize:Ma.fontSize,fontWeight:700,cursor:"pointer"},labelBgStyle:{fill:"#1a1a1a",fillOpacity:Ma.labelBgOpacity,rx:Ma.labelBgRadius,ry:Ma.labelBgRadius},labelBgPadding:Ma.labelPadding}:{...me,type:R,interactionWidth:30}),[_,k,R]),we=N.useRef(!1),ve=N.useRef(!1);N.useEffect(()=>{le.length>0&&(ve.current=!1,wc(le,de,E,O,$,q,W).then(({nodes:me,edges:ze})=>{S(me),T(ze),we.current||(we.current=!0,setTimeout(()=>H.current?.(),50))}))},[le,de,E,O,$,q,W,S,T]);const _e=N4();N.useEffect(()=>{_e&&v.length>0&&!ve.current&&(ve.current=!0,wc(v,_,E,O,$,q,W).then(({nodes:me,edges:ze})=>{S(me),T(ze)}))},[_e]);const Me=N.useCallback(me=>{A(me),wc(v,_,me,O,$,q,W).then(({nodes:ze,edges:it})=>{S(ze),T(it),setTimeout(()=>H.current?.(),50)})},[v,_,O,$,q,W,S,T,A]),Ye=N.useCallback(me=>{j(me),wc(v,_,"RADIAL",me,$,q,W).then(({nodes:ze,edges:it})=>{S(ze),T(it),setTimeout(()=>H.current?.(),50)})},[v,_,$,q,W,S,T,j]),$e=N.useCallback(()=>{},[]),dt=N.useCallback(me=>{T(ze=>Mx({...me,animated:!0,style:{stroke:jn.custom,strokeWidth:ml.strokeWidth}},ze))},[T]),Qt=N.useCallback((me,ze)=>{const it=k.has(ze.id);m?m(ze.id,it):re(Bn=>{const lt=new Set(Bn);return it?lt.delete(ze.id):lt.add(ze.id),lt})},[k,m]),Ot=N.useCallback((me,ze)=>{if(a?.(ze),ze.type==="plugin")ee.current?.(ze.data.name);else if(ze.type==="resource"){const it=ze.data;it.type==="mcp"?u?.(it.name):it.type==="skill"&&d?.(it.name)}},[a,u,d]);return x.jsx("div",{"data-testid":"react-flow-graph",className:"w-full h-full",children:x.jsxs(w4,{nodes:v,edges:Ee,onNodesChange:w,onEdgesChange:z,nodeTypes:p6,onNodeClick:Ot,onNodeDragStop:$e,onEdgeClick:Qt,onConnect:dt,onInit:me=>{H.current=()=>me.fitView({padding:.2,duration:300})},fitView:!0,minZoom:.3,maxZoom:2,defaultViewport:{x:0,y:0,zoom:.8},children:[x.jsxs(Rl,{position:"top-right",className:"flex gap-2",children:[x.jsx("button",{onClick:()=>Me("DOWN"),className:Le("px-3 py-1.5 rounded text-xs font-medium transition-colors",E==="DOWN"?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:"Vertical"}),x.jsx("button",{onClick:()=>Me("RIGHT"),className:Le("px-3 py-1.5 rounded text-xs font-medium transition-colors",E==="RIGHT"?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:"Horizontal"}),x.jsx("button",{onClick:()=>Me("RADIAL"),className:Le("px-3 py-1.5 rounded text-xs font-medium transition-colors",E==="RADIAL"?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:"Radial"}),E==="RADIAL"&&Y&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"mx-1 text-muted-foreground/40",children:"|"}),["hybrid","sectors","force"].map(me=>x.jsx("button",{onClick:()=>Ye(me),className:Le("px-2 py-1.5 rounded text-[10px] font-medium transition-colors capitalize",O===me?"bg-emerald-600 text-white":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:me},me)),x.jsx("span",{className:"mx-1 text-muted-foreground/40",children:"|"}),x.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",title:"Density: 0=tight, 100=spacious",children:["Density",x.jsx("input",{type:"range",min:0,max:100,step:5,value:W,onChange:me=>L(Number(me.target.value)),className:"w-20 h-1 accent-orange-500"}),x.jsx("span",{className:"w-6 text-right font-mono",children:W})]}),x.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",title:"Center ring size",children:["Center",x.jsx("input",{type:"range",min:0,max:500,step:5,value:q,onChange:me=>I(Number(me.target.value)),className:"w-20 h-1 accent-cyan-500"}),x.jsx("span",{className:"w-6 text-right font-mono",children:q})]}),x.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",title:"Gap between rings",children:["Gap",x.jsx("input",{type:"range",min:0,max:500,step:5,value:$,onChange:me=>oe(Number(me.target.value)),className:"w-20 h-1 accent-emerald-500"}),x.jsx("span",{className:"w-6 text-right font-mono",children:$})]})]}),x.jsx("span",{className:"mx-1 text-muted-foreground/40",children:"|"}),["smoothstep","default","straight","step"].map(me=>x.jsx("button",{onClick:()=>U(me),className:Le("px-2 py-1.5 rounded text-[10px] font-medium transition-colors capitalize",R===me?"bg-purple-600 text-white":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:me==="default"?"bezier":me},me))]}),x.jsx(k4,{color:Jv.color,gap:Jv.gap}),x.jsx(U4,{className:"!bg-card !border-border [&>button]:!bg-card [&>button]:!border-border"}),x.jsx(J4,{className:"!bg-card/80 !border-border",maskColor:"rgba(0,0,0,0.8)",nodeColor:me=>{const ze=me.data;return ze?.status==="synced"?il.synced:ze?.status==="pending"?il.pending:ze?.status==="error"?il.error:ze?.status==="not_installed"?il.not_installed:ze?.type==="skill"?jn.skill:ze?.type==="mcp"?jn.mcp:ze?.type==="memory"?jn.memory:il.fallback}})]})})}let iS=!1;try{iS=globalThis.localStorage?.getItem("mycelium:debug:panel")==="1"}catch{}const ih=(...e)=>{iS&&console.log("[panel]",...e)},g6={skill:{label:"Skills",color:"text-purple-400",icon:x.jsx(eS,{size:14,className:"text-purple-400"})},agent:{label:"Agents",color:"text-emerald-400",icon:x.jsx(F1,{size:14,className:"text-emerald-400"})},command:{label:"Commands",color:"text-blue-400",icon:x.jsx(tS,{size:14,className:"text-blue-400"})},hook:{label:"Hooks",color:"text-amber-400",icon:x.jsx(nS,{size:14,className:"text-amber-400"})},lib:{label:"Libraries",color:"text-pink-400",icon:x.jsx(W1,{size:14,className:"text-pink-400"})}};function y6(e){if(!e)return{};const o=new Set(e.disabledItems??[]),a={},i=[...e.skills,...e.agents,...e.commands,...e.hooks??[],...e.libs??[]];for(const s of i)a[s]=!o.has(s);return a}function lS({plugin:e,onClose:o,onTogglePlugin:a,onToggleItem:i,onRemoveItem:s}){const c=N.useMemo(()=>y6(e),[e]),[u,d]=N.useState(null),p=u??c,[m,y]=N.useState(!1),[g,v]=N.useState("closed"),S=N.useRef(null),w=N.useRef(null);N.useEffect(()=>{ih("useEffect",{animState:g,plugin:e?.name??null}),e?(S.current=e,w.current!==e.name&&(d(null),w.current=e.name),v(D=>D==="closed"?"opening":D)):(g==="open"||g==="opening")&&v("closing")},[e]);const _=N.useCallback(D=>{D.target===D.currentTarget&&(ih("animEnd",{animState:g,anim:D.animationName}),g==="opening"?v("open"):g==="closing"&&(v("closed"),S.current=null))},[g]),T=N.useCallback(()=>{ih("handleClose",{animState:g}),v("closing"),o()},[o,g]);if(g==="closed")return null;const z=S.current;if(!z)return null;const H=g==="opening"||g==="open",E=D=>{const O={};for(const Z of Object.keys(p))O[Z]=D;d(O),a(z.name,D)},M=[{type:"skill",items:z.skills},{type:"agent",items:z.agents},{type:"command",items:z.commands},{type:"hook",items:z.hooks??[]},{type:"lib",items:z.libs??[]}].filter(D=>D.items.length>0),R=M.reduce((D,O)=>D+O.items.length,0);return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:Le("fixed inset-0 z-40 bg-black/50",H?"animate-fade-in":"animate-fade-out"),onClick:T}),x.jsxs("div",{role:"dialog","aria-label":z.name,className:Le("fixed right-0 top-0 z-50 h-full w-96 overflow-y-auto border-l bg-card text-card-foreground shadow-xl",H?"animate-slide-in-right":"animate-slide-out-right"),onAnimationEnd:_,children:[x.jsxs("div",{className:"flex items-start justify-between border-b p-4",children:[x.jsxs("div",{children:[x.jsx("h2",{className:"text-lg font-bold",children:z.name}),x.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[z.version&&x.jsxs("span",{className:"text-sm text-muted-foreground",children:["v",z.version]}),x.jsx("span",{className:"rounded-full bg-teal-500/10 px-2 py-0.5 text-xs text-teal-400 border border-teal-500/30",children:z.marketplace})]}),z.author&&x.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["by ",z.author]}),x.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[R," components"]})]}),x.jsx("button",{onClick:T,className:"rounded-md p-1 text-muted-foreground hover:bg-muted hover:text-foreground","aria-label":"Close",children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),x.jsx("div",{className:"border-b p-4",children:x.jsx("p",{className:"text-sm text-muted-foreground",children:z.description})}),x.jsxs("div",{className:"flex gap-2 border-b p-4",children:[x.jsx("button",{onClick:()=>E(!0),className:Le("flex-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",Object.values(p).some(D=>!D)?"bg-primary text-primary-foreground":"border bg-background text-foreground hover:bg-muted"),children:"Enable All"}),x.jsx("button",{onClick:()=>E(!1),className:Le("flex-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",Object.values(p).some(Boolean)?"bg-destructive text-destructive-foreground":"border bg-background text-foreground hover:bg-muted"),children:"Disable All"})]}),M.map(({type:D,items:O})=>{const Z=g6[D]??{label:D,color:"text-muted-foreground",icon:"?"};return x.jsxs("div",{className:"border-b p-4",children:[x.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm font-medium",children:[Z.icon,x.jsx("span",{className:Le("font-bold",Z.color),children:Z.label}),x.jsx("span",{className:"rounded-full bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:O.length})]}),x.jsx("div",{className:"space-y-2",children:O.map($=>x.jsxs("div",{className:"flex items-center justify-between rounded-md border px-3 py-2",children:[x.jsx("span",{className:"text-sm",children:$}),x.jsx("button",{onClick:()=>{const oe=!p[$];d(q=>({...q??c,[$]:oe})),i?.(z.name,$,oe)},className:Le("relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors",p[$]?"bg-primary":"bg-muted"),role:"switch","aria-checked":p[$],"aria-label":`Toggle ${$}`,children:x.jsx("span",{className:Le("pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform",p[$]?"translate-x-4":"translate-x-0")})})]},$))})]},D)}),s&&x.jsxs("div",{className:"p-4",children:[x.jsx("h3",{className:"mb-2 text-sm font-medium text-destructive",children:"Danger Zone"}),x.jsxs("button",{onClick:()=>y(!0),className:"w-full rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm font-medium text-destructive hover:bg-destructive/20",children:["Remove ",z.marketplace==="system"?"MCP":z.marketplace==="standalone"?"Skill":"Plugin"]}),x.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["This removes it from ~/.mycelium. Run ",x.jsx("code",{className:"bg-muted px-1 rounded",children:"mycelium sync"})," to propagate to all tools."]})]})]}),m&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60",onClick:()=>y(!1)}),x.jsxs("div",{className:"fixed left-1/2 top-1/2 z-[70] w-80 -translate-x-1/2 -translate-y-1/2 rounded-lg border bg-card p-6 shadow-2xl",children:[x.jsxs("h3",{className:"text-lg font-bold text-destructive",children:["Remove ",z.name,"?"]}),x.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["This will remove all components (",R," total) from ~/.mycelium. Run ",x.jsx("code",{className:"bg-muted px-1 rounded text-xs",children:"mycelium sync"})," after to propagate."]}),x.jsxs("div",{className:"mt-4 flex gap-2",children:[x.jsx("button",{onClick:()=>{const D=z.marketplace==="system"?"mcp":z.marketplace==="standalone"?"skill":"plugin";s?.(D,z.name),y(!1),o()},className:"flex-1 rounded-md bg-destructive px-3 py-2 text-sm font-medium text-destructive-foreground hover:bg-destructive/90",children:"Yes, remove"}),x.jsx("button",{onClick:()=>y(!1),className:"flex-1 rounded-md border px-3 py-2 text-sm font-medium hover:bg-muted",children:"Cancel"})]})]})]})]})}async function ll(){return(await fetch("/api/state")).json()}async function v6(e){await fetch("/api/toggle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function b6(){return(await fetch("/api/migrate/scan")).json()}async function x6(e){return(await fetch("/api/migrate/apply",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}async function S6(e,o){const a=new URLSearchParams({q:e});return o&&a.set("source",o),(await fetch(`/api/marketplace/search?${a}`)).json()}async function w6(e,o){return(await fetch("/api/marketplace/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,source:o})})).json()}async function _6(){return(await fetch("/api/marketplace/registry")).json()}async function E6(e,o){await fetch("/api/marketplace/registry",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...o})})}async function C6(e){await fetch(`/api/marketplace/registry/${encodeURIComponent(e)}`,{method:"DELETE"})}async function N6(e){return(await fetch("/api/plugins")).json()}async function z6(e,o){return(await fetch("/api/plugins/toggle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,enabled:o})})).json()}async function T6(e,o,a,i){return(await fetch(`/api/plugins/${encodeURIComponent(e)}/items/${encodeURIComponent(o)}/toggle`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:a,...i})})).json()}async function Wv(){return(await fetch("/api/marketplace/popular")).json()}async function A6(e){return(await fetch(`/api/remove/skill/${encodeURIComponent(e)}`,{method:"DELETE"})).json()}async function M6(e){return(await fetch(`/api/remove/mcp/${encodeURIComponent(e)}`,{method:"DELETE"})).json()}async function k6(e){return(await fetch(`/api/remove/plugin/${encodeURIComponent(e)}`,{method:"DELETE"})).json()}async function O6(e,o){return(await fetch("/api/marketplace/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,source:o})})).json()}function D6({onClose:e}){const[o,a]=N.useState("scan"),[i,s]=N.useState(!1),[c,u]=N.useState([]),[d,p]=N.useState(null),[m,y]=N.useState(0),[g,v]=N.useState({skills:{},mcps:{},memory:{},tools:{}}),[S,w]=N.useState(null);async function _(){s(!0),p(null);try{const $=await b6();u($);const oe={},q={},I={},W={};for(const L of $){L.installed&&(W[L.toolId]=!0);for(const Y of L.skills)oe[Y.name]=!0;for(const Y of L.mcps)q[Y.name]=!0;for(const Y of L.memory)I[Y.name]=!0}v({skills:oe,mcps:q,memory:I,tools:W}),a("review")}catch($){p($.message??"Scan failed")}finally{s(!1)}}async function T(){p(null),a("apply");try{const $=xc(c,g),oe=Object.entries(g.skills).filter(([,Y])=>Y).map(([Y])=>Y),q=Object.entries(g.mcps).filter(([,Y])=>Y).map(([Y])=>Y),I=Object.entries(g.memory).filter(([,Y])=>Y).map(([Y])=>Y),W={skills:$.plugins.flatMap(Y=>Y.skills.filter(A=>oe.includes(A)).map(A=>({name:A,source:"scan"}))),mcps:$.mcps.filter(Y=>q.includes(Y.name)).map(Y=>({name:Y.name,source:"scan",config:{command:"",args:[]}})),memory:$.memory.filter(Y=>I.includes(Y.name)).map(Y=>({name:Y.name,source:"scan",content:""})),conflicts:[]},L=await x6(W);y(L.skillsImported+L.mcpsImported+L.memoryImported),a("done")}catch($){p($.message??"Migration failed"),a("review")}}const z=N.useCallback($=>{v(oe=>{const q=$.type==="skill"?"skills":$.type==="mcp"?"mcps":$.type==="memory"?"memory":null;return q?{...oe,[q]:{...oe[q],[$.name]:$.enabled}}:oe})},[]),H=N.useCallback($=>{const q=xc(c,g).plugins.find(I=>I.name===$);q&&w({name:q.name,marketplace:q.marketplace,version:"scanned",description:`${q.componentCount} components from ${q.marketplace}`,enabled:q.enabled,skills:q.skills,agents:[],commands:[],hooks:[],libs:[]})},[c,g]),E=N.useCallback(($,oe)=>{const I=xc(c,g).plugins.find(W=>W.name===$);I&&v(W=>{const L={...W.skills};for(const Y of I.skills)L[Y]=oe;return{...W,skills:L}}),w(W=>W?{...W,enabled:oe}:null)},[c,g]),M=N.useCallback(()=>{console.log("Add tool destination")},[]),R=c.length>0?xc(c,g):void 0,D=Object.values(g.skills).filter(Boolean).length+Object.values(g.mcps).filter(Boolean).length+Object.values(g.memory).filter(Boolean).length,O={scan:"Scan",review:"Review",apply:"Apply",done:"Done"},Z=["scan","review","apply","done"];return x.jsxs("div",{className:"space-y-6",children:[x.jsx("div",{className:"flex items-center justify-center gap-2",children:Z.map(($,oe)=>x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:Le("flex h-8 w-8 items-center justify-center rounded-full text-sm font-medium",$===o?"bg-primary text-primary-foreground":Z.indexOf(o)>oe?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:oe+1}),x.jsx("span",{className:"text-sm",children:O[$]}),oe<Z.length-1&&x.jsx("div",{className:"h-px w-8 bg-border"})]},$))}),d&&x.jsx("div",{className:"rounded-lg border border-red-500/50 bg-red-500/10 p-3 text-sm text-red-500",children:d}),o==="scan"&&x.jsxs("div",{className:"rounded-lg border bg-card p-6 text-card-foreground shadow-sm",children:[x.jsx("h2",{className:"text-lg font-semibold",children:"Scan for Tools"}),x.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Detect installed AI tools and their configurations to migrate into Mycelium."}),x.jsx("button",{onClick:_,disabled:i,className:"mt-4 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50",children:i?"Scanning...":"Start Scan"})]}),o==="review"&&R&&x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4 text-card-foreground shadow-sm",children:[x.jsxs("div",{className:"flex gap-6 text-sm",children:[x.jsxs("span",{children:[x.jsx("strong",{children:R.plugins.length})," plugins"]}),x.jsxs("span",{children:[x.jsx("strong",{children:Object.values(g.skills).filter(Boolean).length})," skills"]}),x.jsxs("span",{children:[x.jsx("strong",{children:Object.values(g.mcps).filter(Boolean).length})," MCPs"]}),x.jsxs("span",{children:[x.jsx("strong",{children:Object.values(g.memory).filter(Boolean).length})," memory"]}),x.jsxs("span",{className:"text-muted-foreground",children:["→ ",x.jsx("strong",{children:R.tools.length})," destinations"]})]}),x.jsxs("div",{className:"flex gap-2",children:[x.jsx("button",{onClick:()=>a("scan"),className:"rounded-md border px-4 py-2 text-sm hover:bg-muted",children:"Rescan"}),x.jsxs("button",{onClick:T,disabled:D===0,className:"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50",children:["Apply (",D," items)"]})]})]}),x.jsx("div",{className:"h-[500px] rounded-lg border bg-card/50",children:x.jsx(rm,{children:x.jsx(rS,{mode:"migrate",data:R,showUninstalledTools:!1,onToggle:z,onPluginClick:H,onAddTool:M})})}),x.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"Click plugin nodes to select individual skills. Toggle nodes to include/exclude from migration."})]}),o==="apply"&&x.jsxs("div",{className:"rounded-lg border bg-card p-6 text-card-foreground shadow-sm",children:[x.jsx("h2",{className:"text-lg font-semibold",children:"Applying Migration"}),x.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[x.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"}),x.jsx("span",{className:"text-sm text-muted-foreground",children:"Migrating configurations..."})]})]}),o==="done"&&x.jsxs("div",{className:"rounded-lg border bg-card p-6 text-card-foreground shadow-sm",children:[x.jsx("h2",{className:"text-lg font-semibold",children:"Migration Complete"}),x.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Successfully migrated ",m," items into Mycelium."]}),x.jsxs("div",{className:"mt-4 flex gap-2",children:[x.jsx("button",{onClick:()=>{a("scan"),u([])},className:"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",children:"Scan Again"}),e&&x.jsx("button",{onClick:e,className:"rounded-md border px-4 py-2 text-sm hover:bg-muted",children:"Close"})]})]}),x.jsx(lS,{plugin:S,onClose:()=>w(null),onTogglePlugin:E})]})}const j6={skill:{label:"Skill",color:"text-purple-400",bgColor:"bg-purple-500/10",borderColor:"border-purple-500/30",fileExt:".md"},mcp:{label:"MCP",color:"text-blue-400",bgColor:"bg-blue-500/10",borderColor:"border-blue-500/30",fileExt:".yaml"},plugin:{label:"Plugin",color:"text-amber-400",bgColor:"bg-amber-500/10",borderColor:"border-amber-500/30",fileExt:".json"},agent:{label:"Agent",color:"text-emerald-400",bgColor:"bg-emerald-500/10",borderColor:"border-emerald-500/30",fileExt:".md"},template:{label:"Template",color:"text-pink-400",bgColor:"bg-pink-500/10",borderColor:"border-pink-500/30",fileExt:".yaml"}},R6={label:"Item",color:"text-gray-400",bgColor:"bg-gray-500/10",borderColor:"border-gray-500/30",fileExt:".md"},L6={skill:"⚙",mcp:"⚡",plugin:"⬢",agent:"▶",template:"▦"};function H6(e){return j6[e]||R6}function eb(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function U6({item:e,installing:o,updating:a,expanded:i,onInstall:s,onUpdate:c,onToggleExpand:u}){const d=`${e.source}-${e.name}`,p=o===d,m=a===d,y=e.installed&&e.latestVersion&&e.installedVersion&&e.latestVersion!==e.installedVersion,g=H6(e.type),v=L6[e.type]||"●";return x.jsxs("div",{className:Le("group rounded-xl border bg-card text-sm shadow-sm transition-all cursor-pointer","hover:shadow-md hover:border-primary/40",g.borderColor,i&&"ring-2 ring-primary/30 shadow-md",e.installed&&"border-green-500/40"),onClick:()=>u(d),children:[x.jsx("div",{className:"px-4 pt-4 pb-2",children:x.jsxs("div",{className:"flex items-start justify-between gap-2",children:[x.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[x.jsx("div",{className:Le("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-base",g.bgColor,g.color),children:v}),x.jsxs("div",{className:"min-w-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"font-semibold text-foreground truncate",children:e.name}),e.installed&&x.jsx("span",{className:"shrink-0 rounded-full bg-green-500/15 px-1.5 py-0.5 text-[10px] font-medium text-green-400",children:"Installed"}),y&&x.jsx("span",{className:"shrink-0 rounded-full bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-400",children:"Update"})]}),e.author&&x.jsx("span",{className:"text-xs text-muted-foreground",children:e.author})]})]}),x.jsx("span",{className:Le("shrink-0 rounded-md px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",g.bgColor,g.color),children:g.label})]})}),x.jsx("div",{className:"px-4 pb-3",children:x.jsx("p",{className:Le("text-xs text-muted-foreground leading-relaxed",!i&&"line-clamp-2"),children:e.description})}),x.jsxs("div",{className:"flex items-center gap-3 px-4 pb-3 text-xs text-muted-foreground",children:[e.stars!=null&&x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx("span",{className:"text-yellow-400",children:"★"}),eb(e.stars)]}),e.downloads!=null&&x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx("span",{className:"text-muted-foreground/60",children:"↓"}),eb(e.downloads)]}),e.latestVersion&&x.jsxs("span",{className:"font-mono",children:["v",e.latestVersion]}),x.jsx("span",{className:Le("ml-auto rounded-full px-2 py-0.5 text-[10px]",g.bgColor,g.color),children:e.source})]}),i&&x.jsxs("div",{className:"border-t border-border/50 px-4 py-3 space-y-3",children:[e.category&&x.jsx("div",{className:"flex flex-wrap gap-1.5",children:x.jsx("span",{className:"rounded-full bg-primary/15 px-2 py-0.5 text-[10px] text-primary font-medium",children:e.category})}),(e.installedVersion||e.latestVersion)&&x.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.installedVersion&&x.jsxs("span",{children:["Installed: ",x.jsxs("span",{className:"font-mono",children:["v",e.installedVersion]})]}),e.latestVersion&&x.jsxs("span",{children:["Latest: ",x.jsxs("span",{className:"font-mono",children:["v",e.latestVersion]})]})]}),e.updatedAt&&x.jsxs("div",{className:"text-xs text-muted-foreground",children:["Updated: ",e.updatedAt]}),x.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[y&&x.jsx("button",{onClick:S=>{S.stopPropagation(),c(e)},disabled:m,className:"rounded-md px-3 py-1.5 text-xs font-medium bg-yellow-500/15 text-yellow-400 hover:bg-yellow-500/25 disabled:opacity-50 transition-colors",children:m?"Updating...":"Update"}),x.jsx("button",{onClick:S=>{S.stopPropagation(),s(e)},disabled:e.installed||p,className:Le("rounded-md px-4 py-1.5 text-xs font-medium transition-colors",e.installed?"border border-green-500/30 text-green-400 bg-green-500/10":"bg-primary text-primary-foreground hover:bg-primary/90","disabled:opacity-50"),children:e.installed?"Installed":p?"Installing...":"Install"})]})]}),!i&&x.jsxs("div",{className:"flex items-center justify-end px-4 pb-3",children:[y&&x.jsx("button",{onClick:S=>{S.stopPropagation(),c(e)},disabled:m,className:"mr-2 rounded-md px-2.5 py-1 text-[11px] font-medium text-yellow-400 hover:bg-yellow-500/15 disabled:opacity-50 transition-colors",children:m?"...":"Update"}),x.jsx("button",{onClick:S=>{S.stopPropagation(),s(e)},disabled:e.installed||p,className:Le("rounded-md px-3 py-1 text-[11px] font-medium transition-colors",e.installed?"text-green-400 bg-green-500/10":"bg-primary/80 text-primary-foreground hover:bg-primary","disabled:opacity-50"),children:e.installed?"Installed":p?"...":"Install"})]})]})}function Fo(e,o,{checkForDefaultPrevented:a=!0}={}){return function(s){if(e?.(s),a===!1||!s.defaultPrevented)return o?.(s)}}function tb(e,o){if(typeof e=="function")return e(o);e!=null&&(e.current=o)}function sS(...e){return o=>{let a=!1;const i=e.map(s=>{const c=tb(s,o);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let s=0;s<i.length;s++){const c=i[s];typeof c=="function"?c():tb(e[s],null)}}}}function Ia(...e){return N.useCallback(sS(...e),e)}function Z6(e,o){const a=N.createContext(o),i=c=>{const{children:u,...d}=c,p=N.useMemo(()=>d,Object.values(d));return x.jsx(a.Provider,{value:p,children:u})};i.displayName=e+"Provider";function s(c){const u=N.useContext(a);if(u)return u;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[i,s]}function B6(e,o=[]){let a=[];function i(c,u){const d=N.createContext(u),p=a.length;a=[...a,u];const m=g=>{const{scope:v,children:S,...w}=g,_=v?.[e]?.[p]||d,T=N.useMemo(()=>w,Object.values(w));return x.jsx(_.Provider,{value:T,children:S})};m.displayName=c+"Provider";function y(g,v){const S=v?.[e]?.[p]||d,w=N.useContext(S);if(w)return w;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${c}\``)}return[m,y]}const s=()=>{const c=a.map(u=>N.createContext(u));return function(d){const p=d?.[e]||c;return N.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return s.scopeName=e,[i,$6(s,...o)]}function $6(...e){const o=e[0];if(e.length===1)return o;const a=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const u=i.reduce((d,{useScope:p,scopeName:m})=>{const g=p(c)[`__scope${m}`];return{...d,...g}},{});return N.useMemo(()=>({[`__scope${o.scopeName}`]:u}),[u])}};return a.scopeName=o.scopeName,a}var Nl=globalThis?.document?N.useLayoutEffect:()=>{},V6=_b[" useId ".trim().toString()]||(()=>{}),Y6=0;function lh(e){const[o,a]=N.useState(V6());return Nl(()=>{a(i=>i??String(Y6++))},[e]),e||(o?`radix-${o}`:"")}var q6=_b[" useInsertionEffect ".trim().toString()]||Nl;function G6({prop:e,defaultProp:o,onChange:a=()=>{},caller:i}){const[s,c,u]=I6({defaultProp:o,onChange:a}),d=e!==void 0,p=d?e:s;{const y=N.useRef(e!==void 0);N.useEffect(()=>{const g=y.current;g!==d&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=d},[d,i])}const m=N.useCallback(y=>{if(d){const g=X6(y)?y(e):y;g!==e&&u.current?.(g)}else c(y)},[d,e,c,u]);return[p,m]}function I6({defaultProp:e,onChange:o}){const[a,i]=N.useState(e),s=N.useRef(a),c=N.useRef(o);return q6(()=>{c.current=o},[o]),N.useEffect(()=>{s.current!==a&&(c.current?.(a),s.current=a)},[a,s]),[a,i,c]}function X6(e){return typeof e=="function"}function cS(e){const o=P6(e),a=N.forwardRef((i,s)=>{const{children:c,...u}=i,d=N.Children.toArray(c),p=d.find(K6);if(p){const m=p.props.children,y=d.map(g=>g===p?N.Children.count(m)>1?N.Children.only(null):N.isValidElement(m)?m.props.children:null:g);return x.jsx(o,{...u,ref:s,children:N.isValidElement(m)?N.cloneElement(m,void 0,y):null})}return x.jsx(o,{...u,ref:s,children:c})});return a.displayName=`${e}.Slot`,a}function P6(e){const o=N.forwardRef((a,i)=>{const{children:s,...c}=a;if(N.isValidElement(s)){const u=F6(s),d=J6(c,s.props);return s.type!==N.Fragment&&(d.ref=i?sS(i,u):u),N.cloneElement(s,d)}return N.Children.count(s)>1?N.Children.only(null):null});return o.displayName=`${e}.SlotClone`,o}var Q6=Symbol("radix.slottable");function K6(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q6}function J6(e,o){const a={...o};for(const i in o){const s=e[i],c=o[i];/^on[A-Z]/.test(i)?s&&c?a[i]=(...d)=>{const p=c(...d);return s(...d),p}:s&&(a[i]=s):i==="style"?a[i]={...s,...c}:i==="className"&&(a[i]=[s,c].filter(Boolean).join(" "))}return{...e,...a}}function F6(e){let o=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?e.ref:(o=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var W6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],go=W6.reduce((e,o)=>{const a=cS(`Primitive.${o}`),i=N.forwardRef((s,c)=>{const{asChild:u,...d}=s,p=u?a:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...d,ref:c})});return i.displayName=`Primitive.${o}`,{...e,[o]:i}},{});function eD(e,o){e&&qx.flushSync(()=>e.dispatchEvent(o))}function zl(e){const o=N.useRef(e);return N.useEffect(()=>{o.current=e}),N.useMemo(()=>(...a)=>o.current?.(...a),[])}function tD(e,o=globalThis?.document){const a=zl(e);N.useEffect(()=>{const i=s=>{s.key==="Escape"&&a(s)};return o.addEventListener("keydown",i,{capture:!0}),()=>o.removeEventListener("keydown",i,{capture:!0})},[a,o])}var nD="DismissableLayer",Hh="dismissableLayer.update",oD="dismissableLayer.pointerDownOutside",aD="dismissableLayer.focusOutside",nb,uS=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fS=N.forwardRef((e,o)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,onDismiss:d,...p}=e,m=N.useContext(uS),[y,g]=N.useState(null),v=y?.ownerDocument??globalThis?.document,[,S]=N.useState({}),w=Ia(o,O=>g(O)),_=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),z=_.indexOf(T),H=y?_.indexOf(y):-1,E=m.layersWithOutsidePointerEventsDisabled.size>0,M=H>=z,R=lD(O=>{const Z=O.target,$=[...m.branches].some(oe=>oe.contains(Z));!M||$||(s?.(O),u?.(O),O.defaultPrevented||d?.())},v),D=sD(O=>{const Z=O.target;[...m.branches].some(oe=>oe.contains(Z))||(c?.(O),u?.(O),O.defaultPrevented||d?.())},v);return tD(O=>{H===m.layers.size-1&&(i?.(O),!O.defaultPrevented&&d&&(O.preventDefault(),d()))},v),N.useEffect(()=>{if(y)return a&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(nb=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),ob(),()=>{a&&m.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=nb)}},[y,v,a,m]),N.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),ob())},[y,m]),N.useEffect(()=>{const O=()=>S({});return document.addEventListener(Hh,O),()=>document.removeEventListener(Hh,O)},[]),x.jsx(go.div,{...p,ref:w,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:Fo(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Fo(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Fo(e.onPointerDownCapture,R.onPointerDownCapture)})});fS.displayName=nD;var rD="DismissableLayerBranch",iD=N.forwardRef((e,o)=>{const a=N.useContext(uS),i=N.useRef(null),s=Ia(o,i);return N.useEffect(()=>{const c=i.current;if(c)return a.branches.add(c),()=>{a.branches.delete(c)}},[a.branches]),x.jsx(go.div,{...e,ref:s})});iD.displayName=rD;function lD(e,o=globalThis?.document){const a=zl(e),i=N.useRef(!1),s=N.useRef(()=>{});return N.useEffect(()=>{const c=d=>{if(d.target&&!i.current){let p=function(){dS(oD,a,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(o.removeEventListener("click",s.current),s.current=p,o.addEventListener("click",s.current,{once:!0})):p()}else o.removeEventListener("click",s.current);i.current=!1},u=window.setTimeout(()=>{o.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),o.removeEventListener("pointerdown",c),o.removeEventListener("click",s.current)}},[o,a]),{onPointerDownCapture:()=>i.current=!0}}function sD(e,o=globalThis?.document){const a=zl(e),i=N.useRef(!1);return N.useEffect(()=>{const s=c=>{c.target&&!i.current&&dS(aD,a,{originalEvent:c},{discrete:!1})};return o.addEventListener("focusin",s),()=>o.removeEventListener("focusin",s)},[o,a]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function ob(){const e=new CustomEvent(Hh);document.dispatchEvent(e)}function dS(e,o,a,{discrete:i}){const s=a.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});o&&s.addEventListener(e,o,{once:!0}),i?eD(s,c):s.dispatchEvent(c)}var sh="focusScope.autoFocusOnMount",ch="focusScope.autoFocusOnUnmount",ab={bubbles:!1,cancelable:!0},cD="FocusScope",hS=N.forwardRef((e,o)=>{const{loop:a=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...u}=e,[d,p]=N.useState(null),m=zl(s),y=zl(c),g=N.useRef(null),v=Ia(o,_=>p(_)),S=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(i){let _=function(E){if(S.paused||!d)return;const M=E.target;d.contains(M)?g.current=M:Qo(g.current,{select:!0})},T=function(E){if(S.paused||!d)return;const M=E.relatedTarget;M!==null&&(d.contains(M)||Qo(g.current,{select:!0}))},z=function(E){if(document.activeElement===document.body)for(const R of E)R.removedNodes.length>0&&Qo(d)};document.addEventListener("focusin",_),document.addEventListener("focusout",T);const H=new MutationObserver(z);return d&&H.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",T),H.disconnect()}}},[i,d,S.paused]),N.useEffect(()=>{if(d){ib.add(S);const _=document.activeElement;if(!d.contains(_)){const z=new CustomEvent(sh,ab);d.addEventListener(sh,m),d.dispatchEvent(z),z.defaultPrevented||(uD(pD(mS(d)),{select:!0}),document.activeElement===_&&Qo(d))}return()=>{d.removeEventListener(sh,m),setTimeout(()=>{const z=new CustomEvent(ch,ab);d.addEventListener(ch,y),d.dispatchEvent(z),z.defaultPrevented||Qo(_??document.body,{select:!0}),d.removeEventListener(ch,y),ib.remove(S)},0)}}},[d,m,y,S]);const w=N.useCallback(_=>{if(!a&&!i||S.paused)return;const T=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,z=document.activeElement;if(T&&z){const H=_.currentTarget,[E,M]=fD(H);E&&M?!_.shiftKey&&z===M?(_.preventDefault(),a&&Qo(E,{select:!0})):_.shiftKey&&z===E&&(_.preventDefault(),a&&Qo(M,{select:!0})):z===H&&_.preventDefault()}},[a,i,S.paused]);return x.jsx(go.div,{tabIndex:-1,...u,ref:v,onKeyDown:w})});hS.displayName=cD;function uD(e,{select:o=!1}={}){const a=document.activeElement;for(const i of e)if(Qo(i,{select:o}),document.activeElement!==a)return}function fD(e){const o=mS(e),a=rb(o,e),i=rb(o.reverse(),e);return[a,i]}function mS(e){const o=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)o.push(a.currentNode);return o}function rb(e,o){for(const a of e)if(!dD(a,{upTo:o}))return a}function dD(e,{upTo:o}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(o!==void 0&&e===o)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hD(e){return e instanceof HTMLInputElement&&"select"in e}function Qo(e,{select:o=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&hD(e)&&o&&e.select()}}var ib=mD();function mD(){let e=[];return{add(o){const a=e[0];o!==a&&a?.pause(),e=lb(e,o),e.unshift(o)},remove(o){e=lb(e,o),e[0]?.resume()}}}function lb(e,o){const a=[...e],i=a.indexOf(o);return i!==-1&&a.splice(i,1),a}function pD(e){return e.filter(o=>o.tagName!=="A")}var gD="Portal",pS=N.forwardRef((e,o)=>{const{container:a,...i}=e,[s,c]=N.useState(!1);Nl(()=>c(!0),[]);const u=a||s&&globalThis?.document?.body;return u?Lz.createPortal(x.jsx(go.div,{...i,ref:o}),u):null});pS.displayName=gD;function yD(e,o){return N.useReducer((a,i)=>o[a][i]??a,e)}var vu=e=>{const{present:o,children:a}=e,i=vD(o),s=typeof a=="function"?a({present:i.isPresent}):N.Children.only(a),c=Ia(i.ref,bD(s));return typeof a=="function"||i.isPresent?N.cloneElement(s,{ref:c}):null};vu.displayName="Presence";function vD(e){const[o,a]=N.useState(),i=N.useRef(null),s=N.useRef(e),c=N.useRef("none"),u=e?"mounted":"unmounted",[d,p]=yD(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const m=_c(i.current);c.current=d==="mounted"?m:"none"},[d]),Nl(()=>{const m=i.current,y=s.current;if(y!==e){const v=c.current,S=_c(m);e?p("MOUNT"):S==="none"||m?.display==="none"?p("UNMOUNT"):p(y&&v!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),Nl(()=>{if(o){let m;const y=o.ownerDocument.defaultView??window,g=S=>{const _=_c(i.current).includes(CSS.escape(S.animationName));if(S.target===o&&_&&(p("ANIMATION_END"),!s.current)){const T=o.style.animationFillMode;o.style.animationFillMode="forwards",m=y.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=T)})}},v=S=>{S.target===o&&(c.current=_c(i.current))};return o.addEventListener("animationstart",v),o.addEventListener("animationcancel",g),o.addEventListener("animationend",g),()=>{y.clearTimeout(m),o.removeEventListener("animationstart",v),o.removeEventListener("animationcancel",g),o.removeEventListener("animationend",g)}}else p("ANIMATION_END")},[o,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:N.useCallback(m=>{i.current=m?getComputedStyle(m):null,a(m)},[])}}function _c(e){return e?.animationName||"none"}function bD(e){let o=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?e.ref:(o=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var uh=0;function xD(){N.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sb()),document.body.insertAdjacentElement("beforeend",e[1]??sb()),uh++,()=>{uh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),uh--}},[])}function sb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Rn=function(){return Rn=Object.assign||function(o){for(var a,i=1,s=arguments.length;i<s;i++){a=arguments[i];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])}return o},Rn.apply(this,arguments)};function gS(e,o){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&o.indexOf(i)<0&&(a[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)o.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(a[i[s]]=e[i[s]]);return a}function SD(e,o,a){if(a||arguments.length===2)for(var i=0,s=o.length,c;i<s;i++)(c||!(i in o))&&(c||(c=Array.prototype.slice.call(o,0,i)),c[i]=o[i]);return e.concat(c||Array.prototype.slice.call(o))}var jc="right-scroll-bar-position",Rc="width-before-scroll-bar",wD="with-scroll-bars-hidden",_D="--removed-body-scroll-bar-size";function fh(e,o){return typeof e=="function"?e(o):e&&(e.current=o),e}function ED(e,o){var a=N.useState(function(){return{value:e,callback:o,facade:{get current(){return a.value},set current(i){var s=a.value;s!==i&&(a.value=i,a.callback(i,s))}}}})[0];return a.callback=o,a.facade}var CD=typeof window<"u"?N.useLayoutEffect:N.useEffect,cb=new WeakMap;function ND(e,o){var a=ED(null,function(i){return e.forEach(function(s){return fh(s,i)})});return CD(function(){var i=cb.get(a);if(i){var s=new Set(i),c=new Set(e),u=a.current;s.forEach(function(d){c.has(d)||fh(d,null)}),c.forEach(function(d){s.has(d)||fh(d,u)})}cb.set(a,e)},[e]),a}function zD(e){return e}function TD(e,o){o===void 0&&(o=zD);var a=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(c){var u=o(c,i);return a.push(u),function(){a=a.filter(function(d){return d!==u})}},assignSyncMedium:function(c){for(i=!0;a.length;){var u=a;a=[],u.forEach(c)}a={push:function(d){return c(d)},filter:function(){return a}}},assignMedium:function(c){i=!0;var u=[];if(a.length){var d=a;a=[],d.forEach(c),u=a}var p=function(){var y=u;u=[],y.forEach(c)},m=function(){return Promise.resolve().then(p)};m(),a={push:function(y){u.push(y),m()},filter:function(y){return u=u.filter(y),a}}}};return s}function AD(e){e===void 0&&(e={});var o=TD(null);return o.options=Rn({async:!0,ssr:!1},e),o}var yS=function(e){var o=e.sideCar,a=gS(e,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=o.read();if(!i)throw new Error("Sidecar medium not found");return N.createElement(i,Rn({},a))};yS.isSideCarExport=!0;function MD(e,o){return e.useMedium(o),yS}var vS=AD(),dh=function(){},bu=N.forwardRef(function(e,o){var a=N.useRef(null),i=N.useState({onScrollCapture:dh,onWheelCapture:dh,onTouchMoveCapture:dh}),s=i[0],c=i[1],u=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,y=e.enabled,g=e.shards,v=e.sideCar,S=e.noRelative,w=e.noIsolation,_=e.inert,T=e.allowPinchZoom,z=e.as,H=z===void 0?"div":z,E=e.gapMode,M=gS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=v,D=ND([a,o]),O=Rn(Rn({},M),s);return N.createElement(N.Fragment,null,y&&N.createElement(R,{sideCar:vS,removeScrollBar:m,shards:g,noRelative:S,noIsolation:w,inert:_,setCallbacks:c,allowPinchZoom:!!T,lockRef:a,gapMode:E}),u?N.cloneElement(N.Children.only(d),Rn(Rn({},O),{ref:D})):N.createElement(H,Rn({},O,{className:p,ref:D}),d))});bu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bu.classNames={fullWidth:Rc,zeroRight:jc};var kD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function OD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var o=kD();return o&&e.setAttribute("nonce",o),e}function DD(e,o){e.styleSheet?e.styleSheet.cssText=o:e.appendChild(document.createTextNode(o))}function jD(e){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(e)}var RD=function(){var e=0,o=null;return{add:function(a){e==0&&(o=OD())&&(DD(o,a),jD(o)),e++},remove:function(){e--,!e&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},LD=function(){var e=RD();return function(o,a){N.useEffect(function(){return e.add(o),function(){e.remove()}},[o&&a])}},bS=function(){var e=LD(),o=function(a){var i=a.styles,s=a.dynamic;return e(i,s),null};return o},HD={left:0,top:0,right:0,gap:0},hh=function(e){return parseInt(e||"",10)||0},UD=function(e){var o=window.getComputedStyle(document.body),a=o[e==="padding"?"paddingLeft":"marginLeft"],i=o[e==="padding"?"paddingTop":"marginTop"],s=o[e==="padding"?"paddingRight":"marginRight"];return[hh(a),hh(i),hh(s)]},ZD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return HD;var o=UD(e),a=document.documentElement.clientWidth,i=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,i-a+o[2]-o[0])}},BD=bS(),Pr="data-scroll-locked",$D=function(e,o,a,i){var s=e.left,c=e.top,u=e.right,d=e.gap;return a===void 0&&(a="margin"),`
|
|
109
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(o===u[0]){c(u);continue}if(e.external){const m=e.external.registry.get(u[0])?.id;if(o!==u[0]&&m){c(u);continue}}if(e.metadataRegistry.get(u[0])?.id){c(u);continue}if(d.cycle){c(u);continue}if(d.count>1&&e.reused==="ref"){c(u);continue}}}function q1(e,o){const a=e.seen.get(o);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=u=>{const d=e.seen.get(u);if(d.ref===null)return;const p=d.def??d.schema,m={...p},y=d.ref;if(d.ref=null,y){i(y);const v=e.seen.get(y),S=v.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(S)):Object.assign(p,S),Object.assign(p,m),u._zod.parent===y)for(const _ in p)_==="$ref"||_==="allOf"||_ in m||delete p[_];if(S.$ref&&v.def)for(const _ in p)_==="$ref"||_==="allOf"||_ in v.def&&JSON.stringify(p[_])===JSON.stringify(v.def[_])&&delete p[_]}const g=u._zod.parent;if(g&&g!==y){i(g);const v=e.seen.get(g);if(v?.schema.$ref&&(p.$ref=v.schema.$ref,v.def))for(const S in p)S==="$ref"||S==="allOf"||S in v.def&&JSON.stringify(p[S])===JSON.stringify(v.def[S])&&delete p[S]}e.override({zodSchema:u,jsonSchema:p,path:d.path??[]})};for(const u of[...e.seen.entries()].reverse())i(u[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(o)?.id;if(!u)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(u)}Object.assign(s,a.def??a.schema);const c=e.external?.defs??{};for(const u of e.seen.entries()){const d=u[1];d.def&&d.defId&&(c[d.defId]=d.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?s.$defs=c:s.definitions=c);try{const u=JSON.parse(JSON.stringify(s));return Object.defineProperty(u,"~standard",{value:{...o["~standard"],jsonSchema:{input:Jc(o,"input",e.processors),output:Jc(o,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Lt(e,o){const a=o??{seen:new Set};if(a.seen.has(e))return!1;a.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Lt(i.element,a);if(i.type==="set")return Lt(i.valueType,a);if(i.type==="lazy")return Lt(i.getter(),a);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Lt(i.innerType,a);if(i.type==="intersection")return Lt(i.left,a)||Lt(i.right,a);if(i.type==="record"||i.type==="map")return Lt(i.keyType,a)||Lt(i.valueType,a);if(i.type==="pipe")return Lt(i.in,a)||Lt(i.out,a);if(i.type==="object"){for(const s in i.shape)if(Lt(i.shape[s],a))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(Lt(s,a))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(Lt(s,a))return!0;return!!(i.rest&&Lt(i.rest,a))}return!1}const WM=(e,o={})=>a=>{const i=V1({...a,processors:o});return bt(e,i),Y1(i,e),q1(i,e)},Jc=(e,o,a={})=>i=>{const{libraryOptions:s,target:c}=i??{},u=V1({...s??{},target:c,io:o,processors:a});return bt(e,u),Y1(u,e),q1(u,e)},ek={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tk=(e,o,a,i)=>{const s=a;s.type="string";const{minimum:c,maximum:u,format:d,patterns:p,contentEncoding:m}=e._zod.bag;if(typeof c=="number"&&(s.minLength=c),typeof u=="number"&&(s.maxLength=u),d&&(s.format=ek[d]??d,s.format===""&&delete s.format,d==="time"&&delete s.format),m&&(s.contentEncoding=m),p&&p.size>0){const y=[...p];y.length===1?s.pattern=y[0].source:y.length>1&&(s.allOf=[...y.map(g=>({...o.target==="draft-07"||o.target==="draft-04"||o.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},nk=(e,o,a,i)=>{a.type="boolean"},ok=(e,o,a,i)=>{a.not={}},ak=(e,o,a,i)=>{},rk=(e,o,a,i)=>{const s=e._zod.def,c=z1(s.entries);c.every(u=>typeof u=="number")&&(a.type="number"),c.every(u=>typeof u=="string")&&(a.type="string"),a.enum=c},ik=(e,o,a,i)=>{if(o.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},lk=(e,o,a,i)=>{if(o.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},sk=(e,o,a,i)=>{const s=a,c=e._zod.def,{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(s.minItems=u),typeof d=="number"&&(s.maxItems=d),s.type="array",s.items=bt(c.element,o,{...i,path:[...i.path,"items"]})},ck=(e,o,a,i)=>{const s=a,c=e._zod.def;s.type="object",s.properties={};const u=c.shape;for(const m in u)s.properties[m]=bt(u[m],o,{...i,path:[...i.path,"properties",m]});const d=new Set(Object.keys(u)),p=new Set([...d].filter(m=>{const y=c.shape[m]._zod;return o.io==="input"?y.optin===void 0:y.optout===void 0}));p.size>0&&(s.required=Array.from(p)),c.catchall?._zod.def.type==="never"?s.additionalProperties=!1:c.catchall?c.catchall&&(s.additionalProperties=bt(c.catchall,o,{...i,path:[...i.path,"additionalProperties"]})):o.io==="output"&&(s.additionalProperties=!1)},uk=(e,o,a,i)=>{const s=e._zod.def,c=s.inclusive===!1,u=s.options.map((d,p)=>bt(d,o,{...i,path:[...i.path,c?"oneOf":"anyOf",p]}));c?a.oneOf=u:a.anyOf=u},fk=(e,o,a,i)=>{const s=e._zod.def,c=bt(s.left,o,{...i,path:[...i.path,"allOf",0]}),u=bt(s.right,o,{...i,path:[...i.path,"allOf",1]}),d=m=>"allOf"in m&&Object.keys(m).length===1,p=[...d(c)?c.allOf:[c],...d(u)?u.allOf:[u]];a.allOf=p},dk=(e,o,a,i)=>{const s=a,c=e._zod.def;s.type="object";const u=c.keyType,p=u._zod.bag?.patterns;if(c.mode==="loose"&&p&&p.size>0){const y=bt(c.valueType,o,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const g of p)s.patternProperties[g.source]=y}else(o.target==="draft-07"||o.target==="draft-2020-12")&&(s.propertyNames=bt(c.keyType,o,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=bt(c.valueType,o,{...i,path:[...i.path,"additionalProperties"]});const m=u._zod.values;if(m){const y=[...m].filter(g=>typeof g=="string"||typeof g=="number");y.length>0&&(s.required=y)}},hk=(e,o,a,i)=>{const s=e._zod.def,c=bt(s.innerType,o,i),u=o.seen.get(e);o.target==="openapi-3.0"?(u.ref=s.innerType,a.nullable=!0):a.anyOf=[c,{type:"null"}]},mk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType},pk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType,a.default=JSON.parse(JSON.stringify(s.defaultValue))},gk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType,o.io==="input"&&(a._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},yk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType;let u;try{u=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}a.default=u},vk=(e,o,a,i)=>{const s=e._zod.def,c=o.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;bt(c,o,i);const u=o.seen.get(e);u.ref=c},bk=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType,a.readOnly=!0},G1=(e,o,a,i)=>{const s=e._zod.def;bt(s.innerType,o,i);const c=o.seen.get(e);c.ref=s.innerType},xk=fe("ZodISODateTime",(e,o)=>{zA.init(e,o),ot.init(e,o)});function Sk(e){return kM(xk,e)}const wk=fe("ZodISODate",(e,o)=>{TA.init(e,o),ot.init(e,o)});function _k(e){return OM(wk,e)}const Ek=fe("ZodISOTime",(e,o)=>{AA.init(e,o),ot.init(e,o)});function Ck(e){return DM(Ek,e)}const Nk=fe("ZodISODuration",(e,o)=>{MA.init(e,o),ot.init(e,o)});function zk(e){return jM(Nk,e)}const Tk=(e,o)=>{k1.init(e,o),e.name="ZodError",Object.defineProperties(e,{format:{value:a=>wT(e,a)},flatten:{value:a=>ST(e,a)},addIssue:{value:a=>{e.issues.push(a),e.message=JSON.stringify(e.issues,kh,2)}},addIssues:{value:a=>{e.issues.push(...a),e.message=JSON.stringify(e.issues,kh,2)}},isEmpty:{get(){return e.issues.length===0}}})},gn=fe("ZodError",Tk,{Parent:Error}),Ak=um(gn),Mk=fm(gn),kk=mu(gn),Ok=pu(gn),Dk=CT(gn),jk=NT(gn),Rk=zT(gn),Lk=TT(gn),Hk=AT(gn),Uk=MT(gn),Zk=kT(gn),Bk=OT(gn),ft=fe("ZodType",(e,o)=>(ut.init(e,o),Object.assign(e["~standard"],{jsonSchema:{input:Jc(e,"input"),output:Jc(e,"output")}}),e.toJSONSchema=WM(e,{}),e.def=o,e.type=o.type,Object.defineProperty(e,"_def",{value:o}),e.check=(...a)=>e.clone(aa(o,{checks:[...o.checks??[],...a.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(a,i)=>ra(e,a,i),e.brand=()=>e,e.register=((a,i)=>(a.add(e,i),e)),e.parse=(a,i)=>Ak(e,a,i,{callee:e.parse}),e.safeParse=(a,i)=>kk(e,a,i),e.parseAsync=async(a,i)=>Mk(e,a,i,{callee:e.parseAsync}),e.safeParseAsync=async(a,i)=>Ok(e,a,i),e.spa=e.safeParseAsync,e.encode=(a,i)=>Dk(e,a,i),e.decode=(a,i)=>jk(e,a,i),e.encodeAsync=async(a,i)=>Rk(e,a,i),e.decodeAsync=async(a,i)=>Lk(e,a,i),e.safeEncode=(a,i)=>Hk(e,a,i),e.safeDecode=(a,i)=>Uk(e,a,i),e.safeEncodeAsync=async(a,i)=>Zk(e,a,i),e.safeDecodeAsync=async(a,i)=>Bk(e,a,i),e.refine=(a,i)=>e.check(OO(a,i)),e.superRefine=a=>e.check(DO(a)),e.overwrite=a=>e.check(li(a)),e.optional=()=>Uv(e),e.exactOptional=()=>bO(e),e.nullable=()=>Zv(e),e.nullish=()=>Uv(Zv(e)),e.nonoptional=a=>CO(e,a),e.array=()=>ho(e),e.or=a=>dO([e,a]),e.and=a=>mO(e,a),e.transform=a=>Bv(e,yO(a)),e.default=a=>wO(e,a),e.prefault=a=>EO(e,a),e.catch=a=>zO(e,a),e.pipe=a=>Bv(e,a),e.readonly=()=>MO(e),e.describe=a=>{const i=e.clone();return ul.add(i,{description:a}),i},Object.defineProperty(e,"description",{get(){return ul.get(e)?.description},configurable:!0}),e.meta=(...a)=>{if(a.length===0)return ul.get(e);const i=e.clone();return ul.add(i,a[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=a=>a(e),e)),I1=fe("_ZodString",(e,o)=>{dm.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(i,s,c)=>tk(e,i,s);const a=e._zod.bag;e.format=a.format??null,e.minLength=a.minimum??null,e.maxLength=a.maximum??null,e.regex=(...i)=>e.check(UM(...i)),e.includes=(...i)=>e.check($M(...i)),e.startsWith=(...i)=>e.check(VM(...i)),e.endsWith=(...i)=>e.check(YM(...i)),e.min=(...i)=>e.check(Kc(...i)),e.max=(...i)=>e.check(B1(...i)),e.length=(...i)=>e.check($1(...i)),e.nonempty=(...i)=>e.check(Kc(1,...i)),e.lowercase=i=>e.check(ZM(i)),e.uppercase=i=>e.check(BM(i)),e.trim=()=>e.check(GM()),e.normalize=(...i)=>e.check(qM(...i)),e.toLowerCase=()=>e.check(IM()),e.toUpperCase=()=>e.check(XM()),e.slugify=()=>e.check(PM())}),$k=fe("ZodString",(e,o)=>{dm.init(e,o),I1.init(e,o),e.email=a=>e.check(uM(Vk,a)),e.url=a=>e.check(pM(Yk,a)),e.jwt=a=>e.check(MM(aO,a)),e.emoji=a=>e.check(gM(qk,a)),e.guid=a=>e.check(Rv(Lv,a)),e.uuid=a=>e.check(fM(bc,a)),e.uuidv4=a=>e.check(dM(bc,a)),e.uuidv6=a=>e.check(hM(bc,a)),e.uuidv7=a=>e.check(mM(bc,a)),e.nanoid=a=>e.check(yM(Gk,a)),e.guid=a=>e.check(Rv(Lv,a)),e.cuid=a=>e.check(vM(Ik,a)),e.cuid2=a=>e.check(bM(Xk,a)),e.ulid=a=>e.check(xM(Pk,a)),e.base64=a=>e.check(zM(tO,a)),e.base64url=a=>e.check(TM(nO,a)),e.xid=a=>e.check(SM(Qk,a)),e.ksuid=a=>e.check(wM(Kk,a)),e.ipv4=a=>e.check(_M(Jk,a)),e.ipv6=a=>e.check(EM(Fk,a)),e.cidrv4=a=>e.check(CM(Wk,a)),e.cidrv6=a=>e.check(NM(eO,a)),e.e164=a=>e.check(AM(oO,a)),e.datetime=a=>e.check(Sk(a)),e.date=a=>e.check(_k(a)),e.time=a=>e.check(Ck(a)),e.duration=a=>e.check(zk(a))});function Ht(e){return cM($k,e)}const ot=fe("ZodStringFormat",(e,o)=>{nt.init(e,o),I1.init(e,o)}),Vk=fe("ZodEmail",(e,o)=>{vA.init(e,o),ot.init(e,o)}),Lv=fe("ZodGUID",(e,o)=>{gA.init(e,o),ot.init(e,o)}),bc=fe("ZodUUID",(e,o)=>{yA.init(e,o),ot.init(e,o)}),Yk=fe("ZodURL",(e,o)=>{bA.init(e,o),ot.init(e,o)}),qk=fe("ZodEmoji",(e,o)=>{xA.init(e,o),ot.init(e,o)}),Gk=fe("ZodNanoID",(e,o)=>{SA.init(e,o),ot.init(e,o)}),Ik=fe("ZodCUID",(e,o)=>{wA.init(e,o),ot.init(e,o)}),Xk=fe("ZodCUID2",(e,o)=>{_A.init(e,o),ot.init(e,o)}),Pk=fe("ZodULID",(e,o)=>{EA.init(e,o),ot.init(e,o)}),Qk=fe("ZodXID",(e,o)=>{CA.init(e,o),ot.init(e,o)}),Kk=fe("ZodKSUID",(e,o)=>{NA.init(e,o),ot.init(e,o)}),Jk=fe("ZodIPv4",(e,o)=>{kA.init(e,o),ot.init(e,o)}),Fk=fe("ZodIPv6",(e,o)=>{OA.init(e,o),ot.init(e,o)}),Wk=fe("ZodCIDRv4",(e,o)=>{DA.init(e,o),ot.init(e,o)}),eO=fe("ZodCIDRv6",(e,o)=>{jA.init(e,o),ot.init(e,o)}),tO=fe("ZodBase64",(e,o)=>{RA.init(e,o),ot.init(e,o)}),nO=fe("ZodBase64URL",(e,o)=>{HA.init(e,o),ot.init(e,o)}),oO=fe("ZodE164",(e,o)=>{UA.init(e,o),ot.init(e,o)}),aO=fe("ZodJWT",(e,o)=>{BA.init(e,o),ot.init(e,o)}),rO=fe("ZodBoolean",(e,o)=>{$A.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>nk(e,a,i)});function hm(e){return RM(rO,e)}const iO=fe("ZodUnknown",(e,o)=>{VA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>ak()});function Hv(){return LM(iO)}const lO=fe("ZodNever",(e,o)=>{YA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>ok(e,a,i)});function sO(e){return HM(lO,e)}const cO=fe("ZodArray",(e,o)=>{qA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>sk(e,a,i,s),e.element=o.element,e.min=(a,i)=>e.check(Kc(a,i)),e.nonempty=a=>e.check(Kc(1,a)),e.max=(a,i)=>e.check(B1(a,i)),e.length=(a,i)=>e.check($1(a,i)),e.unwrap=()=>e.element});function ho(e,o){return QM(cO,e,o)}const uO=fe("ZodObject",(e,o)=>{IA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>ck(e,a,i,s),Ie(e,"shape",()=>o.shape),e.keyof=()=>mm(Object.keys(e._zod.def.shape)),e.catchall=a=>e.clone({...e._zod.def,catchall:a}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Hv()}),e.loose=()=>e.clone({...e._zod.def,catchall:Hv()}),e.strict=()=>e.clone({...e._zod.def,catchall:sO()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=a=>gT(e,a),e.safeExtend=a=>yT(e,a),e.merge=a=>vT(e,a),e.pick=a=>mT(e,a),e.omit=a=>pT(e,a),e.partial=(...a)=>bT(X1,e,a[0]),e.required=(...a)=>xT(P1,e,a[0])});function ta(e,o){const a={type:"object",shape:e??{},...Ce(o)};return new uO(a)}const fO=fe("ZodUnion",(e,o)=>{XA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>uk(e,a,i,s),e.options=o.options});function dO(e,o){return new fO({type:"union",options:e,...Ce(o)})}const hO=fe("ZodIntersection",(e,o)=>{PA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>fk(e,a,i,s)});function mO(e,o){return new hO({type:"intersection",left:e,right:o})}const pO=fe("ZodRecord",(e,o)=>{QA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>dk(e,a,i,s),e.keyType=o.keyType,e.valueType=o.valueType});function ai(e,o,a){return new pO({type:"record",keyType:e,valueType:o,...Ce(a)})}const Dh=fe("ZodEnum",(e,o)=>{KA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(i,s,c)=>rk(e,i,s),e.enum=o.entries,e.options=Object.values(o.entries);const a=new Set(Object.keys(o.entries));e.extract=(i,s)=>{const c={};for(const u of i)if(a.has(u))c[u]=o.entries[u];else throw new Error(`Key ${u} not found in enum`);return new Dh({...o,checks:[],...Ce(s),entries:c})},e.exclude=(i,s)=>{const c={...o.entries};for(const u of i)if(a.has(u))delete c[u];else throw new Error(`Key ${u} not found in enum`);return new Dh({...o,checks:[],...Ce(s),entries:c})}});function mm(e,o){const a=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Dh({type:"enum",entries:a,...Ce(o)})}const gO=fe("ZodTransform",(e,o)=>{JA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>lk(e,a),e._zod.parse=(a,i)=>{if(i.direction==="backward")throw new C1(e.constructor.name);a.addIssue=c=>{if(typeof c=="string")a.issues.push(Cl(c,a.value,o));else{const u=c;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=a.value),u.inst??(u.inst=e),a.issues.push(Cl(u))}};const s=o.transform(a.value,a);return s instanceof Promise?s.then(c=>(a.value=c,a)):(a.value=s,a)}});function yO(e){return new gO({type:"transform",transform:e})}const X1=fe("ZodOptional",(e,o)=>{Z1.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>G1(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function Uv(e){return new X1({type:"optional",innerType:e})}const vO=fe("ZodExactOptional",(e,o)=>{FA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>G1(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function bO(e){return new vO({type:"optional",innerType:e})}const xO=fe("ZodNullable",(e,o)=>{WA.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>hk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function Zv(e){return new xO({type:"nullable",innerType:e})}const SO=fe("ZodDefault",(e,o)=>{eM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>pk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wO(e,o){return new SO({type:"default",innerType:e,get defaultValue(){return typeof o=="function"?o():A1(o)}})}const _O=fe("ZodPrefault",(e,o)=>{tM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>gk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function EO(e,o){return new _O({type:"prefault",innerType:e,get defaultValue(){return typeof o=="function"?o():A1(o)}})}const P1=fe("ZodNonOptional",(e,o)=>{nM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>mk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function CO(e,o){return new P1({type:"nonoptional",innerType:e,...Ce(o)})}const NO=fe("ZodCatch",(e,o)=>{oM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>yk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zO(e,o){return new NO({type:"catch",innerType:e,catchValue:typeof o=="function"?o:()=>o})}const TO=fe("ZodPipe",(e,o)=>{aM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>vk(e,a,i,s),e.in=o.in,e.out=o.out});function Bv(e,o){return new TO({type:"pipe",in:e,out:o})}const AO=fe("ZodReadonly",(e,o)=>{rM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>bk(e,a,i,s),e.unwrap=()=>e._zod.def.innerType});function MO(e){return new AO({type:"readonly",innerType:e})}const kO=fe("ZodCustom",(e,o)=>{iM.init(e,o),ft.init(e,o),e._zod.processJSONSchema=(a,i,s)=>ik(e,a)});function OO(e,o={}){return KM(kO,e,o)}function DO(e){return JM(e)}const $v={id:"claude-code",display:{name:"Claude Code",icon:"claude",color:"#D97706"},cli:{command:"claude",mcp:{add:["mcp","add-json"],remove:["mcp","remove"]}},paths:{mcp:"~/.claude.json",projectMcp:".claude/mcp.json",skills:"~/.claude/skills",projectSkills:".claude/skills/",globalMemory:"~/.claude/CLAUDE.md",projectMemory:"CLAUDE.md",agents:"~/.claude/agents/",projectAgents:".claude/agents/",rules:null,hooks:"~/.claude/settings.json",commands:null,backupDirs:["~/.claude","~/"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","agents","hooks"],enabled:!0,memoryMaxLines:200},Vv={id:"codex",display:{name:"Codex CLI",icon:"openai",color:"#10A37F"},cli:{command:"codex",mcp:{add:["mcp","add"],remove:["mcp","remove"]}},paths:{mcp:"~/.codex/config.toml",projectMcp:null,skills:"~/.codex/skills",projectSkills:null,globalMemory:"~/.codex/AGENTS.md",projectMemory:"AGENTS.md",agents:null,projectAgents:null,rules:".codex/rules/",hooks:"~/.codex/config.toml",commands:null,backupDirs:["~/.codex"]},mcp:{format:"toml",key:"mcp.servers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","rules","hooks"],enabled:!0,memoryMaxLines:null},Yv={id:"gemini-cli",display:{name:"Gemini CLI",icon:"gemini",color:"#4285F4"},cli:{command:"gemini",mcp:{add:["mcp","add"],remove:["mcp","remove"],enable:["mcp","enable"],disable:["mcp","disable"]}},paths:{mcp:"~/.gemini/settings.json",projectMcp:null,skills:"~/.gemini/extensions",projectSkills:null,globalMemory:"~/.gemini/GEMINI.md",projectMemory:"GEMINI.md",agents:null,projectAgents:null,rules:null,hooks:"~/.gemini/settings.json",commands:null,backupDirs:["~/.gemini"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","hooks"],enabled:!0,memoryMaxLines:null},qv={id:"opencode",display:{name:"OpenCode",icon:"opencode",color:"#6366F1"},cli:null,paths:{mcp:"~/.config/opencode/opencode.json",projectMcp:null,skills:"~/.config/opencode/plugin",projectSkills:null,globalMemory:"~/.opencode/context.md",projectMemory:null,agents:"~/.config/opencode/agents/",projectAgents:".opencode/agents/",rules:null,hooks:"~/.config/opencode/settings.json",commands:"~/.config/opencode/commands/",backupDirs:["~/.config/opencode"]},mcp:{format:"json",key:"mcp",entryShape:"opencode"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","agents","hooks","commands"],enabled:!0,memoryMaxLines:null},Gv={id:"openclaw",display:{name:"OpenClaw",icon:"openclaw",color:"#EC4899"},cli:null,paths:{mcp:"~/.openclaw/openclaw.json",projectMcp:null,skills:"~/.openclaw/workspace/skills",projectSkills:null,globalMemory:"~/.openclaw/workspace/MEMORY.md",projectMemory:null,agents:"~/.openclaw/workspace/agents",projectAgents:null,rules:null,hooks:"~/.openclaw/hooks/",commands:null,backupDirs:["~/.openclaw"]},mcp:{format:"json",key:"plugins.entries",entryShape:"openclaw"},scopes:["shared","personal"],capabilities:["mcp","skills","memory","hooks","agents"],enabled:!0,memoryMaxLines:null},Iv={id:"aider",display:{name:"Aider",icon:"aider",color:"#22C55E"},cli:null,paths:{mcp:"~/.aider/mcp-servers.json",projectMcp:null,skills:"~/.aider/plugins",projectSkills:null,globalMemory:"~/.aider/MEMORY.md",projectMemory:null,agents:null,projectAgents:null,rules:"CONVENTIONS.md",hooks:null,commands:null,backupDirs:["~/.aider"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","rules"],enabled:!0,memoryMaxLines:null},Xv={id:"cursor",display:{name:"Cursor",icon:"cursor",color:"#00D4AA"},cli:{command:"cursor"},paths:{mcp:"~/.cursor/mcp.json",projectMcp:".cursor/mcp.json",skills:null,projectSkills:null,globalMemory:null,projectMemory:".cursorrules",agents:null,projectAgents:".cursor/agents/",rules:".cursor/rules/",hooks:".cursor/hooks.json",commands:".cursor/commands/",backupDirs:["~/.cursor"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","memory","rules","agents","hooks","commands"],enabled:!0,memoryMaxLines:null},Pv={id:"vscode",display:{name:"VS Code",icon:"vscode",color:"#007ACC"},cli:{command:"code"},paths:{mcp:{darwin:"~/Library/Application Support/Code/User/mcp.json",linux:"~/.config/Code/User/mcp.json",win32:"%APPDATA%/Code/User/mcp.json"},projectMcp:".vscode/mcp.json",skills:null,projectSkills:".github/skills/",globalMemory:null,projectMemory:".github/copilot-instructions.md",agents:null,projectAgents:".github/agents/",rules:".github/instructions/",hooks:null,commands:null,backupDirs:[]},mcp:{format:"jsonc",key:"servers",entryShape:"vscode"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","agents","rules"],enabled:!0,memoryMaxLines:null},Qv={id:"antigravity",display:{name:"Antigravity",icon:"antigravity",color:"#FF6B35"},cli:{command:"agy"},paths:{mcp:"~/.gemini/antigravity/mcp_config.json",projectMcp:null,skills:"~/.gemini/antigravity/skills/",projectSkills:".agent/skills/",globalMemory:"~/.gemini/antigravity/rules.md",projectMemory:".antigravity/rules.md",agents:null,projectAgents:".agent/",rules:null,hooks:null,commands:null,backupDirs:["~/.gemini/antigravity"]},mcp:{format:"json",key:"mcpServers",entryShape:"standard"},scopes:["shared","coding"],capabilities:["mcp","skills","memory","agents"],enabled:!0,memoryMaxLines:null},pm={[$v.id]:$v,[Vv.id]:Vv,[Yv.id]:Yv,[qv.id]:qv,[Gv.id]:Gv,[Iv.id]:Iv,[Xv.id]:Xv,[Pv.id]:Pv,[Qv.id]:Qv},jO=Object.keys(pm),RO=jO,Va=mm(RO),Q1=ta({command:Ht(),args:ho(Ht()).optional(),env:ai(Ht(),Ht()).optional(),enabled:hm().optional().default(!0),tools:ho(Va).optional(),excludeTools:ho(Va).optional()});ta({mcps:ai(Ht(),Q1)});const LO=ta({name:Ht(),description:Ht().optional(),version:Ht().optional(),author:Ht().optional(),tools:ho(Va).optional(),excludeTools:ho(Va).optional(),enabled:hm().optional().default(!0)}),HO=mm(["shared","coding","personal"]),UO=ta({syncTo:ho(Va),excludeFrom:ho(Va).optional(),path:Ht(),files:ho(Ht())}),K1=ta({scopes:ai(HO,UO)});ta({version:Ht(),tools:ai(Va,ta({enabled:hm()})),memory:K1});ta({hostname:Ht(),mcps:ai(Ht(),Q1.partial()).optional(),skills:ai(Ht(),LO.partial()).optional(),memory:K1.partial().optional()});function ZO({svg:e,size:o=16}){const a=e.replace(/<svg\b/,`<svg width="${o}" height="${o}"`);return x.jsx("span",{dangerouslySetInnerHTML:{__html:a},style:{display:"inline-flex",lineHeight:0}})}const BO={claude:tT,openai:nT,gemini:oT,opencode:aT,openclaw:rT,aider:iT,cursor:lT,vscode:sT,antigravity:cT},$O=Object.fromEntries(Object.values(pm).map(e=>[e.display.name,x.jsx(ZO,{svg:BO[e.display.icon]??""})]));function gm({status:e}){const o={synced:"bg-green-500 shadow-green-500/50",pending:"bg-yellow-500 shadow-yellow-500/50",error:"bg-red-500 shadow-red-500/50",disabled:"bg-gray-500",not_installed:"bg-gray-700 border border-gray-500"};return x.jsx("span",{"data-testid":`node-status-${e}`,className:Le("inline-block w-2.5 h-2.5 rounded-full shadow-sm",o[e])})}function VO({data:e,sourcePosition:o,targetPosition:a}){const i=e.installed!==!1;return x.jsxs("div",{className:Le("px-4 py-3 rounded-lg border-2 bg-card shadow-lg min-w-[130px] transition-colors",i?"border-primary/60 hover:border-primary":"border-gray-600 opacity-50"),children:[x.jsx(pn,{type:"target",position:a??he.Top,className:"!bg-primary !w-3 !h-3"}),x.jsxs("div",{className:"flex items-center gap-2",children:[$O[e.name]??null,x.jsx(gm,{status:i?e.status:"not_installed"}),x.jsx("span",{className:Le("font-medium text-sm",!i&&"text-gray-500"),children:e.name})]}),!i&&x.jsx("div",{className:"text-[10px] text-gray-500 mt-1",children:"Not installed"}),x.jsx(pn,{type:"source",position:o??he.Bottom,className:"!bg-primary !w-3 !h-3"})]})}const YO=N.memo(VO);function qO({data:e,sourcePosition:o,targetPosition:a}){const i=e.enabled!==!1,s={skill:{border:"border-blue-500/60",bg:"bg-[#0c1529]"},mcp:{border:"border-purple-500/60",bg:"bg-[#150c29]"},memory:{border:"border-amber-500/60",bg:"bg-[#1a1408]"}},c=s[e.type]||s.skill;return x.jsxs("div",{className:Le("px-3 py-2 rounded-md border shadow-md min-w-[110px] transition-colors hover:border-white/40",c.border,c.bg,!i&&"opacity-50"),children:[x.jsx(pn,{type:"target",position:a??he.Top,className:"!bg-muted !w-2 !h-2"}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(gm,{status:i?e.status:"disabled"}),x.jsx("span",{className:"text-sm font-medium truncate max-w-[100px]",children:e.name}),x.jsx("button",{role:"switch","aria-checked":i,"aria-label":`Toggle ${e.name}`,onClick:u=>{u.stopPropagation(),e.onToggle?.(e.type,e.name,!i)},className:Le("ml-auto relative inline-flex h-4 w-7 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors",i?"bg-primary":"bg-muted"),children:x.jsx("span",{className:Le("pointer-events-none inline-block h-3 w-3 rounded-full bg-white shadow-sm transition-transform",i?"translate-x-3":"translate-x-0")})})]}),x.jsx("div",{className:"text-[10px] text-muted-foreground mt-0.5 uppercase tracking-wider",children:e.type}),x.jsx(pn,{type:"source",position:o??he.Bottom,className:"!bg-muted !w-2 !h-2"})]})}const GO=N.memo(qO);const J1=(...e)=>e.filter((o,a,i)=>!!o&&o.trim()!==""&&i.indexOf(o)===a).join(" ").trim();const IO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const XO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,a,i)=>i?i.toUpperCase():a.toLowerCase());const Kv=e=>{const o=XO(e);return o.charAt(0).toUpperCase()+o.slice(1)};var PO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const QO=e=>{for(const o in e)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};const KO=N.forwardRef(({color:e="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:s="",children:c,iconNode:u,...d},p)=>N.createElement("svg",{ref:p,...PO,width:o,height:o,stroke:e,strokeWidth:i?Number(a)*24/Number(o):a,className:J1("lucide",s),...!c&&!QO(d)&&{"aria-hidden":"true"},...d},[...u.map(([m,y])=>N.createElement(m,y)),...Array.isArray(c)?c:[c]]));const Ll=(e,o)=>{const a=N.forwardRef(({className:i,...s},c)=>N.createElement(KO,{ref:c,iconNode:o,className:J1(`lucide-${IO(Kv(e))}`,`lucide-${e}`,i),...s}));return a.displayName=Kv(e),a};const JO=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],F1=Ll("bot",JO);const FO=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],W1=Ll("library",FO);const WO=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],eS=Ll("sparkles",WO);const e6=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],tS=Ll("terminal",e6);const t6=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],nS=Ll("webhook",t6);function n6({data:e,sourcePosition:o,targetPosition:a}){const i=e.enabled!==!1;return x.jsxs("div",{className:Le("px-3 py-2 rounded-md border shadow-md min-w-[110px] transition-colors hover:border-white/40 cursor-pointer","border-teal-500/60","bg-[#081a1a]",!i&&"opacity-50"),onClick:()=>e.onClick?.(e.name),children:[x.jsx(pn,{type:"target",position:a??he.Top,className:"!bg-muted !w-2 !h-2"}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(gm,{status:i?"synced":"disabled"}),x.jsx("span",{className:"text-sm font-medium truncate max-w-[120px]",children:e.name}),x.jsx("button",{role:"switch","aria-checked":i,"aria-label":`Toggle ${e.name}`,onClick:s=>{s.stopPropagation(),e.onToggle?.(e.name,!i)},className:Le("ml-auto relative inline-flex h-4 w-7 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors",i?"bg-primary":"bg-muted"),children:x.jsx("span",{className:Le("pointer-events-none inline-block h-3 w-3 rounded-full bg-white shadow-sm transition-transform",i?"translate-x-3":"translate-x-0")})})]}),x.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5 text-[10px] text-muted-foreground",children:[e.skillCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Skills",children:[x.jsx(eS,{size:10,className:"text-purple-400"}),e.skillCount]}),e.agentCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Agents",children:[x.jsx(F1,{size:10,className:"text-emerald-400"}),e.agentCount]}),e.commandCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Commands",children:[x.jsx(tS,{size:10,className:"text-blue-400"}),e.commandCount]}),e.hookCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Hooks",children:[x.jsx(nS,{size:10,className:"text-amber-400"}),e.hookCount]}),e.libCount>0&&x.jsxs("span",{className:"flex items-center gap-0.5",title:"Libraries",children:[x.jsx(W1,{size:10,className:"text-pink-400"}),e.libCount]})]}),x.jsx(pn,{type:"source",position:o??he.Bottom,className:"!bg-muted !w-2 !h-2"})]})}const o6=N.memo(n6);function a6({data:e,sourcePosition:o,targetPosition:a}){return x.jsxs("div",{className:"px-4 py-3 rounded-lg border-2 border-dashed border-muted-foreground/40 bg-card/50 shadow-md min-w-[130px] cursor-pointer hover:border-primary/60 hover:bg-card transition-colors",onClick:()=>e.onClick?.(),children:[x.jsx(pn,{type:"target",position:a??he.Top,className:"!bg-muted !w-3 !h-3"}),x.jsxs("div",{className:"flex items-center gap-2 justify-center",children:[x.jsx("span",{className:"text-lg text-muted-foreground",children:"+"}),x.jsx("span",{className:"font-medium text-sm text-muted-foreground",children:"Add Tool"})]}),x.jsx(pn,{type:"source",position:o??he.Bottom,className:"!bg-muted !w-3 !h-3"})]})}const r6=N.memo(a6),Ya={tool:{width:160,height:60},addTool:{width:160,height:60},resource:{width:170,height:58},plugin:{width:180,height:68}},na={width:160,height:55},jn={skill:"#3b82f6",mcp:"#a855f7",memory:"#f59e0b",plugin:"#14b8a6",custom:"#6b7280",disabled:"#ef4444"},il={synced:"#22c55e",pending:"#eab308",error:"#ef4444",not_installed:"#374151",fallback:"#6b7280"},ml={strokeWidth:1.5,disabledDashArray:"5,5",disabledOpacity:.4},Ma={strokeDasharray:"6,4",opacity:.55,fontSize:13,labelBgOpacity:.9,labelBgRadius:8,labelPadding:[5,5]},mn={horizontalSpacing:180,addToolSpacing:160,layers:{top:0,middle:200,bottom:400}},Jv={color:"#333",gap:20},Fv="smoothstep",jh="DOWN",Hr={layout:"mycelium:graph:layout",edgeType:"mycelium:graph:edgeType",radialMode:"mycelium:graph:radialMode"},Rh="sectors";function xc(e,o){const a=new Map;for(const g of e)g.installed&&a.set(g.toolId,{id:g.toolId,name:g.toolName,installed:!0});const i=Array.from(a.values()).map(g=>({id:g.id,name:g.name,status:o.tools[g.id]!==!1?"synced":"disabled",installed:!0})),s=new Map,c=[];for(const g of e)for(const v of g.skills)if(v.marketplace&&v.pluginName){const S=`${v.marketplace}/${v.pluginName}`,w=s.get(S);w?w.skills.includes(v.name)||w.skills.push(v.name):s.set(S,{marketplace:v.marketplace,skills:[v.name],enabled:o.skills[v.name]!==!1})}else c.push({name:v.name,status:"pending",enabled:o.skills[v.name]!==!1,connectedTools:[g.toolId]});const u=Array.from(s.entries()).map(([g,v])=>({name:g.split("/")[1]||g,marketplace:v.marketplace,componentCount:v.skills.length,enabled:v.skills.some(w=>o.skills[w]!==!1),skills:v.skills})),d=new Set,p=[];for(const g of e)for(const v of g.mcps)d.has(v.name)||(d.add(v.name),p.push({name:v.name,status:"pending",enabled:o.mcps[v.name]!==!1,connectedTools:[g.toolId]}));const m=new Set,y=[];for(const g of e)for(const v of g.memory)m.has(v.name)||(m.add(v.name),y.push({name:v.name,scope:"shared",status:"pending"}));return{tools:i,skills:c,mcps:p,memory:y,plugins:u}}const i6=Object.values(pm).map(e=>({id:e.id,name:e.display.name,status:"synced",installed:!0}));function Sc(e,o){return{stroke:e,strokeWidth:ml.strokeWidth,...o?{}:{strokeDasharray:ml.disabledDashArray,opacity:ml.disabledOpacity}}}function l6(e,o,a,i){const s=[],c=[],u=e?.tools||i6,d=a?u:u.filter(m=>m.installed!==!1);d.forEach((m,y)=>{s.push({id:`tool-${m.id}`,type:"tool",position:{x:y*mn.horizontalSpacing,y:mn.layers.middle},data:{name:m.name,status:m.status,installed:m.installed,__elkLayer:"NONE"}})});const p=new Set;return e?.plugins?.forEach(m=>{m.skills.forEach(y=>p.add(y))}),e?.plugins?.forEach((m,y)=>{const g=`plugin-${m.name}`;s.push({id:g,type:"plugin",position:{x:y*mn.horizontalSpacing,y:mn.layers.top},data:{__elkLayer:"FIRST",name:m.name,marketplace:m.marketplace,componentCount:m.componentCount,skillCount:m.skills?.length??0,agentCount:m.agents?.length??0,commandCount:m.commands?.length??0,hookCount:m.hooks?.length??0,libCount:m.libs?.length??0,enabled:m.enabled,onToggle:(v,S)=>i.onPluginToggle?.(v,S),onClick:v=>i.onPluginClick?.(v)}}),d.filter(v=>v.installed).forEach(v=>{c.push({id:`${g}-to-tool-${v.id}`,source:g,target:`tool-${v.id}`,animated:m.enabled,style:Sc(jn.plugin,m.enabled)})})}),e?.skills.forEach((m,y)=>{if(p.has(m.name))return;const g=`skill-${m.name}`;s.push({id:g,type:"resource",position:{x:y*mn.horizontalSpacing,y:mn.layers.top},data:{name:m.name,type:"skill",status:m.status,enabled:m.enabled,onToggle:i.handleToggle,__elkLayer:"FIRST"}});const v=m.enabled!==!1;(m.connectedTools||d.filter(w=>w.installed).map(w=>w.id)).forEach(w=>{d.some(_=>_.id===w)&&c.push({id:`${g}-to-${w}`,source:g,target:`tool-${w}`,animated:v&&m.status==="synced",style:Sc(jn.skill,v)})})}),e?.mcps.forEach((m,y)=>{const g=`mcp-${m.name}`;s.push({id:g,type:"resource",position:{x:y*mn.horizontalSpacing,y:mn.layers.bottom},data:{name:m.name,type:"mcp",status:m.status,enabled:m.enabled,onToggle:i.handleToggle}});const v=m.enabled!==!1;(m.connectedTools||d.filter(w=>w.installed).map(w=>w.id)).forEach(w=>{d.some(_=>_.id===w)&&c.push({id:`tool-${w}-to-${g}`,source:`tool-${w}`,target:g,animated:v&&m.status==="synced",style:Sc(jn.mcp,v)})})}),e?.memory.forEach((m,y)=>{const g=`memory-${m.name}`;s.push({id:g,type:"resource",position:{x:y*mn.horizontalSpacing,y:mn.layers.bottom},data:{name:m.name,type:"memory",status:m.status,onToggle:i.handleToggle,__elkLayer:"LAST"}});let v;m.scope==="personal"?v=["openclaw"]:m.scope==="coding"?v=d.filter(S=>S.id!=="openclaw"&&S.installed).map(S=>S.id):v=d.filter(S=>S.installed).map(S=>S.id),v.forEach(S=>{d.some(w=>w.id===S)&&c.push({id:`tool-${S}-to-${g}`,source:`tool-${S}`,target:g,animated:m.status==="synced",style:Sc(jn.memory,!0)})})}),o==="migrate"&&s.push({id:"add-tool",type:"addTool",position:{x:d.length*mn.addToolSpacing,y:mn.layers.top},data:{onClick:i.onAddTool}}),{initialNodes:s,initialEdges:c}}function Lh(e){return e.type==="tool"||e.type==="addTool"?"tool":e.type==="plugin"?"plugin":e.data?.type==="skill"?"skill":e.data?.type==="mcp"?"mcp":e.data?.type==="memory"?"memory":"other"}const s6=["plugin","skill","tool","mcp","memory"];function yu(e){const o=new Map;for(const a of s6)o.set(a,[]);for(const a of e){const i=Lh(a);o.has(i)||o.set(i,[]),o.get(i).push(a)}return o}function c6(e,o,a){const i=a==="RIGHT",s=yu(e),c=30,u=120,d=[],p=[[...s.get("plugin")??[],...s.get("skill")??[]],s.get("tool")??[],s.get("mcp")??[],s.get("memory")??[]].filter(w=>w.length>0),m=w=>{const _=w.measured;return _?.width&&_?.height?{width:_.width,height:_.height}:Ya[w.type||""]||na},y=p.map(w=>w.reduce((_,T)=>{const z=m(T);return _+(i?z.height:z.width)},0)),g=p.map((w,_)=>y[_]+(w.length-1)*c),v=Math.max(...g);let S=0;for(let w=0;w<p.length;w++){const _=p[w],T=g[w],z=(v-T)/2;let H=0,E=z;for(const M of _){const R=m(M),D=i?R.width:R.height,O=i?R.height:R.width;H=Math.max(H,D),d.push({...M,zIndex:10,position:i?{x:S,y:E}:{x:E,y:S},sourcePosition:i?he.Right:he.Bottom,targetPosition:i?he.Left:he.Top}),E+=O+c}S+=H+u}return{nodes:d,edges:o}}function oS(e){const o=new Map;return e.forEach((a,i)=>{o.set(a.id,i/e.length*2*Math.PI-Math.PI/2)}),o}function aS(e,o){const a=new Map;for(const i of e){if(o.has(i.source)){const s=a.get(i.target)??[];s.push(i.source),a.set(i.target,s)}if(o.has(i.target)){const s=a.get(i.source)??[];s.push(i.target),a.set(i.source,s)}}return a}function Fc(e,o,a){const i=o.get(e.id)??[];if(i.length===0)return Math.PI;const s=i.map(d=>a.get(d)??0),c=s.reduce((d,p)=>d+Math.sin(p),0),u=s.reduce((d,p)=>d+Math.cos(p),0);return Math.atan2(c/s.length,u/s.length)}function Wc(e,o,a,i,s){const c=Ya[e.type||""]?.width??na.width,u=Ya[e.type||""]?.height??na.height;return{...e,zIndex:10,position:{x:o+i*Math.cos(s)-c/2,y:a+i*Math.sin(s)-u/2},sourcePosition:he.Bottom,targetPosition:he.Top}}function u6(e,o,a=40,i=30,s=50){const c=s/100,u=[];let d=o;for(const p of e){if(p.length===0){u.push(d);continue}const m=Math.max(...p.map(w=>Ya[w.type||""]?.width??na.width)),y=Math.max(...p.map(w=>Ya[w.type||""]?.height??na.height)),g=p.length*(m+i)/(2*Math.PI)*c,v=d+Math.max(m,y)*c+a,S=Math.max(g,v);u.push(S),d=S}return u}function f6(e,o,a=60,i=150,s=50){const c=yu(e),u=c.get("tool")??[],d=u.length<=1?0:i,p=oS(u),m=aS(o,p),y=[[...c.get("plugin")??[],...c.get("skill")??[]],c.get("mcp")??[],c.get("memory")??[]],g=u6(y,d,a,a/2,s),v=Math.max(d,...g),S=v+200,w=v+200,_=[];for(const T of u)_.push(Wc(T,S,w,d,p.get(T.id)));for(let T=0;T<y.length;T++){if(y[T].length===0)continue;const z=[...y[T]].sort((H,E)=>Fc(H,m,p)-Fc(E,m,p));z.forEach((H,E)=>{_.push(Wc(H,S,w,g[T],E/z.length*2*Math.PI-Math.PI/2))})}return{nodes:_,edges:o}}function d6(e,o,a=60,i=150,s=50){const c=yu(e),u=c.get("tool")??[],d=oS(u),p=aS(o,d),m=u.length<=1?0:i,y=[{cat:["plugin"],centerAngle:-Math.PI*3/4,label:"Plugins (top-left)"},{cat:["memory"],centerAngle:-Math.PI/4,label:"Memory (top-right)"},{cat:["skill"],centerAngle:Math.PI*3/4,label:"Skills (bottom-left)"},{cat:["mcp"],centerAngle:Math.PI/4,label:"MCPs (bottom-right)"}],g=Math.PI/2,v=g*.42,S=[];for(const I of y){const W=[];for(const L of I.cat)W.push(...c.get(L)??[]);S.push(W)}const w=6,_=40,T=na.width,z=Math.max(...S.map(I=>I.length),1),H=Math.min(w,z),E=s/100,M=H*(T+_)/g*E,R=Math.max(m+a,M),D=a+40,O=Math.max(...S.map(I=>Math.ceil(I.length/w)),1),Z=R+O*D+100,$=Z+200,oe=Z+200,q=[];for(const I of u)q.push(Wc(I,$,oe,m,d.get(I.id)));for(let I=0;I<y.length;I++){const W=y[I],L=S[I];if(L.length===0)continue;const Y=[...L].sort((U,j)=>Fc(U,p,d)-Fc(j,p,d)),A=Math.ceil(Y.length/w);for(let U=0;U<A;U++){const j=Y.slice(U*w,(U+1)*w),Q=R+U*D;j.forEach((re,k)=>{const V=j.length<=1?0:(k/(j.length-1)-.5)*2*v;q.push(Wc(re,$,oe,Q,W.centerAngle+V))})}}return{nodes:q,edges:o}}function h6(e,o,a=60,i=150,s=50){const d=(yu(e).get("tool")??[]).length<=1?0:i,p=a*(1+s/50),m={tool:d,plugin:d+p,skill:d+p,mcp:d+p*2,memory:d+p*3},y=d+p*3+200,g=y+200,v=y+200,S=[...e],w=new Map,_=[],T=new Map,z=new Map;for(const R of S){const D=Lh(R),O=m[D]??d+300,Z=T.get(O)??0;T.set(O,Z+1)}for(const[R]of T)z.set(R,0);for(const R of S){const D=Lh(R),O=m[D]??d+300,Z=T.get(O)??1,$=z.get(O)??0;z.set(O,$+1);const oe=$/Z*2*Math.PI-Math.PI/2;w.set(R.id,_.length),_.push({node:R,x:g+O*Math.cos(oe),y:v+O*Math.sin(oe),vx:0,vy:0,targetR:O,fixed:D==="tool"})}const H=80,E=.3;for(let R=0;R<H;R++){const D=1-R/H;for(const O of o){const Z=w.get(O.source),$=w.get(O.target);if(Z===void 0||$===void 0)continue;const oe=_[Z],q=_[$],I=q.x-oe.x,W=q.y-oe.y,L=Math.sqrt(I*I+W*W)||1,Y=Math.abs(oe.targetR-q.targetR)*.8+100,A=(L-Y)/L*.02*D;oe.fixed||(oe.vx+=I*A,oe.vy+=W*A),q.fixed||(q.vx-=I*A,q.vy-=W*A)}for(let O=0;O<_.length;O++)if(!_[O].fixed)for(let Z=O+1;Z<_.length;Z++){const $=_[Z].x-_[O].x,oe=_[Z].y-_[O].y,q=Math.sqrt($*$+oe*oe)||1,I=200;if(q<I){const W=(I-q)/q*.25*D;_[O].fixed||(_[O].vx-=$*W,_[O].vy-=oe*W),_[Z].fixed||(_[Z].vx+=$*W,_[Z].vy+=oe*W)}}for(const O of _){if(O.fixed)continue;O.x+=O.vx*E,O.y+=O.vy*E,O.vx*=.7,O.vy*=.7;const Z=O.x-g,$=O.y-v,oe=Math.sqrt(Z*Z+$*$)||1,q=Math.atan2($,Z),I=oe+(O.targetR-oe)*.3;O.x=g+I*Math.cos(q),O.y=v+I*Math.sin(q)}}return{nodes:_.map(R=>{const D=Ya[R.node.type||""]?.width??na.width,O=Ya[R.node.type||""]?.height??na.height;return{...R.node,zIndex:10,position:{x:R.x-D/2,y:R.y-O/2},sourcePosition:he.Bottom,targetPosition:he.Top}}),edges:o}}function m6(e,o,a="hybrid",i=60,s=150,c=50){switch(a){case"sectors":return d6(e,o,i,s,c);case"force":return h6(e,o,i,s,c);default:return f6(e,o,i,s,c)}}async function wc(e,o,a=jh,i=Rh,s=60,c=150,u=50){return a==="RADIAL"?m6(e,o,i,s,c,u):c6(e,o,a)}const p6={tool:YO,resource:GO,plugin:o6,addTool:r6};function rS({data:e,mode:o="dashboard",onNodeClick:a,onToggle:i,onPluginToggle:s,onPluginClick:c,onMcpClick:u,onSkillClick:d,onAddTool:p,onEdgeToggle:m,disabledEdges:y,showUninstalledTools:g=!1}){const[v,S,w]=_4([]),[_,T,z]=E4([]),H=N.useRef(null),[E,M]=N.useState(()=>{try{return localStorage.getItem(Hr.layout)||jh}catch{return jh}}),[R,D]=N.useState(()=>{try{return localStorage.getItem(Hr.edgeType)||Fv}catch{return Fv}}),[O,Z]=N.useState(()=>{try{return localStorage.getItem(Hr.radialMode)||Rh}catch{return Rh}}),[$,oe]=N.useState(60),[q,I]=N.useState(150),[W,L]=N.useState(50),Y=N.useMemo(()=>{try{return new URLSearchParams(window.location.search).has("debug")}catch{return!1}},[]),A=N.useCallback(me=>{M(me);try{localStorage.setItem(Hr.layout,me)}catch{}},[]),U=N.useCallback(me=>{D(me);try{localStorage.setItem(Hr.edgeType,me)}catch{}},[]),j=N.useCallback(me=>{Z(me);try{localStorage.setItem(Hr.radialMode,me)}catch{}},[]),[Q,re]=N.useState(new Set),k=y??Q,V=N.useRef(i);V.current=i;const F=N.useRef(s);F.current=s;const ee=N.useRef(c);ee.current=c;const P=N.useRef(p);P.current=p;const se=N.useCallback((me,ze,it)=>{V.current?.({type:me,name:ze,enabled:it})},[]),ne=N.useMemo(()=>({handleToggle:se,onToggle:me=>V.current?.(me),onPluginToggle:(me,ze)=>F.current?.(me,ze),onPluginClick:me=>ee.current?.(me),onAddTool:()=>P.current?.()}),[se]),{initialNodes:le,initialEdges:de}=N.useMemo(()=>l6(e,o,g,ne),[e,o,g,ne]),Ee=N.useMemo(()=>_.map(me=>k.has(me.id)?{...me,animated:!1,interactionWidth:30,style:{stroke:jn.disabled,strokeWidth:ml.strokeWidth,strokeDasharray:Ma.strokeDasharray,opacity:Ma.opacity},label:"✕",labelStyle:{fill:jn.disabled,fontSize:Ma.fontSize,fontWeight:700,cursor:"pointer"},labelBgStyle:{fill:"#1a1a1a",fillOpacity:Ma.labelBgOpacity,rx:Ma.labelBgRadius,ry:Ma.labelBgRadius},labelBgPadding:Ma.labelPadding}:{...me,type:R,interactionWidth:30}),[_,k,R]),we=N.useRef(!1),ve=N.useRef(!1);N.useEffect(()=>{le.length>0&&(ve.current=!1,wc(le,de,E,O,$,q,W).then(({nodes:me,edges:ze})=>{S(me),T(ze),we.current||(we.current=!0,setTimeout(()=>H.current?.(),50))}))},[le,de,E,O,$,q,W,S,T]);const _e=N4();N.useEffect(()=>{_e&&v.length>0&&!ve.current&&(ve.current=!0,wc(v,_,E,O,$,q,W).then(({nodes:me,edges:ze})=>{S(me),T(ze)}))},[_e]);const Me=N.useCallback(me=>{A(me),wc(v,_,me,O,$,q,W).then(({nodes:ze,edges:it})=>{S(ze),T(it),setTimeout(()=>H.current?.(),50)})},[v,_,O,$,q,W,S,T,A]),Ye=N.useCallback(me=>{j(me),wc(v,_,"RADIAL",me,$,q,W).then(({nodes:ze,edges:it})=>{S(ze),T(it),setTimeout(()=>H.current?.(),50)})},[v,_,$,q,W,S,T,j]),$e=N.useCallback(()=>{},[]),dt=N.useCallback(me=>{T(ze=>Mx({...me,animated:!0,style:{stroke:jn.custom,strokeWidth:ml.strokeWidth}},ze))},[T]),Qt=N.useCallback((me,ze)=>{const it=k.has(ze.id);m?m(ze.id,it):re(Bn=>{const lt=new Set(Bn);return it?lt.delete(ze.id):lt.add(ze.id),lt})},[k,m]),Ot=N.useCallback((me,ze)=>{if(a?.(ze),ze.type==="plugin")ee.current?.(ze.data.name);else if(ze.type==="resource"){const it=ze.data;it.type==="mcp"?u?.(it.name):it.type==="skill"&&d?.(it.name)}},[a,u,d]);return x.jsx("div",{"data-testid":"react-flow-graph",className:"w-full h-full",children:x.jsxs(w4,{nodes:v,edges:Ee,onNodesChange:w,onEdgesChange:z,nodeTypes:p6,onNodeClick:Ot,onNodeDragStop:$e,onEdgeClick:Qt,onConnect:dt,onInit:me=>{H.current=()=>me.fitView({padding:.2,duration:300})},fitView:!0,minZoom:.3,maxZoom:2,defaultViewport:{x:0,y:0,zoom:.8},children:[x.jsxs(Rl,{position:"top-right",className:"flex gap-2",children:[x.jsx("button",{onClick:()=>Me("DOWN"),className:Le("px-3 py-1.5 rounded text-xs font-medium transition-colors",E==="DOWN"?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:"Vertical"}),x.jsx("button",{onClick:()=>Me("RIGHT"),className:Le("px-3 py-1.5 rounded text-xs font-medium transition-colors",E==="RIGHT"?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:"Horizontal"}),x.jsx("button",{onClick:()=>Me("RADIAL"),className:Le("px-3 py-1.5 rounded text-xs font-medium transition-colors",E==="RADIAL"?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:"Radial"}),E==="RADIAL"&&Y&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"mx-1 text-muted-foreground/40",children:"|"}),["hybrid","sectors","force"].map(me=>x.jsx("button",{onClick:()=>Ye(me),className:Le("px-2 py-1.5 rounded text-[10px] font-medium transition-colors capitalize",O===me?"bg-emerald-600 text-white":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:me},me)),x.jsx("span",{className:"mx-1 text-muted-foreground/40",children:"|"}),x.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",title:"Density: 0=tight, 100=spacious",children:["Density",x.jsx("input",{type:"range",min:0,max:100,step:5,value:W,onChange:me=>L(Number(me.target.value)),className:"w-20 h-1 accent-orange-500"}),x.jsx("span",{className:"w-6 text-right font-mono",children:W})]}),x.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",title:"Center ring size",children:["Center",x.jsx("input",{type:"range",min:0,max:500,step:5,value:q,onChange:me=>I(Number(me.target.value)),className:"w-20 h-1 accent-cyan-500"}),x.jsx("span",{className:"w-6 text-right font-mono",children:q})]}),x.jsxs("label",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",title:"Gap between rings",children:["Gap",x.jsx("input",{type:"range",min:0,max:500,step:5,value:$,onChange:me=>oe(Number(me.target.value)),className:"w-20 h-1 accent-emerald-500"}),x.jsx("span",{className:"w-6 text-right font-mono",children:$})]})]}),x.jsx("span",{className:"mx-1 text-muted-foreground/40",children:"|"}),["smoothstep","default","straight","step"].map(me=>x.jsx("button",{onClick:()=>U(me),className:Le("px-2 py-1.5 rounded text-[10px] font-medium transition-colors capitalize",R===me?"bg-purple-600 text-white":"bg-secondary text-secondary-foreground hover:bg-secondary/80"),children:me==="default"?"bezier":me},me))]}),x.jsx(k4,{color:Jv.color,gap:Jv.gap}),x.jsx(U4,{className:"!bg-card !border-border [&>button]:!bg-card [&>button]:!border-border"}),x.jsx(J4,{className:"!bg-card/80 !border-border",maskColor:"rgba(0,0,0,0.8)",nodeColor:me=>{const ze=me.data;return ze?.status==="synced"?il.synced:ze?.status==="pending"?il.pending:ze?.status==="error"?il.error:ze?.status==="not_installed"?il.not_installed:ze?.type==="skill"?jn.skill:ze?.type==="mcp"?jn.mcp:ze?.type==="memory"?jn.memory:il.fallback}})]})})}let iS=!1;try{iS=globalThis.localStorage?.getItem("mycelium:debug:panel")==="1"}catch{}const ih=(...e)=>{iS&&console.log("[panel]",...e)},g6={skill:{label:"Skills",color:"text-purple-400",icon:x.jsx(eS,{size:14,className:"text-purple-400"})},agent:{label:"Agents",color:"text-emerald-400",icon:x.jsx(F1,{size:14,className:"text-emerald-400"})},command:{label:"Commands",color:"text-blue-400",icon:x.jsx(tS,{size:14,className:"text-blue-400"})},hook:{label:"Hooks",color:"text-amber-400",icon:x.jsx(nS,{size:14,className:"text-amber-400"})},lib:{label:"Libraries",color:"text-pink-400",icon:x.jsx(W1,{size:14,className:"text-pink-400"})}};function y6(e){if(!e)return{};const o=new Set(e.disabledItems??[]),a={},i=[...e.skills,...e.agents,...e.commands,...e.hooks??[],...e.libs??[]];for(const s of i)a[s]=!o.has(s);return a}function lS({plugin:e,onClose:o,onTogglePlugin:a,onToggleItem:i,onRemoveItem:s}){const c=N.useMemo(()=>y6(e),[e]),[u,d]=N.useState(null),p=u??c,[m,y]=N.useState(!1),[g,v]=N.useState("closed"),S=N.useRef(null),w=N.useRef(null);N.useEffect(()=>{ih("useEffect",{animState:g,plugin:e?.name??null}),e?(S.current=e,w.current!==e.name&&(d(null),w.current=e.name),v(D=>D==="closed"?"opening":D)):(g==="open"||g==="opening")&&v("closing")},[e]);const _=N.useCallback(D=>{D.target===D.currentTarget&&(ih("animEnd",{animState:g,anim:D.animationName}),g==="opening"?v("open"):g==="closing"&&(v("closed"),S.current=null))},[g]),T=N.useCallback(()=>{ih("handleClose",{animState:g}),v("closing"),o()},[o,g]);if(g==="closed")return null;const z=S.current;if(!z)return null;const H=g==="opening"||g==="open",E=D=>{const O={};for(const Z of Object.keys(p))O[Z]=D;d(O),a(z.name,D)},M=[{type:"skill",items:z.skills},{type:"agent",items:z.agents},{type:"command",items:z.commands},{type:"hook",items:z.hooks??[]},{type:"lib",items:z.libs??[]}].filter(D=>D.items.length>0),R=M.reduce((D,O)=>D+O.items.length,0);return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:Le("fixed inset-0 z-40 bg-black/50",H?"animate-fade-in":"animate-fade-out"),onClick:T}),x.jsxs("div",{role:"dialog","aria-label":z.name,className:Le("fixed right-0 top-0 z-50 h-full w-96 overflow-y-auto border-l bg-card text-card-foreground shadow-xl",H?"animate-slide-in-right":"animate-slide-out-right"),onAnimationEnd:_,children:[x.jsxs("div",{className:"flex items-start justify-between border-b p-4",children:[x.jsxs("div",{children:[x.jsx("h2",{className:"text-lg font-bold",children:z.name}),x.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[z.version&&x.jsxs("span",{className:"text-sm text-muted-foreground",children:["v",z.version]}),x.jsx("span",{className:"rounded-full bg-teal-500/10 px-2 py-0.5 text-xs text-teal-400 border border-teal-500/30",children:z.marketplace})]}),z.author&&x.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["by ",z.author]}),x.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[R," components"]})]}),x.jsx("button",{onClick:T,className:"rounded-md p-1 text-muted-foreground hover:bg-muted hover:text-foreground","aria-label":"Close",children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),x.jsx("div",{className:"border-b p-4",children:x.jsx("p",{className:"text-sm text-muted-foreground",children:z.description})}),x.jsxs("div",{className:"flex gap-2 border-b p-4",children:[x.jsx("button",{onClick:()=>E(!0),className:Le("flex-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",Object.values(p).some(D=>!D)?"bg-primary text-primary-foreground":"border bg-background text-foreground hover:bg-muted"),children:"Enable All"}),x.jsx("button",{onClick:()=>E(!1),className:Le("flex-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",Object.values(p).some(Boolean)?"bg-destructive text-destructive-foreground":"border bg-background text-foreground hover:bg-muted"),children:"Disable All"})]}),M.map(({type:D,items:O})=>{const Z=g6[D]??{label:D,color:"text-muted-foreground",icon:"?"};return x.jsxs("div",{className:"border-b p-4",children:[x.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm font-medium",children:[Z.icon,x.jsx("span",{className:Le("font-bold",Z.color),children:Z.label}),x.jsx("span",{className:"rounded-full bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:O.length})]}),x.jsx("div",{className:"space-y-2",children:O.map($=>x.jsxs("div",{className:"flex items-center justify-between rounded-md border px-3 py-2",children:[x.jsx("span",{className:"text-sm",children:$}),x.jsx("button",{onClick:()=>{const oe=!p[$];d(q=>({...q??c,[$]:oe})),i?.(z.name,$,oe)},className:Le("relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors",p[$]?"bg-primary":"bg-muted"),role:"switch","aria-checked":p[$],"aria-label":`Toggle ${$}`,children:x.jsx("span",{className:Le("pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform",p[$]?"translate-x-4":"translate-x-0")})})]},$))})]},D)}),s&&x.jsxs("div",{className:"p-4",children:[x.jsx("h3",{className:"mb-2 text-sm font-medium text-destructive",children:"Danger Zone"}),x.jsxs("button",{onClick:()=>y(!0),className:"w-full rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm font-medium text-destructive hover:bg-destructive/20",children:["Remove ",z.marketplace==="system"?"MCP":z.marketplace==="standalone"?"Skill":"Plugin"]}),x.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["This removes it from ~/.mycelium. Run ",x.jsx("code",{className:"bg-muted px-1 rounded",children:"mycelium sync"})," to propagate to all tools."]})]})]}),m&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60",onClick:()=>y(!1)}),x.jsxs("div",{className:"fixed left-1/2 top-1/2 z-[70] w-80 -translate-x-1/2 -translate-y-1/2 rounded-lg border bg-card p-6 shadow-2xl",children:[x.jsxs("h3",{className:"text-lg font-bold text-destructive",children:["Remove ",z.name,"?"]}),x.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["This will remove all components (",R," total) from ~/.mycelium. Run ",x.jsx("code",{className:"bg-muted px-1 rounded text-xs",children:"mycelium sync"})," after to propagate."]}),x.jsxs("div",{className:"mt-4 flex gap-2",children:[x.jsx("button",{onClick:()=>{const D=z.marketplace==="system"?"mcp":z.marketplace==="standalone"?"skill":"plugin";s?.(D,z.name),y(!1),o()},className:"flex-1 rounded-md bg-destructive px-3 py-2 text-sm font-medium text-destructive-foreground hover:bg-destructive/90",children:"Yes, remove"}),x.jsx("button",{onClick:()=>y(!1),className:"flex-1 rounded-md border px-3 py-2 text-sm font-medium hover:bg-muted",children:"Cancel"})]})]})]})]})}async function ll(){return(await fetch("/api/state")).json()}async function v6(e){await fetch("/api/toggle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function b6(){return(await fetch("/api/migrate/scan")).json()}async function x6(e){return(await fetch("/api/migrate/apply",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}async function S6(e,o){const a=new URLSearchParams({q:e});return o&&a.set("source",o),(await fetch(`/api/marketplace/search?${a}`)).json()}async function w6(e,o){return(await fetch("/api/marketplace/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,source:o})})).json()}async function _6(){return(await fetch("/api/marketplace/registry")).json()}async function E6(e,o){await fetch("/api/marketplace/registry",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...o})})}async function C6(e){await fetch(`/api/marketplace/registry/${encodeURIComponent(e)}`,{method:"DELETE"})}async function N6(e){return(await fetch("/api/plugins")).json()}async function z6(e,o){return(await fetch("/api/plugins/toggle",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,enabled:o})})).json()}async function T6(e,o,a,i){return(await fetch(`/api/plugins/${encodeURIComponent(e)}/items/${encodeURIComponent(o)}/toggle`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:a,...i})})).json()}async function Wv(){return(await fetch("/api/marketplace/popular")).json()}async function A6(e){return(await fetch(`/api/remove/skill/${encodeURIComponent(e)}`,{method:"DELETE"})).json()}async function M6(e){return(await fetch(`/api/remove/mcp/${encodeURIComponent(e)}`,{method:"DELETE"})).json()}async function k6(e){return(await fetch(`/api/remove/plugin/${encodeURIComponent(e)}`,{method:"DELETE"})).json()}async function O6(e,o){return(await fetch("/api/marketplace/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,source:o})})).json()}function D6({onClose:e}){const[o,a]=N.useState("scan"),[i,s]=N.useState(!1),[c,u]=N.useState([]),[d,p]=N.useState(null),[m,y]=N.useState(0),[g,v]=N.useState({skills:{},mcps:{},memory:{},tools:{}}),[S,w]=N.useState(null);async function _(){s(!0),p(null);try{const $=await b6();u($);const oe={},q={},I={},W={};for(const L of $){L.installed&&(W[L.toolId]=!0);for(const Y of L.skills)oe[Y.name]=!0;for(const Y of L.mcps)q[Y.name]=!0;for(const Y of L.memory)I[Y.name]=!0}v({skills:oe,mcps:q,memory:I,tools:W}),a("review")}catch($){p($.message??"Scan failed")}finally{s(!1)}}async function T(){p(null),a("apply");try{const $=xc(c,g),oe=Object.entries(g.skills).filter(([,Y])=>Y).map(([Y])=>Y),q=Object.entries(g.mcps).filter(([,Y])=>Y).map(([Y])=>Y),I=Object.entries(g.memory).filter(([,Y])=>Y).map(([Y])=>Y),W={skills:$.plugins.flatMap(Y=>Y.skills.filter(A=>oe.includes(A)).map(A=>({name:A,source:"scan"}))),mcps:$.mcps.filter(Y=>q.includes(Y.name)).map(Y=>({name:Y.name,source:"scan",config:{command:"",args:[]}})),memory:$.memory.filter(Y=>I.includes(Y.name)).map(Y=>({name:Y.name,source:"scan",content:""})),conflicts:[]},L=await x6(W);y(L.skillsImported+L.mcpsImported+L.memoryImported),a("done")}catch($){p($.message??"Migration failed"),a("review")}}const z=N.useCallback($=>{v(oe=>{const q=$.type==="skill"?"skills":$.type==="mcp"?"mcps":$.type==="memory"?"memory":null;return q?{...oe,[q]:{...oe[q],[$.name]:$.enabled}}:oe})},[]),H=N.useCallback($=>{const q=xc(c,g).plugins.find(I=>I.name===$);q&&w({name:q.name,marketplace:q.marketplace,version:"scanned",description:`${q.componentCount} components from ${q.marketplace}`,enabled:q.enabled,skills:q.skills,agents:[],commands:[],hooks:[],libs:[]})},[c,g]),E=N.useCallback(($,oe)=>{const I=xc(c,g).plugins.find(W=>W.name===$);I&&v(W=>{const L={...W.skills};for(const Y of I.skills)L[Y]=oe;return{...W,skills:L}}),w(W=>W?{...W,enabled:oe}:null)},[c,g]),M=N.useCallback(()=>{console.log("Add tool destination")},[]),R=c.length>0?xc(c,g):void 0,D=Object.values(g.skills).filter(Boolean).length+Object.values(g.mcps).filter(Boolean).length+Object.values(g.memory).filter(Boolean).length,O={scan:"Scan",review:"Review",apply:"Apply",done:"Done"},Z=["scan","review","apply","done"];return x.jsxs("div",{className:"space-y-6",children:[x.jsx("div",{className:"flex items-center justify-center gap-2",children:Z.map(($,oe)=>x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:Le("flex h-8 w-8 items-center justify-center rounded-full text-sm font-medium",$===o?"bg-primary text-primary-foreground":Z.indexOf(o)>oe?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:oe+1}),x.jsx("span",{className:"text-sm",children:O[$]}),oe<Z.length-1&&x.jsx("div",{className:"h-px w-8 bg-border"})]},$))}),d&&x.jsx("div",{className:"rounded-lg border border-red-500/50 bg-red-500/10 p-3 text-sm text-red-500",children:d}),o==="scan"&&x.jsxs("div",{className:"rounded-lg border bg-card p-6 text-card-foreground shadow-sm",children:[x.jsx("h2",{className:"text-lg font-semibold",children:"Scan for Tools"}),x.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Detect installed AI tools and their configurations to migrate into Mycelium."}),x.jsx("button",{onClick:_,disabled:i,className:"mt-4 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50",children:i?"Scanning...":"Start Scan"})]}),o==="review"&&R&&x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4 text-card-foreground shadow-sm",children:[x.jsxs("div",{className:"flex gap-6 text-sm",children:[x.jsxs("span",{children:[x.jsx("strong",{children:R.plugins.length})," plugins"]}),x.jsxs("span",{children:[x.jsx("strong",{children:Object.values(g.skills).filter(Boolean).length})," skills"]}),x.jsxs("span",{children:[x.jsx("strong",{children:Object.values(g.mcps).filter(Boolean).length})," MCPs"]}),x.jsxs("span",{children:[x.jsx("strong",{children:Object.values(g.memory).filter(Boolean).length})," memory"]}),x.jsxs("span",{className:"text-muted-foreground",children:["→ ",x.jsx("strong",{children:R.tools.length})," destinations"]})]}),x.jsxs("div",{className:"flex gap-2",children:[x.jsx("button",{onClick:()=>a("scan"),className:"rounded-md border px-4 py-2 text-sm hover:bg-muted",children:"Rescan"}),x.jsxs("button",{onClick:T,disabled:D===0,className:"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50",children:["Apply (",D," items)"]})]})]}),x.jsx("div",{className:"h-[500px] rounded-lg border bg-card/50",children:x.jsx(rm,{children:x.jsx(rS,{mode:"migrate",data:R,showUninstalledTools:!1,onToggle:z,onPluginClick:H,onAddTool:M})})}),x.jsx("p",{className:"text-center text-sm text-muted-foreground",children:"Click plugin nodes to select individual skills. Toggle nodes to include/exclude from migration."})]}),o==="apply"&&x.jsxs("div",{className:"rounded-lg border bg-card p-6 text-card-foreground shadow-sm",children:[x.jsx("h2",{className:"text-lg font-semibold",children:"Applying Migration"}),x.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[x.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"}),x.jsx("span",{className:"text-sm text-muted-foreground",children:"Migrating configurations..."})]})]}),o==="done"&&x.jsxs("div",{className:"rounded-lg border bg-card p-6 text-card-foreground shadow-sm",children:[x.jsx("h2",{className:"text-lg font-semibold",children:"Migration Complete"}),x.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Successfully migrated ",m," items into Mycelium."]}),x.jsxs("div",{className:"mt-4 flex gap-2",children:[x.jsx("button",{onClick:()=>{a("scan"),u([])},className:"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",children:"Scan Again"}),e&&x.jsx("button",{onClick:e,className:"rounded-md border px-4 py-2 text-sm hover:bg-muted",children:"Close"})]})]}),x.jsx(lS,{plugin:S,onClose:()=>w(null),onTogglePlugin:E})]})}const j6={skill:{label:"Skill",color:"text-purple-400",bgColor:"bg-purple-500/10",borderColor:"border-purple-500/30",fileExt:".md"},mcp:{label:"MCP",color:"text-blue-400",bgColor:"bg-blue-500/10",borderColor:"border-blue-500/30",fileExt:".yaml"},plugin:{label:"Plugin",color:"text-amber-400",bgColor:"bg-amber-500/10",borderColor:"border-amber-500/30",fileExt:".json"},agent:{label:"Agent",color:"text-emerald-400",bgColor:"bg-emerald-500/10",borderColor:"border-emerald-500/30",fileExt:".md"},template:{label:"Template",color:"text-pink-400",bgColor:"bg-pink-500/10",borderColor:"border-pink-500/30",fileExt:".yaml"}},R6={label:"Item",color:"text-gray-400",bgColor:"bg-gray-500/10",borderColor:"border-gray-500/30",fileExt:".md"},L6={skill:"⚙",mcp:"⚡",plugin:"⬢",agent:"▶",template:"▦"};function H6(e){return j6[e]||R6}function eb(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function U6({item:e,installing:o,updating:a,expanded:i,onInstall:s,onUpdate:c,onToggleExpand:u}){const d=`${e.source}-${e.name}`,p=o===d,m=a===d,y=e.installed&&e.latestVersion&&e.installedVersion&&e.latestVersion!==e.installedVersion,g=H6(e.type),v=L6[e.type]||"●";return x.jsxs("div",{className:Le("group rounded-xl border bg-card text-sm shadow-sm transition-all cursor-pointer","hover:shadow-md hover:border-primary/40",g.borderColor,i&&"ring-2 ring-primary/30 shadow-md",e.installed&&"border-green-500/40"),onClick:()=>u(d),children:[x.jsx("div",{className:"px-4 pt-4 pb-2",children:x.jsxs("div",{className:"flex items-start justify-between gap-2",children:[x.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[x.jsx("div",{className:Le("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-base",g.bgColor,g.color),children:v}),x.jsxs("div",{className:"min-w-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"font-semibold text-foreground truncate",children:e.name}),e.installed&&x.jsx("span",{className:"shrink-0 rounded-full bg-green-500/15 px-1.5 py-0.5 text-[10px] font-medium text-green-400",children:"Installed"}),y&&x.jsx("span",{className:"shrink-0 rounded-full bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-400",children:"Update"})]}),e.author&&x.jsx("span",{className:"text-xs text-muted-foreground",children:e.author})]})]}),x.jsx("span",{className:Le("shrink-0 rounded-md px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",g.bgColor,g.color),children:g.label})]})}),x.jsx("div",{className:"px-4 pb-3",children:x.jsx("p",{className:Le("text-xs text-muted-foreground leading-relaxed",!i&&"line-clamp-2"),children:e.description})}),x.jsxs("div",{className:"flex items-center gap-3 px-4 pb-3 text-xs text-muted-foreground",children:[e.stars!=null&&x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx("span",{className:"text-yellow-400",children:"★"}),eb(e.stars)]}),e.downloads!=null&&x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx("span",{className:"text-muted-foreground/60",children:"↓"}),eb(e.downloads)]}),e.latestVersion&&x.jsxs("span",{className:"font-mono",children:["v",e.latestVersion]}),x.jsx("span",{className:Le("ml-auto rounded-full px-2 py-0.5 text-[10px]",g.bgColor,g.color),children:e.source})]}),i&&x.jsxs("div",{className:"border-t border-border/50 px-4 py-3 space-y-3",children:[e.category&&x.jsx("div",{className:"flex flex-wrap gap-1.5",children:x.jsx("span",{className:"rounded-full bg-primary/15 px-2 py-0.5 text-[10px] text-primary font-medium",children:e.category})}),(e.installedVersion||e.latestVersion)&&x.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.installedVersion&&x.jsxs("span",{children:["Installed: ",x.jsxs("span",{className:"font-mono",children:["v",e.installedVersion]})]}),e.latestVersion&&x.jsxs("span",{children:["Latest: ",x.jsxs("span",{className:"font-mono",children:["v",e.latestVersion]})]})]}),e.updatedAt&&x.jsxs("div",{className:"text-xs text-muted-foreground",children:["Updated: ",e.updatedAt]}),x.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[y&&x.jsx("button",{onClick:S=>{S.stopPropagation(),c(e)},disabled:m,className:"rounded-md px-3 py-1.5 text-xs font-medium bg-yellow-500/15 text-yellow-400 hover:bg-yellow-500/25 disabled:opacity-50 transition-colors",children:m?"Updating...":"Update"}),x.jsx("button",{onClick:S=>{S.stopPropagation(),s(e)},disabled:e.installed||p,className:Le("rounded-md px-4 py-1.5 text-xs font-medium transition-colors",e.installed?"border border-green-500/30 text-green-400 bg-green-500/10":"bg-primary text-primary-foreground hover:bg-primary/90","disabled:opacity-50"),children:e.installed?"Installed":p?"Installing...":"Install"})]})]}),!i&&x.jsxs("div",{className:"flex items-center justify-end px-4 pb-3",children:[y&&x.jsx("button",{onClick:S=>{S.stopPropagation(),c(e)},disabled:m,className:"mr-2 rounded-md px-2.5 py-1 text-[11px] font-medium text-yellow-400 hover:bg-yellow-500/15 disabled:opacity-50 transition-colors",children:m?"...":"Update"}),x.jsx("button",{onClick:S=>{S.stopPropagation(),s(e)},disabled:e.installed||p,className:Le("rounded-md px-3 py-1 text-[11px] font-medium transition-colors",e.installed?"text-green-400 bg-green-500/10":"bg-primary/80 text-primary-foreground hover:bg-primary","disabled:opacity-50"),children:e.installed?"Installed":p?"...":"Install"})]})]})}function Fo(e,o,{checkForDefaultPrevented:a=!0}={}){return function(s){if(e?.(s),a===!1||!s.defaultPrevented)return o?.(s)}}function tb(e,o){if(typeof e=="function")return e(o);e!=null&&(e.current=o)}function sS(...e){return o=>{let a=!1;const i=e.map(s=>{const c=tb(s,o);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let s=0;s<i.length;s++){const c=i[s];typeof c=="function"?c():tb(e[s],null)}}}}function Ia(...e){return N.useCallback(sS(...e),e)}function Z6(e,o){const a=N.createContext(o),i=c=>{const{children:u,...d}=c,p=N.useMemo(()=>d,Object.values(d));return x.jsx(a.Provider,{value:p,children:u})};i.displayName=e+"Provider";function s(c){const u=N.useContext(a);if(u)return u;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[i,s]}function B6(e,o=[]){let a=[];function i(c,u){const d=N.createContext(u),p=a.length;a=[...a,u];const m=g=>{const{scope:v,children:S,...w}=g,_=v?.[e]?.[p]||d,T=N.useMemo(()=>w,Object.values(w));return x.jsx(_.Provider,{value:T,children:S})};m.displayName=c+"Provider";function y(g,v){const S=v?.[e]?.[p]||d,w=N.useContext(S);if(w)return w;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${c}\``)}return[m,y]}const s=()=>{const c=a.map(u=>N.createContext(u));return function(d){const p=d?.[e]||c;return N.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return s.scopeName=e,[i,$6(s,...o)]}function $6(...e){const o=e[0];if(e.length===1)return o;const a=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const u=i.reduce((d,{useScope:p,scopeName:m})=>{const g=p(c)[`__scope${m}`];return{...d,...g}},{});return N.useMemo(()=>({[`__scope${o.scopeName}`]:u}),[u])}};return a.scopeName=o.scopeName,a}var Nl=globalThis?.document?N.useLayoutEffect:()=>{},V6=_b[" useId ".trim().toString()]||(()=>{}),Y6=0;function lh(e){const[o,a]=N.useState(V6());return Nl(()=>{a(i=>i??String(Y6++))},[e]),e||(o?`radix-${o}`:"")}var q6=_b[" useInsertionEffect ".trim().toString()]||Nl;function G6({prop:e,defaultProp:o,onChange:a=()=>{},caller:i}){const[s,c,u]=I6({defaultProp:o,onChange:a}),d=e!==void 0,p=d?e:s;{const y=N.useRef(e!==void 0);N.useEffect(()=>{const g=y.current;g!==d&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=d},[d,i])}const m=N.useCallback(y=>{if(d){const g=X6(y)?y(e):y;g!==e&&u.current?.(g)}else c(y)},[d,e,c,u]);return[p,m]}function I6({defaultProp:e,onChange:o}){const[a,i]=N.useState(e),s=N.useRef(a),c=N.useRef(o);return q6(()=>{c.current=o},[o]),N.useEffect(()=>{s.current!==a&&(c.current?.(a),s.current=a)},[a,s]),[a,i,c]}function X6(e){return typeof e=="function"}function cS(e){const o=P6(e),a=N.forwardRef((i,s)=>{const{children:c,...u}=i,d=N.Children.toArray(c),p=d.find(K6);if(p){const m=p.props.children,y=d.map(g=>g===p?N.Children.count(m)>1?N.Children.only(null):N.isValidElement(m)?m.props.children:null:g);return x.jsx(o,{...u,ref:s,children:N.isValidElement(m)?N.cloneElement(m,void 0,y):null})}return x.jsx(o,{...u,ref:s,children:c})});return a.displayName=`${e}.Slot`,a}function P6(e){const o=N.forwardRef((a,i)=>{const{children:s,...c}=a;if(N.isValidElement(s)){const u=F6(s),d=J6(c,s.props);return s.type!==N.Fragment&&(d.ref=i?sS(i,u):u),N.cloneElement(s,d)}return N.Children.count(s)>1?N.Children.only(null):null});return o.displayName=`${e}.SlotClone`,o}var Q6=Symbol("radix.slottable");function K6(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q6}function J6(e,o){const a={...o};for(const i in o){const s=e[i],c=o[i];/^on[A-Z]/.test(i)?s&&c?a[i]=(...d)=>{const p=c(...d);return s(...d),p}:s&&(a[i]=s):i==="style"?a[i]={...s,...c}:i==="className"&&(a[i]=[s,c].filter(Boolean).join(" "))}return{...e,...a}}function F6(e){let o=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?e.ref:(o=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var W6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],go=W6.reduce((e,o)=>{const a=cS(`Primitive.${o}`),i=N.forwardRef((s,c)=>{const{asChild:u,...d}=s,p=u?a:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...d,ref:c})});return i.displayName=`Primitive.${o}`,{...e,[o]:i}},{});function eD(e,o){e&&qx.flushSync(()=>e.dispatchEvent(o))}function zl(e){const o=N.useRef(e);return N.useEffect(()=>{o.current=e}),N.useMemo(()=>(...a)=>o.current?.(...a),[])}function tD(e,o=globalThis?.document){const a=zl(e);N.useEffect(()=>{const i=s=>{s.key==="Escape"&&a(s)};return o.addEventListener("keydown",i,{capture:!0}),()=>o.removeEventListener("keydown",i,{capture:!0})},[a,o])}var nD="DismissableLayer",Hh="dismissableLayer.update",oD="dismissableLayer.pointerDownOutside",aD="dismissableLayer.focusOutside",nb,uS=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fS=N.forwardRef((e,o)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,onDismiss:d,...p}=e,m=N.useContext(uS),[y,g]=N.useState(null),v=y?.ownerDocument??globalThis?.document,[,S]=N.useState({}),w=Ia(o,O=>g(O)),_=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),z=_.indexOf(T),H=y?_.indexOf(y):-1,E=m.layersWithOutsidePointerEventsDisabled.size>0,M=H>=z,R=lD(O=>{const Z=O.target,$=[...m.branches].some(oe=>oe.contains(Z));!M||$||(s?.(O),u?.(O),O.defaultPrevented||d?.())},v),D=sD(O=>{const Z=O.target;[...m.branches].some(oe=>oe.contains(Z))||(c?.(O),u?.(O),O.defaultPrevented||d?.())},v);return tD(O=>{H===m.layers.size-1&&(i?.(O),!O.defaultPrevented&&d&&(O.preventDefault(),d()))},v),N.useEffect(()=>{if(y)return a&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(nb=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),ob(),()=>{a&&m.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=nb)}},[y,v,a,m]),N.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),ob())},[y,m]),N.useEffect(()=>{const O=()=>S({});return document.addEventListener(Hh,O),()=>document.removeEventListener(Hh,O)},[]),x.jsx(go.div,{...p,ref:w,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:Fo(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Fo(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Fo(e.onPointerDownCapture,R.onPointerDownCapture)})});fS.displayName=nD;var rD="DismissableLayerBranch",iD=N.forwardRef((e,o)=>{const a=N.useContext(uS),i=N.useRef(null),s=Ia(o,i);return N.useEffect(()=>{const c=i.current;if(c)return a.branches.add(c),()=>{a.branches.delete(c)}},[a.branches]),x.jsx(go.div,{...e,ref:s})});iD.displayName=rD;function lD(e,o=globalThis?.document){const a=zl(e),i=N.useRef(!1),s=N.useRef(()=>{});return N.useEffect(()=>{const c=d=>{if(d.target&&!i.current){let p=function(){dS(oD,a,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(o.removeEventListener("click",s.current),s.current=p,o.addEventListener("click",s.current,{once:!0})):p()}else o.removeEventListener("click",s.current);i.current=!1},u=window.setTimeout(()=>{o.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),o.removeEventListener("pointerdown",c),o.removeEventListener("click",s.current)}},[o,a]),{onPointerDownCapture:()=>i.current=!0}}function sD(e,o=globalThis?.document){const a=zl(e),i=N.useRef(!1);return N.useEffect(()=>{const s=c=>{c.target&&!i.current&&dS(aD,a,{originalEvent:c},{discrete:!1})};return o.addEventListener("focusin",s),()=>o.removeEventListener("focusin",s)},[o,a]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function ob(){const e=new CustomEvent(Hh);document.dispatchEvent(e)}function dS(e,o,a,{discrete:i}){const s=a.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});o&&s.addEventListener(e,o,{once:!0}),i?eD(s,c):s.dispatchEvent(c)}var sh="focusScope.autoFocusOnMount",ch="focusScope.autoFocusOnUnmount",ab={bubbles:!1,cancelable:!0},cD="FocusScope",hS=N.forwardRef((e,o)=>{const{loop:a=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...u}=e,[d,p]=N.useState(null),m=zl(s),y=zl(c),g=N.useRef(null),v=Ia(o,_=>p(_)),S=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(i){let _=function(E){if(S.paused||!d)return;const M=E.target;d.contains(M)?g.current=M:Qo(g.current,{select:!0})},T=function(E){if(S.paused||!d)return;const M=E.relatedTarget;M!==null&&(d.contains(M)||Qo(g.current,{select:!0}))},z=function(E){if(document.activeElement===document.body)for(const R of E)R.removedNodes.length>0&&Qo(d)};document.addEventListener("focusin",_),document.addEventListener("focusout",T);const H=new MutationObserver(z);return d&&H.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",T),H.disconnect()}}},[i,d,S.paused]),N.useEffect(()=>{if(d){ib.add(S);const _=document.activeElement;if(!d.contains(_)){const z=new CustomEvent(sh,ab);d.addEventListener(sh,m),d.dispatchEvent(z),z.defaultPrevented||(uD(pD(mS(d)),{select:!0}),document.activeElement===_&&Qo(d))}return()=>{d.removeEventListener(sh,m),setTimeout(()=>{const z=new CustomEvent(ch,ab);d.addEventListener(ch,y),d.dispatchEvent(z),z.defaultPrevented||Qo(_??document.body,{select:!0}),d.removeEventListener(ch,y),ib.remove(S)},0)}}},[d,m,y,S]);const w=N.useCallback(_=>{if(!a&&!i||S.paused)return;const T=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,z=document.activeElement;if(T&&z){const H=_.currentTarget,[E,M]=fD(H);E&&M?!_.shiftKey&&z===M?(_.preventDefault(),a&&Qo(E,{select:!0})):_.shiftKey&&z===E&&(_.preventDefault(),a&&Qo(M,{select:!0})):z===H&&_.preventDefault()}},[a,i,S.paused]);return x.jsx(go.div,{tabIndex:-1,...u,ref:v,onKeyDown:w})});hS.displayName=cD;function uD(e,{select:o=!1}={}){const a=document.activeElement;for(const i of e)if(Qo(i,{select:o}),document.activeElement!==a)return}function fD(e){const o=mS(e),a=rb(o,e),i=rb(o.reverse(),e);return[a,i]}function mS(e){const o=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)o.push(a.currentNode);return o}function rb(e,o){for(const a of e)if(!dD(a,{upTo:o}))return a}function dD(e,{upTo:o}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(o!==void 0&&e===o)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hD(e){return e instanceof HTMLInputElement&&"select"in e}function Qo(e,{select:o=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&hD(e)&&o&&e.select()}}var ib=mD();function mD(){let e=[];return{add(o){const a=e[0];o!==a&&a?.pause(),e=lb(e,o),e.unshift(o)},remove(o){e=lb(e,o),e[0]?.resume()}}}function lb(e,o){const a=[...e],i=a.indexOf(o);return i!==-1&&a.splice(i,1),a}function pD(e){return e.filter(o=>o.tagName!=="A")}var gD="Portal",pS=N.forwardRef((e,o)=>{const{container:a,...i}=e,[s,c]=N.useState(!1);Nl(()=>c(!0),[]);const u=a||s&&globalThis?.document?.body;return u?Lz.createPortal(x.jsx(go.div,{...i,ref:o}),u):null});pS.displayName=gD;function yD(e,o){return N.useReducer((a,i)=>o[a][i]??a,e)}var vu=e=>{const{present:o,children:a}=e,i=vD(o),s=typeof a=="function"?a({present:i.isPresent}):N.Children.only(a),c=Ia(i.ref,bD(s));return typeof a=="function"||i.isPresent?N.cloneElement(s,{ref:c}):null};vu.displayName="Presence";function vD(e){const[o,a]=N.useState(),i=N.useRef(null),s=N.useRef(e),c=N.useRef("none"),u=e?"mounted":"unmounted",[d,p]=yD(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const m=_c(i.current);c.current=d==="mounted"?m:"none"},[d]),Nl(()=>{const m=i.current,y=s.current;if(y!==e){const v=c.current,S=_c(m);e?p("MOUNT"):S==="none"||m?.display==="none"?p("UNMOUNT"):p(y&&v!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),Nl(()=>{if(o){let m;const y=o.ownerDocument.defaultView??window,g=S=>{const _=_c(i.current).includes(CSS.escape(S.animationName));if(S.target===o&&_&&(p("ANIMATION_END"),!s.current)){const T=o.style.animationFillMode;o.style.animationFillMode="forwards",m=y.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=T)})}},v=S=>{S.target===o&&(c.current=_c(i.current))};return o.addEventListener("animationstart",v),o.addEventListener("animationcancel",g),o.addEventListener("animationend",g),()=>{y.clearTimeout(m),o.removeEventListener("animationstart",v),o.removeEventListener("animationcancel",g),o.removeEventListener("animationend",g)}}else p("ANIMATION_END")},[o,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:N.useCallback(m=>{i.current=m?getComputedStyle(m):null,a(m)},[])}}function _c(e){return e?.animationName||"none"}function bD(e){let o=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?e.ref:(o=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var uh=0;function xD(){N.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sb()),document.body.insertAdjacentElement("beforeend",e[1]??sb()),uh++,()=>{uh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),uh--}},[])}function sb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Rn=function(){return Rn=Object.assign||function(o){for(var a,i=1,s=arguments.length;i<s;i++){a=arguments[i];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])}return o},Rn.apply(this,arguments)};function gS(e,o){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&o.indexOf(i)<0&&(a[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)o.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(a[i[s]]=e[i[s]]);return a}function SD(e,o,a){if(a||arguments.length===2)for(var i=0,s=o.length,c;i<s;i++)(c||!(i in o))&&(c||(c=Array.prototype.slice.call(o,0,i)),c[i]=o[i]);return e.concat(c||Array.prototype.slice.call(o))}var jc="right-scroll-bar-position",Rc="width-before-scroll-bar",wD="with-scroll-bars-hidden",_D="--removed-body-scroll-bar-size";function fh(e,o){return typeof e=="function"?e(o):e&&(e.current=o),e}function ED(e,o){var a=N.useState(function(){return{value:e,callback:o,facade:{get current(){return a.value},set current(i){var s=a.value;s!==i&&(a.value=i,a.callback(i,s))}}}})[0];return a.callback=o,a.facade}var CD=typeof window<"u"?N.useLayoutEffect:N.useEffect,cb=new WeakMap;function ND(e,o){var a=ED(null,function(i){return e.forEach(function(s){return fh(s,i)})});return CD(function(){var i=cb.get(a);if(i){var s=new Set(i),c=new Set(e),u=a.current;s.forEach(function(d){c.has(d)||fh(d,null)}),c.forEach(function(d){s.has(d)||fh(d,u)})}cb.set(a,e)},[e]),a}function zD(e){return e}function TD(e,o){o===void 0&&(o=zD);var a=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(c){var u=o(c,i);return a.push(u),function(){a=a.filter(function(d){return d!==u})}},assignSyncMedium:function(c){for(i=!0;a.length;){var u=a;a=[],u.forEach(c)}a={push:function(d){return c(d)},filter:function(){return a}}},assignMedium:function(c){i=!0;var u=[];if(a.length){var d=a;a=[],d.forEach(c),u=a}var p=function(){var y=u;u=[],y.forEach(c)},m=function(){return Promise.resolve().then(p)};m(),a={push:function(y){u.push(y),m()},filter:function(y){return u=u.filter(y),a}}}};return s}function AD(e){e===void 0&&(e={});var o=TD(null);return o.options=Rn({async:!0,ssr:!1},e),o}var yS=function(e){var o=e.sideCar,a=gS(e,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=o.read();if(!i)throw new Error("Sidecar medium not found");return N.createElement(i,Rn({},a))};yS.isSideCarExport=!0;function MD(e,o){return e.useMedium(o),yS}var vS=AD(),dh=function(){},bu=N.forwardRef(function(e,o){var a=N.useRef(null),i=N.useState({onScrollCapture:dh,onWheelCapture:dh,onTouchMoveCapture:dh}),s=i[0],c=i[1],u=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,y=e.enabled,g=e.shards,v=e.sideCar,S=e.noRelative,w=e.noIsolation,_=e.inert,T=e.allowPinchZoom,z=e.as,H=z===void 0?"div":z,E=e.gapMode,M=gS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=v,D=ND([a,o]),O=Rn(Rn({},M),s);return N.createElement(N.Fragment,null,y&&N.createElement(R,{sideCar:vS,removeScrollBar:m,shards:g,noRelative:S,noIsolation:w,inert:_,setCallbacks:c,allowPinchZoom:!!T,lockRef:a,gapMode:E}),u?N.cloneElement(N.Children.only(d),Rn(Rn({},O),{ref:D})):N.createElement(H,Rn({},O,{className:p,ref:D}),d))});bu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bu.classNames={fullWidth:Rc,zeroRight:jc};var kD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function OD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var o=kD();return o&&e.setAttribute("nonce",o),e}function DD(e,o){e.styleSheet?e.styleSheet.cssText=o:e.appendChild(document.createTextNode(o))}function jD(e){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(e)}var RD=function(){var e=0,o=null;return{add:function(a){e==0&&(o=OD())&&(DD(o,a),jD(o)),e++},remove:function(){e--,!e&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},LD=function(){var e=RD();return function(o,a){N.useEffect(function(){return e.add(o),function(){e.remove()}},[o&&a])}},bS=function(){var e=LD(),o=function(a){var i=a.styles,s=a.dynamic;return e(i,s),null};return o},HD={left:0,top:0,right:0,gap:0},hh=function(e){return parseInt(e||"",10)||0},UD=function(e){var o=window.getComputedStyle(document.body),a=o[e==="padding"?"paddingLeft":"marginLeft"],i=o[e==="padding"?"paddingTop":"marginTop"],s=o[e==="padding"?"paddingRight":"marginRight"];return[hh(a),hh(i),hh(s)]},ZD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return HD;var o=UD(e),a=document.documentElement.clientWidth,i=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,i-a+o[2]-o[0])}},BD=bS(),Pr="data-scroll-locked",$D=function(e,o,a,i){var s=e.left,c=e.top,u=e.right,d=e.gap;return a===void 0&&(a="margin"),`
|
|
110
110
|
.`.concat(wD,` {
|
|
111
111
|
overflow: hidden `).concat(i,`;
|
|
112
112
|
padding-right: `).concat(d,"px ").concat(i,`;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Mycelium Control Center</title>
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Dnbmbu4D.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-quBYeTeA.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mycelish/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "CLI for Mycelium - Universal AI Tool Orchestrator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
40
|
"yaml": "^2.8.2",
|
|
41
41
|
"zod": "^4.3.6",
|
|
42
|
-
"@mycelish/core": "0.2.
|
|
42
|
+
"@mycelish/core": "0.2.2"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc && cp -r ../dashboard/dist dist/dashboard 2>/dev/null || true",
|