opencandle 0.4.0 → 0.6.0

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 (564) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +186 -117
  3. package/dist/analysts/contracts.d.ts +1 -3
  4. package/dist/analysts/contracts.js +1 -11
  5. package/dist/analysts/contracts.js.map +1 -1
  6. package/dist/analysts/orchestrator.d.ts +1 -3
  7. package/dist/analysts/orchestrator.js +1 -26
  8. package/dist/analysts/orchestrator.js.map +1 -1
  9. package/dist/cli.js +32 -8
  10. package/dist/cli.js.map +1 -1
  11. package/dist/config.d.ts +19 -3
  12. package/dist/config.js +69 -3
  13. package/dist/config.js.map +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/infra/browser.d.ts +1 -3
  18. package/dist/infra/browser.js +4 -2
  19. package/dist/infra/browser.js.map +1 -1
  20. package/dist/infra/cache.d.ts +8 -11
  21. package/dist/infra/cache.js +17 -15
  22. package/dist/infra/cache.js.map +1 -1
  23. package/dist/infra/http-client.d.ts +4 -1
  24. package/dist/infra/http-client.js +59 -6
  25. package/dist/infra/http-client.js.map +1 -1
  26. package/dist/infra/index.d.ts +3 -3
  27. package/dist/infra/index.js +3 -3
  28. package/dist/infra/index.js.map +1 -1
  29. package/dist/infra/native-dependencies.js +2 -2
  30. package/dist/infra/native-dependencies.js.map +1 -1
  31. package/dist/infra/node-version.js.map +1 -1
  32. package/dist/infra/opencandle-paths.d.ts +0 -3
  33. package/dist/infra/opencandle-paths.js +4 -11
  34. package/dist/infra/opencandle-paths.js.map +1 -1
  35. package/dist/infra/rate-limiter.d.ts +4 -0
  36. package/dist/infra/rate-limiter.js +17 -10
  37. package/dist/infra/rate-limiter.js.map +1 -1
  38. package/dist/market-state/alert-conditions.d.ts +34 -0
  39. package/dist/market-state/alert-conditions.js +23 -0
  40. package/dist/market-state/alert-conditions.js.map +1 -0
  41. package/dist/market-state/alert-runner.d.ts +55 -0
  42. package/dist/market-state/alert-runner.js +634 -0
  43. package/dist/market-state/alert-runner.js.map +1 -0
  44. package/dist/market-state/daily-report.d.ts +26 -0
  45. package/dist/market-state/daily-report.js +179 -0
  46. package/dist/market-state/daily-report.js.map +1 -0
  47. package/dist/market-state/local-automation-service.d.ts +25 -0
  48. package/dist/market-state/local-automation-service.js +119 -0
  49. package/dist/market-state/local-automation-service.js.map +1 -0
  50. package/dist/market-state/notification-delivery.d.ts +14 -0
  51. package/dist/market-state/notification-delivery.js +139 -0
  52. package/dist/market-state/notification-delivery.js.map +1 -0
  53. package/dist/market-state/resolve-for-mutation.d.ts +10 -0
  54. package/dist/market-state/resolve-for-mutation.js +15 -0
  55. package/dist/market-state/resolve-for-mutation.js.map +1 -0
  56. package/dist/market-state/resolve.d.ts +14 -0
  57. package/dist/market-state/resolve.js +89 -0
  58. package/dist/market-state/resolve.js.map +1 -0
  59. package/dist/market-state/service.d.ts +527 -0
  60. package/dist/market-state/service.js +1099 -0
  61. package/dist/market-state/service.js.map +1 -0
  62. package/dist/memory/index.d.ts +7 -7
  63. package/dist/memory/index.js +6 -6
  64. package/dist/memory/index.js.map +1 -1
  65. package/dist/memory/manager.d.ts +9 -0
  66. package/dist/memory/manager.js +39 -22
  67. package/dist/memory/manager.js.map +1 -1
  68. package/dist/memory/retrieval.js +7 -4
  69. package/dist/memory/retrieval.js.map +1 -1
  70. package/dist/memory/sqlite.js +385 -3
  71. package/dist/memory/sqlite.js.map +1 -1
  72. package/dist/memory/storage.d.ts +3 -2
  73. package/dist/memory/storage.js +1 -2
  74. package/dist/memory/storage.js.map +1 -1
  75. package/dist/memory/tool-defaults.js +64 -28
  76. package/dist/memory/tool-defaults.js.map +1 -1
  77. package/dist/memory/types.js +4 -0
  78. package/dist/memory/types.js.map +1 -1
  79. package/dist/monitor.d.ts +2 -0
  80. package/dist/monitor.js +104 -0
  81. package/dist/monitor.js.map +1 -0
  82. package/dist/onboarding/connect.js +4 -6
  83. package/dist/onboarding/connect.js.map +1 -1
  84. package/dist/onboarding/credential-interceptor.js +1 -1
  85. package/dist/onboarding/credential-interceptor.js.map +1 -1
  86. package/dist/onboarding/degradation-accumulator.js +1 -3
  87. package/dist/onboarding/degradation-accumulator.js.map +1 -1
  88. package/dist/onboarding/providers.js +3 -16
  89. package/dist/onboarding/providers.js.map +1 -1
  90. package/dist/onboarding/state.js.map +1 -1
  91. package/dist/onboarding/tool-helpers.js +1 -1
  92. package/dist/onboarding/tool-helpers.js.map +1 -1
  93. package/dist/onboarding/tool-tags.js +6 -4
  94. package/dist/onboarding/tool-tags.js.map +1 -1
  95. package/dist/onboarding/validation.js +1 -1
  96. package/dist/onboarding/validation.js.map +1 -1
  97. package/dist/pi/opencandle-extension.d.ts +8 -0
  98. package/dist/pi/opencandle-extension.js +637 -59
  99. package/dist/pi/opencandle-extension.js.map +1 -1
  100. package/dist/pi/session.d.ts +1 -1
  101. package/dist/pi/session.js +3 -1
  102. package/dist/pi/session.js.map +1 -1
  103. package/dist/pi/setup.js +17 -2
  104. package/dist/pi/setup.js.map +1 -1
  105. package/dist/pi/tool-adapter.js +5 -2
  106. package/dist/pi/tool-adapter.js.map +1 -1
  107. package/dist/prompts/context-builder.d.ts +18 -3
  108. package/dist/prompts/context-builder.js +117 -18
  109. package/dist/prompts/context-builder.js.map +1 -1
  110. package/dist/prompts/disclaimer.js +1 -1
  111. package/dist/prompts/disclaimer.js.map +1 -1
  112. package/dist/prompts/policy-cards.d.ts +13 -0
  113. package/dist/prompts/policy-cards.js +197 -0
  114. package/dist/prompts/policy-cards.js.map +1 -0
  115. package/dist/prompts/sections.d.ts +1 -1
  116. package/dist/prompts/sections.js +3 -3
  117. package/dist/prompts/sections.js.map +1 -1
  118. package/dist/prompts/symbol-preflight.d.ts +20 -0
  119. package/dist/prompts/symbol-preflight.js +49 -0
  120. package/dist/prompts/symbol-preflight.js.map +1 -0
  121. package/dist/prompts/workflow-prompts.d.ts +1 -1
  122. package/dist/prompts/workflow-prompts.js +209 -19
  123. package/dist/prompts/workflow-prompts.js.map +1 -1
  124. package/dist/providers/alpha-vantage.d.ts +1 -1
  125. package/dist/providers/alpha-vantage.js +49 -8
  126. package/dist/providers/alpha-vantage.js.map +1 -1
  127. package/dist/providers/coingecko.js +1 -1
  128. package/dist/providers/coingecko.js.map +1 -1
  129. package/dist/providers/errors.d.ts +5 -0
  130. package/dist/providers/errors.js +11 -0
  131. package/dist/providers/errors.js.map +1 -0
  132. package/dist/providers/exa-search.d.ts +2 -2
  133. package/dist/providers/exa-search.js +19 -11
  134. package/dist/providers/exa-search.js.map +1 -1
  135. package/dist/providers/fear-greed.js +1 -1
  136. package/dist/providers/fear-greed.js.map +1 -1
  137. package/dist/providers/finnhub.js +3 -5
  138. package/dist/providers/finnhub.js.map +1 -1
  139. package/dist/providers/fred.js +2 -2
  140. package/dist/providers/fred.js.map +1 -1
  141. package/dist/providers/index.d.ts +7 -6
  142. package/dist/providers/index.js +6 -5
  143. package/dist/providers/index.js.map +1 -1
  144. package/dist/providers/reddit.js +2 -2
  145. package/dist/providers/reddit.js.map +1 -1
  146. package/dist/providers/sec-edgar.d.ts +9 -1
  147. package/dist/providers/sec-edgar.js +181 -6
  148. package/dist/providers/sec-edgar.js.map +1 -1
  149. package/dist/providers/tradingview.d.ts +47 -0
  150. package/dist/providers/tradingview.js +275 -0
  151. package/dist/providers/tradingview.js.map +1 -0
  152. package/dist/providers/twitter.js +6 -8
  153. package/dist/providers/twitter.js.map +1 -1
  154. package/dist/providers/web-search.js +26 -12
  155. package/dist/providers/web-search.js.map +1 -1
  156. package/dist/providers/with-fallback.js +4 -2
  157. package/dist/providers/with-fallback.js.map +1 -1
  158. package/dist/providers/wrap-provider.d.ts +2 -3
  159. package/dist/providers/wrap-provider.js +14 -8
  160. package/dist/providers/wrap-provider.js.map +1 -1
  161. package/dist/providers/yahoo-finance.d.ts +3 -1
  162. package/dist/providers/yahoo-finance.js +226 -11
  163. package/dist/providers/yahoo-finance.js.map +1 -1
  164. package/dist/routing/classify-intent.d.ts +9 -0
  165. package/dist/routing/classify-intent.js +153 -3
  166. package/dist/routing/classify-intent.js.map +1 -1
  167. package/dist/routing/defaults.d.ts +1 -1
  168. package/dist/routing/defaults.js +3 -3
  169. package/dist/routing/defaults.js.map +1 -1
  170. package/dist/routing/entity-extractor.d.ts +2 -0
  171. package/dist/routing/entity-extractor.js +377 -26
  172. package/dist/routing/entity-extractor.js.map +1 -1
  173. package/dist/routing/fund-symbols.d.ts +2 -0
  174. package/dist/routing/fund-symbols.js +55 -0
  175. package/dist/routing/fund-symbols.js.map +1 -0
  176. package/dist/routing/horizon.d.ts +1 -0
  177. package/dist/routing/horizon.js +10 -0
  178. package/dist/routing/horizon.js.map +1 -0
  179. package/dist/routing/index.d.ts +12 -6
  180. package/dist/routing/index.js +8 -4
  181. package/dist/routing/index.js.map +1 -1
  182. package/dist/routing/legacy-rule-router.d.ts +9 -0
  183. package/dist/routing/legacy-rule-router.js +12 -0
  184. package/dist/routing/legacy-rule-router.js.map +1 -0
  185. package/dist/routing/planning.d.ts +54 -0
  186. package/dist/routing/planning.js +562 -0
  187. package/dist/routing/planning.js.map +1 -0
  188. package/dist/routing/route-manifest.d.ts +35 -0
  189. package/dist/routing/route-manifest.js +242 -0
  190. package/dist/routing/route-manifest.js.map +1 -0
  191. package/dist/routing/router-llm-client.js.map +1 -1
  192. package/dist/routing/router-prompt.js +46 -45
  193. package/dist/routing/router-prompt.js.map +1 -1
  194. package/dist/routing/router-types.d.ts +10 -0
  195. package/dist/routing/router.d.ts +1 -0
  196. package/dist/routing/router.js +572 -13
  197. package/dist/routing/router.js.map +1 -1
  198. package/dist/routing/slot-resolver.d.ts +1 -1
  199. package/dist/routing/slot-resolver.js +45 -7
  200. package/dist/routing/slot-resolver.js.map +1 -1
  201. package/dist/routing/symbol-disambiguator.d.ts +11 -0
  202. package/dist/routing/symbol-disambiguator.js +52 -0
  203. package/dist/routing/symbol-disambiguator.js.map +1 -0
  204. package/dist/routing/turn-context.d.ts +44 -0
  205. package/dist/routing/turn-context.js +45 -0
  206. package/dist/routing/turn-context.js.map +1 -0
  207. package/dist/routing/types.d.ts +15 -1
  208. package/dist/runtime/answer-contracts.d.ts +82 -0
  209. package/dist/runtime/answer-contracts.js +442 -0
  210. package/dist/runtime/answer-contracts.js.map +1 -0
  211. package/dist/runtime/artifact-contracts.d.ts +14 -0
  212. package/dist/runtime/artifact-contracts.js +57 -0
  213. package/dist/runtime/artifact-contracts.js.map +1 -0
  214. package/dist/runtime/planning-evidence.d.ts +99 -0
  215. package/dist/runtime/planning-evidence.js +466 -0
  216. package/dist/runtime/planning-evidence.js.map +1 -0
  217. package/dist/runtime/prompt-step.d.ts +1 -9
  218. package/dist/runtime/prompt-step.js +0 -10
  219. package/dist/runtime/prompt-step.js.map +1 -1
  220. package/dist/runtime/run-context.d.ts +5 -2
  221. package/dist/runtime/run-context.js +8 -1
  222. package/dist/runtime/run-context.js.map +1 -1
  223. package/dist/runtime/session-coordinator.d.ts +29 -3
  224. package/dist/runtime/session-coordinator.js +204 -31
  225. package/dist/runtime/session-coordinator.js.map +1 -1
  226. package/dist/runtime/session-title.d.ts +14 -0
  227. package/dist/runtime/session-title.js +50 -0
  228. package/dist/runtime/session-title.js.map +1 -0
  229. package/dist/runtime/tool-defaults-wrapper.js +1 -3
  230. package/dist/runtime/tool-defaults-wrapper.js.map +1 -1
  231. package/dist/runtime/validation.js.map +1 -1
  232. package/dist/runtime/workflow-events.js.map +1 -1
  233. package/dist/runtime/workflow-runner.d.ts +3 -3
  234. package/dist/runtime/workflow-runner.js +1 -1
  235. package/dist/runtime/workflow-runner.js.map +1 -1
  236. package/dist/sentiment/adapters/finnhub.d.ts +1 -1
  237. package/dist/sentiment/adapters/finnhub.js +6 -1
  238. package/dist/sentiment/adapters/finnhub.js.map +1 -1
  239. package/dist/sentiment/adapters/reddit.d.ts +2 -2
  240. package/dist/sentiment/adapters/twitter.d.ts +1 -1
  241. package/dist/sentiment/adapters/web.d.ts +1 -1
  242. package/dist/sentiment/index.d.ts +9 -11
  243. package/dist/sentiment/index.js +9 -20
  244. package/dist/sentiment/index.js.map +1 -1
  245. package/dist/sentiment/keywords.js +26 -4
  246. package/dist/sentiment/keywords.js.map +1 -1
  247. package/dist/sentiment/pipeline.d.ts +2 -2
  248. package/dist/sentiment/pipeline.js +1 -1
  249. package/dist/sentiment/pipeline.js.map +1 -1
  250. package/dist/sentiment/scorer.js +1 -1
  251. package/dist/sentiment/store.d.ts +1 -1
  252. package/dist/sentiment/store.js +1 -1
  253. package/dist/sentiment/store.js.map +1 -1
  254. package/dist/sentiment/trends.d.ts +1 -1
  255. package/dist/sentiment/trends.js.map +1 -1
  256. package/dist/sentiment/types.js.map +1 -1
  257. package/dist/system-prompt.js +7 -3
  258. package/dist/system-prompt.js.map +1 -1
  259. package/dist/tool-kit.d.ts +7 -7
  260. package/dist/tool-kit.js +4 -4
  261. package/dist/tool-kit.js.map +1 -1
  262. package/dist/tools/fundamentals/company-overview.js +12 -7
  263. package/dist/tools/fundamentals/company-overview.js.map +1 -1
  264. package/dist/tools/fundamentals/comps.js +19 -10
  265. package/dist/tools/fundamentals/comps.js.map +1 -1
  266. package/dist/tools/fundamentals/dcf.js +24 -12
  267. package/dist/tools/fundamentals/dcf.js.map +1 -1
  268. package/dist/tools/fundamentals/earnings.js +9 -4
  269. package/dist/tools/fundamentals/earnings.js.map +1 -1
  270. package/dist/tools/fundamentals/financials.js +9 -4
  271. package/dist/tools/fundamentals/financials.js.map +1 -1
  272. package/dist/tools/fundamentals/sec-filings.d.ts +1 -0
  273. package/dist/tools/fundamentals/sec-filings.js +36 -4
  274. package/dist/tools/fundamentals/sec-filings.js.map +1 -1
  275. package/dist/tools/index.d.ts +23 -18
  276. package/dist/tools/index.js +53 -38
  277. package/dist/tools/index.js.map +1 -1
  278. package/dist/tools/interaction/ask-user.js +15 -3
  279. package/dist/tools/interaction/ask-user.js.map +1 -1
  280. package/dist/tools/interaction/twitter-login.js +13 -3
  281. package/dist/tools/interaction/twitter-login.js.map +1 -1
  282. package/dist/tools/macro/fear-greed.js +1 -1
  283. package/dist/tools/macro/fear-greed.js.map +1 -1
  284. package/dist/tools/macro/fred-data.d.ts +1 -1
  285. package/dist/tools/macro/fred-data.js +44 -9
  286. package/dist/tools/macro/fred-data.js.map +1 -1
  287. package/dist/tools/market/crypto-history.js +21 -3
  288. package/dist/tools/market/crypto-history.js.map +1 -1
  289. package/dist/tools/market/crypto-price.js +4 -2
  290. package/dist/tools/market/crypto-price.js.map +1 -1
  291. package/dist/tools/market/screen-stocks.d.ts +18 -0
  292. package/dist/tools/market/screen-stocks.js +252 -0
  293. package/dist/tools/market/screen-stocks.js.map +1 -0
  294. package/dist/tools/market/search-ticker.js +161 -9
  295. package/dist/tools/market/search-ticker.js.map +1 -1
  296. package/dist/tools/market/stock-history.d.ts +2 -2
  297. package/dist/tools/market/stock-history.js +27 -8
  298. package/dist/tools/market/stock-history.js.map +1 -1
  299. package/dist/tools/market/stock-quote.js +6 -4
  300. package/dist/tools/market/stock-quote.js.map +1 -1
  301. package/dist/tools/options/greeks.js +1 -2
  302. package/dist/tools/options/greeks.js.map +1 -1
  303. package/dist/tools/options/option-chain.js +27 -9
  304. package/dist/tools/options/option-chain.js.map +1 -1
  305. package/dist/tools/portfolio/alerts.d.ts +15 -0
  306. package/dist/tools/portfolio/alerts.js +357 -0
  307. package/dist/tools/portfolio/alerts.js.map +1 -0
  308. package/dist/tools/portfolio/correlation.d.ts +1 -1
  309. package/dist/tools/portfolio/correlation.js +34 -14
  310. package/dist/tools/portfolio/correlation.js.map +1 -1
  311. package/dist/tools/portfolio/daily-report.d.ts +8 -0
  312. package/dist/tools/portfolio/daily-report.js +83 -0
  313. package/dist/tools/portfolio/daily-report.js.map +1 -0
  314. package/dist/tools/portfolio/holdings-overlap.d.ts +8 -0
  315. package/dist/tools/portfolio/holdings-overlap.js +112 -0
  316. package/dist/tools/portfolio/holdings-overlap.js.map +1 -0
  317. package/dist/tools/portfolio/notifications.d.ts +7 -0
  318. package/dist/tools/portfolio/notifications.js +43 -0
  319. package/dist/tools/portfolio/notifications.js.map +1 -0
  320. package/dist/tools/portfolio/predictions.d.ts +12 -6
  321. package/dist/tools/portfolio/predictions.js +338 -88
  322. package/dist/tools/portfolio/predictions.js.map +1 -1
  323. package/dist/tools/portfolio/risk-analysis.d.ts +1 -1
  324. package/dist/tools/portfolio/risk-analysis.js +46 -7
  325. package/dist/tools/portfolio/risk-analysis.js.map +1 -1
  326. package/dist/tools/portfolio/tracker.d.ts +4 -3
  327. package/dist/tools/portfolio/tracker.js +247 -102
  328. package/dist/tools/portfolio/tracker.js.map +1 -1
  329. package/dist/tools/portfolio/watchlist.d.ts +6 -4
  330. package/dist/tools/portfolio/watchlist.js +209 -101
  331. package/dist/tools/portfolio/watchlist.js.map +1 -1
  332. package/dist/tools/sentiment/reddit-sentiment.js +24 -11
  333. package/dist/tools/sentiment/reddit-sentiment.js.map +1 -1
  334. package/dist/tools/sentiment/sentiment-summary.js +71 -14
  335. package/dist/tools/sentiment/sentiment-summary.js.map +1 -1
  336. package/dist/tools/sentiment/sentiment-trend.d.ts +1 -1
  337. package/dist/tools/sentiment/sentiment-trend.js +12 -2
  338. package/dist/tools/sentiment/sentiment-trend.js.map +1 -1
  339. package/dist/tools/sentiment/twitter-sentiment.js +13 -6
  340. package/dist/tools/sentiment/twitter-sentiment.js.map +1 -1
  341. package/dist/tools/sentiment/untrusted-text.d.ts +2 -0
  342. package/dist/tools/sentiment/untrusted-text.js +17 -0
  343. package/dist/tools/sentiment/untrusted-text.js.map +1 -0
  344. package/dist/tools/sentiment/web-search.js +37 -12
  345. package/dist/tools/sentiment/web-search.js.map +1 -1
  346. package/dist/tools/sentiment/web-sentiment.js +16 -4
  347. package/dist/tools/sentiment/web-sentiment.js.map +1 -1
  348. package/dist/tools/technical/backtest.d.ts +3 -3
  349. package/dist/tools/technical/backtest.js +65 -44
  350. package/dist/tools/technical/backtest.js.map +1 -1
  351. package/dist/tools/technical/indicators.js +24 -8
  352. package/dist/tools/technical/indicators.js.map +1 -1
  353. package/dist/types/index.d.ts +3 -3
  354. package/dist/types/index.js.map +1 -1
  355. package/dist/types/market.d.ts +1 -0
  356. package/dist/types/options.d.ts +10 -0
  357. package/dist/types/portfolio.d.ts +41 -4
  358. package/dist/workflows/compare-assets.d.ts +0 -3
  359. package/dist/workflows/compare-assets.js +55 -10
  360. package/dist/workflows/compare-assets.js.map +1 -1
  361. package/dist/workflows/index.d.ts +3 -4
  362. package/dist/workflows/index.js +3 -3
  363. package/dist/workflows/index.js.map +1 -1
  364. package/dist/workflows/options-screener.d.ts +0 -3
  365. package/dist/workflows/options-screener.js +88 -14
  366. package/dist/workflows/options-screener.js.map +1 -1
  367. package/dist/workflows/portfolio-builder.d.ts +0 -3
  368. package/dist/workflows/portfolio-builder.js +7 -11
  369. package/dist/workflows/portfolio-builder.js.map +1 -1
  370. package/gui/server/ask-user-bridge.ts +82 -0
  371. package/gui/server/automation-heartbeat.ts +97 -0
  372. package/gui/server/background-quotes.ts +97 -1
  373. package/gui/server/chat-event-adapter.ts +32 -10
  374. package/gui/server/chat-run-session.ts +16 -0
  375. package/gui/server/gui-session-manager.ts +5 -0
  376. package/gui/server/invoke-tool.ts +144 -1
  377. package/gui/server/live-chat-event-adapter.ts +21 -6
  378. package/gui/server/market-state-api.ts +315 -0
  379. package/gui/server/model-setup.ts +149 -2
  380. package/gui/server/private-api-access.ts +62 -0
  381. package/gui/server/projector.ts +58 -11
  382. package/gui/server/prompt-observation.ts +58 -0
  383. package/gui/server/quote-snapshot-store.ts +50 -0
  384. package/gui/server/server.ts +236 -376
  385. package/gui/server/session-actions.ts +186 -1
  386. package/gui/server/session-entry-wait.ts +81 -0
  387. package/gui/server/shutdown.ts +47 -0
  388. package/gui/server/tool-invoke-ack.ts +49 -0
  389. package/gui/server/tool-metadata.ts +23 -10
  390. package/gui/server/websocket.ts +13 -3
  391. package/gui/server/writer-lock.ts +6 -2
  392. package/gui/server/ws-hub.ts +292 -0
  393. package/gui/shared/chat-events.ts +16 -1
  394. package/gui/shared/event-reducer.ts +24 -6
  395. package/gui/web/dist/assets/CatalogOverlay-eJ2cBk33.js +1 -0
  396. package/gui/web/dist/assets/index-2KZtKBmu.css +1 -0
  397. package/gui/web/dist/assets/index-CveNgtDg.js +69 -0
  398. package/gui/web/dist/index.html +2 -2
  399. package/package.json +22 -12
  400. package/src/analysts/contracts.ts +10 -23
  401. package/src/analysts/orchestrator.ts +8 -43
  402. package/src/cli.ts +37 -13
  403. package/src/config.ts +99 -7
  404. package/src/index.ts +1 -1
  405. package/src/infra/browser.ts +4 -2
  406. package/src/infra/cache.ts +41 -30
  407. package/src/infra/http-client.ts +72 -6
  408. package/src/infra/index.ts +7 -10
  409. package/src/infra/native-dependencies.ts +8 -3
  410. package/src/infra/node-version.ts +3 -1
  411. package/src/infra/opencandle-paths.ts +3 -14
  412. package/src/infra/rate-limiter.ts +32 -20
  413. package/src/market-state/alert-conditions.ts +82 -0
  414. package/src/market-state/alert-runner.ts +863 -0
  415. package/src/market-state/daily-report.ts +247 -0
  416. package/src/market-state/local-automation-service.ts +162 -0
  417. package/src/market-state/notification-delivery.ts +158 -0
  418. package/src/market-state/resolve-for-mutation.ts +24 -0
  419. package/src/market-state/resolve.ts +112 -0
  420. package/src/market-state/service.ts +2344 -0
  421. package/src/memory/index.ts +7 -7
  422. package/src/memory/manager.ts +57 -26
  423. package/src/memory/retrieval.ts +8 -7
  424. package/src/memory/sqlite.ts +407 -6
  425. package/src/memory/storage.ts +8 -17
  426. package/src/memory/tool-defaults.ts +60 -39
  427. package/src/memory/types.ts +7 -3
  428. package/src/monitor.ts +121 -0
  429. package/src/onboarding/connect.ts +10 -33
  430. package/src/onboarding/credential-interceptor.ts +3 -15
  431. package/src/onboarding/degradation-accumulator.ts +1 -3
  432. package/src/onboarding/providers.ts +9 -40
  433. package/src/onboarding/state.ts +4 -15
  434. package/src/onboarding/tool-helpers.ts +2 -9
  435. package/src/onboarding/tool-tags.ts +6 -6
  436. package/src/onboarding/validation.ts +14 -20
  437. package/src/pi/opencandle-extension.ts +795 -120
  438. package/src/pi/session.ts +7 -5
  439. package/src/pi/setup.ts +61 -33
  440. package/src/pi/tool-adapter.ts +5 -2
  441. package/src/prompts/context-builder.ts +143 -21
  442. package/src/prompts/disclaimer.ts +1 -1
  443. package/src/prompts/policy-cards.ts +220 -0
  444. package/src/prompts/sections.ts +4 -4
  445. package/src/prompts/symbol-preflight.ts +80 -0
  446. package/src/prompts/workflow-prompts.ts +231 -28
  447. package/src/providers/alpha-vantage.ts +82 -40
  448. package/src/providers/coingecko.ts +2 -5
  449. package/src/providers/errors.ts +9 -0
  450. package/src/providers/exa-search.ts +24 -22
  451. package/src/providers/fear-greed.ts +1 -1
  452. package/src/providers/finnhub.ts +7 -6
  453. package/src/providers/fred.ts +3 -3
  454. package/src/providers/index.ts +14 -6
  455. package/src/providers/reddit.ts +17 -6
  456. package/src/providers/sec-edgar.ts +235 -5
  457. package/src/providers/tradingview.ts +399 -0
  458. package/src/providers/twitter.ts +6 -8
  459. package/src/providers/web-search.ts +30 -20
  460. package/src/providers/with-fallback.ts +8 -7
  461. package/src/providers/wrap-provider.ts +15 -10
  462. package/src/providers/yahoo-finance.ts +292 -20
  463. package/src/routing/classify-intent.ts +186 -4
  464. package/src/routing/defaults.ts +4 -4
  465. package/src/routing/entity-extractor.ts +428 -28
  466. package/src/routing/fund-symbols.ts +58 -0
  467. package/src/routing/horizon.ts +7 -0
  468. package/src/routing/index.ts +60 -16
  469. package/src/routing/legacy-rule-router.ts +13 -0
  470. package/src/routing/planning.ts +823 -0
  471. package/src/routing/route-manifest.ts +309 -0
  472. package/src/routing/router-llm-client.ts +4 -4
  473. package/src/routing/router-prompt.ts +52 -52
  474. package/src/routing/router-types.ts +18 -0
  475. package/src/routing/router.ts +717 -20
  476. package/src/routing/slot-resolver.ts +75 -14
  477. package/src/routing/symbol-disambiguator.ts +72 -0
  478. package/src/routing/turn-context.ts +108 -0
  479. package/src/routing/types.ts +15 -1
  480. package/src/runtime/answer-contracts.ts +672 -0
  481. package/src/runtime/artifact-contracts.ts +77 -0
  482. package/src/runtime/planning-evidence.ts +682 -0
  483. package/src/runtime/prompt-step.ts +1 -16
  484. package/src/runtime/run-context.ts +12 -2
  485. package/src/runtime/session-coordinator.ts +297 -56
  486. package/src/runtime/session-title.ts +60 -0
  487. package/src/runtime/tool-defaults-wrapper.ts +1 -3
  488. package/src/runtime/validation.ts +1 -4
  489. package/src/runtime/workflow-events.ts +7 -7
  490. package/src/runtime/workflow-runner.ts +5 -11
  491. package/src/sentiment/adapters/finnhub.ts +7 -2
  492. package/src/sentiment/adapters/reddit.ts +2 -2
  493. package/src/sentiment/adapters/twitter.ts +1 -1
  494. package/src/sentiment/adapters/web.ts +1 -1
  495. package/src/sentiment/index.ts +16 -26
  496. package/src/sentiment/keywords.ts +26 -4
  497. package/src/sentiment/pipeline.ts +15 -4
  498. package/src/sentiment/scorer.ts +1 -1
  499. package/src/sentiment/store.ts +2 -2
  500. package/src/sentiment/trends.ts +9 -3
  501. package/src/sentiment/types.ts +5 -4
  502. package/src/system-prompt.ts +7 -3
  503. package/src/tool-kit.ts +10 -9
  504. package/src/tools/fundamentals/company-overview.ts +20 -10
  505. package/src/tools/fundamentals/comps.ts +69 -56
  506. package/src/tools/fundamentals/dcf.ts +146 -96
  507. package/src/tools/fundamentals/earnings.ts +17 -7
  508. package/src/tools/fundamentals/financials.ts +17 -8
  509. package/src/tools/fundamentals/sec-filings.ts +52 -8
  510. package/src/tools/index.ts +53 -38
  511. package/src/tools/interaction/ask-user.ts +22 -10
  512. package/src/tools/interaction/twitter-login.ts +17 -5
  513. package/src/tools/macro/fear-greed.ts +2 -2
  514. package/src/tools/macro/fred-data.ts +80 -42
  515. package/src/tools/market/crypto-history.ts +25 -4
  516. package/src/tools/market/crypto-price.ts +7 -7
  517. package/src/tools/market/screen-stocks.ts +279 -0
  518. package/src/tools/market/search-ticker.ts +219 -18
  519. package/src/tools/market/stock-history.ts +38 -13
  520. package/src/tools/market/stock-quote.ts +11 -8
  521. package/src/tools/options/greeks.ts +5 -6
  522. package/src/tools/options/option-chain.ts +47 -18
  523. package/src/tools/portfolio/alerts.ts +457 -0
  524. package/src/tools/portfolio/correlation.ts +48 -21
  525. package/src/tools/portfolio/daily-report.ts +101 -0
  526. package/src/tools/portfolio/holdings-overlap.ts +139 -0
  527. package/src/tools/portfolio/notifications.ts +45 -0
  528. package/src/tools/portfolio/predictions.ts +407 -107
  529. package/src/tools/portfolio/risk-analysis.ts +47 -8
  530. package/src/tools/portfolio/tracker.ts +271 -110
  531. package/src/tools/portfolio/watchlist.ts +251 -116
  532. package/src/tools/sentiment/reddit-sentiment.ts +51 -25
  533. package/src/tools/sentiment/sentiment-summary.ts +116 -35
  534. package/src/tools/sentiment/sentiment-trend.ts +24 -7
  535. package/src/tools/sentiment/twitter-sentiment.ts +23 -16
  536. package/src/tools/sentiment/untrusted-text.ts +21 -0
  537. package/src/tools/sentiment/web-search.ts +52 -16
  538. package/src/tools/sentiment/web-sentiment.ts +27 -11
  539. package/src/tools/technical/backtest.ts +78 -47
  540. package/src/tools/technical/indicators.ts +40 -17
  541. package/src/types/index.ts +8 -3
  542. package/src/types/market.ts +1 -0
  543. package/src/types/options.ts +17 -0
  544. package/src/types/portfolio.ts +46 -4
  545. package/src/types/sentiment.ts +2 -2
  546. package/src/workflows/compare-assets.ts +67 -19
  547. package/src/workflows/index.ts +3 -4
  548. package/src/workflows/options-screener.ts +98 -22
  549. package/src/workflows/portfolio-builder.ts +40 -29
  550. package/dist/runtime/index.d.ts +0 -16
  551. package/dist/runtime/index.js +0 -10
  552. package/dist/runtime/index.js.map +0 -1
  553. package/dist/runtime/provider-ids.d.ts +0 -14
  554. package/dist/runtime/provider-ids.js +0 -14
  555. package/dist/runtime/provider-ids.js.map +0 -1
  556. package/dist/workflows/types.d.ts +0 -4
  557. package/dist/workflows/types.js +0 -2
  558. package/dist/workflows/types.js.map +0 -1
  559. package/gui/web/dist/assets/CatalogOverlay-D1ImSJTe.js +0 -1
  560. package/gui/web/dist/assets/index-DBrWq43L.css +0 -1
  561. package/gui/web/dist/assets/index-RflHaj0y.js +0 -67
  562. package/src/runtime/index.ts +0 -55
  563. package/src/runtime/provider-ids.ts +0 -15
  564. package/src/workflows/types.ts +0 -4
