@aeolus-fleet/gateway 0.37.0 → 0.37.2

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 (259) hide show
  1. package/dist/adapters/prisma/changes.d.ts +8 -3
  2. package/dist/adapters/prisma/changes.js +18 -2
  3. package/dist/adapters/prisma/changes.js.map +1 -1
  4. package/dist/app.js +19 -11
  5. package/dist/app.js.map +1 -1
  6. package/dist/core/people/held-deliveries.d.ts +30 -0
  7. package/dist/core/people/held-deliveries.js +42 -0
  8. package/dist/core/people/held-deliveries.js.map +1 -0
  9. package/dist/core/people/opened-of.d.ts +2 -0
  10. package/dist/core/people/opened-of.js.map +1 -1
  11. package/dist/core/people/ports.d.ts +8 -0
  12. package/dist/core/people/read-basket.d.ts +2 -0
  13. package/dist/core/people/read-basket.js.map +1 -1
  14. package/dist/core/people/read-bridge-home.d.ts +2 -0
  15. package/dist/core/people/read-bridge-home.js.map +1 -1
  16. package/dist/core/people/read-inbox.d.ts +16 -8
  17. package/dist/core/people/read-inbox.js +21 -10
  18. package/dist/core/people/read-inbox.js.map +1 -1
  19. package/dist/core/people/send-stored-answers.d.ts +2 -0
  20. package/dist/core/people/send-stored-answers.js +1 -1
  21. package/dist/core/people/send-stored-answers.js.map +1 -1
  22. package/package.json +1 -1
  23. package/web/.next/BUILD_ID +1 -1
  24. package/web/.next/build-manifest.json +3 -3
  25. package/web/.next/diagnostics/route-bundle-stats.json +84 -84
  26. package/web/.next/fallback-build-manifest.json +3 -3
  27. package/web/.next/prerender-manifest.json +3 -3
  28. package/web/.next/server/app/(bridge)/bridge/basket/page/server-reference-manifest.json +10 -10
  29. package/web/.next/server/app/(bridge)/bridge/basket/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(bridge)/bridge/basket/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(bridge)/bridge/done/page/server-reference-manifest.json +4 -4
  32. package/web/.next/server/app/(bridge)/bridge/done/page.js.nft.json +1 -1
  33. package/web/.next/server/app/(bridge)/bridge/done/page_client-reference-manifest.js +1 -1
  34. package/web/.next/server/app/(bridge)/bridge/fleet/page/server-reference-manifest.json +3 -3
  35. package/web/.next/server/app/(bridge)/bridge/fleet/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(bridge)/bridge/fleet/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/(bridge)/bridge/page/server-reference-manifest.json +9 -9
  38. package/web/.next/server/app/(bridge)/bridge/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(bridge)/bridge/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(bridge)/bridge/settings/page/server-reference-manifest.json +3 -3
  41. package/web/.next/server/app/(bridge)/bridge/settings/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(bridge)/bridge/settings/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page/server-reference-manifest.json +4 -4
  44. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page.js.nft.json +1 -1
  45. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/(bridge)/bridge/settings/routing/page/server-reference-manifest.json +7 -7
  47. package/web/.next/server/app/(bridge)/bridge/settings/routing/page.js.nft.json +1 -1
  48. package/web/.next/server/app/(bridge)/bridge/settings/routing/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/(bridge)/bridge/stay-aware/page/server-reference-manifest.json +9 -9
  50. package/web/.next/server/app/(bridge)/bridge/stay-aware/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(bridge)/bridge/stay-aware/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page/server-reference-manifest.json +19 -19
  53. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(bridge)/outside-parties/[name]/page/server-reference-manifest.json +10 -10
  56. package/web/.next/server/app/(bridge)/outside-parties/[name]/page.js.nft.json +1 -1
  57. package/web/.next/server/app/(bridge)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
  58. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page/server-reference-manifest.json +19 -19
  59. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page.js.nft.json +1 -1
  60. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(bridge)/outside-parties/add/page/server-reference-manifest.json +12 -12
  62. package/web/.next/server/app/(bridge)/outside-parties/add/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(bridge)/outside-parties/add/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +4 -4
  65. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page/server-reference-manifest.json +4 -4
  68. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/(bridge)/outside-parties/page/server-reference-manifest.json +4 -4
  71. package/web/.next/server/app/(bridge)/outside-parties/page.js.nft.json +1 -1
  72. package/web/.next/server/app/(bridge)/outside-parties/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
  74. package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
  75. package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
  77. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +8 -8
  80. package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
  81. package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
  83. package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
  84. package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/(console)/slack/disconnect/page/server-reference-manifest.json +11 -11
  86. package/web/.next/server/app/(console)/slack/disconnect/page.js.nft.json +1 -1
  87. package/web/.next/server/app/(console)/slack/disconnect/page_client-reference-manifest.js +1 -1
  88. package/web/.next/server/app/(console)/slack/expose/page/server-reference-manifest.json +11 -11
  89. package/web/.next/server/app/(console)/slack/expose/page.js.nft.json +1 -1
  90. package/web/.next/server/app/(console)/slack/expose/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/(console)/slack/page/server-reference-manifest.json +11 -11
  92. package/web/.next/server/app/(console)/slack/page.js.nft.json +1 -1
  93. package/web/.next/server/app/(console)/slack/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/(console)/slack/remove/page/server-reference-manifest.json +11 -11
  95. package/web/.next/server/app/(console)/slack/remove/page.js.nft.json +1 -1
  96. package/web/.next/server/app/(console)/slack/remove/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/_global-error.html +1 -1
  98. package/web/.next/server/app/_global-error.rsc +1 -1
  99. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  100. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  101. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  102. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  103. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  104. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  105. package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
  106. package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
  107. package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
  109. package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
  110. package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
  111. package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
  112. package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
  113. package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
  114. package/web/.next/server/chunks/ssr/01fr_app_(bridge)_bridge_settings_requests_[requestId]_page_actions_0o8g7_xshtmem.js +1 -1
  115. package/web/.next/server/chunks/ssr/01fr_app_(bridge)_bridge_settings_requests_[requestId]_page_actions_0o8g7_xshtmem.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_settings_page_actions_0_te6h-2xxp7l.js +1 -1
  117. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_settings_page_actions_0_te6h-2xxp7l.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_stay-aware_page_actions_1u0xo0v3y9c34.js +1 -1
  119. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_stay-aware_page_actions_1u0xo0v3y9c34.js.map +1 -1
  120. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_bridge_settings_routing_page_actions_06_j7s24dy5ee.js +1 -1
  121. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_bridge_settings_routing_page_actions_06_j7s24dy5ee.js.map +1 -1
  122. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_change_page_actions_1is-kjq5bubl4.js +1 -1
  123. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_change_page_actions_1is-kjq5bubl4.js.map +1 -1
  124. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_page_actions_1mctxtlzsa7xi.js +1 -1
  125. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_page_actions_1mctxtlzsa7xi.js.map +1 -1
  126. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_retire_page_actions_0xh6ok1un7s9k.js +1 -1
  127. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_retire_page_actions_0xh6ok1un7s9k.js.map +1 -1
  128. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add-a2a-agent_page_actions_1w1q5eavo_loo.js +1 -1
  129. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add-a2a-agent_page_actions_1w1q5eavo_loo.js.map +1 -1
  130. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add_page_actions_0urcbg_r0lo7j.js +1 -1
  131. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add_page_actions_0urcbg_r0lo7j.js.map +1 -1
  132. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ipo8r1s1ntds._.js +1 -1
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n9oaiyov05ns._.js +1 -1
  134. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n9oaiyov05ns._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ovcg5tg3nh49._.js +1 -1
  136. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ovcg5tg3nh49._.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ro-majrw7piv._.js +1 -1
  138. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ro-majrw7piv._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ulpe7l4c8o3v._.js +1 -1
  140. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ulpe7l4c8o3v._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__0xurmpdv5uqfl._.js +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__0zz6fx0keti4r._.js +1 -1
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__0zz6fx0keti4r._.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__19p4g16n2nh0b._.js +1 -1
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__19p4g16n2nh0b._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__1ncn4wx-1i09m._.js +1 -1
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__1ncn4wx-1i09m._.js.map +1 -1
  150. package/web/.next/server/chunks/ssr/[root-of-the-server]__1vaoz_d15csmy._.js +1 -1
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__1vaoz_d15csmy._.js.map +1 -1
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__1xzg4_wllzynw._.js +1 -1
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__1xzg4_wllzynw._.js.map +1 -1
  154. package/web/.next/server/chunks/ssr/{_067ku63fy5cvr._.js → _0-9rlwz3ujd0r._.js} +2 -2
  155. package/web/.next/server/chunks/ssr/{_0p9agk_zk_t2w._.js.map → _0-9rlwz3ujd0r._.js.map} +1 -1
  156. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
  157. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/_0_nfv33ug5g31._.js +1 -1
  159. package/web/.next/server/chunks/ssr/_0_nfv33ug5g31._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
  161. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
  163. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
  165. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/{_0p9agk_zk_t2w._.js → _15yv_08kq3cgn._.js} +2 -2
  167. package/web/.next/server/chunks/ssr/{_067ku63fy5cvr._.js.map → _15yv_08kq3cgn._.js.map} +1 -1
  168. package/web/.next/server/chunks/ssr/{_0amcq922zroon._.js → _1ag569itedbet._.js} +2 -2
  169. package/web/.next/server/chunks/ssr/{_0w9zexwc8g87x._.js.map → _1ag569itedbet._.js.map} +1 -1
  170. package/web/.next/server/chunks/ssr/_1cs_0d0h7mhw0._.js +1 -1
  171. package/web/.next/server/chunks/ssr/_1cs_0d0h7mhw0._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/{_0w9zexwc8g87x._.js → _1m4bmxzmjr-8s._.js} +2 -2
  173. package/web/.next/server/chunks/ssr/{_0amcq922zroon._.js.map → _1m4bmxzmjr-8s._.js.map} +1 -1
  174. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
  175. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
  176. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
  177. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
  178. package/web/.next/server/chunks/ssr/_1x3tv4gu7i2sy._.js +57 -0
  179. package/web/.next/server/chunks/ssr/_1x3tv4gu7i2sy._.js.map +1 -0
  180. package/web/.next/server/chunks/ssr/_1zcbk6s3j_jfy._.js +57 -0
  181. package/web/.next/server/chunks/ssr/_1zcbk6s3j_jfy._.js.map +1 -0
  182. package/web/.next/server/chunks/ssr/web_0a9n7acgjrk5c._.js +1 -1
  183. package/web/.next/server/chunks/ssr/web_0a9n7acgjrk5c._.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/web_1vvrekkq5mirt._.js +1 -1
  185. package/web/.next/server/chunks/ssr/web_1vvrekkq5mirt._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_basket_page_actions_0g7q_rc5nma1e.js +1 -1
  187. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_basket_page_actions_0g7q_rc5nma1e.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_done_page_actions_0kjm34arntdzv.js +1 -1
  189. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_done_page_actions_0kjm34arntdzv.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_fleet_page_actions_19wmo6phgvqfk.js +1 -1
  191. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_fleet_page_actions_19wmo6phgvqfk.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_page_actions_1ok64rg3edm_u.js +1 -1
  193. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_page_actions_1ok64rg3edm_u.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/{web_features_1d-wq10_n8ex0._.js → web_features_16z82ve7t15n5._.js} +2 -2
  195. package/web/.next/server/chunks/ssr/{web_features_1d-wq10_n8ex0._.js.map → web_features_16z82ve7t15n5._.js.map} +1 -1
  196. package/web/.next/server/chunks/ssr/web_features_1e7_lwq7351pm._.js +3 -0
  197. package/web/.next/server/chunks/ssr/web_features_1e7_lwq7351pm._.js.map +1 -0
  198. package/web/.next/server/chunks/ssr/web_features_1fzx-ctm4ru39._.js +3 -0
  199. package/web/.next/server/chunks/ssr/web_features_1fzx-ctm4ru39._.js.map +1 -0
  200. package/web/.next/server/chunks/ssr/{web_features_1t4lu06v7y3i8._.js → web_features_1wo7gr7bxvsi-._.js} +2 -2
  201. package/web/.next/server/chunks/ssr/{web_features_1t4lu06v7y3i8._.js.map → web_features_1wo7gr7bxvsi-._.js.map} +1 -1
  202. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
  203. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
  205. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
  206. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
  207. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
  208. package/web/.next/server/chunks/ssr/{web_features_bridge_125bfazmc4opj._.js → web_features_bridge_0qdb9pmm6338t._.js} +2 -2
  209. package/web/.next/server/chunks/ssr/{web_features_bridge_125bfazmc4opj._.js.map → web_features_bridge_0qdb9pmm6338t._.js.map} +1 -1
  210. package/web/.next/server/chunks/ssr/web_features_bridge_hooks_bridge-actions_ts_0h-_xm2rcb-ij._.js +1 -1
  211. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js +1 -1
  212. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js +1 -1
  214. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js.map +1 -1
  215. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js +1 -1
  216. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
  218. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
  219. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
  220. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
  221. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
  222. package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
  223. package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js +1 -1
  224. package/web/.next/server/middleware-build-manifest.js +3 -3
  225. package/web/.next/server/pages/500.html +1 -1
  226. package/web/.next/server/preview-props.json +3 -3
  227. package/web/.next/server/server-reference-manifest.js +1 -1
  228. package/web/.next/server/server-reference-manifest.json +52 -52
  229. package/web/.next/static/chunks/{1k_0f6ohdds08.js → 07km754q38z4c.js} +1 -1
  230. package/web/.next/static/chunks/{0vk3ns89lm5lx.js → 0ev65_p1z_ll0.js} +1 -1
  231. package/web/.next/static/chunks/{065sdkxibhue_.js → 17akrnci0j_nn.js} +1 -1
  232. package/web/.next/static/chunks/{031q7t7ho1l3f.js → 1_f6w3i1t1svg.js} +1 -1
  233. package/web/.next/static/chunks/{05z1sfsxiycwu.js → 1e5_kej4hnnf_.js} +1 -1
  234. package/web/.next/static/chunks/{1i-1b5d6sk_k2.js → 1edk_zyv9lbyy.js} +1 -1
  235. package/web/.next/static/chunks/{08swfedutkq-h.js → 1lq70vpqz6u1c.js} +1 -1
  236. package/web/.next/static/chunks/1uw3g2r3xlxci.js +1 -0
  237. package/web/.next/static/chunks/{04-n1o8q7gzm7.js → 1zqkns-nn-wz0.js} +1 -1
  238. package/web/.next/static/chunks/{0wbsan4j92uen.js → 2490rbe6dmnwe.js} +1 -1
  239. package/web/.next/static/chunks/{0a-m82cyt3poo.js → 27tnlhw9cxgul.js} +1 -1
  240. package/web/.next/static/chunks/{3sh-qd-9_kuhx.js → 2_ayfyj3csc8m.js} +1 -1
  241. package/web/.next/static/chunks/{3noelndd-mym9.js → 2v-0k1odkn9cu.js} +1 -1
  242. package/web/.next/static/chunks/2v4z6cjtqu95k.js +1 -0
  243. package/web/.next/static/chunks/{1rowdcnwlync0.js → 3ban8s8z3ah0y.js} +1 -1
  244. package/web/.next/static/chunks/{318xblsv_bj3w.js → 3ik7w8wf5u23q.js} +1 -1
  245. package/web/.next/trace +1 -1
  246. package/web/.next/trace-build +1 -1
  247. package/web/.next/server/chunks/ssr/_15fbhl5d8_z_x._.js +0 -57
  248. package/web/.next/server/chunks/ssr/_15fbhl5d8_z_x._.js.map +0 -1
  249. package/web/.next/server/chunks/ssr/_1rw8_q3zywmrm._.js +0 -57
  250. package/web/.next/server/chunks/ssr/_1rw8_q3zywmrm._.js.map +0 -1
  251. package/web/.next/server/chunks/ssr/web_features_0aw-c2l0y5v0n._.js +0 -3
  252. package/web/.next/server/chunks/ssr/web_features_0aw-c2l0y5v0n._.js.map +0 -1
  253. package/web/.next/server/chunks/ssr/web_features_0pg79seak4cnb._.js +0 -3
  254. package/web/.next/server/chunks/ssr/web_features_0pg79seak4cnb._.js.map +0 -1
  255. package/web/.next/static/chunks/04vjjcln7-au4.js +0 -1
  256. package/web/.next/static/chunks/43uxu94e3-gvj.js +0 -1
  257. /package/web/.next/static/{HzOMe97w-YsgkVELi3P_f → yJHYTb3NO7GRc3o3RS0f0}/_buildManifest.js +0 -0
  258. /package/web/.next/static/{HzOMe97w-YsgkVELi3P_f → yJHYTb3NO7GRc3o3RS0f0}/_clientMiddlewareManifest.js +0 -0
  259. /package/web/.next/static/{HzOMe97w-YsgkVELi3P_f → yJHYTb3NO7GRc3o3RS0f0}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70812,71136,96315,28623,e=>{var a=e.i(56420);let i={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};i.node;let t=(0,a.f)(i);e.s(["f",0,t],70812);let n={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};n.node;let s=(0,a.f)(n);e.s(["f",0,s],71136);let r={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};r.node;let o=(0,a.f)(r);e.s(["f",0,o],96315);let l={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};l.node;let d=(0,a.f)(l);e.s(["f",0,d],28623)},51481,e=>{var a=e.i(75043);e.s(["f",()=>a.f])},59381,e=>{var a=e.i(56420);let i={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};i.node;let t=(0,a.f)(i);e.s(["f",0,t],59381)},32365,31714,e=>{var a=e.i(95187);let i=(0,a.createServerReference)("408b4c59cb4fe158a22a01bf20600ae1a6bc4e5355",a.callServer,void 0,a.findSourceMapURL,"turnRoute");e.s(["f",0,i],32365);var t=e.i(70812),n=e.i(51481),s=e.i(59381),r=e.i(71136),o=e.i(96315),l=e.i(56420);let d={name:"message-circle-question-mark",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["message-circle-question"]};d.node;let c=(0,l.f)(d);var u=e.i(49287),m=e.i(28623);let h={decide:{Icon:n.f,tone:"text-tone-active-fg"},do:{Icon:s.f,tone:"text-tone-waiting-fg"},"stay-aware":{Icon:t.f,tone:"text-muted-foreground"},"everything-else":{Icon:c,tone:"text-muted-foreground"}},p=u.f,g={slack:r.f,chat:m.f,"web-push":t.f,email:o.f};e.s(["x",0,p,"c",0,h,"U",0,g],31714)},31785,e=>{let a={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},i={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},t=["decide","do"],n="Bridge keeps every item.",s={label:"Not offered",isOk:!1},r={label:"Off",isOk:!1},o="Says only that something waits, with a link here.",l=`${o} Nothing is on until you turn it on.`,d="through the gateway. Lists what waits when you ask it.",c={slack:"Slack",chat:"a chat","web-push":"web push",email:"email"};e.s(["I",0,a,"k",0,i,"N",0,["slack","chat","web-push","email"],"g",0,function(e){return 0===e.length?{state:{label:"Not connected",isOk:!1},description:`claude.ai or another MCP client, ${d}`,action:"none"}:{state:{label:"Connected",isOk:!0},description:`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)}, ${d}`,action:"none"}},"t",0,function({isOffered:e,isOnForAnyJob:a}){return e?a?{state:{label:"On",isOk:!0},description:o,action:"turnOff"}:{state:r,description:l,action:"turnOn"}:{state:s,description:"This gateway sends no email.",action:"none"}},"T",0,function(e,a){return e.jobs.filter(({job:e,places:i})=>i.email!==a&&(!a||t.includes(e))).map(({job:e})=>({job:e,place:"email",isOn:a}))},"r",0,function(e){let a=["Bridge",...e.map(e=>c[e])],i=a.at(-1),t=1===a.length?"Bridge":`${a.slice(0,-1).join(", ")} and ${String(i)}`;return`Shows in ${t}, as Where things show sets for Decide. One answer, wherever you give it.`},"H",0,function(e){if(null===e)return{state:{label:"Not connected",isOk:!1},description:"This fleet has no Slack workspace.",action:"none"};let{workspaceName:a,link:i}=e;return null===i?{state:{label:"Not linked",isOk:!1},description:`Link your Slack account in ${a} to see items there and answer them.`,action:"link"}:{state:{label:"Linked",isOk:!0},description:`As @${i.slackName} in ${a}. A button press or a thread reply there is yours.`,action:"unlink"}},"b",0,function(e){let{job:t,place:s,isOn:r,waiting:o,isChatOn:l}=e,{name:d,item:c,items:u}=a[t],m=`${i[s]} is ${r?"on":"off"} for ${d}`;return r?"chat"===s?{title:m,detail:`A chat lists every ${c} not done when you ask it.`}:{title:m,detail:`${i[s]} shows ${u} that arrive from now on.${void 0===o||0===o?"":` The ${String(o)} already waiting ${1===o?"stays":"stay"} ${l?"in Bridge and in a chat":"in Bridge"}.`}`}:{title:m,detail:"everything-else"===t&&"slack"===s?`Bots only: a bot ship's messages and replies to Slack still show there. ${n}`:n}},"B",0,function(e){if(!e.isOffered)return{state:s,description:"This gateway sends no web push.",action:"none"};if(!e.isTaken)return{state:r,description:"This browser takes no web push.",action:"none"};let a=e.browsers.find(({endpoint:a,isGone:i})=>a===e.ownEndpoint&&!i);return void 0===a?{state:r,description:l,action:"turnOn"}:{state:{label:"This browser",isOk:!0},description:`${a.browser}. ${o}`,action:"remove"}}])},41398,e=>{var a=e.i(43476),i=e.i(71645),t=e.i(32365),n=e.i(95187);let s=(0,n.createServerReference)("40f17c6ae0a111459e8b5e04e88f3fb6b7dd69b1c0",n.callServer,void 0,n.findSourceMapURL,"unlinkSlack"),r=[[/Edg\//,"Edge"],[/Firefox\//,"Firefox"],[/Chrome\//,"Chrome"],[/Safari\//,"Safari"]],o=[[/iPhone|iPad/,"iOS"],[/Android/,"Android"],[/Mac OS X/,"macOS"],[/Windows/,"Windows"],[/Linux/,"Linux"]],l=(e,a)=>a.find(([a])=>a.test(e))?.[1],d=(0,n.createServerReference)("60d36d24575964a3c7b81d0981c1e3a609d949cf37",n.callServer,void 0,n.findSourceMapURL,"turnOffWebPush"),c=(0,n.createServerReference)("60ef65e1ea023ddc1d1da1e86405c1a2ae17d442d7",n.callServer,void 0,n.findSourceMapURL,"turnOnWebPush"),u="/wake-worker.js";async function m(){let e=await navigator.serviceWorker.getRegistration(u);return await e?.pushManager.getSubscription()??null}async function h(e){let a;if(await Notification.requestPermission()!=="granted")return{isOk:!1,message:"Your browser did not allow notifications from this site: allow them, then turn web push on again"};let i=await navigator.serviceWorker.register(u);return await navigator.serviceWorker.ready,{isOk:!0,value:await i.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:(a=atob(e.replaceAll("-","+").replaceAll("_","/")),Uint8Array.from(a,e=>e.charCodeAt(0)))})}}var p=e.i(31785),g=e.i(55070),f=e.i(63132),b=e.i(85595),x=e.i(56420);let k={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};k.node;let y=(0,x.f)(k);function v({place:e,name:i,Icon:t,card:n,children:s}){let r=n.state.isOk?b.f:y;return(0,a.jsxs)("div",{"data-testid":`bridge-place-${e}`,className:"flex flex-col gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,a.jsx)(t,{"aria-hidden":!0,className:"size-4 shrink-0"}),i,(0,a.jsxs)("span",{"data-testid":`bridge-place-${e}-state`,className:`ml-auto inline-flex items-center gap-1 text-caption font-medium ${n.state.isOk?"text-tone-ok-fg":"text-muted-foreground"}`,children:[(0,a.jsx)(r,{"aria-hidden":!0,className:"size-3.5"}),n.state.label]})]}),(0,a.jsx)("span",{className:"text-caption text-muted-foreground",children:n.description}),void 0===s?null:(0,a.jsx)("span",{className:"mt-auto flex flex-col items-start gap-1.5",children:s})]})}var w=e.i(31714);function j({fleetId:e,slackLink:t}){let[n,r]=(0,i.useTransition)(),[o,l]=(0,i.useState)(),d=(0,p.H)(t);return(0,a.jsxs)(v,{place:"slack",name:p.k.slack,Icon:w.U.slack,card:d,children:["link"===d.action?(0,a.jsx)("a",{href:`/slack/link?${new URLSearchParams({fleet:e}).toString()}`,"data-testid":"bridge-slack-link",className:"inline-flex h-7 items-center rounded-md bg-primary px-2.5 text-caption font-medium text-primary-foreground hover:bg-primary-hover",children:"Link Slack"}):null,"unlink"===d.action?(0,a.jsx)(g.i,{size:"xs","data-testid":"bridge-slack-unlink",isPending:n,pendingLabel:"Unlinking...",onClick:()=>{l(void 0),r(async()=>{let a=await s(e);a.isOk||l(a.message)})},children:"Unlink"}):null,void 0===o?null:(0,a.jsx)(f.f,{message:o,isFailure:!0})]})}function N({fleetId:e,webPush:t}){let n=t?.browsers??[],{isTaken:s,ownEndpoint:u,working:b,failure:x,turnOn:k,remove:y}=function({fleetId:e,webPushKey:a}){let[t,n]=(0,i.useState)(!0),[s,u]=(0,i.useState)(),[p,g]=(0,i.useState)(),[f,b]=(0,i.useState)(),[,x]=(0,i.useTransition)();return(0,i.useEffect)(()=>{"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window?m().then(e=>{u(e?.endpoint)}):n(!1)},[]),{isTaken:t,ownEndpoint:s,working:p,failure:f,turnOn:()=>{null!==a&&(g("on"),b(void 0),x(async()=>{try{var i;let t,n,s=await h(a);if(!s.isOk)return void b(s.message);let d=function(e,a){let{endpoint:i,keys:t}=e,n=t?.p256dh,s=t?.auth;return void 0===i||void 0===n||void 0===s?void 0:{endpoint:i,keys:{p256dh:n,auth:s},browser:a}}(s.value.toJSON(),(i=navigator.userAgent,t=l(i,r),n=l(i,o),void 0===t?"A browser":void 0===n?t:`${t} on ${n}`));if(void 0===d)return void b("Your browser gave no push subscription: try again");let m=await c(e,d);m.isOk?u(d.endpoint):b(m.message)}catch{b("Your browser could not turn web push on: try again")}finally{g(void 0)}}))},remove:a=>{g(a),b(void 0),x(async()=>{a===s&&(await (await m())?.unsubscribe(),u(void 0));let i=await d(e,a);g(void 0),i.isOk||b(i.message)})}}}({fleetId:e,webPushKey:t?.publicKey??null}),j=(0,p.B)({isOffered:void 0!==t&&null!==t.publicKey,isTaken:s,ownEndpoint:u,browsers:n}),O=n.filter(({endpoint:e})=>"remove"!==j.action||e!==u);return(0,a.jsxs)(v,{place:"web-push",name:p.k["web-push"],Icon:w.U["web-push"],card:j,children:["remove"===j.action&&void 0!==u?(0,a.jsx)(g.i,{size:"xs","data-testid":"bridge-web-push-remove",isPending:b===u,pendingLabel:"Removing...",disabled:void 0!==b,onClick:()=>{y(u)},children:"Remove"}):null,"turnOn"===j.action?(0,a.jsx)(g.i,{size:"xs","data-testid":"bridge-web-push-on",isPending:"on"===b,pendingLabel:"Turning on...",disabled:void 0!==b,onClick:k,children:"Turn on"}):null,O.map(({endpoint:e,browser:i,isGone:t})=>(0,a.jsxs)("span",{"data-testid":"bridge-web-push-browser",className:"flex w-full items-center gap-2 text-caption text-muted-foreground",children:[(0,a.jsx)("span",{className:"min-w-0 flex-1",children:t?`${i}: no longer takes wakes`:`Also on in ${i}`}),(0,a.jsx)("button",{type:"button","data-testid":"bridge-web-push-remove-other",disabled:void 0!==b,onClick:()=>{y(e)},className:"underline hover:text-foreground disabled:opacity-50",children:b===e?"Removing...":"Remove"})]},e)),void 0===x?null:(0,a.jsx)(f.f,{message:x,isFailure:!0})]})}function O({fleetId:e,routing:n}){let[s,r]=(0,i.useTransition)(),[o,l]=(0,i.useState)(),d=(0,p.t)({isOffered:n.offered.email,isOnForAnyJob:n.jobs.some(({places:e})=>e.email)});return(0,a.jsxs)(v,{place:"email",name:p.k.email,Icon:w.U.email,card:d,children:["turnOn"===d.action||"turnOff"===d.action?(0,a.jsx)(g.i,{size:"xs","data-testid":"bridge-email-turn",isPending:s,pendingLabel:"turnOn"===d.action?"Turning on...":"Turning off...",onClick:()=>{var a;a="turnOn"===d.action,l(void 0),r(async()=>{for(let i of(0,p.T)(n,a)){let a=await (0,t.f)({fleet:e,...i});if(!a.isOk)return void l(a.message)}})},children:"turnOn"===d.action?"Turn on":"Turn off"}):null,void 0===o?null:(0,a.jsx)(f.f,{message:o,isFailure:!0})]})}e.s(["PlacesPanel",0,function({fleetId:e,routing:i,slackLink:t,chats:n,webPush:s}){return(0,a.jsxs)("section",{"aria-label":"The places",className:"grid gap-2.5 sm:grid-cols-2 lg:grid-cols-4",children:[(0,a.jsx)(j,{fleetId:e,slackLink:t}),(0,a.jsx)(v,{place:"chat",name:p.k.chat,Icon:w.U.chat,card:(0,p.g)(n)}),(0,a.jsx)(N,{fleetId:e,webPush:s}),(0,a.jsx)(O,{fleetId:e,routing:i})]})}],41398)},85678,e=>{var a=e.i(43476),i=e.i(85595),t=e.i(71645),n=e.i(32365),s=e.i(31785),r=e.i(63132),o=e.i(31714);function l({isOn:e,label:i,isDisabled:t,isBusy:n=!1,aside:s,testId:r,onTurn:o}){return(0,a.jsxs)("span",{className:"inline-flex items-center gap-2.5",children:[(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":i,"aria-busy":n,disabled:t,"data-testid":r,onClick:o,className:"group inline-flex h-4 w-7 shrink-0 items-center rounded-full bg-input p-0.5 aria-checked:bg-primary disabled:cursor-not-allowed disabled:opacity-50",children:(0,a.jsx)("span",{"aria-hidden":!0,className:"size-3 rounded-full bg-card shadow-sm transition-transform group-aria-checked:translate-x-3"})}),void 0===s?null:(0,a.jsx)("span",{className:"text-caption text-muted-foreground",children:s})]})}let d="sm:grid sm:grid-cols-[1.6fr_repeat(5,1fr)] sm:items-center sm:gap-3";function c({toast:e}){return(0,a.jsxs)("div",{role:"status","data-testid":"bridge-routing-toast",className:"flex max-w-[720px] gap-3 rounded-lg border border-border bg-popover py-3.5 pr-3.5 pl-4 text-popover-foreground shadow-lg",children:[(0,a.jsx)(i.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0 text-tone-ok-fg"}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("span",{className:"font-medium",children:e.title}),(0,a.jsx)("span",{className:"text-caption text-muted-foreground",children:e.detail})]})]})}function u({name:e,children:i}){return(0,a.jsxs)("span",{className:"flex items-center justify-between sm:block",children:[(0,a.jsx)("span",{className:"sm:hidden",children:e}),i]})}e.s(["RoutingPanel",0,function({fleetId:e,routing:i,isSlackLinked:m,waitingByJob:h}){let[p,g]=(0,t.useTransition)(),[f,b]=(0,t.useState)(),[x,k]=(0,t.useState)(),[y,v]=(0,t.useState)();return(0,a.jsxs)("section",{className:"grid gap-3","aria-label":"Per job",children:[(0,a.jsxs)("div",{className:"grid gap-3 sm:gap-0 sm:overflow-hidden sm:rounded-lg sm:border sm:border-border sm:bg-card",children:[(0,a.jsxs)("div",{"aria-hidden":!0,className:`hidden min-h-8 bg-muted px-4 text-caption font-medium text-muted-foreground ${d}`,children:[(0,a.jsx)("span",{children:"Job"}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(o.x,{className:"size-3.5"}),"Bridge"]}),s.N.map(e=>{let i=o.U[e];return(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(i,{className:"size-3.5"}),s.k[e]]},e)})]}),i.jobs.map(({job:t,places:r})=>{let{Icon:c,tone:x}=o.c[t];return(0,a.jsxs)("div",{"data-testid":"bridge-routing-job",className:`flex flex-col gap-2 rounded-lg border border-border bg-card p-3 sm:min-h-[52px] sm:rounded-none sm:border-0 sm:border-t sm:px-4 sm:py-1.5 ${d}`,children:[(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-semibold sm:font-medium",children:[(0,a.jsx)(c,{"aria-hidden":!0,className:`size-4 shrink-0 ${x}`}),s.I[t].name]}),(0,a.jsx)("span",{className:"text-caption text-muted-foreground max-sm:hidden",children:s.I[t].holds})]}),(0,a.jsx)(u,{name:"Bridge",children:(0,a.jsx)(l,{isOn:!0,label:`Bridge for ${s.I[t].name}`,isDisabled:!0,aside:"Always",testId:`bridge-routing-${t}-bridge`})}),s.N.map(o=>{let d=r[o],c=`${t}-${o}`;return(0,a.jsx)(u,{name:s.k[o],children:(0,a.jsx)(l,{isOn:d,label:`${s.k[o]} for ${s.I[t].name}`,isDisabled:p||!d&&(!i.offered[o]||"slack"===o&&!m),isBusy:p&&f===c,..."everything-else"===t&&"slack"===o&&!d?{aside:"Bots only"}:{},testId:`bridge-routing-${c}`,onTurn:()=>{var a;a={job:t,place:o,isOn:!d,isChatOn:r.chat},k(void 0),v(void 0),b(`${a.job}-${a.place}`),g(async()=>{let{isChatOn:i,...t}=a,r=await (0,n.f)({fleet:e,...t});r.isOk?k((0,s.b)({...t,waiting:h[t.job],isChatOn:i})):v(r.message)})}})},o)})]},t)})]}),void 0===x?null:(0,a.jsx)(c,{toast:x}),void 0===y?null:(0,a.jsx)(r.f,{message:y,isFailure:!0}),(0,a.jsx)("p",{className:"text-caption text-muted-foreground max-sm:hidden",children:"While a Bridge page is open in focus, web push and email do not wake you. Slack still posts: you turned it on, and the views stay in step."})]})}],85678)},55070,e=>{var a=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},t={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:n,variant:s="secondary",size:r="regular",children:o,className:l="",disabled:d,...c}){return(0,a.jsx)("button",{...c,disabled:!0===d||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${t[r]} ${i[s]} ${l}`,children:e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),n]}):o})},"o",0,t])},63132,e=>{var a=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,a.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,a.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70812,71136,96315,28623,e=>{var a=e.i(56420);let i={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};i.node;let t=(0,a.f)(i);e.s(["f",0,t],70812);let n={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};n.node;let s=(0,a.f)(n);e.s(["f",0,s],71136);let r={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};r.node;let o=(0,a.f)(r);e.s(["f",0,o],96315);let l={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};l.node;let d=(0,a.f)(l);e.s(["f",0,d],28623)},51481,e=>{var a=e.i(75043);e.s(["f",()=>a.f])},59381,e=>{var a=e.i(56420);let i={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};i.node;let t=(0,a.f)(i);e.s(["f",0,t],59381)},12301,31714,e=>{var a=e.i(95187);let i=(0,a.createServerReference)("40318522285b0c5adeeccc205ccacf9b4c8018eee9",a.callServer,void 0,a.findSourceMapURL,"turnRoute");e.s(["f",0,i],12301);var t=e.i(70812),n=e.i(51481),s=e.i(59381),r=e.i(71136),o=e.i(96315),l=e.i(56420);let d={name:"message-circle-question-mark",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["message-circle-question"]};d.node;let c=(0,l.f)(d);var u=e.i(49287),m=e.i(28623);let h={decide:{Icon:n.f,tone:"text-tone-active-fg"},do:{Icon:s.f,tone:"text-tone-waiting-fg"},"stay-aware":{Icon:t.f,tone:"text-muted-foreground"},"everything-else":{Icon:c,tone:"text-muted-foreground"}},p=u.f,f={slack:r.f,chat:m.f,"web-push":t.f,email:o.f};e.s(["x",0,p,"c",0,h,"U",0,f],31714)},31785,e=>{let a={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},i={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},t=["decide","do"],n="Bridge keeps every item.",s={label:"Not offered",isOk:!1},r={label:"Off",isOk:!1},o="Says only that something waits, with a link here.",l=`${o} Nothing is on until you turn it on.`,d="through the gateway. Lists what waits when you ask it.",c={slack:"Slack",chat:"a chat","web-push":"web push",email:"email"};e.s(["I",0,a,"k",0,i,"N",0,["slack","chat","web-push","email"],"g",0,function(e){return 0===e.length?{state:{label:"Not connected",isOk:!1},description:`claude.ai or another MCP client, ${d}`,action:"none"}:{state:{label:"Connected",isOk:!0},description:`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)}, ${d}`,action:"none"}},"t",0,function({isOffered:e,isOnForAnyJob:a}){return e?a?{state:{label:"On",isOk:!0},description:o,action:"turnOff"}:{state:r,description:l,action:"turnOn"}:{state:s,description:"This gateway sends no email.",action:"none"}},"T",0,function(e,a){return e.jobs.filter(({job:e,places:i})=>i.email!==a&&(!a||t.includes(e))).map(({job:e})=>({job:e,place:"email",isOn:a}))},"r",0,function(e){let a=["Bridge",...e.map(e=>c[e])],i=a.at(-1),t=1===a.length?"Bridge":`${a.slice(0,-1).join(", ")} and ${String(i)}`;return`Shows in ${t}, as Where things show sets for Decide. One answer, wherever you give it.`},"H",0,function(e){if(null===e)return{state:{label:"Not connected",isOk:!1},description:"This fleet has no Slack workspace.",action:"none"};let{workspaceName:a,link:i}=e;return null===i?{state:{label:"Not linked",isOk:!1},description:`Link your Slack account in ${a} to see items there and answer them.`,action:"link"}:{state:{label:"Linked",isOk:!0},description:`As @${i.slackName} in ${a}. A button press or a thread reply there is yours.`,action:"unlink"}},"b",0,function(e){let{job:t,place:s,isOn:r,waiting:o,isChatOn:l}=e,{name:d,item:c,items:u}=a[t],m=`${i[s]} is ${r?"on":"off"} for ${d}`;return r?"chat"===s?{title:m,detail:`A chat lists every ${c} not done when you ask it.`}:{title:m,detail:`${i[s]} shows ${u} that arrive from now on.${void 0===o||0===o?"":` The ${String(o)} already waiting ${1===o?"stays":"stay"} ${l?"in Bridge and in a chat":"in Bridge"}.`}`}:{title:m,detail:"everything-else"===t&&"slack"===s?`Bots only: a bot ship's messages and replies to Slack still show there. ${n}`:n}},"B",0,function(e){if(!e.isOffered)return{state:s,description:"This gateway sends no web push.",action:"none"};if(!e.isTaken)return{state:r,description:"This browser takes no web push.",action:"none"};let a=e.browsers.find(({endpoint:a,isGone:i})=>a===e.ownEndpoint&&!i);return void 0===a?{state:r,description:l,action:"turnOn"}:{state:{label:"This browser",isOk:!0},description:`${a.browser}. ${o}`,action:"remove"}}])},41398,e=>{var a=e.i(43476),i=e.i(71645),t=e.i(12301),n=e.i(95187);let s=(0,n.createServerReference)("40ef462b81ba2c517a0637f83b8b4e8d20efc89ecb",n.callServer,void 0,n.findSourceMapURL,"unlinkSlack"),r=[[/Edg\//,"Edge"],[/Firefox\//,"Firefox"],[/Chrome\//,"Chrome"],[/Safari\//,"Safari"]],o=[[/iPhone|iPad/,"iOS"],[/Android/,"Android"],[/Mac OS X/,"macOS"],[/Windows/,"Windows"],[/Linux/,"Linux"]],l=(e,a)=>a.find(([a])=>a.test(e))?.[1],d=(0,n.createServerReference)("605802c1143eee8fecb2dbef71cd9ed55020165469",n.callServer,void 0,n.findSourceMapURL,"turnOffWebPush"),c=(0,n.createServerReference)("6031bc8e16debd871e23c55c1f147e258938816f85",n.callServer,void 0,n.findSourceMapURL,"turnOnWebPush"),u="/wake-worker.js";async function m(){let e=await navigator.serviceWorker.getRegistration(u);return await e?.pushManager.getSubscription()??null}async function h(e){let a;if(await Notification.requestPermission()!=="granted")return{isOk:!1,message:"Your browser did not allow notifications from this site: allow them, then turn web push on again"};let i=await navigator.serviceWorker.register(u);return await navigator.serviceWorker.ready,{isOk:!0,value:await i.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:(a=atob(e.replaceAll("-","+").replaceAll("_","/")),Uint8Array.from(a,e=>e.charCodeAt(0)))})}}var p=e.i(31785),f=e.i(55070),g=e.i(63132),b=e.i(85595),x=e.i(56420);let k={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};k.node;let y=(0,x.f)(k);function v({place:e,name:i,Icon:t,card:n,children:s}){let r=n.state.isOk?b.f:y;return(0,a.jsxs)("div",{"data-testid":`bridge-place-${e}`,className:"flex flex-col gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,a.jsx)(t,{"aria-hidden":!0,className:"size-4 shrink-0"}),i,(0,a.jsxs)("span",{"data-testid":`bridge-place-${e}-state`,className:`ml-auto inline-flex items-center gap-1 text-caption font-medium ${n.state.isOk?"text-tone-ok-fg":"text-muted-foreground"}`,children:[(0,a.jsx)(r,{"aria-hidden":!0,className:"size-3.5"}),n.state.label]})]}),(0,a.jsx)("span",{className:"text-caption text-muted-foreground",children:n.description}),void 0===s?null:(0,a.jsx)("span",{className:"mt-auto flex flex-col items-start gap-1.5",children:s})]})}var w=e.i(31714);function j({fleetId:e,slackLink:t}){let[n,r]=(0,i.useTransition)(),[o,l]=(0,i.useState)(),d=(0,p.H)(t);return(0,a.jsxs)(v,{place:"slack",name:p.k.slack,Icon:w.U.slack,card:d,children:["link"===d.action?(0,a.jsx)("a",{href:`/slack/link?${new URLSearchParams({fleet:e}).toString()}`,"data-testid":"bridge-slack-link",className:"inline-flex h-7 items-center rounded-md bg-primary px-2.5 text-caption font-medium text-primary-foreground hover:bg-primary-hover",children:"Link Slack"}):null,"unlink"===d.action?(0,a.jsx)(f.i,{size:"xs","data-testid":"bridge-slack-unlink",isPending:n,pendingLabel:"Unlinking...",onClick:()=>{l(void 0),r(async()=>{let a=await s(e);a.isOk||l(a.message)})},children:"Unlink"}):null,void 0===o?null:(0,a.jsx)(g.f,{message:o,isFailure:!0})]})}function N({fleetId:e,webPush:t}){let n=t?.browsers??[],{isTaken:s,ownEndpoint:u,working:b,failure:x,turnOn:k,remove:y}=function({fleetId:e,webPushKey:a}){let[t,n]=(0,i.useState)(!0),[s,u]=(0,i.useState)(),[p,f]=(0,i.useState)(),[g,b]=(0,i.useState)(),[,x]=(0,i.useTransition)();return(0,i.useEffect)(()=>{"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window?m().then(e=>{u(e?.endpoint)}):n(!1)},[]),{isTaken:t,ownEndpoint:s,working:p,failure:g,turnOn:()=>{null!==a&&(f("on"),b(void 0),x(async()=>{try{var i;let t,n,s=await h(a);if(!s.isOk)return void b(s.message);let d=function(e,a){let{endpoint:i,keys:t}=e,n=t?.p256dh,s=t?.auth;return void 0===i||void 0===n||void 0===s?void 0:{endpoint:i,keys:{p256dh:n,auth:s},browser:a}}(s.value.toJSON(),(i=navigator.userAgent,t=l(i,r),n=l(i,o),void 0===t?"A browser":void 0===n?t:`${t} on ${n}`));if(void 0===d)return void b("Your browser gave no push subscription: try again");let m=await c(e,d);m.isOk?u(d.endpoint):b(m.message)}catch{b("Your browser could not turn web push on: try again")}finally{f(void 0)}}))},remove:a=>{f(a),b(void 0),x(async()=>{a===s&&(await (await m())?.unsubscribe(),u(void 0));let i=await d(e,a);f(void 0),i.isOk||b(i.message)})}}}({fleetId:e,webPushKey:t?.publicKey??null}),j=(0,p.B)({isOffered:void 0!==t&&null!==t.publicKey,isTaken:s,ownEndpoint:u,browsers:n}),O=n.filter(({endpoint:e})=>"remove"!==j.action||e!==u);return(0,a.jsxs)(v,{place:"web-push",name:p.k["web-push"],Icon:w.U["web-push"],card:j,children:["remove"===j.action&&void 0!==u?(0,a.jsx)(f.i,{size:"xs","data-testid":"bridge-web-push-remove",isPending:b===u,pendingLabel:"Removing...",disabled:void 0!==b,onClick:()=>{y(u)},children:"Remove"}):null,"turnOn"===j.action?(0,a.jsx)(f.i,{size:"xs","data-testid":"bridge-web-push-on",isPending:"on"===b,pendingLabel:"Turning on...",disabled:void 0!==b,onClick:k,children:"Turn on"}):null,O.map(({endpoint:e,browser:i,isGone:t})=>(0,a.jsxs)("span",{"data-testid":"bridge-web-push-browser",className:"flex w-full items-center gap-2 text-caption text-muted-foreground",children:[(0,a.jsx)("span",{className:"min-w-0 flex-1",children:t?`${i}: no longer takes wakes`:`Also on in ${i}`}),(0,a.jsx)("button",{type:"button","data-testid":"bridge-web-push-remove-other",disabled:void 0!==b,onClick:()=>{y(e)},className:"underline hover:text-foreground disabled:opacity-50",children:b===e?"Removing...":"Remove"})]},e)),void 0===x?null:(0,a.jsx)(g.f,{message:x,isFailure:!0})]})}function O({fleetId:e,routing:n}){let[s,r]=(0,i.useTransition)(),[o,l]=(0,i.useState)(),d=(0,p.t)({isOffered:n.offered.email,isOnForAnyJob:n.jobs.some(({places:e})=>e.email)});return(0,a.jsxs)(v,{place:"email",name:p.k.email,Icon:w.U.email,card:d,children:["turnOn"===d.action||"turnOff"===d.action?(0,a.jsx)(f.i,{size:"xs","data-testid":"bridge-email-turn",isPending:s,pendingLabel:"turnOn"===d.action?"Turning on...":"Turning off...",onClick:()=>{var a;a="turnOn"===d.action,l(void 0),r(async()=>{for(let i of(0,p.T)(n,a)){let a=await (0,t.f)({fleet:e,...i});if(!a.isOk)return void l(a.message)}})},children:"turnOn"===d.action?"Turn on":"Turn off"}):null,void 0===o?null:(0,a.jsx)(g.f,{message:o,isFailure:!0})]})}e.s(["PlacesPanel",0,function({fleetId:e,routing:i,slackLink:t,chats:n,webPush:s}){return(0,a.jsxs)("section",{"aria-label":"The places",className:"grid gap-2.5 sm:grid-cols-2 lg:grid-cols-4",children:[(0,a.jsx)(j,{fleetId:e,slackLink:t}),(0,a.jsx)(v,{place:"chat",name:p.k.chat,Icon:w.U.chat,card:(0,p.g)(n)}),(0,a.jsx)(N,{fleetId:e,webPush:s}),(0,a.jsx)(O,{fleetId:e,routing:i})]})}],41398)},85678,e=>{var a=e.i(43476),i=e.i(85595),t=e.i(71645),n=e.i(12301),s=e.i(31785),r=e.i(63132),o=e.i(31714);function l({isOn:e,label:i,isDisabled:t,isBusy:n=!1,aside:s,testId:r,onTurn:o}){return(0,a.jsxs)("span",{className:"inline-flex items-center gap-2.5",children:[(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":i,"aria-busy":n,disabled:t,"data-testid":r,onClick:o,className:"group inline-flex h-4 w-7 shrink-0 items-center rounded-full bg-input p-0.5 aria-checked:bg-primary disabled:cursor-not-allowed disabled:opacity-50",children:(0,a.jsx)("span",{"aria-hidden":!0,className:"size-3 rounded-full bg-card shadow-sm transition-transform group-aria-checked:translate-x-3"})}),void 0===s?null:(0,a.jsx)("span",{className:"text-caption text-muted-foreground",children:s})]})}let d="sm:grid sm:grid-cols-[1.6fr_repeat(5,1fr)] sm:items-center sm:gap-3";function c({toast:e}){return(0,a.jsxs)("div",{role:"status","data-testid":"bridge-routing-toast",className:"flex max-w-[720px] gap-3 rounded-lg border border-border bg-popover py-3.5 pr-3.5 pl-4 text-popover-foreground shadow-lg",children:[(0,a.jsx)(i.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0 text-tone-ok-fg"}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("span",{className:"font-medium",children:e.title}),(0,a.jsx)("span",{className:"text-caption text-muted-foreground",children:e.detail})]})]})}function u({name:e,children:i}){return(0,a.jsxs)("span",{className:"flex items-center justify-between sm:block",children:[(0,a.jsx)("span",{className:"sm:hidden",children:e}),i]})}e.s(["RoutingPanel",0,function({fleetId:e,routing:i,isSlackLinked:m,waitingByJob:h}){let[p,f]=(0,t.useTransition)(),[g,b]=(0,t.useState)(),[x,k]=(0,t.useState)(),[y,v]=(0,t.useState)();return(0,a.jsxs)("section",{className:"grid gap-3","aria-label":"Per job",children:[(0,a.jsxs)("div",{className:"grid gap-3 sm:gap-0 sm:overflow-hidden sm:rounded-lg sm:border sm:border-border sm:bg-card",children:[(0,a.jsxs)("div",{"aria-hidden":!0,className:`hidden min-h-8 bg-muted px-4 text-caption font-medium text-muted-foreground ${d}`,children:[(0,a.jsx)("span",{children:"Job"}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(o.x,{className:"size-3.5"}),"Bridge"]}),s.N.map(e=>{let i=o.U[e];return(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(i,{className:"size-3.5"}),s.k[e]]},e)})]}),i.jobs.map(({job:t,places:r})=>{let{Icon:c,tone:x}=o.c[t];return(0,a.jsxs)("div",{"data-testid":"bridge-routing-job",className:`flex flex-col gap-2 rounded-lg border border-border bg-card p-3 sm:min-h-[52px] sm:rounded-none sm:border-0 sm:border-t sm:px-4 sm:py-1.5 ${d}`,children:[(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-semibold sm:font-medium",children:[(0,a.jsx)(c,{"aria-hidden":!0,className:`size-4 shrink-0 ${x}`}),s.I[t].name]}),(0,a.jsx)("span",{className:"text-caption text-muted-foreground max-sm:hidden",children:s.I[t].holds})]}),(0,a.jsx)(u,{name:"Bridge",children:(0,a.jsx)(l,{isOn:!0,label:`Bridge for ${s.I[t].name}`,isDisabled:!0,aside:"Always",testId:`bridge-routing-${t}-bridge`})}),s.N.map(o=>{let d=r[o],c=`${t}-${o}`;return(0,a.jsx)(u,{name:s.k[o],children:(0,a.jsx)(l,{isOn:d,label:`${s.k[o]} for ${s.I[t].name}`,isDisabled:p||!d&&(!i.offered[o]||"slack"===o&&!m),isBusy:p&&g===c,..."everything-else"===t&&"slack"===o&&!d?{aside:"Bots only"}:{},testId:`bridge-routing-${c}`,onTurn:()=>{var a;a={job:t,place:o,isOn:!d,isChatOn:r.chat},k(void 0),v(void 0),b(`${a.job}-${a.place}`),f(async()=>{let{isChatOn:i,...t}=a,r=await (0,n.f)({fleet:e,...t});r.isOk?k((0,s.b)({...t,waiting:h[t.job],isChatOn:i})):v(r.message)})}})},o)})]},t)})]}),void 0===x?null:(0,a.jsx)(c,{toast:x}),void 0===y?null:(0,a.jsx)(r.f,{message:y,isFailure:!0}),(0,a.jsx)("p",{className:"text-caption text-muted-foreground max-sm:hidden",children:"While a Bridge page is open in focus, web push and email do not wake you. Slack still posts: you turned it on, and the views stay in step."})]})}],85678)},55070,e=>{var a=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},t={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:n,variant:s="secondary",size:r="regular",children:o,className:l="",disabled:d,...c}){return(0,a.jsx)("button",{...c,disabled:!0===d||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${t[r]} ${i[s]} ${l}`,children:e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),n]}):o})},"o",0,t])},63132,e=>{var a=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,a.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,a.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])}])})();
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55070,e=>{var r=e.i(43476);let t={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},a={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:n,variant:i="secondary",size:d="regular",children:s,className:o="",disabled:l,...c}){return(0,r.jsx)("button",{...c,disabled:!0===l||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${a[d]} ${t[i]} ${o}`,children:e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),n]}):s})},"o",0,a])},63132,e=>{var r=e.i(43476);e.s(["f",0,function({message:e,isFailure:t}){return t?(0,r.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,r.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},17433,e=>{var r=e.i(43476),t=e.i(18566),a=e.i(71645),n=e.i(55070),i=e.i(63132),d=e.i(95187);let s=(0,d.createServerReference)("40101e2762022e1966c6a68fa1b34121cd6305fcd9",d.callServer,void 0,d.findSourceMapURL,"changeMic"),o=(0,d.createServerReference)("402b98924eb53dedc3309266f4d40d9563c55b9ba3",d.callServer,void 0,d.findSourceMapURL,"contribute"),l={request:{label:"Request the mic",pending:"Requesting..."},withdraw:{label:"Withdraw my request",pending:"Withdrawing..."},release:{label:"Release the mic",pending:"Releasing..."}};e.s(["MeetingControls",0,function({fleetId:e,meetingId:d,controls:c}){let u=(0,t.useRouter)(),[b,g]=(0,a.useState)(""),[p,m]=(0,a.useState)(()=>crypto.randomUUID()),[x,h]=(0,a.useState)(),[f,v]=(0,a.useState)(),[,y]=(0,a.useTransition)(),j=({control:e,action:r,onDone:t})=>{h(e),v(void 0),y(async()=>{let e=await r();h(void 0),e.isOk?(t?.(),u.refresh()):v(e.message)})},S=void 0!==x,R=c.filter(e=>"contribute"!==e);return(0,r.jsxs)("div",{className:"grid gap-3",children:[c.includes("contribute")?(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Your contribution"}),(0,r.jsx)("textarea",{"data-testid":"meeting-text",rows:4,value:b,onChange:e=>{g(e.target.value)},className:"rounded-md border border-input bg-background p-2"})]}),(0,r.jsx)(n.i,{"data-testid":"meeting-contribute",variant:"primary",className:"justify-self-start",isPending:"contribute"===x,pendingLabel:"Sending...",disabled:S,onClick:()=>{j({control:"contribute",action:()=>o({fleet:e,meetingId:d,text:b,idempotencyKey:p}),onDone:()=>{g(""),m(crypto.randomUUID())}})},children:"Contribute"})]}):null,0===R.length?null:(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:R.map(t=>(0,r.jsx)(n.i,{"data-testid":`meeting-${t}`,variant:"request"===t?"primary":"secondary",isPending:x===t,pendingLabel:l[t].pending,disabled:S,onClick:()=>{j({control:t,action:()=>s({fleet:e,meetingId:d,change:t})})},children:l[t].label},t))}),void 0===f?null:(0,r.jsx)(i.f,{message:f,isFailure:!0})]})}],17433)}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55070,e=>{var r=e.i(43476);let t={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},a={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:n,variant:i="secondary",size:d="regular",children:s,className:o="",disabled:l,...c}){return(0,r.jsx)("button",{...c,disabled:!0===l||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${a[d]} ${t[i]} ${o}`,children:e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),n]}):s})},"o",0,a])},63132,e=>{var r=e.i(43476);e.s(["f",0,function({message:e,isFailure:t}){return t?(0,r.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,r.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},17433,e=>{var r=e.i(43476),t=e.i(18566),a=e.i(71645),n=e.i(55070),i=e.i(63132),d=e.i(95187);let s=(0,d.createServerReference)("4022e2173a0de3f2bde0a0d2a095ecf8e5f7c0e2ae",d.callServer,void 0,d.findSourceMapURL,"changeMic"),o=(0,d.createServerReference)("40eceea36d09c66186e2e22846958f0580ef0847ad",d.callServer,void 0,d.findSourceMapURL,"contribute"),l={request:{label:"Request the mic",pending:"Requesting..."},withdraw:{label:"Withdraw my request",pending:"Withdrawing..."},release:{label:"Release the mic",pending:"Releasing..."}};e.s(["MeetingControls",0,function({fleetId:e,meetingId:d,controls:c}){let u=(0,t.useRouter)(),[g,b]=(0,a.useState)(""),[p,m]=(0,a.useState)(()=>crypto.randomUUID()),[x,h]=(0,a.useState)(),[f,v]=(0,a.useState)(),[,y]=(0,a.useTransition)(),j=({control:e,action:r,onDone:t})=>{h(e),v(void 0),y(async()=>{let e=await r();h(void 0),e.isOk?(t?.(),u.refresh()):v(e.message)})},S=void 0!==x,R=c.filter(e=>"contribute"!==e);return(0,r.jsxs)("div",{className:"grid gap-3",children:[c.includes("contribute")?(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Your contribution"}),(0,r.jsx)("textarea",{"data-testid":"meeting-text",rows:4,value:g,onChange:e=>{b(e.target.value)},className:"rounded-md border border-input bg-background p-2"})]}),(0,r.jsx)(n.i,{"data-testid":"meeting-contribute",variant:"primary",className:"justify-self-start",isPending:"contribute"===x,pendingLabel:"Sending...",disabled:S,onClick:()=>{j({control:"contribute",action:()=>o({fleet:e,meetingId:d,text:g,idempotencyKey:p}),onDone:()=>{b(""),m(crypto.randomUUID())}})},children:"Contribute"})]}):null,0===R.length?null:(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:R.map(t=>(0,r.jsx)(n.i,{"data-testid":`meeting-${t}`,variant:"request"===t?"primary":"secondary",isPending:x===t,pendingLabel:l[t].pending,disabled:S,onClick:()=>{j({control:t,action:()=>s({fleet:e,meetingId:d,change:t})})},children:l[t].label},t))}),void 0===f?null:(0,r.jsx)(i.f,{message:f,isFailure:!0})]})}],17433)}])})();
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70812,71136,96315,28623,e=>{var t=e.i(56420);let i={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],70812);let a={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],71136);let r={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};r.node;let d=(0,t.f)(r);e.s(["f",0,d],96315);let o={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};o.node;let l=(0,t.f)(o);e.s(["f",0,l],28623)},51481,e=>{var t=e.i(75043);e.s(["f",()=>t.f])},59381,e=>{var t=e.i(56420);let i={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],59381)},89606,e=>{var t=e.i(95187);let i=(0,t.createServerReference)("6035c62f7ea2fe751d1fb958ab8f9a2246fbb4f181",t.callServer,void 0,t.findSourceMapURL,"removeFromBasket");e.s(["f",0,i])},31785,e=>{let t={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},i={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},n=["decide","do"],a="Bridge keeps every item.",s={label:"Not offered",isOk:!1},r={label:"Off",isOk:!1},d="Says only that something waits, with a link here.",o=`${d} Nothing is on until you turn it on.`,l="through the gateway. Lists what waits when you ask it.",c={slack:"Slack",chat:"a chat","web-push":"web push",email:"email"};e.s(["I",0,t,"k",0,i,"N",0,["slack","chat","web-push","email"],"g",0,function(e){return 0===e.length?{state:{label:"Not connected",isOk:!1},description:`claude.ai or another MCP client, ${l}`,action:"none"}:{state:{label:"Connected",isOk:!0},description:`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)}, ${l}`,action:"none"}},"t",0,function({isOffered:e,isOnForAnyJob:t}){return e?t?{state:{label:"On",isOk:!0},description:d,action:"turnOff"}:{state:r,description:o,action:"turnOn"}:{state:s,description:"This gateway sends no email.",action:"none"}},"T",0,function(e,t){return e.jobs.filter(({job:e,places:i})=>i.email!==t&&(!t||n.includes(e))).map(({job:e})=>({job:e,place:"email",isOn:t}))},"r",0,function(e){let t=["Bridge",...e.map(e=>c[e])],i=t.at(-1),n=1===t.length?"Bridge":`${t.slice(0,-1).join(", ")} and ${String(i)}`;return`Shows in ${n}, as Where things show sets for Decide. One answer, wherever you give it.`},"H",0,function(e){if(null===e)return{state:{label:"Not connected",isOk:!1},description:"This fleet has no Slack workspace.",action:"none"};let{workspaceName:t,link:i}=e;return null===i?{state:{label:"Not linked",isOk:!1},description:`Link your Slack account in ${t} to see items there and answer them.`,action:"link"}:{state:{label:"Linked",isOk:!0},description:`As @${i.slackName} in ${t}. A button press or a thread reply there is yours.`,action:"unlink"}},"b",0,function(e){let{job:n,place:s,isOn:r,waiting:d,isChatOn:o}=e,{name:l,item:c,items:u}=t[n],m=`${i[s]} is ${r?"on":"off"} for ${l}`;return r?"chat"===s?{title:m,detail:`A chat lists every ${c} not done when you ask it.`}:{title:m,detail:`${i[s]} shows ${u} that arrive from now on.${void 0===d||0===d?"":` The ${String(d)} already waiting ${1===d?"stays":"stay"} ${o?"in Bridge and in a chat":"in Bridge"}.`}`}:{title:m,detail:"everything-else"===n&&"slack"===s?`Bots only: a bot ship's messages and replies to Slack still show there. ${a}`:a}},"B",0,function(e){if(!e.isOffered)return{state:s,description:"This gateway sends no web push.",action:"none"};if(!e.isTaken)return{state:r,description:"This browser takes no web push.",action:"none"};let t=e.browsers.find(({endpoint:t,isGone:i})=>t===e.ownEndpoint&&!i);return void 0===t?{state:r,description:o,action:"turnOn"}:{state:{label:"This browser",isOk:!0},description:`${t.browser}. ${d}`,action:"remove"}}])},49966,e=>{var t=e.i(43476),i=e.i(17904),n=e.i(29039),a=e.i(29775);e.s(["HomeHeading",0,function({waiting:e}){let s,r,d,o=(0,n.useLastReadAt)();return void 0!==o?(0,t.jsxs)("div",{className:"max-sm:hidden",children:[(0,t.jsx)("h1",{id:"bridge-waiting-heading",className:"text-heading-touch font-semibold",children:"Waiting on you"}),(0,t.jsx)("p",{className:"text-muted-foreground","data-testid":"bridge-last-read",children:`Last read ${(0,i.C)(o)}`})]}):(0,t.jsxs)("div",{"data-testid":"bridge-title-row",className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{id:"bridge-waiting-heading",className:"text-title sm:text-heading-touch font-semibold",children:["Waiting on you ",(0,t.jsx)("span",{"data-testid":"bridge-count",className:"text-tone-waiting-fg",children:e.count})]}),(0,t.jsx)("p",{className:"text-muted-foreground max-sm:hidden",children:0===e.count?"Nothing waits on you.":(r=(s=e.items.filter(({stale:e})=>null===e)).filter(({job:e})=>"decide"===e).length,d=s.filter(({job:e})=>"do"===e).length,`${String(r)} to decide, ${String(d)} to do. Newest on top; nothing else is in this count.`)})]}),(0,t.jsx)("span",{className:"max-sm:hidden",children:(0,t.jsx)(a.f,{look:"words"})})]})}])},85989,e=>{var t=e.i(43476),i=e.i(70812),n=e.i(47130),a=e.i(29247),s=e.i(12497),r=e.i(17904),d=e.i(55070),o=e.i(19015),l=e.i(82022);function c({href:e,isOutside:i,children:n,...a}){return(0,t.jsxs)("a",{...a,href:e,...i?{target:"_blank",rel:"noopener noreferrer"}:{},className:`inline-flex items-center rounded-md border border-border bg-card text-card-foreground hover:bg-accent ${d.o.row}`,children:[(0,t.jsx)(l.f,{"aria-hidden":"true",className:"size-3.5"}),n]})}var u=e.i(3523),m=e.i(29039);function h(e){let{stale:t,inBasket:i}=e;if(null===t&&null!==i)return null===i.option?"In the basket: the note alone":`In the basket: option ${String(i.option)}`;if(null===t)return"seen"===e.state?(0,s.M)(e.seenIn):void 0;let n=(0,a.f)(t,{from:e.from});return"withdrawn"===t.kind?`${n}: open it to clear it`:n}function p({item:e,opening:i}){let n=e.stale?.replacementId??null;return null===n?null:(0,t.jsx)(d.i,{"data-testid":"bridge-replacement",size:"row",isPending:i.openingId===n,pendingLabel:"Opening...",disabled:void 0!==i.openingId,onClick:()=>{i.open({deliveryId:n,job:e.job})},children:"do"===e.job?"Open the new step":"Open the new question"})}function g({item:e,opening:i}){return(0,t.jsx)(d.i,{"data-testid":"bridge-open",size:"row",isPending:i.openingId===e.deliveryId,pendingLabel:"Opening...",disabled:void 0!==i.openingId,onClick:()=>{i.open(e)},children:"Open"})}function f({item:e,opening:i}){let a=e.actInPlace;return a?.kind==="ownStep"?(0,t.jsx)(c,{"data-testid":"bridge-own-step",href:a.href,isOutside:!1,children:a.label}):(0,t.jsxs)(t.Fragment,{children:[a?.kind==="putPick"?(0,t.jsxs)(d.i,{"data-testid":"bridge-put-pick",variant:"primary",size:"row",isPending:i.puttingId===e.deliveryId,pendingLabel:"Putting...",disabled:void 0!==i.openingId||void 0!==i.puttingId,onClick:()=>{i.putPick(e,a.option)},children:[(0,t.jsx)(n.f,{"aria-hidden":"true",className:"size-3.5"}),"Put option ",a.option," in the basket"]}):null,a?.kind==="openLink"?(0,t.jsxs)(c,{"data-testid":"bridge-step-link",href:a.href,isOutside:!0,children:["Open ",a.host]}):null,(0,t.jsx)(p,{item:e,opening:i}),(0,t.jsx)(g,{item:e,opening:i})]})}function b(e,t){return void 0===t.openingId?()=>{t.open(e)}:void 0}function x({items:e,readAt:i,opening:n}){let a=void 0!==n.opened;return(0,t.jsx)("ul",{className:a?"border-t border-border":"overflow-hidden rounded-lg border border-border bg-card",children:e.map(e=>(0,t.jsx)(o.f,{item:e,now:i,isNew:"new"===e.state,isOpen:n.opened?.deliveryId===e.deliveryId,staleKind:e.stale?.kind,outcome:h(e),failure:n.failure?.deliveryId===e.deliveryId?n.failure.message:void 0,onOpen:b(e,n),actions:a?void 0:(0,t.jsx)(f,{item:e,opening:n})},e.deliveryId))})}function v({items:e,readAt:i,opening:n}){return(0,t.jsx)("ul",{className:void 0===n.opened?"overflow-hidden rounded-lg border border-border bg-card":"border-t border-border",children:e.map(e=>(0,t.jsx)(o.f,{item:e,now:i,isNew:"new"===e.state,isOpen:n.opened?.deliveryId===e.deliveryId,outcome:void 0,failure:n.failure?.deliveryId===e.deliveryId?n.failure.message:void 0,onOpen:b(e,n)},e.deliveryId))})}function y({home:e,readAt:i,opening:n,isStayAware:a}){let{waiting:s,stayAware:r}=e;return a?(0,t.jsxs)("section",{"aria-labelledby":"bridge-stay-aware-heading",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3 px-3 py-2.5",children:[(0,t.jsx)("h2",{id:"bridge-stay-aware-heading",className:"font-semibold",children:"Stay aware"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground",children:[r.filter(({state:e})=>"new"===e).length," unseen"]})]}),(0,t.jsx)(v,{items:r,readAt:i,opening:n})]}):(0,t.jsxs)("section",{"aria-labelledby":"bridge-waiting-heading",children:[(0,t.jsxs)("h1",{id:"bridge-waiting-heading",className:"px-3 py-2.5 font-semibold",children:["Waiting on you ",(0,t.jsx)("span",{"data-testid":"bridge-count",className:"text-tone-waiting-fg",children:s.count})]}),(0,t.jsx)(x,{items:s.items,readAt:i,opening:n})]})}function w({home:e,now:n,opening:a,argo:s}){let{waiting:r,stayAware:d}=e,o=new Date(n);return void 0!==a.opened?(0,t.jsx)(y,{home:e,readAt:o,opening:a,isStayAware:"stay-aware"===a.opened.job}):(0,t.jsxs)("div",{className:"grid gap-8",children:[(0,t.jsx)("section",{className:"grid gap-3","aria-labelledby":"bridge-waiting-heading",children:0===r.items.length?(0,t.jsxs)("div",{"data-testid":"bridge-nothing-waits",className:"grid justify-items-center gap-1 rounded-lg border border-border bg-card p-6 text-center",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Nothing waits on you"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"Your ships have what they need from you. A question or a step shows here the moment one arrives."})]}):(0,t.jsx)(x,{items:r.items,readAt:o,opening:a})}),s,(0,t.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-stay-aware-heading",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,t.jsxs)("h2",{id:"bridge-stay-aware-heading",className:"inline-flex items-center gap-2 text-section font-semibold",children:[(0,t.jsx)(i.f,{"aria-hidden":"true",className:"size-4 shrink-0"}),"Stay aware"]}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground",children:[d.filter(({state:e})=>"new"===e).length," unseen, outside the count"]})]}),0===d.length?(0,t.jsx)("p",{"data-testid":"bridge-nothing-new",className:"rounded-md border border-border bg-card p-3 text-muted-foreground",children:"Nothing new. What you saw is in Done."}):(0,t.jsx)(v,{items:d,readAt:o,opening:a})]})]})}function j({items:e,lastReadAt:i}){let n=new Date(i);return(0,t.jsxs)("section",{className:"grid gap-3","aria-label":"Waiting on you, as last read",children:[0===e.length?null:(0,t.jsx)("ul",{inert:!0,className:"overflow-hidden rounded-lg border border-border bg-card opacity-60",children:e.map(e=>(0,t.jsx)(o.f,{item:e,now:n,isNew:"new"===e.state,isOpen:!1,staleKind:e.stale?.kind,outcome:h(e),failure:void 0,onOpen:void 0},e.deliveryId))}),(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:`Shown as last read, at ${(0,r.C)(i)}.`})]})}e.s(["HomePanel",0,function({fleetId:e,home:i,now:n,decidePlaces:a,argo:s}){let r=(0,m.useLastReadAt)();return void 0!==r?(0,t.jsx)(j,{items:i.waiting.items,lastReadAt:r}):(0,t.jsx)(u.f,{fleetId:e,decidePlaces:a,children:e=>(0,t.jsx)(w,{home:i,now:n,opening:e,argo:s})})},"StayAwareRows",0,v],85989)},3523,e=>{var t=e.i(43476),i=e.i(58487),n=e.i(5654),a=e.i(71645),s=e.i(73459),r=e.i(65894),d=e.i(36709),o=e.i(15451),l=e.i(99328),c=e.i(24338),u=e.i(65403),m=e.i(89606),h=e.i(57228),p=e.i(34244),g=e.i(43328),f=e.i(27538),b=e.i(77826),x=e.i(80734),v=e.i(60296),y=e.i(66734),w=e.i(47130);function j(){let{toasts:e}=n.f.useToastManager();return(0,t.jsx)(g.f.Portal,{children:(0,t.jsx)(f.f.Viewport,{className:"fixed bottom-4 left-4 z-50 hidden w-[min(24rem,calc(100vw-2rem))] gap-2 sm:grid",children:e.map(e=>(0,t.jsxs)(b.f.Root,{toast:e,"data-testid":"bridge-basket-toast",className:"flex items-start gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg",children:[(0,t.jsx)(w.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0"}),(0,t.jsxs)(x.f.Content,{className:"grid flex-1 gap-1",children:[(0,t.jsx)(v.f.Title,{className:"font-medium"}),(0,t.jsx)(y.f.Description,{className:"text-caption text-muted-foreground"})]})]},e.id))})})}var k=e.i(54235),N=e.i(62579),S=e.i(63132),I=e.i(75103),$=e.i(52021);function O({fleetId:e,decidePlaces:i,consoleUrl:g,children:f}){let b=n.f.useToastManager(),x=(0,I.P)(),[v,y]=(0,a.useState)(),[w,j]=(0,a.useState)(""),[A,R]=(0,a.useState)(),[z,L]=(0,a.useState)(),[P,M]=(0,a.useState)(),[T,B]=(0,a.useState)(),[C,D]=(0,a.useState)(),[U,q]=(0,a.useState)(),[,F]=(0,a.useTransition)(),[H,W]=(0,a.useState)(0);(0,$.R)(void 0===v?void 0:(0,p.u)(v.opened.job),()=>{y(void 0)});let _=t=>{R(t.deliveryId),B(void 0),q(void 0),F(async()=>{let i=await (0,l.f)(e,t.deliveryId);if(R(void 0),i.isOk){let e=t.inBasket??null;y({delivery:i.value,opened:{job:t.job,isAlert:t.isAlert??!1,wasNew:"seen"!==t.state},inBasket:e,finished:null}),j(e?.note??""),D(void 0)}else B({deliveryId:t.deliveryId,message:i.message})})},V=({control:e,action:t,onSettled:i})=>{M(e),D(void 0),F(async()=>{let e=await t();M(void 0),e.isOk?i(e.value):D(e.message)})},K=e=>()=>{y(void 0),q(e)},Y=void 0===v?void 0:{deliveryId:v.delivery.deliveryId,job:v.opened.job};return(0,t.jsx)(N.f,{list:(0,t.jsxs)("div",{className:"grid gap-4",children:[void 0===U?null:(0,t.jsx)(S.f,{message:U,isFailure:!1}),f({open:_,openingId:A,putPick:(t,i)=>{L(t.deliveryId),B(void 0),q(void 0),F(async()=>{let n=await (0,u.f)({fleet:e,deliveryId:t.deliveryId,option:i});L(void 0),n.isOk?(q(`Option ${String(i)} is in the basket, not sent: ${t.from} receives it when you send the basket.`),W(e=>e+1)):B({deliveryId:t.deliveryId,message:n.message})})},puttingId:z,failure:T,opened:Y})]},H),item:void 0===v?void 0:(({delivery:n,inBasket:a,opened:l,finished:u})=>{let p=n.question?.id;return(0,t.jsx)(k.u,{delivery:n,opened:l,meetingHref:void 0===n.meetingId?void 0:(0,s.f)({fleetId:e,meetingId:n.meetingId}),consoleUrl:g,basketHref:(0,r.f)(h.H,e),inBasket:a,finished:u,places:i,note:w,working:P,failure:C,onNoteChange:j,onAnswer:t=>{V({control:void 0===t?{kind:"note"}:{kind:"option",option:t},action:()=>(0,d.f)({fleet:e,deliveryId:n.deliveryId,input:{questionId:n.question?.id,option:t,note:w}}),onSettled:K(`Your answer went to ${n.from}.`)})},onPut:t=>{V({control:null===t?{kind:"note"}:{kind:"option",option:t},action:()=>(0,c.f)({fleet:e,deliveryId:n.deliveryId,option:t,optionLabel:n.question?.options.find(({key:e})=>e===t)?.label??null,note:w}),onSettled:e=>{var t;y({delivery:n,opened:l,finished:u,inBasket:e}),b.add({title:null===(t=e.option)?"Your note alone in the basket":`Option ${String(t)} in the basket`,description:"Not sent. Still waiting on you until you send it."})}})},onRemove:()=>{void 0!==p&&V({control:{kind:"remove"},action:()=>(0,m.f)(e,p),onSettled:K(`Your answer to “${n.title}” is out of the basket; the question still waits on you.`)})},onDone:()=>{V({control:{kind:"done"},action:()=>(0,o.f)({fleet:e,deliveryId:n.deliveryId}),onSettled:K(`Done with “${n.title}”.`)})},onFinishStep:t=>{V({control:{kind:t},action:()=>(0,o.f)({fleet:e,deliveryId:n.deliveryId,step:{outcome:t,note:w}}),onSettled:()=>{y({delivery:n,inBasket:a,opened:l,finished:{outcome:t,note:w.trim(),at:new Date().toISOString()}})}})},onOpen:e=>{_({deliveryId:e,job:l.job})},onSendMessage:void 0===n.alertShip||void 0===x?void 0:e=>{x({alertShip:e})},onBack:()=>{y(void 0)}},n.deliveryId)})(v)})}e.s(["f",0,function({fleetId:e,decidePlaces:n,consoleUrl:a,children:s}){return(0,t.jsxs)(i.f.Provider,{children:[(0,t.jsx)(O,{fleetId:e,decidePlaces:n,consoleUrl:a,children:s}),(0,t.jsx)(j,{})]})}],3523)},55070,e=>{var t=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},n={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:a,variant:s="secondary",size:r="regular",children:d,className:o="",disabled:l,...c}){return(0,t.jsx)("button",{...c,disabled:!0===l||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${n[r]} ${i[s]} ${o}`,children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}):d})},"o",0,n])},19015,e=>{var t=e.i(43476),i=e.i(70812),n=e.i(71136),a=e.i(96315),s=e.i(49287),r=e.i(28623),d=e.i(12497),o=e.i(91604),l=e.i(63132),c=e.i(779);let u={bridge:{icon:s.f,name:"Bridge"},slack:{icon:n.f,name:"Slack"},chat:{icon:r.f,name:"a chat"},"web-push":{icon:i.f,name:"web push"},email:{icon:a.f,name:"email"}};function m(){return(0,t.jsx)("span",{"aria-hidden":"true",className:"text-border",children:"·"})}function h({places:e}){var i;let n,a=["bridge",...e].map(e=>u[e]);return(0,t.jsx)("span",{role:"img","aria-label":`Shows in ${(n=(i=a.map(({name:e})=>e)).at(-1)??"",i.length<2?n:`${i.slice(0,-1).join(", ")} and ${n}`)}`,className:"inline-flex items-center gap-0.5",children:a.map(({icon:e,name:i})=>(0,t.jsx)(e,{"aria-hidden":"true",className:"size-3"},i))})}e.s(["f",0,function({item:e,now:i,isNew:n,isOpen:a=!1,staleKind:s,outcome:r,failure:u,onOpen:p,time:g,detail:f,actions:b}){var x;let v=e.isAlert??!1,y=(0,o.f)({job:e.job,isAlert:v}),w=y.icon,j="min-w-0 break-words text-left text-body-touch font-medium sm:truncate sm:text-body",k=void 0===s?e.title:(0,t.jsx)("s",{className:"decoration-muted-foreground",children:e.title});return(0,t.jsxs)("li",{"data-testid":"bridge-item","data-stale":void 0!==s,"aria-current":!!a||void 0,className:`grid min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto] items-start gap-x-2.5 gap-y-1.5 border-t border-border px-3 py-2.5 first:border-t-0 ${function({isOpen:e,isStale:t}){return e?"bg-highlight shadow-[inset_2px_0_0_var(--primary)]":t?"bg-muted":""}({isOpen:a,isStale:void 0!==s})}`,children:[(0,t.jsx)(w,{"aria-hidden":"true",className:`mt-0.5 size-4 ${y.tone}`}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline sm:items-center",children:[n?(0,t.jsx)("span",{"aria-label":"New",className:"mr-1.5 size-[7px] shrink-0 -translate-y-px rounded-full bg-primary"}):null,void 0===p?(0,t.jsx)("span",{"data-testid":"bridge-item-title",className:j,children:k}):(0,t.jsx)("button",{type:"button","data-testid":"bridge-item-title",onClick:p,className:`${j} hover:underline`,children:k})]}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)("span",{className:`font-medium ${y.tone}`,children:(0,d.z)({job:e.job,isAlert:v})}),(0,t.jsx)(m,{}),(0,t.jsx)("span",{children:e.from}),void 0===r?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m,{}),(0,t.jsxs)("span",{"data-testid":"bridge-outcome",className:"inline-flex items-center gap-1.5",children:[void 0===s?null:(0,t.jsx)(c.f,{kind:s}),r]})]}),void 0===e.places?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m,{}),(0,t.jsx)(h,{places:e.places})]})]})]}),(0,t.jsx)("time",{dateTime:g?.at??e.sentAt,title:(x=g?.at??e.sentAt,`${new Date(x).toISOString().slice(0,16).replace("T"," ")} UTC`),className:"whitespace-nowrap text-right text-caption text-muted-foreground",children:g?.said??(0,d.V)(e.sentAt,i)}),void 0===f?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:f}),null==b?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5",children:b}),void 0===u?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:(0,t.jsx)(l.f,{message:u,isFailure:!0})})]})}])},63132,e=>{var t=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,t.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,t.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},73459,36709,15451,99328,24338,65403,e=>{e.s(["f",0,function(e){let t=new URLSearchParams({fleet:e.fleetId,...void 0===e.cursor?{}:{cursor:e.cursor}});return`/meetings/${encodeURIComponent(e.meetingId)}?${t.toString()}`}],73459);var t=e.i(95187);let i=(0,t.createServerReference)("402d993e2dfc3db69070886137b4bd7c498ddf33cb",t.callServer,void 0,t.findSourceMapURL,"answerDelivery");e.s(["f",0,i],36709);let n=(0,t.createServerReference)("40645122e875873ac311487cb1c703fb403ea8d5d5",t.callServer,void 0,t.findSourceMapURL,"doneDelivery");e.s(["f",0,n],15451);let a=(0,t.createServerReference)("609c3d0e9c3eb58ec0564b51f34b2d6a63a83e6d8d",t.callServer,void 0,t.findSourceMapURL,"openDelivery");e.s(["f",0,a],99328);let s=(0,t.createServerReference)("4025f8799c16c7535311cefa3faa24de30d4c2384c",t.callServer,void 0,t.findSourceMapURL,"putInBasket");e.s(["f",0,s],24338);let r=(0,t.createServerReference)("4087e8a620570d2fe490c35dafd89b7c7f7c863fe5",t.callServer,void 0,t.findSourceMapURL,"putPickInBasket");e.s(["f",0,r],65403)}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70812,71136,96315,28623,e=>{var t=e.i(56420);let i={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],70812);let a={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],71136);let r={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};r.node;let d=(0,t.f)(r);e.s(["f",0,d],96315);let o={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};o.node;let l=(0,t.f)(o);e.s(["f",0,l],28623)},51481,e=>{var t=e.i(75043);e.s(["f",()=>t.f])},59381,e=>{var t=e.i(56420);let i={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],59381)},55266,e=>{var t=e.i(95187);let i=(0,t.createServerReference)("600d7b220edec9ab18a80038d5b459fae730df7a95",t.callServer,void 0,t.findSourceMapURL,"removeFromBasket");e.s(["f",0,i])},31785,e=>{let t={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},i={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},n=["decide","do"],a="Bridge keeps every item.",s={label:"Not offered",isOk:!1},r={label:"Off",isOk:!1},d="Says only that something waits, with a link here.",o=`${d} Nothing is on until you turn it on.`,l="through the gateway. Lists what waits when you ask it.",c={slack:"Slack",chat:"a chat","web-push":"web push",email:"email"};e.s(["I",0,t,"k",0,i,"N",0,["slack","chat","web-push","email"],"g",0,function(e){return 0===e.length?{state:{label:"Not connected",isOk:!1},description:`claude.ai or another MCP client, ${l}`,action:"none"}:{state:{label:"Connected",isOk:!0},description:`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)}, ${l}`,action:"none"}},"t",0,function({isOffered:e,isOnForAnyJob:t}){return e?t?{state:{label:"On",isOk:!0},description:d,action:"turnOff"}:{state:r,description:o,action:"turnOn"}:{state:s,description:"This gateway sends no email.",action:"none"}},"T",0,function(e,t){return e.jobs.filter(({job:e,places:i})=>i.email!==t&&(!t||n.includes(e))).map(({job:e})=>({job:e,place:"email",isOn:t}))},"r",0,function(e){let t=["Bridge",...e.map(e=>c[e])],i=t.at(-1),n=1===t.length?"Bridge":`${t.slice(0,-1).join(", ")} and ${String(i)}`;return`Shows in ${n}, as Where things show sets for Decide. One answer, wherever you give it.`},"H",0,function(e){if(null===e)return{state:{label:"Not connected",isOk:!1},description:"This fleet has no Slack workspace.",action:"none"};let{workspaceName:t,link:i}=e;return null===i?{state:{label:"Not linked",isOk:!1},description:`Link your Slack account in ${t} to see items there and answer them.`,action:"link"}:{state:{label:"Linked",isOk:!0},description:`As @${i.slackName} in ${t}. A button press or a thread reply there is yours.`,action:"unlink"}},"b",0,function(e){let{job:n,place:s,isOn:r,waiting:d,isChatOn:o}=e,{name:l,item:c,items:u}=t[n],m=`${i[s]} is ${r?"on":"off"} for ${l}`;return r?"chat"===s?{title:m,detail:`A chat lists every ${c} not done when you ask it.`}:{title:m,detail:`${i[s]} shows ${u} that arrive from now on.${void 0===d||0===d?"":` The ${String(d)} already waiting ${1===d?"stays":"stay"} ${o?"in Bridge and in a chat":"in Bridge"}.`}`}:{title:m,detail:"everything-else"===n&&"slack"===s?`Bots only: a bot ship's messages and replies to Slack still show there. ${a}`:a}},"B",0,function(e){if(!e.isOffered)return{state:s,description:"This gateway sends no web push.",action:"none"};if(!e.isTaken)return{state:r,description:"This browser takes no web push.",action:"none"};let t=e.browsers.find(({endpoint:t,isGone:i})=>t===e.ownEndpoint&&!i);return void 0===t?{state:r,description:o,action:"turnOn"}:{state:{label:"This browser",isOk:!0},description:`${t.browser}. ${d}`,action:"remove"}}])},49966,e=>{var t=e.i(43476),i=e.i(17904),n=e.i(29039),a=e.i(29775);e.s(["HomeHeading",0,function({waiting:e}){let s,r,d,o=(0,n.useLastReadAt)();return void 0!==o?(0,t.jsxs)("div",{className:"max-sm:hidden",children:[(0,t.jsx)("h1",{id:"bridge-waiting-heading",className:"text-heading-touch font-semibold",children:"Waiting on you"}),(0,t.jsx)("p",{className:"text-muted-foreground","data-testid":"bridge-last-read",children:`Last read ${(0,i.C)(o)}`})]}):(0,t.jsxs)("div",{"data-testid":"bridge-title-row",className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{id:"bridge-waiting-heading",className:"text-title sm:text-heading-touch font-semibold",children:["Waiting on you ",(0,t.jsx)("span",{"data-testid":"bridge-count",className:"text-tone-waiting-fg",children:e.count})]}),(0,t.jsx)("p",{className:"text-muted-foreground max-sm:hidden",children:0===e.count?"Nothing waits on you.":(r=(s=e.items.filter(({stale:e})=>null===e)).filter(({job:e})=>"decide"===e).length,d=s.filter(({job:e})=>"do"===e).length,`${String(r)} to decide, ${String(d)} to do. Newest on top; nothing else is in this count.`)})]}),(0,t.jsx)("span",{className:"max-sm:hidden",children:(0,t.jsx)(a.f,{look:"words"})})]})}])},85989,e=>{var t=e.i(43476),i=e.i(70812),n=e.i(47130),a=e.i(29247),s=e.i(12497),r=e.i(17904),d=e.i(55070),o=e.i(19015),l=e.i(82022);function c({href:e,isOutside:i,children:n,...a}){return(0,t.jsxs)("a",{...a,href:e,...i?{target:"_blank",rel:"noopener noreferrer"}:{},className:`inline-flex items-center rounded-md border border-border bg-card text-card-foreground hover:bg-accent ${d.o.row}`,children:[(0,t.jsx)(l.f,{"aria-hidden":"true",className:"size-3.5"}),n]})}var u=e.i(3523),m=e.i(29039);function h(e){let{stale:t,inBasket:i}=e;if(null===t&&null!==i)return null===i.option?"In the basket: the note alone":`In the basket: option ${String(i.option)}`;if(null===t)return"seen"===e.state?(0,s.M)(e.seenIn):void 0;let n=(0,a.f)(t,{from:e.from});return"withdrawn"===t.kind?`${n}: open it to clear it`:n}function p({item:e,opening:i}){let n=e.stale?.replacementId??null;return null===n?null:(0,t.jsx)(d.i,{"data-testid":"bridge-replacement",size:"row",isPending:i.openingId===n,pendingLabel:"Opening...",disabled:void 0!==i.openingId,onClick:()=>{i.open({deliveryId:n,job:e.job})},children:"do"===e.job?"Open the new step":"Open the new question"})}function g({item:e,opening:i}){return(0,t.jsx)(d.i,{"data-testid":"bridge-open",size:"row",isPending:i.openingId===e.deliveryId,pendingLabel:"Opening...",disabled:void 0!==i.openingId,onClick:()=>{i.open(e)},children:"Open"})}function f({item:e,opening:i}){let a=e.actInPlace;return a?.kind==="ownStep"?(0,t.jsx)(c,{"data-testid":"bridge-own-step",href:a.href,isOutside:!1,children:a.label}):(0,t.jsxs)(t.Fragment,{children:[a?.kind==="putPick"?(0,t.jsxs)(d.i,{"data-testid":"bridge-put-pick",variant:"primary",size:"row",isPending:i.puttingId===e.deliveryId,pendingLabel:"Putting...",disabled:void 0!==i.openingId||void 0!==i.puttingId,onClick:()=>{i.putPick(e,a.option)},children:[(0,t.jsx)(n.f,{"aria-hidden":"true",className:"size-3.5"}),"Put option ",a.option," in the basket"]}):null,a?.kind==="openLink"?(0,t.jsxs)(c,{"data-testid":"bridge-step-link",href:a.href,isOutside:!0,children:["Open ",a.host]}):null,(0,t.jsx)(p,{item:e,opening:i}),(0,t.jsx)(g,{item:e,opening:i})]})}function b(e,t){return void 0===t.openingId?()=>{t.open(e)}:void 0}function x({items:e,readAt:i,opening:n}){let a=void 0!==n.opened;return(0,t.jsx)("ul",{className:a?"border-t border-border":"overflow-hidden rounded-lg border border-border bg-card",children:e.map(e=>(0,t.jsx)(o.f,{item:e,now:i,isNew:"new"===e.state,isOpen:n.opened?.deliveryId===e.deliveryId,staleKind:e.stale?.kind,outcome:h(e),failure:n.failure?.deliveryId===e.deliveryId?n.failure.message:void 0,onOpen:b(e,n),actions:a?void 0:(0,t.jsx)(f,{item:e,opening:n})},e.deliveryId))})}function v({items:e,readAt:i,opening:n}){return(0,t.jsx)("ul",{className:void 0===n.opened?"overflow-hidden rounded-lg border border-border bg-card":"border-t border-border",children:e.map(e=>(0,t.jsx)(o.f,{item:e,now:i,isNew:"new"===e.state,isOpen:n.opened?.deliveryId===e.deliveryId,outcome:void 0,failure:n.failure?.deliveryId===e.deliveryId?n.failure.message:void 0,onOpen:b(e,n)},e.deliveryId))})}function y({home:e,readAt:i,opening:n,isStayAware:a}){let{waiting:s,stayAware:r}=e;return a?(0,t.jsxs)("section",{"aria-labelledby":"bridge-stay-aware-heading",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3 px-3 py-2.5",children:[(0,t.jsx)("h2",{id:"bridge-stay-aware-heading",className:"font-semibold",children:"Stay aware"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground",children:[r.filter(({state:e})=>"new"===e).length," unseen"]})]}),(0,t.jsx)(v,{items:r,readAt:i,opening:n})]}):(0,t.jsxs)("section",{"aria-labelledby":"bridge-waiting-heading",children:[(0,t.jsxs)("h1",{id:"bridge-waiting-heading",className:"px-3 py-2.5 font-semibold",children:["Waiting on you ",(0,t.jsx)("span",{"data-testid":"bridge-count",className:"text-tone-waiting-fg",children:s.count})]}),(0,t.jsx)(x,{items:s.items,readAt:i,opening:n})]})}function w({home:e,now:n,opening:a,argo:s}){let{waiting:r,stayAware:d}=e,o=new Date(n);return void 0!==a.opened?(0,t.jsx)(y,{home:e,readAt:o,opening:a,isStayAware:"stay-aware"===a.opened.job}):(0,t.jsxs)("div",{className:"grid gap-8",children:[(0,t.jsx)("section",{className:"grid gap-3","aria-labelledby":"bridge-waiting-heading",children:0===r.items.length?(0,t.jsxs)("div",{"data-testid":"bridge-nothing-waits",className:"grid justify-items-center gap-1 rounded-lg border border-border bg-card p-6 text-center",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Nothing waits on you"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"Your ships have what they need from you. A question or a step shows here the moment one arrives."})]}):(0,t.jsx)(x,{items:r.items,readAt:o,opening:a})}),s,(0,t.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-stay-aware-heading",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,t.jsxs)("h2",{id:"bridge-stay-aware-heading",className:"inline-flex items-center gap-2 text-section font-semibold",children:[(0,t.jsx)(i.f,{"aria-hidden":"true",className:"size-4 shrink-0"}),"Stay aware"]}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground",children:[d.filter(({state:e})=>"new"===e).length," unseen, outside the count"]})]}),0===d.length?(0,t.jsx)("p",{"data-testid":"bridge-nothing-new",className:"rounded-md border border-border bg-card p-3 text-muted-foreground",children:"Nothing new. What you saw is in Done."}):(0,t.jsx)(v,{items:d,readAt:o,opening:a})]})]})}function j({items:e,lastReadAt:i}){let n=new Date(i);return(0,t.jsxs)("section",{className:"grid gap-3","aria-label":"Waiting on you, as last read",children:[0===e.length?null:(0,t.jsx)("ul",{inert:!0,className:"overflow-hidden rounded-lg border border-border bg-card opacity-60",children:e.map(e=>(0,t.jsx)(o.f,{item:e,now:n,isNew:"new"===e.state,isOpen:!1,staleKind:e.stale?.kind,outcome:h(e),failure:void 0,onOpen:void 0},e.deliveryId))}),(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:`Shown as last read, at ${(0,r.C)(i)}.`})]})}e.s(["HomePanel",0,function({fleetId:e,home:i,now:n,decidePlaces:a,argo:s}){let r=(0,m.useLastReadAt)();return void 0!==r?(0,t.jsx)(j,{items:i.waiting.items,lastReadAt:r}):(0,t.jsx)(u.f,{fleetId:e,decidePlaces:a,children:e=>(0,t.jsx)(w,{home:i,now:n,opening:e,argo:s})})},"StayAwareRows",0,v],85989)},3523,e=>{var t=e.i(43476),i=e.i(58487),n=e.i(5654),a=e.i(71645),s=e.i(73459),r=e.i(65894),d=e.i(67697),o=e.i(91710),l=e.i(11015),c=e.i(99522),u=e.i(75862),m=e.i(55266),h=e.i(57228),p=e.i(34244),g=e.i(43328),f=e.i(27538),b=e.i(77826),x=e.i(80734),v=e.i(60296),y=e.i(66734),w=e.i(47130);function j(){let{toasts:e}=n.f.useToastManager();return(0,t.jsx)(g.f.Portal,{children:(0,t.jsx)(f.f.Viewport,{className:"fixed bottom-4 left-4 z-50 hidden w-[min(24rem,calc(100vw-2rem))] gap-2 sm:grid",children:e.map(e=>(0,t.jsxs)(b.f.Root,{toast:e,"data-testid":"bridge-basket-toast",className:"flex items-start gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg",children:[(0,t.jsx)(w.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0"}),(0,t.jsxs)(x.f.Content,{className:"grid flex-1 gap-1",children:[(0,t.jsx)(v.f.Title,{className:"font-medium"}),(0,t.jsx)(y.f.Description,{className:"text-caption text-muted-foreground"})]})]},e.id))})})}var k=e.i(54235),N=e.i(62579),S=e.i(63132),I=e.i(75103),$=e.i(52021);function O({fleetId:e,decidePlaces:i,consoleUrl:g,children:f}){let b=n.f.useToastManager(),x=(0,I.P)(),[v,y]=(0,a.useState)(),[w,j]=(0,a.useState)(""),[A,R]=(0,a.useState)(),[z,L]=(0,a.useState)(),[P,M]=(0,a.useState)(),[T,B]=(0,a.useState)(),[C,D]=(0,a.useState)(),[U,q]=(0,a.useState)(),[,F]=(0,a.useTransition)(),[H,W]=(0,a.useState)(0);(0,$.R)(void 0===v?void 0:(0,p.u)(v.opened.job),()=>{y(void 0)});let _=t=>{R(t.deliveryId),B(void 0),q(void 0),F(async()=>{let i=await (0,l.f)(e,t.deliveryId);if(R(void 0),i.isOk){let e=t.inBasket??null;y({delivery:i.value,opened:{job:t.job,isAlert:t.isAlert??!1,wasNew:"seen"!==t.state},inBasket:e,finished:null}),j(e?.note??""),D(void 0)}else B({deliveryId:t.deliveryId,message:i.message})})},V=({control:e,action:t,onSettled:i})=>{M(e),D(void 0),F(async()=>{let e=await t();M(void 0),e.isOk?i(e.value):D(e.message)})},Y=e=>()=>{y(void 0),q(e)},K=void 0===v?void 0:{deliveryId:v.delivery.deliveryId,job:v.opened.job};return(0,t.jsx)(N.f,{list:(0,t.jsxs)("div",{className:"grid gap-4",children:[void 0===U?null:(0,t.jsx)(S.f,{message:U,isFailure:!1}),f({open:_,openingId:A,putPick:(t,i)=>{L(t.deliveryId),B(void 0),q(void 0),F(async()=>{let n=await (0,u.f)({fleet:e,deliveryId:t.deliveryId,option:i});L(void 0),n.isOk?(q(`Option ${String(i)} is in the basket, not sent: ${t.from} receives it when you send the basket.`),W(e=>e+1)):B({deliveryId:t.deliveryId,message:n.message})})},puttingId:z,failure:T,opened:K})]},H),item:void 0===v?void 0:(({delivery:n,inBasket:a,opened:l,finished:u})=>{let p=n.question?.id;return(0,t.jsx)(k.u,{delivery:n,opened:l,meetingHref:void 0===n.meetingId?void 0:(0,s.f)({fleetId:e,meetingId:n.meetingId}),consoleUrl:g,basketHref:(0,r.f)(h.H,e),inBasket:a,finished:u,places:i,note:w,working:P,failure:C,onNoteChange:j,onAnswer:t=>{V({control:void 0===t?{kind:"note"}:{kind:"option",option:t},action:()=>(0,d.f)({fleet:e,deliveryId:n.deliveryId,input:{questionId:n.question?.id,option:t,note:w}}),onSettled:Y(`Your answer went to ${n.from}.`)})},onPut:t=>{V({control:null===t?{kind:"note"}:{kind:"option",option:t},action:()=>(0,c.f)({fleet:e,deliveryId:n.deliveryId,option:t,optionLabel:n.question?.options.find(({key:e})=>e===t)?.label??null,note:w}),onSettled:e=>{var t;y({delivery:n,opened:l,finished:u,inBasket:e}),b.add({title:null===(t=e.option)?"Your note alone in the basket":`Option ${String(t)} in the basket`,description:"Not sent. Still waiting on you until you send it."})}})},onSend:t=>{V({control:{kind:"send"},action:()=>(0,d.f)({fleet:e,deliveryId:n.deliveryId,input:{questionId:p,option:t??void 0,note:w}}),onSettled:Y(`Your answer went to ${n.from}.`)})},onRemove:()=>{void 0!==p&&V({control:{kind:"remove"},action:()=>(0,m.f)(e,p),onSettled:Y(`Your answer to “${n.title}” is out of the basket; the question still waits on you.`)})},onDone:()=>{V({control:{kind:"done"},action:()=>(0,o.f)({fleet:e,deliveryId:n.deliveryId}),onSettled:Y(`Done with “${n.title}”.`)})},onFinishStep:t=>{V({control:{kind:t},action:()=>(0,o.f)({fleet:e,deliveryId:n.deliveryId,step:{outcome:t,note:w}}),onSettled:()=>{y({delivery:n,inBasket:a,opened:l,finished:{outcome:t,note:w.trim(),at:new Date().toISOString()}})}})},onOpen:e=>{_({deliveryId:e,job:l.job})},onSendMessage:void 0===n.alertShip||void 0===x?void 0:e=>{x({alertShip:e})},onBack:()=>{y(void 0)}},n.deliveryId)})(v)})}e.s(["f",0,function({fleetId:e,decidePlaces:n,consoleUrl:a,children:s}){return(0,t.jsxs)(i.f.Provider,{children:[(0,t.jsx)(O,{fleetId:e,decidePlaces:n,consoleUrl:a,children:s}),(0,t.jsx)(j,{})]})}],3523)},55070,e=>{var t=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},n={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:a,variant:s="secondary",size:r="regular",children:d,className:o="",disabled:l,...c}){return(0,t.jsx)("button",{...c,disabled:!0===l||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${n[r]} ${i[s]} ${o}`,children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}):d})},"o",0,n])},19015,e=>{var t=e.i(43476),i=e.i(70812),n=e.i(71136),a=e.i(96315),s=e.i(49287),r=e.i(28623),d=e.i(12497),o=e.i(91604),l=e.i(63132),c=e.i(779);let u={bridge:{icon:s.f,name:"Bridge"},slack:{icon:n.f,name:"Slack"},chat:{icon:r.f,name:"a chat"},"web-push":{icon:i.f,name:"web push"},email:{icon:a.f,name:"email"}};function m(){return(0,t.jsx)("span",{"aria-hidden":"true",className:"text-border",children:"·"})}function h({places:e}){var i;let n,a=["bridge",...e].map(e=>u[e]);return(0,t.jsx)("span",{role:"img","aria-label":`Shows in ${(n=(i=a.map(({name:e})=>e)).at(-1)??"",i.length<2?n:`${i.slice(0,-1).join(", ")} and ${n}`)}`,className:"inline-flex items-center gap-0.5",children:a.map(({icon:e,name:i})=>(0,t.jsx)(e,{"aria-hidden":"true",className:"size-3"},i))})}e.s(["f",0,function({item:e,now:i,isNew:n,isOpen:a=!1,staleKind:s,outcome:r,failure:u,onOpen:p,time:g,detail:f,actions:b}){var x;let v=e.isAlert??!1,y=(0,o.f)({job:e.job,isAlert:v}),w=y.icon,j="min-w-0 break-words text-left text-body-touch font-medium sm:truncate sm:text-body",k=void 0===s?e.title:(0,t.jsx)("s",{className:"decoration-muted-foreground",children:e.title});return(0,t.jsxs)("li",{"data-testid":"bridge-item","data-stale":void 0!==s,"aria-current":!!a||void 0,className:`grid min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto] items-start gap-x-2.5 gap-y-1.5 border-t border-border px-3 py-2.5 first:border-t-0 ${function({isOpen:e,isStale:t}){return e?"bg-highlight shadow-[inset_2px_0_0_var(--primary)]":t?"bg-muted":""}({isOpen:a,isStale:void 0!==s})}`,children:[(0,t.jsx)(w,{"aria-hidden":"true",className:`mt-0.5 size-4 ${y.tone}`}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline sm:items-center",children:[n?(0,t.jsx)("span",{"aria-label":"New",className:"mr-1.5 size-[7px] shrink-0 -translate-y-px rounded-full bg-primary"}):null,void 0===p?(0,t.jsx)("span",{"data-testid":"bridge-item-title",className:j,children:k}):(0,t.jsx)("button",{type:"button","data-testid":"bridge-item-title",onClick:p,className:`${j} hover:underline`,children:k})]}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)("span",{className:`font-medium ${y.tone}`,children:(0,d.z)({job:e.job,isAlert:v})}),(0,t.jsx)(m,{}),(0,t.jsx)("span",{children:e.from}),void 0===r?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m,{}),(0,t.jsxs)("span",{"data-testid":"bridge-outcome",className:"inline-flex items-center gap-1.5",children:[void 0===s?null:(0,t.jsx)(c.f,{kind:s}),r]})]}),void 0===e.places?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m,{}),(0,t.jsx)(h,{places:e.places})]})]})]}),(0,t.jsx)("time",{dateTime:g?.at??e.sentAt,title:(x=g?.at??e.sentAt,`${new Date(x).toISOString().slice(0,16).replace("T"," ")} UTC`),className:"whitespace-nowrap text-right text-caption text-muted-foreground",children:g?.said??(0,d.V)(e.sentAt,i)}),void 0===f?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:f}),null==b?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5",children:b}),void 0===u?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:(0,t.jsx)(l.f,{message:u,isFailure:!0})})]})}])},63132,e=>{var t=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,t.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,t.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},73459,67697,91710,11015,99522,75862,e=>{e.s(["f",0,function(e){let t=new URLSearchParams({fleet:e.fleetId,...void 0===e.cursor?{}:{cursor:e.cursor}});return`/meetings/${encodeURIComponent(e.meetingId)}?${t.toString()}`}],73459);var t=e.i(95187);let i=(0,t.createServerReference)("409cd60338f4d2ebe089c816413026d35d3df175a5",t.callServer,void 0,t.findSourceMapURL,"answerDelivery");e.s(["f",0,i],67697);let n=(0,t.createServerReference)("408692edd7e68a3b2abfaf17b76ec93d0a21b9b8dd",t.callServer,void 0,t.findSourceMapURL,"doneDelivery");e.s(["f",0,n],91710);let a=(0,t.createServerReference)("6097df6443a06e5261e3227b1398330a1729afe230",t.callServer,void 0,t.findSourceMapURL,"openDelivery");e.s(["f",0,a],11015);let s=(0,t.createServerReference)("4014750f115befb3caee699cea842d94c42ccdf35a",t.callServer,void 0,t.findSourceMapURL,"putInBasket");e.s(["f",0,s],99522);let r=(0,t.createServerReference)("405ccc10e32995d237032f7358fbf9bc977ccbaa8d",t.callServer,void 0,t.findSourceMapURL,"putPickInBasket");e.s(["f",0,r],75862)}])})();
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70812,71136,96315,28623,e=>{var t=e.i(56420);let a={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};a.node;let i=(0,t.f)(a);e.s(["f",0,i],70812);let s={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};s.node;let n=(0,t.f)(s);e.s(["f",0,n],71136);let r={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};r.node;let d=(0,t.f)(r);e.s(["f",0,d],96315);let o={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};o.node;let l=(0,t.f)(o);e.s(["f",0,l],28623)},51481,e=>{var t=e.i(75043);e.s(["f",()=>t.f])},59381,e=>{var t=e.i(56420);let a={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};a.node;let i=(0,t.f)(a);e.s(["f",0,i],59381)},31785,e=>{let t={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},a={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},i=["decide","do"],s="Bridge keeps every item.",n={label:"Not offered",isOk:!1},r={label:"Off",isOk:!1},d="Says only that something waits, with a link here.",o=`${d} Nothing is on until you turn it on.`,l="through the gateway. Lists what waits when you ask it.",c={slack:"Slack",chat:"a chat","web-push":"web push",email:"email"};e.s(["I",0,t,"k",0,a,"N",0,["slack","chat","web-push","email"],"g",0,function(e){return 0===e.length?{state:{label:"Not connected",isOk:!1},description:`claude.ai or another MCP client, ${l}`,action:"none"}:{state:{label:"Connected",isOk:!0},description:`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)}, ${l}`,action:"none"}},"t",0,function({isOffered:e,isOnForAnyJob:t}){return e?t?{state:{label:"On",isOk:!0},description:d,action:"turnOff"}:{state:r,description:o,action:"turnOn"}:{state:n,description:"This gateway sends no email.",action:"none"}},"T",0,function(e,t){return e.jobs.filter(({job:e,places:a})=>a.email!==t&&(!t||i.includes(e))).map(({job:e})=>({job:e,place:"email",isOn:t}))},"r",0,function(e){let t=["Bridge",...e.map(e=>c[e])],a=t.at(-1),i=1===t.length?"Bridge":`${t.slice(0,-1).join(", ")} and ${String(a)}`;return`Shows in ${i}, as Where things show sets for Decide. One answer, wherever you give it.`},"H",0,function(e){if(null===e)return{state:{label:"Not connected",isOk:!1},description:"This fleet has no Slack workspace.",action:"none"};let{workspaceName:t,link:a}=e;return null===a?{state:{label:"Not linked",isOk:!1},description:`Link your Slack account in ${t} to see items there and answer them.`,action:"link"}:{state:{label:"Linked",isOk:!0},description:`As @${a.slackName} in ${t}. A button press or a thread reply there is yours.`,action:"unlink"}},"b",0,function(e){let{job:i,place:n,isOn:r,waiting:d,isChatOn:o}=e,{name:l,item:c,items:m}=t[i],u=`${a[n]} is ${r?"on":"off"} for ${l}`;return r?"chat"===n?{title:u,detail:`A chat lists every ${c} not done when you ask it.`}:{title:u,detail:`${a[n]} shows ${m} that arrive from now on.${void 0===d||0===d?"":` The ${String(d)} already waiting ${1===d?"stays":"stay"} ${o?"in Bridge and in a chat":"in Bridge"}.`}`}:{title:u,detail:"everything-else"===i&&"slack"===n?`Bots only: a bot ship's messages and replies to Slack still show there. ${s}`:s}},"B",0,function(e){if(!e.isOffered)return{state:n,description:"This gateway sends no web push.",action:"none"};if(!e.isTaken)return{state:r,description:"This browser takes no web push.",action:"none"};let t=e.browsers.find(({endpoint:t,isGone:a})=>t===e.ownEndpoint&&!a);return void 0===t?{state:r,description:o,action:"turnOn"}:{state:{label:"This browser",isOk:!0},description:`${t.browser}. ${d}`,action:"remove"}}])},15685,e=>{var t=e.i(43476),a=e.i(85595),i=e.i(16984),s=e.i(71645),n=e.i(95187);let r=(0,n.createServerReference)("60c5b99453e0132475e77c2c3aa9c162dbd903feb1",n.callServer,void 0,n.findSourceMapURL,"readMoreRecord");var d=e.i(12497),o=e.i(55070),l=e.i(29247),c=e.i(54235),m=e.i(92407);function u({question:e,answered:a}){return(0,t.jsx)("ul",{className:"grid gap-2","aria-label":"Options",children:e.options.map(i=>{let s=i.key===a;return(0,t.jsxs)("li",{"data-answered":s,className:`flex items-start gap-3 rounded-md border p-3 ${s?"border-ring ring-1 ring-ring":"border-border text-muted-foreground"}`,children:[(0,t.jsx)("span",{"data-testid":"bridge-done-radio","data-filled":s,"aria-hidden":"true",className:`mt-1 grid size-4 shrink-0 place-items-center rounded-full border ${s?"border-primary":"border-border"}`,children:s?(0,t.jsx)("span",{className:"size-2 rounded-full bg-primary"}):null}),(0,t.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,t.jsxs)("span",{className:"font-medium",children:[i.key,". ",i.label]}),""===i.detail?null:(0,t.jsx)("span",{className:"text-caption text-muted-foreground max-md:hidden",children:i.detail})]}),i.key===e.pick.option?(0,t.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},i.key)})})}function h({ended:e}){let s=e.isOk?a.f:i.f;return(0,t.jsxs)("div",{"data-testid":"bridge-done-ended",role:"status",className:`flex items-start gap-3 rounded-md border p-3 ${e.isOk?"border-tone-ok-border bg-tone-ok-bg":"border-tone-ended-border bg-tone-ended-bg"}`,children:[(0,t.jsx)(s,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 ${e.isOk?"text-tone-ok-fg":"text-tone-ended-fg"}`}),(0,t.jsxs)("span",{className:"grid gap-0.5",children:[(0,t.jsx)("span",{className:"font-medium",children:e.text}),void 0===e.sent?null:(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e.sent})]})]})}function p({item:e,timeZone:a}){return(0,t.jsx)("ol",{"data-testid":"bridge-done-history",className:"grid gap-1.5 text-caption max-md:hidden",children:(0,d.L)(e,a).map(e=>(0,t.jsxs)("li",{className:"grid grid-cols-[3rem_0.5rem_minmax(0,1fr)] items-center gap-2",children:[(0,t.jsx)("span",{className:"text-muted-foreground tabular-nums",children:e.at}),(0,t.jsx)("i",{"aria-hidden":"true",className:`size-1.5 rounded-full ${e.isEnd?"bg-tone-ok-fg":"bg-border"}`}),(0,t.jsxs)("span",{children:[e.text,void 0===e.detail?null:(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" · ",e.detail]})]})]},`${e.at} ${e.text}`))})}function x({item:e,timeZone:a,bridgeHost:i,onBack:s}){let n=(0,l.N)(e),r=(0,l.R)(e,i),o=(0,d.d)(e,a),g={job:e.job,isAlert:e.isAlert,wasNew:!1};return(0,t.jsxs)("section",{"data-testid":"bridge-done-item",className:"grid min-w-0 content-start gap-3 text-card-foreground md:p-5",children:[(0,t.jsx)(c.g,{opened:g,title:(0,d.c)(e),isWorking:!1,onBack:s}),(0,t.jsx)(c.$,{delivery:e,opened:g,timeZone:a}),(0,t.jsx)("h2",{className:"text-heading font-semibold",children:n?.title??e.title}),void 0!==r?(0,t.jsx)(c.l,{step:r,isStale:!1,isFinished:!0}):void 0===n?(0,t.jsx)(m.f,{text:(0,l.Y)(e)}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:c.R,children:(0,t.jsx)(m.f,{text:n.context})}),(0,t.jsx)(u,{question:n,answered:e.outcome?.option??null})]}),void 0===o?null:(0,t.jsx)(h,{ended:o}),(0,t.jsx)(p,{item:e,timeZone:a})]})}var g=e.i(19015),b=e.i(62579),f=e.i(63132);function y(){return()=>void 0}function j(e){return e.outcome?.at??e.sentAt}function v({item:e}){let s=(0,d.o)(e),n=s.isOk?a.f:i.f;return(0,t.jsxs)("span",{"data-testid":"bridge-done-outcome",className:"flex items-start gap-1.5 text-caption",children:[(0,t.jsx)(n,{"aria-hidden":"true",className:`mt-0.5 size-3.5 shrink-0 ${s.isOk?"text-tone-ok-fg":"text-muted-foreground"}`}),s.text]})}e.s(["DonePanel",0,function({fleetId:e,first:a,now:i}){let n=new Date(i),l=(0,s.useSyncExternalStore)(y,()=>Intl.DateTimeFormat().resolvedOptions().timeZone,()=>"UTC"),[c,m]=(0,s.useState)(a.items),[u,h]=(0,s.useState)(a.nextCursor),[p,k]=(0,s.useState)(),[w,N]=(0,s.useState)(),[$,O]=(0,s.useTransition)(),S=c.find(({deliveryId:e})=>e===w);return(0,t.jsx)(b.f,{list:(0,t.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-done-heading",children:[(0,t.jsxs)("div",{className:void 0===S?"":"md:px-3 md:pt-3",children:[(0,t.jsx)("h1",{id:"bridge-done-heading",className:"text-heading font-semibold",children:"Done"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Everything that reached you, with what came of it and where. Opening one reads it back whole."})]}),0===c.length?(0,t.jsx)("p",{"data-testid":"bridge-record-empty",className:"rounded-md border border-border bg-card p-3 text-muted-foreground",children:"Nothing is done yet."}):(function(e,t){let a=[];for(let i of e){let e=(0,d.Y)(j(i),t),s=a.at(-1);s?.day===e?s.items.push(i):a.push({day:e,items:[i]})}return a})(c,{now:n,timeZone:l}).map(({day:e,items:a})=>(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)("h2",{className:`text-caption text-muted-foreground ${void 0===S?"":"md:px-3"}`,children:e}),(0,t.jsx)("ul",{className:"overflow-hidden rounded-lg border border-border bg-card",children:a.map(e=>(0,t.jsx)(g.f,{item:e,now:n,isNew:!1,isOpen:e.deliveryId===w,outcome:void 0,failure:void 0,time:{at:j(e),said:(0,d.Z)(j(e),l)},detail:(0,t.jsx)(v,{item:e}),onOpen:()=>{N(e.deliveryId)}},e.deliveryId))})]},e)),void 0===p?null:(0,t.jsx)(f.f,{message:p,isFailure:!0}),null===u?null:(0,t.jsx)(o.i,{"data-testid":"bridge-more",className:"justify-self-start",isPending:$,pendingLabel:"Reading...",onClick:()=>{k(void 0),O(async()=>{let t=await r(e,u);t.isOk?(m(e=>[...e,...t.value.items]),h(t.value.nextCursor)):k(t.message)})},children:"Show older"})]}),item:void 0===S?void 0:(0,t.jsx)(x,{item:S,timeZone:l,bridgeHost:window.location.host,onBack:()=>{N(void 0)}})})}],15685)},94528,e=>{var t=e.i(43476),a=e.i(17904),i=e.i(29039);e.s(["FadedAsLastRead",0,function({children:e}){let s=(0,i.useLastReadAt)();return void 0===s?e:(0,t.jsxs)("div",{className:"grid gap-3",children:[(0,t.jsx)("div",{inert:!0,className:"opacity-60 [&_button:not([data-testid=bridge-item-title])]:hidden",children:e}),(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:`Shown as last read, at ${(0,a.C)(s)}.`})]})}])},55070,e=>{var t=e.i(43476);let a={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},i={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:s,variant:n="secondary",size:r="regular",children:d,className:o="",disabled:l,...c}){return(0,t.jsx)("button",{...c,disabled:!0===l||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${i[r]} ${a[n]} ${o}`,children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),s]}):d})},"o",0,i])},19015,e=>{var t=e.i(43476),a=e.i(70812),i=e.i(71136),s=e.i(96315),n=e.i(49287),r=e.i(28623),d=e.i(12497),o=e.i(91604),l=e.i(63132),c=e.i(779);let m={bridge:{icon:n.f,name:"Bridge"},slack:{icon:i.f,name:"Slack"},chat:{icon:r.f,name:"a chat"},"web-push":{icon:a.f,name:"web push"},email:{icon:s.f,name:"email"}};function u(){return(0,t.jsx)("span",{"aria-hidden":"true",className:"text-border",children:"·"})}function h({places:e}){var a;let i,s=["bridge",...e].map(e=>m[e]);return(0,t.jsx)("span",{role:"img","aria-label":`Shows in ${(i=(a=s.map(({name:e})=>e)).at(-1)??"",a.length<2?i:`${a.slice(0,-1).join(", ")} and ${i}`)}`,className:"inline-flex items-center gap-0.5",children:s.map(({icon:e,name:a})=>(0,t.jsx)(e,{"aria-hidden":"true",className:"size-3"},a))})}e.s(["f",0,function({item:e,now:a,isNew:i,isOpen:s=!1,staleKind:n,outcome:r,failure:m,onOpen:p,time:x,detail:g,actions:b}){var f;let y=e.isAlert??!1,j=(0,o.f)({job:e.job,isAlert:y}),v=j.icon,k="min-w-0 break-words text-left text-body-touch font-medium sm:truncate sm:text-body",w=void 0===n?e.title:(0,t.jsx)("s",{className:"decoration-muted-foreground",children:e.title});return(0,t.jsxs)("li",{"data-testid":"bridge-item","data-stale":void 0!==n,"aria-current":!!s||void 0,className:`grid min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto] items-start gap-x-2.5 gap-y-1.5 border-t border-border px-3 py-2.5 first:border-t-0 ${function({isOpen:e,isStale:t}){return e?"bg-highlight shadow-[inset_2px_0_0_var(--primary)]":t?"bg-muted":""}({isOpen:s,isStale:void 0!==n})}`,children:[(0,t.jsx)(v,{"aria-hidden":"true",className:`mt-0.5 size-4 ${j.tone}`}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline sm:items-center",children:[i?(0,t.jsx)("span",{"aria-label":"New",className:"mr-1.5 size-[7px] shrink-0 -translate-y-px rounded-full bg-primary"}):null,void 0===p?(0,t.jsx)("span",{"data-testid":"bridge-item-title",className:k,children:w}):(0,t.jsx)("button",{type:"button","data-testid":"bridge-item-title",onClick:p,className:`${k} hover:underline`,children:w})]}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)("span",{className:`font-medium ${j.tone}`,children:(0,d.z)({job:e.job,isAlert:y})}),(0,t.jsx)(u,{}),(0,t.jsx)("span",{children:e.from}),void 0===r?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)("span",{"data-testid":"bridge-outcome",className:"inline-flex items-center gap-1.5",children:[void 0===n?null:(0,t.jsx)(c.f,{kind:n}),r]})]}),void 0===e.places?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u,{}),(0,t.jsx)(h,{places:e.places})]})]})]}),(0,t.jsx)("time",{dateTime:x?.at??e.sentAt,title:(f=x?.at??e.sentAt,`${new Date(f).toISOString().slice(0,16).replace("T"," ")} UTC`),className:"whitespace-nowrap text-right text-caption text-muted-foreground",children:x?.said??(0,d.V)(e.sentAt,a)}),void 0===g?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:g}),null==b?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5",children:b}),void 0===m?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:(0,t.jsx)(l.f,{message:m,isFailure:!0})})]})}])},63132,e=>{var t=e.i(43476);e.s(["f",0,function({message:e,isFailure:a}){return a?(0,t.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,t.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70812,71136,96315,28623,e=>{var t=e.i(56420);let i={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};i.node;let a=(0,t.f)(i);e.s(["f",0,a],70812);let s={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};s.node;let n=(0,t.f)(s);e.s(["f",0,n],71136);let r={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};r.node;let d=(0,t.f)(r);e.s(["f",0,d],96315);let o={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};o.node;let l=(0,t.f)(o);e.s(["f",0,l],28623)},51481,e=>{var t=e.i(75043);e.s(["f",()=>t.f])},59381,e=>{var t=e.i(56420);let i={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};i.node;let a=(0,t.f)(i);e.s(["f",0,a],59381)},31785,e=>{let t={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},i={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},a=["decide","do"],s="Bridge keeps every item.",n={label:"Not offered",isOk:!1},r={label:"Off",isOk:!1},d="Says only that something waits, with a link here.",o=`${d} Nothing is on until you turn it on.`,l="through the gateway. Lists what waits when you ask it.",c={slack:"Slack",chat:"a chat","web-push":"web push",email:"email"};e.s(["I",0,t,"k",0,i,"N",0,["slack","chat","web-push","email"],"g",0,function(e){return 0===e.length?{state:{label:"Not connected",isOk:!1},description:`claude.ai or another MCP client, ${l}`,action:"none"}:{state:{label:"Connected",isOk:!0},description:`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)}, ${l}`,action:"none"}},"t",0,function({isOffered:e,isOnForAnyJob:t}){return e?t?{state:{label:"On",isOk:!0},description:d,action:"turnOff"}:{state:r,description:o,action:"turnOn"}:{state:n,description:"This gateway sends no email.",action:"none"}},"T",0,function(e,t){return e.jobs.filter(({job:e,places:i})=>i.email!==t&&(!t||a.includes(e))).map(({job:e})=>({job:e,place:"email",isOn:t}))},"r",0,function(e){let t=["Bridge",...e.map(e=>c[e])],i=t.at(-1),a=1===t.length?"Bridge":`${t.slice(0,-1).join(", ")} and ${String(i)}`;return`Shows in ${a}, as Where things show sets for Decide. One answer, wherever you give it.`},"H",0,function(e){if(null===e)return{state:{label:"Not connected",isOk:!1},description:"This fleet has no Slack workspace.",action:"none"};let{workspaceName:t,link:i}=e;return null===i?{state:{label:"Not linked",isOk:!1},description:`Link your Slack account in ${t} to see items there and answer them.`,action:"link"}:{state:{label:"Linked",isOk:!0},description:`As @${i.slackName} in ${t}. A button press or a thread reply there is yours.`,action:"unlink"}},"b",0,function(e){let{job:a,place:n,isOn:r,waiting:d,isChatOn:o}=e,{name:l,item:c,items:m}=t[a],u=`${i[n]} is ${r?"on":"off"} for ${l}`;return r?"chat"===n?{title:u,detail:`A chat lists every ${c} not done when you ask it.`}:{title:u,detail:`${i[n]} shows ${m} that arrive from now on.${void 0===d||0===d?"":` The ${String(d)} already waiting ${1===d?"stays":"stay"} ${o?"in Bridge and in a chat":"in Bridge"}.`}`}:{title:u,detail:"everything-else"===a&&"slack"===n?`Bots only: a bot ship's messages and replies to Slack still show there. ${s}`:s}},"B",0,function(e){if(!e.isOffered)return{state:n,description:"This gateway sends no web push.",action:"none"};if(!e.isTaken)return{state:r,description:"This browser takes no web push.",action:"none"};let t=e.browsers.find(({endpoint:t,isGone:i})=>t===e.ownEndpoint&&!i);return void 0===t?{state:r,description:o,action:"turnOn"}:{state:{label:"This browser",isOk:!0},description:`${t.browser}. ${d}`,action:"remove"}}])},15685,e=>{var t=e.i(43476),i=e.i(85595),a=e.i(16984),s=e.i(71645),n=e.i(95187);let r=(0,n.createServerReference)("606cb6a4b44b6d1f3ee3cb4926fd252ef8c38e6829",n.callServer,void 0,n.findSourceMapURL,"readMoreRecord");var d=e.i(12497),o=e.i(55070),l=e.i(29247),c=e.i(54235),m=e.i(92407);function u({question:e,answered:i}){return(0,t.jsx)("ul",{className:"grid gap-2","aria-label":"Options",children:e.options.map(a=>{let s=a.key===i;return(0,t.jsxs)("li",{"data-answered":s,className:`flex items-start gap-3 rounded-md border p-3 ${s?"border-ring ring-1 ring-ring":"border-border text-muted-foreground"}`,children:[(0,t.jsx)("span",{"data-testid":"bridge-done-radio","data-filled":s,"aria-hidden":"true",className:`mt-1 grid size-4 shrink-0 place-items-center rounded-full border ${s?"border-primary":"border-border"}`,children:s?(0,t.jsx)("span",{className:"size-2 rounded-full bg-primary"}):null}),(0,t.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,t.jsxs)("span",{className:"font-medium",children:[a.key,". ",a.label]}),""===a.detail?null:(0,t.jsx)("span",{className:"text-caption text-muted-foreground max-md:hidden",children:a.detail})]}),a.key===e.pick.option?(0,t.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},a.key)})})}function h({ended:e}){let s=e.isOk?i.f:a.f;return(0,t.jsxs)("div",{"data-testid":"bridge-done-ended",role:"status",className:`flex items-start gap-3 rounded-md border p-3 ${e.isOk?"border-tone-ok-border bg-tone-ok-bg":"border-tone-ended-border bg-tone-ended-bg"}`,children:[(0,t.jsx)(s,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 ${e.isOk?"text-tone-ok-fg":"text-tone-ended-fg"}`}),(0,t.jsxs)("span",{className:"grid gap-0.5",children:[(0,t.jsx)("span",{className:"font-medium",children:e.text}),void 0===e.sent?null:(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e.sent})]})]})}function p({item:e,timeZone:i}){return(0,t.jsx)("ol",{"data-testid":"bridge-done-history",className:"grid gap-1.5 text-caption max-md:hidden",children:(0,d.L)(e,i).map(e=>(0,t.jsxs)("li",{className:"grid grid-cols-[3rem_0.5rem_minmax(0,1fr)] items-center gap-2",children:[(0,t.jsx)("span",{className:"text-muted-foreground tabular-nums",children:e.at}),(0,t.jsx)("i",{"aria-hidden":"true",className:`size-1.5 rounded-full ${e.isEnd?"bg-tone-ok-fg":"bg-border"}`}),(0,t.jsxs)("span",{children:[e.text,void 0===e.detail?null:(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" · ",e.detail]})]})]},`${e.at} ${e.text}`))})}function x({item:e,timeZone:i,bridgeHost:a,onBack:s}){let n=(0,l.N)(e),r=(0,l.R)(e,a),o=(0,d.d)(e,i),g={job:e.job,isAlert:e.isAlert,wasNew:!1};return(0,t.jsxs)("section",{"data-testid":"bridge-done-item",className:"grid min-w-0 content-start gap-3 text-card-foreground md:p-5",children:[(0,t.jsx)(c.g,{opened:g,title:(0,d.c)(e),isWorking:!1,onBack:s}),(0,t.jsx)(c.$,{delivery:e,opened:g,timeZone:i}),(0,t.jsx)("h2",{className:"text-heading font-semibold",children:n?.title??e.title}),void 0!==r?(0,t.jsx)(c.l,{step:r,isStale:!1,isFinished:!0}):void 0===n?(0,t.jsx)(m.f,{text:(0,l.Y)(e)}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:c.R,children:(0,t.jsx)(m.f,{text:n.context})}),(0,t.jsx)(u,{question:n,answered:e.outcome?.option??null})]}),void 0===o?null:(0,t.jsx)(h,{ended:o}),(0,t.jsx)(p,{item:e,timeZone:i})]})}var g=e.i(19015),f=e.i(62579),b=e.i(63132);function y(){return()=>void 0}function j(e){return e.outcome?.at??e.sentAt}function v({item:e}){let s=(0,d.o)(e),n=s.isOk?i.f:a.f;return(0,t.jsxs)("span",{"data-testid":"bridge-done-outcome",className:"flex items-start gap-1.5 text-caption",children:[(0,t.jsx)(n,{"aria-hidden":"true",className:`mt-0.5 size-3.5 shrink-0 ${s.isOk?"text-tone-ok-fg":"text-muted-foreground"}`}),s.text]})}e.s(["DonePanel",0,function({fleetId:e,first:i,now:a}){let n=new Date(a),l=(0,s.useSyncExternalStore)(y,()=>Intl.DateTimeFormat().resolvedOptions().timeZone,()=>"UTC"),[c,m]=(0,s.useState)(i.items),[u,h]=(0,s.useState)(i.nextCursor),[p,k]=(0,s.useState)(),[w,N]=(0,s.useState)(),[$,O]=(0,s.useTransition)(),S=c.find(({deliveryId:e})=>e===w);return(0,t.jsx)(f.f,{list:(0,t.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-done-heading",children:[(0,t.jsxs)("div",{className:void 0===S?"":"md:px-3 md:pt-3",children:[(0,t.jsx)("h1",{id:"bridge-done-heading",className:"text-heading font-semibold",children:"Done"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Everything that reached you, with what came of it and where. Opening one reads it back whole."})]}),0===c.length?(0,t.jsx)("p",{"data-testid":"bridge-record-empty",className:"rounded-md border border-border bg-card p-3 text-muted-foreground",children:"Nothing is done yet."}):(function(e,t){let i=[];for(let a of e){let e=(0,d.Y)(j(a),t),s=i.at(-1);s?.day===e?s.items.push(a):i.push({day:e,items:[a]})}return i})(c,{now:n,timeZone:l}).map(({day:e,items:i})=>(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)("h2",{className:`text-caption text-muted-foreground ${void 0===S?"":"md:px-3"}`,children:e}),(0,t.jsx)("ul",{className:"overflow-hidden rounded-lg border border-border bg-card",children:i.map(e=>(0,t.jsx)(g.f,{item:e,now:n,isNew:!1,isOpen:e.deliveryId===w,outcome:void 0,failure:void 0,time:{at:j(e),said:(0,d.Z)(j(e),l)},detail:(0,t.jsx)(v,{item:e}),onOpen:()=>{N(e.deliveryId)}},e.deliveryId))})]},e)),void 0===p?null:(0,t.jsx)(b.f,{message:p,isFailure:!0}),null===u?null:(0,t.jsx)(o.i,{"data-testid":"bridge-more",className:"justify-self-start",isPending:$,pendingLabel:"Reading...",onClick:()=>{k(void 0),O(async()=>{let t=await r(e,u);t.isOk?(m(e=>[...e,...t.value.items]),h(t.value.nextCursor)):k(t.message)})},children:"Show older"})]}),item:void 0===S?void 0:(0,t.jsx)(x,{item:S,timeZone:l,bridgeHost:window.location.host,onBack:()=>{N(void 0)}})})}],15685)},94528,e=>{var t=e.i(43476),i=e.i(17904),a=e.i(29039);e.s(["FadedAsLastRead",0,function({children:e}){let s=(0,a.useLastReadAt)();return void 0===s?e:(0,t.jsxs)("div",{className:"grid gap-3",children:[(0,t.jsx)("div",{inert:!0,className:"opacity-60 [&_button:not([data-testid=bridge-item-title])]:hidden",children:e}),(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:`Shown as last read, at ${(0,i.C)(s)}.`})]})}])},55070,e=>{var t=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},a={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:s,variant:n="secondary",size:r="regular",children:d,className:o="",disabled:l,...c}){return(0,t.jsx)("button",{...c,disabled:!0===l||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${a[r]} ${i[n]} ${o}`,children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),s]}):d})},"o",0,a])},19015,e=>{var t=e.i(43476),i=e.i(70812),a=e.i(71136),s=e.i(96315),n=e.i(49287),r=e.i(28623),d=e.i(12497),o=e.i(91604),l=e.i(63132),c=e.i(779);let m={bridge:{icon:n.f,name:"Bridge"},slack:{icon:a.f,name:"Slack"},chat:{icon:r.f,name:"a chat"},"web-push":{icon:i.f,name:"web push"},email:{icon:s.f,name:"email"}};function u(){return(0,t.jsx)("span",{"aria-hidden":"true",className:"text-border",children:"·"})}function h({places:e}){var i;let a,s=["bridge",...e].map(e=>m[e]);return(0,t.jsx)("span",{role:"img","aria-label":`Shows in ${(a=(i=s.map(({name:e})=>e)).at(-1)??"",i.length<2?a:`${i.slice(0,-1).join(", ")} and ${a}`)}`,className:"inline-flex items-center gap-0.5",children:s.map(({icon:e,name:i})=>(0,t.jsx)(e,{"aria-hidden":"true",className:"size-3"},i))})}e.s(["f",0,function({item:e,now:i,isNew:a,isOpen:s=!1,staleKind:n,outcome:r,failure:m,onOpen:p,time:x,detail:g,actions:f}){var b;let y=e.isAlert??!1,j=(0,o.f)({job:e.job,isAlert:y}),v=j.icon,k="min-w-0 break-words text-left text-body-touch font-medium sm:truncate sm:text-body",w=void 0===n?e.title:(0,t.jsx)("s",{className:"decoration-muted-foreground",children:e.title});return(0,t.jsxs)("li",{"data-testid":"bridge-item","data-stale":void 0!==n,"aria-current":!!s||void 0,className:`grid min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto] items-start gap-x-2.5 gap-y-1.5 border-t border-border px-3 py-2.5 first:border-t-0 ${function({isOpen:e,isStale:t}){return e?"bg-highlight shadow-[inset_2px_0_0_var(--primary)]":t?"bg-muted":""}({isOpen:s,isStale:void 0!==n})}`,children:[(0,t.jsx)(v,{"aria-hidden":"true",className:`mt-0.5 size-4 ${j.tone}`}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline sm:items-center",children:[a?(0,t.jsx)("span",{"aria-label":"New",className:"mr-1.5 size-[7px] shrink-0 -translate-y-px rounded-full bg-primary"}):null,void 0===p?(0,t.jsx)("span",{"data-testid":"bridge-item-title",className:k,children:w}):(0,t.jsx)("button",{type:"button","data-testid":"bridge-item-title",onClick:p,className:`${k} hover:underline`,children:w})]}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)("span",{className:`font-medium ${j.tone}`,children:(0,d.z)({job:e.job,isAlert:y})}),(0,t.jsx)(u,{}),(0,t.jsx)("span",{children:e.from}),void 0===r?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u,{}),(0,t.jsxs)("span",{"data-testid":"bridge-outcome",className:"inline-flex items-center gap-1.5",children:[void 0===n?null:(0,t.jsx)(c.f,{kind:n}),r]})]}),void 0===e.places?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u,{}),(0,t.jsx)(h,{places:e.places})]})]})]}),(0,t.jsx)("time",{dateTime:x?.at??e.sentAt,title:(b=x?.at??e.sentAt,`${new Date(b).toISOString().slice(0,16).replace("T"," ")} UTC`),className:"whitespace-nowrap text-right text-caption text-muted-foreground",children:x?.said??(0,d.V)(e.sentAt,i)}),void 0===g?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:g}),null==f?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5",children:f}),void 0===m?null:(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:(0,t.jsx)(l.f,{message:m,isFailure:!0})})]})}])},63132,e=>{var t=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,t.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,t.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])}])})();
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51481,e=>{var t=e.i(75043);e.s(["f",()=>t.f])},59381,e=>{var t=e.i(56420);let n={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};n.node;let i=(0,t.f)(n);e.s(["f",0,i],59381)},89606,e=>{var t=e.i(95187);let n=(0,t.createServerReference)("6035c62f7ea2fe751d1fb958ab8f9a2246fbb4f181",t.callServer,void 0,t.findSourceMapURL,"removeFromBasket");e.s(["f",0,n])},31785,e=>{let t={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},n={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},i=["decide","do"],s="Bridge keeps every item.",a={label:"Not offered",isOk:!1},r={label:"Off",isOk:!1},d="Says only that something waits, with a link here.",o=`${d} Nothing is on until you turn it on.`,l="through the gateway. Lists what waits when you ask it.",c={slack:"Slack",chat:"a chat","web-push":"web push",email:"email"};e.s(["I",0,t,"k",0,n,"N",0,["slack","chat","web-push","email"],"g",0,function(e){return 0===e.length?{state:{label:"Not connected",isOk:!1},description:`claude.ai or another MCP client, ${l}`,action:"none"}:{state:{label:"Connected",isOk:!0},description:`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)}, ${l}`,action:"none"}},"t",0,function({isOffered:e,isOnForAnyJob:t}){return e?t?{state:{label:"On",isOk:!0},description:d,action:"turnOff"}:{state:r,description:o,action:"turnOn"}:{state:a,description:"This gateway sends no email.",action:"none"}},"T",0,function(e,t){return e.jobs.filter(({job:e,places:n})=>n.email!==t&&(!t||i.includes(e))).map(({job:e})=>({job:e,place:"email",isOn:t}))},"r",0,function(e){let t=["Bridge",...e.map(e=>c[e])],n=t.at(-1),i=1===t.length?"Bridge":`${t.slice(0,-1).join(", ")} and ${String(n)}`;return`Shows in ${i}, as Where things show sets for Decide. One answer, wherever you give it.`},"H",0,function(e){if(null===e)return{state:{label:"Not connected",isOk:!1},description:"This fleet has no Slack workspace.",action:"none"};let{workspaceName:t,link:n}=e;return null===n?{state:{label:"Not linked",isOk:!1},description:`Link your Slack account in ${t} to see items there and answer them.`,action:"link"}:{state:{label:"Linked",isOk:!0},description:`As @${n.slackName} in ${t}. A button press or a thread reply there is yours.`,action:"unlink"}},"b",0,function(e){let{job:i,place:a,isOn:r,waiting:d,isChatOn:o}=e,{name:l,item:c,items:u}=t[i],h=`${n[a]} is ${r?"on":"off"} for ${l}`;return r?"chat"===a?{title:h,detail:`A chat lists every ${c} not done when you ask it.`}:{title:h,detail:`${n[a]} shows ${u} that arrive from now on.${void 0===d||0===d?"":` The ${String(d)} already waiting ${1===d?"stays":"stay"} ${o?"in Bridge and in a chat":"in Bridge"}.`}`}:{title:h,detail:"everything-else"===i&&"slack"===a?`Bots only: a bot ship's messages and replies to Slack still show there. ${s}`:s}},"B",0,function(e){if(!e.isOffered)return{state:a,description:"This gateway sends no web push.",action:"none"};if(!e.isTaken)return{state:r,description:"This browser takes no web push.",action:"none"};let t=e.browsers.find(({endpoint:t,isGone:n})=>t===e.ownEndpoint&&!n);return void 0===t?{state:r,description:o,action:"turnOn"}:{state:{label:"This browser",isOk:!0},description:`${t.browser}. ${d}`,action:"remove"}}])},22141,e=>{var t=e.i(43476),n=e.i(56420);let i={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};i.node;let s=(0,n.f)(i);var a=e.i(47211),r=e.i(89664),d=e.i(22768),o=e.i(85595),l=e.i(51481);let c={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};c.node;let u=(0,n.f)(c);var h=e.i(11568);let p={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};p.node;let g=(0,n.f)(p);var m=e.i(32645),f=e.i(30274),b=e.i(47130),x=e.i(63676),v=e.i(71645),k=e.i(89606),w=e.i(95187);let y=(0,w.createServerReference)("40c65d41cf7b9f23d5c1149049d9da9bedfd77c6e0",w.callServer,void 0,w.findSourceMapURL,"sendBasket");function j(e){return`${new Date(e).toISOString().slice(11,16)} UTC`}let S={bridge:"in Bridge",chat:"in a chat",slack:"in Slack",gateway:"by the gateway"};function $(e){return{desktop:e,phone:e}}function N(e){return 1===e?"1 answer":`${String(e)} answers`}function I(e){return e.length<=1?e.join(""):`${e.slice(0,-1).join(", ")} and ${e.at(-1)??""}`}function R(e){return[...new Set(e.map(({from:e})=>e))]}var O=e.i(55070),z=e.i(63132),T=e.i(3523);let B={sent:o.f,sending:h.f,next:u,unanswered:h.f,refused:d.f,withdrawn:a.f,replaced:m.f,elsewhere:r.f},L={ok:"text-tone-ok-fg",waiting:"text-tone-waiting-fg",attention:"text-tone-attention-fg",off:"text-muted-foreground"};function A({words:e}){return e.desktop===e.phone?(0,t.jsx)("span",{children:e.desktop}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:e.desktop}),(0,t.jsx)("span",{className:"sm:hidden",children:e.phone})]})}function M({line:e}){let n=B[e.icon];return(0,t.jsxs)("p",{"data-testid":"bridge-basket-standing",className:"col-span-2 col-start-2 flex items-start gap-1.5 text-meta",children:[(0,t.jsx)(n,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 ${L[e.tone]}`}),(0,t.jsx)("span",{children:(0,t.jsx)(A,{words:e.words})})]})}function P({entry:e,line:n,opening:i,working:a,onRemove:r}){let{standing:d}=e,o="withdrawn"===d.kind||"replaced"===d.kind||"dealtElsewhere"===d.kind,c=void 0!==a||void 0!==i.openingId,u=a?.kind==="remove"&&a.questionId===e.questionId,h="replaced"===d.kind?d.replacementId:null,p=o?"line-through decoration-muted-foreground":"";return(0,t.jsxs)("li",{"data-testid":"bridge-basket-entry","data-standing":d.kind,className:`grid grid-cols-[18px_1fr_auto] items-start gap-x-2.5 gap-y-1.5 border-t border-border p-3 first:border-t-0 sm:px-3.5 ${o?"bg-muted":""}`,children:[(0,t.jsx)(l.f,{"aria-hidden":!0,className:"mt-0.5 size-4 text-tone-active-fg"}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:`font-medium ${p}`,children:e.title}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsxs)("span",{children:["to ",(0,t.jsx)("b",{className:"font-medium text-foreground",children:e.from})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"hidden text-border sm:inline",children:"·"}),(0,t.jsxs)("span",{className:"hidden sm:inline",children:["asked at ",(0,t.jsx)("time",{dateTime:e.sentAt,children:j(e.sentAt)})]})]}),(0,t.jsxs)("span",{className:`${o?"hidden sm:flex":"flex"} items-center gap-1.5 text-meta ${p}`,children:[(0,t.jsx)(s,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-primary"}),null===e.option?"Note alone":null===e.optionLabel?`Option ${String(e.option)}`:`${String(e.option)}. ${e.optionLabel}`]}),null===e.note?null:(0,t.jsxs)("span",{className:"text-caption italic text-muted-foreground",children:['"',e.note,'"']})]}),"waiting"===d.kind?(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)(O.i,{"data-testid":"bridge-basket-change",size:"small","aria-label":"Change",isPending:i.openingId===e.deliveryId,pendingLabel:"Opening...",disabled:c,onClick:()=>{i.open({deliveryId:e.deliveryId,job:"decide",inBasket:{option:e.option,note:e.note}})},children:[(0,t.jsx)(g,{"aria-hidden":!0,className:"size-3.5"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Change"})]}),(0,t.jsxs)(O.i,{"data-testid":"bridge-basket-remove",size:"small",variant:"ghost","aria-label":"Remove",isPending:u,pendingLabel:"Removing...",disabled:c,onClick:()=>{r(e.questionId)},children:[(0,t.jsx)(x.X,{"aria-hidden":!0,className:"size-4 sm:hidden"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Remove"})]})]}):(0,t.jsx)("span",{}),void 0===n?null:(0,t.jsx)(M,{line:n}),i.failure?.deliveryId===e.deliveryId?(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:(0,t.jsx)(z.f,{message:i.failure.message,isFailure:!0})}):null,"withdrawn"===d.kind||"replaced"===d.kind||"dealtElsewhere"===d.kind||"refused"===d.kind?(0,t.jsxs)("div",{className:"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5",children:[null===h?null:(0,t.jsxs)(O.i,{"data-testid":"bridge-replacement",size:"small",isPending:i.openingId===h,pendingLabel:"Opening...",disabled:c,onClick:()=>{i.open({deliveryId:h,job:"decide"})},children:[(0,t.jsx)(s,{"aria-hidden":!0,className:"size-3.5"}),"Answer the new question"]}),(0,t.jsx)(O.i,{"data-testid":"bridge-basket-remove",size:"small",variant:"replaced"===d.kind?"ghost":"secondary",isPending:u,pendingLabel:"Removing...",disabled:c,onClick:()=>{r(e.questionId)},children:"refused"===d.kind?"Remove and mark done":"Remove"})]}):null]})}function U({foot:e,isSending:n,isWorking:i,onSend:s}){return"none"===e.kind?null:(0,t.jsxs)("div",{"data-testid":"bridge-basket-foot",className:"flex flex-col items-stretch gap-2 border-t border-border bg-card p-3 sm:flex-row sm:items-center sm:gap-3 sm:px-3.5",children:[(0,t.jsx)("p",{className:"flex-1 text-caption text-muted-foreground",children:(0,t.jsx)(A,{words:e.words})}),"send"===e.kind?(0,t.jsxs)(O.i,{"data-testid":"bridge-basket-send",variant:"primary",className:"justify-center",isPending:n,pendingLabel:"Sending...",disabled:i,onClick:s,children:[(0,t.jsx)(f.f,{"aria-hidden":!0,className:"size-4"}),e.label]}):null,"sending"===e.kind?(0,t.jsxs)("button",{type:"button","data-testid":"bridge-basket-sending",disabled:!0,"aria-busy":"true",className:"inline-flex h-9 items-center justify-center gap-2 rounded-md border border-border bg-card px-4 font-medium text-card-foreground",children:[(0,t.jsx)(h.f,{"aria-hidden":!0,className:"size-4 animate-spin"}),e.progress]}):null]})}function C({summary:e}){return(0,t.jsxs)("div",{"data-testid":"bridge-basket-sent",role:"status",className:"flex max-w-[620px] items-start gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg",children:[(0,t.jsx)(o.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0 text-tone-ok-fg"}),(0,t.jsxs)("span",{className:"grid gap-1",children:[(0,t.jsx)("span",{className:"font-medium",children:e.title}),(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e.description})]})]})}function D(){return(0,t.jsxs)("div",{"data-testid":"bridge-basket-empty",className:"grid max-w-[820px] justify-items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",children:[(0,t.jsx)("span",{className:"inline-flex size-11 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,t.jsx)(b.f,{"aria-hidden":!0,className:"size-5"})}),(0,t.jsx)("span",{className:"text-heading font-semibold",children:"The basket is empty"}),(0,t.jsx)("span",{className:"max-w-[360px] text-muted-foreground",children:"Pick an option on a question and put it in the basket; it waits here until you send it."})]})}e.s(["BasketPanel",0,function({fleetId:e,basket:n}){let i,s,[a,r]=(0,v.useState)(),[d,o]=(0,v.useState)(),[,l]=(0,v.useTransition)(),c=(i=n.entries.some(({standing:e})=>"sent"===e.kind),s=n.entries.find(({standing:e})=>"sending"===e.kind&&!e.isUnanswered),n.entries.map(e=>(function(e,t){let{standing:n,from:i}=e;switch(n.kind){case"waiting":return;case"sent":{let e=j(n.at);return{icon:"sent",tone:"ok",words:{desktop:`Sent at ${e} and stored. Done.`,phone:`Sent at ${e}. Done.`}}}case"sending":if(n.isUnanswered)return{icon:"unanswered",tone:"waiting",words:{desktop:"The fleet did not answer. Sending again with the same key until it is stored; it arrives once.",phone:"No answer from the fleet. Sending again, same key."}};return t.isSendingNow?{icon:"sending",tone:"waiting",words:$("Sending...")}:{icon:"next",tone:"waiting",words:{desktop:"Next, in the order you added it",phone:"Next"}};case"refused":{let e=`Not sent: ${n.reason}.`,[i=n.reason]=n.reason.split(", so ");return{icon:"refused",tone:"attention",words:{desktop:t.isAnySent?`${e} The others were sent.`:e,phone:`Not sent: ${i}.`}}}case"withdrawn":return{icon:"withdrawn",tone:"off",words:{desktop:`Withdrawn by ${i} at ${j(n.at)}. Not sent; Send skips it.`,phone:`Withdrawn by ${i}. Not sent.`}};case"replaced":{let e=null===n.replacementTitle?".":` with "${n.replacementTitle}"`;return{icon:"replaced",tone:"off",words:{desktop:`Replaced by ${i} at ${j(n.at)}${e} Not sent: its options differ, so answer the new one.`,phone:`Replaced by ${i}. Not sent.`}}}case"dealtElsewhere":return{icon:"elsewhere",tone:"off",words:$(null===n.option?`Done ${S[n.place]}. Nothing is sent from it.`:`Answered ${S[n.place]}: option ${String(n.option)}. Nothing is sent from it.`)}}})(e,{isAnySent:i,isSendingNow:e===s}))),u=function(e){let{entries:t}=e;if(0===t.length||t.some(({standing:e})=>"sent"!==e.kind))return;let n=`To ${I(R(t))}, as you;`;return{title:`${N(t.length)} sent`,description:1===t.length?`${n} stored, and in Done.`:`${n} each stored, each in Done.`}}(n),h=t=>{r({kind:"remove",questionId:t}),o(void 0),l(async()=>{let n=await (0,k.f)(e,t);r(void 0),o(n.isOk?void 0:n.message)})},p=()=>{r({kind:"send"}),o(void 0),l(async()=>{let t=await y(e);r(void 0),o(t.isOk?void 0:t.message)})};return(0,t.jsx)(T.f,{fleetId:e,children:e=>(0,t.jsxs)("section",{className:"grid gap-4","aria-labelledby":"bridge-basket-heading",children:[(0,t.jsxs)("div",{className:"hidden sm:block",children:[(0,t.jsxs)("h1",{id:"bridge-basket-heading",className:"text-heading font-semibold",children:["Basket ",(0,t.jsx)("span",{"data-testid":"bridge-basket-count",className:"text-primary",children:n.count})]}),(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:"Answers you picked in Bridge, not sent yet. Nothing goes until you press Send."})]}),void 0===d?null:(0,t.jsx)(z.f,{message:d,isFailure:!0}),void 0===u?null:(0,t.jsx)(C,{summary:u}),0===n.entries.length||void 0!==u?(0,t.jsx)(D,{}):(0,t.jsxs)("div",{className:"max-w-[820px] overflow-hidden rounded-lg border border-border bg-card",children:[(0,t.jsx)("ul",{children:n.entries.map((n,i)=>(0,t.jsx)(P,{entry:n,line:c[i],opening:e,working:a,onRemove:h},n.questionId))}),(0,t.jsx)(U,{foot:function(e){if(e.toSend>0)return function(e){var t;let n=function(e){let t=t=>e.filter(({standing:e})=>e.kind===t).length,n=["withdrawn","replaced"].map(e=>({kind:e,count:t(e)})).filter(({count:e})=>e>0),i=n.map(({kind:e,count:t},i)=>t>1?`the ${String(t)} ${e}`:i===n.length-1?`the ${e} one`:`the ${e}`),s=t("dealtElsewhere"),a=0===s?i:[...i,1===s?"the one answered elsewhere":`the ${String(s)} answered elsewhere`];if(0===a.length)return;let r=I(a),d=1===n.reduce((e,{count:t})=>e+t,s);return`${r.charAt(0).toUpperCase()}${r.slice(1)} ${d?"is":"are"} not sent.`}(e.entries),i=(t=e.toSend,`Send ${N(t)}`);if(void 0!==n)return{kind:"send",words:{desktop:`${String(e.toSend)} to send. ${n}`,phone:n},label:i};let s=e.entries.filter(({standing:e})=>"waiting"===e.kind),a=R(s),r=a.length>1?"each receive their own answer":s.length>1?"receives its own answer to each":"receives its own answer";return{kind:"send",words:{desktop:`${I(a)} ${r}, as you, as if sent one by one.`,phone:"Each asker receives its own answer."},label:i}}(e);let t=e.entries.map(({standing:e})=>e),n=t.filter(({kind:e})=>"sent"===e).length,i=t.filter(({kind:e})=>"sending"===e).length,s=t.filter(({kind:e})=>"refused"===e).length,a=t.some(e=>"sending"===e.kind&&e.isUnanswered);if(i>0&&0===s&&!a)return{kind:"sending",words:{desktop:"You can close Bridge: the gateway keeps sending what is stored as sending.",phone:"You can close Bridge; the gateway keeps sending."},progress:`Sending ${String(n+1)} of ${String(n+i)}`};if(0===i&&0===s)return{kind:"none"};let r=(e,t)=>0===e?[]:[`${String(e)} ${t}`];return{kind:"summary",words:{desktop:`${[...r(n,"sent"),...r(i,"still sending"),...r(s,"not sent")].join(", ")}.`,phone:`${[...r(n,"sent"),...r(i,"sending"),...r(s,"not sent")].join(", ")}.`}}}(n),isSending:a?.kind==="send",isWorking:void 0!==a||void 0!==e.openingId,onSend:p})]})]})})}],22141)},94528,e=>{var t=e.i(43476),n=e.i(17904),i=e.i(29039);e.s(["FadedAsLastRead",0,function({children:e}){let s=(0,i.useLastReadAt)();return void 0===s?e:(0,t.jsxs)("div",{className:"grid gap-3",children:[(0,t.jsx)("div",{inert:!0,className:"opacity-60 [&_button:not([data-testid=bridge-item-title])]:hidden",children:e}),(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:`Shown as last read, at ${(0,n.C)(s)}.`})]})}])},3523,e=>{var t=e.i(43476),n=e.i(58487),i=e.i(5654),s=e.i(71645),a=e.i(73459),r=e.i(65894),d=e.i(36709),o=e.i(15451),l=e.i(99328),c=e.i(24338),u=e.i(65403),h=e.i(89606),p=e.i(57228),g=e.i(34244),m=e.i(43328),f=e.i(27538),b=e.i(77826),x=e.i(80734),v=e.i(60296),k=e.i(66734),w=e.i(47130);function y(){let{toasts:e}=i.f.useToastManager();return(0,t.jsx)(m.f.Portal,{children:(0,t.jsx)(f.f.Viewport,{className:"fixed bottom-4 left-4 z-50 hidden w-[min(24rem,calc(100vw-2rem))] gap-2 sm:grid",children:e.map(e=>(0,t.jsxs)(b.f.Root,{toast:e,"data-testid":"bridge-basket-toast",className:"flex items-start gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg",children:[(0,t.jsx)(w.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0"}),(0,t.jsxs)(x.f.Content,{className:"grid flex-1 gap-1",children:[(0,t.jsx)(v.f.Title,{className:"font-medium"}),(0,t.jsx)(k.f.Description,{className:"text-caption text-muted-foreground"})]})]},e.id))})})}var j=e.i(54235),S=e.i(62579),$=e.i(63132),N=e.i(75103),I=e.i(52021);function R({fleetId:e,decidePlaces:n,consoleUrl:m,children:f}){let b=i.f.useToastManager(),x=(0,N.P)(),[v,k]=(0,s.useState)(),[w,y]=(0,s.useState)(""),[O,z]=(0,s.useState)(),[T,B]=(0,s.useState)(),[L,A]=(0,s.useState)(),[M,P]=(0,s.useState)(),[U,C]=(0,s.useState)(),[D,q]=(0,s.useState)(),[,F]=(0,s.useTransition)(),[E,W]=(0,s.useState)(0);(0,I.R)(void 0===v?void 0:(0,g.u)(v.opened.job),()=>{k(void 0)});let Y=t=>{z(t.deliveryId),P(void 0),q(void 0),F(async()=>{let n=await (0,l.f)(e,t.deliveryId);if(z(void 0),n.isOk){let e=t.inBasket??null;k({delivery:n.value,opened:{job:t.job,isAlert:t.isAlert??!1,wasNew:"seen"!==t.state},inBasket:e,finished:null}),y(e?.note??""),C(void 0)}else P({deliveryId:t.deliveryId,message:n.message})})},H=({control:e,action:t,onSettled:n})=>{A(e),C(void 0),F(async()=>{let e=await t();A(void 0),e.isOk?n(e.value):C(e.message)})},V=e=>()=>{k(void 0),q(e)},_=void 0===v?void 0:{deliveryId:v.delivery.deliveryId,job:v.opened.job};return(0,t.jsx)(S.f,{list:(0,t.jsxs)("div",{className:"grid gap-4",children:[void 0===D?null:(0,t.jsx)($.f,{message:D,isFailure:!1}),f({open:Y,openingId:O,putPick:(t,n)=>{B(t.deliveryId),P(void 0),q(void 0),F(async()=>{let i=await (0,u.f)({fleet:e,deliveryId:t.deliveryId,option:n});B(void 0),i.isOk?(q(`Option ${String(n)} is in the basket, not sent: ${t.from} receives it when you send the basket.`),W(e=>e+1)):P({deliveryId:t.deliveryId,message:i.message})})},puttingId:T,failure:M,opened:_})]},E),item:void 0===v?void 0:(({delivery:i,inBasket:s,opened:l,finished:u})=>{let g=i.question?.id;return(0,t.jsx)(j.u,{delivery:i,opened:l,meetingHref:void 0===i.meetingId?void 0:(0,a.f)({fleetId:e,meetingId:i.meetingId}),consoleUrl:m,basketHref:(0,r.f)(p.H,e),inBasket:s,finished:u,places:n,note:w,working:L,failure:U,onNoteChange:y,onAnswer:t=>{H({control:void 0===t?{kind:"note"}:{kind:"option",option:t},action:()=>(0,d.f)({fleet:e,deliveryId:i.deliveryId,input:{questionId:i.question?.id,option:t,note:w}}),onSettled:V(`Your answer went to ${i.from}.`)})},onPut:t=>{H({control:null===t?{kind:"note"}:{kind:"option",option:t},action:()=>(0,c.f)({fleet:e,deliveryId:i.deliveryId,option:t,optionLabel:i.question?.options.find(({key:e})=>e===t)?.label??null,note:w}),onSettled:e=>{var t;k({delivery:i,opened:l,finished:u,inBasket:e}),b.add({title:null===(t=e.option)?"Your note alone in the basket":`Option ${String(t)} in the basket`,description:"Not sent. Still waiting on you until you send it."})}})},onRemove:()=>{void 0!==g&&H({control:{kind:"remove"},action:()=>(0,h.f)(e,g),onSettled:V(`Your answer to “${i.title}” is out of the basket; the question still waits on you.`)})},onDone:()=>{H({control:{kind:"done"},action:()=>(0,o.f)({fleet:e,deliveryId:i.deliveryId}),onSettled:V(`Done with “${i.title}”.`)})},onFinishStep:t=>{H({control:{kind:t},action:()=>(0,o.f)({fleet:e,deliveryId:i.deliveryId,step:{outcome:t,note:w}}),onSettled:()=>{k({delivery:i,inBasket:s,opened:l,finished:{outcome:t,note:w.trim(),at:new Date().toISOString()}})}})},onOpen:e=>{Y({deliveryId:e,job:l.job})},onSendMessage:void 0===i.alertShip||void 0===x?void 0:e=>{x({alertShip:e})},onBack:()=>{k(void 0)}},i.deliveryId)})(v)})}e.s(["f",0,function({fleetId:e,decidePlaces:i,consoleUrl:s,children:a}){return(0,t.jsxs)(n.f.Provider,{children:[(0,t.jsx)(R,{fleetId:e,decidePlaces:i,consoleUrl:s,children:a}),(0,t.jsx)(y,{})]})}],3523)},55070,e=>{var t=e.i(43476);let n={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},i={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:s,variant:a="secondary",size:r="regular",children:d,className:o="",disabled:l,...c}){return(0,t.jsx)("button",{...c,disabled:!0===l||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${i[r]} ${n[a]} ${o}`,children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),s]}):d})},"o",0,i])},63132,e=>{var t=e.i(43476);e.s(["f",0,function({message:e,isFailure:n}){return n?(0,t.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,t.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},73459,36709,15451,99328,24338,65403,e=>{e.s(["f",0,function(e){let t=new URLSearchParams({fleet:e.fleetId,...void 0===e.cursor?{}:{cursor:e.cursor}});return`/meetings/${encodeURIComponent(e.meetingId)}?${t.toString()}`}],73459);var t=e.i(95187);let n=(0,t.createServerReference)("402d993e2dfc3db69070886137b4bd7c498ddf33cb",t.callServer,void 0,t.findSourceMapURL,"answerDelivery");e.s(["f",0,n],36709);let i=(0,t.createServerReference)("40645122e875873ac311487cb1c703fb403ea8d5d5",t.callServer,void 0,t.findSourceMapURL,"doneDelivery");e.s(["f",0,i],15451);let s=(0,t.createServerReference)("609c3d0e9c3eb58ec0564b51f34b2d6a63a83e6d8d",t.callServer,void 0,t.findSourceMapURL,"openDelivery");e.s(["f",0,s],99328);let a=(0,t.createServerReference)("4025f8799c16c7535311cefa3faa24de30d4c2384c",t.callServer,void 0,t.findSourceMapURL,"putInBasket");e.s(["f",0,a],24338);let r=(0,t.createServerReference)("4087e8a620570d2fe490c35dafd89b7c7f7c863fe5",t.callServer,void 0,t.findSourceMapURL,"putPickInBasket");e.s(["f",0,r],65403)}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51481,e=>{var t=e.i(75043);e.s(["f",()=>t.f])},59381,e=>{var t=e.i(56420);let n={name:"hand",size:24,node:[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]};n.node;let i=(0,t.f)(n);e.s(["f",0,i],59381)},55266,e=>{var t=e.i(95187);let n=(0,t.createServerReference)("600d7b220edec9ab18a80038d5b459fae730df7a95",t.callServer,void 0,t.findSourceMapURL,"removeFromBasket");e.s(["f",0,n])},31785,e=>{let t={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},n={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},i=["decide","do"],s="Bridge keeps every item.",a={label:"Not offered",isOk:!1},r={label:"Off",isOk:!1},d="Says only that something waits, with a link here.",o=`${d} Nothing is on until you turn it on.`,l="through the gateway. Lists what waits when you ask it.",c={slack:"Slack",chat:"a chat","web-push":"web push",email:"email"};e.s(["I",0,t,"k",0,n,"N",0,["slack","chat","web-push","email"],"g",0,function(e){return 0===e.length?{state:{label:"Not connected",isOk:!1},description:`claude.ai or another MCP client, ${l}`,action:"none"}:{state:{label:"Connected",isOk:!0},description:`${new Intl.ListFormat("en",{type:"conjunction"}).format(e)}, ${l}`,action:"none"}},"t",0,function({isOffered:e,isOnForAnyJob:t}){return e?t?{state:{label:"On",isOk:!0},description:d,action:"turnOff"}:{state:r,description:o,action:"turnOn"}:{state:a,description:"This gateway sends no email.",action:"none"}},"T",0,function(e,t){return e.jobs.filter(({job:e,places:n})=>n.email!==t&&(!t||i.includes(e))).map(({job:e})=>({job:e,place:"email",isOn:t}))},"r",0,function(e){let t=["Bridge",...e.map(e=>c[e])],n=t.at(-1),i=1===t.length?"Bridge":`${t.slice(0,-1).join(", ")} and ${String(n)}`;return`Shows in ${i}, as Where things show sets for Decide. One answer, wherever you give it.`},"H",0,function(e){if(null===e)return{state:{label:"Not connected",isOk:!1},description:"This fleet has no Slack workspace.",action:"none"};let{workspaceName:t,link:n}=e;return null===n?{state:{label:"Not linked",isOk:!1},description:`Link your Slack account in ${t} to see items there and answer them.`,action:"link"}:{state:{label:"Linked",isOk:!0},description:`As @${n.slackName} in ${t}. A button press or a thread reply there is yours.`,action:"unlink"}},"b",0,function(e){let{job:i,place:a,isOn:r,waiting:d,isChatOn:o}=e,{name:l,item:c,items:u}=t[i],h=`${n[a]} is ${r?"on":"off"} for ${l}`;return r?"chat"===a?{title:h,detail:`A chat lists every ${c} not done when you ask it.`}:{title:h,detail:`${n[a]} shows ${u} that arrive from now on.${void 0===d||0===d?"":` The ${String(d)} already waiting ${1===d?"stays":"stay"} ${o?"in Bridge and in a chat":"in Bridge"}.`}`}:{title:h,detail:"everything-else"===i&&"slack"===a?`Bots only: a bot ship's messages and replies to Slack still show there. ${s}`:s}},"B",0,function(e){if(!e.isOffered)return{state:a,description:"This gateway sends no web push.",action:"none"};if(!e.isTaken)return{state:r,description:"This browser takes no web push.",action:"none"};let t=e.browsers.find(({endpoint:t,isGone:n})=>t===e.ownEndpoint&&!n);return void 0===t?{state:r,description:o,action:"turnOn"}:{state:{label:"This browser",isOk:!0},description:`${t.browser}. ${d}`,action:"remove"}}])},22141,e=>{var t=e.i(43476),n=e.i(56420);let i={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};i.node;let s=(0,n.f)(i);var a=e.i(47211),r=e.i(89664),d=e.i(22768),o=e.i(85595),l=e.i(51481);let c={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};c.node;let u=(0,n.f)(c);var h=e.i(11568);let p={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};p.node;let m=(0,n.f)(p);var g=e.i(32645),f=e.i(30274),b=e.i(47130),v=e.i(63676),x=e.i(71645),k=e.i(55266),w=e.i(95187);let y=(0,w.createServerReference)("4045e76c6fc9bf26ef2d0c9f49d73dad0d6d222502",w.callServer,void 0,w.findSourceMapURL,"sendBasket");function j(e){return`${new Date(e).toISOString().slice(11,16)} UTC`}let S={bridge:"in Bridge",chat:"in a chat",slack:"in Slack",gateway:"by the gateway"};function $(e){return{desktop:e,phone:e}}function N(e){return 1===e?"1 answer":`${String(e)} answers`}function I(e){return e.length<=1?e.join(""):`${e.slice(0,-1).join(", ")} and ${e.at(-1)??""}`}function R(e){return[...new Set(e.map(({from:e})=>e))]}var O=e.i(55070),z=e.i(63132),T=e.i(3523);let B={sent:o.f,sending:h.f,next:u,unanswered:h.f,refused:d.f,withdrawn:a.f,replaced:g.f,elsewhere:r.f},L={ok:"text-tone-ok-fg",waiting:"text-tone-waiting-fg",attention:"text-tone-attention-fg",off:"text-muted-foreground"};function A({words:e}){return e.desktop===e.phone?(0,t.jsx)("span",{children:e.desktop}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:e.desktop}),(0,t.jsx)("span",{className:"sm:hidden",children:e.phone})]})}function M({line:e}){let n=B[e.icon];return(0,t.jsxs)("p",{"data-testid":"bridge-basket-standing",className:"col-span-2 col-start-2 flex items-start gap-1.5 text-meta",children:[(0,t.jsx)(n,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 ${L[e.tone]}`}),(0,t.jsx)("span",{children:(0,t.jsx)(A,{words:e.words})})]})}function P({entry:e,line:n,opening:i,working:a,onRemove:r}){let{standing:d}=e,o="withdrawn"===d.kind||"replaced"===d.kind||"dealtElsewhere"===d.kind,c=void 0!==a||void 0!==i.openingId,u=a?.kind==="remove"&&a.questionId===e.questionId,h="replaced"===d.kind?d.replacementId:null,p=o?"line-through decoration-muted-foreground":"";return(0,t.jsxs)("li",{"data-testid":"bridge-basket-entry","data-standing":d.kind,className:`grid grid-cols-[18px_1fr_auto] items-start gap-x-2.5 gap-y-1.5 border-t border-border p-3 first:border-t-0 sm:px-3.5 ${o?"bg-muted":""}`,children:[(0,t.jsx)(l.f,{"aria-hidden":!0,className:"mt-0.5 size-4 text-tone-active-fg"}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:`font-medium ${p}`,children:e.title}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsxs)("span",{children:["to ",(0,t.jsx)("b",{className:"font-medium text-foreground",children:e.from})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"hidden text-border sm:inline",children:"·"}),(0,t.jsxs)("span",{className:"hidden sm:inline",children:["asked at ",(0,t.jsx)("time",{dateTime:e.sentAt,children:j(e.sentAt)})]})]}),(0,t.jsxs)("span",{className:`${o?"hidden sm:flex":"flex"} items-center gap-1.5 text-meta ${p}`,children:[(0,t.jsx)(s,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-primary"}),null===e.option?"Note alone":null===e.optionLabel?`Option ${String(e.option)}`:`${String(e.option)}. ${e.optionLabel}`]}),null===e.note?null:(0,t.jsxs)("span",{className:"text-caption italic text-muted-foreground",children:['"',e.note,'"']})]}),"waiting"===d.kind?(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)(O.i,{"data-testid":"bridge-basket-change",size:"small","aria-label":"Change",isPending:i.openingId===e.deliveryId,pendingLabel:"Opening...",disabled:c,onClick:()=>{i.open({deliveryId:e.deliveryId,job:"decide",inBasket:{option:e.option,note:e.note}})},children:[(0,t.jsx)(m,{"aria-hidden":!0,className:"size-3.5"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Change"})]}),(0,t.jsxs)(O.i,{"data-testid":"bridge-basket-remove",size:"small",variant:"ghost","aria-label":"Remove",isPending:u,pendingLabel:"Removing...",disabled:c,onClick:()=>{r(e.questionId)},children:[(0,t.jsx)(v.X,{"aria-hidden":!0,className:"size-4 sm:hidden"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Remove"})]})]}):(0,t.jsx)("span",{}),void 0===n?null:(0,t.jsx)(M,{line:n}),i.failure?.deliveryId===e.deliveryId?(0,t.jsx)("div",{className:"col-span-2 col-start-2",children:(0,t.jsx)(z.f,{message:i.failure.message,isFailure:!0})}):null,"withdrawn"===d.kind||"replaced"===d.kind||"dealtElsewhere"===d.kind||"refused"===d.kind?(0,t.jsxs)("div",{className:"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5",children:[null===h?null:(0,t.jsxs)(O.i,{"data-testid":"bridge-replacement",size:"small",isPending:i.openingId===h,pendingLabel:"Opening...",disabled:c,onClick:()=>{i.open({deliveryId:h,job:"decide"})},children:[(0,t.jsx)(s,{"aria-hidden":!0,className:"size-3.5"}),"Answer the new question"]}),(0,t.jsx)(O.i,{"data-testid":"bridge-basket-remove",size:"small",variant:"replaced"===d.kind?"ghost":"secondary",isPending:u,pendingLabel:"Removing...",disabled:c,onClick:()=>{r(e.questionId)},children:"refused"===d.kind?"Remove and mark done":"Remove"})]}):null]})}function U({foot:e,isSending:n,isWorking:i,onSend:s}){return"none"===e.kind?null:(0,t.jsxs)("div",{"data-testid":"bridge-basket-foot",className:"flex flex-col items-stretch gap-2 border-t border-border bg-card p-3 sm:flex-row sm:items-center sm:gap-3 sm:px-3.5",children:[(0,t.jsx)("p",{className:"flex-1 text-caption text-muted-foreground",children:(0,t.jsx)(A,{words:e.words})}),"send"===e.kind?(0,t.jsxs)(O.i,{"data-testid":"bridge-basket-send",variant:"primary",className:"justify-center",isPending:n,pendingLabel:"Sending...",disabled:i,onClick:s,children:[(0,t.jsx)(f.f,{"aria-hidden":!0,className:"size-4"}),e.label]}):null,"sending"===e.kind?(0,t.jsxs)("button",{type:"button","data-testid":"bridge-basket-sending",disabled:!0,"aria-busy":"true",className:"inline-flex h-9 items-center justify-center gap-2 rounded-md border border-border bg-card px-4 font-medium text-card-foreground",children:[(0,t.jsx)(h.f,{"aria-hidden":!0,className:"size-4 animate-spin"}),e.progress]}):null]})}function C({summary:e}){return(0,t.jsxs)("div",{"data-testid":"bridge-basket-sent",role:"status",className:"flex max-w-[620px] items-start gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg",children:[(0,t.jsx)(o.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0 text-tone-ok-fg"}),(0,t.jsxs)("span",{className:"grid gap-1",children:[(0,t.jsx)("span",{className:"font-medium",children:e.title}),(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e.description})]})]})}function D(){return(0,t.jsxs)("div",{"data-testid":"bridge-basket-empty",className:"grid max-w-[820px] justify-items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",children:[(0,t.jsx)("span",{className:"inline-flex size-11 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,t.jsx)(b.f,{"aria-hidden":!0,className:"size-5"})}),(0,t.jsx)("span",{className:"text-heading font-semibold",children:"The basket is empty"}),(0,t.jsx)("span",{className:"max-w-[360px] text-muted-foreground",children:"Pick an option on a question and put it in the basket; it waits here until you send it."})]})}e.s(["BasketPanel",0,function({fleetId:e,basket:n}){let i,s,[a,r]=(0,x.useState)(),[d,o]=(0,x.useState)(),[,l]=(0,x.useTransition)(),c=(i=n.entries.some(({standing:e})=>"sent"===e.kind),s=n.entries.find(({standing:e})=>"sending"===e.kind&&!e.isUnanswered),n.entries.map(e=>(function(e,t){let{standing:n,from:i}=e;switch(n.kind){case"waiting":return;case"sent":{let e=j(n.at);return{icon:"sent",tone:"ok",words:{desktop:`Sent at ${e} and stored. Done.`,phone:`Sent at ${e}. Done.`}}}case"sending":if(n.isUnanswered)return{icon:"unanswered",tone:"waiting",words:{desktop:"The fleet did not answer. Sending again with the same key until it is stored; it arrives once.",phone:"No answer from the fleet. Sending again, same key."}};return t.isSendingNow?{icon:"sending",tone:"waiting",words:$("Sending...")}:{icon:"next",tone:"waiting",words:{desktop:"Next, in the order you added it",phone:"Next"}};case"refused":{let e=`Not sent: ${n.reason}.`,[i=n.reason]=n.reason.split(", so ");return{icon:"refused",tone:"attention",words:{desktop:t.isAnySent?`${e} The others were sent.`:e,phone:`Not sent: ${i}.`}}}case"withdrawn":return{icon:"withdrawn",tone:"off",words:{desktop:`Withdrawn by ${i} at ${j(n.at)}. Not sent; Send skips it.`,phone:`Withdrawn by ${i}. Not sent.`}};case"replaced":{let e=null===n.replacementTitle?".":` with "${n.replacementTitle}"`;return{icon:"replaced",tone:"off",words:{desktop:`Replaced by ${i} at ${j(n.at)}${e} Not sent: its options differ, so answer the new one.`,phone:`Replaced by ${i}. Not sent.`}}}case"dealtElsewhere":return{icon:"elsewhere",tone:"off",words:$(null===n.option?`Done ${S[n.place]}. Nothing is sent from it.`:`Answered ${S[n.place]}: option ${String(n.option)}. Nothing is sent from it.`)}}})(e,{isAnySent:i,isSendingNow:e===s}))),u=function(e){let{entries:t}=e;if(0===t.length||t.some(({standing:e})=>"sent"!==e.kind))return;let n=`To ${I(R(t))}, as you;`;return{title:`${N(t.length)} sent`,description:1===t.length?`${n} stored, and in Done.`:`${n} each stored, each in Done.`}}(n),h=t=>{r({kind:"remove",questionId:t}),o(void 0),l(async()=>{let n=await (0,k.f)(e,t);r(void 0),o(n.isOk?void 0:n.message)})},p=()=>{r({kind:"send"}),o(void 0),l(async()=>{let t=await y(e);r(void 0),o(t.isOk?void 0:t.message)})};return(0,t.jsx)(T.f,{fleetId:e,children:e=>(0,t.jsxs)("section",{className:"grid gap-4","aria-labelledby":"bridge-basket-heading",children:[(0,t.jsxs)("div",{className:"hidden sm:block",children:[(0,t.jsxs)("h1",{id:"bridge-basket-heading",className:"text-heading font-semibold",children:["Basket ",(0,t.jsx)("span",{"data-testid":"bridge-basket-count",className:"text-primary",children:n.count})]}),(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:"Answers you picked in Bridge, not sent yet. Nothing goes until you press Send."})]}),void 0===d?null:(0,t.jsx)(z.f,{message:d,isFailure:!0}),void 0===u?null:(0,t.jsx)(C,{summary:u}),0===n.entries.length||void 0!==u?(0,t.jsx)(D,{}):(0,t.jsxs)("div",{className:"max-w-[820px] overflow-hidden rounded-lg border border-border bg-card",children:[(0,t.jsx)("ul",{children:n.entries.map((n,i)=>(0,t.jsx)(P,{entry:n,line:c[i],opening:e,working:a,onRemove:h},n.questionId))}),(0,t.jsx)(U,{foot:function(e){if(e.toSend>0)return function(e){var t;let n=function(e){let t=t=>e.filter(({standing:e})=>e.kind===t).length,n=["withdrawn","replaced"].map(e=>({kind:e,count:t(e)})).filter(({count:e})=>e>0),i=n.map(({kind:e,count:t},i)=>t>1?`the ${String(t)} ${e}`:i===n.length-1?`the ${e} one`:`the ${e}`),s=t("dealtElsewhere"),a=0===s?i:[...i,1===s?"the one answered elsewhere":`the ${String(s)} answered elsewhere`];if(0===a.length)return;let r=I(a),d=1===n.reduce((e,{count:t})=>e+t,s);return`${r.charAt(0).toUpperCase()}${r.slice(1)} ${d?"is":"are"} not sent.`}(e.entries),i=(t=e.toSend,`Send ${N(t)}`);if(void 0!==n)return{kind:"send",words:{desktop:`${String(e.toSend)} to send. ${n}`,phone:n},label:i};let s=e.entries.filter(({standing:e})=>"waiting"===e.kind),a=R(s),r=a.length>1?"each receive their own answer":s.length>1?"receives its own answer to each":"receives its own answer";return{kind:"send",words:{desktop:`${I(a)} ${r}, as you, as if sent one by one.`,phone:"Each asker receives its own answer."},label:i}}(e);let t=e.entries.map(({standing:e})=>e),n=t.filter(({kind:e})=>"sent"===e).length,i=t.filter(({kind:e})=>"sending"===e).length,s=t.filter(({kind:e})=>"refused"===e).length,a=t.some(e=>"sending"===e.kind&&e.isUnanswered);if(i>0&&0===s&&!a)return{kind:"sending",words:{desktop:"You can close Bridge: the gateway keeps sending what is stored as sending.",phone:"You can close Bridge; the gateway keeps sending."},progress:`Sending ${String(n+1)} of ${String(n+i)}`};if(0===i&&0===s)return{kind:"none"};let r=(e,t)=>0===e?[]:[`${String(e)} ${t}`];return{kind:"summary",words:{desktop:`${[...r(n,"sent"),...r(i,"still sending"),...r(s,"not sent")].join(", ")}.`,phone:`${[...r(n,"sent"),...r(i,"sending"),...r(s,"not sent")].join(", ")}.`}}}(n),isSending:a?.kind==="send",isWorking:void 0!==a||void 0!==e.openingId,onSend:p})]})]})})}],22141)},94528,e=>{var t=e.i(43476),n=e.i(17904),i=e.i(29039);e.s(["FadedAsLastRead",0,function({children:e}){let s=(0,i.useLastReadAt)();return void 0===s?e:(0,t.jsxs)("div",{className:"grid gap-3",children:[(0,t.jsx)("div",{inert:!0,className:"opacity-60 [&_button:not([data-testid=bridge-item-title])]:hidden",children:e}),(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:`Shown as last read, at ${(0,n.C)(s)}.`})]})}])},3523,e=>{var t=e.i(43476),n=e.i(58487),i=e.i(5654),s=e.i(71645),a=e.i(73459),r=e.i(65894),d=e.i(67697),o=e.i(91710),l=e.i(11015),c=e.i(99522),u=e.i(75862),h=e.i(55266),p=e.i(57228),m=e.i(34244),g=e.i(43328),f=e.i(27538),b=e.i(77826),v=e.i(80734),x=e.i(60296),k=e.i(66734),w=e.i(47130);function y(){let{toasts:e}=i.f.useToastManager();return(0,t.jsx)(g.f.Portal,{children:(0,t.jsx)(f.f.Viewport,{className:"fixed bottom-4 left-4 z-50 hidden w-[min(24rem,calc(100vw-2rem))] gap-2 sm:grid",children:e.map(e=>(0,t.jsxs)(b.f.Root,{toast:e,"data-testid":"bridge-basket-toast",className:"flex items-start gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg",children:[(0,t.jsx)(w.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0"}),(0,t.jsxs)(v.f.Content,{className:"grid flex-1 gap-1",children:[(0,t.jsx)(x.f.Title,{className:"font-medium"}),(0,t.jsx)(k.f.Description,{className:"text-caption text-muted-foreground"})]})]},e.id))})})}var j=e.i(54235),S=e.i(62579),$=e.i(63132),N=e.i(75103),I=e.i(52021);function R({fleetId:e,decidePlaces:n,consoleUrl:g,children:f}){let b=i.f.useToastManager(),v=(0,N.P)(),[x,k]=(0,s.useState)(),[w,y]=(0,s.useState)(""),[O,z]=(0,s.useState)(),[T,B]=(0,s.useState)(),[L,A]=(0,s.useState)(),[M,P]=(0,s.useState)(),[U,C]=(0,s.useState)(),[D,q]=(0,s.useState)(),[,F]=(0,s.useTransition)(),[E,Y]=(0,s.useState)(0);(0,I.R)(void 0===x?void 0:(0,m.u)(x.opened.job),()=>{k(void 0)});let W=t=>{z(t.deliveryId),P(void 0),q(void 0),F(async()=>{let n=await (0,l.f)(e,t.deliveryId);if(z(void 0),n.isOk){let e=t.inBasket??null;k({delivery:n.value,opened:{job:t.job,isAlert:t.isAlert??!1,wasNew:"seen"!==t.state},inBasket:e,finished:null}),y(e?.note??""),C(void 0)}else P({deliveryId:t.deliveryId,message:n.message})})},H=({control:e,action:t,onSettled:n})=>{A(e),C(void 0),F(async()=>{let e=await t();A(void 0),e.isOk?n(e.value):C(e.message)})},V=e=>()=>{k(void 0),q(e)},_=void 0===x?void 0:{deliveryId:x.delivery.deliveryId,job:x.opened.job};return(0,t.jsx)(S.f,{list:(0,t.jsxs)("div",{className:"grid gap-4",children:[void 0===D?null:(0,t.jsx)($.f,{message:D,isFailure:!1}),f({open:W,openingId:O,putPick:(t,n)=>{B(t.deliveryId),P(void 0),q(void 0),F(async()=>{let i=await (0,u.f)({fleet:e,deliveryId:t.deliveryId,option:n});B(void 0),i.isOk?(q(`Option ${String(n)} is in the basket, not sent: ${t.from} receives it when you send the basket.`),Y(e=>e+1)):P({deliveryId:t.deliveryId,message:i.message})})},puttingId:T,failure:M,opened:_})]},E),item:void 0===x?void 0:(({delivery:i,inBasket:s,opened:l,finished:u})=>{let m=i.question?.id;return(0,t.jsx)(j.u,{delivery:i,opened:l,meetingHref:void 0===i.meetingId?void 0:(0,a.f)({fleetId:e,meetingId:i.meetingId}),consoleUrl:g,basketHref:(0,r.f)(p.H,e),inBasket:s,finished:u,places:n,note:w,working:L,failure:U,onNoteChange:y,onAnswer:t=>{H({control:void 0===t?{kind:"note"}:{kind:"option",option:t},action:()=>(0,d.f)({fleet:e,deliveryId:i.deliveryId,input:{questionId:i.question?.id,option:t,note:w}}),onSettled:V(`Your answer went to ${i.from}.`)})},onPut:t=>{H({control:null===t?{kind:"note"}:{kind:"option",option:t},action:()=>(0,c.f)({fleet:e,deliveryId:i.deliveryId,option:t,optionLabel:i.question?.options.find(({key:e})=>e===t)?.label??null,note:w}),onSettled:e=>{var t;k({delivery:i,opened:l,finished:u,inBasket:e}),b.add({title:null===(t=e.option)?"Your note alone in the basket":`Option ${String(t)} in the basket`,description:"Not sent. Still waiting on you until you send it."})}})},onSend:t=>{H({control:{kind:"send"},action:()=>(0,d.f)({fleet:e,deliveryId:i.deliveryId,input:{questionId:m,option:t??void 0,note:w}}),onSettled:V(`Your answer went to ${i.from}.`)})},onRemove:()=>{void 0!==m&&H({control:{kind:"remove"},action:()=>(0,h.f)(e,m),onSettled:V(`Your answer to “${i.title}” is out of the basket; the question still waits on you.`)})},onDone:()=>{H({control:{kind:"done"},action:()=>(0,o.f)({fleet:e,deliveryId:i.deliveryId}),onSettled:V(`Done with “${i.title}”.`)})},onFinishStep:t=>{H({control:{kind:t},action:()=>(0,o.f)({fleet:e,deliveryId:i.deliveryId,step:{outcome:t,note:w}}),onSettled:()=>{k({delivery:i,inBasket:s,opened:l,finished:{outcome:t,note:w.trim(),at:new Date().toISOString()}})}})},onOpen:e=>{W({deliveryId:e,job:l.job})},onSendMessage:void 0===i.alertShip||void 0===v?void 0:e=>{v({alertShip:e})},onBack:()=>{k(void 0)}},i.deliveryId)})(x)})}e.s(["f",0,function({fleetId:e,decidePlaces:i,consoleUrl:s,children:a}){return(0,t.jsxs)(n.f.Provider,{children:[(0,t.jsx)(R,{fleetId:e,decidePlaces:i,consoleUrl:s,children:a}),(0,t.jsx)(y,{})]})}],3523)},55070,e=>{var t=e.i(43476);let n={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},i={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:s,variant:a="secondary",size:r="regular",children:d,className:o="",disabled:l,...c}){return(0,t.jsx)("button",{...c,disabled:!0===l||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${i[r]} ${n[a]} ${o}`,children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),s]}):d})},"o",0,i])},63132,e=>{var t=e.i(43476);e.s(["f",0,function({message:e,isFailure:n}){return n?(0,t.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,t.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},73459,67697,91710,11015,99522,75862,e=>{e.s(["f",0,function(e){let t=new URLSearchParams({fleet:e.fleetId,...void 0===e.cursor?{}:{cursor:e.cursor}});return`/meetings/${encodeURIComponent(e.meetingId)}?${t.toString()}`}],73459);var t=e.i(95187);let n=(0,t.createServerReference)("409cd60338f4d2ebe089c816413026d35d3df175a5",t.callServer,void 0,t.findSourceMapURL,"answerDelivery");e.s(["f",0,n],67697);let i=(0,t.createServerReference)("408692edd7e68a3b2abfaf17b76ec93d0a21b9b8dd",t.callServer,void 0,t.findSourceMapURL,"doneDelivery");e.s(["f",0,i],91710);let s=(0,t.createServerReference)("6097df6443a06e5261e3227b1398330a1729afe230",t.callServer,void 0,t.findSourceMapURL,"openDelivery");e.s(["f",0,s],11015);let a=(0,t.createServerReference)("4014750f115befb3caee699cea842d94c42ccdf35a",t.callServer,void 0,t.findSourceMapURL,"putInBasket");e.s(["f",0,a],99522);let r=(0,t.createServerReference)("405ccc10e32995d237032f7358fbf9bc977ccbaa8d",t.callServer,void 0,t.findSourceMapURL,"putPickInBasket");e.s(["f",0,r],75862)}])})();
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95893,e=>{var s=e.i(43476),r=e.i(18566),n=e.i(71645),a=e.i(95187);let i=(0,a.createServerReference)("400181e7d44d785443b473254b8f8c50fd13000b55",a.callServer,void 0,a.findSourceMapURL,"decideRequest");var t=e.i(57228),l=e.i(88374),d=e.i(65818);let c=["messages:send","messages:receive"],o={"messages:send":"Send","messages:receive":"Receive","fleet:read":"Read the fleet"};var p=e.i(55070),u=e.i(63132);let m="rounded-md border border-input bg-background px-2 py-1.5";function g({scope:e,isLocked:r}){return(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[r?(0,s.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,"aria-label":o[e]??e}):(0,s.jsx)("input",{type:"checkbox",name:"scope",value:e,"aria-label":o[e]??e}),(0,s.jsx)("span",{children:o[e]??e}),(0,s.jsx)("span",{className:"font-mono text-caption text-muted-foreground",children:e}),r?(0,s.jsx)("span",{className:"text-caption text-muted-foreground",children:"(always)"}):null]})}function x(e,s){let r=e.get(s);return"string"==typeof r?r:""}function b({request:e,heldScopes:r,owners:a,working:i,failure:t,onDecide:o}){let[h,j]=(0,n.useState)("bearer"),f=function(e){switch(e.subject.kind){case"client":return e.subject.clientName;case"server":return URL.canParse(e.subject.url)?new URL(e.subject.url).host:e.subject.url}}(e),v="server"===e.subject.kind;return(0,s.jsxs)("section",{className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,s.jsxs)("h2",{className:"text-heading font-semibold",children:["Approve ",f]}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault();let s=new FormData(e.currentTarget),r=s.getAll("scope").filter(e=>"string"==typeof e);o({kind:"approve",name:x(s,"name"),ownerShipId:x(s,"ownerShipId"),scopes:r,server:v?{credentialKind:(0,l.C)(x(s,"credentialKind")),token:x(s,"token"),clientId:x(s,"clientId"),clientSecret:x(s,"clientSecret"),issuer:x(s,"issuer"),scope:x(s,"scope-requested"),concurrencyLimit:Number(x(s,"concurrencyLimit"))}:void 0})},className:"grid gap-3",children:[(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Proxy ship's name"}),(0,s.jsx)("input",{name:"name",defaultValue:f.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,""),required:!0,className:m})]}),(0,s.jsx)(d.f,{choices:a.isOk?a.value:[],current:null,help:"A person ship or argo. It answers for this party.",refusal:a.isOk?void 0:a.refusal}),(0,s.jsxs)("fieldset",{className:"grid gap-1",children:[(0,s.jsx)("legend",{children:"Scopes"}),c.map(e=>(0,s.jsx)(g,{scope:e,isLocked:!0},e)),r.filter(e=>!c.includes(e)).map(e=>(0,s.jsx)(g,{scope:e,isLocked:!1},e))]}),v?(0,s.jsxs)("fieldset",{className:"grid gap-2",children:[(0,s.jsx)("legend",{children:"The server's credential"}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Credential"}),(0,s.jsx)("select",{name:"credentialKind",value:h,onChange:e=>{j((0,l.C)(e.target.value))},className:m,children:l.x.map(({kind:e,label:r})=>(0,s.jsx)("option",{value:e,children:r},e))})]}),"none"===h?null:"bearer"===h?(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Bearer token"}),(0,s.jsx)("input",{type:"password",name:"token",className:m})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Client id"}),(0,s.jsx)("input",{name:"clientId",className:m})]}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Client secret"}),(0,s.jsx)("input",{type:"password",name:"clientSecret",className:m})]}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Issuer"}),(0,s.jsx)("input",{type:"url",name:"issuer",className:m})]}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Scope"}),(0,s.jsx)("input",{name:"scope-requested",className:m})]})]}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Calls at once"}),(0,s.jsx)("input",{type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:4,className:m})]})]}):null,void 0===t?null:(0,s.jsx)(u.f,{message:t,isFailure:!0}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.i,{type:"submit",variant:"primary","data-testid":"bridge-approve",isPending:"approve"===i,pendingLabel:"Approving...",disabled:void 0!==i,children:"Approve"}),(0,s.jsx)(p.i,{type:"button","data-testid":"bridge-deny",isPending:"deny"===i,pendingLabel:"Denying...",disabled:void 0!==i,onClick:()=>{o({kind:"deny"})},children:"Deny"})]})]})]})}e.s(["DecisionPanel",0,function({fleetId:e,request:a,heldScopes:l,owners:d}){let c=(0,r.useRouter)(),[o,p]=(0,n.useState)(),[u,m]=(0,n.useState)(),[,g]=(0,n.useTransition)();return(0,s.jsx)(b,{request:a,heldScopes:l,owners:d,working:o,failure:u,onDecide:s=>{p(s.kind),m(void 0),g(async()=>{let r=await i({fleet:e,requestId:a.requestId,input:s});r.isOk?c.push(`${t.T}?${new URLSearchParams({fleet:e,decided:s.kind}).toString()}`):(p(void 0),m(r.message))})}})}],95893)},55070,e=>{var s=e.i(43476);let r={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},n={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:a,variant:i="secondary",size:t="regular",children:l,className:d="",disabled:c,...o}){return(0,s.jsx)("button",{...o,disabled:!0===c||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${n[t]} ${r[i]} ${d}`,children:e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}):l})},"o",0,n])},63132,e=>{var s=e.i(43476);e.s(["f",0,function({message:e,isFailure:r}){return r?(0,s.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,s.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},88374,e=>{let s=[{kind:"none",label:"No credential"},{kind:"bearer",label:"Bearer token"},{kind:"clientCredentials",label:"OAuth client credentials"}],r={kind:"personSignIn",label:"Each person signs in"},n=[...s,r];e.s(["a",0,n,"x",0,s,"m",0,r,"G",0,function(e){return n.find(({kind:s})=>s===e)?.kind??"bearer"},"C",0,function(e){return s.find(({kind:s})=>s===e)?.kind??"bearer"}])},65818,e=>{var s=e.i(43476),r=e.i(30402);e.s(["f",0,function({choices:e,current:n,help:a,refusal:i}){let t=null===n||e.some(e=>e.shipId===n.shipId)?e:[n,...e];return(0,s.jsxs)("label",{className:r.z,children:[(0,s.jsx)("span",{children:"Owner"}),(0,s.jsxs)("select",{className:r.w,name:"ownerShipId",defaultValue:n?.shipId??"",required:!0,"data-testid":"owner-field",children:[null===n?(0,s.jsx)("option",{value:"",disabled:!0,children:"Pick its owner"}):null,t.map(e=>(0,s.jsx)("option",{value:e.shipId,children:e.name},e.shipId))]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:i??a})]})}])}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95893,e=>{var s=e.i(43476),r=e.i(18566),n=e.i(71645),a=e.i(95187);let i=(0,a.createServerReference)("40ae33f79052d467a1fba4f152653f3d44ea2f48ab",a.callServer,void 0,a.findSourceMapURL,"decideRequest");var t=e.i(57228),l=e.i(88374),d=e.i(65818);let c=["messages:send","messages:receive"],o={"messages:send":"Send","messages:receive":"Receive","fleet:read":"Read the fleet"};var p=e.i(55070),u=e.i(63132);let m="rounded-md border border-input bg-background px-2 py-1.5";function g({scope:e,isLocked:r}){return(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[r?(0,s.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,"aria-label":o[e]??e}):(0,s.jsx)("input",{type:"checkbox",name:"scope",value:e,"aria-label":o[e]??e}),(0,s.jsx)("span",{children:o[e]??e}),(0,s.jsx)("span",{className:"font-mono text-caption text-muted-foreground",children:e}),r?(0,s.jsx)("span",{className:"text-caption text-muted-foreground",children:"(always)"}):null]})}function x(e,s){let r=e.get(s);return"string"==typeof r?r:""}function h({request:e,heldScopes:r,owners:a,working:i,failure:t,onDecide:o}){let[b,j]=(0,n.useState)("bearer"),f=function(e){switch(e.subject.kind){case"client":return e.subject.clientName;case"server":return URL.canParse(e.subject.url)?new URL(e.subject.url).host:e.subject.url}}(e),v="server"===e.subject.kind;return(0,s.jsxs)("section",{className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,s.jsxs)("h2",{className:"text-heading font-semibold",children:["Approve ",f]}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault();let s=new FormData(e.currentTarget),r=s.getAll("scope").filter(e=>"string"==typeof e);o({kind:"approve",name:x(s,"name"),ownerShipId:x(s,"ownerShipId"),scopes:r,server:v?{credentialKind:(0,l.C)(x(s,"credentialKind")),token:x(s,"token"),clientId:x(s,"clientId"),clientSecret:x(s,"clientSecret"),issuer:x(s,"issuer"),scope:x(s,"scope-requested"),concurrencyLimit:Number(x(s,"concurrencyLimit"))}:void 0})},className:"grid gap-3",children:[(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Proxy ship's name"}),(0,s.jsx)("input",{name:"name",defaultValue:f.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,""),required:!0,className:m})]}),(0,s.jsx)(d.f,{choices:a.isOk?a.value:[],current:null,help:"A person ship or argo. It answers for this party.",refusal:a.isOk?void 0:a.refusal}),(0,s.jsxs)("fieldset",{className:"grid gap-1",children:[(0,s.jsx)("legend",{children:"Scopes"}),c.map(e=>(0,s.jsx)(g,{scope:e,isLocked:!0},e)),r.filter(e=>!c.includes(e)).map(e=>(0,s.jsx)(g,{scope:e,isLocked:!1},e))]}),v?(0,s.jsxs)("fieldset",{className:"grid gap-2",children:[(0,s.jsx)("legend",{children:"The server's credential"}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Credential"}),(0,s.jsx)("select",{name:"credentialKind",value:b,onChange:e=>{j((0,l.C)(e.target.value))},className:m,children:l.x.map(({kind:e,label:r})=>(0,s.jsx)("option",{value:e,children:r},e))})]}),"none"===b?null:"bearer"===b?(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Bearer token"}),(0,s.jsx)("input",{type:"password",name:"token",className:m})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Client id"}),(0,s.jsx)("input",{name:"clientId",className:m})]}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Client secret"}),(0,s.jsx)("input",{type:"password",name:"clientSecret",className:m})]}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Issuer"}),(0,s.jsx)("input",{type:"url",name:"issuer",className:m})]}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Scope"}),(0,s.jsx)("input",{name:"scope-requested",className:m})]})]}),(0,s.jsxs)("label",{className:"grid gap-1",children:[(0,s.jsx)("span",{children:"Calls at once"}),(0,s.jsx)("input",{type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:4,className:m})]})]}):null,void 0===t?null:(0,s.jsx)(u.f,{message:t,isFailure:!0}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.i,{type:"submit",variant:"primary","data-testid":"bridge-approve",isPending:"approve"===i,pendingLabel:"Approving...",disabled:void 0!==i,children:"Approve"}),(0,s.jsx)(p.i,{type:"button","data-testid":"bridge-deny",isPending:"deny"===i,pendingLabel:"Denying...",disabled:void 0!==i,onClick:()=>{o({kind:"deny"})},children:"Deny"})]})]})]})}e.s(["DecisionPanel",0,function({fleetId:e,request:a,heldScopes:l,owners:d}){let c=(0,r.useRouter)(),[o,p]=(0,n.useState)(),[u,m]=(0,n.useState)(),[,g]=(0,n.useTransition)();return(0,s.jsx)(h,{request:a,heldScopes:l,owners:d,working:o,failure:u,onDecide:s=>{p(s.kind),m(void 0),g(async()=>{let r=await i({fleet:e,requestId:a.requestId,input:s});r.isOk?c.push(`${t.T}?${new URLSearchParams({fleet:e,decided:s.kind}).toString()}`):(p(void 0),m(r.message))})}})}],95893)},55070,e=>{var s=e.i(43476);let r={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent",ghost:"text-foreground hover:bg-accent"},n={regular:"h-9 gap-2 px-4",row:"h-9 gap-2 px-4 text-body sm:h-6 sm:gap-1.5 sm:px-2.5 sm:text-meta",small:"h-8 gap-2 px-3 text-meta",xs:"h-7 gap-1.5 px-2.5 text-caption font-medium"};e.s(["i",0,function({isPending:e,pendingLabel:a,variant:i="secondary",size:t="regular",children:l,className:d="",disabled:c,...o}){return(0,s.jsx)("button",{...o,disabled:!0===c||e,"aria-busy":e,className:`inline-flex items-center rounded-md disabled:cursor-not-allowed disabled:opacity-70 ${n[t]} ${r[i]} ${d}`,children:e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}):l})},"o",0,n])},63132,e=>{var s=e.i(43476);e.s(["f",0,function({message:e,isFailure:r}){return r?(0,s.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,s.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},88374,e=>{let s=[{kind:"none",label:"No credential"},{kind:"bearer",label:"Bearer token"},{kind:"clientCredentials",label:"OAuth client credentials"}],r={kind:"personSignIn",label:"Each person signs in"},n=[...s,r];e.s(["a",0,n,"x",0,s,"m",0,r,"G",0,function(e){return n.find(({kind:s})=>s===e)?.kind??"bearer"},"C",0,function(e){return s.find(({kind:s})=>s===e)?.kind??"bearer"}])},65818,e=>{var s=e.i(43476),r=e.i(30402);e.s(["f",0,function({choices:e,current:n,help:a,refusal:i}){let t=null===n||e.some(e=>e.shipId===n.shipId)?e:[n,...e];return(0,s.jsxs)("label",{className:r.z,children:[(0,s.jsx)("span",{children:"Owner"}),(0,s.jsxs)("select",{className:r.w,name:"ownerShipId",defaultValue:n?.shipId??"",required:!0,"data-testid":"owner-field",children:[null===n?(0,s.jsx)("option",{value:"",disabled:!0,children:"Pick its owner"}):null,t.map(e=>(0,s.jsx)("option",{value:e.shipId,children:e.name},e.shipId))]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:i??a})]})}])}])})();