thursday-agent 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +0 -1
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +0 -6
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  13. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +1 -1
  15. package/.next/server/app/_not-found.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  19. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  24. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  26. package/.next/server/app/api/config/route.js.nft.json +1 -1
  27. package/.next/server/app/api/events/route.js.nft.json +1 -1
  28. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  29. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  30. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  31. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  32. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  33. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  34. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  36. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  37. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  38. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  39. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  40. package/.next/server/app/api/reach/route.js +13 -13
  41. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  42. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  43. package/.next/server/app/api/signins/route.js +1 -1
  44. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  45. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  47. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  48. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  49. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  50. package/.next/server/app/api/thursday/tool-call/route.js +14 -15
  51. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  52. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  53. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  54. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  55. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  56. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  58. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  59. package/.next/server/app/page/server-reference-manifest.json +56 -56
  60. package/.next/server/app/page.js +4 -4
  61. package/.next/server/app/page.js.nft.json +1 -1
  62. package/.next/server/app/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app-paths-manifest.json +0 -1
  64. package/.next/server/chunks/[root-of-the-server]__014ydvq._.js +2 -2
  65. package/.next/server/chunks/[root-of-the-server]__0209ah4._.js +7 -5
  66. package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +4 -2
  67. package/.next/server/chunks/[root-of-the-server]__04wldw9._.js +1 -1
  68. package/.next/server/chunks/[root-of-the-server]__0542v_d._.js +3 -0
  69. package/.next/server/chunks/[root-of-the-server]__0cfszwn._.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__0gewdg9._.js +2 -2
  71. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  72. package/.next/server/chunks/[root-of-the-server]__0npn_pn._.js +1 -1
  73. package/.next/server/chunks/[root-of-the-server]__0nr-v8s._.js +1 -1
  74. package/.next/server/chunks/[root-of-the-server]__0rqgb17._.js +1 -1
  75. package/.next/server/chunks/[root-of-the-server]__1-swlkw._.js +2 -2
  76. package/.next/server/chunks/[root-of-the-server]__12iddfq._.js +1 -1
  77. package/.next/server/chunks/[root-of-the-server]__1ai5lme._.js +3 -3
  78. package/.next/server/chunks/[root-of-the-server]__1cjxw0-._.js +2 -2
  79. package/.next/server/chunks/{[root-of-the-server]__1fy2g82._.js → [root-of-the-server]__1k3j52n._.js} +1 -1
  80. package/.next/server/chunks/[root-of-the-server]__1kyjt5m._.js +3 -3
  81. package/.next/server/chunks/[root-of-the-server]__1tg5got._.js +1 -1
  82. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  83. package/.next/server/chunks/_05v8k21._.js +3 -1
  84. package/.next/server/chunks/_0awtznl._.js +1 -1
  85. package/.next/server/chunks/_0f6ts7z._.js +1 -1
  86. package/.next/server/chunks/_0na2fj1._.js +1 -1
  87. package/.next/server/chunks/_0x-ej3f._.js +17 -17
  88. package/.next/server/chunks/_10tkr26._.js +1 -1
  89. package/.next/server/chunks/_12-amdu._.js +2 -2
  90. package/.next/server/chunks/_15740dw._.js +60 -0
  91. package/.next/server/chunks/_1dc_d1q._.js +3 -3
  92. package/.next/server/chunks/_1i350l5._.js +3 -1
  93. package/.next/server/chunks/_1jc5g4p._.js +2 -2
  94. package/.next/server/chunks/_1jn-aep._.js +4 -4
  95. package/.next/server/chunks/_1m88lkh._.js +11 -11
  96. package/.next/server/chunks/_1ogqovh._.js +4 -4
  97. package/.next/server/chunks/_1taa4bs._.js +1 -1
  98. package/.next/server/chunks/_1tpr507._.js +1 -1
  99. package/.next/server/chunks/_1uuucy-._.js +1 -1
  100. package/.next/server/chunks/_1zxp-p6._.js +1 -1
  101. package/.next/server/chunks/features_0rfvely._.js +5 -3
  102. package/.next/server/chunks/ssr/[root-of-the-server]__0a967km._.js +3 -0
  103. package/.next/server/chunks/ssr/{[root-of-the-server]__1se25x0._.js → [root-of-the-server]__0hpp3nw._.js} +29 -13
  104. package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +24 -60
  105. package/.next/server/chunks/ssr/{[root-of-the-server]__0tvavy9._.js → [root-of-the-server]__1iwyp1e._.js} +1 -1
  106. package/.next/server/chunks/ssr/[root-of-the-server]__1r77-88._.js +3 -0
  107. package/.next/server/chunks/ssr/[root-of-the-server]__1w9hqq8._.js +1 -1
  108. package/.next/server/chunks/ssr/_026qnc9._.js +1 -1
  109. package/.next/server/chunks/ssr/{_173siic._.js → _02c7o30._.js} +2 -2
  110. package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
  111. package/.next/server/chunks/ssr/_0euzzf8._.js +3 -0
  112. package/.next/server/chunks/ssr/{_1u2jw0i._.js → _0fbi6om._.js} +3 -3
  113. package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
  114. package/.next/server/chunks/ssr/_0igfcax._.js +20 -0
  115. package/.next/server/chunks/ssr/_0ld9_qq._.js +1 -1
  116. package/.next/server/chunks/ssr/_0nvh1h9._.js +3 -0
  117. package/.next/server/chunks/ssr/_0qmpw35._.js +3 -0
  118. package/.next/server/chunks/ssr/{_1yk6yak._.js → _0rmaf32._.js} +2 -2
  119. package/.next/server/chunks/ssr/_0uv-qs4._.js +3 -0
  120. package/.next/server/chunks/ssr/{_1doidrw._.js → _10f-jib._.js} +2 -2
  121. package/.next/server/chunks/ssr/{_05rxyf9._.js → _10mo72m._.js} +2 -2
  122. package/.next/server/chunks/ssr/_12mijol._.js +11 -11
  123. package/.next/server/chunks/ssr/_132qkfz._.js +1 -1
  124. package/.next/server/chunks/ssr/_15zqt-t._.js +1 -1
  125. package/.next/server/chunks/ssr/_16gfxpn._.js +3 -0
  126. package/.next/server/chunks/ssr/_184327j._.js +1 -1
  127. package/.next/server/chunks/ssr/{_1ng831c._.js → _18ujhhq._.js} +2 -2
  128. package/.next/server/chunks/ssr/_1d423aj._.js +7 -5
  129. package/.next/server/chunks/ssr/_1lx6w_o._.js +67 -0
  130. package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
  131. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  132. package/.next/server/chunks/ssr/{_19n08g5._.js → _1ntpny5._.js} +2 -2
  133. package/.next/server/chunks/ssr/{_0bp-_fi._.js → _1o1g4uk._.js} +3 -3
  134. package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
  135. package/.next/server/chunks/ssr/_1yh5bj5._.js +1 -1
  136. package/.next/server/chunks/ssr/{_0tg0vf8._.js → _2008vmi._.js} +8 -8
  137. package/.next/server/chunks/ssr/{features_bot_1yr-_pm._.js → features_bot_1n1s7bh._.js} +2 -2
  138. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  139. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  140. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  141. package/.next/server/chunks/ssr/features_workspace_00jz2hu._.js +1 -1
  142. package/.next/server/chunks/ssr/{node_modules_1n0h9sf._.js → node_modules_0-x0zxm._.js} +1 -1
  143. package/.next/server/chunks/ssr/{node_modules_1xzo2wn._.js → node_modules_00nrzz_._.js} +1 -1
  144. package/.next/server/chunks/ssr/{node_modules_0511ha-._.js → node_modules_01ed0yi._.js} +1 -1
  145. package/.next/server/chunks/ssr/{node_modules_18woe20._.js → node_modules_01u4ea3._.js} +1 -1
  146. package/.next/server/chunks/ssr/{node_modules_1expacw._.js → node_modules_05b6e99._.js} +1 -1
  147. package/.next/server/chunks/ssr/{node_modules_0eb4rx7._.js → node_modules_07jp6tj._.js} +1 -1
  148. package/.next/server/chunks/ssr/{node_modules_0piws2a._.js → node_modules_0azd56x._.js} +1 -1
  149. package/.next/server/chunks/ssr/{node_modules_0f2k5l0._.js → node_modules_0b0iy01._.js} +1 -1
  150. package/.next/server/chunks/ssr/{node_modules_0wq4-ts._.js → node_modules_0fpnetd._.js} +1 -1
  151. package/.next/server/chunks/ssr/{node_modules_11hbkuj._.js → node_modules_0ky76fz._.js} +1 -1
  152. package/.next/server/chunks/ssr/{node_modules_048wmmj._.js → node_modules_0lautv3._.js} +1 -1
  153. package/.next/server/chunks/ssr/{node_modules_1dcbvfw._.js → node_modules_0m3_5ge._.js} +1 -1
  154. package/.next/server/chunks/ssr/{node_modules_0pk6i-e._.js → node_modules_0operbz._.js} +1 -1
  155. package/.next/server/chunks/ssr/{node_modules_1zkpek5._.js → node_modules_0ou0all._.js} +1 -1
  156. package/.next/server/chunks/ssr/{node_modules_04t200t._.js → node_modules_0ucridu._.js} +1 -1
  157. package/.next/server/chunks/ssr/{node_modules_08g12f-._.js → node_modules_0v_-uht._.js} +1 -1
  158. package/.next/server/chunks/ssr/{node_modules_1m2ho33._.js → node_modules_0yzmxfq._.js} +1 -1
  159. package/.next/server/chunks/ssr/{node_modules_1ksh9gy._.js → node_modules_19b0bir._.js} +1 -1
  160. package/.next/server/chunks/ssr/{node_modules_1qehmwm._.js → node_modules_1c2ikr9._.js} +1 -1
  161. package/.next/server/chunks/ssr/{node_modules_1_afpz7._.js → node_modules_1hv-j1l._.js} +1 -1
  162. package/.next/server/chunks/ssr/{node_modules_0cdu6jq._.js → node_modules_1iau_ea._.js} +1 -1
  163. package/.next/server/chunks/ssr/{node_modules_1zf46lp._.js → node_modules_1ma_y68._.js} +1 -1
  164. package/.next/server/chunks/ssr/{node_modules_0s1lwc9._.js → node_modules_1omg9xr._.js} +1 -1
  165. package/.next/server/chunks/ssr/{node_modules_1cxc8kn._.js → node_modules_1wgnj8q._.js} +1 -1
  166. package/.next/server/chunks/ssr/{node_modules_0zjqwz7._.js → node_modules_1wvf3oo._.js} +1 -1
  167. package/.next/server/chunks/ssr/{node_modules_1_ban4u._.js → node_modules_1z3sh11._.js} +1 -1
  168. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0avl8-1._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0tmjn9w._.js} +1 -1
  169. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_14oslro._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1_e8c3o._.js} +1 -1
  170. package/.next/server/middleware-build-manifest.js +3 -3
  171. package/.next/server/pages/404.html +1 -1
  172. package/.next/server/pages/500.html +1 -1
  173. package/.next/server/server-reference-manifest.js +1 -1
  174. package/.next/server/server-reference-manifest.json +57 -57
  175. package/.next/static/chunks/09pkygbht7ki8.js +18 -0
  176. package/.next/static/chunks/0bm-nhblcmmj4.js +17 -0
  177. package/.next/static/chunks/{22shnca_6zfzs.js → 0hhza87hkbqaz.js} +1 -1
  178. package/.next/static/chunks/{19ojn4lomsk0r.js → 0mscosx0eh3ee.js} +1 -1
  179. package/.next/static/chunks/{3vynnr71ghvom.js → 0p50d-au6-3hx.js} +2 -2
  180. package/.next/static/chunks/{42890jqk049q1.js → 0p9jcyqkpq71f.js} +1 -1
  181. package/.next/static/chunks/{35kwn237o4wdn.js → 0qgn3u86jkbm7.js} +1 -1
  182. package/.next/static/chunks/{2d4z3er53ng8r.js → 0samf80yu2b17.js} +1 -1
  183. package/.next/static/chunks/{1pjygp7hqib6j.js → 1czfknd4luo6t.js} +1 -1
  184. package/.next/static/chunks/{09120tms63y21.js → 1jz8n0mhtdzr8.js} +1 -1
  185. package/.next/static/chunks/206laxm6maiz2.js +1 -0
  186. package/.next/static/chunks/{24dst4mgurbsh.js → 2_c7mu6x1lu49.js} +1 -1
  187. package/.next/static/chunks/{2ky81z-jgvasc.js → 2h-tlhb2ffhkk.js} +1 -1
  188. package/.next/static/chunks/{0oz3rs47yy3p8.js → 2i5_w8olnrvo0.js} +2 -2
  189. package/.next/static/chunks/{1mwee7xvitlp9.js → 2m8iqwc6sykln.js} +1 -1
  190. package/.next/static/chunks/{0o980477kfqez.js → 2r6xnyg7ezyxr.js} +1 -1
  191. package/.next/static/chunks/33fyp-byw48ju.js +65 -0
  192. package/.next/static/chunks/{2ndw4w4u2x51r.js → 35yd_27d9ylra.js} +1 -1
  193. package/.next/static/chunks/{3exjsi8pfdvzj.js → 3ag1i3__yl94f.js} +1 -1
  194. package/.next/static/chunks/{3obf9n3cxj99k.js → 3jvldk2wvwbge.js} +1 -1
  195. package/.next/static/chunks/3m_ejzg-xn21r.css +1 -0
  196. package/.next/static/chunks/{0w20wnnfrscq7.js → 3s-jpd3ky49-n.js} +1 -1
  197. package/.next/static/chunks/40ij3wsn3vt7h.js +1 -0
  198. package/README.md +1 -1
  199. package/app/api/thursday/tool-call/route.ts +1 -15
  200. package/docs/images/demo-still.jpg +0 -0
  201. package/docs/live-calls.md +19 -11
  202. package/features/ai/components/model-picker.tsx +8 -2
  203. package/features/ai/model.schema.ts +26 -0
  204. package/features/ai/prompts/live.prompt.ts +51 -26
  205. package/features/ai/prompts/prompt-helper.ts +1 -9
  206. package/features/ai/prompts/thursday.prompt.ts +8 -2
  207. package/features/bot/bot.run.ts +9 -3
  208. package/features/bot/bot.seed.ts +35 -91
  209. package/features/bot/components/bot-room.tsx +3 -12
  210. package/features/bot/components/room-list.tsx +1 -1
  211. package/features/bot/components/room-pill.tsx +44 -55
  212. package/features/bot/seed-bots.ts +2 -2
  213. package/features/config/components/config-badge.tsx +6 -0
  214. package/features/config/components/config-setting.tsx +20 -1
  215. package/features/config/components/models-badge.tsx +5 -7
  216. package/features/config/components/voice-key.tsx +24 -1
  217. package/features/config/config.const.ts +7 -0
  218. package/features/intro/components/intro.tsx +4 -19
  219. package/features/reach/reach.ts +2 -2
  220. package/features/settings/components/setting-ui.tsx +14 -5
  221. package/features/settings/components/settings.tsx +3 -1
  222. package/features/settings/settings.alert.ts +12 -11
  223. package/features/signins/signins.query.ts +66 -1
  224. package/features/thursday/components/side-captions.tsx +31 -8
  225. package/features/thursday/components/tab-state.tsx +5 -2
  226. package/features/thursday/components/thursday.tsx +158 -68
  227. package/features/thursday/components/write-line.tsx +37 -17
  228. package/features/thursday/thursday.action.ts +4 -20
  229. package/features/thursday/thursday.schema.ts +0 -9
  230. package/features/thursday/thursday.store.ts +11 -15
  231. package/features/thursday/thursday.text.ts +10 -8
  232. package/features/thursday/tool-line.ts +17 -6
  233. package/features/thursday/use-call-ring.ts +1 -5
  234. package/features/thursday/use-text-call.ts +37 -21
  235. package/features/thursday/use-thursday.ts +14 -44
  236. package/features/workspace/workspace.ts +4 -2
  237. package/guide/bots.md +12 -2
  238. package/guide/calls.md +9 -6
  239. package/guide/setup.md +4 -1
  240. package/lib/live/live.session.ts +0 -39
  241. package/package.json +1 -1
  242. package/scripts/live-session.test.mts +19 -26
  243. package/seed-skills/analyst/README.md +3 -4
  244. package/seed-skills/analyst/data-report/SKILL.md +5 -4
  245. package/seed-skills/insta/instagram/SKILL.md +5 -2
  246. package/seed-skills/insta/instagram/references/post.md +2 -2
  247. package/seed-skills/insta/instagram/scripts/compose.mjs +5 -1
  248. package/seed-skills/insta/instagram/scripts/inbox.mjs +5 -1
  249. package/seed-skills/insta/instagram/scripts/lib.mjs +12 -70
  250. package/seed-skills/insta/instagram/scripts/media.mjs +1 -1
  251. package/seed-skills/insta/instagram/scripts/profile.mjs +6 -2
  252. package/seed-skills/insta/instagram/scripts/read.mjs +5 -1
  253. package/seed-skills/insta/instagram/scripts/search.mjs +6 -2
  254. package/seed-skills/insta/instagram/scripts/sheet.mjs +31 -88
  255. package/seed-skills/insta/instagram/templates/carousel.html +1 -1
  256. package/seed-skills/tutor/picture-book/SKILL.md +16 -0
  257. package/seed-skills/tutor/picture-book/book/book.css +181 -0
  258. package/seed-skills/tutor/picture-book/book/book.html +33 -0
  259. package/seed-skills/tutor/picture-book/book/book.js +60 -0
  260. package/seed-skills/tutor/picture-book/references/picture-book.md +104 -0
  261. package/seed-skills/tutor/picture-book/scripts/book-video.mjs +177 -0
  262. package/seed-skills/tutor/picture-book/scripts/book.mjs +98 -0
  263. package/skills/browser/SKILL.md +13 -4
  264. package/skills/browser/references/scripts.md +55 -0
  265. package/{seed-skills/insta/instagram → skills/browser}/scripts/render.mjs +1 -1
  266. package/skills/browser/scripts/session.mjs +105 -0
  267. package/skills/browser/scripts/sheet.mjs +97 -0
  268. package/{seed-skills/insta/instagram → skills/browser}/scripts/webimage.mjs +1 -1
  269. package/skills/interactive-page/SKILL.md +4 -3
  270. package/{seed-skills/analyst/data-report → skills/interactive-page}/scripts/chart.mjs +3 -3
  271. package/skills/interactive-page/scripts/page.mjs +1 -0
  272. package/.next/server/app/api/probe/route/app-paths-manifest.json +0 -3
  273. package/.next/server/app/api/probe/route/build-manifest.json +0 -12
  274. package/.next/server/app/api/probe/route/server-reference-manifest.json +0 -4
  275. package/.next/server/app/api/probe/route.js +0 -10
  276. package/.next/server/app/api/probe/route.js.map +0 -5
  277. package/.next/server/app/api/probe/route.js.nft.json +0 -1
  278. package/.next/server/app/api/probe/route_client-reference-manifest.js +0 -3
  279. package/.next/server/chunks/[root-of-the-server]__012s2o8._.js +0 -3
  280. package/.next/server/chunks/[root-of-the-server]__0z0hc1f._.js +0 -4
  281. package/.next/server/chunks/[root-of-the-server]__1v7-zke._.js +0 -5
  282. package/.next/server/chunks/_0whlpyi._.js +0 -4
  283. package/.next/server/chunks/_next-internal_server_app_api_probe_route_actions_0cqd30j.js +0 -3
  284. package/.next/server/chunks/ssr/[root-of-the-server]__0cxqzfc._.js +0 -103
  285. package/.next/server/chunks/ssr/[root-of-the-server]__1-d2tgh._.js +0 -3
  286. package/.next/server/chunks/ssr/_070nv1_._.js +0 -3
  287. package/.next/server/chunks/ssr/_0hlxij-._.js +0 -3
  288. package/.next/server/chunks/ssr/_0p9pmxe._.js +0 -3
  289. package/.next/server/chunks/ssr/_0s41irp._.js +0 -3
  290. package/.next/server/chunks/ssr/_157yfrk._.js +0 -3
  291. package/.next/server/chunks/ssr/_17v-33v._.js +0 -20
  292. package/.next/server/chunks/ssr/_1flsjeo._.js +0 -3
  293. package/.next/static/chunks/03kgfyrli_0gz.js +0 -1
  294. package/.next/static/chunks/1p764d75_0lhv.js +0 -18
  295. package/.next/static/chunks/25zq8gzhbdsr7.js +0 -1
  296. package/.next/static/chunks/2qod5tqlpz8b7.js +0 -17
  297. package/.next/static/chunks/30skcjexa57zn.js +0 -101
  298. package/.next/static/chunks/3qq4o8w2rv_e9.css +0 -1
  299. package/lib/probe.server.ts +0 -17
  300. package/lib/probe.ts +0 -55
  301. package/seed-skills/mail/mail/SKILL.md +0 -37
  302. package/seed-skills/mail/mail/recipes/gmail.mjs +0 -448
  303. package/seed-skills/mail/mail/references/recipes.md +0 -55
  304. package/seed-skills/mail/mail/scripts/mail.mjs +0 -202
  305. /package/.next/static/{Ar5V4kMdL4CE1trx8anrH → QSe0rTdXU5kh5BBzr2XBB}/_buildManifest.js +0 -0
  306. /package/.next/static/{Ar5V4kMdL4CE1trx8anrH → QSe0rTdXU5kh5BBzr2XBB}/_clientMiddlewareManifest.js +0 -0
  307. /package/.next/static/{Ar5V4kMdL4CE1trx8anrH → QSe0rTdXU5kh5BBzr2XBB}/_ssgManifest.js +0 -0
  308. /package/{seed-skills/insta/instagram → skills/browser}/scripts/image-size.mjs +0 -0
