@jiggai/kitchen 0.5.10 → 0.5.12

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 (234) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +2 -2
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +3 -3
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  15. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/cron/add/route.js +1 -1
  22. package/.next/server/app/api/cron/add/route.js.nft.json +1 -1
  23. package/.next/server/app/api/cron/bulk/route.js +1 -1
  24. package/.next/server/app/api/cron/bulk/route.js.nft.json +1 -1
  25. package/.next/server/app/api/cron/delete/route.js +1 -1
  26. package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
  27. package/.next/server/app/api/cron/edit/route.js +1 -1
  28. package/.next/server/app/api/cron/edit/route.js.nft.json +1 -1
  29. package/.next/server/app/api/cron/job/route.js +1 -1
  30. package/.next/server/app/api/cron/job/route.js.nft.json +1 -1
  31. package/.next/server/app/api/cron/jobs/route.js +1 -1
  32. package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
  33. package/.next/server/app/api/cron/recipe-installed/route.js +1 -1
  34. package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
  35. package/.next/server/app/api/cron/worker/route.js +1 -1
  36. package/.next/server/app/api/cron/worker/route.js.nft.json +1 -1
  37. package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
  38. package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  39. package/.next/server/app/api/goals/route.js.nft.json +1 -1
  40. package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.nft.json +1 -1
  41. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.nft.json +1 -1
  42. package/.next/server/app/api/plugins/route.js.nft.json +1 -1
  43. package/.next/server/app/api/plugins/test/route.js.nft.json +1 -1
  44. package/.next/server/app/api/recipes/[id]/route.js +1 -1
  45. package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/recipes/delete/route.js +1 -1
  47. package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
  48. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
  49. package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
  50. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
  51. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
  52. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
  53. package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
  54. package/.next/server/app/api/teams/plugins/route.js.nft.json +1 -1
  55. package/.next/server/app/api/teams/remove-team/route.js +1 -1
  56. package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
  57. package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
  58. package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
  59. package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
  60. package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/channels.html +2 -2
  62. package/.next/server/app/channels.rsc +3 -3
  63. package/.next/server/app/channels.segments/_full.segment.rsc +3 -3
  64. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  65. package/.next/server/app/channels.segments/_index.segment.rsc +2 -2
  66. package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
  67. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +1 -1
  68. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  69. package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  71. package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
  72. package/.next/server/app/goals/new.html +2 -2
  73. package/.next/server/app/goals/new.rsc +3 -3
  74. package/.next/server/app/goals/new.segments/_full.segment.rsc +3 -3
  75. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  76. package/.next/server/app/goals/new.segments/_index.segment.rsc +2 -2
  77. package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
  78. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +1 -1
  79. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  80. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  81. package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/goals.html +1 -1
  83. package/.next/server/app/goals.rsc +3 -3
  84. package/.next/server/app/goals.segments/_full.segment.rsc +3 -3
  85. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  86. package/.next/server/app/goals.segments/_index.segment.rsc +2 -2
  87. package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
  88. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +1 -1
  89. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  90. package/.next/server/app/page.js +3 -3
  91. package/.next/server/app/page.js.nft.json +1 -1
  92. package/.next/server/app/page_client-reference-manifest.js +1 -1
  93. package/.next/server/app/recipes/[id]/page.js +1 -1
  94. package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
  95. package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
  96. package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
  97. package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  98. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  99. package/.next/server/app/settings.html +1 -1
  100. package/.next/server/app/settings.rsc +3 -3
  101. package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
  102. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  103. package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  104. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  105. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  106. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  107. package/.next/server/app/teams/[teamId]/deliverables/page.js +2 -2
  108. package/.next/server/app/teams/[teamId]/deliverables/page.js.nft.json +1 -1
  109. package/.next/server/app/teams/[teamId]/deliverables/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
  111. package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +2 -2
  113. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
  114. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
  115. package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
  116. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
  117. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  118. package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
  119. package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
  120. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +1 -1
  121. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
  122. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  123. package/.next/server/app/teams/[teamId]/workflows/page.js +3 -3
  124. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
  125. package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
  126. package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
  127. package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  128. package/.next/server/app/tickets/page.js.nft.json +1 -1
  129. package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
  130. package/.next/server/chunks/[root-of-the-server]__1331482c._.js +3 -0
  131. package/.next/server/chunks/[root-of-the-server]__1331482c._.js.map +1 -0
  132. package/.next/server/chunks/[root-of-the-server]__24d25a8c._.js +3 -0
  133. package/.next/server/chunks/[root-of-the-server]__24d25a8c._.js.map +1 -0
  134. package/.next/server/chunks/[root-of-the-server]__3d9c4025._.js +3 -0
  135. package/.next/server/chunks/[root-of-the-server]__3d9c4025._.js.map +1 -0
  136. package/.next/server/chunks/[root-of-the-server]__83753ef0._.js +3 -0
  137. package/.next/server/chunks/[root-of-the-server]__83753ef0._.js.map +1 -0
  138. package/.next/server/chunks/[root-of-the-server]__8799df50._.js +3 -0
  139. package/.next/server/chunks/[root-of-the-server]__8799df50._.js.map +1 -0
  140. package/.next/server/chunks/[root-of-the-server]__a90f7cdc._.js +3 -0
  141. package/.next/server/chunks/[root-of-the-server]__a90f7cdc._.js.map +1 -0
  142. package/.next/server/chunks/[root-of-the-server]__afde9f7c._.js +3 -0
  143. package/.next/server/chunks/[root-of-the-server]__afde9f7c._.js.map +1 -0
  144. package/.next/server/chunks/[root-of-the-server]__e3431817._.js +3 -0
  145. package/.next/server/chunks/[root-of-the-server]__e3431817._.js.map +1 -0
  146. package/.next/server/chunks/[root-of-the-server]__e6ecca08._.js +3 -0
  147. package/.next/server/chunks/[root-of-the-server]__e6ecca08._.js.map +1 -0
  148. package/.next/server/chunks/{[root-of-the-server]__d0634ad4._.js → [root-of-the-server]__fc511c8f._.js} +2 -2
  149. package/.next/server/chunks/[root-of-the-server]__fc511c8f._.js.map +1 -0
  150. package/.next/server/chunks/[root-of-the-server]__fcde644b._.js +3 -0
  151. package/.next/server/chunks/[root-of-the-server]__fcde644b._.js.map +1 -0
  152. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cb6ddb24.js +2 -2
  153. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cb6ddb24.js.map +1 -1
  154. package/.next/server/chunks/ssr/{[root-of-the-server]__becf14db._.js → [root-of-the-server]__0a8db855._.js} +2 -2
  155. package/.next/server/chunks/ssr/[root-of-the-server]__0a8db855._.js.map +1 -0
  156. package/.next/server/chunks/ssr/{[root-of-the-server]__4d24c088._.js → [root-of-the-server]__18154c9e._.js} +2 -2
  157. package/.next/server/chunks/ssr/[root-of-the-server]__18154c9e._.js.map +1 -0
  158. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +1 -1
  159. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -1
  160. package/.next/server/chunks/ssr/[root-of-the-server]__52cb8e0e._.js +3 -0
  161. package/.next/server/chunks/ssr/[root-of-the-server]__52cb8e0e._.js.map +1 -0
  162. package/.next/server/chunks/ssr/[root-of-the-server]__7af8e528._.js +9 -0
  163. package/.next/server/chunks/ssr/[root-of-the-server]__7af8e528._.js.map +1 -0
  164. package/.next/server/chunks/ssr/[root-of-the-server]__7c14561e._.js +3 -0
  165. package/.next/server/chunks/ssr/[root-of-the-server]__7c14561e._.js.map +1 -0
  166. package/.next/server/chunks/ssr/[root-of-the-server]__c97fe9e9._.js +3 -0
  167. package/.next/server/chunks/ssr/[root-of-the-server]__c97fe9e9._.js.map +1 -0
  168. package/.next/server/chunks/ssr/[root-of-the-server]__e9faef37._.js +3 -0
  169. package/.next/server/chunks/ssr/[root-of-the-server]__e9faef37._.js.map +1 -0
  170. package/.next/server/chunks/ssr/_018dfe6b._.js +1 -1
  171. package/.next/server/chunks/ssr/_018dfe6b._.js.map +1 -1
  172. package/.next/server/chunks/ssr/_15bc566e._.js +9 -0
  173. package/.next/server/chunks/ssr/_15bc566e._.js.map +1 -0
  174. package/.next/server/chunks/ssr/{_835573ec._.js → _3d6d3f59._.js} +8 -2
  175. package/.next/server/chunks/ssr/_3d6d3f59._.js.map +1 -0
  176. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -7
  177. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
  178. package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js +1 -1
  179. package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js.map +1 -1
  180. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js +1 -1
  181. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js.map +1 -1
  182. package/.next/server/pages/404.html +1 -1
  183. package/.next/server/pages/500.html +2 -2
  184. package/.next/server/server-reference-manifest.js +1 -1
  185. package/.next/server/server-reference-manifest.json +1 -1
  186. package/.next/static/chunks/2a86fa0c3d9177c5.js +7 -0
  187. package/.next/static/chunks/4a57b795d958b061.js +1 -0
  188. package/.next/static/chunks/67a9a9a3c6dd4aa4.js +7 -0
  189. package/.next/static/chunks/a683f58aaf4f41e9.css +3 -0
  190. package/.next/static/chunks/{212477db59154fa7.js → b641409c1c9d8c3e.js} +3 -3
  191. package/.next/static/chunks/{fac5526bd312cf6e.js → b8722104d0ceb74d.js} +9 -3
  192. package/openclaw.plugin.json +1 -1
  193. package/package.json +1 -1
  194. package/.next/server/chunks/[root-of-the-server]__2705b289._.js +0 -3
  195. package/.next/server/chunks/[root-of-the-server]__2705b289._.js.map +0 -1
  196. package/.next/server/chunks/[root-of-the-server]__28a2e162._.js +0 -3
  197. package/.next/server/chunks/[root-of-the-server]__28a2e162._.js.map +0 -1
  198. package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js +0 -3
  199. package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js.map +0 -1
  200. package/.next/server/chunks/[root-of-the-server]__55defc7c._.js +0 -3
  201. package/.next/server/chunks/[root-of-the-server]__55defc7c._.js.map +0 -1
  202. package/.next/server/chunks/[root-of-the-server]__69c065ce._.js +0 -3
  203. package/.next/server/chunks/[root-of-the-server]__69c065ce._.js.map +0 -1
  204. package/.next/server/chunks/[root-of-the-server]__6b759340._.js +0 -3
  205. package/.next/server/chunks/[root-of-the-server]__6b759340._.js.map +0 -1
  206. package/.next/server/chunks/[root-of-the-server]__70a062f7._.js +0 -3
  207. package/.next/server/chunks/[root-of-the-server]__70a062f7._.js.map +0 -1
  208. package/.next/server/chunks/[root-of-the-server]__783b6b5b._.js +0 -3
  209. package/.next/server/chunks/[root-of-the-server]__783b6b5b._.js.map +0 -1
  210. package/.next/server/chunks/[root-of-the-server]__9f73c31b._.js +0 -3
  211. package/.next/server/chunks/[root-of-the-server]__9f73c31b._.js.map +0 -1
  212. package/.next/server/chunks/[root-of-the-server]__d0634ad4._.js.map +0 -1
  213. package/.next/server/chunks/[root-of-the-server]__f3e3dd8e._.js +0 -3
  214. package/.next/server/chunks/[root-of-the-server]__f3e3dd8e._.js.map +0 -1
  215. package/.next/server/chunks/ssr/[root-of-the-server]__3f55f975._.js +0 -3
  216. package/.next/server/chunks/ssr/[root-of-the-server]__3f55f975._.js.map +0 -1
  217. package/.next/server/chunks/ssr/[root-of-the-server]__4d24c088._.js.map +0 -1
  218. package/.next/server/chunks/ssr/[root-of-the-server]__6390ce9c._.js +0 -3
  219. package/.next/server/chunks/ssr/[root-of-the-server]__6390ce9c._.js.map +0 -1
  220. package/.next/server/chunks/ssr/[root-of-the-server]__a2e3966f._.js +0 -3
  221. package/.next/server/chunks/ssr/[root-of-the-server]__a2e3966f._.js.map +0 -1
  222. package/.next/server/chunks/ssr/[root-of-the-server]__becf14db._.js.map +0 -1
  223. package/.next/server/chunks/ssr/[root-of-the-server]__cb91405c._.js +0 -3
  224. package/.next/server/chunks/ssr/[root-of-the-server]__cb91405c._.js.map +0 -1
  225. package/.next/server/chunks/ssr/[root-of-the-server]__f59c3144._.js +0 -3
  226. package/.next/server/chunks/ssr/[root-of-the-server]__f59c3144._.js.map +0 -1
  227. package/.next/server/chunks/ssr/_835573ec._.js.map +0 -1
  228. package/.next/static/chunks/24ac17715eb2614d.js +0 -1
  229. package/.next/static/chunks/8b99ae14a606b607.css +0 -3
  230. package/.next/static/chunks/d593ea5e91e81b45.js +0 -1
  231. package/.next/static/chunks/ff661b5e599f8d74.js +0 -7
  232. /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 → p8YaBY0FwA86zQelkOQ-m}/_buildManifest.js +0 -0
  233. /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 → p8YaBY0FwA86zQelkOQ-m}/_clientMiddlewareManifest.json +0 -0
  234. /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 → p8YaBY0FwA86zQelkOQ-m}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87090,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(22016),o=e.i(18566),i=e.i(44355);function l(e){let t=new Set;for(let r of e)t.add(r);return t.size}let n={"media-image":{type:"tool",tool:"media.generate",label:"Generate Image",description:"Generate images using AI providers (DALL-E, Skills, etc.)",icon:"🎨",color:"#9333EA",category:"media",defaultConfig:{mediaType:"image",provider:"auto",prompt:"",size:"1024x1024",quality:"standard",style:"natural",outputPath:"shared-context/media/{{run.id}}_{{node.id}}.png"}},"media-video":{type:"tool",tool:"media.generate",label:"Generate Video",description:"Generate videos using AI providers",icon:"🎬",color:"#DC2626",category:"media",defaultConfig:{mediaType:"video",provider:"auto",prompt:"",duration:"5s",outputPath:"shared-context/media/{{run.id}}_{{node.id}}.mp4"}}},s=["{{run.id}}","{{workflow.name}}","{{workflow.id}}","{{date}}"],d={"social-media":"Professional social media image for: {{content}}","blog-header":"Blog header image representing: {{title}}","product-shot":"Product photography style image of: {{product}}",illustration:"Clean vector illustration of: {{concept}}",marketing:"Marketing banner image for: {{campaign}}"};function c({config:e,onChange:a,teamId:o,workflow:i,workflowNodeIds:l,workflowEdges:n,currentNodeId:c}){let[x,p]=(0,r.useState)([]),[m,u]=(0,r.useState)(!0),[h,g]=(0,r.useState)([]);(0,r.useEffect)(()=>{!async function(){try{let e=await fetch(`/api/teams/${o}/media-providers`);if(e.ok){let t=await e.json();p(t)}}catch(e){console.error("Failed to load media providers:",e)}finally{u(!1)}}()},[o]),(0,r.useEffect)(()=>{let t;g((t=[],e.prompt?.trim()||t.push("Prompt is required"),"image"===e.mediaType&&e.size&&!["256x256","512x512","1024x1024","1792x1024","1024x1792"].includes(e.size)&&t.push("Invalid image size"),"video"===e.mediaType&&e.duration&&!e.duration.match(/^\d+s?$/)&&t.push('Invalid video duration format (e.g., "5s")'),t))},[e]);let v=t=>{a({...e,...t})},f=x.filter(e=>e.available),b=x.find(t=>t.id===e.provider),y=(0,r.useRef)(null),[k,w]=(0,r.useState)(!1),j=(0,r.useRef)(null),N=(0,r.useMemo)(()=>[{variable:"{{run.id}}",type:"text"},{variable:"{{workflow.name}}",type:"text"},{variable:"{{workflow.id}}",type:"text"},{variable:"{{node.id}}",type:"text"},{variable:"{{date}}",type:"text"}],[]),S=(0,r.useMemo)(()=>{if(!l||!n||!c)return[];if(i&&i.nodes){let e=new Set,t=[c],r=new Set;for(;t.length>0;){let a=t.shift();if(!r.has(a))for(let o of(r.add(a),i.edges??[]))o.to!==a||o.from===c||e.has(o.from)||(e.add(o.from),t.push(o.from))}let a=[];for(let t of e){if("start"===t||"end"===t)continue;let e=i.nodes.find(e=>e.id===t);if(!e)continue;let r=String(e.name??e.id);a.push({nodeId:t,nodeName:r,fieldName:"output",fieldType:"text"}),a.push({nodeId:t,nodeName:r,fieldName:"text",fieldType:"text"});let o=e.config,l=o?.outputFields;if(Array.isArray(l))for(let e of l){let o=String(e.name??"").trim();o&&"output"!==o&&"text"!==o&&a.push({nodeId:t,nodeName:r,fieldName:o,fieldType:String(e.type??"text")})}}return a}return(function(e,t,r){let a=new Set,o=[r];for(;o.length>0;){let e=o.shift();for(let r of t)r.to!==e||a.has(r.from)||(a.add(r.from),o.push(r.from))}return[...e.filter(e=>a.has(e)&&"start"!==e&&"end"!==e).map(e=>`{{${e}.output}}`),...s]})(l,n,c).filter(e=>e.includes(".output")&&e.startsWith("{{")).map(e=>{let t=e.slice(2,-2),r=t.indexOf("."),a=t.substring(0,r);return{nodeId:a,nodeName:a,fieldName:"output",fieldType:"text"}})},[i,l,n,c]),C=(0,r.useMemo)(()=>{let e={};for(let t of S){let r=t.nodeId+"|"+t.nodeName;e[r]||(e[r]={nodeId:t.nodeId,nodeName:t.nodeName,fields:[]}),e[r].fields.push({name:t.fieldName,type:t.fieldType})}return Object.values(e)},[S]);(0,r.useEffect)(()=>{function e(e){j.current&&!j.current.contains(e.target)&&w(!1)}if(k)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[k]);let I=t=>{let r=y.current;if(!r){v({prompt:e.prompt+(e.prompt?" ":"")+t}),w(!1);return}let a=r.selectionStart,o=r.selectionEnd,i=r.value;v({prompt:i.substring(0,a)+t+i.substring(o)}),setTimeout(()=>{r.focus();let e=a+t.length;r.setSelectionRange(e,e)},0),w(!1)};return(0,t.jsxs)("div",{className:"space-y-3",children:[m&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("div",{className:"animate-spin w-3 h-3 border border-[color:var(--ck-border-subtle)] border-t-transparent rounded-full"}),"Detecting providers..."]}),!m&&0===f.length&&x.length>0&&(0,t.jsx)("div",{className:"mt-2 rounded-lg border border-amber-400/30 bg-amber-500/10 p-2 text-xs text-amber-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"font-medium",children:"⚠️ Media providers detected but not available"}),(0,t.jsx)("div",{children:(0,t.jsx)("strong",{children:"Common Issues:"})}),x.some(e=>e.error?.includes("API key"))&&(0,t.jsx)("div",{children:"• Missing API keys - Check provider selection below for specific requirements"}),x.some(e=>e.error?.includes("not running"))&&(0,t.jsx)("div",{children:"• Local services not running - Start Stable Diffusion, ComfyUI, etc."}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("a",{href:"https://docs.openclaw.ai/nodes/images",target:"_blank",rel:"noopener",className:"text-amber-100 underline hover:text-amber-50",children:"Setup troubleshooting →"})]})]})}),!m&&0===x.length&&(0,t.jsx)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-3",children:(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-secondary)] space-y-2",children:[(0,t.jsx)("p",{className:"font-medium text-[color:var(--ck-text-primary)]",children:"⚠️ No media generation providers detected"}),(0,t.jsxs)("div",{className:"space-y-1 text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Setup Options:"})}),(0,t.jsxs)("p",{children:["• ",(0,t.jsx)("a",{href:"https://docs.openclaw.ai/nodes/images",target:"_blank",rel:"noopener",className:"text-blue-400 hover:text-blue-300 hover:underline",children:"Configure image generation models →"})]}),(0,t.jsxs)("p",{children:["• ",(0,t.jsx)("a",{href:"https://clawhub.ai/skills?q=image",target:"_blank",rel:"noopener",className:"text-blue-400 hover:text-blue-300 hover:underline",children:"Install image generation skills →"})]}),(0,t.jsxs)("p",{children:["• ",(0,t.jsx)("a",{href:"https://docs.openclaw.ai/setup/providers#openai",target:"_blank",rel:"noopener",className:"text-blue-400 hover:text-blue-300 hover:underline",children:"Add OpenAI API key for DALL-E →"})]})]})]})}),!m&&x.length>0&&(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"provider"}),(0,t.jsxs)("select",{value:e.provider,onChange:e=>v({provider:e.target.value}),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"auto",children:"Auto-detect (recommended)"}),x.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.name,e.available?e.models&&e.models.length>0?` (${e.models.join(", ")})`:" ✓":" ⚠️"]},e.id))]}),b&&(0,t.jsxs)("div",{className:"mt-1 space-y-1",children:[(0,t.jsxs)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Supports: ",b.supportedTypes.join(", "),b.models&&b.models.length>0&&(0,t.jsxs)("span",{className:"ml-2",children:["• Models: ",b.models.join(", ")]})]}),b.error&&(0,t.jsxs)("div",{className:"mt-2 rounded-lg border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:"⚠️ Setup Required:"})," ",b.error]}),"openai"===b.id&&b.error.includes("OPENAI_API_KEY")&&(0,t.jsxs)("div",{className:"mt-1",children:["Add your OpenAI API key to environment variables or OpenClaw config."," ",(0,t.jsx)("a",{href:"https://docs.openclaw.ai/setup/providers#openai",target:"_blank",rel:"noopener",className:"text-red-200 underline hover:text-red-100",children:"Setup guide →"})]}),"skills"===b.id&&b.error.includes("API keys")&&(0,t.jsxs)("div",{className:"mt-1",children:["Skills require API keys (OPENAI_API_KEY, EVOLINK_API_KEY)."," ",(0,t.jsx)("a",{href:"https://clawhub.ai/skills?q=image",target:"_blank",rel:"noopener",className:"text-red-200 underline hover:text-red-100",children:"Browse skills →"})]}),b.id.startsWith("http-")&&(0,t.jsxs)("div",{className:"mt-1",children:["Start the local service or configure a different endpoint."," ",(0,t.jsx)("a",{href:"https://docs.openclaw.ai/nodes/images#local-endpoints",target:"_blank",rel:"noopener",className:"text-red-200 underline hover:text-red-100",children:"Local setup →"})]})]})]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"prompt"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("textarea",{ref:y,value:e.prompt,onChange:e=>v({prompt:e.target.value}),placeholder:"Describe the image or video you want to generate...",rows:3,className:"mt-1 w-full resize-none rounded-lg border border-white/10 bg-white/5 p-2 pr-12 text-xs text-[color:var(--ck-text-primary)]"}),(0,t.jsxs)("div",{className:"absolute top-1 right-1",ref:j,children:[(0,t.jsx)("button",{type:"button",onClick:()=>w(!k),className:"rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-[9px] text-[color:var(--ck-text-secondary)] hover:bg-white/10 hover:text-[color:var(--ck-text-primary)]",title:"Insert variable",children:"{{}}"}),k&&(0,t.jsx)("div",{className:"absolute right-0 top-8 z-50 w-72 max-h-80 overflow-auto rounded-lg border border-white/15 bg-black/80 backdrop-blur shadow-[var(--ck-shadow-1)]",children:(0,t.jsxs)("div",{className:"p-1",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-medium uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Globals"}),N.map(({variable:e,type:r})=>(0,t.jsxs)("button",{type:"button",onClick:()=>I(e),className:"w-full flex items-center justify-between gap-2 rounded-lg px-2 py-1 text-left text-xs text-[color:var(--ck-text-primary)] hover:bg-white/10 cursor-pointer",children:[(0,t.jsx)("span",{className:"font-mono",children:e}),(0,t.jsx)("span",{className:"text-[9px] px-1 py-0.5 rounded-sm bg-black/30 text-blue-400",children:r})]},e))]}),C.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-medium uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.nodeName}),e.fields.map(r=>{let a=`{{${e.nodeId}.${r.name}}}`,o="text"===r.type?"text-blue-400":"list"===r.type?"text-green-400":"json"===r.type?"text-amber-400":"text-gray-400";return(0,t.jsxs)("button",{type:"button",onClick:()=>I(a),className:"w-full flex items-center justify-between gap-2 rounded-lg px-2 py-1 text-left text-xs text-[color:var(--ck-text-primary)] hover:bg-white/10 cursor-pointer",children:[(0,t.jsx)("span",{className:"font-mono",children:a}),(0,t.jsx)("span",{className:`text-[9px] px-1 py-0.5 rounded-sm bg-black/30 ${o}`,children:r.type})]},`${e.nodeId}.${r.name}`)})]},e.nodeId)),0===C.length&&(0,t.jsx)("div",{className:"px-2 py-3 text-xs text-[color:var(--ck-text-secondary)]",children:"Tip: Add output fields to upstream nodes to see node-specific variables here."})]})})]})]}),(0,t.jsx)("div",{className:"mt-1 flex gap-1 flex-wrap",children:Object.entries(d).map(([e,r])=>(0,t.jsx)("button",{onClick:()=>v({prompt:r}),className:"rounded-lg bg-white/5 px-2 py-0.5 text-[9px] text-[color:var(--ck-text-tertiary)] hover:bg-black/30",type:"button",children:e},e))}),(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Use template variables for dynamic content. Quick templates available above."})]}),"image"===e.mediaType&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"size"}),(0,t.jsxs)("select",{value:e.size||"1024x1024",onChange:e=>v({size:e.target.value}),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"1024x1024",children:"Square (1024×1024)"}),(0,t.jsx)("option",{value:"1792x1024",children:"Landscape (1792×1024)"}),(0,t.jsx)("option",{value:"1024x1792",children:"Portrait (1024×1792)"}),(0,t.jsx)("option",{value:"512x512",children:"Small Square (512×512)"})]})]}),b?.id==="openai"&&(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"quality"}),(0,t.jsxs)("select",{value:e.quality||"standard",onChange:e=>v({quality:e.target.value}),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"standard",children:"Standard"}),(0,t.jsx)("option",{value:"hd",children:"HD (higher cost)"})]})]})]}),b?.id==="openai"&&"image"===e.mediaType&&(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"style"}),(0,t.jsxs)("select",{value:e.style||"natural",onChange:e=>v({style:e.target.value}),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"natural",children:"Natural"}),(0,t.jsx)("option",{value:"vivid",children:"Vivid"})]})]}),"video"===e.mediaType&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"aspect ratio"}),(0,t.jsxs)("select",{value:e.aspect_ratio||"16:9",onChange:e=>v({aspect_ratio:e.target.value}),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"16:9",children:"Landscape (16:9)"}),(0,t.jsx)("option",{value:"9:16",children:"Portrait (9:16)"}),(0,t.jsx)("option",{value:"1:1",children:"Square (1:1)"}),(0,t.jsx)("option",{value:"4:3",children:"Standard (4:3)"}),(0,t.jsx)("option",{value:"3:4",children:"Portrait (3:4)"}),(0,t.jsx)("option",{value:"21:9",children:"Ultrawide (21:9)"})]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"duration"}),(0,t.jsx)("input",{type:"text",value:e.duration||"5s",onChange:e=>v({duration:e.target.value}),placeholder:"e.g., 5s, 10s",className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]"}),b?.durationConstraints?(0,t.jsxs)("div",{className:"mt-1 flex items-center gap-1 text-[10px] text-amber-400/80",children:[(0,t.jsx)("span",{children:"ℹ️"}),(0,t.jsxs)("span",{children:[b.name,": ",b.durationConstraints.minSeconds,"–",b.durationConstraints.maxSeconds,"s (default ",b.durationConstraints.defaultSeconds,"s)"]})]}):(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:'Duration in seconds (e.g., "5s", "10s")'})]})]}),("video"===e.mediaType||"audio"===e.mediaType)&&(0,t.jsxs)("label",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("input",{type:"checkbox",checked:!0===e.addRefinement||"true"===e.addRefinement,onChange:e=>v({addRefinement:e.target.checked}),className:"h-3.5 w-3.5 rounded border-white/20 bg-white/5 text-blue-500 accent-blue-500"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Add LLM Refinement"}),(0,t.jsx)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)] opacity-60",children:"Run an extra LLM pass to refine the prompt before generation. Off by default."})]})]}),h.length>0&&(0,t.jsxs)("div",{className:"mt-2 rounded-lg border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Configuration Issues:"}),(0,t.jsx)("div",{className:"space-y-0.5",children:h.map((e,r)=>(0,t.jsxs)("div",{children:["• ",e]},r))})]})]})}var x=e.i(99252);function p({targetTextareaRef:e,workflow:a,currentNodeId:o,onInsert:i}){let[l,n]=(0,r.useState)(!1),s=(0,r.useRef)(null),d=(0,r.useMemo)(()=>(function(e,t){let r=[],a=new Set,o=[t],i=new Set;for(;o.length>0;){let r=o.shift();if(!i.has(r))for(let l of(i.add(r),e.edges??[]))l.to!==r||a.has(l.from)||l.from===t||(a.add(l.from),o.push(l.from))}for(let t of a){let a=e.nodes.find(e=>e.id===t);if(!a)continue;let o=a.name||t,i=a.config&&"object"==typeof a.config&&!Array.isArray(a.config)?a.config:{};r.push({nodeId:t,nodeName:o,fieldName:"output",fieldType:"text"},{nodeId:t,nodeName:o,fieldName:"text",fieldType:"text"});let l=i.outputFields;if(Array.isArray(l))for(let e of l)e.name?.trim()&&r.push({nodeId:t,nodeName:o,fieldName:e.name.trim(),fieldType:e.type||"text"})}return r})(a,o),[a,o]),c=(0,r.useMemo)(()=>[{variable:"{{run.id}}",type:"text"},{variable:"{{workflow.name}}",type:"text"},{variable:"{{workflow.id}}",type:"text"},{variable:"{{node.id}}",type:"text"},{variable:"{{date}}",type:"text"}],[]);(0,r.useEffect)(()=>{function e(e){s.current&&!s.current.contains(e.target)&&n(!1)}if(l)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l]);let x=t=>{let r=e.current;if(r){let e=r.selectionStart,a=r.selectionEnd,o=r.value,l=o.substring(0,e)+t+o.substring(a);i&&(i(l),setTimeout(()=>{r.focus();let a=e+t.length;r.setSelectionRange(a,a)},0))}n(!1)},p=d.reduce((e,t)=>{let r=`${t.nodeId}|${t.nodeName}`;return e[r]||(e[r]={nodeId:t.nodeId,nodeName:t.nodeName,fields:[]}),e[r].fields.push({name:t.fieldName,type:t.fieldType}),e},{});return(0,t.jsxs)("div",{className:"absolute top-1 right-1",ref:s,children:[(0,t.jsx)("button",{type:"button",onClick:()=>n(!l),className:"rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-[9px] text-[color:var(--ck-text-secondary)] hover:bg-white/10 hover:text-[color:var(--ck-text-primary)]",title:"Insert variable",children:"{{}}"}),l&&(0,t.jsx)("div",{className:"absolute right-0 top-8 z-50 w-72 max-h-80 overflow-auto rounded-lg border border-white/15 bg-black/80 backdrop-blur shadow-[var(--ck-shadow-1)]",children:(0,t.jsxs)("div",{className:"p-1",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-medium uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Globals"}),c.map(({variable:e,type:r})=>(0,t.jsxs)("button",{type:"button",onClick:()=>x(e),className:"w-full flex items-center justify-between gap-2 rounded-lg px-2 py-1 text-left text-xs text-[color:var(--ck-text-primary)] hover:bg-white/10 cursor-pointer",children:[(0,t.jsx)("span",{className:"font-mono",children:e}),(0,t.jsx)("span",{className:"text-[9px] px-1 py-0.5 rounded-sm bg-black/30 text-blue-400",children:r})]},e))]}),Object.values(p).map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-[10px] font-medium uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.nodeName}),e.fields.map(r=>{let a=`{{${e.nodeId}.${r.name}}}`,o="text"===r.type?"text-blue-400":"list"===r.type?"text-green-400":"json"===r.type?"text-amber-400":"text-gray-400";return(0,t.jsxs)("button",{type:"button",onClick:()=>x(a),className:"w-full flex items-center justify-between gap-2 rounded-lg px-2 py-1 text-left text-xs text-[color:var(--ck-text-primary)] hover:bg-white/10 cursor-pointer",children:[(0,t.jsx)("span",{className:"font-mono",children:a}),(0,t.jsx)("span",{className:`text-[9px] px-1 py-0.5 rounded-sm bg-black/30 ${o}`,children:r.type})]},`${e.nodeId}.${r.name}`)})]},e.nodeId)),0===d.length&&(0,t.jsx)("div",{className:"px-2 py-3 text-xs text-[color:var(--ck-text-secondary)]",children:"Tip: Add output fields to upstream nodes to see node-specific variables here."})]})})]})}function m({value:e,onChangeValue:a,workflow:o,currentNodeId:i,className:l,placeholder:n,spellCheck:s}){let d=(0,r.useRef)(null);return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("textarea",{ref:d,value:e,onChange:e=>a(e.target.value),className:l,placeholder:n,spellCheck:s}),(0,t.jsx)(p,{targetTextareaRef:d,workflow:o,currentNodeId:i,onInsert:e=>a(e)})]})}function u({outputFields:e,onChange:r}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"output fields (optional)"}),(0,t.jsx)("div",{className:"text-[9px] text-[color:var(--ck-text-secondary)] mb-2",children:"Define what this node produces for downstream nodes"}),(0,t.jsxs)("div",{className:"space-y-1",children:[e.map((a,o)=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{value:a.name,onChange:t=>{let i=[...e];i[o]={...a,name:t.target.value},r(i)},className:"flex-1 rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Field name"}),(0,t.jsxs)("select",{value:a.type,onChange:t=>{let i=t.target.value,l=[...e];l[o]={...a,type:i},r(l)},className:"rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"text",children:"text"}),(0,t.jsx)("option",{value:"list",children:"list"}),(0,t.jsx)("option",{value:"json",children:"json"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{r(e.filter((e,t)=>t!==o))},className:"text-xs text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:"×"})]},o)),(0,t.jsx)("button",{type:"button",onClick:()=>{r([...e,{name:"",type:"text"}])},className:"text-xs text-[color:var(--ck-text-secondary)] hover:text-[color:var(--ck-text-primary)]",children:"+ Add field"})]})]})}function h(e,t){return`ck-wf-draft:${e}:${t}`}function g({teamId:e,workflowId:s,draft:d,llmTaskEnabled:p}){let g,v,f,b,y,k,w,j,N,S,C,I,T,A,$,M,L,O,E,R,W,P,_,z,F,B,U,D,J,q=(0,o.useRouter)(),[V,K]=(0,r.useState)("canvas"),[H,Y]=(0,r.useState)(!1),[Z,G]=(0,r.useState)({kind:"loading"}),[X,Q]=(0,r.useState)(""),[ee,et]=(0,r.useState)("idle"),[er,ea]=(0,r.useState)(""),eo=(0,r.useRef)(null),[ei,el]=(0,r.useState)(!1),[en,es]=(0,r.useState)(1),ed=(0,r.useRef)(null),[ec,ex]=(0,r.useState)(""),[ep,em]=(0,r.useState)(null),[eu,eh]=(0,r.useState)({kind:"select"}),[eg,ev]=(0,r.useState)(""),[ef,eb]=(0,r.useState)([]),[ey,ek]=(0,r.useState)(""),[ew,ej]=(0,r.useState)([]),[eN,eS]=(0,r.useState)(""),[eC,eI]=(0,r.useState)([]),[eT,eA]=(0,r.useState)(""),[e$,eM]=(0,r.useState)([]),[eL,eO]=(0,r.useState)({}),[eE,eR]=(0,r.useState)(!1),[eW,eP]=(0,r.useState)({}),[e_,ez]=(0,r.useState)({}),eF=e=>{let t=String(e||"").match(/^social-post-to-(.+)-v\d+$/i);return t?t[1].toLowerCase():null},eB=e=>String(e||"").toLowerCase().replace(/-standalone$/,"").replace(/-page$/,""),eU=(e,t)=>`${e}::${eB(t)}`,[eD,eJ]=(0,r.useState)({}),eq=(0,r.useMemo)(()=>/Tool not available:\s*gateway/i.test(String(eN||"")),[eN]),[eV,eK]=(0,r.useState)([]),[eH,eY]=(0,r.useState)(!1),[eZ,eG]=(0,r.useState)(!1),[eX,eQ]=(0,r.useState)(""),[e0,e1]=(0,r.useState)(""),[e2,e5]=(0,r.useState)(!1),[e3,e4]=(0,r.useState)(""),[e6,e9]=(0,r.useState)({}),[e8,e7]=(0,r.useState)(!1),[te,tt]=(0,r.useState)(!1),[tr,ta]=(0,r.useState)(""),[to,ti]=(0,r.useState)(!1),[tl,tn]=(0,r.useState)(!1),[ts,td]=(0,r.useState)(!1),[tc,tx]=(0,r.useState)(""),[tp,tm]=(0,r.useState)(""),[tu,th]=(0,r.useState)(""),[tg,tv]=(0,r.useState)("llm"),[tf,tb]=(0,r.useState)(""),[ty,tk]=(0,r.useState)(""),[tw,tj]=(0,r.useState)("");function tN(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function tS(e){if(!tN(e))return null;let t=tN(e.match)?e.match:null;if(!t)return null;let r=String(t.channel??"").trim();if(!r)return null;let a=String(e.agentId??"").trim(),o=String(t.accountId??"").trim(),i=tN(t.peer)?t.peer:null,l=i?String(i.kind??"").trim():"",n=i?String(i.id??"").trim():"",s=n||o;if(!s)return null;let d=a||(o?`${r}:account:${o}`:`${r}:${l}:${n}`),c=[r];return a&&c.push(a),o&&c.push(`account:${o}`),l&&n&&c.push(`${l}:${n}`),{id:d,label:c.join(" · "),channel:r,target:s}}(0,r.useEffect)(()=>{(async()=>{try{if(d){let t=sessionStorage.getItem(h(e,s));if(t)return void G({kind:"ready",jsonText:t});let r=JSON.stringify({schema:"clawkitchen.workflow.v1",id:s,name:"New workflow",timezone:"UTC",nodes:[{id:"start",type:"start",name:"start",x:80,y:80,config:{}},{id:"end",type:"end",name:"end",x:520,y:80,config:{}}],edges:[{id:"e1",from:"start",to:"end"}]},null,2)+"\n";G({kind:"ready",jsonText:r});try{sessionStorage.setItem(h(e,s),r)}catch{}return}let t=await fetch(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(s)}`,{cache:"no-store"}),r=await t.json();if(!t.ok||!r.ok)throw Error(r.error||"Failed to load workflow");G({kind:"ready",jsonText:JSON.stringify(r.workflow,null,2)+"\n"})}catch(e){G({kind:"error",error:e instanceof Error?e.message:String(e)})}})()},[e,s,d]),(0,r.useEffect)(()=>{(async()=>{ek("");try{let t=await fetch("/api/agents",{cache:"no-store"}),r=await t.json();if(!t.ok)throw Error(r.error||r.message||"Failed to load agents");let a=(Array.isArray(r.agents)?r.agents:[]).map(e=>({id:String(e.id??"").trim(),identityName:"string"==typeof e.identityName?e.identityName:void 0})).filter(t=>t.id&&t.id.startsWith(`${e}-`));eb(a)}catch(e){ek(e instanceof Error?e.message:String(e)),eb([])}})()},[e]),(0,r.useEffect)(()=>{(async()=>{eS("");try{let e=await fetch("/api/channels/bindings",{cache:"no-store"}),t=await e.json();if(!e.ok||!1===t.ok)throw Error(t.error||"Failed to load bindings");let r=(Array.isArray(t.bindings)?t.bindings:[]).map(tS).filter(Boolean);ej(r)}catch(e){eS(e instanceof Error?e.message:String(e)),ej([])}})()},[]),(0,r.useEffect)(()=>{(async()=>{eA("");try{let e=await fetch("/api/settings/model-options",{cache:"no-store"}),t=await e.json();if(!e.ok||!1===t.ok)throw Error(t.error||"Failed to load model options");let r=Array.isArray(t.models)?Array.from(new Set(t.models.map(e=>String(e??"").trim()).filter(Boolean))):[];eI(r)}catch(e){eA(e instanceof Error?e.message:String(e)),eI([])}})()},[]);let tC=(0,r.useCallback)(async()=>{e4(""),e5(!0);try{let e=await fetch("/api/cron/jobs",{cache:"no-store"}),t=await e.json();if(!e.ok||!1===t.ok)throw Error(t.error||"Failed to load cron jobs");let r=Array.isArray(t.jobs)?t.jobs:[],a={};for(let e of r){if(!e||!e.enabled)continue;let t=String(e.name??""),r=String(e.payload?.message??"");if(!(t.startsWith("workflow-worker:")||r.includes("worker-tick")))continue;let o=t.match(/^workflow-worker:[^:]+:(.+)$/);if(o?.[1]){a[o[1]]=!0;continue}let i=r.match(/--agent-id\s+(\S+)/);if(i?.[1]){a[i[1]]=!0;continue}let l=String(e.agentId??"").trim();l&&"main"!==l&&(a[l]=!0)}return e9(a),a}catch(e){return e4(e instanceof Error?e.message:String(e)),e9({}),{}}finally{e5(!1)}},[]);(0,r.useEffect)(()=>{tC()},[tC]);let tI=(0,r.useMemo)(()=>{if("ready"!==Z.kind)return{wf:null,err:""};try{return{wf:JSON.parse(Z.jsonText),err:""}}catch(e){return{wf:null,err:e instanceof Error?e.message:String(e)}}},[Z]),tT=(0,r.useMemo)(()=>tI.wf?function(e){let t=[],r=[];"clawkitchen.workflow.v1"!==e.schema&&t.push(`schema must be clawkitchen.workflow.v1 (got ${String(e.schema)})`),String(e.id||"").trim()||t.push("id is required"),String(e.name||"").trim()||t.push("name is required");let a=Array.isArray(e.nodes)?e.nodes:[],o=Array.isArray(e.edges)?e.edges:[],i=Array.isArray(e.triggers)?e.triggers:[],n=a.map(e=>String(e?.id??"").trim()).filter(Boolean);n.length!==a.length&&t.push("all nodes must have a non-empty id"),l(n)!==n.length&&t.push("node ids must be unique");let s=o.map(e=>String(e?.id??"").trim()).filter(Boolean);s.length!==o.length&&t.push("all edges must have a non-empty id"),l(s)!==s.length&&t.push("edge ids must be unique");let d=new Set(n);for(let e of o){let r=String(e?.from??"").trim(),a=String(e?.to??"").trim();if(!r||!a){t.push(`edge ${String(e?.id??"(missing id)")} must have from/to`);continue}d.has(r)||t.push(`edge ${String(e.id)} references missing from node: ${r}`),d.has(a)||t.push(`edge ${String(e.id)} references missing to node: ${a}`)}let c=a.filter(e=>"start"===e.type),x=a.filter(e=>"end"===e.type);for(let e of(c.length||r.push("no start node found"),c.length>1&&r.push("multiple start nodes found (MVP supports this, but execution semantics may be ambiguous)"),x.length||r.push("no end node found"),i))if("cron"===e.kind){(String(e.id||"").trim()||t.push("cron trigger missing id"),String(e.expr||"").trim())?5!==String(e.expr||"").trim().split(/\s+/).filter(Boolean).length&&r.push(`cron trigger ${String(e.id)} expr is not 5-field: ${String(e.expr)}`):t.push(`cron trigger ${String(e.id||"(missing id)")} missing expr`);let a=e.tz?String(e.tz).trim():"";a&&"UTC"!==a&&!a.includes("/")&&r.push(`cron trigger ${String(e.id)} tz doesn't look like an IANA timezone: ${String(e.tz)}`)}let p=e.meta&&"object"==typeof e.meta&&!Array.isArray(e.meta)?e.meta:{},m=String(p.approvalTarget??"").trim();for(let e of a){if("human_approval"!==e.type)continue;let t=e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{},a=String(t.target??t.chatId??"").trim(),o=String(t.provider??t.channel??"").trim();a||m||r.push(`human_approval node ${String(e.id)} has no target (set node.config.target or workflow.meta.approvalTarget)`),!a||o||String(p.approvalProvider??"").trim()||r.push(`human_approval node ${String(e.id)} has a target but no provider (set node.config.provider or workflow.meta.approvalProvider)`)}return{errors:t,warnings:r}}(tI.wf):{errors:[],warnings:[]},[tI.wf]),tA=(0,r.useMemo)(()=>{let e=tI.wf;if(!e)return{missingAgentOnNodeIds:[],requiredAgentIds:[],agentIdsMissingCron:[],ok:!0};let t=(e.nodes??[]).filter(e=>"start"!==e.type&&"end"!==e.type&&"human_approval"!==e.type),r=t.filter(e=>!String((e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{}).agentId??"").trim()).map(e=>e.id),a=Array.from(new Set(t.map(e=>String((e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{}).agentId??"").trim()).filter(Boolean))),o=a.filter(e=>!e6[e]),i=!0===(e.meta&&"object"==typeof e.meta&&!Array.isArray(e.meta)?e.meta:{}).skipCronCheck,l=0===o.length||to||i,n=0===r.length&&l;return{missingAgentOnNodeIds:r,requiredAgentIds:a,agentIdsMissingCron:o,skipCronPermanent:i,ok:n}},[tI.wf,e6,to]);function t$(t){let r=JSON.stringify(t,null,2)+"\n";if(G({kind:"ready",jsonText:r}),d)try{sessionStorage.setItem(h(e,s),r)}catch{}}async function tM(){if("ready"===Z.kind&&tI.wf&&!tI.err&&!tT.errors.length){Y(!0),Q(""),et("idle"),ea("");try{let t=await fetch("/api/teams/workflows",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflow:tI.wf})}),r=await t.json();if(!t.ok||!r.ok)throw Error(r.error||"Failed to save workflow");try{sessionStorage.removeItem(h(e,s))}catch{}if(tI.wf.triggers?.length)try{et("syncing");let t=await fetch("/api/teams/workflow-triggers",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"sync",teamId:e,workflowId:tI.wf.id,triggers:tI.wf.triggers??[]})}),r=await t.json();t.ok&&r.ok?(et("success"),setTimeout(()=>et("idle"),3e3)):(et("error"),ea(r.error||"Failed to sync triggers"))}catch(e){et("error"),ea(e instanceof Error?e.message:"Failed to sync triggers")}}catch(e){Q(e instanceof Error?e.message:String(e))}finally{Y(!1)}}}if("loading"===Z.kind)return(0,t.jsx)("div",{className:"w-full",children:"Loading…"});if("error"===Z.kind)return(0,t.jsx)("div",{className:"w-full",children:Z.error});let tL=!1===p?(0,t.jsxs)("div",{className:"mx-3 mb-3 rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-sm",children:[(0,t.jsx)("div",{className:"font-medium text-amber-200",children:"LLM support is not enabled"}),(0,t.jsxs)("div",{className:"mt-1 text-[color:var(--ck-text-secondary)]",children:["Workflow LLM nodes require the optional built-in ",(0,t.jsx)("code",{className:"px-1",children:"llm-task"})," plugin."]}),(0,t.jsxs)("div",{className:"mt-2 text-[color:var(--ck-text-secondary)]",children:["Enable it with: ",(0,t.jsx)("code",{className:"px-1",children:"openclaw plugins enable llm-task"})," then run"," ",(0,t.jsx)("code",{className:"px-1",children:"openclaw gateway restart"}),"."]})]}):null;return(0,t.jsxs)("div",{className:"flex h-full min-h-0 w-full flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 px-3 py-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("a",{href:`/teams/${encodeURIComponent(e)}?tab=workflows`,className:"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Back"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"truncate text-base font-medium text-[color:var(--ck-text-primary)]",children:[s,".workflow.json"]}),(0,t.jsxs)("div",{className:"mt-0.5 text-sm text-[color:var(--ck-text-tertiary)]",children:["Team: ",e]})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex overflow-hidden rounded-lg border border-white/10",children:[(0,t.jsx)("button",{type:"button",onClick:()=>K("canvas"),className:"canvas"===V?"bg-white/10 px-3 py-2 text-xs font-medium text-[color:var(--ck-text-primary)]":"bg-transparent px-3 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:"Canvas"}),(0,t.jsx)("button",{type:"button",onClick:()=>K("json"),className:"json"===V?"bg-white/10 px-3 py-2 text-xs font-medium text-[color:var(--ck-text-primary)]":"bg-transparent px-3 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:"JSON"})]}),(0,t.jsx)("input",{ref:eo,type:"file",accept:"application/json,.json",className:"hidden",onChange:async t=>{let r=t.target.files?.[0];if(t.target.value="",r){Q("");try{let t=await r.text(),a=JSON.parse(t);if(G({kind:"ready",jsonText:JSON.stringify(a,null,2)+"\n"}),d)try{sessionStorage.setItem(h(e,s),JSON.stringify(a,null,2)+"\n")}catch{}}catch(e){Q(e instanceof Error?e.message:String(e))}}}}),(0,t.jsx)("button",{type:"button",disabled:H,onClick:()=>eo.current?.click(),className:"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10 disabled:opacity-50",children:"Import"}),(0,t.jsx)("button",{type:"button",disabled:!tI.wf||!!tI.err||tT.errors.length>0,onClick:function(){if(!tI.wf||tI.err||tT.errors.length)return;let e=`${tI.wf.id||s}.workflow.json`,t=new Blob([JSON.stringify(tI.wf,null,2)+"\n"],{type:"application/json"}),r=URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.download=e,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(r)},className:"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10 disabled:opacity-50",children:"Export"}),(0,t.jsx)("button",{type:"button",disabled:H||!tI.wf||!!tI.err||tT.errors.length>0,onClick:tM,className:"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:H?"Saving…":"Save"})]})]}),tL,tI.err?(0,t.jsxs)("div",{className:"mt-3 rounded-lg border border-yellow-400/30 bg-yellow-500/10 p-3 text-sm text-yellow-100",children:["JSON parse error: ",tI.err]}):null,!tI.err&&tT.errors.length?(0,t.jsxs)("div",{className:"mt-3 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:[(0,t.jsx)("div",{className:"font-medium",children:"Workflow validation errors"}),(0,t.jsx)("ul",{className:"mt-2 list-disc space-y-1 pl-5",children:tT.errors.map(e=>(0,t.jsx)("li",{children:e},e))})]}):null,tI.err||tT.errors.length||!tT.warnings.length?null:(0,t.jsxs)("div",{className:"mt-3 rounded-lg border border-yellow-400/30 bg-yellow-500/10 p-3 text-sm text-yellow-100",children:[(0,t.jsx)("div",{className:"font-medium",children:"Workflow validation warnings"}),(0,t.jsx)("ul",{className:"mt-2 list-disc space-y-1 pl-5",children:tT.warnings.map(e=>(0,t.jsx)("li",{children:e},e))})]}),X?(0,t.jsx)("div",{className:"mt-3 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:X}):null,(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 gap-0",children:["json"===V?(0,t.jsx)("textarea",{value:Z.jsonText,onChange:t=>{let r=t.target.value;if(G({kind:"ready",jsonText:r}),d)try{sessionStorage.setItem(h(e,s),r)}catch{}},className:"h-full min-h-0 w-full flex-1 resize-none rounded-lg border border-white/10 bg-white/5 p-3 font-mono text-xs text-[color:var(--ck-text-primary)]"}):(0,t.jsx)("div",{ref:ed,className:"relative h-full min-h-0 w-full flex-1 overflow-auto bg-white/5",onWheel:e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=e.deltaY>0?-1:1;es(e=>Math.max(.5,Math.min(2.5,Math.round((e+.1*t)*10)/10)))},onClick:e=>{if("add-node"!==eu.kind)return;let t=tI.wf;if(!t)return;let r=ed.current;if(!r)return;let a=e.target;if(a&&a.closest("[data-wf-node='1']"))return;let o=r.getBoundingClientRect(),i=(e.clientX-o.left+r.scrollLeft)/en,l=(e.clientY-o.top+r.scrollTop)/en,s=eu.nodeType.replace(/[^a-z0-9_\-]/gi,"_"),d=new Set(t.nodes.map(e=>e.id)),c=1,x=`${s}_${c}`;for(;d.has(x);)c++,x=`${s}_${c}`;let p=Math.max(0,i-90),m=Math.max(0,l-24),u=eu.nodeType in n?{...n[eu.nodeType].defaultConfig}:{},h={id:x,type:eu.nodeType,name:x,x:p,y:m,config:u};t$({...t,nodes:[...t.nodes,h]}),ex(x),eh({kind:"select"})},children:(0,t.jsxs)("div",{className:"relative",style:{width:2200*en,height:1200*en},children:[(0,t.jsxs)("div",{className:ei?"absolute left-3 top-3 z-20 w-[44px] overflow-hidden rounded-lg border border-white/10 bg-black/40 p-2 backdrop-blur":"absolute left-3 top-3 z-20 w-[260px] rounded-lg border border-white/10 bg-black/40 p-2 backdrop-blur",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:ei?"hidden":"text-[10px] font-medium uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Tools"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:ei?"hidden":"flex items-center gap-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>es(e=>Math.max(.5,Math.round((e-.1)*10)/10)),className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Zoom out (Ctrl/Cmd+wheel)",children:"-"}),(0,t.jsxs)("div",{className:"min-w-[42px] text-center text-[10px] text-[color:var(--ck-text-tertiary)]",children:[Math.round(100*en),"%"]}),(0,t.jsx)("button",{type:"button",onClick:()=>es(e=>Math.min(2.5,Math.round((e+.1)*10)/10)),className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Zoom in (Ctrl/Cmd+wheel)",children:"+"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>el(e=>!e),className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:ei?"Expand":"Collapse",children:ei?">":"<"})]})]}),ei?(0,t.jsx)("div",{className:"mt-2 flex flex-col items-center gap-2",children:[{key:"select",label:"Select",active:"select"===eu.kind,onClick:()=>{eh({kind:"select"}),ev("")},icon:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M5 4l7 16 2-7 7-2L5 4Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})})},{key:"connect",label:"Connect",active:"connect"===eu.kind,onClick:()=>{eh(e=>"connect"===e.kind?{kind:"select"}:{kind:"connect"}),ev("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M10 13a5 5 0 0 1 0-7l1.2-1.2a5 5 0 0 1 7 7L17 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M14 11a5 5 0 0 1 0 7L12.8 19.2a5 5 0 1 1-7-7L7 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})},{key:"llm",label:"LLM",active:"add-node"===eu.kind&&"llm"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"llm"}),ev("")},icon:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M12 2l1.5 6.5L20 10l-6.5 1.5L12 18l-1.5-6.5L4 10l6.5-1.5L12 2Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})})},{key:"tool",label:"Tool",active:"add-node"===eu.kind&&"tool"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"tool"}),ev("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M14.5 7.5l2 2-8.5 8.5H6v-2l8.5-8.5Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M12 6a4 4 0 0 0-5 5l3-3 2 2 3-3A4 4 0 0 0 12 6Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})]})},{key:"condition",label:"If",active:"add-node"===eu.kind&&"condition"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"condition"}),ev("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M7 4v7a3 3 0 0 0 3 3h7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M17 10l3 3-3 3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})},{key:"delay",label:"Delay",active:"add-node"===eu.kind&&"delay"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"delay"}),ev("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12 7v5l3 2",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M21 12a9 9 0 1 1-9-9",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})},{key:"approval",label:"Approval",active:"add-node"===eu.kind&&"human_approval"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"human_approval"}),ev("")},icon:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M20 6 9 17l-5-5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})},{key:"end",label:"End",active:"add-node"===eu.kind&&"end"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"end"}),ev("")},icon:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M7 7h10v10H7V7Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})})},{key:"media-image",label:"Image",active:"add-node"===eu.kind&&"media-image"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"media-image"}),ev("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M14.5 4h-5L7 6.5 4.5 9v6L7 17.5 9.5 20h5L17 17.5 19.5 15V9L17 6.5 14.5 4Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M9 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"m4.5 15 3.5-3.5L11 14l3.5-3.5 4 4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})},{key:"media-video",label:"Video",active:"add-node"===eu.kind&&"media-video"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"media-video"}),ev("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M14 2v6h6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M10 12l4.5 2.5-4.5 2.5v-5z",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})},{key:"handoff",label:"Handoff",active:"add-node"===eu.kind&&"handoff"===eu.nodeType,onClick:()=>{eh({kind:"add-node",nodeType:"handoff"}),ev("")},icon:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M5 12h14",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M13 6l6 6-6 6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M3 6v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}].map(e=>(0,t.jsx)("button",{type:"button",onClick:e.onClick,className:e.active?"flex h-8 w-8 items-center justify-center rounded-lg bg-white/10 text-[color:var(--ck-text-primary)]":"flex h-8 w-8 items-center justify-center rounded-lg border border-white/10 bg-white/5 text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:e.label,"aria-label":e.label,children:e.icon},e.key))}):(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{eh({kind:"select"}),ev("")},className:"select"===eu.kind?"rounded-lg bg-white/10 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]":"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",children:"Select"}),(0,t.jsx)("button",{type:"button",onClick:()=>{eh({kind:"connect"}),ev("")},className:"connect"===eu.kind?"rounded-lg bg-white/10 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]":"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Click a node, then click another node to create an edge",children:"Connect"}),[{t:"llm",label:"LLM"},{t:"tool",label:"Tool"},{t:"condition",label:"If"},{t:"delay",label:"Delay"},{t:"human_approval",label:"Approve"},{t:"media-image",label:"🎨 Image"},{t:"media-video",label:"🎬 Video"},{t:"handoff",label:"↗ Handoff"},{t:"end",label:"End"}].map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{eh({kind:"add-node",nodeType:e.t}),ev("")},className:"add-node"===eu.kind&&eu.nodeType===e.t?"rounded-lg bg-white/10 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]":"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Select tool, then click on the canvas to place",children:["+ ",e.label]},e.t))]}),!ei&&"connect"===eu.kind&&eg?(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-secondary)]",children:["Connecting from: ",(0,t.jsx)("span",{className:"font-mono",children:eg})]}):null,ei||"add-node"!==eu.kind?null:(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-secondary)]",children:["Click on the canvas to place a ",(0,t.jsx)("span",{className:"font-mono",children:eu.nodeType})," node."]}),(0,t.jsxs)("div",{className:"mt-3 border-t border-white/10 pt-3",children:[(0,t.jsxs)("div",{className:ei?"hidden":"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-[10px] font-medium uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Agents"}),(0,t.jsx)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:"drag → node"})]}),ei?(0,t.jsx)("button",{type:"button",onClick:()=>el(!1),className:"mt-2 flex h-8 w-8 items-center justify-center rounded-lg border border-white/10 bg-white/5 text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:"Expand to see agents","aria-label":"Expand to see agents",children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M16 11a4 4 0 1 0-8 0",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M4 20a8 8 0 0 1 16 0",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}):(0,t.jsxs)(t.Fragment,{children:[ey?(0,t.jsx)("div",{className:"mt-1 text-[11px] text-red-200",children:ey}):null,(0,t.jsx)("div",{className:"mt-2 max-h-[140px] space-y-1 overflow-auto",children:ef.length?ef.map(r=>(0,t.jsx)("div",{draggable:!0,onDragStart:e=>{e.dataTransfer.setData("text/plain",r.id),e.dataTransfer.effectAllowed="copy"},className:"cursor-grab rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:r.id,children:r.identityName?r.identityName:r.id.replace(`${e}-`,"")},r.id)):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"No team agents found."})})]})]})]}),(0,t.jsxs)("div",{className:"relative h-[1200px] w-[2200px]",style:{transform:`scale(${en})`,transformOrigin:"0 0"},children:[(0,t.jsx)("svg",{className:"pointer-events-none absolute inset-0 -z-10",width:2200,height:1200,style:{overflow:"visible"},children:(tI.wf?.edges??[]).map(e=>{let r=tI.wf;if(!r)return null;let a=r.nodes.find(t=>t.id===e.from),o=r.nodes.find(t=>t.id===e.to);if(!a||!o)return null;let i=("number"==typeof a.x?a.x:80)+90,l=("number"==typeof a.y?a.y:80)+24,n=("number"==typeof o.x?o.x:80)+90,s=("number"==typeof o.y?o.y:80)+24;return(0,t.jsx)("line",{x1:i,y1:l,x2:n,y2:s,stroke:"rgba(255,255,255,0.35)",strokeWidth:3},e.id)})}),(tI.wf?.nodes??[]).map((r,a)=>{let o="number"==typeof r.x?r.x:80+220*a,i="number"==typeof r.y?r.y:80,l=ec===r.id;return(0,t.jsxs)("div",{role:"button",tabIndex:0,"data-wf-node":"1",draggable:"select"===eu.kind||"connect"===eu.kind,onDragStart:e=>{"select"===eu.kind&&e.dataTransfer.setData("text/plain","")},onDragOver:e=>{e.dataTransfer.types.includes("text/plain")&&e.preventDefault()},onDrop:e=>{let t=tI.wf;if(!t)return;e.preventDefault(),e.stopPropagation();let a=String(e.dataTransfer.getData("text/plain")||"").trim();if(!a)return;let o=t.nodes.map(e=>{if(e.id!==r.id)return e;let t=e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{};return{...e,config:{...t,agentId:a}}});t$({...t,nodes:o}),ex(r.id)},onClick:e=>{e.stopPropagation();let t=tI.wf;if("connect"===eu.kind){if(!t)return;if(!eg){ev(r.id),ex(r.id);return}let e=r.id;if(ev(""),!eg||!e||eg===e||(t.edges??[]).some(t=>t.from===eg&&t.to===e))return;let a=`e${Date.now()}`;t$({...t,edges:[...t.edges??[],{id:a,from:eg,to:e}]}),eh({kind:"select"});return}ex(r.id)},onPointerDown:e=>{if("add-node"===eu.kind||0!==e.button)return;let t=ed.current;if(!t)return;let a=t.getBoundingClientRect();ex(r.id);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault();let l=(e.clientX-a.left+t.scrollLeft)/en,n=(e.clientY-a.top+t.scrollTop)/en;em({nodeId:r.id,dx:l-o,dy:n-i})},onPointerUp:e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}em(null)},onPointerMove:e=>{if(!ep||ep.nodeId!==r.id)return;let t=tI.wf;if(!t)return;let a=ed.current;if(!a)return;let o=a.getBoundingClientRect(),i=(e.clientX-o.left+a.scrollLeft)/en,l=(e.clientY-o.top+a.scrollTop)/en,n=i-ep.dx,s=l-ep.dy,d=t.nodes.map(e=>e.id===r.id?{...e,x:n,y:s}:e);G({kind:"ready",jsonText:JSON.stringify({...t,nodes:d},null,2)+"\n"})},className:l?"absolute z-10 cursor-grab rounded-lg border border-white/25 bg-white/10 px-3 py-2 text-xs text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)]":"absolute z-10 cursor-grab rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-xs text-[color:var(--ck-text-secondary)] hover:bg-white/10",style:{left:o,top:i,width:180},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r.type in n&&(0,t.jsx)("span",{className:"text-lg",children:"media-image"===r.type?"🎨":"🎬"}),"handoff"===r.type&&(0,t.jsx)("span",{className:"text-lg",children:"↗"}),(0,t.jsx)("div",{className:"font-medium text-[color:var(--ck-text-primary)]",children:r.name||r.id})]}),(0,t.jsx)("div",{className:"mt-0.5 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:r.type}),(()=>{let a=r.config&&"object"==typeof r.config&&!Array.isArray(r.config)?r.config:null;if(r.type in n&&a){let e=String(a.prompt??"").trim(),r=String(a.provider??"auto");return(0,t.jsxs)("div",{className:"mt-1 space-y-0.5",children:[e&&(0,t.jsxs)("div",{className:"text-[10px] text-[color:var(--ck-text-secondary)] truncate",title:e,children:['"',e.length>40?e.substring(0,40)+"...":e,'"']}),(0,t.jsxs)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Provider: ",r]})]})}if("handoff"===r.type&&a){let e=String(a.targetTeamId??"").trim(),r=String(a.targetWorkflowId??"").trim(),o=String(a.mode??"fire-and-forget");return e?(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-secondary)]",children:["→ ",e,r?` / ${r}`:"","wait-for-completion"===o?(0,t.jsx)("span",{className:"ml-1 text-yellow-400",title:"Waits for target to complete",children:"⏳"}):null]}):null}let o=a?String(a.agentId??"").trim():"";if(!o)return null;let i=o.replace(`${e}-`,"");return(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-secondary)]",children:["Agent: ",i]})})()]},r.id)}),(()=>{let r,a,o,i,l,s,d,x,p,u,h,g,v,f,b=tI.wf;if(!b||!ec)return null;let y=b.nodes.find(e=>e.id===ec);if(!y)return null;let k="number"==typeof y.x?y.x:80,w="number"==typeof y.y?y.y:80,j=y.config&&"object"==typeof y.config&&!Array.isArray(y.config)?y.config:{},N=String(j.agentId??"").trim(),S=String(j.model??"").trim();return(0,t.jsxs)("div",{className:"absolute z-10 w-[320px] rounded-lg border border-white/15 bg-black/60 p-3 shadow-[var(--ck-shadow-1)] backdrop-blur",style:{left:k+200,top:w},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-primary)]",children:y.name||y.id}),(0,t.jsx)("button",{type:"button",onClick:()=>ex(""),className:"text-[10px] text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:"Close"})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"name"}),(0,t.jsx)("input",{value:String(y.name??""),onChange:e=>{let t=e.target.value;t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,name:t}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Optional"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"type"}),(0,t.jsxs)("select",{value:y.type,onChange:e=>{let t=e.target.value;t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,type:t}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"start",children:"start"}),(0,t.jsx)("option",{value:"end",children:"end"}),(0,t.jsx)("option",{value:"llm",children:"llm"}),(0,t.jsx)("option",{value:"tool",children:"tool"}),(0,t.jsx)("option",{value:"condition",children:"condition"}),(0,t.jsx)("option",{value:"delay",children:"delay"}),(0,t.jsx)("option",{value:"human_approval",children:"human_approval"}),(0,t.jsx)("option",{value:"media-image",children:"media-image"}),(0,t.jsx)("option",{value:"media-video",children:"media-video"}),(0,t.jsx)("option",{value:"handoff",children:"handoff"})]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"agentId"}),(0,t.jsx)("input",{value:N,onChange:e=>{let t=String(e.target.value||"").trim(),r={...j,...t?{agentId:t}:{}};t||delete r.agentId,t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:r}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"(drag an agent onto the node or type)"})]}),"llm"===y.type?(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"model"}),(0,t.jsxs)("select",{value:S,onChange:e=>{let t=String(e.target.value||"").trim(),r={...j,...t?{model:t}:{}};t||delete r.model,t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:r}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"Default (inherit global)"}),eC.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),eT?(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-amber-300",children:["Could not load model list: ",eT]}):null]}):null,"human_approval"===y.type?(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"approval config"}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"provider"}),(0,t.jsx)("input",{value:String(j.provider??""),onChange:e=>{let t=String(e.target.value||"").trim(),r={...j,...t?{provider:t}:{}};t||delete r.provider,t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:r}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"telegram"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target"}),(0,t.jsx)("input",{value:String(j.target??""),onChange:e=>{let t=String(e.target.value||"").trim(),r={...j,...t?{target:t}:{}};t||delete r.target,t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:r}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"(e.g. Telegram chat id)"}),(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Overrides workflow-level default when set."})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"messageTemplate (optional)"}),(0,t.jsx)(m,{value:String(j.messageTemplate??""),workflow:b,currentNodeId:y.id,onChangeValue:e=>{let t={...j,...e.trim()?{messageTemplate:e}:{}};e.trim()||delete t.messageTemplate,t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:t}:e)})},className:"mt-1 h-[70px] w-full resize-none rounded-lg border border-white/10 bg-white/5 p-2 pr-12 font-mono text-[10px] text-[color:var(--ck-text-primary)]",placeholder:"Approval needed for {{workflowName}} (run {{runId}})",spellCheck:!1}),(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Vars: ","{{workflowName}}",", ","{{workflowId}}",", ","{{runId}}",", ","{{nodeId}}"]})]})]})]}):null,y.type in n?(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Media Generation"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(c,{config:{mediaType:"image",provider:"auto",prompt:"",...y.config||{}},onChange:e=>{t$({...b,nodes:b.nodes.map(t=>t.id===y.id?{...t,config:e}:t)})},teamId:e,workflow:b,workflowNodeIds:b.nodes.map(e=>e.id),workflowEdges:(b.edges??[]).map(e=>({from:e.from,to:e.to})),currentNodeId:y.id})})]}):null,"llm"===y.type?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"prompt"}),(0,t.jsx)(m,{value:String(j.promptTemplate??""),workflow:b,currentNodeId:y.id,onChangeValue:e=>{let t={...j,promptTemplate:e};t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:t}:e)})},className:"mt-1 min-h-[200px] w-full resize-y rounded-lg border border-white/10 bg-black/30 p-2 pr-12 font-mono text-xs text-[color:var(--ck-text-primary)]",placeholder:"What should this node do? Use {{nodeId.output}} to reference upstream node outputs.",spellCheck:!1})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"output fields (optional)"}),(0,t.jsx)("div",{className:"text-[9px] text-[color:var(--ck-text-secondary)] mb-2",children:"Define the structure of what this node should produce"}),(r=j.outputFields||[],(0,t.jsxs)("div",{className:"space-y-1",children:[r.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{value:e.name,onChange:t=>{let o=[...r];o[a]={...e,name:t.target.value};let i={...j,outputFields:o};t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:i}:e)})},className:"flex-1 rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Field name"}),(0,t.jsxs)("select",{value:e.type,onChange:t=>{let o=t.target.value,i=[...r];i[a]={...e,type:o};let l={...j,outputFields:i};t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:l}:e)})},className:"rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"text",children:"text"}),(0,t.jsx)("option",{value:"list",children:"list"}),(0,t.jsx)("option",{value:"json",children:"json"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=r.filter((e,t)=>t!==a),t={...j};e.length>0?t.outputFields=e:delete t.outputFields,t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:t}:e)})},className:"text-xs text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:"×"})]},a)),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=[...r,{name:"",type:"text"}],t={...j,outputFields:e};t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:t}:e)})},className:"text-xs text-[color:var(--ck-text-secondary)] hover:text-[color:var(--ck-text-primary)]",children:"+ Add field"})]}))]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"timeout (seconds)"}),(0,t.jsx)("input",{type:"number",value:j.timeoutMs?String(Number(j.timeoutMs)/1e3):"",onChange:e=>{let t=e.target.value?Number(e.target.value):null,r={...j};t&&t>0?r.timeoutMs=1e3*t:delete r.timeoutMs,t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:r}:e)})},className:"mt-1 w-24 rounded-lg border border-white/10 bg-black/30 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"120",min:"1"})]})]}):null,"handoff"===y.type?(a=String(j.targetTeamId??""),o=String(j.targetWorkflowId??""),i=j.variableMapping||{},l=String(j.mode??"fire-and-forget"),s=String(i.kitchenTeamId??"").includes("{{")?e:String(i.kitchenTeamId??e),d=eF(o),p=(x=s&&d?eU(s,d):"")&&eW[x]||[],u=!!x&&!!e_[x],h=String(i.integrationIds??i.integrationId??"").split(",").map(e=>e.trim()).filter(Boolean),g=eL[a]||[],v=!!d,f=e=>{let t={...j,...e};t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:t}:e)})},0!==e$.length||eE||(async()=>{try{let e=await fetch("/api/teams/list"),t=await e.json();t.ok&&eM(t.teamIds)}catch{}})(),a&&!eL[a]&&(async()=>{try{let e=await fetch(`/api/teams/workflows?teamId=${encodeURIComponent(a)}`),t=await e.json();t.ok&&t.files&&eO(e=>({...e,[a]:t.files.map(e=>({id:e.replace(/\.workflow\.json$/,"")}))}))}catch{}})(),v&&s&&d&&!eW[x]&&!e_[x]&&(async()=>{ez(e=>({...e,[x]:!0}));try{let e=(()=>{try{return JSON.parse(localStorage.getItem(`ck-postiz-${s}`)||"{}").apiKey||""}catch{return""}})(),t=await fetch(`/api/plugins/marketing/integrations?team=${encodeURIComponent(s)}&teamId=${encodeURIComponent(s)}`,{headers:e?{"x-postiz-api-key":e}:{}}),r=await t.json(),a=eB(d),o=(r.integrations||[]).filter(e=>eB(String(e.identifier||""))===a&&!e.disabled&&e.id).map(e=>({integrationId:String(e.id),identifier:String(e.identifier||""),displayName:String(e.name||d),username:e.username?String(e.username):void 0}));eP(e=>({...e,[x]:o}))}catch{}ez(e=>({...e,[x]:!1}))})(),(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-2 space-y-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"handoff config"}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"mode"}),(0,t.jsxs)("select",{value:l,onChange:e=>f({mode:"fire-and-forget"===e.target.value?void 0:e.target.value}),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"fire-and-forget",children:"Fire & Forget"}),(0,t.jsx)("option",{value:"wait-for-completion",children:"Wait for Completion"})]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target team"}),(0,t.jsxs)("select",{value:a,onChange:e=>{f({targetTeamId:e.target.value||void 0,targetWorkflowId:void 0})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"— Select —"}),e$.map(r=>(0,t.jsxs)("option",{value:r,children:[r,r===e?" (current)":""]},r))]})]}),a?(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target workflow"}),(0,t.jsxs)("select",{value:o,onChange:e=>f({targetWorkflowId:e.target.value||void 0}),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"— Select —"}),g.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name||e.id},e.id))]})]}):null,v&&d&&p.length>0?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:[d," accounts"]}),(0,t.jsx)("div",{className:"mt-1 space-y-1",children:p.map(e=>{let r=h.includes(e.integrationId),a=e.identifier&&e.identifier!==d?` (${e.identifier})`:"";return(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer rounded-lg border border-white/10 bg-white/5 px-2 py-1 hover:bg-white/10",children:[(0,t.jsx)("input",{type:"checkbox",checked:r,onChange:()=>{let t=r?h.filter(t=>t!==e.integrationId):[...h,e.integrationId],a={...i};delete a.integrationId,t.length>0?a.integrationIds=t.join(","):delete a.integrationIds,f({variableMapping:a})},className:"accent-[var(--ck-accent-red)]"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-primary)]",children:[e.displayName,a]}),e.username?(0,t.jsx)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:e.username}):null]})]},e.integrationId)})})]}):null,v&&u?(0,t.jsx)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Loading accounts…"}):null]})):null,(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{let e=eD[y.id]??"llm"!==y.type;eJ({...eD,[y.id]:!e})},className:"mb-2 text-[10px] text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:[eD[y.id]??"llm"!==y.type?"Hide":"Show"," raw config"]}),eD[y.id]??"llm"!==y.type?(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"config (json)"}),(0,t.jsx)("textarea",{value:JSON.stringify(j,null,2),onChange:e=>{try{let t=JSON.parse(e.target.value);if(!t||"object"!=typeof t||Array.isArray(t))return;t$({...b,nodes:b.nodes.map(e=>e.id===y.id?{...e,config:t}:e)})}catch{}},className:"mt-1 h-[140px] w-full resize-none rounded-lg border border-white/10 bg-black/30 p-2 font-mono text-[10px] text-[color:var(--ck-text-primary)]",spellCheck:!1}),(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"(Edits apply when JSON is valid.)"})]}):null]})]})]})})()]})]})}),(0,t.jsx)("div",{className:"w-[380px] shrink-0 overflow-auto p-3 text-sm",children:(0,t.jsx)("div",{className:"space-y-3",children:tI.wf?(_=String((P=tI.wf).timezone??"").trim()||"UTC",z=P.triggers??[],B=String((F=P.meta&&"object"==typeof P.meta&&!Array.isArray(P.meta)?P.meta:{}).approvalBindingId??"").trim(),U=String(F.approvalProvider??"telegram").trim()||"telegram",D=String(F.approvalTarget??"").trim(),J=[{label:"(no preset)",expr:""},{label:"Weekdays 09:00 local",expr:"0 9 * * 1-5"},{label:"Mon/Wed/Fri 09:00 local",expr:"0 9 * * 1,3,5"},{label:"Daily 08:00 local",expr:"0 8 * * *"},{label:"Daily 12:00 local",expr:"0 12 * * *"},{label:"Mon 09:30 local",expr:"30 9 * * 1"}],(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("details",{open:!0,className:"rounded-lg border border-white/10 bg-white/5",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Workflow"}),(0,t.jsx)("div",{className:"px-3 pb-3",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[11px] font-medium text-[color:var(--ck-text-tertiary)]",children:"Timezone"}),(0,t.jsx)("input",{value:_,onChange:e=>{let t=String(e.target.value||"").trim()||"UTC";t$({...P,timezone:t})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-sm text-[color:var(--ck-text-primary)]",placeholder:"America/New_York"})]})})]}),(0,t.jsxs)("details",{open:!0,className:"rounded-lg border border-white/10 bg-white/5",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Approval Channel"}),(0,t.jsxs)("div",{className:"px-3 pb-3 space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"binding (recommended)"}),(0,t.jsxs)("select",{value:B,onChange:e=>{let t=String(e.target.value||"").trim(),r=ew.find(e=>e.id===t);r?t$({...P,meta:{...F,approvalBindingId:r.id,approvalProvider:r.channel,approvalTarget:r.target},nodes:P.nodes.map(e=>"human_approval"===e.type?{...e,config:{...e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{},approvalBindingId:r.id,provider:r.channel,target:r.target}}:e)}):t$({...P,meta:{...F,approvalBindingId:""},nodes:P.nodes.map(e=>"human_approval"===e.type?{...e,config:{...e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{},approvalBindingId:""}}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"(manual)"}),ew.map(e=>(0,t.jsx)("option",{value:e.id,children:e.label},e.id))]}),eq?(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-yellow-200",children:["Kitchen looks out of date. Run ",(0,t.jsx)("code",{className:"font-mono",children:"openclaw plugins update"})," then",(0,t.jsx)("code",{className:"ml-1 font-mono",children:"openclaw gateway restart"}),"."]}):null,eN?(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-red-200",children:["Failed to load bindings: ",eN]}):null,(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Uses your existing OpenClaw bindings (recommended). Manual provider/target is an advanced override."})]}),(0,t.jsxs)("details",{className:"rounded-lg border border-white/10 bg-black/10",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-secondary)]",children:"Advanced: manual override"}),(0,t.jsxs)("div",{className:"px-2 pb-2 pt-1 space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"provider"}),(0,t.jsx)("input",{value:U,onChange:e=>{let t=String(e.target.value||"").trim()||"telegram";t$({...P,meta:{...F,approvalBindingId:"",approvalProvider:t},nodes:P.nodes.map(e=>"human_approval"===e.type?{...e,config:{...e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{},approvalBindingId:"",provider:t}}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"telegram"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target"}),(0,t.jsx)("input",{value:D,onChange:e=>{let t=String(e.target.value||"").trim();t$({...P,meta:{...F,approvalBindingId:"",approvalTarget:t},nodes:P.nodes.map(e=>"human_approval"===e.type?{...e,config:{...e.config&&"object"==typeof e.config&&!Array.isArray(e.config)?e.config:{},approvalBindingId:"",target:t}}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"(e.g. Telegram chat id)"})]})]})]})]})]}),(0,t.jsxs)("details",{open:!0,className:"rounded-lg border border-white/10 bg-white/5",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Node inspector"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-between gap-2",children:ec?(0,t.jsx)("button",{type:"button",onClick:()=>{let e=P.nodes.filter(e=>e.id!==ec),t=(P.edges??[]).filter(e=>e.from!==ec&&e.to!==ec);t$({...P,nodes:e,edges:t}),ex("")},className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-medium text-red-100 hover:bg-white/10",children:"Delete node"}):null}),ec?(W=P.nodes.find(e=>e.id===ec))?(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"id"}),(0,t.jsx)("div",{className:"mt-1 rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:W.id})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"name"}),(0,t.jsx)("input",{value:String(W.name??""),onChange:e=>{let t=e.target.value;t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,name:t}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Optional"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"type"}),(0,t.jsxs)("select",{value:W.type,onChange:e=>{let t=e.target.value;t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,type:t}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"start",children:"start"}),(0,t.jsx)("option",{value:"end",children:"end"}),(0,t.jsx)("option",{value:"llm",children:"llm"}),(0,t.jsx)("option",{value:"tool",children:"tool"}),(0,t.jsx)("option",{value:"condition",children:"condition"}),(0,t.jsx)("option",{value:"delay",children:"delay"}),(0,t.jsx)("option",{value:"human_approval",children:"human_approval"}),(0,t.jsx)("option",{value:"media-image",children:"media-image"}),(0,t.jsx)("option",{value:"media-video",children:"media-video"}),(0,t.jsx)("option",{value:"handoff",children:"handoff"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"x"}),(0,t.jsx)("input",{type:"number",value:"number"==typeof W.x?W.x:0,onChange:e=>{let t=Number(e.target.value);t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,x:t}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"y"}),(0,t.jsx)("input",{type:"number",value:"number"==typeof W.y?W.y:0,onChange:e=>{let t=Number(e.target.value);t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,y:t}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]"})]})]}),"llm"===W.type?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"prompt"}),(0,t.jsx)(m,{value:String((W.config||{}).promptTemplate??""),workflow:P,currentNodeId:W.id,onChangeValue:e=>{let t={...W.config,promptTemplate:e};t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,config:t}:e)})},className:"mt-1 min-h-[150px] w-full resize-y rounded-lg border border-white/10 bg-white/5 p-2 pr-12 font-mono text-xs text-[color:var(--ck-text-primary)]",placeholder:"What should this node do? Use {{nodeId.output}} to reference upstream node outputs.",spellCheck:!1})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"model"}),(0,t.jsxs)("select",{value:String((W.config||{}).model??""),onChange:e=>{let t=String(e.target.value||"").trim(),r={...W.config,...t?{model:t}:{}};t||delete r.model,t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,config:r}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"Default (inherit global)"}),eC.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),eT?(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-amber-300",children:["Could not load model list: ",eT]}):null]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"timeout (seconds)"}),(0,t.jsx)("input",{type:"number",value:(W.config||{}).timeoutMs?String(Number((W.config||{}).timeoutMs)/1e3):"",onChange:e=>{let t=e.target.value?Number(e.target.value):null,r={...W.config};t&&t>0?r.timeoutMs=1e3*t:delete r.timeoutMs,t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,config:r}:e)})},className:"mt-1 w-24 rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"120",min:"1"})]})]}):null,W.type in n?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Media Generation"}),(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsx)(c,{config:{mediaType:"image",provider:"auto",prompt:"",...W.config||{}},onChange:e=>{t$({...P,nodes:P.nodes.map(t=>t.id===W.id?{...t,config:e}:t)})},teamId:e,workflow:P,workflowNodeIds:P.nodes.map(e=>e.id),workflowEdges:(P.edges??[]).map(e=>({from:e.from,to:e.to})),currentNodeId:W.id})})]}):null,"human_approval"===W.type?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"provider"}),(0,t.jsx)("input",{value:String((W.config||{}).provider??""),onChange:e=>{let t=String(e.target.value||"").trim(),r={...W.config,...t?{provider:t}:{}};t||delete r.provider,t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,config:r}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"telegram"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target"}),(0,t.jsx)("input",{value:String((W.config||{}).target??""),onChange:e=>{let t=String(e.target.value||"").trim(),r={...W.config,...t?{target:t}:{}};t||delete r.target,t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,config:r}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"(e.g. Telegram chat id)"}),(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Overrides workflow-level default when set."})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"messageTemplate (optional)"}),(0,t.jsx)(m,{value:String((W.config||{}).messageTemplate??""),workflow:P,currentNodeId:W.id,onChangeValue:e=>{let t={...W.config,...e.trim()?{messageTemplate:e}:{}};e.trim()||delete t.messageTemplate,t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,config:t}:e)})},className:"mt-1 h-[70px] w-full resize-none rounded-lg border border-white/10 bg-white/5 p-2 pr-12 font-mono text-[10px] text-[color:var(--ck-text-primary)]",placeholder:"Approval needed for {{workflowName}} (run {{runId}})",spellCheck:!1}),(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Vars: ","{{workflowName}}",", ","{{workflowId}}",", ","{{runId}}",", ","{{nodeId}}"]})]})]}):null,"handoff"===W.type?(v=String((g=W.config||{}).targetTeamId??""),f=String(g.targetWorkflowId??""),b=g.variableMapping||{},y=async()=>{if(!(e$.length>0)&&!eE){eR(!0);try{let e=await fetch("/api/teams/list"),t=await e.json();t.ok&&Array.isArray(t.teamIds)&&eM(t.teamIds)}catch{}eR(!1)}},k=async e=>{if(e&&!eL[e])try{let t=await fetch(`/api/teams/workflows?teamId=${encodeURIComponent(e)}`),r=await t.json();if(r.ok&&Array.isArray(r.files)){let t=r.files.map(e=>({id:e.replace(/\.workflow\.json$/,"")}));eO(r=>({...r,[e]:t}))}}catch{}},w=async(e,t)=>{let r=eU(e,t);if(e&&t&&!eW[r]&&!e_[r]){ez(e=>({...e,[r]:!0}));try{let a=(()=>{try{let t=localStorage.getItem(`ck-postiz-${e}`);return t&&JSON.parse(t).apiKey||""}catch{return""}})(),o=await fetch(`/api/plugins/marketing/integrations?team=${encodeURIComponent(e)}&teamId=${encodeURIComponent(e)}`,{headers:a?{"x-postiz-api-key":a}:{}}),i=await o.json(),l=Array.isArray(i?.integrations)?i.integrations:[],n=eB(t),s=l.filter(e=>eB(String(e?.identifier||""))===n&&!e?.disabled&&e?.id).map(e=>({integrationId:String(e.id),identifier:String(e.identifier||""),displayName:String(e.name||t),username:e.username?String(e.username):void 0}));eP(e=>({...e,[r]:s}))}catch{}ez(e=>({...e,[r]:!1}))}},N=(j=String(b.kitchenTeamId??""))&&!j.includes("{{")?j:e,0!==e$.length||eE||y(),v&&!eL[v]&&k(v),(C=!!(S=eF(f)))&&N&&w(N,S),I=eL[v]||[],T=Object.entries(b),$=(A=N&&S?eU(N,S):"")&&eW[A]||[],M=!!A&&!!e_[A],L=String(b.integrationIds??b.integrationId??"").split(",").map(e=>e.trim()).filter(Boolean),O=e=>{let t={...g,...e};t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,config:t}:e)})},E=String(g.mode??"fire-and-forget"),R="number"==typeof g.waitTimeoutMs?g.waitTimeoutMs:3e5,(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Handoff Target"}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"mode"}),(0,t.jsxs)("select",{value:E,onChange:e=>{let t=e.target.value;O({mode:"fire-and-forget"===t?void 0:t})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"fire-and-forget",children:"Fire & Forget"}),(0,t.jsx)("option",{value:"wait-for-completion",children:"Wait for Completion"})]})]}),"wait-for-completion"===E?(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"wait timeout (seconds)"}),(0,t.jsx)("input",{type:"number",min:30,value:Math.round(R/1e3),onChange:e=>{O({waitTimeoutMs:1e3*Math.max(30,parseInt(e.target.value,10)||300)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]"}),(0,t.jsx)("div",{className:"mt-0.5 text-[9px] text-[color:var(--ck-text-tertiary)]",children:"Workflow will wait up to this long for the target to complete."})]}):null,(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target team"}),(0,t.jsxs)("select",{value:v,onChange:e=>{let t=e.target.value;O({targetTeamId:t||void 0,targetWorkflowId:void 0}),t&&!eL[t]&&k(t)},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"— Select team —"}),e$.map(r=>(0,t.jsxs)("option",{value:r,children:[r,r===e?" (current)":""]},r))]})]}),v?(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"target workflow"}),(0,t.jsxs)("select",{value:f,onChange:e=>O({targetWorkflowId:e.target.value||void 0}),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"— Select workflow —"}),I.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name||e.id},e.id))]}),v&&!eL[v]?(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Loading workflows…"}):null]}):null,C&&S?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:[S," accounts"]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=eU(N,S);eP(t=>{let r={...t};return delete r[e],r}),w(N,S)},className:"rounded-lg border border-white/10 bg-white/5 px-2 py-0.5 text-[10px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Refresh"})]}),M?(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Loading accounts…"}):0===$.length?(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["No ",S," accounts found. Open Marketing → Accounts and connect ",S," in Postiz."]}):(0,t.jsxs)("div",{className:"mt-1 space-y-1",children:[$.map(e=>{let r=L.includes(e.integrationId),a=e.identifier&&e.identifier!==S?` (${e.identifier})`:"";return(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer rounded-lg border border-white/10 bg-white/5 px-2 py-1 hover:bg-white/10",children:[(0,t.jsx)("input",{type:"checkbox",checked:r,onChange:()=>{let t=r?L.filter(t=>t!==e.integrationId):[...L,e.integrationId],a={...b};delete a.integrationId,t.length>0?a.integrationIds=t.join(","):delete a.integrationIds,O({variableMapping:a})},className:"accent-[var(--ck-accent-red)]"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-primary)]",children:[e.displayName,a]}),e.username?(0,t.jsx)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:e.username}):null]})]},e.integrationId)}),(0,t.jsx)("div",{className:"text-[9px] text-[color:var(--ck-text-tertiary)]",children:0===L.length?"None selected — will use first connected account.":`${L.length} account${L.length>1?"s":""} selected.`})]})]}):null,(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"variable mapping"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=`var_${Date.now()}`;O({variableMapping:{...b,[e]:""}})},className:"rounded-lg border border-white/10 bg-white/5 px-2 py-0.5 text-[10px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"+ Add"})]}),(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Map target workflow trigger inputs to upstream node outputs. Key = target variable name, Value = ","{{nodeId.field}}"," template."]}),T.length>0?(0,t.jsx)("div",{className:"mt-2 space-y-1",children:T.map(([e,r],a)=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("input",{value:e,onChange:t=>{let a=t.target.value,o={...b};delete o[e],o[a]=r,O({variableMapping:o})},className:"w-1/3 rounded-lg border border-white/10 bg-white/5 px-1.5 py-0.5 text-[10px] text-[color:var(--ck-text-primary)]",placeholder:"target_var"}),(0,t.jsx)("span",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:"→"}),(0,t.jsx)("input",{value:r,onChange:t=>{O({variableMapping:{...b,[e]:t.target.value}})},className:"flex-1 rounded-lg border border-white/10 bg-white/5 px-1.5 py-0.5 text-[10px] text-[color:var(--ck-text-primary)]",placeholder:"{{nodeId.output}}"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t={...b};delete t[e],O({variableMapping:Object.keys(t).length>0?t:void 0})},className:"text-[10px] text-red-400 hover:text-red-300",title:"Remove mapping",children:"✕"})]},a))}):(0,t.jsx)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)] italic",children:"No mappings — target workflow will receive empty trigger input."})]})]})):null,(0,t.jsx)("div",{children:(0,t.jsx)(u,{outputFields:(W.config||{}).outputFields||[],onChange:e=>{let t={...W.config};e.length>0?t.outputFields=e:delete t.outputFields,t$({...P,nodes:P.nodes.map(e=>e.id===W.id?{...e,config:t}:e)})}})}),(0,t.jsxs)("details",{className:"rounded-lg border border-white/10 bg-black/10",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-2 py-1 text-[10px] font-medium text-[color:var(--ck-text-secondary)]",children:"Raw Config (debug)"}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)("pre",{className:"mt-1 max-h-[150px] overflow-auto rounded-lg border border-white/10 bg-white/5 p-2 text-[9px] text-[color:var(--ck-text-tertiary)]",children:JSON.stringify(W.config??{},null,2)})})]})]}):(0,t.jsx)("div",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"No node selected."}):(0,t.jsx)("div",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"Select a node."})]})]}),(0,t.jsxs)("details",{open:!0,className:"rounded-lg border border-white/10 bg-white/5",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Triggers"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"triggers"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=`t${Date.now()}`;t$({...P,triggers:[...z,{kind:"cron",id:e,name:"New trigger",enabled:!0,expr:"0 9 * * 1-5",tz:_}]})},className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"+ Add"})]}),"idle"!==ee&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-2 py-1",children:["syncing"===ee&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border border-blue-400 border-t-transparent"}),(0,t.jsx)("div",{className:"text-xs text-blue-400",children:"Syncing triggers..."})]}),"success"===ee&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-green-400",children:"✓"}),(0,t.jsx)("div",{className:"text-xs text-green-400",children:"Triggers synced"})]}),"error"===ee&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-red-400",children:"✗"}),(0,t.jsxs)("div",{className:"text-xs text-red-400",children:["Trigger sync failed: ",er]})]})]}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:z.length?z.map((e,r)=>{let a=e.kind,o=String(e.id??""),i=String(e.name??""),l=!!e.enabled,n=String(e.expr??""),s=String(e.tz??_),d=n.trim().split(/\s+/).filter(Boolean),c=!n.trim()||5===d.length;return(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-primary)]",children:i||o||`trigger-${r+1}`}),(0,t.jsx)("button",{type:"button",onClick:()=>t$({...P,triggers:z.filter((e,t)=>t!==r)}),className:"text-[10px] text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:"Remove"})]}),"cron"===a?null:(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:["Unsupported trigger kind: ",String(a)]}),(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-2",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:e=>{let t=e.target.checked;t$({...P,triggers:z.map((e,a)=>a===r&&"cron"===e.kind?{...e,enabled:t}:e)})}}),"Enabled"]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"name"}),(0,t.jsx)("input",{value:i,onChange:e=>{let t=e.target.value;t$({...P,triggers:z.map((e,a)=>a===r&&"cron"===e.kind?{...e,name:t}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Content cadence"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"schedule (cron)"}),(0,t.jsx)("input",{value:n,onChange:e=>{let t=e.target.value;t$({...P,triggers:z.map((e,a)=>a===r&&"cron"===e.kind?{...e,expr:t}:e)})},className:c?"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 font-mono text-[11px] text-[color:var(--ck-text-primary)]":"mt-1 w-full rounded-lg border border-red-400/50 bg-white/5 px-2 py-1 font-mono text-[11px] text-[color:var(--ck-text-primary)]",placeholder:"0 9 * * 1,3,5"}),c?null:(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-red-200",children:["Cron should be 5 fields (min hour dom month dow). You entered ",d.length,"."]}),(0,t.jsxs)("div",{className:"mt-1 grid grid-cols-1 gap-1",children:[(0,t.jsx)("select",{value:J.some(e=>e.expr===n)?n:"",onChange:e=>{let t=e.target.value;t$({...P,triggers:z.map((e,a)=>a===r&&"cron"===e.kind?{...e,expr:t}:e)})},className:"w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[11px] text-[color:var(--ck-text-secondary)]",children:J.map(e=>(0,t.jsx)("option",{value:e.expr,children:e.label},e.label))}),(0,t.jsx)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:"Presets set the cron; edit freely for advanced schedules."})]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"timezone override"}),(0,t.jsx)("input",{value:s,onChange:e=>{let t=String(e.target.value||"").trim()||_;t$({...P,triggers:z.map((e,a)=>a===r&&"cron"===e.kind?{...e,tz:t}:e)})},className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:_})]})]})]},`${o}-${r}`)}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"No triggers yet."})})]})]}),(0,t.jsxs)("details",{open:!0,className:"rounded-lg border border-white/10 bg-white/5",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Runs"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Runs (history)"}),(0,t.jsx)(a.default,{href:`/teams/${encodeURIComponent(e)}/runs`,className:"text-[10px] font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)] hover:underline",children:"View all →"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",disabled:H,onClick:async()=>{let t=String(P.id??"").trim();if(t){eQ(""),eY(!0);try{let r=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:t,mode:"enqueue"})}),a=await r.json();if(!r.ok||!a.ok)throw Error(a.error||"Failed to enqueue run");let o=await fetch(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}`,{cache:"no-store"}),i=await o.json();if(!o.ok||!i.ok)throw Error(i.error||"Failed to refresh runs");let l=(Array.isArray(i.files)?i.files:[]).map(e=>String(e??"").trim()).filter(e=>!!e);eK(l)}catch(e){eQ(e instanceof Error?e.message:String(e))}finally{eY(!1)}}},className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-50",children:"+ Queue run"}),(0,t.jsx)("button",{type:"button",disabled:H||e2||!tA.ok,onClick:async()=>{let t=String(P.id??"").trim();if(!t)return;if(tA.missingAgentOnNodeIds.length)return void eQ("All nodes must be assigned to an agent.");let r=to||tA.skipCronPermanent;if(tA.agentIdsMissingCron.length&&!r){tt(!0),ta("");try{let t=await fetch("/api/cron/worker",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"reconcile",teamId:e})}),r=await t.json();if(!t.ok||!1===r.ok)throw Error(r.error||"Failed to reconcile worker crons");let a=await tC(),o=tA.requiredAgentIds.filter(e=>!a[e]);if(o.length)return void eQ(`Cron not set up for: ${o.join(", ")}`)}catch(e){eQ(e instanceof Error?e.message:String(e));return}finally{tt(!1)}}eQ(""),eY(!0),eG(!0);try{let r=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:t,mode:"run_now"})}),a=await r.json();if(!r.ok||!a.ok)throw Error(a.error||"Failed to create run");let o=String(a.runId??"").trim();if(o)return void q.push(`/teams/${e}/runs/${s}/${o}`);eG(!1);let i=await fetch(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}`,{cache:"no-store"}),l=await i.json();if(!i.ok||!l.ok)throw Error(l.error||"Failed to refresh runs");let n=(Array.isArray(l.files)?l.files:[]).map(e=>String(e??"").trim()).filter(e=>!!e);eK(n)}catch(e){eG(!1),eQ(e instanceof Error?e.message:String(e))}finally{eY(!1)}},className:"rounded-lg border border-emerald-400/30 bg-emerald-500/10 px-2 py-1 text-[10px] font-medium text-emerald-50 hover:bg-emerald-500/15 disabled:opacity-50",title:"Enqueue a run for the workflow runner (Kitchen does not execute nodes)",children:"+ Run now"}),e3?(0,t.jsx)("div",{className:"ml-2 text-[10px] text-amber-100/90",title:e3,children:"Cron check unavailable"}):null]})]}),tA.missingAgentOnNodeIds.length?(0,t.jsxs)("div",{className:"mt-2 rounded-lg border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:["All nodes must be assigned to an agent. Missing agentId on: ",tA.missingAgentOnNodeIds.join(", ")]}):tA.skipCronPermanent?(0,t.jsxs)("div",{className:"mt-2 rounded-lg border border-sky-400/30 bg-sky-500/10 p-2 text-xs text-sky-50",children:[(0,t.jsx)("div",{children:"Cron check is skipped permanently for this workflow. Run Now will enqueue without installing worker crons."}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("button",{type:"button",disabled:ts,onClick:async()=>{td(!0),tx("");try{if("ready"!==Z.kind)throw Error("Workflow not loaded");let t=JSON.parse(Z.jsonText),r=t.meta&&"object"==typeof t.meta&&!Array.isArray(t.meta)?{...t.meta}:{};delete r.skipCronCheck;let a={...t,meta:r},o=await fetch("/api/teams/workflows",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflow:a})}),i=await o.json();if(!o.ok||!1===i.ok)throw Error(i.error||"Failed to save workflow");G({kind:"ready",jsonText:JSON.stringify(a,null,2)+"\n"}),await tC()}catch(e){tx(e instanceof Error?e.message:String(e))}finally{td(!1)}},className:"rounded-lg border border-sky-300/30 bg-sky-500/10 px-2 py-1 text-[10px] font-medium text-sky-50 hover:bg-sky-500/15 disabled:opacity-60",children:ts?"Unskipping…":"Unskip"}),tc?(0,t.jsx)("span",{className:"text-[10px] text-red-200",children:tc}):null]})]}):to?(0,t.jsx)("div",{className:"mt-2 rounded-lg border border-sky-400/30 bg-sky-500/10 p-2 text-xs text-sky-50",children:"Cron check is skipped for this session. Run Now will enqueue without installing worker crons. Reload the page to re-enable the check."}):tA.agentIdsMissingCron.length?(0,t.jsxs)("div",{className:"mt-2 rounded-lg border border-amber-400/30 bg-amber-500/10 p-2 text-xs text-amber-50",children:[(0,t.jsxs)("div",{children:["Cron not set up for: ",tA.agentIdsMissingCron.join(", ")]}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{ta(""),e7(!0)},className:"rounded-lg border border-amber-300/30 bg-amber-500/10 px-2 py-1 text-[10px] font-medium text-amber-50 hover:bg-amber-500/15",children:"Install worker cron(s)"}),(0,t.jsx)("button",{type:"button",onClick:()=>void tC(),className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[10px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Re-check"}),(0,t.jsx)("button",{type:"button",onClick:()=>{tx(""),tn(!0)},className:"rounded-lg border border-sky-400/30 bg-sky-500/10 px-2 py-1 text-[10px] font-medium text-sky-50 hover:bg-sky-500/15",title:"Skip the cron-install check and enable Run Now (useful when workers run via launchd or an external scheduler)",children:"Skip"})]})]}):null,(0,t.jsx)(i.ConfirmationModal,{open:tl,title:"Skip cron check?",busy:ts,error:tc||void 0,confirmLabel:"Skip this run only",confirmBusyLabel:"Saving…",onClose:()=>{ts||tn(!1)},onConfirm:()=>{ti(!0),tn(!1)},children:(0,t.jsxs)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] space-y-3",children:[(0,t.jsx)("p",{children:"Choose how long to bypass the worker-cron check for this workflow. The actual worker process must still be running somewhere (OpenClaw cron, macOS launchd, systemd, etc.) — skipping the check only stops Kitchen from blocking Run Now."}),(0,t.jsxs)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-3",children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-[color:var(--ck-text-primary)]",children:"Skip this run only"}),(0,t.jsx)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:"Click the primary button below. Skip resets on page reload."})]}),(0,t.jsxs)("button",{type:"button",disabled:ts,onClick:async()=>{td(!0),tx("");try{if("ready"!==Z.kind)throw Error("Workflow not loaded");let t=JSON.parse(Z.jsonText),r={...t.meta&&"object"==typeof t.meta&&!Array.isArray(t.meta)?t.meta:{},skipCronCheck:!0},a={...t,meta:r},o=await fetch("/api/teams/workflows",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflow:a})}),i=await o.json();if(!o.ok||!1===i.ok)throw Error(i.error||"Failed to save workflow");G({kind:"ready",jsonText:JSON.stringify(a,null,2)+"\n"}),tn(!1)}catch(e){tx(e instanceof Error?e.message:String(e))}finally{td(!1)}},className:"w-full rounded-lg border border-sky-400/30 bg-sky-500/10 p-3 text-left hover:bg-sky-500/15 disabled:opacity-60",children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-sky-50",children:"Skip permanently"}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-sky-100/80",children:["Writes ",(0,t.jsx)("span",{className:"font-mono",children:"meta.skipCronCheck: true"})," into the workflow JSON. Applies forever unless the flag is removed."]})]})]})}),(0,t.jsx)(i.ConfirmationModal,{open:e8,title:"Install worker cron jobs?",busy:te,error:tr||void 0,confirmLabel:"Install",onClose:()=>{te||e7(!1)},onConfirm:async()=>{tt(!0),ta("");try{let t=await fetch("/api/cron/worker",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"reconcile",teamId:e})}),r=await t.json();if(!t.ok||!1===r.ok)throw Error(r.error||"Failed to install worker crons");await tC(),e7(!1)}catch(e){ta(e instanceof Error?e.message:String(e))}finally{tt(!1)}},children:(0,t.jsxs)("div",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:["Kitchen will install (or enable) worker cron jobs for the following agents so this workflow can drain:",(0,t.jsx)("div",{className:"mt-2 rounded-lg border border-white/10 bg-white/5 p-2 font-mono text-[11px] text-[color:var(--ck-text-primary)]",children:tA.agentIdsMissingCron.join(", ")}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["Cron cadence: every 5 minutes. The worker runs: ",(0,t.jsx)("span",{className:"font-mono",children:"openclaw recipes workflows worker-tick"}),"."]})]})}),eX?(0,t.jsx)("div",{className:"mt-2 rounded-lg border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:eX}):null,(0,t.jsx)("div",{className:"mt-2 space-y-1",children:eH?(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"Serving up hot…"}):eV.length?eV.slice(0,8).map(r=>{let o=String(P.id??"").trim(),i=String(r).replace(/\.run\.json$/i,""),l=e0===i,n=o?`/teams/${encodeURIComponent(e)}/runs/${encodeURIComponent(o)}/${encodeURIComponent(i)}`:"#";return(0,t.jsx)(a.default,{href:n,onClick:()=>e1(i),className:l?"block w-full rounded-lg bg-white/10 px-2 py-1 text-left text-[11px] font-mono text-[color:var(--ck-text-primary)]":"block w-full rounded-lg px-2 py-1 text-left text-[11px] font-mono text-[color:var(--ck-text-secondary)] hover:bg-white/5",title:"Open run detail",children:i},r)}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"No runs yet."})}),(0,t.jsxs)("details",{open:!0,className:"mt-3 rounded-lg border border-white/10 bg-black/10",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Nodes"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsx)("div",{className:"mt-2 rounded-lg border border-white/10 bg-white/5 p-2",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"id"}),(0,t.jsx)("input",{value:tp,onChange:e=>tm(e.target.value),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. draft_assets"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"name (optional)"}),(0,t.jsx)("input",{value:tu,onChange:e=>th(e.target.value),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"Human-friendly label"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"type"}),(0,t.jsxs)("select",{value:tg,onChange:e=>tv(e.target.value),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"start",children:"start"}),(0,t.jsx)("option",{value:"end",children:"end"}),(0,t.jsx)("option",{value:"llm",children:"llm"}),(0,t.jsx)("option",{value:"tool",children:"tool"}),(0,t.jsx)("option",{value:"condition",children:"condition"}),(0,t.jsx)("option",{value:"delay",children:"delay"}),(0,t.jsx)("option",{value:"human_approval",children:"human_approval"}),(0,t.jsx)("option",{value:"media-image",children:"media-image"}),(0,t.jsx)("option",{value:"media-video",children:"media-video"}),(0,t.jsx)("option",{value:"handoff",children:"handoff"})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=String(tp||"").trim().replace(/[^a-z0-9_\-]/gi,"_");if(!e||P.nodes.some(t=>t.id===e))return;let t=P.nodes.reduce((e,t)=>"number"==typeof t.x?Math.max(e,t.x):e,80),r={id:e,type:tg,name:String(tu||"").trim()||e,x:t+220,y:80};t$({...P,nodes:[...P.nodes,r]}),ex(e),tm(""),th("")},className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"+ Add node"})]})}),(0,t.jsx)("div",{className:"mt-2 space-y-1",children:P.nodes.map(e=>{let r=ec===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>ex(e.id),className:r?"w-full rounded-lg bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-lg px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:[(0,t.jsx)("span",{className:"font-mono",children:e.id}),(0,t.jsx)("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.type})]},e.id)})})]})]}),(0,t.jsxs)("details",{open:!0,className:"mt-3 rounded-lg border border-white/10 bg-black/10",children:[(0,t.jsx)("summary",{className:"cursor-pointer list-none px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Edges"}),(0,t.jsxs)("div",{className:"px-3 pb-3",children:[(0,t.jsx)("div",{className:"mt-2 rounded-lg border border-white/10 bg-white/5 p-2",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"from"}),(0,t.jsxs)("select",{value:tf,onChange:e=>tb(e.target.value),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"(select)"}),P.nodes.map(e=>(0,t.jsx)("option",{value:e.id,children:e.id},e.id))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"to"}),(0,t.jsxs)("select",{value:ty,onChange:e=>tk(e.target.value),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"(select)"}),P.nodes.map(e=>(0,t.jsx)("option",{value:e.id,children:e.id},e.id))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"label (optional)"}),(0,t.jsx)("input",{value:tw,onChange:e=>tj(e.target.value),className:"mt-1 w-full rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. approve"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e=String(tf||"").trim(),t=String(ty||"").trim();if(!e||!t||e===t)return;let r={id:`e${Date.now()}`,from:e,to:t,...String(tw||"").trim()?{label:String(tw).trim()}:{}};t$({...P,edges:[...P.edges??[],r]}),tj("")},className:"rounded-lg border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"+ Add edge"})]})}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:(P.edges??[]).length?(P.edges??[]).map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-white/10 bg-white/5 p-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"text-[11px] text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.from})," → ",(0,t.jsx)("span",{className:"font-mono",children:e.to}),e.label?(0,t.jsxs)("span",{className:"ml-2 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["(",e.label,")"]}):null]}),(0,t.jsx)("button",{type:"button",onClick:()=>t$({...P,edges:(P.edges??[]).filter(t=>t.id!==e.id)}),className:"text-[10px] text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]",children:"Remove"})]})},e.id)):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"No edges yet."})})]})]})]})]})]})):null})})]}),(0,t.jsx)(x.RunLoadingOverlay,{open:eZ})]})}e.s(["default",()=>g],87090)}]);
@@ -0,0 +1,7 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,44355,e=>{"use strict";var r=e.i(18050),t=e.i(74080);function a({open:e,onClose:a,title:s,children:i,error:l,confirmLabel:d,confirmBusyLabel:n,onConfirm:o,confirmDisabled:c,busy:m,confirmButtonClassName:x}){if(!e)return null;let u=m??!1,b=u&&n?n:d,h="confirmation-modal-title";return(0,t.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:a,"aria-hidden":"true"}),(0,r.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":h,children:(0,r.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,r.jsx)("h2",{id:h,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:s}),i,l?(0,r.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:l}):null,(0,r.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:a,className:"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,r.jsx)("button",{type:"button",disabled:(c??!1)||u,onClick:o,className:x??"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:b})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>a])},99252,e=>{"use strict";var r=e.i(18050),t=e.i(74080);function a({open:e}){return e?(0,t.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-[9999]",children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-[color:var(--ck-bg-base)]/90 pointer-events-none"}),(0,r.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-6 sm:p-10",children:(0,r.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-8 sm:p-10 shadow-[var(--ck-shadow-2)]",children:[(0,r.jsx)("div",{className:"text-xl font-semibold text-[color:var(--ck-text-primary)]",children:"Gathering your ingredients.."}),(0,r.jsx)("div",{className:"mt-6 h-1.5 w-full overflow-hidden rounded-full bg-white/10",children:(0,r.jsx)("div",{className:"h-full w-1/3 animate-[loading-bar_1.5s_ease-in-out_infinite] rounded-full bg-[var(--ck-accent-red)]"})})]})}),(0,r.jsx)("style",{children:`
2
+ @keyframes loading-bar {
3
+ 0% { transform: translateX(-100%); }
4
+ 50% { transform: translateX(200%); }
5
+ 100% { transform: translateX(-100%); }
6
+ }
7
+ `})]}),document.body):null}e.s(["RunLoadingOverlay",()=>a])}]);
@@ -0,0 +1,3 @@
1
+ @font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/8a480f0b521d4e75-s.8e0177b5.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/7178b3e590c64307-s.b97b3418.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/caa3a2e1cccd8315-s.p.853070df.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Fallback;src:local(Arial);ascent-override:95.94%;descent-override:28.16%;line-gap-override:0.0%;size-adjust:104.76%}.geist_a71539c9-module__T19VSG__className{font-family:Geist,Geist Fallback;font-style:normal}.geist_a71539c9-module__T19VSG__variable{--font-geist-sans:"Geist","Geist Fallback"}
2
+ @font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/4fa387ec64143e14-s.c1fdd6c2.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/bbc41e54d2fcbd21-s.799d8ef8.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(../media/797e433ab948586e-s.p.dbea232f.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono Fallback;src:local(Arial);ascent-override:74.67%;descent-override:21.92%;line-gap-override:0.0%;size-adjust:134.59%}.geist_mono_8d43a2aa-module__8Li5zG__className{font-family:Geist Mono,Geist Mono Fallback;font-style:normal}.geist_mono_8d43a2aa-module__8Li5zG__variable{--font-geist-mono:"Geist Mono","Geist Mono Fallback"}
3
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--color-red-50:#fef2f2;--color-red-100:#ffe2e2;--color-red-200:#ffcaca;--color-red-300:#ffa3a3;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-amber-50:#fffbeb;--color-amber-100:#fef3c6;--color-amber-200:#fee685;--color-amber-300:#ffd236;--color-amber-400:#fcbb00;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-200:#fff085;--color-yellow-400:#fac800;--color-yellow-500:#edb200;--color-green-400:#05df72;--color-green-500:#00c758;--color-emerald-50:#ecfdf5;--color-emerald-100:#d0fae5;--color-emerald-200:#a4f4cf;--color-emerald-400:#00d294;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-sky-50:#f0f9ff;--color-sky-100:#dff2fe;--color-sky-200:#b8e6fe;--color-sky-300:#77d4ff;--color-sky-400:#00bcfe;--color-sky-500:#00a5ef;--color-blue-300:#90c5ff;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-slate-300:#cad5e2;--color-gray-50:#f9fafb;--color-gray-400:#99a1af;--color-gray-500:#6a7282;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-geist-sans);--default-mono-font-family:var(--font-geist-mono)}@supports (color:lab(0% 0 0)){:root,:host{--color-red-50:lab(96.5005% 4.18508 1.52328);--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-200:lab(86.017% 19.8815 7.75869);--color-red-300:lab(76.5514% 36.422 15.5335);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-amber-50:lab(98.6252% -.635922 8.42309);--color-amber-100:lab(95.916% -1.21653 23.111);--color-amber-200:lab(91.7203% -.505269 49.9084);--color-amber-300:lab(86.4156% 6.13147 78.3961);--color-amber-400:lab(80.1641% 16.6016 99.2089);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-200:lab(94.3433% -5.00429 52.9663);--color-yellow-400:lab(83.2664% 8.65132 106.895);--color-yellow-500:lab(76.3898% 14.5258 98.4589);--color-green-400:lab(78.503% -64.9265 39.7492);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-emerald-50:lab(97.8462% -6.94966 1.85487);--color-emerald-100:lab(94.9004% -17.0769 5.63836);--color-emerald-200:lab(90.2247% -31.039 9.47084);--color-emerald-400:lab(75.0771% -60.7313 19.4147);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-600:lab(55.0481% -49.9246 15.93);--color-sky-50:lab(97.3623% -2.33802 -4.13098);--color-sky-100:lab(94.3709% -4.56053 -8.23453);--color-sky-200:lab(88.6983% -11.3978 -16.8488);--color-sky-300:lab(80.3307% -20.2945 -31.385);--color-sky-400:lab(70.687% -23.6078 -45.9483);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-blue-300:lab(77.5052% -6.4629 -36.42);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-slate-300:lab(84.7652% -1.94535 -7.93337);--color-gray-50:lab(98.2596% -.247031 -.706708);--color-gray-400:lab(65.9269% -.832707 -8.17473);--color-gray-500:lab(47.7841% -.393182 -10.0268)}}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.top-8{top:calc(var(--spacing)*8)}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-4{right:calc(var(--spacing)*4)}.bottom-4{bottom:calc(var(--spacing)*4)}.left-3{left:calc(var(--spacing)*3)}.isolate{isolation:isolate}.-z-10{z-index:calc(10*-1)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[200\]{z-index:200}.z-\[210\]{z-index:210}.z-\[9999\]{z-index:9999}.z-\[10000\]{z-index:10000}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-4\.5{height:calc(var(--spacing)*4.5)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-\[55vh\]{height:55vh}.h-\[70px\]{height:70px}.h-\[70vh\]{height:70vh}.h-\[80px\]{height:80px}.h-\[140px\]{height:140px}.h-\[260px\]{height:260px}.h-\[320px\]{height:320px}.h-\[400px\]{height:400px}.h-\[420px\]{height:420px}.h-\[1200px\]{height:1200px}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[140px\]{max-height:140px}.max-h-\[150px\]{max-height:150px}.max-h-\[220px\]{max-height:220px}.max-h-\[260px\]{max-height:260px}.max-h-\[500px\]{max-height:500px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[150px\]{min-height:150px}.min-h-\[200px\]{min-height:200px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-4\.5{width:calc(var(--spacing)*4.5)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-36{width:calc(var(--spacing)*36)}.w-48{width:calc(var(--spacing)*48)}.w-56{width:calc(var(--spacing)*56)}.w-62{width:calc(var(--spacing)*62)}.w-64{width:calc(var(--spacing)*64)}.w-72{width:calc(var(--spacing)*72)}.w-\[44px\]{width:44px}.w-\[260px\]{width:260px}.w-\[320px\]{width:320px}.w-\[380px\]{width:380px}.w-\[2200px\]{width:2200px}.w-dvw{width:100dvw}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[42px\]{min-width:42px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x:calc(var(--spacing)*0);--tw-border-spacing-y:calc(var(--spacing)*0);border-spacing:var(--tw-border-spacing-x)var(--tw-border-spacing-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-16px\]{--tw-translate-x:-16px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\[loading-bar_1\.5s_ease-in-out_infinite\]{animation:1.5s ease-in-out infinite loading-bar}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize-y{resize:vertical}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-3{column-gap:calc(var(--spacing)*3)}.gap-y-1{row-gap:calc(var(--spacing)*1)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-white\/10>:not(:last-child)){border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){:where(.divide-white\/10>:not(:last-child)){border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[color\:rgba\(255\,59\,48\,0\.45\)\]{border-color:#ff3b3073}.border-\[color\:var\(--ck-accent-red\)\]{border-color:var(--ck-accent-red)}.border-\[color\:var\(--ck-border-strong\)\]{border-color:var(--ck-border-strong)}.border-\[color\:var\(--ck-border-subtle\)\]{border-color:var(--ck-border-subtle)}.border-\[color\:var\(--ck-toast-border\)\]{border-color:var(--ck-toast-border)}.border-\[var\(--ck-accent-red\)\],.border-\[var\(--ck-accent-red\)\]\/30{border-color:var(--ck-accent-red)}@supports (color:color-mix(in lab, red, red)){.border-\[var\(--ck-accent-red\)\]\/30{border-color:color-mix(in oklab,var(--ck-accent-red)30%,transparent)}}.border-\[var\(--ck-accent-red\)\]\/50{border-color:var(--ck-accent-red)}@supports (color:color-mix(in lab, red, red)){.border-\[var\(--ck-accent-red\)\]\/50{border-color:color-mix(in oklab,var(--ck-accent-red)50%,transparent)}}.border-amber-300\/30{border-color:#ffd2364d}@supports (color:color-mix(in lab, red, red)){.border-amber-300\/30{border-color:color-mix(in oklab,var(--color-amber-300)30%,transparent)}}.border-amber-400\/30{border-color:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/30{border-color:color-mix(in oklab,var(--color-amber-400)30%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500)50%,transparent)}}.border-blue-400{border-color:var(--color-blue-400)}.border-emerald-400\/20{border-color:#00d29433}@supports (color:color-mix(in lab, red, red)){.border-emerald-400\/20{border-color:color-mix(in oklab,var(--color-emerald-400)20%,transparent)}}.border-emerald-400\/30{border-color:#00d2944d}@supports (color:color-mix(in lab, red, red)){.border-emerald-400\/30{border-color:color-mix(in oklab,var(--color-emerald-400)30%,transparent)}}.border-emerald-400\/50{border-color:#00d29480}@supports (color:color-mix(in lab, red, red)){.border-emerald-400\/50{border-color:color-mix(in oklab,var(--color-emerald-400)50%,transparent)}}.border-gray-400\/30{border-color:#99a1af4d}@supports (color:color-mix(in lab, red, red)){.border-gray-400\/30{border-color:color-mix(in oklab,var(--color-gray-400)30%,transparent)}}.border-red-400\/20{border-color:#ff656833}@supports (color:color-mix(in lab, red, red)){.border-red-400\/20{border-color:color-mix(in oklab,var(--color-red-400)20%,transparent)}}.border-red-400\/30{border-color:#ff65684d}@supports (color:color-mix(in lab, red, red)){.border-red-400\/30{border-color:color-mix(in oklab,var(--color-red-400)30%,transparent)}}.border-red-400\/50{border-color:#ff656880}@supports (color:color-mix(in lab, red, red)){.border-red-400\/50{border-color:color-mix(in oklab,var(--color-red-400)50%,transparent)}}.border-red-400\/60{border-color:#ff656899}@supports (color:color-mix(in lab, red, red)){.border-red-400\/60{border-color:color-mix(in oklab,var(--color-red-400)60%,transparent)}}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab, red, red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-sky-300\/30{border-color:#77d4ff4d}@supports (color:color-mix(in lab, red, red)){.border-sky-300\/30{border-color:color-mix(in oklab,var(--color-sky-300)30%,transparent)}}.border-sky-400\/30{border-color:#00bcfe4d}@supports (color:color-mix(in lab, red, red)){.border-sky-400\/30{border-color:color-mix(in oklab,var(--color-sky-400)30%,transparent)}}.border-transparent{border-color:#0000}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.border-white\/15{border-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.border-white\/15{border-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab, red, red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.border-white\/25{border-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.border-white\/25{border-color:color-mix(in oklab,var(--color-white)25%,transparent)}}.border-yellow-400\/30{border-color:#fac8004d}@supports (color:color-mix(in lab, red, red)){.border-yellow-400\/30{border-color:color-mix(in oklab,var(--color-yellow-400)30%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-t-white\/60{border-top-color:#fff9}@supports (color:color-mix(in lab, red, red)){.border-t-white\/60{border-top-color:color-mix(in oklab,var(--color-white)60%,transparent)}}.bg-\[color\:rgba\(255\,59\,48\,0\.08\)\]{background-color:#ff3b3014}.bg-\[color\:var\(--ck-accent\)\]{background-color:var(--ck-accent)}.bg-\[color\:var\(--ck-accent-red\)\]{background-color:var(--ck-accent-red)}.bg-\[color\:var\(--ck-accent-red-soft\)\]{background-color:var(--ck-accent-red-soft)}.bg-\[color\:var\(--ck-bg\)\]{background-color:var(--ck-bg)}.bg-\[color\:var\(--ck-bg-base\)\]\/90{background-color:var(--ck-bg-base)}@supports (color:color-mix(in lab, red, red)){.bg-\[color\:var\(--ck-bg-base\)\]\/90{background-color:color-mix(in oklab,var(--ck-bg-base)90%,transparent)}}.bg-\[color\:var\(--ck-bg-soft\)\],.bg-\[color\:var\(--ck-bg-soft\)\]\/95{background-color:var(--ck-bg-soft)}@supports (color:color-mix(in lab, red, red)){.bg-\[color\:var\(--ck-bg-soft\)\]\/95{background-color:color-mix(in oklab,var(--ck-bg-soft)95%,transparent)}}.bg-\[color\:var\(--ck-toast-bg\)\]{background-color:var(--ck-toast-bg)}.bg-\[var\(--ck-accent-red\)\],.bg-\[var\(--ck-accent-red\)\]\/10{background-color:var(--ck-accent-red)}@supports (color:color-mix(in lab, red, red)){.bg-\[var\(--ck-accent-red\)\]\/10{background-color:color-mix(in oklab,var(--ck-accent-red)10%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500)15%,transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-black\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500)5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-gray-500\/10{background-color:#6a72821a}@supports (color:color-mix(in lab, red, red)){.bg-gray-500\/10{background-color:color-mix(in oklab,var(--color-gray-500)10%,transparent)}}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab, red, red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500)5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-sky-400{background-color:var(--color-sky-400)}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500)10%,transparent)}}.bg-sky-500\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\/15{background-color:color-mix(in oklab,var(--color-sky-500)15%,transparent)}}.bg-transparent{background-color:#0000}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\/5{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\/\[0\.02\]{background-color:#ffffff05}@supports (color:color-mix(in lab, red, red)){.bg-white\/\[0\.02\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab, red, red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500)10%,transparent)}}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-12{padding-right:calc(var(--spacing)*12)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-geist-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[color\:var\(--ck-accent-red\)\]{color:var(--ck-accent-red)}.text-\[color\:var\(--ck-text-primary\)\]{color:var(--ck-text-primary)}.text-\[color\:var\(--ck-text-secondary\)\]{color:var(--ck-text-secondary)}.text-\[color\:var\(--ck-text-tertiary\)\]{color:var(--ck-text-tertiary)}.text-\[var\(--ck-accent-red\)\]{color:var(--ck-accent-red)}.text-amber-50{color:var(--color-amber-50)}.text-amber-100{color:var(--color-amber-100)}.text-amber-100\/90{color:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.text-amber-100\/90{color:color-mix(in oklab,var(--color-amber-100)90%,transparent)}}.text-amber-200{color:var(--color-amber-200)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400)80%,transparent)}}.text-black{color:var(--color-black)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-emerald-50{color:var(--color-emerald-50)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-200{color:var(--color-emerald-200)}.text-emerald-400{color:var(--color-emerald-400)}.text-gray-50{color:var(--color-gray-50)}.text-gray-400{color:var(--color-gray-400)}.text-green-400{color:var(--color-green-400)}.text-red-50{color:var(--color-red-50)}.text-red-100{color:var(--color-red-100)}.text-red-200{color:var(--color-red-200)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-sky-50{color:var(--color-sky-50)}.text-sky-100{color:var(--color-sky-100)}.text-sky-100\/70{color:#dff2feb3}@supports (color:color-mix(in lab, red, red)){.text-sky-100\/70{color:color-mix(in oklab,var(--color-sky-100)70%,transparent)}}.text-sky-100\/80{color:#dff2fecc}@supports (color:color-mix(in lab, red, red)){.text-sky-100\/80{color:color-mix(in oklab,var(--color-sky-100)80%,transparent)}}.text-sky-300{color:var(--color-sky-300)}.text-sky-400\/60{color:#00bcfe99}@supports (color:color-mix(in lab, red, red)){.text-sky-400\/60{color:color-mix(in oklab,var(--color-sky-400)60%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-white{color:var(--color-white)}.text-yellow-100{color:var(--color-yellow-100)}.text-yellow-200{color:var(--color-yellow-200)}.text-yellow-400{color:var(--color-yellow-400)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-\[var\(--ck-accent-red\)\]{accent-color:var(--ck-accent-red)}.accent-blue-500{accent-color:var(--color-blue-500)}.opacity-0{opacity:0}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow-\[var\(--ck-shadow-1\)\]{--tw-shadow:var(--ck-shadow-1);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[var\(--ck-shadow-2\)\]{--tw-shadow:var(--ck-shadow-2);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-white\/20{--tw-ring-color:#fff3}@supports (color:color-mix(in lab, red, red)){.ring-white\/20{--tw-ring-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\[var\(--ck-glass-blur\)\]{--tw-backdrop-blur:blur(var(--ck-glass-blur));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\:text-\[color\:var\(--ck-text-tertiary\)\]::placeholder{color:var(--ck-text-tertiary)}@media (hover:hover){.hover\:border-\[color\:var\(--ck-border-strong\)\]:hover{border-color:var(--ck-border-strong)}.hover\:bg-\[color\:rgba\(255\,59\,48\,0\.12\)\]:hover{background-color:#ff3b301f}.hover\:bg-\[color\:var\(--ck-accent-red-soft-strong\)\]:hover{background-color:var(--ck-accent-red-soft-strong)}.hover\:bg-\[color\:var\(--ck-bg-soft\)\]:hover{background-color:var(--ck-bg-soft)}.hover\:bg-\[var\(--ck-accent-red\)\]\/90:hover{background-color:var(--ck-accent-red)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-\[var\(--ck-accent-red\)\]\/90:hover{background-color:color-mix(in oklab,var(--ck-accent-red)90%,transparent)}}.hover\:bg-\[var\(--ck-accent-red-hover\)\]:hover{background-color:var(--ck-accent-red-hover)}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500)15%,transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.hover\:bg-amber-700:hover{background-color:var(--color-amber-700)}.hover\:bg-black\/30:hover{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/30:hover{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500)15%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\:bg-sky-500\/15:hover{background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.hover\:bg-sky-500\/15:hover{background-color:color-mix(in oklab,var(--color-sky-500)15%,transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:text-\[color\:var\(--ck-accent-red-hover\)\]:hover{color:var(--ck-accent-red-hover)}.hover\:text-\[color\:var\(--ck-text-primary\)\]:hover{color:var(--ck-text-primary)}.hover\:text-\[color\:var\(--ck-text-secondary\)\]:hover{color:var(--ck-text-secondary)}.hover\:text-amber-50:hover{color:var(--color-amber-50)}.hover\:text-blue-300:hover{color:var(--color-blue-300)}.hover\:text-red-100:hover{color:var(--color-red-100)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-sky-200:hover{color:var(--color-sky-200)}.hover\:no-underline:hover{text-decoration-line:none}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.focus\:border-\[color\:var\(--ck-border-strong\)\]:focus{border-color:var(--ck-border-strong)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[color\:var\(--ck-border-strong\)\]:focus-visible{--tw-ring-color:var(--ck-border-strong)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-black\/30:focus-visible{--tw-ring-offset-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-offset-black\/30:focus-visible{--tw-ring-offset-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:bg-\[var\(--ck-accent-red-active\)\]:active{background-color:var(--ck-accent-red-active)}.active\:bg-white\/15:active{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.active\:bg-white\/15:active{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.active\:brightness-95:active{--tw-brightness:brightness(95%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border:disabled{border-style:var(--tw-border-style);border-width:1px}.disabled\:border-\[color\:var\(--ck-border-subtle\)\]:disabled{border-color:var(--ck-border-subtle)}.disabled\:bg-white\/5:disabled{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.disabled\:bg-white\/5:disabled{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.disabled\:text-\[color\:var\(--ck-text-tertiary\)\]:disabled{color:var(--ck-text-tertiary)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:items-start{align-items:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:gap-6{gap:calc(var(--spacing)*6)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:p-8{padding:calc(var(--spacing)*8)}.sm\:p-10{padding:calc(var(--spacing)*10)}}@media (min-width:48rem){.md\:col-span-3{grid-column:span 3/span 3}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:64rem){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-10{padding-inline:calc(var(--spacing)*10)}}@media (min-width:80rem){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}:root{--ck-coral:#ff4d4d;--ck-coral-hover:#f66;--ck-coral-active:#e63946;--ck-cyan:#32d7ff;--ck-bg-base:#090f18;--ck-bg-soft:#121b29;--ck-bg-card:var(--ck-bg-soft)}@supports (color:color-mix(in lab, red, red)){:root{--ck-bg-card:color-mix(in oklab,var(--ck-bg-soft)85%,#1e2c41)}}:root{--ck-bg-glass:#121b29b8;--ck-bg-glass-strong:#121b29e0;--ck-toast-bg:#121b29f0;--ck-toast-border:#e2eeff2e;--ck-border-subtle:#e2eeff1a;--ck-border-strong:#e2eeff29;--ck-text-primary:#eef5ff;--ck-text-secondary:#dee9f8b8;--ck-text-tertiary:#dee9f880;--ck-accent-red:var(--ck-coral);--ck-accent-red-hover:var(--ck-coral-hover);--ck-accent-red-active:var(--ck-coral-active);--ck-focus-ring:#ff4d4d8c;--ck-radius-sm:8px;--ck-radius-md:16px;--ck-radius-lg:24px;--ck-shadow-1:0 22px 60px #03070d80;--ck-shadow-2:0 28px 70px #03070d99;--ck-glass-blur:18px;--ck-glass-saturation:1.25;--background:var(--ck-bg-base);--foreground:var(--ck-text-primary)}html{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}html,body{height:100%}body{background:radial-gradient(900px 540px at 82% -12%,var(--ck-coral),transparent 68%),radial-gradient(900px 540px at 8% -16%,var(--ck-cyan),transparent 70%),linear-gradient(180deg,#060b13 0%,#0a121c 40%,#101b2a 100%)}@supports (color:color-mix(in lab, red, red)){body{background:radial-gradient(900px 540px at 82% -12%,color-mix(in oklab,var(--ck-coral)18%,transparent),transparent 68%),radial-gradient(900px 540px at 8% -16%,color-mix(in oklab,var(--ck-cyan)14%,transparent),transparent 70%),linear-gradient(180deg,#060b13 0%,#0a121c 40%,#101b2a 100%)}}body{color:var(--ck-text-primary);font-family:var(--font-geist-sans),"Space Grotesk",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background-attachment:fixed}:where(a,button,input,textarea,select,summary,[role=button],[tabindex]):focus-visible{outline:2px solid var(--ck-focus-ring);outline-offset:2px}.ck-glass{background:var(--ck-bg-glass);border:1px solid var(--ck-border-subtle);border-radius:var(--ck-radius-md);box-shadow:var(--ck-shadow-1);transition:background-color .16s ease-out,box-shadow .18s ease-out,border-color .16s ease-out}@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.ck-glass{-webkit-backdrop-filter:blur(var(--ck-glass-blur))saturate(var(--ck-glass-saturation));backdrop-filter:blur(var(--ck-glass-blur))saturate(var(--ck-glass-saturation))}}.ck-glass-strong{background:var(--ck-bg-glass-strong);border:1px solid var(--ck-border-strong);border-radius:var(--ck-radius-md);box-shadow:var(--ck-shadow-2);transition:background-color .16s ease-out,box-shadow .18s ease-out,border-color .16s ease-out}@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.ck-glass-strong{-webkit-backdrop-filter:blur(calc(var(--ck-glass-blur) + 4px))saturate(var(--ck-glass-saturation));backdrop-filter:blur(calc(var(--ck-glass-blur) + 4px))saturate(var(--ck-glass-saturation))}}.ck-card{background:var(--ck-bg-card);border:1px solid var(--ck-border-subtle);border-radius:var(--ck-radius-md);box-shadow:var(--ck-shadow-1);transition:background-color .16s ease-out,border-color .16s ease-out}.ck-card:hover{background:var(--ck-bg-card)}@supports (color:color-mix(in lab, red, red)){.ck-card:hover{background:color-mix(in oklab,var(--ck-bg-card)90%,#ffffff14)}}@property --tw-border-spacing-x{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"<length>";inherits:false;initial-value:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}