@@ -1,12 +1,76 @@
1
- import type { OptionsScreenerSlots, SlotResolution } from "../routing/types.js";
2
1
  import { buildOptionsScreenerPrompt } from "../prompts/workflow-prompts.js";
3
- import type { WorkflowPlan } from "./types.js";
2
+ import type { OptionsScreenerSlots, SlotResolution } from "../routing/types.js";
4
3
  import type { WorkflowDefinition } from "../runtime/prompt-step.js";
5
4
  import { promptStep } from "../runtime/prompt-step.js";
6
5
 
7
- export function buildOptionsScreenerWorkflowDefinition(resolution: SlotResolution<OptionsScreenerSlots>): WorkflowDefinition {
6
+ export function buildOptionsScreenerWorkflowDefinition(
7
+ resolution: SlotResolution<OptionsScreenerSlots>,
8
+ ): WorkflowDefinition {
8
9
  const s = resolution.resolved;
9
- const contractType = s.direction === "bullish" ? "calls" : "puts";
10
+ const isProtectivePutContext = s.optionStrategy === "protective_put";
11
+ const contractType = s.direction === "bullish" && !isProtectivePutContext ? "calls" : "puts";
12
+ const horizonPhrase = describeDteTarget(s.dteTarget);
13
+ const isCoveredCallContext =
14
+ !isProtectivePutContext &&
15
+ (s.optionStrategy === "covered_call" ||
16
+ s.costBasis !== undefined ||
17
+ (s.catalystSymbols?.length ?? 0) > 0);
18
+ const rankingInstruction = isProtectivePutContext
19
+ ? "Rank by protection per dollar of premium, expiration fit, moneyness, hedge floor, live liquidity, and premium as a percent of the stock position."
20
+ : isCoveredCallContext
21
+ ? "Rank by premium collected, strike above cost basis, assignment risk, event risk, live liquidity, and probability of expiring out of the money."
22
+ : `Rank by ${s.objective}: balance premium cost, delta exposure, and probability of profit. Only include contracts with |delta| >= 0.20.`;
23
+ const maxPremiumInstruction =
24
+ s.maxPremium !== undefined
25
+ ? ` Do not rank contracts above the user's max premium of $${s.maxPremium.toLocaleString("en-US")} unless no contracts under that cap are liquid; if so, say the cap could not be met.`
26
+ : "";
27
+ const riskInstruction = isProtectivePutContext
28
+ ? "Include protective-put hedge risks: premium decay/cost, imperfect hedge before the strike, liquidity, and opportunity cost. Long protective puts do not have short-option assignment risk."
29
+ : isCoveredCallContext
30
+ ? "Include covered-call sale risks: assignment risk, upside is capped at the strike plus premium, share-price downside in the owned stock less premium received, IV/event risk, and exit liquidity. Do not say max loss = premium or describe max loss as the option premium paid."
31
+ : "Include risk caveats: max loss = premium, IV crush risk, time decay (theta).";
32
+ const coveredCallFallback = isCoveredCallContext
33
+ ? `
34
+ Covered-call fallback:
35
+ - Treat this as selling covered calls against an existing ${s.symbol} share position, not buying calls.
36
+ - Briefly state that you are treating ${s.symbol} as the held ticker because the user phrased it as an existing holding. If they meant memory exposure or a different ticker, tell them to clarify and do not silently switch to another underlying.
37
+ - If retrieved contracts have zero bid/ask, zero open interest, or otherwise unusable live quotes, do not stop at "cannot rank."
38
+ - This fallback overrides the normal ranking/table requirements and the delta >= 0.20 filter.
39
+ - Do NOT conclude with "I cannot provide a recommendation" in this fallback case.
40
+ - The final answer MUST include:
41
+ - "Best action:" no trade unless the user's broker shows a real bid.
42
+ - "Conditional candidate:" a conditional limit-order candidate using the user's cost basis and catalyst context.
43
+ - If you cannot compute an exact premium, say "premium: use live broker bid/ask" rather than omitting the candidate.
44
+ - Choose a conditional candidate strike above cost basis that the user would accept for assignment, prefer near-term expirations around the catalyst, and label it as conditional on live bid/ask and premium collected.
45
+ - For the top pick, include the effective assignment sale price (strike + premium collected) and compare it with the ${s.costBasis !== undefined ? `$${s.costBasis}` : "user's"} cost basis.
46
+ - Include return-if-assigned when cost basis is available: (strike - cost basis + premium received) / cost basis.
47
+ - Verify bid/ask and open interest in the user's broker before trading, even when OC shows live values.
48
+ - Mention the catalyst only as event/sympathy risk; do not switch the underlying away from ${s.symbol}.
49
+ - Do not describe max loss as the option premium paid; covered-call sale risk is assignment risk, upside is capped at strike plus premium, share-price downside in the owned stock less premium received, IV/event risk, and poor exit liquidity.
50
+ - If the tool reports closed_market_or_stale_quotes, do not treat zero bid/ask as confirmed live illiquidity; say the chain was checked outside regular options trading and recheck after regular options trading opens.
51
+ - Required fallback format:
52
+ Interpretation: Treating ${s.symbol} as the held ticker because you phrased it as an existing position. If you meant ${s.symbol} as memory exposure or another ticker, clarify before trading.
53
+ Best action: ...
54
+ Conditional candidate: ...
55
+ Why: ...
56
+ Risk: ...
57
+ `
58
+ : "";
59
+ const coveredCallNoDataGuidance = isCoveredCallContext
60
+ ? "- For covered-call requests in that no-data fallback, explain how to evaluate covered calls: compare 1-week vs 2-week theta/gamma tradeoffs, use delta as an assignment-risk proxy, avoid strikes where assignment would violate the user's cost basis unless premium offsets it, calculate static premium yield and return-if-assigned, and flag catalyst/IV-crush risk."
61
+ : "";
62
+ const protectivePutFallback = isProtectivePutContext
63
+ ? `
64
+ Protective-put requirements:
65
+ - Treat this as buying puts to hedge an existing long ${s.symbol} share position, not buying calls.
66
+ - The final answer MUST discuss hedge floor, premium as a percent of position value, expiration fit, moneyness, and liquidity.
67
+ - If share quantity is available, translate shares into approximate contract count using 1 put contract per 100 shares.
68
+ - If share quantity is available, state total premium for the required number of contracts.
69
+ - For cost-sensitive requests, explain the tradeoff between cheaper lower-strike puts and weaker protection.
70
+ - Mention lower-cost alternatives such as collars or put spreads when outright put premium is high.
71
+ - Do not frame assignment risk like a short option sale.
72
+ `
73
+ : "";
10
74
 
11
75
  return {
12
76
  workflowType: "options_screener",
@@ -15,35 +79,47 @@ export function buildOptionsScreenerWorkflowDefinition(resolution: SlotResolutio
15
79
  requiredInputs: ["symbol"],
16
80
  expectedOutputs: ["option_chain"],
17
81
  }),
18
- promptStep("rank_and_present", "Rank and present top contracts", `Now rank and present the top ${contractType} for ${s.symbol}. You MUST produce a final text response — never end this turn with only tool calls.
82
+ promptStep(
83
+ "rank_and_present",
84
+ "Rank and present top contracts",
85
+ `Now rank and present the top ${contractType} for ${s.symbol}. You MUST produce a final text response — never end this turn with only tool calls.
19
86
 
20
87
  1. From the option chain data already fetched, select the top 3-5 contracts matching: ${s.moneynessPreference} strikes, DTE near ${s.dteTarget}, with ${s.liquidityMinimum}.
21
- 2. Rank by ${s.objective}: balance premium cost, delta exposure, and probability of profit. Only include contracts with |delta| >= 0.20.
22
- 3. Present a table: strike, expiry, premium, delta, IV, open interest, bid-ask spread.
88
+ 2. ${rankingInstruction}${maxPremiumInstruction}
89
+ 3. Present a table: strike, expiry, premium, delta, gamma, theta, vega, rho, IV, open interest, bid-ask spread.
23
90
  4. Explain why the #1 pick is ranked highest.
24
- 5. State all assumptions used (which were defaults vs user-specified vs saved preferences).
25
- 6. Include risk caveats: max loss = premium, IV crush risk, time decay (theta).
91
+ 5. Reproduce the exact Assumptions block from the initial prompt; keep the provenance label text intact and do not shorten it to "Assumptions:".
92
+ 6. State the requested option horizon in plain language (${horizonPhrase}) in the bottom line or table intro; use the user's horizon wording or approximate DTE window without forcing a fixed sentence.
93
+ 7. ${riskInstruction}
26
94
 
27
95
  If some or all of the option chain fetches returned "⚠ Options chain unavailable" or similar gaps, do NOT abort. Instead:
28
96
  - Rank and present whatever contracts you did retrieve from the successful fetches, even if fewer than 3.
29
- - If no chain data is usable at all, still produce a text response: reproduce the Assumptions block, state which expirations failed, and commit to a next step (e.g. "retry nearest monthly expiration", "use price/technicals instead"). Never end the turn with only tool calls.
97
+ - If no chain data is usable at all, still produce a text response: reproduce the Assumptions block, state which expirations failed, and give actionable fallback guidance for the requested DTE instead of ranking nonexistent contracts. Do not promise to retry later. Never end the turn with only tool calls.
98
+ ${coveredCallNoDataGuidance}
99
+ ${coveredCallFallback}
100
+ ${protectivePutFallback}
30
101
 
31
102
  Length constraints:
32
103
  - Max 1 sentence explaining the #1 pick.
33
- - Risk caveats: max 3 bullet points.
34
- - Keep total response under 30 lines.`, {
35
- requiredInputs: ["option_chain"],
36
- expectedOutputs: ["ranked_contracts"],
37
- }),
104
+ - Risk section: max 3 bullets.
105
+ - Keep total response under 30 lines.`,
106
+ {
107
+ requiredInputs: ["option_chain"],
108
+ expectedOutputs: ["ranked_contracts"],
109
+ },
110
+ ),
38
111
  ],
39
112
  };
