@aeolus-fleet/gateway 0.36.2 → 0.36.3

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 (504) hide show
  1. package/README.md +4 -0
  2. package/dist/adapters/fleet/actor-door.d.ts +8 -1
  3. package/dist/adapters/fleet/actor-door.js +12 -5
  4. package/dist/adapters/fleet/actor-door.js.map +1 -1
  5. package/dist/adapters/fleet/argo-inbox-door.d.ts +4 -0
  6. package/dist/adapters/fleet/argo-inbox-door.js +81 -0
  7. package/dist/adapters/fleet/argo-inbox-door.js.map +1 -0
  8. package/dist/adapters/fleet/rest-fleet-door.d.ts +14 -0
  9. package/dist/adapters/fleet/rest-fleet-door.js +11 -1
  10. package/dist/adapters/fleet/rest-fleet-door.js.map +1 -1
  11. package/dist/adapters/http/front-door.js +3 -1
  12. package/dist/adapters/http/front-door.js.map +1 -1
  13. package/dist/adapters/http/live.d.ts +10 -1
  14. package/dist/adapters/http/live.js +10 -1
  15. package/dist/adapters/http/live.js.map +1 -1
  16. package/dist/adapters/pagasae/email-channel.js +5 -3
  17. package/dist/adapters/pagasae/email-channel.js.map +1 -1
  18. package/dist/adapters/pagasae/pagasae-client.js +1 -0
  19. package/dist/adapters/pagasae/pagasae-client.js.map +1 -1
  20. package/dist/adapters/pagasae/shared-sign-in.js +2 -2
  21. package/dist/adapters/pagasae/shared-sign-in.js.map +1 -1
  22. package/dist/adapters/prisma/argo-accounts.d.ts +4 -0
  23. package/dist/adapters/prisma/argo-accounts.js +17 -0
  24. package/dist/adapters/prisma/argo-accounts.js.map +1 -0
  25. package/dist/adapters/prisma/argo-slack-posts.d.ts +4 -0
  26. package/dist/adapters/prisma/argo-slack-posts.js +30 -0
  27. package/dist/adapters/prisma/argo-slack-posts.js.map +1 -0
  28. package/dist/adapters/prisma/argo-wakes.d.ts +4 -0
  29. package/dist/adapters/prisma/argo-wakes.js +54 -0
  30. package/dist/adapters/prisma/argo-wakes.js.map +1 -0
  31. package/dist/adapters/prisma/fleet-forgetter.d.ts +1 -1
  32. package/dist/adapters/prisma/fleet-forgetter.js +2 -2
  33. package/dist/adapters/prisma/fleet-forgetter.js.map +1 -1
  34. package/dist/adapters/prisma/generated/browser.d.ts +20 -0
  35. package/dist/adapters/prisma/generated/client.d.ts +20 -0
  36. package/dist/adapters/prisma/generated/internal/class.d.ts +44 -0
  37. package/dist/adapters/prisma/generated/internal/class.js +4 -4
  38. package/dist/adapters/prisma/generated/internal/class.js.map +1 -1
  39. package/dist/adapters/prisma/generated/internal/prismaNamespace.d.ts +334 -1
  40. package/dist/adapters/prisma/generated/internal/prismaNamespace.js +30 -1
  41. package/dist/adapters/prisma/generated/internal/prismaNamespace.js.map +1 -1
  42. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.d.ts +33 -0
  43. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js +30 -1
  44. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js.map +1 -1
  45. package/dist/adapters/prisma/generated/models/ArgoAccount.d.ts +946 -0
  46. package/dist/adapters/prisma/generated/models/ArgoAccount.js +2 -0
  47. package/dist/adapters/prisma/generated/models/ArgoAccount.js.map +1 -0
  48. package/dist/adapters/prisma/generated/models/ArgoMessageCovered.d.ts +947 -0
  49. package/dist/adapters/prisma/generated/models/ArgoMessageCovered.js +2 -0
  50. package/dist/adapters/prisma/generated/models/ArgoMessageCovered.js.map +1 -0
  51. package/dist/adapters/prisma/generated/models/ArgoSlackPost.d.ts +1065 -0
  52. package/dist/adapters/prisma/generated/models/ArgoSlackPost.js +2 -0
  53. package/dist/adapters/prisma/generated/models/ArgoSlackPost.js.map +1 -0
  54. package/dist/adapters/prisma/generated/models/ArgoWakeSent.d.ts +975 -0
  55. package/dist/adapters/prisma/generated/models/ArgoWakeSent.js +2 -0
  56. package/dist/adapters/prisma/generated/models/ArgoWakeSent.js.map +1 -0
  57. package/dist/adapters/prisma/generated/models.d.ts +4 -0
  58. package/dist/adapters/slack/slack-messages.js +5 -4
  59. package/dist/adapters/slack/slack-messages.js.map +1 -1
  60. package/dist/adapters/trpc/router.d.ts +24 -0
  61. package/dist/adapters/trpc/router.js +11 -0
  62. package/dist/adapters/trpc/router.js.map +1 -1
  63. package/dist/adapters/web-push/web-push.js +1 -1
  64. package/dist/adapters/web-push/web-push.js.map +1 -1
  65. package/dist/app.js +89 -2
  66. package/dist/app.js.map +1 -1
  67. package/dist/core/account-sign-in/account-of-sign-in.d.ts +7 -2
  68. package/dist/core/account-sign-in/account-of-sign-in.js +9 -3
  69. package/dist/core/account-sign-in/account-of-sign-in.js.map +1 -1
  70. package/dist/core/account-sign-in/ports.d.ts +2 -0
  71. package/dist/core/argo-inbox/argo-inbox.d.ts +31 -0
  72. package/dist/core/argo-inbox/argo-inbox.js +23 -0
  73. package/dist/core/argo-inbox/argo-inbox.js.map +1 -0
  74. package/dist/core/argo-inbox/argo-slack-message.d.ts +17 -0
  75. package/dist/core/argo-inbox/argo-slack-message.js +40 -0
  76. package/dist/core/argo-inbox/argo-slack-message.js.map +1 -0
  77. package/dist/core/argo-inbox/argo-slack-post.d.ts +21 -0
  78. package/dist/core/argo-inbox/argo-slack-post.js +2 -0
  79. package/dist/core/argo-inbox/argo-slack-post.js.map +1 -0
  80. package/dist/core/argo-inbox/follow-argo-inbox.d.ts +33 -0
  81. package/dist/core/argo-inbox/follow-argo-inbox.js +133 -0
  82. package/dist/core/argo-inbox/follow-argo-inbox.js.map +1 -0
  83. package/dist/core/argo-inbox/note-argo-account.d.ts +19 -0
  84. package/dist/core/argo-inbox/note-argo-account.js +18 -0
  85. package/dist/core/argo-inbox/note-argo-account.js.map +1 -0
  86. package/dist/core/argo-inbox/ports.d.ts +123 -0
  87. package/dist/core/argo-inbox/ports.js +2 -0
  88. package/dist/core/argo-inbox/ports.js.map +1 -0
  89. package/dist/core/argo-inbox/read-argo-inbox-notice.d.ts +34 -0
  90. package/dist/core/argo-inbox/read-argo-inbox-notice.js +20 -0
  91. package/dist/core/argo-inbox/read-argo-inbox-notice.js.map +1 -0
  92. package/dist/core/argo-inbox/read-argo-section.d.ts +54 -0
  93. package/dist/core/argo-inbox/read-argo-section.js +67 -0
  94. package/dist/core/argo-inbox/read-argo-section.js.map +1 -0
  95. package/dist/core/argo-inbox/show-argo-inbox-in-slack.d.ts +36 -0
  96. package/dist/core/argo-inbox/show-argo-inbox-in-slack.js +125 -0
  97. package/dist/core/argo-inbox/show-argo-inbox-in-slack.js.map +1 -0
  98. package/dist/core/argo-inbox/wake-for-argo.d.ts +37 -0
  99. package/dist/core/argo-inbox/wake-for-argo.js +139 -0
  100. package/dist/core/argo-inbox/wake-for-argo.js.map +1 -0
  101. package/dist/core/oauth/exchange-id-jag.d.ts +4 -1
  102. package/dist/core/oauth/exchange-id-jag.js +5 -2
  103. package/dist/core/oauth/exchange-id-jag.js.map +1 -1
  104. package/dist/core/people/person-wakes.d.ts +49 -0
  105. package/dist/core/people/person-wakes.js +27 -0
  106. package/dist/core/people/person-wakes.js.map +1 -0
  107. package/dist/core/people/ports.d.ts +6 -2
  108. package/dist/core/people/wake-person.js +1 -1
  109. package/dist/core/people/wake-person.js.map +1 -1
  110. package/dist/core/people/web-push-channel.js +2 -2
  111. package/dist/core/people/web-push-channel.js.map +1 -1
  112. package/dist/core/sign-in/account-token.d.ts +5 -1
  113. package/dist/core/sign-in/account-token.js +8 -2
  114. package/dist/core/sign-in/account-token.js.map +1 -1
  115. package/dist/core/sign-in/complete-sign-in.d.ts +4 -1
  116. package/dist/core/sign-in/complete-sign-in.js +5 -2
  117. package/dist/core/sign-in/complete-sign-in.js.map +1 -1
  118. package/dist/core/sign-in/ports.d.ts +2 -0
  119. package/dist/core/slack/edited-post-of.d.ts +2 -0
  120. package/dist/core/slack/edited-post-of.js +1 -1
  121. package/dist/core/slack/edited-post-of.js.map +1 -1
  122. package/dist/core/slack/ports.d.ts +6 -4
  123. package/package.json +3 -2
  124. package/src/adapters/prisma/migrations/20261109090000_argo_accounts/migration.sql +8 -0
  125. package/src/adapters/prisma/migrations/20261110090000_argo_slack_posts/migration.sql +12 -0
  126. package/src/adapters/prisma/migrations/20261110100000_argo_wakes/migration.sql +18 -0
  127. package/src/adapters/prisma/schema.prisma +47 -0
  128. package/web/.next/BUILD_ID +1 -1
  129. package/web/.next/build-manifest.json +3 -3
  130. package/web/.next/diagnostics/route-bundle-stats.json +130 -128
  131. package/web/.next/fallback-build-manifest.json +3 -3
  132. package/web/.next/prerender-manifest.json +3 -3
  133. package/web/.next/server/app/(bridge)/bridge/basket/page/server-reference-manifest.json +10 -10
  134. package/web/.next/server/app/(bridge)/bridge/basket/page.js +6 -6
  135. package/web/.next/server/app/(bridge)/bridge/basket/page.js.nft.json +1 -1
  136. package/web/.next/server/app/(bridge)/bridge/basket/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/(bridge)/bridge/done/page/server-reference-manifest.json +2 -2
  138. package/web/.next/server/app/(bridge)/bridge/done/page.js +6 -6
  139. package/web/.next/server/app/(bridge)/bridge/done/page.js.nft.json +1 -1
  140. package/web/.next/server/app/(bridge)/bridge/done/page_client-reference-manifest.js +1 -1
  141. package/web/.next/server/app/(bridge)/bridge/fleet/page/server-reference-manifest.json +1 -1
  142. package/web/.next/server/app/(bridge)/bridge/fleet/page.js +6 -6
  143. package/web/.next/server/app/(bridge)/bridge/fleet/page.js.nft.json +1 -1
  144. package/web/.next/server/app/(bridge)/bridge/fleet/page_client-reference-manifest.js +1 -1
  145. package/web/.next/server/app/(bridge)/bridge/page/server-reference-manifest.json +9 -9
  146. package/web/.next/server/app/(bridge)/bridge/page.js +6 -6
  147. package/web/.next/server/app/(bridge)/bridge/page.js.nft.json +1 -1
  148. package/web/.next/server/app/(bridge)/bridge/page_client-reference-manifest.js +1 -1
  149. package/web/.next/server/app/(bridge)/bridge/settings/page/server-reference-manifest.json +1 -1
  150. package/web/.next/server/app/(bridge)/bridge/settings/page.js +7 -7
  151. package/web/.next/server/app/(bridge)/bridge/settings/page.js.nft.json +1 -1
  152. package/web/.next/server/app/(bridge)/bridge/settings/page_client-reference-manifest.js +1 -1
  153. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page/server-reference-manifest.json +2 -2
  154. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page.js +6 -6
  155. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page.js.nft.json +1 -1
  156. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page_client-reference-manifest.js +1 -1
  157. package/web/.next/server/app/(bridge)/bridge/settings/routing/page/server-reference-manifest.json +5 -5
  158. package/web/.next/server/app/(bridge)/bridge/settings/routing/page.js +4 -4
  159. package/web/.next/server/app/(bridge)/bridge/settings/routing/page.js.nft.json +1 -1
  160. package/web/.next/server/app/(bridge)/bridge/settings/routing/page_client-reference-manifest.js +1 -1
  161. package/web/.next/server/app/(bridge)/bridge/stay-aware/page/server-reference-manifest.json +9 -9
  162. package/web/.next/server/app/(bridge)/bridge/stay-aware/page.js +5 -5
  163. package/web/.next/server/app/(bridge)/bridge/stay-aware/page.js.nft.json +1 -1
  164. package/web/.next/server/app/(bridge)/bridge/stay-aware/page_client-reference-manifest.js +1 -1
  165. package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
  166. package/web/.next/server/app/(console)/gateway-off/page.js +2 -2
  167. package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
  168. package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
  169. package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
  170. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js +2 -2
  171. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
  172. package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
  173. package/web/.next/server/app/(console)/outside-parties/[name]/change/page/server-reference-manifest.json +15 -15
  174. package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js +2 -2
  175. package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js.nft.json +1 -1
  176. package/web/.next/server/app/(console)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
  177. package/web/.next/server/app/(console)/outside-parties/[name]/page/server-reference-manifest.json +8 -8
  178. package/web/.next/server/app/(console)/outside-parties/[name]/page.js +2 -2
  179. package/web/.next/server/app/(console)/outside-parties/[name]/page.js.nft.json +1 -1
  180. package/web/.next/server/app/(console)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
  181. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page/server-reference-manifest.json +15 -15
  182. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js +2 -2
  183. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js.nft.json +1 -1
  184. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
  185. package/web/.next/server/app/(console)/outside-parties/add/page/server-reference-manifest.json +10 -10
  186. package/web/.next/server/app/(console)/outside-parties/add/page.js +2 -2
  187. package/web/.next/server/app/(console)/outside-parties/add/page.js.nft.json +1 -1
  188. package/web/.next/server/app/(console)/outside-parties/add/page_client-reference-manifest.js +1 -1
  189. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +2 -2
  190. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js +2 -2
  191. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
  192. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
  193. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page/server-reference-manifest.json +2 -2
  194. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js +2 -2
  195. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
  196. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
  197. package/web/.next/server/app/(console)/outside-parties/page/server-reference-manifest.json +2 -2
  198. package/web/.next/server/app/(console)/outside-parties/page.js +2 -2
  199. package/web/.next/server/app/(console)/outside-parties/page.js.nft.json +1 -1
  200. package/web/.next/server/app/(console)/outside-parties/page_client-reference-manifest.js +1 -1
  201. package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +7 -7
  202. package/web/.next/server/app/(console)/parties/page.js +2 -2
  203. package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
  204. package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
  205. package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
  206. package/web/.next/server/app/(console)/sign-in/failed/page.js +2 -2
  207. package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
  208. package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
  209. package/web/.next/server/app/(console)/slack/disconnect/page/server-reference-manifest.json +11 -11
  210. package/web/.next/server/app/(console)/slack/disconnect/page.js +2 -2
  211. package/web/.next/server/app/(console)/slack/disconnect/page.js.nft.json +1 -1
  212. package/web/.next/server/app/(console)/slack/disconnect/page_client-reference-manifest.js +1 -1
  213. package/web/.next/server/app/(console)/slack/expose/page/server-reference-manifest.json +11 -11
  214. package/web/.next/server/app/(console)/slack/expose/page.js +2 -2
  215. package/web/.next/server/app/(console)/slack/expose/page.js.nft.json +1 -1
  216. package/web/.next/server/app/(console)/slack/expose/page_client-reference-manifest.js +1 -1
  217. package/web/.next/server/app/(console)/slack/page/server-reference-manifest.json +11 -11
  218. package/web/.next/server/app/(console)/slack/page.js +2 -2
  219. package/web/.next/server/app/(console)/slack/page.js.nft.json +1 -1
  220. package/web/.next/server/app/(console)/slack/page_client-reference-manifest.js +1 -1
  221. package/web/.next/server/app/(console)/slack/remove/page/server-reference-manifest.json +11 -11
  222. package/web/.next/server/app/(console)/slack/remove/page.js +2 -2
  223. package/web/.next/server/app/(console)/slack/remove/page.js.nft.json +1 -1
  224. package/web/.next/server/app/(console)/slack/remove/page_client-reference-manifest.js +1 -1
  225. package/web/.next/server/app/_global-error.html +1 -1
  226. package/web/.next/server/app/_global-error.rsc +1 -1
  227. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  228. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  229. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  230. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  231. package/web/.next/server/app/_not-found/page.js +2 -2
  232. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  233. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  234. package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
  235. package/web/.next/server/app/authorize/failed/page.js +3 -4
  236. package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
  237. package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
  238. package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
  239. package/web/.next/server/app/authorize/pick/page.js +3 -4
  240. package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
  241. package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
  242. package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
  243. package/web/.next/server/app/authorize/waiting/approval/page.js +3 -4
  244. package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
  245. package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
  246. package/web/.next/server/chunks/ssr/01fr_app_(bridge)_bridge_settings_requests_[requestId]_page_actions_0o8g7_xshtmem.js +1 -1
  247. package/web/.next/server/chunks/ssr/01fr_app_(bridge)_bridge_settings_requests_[requestId]_page_actions_0o8g7_xshtmem.js.map +1 -1
  248. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_stay-aware_page_actions_1u0xo0v3y9c34.js +1 -1
  249. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_stay-aware_page_actions_1u0xo0v3y9c34.js.map +1 -1
  250. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_bridge_settings_routing_page_actions_06_j7s24dy5ee.js +1 -1
  251. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_bridge_settings_routing_page_actions_06_j7s24dy5ee.js.map +1 -1
  252. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js +1 -1
  253. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js.map +1 -1
  254. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js +1 -1
  255. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js.map +1 -1
  256. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js +1 -1
  257. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js.map +1 -1
  258. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js +1 -1
  259. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js.map +1 -1
  260. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js +1 -1
  261. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js.map +1 -1
  262. package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js +1 -1
  263. package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js.map +1 -1
  264. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a6a1yc_ac-qt._.js +1 -1
  265. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a8db18tyk__5._.js +1 -1
  266. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a8db18tyk__5._.js.map +1 -1
  267. package/web/.next/server/chunks/ssr/[root-of-the-server]__0e4l5gt01o04p._.js +1 -1
  268. package/web/.next/server/chunks/ssr/[root-of-the-server]__0fz0817_b9ljl._.js +1 -1
  269. package/web/.next/server/chunks/ssr/[root-of-the-server]__0gptrhg3mj4hs._.js.map +1 -1
  270. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js +1 -1
  271. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js.map +1 -1
  272. package/web/.next/server/chunks/ssr/[root-of-the-server]__0kjcooo3pi4_k._.js.map +1 -1
  273. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rmg7huc074bf._.js +1 -1
  274. package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js +1 -1
  275. package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js.map +1 -1
  276. package/web/.next/server/chunks/ssr/[root-of-the-server]__13v3maun347sn._.js +1 -1
  277. package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js +1 -1
  278. package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js.map +1 -1
  279. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
  280. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
  281. package/web/.next/server/chunks/ssr/{[root-of-the-server]__1qtzvez4cn5be._.js → [root-of-the-server]__1ektgsnjg4btl._.js} +2 -2
  282. package/web/.next/server/chunks/ssr/[root-of-the-server]__1hgu6f5hpnykv._.js.map +1 -1
  283. package/web/.next/server/chunks/ssr/{[root-of-the-server]__1j6n8jj7-5t6v._.js → [root-of-the-server]__1nfpyr3ynmwks._.js} +1 -1
  284. package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js +1 -1
  285. package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js.map +1 -1
  286. package/web/.next/server/chunks/ssr/[root-of-the-server]__1ul9rrs2g66lm._.js +1 -1
  287. package/web/.next/server/chunks/ssr/[root-of-the-server]__20gvfqy33wcds._.js.map +1 -1
  288. package/web/.next/server/chunks/ssr/_00fvst5icgei4._.js +3 -0
  289. package/web/.next/server/chunks/ssr/_00fvst5icgei4._.js.map +1 -0
  290. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
  291. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
  292. package/web/.next/server/chunks/ssr/_02mwdj1oj1zgm._.js +3 -0
  293. package/web/.next/server/chunks/ssr/_02mwdj1oj1zgm._.js.map +1 -0
  294. package/web/.next/server/chunks/ssr/_0fqd23gyia_8g._.js +3 -0
  295. package/web/.next/server/chunks/ssr/_0fqd23gyia_8g._.js.map +1 -0
  296. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
  297. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
  298. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
  299. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
  300. package/web/.next/server/chunks/ssr/_0u0u0owpxx_37._.js +3 -0
  301. package/web/.next/server/chunks/ssr/_0u0u0owpxx_37._.js.map +1 -0
  302. package/web/.next/server/chunks/ssr/_0v_x6k3ztfvx0._.js +1 -1
  303. package/web/.next/server/chunks/ssr/_0v_x6k3ztfvx0._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/_0x5-_917zcaj9._.js +3 -0
  305. package/web/.next/server/chunks/ssr/_0x5-_917zcaj9._.js.map +1 -0
  306. package/web/.next/server/chunks/ssr/{_0cnpz5jm2_9xf._.js → _0xajzaside0sw._.js} +2 -2
  307. package/web/.next/server/chunks/ssr/{_0cnpz5jm2_9xf._.js.map → _0xajzaside0sw._.js.map} +1 -1
  308. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
  309. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
  310. package/web/.next/server/chunks/ssr/_0yhvyj-yts7qi._.js +3 -0
  311. package/web/.next/server/chunks/ssr/_0yhvyj-yts7qi._.js.map +1 -0
  312. package/web/.next/server/chunks/ssr/_104ilzyn58zw_._.js +3 -0
  313. package/web/.next/server/chunks/ssr/_104ilzyn58zw_._.js.map +1 -0
  314. package/web/.next/server/chunks/ssr/{_1a9wrl8uw7x-y._.js → _13_ady-a4058y._.js} +1 -1
  315. package/web/.next/server/chunks/ssr/_14k1oldo5chf8._.js +1 -1
  316. package/web/.next/server/chunks/ssr/_14k1oldo5chf8._.js.map +1 -1
  317. package/web/.next/server/chunks/ssr/_1_wav28san6dm._.js +1 -1
  318. package/web/.next/server/chunks/ssr/{_1iorutn_o9hja._.js → _1cc4ie_s4tycq._.js} +1 -1
  319. package/web/.next/server/chunks/ssr/_1e2o809f0ekry._.js +1 -1
  320. package/web/.next/server/chunks/ssr/_1gbkqq8ra1nei._.js +1 -1
  321. package/web/.next/server/chunks/ssr/_1gbkqq8ra1nei._.js.map +1 -1
  322. package/web/.next/server/chunks/ssr/{_1kdx8a0j5cxyl._.js → _1gnk2vqna6c6u._.js} +2 -2
  323. package/web/.next/server/chunks/ssr/{_1kdx8a0j5cxyl._.js.map → _1gnk2vqna6c6u._.js.map} +1 -1
  324. package/web/.next/server/chunks/ssr/_1k2b80m058vgx._.js +3 -0
  325. package/web/.next/server/chunks/ssr/_1k2b80m058vgx._.js.map +1 -0
  326. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
  327. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
  328. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
  329. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
  330. package/web/.next/server/chunks/ssr/_1t74yvog5g6g2._.js +1 -1
  331. package/web/.next/server/chunks/ssr/_1t74yvog5g6g2._.js.map +1 -1
  332. package/web/.next/server/chunks/ssr/{_1i5zdy3tp2ykh._.js → _1xgivp19ts9hn._.js} +1 -1
  333. package/web/.next/server/chunks/ssr/_1zmd3armaxhyu._.js +1 -1
  334. package/web/.next/server/chunks/ssr/_1zmd3armaxhyu._.js.map +1 -1
  335. package/web/.next/server/chunks/ssr/node_modules_05ni_zu0e0w44._.js +3 -0
  336. package/web/.next/server/chunks/ssr/node_modules_05ni_zu0e0w44._.js.map +1 -0
  337. package/web/.next/server/chunks/ssr/node_modules_07vtvfyfo0a6i._.js +3 -0
  338. package/web/.next/server/chunks/ssr/node_modules_07vtvfyfo0a6i._.js.map +1 -0
  339. package/web/.next/server/chunks/ssr/node_modules_0ettht2so2tkh._.js +1 -1
  340. package/web/.next/server/chunks/ssr/node_modules_0keape0zsobyj._.js +1 -1
  341. package/web/.next/server/chunks/ssr/node_modules_12euo0ncdx1pn._.js +3 -0
  342. package/web/.next/server/chunks/ssr/node_modules_12euo0ncdx1pn._.js.map +1 -0
  343. package/web/.next/server/chunks/ssr/node_modules_1722-epjft-rn._.js +3 -0
  344. package/web/.next/server/chunks/ssr/node_modules_1722-epjft-rn._.js.map +1 -0
  345. package/web/.next/server/chunks/ssr/{node_modules_@aeolus-fleet_common_dist_header_1x3s5abk_uj9j._.js → node_modules_@aeolus-fleet_ui_dist_11tn8gozt2_c3._.js} +2 -2
  346. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_ui_dist_11tn8gozt2_c3._.js.map +1 -0
  347. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_ui_dist_16j49enf275ln._.js +3 -0
  348. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_ui_dist_16j49enf275ln._.js.map +1 -0
  349. package/web/.next/server/chunks/ssr/node_modules_@base-ui_0jlwmxa9rk8p_._.js +1 -1
  350. package/web/.next/server/chunks/ssr/node_modules_@base-ui_19e_nxxf4a88q._.js +1 -1
  351. package/web/.next/server/chunks/ssr/web_0_peudz6-o69m._.js +1 -1
  352. package/web/.next/server/chunks/ssr/web_0_peudz6-o69m._.js.map +1 -1
  353. package/web/.next/server/chunks/ssr/web_0cxcy088wnfmw._.js +1 -1
  354. package/web/.next/server/chunks/ssr/web_0oz8bypfxh82g._.js +1 -1
  355. package/web/.next/server/chunks/ssr/web_0oz8bypfxh82g._.js.map +1 -1
  356. package/web/.next/server/chunks/ssr/web_0qgev3ti257yj._.js +1 -1
  357. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js +1 -1
  358. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js.map +1 -1
  359. package/web/.next/server/chunks/ssr/web_1fi1x3y7rg7mf._.js +1 -1
  360. package/web/.next/server/chunks/ssr/web_1ga4pbv72m0ad._.js +1 -1
  361. package/web/.next/server/chunks/ssr/web_1irsulms62lzf._.js +1 -1
  362. package/web/.next/server/chunks/ssr/web_1k2rrq-kr6f9k._.js +1 -1
  363. package/web/.next/server/chunks/ssr/web_1k2rrq-kr6f9k._.js.map +1 -1
  364. package/web/.next/server/chunks/ssr/web_1qvxzqmq4aw94._.js +1 -1
  365. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_basket_page_actions_0g7q_rc5nma1e.js +1 -1
  366. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_basket_page_actions_0g7q_rc5nma1e.js.map +1 -1
  367. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_done_page_actions_0kjm34arntdzv.js +1 -1
  368. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_done_page_actions_0kjm34arntdzv.js.map +1 -1
  369. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_page_actions_1ok64rg3edm_u.js +1 -1
  370. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_page_actions_1ok64rg3edm_u.js.map +1 -1
  371. package/web/.next/server/chunks/ssr/web_app_(bridge)_bridge_fleet_page_tsx_0uvtx8hiy8g0n._.js +1 -1
  372. package/web/.next/server/chunks/ssr/web_app_(bridge)_bridge_settings_page_tsx_1z5yr8ss25q7n._.js +1 -1
  373. package/web/.next/server/chunks/ssr/web_app_(console)_parties_page_tsx_0pp63ghly3eyp._.js +1 -1
  374. package/web/.next/server/chunks/ssr/web_app_authorize_layout_tsx_0gs61_7wzx68y._.js +1 -1
  375. package/web/.next/server/chunks/ssr/web_app_authorize_layout_tsx_0gs61_7wzx68y._.js.map +1 -1
  376. package/web/.next/server/chunks/ssr/{web_features_0bwqcs9wjf4y8._.js → web_features_06f9kfi0c4nf8._.js} +2 -2
  377. package/web/.next/server/chunks/ssr/{web_features_05aos-xwnl3m_._.js.map → web_features_06f9kfi0c4nf8._.js.map} +1 -1
  378. package/web/.next/server/chunks/ssr/web_features_0rd6357w-eo50._.js +1 -1
  379. package/web/.next/server/chunks/ssr/{web_features_05aos-xwnl3m_._.js → web_features_12b-75qfhurxi._.js} +2 -2
  380. package/web/.next/server/chunks/ssr/{web_features_0bwqcs9wjf4y8._.js.map → web_features_12b-75qfhurxi._.js.map} +1 -1
  381. package/web/.next/server/chunks/ssr/web_features_19r68thirqv1n._.js +1 -1
  382. package/web/.next/server/chunks/ssr/web_features_1m5g9a6mwrsd-._.js +1 -1
  383. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
  384. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
  385. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
  386. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
  387. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
  388. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
  389. package/web/.next/server/chunks/ssr/web_features_authorize_137wk0n1nu3cn._.js +1 -1
  390. package/web/.next/server/chunks/ssr/web_features_authorize_137wk0n1nu3cn._.js.map +1 -1
  391. package/web/.next/server/chunks/ssr/{web_features_bridge_0w95y19yk5w14._.js → web_features_bridge_0msm42qwm0-jq._.js} +2 -2
  392. package/web/.next/server/chunks/ssr/{web_features_bridge_0w95y19yk5w14._.js.map → web_features_bridge_0msm42qwm0-jq._.js.map} +1 -1
  393. package/web/.next/server/chunks/ssr/web_features_bridge_fleet_ui_fleet-numbers_tsx_0_afv4j248_w-._.js +1 -1
  394. package/web/.next/server/chunks/ssr/web_features_bridge_fleet_ui_fleet-numbers_tsx_0_afv4j248_w-._.js.map +1 -1
  395. package/web/.next/server/chunks/ssr/web_features_bridge_hooks_bridge-actions_ts_0h-_xm2rcb-ij._.js +1 -1
  396. package/web/.next/server/chunks/ssr/web_features_bridge_hooks_bridge-actions_ts_0h-_xm2rcb-ij._.js.map +1 -1
  397. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js +1 -1
  398. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js.map +1 -1
  399. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js +1 -1
  400. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js.map +1 -1
  401. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js +1 -1
  402. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js.map +1 -1
  403. package/web/.next/server/chunks/ssr/web_features_bridge_state_home-panel_tsx_1cc5zdhxogl_2._.js +1 -1
  404. package/web/.next/server/chunks/ssr/web_features_bridge_state_home-panel_tsx_1cc5zdhxogl_2._.js.map +1 -1
  405. package/web/.next/server/chunks/ssr/{web_features_025l9l6m2zkya._.js → web_features_forms_1u0akr22eh_x_._.js} +2 -2
  406. package/web/.next/server/chunks/ssr/web_features_forms_1u0akr22eh_x_._.js.map +1 -0
  407. package/web/.next/server/chunks/ssr/web_features_frame_01uyck6q56an2._.js +3 -0
  408. package/web/.next/server/chunks/ssr/web_features_frame_01uyck6q56an2._.js.map +1 -0
  409. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js +1 -1
  410. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map +1 -1
  411. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
  412. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
  413. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
  414. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
  415. package/web/.next/server/chunks/ssr/web_features_outside-party_1-lre9nfakki7._.js +1 -1
  416. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
  417. package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
  418. package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js +1 -1
  419. package/web/.next/server/middleware-build-manifest.js +3 -3
  420. package/web/.next/server/pages/500.html +1 -1
  421. package/web/.next/server/preview-props.json +3 -3
  422. package/web/.next/server/server-reference-manifest.js +1 -1
  423. package/web/.next/server/server-reference-manifest.json +49 -49
  424. package/web/.next/static/chunks/030kay14jcn_y.js +1 -0
  425. package/web/.next/static/chunks/0ben53l12lrh1.js +1 -0
  426. package/web/.next/static/chunks/0d1u4n5okodee.css +3 -0
  427. package/web/.next/static/chunks/0dg4cy4rae-3o.js +1 -0
  428. package/web/.next/static/chunks/0jwils_670syn.js +1 -0
  429. package/web/.next/static/chunks/0lnew3mjkd54b.js +1 -0
  430. package/web/.next/static/chunks/0m95j-t2qmnd_.js +1 -0
  431. package/web/.next/static/chunks/0r5ujkp-5utsu.js +1 -0
  432. package/web/.next/static/chunks/{23vvtbj-zoa_f.js → 1jyiwl5szsvgn.js} +1 -1
  433. package/web/.next/static/chunks/{0k33n07zesv12.js → 1lkcm-iwggfae.js} +1 -1
  434. package/web/.next/static/chunks/1ml6wx1ya9wwo.js +1 -0
  435. package/web/.next/static/chunks/22wtc73dzqm8f.js +1 -0
  436. package/web/.next/static/chunks/2drwxc7-hry0u.js +1 -0
  437. package/web/.next/static/chunks/{07j7jnfe13wx6.js → 2ich96rzec753.js} +1 -1
  438. package/web/.next/static/chunks/{3d5z1i-6yksxd.js → 2khjzepn4_2a-.js} +1 -1
  439. package/web/.next/static/chunks/{1uhmdmkn5gsk2.js → 2ui6n5-n032a3.js} +1 -1
  440. package/web/.next/static/chunks/2wvdu6-tx1h0l.js +1 -0
  441. package/web/.next/static/chunks/33qpc2y76i927.js +1 -0
  442. package/web/.next/static/chunks/3h8spyc73a438.js +1 -0
  443. package/web/.next/static/chunks/{2dgbb29jkr_tu.js → 3v8s571padqcz.js} +1 -1
  444. package/web/.next/static/chunks/3wg9zn3lyhf-b.js +1 -0
  445. package/web/.next/trace +1 -1
  446. package/web/.next/trace-build +1 -1
  447. package/web/public/argo-wake-icon.svg +1 -0
  448. package/web/public/wake-worker.js +8 -2
  449. package/web/public/wake-worker.test.ts +52 -0
  450. package/web/.next/server/chunks/ssr/_0oekmfmigr0qv._.js +0 -3
  451. package/web/.next/server/chunks/ssr/_0oekmfmigr0qv._.js.map +0 -1
  452. package/web/.next/server/chunks/ssr/_0vid8-myyy-_4._.js +0 -3
  453. package/web/.next/server/chunks/ssr/_0y5eahpucp8g_._.js +0 -3
  454. package/web/.next/server/chunks/ssr/_0y5eahpucp8g_._.js.map +0 -1
  455. package/web/.next/server/chunks/ssr/_13fbnlwrl24s3._.js +0 -3
  456. package/web/.next/server/chunks/ssr/_13fbnlwrl24s3._.js.map +0 -1
  457. package/web/.next/server/chunks/ssr/_1airu8wwf7z1b._.js +0 -3
  458. package/web/.next/server/chunks/ssr/_1airu8wwf7z1b._.js.map +0 -1
  459. package/web/.next/server/chunks/ssr/_1i5zdy3tp2ykh._.js.map +0 -1
  460. package/web/.next/server/chunks/ssr/_1pp0z5srqqqyl._.js +0 -3
  461. package/web/.next/server/chunks/ssr/_1pp0z5srqqqyl._.js.map +0 -1
  462. package/web/.next/server/chunks/ssr/_1xuikhitica6p._.js +0 -3
  463. package/web/.next/server/chunks/ssr/_1xuikhitica6p._.js.map +0 -1
  464. package/web/.next/server/chunks/ssr/node_modules_0gpbs01t1c_a4._.js +0 -3
  465. package/web/.next/server/chunks/ssr/node_modules_0gpbs01t1c_a4._.js.map +0 -1
  466. package/web/.next/server/chunks/ssr/node_modules_0zgrzr0ui3gi8._.js +0 -3
  467. package/web/.next/server/chunks/ssr/node_modules_0zgrzr0ui3gi8._.js.map +0 -1
  468. package/web/.next/server/chunks/ssr/node_modules_174jf4d4t_bo_._.js +0 -3
  469. package/web/.next/server/chunks/ssr/node_modules_174jf4d4t_bo_._.js.map +0 -1
  470. package/web/.next/server/chunks/ssr/node_modules_1qxtjrbc2-6xd._.js +0 -3
  471. package/web/.next/server/chunks/ssr/node_modules_1qxtjrbc2-6xd._.js.map +0 -1
  472. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_0t_cmi-llaq7g._.js +0 -3
  473. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_0t_cmi-llaq7g._.js.map +0 -1
  474. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_1x3s5abk_uj9j._.js.map +0 -1
  475. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_app-switcher_08qq5-uxv7jii.js +0 -3
  476. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_app-switcher_08qq5-uxv7jii.js.map +0 -1
  477. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_class-names_1h5pbm2ucssiq.js +0 -3
  478. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_class-names_1h5pbm2ucssiq.js.map +0 -1
  479. package/web/.next/server/chunks/ssr/web_features_025l9l6m2zkya._.js.map +0 -1
  480. package/web/.next/server/chunks/ssr/web_features_frame_0pe8cwpxe1egb._.js +0 -3
  481. package/web/.next/server/chunks/ssr/web_features_frame_0pe8cwpxe1egb._.js.map +0 -1
  482. package/web/.next/server/chunks/ssr/web_features_outside-parties_paths_ts_0vbj9elyqekpp._.js +0 -3
  483. package/web/.next/server/chunks/ssr/web_features_outside-parties_paths_ts_0vbj9elyqekpp._.js.map +0 -1
  484. package/web/.next/static/chunks/0ozz8jadgfdrx.js +0 -1
  485. package/web/.next/static/chunks/1v36iovy1f5cj.js +0 -1
  486. package/web/.next/static/chunks/1vhvy8bx4fxur.js +0 -1
  487. package/web/.next/static/chunks/1vhx_nu9nxo1v.js +0 -1
  488. package/web/.next/static/chunks/24vn5i6ojvl8l.js +0 -1
  489. package/web/.next/static/chunks/2l6hafvocw-rd.js +0 -1
  490. package/web/.next/static/chunks/2ld8_nap7g_uy.js +0 -1
  491. package/web/.next/static/chunks/2pvcbql986wln.js +0 -1
  492. package/web/.next/static/chunks/2s1efgj6gxjgl.js +0 -1
  493. package/web/.next/static/chunks/2zlx-c_0x38uo.css +0 -3
  494. package/web/.next/static/chunks/34u_331hqync_.js +0 -1
  495. package/web/.next/static/chunks/3_bb0g4jkqn8q.js +0 -1
  496. package/web/.next/static/chunks/3jq9vu8tr29j2.js +0 -1
  497. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__1qtzvez4cn5be._.js.map → [root-of-the-server]__1ektgsnjg4btl._.js.map} +0 -0
  498. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__1j6n8jj7-5t6v._.js.map → [root-of-the-server]__1nfpyr3ynmwks._.js.map} +0 -0
  499. /package/web/.next/server/chunks/ssr/{_1a9wrl8uw7x-y._.js.map → _13_ady-a4058y._.js.map} +0 -0
  500. /package/web/.next/server/chunks/ssr/{_1iorutn_o9hja._.js.map → _1cc4ie_s4tycq._.js.map} +0 -0
  501. /package/web/.next/server/chunks/ssr/{_0vid8-myyy-_4._.js.map → _1xgivp19ts9hn._.js.map} +0 -0
  502. /package/web/.next/static/{2O8_FQX7YN47L5_OxojXH → 79SqN0pBIJ0D-DK1jZmK6}/_buildManifest.js +0 -0
  503. /package/web/.next/static/{2O8_FQX7YN47L5_OxojXH → 79SqN0pBIJ0D-DK1jZmK6}/_clientMiddlewareManifest.js +0 -0
  504. /package/web/.next/static/{2O8_FQX7YN47L5_OxojXH → 79SqN0pBIJ0D-DK1jZmK6}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/bridge/hooks/bridge-actions.ts","../../../../../node_modules/%40aeolus-fleet/common/src/rules/page-size.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/alert.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/question.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/page.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/report.ts","../../../../../node_modules/%40aeolus-fleet/common/src/rules/payload.ts","../../../../../web/features/bridge/services/stay-aware.ts","../../../../../web/features/bridge/services/send-message.ts","../../../../../web/features/bridge/services/deliveries.ts"],"sourcesContent":["'use server';\n/**\n * Bridge's actions, each one call of the gateway's API as the signed-in\n * account, on the server (0033): opening, answering and being done with an\n * item, putting an answer in the basket, removing it and sending the basket,\n * sending a ship a message,\n * reading the next page of the record, and in Bridge's settings where\n * each job shows, web push, the Slack link and deciding a request. The API checks everything; a\n * refusal comes back in its own words for the page to say by the control. A\n * sign-in that ended sends the person to sign in again.\n */\nimport { idSchema } from '@aeolus-fleet/common';\nimport { revalidatePath } from 'next/cache';\nimport { headers } from 'next/headers';\nimport { redirect } from 'next/navigation';\n\nimport type { GatewayApi } from '../../../lib/gateway-api/gateway-api';\nimport { FLEET_PARAMETER } from '../../../lib/gateway-api/page-account';\nimport { refusalCodeOf, refusalMessageOf, requestApi } from '../../../lib/gateway-api/page-api';\nimport { serverCredentialOf } from '../../forms/server-credential';\nimport { answerOf, bodyOf, questionOf, stepOf, type AnswerInput, type FocusedDelivery } from '../services/deliveries';\nimport { alertOf } from '../services/stay-aware';\nimport type { SubscriptionInput } from '../services/web-push';\nimport { EVERY_APP_SHIP_SCOPES, type DecisionInput } from '../services/requests';\nimport type { BasketSent } from '../services/basket';\nimport { alertShipOf, sendableShipsOf, type SendableShip } from '../services/send-message';\nimport type { RecordPage } from '../services/items';\nimport type { RoutedJob, RoutedPlace } from '../services/routing';\nimport { BRIDGE_PATH } from '../paths';\n\n/** What an action says when the gateway gave no answer of its own. */\nconst NO_ANSWER = 'The gateway did not answer: try again in a moment';\n\n/** What an action came to: its value, or why not, with the API's code when the API refused. */\nexport type ActionOutcome<T> = { readonly isOk: true; readonly value: T } | { readonly isOk: false; readonly message: string; readonly code?: string };\n\nasync function attempt<T>(fleet: string, run: (api: GatewayApi) => Promise<T>): Promise<ActionOutcome<T>> {\n let outcome: ActionOutcome<T>;\n try {\n outcome = { isOk: true, value: await run(await requestApi(fleet)) };\n } catch (error) {\n const code = refusalCodeOf(error);\n if (code === 'UNAUTHORIZED') {\n return redirect(`/sign-in/start?${new URLSearchParams({ return_to: `${BRIDGE_PATH}?${new URLSearchParams({ [FLEET_PARAMETER]: fleet }).toString()}` }).toString()}`);\n }\n return code === undefined ? { isOk: false, message: NO_ANSWER } : { isOk: false, message: refusalMessageOf(error), code };\n }\n revalidatePath(BRIDGE_PATH, 'layout');\n return outcome;\n}\n\n/** The next page of the person ship's record, after the cursor the last one answered (Done). */\nexport async function readMoreRecord(fleet: string, cursor: string): Promise<ActionOutcome<RecordPage>> {\n return attempt(fleet, (api) => api.people.record.query({ cursor }));\n}\n\n/** Opens an item: the gateway acknowledges it for the person, and it is shown whole, once; an alert or a notice seen is done (CC16). A step's link leads outside Aeolus unless it leads to the host this page was asked on. */\nexport async function openDelivery(fleet: string, deliveryId: string): Promise<ActionOutcome<FocusedDelivery>> {\n const bridgeHost = (await headers()).get('host') ?? '';\n return attempt(fleet, async (api) => {\n const opened = await api.people.open.mutate({ deliveryId });\n const { contentType, payload, meetingId, ...entry } = opened;\n return { ...entry, payload, body: bodyOf({ contentType, payload }), question: questionOf({ contentType, payload }), step: stepOf({ contentType, payload }, bridgeHost), alert: alertOf({ contentType, payload }), meetingId: meetingId ?? undefined, alertShip: alertShipOf({ contentType, payload }) };\n });\n}\n\nexport async function answerDelivery({ fleet, deliveryId, input }: { fleet: string; deliveryId: string; input: AnswerInput }): Promise<ActionOutcome<undefined>> {\n const answer = answerOf(input);\n if (!answer.isOk) {\n return answer;\n }\n return attempt(fleet, async (api) => {\n await api.people.answer.mutate({ deliveryId, ...answer.value });\n return undefined;\n });\n}\n\n/** Puts the person's answer to a question in the basket, or changes it there, with the option's label as the question shows it: nothing is sent (Bridge, section 9). */\nexport async function putInBasket({ fleet, deliveryId, option, optionLabel, note }: { fleet: string; deliveryId: string; option: number | null; optionLabel: string | null; note: string }): Promise<ActionOutcome<{ option: number | null; note: string | null }>> {\n return attempt(fleet, async (api) => {\n const { option: put, note: written } = await api.people.putInBasket.mutate({ deliveryId, option, optionLabel, note });\n return { option: put, note: written };\n });\n}\n\n/** From a question's row: opens it, as the person's own press, and puts its asker's pick in the basket with no note, named by its label as the question shows it (aeolus-fleet#1535). */\nexport async function putPickInBasket({ fleet, deliveryId, option }: { fleet: string; deliveryId: string; option: number }): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n const opened = await api.people.open.mutate({ deliveryId });\n const optionLabel = questionOf(opened)?.options.find(({ key }) => key === option)?.label ?? null;\n await api.people.putInBasket.mutate({ deliveryId, option, optionLabel, note: '' });\n return undefined;\n });\n}\n\n/** Takes an answer out of the basket; one the fleet refused marks its question done, not sent. */\nexport async function removeFromBasket(fleet: string, questionId: string): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.removeFromBasket.mutate({ questionId });\n return undefined;\n });\n}\n\n/** Send N answers: each entry stored as sending, then sent on its own by the gateway. */\nexport async function sendBasket(fleet: string): Promise<ActionOutcome<BasketSent>> {\n return attempt(fleet, (api) => api.people.sendBasket.mutate());\n}\n\n/** Is done with an item; a step done or cannot, with the person's note if they wrote one, its outcome sent at once (CC14, CC23). */\nexport async function doneDelivery({ fleet, deliveryId, step }: { fleet: string; deliveryId: string; step?: { outcome: 'done' | 'cannot'; note: string } }): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.done.mutate(step === undefined ? { deliveryId } : { deliveryId, ...step });\n return undefined;\n });\n}\n\n/**\n * Who the person can send a message to (aeolus-fleet #1547): the ships their\n * person ship may send to now, each in its state as Your fleet shows it, and\n * the name it sends as. Your fleet that cannot be read leaves the ships with\n * no state.\n */\nexport async function readSendTo(fleet: string): Promise<ActionOutcome<{ sentAs: string; ships: readonly SendableShip[] }>> {\n return attempt(fleet, async (api) => {\n const [sendTo, fleetRead] = await Promise.all([api.people.sendTo.query(), api.people.yourFleet.query().catch(() => undefined)]);\n return { sentAs: sendTo.sentAs, ships: sendableShipsOf(sendTo.ships, fleetRead) };\n });\n}\n\n/** Sends a ship a message as the person ship, under the form's key; it answers once the fleet stored it, with when the gateway heard so. */\nexport async function sendShipMessage({ fleet, to, payload, idempotencyKey }: { fleet: string; to: string; payload: string; idempotencyKey: string }): Promise<ActionOutcome<{ storedAt: string }>> {\n return attempt(fleet, async (api) => {\n await api.people.send.mutate({ to, payload, idempotencyKey });\n return { storedAt: new Date().toISOString() };\n });\n}\n\n/** Turns a place on or off for a job: it applies at once (Bridge, section 8). */\nexport async function turnRoute({ fleet, job, place, isOn }: { fleet: string; job: RoutedJob; place: RoutedPlace; isOn: boolean }): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.turnRoute.mutate({ job, place, isOn });\n return undefined;\n });\n}\n\n/** Turns web push on for the browser that subscribed (wake a person, W8). */\nexport async function turnOnWebPush(fleet: string, subscription: SubscriptionInput): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.turnOnWebPush.mutate({ endpoint: subscription.endpoint, keys: { p256dh: subscription.keys.p256dh, auth: subscription.keys.auth }, browser: subscription.browser });\n return undefined;\n });\n}\n\n/** Removes a browser the person turned web push on in. */\nexport async function turnOffWebPush(fleet: string, endpoint: string): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.turnOffWebPush.mutate({ endpoint });\n return undefined;\n });\n}\n\n/** Unlinks the person's Slack account (gateway scopes 9.3). */\nexport async function unlinkSlack(fleet: string): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.slack.unlink.mutate();\n return undefined;\n });\n}\n\n/** Decides a request; approving names the proxy ship, its owner and its scopes, messages:send and messages:receive always among them. */\nexport async function decideRequest({ fleet, requestId, input }: { fleet: string; requestId: string; input: DecisionInput }): Promise<ActionOutcome<undefined>> {\n if (input.kind === 'deny') {\n return attempt(fleet, async (api) => {\n await api.requests.decide.mutate({ requestId, decision: { kind: 'deny' } });\n return undefined;\n });\n }\n const ownerShipId = idSchema('ship').safeParse(input.ownerShipId.trim());\n if (!ownerShipId.success) {\n return { isOk: false, message: \"The owner's ship id is not a ship id (shp_...)\" };\n }\n const party = { name: input.name, ownerShipId: ownerShipId.data, scopes: [...new Set([...EVERY_APP_SHIP_SCOPES, ...input.scopes])] };\n const { server } = input;\n const credential = server === undefined ? undefined : serverCredentialOf(server);\n return attempt(fleet, async (api) => {\n await api.requests.decide.mutate({ requestId, decision: { kind: 'approve', party, ...(server === undefined || credential === undefined ? {} : { server: { credential, concurrencyLimit: server.concurrencyLimit } }) } });\n return undefined;\n });\n}\n","unable to read source [project]/node_modules/@aeolus-fleet/common/src/rules/page-size.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/alert.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/question.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/page.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/report.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/rules/payload.ts","/**\n * Stay aware as Bridge shows it (stay-aware.html, CC16): how many alerts\n * and notices are not seen yet, and an opened alert's ship,\n * its Health in the console and what Aeolus does when it clears (decision\n * 0071). Pure view logic, no React and no API client.\n */\nimport { ALERT_CONTENT_TYPE, alertMessageSchema, type AlertSignal } from '@aeolus-fleet/common';\n\n/** How many are not seen yet: \"1 unseen\". */\nexport function unseenSaidOf(count: number): string {\n return `${String(count)} unseen`;\n}\n\n/** What an opened alert is about: its ship, and the signal that parted. */\nexport interface AlertView {\n readonly ship: { readonly id: string; readonly name: string };\n readonly signal: AlertSignal;\n}\n\n/** The alert a delivery carries; none for a notice, or a payload that does not read as an alert. */\nexport function alertOf(opened: { contentType: string; payload: string }): AlertView | undefined {\n if (opened.contentType !== ALERT_CONTENT_TYPE) {\n return undefined;\n }\n try {\n const alert = alertMessageSchema.safeParse(JSON.parse(opened.payload));\n return alert.success ? { ship: alert.data.ship, signal: alert.data.signal } : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** A ship's Health: its page in the fleet's console, where its open alerts and its state now show (monitoring 4.8). */\nexport function healthHrefOf({ consoleUrl, shipId }: { consoleUrl: string; shipId: string }): string {\n return `${consoleUrl.replace(/\\/$/, '')}/ships/${shipId}`;\n}\n\n/** The info line under an opened alert: Aeolus only tells, the alert clears by itself, and nothing is sent when it does (0071). */\nexport function clearsSaidOf(alert: AlertView): string {\n const clears = alert.signal === 'report-unchanged' ? `The alert clears when ${alert.ship.name} reports again` : 'The alert clears by itself once what it tells of moves';\n return `Aeolus only tells you. ${clears}; nothing is sent on clear, so this stays here as it was.`;\n}\n","/**\n * Bridge's form to send a ship a message (aeolus-fleet #1547,\n * send-message.html): which ships it offers, when Send is on, the key a\n * send carries, why one failed, what the toast says once the fleet stored\n * it, and the ship an opened alert is about. Pure view logic, no React and\n * no API client.\n */\nimport { ALERT_CONTENT_TYPE } from '@aeolus-fleet/common';\nimport type { inferRouterOutputs } from '@trpc/server';\nimport { z } from 'zod';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport { SHIP_STATES, type ShipState, type YourFleet } from '../fleet/services/your-fleet';\n\n/** Who the person can send a message to, as the API answers it: the ships their person ship may send to now, and the name it sends as. */\nexport type SendTo = inferRouterOutputs<GatewayRouter>['people']['sendTo'];\n\n/** A ship the form offers: by name, with its state as Your fleet shows it, none where Your fleet does not show the ship. */\nexport interface SendableShip {\n readonly name: string;\n readonly state: ShipState | null;\n}\n\n/**\n * The ships the person ship may send to, each in its state as Your fleet\n * shows it, in Your fleet's order: alerts first, then waiting, working and\n * idle, ties by name; a ship Your fleet does not show, or every ship when it\n * could not be read, comes after, with no state.\n */\nexport function sendableShipsOf(ships: readonly string[], fleet: YourFleet | undefined): readonly SendableShip[] {\n const states = new Map((fleet?.groups ?? []).flatMap(({ tiles }) => tiles.map(({ name, state }) => [name, state] as const)));\n const rank = (state: ShipState | null) => (state === null ? SHIP_STATES.length : SHIP_STATES.indexOf(state));\n return ships\n .map((name) => ({ name, state: states.get(name) ?? null }))\n .toSorted((one, other) => rank(one.state) - rank(other.state) || one.name.localeCompare(other.name));\n}\n\n/** The ships whose name holds what the person typed, whatever its case; every ship while nothing is typed. */\nexport function shipsMatching(ships: readonly SendableShip[], typed: string): readonly SendableShip[] {\n const sought = typed.trim().toLowerCase();\n return sought === '' ? ships : ships.filter(({ name }) => name.toLowerCase().includes(sought));\n}\n\n/** Send is on once a ship is picked and something is written. */\nexport function isSendable({ to, message }: { to: string | null; message: string }): boolean {\n return to !== null && message.trim() !== '';\n}\n\n/** A send the form made: its key, and the ship and message it carried. */\nexport interface LastSend {\n readonly key: string;\n readonly to: string;\n readonly message: string;\n}\n\n/**\n * The key a send carries: the last send's again while the ship and the\n * message are the same, so a message sent again arrives once; a new one\n * otherwise, as a changed message is a new message.\n */\nexport function keyToSend({ last, to, message, newKey }: { last: LastSend | null; to: string; message: string; newKey: string }): string {\n return last !== null && last.to === to && last.message === message ? last.key : newKey;\n}\n\n/** Why a send failed: the fleet refused it, in its own words, or no answer came, so it may be stored. */\nexport type SendFailure = { readonly kind: 'refused'; readonly reason: string } | { readonly kind: 'noAnswer' };\n\n/** The API's codes for a send the fleet refused: its reason is the person's to read. */\nconst REFUSED_CODES = new Set(['BAD_REQUEST', 'FORBIDDEN']);\n\n/** A refusal when the fleet refused the send; no answer for anything else, as the message may be stored. */\nexport function sendFailureOf({ code, message }: { code?: string | undefined; message: string }): SendFailure {\n return code !== undefined && REFUSED_CODES.has(code) ? { kind: 'refused', reason: message } : { kind: 'noAnswer' };\n}\n\n/** Where a time shows to the minute in an ISO 8601 time: hours and minutes, in UTC. */\nconst MINUTE = { start: 11, end: 16 } as const;\n\n/** What the toast says once the fleet stored the message: to whom, when in UTC as every Bridge time, and as which person ship. */\nexport function sentNoticeOf({ to, sentAs, storedAt }: { to: string; sentAs: string; storedAt: string }): { title: string; description: string } {\n return {\n title: `Sent to ${to}`,\n description: `Stored by the fleet at ${new Date(storedAt).toISOString().slice(MINUTE.start, MINUTE.end)} UTC, sent as ${sentAs}. ${to} receives it when it next looks.`,\n };\n}\n\n/** What Bridge reads of an alert to send its ship a message: the ship, by name. */\nconst alertShipSchema = z.object({ ship: z.object({ name: z.string().min(1) }) });\n\n/** The ship an alert is about, by name; none for any other message, or an alert whose payload does not read. */\nexport function alertShipOf(opened: { contentType: string; payload: string }): string | undefined {\n const [essence = ''] = opened.contentType.split(';');\n if (essence.trim().toLowerCase() !== ALERT_CONTENT_TYPE) {\n return undefined;\n }\n try {\n return alertShipSchema.safeParse(JSON.parse(opened.payload)).data?.ship.name;\n } catch {\n return undefined;\n }\n}\n","/**\n * An item that reached a person, as Bridge shows it once opened, and the\n * answer its form sends: pure view logic, no React and no API client.\n */\nimport { ALERT_CONTENT_TYPE, ANSWER_CONTENT_TYPE, answerSchema, isQuestionContentType, questionSchema, withdrawalOf, type Question } from '@aeolus-fleet/common';\nimport { z } from 'zod';\nimport type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport type { AlertView } from './stay-aware';\n\n/** The channels that wake a person when something waits for their person ship, as the API shows them (wake a person, W8). */\nexport type WakeChannels = inferRouterOutputs<GatewayRouter>['people']['wakeChannels'];\n\n/**\n * A delivery in focus: whole, as the person opened it or opened it again,\n * with its question when it is one.\n */\nexport interface FocusedDelivery {\n readonly deliveryId: string;\n readonly from: string;\n readonly title: string;\n readonly sentAt: string;\n readonly payload: string;\n /** What it shows of its payload: an alert's or a notice's body, any other payload as it came. */\n readonly body: string;\n readonly question: Question | undefined;\n /** The step it asks (CC14), when it is one. */\n readonly step: StepView | undefined;\n /** The alert it carries (decision 0071): the ship it is about, when it is one. */\n readonly alert: AlertView | undefined;\n /** The meeting it was contributed to or tells of, when it belongs to one. */\n readonly meetingId: string | undefined;\n /** Whether its asker withdrew or replaced the question or step it asks, with the replacement, a new item. */\n readonly stale: Stale | null;\n /** The ship an alert is about, by name, for the person to send it a message (aeolus-fleet #1547). */\n readonly alertShip?: string | undefined;\n}\n\n/** A question or step its asker withdrew or replaced (decision 0038, CC14), as the API says it: when, and the replacement with its title. */\nexport interface Stale {\n readonly kind: 'withdrawn' | 'replaced';\n readonly replacementId: string | null;\n readonly at: string;\n readonly replacementTitle: string | null;\n}\n\n/** A time of day in UTC to the minute, as a list read on the server says it. */\nfunction utcClockOf(at: string): string {\n return `${new Date(at).toISOString().slice(11, 16)} UTC`;\n}\n\n/**\n * Who withdrew or replaced it and when, and a replacement's title, as the\n * mockups word it (basket.html); the time in UTC unless said otherwise, as\n * an opened item says it in the person's own time.\n */\nexport function staleSaidOf(stale: Stale, { from, clockOf = utcClockOf }: { from: string; clockOf?: (at: string) => string }): string {\n const said = `${stale.kind === 'withdrawn' ? 'Withdrawn' : 'Replaced'} by ${from} at ${clockOf(stale.at)}`;\n return stale.replacementTitle === null ? said : `${said} with “${stale.replacementTitle}”`;\n}\n\n/** The question a delivery asks (decision 0038): a question's own, or the new question a replacement asks. */\nexport function questionOf(opened: { contentType: string; payload: string }): Question | undefined {\n if (!isQuestionContentType(opened.contentType)) {\n return withdrawalOf(opened)?.replacement ?? undefined;\n }\n try {\n const question = questionSchema.safeParse(JSON.parse(opened.payload));\n return question.success ? question.data : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** A step as Bridge shows it (CC14): its title, why, and its link, when it has one. */\nexport interface StepView {\n readonly title: string;\n readonly why: string;\n readonly link: StepLink | undefined;\n}\n\n/** The link where a step is done, shown with where it leads (host and path, as do.html draws it), and whether that is outside Aeolus: any host but the one Bridge is served on (Bridge, section 9). */\nexport interface StepLink {\n readonly href: string;\n readonly address: string;\n readonly isOutside: boolean;\n}\n\nfunction stepLinkOf(href: string, bridgeHost: string): StepLink {\n const url = new URL(href);\n return { href, address: `${url.host}${url.pathname.replace(/\\/$/, '')}`, isOutside: url.host !== bridgeHost };\n}\n\n/** The step and step replacement content types (CC14), as common names them from its release after 0.35.0; they move to common's constants then. */\nconst STEP_CONTENT_TYPE = 'application/vnd.aeolus.step+json';\nconst STEP_REPLACEMENT_CONTENT_TYPE = 'application/vnd.aeolus.step-replacement+json';\n\n/** What Bridge reads of a step, as common's stepSchema words it from its release after 0.35.0 (Bridge B2); it moves to common's then. */\nconst stepSchema = z.object({ title: z.string().min(1), why: z.string(), link: z.url({ protocol: /^https?$/ }).optional() });\n\n/** The schema a step is read with, by content type: a step's own, or the new step a step replacement asks. */\nconst STEP_SCHEMAS = new Map<string, z.ZodType<z.infer<typeof stepSchema>>>([\n [STEP_CONTENT_TYPE, stepSchema],\n [STEP_REPLACEMENT_CONTENT_TYPE, z.object({ step: stepSchema }).transform(({ step }) => step)],\n]);\n\n/** The step a delivery asks: a step's own, or the new step a step replacement asks; none for any other message, or one whose payload does not read. Its link is outside Aeolus unless it leads to the host Bridge is served on. */\nexport function stepOf(opened: { contentType: string; payload: string }, bridgeHost: string): StepView | undefined {\n const [essence = ''] = opened.contentType.split(';');\n const schema = STEP_SCHEMAS.get(essence.trim().toLowerCase());\n if (schema === undefined) {\n return undefined;\n }\n try {\n const step = schema.safeParse(JSON.parse(opened.payload));\n if (!step.success) {\n return undefined;\n }\n const { title, why, link } = step.data;\n return { title, why, link: link === undefined ? undefined : stepLinkOf(link, bridgeHost) };\n } catch {\n return undefined;\n }\n}\n\n/** The notice content type (CC15), as common names it from its release after 0.35.0; it moves to common's constant then. */\nconst NOTICE_CONTENT_TYPE = 'application/vnd.aeolus.notice+json';\n\nconst BODIED = new Set([ALERT_CONTENT_TYPE, NOTICE_CONTENT_TYPE]);\n\nconst bodiedSchema = z.object({ body: z.string() });\n\n/** An alert's or a notice's body; any other payload, or one that does not read, as it came. */\nexport function bodyOf(opened: { contentType: string; payload: string }): string {\n const [essence = ''] = opened.contentType.split(';');\n if (!BODIED.has(essence.trim().toLowerCase())) {\n return opened.payload;\n }\n try {\n return bodiedSchema.safeParse(JSON.parse(opened.payload)).data?.body ?? opened.payload;\n } catch {\n return opened.payload;\n }\n}\n\n/** What the person sends: an option they tapped and a note, or a note alone. */\nexport interface AnswerInput {\n readonly questionId: string | undefined;\n readonly option: number | undefined;\n readonly note: string;\n}\n\n/** The answer a form sends: an option and a note, or a note alone, for a question; a note as plain text otherwise. */\nexport function answerOf(input: AnswerInput): { isOk: true; value: { contentType: string; payload: string } } | { isOk: false; message: string } {\n const note = input.note.trim();\n if (input.questionId === undefined) {\n return note === '' ? { isOk: false, message: 'Write your answer first' } : { isOk: true, value: { contentType: 'text/plain', payload: note } };\n }\n const answer = answerSchema.safeParse({ questionId: input.questionId, ...(input.option === undefined ? {} : { option: input.option }), ...(note === '' ? {} : { note }) });\n return answer.success ? { isOk: true, value: { contentType: ANSWER_CONTENT_TYPE, payload: JSON.stringify(answer.data) } } : { isOk: false, message: 'Tap an option, or write a note' };\n}\n"],"names":[],"mappings":"6CEoB8B,eFT9B,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAGA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,2HMbiB,WAAW,CAMtB,CANwB,CAAC,IDEI,GCInB,EAAa,CAAe,EAC1C,OAAO,EAAK,EAAD,IAAO,CAAC,GAAS,IAAF,CAAC,KAAW,CAAC,qDDTlC,EHAE,EGAI,EAAoB,EAAA,CAAC,CAAC,CHAf,AAAgB,EAAd,CGAiB,CADV,AACW,CADV,CJCJ,ACAgB,GDDR,KIAK,CAAE,EACY,AHAA,CGAC,AHAA,CGAC,KADL,AHAA,CAAC,AGAC,MAAM,CAAU,CAAC,CAO/D,EAAe,CAAA,SAAH,qBAAG,EAAiC,MAAM,CAAC,AAFvB,GAAG,CAAC,CAE0C,WAAA,CAAa,CAAC,AAc5F,IAd6E,AAclE,CAdmE,AFUlE,WEYX,IAAM,EAAsB,CAAC,CAAC,MAAM,CAAC,EAAA,CAAC,CAAC,IAAd,EAAoB,EAAE,CAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,AAiBrD,EFLQ,EAAA,CEKY,CAAC,EFLb,IEKmB,CAAC,CAAE,IAAI,CFLC,EAAA,CDfwC,AGoBtC,CAAC,MAAM,EAAE,CAAE,CAAC,CAA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A,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAYA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAUA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAKA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAaA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA","ignoreList":[1,2,3,4,5,6]}
1
+ {"version":3,"sources":["../../../../../web/features/bridge/hooks/bridge-actions.ts","../../../../../node_modules/%40aeolus-fleet/common/src/rules/page-size.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/content-type.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/alert.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/question.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/page.ts","../../../../../node_modules/%40aeolus-fleet/common/src/schemas/report.ts","../../../../../node_modules/%40aeolus-fleet/common/src/rules/payload.ts","../../../../../web/features/bridge/services/stay-aware.ts","../../../../../web/features/bridge/services/send-message.ts","../../../../../web/features/bridge/services/deliveries.ts"],"sourcesContent":["'use server';\n/**\n * Bridge's actions, each one call of the gateway's API as the signed-in\n * account, on the server (0033): opening, answering and being done with an\n * item, putting an answer in the basket, removing it and sending the basket,\n * sending a ship a message,\n * reading the next page of the record, and in Bridge's settings where\n * each job shows, web push, the Slack link and deciding a request. The API checks everything; a\n * refusal comes back in its own words for the page to say by the control. A\n * sign-in that ended sends the person to sign in again.\n */\nimport { idSchema } from '@aeolus-fleet/common';\nimport { revalidatePath } from 'next/cache';\nimport { headers } from 'next/headers';\nimport { redirect } from 'next/navigation';\n\nimport type { GatewayApi } from '../../../lib/gateway-api/gateway-api';\nimport { FLEET_PARAMETER } from '../../../lib/gateway-api/page-account';\nimport { refusalCodeOf, refusalMessageOf, requestApi } from '../../../lib/gateway-api/page-api';\nimport { serverCredentialOf } from '../../forms/server-credential';\nimport { answerOf, bodyOf, questionOf, stepOf, type AnswerInput, type FocusedDelivery } from '../services/deliveries';\nimport { alertOf } from '../services/stay-aware';\nimport type { SubscriptionInput } from '../services/web-push';\nimport { EVERY_APP_SHIP_SCOPES, type DecisionInput } from '../services/requests';\nimport type { BasketSent } from '../services/basket';\nimport { alertShipOf, sendableShipsOf, type SendableShip } from '../services/send-message';\nimport type { RecordPage } from '../services/items';\nimport type { RoutedJob, RoutedPlace } from '../services/routing';\nimport { BRIDGE_PATH } from '../paths';\n\n/** What an action says when the gateway gave no answer of its own. */\nconst NO_ANSWER = 'The gateway did not answer: try again in a moment';\n\n/** What an action came to: its value, or why not, with the API's code when the API refused. */\nexport type ActionOutcome<T> = { readonly isOk: true; readonly value: T } | { readonly isOk: false; readonly message: string; readonly code?: string };\n\nasync function attempt<T>(fleet: string, run: (api: GatewayApi) => Promise<T>): Promise<ActionOutcome<T>> {\n let outcome: ActionOutcome<T>;\n try {\n outcome = { isOk: true, value: await run(await requestApi(fleet)) };\n } catch (error) {\n const code = refusalCodeOf(error);\n if (code === 'UNAUTHORIZED') {\n return redirect(`/sign-in/start?${new URLSearchParams({ return_to: `${BRIDGE_PATH}?${new URLSearchParams({ [FLEET_PARAMETER]: fleet }).toString()}` }).toString()}`);\n }\n return code === undefined ? { isOk: false, message: NO_ANSWER } : { isOk: false, message: refusalMessageOf(error), code };\n }\n revalidatePath(BRIDGE_PATH, 'layout');\n return outcome;\n}\n\n/** The next page of the person ship's record, after the cursor the last one answered (Done). */\nexport async function readMoreRecord(fleet: string, cursor: string): Promise<ActionOutcome<RecordPage>> {\n return attempt(fleet, (api) => api.people.record.query({ cursor }));\n}\n\n/** Opens an item: the gateway acknowledges it for the person, and it is shown whole, once; an alert or a notice seen is done (CC16). A step's link leads outside Aeolus unless it leads to the host this page was asked on. */\nexport async function openDelivery(fleet: string, deliveryId: string): Promise<ActionOutcome<FocusedDelivery>> {\n const bridgeHost = (await headers()).get('host') ?? '';\n return attempt(fleet, async (api) => {\n const opened = await api.people.open.mutate({ deliveryId });\n const { contentType, payload, meetingId, ...entry } = opened;\n return { ...entry, payload, body: bodyOf({ contentType, payload }), question: questionOf({ contentType, payload }), step: stepOf({ contentType, payload }, bridgeHost), alert: alertOf({ contentType, payload }), meetingId: meetingId ?? undefined, alertShip: alertShipOf({ contentType, payload }) };\n });\n}\n\nexport async function answerDelivery({ fleet, deliveryId, input }: { fleet: string; deliveryId: string; input: AnswerInput }): Promise<ActionOutcome<undefined>> {\n const answer = answerOf(input);\n if (!answer.isOk) {\n return answer;\n }\n return attempt(fleet, async (api) => {\n await api.people.answer.mutate({ deliveryId, ...answer.value });\n return undefined;\n });\n}\n\n/** Puts the person's answer to a question in the basket, or changes it there, with the option's label as the question shows it: nothing is sent (Bridge, section 9). */\nexport async function putInBasket({ fleet, deliveryId, option, optionLabel, note }: { fleet: string; deliveryId: string; option: number | null; optionLabel: string | null; note: string }): Promise<ActionOutcome<{ option: number | null; note: string | null }>> {\n return attempt(fleet, async (api) => {\n const { option: put, note: written } = await api.people.putInBasket.mutate({ deliveryId, option, optionLabel, note });\n return { option: put, note: written };\n });\n}\n\n/** From a question's row: opens it, as the person's own press, and puts its asker's pick in the basket with no note, named by its label as the question shows it (aeolus-fleet#1535). */\nexport async function putPickInBasket({ fleet, deliveryId, option }: { fleet: string; deliveryId: string; option: number }): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n const opened = await api.people.open.mutate({ deliveryId });\n const optionLabel = questionOf(opened)?.options.find(({ key }) => key === option)?.label ?? null;\n await api.people.putInBasket.mutate({ deliveryId, option, optionLabel, note: '' });\n return undefined;\n });\n}\n\n/** Takes an answer out of the basket; one the fleet refused marks its question done, not sent. */\nexport async function removeFromBasket(fleet: string, questionId: string): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.removeFromBasket.mutate({ questionId });\n return undefined;\n });\n}\n\n/** Send N answers: each entry stored as sending, then sent on its own by the gateway. */\nexport async function sendBasket(fleet: string): Promise<ActionOutcome<BasketSent>> {\n return attempt(fleet, (api) => api.people.sendBasket.mutate());\n}\n\n/** Is done with an item; a step done or cannot, with the person's note if they wrote one, its outcome sent at once (CC14, CC23). */\nexport async function doneDelivery({ fleet, deliveryId, step }: { fleet: string; deliveryId: string; step?: { outcome: 'done' | 'cannot'; note: string } }): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.done.mutate(step === undefined ? { deliveryId } : { deliveryId, ...step });\n return undefined;\n });\n}\n\n/**\n * Who the person can send a message to (aeolus-fleet #1547): the ships their\n * person ship may send to now, each in its state as Your fleet shows it, and\n * the name it sends as. Your fleet that cannot be read leaves the ships with\n * no state.\n */\nexport async function readSendTo(fleet: string): Promise<ActionOutcome<{ sentAs: string; ships: readonly SendableShip[] }>> {\n return attempt(fleet, async (api) => {\n const [sendTo, fleetRead] = await Promise.all([api.people.sendTo.query(), api.people.yourFleet.query().catch(() => undefined)]);\n return { sentAs: sendTo.sentAs, ships: sendableShipsOf(sendTo.ships, fleetRead) };\n });\n}\n\n/** Sends a ship a message as the person ship, under the form's key; it answers once the fleet stored it, with when the gateway heard so. */\nexport async function sendShipMessage({ fleet, to, payload, idempotencyKey }: { fleet: string; to: string; payload: string; idempotencyKey: string }): Promise<ActionOutcome<{ storedAt: string }>> {\n return attempt(fleet, async (api) => {\n await api.people.send.mutate({ to, payload, idempotencyKey });\n return { storedAt: new Date().toISOString() };\n });\n}\n\n/** Turns a place on or off for a job: it applies at once (Bridge, section 8). */\nexport async function turnRoute({ fleet, job, place, isOn }: { fleet: string; job: RoutedJob; place: RoutedPlace; isOn: boolean }): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.turnRoute.mutate({ job, place, isOn });\n return undefined;\n });\n}\n\n/** Turns web push on for the browser that subscribed (wake a person, W8). */\nexport async function turnOnWebPush(fleet: string, subscription: SubscriptionInput): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.turnOnWebPush.mutate({ endpoint: subscription.endpoint, keys: { p256dh: subscription.keys.p256dh, auth: subscription.keys.auth }, browser: subscription.browser });\n return undefined;\n });\n}\n\n/** Removes a browser the person turned web push on in. */\nexport async function turnOffWebPush(fleet: string, endpoint: string): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.people.turnOffWebPush.mutate({ endpoint });\n return undefined;\n });\n}\n\n/** Unlinks the person's Slack account (gateway scopes 9.3). */\nexport async function unlinkSlack(fleet: string): Promise<ActionOutcome<undefined>> {\n return attempt(fleet, async (api) => {\n await api.slack.unlink.mutate();\n return undefined;\n });\n}\n\n/** Decides a request; approving names the proxy ship, its owner and its scopes, messages:send and messages:receive always among them. */\nexport async function decideRequest({ fleet, requestId, input }: { fleet: string; requestId: string; input: DecisionInput }): Promise<ActionOutcome<undefined>> {\n if (input.kind === 'deny') {\n return attempt(fleet, async (api) => {\n await api.requests.decide.mutate({ requestId, decision: { kind: 'deny' } });\n return undefined;\n });\n }\n const ownerShipId = idSchema('ship').safeParse(input.ownerShipId.trim());\n if (!ownerShipId.success) {\n return { isOk: false, message: \"The owner's ship id is not a ship id (shp_...)\" };\n }\n const party = { name: input.name, ownerShipId: ownerShipId.data, scopes: [...new Set([...EVERY_APP_SHIP_SCOPES, ...input.scopes])] };\n const { server } = input;\n const credential = server === undefined ? undefined : serverCredentialOf(server);\n return attempt(fleet, async (api) => {\n await api.requests.decide.mutate({ requestId, decision: { kind: 'approve', party, ...(server === undefined || credential === undefined ? {} : { server: { credential, concurrencyLimit: server.concurrencyLimit } }) } });\n return undefined;\n });\n}\n","unable to read source [project]/node_modules/@aeolus-fleet/common/src/rules/page-size.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/content-type.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/alert.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/question.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/page.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/schemas/report.ts","unable to read source [project]/node_modules/@aeolus-fleet/common/src/rules/payload.ts","/**\n * Stay aware as Bridge shows it (stay-aware.html, CC16): how many alerts\n * and notices are not seen yet, and an opened alert's ship,\n * its Health in the console and what Aeolus does when it clears (decision\n * 0071). Pure view logic, no React and no API client.\n */\nimport { ALERT_CONTENT_TYPE, alertMessageSchema, type AlertSignal } from '@aeolus-fleet/common';\n\n/** How many are not seen yet: \"1 unseen\". */\nexport function unseenSaidOf(count: number): string {\n return `${String(count)} unseen`;\n}\n\n/** What an opened alert is about: its ship, and the signal that parted. */\nexport interface AlertView {\n readonly ship: { readonly id: string; readonly name: string };\n readonly signal: AlertSignal;\n}\n\n/** The alert a delivery carries; none for a notice, or a payload that does not read as an alert. */\nexport function alertOf(opened: { contentType: string; payload: string }): AlertView | undefined {\n if (opened.contentType !== ALERT_CONTENT_TYPE) {\n return undefined;\n }\n try {\n const alert = alertMessageSchema.safeParse(JSON.parse(opened.payload));\n return alert.success ? { ship: alert.data.ship, signal: alert.data.signal } : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** A ship's Health: its page in the fleet's console, where its open alerts and its state now show (monitoring 4.8). */\nexport function healthHrefOf({ consoleUrl, shipId }: { consoleUrl: string; shipId: string }): string {\n return `${consoleUrl.replace(/\\/$/, '')}/ships/${shipId}`;\n}\n\n/** The info line under an opened alert: Aeolus only tells, the alert clears by itself, and nothing is sent when it does (0071). */\nexport function clearsSaidOf(alert: AlertView): string {\n const clears = alert.signal === 'report-unchanged' ? `The alert clears when ${alert.ship.name} reports again` : 'The alert clears by itself once what it tells of moves';\n return `Aeolus only tells you. ${clears}; nothing is sent on clear, so this stays here as it was.`;\n}\n","/**\n * Bridge's form to send a ship a message (aeolus-fleet #1547,\n * send-message.html): which ships it offers, when Send is on, the key a\n * send carries, why one failed, what the toast says once the fleet stored\n * it, and the ship an opened alert is about. Pure view logic, no React and\n * no API client.\n */\nimport { ALERT_CONTENT_TYPE } from '@aeolus-fleet/common';\nimport type { inferRouterOutputs } from '@trpc/server';\nimport { z } from 'zod';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport { SHIP_STATES, type ShipState, type YourFleet } from '../fleet/services/your-fleet';\n\n/** Who the person can send a message to, as the API answers it: the ships their person ship may send to now, and the name it sends as. */\nexport type SendTo = inferRouterOutputs<GatewayRouter>['people']['sendTo'];\n\n/** A ship the form offers: by name, with its state as Your fleet shows it, none where Your fleet does not show the ship. */\nexport interface SendableShip {\n readonly name: string;\n readonly state: ShipState | null;\n}\n\n/**\n * The ships the person ship may send to, each in its state as Your fleet\n * shows it, in Your fleet's order: alerts first, then waiting, working and\n * idle, ties by name; a ship Your fleet does not show, or every ship when it\n * could not be read, comes after, with no state.\n */\nexport function sendableShipsOf(ships: readonly string[], fleet: YourFleet | undefined): readonly SendableShip[] {\n const states = new Map((fleet?.groups ?? []).flatMap(({ tiles }) => tiles.map(({ name, state }) => [name, state] as const)));\n const rank = (state: ShipState | null) => (state === null ? SHIP_STATES.length : SHIP_STATES.indexOf(state));\n return ships\n .map((name) => ({ name, state: states.get(name) ?? null }))\n .toSorted((one, other) => rank(one.state) - rank(other.state) || one.name.localeCompare(other.name));\n}\n\n/** The ships whose name holds what the person typed, whatever its case; every ship while nothing is typed. */\nexport function shipsMatching(ships: readonly SendableShip[], typed: string): readonly SendableShip[] {\n const sought = typed.trim().toLowerCase();\n return sought === '' ? ships : ships.filter(({ name }) => name.toLowerCase().includes(sought));\n}\n\n/** Send is on once a ship is picked and something is written. */\nexport function isSendable({ to, message }: { to: string | null; message: string }): boolean {\n return to !== null && message.trim() !== '';\n}\n\n/** A send the form made: its key, and the ship and message it carried. */\nexport interface LastSend {\n readonly key: string;\n readonly to: string;\n readonly message: string;\n}\n\n/**\n * The key a send carries: the last send's again while the ship and the\n * message are the same, so a message sent again arrives once; a new one\n * otherwise, as a changed message is a new message.\n */\nexport function keyToSend({ last, to, message, newKey }: { last: LastSend | null; to: string; message: string; newKey: string }): string {\n return last !== null && last.to === to && last.message === message ? last.key : newKey;\n}\n\n/** Why a send failed: the fleet refused it, in its own words, or no answer came, so it may be stored. */\nexport type SendFailure = { readonly kind: 'refused'; readonly reason: string } | { readonly kind: 'noAnswer' };\n\n/** The API's codes for a send the fleet refused: its reason is the person's to read. */\nconst REFUSED_CODES = new Set(['BAD_REQUEST', 'FORBIDDEN']);\n\n/** A refusal when the fleet refused the send; no answer for anything else, as the message may be stored. */\nexport function sendFailureOf({ code, message }: { code?: string | undefined; message: string }): SendFailure {\n return code !== undefined && REFUSED_CODES.has(code) ? { kind: 'refused', reason: message } : { kind: 'noAnswer' };\n}\n\n/** Where a time shows to the minute in an ISO 8601 time: hours and minutes, in UTC. */\nconst MINUTE = { start: 11, end: 16 } as const;\n\n/** What the toast says once the fleet stored the message: to whom, when in UTC as every Bridge time, and as which person ship. */\nexport function sentNoticeOf({ to, sentAs, storedAt }: { to: string; sentAs: string; storedAt: string }): { title: string; description: string } {\n return {\n title: `Sent to ${to}`,\n description: `Stored by the fleet at ${new Date(storedAt).toISOString().slice(MINUTE.start, MINUTE.end)} UTC, sent as ${sentAs}. ${to} receives it when it next looks.`,\n };\n}\n\n/** What Bridge reads of an alert to send its ship a message: the ship, by name. */\nconst alertShipSchema = z.object({ ship: z.object({ name: z.string().min(1) }) });\n\n/** The ship an alert is about, by name; none for any other message, or an alert whose payload does not read. */\nexport function alertShipOf(opened: { contentType: string; payload: string }): string | undefined {\n const [essence = ''] = opened.contentType.split(';');\n if (essence.trim().toLowerCase() !== ALERT_CONTENT_TYPE) {\n return undefined;\n }\n try {\n return alertShipSchema.safeParse(JSON.parse(opened.payload)).data?.ship.name;\n } catch {\n return undefined;\n }\n}\n","/**\n * An item that reached a person, as Bridge shows it once opened, and the\n * answer its form sends: pure view logic, no React and no API client.\n */\nimport { ALERT_CONTENT_TYPE, ANSWER_CONTENT_TYPE, answerSchema, isQuestionContentType, questionSchema, withdrawalOf, type Question } from '@aeolus-fleet/common';\nimport { z } from 'zod';\nimport type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport type { AlertView } from './stay-aware';\n\n/** The channels that wake a person when something waits for their person ship, as the API shows them (wake a person, W8). */\nexport type WakeChannels = inferRouterOutputs<GatewayRouter>['people']['wakeChannels'];\n\n/**\n * A delivery in focus: whole, as the person opened it or opened it again,\n * with its question when it is one.\n */\nexport interface FocusedDelivery {\n readonly deliveryId: string;\n readonly from: string;\n readonly title: string;\n readonly sentAt: string;\n readonly payload: string;\n /** What it shows of its payload: an alert's or a notice's body, any other payload as it came. */\n readonly body: string;\n readonly question: Question | undefined;\n /** The step it asks (CC14), when it is one. */\n readonly step: StepView | undefined;\n /** The alert it carries (decision 0071): the ship it is about, when it is one. */\n readonly alert: AlertView | undefined;\n /** The meeting it was contributed to or tells of, when it belongs to one. */\n readonly meetingId: string | undefined;\n /** Whether its asker withdrew or replaced the question or step it asks, with the replacement, a new item. */\n readonly stale: Stale | null;\n /** The ship an alert is about, by name, for the person to send it a message (aeolus-fleet #1547). */\n readonly alertShip?: string | undefined;\n}\n\n/** A question or step its asker withdrew or replaced (decision 0038, CC14), as the API says it: when, and the replacement with its title. */\nexport interface Stale {\n readonly kind: 'withdrawn' | 'replaced';\n readonly replacementId: string | null;\n readonly at: string;\n readonly replacementTitle: string | null;\n}\n\n/** A time of day in UTC to the minute, as a list read on the server says it. */\nfunction utcClockOf(at: string): string {\n return `${new Date(at).toISOString().slice(11, 16)} UTC`;\n}\n\n/**\n * Who withdrew or replaced it and when, and a replacement's title, as the\n * mockups word it (basket.html); the time in UTC unless said otherwise, as\n * an opened item says it in the person's own time.\n */\nexport function staleSaidOf(stale: Stale, { from, clockOf = utcClockOf }: { from: string; clockOf?: (at: string) => string }): string {\n const said = `${stale.kind === 'withdrawn' ? 'Withdrawn' : 'Replaced'} by ${from} at ${clockOf(stale.at)}`;\n return stale.replacementTitle === null ? said : `${said} with “${stale.replacementTitle}”`;\n}\n\n/** The question a delivery asks (decision 0038): a question's own, or the new question a replacement asks. */\nexport function questionOf(opened: { contentType: string; payload: string }): Question | undefined {\n if (!isQuestionContentType(opened.contentType)) {\n return withdrawalOf(opened)?.replacement ?? undefined;\n }\n try {\n const question = questionSchema.safeParse(JSON.parse(opened.payload));\n return question.success ? question.data : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** A step as Bridge shows it (CC14): its title, why, and its link, when it has one. */\nexport interface StepView {\n readonly title: string;\n readonly why: string;\n readonly link: StepLink | undefined;\n}\n\n/** The link where a step is done, shown with where it leads (host and path, as do.html draws it), and whether that is outside Aeolus: any host but the one Bridge is served on (Bridge, section 9). */\nexport interface StepLink {\n readonly href: string;\n readonly address: string;\n readonly isOutside: boolean;\n}\n\nfunction stepLinkOf(href: string, bridgeHost: string): StepLink {\n const url = new URL(href);\n return { href, address: `${url.host}${url.pathname.replace(/\\/$/, '')}`, isOutside: url.host !== bridgeHost };\n}\n\n/** The step and step replacement content types (CC14), as common names them from its release after 0.35.0; they move to common's constants then. */\nconst STEP_CONTENT_TYPE = 'application/vnd.aeolus.step+json';\nconst STEP_REPLACEMENT_CONTENT_TYPE = 'application/vnd.aeolus.step-replacement+json';\n\n/** What Bridge reads of a step, as common's stepSchema words it from its release after 0.35.0 (Bridge B2); it moves to common's then. */\nconst stepSchema = z.object({ title: z.string().min(1), why: z.string(), link: z.url({ protocol: /^https?$/ }).optional() });\n\n/** The schema a step is read with, by content type: a step's own, or the new step a step replacement asks. */\nconst STEP_SCHEMAS = new Map<string, z.ZodType<z.infer<typeof stepSchema>>>([\n [STEP_CONTENT_TYPE, stepSchema],\n [STEP_REPLACEMENT_CONTENT_TYPE, z.object({ step: stepSchema }).transform(({ step }) => step)],\n]);\n\n/** The step a delivery asks: a step's own, or the new step a step replacement asks; none for any other message, or one whose payload does not read. Its link is outside Aeolus unless it leads to the host Bridge is served on. */\nexport function stepOf(opened: { contentType: string; payload: string }, bridgeHost: string): StepView | undefined {\n const [essence = ''] = opened.contentType.split(';');\n const schema = STEP_SCHEMAS.get(essence.trim().toLowerCase());\n if (schema === undefined) {\n return undefined;\n }\n try {\n const step = schema.safeParse(JSON.parse(opened.payload));\n if (!step.success) {\n return undefined;\n }\n const { title, why, link } = step.data;\n return { title, why, link: link === undefined ? undefined : stepLinkOf(link, bridgeHost) };\n } catch {\n return undefined;\n }\n}\n\n/** The notice content type (CC15), as common names it from its release after 0.35.0; it moves to common's constant then. */\nconst NOTICE_CONTENT_TYPE = 'application/vnd.aeolus.notice+json';\n\nconst BODIED = new Set([ALERT_CONTENT_TYPE, NOTICE_CONTENT_TYPE]);\n\nconst bodiedSchema = z.object({ body: z.string() });\n\n/** An alert's or a notice's body; any other payload, or one that does not read, as it came. */\nexport function bodyOf(opened: { contentType: string; payload: string }): string {\n const [essence = ''] = opened.contentType.split(';');\n if (!BODIED.has(essence.trim().toLowerCase())) {\n return opened.payload;\n }\n try {\n return bodiedSchema.safeParse(JSON.parse(opened.payload)).data?.body ?? opened.payload;\n } catch {\n return opened.payload;\n }\n}\n\n/** What the person sends: an option they tapped and a note, or a note alone. */\nexport interface AnswerInput {\n readonly questionId: string | undefined;\n readonly option: number | undefined;\n readonly note: string;\n}\n\n/** The answer a form sends: an option and a note, or a note alone, for a question; a note as plain text otherwise. */\nexport function answerOf(input: AnswerInput): { isOk: true; value: { contentType: string; payload: string } } | { isOk: false; message: string } {\n const note = input.note.trim();\n if (input.questionId === undefined) {\n return note === '' ? { isOk: false, message: 'Write your answer first' } : { isOk: true, value: { contentType: 'text/plain', payload: note } };\n }\n const answer = answerSchema.safeParse({ questionId: input.questionId, ...(input.option === undefined ? {} : { option: input.option }), ...(note === '' ? {} : { note }) });\n return answer.success ? { isOk: true, value: { contentType: ANSWER_CONTENT_TYPE, payload: JSON.stringify(answer.data) } } : { isOk: false, message: 'Tap an option, or write a note' };\n}\n"],"names":[],"mappings":"6CGoB8B,eHT9B,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAGA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,iHObA,IAAM,EAAA,IAAW,WAAW,EAAE,CAAC,IDEI,GCInB,EAAa,CAAA,EAC3B,OAAO,EAAK,EAAD,IAAO,CAAC,GAAS,IAAF,CAAC,KAAW,CAAC,+DDTN,CHAC,GGAG,CAAC,AADX,CAAC,CHCY,GFDR,ICDE,EICK,EHCY,AGAA,CAAC,AHAA,CGAC,MADH,MAAM,CAAU,CAAC,CAO/D,EAAe,CAAA,SAAH,qBAAG,EAAiC,MAAM,CAFtB,AAEuB,GAFpB,CAAC,CAE0C,WAAA,CAAa,CAAC,IAAf,AAclE,CAdmE,WAsB7E,IAAM,EAAsB,CAAC,CAAC,EFJE,IEII,CAAC,EAAA,CAAC,CAAC,MAAM,EAAE,CAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,AAiBrD,EAAmB,EAAA,CAAC,CAAC,MAAM,CAAC,CAAE,EAAd,EAAkB,CAAE,EAAA,CHpBuC,AGoBtC,CAAC,MAAM,EAAE,CAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,AAKrE,E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CAAA,MAYA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAUA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAKA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAaA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA,MAQA,CAAA,EAAA,EAAA,uBAAA,EAAA,GAAA,6CAAA","ignoreList":[1,2,3,4,5,6,7]}
@@ -1,3 +1,3 @@
1
- module.exports=[80198,a=>{"use strict";var b=a.i(87924),c=a.i(64831);let d={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};d.node;let e=(0,c.f)(d);var f=a.i(70840),g=a.i(52562),h=a.i(93817),i=a.i(97024),j=a.i(2550);let k={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};k.node;let l=(0,c.f)(k);var m=a.i(58983);let n={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"}]]};n.node;let o=(0,c.f)(n);var p=a.i(59542),q=a.i(74746),r=a.i(55596),s=a.i(74215),t=a.i(72131),u=a.i(69762),v=a.i(5050);let w=(0,v.createServerReference)("400320361887ac212b3589baccdc71146b3f431261",v.callServer,void 0,v.findSourceMapURL,"sendBasket");function x(a){return`${new Date(a).toISOString().slice(11,16)} UTC`}let y={bridge:"in Bridge",chat:"in a chat",slack:"in Slack",gateway:"by the gateway"};function z(a){return{desktop:a,phone:a}}function A(a){return 1===a?"1 answer":`${String(a)} answers`}function B(a){return a.length<=1?a.join(""):`${a.slice(0,-1).join(", ")} and ${a.at(-1)??""}`}function C(a){return[...new Set(a.map(({from:a})=>a))]}var D=a.i(32043),E=a.i(10039),F=a.i(91777);let G={sent:i.f,sending:m.f,next:l,unanswered:m.f,refused:h.f,withdrawn:f.f,replaced:p.f,elsewhere:g.f},H={ok:"text-tone-ok-fg",waiting:"text-tone-waiting-fg",attention:"text-tone-attention-fg",off:"text-muted-foreground"};function I({words:a}){return a.desktop===a.phone?(0,b.jsx)("span",{children:a.desktop}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"hidden sm:inline",children:a.desktop}),(0,b.jsx)("span",{className:"sm:hidden",children:a.phone})]})}function J({line:a}){let c=G[a.icon];return(0,b.jsxs)("p",{"data-testid":"bridge-basket-standing",className:"col-span-2 col-start-2 flex items-start gap-1.5 text-meta",children:[(0,b.jsx)(c,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 ${H[a.tone]}`}),(0,b.jsx)("span",{children:(0,b.jsx)(I,{words:a.words})})]})}function K({entry:a,line:c,opening:d,working:f,onRemove:g}){let{standing:h}=a,i="withdrawn"===h.kind||"replaced"===h.kind||"dealtElsewhere"===h.kind,k=void 0!==f||void 0!==d.openingId,l=f?.kind==="remove"&&f.questionId===a.questionId,m="replaced"===h.kind?h.replacementId:null,n=i?"line-through decoration-muted-foreground":"";return(0,b.jsxs)("li",{"data-testid":"bridge-basket-entry","data-standing":h.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 ${i?"bg-muted":""}`,children:[(0,b.jsx)(j.f,{"aria-hidden":!0,className:"mt-0.5 size-4 text-tone-active-fg"}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,b.jsx)("span",{className:`font-medium ${n}`,children:a.title}),(0,b.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground",children:[(0,b.jsxs)("span",{children:["to ",(0,b.jsx)("b",{className:"font-medium text-foreground",children:a.from})]}),(0,b.jsx)("span",{"aria-hidden":!0,className:"hidden text-border sm:inline",children:"·"}),(0,b.jsxs)("span",{className:"hidden sm:inline",children:["asked at ",(0,b.jsx)("time",{dateTime:a.sentAt,children:x(a.sentAt)})]})]}),(0,b.jsxs)("span",{className:`${i?"hidden sm:flex":"flex"} items-center gap-1.5 text-meta ${n}`,children:[(0,b.jsx)(e,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-primary"}),null===a.option?"Note alone":null===a.optionLabel?`Option ${String(a.option)}`:`${String(a.option)}. ${a.optionLabel}`]}),null===a.note?null:(0,b.jsxs)("span",{className:"text-caption italic text-muted-foreground",children:['"',a.note,'"']})]}),"waiting"===h.kind?(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)(D.i,{"data-testid":"bridge-basket-change",size:"small","aria-label":"Change",isPending:d.openingId===a.deliveryId,pendingLabel:"Opening...",disabled:k,onClick:()=>{d.open({deliveryId:a.deliveryId,job:"decide",inBasket:{option:a.option,note:a.note}})},children:[(0,b.jsx)(o,{"aria-hidden":!0,className:"size-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Change"})]}),(0,b.jsxs)(D.i,{"data-testid":"bridge-basket-remove",size:"small",variant:"ghost","aria-label":"Remove",isPending:l,pendingLabel:"Removing...",disabled:k,onClick:()=>{g(a.questionId)},children:[(0,b.jsx)(s.X,{"aria-hidden":!0,className:"size-4 sm:hidden"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Remove"})]})]}):(0,b.jsx)("span",{}),void 0===c?null:(0,b.jsx)(J,{line:c}),d.failure?.deliveryId===a.deliveryId?(0,b.jsx)("div",{className:"col-span-2 col-start-2",children:(0,b.jsx)(E.f,{message:d.failure.message,isFailure:!0})}):null,"withdrawn"===h.kind||"replaced"===h.kind||"dealtElsewhere"===h.kind||"refused"===h.kind?(0,b.jsxs)("div",{className:"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5",children:[null===m?null:(0,b.jsxs)(D.i,{"data-testid":"bridge-replacement",size:"small",isPending:d.openingId===m,pendingLabel:"Opening...",disabled:k,onClick:()=>{d.open({deliveryId:m,job:"decide"})},children:[(0,b.jsx)(e,{"aria-hidden":!0,className:"size-3.5"}),"Answer the new question"]}),(0,b.jsx)(D.i,{"data-testid":"bridge-basket-remove",size:"small",variant:"replaced"===h.kind?"ghost":"secondary",isPending:l,pendingLabel:"Removing...",disabled:k,onClick:()=>{g(a.questionId)},children:"refused"===h.kind?"Remove and mark done":"Remove"})]}):null]})}function L({foot:a,isSending:c,isWorking:d,onSend:e}){return"none"===a.kind?null:(0,b.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,b.jsx)("p",{className:"flex-1 text-caption text-muted-foreground",children:(0,b.jsx)(I,{words:a.words})}),"send"===a.kind?(0,b.jsxs)(D.i,{"data-testid":"bridge-basket-send",variant:"primary",className:"justify-center",isPending:c,pendingLabel:"Sending...",disabled:d,onClick:e,children:[(0,b.jsx)(q.f,{"aria-hidden":!0,className:"size-4"}),a.label]}):null,"sending"===a.kind?(0,b.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,b.jsx)(m.f,{"aria-hidden":!0,className:"size-4 animate-spin"}),a.progress]}):null]})}function M({summary:a}){return(0,b.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,b.jsx)(i.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0 text-tone-ok-fg"}),(0,b.jsxs)("span",{className:"grid gap-1",children:[(0,b.jsx)("span",{className:"font-medium",children:a.title}),(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:a.description})]})]})}function N(){return(0,b.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,b.jsx)("span",{className:"inline-flex size-11 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,b.jsx)(r.f,{"aria-hidden":!0,className:"size-5"})}),(0,b.jsx)("span",{className:"text-heading font-semibold",children:"The basket is empty"}),(0,b.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."})]})}a.s(["BasketPanel",0,function({fleetId:a,basket:c}){let d,e,[f,g]=(0,t.useState)(),[h,i]=(0,t.useState)(),[,j]=(0,t.useTransition)(),k=(d=c.entries.some(({standing:a})=>"sent"===a.kind),e=c.entries.find(({standing:a})=>"sending"===a.kind&&!a.isUnanswered),c.entries.map(a=>(function(a,b){let{standing:c,from:d}=a;switch(c.kind){case"waiting":return;case"sent":{let a=x(c.at);return{icon:"sent",tone:"ok",words:{desktop:`Sent at ${a} and stored. Done.`,phone:`Sent at ${a}. Done.`}}}case"sending":if(c.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 b.isSendingNow?{icon:"sending",tone:"waiting",words:z("Sending...")}:{icon:"next",tone:"waiting",words:{desktop:"Next, in the order you added it",phone:"Next"}};case"refused":{let a=`Not sent: ${c.reason}.`,[d=c.reason]=c.reason.split(", so ");return{icon:"refused",tone:"attention",words:{desktop:b.isAnySent?`${a} The others were sent.`:a,phone:`Not sent: ${d}.`}}}case"withdrawn":return{icon:"withdrawn",tone:"off",words:{desktop:`Withdrawn by ${d} at ${x(c.at)}. Not sent; Send skips it.`,phone:`Withdrawn by ${d}. Not sent.`}};case"replaced":{let a=null===c.replacementTitle?".":` with "${c.replacementTitle}"`;return{icon:"replaced",tone:"off",words:{desktop:`Replaced by ${d} at ${x(c.at)}${a} Not sent: its options differ, so answer the new one.`,phone:`Replaced by ${d}. Not sent.`}}}case"dealtElsewhere":return{icon:"elsewhere",tone:"off",words:z(null===c.option?`Done ${y[c.place]}. Nothing is sent from it.`:`Answered ${y[c.place]}: option ${String(c.option)}. Nothing is sent from it.`)}}})(a,{isAnySent:d,isSendingNow:a===e}))),l=function(a){let{entries:b}=a;if(0===b.length||b.some(({standing:a})=>"sent"!==a.kind))return;let c=`To ${B(C(b))}, as you;`;return{title:`${A(b.length)} sent`,description:1===b.length?`${c} stored, and in Done.`:`${c} each stored, each in Done.`}}(c),m=b=>{g({kind:"remove",questionId:b}),i(void 0),j(async()=>{let c=await (0,u.f)(a,b);g(void 0),i(c.isOk?void 0:c.message)})},n=()=>{g({kind:"send"}),i(void 0),j(async()=>{let b=await w(a);g(void 0),i(b.isOk?void 0:b.message)})};return(0,b.jsx)(F.f,{fleetId:a,children:a=>(0,b.jsxs)("section",{className:"grid gap-4","aria-labelledby":"bridge-basket-heading",children:[(0,b.jsxs)("div",{className:"hidden sm:block",children:[(0,b.jsxs)("h1",{id:"bridge-basket-heading",className:"text-heading font-semibold",children:["Basket ",(0,b.jsx)("span",{"data-testid":"bridge-basket-count",className:"text-primary",children:c.count})]}),(0,b.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===h?null:(0,b.jsx)(E.f,{message:h,isFailure:!0}),void 0===l?null:(0,b.jsx)(M,{summary:l}),0===c.entries.length||void 0!==l?(0,b.jsx)(N,{}):(0,b.jsxs)("div",{className:"max-w-[820px] overflow-hidden rounded-lg border border-border bg-card",children:[(0,b.jsx)("ul",{children:c.entries.map((c,d)=>(0,b.jsx)(K,{entry:c,line:k[d],opening:a,working:f,onRemove:m},c.questionId))}),(0,b.jsx)(L,{foot:function(a){if(a.toSend>0)return function(a){var b;let c=function(a){let b=b=>a.filter(({standing:a})=>a.kind===b).length,c=["withdrawn","replaced"].map(a=>({kind:a,count:b(a)})).filter(({count:a})=>a>0),d=c.map(({kind:a,count:b},d)=>b>1?`the ${String(b)} ${a}`:d===c.length-1?`the ${a} one`:`the ${a}`),e=b("dealtElsewhere"),f=0===e?d:[...d,1===e?"the one answered elsewhere":`the ${String(e)} answered elsewhere`];if(0===f.length)return;let g=B(f),h=1===c.reduce((a,{count:b})=>a+b,e);return`${g.charAt(0).toUpperCase()}${g.slice(1)} ${h?"is":"are"} not sent.`}(a.entries),d=(b=a.toSend,`Send ${A(b)}`);if(void 0!==c)return{kind:"send",words:{desktop:`${String(a.toSend)} to send. ${c}`,phone:c},label:d};let e=a.entries.filter(({standing:a})=>"waiting"===a.kind),f=C(e),g=f.length>1?"each receive their own answer":e.length>1?"receives its own answer to each":"receives its own answer";return{kind:"send",words:{desktop:`${B(f)} ${g}, as you, as if sent one by one.`,phone:"Each asker receives its own answer."},label:d}}(a);let b=a.entries.map(({standing:a})=>a),c=b.filter(({kind:a})=>"sent"===a).length,d=b.filter(({kind:a})=>"sending"===a).length,e=b.filter(({kind:a})=>"refused"===a).length,f=b.some(a=>"sending"===a.kind&&a.isUnanswered);if(d>0&&0===e&&!f)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(c+1)} of ${String(c+d)}`};if(0===d&&0===e)return{kind:"none"};let g=(a,b)=>0===a?[]:[`${String(a)} ${b}`];return{kind:"summary",words:{desktop:`${[...g(c,"sent"),...g(d,"still sending"),...g(e,"not sent")].join(", ")}.`,phone:`${[...g(c,"sent"),...g(d,"sending"),...g(e,"not sent")].join(", ")}.`}}}(c),isSending:f?.kind==="send",isWorking:void 0!==f||void 0!==a.openingId,onSend:n})]})]})})}],80198)}];
1
+ module.exports=[80198,a=>{"use strict";var b=a.i(87924),c=a.i(64831);let d={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};d.node;let e=(0,c.f)(d);var f=a.i(70840),g=a.i(52562),h=a.i(93817),i=a.i(97024),j=a.i(2550);let k={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};k.node;let l=(0,c.f)(k);var m=a.i(58983);let n={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"}]]};n.node;let o=(0,c.f)(n);var p=a.i(59542),q=a.i(74746),r=a.i(55596),s=a.i(74215),t=a.i(72131),u=a.i(15562),v=a.i(5050);let w=(0,v.createServerReference)("4006354f8379bf619098ee9df9d054aa021ed8dc89",v.callServer,void 0,v.findSourceMapURL,"sendBasket");function x(a){return`${new Date(a).toISOString().slice(11,16)} UTC`}let y={bridge:"in Bridge",chat:"in a chat",slack:"in Slack",gateway:"by the gateway"};function z(a){return{desktop:a,phone:a}}function A(a){return 1===a?"1 answer":`${String(a)} answers`}function B(a){return a.length<=1?a.join(""):`${a.slice(0,-1).join(", ")} and ${a.at(-1)??""}`}function C(a){return[...new Set(a.map(({from:a})=>a))]}var D=a.i(32043),E=a.i(10039),F=a.i(91777);let G={sent:i.f,sending:m.f,next:l,unanswered:m.f,refused:h.f,withdrawn:f.f,replaced:p.f,elsewhere:g.f},H={ok:"text-tone-ok-fg",waiting:"text-tone-waiting-fg",attention:"text-tone-attention-fg",off:"text-muted-foreground"};function I({words:a}){return a.desktop===a.phone?(0,b.jsx)("span",{children:a.desktop}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"hidden sm:inline",children:a.desktop}),(0,b.jsx)("span",{className:"sm:hidden",children:a.phone})]})}function J({line:a}){let c=G[a.icon];return(0,b.jsxs)("p",{"data-testid":"bridge-basket-standing",className:"col-span-2 col-start-2 flex items-start gap-1.5 text-meta",children:[(0,b.jsx)(c,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 ${H[a.tone]}`}),(0,b.jsx)("span",{children:(0,b.jsx)(I,{words:a.words})})]})}function K({entry:a,line:c,opening:d,working:f,onRemove:g}){let{standing:h}=a,i="withdrawn"===h.kind||"replaced"===h.kind||"dealtElsewhere"===h.kind,k=void 0!==f||void 0!==d.openingId,l=f?.kind==="remove"&&f.questionId===a.questionId,m="replaced"===h.kind?h.replacementId:null,n=i?"line-through decoration-muted-foreground":"";return(0,b.jsxs)("li",{"data-testid":"bridge-basket-entry","data-standing":h.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 ${i?"bg-muted":""}`,children:[(0,b.jsx)(j.f,{"aria-hidden":!0,className:"mt-0.5 size-4 text-tone-active-fg"}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,b.jsx)("span",{className:`font-medium ${n}`,children:a.title}),(0,b.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground",children:[(0,b.jsxs)("span",{children:["to ",(0,b.jsx)("b",{className:"font-medium text-foreground",children:a.from})]}),(0,b.jsx)("span",{"aria-hidden":!0,className:"hidden text-border sm:inline",children:"·"}),(0,b.jsxs)("span",{className:"hidden sm:inline",children:["asked at ",(0,b.jsx)("time",{dateTime:a.sentAt,children:x(a.sentAt)})]})]}),(0,b.jsxs)("span",{className:`${i?"hidden sm:flex":"flex"} items-center gap-1.5 text-meta ${n}`,children:[(0,b.jsx)(e,{"aria-hidden":!0,className:"size-3.5 shrink-0 text-primary"}),null===a.option?"Note alone":null===a.optionLabel?`Option ${String(a.option)}`:`${String(a.option)}. ${a.optionLabel}`]}),null===a.note?null:(0,b.jsxs)("span",{className:"text-caption italic text-muted-foreground",children:['"',a.note,'"']})]}),"waiting"===h.kind?(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)(D.i,{"data-testid":"bridge-basket-change",size:"small","aria-label":"Change",isPending:d.openingId===a.deliveryId,pendingLabel:"Opening...",disabled:k,onClick:()=>{d.open({deliveryId:a.deliveryId,job:"decide",inBasket:{option:a.option,note:a.note}})},children:[(0,b.jsx)(o,{"aria-hidden":!0,className:"size-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Change"})]}),(0,b.jsxs)(D.i,{"data-testid":"bridge-basket-remove",size:"small",variant:"ghost","aria-label":"Remove",isPending:l,pendingLabel:"Removing...",disabled:k,onClick:()=>{g(a.questionId)},children:[(0,b.jsx)(s.X,{"aria-hidden":!0,className:"size-4 sm:hidden"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Remove"})]})]}):(0,b.jsx)("span",{}),void 0===c?null:(0,b.jsx)(J,{line:c}),d.failure?.deliveryId===a.deliveryId?(0,b.jsx)("div",{className:"col-span-2 col-start-2",children:(0,b.jsx)(E.f,{message:d.failure.message,isFailure:!0})}):null,"withdrawn"===h.kind||"replaced"===h.kind||"dealtElsewhere"===h.kind||"refused"===h.kind?(0,b.jsxs)("div",{className:"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5",children:[null===m?null:(0,b.jsxs)(D.i,{"data-testid":"bridge-replacement",size:"small",isPending:d.openingId===m,pendingLabel:"Opening...",disabled:k,onClick:()=>{d.open({deliveryId:m,job:"decide"})},children:[(0,b.jsx)(e,{"aria-hidden":!0,className:"size-3.5"}),"Answer the new question"]}),(0,b.jsx)(D.i,{"data-testid":"bridge-basket-remove",size:"small",variant:"replaced"===h.kind?"ghost":"secondary",isPending:l,pendingLabel:"Removing...",disabled:k,onClick:()=>{g(a.questionId)},children:"refused"===h.kind?"Remove and mark done":"Remove"})]}):null]})}function L({foot:a,isSending:c,isWorking:d,onSend:e}){return"none"===a.kind?null:(0,b.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,b.jsx)("p",{className:"flex-1 text-caption text-muted-foreground",children:(0,b.jsx)(I,{words:a.words})}),"send"===a.kind?(0,b.jsxs)(D.i,{"data-testid":"bridge-basket-send",variant:"primary",className:"justify-center",isPending:c,pendingLabel:"Sending...",disabled:d,onClick:e,children:[(0,b.jsx)(q.f,{"aria-hidden":!0,className:"size-4"}),a.label]}):null,"sending"===a.kind?(0,b.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,b.jsx)(m.f,{"aria-hidden":!0,className:"size-4 animate-spin"}),a.progress]}):null]})}function M({summary:a}){return(0,b.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,b.jsx)(i.f,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0 text-tone-ok-fg"}),(0,b.jsxs)("span",{className:"grid gap-1",children:[(0,b.jsx)("span",{className:"font-medium",children:a.title}),(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:a.description})]})]})}function N(){return(0,b.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,b.jsx)("span",{className:"inline-flex size-11 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,b.jsx)(r.f,{"aria-hidden":!0,className:"size-5"})}),(0,b.jsx)("span",{className:"text-heading font-semibold",children:"The basket is empty"}),(0,b.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."})]})}a.s(["BasketPanel",0,function({fleetId:a,basket:c}){let d,e,[f,g]=(0,t.useState)(),[h,i]=(0,t.useState)(),[,j]=(0,t.useTransition)(),k=(d=c.entries.some(({standing:a})=>"sent"===a.kind),e=c.entries.find(({standing:a})=>"sending"===a.kind&&!a.isUnanswered),c.entries.map(a=>(function(a,b){let{standing:c,from:d}=a;switch(c.kind){case"waiting":return;case"sent":{let a=x(c.at);return{icon:"sent",tone:"ok",words:{desktop:`Sent at ${a} and stored. Done.`,phone:`Sent at ${a}. Done.`}}}case"sending":if(c.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 b.isSendingNow?{icon:"sending",tone:"waiting",words:z("Sending...")}:{icon:"next",tone:"waiting",words:{desktop:"Next, in the order you added it",phone:"Next"}};case"refused":{let a=`Not sent: ${c.reason}.`,[d=c.reason]=c.reason.split(", so ");return{icon:"refused",tone:"attention",words:{desktop:b.isAnySent?`${a} The others were sent.`:a,phone:`Not sent: ${d}.`}}}case"withdrawn":return{icon:"withdrawn",tone:"off",words:{desktop:`Withdrawn by ${d} at ${x(c.at)}. Not sent; Send skips it.`,phone:`Withdrawn by ${d}. Not sent.`}};case"replaced":{let a=null===c.replacementTitle?".":` with "${c.replacementTitle}"`;return{icon:"replaced",tone:"off",words:{desktop:`Replaced by ${d} at ${x(c.at)}${a} Not sent: its options differ, so answer the new one.`,phone:`Replaced by ${d}. Not sent.`}}}case"dealtElsewhere":return{icon:"elsewhere",tone:"off",words:z(null===c.option?`Done ${y[c.place]}. Nothing is sent from it.`:`Answered ${y[c.place]}: option ${String(c.option)}. Nothing is sent from it.`)}}})(a,{isAnySent:d,isSendingNow:a===e}))),l=function(a){let{entries:b}=a;if(0===b.length||b.some(({standing:a})=>"sent"!==a.kind))return;let c=`To ${B(C(b))}, as you;`;return{title:`${A(b.length)} sent`,description:1===b.length?`${c} stored, and in Done.`:`${c} each stored, each in Done.`}}(c),m=b=>{g({kind:"remove",questionId:b}),i(void 0),j(async()=>{let c=await (0,u.f)(a,b);g(void 0),i(c.isOk?void 0:c.message)})},n=()=>{g({kind:"send"}),i(void 0),j(async()=>{let b=await w(a);g(void 0),i(b.isOk?void 0:b.message)})};return(0,b.jsx)(F.f,{fleetId:a,children:a=>(0,b.jsxs)("section",{className:"grid gap-4","aria-labelledby":"bridge-basket-heading",children:[(0,b.jsxs)("div",{className:"hidden sm:block",children:[(0,b.jsxs)("h1",{id:"bridge-basket-heading",className:"text-heading font-semibold",children:["Basket ",(0,b.jsx)("span",{"data-testid":"bridge-basket-count",className:"text-primary",children:c.count})]}),(0,b.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===h?null:(0,b.jsx)(E.f,{message:h,isFailure:!0}),void 0===l?null:(0,b.jsx)(M,{summary:l}),0===c.entries.length||void 0!==l?(0,b.jsx)(N,{}):(0,b.jsxs)("div",{className:"max-w-[820px] overflow-hidden rounded-lg border border-border bg-card",children:[(0,b.jsx)("ul",{children:c.entries.map((c,d)=>(0,b.jsx)(K,{entry:c,line:k[d],opening:a,working:f,onRemove:m},c.questionId))}),(0,b.jsx)(L,{foot:function(a){if(a.toSend>0)return function(a){var b;let c=function(a){let b=b=>a.filter(({standing:a})=>a.kind===b).length,c=["withdrawn","replaced"].map(a=>({kind:a,count:b(a)})).filter(({count:a})=>a>0),d=c.map(({kind:a,count:b},d)=>b>1?`the ${String(b)} ${a}`:d===c.length-1?`the ${a} one`:`the ${a}`),e=b("dealtElsewhere"),f=0===e?d:[...d,1===e?"the one answered elsewhere":`the ${String(e)} answered elsewhere`];if(0===f.length)return;let g=B(f),h=1===c.reduce((a,{count:b})=>a+b,e);return`${g.charAt(0).toUpperCase()}${g.slice(1)} ${h?"is":"are"} not sent.`}(a.entries),d=(b=a.toSend,`Send ${A(b)}`);if(void 0!==c)return{kind:"send",words:{desktop:`${String(a.toSend)} to send. ${c}`,phone:c},label:d};let e=a.entries.filter(({standing:a})=>"waiting"===a.kind),f=C(e),g=f.length>1?"each receive their own answer":e.length>1?"receives its own answer to each":"receives its own answer";return{kind:"send",words:{desktop:`${B(f)} ${g}, as you, as if sent one by one.`,phone:"Each asker receives its own answer."},label:d}}(a);let b=a.entries.map(({standing:a})=>a),c=b.filter(({kind:a})=>"sent"===a).length,d=b.filter(({kind:a})=>"sending"===a).length,e=b.filter(({kind:a})=>"refused"===a).length,f=b.some(a=>"sending"===a.kind&&a.isUnanswered);if(d>0&&0===e&&!f)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(c+1)} of ${String(c+d)}`};if(0===d&&0===e)return{kind:"none"};let g=(a,b)=>0===a?[]:[`${String(a)} ${b}`];return{kind:"summary",words:{desktop:`${[...g(c,"sent"),...g(d,"still sending"),...g(e,"not sent")].join(", ")}.`,phone:`${[...g(c,"sent"),...g(d,"sending"),...g(e,"not sent")].join(", ")}.`}}}(c),isSending:f?.kind==="send",isWorking:void 0!==f||void 0!==a.openingId,onSend:n})]})]})})}],80198)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/bridge/hooks/data%3Af34fe9%20%3Ctext/javascript%3E","../../../../../web/features/bridge/state/basket-panel.tsx","../../../../../web/features/bridge/services/clock-time.ts","../../../../../node_modules/lucide-react/src/icons/arrow-right.ts","../../../../../node_modules/lucide-react/src/icons/clock.ts","../../../../../node_modules/lucide-react/src/icons/pencil.ts","../../../../../web/features/bridge/services/basket.ts"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"400320361887ac212b3589baccdc71146b3f431261\":{\"name\":\"sendBasket\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_6=/*#__PURE__*/createServerReference(\"400320361887ac212b3589baccdc71146b3f431261\",callServer,void 0,findSourceMapURL,\"sendBasket\");export{$$RSC_SERVER_ACTION_6 as sendBasket};","'use client';\n\nimport { ArrowRight, Ban, Check, CircleAlert, CircleCheck, CircleQuestionMark, Clock, LoaderCircle, Pencil, Replace, Send, ShoppingBasket, X } from 'lucide-react';\nimport { useState, useTransition } from 'react';\n\nimport { removeFromBasket, sendBasket } from '../hooks/bridge-actions';\nimport { answerTextOf, entryLinesOf, footOf, isStruckOut, sentSummaryOf, type BasketFoot, type BasketItem, type BasketView, type EntryLine, type Words } from '../services/basket';\nimport { clockTimeOf } from '../services/clock-time';\nimport { ActionButton } from '../ui/action-button';\nimport { Notice } from '../ui/notice';\nimport { ItemFocus, type ItemOpening } from './item-focus';\n\n/** What the person is doing in the basket: removing one entry, or sending it. */\ntype Working = { kind: 'remove'; questionId: string } | { kind: 'send' };\n\nconst LINE_ICONS = {\n sent: CircleCheck,\n sending: LoaderCircle,\n next: Clock,\n unanswered: LoaderCircle,\n refused: CircleAlert,\n withdrawn: Ban,\n replaced: Replace,\n elsewhere: Check,\n} as const;\n\nconst LINE_TONES = {\n ok: 'text-tone-ok-fg',\n waiting: 'text-tone-waiting-fg',\n attention: 'text-tone-attention-fg',\n off: 'text-muted-foreground',\n} as const;\n\n/** Words as the desktop says them, and shorter on a phone. */\nfunction Said({ words }: { words: Words }) {\n if (words.desktop === words.phone) {\n return <span>{words.desktop}</span>;\n }\n return (\n <>\n <span className=\"hidden sm:inline\">{words.desktop}</span>\n <span className=\"sm:hidden\">{words.phone}</span>\n </>\n );\n}\n\n/** The line under an entry, behind its icon in its tone. */\nfunction EntryLineSaid({ line }: { line: EntryLine }) {\n const Icon = LINE_ICONS[line.icon];\n return (\n <p data-testid=\"bridge-basket-standing\" className=\"col-span-2 col-start-2 flex items-start gap-1.5 text-meta\">\n <Icon aria-hidden className={`mt-0.5 size-3.5 shrink-0 ${LINE_TONES[line.tone]}`} />\n <span>\n <Said words={line.words} />\n </span>\n </p>\n );\n}\n\n/** One entry: the question, its asker and when it asked, its answer and note, the line saying how it stands, and what can be done with it. */\nfunction BasketEntryRow({ entry, line, opening, working, onRemove }: { entry: BasketItem; line: EntryLine | undefined; opening: ItemOpening; working: Working | undefined; onRemove: (questionId: string) => void }) {\n const { standing } = entry;\n const isStruck = isStruckOut(standing);\n const isWorking = working !== undefined || opening.openingId !== undefined;\n const isRemoving = working?.kind === 'remove' && working.questionId === entry.questionId;\n const replacementId = standing.kind === 'replaced' ? standing.replacementId : null;\n const struck = isStruck ? 'line-through decoration-muted-foreground' : '';\n return (\n <li data-testid=\"bridge-basket-entry\" data-standing={standing.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 ${isStruck ? 'bg-muted' : ''}`}>\n <CircleQuestionMark aria-hidden className=\"mt-0.5 size-4 text-tone-active-fg\" />\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n <span className={`font-medium ${struck}`}>{entry.title}</span>\n <span className=\"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground\">\n <span>\n to <b className=\"font-medium text-foreground\">{entry.from}</b>\n </span>\n <span aria-hidden className=\"hidden text-border sm:inline\">\n ·\n </span>\n <span className=\"hidden sm:inline\">\n asked at <time dateTime={entry.sentAt}>{clockTimeOf(entry.sentAt)}</time>\n </span>\n </span>\n <span className={`${isStruck ? 'hidden sm:flex' : 'flex'} items-center gap-1.5 text-meta ${struck}`}>\n <ArrowRight aria-hidden className=\"size-3.5 shrink-0 text-primary\" />\n {answerTextOf(entry)}\n </span>\n {entry.note === null ? null : <span className=\"text-caption italic text-muted-foreground\">&quot;{entry.note}&quot;</span>}\n </div>\n {standing.kind === 'waiting' ? (\n <div className=\"flex items-center gap-1.5\">\n <ActionButton data-testid=\"bridge-basket-change\" size=\"small\" aria-label=\"Change\" isPending={opening.openingId === entry.deliveryId} pendingLabel=\"Opening...\" disabled={isWorking} onClick={() => { opening.open({ deliveryId: entry.deliveryId, job: 'decide', inBasket: { option: entry.option, note: entry.note } }); }}>\n <Pencil aria-hidden className=\"size-3.5\" />\n <span className=\"hidden sm:inline\">Change</span>\n </ActionButton>\n <ActionButton data-testid=\"bridge-basket-remove\" size=\"small\" variant=\"ghost\" aria-label=\"Remove\" isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={() => { onRemove(entry.questionId); }}>\n <X aria-hidden className=\"size-4 sm:hidden\" />\n <span className=\"hidden sm:inline\">Remove</span>\n </ActionButton>\n </div>\n ) : (\n <span />\n )}\n {line === undefined ? null : <EntryLineSaid line={line} />}\n {opening.failure?.deliveryId === entry.deliveryId ? (\n <div className=\"col-span-2 col-start-2\">\n <Notice message={opening.failure.message} isFailure />\n </div>\n ) : null}\n {standing.kind === 'withdrawn' || standing.kind === 'replaced' || standing.kind === 'dealtElsewhere' || standing.kind === 'refused' ? (\n <div className=\"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5\">\n {replacementId === null ? null : (\n <ActionButton data-testid=\"bridge-replacement\" size=\"small\" isPending={opening.openingId === replacementId} pendingLabel=\"Opening...\" disabled={isWorking} onClick={() => { opening.open({ deliveryId: replacementId, job: 'decide' }); }}>\n <ArrowRight aria-hidden className=\"size-3.5\" />\n Answer the new question\n </ActionButton>\n )}\n <ActionButton data-testid=\"bridge-basket-remove\" size=\"small\" variant={standing.kind === 'replaced' ? 'ghost' : 'secondary'} isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={() => { onRemove(entry.questionId); }}>\n {standing.kind === 'refused' ? 'Remove and mark done' : 'Remove'}\n </ActionButton>\n </div>\n ) : null}\n </li>\n );\n}\n\n/** The foot of the basket: Send naming the ships, the send going on, or what came of it. */\nfunction BasketFootBar({ foot, isSending, isWorking, onSend }: { foot: BasketFoot; isSending: boolean; isWorking: boolean; onSend: () => void }) {\n if (foot.kind === 'none') {\n return null;\n }\n return (\n <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\">\n <p className=\"flex-1 text-caption text-muted-foreground\">\n <Said words={foot.words} />\n </p>\n {foot.kind === 'send' ? (\n <ActionButton data-testid=\"bridge-basket-send\" variant=\"primary\" className=\"justify-center\" isPending={isSending} pendingLabel=\"Sending...\" disabled={isWorking} onClick={onSend}>\n <Send aria-hidden className=\"size-4\" />\n {foot.label}\n </ActionButton>\n ) : null}\n {foot.kind === 'sending' ? (\n <button type=\"button\" data-testid=\"bridge-basket-sending\" disabled 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\">\n <LoaderCircle aria-hidden className=\"size-4 animate-spin\" />\n {foot.progress}\n </button>\n ) : null}\n </div>\n );\n}\n\n/** What was sent, over the empty basket, once every entry left was sent. */\nfunction SentSummary({ summary }: { summary: { title: string; description: string } }) {\n return (\n <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\">\n <CircleCheck aria-hidden className=\"mt-0.5 size-4 shrink-0 text-tone-ok-fg\" />\n <span className=\"grid gap-1\">\n <span className=\"font-medium\">{summary.title}</span>\n <span className=\"text-caption text-muted-foreground\">{summary.description}</span>\n </span>\n </div>\n );\n}\n\n/** The empty basket, with what goes into it. */\nfunction EmptyBasket() {\n return (\n <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\">\n <span className=\"inline-flex size-11 items-center justify-center rounded-lg bg-secondary text-muted-foreground\">\n <ShoppingBasket aria-hidden className=\"size-5\" />\n </span>\n <span className=\"text-heading font-semibold\">The basket is empty</span>\n <span className=\"max-w-[360px] text-muted-foreground\">Pick an option on a question and put it in the basket; it waits here until you send it.</span>\n </div>\n );\n}\n\n/**\n * The basket open (docs/design/bridge, section 9; basket.html, basket-3 to\n * basket-7): its count of what is or will be sent, and the answers the\n * person picked in Bridge, in the order added, each with its answer by\n * number and label. Change opens the question with that option picked;\n * Remove takes the entry out, and the question still waits; one the fleet\n * refused is removed and its question marked done. A withdrawn, replaced or\n * answered-elsewhere entry is struck out and not sent. Send N answers stores\n * each as sending and the gateway sends them, each on its own: each entry\n * then says how it goes, and the foot Sending N of M, or what came of the\n * send once one was not answered or refused. Once every entry left was\n * sent, what was sent stands over the empty basket.\n */\nexport function BasketPanel({ fleetId, basket }: { fleetId: string; basket: BasketView }) {\n const [working, setWorking] = useState<Working | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n const lines = entryLinesOf(basket);\n const summary = sentSummaryOf(basket);\n\n const remove = (questionId: string) => {\n setWorking({ kind: 'remove', questionId });\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await removeFromBasket(fleetId, questionId);\n setWorking(undefined);\n setFailure(outcome.isOk ? undefined : outcome.message);\n });\n };\n\n const send = () => {\n setWorking({ kind: 'send' });\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await sendBasket(fleetId);\n setWorking(undefined);\n setFailure(outcome.isOk ? undefined : outcome.message);\n });\n };\n\n return (\n <ItemFocus fleetId={fleetId}>\n {(opening) => (\n <section className=\"grid gap-4\" aria-labelledby=\"bridge-basket-heading\">\n <div className=\"hidden sm:block\">\n <h1 id=\"bridge-basket-heading\" className=\"text-heading font-semibold\">\n Basket <span data-testid=\"bridge-basket-count\" className=\"text-primary\">{basket.count}</span>\n </h1>\n <p className=\"text-caption text-muted-foreground\">Answers you picked in Bridge, not sent yet. Nothing goes until you press Send.</p>\n </div>\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n {summary === undefined ? null : <SentSummary summary={summary} />}\n {basket.entries.length === 0 || summary !== undefined ? (\n <EmptyBasket />\n ) : (\n <div className=\"max-w-[820px] overflow-hidden rounded-lg border border-border bg-card\">\n <ul>\n {basket.entries.map((entry, index) => (\n <BasketEntryRow key={entry.questionId} entry={entry} line={lines[index]} opening={opening} working={working} onRemove={remove} />\n ))}\n </ul>\n <BasketFootBar foot={footOf(basket)} isSending={working?.kind === 'send'} isWorking={working !== undefined || opening.openingId !== undefined} onSend={send} />\n </div>\n )}\n </section>\n )}\n </ItemFocus>\n );\n}\n","/** The time of day of an instant (ISO 8601), in UTC to the minute, as Bridge says when something happened: 20:16 UTC. */\nexport function clockTimeOf(at: string): string {\n return `${new Date(at).toISOString().slice(11, 16)} UTC`;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'arrow-right',\n size: 24,\n node: [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'm12 5 7 7-7 7', key: 'xquz4c' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name ArrowRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMmgxNCIgLz4KICA8cGF0aCBkPSJtMTIgNSA3IDctNyA3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/arrow-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ArrowRight = createLucideIcon(__iconData);\n\nexport default ArrowRight;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'clock',\n size: 24,\n node: [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M12 6v6l4 2', key: 'mmk7yg' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Clock\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTIgNnY2bDQgMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/clock\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Clock = createLucideIcon(__iconData);\n\nexport default Clock;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'pencil',\n size: 24,\n node: [\n [\n 'path',\n {\n 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',\n key: '1a8usu',\n },\n ],\n ['path', { d: 'm15 5 4 4', key: '1mk7zo' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Pencil\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuMTc0IDYuODEyYTEgMSAwIDAgMC0zLjk4Ni0zLjk4N0wzLjg0MiAxNi4xNzRhMiAyIDAgMCAwLS41LjgzbC0xLjMyMSA0LjM1MmEuNS41IDAgMCAwIC42MjMuNjIybDQuMzUzLTEuMzJhMiAyIDAgMCAwIC44My0uNDk3eiIgLz4KICA8cGF0aCBkPSJtMTUgNSA0IDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pencil\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Pencil = createLucideIcon(__iconData);\n\nexport default Pencil;\n","/**\n * The basket as Bridge shows it (docs/design/bridge, section 9; basket.html,\n * basket-3 to basket-7): each entry's answer, the line under it as it\n * stands, the foot naming the ships or saying how the send goes, and what\n * was sent, in words, each with its desktop and its shorter phone words.\n * Pure view logic, no React and no API client.\n */\nimport type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport { clockTimeOf } from './clock-time';\n\ntype PeopleOutputs = inferRouterOutputs<GatewayRouter>['people'];\n\n/** The basket as the API answers it: its entries in the order added, its count, and how many answers Send sends. */\nexport type BasketView = PeopleOutputs['basket'];\n\n/** An entry of the basket, with what it stands as. */\nexport type BasketItem = BasketView['entries'][number];\n\ntype Standing = BasketItem['standing'];\n\n/** What Send did, as the API answers it. */\nexport type BasketSent = PeopleOutputs['sendBasket'];\n\n/** Words as a desktop says them, and as a phone says them, shorter. */\nexport interface Words {\n readonly desktop: string;\n readonly phone: string;\n}\n\n/** The line under an entry: its icon, the tone of the icon, and its words. */\nexport interface EntryLine {\n readonly icon: 'sent' | 'sending' | 'next' | 'unanswered' | 'refused' | 'withdrawn' | 'replaced' | 'elsewhere';\n readonly tone: 'ok' | 'waiting' | 'attention' | 'off';\n readonly words: Words;\n}\n\n/** The basket's foot: Send naming the ships, the send going on, what came of it, or none. */\nexport type BasketFoot = { readonly kind: 'send'; readonly words: Words; readonly label: string } | { readonly kind: 'sending'; readonly words: Words; readonly progress: string } | { readonly kind: 'summary'; readonly words: Words } | { readonly kind: 'none' };\n\nconst PLACES: Record<Extract<Standing, { kind: 'dealtElsewhere' }>['place'], string> = {\n bridge: 'in Bridge',\n chat: 'in a chat',\n slack: 'in Slack',\n gateway: 'by the gateway',\n};\n\nfunction same(words: string): Words {\n return { desktop: words, phone: words };\n}\n\nfunction answersOf(count: number): string {\n return count === 1 ? '1 answer' : `${String(count)} answers`;\n}\n\n/** Names in a sentence: a, b and c. */\nfunction listOf(names: readonly string[]): string {\n return names.length <= 1 ? names.join('') : `${names.slice(0, -1).join(', ')} and ${names.at(-1) ?? ''}`;\n}\n\n/** Each asker once, in the order added. */\nfunction askersOf(entries: readonly BasketItem[]): string[] {\n return [...new Set(entries.map(({ from }) => from))];\n}\n\n/** The Send button, naming how many answers it sends. */\nexport function sendLabelOf(toSend: number): string {\n return `Send ${answersOf(toSend)}`;\n}\n\n/** The answer an entry gives, by its number and label (2. Harbour first, on today's look); a note alone as such. */\nexport function answerTextOf(item: Pick<BasketItem, 'option' | 'optionLabel'>): string {\n if (item.option === null) {\n return 'Note alone';\n }\n return item.optionLabel === null ? `Option ${String(item.option)}` : `${String(item.option)}. ${item.optionLabel}`;\n}\n\n/** Whether an entry is not sent, as its asker withdrew or replaced it or it was answered elsewhere first: struck out. */\nexport function isStruckOut(standing: Standing): boolean {\n return standing.kind === 'withdrawn' || standing.kind === 'replaced' || standing.kind === 'dealtElsewhere';\n}\n\n/** The line under one entry, given whether another entry was sent and whether this is the one being sent now. */\nfunction lineOf(item: BasketItem, context: { isAnySent: boolean; isSendingNow: boolean }): EntryLine | undefined {\n const { standing, from } = item;\n switch (standing.kind) {\n case 'waiting':\n return undefined;\n case 'sent': {\n const at = clockTimeOf(standing.at);\n return { icon: 'sent', tone: 'ok', words: { desktop: `Sent at ${at} and stored. Done.`, phone: `Sent at ${at}. Done.` } };\n }\n case 'sending':\n if (standing.isUnanswered) {\n 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.' } };\n }\n return context.isSendingNow ? { icon: 'sending', tone: 'waiting', words: same('Sending...') } : { icon: 'next', tone: 'waiting', words: { desktop: 'Next, in the order you added it', phone: 'Next' } };\n case 'refused': {\n const said = `Not sent: ${standing.reason}.`;\n // The phone says the reason without its consequence, as basket-7 draws it: Not sent: commercial was retired.\n const [cause = standing.reason] = standing.reason.split(', so ');\n return { icon: 'refused', tone: 'attention', words: { desktop: context.isAnySent ? `${said} The others were sent.` : said, phone: `Not sent: ${cause}.` } };\n }\n case 'withdrawn':\n return { icon: 'withdrawn', tone: 'off', words: { desktop: `Withdrawn by ${from} at ${clockTimeOf(standing.at)}. Not sent; Send skips it.`, phone: `Withdrawn by ${from}. Not sent.` } };\n case 'replaced': {\n const withTitle = standing.replacementTitle === null ? '.' : ` with \"${standing.replacementTitle}\"`;\n return { icon: 'replaced', tone: 'off', words: { desktop: `Replaced by ${from} at ${clockTimeOf(standing.at)}${withTitle} Not sent: its options differ, so answer the new one.`, phone: `Replaced by ${from}. Not sent.` } };\n }\n case 'dealtElsewhere':\n return { icon: 'elsewhere', tone: 'off', words: same(standing.option === null ? `Done ${PLACES[standing.place]}. Nothing is sent from it.` : `Answered ${PLACES[standing.place]}: option ${String(standing.option)}. Nothing is sent from it.`) };\n }\n}\n\n/** The line under each entry, in the order added: the first sending one the fleet has not left unanswered is the one being sent now, the others next. */\nexport function entryLinesOf(view: BasketView): (EntryLine | undefined)[] {\n const isAnySent = view.entries.some(({ standing }) => standing.kind === 'sent');\n const now = view.entries.find(({ standing }) => standing.kind === 'sending' && !standing.isUnanswered);\n return view.entries.map((item) => lineOf(item, { isAnySent, isSendingNow: item === now }));\n}\n\n/** The entries not sent, by kind, as the foot says them: The withdrawn and the replaced one are not sent. */\nfunction notSentOf(entries: readonly BasketItem[]): string | undefined {\n const counted = (kind: Standing['kind']) => entries.filter(({ standing }) => standing.kind === kind).length;\n const stale = (['withdrawn', 'replaced'] as const).map((kind) => ({ kind, count: counted(kind) })).filter(({ count }) => count > 0);\n const named = stale.map(({ kind, count }, index) => (count > 1 ? `the ${String(count)} ${kind}` : index === stale.length - 1 ? `the ${kind} one` : `the ${kind}`));\n const elsewhere = counted('dealtElsewhere');\n const all = elsewhere === 0 ? named : [...named, elsewhere === 1 ? 'the one answered elsewhere' : `the ${String(elsewhere)} answered elsewhere`];\n if (all.length === 0) {\n return undefined;\n }\n const sentence = listOf(all);\n const isOne = stale.reduce((sum, { count }) => sum + count, elsewhere) === 1;\n return `${sentence.charAt(0).toUpperCase()}${sentence.slice(1)} ${isOne ? 'is' : 'are'} not sent.`;\n}\n\n/** The foot while the basket waits for Send: the ships each receiving their own answer, or how many go and which are not sent. */\nfunction sendFootOf(view: BasketView): BasketFoot {\n const notSent = notSentOf(view.entries);\n const label = sendLabelOf(view.toSend);\n if (notSent !== undefined) {\n return { kind: 'send', words: { desktop: `${String(view.toSend)} to send. ${notSent}`, phone: notSent }, label };\n }\n const waiting = view.entries.filter(({ standing }) => standing.kind === 'waiting');\n const askers = askersOf(waiting);\n const receive = askers.length > 1 ? 'each receive their own answer' : waiting.length > 1 ? 'receives its own answer to each' : 'receives its own answer';\n return { kind: 'send', words: { desktop: `${listOf(askers)} ${receive}, as you, as if sent one by one.`, phone: 'Each asker receives its own answer.' }, label };\n}\n\n/** The basket's foot: Send while answers wait for it; Sending N of M while the send goes well; what came of it once one was not answered or refused. */\nexport function footOf(view: BasketView): BasketFoot {\n if (view.toSend > 0) {\n return sendFootOf(view);\n }\n const kinds = view.entries.map(({ standing }) => standing);\n const sent = kinds.filter(({ kind }) => kind === 'sent').length;\n const sending = kinds.filter(({ kind }) => kind === 'sending').length;\n const refused = kinds.filter(({ kind }) => kind === 'refused').length;\n const isAnyUnanswered = kinds.some((standing) => standing.kind === 'sending' && standing.isUnanswered);\n if (sending > 0 && refused === 0 && !isAnyUnanswered) {\n 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(sent + 1)} of ${String(sent + sending)}` };\n }\n if (sending === 0 && refused === 0) {\n return { kind: 'none' };\n }\n const part = (count: number, words: string) => (count === 0 ? [] : [`${String(count)} ${words}`]);\n return {\n kind: 'summary',\n words: {\n desktop: `${[...part(sent, 'sent'), ...part(sending, 'still sending'), ...part(refused, 'not sent')].join(', ')}.`,\n phone: `${[...part(sent, 'sent'), ...part(sending, 'sending'), ...part(refused, 'not sent')].join(', ')}.`,\n },\n };\n}\n\n/** What was sent, once every entry left in the basket was sent: how many answers, to which ships. */\nexport function sentSummaryOf(view: BasketView): { title: string; description: string } | undefined {\n const { entries } = view;\n if (entries.length === 0 || entries.some(({ standing }) => standing.kind !== 'sent')) {\n return undefined;\n }\n const to = `To ${listOf(askersOf(entries))}, as you;`;\n return { title: `${answersOf(entries.length)} sent`, description: entries.length === 1 ? `${to} stored, and in Done.` : `${to} each stored, each in Done.` };\n}\n"],"names":["ArrowRight"],"mappings":"qEGGO,CAAA,AEAA,ADAA,CCAA,AFAA,ACAA,CDAA,AEAA,ADAA,CCAA,AFAA,ACAA,ACAA,CDAA,ACAA,AFAA,CEAA,6CFIW,CAAA,ACAD,CDAC,ACAD,SDAa,IAAA,UAAe,GCAC,CAAA,wBDCX,CCAF,ADAE,CCAF,ADAE,EAAK,CCAF,ADAE,CCAF,ADAE,CAAA,ACAF,CDAE,ACAF,CAAA,ADAE,CAAA,IAAU,mBAoB/B,CAAA,ACAL,CAAA,ADAK,CCAL,ADAK,CAAA,ACAL,CDAK,ACAL,ADAK,CCAL,ADAK,CCAL,ADAK,CF1BnB,AE0BmB,ACAL,CAAA,ADAK,CCAL,ADAK,EF1BnB,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,YGC0C,MAClC,CAAA,ADAA,AEAA,CFAA,AEAA,ADAA,CCAA,AFAA,ACAA,CDAA,ACAA,ACAA,CAAA,AFAA,ACAA,CAAA,ADAA,AEAA,CFAA,ACAA,ACAA,CAAA,AFAA,CAAA,CAAA,CAAA,CAA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K,AAAS,YAAQ,MAAM,CACzD,EAAU,EAAM,MAAM,CAAC,CAAC,MAAE,CAAI,CAAE,GAAc,YAAT,GAAoB,MAAM,CAC/D,EAAU,EAAM,MAAM,CAAC,CAAC,MAAE,CAAI,CAAE,GAAc,YAAT,GAAoB,MAAM,CAC/D,EAAkB,EAAM,IAAI,CAAC,AAAC,GAA+B,YAAlB,EAAS,IAAI,EAAkB,EAAS,YAAY,EACrG,GAAI,EAAU,GAAiB,IAAZ,GAAiB,CAAC,EACnC,MAAO,CAAE,KAAM,GADqC,OAC1B,MAAO,CAAE,QAAS,6EAA8E,MAAO,kDAAmD,EAAG,SAAU,CAAC,QAAQ,EAAE,OAAO,EAAO,GAAG,IAAI,EAAE,OAAO,EAAO,GAAA,CAAU,AAAC,EAE9P,GAAgB,IAAZ,GAA6B,GAAG,CAAf,EACnB,MAAO,CAAE,KAAM,MAAO,EAExB,IAAM,EAAO,CAAC,EAAe,IAA6B,IAAV,EAAc,EAAE,CAAG,CAAC,CAAA,EAAG,OAAO,GAAO,CAAC,EAAE,EAAA,CAAO,CAAC,CAChG,MAAO,CACL,KAAM,UACN,MAAO,CACL,QAAS,CAAA,EAAG,IAAI,EAAK,EAAM,WAAY,EAAK,EAAS,oBAAqB,EAAK,EAAS,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAClH,MAAO,CAAA,EAAG,IAAI,EAAK,EAAM,WAAY,EAAK,EAAS,cAAe,EAAK,EAAS,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,AAC5G,CACF,CACF,ELgE0C,GAAS,UAAW,GAAS,OAAS,OAAQ,eAAuB,IAAZ,QAA+C,IAAtB,EAAQ,SAAS,CAAgB,OAAQ,WAOrK","ignoreList":[3,4,5]}
1
+ {"version":3,"sources":["../../../../../web/features/bridge/hooks/data%3A9c2fe5%20%3Ctext/javascript%3E","../../../../../web/features/bridge/state/basket-panel.tsx","../../../../../web/features/bridge/services/clock-time.ts","../../../../../node_modules/lucide-react/src/icons/arrow-right.ts","../../../../../node_modules/lucide-react/src/icons/clock.ts","../../../../../node_modules/lucide-react/src/icons/pencil.ts","../../../../../web/features/bridge/services/basket.ts"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"4006354f8379bf619098ee9df9d054aa021ed8dc89\":{\"name\":\"sendBasket\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_6=/*#__PURE__*/createServerReference(\"4006354f8379bf619098ee9df9d054aa021ed8dc89\",callServer,void 0,findSourceMapURL,\"sendBasket\");export{$$RSC_SERVER_ACTION_6 as sendBasket};","'use client';\n\nimport { ArrowRight, Ban, Check, CircleAlert, CircleCheck, CircleQuestionMark, Clock, LoaderCircle, Pencil, Replace, Send, ShoppingBasket, X } from 'lucide-react';\nimport { useState, useTransition } from 'react';\n\nimport { removeFromBasket, sendBasket } from '../hooks/bridge-actions';\nimport { answerTextOf, entryLinesOf, footOf, isStruckOut, sentSummaryOf, type BasketFoot, type BasketItem, type BasketView, type EntryLine, type Words } from '../services/basket';\nimport { clockTimeOf } from '../services/clock-time';\nimport { ActionButton } from '../ui/action-button';\nimport { Notice } from '../ui/notice';\nimport { ItemFocus, type ItemOpening } from './item-focus';\n\n/** What the person is doing in the basket: removing one entry, or sending it. */\ntype Working = { kind: 'remove'; questionId: string } | { kind: 'send' };\n\nconst LINE_ICONS = {\n sent: CircleCheck,\n sending: LoaderCircle,\n next: Clock,\n unanswered: LoaderCircle,\n refused: CircleAlert,\n withdrawn: Ban,\n replaced: Replace,\n elsewhere: Check,\n} as const;\n\nconst LINE_TONES = {\n ok: 'text-tone-ok-fg',\n waiting: 'text-tone-waiting-fg',\n attention: 'text-tone-attention-fg',\n off: 'text-muted-foreground',\n} as const;\n\n/** Words as the desktop says them, and shorter on a phone. */\nfunction Said({ words }: { words: Words }) {\n if (words.desktop === words.phone) {\n return <span>{words.desktop}</span>;\n }\n return (\n <>\n <span className=\"hidden sm:inline\">{words.desktop}</span>\n <span className=\"sm:hidden\">{words.phone}</span>\n </>\n );\n}\n\n/** The line under an entry, behind its icon in its tone. */\nfunction EntryLineSaid({ line }: { line: EntryLine }) {\n const Icon = LINE_ICONS[line.icon];\n return (\n <p data-testid=\"bridge-basket-standing\" className=\"col-span-2 col-start-2 flex items-start gap-1.5 text-meta\">\n <Icon aria-hidden className={`mt-0.5 size-3.5 shrink-0 ${LINE_TONES[line.tone]}`} />\n <span>\n <Said words={line.words} />\n </span>\n </p>\n );\n}\n\n/** One entry: the question, its asker and when it asked, its answer and note, the line saying how it stands, and what can be done with it. */\nfunction BasketEntryRow({ entry, line, opening, working, onRemove }: { entry: BasketItem; line: EntryLine | undefined; opening: ItemOpening; working: Working | undefined; onRemove: (questionId: string) => void }) {\n const { standing } = entry;\n const isStruck = isStruckOut(standing);\n const isWorking = working !== undefined || opening.openingId !== undefined;\n const isRemoving = working?.kind === 'remove' && working.questionId === entry.questionId;\n const replacementId = standing.kind === 'replaced' ? standing.replacementId : null;\n const struck = isStruck ? 'line-through decoration-muted-foreground' : '';\n return (\n <li data-testid=\"bridge-basket-entry\" data-standing={standing.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 ${isStruck ? 'bg-muted' : ''}`}>\n <CircleQuestionMark aria-hidden className=\"mt-0.5 size-4 text-tone-active-fg\" />\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n <span className={`font-medium ${struck}`}>{entry.title}</span>\n <span className=\"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground\">\n <span>\n to <b className=\"font-medium text-foreground\">{entry.from}</b>\n </span>\n <span aria-hidden className=\"hidden text-border sm:inline\">\n ·\n </span>\n <span className=\"hidden sm:inline\">\n asked at <time dateTime={entry.sentAt}>{clockTimeOf(entry.sentAt)}</time>\n </span>\n </span>\n <span className={`${isStruck ? 'hidden sm:flex' : 'flex'} items-center gap-1.5 text-meta ${struck}`}>\n <ArrowRight aria-hidden className=\"size-3.5 shrink-0 text-primary\" />\n {answerTextOf(entry)}\n </span>\n {entry.note === null ? null : <span className=\"text-caption italic text-muted-foreground\">&quot;{entry.note}&quot;</span>}\n </div>\n {standing.kind === 'waiting' ? (\n <div className=\"flex items-center gap-1.5\">\n <ActionButton data-testid=\"bridge-basket-change\" size=\"small\" aria-label=\"Change\" isPending={opening.openingId === entry.deliveryId} pendingLabel=\"Opening...\" disabled={isWorking} onClick={() => { opening.open({ deliveryId: entry.deliveryId, job: 'decide', inBasket: { option: entry.option, note: entry.note } }); }}>\n <Pencil aria-hidden className=\"size-3.5\" />\n <span className=\"hidden sm:inline\">Change</span>\n </ActionButton>\n <ActionButton data-testid=\"bridge-basket-remove\" size=\"small\" variant=\"ghost\" aria-label=\"Remove\" isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={() => { onRemove(entry.questionId); }}>\n <X aria-hidden className=\"size-4 sm:hidden\" />\n <span className=\"hidden sm:inline\">Remove</span>\n </ActionButton>\n </div>\n ) : (\n <span />\n )}\n {line === undefined ? null : <EntryLineSaid line={line} />}\n {opening.failure?.deliveryId === entry.deliveryId ? (\n <div className=\"col-span-2 col-start-2\">\n <Notice message={opening.failure.message} isFailure />\n </div>\n ) : null}\n {standing.kind === 'withdrawn' || standing.kind === 'replaced' || standing.kind === 'dealtElsewhere' || standing.kind === 'refused' ? (\n <div className=\"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5\">\n {replacementId === null ? null : (\n <ActionButton data-testid=\"bridge-replacement\" size=\"small\" isPending={opening.openingId === replacementId} pendingLabel=\"Opening...\" disabled={isWorking} onClick={() => { opening.open({ deliveryId: replacementId, job: 'decide' }); }}>\n <ArrowRight aria-hidden className=\"size-3.5\" />\n Answer the new question\n </ActionButton>\n )}\n <ActionButton data-testid=\"bridge-basket-remove\" size=\"small\" variant={standing.kind === 'replaced' ? 'ghost' : 'secondary'} isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={() => { onRemove(entry.questionId); }}>\n {standing.kind === 'refused' ? 'Remove and mark done' : 'Remove'}\n </ActionButton>\n </div>\n ) : null}\n </li>\n );\n}\n\n/** The foot of the basket: Send naming the ships, the send going on, or what came of it. */\nfunction BasketFootBar({ foot, isSending, isWorking, onSend }: { foot: BasketFoot; isSending: boolean; isWorking: boolean; onSend: () => void }) {\n if (foot.kind === 'none') {\n return null;\n }\n return (\n <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\">\n <p className=\"flex-1 text-caption text-muted-foreground\">\n <Said words={foot.words} />\n </p>\n {foot.kind === 'send' ? (\n <ActionButton data-testid=\"bridge-basket-send\" variant=\"primary\" className=\"justify-center\" isPending={isSending} pendingLabel=\"Sending...\" disabled={isWorking} onClick={onSend}>\n <Send aria-hidden className=\"size-4\" />\n {foot.label}\n </ActionButton>\n ) : null}\n {foot.kind === 'sending' ? (\n <button type=\"button\" data-testid=\"bridge-basket-sending\" disabled 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\">\n <LoaderCircle aria-hidden className=\"size-4 animate-spin\" />\n {foot.progress}\n </button>\n ) : null}\n </div>\n );\n}\n\n/** What was sent, over the empty basket, once every entry left was sent. */\nfunction SentSummary({ summary }: { summary: { title: string; description: string } }) {\n return (\n <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\">\n <CircleCheck aria-hidden className=\"mt-0.5 size-4 shrink-0 text-tone-ok-fg\" />\n <span className=\"grid gap-1\">\n <span className=\"font-medium\">{summary.title}</span>\n <span className=\"text-caption text-muted-foreground\">{summary.description}</span>\n </span>\n </div>\n );\n}\n\n/** The empty basket, with what goes into it. */\nfunction EmptyBasket() {\n return (\n <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\">\n <span className=\"inline-flex size-11 items-center justify-center rounded-lg bg-secondary text-muted-foreground\">\n <ShoppingBasket aria-hidden className=\"size-5\" />\n </span>\n <span className=\"text-heading font-semibold\">The basket is empty</span>\n <span className=\"max-w-[360px] text-muted-foreground\">Pick an option on a question and put it in the basket; it waits here until you send it.</span>\n </div>\n );\n}\n\n/**\n * The basket open (docs/design/bridge, section 9; basket.html, basket-3 to\n * basket-7): its count of what is or will be sent, and the answers the\n * person picked in Bridge, in the order added, each with its answer by\n * number and label. Change opens the question with that option picked;\n * Remove takes the entry out, and the question still waits; one the fleet\n * refused is removed and its question marked done. A withdrawn, replaced or\n * answered-elsewhere entry is struck out and not sent. Send N answers stores\n * each as sending and the gateway sends them, each on its own: each entry\n * then says how it goes, and the foot Sending N of M, or what came of the\n * send once one was not answered or refused. Once every entry left was\n * sent, what was sent stands over the empty basket.\n */\nexport function BasketPanel({ fleetId, basket }: { fleetId: string; basket: BasketView }) {\n const [working, setWorking] = useState<Working | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n const lines = entryLinesOf(basket);\n const summary = sentSummaryOf(basket);\n\n const remove = (questionId: string) => {\n setWorking({ kind: 'remove', questionId });\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await removeFromBasket(fleetId, questionId);\n setWorking(undefined);\n setFailure(outcome.isOk ? undefined : outcome.message);\n });\n };\n\n const send = () => {\n setWorking({ kind: 'send' });\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await sendBasket(fleetId);\n setWorking(undefined);\n setFailure(outcome.isOk ? undefined : outcome.message);\n });\n };\n\n return (\n <ItemFocus fleetId={fleetId}>\n {(opening) => (\n <section className=\"grid gap-4\" aria-labelledby=\"bridge-basket-heading\">\n <div className=\"hidden sm:block\">\n <h1 id=\"bridge-basket-heading\" className=\"text-heading font-semibold\">\n Basket <span data-testid=\"bridge-basket-count\" className=\"text-primary\">{basket.count}</span>\n </h1>\n <p className=\"text-caption text-muted-foreground\">Answers you picked in Bridge, not sent yet. Nothing goes until you press Send.</p>\n </div>\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n {summary === undefined ? null : <SentSummary summary={summary} />}\n {basket.entries.length === 0 || summary !== undefined ? (\n <EmptyBasket />\n ) : (\n <div className=\"max-w-[820px] overflow-hidden rounded-lg border border-border bg-card\">\n <ul>\n {basket.entries.map((entry, index) => (\n <BasketEntryRow key={entry.questionId} entry={entry} line={lines[index]} opening={opening} working={working} onRemove={remove} />\n ))}\n </ul>\n <BasketFootBar foot={footOf(basket)} isSending={working?.kind === 'send'} isWorking={working !== undefined || opening.openingId !== undefined} onSend={send} />\n </div>\n )}\n </section>\n )}\n </ItemFocus>\n );\n}\n","/** The time of day of an instant (ISO 8601), in UTC to the minute, as Bridge says when something happened: 20:16 UTC. */\nexport function clockTimeOf(at: string): string {\n return `${new Date(at).toISOString().slice(11, 16)} UTC`;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'arrow-right',\n size: 24,\n node: [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'm12 5 7 7-7 7', key: 'xquz4c' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name ArrowRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMmgxNCIgLz4KICA8cGF0aCBkPSJtMTIgNSA3IDctNyA3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/arrow-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ArrowRight = createLucideIcon(__iconData);\n\nexport default ArrowRight;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'clock',\n size: 24,\n node: [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M12 6v6l4 2', key: 'mmk7yg' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Clock\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTIgNnY2bDQgMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/clock\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Clock = createLucideIcon(__iconData);\n\nexport default Clock;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'pencil',\n size: 24,\n node: [\n [\n 'path',\n {\n 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',\n key: '1a8usu',\n },\n ],\n ['path', { d: 'm15 5 4 4', key: '1mk7zo' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Pencil\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuMTc0IDYuODEyYTEgMSAwIDAgMC0zLjk4Ni0zLjk4N0wzLjg0MiAxNi4xNzRhMiAyIDAgMCAwLS41LjgzbC0xLjMyMSA0LjM1MmEuNS41IDAgMCAwIC42MjMuNjIybDQuMzUzLTEuMzJhMiAyIDAgMCAwIC44My0uNDk3eiIgLz4KICA8cGF0aCBkPSJtMTUgNSA0IDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pencil\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Pencil = createLucideIcon(__iconData);\n\nexport default Pencil;\n","/**\n * The basket as Bridge shows it (docs/design/bridge, section 9; basket.html,\n * basket-3 to basket-7): each entry's answer, the line under it as it\n * stands, the foot naming the ships or saying how the send goes, and what\n * was sent, in words, each with its desktop and its shorter phone words.\n * Pure view logic, no React and no API client.\n */\nimport type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport { clockTimeOf } from './clock-time';\n\ntype PeopleOutputs = inferRouterOutputs<GatewayRouter>['people'];\n\n/** The basket as the API answers it: its entries in the order added, its count, and how many answers Send sends. */\nexport type BasketView = PeopleOutputs['basket'];\n\n/** An entry of the basket, with what it stands as. */\nexport type BasketItem = BasketView['entries'][number];\n\ntype Standing = BasketItem['standing'];\n\n/** What Send did, as the API answers it. */\nexport type BasketSent = PeopleOutputs['sendBasket'];\n\n/** Words as a desktop says them, and as a phone says them, shorter. */\nexport interface Words {\n readonly desktop: string;\n readonly phone: string;\n}\n\n/** The line under an entry: its icon, the tone of the icon, and its words. */\nexport interface EntryLine {\n readonly icon: 'sent' | 'sending' | 'next' | 'unanswered' | 'refused' | 'withdrawn' | 'replaced' | 'elsewhere';\n readonly tone: 'ok' | 'waiting' | 'attention' | 'off';\n readonly words: Words;\n}\n\n/** The basket's foot: Send naming the ships, the send going on, what came of it, or none. */\nexport type BasketFoot = { readonly kind: 'send'; readonly words: Words; readonly label: string } | { readonly kind: 'sending'; readonly words: Words; readonly progress: string } | { readonly kind: 'summary'; readonly words: Words } | { readonly kind: 'none' };\n\nconst PLACES: Record<Extract<Standing, { kind: 'dealtElsewhere' }>['place'], string> = {\n bridge: 'in Bridge',\n chat: 'in a chat',\n slack: 'in Slack',\n gateway: 'by the gateway',\n};\n\nfunction same(words: string): Words {\n return { desktop: words, phone: words };\n}\n\nfunction answersOf(count: number): string {\n return count === 1 ? '1 answer' : `${String(count)} answers`;\n}\n\n/** Names in a sentence: a, b and c. */\nfunction listOf(names: readonly string[]): string {\n return names.length <= 1 ? names.join('') : `${names.slice(0, -1).join(', ')} and ${names.at(-1) ?? ''}`;\n}\n\n/** Each asker once, in the order added. */\nfunction askersOf(entries: readonly BasketItem[]): string[] {\n return [...new Set(entries.map(({ from }) => from))];\n}\n\n/** The Send button, naming how many answers it sends. */\nexport function sendLabelOf(toSend: number): string {\n return `Send ${answersOf(toSend)}`;\n}\n\n/** The answer an entry gives, by its number and label (2. Harbour first, on today's look); a note alone as such. */\nexport function answerTextOf(item: Pick<BasketItem, 'option' | 'optionLabel'>): string {\n if (item.option === null) {\n return 'Note alone';\n }\n return item.optionLabel === null ? `Option ${String(item.option)}` : `${String(item.option)}. ${item.optionLabel}`;\n}\n\n/** Whether an entry is not sent, as its asker withdrew or replaced it or it was answered elsewhere first: struck out. */\nexport function isStruckOut(standing: Standing): boolean {\n return standing.kind === 'withdrawn' || standing.kind === 'replaced' || standing.kind === 'dealtElsewhere';\n}\n\n/** The line under one entry, given whether another entry was sent and whether this is the one being sent now. */\nfunction lineOf(item: BasketItem, context: { isAnySent: boolean; isSendingNow: boolean }): EntryLine | undefined {\n const { standing, from } = item;\n switch (standing.kind) {\n case 'waiting':\n return undefined;\n case 'sent': {\n const at = clockTimeOf(standing.at);\n return { icon: 'sent', tone: 'ok', words: { desktop: `Sent at ${at} and stored. Done.`, phone: `Sent at ${at}. Done.` } };\n }\n case 'sending':\n if (standing.isUnanswered) {\n 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.' } };\n }\n return context.isSendingNow ? { icon: 'sending', tone: 'waiting', words: same('Sending...') } : { icon: 'next', tone: 'waiting', words: { desktop: 'Next, in the order you added it', phone: 'Next' } };\n case 'refused': {\n const said = `Not sent: ${standing.reason}.`;\n // The phone says the reason without its consequence, as basket-7 draws it: Not sent: commercial was retired.\n const [cause = standing.reason] = standing.reason.split(', so ');\n return { icon: 'refused', tone: 'attention', words: { desktop: context.isAnySent ? `${said} The others were sent.` : said, phone: `Not sent: ${cause}.` } };\n }\n case 'withdrawn':\n return { icon: 'withdrawn', tone: 'off', words: { desktop: `Withdrawn by ${from} at ${clockTimeOf(standing.at)}. Not sent; Send skips it.`, phone: `Withdrawn by ${from}. Not sent.` } };\n case 'replaced': {\n const withTitle = standing.replacementTitle === null ? '.' : ` with \"${standing.replacementTitle}\"`;\n return { icon: 'replaced', tone: 'off', words: { desktop: `Replaced by ${from} at ${clockTimeOf(standing.at)}${withTitle} Not sent: its options differ, so answer the new one.`, phone: `Replaced by ${from}. Not sent.` } };\n }\n case 'dealtElsewhere':\n return { icon: 'elsewhere', tone: 'off', words: same(standing.option === null ? `Done ${PLACES[standing.place]}. Nothing is sent from it.` : `Answered ${PLACES[standing.place]}: option ${String(standing.option)}. Nothing is sent from it.`) };\n }\n}\n\n/** The line under each entry, in the order added: the first sending one the fleet has not left unanswered is the one being sent now, the others next. */\nexport function entryLinesOf(view: BasketView): (EntryLine | undefined)[] {\n const isAnySent = view.entries.some(({ standing }) => standing.kind === 'sent');\n const now = view.entries.find(({ standing }) => standing.kind === 'sending' && !standing.isUnanswered);\n return view.entries.map((item) => lineOf(item, { isAnySent, isSendingNow: item === now }));\n}\n\n/** The entries not sent, by kind, as the foot says them: The withdrawn and the replaced one are not sent. */\nfunction notSentOf(entries: readonly BasketItem[]): string | undefined {\n const counted = (kind: Standing['kind']) => entries.filter(({ standing }) => standing.kind === kind).length;\n const stale = (['withdrawn', 'replaced'] as const).map((kind) => ({ kind, count: counted(kind) })).filter(({ count }) => count > 0);\n const named = stale.map(({ kind, count }, index) => (count > 1 ? `the ${String(count)} ${kind}` : index === stale.length - 1 ? `the ${kind} one` : `the ${kind}`));\n const elsewhere = counted('dealtElsewhere');\n const all = elsewhere === 0 ? named : [...named, elsewhere === 1 ? 'the one answered elsewhere' : `the ${String(elsewhere)} answered elsewhere`];\n if (all.length === 0) {\n return undefined;\n }\n const sentence = listOf(all);\n const isOne = stale.reduce((sum, { count }) => sum + count, elsewhere) === 1;\n return `${sentence.charAt(0).toUpperCase()}${sentence.slice(1)} ${isOne ? 'is' : 'are'} not sent.`;\n}\n\n/** The foot while the basket waits for Send: the ships each receiving their own answer, or how many go and which are not sent. */\nfunction sendFootOf(view: BasketView): BasketFoot {\n const notSent = notSentOf(view.entries);\n const label = sendLabelOf(view.toSend);\n if (notSent !== undefined) {\n return { kind: 'send', words: { desktop: `${String(view.toSend)} to send. ${notSent}`, phone: notSent }, label };\n }\n const waiting = view.entries.filter(({ standing }) => standing.kind === 'waiting');\n const askers = askersOf(waiting);\n const receive = askers.length > 1 ? 'each receive their own answer' : waiting.length > 1 ? 'receives its own answer to each' : 'receives its own answer';\n return { kind: 'send', words: { desktop: `${listOf(askers)} ${receive}, as you, as if sent one by one.`, phone: 'Each asker receives its own answer.' }, label };\n}\n\n/** The basket's foot: Send while answers wait for it; Sending N of M while the send goes well; what came of it once one was not answered or refused. */\nexport function footOf(view: BasketView): BasketFoot {\n if (view.toSend > 0) {\n return sendFootOf(view);\n }\n const kinds = view.entries.map(({ standing }) => standing);\n const sent = kinds.filter(({ kind }) => kind === 'sent').length;\n const sending = kinds.filter(({ kind }) => kind === 'sending').length;\n const refused = kinds.filter(({ kind }) => kind === 'refused').length;\n const isAnyUnanswered = kinds.some((standing) => standing.kind === 'sending' && standing.isUnanswered);\n if (sending > 0 && refused === 0 && !isAnyUnanswered) {\n 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(sent + 1)} of ${String(sent + sending)}` };\n }\n if (sending === 0 && refused === 0) {\n return { kind: 'none' };\n }\n const part = (count: number, words: string) => (count === 0 ? [] : [`${String(count)} ${words}`]);\n return {\n kind: 'summary',\n words: {\n desktop: `${[...part(sent, 'sent'), ...part(sending, 'still sending'), ...part(refused, 'not sent')].join(', ')}.`,\n phone: `${[...part(sent, 'sent'), ...part(sending, 'sending'), ...part(refused, 'not sent')].join(', ')}.`,\n },\n };\n}\n\n/** What was sent, once every entry left in the basket was sent: how many answers, to which ships. */\nexport function sentSummaryOf(view: BasketView): { title: string; description: string } | undefined {\n const { entries } = view;\n if (entries.length === 0 || entries.some(({ standing }) => standing.kind !== 'sent')) {\n return undefined;\n }\n const to = `To ${listOf(askersOf(entries))}, as you;`;\n return { title: `${answersOf(entries.length)} sent`, description: entries.length === 1 ? `${to} stored, and in Done.` : `${to} each stored, each in Done.` };\n}\n"],"names":["ArrowRight"],"mappings":"qEGGO,CAAA,AEAA,ADAA,CCAA,AFAA,ACAA,CDAA,AEAA,ADAA,CCAA,AFAA,ACAA,ACAA,CDAA,ACAA,AFAA,CEAA,6CFIW,CAAA,ACAD,CDAC,ACAD,SDAa,IAAA,UAAe,GCAC,CAAA,wBDCX,CCAF,ADAE,CCAF,ADAE,EAAK,CCAF,ADAE,CCAF,ADAE,CAAA,ACAF,CDAE,ACAF,CAAA,ADAE,CAAA,IAAU,mBAoB/B,CAAA,ACAL,CAAA,ADAK,CCAL,ADAK,CAAA,ACAL,CDAK,ACAL,ADAK,CCAL,ADAK,CCAL,ADAK,CF1BnB,AE0BmB,ACAL,CAAA,ADAK,CCAL,ADAK,EF1BnB,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,YGC0C,MAClC,CAAA,ADAA,AEAA,CFAA,AEAA,ADAA,CCAA,AFAA,ACAA,CDAA,ACAA,ACAA,CAAA,AFAA,ACAA,CAAA,ADAA,AEAA,C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0,e.createServerReference)("407ec5a94e3e5f5383c309c1ce9ea498eafeded2c3",e.callServer,void 0,e.findSourceMapURL,"decideRequest");var g=a.i(16550),h=a.i(51636),i=a.i(35149);let j=["messages:send","messages:receive"],k={"messages:send":"Send","messages:receive":"Receive","fleet:read":"Read the fleet"};var l=a.i(32043),m=a.i(10039);let n="rounded-md border border-input bg-background px-2 py-1.5";function o({scope:a,isLocked:c}){return(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[c?(0,b.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,"aria-label":k[a]??a}):(0,b.jsx)("input",{type:"checkbox",name:"scope",value:a,"aria-label":k[a]??a}),(0,b.jsx)("span",{children:k[a]??a}),(0,b.jsx)("span",{className:"font-mono text-caption text-muted-foreground",children:a}),c?(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:"(always)"}):null]})}function p(a,b){let c=a.get(b);return"string"==typeof c?c:""}function q({request:a,heldScopes:c,owners:e,working:f,failure:g,onDecide:k}){let[r,s]=(0,d.useState)("bearer"),t=function(a){switch(a.subject.kind){case"client":return a.subject.clientName;case"server":return URL.canParse(a.subject.url)?new URL(a.subject.url).host:a.subject.url}}(a),u="server"===a.subject.kind;return(0,b.jsxs)("section",{className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,b.jsxs)("h2",{className:"text-heading font-semibold",children:["Approve ",t]}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault();let b=new FormData(a.currentTarget),c=b.getAll("scope").filter(a=>"string"==typeof a);k({kind:"approve",name:p(b,"name"),ownerShipId:p(b,"ownerShipId"),scopes:c,server:u?{credentialKind:(0,h.C)(p(b,"credentialKind")),token:p(b,"token"),clientId:p(b,"clientId"),clientSecret:p(b,"clientSecret"),issuer:p(b,"issuer"),scope:p(b,"scope-requested"),concurrencyLimit:Number(p(b,"concurrencyLimit"))}:void 0})},className:"grid gap-3",children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Proxy ship's name"}),(0,b.jsx)("input",{name:"name",defaultValue:t.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,""),required:!0,className:n})]}),(0,b.jsx)(i.f,{choices:e.isOk?e.value:[],current:null,help:"A person ship or argo. It answers for this party.",refusal:e.isOk?void 0:e.refusal}),(0,b.jsxs)("fieldset",{className:"grid gap-1",children:[(0,b.jsx)("legend",{children:"Scopes"}),j.map(a=>(0,b.jsx)(o,{scope:a,isLocked:!0},a)),c.filter(a=>!j.includes(a)).map(a=>(0,b.jsx)(o,{scope:a,isLocked:!1},a))]}),u?(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{children:"The server's credential"}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Credential"}),(0,b.jsx)("select",{name:"credentialKind",value:r,onChange:a=>{s((0,h.C)(a.target.value))},className:n,children:h.x.map(({kind:a,label:c})=>(0,b.jsx)("option",{value:a,children:c},a))})]}),"none"===r?null:"bearer"===r?(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Bearer token"}),(0,b.jsx)("input",{type:"password",name:"token",className:n})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Client id"}),(0,b.jsx)("input",{name:"clientId",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Client secret"}),(0,b.jsx)("input",{type:"password",name:"clientSecret",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Issuer"}),(0,b.jsx)("input",{type:"url",name:"issuer",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Scope"}),(0,b.jsx)("input",{name:"scope-requested",className:n})]})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Calls at once"}),(0,b.jsx)("input",{type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:4,className:n})]})]}):null,void 0===g?null:(0,b.jsx)(m.f,{message:g,isFailure:!0}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(l.i,{type:"submit",variant:"primary","data-testid":"bridge-approve",isPending:"approve"===f,pendingLabel:"Approving...",disabled:void 0!==f,children:"Approve"}),(0,b.jsx)(l.i,{type:"button","data-testid":"bridge-deny",isPending:"deny"===f,pendingLabel:"Denying...",disabled:void 0!==f,onClick:()=>{k({kind:"deny"})},children:"Deny"})]})]})]})}a.s(["DecisionPanel",0,function({fleetId:a,request:e,heldScopes:h,owners:i}){let j=(0,c.useRouter)(),[k,l]=(0,d.useState)(),[m,n]=(0,d.useState)(),[,o]=(0,d.useTransition)();return(0,b.jsx)(q,{request:e,heldScopes:h,owners:i,working:k,failure:m,onDecide:b=>{l(b.kind),n(void 0),o(async()=>{let c=await f({fleet:a,requestId:e.requestId,input:b});c.isOk?j.push(`${g.T}?${new URLSearchParams({fleet:a,decided:b.kind}).toString()}`):(l(void 0),n(c.message))})}})}],20298)}];
1
+ module.exports=[20298,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(5050);let f=(0,e.createServerReference)("400f35eac74c153e6bb2ce4504da9237c9f8088cf0",e.callServer,void 0,e.findSourceMapURL,"decideRequest");var g=a.i(16550),h=a.i(51636),i=a.i(35149);let j=["messages:send","messages:receive"],k={"messages:send":"Send","messages:receive":"Receive","fleet:read":"Read the fleet"};var l=a.i(32043),m=a.i(10039);let n="rounded-md border border-input bg-background px-2 py-1.5";function o({scope:a,isLocked:c}){return(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[c?(0,b.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,"aria-label":k[a]??a}):(0,b.jsx)("input",{type:"checkbox",name:"scope",value:a,"aria-label":k[a]??a}),(0,b.jsx)("span",{children:k[a]??a}),(0,b.jsx)("span",{className:"font-mono text-caption text-muted-foreground",children:a}),c?(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:"(always)"}):null]})}function p(a,b){let c=a.get(b);return"string"==typeof c?c:""}function q({request:a,heldScopes:c,owners:e,working:f,failure:g,onDecide:k}){let[r,s]=(0,d.useState)("bearer"),t=function(a){switch(a.subject.kind){case"client":return a.subject.clientName;case"server":return URL.canParse(a.subject.url)?new URL(a.subject.url).host:a.subject.url}}(a),u="server"===a.subject.kind;return(0,b.jsxs)("section",{className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,b.jsxs)("h2",{className:"text-heading font-semibold",children:["Approve ",t]}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault();let b=new FormData(a.currentTarget),c=b.getAll("scope").filter(a=>"string"==typeof a);k({kind:"approve",name:p(b,"name"),ownerShipId:p(b,"ownerShipId"),scopes:c,server:u?{credentialKind:(0,h.C)(p(b,"credentialKind")),token:p(b,"token"),clientId:p(b,"clientId"),clientSecret:p(b,"clientSecret"),issuer:p(b,"issuer"),scope:p(b,"scope-requested"),concurrencyLimit:Number(p(b,"concurrencyLimit"))}:void 0})},className:"grid gap-3",children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Proxy ship's name"}),(0,b.jsx)("input",{name:"name",defaultValue:t.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,""),required:!0,className:n})]}),(0,b.jsx)(i.f,{choices:e.isOk?e.value:[],current:null,help:"A person ship or argo. It answers for this party.",refusal:e.isOk?void 0:e.refusal}),(0,b.jsxs)("fieldset",{className:"grid gap-1",children:[(0,b.jsx)("legend",{children:"Scopes"}),j.map(a=>(0,b.jsx)(o,{scope:a,isLocked:!0},a)),c.filter(a=>!j.includes(a)).map(a=>(0,b.jsx)(o,{scope:a,isLocked:!1},a))]}),u?(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{children:"The server's credential"}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Credential"}),(0,b.jsx)("select",{name:"credentialKind",value:r,onChange:a=>{s((0,h.C)(a.target.value))},className:n,children:h.x.map(({kind:a,label:c})=>(0,b.jsx)("option",{value:a,children:c},a))})]}),"none"===r?null:"bearer"===r?(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Bearer token"}),(0,b.jsx)("input",{type:"password",name:"token",className:n})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Client id"}),(0,b.jsx)("input",{name:"clientId",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Client secret"}),(0,b.jsx)("input",{type:"password",name:"clientSecret",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Issuer"}),(0,b.jsx)("input",{type:"url",name:"issuer",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Scope"}),(0,b.jsx)("input",{name:"scope-requested",className:n})]})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Calls at once"}),(0,b.jsx)("input",{type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:4,className:n})]})]}):null,void 0===g?null:(0,b.jsx)(m.f,{message:g,isFailure:!0}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(l.i,{type:"submit",variant:"primary","data-testid":"bridge-approve",isPending:"approve"===f,pendingLabel:"Approving...",disabled:void 0!==f,children:"Approve"}),(0,b.jsx)(l.i,{type:"button","data-testid":"bridge-deny",isPending:"deny"===f,pendingLabel:"Denying...",disabled:void 0!==f,onClick:()=>{k({kind:"deny"})},children:"Deny"})]})]})]})}a.s(["DecisionPanel",0,function({fleetId:a,request:e,heldScopes:h,owners:i}){let j=(0,c.useRouter)(),[k,l]=(0,d.useState)(),[m,n]=(0,d.useState)(),[,o]=(0,d.useTransition)();return(0,b.jsx)(q,{request:e,heldScopes:h,owners:i,working:k,failure:m,onDecide:b=>{l(b.kind),n(void 0),o(async()=>{let c=await f({fleet:a,requestId:e.requestId,input:b});c.isOk?j.push(`${g.T}?${new URLSearchParams({fleet:a,decided:b.kind}).toString()}`):(l(void 0),n(c.message))})}})}],20298)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js.map