failproofai 1.0.13-beta.3 → 1.0.13

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.
Files changed (125) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +4 -4
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
  10. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  11. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  12. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
  18. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  19. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  20. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  30. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/index.html +1 -1
  33. package/.next/standalone/.next/server/app/index.rsc +3 -3
  34. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  35. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  36. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  37. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  38. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
  41. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  44. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  47. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  48. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  51. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  54. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/chunks/_0tovk6q0miud6._.js +1 -1
  57. package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +1 -1
  58. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4vkpxxu7._.js +1 -1
  59. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +1 -1
  60. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +1 -1
  61. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +1 -1
  62. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +1 -1
  63. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +1 -1
  64. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +1 -1
  65. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +1 -1
  66. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +1 -1
  67. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__070rqh7scntiu._.js → [root-of-the-server]__1jq2bh84rafc7._.js} +2 -2
  68. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +1 -1
  69. package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +1 -1
  70. package/.next/standalone/.next/server/chunks/ssr/_0ouu886szh6yj._.js +1 -1
  71. package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +1 -1
  72. package/.next/standalone/.next/server/chunks/ssr/{_1tcvpgd7hugnx._.js → _100nvr7rei3us._.js} +2 -2
  73. package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +1 -1
  74. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +2 -2
  75. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +1 -1
  76. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js +1 -1
  77. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +1 -1
  78. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +1 -1
  79. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +1 -1
  80. package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_1p-is71j0j7fb.js → node_modules_html-to-image_es_index_1cmkmhnty0-x7.js} +1 -1
  81. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuznb72p7z._.js +2 -2
  82. package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +1 -1
  83. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0agdmptetetdt._.js +1 -1
  84. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0mdwgjisv4fub._.js +1 -1
  85. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  86. package/.next/standalone/.next/server/pages/404.html +1 -1
  87. package/.next/standalone/.next/server/pages/500.html +1 -1
  88. package/.next/standalone/.next/server/preview-props.json +3 -3
  89. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
  91. package/.next/standalone/.next/static/chunks/{2sthn8c56n9m_.js → 0mm-e5t9denbu.js} +1 -1
  92. package/.next/standalone/.next/static/chunks/{095l2av-xsus2.js → 0rucj5pu307i4.js} +1 -1
  93. package/.next/standalone/.next/static/chunks/{19l5hbzn475am.js → 1-0se0uwja_ny.js} +1 -1
  94. package/.next/standalone/.next/static/chunks/{3m9g1l6-yh0s3.js → 173vw1xs-5m5g.js} +1 -1
  95. package/.next/standalone/.next/static/chunks/{1s__s2o5zcfcy.js → 20cme7d6wv6md.js} +1 -1
  96. package/.next/standalone/.next/static/chunks/2mz-k_jt_76xt.js +1 -0
  97. package/.next/standalone/.next/static/chunks/{1uxq_gbvdti30.js → 2u1m0f-wnhz44.js} +1 -1
  98. package/.next/standalone/.next/static/chunks/{3uaguc-tbu_ik.js → 2ytnb83xmjn3u.js} +1 -1
  99. package/.next/standalone/.next/static/chunks/{0h7mkux811w5b.js → 40g_e46c1-j4k.js} +1 -1
  100. package/.next/standalone/.next/static/chunks/44yz8zx53euy1.js +1 -0
  101. package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
  102. package/.next/standalone/package.json +11 -10
  103. package/.next/standalone/sdk/python/uv.lock +6 -6
  104. package/.next/standalone/sdk/typescript/package-lock.json +31 -61
  105. package/.next/standalone/sdk/typescript/package.json +3 -0
  106. package/.next/standalone/server.js +1 -1
  107. package/dist/cli.mjs +431 -243
  108. package/dist/worker.mjs +30 -2
  109. package/hermes-plugin/plugin.yaml +1 -1
  110. package/openclaw-plugin/daemon-client.js +254 -0
  111. package/openclaw-plugin/hooks.js +187 -0
  112. package/openclaw-plugin/index.js +17 -211
  113. package/package.json +11 -10
  114. package/src/hooks/antigravity-path-guard.ts +73 -0
  115. package/src/hooks/daemon-service.ts +188 -18
  116. package/src/hooks/enforcement-capability.ts +1 -1
  117. package/src/hooks/handler.ts +24 -0
  118. package/src/hooks/integrations.ts +5 -2
  119. package/src/hooks/shell-quote.ts +9 -0
  120. package/src/hooks/uninstall-cli.ts +30 -8
  121. package/.next/standalone/.next/static/chunks/3eonfpk9jyceg.js +0 -1
  122. package/.next/standalone/.next/static/chunks/3zwff_ax3hust.js +0 -1
  123. /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → 4MgI0mZP1iVhhocpUivMm}/_buildManifest.js +0 -0
  124. /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → 4MgI0mZP1iVhhocpUivMm}/_clientMiddlewareManifest.js +0 -0
  125. /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → 4MgI0mZP1iVhhocpUivMm}/_ssgManifest.js +0 -0