40
113
  }
41
114
 
42
- /** @deprecated Use buildOptionsScreenerWorkflowDefinition instead */
43
- export function buildOptionsScreenerWorkflow(resolution: SlotResolution<OptionsScreenerSlots>): WorkflowPlan {
44
- const def = buildOptionsScreenerWorkflowDefinition(resolution);
45
- return {
46
- initialPrompt: def.steps[0].prompt,
47
- followUps: def.steps.slice(1).map((s) => s.prompt),
48
- };
115
+ function describeDteTarget(dteTarget: string): string {
116
+ if (dteTarget === "25_to_45_days") return "25-45 day target, roughly one month";
117
+ if (dteTarget === "7_to_14_days") return "1-2 week horizon";
118
+ if (dteTarget === "0_to_7_days") return "event-week or 0-7 day horizon";
119
+ if (dteTarget === "180_plus_days") return "LEAPS or long-dated horizon";
120
+ const range = dteTarget.match(/^(\d+)_to_(\d+)_days$/);
121
+ if (range) return `${range[1]}-${range[2]} day horizon`;
122
+ const plus = dteTarget.match(/^(\d+)_plus_days$/);
123
+ if (plus) return `${plus[1]}+ day horizon`;
124
+ return `${dteTarget} horizon`;
49
125
  }
@@ -1,52 +1,63 @@
1
- import type { PortfolioSlots, SlotResolution } from "../routing/types.js";
2
1
  import { buildPortfolioPrompt } from "../prompts/workflow-prompts.js";
3
- import type { WorkflowPlan } from "./types.js";
2
+ import type { PortfolioSlots, SlotResolution } from "../routing/types.js";
4
3
  import type { WorkflowDefinition } from "../runtime/prompt-step.js";
5
4
  import { promptStep } from "../runtime/prompt-step.js";
6
5
 
7
- export function buildPortfolioWorkflowDefinition(resolution: SlotResolution<PortfolioSlots>): WorkflowDefinition {
6
+ export function buildPortfolioWorkflowDefinition(
7
+ resolution: SlotResolution<PortfolioSlots>,
8
+ ): WorkflowDefinition {
8
9
  const s = resolution.resolved;
9
10
 
10
11
  return {
11
12
  workflowType: "portfolio_builder",
12
13
  steps: [
13
- promptStep("fetch_candidates", "Fetch market data and select candidates", buildPortfolioPrompt(resolution), {
14
- requiredInputs: ["symbols"],
15
- expectedOutputs: ["candidate_positions"],
16
- }),
17
- promptStep("risk_review", "Review risk and diversification", `Now review the risk and diversification of this draft portfolio:
14
+ promptStep(
15
+ "fetch_candidates",
16
+ "Fetch market data and select candidates",
17
+ buildPortfolioPrompt(resolution),
18
+ {
19
+ requiredInputs: ["symbols"],
20
+ expectedOutputs: ["candidate_positions"],
21
+ },
22
+ ),
23
+ promptStep(
24
+ "risk_review",
25
+ "Review risk and diversification",
26
+ `Now review the risk and diversification of this draft portfolio:
18
27
  1. Use analyze_correlation across all ${s.positionCount} candidates to check for concentration risk.
19
28
  2. Use analyze_risk on each position for volatility and max drawdown.
20
29
  3. If correlation is too high (>0.7 between any pair), suggest a replacement to improve diversification.
21
- 4. Confirm the portfolio fits a ${s.riskProfile} risk profile with ${s.timeHorizon} horizon.`, {
22
- skippable: true,
23
- requiredInputs: ["candidate_positions"],
24
- expectedOutputs: ["risk_assessment"],
25
- }),
26
- promptStep("synthesize", "Present final portfolio draft", `Present the final portfolio draft as a structured summary:
30
+ 4. If any position's risk metrics undermine its intended role, lower its allocation, replace it with a role-equivalent candidate, or explicitly justify why it remains.
31
+ 5. Confirm the portfolio fits a ${s.riskProfile} risk profile with ${s.timeHorizon} horizon.`,
32
+ {
33
+ skippable: true,
34
+ requiredInputs: ["candidate_positions"],
35
+ expectedOutputs: ["risk_assessment"],
36
+ },
37
+ ),
38
+ promptStep(
39
+ "synthesize",
40
+ "Present final portfolio draft",
41
+ `Present the final portfolio draft as a structured summary:
27
42
  - State all assumptions at the top (which parameters were defaults vs user-specified vs saved preferences).
28
43
  - Commit to the allocation: concrete percentages per position, not ranges.
29
- - Present an allocation table: symbol, allocation %, dollar amount ($${s.budget.toLocaleString("en-US")} total), and one-line analyst rationale per position.
44
+ - Present an allocation table: symbol, allocation %, dollar amount ($${s.budget.toLocaleString("en-US")} total), current price used, estimated shares, role, and one-line analyst rationale per position.
45
+ - Add a brief "Why this fits the horizon" summary explaining the growth/stability tradeoff for the ${s.timeHorizon} horizon.
30
46
  - Include overall portfolio risk summary: estimated volatility, diversification quality, largest single risk. State an invalidation condition for the draft.
47
+ - Include implementation notes: rebalance cadence, low-cost/liquid implementation, and tax/account caveats where relevant.
31
48
  - Suggest what to change for more growth or more safety.
32
49
 
33
50
  Length constraints:
34
- - Max 1 sentence of rationale per position in the allocation table.
51
+ - Max 1 sentence of rationale per position in the allocation table; do not paste company descriptions or issuer background.
35
52
  - Risk summary: max 3 bullet points.
53
+ - Implementation notes: max 3 bullets.
36
54
  - Growth/safety suggestions: max 2 bullet points each.
37
- - Keep total response under 40 lines.`, {
38
- requiredInputs: ["risk_assessment"],
39
- expectedOutputs: ["portfolio_summary"],
40
- }),
55
+ - Keep total response under 40 lines.`,
56
+ {
57
+ requiredInputs: ["risk_assessment"],
58
+ expectedOutputs: ["portfolio_summary"],
59
+ },
60
+ ),
41
61
  ],
42
62
  };
43
63
  }
44
-
45
- /** @deprecated Use buildPortfolioWorkflowDefinition instead */
46
- export function buildPortfolioWorkflow(resolution: SlotResolution<PortfolioSlots>): WorkflowPlan {
47
- const def = buildPortfolioWorkflowDefinition(resolution);
48
- return {
49
- initialPrompt: def.steps[0].prompt,
50
- followUps: def.steps.slice(1).map((s) => s.prompt),
51
- };
52
- }
@@ -1,16 +0,0 @@
1
- export type { Provenance, ProvenanceSource, EvidenceRecord, ProviderResult, ProviderResultOk, ProviderResultUnavailable, } from "./evidence.js";
2
- export { isProviderOk, toEvidenceRecord } from "./evidence.js";
3
- export type { StepStatus, RunStatus, WorkflowStep, StepOutput, AnalystSignal, AnalystOutput, WorkflowRun, } from "./workflow-types.js";
4
- export { isValidStepTransition, transitionStepStatus, createWorkflowRun, } from "./workflow-types.js";
5
- export type { ValidationEntry, ValidationResult, ValidatorConfig, } from "./validation.js";
6
- export { emptyValidationResult, checkTimestamps, checkOptionsExpiries, checkRequiredFields, checkNumberMatch, RuntimeValidator, DEFAULT_MARKET_SENSITIVE_LABELS, } from "./validation.js";
7
- export type { WorkflowEventType, WorkflowEvent } from "./workflow-events.js";
8
- export { WorkflowEventLogger } from "./workflow-events.js";
9
- export { ProviderTracker } from "./provider-tracker.js";
10
- export type { ProviderId } from "./provider-ids.js";
11
- export { PROVIDER_ID } from "./provider-ids.js";
12
- export { setRunContext, clearRunContext, getProviderTracker } from "./run-context.js";
13
- export type { StepExecutor, StepExecutionContext, WorkflowRunnerOptions } from "./workflow-runner.js";
14
- export { WorkflowRunner } from "./workflow-runner.js";
15
- export type { PromptStep, WorkflowDefinition } from "./prompt-step.js";
16
- export { promptStep, promptStepOutput, toStepDefinitions, toWorkflowPlan } from "./prompt-step.js";
@@ -1,10 +0,0 @@
1
- export { isProviderOk, toEvidenceRecord } from "./evidence.js";
2
- export { isValidStepTransition, transitionStepStatus, createWorkflowRun, } from "./workflow-types.js";
3
- export { emptyValidationResult, checkTimestamps, checkOptionsExpiries, checkRequiredFields, checkNumberMatch, RuntimeValidator, DEFAULT_MARKET_SENSITIVE_LABELS, } from "./validation.js";
4
- export { WorkflowEventLogger } from "./workflow-events.js";
5
- export { ProviderTracker } from "./provider-tracker.js";
6
- export { PROVIDER_ID } from "./provider-ids.js";
7
- export { setRunContext, clearRunContext, getProviderTracker } from "./run-context.js";
8
- export { WorkflowRunner } from "./workflow-runner.js";
9
- export { promptStep, promptStepOutput, toStepDefinitions, toWorkflowPlan } from "./prompt-step.js";
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAW/D,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,+BAA+B,GAChC,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGtF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Canonical provider IDs. These match the keys used in
3
- * src/infra/rate-limiter.ts for providers that have rate limits.
4
- */
5
- export declare const PROVIDER_ID: {
6
- readonly YAHOO: "yahoo";
7
- readonly ALPHA_VANTAGE: "alphavantage";
8
- readonly COINGECKO: "coingecko";
9
- readonly FRED: "fred";
10
- readonly SEC_EDGAR: "sec-edgar";
11
- readonly REDDIT: "reddit";
12
- readonly FEAR_GREED: "feargreed";
13
- };
14
- export type ProviderId = (typeof PROVIDER_ID)[keyof typeof PROVIDER_ID];
@@ -1,14 +0,0 @@
1
- /**
2
- * Canonical provider IDs. These match the keys used in
3
- * src/infra/rate-limiter.ts for providers that have rate limits.
4
- */
5
- export const PROVIDER_ID = {
6
- YAHOO: "yahoo",
7
- ALPHA_VANTAGE: "alphavantage",
8
- COINGECKO: "coingecko",
9
- FRED: "fred",
10
- SEC_EDGAR: "sec-edgar",
11
- REDDIT: "reddit",
12
- FEAR_GREED: "feargreed",
13
- };
14
- //# sourceMappingURL=provider-ids.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider-ids.js","sourceRoot":"","sources":["../../src/runtime/provider-ids.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,cAAc;IAC7B,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,WAAW;CACf,CAAC"}
@@ -1,4 +0,0 @@
1
- export interface WorkflowPlan {
2
- initialPrompt: string;
3
- followUps: string[];
4
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/workflows/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g,v as _}from"./index-RflHaj0y.js";var v=o(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),y=o(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ee=o(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),b=o(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),x=o(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),S=o(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),C=_(e(),1),w=a();function T({label:e,hint:t,required:n=!1,children:r,className:i}){return(0,w.jsxs)(`label`,{className:d(`grid gap-1.5`,i),children:[(0,w.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3 text-xs font-medium text-foreground`,children:[(0,w.jsxs)(`span`,{children:[e,n?(0,w.jsx)(`span`,{className:`text-foreground/40`,"aria-hidden":`true`,children:` *`}):null]}),t?(0,w.jsx)(`span`,{className:`text-[11px] font-normal text-muted-foreground`,children:t}):null]}),r]})}function te({value:e,onChange:t,options:n,ariaLabel:r}){return(0,w.jsx)(`div`,{role:`radiogroup`,"aria-label":r,className:`inline-flex h-9 items-center rounded-md border border-border bg-card p-0.5`,children:n.map(n=>{let r=n.value===e;return(0,w.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":r,onClick:()=>t(n.value),className:d(`inline-flex h-8 min-w-9 items-center justify-center rounded-[4px] px-2.5 text-xs font-medium tabular-nums transition-colors`,r?`bg-foreground text-background`:`text-muted-foreground hover:text-foreground`),children:n.label},n.value)})})}function E({value:e,onChange:t,options:n,placeholder:r,ariaLabel:i}){return(0,w.jsxs)(`div`,{className:`relative`,children:[(0,w.jsxs)(`select`,{"aria-label":i,value:e??``,onChange:e=>t(e.target.value||void 0),className:`h-9 w-full appearance-none rounded-md border border-border bg-card px-3 pr-9 text-sm text-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,children:[r?(0,w.jsx)(`option`,{value:``,disabled:!0,hidden:!0,children:r}):null,n.map(e=>(0,w.jsx)(`option`,{value:e.value,children:e.label},e.value))]}),(0,w.jsx)(f,{"aria-hidden":`true`,className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`})]})}function D({value:e,onChange:t,presets:n,suffix:r,min:i,max:a,step:o=1,placeholder:s}){let c=n.some(t=>t.value===e);return(0,w.jsxs)(`div`,{className:`grid gap-2`,children:[(0,w.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:n.map(n=>(0,w.jsx)(`button`,{type:`button`,onClick:()=>t(n.value),className:d(`inline-flex h-7 items-center rounded-full border px-2.5 text-xs font-medium tabular-nums transition-colors`,n.value===e?`border-foreground bg-foreground text-background`:`border-border bg-card text-muted-foreground hover:border-border hover:text-foreground`),children:n.label},String(n.value)))}),(0,w.jsxs)(`div`,{className:`relative w-32`,children:[(0,w.jsx)(p,{type:`number`,inputMode:`numeric`,value:c?``:e??``,min:i,max:a,step:o,placeholder:s??`Custom`,onChange:e=>{t(e.target.value===``?void 0:Number(e.target.value))},className:`h-8 pr-8 text-xs tabular-nums`}),r?(0,w.jsx)(`span`,{className:`pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-[11px] text-muted-foreground`,children:r}):null]})]})}function ne({value:e,onChange:t,lookup:n,placeholder:r=`AAPL`,ariaLabel:i}){let[a,o]=(0,C.useState)(!1),[s,c]=(0,C.useState)([]),[l,u]=(0,C.useState)(!1),d=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(!n)return;let t=String(e||``).trim();if(t.length<1){c([]);return}return d.current&&clearTimeout(d.current),d.current=setTimeout(async()=>{u(!0);try{c((await n(t)).slice(0,6))}catch{c([])}finally{u(!1)}},180),()=>{d.current&&clearTimeout(d.current)}},[e,n]),(0,w.jsxs)(`div`,{className:`relative`,children:[(0,w.jsx)(p,{"aria-label":i,value:e??``,placeholder:r,onChange:e=>t(e.target.value.toUpperCase()),onFocus:()=>o(!0),onBlur:()=>setTimeout(()=>o(!1),120),className:`h-9 tabular-nums`,autoCapitalize:`characters`}),a&&s.length>0?(0,w.jsx)(`div`,{className:`absolute left-0 right-0 top-full z-20 mt-1 max-h-60 overflow-auto rounded-md border border-border bg-card shadow-subtle-sm`,children:s.map(e=>(0,w.jsxs)(`button`,{type:`button`,onMouseDown:e=>e.preventDefault(),onClick:()=>{t(e.symbol),o(!1)},className:`flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm hover:bg-secondary`,children:[(0,w.jsx)(`span`,{className:`font-medium tabular-nums text-foreground`,children:e.symbol}),(0,w.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.name})]},e.symbol))}):null,l?(0,w.jsx)(`span`,{className:`absolute right-3 top-1/2 -translate-y-1/2 text-[10px] uppercase tracking-wider text-muted-foreground`,children:`…`}):null]})}function re({value:e=[],onChange:n,placeholder:r=`Add ticker`,min:i,max:a}){let[o,s]=(0,C.useState)(``),c=a!=null&&e.length>=a,l=()=>{let t=o.trim().toUpperCase();if(t){if(e.includes(t)){s(``);return}c||(n([...e,t]),s(``))}},u=t=>n(e.filter(e=>e!==t));return(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-border bg-card px-2 py-1.5 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background`,children:[e.map(e=>(0,w.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-border bg-secondary px-1.5 py-0.5 text-xs font-medium tabular-nums text-foreground`,children:[e,(0,w.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e}`,onClick:()=>u(e),className:`text-muted-foreground hover:text-foreground`,children:(0,w.jsx)(m,{className:`h-3 w-3`})})]},e)),(0,w.jsx)(`input`,{value:o,onChange:e=>s(e.target.value.toUpperCase()),onKeyDown:t=>{t.key===`Enter`||t.key===`,`?(t.preventDefault(),l()):t.key===`Backspace`&&!o&&e.length>0&&(t.preventDefault(),n(e.slice(0,-1)))},placeholder:e.length===0?r:``,disabled:c,className:`min-w-[80px] flex-1 bg-transparent py-1 text-xs tabular-nums text-foreground outline-none placeholder:text-muted-foreground disabled:opacity-40`,autoCapitalize:`characters`}),o.trim()?(0,w.jsx)(t,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":`Add ticker`,onClick:l,children:(0,w.jsx)(g,{})}):null]}),i!=null&&e.length<i?(0,w.jsxs)(`p`,{className:`mt-1 text-[11px] text-muted-foreground`,children:[`Add at least `,i,` symbol`,i===1?``:`s`,`.`]}):null,a==null?null:(0,w.jsxs)(`p`,{className:`mt-1 text-[11px] text-muted-foreground tabular-nums`,children:[e.length,`/`,a]})]})}function ie({value:e=[],onChange:t,options:n}){let r=n=>{e.includes(n)?t(e.filter(e=>e!==n)):t([...e,n])};return(0,w.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(t=>{let n=e.includes(t.value);return(0,w.jsxs)(`button`,{type:`button`,onClick:()=>r(t.value),className:d(`inline-flex h-7 items-center gap-1 rounded-full border px-2.5 text-xs font-medium transition-colors`,n?`border-foreground bg-foreground text-background`:`border-border bg-card text-muted-foreground hover:text-foreground`),children:[n?(0,w.jsx)(l,{className:`h-3 w-3`,"aria-hidden":`true`}):null,t.label]},t.value)})})}function ae({value:e,onChange:t,min:n,max:r,placeholder:i=`YYYY-MM-DD`}){return(0,w.jsx)(p,{type:`date`,value:e??``,min:n,max:r,placeholder:i,onChange:e=>t(e.target.value||void 0),className:`h-9 tabular-nums`})}function oe({value:e,onChange:t,placeholder:n,rows:r=3,maxLength:i}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`textarea`,{value:e??``,onChange:e=>t(e.target.value),placeholder:n,maxLength:i,rows:r,className:`block w-full resize-y rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`}),i?(0,w.jsxs)(`div`,{className:`mt-1 text-right text-[11px] tabular-nums text-muted-foreground`,children:[(e||``).length,`/`,i]}):null]})}function O({value:e,onChange:t,currency:n=`USD`,min:r=0,placeholder:i=`0`}){let[a,o]=(0,C.useState)(!1),[s,c]=(0,C.useState)(k(e,!1));(0,C.useEffect)(()=>{a||c(k(e,!1))},[e,a]);let l=se(n),u=e=>{if(o(!1),!e||!e.replace(/[^0-9.]/g,``)){t(void 0),c(``);return}let n=Number(e.replace(/[^0-9.]/g,``));Number.isFinite(n)&&(t(n),c(k(n,!1)))};return(0,w.jsxs)(`div`,{className:`relative`,children:[(0,w.jsx)(`span`,{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground`,children:l}),(0,w.jsx)(p,{value:a?s:k(e,!1),inputMode:`decimal`,placeholder:i,onChange:e=>c(e.target.value.replace(/[^0-9.]/g,``)),onFocus:()=>{o(!0),c(e==null?``:String(e))},onBlur:e=>u(e.target.value),min:r,className:`h-9 pl-7 tabular-nums`})]})}function k(e,t){if(e==null||e===``)return``;let n=Number(e);return Number.isFinite(n)?t?String(n):n.toLocaleString(`en-US`):String(e)}function se(e){return!e||e===`USD`||e===`CAD`||e===`AUD`?`$`:e===`EUR`?`€`:e===`GBP`?`£`:e===`JPY`?`¥`:e}function ce({value:e,onChange:t,min:n,max:r,step:i=.5,placeholder:a}){return(0,w.jsxs)(`div`,{className:`relative`,children:[(0,w.jsx)(p,{type:`number`,inputMode:`decimal`,value:e==null||e===``?``:String(Number((Number(e)*100).toFixed(4))),placeholder:a,min:n,max:r,step:i,onChange:e=>{let n=e.target.value;if(n===``){t(void 0);return}let r=Number(n);Number.isFinite(r)&&t(r/100)},className:`h-9 pr-7 tabular-nums`}),(0,w.jsx)(`span`,{className:`pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground`,children:`%`})]})}function le({suggestions:e,onPick:t,label:n=`Suggestions`}){return e?.length?(0,w.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,w.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-wider text-muted-foreground`,children:n}),(0,w.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map(e=>(0,w.jsx)(`button`,{type:`button`,onClick:()=>t(e.value||e.label),className:`inline-flex h-7 items-center rounded-full border border-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,children:e.label},e.value||e.label))})]}):null}var ue={DAYS_PRESETS:[{value:7,label:`7d`},{value:30,label:`30d`},{value:90,label:`90d`},{value:180,label:`6M`},{value:365,label:`1Y`}],HOURS_PRESETS:[{value:6,label:`6h`},{value:24,label:`24h`},{value:72,label:`3d`},{value:168,label:`7d`}],RANGE_OPTIONS:[{value:`1mo`,label:`1M`},{value:`3mo`,label:`3M`},{value:`6mo`,label:`6M`},{value:`1y`,label:`1Y`},{value:`2y`,label:`2Y`},{value:`5y`,label:`5Y`},{value:`max`,label:`Max`}],PERIOD_OPTIONS:[{value:`6mo`,label:`6M`},{value:`1y`,label:`1Y`},{value:`2y`,label:`2Y`}],FRESHNESS_OPTIONS:[{value:`hours`,label:`Hours`},{value:`day`,label:`Day`},{value:`week`,label:`Week`},{value:`month`,label:`Month`}]};function A(e){return typeof e==`string`?ue[e]??[]:e??[]}function j({field:e,value:t,onChange:n,lookupSymbol:r}){let i=t=>n(e.name,t);switch(e.label,e.required,e.helper&&e.helper,e.kind){case`symbol`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(ne,{value:t,onChange:i,lookup:r,placeholder:e.placeholder,ariaLabel:e.label})});case`symbols`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(re,{value:t||[],onChange:i,min:e.min,max:e.max,placeholder:e.placeholder})});case`segmented`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(te,{value:t,onChange:i,options:A(e.options),ariaLabel:e.label})});case`select`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(E,{value:t,onChange:i,options:A(e.options),placeholder:e.placeholder,ariaLabel:e.label})});case`number-chips`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(D,{value:t,onChange:i,presets:A(e.presets),suffix:e.suffix,min:e.min,max:e.max,step:e.step,placeholder:e.placeholder})});case`multi-chips`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(ie,{value:t||[],onChange:i,options:A(e.options)})});case`date`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(ae,{value:t,onChange:i,min:e.min,max:e.max})});case`freetext`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(oe,{value:t,onChange:i,placeholder:e.placeholder,maxLength:e.maxLength,rows:e.rows})});case`money`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(O,{value:t,onChange:i,currency:e.currency,placeholder:e.placeholder})});case`percent`:return(0,w.jsx)(T,{label:e.label,hint:e.helper,required:e.required,children:(0,w.jsx)(ce,{value:t,onChange:i,min:e.min,max:e.max,step:e.step,placeholder:e.placeholder})});default:return(0,w.jsxs)(T,{label:e.label,hint:e.helper,required:e.required,children:[(0,w.jsx)(p,{value:t??``,placeholder:e.placeholder,onChange:e=>i(e.target.value),className:`h-9`}),e.suggestions?.length?(0,w.jsx)(`div`,{className:`mt-2`,children:(0,w.jsx)(le,{suggestions:e.suggestions,onPick:i,label:`Try`})}):null]})}}function M(e){let t={};for(let n of e)n.default!==void 0&&(t[n.name]=n.default);return t}function N(e,t){let n=[];for(let r of e){if(!r.required)continue;let e=t[r.name];if(e==null||e===``){n.push(`${r.label} is required.`);continue}Array.isArray(e)&&(e.length===0?n.push(`${r.label} is required.`):r.min!=null&&e.length<r.min&&n.push(`${r.label} needs at least ${r.min} entr${r.min===1?`y`:`ies`}.`))}return n}var P=(e={})=>({name:`symbol`,kind:`symbol`,label:`Symbol`,required:!0,default:`NVDA`,placeholder:`AAPL`,...e}),F=(e={})=>({name:`query`,kind:`text`,label:`Ticker or topic`,required:!0,placeholder:`AAPL or AI infrastructure`,...e}),I={search_ticker:[{name:`query`,kind:`text`,label:`Search query`,required:!0,placeholder:`apple, AAPL, ethereum…`,helper:`Company name, ticker, or crypto. Returns the best matches.`}],get_stock_quote:[P()],get_stock_history:[P(),{name:`range`,kind:`segmented`,label:`Range`,default:`6mo`,options:`RANGE_OPTIONS`},{name:`interval`,kind:`select`,label:`Interval`,default:`1d`,options:[{value:`1d`,label:`Daily`},{value:`1wk`,label:`Weekly`},{value:`1mo`,label:`Monthly`},{value:`1h`,label:`Hourly`},{value:`5m`,label:`5 min`}]}],get_crypto_price:[{name:`id`,kind:`text`,label:`Coin ID`,required:!0,default:`bitcoin`,placeholder:`bitcoin, ethereum, solana`,helper:`CoinGecko coin id (lowercase, hyphenated).`}],get_crypto_history:[{name:`id`,kind:`text`,label:`Coin ID`,required:!0,default:`bitcoin`,placeholder:`bitcoin`,helper:`CoinGecko coin id.`},{name:`days`,kind:`number-chips`,label:`History window`,default:180,presets:`DAYS_PRESETS`,suffix:`days`,helper:`1, 7, 14, 30, 90, 180, 365, or 'max'.`}],get_company_overview:[P()],get_financials:[P(),{name:`statement`,kind:`select`,label:`Statement`,default:`income`,options:[{value:`income`,label:`Income statement`},{value:`balance`,label:`Balance sheet`},{value:`cashflow`,label:`Cash flow`}]}],get_earnings:[P()],calculate_dcf:[P(),{name:`growth_rate`,kind:`percent`,label:`FCF growth rate`,helper:`Annual. Estimated from history if blank.`},{name:`discount_rate`,kind:`percent`,label:`Discount rate (WACC)`,default:.1,helper:`Default 10%.`},{name:`terminal_growth`,kind:`percent`,label:`Terminal growth`,default:.03,helper:`Default 3%.`},{name:`projection_years`,kind:`number-chips`,label:`Projection years`,default:5,presets:[{value:3,label:`3y`},{value:5,label:`5y`},{value:7,label:`7y`},{value:10,label:`10y`}],suffix:`yrs`}],compare_companies:[{name:`symbols`,kind:`symbols`,label:`Tickers`,required:!0,min:2,max:6,default:[`AAPL`,`MSFT`,`GOOGL`],helper:`Pick 2 to 6 tickers to compare side by side.`}],get_sec_filings:[P(),{name:`form_types`,kind:`multi-chips`,label:`Filing types`,default:[`10-K`,`10-Q`,`8-K`],options:[{value:`10-K`,label:`10-K (annual)`},{value:`10-Q`,label:`10-Q (quarterly)`},{value:`8-K`,label:`8-K (material)`},{value:`S-1`,label:`S-1`},{value:`DEF 14A`,label:`Proxy (DEF 14A)`}]},{name:`limit`,kind:`number-chips`,label:`Max results`,default:10,presets:[{value:5,label:`5`},{value:10,label:`10`},{value:25,label:`25`},{value:50,label:`50`}]}],get_economic_data:[{name:`series_id`,kind:`text`,label:`FRED series`,required:!0,default:`CPIAUCSL`,placeholder:`CPIAUCSL`,helper:`Common: CPIAUCSL (CPI), DGS10 (10Y), UNRATE (unemployment), FEDFUNDS.`,suggestions:[{value:`CPIAUCSL`,label:`CPI`},{value:`DGS10`,label:`10Y Treasury`},{value:`UNRATE`,label:`Unemployment`},{value:`FEDFUNDS`,label:`Fed Funds`},{value:`GDP`,label:`GDP`}]},{name:`limit`,kind:`number-chips`,label:`Observations`,default:30,presets:[{value:12,label:`12`},{value:30,label:`30`},{value:60,label:`60`},{value:120,label:`120`}]}],get_fear_greed:[],get_technical_indicators:[P(),{name:`range`,kind:`segmented`,label:`Range`,default:`1y`,options:[{value:`3mo`,label:`3M`},{value:`6mo`,label:`6M`},{value:`1y`,label:`1Y`},{value:`2y`,label:`2Y`}]}],backtest_strategy:[P(),{name:`strategy`,kind:`select`,label:`Strategy`,required:!0,default:`sma_crossover`,options:[{value:`sma_crossover`,label:`SMA crossover (20/50)`},{value:`rsi_mean_reversion`,label:`RSI mean reversion (30/70)`}]},{name:`period`,kind:`segmented`,label:`Lookback`,default:`2y`,options:[{value:`1y`,label:`1Y`},{value:`2y`,label:`2Y`},{value:`5y`,label:`5Y`}]}],manage_portfolio:[{name:`action`,kind:`segmented`,label:`Action`,required:!0,default:`check`,options:[{value:`add`,label:`Add`},{value:`remove`,label:`Remove`},{value:`check`,label:`Check`},{value:`list`,label:`List`}]},P({required:!1,helper:`Required for add/remove.`}),{name:`shares`,kind:`number-chips`,label:`Shares`,presets:[{value:10,label:`10`},{value:100,label:`100`},{value:500,label:`500`}],helper:`Required when adding a position.`},{name:`avg_cost`,kind:`money`,label:`Average cost basis`,helper:`Per share, in your portfolio currency.`}],watchlist:[{name:`action`,kind:`segmented`,label:`Action`,required:!0,default:`check`,options:[{value:`add`,label:`Add`},{value:`remove`,label:`Remove`},{value:`check`,label:`Check`}]},P({required:!1}),{name:`target_price`,kind:`money`,label:`Target (alert ↑)`},{name:`stop_price`,kind:`money`,label:`Stop (alert ↓)`}],analyze_correlation:[{name:`symbols`,kind:`symbols`,label:`Tickers`,required:!0,min:2,max:12,default:[`SPY`,`QQQ`,`TLT`],helper:`2 or more tickers.`},{name:`period`,kind:`segmented`,label:`Window`,default:`1y`,options:`PERIOD_OPTIONS`}],analyze_risk:[P(),{name:`period`,kind:`segmented`,label:`Window`,default:`1y`,options:`PERIOD_OPTIONS`}],predict_returns:[{name:`symbols`,kind:`symbols`,label:`Tickers`,required:!0,min:1,max:8,default:[`NVDA`,`AAPL`],helper:`Forecast 1-week and 1-month return ranges.`}],get_option_chain:[P(),{name:`expiration`,kind:`date`,label:`Expiration`,helper:`Defaults to nearest expiration.`},{name:`type`,kind:`segmented`,label:`Type`,options:[{value:``,label:`Both`},{value:`call`,label:`Calls`},{value:`put`,label:`Puts`}]}],get_reddit_sentiment:[{name:`subreddit`,kind:`text`,label:`Subreddit`,placeholder:`wallstreetbets, stocks, all`,helper:`Leave blank to search defaults.`},{name:`query`,kind:`text`,label:`Filter query`,placeholder:`AAPL or 'rate cuts'`}],get_twitter_sentiment:[F(),{name:`limit`,kind:`number-chips`,label:`Tweets`,default:50,presets:[{value:25,label:`25`},{value:50,label:`50`},{value:100,label:`100`},{value:200,label:`200`}]},{name:`hours`,kind:`number-chips`,label:`Lookback`,default:24,presets:`HOURS_PRESETS`,suffix:`hr`}],get_web_search:[F({label:`Search query`}),{name:`category`,kind:`segmented`,label:`Category`,default:`news`,options:[{value:`news`,label:`News`},{value:`general`,label:`General`}]},{name:`freshness`,kind:`segmented`,label:`Freshness`,default:`day`,options:`FRESHNESS_OPTIONS`}],get_web_sentiment:[F(),{name:`freshness`,kind:`segmented`,label:`Freshness`,default:`day`,options:`FRESHNESS_OPTIONS`},{name:`limit`,kind:`number-chips`,label:`Articles`,default:10,presets:[{value:5,label:`5`},{value:10,label:`10`},{value:20,label:`20`}]}],get_sentiment_trend:[F(),{name:`days`,kind:`number-chips`,label:`Days of history`,default:7,presets:[{value:3,label:`3d`},{value:7,label:`7d`},{value:14,label:`14d`},{value:30,label:`30d`}]},{name:`source`,kind:`select`,label:`Source`,placeholder:`All sources`,options:[{value:`twitter`,label:`Twitter`},{value:`reddit`,label:`Reddit`},{value:`web`,label:`Web`},{value:`finnhub`,label:`Finnhub`}]}],get_sentiment_summary:[F(),{name:`hours`,kind:`number-chips`,label:`Lookback`,default:24,presets:`HOURS_PRESETS`,suffix:`hr`}]},L={market:`Market`,fundamentals:`Fundamentals`,options:`Options`,portfolio:`Portfolio`,technical:`Technical`,sentiment:`Sentiment`,macro:`Macro`,interaction:`Interaction`};function R(e){return I[e]??null}var z={comprehensive_analysis:{headline:`Comprehensive analysis`,description:`Run market, fundamentals, technical, sentiment, and macro analysts on one ticker, then synthesize.`,fields:[{name:`symbol`,kind:`symbol`,label:`Symbol`,required:!0,default:`NVDA`},{name:`depth`,kind:`segmented`,label:`Depth`,default:`standard`,options:[{value:`fast`,label:`Fast`},{value:`standard`,label:`Standard`},{value:`deep`,label:`Deep`}],helper:`Fast: market + fundamentals only. Deep: includes options + macro.`}],buildPrompt:e=>{let t=e.depth&&e.depth!==`standard`?` (${e.depth} depth)`:``;return`/analyze ${e.symbol}${t}`}},portfolio_builder:{headline:`Portfolio builder`,description:`Build a draft portfolio from goals and constraints. The agent will fetch candidates, check correlation, and present an allocation table.`,fields:[{name:`objective`,kind:`freetext`,label:`Objective`,required:!0,placeholder:`Long-term growth with US tech exposure`,maxLength:200,helper:`One or two sentences describing what the portfolio is for.`},{name:`budget`,kind:`money`,label:`Budget`,default:1e5,helper:`Total amount to allocate.`},{name:`riskProfile`,kind:`segmented`,label:`Risk profile`,default:`balanced`,options:[{value:`conservative`,label:`Conservative`},{value:`balanced`,label:`Balanced`},{value:`aggressive`,label:`Aggressive`}]},{name:`timeHorizon`,kind:`segmented`,label:`Time horizon`,default:`5y`,options:[{value:`1y`,label:`1Y`},{value:`3y`,label:`3Y`},{value:`5y`,label:`5Y`},{value:`10y`,label:`10Y+`}]},{name:`assetScope`,kind:`segmented`,label:`Asset scope`,default:`stocks`,options:[{value:`stocks`,label:`Stocks`},{value:`stocks_etfs`,label:`Stocks + ETFs`},{value:`stocks_crypto`,label:`Stocks + Crypto`}]},{name:`positionCount`,kind:`number-chips`,label:`Positions`,default:8,presets:[{value:5,label:`5`},{value:8,label:`8`},{value:12,label:`12`},{value:20,label:`20`}]},{name:`maxSinglePositionPct`,kind:`percent`,label:`Max single position`,default:.15,helper:`Concentration cap, e.g. 15%.`},{name:`excludeSectors`,kind:`multi-chips`,label:`Exclude sectors`,advanced:!0,options:[{value:`energy`,label:`Energy`},{value:`financials`,label:`Financials`},{value:`consumer_discretionary`,label:`Consumer Discr.`},{value:`healthcare`,label:`Healthcare`},{value:`tech`,label:`Technology`},{value:`real_estate`,label:`Real Estate`},{value:`utilities`,label:`Utilities`}]},{name:`incomeVsGrowth`,kind:`segmented`,label:`Tilt`,advanced:!0,options:[{value:`income`,label:`Income`},{value:`balanced`,label:`Balanced`},{value:`growth`,label:`Growth`}]}],buildPrompt:e=>{let t=[`${U(e.budget)} budget`,e.riskProfile&&`${e.riskProfile} risk`,e.timeHorizon&&`${e.timeHorizon} horizon`,e.assetScope&&B(e.assetScope),e.positionCount&&`${e.positionCount} positions`,e.maxSinglePositionPct!=null&&`max ${(e.maxSinglePositionPct*100).toFixed(0)}% per position`,e.incomeVsGrowth&&`${e.incomeVsGrowth} tilt`,e.excludeSectors?.length&&`exclude ${e.excludeSectors.join(`, `)}`].filter(Boolean).join(`, `);return`Build me a portfolio for ${String(e.objective||``).trim()}. Constraints: ${t}.`}},options_screener:{headline:`Options screener`,description:`Pick contracts from a single ticker's chain that match your direction, DTE, and liquidity preferences.`,fields:[{name:`symbol`,kind:`symbol`,label:`Underlying`,required:!0,default:`NVDA`},{name:`direction`,kind:`segmented`,label:`Direction`,required:!0,default:`bullish`,options:[{value:`bullish`,label:`Bullish (calls)`},{value:`bearish`,label:`Bearish (puts)`}]},{name:`dteTarget`,kind:`segmented`,label:`Days to expiry`,required:!0,default:`30-45`,options:[{value:`0-7`,label:`0–7`},{value:`14-30`,label:`14–30`},{value:`30-45`,label:`30–45`},{value:`45-90`,label:`45–90`},{value:`90+`,label:`90+`}]},{name:`moneynessPreference`,kind:`segmented`,label:`Moneyness`,required:!0,default:`atm`,options:[{value:`itm`,label:`ITM`},{value:`atm`,label:`ATM`},{value:`otm`,label:`OTM`}]},{name:`liquidityMinimum`,kind:`segmented`,label:`Liquidity floor`,required:!0,default:`tight_spreads`,options:[{value:`any`,label:`Any`},{value:`tight_spreads`,label:`Tight spreads`},{value:`high_oi`,label:`High open interest`}]},{name:`objective`,kind:`select`,label:`Objective`,required:!0,default:`directional_leverage`,options:[{value:`directional_leverage`,label:`Directional leverage`},{value:`hedge`,label:`Hedge existing position`},{value:`income`,label:`Income (sell premium)`},{value:`speculative`,label:`Speculative (cheap convexity)`}]},{name:`maxPremium`,kind:`money`,label:`Max premium per contract`,advanced:!0},{name:`ivPreference`,kind:`segmented`,label:`IV preference`,advanced:!0,options:[{value:`any`,label:`Any`},{value:`low`,label:`Low IV`},{value:`high`,label:`High IV`}]}],buildPrompt:e=>{let t=[e.dteTarget&&`DTE ${e.dteTarget}`,e.moneynessPreference&&`${e.moneynessPreference.toUpperCase()} strikes`,e.liquidityMinimum&&V(e.liquidityMinimum),e.objective&&H(e.objective),e.maxPremium!=null&&`max premium ${U(e.maxPremium)}`,e.ivPreference&&e.ivPreference!==`any`&&`${e.ivPreference} IV`].filter(Boolean).join(`, `);return`Screen options for ${e.symbol} (${e.direction||`bullish`}). ${t?`Filters: ${t}.`:``}`.trim()}},compare_assets:{headline:`Compare assets`,description:`Side-by-side comparison of two or more tickers across price, technicals, fundamentals, and risk.`,fields:[{name:`symbols`,kind:`symbols`,label:`Tickers`,required:!0,min:2,max:6,default:[`NVDA`,`AMD`],helper:`2 to 6 symbols.`},{name:`metrics`,kind:`multi-chips`,label:`Focus on`,advanced:!0,options:[{value:`valuation`,label:`Valuation`},{value:`growth`,label:`Growth`},{value:`profitability`,label:`Profitability`},{value:`momentum`,label:`Momentum`},{value:`risk`,label:`Risk`}]}],buildPrompt:e=>`Compare ${(e.symbols||[]).join(` vs `)} side by side.${e.metrics?.length?` Focus on ${e.metrics.join(`, `)}.`:``}`}};function B(e){return e===`stocks_etfs`?`stocks and ETFs`:e===`stocks_crypto`?`stocks and crypto`:`stocks only`}function V(e){return e===`tight_spreads`?`tight bid-ask spreads`:e===`high_oi`?`high open interest`:`any liquidity`}function H(e){return e===`directional_leverage`?`directional leverage`:e===`hedge`?`hedge an existing position`:e===`income`?`income via short premium`:e===`speculative`?`speculative cheap convexity`:e}function U(e){if(e==null)return``;let t=Number(e);return Number.isFinite(t)?`$${t.toLocaleString(`en-US`)}`:String(e)}function de(e){return z[e]??null}var fe=[{id:`workflows`,label:`Workflows`,icon:S},{id:`tools`,label:`Tools`,icon:n},{id:`providers`,label:`Providers`,icon:r}],W=`workflows`;function pe({open:e,initialTab:t,catalog:n,onClose:r,send:i,setToast:a,startChatRun:o,fillComposer:s}){let[c,l]=(0,C.useState)(t??W),[d,f]=(0,C.useState)(``),[p,m]=(0,C.useState)(null),g=(0,C.useRef)(null);(0,C.useEffect)(()=>{e&&(l(t??W),f(``),m(null))},[e,t]),(0,C.useEffect)(()=>{g.current&&(g.current.scrollTop=0)},[p,c]);let _=(0,C.useCallback)(()=>{m(null),f(``),r()},[r]);return(0,w.jsx)(h,{open:e,onOpenChange:e=>{e||_()},children:(0,w.jsx)(u,{width:`xl`,handleLabel:`Catalog`,className:`bg-card p-0`,children:(0,w.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-rows-[auto_minmax(0,1fr)]`,children:[p?(0,w.jsx)(ye,{selection:p,catalog:n,onBack:()=>m(null)}):(0,w.jsx)(G,{tab:c,setTab:l,query:d,setQuery:f,counts:{workflows:n?.workflows?.length??0,tools:n?.tools?.length??0,providers:n?.providers?.length??0}}),(0,w.jsx)(`div`,{ref:g,className:`min-h-0 overflow-y-auto overscroll-contain`,children:p?(0,w.jsx)(be,{selection:p,catalog:n,send:i,setToast:a,startChatRun:o,fillComposer:s,onClose:_,lookupSymbol:void 0}):(0,w.jsx)(he,{tab:c,query:d,catalog:n,onSelect:e=>m(e)})})]})})})}function G({tab:e,setTab:n,query:r,setQuery:i,counts:a}){return(0,w.jsxs)(`div`,{className:`border-b border-border`,children:[(0,w.jsx)(`div`,{className:`px-3 pt-2 sm:px-4`,children:(0,w.jsx)(`div`,{className:`flex w-full items-center gap-0.5 rounded-md bg-secondary p-0.5`,children:fe.map(t=>{let r=t.icon,i=e===t.id;return(0,w.jsxs)(`button`,{type:`button`,onClick:()=>n(t.id),"aria-pressed":i,className:d(`inline-flex h-8 min-w-0 flex-1 items-center justify-center gap-1.5 rounded-[5px] px-2 text-xs font-medium transition-colors`,i?`bg-card text-foreground shadow-subtle-xs`:`text-muted-foreground hover:text-foreground`),children:[(0,w.jsx)(r,{className:`hidden h-3.5 w-3.5 sm:inline`,"aria-hidden":`true`}),(0,w.jsx)(`span`,{className:`truncate`,children:t.label}),(0,w.jsx)(`span`,{className:d(`hidden rounded-full px-1.5 text-[10px] tabular-nums sm:inline`,i?`bg-secondary text-muted-foreground`:`text-muted-foreground/70`),children:a[t.id]??0})]},t.id)})})}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 sm:px-4`,children:[(0,w.jsx)(c,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,w.jsx)(p,{variant:`ghost`,value:r,onChange:e=>i(e.target.value),placeholder:me(e),autoFocus:!0,className:`h-8 px-0 text-sm shadow-none`}),r?(0,w.jsx)(t,{variant:`ghost`,size:`icon-xs`,"aria-label":`Clear search`,onClick:()=>i(``),children:(0,w.jsx)(m,{})}):null]})]})}function me(e){return e===`workflows`?`Search workflows`:e===`providers`?`Search providers`:`Search tools by name, label, or domain`}function he({tab:e,query:t,catalog:n,onSelect:r}){if(e===`workflows`){let e=Me(n?.workflows??[],t);return e.length===0?(0,w.jsx)(K,{query:t,kind:`workflows`}):(0,w.jsx)(`ul`,{className:`grid divide-y divide-border`,children:e.map(e=>(0,w.jsx)(ge,{workflow:e,onSelect:r},e.id))})}if(e===`providers`){let e=Ne(n?.providers??[],t);return e.length===0?(0,w.jsx)(K,{query:t,kind:`providers`}):(0,w.jsx)(`ul`,{className:`grid divide-y divide-border`,children:e.map(e=>(0,w.jsx)(ve,{provider:e,onSelect:r},e.id))})}let i=je(n?.tools??[],t);if(i.length===0)return(0,w.jsx)(K,{query:t,kind:`tools`});let a=Pe(i,e=>e.domain??`tool`),o=[`market`,`fundamentals`,`options`,`portfolio`,`technical`,`sentiment`,`macro`,`interaction`];return(0,w.jsx)(`div`,{className:`grid`,children:[...a.keys()].sort((e,t)=>{let n=o.indexOf(e),r=o.indexOf(t);return(n===-1?999:n)-(r===-1?999:r)}).map((e,t)=>(0,w.jsxs)(`section`,{className:d(t===0?``:`mt-2`),children:[(0,w.jsx)(`h4`,{className:`px-4 pb-1 pt-3 text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground`,children:L[e]??e}),(0,w.jsx)(`ul`,{className:`grid divide-y divide-border border-y border-border`,children:a.get(e).map(e=>(0,w.jsx)(_e,{tool:e,onSelect:r},e.name))})]},e))})}function ge({workflow:e,onSelect:t}){return(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,onClick:()=>t({kind:`workflow`,id:e.id}),className:`group flex w-full items-start gap-3 px-4 py-3 text-left transition-colors hover:bg-secondary`,children:[(0,w.jsx)(S,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 shrink-0 text-foreground`}),(0,w.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,w.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,w.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:e.name})}),(0,w.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:e.description})]}),(0,w.jsx)(v,{"aria-hidden":`true`,className:`mt-1 h-4 w-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100`})]})})}function _e({tool:e,onSelect:t}){let r=e.enabled===!1;return(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,onClick:()=>t({kind:`tool`,id:e.name}),className:d(`group flex w-full items-start gap-3 px-4 py-2.5 text-left transition-colors hover:bg-secondary`,r&&`opacity-60`),children:[(0,w.jsx)(n,{"aria-hidden":`true`,className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,w.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:e.label||Y(e.name)}),(0,w.jsx)(`code`,{className:`hidden truncate text-[11px] tabular-nums text-muted-foreground/70 sm:inline`,children:e.name}),r?(0,w.jsx)(s,{variant:`outline`,className:`h-5 px-1.5 text-[10px]`,children:`disabled`}):null]}),(0,w.jsx)(`p`,{className:`mt-0.5 line-clamp-1 text-xs text-muted-foreground`,children:e.description})]}),(0,w.jsx)(v,{"aria-hidden":`true`,className:`mt-1 h-4 w-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100`})]})})}function ve({provider:e,onSelect:t}){let n=X(e);return(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,onClick:()=>t({kind:`provider`,id:e.id}),className:`group flex w-full items-start gap-3 px-4 py-3 text-left transition-colors hover:bg-secondary`,children:[(0,w.jsx)(r,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 shrink-0 text-muted-foreground`}),(0,w.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:e.displayName}),(0,w.jsx)(Z,{status:n}),(0,w.jsx)(`span`,{className:d(`text-[11px]`,$(n)),children:Q(n)})]}),(0,w.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:(e.unlocks||[]).join(` · `)})]}),(0,w.jsx)(v,{"aria-hidden":`true`,className:`mt-1 h-4 w-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100`})]})})}function K({query:e,kind:t}){return(0,w.jsxs)(`div`,{className:`grid gap-2 p-12 text-center`,children:[(0,w.jsx)(c,{className:`mx-auto h-5 w-5 text-muted-foreground`,"aria-hidden":`true`}),(0,w.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:e?`No ${t} match "${e}"`:`No ${t} available`}),(0,w.jsx)(`p`,{className:`mx-auto max-w-xs text-xs text-muted-foreground`,children:e?`Try a shorter query or check spelling.`:`OpenCandle did not return entries for this section.`})]})}function ye({selection:e,catalog:i,onBack:a}){let o=J(e,i);return(0,w.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-3 py-2 sm:px-4`,children:[(0,w.jsx)(t,{variant:`ghost`,size:`icon-sm`,"aria-label":`Back to catalog`,onClick:a,children:(0,w.jsx)(y,{})}),(0,w.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[e.kind===`workflow`?(0,w.jsx)(S,{className:`h-4 w-4 text-foreground`,"aria-hidden":`true`}):null,e.kind===`tool`?(0,w.jsx)(n,{className:`h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}):null,e.kind===`provider`?(0,w.jsx)(r,{className:`h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}):null,(0,w.jsx)(`h2`,{className:`truncate text-sm font-semibold text-foreground`,children:we(e,o)}),e.kind===`tool`&&o?.domain?(0,w.jsx)(s,{variant:`outline`,className:`hidden h-5 px-1.5 text-[10px] sm:inline-flex`,children:L[o.domain]??o.domain}):null]})]})}function be({selection:e,catalog:t,send:n,setToast:r,startChatRun:i,fillComposer:a,onClose:o,lookupSymbol:s}){let c=J(e,t);return c?e.kind===`workflow`?(0,w.jsx)(xe,{workflow:c,startChatRun:i,fillComposer:a,onClose:o,setToast:r,lookupSymbol:s}):e.kind===`tool`?(0,w.jsx)(Se,{tool:c,send:n,startChatRun:i,fillComposer:a,onClose:o,setToast:r,lookupSymbol:s}):(0,w.jsx)(Ce,{provider:c,send:n,setToast:r}):(0,w.jsxs)(`div`,{className:`grid gap-2 p-12 text-center`,children:[(0,w.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:`Selection no longer available`}),(0,w.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`The catalog refreshed while you were viewing this entry.`})]})}function xe({workflow:e,startChatRun:n,fillComposer:r,onClose:i,setToast:a,lookupSymbol:o}){let s=de(e.id),[c,l]=(0,C.useState)(()=>s?M(s.fields):{}),[u,f]=(0,C.useState)(!1);if(!s)return(0,w.jsxs)(`div`,{className:`p-6`,children:[(0,w.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No builder defined for "`,e.name,`". The agent will use its default planner.`]}),(0,w.jsx)(`div`,{className:`mt-4 flex gap-2`,children:(0,w.jsx)(t,{variant:`brand`,onClick:()=>{n(e.prompt||e.name),i()},children:`Run with defaults`})})]});let p=(0,C.useCallback)((e,t)=>l(n=>({...n,[e]:t})),[]),m=N(s.fields,c),h=(0,C.useMemo)(()=>Ae(s,c),[s,c]),g=s.fields.filter(e=>!e.advanced),_=s.fields.filter(e=>e.advanced),y=e=>{if(m.length>0){a?.(m[0]);return}if(e===`send`){n(h),i();return}r?.(h),a?.(`Draft loaded — edit and send when ready.`),i()};return(0,w.jsxs)(`div`,{className:`grid animate-fade-in-once gap-5 px-4 py-4 sm:px-5`,children:[(0,w.jsx)(`p`,{className:`text-sm leading-5 text-muted-foreground`,children:s.description}),(0,w.jsx)(`div`,{className:`grid gap-3.5`,children:g.map(e=>(0,w.jsx)(j,{field:e,value:c[e.name],onChange:p,lookupSymbol:o},e.name))}),_.length>0?(0,w.jsxs)(`div`,{className:`grid gap-3.5 border-t border-border pt-4`,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:()=>f(e=>!e),className:`inline-flex w-fit items-center gap-1.5 text-[11px] font-medium uppercase tracking-wider text-muted-foreground hover:text-foreground`,children:[(0,w.jsxs)(`span`,{children:[u?`Hide`:`Show`,` advanced`]}),(0,w.jsx)(v,{"aria-hidden":`true`,className:d(`h-3 w-3 transition-transform`,u&&`rotate-90`)})]}),u?_.map(e=>(0,w.jsx)(j,{field:e,value:c[e.name],onChange:p,lookupSymbol:o},e.name)):null]}):null,(0,w.jsx)(q,{prompt:h}),(0,w.jsxs)(`div`,{className:`sticky bottom-0 -mx-4 flex flex-wrap items-center justify-end gap-2 border-t border-border bg-card px-4 py-3 sm:-mx-5 sm:px-5`,children:[(0,w.jsx)(t,{variant:`bordered`,onClick:()=>y(`draft`),disabled:!h,children:`Edit in chat`}),(0,w.jsx)(t,{variant:`brand`,onClick:()=>y(`send`),disabled:!h,prefixIcon:x,children:`Run workflow`})]})]})}function Se({tool:e,send:n,startChatRun:r,fillComposer:i,onClose:a,setToast:o,lookupSymbol:s}){let c=(0,C.useMemo)(()=>R(e.name)??Te(e),[e]),[l,u]=(0,C.useState)(()=>M(c)),d=(0,C.useCallback)((e,t)=>u(n=>({...n,[e]:t})),[]),f=N(c,l),p=(0,C.useMemo)(()=>De(l),[l]),m=(0,C.useMemo)(()=>`Use ${e.name}${Oe(p)}`,[e,p]),h=t=>{if(f.length>0){o?.(f[0]);return}if(t===`send`){r(m),a();return}if(t===`draft`){i?.(m),o?.(`Draft loaded — edit and send when ready.`),a();return}t===`run`&&n?.(`tool.invoke`,{toolName:e.name,args:p})&&(o?.(`Running ${e.label||e.name}…`),a())};return(0,w.jsxs)(`div`,{className:`grid animate-fade-in-once gap-5 px-4 py-4 sm:px-5`,children:[(0,w.jsx)(`p`,{className:`text-sm leading-5 text-muted-foreground`,children:e.description}),c.length===0?(0,w.jsx)(`div`,{className:`rounded-md border border-dashed border-border bg-secondary px-3 py-2.5 text-xs text-muted-foreground`,children:`This tool takes no inputs.`}):(0,w.jsx)(`div`,{className:`grid gap-3.5`,children:c.map(e=>(0,w.jsx)(j,{field:e,value:l[e.name],onChange:d,lookupSymbol:s},e.name))}),(0,w.jsx)(q,{prompt:m,title:`Chat preview`}),(0,w.jsxs)(`div`,{className:`sticky bottom-0 -mx-4 flex flex-wrap items-center justify-end gap-2 border-t border-border bg-card px-4 py-3 sm:-mx-5 sm:px-5`,children:[(0,w.jsx)(t,{variant:`bordered`,size:`sm`,onClick:()=>h(`draft`),children:`Edit in chat`}),(0,w.jsx)(t,{variant:`brand`,size:`sm`,prefixIcon:x,onClick:()=>h(`run`),children:`Run now`})]})]})}function Ce({provider:e,send:n,setToast:r}){let[a,o]=(0,C.useState)(e.apiKey||``),[s,c]=(0,C.useState)(!1),l=X(e),u=l===`env`,f=a.trim(),m=!u&&f.length>0;(0,C.useEffect)(()=>{o(e.apiKey||``),c(!1)},[e.id,e.apiKey]);let h=()=>{if(u){r?.(`${e.displayName} is set via ${e.envVar}. Unset it to override here.`);return}f&&(r?.(`Verifying ${e.displayName} key…`),n?.(`provider.save_api_key`,{providerId:e.id,apiKey:f})&&o(``))};return(0,w.jsxs)(`div`,{className:`grid animate-fade-in-once gap-5 px-4 py-4 sm:px-5`,children:[(0,w.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(Z,{status:l}),(0,w.jsx)(`span`,{className:d(`text-xs font-medium`,$(l)),children:Q(l)}),u?(0,w.jsxs)(`code`,{className:`text-[11px] text-muted-foreground`,children:[`env: `,e.envVar]}):null]}),(0,w.jsx)(`p`,{className:`text-sm leading-5 text-muted-foreground`,children:e.fallbackDescription?(0,w.jsxs)(w.Fragment,{children:[`If absent: `,e.fallbackDescription,`.`]}):(0,w.jsxs)(w.Fragment,{children:[`Required for: `,(e.unlocks||[]).join(`, `)||`this provider's tools`,`.`]})})]}),(0,w.jsxs)(`div`,{className:`grid gap-2`,children:[(0,w.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Unlocks`}),(0,w.jsx)(`ul`,{className:`grid gap-1`,children:(e.unlocks||[]).map(e=>(0,w.jsxs)(`li`,{className:`flex items-baseline gap-2 text-sm text-foreground`,children:[(0,w.jsx)(`span`,{"aria-hidden":`true`,className:`mt-1 h-1 w-1 rounded-full bg-foreground/40`}),(0,w.jsx)(`span`,{children:e})]},e))})]}),(0,w.jsxs)(`div`,{className:`grid gap-2`,children:[(0,w.jsx)(`label`,{htmlFor:`provider-api-key-${e.id}`,className:`text-xs font-medium text-foreground`,children:`API key`}),(0,w.jsxs)(`div`,{className:`relative`,children:[(0,w.jsx)(p,{id:`provider-api-key-${e.id}`,type:s?`text`:`password`,value:a,onChange:e=>o(e.target.value),placeholder:`Paste your ${e.displayName} key`,disabled:u,className:`pr-10 font-mono`,autoCapitalize:`none`,autoComplete:`off`,spellCheck:!1,onKeyDown:e=>{e.key===`Enter`&&m&&(e.preventDefault(),h())}}),(0,w.jsx)(t,{type:`button`,variant:`ghost`,size:`icon-xs`,className:`absolute right-1 top-1/2 -translate-y-1/2`,"aria-label":s?`Hide API key`:`Show API key`,tooltip:s?`Hide API key`:`Show API key`,onClick:()=>c(e=>!e),disabled:!a,children:s?(0,w.jsx)(ee,{}):(0,w.jsx)(b,{})})]}),(0,w.jsx)(`p`,{className:`text-[11px] leading-4 text-muted-foreground`,children:u?`Currently set via ${e.envVar}. Unset that variable to manage the key here.`:l===`file`?`Saved to ~/.opencandle/config.json. Paste a new key to replace.`:e.instructionsHint||`Saved to ~/.opencandle/config.json.`})]}),(0,w.jsxs)(`div`,{className:`sticky bottom-0 -mx-4 flex flex-wrap items-center justify-end gap-2 border-t border-border bg-card px-4 py-3 sm:-mx-5 sm:px-5`,children:[e.signupUrl?(0,w.jsx)(t,{variant:`ghost`,size:`sm`,suffixIcon:i,onClick:()=>window.open(e.signupUrl,`_blank`,`noreferrer`),children:`Get a key`}):null,(0,w.jsx)(t,{variant:`brand`,size:`sm`,onClick:h,disabled:!m,children:l===`file`?`Replace key`:`Save key`})]})]})}function q({prompt:e,title:t=`Chat prompt`}){return(0,w.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,w.jsx)(`span`,{className:`text-[11px] font-medium uppercase tracking-wider text-muted-foreground`,children:t}),(0,w.jsx)(`pre`,{className:`overflow-auto whitespace-pre-wrap rounded-md border border-border bg-secondary px-3 py-2 font-mono text-xs leading-5 text-foreground`,children:e||`Fill the required fields to preview the chat prompt.`})]})}function J(e,t){return!e||!t?null:e.kind===`workflow`?t.workflows?.find(t=>t.id===e.id)??null:e.kind===`tool`?t.tools?.find(t=>t.name===e.id)??null:e.kind===`provider`?t.providers?.find(t=>t.id===e.id)??null:null}function we(e,t){return t?e.kind===`workflow`?t.name:e.kind===`tool`?t.label||Y(t.name):e.kind===`provider`?t.displayName:`Catalog`:`Catalog`}function Y(e){return String(e||``).replace(/^get_/,``).replace(/_/g,` `)}function Te(e){let t=e.parameters?.properties||{};return Object.entries(t).map(([t,n])=>{let r=String(n.description||``);return{name:t,kind:n.type===`number`?`text`:n.type===`boolean`?`select`:`text`,label:Ee(t),placeholder:n.examples?.[0],helper:r.length>80?r.slice(0,80)+`…`:r,required:e.parameters?.required?.includes?.(t)??!1}})}function Ee(e){return e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function De(e){let t={};for(let[n,r]of Object.entries(e))r===void 0||r===``||Array.isArray(r)&&r.length===0||(t[n]=r);return t}function Oe(e){let t=Object.entries(e);return t.length===0?``:` with ${t.map(([e,t])=>`${e}=${ke(t)}`).join(`, `)}`}function ke(e){return Array.isArray(e)?e.join(`,`):typeof e==`string`&&e.includes(` `)?JSON.stringify(e):String(e)}function Ae(e,t){try{return e.buildPrompt(t)||``}catch{return``}}function je(e,t){if(!t.trim())return e;let n=t.toLowerCase();return e.filter(e=>[e.name,e.label,e.description,e.domain].some(e=>String(e||``).toLowerCase().includes(n)))}function Me(e,t){if(!t.trim())return e;let n=t.toLowerCase();return e.filter(e=>[e.id,e.name,e.description].some(e=>String(e||``).toLowerCase().includes(n)))}function Ne(e,t){if(!t.trim())return e;let n=t.toLowerCase();return e.filter(e=>[e.id,e.displayName,e.envVar,...e.unlocks||[]].some(e=>String(e||``).toLowerCase().includes(n)))}function Pe(e,t){let n=new Map;for(let r of e){let e=t(r);n.has(e)||n.set(e,[]),n.get(e).push(r)}return n}function X(e){return e.source??`absent`}function Z({status:e}){return(0,w.jsx)(`span`,{"aria-hidden":`true`,className:d(`inline-block h-1.5 w-1.5 rounded-full`,e===`file`?`bg-success`:e===`env`?`bg-info`:`bg-warning`)})}function Q(e){return e===`file`?`Configured`:e===`env`?`From environment`:`Not configured`}function $(e){return e===`file`?`text-success`:e===`env`?`text-info`:`text-warning`}export{pe as CatalogOverlay};
@@ -1 +0,0 @@
1
- *,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,system-ui,-apple-system,ui-sans-serif,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{box-sizing:border-box}html,body{height:100dvh;overflow:hidden}body{background:hsl(var(--tw-background));min-width:320px;color:hsl(var(--tw-foreground));-webkit-tap-highlight-color:hsl(var(--tw-foreground) / .08);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0}#root{height:100dvh}button,input,select,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:not-allowed}:focus-visible{outline:2px solid hsl(var(--tw-foreground));outline-offset:2px}code{border:1px solid hsl(var(--tw-border));background:hsl(var(--tw-secondary));color:hsl(var(--tw-foreground));border-radius:4px;padding:1px 5px;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.container{width:100%;margin-left:auto;margin-right:auto;padding-left:2rem;padding-right:2rem}@media (width>=1400px){.container{max-width:1400px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows), 0 3px 0 var(--tw-prose-kbd-shadows);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:#1118271a;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:#ffffff1a;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.rich-text>*+*{margin-top:.5rem}.rich-text p,.rich-text ul{margin:0}.rich-text ul{padding-left:1.125rem}.rich-text li+li{margin-top:.25rem}.rich-text h3,.rich-text h4,.rich-text h5{color:hsl(var(--tw-foreground));margin:.25rem 0 0;font-size:.95rem;font-weight:600}.rich-text .rich-table{width:100%;max-width:100%;display:block;overflow-x:auto}.rich-text table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%;font-size:13px}.rich-text th,.rich-text td{border:1px solid hsl(var(--tw-border));text-align:left;vertical-align:top;padding:6px 8px}.rich-text th{background:hsl(var(--tw-secondary));color:hsl(var(--tw-foreground));font-weight:600}.chat-markdown{color:hsl(var(--tw-foreground) / .86);font-size:.8125rem;line-height:1.375rem}.chat-markdown>*+*{margin-top:1.25rem}.chat-markdown p,.chat-markdown ul{margin:0}.chat-markdown ul{color:hsl(var(--tw-foreground) / .82);padding-left:1.75rem;list-style:outside}.chat-markdown p+ul{margin-top:1.5rem}.chat-markdown ul+p{margin-top:2rem}.chat-markdown .rich-table+p{margin-top:2.25rem}.chat-markdown li{padding-left:.375rem;line-height:1.375rem}.chat-markdown li+li{margin-top:.75rem}.chat-markdown li::marker{color:hsl(var(--tw-muted-foreground))}.chat-markdown strong{color:hsl(var(--tw-foreground));font-weight:500}.chat-markdown h3,.chat-markdown h4,.chat-markdown h5{color:hsl(var(--tw-foreground));margin:1.5rem 0 .5rem;font-weight:500;line-height:1.35}.chat-markdown h3{font-size:1rem}.chat-markdown h4,.chat-markdown h5{font-size:.875rem}.chat-markdown code{border-color:hsl(var(--tw-border));background:hsl(var(--tw-secondary));color:hsl(var(--tw-foreground));border-radius:.5rem;padding:.125rem .375rem;font-size:.875rem;font-weight:400}.chat-markdown .rich-table{border:1px solid hsl(var(--tw-border));background:hsl(var(--tw-background));width:100%;max-width:100%;display:block;overflow-x:auto}.chat-markdown table{border-collapse:collapse;width:100%;font-size:.8125rem;line-height:1.375rem}.chat-markdown th,.chat-markdown td{border:1px solid hsl(var(--tw-border));text-align:left;vertical-align:top;padding:.625rem .75rem}.chat-markdown th{background:hsl(var(--tw-tertiary));color:hsl(var(--tw-muted-foreground));font-size:.75rem;font-weight:500}.tool-shimmer-base{color:hsl(var(--tw-muted-foreground))}.tool-shimmer{background:linear-gradient(90deg, hsl(var(--tw-muted-foreground)) 0%, hsl(var(--tw-muted-foreground)) 40%, hsl(var(--tw-foreground)) 50%, hsl(var(--tw-muted-foreground)) 60%, hsl(var(--tw-muted-foreground)) 100%);color:#0000;-webkit-text-fill-color:transparent;background-size:220% 100%;-webkit-background-clip:text;background-clip:text;animation:1.6s linear infinite tool-shimmer-sweep}@keyframes tool-shimmer-sweep{0%{background-position:120% 0}to{background-position:-120% 0}}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-x-2{left:.5rem;right:.5rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-3{right:.75rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-3{top:.75rem}.top-\[46\%\]{top:46%}.top-auto{top:auto}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mr-1{margin-right:-.25rem}.-mr-1\.5{margin-right:-.375rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-\[var\(--popover-offset\)\]{margin-bottom:var(--popover-offset)}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-\[var\(--popover-offset\)\]{margin-top:var(--popover-offset)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-1\.5{width:.375rem;height:.375rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-44{height:11rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[70px\]{height:70px}.h-\[90vh\]{height:90vh}.h-\[min\(88dvh\,calc\(100dvh-64px\)\)\]{height:min(88dvh,100dvh - 64px)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-72{max-height:18rem}.max-h-\[280px\]{max-height:280px}.max-h-\[min\(84dvh\,720px\)\]{max-height:min(84dvh,720px)}.max-h-\[min\(88dvh\,calc\(100dvh-64px\)\)\]{max-height:min(88dvh,100dvh - 64px)}.min-h-0{min-height:0}.min-h-11{min-height:2.75rem}.min-h-14{min-height:3.5rem}.min-h-9{min-height:2.25rem}.min-h-\[60px\]{min-height:60px}.min-h-\[68px\]{min-height:68px}.min-h-\[80px\]{min-height:80px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-44{width:11rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[260px\]{width:260px}.w-\[280px\]{width:280px}.w-\[calc\(100vw-16px\)\]{width:calc(100vw - 16px)}.w-\[calc\(100vw-32px\)\]{width:calc(100vw - 32px)}.w-\[min\(520px\,42vw\)\]{width:min(520px,42vw)}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-9{min-width:2.25rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[80px\]{min-width:80px}.max-w-3xl{max-width:48rem}.max-w-\[1040px\]{max-width:1040px}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[160px\]{max-width:160px}.max-w-\[320px\]{max-width:320px}.max-w-\[420px\]{max-width:420px}.max-w-\[520px\]{max-width:520px}.max-w-\[560px\]{max-width:560px}.max-w-\[760px\]{max-width:760px}.max-w-\[780px\]{max-width:780px}.max-w-\[920px\]{max-width:920px}.max-w-\[min\(640px\,86\%\)\]{max-width:min(640px,86%)}.max-w-\[min\(920px\,100\%\)\]{max-width:min(920px,100%)}.max-w-full{max-width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fade-in-once{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}.animate-fade-in-once{animation:.28s ease-out forwards fade-in-once}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{animation:1s cubic-bezier(0,0,.2,1) infinite ping}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_auto_auto_auto\]{grid-template-columns:1fr auto auto auto}.grid-cols-\[20px_auto_minmax\(0\,1fr\)_auto\]{grid-template-columns:20px auto minmax(0,1fr) auto}.grid-cols-\[20px_minmax\(0\,1fr\)\]{grid-template-columns:20px minmax(0,1fr)}.grid-cols-\[20px_minmax\(0\,1fr\)_auto\]{grid-template-columns:20px minmax(0,1fr) auto}.grid-cols-\[28px_minmax\(0\,1fr\)\]{grid-template-columns:28px minmax(0,1fr)}.grid-cols-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-columns:auto minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-rows-\[auto_minmax\(0\,1fr\)\]{grid-template-rows:auto minmax(0,1fr)}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-3\.5{gap:.875rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:hsl(var(--tw-border) / var(--tw-divide-opacity,1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:calc(var(--radius) + 8px)}.rounded-\[4px\]{border-radius:4px}.rounded-\[5px\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-t-2xl{border-top-left-radius:calc(var(--radius) + 8px);border-top-right-radius:calc(var(--radius) + 8px)}.rounded-t-xl{border-top-left-radius:calc(var(--radius) + 4px);border-top-right-radius:calc(var(--radius) + 4px)}.border{border-width:1px}.border-0{border-width:0}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-700\/40{border-color:#b4530966}.border-border{--tw-border-opacity:1;border-color:hsl(var(--tw-border) / var(--tw-border-opacity,1))}.border-destructive{--tw-border-opacity:1;border-color:hsl(var(--tw-destructive) / var(--tw-border-opacity,1))}.border-destructive\/30{border-color:hsl(var(--tw-destructive) / .3)}.border-destructive\/40{border-color:hsl(var(--tw-destructive) / .4)}.border-foreground{--tw-border-opacity:1;border-color:hsl(var(--tw-foreground) / var(--tw-border-opacity,1))}.border-success\/30{border-color:hsl(var(--tw-success) / .3)}.border-transparent{border-color:#0000}.border-warning\/30{border-color:hsl(var(--tw-warning) / .3)}.bg-amber-100\/70{background-color:#fef3c7b3}.bg-background{--tw-bg-opacity:1;background-color:hsl(var(--tw-background) / var(--tw-bg-opacity,1))}.bg-border{--tw-bg-opacity:1;background-color:hsl(var(--tw-border) / var(--tw-bg-opacity,1))}.bg-brand{--tw-bg-opacity:1;background-color:hsl(var(--tw-brand) / var(--tw-bg-opacity,1))}.bg-card{--tw-bg-opacity:1;background-color:hsl(var(--tw-card) / var(--tw-bg-opacity,1))}.bg-destructive{--tw-bg-opacity:1;background-color:hsl(var(--tw-destructive) / var(--tw-bg-opacity,1))}.bg-destructive\/10{background-color:hsl(var(--tw-destructive) / .1)}.bg-destructive\/5{background-color:hsl(var(--tw-destructive) / .05)}.bg-foreground{--tw-bg-opacity:1;background-color:hsl(var(--tw-foreground) / var(--tw-bg-opacity,1))}.bg-foreground\/30{background-color:hsl(var(--tw-foreground) / .3)}.bg-foreground\/40{background-color:hsl(var(--tw-foreground) / .4)}.bg-hard{--tw-bg-opacity:1;background-color:hsl(var(--tw-hard) / var(--tw-bg-opacity,1))}.bg-info{--tw-bg-opacity:1;background-color:hsl(var(--tw-info) / var(--tw-bg-opacity,1))}.bg-muted-foreground\/40{background-color:hsl(var(--tw-muted-foreground) / .4)}.bg-muted\/15{background-color:hsl(var(--tw-muted) / .15)}.bg-secondary{--tw-bg-opacity:1;background-color:hsl(var(--tw-secondary) / var(--tw-bg-opacity,1))}.bg-secondary\/50{background-color:hsl(var(--tw-secondary) / .5)}.bg-success{--tw-bg-opacity:1;background-color:hsl(var(--tw-success) / var(--tw-bg-opacity,1))}.bg-success\/10{background-color:hsl(var(--tw-success) / .1)}.bg-tertiary{--tw-bg-opacity:1;background-color:hsl(var(--tw-tertiary) / var(--tw-bg-opacity,1))}.bg-transparent{background-color:#0000}.bg-warning{--tw-bg-opacity:1;background-color:hsl(var(--tw-warning) / var(--tw-bg-opacity,1))}.bg-warning\/10{background-color:hsl(var(--tw-warning) / .1)}.bg-warning\/15{background-color:hsl(var(--tw-warning) / .15)}.fill-muted-foreground{fill:hsl(var(--tw-muted-foreground) / 1)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}.pl-0\.5{padding-left:.125rem}.pl-1{padding-left:.25rem}.pl-4{padding-left:1rem}.pl-7{padding-left:1.75rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-14{padding-right:3.5rem}.pr-2{padding-right:.5rem}.pr-7{padding-right:1.75rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-1{padding-top:.25rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{letter-spacing:-.015em;font-size:1.375rem;line-height:1.75rem}.text-3xl{letter-spacing:-.02em;font-size:1.875rem;line-height:2.25rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[2rem\]{font-size:2rem}.text-\[3rem\]{font-size:3rem}.text-base{letter-spacing:0;font-size:.875rem;line-height:1.5rem}.text-lg{letter-spacing:-.005em;font-size:1rem;line-height:1.5rem}.text-sm{letter-spacing:0;font-size:.8125rem;line-height:1.25rem}.text-xl{letter-spacing:-.01em;font-size:1.125rem;line-height:1.5rem}.text-xs{letter-spacing:0;font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-\[1\.65rem\]{line-height:1.65rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.08em\]{letter-spacing:.08em}.tracking-normal{letter-spacing:0}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-background{--tw-text-opacity:1;color:hsl(var(--tw-background) / var(--tw-text-opacity,1))}.text-brand-foreground{--tw-text-opacity:1;color:hsl(var(--tw-brand-foreground) / var(--tw-text-opacity,1))}.text-card-foreground{--tw-text-opacity:1;color:hsl(var(--tw-card-foreground) / var(--tw-text-opacity,1))}.text-destructive{--tw-text-opacity:1;color:hsl(var(--tw-destructive) / var(--tw-text-opacity,1))}.text-foreground{--tw-text-opacity:1;color:hsl(var(--tw-foreground) / var(--tw-text-opacity,1))}.text-foreground\/40{color:hsl(var(--tw-foreground) / .4)}.text-foreground\/70{color:hsl(var(--tw-foreground) / .7)}.text-foreground\/80{color:hsl(var(--tw-foreground) / .8)}.text-info{--tw-text-opacity:1;color:hsl(var(--tw-info) / var(--tw-text-opacity,1))}.text-muted-foreground{--tw-text-opacity:1;color:hsl(var(--tw-muted-foreground) / var(--tw-text-opacity,1))}.text-muted-foreground\/70{color:hsl(var(--tw-muted-foreground) / .7)}.text-muted-foreground\/80{color:hsl(var(--tw-muted-foreground) / .8)}.text-success{--tw-text-opacity:1;color:hsl(var(--tw-success) / var(--tw-text-opacity,1))}.text-warning{--tw-text-opacity:1;color:hsl(var(--tw-warning) / var(--tw-text-opacity,1))}.underline-offset-4{text-underline-offset:4px}.accent-brand{accent-color:hsl(var(--tw-brand) / 1)}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-60{opacity:.6}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000), var(--tw-ring-shadow,0 0 #0000), var(--tw-shadow)}.shadow-subtle-md{--tw-shadow:var(--shadow-subtle-md);--tw-shadow-colored:var(--shadow-subtle-md);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000), var(--tw-ring-shadow,0 0 #0000), var(--tw-shadow)}.shadow-subtle-sm{--tw-shadow:var(--shadow-subtle-sm);--tw-shadow-colored:var(--shadow-subtle-sm);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000), var(--tw-ring-shadow,0 0 #0000), var(--tw-shadow)}.shadow-subtle-xs{--tw-shadow:var(--shadow-subtle-xs);--tw-shadow-colored:var(--shadow-subtle-xs);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000), var(--tw-ring-shadow,0 0 #0000), var(--tw-shadow)}.outline-none{outline-offset:2px;outline:2px solid #0000}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-card{--tw-ring-opacity:1;--tw-ring-color:hsl(var(--tw-card) / var(--tw-ring-opacity,1))}.ring-foreground\/10{--tw-ring-color:hsl(var(--tw-foreground) / .1)}.ring-secondary{--tw-ring-opacity:1;--tw-ring-color:hsl(var(--tw-secondary) / var(--tw-ring-opacity,1))}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0), var(--tw-enter-translate-y,0), 0) scale3d(var(--tw-enter-scale,1), var(--tw-enter-scale,1), var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0), var(--tw-exit-translate-y,0), 0) scale3d(var(--tw-exit-scale,1), var(--tw-exit-scale,1), var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.fade-in-0{--tw-enter-opacity:0}.zoom-in-95{--tw-enter-scale:.95}.slide-in-from-right{--tw-enter-translate-x:100%}.duration-200{animation-duration:.2s}.running{animation-play-state:running}.\[--button-icon-size\:14px\]{--button-icon-size:14px}.\[--button-icon-size\:15px\]{--button-icon-size:15px}.\[--button-icon-size\:16px\]{--button-icon-size:16px}.\[--button-icon-size\:17px\]{--button-icon-size:17px}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tw-background:0 0% 100%;--tw-foreground:240 6% 10%;--tw-secondary:240 5% 96%;--tw-secondary-foreground:240 6% 10%;--tw-tertiary:240 5% 92%;--tw-tertiary-foreground:240 6% 10%;--tw-card:0 0% 100%;--tw-card-foreground:240 6% 10%;--tw-popover:0 0% 100%;--tw-popover-foreground:240 6% 10%;--tw-muted:240 5% 96%;--tw-muted-foreground:240 4% 46%;--tw-accent:142 71% 35%;--tw-accent-foreground:0 0% 100%;--tw-brand:240 6% 10%;--tw-brand-foreground:0 0% 100%;--tw-destructive:0 84% 60%;--tw-destructive-foreground:0 0% 100%;--tw-success:142 71% 35%;--tw-warning:35 92% 45%;--tw-info:217 91% 60%;--tw-border:240 6% 90%;--tw-soft:240 5% 96%;--tw-hard:240 5% 84%;--tw-input:240 6% 90%;--tw-ring:240 6% 10%;--shadow-subtle-xs:0 1px 2px #0f0f0f0a;--shadow-subtle-sm:0 4px 12px #0f0f0f0f;--shadow-subtle-md:0 16px 32px #0f0f0f14;--radius:8px;font-family:Inter,system-ui,-apple-system,Segoe UI,Helvetica Neue,sans-serif}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}.placeholder\:text-muted-foreground::placeholder{--tw-text-opacity:1;color:hsl(var(--tw-muted-foreground) / var(--tw-text-opacity,1))}.first\:pt-1:first-child{padding-top:.25rem}.last\:mr-0:last-child{margin-right:0}.last\:border-b-0:last-child{border-bottom-width:0}.last\:pb-0:last-child{padding-bottom:0}.focus-within\:border-foreground\/40:focus-within{border-color:hsl(var(--tw-foreground) / .4)}.focus-within\:bg-tertiary:focus-within{--tw-bg-opacity:1;background-color:hsl(var(--tw-tertiary) / var(--tw-bg-opacity,1))}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.focus-within\:ring-ring:focus-within{--tw-ring-opacity:1;--tw-ring-color:hsl(var(--tw-ring) / var(--tw-ring-opacity,1))}.focus-within\:ring-offset-2:focus-within{--tw-ring-offset-width:2px}.focus-within\:ring-offset-background:focus-within{--tw-ring-offset-color:hsl(var(--tw-background) / 1)}.hover\:border-border:hover{--tw-border-opacity:1;border-color:hsl(var(--tw-border) / var(--tw-border-opacity,1))}.hover\:bg-card:hover{--tw-bg-opacity:1;background-color:hsl(var(--tw-card) / var(--tw-bg-opacity,1))}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--tw-destructive) / .1)}.hover\:bg-secondary:hover{--tw-bg-opacity:1;background-color:hsl(var(--tw-secondary) / var(--tw-bg-opacity,1))}.hover\:bg-tertiary:hover{--tw-bg-opacity:1;background-color:hsl(var(--tw-tertiary) / var(--tw-bg-opacity,1))}.hover\:text-foreground:hover{--tw-text-opacity:1;color:hsl(var(--tw-foreground) / var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.focus-visible\:outline-none:focus-visible{outline-offset:2px;outline:2px solid #0000}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-opacity:1;--tw-ring-color:hsl(var(--tw-ring) / var(--tw-ring-opacity,1))}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:hsl(var(--tw-background) / 1)}.focus-visible\:ring-offset-card:focus-visible{--tw-ring-offset-color:hsl(var(--tw-card) / 1)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group[open] .group-open\:rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:focus-within .group-focus-within\:opacity-100{opacity:1}.group:hover .group-hover\:translate-x-0\.5{--tw-translate-x:.125rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:opacity-100{opacity:1}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:bg-secondary[aria-selected=true]{--tw-bg-opacity:1;background-color:hsl(var(--tw-secondary) / var(--tw-bg-opacity,1))}.aria-selected\:text-foreground[aria-selected=true]{--tw-text-opacity:1;color:hsl(var(--tw-foreground) / var(--tw-text-opacity,1))}.data-\[state\=delayed-open\]\:animate-in[data-state=delayed-open],.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-name:exit;animation-duration:.15s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=delayed-open\]\:fade-in-0[data-state=delayed-open],.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.dark\:border-amber-300\/30:is(.dark *){border-color:#fcd34d4d}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:text-amber-300:is(.dark *){--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}@media (width>=520px){.sm\:-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:inline-flex{display:inline-flex}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:px-2{padding-left:.5rem;padding-right:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pt-24{padding-top:6rem}}@media (width>=640px){.min-\[640px\]\:bottom-auto{bottom:auto}.min-\[640px\]\:left-1\/2{left:50%}.min-\[640px\]\:right-auto{right:auto}.min-\[640px\]\:top-1\/2{top:50%}.min-\[640px\]\:hidden{display:none}.min-\[640px\]\:h-auto{height:auto}.min-\[640px\]\:max-h-\[calc\(100dvh-64px\)\]{max-height:calc(100dvh - 64px)}.min-\[640px\]\:min-h-\[420px\]{min-height:420px}.min-\[640px\]\:w-\[calc\(100vw-32px\)\]{width:calc(100vw - 32px)}.min-\[640px\]\:-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.min-\[640px\]\:rounded-xl{border-radius:calc(var(--radius) + 4px)}.min-\[640px\]\:pb-0{padding-bottom:0}}@media (width>=820px){.md\:inset-x-auto{left:auto;right:auto}.md\:bottom-4{bottom:1rem}.md\:left-1\/2{left:50%}.md\:right-auto{right:auto}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-7{height:1.75rem}.md\:h-8{height:2rem}.md\:h-9{height:2.25rem}.md\:h-auto{height:auto}.md\:max-h-\[84vh\]{max-height:84vh}.md\:w-7{width:1.75rem}.md\:w-8{width:2rem}.md\:w-9{width:2.25rem}.md\:w-\[420px\]{width:420px}.md\:w-\[560px\]{width:560px}.md\:w-\[780px\]{width:780px}.md\:w-\[920px\]{width:920px}.md\:-translate-x-1\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:rounded-xl{border-radius:calc(var(--radius) + 4px)}.md\:px-12{padding-left:3rem;padding-right:3rem}}.\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\>svg\]\:h-\[var\(--button-icon-size\)\]>svg{height:var(--button-icon-size)}.\[\&\>svg\]\:w-\[var\(--button-icon-size\)\]>svg{width:var(--button-icon-size)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&_\.button-icon\]\:h-\[var\(--button-icon-size\)\] .button-icon{height:var(--button-icon-size)}.\[\&_\.button-icon\]\:w-\[var\(--button-icon-size\)\] .button-icon{width:var(--button-icon-size)}.\[\&_\.button-icon\]\:shrink-0 .button-icon{flex-shrink:0}.\[\&_\[cmdk-group-heading\]\]\:px-3 [cmdk-group-heading]{padding-left:.75rem;padding-right:.75rem}.\[\&_\[cmdk-group-heading\]\]\:py-2 [cmdk-group-heading]{padding-top:.5rem;padding-bottom:.5rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{letter-spacing:0;font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{--tw-text-opacity:1;color:hsl(var(--tw-muted-foreground) / var(--tw-text-opacity,1))}.\[\&_svg\]\:size-3 svg{width:.75rem;height:.75rem}.\[\&_svg\]\:size-3\.5 svg{width:.875rem;height:.875rem}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}