@geminilight/mindos-windows-arm64 1.0.6 → 1.0.7

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 (528) hide show
  1. package/_standalone/.mindos-build-version +1 -1
  2. package/_standalone/__next/BUILD_ID +1 -1
  3. package/_standalone/__next/app-path-routes-manifest.json +34 -34
  4. package/_standalone/__next/build-manifest.json +4 -4
  5. package/_standalone/__next/prerender-manifest.json +3 -3
  6. package/_standalone/__next/react-loadable-manifest.json +4 -4
  7. package/_standalone/__next/required-server-files.json +4 -4
  8. package/_standalone/__next/server/app/.well-known/agent-card.json/route.js +1 -1
  9. package/_standalone/__next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
  10. package/_standalone/__next/server/app/_global-error/page.js +3 -3
  11. package/_standalone/__next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  12. package/_standalone/__next/server/app/_global-error.html +2 -2
  13. package/_standalone/__next/server/app/_global-error.rsc +3 -3
  14. package/_standalone/__next/server/app/_global-error.segments/_full.segment.rsc +3 -3
  15. package/_standalone/__next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  16. package/_standalone/__next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  17. package/_standalone/__next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  18. package/_standalone/__next/server/app/_global-error.segments/_index.segment.rsc +2 -2
  19. package/_standalone/__next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  20. package/_standalone/__next/server/app/_not-found/page.js +2 -2
  21. package/_standalone/__next/server/app/_not-found/page.js.nft.json +1 -1
  22. package/_standalone/__next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/_standalone/__next/server/app/agents/[agentKey]/page.js +2 -2
  24. package/_standalone/__next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
  25. package/_standalone/__next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
  26. package/_standalone/__next/server/app/agents/page.js +2 -2
  27. package/_standalone/__next/server/app/agents/page.js.nft.json +1 -1
  28. package/_standalone/__next/server/app/agents/page_client-reference-manifest.js +1 -1
  29. package/_standalone/__next/server/app/api/a2a/agents/route.js +1 -1
  30. package/_standalone/__next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
  31. package/_standalone/__next/server/app/api/a2a/delegations/route.js +1 -1
  32. package/_standalone/__next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
  33. package/_standalone/__next/server/app/api/a2a/discover/route.js +1 -1
  34. package/_standalone/__next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
  35. package/_standalone/__next/server/app/api/a2a/route.js +1 -1
  36. package/_standalone/__next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
  37. package/_standalone/__next/server/app/api/acp/config/route.js +1 -1
  38. package/_standalone/__next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
  39. package/_standalone/__next/server/app/api/acp/detect/route.js +1 -1
  40. package/_standalone/__next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
  41. package/_standalone/__next/server/app/api/acp/install/route.js +1 -1
  42. package/_standalone/__next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
  43. package/_standalone/__next/server/app/api/acp/registry/route.js +1 -1
  44. package/_standalone/__next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
  45. package/_standalone/__next/server/app/api/acp/session/route.js +1 -1
  46. package/_standalone/__next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
  47. package/_standalone/__next/server/app/api/agent-activity/route.js +1 -1
  48. package/_standalone/__next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
  49. package/_standalone/__next/server/app/api/agents/copy-skill/route.js +1 -1
  50. package/_standalone/__next/server/app/api/agents/copy-skill/route_client-reference-manifest.js +1 -1
  51. package/_standalone/__next/server/app/api/agents/custom/detect/route.js +1 -1
  52. package/_standalone/__next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
  53. package/_standalone/__next/server/app/api/agents/custom/route.js +1 -1
  54. package/_standalone/__next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
  55. package/_standalone/__next/server/app/api/ask/route.js +2 -2
  56. package/_standalone/__next/server/app/api/ask/route_client-reference-manifest.js +1 -1
  57. package/_standalone/__next/server/app/api/ask-sessions/route.js +1 -1
  58. package/_standalone/__next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
  59. package/_standalone/__next/server/app/api/auth/route.js +1 -1
  60. package/_standalone/__next/server/app/api/auth/route_client-reference-manifest.js +1 -1
  61. package/_standalone/__next/server/app/api/backlinks/route.js +1 -1
  62. package/_standalone/__next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
  63. package/_standalone/__next/server/app/api/bootstrap/route.js +1 -1
  64. package/_standalone/__next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
  65. package/_standalone/__next/server/app/api/changes/route.js +1 -1
  66. package/_standalone/__next/server/app/api/changes/route_client-reference-manifest.js +1 -1
  67. package/_standalone/__next/server/app/api/channels/verify/route.js +1 -1
  68. package/_standalone/__next/server/app/api/channels/verify/route_client-reference-manifest.js +1 -1
  69. package/_standalone/__next/server/app/api/connect/route.js +1 -1
  70. package/_standalone/__next/server/app/api/connect/route_client-reference-manifest.js +1 -1
  71. package/_standalone/__next/server/app/api/embedding/route.js +1 -1
  72. package/_standalone/__next/server/app/api/embedding/route_client-reference-manifest.js +1 -1
  73. package/_standalone/__next/server/app/api/export/route.js +1 -1
  74. package/_standalone/__next/server/app/api/export/route_client-reference-manifest.js +1 -1
  75. package/_standalone/__next/server/app/api/extract-docx/route.js +1 -1
  76. package/_standalone/__next/server/app/api/extract-docx/route_client-reference-manifest.js +1 -1
  77. package/_standalone/__next/server/app/api/extract-pdf/route.js +2 -2
  78. package/_standalone/__next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
  79. package/_standalone/__next/server/app/api/file/import/route.js +1 -1
  80. package/_standalone/__next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
  81. package/_standalone/__next/server/app/api/file/raw/route.js +1 -1
  82. package/_standalone/__next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
  83. package/_standalone/__next/server/app/api/file/route.js +1 -1
  84. package/_standalone/__next/server/app/api/file/route_client-reference-manifest.js +1 -1
  85. package/_standalone/__next/server/app/api/files/route.js +1 -1
  86. package/_standalone/__next/server/app/api/files/route_client-reference-manifest.js +1 -1
  87. package/_standalone/__next/server/app/api/git/route.js +1 -1
  88. package/_standalone/__next/server/app/api/git/route_client-reference-manifest.js +1 -1
  89. package/_standalone/__next/server/app/api/graph/route.js +1 -1
  90. package/_standalone/__next/server/app/api/graph/route_client-reference-manifest.js +1 -1
  91. package/_standalone/__next/server/app/api/health/route.js +1 -1
  92. package/_standalone/__next/server/app/api/health/route_client-reference-manifest.js +1 -1
  93. package/_standalone/__next/server/app/api/im/activity/route.js +1 -1
  94. package/_standalone/__next/server/app/api/im/activity/route_client-reference-manifest.js +1 -1
  95. package/_standalone/__next/server/app/api/im/config/route.js +1 -1
  96. package/_standalone/__next/server/app/api/im/config/route_client-reference-manifest.js +1 -1
  97. package/_standalone/__next/server/app/api/im/feishu/long-connection/event/route.js +1 -1
  98. package/_standalone/__next/server/app/api/im/feishu/long-connection/event/route_client-reference-manifest.js +1 -1
  99. package/_standalone/__next/server/app/api/im/feishu/long-connection/route.js +1 -1
  100. package/_standalone/__next/server/app/api/im/feishu/long-connection/route_client-reference-manifest.js +1 -1
  101. package/_standalone/__next/server/app/api/im/status/route.js +1 -1
  102. package/_standalone/__next/server/app/api/im/status/route_client-reference-manifest.js +1 -1
  103. package/_standalone/__next/server/app/api/im/test/route.js +1 -1
  104. package/_standalone/__next/server/app/api/im/test/route_client-reference-manifest.js +1 -1
  105. package/_standalone/__next/server/app/api/im/webhook/feishu/route.js +1 -1
  106. package/_standalone/__next/server/app/api/im/webhook/feishu/route_client-reference-manifest.js +1 -1
  107. package/_standalone/__next/server/app/api/im/webhook-status/route.js +1 -1
  108. package/_standalone/__next/server/app/api/im/webhook-status/route_client-reference-manifest.js +1 -1
  109. package/_standalone/__next/server/app/api/inbox/clip/route.js +2 -2
  110. package/_standalone/__next/server/app/api/inbox/clip/route_client-reference-manifest.js +1 -1
  111. package/_standalone/__next/server/app/api/inbox/route.js +1 -1
  112. package/_standalone/__next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
  113. package/_standalone/__next/server/app/api/init/route.js +1 -1
  114. package/_standalone/__next/server/app/api/init/route_client-reference-manifest.js +1 -1
  115. package/_standalone/__next/server/app/api/lint/route.js +1 -1
  116. package/_standalone/__next/server/app/api/lint/route_client-reference-manifest.js +1 -1
  117. package/_standalone/__next/server/app/api/mcp/agents/route.js +1 -1
  118. package/_standalone/__next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
  119. package/_standalone/__next/server/app/api/mcp/direct-tools/route.js +1 -1
  120. package/_standalone/__next/server/app/api/mcp/direct-tools/route_client-reference-manifest.js +1 -1
  121. package/_standalone/__next/server/app/api/mcp/install/route.js +1 -1
  122. package/_standalone/__next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
  123. package/_standalone/__next/server/app/api/mcp/install-skill/route.js +1 -1
  124. package/_standalone/__next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
  125. package/_standalone/__next/server/app/api/mcp/restart/route.js +1 -1
  126. package/_standalone/__next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
  127. package/_standalone/__next/server/app/api/mcp/status/route.js +1 -1
  128. package/_standalone/__next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  129. package/_standalone/__next/server/app/api/mcp/tools/route.js +1 -1
  130. package/_standalone/__next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
  131. package/_standalone/__next/server/app/api/mcp/uninstall/route.js +1 -1
  132. package/_standalone/__next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
  133. package/_standalone/__next/server/app/api/monitoring/route.js +1 -1
  134. package/_standalone/__next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
  135. package/_standalone/__next/server/app/api/obsidian/compat-report/route.js +1 -1
  136. package/_standalone/__next/server/app/api/obsidian/compat-report/route_client-reference-manifest.js +1 -1
  137. package/_standalone/__next/server/app/api/obsidian/import/route.js +1 -1
  138. package/_standalone/__next/server/app/api/obsidian/import/route_client-reference-manifest.js +1 -1
  139. package/_standalone/__next/server/app/api/obsidian-plugins/settings/route.js +2 -2
  140. package/_standalone/__next/server/app/api/obsidian-plugins/settings/route_client-reference-manifest.js +1 -1
  141. package/_standalone/__next/server/app/api/recent-files/route.js +1 -1
  142. package/_standalone/__next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
  143. package/_standalone/__next/server/app/api/restart/route.js +1 -1
  144. package/_standalone/__next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  145. package/_standalone/__next/server/app/api/search/prewarm/route.js +1 -1
  146. package/_standalone/__next/server/app/api/search/prewarm/route_client-reference-manifest.js +1 -1
  147. package/_standalone/__next/server/app/api/search/route.js +1 -1
  148. package/_standalone/__next/server/app/api/search/route_client-reference-manifest.js +1 -1
  149. package/_standalone/__next/server/app/api/settings/list-models/route.js +1 -1
  150. package/_standalone/__next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
  151. package/_standalone/__next/server/app/api/settings/reset-token/route.js +1 -1
  152. package/_standalone/__next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
  153. package/_standalone/__next/server/app/api/settings/route.js +1 -1
  154. package/_standalone/__next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  155. package/_standalone/__next/server/app/api/settings/test-key/route.js +1 -1
  156. package/_standalone/__next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
  157. package/_standalone/__next/server/app/api/setup/check-path/route.js +1 -1
  158. package/_standalone/__next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
  159. package/_standalone/__next/server/app/api/setup/check-port/route.js +1 -1
  160. package/_standalone/__next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
  161. package/_standalone/__next/server/app/api/setup/generate-token/route.js +1 -1
  162. package/_standalone/__next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
  163. package/_standalone/__next/server/app/api/setup/ls/route.js +1 -1
  164. package/_standalone/__next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
  165. package/_standalone/__next/server/app/api/setup/route.js +1 -1
  166. package/_standalone/__next/server/app/api/setup/route_client-reference-manifest.js +1 -1
  167. package/_standalone/__next/server/app/api/skills/route.js +1 -1
  168. package/_standalone/__next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  169. package/_standalone/__next/server/app/api/space-overview/route.js +1 -1
  170. package/_standalone/__next/server/app/api/space-overview/route_client-reference-manifest.js +1 -1
  171. package/_standalone/__next/server/app/api/sync/route.js +1 -1
  172. package/_standalone/__next/server/app/api/sync/route_client-reference-manifest.js +1 -1
  173. package/_standalone/__next/server/app/api/tree-version/route.js +1 -1
  174. package/_standalone/__next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
  175. package/_standalone/__next/server/app/api/uninstall/route.js +1 -1
  176. package/_standalone/__next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
  177. package/_standalone/__next/server/app/api/update/route.js +1 -1
  178. package/_standalone/__next/server/app/api/update/route_client-reference-manifest.js +1 -1
  179. package/_standalone/__next/server/app/api/update-check/route.js +1 -1
  180. package/_standalone/__next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
  181. package/_standalone/__next/server/app/api/update-status/route.js +1 -1
  182. package/_standalone/__next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
  183. package/_standalone/__next/server/app/api/workflows/route.js +1 -1
  184. package/_standalone/__next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
  185. package/_standalone/__next/server/app/capture/history/page.js +2 -2
  186. package/_standalone/__next/server/app/capture/history/page.js.nft.json +1 -1
  187. package/_standalone/__next/server/app/capture/history/page_client-reference-manifest.js +1 -1
  188. package/_standalone/__next/server/app/capture/page.js +2 -2
  189. package/_standalone/__next/server/app/capture/page.js.nft.json +1 -1
  190. package/_standalone/__next/server/app/capture/page_client-reference-manifest.js +1 -1
  191. package/_standalone/__next/server/app/changelog/page.js +2 -2
  192. package/_standalone/__next/server/app/changelog/page.js.nft.json +1 -1
  193. package/_standalone/__next/server/app/changelog/page_client-reference-manifest.js +1 -1
  194. package/_standalone/__next/server/app/changes/page.js +2 -2
  195. package/_standalone/__next/server/app/changes/page.js.nft.json +1 -1
  196. package/_standalone/__next/server/app/changes/page_client-reference-manifest.js +1 -1
  197. package/_standalone/__next/server/app/echo/[segment]/page.js +4 -4
  198. package/_standalone/__next/server/app/echo/[segment]/page.js.nft.json +1 -1
  199. package/_standalone/__next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
  200. package/_standalone/__next/server/app/echo/page.js +2 -2
  201. package/_standalone/__next/server/app/echo/page.js.nft.json +1 -1
  202. package/_standalone/__next/server/app/echo/page_client-reference-manifest.js +1 -1
  203. package/_standalone/__next/server/app/explore/page.js +3 -3
  204. package/_standalone/__next/server/app/explore/page.js.nft.json +1 -1
  205. package/_standalone/__next/server/app/explore/page_client-reference-manifest.js +1 -1
  206. package/_standalone/__next/server/app/help/page.js +2 -2
  207. package/_standalone/__next/server/app/help/page.js.nft.json +1 -1
  208. package/_standalone/__next/server/app/help/page_client-reference-manifest.js +1 -1
  209. package/_standalone/__next/server/app/icon.svg/route.js +1 -1
  210. package/_standalone/__next/server/app/inbox/history/page.js +2 -2
  211. package/_standalone/__next/server/app/inbox/history/page.js.nft.json +1 -1
  212. package/_standalone/__next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
  213. package/_standalone/__next/server/app/login/page.js +2 -2
  214. package/_standalone/__next/server/app/login/page.js.nft.json +1 -1
  215. package/_standalone/__next/server/app/login/page_client-reference-manifest.js +1 -1
  216. package/_standalone/__next/server/app/page.js +2 -2
  217. package/_standalone/__next/server/app/page.js.nft.json +1 -1
  218. package/_standalone/__next/server/app/page_client-reference-manifest.js +1 -1
  219. package/_standalone/__next/server/app/settings/page.js +2 -2
  220. package/_standalone/__next/server/app/settings/page.js.nft.json +1 -1
  221. package/_standalone/__next/server/app/settings/page_client-reference-manifest.js +1 -1
  222. package/_standalone/__next/server/app/setup/page.js +2 -2
  223. package/_standalone/__next/server/app/setup/page.js.nft.json +1 -1
  224. package/_standalone/__next/server/app/setup/page_client-reference-manifest.js +1 -1
  225. package/_standalone/__next/server/app/todo/page.js +2 -2
  226. package/_standalone/__next/server/app/todo/page.js.nft.json +1 -1
  227. package/_standalone/__next/server/app/todo/page_client-reference-manifest.js +1 -1
  228. package/_standalone/__next/server/app/trash/page.js +3 -3
  229. package/_standalone/__next/server/app/trash/page.js.nft.json +1 -1
  230. package/_standalone/__next/server/app/trash/page_client-reference-manifest.js +1 -1
  231. package/_standalone/__next/server/app/view/[...path]/page.js +3 -3
  232. package/_standalone/__next/server/app/view/[...path]/page.js.nft.json +1 -1
  233. package/_standalone/__next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
  234. package/_standalone/__next/server/app/wiki/page.js +2 -2
  235. package/_standalone/__next/server/app/wiki/page.js.nft.json +1 -1
  236. package/_standalone/__next/server/app/wiki/page_client-reference-manifest.js +1 -1
  237. package/_standalone/__next/server/app-paths-manifest.json +34 -34
  238. package/_standalone/__next/server/chunks/{6602.js → 1834.js} +21 -21
  239. package/_standalone/__next/server/chunks/3466.js +1 -1
  240. package/_standalone/__next/server/chunks/3727.js +1 -1
  241. package/_standalone/__next/server/chunks/4793.js +1 -1
  242. package/_standalone/__next/server/chunks/6377.js +3 -3
  243. package/_standalone/__next/server/chunks/9350.js +2 -2
  244. package/_standalone/__next/server/chunks/{3219.js → 9773.js} +3 -3
  245. package/_standalone/__next/server/middleware-build-manifest.js +1 -1
  246. package/_standalone/__next/server/middleware-react-loadable-manifest.js +1 -1
  247. package/_standalone/__next/server/middleware.js +2 -2
  248. package/_standalone/__next/server/pages/500.html +2 -2
  249. package/_standalone/__next/server/server-reference-manifest.js +1 -1
  250. package/_standalone/__next/server/server-reference-manifest.json +1 -1
  251. package/_standalone/__next/static/chunks/{2461-a1073a0bd04c228a.js → 1957-723ac4eb5200214c.js} +3 -3
  252. package/_standalone/__next/static/chunks/{47-41e1a06e6d389b69.js → 2737-f4970f0684c334d6.js} +1 -1
  253. package/_standalone/__next/static/chunks/{9216.d3339c27169b21bf.js → 6728.e1841cddb63308b0.js} +1 -1
  254. package/_standalone/__next/static/chunks/{6947.7e50e18da7dc4aef.js → 6947.fb89346ef2f6be17.js} +1 -1
  255. package/_standalone/__next/static/chunks/app/_not-found/{page-ec6fa498a07e6fd9.js → page-eaedcec1b693c03c.js} +1 -1
  256. package/{static-web/_next/static/chunks/app/agents/[agentKey]/page-44c493b744d18249.js → _standalone/__next/static/chunks/app/agents/[agentKey]/page-1dac12945bfbaf35.js} +1 -1
  257. package/{static-web/_next/static/chunks/app/agents/page-6591b482a193e657.js → _standalone/__next/static/chunks/app/agents/page-7ff2e39ca12eb20a.js} +1 -1
  258. package/_standalone/__next/static/chunks/app/capture/history/page-51db96203209a441.js +1 -0
  259. package/_standalone/__next/static/chunks/app/capture/page-3bf09d1f5e1c379c.js +1 -0
  260. package/_standalone/__next/static/chunks/app/changelog/page-01dc22b6d2230c7f.js +1 -0
  261. package/_standalone/__next/static/chunks/app/changes/page-c9f8d5632a001849.js +1 -0
  262. package/{static-web/_next/static/chunks/app/echo/[segment]/page-c5ea40ac04f2dc29.js → _standalone/__next/static/chunks/app/echo/[segment]/page-44b6b8e7fd0bbe31.js} +2 -2
  263. package/_standalone/__next/static/chunks/app/echo/page-c9f8d5632a001849.js +1 -0
  264. package/_standalone/__next/static/chunks/app/{error-c46d1b03d5e3289c.js → error-1cfcd6abd93c3837.js} +1 -1
  265. package/_standalone/__next/static/chunks/app/explore/{page-5d6dd4af8d1bb468.js → page-117fcf54b8b9765c.js} +1 -1
  266. package/_standalone/__next/static/chunks/app/global-error-11b333dcf222bc09.js +1 -0
  267. package/_standalone/__next/static/chunks/app/help/{page-3f0a1a8e51249cb2.js → page-6efb8aa3a3c169fa.js} +1 -1
  268. package/_standalone/__next/static/chunks/app/inbox/history/page-913645bbd6161116.js +1 -0
  269. package/{static-web/_next/static/chunks/app/layout-5966cd317bbed698.js → _standalone/__next/static/chunks/app/layout-24a31ea28c556e82.js} +7 -7
  270. package/_standalone/__next/static/chunks/app/login/page-7f9aca3d51266bec.js +1 -0
  271. package/{static-web/_next/static/chunks/app/page-5c9489e28657376e.js → _standalone/__next/static/chunks/app/page-35662964020c0ea9.js} +1 -1
  272. package/_standalone/__next/static/chunks/app/settings/{page-c9f44b3447a41431.js → page-f816f13a34613538.js} +1 -1
  273. package/{static-web/_next/static/chunks/app/setup/page-f5de08d0d588c778.js → _standalone/__next/static/chunks/app/setup/page-a1027871dc33ffbd.js} +1 -1
  274. package/_standalone/__next/static/chunks/app/todo/page-54c3ec77f662ff73.js +1 -0
  275. package/_standalone/__next/static/chunks/app/trash/page-50622e3df2047204.js +1 -0
  276. package/_standalone/__next/static/chunks/app/view/[...path]/{error-f73092e638a4e999.js → error-c9a3f6de7c963c74.js} +1 -1
  277. package/_standalone/__next/static/chunks/app/view/[...path]/{not-found-80e5f4054819b372.js → not-found-5a4f2b4fbe28d617.js} +1 -1
  278. package/_standalone/__next/static/chunks/app/view/[...path]/page-b10d3819827da1c2.js +12 -0
  279. package/{static-web/_next/static/chunks/app/wiki/page-4c9bc816069b6f2a.js → _standalone/__next/static/chunks/app/wiki/page-7afd3b97c1ea1b8c.js} +2 -2
  280. package/_standalone/__next/static/chunks/{main-app-23adfdc06470abb6.js → main-app-8a6081b103b8f494.js} +1 -1
  281. package/_standalone/__next/static/chunks/webpack-7d8c24c6af17dd51.js +1 -0
  282. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  283. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  284. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  285. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  286. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  287. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  288. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  289. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  290. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  291. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  292. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  293. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  294. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  295. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  296. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  297. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  298. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  299. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  300. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  301. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  302. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  303. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  304. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  305. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  306. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  307. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  308. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  309. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  310. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  311. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  312. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  313. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  314. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  315. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  316. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  317. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  318. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  319. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  320. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  321. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  322. package/_standalone/__node_modules/@aws-sdk/xml-builder/node_modules/.bin/fxparser +2 -2
  323. package/_standalone/__node_modules/@mariozechner/pi-agent-core/node_modules/.bin/pi-ai +2 -2
  324. package/_standalone/__node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/node_modules/.bin/anthropic-ai-sdk +2 -2
  325. package/_standalone/__node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/node_modules/.bin/openai +2 -2
  326. package/_standalone/__node_modules/@mariozechner/pi-ai/node_modules/.bin/anthropic-ai-sdk +2 -2
  327. package/_standalone/__node_modules/@mariozechner/pi-ai/node_modules/.bin/openai +2 -2
  328. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/.bin/extract-zip +2 -2
  329. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/.bin/highlight +2 -2
  330. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/.bin/jiti +2 -2
  331. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/.bin/marked +2 -2
  332. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/.bin/pi-ai +2 -2
  333. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/.bin/yaml +2 -2
  334. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-ai/node_modules/.bin/anthropic-ai-sdk +2 -2
  335. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-ai/node_modules/.bin/openai +2 -2
  336. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/index.js +14 -0
  337. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/license +9 -0
  338. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/package.json +61 -0
  339. package/_standalone/__node_modules/@mariozechner/pi-tui/node_modules/.bin/marked +2 -2
  340. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  341. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  342. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  343. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  344. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  345. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  346. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  347. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  348. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  349. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  350. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  351. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  352. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  353. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  354. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  355. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  356. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  357. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  358. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  359. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  360. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  361. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  362. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  363. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  364. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  365. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  366. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  367. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  368. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  369. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  370. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  371. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  372. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  373. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  374. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  375. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  376. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  377. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  378. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  379. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  380. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  381. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  382. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  383. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  384. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  385. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  386. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  387. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  388. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  389. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  390. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  391. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  392. package/_standalone/__node_modules/bignumber.js/doc/API.html +2249 -0
  393. package/_standalone/__node_modules/degenerator/node_modules/.bin/escodegen +2 -2
  394. package/_standalone/__node_modules/degenerator/node_modules/.bin/esgenerate +2 -2
  395. package/_standalone/__node_modules/degenerator/node_modules/.bin/esparse +2 -2
  396. package/_standalone/__node_modules/degenerator/node_modules/.bin/esvalidate +2 -2
  397. package/_standalone/__node_modules/entities/LICENSE +11 -0
  398. package/_standalone/__node_modules/entities/dist/decode-codepoint.js +46 -0
  399. package/_standalone/__node_modules/entities/dist/decode.js +544 -0
  400. package/_standalone/__node_modules/entities/dist/encode.js +90 -0
  401. package/_standalone/__node_modules/entities/dist/escape.js +132 -0
  402. package/_standalone/__node_modules/entities/dist/generated/decode-data-html.js +5 -0
  403. package/_standalone/__node_modules/entities/dist/generated/decode-data-xml.js +5 -0
  404. package/_standalone/__node_modules/entities/dist/generated/encode-html.js +12 -0
  405. package/_standalone/__node_modules/entities/dist/index.js +91 -0
  406. package/_standalone/__node_modules/entities/dist/internal/bin-trie-flags.js +18 -0
  407. package/_standalone/__node_modules/entities/dist/internal/decode-shared.js +17 -0
  408. package/_standalone/__node_modules/entities/dist/internal/encode-shared.js +93 -0
  409. package/_standalone/__node_modules/entities/package.json +83 -0
  410. package/_standalone/__node_modules/entities/src/decode-codepoint.ts +50 -0
  411. package/_standalone/__node_modules/entities/src/decode.ts +671 -0
  412. package/_standalone/__node_modules/entities/src/encode.ts +95 -0
  413. package/_standalone/__node_modules/entities/src/escape.ts +160 -0
  414. package/_standalone/__node_modules/entities/src/generated/decode-data-html.ts +7 -0
  415. package/_standalone/__node_modules/entities/src/generated/decode-data-xml.ts +7 -0
  416. package/_standalone/__node_modules/entities/src/generated/encode-html.ts +18 -0
  417. package/_standalone/__node_modules/entities/src/index.ts +162 -0
  418. package/_standalone/__node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
  419. package/_standalone/__node_modules/entities/src/internal/decode-shared.ts +18 -0
  420. package/_standalone/__node_modules/entities/src/internal/encode-shared.ts +123 -0
  421. package/_standalone/__node_modules/escodegen/node_modules/.bin/esparse +2 -2
  422. package/_standalone/__node_modules/escodegen/node_modules/.bin/esvalidate +2 -2
  423. package/_standalone/__node_modules/global-agent/node_modules/.bin/semver +2 -2
  424. package/_standalone/__node_modules/has-flag/index.js +8 -0
  425. package/_standalone/__node_modules/has-flag/license +9 -0
  426. package/_standalone/__node_modules/has-flag/package.json +46 -0
  427. package/_standalone/__node_modules/jsdom/node_modules/.bin/specificity +2 -2
  428. package/_standalone/__node_modules/koffi/doc/benchmarks.md +126 -0
  429. package/_standalone/__node_modules/koffi/doc/callbacks.md +210 -0
  430. package/_standalone/__node_modules/koffi/doc/contribute.md +148 -0
  431. package/_standalone/__node_modules/koffi/doc/functions.md +250 -0
  432. package/_standalone/__node_modules/koffi/doc/index.md +61 -0
  433. package/_standalone/__node_modules/koffi/doc/input.md +471 -0
  434. package/_standalone/__node_modules/koffi/doc/migration.md +159 -0
  435. package/_standalone/__node_modules/koffi/doc/misc.md +180 -0
  436. package/_standalone/__node_modules/koffi/doc/output.md +305 -0
  437. package/_standalone/__node_modules/koffi/doc/packaging.md +88 -0
  438. package/_standalone/__node_modules/koffi/doc/platforms.md +36 -0
  439. package/_standalone/__node_modules/koffi/doc/pointers.md +328 -0
  440. package/_standalone/__node_modules/koffi/doc/start.md +118 -0
  441. package/_standalone/__node_modules/koffi/doc/unions.md +186 -0
  442. package/_standalone/__node_modules/koffi/doc/variables.md +102 -0
  443. package/_standalone/__node_modules/postcss/node_modules/.bin/nanoid +2 -2
  444. package/_standalone/__node_modules/supports-color/browser.js +5 -0
  445. package/_standalone/__node_modules/supports-color/index.js +135 -0
  446. package/_standalone/__node_modules/supports-color/license +9 -0
  447. package/_standalone/__node_modules/supports-color/package.json +53 -0
  448. package/_standalone/__node_modules/tough-cookie/node_modules/.bin/tldts +2 -2
  449. package/_standalone/__node_modules/yaml/browser/dist/doc/Document.js +335 -0
  450. package/_standalone/__node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  451. package/_standalone/__node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  452. package/_standalone/__node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  453. package/_standalone/__node_modules/yaml/browser/dist/doc/directives.js +176 -0
  454. package/_standalone/__node_modules/yaml/dist/doc/Document.js +337 -0
  455. package/_standalone/__node_modules/yaml/dist/doc/anchors.js +76 -0
  456. package/_standalone/__node_modules/yaml/dist/doc/applyReviver.js +57 -0
  457. package/_standalone/__node_modules/yaml/dist/doc/createNode.js +90 -0
  458. package/_standalone/__node_modules/yaml/dist/doc/directives.js +178 -0
  459. package/_standalone/server.js +1 -1
  460. package/package.json +1 -1
  461. package/runtime-manifest.json +1 -1
  462. package/scripts/prepare-standalone.mjs +0 -1
  463. package/scripts/verify-standalone.mjs +12 -0
  464. package/static-web/.mindos-build-version +1 -1
  465. package/static-web/_next/static/chunks/{2461-a1073a0bd04c228a.js → 1957-723ac4eb5200214c.js} +3 -3
  466. package/static-web/_next/static/chunks/{47-41e1a06e6d389b69.js → 2737-f4970f0684c334d6.js} +1 -1
  467. package/static-web/_next/static/chunks/{9216.d3339c27169b21bf.js → 6728.e1841cddb63308b0.js} +1 -1
  468. package/static-web/_next/static/chunks/{6947.7e50e18da7dc4aef.js → 6947.fb89346ef2f6be17.js} +1 -1
  469. package/static-web/_next/static/chunks/app/_not-found/{page-ec6fa498a07e6fd9.js → page-eaedcec1b693c03c.js} +1 -1
  470. package/{_standalone/__next/static/chunks/app/agents/[agentKey]/page-44c493b744d18249.js → static-web/_next/static/chunks/app/agents/[agentKey]/page-1dac12945bfbaf35.js} +1 -1
  471. package/{_standalone/__next/static/chunks/app/agents/page-6591b482a193e657.js → static-web/_next/static/chunks/app/agents/page-7ff2e39ca12eb20a.js} +1 -1
  472. package/static-web/_next/static/chunks/app/capture/history/page-51db96203209a441.js +1 -0
  473. package/static-web/_next/static/chunks/app/capture/page-3bf09d1f5e1c379c.js +1 -0
  474. package/static-web/_next/static/chunks/app/changelog/page-01dc22b6d2230c7f.js +1 -0
  475. package/static-web/_next/static/chunks/app/changes/page-c9f8d5632a001849.js +1 -0
  476. package/{_standalone/__next/static/chunks/app/echo/[segment]/page-c5ea40ac04f2dc29.js → static-web/_next/static/chunks/app/echo/[segment]/page-44b6b8e7fd0bbe31.js} +2 -2
  477. package/static-web/_next/static/chunks/app/echo/page-c9f8d5632a001849.js +1 -0
  478. package/static-web/_next/static/chunks/app/{error-c46d1b03d5e3289c.js → error-1cfcd6abd93c3837.js} +1 -1
  479. package/static-web/_next/static/chunks/app/explore/{page-5d6dd4af8d1bb468.js → page-117fcf54b8b9765c.js} +1 -1
  480. package/static-web/_next/static/chunks/app/global-error-11b333dcf222bc09.js +1 -0
  481. package/static-web/_next/static/chunks/app/help/{page-3f0a1a8e51249cb2.js → page-6efb8aa3a3c169fa.js} +1 -1
  482. package/static-web/_next/static/chunks/app/inbox/history/page-913645bbd6161116.js +1 -0
  483. package/{_standalone/__next/static/chunks/app/layout-5966cd317bbed698.js → static-web/_next/static/chunks/app/layout-24a31ea28c556e82.js} +7 -7
  484. package/static-web/_next/static/chunks/app/login/page-7f9aca3d51266bec.js +1 -0
  485. package/{_standalone/__next/static/chunks/app/page-5c9489e28657376e.js → static-web/_next/static/chunks/app/page-35662964020c0ea9.js} +1 -1
  486. package/static-web/_next/static/chunks/app/settings/{page-c9f44b3447a41431.js → page-f816f13a34613538.js} +1 -1
  487. package/{_standalone/__next/static/chunks/app/setup/page-f5de08d0d588c778.js → static-web/_next/static/chunks/app/setup/page-a1027871dc33ffbd.js} +1 -1
  488. package/static-web/_next/static/chunks/app/todo/page-54c3ec77f662ff73.js +1 -0
  489. package/static-web/_next/static/chunks/app/trash/page-50622e3df2047204.js +1 -0
  490. package/static-web/_next/static/chunks/app/view/[...path]/{error-f73092e638a4e999.js → error-c9a3f6de7c963c74.js} +1 -1
  491. package/static-web/_next/static/chunks/app/view/[...path]/{not-found-80e5f4054819b372.js → not-found-5a4f2b4fbe28d617.js} +1 -1
  492. package/static-web/_next/static/chunks/app/view/[...path]/page-b10d3819827da1c2.js +12 -0
  493. package/{_standalone/__next/static/chunks/app/wiki/page-4c9bc816069b6f2a.js → static-web/_next/static/chunks/app/wiki/page-7afd3b97c1ea1b8c.js} +2 -2
  494. package/static-web/_next/static/chunks/{main-app-23adfdc06470abb6.js → main-app-8a6081b103b8f494.js} +1 -1
  495. package/static-web/_next/static/chunks/webpack-7d8c24c6af17dd51.js +1 -0
  496. package/static-web/help/index.html +3 -3
  497. package/static-web/index.html +3 -3
  498. package/static-web/setup/index.html +3 -3
  499. package/static-web/static-web-manifest.json +1 -1
  500. package/static-web/wiki/index.html +3 -3
  501. package/_standalone/__next/static/chunks/app/capture/history/page-d157ce945ad84c23.js +0 -1
  502. package/_standalone/__next/static/chunks/app/capture/page-ae4d683afdc7a7b2.js +0 -1
  503. package/_standalone/__next/static/chunks/app/changelog/page-5a39d8fe531f4d45.js +0 -1
  504. package/_standalone/__next/static/chunks/app/changes/page-64cf8d751245eee9.js +0 -1
  505. package/_standalone/__next/static/chunks/app/echo/page-64cf8d751245eee9.js +0 -1
  506. package/_standalone/__next/static/chunks/app/global-error-d42727c6c6c48879.js +0 -1
  507. package/_standalone/__next/static/chunks/app/inbox/history/page-b2930c2ef04e00b0.js +0 -1
  508. package/_standalone/__next/static/chunks/app/login/page-a4f9f9053c75ae8d.js +0 -1
  509. package/_standalone/__next/static/chunks/app/todo/page-c7629a0c102c634f.js +0 -1
  510. package/_standalone/__next/static/chunks/app/trash/page-d87207a63591ee16.js +0 -1
  511. package/_standalone/__next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +0 -12
  512. package/_standalone/__next/static/chunks/webpack-75abef9cbb1ea912.js +0 -1
  513. package/static-web/_next/static/chunks/app/capture/history/page-d157ce945ad84c23.js +0 -1
  514. package/static-web/_next/static/chunks/app/capture/page-ae4d683afdc7a7b2.js +0 -1
  515. package/static-web/_next/static/chunks/app/changelog/page-5a39d8fe531f4d45.js +0 -1
  516. package/static-web/_next/static/chunks/app/changes/page-64cf8d751245eee9.js +0 -1
  517. package/static-web/_next/static/chunks/app/echo/page-64cf8d751245eee9.js +0 -1
  518. package/static-web/_next/static/chunks/app/global-error-d42727c6c6c48879.js +0 -1
  519. package/static-web/_next/static/chunks/app/inbox/history/page-b2930c2ef04e00b0.js +0 -1
  520. package/static-web/_next/static/chunks/app/login/page-a4f9f9053c75ae8d.js +0 -1
  521. package/static-web/_next/static/chunks/app/todo/page-c7629a0c102c634f.js +0 -1
  522. package/static-web/_next/static/chunks/app/trash/page-d87207a63591ee16.js +0 -1
  523. package/static-web/_next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +0 -12
  524. package/static-web/_next/static/chunks/webpack-75abef9cbb1ea912.js +0 -1
  525. /package/_standalone/__next/static/{J9M4pgRyRHH7Ofbxuuklh → 3FkuJxcda957EywJ5ZWWG}/_buildManifest.js +0 -0
  526. /package/_standalone/__next/static/{J9M4pgRyRHH7Ofbxuuklh → 3FkuJxcda957EywJ5ZWWG}/_ssgManifest.js +0 -0
  527. /package/static-web/_next/static/{J9M4pgRyRHH7Ofbxuuklh → 3FkuJxcda957EywJ5ZWWG}/_buildManifest.js +0 -0
  528. /package/static-web/_next/static/{J9M4pgRyRHH7Ofbxuuklh → 3FkuJxcda957EywJ5ZWWG}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[47],{60047:(e,t,s)=>{s.d(t,{default:()=>tz});var r=s(66839),a=s(44223),n=s(19378),l=s(95333),o=s(96733),i=s(77932),d=s(82296),c=s(67885),m=s(71481),u=s(31606),x=s(21082),p=s(44361),g=s(52212),h=s(38688),b=s(72799),f=s(97786),v=s(56261),j=s(2073),y=s(65264),N=s(4373),k=s(78610),w=s(38325),S=s(76723),C=s(31082),A=s(40517),z=s(79455),T=s(69527),E=s(69604),R=s(74342),I=s(48892),P=s(87756);function M(e,t=[],s,r){let a=E.T_[e],n="zh"===r?a.nameZh:a.name,l=new Set(t.filter(e=>e&&e!==s).map(e=>e.trim().toLowerCase()));if(!l.has(n.trim().toLowerCase()))return n;let o=2;for(;l.has(`${n} ${o}`.toLowerCase());)o++;return`${n} ${o}`}function U({form:e,t,locale:s,layout:a="full"}){let n=E.T_[e.protocol],l="zh"===s?"名称":"Name",o="zh"===s?"协议":"Protocol",i="zh"===s?"可选,默认使用协议名称":"Optional, defaults to protocol name",d=e.isDuplicateName?"zh"===s?"名称已存在":"Name already exists":void 0;return(0,r.jsxs)("div",{className:"space-y-3",children:["compact"===a?(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsx)(T.D0,{label:l,hint:d,hintError:e.isDuplicateName,children:(0,r.jsx)(T.pd,{value:e.name,onChange:t=>e.setName(t.target.value),placeholder:i,autoFocus:!0})}),(0,r.jsx)(T.D0,{label:o,children:(0,r.jsx)(T.l6,{value:e.protocol,onChange:t=>e.setProtocol(t.target.value),children:E.jt.map(e=>(0,r.jsx)("option",{value:e,children:"zh"===s?E.T_[e].nameZh:E.T_[e].name},e))})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.D0,{label:l,hint:d,hintError:e.isDuplicateName,children:(0,r.jsx)(T.pd,{value:e.name,onChange:t=>e.setName(t.target.value),placeholder:i})}),(0,r.jsx)(T.D0,{label:o,children:(0,r.jsx)(T.l6,{value:e.protocol,onChange:t=>e.setProtocol(t.target.value),children:E.jt.map(e=>(0,r.jsx)("option",{value:e,children:"zh"===s?E.T_[e].nameZh:E.T_[e].name},e))})})]}),(0,r.jsx)(T.D0,{label:"Base URL",children:(0,r.jsx)(T.pd,{value:e.baseUrl,onChange:t=>e.setBaseUrl(t.target.value),placeholder:n.fixedBaseUrl||"https://api.example.com/v1"})}),(0,r.jsx)(T.D0,{label:(0,r.jsxs)(r.Fragment,{children:["API Key ",(0,r.jsx)("span",{className:"text-muted-foreground/50 font-normal",children:"zh"===s?"(可选)":"(optional)"})]}),children:(0,r.jsx)(T.yA,{value:e.apiKey,onChange:e.setApiKey,placeholder:"sk-..."})}),(0,r.jsx)(T.D0,{label:"zh"===s?"模型":"Model",children:(0,r.jsx)(I.A,{value:e.model,onChange:e.setModel,placeholder:n.defaultModel,provider:e.protocol,apiKey:e.apiKey,baseUrl:e.baseUrl,supportsListModels:!!e.baseUrl.trim(),allowNoKey:!0,browseLabel:t.settings.ai.listModels,noModelsLabel:t.settings.ai.noModelsFound})})]})}var D=s(29696);function $({result:e,disabled:t,onTest:s,t:a}){let n="testing"===e.state,l="ok"===e.state,o="error"===e.state;return(0,r.jsxs)("button",{type:"button",disabled:t||n,onClick:s,className:`inline-flex items-center gap-1.5 px-3.5 py-1.5 text-sm font-medium rounded-lg transition-all duration-200 disabled:cursor-not-allowed ${l?"bg-success/10 text-success border border-success/20":o?"bg-destructive/8 text-destructive border border-destructive/20 hover:bg-destructive/12":"border border-border text-muted-foreground hover:text-foreground hover:border-foreground/20 disabled:opacity-40"}`,children:[n?(0,r.jsx)(p.A,{size:13,className:"animate-spin"}):l?(0,r.jsx)(S.A,{size:13}):o?(0,r.jsx)(x.A,{size:13}):(0,r.jsx)(D.A,{size:13}),n?a.settings.ai.testKeyTesting:l&&null!=e.latency?a.settings.ai.testKeyOk(e.latency):o?function(e,t){switch(t){case"auth_error":return e.settings.ai.testKeyAuthError;case"model_not_found":return e.settings.ai.testKeyModelNotFound;case"endpoint_error":return e.settings.ai.testKeyEndpointError;case"rate_limited":return e.settings.ai.testKeyRateLimited;case"network_error":return e.settings.ai.testKeyNetworkError;default:return e.settings.ai.testKeyUnknown}}(a,e.code):a.settings.ai.testKey]})}let F=[10,20,30,40,50,999];function L({value:e,onChange:t}){let s=F.includes(e),[n,l]=(0,a.useState)(!s);return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)(T.l6,{value:n?"custom":String(e),onChange:e=>{let s=e.target.value;"custom"===s?l(!0):(l(!1),t(Number(s)))},className:"w-28",children:[(0,r.jsx)("option",{value:"10",children:"10"}),(0,r.jsx)("option",{value:"20",children:"20"}),(0,r.jsx)("option",{value:"30",children:"30"}),(0,r.jsx)("option",{value:"40",children:"40"}),(0,r.jsx)("option",{value:"50",children:"50"}),(0,r.jsx)("option",{value:"999",children:"Unlimited"}),(0,r.jsx)("option",{value:"custom",children:"Custom"})]}),n&&(0,r.jsx)("input",{type:"number",value:999===e?"":e,onChange:e=>{let s=parseInt(e.target.value,10);!isNaN(s)&&s>0&&t(Math.min(999,s))},placeholder:"1-999",min:1,max:999,autoFocus:!0,className:"w-20 px-2 py-1 rounded-md border border-border/60 bg-muted/50 text-sm text-foreground"})]})}function O({data:e,setData:t,updateAi:s,updateAgent:l,t:o}){let{locale:i}=(0,j.Y)(),d=e.envOverrides??{},c=e.ai.providers.find(t=>t.id===e.ai.activeProvider),m=c?E.T_[c.protocol]:null,[u,x]=(0,a.useState)({}),[p,g]=(0,a.useState)(!1),h=(0,a.useRef)(void 0),b=(0,a.useRef)(e.ai.activeProvider);(0,a.useEffect)(()=>{b.current!==e.ai.activeProvider&&(b.current=e.ai.activeProvider,x({}),h.current&&(clearTimeout(h.current),h.current=void 0))},[e.ai.activeProvider]),(0,a.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]),(0,a.useEffect)(()=>{let t=e.agent?.reconnectRetries??3;try{localStorage.setItem("mindos-reconnect-retries",String(t))}catch(e){console.warn("[AiTab] localStorage setItem reconnectRetries failed:",e)}},[e.agent?.reconnectRetries]);let f=(0,a.useCallback)(async()=>{if(!c)return;let e=c.id;x(t=>({...t,[e]:{state:"testing"}}));try{let t={provider:c.protocol};c.apiKey&&(t.apiKey=c.apiKey),c.model&&(t.model=c.model),c.baseUrl&&(t.baseUrl=c.baseUrl);let s=await fetch("/api/settings/test-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await s.json();r.ok?(x(t=>({...t,[e]:{state:"ok",latency:r.latency}})),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{x(t=>({...t,[e]:{state:"idle"}}))},8e3)):x(t=>({...t,[e]:{state:"error",error:r.error,code:r.code}}))}catch{x(t=>({...t,[e]:{state:"error",code:"network_error",error:"Network error"}}))}},[c]),v=(0,a.useCallback)(t=>{c&&("apiKey"in t&&x(e=>({...e,[c.id]:{state:"idle"}})),s({providers:e.ai.providers.map(e=>e.id===c.id?{...e,...t}:e)}))},[c,e.ai.providers,s]),y=c?(0,E.Ux)(c.protocol):void 0,w=!!y&&d[y],S=!!m?.apiKeyFallback,C=(0,a.useCallback)(()=>{if(!c)return;let t=E.T_[c.protocol];x(e=>({...e,[c.id]:{state:"idle"}})),s({providers:e.ai.providers.map(e=>e.id===c.id?{...e,apiKey:"",model:"",baseUrl:t?.fixedBaseUrl??""}:e)})},[c,e.ai.providers,s]),A=(0,a.useCallback)(()=>{if(!c)return;let t=e.ai.providers.filter(e=>e.id!==c.id);s({activeProvider:t.length>0?t[0].id:"",providers:t}),x(e=>{let t={...e};return delete t[c.id],t})},[c,e.ai.providers,s]),z=(0,a.useCallback)(t=>{let r={id:t.id||(0,P.mV)(),name:t.name,protocol:t.protocol,apiKey:t.apiKey,model:t.model,baseUrl:t.baseUrl};s({activeProvider:r.id,providers:[...e.ai.providers,r]}),g(!1)},[e.ai.providers,s]),M=c?.name??("zh"===i?"未选择":"No provider");return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(n.A,{size:15}),title:o.settings.ai.provider,description:M,children:[(0,r.jsx)(R.A,{value:e.ai.activeProvider,onChange:e=>{"skip"!==e&&s({activeProvider:e}),g(!1)},compact:!0,customProviders:e.ai.providers,onAdd:()=>{let t=E.T_.openai,s="zh"===i?t.nameZh:t.name,r=new Set(e.ai.providers.map(e=>e.name.toLowerCase())),a=s;if(r.has(a.toLowerCase())){let e=2;for(;r.has(`${s} (${e})`.toLowerCase());)e++;a=`${s} (${e})`}g(!0)}}),p&&(0,r.jsx)(B,{onSave:z,onCancel:()=>g(!1),t:o,existingNames:e.ai.providers.map(e=>e.name)},"new"),!p&&c&&(0,r.jsxs)("div",{className:"space-y-3 pt-3 border-t border-border",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsx)(T.D0,{label:"zh"===i?"名称":"Name",children:(0,r.jsx)(T.pd,{value:c.name,onChange:e=>v({name:e.target.value}),placeholder:"zh"===i?"输入名称":"Enter name"})}),(0,r.jsx)(T.D0,{label:"zh"===i?"协议":"Protocol",children:(0,r.jsx)(T.l6,{value:c.protocol,onChange:e=>v({protocol:e.target.value}),children:E.jt.map(e=>(0,r.jsx)("option",{value:e,children:"zh"===i?E.T_[e].nameZh:E.T_[e].name},e))})})]}),(0,r.jsxs)(T.D0,{label:(0,r.jsxs)(r.Fragment,{children:[o.settings.ai.apiKey," ",y&&(0,r.jsx)(T.Bt,{overridden:d[y]})]}),hint:m&&w?o.settings.ai.envFieldNote(y):m&&S?o.settings.ai.keyOptionalHint:void 0,children:[(0,r.jsx)(T.yA,{value:c.apiKey,onChange:e=>v({apiKey:e}),placeholder:"sk-..."}),m?.signupUrl&&!c.apiKey&&!w&&(0,r.jsxs)("a",{href:m.signupUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs mt-1.5 hover:underline",style:{color:"var(--amber)"},children:[(0,r.jsx)(N.A,{size:10}),S?"zh"===i?`下载 ${m.nameZh}`:`Download ${m.name}`:"zh"===i?`获取 ${m.nameZh} API Key`:`Get ${m.name} API Key`]})]}),(m?.supportsBaseUrl||c.baseUrl)&&(0,r.jsx)(T.D0,{label:"Base URL",children:(0,r.jsx)(T.pd,{value:c.baseUrl,onChange:e=>v({baseUrl:e.target.value}),placeholder:m?.fixedBaseUrl||(0,E.Ot)(c.protocol)||"https://api.openai.com/v1"})}),(0,r.jsx)(T.D0,{label:"zh"===i?"模型":"Model",children:(0,r.jsx)(I.A,{value:c.model,onChange:e=>v({model:e}),placeholder:m?.defaultModel??"",provider:c.protocol,apiKey:c.apiKey,envKey:!!w,baseUrl:c.baseUrl,supportsListModels:!!c.baseUrl?.trim()||!!m?.supportsListModels,allowNoKey:!!c.baseUrl?.trim(),browseLabel:o.settings.ai.listModels,noModelsLabel:o.settings.ai.noModelsFound})}),(0,r.jsx)(K,{provider:c.protocol,result:u[c.id]??{state:"idle"},hasKey:!!c.apiKey,hasEnv:!!w,hasConfig:!!(c.apiKey||c.model||c.baseUrl),onTest:f,onReset:C,onDelete:A,t:o})]})]}),(0,r.jsx)(G,{data:e,setData:t,t:o}),(0,r.jsx)(V,{data:e,setData:t,t:o}),(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(k.A,{size:15}),title:o.settings.agent.title,description:o.settings.agent.subtitle??"Configure how the AI agent operates",children:[(0,r.jsx)(T.pM,{label:o.settings.agent.maxSteps,hint:o.settings.agent.maxStepsHint,children:(0,r.jsx)(L,{value:e.agent?.maxSteps??20,onChange:e=>l({maxSteps:e})})}),(0,r.jsx)(T.pM,{label:o.settings.agent.contextStrategy,hint:o.settings.agent.contextStrategyHint,children:(0,r.jsxs)(T.l6,{value:e.agent?.contextStrategy??"auto",onChange:e=>l({contextStrategy:e.target.value}),className:"w-24",children:[(0,r.jsx)("option",{value:"auto",children:o.settings.agent.contextStrategyAuto}),(0,r.jsx)("option",{value:"off",children:o.settings.agent.contextStrategyOff})]})}),(0,r.jsx)(T.pM,{label:o.settings.agent.reconnectRetries,hint:o.settings.agent.reconnectRetriesHint,children:(0,r.jsxs)(T.l6,{value:String(e.agent?.reconnectRetries??3),onChange:e=>{let t=Number(e.target.value);l({reconnectRetries:t});try{localStorage.setItem("mindos-reconnect-retries",String(t))}catch(e){console.warn("[AiTab] localStorage setItem reconnectRetries failed:",e)}},className:"w-20",children:[(0,r.jsx)("option",{value:"0",children:"Off"}),(0,r.jsx)("option",{value:"1",children:"1"}),(0,r.jsx)("option",{value:"2",children:"2"}),(0,r.jsx)("option",{value:"3",children:"3"}),(0,r.jsx)("option",{value:"5",children:"5"}),(0,r.jsx)("option",{value:"10",children:"10"})]})}),m?.supportsThinking&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.pM,{label:o.settings.agent.thinking,hint:o.settings.agent.thinkingHint,children:(0,r.jsx)(T.lM,{checked:e.agent?.enableThinking??!1,onChange:()=>l({enableThinking:!e.agent?.enableThinking})})}),e.agent?.enableThinking&&(0,r.jsx)(T.D0,{label:o.settings.agent.thinkingBudget,hint:o.settings.agent.thinkingBudgetHint,children:(0,r.jsx)(T.pd,{type:"number",value:String(e.agent?.thinkingBudget??5e3),onChange:e=>{let t=parseInt(e.target.value,10);isNaN(t)||l({thinkingBudget:Math.max(1e3,Math.min(5e4,t))})},min:1e3,max:5e4,step:1e3})})]})]}),(0,r.jsx)(Y,{})]})}function K({provider:e,result:t,hasKey:s,hasEnv:n,hasConfig:l,onTest:o,onReset:i,onDelete:d,t:c}){let[m,x]=(0,a.useState)(null),p=(0,a.useRef)(void 0),h=!!E.T_[e]?.apiKeyFallback;(0,a.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]);let b=e=>{m===e?("reset"===e?i?.():d?.(),x(null),p.current&&clearTimeout(p.current)):(x(e),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>x(null),3e3))},{locale:f}=(0,j.Y)();return(0,r.jsx)("div",{className:"space-y-2 pt-2",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)($,{result:t,disabled:!(s||n||h),onTest:o,t:c}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[i&&l&&(0,r.jsxs)("button",{type:"button",onClick:()=>b("reset"),onBlur:()=>{"reset"===m&&(x(null),p.current&&clearTimeout(p.current))},className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-lg transition-all duration-200 ${"reset"===m?"bg-destructive/10 text-destructive border border-destructive/25 font-medium":"text-muted-foreground/60 hover:text-muted-foreground hover:bg-muted/50"}`,children:[(0,r.jsx)(g.A,{size:12}),"reset"===m?"zh"===f?"确认重置?":"Confirm?":"zh"===f?"重置":"Reset"]}),d&&(0,r.jsxs)("button",{type:"button",onClick:()=>b("delete"),onBlur:()=>{"delete"===m&&(x(null),p.current&&clearTimeout(p.current))},className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-lg transition-all duration-200 ${"delete"===m?"bg-destructive/10 text-destructive border border-destructive/25 font-medium":"text-muted-foreground/60 hover:text-muted-foreground hover:bg-muted/50"}`,children:[(0,r.jsx)(u.A,{size:12}),"delete"===m?"zh"===f?"确认删除?":"Confirm?":"zh"===f?"删除":"Delete"]})]})]})})}function B({initial:e,onSave:t,onCancel:s,onDelete:n,t:l,existingNames:o}){let{locale:i}=(0,j.Y)(),d=function({initial:e,onSave:t,locale:s,existingNames:r}){let n=(0,a.useMemo)(()=>e?.name??M(e?.protocol??"openai",r,e?.name,s),[e?.name,e?.protocol,r,s]),[l,o]=(0,a.useState)(n),[i,d]=(0,a.useState)(e?.protocol??"openai"),[c,m]=(0,a.useState)(e?.apiKey??""),[u,x]=(0,a.useState)(e?.model??""),[p,g]=(0,a.useState)(e?.baseUrl??""),[h,b]=(0,a.useState)({state:"idle"}),[f,v]=(0,a.useState)(!!e?.name),j=(0,a.useMemo)(()=>M(i,r,e?.name,s),[i,r,e?.name,s]);(0,a.useEffect)(()=>{f||o(j)},[j,f]);let y=(0,a.useCallback)(e=>{v(!0),o(e)},[]),N=(0,a.useCallback)(e=>{d(e),b({state:"idle"})},[]),k=l.trim()||j,w=!!(k&&r?.some(t=>t!==e?.name&&t.toLowerCase()===k.toLowerCase())),S=!!(p.trim()&&u.trim()&&!w),C="zh"===s?"接口地址和模型为必填":"Base URL and model are required",A="zh"===s?"名称已存在,请使用其他名称":"Name already exists, please use a different name",z=(0,a.useCallback)(async()=>{if(w)return void b({state:"error",error:A});if(!p.trim()||!u.trim())return void b({state:"error",error:C});b({state:"testing"});try{let t=await fetch("/api/settings/test-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e?.id?{provider:e.id,apiKey:c,model:u,baseUrl:p}:{provider:i,apiKey:c,model:u,baseUrl:p,baseProviderId:i})}),s=await t.json();s.ok?b({state:"ok",latency:s.latency}):b({state:"error",error:s.error||"Test failed",code:s.code})}catch{b({state:"error",code:"network_error",error:"Network error"})}},[w,A,p,u,e?.id,c,i,C]),T=(0,a.useCallback)(()=>{w?b({state:"error",error:A}):p.trim()&&u.trim()?t({id:e?.id||(0,P.mV)(),name:k,protocol:i,apiKey:c,model:u.trim(),baseUrl:p.trim()}):b({state:"error",error:C})},[w,A,p,u,C,t,e?.id,k,i,c]);return{name:l,setName:y,protocol:i,setProtocol:N,apiKey:c,setApiKey:m,model:u,setModel:x,baseUrl:p,setBaseUrl:g,testResult:h,canSave:S,isDuplicateName:w,handleTest:z,handleSave:T}}({initial:e,onSave:t,locale:i,existingNames:o}),[c,m]=(0,a.useState)(!1),x=(0,a.useRef)(void 0);(0,a.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let p=e?.id?"zh"===i?"编辑 Provider":"Edit Provider":"zh"===i?"添加 Provider":"Add Provider",g=[];return d.name.trim()||g.push("zh"===i?"名称":"Name"),d.baseUrl.trim()||g.push("zh"===i?"接口地址":"Base URL"),d.model.trim()||g.push("zh"===i?"模型":"Model"),(0,r.jsxs)("div",{className:"mt-3 rounded-lg border border-border overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-border",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground",children:p}),(0,r.jsx)("button",{type:"button",onClick:s,className:"p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors","aria-label":"zh"===i?"关闭":"Close",children:(0,r.jsx)(b.A,{size:14})})]}),(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)(U,{form:d,t:l,locale:i,layout:"compact"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 pt-4",children:[(0,r.jsx)($,{result:d.testResult,disabled:!d.canSave,onTest:d.handleTest,t:l}),n&&e?.id&&(0,r.jsxs)("button",{type:"button",onClick:()=>{c?(n(),x.current&&clearTimeout(x.current)):(m(!0),x.current=setTimeout(()=>m(!1),3e3))},onBlur:()=>{m(!1),x.current&&clearTimeout(x.current)},className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-lg transition-all duration-200 ${c?"bg-destructive/10 text-destructive border border-destructive/25 font-medium":"text-muted-foreground/60 hover:text-muted-foreground hover:bg-muted/50"}`,children:[(0,r.jsx)(u.A,{size:12}),c?"zh"===i?"确认删除?":"Confirm?":"zh"===i?"删除":"Delete"]}),(0,r.jsxs)("div",{className:"flex-1",children:[d.isDuplicateName&&(0,r.jsx)("span",{className:"text-2xs text-destructive pl-2",children:"zh"===i?"名称已存在":"Name already exists"}),!d.isDuplicateName&&!d.canSave&&g.length>0&&(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/60 pl-2",children:"zh"===i?`需要: ${g.join("、")}`:`Required: ${g.join(", ")}`})]}),(0,r.jsx)("button",{type:"button",onClick:s,className:"px-3 py-1.5 text-sm rounded-lg text-muted-foreground hover:text-foreground transition-colors",children:l.settings?.customProviders?.modal?.buttonCancel??"Cancel"}),(0,r.jsx)("button",{type:"button",onClick:d.handleSave,disabled:!d.canSave,className:"px-4 py-1.5 text-sm font-medium rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:"zh"===i?"保存":"Save"})]})]})]})}let _=[{label:"SiliconFlow",baseUrl:"https://api.siliconflow.cn/v1",model:"BAAI/bge-m3",badge:"free"},{label:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"text-embedding-3-small",badge:null},{label:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-embed",badge:null},{label:"Ollama",baseUrl:"http://localhost:11434/v1",model:"nomic-embed-text",badge:"local"}],H=[{id:"Xenova/bge-small-zh-v1.5",label:"BGE Small ZH (33MB)",desc:"Chinese + English"},{id:"Xenova/all-MiniLM-L6-v2",label:"MiniLM L6 (23MB)",desc:"English only"},{id:"Xenova/bge-small-en-v1.5",label:"BGE Small EN (33MB)",desc:"English only"}];function G({data:e,setData:t,t:s}){let{locale:n}=(0,j.Y)(),l=s.settings.embedding??{},o=e.embedding??{enabled:!1,provider:"local",baseUrl:"",apiKey:"",model:""},i=e.embeddingStatus??{enabled:!1,ready:!1,building:!1,docCount:0},d=o.provider||"local",[c,u]=(0,a.useState)(null),[x,h]=(0,a.useState)("idle"),[f,v]=(0,a.useState)(null);(0,a.useEffect)(()=>{o.enabled&&"local"===d&&(0,y.n)("/api/embedding").then(e=>u(e.downloaded)).catch(()=>u(!1))},[o.enabled,d]),(0,a.useEffect)(()=>{if("downloading"!==x)return;let e=setInterval(()=>{(0,y.n)("/api/embedding",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"status"})}).then(e=>{e.downloaded&&(u(!0),h("idle"),z.oR.success?.(l.modelReady??"Model downloaded")??(0,z.oR)(l.modelReady??"Model downloaded")),e.error&&(h("error"),v(e.error),z.oR.error?.(e.error)??(0,z.oR)(e.error))}).catch(()=>{})},3e3);return()=>clearInterval(e)},[x,l.modelReady]);let N=(0,a.useCallback)(()=>{h("starting"),v(null),(0,y.n)("/api/embedding",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"download",model:o.model||void 0})}).then(e=>{e.ok?h("downloading"):(h("error"),v(e.error??"Download request failed"))}).catch(e=>{h("error"),v(e instanceof Error?e.message:"Network error")})},[o.model]),k=(0,a.useCallback)(()=>{h("idle"),v(null)},[]);return(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(w.A,{size:15}),title:l.title??"Embedding Search",description:l.description??"Semantic search with vector embeddings.",children:[(0,r.jsx)(T.pM,{label:l.enable??"Enable embedding search",hint:l.enableHint,children:(0,r.jsx)(T.lM,{checked:o.enabled,onChange:()=>{t(e=>e?{...e,embedding:{...o,enabled:!o.enabled}}:e)}})}),o.enabled&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>t(e=>e?{...e,embedding:{...o,provider:"local",model:o.model||"Xenova/bge-small-zh-v1.5"}}:e),className:`flex-1 px-3 py-2 text-sm rounded-lg border transition-colors text-center ${"local"===d?"border-[var(--amber)] text-[var(--amber)] bg-[var(--amber)]/10":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[(0,r.jsxs)("span",{className:"font-medium",children:[l.providerLocal??"Local"," (",l.providerLocalFree??"Free",")"]}),(0,r.jsx)("span",{className:"block text-xs opacity-70 mt-0.5",children:l.providerLocalDesc??"Runs on your machine"})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>t(e=>e?{...e,embedding:{...o,provider:"api",model:o.model||"BAAI/bge-m3",baseUrl:o.baseUrl||"https://api.siliconflow.cn/v1"}}:e),className:`flex-1 px-3 py-2 text-sm rounded-lg border transition-colors text-center ${"api"===d?"border-[var(--amber)] text-[var(--amber)] bg-[var(--amber)]/10":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[(0,r.jsx)("span",{className:"font-medium",children:l.providerApi??"API"}),(0,r.jsx)("span",{className:"block text-xs opacity-70 mt-0.5",children:l.providerApiDesc??"OpenAI, DeepSeek, Ollama, etc."})]})]}),"local"===d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.D0,{label:l.model??"Model",hint:l.modelHint,children:(0,r.jsx)("div",{className:"space-y-1.5",children:H.map(e=>(0,r.jsxs)("label",{className:`flex items-center gap-3 px-3 py-2 rounded-lg border cursor-pointer transition-colors ${o.model===e.id?"border-[var(--amber)] bg-[var(--amber)]/5":"border-border hover:bg-muted"}`,children:[(0,r.jsx)("input",{type:"radio",name:"local-model",checked:o.model===e.id,onChange:()=>t(t=>t?{...t,embedding:{...o,model:e.id}}:t),className:"accent-[var(--amber)]"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground",children:e.label}),(0,r.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:e.desc})]})]},e.id))})}),!1===c&&"idle"===x&&(0,r.jsxs)("button",{type:"button",onClick:N,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:opacity-90 transition-opacity",children:[(0,r.jsx)(m.A,{size:14}),l.downloadModel??"Install Runtime & Download Model"]}),"starting"===x&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,r.jsx)(p.A,{size:14,className:"animate-spin"}),(0,r.jsx)("span",{children:l.starting??"Starting download..."})]}),"downloading"===x&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,r.jsx)(p.A,{size:14,className:"animate-spin"}),(0,r.jsx)("span",{children:l.downloading??"Downloading model..."})]}),"error"===x&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,r.jsx)(b.A,{size:14}),(0,r.jsx)("span",{children:f??"Download failed"})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:l.downloadFailedHint??"If install or download keeps failing, try API mode or set HF_ENDPOINT=https://hf-mirror.com"}),(0,r.jsxs)("button",{type:"button",onClick:k,className:"flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-md border border-border text-foreground hover:bg-muted transition-colors",children:[(0,r.jsx)(g.A,{size:12}),l.retry??"Retry"]})]}),!0===c&&"idle"===x&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-success",children:[(0,r.jsx)(S.A,{size:12}),(0,r.jsx)("span",{children:l.modelReady??"Model ready"})]})]}),"api"===d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid grid-cols-2 gap-2",children:_.map(e=>{let s=o.baseUrl===e.baseUrl;return(0,r.jsxs)("button",{type:"button",onClick:()=>{t(t=>t?{...t,embedding:{...o,baseUrl:e.baseUrl,model:e.model}}:t)},className:`relative px-3 py-2 text-left text-sm rounded-lg border transition-colors ${s?"border-[var(--amber)] bg-[var(--amber)]/5":"border-border hover:bg-muted"}`,children:[(0,r.jsx)("span",{className:`font-medium ${s?"text-[var(--amber)]":"text-foreground"}`,children:e.label}),e.badge&&(0,r.jsx)("span",{className:`ml-1.5 inline-flex items-center px-1.5 py-0.5 text-2xs rounded-full font-medium ${"free"===e.badge?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-blue-500/10 text-blue-600 dark:text-blue-400"}`,children:"free"===e.badge?"zh"===n?"免费":"Free":"zh"===n?"本地":"Local"}),(0,r.jsx)("span",{className:"block text-2xs text-muted-foreground mt-0.5 truncate",children:e.model})]},e.label)})}),!o.baseUrl&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"zh"===n?"推荐使用硅基流动 (SiliconFlow),注册即可免费使用嵌入模型。":"SiliconFlow recommended — free embedding models with registration."}),(0,r.jsx)(T.D0,{label:l.baseUrl??"Base URL",hint:l.baseUrlHint,children:(0,r.jsx)(T.pd,{value:o.baseUrl,onChange:e=>t(t=>t?{...t,embedding:{...o,baseUrl:e.target.value}}:t),placeholder:"https://api.siliconflow.cn/v1"})}),(0,r.jsx)(T.D0,{label:l.apiKey??"API Key",hint:o.baseUrl?.includes("localhost")||o.baseUrl?.includes("127.0.0.1")?l.apiKeyHintLocal??("zh"===n?"本地服务可留空":"Leave empty for local services"):l.apiKeyHint??("zh"===n?"在服务商网站获取 API Key":"Get your API key from the provider"),children:(0,r.jsx)(T.yA,{value:o.apiKey,onChange:e=>t(t=>t?{...t,embedding:{...o,apiKey:e}}:t),placeholder:"sk-..."})}),(0,r.jsx)(T.D0,{label:l.model??"Model",hint:l.modelName,children:(0,r.jsx)(T.pd,{value:o.model,onChange:e=>t(t=>t?{...t,embedding:{...o,model:e.target.value}}:t),placeholder:"BAAI/bge-m3"})})]}),(0,r.jsx)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground pt-1",children:i.building?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.A,{size:12,className:"animate-spin"}),(0,r.jsx)("span",{children:l.indexBuilding??"Building embedding index..."})]}):i.ready?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.A,{size:12,className:"text-success"}),(0,r.jsx)("span",{children:"function"==typeof l.indexReady?l.indexReady(i.docCount):`${i.docCount} documents indexed`})]}):(0,r.jsx)("span",{children:l.indexPending??"Index will be built on first search"})})]})]})}let J=[{id:"auto",labelKey:"providerAuto",descKey:"providerAutoDesc"},{id:"exa",labelKey:"providerExa",descKey:"providerExaDesc"},{id:"perplexity",labelKey:"providerPerplexity",descKey:"providerPerplexityDesc"},{id:"gemini",labelKey:"providerGemini",descKey:"providerGeminiDesc"}],W=[{key:"exaApiKey",labelKey:"exaApiKey",placeholder:"exa-..."},{key:"perplexityApiKey",labelKey:"perplexityApiKey",placeholder:"pplx-..."},{key:"geminiApiKey",labelKey:"geminiApiKey",placeholder:"AIza..."}];function V({data:e,setData:t,t:s}){let a=s.settings.webSearch??{},n=e.webSearch??{provider:"auto",exaApiKey:"",perplexityApiKey:"",geminiApiKey:""},l=n.provider||"auto";return(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(C.A,{size:15}),title:a.title??"Web Search",description:a.description??"Configure search providers.",children:[(0,r.jsx)("div",{className:"flex gap-2 flex-wrap",children:J.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>{t(t=>t?{...t,webSearch:{...n,provider:e.id}}:t)},className:`px-2.5 py-1 text-xs rounded-md border transition-colors ${l===e.id?"border-[var(--amber)] text-[var(--amber)] bg-[var(--amber)]/10":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:a[e.labelKey]??e.id},e.id))}),(()=>{let e=J.find(e=>e.id===l);if(!e)return null;let t=a[e.descKey];return t?(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:t}):null})(),W.map(e=>(0,r.jsx)(T.D0,{label:a[e.labelKey]??e.key,hint:a.apiKeyHint,children:(0,r.jsx)(T.yA,{value:n[e.key]??"",onChange:s=>t(t=>t?{...t,webSearch:{...n,[e.key]:s}}:t),placeholder:e.placeholder})},e.key)),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:a.noKeysHint??"Works without API keys via Exa MCP (zero-config)."})]})}function Y(){let{t:e}=(0,j.Y)(),[t,s]=(0,a.useState)("panel");return(0,a.useEffect)(()=>{try{let e=localStorage.getItem("ask-mode");"popup"===e&&s("popup")}catch(e){console.warn("[AiTab] localStorage getItem ask-mode failed:",e)}},[]),(0,r.jsx)(T.L7,{icon:(0,r.jsx)(A.A,{size:15}),title:e.settings.askDisplayMode?.label??"Display Mode",description:e.settings.askDisplayMode?.hint??"Side panel stays docked on the right. Popup opens a floating dialog.",children:(0,r.jsxs)(T.l6,{value:t,onChange:e=>(e=>{s(e);try{localStorage.setItem("ask-mode",e)}catch(e){console.warn("[AiTab] localStorage setItem ask-mode failed:",e)}window.dispatchEvent(new StorageEvent("storage",{key:"ask-mode",newValue:e}))})(e.target.value),children:[(0,r.jsx)("option",{value:"panel",children:e.settings.askDisplayMode?.panel??"Side Panel"}),(0,r.jsx)("option",{value:"popup",children:e.settings.askDisplayMode?.popup??"Popup"})]})})}var q=s(38125),Z=s(25208),X=s(88283),Q=s(47533),ee=s(95156),et=s(21036),es=s(72615),er=s(98327);let ea=[{value:"lora",label:"Lora",category:"Serif",style:{fontFamily:"Lora, Georgia, serif"}},{value:"ibm-plex-sans",label:"IBM Plex Sans",category:"Sans",style:{fontFamily:"'IBM Plex Sans', sans-serif"}},{value:"inter",label:"Inter",category:"Sans",style:{fontFamily:"var(--font-inter), sans-serif"}},{value:"ibm-plex-mono",label:"IBM Plex Mono",category:"Mono",style:{fontFamily:"'IBM Plex Mono', monospace"}}];function en({icon:e,label:t,children:s}){return(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e}),(0,r.jsx)("span",{className:"text-sm font-medium text-foreground",children:t})]}),s]})}function el({options:e,value:t,onChange:s}){return(0,r.jsx)("div",{className:"flex gap-2",children:e.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>s(e.value),className:`flex items-center gap-1.5 px-3.5 py-2 text-sm font-medium rounded-xl transition-all ${t===e.value?"bg-[var(--amber)] text-[var(--amber-foreground)] shadow-sm":"bg-muted/50 text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[e.icon,e.label]},e.value))})}function eo({font:e,setFont:t,fontSize:s,setFontSize:n,contentWidth:l,setContentWidth:o,dark:i,setDark:c,locale:m,setLocale:u,t:x}){let[p,g]=(0,a.useState)(!1),[h,b]=(0,a.useState)(()=>localStorage.getItem("theme")??"system"),[f,v]=(0,a.useState)(()=>localStorage.getItem("locale")??"system"),j=x.settings.appearance;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(d.A,{size:15}),title:j.preferencesTitle??"Preferences",children:[(0,r.jsx)(en,{icon:(0,r.jsx)(q.A,{size:14}),label:j.colorTheme,children:(0,r.jsx)(el,{options:[{value:"system",label:j.system,icon:(0,r.jsx)(A.A,{size:14})},{value:"dark",label:j.dark,icon:(0,r.jsx)(Z.A,{size:14})},{value:"light",label:j.light,icon:(0,r.jsx)(q.A,{size:14})}],value:h,onChange:e=>{b(e),localStorage.setItem("theme",e);let t="system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches:"dark"===e;c(t),document.documentElement.classList.toggle("dark",t)}})}),(0,r.jsx)(en,{icon:(0,r.jsx)(C.A,{size:14}),label:j.language,children:(0,r.jsx)(el,{options:[{value:"system",label:j.system,icon:(0,r.jsx)(A.A,{size:14})},{value:"en",label:"EN"},{value:"zh",label:"中文"}],value:f,onChange:e=>{v(e),localStorage.setItem("locale",e);let t="system"===e?navigator.language.startsWith("zh")?"zh":"en":e;u(t),document.cookie=`locale=${t};path=/;max-age=31536000;SameSite=Lax`}})})]}),(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(X.A,{size:15}),title:j.readingTitle??"Reading",description:j.readingDesc??"Customize how your notes look",children:[(0,r.jsx)(en,{icon:(0,r.jsx)(Q.A,{size:14}),label:j.readingFont,children:(0,r.jsx)("div",{className:"space-y-0.5",children:ea.map(s=>{let a=e===s.value;return(0,r.jsxs)("button",{type:"button",onClick:()=>t(s.value),className:`flex items-center gap-4 w-full px-3 py-2.5 rounded-lg transition-all text-left relative ${a?"bg-[var(--amber-subtle)]":"hover:bg-muted/50"}`,children:[a&&(0,r.jsx)("div",{className:"absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full bg-[var(--amber)]"}),(0,r.jsx)("span",{className:`text-xl font-medium w-10 text-center shrink-0 ${a?"text-foreground":"text-muted-foreground/60"}`,style:{fontFamily:s.style.fontFamily},children:"Aa"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,r.jsx)("span",{className:`text-sm font-medium ${a?"text-foreground":"text-muted-foreground"}`,style:{fontFamily:s.style.fontFamily},children:s.label}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground/50",children:s.category})]}),(0,r.jsx)("p",{className:`text-sm truncate mt-0.5 ${a?"text-muted-foreground":"text-muted-foreground/40"}`,style:{fontFamily:s.style.fontFamily},children:j.fontPreview})]})]},s.value)})})}),(0,r.jsx)(en,{icon:(0,r.jsx)(ee.A,{size:14}),label:j.fontSize,children:(0,r.jsxs)("div",{className:"px-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground/60 shrink-0",style:{fontSize:"11px"},children:"A"}),(0,r.jsx)("input",{type:"range",min:12,max:22,step:1,value:parseInt(s),onChange:e=>n(`${e.target.value}px`),className:"flex-1 h-1.5 rounded-full appearance-none bg-muted cursor-pointer accent-[var(--amber)] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-[var(--amber)] [&::-webkit-slider-thumb]:shadow-sm [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:transition-transform [&::-webkit-slider-thumb]:hover:scale-110 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-[var(--amber)] [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:shadow-sm [&::-moz-range-thumb]:cursor-pointer"}),(0,r.jsx)("span",{className:"text-base text-muted-foreground/60 shrink-0",children:"A"})]}),(0,r.jsx)("div",{className:"text-center mt-1.5",children:(0,r.jsxs)("span",{className:"text-xs tabular-nums text-muted-foreground",children:[parseInt(s),"px"]})}),(0,r.jsx)("p",{className:"text-muted-foreground leading-relaxed mt-2 px-1",style:{fontSize:s,fontFamily:ea.find(t=>t.value===e)?.style.fontFamily},children:j.fontSizePreview})]})}),(0,r.jsx)(en,{icon:(0,r.jsx)(et.A,{size:14}),label:j.contentWidth,children:(0,r.jsxs)("div",{className:"px-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:"▬"}),(0,r.jsx)("input",{type:"range",min:50,max:100,step:5,value:parseInt(l)||80,onChange:e=>o(`${e.target.value}%`),className:"flex-1 h-1.5 rounded-full appearance-none bg-muted cursor-pointer accent-[var(--amber)] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-[var(--amber)] [&::-webkit-slider-thumb]:shadow-sm [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:transition-transform [&::-webkit-slider-thumb]:hover:scale-110 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-[var(--amber)] [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:shadow-sm [&::-moz-range-thumb]:cursor-pointer"}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:"▬▬▬"})]}),(0,r.jsx)("div",{className:"text-center mt-1.5",children:(0,r.jsxs)("span",{className:"text-xs tabular-nums text-muted-foreground",children:[parseInt(l)||80,"%"]})})]})})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground/40 px-0.5",children:j.browserNote}),(0,r.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>g(!p),className:"flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[p?(0,r.jsx)(es.A,{size:14}):(0,r.jsx)(er.A,{size:14}),x.settings.tabs.shortcuts]}),p&&(0,r.jsx)("div",{className:"mt-3 space-y-0.5",children:x.shortcuts.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center justify-between py-1.5 px-1",children:[(0,r.jsx)("span",{className:"text-sm text-foreground",children:e.description}),(0,r.jsx)("div",{className:"flex items-center gap-1",children:e.keys.map((e,t)=>(0,r.jsx)("kbd",{className:"px-1.5 py-0.5 text-2xs font-mono bg-muted border border-border rounded text-muted-foreground",children:e},t))})]},t))})]})]})}var ei=s(10500),ed=s(42973),ec=s(24336),em=s(46884),eu=s(34137),ex=s(84734),ep=s(46990);function eg(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:e<0x40000000?`${(e/1048576).toFixed(1)} MB`:`${(e/0x40000000).toFixed(2)} GB`}var eh=s(6379),eb=s(65799);let ef=(0,eb.createServerReference)("005aa291b6c5edbf762e5baf93fb7dd69d1a439e1a",eb.callServer,void 0,eb.findSourceMapURL,"scanExampleFilesAction"),ev=(0,eb.createServerReference)("00986a59ec963570c9368bca8f962617f1531ab6f0",eb.callServer,void 0,eb.findSourceMapURL,"cleanupExamplesAction");var ej=s(5038);let ey={checking:!1,available:null,isSelf:!1,suggestion:null};function eN({message:e,sub:t}){return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"text-center space-y-4 max-w-sm px-6",children:[(0,r.jsx)(p.A,{size:32,className:"animate-spin mx-auto text-[var(--amber)]"}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:e}),t&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:t})]})})}function ek({m:e}){let[t,s]=(0,a.useState)(0),[n,l]=(0,a.useState)(0),[o,i]=(0,a.useState)(ey),[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(null),[x,g]=(0,a.useState)(void 0),b=(0,a.useRef)(void 0),f=(0,a.useRef)(void 0);(0,a.useEffect)(()=>{(0,y.n)("/api/settings").then(e=>{let t=e.port||3456;s(t),l(t)}).catch(()=>{})},[]),(0,a.useEffect)(()=>()=>{clearInterval(b.current),clearTimeout(f.current)},[]);let v=n!==t,j=n<1024||n>65535,N=o.checking||!1===o.available&&!o.isSelf,k=(0,a.useCallback)(async e=>{if(e<1024||e>65535)return void i({...ey,available:!1,invalid:!0});i({...ey,checking:!0});try{let t=await (0,y.n)("/api/setup/check-port",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:e})});i({checking:!1,available:t.available,isSelf:t.isSelf??!1,suggestion:t.suggestion??null})}catch{i(ey)}},[]),w=async()=>{if(v&&!j&&!N&&!d){c(!0);try{let t=await (0,y.n)("/api/setup/check-port",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:n})});if(!t.available&&!t.isSelf){i({checking:!1,available:!1,isSelf:!1,suggestion:t.suggestion??null}),c(!1),z.oR.error(e.portInUse(n));return}await (0,y.n)("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:n})}),u(e.portWebRestarting),g(e.portRedirecting);try{await (0,y.n)("/api/restart",{method:"POST"})}catch{}let s=`${window.location.protocol}//${window.location.hostname}:${n}`,r=Date.now()+3e4;b.current=setInterval(async()=>{if(Date.now()>r){clearInterval(b.current),u(null),c(!1),z.oR.error(e.portRestartTimeout);return}try{(await fetch(`${s}/api/health`,{signal:AbortSignal.timeout(2e3)})).ok&&(clearInterval(b.current),window.location.href=s)}catch{}},1500)}catch{c(!1),z.oR.error(e.portUpdateFailed)}}};return 0===t?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.L7,{icon:(0,r.jsx)(A.A,{size:15}),title:e.webPortLabel,description:e.webPortHint,children:(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:1024,max:65535,value:n,onChange:e=>{let t=parseInt(e.target.value,10)||n;l(t),i(ey),clearTimeout(f.current),t>=1024&&t<=65535&&(f.current=setTimeout(()=>k(t),500))},onBlur:()=>{clearTimeout(f.current),n>=1024&&n<=65535&&k(n)},className:"flex-1 px-2.5 py-1.5 text-sm rounded-lg border border-border bg-muted/30 text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring tabular-nums"}),(0,r.jsx)("button",{type:"button",onClick:w,disabled:!v||j||N||d,className:"shrink-0 px-4 py-1.5 rounded-lg text-xs font-medium transition-colors bg-[var(--amber)] text-[var(--amber-foreground)] hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:d?e.portUpdating:e.portUpdateBtn})]}),o.checking&&(0,r.jsxs)("p",{className:"text-xs flex items-center gap-1 text-muted-foreground",children:[(0,r.jsx)(p.A,{size:11,className:"animate-spin"})," ",e.portChecking]}),!o.checking&&!1===o.available&&!o.invalid&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("p",{className:"text-xs flex items-center gap-1 text-[var(--amber)]",children:[(0,r.jsx)(ej.A,{size:11})," ",e.portInUse(n)]}),null!==o.suggestion&&(0,r.jsx)("button",{type:"button",onClick:()=>{l(o.suggestion),i(ey),setTimeout(()=>k(o.suggestion),0)},className:"text-xs px-2 py-0.5 rounded border border-[var(--amber)] text-[var(--amber)] transition-colors hover:bg-[var(--amber-subtle)]",children:e.portSuggest(o.suggestion)})]}),!o.checking&&o.invalid&&(0,r.jsxs)("p",{className:"text-xs flex items-center gap-1 text-destructive",children:[(0,r.jsx)(ej.A,{size:11})," 1024 – 65535"]}),!o.checking&&!0===o.available&&(0,r.jsxs)("p",{className:"text-xs flex items-center gap-1 text-success",children:[(0,r.jsx)(h.A,{size:11})," ",o.isSelf?e.portSelf:e.portAvailable]})]})}),m&&(0,r.jsx)(eN,{message:m,sub:x})]})}function ew({data:e,setData:t,t:s}){let l=e.envOverrides??{},o=s.settings.knowledge,i=s.settings.appearance,[d,m]=(0,a.useState)(()=>"1"===localStorage.getItem("mindos:labs-echo")),[x,h]=(0,a.useState)(()=>"1"===localStorage.getItem("mindos:labs-workflows")),[b,f]=(0,a.useState)(()=>"true"===localStorage.getItem("show-hidden-files")),[v,j]=(0,a.useState)(null),[N,k]=(0,a.useState)(!1),[w,C]=(0,a.useState)(null);(0,a.useEffect)(()=>{ef().then(e=>j(e.files.length)).catch(e=>{console.warn("[KnowledgeTab] scanExampleFilesAction failed:",e)})},[]);let[A,E]=(0,a.useState)(null),[R,I]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(0,y.n)("/api/setup").then(e=>{let t=e.guideState;t&&(E(t.active),I(!!t.dismissed))}).catch(e=>{console.error("Failed to fetch guide state:",e)})},[]);let P=(0,a.useCallback)(()=>{let e=!R;I(e);let t={dismissed:e};e||(t.active=!0),(0,y.n)("/api/setup",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({guideState:t})}).then(()=>window.dispatchEvent(new Event("guide-state-updated"))).catch(t=>{console.error("Failed to update guide state:",t),I(!e)})},[R]),M=(0,a.useCallback)(()=>{(0,y.n)("/api/setup",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({guideState:{active:!0,dismissed:!1,walkthroughStep:0,walkthroughDismissed:!1}})}).then(()=>{E(!0),I(!1),window.dispatchEvent(new Event("guide-state-updated"))}).catch(e=>console.error("Failed to restart walkthrough:",e))},[]),U=(0,a.useSyncExternalStore)(()=>()=>{},()=>`${window.location.protocol}//${window.location.hostname}`,()=>"http://localhost"),[D,$]=(0,a.useState)(!1),[F,L]=(0,a.useState)(null),[O,K]=(0,a.useState)(!1),[B,_]=(0,a.useState)(!1),H=!!e.authToken,G=F??e.authToken??"";async function J(){$(!0);try{let e=await (0,y.n)("/api/settings/reset-token",{method:"POST"});L(e.token),t(t=>t?{...t,authToken:e.token}:t)}finally{$(!1)}}async function W(){t(e=>e?{...e,authToken:""}:e),L(null)}return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(ei.A,{size:15}),title:o.cardTitle??"Knowledge Base",description:o.mindRootHint,children:[(0,r.jsx)(T.D0,{label:(0,r.jsxs)(r.Fragment,{children:[o.mindRoot," ",(0,r.jsx)(T.Bt,{overridden:l.MIND_ROOT})]}),hint:l.MIND_ROOT?o.envNote:o.mindRootHint,children:(0,r.jsx)(T.pd,{value:e.mindRoot,onChange:e=>t(t=>t?{...t,mindRoot:e.target.value}:t),placeholder:"/path/to/your/notes"})}),(0,r.jsx)(T.pM,{label:o.showHiddenFiles,hint:o.showHiddenFilesHint,children:(0,r.jsx)(T.lM,{checked:b,onChange:()=>{let e=!b;f(e),(0,eh.Fo)(e)}})}),null!==v&&v>0&&null===w&&(0,r.jsx)(T.pM,{label:o.cleanupExamples,hint:o.cleanupExamplesHint,children:(0,r.jsxs)("button",{onClick:()=>_(!0),disabled:N,title:N?s.hints.cleanupInProgress:void 0,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-lg border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors shrink-0 disabled:opacity-50",children:[N?(0,r.jsx)(p.A,{size:12,className:"animate-spin"}):(0,r.jsx)(u.A,{size:12}),o.cleanupExamplesButton,(0,r.jsx)("span",{className:"ml-1 tabular-nums text-2xs opacity-70",children:v})]})}),null!==w&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-success",children:[(0,r.jsx)(S.A,{size:14}),o.cleanupExamplesDone(w)]})]}),(0,r.jsx)(ek,{m:s.settings?.mcp??{}}),(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(ed.A,{size:15}),title:o.securityTitle??"Security",children:[(0,r.jsx)(T.D0,{label:o.webPassword,hint:o.webPasswordHint,children:(0,r.jsx)(T.yA,{value:e.webPassword??"",onChange:e=>t(t=>t?{...t,webPassword:e}:t),placeholder:o.passwordPlaceholder??"Leave empty to disable"})}),(0,r.jsx)(T.pM,{label:o.allowNetworkAccess??"Allow LAN access",hint:o.allowNetworkAccessHint??"Bind the Web UI to 0.0.0.0 so other devices on your network can connect after restart.",children:(0,r.jsx)(T.lM,{checked:!0===e.allowNetworkAccess,onChange:()=>t(e=>e?{...e,allowNetworkAccess:!0!==e.allowNetworkAccess}:e)})}),(0,r.jsx)(T.D0,{label:o.authToken,hint:H?o.authTokenHint:o.authTokenNone,children:(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 bg-background border border-border rounded-lg min-h-[38px]",children:[(0,r.jsx)("code",{className:"flex-1 text-xs font-mono text-foreground break-all select-all",children:G||(0,r.jsx)("span",{className:"text-muted-foreground italic",children:o.tokenNotSet??"— not set —"})}),G&&(0,r.jsx)("button",{type:"button",onClick:function(){let t=F??e.authToken??"";t&&(0,ep.l)(t).then(e=>{e&&z.oR.copy()})},className:"shrink-0 p-1 rounded text-muted-foreground hover:text-foreground transition-colors",title:o.authTokenCopy,children:(0,r.jsx)(ec.A,{size:13})})]}),e.mcpPort&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:[o.authTokenMcpPort,": ",(0,r.jsx)("code",{className:"font-mono",children:e.mcpPort}),G&&(0,r.jsxs)(r.Fragment,{children:[" \xa0\xb7\xa0 ",o.mcpUrl??"MCP URL",": ",(0,r.jsx)("code",{className:"font-mono select-all",children:`${U}:${e.mcpPort}/mcp`})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("button",{type:"button",onClick:function(){K(!0)},disabled:D,title:D?s.hints.tokenResetInProgress:void 0,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg border border-border text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[(0,r.jsx)(c.A,{size:14,className:D?"animate-spin":""}),o.authTokenReset]}),H&&(0,r.jsxs)("button",{type:"button",onClick:W,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/50 transition-colors",children:[(0,r.jsx)(u.A,{size:14}),o.authTokenClear]})]}),F&&(0,r.jsx)("p",{className:"text-xs text-[var(--amber-text)]",children:o.tokenGenerated})]})})]}),null!==A&&(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(n.A,{size:15}),title:s.guide?.title??"Getting Started",children:[(0,r.jsx)(T.pM,{label:s.guide?.showGuide??"Show getting started guide",children:(0,r.jsx)(T.lM,{checked:!R,onChange:()=>P()})}),(0,r.jsxs)("button",{onClick:M,className:"flex items-center gap-1.5 mt-2 px-3 py-1.5 text-sm rounded-lg border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:[(0,r.jsx)(g.A,{size:14}),o.restartWalkthrough??"Restart walkthrough"]})]}),(0,r.jsx)(T.L7,{icon:(0,r.jsx)(em.A,{size:15}),title:i.labsTitle??"Labs",description:i.labsDesc??"Experimental features that are still in development.",children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)(eS,{label:i.labsEcho??"Echo",description:i.labsEchoDesc??"Reflective journaling powered by your notes.",checked:d,onChange:e=>{m(e),localStorage.setItem("mindos:labs-echo",e?"1":"0"),window.dispatchEvent(new Event("mindos:labs-changed"))}}),(0,r.jsx)(eS,{label:i.labsWorkflows??"Flows",description:i.labsWorkflowsDesc??"Visual workflow automation for agents.",checked:x,onChange:e=>{h(e),localStorage.setItem("mindos:labs-workflows",e?"1":"0"),window.dispatchEvent(new Event("mindos:labs-changed"))}})]})}),(0,r.jsx)(eC,{k:o}),(0,r.jsx)(ex.TM,{open:O,title:o.authTokenReset??"Regenerate Token",message:o.authTokenResetConfirm,confirmLabel:o.authTokenReset??"Regenerate",cancelLabel:o.cancel??"Cancel",onConfirm:()=>{K(!1),J()},onCancel:()=>K(!1)}),(0,r.jsx)(ex.TM,{open:B,title:o.cleanupExamples??"Cleanup Examples",message:null!==v?o.cleanupExamplesConfirm(v):"",confirmLabel:o.cleanupExamplesButton??"Clean up",cancelLabel:o.cancel??"Cancel",variant:"destructive",onConfirm:async()=>{_(!1),k(!0);let e=await ev();k(!1),e.success&&(C(e.deleted),j(0))},onCancel:()=>_(!1)})]})}function eS({label:e,description:t,checked:s,onChange:a}){return(0,r.jsxs)("label",{className:"flex items-center gap-3 cursor-pointer group",children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground block",children:e}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:t})]}),(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":s,onClick:()=>a(!s),className:`relative w-9 h-5 rounded-full transition-colors shrink-0 ${s?"bg-[var(--amber)]":"bg-muted-foreground/20"}`,children:(0,r.jsx)("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform ${s?"translate-x-4":"translate-x-0"}`})})]})}function eC({k:e}){let[t,s]=(0,a.useState)(!1),[n,l]=(0,a.useState)(null),[o,i]=(0,a.useState)(!1),d=(0,a.useCallback)(async()=>{i(!0);try{let e=await (0,y.n)("/api/monitoring",{timeout:5e3});l(e)}catch{}i(!1)},[]),c=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{if(!t){c.current=!1;return}c.current||(d(),c.current=!0);let e=setInterval(d,1e4);return()=>clearInterval(e)},[t,d]),(0,r.jsxs)("div",{className:"border-t border-border pt-5",children:[(0,r.jsxs)("button",{onClick:()=>s(e=>!e),className:"flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors w-full",children:[t?(0,r.jsx)(es.A,{size:14}):(0,r.jsx)(er.A,{size:14}),(0,r.jsx)(eu.A,{size:12}),e.monitoringTitle??"System Monitoring",o&&(0,r.jsx)(p.A,{size:10,className:"animate-spin ml-1"})]}),t&&n&&(0,r.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-x-6 gap-y-2 text-xs",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorHeap??"Heap"}),(0,r.jsxs)("span",{className:"ml-2 tabular-nums",children:[eg(n.system.memory.heapUsed)," / ",eg(n.system.memory.heapTotal)]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorRss??"RSS"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:eg(n.system.memory.rss)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorUptime??"Uptime"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:function(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let s=Math.floor(t/60);if(s<60)return`${s}m ${t%60}s`;let r=Math.floor(s/60);if(r<24)return`${r}h ${s%60}m`;let a=Math.floor(r/24);return`${a}d ${r%24}h`}(n.system.uptimeMs)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorNode??"Node"}),(0,r.jsx)("span",{className:"ml-2",children:n.system.nodeVersion})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorRequests??"Requests"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:n.application.agentRequests})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorToolCalls??"Tool Calls"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:n.application.toolExecutions})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorTokens??"Tokens"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:(n.application.totalTokens.input+n.application.totalTokens.output).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorFiles??"Files"}),(0,r.jsxs)("span",{className:"ml-2 tabular-nums",children:[n.knowledgeBase.fileCount," (",eg(n.knowledgeBase.totalSizeBytes),")"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:"MCP"}),(0,r.jsx)("span",{className:"ml-2",children:n.mcp.running?e.monitorMcpRunning?.(n.mcp.port)??`Running :${n.mcp.port}`:e.monitorMcpStopped??"Stopped"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorErrors??"Errors"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:n.application.errors})]})]}),t&&!n&&!o&&(0,r.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:e.monitoringFailed??"Failed to load monitoring data"})]})}var eA=s(75579),ez=s(19777),eT=s(98480),eE=s(9986),eR=s(55798),eI=s(20677),eP=s(73601),eM=s(27636),eU=s(2408);let eD=(0,s(93738).default)(()=>Promise.all([s.e(8225),s.e(206),s.e(2303)]).then(s.bind(s,32303)),{loadableGenerated:{webpack:()=>[32303]},ssr:!1});function e$({skill:e,expanded:t,onExpand:s,onToggle:a,onDelete:n,onEditStart:l,onEditSave:o,onEditCancel:i,editing:d,editContent:c,setEditContent:m,editError:g,saving:h,fullContent:b,loadingContent:f,loadErrors:v,m:j}){return(0,r.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>s(e.name),children:[t?(0,r.jsx)(es.A,{size:12}):(0,r.jsx)(er.A,{size:12}),(0,r.jsx)("span",{className:"text-xs font-medium flex-1",children:e.name}),(0,r.jsx)("span",{className:`text-2xs px-1.5 py-0.5 rounded ${"builtin"===e.source?"bg-muted text-muted-foreground":"bg-[var(--amber-subtle)] text-[var(--amber-text)]"}`,children:"builtin"===e.source?j?.skillBuiltin??"Built-in":j?.skillUser??"Custom"}),(0,r.jsx)(T.lM,{size:"sm",checked:e.enabled,onClick:t=>{t.stopPropagation(),a(e.name,!e.enabled)}})]}),t&&(0,r.jsxs)("div",{className:"px-3 py-2 border-t border-border text-xs space-y-2 bg-muted/20",children:[(0,r.jsx)("p",{className:"text-muted-foreground",children:e.description||"No description"}),(0,r.jsx)("p",{className:"text-muted-foreground font-mono text-2xs",children:e.path}),f===e.name?(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[(0,r.jsx)(p.A,{size:10,className:"animate-spin"}),(0,r.jsx)("span",{className:"text-2xs",children:"Loading..."})]}):b[e.name]?(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-2xs text-muted-foreground font-medium",children:j?.skillContent??"Content"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[e.editable&&d!==e.name&&(0,r.jsxs)("button",{onClick:()=>l(e.name),className:"flex items-center gap-1 text-2xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,r.jsx)(eU.A,{size:10}),j?.editSkill??"Edit"]}),e.editable&&(0,r.jsxs)("button",{onClick:()=>n(e.name),className:"flex items-center gap-1 text-2xs text-destructive hover:underline",children:[(0,r.jsx)(u.A,{size:10}),j?.deleteSkill??"Delete"]})]})]}),d===e.name?(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("textarea",{value:c,onChange:e=>m(e.target.value),rows:Math.min(20,(c.match(/\n/g)||[]).length+3),className:"w-full px-2.5 py-1.5 text-xs rounded-md border border-border bg-background text-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring resize-y font-mono"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("button",{onClick:()=>o(e.name),disabled:h,className:"flex items-center gap-1 px-2.5 py-1 text-xs rounded-md disabled:opacity-40 disabled:cursor-not-allowed transition-colors bg-[var(--amber)] text-[var(--amber-foreground)]",children:[h&&(0,r.jsx)(p.A,{size:10,className:"animate-spin"}),j?.saveSkill??"Save"]}),(0,r.jsx)("button",{onClick:i,className:"px-2.5 py-1 text-xs rounded-md border border-border text-muted-foreground hover:text-foreground transition-colors",children:j?.cancelSkill??"Cancel"})]}),g&&(0,r.jsxs)("p",{className:"text-2xs text-destructive flex items-center gap-1",children:[(0,r.jsx)(x.A,{size:10}),g]})]}):(0,r.jsx)("div",{className:"w-full rounded-md border border-border bg-background/50 max-h-[300px] overflow-y-auto px-2.5 py-1.5 text-xs [&_.prose]:max-w-none [&_.prose]:text-xs [&_h1]:text-sm [&_h2]:text-xs [&_h3]:text-xs [&_pre]:text-2xs [&_code]:text-2xs",children:(0,r.jsx)(eD,{content:function(e){if(!e.startsWith("---"))return e;let t=e.indexOf("\n---",3);return -1===t?e:e.slice(t+4).replace(/^\n+/,"")}(b[e.name])})})]}):v[e.name]?(0,r.jsxs)("p",{className:"text-2xs text-destructive flex items-center gap-1",children:[(0,r.jsx)(x.A,{size:10}),v[e.name]]}):null]})]})}let eF=e=>`---
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2737],{22737:(e,t,s)=>{s.d(t,{default:()=>tz});var r=s(66839),a=s(44223),n=s(19378),l=s(95333),o=s(96733),i=s(77932),d=s(82296),c=s(67885),m=s(71481),u=s(31606),x=s(21082),p=s(44361),g=s(52212),h=s(38688),b=s(72799),f=s(97786),v=s(56261),j=s(2073),y=s(65264),N=s(4373),k=s(78610),w=s(38325),S=s(76723),C=s(31082),A=s(40517),z=s(79455),T=s(69527),E=s(69604),R=s(74342),I=s(48892),P=s(87756);function M(e,t=[],s,r){let a=E.T_[e],n="zh"===r?a.nameZh:a.name,l=new Set(t.filter(e=>e&&e!==s).map(e=>e.trim().toLowerCase()));if(!l.has(n.trim().toLowerCase()))return n;let o=2;for(;l.has(`${n} ${o}`.toLowerCase());)o++;return`${n} ${o}`}function U({form:e,t,locale:s,layout:a="full"}){let n=E.T_[e.protocol],l="zh"===s?"名称":"Name",o="zh"===s?"协议":"Protocol",i="zh"===s?"可选,默认使用协议名称":"Optional, defaults to protocol name",d=e.isDuplicateName?"zh"===s?"名称已存在":"Name already exists":void 0;return(0,r.jsxs)("div",{className:"space-y-3",children:["compact"===a?(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsx)(T.D0,{label:l,hint:d,hintError:e.isDuplicateName,children:(0,r.jsx)(T.pd,{value:e.name,onChange:t=>e.setName(t.target.value),placeholder:i,autoFocus:!0})}),(0,r.jsx)(T.D0,{label:o,children:(0,r.jsx)(T.l6,{value:e.protocol,onChange:t=>e.setProtocol(t.target.value),children:E.jt.map(e=>(0,r.jsx)("option",{value:e,children:"zh"===s?E.T_[e].nameZh:E.T_[e].name},e))})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.D0,{label:l,hint:d,hintError:e.isDuplicateName,children:(0,r.jsx)(T.pd,{value:e.name,onChange:t=>e.setName(t.target.value),placeholder:i})}),(0,r.jsx)(T.D0,{label:o,children:(0,r.jsx)(T.l6,{value:e.protocol,onChange:t=>e.setProtocol(t.target.value),children:E.jt.map(e=>(0,r.jsx)("option",{value:e,children:"zh"===s?E.T_[e].nameZh:E.T_[e].name},e))})})]}),(0,r.jsx)(T.D0,{label:"Base URL",children:(0,r.jsx)(T.pd,{value:e.baseUrl,onChange:t=>e.setBaseUrl(t.target.value),placeholder:n.fixedBaseUrl||"https://api.example.com/v1"})}),(0,r.jsx)(T.D0,{label:(0,r.jsxs)(r.Fragment,{children:["API Key ",(0,r.jsx)("span",{className:"text-muted-foreground/50 font-normal",children:"zh"===s?"(可选)":"(optional)"})]}),children:(0,r.jsx)(T.yA,{value:e.apiKey,onChange:e.setApiKey,placeholder:"sk-..."})}),(0,r.jsx)(T.D0,{label:"zh"===s?"模型":"Model",children:(0,r.jsx)(I.A,{value:e.model,onChange:e.setModel,placeholder:n.defaultModel,provider:e.protocol,apiKey:e.apiKey,baseUrl:e.baseUrl,supportsListModels:!!e.baseUrl.trim(),allowNoKey:!0,browseLabel:t.settings.ai.listModels,noModelsLabel:t.settings.ai.noModelsFound})})]})}var D=s(29696);function $({result:e,disabled:t,onTest:s,t:a}){let n="testing"===e.state,l="ok"===e.state,o="error"===e.state;return(0,r.jsxs)("button",{type:"button",disabled:t||n,onClick:s,className:`inline-flex items-center gap-1.5 px-3.5 py-1.5 text-sm font-medium rounded-lg transition-all duration-200 disabled:cursor-not-allowed ${l?"bg-success/10 text-success border border-success/20":o?"bg-destructive/8 text-destructive border border-destructive/20 hover:bg-destructive/12":"border border-border text-muted-foreground hover:text-foreground hover:border-foreground/20 disabled:opacity-40"}`,children:[n?(0,r.jsx)(p.A,{size:13,className:"animate-spin"}):l?(0,r.jsx)(S.A,{size:13}):o?(0,r.jsx)(x.A,{size:13}):(0,r.jsx)(D.A,{size:13}),n?a.settings.ai.testKeyTesting:l&&null!=e.latency?a.settings.ai.testKeyOk(e.latency):o?function(e,t){switch(t){case"auth_error":return e.settings.ai.testKeyAuthError;case"model_not_found":return e.settings.ai.testKeyModelNotFound;case"endpoint_error":return e.settings.ai.testKeyEndpointError;case"rate_limited":return e.settings.ai.testKeyRateLimited;case"network_error":return e.settings.ai.testKeyNetworkError;default:return e.settings.ai.testKeyUnknown}}(a,e.code):a.settings.ai.testKey]})}let F=[10,20,30,40,50,999];function L({value:e,onChange:t}){let s=F.includes(e),[n,l]=(0,a.useState)(!s);return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)(T.l6,{value:n?"custom":String(e),onChange:e=>{let s=e.target.value;"custom"===s?l(!0):(l(!1),t(Number(s)))},className:"w-28",children:[(0,r.jsx)("option",{value:"10",children:"10"}),(0,r.jsx)("option",{value:"20",children:"20"}),(0,r.jsx)("option",{value:"30",children:"30"}),(0,r.jsx)("option",{value:"40",children:"40"}),(0,r.jsx)("option",{value:"50",children:"50"}),(0,r.jsx)("option",{value:"999",children:"Unlimited"}),(0,r.jsx)("option",{value:"custom",children:"Custom"})]}),n&&(0,r.jsx)("input",{type:"number",value:999===e?"":e,onChange:e=>{let s=parseInt(e.target.value,10);!isNaN(s)&&s>0&&t(Math.min(999,s))},placeholder:"1-999",min:1,max:999,autoFocus:!0,className:"w-20 px-2 py-1 rounded-md border border-border/60 bg-muted/50 text-sm text-foreground"})]})}function O({data:e,setData:t,updateAi:s,updateAgent:l,t:o}){let{locale:i}=(0,j.Y)(),d=e.envOverrides??{},c=e.ai.providers.find(t=>t.id===e.ai.activeProvider),m=c?E.T_[c.protocol]:null,[u,x]=(0,a.useState)({}),[p,g]=(0,a.useState)(!1),h=(0,a.useRef)(void 0),b=(0,a.useRef)(e.ai.activeProvider);(0,a.useEffect)(()=>{b.current!==e.ai.activeProvider&&(b.current=e.ai.activeProvider,x({}),h.current&&(clearTimeout(h.current),h.current=void 0))},[e.ai.activeProvider]),(0,a.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]),(0,a.useEffect)(()=>{let t=e.agent?.reconnectRetries??3;try{localStorage.setItem("mindos-reconnect-retries",String(t))}catch(e){console.warn("[AiTab] localStorage setItem reconnectRetries failed:",e)}},[e.agent?.reconnectRetries]);let f=(0,a.useCallback)(async()=>{if(!c)return;let e=c.id;x(t=>({...t,[e]:{state:"testing"}}));try{let t={provider:c.protocol};c.apiKey&&(t.apiKey=c.apiKey),c.model&&(t.model=c.model),c.baseUrl&&(t.baseUrl=c.baseUrl);let s=await fetch("/api/settings/test-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await s.json();r.ok?(x(t=>({...t,[e]:{state:"ok",latency:r.latency}})),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{x(t=>({...t,[e]:{state:"idle"}}))},8e3)):x(t=>({...t,[e]:{state:"error",error:r.error,code:r.code}}))}catch{x(t=>({...t,[e]:{state:"error",code:"network_error",error:"Network error"}}))}},[c]),v=(0,a.useCallback)(t=>{c&&("apiKey"in t&&x(e=>({...e,[c.id]:{state:"idle"}})),s({providers:e.ai.providers.map(e=>e.id===c.id?{...e,...t}:e)}))},[c,e.ai.providers,s]),y=c?(0,E.Ux)(c.protocol):void 0,w=!!y&&d[y],S=!!m?.apiKeyFallback,C=(0,a.useCallback)(()=>{if(!c)return;let t=E.T_[c.protocol];x(e=>({...e,[c.id]:{state:"idle"}})),s({providers:e.ai.providers.map(e=>e.id===c.id?{...e,apiKey:"",model:"",baseUrl:t?.fixedBaseUrl??""}:e)})},[c,e.ai.providers,s]),A=(0,a.useCallback)(()=>{if(!c)return;let t=e.ai.providers.filter(e=>e.id!==c.id);s({activeProvider:t.length>0?t[0].id:"",providers:t}),x(e=>{let t={...e};return delete t[c.id],t})},[c,e.ai.providers,s]),z=(0,a.useCallback)(t=>{let r={id:t.id||(0,P.mV)(),name:t.name,protocol:t.protocol,apiKey:t.apiKey,model:t.model,baseUrl:t.baseUrl};s({activeProvider:r.id,providers:[...e.ai.providers,r]}),g(!1)},[e.ai.providers,s]),M=c?.name??("zh"===i?"未选择":"No provider");return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(n.A,{size:15}),title:o.settings.ai.provider,description:M,children:[(0,r.jsx)(R.A,{value:e.ai.activeProvider,onChange:e=>{"skip"!==e&&s({activeProvider:e}),g(!1)},compact:!0,customProviders:e.ai.providers,onAdd:()=>{let t=E.T_.openai,s="zh"===i?t.nameZh:t.name,r=new Set(e.ai.providers.map(e=>e.name.toLowerCase())),a=s;if(r.has(a.toLowerCase())){let e=2;for(;r.has(`${s} (${e})`.toLowerCase());)e++;a=`${s} (${e})`}g(!0)}}),p&&(0,r.jsx)(B,{onSave:z,onCancel:()=>g(!1),t:o,existingNames:e.ai.providers.map(e=>e.name)},"new"),!p&&c&&(0,r.jsxs)("div",{className:"space-y-3 pt-3 border-t border-border",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsx)(T.D0,{label:"zh"===i?"名称":"Name",children:(0,r.jsx)(T.pd,{value:c.name,onChange:e=>v({name:e.target.value}),placeholder:"zh"===i?"输入名称":"Enter name"})}),(0,r.jsx)(T.D0,{label:"zh"===i?"协议":"Protocol",children:(0,r.jsx)(T.l6,{value:c.protocol,onChange:e=>v({protocol:e.target.value}),children:E.jt.map(e=>(0,r.jsx)("option",{value:e,children:"zh"===i?E.T_[e].nameZh:E.T_[e].name},e))})})]}),(0,r.jsxs)(T.D0,{label:(0,r.jsxs)(r.Fragment,{children:[o.settings.ai.apiKey," ",y&&(0,r.jsx)(T.Bt,{overridden:d[y]})]}),hint:m&&w?o.settings.ai.envFieldNote(y):m&&S?o.settings.ai.keyOptionalHint:void 0,children:[(0,r.jsx)(T.yA,{value:c.apiKey,onChange:e=>v({apiKey:e}),placeholder:"sk-..."}),m?.signupUrl&&!c.apiKey&&!w&&(0,r.jsxs)("a",{href:m.signupUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs mt-1.5 hover:underline",style:{color:"var(--amber)"},children:[(0,r.jsx)(N.A,{size:10}),S?"zh"===i?`下载 ${m.nameZh}`:`Download ${m.name}`:"zh"===i?`获取 ${m.nameZh} API Key`:`Get ${m.name} API Key`]})]}),(m?.supportsBaseUrl||c.baseUrl)&&(0,r.jsx)(T.D0,{label:"Base URL",children:(0,r.jsx)(T.pd,{value:c.baseUrl,onChange:e=>v({baseUrl:e.target.value}),placeholder:m?.fixedBaseUrl||(0,E.Ot)(c.protocol)||"https://api.openai.com/v1"})}),(0,r.jsx)(T.D0,{label:"zh"===i?"模型":"Model",children:(0,r.jsx)(I.A,{value:c.model,onChange:e=>v({model:e}),placeholder:m?.defaultModel??"",provider:c.protocol,apiKey:c.apiKey,envKey:!!w,baseUrl:c.baseUrl,supportsListModels:!!c.baseUrl?.trim()||!!m?.supportsListModels,allowNoKey:!!c.baseUrl?.trim(),browseLabel:o.settings.ai.listModels,noModelsLabel:o.settings.ai.noModelsFound})}),(0,r.jsx)(K,{provider:c.protocol,result:u[c.id]??{state:"idle"},hasKey:!!c.apiKey,hasEnv:!!w,hasConfig:!!(c.apiKey||c.model||c.baseUrl),onTest:f,onReset:C,onDelete:A,t:o})]})]}),(0,r.jsx)(G,{data:e,setData:t,t:o}),(0,r.jsx)(V,{data:e,setData:t,t:o}),(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(k.A,{size:15}),title:o.settings.agent.title,description:o.settings.agent.subtitle??"Configure how the AI agent operates",children:[(0,r.jsx)(T.pM,{label:o.settings.agent.maxSteps,hint:o.settings.agent.maxStepsHint,children:(0,r.jsx)(L,{value:e.agent?.maxSteps??20,onChange:e=>l({maxSteps:e})})}),(0,r.jsx)(T.pM,{label:o.settings.agent.contextStrategy,hint:o.settings.agent.contextStrategyHint,children:(0,r.jsxs)(T.l6,{value:e.agent?.contextStrategy??"auto",onChange:e=>l({contextStrategy:e.target.value}),className:"w-24",children:[(0,r.jsx)("option",{value:"auto",children:o.settings.agent.contextStrategyAuto}),(0,r.jsx)("option",{value:"off",children:o.settings.agent.contextStrategyOff})]})}),(0,r.jsx)(T.pM,{label:o.settings.agent.reconnectRetries,hint:o.settings.agent.reconnectRetriesHint,children:(0,r.jsxs)(T.l6,{value:String(e.agent?.reconnectRetries??3),onChange:e=>{let t=Number(e.target.value);l({reconnectRetries:t});try{localStorage.setItem("mindos-reconnect-retries",String(t))}catch(e){console.warn("[AiTab] localStorage setItem reconnectRetries failed:",e)}},className:"w-20",children:[(0,r.jsx)("option",{value:"0",children:"Off"}),(0,r.jsx)("option",{value:"1",children:"1"}),(0,r.jsx)("option",{value:"2",children:"2"}),(0,r.jsx)("option",{value:"3",children:"3"}),(0,r.jsx)("option",{value:"5",children:"5"}),(0,r.jsx)("option",{value:"10",children:"10"})]})}),m?.supportsThinking&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.pM,{label:o.settings.agent.thinking,hint:o.settings.agent.thinkingHint,children:(0,r.jsx)(T.lM,{checked:e.agent?.enableThinking??!1,onChange:()=>l({enableThinking:!e.agent?.enableThinking})})}),e.agent?.enableThinking&&(0,r.jsx)(T.D0,{label:o.settings.agent.thinkingBudget,hint:o.settings.agent.thinkingBudgetHint,children:(0,r.jsx)(T.pd,{type:"number",value:String(e.agent?.thinkingBudget??5e3),onChange:e=>{let t=parseInt(e.target.value,10);isNaN(t)||l({thinkingBudget:Math.max(1e3,Math.min(5e4,t))})},min:1e3,max:5e4,step:1e3})})]})]}),(0,r.jsx)(Y,{})]})}function K({provider:e,result:t,hasKey:s,hasEnv:n,hasConfig:l,onTest:o,onReset:i,onDelete:d,t:c}){let[m,x]=(0,a.useState)(null),p=(0,a.useRef)(void 0),h=!!E.T_[e]?.apiKeyFallback;(0,a.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]);let b=e=>{m===e?("reset"===e?i?.():d?.(),x(null),p.current&&clearTimeout(p.current)):(x(e),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>x(null),3e3))},{locale:f}=(0,j.Y)();return(0,r.jsx)("div",{className:"space-y-2 pt-2",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)($,{result:t,disabled:!(s||n||h),onTest:o,t:c}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[i&&l&&(0,r.jsxs)("button",{type:"button",onClick:()=>b("reset"),onBlur:()=>{"reset"===m&&(x(null),p.current&&clearTimeout(p.current))},className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-lg transition-all duration-200 ${"reset"===m?"bg-destructive/10 text-destructive border border-destructive/25 font-medium":"text-muted-foreground/60 hover:text-muted-foreground hover:bg-muted/50"}`,children:[(0,r.jsx)(g.A,{size:12}),"reset"===m?"zh"===f?"确认重置?":"Confirm?":"zh"===f?"重置":"Reset"]}),d&&(0,r.jsxs)("button",{type:"button",onClick:()=>b("delete"),onBlur:()=>{"delete"===m&&(x(null),p.current&&clearTimeout(p.current))},className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-lg transition-all duration-200 ${"delete"===m?"bg-destructive/10 text-destructive border border-destructive/25 font-medium":"text-muted-foreground/60 hover:text-muted-foreground hover:bg-muted/50"}`,children:[(0,r.jsx)(u.A,{size:12}),"delete"===m?"zh"===f?"确认删除?":"Confirm?":"zh"===f?"删除":"Delete"]})]})]})})}function B({initial:e,onSave:t,onCancel:s,onDelete:n,t:l,existingNames:o}){let{locale:i}=(0,j.Y)(),d=function({initial:e,onSave:t,locale:s,existingNames:r}){let n=(0,a.useMemo)(()=>e?.name??M(e?.protocol??"openai",r,e?.name,s),[e?.name,e?.protocol,r,s]),[l,o]=(0,a.useState)(n),[i,d]=(0,a.useState)(e?.protocol??"openai"),[c,m]=(0,a.useState)(e?.apiKey??""),[u,x]=(0,a.useState)(e?.model??""),[p,g]=(0,a.useState)(e?.baseUrl??""),[h,b]=(0,a.useState)({state:"idle"}),[f,v]=(0,a.useState)(!!e?.name),j=(0,a.useMemo)(()=>M(i,r,e?.name,s),[i,r,e?.name,s]);(0,a.useEffect)(()=>{f||o(j)},[j,f]);let y=(0,a.useCallback)(e=>{v(!0),o(e)},[]),N=(0,a.useCallback)(e=>{d(e),b({state:"idle"})},[]),k=l.trim()||j,w=!!(k&&r?.some(t=>t!==e?.name&&t.toLowerCase()===k.toLowerCase())),S=!!(p.trim()&&u.trim()&&!w),C="zh"===s?"接口地址和模型为必填":"Base URL and model are required",A="zh"===s?"名称已存在,请使用其他名称":"Name already exists, please use a different name",z=(0,a.useCallback)(async()=>{if(w)return void b({state:"error",error:A});if(!p.trim()||!u.trim())return void b({state:"error",error:C});b({state:"testing"});try{let t=await fetch("/api/settings/test-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e?.id?{provider:e.id,apiKey:c,model:u,baseUrl:p}:{provider:i,apiKey:c,model:u,baseUrl:p,baseProviderId:i})}),s=await t.json();s.ok?b({state:"ok",latency:s.latency}):b({state:"error",error:s.error||"Test failed",code:s.code})}catch{b({state:"error",code:"network_error",error:"Network error"})}},[w,A,p,u,e?.id,c,i,C]),T=(0,a.useCallback)(()=>{w?b({state:"error",error:A}):p.trim()&&u.trim()?t({id:e?.id||(0,P.mV)(),name:k,protocol:i,apiKey:c,model:u.trim(),baseUrl:p.trim()}):b({state:"error",error:C})},[w,A,p,u,C,t,e?.id,k,i,c]);return{name:l,setName:y,protocol:i,setProtocol:N,apiKey:c,setApiKey:m,model:u,setModel:x,baseUrl:p,setBaseUrl:g,testResult:h,canSave:S,isDuplicateName:w,handleTest:z,handleSave:T}}({initial:e,onSave:t,locale:i,existingNames:o}),[c,m]=(0,a.useState)(!1),x=(0,a.useRef)(void 0);(0,a.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let p=e?.id?"zh"===i?"编辑 Provider":"Edit Provider":"zh"===i?"添加 Provider":"Add Provider",g=[];return d.name.trim()||g.push("zh"===i?"名称":"Name"),d.baseUrl.trim()||g.push("zh"===i?"接口地址":"Base URL"),d.model.trim()||g.push("zh"===i?"模型":"Model"),(0,r.jsxs)("div",{className:"mt-3 rounded-lg border border-border overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-border",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground",children:p}),(0,r.jsx)("button",{type:"button",onClick:s,className:"p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors","aria-label":"zh"===i?"关闭":"Close",children:(0,r.jsx)(b.A,{size:14})})]}),(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)(U,{form:d,t:l,locale:i,layout:"compact"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 pt-4",children:[(0,r.jsx)($,{result:d.testResult,disabled:!d.canSave,onTest:d.handleTest,t:l}),n&&e?.id&&(0,r.jsxs)("button",{type:"button",onClick:()=>{c?(n(),x.current&&clearTimeout(x.current)):(m(!0),x.current=setTimeout(()=>m(!1),3e3))},onBlur:()=>{m(!1),x.current&&clearTimeout(x.current)},className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-lg transition-all duration-200 ${c?"bg-destructive/10 text-destructive border border-destructive/25 font-medium":"text-muted-foreground/60 hover:text-muted-foreground hover:bg-muted/50"}`,children:[(0,r.jsx)(u.A,{size:12}),c?"zh"===i?"确认删除?":"Confirm?":"zh"===i?"删除":"Delete"]}),(0,r.jsxs)("div",{className:"flex-1",children:[d.isDuplicateName&&(0,r.jsx)("span",{className:"text-2xs text-destructive pl-2",children:"zh"===i?"名称已存在":"Name already exists"}),!d.isDuplicateName&&!d.canSave&&g.length>0&&(0,r.jsx)("span",{className:"text-2xs text-muted-foreground/60 pl-2",children:"zh"===i?`需要: ${g.join("、")}`:`Required: ${g.join(", ")}`})]}),(0,r.jsx)("button",{type:"button",onClick:s,className:"px-3 py-1.5 text-sm rounded-lg text-muted-foreground hover:text-foreground transition-colors",children:l.settings?.customProviders?.modal?.buttonCancel??"Cancel"}),(0,r.jsx)("button",{type:"button",onClick:d.handleSave,disabled:!d.canSave,className:"px-4 py-1.5 text-sm font-medium rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:bg-[var(--amber)]/90 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:"zh"===i?"保存":"Save"})]})]})]})}let _=[{label:"SiliconFlow",baseUrl:"https://api.siliconflow.cn/v1",model:"BAAI/bge-m3",badge:"free"},{label:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"text-embedding-3-small",badge:null},{label:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-embed",badge:null},{label:"Ollama",baseUrl:"http://localhost:11434/v1",model:"nomic-embed-text",badge:"local"}],H=[{id:"Xenova/bge-small-zh-v1.5",label:"BGE Small ZH (33MB)",desc:"Chinese + English"},{id:"Xenova/all-MiniLM-L6-v2",label:"MiniLM L6 (23MB)",desc:"English only"},{id:"Xenova/bge-small-en-v1.5",label:"BGE Small EN (33MB)",desc:"English only"}];function G({data:e,setData:t,t:s}){let{locale:n}=(0,j.Y)(),l=s.settings.embedding??{},o=e.embedding??{enabled:!1,provider:"local",baseUrl:"",apiKey:"",model:""},i=e.embeddingStatus??{enabled:!1,ready:!1,building:!1,docCount:0},d=o.provider||"local",[c,u]=(0,a.useState)(null),[x,h]=(0,a.useState)("idle"),[f,v]=(0,a.useState)(null);(0,a.useEffect)(()=>{o.enabled&&"local"===d&&(0,y.n)("/api/embedding").then(e=>u(e.downloaded)).catch(()=>u(!1))},[o.enabled,d]),(0,a.useEffect)(()=>{if("downloading"!==x)return;let e=setInterval(()=>{(0,y.n)("/api/embedding",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"status"})}).then(e=>{e.downloaded&&(u(!0),h("idle"),z.oR.success?.(l.modelReady??"Model downloaded")??(0,z.oR)(l.modelReady??"Model downloaded")),e.error&&(h("error"),v(e.error),z.oR.error?.(e.error)??(0,z.oR)(e.error))}).catch(()=>{})},3e3);return()=>clearInterval(e)},[x,l.modelReady]);let N=(0,a.useCallback)(()=>{h("starting"),v(null),(0,y.n)("/api/embedding",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"download",model:o.model||void 0})}).then(e=>{e.ok?h("downloading"):(h("error"),v(e.error??"Download request failed"))}).catch(e=>{h("error"),v(e instanceof Error?e.message:"Network error")})},[o.model]),k=(0,a.useCallback)(()=>{h("idle"),v(null)},[]);return(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(w.A,{size:15}),title:l.title??"Embedding Search",description:l.description??"Semantic search with vector embeddings.",children:[(0,r.jsx)(T.pM,{label:l.enable??"Enable embedding search",hint:l.enableHint,children:(0,r.jsx)(T.lM,{checked:o.enabled,onChange:()=>{t(e=>e?{...e,embedding:{...o,enabled:!o.enabled}}:e)}})}),o.enabled&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>t(e=>e?{...e,embedding:{...o,provider:"local",model:o.model||"Xenova/bge-small-zh-v1.5"}}:e),className:`flex-1 px-3 py-2 text-sm rounded-lg border transition-colors text-center ${"local"===d?"border-[var(--amber)] text-[var(--amber)] bg-[var(--amber)]/10":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[(0,r.jsxs)("span",{className:"font-medium",children:[l.providerLocal??"Local"," (",l.providerLocalFree??"Free",")"]}),(0,r.jsx)("span",{className:"block text-xs opacity-70 mt-0.5",children:l.providerLocalDesc??"Runs on your machine"})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>t(e=>e?{...e,embedding:{...o,provider:"api",model:o.model||"BAAI/bge-m3",baseUrl:o.baseUrl||"https://api.siliconflow.cn/v1"}}:e),className:`flex-1 px-3 py-2 text-sm rounded-lg border transition-colors text-center ${"api"===d?"border-[var(--amber)] text-[var(--amber)] bg-[var(--amber)]/10":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[(0,r.jsx)("span",{className:"font-medium",children:l.providerApi??"API"}),(0,r.jsx)("span",{className:"block text-xs opacity-70 mt-0.5",children:l.providerApiDesc??"OpenAI, DeepSeek, Ollama, etc."})]})]}),"local"===d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.D0,{label:l.model??"Model",hint:l.modelHint,children:(0,r.jsx)("div",{className:"space-y-1.5",children:H.map(e=>(0,r.jsxs)("label",{className:`flex items-center gap-3 px-3 py-2 rounded-lg border cursor-pointer transition-colors ${o.model===e.id?"border-[var(--amber)] bg-[var(--amber)]/5":"border-border hover:bg-muted"}`,children:[(0,r.jsx)("input",{type:"radio",name:"local-model",checked:o.model===e.id,onChange:()=>t(t=>t?{...t,embedding:{...o,model:e.id}}:t),className:"accent-[var(--amber)]"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground",children:e.label}),(0,r.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:e.desc})]})]},e.id))})}),!1===c&&"idle"===x&&(0,r.jsxs)("button",{type:"button",onClick:N,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-[var(--amber)] text-[var(--amber-foreground)] hover:opacity-90 transition-opacity",children:[(0,r.jsx)(m.A,{size:14}),l.downloadModel??"Install Runtime & Download Model"]}),"starting"===x&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,r.jsx)(p.A,{size:14,className:"animate-spin"}),(0,r.jsx)("span",{children:l.starting??"Starting download..."})]}),"downloading"===x&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,r.jsx)(p.A,{size:14,className:"animate-spin"}),(0,r.jsx)("span",{children:l.downloading??"Downloading model..."})]}),"error"===x&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,r.jsx)(b.A,{size:14}),(0,r.jsx)("span",{children:f??"Download failed"})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:l.downloadFailedHint??"If install or download keeps failing, try API mode or set HF_ENDPOINT=https://hf-mirror.com"}),(0,r.jsxs)("button",{type:"button",onClick:k,className:"flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-md border border-border text-foreground hover:bg-muted transition-colors",children:[(0,r.jsx)(g.A,{size:12}),l.retry??"Retry"]})]}),!0===c&&"idle"===x&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-success",children:[(0,r.jsx)(S.A,{size:12}),(0,r.jsx)("span",{children:l.modelReady??"Model ready"})]})]}),"api"===d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid grid-cols-2 gap-2",children:_.map(e=>{let s=o.baseUrl===e.baseUrl;return(0,r.jsxs)("button",{type:"button",onClick:()=>{t(t=>t?{...t,embedding:{...o,baseUrl:e.baseUrl,model:e.model}}:t)},className:`relative px-3 py-2 text-left text-sm rounded-lg border transition-colors ${s?"border-[var(--amber)] bg-[var(--amber)]/5":"border-border hover:bg-muted"}`,children:[(0,r.jsx)("span",{className:`font-medium ${s?"text-[var(--amber)]":"text-foreground"}`,children:e.label}),e.badge&&(0,r.jsx)("span",{className:`ml-1.5 inline-flex items-center px-1.5 py-0.5 text-2xs rounded-full font-medium ${"free"===e.badge?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-blue-500/10 text-blue-600 dark:text-blue-400"}`,children:"free"===e.badge?"zh"===n?"免费":"Free":"zh"===n?"本地":"Local"}),(0,r.jsx)("span",{className:"block text-2xs text-muted-foreground mt-0.5 truncate",children:e.model})]},e.label)})}),!o.baseUrl&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"zh"===n?"推荐使用硅基流动 (SiliconFlow),注册即可免费使用嵌入模型。":"SiliconFlow recommended — free embedding models with registration."}),(0,r.jsx)(T.D0,{label:l.baseUrl??"Base URL",hint:l.baseUrlHint,children:(0,r.jsx)(T.pd,{value:o.baseUrl,onChange:e=>t(t=>t?{...t,embedding:{...o,baseUrl:e.target.value}}:t),placeholder:"https://api.siliconflow.cn/v1"})}),(0,r.jsx)(T.D0,{label:l.apiKey??"API Key",hint:o.baseUrl?.includes("localhost")||o.baseUrl?.includes("127.0.0.1")?l.apiKeyHintLocal??("zh"===n?"本地服务可留空":"Leave empty for local services"):l.apiKeyHint??("zh"===n?"在服务商网站获取 API Key":"Get your API key from the provider"),children:(0,r.jsx)(T.yA,{value:o.apiKey,onChange:e=>t(t=>t?{...t,embedding:{...o,apiKey:e}}:t),placeholder:"sk-..."})}),(0,r.jsx)(T.D0,{label:l.model??"Model",hint:l.modelName,children:(0,r.jsx)(T.pd,{value:o.model,onChange:e=>t(t=>t?{...t,embedding:{...o,model:e.target.value}}:t),placeholder:"BAAI/bge-m3"})})]}),(0,r.jsx)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground pt-1",children:i.building?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.A,{size:12,className:"animate-spin"}),(0,r.jsx)("span",{children:l.indexBuilding??"Building embedding index..."})]}):i.ready?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.A,{size:12,className:"text-success"}),(0,r.jsx)("span",{children:"function"==typeof l.indexReady?l.indexReady(i.docCount):`${i.docCount} documents indexed`})]}):(0,r.jsx)("span",{children:l.indexPending??"Index will be built on first search"})})]})]})}let J=[{id:"auto",labelKey:"providerAuto",descKey:"providerAutoDesc"},{id:"exa",labelKey:"providerExa",descKey:"providerExaDesc"},{id:"perplexity",labelKey:"providerPerplexity",descKey:"providerPerplexityDesc"},{id:"gemini",labelKey:"providerGemini",descKey:"providerGeminiDesc"}],W=[{key:"exaApiKey",labelKey:"exaApiKey",placeholder:"exa-..."},{key:"perplexityApiKey",labelKey:"perplexityApiKey",placeholder:"pplx-..."},{key:"geminiApiKey",labelKey:"geminiApiKey",placeholder:"AIza..."}];function V({data:e,setData:t,t:s}){let a=s.settings.webSearch??{},n=e.webSearch??{provider:"auto",exaApiKey:"",perplexityApiKey:"",geminiApiKey:""},l=n.provider||"auto";return(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(C.A,{size:15}),title:a.title??"Web Search",description:a.description??"Configure search providers.",children:[(0,r.jsx)("div",{className:"flex gap-2 flex-wrap",children:J.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>{t(t=>t?{...t,webSearch:{...n,provider:e.id}}:t)},className:`px-2.5 py-1 text-xs rounded-md border transition-colors ${l===e.id?"border-[var(--amber)] text-[var(--amber)] bg-[var(--amber)]/10":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:a[e.labelKey]??e.id},e.id))}),(()=>{let e=J.find(e=>e.id===l);if(!e)return null;let t=a[e.descKey];return t?(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:t}):null})(),W.map(e=>(0,r.jsx)(T.D0,{label:a[e.labelKey]??e.key,hint:a.apiKeyHint,children:(0,r.jsx)(T.yA,{value:n[e.key]??"",onChange:s=>t(t=>t?{...t,webSearch:{...n,[e.key]:s}}:t),placeholder:e.placeholder})},e.key)),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:a.noKeysHint??"Works without API keys via Exa MCP (zero-config)."})]})}function Y(){let{t:e}=(0,j.Y)(),[t,s]=(0,a.useState)("panel");return(0,a.useEffect)(()=>{try{let e=localStorage.getItem("ask-mode");"popup"===e&&s("popup")}catch(e){console.warn("[AiTab] localStorage getItem ask-mode failed:",e)}},[]),(0,r.jsx)(T.L7,{icon:(0,r.jsx)(A.A,{size:15}),title:e.settings.askDisplayMode?.label??"Display Mode",description:e.settings.askDisplayMode?.hint??"Side panel stays docked on the right. Popup opens a floating dialog.",children:(0,r.jsxs)(T.l6,{value:t,onChange:e=>(e=>{s(e);try{localStorage.setItem("ask-mode",e)}catch(e){console.warn("[AiTab] localStorage setItem ask-mode failed:",e)}window.dispatchEvent(new StorageEvent("storage",{key:"ask-mode",newValue:e}))})(e.target.value),children:[(0,r.jsx)("option",{value:"panel",children:e.settings.askDisplayMode?.panel??"Side Panel"}),(0,r.jsx)("option",{value:"popup",children:e.settings.askDisplayMode?.popup??"Popup"})]})})}var q=s(38125),Z=s(25208),X=s(88283),Q=s(47533),ee=s(95156),et=s(21036),es=s(72615),er=s(98327);let ea=[{value:"lora",label:"Lora",category:"Serif",style:{fontFamily:"Lora, Georgia, serif"}},{value:"ibm-plex-sans",label:"IBM Plex Sans",category:"Sans",style:{fontFamily:"'IBM Plex Sans', sans-serif"}},{value:"inter",label:"Inter",category:"Sans",style:{fontFamily:"var(--font-inter), sans-serif"}},{value:"ibm-plex-mono",label:"IBM Plex Mono",category:"Mono",style:{fontFamily:"'IBM Plex Mono', monospace"}}];function en({icon:e,label:t,children:s}){return(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e}),(0,r.jsx)("span",{className:"text-sm font-medium text-foreground",children:t})]}),s]})}function el({options:e,value:t,onChange:s}){return(0,r.jsx)("div",{className:"flex gap-2",children:e.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>s(e.value),className:`flex items-center gap-1.5 px-3.5 py-2 text-sm font-medium rounded-xl transition-all ${t===e.value?"bg-[var(--amber)] text-[var(--amber-foreground)] shadow-sm":"bg-muted/50 text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[e.icon,e.label]},e.value))})}function eo({font:e,setFont:t,fontSize:s,setFontSize:n,contentWidth:l,setContentWidth:o,dark:i,setDark:c,locale:m,setLocale:u,t:x}){let[p,g]=(0,a.useState)(!1),[h,b]=(0,a.useState)(()=>localStorage.getItem("theme")??"system"),[f,v]=(0,a.useState)(()=>localStorage.getItem("locale")??"system"),j=x.settings.appearance;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(d.A,{size:15}),title:j.preferencesTitle??"Preferences",children:[(0,r.jsx)(en,{icon:(0,r.jsx)(q.A,{size:14}),label:j.colorTheme,children:(0,r.jsx)(el,{options:[{value:"system",label:j.system,icon:(0,r.jsx)(A.A,{size:14})},{value:"dark",label:j.dark,icon:(0,r.jsx)(Z.A,{size:14})},{value:"light",label:j.light,icon:(0,r.jsx)(q.A,{size:14})}],value:h,onChange:e=>{b(e),localStorage.setItem("theme",e);let t="system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches:"dark"===e;c(t),document.documentElement.classList.toggle("dark",t)}})}),(0,r.jsx)(en,{icon:(0,r.jsx)(C.A,{size:14}),label:j.language,children:(0,r.jsx)(el,{options:[{value:"system",label:j.system,icon:(0,r.jsx)(A.A,{size:14})},{value:"en",label:"EN"},{value:"zh",label:"中文"}],value:f,onChange:e=>{v(e),localStorage.setItem("locale",e);let t="system"===e?navigator.language.startsWith("zh")?"zh":"en":e;u(t),document.cookie=`locale=${t};path=/;max-age=31536000;SameSite=Lax`}})})]}),(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(X.A,{size:15}),title:j.readingTitle??"Reading",description:j.readingDesc??"Customize how your notes look",children:[(0,r.jsx)(en,{icon:(0,r.jsx)(Q.A,{size:14}),label:j.readingFont,children:(0,r.jsx)("div",{className:"space-y-0.5",children:ea.map(s=>{let a=e===s.value;return(0,r.jsxs)("button",{type:"button",onClick:()=>t(s.value),className:`flex items-center gap-4 w-full px-3 py-2.5 rounded-lg transition-all text-left relative ${a?"bg-[var(--amber-subtle)]":"hover:bg-muted/50"}`,children:[a&&(0,r.jsx)("div",{className:"absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full bg-[var(--amber)]"}),(0,r.jsx)("span",{className:`text-xl font-medium w-10 text-center shrink-0 ${a?"text-foreground":"text-muted-foreground/60"}`,style:{fontFamily:s.style.fontFamily},children:"Aa"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,r.jsx)("span",{className:`text-sm font-medium ${a?"text-foreground":"text-muted-foreground"}`,style:{fontFamily:s.style.fontFamily},children:s.label}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground/50",children:s.category})]}),(0,r.jsx)("p",{className:`text-sm truncate mt-0.5 ${a?"text-muted-foreground":"text-muted-foreground/40"}`,style:{fontFamily:s.style.fontFamily},children:j.fontPreview})]})]},s.value)})})}),(0,r.jsx)(en,{icon:(0,r.jsx)(ee.A,{size:14}),label:j.fontSize,children:(0,r.jsxs)("div",{className:"px-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground/60 shrink-0",style:{fontSize:"11px"},children:"A"}),(0,r.jsx)("input",{type:"range",min:12,max:22,step:1,value:parseInt(s),onChange:e=>n(`${e.target.value}px`),className:"flex-1 h-1.5 rounded-full appearance-none bg-muted cursor-pointer accent-[var(--amber)] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-[var(--amber)] [&::-webkit-slider-thumb]:shadow-sm [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:transition-transform [&::-webkit-slider-thumb]:hover:scale-110 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-[var(--amber)] [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:shadow-sm [&::-moz-range-thumb]:cursor-pointer"}),(0,r.jsx)("span",{className:"text-base text-muted-foreground/60 shrink-0",children:"A"})]}),(0,r.jsx)("div",{className:"text-center mt-1.5",children:(0,r.jsxs)("span",{className:"text-xs tabular-nums text-muted-foreground",children:[parseInt(s),"px"]})}),(0,r.jsx)("p",{className:"text-muted-foreground leading-relaxed mt-2 px-1",style:{fontSize:s,fontFamily:ea.find(t=>t.value===e)?.style.fontFamily},children:j.fontSizePreview})]})}),(0,r.jsx)(en,{icon:(0,r.jsx)(et.A,{size:14}),label:j.contentWidth,children:(0,r.jsxs)("div",{className:"px-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:"▬"}),(0,r.jsx)("input",{type:"range",min:50,max:100,step:5,value:parseInt(l)||80,onChange:e=>o(`${e.target.value}%`),className:"flex-1 h-1.5 rounded-full appearance-none bg-muted cursor-pointer accent-[var(--amber)] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-[var(--amber)] [&::-webkit-slider-thumb]:shadow-sm [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:transition-transform [&::-webkit-slider-thumb]:hover:scale-110 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-[var(--amber)] [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:shadow-sm [&::-moz-range-thumb]:cursor-pointer"}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:"▬▬▬"})]}),(0,r.jsx)("div",{className:"text-center mt-1.5",children:(0,r.jsxs)("span",{className:"text-xs tabular-nums text-muted-foreground",children:[parseInt(l)||80,"%"]})})]})})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground/40 px-0.5",children:j.browserNote}),(0,r.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>g(!p),className:"flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[p?(0,r.jsx)(es.A,{size:14}):(0,r.jsx)(er.A,{size:14}),x.settings.tabs.shortcuts]}),p&&(0,r.jsx)("div",{className:"mt-3 space-y-0.5",children:x.shortcuts.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center justify-between py-1.5 px-1",children:[(0,r.jsx)("span",{className:"text-sm text-foreground",children:e.description}),(0,r.jsx)("div",{className:"flex items-center gap-1",children:e.keys.map((e,t)=>(0,r.jsx)("kbd",{className:"px-1.5 py-0.5 text-2xs font-mono bg-muted border border-border rounded text-muted-foreground",children:e},t))})]},t))})]})]})}var ei=s(10500),ed=s(42973),ec=s(24336),em=s(46884),eu=s(34137),ex=s(84734),ep=s(46990);function eg(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:e<0x40000000?`${(e/1048576).toFixed(1)} MB`:`${(e/0x40000000).toFixed(2)} GB`}var eh=s(10195),eb=s(65799);let ef=(0,eb.createServerReference)("0056381feff6cde56ce45a74c24b752cd8930b4c5a",eb.callServer,void 0,eb.findSourceMapURL,"scanExampleFilesAction"),ev=(0,eb.createServerReference)("00dec94ea8ea8af731d2263820b7f548f2091b8852",eb.callServer,void 0,eb.findSourceMapURL,"cleanupExamplesAction");var ej=s(5038);let ey={checking:!1,available:null,isSelf:!1,suggestion:null};function eN({message:e,sub:t}){return(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"text-center space-y-4 max-w-sm px-6",children:[(0,r.jsx)(p.A,{size:32,className:"animate-spin mx-auto text-[var(--amber)]"}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:e}),t&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:t})]})})}function ek({m:e}){let[t,s]=(0,a.useState)(0),[n,l]=(0,a.useState)(0),[o,i]=(0,a.useState)(ey),[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(null),[x,g]=(0,a.useState)(void 0),b=(0,a.useRef)(void 0),f=(0,a.useRef)(void 0);(0,a.useEffect)(()=>{(0,y.n)("/api/settings").then(e=>{let t=e.port||3456;s(t),l(t)}).catch(()=>{})},[]),(0,a.useEffect)(()=>()=>{clearInterval(b.current),clearTimeout(f.current)},[]);let v=n!==t,j=n<1024||n>65535,N=o.checking||!1===o.available&&!o.isSelf,k=(0,a.useCallback)(async e=>{if(e<1024||e>65535)return void i({...ey,available:!1,invalid:!0});i({...ey,checking:!0});try{let t=await (0,y.n)("/api/setup/check-port",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:e})});i({checking:!1,available:t.available,isSelf:t.isSelf??!1,suggestion:t.suggestion??null})}catch{i(ey)}},[]),w=async()=>{if(v&&!j&&!N&&!d){c(!0);try{let t=await (0,y.n)("/api/setup/check-port",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:n})});if(!t.available&&!t.isSelf){i({checking:!1,available:!1,isSelf:!1,suggestion:t.suggestion??null}),c(!1),z.oR.error(e.portInUse(n));return}await (0,y.n)("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:n})}),u(e.portWebRestarting),g(e.portRedirecting);try{await (0,y.n)("/api/restart",{method:"POST"})}catch{}let s=`${window.location.protocol}//${window.location.hostname}:${n}`,r=Date.now()+3e4;b.current=setInterval(async()=>{if(Date.now()>r){clearInterval(b.current),u(null),c(!1),z.oR.error(e.portRestartTimeout);return}try{(await fetch(`${s}/api/health`,{signal:AbortSignal.timeout(2e3)})).ok&&(clearInterval(b.current),window.location.href=s)}catch{}},1500)}catch{c(!1),z.oR.error(e.portUpdateFailed)}}};return 0===t?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.L7,{icon:(0,r.jsx)(A.A,{size:15}),title:e.webPortLabel,description:e.webPortHint,children:(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:1024,max:65535,value:n,onChange:e=>{let t=parseInt(e.target.value,10)||n;l(t),i(ey),clearTimeout(f.current),t>=1024&&t<=65535&&(f.current=setTimeout(()=>k(t),500))},onBlur:()=>{clearTimeout(f.current),n>=1024&&n<=65535&&k(n)},className:"flex-1 px-2.5 py-1.5 text-sm rounded-lg border border-border bg-muted/30 text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring tabular-nums"}),(0,r.jsx)("button",{type:"button",onClick:w,disabled:!v||j||N||d,className:"shrink-0 px-4 py-1.5 rounded-lg text-xs font-medium transition-colors bg-[var(--amber)] text-[var(--amber-foreground)] hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:d?e.portUpdating:e.portUpdateBtn})]}),o.checking&&(0,r.jsxs)("p",{className:"text-xs flex items-center gap-1 text-muted-foreground",children:[(0,r.jsx)(p.A,{size:11,className:"animate-spin"})," ",e.portChecking]}),!o.checking&&!1===o.available&&!o.invalid&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("p",{className:"text-xs flex items-center gap-1 text-[var(--amber)]",children:[(0,r.jsx)(ej.A,{size:11})," ",e.portInUse(n)]}),null!==o.suggestion&&(0,r.jsx)("button",{type:"button",onClick:()=>{l(o.suggestion),i(ey),setTimeout(()=>k(o.suggestion),0)},className:"text-xs px-2 py-0.5 rounded border border-[var(--amber)] text-[var(--amber)] transition-colors hover:bg-[var(--amber-subtle)]",children:e.portSuggest(o.suggestion)})]}),!o.checking&&o.invalid&&(0,r.jsxs)("p",{className:"text-xs flex items-center gap-1 text-destructive",children:[(0,r.jsx)(ej.A,{size:11})," 1024 – 65535"]}),!o.checking&&!0===o.available&&(0,r.jsxs)("p",{className:"text-xs flex items-center gap-1 text-success",children:[(0,r.jsx)(h.A,{size:11})," ",o.isSelf?e.portSelf:e.portAvailable]})]})}),m&&(0,r.jsx)(eN,{message:m,sub:x})]})}function ew({data:e,setData:t,t:s}){let l=e.envOverrides??{},o=s.settings.knowledge,i=s.settings.appearance,[d,m]=(0,a.useState)(()=>"1"===localStorage.getItem("mindos:labs-echo")),[x,h]=(0,a.useState)(()=>"1"===localStorage.getItem("mindos:labs-workflows")),[b,f]=(0,a.useState)(()=>"true"===localStorage.getItem("show-hidden-files")),[v,j]=(0,a.useState)(null),[N,k]=(0,a.useState)(!1),[w,C]=(0,a.useState)(null);(0,a.useEffect)(()=>{ef().then(e=>j(e.files.length)).catch(e=>{console.warn("[KnowledgeTab] scanExampleFilesAction failed:",e)})},[]);let[A,E]=(0,a.useState)(null),[R,I]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(0,y.n)("/api/setup").then(e=>{let t=e.guideState;t&&(E(t.active),I(!!t.dismissed))}).catch(e=>{console.error("Failed to fetch guide state:",e)})},[]);let P=(0,a.useCallback)(()=>{let e=!R;I(e);let t={dismissed:e};e||(t.active=!0),(0,y.n)("/api/setup",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({guideState:t})}).then(()=>window.dispatchEvent(new Event("guide-state-updated"))).catch(t=>{console.error("Failed to update guide state:",t),I(!e)})},[R]),M=(0,a.useCallback)(()=>{(0,y.n)("/api/setup",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({guideState:{active:!0,dismissed:!1,walkthroughStep:0,walkthroughDismissed:!1}})}).then(()=>{E(!0),I(!1),window.dispatchEvent(new Event("guide-state-updated"))}).catch(e=>console.error("Failed to restart walkthrough:",e))},[]),U=(0,a.useSyncExternalStore)(()=>()=>{},()=>`${window.location.protocol}//${window.location.hostname}`,()=>"http://localhost"),[D,$]=(0,a.useState)(!1),[F,L]=(0,a.useState)(null),[O,K]=(0,a.useState)(!1),[B,_]=(0,a.useState)(!1),H=!!e.authToken,G=F??e.authToken??"";async function J(){$(!0);try{let e=await (0,y.n)("/api/settings/reset-token",{method:"POST"});L(e.token),t(t=>t?{...t,authToken:e.token}:t)}finally{$(!1)}}async function W(){t(e=>e?{...e,authToken:""}:e),L(null)}return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(ei.A,{size:15}),title:o.cardTitle??"Knowledge Base",description:o.mindRootHint,children:[(0,r.jsx)(T.D0,{label:(0,r.jsxs)(r.Fragment,{children:[o.mindRoot," ",(0,r.jsx)(T.Bt,{overridden:l.MIND_ROOT})]}),hint:l.MIND_ROOT?o.envNote:o.mindRootHint,children:(0,r.jsx)(T.pd,{value:e.mindRoot,onChange:e=>t(t=>t?{...t,mindRoot:e.target.value}:t),placeholder:"/path/to/your/notes"})}),(0,r.jsx)(T.pM,{label:o.showHiddenFiles,hint:o.showHiddenFilesHint,children:(0,r.jsx)(T.lM,{checked:b,onChange:()=>{let e=!b;f(e),(0,eh.Fo)(e)}})}),null!==v&&v>0&&null===w&&(0,r.jsx)(T.pM,{label:o.cleanupExamples,hint:o.cleanupExamplesHint,children:(0,r.jsxs)("button",{onClick:()=>_(!0),disabled:N,title:N?s.hints.cleanupInProgress:void 0,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-lg border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors shrink-0 disabled:opacity-50",children:[N?(0,r.jsx)(p.A,{size:12,className:"animate-spin"}):(0,r.jsx)(u.A,{size:12}),o.cleanupExamplesButton,(0,r.jsx)("span",{className:"ml-1 tabular-nums text-2xs opacity-70",children:v})]})}),null!==w&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-success",children:[(0,r.jsx)(S.A,{size:14}),o.cleanupExamplesDone(w)]})]}),(0,r.jsx)(ek,{m:s.settings?.mcp??{}}),(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(ed.A,{size:15}),title:o.securityTitle??"Security",children:[(0,r.jsx)(T.D0,{label:o.webPassword,hint:o.webPasswordHint,children:(0,r.jsx)(T.yA,{value:e.webPassword??"",onChange:e=>t(t=>t?{...t,webPassword:e}:t),placeholder:o.passwordPlaceholder??"Leave empty to disable"})}),(0,r.jsx)(T.pM,{label:o.allowNetworkAccess??"Allow LAN access",hint:o.allowNetworkAccessHint??"Bind the Web UI to 0.0.0.0 so other devices on your network can connect after restart.",children:(0,r.jsx)(T.lM,{checked:!0===e.allowNetworkAccess,onChange:()=>t(e=>e?{...e,allowNetworkAccess:!0!==e.allowNetworkAccess}:e)})}),(0,r.jsx)(T.D0,{label:o.authToken,hint:H?o.authTokenHint:o.authTokenNone,children:(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 bg-background border border-border rounded-lg min-h-[38px]",children:[(0,r.jsx)("code",{className:"flex-1 text-xs font-mono text-foreground break-all select-all",children:G||(0,r.jsx)("span",{className:"text-muted-foreground italic",children:o.tokenNotSet??"— not set —"})}),G&&(0,r.jsx)("button",{type:"button",onClick:function(){let t=F??e.authToken??"";t&&(0,ep.l)(t).then(e=>{e&&z.oR.copy()})},className:"shrink-0 p-1 rounded text-muted-foreground hover:text-foreground transition-colors",title:o.authTokenCopy,children:(0,r.jsx)(ec.A,{size:13})})]}),e.mcpPort&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:[o.authTokenMcpPort,": ",(0,r.jsx)("code",{className:"font-mono",children:e.mcpPort}),G&&(0,r.jsxs)(r.Fragment,{children:[" \xa0\xb7\xa0 ",o.mcpUrl??"MCP URL",": ",(0,r.jsx)("code",{className:"font-mono select-all",children:`${U}:${e.mcpPort}/mcp`})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("button",{type:"button",onClick:function(){K(!0)},disabled:D,title:D?s.hints.tokenResetInProgress:void 0,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg border border-border text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[(0,r.jsx)(c.A,{size:14,className:D?"animate-spin":""}),o.authTokenReset]}),H&&(0,r.jsxs)("button",{type:"button",onClick:W,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/50 transition-colors",children:[(0,r.jsx)(u.A,{size:14}),o.authTokenClear]})]}),F&&(0,r.jsx)("p",{className:"text-xs text-[var(--amber-text)]",children:o.tokenGenerated})]})})]}),null!==A&&(0,r.jsxs)(T.L7,{icon:(0,r.jsx)(n.A,{size:15}),title:s.guide?.title??"Getting Started",children:[(0,r.jsx)(T.pM,{label:s.guide?.showGuide??"Show getting started guide",children:(0,r.jsx)(T.lM,{checked:!R,onChange:()=>P()})}),(0,r.jsxs)("button",{onClick:M,className:"flex items-center gap-1.5 mt-2 px-3 py-1.5 text-sm rounded-lg border border-border text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:[(0,r.jsx)(g.A,{size:14}),o.restartWalkthrough??"Restart walkthrough"]})]}),(0,r.jsx)(T.L7,{icon:(0,r.jsx)(em.A,{size:15}),title:i.labsTitle??"Labs",description:i.labsDesc??"Experimental features that are still in development.",children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)(eS,{label:i.labsEcho??"Echo",description:i.labsEchoDesc??"Reflective journaling powered by your notes.",checked:d,onChange:e=>{m(e),localStorage.setItem("mindos:labs-echo",e?"1":"0"),window.dispatchEvent(new Event("mindos:labs-changed"))}}),(0,r.jsx)(eS,{label:i.labsWorkflows??"Flows",description:i.labsWorkflowsDesc??"Visual workflow automation for agents.",checked:x,onChange:e=>{h(e),localStorage.setItem("mindos:labs-workflows",e?"1":"0"),window.dispatchEvent(new Event("mindos:labs-changed"))}})]})}),(0,r.jsx)(eC,{k:o}),(0,r.jsx)(ex.TM,{open:O,title:o.authTokenReset??"Regenerate Token",message:o.authTokenResetConfirm,confirmLabel:o.authTokenReset??"Regenerate",cancelLabel:o.cancel??"Cancel",onConfirm:()=>{K(!1),J()},onCancel:()=>K(!1)}),(0,r.jsx)(ex.TM,{open:B,title:o.cleanupExamples??"Cleanup Examples",message:null!==v?o.cleanupExamplesConfirm(v):"",confirmLabel:o.cleanupExamplesButton??"Clean up",cancelLabel:o.cancel??"Cancel",variant:"destructive",onConfirm:async()=>{_(!1),k(!0);let e=await ev();k(!1),e.success&&(C(e.deleted),j(0))},onCancel:()=>_(!1)})]})}function eS({label:e,description:t,checked:s,onChange:a}){return(0,r.jsxs)("label",{className:"flex items-center gap-3 cursor-pointer group",children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground block",children:e}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:t})]}),(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":s,onClick:()=>a(!s),className:`relative w-9 h-5 rounded-full transition-colors shrink-0 ${s?"bg-[var(--amber)]":"bg-muted-foreground/20"}`,children:(0,r.jsx)("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform ${s?"translate-x-4":"translate-x-0"}`})})]})}function eC({k:e}){let[t,s]=(0,a.useState)(!1),[n,l]=(0,a.useState)(null),[o,i]=(0,a.useState)(!1),d=(0,a.useCallback)(async()=>{i(!0);try{let e=await (0,y.n)("/api/monitoring",{timeout:5e3});l(e)}catch{}i(!1)},[]),c=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{if(!t){c.current=!1;return}c.current||(d(),c.current=!0);let e=setInterval(d,1e4);return()=>clearInterval(e)},[t,d]),(0,r.jsxs)("div",{className:"border-t border-border pt-5",children:[(0,r.jsxs)("button",{onClick:()=>s(e=>!e),className:"flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors w-full",children:[t?(0,r.jsx)(es.A,{size:14}):(0,r.jsx)(er.A,{size:14}),(0,r.jsx)(eu.A,{size:12}),e.monitoringTitle??"System Monitoring",o&&(0,r.jsx)(p.A,{size:10,className:"animate-spin ml-1"})]}),t&&n&&(0,r.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-x-6 gap-y-2 text-xs",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorHeap??"Heap"}),(0,r.jsxs)("span",{className:"ml-2 tabular-nums",children:[eg(n.system.memory.heapUsed)," / ",eg(n.system.memory.heapTotal)]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorRss??"RSS"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:eg(n.system.memory.rss)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorUptime??"Uptime"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:function(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let s=Math.floor(t/60);if(s<60)return`${s}m ${t%60}s`;let r=Math.floor(s/60);if(r<24)return`${r}h ${s%60}m`;let a=Math.floor(r/24);return`${a}d ${r%24}h`}(n.system.uptimeMs)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorNode??"Node"}),(0,r.jsx)("span",{className:"ml-2",children:n.system.nodeVersion})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorRequests??"Requests"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:n.application.agentRequests})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorToolCalls??"Tool Calls"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:n.application.toolExecutions})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorTokens??"Tokens"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:(n.application.totalTokens.input+n.application.totalTokens.output).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorFiles??"Files"}),(0,r.jsxs)("span",{className:"ml-2 tabular-nums",children:[n.knowledgeBase.fileCount," (",eg(n.knowledgeBase.totalSizeBytes),")"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:"MCP"}),(0,r.jsx)("span",{className:"ml-2",children:n.mcp.running?e.monitorMcpRunning?.(n.mcp.port)??`Running :${n.mcp.port}`:e.monitorMcpStopped??"Stopped"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.monitorErrors??"Errors"}),(0,r.jsx)("span",{className:"ml-2 tabular-nums",children:n.application.errors})]})]}),t&&!n&&!o&&(0,r.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:e.monitoringFailed??"Failed to load monitoring data"})]})}var eA=s(75579),ez=s(19777),eT=s(98480),eE=s(9986),eR=s(55798),eI=s(20677),eP=s(73601),eM=s(27636),eU=s(2408);let eD=(0,s(93738).default)(()=>Promise.all([s.e(8225),s.e(206),s.e(2303)]).then(s.bind(s,32303)),{loadableGenerated:{webpack:()=>[32303]},ssr:!1});function e$({skill:e,expanded:t,onExpand:s,onToggle:a,onDelete:n,onEditStart:l,onEditSave:o,onEditCancel:i,editing:d,editContent:c,setEditContent:m,editError:g,saving:h,fullContent:b,loadingContent:f,loadErrors:v,m:j}){return(0,r.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>s(e.name),children:[t?(0,r.jsx)(es.A,{size:12}):(0,r.jsx)(er.A,{size:12}),(0,r.jsx)("span",{className:"text-xs font-medium flex-1",children:e.name}),(0,r.jsx)("span",{className:`text-2xs px-1.5 py-0.5 rounded ${"builtin"===e.source?"bg-muted text-muted-foreground":"bg-[var(--amber-subtle)] text-[var(--amber-text)]"}`,children:"builtin"===e.source?j?.skillBuiltin??"Built-in":j?.skillUser??"Custom"}),(0,r.jsx)(T.lM,{size:"sm",checked:e.enabled,onClick:t=>{t.stopPropagation(),a(e.name,!e.enabled)}})]}),t&&(0,r.jsxs)("div",{className:"px-3 py-2 border-t border-border text-xs space-y-2 bg-muted/20",children:[(0,r.jsx)("p",{className:"text-muted-foreground",children:e.description||"No description"}),(0,r.jsx)("p",{className:"text-muted-foreground font-mono text-2xs",children:e.path}),f===e.name?(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[(0,r.jsx)(p.A,{size:10,className:"animate-spin"}),(0,r.jsx)("span",{className:"text-2xs",children:"Loading..."})]}):b[e.name]?(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-2xs text-muted-foreground font-medium",children:j?.skillContent??"Content"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[e.editable&&d!==e.name&&(0,r.jsxs)("button",{onClick:()=>l(e.name),className:"flex items-center gap-1 text-2xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,r.jsx)(eU.A,{size:10}),j?.editSkill??"Edit"]}),e.editable&&(0,r.jsxs)("button",{onClick:()=>n(e.name),className:"flex items-center gap-1 text-2xs text-destructive hover:underline",children:[(0,r.jsx)(u.A,{size:10}),j?.deleteSkill??"Delete"]})]})]}),d===e.name?(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("textarea",{value:c,onChange:e=>m(e.target.value),rows:Math.min(20,(c.match(/\n/g)||[]).length+3),className:"w-full px-2.5 py-1.5 text-xs rounded-md border border-border bg-background text-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring resize-y font-mono"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("button",{onClick:()=>o(e.name),disabled:h,className:"flex items-center gap-1 px-2.5 py-1 text-xs rounded-md disabled:opacity-40 disabled:cursor-not-allowed transition-colors bg-[var(--amber)] text-[var(--amber-foreground)]",children:[h&&(0,r.jsx)(p.A,{size:10,className:"animate-spin"}),j?.saveSkill??"Save"]}),(0,r.jsx)("button",{onClick:i,className:"px-2.5 py-1 text-xs rounded-md border border-border text-muted-foreground hover:text-foreground transition-colors",children:j?.cancelSkill??"Cancel"})]}),g&&(0,r.jsxs)("p",{className:"text-2xs text-destructive flex items-center gap-1",children:[(0,r.jsx)(x.A,{size:10}),g]})]}):(0,r.jsx)("div",{className:"w-full rounded-md border border-border bg-background/50 max-h-[300px] overflow-y-auto px-2.5 py-1.5 text-xs [&_.prose]:max-w-none [&_.prose]:text-xs [&_h1]:text-sm [&_h2]:text-xs [&_h3]:text-xs [&_pre]:text-2xs [&_code]:text-2xs",children:(0,r.jsx)(eD,{content:function(e){if(!e.startsWith("---"))return e;let t=e.indexOf("\n---",3);return -1===t?e:e.slice(t+4).replace(/^\n+/,"")}(b[e.name])})})]}):v[e.name]?(0,r.jsxs)("p",{className:"text-2xs text-destructive flex items-center gap-1",children:[(0,r.jsx)(x.A,{size:10}),v[e.name]]}):null]})]})}let eF=e=>`---
2
2
  name: ${e}
3
3
  description: >
4
4
  Describe WHEN the agent should use this
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9216],{19216:(e,s,t)=>{t.r(s),t.d(s,{default:()=>h});var a=t(66839),r=t(44223),n=t(53454),i=t(72799),l=t(19378),o=t(5038),c=t(61017),d=t(44361),u=t(56261),m=t(58221),x=t(65799);let p=(0,x.createServerReference)("70be09a9f013847c12ad72ab50703b88ee5a6b2a06",x.callServer,void 0,x.findSourceMapURL,"createSpaceAction");var b=t(62800),f=t(25176);function h({t:e,dirPaths:s}){let t=(0,u.useRouter)(),[x,h]=(0,r.useState)(!1),[g,v]=(0,r.useState)(""),[N,j]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[k,S]=(0,r.useState)(!1),[C,A]=(0,r.useState)(""),[E,I]=(0,r.useState)(""),[L,z]=(0,r.useState)(null),[D,R]=(0,r.useState)(!0),K=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=()=>{h(!0),A(""),I(""),setTimeout(()=>K.current?.focus(),80)};return window.addEventListener("mindos:create-space",e),()=>window.removeEventListener("mindos:create-space",e)},[]),(0,r.useEffect)(()=>{x&&null===L&&(0,b.wD)().then(e=>{z(e),R(e)})},[x,L]);let M=(0,r.useCallback)(()=>{h(!1),v(""),j(""),y(""),A(""),I(""),z(null)},[]),P=(0,r.useCallback)(s=>s.includes("/")||s.includes("\\")?(I(e.home.spaceNameNoSlash??"Name cannot contain / or \\"),!1):(I(""),!0),[e]),T=(0,r.useMemo)(()=>{let e=g.trim();return e?(w?w+"/":"")+e+"/":""},[g,w]),$=(0,r.useCallback)(async()=>{if(!g.trim()||k||!P(g))return;S(!0),A("");let s=g.trim(),a=await p(s,N,w);if(a.success){let e=a.path??s;D&&L&&(0,b.Vz)(s,e,N),M(),t.refresh(),window.dispatchEvent(new Event("mindos:files-changed")),t.push(`/view/${(0,m.O0)(e+"/")}`)}else(a.error??"").includes("already exists")?A(e.home.spaceExists??"A space with this name already exists"):A(e.home.spaceCreateFailed??"Failed to create space");S(!1)},[g,N,w,k,M,t,e,P,D,L]),_=(0,r.useCallback)(e=>{"Escape"===e.key&&M(),"Enter"===e.key&&!e.shiftKey&&e.target instanceof HTMLInputElement&&(e.preventDefault(),$())},[M,$]);if(!x)return null;let F=e.home;return(0,n.createPortal)((0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onKeyDown:_,children:[(0,a.jsx)("div",{className:"absolute inset-0 overlay-backdrop",onClick:M}),(0,a.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":F.newSpace,className:"relative w-full max-w-md mx-4 rounded-2xl border border-border bg-card shadow-xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 pt-5 pb-3",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-foreground",children:F.newSpace}),(0,a.jsx)("button",{onClick:M,className:"p-1 rounded-md text-muted-foreground hover:bg-muted transition-colors",children:(0,a.jsx)(i.A,{size:14})})]}),(0,a.jsxs)("div",{className:"px-5 pb-5 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:F.spaceLocation??"Location"}),(0,a.jsx)(f.A,{dirPaths:s,value:w,onChange:y,rootLabel:F.rootLevel??"Root"})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:F.spaceName}),(0,a.jsx)("input",{ref:K,type:"text",value:g,onChange:e=>{v(e.target.value),A(""),P(e.target.value)},placeholder:"e.g. \uD83D\uDCDD Notes",maxLength:80,"aria-invalid":!!E,"aria-describedby":E?"space-name-hint":void 0,className:`w-full px-3 py-2 text-sm rounded-lg border bg-background outline-none transition-colors ${E?"border-error focus-visible:border-error":"border-border focus-visible:ring-1 focus-visible:ring-ring"}`}),E&&(0,a.jsx)("span",{id:"space-name-hint",className:"text-xs text-error",children:E})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-muted-foreground",children:[F.spaceDescription," ",(0,a.jsxs)("span",{className:"opacity-50",children:["(",F.optional??"optional",")"]})]}),(0,a.jsx)("input",{type:"text",value:N,onChange:e=>j(e.target.value),placeholder:F.spaceDescPlaceholder??"Describe the purpose of this space",maxLength:200,className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background text-foreground placeholder:text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring transition-colors"})]}),(0,a.jsxs)("div",{className:"flex items-start gap-2.5 px-1 py-1",children:[(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":D,disabled:!L,title:L?void 0:e.hints.configureAiKey,onClick:()=>R(e=>!e),className:`relative mt-0.5 inline-flex shrink-0 h-4 w-7 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 ${D?"bg-[var(--amber)]":"bg-muted"}`,children:(0,a.jsx)("span",{className:`pointer-events-none inline-block h-3 w-3 rounded-full bg-white shadow-sm transition-transform ${D?"translate-x-3":"translate-x-0"}`})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(l.A,{size:12,className:"text-[var(--amber)] shrink-0"}),(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:F.aiInit??"AI initialize content"})]}),!1===L&&(0,a.jsxs)("p",{className:"text-2xs text-muted-foreground mt-0.5 flex items-center gap-1",children:[(0,a.jsx)(o.A,{size:10,className:"text-[var(--amber)] shrink-0"}),F.aiInitNoKey??"Configure an API key in Settings → AI to enable"]}),L&&D&&(0,a.jsx)("p",{className:"text-2xs text-muted-foreground mt-0.5",children:F.aiInitHint??"AI will generate README and INSTRUCTION for this space"})]})]}),T&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground font-mono px-1",children:[(0,a.jsx)(c.A,{size:12,className:"shrink-0 text-[var(--amber)]"}),(0,a.jsx)("span",{className:"truncate",children:T})]}),C&&(0,a.jsx)("span",{role:"alert",className:"text-xs text-error px-1",children:C}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[(0,a.jsx)("button",{onClick:M,className:"px-4 py-2 rounded-lg text-sm font-medium text-muted-foreground transition-colors hover:bg-muted",children:F.cancelCreate}),(0,a.jsxs)("button",{onClick:$,disabled:!g.trim()||k||!!E,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg text-sm font-medium bg-[var(--amber)] text-[var(--amber-foreground)] transition-colors hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed",children:[k&&(0,a.jsx)(d.A,{size:14,className:"animate-spin"}),F.createSpace]})]})]})]})]}),document.body)}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6728],{54347:(e,s,t)=>{t.r(s),t.d(s,{default:()=>h});var a=t(66839),r=t(44223),n=t(53454),i=t(72799),l=t(19378),o=t(5038),c=t(61017),d=t(44361),u=t(56261),m=t(58221),x=t(65799);let p=(0,x.createServerReference)("7067ff78f84eb6423ef61e9742fbe0b1fc0aa97a6a",x.callServer,void 0,x.findSourceMapURL,"createSpaceAction");var f=t(62800),b=t(25176);function h({t:e,dirPaths:s}){let t=(0,u.useRouter)(),[x,h]=(0,r.useState)(!1),[g,v]=(0,r.useState)(""),[N,j]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[k,S]=(0,r.useState)(!1),[C,A]=(0,r.useState)(""),[E,I]=(0,r.useState)(""),[L,z]=(0,r.useState)(null),[D,R]=(0,r.useState)(!0),K=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=()=>{h(!0),A(""),I(""),setTimeout(()=>K.current?.focus(),80)};return window.addEventListener("mindos:create-space",e),()=>window.removeEventListener("mindos:create-space",e)},[]),(0,r.useEffect)(()=>{x&&null===L&&(0,f.wD)().then(e=>{z(e),R(e)})},[x,L]);let M=(0,r.useCallback)(()=>{h(!1),v(""),j(""),y(""),A(""),I(""),z(null)},[]),P=(0,r.useCallback)(s=>s.includes("/")||s.includes("\\")?(I(e.home.spaceNameNoSlash??"Name cannot contain / or \\"),!1):(I(""),!0),[e]),T=(0,r.useMemo)(()=>{let e=g.trim();return e?(w?w+"/":"")+e+"/":""},[g,w]),$=(0,r.useCallback)(async()=>{if(!g.trim()||k||!P(g))return;S(!0),A("");let s=g.trim(),a=await p(s,N,w);if(a.success){let e=a.path??s;D&&L&&(0,f.Vz)(s,e,N),M(),t.refresh(),window.dispatchEvent(new Event("mindos:files-changed")),t.push(`/view/${(0,m.O0)(e+"/")}`)}else(a.error??"").includes("already exists")?A(e.home.spaceExists??"A space with this name already exists"):A(e.home.spaceCreateFailed??"Failed to create space");S(!1)},[g,N,w,k,M,t,e,P,D,L]),_=(0,r.useCallback)(e=>{"Escape"===e.key&&M(),"Enter"===e.key&&!e.shiftKey&&e.target instanceof HTMLInputElement&&(e.preventDefault(),$())},[M,$]);if(!x)return null;let F=e.home;return(0,n.createPortal)((0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onKeyDown:_,children:[(0,a.jsx)("div",{className:"absolute inset-0 overlay-backdrop",onClick:M}),(0,a.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":F.newSpace,className:"relative w-full max-w-md mx-4 rounded-2xl border border-border bg-card shadow-xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 pt-5 pb-3",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-foreground",children:F.newSpace}),(0,a.jsx)("button",{onClick:M,className:"p-1 rounded-md text-muted-foreground hover:bg-muted transition-colors",children:(0,a.jsx)(i.A,{size:14})})]}),(0,a.jsxs)("div",{className:"px-5 pb-5 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:F.spaceLocation??"Location"}),(0,a.jsx)(b.A,{dirPaths:s,value:w,onChange:y,rootLabel:F.rootLevel??"Root"})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:F.spaceName}),(0,a.jsx)("input",{ref:K,type:"text",value:g,onChange:e=>{v(e.target.value),A(""),P(e.target.value)},placeholder:"e.g. \uD83D\uDCDD Notes",maxLength:80,"aria-invalid":!!E,"aria-describedby":E?"space-name-hint":void 0,className:`w-full px-3 py-2 text-sm rounded-lg border bg-background outline-none transition-colors ${E?"border-error focus-visible:border-error":"border-border focus-visible:ring-1 focus-visible:ring-ring"}`}),E&&(0,a.jsx)("span",{id:"space-name-hint",className:"text-xs text-error",children:E})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-muted-foreground",children:[F.spaceDescription," ",(0,a.jsxs)("span",{className:"opacity-50",children:["(",F.optional??"optional",")"]})]}),(0,a.jsx)("input",{type:"text",value:N,onChange:e=>j(e.target.value),placeholder:F.spaceDescPlaceholder??"Describe the purpose of this space",maxLength:200,className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background text-foreground placeholder:text-muted-foreground outline-none focus-visible:ring-1 focus-visible:ring-ring transition-colors"})]}),(0,a.jsxs)("div",{className:"flex items-start gap-2.5 px-1 py-1",children:[(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":D,disabled:!L,title:L?void 0:e.hints.configureAiKey,onClick:()=>R(e=>!e),className:`relative mt-0.5 inline-flex shrink-0 h-4 w-7 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 ${D?"bg-[var(--amber)]":"bg-muted"}`,children:(0,a.jsx)("span",{className:`pointer-events-none inline-block h-3 w-3 rounded-full bg-white shadow-sm transition-transform ${D?"translate-x-3":"translate-x-0"}`})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(l.A,{size:12,className:"text-[var(--amber)] shrink-0"}),(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:F.aiInit??"AI initialize content"})]}),!1===L&&(0,a.jsxs)("p",{className:"text-2xs text-muted-foreground mt-0.5 flex items-center gap-1",children:[(0,a.jsx)(o.A,{size:10,className:"text-[var(--amber)] shrink-0"}),F.aiInitNoKey??"Configure an API key in Settings → AI to enable"]}),L&&D&&(0,a.jsx)("p",{className:"text-2xs text-muted-foreground mt-0.5",children:F.aiInitHint??"AI will generate README and INSTRUCTION for this space"})]})]}),T&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground font-mono px-1",children:[(0,a.jsx)(c.A,{size:12,className:"shrink-0 text-[var(--amber)]"}),(0,a.jsx)("span",{className:"truncate",children:T})]}),C&&(0,a.jsx)("span",{role:"alert",className:"text-xs text-error px-1",children:C}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[(0,a.jsx)("button",{onClick:M,className:"px-4 py-2 rounded-lg text-sm font-medium text-muted-foreground transition-colors hover:bg-muted",children:F.cancelCreate}),(0,a.jsxs)("button",{onClick:$,disabled:!g.trim()||k||!!E,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg text-sm font-medium bg-[var(--amber)] text-[var(--amber-foreground)] transition-colors hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed",children:[k&&(0,a.jsx)(d.A,{size:14,className:"animate-spin"}),F.createSpace]})]})]})]})]}),document.body)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6947],{10500:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},13591:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},21036:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("columns-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]])},25208:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]])},38125:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},42973:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]])},46884:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},47533:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]])},52285:(e,a,t)=>{t.r(a),t.d(a,{default:()=>h});var d=t(66839),l=t(60047);function h({open:e,onClose:a,initialTab:t}){return(0,d.jsx)("div",{style:{display:e?void 0:"none"},children:(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-end md:items-start justify-center md:pt-[10vh] modal-backdrop",onClick:e=>e.target===e.currentTarget&&a(),children:(0,d.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":"Settings",className:"w-full md:max-w-3xl md:mx-4 bg-card border-t md:border border-border rounded-t-2xl md:rounded-xl shadow-2xl flex flex-col h-[88vh] md:h-[80vh] md:max-h-[85vh]",children:(0,d.jsx)(l.default,{visible:e,variant:"modal",onClose:a,initialTab:t})})})})}},82296:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]])},95156:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("a-large-small",[["path",{d:"m15 16 2.536-7.328a1.02 1.02 1 0 1 1.928 0L22 16",key:"xik6mr"}],["path",{d:"M15.697 14h5.606",key:"1stdlc"}],["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}]])},95333:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]])},96733:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]])},97786:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},98480:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("shield",[["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"}]])}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6947],{10500:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},13591:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},21036:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("columns-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]])},25208:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]])},38125:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},42973:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]])},46884:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},47533:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]])},52285:(e,a,t)=>{t.r(a),t.d(a,{default:()=>h});var d=t(66839),l=t(22737);function h({open:e,onClose:a,initialTab:t}){return(0,d.jsx)("div",{style:{display:e?void 0:"none"},children:(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-end md:items-start justify-center md:pt-[10vh] modal-backdrop",onClick:e=>e.target===e.currentTarget&&a(),children:(0,d.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":"Settings",className:"w-full md:max-w-3xl md:mx-4 bg-card border-t md:border border-border rounded-t-2xl md:rounded-xl shadow-2xl flex flex-col h-[88vh] md:h-[80vh] md:max-h-[85vh]",children:(0,d.jsx)(l.default,{visible:e,variant:"modal",onClose:a,initialTab:t})})})})}},82296:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]])},95156:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("a-large-small",[["path",{d:"m15 16 2.536-7.328a1.02 1.02 1 0 1 1.928 0L22 16",key:"xik6mr"}],["path",{d:"M15.697 14h5.606",key:"1stdlc"}],["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}]])},95333:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]])},96733:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]])},97786:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},98480:(e,a,t)=>{t.d(a,{A:()=>d});let d=(0,t(73015).A)("shield",[["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"}]])}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9492],{14130:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(86393)}])},56904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},86393:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(66839),n=l(98281),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98281:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(66839),n=l(56904);function o({status:e,message:t}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:`${e}: ${t}`}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:e}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:t})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[5018,2330,7358],()=>e(e.s=14130)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9492],{55650:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(86393)}])},56904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},86393:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(66839),n=l(98281),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98281:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(66839),n=l(56904);function o({status:e,message:t}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:`${e}: ${t}`}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:e}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:t})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[5018,2330,7358],()=>e(e.s=55650)),_N_E=e.O()}]);