@@ -30,6 +30,14 @@ import { normalizeCliPayload } from "./normalize-cli-payload";
30
30
  import type { PolicyFunction, PolicyResult, HooksConfig } from "./policy-types";
31
31
  import { readMergedHooksConfig } from "./hooks-config";
32
32
  import { registerBuiltinPolicies } from "./builtin-policies";
33
+ import {
34
+ ANTIGRAVITY_PATH_GUARD_DESCRIPTION,
35
+ ANTIGRAVITY_PATH_GUARD_MATCH,
36
+ ANTIGRAVITY_PATH_GUARD_NAME,
37
+ antigravityCallLacksPath,
38
+ antigravityPathGuard,
39
+ antigravityPathGuardActive,
40
+ } from "./antigravity-path-guard";
33
41
  import { evaluatePolicies } from "./policy-evaluator";
34
42
  // Types only: the semantic (Jev) modules are loaded with a dynamic import, and
35
43
  // only once a Jev config exists, so an unconfigured machine never loads them.
@@ -839,6 +847,22 @@ export async function evaluateHookEvent(
839
847
  cli,
840
848
  });
841
849
  }
850
+ // Outside the enabled set, because the policies it protects may be the
851
+ // ones that cannot see the path. After the Cloud read, because a pause
852
+ // lifts this only while no enforcing Cloud policy is deployed: see
853
+ // `antigravityPathGuardActive`.
854
+ if (
855
+ cli === "antigravity" &&
856
+ antigravityPathGuardActive(Boolean(activePause), cloudManagedPolicies) &&
857
+ antigravityCallLacksPath(canonicalEventType, parsed.tool_name as string | undefined, parsed.tool_input)
858
+ ) {
859
+ registerPolicy(
860
+ ANTIGRAVITY_PATH_GUARD_NAME,
861
+ ANTIGRAVITY_PATH_GUARD_DESCRIPTION,
862
+ antigravityPathGuard,
863
+ ANTIGRAVITY_PATH_GUARD_MATCH,
864
+ );
865
+ }
842
866
  // Recorded on every row once a machine is managed, whether or not a cloud
843
867
  // policy decided this event: "what was deployed here at the time" is a
844
868
  // separate question from "what decided", and only the former can tell a