@@ -1,20 +0,0 @@
1
- module.exports=[405593,a=>{"use strict";var b=a.i(187924),c=a.i(987234),d=a.i(164831);let e={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"}]]};e.node;let f=(0,d.default)(e),g={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"]};g.node;let h=(0,d.default)(g);var i=a.i(752562),j=a.i(141146);let k={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"}]]};k.node;let l=(0,d.default)(k);var m=a.i(607396),m=m,n=a.i(71215),o=a.i(126766),p=a.i(233540),q=a.i(180447),r=a.i(26268),s=a.i(572131),t=a.i(767561),u=a.i(340695),v=a.i(205522),w=a.i(446181),x=a.i(630342),y=a.i(341889),z=a.i(950463),A=a.i(852307),B=a.i(608902),C=a.i(379630),D=a.i(61876),E=a.i(913834),F=a.i(265210),G=a.i(316484),H=a.i(478978),I=a.i(585650),J=a.i(777794),K=a.i(907602);let L={telegram:"telegram.org",discord:"discord.com",slack:"slack.com"},M=`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
- `,N=({href:a,children:c})=>(0,b.jsx)("a",{href:a,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:c}),O=({children:a})=>(0,b.jsx)("span",{className:"font-medium text-foreground",children:a}),P={telegram:[(0,b.jsxs)(b.Fragment,{children:["In Telegram, write to"," ",(0,b.jsx)(N,{href:"https://t.me/BotFather",children:"@BotFather"}),", send ",(0,b.jsx)(O,{children:"/newbot"})," ","and pick a name. It answers with a ",(0,b.jsx)(O,{children:"token"}),"."]}),(0,b.jsxs)(b.Fragment,{children:["Paste the token below, under ",(0,b.jsx)(O,{children:"Telegram"}),"."]}),(0,b.jsxs)(b.Fragment,{children:["From your phone, ",(0,b.jsx)(O,{children:"write anything to your new bot"}),"."]}),(0,b.jsxs)(b.Fragment,{children:["A question appears on this computer. Press ",(0,b.jsx)(O,{children:"Allow"}),". Done — write to the bot and Thursday answers."]})],discord:[(0,b.jsxs)(b.Fragment,{children:["At"," ",(0,b.jsx)(N,{href:"https://discord.com/developers/applications",children:"discord.com/developers"}),", make a ",(0,b.jsx)(O,{children:"New Application"}),". On its ",(0,b.jsx)(O,{children:"Bot"})," page press"," ",(0,b.jsx)(O,{children:"Reset Token"})," and copy it."]}),(0,b.jsxs)(b.Fragment,{children:["Paste the token below, under ",(0,b.jsx)(O,{children:"Discord"}),"."]}),(0,b.jsxs)(b.Fragment,{children:["On the application's ",(0,b.jsx)(O,{children:"OAuth2"})," page, make an invite link with the"," ",(0,b.jsx)(O,{children:"bot"})," scope and add the bot to a server of your own. Discord only lets you write to a bot you share a server with."]}),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(O,{children:"Send the bot a direct message"})," (not in the server), then press"," ",(0,b.jsx)(O,{children:"Allow"})," on this computer."]})],slack:[(0,b.jsxs)(b.Fragment,{children:["At ",(0,b.jsx)(N,{href:"https://api.slack.com/apps",children:"api.slack.com/apps"}),","," ",(0,b.jsx)(O,{children:"Create New App › From a manifest"}),", and paste the manifest (the button under these steps copies it)."]}),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(O,{children:"Basic Information › App-Level Tokens"}),": generate one with"," ",(0,b.jsx)(O,{children:"connections:write"}),". It starts with xapp- — paste it below as the"," ",(0,b.jsx)(O,{children:"app token"}),"."]}),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(O,{children:"Install App"})," to your workspace. The Bot User OAuth Token starts with xoxb- — paste it below as the ",(0,b.jsx)(O,{children:"bot token"}),"."]}),(0,b.jsxs)(b.Fragment,{children:["In Slack, open the app under ",(0,b.jsx)(O,{children:"Apps"}),", write in its ",(0,b.jsx)(O,{children:"Messages"})," ","tab, then press ",(0,b.jsx)(O,{children:"Allow"})," on this computer."]})]};function Q(){let[a,c]=(0,s.useState)("telegram"),[d,e]=(0,s.useState)(!1);return(0,b.jsxs)("section",{className:"space-y-4 rounded-xl bg-muted/40 p-4",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,b.jsx)("p",{className:"min-w-0 flex-1 text-sm font-medium",children:"Connect a chat app in four steps"}),(0,b.jsx)(J.Segmented,{"aria-label":"Which chat app",value:a,onChange:c,options:K.REACH_CHANNELS.map(a=>({value:a,label:(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(y.SiteIcon,{host:L[a],className:"size-3.5 rounded-[3px]"}),K.REACH_LABEL[a]]})}))})]}),(0,b.jsx)("ol",{className:"space-y-2.5",children:P[a].map((a,c)=>(0,b.jsxs)("li",{className:"flex gap-3 text-[13px] leading-relaxed",children:[(0,b.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-full bg-background font-mono text-[10.5px] text-muted-foreground ring-1 ring-border/60",children:c+1}),(0,b.jsx)("span",{className:"min-w-0 text-muted-foreground",children:a})]},c))}),"slack"===a&&(0,b.jsxs)(u.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(M).then(()=>{e(!0),setTimeout(()=>e(!1),2e3)}),children:[d?(0,b.jsx)(i.Check,{}):(0,b.jsx)(I.Copy,{}),d?"Copied":"Copy the manifest"]}),(0,b.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:["Only the one person you allow can write, and only direct messages are read. This computer has to be on with Thursday running; for bots to work while no tab is open, switch on ",(0,b.jsx)(O,{children:"Work while the app is closed"})," in Settings › Bots."]})]})}var R=a.i(986368),S=a.i(313237),T=a.i(759497),U=a.i(497895),V=a.i(405050);let W=(0,V.createServerReference)("7fa609aaba119f440bacd729953ca9f7df8aede8ed",V.callServer,void 0,V.findSourceMapURL,"forgetReachAction");function X(){let{data:a}=(0,T.useServerRoute)(t.queryKey.reach);return((0,R.useAppEvent)({reach:()=>void(0,T.revalidate)(t.queryKey.reach)}),a?.channels.length)?(0,b.jsx)("div",{className:"pt-2",children:a.channels.map(a=>(0,b.jsx)(Y,{channel:a},a.name))}):null}function Y({channel:a}){let[c,d]=(0,S.useServerAction)(W,{onOk:()=>(0,T.revalidate)(t.queryKey.reach)}),e="px-1 text-xs leading-6",f=K.REACH_LABEL[a.name];return a.problem&&!a.bot?(0,b.jsxs)("p",{className:(0,U.cn)(e,"text-destructive"),children:[f,": ",a.problem]}):a.bot?a.allowed?(0,b.jsxs)("p",{className:(0,U.cn)(e,"text-muted-foreground"),children:[f,": listening as ",a.bot,". ",a.allowed.name," is let in."," ",(0,b.jsx)("button",{type:"button",disabled:d,onClick:()=>void c(a.name).catch(()=>{}),className:"rounded-sm text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:"Let them go"})]}):(0,b.jsxs)("p",{className:(0,U.cn)(e,U.WAITING_INK),children:[f,": listening as ",a.bot,". Write to it from your phone, then press Allow here."]}):(0,b.jsxs)("p",{className:(0,U.cn)(e,"text-muted-foreground"),children:[f,": connecting…"]})}var Z=a.i(619477);let $={[H.EXA_API_KEY]:p.Search,...Object.fromEntries(Object.values(K.REACH_KEYS).flat().map(a=>[a,q.Smartphone]))},_={image:n.Image,video:l,speech:f,transcription:h},aa={keys:["voice","easy","text","search"],models:["bots","studio"],phone:["phone"]};function ab({screen:a}){let{data:c,isLoading:d,error:e}=(0,T.useServerRoute)(t.queryKey.config);if(d)return(0,b.jsx)(Z.SettingSkeleton,{rows:4});if(e)return(0,b.jsx)(Z.SettingError,{message:e.message});let f=a=>(0,H.isConfigSet)(c,a),g=aa[a].flatMap(a=>H.CONFIG_GROUPS.find(b=>b.id===a)??[]),h=g.filter(a=>"keys"===a.section).flatMap(a=>a.entries);return(0,b.jsxs)(Z.SettingScreen,{footer:(0,b.jsx)(Z.SettingRailNote,{children:"models"===a?"Her own voice and backend models are in Thursday. A bot can pick its own on its page.":"phone"===a?"Nothing on this computer is opened to the internet: the app asks the chat service what was written.":`${h.filter(a=>f(a.key)).length} of ${h.length} set${g.some(a=>!(0,H.groupSatisfied)(a,f))?" · a call needs one voice key":" · your keys stay on this machine"}`}),children:["phone"===a&&(0,b.jsx)(Q,{}),g.map(a=>(0,b.jsxs)(Z.SettingGroup,{label:a.title,hint:a.hint,right:(0,b.jsx)(ad,{group:a,isSet:f}),children:["easy"===a.id?(0,b.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:a.entries.map(a=>(0,b.jsx)(ae,{card:!0,entry:a,set:f(a.key),needed:!1},a.key))}):"text"===a.id?(0,b.jsx)("div",{className:"flex flex-wrap gap-x-1.5 gap-y-3.5",children:a.entries.map(a=>(0,b.jsx)(ac,{entry:a,set:f(a.key)},a.key))}):(0,b.jsx)(Z.SettingItems,{children:a.entries.map(d=>{let e;return d.choices?(0,b.jsx)(an,{entry:d,choices:d.choices,value:(e=d.key,c?.find(a=>a.key===e)?.value),isSet:f},d.key):(0,b.jsx)(ae,{entry:d,set:f(d.key),needed:!(0,H.groupSatisfied)(a,f)},d.key)})}),"phone"===a.id&&(0,b.jsx)(X,{})]},a.id))]})}function ac({entry:a,set:c}){return(0,b.jsxs)("button",{type:"button",onClick:()=>ar(a,c),"aria-label":`${a.label}: ${c?"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,b.jsxs)("span",{className:"relative grid size-10.5 place-items-center rounded-[13px] bg-muted/60 transition-colors group-hover:bg-muted",children:[(0,b.jsx)(am,{entry:a}),c&&(0,b.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,b.jsx)(i.Check,{className:"size-2.5"})})]}),(0,b.jsx)("span",{className:(0,U.cn)("max-w-full truncate text-[11px]",c?"text-foreground":"text-muted-foreground"),children:a.label})]})}function ad({group:a,isSet:c}){return"none"===a.require?null:(0,H.groupSatisfied)(a,c)?(0,b.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,b.jsx)(i.Check,{className:"size-3"}),"ready"]}):(0,b.jsxs)("span",{className:(0,U.cn)("flex items-center gap-1 font-mono text-[11px]",U.WAITING_INK),children:[(0,b.jsx)(r.TriangleAlert,{className:"size-3"}),a.note??"Required"]})}function ae({entry:a,set:c,needed:d,card:e=!1,narrow:f=!1}){let g=ah(a,c),h=aj(a,c),k=ai(a,c),l=h.data?ak(h.data):ag(c,d,g.data,a.signIn),m=g.isLoading||h.isLoading,n=(0,b.jsxs)("span",{className:(0,U.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",l.ink),children:[l.warn?(0,b.jsx)(r.TriangleAlert,{className:"size-3"}):c&&(0,b.jsx)(i.Check,{className:"size-3"}),l.text]});return(0,b.jsxs)("button",{type:"button",onClick:()=>{var d;return a.signIn?(d=a,w.notify.component({className:"sm:max-w-md",renderer:({close:a})=>(0,b.jsx)(aq,{entry:d,onDone:a})})):ar(a,c)},className:(0,U.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",e&&"rounded-xl border border-border/60"),children:[(0,b.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,b.jsx)(am,{entry:a})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,b.jsxs)("span",{className:"flex items-center gap-2 truncate text-sm font-medium",children:[a.label,a.recommended&&(0,b.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"})]}),f?m?(0,b.jsx)(z.Skeleton,{className:"h-3 w-20"}):n:(0,b.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:a.signIn?c?al(h.data,k):"sign in with your account":a.key})]}),f?null:m?(0,b.jsx)(z.Skeleton,{className:"h-3 w-20 shrink-0"}):n,(0,b.jsx)(j.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let af=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function ag(a,b,c,d){return a?c?"refused"in c?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${af.format(c.balance)} left`,ink:c.low?U.WAITING_INK:"text-muted-foreground",warn:c.low}:{text:d?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:b?{text:"Needed",ink:U.WAITING_INK,warn:!0}:{text:d?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function ah(a,b){return(0,T.useServerRoute)(b&&"vercel-ai-gateway"===a.provider?t.queryKey.gatewayCredits:null)}function ai(a,b){let{data:c}=(0,T.useServerRoute)(b&&a.signIn?t.queryKey.llmModel:null);return c?.find(b=>b.id===a.provider)?.plan??null}function aj(a,b){return(0,T.useServerRoute)(b&&a.signIn?t.queryKey.subscriptionUsage:null)}function ak(a){return"refused"in a?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:a.spent?"Limit reached":`${a.usedPercent}% used`,ink:a.high?U.WAITING_INK:"text-muted-foreground",warn:a.high}}function al(a,b){let d=!a||"refused"in a?null:a,e=`${d?.plan??b??"unknown"} plan`;return d?.resetsAt?`${e} \xb7 resets in ${(0,c.formatDistanceToNowStrict)(new Date(d.resetsAt))}`:e}function am({entry:a}){if(a.provider)return(0,b.jsx)(C.ProviderIcon,{provider:a.provider,className:"size-4"});let c=$[a.key]??o.KeyRound,d=(0,b.jsx)(c,{className:"size-4 text-muted-foreground"});return a.site?(0,b.jsx)(y.SiteIcon,{host:a.site,className:"size-4 rounded-[4px]",fallback:d}):d}function an({entry:a,choices:c,value:d,isSet:e}){let f=c.find(a=>a.value===d),g=c.filter(a=>e(a.needs)),h=d&&!f?d:null,i=a.kind?_[a.kind]:E.BotsMark;return(0,b.jsxs)("button",{type:"button",onClick:()=>{var d,e,f;return a.kind||a.text?(d=a,w.notify.component({className:"sm:max-w-lg",renderer:({close:a})=>(0,b.jsx)(ao,{entry:d,onDone:a})})):(e=a,f=c,w.notify.component({className:"sm:max-w-md",renderer:({close:a})=>(0,b.jsx)(ap,{entry:e,choices:f,onDone:a})}))},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,b.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,b.jsx)(i,{className:"size-4 text-muted-foreground"})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,b.jsx)("span",{className:"block truncate text-sm font-medium",children:a.label}),(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!f&&!h&&(0,b.jsx)("span",{className:(0,U.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",a.kind?U.WAITING_INK:"text-muted-foreground"),children:a.kind?"off":"auto"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:f?.label??h??(a.kind?"Not offered to bots until you pick one":g[0]?.label??"No key for any of these yet")})]})]}),(0,b.jsx)(j.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function ao({entry:a,onDone:c}){let{data:d}=(0,T.useServerRoute)(t.queryKey.config),e=d?.find(b=>b.key===a.key)?.value,[f,g]=(0,s.useState)(()=>{let b=a.text?(0,D.parseTextModel)(e):(0,D.parseMediaModel)(e);return{provider:b?.provider??null,model:b?.model??""}}),h=()=>{(0,T.revalidate)(t.queryKey.config),c()},[i]=(0,S.useServerAction)(G.setConfigAction,{okMessage:`${a.label} saved`,onOk:h}),[j,k]=(0,S.useServerAction)(F.removeConfigAction,{okMessage:a.kind?`${a.label} switched off`:`${a.label} back to automatic`,onOk:h});return(0,b.jsx)(Z.SettingDialogContent,{title:a.label,description:a.hint,footer:(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsx)(u.Button,{variant:"ghost",loading:k,onClick:()=>j(a.key),children:a.kind?"Turn off":"Automatic"}),(0,b.jsx)(u.Button,{variant:"ghost",onClick:c,children:"Close"})]}),children:(0,b.jsx)(B.ModelPicker,{kind:a.kind,provider:f.provider,model:f.model,onChange:b=>{g(b),b.model.trim()&&i(a.key,`${b.provider}/${b.model.trim()}`)}})})}function ap({entry:a,choices:c,onDone:d}){let{data:e}=(0,T.useServerRoute)(t.queryKey.config),f=e?.find(b=>b.key===a.key)?.value,g=()=>{(0,T.revalidate)(t.queryKey.config),d()},[h,i]=(0,S.useServerAction)(G.setConfigAction,{okMessage:`${a.label} saved`,onOk:g}),[j,k]=(0,S.useServerAction)(F.removeConfigAction,{okMessage:a.kind?`${a.label} switched off`:`${a.label} back to automatic`,onOk:g});return(0,b.jsx)(Z.SettingDialogContent,{title:a.label,description:a.hint,footer:(0,b.jsxs)(b.Fragment,{children:[f&&(0,b.jsx)(u.Button,{variant:"ghost",loading:k,onClick:()=>j(a.key),children:a.kind?"Turn off":"Automatic"}),(0,b.jsx)(u.Button,{variant:"ghost",onClick:d,children:"Close"})]}),children:(0,b.jsx)(Z.SettingChoiceRows,{options:c.map(a=>({value:a.value,label:a.label,disabled:!(0,H.isConfigSet)(e,a.needs)&&`needs ${a.needs}`})),value:f,onChange:b=>h(a.key,b),disabled:i})})}function aq({entry:a,onDone:c}){let{data:d}=(0,T.useServerRoute)(t.queryKey.config),e=(0,H.isConfigSet)(d,a.key),f=ai(a,e),g=aj(a,e),h=g.data?ak(g.data):null,[i,j]=(0,S.useServerAction)(F.removeConfigAction,{okMessage:`Signed out of ${a.label}`,onOk:()=>{(0,T.revalidate)(t.queryKey.config),(0,T.revalidate)(t.queryKey.llmModel),c()}});return(0,b.jsx)(Z.SettingDialogContent,{title:a.label,description:e?(0,b.jsxs)(b.Fragment,{children:["Signed in ·"," ",(0,b.jsx)("span",{className:"font-mono",children:al(g.data,f)}),h&&(0,b.jsxs)(b.Fragment,{children:[" · ",(0,b.jsx)("span",{className:(0,U.cn)("font-mono",h.ink),children:h.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsx)(u.Button,{variant:"ghost",loading:j,onClick:()=>i(a.key),children:"Sign out"}),(0,b.jsx)(u.Button,{variant:"ghost",onClick:c,children:e?"Close":"Cancel"}),!e&&(0,b.jsx)(A.ChatGptSignIn,{})]}),children:(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Z.SettingNote,{children:e?"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."}),g.data&&"refused"in g.data&&(0,b.jsx)(Z.SettingNote,{className:"wrap-break-word text-destructive",children:g.data.refused})]})})}function ar(a,c){return w.notify.component({className:"sm:max-w-md",renderer:({close:d})=>(0,b.jsx)(as,{entry:a,set:c,onDone:d})})}function as({entry:a,set:c,onDone:d}){let[e,f]=(0,s.useState)(""),{data:g}=ah(a,c),h=g?ag(c,!1,g):null,i=()=>{(0,T.revalidate)(t.queryKey.config),(0,T.revalidate)(t.queryKey.llmModel)},[j,k]=(0,S.useServerAction)(G.setConfigAction,{okMessage:`${a.label} key saved`,onOk:()=>{i(),d()}}),[l,m]=(0,S.useServerAction)(F.removeConfigAction,{okMessage:`${a.label} key removed`,onOk:()=>{i(),d()}});return(0,b.jsx)(Z.SettingDialogContent,{title:a.label,description:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-mono",children:a.key}),a.hint&&(0,b.jsxs)(b.Fragment,{children:[" · ",a.hint]}),h&&(0,b.jsxs)(b.Fragment,{children:[" · ",(0,b.jsx)("span",{className:(0,U.cn)("font-mono",h.ink),children:h.text})]})]}),footer:(0,b.jsxs)(b.Fragment,{children:[c&&(0,b.jsx)(u.Button,{variant:"ghost",loading:m,onClick:()=>l(a.key),children:"Remove"}),(0,b.jsx)(u.Button,{variant:"ghost",onClick:d,children:"Cancel"}),(0,b.jsx)(u.Button,{loading:k,disabled:e.trim().length<8,onClick:()=>j(a.key,e),children:c?"Replace":"Save"})]}),children:(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(v.Input,{value:e,onChange:a=>f(a.target.value),onKeyDown:b=>{"Enter"===b.key&&e.trim().length>=8&&j(a.key,e)},placeholder:c?"New value — replaces the current key":a.key,spellCheck:!1,type:"password",autoFocus:!0}),g&&"refused"in g&&(0,b.jsx)(Z.SettingNote,{className:"wrap-break-word text-destructive",children:g.refused})]})})}a.s(["AccountsSetup",0,function({withoutVoice:a=!1}){let{data:c}=(0,T.useServerRoute)(t.queryKey.config),d=a=>(0,H.isConfigSet)(c,a),e=a=>H.CONFIG_GROUPS.find(b=>b.id===a)?.entries??[],[f,g]=(0,s.useState)(!1),h=e("voice"),i=[...h,...e("text")],j=i.filter((b,c)=>(c<4||d(b.key))&&!(a&&h.includes(b))),k=i.filter(b=>!j.includes(b)&&!(a&&h.includes(b)));return(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsx)("div",{className:"flex flex-col gap-2",children:e("easy").map(a=>(0,b.jsx)(ae,{card:!0,narrow:!0,entry:a,set:d(a.key),needed:!1},a.key))}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-y-2.5",children:[j.map(a=>(0,b.jsx)(ac,{entry:a,set:d(a.key)},a.key)),k.length>0&&(0,b.jsxs)(x.Popover,{open:f,onOpenChange:g,children:[(0,b.jsxs)(x.PopoverTrigger,{"aria-label":`${k.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,b.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,b.jsx)(m.default,{className:"size-4"})}),(0,b.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"More"})]}),(0,b.jsx)(x.PopoverContent,{align:"end",className:"w-78 flex-row flex-wrap gap-0 gap-y-2.5 rounded-2xl p-2.5",onClick:()=>g(!1),children:k.map(a=>(0,b.jsx)(ac,{entry:a,set:d(a.key)},a.key))})]})]}),e("search").map(a=>(0,b.jsx)(ae,{card:!0,narrow:!0,entry:a,set:d(a.key),needed:!1},a.key))]})},"KeysSetting",0,()=>(0,b.jsx)(ab,{screen:"keys"}),"ModelsSetting",0,()=>(0,b.jsx)(ab,{screen:"models"}),"PhoneSetting",0,()=>(0,b.jsx)(ab,{screen:"phone"})],405593)},265210,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f35fd2496a448d9a9078b3acd8ae8690a8bae0571",b.callServer,void 0,b.findSourceMapURL,"removeConfigAction");a.s(["removeConfigAction",0,c])},180447,a=>{"use strict";var b=a.i(164831);let c={name:"smartphone",size:24,node:[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]};c.node;let d=(0,b.default)(c);a.s(["Smartphone",0,d],180447)}];
19
-
20
- //# sourceMappingURL=_17v-33v._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[964665,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(707963),f=a.i(168370),g=a.i(844561),h=a.i(595775),i=a.i(951675),j=a.i(572131),k=a.i(767561),l=a.i(340695),m=a.i(446181),n=a.i(950463),o=a.i(287702),p=a.i(772048),q=a.i(913834),r=a.i(619477),s=a.i(38793),t=a.i(369768),u=a.i(580612),v=a.i(199169),w=a.i(313237),x=a.i(759497),y=a.i(497895),z=b([s,t]);function A(a){let b=new Map;for(let c of a){let a=b.get(c.bot)??[];a.push(c),b.set(c.bot,a)}return[...b].map(([a,b])=>({bot:a,rows:b}))}function B(a,b){let c=b?.find(b=>b.name===a)?.icon;return{color:c?.color,shape:c?.shape,outline:c?.outline,paint:c?.paint}}function C({label:a,mark:b,count:c,active:e,onPick:f}){return(0,d.jsxs)("button",{type:"button",onClick:f,className:(0,y.cn)("mx-2 flex h-9 items-center gap-2 rounded-md px-2 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",e?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[b??(0,d.jsx)(h.Images,{className:"size-4 shrink-0"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] text-muted-foreground/70 tabular-nums",children:c})]})}function D({row:a,file:b,onOpen:c,onBack:h,onGone:j,onShelf:n}){let[o]=(0,w.useServerAction)(u.openFileAction),[q,r]=(0,w.useServerAction)(p.deleteArtifactAction,{okMessage:"Deleted",onOk:()=>{(0,x.revalidate)(k.queryKey.artifacts),b?h():j()}}),s=b?{path:b.path,bytes:b.bytes,at:b.at}:"file"===a.kind?{path:a.path,bytes:a.bytes,at:a.at}:null,z=async a=>{await m.notify.confirm({title:`Delete ${a.split("/").pop()}?`,description:s?"It is deleted from disk for good.":"The folder and everything in it are deleted from disk for good.",okText:"Delete",destructive:!0})&&q(a)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[(0,d.jsxs)("button",{type:"button",onClick:b?h:n,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(e.ChevronLeft,{className:"size-3"}),b?a.name:"Shelf"]}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:s?s.path.split("/").pop()??a.name:a.name}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:s?`${(0,y.formatBytes)(s.bytes)} \xb7 ${(0,v.shortAgo)(s.at)}`:`${a.count} ${1===a.count?"file":"files"} \xb7 ${(0,v.shortAgo)(a.at)}`}),s&&(0,d.jsx)("a",{href:k.queryKey.fileView(s.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,d.jsx)(f.ExternalLink,{className:"size-4"})}),(0,d.jsx)(l.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>o(s?.path??a.path),children:(0,d.jsx)(g.FolderOpen,{})}),(0,d.jsx)(l.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:r,className:"text-muted-foreground",onClick:()=>z(s?.path??a.path),children:(0,d.jsx)(i.Trash2,{})})]}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:s?(0,d.jsx)(t.FilePreview,{path:s.path,bytes:s.bytes}):(0,d.jsx)(E,{path:a.path,onOpen:c})})]})}function E({path:a,onOpen:b}){let{data:c,isLoading:e,error:f}=(0,x.useServerRoute)(k.queryKey.artifactSet(a,o.ARTIFACT_VIEW.setFiles));if(e)return(0,d.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(a,b)=>(0,d.jsx)(n.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},b))});if(f)return(0,d.jsx)(r.SettingError,{message:f.message});let g=c?.files??[];return 0===g.length?(0,d.jsx)("p",{className:"p-5 text-xs text-muted-foreground/60",children:"Nothing in here the app can open."}):(0,d.jsxs)("div",{className:"p-5",children:[(0,d.jsx)("div",{className:"grid grid-cols-4 gap-3",children:g.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>b(a),title:`${a.name} \xb7 ${(0,y.formatBytes)(a.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,d.jsx)(F,{file:a}),(0,d.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:a.name})]},a.path))}),c&&c.total>g.length&&(0,d.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground/60",children:`${g.length} of ${c.total.toLocaleString("en")} — the rest are in the folder`})]})}function F({file:a}){return(0,d.jsx)(s.FileThumb,{path:a.path,bytes:a.bytes,glyph:"size-5",className:"aspect-4/3 w-full rounded-xl"})}function G({entries:a,bots:b,onPick:c}){return(0,d.jsx)("div",{className:"space-y-7 p-6",children:A(a).map(({bot:a,rows:e})=>(0,d.jsxs)("section",{className:"space-y-3",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-medium",children:[a&&(0,d.jsx)(q.BotMark,{size:20,seed:a,...B(a,b),notify:!1,className:"shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:a??"Unsorted"}),(0,d.jsx)("span",{className:"font-mono text-[11px] font-normal text-muted-foreground",children:e.length})]}),(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))] gap-x-4 gap-y-5",children:e.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>c(a),className:"group flex min-w-0 flex-col gap-1.5 rounded-xl text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:["set"===a.kind?(0,d.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,d.jsx)(g.FolderOpen,{className:"size-5"})}):(0,d.jsx)(s.FileThumb,{path:a.path,bytes:a.bytes,glyph:"size-5",className:"aspect-4/3 w-full rounded-xl"}),(0,d.jsxs)("span",{className:"min-w-0 space-y-0.5 px-0.5",children:[(0,d.jsx)("span",{className:"block truncate text-[13px]",children:a.name}),(0,d.jsxs)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:["set"===a.kind?`${a.count} files \xb7 `:"",(0,v.shortAgo)(a.at)]})]})]},a.path))})]},a??""))})}function H({empty:a,onReveal:b}){return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[(0,d.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:a?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. Each bot's work is under its face; a folder it filled is one row, and opens as a sheet."}),(0,d.jsxs)(l.Button,{variant:"outline",onClick:b,children:[(0,d.jsx)(g.FolderOpen,{}),"Reveal folder"]})]})}[s,t]=z.then?(await z)():z,a.s(["ArtifactSetting",0,function(){let[a,b]=(0,j.useState)(null),[c,e]=(0,j.useState)(""),[f,h]=(0,j.useState)(void 0),[i,m]=(0,j.useState)(o.ARTIFACT_VIEW.rows),{data:n,isLoading:p,error:s}=(0,x.useServerRoute)(k.queryKey.artifactShelf(i),{keepPreviousData:!0}),{data:t}=(0,x.useServerRoute)(k.queryKey.bot),[v]=(0,w.useServerAction)(u.openFileAction);if(p)return(0,d.jsx)(r.SettingPanesSkeleton,{});if(s)return(0,d.jsx)(r.SettingError,{message:s.message});let y=n?.entries??[],z=n?.total??0,E=c.trim().toLowerCase(),F=y.filter(a=>(void 0===f||a.bot===f)&&(!E||a.name.toLowerCase().includes(E)||a.bot?.toLowerCase().includes(E))),I=y.find(b=>b.path===a?.row.path)??a?.row;return(0,d.jsx)(r.SettingPanes,{footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r.SettingRailNote,{children:(0,d.jsxs)("span",{className:"font-mono",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:"artifacts"}),` \xb7 ${function(a,b,c){if(0===b)return"empty";let d=b>a.length?`${a.length} of ${b.toLocaleString("en")} artifacts`:`${b} ${1===b?"artifact":"artifacts"}`;return c>b?`${d} \xb7 ${c.toLocaleString("en")} files`:d}(y,z,n?.files??0)}`]})}),(0,d.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:()=>v("artifacts"),children:[(0,d.jsx)(g.FolderOpen,{}),"Reveal folder"]})]}),left:(0,d.jsxs)("div",{className:"flex flex-col py-2",children:[(0,d.jsx)(r.SettingFilter,{value:c,onChange:e,placeholder:"Filter artifacts",className:"mx-2 mb-1.5 w-auto"}),(0,d.jsx)(C,{label:"Everyone",count:y.length,active:void 0===f,onPick:()=>{h(void 0),b(null)}}),A(y).map(({bot:a,rows:c})=>(0,d.jsx)(C,{label:a??"Unsorted",mark:a?(0,d.jsx)(q.BotMark,{size:18,seed:a,...B(a,t),notify:!1,className:"shrink-0"}):void 0,count:c.length,active:f===a,onPick:()=>{h(a),b(null)}},a??"")),z>y.length&&(0,d.jsx)("button",{type:"button",onClick:()=>m(i+o.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(o.ARTIFACT_VIEW.rows,z-y.length)} more of ${z.toLocaleString("en")}`})]}),right:I?(0,d.jsx)(D,{row:I,file:a?.file??null,onOpen:a=>b({row:I,file:a}),onBack:()=>b({row:I,file:null}),onGone:()=>b(null),onShelf:()=>b(null)},I.path):F.length>0?(0,d.jsx)(G,{entries:F,bots:t,onPick:a=>b({row:a,file:null})}):(0,d.jsx)(H,{empty:0===z,onReveal:()=>v("artifacts")})})}]),c()}catch(a){c(a)}},!1),772048,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f6bd3486804e49ac8d1c10ac9a44f986aa91422d3",b.callServer,void 0,b.findSourceMapURL,"deleteArtifactAction");a.s(["deleteArtifactAction",0,c])},595775,a=>{"use strict";var b=a.i(164831);let c={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};c.node;let d=(0,b.default)(c);a.s(["Images",0,d],595775)},951675,a=>{"use strict";var b=a.i(164831);let c={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"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)}];
2
-
3
- //# sourceMappingURL=_1flsjeo._.js.map
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,947627,e=>{"use strict";var t=e.i(843476),a=e.i(647163);e.s(["Table",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...r})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("h-9 px-2 text-left align-middle font-mono text-[11px] font-normal tracking-[0.1em] whitespace-nowrap text-muted-foreground uppercase [&:has([role=checkbox])]:pr-0",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",e),...r})}])},41533,e=>{"use strict";var t=e.i(247167);t.default.env.THURSDAY_APP_DIR?.trim()||t.default.cwd(),t.default.env.THURSDAY_HOME?.trim()||t.default.cwd(),t.default.env.THURSDAY_URL?.trim()||t.default.env.PORT?.trim();let a=".ai-workspace",r={workspace:a,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${a}/.agents/skills`,own:".agents/skills",seeds:"seed-skills"}};e.s(["APP_NAME",0,"Thursday","ARTIFACT_VIEW",0,{rows:200,setFiles:120},"ASCII_FACE",0,{charset:"emojiOnly",fontSize:{default:8,min:4,max:16},density:{default:1.4,min:.6,max:2}},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BROWSER_SKILL",0,"browser","CALL_BACK",0,{ringMs:3e4},"CALL_END",0,{quietMs:600,unsaidMs:2e3,maxMs:8e3},"CALL_ENDED_MS",0,12e3,"CALL_HISTORY_PAGE",0,10,"CALL_IDLE",0,{hangUpMs:2e4,warnMs:1e4},"CALL_LINE",0,{dwellMs:2e3},"CALL_NUDGE",0,{on:!1,waitMs:1500},"CALL_RELAY",0,{quietMs:7e3,perTurn:3,readMs:15e3,chars:600},"FILE_THUMB",0,{pageWidth:1024,textWidth:512,textBytes:4096,pages:2},"FINISHED_NOTICE",0,{rows:5,words:240},"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,carried:20,expanded:10},"PAGE_SIZE",0,50,"PATHS",0,r,"PROMPT_CROWDED",0,{bots:10,skills:20},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text"},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,elementMax:0x3200000}])},621285,343488,e=>{"use strict";var t=e.i(843476),a=e.i(24071),r=e.i(867927),i=e.i(482022),l=e.i(271645),s=e.i(798120),n=e.i(167881),o=e.i(630374),d=e.i(683408),c=e.i(671428),h=e.i(947627),u=e.i(41533),f=e.i(616172),g=e.i(95187);let m=(0,g.createServerReference)("7fce8096d5be522118ff97277809b880cf987d3d4e",g.callServer,void 0,g.findSourceMapURL,"openFileAction");e.s(["openFileAction",0,m],343488);var p=e.i(609856),x=e.i(647163);let w=new Set(["frame","image","audio","video"]),y=new Set(["image"]);function b(e){let t=(0,f.workspaceRelative)(e);if(!t)return{how:"os"};let a=(0,f.viewKindOf)(t);return y.has(a)?{how:"dialog",path:t}:w.has(a)?{how:"tab",path:t,href:s.queryKey.fileView(t)}:"none"===a?{how:"os"}:{how:"dialog",path:t}}let k=(0,l.createContext)(null),v={dialog:{prose:"px-5 py-4",block:"px-4 py-3"},page:{prose:"px-5 py-6 sm:px-8",block:"px-5 py-5"},inline:{prose:"pb-3",block:"pb-3"}};function _({kind:e,content:a,truncated:r,where:i="dialog"}){return(0,t.jsxs)(t.Fragment,{children:[null!=r&&(0,t.jsx)(j,{of:r}),(0,t.jsx)(N,{kind:e,content:a,where:i})]})}function j({of:e}){return(0,t.jsxs)("p",{className:"border-b border-border/60 px-5 py-2.5 font-mono text-[11px] text-muted-foreground",children:[`Showing the first ${(0,x.formatBytes)(u.WORKSPACE_VIEW.textMax)} of ${(0,x.formatBytes)(e)}. `,"Open the file itself for the rest."]})}function N({kind:e,content:a,where:r}){let i=v[r];switch(e){case"markdown":return(0,t.jsx)("div",{className:(0,x.cn)("min-w-0 text-sm leading-relaxed",i.prose),children:(0,t.jsx)(d.Markdown,{children:a})});case"csv":return(0,t.jsx)(E,{content:a,className:i.block});case"json":return(0,t.jsx)(T,{text:function(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}(a),className:i.block});default:return(0,t.jsx)(T,{text:a,className:i.block})}}function S(e){let[t,a]=(0,l.useState)(null),[r,i]=(0,l.useState)(null),[n,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{if(!e)return;a(null),i(null),o(null);let t=!1;return fetch(s.queryKey.file(e),{headers:{range:`bytes=0-${u.WORKSPACE_VIEW.textMax-1}`}}).then(async e=>{if(!e.ok)throw Error(await e.text());return{text:await e.text(),of:function(e){let t=e.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!t)return null;let[,a,r]=t.map(Number);return a+1<r?r:null}(e)}}).then(({text:e,of:r})=>{t||(a(null===r?e:e.slice(0,e.lastIndexOf("\n")+1||void 0)),o(r))}).catch(e=>!t&&i((0,x.errorToString)(e))),()=>{t=!0}},[e]),{content:t,failure:r,truncated:n}}function C({path:e,bytes:a}){let[r,i]=(0,p.useServerAction)(m);return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,x.formatBytes)(a)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,t.jsx)(n.Button,{variant:"outline",loading:i,onClick:()=>r(e),children:"Reveal in the file manager"})]})}function L({path:e,group:l=[],kind:d,onPath:h,onClose:u}){let f="image"===d,{content:g,failure:m,truncated:p}=S(f?null:e),w=e?.split("/").pop()??"",y=e?l.indexOf(e):-1,b=e=>{!(y<0)&&h&&h(l[(y+e+l.length)%l.length])};return(0,t.jsx)(o.Dialog,{open:null!==e,onOpenChange:e=>!e&&u(),children:(0,t.jsxs)(o.DialogContent,{onKeyDown:e=>{"ArrowLeft"===e.key&&b(-1),"ArrowRight"===e.key&&b(1)},className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,t.jsx)(o.DialogTitle,{className:"sr-only",children:w}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border/60 py-2 pr-12 pl-4",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:e}),y>=0&&l.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:[y+1," / ",l.length]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Previous image",onClick:()=>b(-1),children:(0,t.jsx)(a.ChevronLeft,{})}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Next image",onClick:()=>b(1),children:(0,t.jsx)(r.ChevronRight,{})})]}),f&&e&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Open in a new tab",render:(0,t.jsx)("a",{href:s.queryKey.fileView(e),target:"_blank",rel:"noreferrer"}),children:(0,t.jsx)(i.ExternalLink,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f&&e?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:w,className:"mx-auto max-h-[calc(100vh-11rem)] object-contain p-4"}):m?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:m}):null===g?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(_,{kind:d,content:g,truncated:p})}),f&&l.length>1&&(0,t.jsx)("div",{className:"flex shrink-0 justify-center gap-1.5 border-t border-border/60 p-2.5",children:l.map(a=>(0,t.jsx)("button",{type:"button","aria-label":a.split("/").pop(),onClick:()=>h?.(a),className:(0,x.cn)("size-11 shrink-0 overflow-hidden rounded-md outline-none focus-visible:ring-3 focus-visible:ring-ring/50",a===e?"ring-2 ring-foreground":"opacity-55"),children:(0,t.jsx)("img",{src:s.queryKey.file(a),alt:"",loading:"lazy",className:"size-full bg-muted object-cover"})},a))})]})})}function T({text:e,className:a}){return(0,t.jsx)("pre",{className:(0,x.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",a),children:e})}function E({content:e,className:a}){let[r,...i]=(0,l.useMemo)(()=>(function(e){let t=[],a=[],r="",i=!1;for(let l=0;l<e.length;l++){let s=e[l];i?'"'===s&&'"'===e[l+1]?(r+='"',l++):'"'===s?i=!1:r+=s:'"'===s?i=!0:","===s?(a.push(r),r=""):"\n"===s||"\r"===s?("\r"===s&&"\n"===e[l+1]&&l++,a.push(r),t.push(a),a=[],r=""):r+=s}return(r.length||a.length)&&(a.push(r),t.push(a)),t.filter(e=>e.some(e=>e.trim()))})(e),[e]);return r?(0,t.jsx)("div",{className:(0,x.cn)("overflow-x-auto",a),children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsx)(h.TableRow,{children:r.map((e,a)=>(0,t.jsx)(h.TableHead,{className:"whitespace-nowrap",children:e},`${a}-${e}`))})}),(0,t.jsx)(h.TableBody,{children:i.map((e,a)=>(0,t.jsx)(h.TableRow,{children:r.map((r,i)=>(0,t.jsx)(h.TableCell,{className:"whitespace-nowrap",children:e[i]??""},`${a}-${i}`))},`${a}-${e[0]??""}`))})]})}):(0,t.jsx)(T,{text:e,className:a})}e.s(["FileBody",0,_,"FileLink",0,function({path:e,group:a,className:r,title:i,label:n,children:o}){let d=b(e),c=(0,l.useContext)(k),[h,u]=(0,p.useServerAction)(m);return"tab"===d.how?(0,t.jsx)("a",{href:d.href,target:"_blank",rel:"noreferrer",title:i??e,"aria-label":n,className:r,children:o}):(0,t.jsx)("button",{type:"button",disabled:u,title:i??e,"aria-label":n,className:r,onClick:()=>{"dialog"===d.how?c?c(d.path,a):window.open(s.queryKey.fileView(d.path),"_blank"):h(e)},children:o})},"FilePreview",0,function({path:e,bytes:a}){let r=(0,f.viewKindOf)(e),{content:i,failure:l,truncated:n}=S(w.has(r)?null:e);return("frame"===r||"image"===r)&&a>u.WORKSPACE_VIEW.elementMax?(0,t.jsx)(C,{path:e,bytes:a}):"frame"===r?(0,t.jsx)("iframe",{title:e,src:s.queryKey.file(e),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===r?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:e,className:"mx-auto max-w-full p-6"}):"audio"===r||"video"===r?"audio"===r?(0,t.jsx)("audio",{controls:!0,src:s.queryKey.file(e),className:"w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):(0,t.jsx)("video",{controls:!0,src:s.queryKey.file(e),className:"max-w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):l?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:l}):null===i?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(_,{kind:r,content:i,truncated:n})},"FileViewer",0,function({children:e}){let[a,r]=(0,l.useState)(null),i=(0,l.useCallback)((e,t=[])=>r({path:e,group:t}),[]);return(0,t.jsxs)(k,{value:i,children:[e,(0,t.jsx)(L,{path:a?.path??null,group:a?.group??[],kind:a?(0,f.viewKindOf)(a.path):"text",onPath:e=>r(t=>t&&{...t,path:e}),onClose:()=>r(null)})]})},"fileTarget",0,b,"useFileText",0,S,"useOpenFile",0,function(){let e=(0,l.useContext)(k);return(0,l.useCallback)((t,a=[])=>{let r=b(t);if("os"===r.how)return!1;if("dialog"===r.how&&e)return e(r.path,a),!0;let i="tab"===r.how?r.href:s.queryKey.fileView(r.path);return null!==window.open(i,"_blank")},[e])}],621285)},616172,e=>{"use strict";var t=e.i(798120),a=e.i(41533);let r=e=>`text/${e}; charset=utf-8`,i={md:{kind:"markdown",mime:r("markdown")},markdown:{kind:"markdown",mime:r("markdown")},csv:{kind:"csv",mime:r("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:r("plain")},log:{kind:"text",mime:r("plain")},html:{kind:"frame",mime:r("html")},htm:{kind:"frame",mime:r("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:r("css")},js:{kind:"none",mime:r("javascript")},woff2:{kind:"none",mime:"font/woff2"}},l=e=>e.split(".").pop()?.toLowerCase()??"",s=Object.entries(i).filter(([,e])=>"none"!==e.kind).map(([e])=>e),n=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${s.join("|")})\b`,"giu"),o=`${a.PATHS.workspace}/`,d=t.queryKey.file("");function c(e){let t=function(e){if(!e.startsWith(d))return e;let t=e.slice(d.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim()),a=t.indexOf(o);return a>=0?t.slice(a+o.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null}let h=/^[\s`'"*_)]*(?:~|–|—|-|\.{2,}|…|to|through)[\s`'"*_(]*$/i;e.s(["opensOnFinish",0,e=>e.startsWith(`${a.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(l(e)),"pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),a=new Set,r="",i=null;for(let e of t.matchAll(n)){let l=e[0],s=!l.includes("/"),n=function(e){let t=c(e);if(!t)return null;let[a,...r]=t.split("/");return r.length&&a.includes(".")?null:t}(s?r+l:l);if(s||(r=n?.slice(0,n.lastIndexOf("/")+1)??""),n){if(i&&h.test(t.slice(i.end,e.index)))for(let e of function(e,t){let a=/^(.*?)(\d+)(\D*)$/.exec(e),r=/^(.*?)(\d+)(\D*)$/.exec(t);if(!a||!r||a[1]!==r[1]||a[3]!==r[3])return[];let i=Number(a[2]),l=Number(r[2]);if(!(l-i>1)||l-i>12)return[];let s=a[2].startsWith("0")?a[2].length:0;return Array.from({length:l-i-1},(e,t)=>`${a[1]}${String(i+t+1).padStart(s,"0")}${a[3]}`)}(i.rel,n))a.add(e);a.add(n),i={rel:n,end:e.index+l.length}}}return[...a].slice(0,12)},"viewKindOf",0,e=>i[l(e)]?.kind??"none","workspaceRelative",0,c])},867927,986253,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["default",0,r],986253),e.s(["ChevronRight",0,r],867927)},482022,e=>{"use strict";var t=e.i(456420);let a={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};a.node;let r=(0,t.default)(a);e.s(["ExternalLink",0,r],482022)},696017,e=>{"use strict";var t=e.i(60231),a=e.i(419524);e.i(947716);var r=e.i(723685),i=(0,a.__name)(e=>{let{securityLevel:a}=(0,t.getConfig2)(),i=(0,r.select)("body");if("sandbox"===a){let t=(0,r.select)(`#i${e}`),a=t.node()?.contentDocument??document;i=(0,r.select)(a.body)}return i.select(`#${e}`)},"selectSvgElement");e.s(["selectSvgElement",0,i])},502056,e=>{"use strict";var t=e.i(217248),a=e.i(447804),r=e.i(508324),i=e.i(419524),l=(0,i.__name)(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,a=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:t+a}},"getSubGraphTitleMargins"),s=new Map;async function n(e,r,i){let l,n;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");let o=r.shape?t.shapes[r.shape]:void 0;if(!o)throw Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===i.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),l=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),n=await o(l,r,i)}else l=n=await o(e,r,i);return l.attr("data-look",(0,a.handleUndefinedAttr)(r.look)),r.tooltip&&n.attr("title",r.tooltip),s.set(r.id,l),r.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,i.__name)(n,"insertNode");var o=(0,i.__name)((e,t)=>{s.set(t.id,e)},"setNodeElem"),d=(0,i.__name)(()=>{s.clear()},"clear"),c=(0,i.__name)(e=>{let t=s.get(e.id);r.log.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode");e.s(["clear",0,d,"getSubGraphTitleMargins",0,l,"insertNode",0,n,"positionNode",0,c,"setNodeElem",0,o])},369110,e=>{"use strict";var t=e.i(502056),a=e.i(217248),r=e.i(224797),i=e.i(836333),l=e.i(60231),s=e.i(508324),n=e.i(419524);e.i(947716);var o=e.i(723685),d=e.i(883272),c=(0,n.__name)(async(e,t)=>{let n,c,h=(0,l.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=h,{clusterBkg:g,clusterBorder:m}=u,{labelStyles:p,nodeStyles:x,borderStyles:w,backgroundStyles:y}=(0,r.styles2String)(t),b=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),k=(0,l.evaluate)(h.flowchart.htmlLabels),v="LR"===t.direction,_=b.insert("g").attr("class","cluster-label swimlane-label"),j=await (0,i.createText)(_,t.label,{style:t.labelStyle,useHtmlLabels:k,isNode:!0,width:t.width}),N=j.getBBox();if(k){let e=j.children[0],t=(0,o.select)(j);N=e.getBoundingClientRect(),t.attr("width",N.width),t.attr("height",N.height)}let S=t.padding??0,C=t.width<=N.width+S?N.width+S:t.width;t.width<=N.width+S?t.diff=(C-t.width)/2-S:t.diff=-S;let L=t.height,T=t.y-L/2,E=t.y+L/2,B=t.x-C/2,M=void 0!==t.swimlaneContentTop?t.swimlaneContentTop:T+L/3,R=4*!!v,A=N.height+2*R;if(v){let e=Math.max(A,N.height+2*R),a=B+e,i=Math.max(0,C-e);if("handDrawn"===t.look){let l=d.default.svg(b),s=(0,r.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:m,fillWeight:3,seed:f}),o=(0,r.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:m,seed:f}),h=l.rectangle(B,T,e,L,s);n=b.insert(()=>h,":first-child");let u=l.rectangle(a,T,i,L,o);c=b.insert(()=>u,":first-child"),n.select("path:nth-child(2)").attr("style",w.join(";")),n.select("path").attr("style",y.join(";").replace("fill","stroke"))}else n=b.insert("rect",":first-child"),c=b.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",x).attr("x",B).attr("y",T).attr("width",e).attr("height",L).attr("fill",g).attr("stroke",m),c.attr("class","swimlane-body").attr("style",x).attr("x",a).attr("y",T).attr("width",i).attr("height",L).attr("fill","none").attr("stroke",m);let l=B+e/2,s=t.y;_.attr("transform",`translate(${l}, ${s}) rotate(-90) translate(${-N.width/2}, ${-N.height/2})`)}else{let e=Math.min(A,Math.max(0,M-T)),a=T+e,i=Math.max(0,E-a),l=t.x-C/2;if("handDrawn"===t.look){let s=d.default.svg(b),o=(0,r.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:m,fillWeight:3,seed:f}),h=(0,r.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:m,seed:f}),u=s.rectangle(l,T,C,e,o);n=b.insert(()=>u,":first-child");let p=s.rectangle(l,a,C,i,h);c=b.insert(()=>p,":first-child"),n.select("path:nth-child(2)").attr("style",w.join(";")),n.select("path").attr("style",y.join(";").replace("fill","stroke"))}else n=b.insert("rect",":first-child"),c=b.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",x).attr("x",l).attr("y",T).attr("width",C).attr("height",e).attr("fill",g).attr("stroke",m),c.attr("class","swimlane-body").attr("style",x).attr("x",l).attr("y",a).attr("width",C).attr("height",i).attr("fill","none").attr("stroke",m);let s=t.x-N.width/2,o=T+(e-N.height)/2;_.attr("transform",`translate(${s}, ${o})`)}if(s.log.trace("Swimlane data ",t,JSON.stringify(t)),p){let e=_.select("span");e&&e.attr("style",p)}return t.offsetX=0,t.width=C,t.height=L,t.offsetY=N.height-S/2,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:b,labelBBox:N}},"swimlane"),h=(0,n.__name)(async(e,n)=>{let c,h;s.log.info("Creating subgraph rect for ",n.id,n);let u=(0,l.getConfig2)(),{themeVariables:f,handDrawnSeed:g}=u,{clusterBkg:m,clusterBorder:p}=f,{labelStyles:x,nodeStyles:w,borderStyles:y,backgroundStyles:b}=(0,r.styles2String)(n),k=e.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),v=(0,l.getEffectiveHtmlLabels)(u),_=k.insert("g").attr("class","cluster-label "),j=(c="markdown"===n.labelType?await (0,i.createText)(_,n.label,{style:n.labelStyle,useHtmlLabels:v,isNode:!0,width:n.width}):await (0,a.createLabel_default)(_,n.label,n.labelStyle||"",!1,!0)).getBBox();if((0,l.getEffectiveHtmlLabels)(u)){let e=c.children[0],t=(0,o.select)(c);j=e.getBoundingClientRect(),t.attr("width",j.width),t.attr("height",j.height)}let N=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(N-n.width)/2-n.padding:n.diff=-n.padding;let S=n.height,C=n.x-N/2,L=n.y-S/2;if(s.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let e=d.default.svg(k),t=(0,r.userNodeOverrides)(n,{roughness:.7,fill:m,stroke:p,fillWeight:3,seed:g}),i=e.path((0,a.createRoundedRectPathD)(C,L,N,S,0),t);(h=k.insert(()=>(s.log.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",y.join(";")),h.select("path").attr("style",b.join(";").replace("fill","stroke"))}else(h=k.insert("rect",":first-child")).attr("style",w).attr("rx",n.rx).attr("ry",n.ry).attr("x",C).attr("y",L).attr("width",N).attr("height",S);let{subGraphTitleTopMargin:T}=(0,t.getSubGraphTitleMargins)(u);if(_.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+T})`),x){let e=_.select("span");e&&e.attr("style",x)}let E=h.node().getBBox();return n.offsetX=0,n.width=E.width,n.height=E.height,n.offsetY=j.height-n.padding/2,n.intersect=function(e){return(0,a.intersect_rect_default)(n,e)},{cluster:k,labelBBox:j}},"rect"),u=(0,n.__name)((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),l=0*t.padding,s=l/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),f=(0,n.__name)(async(e,t)=>{let r,i=(0,l.getConfig2)(),{themeVariables:s,handDrawnSeed:n}=i,{altBackground:c,compositeBackground:h,compositeTitleBackground:u,nodeBorder:f}=s,g=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),m=g.insert("g",":first-child"),p=g.insert("g").attr("class","cluster-label"),x=g.append("rect"),w=await (0,a.createLabel_default)(p,t.label,t.labelStyle,void 0,!0),y=w.getBBox();if((0,l.getEffectiveHtmlLabels)(i)){let e=w.children[0],t=(0,o.select)(w);y=e.getBoundingClientRect(),t.attr("width",y.width),t.attr("height",y.height)}let b=0*t.padding,k=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+b;t.width<=y.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height+b,_=t.height+b-y.height-6,j=t.x-k/2,N=t.y-v/2;t.width=k;let S=t.y-t.height/2-b/2+y.height+2;if("handDrawn"===t.look){let e=t.cssClasses.includes("statediagram-cluster-alt"),i=d.default.svg(g),l=t.rx||t.ry?i.path((0,a.createRoundedRectPathD)(j,N,k,v,10),{roughness:.7,fill:u,fillStyle:"solid",stroke:f,seed:n}):i.rectangle(j,N,k,v,{seed:n});r=g.insert(()=>l,":first-child");let s=i.rectangle(j,S,k,_,{fill:e?c:h,fillStyle:e?"hachure":"solid",stroke:f,seed:n});r=g.insert(()=>l,":first-child"),x=g.insert(()=>s)}else(r=m.insert("rect",":first-child")).attr("class","outer").attr("x",j).attr("y",N).attr("width",k).attr("height",v).attr("data-look",t.look),x.attr("class","inner").attr("x",j).attr("y",S).attr("width",k).attr("height",_);return p.attr("transform",`translate(${t.x-y.width/2}, ${N+1-3*!(0,l.getEffectiveHtmlLabels)(i)})`),t.height=r.node().getBBox().height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:g,labelBBox:y}},"roundedWithTitle"),g=(0,n.__name)(async(e,n)=>{let c;s.log.info("Creating subgraph rect for ",n.id,n);let h=(0,l.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=h,{clusterBkg:g,clusterBorder:m}=u,{labelStyles:p,nodeStyles:x,borderStyles:w,backgroundStyles:y}=(0,r.styles2String)(n),b=e.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),k=(0,l.getEffectiveHtmlLabels)(h),v=b.insert("g").attr("class","cluster-label "),_=await (0,i.createText)(v,n.label,{style:n.labelStyle,useHtmlLabels:k,isNode:!0,width:n.width}),j=_.getBBox();if((0,l.getEffectiveHtmlLabels)(h)){let e=_.children[0],t=(0,o.select)(_);j=e.getBoundingClientRect(),t.attr("width",j.width),t.attr("height",j.height)}let N=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(N-n.width)/2-n.padding:n.diff=-n.padding;let S=n.height,C=n.x-N/2,L=n.y-S/2;if(s.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let e=d.default.svg(b),t=(0,r.userNodeOverrides)(n,{roughness:.7,fill:g,stroke:m,fillWeight:4,seed:f}),i=e.path((0,a.createRoundedRectPathD)(C,L,N,S,n.rx),t);(c=b.insert(()=>(s.log.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",w.join(";")),c.select("path").attr("style",y.join(";").replace("fill","stroke"))}else(c=b.insert("rect",":first-child")).attr("style",x).attr("rx",n.rx).attr("ry",n.ry).attr("x",C).attr("y",L).attr("width",N).attr("height",S);let{subGraphTitleTopMargin:T}=(0,t.getSubGraphTitleMargins)(h);if(v.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+T})`),p){let e=v.select("span");e&&e.attr("style",p)}let E=c.node().getBBox();return n.offsetX=0,n.width=E.width,n.height=E.height,n.offsetY=j.height-n.padding/2,n.intersect=function(e){return(0,a.intersect_rect_default)(n,e)},{cluster:b,labelBBox:j}},"kanbanSection"),m={rect:h,squareRect:h,roundedWithTitle:f,noteGroup:u,divider:(0,n.__name)((e,t)=>{let r,{themeVariables:i,handDrawnSeed:s}=(0,l.getConfig2)(),{nodeBorder:n}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),c=o.insert("g",":first-child"),h=0*t.padding,u=t.width+h;t.diff=-t.padding;let f=t.height+h,g=t.x-u/2,m=t.y-f/2;if(t.width=u,"handDrawn"===t.look){let e=d.default.svg(o).rectangle(g,m,u,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:s});r=o.insert(()=>e,":first-child")}else{r=c.insert("rect",":first-child");let e="outer";t.look,e="divider",r.attr("class",e).attr("x",g).attr("y",m).attr("width",u).attr("height",f).attr("data-look",t.look)}return t.height=r.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:g,swimlane:c},p=new Map,x=(0,n.__name)(async(e,t)=>{let a=t.shape||"rect",r=await m[a](e,t);return p.set(t.id,r),r},"insertCluster"),w=(0,n.__name)(()=>{p=new Map},"clear");e.s(["clear",0,w,"insertCluster",0,x])},121292,e=>{"use strict";var t=e.i(369110),a=e.i(382793),r=e.i(502056),i=e.i(217248),l=e.i(447804),s=e.i(60231),n=e.i(508324),o=e.i(419524),d={common:s.common_default,getConfig:s.getConfig,insertCluster:t.insertCluster,insertEdge:a.insertEdge,insertEdgeLabel:a.insertEdgeLabel,insertMarkers:a.markers_default,insertNode:r.insertNode,interpolateToCurve:l.interpolateToCurve,labelHelper:i.labelHelper,log:n.log,positionEdgeLabel:a.positionEdgeLabel},c={},h=(0,o.__name)(e=>{for(let t of e)c[t.name]=t},"registerLayoutLoaders");(0,o.__name)(()=>{h([{name:"dagre",loader:(0,o.__name)(async()=>await e.A(555153),"loader")},{name:"swimlane",loader:(0,o.__name)(async()=>await e.A(12782),"loader")},{name:"cose-bilkent",loader:(0,o.__name)(async()=>await e.A(208503),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,o.__name)(async(e,t)=>{if(!(e.layoutAlgorithm in c))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let a=t.domId||t.id;t.domId=`${e.diagramId}-${a}`}let a=c[e.layoutAlgorithm],r=await a.loader(),{theme:i,themeVariables:l}=e.config,{useGradient:s,gradientStart:n,gradientStop:o}=l,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),s){let e=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)}return r.render(e,t,d,{algorithm:a.algorithm})},"render"),f=(0,o.__name)((e="",{fallback:t="dagre"}={})=>{if(e in c)return e;if(t in c)return n.log.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm");e.s(["getRegisteredLayoutAlgorithm",0,f,"registerLayoutLoaders",0,h,"render",0,u])}]);
@@ -1,18 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,421429,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Segmented",0,function({options:e,value:r,onChange:a,className:i,...l}){return(0,t.jsx)("div",{role:"radiogroup",className:(0,n.cn)("flex w-fit gap-0.5 rounded-full bg-muted p-0.75",i),...l,children:e.map(e=>{let i=e.value===r;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":i,title:e.title,onClick:()=>a(e.value),className:(0,n.cn)("flex h-7 items-center justify-center gap-1.5 rounded-full px-3 text-[12.5px] whitespace-nowrap transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",i?"bg-brand font-medium text-brand-foreground":"text-muted-foreground hover:text-foreground"),children:e.label},e.value)})})}])},968978,7227,e=>{"use strict";var t=e.i(843476);function n({className:e}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",className:e,width:"24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),(0,t.jsx)("path",{d:"M1 1h22v22H1z",fill:"none"})]})}function r({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 24 24",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"OpenAI icon"}),(0,t.jsx)("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})}function a({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 35 33",children:[(0,t.jsx)("path",{d:"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436",fill:"currentColor"}),(0,t.jsx)("path",{d:"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341",fill:"currentColor"})]})}function i({className:e}){return(0,t.jsxs)("svg",{overflow:"visible",width:"100%",height:"100%",viewBox:"0 0 100 101",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:[(0,t.jsx)("path",{d:"M96.0000 40.0000 L99.5002 42.0000 L99.5002 43.5000 L98.5000 47.0000 L56.0000 57.0000 L52.0040 47.0708 L96.0000 40.0000 M96.0000 40.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(330deg) scaleY(1.13102) rotate(-330deg)"}}),(0,t.jsx)("path",{d:"M80.1032 10.5903 L84.9968 11.6171 L86.2958 13.2179 L87.5346 17.0540 L87.0213 19.5007 L58.5000 58.5000 L49.0000 49.0000 L75.3008 14.4873 L80.1032 10.5903 M80.1032 10.5903 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(300deg) scaleY(1.04936) rotate(-300deg)"}}),(0,t.jsx)("path",{d:"M55.5002 4.5000 L58.5005 2.5000 L61.0002 3.5000 L63.5002 7.0000 L56.6511 48.1620 L52.0005 45.0000 L50.0005 39.5000 L53.5003 8.5000 L55.5002 4.5000 M55.5002 4.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(270deg) scaleY(1.08769) rotate(-270deg)"}}),(0,t.jsx)("path",{d:"M23.4253 5.1588 L26.5075 1.2217 L28.5175 0.7632 L32.5063 1.3458 L34.4748 2.8868 L48.8202 34.6902 L54.0089 49.8008 L47.9378 53.1760 L24.8009 11.1886 L23.4253 5.1588 M23.4253 5.1588 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(240deg) scaleY(0.94) rotate(-240deg)"}}),(0,t.jsx)("path",{d:"M8.4990 27.0019 L7.4999 23.0001 L10.5003 19.5001 L14.0003 20.0001 L15.0003 20.0001 L36.0000 35.5000 L42.5000 40.5000 L51.5000 47.5000 L46.5000 56.0000 L42.0002 52.5000 L39.0001 49.5000 L10.0000 29.0001 L8.4990 27.0019 M8.4990 27.0019 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(210deg) scaleY(0.925) rotate(-210deg)"}}),(0,t.jsx)("path",{d:"M2.5003 53.0000 L0.2370 50.5000 L0.2373 48.2759 L2.5003 47.5000 L28.0000 49.0000 L53.0000 51.0000 L52.1885 55.9782 L4.5000 53.5000 L2.5003 53.0000 M2.5003 53.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(180deg) scaleY(0.997) rotate(-180deg)"}}),(0,t.jsx)("path",{d:"M17.5002 79.0264 L12.5005 79.0264 L10.5124 76.7369 L10.5124 74.0000 L19.0005 68.0000 L53.5082 46.0337 L57.0005 52.0000 L17.5002 79.0264 M17.5002 79.0264 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(150deg) scaleY(1.045) rotate(-150deg)"}}),(0,t.jsx)("path",{d:"M27.0004 92.9999 L25.0003 93.4999 L22.0003 91.9999 L22.5004 89.4999 L52.0003 50.5000 L56.0004 55.9999 L34.0003 85.0000 L27.0004 92.9999 M27.0004 92.9999 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(120deg) scaleY(1.03) rotate(-120deg)"}}),(0,t.jsx)("path",{d:"M51.9998 98.0000 L50.5002 100.0000 L47.5002 101.0000 L45.0001 99.0000 L43.5000 96.0000 L51.0003 55.4999 L55.5001 55.9999 L51.9998 98.0000 M51.9998 98.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(90deg) scaleY(1.06) rotate(-90deg)"}}),(0,t.jsx)("path",{d:"M77.5007 86.9997 L77.5007 90.9997 L77.0006 92.4997 L75.0004 93.4997 L71.5006 93.0339 L47.4669 57.2642 L56.9998 50.0002 L64.9994 64.5004 L65.7507 69.7497 L77.5007 86.9997 M77.5007 86.9997 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(60deg) scaleY(1.00898) rotate(-60deg)"}}),(0,t.jsx)("path",{d:"M89.0008 80.9991 L89.5008 83.4991 L88.0008 85.4991 L86.5007 84.9991 L78.0007 78.9991 L65.0007 67.4991 L55.0007 60.4991 L58.0000 51.0000 L62.9999 54.0001 L66.0007 59.4991 L89.0008 80.9991 M89.0008 80.9991 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(30deg) scaleY(1.13564) rotate(-30deg)"}}),(0,t.jsx)("path",{d:"M82.5003 55.5000 L95.0003 56.5000 L98.0003 58.5000 L100.0000 61.5000 L100.0000 63.6587 L94.5003 66.0000 L66.5005 59.0000 L55.0003 58.5000 L58.0000 48.0000 L66.0005 54.0000 L82.5003 55.5000 M82.5003 55.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(0deg) scaleY(1.27731) rotate(0deg)"}})]})}function l({className:e}){return(0,t.jsx)("svg",{viewBox:"0 0 115 100",height:"18",width:"21",className:e,"data-slot":"geist-logo-svg",children:(0,t.jsx)("g",{children:(0,t.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M57.5 0 115 100H0z",clipRule:"evenodd"})})})}e.s(["ClaudeIcon",0,i,"GoogleIcon",0,n,"GrokIcon",0,a,"OpenAIIcon",0,r,"VercelIcon",0,l],7227);let s={mistral:[{d:"M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z",fill:"gold"},{d:"M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z",fill:"#FFAF00"},{d:"M3.428 10.258h17.144v3.428H3.428v-3.428z",fill:"#FF8205"},{d:"M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z",fill:"#FA500F"},{d:"M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z",fill:"#E10500"}],deepseek:[{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"}],groq:[{d:"M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"}],cerebras:[{d:"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z",fill:"#F15A29"},{d:"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"}],togetherai:[{d:"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z",fill:"#EF2CC1"},{d:"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z",fill:"#CAAEF5"},{d:"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z",fill:"#FC4C02"}],fireworks:[{d:"M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z",fill:"#5019C5"}],deepinfra:[{d:"M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z",fill:"#2A3275"},{d:"M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z",fill:"#5699DB"}],cohere:[{d:"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z",fill:"#39594D"},{d:"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z",fill:"#D18EE2"},{d:"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z",fill:"#FF7759"}]};e.s(["ProviderIcon",0,function({className:e,provider:o}){if(o in s)return(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,"aria-hidden":"true",children:s[o].map(e=>(0,t.jsx)("path",{d:e.d,fill:e.fill},e.d))});let c=(e=>{switch(e){case"anthropic":return i;case"google":return n;case"openai":case"chatgpt":return r;case"vercel-ai-gateway":return l;case"xai":return a}})(o);return(0,t.jsx)(c,{className:e})}],968978)},635963,864723,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(218080),a=e.i(647163);let i="currentColor",l=[{id:"system",label:"System",value:i},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"}],s=Object.fromEntries(l.map(e=>[e.id,e.value])),o=l.filter(e=>e.value!==i).map(e=>e.value),c=[s.amber,s.red],d={rainbow:{label:"Rainbow",look:"flow",colors:[0,45,90,140,190,240,290,330,360].map(e=>`oklch(0.77 0.16 ${e})`)},duo:{label:"Duo",look:"duo",colors:["#818CF8","#F472B6"]},aurora:{label:"Aurora",look:"aurora",edge:"dark",colors:["#1a2f73","#2c56c9","#34d399","#22d3ee","#a7f3d0"]},"aurora-pink":{label:"Pink aurora",look:"aurora",edge:"dark",colors:["#3a1478","#7c3aed","#f472b6","#e879f9","#fbcfe8"]}},u=Object.keys(d);e.s(["MARK_PAINTS",0,d,"MARK_PAINT_IDS",0,u,"MARK_PALETTE",0,o,"MARK_SHAPES",0,["blob","poly","squircle","heart"],"MARK_SYSTEM",0,i,"paintSwatch",0,function(e){let{look:t,colors:n}=d[e];return"aurora"===t?`radial-gradient(circle at 35% 30%, ${n[2]}, transparent 70%), linear-gradient(180deg, ${n[0]}, ${n[1]})`:`linear-gradient(135deg, ${n.join(", ")})`},"randomMarkFills",0,function(e){let t=[...o.filter(e=>!c.includes(e)).map(e=>({color:e})),...u.map(e=>({paint:e}))];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t.slice(0,e)}],864723);let h=2*Math.PI,f="origin-center animate-in duration-300 zoom-in-0 [transform-box:fill-box]",m="-18 -18 276 276",p=e=>Math.round(100*e)/100,g=(e,t,n)=>Math.min(n,Math.max(t,e));function x(e){let t=e>>>0;return()=>{let e=Math.imul((t=t+0x6d2b79f5>>>0)^t>>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/0x100000000}}function y(e,t){return[e[0]-t[0],e[1]-t[1]]}function b(e){let t=Math.hypot(e[0],e[1])||1;return[e[0]/t,e[1]/t]}function k(e){let t=e.map((e,t)=>{let n=t/128*h;return[120+Math.cos(n)*e,120+Math.sin(n)*e]}),n=`M${p(t[0][0])} ${p(t[0][1])}`;for(let e=0;e<128;e++){let r=t[(e-1+128)%128],a=t[e],i=t[(e+1)%128],l=t[(e+2)%128],s=a[0]+(i[0]-r[0])/6,o=a[1]+(i[1]-r[1])/6,c=i[0]-(l[0]-a[0])/6,d=i[1]-(l[1]-a[1])/6;n+=`C${p(s)} ${p(o)} ${p(c)} ${p(d)} ${p(i[0])} ${p(i[1])}`}return`${n}Z`}function v(e){let t=e.tilt*Math.PI/180,n=Math.cos(t),r=Math.sin(t),a=(t,a)=>[e.cx+t*n-a*r,e.cy+t*r+a*n],i=-e.len/2,l=e.len/2,s=[],o=[];for(let t=0;t<=30;t++){let n=t/30,r=1-n,c=r*r*i+n*n*l,d=-(2*r*n*e.bend),u=-(2*r*i)+2*n*l,h=-(2*r*e.bend)+2*n*e.bend,f=Math.hypot(u,h)||1,m=-h/f,p=u/f,g=e.width/2*Math.sin(Math.PI*n)**e.taper;s.push(a(c+m*g,d+p*g)),o.push(a(c-m*g,d-p*g))}let c=`M${p(s[0][0])} ${p(s[0][1])}`;for(let e=1;e<=30;e++)c+=`L${p(s[e][0])} ${p(s[e][1])}`;for(let e=29;e>=0;e--)c+=`L${p(o[e][0])} ${p(o[e][1])}`;return`${c}Z`}let M={shape:"blob",sides:3,corner:.74,rotation:0,squircle:4.6,wobble:.2,seed:113,autofit:!0,color:"currentColor",fill:!0,strokeWidth:14,eyeLen:51,eyeWidth:38,eyeBend:-1,eyeTaper:.35,eyeTilt:-90,eyeSkew:0,eyeGap:88,eyeY:100,gazeRange:7,follow:!0,ripple:9,pulse:7,punch:.05,bandEase:.019,bobRate:1,stretch:15,idle:!0,liveliness:55,float:7,breathe:3.7,speed:1.7,blink:!0,notify:!1,notifyAngle:41,notifyDist:109,notifyR:25,notifyRing:11};function w(e,t,n=.035){let r=x(12139^t),a=[2,3,5].map(e=>({k:e,a:(2*r()-1)/e,p:r()*h})),i=e.map((e,t)=>{let n=t/128*h,r=0;for(let e of a)r+=e.a*Math.sin(e.k*n+e.p);return r}),l=Math.max(...i.map(Math.abs))||1;return e.map((e,t)=>e*(1+n*i[t]/l))}let j=new Map;function L(e,t,n){var r,a,i;let l=`${"poly"===t?`poly|${e.sides}|${e.corner}|${e.rotation}|${n}`:"squircle"===t?`squircle|${e.squircle}|${n}`:"heart"===t?`heart|${n}`:`blob|${e.wobble}|${n}`}|${e.autofit}`,s=j.get(l);if(s)return s;let o=function(e){let t=Array(128);for(let n=0;n<128;n++){let r=n/128*h,a=Math.cos(r),i=Math.sin(r),l=0;for(let t=0;t<e.length;t++){let n=e[t],r=e[(t+1)%e.length],s=r[0]-n[0],o=r[1]-n[1],c=a*o-i*s;if(1e-9>Math.abs(c))continue;let d=n[0]-120,u=n[1]-120,h=(d*o-u*s)/c,f=(d*i-u*a)/c;h>l&&f>=-1e-9&&f<=1+1e-9&&(l=h)}t[n]=l||112}return t}((r=e,a=t,i=n,"squircle"===a?function(e){let t=[],n=2/e;for(let e=0;e<360;e++){let r=e/360*h,a=Math.cos(r),i=Math.sin(r);t.push([120+Math.sign(a)*Math.abs(a)**n*112,120+Math.sign(i)*Math.abs(i)**n*112])}return t}(r.squircle):"poly"===a?function(e,t,n){let r=n*Math.PI/180-Math.PI/2,a=[];for(let t=0;t<e;t++){let n=r+t/e*h;a.push([120+112*Math.cos(n),120+112*Math.sin(n)])}let i=(Math.PI-h/e)/2,l=224*Math.sin(Math.PI/e)/2*Math.tan(i)*g(t,.001,1),s=l/Math.tan(i),o=[];for(let t=0;t<e;t++){let n=a[t],r=a[(t-1+e)%e],c=a[(t+1)%e],d=b(y(r,n)),u=b(y(c,n)),f=[n[0]+d[0]*s,n[1]+d[1]*s],m=b([d[0]+u[0],d[1]+u[1]]),p=[n[0]+m[0]*l/Math.sin(i),n[1]+m[1]*l/Math.sin(i)],g=Math.atan2(f[1]-p[1],f[0]-p[0]),x=[n[0]+u[0]*s,n[1]+u[1]*s],k=Math.atan2(x[1]-p[1],x[0]-p[0])-g;for(;k>Math.PI;)k-=h;for(;k<-Math.PI;)k+=h;for(let e=0;e<=20;e++){let t=g+e/20*k;o.push([p[0]+Math.cos(t)*l,p[1]+Math.sin(t)*l])}}return o}(r.sides,r.corner,r.rotation):"heart"===a?function(){let e=[];for(let t=0;t<400;t++){let n=t/400*h,r=16*Math.sin(n)**3,a=13*Math.cos(n)-5*Math.cos(2*n)-2*Math.cos(3*n)-Math.cos(4*n);e.push([120+6.6*r,120-(a+2.2)*7.26])}return e}():function(e,t){let n=x(e),r=[1,2,3,4,5].map(e=>({k:e,a:(2*n()-1)/e,p:n()*h})),a=[],i=0;for(let e=0;e<360;e++){let t=e/360*h,n=0;for(let e of r)n+=e.a*Math.sin(e.k*t+e.p);a.push(n),i=Math.max(i,Math.abs(n))}let l=i>0?t/i:0;return a.map((e,t)=>{let n=t/360*h,r=112*(1+e*l);return[120+Math.cos(n)*r,120+Math.sin(n)*r]})}(i,r.wobble))),c="blob"===t?o:"heart"===t?function(e,t){let n=e;for(let e=0;e<2;e++){let e=n;n=e.map((t,n)=>{let r=0;for(let t=-3;t<=3;t++)r+=e[(n+t+128)%128];return r/7})}let r=n.reduce((e,t)=>e+t,0)/128,a=w(n.map(e=>.95*e+.05*r),t,.05),i=Math.round((2*x(20977^t)()-1)*3);return i?a.map((e,t)=>a[(t-i+256)%128]):a}(o,n):w(o,n),d=e.autofit?function(e){let t=h/128,n=0,r=0;for(let a of e)n+=.5*a*a*t,a>r&&(r=a);if(n<=0)return e;let a=Math.min(Math.sqrt(112*Math.PI*112/n),130/r);return e.map(e=>e*a)}(c):c;return j.size>400&&j.clear(),j.set(l,d),d}let A=e=>345*(.7+.3*e),S=[{cx:42,sway:40,period:5},{cx:134,sway:-35,period:6.5},{cx:209,sway:29,period:4.5}],N={eyeLen:1,eyeWid:1,eyeX:0,eyeY:0,bodyX:0,bodyY:0,rot:0,scale:1,blinkIn:0},C=e=>e*e*(3-2*e),z=e=>Math.sin(Math.PI*e);function E(e,t,n){return e<=0||e>=1?0:e<t?C(e/t):e>1-n?C((1-e)/n):1}let I={glance:{weight:26,dur:[900,1400],play:(e,t,n)=>{let r=E(e,.12,.34);return{eyeX:22*t*r,eyeY:22*n*r,rot:.9*t*r,blinkIn:40*!!(e<.02&&.4>Math.random())}}},lookAway:{weight:12,dur:[1800,2600],play:(e,t,n)=>{let r=E(e,.1,.46);return{eyeX:30*t*r,eyeY:(.5*n+.35)*22*r,rot:1.6*t*r}}},widen:{weight:8,dur:[700,950],play:(e,t)=>{let n=E(e,.22,.5);return{eyeLen:1+.16*n,eyeWid:1+.2*n,rot:-(.5*t)*n}}},squint:{weight:8,dur:[800,1050],play:e=>{let t=E(e,.25,.45);return{eyeLen:1-.3*t,eyeWid:1-.12*t}}},double:{weight:7,dur:[420,420],play:e=>({blinkIn:+(e<.02)})},nod:{weight:11,dur:[1150,1400],play:e=>({bodyY:10*Math.sin(2*h*e)*z(e),rot:2.2*Math.sin(2*h*e+.5)*z(e),eyeY:3.2*Math.sin(2*h*e-.7)*z(e)})},sink:{weight:7,dur:[1800,2300],play:e=>{let t=z(e)**.7;return{eyeLen:1-.26*t,eyeY:4*t,bodyY:8*t,scale:1-.03*t,rot:1.8*t}}},wave:{weight:7,dur:[1300,1700],play:(e,t)=>{let n=E(e,.24,.34);return{bodyX:t*Math.sin(1.5*h*e)*9*n,rot:t*Math.sin(1.5*h*e+.5)*4.5*n,eyeX:t*Math.sin(1.5*h*e)*5*n,eyeLen:1-.2*n}}},reach:{weight:7,dur:[1800,2300],play:e=>{let t=E(e,.28,.34);return{scale:1+.045*t,bodyY:-4*t,eyeLen:1-.28*t,eyeY:3*t,rot:1.8*t}}},tilt:{weight:11,dur:[1500,1900],play:(e,t)=>{let n=E(e,.22,.4);return{rot:9*t*n,bodyX:-3*t*n,eyeY:-1.5*n}}},sweep:{weight:9,dur:[1600,2200],play:(e,t,n)=>{let r=E(e,.12,.18),a=Math.cos(Math.PI*g((e-.15)/.7,0,1));return{eyeX:24*t*r*a,eyeY:24*n*r*a,rot:1.2*t*r*a}}},roll:{weight:5,dur:[900,1200],play:(e,t)=>{let n=z(e)**.5,r=h*e*(t>=0?1:-1);return{eyeX:20*Math.cos(r)*n,eyeY:14*Math.sin(r)*n,rot:1.5*Math.sin(r)*n,blinkIn:+(e>.9&&e<.93)}}},shake:{weight:8,dur:[650,900],play:(e,t)=>{let n=z(e),r=Math.sin(2*h*e);return{rot:t*r*5*n,bodyX:t*r*4*n,eyeX:-t*r*4*n}}},bounce:{weight:6,dur:[850,1100],play:e=>{let t=1-.45*e,n=Math.abs(Math.sin(h*e))*t;return{bodyY:-14*n,eyeY:2.5*n,scale:1-Math.max(0,-Math.cos(h*e))*t*.04}}},slowBlink:{weight:6,dur:[900,1200],play:e=>({eyeWid:1-.88*z(e)**.6,eyeY:1.5*z(e)})},perk:{weight:5,dur:[700,950],play:(e,t)=>{let n=E(e,.09,.62);return{bodyY:-7*n,scale:1+.035*n,eyeLen:1+.14*n,eyeWid:1+.1*n,rot:.8*t*n}}}},$=Object.keys(I),T={idle:{},connecting:{nod:0,wave:0,bounce:0,sweep:1.6,roll:1.4},listening:{glance:.3,lookAway:.15,sweep:.2,roll:0,wave:0,shake:0,bounce:0,sink:.3,widen:2.2,perk:1.8,nod:1.6,slowBlink:1.4},thinking:{lookAway:2.2,squint:2,tilt:1.8,roll:2,sweep:1.4,sink:1.6,glance:.8,slowBlink:1.2,nod:.3,wave:0,bounce:.2,perk:.5},delegating:{wave:2.6,nod:1.8,perk:1.6,glance:1.4,tilt:1.2,lookAway:.4,squint:.4,sink:0,roll:0},speaking:{nod:2,glance:1.2,widen:1.2,sink:0,roll:.3,wave:.4,slowBlink:.4,bounce:.6}},R={idle:{eyes:1,body:1,churn:0,churnSpeed:0,dwell:1,breathe:1,float:1,blink:1,lean:0,aspect:1,gazeX:0,gazeY:0},connecting:{eyes:.75,body:.91,churn:2.5,churnSpeed:3,dwell:.8,breathe:2.2,float:.6,blink:.6,lean:0,aspect:1.03,gazeX:0,gazeY:4},listening:{eyes:1.3,body:1.04,churn:0,churnSpeed:0,dwell:2.6,breathe:.45,float:.35,blink:1.8,lean:0,aspect:.97,gazeX:0,gazeY:-3},thinking:{eyes:.66,body:.96,churn:5,churnSpeed:.6,dwell:.5,breathe:1.3,float:1.4,blink:.8,lean:7,aspect:1.04,gazeX:-9,gazeY:-8},delegating:{eyes:.9,body:.98,churn:0,churnSpeed:0,dwell:2.2,breathe:.6,float:.5,blink:1.3,lean:-6,aspect:1,gazeX:15,gazeY:2},speaking:{eyes:.95,body:1,churn:2.5,churnSpeed:3,dwell:4,breathe:.4,float:.5,blink:1.2,lean:0,aspect:1,gazeX:0,gazeY:0}},_=Array(r.SPECTRUM_BANDS).fill(0);function D(){let e=Math.random();return e<.15?180+320*Math.random():e<.8?1200+2300*Math.random():3500+2800*Math.random()}let O={x:0,y:0,live:!1},B=!1;function F(e){if("number"==typeof e)return e;let t=0x811c9dc5;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),0x1000193);return(t>>>0)%1e4}function K({size:e=32,seed:i,color:l,shape:s,outline:o,paint:c,notify:u,crossed:x,state:y="idle",getSpectrum:b,options:w,className:j}){var C;let z=(0,n.useId)(),E=(0,n.useMemo)(()=>({...M,...w,...void 0===o?{}:{fill:!o}}),[w,o]),Y=`${z}-mask`,P=`${z}-paint`,q=`${z}-curtain`,G=(0,n.useRef)(null),U=(0,n.useRef)(null),H=(0,n.useRef)(null),W=(0,n.useRef)(null),X=(0,n.useRef)(null),V=(0,n.useRef)(null),Z=(0,n.useRef)(null),J=(0,n.useRef)(null),Q=(0,n.useRef)([]),ee=(0,n.useRef)(null),et=(0,n.useRef)(null),en=(0,n.useRef)(null),er=(0,n.useRef)(null),ea=void 0===i?E.seed:F(i),ei=s??E.shape,el=l??E.color,es=u??E.notify,eo=c?d[c]:null,ec=g((e-14)/98,0,1),ed=eo?"edge"in eo?eo.edge:null:(function(e){let t=/^#([0-9a-f]{6})$/i.exec(e);if(!t)return null;let n=e=>{let n=Number.parseInt(t[1].slice(e,e+2),16)/255;return n<=.04045?n/12.92:((n+.055)/1.055)**2.4};return .2126*n(0)+.7152*n(2)+.0722*n(4)}(el)??1)<.06?"dark":null,eu=(0,n.useMemo)(()=>L(E,ei,ea),[E,ei,ea]),eh=(0,n.useMemo)(()=>k(eu),[eu]),ef=(0,n.useMemo)(()=>v({len:E.eyeLen,width:E.eyeWidth,bend:E.eyeBend,taper:E.eyeTaper,tilt:E.eyeTilt,cx:120-E.eyeGap/2,cy:E.eyeY}),[E]),em=(0,n.useMemo)(()=>v({len:E.eyeLen,width:E.eyeWidth,bend:E.eyeBend,taper:E.eyeTaper,tilt:E.eyeTilt+E.eyeSkew,cx:120+E.eyeGap/2,cy:E.eyeY}),[E]),ep=eo?.look??null,eg=!!x,ex=(0,n.useRef)({cfg:E,state:y,getSpectrum:b,radii:eu,shapeSeed:ea,look:ep,crossed:eg,grow:ec});ex.current={cfg:E,state:y,getSpectrum:b,radii:eu,shapeSeed:ea,look:ep,crossed:eg,grow:ec},(0,n.useEffect)(()=>{B||(B=!0,window.addEventListener("pointermove",e=>{O.x=e.clientX,O.y=e.clientY,O.live=!0},{passive:!0}));let e=0,t=ex.current.shapeSeed%17*.91,n=0,a=0,i=performance.now()+600+D(),l=0,s=130,o=0,c=(0,r.createVoiceFollower)(),d={...R.idle},u=Object.keys(d),f=0,m=0,x=.5,y=0,b=0,v=0,M=Array(r.SPECTRUM_BANDS).fill(0),w=Array.from({length:r.SPECTRUM_BANDS},(e,t)=>1.7*t),j=0,L=performance.now(),C=null,z=performance.now()+1500+3e3*Math.random(),E=B=>{e=requestAnimationFrame(E);let{cfg:F,state:K}=ex.current,Y=B/1e3*F.speed,P=Math.min(.05,(B-L)/1e3);L=B;let q=R[K];for(let e of u)d[e]+=(q[e]-d[e])*.06;j+=P*d.churnSpeed*F.speed;let ea="speaking"===K?ex.current.getSpectrum?.():void 0,ei=c.read(ea??_,P),el=0;for(let e=0;e<r.SPECTRUM_BANDS;e++){let t=ei.bands[e];M[e]+=(t-M[e])*F.bandEase,w[e]+=P*(.05+.018*e)*(e%2?-1:1),el+=t}let es="speaking"===K?g(ei.level,0,1):0;f+=(es-f)*.3,m+=(es-m)*.016,ei.onset>0&&B-v>340&&(v=B,b-=F.punch*Math.min(1,1.6*f)*F.bobRate);let eo=.01*F.bobRate*F.bobRate;if(b+=-y*eo-.085*b*F.bobRate,y+=b,el>.04){let e=0;for(let t=0;t<r.SPECTRUM_BANDS;t++)e+=M[t]*t;x+=(e/el/(r.SPECTRUM_BANDS-1)-x)*.04}else x+=(.5-x)*.03;let ec=d.dwell;if(F.idle&&!C&&B>=z){let e=function(e){let t=T[e],n=e=>I[e].weight*(t[e]??1),r=0;for(let e of $)r+=n(e);let a=Math.random()*r;for(let e of $)if((a-=n(e))<=0)return e;return $[0]}(K),t=I[e],n=Math.PI/4*Math.floor(8*Math.random());C={key:e,start:B,dur:t.dur[0]+Math.random()*(t.dur[1]-t.dur[0]),dx:Math.cos(n),dy:.7*Math.sin(n)-.5*("thinking"===K)}}let ed=N;if(C){let e=(B-C.start)/C.dur;e>=1?(C=null,z=B+(9e3-74*F.liveliness)*ec*(.6+.8*Math.random())):(ed={...N,...I[C.key].play(e,C.dx,C.dy)}).blinkIn>0&&0===o&&(o=B+ed.blinkIn)}if(G.current){let e=F.breathe*d.breathe/100,n=m*F.pulse/300-.05*y,r=(.45-x)/.45*m*(F.stretch/100),a=(1+e*Math.sin(1.6*Y+t)-.75*n+r)*d.body*ed.scale/d.aspect,i=(1+n-.8*r)*d.body*ed.scale*d.aspect,l=25*e*Math.sin(1.1*Y+1.7*t)+ed.rot+d.lean,s=120+90*e*Math.sin(.7*Y+.6*t)+ed.bodyX,o=120+120*e*Math.sin(1.3*Y+2.3*t)+ed.bodyY+y*F.pulse*2;G.current.setAttribute("transform",`translate(${p(s)} ${p(o)}) rotate(${p(l)}) scale(${i.toFixed(4)} ${a.toFixed(4)}) translate(${-120} ${-120})`)}let eu=ex.current.look;if(eu){let e=B/1e3,t=ex.current.grow;if("flow"===eu)J.current?.setAttribute("gradientTransform",`rotate(-35 120 120) translate(${p(-(e/3.6%1)*A(t))} 0)`);else if("aurora"===eu)for(let[t,n]of S.entries()){let r=.5-.5*Math.cos(e/n.period*h);Q.current[t]?.setAttribute("transform",`translate(${p(n.sway*r)} 0) translate(${n.cx} 91) skewX(${p(20*r-10)}) scale(1 ${p(1+.18*r)}) translate(${-n.cx} -91)`)}}let eh=(M[0]+M[1]+M[2])/3,ef=(M[3]+M[4])/2,em=(M[5]+M[6]+M[7])/3,ep=eh+ef+em>.03&&F.ripple>0,eg=d.churn>0;if(H.current&&(ep||eg)){let e=j,n=k(ex.current.radii.map((n,r)=>{let a=r/128*h,i=n;return ep&&(i+=F.ripple*(eh*Math.sin(2*a+w[0])+.7*ef*Math.sin(3*a+w[1])+.5*em*Math.sin(4*a+w[2]))),eg&&(i+=d.churn*(.65*Math.sin(2*a+e)+.35*Math.sin(3*a-1.4*e+t))),i}));H.current.setAttribute("d",n),W.current?.setAttribute("d",n),Z.current?.setAttribute("d",n)}if(U.current){let e=0,r=0;if(F.follow&&O.live&&er.current){let t=er.current.getBoundingClientRect();t.width>0&&(e=g((O.x-(t.left+t.width/2))/(1.5*t.width),-1,1)*F.gazeRange,r=g((O.y-(t.top+t.height/2))/(1.5*t.height),-1,1)*F.gazeRange)}n+=(e-n)*.12,a+=(r-a)*.12;let c=F.float*d.float*(.62*Math.sin(1.15*Y+t)+.38*Math.sin(.47*Y+2.1*t)),u=1;if(0===l&&!ex.current.crossed&&(o>0&&B>=o?(l=B,o=0):F.blink&&B>=i&&(l=B),l>0&&(s=110+60*Math.random())),l>0){let e=(B-l)/s;e>=1?(l=0,i=B+D()*d.blink):u=1-.94*Math.sin(Math.PI*e)}let h=`translate(${p(n+ed.eyeX+d.gazeX)} ${p(a+c+ed.eyeY+d.gazeY)}) translate(120 ${F.eyeY}) scale(1 ${u.toFixed(3)}) translate(${-120} ${-F.eyeY})`;U.current.setAttribute("transform",h),ee.current?.setAttribute("transform",h);let f=ed.eyeWid*(1-.13*m)*d.eyes,x=ed.eyeLen*(1+.04*m)*d.eyes,y=F.eyeGap/2;for(let[e,t]of[X,V].entries()){if(!t.current)continue;let n=120+(0===e?-y:y),r=0===e?F.eyeTilt:F.eyeTilt+F.eyeSkew,a=x.toFixed(3),i=f.toFixed(3),l=`translate(${p(n)} ${F.eyeY}) rotate(${p(r)}) scale(${a} ${i}) rotate(${p(-r)}) translate(${p(-n)} ${-F.eyeY})`;t.current.setAttribute("transform",l),(0===e?et:en).current?.setAttribute("transform",l)}}};return e=requestAnimationFrame(E),()=>cancelAnimationFrame(e)},[]);let ey=E.notifyAngle*Math.PI/180,eb=eo?`url(#${P})`:"var(--fg)",ek=p(18-3*ec),ev=p(22-9*ec),eM=(e,n,r)=>eg?(0,t.jsx)("path",{d:`M${n-ek} ${E.eyeY-ek}L${n+ek} ${E.eyeY+ek}M${n+ek} ${E.eyeY-ek}L${n-ek} ${E.eyeY+ek}`,fill:"none",stroke:r,strokeWidth:ev,strokeLinecap:"round"}):(0,t.jsx)("path",{d:e,fill:r});return(0,t.jsxs)("svg",{ref:er,"data-slot":"bot-mark","aria-hidden":"true",className:j,viewBox:m,width:e,height:e,style:{overflow:"visible","--fg":el},children:[(0,t.jsxs)("defs",{children:[(0,t.jsx)("clipPath",{id:z,children:(0,t.jsx)("path",{ref:W,d:eh})}),E.fill&&(0,t.jsxs)("mask",{id:Y,maskUnits:"userSpaceOnUse",children:[(0,t.jsx)("path",{ref:Z,d:eh,fill:"#fff"}),(0,t.jsx)("g",{clipPath:`url(#${z})`,children:(0,t.jsxs)("g",{ref:U,children:[(0,t.jsx)("g",{ref:X,children:eM(ef,120-E.eyeGap/2,"#000")}),(0,t.jsx)("g",{ref:V,children:eM(em,120+E.eyeGap/2,"#000")})]})}),es&&(0,t.jsx)("circle",{cx:p(120+Math.cos(ey)*E.notifyDist),cy:p(120+Math.sin(ey)*E.notifyDist),r:E.notifyR+E.notifyRing,fill:"#000",className:f})]}),eo&&(0,t.jsx)("linearGradient",{ref:J,id:P,...(C=eo.look,"flow"===C?{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:A(ec),y2:0,spreadMethod:"repeat"}:{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:240*("duo"===C),y2:240}),children:(function({look:e,colors:t}){let n="aurora"===e?t.slice(0,2):t;return n.map((e,t)=>({offset:t/(n.length-1),color:e}))})(eo).map(e=>(0,t.jsx)("stop",{offset:e.offset,stopColor:e.color},`${e.offset}-${e.color}`))}),eo?.look==="aurora"&&(0,t.jsx)("filter",{id:q,filterUnits:"userSpaceOnUse",x:-72,y:-72,width:384,height:384,colorInterpolationFilters:"sRGB",children:(0,t.jsx)("feGaussianBlur",{stdDeviation:p(34-12*ec)})})]}),(0,t.jsxs)("g",{ref:G,children:[E.fill?(0,t.jsxs)("g",{mask:`url(#${Y})`,children:[(0,t.jsx)("path",{ref:H,d:eh,fill:eb}),eo?.look==="aurora"&&(0,t.jsxs)("g",{filter:`url(#${q})`,children:[(0,t.jsx)("rect",{x:-72,y:-72,width:384,height:384,fill:eb}),S.map((e,n)=>(0,t.jsx)("ellipse",{ref:e=>{Q.current[n]=e},cx:e.cx,cy:91,rx:p(60-29*ec),ry:138,fill:eo.colors[2+n],style:{mixBlendMode:"screen"}},e.cx))]})]}):(0,t.jsx)("path",{ref:H,d:eh,fill:"none",stroke:eb,strokeWidth:E.strokeWidth,strokeLinejoin:"round"}),E.fill&&"dark"===ed&&(0,t.jsx)("g",{clipPath:`url(#${z})`,opacity:.92,children:(0,t.jsxs)("g",{ref:ee,children:[(0,t.jsx)("g",{ref:et,children:eM(ef,120-E.eyeGap/2,"#fff")}),(0,t.jsx)("g",{ref:en,children:eM(em,120+E.eyeGap/2,"#fff")})]})}),!E.fill&&(0,t.jsx)("g",{clipPath:`url(#${z})`,children:(0,t.jsxs)("g",{ref:U,children:[(0,t.jsx)("g",{ref:X,children:eM(ef,120-E.eyeGap/2,eb)}),(0,t.jsx)("g",{ref:V,children:eM(em,120+E.eyeGap/2,eb)})]})}),es&&(0,t.jsx)("circle",{cx:p(120+Math.cos(ey)*E.notifyDist),cy:p(120+Math.sin(ey)*E.notifyDist),r:E.notifyR,className:(0,a.cn)("fill-amber-600 dark:fill-amber-400",f)})]})]})}e.s(["BotMark",0,K,"BotsMark",0,function({size:e=16,className:n}){return(0,t.jsx)(K,{size:e,seed:"bots",className:n})},"markAtRest",0,function(e){let t=(e,t)=>v({len:M.eyeLen,width:M.eyeWidth,bend:M.eyeBend,taper:M.eyeTaper,tilt:t,cx:e,cy:M.eyeY});return{head:k(L(M,M.shape,F(e))),eyes:[t(120-M.eyeGap/2,M.eyeTilt),t(120+M.eyeGap/2,M.eyeTilt+M.eyeSkew)]}}],635963)},805995,906232,e=>{"use strict";var t=e.i(843476),n=e.i(493801),r=e.i(456420);let a={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"}]]};a.node;let i=(0,r.default)(a),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 s=(0,r.default)(l);var o=e.i(689664),c=e.i(867927);let d={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"}]]};d.node;let u=(0,r.default)(d);var h=e.i(560972),h=h,f=e.i(815170),m=e.i(758925),p=e.i(566595),g=e.i(986206),x=e.i(466787),y=e.i(271645),b=e.i(798120),k=e.i(167881),v=e.i(23750),M=e.i(917162),w=e.i(59377),j=e.i(818125),L=e.i(671428),A=e.i(412294),S=e.i(146538),N=e.i(968978),C=e.i(265402),z=e.i(635963),E=e.i(95187);let I=(0,E.createServerReference)("7f35fd2496a448d9a9078b3acd8ae8690a8bae0571",E.callServer,void 0,E.findSourceMapURL,"removeConfigAction");e.s(["removeConfigAction",0,I],906232);var $=e.i(690191),T=e.i(992112),R=e.i(508734),_=e.i(421429),D=e.i(36174);let O={telegram:"telegram.org",discord:"discord.com",slack:"slack.com"},B=`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
- `,F=({href:e,children:n})=>(0,t.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:n}),K=({children:e})=>(0,t.jsx)("span",{className:"font-medium text-foreground",children:e}),Y={telegram:[(0,t.jsxs)(t.Fragment,{children:["In Telegram, write to"," ",(0,t.jsx)(F,{href:"https://t.me/BotFather",children:"@BotFather"}),", send ",(0,t.jsx)(K,{children:"/newbot"})," ","and pick a name. It answers with a ",(0,t.jsx)(K,{children:"token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["Paste the token below, under ",(0,t.jsx)(K,{children:"Telegram"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["From your phone, ",(0,t.jsx)(K,{children:"write anything to your new bot"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["A question appears on this computer. Press ",(0,t.jsx)(K,{children:"Allow"}),". Done — write to the bot and Thursday answers."]})],discord:[(0,t.jsxs)(t.Fragment,{children:["At"," ",(0,t.jsx)(F,{href:"https://discord.com/developers/applications",children:"discord.com/developers"}),", make a ",(0,t.jsx)(K,{children:"New Application"}),". On its ",(0,t.jsx)(K,{children:"Bot"})," page press"," ",(0,t.jsx)(K,{children:"Reset Token"})," and copy it."]}),(0,t.jsxs)(t.Fragment,{children:["Paste the token below, under ",(0,t.jsx)(K,{children:"Discord"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["On the application's ",(0,t.jsx)(K,{children:"OAuth2"})," page, make an invite link with the"," ",(0,t.jsx)(K,{children:"bot"})," scope and add the bot to a server of your own. Discord only lets you write to a bot you share a server with."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Send the bot a direct message"})," (not in the server), then press"," ",(0,t.jsx)(K,{children:"Allow"})," on this computer."]})],slack:[(0,t.jsxs)(t.Fragment,{children:["At ",(0,t.jsx)(F,{href:"https://api.slack.com/apps",children:"api.slack.com/apps"}),","," ",(0,t.jsx)(K,{children:"Create New App › From a manifest"}),", and paste the manifest (the button under these steps copies it)."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Basic Information › App-Level Tokens"}),": generate one with"," ",(0,t.jsx)(K,{children:"connections:write"}),". It starts with xapp- — paste it below as the"," ",(0,t.jsx)(K,{children:"app token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Install App"})," to your workspace. The Bot User OAuth Token starts with xoxb- — paste it below as the ",(0,t.jsx)(K,{children:"bot token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["In Slack, open the app under ",(0,t.jsx)(K,{children:"Apps"}),", write in its ",(0,t.jsx)(K,{children:"Messages"})," ","tab, then press ",(0,t.jsx)(K,{children:"Allow"})," on this computer."]})]};function P(){let[e,n]=(0,y.useState)("telegram"),[r,a]=(0,y.useState)(!1);return(0,t.jsxs)("section",{className:"space-y-4 rounded-xl bg-muted/40 p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("p",{className:"min-w-0 flex-1 text-sm font-medium",children:"Connect a chat app in four steps"}),(0,t.jsx)(_.Segmented,{"aria-label":"Which chat app",value:e,onChange:n,options:D.REACH_CHANNELS.map(e=>({value:e,label:(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(j.SiteIcon,{host:O[e],className:"size-3.5 rounded-[3px]"}),D.REACH_LABEL[e]]})}))})]}),(0,t.jsx)("ol",{className:"space-y-2.5",children:Y[e].map((e,n)=>(0,t.jsxs)("li",{className:"flex gap-3 text-[13px] leading-relaxed",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-full bg-background font-mono text-[10.5px] text-muted-foreground ring-1 ring-border/60",children:n+1}),(0,t.jsx)("span",{className:"min-w-0 text-muted-foreground",children:e})]},n))}),"slack"===e&&(0,t.jsxs)(k.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(B).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)}),children:[r?(0,t.jsx)(o.Check,{}):(0,t.jsx)(R.Copy,{}),r?"Copied":"Copy the manifest"]}),(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:["Only the one person you allow can write, and only direct messages are read. This computer has to be on with Thursday running; for bots to work while no tab is open, switch on ",(0,t.jsx)(K,{children:"Work while the app is closed"})," in Settings › Bots."]})]})}var q=e.i(511769),G=e.i(609856),U=e.i(283653),H=e.i(647163);let W=(0,E.createServerReference)("7fa609aaba119f440bacd729953ca9f7df8aede8ed",E.callServer,void 0,E.findSourceMapURL,"forgetReachAction");function X(){let{data:e}=(0,U.useServerRoute)(b.queryKey.reach);return((0,q.useAppEvent)({reach:()=>void(0,U.revalidate)(b.queryKey.reach)}),e?.channels.length)?(0,t.jsx)("div",{className:"pt-2",children:e.channels.map(e=>(0,t.jsx)(V,{channel:e},e.name))}):null}function V({channel:e}){let[n,r]=(0,G.useServerAction)(W,{onOk:()=>(0,U.revalidate)(b.queryKey.reach)}),a="px-1 text-xs leading-6",i=D.REACH_LABEL[e.name];return e.problem&&!e.bot?(0,t.jsxs)("p",{className:(0,H.cn)(a,"text-destructive"),children:[i,": ",e.problem]}):e.bot?e.allowed?(0,t.jsxs)("p",{className:(0,H.cn)(a,"text-muted-foreground"),children:[i,": listening as ",e.bot,". ",e.allowed.name," is let in."," ",(0,t.jsx)("button",{type:"button",disabled:r,onClick:()=>void n(e.name).catch(()=>{}),className:"rounded-sm text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:"Let them go"})]}):(0,t.jsxs)("p",{className:(0,H.cn)(a,H.WAITING_INK),children:[i,": listening as ",e.bot,". Write to it from your phone, then press Allow here."]}):(0,t.jsxs)("p",{className:(0,H.cn)(a,"text-muted-foreground"),children:[i,": connecting…"]})}var Z=e.i(895836);let J={[T.EXA_API_KEY]:p.Search,...Object.fromEntries(Object.values(D.REACH_KEYS).flat().map(e=>[e,g.Smartphone]))},Q={image:f.Image,video:u,speech:i,transcription:s},ee={keys:["voice","easy","text","search"],models:["bots","studio"],phone:["phone"]};function et({screen:e}){let{data:n,isLoading:r,error:a}=(0,U.useServerRoute)(b.queryKey.config);if(r)return(0,t.jsx)(Z.SettingSkeleton,{rows:4});if(a)return(0,t.jsx)(Z.SettingError,{message:a.message});let i=e=>(0,T.isConfigSet)(n,e),l=ee[e].flatMap(e=>T.CONFIG_GROUPS.find(t=>t.id===e)??[]),s=l.filter(e=>"keys"===e.section).flatMap(e=>e.entries);return(0,t.jsxs)(Z.SettingScreen,{footer:(0,t.jsx)(Z.SettingRailNote,{children:"models"===e?"Her own voice and backend models are in Thursday. A bot can pick its own on its page.":"phone"===e?"Nothing on this computer is opened to the internet: the app asks the chat service what was written.":`${s.filter(e=>i(e.key)).length} of ${s.length} set${l.some(e=>!(0,T.groupSatisfied)(e,i))?" · a call needs one voice key":" · your keys stay on this machine"}`}),children:["phone"===e&&(0,t.jsx)(P,{}),l.map(e=>(0,t.jsxs)(Z.SettingGroup,{label:e.title,hint:e.hint,right:(0,t.jsx)(er,{group:e,isSet:i}),children:["easy"===e.id?(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:e.entries.map(e=>(0,t.jsx)(ea,{card:!0,entry:e,set:i(e.key),needed:!1},e.key))}):"text"===e.id?(0,t.jsx)("div",{className:"flex flex-wrap gap-x-1.5 gap-y-3.5",children:e.entries.map(e=>(0,t.jsx)(en,{entry:e,set:i(e.key)},e.key))}):(0,t.jsx)(Z.SettingItems,{children:e.entries.map(r=>{let a;return r.choices?(0,t.jsx)(ef,{entry:r,choices:r.choices,value:(a=r.key,n?.find(e=>e.key===a)?.value),isSet:i},r.key):(0,t.jsx)(ea,{entry:r,set:i(r.key),needed:!(0,T.groupSatisfied)(e,i)},r.key)})}),"phone"===e.id&&(0,t.jsx)(X,{})]},e.id))]})}function en({entry:e,set:n}){return(0,t.jsxs)("button",{type:"button",onClick:()=>ex(e,n),"aria-label":`${e.label}: ${n?"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,t.jsxs)("span",{className:"relative grid size-10.5 place-items-center rounded-[13px] bg-muted/60 transition-colors group-hover:bg-muted",children:[(0,t.jsx)(eh,{entry:e}),n&&(0,t.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,t.jsx)(o.Check,{className:"size-2.5"})})]}),(0,t.jsx)("span",{className:(0,H.cn)("max-w-full truncate text-[11px]",n?"text-foreground":"text-muted-foreground"),children:e.label})]})}function er({group:e,isSet:n}){return"none"===e.require?null:(0,T.groupSatisfied)(e,n)?(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(o.Check,{className:"size-3"}),"ready"]}):(0,t.jsxs)("span",{className:(0,H.cn)("flex items-center gap-1 font-mono text-[11px]",H.WAITING_INK),children:[(0,t.jsx)(x.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function ea({entry:e,set:n,needed:r,card:a=!1,narrow:i=!1}){let l=es(e,n),s=ec(e,n),d=eo(e,n),u=s.data?ed(s.data):el(n,r,l.data,e.signIn),h=l.isLoading||s.isLoading,f=(0,t.jsxs)("span",{className:(0,H.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",u.ink),children:[u.warn?(0,t.jsx)(x.TriangleAlert,{className:"size-3"}):n&&(0,t.jsx)(o.Check,{className:"size-3"}),u.text]});return(0,t.jsxs)("button",{type:"button",onClick:()=>{var r;return e.signIn?(r=e,M.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(eg,{entry:r,onDone:e})})):ex(e,n)},className:(0,H.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",a&&"rounded-xl border border-border/60"),children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(eh,{entry:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate text-sm font-medium",children:[e.label,e.recommended&&(0,t.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,t.jsx)(L.Skeleton,{className:"h-3 w-20"}):f:(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.signIn?n?eu(s.data,d):"sign in with your account":e.key})]}),i?null:h?(0,t.jsx)(L.Skeleton,{className:"h-3 w-20 shrink-0"}):f,(0,t.jsx)(c.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let ei=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function el(e,t,n,r){return e?n?"refused"in n?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${ei.format(n.balance)} left`,ink:n.low?H.WAITING_INK:"text-muted-foreground",warn:n.low}:{text:r?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:t?{text:"Needed",ink:H.WAITING_INK,warn:!0}:{text:r?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function es(e,t){return(0,U.useServerRoute)(t&&"vercel-ai-gateway"===e.provider?b.queryKey.gatewayCredits:null)}function eo(e,t){let{data:n}=(0,U.useServerRoute)(t&&e.signIn?b.queryKey.llmModel:null);return n?.find(t=>t.id===e.provider)?.plan??null}function ec(e,t){return(0,U.useServerRoute)(t&&e.signIn?b.queryKey.subscriptionUsage:null)}function ed(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?H.WAITING_INK:"text-muted-foreground",warn:e.high}}function eu(e,t){let r=!e||"refused"in e?null:e,a=`${r?.plan??t??"unknown"} plan`;return r?.resetsAt?`${a} \xb7 resets in ${(0,n.formatDistanceToNowStrict)(new Date(r.resetsAt))}`:a}function eh({entry:e}){if(e.provider)return(0,t.jsx)(N.ProviderIcon,{provider:e.provider,className:"size-4"});let n=J[e.key]??m.KeyRound,r=(0,t.jsx)(n,{className:"size-4 text-muted-foreground"});return e.site?(0,t.jsx)(j.SiteIcon,{host:e.site,className:"size-4 rounded-[4px]",fallback:r}):r}function ef({entry:e,choices:n,value:r,isSet:a}){let i=n.find(e=>e.value===r),l=n.filter(e=>a(e.needs)),s=r&&!i?r:null,o=e.kind?Q[e.kind]:z.BotsMark;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var r,a,i;return e.kind||e.text?(r=e,M.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(em,{entry:r,onDone:e})})):(a=e,i=n,M.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(ep,{entry:a,choices:i,onDone:e})}))},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-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(o,{className:"size-4 text-muted-foreground"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!i&&!s&&(0,t.jsx)("span",{className:(0,H.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?H.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:i?.label??s??(e.kind?"Not offered to bots until you pick one":l[0]?.label??"No key for any of these yet")})]})]}),(0,t.jsx)(c.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function em({entry:e,onDone:n}){let{data:r}=(0,U.useServerRoute)(b.queryKey.config),a=r?.find(t=>t.key===e.key)?.value,[i,l]=(0,y.useState)(()=>{let t=e.text?(0,C.parseTextModel)(a):(0,C.parseMediaModel)(a);return{provider:t?.provider??null,model:t?.model??""}}),s=()=>{(0,U.revalidate)(b.queryKey.config),n()},[o]=(0,G.useServerAction)($.setConfigAction,{okMessage:`${e.label} saved`,onOk:s}),[c,d]=(0,G.useServerAction)(I,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:s});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)(k.Button,{variant:"ghost",loading:d,onClick:()=>c(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:n,children:"Close"})]}),children:(0,t.jsx)(S.ModelPicker,{kind:e.kind,provider:i.provider,model:i.model,onChange:t=>{l(t),t.model.trim()&&o(e.key,`${t.provider}/${t.model.trim()}`)}})})}function ep({entry:e,choices:n,onDone:r}){let{data:a}=(0,U.useServerRoute)(b.queryKey.config),i=a?.find(t=>t.key===e.key)?.value,l=()=>{(0,U.revalidate)(b.queryKey.config),r()},[s,o]=(0,G.useServerAction)($.setConfigAction,{okMessage:`${e.label} saved`,onOk:l}),[c,d]=(0,G.useServerAction)(I,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:l});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)(k.Button,{variant:"ghost",loading:d,onClick:()=>c(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:r,children:"Close"})]}),children:(0,t.jsx)(Z.SettingChoiceRows,{options:n.map(e=>({value:e.value,label:e.label,disabled:!(0,T.isConfigSet)(a,e.needs)&&`needs ${e.needs}`})),value:i,onChange:t=>s(e.key,t),disabled:o})})}function eg({entry:e,onDone:n}){let{data:r}=(0,U.useServerRoute)(b.queryKey.config),a=(0,T.isConfigSet)(r,e.key),i=eo(e,a),l=ec(e,a),s=l.data?ed(l.data):null,[o,c]=(0,G.useServerAction)(I,{okMessage:`Signed out of ${e.label}`,onOk:()=>{(0,U.revalidate)(b.queryKey.config),(0,U.revalidate)(b.queryKey.llmModel),n()}});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:a?(0,t.jsxs)(t.Fragment,{children:["Signed in ·"," ",(0,t.jsx)("span",{className:"font-mono",children:eu(l.data,i)}),s&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,H.cn)("font-mono",s.ink),children:s.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)(k.Button,{variant:"ghost",loading:c,onClick:()=>o(e.key),children:"Sign out"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:n,children:a?"Close":"Cancel"}),!a&&(0,t.jsx)(A.ChatGptSignIn,{})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(Z.SettingNote,{children:a?"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."}),l.data&&"refused"in l.data&&(0,t.jsx)(Z.SettingNote,{className:"wrap-break-word text-destructive",children:l.data.refused})]})})}function ex(e,n){return M.notify.component({className:"sm:max-w-md",renderer:({close:r})=>(0,t.jsx)(ey,{entry:e,set:n,onDone:r})})}function ey({entry:e,set:n,onDone:r}){let[a,i]=(0,y.useState)(""),{data:l}=es(e,n),s=l?el(n,!1,l):null,o=()=>{(0,U.revalidate)(b.queryKey.config),(0,U.revalidate)(b.queryKey.llmModel)},[c,d]=(0,G.useServerAction)($.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{o(),r()}}),[u,h]=(0,G.useServerAction)(I,{okMessage:`${e.label} key removed`,onOk:()=>{o(),r()}});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,t.jsxs)(t.Fragment,{children:[" · ",e.hint]}),s&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,H.cn)("font-mono",s.ink),children:s.text})]})]}),footer:(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)(k.Button,{variant:"ghost",loading:h,onClick:()=>u(e.key),children:"Remove"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:r,children:"Cancel"}),(0,t.jsx)(k.Button,{loading:d,disabled:a.trim().length<8,onClick:()=>c(e.key,a),children:n?"Replace":"Save"})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.Input,{value:a,onChange:e=>i(e.target.value),onKeyDown:t=>{"Enter"===t.key&&a.trim().length>=8&&c(e.key,a)},placeholder:n?"New value — replaces the current key":e.key,spellCheck:!1,type:"password",autoFocus:!0}),l&&"refused"in l&&(0,t.jsx)(Z.SettingNote,{className:"wrap-break-word text-destructive",children:l.refused})]})})}e.s(["AccountsSetup",0,function({withoutVoice:e=!1}){let{data:n}=(0,U.useServerRoute)(b.queryKey.config),r=e=>(0,T.isConfigSet)(n,e),a=e=>T.CONFIG_GROUPS.find(t=>t.id===e)?.entries??[],[i,l]=(0,y.useState)(!1),s=a("voice"),o=[...s,...a("text")],c=o.filter((t,n)=>(n<4||r(t.key))&&!(e&&s.includes(t))),d=o.filter(t=>!c.includes(t)&&!(e&&s.includes(t)));return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"flex flex-col gap-2",children:a("easy").map(e=>(0,t.jsx)(ea,{card:!0,narrow:!0,entry:e,set:r(e.key),needed:!1},e.key))}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-y-2.5",children:[c.map(e=>(0,t.jsx)(en,{entry:e,set:r(e.key)},e.key)),d.length>0&&(0,t.jsxs)(w.Popover,{open:i,onOpenChange:l,children:[(0,t.jsxs)(w.PopoverTrigger,{"aria-label":`${d.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,t.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,t.jsx)(h.default,{className:"size-4"})}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"More"})]}),(0,t.jsx)(w.PopoverContent,{align:"end",className:"w-78 flex-row flex-wrap gap-0 gap-y-2.5 rounded-2xl p-2.5",onClick:()=>l(!1),children:d.map(e=>(0,t.jsx)(en,{entry:e,set:r(e.key)},e.key))})]})]}),a("search").map(e=>(0,t.jsx)(ea,{card:!0,narrow:!0,entry:e,set:r(e.key),needed:!1},e.key))]})},"KeysSetting",0,()=>(0,t.jsx)(et,{screen:"keys"}),"ModelsSetting",0,()=>(0,t.jsx)(et,{screen:"models"}),"PhoneSetting",0,()=>(0,t.jsx)(et,{screen:"phone"})],805995)},992112,e=>{"use strict";var t=e.i(149666),n=e.i(265402),r=e.i(36174);let a=[t.LIVE_PROVIDER.apiKeyName],i={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},l={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},s="EXA_API_KEY",o="DEFAULT_MODEL",c={key:o,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:n.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},d=e=>a.includes(e.apiKeyName),u=e=>!!e.signIn||"vercel-ai-gateway"===e.id,h=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn}),f=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:n.TEXT_MODEL_PROVIDER_LIST.filter(d).map(h)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:n.TEXT_MODEL_PROVIDER_LIST.filter(u).map(e=>({...h(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:n.TEXT_MODEL_PROVIDER_LIST.filter(e=>!d(e)&&!u(e)).map(h)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:s,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai"}]},{id:"phone",title:"phone",hint:"write to Thursday from a chat app — nothing is opened to the outside",section:"keys",require:"none",entries:[{key:r.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:r.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:r.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:r.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[c]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(i).map(e=>({key:i[e],...l[e],kind:e,choices:n.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(f.flatMap(e=>e.entries).map(e=>[e.key,e])),f.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(f.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_GROUPS",0,f,"DEFAULT_MODEL_KEY",0,o,"EXA_API_KEY",0,s,"MEDIA_MODEL_KEYS",0,i,"groupSatisfied",0,function(e,t){return"none"===e.require||(e.requireKeys??e.entries.map(e=>e.key)).some(t)},"isConfigSet",0,function(e,t){return e?.some(e=>e.key===t&&e.set)??!1},"mediaModelWords",0,e=>`${"image"===e?"an":"a"} ${e} model`])},690191,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f56d212c51cd2b159b8be5a96edb384a5b4ebc17b",t.callServer,void 0,t.findSourceMapURL,"setConfigAction");e.s(["setConfigAction",0,n])},36174,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",n="DISCORD_BOT_TOKEN",r="SLACK_APP_TOKEN",a="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,n,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[n],slack:[r,a]},"REACH_LABEL",0,{telegram:"Telegram",discord:"Discord",slack:"Slack"},"SLACK_APP_TOKEN_KEY",0,r,"SLACK_BOT_TOKEN_KEY",0,a,"TELEGRAM_TOKEN_KEY",0,t])},218080,e=>{"use strict";let t=[1,3,5,8,13,21,34,55,90],n=[1,1.1,1.25,1.45,1.7,2,2.4,2.9],r=n.length,a=Array(r).fill(0);function i(e,a,i){e.getByteFrequencyData(a);for(let e=0;e<r;e++){let r=0,l=t[e],s=Math.min(t[e+1],a.length);for(let e=l;e<s;e++)r+=a[e];let o=s>l?r/(s-l)/255:0;i[e]=Math.min(1,o*n[e])}return i}e.s(["SPECTRUM_BANDS",0,r,"createAudioTap",0,function(){let e=new Audio;e.autoplay=!0;let t=null,n=null,l=new Uint8Array(0),s=null,o=Array(r).fill(0),c=null,d=new Uint8Array(0),u=null,h=Array(r).fill(0),f=new Uint8Array(512);function m(){if(t&&n)return{context:t,analyser:n};let e=new AudioContext,r=e.createAnalyser();return r.fftSize=512,r.smoothingTimeConstant=.55,l=new Uint8Array(r.frequencyBinCount),e.resume().catch(()=>{}),t=e,n=r,{context:e,analyser:r}}return{element:e,open:m,levels:()=>{var e;return{output:(e=n)?(e.getByteTimeDomainData(f),Math.sqrt(f.reduce((e,t)=>e+((t-128)/128)**2,0)/f.length)):0}},listen(e){if(s?.mediaStream===e)return;s?.disconnect();let t=m();(s=t.context.createMediaStreamSource(e)).connect(t.analyser),t.context.resume()},hear(e){if(u?.mediaStream===e)return;u?.disconnect();let t=m();c||((c=t.context.createAnalyser()).fftSize=512,c.smoothingTimeConstant=.6,d=new Uint8Array(c.frequencyBinCount)),(u=t.context.createMediaStreamSource(e)).connect(c),t.context.resume()},read:()=>n?i(n,l,o):a,readMic:()=>c?i(c,d,h):a}},"createClipTap",0,function(e){let t=new AudioContext,n=t.createAnalyser();n.fftSize=512,n.smoothingTimeConstant=.55;let a=new Uint8Array(n.frequencyBinCount),l=Array(r).fill(0);return t.createMediaElementSource(e).connect(n),n.connect(t.destination),{resume:()=>t.resume().catch(()=>{}),read:()=>i(n,a,l),close:()=>t.close().catch(()=>{})}},"createVoiceFollower",0,function(){let e=Array(r).fill(0),t=Array(r).fill(0),n={level:0,phrase:0,onset:0,bands:Array(r).fill(0)},a=0,i=0,l=1/0,s=(e,t,n,r)=>e+(t-e)*Math.min(1,r/n);return{read(o,c){let d=0,u=0,h=0;for(let a=0;a<r;a++){let r=o[a]??0;d+=r,e[a]=s(e[a],r,r>e[a]?.03:2.5,c),t[a]=s(t[a],r,r<t[a]?.12:3,c);let i=e[a]-t[a],l=i>.12?Math.min(1,Math.max(0,(r-t[a])/i)):0;n.bands[a]=l,i>.12&&(u+=l,h++)}let f=Math.min(1,Math.max(0,(d/r-.06)/.14)),m=f*f*(3-2*f);for(let e=0;e<r;e++)n.bands[e]*=m;return n.level=(h?u/h:0)*m,a=s(a,n.level,.05,c),i=s(i,n.level,.22,c),n.phrase=s(n.phrase,n.level,.45,c),l+=c,n.onset=0,a>i+.1&&a>.3&&l>.12&&(l=0,n.onset=Math.min(1,a)),n}}}])},33383,e=>{"use strict";var t=e.i(271645),n=e.i(108868),r=e.i(145484),a=e.i(146376);e.s(["useAnchoredPopupScrollLock",0,function(e,i,l,s){let[o,c]=t.useState(!1);(0,a.useIsoLayoutEffect)(()=>{if(!e||!i||null==l)return void c(!1);let t=(0,n.ownerDocument)(l).documentElement.clientWidth,r=l.offsetWidth;c(t>0&&r>0&&r>=t-20)},[e,i,l]),(0,r.useScrollLock)(e&&(!i||o),s)}])},493801,e=>{"use strict";var t=e.i(24708),n=e.i(55545),r=e.i(455024),a=e.i(99151),i=e.i(845110),l=e.i(281092),s=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,o){return function(e,t,o){var c;let d,u,h=(0,r.getDefaultOptions)(),f=o?.locale??h.locale??n.defaultLocale,m=(u=(0,l.toDate)(e)-(0,l.toDate)(t))<0?-1:u>0?1:u;if(isNaN(m))throw RangeError("Invalid time value");let p=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:m}),[g,x]=(0,i.normalizeDates)(o?.in,...m>0?[t,e]:[e,t]),y=(c=o?.roundingMethod??"round",e=>{let t=(c?Math[c]:Math.trunc)(e);return 0===t?0:t}),b=x.getTime()-g.getTime(),k=b/s.millisecondsInMinute,v=(b-((0,a.getTimezoneOffsetInMilliseconds)(x)-(0,a.getTimezoneOffsetInMilliseconds)(g)))/s.millisecondsInMinute,M=o?.unit;if("second"===(d=M||(k<1?"second":k<60?"minute":k<s.minutesInDay?"hour":v<s.minutesInMonth?"day":v<s.minutesInYear?"month":"year"))){let e=y(b/1e3);return f.formatDistance("xSeconds",e,p)}if("minute"===d){let e=y(k);return f.formatDistance("xMinutes",e,p)}if("hour"===d){let e=y(k/60);return f.formatDistance("xHours",e,p)}if("day"===d){let e=y(v/s.minutesInDay);return f.formatDistance("xDays",e,p)}if("month"===d){let e=y(v/s.minutesInMonth);return 12===e&&"month"!==M?f.formatDistance("xYears",1,p):f.formatDistance("xMonths",e,p)}else{let e=y(v/s.minutesInYear);return f.formatDistance("xYears",e,p)}}(e,(0,t.constructNow)(e),o)}],493801)},508734,e=>{"use strict";var t=e.i(456420);let n={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};n.node;let r=(0,t.default)(n);e.s(["Copy",0,r],508734)},560972,e=>{"use strict";var t=e.i(456420);let n={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};n.node;let r=(0,t.default)(n);e.s(["default",0,r])},815170,e=>{"use strict";var t=e.i(456420);let n={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};n.node;let r=(0,t.default)(n);e.s(["Image",0,r],815170)},611568,e=>{"use strict";var t=e.i(758379);e.s(["LoaderCircle",()=>t.default])},986206,e=>{"use strict";var t=e.i(456420);let n={name:"smartphone",size:24,node:[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]};n.node;let r=(0,t.default)(n);e.s(["Smartphone",0,r],986206)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,616816,e=>{"use strict";var t=e.i(843476),r=e.i(689664),n=e.i(263676),a=e.i(271645),l=e.i(798120),i=e.i(167881),s=e.i(23750),o=e.i(968978),u=e.i(149666),c=e.i(609856),h=e.i(283653),f=e.i(647163),d=e.i(690191),m=e.i(992112);function g({provider:e,saved:r,autoFocus:n,dense:a,plain:l,value:i,ready:s,saving:u,onValue:c,onSubmit:h}){return(0,t.jsxs)("div",{className:"space-y-2",children:[!l&&(0,t.jsxs)("span",{className:"flex items-center gap-2 px-0.5 text-muted-foreground",children:[(0,t.jsx)(o.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:(0,f.cn)("font-mono",a?"text-[11px]":"text-[12.5px]"),children:e.label})]}),(0,t.jsx)(p,{provider:e,saved:r,autoFocus:n,dense:a,mark:l,value:i,ready:s,saving:u,onValue:c,onSubmit:h})]})}function p({provider:e,saved:n,autoFocus:a,dense:l,mark:u,value:c,ready:h,saving:d,onValue:m,onSubmit:g}){let y=c.trim().startsWith("xai-")||c.trim().startsWith("sk-ant-");return(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),g()},className:(0,f.cn)("flex items-center gap-3 rounded-2xl border bg-muted/40 px-4 transition-colors",l?"h-11 rounded-xl px-3":"h-14",n||h?"border-foreground bg-transparent":"border-border"),children:[u&&(0,t.jsx)(o.ProviderIcon,{provider:e.id,className:"size-4 shrink-0 text-muted-foreground"}),(0,t.jsx)(s.Input,{autoFocus:a,type:"password","aria-label":"OpenAI API key",autoComplete:"off",value:c,spellCheck:!1,placeholder:n?"Replace it":"sk-…",onChange:e=>m(e.target.value),className:(0,f.cn)("min-w-0 flex-1 border-0 bg-transparent px-0 font-mono shadow-none focus-visible:ring-0 dark:bg-transparent",l?"h-7 text-[13px]":"h-9 text-[15px]")}),c?(0,t.jsx)(i.Button,{type:"submit",size:"sm",variant:y?"outline":"default",loading:d,disabled:!h,className:(0,f.cn)("shrink-0",l?"h-7 px-3":"h-9 px-4"),children:y?`Not ${e.label}?`:"Save"}):n&&(0,t.jsx)("span",{className:(0,f.cn)("grid shrink-0 animate-in place-items-center rounded-full bg-foreground text-background zoom-in-50 duration-300",l?"size-5":"size-7"),children:(0,t.jsx)(r.Check,{className:l?"size-3":"size-4"})})]})}e.s(["KEY_MIN",0,8,"KeyInput",0,p,"VoiceKeys",0,function({ref:e,autoFocus:r,dense:s=!1,plain:o=!1,onCancel:p,onSaved:y,className:M}){let{data:O}=(0,h.useServerRoute)(l.queryKey.config),[x,A]=(0,a.useState)({}),[E,S]=(0,a.useState)(null),[b,_]=(0,a.useState)(null),[w]=(0,c.useServerAction)(d.setConfigAction,{errorMessage:!1,onError:e=>_(e??"That key was not saved."),onOk:()=>{(0,h.revalidate)(l.queryKey.config),(0,h.revalidate)(l.queryKey.llmModel)}}),N=e=>(x[e]?.trim().length??0)>=8,v=async e=>{let t=e.apiKeyName;if(!N(t)||E)return!1;_(null),S(t);try{return await w(t,x[t]),A(e=>({...e,[t]:""})),y?.(e.id),!0}catch{return!1}finally{S(null)}};return(0,a.useImperativeHandle)(e,()=>({pending:()=>N(u.LIVE_PROVIDER.apiKeyName),flush:async()=>!N(u.LIVE_PROVIDER.apiKeyName)||v(u.LIVE_PROVIDER)})),(0,t.jsxs)("div",{className:(0,f.cn)("w-full",s?"space-y-2":"space-y-4",M),children:[s&&!o&&(0,t.jsxs)("div",{className:"flex h-6 items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"px-0.5 font-mono text-[11px] text-muted-foreground",children:"Voice key"}),p&&(0,t.jsx)(i.Button,{type:"button",size:"icon",variant:"ghost","aria-label":"Not now",onClick:p,className:"-my-1 size-6",children:(0,t.jsx)(n.X,{className:"size-3.5"})})]}),(0,t.jsx)(g,{provider:u.LIVE_PROVIDER,saved:(0,m.isConfigSet)(O,u.LIVE_PROVIDER.apiKeyName),autoFocus:r,dense:s,plain:o,value:x[u.LIVE_PROVIDER.apiKeyName]??"",ready:N(u.LIVE_PROVIDER.apiKeyName),saving:E===u.LIVE_PROVIDER.apiKeyName,onValue:e=>{_(null),A(t=>({...t,[u.LIVE_PROVIDER.apiKeyName]:e}))},onSubmit:()=>void v(u.LIVE_PROVIDER)}),b&&(0,t.jsx)("p",{className:(0,f.cn)("px-0.5 leading-5 break-words",s?"text-xs":"text-center text-[13px]",f.WAITING_INK),children:b}),!o&&(0,t.jsx)("p",{className:(0,f.cn)("px-0.5 font-mono text-muted-foreground",s?"text-[11px]":"pt-1 text-center text-[12.5px]"),children:s?"Live voice and reasoning share this OpenAI API key.":"Live uses an OpenAI API key, billed separately from ChatGPT. Stored on this machine, in this app's database."})]})}])},333495,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(41533),a=e.i(218080),l=e.i(567334);let i=[235,235,235];function s(e){let t=[[],[],[],[],[]],r=0;for(let n of Array.from(e.toUpperCase())){let e=l.LETTERS[n];if(e){if(t[0].length)for(let e of t)e.push(-1);e.forEach((e,n)=>{for(let a of e)t[n].push("#"===a?r:-1)})," "!==n&&r++}}return t}let o=s("ERROR");function u(e,t,r,n,a){return e+(t-e)*Math.min(1,a/(t>e?r:n))}function c(e,t,r,n,a,l){let i=Math.floor(t/(n*l)+e[0].length/2),s=Math.floor(r/(a*l)+e.length/2);return s<0||s>=e.length?-1:e[s][i]??-1}function h(e,t,r,n){let a=e=>Math.max(1,Math.min(3,Math.floor(625.6/(e[0].length*t)),Math.floor(421.6/(e.length*r)))),l=s(n),i=3>a(l)?function(e){let t=Array.from(e.trim()),r=t.flatMap((e,t)=>" "===e?[t]:[]);if(!r.length)return null;let n=t.length/2,a=r.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e),l=s(t.slice(0,a).join("")),i=s(t.slice(a+1).join(""));if(!l[0].length||!i[0].length)return null;let o=Math.max(-1,...l.flat())+1,u=Math.max(l[0].length,i[0].length),c=(e,t)=>{let r=Math.floor((u-e.length)/2);return[...Array(r).fill(-1),...e.map(e=>e<0?e:e+t),...Array(u-e.length-r).fill(-1)]},h=()=>Array(u).fill(-1);return[...l.map(e=>c(e,0)),h(),h(),...i.map(e=>c(e,o))]}(n):null,o=i&&a(i)>a(l)?i:l,u=a(o),h=0;for(let n of e)n.word=c(o,n.dx,n.dy,t,r,u),h=Math.max(h,n.word+1);return h}function f({className:e,mode:s="idle",charset:d=n.ASCII_FACE.charset,fontSize:m=n.ASCII_FACE.fontSize.default,density:g=n.ASCII_FACE.density.default,size:p=680,color:y=i,getSpectrum:M,word:O=null}){let x=(0,r.useRef)(null),A=(0,r.useRef)(null),E=(0,r.useRef)([]),S=(0,r.useRef)(null),b=(0,r.useRef)(d),_=(0,r.useRef)({cur:[...y],target:y}),w=(0,r.useRef)(0),N=(0,r.useRef)(M);N.current=M;let v=(0,r.useRef)({phrase:0,bob:0,bobVel:0,amp:[,,,,].fill(0),phase:Array.from({length:4},(e,t)=>2.1*t),spin:0,rings:[]}),L=(0,r.useRef)({mode:s,start:0}),R=(0,r.useRef)(performance.now()),I=(0,r.useRef)({scale:.3,lift:0,gather:0,comet:0,speech:0,err:0,word:0}),T=(0,r.useRef)(null),k=(0,r.useRef)({cw:1,ch:1});return(0,r.useEffect)(()=>{let e=x.current;if(!e)return;let t=.95*m/g,r=1.25*m/g,n=680/p,a=t*n,i=r*n,s=Math.max(1,Math.floor(625.6/(o[0].length*a)));w.current=p,k.current={cw:a,ch:i};let u=[],f=Math.ceil(p/t),d=Math.ceil(p/r);for(let e=0;e<d;e++)for(let h=0;h<f;h++){let f=h*t,d=e*r,m=(f-p/2)*n,g=(d-p/2)*n,y=Math.hypot(m,g),M=c(o,m,g,a,i,s);M<0&&y>328||u.push({x:f+t/2,y:d+r/2,dx:m,dy:g,dist:y,angle:Math.atan2(g,m),seed:(0,l.hash)(h,e),grain:(0,l.hash)(5.7*h+19,2.3*e+53),gap:.05+.3*(0,l.hash)(7.3*h+11,3.1*e+5),emoji:(0,l.hash)(2.7*h+31,5.9*e+17)<l.EMOJI_RATIO,speck:(0,l.hash)(4.1*h+23,6.3*e+41),letter:M,word:-1})}E.current=u,T.current&&h(u,a,i,T.current.text),S.current={ascii:Array.from({length:l.RAMP.length},()=>new Int32Array(u.length)),emoji:Array.from({length:l.RAMP.length},()=>new Int32Array(u.length)),asciiN:new Int32Array(l.RAMP.length),emojiN:new Int32Array(l.RAMP.length),glyph:Array(u.length)};let y=Math.min(2,window.devicePixelRatio||1);e.width=p*y,e.height=p*y,e.style.width=`${p}px`,e.style.height=`${p}px`;let M=e.getContext("2d");return M&&(M.setTransform(y,0,0,y,0,0),M.font=`700 ${m}px ui-monospace,SFMono-Regular,Menlo,monospace`,M.textAlign="center",M.textBaseline="middle",A.current=M),()=>{M?.clearRect(0,0,p,p),E.current=[],S.current=null}},[m,g,p]),(0,r.useEffect)(()=>{b.current=d},[d]),(0,r.useEffect)(()=>{_.current.target=y},[y]),(0,r.useEffect)(()=>{L.current.mode!==s&&(L.current={mode:s,start:.001*performance.now()})},[s]),(0,r.useEffect)(()=>{if(!O||Date.now()-O.at>(O.hold??3.4)*1e3)return;let{cw:e,ch:t}=k.current,r=performance.now(),n=r-R.current<600?.11*O.text.length+.3+.45:0;T.current={text:O.text,start:.001*r-n,letters:h(E.current,e,t,O.text),hold:O.hold??3.4}},[O]),(0,r.useEffect)(()=>{let e=0,t=(0,a.createVoiceFollower)(),r=Array(a.SPECTRUM_BANDS).fill(0),n=.001*performance.now(),i=0,s=0,o=a=>{let c=.001*a,h=Math.min(.05,Math.max(0,c-n));n=c;let f=A.current,d=S.current;if(!f||!d){e=requestAnimationFrame(o);return}let m=b.current,g=w.current;d.asciiN.fill(0),d.emojiN.fill(0);let p=N.current?.();if(!p||p.length<2){for(let e=0;e<r.length;e++){let t=.5*Math.sin(1.7*c+1.7*e)+.3*Math.sin(.8*c+.6*e)+.2*Math.sin(3*c+2.9*e);r[e]=.5*t+.5}p=r}let y=v.current,M=t.read(p,h);y.phrase=M.phrase,M.onset>0&&(y.bobVel+=.06*M.onset,y.rings.push({born:c,power:M.onset}),y.rings.length>5&&y.rings.shift()),y.bobVel+=-(.012*y.bob)-.09*y.bobVel,y.bob+=y.bobVel,i+=h;for(let e=0;e<4;e++){let t=Math.floor(e*M.bands.length/4),r=Math.max(t+1,Math.floor((e+1)*M.bands.length/4)),n=0;for(let e=t;e<r;e++)n+=M.bands[e];n/=r-t;let a=.7+.6*(0,l.hash)((.9*c|0)+31*e,e);y.amp[e]+=(n*a-y.amp[e])*(.05+.02*e),y.phase[e]+=h*(.9+.5*e)*(e%2?-1:1)}for(y.spin+=h*(1.1+.9*y.phrase);y.rings.length>0&&c-y.rings[0].born>.7;)y.rings.shift();let O=L.current,x=T.current,R=x?c-x.start:0,k=null!==x&&"error"!==O.mode&&R<x.hold+.08*x.letters+.45+.35+.9?{scale:0,lift:0,gather:0,comet:0,speech:0,err:0,word:1}:function(e,t){let r={scale:1,lift:0,gather:0,comet:0,speech:0,err:0,word:0};switch(e){case"idle":return r;case"connecting":{let e=1-Math.exp(-t/1.3);return{...r,scale:.45+.55*e,lift:.06*e,gather:1}}case"speaking":return{...r,speech:1};case"working":return{...r,scale:0,comet:1};case"ending":return{...r,scale:0};case"error":return{...r,scale:0,err:1}}}(O.mode,c-O.start),j=I.current;j.scale=u(j.scale,k.scale,.45,"ending"===O.mode?.4:.7,h),j.lift=u(j.lift,k.lift,.22,.4,h),j.gather=u(j.gather,k.gather,.3,.95,h),j.comet=u(j.comet,k.comet,.45,.9,h),j.speech=u(j.speech,k.speech,.5,.75,h),"error"===O.mode&&(j.err<=.01&&(s=0),s+=h),j.err=u(j.err,k.err,.5,.6,h),j.word=u(j.word,k.word,.35,.5,h);let C=j.err>.5,P=j.word>.5,V="emojiOnly"===m?l.EMOJI_CHAR_RATE:l.CHAR_RATE,$=E.current;for(let e=0;e<$.length;e++){let t=$[e],r=function(e,t,r,n,a,i,s){let o,u,c,h,f=i.scale>.02?function(e,t,r=0,n=1){let a=170*Math.max(.02,n),i=1-(0,l.smoothstep)(.55*a,a,e.dist);return(.58+r+.2*Math.sin(.05*e.dist-.4*t)+.07*Math.sin(.35*t))*i}(e,t,i.lift,i.scale)*(1-.6*i.speech):0;return i.gather>.01&&(f+=function(e,t,r){let n=170*r;if(e.speck>=.55||e.dist<.8*n)return 0;let a=Math.min(55,Math.floor((e.angle+Math.PI)/(2*Math.PI)*56)),i=(.7*t+(0,l.hash)(a,5.3))%1,s=e.dist-(n+(320-n)*(1-i)**1.25)-(e.grain-.5)*16;return Math.exp(-(s*s)/260)*(0,l.smoothstep)(0,.2,i)*(1-i)*1.1}(e,t,i.scale)*i.gather),i.comet>.01&&(f+=(u=Math.exp(-((o=e.dist-210)*o)/1100),u*Math.exp(-((h=Math.atan2(Math.sin(c=e.angle-3*t),Math.cos(c)))*h)/(h<0?2.8:.16))*i.comet)),i.speech>.01&&(f+=function(e,t,r,n){var a;let l=170+40*r.phrase+85*r.bob;for(let t=0;t<4;t++)l+=28*r.amp[t]*Math.sin((t+2)*(e.angle+r.spin)+r.phase[t]);let i=170+(((a=l)<=205?Math.max(110,a):205+30*Math.tanh((a-205)/30))-170)*n,s=(e.grain-.5)*20+20*Math.sin(5*e.angle+.9*t+6.283*e.seed)*.3,o=e.dist-(i+s),u=Math.exp(-(o*o)/800)+.5*Math.exp(-(e.dist*e.dist)/6e3);if(e.dist<i&&(u+=.22*(1-e.dist/i)**.6*(.75+.25*Math.sin(.05*e.dist-1.2*t))),e.speck<.22){let n=90*(.6+.9*e.grain);for(let a=0;a<r.rings.length;a++){let l=r.rings[a],s=t-l.born,o=e.dist-(i+6+s*n);u+=Math.exp(-(o*o)/500)*l.power*Math.max(0,1-s/.7)}}return u}(e,t,s,i.speech)*i.speech),i.err>.01&&(f+=function(e,t,r){if(e.letter<0)return 0;let n=r%9.2,a=.12*e.seed;return Math.max(0,(0,l.smoothstep)(0,1,(n-.65*e.letter-a)/.8)-(0,l.smoothstep)(0,1,(n-5.6-.5*e.letter-a)/.7))*(.86+.14*Math.sin(3.5*t+6*e.seed))}(e,t,r)*i.err),i.word>.01&&(f+=function(e,t,r,n){if(e.word<0)return 0;let a=.45*e.seed,i=(0,l.smoothstep)(0,1,(r-.11*e.word-a)/.3),s=r-n-.08*e.word-a,o=(0,l.smoothstep)(0,1,s/.35),u=.2*(1-(0,l.smoothstep)(0,1,(s-.35)/.9));return Math.max(i-o,i>.5?u*o:0)*((i>0&&i<1||o>0&&u>0)&&.35>(0,l.hash)(Math.floor(14*t)+97*e.seed,31*e.grain)?.25:1)*(.86+.14*Math.sin(3.5*t+6*e.seed))}(e,t,n,a)*i.word),f}(t,c,s,R,x?.hold??3.4,j,y);!(C&&t.letter>=0||P&&t.word>=0)&&((r*=(.66+.72*t.grain)*(.8+.4*(0,l.hash)(Math.floor(.05*t.dx+.5*c),Math.floor(.05*t.dy-.3*c))))>.3&&(0,l.hash)(31.7*Math.floor(1.6*c),613*t.seed)>.992&&(r=Math.max(r,.9)),r<t.gap+.05*Math.sin(.28*c+6.283*t.seed)&&(r=0));let n=(r=r<0?0:r>1?1:r)*(l.RAMP.length-1)|0;if(0===n)continue;let a=i*V+7*t.seed|0;if("emojiOnly"===m||"emoji"===m&&t.emoji&&n>=l.EMOJI_MIN_LEVEL){let r=((t.seed*l.EMOJI_POOL.length|0)+a)%l.EMOJI_POOL.length;d.glyph[e]=l.EMOJI_POOL[r],d.emoji[n][d.emojiN[n]++]=e}else{let r=l.RAMP[n],i=((t.seed*r.length|0)+a)%r.length;d.glyph[e]=r[i],d.ascii[n][d.asciiN[n]++]=e}}f.clearRect(0,0,g,g);let D=E.current,K=l.RAMP.length-1,F=_.current;for(let e=0;e<3;e++)F.cur[e]+=(F.target[e]-F.cur[e])*.05;f.fillStyle=`rgb(${0|F.cur[0]},${0|F.cur[1]},${0|F.cur[2]})`;for(let e=1;e<=K;e++){let t=d.asciiN[e];if(0===t)continue;f.globalAlpha=l.ALPHA_TOP*(e/K);let r=d.ascii[e];for(let e=0;e<t;e++){let t=D[r[e]];f.fillText(d.glyph[r[e]],t.x,t.y)}}for(let e=1;e<=K;e++){let t=d.emojiN[e];if(0===t)continue;f.globalAlpha=.35+e/K*.65;let r=d.emoji[e];for(let e=0;e<t;e++){let t=D[r[e]];f.fillText(d.glyph[r[e]],t.x,t.y)}}f.globalAlpha=1,e=requestAnimationFrame(o)};return e=requestAnimationFrame(o),()=>cancelAnimationFrame(e)},[]),(0,t.jsx)("canvas",{ref:x,className:e,"aria-hidden":!0,style:{display:"block",pointerEvents:"none"}})}var d=e.i(922521),m=e.i(647163);let g={ending:"ending",idle:"idle",connecting:"connecting",listening:"idle",speaking:"speaking",working:"working",delegating:"working"},p=[247,247,247],y=[10,10,10];function M({status:e,failed:r,word:n,size:a,getSpectrum:l,look:i,className:s}){let o="dark"===(0,d.useResolvedTheme)();return(0,t.jsx)(f,{mode:r?"error":g[e],word:n,size:a,color:o?p:y,getSpectrum:l,charset:i.charset,fontSize:i.fontSize,density:i.density,className:s})}let O=(0,r.memo)(function({look:e,status:n="idle",size:a=448,className:l,...i}){let s=(0,r.useRef)(null),[o,u]=(0,r.useState)(a),[c,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=s.current;if(!e)return;let t=new ResizeObserver(([e])=>{let t=Math.round(e.contentRect.width);t>0&&u(t)});return t.observe(e),()=>t.disconnect()},[]),(0,r.useEffect)(()=>{let e=requestAnimationFrame(()=>h(!0));return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)("div",{ref:s,className:(0,m.cn)("aspect-square transition-opacity duration-700 ease-out",c?"opacity-100":"opacity-0",l),children:(0,t.jsx)(M,{...i,look:e,status:n,size:o})})});e.s(["Face",0,O],333495)},67045,e=>{"use strict";let t,r;var n=e.i(768834);let a=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>a(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>a(t)(e)}}};var l=e.i(149666),i=e.i(265402),s=e.i(671228);let o=s.ThursdaySettingsSchema.extend({wake:s.WakeSchema.catch(s.WAKE_DEFAULT),hotkey:s.HotkeySchema.catch(s.HOTKEY_DEFAULT),callBack:s.CallBackSchema.catch(s.CALL_BACK_DEFAULT),captionView:s.CaptionViewSchema.catch("sides"),textModel:i.textModelRefSchema.nullable().catch(null)}),u={...l.LIVE_DEFAULTS,wake:s.WAKE_DEFAULT,hotkey:s.HOTKEY_DEFAULT,callBack:s.CALL_BACK_DEFAULT,captionView:"sides",textModel:null},c=(0,n.create)()((t=e=>({...u,patch:t=>e(t)}),r={name:"thursday.settings",version:1,migrate:(e,t)=>t<1&&e&&"object"==typeof e?{...e,webSearch:!0}:e,merge:(e,t)=>{let r=o.safeParse((0,l.migrateLiveSettings)(e)),n=r.success?r.data:u;return{...t,...n}}},(e,n,l)=>{let i,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...r},o=!1,u=0,c=new Set,h=new Set,f=s.storage;if(!f)return t((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),e(...t)});let d=()=>{let e=s.partialize({...n()});return f.setItem(s.name,{state:e,version:s.version})},m=l.setState;l.setState=(e,t)=>(m(e,t),d());let g=t((...t)=>(e(...t),d()));l.getInitialState=()=>g;let p=()=>{var t,r;if(!f)return;let l=++u;o=!1,c.forEach(e=>{var t;return e(null!=(t=n())?t:g)});let m=(null==(r=s.onRehydrateStorage)?void 0:r.call(s,null!=(t=n())?t:g))||void 0;return a(f.getItem.bind(f))(s.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];else{if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(t=>{var r;if(l!==u)return;let[a,o]=t;if(e(i=s.merge(o,null!=(r=n())?r:g),!0),a)return d()}).then(()=>{l===u&&(null==m||m(n(),void 0),i=n(),o=!0,h.forEach(e=>e(i)))}).catch(e=>{l===u&&(null==m||m(void 0,e))})};return l.persist={setOptions:e=>{s={...s,...e},e.storage&&(f=e.storage)},clearStorage:()=>{++u,null==f||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(h.add(e),()=>{h.delete(e)})},s.skipHydration||p(),i||g}));e.s(["thursdaySettings",0,()=>{let e="u"<typeof navigator?null:navigator.language??null;return s.ThursdaySettingsSchema.parse({...c.getState(),locale:e})},"useThursdayStore",0,c],67045)},561540,e=>{"use strict";var t=e.i(213377);let r={[t.TOOL_NAMES.memory_recall]:"Checking your notes",[t.TOOL_NAMES.memory_remember]:"Noting that down",[t.TOOL_NAMES.memory_forget]:"Forgetting that",[t.TOOL_NAMES.memory_conversation]:"Reading back an earlier call",[t.TOOL_NAMES.bash]:"Doing it on this computer",[t.TOOL_NAMES.web_search]:"Searching the web",[t.TOOL_NAMES.load_skill]:"Reading how to do this",[t.TOOL_NAMES.look_at]:"Looking at the picture",[t.TOOL_NAMES.end_call]:"Ending the call",[t.TOOL_NAMES.routine]:"Checking your routines"};function n(e){if(!e)return null;try{let t=JSON.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t}catch{}return null}let a=new Set([t.TOOL_NAMES.thread_tell,t.TOOL_NAMES.thread_answer,t.TOOL_NAMES.thread_status,t.TOOL_NAMES.thread_show,t.TOOL_NAMES.thread_cancel,t.TOOL_NAMES.thread_seen]);function l(e,r){if(e!==t.TOOL_NAMES.web_search)return null;try{let e=JSON.parse(r),t=Array.isArray(e.sources)?e.sources.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.url?[e]:[]):[];return{query:"string"==typeof e.query?e.query:null,sources:t}}catch{return null}}e.s(["searchOf",0,l,"searchQueryOf",0,function(e){let t=n(e)?.query;return"string"==typeof t&&t.trim()?t.trim():null},"searchSourcesOf",0,function(e){let r=n(e);return r?l(t.TOOL_NAMES.web_search,JSON.stringify(r))?.sources??[]:[]},"startedLabel",0,function(e,r){if(e!==t.TOOL_NAMES.thread_start)return null;try{let e=JSON.parse(r);return"string"==typeof e.label?e.label:null}catch{return null}},"toolBot",0,function(e,r,l){let i=n(r);if(!i)return null;if(e===t.TOOL_NAMES.thread_start)return"string"==typeof i.bot&&i.bot.trim()?i.bot.trim():null;if(!a.has(e)||!l)return null;let s="string"==typeof i.thread?i.thread.trim():"";if(!s||"all"===s.toLowerCase())return null;let o=s.toLowerCase(),u=l.find(e=>e.id===s)??l.find(e=>e.label.toLowerCase()===o);return u?e===t.TOOL_NAMES.thread_answer?u.room.questions[0]?.bot??u.bot:u.bot:null},"toolLine",0,function(e,a,l=null){let i;if(e===t.TOOL_NAMES.tool_search||e===t.TOOL_NAMES.tool_call)return"Reaching a connected service";let s=n(a);return(s&&function(e,r,n){if(e===t.TOOL_NAMES.memory_remember){let e="string"==typeof r.path?r.path.trim():"",t=function(e){if(!Array.isArray(e.facts))return null;let t=e.facts.map(e=>e&&"object"==typeof e&&"string"==typeof e.text?e.text.trim():"").filter(Boolean);return t.length?{text:t[0],more:t.length-1}:null}(r);if(!e)return null;if(!t)return`Noting that under ${e}`;let n=t.more>0?` (+${t.more})`:"";return`Noting under ${e}: ${function(e){let t=e.trim().replace(/\s+/g," ");if(t.length<=28)return t;let r=t.slice(0,28),n=r.lastIndexOf(" ");return`${(n>14?r.slice(0,n):r).trimEnd()}…`}(t.text)}${n}`}if(e===t.TOOL_NAMES.thread_start){let e="string"==typeof r.bot?r.bot.trim():"";return e?`Handing this to ${e}`:"Handing this over"}if(e===t.TOOL_NAMES.web_search){let e="string"==typeof r.query?r.query.trim():"";return e?`Searching \xb7 ${e}`:null}if(e===t.TOOL_NAMES.routine){if("create"===r.action){let e=["string"==typeof r.bot?r.bot.trim():"",function(e){if("string"==typeof e.at&&e.at.length>=16){let[t,r]=e.at.split(" "),[n,a,l]=t.split("-").map(Number),i=new Date(n,a-1,l);if(i.toDateString()===new Date().toDateString())return`once at ${r}`;let s=i.toLocaleDateString("en-US",{month:"short",day:"numeric"});return`once, ${s} ${r}`}return"string"==typeof e.time&&e.time?`daily at ${e.time}`:"number"==typeof e.everyHours?`every ${e.everyHours} hours`:null}(r)].filter(Boolean).join(", ");return e?`Setting a routine \xb7 ${e}`:"Setting a routine"}return"change"===r.action?"Changing a routine":"delete"===r.action?"Deleting a routine":null}let a="string"==typeof r.thread?r.thread.trim():"";return e===t.TOOL_NAMES.thread_tell?n?`Telling ${n}`:"Passing that on":e===t.TOOL_NAMES.thread_answer?n?`Answering ${n}`:"Answering that":e===t.TOOL_NAMES.thread_cancel?a?`Stopping ${a}`:"Stopping that":e===t.TOOL_NAMES.thread_seen?a?`Marking ${a} as read`:"Marking that as read":e===t.TOOL_NAMES.thread_show?a?`Opening ${a}`:"Opening that":e===t.TOOL_NAMES.thread_status?a&&"all"!==a.toLowerCase()?`Checking on ${a}`:"Checking on the work":null}(e,s,l))??r[e]??((i=e.indexOf("__"))<=0?null:`Reaching ${e.slice(0,i).replace(/[-_]/g," ")}`)}])},319841,e=>{"use strict";var t=e.i(271645);let r=["ctrl","alt","meta"],n=/^(Control|Alt|Shift|Meta|OS)/,a=/^(input|textarea|select)$/i,l=e=>!!e&&!!(a.test(e.tagName)||e.isContentEditable||e.closest?.("[data-hotkey-capture]"));function i(e){let{code:t,ctrlKey:r,altKey:a,shiftKey:l,metaKey:i}=e;if(!t||n.test(t)||!r&&!a&&!i)return null;let s=[];return r&&s.push("ctrl"),a&&s.push("alt"),l&&s.push("shift"),i&&s.push("meta"),[...s,t].join("+")}let s={ctrl:["Ctrl","⌃"],alt:["Alt","⌥"],shift:["Shift","⇧"],meta:["Meta","⌘"]};e.s(["HOTKEY_CAPTURE",0,{"data-hotkey-capture":""},"capturesKeys",0,l,"comboOf",0,i,"isCombo",0,e=>{let t=e.split("+"),a=t.at(-1);return!!(a&&!n.test(a)&&t.slice(0,-1).some(e=>r.includes(e)))},"useHotkey",0,function({enabled:e,combo:r,onPress:n}){let a=(0,t.useRef)(n);a.current=n,(0,t.useEffect)(()=>{if(!e||!r)return;let t=e=>{e.repeat||l(e.target)||i(e)===r&&(e.preventDefault(),a.current())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,r])},"useHotkeyLabel",0,function(e){let[r,n]=(0,t.useState)(!1);return(0,t.useEffect)(()=>n(/mac/i.test(navigator.userAgent)),[]),e?function(e,t=!1){let r=e.split("+"),n=r.at(-1)??"",a=r.slice(0,-1).map(e=>s[e]?.[+!!t]??e),l=n.replace(/^(Key|Digit|Numpad)/,"").replace(/([a-z])([A-Z])/g,"$1 $2")||n;return t?[...a,l].join(""):[...a,l].join(" + ")}(e,r):null}])}]);