thursday-agent 0.12.0 → 0.13.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.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +4 -4
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +18 -19
- package/.next/server/app/_not-found.segments/_full.segment.rsc +18 -19
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +14 -15
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js +8 -8
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/keep-working/route.js +7 -7
- package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js +7 -7
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js +7 -7
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js +5 -5
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js +3 -3
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js +3 -3
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js +2 -2
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/route.js +4 -4
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js +4 -4
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js +6 -6
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js +6 -6
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js +5 -5
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js +5 -5
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js +5 -5
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js +5 -5
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js +15 -14
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js +4 -4
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +13 -12
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js +8 -9
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +2 -2
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js +6 -6
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js +6 -6
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js +14 -13
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +15 -14
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js +10 -6
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +9 -4
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +2 -2
- package/.next/server/app/artifact/[...path]/page.js +5 -4
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +67 -56
- package/.next/server/app/page.js +10 -11
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0o49ztf._.js → [root-of-the-server]__0-k4_ie._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0209ah4._.js +6 -6
- package/.next/server/chunks/[root-of-the-server]__04wldw9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0h_x6q6._.js +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0cfszwn._.js → [root-of-the-server]__0i23tc1._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nr-v8s._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1tg5got._.js → [root-of-the-server]__0paqm5y._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0qog7sm._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__0sm5xvm._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0yisc5v._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1-swlkw._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__12iddfq._.js +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0npn_pn._.js → [root-of-the-server]__15p29m3._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__17ses32._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__18-2tsq._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1cjxw0-._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1gi2nns._.js +5 -0
- package/.next/server/chunks/{[root-of-the-server]__0rqgb17._.js → [root-of-the-server]__1iauz8a._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1k3j52n._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__209k6pk._.js → [root-of-the-server]__1lb_pxg._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1orn-5b._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1xqsrqq._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__2163i40._.js +5 -0
- package/.next/server/chunks/_0ci0abh._.js +3 -0
- package/.next/server/chunks/_0eauz4t._.js +1 -1
- package/.next/server/chunks/_0f6ts7z._.js +1 -1
- package/.next/server/chunks/_0fg-1oj._.js +5 -0
- package/.next/server/chunks/_0khihjk._.js +2 -2
- package/.next/server/chunks/_0n74zsf._.js +1 -1
- package/.next/server/chunks/_0na2fj1._.js +2 -2
- package/.next/server/chunks/_0oh_99-._.js +3 -0
- package/.next/server/chunks/_0x-ej3f._.js +24 -24
- package/.next/server/chunks/_0z3nz21._.js +3 -0
- package/.next/server/chunks/_10tkr26._.js +1 -1
- package/.next/server/chunks/_12-amdu._.js +2 -2
- package/.next/server/chunks/_136j09a._.js +1 -1
- package/.next/server/chunks/_15740dw._.js +1 -1
- package/.next/server/chunks/_18izeh1._.js +5 -0
- package/.next/server/chunks/_1_5mnq4._.js +1 -1
- package/.next/server/chunks/_1ajbhv6._.js +2 -2
- package/.next/server/chunks/_1dc_d1q._.js +2 -2
- package/.next/server/chunks/_1drgfx4._.js +1 -1
- package/.next/server/chunks/_1e48czp._.js +2 -2
- package/.next/server/chunks/_1f06zo4._.js +3 -0
- package/.next/server/chunks/_1ic3bew._.js +2 -2
- package/.next/server/chunks/_1jn-aep._.js +2 -2
- package/.next/server/chunks/_1jn5btd._.js +6 -0
- package/.next/server/chunks/_1kg70wc._.js +2 -2
- package/.next/server/chunks/_1m2i5pt._.js +5 -0
- package/.next/server/chunks/_1ogqovh._.js +4 -4
- package/.next/server/chunks/_1qxheoa._.js +1 -1
- package/.next/server/chunks/_1ry6afh._.js +18 -0
- package/.next/server/chunks/_1taa4bs._.js +1 -1
- package/.next/server/chunks/_1tpr507._.js +1 -1
- package/.next/server/chunks/_1y8w80a._.js +1 -1
- package/.next/server/chunks/_1zxp-p6._.js +1 -1
- package/.next/server/chunks/_204744f._.js +5 -0
- package/.next/server/chunks/_20fsr_z._.js +1 -1
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/features_0-cnt0l._.js +1 -1
- package/.next/server/chunks/features_0hdaci0._.js +1 -1
- package/.next/server/chunks/features_0p85gv6._.js +3 -0
- package/.next/server/chunks/{node_modules_zod_v4_0_v5xf5._.js → node_modules_zod_v4_01bha1c._.js} +2 -2
- package/.next/server/chunks/{node_modules_zod_v4_0q9hvql._.js → node_modules_zod_v4_0b99z6a._.js} +2 -2
- package/.next/server/chunks/{node_modules_zod_v4_1jg8iwg._.js → node_modules_zod_v4_1zz6lo1._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__04upd5v._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0dxszdt._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0eezycw._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0hpp3nw._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0yngu44._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16z72ny._.js +6 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1u_ry86._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__1iwyp1e._.js → [root-of-the-server]__1unh_ew._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__20re7ya._.js +3 -0
- package/.next/server/chunks/ssr/_00pgq9d._.js +5 -0
- package/.next/server/chunks/ssr/_07ke63g._.js +3 -0
- package/.next/server/chunks/ssr/_0agcbk7._.js +3 -0
- package/.next/server/chunks/ssr/_0e-gw2_._.js +3 -0
- package/.next/server/chunks/ssr/{_0fbi6om._.js → _0f_om6y._.js} +3 -3
- package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
- package/.next/server/chunks/ssr/{_026qnc9._.js → _0gpn71k._.js} +3 -3
- package/.next/server/chunks/ssr/_0iizjr9._.js +3 -0
- package/.next/server/chunks/ssr/_0ixvzo6._.js +75 -0
- package/.next/server/chunks/ssr/_0kkdx7t._.js +3 -0
- package/.next/server/chunks/ssr/_0lufvw7._.js +118 -0
- package/.next/server/chunks/ssr/_0vi6ky6._.js +115 -0
- package/.next/server/chunks/ssr/{_10f-jib._.js → _0yhji3e._.js} +2 -2
- package/.next/server/chunks/ssr/_0z38nha._.js +3 -0
- package/.next/server/chunks/ssr/{_10mo72m._.js → _11nx2d4._.js} +2 -2
- package/.next/server/chunks/ssr/_12mijol._.js +2 -2
- package/.next/server/chunks/ssr/_150463c._.js +164 -0
- package/.next/server/chunks/ssr/{_0rmaf32._.js → _17d2ikl._.js} +2 -2
- package/.next/server/chunks/ssr/_19jez1a._.js +3 -0
- package/.next/server/chunks/ssr/_1blui1m._.js +3 -0
- package/.next/server/chunks/ssr/_1d423aj._.js +4 -4
- package/.next/server/chunks/ssr/_1kbk28w._.js +3 -0
- package/.next/server/chunks/ssr/_1kj_r9v._.js +3 -0
- package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
- package/.next/server/chunks/ssr/{_0u5xv6g._.js → _1myh7ss._.js} +2 -2
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1ou5sj0._.js +3 -0
- package/.next/server/chunks/ssr/_1p8xorg._.js +3 -0
- package/.next/server/chunks/ssr/_1tzacpl._.js +3 -0
- package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
- package/.next/server/chunks/ssr/_1yh5bj5._.js +1 -1
- package/.next/server/chunks/ssr/{_02c7o30._.js → _2021n9-._.js} +2 -2
- package/.next/server/chunks/ssr/_20argo3._.js +3 -0
- package/.next/server/chunks/ssr/features_bot_1ll3wp7._.js +3 -0
- package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_thread_query_ts_023eklt._.js +1 -1
- package/.next/server/chunks/ssr/features_config_1qxe5ur._.js +20 -0
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +3 -3
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_workspace_00jz2hu._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ky76fz._.js → node_modules_06e0wlv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0-x0zxm._.js → node_modules_0cj26-9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0operbz._.js → node_modules_0d1rf5e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0b0iy01._.js → node_modules_0e86703._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_05b6e99._.js → node_modules_0es09am._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1iau_ea._.js → node_modules_0gr_dzf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1hv-j1l._.js → node_modules_0gtcwz9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1c2ikr9._.js → node_modules_0hi9h8f._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01u4ea3._.js → node_modules_0lkop0t._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wvf3oo._.js → node_modules_0nghisk._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0yzmxfq._.js → node_modules_0stovz0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_00nrzz_._.js → node_modules_0we85kr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01ed0yi._.js → node_modules_0ya7y1s._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0m3_5ge._.js → node_modules_0yrbwkj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0v_-uht._.js → node_modules_1-x70ie._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07jp6tj._.js → node_modules_12fd9g0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wgnj8q._.js → node_modules_12wxrgr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0azd56x._.js → node_modules_139uu4q._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1omg9xr._.js → node_modules_14gpoe1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ma_y68._.js → node_modules_18fmji6._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ucridu._.js → node_modules_19kkel8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0fpnetd._.js → node_modules_1gcine1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1z3sh11._.js → node_modules_1h4trkm._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0lautv3._.js → node_modules_1mub_qu._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ou0all._.js → node_modules_1p78svs._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_19b0bir._.js → node_modules_1xp-7ep._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0tmjn9w._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ay7_oi._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_e8c3o._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_182ydq_._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +69 -58
- package/.next/static/chunks/03df16hs01-xi.js +1 -0
- package/.next/static/chunks/0crocb7272z8k.js +1 -0
- package/.next/static/chunks/{0p9jcyqkpq71f.js → 0dqsenl3uk_8z.js} +1 -1
- package/.next/static/chunks/0hhn8mf953761.js +1 -0
- package/.next/static/chunks/0n1o3k0z4m7c_.js +1 -0
- package/.next/static/chunks/0oe2zavre2a7d.css +1 -0
- package/.next/static/chunks/0srg9tv4105-i.js +1 -0
- package/.next/static/chunks/0t599wrclly7i.js +18 -0
- package/.next/static/chunks/0x34bhth_sn35.js +1 -0
- package/.next/static/chunks/{0mscosx0eh3ee.js → 0x_6z8vt8hyf4.js} +3 -3
- package/.next/static/chunks/{0p50d-au6-3hx.js → 1_wstwzu1md-6.js} +2 -2
- package/.next/static/chunks/{40ij3wsn3vt7h.js → 1aughn81slf90.js} +1 -1
- package/.next/static/chunks/1g1j03h_l-e67.js +1 -0
- package/.next/static/chunks/1lp02y2nmddxg.js +1 -0
- package/.next/static/chunks/211s4xjtecj2l.js +1 -0
- package/.next/static/chunks/2244-cat2jlvd.js +1 -0
- package/.next/static/chunks/{2r6xnyg7ezyxr.js → 2eev_i93slion.js} +2 -2
- package/.next/static/chunks/2sjq4gsimlfqr.js +113 -0
- package/.next/static/chunks/{0qgn3u86jkbm7.js → 2uleilh8ph06-.js} +1 -1
- package/.next/static/chunks/{1czfknd4luo6t.js → 2zchsg03a1pdp.js} +1 -1
- package/.next/static/chunks/32tmfirfjpulv.js +1 -0
- package/.next/static/chunks/{2_c7mu6x1lu49.js → 376-s_i83irs-.js} +1 -1
- package/.next/static/chunks/3blk-kpn39xr-.js +1 -0
- package/.next/static/chunks/3eieehp7wquyu.js +1 -0
- package/.next/static/chunks/3kc-e7pcj50ae.js +1 -0
- package/.next/static/chunks/3rwpyuo9nrrop.js +17 -0
- package/.next/static/chunks/3sf4l25l353ja.js +1 -0
- package/.next/static/chunks/3vz7m1w688juj.js +3 -0
- package/.next/static/chunks/43skgt0h9woyu.js +1 -0
- package/app/api/events/app-event.client.ts +8 -2
- package/app/api/events/app-event.server.ts +7 -5
- package/app/api/events/app-event.ts +19 -8
- package/app/api/query-key.ts +13 -5
- package/bin/database.mjs +21 -11
- package/bin/thursday.mjs +5 -2
- package/components/ui/shiny-text.tsx +2 -2
- package/database/migrations/20260920024909_messy_baron_strucker/migration.sql +1 -0
- package/database/migrations/20260920024909_messy_baron_strucker/snapshot.json +1937 -0
- package/features/artifact/components/artifact-setting.tsx +18 -24
- package/features/bot/bot.action.ts +3 -0
- package/features/bot/bot.runner.ts +25 -3
- package/features/bot/bot.seed.ts +98 -22
- package/features/bot/components/bot-badge.tsx +2 -2
- package/features/bot/components/bot-mark.tsx +12 -3
- package/features/bot/components/bot-room.tsx +33 -10
- package/features/bot/components/bot-setting.tsx +88 -34
- package/features/bot/components/crew-motion.ts +161 -0
- package/features/bot/components/mark-palette.tsx +3 -3
- package/features/bot/components/room-conversation.tsx +13 -8
- package/features/bot/components/room-list.tsx +9 -5
- package/features/bot/components/room-pill.tsx +131 -41
- package/features/bot/components/thread-badge.tsx +4 -4
- package/features/bot/components/thread-setting.tsx +58 -19
- package/features/bot/mark.const.ts +24 -0
- package/features/bot/thread.query.ts +32 -14
- package/features/bot/thread.store.ts +19 -16
- package/features/config/components/config-badge.tsx +2 -2
- package/features/config/components/config-setting.tsx +63 -213
- package/features/config/config.const.ts +2 -1
- package/features/connectors/components/mcp-setting.tsx +60 -29
- package/features/intro/components/intro.tsx +2 -2
- package/features/memory/components/memory-setting.tsx +11 -7
- package/features/reach/channel.ts +9 -1
- package/features/reach/components/reach-guide.tsx +606 -105
- package/features/reach/discord.ts +18 -3
- package/features/reach/reach.schema.ts +6 -0
- package/features/reach/reach.ts +55 -2
- package/features/reach/slack.ts +2 -1
- package/features/reach/telegram.ts +5 -1
- package/features/routine/components/routine-setting.tsx +46 -18
- package/features/settings/components/setting-ui.tsx +17 -68
- package/features/settings/components/settings.tsx +4 -3
- package/features/settings/settings.alert.ts +8 -8
- package/features/skills/components/skills-setting.tsx +78 -12
- package/features/skills/skills.action.ts +12 -0
- package/features/skills/skills.query.ts +24 -0
- package/features/thursday/components/call-log.tsx +19 -14
- package/features/thursday/components/side-captions.tsx +3 -2
- package/features/thursday/components/thursday-setting.tsx +5 -6
- package/features/thursday/components/thursday.tsx +8 -9
- package/features/thursday/components/write-line.tsx +10 -5
- package/features/thursday/thursday.action.ts +4 -0
- package/features/thursday/thursday.query.ts +3 -2
- package/features/thursday/thursday.schema.ts +5 -0
- package/features/thursday/use-call-ring.ts +6 -1
- package/features/thursday/use-text-call.ts +25 -10
- package/features/thursday/use-thursday.ts +10 -1
- package/features/workspace/components/artifact-view.tsx +42 -33
- package/features/workspace/components/file-thumb.tsx +8 -4
- package/features/workspace/components/file-view.tsx +25 -2
- package/features/workspace/components/workspace-setting.tsx +27 -23
- package/features/workspace/workspace.query.ts +20 -1
- package/features/workspace/workspace.ts +14 -0
- package/guide/bots.md +27 -4
- package/guide/calls.md +5 -3
- package/guide/phone.md +23 -12
- package/guide/setup.md +20 -5
- package/guide/trouble.md +1 -1
- package/hooks/use-theme.ts +14 -0
- package/lib/protocol/events.client.ts +56 -14
- package/lib/protocol/events.server.ts +41 -12
- package/lib/utils.ts +1 -1
- package/package.json +1 -1
- package/scripts/reach-channels.test.mts +15 -2
- package/seed-skills/brief/daily-brief/SKILL.md +39 -0
- package/seed-skills/brief/daily-brief/page/brief.css +406 -0
- package/seed-skills/brief/daily-brief/references/brief.md +106 -0
- package/seed-skills/brief/daily-brief/references/preferences.md +67 -0
- package/seed-skills/brief/daily-brief/scripts/glance.mjs +128 -0
- package/seed-skills/brief/daily-brief/scripts/lib.mjs +182 -0
- package/seed-skills/brief/daily-brief/scripts/news.mjs +320 -0
- package/seed-skills/brief/daily-brief/scripts/page.mjs +322 -0
- package/seed-skills/brief/daily-brief/scripts/story.mjs +265 -0
- package/seed-skills/digest/README.md +20 -0
- package/seed-skills/digest/media-digest/SKILL.md +32 -0
- package/seed-skills/digest/media-digest/references/no-captions.md +20 -0
- package/seed-skills/digest/media-digest/references/page.md +56 -0
- package/seed-skills/digest/media-digest/references/reading.md +56 -0
- package/seed-skills/digest/media-digest/scripts/audio.mjs +232 -0
- package/seed-skills/digest/media-digest/scripts/digest.mjs +379 -0
- package/seed-skills/digest/media-digest/scripts/lib.mjs +284 -0
- package/seed-skills/digest/media-digest/scripts/part.mjs +16 -0
- package/seed-skills/digest/media-digest/scripts/text.mjs +287 -0
- package/seed-skills/digest/media-digest/scripts/yt.mjs +487 -0
- package/seed-skills/docs/README.md +32 -0
- package/seed-skills/docs/documents/SKILL.md +34 -0
- package/seed-skills/docs/documents/kit/package-lock.json +1596 -0
- package/seed-skills/docs/documents/kit/package.json +17 -0
- package/seed-skills/docs/documents/references/deck.md +63 -0
- package/seed-skills/docs/documents/references/invoice.md +64 -0
- package/seed-skills/docs/documents/references/pdf.md +59 -0
- package/seed-skills/docs/documents/references/print.md +43 -0
- package/seed-skills/docs/documents/references/sheets.md +49 -0
- package/seed-skills/docs/documents/references/translate.md +37 -0
- package/seed-skills/docs/documents/references/word.md +45 -0
- package/seed-skills/docs/documents/scripts/doc.mjs +123 -0
- package/seed-skills/docs/documents/scripts/lib/browser.mjs +259 -0
- package/seed-skills/docs/documents/scripts/lib/deck-chart.mjs +150 -0
- package/seed-skills/docs/documents/scripts/lib/deck.mjs +1132 -0
- package/seed-skills/docs/documents/scripts/lib/invoice.mjs +505 -0
- package/seed-skills/docs/documents/scripts/lib/kit.mjs +244 -0
- package/seed-skills/docs/documents/scripts/lib/pdf.mjs +645 -0
- package/seed-skills/docs/documents/scripts/lib/report.mjs +38 -0
- package/seed-skills/docs/documents/scripts/lib/sheet.mjs +523 -0
- package/seed-skills/docs/documents/scripts/lib/templates.mjs +34 -0
- package/seed-skills/docs/documents/scripts/lib/translate.mjs +691 -0
- package/seed-skills/docs/documents/scripts/lib/word.mjs +678 -0
- package/seed-skills/docs/documents/templates/letter.html +56 -0
- package/seed-skills/docs/documents/templates/print.css +219 -0
- package/seed-skills/docs/documents/templates/report.html +47 -0
- package/seed-skills/docs/documents/templates/resume.html +61 -0
- package/seed-skills/insta/instagram/references/post.md +31 -7
- package/seed-skills/trip/README.md +11 -0
- package/seed-skills/trip/travel/SKILL.md +40 -0
- package/seed-skills/trip/travel/page/itinerary.css +488 -0
- package/seed-skills/trip/travel/references/itinerary.md +70 -0
- package/seed-skills/trip/travel/references/plan.md +75 -0
- package/seed-skills/trip/travel/references/watch-and-book.md +39 -0
- package/seed-skills/trip/travel/scripts/flights.mjs +374 -0
- package/seed-skills/trip/travel/scripts/fx.mjs +57 -0
- package/seed-skills/trip/travel/scripts/hotels.mjs +356 -0
- package/seed-skills/trip/travel/scripts/itinerary.mjs +482 -0
- package/seed-skills/trip/travel/scripts/lib.mjs +120 -0
- package/seed-skills/trip/travel/scripts/selectors.mjs +78 -0
- package/seed-skills/trip/travel/scripts/watch.mjs +147 -0
- package/seed-skills/trip/travel/scripts/weather.mjs +150 -0
- package/seed-skills/tutor/picture-book/SKILL.md +6 -0
- package/seed-skills/tutor/picture-book/references/picture-book.md +22 -2
- package/.next/server/chunks/[root-of-the-server]__014ydvq._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__01d285y._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +0 -7
- package/.next/server/chunks/[root-of-the-server]__0ayldfn._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__17weeeg._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1ai5lme._.js +0 -8
- package/.next/server/chunks/_05v8k21._.js +0 -7
- package/.next/server/chunks/_0k6qjcf._.js +0 -5
- package/.next/server/chunks/_1d_enhu._.js +0 -3
- package/.next/server/chunks/_1jc5g4p._.js +0 -6
- package/.next/server/chunks/_1nfr-75._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0md6j0x._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_14ih1vy._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1d6ez5-._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0a967km._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +0 -68
- package/.next/server/chunks/ssr/[root-of-the-server]__1756892._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1nqw56a._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1r77-88._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1w9hqq8._.js +0 -8
- package/.next/server/chunks/ssr/_05pl_u8._.js +0 -3
- package/.next/server/chunks/ssr/_097-ljd._.js +0 -4
- package/.next/server/chunks/ssr/_0euzzf8._.js +0 -3
- package/.next/server/chunks/ssr/_0evkpto._.js +0 -3
- package/.next/server/chunks/ssr/_0igfcax._.js +0 -20
- package/.next/server/chunks/ssr/_0lu1n_x._.js +0 -3
- package/.next/server/chunks/ssr/_0nvh1h9._.js +0 -3
- package/.next/server/chunks/ssr/_0qmpw35._.js +0 -3
- package/.next/server/chunks/ssr/_0uv-qs4._.js +0 -3
- package/.next/server/chunks/ssr/_132qkfz._.js +0 -5
- package/.next/server/chunks/ssr/_15zqt-t._.js +0 -3
- package/.next/server/chunks/ssr/_16gfxpn._.js +0 -3
- package/.next/server/chunks/ssr/_184327j._.js +0 -3
- package/.next/server/chunks/ssr/_18ujhhq._.js +0 -3
- package/.next/server/chunks/ssr/_1lx6w_o._.js +0 -67
- package/.next/server/chunks/ssr/_1ntpny5._.js +0 -3
- package/.next/server/chunks/ssr/_1o1g4uk._.js +0 -5
- package/.next/server/chunks/ssr/_1xx4zlb._.js +0 -3
- package/.next/server/chunks/ssr/_2008vmi._.js +0 -164
- package/.next/server/chunks/ssr/features_bot_1n1s7bh._.js +0 -3
- package/.next/static/chunks/09pkygbht7ki8.js +0 -18
- package/.next/static/chunks/0bm-nhblcmmj4.js +0 -17
- package/.next/static/chunks/0c_g4-11sha-1.js +0 -1
- package/.next/static/chunks/0hhza87hkbqaz.js +0 -1
- package/.next/static/chunks/0samf80yu2b17.js +0 -1
- package/.next/static/chunks/0vlgzqo9ka90v.js +0 -1
- package/.next/static/chunks/1g9yyvculuxj2.js +0 -1
- package/.next/static/chunks/1jz8n0mhtdzr8.js +0 -1
- package/.next/static/chunks/206laxm6maiz2.js +0 -1
- package/.next/static/chunks/23nfu5g4vl_m7.js +0 -1
- package/.next/static/chunks/2h-tlhb2ffhkk.js +0 -1
- package/.next/static/chunks/2i5_w8olnrvo0.js +0 -3
- package/.next/static/chunks/2m6jd3586ijb-.js +0 -1
- package/.next/static/chunks/2m8iqwc6sykln.js +0 -1
- package/.next/static/chunks/33fyp-byw48ju.js +0 -65
- package/.next/static/chunks/35yd_27d9ylra.js +0 -1
- package/.next/static/chunks/3ag1i3__yl94f.js +0 -1
- package/.next/static/chunks/3m_ejzg-xn21r.css +0 -1
- package/.next/static/chunks/3s-jpd3ky49-n.js +0 -1
- package/features/reach/components/reach-state.tsx +0 -71
- /package/.next/static/{QSe0rTdXU5kh5BBzr2XBB → fiNGsQfna8qldl8wU8wqr}/_buildManifest.js +0 -0
- /package/.next/static/{QSe0rTdXU5kh5BBzr2XBB → fiNGsQfna8qldl8wU8wqr}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{QSe0rTdXU5kh5BBzr2XBB → fiNGsQfna8qldl8wU8wqr}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,805995,80197,e=>{"use strict";var t,n=e.i(843476),s=e.i(493801),r=e.i(375775),i=e.i(456420);let o={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};o.node;let a=(0,i.default)(o),l={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};l.node;let d=(0,i.default)(l);var c=e.i(689664),u=e.i(867927);let h={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};h.node;let f=(0,i.default)(h);var m=e.i(560972),m=m,g=e.i(815170),x=e.i(758925),p=e.i(566595),y=e.i(466787),k=e.i(271645),v=e.i(798120),j=e.i(167881),b=e.i(23750),w=e.i(917162),N=e.i(59377),S=e.i(818125),A=e.i(671428),C=e.i(412294),M=e.i(146538),z=e.i(968978),E=e.i(265402),F=e.i(635963),I=e.i(95187);let R=(0,I.createServerReference)("7f091d2a34368daec969e4d15414e1f06c28d35388",I.callServer,void 0,I.findSourceMapURL,"removeConfigAction");e.s(["removeConfigAction",0,R],80197);var P=e.i(725698),_=e.i(992112),K=e.i(508734),T=e.i(482022),B=((t=B||{})[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t);let $=[1,0],O=[2,3],L=[3,2],q={L:[0,1],M:$,Q:O,H:L},D=/^\d*$/,H=/^[A-Z0-9 $%*+./:-]*$/,G="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",U=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],W=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class Y{constructor(e,t,n,s){if(this.version=e,this.ecc=t,e<1||e>40)throw RangeError("Version value out of range");if(s<-1||s>7)throw RangeError("Mask value out of range");this.size=4*e+17;const r=Array.from({length:this.size}).fill(!1);for(let e=0;e<this.size;e++)this.modules.push(r.slice()),this.types.push(r.map(()=>0));this.drawFunctionPatterns();const i=this.addEccAndInterleave(n);if(this.drawCodewords(i),-1===s){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(s=t,e=n),this.applyMask(t)}}this.mask=s,this.applyMask(s),this.drawFormatBits(s)}size;mask;modules=[];types=[];getModule(e,t){return e>=0&&e<this.size&&t>=0&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0,B.Timing),this.setFunctionModule(e,6,e%2==0,B.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let s=0;s<t;s++)(0!==n||0!==s)&&(0!==n||s!==t-1)&&(n!==t-1||0!==s)&&this.drawAlignmentPattern(e[n],e[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.ecc[1]<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let s=(t<<10|n)^21522;for(let e=0;e<=5;e++)this.setFunctionModule(8,e,Q(s,e));this.setFunctionModule(8,7,Q(s,6)),this.setFunctionModule(8,8,Q(s,7)),this.setFunctionModule(7,8,Q(s,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,Q(s,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,Q(s,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,Q(s,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;for(let e=0;e<18;e++){let n=Q(t,e),s=this.size-11+e%3,r=Math.floor(e/3);this.setFunctionModule(s,r,n),this.setFunctionModule(r,s,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let s=-4;s<=4;s++){let r=Math.max(Math.abs(s),Math.abs(n)),i=e+s,o=t+n;i>=0&&i<this.size&&o>=0&&o<this.size&&this.setFunctionModule(i,o,2!==r&&4!==r,B.Position)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let s=-2;s<=2;s++)this.setFunctionModule(e+s,t+n,1!==Math.max(Math.abs(s),Math.abs(n)),B.Alignment)}setFunctionModule(e,t,n,s=B.Function){this.modules[t][e]=n,this.types[t][e]=s}addEccAndInterleave(e){let t=this.version,n=this.ecc;if(e.length!==er(t,n))throw RangeError("Invalid argument");let s=W[n[0]][t],r=U[n[0]][t],i=Math.floor(es(t)/8),o=s-i%s,a=Math.floor(i/s),l=[],d=function(e){if(e<1||e>255)throw RangeError("Degree out of range");let t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let n=1;for(let s=0;s<e;s++){for(let e=0;e<t.length;e++)t[e]=ei(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=ei(n,2)}return t}(r);for(let t=0,n=0;t<s;t++){let s=e.slice(n,n+a-r+(t<o?0:1));n+=s.length;let i=function(e,t){let n=t.map(e=>0);for(let s of e){let e=s^n.shift();n.push(0),t.forEach((t,s)=>n[s]^=ei(t,e))}return n}(s,d);t<o&&s.push(0),l.push(s.concat(i))}let c=[];for(let e=0;e<l[0].length;e++)l.forEach((t,n)=>{(e!==a-r||n>=o)&&c.push(t[e])});return c}drawCodewords(e){if(e.length!==Math.floor(es(this.version)/8))throw RangeError("Invalid argument");let t=0;for(let n=this.size-1;n>=1;n-=2){6===n&&(n=5);for(let s=0;s<this.size;s++)for(let r=0;r<2;r++){let i=n-r,o=(n+1&2)==0?this.size-1-s:s;!this.types[o][i]&&t<8*e.length&&(this.modules[o][i]=Q(e[t>>>3],7-(7&t)),t++)}}}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let s;switch(e){case 0:s=(n+t)%2==0;break;case 1:s=t%2==0;break;case 2:s=n%3==0;break;case 3:s=(n+t)%3==0;break;case 4:s=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:s=n*t%2+n*t%3==0;break;case 6:s=(n*t%2+n*t%3)%2==0;break;case 7:s=((n+t)%2+n*t%3)%2==0;break;default:throw Error("Unreachable")}!this.types[t][n]&&s&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let t=0;t<this.size;t++){let n=!1,s=0,r=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[t][i]===n?5==++s?e+=3:s>5&&e++:(this.finderPenaltyAddHistory(s,r),n||(e+=40*this.finderPenaltyCountPatterns(r)),n=this.modules[t][i],s=1);e+=40*this.finderPenaltyTerminateAndCount(n,s,r)}for(let t=0;t<this.size;t++){let n=!1,s=0,r=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[i][t]===n?5==++s?e+=3:s>5&&e++:(this.finderPenaltyAddHistory(s,r),n||(e+=40*this.finderPenaltyCountPatterns(r)),n=this.modules[i][t],s=1);e+=40*this.finderPenaltyTerminateAndCount(n,s,r)}for(let t=0;t<this.size-1;t++)for(let n=0;n<this.size-1;n++){let s=this.modules[t][n];s===this.modules[t][n+1]&&s===this.modules[t+1][n]&&s===this.modules[t+1][n+1]&&(e+=3)}let t=0;for(let e of this.modules)t=e.reduce((e,t)=>e+ +!!t,t);let n=this.size*this.size;return e+(Math.ceil(Math.abs(20*t-10*n)/n)-1)*10}getAlignmentPatternPositions(){if(1===this.version)return[];{let e=Math.floor(this.version/7)+2,t=32===this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),n=[6];for(let s=this.size-7;n.length<e;s-=t)n.splice(1,0,s);return n}}finderPenaltyCountPatterns(e){let t=e[1],n=t>0&&e[2]===t&&e[3]===3*t&&e[4]===t&&e[5]===t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0===t[0]&&(e+=this.size),t.pop(),t.unshift(e)}}function V(e,t,n){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function Q(e,t){return(e>>>t&1)!=0}class X{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}let Z=[1,10,12,14],J=[2,9,11,13],ee=[4,8,16,16];function et(e,t){return e[Math.floor((t+7)/17)+1]}function en(e){let t=[];for(let n of e)V(n,8,t);return new X(ee,e.length,t)}function es(e){if(e<1||e>40)throw RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function er(e,t){return Math.floor(es(e)/8)-U[t[0]][e]*W[t[0]][e]}function ei(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^(n>>>7)*285^(t>>>s&1)*e;return n}var eo=e.i(511769),ea=e.i(660302),el=e.i(895836),ed=e.i(609856),ec=e.i(283653),eu=e.i(647163);let eh=(0,I.createServerReference)("7fed7242c8d057df8fc5914b34a095ee3ea542e6aa",I.callServer,void 0,I.findSourceMapURL,"forgetReachAction");var ef=e.i(36174);let em={telegram:"telegram.org",discord:"discord.com",slack:"slack.com"},eg=`display_information:
|
|
2
|
+
name: Thursday
|
|
3
|
+
features:
|
|
4
|
+
app_home:
|
|
5
|
+
messages_tab_enabled: true
|
|
6
|
+
messages_tab_read_only_enabled: false
|
|
7
|
+
bot_user:
|
|
8
|
+
display_name: Thursday
|
|
9
|
+
oauth_config:
|
|
10
|
+
scopes:
|
|
11
|
+
bot: [chat:write, im:history, im:read, users:read, files:read, files:write]
|
|
12
|
+
settings:
|
|
13
|
+
event_subscriptions:
|
|
14
|
+
bot_events: [message.im]
|
|
15
|
+
interactivity:
|
|
16
|
+
is_enabled: true
|
|
17
|
+
socket_mode_enabled: true
|
|
18
|
+
`,ex=({children:e})=>(0,n.jsx)("span",{className:"font-medium text-foreground",children:e}),ep={telegram:[{body:(0,n.jsxs)(n.Fragment,{children:["In Telegram, write to ",(0,n.jsx)(ex,{children:"@BotFather"}),", send ",(0,n.jsx)(ex,{children:"/newbot"})," and pick a name. It answers with a ",(0,n.jsx)(ex,{children:"token"}),"."]}),slot:{open:"https://t.me/BotFather",label:"Open @BotFather"}},{body:(0,n.jsx)(n.Fragment,{children:"Paste the token here."}),slot:{key:ef.TELEGRAM_TOKEN_KEY,looks:"123456789:AAE…"}},{body:(0,n.jsx)(n.Fragment,{children:"From your phone, write anything to your bot."}),slot:{says:"Point your phone's camera at it to open the chat."}},{body:(0,n.jsxs)(n.Fragment,{children:["A question appears on this computer. Press ",(0,n.jsx)(ex,{children:"Allow"}),"."]})}],discord:[{body:(0,n.jsxs)(n.Fragment,{children:["At ",(0,n.jsx)(ex,{children:"discord.com/developers"}),", make a ",(0,n.jsx)(ex,{children:"New Application"}),". On its ",(0,n.jsx)(ex,{children:"Bot"})," page press ",(0,n.jsx)(ex,{children:"Reset Token"})," and copy it."]}),slot:{open:"https://discord.com/developers/applications",label:"Open discord.com/developers"}},{body:(0,n.jsx)(n.Fragment,{children:"Paste the token here."}),slot:{key:ef.DISCORD_TOKEN_KEY,looks:"MTE…"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Add the bot to a server of your own"})," — Discord only delivers a message to a bot you share a server with. A private server made for this is fine."]}),slot:{says:"Point your phone's camera at it, or open it here. It asks which server, and adds the bot with no permissions in it.",does:"Add the bot to a server"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Send the bot a direct message"})," (not in the server), then press"," ",(0,n.jsx)(ex,{children:"Allow"})," here."]})}],slack:[{body:(0,n.jsxs)(n.Fragment,{children:["At ",(0,n.jsx)(({href:e,children:t})=>(0,n.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"font-medium text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:t}),{href:"https://api.slack.com/apps",children:"api.slack.com/apps"}),","," ",(0,n.jsx)(ex,{children:"Create New App › From a manifest"}),", and paste the manifest."]}),slot:{manifest:!0}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Basic Information › App-Level Tokens"}),": generate one with"," ",(0,n.jsx)(ex,{children:"connections:write"}),". It starts with xapp-."]}),slot:{key:ef.SLACK_APP_TOKEN_KEY,looks:"xapp-…"}},{body:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ex,{children:"Install App"})," to your workspace. The Bot User OAuth Token starts with xoxb-."]}),slot:{key:ef.SLACK_BOT_TOKEN_KEY,looks:"xoxb-…"}},{body:(0,n.jsxs)(n.Fragment,{children:["In Slack, open the app under ",(0,n.jsx)(ex,{children:"Apps"})," and write in its"," ",(0,n.jsx)(ex,{children:"Messages"})," tab, then press ",(0,n.jsx)(ex,{children:"Allow"})," here."]})}]};function ey(){let e=(0,ec.useServerRoute)(v.queryKey.config),t=(0,ec.useServerRoute)(v.queryKey.reach);(0,eo.useAppEvent)({reach:()=>void(0,ec.revalidate)(v.queryKey.reach)});let s=t=>(0,_.isConfigSet)(e.data,t),r=e=>t.data?.channels.find(t=>t.name===e)??null,i=e=>!!r(e)?.allowed,o=ef.REACH_CHANNELS.find(e=>ef.REACH_KEYS[e].every(s)&&!i(e)),a=!ef.REACH_CHANNELS.some(i),[l,d]=(0,k.useState)(o??(a?ef.REACH_CHANNELS[0]:null));return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(el.SettingItems,{children:ef.REACH_CHANNELS.map(e=>(0,n.jsx)(ek,{name:e,status:r(e),tokensIn:ef.REACH_KEYS[e].filter(s).length,isSet:s,open:l===e,onOpen:()=>d(l===e?null:e)},e))}),(0,n.jsx)(el.SettingNote,{children:"Only the one person you allow can write, and only direct messages are read. For bots to work while no tab is open, switch on Work while the app is closed in Settings › Bots."})]})}function ek({name:e,status:t,tokensIn:s,isSet:r,open:i,onOpen:o}){var a;let l,d,c,h=ep[e],f=(a=!!t?.bot,d=(l=h.map(e=>e.slot&&"key"in e.slot?e.slot.key:null)).findIndex(e=>e&&!r(e)),c=l.reduce((e,t,n)=>t?n:e,-1),h.map((e,t)=>{let n=l[t];return n?r(n)?"done":t===d?"now":"later":d>=0?t<d?"flat":"later":t<c?"done":a?"now":"flat"})),m=!!t?.bot&&!t?.allowed;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("button",{type:"button",onClick:o,"aria-expanded":i,className:"flex w-full items-center gap-3 px-4 py-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsx)(S.SiteIcon,{host:em[e],className:"size-4 rounded-[4px]",fallback:(0,n.jsx)(x.KeyRound,{className:"size-4 text-muted-foreground"})}),(0,n.jsx)("span",{className:"text-sm font-medium",children:ef.REACH_LABEL[e]}),(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate",children:(0,n.jsx)(ev,{status:t,tokensIn:s,tokens:ef.REACH_KEYS[e].length})}),(0,n.jsx)(u.ChevronRight,{className:(0,eu.cn)("size-4 shrink-0 text-muted-foreground transition-transform",i&&"rotate-90")})]}),i&&(0,n.jsxs)("div",{className:"px-4 pt-1 pb-4",children:[(0,n.jsx)("ol",{className:"space-y-3",children:h.map((e,s)=>(0,n.jsx)(ej,{n:s+1,step:e,state:f[s],set:!!e.slot&&"key"in e.slot&&r(e.slot.key),link:t?.link??null,waiting:m&&s===h.length-1},s))}),t?.allowed&&(0,n.jsx)(eC,{name:e,who:t.allowed.name})]})]})}function ev({status:e,tokensIn:t,tokens:s}){let r="text-xs";return t<s?(0,n.jsx)("span",{className:(0,eu.cn)(r,"text-muted-foreground"),children:t?`${t} of ${s} tokens in`:"Not set"}):e?.allowed?(0,n.jsxs)("span",{className:(0,eu.cn)(r,"text-muted-foreground"),children:["Listening as ",e.bot,". ",e.allowed.name," is let in."]}):e?.problem&&!e.bot?(0,n.jsx)("span",{className:(0,eu.cn)(r,"text-destructive"),children:e.problem}):e?.bot?(0,n.jsx)(ea.ShinyText,{text:`Listening as ${e.bot} — waiting for your first message`,tone:"waiting",className:(0,eu.cn)(r,"align-middle")}):(0,n.jsx)(ea.ShinyText,{text:"Connecting…",className:(0,eu.cn)(r,"align-middle")})}function ej({n:e,step:t,state:s,set:r,link:i,waiting:o}){return(0,n.jsxs)("li",{className:"flex gap-3 text-[13px] leading-relaxed",children:[(0,n.jsx)(eb,{n:e,state:s}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-2.5",children:[(0,n.jsx)("p",{className:(0,eu.cn)("done"===s||"later"===s?"text-muted-foreground/60 **:text-inherit":"text-muted-foreground"),children:t.body}),(0,n.jsx)(ew,{slot:t.slot,state:s,set:r,link:i,waiting:o})]})]})}function eb({n:e,state:t}){return"done"===t?(0,n.jsx)("span",{className:"mt-0.5 grid size-5 shrink-0 place-items-center rounded-full bg-foreground text-background",children:(0,n.jsx)(c.Check,{className:"size-3"})}):(0,n.jsx)("span",{className:(0,eu.cn)("mt-0.5 grid size-5 shrink-0 place-items-center rounded-full bg-background font-mono text-[10.5px] ring-1","now"===t?(0,eu.cn)(eu.WAITING_INK,"ring-waiting/40"):"text-muted-foreground ring-border/60","later"===t&&"opacity-60"),children:e})}function ew({slot:e,state:t,set:s,link:r,waiting:i}){let o=i&&(0,n.jsx)(ea.ShinyText,{text:"Waiting for your first message…",tone:"waiting"});return"later"===t?null:e&&"key"in e?(0,n.jsx)(eS,{configKey:e.key,looks:e.looks,set:s}):"done"===t?null:e?"open"in e?(0,n.jsxs)(j.Button,{size:"sm",variant:"outline",render:(0,n.jsx)("a",{href:e.open,target:"_blank",rel:"noreferrer"}),children:[(0,n.jsx)(T.ExternalLink,{}),e.label]}):"manifest"in e?(0,n.jsx)(eA,{}):r?(0,n.jsxs)("div",{className:"space-y-2.5",children:[(0,n.jsx)(eN,{link:r,says:e.says,does:e.does}),o]}):o||null:o||null}function eN({link:e,says:t,does:s}){let{size:r,data:i}=function(e){let{ecc:t="L",boostEcc:n=!1,minVersion:s=1,maxVersion:r=40,maskPattern:i=-1,border:o=1}={},a="string"==typeof e?function(e){var t,n;if(""===e)return[];if(t=e,D.test(t))return[function(e){var t;if(t=e,!D.test(t))throw RangeError("String contains non-numeric characters");let n=[];for(let t=0;t<e.length;){let s=Math.min(e.length-t,3);V(Number.parseInt(e.substring(t,t+s),10),3*s+1,n),t+=s}return new X(Z,e.length,n)}(e)];return(n=e,H.test(n))?[function(e){var t;let n;if(t=e,!H.test(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let s=[];for(n=0;n+2<=e.length;n+=2){let t=45*G.indexOf(e.charAt(n));V(t+=G.indexOf(e.charAt(n+1)),11,s)}return n<e.length&&V(G.indexOf(e.charAt(n)),6,s),new X(J,e.length,s)}(e)]:[en(function(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!==e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}(e))]}(e):Array.isArray(e)?[en(e)]:void 0;if(!a)throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let l=function(e,t,n=1,s=40,r=-1,i=!0){let o,a;if(!(1<=n&&n<=s&&s<=40)||r<-1||r>7)throw RangeError("Invalid value");for(o=n;;o++){let n=8*er(o,t),r=function(e,t){let n=0;for(let s of e){let e=et(s.mode,t);if(s.numChars>=1<<e)return 1/0;n+=4+e+s.bitData.length}return n}(e,o);if(r<=n){a=r;break}if(o>=s)throw RangeError("Data too long")}for(let e of[$,O,L])i&&a<=8*er(o,e)&&(t=e);let l=[];for(let t of e)for(let e of(V(t.mode[0],4,l),V(t.numChars,et(t.mode,o),l),t.getData()))l.push(e);let d=8*er(o,t);V(0,Math.min(4,d-l.length),l),V(0,(8-l.length%8)%8,l);for(let e=236;l.length<d;e^=253)V(e,8,l);let c=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((e,t)=>c[t>>>3]|=e<<7-(7&t)),new Y(o,t,c,r)}(a,q[t],s,r,i,n);return function(e,t=1){if(!t)return e;let{size:n}=e,s=n+2*t;e.size=s,e.data.forEach(e=>{for(let n=0;n<t;n++)e.unshift(!1),e.push(!1)});for(let n=0;n<t;n++)e.data.unshift(Array.from({length:s},e=>!1)),e.data.push(Array.from({length:s},e=>!1));let r=B.Border;e.types.forEach(e=>{for(let n=0;n<t;n++)e.unshift(r),e.push(r)});for(let n=0;n<t;n++)e.types.unshift(Array.from({length:s},e=>r)),e.types.push(Array.from({length:s},e=>r));return e}({version:l.version,maskPattern:l.mask,size:l.size,data:l.modules,types:l.types},o)}(e),o=e.replace(/^https:\/\//,"");return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,n.jsx)("div",{className:"rounded-lg bg-white p-2.5",children:(0,n.jsx)("svg",{viewBox:`0 0 ${r} ${r}`,className:"block size-31 text-black",role:"img","aria-label":`A picture of ${o} for a phone camera`,children:i.flatMap((e,t)=>e.map((e,s)=>e?(0,n.jsx)("rect",{x:s,y:t,width:1,height:1,fill:"currentColor"},`${s}-${t}`):null))})}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-muted-foreground",children:t}),(0,n.jsxs)(j.Button,{size:"sm",variant:"outline",render:(0,n.jsx)("a",{href:e,target:"_blank",rel:"noreferrer"}),children:[(0,n.jsx)(T.ExternalLink,{}),s??o]})]})]})}function eS({configKey:e,looks:t,set:s}){let[r,i]=(0,k.useState)(""),[o,a]=(0,k.useState)(!1),l=()=>{i(""),a(!1),(0,ec.revalidate)(v.queryKey.config),(0,ec.revalidate)(v.queryKey.reach)},[d,c]=(0,ed.useServerAction)(P.setConfigAction,{onOk:l}),[u,h]=(0,ed.useServerAction)(R,{onOk:l});return s&&!o?(0,n.jsx)(j.Button,{size:"xs",variant:"ghost",onClick:()=>a(!0),className:"-ml-2 text-muted-foreground",children:"Change the token"}):(0,n.jsxs)("form",{className:"flex flex-wrap items-center gap-2",onSubmit:t=>{t.preventDefault(),d(e,r).catch(()=>{})},children:[(0,n.jsx)(b.Input,{value:r,onChange:e=>i(e.target.value),placeholder:t,"aria-label":"Token",autoComplete:"off",spellCheck:!1,className:"w-72 font-mono"}),(0,n.jsx)(j.Button,{type:"submit",size:"sm",loading:c,disabled:r.trim().length<8,children:s?"Replace":"Save"}),s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.Button,{size:"sm",variant:"ghost",onClick:()=>a(!1),children:"Cancel"}),(0,n.jsx)(j.Button,{size:"sm",variant:"ghost",loading:h,onClick:()=>void u(e).catch(()=>{}),className:"ml-auto text-destructive hover:text-destructive",children:"Remove"})]})]})}function eA(){let[e,t]=(0,k.useState)(!1);return(0,n.jsxs)(j.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(eg).then(()=>{t(!0),setTimeout(()=>t(!1),2e3)}),children:[e?(0,n.jsx)(c.Check,{}):(0,n.jsx)(K.Copy,{}),e?"Copied":"Copy the manifest"]})}function eC({name:e,who:t}){let[s,r]=(0,ed.useServerAction)(eh,{onOk:()=>(0,ec.revalidate)(v.queryKey.reach)});return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-3 pl-8 text-[13px] text-muted-foreground",children:[(0,n.jsxs)("span",{children:[t," can write from a phone."]}),(0,n.jsx)(j.Button,{size:"sm",variant:"outline",loading:r,onClick:()=>void s(e).catch(()=>{}),children:"Let them go"})]})}let eM={[_.EXA_API_KEY]:p.Search},ez={image:g.Image,video:f,speech:a,transcription:d},eE={keys:["voice","easy","text","search"],models:["bots","studio"]};function eF({screen:e}){let{data:t,isLoading:s,error:r}=(0,ec.useServerRoute)(v.queryKey.config);if(s)return(0,n.jsx)(el.SettingSkeleton,{rows:4});if(r)return(0,n.jsx)(el.SettingError,{message:r.message});let i=e=>(0,_.isConfigSet)(t,e),o=eE[e].flatMap(e=>_.CONFIG_GROUPS.find(t=>t.id===e)??[]),a=o.filter(e=>"keys"===e.section).flatMap(e=>e.entries);return(0,n.jsx)(el.SettingScreen,{footer:(0,n.jsx)(el.SettingRailNote,{children:"models"===e?"Her own voice and backend models are in Thursday. A bot can pick its own on its page.":`${a.filter(e=>i(e.key)).length} of ${a.length} set${o.some(e=>!(0,_.groupSatisfied)(e,i))?" · a call needs one voice key":" · your keys stay on this machine"}`}),children:o.map(e=>(0,n.jsx)(el.SettingGroup,{label:e.title,hint:e.hint,right:(0,n.jsx)(eR,{group:e,isSet:i}),children:"easy"===e.id?(0,n.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:e.entries.map(e=>(0,n.jsx)(eP,{card:!0,entry:e,set:i(e.key),needed:!1},e.key))}):"text"===e.id?(0,n.jsx)("div",{className:"flex flex-wrap gap-x-1.5 gap-y-3.5",children:e.entries.map(e=>(0,n.jsx)(eI,{entry:e,set:i(e.key)},e.key))}):(0,n.jsx)(el.SettingItems,{children:e.entries.map(s=>{let r;return s.choices?(0,n.jsx)(eD,{entry:s,choices:s.choices,value:(r=s.key,t?.find(e=>e.key===r)?.value),isSet:i},s.key):(0,n.jsx)(eP,{entry:s,set:i(s.key),needed:!(0,_.groupSatisfied)(e,i)},s.key)})})},e.id))})}function eI({entry:e,set:t}){return(0,n.jsxs)("button",{type:"button",onClick:()=>eG(e,t),"aria-label":`${e.label}: ${t?"set":"not set"}`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsxs)("span",{className:"relative grid size-10.5 place-items-center rounded-[13px] bg-muted/60 transition-colors group-hover:bg-muted",children:[(0,n.jsx)(eq,{entry:e}),t&&(0,n.jsx)("span",{className:"absolute -top-1 -right-1 grid size-4 place-items-center rounded-full bg-primary text-primary-foreground ring-2 ring-background",children:(0,n.jsx)(c.Check,{className:"size-2.5"})})]}),(0,n.jsx)("span",{className:(0,eu.cn)("max-w-full truncate text-[11px]",t?"text-foreground":"text-muted-foreground"),children:e.label})]})}function eR({group:e,isSet:t}){return"none"===e.require?null:(0,_.groupSatisfied)(e,t)?(0,n.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,n.jsx)(c.Check,{className:"size-3"}),"ready"]}):(0,n.jsxs)("span",{className:(0,eu.cn)("flex items-center gap-1 font-mono text-[11px]",eu.WAITING_INK),children:[(0,n.jsx)(y.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function eP({entry:e,set:t,needed:s,card:r=!1,narrow:i=!1}){let o=eT(e,t),a=e$(e,t),l=eB(e,t),d=a.data?eO(a.data):eK(t,s,o.data,e.signIn),h=o.isLoading||a.isLoading,f=(0,n.jsxs)("span",{className:(0,eu.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",d.ink),children:[d.warn?(0,n.jsx)(y.TriangleAlert,{className:"size-3"}):t&&(0,n.jsx)(c.Check,{className:"size-3"}),d.text]});return(0,n.jsxs)("button",{type:"button",onClick:()=>{var s;return e.signIn?(s=e,w.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,n.jsx)(eH,{entry:s,onDone:e})})):eG(e,t)},className:(0,eu.cn)("group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",r&&"rounded-xl border border-border/60"),children:[(0,n.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,n.jsx)(eq,{entry:e})}),(0,n.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,n.jsxs)("span",{className:"flex items-center gap-2 truncate text-sm font-medium",children:[e.label,e.recommended&&(0,n.jsx)("span",{className:"rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:"recommended"})]}),i?h?(0,n.jsx)(A.Skeleton,{className:"h-3 w-20"}):f:(0,n.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.signIn?t?eL(a.data,l):"sign in with your account":e.key})]}),i?null:h?(0,n.jsx)(A.Skeleton,{className:"h-3 w-20 shrink-0"}):f,(0,n.jsx)(u.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let e_=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function eK(e,t,n,s){return e?n?"refused"in n?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${e_.format(n.balance)} left`,ink:n.low?eu.WAITING_INK:"text-muted-foreground",warn:n.low}:{text:s?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:t?{text:"Needed",ink:eu.WAITING_INK,warn:!0}:{text:s?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function eT(e,t){return(0,ec.useServerRoute)(t&&"vercel-ai-gateway"===e.provider?v.queryKey.gatewayCredits:null)}function eB(e,t){let{data:n}=(0,ec.useServerRoute)(t&&e.signIn?v.queryKey.llmModel:null);return n?.find(t=>t.id===e.provider)?.plan??null}function e$(e,t){return(0,ec.useServerRoute)(t&&e.signIn?v.queryKey.subscriptionUsage:null)}function eO(e){return"refused"in e?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:e.spent?"Limit reached":`${e.usedPercent}% used`,ink:e.high?eu.WAITING_INK:"text-muted-foreground",warn:e.high}}function eL(e,t){let n=!e||"refused"in e?null:e,r=`${n?.plan??t??"unknown"} plan`;return n?.resetsAt?`${r} \xb7 resets in ${(0,s.formatDistanceToNowStrict)(new Date(n.resetsAt))}`:r}function eq({entry:e}){if(e.provider)return(0,n.jsx)(z.ProviderIcon,{provider:e.provider,className:"size-4"});let t=eM[e.key]??x.KeyRound,s=(0,n.jsx)(t,{className:"size-4 text-muted-foreground"});return e.site?(0,n.jsx)(S.SiteIcon,{host:e.site,className:"size-4 rounded-[4px]",fallback:s}):s}function eD({entry:e,choices:t,value:s,isSet:r}){let i=e.text?(0,E.parseTextModel)(s):(0,E.parseMediaModel)(s),o=t.filter(e=>r(e.needs)),a=e.kind?ez[e.kind]:F.BotsMark,[l]=(0,ed.useServerAction)(P.setConfigAction,{okMessage:`${e.label} saved`,onOk:()=>(0,ec.revalidate)(v.queryKey.config)}),[d]=(0,ed.useServerAction)(R,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:()=>(0,ec.revalidate)(v.queryKey.config)});return(0,n.jsxs)("div",{className:"flex w-full items-start gap-3 p-4",children:[(0,n.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,n.jsx)(a,{className:"size-4 text-muted-foreground"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 pt-1.5",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),!s&&(0,n.jsx)("span",{className:(0,eu.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?eu.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"})]}),(0,n.jsx)(M.ModelPicker,{kind:e.kind,provider:i?.provider??null,model:i?.model??"",unset:e.kind?"Not offered to bots until you pick one":o[0]?.label??"No key for any of these yet",onChange:t=>l(e.key,`${t.provider}/${t.model.trim()}`),onUnset:s?()=>d(e.key):void 0})]})]})}function eH({entry:e,onDone:t}){let{data:s}=(0,ec.useServerRoute)(v.queryKey.config),r=(0,_.isConfigSet)(s,e.key),i=eB(e,r),o=e$(e,r),a=o.data?eO(o.data):null,[l,d]=(0,ed.useServerAction)(R,{okMessage:`Signed out of ${e.label}`,onOk:()=>{(0,ec.revalidate)(v.queryKey.config),(0,ec.revalidate)(v.queryKey.llmModel),t()}});return(0,n.jsx)(el.SettingDialogContent,{title:e.label,description:r?(0,n.jsxs)(n.Fragment,{children:["Signed in ·"," ",(0,n.jsx)("span",{className:"font-mono",children:eL(o.data,i)}),a&&(0,n.jsxs)(n.Fragment,{children:[" · ",(0,n.jsx)("span",{className:(0,eu.cn)("font-mono",a.ink),children:a.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,n.jsxs)(n.Fragment,{children:[r&&(0,n.jsx)(j.Button,{variant:"ghost",loading:d,onClick:()=>l(e.key),children:"Sign out"}),(0,n.jsx)(j.Button,{variant:"ghost",onClick:t,children:r?"Close":"Cancel"}),!r&&(0,n.jsx)(C.ChatGptSignIn,{})]}),children:(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(el.SettingNote,{children:r?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),o.data&&"refused"in o.data&&(0,n.jsx)(el.SettingNote,{className:"wrap-break-word text-destructive",children:o.data.refused})]})})}function eG(e,t){return w.notify.component({className:"sm:max-w-md",renderer:({close:s})=>(0,n.jsx)(eU,{entry:e,set:t,onDone:s})})}function eU({entry:e,set:t,onDone:s}){let[i,o]=(0,k.useState)(""),{data:a}=eT(e,t),l=a?eK(t,!1,a):null,d=()=>{(0,ec.revalidate)(v.queryKey.config),(0,ec.revalidate)(v.queryKey.llmModel)},[c,u]=(0,ed.useServerAction)(P.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{d(),s()}}),[h,f]=(0,ed.useServerAction)(R,{okMessage:`${e.label} key removed`,onOk:()=>{d(),s()}});return(0,n.jsx)(el.SettingDialogContent,{title:e.label,description:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,n.jsxs)(n.Fragment,{children:[" · ",e.hint]}),l&&(0,n.jsxs)(n.Fragment,{children:[" · ",(0,n.jsx)("span",{className:(0,eu.cn)("font-mono",l.ink),children:l.text})]})]}),footer:(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(j.Button,{variant:"ghost",loading:f,onClick:()=>h(e.key),className:"mr-auto text-destructive hover:text-destructive",children:"Remove"}),(0,n.jsx)(j.Button,{variant:"ghost",onClick:s,children:"Cancel"}),(0,n.jsx)(j.Button,{loading:u,disabled:i.trim().length<8,onClick:()=>c(e.key,i),children:t?"Replace":"Save"})]}),children:(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(b.Input,{value:i,onChange:e=>o(e.target.value),onKeyDown:t=>{"Enter"===t.key&&i.trim().length>=8&&c(e.key,i)},placeholder:t?"New value — replaces the current key":e.keyLooks??"Paste the key",spellCheck:!1,type:"password",autoFocus:!0}),!t&&e.keysAt&&(0,n.jsxs)("a",{href:e.keysAt,target:"_blank",rel:"noreferrer",className:"flex w-fit items-center gap-1 px-0.5 text-[13px] text-foreground underline underline-offset-3 hover:text-foreground/80",children:["Get a key at ",new URL(e.keysAt).host,(0,n.jsx)(r.ArrowUpRight,{className:"size-3.5"})]}),a&&"refused"in a&&(0,n.jsx)(el.SettingNote,{className:"wrap-break-word text-destructive",children:a.refused})]})})}e.s(["AccountsSetup",0,function({withoutVoice:e=!1}){let{data:t}=(0,ec.useServerRoute)(v.queryKey.config),s=e=>(0,_.isConfigSet)(t,e),r=e=>_.CONFIG_GROUPS.find(t=>t.id===e)?.entries??[],[i,o]=(0,k.useState)(!1),a=r("voice"),l=[...a,...r("text")],d=l.filter((t,n)=>(n<4||s(t.key))&&!(e&&a.includes(t))),c=l.filter(t=>!d.includes(t)&&!(e&&a.includes(t)));return(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)("div",{className:"flex flex-col gap-2",children:r("easy").map(e=>(0,n.jsx)(eP,{card:!0,narrow:!0,entry:e,set:s(e.key),needed:!1},e.key))}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-y-2.5",children:[d.map(e=>(0,n.jsx)(eI,{entry:e,set:s(e.key)},e.key)),c.length>0&&(0,n.jsxs)(N.Popover,{open:i,onOpenChange:o,children:[(0,n.jsxs)(N.PopoverTrigger,{"aria-label":`${c.length} more providers`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,n.jsx)("span",{className:"grid size-10.5 place-items-center rounded-[13px] bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,n.jsx)(m.default,{className:"size-4"})}),(0,n.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"More"})]}),(0,n.jsx)(N.PopoverContent,{align:"end",className:"w-78 flex-row flex-wrap gap-0 gap-y-2.5 rounded-2xl p-2.5",onClick:()=>o(!1),children:c.map(e=>(0,n.jsx)(eI,{entry:e,set:s(e.key)},e.key))})]})]}),r("search").map(e=>(0,n.jsx)(eP,{card:!0,narrow:!0,entry:e,set:s(e.key),needed:!1},e.key))]})},"KeysSetting",0,()=>(0,n.jsx)(eF,{screen:"keys"}),"ModelsSetting",0,()=>(0,n.jsx)(eF,{screen:"models"}),"PhoneSetting",0,()=>(0,n.jsx)(el.SettingScreen,{footer:(0,n.jsx)(el.SettingRailNote,{children:"Nothing on this computer is opened to the internet: the app asks the chat service what was written."}),children:(0,n.jsx)(ey,{})})],805995)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,127341,e=>{"use strict";var t,n=e.i(843476);e.s([],559657),e.i(559657);var r=e.i(271645),a=e.i(951437),i=e.i(146376),l=e.i(667865),u=e.i(552245),o=e.i(53687),s=e.i(733332);let c=r.createContext(void 0);function d(){let e=r.useContext(c);if(void 0===e)throw Error((0,s.default)(64));return e}let f={tabActivationDirection:e=>({"data-activation-direction":e})};var p=e.i(675606),h=e.i(56434);let v=r.forwardRef(function(e,t){let{className:s,defaultValue:d=0,onValueChange:v,orientation:m="horizontal",render:y,value:x,style:R,...k}=e,E=void 0!==e.defaultValue,M=r.useRef([]),[C,w]=r.useState(()=>new Map),[I,S]=(0,a.useControlled)({controlled:x,default:d,name:"Tabs",state:"value"}),A=void 0!==x,[T,L]=r.useState(()=>new Map),O=r.useRef(void 0),z=r.useCallback(e=>g(T,e),[T]),[D,N]=r.useState(()=>({previousValue:I,tabActivationDirection:"none"})),{previousValue:j,tabActivationDirection:_}=D,W=_,F=!1;j!==I&&(W=b(j,I,m,T),F=null!=j&&null!=I&&null==z(I));let P=F?j:I,H=j!==P||_!==W;(0,i.useIsoLayoutEffect)(()=>{H&&N({previousValue:P,tabActivationDirection:W})},[P,H,W]);let V=(0,l.useStableCallback)((e,t)=>{t.activationDirection=b(I,e,m,T),v?.(e,t),t.isCanceled||S(e)}),B=(0,l.useStableCallback)((e,t)=>{v?.(e,(0,p.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),K=(0,l.useStableCallback)((e,t)=>(w(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{w(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),Y=r.useCallback(e=>C.get(e),[C]),U=r.useCallback(e=>{for(let t of T.values())if(e===t.value)return t.id},[T]),q=r.useMemo(()=>({getTabElementBySelectedValue:z,getTabIdByPanelValue:U,getTabPanelIdByValue:Y,onValueChange:V,orientation:m,registerMountedTabPanel:K,setTabMap:L,tabActivationDirection:W,value:I}),[z,U,Y,V,m,K,L,W,I]),$=r.useMemo(()=>{for(let e of T.values())if(e.value===I)return e},[T,I]),G=r.useMemo(()=>{for(let e of T.values())if(!e.disabled)return e.value},[T]),J=r.useRef(!E),X=r.useRef(d),Q=r.useRef(E),Z=r.useRef(!1);(0,i.useIsoLayoutEffect)(()=>{if(A)return;function e(e,t){S(e),N({previousValue:e,tabActivationDirection:"none"}),B(e,t),J.current=!1}if(0===T.size){Z.current&&null!==I&&!O.current?.isConnected&&e(null,h.REASONS.missing);return}Z.current=!0,O.current=T.keys().next().value;let t=$?.disabled,n=null==$&&null!==I;if(t||I!==X.current||(Q.current=!1),Q.current&&t&&I===X.current)return;let r=J.current;if(t||n){let n=G??null;if(I===n){J.current=!1;return}let a=h.REASONS.missing;r?a=h.REASONS.initial:t&&(a=h.REASONS.disabled),e(n,a);return}r&&null!=$&&(B(I,h.REASONS.initial),J.current=!1)},[G,A,B,$,S,T,I]);let ee={orientation:m,tabActivationDirection:W},et=(0,u.useRenderElement)("div",e,{state:ee,ref:t,props:k,stateAttributesMapping:f});return(0,n.jsx)(c.Provider,{value:q,children:(0,n.jsx)(o.CompositeList,{elementsRef:M,children:et})})});function g(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function b(e,t,n,r){if(null==e||null==t)return"none";let[a,i,l]="horizontal"===n?["left","left","right"]:["top","up","down"],u=g(r,e),o=g(r,t);if(null==u||null==o)return u!==o&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?t>e?l:i:"none";let s=u.getBoundingClientRect()[a],c=o.getBoundingClientRect()[a];return c<s?i:c>s?l:"none"}var m=e.i(108868),y=e.i(788015),x=e.i(540886),R=e.i(370359),k=e.i(395530),E=e.i(838452);let M=r.createContext(void 0);function C(){let e=r.useContext(M);if(void 0===e)throw Error((0,s.default)(65));return e}var w=e.i(584446);let I=r.forwardRef(function(e,t){let{className:n,disabled:a=!1,render:o,value:s,id:c,nativeButton:v=!0,style:g,...b}=e,{value:M,getTabPanelIdByValue:I,onValueChange:S,orientation:A,tabActivationDirection:T}=d(),{activateOnFocus:L,registerTabResizeObserverElement:O,tabsListElement:z}=C(),{highlightedIndex:D,onHighlightedIndexChange:N}=(0,E.useCompositeRootContext)(),j=(0,y.useBaseUiId)(c),_=r.useMemo(()=>({disabled:a,id:j,value:s}),[a,j,s]),{compositeProps:W,compositeRef:F,index:P}=(0,k.useCompositeItem)({metadata:_}),H=s===M,V=r.useRef(!1),B=r.useRef(null),K=(0,l.useStableCallback)(e=>{B.current?.(),B.current=e?O(e):null});(0,i.useIsoLayoutEffect)(()=>{if(V.current){V.current=!1;return}if(H&&P>-1&&D!==P){if(null!=z){let e=(0,w.activeElement)((0,m.ownerDocument)(z));if(e&&(0,w.contains)(z,e))return}a||N(P)}},[H,P,D,N,a,z]);let{getButtonProps:Y,buttonRef:U}=(0,x.useButton)({disabled:a,native:v,focusableWhenDisabled:!0}),q=I(s),$=r.useRef(!1),G=r.useRef(!1);function J(e){S(s,(0,p.createChangeEventDetails)(h.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))}return(0,u.useRenderElement)("button",e,{state:{disabled:a,active:H,orientation:A,tabActivationDirection:T},ref:[t,U,F,K],props:[W,{role:"tab","aria-controls":q,"aria-selected":H,id:j,onClick:function(e){H||a||J(e)},onFocus:function(e){H||a||L&&(!$.current||G.current)&&J(e)},onPointerDown:function(e){if(H||a)return;$.current=!0,G.current=0===e.button;let t=(0,m.ownerDocument)(e.currentTarget);function n(){$.current=!1,G.current=!1,t.removeEventListener("pointerup",n),t.removeEventListener("pointercancel",n)}t.addEventListener("pointerup",n),t.addEventListener("pointercancel",n)},[R.ACTIVE_COMPOSITE_ITEM]:H?"":void 0,onKeyDownCapture(){V.current=!0}},b,Y],stateAttributesMapping:f})});var S=e.i(229315),A=e.i(333848),T=e.i(802239),L=e.i(956789);function O(){return L.NOOP}function z(){return!1}function D(){return!0}let N=r.createContext(void 0),j={disableStyleElements:!1};function _(e){let{script:t}=e,{nonce:a}=r.useContext(N)??j;return(0,T.useSyncExternalStore)(O,z,D)?(0,n.jsx)("script",{nonce:a,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var W=e.i(73364),F=e.i(49072);let P={...f,activeTabPosition:()=>null,activeTabSize:()=>null},H=r.forwardRef(function(e,a){let{className:i,render:l,renderBeforeHydration:o=!1,style:s,...c}=e,{getTabElementBySelectedValue:f,orientation:p,tabActivationDirection:h,value:v}=d(),{tabsListElement:g,registerIndicatorUpdateListener:b}=C(),m=function(){let[,e]=r.useState({});return r.useCallback(()=>{e({})},[])}();r.useEffect(()=>b(m),[b,m]);let y=0,x=0,R=0,k=0,E=0,M=0,w=!1;if(null!=v&&null!=g){let e=f(v);if(null!=e){w=!0;let{width:t,height:n}=(0,W.getCssDimensions)(e),{width:r,height:a}=(0,W.getCssDimensions)(g),i=e.getBoundingClientRect(),l=g.getBoundingClientRect(),u=r>0?l.width/r:1,o=a>0?l.height/a:1,s=function(e,t){let n=V(e),r=V(t),a=n.left-r.left-t.clientLeft,i=n.top-r.top-t.clientTop,l=(0,S.getParentNode)(e);for(;(0,S.isHTMLElement)(l)&&l!==t&&!(0,S.isLastTraversableNode)(l);)a-=l.scrollLeft,i-=l.scrollTop,l=(0,S.getParentNode)(l);return{left:a,top:i}}(e,g);y=s.left,R=s.top;let c=(i.left-l.left)/u+g.scrollLeft-g.clientLeft,d=(i.top-l.top)/o+g.scrollTop-g.clientTop,f=function(e){let t=(0,A.ownerWindow)(e).getComputedStyle(e),{x:n,y:r}=(0,F.getElementTransform)(e,t),a=n,i=r,{translate:l}=t;if(l&&"none"!==l){let t=l.split(" ");a+=B(t[0],e.offsetWidth),i+=B(t[1],e.offsetHeight)}return{x:a,y:i}}(e);2>=Math.abs(c-f.x-y)&&2>=Math.abs(d-f.y-R)&&(y=c,R=d),E=t,M=n,x=g.scrollWidth-y-E,k=g.scrollHeight-R-M}}let I=w?{left:y,right:x,top:R,bottom:k}:null,T=w?{width:E,height:M}:null,L=w?{"--active-tab-left":`${y}px`,"--active-tab-right":`${x}px`,"--active-tab-top":`${R}px`,"--active-tab-bottom":`${k}px`,"--active-tab-width":`${E}px`,"--active-tab-height":`${M}px`}:void 0,O=w&&E>0&&M>0,z=(0,u.useRenderElement)("span",e,{state:{orientation:p,activeTabPosition:I,activeTabSize:T,tabActivationDirection:h},ref:a,props:[{role:"presentation",style:L,hidden:!O},c,{suppressHydrationWarning:!0}],stateAttributesMapping:P});return null==v?null:(0,n.jsxs)(r.Fragment,{children:[z,o&&(t||(t=(0,n.jsx)(_,{script:""})))]})});function V(e){let t=0,n=0,r=e;for(;null!=r;){t+=r.offsetLeft,n+=r.offsetTop;let e=r.offsetParent;null!=e&&(t+=e.clientLeft,n+=e.clientTop),r=e}return{left:t,top:n}}function B(e,t){if(!e)return 0;let n=parseFloat(e);return Number.isFinite(n)?e.endsWith("%")?n/100*t:n:0}var K=e.i(144394),Y=e.i(474354),U=e.i(137584),q=e.i(223910),$=e.i(673553),G=e.i(253335);G.TransitionStatusDataAttributes.startingStyle,G.TransitionStatusDataAttributes.endingStyle;let J={...f,...Y.transitionStatusMapping},X=r.forwardRef(function(e,t){let{className:n,value:a,render:l,keepMounted:o=!1,style:s,...c}=e,{value:f,getTabIdByPanelValue:p,orientation:h,tabActivationDirection:v,registerMountedTabPanel:g}=d(),b=(0,y.useBaseUiId)(),{ref:m,index:x}=(0,$.useCompositeListItem)(),R=a===f,{mounted:k,transitionStatus:E,setMounted:M}=(0,q.useTransitionStatus)(R),C=!k,w=p(a),I=r.useRef(null),S=(0,u.useRenderElement)("div",e,{state:{hidden:C,orientation:h,tabActivationDirection:v,transitionStatus:E},ref:[t,m,I],props:[{"aria-labelledby":w,hidden:C,id:b,role:"tabpanel",tabIndex:R?0:-1,inert:(0,K.inertValue)(!R),"data-index":x},c],stateAttributesMapping:J});return((0,U.useOpenChangeComplete)({open:R,ref:I,onComplete(){R||M(!1)}}),(0,i.useIsoLayoutEffect)(()=>{if(null!=b&&(!C||o))return g(a,b)},[C,o,a,b,g]),o||k)?S:null});var Q=e.i(405934);let Z=r.forwardRef(function(e,t){let{activateOnFocus:a=!1,className:u,loopFocus:o=!0,render:s,style:c,...p}=e,{orientation:h,setTabMap:v,tabActivationDirection:g}=d(),[b,m]=r.useState(0),[y,x]=r.useState(null),R=r.useRef(new Set),k=r.useRef(new Set),E=r.useRef(null);(0,i.useIsoLayoutEffect)(()=>{if("u"<typeof ResizeObserver)return;let e=new ResizeObserver(()=>{R.current.forEach(e=>{e()})});return E.current=e,y&&e.observe(y),k.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),E.current=null}},[y]);let C=(0,l.useStableCallback)(e=>(R.current.add(e),()=>{R.current.delete(e)})),w=(0,l.useStableCallback)(e=>(k.current.add(e),E.current?.observe(e),()=>{k.current.delete(e),E.current?.unobserve(e)})),I=r.useMemo(()=>({activateOnFocus:a,registerIndicatorUpdateListener:C,registerTabResizeObserverElement:w,tabsListElement:y}),[a,C,w,y]);return(0,n.jsx)(M.Provider,{value:I,children:(0,n.jsx)(Q.CompositeRoot,{render:s,className:u,style:c,state:{orientation:h,tabActivationDirection:g},refs:[t,x],props:[{"aria-orientation":"vertical"===h?"vertical":void 0,role:"tablist"},p],stateAttributesMapping:f,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:o,orientation:h,onHighlightedIndexChange:m,onMapChange:v,disabledIndices:L.EMPTY_ARRAY})})});e.s(["Indicator",0,H,"List",0,Z,"Panel",0,X,"Root",0,v,"Tab",0,I],69281);var ee=e.i(69281),ee=ee,et=e.i(225913),en=e.i(647163);let er=(0,et.cva)("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,n.jsx)(ee.Root,{"data-slot":"tabs","data-orientation":t,className:(0,en.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,n.jsx)(ee.Panel,{"data-slot":"tabs-content",className:(0,en.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,n.jsx)(ee.List,{"data-slot":"tabs-list","data-variant":t,className:(0,en.cn)(er({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,n.jsx)(ee.Tab,{"data-slot":"tabs-trigger",className:(0,en.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],127341)},83928,e=>{"use strict";var t=e.i(843476),n=e.i(829600),r=e.i(456420);let a={name:"file-code",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]};a.node;let i=(0,r.default)(a),l={name:"file-image",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]};l.node;let u=(0,r.default)(l);var o=e.i(905015);let s={name:"file-spreadsheet",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]};s.node;let c=(0,r.default)(s);var d=e.i(226091);let f={name:"file-type",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M11 18h2",key:"12mj7e"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5",key:"qbrxap"}]]};f.node;let p=(0,r.default)(f),h={name:"file-play",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",key:"1tzo1f"}]],aliases:["file-video"]};h.node;let v=(0,r.default)(h);var g=e.i(51921),b=e.i(271645),m=e.i(798120),y=e.i(683408),x=e.i(41533),R=e.i(616172),k=e.i(647163);let E={markdown:d.FileText,csv:c,json:o.FileJson,text:p,image:u,audio:g.Music,video:v};function M(e){let t=(0,R.viewKindOf)(e);return"frame"===t?e.toLowerCase().endsWith(".pdf")?d.FileText:i:E[t]??n.File}let C=new Set(["markdown","text","csv","json"]);function w(e,t){let n=(0,R.viewKindOf)(e);return void 0!==t&&t>x.WORKSPACE_VIEW.elementMax?"glyph":"image"===n?"image":"frame"===n&&/\.html?$/i.test(e)?"page":C.has(n)?"text":"glyph"}function I({width:e,className:n,children:r}){let a=(0,b.useRef)(null),[i,l]=(0,b.useState)(null);(0,b.useLayoutEffect)(()=>{let e=a.current;if(!e)return;let t=()=>l({w:e.clientWidth,h:e.clientHeight});t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let u=i?i.w/e:0;return(0,t.jsx)("span",{ref:a,"aria-hidden":!0,className:(0,k.cn)("relative block overflow-hidden",n),children:u>0&&i&&(0,t.jsx)("span",{className:"absolute top-0 left-0 block origin-top-left",style:{width:e,transform:`scale(${u})`},children:r(Math.ceil(i.h/u))})})}function S({path:e,onMissing:n}){let[r,a]=(0,b.useState)(null);return((0,b.useEffect)(()=>{let t=new AbortController;return fetch(m.queryKey.file(e),{headers:{range:`bytes=0-${x.FILE_THUMB.textBytes-1}`},signal:t.signal}).then(e=>e.ok?e.text():Promise.reject()).then(e=>a(e.replace(/\uFFFD+$/,""))).catch(()=>{t.signal.aborted||n()}),()=>t.abort()},[e,n]),null===r)?null:"markdown"===(0,R.viewKindOf)(e)?(0,t.jsx)("div",{className:"pointer-events-none px-9 py-8 text-[15px] text-foreground",children:(0,t.jsx)(y.Markdown,{controls:!1,components:{a:"span"},children:r})}):(0,t.jsx)("pre",{className:"pointer-events-none px-7 py-6 font-mono text-[13px] leading-relaxed whitespace-pre-wrap text-foreground",children:r})}e.s(["FileThumb",0,function({path:e,bytes:n,glyph:r="size-4",className:a}){let[i,l]=(0,b.useState)(!1),u=(0,b.useCallback)(()=>l(!0),[]),o=i?"glyph":w(e,n);if("image"===o)return(0,t.jsx)("img",{src:m.queryKey.file(e),alt:"",loading:"lazy",decoding:"async",onError:()=>l(!0),className:(0,k.cn)("block bg-muted object-cover dark:brightness-[0.82]",a)});if("page"===o)return(0,t.jsx)(I,{width:x.FILE_THUMB.pageWidth,className:(0,k.cn)("bg-white dark:brightness-[0.82]",a),children:n=>(0,t.jsx)("iframe",{title:"",src:m.queryKey.file(e),sandbox:"allow-scripts",loading:"lazy",tabIndex:-1,"aria-hidden":!0,scrolling:"no",style:{width:x.FILE_THUMB.pageWidth,height:n},className:"pointer-events-none block border-0 bg-white"})});if("text"===o)return(0,t.jsx)(I,{width:x.FILE_THUMB.textWidth,className:(0,k.cn)("bg-background dark:brightness-[0.82]",a),children:()=>(0,t.jsx)(S,{path:e,onMissing:u})});let s=M(e);return(0,t.jsx)("span",{className:(0,k.cn)("grid place-items-center bg-muted text-muted-foreground",a),children:(0,t.jsx)(s,{className:r})})},"faceOf",0,w,"fileIcon",0,M],83928)},260891,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(708445),r=e.i(146376),a=e.i(108868),i=e.i(667865),l=e.i(446265),u=e.i(328744),o=e.i(229315),s=e.i(675606),c=e.i(56434),d=e.i(46420),f=e.i(621082),p=e.i(449055),h=e.i(584446),v=e.i(596296),g=e.i(503596),b=e.i(157940);function m(e){return u.platform.engine.webkit&&0===e.movementX&&0===e.movementY}function y(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function x(e,t){return y(t,e===p.ARROW_UP||e===p.ARROW_DOWN,e===p.ARROW_LEFT||e===p.ARROW_RIGHT)}function R(e,t,n){return y(t,e===p.ARROW_DOWN,n?e===p.ARROW_LEFT:e===p.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}e.s(["useListNavigation",0,function(e,u){let{listRef:k,activeIndex:E,onNavigate:M=()=>{},enabled:C=!0,selectedIndex:w=null,allowEscape:I=!1,loopFocus:S=!1,nested:A=!1,rtl:T=!1,virtual:L=!1,focusItemOnOpen:O="auto",focusItemOnHover:z=!0,openOnArrowKeyDown:D=!0,disabledIndices:N,orientation:j="vertical",parentOrientation:_,id:W,resetOnPointerLeave:F=!0,externalTree:P,grid:H}=u,V=null!=H,B="rootStore"in e?e.rootStore:e,K=B.useState("open"),Y=B.useState("floatingElement"),U=B.useState("domReferenceElement"),q=B.context.dataRef,$=(0,v.getFloatingFocusElement)(Y),G=(0,v.isTypeableCombobox)(U),J=(0,l.useValueAsRef)($),X=(0,d.useFloatingParentNodeId)(),Q=(0,d.useFloatingTree)(P),Z=t.useRef(O),ee=t.useRef(w??-1),et=t.useRef(null),en=t.useRef(!0),er=(0,i.useStableCallback)(e=>{M(-1===ee.current?null:ee.current,e)}),ea=t.useRef(!!Y),ei=t.useRef(K),el=t.useRef(!1),eu=t.useRef(!1),eo=t.useRef(null),es=(0,l.useValueAsRef)(N),ec=(0,l.useValueAsRef)(K),ed=(0,l.useValueAsRef)(w),ef=(0,l.useValueAsRef)(F),ep=(0,n.useAnimationFrame)(),eh=(0,n.useAnimationFrame)(),ev=(0,i.useStableCallback)(()=>{function e(e){L?Q?.events.emit("virtualfocus",e):eo.current=(0,g.enqueueFocus)(e,{sync:el.current,preventScroll:!0})}let t=k.current[ee.current],n=eu.current;t&&e(t),(el.current?e=>e():e=>ep.request(e))(()=>{let r=k.current[ee.current]||t;!r||(t||e(r),eR&&(n||!en.current)&&r.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,r.useIsoLayoutEffect)(()=>{q.current.orientation=j},[q,j]),(0,r.useIsoLayoutEffect)(()=>{C&&(K&&Y?(ee.current=w??-1,Z.current&&null!=w&&(eu.current=!0,er())):ea.current&&(ee.current=-1,er()))},[C,K,Y,w,er]),(0,r.useIsoLayoutEffect)(()=>{if(C){if(!K){el.current=!1;return}if(Y)if(null==E){if(el.current=!1,null!=ed.current)return;if(ea.current&&(ee.current=-1,ev()),(!ei.current||!ea.current)&&Z.current&&(null!=et.current||!0===Z.current&&null==et.current)){let e=0,t=()=>{null==k.current[0]?(e<2&&(e?e=>eh.request(e):queueMicrotask)(t),e+=1):(ee.current=null==et.current||R(et.current,j,T)||A?(0,f.getMinListIndex)(k):(0,f.getMaxListIndex)(k),et.current=null,er())};t()}}else(0,f.isIndexOutOfListBounds)(k.current,E)||(ee.current=E,ev(),eu.current=!1)}},[C,K,Y,E,ed,A,k,j,T,er,ev,eh]),(0,r.useIsoLayoutEffect)(()=>{if(!C||Y||!Q||L||!ea.current)return;let e=Q.nodesRef.current,t=e.find(e=>e.id===X)?.context?.elements.floating,n=(0,h.activeElement)((0,a.ownerDocument)(U??t??null)),r=e.some(e=>e.context&&(0,h.contains)(e.context.elements.floating,n));t&&!r&&en.current&&t.focus({preventScroll:!0})},[C,Y,U,Q,X,L]),(0,r.useIsoLayoutEffect)(()=>{ei.current=K,ea.current=!!Y}),(0,r.useIsoLayoutEffect)(()=>{K||(et.current=null,Z.current=O)},[K,O]);let eg=null!=E,eb=(0,i.useStableCallback)(e=>{if(!ec.current)return;let t=k.current.indexOf(e.currentTarget);-1!==t&&(ee.current!==t||E!==t)&&(ee.current=t,er(e))}),em=(0,i.useStableCallback)(()=>_??Q?.nodesRef.current.find(e=>e.id===X)?.context?.dataRef?.current.orientation),ey=(0,i.useStableCallback)(()=>(0,f.getMinListIndex)(k,es.current)),ex=(0,i.useStableCallback)(e=>{var t;let n,r;if(en.current=!1,el.current=!0,229===e.which||!ec.current&&e.currentTarget===J.current)return;if(A&&(t=e.key,n=T?t===p.ARROW_RIGHT:t===p.ARROW_LEFT,r=t===p.ARROW_UP,"both"===j||"horizontal"===j&&V?"Escape"===t:y(j,n,r))){x(e.key,em())||(0,b.stopEvent)(e),B.setOpen(!1,(0,s.createChangeEventDetails)(c.REASONS.listNavigation,e.nativeEvent)),(0,o.isHTMLElement)(U)&&(L?Q?.events.emit("virtualfocus",U):U.focus());return}let a=ee.current,i=(0,f.getMinListIndex)(k,N),l=(0,f.getMaxListIndex)(k,N);if(G||("Home"===e.key&&((0,b.stopEvent)(e),ee.current=i,er(e)),"End"===e.key&&((0,b.stopEvent)(e),ee.current=l,er(e))),null!=H){let t=H(e,ee.current,k,j,S,T,N,i,l);if(null!=t&&(ee.current=t,er(e)),"both"===j)return}if(x(e.key,j)){if((0,b.stopEvent)(e),K&&!L&&(0,h.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){ee.current=R(e.key,j,T)?i:l,er(e);return}R(e.key,j,T)?S?a>=l?I&&a!==k.current.length?ee.current=-1:(el.current=!1,ee.current=i):ee.current=(0,f.findNonDisabledListIndex)(k.current,{startingIndex:a,disabledIndices:N}):ee.current=Math.min(l,(0,f.findNonDisabledListIndex)(k.current,{startingIndex:a,disabledIndices:N})):S?a<=i?I&&-1!==a?ee.current=k.current.length:(el.current=!1,ee.current=l):ee.current=(0,f.findNonDisabledListIndex)(k.current,{startingIndex:a,decrement:!0,disabledIndices:N}):ee.current=Math.max(i,(0,f.findNonDisabledListIndex)(k.current,{startingIndex:a,decrement:!0,disabledIndices:N})),(0,f.isIndexOutOfListBounds)(k.current,ee.current)&&(ee.current=-1),er(e)}}),eR=t.useMemo(()=>({onFocus(e){el.current=!0,eb(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){!m(e)&&(el.current=!0,eu.current=!1,z&&eb(e))},onPointerLeave(e){if(!ec.current||!en.current||"touch"===e.pointerType)return;el.current=!0;let t=e.relatedTarget;if(!(!z||k.current.includes(t))&&ef.current&&(eo.current?.(),eo.current=null,ee.current=-1,er(e),!L)){let e=J.current,t=(0,h.activeElement)((0,a.ownerDocument)(e));e&&(0,h.contains)(e,t)&&e.focus({preventScroll:!0})}}}),[eb,ec,J,z,k,er,ef,L]),ek=t.useMemo(()=>L&&K&&eg&&{"aria-activedescendant":`${W}-${E}`},[L,K,eg,W,E]),eE=t.useMemo(()=>({...!G?ek:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&K&&!L){let t=(0,h.getTarget)(e.nativeEvent);if(t&&!(0,h.contains)(J.current,t))return;(0,b.stopEvent)(e),B.setOpen(!1,(0,s.createChangeEventDetails)(c.REASONS.focusOut,e.nativeEvent)),(0,o.isHTMLElement)(U)&&U.focus();return}ex(e)},onPointerMove(e){m(e)||(en.current=!0)}}),[ek,ex,J,G,B,K,L,U]),eM=t.useMemo(()=>{function e(e){B.setOpen(!0,(0,s.createChangeEventDetails)(c.REASONS.listNavigation,e.nativeEvent,e.currentTarget))}function t(e){"auto"===O&&(0,b.isVirtualClick)(e.nativeEvent)&&(Z.current=!L)}function n(e){Z.current=O,"auto"===O&&(0,b.isVirtualPointerEvent)(e.nativeEvent)&&(Z.current=!0)}return{onKeyDown(t){var n,r;let a=B.select("open");en.current=!1;let i=t.key.startsWith("Arrow"),l=(n=t.key,r=em(),y(r,T?n===p.ARROW_LEFT:n===p.ARROW_RIGHT,n===p.ARROW_DOWN)),u=x(t.key,j),o=(A?l:u)||"Enter"===t.key||""===t.key.trim();if(L&&a)return ex(t);if(a||D||!i){if(o){let e=x(t.key,em());et.current=A&&e?null:t.key}if(A){l&&((0,b.stopEvent)(t),a?(ee.current=ey(),er(t)):e(t));return}u&&(null!=ed.current&&(ee.current=ed.current),(0,b.stopEvent)(t),!a&&D?e(t):ex(t),a&&er(t))}},onFocus(e){B.select("open")&&!L&&(ee.current=-1,er(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[ex,O,ey,A,er,B,D,j,em,T,ed,L]),eC=t.useMemo(()=>({...ek,...eM}),[ek,eM]);return t.useMemo(()=>C?{reference:eC,floating:eE,item:eR,trigger:eM}:{},[C,eC,eE,eM,eR])}])},736760,e=>{"use strict";var t=e.i(271645),n=e.i(146376),r=e.i(667865),a=e.i(439957),i=e.i(956789),l=e.i(621082),u=e.i(584446),o=e.i(157940);e.s(["useTypeahead",0,function(e,s){let{listRef:c,elementsRef:d,activeIndex:f,onMatch:p,disabledIndices:h,onTyping:v,enabled:g=!0,resetMs:b=750,selectedIndex:m=null}=s,y="rootStore"in e?e.rootStore:e,x=y.useState("open"),R=(0,a.useTimeout)(),k=t.useRef(""),E=t.useRef(m??f??-1),M=t.useRef(null),C=(0,r.useStableCallback)(e=>{function t(e){let t=d?.current[e];return!(t&&!(0,l.isElementVisible)(t)||t?.matches(":disabled"))&&(null==h||!(0,l.isListIndexDisabled)(i.EMPTY_ARRAY,e,h))}function n(e,r,a=0){if(0===e.length)return -1;let i=(a%e.length+e.length)%e.length,l=r.toLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length,a=e[r];if(a?.toLowerCase().startsWith(l)&&t(r))return r}return -1}let r=c.current;if(k.current.length>0&&" "===e.key&&((0,o.stopEvent)(e),v?.(!0)),k.current.length>0&&" "!==k.current[0]&&-1===n(r,k.current)&&" "!==e.key&&v?.(!1),null==r||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;x&&" "!==e.key&&((0,o.stopEvent)(e),v?.(!0));let a=""===k.current;a&&(E.current=m??f??-1),r.every((e,n)=>!(e&&t(n))||e[0]?.toLowerCase()!==e[1]?.toLowerCase())&&k.current===e.key&&(k.current="",E.current=M.current),k.current+=e.key,R.start(b,()=>{k.current="",E.current=M.current,v?.(!1)});let u=a?m??f??-1:E.current,s=n(r,k.current,(u??0)+1);-1!==s?(p?.(s),M.current=s):" "!==e.key&&(k.current="",v?.(!1))}),w=(0,r.useStableCallback)(e=>{let t=e.relatedTarget,n=y.select("domReferenceElement"),r=y.select("floatingElement");(0,u.contains)(n,t)||(0,u.contains)(r,t)||(R.clear(),k.current="",E.current=M.current,v?.(!1))});(0,n.useIsoLayoutEffect)(()=>{(x||null===m)&&(R.clear(),M.current=null,""!==k.current&&(k.current=""))},[x,m,R]);let I=t.useMemo(()=>({onKeyDown:C,onBlur:w}),[C,w]);return t.useMemo(()=>g?{reference:I,floating:I}:{},[g,I])}])},370359,405934,e=>{"use strict";let t="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,t],370359);var n=e.i(271645),r=e.i(956789),a=e.i(53687),i=e.i(667865),l=e.i(828918),u=e.i(146376),o=e.i(673327),s=e.i(621082),c=e.i(584446),d=e.i(838452),f=e.i(552245),p=e.i(872855),h=e.i(843476);e.s(["CompositeRoot",0,function(e){let{render:v,className:g,style:b,refs:m=r.EMPTY_ARRAY,props:y=r.EMPTY_ARRAY,state:x=r.EMPTY_OBJECT,stateAttributesMapping:R,highlightedIndex:k,onHighlightedIndexChange:E,orientation:M,grid:C,loopFocus:w,onLoop:I,enableHomeAndEndKeys:S,onMapChange:A,stopEventPropagation:T=!0,rootRef:L,disabledIndices:O,modifierKeys:z,highlightItemOnHover:D=!1,tag:N="div",...j}=e,{props:_,highlightedIndex:W,onHighlightedIndexChange:F,elementsRef:P,onMapChange:H,relayKeyboardEvent:V}=function(e){let{loopFocus:a=!0,orientation:d="both",grid:f,onLoop:p,direction:h,highlightedIndex:v,onHighlightedIndexChange:g,rootRef:b,enableHomeAndEndKeys:m=!1,stopEventPropagation:y,disabledIndices:x,modifierKeys:R=r.EMPTY_ARRAY}=e,[k,E]=n.useState(0),M=null!=f,C=n.useRef(null),w=(0,l.useMergedRefs)(C,b),I=n.useRef([]),S=n.useRef(!1),A=n.useRef(null),T=v??k,L=(0,i.useStableCallback)((e,t=!1)=>{if(A.current=I.current[e]??null,(g??E)(e),t){let t=I.current[e];(0,o.scrollIntoViewIfNeeded)(C.current,t,h,d)}}),O=(0,i.useStableCallback)(e=>{if(0===e.size)return;if(S.current){let e=I.current,n=e.indexOf(A.current);if(-1===n){let n=e[T];!n||(0,s.isListIndexDisabled)(e,T,x)?L(function(e,n){let r=-1;for(let a=0;a<e.length;a+=1){let i=e[a];if(!(!i||(0,s.isListIndexDisabled)(e,a,n))){if(i.hasAttribute(t))return a;-1===r&&(r=a)}}return Math.max(r,0)}(e,x)):A.current=n}else n!==T&&L(n);return}S.current=!0;let n=Array.from(e.keys()),r=n.find(e=>e?.hasAttribute(t))??null,a=r?e.get(r)?.index??-1:-1;if(-1!==a)L(a);else if((0,s.isListIndexDisabled)(n,T,x)){let e=(0,s.findNonDisabledListIndex)(n,{disabledIndices:x});(0,s.isIndexOutOfListBounds)(n,e)||L(e)}(0,o.scrollIntoViewIfNeeded)(C.current,r,h,d)});(0,u.useIsoLayoutEffect)(()=>{if(null==x||null!=v||!S.current)return;let e=I.current;if((0,s.isListIndexDisabled)(e,T,x)){let t=(0,s.findNonDisabledListIndex)(e,{disabledIndices:x});(0,s.isIndexOutOfListBounds)(e,t)||L(t)}},[x,v,T,I,L]);let z=(0,i.useStableCallback)((e,t,n)=>p?p(e,t,n,I):n),D=(0,i.useStableCallback)(e=>{let t=e.key===o.HOME||e.key===o.END;if(!o.COMPOSITE_KEYS.has(e.key)||!m&&t||function(e,t){for(let n of o.MODIFIER_KEYS)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}(e,R)||!C.current)return;let n="rtl"===h,r=n?o.ARROW_LEFT:o.ARROW_RIGHT,i=n?o.ARROW_RIGHT:o.ARROW_LEFT,l="vertical"===d?o.ARROW_DOWN:r,u="vertical"===d?o.ARROW_UP:i,v=(0,c.getTarget)(e.nativeEvent);if(null!=v&&(0,o.isNativeInput)(v)&&!(null==v||v.hasAttribute("disabled")||"true"===v.getAttribute("aria-disabled"))){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(null==t||e.shiftKey||t!==n||e.key!==u&&t<r.length||e.key!==l&&t>0)return}let g=T,b=(0,s.getMinListIndex)(I,x),k=(0,s.getMaxListIndex)(I,x);null!=f&&(g=f({disabledIndices:x,elementsRef:I,event:e,highlightedIndex:T,loopFocus:a,maxIndex:k,minIndex:b,onLoop:z,orientation:d,rtl:n}));let E="vertical"!==d&&e.key===r||"horizontal"!==d&&e.key===o.ARROW_DOWN,w="vertical"!==d&&e.key===i||"horizontal"!==d&&e.key===o.ARROW_UP;m&&(e.key===o.HOME?g=b:e.key===o.END&&(g=k)),g===T&&(E||w)&&(a&&g===k&&E?(g=b,p&&(g=p(e,T,g,I))):a&&g===b&&w?(g=k,p&&(g=p(e,T,g,I))):g=(0,s.findNonDisabledListIndex)(I.current,{startingIndex:g,decrement:w,disabledIndices:x})),g===T||(0,s.isIndexOutOfListBounds)(I.current,g)||(y&&e.stopPropagation(),(M||t||E||w)&&e.preventDefault(),L(g,!0),queueMicrotask(()=>{I.current[g]?.focus()}))});return{props:{ref:w,onFocus(e){let t=C.current,n=(0,c.getTarget)(e.nativeEvent);t&&null!=n&&(0,o.isNativeInput)(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:D},highlightedIndex:T,onHighlightedIndexChange:L,elementsRef:I,onMapChange:O,relayKeyboardEvent:D}}({grid:C,loopFocus:w,onLoop:I,orientation:M,highlightedIndex:k,onHighlightedIndexChange:E,rootRef:L,stopEventPropagation:T,enableHomeAndEndKeys:S,direction:(0,p.useDirection)(),disabledIndices:O,modifierKeys:z}),B=(0,f.useRenderElement)(N,e,{state:x,ref:m,props:[_,...y,j],stateAttributesMapping:R}),K=n.useMemo(()=>({highlightedIndex:W,onHighlightedIndexChange:F,highlightItemOnHover:D,relayKeyboardEvent:V}),[W,F,D,V]);return(0,h.jsx)(d.CompositeRootContext.Provider,{value:K,children:(0,h.jsx)(a.CompositeList,{elementsRef:P,onMapChange:e=>{A?.(e),H(e)},children:B})})}],405934)},348990,431594,e=>{"use strict";var t=e.i(956789),n=e.i(552245),r=e.i(395530);e.s(["CompositeItem",0,function(e){let{render:a,className:i,style:l,state:u=t.EMPTY_OBJECT,props:o=t.EMPTY_ARRAY,refs:s=t.EMPTY_ARRAY,metadata:c,stateAttributesMapping:d,tag:f="div",...p}=e,{compositeProps:h,compositeRef:v}=(0,r.useCompositeItem)({metadata:c});return(0,n.useRenderElement)(f,e,{state:u,ref:[v,...s],props:[h,...o,p],stateAttributesMapping:d})}],348990);var a=e.i(456420);let i={name:"repeat",size:24,node:[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]};i.node;let l=(0,a.default)(i);e.s(["RoutineMark",0,l],431594)},652225,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(552245);let r=t.forwardRef(function(e,t){let{className:r,render:a,orientation:i="horizontal",style:l,...u}=e;return(0,n.useRenderElement)("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},u]})});e.s(["Separator",0,r])},73364,e=>{"use strict";var t=e.i(343084),n=e.i(229315);e.s(["getCssDimensions",0,function(e){let r=(0,n.getComputedStyle)(e),a=parseFloat(r.width)||0,i=parseFloat(r.height)||0,l=(0,n.isHTMLElement)(e),u=l?e.offsetWidth:a,o=l?e.offsetHeight:i;return((0,t.round)(a)!==u||(0,t.round)(i)!==o)&&(a=u,i=o),{width:a,height:i}}])},264042,e=>{"use strict";var t=e.i(333848),n=e.i(328744);e.s(["isMouseWithinBounds",0,function(e,r){let a=function(e){let r=e.getBoundingClientRect(),a=(0,t.ownerWindow)(e);if(n.platform.env.jsdom)return r;let i=a.getComputedStyle(e,"::before"),l=a.getComputedStyle(e,"::after");if("none"===i.content&&"none"===l.content)return r;let u=parseFloat(i.width)||0,o=parseFloat(i.height)||0,s=parseFloat(l.width)||0,c=parseFloat(l.height)||0,d=Math.max(r.width,u,s),f=Math.max(r.height,o,c),p=d-r.width,h=f-r.height;return{left:r.left-p/2,right:r.right+p/2,top:r.top-h/2,bottom:r.bottom+h/2}}(r);return e.clientX>=a.left-5&&e.clientX<=a.right+5&&e.clientY>=a.top-5&&e.clientY<=a.bottom+5}])},96892,e=>{"use strict";var t=e.i(456420);let n={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};n.node;let r=(0,t.default)(n);e.s(["ArrowUp",0,r],96892)},856539,e=>{"use strict";var t=e.i(456420);let n={name:"book-bookmark",size:24,node:[["path",{d:"M10 2v7.751a.25.25 0 00.407.195l2.28-1.834a.5.5 0 01.627 0l2.28 1.834A.25.25 0 0016 9.751V2",key:"x9x4jl"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 016.5 2H19a1 1 0 011 1v18a1 1 0 01-1 1H6.5a1 1 0 010-5H20",key:"1889un"}]],aliases:["book-marked"]};n.node;let r=(0,t.default)(n);e.s(["BookMarked",0,r],856539)},905015,51921,e=>{"use strict";var t=e.i(456420);let n={name:"file-braces",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};n.node;let r=(0,t.default)(n);e.s(["FileJson",0,r],905015);let a={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};a.node;let i=(0,t.default)(a);e.s(["Music",0,i],51921)},226091,e=>{"use strict";var t=e.i(456420);let n={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};n.node;let r=(0,t.default)(n);e.s(["FileText",0,r],226091)},829600,e=>{"use strict";var t=e.i(456420);let n={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};n.node;let r=(0,t.default)(n);e.s(["File",0,r],829600)},91511,e=>{"use strict";var t=e.i(456420);let n={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};n.node;let r=(0,t.default)(n);e.s(["Globe",0,r],91511)}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),n=e.i(225913);e.i(271645);var s=e.i(647163);function a({className:e,...n}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}e.i(652225);let r=(0,n.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:n="vertical",...a}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":n,className:(0,s.cn)(r({orientation:n}),e),...a})},"FieldContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,s.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...n})},"FieldLabel",0,function({className:e,...n}){return(0,t.jsx)(a,{"data-slot":"field-label",className:(0,s.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...n})}],986530)},787800,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(716327),a=e.i(867927),r=e.i(21357),o=e.i(77071),i=e.i(456420);let c={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};c.node;let l=(0,i.default)(c),d={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};d.node;let m=(0,i.default)(d);var p=e.i(759659),u=e.i(263676),h=e.i(271645),f=e.i(798120),g=e.i(167881),x=e.i(986530),v=e.i(23750),j=e.i(647163);let b=(0,h.memo)(({data:e,name:n,initialExpandDepth:s=2})=>{let a=(0,h.useMemo)(()=>"string"==typeof e?function(e){let t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}"))&&!(t.startsWith("[")&&t.endsWith("]")))return{success:!1,data:e};try{return{success:!0,data:JSON.parse(e)}}catch{return{success:!1,data:e}}}(e).data:e,[e]);return(0,t.jsx)("div",{className:" text-sm transition-all duration-300",children:(0,t.jsx)(y,{data:a,name:n,depth:0,initialExpandDepth:s})})});b.displayName="JsonView";let y=(0,h.memo)(({data:e,name:n,depth:s=0,initialExpandDepth:a})=>{var r;let o=void 0===e?"undefined":Array.isArray(e)?"array":null===e?"null":typeof e,[i,c]=(0,h.useState)("string"!==o&&s<a),l={number:"text-blue-500",boolean:"text-amber-500",null:"text-purple-500",undefined:"text-gray-500",string:"text-foreground break-all whitespace-pre-wrap",default:"text-muted-foreground"};switch(o){case"object":case"array":let d,m,p;return m=(d=(r="array"===o)?e:Object.entries(e)).length,p={open:r?"[":"{",close:r?"]":"}",collapsed:r?"[ ... ]":"{ ... }",empty:r?"[]":"{}"},0===m?(0,t.jsxs)("div",{className:"flex items-center",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:p.empty})]}):(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded cursor-pointer group hover:bg-input/30",onClick:()=>c(!i),children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),i?(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.open}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.collapsed}),(0,t.jsxs)("span",{className:"ml-1 text-muted-foreground group-hover:text-foreground",children:[m," ",1===m?"item":"items"]})]})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"pl-2 ml-4 border-l border-border",children:r?d.map((e,n)=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(y,{data:e,name:`${n}`,depth:s+1,initialExpandDepth:a})},n)):d.map(([e,n])=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(y,{data:n,name:e,depth:s+1,initialExpandDepth:a})},e))}),(0,t.jsx)("div",{className:"text-muted-foreground",children:p.close})]})]});case"string":return e.length>100?(0,t.jsxs)("div",{className:"flex mr-1 rounded group hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),(0,t.jsx)("pre",{className:(0,j.cn)(l.string,"cursor-pointer group-hover:text-foreground"),onClick:()=>c(!i),title:i?"Click to collapse":"Click to expand",children:i?`"${e}"`:`"${e.slice(0,100)}..."`})]}):(0,t.jsxs)("div",{className:"flex mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsxs)("pre",{className:l.string,children:['"',e,'"']})]});case"undefined":return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l.undefined,children:"undefined"})]});default:return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l[o]||l.default,children:null===e?"null":String(e)})]})}});y.displayName="JsonNode";var N=e.i(917162),k=e.i(818125),S=e.i(319036),w=e.i(127341),C=e.i(184762),z=e.i(6799),O=e.i(95187);let A=(0,O.createServerReference)("7f59e554bf61a252814429c5c20d4990c9c511e34c",O.callServer,void 0,O.findSourceMapURL,"callToolAction"),T=(0,O.createServerReference)("7f595858ee3c9f58da5a2d30fb299bea22d8b2a4e2",O.callServer,void 0,O.findSourceMapURL,"deleteServerAction"),I=(0,O.createServerReference)("7f2567b779055e4492dd88b3a33d42b38baaac7f24",O.callServer,void 0,O.findSourceMapURL,"refreshServerAction"),F=(0,O.createServerReference)("7f14156357071ab1027d6ee1a94e32f6b1c882cfe6",O.callServer,void 0,O.findSourceMapURL,"registerServerAction");var P=e.i(681307),$=e.i(245629);let M=P.z.object({url:P.z.url(),headers:P.z.record(P.z.string(),P.z.string()).optional(),oauthClient:P.z.object({clientId:P.z.string().min(1),clientSecret:P.z.string().optional()}).optional()}),D=P.z.object({command:P.z.string().min(1),args:P.z.array(P.z.string()).optional(),env:P.z.record(P.z.string(),P.z.string()).optional()}),R=P.z.union([M,D]),L=P.z.object({name:P.z.string(),description:P.z.string().optional(),inputSchema:P.z.looseObject({}).optional(),outputSchema:P.z.looseObject({}).optional()});function E(e){return"url"in e}P.z.object({clientInformation:P.z.looseObject({}).optional(),tokens:P.z.looseObject({}).optional(),authorizationServer:P.z.looseObject({}).optional(),codeVerifier:P.z.string().optional(),state:P.z.string().optional()});let q=P.z.object({name:P.z.string().min(1).max(40),config:R,toolCount:P.z.number().int(),lastError:P.z.string().nullish()}),B=L.extend({id:P.z.number().int(),description:P.z.string().nullish()});q.omit({toolCount:!0}).extend({tools:B.array().default([]),toolsSyncedAt:$.DateLikeSchema});let J=P.z.object({name:P.z.string().min(1,"Name is required").max(40).regex(/^[a-zA-Z0-9_-]+$/,"Only letters, numbers, - and _ are allowed"),config:R}),U=P.z.union([P.z.object({mcpServers:P.z.record(P.z.string(),R)}),P.z.record(P.z.string(),R)]),K=[{name:"todoist",icon:"todoist.com",description:"Tasks, projects, and due dates",config:{url:"https://ai.todoist.net/mcp"}},{name:"home-assistant",icon:"home-assistant.io",description:"Lights, switches, and the rest of the house — your address and a long-lived token",config:{url:"http://homeassistant.local:8123/api/mcp",headers:{Authorization:"Bearer <your-home-assistant-token>"}}},{name:"kiwi",icon:"kiwi.com",description:"Flight search — no account",config:{url:"https://mcp.kiwi.com"}},{name:"zapier",icon:"zapier.com",description:"Gmail, Google Calendar, and thousands of apps you connect there",config:{url:"https://mcp.zapier.com/api/v1/connect"}},{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/mcp"}},{name:"asana",icon:"asana.com",description:"Tasks, projects, and portfolios",config:{url:"https://mcp.asana.com/mcp"}},{name:"monday",icon:"monday.com",description:"Boards, items, and updates",config:{url:"https://mcp.monday.com/mcp"}},{name:"clickup",icon:"clickup.com",description:"Tasks, docs, and spaces",config:{url:"https://mcp.clickup.com/mcp"}},{name:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/mcp"}},{name:"hubspot",icon:"hubspot.com",description:"Contacts, deals, and companies",config:{url:"https://app.hubspot.com/mcp/v1/http"}},{name:"attio",icon:"attio.com",description:"CRM records and lists",config:{url:"https://mcp.attio.com/mcp"}},{name:"intercom",icon:"intercom.com",description:"Conversations and support tickets",config:{url:"https://mcp.intercom.com/mcp"}},{name:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/mcp"}},{name:"stripe",icon:"stripe.com",description:"Payments, invoices, and customers",config:{url:"https://mcp.stripe.com"}},{name:"paypal",icon:"paypal.com",description:"Payments and orders",config:{url:"https://mcp.paypal.com/mcp"}},{name:"square",icon:"squareup.com",description:"Payments, catalog, and orders",config:{url:"https://mcp.squareup.com/mcp"}},{name:"ramp",icon:"ramp.com",description:"Spend, cards, and transactions",config:{url:"https://mcp.ramp.com/mcp"}},{name:"github",icon:"github.com",description:"Repos, issues, PRs — paste a personal access token",config:{url:"https://api.githubcopilot.com/mcp/",headers:{Authorization:"Bearer <your-github-pat>"}}},{name:"vercel",icon:"vercel.com",description:"Deployments and projects",config:{url:"https://mcp.vercel.com"}},{name:"netlify",icon:"netlify.com",description:"Sites, builds, and deploys",config:{url:"https://mcp.netlify.com/mcp"}},{name:"cloudflare",icon:"cloudflare.com",description:"Workers bindings — D1, R2, KV",config:{url:"https://bindings.mcp.cloudflare.com/mcp"}},{name:"supabase",icon:"supabase.com",description:"Projects, tables, and SQL",config:{url:"https://mcp.supabase.com/mcp"}},{name:"neon",icon:"neon.tech",description:"Postgres branches and queries",config:{url:"https://mcp.neon.tech/mcp"}},{name:"prisma",icon:"prisma.io",description:"Postgres databases and schema",config:{url:"https://mcp.prisma.io/mcp"}},{name:"sentry",icon:"sentry.io",description:"Errors and performance issues",config:{url:"https://mcp.sentry.dev/mcp"}},{name:"grafana",icon:"grafana.com",description:"Dashboards, metrics, and alerts",config:{url:"https://mcp.grafana.com/mcp"}},{name:"semgrep",icon:"semgrep.dev",description:"Scan code for security findings",config:{url:"https://mcp.semgrep.ai/mcp"}},{name:"postman",icon:"postman.com",description:"Collections, environments, and requests",config:{url:"https://mcp.postman.com/mcp"}},{name:"resend",icon:"resend.com",description:"Send email and manage audiences",config:{url:"https://mcp.resend.com/mcp"}},{name:"hugging-face",icon:"huggingface.co",description:"Models, datasets, and Spaces",config:{url:"https://huggingface.co/mcp"}},{name:"apify",icon:"apify.com",description:"Run scrapers and automation actors",config:{url:"https://mcp.apify.com"}},{name:"exa",icon:"exa.ai",description:"Web search for agents",config:{url:"https://mcp.exa.ai/mcp"}},{name:"kagi",icon:"kagi.com",description:"Search, summarize, and answer",config:{url:"https://mcp.kagi.com/mcp"}},{name:"context7",icon:"context7.com",description:"Up-to-date library docs",config:{url:"https://mcp.context7.com/mcp"}},{name:"deepwiki",icon:"deepwiki.com",description:"Ask questions about any GitHub repo",config:{url:"https://mcp.deepwiki.com/mcp"}},{name:"microsoft-learn",icon:"learn.microsoft.com",description:"Microsoft and Azure docs — no account",config:{url:"https://learn.microsoft.com/api/mcp"}},{name:"aws-knowledge",icon:"aws.amazon.com",description:"AWS docs and API references — no account",config:{url:"https://knowledge-mcp.global.api.aws"}},{name:"cloudflare-docs",icon:"developers.cloudflare.com",description:"Cloudflare docs — no account",config:{url:"https://docs.mcp.cloudflare.com/mcp"}},{name:"stack-overflow",icon:"stackoverflow.com",description:"Questions, answers, and teams",config:{url:"https://mcp.stackoverflow.com"}},{name:"playwright",icon:"playwright.dev",description:"Drive a real browser",config:{command:"npx",args:["@playwright/mcp@latest"]}},{name:"chrome-devtools",icon:"developer.chrome.com",description:"Inspect and debug Chrome",config:{command:"npx",args:["chrome-devtools-mcp@latest"]}}];var H=e.i(895836),V=e.i(333999),W=e.i(609856),_=e.i(283653);function G({name:e,onDone:n}){let{data:s,isLoading:a}=(0,_.useServerRoute)(f.queryKey.mcpServer(e)),[r,o]=(0,W.useServerAction)(I,{...ei,onOk:t=>{ei.onOk(t),(0,_.revalidate)(f.queryKey.mcpServer(e))}}),[i,c]=(0,W.useServerAction)(T,{okMessage:"Server deleted",onOk:()=>{n(),(0,_.revalidate)(f.queryKey.mcp)}}),d=async()=>{await N.notify.confirm({title:`Delete ${e}?`,description:"Its connection and saved authorization go with it.",okText:"Delete",destructive:!0})&&i(e)};if(a)return(0,t.jsx)(H.SettingSkeleton,{rows:4});if(!s)return null;let m=s.tools.length,u=E(s.config)?"HTTP":"STDIO";return(0,t.jsxs)(H.SettingDialogContent,{title:s.name,description:(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:u}),(0,t.jsx)("span",{className:"truncate font-mono",children:el(s.config)})]}),footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Button,{variant:"ghost",loading:c,onClick:d,children:[(0,t.jsx)(p.Trash2,{}),"Delete"]}),(0,t.jsxs)(g.Button,{variant:"outline",loading:o,onClick:()=>r(s.name),children:[(0,t.jsx)(l,{}),"Reconnect"]})]}),children:[s.lastError&&(0,t.jsx)("p",{className:"rounded-lg bg-destructive/10 px-3 py-2 font-mono text-xs text-destructive",children:s.lastError}),(0,t.jsxs)("p",{className:"text-right font-mono text-xs text-muted-foreground",children:[m," ",1===m?"tool":"tools"]}),s.tools.map(e=>(0,t.jsx)(Y,{tool:e,serverName:s.name},e.name))]})}function Q({server:e}){let s=e.toolCount,r=e.lastError?"error":s>0?"connected":"idle";return(0,t.jsxs)("button",{type:"button",onClick:()=>{N.notify.component({className:"sm:max-w-3xl",renderer:({close:n})=>(0,t.jsx)(G,{name:e.name,onDone:n})})},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(X,{server:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),"connected"===r&&(0,t.jsx)(n.Check,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"error"===r?(0,t.jsx)("span",{className:"text-destructive",children:e.lastError}):(0,t.jsxs)(t.Fragment,{children:[s>0?`${s} ${1===s?"tool":"tools"}`:"No tools yet",(0,t.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:[" · ",el(e.config)]})]})})]}),(0,t.jsx)(a.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({server:e}){let n,s=(n=K.find(t=>E(t.config)?E(e.config)&&t.config.url.replace(/\/+$/,"")===e.config.url.replace(/\/+$/,""):!E(e.config)&&t.config.command===e.config.command&&(t.config.args??[]).join(" ")===(e.config.args??[]).join(" "))??K.find(t=>t.name===e.name),n?.icon);return s?(0,t.jsx)(k.SiteIcon,{host:s,className:"size-5",fallback:(0,t.jsx)(m,{className:"size-4"})}):(0,t.jsx)(m,{className:"size-4"})}function Y({tool:e,serverName:n}){let[r,o]=(0,h.useState)(!1),[i,c]=(0,h.useState)(!1),[l,d]=(0,h.useState)(!1),m=[["inputSchema",e.inputSchema],["outputSchema",e.outputSchema]].filter(([,e])=>e);return(0,t.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background p-4",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate font-mono text-sm",children:e.name}),e.description?(0,t.jsx)("p",{className:(0,j.cn)("text-xs text-muted-foreground",!l&&"line-clamp-2",e.description.length>140&&"cursor-pointer"),onClick:()=>d(!l),children:e.description}):null]}),(0,t.jsxs)("div",{className:"mt-2 flex justify-end gap-1",children:[m.length>0&&(0,t.jsxs)(g.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>o(!r),children:[r?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(a.ChevronRight,{}),"Schema"]}),(0,t.jsxs)(g.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>c(!i),children:[i?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(a.ChevronRight,{}),"Test"]})]}),r?(0,t.jsx)("div",{className:"mt-2 space-y-3 overflow-x-auto rounded-lg border border-input p-3",children:m.map(([e,n])=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"block font-mono text-xs text-muted-foreground",children:"inputSchema"===e?"in":"out"}),(0,t.jsx)("pre",{className:"font-mono text-xs leading-relaxed whitespace-pre",children:function e(t,n=0){if(!t||"object"!=typeof t)return"unknown";let s=" ".repeat(n+1),a=" ".repeat(n);if(Array.isArray(t.enum))return t.enum.map(e=>JSON.stringify(e)).join(" | ");let r=t.anyOf??t.oneOf;if(Array.isArray(r))return r.map(t=>e(t,n)).join(" | ");if("array"===t.type){let s=e(t.items,n);return/[|{]/.test(s)?`(${s})[]`:`${s}[]`}if("object"===t.type||t.properties){let r=t.properties;if(!r||0===Object.keys(r).length)return"{}";let o=t.required??[],i=Object.entries(r).map(([t,a])=>{let r=o.includes(t)?"":"?",i=a?.description,c="string"==typeof i&&i.length<=60?` // ${i}`:"";return`${s}${t}${r}: ${e(a,n+1)}${c}`});return`{
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),n=e.i(225913);e.i(271645);var s=e.i(647163);function r({className:e,...n}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}e.i(652225);let a=(0,n.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:n="vertical",...r}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":n,className:(0,s.cn)(a({orientation:n}),e),...r})},"FieldContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,s.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...n})},"FieldLabel",0,function({className:e,...n}){return(0,t.jsx)(r,{"data-slot":"field-label",className:(0,s.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...n})}],986530)},787800,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(716327),r=e.i(867927),a=e.i(21357),o=e.i(77071),i=e.i(456420);let c={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};c.node;let l=(0,i.default)(c),d={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};d.node;let m=(0,i.default)(d);var u=e.i(759659),p=e.i(263676),h=e.i(271645),g=e.i(798120),f=e.i(167881),x=e.i(986530),v=e.i(23750),j=e.i(647163);let b=(0,h.memo)(({data:e,name:n,initialExpandDepth:s=2})=>{let r=(0,h.useMemo)(()=>"string"==typeof e?function(e){let t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}"))&&!(t.startsWith("[")&&t.endsWith("]")))return{success:!1,data:e};try{return{success:!0,data:JSON.parse(e)}}catch{return{success:!1,data:e}}}(e).data:e,[e]);return(0,t.jsx)("div",{className:" text-sm transition-all duration-300",children:(0,t.jsx)(y,{data:r,name:n,depth:0,initialExpandDepth:s})})});b.displayName="JsonView";let y=(0,h.memo)(({data:e,name:n,depth:s=0,initialExpandDepth:r})=>{var a;let o=void 0===e?"undefined":Array.isArray(e)?"array":null===e?"null":typeof e,[i,c]=(0,h.useState)("string"!==o&&s<r),l={number:"text-blue-500",boolean:"text-amber-500",null:"text-purple-500",undefined:"text-gray-500",string:"text-foreground break-all whitespace-pre-wrap",default:"text-muted-foreground"};switch(o){case"object":case"array":let d,m,u;return m=(d=(a="array"===o)?e:Object.entries(e)).length,u={open:a?"[":"{",close:a?"]":"}",collapsed:a?"[ ... ]":"{ ... }",empty:a?"[]":"{}"},0===m?(0,t.jsxs)("div",{className:"flex items-center",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:u.empty})]}):(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded cursor-pointer group hover:bg-input/30",onClick:()=>c(!i),children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),i?(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:u.open}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:u.collapsed}),(0,t.jsxs)("span",{className:"ml-1 text-muted-foreground group-hover:text-foreground",children:[m," ",1===m?"item":"items"]})]})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"pl-2 ml-4 border-l border-border",children:a?d.map((e,n)=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(y,{data:e,name:`${n}`,depth:s+1,initialExpandDepth:r})},n)):d.map(([e,n])=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(y,{data:n,name:e,depth:s+1,initialExpandDepth:r})},e))}),(0,t.jsx)("div",{className:"text-muted-foreground",children:u.close})]})]});case"string":return e.length>100?(0,t.jsxs)("div",{className:"flex mr-1 rounded group hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),(0,t.jsx)("pre",{className:(0,j.cn)(l.string,"cursor-pointer group-hover:text-foreground"),onClick:()=>c(!i),title:i?"Click to collapse":"Click to expand",children:i?`"${e}"`:`"${e.slice(0,100)}..."`})]}):(0,t.jsxs)("div",{className:"flex mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsxs)("pre",{className:l.string,children:['"',e,'"']})]});case"undefined":return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l.undefined,children:"undefined"})]});default:return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l[o]||l.default,children:null===e?"null":String(e)})]})}});y.displayName="JsonNode";var N=e.i(917162),k=e.i(818125),S=e.i(319036),w=e.i(127341),C=e.i(184762),z=e.i(6799),O=e.i(95187);let A=(0,O.createServerReference)("7f0b922637590726045ca47318cb6e60183b7a5019",O.callServer,void 0,O.findSourceMapURL,"callToolAction"),T=(0,O.createServerReference)("7fc49faef09006d9cb0bf43007b1499cab738531c5",O.callServer,void 0,O.findSourceMapURL,"deleteServerAction"),I=(0,O.createServerReference)("7f868ad6bbcd2eb1dda03b79dd75bfa74d592dba97",O.callServer,void 0,O.findSourceMapURL,"refreshServerAction"),F=(0,O.createServerReference)("7f58282e9535aa746a4e1210617d21d0f05a287287",O.callServer,void 0,O.findSourceMapURL,"registerServerAction");var P=e.i(681307),$=e.i(245629);let M=P.z.object({url:P.z.url(),headers:P.z.record(P.z.string(),P.z.string()).optional(),oauthClient:P.z.object({clientId:P.z.string().min(1),clientSecret:P.z.string().optional()}).optional()}),R=P.z.object({command:P.z.string().min(1),args:P.z.array(P.z.string()).optional(),env:P.z.record(P.z.string(),P.z.string()).optional()}),D=P.z.union([M,R]),L=P.z.object({name:P.z.string(),description:P.z.string().optional(),inputSchema:P.z.looseObject({}).optional(),outputSchema:P.z.looseObject({}).optional()});function E(e){return"url"in e}P.z.object({clientInformation:P.z.looseObject({}).optional(),tokens:P.z.looseObject({}).optional(),authorizationServer:P.z.looseObject({}).optional(),codeVerifier:P.z.string().optional(),state:P.z.string().optional()});let q=P.z.object({name:P.z.string().min(1).max(40),config:D,toolCount:P.z.number().int(),lastError:P.z.string().nullish()}),B=L.extend({id:P.z.number().int(),description:P.z.string().nullish()});q.omit({toolCount:!0}).extend({tools:B.array().default([]),toolsSyncedAt:$.DateLikeSchema});let J=P.z.object({name:P.z.string().min(1,"Name is required").max(40).regex(/^[a-zA-Z0-9_-]+$/,"Only letters, numbers, - and _ are allowed"),config:D}),U=P.z.union([P.z.object({mcpServers:P.z.record(P.z.string(),D)}),P.z.record(P.z.string(),D)]),K=[{name:"todoist",icon:"todoist.com",description:"Tasks, projects, and due dates",config:{url:"https://ai.todoist.net/mcp"}},{name:"home-assistant",icon:"home-assistant.io",description:"Lights, switches, and the rest of the house — your address and a long-lived token",config:{url:"http://homeassistant.local:8123/api/mcp",headers:{Authorization:"Bearer <your-home-assistant-token>"}}},{name:"kiwi",icon:"kiwi.com",description:"Flight search — no account",config:{url:"https://mcp.kiwi.com"}},{name:"zapier",icon:"zapier.com",description:"Gmail, Google Calendar, and thousands of apps you connect there",config:{url:"https://mcp.zapier.com/api/v1/connect"}},{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/mcp"}},{name:"asana",icon:"asana.com",description:"Tasks, projects, and portfolios",config:{url:"https://mcp.asana.com/mcp"}},{name:"monday",icon:"monday.com",description:"Boards, items, and updates",config:{url:"https://mcp.monday.com/mcp"}},{name:"clickup",icon:"clickup.com",description:"Tasks, docs, and spaces",config:{url:"https://mcp.clickup.com/mcp"}},{name:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/mcp"}},{name:"hubspot",icon:"hubspot.com",description:"Contacts, deals, and companies",config:{url:"https://app.hubspot.com/mcp/v1/http"}},{name:"attio",icon:"attio.com",description:"CRM records and lists",config:{url:"https://mcp.attio.com/mcp"}},{name:"intercom",icon:"intercom.com",description:"Conversations and support tickets",config:{url:"https://mcp.intercom.com/mcp"}},{name:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/mcp"}},{name:"stripe",icon:"stripe.com",description:"Payments, invoices, and customers",config:{url:"https://mcp.stripe.com"}},{name:"paypal",icon:"paypal.com",description:"Payments and orders",config:{url:"https://mcp.paypal.com/mcp"}},{name:"square",icon:"squareup.com",description:"Payments, catalog, and orders",config:{url:"https://mcp.squareup.com/mcp"}},{name:"ramp",icon:"ramp.com",description:"Spend, cards, and transactions",config:{url:"https://mcp.ramp.com/mcp"}},{name:"github",icon:"github.com",description:"Repos, issues, PRs — paste a personal access token",config:{url:"https://api.githubcopilot.com/mcp/",headers:{Authorization:"Bearer <your-github-pat>"}}},{name:"vercel",icon:"vercel.com",description:"Deployments and projects",config:{url:"https://mcp.vercel.com"}},{name:"netlify",icon:"netlify.com",description:"Sites, builds, and deploys",config:{url:"https://mcp.netlify.com/mcp"}},{name:"cloudflare",icon:"cloudflare.com",description:"Workers bindings — D1, R2, KV",config:{url:"https://bindings.mcp.cloudflare.com/mcp"}},{name:"supabase",icon:"supabase.com",description:"Projects, tables, and SQL",config:{url:"https://mcp.supabase.com/mcp"}},{name:"neon",icon:"neon.tech",description:"Postgres branches and queries",config:{url:"https://mcp.neon.tech/mcp"}},{name:"prisma",icon:"prisma.io",description:"Postgres databases and schema",config:{url:"https://mcp.prisma.io/mcp"}},{name:"sentry",icon:"sentry.io",description:"Errors and performance issues",config:{url:"https://mcp.sentry.dev/mcp"}},{name:"grafana",icon:"grafana.com",description:"Dashboards, metrics, and alerts",config:{url:"https://mcp.grafana.com/mcp"}},{name:"semgrep",icon:"semgrep.dev",description:"Scan code for security findings",config:{url:"https://mcp.semgrep.ai/mcp"}},{name:"postman",icon:"postman.com",description:"Collections, environments, and requests",config:{url:"https://mcp.postman.com/mcp"}},{name:"resend",icon:"resend.com",description:"Send email and manage audiences",config:{url:"https://mcp.resend.com/mcp"}},{name:"hugging-face",icon:"huggingface.co",description:"Models, datasets, and Spaces",config:{url:"https://huggingface.co/mcp"}},{name:"apify",icon:"apify.com",description:"Run scrapers and automation actors",config:{url:"https://mcp.apify.com"}},{name:"exa",icon:"exa.ai",description:"Web search for agents",config:{url:"https://mcp.exa.ai/mcp"}},{name:"kagi",icon:"kagi.com",description:"Search, summarize, and answer",config:{url:"https://mcp.kagi.com/mcp"}},{name:"context7",icon:"context7.com",description:"Up-to-date library docs",config:{url:"https://mcp.context7.com/mcp"}},{name:"deepwiki",icon:"deepwiki.com",description:"Ask questions about any GitHub repo",config:{url:"https://mcp.deepwiki.com/mcp"}},{name:"microsoft-learn",icon:"learn.microsoft.com",description:"Microsoft and Azure docs — no account",config:{url:"https://learn.microsoft.com/api/mcp"}},{name:"aws-knowledge",icon:"aws.amazon.com",description:"AWS docs and API references — no account",config:{url:"https://knowledge-mcp.global.api.aws"}},{name:"cloudflare-docs",icon:"developers.cloudflare.com",description:"Cloudflare docs — no account",config:{url:"https://docs.mcp.cloudflare.com/mcp"}},{name:"stack-overflow",icon:"stackoverflow.com",description:"Questions, answers, and teams",config:{url:"https://mcp.stackoverflow.com"}},{name:"playwright",icon:"playwright.dev",description:"Drive a real browser",config:{command:"npx",args:["@playwright/mcp@latest"]}},{name:"chrome-devtools",icon:"developer.chrome.com",description:"Inspect and debug Chrome",config:{command:"npx",args:["chrome-devtools-mcp@latest"]}}];var H=e.i(895836),V=e.i(333999),W=e.i(609856),_=e.i(283653);function G({name:e,onDone:n}){let[s,r]=(0,h.useState)(""),{data:a,isLoading:o}=(0,_.useServerRoute)(g.queryKey.mcpServer(e)),[i,c]=(0,W.useServerAction)(I,{...ei,onOk:t=>{ei.onOk(t),(0,_.revalidate)(g.queryKey.mcpServer(e))}}),[d,m]=(0,W.useServerAction)(T,{okMessage:"Server deleted",onOk:()=>{n(),(0,_.revalidate)(g.queryKey.mcp)}}),p=async()=>{await N.notify.confirm({title:`Delete ${e}?`,description:"Its connection and saved authorization go with it.",okText:"Delete",destructive:!0})&&d(e)};if(o)return(0,t.jsx)(H.SettingSkeleton,{rows:4});if(!a)return null;let x=a.tools.length,v=s.trim().toLowerCase(),j=v?a.tools.filter(e=>`${e.name} ${e.description??""}`.toLowerCase().includes(v)):a.tools,b=E(a.config)?"HTTP":"STDIO";return(0,t.jsxs)(H.SettingDialogContent,{title:a.name,description:(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:b}),(0,t.jsx)("span",{className:"truncate font-mono",children:el(a.config)})]}),footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(f.Button,{variant:"ghost",loading:m,onClick:p,className:"mr-auto text-destructive hover:text-destructive",children:[(0,t.jsx)(u.Trash2,{}),"Delete"]}),(0,t.jsxs)(f.Button,{variant:"outline",loading:c,onClick:()=>i(a.name),children:[(0,t.jsx)(l,{}),"Reconnect"]})]}),children:[a.lastError&&(0,t.jsx)("p",{className:"rounded-lg bg-destructive/10 px-3 py-2 font-mono text-xs text-destructive",children:a.lastError}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(H.SettingFilter,{value:s,onChange:r,placeholder:"Filter tools"}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:[x," ",1===x?"tool":"tools"]})]}),j.map(e=>(0,t.jsx)(Y,{tool:e,serverName:a.name},e.name)),0===j.length&&x>0&&(0,t.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:"No tool here goes by that."})]})}function Q({server:e}){let s=e.toolCount,a=e.lastError?"error":s>0?"connected":"idle";return(0,t.jsxs)("button",{type:"button",onClick:()=>{N.notify.component({className:"sm:max-w-3xl",renderer:({close:n})=>(0,t.jsx)(G,{name:e.name,onDone:n})})},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(X,{server:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),"connected"===a&&(0,t.jsx)(n.Check,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"error"===a?(0,t.jsx)("span",{className:"text-destructive",children:e.lastError}):(0,t.jsxs)(t.Fragment,{children:[s>0?`${s} ${1===s?"tool":"tools"}`:"No tools yet",(0,t.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:[" · ",el(e.config)]})]})})]}),(0,t.jsx)(r.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({server:e}){let n,s=(n=K.find(t=>E(t.config)?E(e.config)&&t.config.url.replace(/\/+$/,"")===e.config.url.replace(/\/+$/,""):!E(e.config)&&t.config.command===e.config.command&&(t.config.args??[]).join(" ")===(e.config.args??[]).join(" "))??K.find(t=>t.name===e.name),n?.icon);return s?(0,t.jsx)(k.SiteIcon,{host:s,className:"size-5",fallback:(0,t.jsx)(m,{className:"size-4"})}):(0,t.jsx)(m,{className:"size-4"})}function Y({tool:e,serverName:n}){let[a,o]=(0,h.useState)(!1),[i,c]=(0,h.useState)(!1),[l,d]=(0,h.useState)(!1),m=[["inputSchema",e.inputSchema],["outputSchema",e.outputSchema]].filter(([,e])=>e);return(0,t.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background p-4",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-sm",children:e.name}),m.length>0&&(0,t.jsxs)(f.Button,{size:"xs",variant:"ghost",className:"shrink-0 font-mono",onClick:()=>o(!a),children:[a?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(r.ChevronRight,{}),"Schema"]}),(0,t.jsxs)(f.Button,{size:"xs",variant:"ghost",className:"shrink-0 font-mono",onClick:()=>c(!i),children:[i?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(r.ChevronRight,{}),"Test"]})]}),e.description?(0,t.jsx)("p",{className:(0,j.cn)("mt-0.5 text-xs leading-relaxed text-muted-foreground",!l&&"line-clamp-2",e.description.length>140&&"cursor-pointer"),onClick:()=>d(!l),children:e.description}):null,a?(0,t.jsx)("div",{className:"mt-2 space-y-3 overflow-x-auto rounded-lg border border-input p-3",children:m.map(([e,n])=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"block font-mono text-xs text-muted-foreground",children:"inputSchema"===e?"in":"out"}),(0,t.jsx)("pre",{className:"font-mono text-xs leading-relaxed whitespace-pre",children:function e(t,n=0){if(!t||"object"!=typeof t)return"unknown";let s=" ".repeat(n+1),r=" ".repeat(n);if(Array.isArray(t.enum))return t.enum.map(e=>JSON.stringify(e)).join(" | ");let a=t.anyOf??t.oneOf;if(Array.isArray(a))return a.map(t=>e(t,n)).join(" | ");if("array"===t.type){let s=e(t.items,n);return/[|{]/.test(s)?`(${s})[]`:`${s}[]`}if("object"===t.type||t.properties){let a=t.properties;if(!a||0===Object.keys(a).length)return"{}";let o=t.required??[],i=Object.entries(a).map(([t,r])=>{let a=o.includes(t)?"":"?",i=r?.description,c="string"==typeof i&&i.length<=60?` // ${i}`:"";return`${s}${t}${a}: ${e(r,n+1)}${c}`});return`{
|
|
2
2
|
${i.join("\n")}
|
|
3
|
-
${
|
|
3
|
+
${r}}`}return Array.isArray(t.type)?t.type.join(" | "):"string"==typeof t.type?t.type:"unknown"}(n)})]},e))}):null,i?(0,t.jsx)(Z,{tool:e,serverName:n}):null]})}function Z({tool:e,serverName:n}){let[s,r]=(0,h.useState)(()=>(function(e){let t=e.inputSchema?.properties;if(!t||"object"!=typeof t)return"{}";let n={};for(let[e,s]of Object.entries(t))n[e]=s?.type==="number"||s?.type==="integer"?0:s?.type!=="boolean"&&(s?.type==="array"?[]:s?.type==="object"?{}:"");return JSON.stringify(n,null,2)})(e)),[o,i]=(0,h.useState)(""),[c,l,d,m,u]=(0,W.useServerAction)(A,{errorMessage:!1});return(0,t.jsxs)("div",{className:"mt-2 space-y-2 rounded-lg border border-input p-3",children:[(0,t.jsx)(C.Textarea,{value:s,onChange:e=>r(e.target.value),spellCheck:!1,className:"min-h-24 resize-none font-mono text-xs"}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs text-destructive",children:o||m}),(0,t.jsxs)(f.Button,{size:"sm",loading:l,onClick:()=>{let t;try{t=s.trim()?JSON.parse(s):void 0}catch{i("Not valid JSON");return}i(""),u(),c(n,e.name,t)},children:[!l&&(0,t.jsx)(a.Play,{}),"Run"]})]}),void 0!==d&&(0,t.jsx)("div",{className:"overflow-x-auto rounded-lg bg-muted/40 p-3",children:(0,t.jsx)(b,{data:d,initialExpandDepth:3})})]})}function ee(e){return N.notify.component({className:"sm:max-w-lg",renderer:({close:n})=>(0,t.jsx)(et,{initial:e,onDone:n})})}function et({initial:e,onDone:n}){let s=e&&E(e.config)?e.config:void 0,a=e&&!E(e.config)?e.config:void 0,[o,i]=(0,V.useObjectState)({mode:a?"stdio":"http",name:e?.name??"",url:s?.url??"",headers:er(s?.headers),clientId:s?.oauthClient?.clientId??"",clientSecret:s?.oauthClient?.clientSecret??"",command:a?.command??"",args:(a?.args??[]).join(" "),env:er(a?.env),raw:""}),{mode:c,name:l,url:d,headers:m,clientId:u,clientSecret:p,command:g,args:j,env:b,raw:y}=o,[N,k]=(0,W.useServerAction)(F,{...ei,onOk:e=>{ei.onOk(e),"error"!==e.status&&n()}}),z=(0,h.useMemo)(()=>{var e,t,n,s,r,a,o;let i,l;return"json"===c?function(e){let t,n=e.trim();if(!n)return{value:null,error:""};try{t=JSON.parse(n)}catch{return{value:null,error:"Not valid JSON"}}let s=D.safeParse(t);if(s.success)return{value:{name:null,config:s.data},error:""};let r=U.safeParse(t);if(!r.success)return{value:null,error:"Needs a url or a command"};let a=Object.entries("mcpServers"in r.data?r.data.mcpServers:r.data)[0];return a?{value:{name:a[0],config:a[1]},error:""}:{value:null,error:"No server in there"}}(y):"http"===c?(e=d,t=m,n=u,s=p,(i=M.safeParse({url:e.trim(),headers:ea(t),oauthClient:n.trim()?{clientId:n.trim(),clientSecret:s.trim()}:void 0})).success?{value:{name:null,config:i.data},error:""}:{value:null,error:e.trim()?"Needs a valid url":""}):(r=g,a=j,o=b,(l=R.safeParse({command:r.trim(),args:a.split(/\s+/).filter(Boolean),env:ea(o)})).success?{value:{name:null,config:l.data},error:""}:{value:null,error:r.trim()?"Needs a command":""})},[c,y,d,m,u,p,g,j,b]),O="json"===c?y:JSON.stringify([c,d,m,u,p,g,j,b]),[A,T]=(0,h.useState)(O);(0,h.useEffect)(()=>{let e=setTimeout(()=>T(O),700);return()=>clearTimeout(e)},[O]);let I=A===O?z.error:"",P=l||z.value?.name||"",$=J.safeParse({name:P,config:z.value?.config});function L(e){let t=z.value?.config;return t?"json"===e?i({mode:e,raw:JSON.stringify(t,null,2)}):"http"===e&&E(t)?i({mode:e,url:t.url,headers:er(t.headers),clientId:t.oauthClient?.clientId??"",clientSecret:t.oauthClient?.clientSecret??""}):"stdio"!==e||E(t)?void i({mode:e}):i({mode:e,command:t.command,args:(t.args??[]).join(" "),env:er(t.env)}):i({mode:e})}let q=(0,t.jsxs)("span",{className:"flex items-center gap-2 font-mono text-xs text-muted-foreground",children:["JSON",(0,t.jsx)(S.Switch,{size:"sm",checked:"json"===c,onCheckedChange:e=>{let t;return e?L("json"):void L((t=z.value?.config)&&!E(t)?"stdio":"http")}})]});return(0,t.jsx)(H.SettingDialogContent,{title:"Add MCP server",description:"Its tools become available to Thursday and every bot.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Button,{variant:"ghost",onClick:n,children:"Cancel"}),(0,t.jsx)(f.Button,{disabled:!$.success,loading:k,onClick:()=>{$.success&&!k&&N($.data)},children:"Connect"})]}),children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"Name"}),(0,t.jsx)(v.Input,{value:P,onChange:e=>i({name:e.target.value}),placeholder:"notion",spellCheck:!1})]}),"json"===c?(0,t.jsxs)(x.Field,{children:[(0,t.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,t.jsx)(x.FieldLabel,{children:"JSON"}),q]}),(0,t.jsx)(C.Textarea,{value:y,onChange:e=>i({raw:e.target.value}),spellCheck:!1,placeholder:eo,className:"min-h-64 resize-none font-mono text-xs"})]}):(0,t.jsxs)(w.Tabs,{value:c,onValueChange:e=>L(e),className:"gap-6",children:[(0,t.jsxs)(x.Field,{children:[(0,t.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,t.jsx)(x.FieldLabel,{children:"Transport"}),q]}),(0,t.jsxs)(w.TabsList,{className:"w-full",children:[(0,t.jsx)(w.TabsTrigger,{value:"http",children:"HTTP"}),(0,t.jsx)(w.TabsTrigger,{value:"stdio",children:"STDIO"})]})]}),(0,t.jsxs)(w.TabsContent,{value:"http",className:"space-y-6",children:[(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"URL"}),(0,t.jsx)(v.Input,{value:d,onChange:e=>i({url:e.target.value}),placeholder:"https://mcp.notion.com/mcp",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsx)(en,{label:"Headers",pairs:m,onChange:e=>i({headers:e}),keyPlaceholder:"Authorization",valuePlaceholder:"Bearer sk-..."}),(0,t.jsxs)("details",{className:"group space-y-3",children:[(0,t.jsxs)("summary",{className:"flex w-fit cursor-pointer list-none items-center gap-1 rounded-sm text-xs text-muted-foreground outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 [&::-webkit-details-marker]:hidden",children:["Advanced: OAuth client",(0,t.jsx)(r.ChevronRight,{className:"size-3.5 transition-transform group-open:rotate-90"})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(v.Input,{value:u,onChange:e=>i({clientId:e.target.value}),placeholder:"Client ID",spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(v.Input,{value:p,onChange:e=>i({clientSecret:e.target.value}),placeholder:"Client secret",spellCheck:!1,type:"password",className:"font-mono text-xs"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Only for servers that refuse to register clients on their own, like Figma. Leave empty and one is created during sign-in."})]})]}),(0,t.jsxs)(w.TabsContent,{value:"stdio",className:"space-y-6",children:[(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"Command"}),(0,t.jsx)(v.Input,{value:g,onChange:e=>i({command:e.target.value}),placeholder:"npx",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:"Args"}),(0,t.jsx)(v.Input,{value:j,onChange:e=>i({args:e.target.value}),placeholder:"-y @notionhq/notion-mcp-server",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsx)(en,{label:"Env",pairs:b,onChange:e=>i({env:e}),keyPlaceholder:"NOTION_TOKEN",valuePlaceholder:"ntn_..."})]})]}),I&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:I})]})})}function en({label:e,pairs:n,onChange:s,keyPlaceholder:r,valuePlaceholder:a}){let i=(e,t)=>s(n.map(n=>n.id===e?{...n,...t}:n));return(0,t.jsxs)(x.Field,{children:[(0,t.jsx)(x.FieldLabel,{children:e}),(0,t.jsxs)("div",{className:"space-y-2",children:[n.map(e=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(v.Input,{value:e.key,onChange:t=>i(e.id,{key:t.target.value}),placeholder:r,spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(v.Input,{value:e.value,onChange:t=>i(e.id,{value:t.target.value}),placeholder:a,spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(f.Button,{variant:"ghost",size:"icon",onClick:()=>s(n.filter(t=>t.id!==e.id)),children:(0,t.jsx)(p.X,{})})]},e.id)),(0,t.jsxs)(f.Button,{variant:"outline",size:"sm",onClick:()=>s([...n,es()]),children:[(0,t.jsx)(o.Plus,{}),"Add"]})]})]})}let es=(e="",t="")=>({id:crypto.randomUUID(),key:e,value:t}),er=e=>Object.entries(e??{}).map(([e,t])=>es(e,t)),ea=e=>{let t=e.filter(e=>e.key.trim());if(t.length)return Object.fromEntries(t.map(e=>[e.key.trim(),e.value]))},eo=`/** STDIO Example */
|
|
4
4
|
{
|
|
5
5
|
"command": "node",
|
|
6
6
|
"args": ["index.js"],
|
|
@@ -15,4 +15,4 @@ ${a}}`}return Array.isArray(t.type)?t.type.join(" | "):"string"==typeof t.type?t
|
|
|
15
15
|
"headers": {
|
|
16
16
|
"Authorization": "Bearer sk-..."
|
|
17
17
|
}
|
|
18
|
-
}`,ei={onOk:e=>{(0,_.revalidate)(
|
|
18
|
+
}`,ei={onOk:e=>{(0,_.revalidate)(g.queryKey.mcp),function(e){if("auth_required"===e.status&&e.authorizationUrl){let t=window.open(e.authorizationUrl,"thursday-oauth","popup,width=520,height=720");z.toast.add({title:`${e.name} needs authorization`,description:"Approve access in the window that just opened"});let n=Date.now()+3e5,s=setInterval(()=>{let e=!t||t.closed;!(!e&&Date.now()<n)&&(clearInterval(s),e&&(0,_.revalidate)(g.queryKey.mcp))},700);return}"error"===e.status?z.toast.add({type:"error",title:`${e.name} could not connect`,description:e.error}):z.toast.add({type:"success",title:`${e.name} connected`,description:`${e.toolCount} ${1===e.toolCount?"tool":"tools"} available`})}(e)}};function ec({filter:e,onFilter:n,onPreset:s}){let r=e.trim().toLowerCase(),a=K.filter(e=>!r||`${e.name} ${e.description}`.toLowerCase().includes(r));return(0,t.jsx)(H.SettingGroup,{label:"Presets",filter:(0,t.jsx)(H.SettingFilter,{value:e,onChange:n,placeholder:"Filter presets",className:"w-56"}),right:r?`${a.length} of ${K.length}`:void 0,children:(0,t.jsx)("div",{className:"grid grid-cols-[repeat(4,minmax(0,1fr))] gap-3",children:a.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>s(e),className:"group relative flex flex-col gap-2 rounded-xl border border-border/60 p-3 text-left text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(o.Plus,{className:"absolute top-3 right-3 size-3.5 shrink-0 text-muted-foreground/50 group-hover:text-foreground"}),(0,t.jsx)("span",{className:"grid size-6 shrink-0 place-items-center rounded-md bg-muted text-muted-foreground",children:e.icon?(0,t.jsx)(k.SiteIcon,{host:e.icon,className:"size-4",fallback:(0,t.jsx)(m,{className:"size-3.5"})}):(0,t.jsx)(m,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"block truncate font-mono text-xs font-semibold",children:e.name}),(0,t.jsx)("span",{className:"block truncate text-xs",children:e.description})]})]},e.name))})})}function el(e){return E(e)?e.url:[e.command,...e.args??[]].join(" ")}e.s(["McpSetting",0,function(){let[e,n]=(0,h.useState)(""),{data:s=[],isLoading:r,error:a}=(0,_.useServerRoute)(g.queryKey.mcp);if(r)return(0,t.jsx)(H.SettingSkeleton,{rows:3});if(a)return(0,t.jsx)(H.SettingError,{message:a.message});let o=s.reduce((e,t)=>e+t.toolCount,0),i=s.filter(e=>e.lastError).length;return(0,t.jsxs)(H.SettingScreen,{footer:(0,t.jsx)(H.SettingRailNote,{children:0===s.length?"Nothing connected yet — a preset is the shortest way in":(0,t.jsxs)(t.Fragment,{children:[s.length-i," connected · ",o," tools",i>0&&` \xb7 ${i} failed`]})}),children:[(0,t.jsx)(H.SettingGroup,{label:"Connected",children:(0,t.jsx)(H.SettingItems,{addRow:{label:"Add server",onClick:()=>ee()},children:s.map(e=>(0,t.jsx)(Q,{server:e},e.name))})}),(0,t.jsx)(ec,{filter:e,onFilter:n,onPreset:ee})]})}],787800)},333999,e=>{"use strict";var t=e.i(271645),n=e.i(647163);e.s(["useObjectState",0,e=>{let[s,r]=(0,t.useState)(e);return[s,(0,t.useMemo)(()=>{let e=e=>{r(t=>{let s=(0,n.isFunction)(e)?e(t):e;return Object.keys(s).some(e=>!Object.is(t[e],s[e]))?{...t,...s}:t})},t=new Map;return new Proxy(e,{get(s,r,a){if("symbol"==typeof r)return Reflect.get(s,r,a);let o=t.get(r);return o||(o=t=>{e(e=>({[r]:(0,n.isFunction)(t)?t(e[r]):t}))},t.set(r,o)),o}})},[])]}])},21357,e=>{"use strict";var t=e.i(456420);let n={name:"play",size:24,node:[["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"}]]};n.node;let s=(0,t.default)(n);e.s(["Play",0,s],21357)},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
|