@@ -2277,8 +2277,10 @@ export function unhookedHermesProfiles(): string[] {
2277
2277
  // OpenClaw is a self-hosted assistant gateway. Enforcement is via its in-process
2278
2278
  // PLUGIN hooks (file-based "internal hooks" are observation-only), so failproofai
2279
2279
  // ships a static plugin package (`openclaw-plugin/`, like Pi's pi-extension) that
2280
- // async-spawns the binary and maps verdicts back. Install registers the plugin in
2281
- // every profile's `openclaw.json` (JSON):
2280
+ // asks failproofaid for each verdict over its Unix socket — like the Hermes plugin,
2281
+ // and so likewise daemon-only — and maps verdicts back. It cannot spawn the CLI:
2282
+ // OpenClaw ≥ 2026.9.6 loads plugins from a copy that holds only the plugin dir.
2283
+ // Install registers the plugin in every profile's `openclaw.json` (JSON):
2282
2284
  // • plugins.load.paths[] → the shipped openclaw-plugin dir (absolute path)
2283
2285
  // • plugins.entries.failproofai = { enabled: true, hooks: { allowConversationAccess: true } }
2284
2286
  // (allowConversationAccess is required for the raw-conversation hooks
@@ -2318,6 +2320,7 @@ function isFailproofaiOpenClawPath(p: unknown): boolean {
2318
2320
  export const openclaw: Integration = {
2319
2321
  id: "openclaw",
2320
2322
  displayName: "OpenClaw",
2323
+ requiresHealthyDaemon: true,
2321
2324
  scopes: OPENCLAW_HOOK_SCOPES,
2322
2325
  eventTypes: OPENCLAW_HOOK_EVENT_TYPES,
2323
2326
 
@@ -0,0 +1,9 @@
1
+ /**
2
+ * POSIX single-quoting: everything is literal inside '…', and a literal quote
3
+ * is closed, escaped and reopened. For every path this package puts into a
4
+ * shell command — the service's worker command, and the recipes printed for
5
+ * someone to run as root when the install or uninstall could not elevate.
6
+ */
7
+ export function shellQuote(value: string): string {
8
+ return `'${value.replace(/'/g, `'\\''`)}'`;
9
+ }
@@ -39,6 +39,7 @@ import {
39
39
  daemonServiceFilePath,
40
40
  daemonServiceStatus,
41
41
  daemonStatusCommand,
42
+ daemonSystemBinaryDir,
42
43
  isDaemonSupportedPlatform,
43
44
  primeElevation,
44
45
  setDaemonConfigured,
@@ -47,6 +48,7 @@ import {
47
48
  import { listInstallableIds, getIntegration } from "./integrations";
48
49
  import type { IntegrationType } from "./types";
49
50
  import { removeHooks } from "./manager";
51
+ import { shellQuote } from "./shell-quote";
50
52
  import { installedAgentSkillDirs, removeAgentSkill } from "./agent-skill";
51
53
  import { CODEX_MANAGED_BEGIN, CODEX_MANAGED_END, codexSystemConfigPath, codexSystemHooksPresent } from "./codex-system-hooks";
52
54
  import { optsFor, screenKit, type RenderOpts } from "./tui";
@@ -117,6 +119,12 @@ interface Leftovers {
117
119
  codexSystemPath: string | null;
118
120
  servicePath: string | null;
119
121
  serviceInstalled: boolean;
122
+ /**
123
+ * The root-owned daemon copy, when it exists. Tracked apart from the service
124
+ * because it outlives the unit: a failed install or a unit removed by hand
125
+ * leaves it behind, and `--purge` only deletes the home directory.
126
+ */
127
+ stagedBinaryDir: string | null;
120
128
  daemonConfigured: boolean;
121
129
  homeExists: boolean;
122
130
  }
@@ -150,12 +158,14 @@ function survey(cwd?: string): Leftovers {
150
158
  }
151
159
 
152
160
  const servicePath = isDaemonSupportedPlatform() ? daemonServiceFilePath() : null;
161
+ const stagedBinaryDir = isDaemonSupportedPlatform() ? daemonSystemBinaryDir() : null;
153
162
  return {
154
163
  clis,
155
164
  skillDirs: installedAgentSkillDirs(),
156
165
  codexSystemPath: codexSystemHooksPresent() ? codexSystemConfigPath() : null,
157
166
  servicePath,
158
167
  serviceInstalled: !!servicePath && existsSync(servicePath),
168
+ stagedBinaryDir: stagedBinaryDir && existsSync(stagedBinaryDir) ? stagedBinaryDir : null,
159
169
  daemonConfigured,
160
170
  homeExists: existsSync(failproofaiHome()),
161
171
  };
@@ -170,7 +180,7 @@ export async function runUninstallCommand(opts: UninstallOptions = {}): Promise<
170
180
  const lines: string[] = [];
171
181
 
172
182
  const nothingToDo =
173
- found.clis.length === 0 && found.skillDirs.length === 0 && !found.serviceInstalled && !found.daemonConfigured &&
183
+ found.clis.length === 0 && found.skillDirs.length === 0 && !found.serviceInstalled && !found.stagedBinaryDir && !found.daemonConfigured &&
174
184
  !(opts.purge && found.homeExists);
175
185
  if (nothingToDo) {
176
186
  return {
@@ -197,6 +207,7 @@ export async function runUninstallCommand(opts: UninstallOptions = {}): Promise<
197
207
  if (found.clis.length > 0) removals.push(`failproofai's hooks from ${many(found.clis.length, "agent")}`);
198
208
  if (found.skillDirs.length > 0) removals.push(`the failproofai skill from ${many(found.skillDirs.length, "agent folder")}`);
199
209
  if (found.serviceInstalled) removals.push("the failproofaid service (needs sudo)");
210
+ else if (found.stagedBinaryDir) removals.push(`the failproofaid binary in ${found.stagedBinaryDir} (needs sudo)`);
200
211
  if (purging) removals.push(home);
201
212
  const releasesDaemon = found.daemonConfigured && !found.serviceInstalled;
202
213
  const listed =
@@ -332,7 +343,7 @@ export async function runUninstallCommand(opts: UninstallOptions = {}): Promise<
332
343
  else failures.push(`Could not remove the failproofai skill from ${many(left, "agent folder")}:\n${installedAgentSkillDirs().join("\n")}`);
333
344
  }
334
345
 
335
- if (found.serviceInstalled) {
346
+ if (found.serviceInstalled || found.stagedBinaryDir) {
336
347
  // Every run that gets here agreed to the whole plan, and the plan names the
337
348
  // service: `--yes` is yes to the plan, an interactive yes is the same answer
338
349
  // to the same text (D17), and `--purge` cannot leave it behind anyway — it
@@ -356,15 +367,22 @@ export async function runUninstallCommand(opts: UninstallOptions = {}): Promise<
356
367
  try {
357
368
  await uninstallDaemonService();
358
369
  // uninstallDaemonService is best-effort by contract — it warns and
359
- // returns rather than throwing when it cannot elevate — so the unit file
360
- // is what gets believed here, not the absence of an exception.
370
+ // returns rather than throwing when it cannot elevate — so the files are
371
+ // what get believed here, not the absence of an exception.
361
372
  if (found.servicePath && existsSync(found.servicePath)) {
362
373
  failures.push(
363
374
  "The failproofaid service is still there, most often because sudo was not available." +
364
375
  byHand(found.servicePath),
365
376
  );
366
- } else {
377
+ } else if (found.stagedBinaryDir && existsSync(found.stagedBinaryDir)) {
378
+ failures.push(
379
+ `The failproofaid binary in ${found.stagedBinaryDir} is still there, most often because sudo was not available.` +
380
+ `\nRemove it as root:\n \`sudo rm -rf ${shellQuote(found.stagedBinaryDir)}\``,
381
+ );
382
+ } else if (found.serviceInstalled) {
367
383
  lines.push(kit.ok("Stopped and removed the failproofaid service."));
384
+ } else {
385
+ lines.push(kit.ok(`Removed the failproofaid binary from ${found.stagedBinaryDir}.`));
368
386
  }
369
387
  } catch (err) {
370
388
  failures.push(
@@ -411,16 +429,20 @@ export async function runUninstallCommand(opts: UninstallOptions = {}): Promise<
411
429
  return { exitCode: 0, lines, planLines, purged };
412
430
  }
413
431
 
414
- /** The exact commands to finish a service removal that could not elevate. */
432
+ /** The exact commands to finish a service removal that could not elevate. The
433
+ * paths are quoted: these are pasted into a root shell, and an unquoted path
434
+ * holding a space would make `rm -rf` remove something else. */
415
435
  function manualServiceRemoval(servicePath: string): string[] {
416
436
  if (process.platform === "darwin") {
417
- return [`sudo launchctl unload -w ${servicePath}`, `sudo rm -f ${servicePath}`];
437
+ return [`sudo launchctl unload -w ${shellQuote(servicePath)}`, `sudo rm -f ${shellQuote(servicePath)}`];
418
438
  }
419
439
  const unit = servicePath.split("/").pop() ?? servicePath;
440
+ const binDir = daemonSystemBinaryDir();
420
441
  return [
421
442
  `sudo systemctl disable --now ${unit}`,
422
- `sudo rm -f ${servicePath}`,
443
+ `sudo rm -f ${shellQuote(servicePath)}`,
423
444
  `sudo systemctl daemon-reload`,
445
+ ...(binDir ? [`sudo rm -rf ${shellQuote(binDir)}`] : []),
424
446
  ];
425
447
  }
426
448
 
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[80592,e=>{var t=e.i(95187);let r=(0,t.createServerReference)("00b8480eb3fc5a88fc4c5ebc725638a42421632a9e",t.callServer,void 0,t.findSourceMapURL,"getTelemetryConfig");e.s(["f",0,r])},97917,e=>{var t=e.i(71645),r=e.i(9969);let n=/\b[\w-]+-extension:\/\//i;function o(e){return"app"===function({stack:e,filename:t,appOrigin:r}){let o=[t,e].filter(Boolean).join("\n");return o.trim()?n.test(o)?"extension":r&&o.includes(r)?"app":"unknown":"unknown"}(e)}e.s(["GlobalErrorListeners",0,function(){return(0,t.useEffect)(()=>{let e=e=>{o({stack:e.error?.stack,filename:e.filename,appOrigin:window.location.origin})&&(0,r.L)("unhandled_exception",{error_message:e.message,error_name:e.error?.name,error_filename:e.filename,error_lineno:e.lineno,error_colno:e.colno})},t=e=>{let t=e.reason;o({stack:t instanceof Error?t.stack:void 0,appOrigin:window.location.origin})&&(0,r.L)("unhandled_rejection",{error_message:t instanceof Error?t.message:String(t),error_name:t instanceof Error?t.name:void 0})};return window.addEventListener("error",e),window.addEventListener("unhandledrejection",t),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",t)}},[]),null}],97917)},55574,e=>{var t=e.i(43476),r=e.i(71645);let n=[],o=0,a=new Set;function i(){for(let e of a)e()}function s(e){return a.add(e),()=>a.delete(e)}function l(){return n}function c({message:e}){let[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{requestAnimationFrame(()=>o(!0));let e=setTimeout(()=>o(!1),2e3);return()=>clearTimeout(e)},[]),(0,t.jsx)("div",{className:`bg-card border border-border text-foreground text-sm px-4 py-2 rounded-lg shadow-lg transition-opacity duration-300 ${n?"opacity-100":"opacity-0"}`,children:e})}e.s(["Toaster",0,function(){let e=(0,r.useSyncExternalStore)(s,l,l);return(0,t.jsx)("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:e.map(e=>(0,t.jsx)(c,{message:e.message},e.id))})},"toast",0,function(e){let t=o++;n=[...n,{id:t,message:e}],i(),setTimeout(()=>{n=n.filter(e=>e.id!==t),i()},2500)}])},63780,e=>{var t=e.i(43476),r=e.i(22016),n=e.i(18566),o=e.i(66794),a=e.i(71645),i=e.i(56420);let s={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};s.node;let l=(0,i.f)(s);var c=e.i(16327);let u={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};u.node;let d=(0,i.f)(u),f={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};f.node;let h=(0,i.f)(f),p={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};p.node;let m=(0,i.f)(p),g={name:"messages-square",size:24,node:[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]};g.node;let b=(0,i.f)(g),v={name:"message-square-warning",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]]};v.node;let y=(0,i.f)(v);var x=e.i(67881);let w="failproofai@exosphere.host",k=[{label:"Star us on GitHub",icon:d,href:"https://github.com/failproofai/failproofai",color:"#f5c842",bg:"rgba(245,200,66,0.08)"},{label:"Documentation",icon:h,href:"https://docs.befailproof.ai/introduction",color:"#60a5fa",bg:"rgba(96,165,250,0.08)"},{label:"Join our Discord",icon:m,href:"https://discord.befailproof.ai/",color:"#5865f2",bg:"rgba(88,101,242,0.08)"},{label:"Join r/failproofai",icon:b,href:"https://www.reddit.com/r/failproofai/",color:"#ff4500",bg:"rgba(255,69,0,0.08)"},{label:"Feedback & Issues",icon:y,href:"https://github.com/FailproofAI/failproofai/issues/new/choose",color:"#34d399",bg:"rgba(52,211,153,0.08)"}],j=()=>{let[e,r]=(0,a.useState)(!1),n=(0,a.useCallback)(()=>r(!1),[]),o=(0,a.useCallback)(e=>{"Escape"===e.key&&r(!1)},[]);return(0,t.jsxs)("div",{className:"relative",onKeyDown:o,children:[e&&(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:n,"aria-hidden":"true"}),(0,t.jsxs)(x.f,{type:"button",variant:"ghost",size:"sm",onClick:()=>r(e=>!e),"aria-expanded":e,"aria-haspopup":"true",className:"relative z-50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(l,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"hidden sm:inline text-xs whitespace-nowrap",children:"Reach Us"}),(0,t.jsx)(c.f,{className:`h-3 w-3 transition-transform ${e?"rotate-180":""}`})]}),e&&(0,t.jsxs)("div",{className:"absolute right-0 mt-2 w-60 rounded-lg border border-border bg-card shadow-xl z-50",role:"menu",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04)"},children:[(0,t.jsxs)("div",{className:"px-3 py-2.5 border-b border-border",style:{background:"linear-gradient(135deg, rgba(236,72,153,0.12) 0%, rgba(139,92,246,0.08) 100%)"},children:[(0,t.jsx)("p",{className:"text-xs font-semibold",style:{color:"#e879f9",letterSpacing:"0.06em"},children:"Reach Developers"}),(0,t.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:"We'd love to hear from you"})]}),(0,t.jsx)("div",{className:"py-1",children:k.map(({label:e,icon:r,href:o,color:a,bg:i})=>(0,t.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",role:"menuitem",className:"flex items-center gap-2.5 px-3 py-2 text-xs transition-colors",style:{color:"var(--muted-foreground)"},onMouseEnter:e=>{e.currentTarget.style.background=i,e.currentTarget.style.color=a},onMouseLeave:e=>{e.currentTarget.style.background="",e.currentTarget.style.color=""},onClick:n,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5 flex-shrink-0",style:{color:a}}),e]},e))}),(0,t.jsx)("div",{className:"px-3 py-2 border-t border-border",style:{background:"rgba(0,0,0,0.2)"},children:(0,t.jsxs)("p",{className:"text-[0.65rem] text-muted-foreground",children:["or email"," ",(0,t.jsx)("a",{href:`mailto:${w}`,className:"transition-colors",style:{color:"#e879f9"},onMouseEnter:e=>e.currentTarget.style.opacity="0.75",onMouseLeave:e=>e.currentTarget.style.opacity="1",children:w})]})})]})]})},N={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};N.node;let S=(0,i.f)(N);var _=e.i(47163),P=e.i(85881);let E=[{label:"Off",value:0},{label:"5s",value:5},{label:"10s",value:10},{label:"30s",value:30}];function C({className:e}){let r=(0,n.useRouter)(),[o,i]=(0,a.useTransition)(),{intervalSec:s,setIntervalSec:l}=(0,P.useAutoRefresh)(),c=(0,a.useCallback)(()=>{i(()=>r.refresh())},[r]);(0,a.useEffect)(()=>{if(s<=0)return;let e=setInterval(c,1e3*s);return()=>clearInterval(e)},[s,c]);let u=s>0;return(0,t.jsxs)("div",{className:(0,_.f)("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",e),children:[(0,t.jsx)("button",{onClick:c,title:"Refresh",className:(0,_.f)("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",u?"text-primary hover:bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:(0,t.jsx)(S,{className:(0,_.f)("w-3.5 h-3.5",o&&"animate-spin")})}),(0,t.jsx)("div",{className:"w-px h-4 bg-border"}),(0,t.jsx)("div",{className:"inline-flex items-center gap-0.5",role:"group","aria-label":"Auto-refresh interval",children:E.map(e=>(0,t.jsx)("button",{onClick:()=>l(e.value),"aria-pressed":s===e.value,className:(0,_.f)("px-2 py-1 text-[11px] font-medium rounded-md transition-colors",s===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:e.label},e.value))})]})}var L=e.i(12344);let M=[{href:"/projects",label:"projects"},{href:"/policies",label:"policies"},{href:"/audit",label:"audit"}];e.s(["Navbar",0,({disabledPages:e=[]})=>{let a=(0,n.usePathname)(),{capture:i}=(0,L.usePostHog)(),s=a.startsWith("/policies")?"policies":a.startsWith("/audit")?"audit":a.startsWith("/settings")?"settings":a.startsWith("/projects")||a.startsWith("/project/")?"projects":"";return(0,t.jsxs)("header",{className:"app-header",children:[(0,t.jsx)("a",{href:"https://github.com/failproofai/failproofai",target:"_blank",rel:"noopener noreferrer",className:"h-brand",style:{flex:"none"},"aria-label":"failproof ai · GitHub",children:(0,t.jsx)("img",{src:"/logo.svg",alt:"failproof_ai",style:{height:18,display:"block",flexShrink:0}})}),(0,t.jsx)("nav",{className:"tabs",style:{border:"none",padding:0,gap:0},children:M.filter(({href:t})=>{let r=t.slice(1);return!e.includes(r)}).map(({href:e,label:n})=>{let o="/projects"===e?"/projects"===a||a.startsWith("/project/"):a.startsWith(e);return(0,t.jsx)(r.default,{href:e,className:`tab${o?" is-active":""}`,"aria-current":o?"page":void 0,onClick:()=>{"/audit"===e&&i("audit_nav_clicked",{from_path:a,is_active_tab:o})},children:n},e)})}),(0,t.jsx)("div",{style:{flex:1}}),(0,t.jsxs)("div",{className:"h-meta",children:[(0,t.jsxs)("span",{className:"h-version",children:["v","1.0.13-beta.3"]}),s&&(0,t.jsx)("span",{className:"h-brand-sep","aria-hidden":"true",children:"·"}),s&&(0,t.jsx)("span",{className:"h-brand-section",children:s})]}),(0,t.jsxs)("div",{className:"h-actions",children:[(0,t.jsx)(C,{}),(0,t.jsx)("span",{style:{width:1,height:18,background:"var(--line)",margin:"0 6px"}}),!e.includes("settings")&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{href:"/settings",className:`h-icon-btn${a.startsWith("/settings")?" is-active":""}`,"aria-label":"settings","aria-current":a.startsWith("/settings")?"page":void 0,title:"settings",children:(0,t.jsx)(o.f,{className:"w-3.5 h-3.5",strokeWidth:1.75,"aria-hidden":"true"})}),(0,t.jsx)("span",{style:{width:1,height:18,background:"var(--line)",margin:"0 6px"}})]}),(0,t.jsx)(j,{})]})]})}],63780)},67881,e=>{var t=e.i(43476),r=e.i(71645),n=e.i(47163);let o=r.forwardRef(({className:e,variant:r="default",size:o="default",...a},i)=>(0,t.jsx)("button",{className:(0,n.f)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-[background-color,color,box-shadow,border-color] duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50 disabled:pointer-events-none",{"bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-[0_0_0_1px_var(--primary)]":"default"===r,"text-foreground hover:bg-muted":"ghost"===r,"border border-border bg-transparent hover:border-primary/60 hover:bg-card":"outline"===r,"h-10 py-2 px-4":"default"===o,"h-10 w-10":"icon"===o,"h-9 px-3":"sm"===o,"h-11 px-8":"lg"===o},e),ref:i,...a}));o.displayName="Button",e.s(["f",0,o])},85881,e=>{var t=e.i(43476),r=e.i(71645);let n=(0,r.createContext)(void 0);e.s(["AutoRefreshProvider",0,function({children:e}){let[o,a]=(0,r.useState)(0);return(0,t.jsx)(n.Provider,{value:{intervalSec:o,setIntervalSec:a},children:e})},"useAutoRefresh",0,function(){let e=(0,r.useContext)(n);if(!e)throw Error("useAutoRefresh must be used within AutoRefreshProvider");return e}])},12344,e=>{var t=e.i(43476),r=e.i(71645),n=e.i(18566),o=e.i(80592),a=e.i(9969);let i=(0,r.createContext)(void 0);e.s(["PostHogProvider",0,function({children:e}){let s=(0,n.usePathname)(),l=(0,r.useRef)(null),c=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let e=!1;return(0,o.f)().then(t=>{e||((0,a.$)(t),c.current=!0,(0,a.L)("$pageview"),l.current=window.location.pathname)}),()=>{e=!0}},[]),(0,r.useEffect)(()=>{c.current&&l.current!==s&&(l.current=s,(0,a.L)("$pageview"))},[s]);let u=r.default.useCallback((e,t)=>{(0,a.L)(e,t)},[]);return(0,t.jsx)(i.Provider,{value:{capture:u},children:e})},"usePostHog",0,function(){let e=(0,r.useContext)(i);if(void 0===e)throw Error("usePostHog must be used within a PostHogProvider");return e}])},9969,e=>{let t=null;e.s(["L",0,function(e,r){if(!t||!t.enabled)return;let n=JSON.stringify({api_key:t.apiKey,event:e,distinct_id:t.distinctId,properties:{...r,$lib:"failproofai-web",failproofai_version:t.version,product:"failproofai-oss",$current_url:window.location.href,$pathname:window.location.pathname}});fetch(t.host.replace(/\/+$/,"")+"/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0,signal:AbortSignal.timeout(5e3)}).catch(()=>{})},"$",0,function(e){t=e}],9969)},5014,e=>{var t=e.i(71645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},o=(0,t.createContext)({}),a=(0,t.forwardRef)(({color:e,size:a,width:i,height:s,strokeWidth:l,absoluteStrokeWidth:c,nonScalingStroke:u,className:d="",children:f,iconNode:h=[],icon:p={node:h,aliases:[],size:24},...m},g)=>{let{size:b=24,strokeWidth:v=2,absoluteStrokeWidth:y=!1,nonScalingStroke:x=!1,color:w="currentColor",className:k=""}=(0,t.useContext)(o)??{},j=!!f||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[N,S,_=[]]=function(e,t={}){return function(e,t={}){let o=t.attributeNames??{},a=e=>o[e]??e,i=e.size??e.width??n.width,s=e.size??e.height??n.height,l=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...l],u=t.className?.split(" ").filter(Boolean)??[],d=!1===t.includeDefaultClasses?r(...u):r("lucide",...c,...u),f=t.absoluteStrokeWidth?Number(t.strokeWidth??n["stroke-width"])*Number(e.size??e.width??n.width)/Number(t.size??t.width??n.width):t.strokeWidth??n["stroke-width"];return["svg",{...Object.entries(n).reduce((e,[t,r])=>(e[a(t)]=r,e),{}),..."color"in t&&t.color&&{[a("stroke")]:t.color},..."size"in t&&null!=t.size&&{[a("width")]:t.size,[a("height")]:t.size},..."width"in t&&null!=t.width&&{[a("width")]:t.width},..."height"in t&&null!=t.height&&{[a("height")]:t.height},[a("stroke-width")]:f,...d&&{[a("class")]:d},[a("viewBox")]:`0 0 ${i} ${s}`,...!1===t.hasA11yProp?{[a("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[r,n,o]=e,i=t.nonScalingStroke?{[a("vector-effect")]:"non-scaling-stroke",...n}:n;return o?[r,i,o]:[r,i]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(p,{color:e??w,width:i??a??b,height:s??a??b,strokeWidth:l??v,absoluteStrokeWidth:c??y,nonScalingStroke:u??x,className:r(k,d),hasA11yProp:j,attributes:m});return(0,t.createElement)(N,{ref:g,...S},[..._.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(f)?f:[f]])});e.s(["default",0,a],5014)},56420,e=>{var t=e.i(71645),r=e.i(5014);e.s(["f",0,function(e,n=[],o=[]){let a,i="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,n,o):e,s=(0,t.forwardRef)(({className:e,...n},o)=>(0,t.createElement)(r.default,{ref:o,icon:i,className:e,...n}));return i.name&&(s.displayName=(a=(e=>{let t="",r=!1;for(let n of e){if("-"===n||"_"===n||n<=" "){r=t.length>0;continue}0===t.length?t+=n.toLowerCase():t+=r?n.toUpperCase():n,r=!1}return t})(i.name)).charAt(0).toUpperCase()+a.slice(1)),s}],56420)},16327,e=>{var t=e.i(56420);let r={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],16327)},66794,e=>{var t=e.i(56420);let r={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],66794)},95187,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return a.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(32120),i=e.r(92245),s=e.r(35326)},22016,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return y}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809),i=e.r(43476),s=a._(e.r(71645)),l=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function b(t){var r;let n,o,a,[b,y]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,s.useRef)(null),{href:w,as:k,children:j,prefetch:N=null,passHref:S,replace:_,shallow:P,scroll:E,onClick:C,onMouseEnter:L,onTouchStart:M,legacyBehavior:R=!1,onNavigate:T,transitionTypes:z,ref:A,unstable_dynamicOnHover:$,...O}=t;n=j,R&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let U=s.default.useContext(c.AppRouterContext),W=!1!==N,I=!1===N?"none":!0===N?"full":"auto",B="none"!==I?"auto"===I?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,F="string"==typeof(r=k||w)?r:(0,l.formatUrl)(r);if(R){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=s.default.Children.only(n)}let D=R?o&&"object"==typeof o&&o.ref:A,H,q=s.default.useCallback(e=>(null!==U&&(x.current=(0,p.mountLinkInstance)(e,F,U,B,W,y,H)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[W,F,U,B,y,H]),K={ref:(0,u.useMergedRef)(q,D),onClick(t){R||"function"!=typeof C||C(t),R&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,o,a,i,s,l="none"){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:d}=e.r(32916);d(r,o?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,s,l)}}(t,F,x,_,E,T,z,I)},onMouseEnter(e){R||"function"!=typeof L||L(e),R&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),U&&W&&(0,p.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){R||"function"!=typeof M||M(e),R&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),U&&W&&(0,p.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,d.isAbsoluteUrl)(F)?K.href=F:R&&!S&&("a"!==o.type||"href"in o.props)||(K.href=(0,f.addBasePath)(F)),a=R?s.default.cloneElement(o,K):(0,i.jsx)("a",{...O,...K,children:n}),(0,i.jsx)(v.Provider,{value:b,children:a})}let v=(0,s.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),o&&"/"!==o[0]&&(o="/"+o)):c||(c=""),s&&"#"!==s[0]&&(s="#"+s),u&&"?"!==u[0]&&(u="?"+u),o=o.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${o}${u}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return s(e)}},73668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),o=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return y},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return k}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class v extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}}],18566,(e,t,r)=>{t.exports=e.r(76562)}]);
@@ -1 +0,0 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67382,e=>{var a=e.i(95187);let t=(0,a.createServerReference)("6015b3dc8961095b5310a3f12d453cd8f41e1a0ea5",a.callServer,void 0,a.findSourceMapURL,"searchHookActivityAction");e.s(["f",0,t])},73520,e=>{var a=e.i(43476),t=e.i(24071),r=e.i(67927);e.s(["f",0,function({currentPage:e,totalPages:s,onPageChange:n}){if(s<=1)return null;let l=e=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${e?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,a.jsxs)("button",{onClick:()=>n(e-1),disabled:1===e,className:l(1===e),"aria-label":"Previous page",children:[(0,a.jsx)(t.f,{className:"w-4 h-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(s<=7)return Array.from({length:s},(e,a)=>a+1);let a=[1],t=Math.max(2,e-1),r=Math.min(s-1,e+1);e<=3&&(r=Math.min(5,s-1)),e>=s-2&&(t=Math.max(2,s-4)),t>2&&a.push("ellipsis-start");for(let e=t;e<=r;e++)a.push(e);return r<s-1&&a.push("ellipsis-end"),a.push(s),a})().map(t=>"string"==typeof t?(0,a.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},t):(0,a.jsx)("button",{onClick:()=>n(t),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${e===t?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${t}`,"aria-current":e===t?"page":void 0,children:t},t))}),(0,a.jsxs)("button",{onClick:()=>n(e+1),disabled:e===s,className:l(e===s),"aria-label":"Next page",children:[(0,a.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,a.jsx)(r.f,{className:"w-4 h-4"})]})]})}])},34713,e=>{e.s(["M",0,function(e){if(e<1e3)return`${e}ms`;let a=Math.round(e/100);if(a<600)return`${(a/10).toFixed(1)}s`;let t=Math.round(e/1e3);if(t<3600){let e=Math.floor(t/60);return`${e}m ${t%60}s`}let r=Math.round(e/6e4),s=Math.floor(r/60);return`${s}h ${r%60}m`},"g",0,function(e){let a=Date.now()-e;return a<6e4?`${Math.max(1,Math.floor(a/1e3))}s ago`:a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}])},24071,e=>{var a=e.i(56420);let t={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],24071)},67927,e=>{var a=e.i(56420);let t={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],67927)},16306,e=>{var a=e.i(56420);let t={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],16306)},84026,29407,e=>{var a=e.i(56420);let t={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],84026);let s={name:"shield-x",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],aliases:["shield-close"]};s.node;let n=(0,a.f)(s);e.s(["f",0,n],29407)},82954,e=>{var a=e.i(56420);let t={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};t.node;let r=(0,a.f)(t);e.s(["f",0,r],82954)}])})();