@rubytech/create-realagent-code 0.1.574 → 0.1.576

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 (800) hide show
  1. package/dist/__tests__/preserve-house-cloudflare.test.js +2 -72
  2. package/dist/index.js +8 -45
  3. package/dist/preserve-house-cloudflare.js +2 -49
  4. package/package.json +1 -1
  5. package/payload/platform/lib/canonical-instant/dist/index.d.ts +57 -0
  6. package/payload/platform/lib/canonical-instant/dist/index.d.ts.map +1 -0
  7. package/payload/platform/lib/canonical-instant/dist/index.js +139 -0
  8. package/payload/platform/lib/canonical-instant/dist/index.js.map +1 -0
  9. package/payload/platform/lib/canonical-instant/src/__tests__/normalise-instant.test.ts +158 -0
  10. package/payload/platform/lib/canonical-instant/src/index.ts +147 -0
  11. package/payload/platform/lib/canonical-instant/tsconfig.json +9 -0
  12. package/payload/platform/lib/canonical-instant/vitest.config.ts +9 -0
  13. package/payload/platform/lib/dispatch-read/dist/geo.d.ts +34 -0
  14. package/payload/platform/lib/dispatch-read/dist/geo.d.ts.map +1 -0
  15. package/payload/platform/lib/dispatch-read/dist/geo.js +27 -0
  16. package/payload/platform/lib/dispatch-read/dist/geo.js.map +1 -0
  17. package/payload/platform/lib/dispatch-read/dist/index.d.ts +6 -2
  18. package/payload/platform/lib/dispatch-read/dist/index.d.ts.map +1 -1
  19. package/payload/platform/lib/dispatch-read/dist/index.js +21 -1
  20. package/payload/platform/lib/dispatch-read/dist/index.js.map +1 -1
  21. package/payload/platform/lib/dispatch-read/dist/keyboard.d.ts +66 -0
  22. package/payload/platform/lib/dispatch-read/dist/keyboard.d.ts.map +1 -0
  23. package/payload/platform/lib/dispatch-read/dist/keyboard.js +64 -0
  24. package/payload/platform/lib/dispatch-read/dist/keyboard.js.map +1 -0
  25. package/payload/platform/lib/dispatch-read/dist/read.d.ts +144 -9
  26. package/payload/platform/lib/dispatch-read/dist/read.d.ts.map +1 -1
  27. package/payload/platform/lib/dispatch-read/dist/read.js +437 -118
  28. package/payload/platform/lib/dispatch-read/dist/read.js.map +1 -1
  29. package/payload/platform/lib/dispatch-read/dist/types.d.ts +80 -11
  30. package/payload/platform/lib/dispatch-read/dist/types.d.ts.map +1 -1
  31. package/payload/platform/lib/dispatch-read/src/__tests__/geo.test.ts +86 -0
  32. package/payload/platform/lib/dispatch-read/src/__tests__/keyboard.test.ts +124 -0
  33. package/payload/platform/lib/dispatch-read/src/__tests__/previous-visit.test.ts +98 -0
  34. package/payload/platform/lib/dispatch-read/src/__tests__/read.test.ts +107 -8
  35. package/payload/platform/lib/dispatch-read/src/__tests__/worker-day.test.ts +215 -10
  36. package/payload/platform/lib/dispatch-read/src/geo.ts +56 -0
  37. package/payload/platform/lib/dispatch-read/src/index.ts +25 -1
  38. package/payload/platform/lib/dispatch-read/src/keyboard.ts +98 -0
  39. package/payload/platform/lib/dispatch-read/src/read.ts +522 -119
  40. package/payload/platform/lib/dispatch-read/src/types.ts +83 -11
  41. package/payload/platform/lib/dispatch-write/dist/write.d.ts +14 -0
  42. package/payload/platform/lib/dispatch-write/dist/write.d.ts.map +1 -1
  43. package/payload/platform/lib/dispatch-write/dist/write.js +50 -11
  44. package/payload/platform/lib/dispatch-write/dist/write.js.map +1 -1
  45. package/payload/platform/lib/dispatch-write/src/__tests__/write.test.ts +72 -2
  46. package/payload/platform/lib/dispatch-write/src/write.ts +79 -14
  47. package/payload/platform/neo4j/schema.cypher +66 -1
  48. package/payload/platform/package.json +2 -2
  49. package/payload/platform/plugins/admin/PLUGIN.md +3 -0
  50. package/payload/platform/plugins/admin/hooks/__tests__/fs-schema-guard-bash.test.sh +106 -0
  51. package/payload/platform/plugins/admin/hooks/__tests__/fs-schema-guard.test.sh +66 -0
  52. package/payload/platform/plugins/admin/hooks/fs-schema-guard-bash-post.sh +85 -12
  53. package/payload/platform/plugins/admin/hooks/fs-schema-guard.sh +18 -0
  54. package/payload/platform/plugins/admin/mcp/dist/index.js +2 -2
  55. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  56. package/payload/platform/plugins/admin/skills/admin-user-management/SKILL.md +10 -11
  57. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +106 -36
  58. package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +12 -0
  59. package/payload/platform/plugins/cloudflare/mcp/__tests__/portal-visits-scope.test.ts +130 -1
  60. package/payload/platform/plugins/cloudflare/skills/data-portal/schema.sql +63 -0
  61. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/visits.ts +104 -3
  62. package/payload/platform/plugins/dispatch/.claude-plugin/plugin.json +1 -1
  63. package/payload/platform/plugins/dispatch/PLUGIN.md +49 -6
  64. package/payload/platform/plugins/dispatch/mcp/dist/index.js +200 -2
  65. package/payload/platform/plugins/dispatch/mcp/dist/index.js.map +1 -1
  66. package/payload/platform/plugins/dispatch/mcp/dist/lib/allocate.d.ts +22 -4
  67. package/payload/platform/plugins/dispatch/mcp/dist/lib/allocate.d.ts.map +1 -1
  68. package/payload/platform/plugins/dispatch/mcp/dist/lib/allocate.js +4 -0
  69. package/payload/platform/plugins/dispatch/mcp/dist/lib/allocate.js.map +1 -1
  70. package/payload/platform/plugins/dispatch/mcp/dist/lib/bot-token.d.ts +10 -0
  71. package/payload/platform/plugins/dispatch/mcp/dist/lib/bot-token.d.ts.map +1 -0
  72. package/payload/platform/plugins/dispatch/mcp/dist/lib/bot-token.js +47 -0
  73. package/payload/platform/plugins/dispatch/mcp/dist/lib/bot-token.js.map +1 -0
  74. package/payload/platform/plugins/dispatch/mcp/dist/lib/config.d.ts.map +1 -1
  75. package/payload/platform/plugins/dispatch/mcp/dist/lib/config.js +12 -0
  76. package/payload/platform/plugins/dispatch/mcp/dist/lib/config.js.map +1 -1
  77. package/payload/platform/plugins/dispatch/mcp/dist/lib/ids.d.ts +1 -0
  78. package/payload/platform/plugins/dispatch/mcp/dist/lib/ids.d.ts.map +1 -1
  79. package/payload/platform/plugins/dispatch/mcp/dist/lib/ids.js +1 -0
  80. package/payload/platform/plugins/dispatch/mcp/dist/lib/ids.js.map +1 -1
  81. package/payload/platform/plugins/dispatch/mcp/dist/lib/intake.d.ts +36 -0
  82. package/payload/platform/plugins/dispatch/mcp/dist/lib/intake.d.ts.map +1 -0
  83. package/payload/platform/plugins/dispatch/mcp/dist/lib/intake.js +36 -0
  84. package/payload/platform/plugins/dispatch/mcp/dist/lib/intake.js.map +1 -0
  85. package/payload/platform/plugins/dispatch/mcp/dist/lib/keyboard.d.ts +11 -0
  86. package/payload/platform/plugins/dispatch/mcp/dist/lib/keyboard.d.ts.map +1 -0
  87. package/payload/platform/plugins/dispatch/mcp/dist/lib/keyboard.js +10 -0
  88. package/payload/platform/plugins/dispatch/mcp/dist/lib/keyboard.js.map +1 -0
  89. package/payload/platform/plugins/dispatch/mcp/dist/lib/read.d.ts +2 -2
  90. package/payload/platform/plugins/dispatch/mcp/dist/lib/read.d.ts.map +1 -1
  91. package/payload/platform/plugins/dispatch/mcp/dist/lib/read.js +9 -1
  92. package/payload/platform/plugins/dispatch/mcp/dist/lib/read.js.map +1 -1
  93. package/payload/platform/plugins/dispatch/mcp/dist/lib/travel.d.ts +43 -0
  94. package/payload/platform/plugins/dispatch/mcp/dist/lib/travel.d.ts.map +1 -0
  95. package/payload/platform/plugins/dispatch/mcp/dist/lib/travel.js +53 -0
  96. package/payload/platform/plugins/dispatch/mcp/dist/lib/travel.js.map +1 -0
  97. package/payload/platform/plugins/dispatch/mcp/dist/lib/types.d.ts +13 -2
  98. package/payload/platform/plugins/dispatch/mcp/dist/lib/types.d.ts.map +1 -1
  99. package/payload/platform/plugins/dispatch/mcp/dist/scripts/converge-visit-instants.d.ts +6 -0
  100. package/payload/platform/plugins/dispatch/mcp/dist/scripts/converge-visit-instants.d.ts.map +1 -0
  101. package/payload/platform/plugins/dispatch/mcp/dist/scripts/converge-visit-instants.js +102 -0
  102. package/payload/platform/plugins/dispatch/mcp/dist/scripts/converge-visit-instants.js.map +1 -0
  103. package/payload/platform/plugins/dispatch/mcp/dist/tools/allocate.d.ts +18 -0
  104. package/payload/platform/plugins/dispatch/mcp/dist/tools/allocate.d.ts.map +1 -1
  105. package/payload/platform/plugins/dispatch/mcp/dist/tools/allocate.js +251 -40
  106. package/payload/platform/plugins/dispatch/mcp/dist/tools/allocate.js.map +1 -1
  107. package/payload/platform/plugins/dispatch/mcp/dist/tools/intake.d.ts +75 -0
  108. package/payload/platform/plugins/dispatch/mcp/dist/tools/intake.d.ts.map +1 -0
  109. package/payload/platform/plugins/dispatch/mcp/dist/tools/intake.js +194 -0
  110. package/payload/platform/plugins/dispatch/mcp/dist/tools/intake.js.map +1 -0
  111. package/payload/platform/plugins/dispatch/mcp/dist/tools/notify-worker.d.ts +61 -0
  112. package/payload/platform/plugins/dispatch/mcp/dist/tools/notify-worker.d.ts.map +1 -0
  113. package/payload/platform/plugins/dispatch/mcp/dist/tools/notify-worker.js +130 -0
  114. package/payload/platform/plugins/dispatch/mcp/dist/tools/notify-worker.js.map +1 -0
  115. package/payload/platform/plugins/dispatch/mcp/dist/tools/site-location-set.d.ts +28 -0
  116. package/payload/platform/plugins/dispatch/mcp/dist/tools/site-location-set.d.ts.map +1 -0
  117. package/payload/platform/plugins/dispatch/mcp/dist/tools/site-location-set.js +44 -0
  118. package/payload/platform/plugins/dispatch/mcp/dist/tools/site-location-set.js.map +1 -0
  119. package/payload/platform/plugins/dispatch/mcp/dist/tools/site-upsert.d.ts +43 -0
  120. package/payload/platform/plugins/dispatch/mcp/dist/tools/site-upsert.d.ts.map +1 -0
  121. package/payload/platform/plugins/dispatch/mcp/dist/tools/site-upsert.js +139 -0
  122. package/payload/platform/plugins/dispatch/mcp/dist/tools/site-upsert.js.map +1 -0
  123. package/payload/platform/plugins/dispatch/skills/dispatch-page/SKILL.md +85 -0
  124. package/payload/platform/plugins/dispatch/skills/dispatch-page/template/planner.css +97 -0
  125. package/payload/platform/plugins/dispatch/skills/dispatch-page/template/planner.html +59 -0
  126. package/payload/platform/plugins/dispatch/skills/dispatch-page/template/planner.js +343 -0
  127. package/payload/platform/plugins/dispatch/skills/dispatch-setup/SKILL.md +9 -4
  128. package/payload/platform/plugins/docs/references/channel-wake-and-prompt.md +11 -20
  129. package/payload/platform/plugins/docs/references/dispatch.md +94 -15
  130. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/dispatch-vertical-coverage.test.js +4 -1
  131. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/dispatch-vertical-coverage.test.js.map +1 -1
  132. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relationship-patterns.test.js +24 -1
  133. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relationship-patterns.test.js.map +1 -1
  134. package/payload/platform/plugins/memory/references/schema-dispatch.md +70 -4
  135. package/payload/platform/plugins/scheduling/mcp/dist/lib/time-format.d.ts +2 -35
  136. package/payload/platform/plugins/scheduling/mcp/dist/lib/time-format.d.ts.map +1 -1
  137. package/payload/platform/plugins/scheduling/mcp/dist/lib/time-format.js +6 -114
  138. package/payload/platform/plugins/scheduling/mcp/dist/lib/time-format.js.map +1 -1
  139. package/payload/platform/plugins/scheduling/mcp/dist/scripts/converge-startdate-utc.d.ts +1 -1
  140. package/payload/platform/plugins/scheduling/mcp/dist/scripts/converge-startdate-utc.js +3 -3
  141. package/payload/platform/plugins/scheduling/mcp/dist/scripts/converge-startdate-utc.js.map +1 -1
  142. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js +2 -2
  143. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js.map +1 -1
  144. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.js +3 -3
  145. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.js.map +1 -1
  146. package/payload/platform/services/claude-session-manager/dist/blocked-tool-census.d.ts +40 -6
  147. package/payload/platform/services/claude-session-manager/dist/blocked-tool-census.d.ts.map +1 -1
  148. package/payload/platform/services/claude-session-manager/dist/blocked-tool-census.js +116 -15
  149. package/payload/platform/services/claude-session-manager/dist/blocked-tool-census.js.map +1 -1
  150. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
  151. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +6 -0
  152. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  153. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +5 -0
  154. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  155. package/payload/platform/services/claude-session-manager/dist/http-server.js +29 -0
  156. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  157. package/payload/platform/services/telegram-channel/dist/notification.d.ts +0 -12
  158. package/payload/platform/services/telegram-channel/dist/notification.d.ts.map +1 -1
  159. package/payload/platform/services/telegram-channel/dist/notification.js +8 -29
  160. package/payload/platform/services/telegram-channel/dist/notification.js.map +1 -1
  161. package/payload/platform/services/telegram-channel/dist/server.d.ts.map +1 -1
  162. package/payload/platform/services/telegram-channel/dist/server.js +8 -11
  163. package/payload/platform/services/telegram-channel/dist/server.js.map +1 -1
  164. package/payload/server/public/activity.html +7 -7
  165. package/payload/server/public/agents.html +6 -6
  166. package/payload/server/public/assets/{AdminLoginScreens-Dp6k1XgD.js → AdminLoginScreens-BLGZEaKU.js} +1 -1
  167. package/payload/server/public/assets/AdminLoginScreens-BLGZEaKU.js.br +0 -0
  168. package/payload/server/public/assets/AdminLoginScreens-BLGZEaKU.js.gz +0 -0
  169. package/payload/server/public/assets/AdminShell-C_M7YE5Z.js +3 -0
  170. package/payload/server/public/assets/AdminShell-C_M7YE5Z.js.br +0 -0
  171. package/payload/server/public/assets/AdminShell-C_M7YE5Z.js.gz +0 -0
  172. package/payload/server/public/assets/{activity-BJxhblz-.js → activity-BL6qbB9a.js} +1 -1
  173. package/payload/server/public/assets/activity-BL6qbB9a.js.br +0 -0
  174. package/payload/server/public/assets/activity-BL6qbB9a.js.gz +0 -0
  175. package/payload/server/public/assets/admin-jnJ3P2u4.js +1 -0
  176. package/payload/server/public/assets/admin-jnJ3P2u4.js.br +0 -0
  177. package/payload/server/public/assets/admin-jnJ3P2u4.js.gz +0 -0
  178. package/payload/server/public/assets/{agents-DTL8kjfD.js → agents-BzhfKZDN.js} +1 -1
  179. package/payload/server/public/assets/agents-BzhfKZDN.js.br +0 -0
  180. package/payload/server/public/assets/agents-BzhfKZDN.js.gz +0 -0
  181. package/payload/server/public/assets/{arc-CWXBKNZd.js → arc-Bge2fWf4.js} +1 -1
  182. package/payload/server/public/assets/arc-Bge2fWf4.js.br +0 -0
  183. package/payload/server/public/assets/arc-Bge2fWf4.js.gz +0 -0
  184. package/payload/server/public/assets/architecture-YZFGNWBL-B9jqFTbw.js +1 -0
  185. package/payload/server/public/assets/architecture-YZFGNWBL-B9jqFTbw.js.br +0 -0
  186. package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-C-KPMyG4.js → architectureDiagram-Q4EWVU46-BRauf5b8.js} +1 -1
  187. package/payload/server/public/assets/architectureDiagram-Q4EWVU46-BRauf5b8.js.br +0 -0
  188. package/payload/server/public/assets/architectureDiagram-Q4EWVU46-BRauf5b8.js.gz +0 -0
  189. package/payload/server/public/assets/{blockDiagram-DXYQGD6D-DkYbV9Sf.js → blockDiagram-DXYQGD6D-CUJ554WZ.js} +1 -1
  190. package/payload/server/public/assets/blockDiagram-DXYQGD6D-CUJ554WZ.js.br +0 -0
  191. package/payload/server/public/assets/blockDiagram-DXYQGD6D-CUJ554WZ.js.gz +0 -0
  192. package/payload/server/public/assets/{browser-UZp75zhx.js → browser-C-6io2B9.js} +1 -1
  193. package/payload/server/public/assets/browser-C-6io2B9.js.br +0 -0
  194. package/payload/server/public/assets/browser-C-6io2B9.js.gz +0 -0
  195. package/payload/server/public/assets/{c4Diagram-AHTNJAMY-EYW4kdlx.js → c4Diagram-AHTNJAMY-CV9gKsKo.js} +1 -1
  196. package/payload/server/public/assets/c4Diagram-AHTNJAMY-CV9gKsKo.js.br +0 -0
  197. package/payload/server/public/assets/{c4Diagram-AHTNJAMY-EYW4kdlx.js.gz → c4Diagram-AHTNJAMY-CV9gKsKo.js.gz} +0 -0
  198. package/payload/server/public/assets/{calendar-Dfo0O2K_.js → calendar-Dt3gS88s.js} +1 -1
  199. package/payload/server/public/assets/calendar-Dt3gS88s.js.br +0 -0
  200. package/payload/server/public/assets/calendar-Dt3gS88s.js.gz +0 -0
  201. package/payload/server/public/assets/channel-DUwJcjZw.js +1 -0
  202. package/payload/server/public/assets/channel-DUwJcjZw.js.br +0 -0
  203. package/payload/server/public/assets/chat-IUOvVkL-.js +1 -0
  204. package/payload/server/public/assets/chat-IUOvVkL-.js.br +1 -0
  205. package/payload/server/public/assets/chat-IUOvVkL-.js.gz +0 -0
  206. package/payload/server/public/assets/chevron-left-DSzR9zR7.js +1 -0
  207. package/payload/server/public/assets/chevron-left-DSzR9zR7.js.br +0 -0
  208. package/payload/server/public/assets/{chunk-2KRD3SAO-CmAF1UmH.js → chunk-2KRD3SAO-HzWGrran.js} +1 -1
  209. package/payload/server/public/assets/chunk-2KRD3SAO-HzWGrran.js.br +0 -0
  210. package/payload/server/public/assets/chunk-2KRD3SAO-HzWGrran.js.gz +0 -0
  211. package/payload/server/public/assets/{chunk-336JU56O-CyhmJeMM.js → chunk-336JU56O-ChGDYu_S.js} +2 -2
  212. package/payload/server/public/assets/chunk-336JU56O-ChGDYu_S.js.br +0 -0
  213. package/payload/server/public/assets/chunk-336JU56O-ChGDYu_S.js.gz +0 -0
  214. package/payload/server/public/assets/chunk-426QAEUC-DLLi1nAr.js +1 -0
  215. package/payload/server/public/assets/chunk-426QAEUC-DLLi1nAr.js.br +0 -0
  216. package/payload/server/public/assets/chunk-426QAEUC-DLLi1nAr.js.gz +0 -0
  217. package/payload/server/public/assets/{chunk-4BX2VUAB-DCzC40-Y.js → chunk-4BX2VUAB-BJunAy2u.js} +1 -1
  218. package/payload/server/public/assets/chunk-4BX2VUAB-BJunAy2u.js.br +0 -0
  219. package/payload/server/public/assets/chunk-4BX2VUAB-BJunAy2u.js.gz +0 -0
  220. package/payload/server/public/assets/{chunk-4TB4RGXK-D9BXrSA_.js → chunk-4TB4RGXK-Df9Ew0fN.js} +1 -1
  221. package/payload/server/public/assets/chunk-4TB4RGXK-Df9Ew0fN.js.br +0 -0
  222. package/payload/server/public/assets/chunk-4TB4RGXK-Df9Ew0fN.js.gz +0 -0
  223. package/payload/server/public/assets/{chunk-55IACEB6-BwXC-qTZ.js → chunk-55IACEB6-DtquCg7p.js} +1 -1
  224. package/payload/server/public/assets/chunk-55IACEB6-DtquCg7p.js.br +0 -0
  225. package/payload/server/public/assets/chunk-55IACEB6-DtquCg7p.js.gz +0 -0
  226. package/payload/server/public/assets/{chunk-5FUZZQ4R-De7QtXxM.js → chunk-5FUZZQ4R-B3s1YuQa.js} +1 -1
  227. package/payload/server/public/assets/chunk-5FUZZQ4R-B3s1YuQa.js.br +0 -0
  228. package/payload/server/public/assets/chunk-5FUZZQ4R-B3s1YuQa.js.gz +0 -0
  229. package/payload/server/public/assets/{chunk-5PVQY5BW-B5tsJiCq.js → chunk-5PVQY5BW-C0bRnMKQ.js} +1 -1
  230. package/payload/server/public/assets/chunk-5PVQY5BW-C0bRnMKQ.js.br +0 -0
  231. package/payload/server/public/assets/chunk-5PVQY5BW-C0bRnMKQ.js.gz +0 -0
  232. package/payload/server/public/assets/{chunk-67CJDMHE-BjTh9STV.js → chunk-67CJDMHE-B9jxnEpu.js} +1 -1
  233. package/payload/server/public/assets/chunk-67CJDMHE-B9jxnEpu.js.br +0 -0
  234. package/payload/server/public/assets/chunk-67CJDMHE-B9jxnEpu.js.gz +0 -0
  235. package/payload/server/public/assets/{chunk-7N4EOEYR-91klRswn.js → chunk-7N4EOEYR-DaimaIlO.js} +1 -1
  236. package/payload/server/public/assets/chunk-7N4EOEYR-DaimaIlO.js.br +0 -0
  237. package/payload/server/public/assets/chunk-7N4EOEYR-DaimaIlO.js.gz +0 -0
  238. package/payload/server/public/assets/{chunk-AA7GKIK3-XFPGEoBu.js → chunk-AA7GKIK3-htgz4y5z.js} +1 -1
  239. package/payload/server/public/assets/chunk-AA7GKIK3-htgz4y5z.js.br +0 -0
  240. package/payload/server/public/assets/chunk-AA7GKIK3-htgz4y5z.js.gz +0 -0
  241. package/payload/server/public/assets/{chunk-BSJP7CBP-B7wgMyWq.js → chunk-BSJP7CBP-0xBlnKJN.js} +1 -1
  242. package/payload/server/public/assets/chunk-BSJP7CBP-0xBlnKJN.js.br +0 -0
  243. package/payload/server/public/assets/chunk-BSJP7CBP-0xBlnKJN.js.gz +0 -0
  244. package/payload/server/public/assets/{chunk-CIAEETIT-WPy9vcOo.js → chunk-CIAEETIT-HZOrcAzJ.js} +1 -1
  245. package/payload/server/public/assets/chunk-CIAEETIT-HZOrcAzJ.js.br +0 -0
  246. package/payload/server/public/assets/chunk-CIAEETIT-HZOrcAzJ.js.gz +0 -0
  247. package/payload/server/public/assets/{chunk-EDXVE4YY-D_2JIFFG.js → chunk-EDXVE4YY-CC8hCcuU.js} +1 -1
  248. package/payload/server/public/assets/chunk-EDXVE4YY-CC8hCcuU.js.br +0 -0
  249. package/payload/server/public/assets/chunk-EDXVE4YY-CC8hCcuU.js.gz +0 -0
  250. package/payload/server/public/assets/{chunk-ENJZ2VHE-xORReRt0.js → chunk-ENJZ2VHE-BdPfdZYB.js} +1 -1
  251. package/payload/server/public/assets/chunk-ENJZ2VHE-BdPfdZYB.js.br +0 -0
  252. package/payload/server/public/assets/chunk-ENJZ2VHE-BdPfdZYB.js.gz +0 -0
  253. package/payload/server/public/assets/{chunk-FMBD7UC4-BZsDu4nl.js → chunk-FMBD7UC4-MHdn_KgF.js} +1 -1
  254. package/payload/server/public/assets/chunk-FMBD7UC4-MHdn_KgF.js.br +0 -0
  255. package/payload/server/public/assets/chunk-FMBD7UC4-MHdn_KgF.js.gz +0 -0
  256. package/payload/server/public/assets/{chunk-FOC6F5B3-QzUp8wXX.js → chunk-FOC6F5B3-Ti8BlQKX.js} +1 -1
  257. package/payload/server/public/assets/chunk-FOC6F5B3-Ti8BlQKX.js.br +0 -0
  258. package/payload/server/public/assets/chunk-FOC6F5B3-Ti8BlQKX.js.gz +0 -0
  259. package/payload/server/public/assets/{chunk-ICPOFSXX-B64S7i7x.js → chunk-ICPOFSXX-BP8A8zb1.js} +2 -2
  260. package/payload/server/public/assets/chunk-ICPOFSXX-BP8A8zb1.js.br +0 -0
  261. package/payload/server/public/assets/chunk-ICPOFSXX-BP8A8zb1.js.gz +0 -0
  262. package/payload/server/public/assets/{chunk-K5T4RW27-DzPc6X1_.js → chunk-K5T4RW27-F30EnSBL.js} +1 -1
  263. package/payload/server/public/assets/chunk-K5T4RW27-F30EnSBL.js.br +0 -0
  264. package/payload/server/public/assets/chunk-K5T4RW27-F30EnSBL.js.gz +0 -0
  265. package/payload/server/public/assets/{chunk-KGLVRYIC-A2rPnD7k.js → chunk-KGLVRYIC-DNSEkg2Q.js} +1 -1
  266. package/payload/server/public/assets/chunk-KGLVRYIC-DNSEkg2Q.js.br +2 -0
  267. package/payload/server/public/assets/chunk-KGLVRYIC-DNSEkg2Q.js.gz +0 -0
  268. package/payload/server/public/assets/{chunk-LIHQZDEY-CaWX327m.js → chunk-LIHQZDEY-DM7b0dec.js} +1 -1
  269. package/payload/server/public/assets/chunk-LIHQZDEY-DM7b0dec.js.br +0 -0
  270. package/payload/server/public/assets/chunk-LIHQZDEY-DM7b0dec.js.gz +0 -0
  271. package/payload/server/public/assets/{chunk-ORNJ4GCN-zrWhdmnc.js → chunk-ORNJ4GCN-B0qoI_vp.js} +1 -1
  272. package/payload/server/public/assets/chunk-ORNJ4GCN-B0qoI_vp.js.br +0 -0
  273. package/payload/server/public/assets/chunk-ORNJ4GCN-B0qoI_vp.js.gz +0 -0
  274. package/payload/server/public/assets/{chunk-OYMX7WX6-B_2qQir6.js → chunk-OYMX7WX6-Bfzo53eI.js} +1 -1
  275. package/payload/server/public/assets/chunk-OYMX7WX6-Bfzo53eI.js.br +0 -0
  276. package/payload/server/public/assets/chunk-OYMX7WX6-Bfzo53eI.js.gz +0 -0
  277. package/payload/server/public/assets/chunk-QZHKN3VN-A6b8ZN9i.js +1 -0
  278. package/payload/server/public/assets/chunk-QZHKN3VN-A6b8ZN9i.js.br +0 -0
  279. package/payload/server/public/assets/chunk-QZHKN3VN-A6b8ZN9i.js.gz +0 -0
  280. package/payload/server/public/assets/{chunk-U2HBQHQK-B-IYgxsc.js → chunk-U2HBQHQK-DcqGPXEy.js} +1 -1
  281. package/payload/server/public/assets/chunk-U2HBQHQK-DcqGPXEy.js.br +0 -0
  282. package/payload/server/public/assets/chunk-U2HBQHQK-DcqGPXEy.js.gz +0 -0
  283. package/payload/server/public/assets/{chunk-X2U36JSP-Y9Y1_EuG.js → chunk-X2U36JSP-DtRi7n5Z.js} +1 -1
  284. package/payload/server/public/assets/chunk-X2U36JSP-DtRi7n5Z.js.br +0 -0
  285. package/payload/server/public/assets/chunk-X2U36JSP-DtRi7n5Z.js.gz +0 -0
  286. package/payload/server/public/assets/{chunk-XPW4576I-C-6yETG_.js → chunk-XPW4576I-DmuDCcY3.js} +1 -1
  287. package/payload/server/public/assets/chunk-XPW4576I-DmuDCcY3.js.br +0 -0
  288. package/payload/server/public/assets/chunk-XPW4576I-DmuDCcY3.js.gz +0 -0
  289. package/payload/server/public/assets/{chunk-YZCP3GAM-KAuQIU5n.js → chunk-YZCP3GAM-oKk9Gv_e.js} +1 -1
  290. package/payload/server/public/assets/chunk-YZCP3GAM-oKk9Gv_e.js.br +0 -0
  291. package/payload/server/public/assets/chunk-YZCP3GAM-oKk9Gv_e.js.gz +0 -0
  292. package/payload/server/public/assets/{chunk-ZZ45TVLE-BJcH3KDH.js → chunk-ZZ45TVLE-teET41Yh.js} +1 -1
  293. package/payload/server/public/assets/chunk-ZZ45TVLE-teET41Yh.js.br +0 -0
  294. package/payload/server/public/assets/chunk-ZZ45TVLE-teET41Yh.js.gz +0 -0
  295. package/payload/server/public/assets/classDiagram-6PBFFD2Q-CMXajSzA.js +1 -0
  296. package/payload/server/public/assets/classDiagram-6PBFFD2Q-CMXajSzA.js.br +0 -0
  297. package/payload/server/public/assets/classDiagram-6PBFFD2Q-CMXajSzA.js.gz +0 -0
  298. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-Cz5Kib2r.js +1 -0
  299. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-Cz5Kib2r.js.br +0 -0
  300. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-Cz5Kib2r.js.gz +0 -0
  301. package/payload/server/public/assets/clock-C5xE5p2I.js +1 -0
  302. package/payload/server/public/assets/clock-C5xE5p2I.js.br +0 -0
  303. package/payload/server/public/assets/clone-BORhq8On.js +1 -0
  304. package/payload/server/public/assets/clone-BORhq8On.js.br +0 -0
  305. package/payload/server/public/assets/{copy-CGI2jioK.js → copy-TkPJgllS.js} +1 -1
  306. package/payload/server/public/assets/copy-TkPJgllS.js.br +0 -0
  307. package/payload/server/public/assets/copy-TkPJgllS.js.gz +0 -0
  308. package/payload/server/public/assets/{cose-bilkent-S5V4N54A-CcXj8vHa.js → cose-bilkent-S5V4N54A-D1xLpHGm.js} +1 -1
  309. package/payload/server/public/assets/cose-bilkent-S5V4N54A-D1xLpHGm.js.br +0 -0
  310. package/payload/server/public/assets/cose-bilkent-S5V4N54A-D1xLpHGm.js.gz +0 -0
  311. package/payload/server/public/assets/{dagre-KV5264BT-BOhQs4rS.js → dagre-KV5264BT-Byl65NKT.js} +1 -1
  312. package/payload/server/public/assets/dagre-KV5264BT-Byl65NKT.js.br +0 -0
  313. package/payload/server/public/assets/dagre-KV5264BT-Byl65NKT.js.gz +0 -0
  314. package/payload/server/public/assets/{dagre-DOtq9kYX.js → dagre-ZzXkSDir.js} +1 -1
  315. package/payload/server/public/assets/dagre-ZzXkSDir.js.br +0 -0
  316. package/payload/server/public/assets/dagre-ZzXkSDir.js.gz +0 -0
  317. package/payload/server/public/assets/data-Bhv0Pvfl.js +1 -0
  318. package/payload/server/public/assets/data-Bhv0Pvfl.js.br +0 -0
  319. package/payload/server/public/assets/data-Bhv0Pvfl.js.gz +0 -0
  320. package/payload/server/public/assets/{diagram-5BDNPKRD-CqJFt5ZM.js → diagram-5BDNPKRD-BFNkV5GK.js} +1 -1
  321. package/payload/server/public/assets/diagram-5BDNPKRD-BFNkV5GK.js.br +0 -0
  322. package/payload/server/public/assets/diagram-5BDNPKRD-BFNkV5GK.js.gz +0 -0
  323. package/payload/server/public/assets/{diagram-G4DWMVQ6-WQIyAZMn.js → diagram-G4DWMVQ6-1n6vHXzR.js} +1 -1
  324. package/payload/server/public/assets/diagram-G4DWMVQ6-1n6vHXzR.js.br +0 -0
  325. package/payload/server/public/assets/diagram-G4DWMVQ6-1n6vHXzR.js.gz +0 -0
  326. package/payload/server/public/assets/{diagram-MMDJMWI5-jcKc4a2w.js → diagram-MMDJMWI5-D4QOzaw0.js} +1 -1
  327. package/payload/server/public/assets/diagram-MMDJMWI5-D4QOzaw0.js.br +0 -0
  328. package/payload/server/public/assets/diagram-MMDJMWI5-D4QOzaw0.js.gz +0 -0
  329. package/payload/server/public/assets/{diagram-TYMM5635-Bbt2KuWe.js → diagram-TYMM5635-z8lBRsaV.js} +1 -1
  330. package/payload/server/public/assets/diagram-TYMM5635-z8lBRsaV.js.br +0 -0
  331. package/payload/server/public/assets/diagram-TYMM5635-z8lBRsaV.js.gz +0 -0
  332. package/payload/server/public/assets/{dist-9RiN6lky.js → dist-DjYA4E4S.js} +1 -1
  333. package/payload/server/public/assets/dist-DjYA4E4S.js.br +0 -0
  334. package/payload/server/public/assets/dist-DjYA4E4S.js.gz +0 -0
  335. package/payload/server/public/assets/{erDiagram-SMLLAGMA-BBm6azPJ.js → erDiagram-SMLLAGMA-CXj3tbtX.js} +1 -1
  336. package/payload/server/public/assets/erDiagram-SMLLAGMA-CXj3tbtX.js.br +0 -0
  337. package/payload/server/public/assets/erDiagram-SMLLAGMA-CXj3tbtX.js.gz +0 -0
  338. package/payload/server/public/assets/field-B490-evJ.js +1 -0
  339. package/payload/server/public/assets/field-B490-evJ.js.br +0 -0
  340. package/payload/server/public/assets/field-B490-evJ.js.gz +0 -0
  341. package/payload/server/public/assets/{file-text-RWintp9q.js → file-text-DyAL2DCh.js} +1 -1
  342. package/payload/server/public/assets/file-text-DyAL2DCh.js.br +0 -0
  343. package/payload/server/public/assets/file-text-DyAL2DCh.js.gz +0 -0
  344. package/payload/server/public/assets/{flatten-BurGKeIy.js → flatten-UdUTbm8v.js} +1 -1
  345. package/payload/server/public/assets/flatten-UdUTbm8v.js.br +0 -0
  346. package/payload/server/public/assets/flatten-UdUTbm8v.js.gz +0 -0
  347. package/payload/server/public/assets/{flowDiagram-DWJPFMVM-_r45DYJ8.js → flowDiagram-DWJPFMVM-DnySI-I4.js} +1 -1
  348. package/payload/server/public/assets/flowDiagram-DWJPFMVM-DnySI-I4.js.br +0 -0
  349. package/payload/server/public/assets/flowDiagram-DWJPFMVM-DnySI-I4.js.gz +0 -0
  350. package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-Bjgj9Bej.js → ganttDiagram-T4ZO3ILL-BIE2Q78F.js} +1 -1
  351. package/payload/server/public/assets/ganttDiagram-T4ZO3ILL-BIE2Q78F.js.br +0 -0
  352. package/payload/server/public/assets/ganttDiagram-T4ZO3ILL-BIE2Q78F.js.gz +0 -0
  353. package/payload/server/public/assets/gitGraph-7Q5UKJZL-Ua2z-DNt.js +1 -0
  354. package/payload/server/public/assets/gitGraph-7Q5UKJZL-Ua2z-DNt.js.br +0 -0
  355. package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-DTRdhGJA.js → gitGraphDiagram-UUTBAWPF-B2RTRpyG.js} +1 -1
  356. package/payload/server/public/assets/gitGraphDiagram-UUTBAWPF-B2RTRpyG.js.br +0 -0
  357. package/payload/server/public/assets/gitGraphDiagram-UUTBAWPF-B2RTRpyG.js.gz +0 -0
  358. package/payload/server/public/assets/{graph-CpBlfYrJ.js → graph-PiNIcCfX.js} +1 -1
  359. package/payload/server/public/assets/graph-PiNIcCfX.js.br +0 -0
  360. package/payload/server/public/assets/graph-PiNIcCfX.js.gz +0 -0
  361. package/payload/server/public/assets/{graph-labels-BOMyPppX.js → graph-labels-8jKFrLHn.js} +1 -1
  362. package/payload/server/public/assets/graph-labels-8jKFrLHn.js.br +0 -0
  363. package/payload/server/public/assets/graph-labels-8jKFrLHn.js.gz +0 -0
  364. package/payload/server/public/assets/{graphlib-DT4h6-4N.js → graphlib-SOh92ucm.js} +1 -1
  365. package/payload/server/public/assets/graphlib-SOh92ucm.js.br +0 -0
  366. package/payload/server/public/assets/graphlib-SOh92ucm.js.gz +0 -0
  367. package/payload/server/public/assets/info-OMHHGYJF-CNYp42iX.js +1 -0
  368. package/payload/server/public/assets/info-OMHHGYJF-CNYp42iX.js.br +0 -0
  369. package/payload/server/public/assets/infoDiagram-42DDH7IO-DklHffYr.js +2 -0
  370. package/payload/server/public/assets/infoDiagram-42DDH7IO-DklHffYr.js.br +0 -0
  371. package/payload/server/public/assets/infoDiagram-42DDH7IO-DklHffYr.js.gz +0 -0
  372. package/payload/server/public/assets/{isEmpty-C5v0-EY7.js → isEmpty-DY_Xp9Na.js} +1 -1
  373. package/payload/server/public/assets/isEmpty-DY_Xp9Na.js.br +0 -0
  374. package/payload/server/public/assets/isEmpty-DY_Xp9Na.js.gz +0 -0
  375. package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-BklHzVHm.js → ishikawaDiagram-UXIWVN3A-KAC06i3M.js} +1 -1
  376. package/payload/server/public/assets/ishikawaDiagram-UXIWVN3A-KAC06i3M.js.br +0 -0
  377. package/payload/server/public/assets/ishikawaDiagram-UXIWVN3A-KAC06i3M.js.gz +0 -0
  378. package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-Ckxx2CmV.js → journeyDiagram-VCZTEJTY-cA37ob8S.js} +1 -1
  379. package/payload/server/public/assets/journeyDiagram-VCZTEJTY-cA37ob8S.js.br +0 -0
  380. package/payload/server/public/assets/journeyDiagram-VCZTEJTY-cA37ob8S.js.gz +0 -0
  381. package/payload/server/public/assets/{jsx-runtime-DxsQ5Y-z.css → jsx-runtime-ChVh0xOm.css} +1 -1
  382. package/payload/server/public/assets/jsx-runtime-ChVh0xOm.css.br +0 -0
  383. package/payload/server/public/assets/{jsx-runtime-DxsQ5Y-z.css.gz → jsx-runtime-ChVh0xOm.css.gz} +0 -0
  384. package/payload/server/public/assets/{jsx-runtime-5lmxFBIw.js → jsx-runtime-YcUntiud.js} +1 -1
  385. package/payload/server/public/assets/jsx-runtime-YcUntiud.js.br +0 -0
  386. package/payload/server/public/assets/jsx-runtime-YcUntiud.js.gz +0 -0
  387. package/payload/server/public/assets/{kanban-definition-6JOO6SKY-BLELXpqn.js → kanban-definition-6JOO6SKY-CBjL70wU.js} +1 -1
  388. package/payload/server/public/assets/kanban-definition-6JOO6SKY-CBjL70wU.js.br +0 -0
  389. package/payload/server/public/assets/kanban-definition-6JOO6SKY-CBjL70wU.js.gz +0 -0
  390. package/payload/server/public/assets/{line-BkI5icOY.js → line-K8229GLG.js} +1 -1
  391. package/payload/server/public/assets/line-K8229GLG.js.br +0 -0
  392. package/payload/server/public/assets/line-K8229GLG.js.gz +0 -0
  393. package/payload/server/public/assets/{linear-B64ANRVs.js → linear-DeX7Wdt6.js} +1 -1
  394. package/payload/server/public/assets/linear-DeX7Wdt6.js.br +0 -0
  395. package/payload/server/public/assets/linear-DeX7Wdt6.js.gz +0 -0
  396. package/payload/server/public/assets/{mermaid-parser.core-qXPKkdJe.js → mermaid-parser.core-OnNOAzPX.js} +2 -2
  397. package/payload/server/public/assets/mermaid-parser.core-OnNOAzPX.js.br +0 -0
  398. package/payload/server/public/assets/mermaid-parser.core-OnNOAzPX.js.gz +0 -0
  399. package/payload/server/public/assets/{mermaid.core-BMsz65Wy.js → mermaid.core-DA-Gezeo.js} +3 -3
  400. package/payload/server/public/assets/mermaid.core-DA-Gezeo.js.br +0 -0
  401. package/payload/server/public/assets/mermaid.core-DA-Gezeo.js.gz +0 -0
  402. package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-DhFTS2sx.js → mindmap-definition-QFDTVHPH-C24TcDyS.js} +1 -1
  403. package/payload/server/public/assets/mindmap-definition-QFDTVHPH-C24TcDyS.js.br +0 -0
  404. package/payload/server/public/assets/mindmap-definition-QFDTVHPH-C24TcDyS.js.gz +0 -0
  405. package/payload/server/public/assets/operator-DKGKGzrb.js +1 -0
  406. package/payload/server/public/assets/operator-DKGKGzrb.js.br +0 -0
  407. package/payload/server/public/assets/operator-DKGKGzrb.js.gz +0 -0
  408. package/payload/server/public/assets/{ordinal-CJ_pL32Z.js → ordinal-gnpqfIHn.js} +1 -1
  409. package/payload/server/public/assets/ordinal-gnpqfIHn.js.br +0 -0
  410. package/payload/server/public/assets/ordinal-gnpqfIHn.js.gz +0 -0
  411. package/payload/server/public/assets/packet-4T2RLAQJ-B3ZAElsg.js +1 -0
  412. package/payload/server/public/assets/packet-4T2RLAQJ-B3ZAElsg.js.br +0 -0
  413. package/payload/server/public/assets/{page-BRShHSH0.js → page-BU5vlY9Y.js} +1 -1
  414. package/payload/server/public/assets/page-BU5vlY9Y.js.br +0 -0
  415. package/payload/server/public/assets/page-BU5vlY9Y.js.gz +0 -0
  416. package/payload/server/public/assets/{page-BbBCu9iP.js → page-DXz_K10G.js} +3 -3
  417. package/payload/server/public/assets/page-DXz_K10G.js.br +0 -0
  418. package/payload/server/public/assets/page-DXz_K10G.js.gz +0 -0
  419. package/payload/server/public/assets/{pdf-render-ynIPXfRA.js → pdf-render-B5af7vu1.js} +1 -1
  420. package/payload/server/public/assets/pdf-render-B5af7vu1.js.br +0 -0
  421. package/payload/server/public/assets/pdf-render-B5af7vu1.js.gz +0 -0
  422. package/payload/server/public/assets/pie-ZZUOXDRM-BWsRCj8p.js +1 -0
  423. package/payload/server/public/assets/pie-ZZUOXDRM-BWsRCj8p.js.br +0 -0
  424. package/payload/server/public/assets/{pieDiagram-DEJITSTG-B2TxkbHK.js → pieDiagram-DEJITSTG-ChS9jalQ.js} +1 -1
  425. package/payload/server/public/assets/pieDiagram-DEJITSTG-ChS9jalQ.js.br +0 -0
  426. package/payload/server/public/assets/pieDiagram-DEJITSTG-ChS9jalQ.js.gz +0 -0
  427. package/payload/server/public/assets/play-CmSyYrB6.js +1 -0
  428. package/payload/server/public/assets/play-CmSyYrB6.js.br +0 -0
  429. package/payload/server/public/assets/play-CmSyYrB6.js.gz +0 -0
  430. package/payload/server/public/assets/{public-DkObqkzL.js → public-BmA3-jLj.js} +1 -1
  431. package/payload/server/public/assets/public-BmA3-jLj.js.br +0 -0
  432. package/payload/server/public/assets/public-BmA3-jLj.js.gz +0 -0
  433. package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-GsMxIJuS.js → quadrantDiagram-34T5L4WZ-BxLfRK0z.js} +1 -1
  434. package/payload/server/public/assets/quadrantDiagram-34T5L4WZ-BxLfRK0z.js.br +0 -0
  435. package/payload/server/public/assets/quadrantDiagram-34T5L4WZ-BxLfRK0z.js.gz +0 -0
  436. package/payload/server/public/assets/radar-PYXPWWZC-Gxbt2rGT.js +1 -0
  437. package/payload/server/public/assets/radar-PYXPWWZC-Gxbt2rGT.js.br +0 -0
  438. package/payload/server/public/assets/{reduce-CfkEiHc9.js → reduce-BvezuHIe.js} +1 -1
  439. package/payload/server/public/assets/reduce-BvezuHIe.js.br +0 -0
  440. package/payload/server/public/assets/reduce-BvezuHIe.js.gz +0 -0
  441. package/payload/server/public/assets/{requirementDiagram-MS252O5E-DqNprm-1.js → requirementDiagram-MS252O5E-CWy48VI3.js} +1 -1
  442. package/payload/server/public/assets/requirementDiagram-MS252O5E-CWy48VI3.js.br +0 -0
  443. package/payload/server/public/assets/requirementDiagram-MS252O5E-CWy48VI3.js.gz +0 -0
  444. package/payload/server/public/assets/{rotate-ccw-DgMO69nh.js → rotate-ccw-fCH0LSMq.js} +1 -1
  445. package/payload/server/public/assets/rotate-ccw-fCH0LSMq.js.br +0 -0
  446. package/payload/server/public/assets/rotate-ccw-fCH0LSMq.js.gz +0 -0
  447. package/payload/server/public/assets/{routines-D9kvg_Xu.js → routines-BeFrmkls.js} +1 -1
  448. package/payload/server/public/assets/routines-BeFrmkls.js.br +0 -0
  449. package/payload/server/public/assets/routines-BeFrmkls.js.gz +0 -0
  450. package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-B-kRuiuz.js → sankeyDiagram-XADWPNL6-BBCLEJA3.js} +1 -1
  451. package/payload/server/public/assets/sankeyDiagram-XADWPNL6-BBCLEJA3.js.br +0 -0
  452. package/payload/server/public/assets/sankeyDiagram-XADWPNL6-BBCLEJA3.js.gz +0 -0
  453. package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-DEhL9g3K.js → sequenceDiagram-FGHM5R23-wu64F04G.js} +1 -1
  454. package/payload/server/public/assets/sequenceDiagram-FGHM5R23-wu64F04G.js.br +0 -0
  455. package/payload/server/public/assets/sequenceDiagram-FGHM5R23-wu64F04G.js.gz +0 -0
  456. package/payload/server/public/assets/{skills-l5I9HZ3D.js → skills-mjls5HBa.js} +1 -1
  457. package/payload/server/public/assets/skills-mjls5HBa.js.br +0 -0
  458. package/payload/server/public/assets/skills-mjls5HBa.js.gz +0 -0
  459. package/payload/server/public/assets/{src-BrAT6wKv.js → src-BvINb2fL.js} +1 -1
  460. package/payload/server/public/assets/src-BvINb2fL.js.br +0 -0
  461. package/payload/server/public/assets/src-BvINb2fL.js.gz +0 -0
  462. package/payload/server/public/assets/{stateDiagram-FHFEXIEX-Q-g6BHdz.js → stateDiagram-FHFEXIEX-Bq6BFFDC.js} +1 -1
  463. package/payload/server/public/assets/stateDiagram-FHFEXIEX-Bq6BFFDC.js.br +0 -0
  464. package/payload/server/public/assets/stateDiagram-FHFEXIEX-Bq6BFFDC.js.gz +0 -0
  465. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-PxPsWt1r.js +1 -0
  466. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-PxPsWt1r.js.br +0 -0
  467. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-PxPsWt1r.js.gz +0 -0
  468. package/payload/server/public/assets/{tasks-C2qJMv6i.js → tasks-p6puHHD0.js} +1 -1
  469. package/payload/server/public/assets/tasks-p6puHHD0.js.br +0 -0
  470. package/payload/server/public/assets/tasks-p6puHHD0.js.gz +0 -0
  471. package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-B3-52q4Q.js → timeline-definition-GMOUNBTQ-DTdvVZp-.js} +1 -1
  472. package/payload/server/public/assets/timeline-definition-GMOUNBTQ-DTdvVZp-.js.br +0 -0
  473. package/payload/server/public/assets/timeline-definition-GMOUNBTQ-DTdvVZp-.js.gz +0 -0
  474. package/payload/server/public/assets/treeView-SZITEDCU-Bl-aPmE3.js +1 -0
  475. package/payload/server/public/assets/treeView-SZITEDCU-Bl-aPmE3.js.br +0 -0
  476. package/payload/server/public/assets/treemap-W4RFUUIX-CUxE8Ofg.js +1 -0
  477. package/payload/server/public/assets/treemap-W4RFUUIX-CUxE8Ofg.js.br +0 -0
  478. package/payload/server/public/assets/{triangle-alert-BnC67uSs.js → triangle-alert-CrZ1ewbd.js} +1 -1
  479. package/payload/server/public/assets/triangle-alert-CrZ1ewbd.js.br +0 -0
  480. package/payload/server/public/assets/triangle-alert-CrZ1ewbd.js.gz +0 -0
  481. package/payload/server/public/assets/{useCopyFeedback-1RmgkTFh.js → useCopyFeedback-zOQNrIwd.js} +1 -1
  482. package/payload/server/public/assets/useCopyFeedback-zOQNrIwd.js.br +0 -0
  483. package/payload/server/public/assets/useCopyFeedback-zOQNrIwd.js.gz +0 -0
  484. package/payload/server/public/assets/{useMediaQuery-BQslddHQ.js → useMediaQuery-BmG090FR.js} +1 -1
  485. package/payload/server/public/assets/useMediaQuery-BmG090FR.js.br +0 -0
  486. package/payload/server/public/assets/useMediaQuery-BmG090FR.js.gz +0 -0
  487. package/payload/server/public/assets/{useVoiceRecorder-BeZNQEC4.js → useVoiceRecorder-9pf6FFJ-.js} +2 -2
  488. package/payload/server/public/assets/useVoiceRecorder-9pf6FFJ-.js.br +0 -0
  489. package/payload/server/public/assets/useVoiceRecorder-9pf6FFJ-.js.gz +0 -0
  490. package/payload/server/public/assets/{vennDiagram-DHZGUBPP-Bzm1VDi1.js → vennDiagram-DHZGUBPP-CigqIBdl.js} +1 -1
  491. package/payload/server/public/assets/vennDiagram-DHZGUBPP-CigqIBdl.js.br +0 -0
  492. package/payload/server/public/assets/vennDiagram-DHZGUBPP-CigqIBdl.js.gz +0 -0
  493. package/payload/server/public/assets/wardley-RL74JXVD-DPB13D22.js +1 -0
  494. package/payload/server/public/assets/wardley-RL74JXVD-DPB13D22.js.br +0 -0
  495. package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-DIqGZr4v.js → wardleyDiagram-NUSXRM2D-VhV1plUD.js} +1 -1
  496. package/payload/server/public/assets/wardleyDiagram-NUSXRM2D-VhV1plUD.js.br +0 -0
  497. package/payload/server/public/assets/wardleyDiagram-NUSXRM2D-VhV1plUD.js.gz +0 -0
  498. package/payload/server/public/assets/{wrench-D4ufQG6C.js → wrench-k4GYG5rc.js} +1 -1
  499. package/payload/server/public/assets/wrench-k4GYG5rc.js.br +0 -0
  500. package/payload/server/public/assets/wrench-k4GYG5rc.js.gz +0 -0
  501. package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-0W2L2hQA.js → xychartDiagram-5P7HB3ND-DGkkNLZt.js} +1 -1
  502. package/payload/server/public/assets/xychartDiagram-5P7HB3ND-DGkkNLZt.js.br +0 -0
  503. package/payload/server/public/assets/xychartDiagram-5P7HB3ND-DGkkNLZt.js.gz +0 -0
  504. package/payload/server/public/browser.html +6 -6
  505. package/payload/server/public/calendar.html +9 -9
  506. package/payload/server/public/chat.html +16 -16
  507. package/payload/server/public/data.html +15 -15
  508. package/payload/server/public/field.html +4 -4
  509. package/payload/server/public/graph.html +11 -11
  510. package/payload/server/public/index.html +17 -17
  511. package/payload/server/public/operator.html +17 -17
  512. package/payload/server/public/public.html +16 -16
  513. package/payload/server/public/routines.html +10 -10
  514. package/payload/server/public/skills.html +7 -7
  515. package/payload/server/public/tasks.html +8 -8
  516. package/payload/server/server.js +3111 -2182
  517. package/dist/__tests__/converge-client-admins.test.js +0 -50
  518. package/payload/platform/lib/dispatch-read/src/config.d.ts +0 -26
  519. package/payload/platform/lib/dispatch-read/src/types.d.ts +0 -143
  520. package/payload/server/public/assets/AdminLoginScreens-Dp6k1XgD.js.br +0 -0
  521. package/payload/server/public/assets/AdminLoginScreens-Dp6k1XgD.js.gz +0 -0
  522. package/payload/server/public/assets/AdminShell-D-wB90c3.js +0 -3
  523. package/payload/server/public/assets/AdminShell-D-wB90c3.js.br +0 -0
  524. package/payload/server/public/assets/AdminShell-D-wB90c3.js.gz +0 -0
  525. package/payload/server/public/assets/activity-BJxhblz-.js.br +0 -0
  526. package/payload/server/public/assets/activity-BJxhblz-.js.gz +0 -0
  527. package/payload/server/public/assets/admin-DzEi8shs.js +0 -1
  528. package/payload/server/public/assets/admin-DzEi8shs.js.br +0 -0
  529. package/payload/server/public/assets/admin-DzEi8shs.js.gz +0 -0
  530. package/payload/server/public/assets/agents-DTL8kjfD.js.br +0 -0
  531. package/payload/server/public/assets/agents-DTL8kjfD.js.gz +0 -0
  532. package/payload/server/public/assets/arc-CWXBKNZd.js.br +0 -0
  533. package/payload/server/public/assets/arc-CWXBKNZd.js.gz +0 -0
  534. package/payload/server/public/assets/architecture-YZFGNWBL-CIL4I0fc.js +0 -1
  535. package/payload/server/public/assets/architecture-YZFGNWBL-CIL4I0fc.js.br +0 -0
  536. package/payload/server/public/assets/architectureDiagram-Q4EWVU46-C-KPMyG4.js.br +0 -0
  537. package/payload/server/public/assets/architectureDiagram-Q4EWVU46-C-KPMyG4.js.gz +0 -0
  538. package/payload/server/public/assets/blockDiagram-DXYQGD6D-DkYbV9Sf.js.br +0 -0
  539. package/payload/server/public/assets/blockDiagram-DXYQGD6D-DkYbV9Sf.js.gz +0 -0
  540. package/payload/server/public/assets/browser-UZp75zhx.js.br +0 -0
  541. package/payload/server/public/assets/browser-UZp75zhx.js.gz +0 -0
  542. package/payload/server/public/assets/c4Diagram-AHTNJAMY-EYW4kdlx.js.br +0 -0
  543. package/payload/server/public/assets/calendar-Dfo0O2K_.js.br +0 -0
  544. package/payload/server/public/assets/calendar-Dfo0O2K_.js.gz +0 -0
  545. package/payload/server/public/assets/channel-CbHmRjy_.js +0 -1
  546. package/payload/server/public/assets/channel-CbHmRjy_.js.br +0 -0
  547. package/payload/server/public/assets/chat-ByJAvEWZ.js +0 -1
  548. package/payload/server/public/assets/chat-ByJAvEWZ.js.br +0 -0
  549. package/payload/server/public/assets/chat-ByJAvEWZ.js.gz +0 -0
  550. package/payload/server/public/assets/chevron-left-iG7sYNm7.js +0 -1
  551. package/payload/server/public/assets/chevron-left-iG7sYNm7.js.br +0 -0
  552. package/payload/server/public/assets/chunk-2KRD3SAO-CmAF1UmH.js.br +0 -0
  553. package/payload/server/public/assets/chunk-2KRD3SAO-CmAF1UmH.js.gz +0 -0
  554. package/payload/server/public/assets/chunk-336JU56O-CyhmJeMM.js.br +0 -0
  555. package/payload/server/public/assets/chunk-336JU56O-CyhmJeMM.js.gz +0 -0
  556. package/payload/server/public/assets/chunk-426QAEUC-C2tnHCM7.js +0 -1
  557. package/payload/server/public/assets/chunk-426QAEUC-C2tnHCM7.js.br +0 -0
  558. package/payload/server/public/assets/chunk-426QAEUC-C2tnHCM7.js.gz +0 -0
  559. package/payload/server/public/assets/chunk-4BX2VUAB-DCzC40-Y.js.br +0 -0
  560. package/payload/server/public/assets/chunk-4BX2VUAB-DCzC40-Y.js.gz +0 -0
  561. package/payload/server/public/assets/chunk-4TB4RGXK-D9BXrSA_.js.br +0 -0
  562. package/payload/server/public/assets/chunk-4TB4RGXK-D9BXrSA_.js.gz +0 -0
  563. package/payload/server/public/assets/chunk-55IACEB6-BwXC-qTZ.js.br +0 -0
  564. package/payload/server/public/assets/chunk-55IACEB6-BwXC-qTZ.js.gz +0 -0
  565. package/payload/server/public/assets/chunk-5FUZZQ4R-De7QtXxM.js.br +0 -0
  566. package/payload/server/public/assets/chunk-5FUZZQ4R-De7QtXxM.js.gz +0 -0
  567. package/payload/server/public/assets/chunk-5PVQY5BW-B5tsJiCq.js.br +0 -0
  568. package/payload/server/public/assets/chunk-5PVQY5BW-B5tsJiCq.js.gz +0 -0
  569. package/payload/server/public/assets/chunk-67CJDMHE-BjTh9STV.js.br +0 -0
  570. package/payload/server/public/assets/chunk-67CJDMHE-BjTh9STV.js.gz +0 -0
  571. package/payload/server/public/assets/chunk-7N4EOEYR-91klRswn.js.br +0 -0
  572. package/payload/server/public/assets/chunk-7N4EOEYR-91klRswn.js.gz +0 -0
  573. package/payload/server/public/assets/chunk-AA7GKIK3-XFPGEoBu.js.br +0 -3
  574. package/payload/server/public/assets/chunk-AA7GKIK3-XFPGEoBu.js.gz +0 -0
  575. package/payload/server/public/assets/chunk-BSJP7CBP-B7wgMyWq.js.br +0 -0
  576. package/payload/server/public/assets/chunk-BSJP7CBP-B7wgMyWq.js.gz +0 -0
  577. package/payload/server/public/assets/chunk-CIAEETIT-WPy9vcOo.js.br +0 -0
  578. package/payload/server/public/assets/chunk-CIAEETIT-WPy9vcOo.js.gz +0 -0
  579. package/payload/server/public/assets/chunk-EDXVE4YY-D_2JIFFG.js.br +0 -0
  580. package/payload/server/public/assets/chunk-EDXVE4YY-D_2JIFFG.js.gz +0 -0
  581. package/payload/server/public/assets/chunk-ENJZ2VHE-xORReRt0.js.br +0 -0
  582. package/payload/server/public/assets/chunk-ENJZ2VHE-xORReRt0.js.gz +0 -0
  583. package/payload/server/public/assets/chunk-FMBD7UC4-BZsDu4nl.js.br +0 -0
  584. package/payload/server/public/assets/chunk-FMBD7UC4-BZsDu4nl.js.gz +0 -0
  585. package/payload/server/public/assets/chunk-FOC6F5B3-QzUp8wXX.js.br +0 -0
  586. package/payload/server/public/assets/chunk-FOC6F5B3-QzUp8wXX.js.gz +0 -0
  587. package/payload/server/public/assets/chunk-ICPOFSXX-B64S7i7x.js.br +0 -0
  588. package/payload/server/public/assets/chunk-ICPOFSXX-B64S7i7x.js.gz +0 -0
  589. package/payload/server/public/assets/chunk-K5T4RW27-DzPc6X1_.js.br +0 -0
  590. package/payload/server/public/assets/chunk-K5T4RW27-DzPc6X1_.js.gz +0 -0
  591. package/payload/server/public/assets/chunk-KGLVRYIC-A2rPnD7k.js.br +0 -1
  592. package/payload/server/public/assets/chunk-KGLVRYIC-A2rPnD7k.js.gz +0 -0
  593. package/payload/server/public/assets/chunk-LIHQZDEY-CaWX327m.js.br +0 -0
  594. package/payload/server/public/assets/chunk-LIHQZDEY-CaWX327m.js.gz +0 -0
  595. package/payload/server/public/assets/chunk-ORNJ4GCN-zrWhdmnc.js.br +0 -0
  596. package/payload/server/public/assets/chunk-ORNJ4GCN-zrWhdmnc.js.gz +0 -0
  597. package/payload/server/public/assets/chunk-OYMX7WX6-B_2qQir6.js.br +0 -0
  598. package/payload/server/public/assets/chunk-OYMX7WX6-B_2qQir6.js.gz +0 -0
  599. package/payload/server/public/assets/chunk-QZHKN3VN-BzgrgCTo.js +0 -1
  600. package/payload/server/public/assets/chunk-QZHKN3VN-BzgrgCTo.js.br +0 -0
  601. package/payload/server/public/assets/chunk-QZHKN3VN-BzgrgCTo.js.gz +0 -0
  602. package/payload/server/public/assets/chunk-U2HBQHQK-B-IYgxsc.js.br +0 -0
  603. package/payload/server/public/assets/chunk-U2HBQHQK-B-IYgxsc.js.gz +0 -0
  604. package/payload/server/public/assets/chunk-X2U36JSP-Y9Y1_EuG.js.br +0 -0
  605. package/payload/server/public/assets/chunk-X2U36JSP-Y9Y1_EuG.js.gz +0 -0
  606. package/payload/server/public/assets/chunk-XPW4576I-C-6yETG_.js.br +0 -0
  607. package/payload/server/public/assets/chunk-XPW4576I-C-6yETG_.js.gz +0 -0
  608. package/payload/server/public/assets/chunk-YZCP3GAM-KAuQIU5n.js.br +0 -0
  609. package/payload/server/public/assets/chunk-YZCP3GAM-KAuQIU5n.js.gz +0 -0
  610. package/payload/server/public/assets/chunk-ZZ45TVLE-BJcH3KDH.js.br +0 -0
  611. package/payload/server/public/assets/chunk-ZZ45TVLE-BJcH3KDH.js.gz +0 -0
  612. package/payload/server/public/assets/classDiagram-6PBFFD2Q-BxvqeBEj.js +0 -1
  613. package/payload/server/public/assets/classDiagram-6PBFFD2Q-BxvqeBEj.js.br +0 -0
  614. package/payload/server/public/assets/classDiagram-6PBFFD2Q-BxvqeBEj.js.gz +0 -0
  615. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-R3-NzMRG.js +0 -1
  616. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-R3-NzMRG.js.br +0 -0
  617. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-R3-NzMRG.js.gz +0 -0
  618. package/payload/server/public/assets/clock-xSs0UF10.js +0 -1
  619. package/payload/server/public/assets/clock-xSs0UF10.js.br +0 -0
  620. package/payload/server/public/assets/clock-xSs0UF10.js.gz +0 -0
  621. package/payload/server/public/assets/clone-QdOE5SXR.js +0 -1
  622. package/payload/server/public/assets/copy-CGI2jioK.js.br +0 -0
  623. package/payload/server/public/assets/copy-CGI2jioK.js.gz +0 -0
  624. package/payload/server/public/assets/cose-bilkent-S5V4N54A-CcXj8vHa.js.br +0 -0
  625. package/payload/server/public/assets/cose-bilkent-S5V4N54A-CcXj8vHa.js.gz +0 -0
  626. package/payload/server/public/assets/dagre-DOtq9kYX.js.br +0 -0
  627. package/payload/server/public/assets/dagre-DOtq9kYX.js.gz +0 -0
  628. package/payload/server/public/assets/dagre-KV5264BT-BOhQs4rS.js.br +0 -0
  629. package/payload/server/public/assets/dagre-KV5264BT-BOhQs4rS.js.gz +0 -0
  630. package/payload/server/public/assets/data-dvwK4BcP.js +0 -1
  631. package/payload/server/public/assets/data-dvwK4BcP.js.br +0 -0
  632. package/payload/server/public/assets/data-dvwK4BcP.js.gz +0 -0
  633. package/payload/server/public/assets/diagram-5BDNPKRD-CqJFt5ZM.js.br +0 -0
  634. package/payload/server/public/assets/diagram-5BDNPKRD-CqJFt5ZM.js.gz +0 -0
  635. package/payload/server/public/assets/diagram-G4DWMVQ6-WQIyAZMn.js.br +0 -0
  636. package/payload/server/public/assets/diagram-G4DWMVQ6-WQIyAZMn.js.gz +0 -0
  637. package/payload/server/public/assets/diagram-MMDJMWI5-jcKc4a2w.js.br +0 -0
  638. package/payload/server/public/assets/diagram-MMDJMWI5-jcKc4a2w.js.gz +0 -0
  639. package/payload/server/public/assets/diagram-TYMM5635-Bbt2KuWe.js.br +0 -0
  640. package/payload/server/public/assets/diagram-TYMM5635-Bbt2KuWe.js.gz +0 -0
  641. package/payload/server/public/assets/dispatch-Dx9-ty1K.js +0 -1
  642. package/payload/server/public/assets/dispatch-Dx9-ty1K.js.br +0 -0
  643. package/payload/server/public/assets/dispatch-Dx9-ty1K.js.gz +0 -0
  644. package/payload/server/public/assets/dist-9RiN6lky.js.br +0 -0
  645. package/payload/server/public/assets/dist-9RiN6lky.js.gz +0 -0
  646. package/payload/server/public/assets/erDiagram-SMLLAGMA-BBm6azPJ.js.br +0 -0
  647. package/payload/server/public/assets/erDiagram-SMLLAGMA-BBm6azPJ.js.gz +0 -0
  648. package/payload/server/public/assets/field-D-P6CsWA.js +0 -1
  649. package/payload/server/public/assets/field-D-P6CsWA.js.br +0 -0
  650. package/payload/server/public/assets/field-D-P6CsWA.js.gz +0 -0
  651. package/payload/server/public/assets/file-text-RWintp9q.js.br +0 -0
  652. package/payload/server/public/assets/file-text-RWintp9q.js.gz +0 -0
  653. package/payload/server/public/assets/flatten-BurGKeIy.js.br +0 -0
  654. package/payload/server/public/assets/flatten-BurGKeIy.js.gz +0 -0
  655. package/payload/server/public/assets/flowDiagram-DWJPFMVM-_r45DYJ8.js.br +0 -0
  656. package/payload/server/public/assets/flowDiagram-DWJPFMVM-_r45DYJ8.js.gz +0 -0
  657. package/payload/server/public/assets/ganttDiagram-T4ZO3ILL-Bjgj9Bej.js.br +0 -0
  658. package/payload/server/public/assets/ganttDiagram-T4ZO3ILL-Bjgj9Bej.js.gz +0 -0
  659. package/payload/server/public/assets/gitGraph-7Q5UKJZL-DdbK59od.js +0 -1
  660. package/payload/server/public/assets/gitGraph-7Q5UKJZL-DdbK59od.js.br +0 -0
  661. package/payload/server/public/assets/gitGraphDiagram-UUTBAWPF-DTRdhGJA.js.br +0 -0
  662. package/payload/server/public/assets/gitGraphDiagram-UUTBAWPF-DTRdhGJA.js.gz +0 -0
  663. package/payload/server/public/assets/graph-CpBlfYrJ.js.br +0 -0
  664. package/payload/server/public/assets/graph-CpBlfYrJ.js.gz +0 -0
  665. package/payload/server/public/assets/graph-labels-BOMyPppX.js.br +0 -0
  666. package/payload/server/public/assets/graph-labels-BOMyPppX.js.gz +0 -0
  667. package/payload/server/public/assets/graphlib-DT4h6-4N.js.br +0 -0
  668. package/payload/server/public/assets/graphlib-DT4h6-4N.js.gz +0 -0
  669. package/payload/server/public/assets/info-OMHHGYJF-BR8gm0wj.js +0 -1
  670. package/payload/server/public/assets/info-OMHHGYJF-BR8gm0wj.js.br +0 -0
  671. package/payload/server/public/assets/infoDiagram-42DDH7IO-Cr3Efss6.js +0 -2
  672. package/payload/server/public/assets/infoDiagram-42DDH7IO-Cr3Efss6.js.br +0 -0
  673. package/payload/server/public/assets/infoDiagram-42DDH7IO-Cr3Efss6.js.gz +0 -0
  674. package/payload/server/public/assets/isEmpty-C5v0-EY7.js.br +0 -0
  675. package/payload/server/public/assets/isEmpty-C5v0-EY7.js.gz +0 -0
  676. package/payload/server/public/assets/ishikawaDiagram-UXIWVN3A-BklHzVHm.js.br +0 -0
  677. package/payload/server/public/assets/ishikawaDiagram-UXIWVN3A-BklHzVHm.js.gz +0 -0
  678. package/payload/server/public/assets/journeyDiagram-VCZTEJTY-Ckxx2CmV.js.br +0 -0
  679. package/payload/server/public/assets/journeyDiagram-VCZTEJTY-Ckxx2CmV.js.gz +0 -0
  680. package/payload/server/public/assets/jsx-runtime-5lmxFBIw.js.br +0 -0
  681. package/payload/server/public/assets/jsx-runtime-5lmxFBIw.js.gz +0 -0
  682. package/payload/server/public/assets/jsx-runtime-DxsQ5Y-z.css.br +0 -0
  683. package/payload/server/public/assets/kanban-definition-6JOO6SKY-BLELXpqn.js.br +0 -0
  684. package/payload/server/public/assets/kanban-definition-6JOO6SKY-BLELXpqn.js.gz +0 -0
  685. package/payload/server/public/assets/line-BkI5icOY.js.br +0 -0
  686. package/payload/server/public/assets/line-BkI5icOY.js.gz +0 -0
  687. package/payload/server/public/assets/linear-B64ANRVs.js.br +0 -0
  688. package/payload/server/public/assets/linear-B64ANRVs.js.gz +0 -0
  689. package/payload/server/public/assets/mermaid-parser.core-qXPKkdJe.js.br +0 -0
  690. package/payload/server/public/assets/mermaid-parser.core-qXPKkdJe.js.gz +0 -0
  691. package/payload/server/public/assets/mermaid.core-BMsz65Wy.js.br +0 -0
  692. package/payload/server/public/assets/mermaid.core-BMsz65Wy.js.gz +0 -0
  693. package/payload/server/public/assets/mindmap-definition-QFDTVHPH-DhFTS2sx.js.br +0 -0
  694. package/payload/server/public/assets/mindmap-definition-QFDTVHPH-DhFTS2sx.js.gz +0 -0
  695. package/payload/server/public/assets/operator-DFgW6GiH.js +0 -1
  696. package/payload/server/public/assets/operator-DFgW6GiH.js.br +0 -0
  697. package/payload/server/public/assets/operator-DFgW6GiH.js.gz +0 -0
  698. package/payload/server/public/assets/ordinal-CJ_pL32Z.js.br +0 -0
  699. package/payload/server/public/assets/ordinal-CJ_pL32Z.js.gz +0 -0
  700. package/payload/server/public/assets/packet-4T2RLAQJ-B31PbAeA.js +0 -1
  701. package/payload/server/public/assets/packet-4T2RLAQJ-B31PbAeA.js.br +0 -0
  702. package/payload/server/public/assets/page-BRShHSH0.js.br +0 -0
  703. package/payload/server/public/assets/page-BRShHSH0.js.gz +0 -0
  704. package/payload/server/public/assets/page-BbBCu9iP.js.br +0 -0
  705. package/payload/server/public/assets/page-BbBCu9iP.js.gz +0 -0
  706. package/payload/server/public/assets/pdf-render-ynIPXfRA.js.br +0 -0
  707. package/payload/server/public/assets/pdf-render-ynIPXfRA.js.gz +0 -0
  708. package/payload/server/public/assets/pie-ZZUOXDRM-BbSc1VXl.js +0 -1
  709. package/payload/server/public/assets/pie-ZZUOXDRM-BbSc1VXl.js.br +0 -0
  710. package/payload/server/public/assets/pieDiagram-DEJITSTG-B2TxkbHK.js.br +0 -0
  711. package/payload/server/public/assets/pieDiagram-DEJITSTG-B2TxkbHK.js.gz +0 -0
  712. package/payload/server/public/assets/play-BJxUaf6-.js +0 -1
  713. package/payload/server/public/assets/play-BJxUaf6-.js.br +0 -0
  714. package/payload/server/public/assets/play-BJxUaf6-.js.gz +0 -0
  715. package/payload/server/public/assets/public-DkObqkzL.js.br +0 -0
  716. package/payload/server/public/assets/public-DkObqkzL.js.gz +0 -0
  717. package/payload/server/public/assets/quadrantDiagram-34T5L4WZ-GsMxIJuS.js.br +0 -0
  718. package/payload/server/public/assets/quadrantDiagram-34T5L4WZ-GsMxIJuS.js.gz +0 -0
  719. package/payload/server/public/assets/radar-PYXPWWZC-B0La8_mZ.js +0 -1
  720. package/payload/server/public/assets/radar-PYXPWWZC-B0La8_mZ.js.br +0 -0
  721. package/payload/server/public/assets/reduce-CfkEiHc9.js.br +0 -0
  722. package/payload/server/public/assets/reduce-CfkEiHc9.js.gz +0 -0
  723. package/payload/server/public/assets/requirementDiagram-MS252O5E-DqNprm-1.js.br +0 -0
  724. package/payload/server/public/assets/requirementDiagram-MS252O5E-DqNprm-1.js.gz +0 -0
  725. package/payload/server/public/assets/rotate-ccw-DgMO69nh.js.br +0 -0
  726. package/payload/server/public/assets/rotate-ccw-DgMO69nh.js.gz +0 -0
  727. package/payload/server/public/assets/routines-D9kvg_Xu.js.br +0 -0
  728. package/payload/server/public/assets/routines-D9kvg_Xu.js.gz +0 -0
  729. package/payload/server/public/assets/sankeyDiagram-XADWPNL6-B-kRuiuz.js.br +0 -0
  730. package/payload/server/public/assets/sankeyDiagram-XADWPNL6-B-kRuiuz.js.gz +0 -0
  731. package/payload/server/public/assets/sequenceDiagram-FGHM5R23-DEhL9g3K.js.br +0 -0
  732. package/payload/server/public/assets/sequenceDiagram-FGHM5R23-DEhL9g3K.js.gz +0 -0
  733. package/payload/server/public/assets/skills-l5I9HZ3D.js.br +0 -0
  734. package/payload/server/public/assets/skills-l5I9HZ3D.js.gz +0 -0
  735. package/payload/server/public/assets/src-BrAT6wKv.js.br +0 -0
  736. package/payload/server/public/assets/src-BrAT6wKv.js.gz +0 -0
  737. package/payload/server/public/assets/stateDiagram-FHFEXIEX-Q-g6BHdz.js.br +0 -0
  738. package/payload/server/public/assets/stateDiagram-FHFEXIEX-Q-g6BHdz.js.gz +0 -0
  739. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-ssRWItVj.js +0 -1
  740. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-ssRWItVj.js.br +0 -0
  741. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-ssRWItVj.js.gz +0 -0
  742. package/payload/server/public/assets/tasks-C2qJMv6i.js.br +0 -0
  743. package/payload/server/public/assets/tasks-C2qJMv6i.js.gz +0 -0
  744. package/payload/server/public/assets/timeline-definition-GMOUNBTQ-B3-52q4Q.js.br +0 -0
  745. package/payload/server/public/assets/timeline-definition-GMOUNBTQ-B3-52q4Q.js.gz +0 -0
  746. package/payload/server/public/assets/treeView-SZITEDCU-BBR3hu9P.js +0 -1
  747. package/payload/server/public/assets/treeView-SZITEDCU-BBR3hu9P.js.br +0 -0
  748. package/payload/server/public/assets/treemap-W4RFUUIX-wSQMuzBT.js +0 -1
  749. package/payload/server/public/assets/treemap-W4RFUUIX-wSQMuzBT.js.br +0 -0
  750. package/payload/server/public/assets/triangle-alert-BnC67uSs.js.br +0 -0
  751. package/payload/server/public/assets/triangle-alert-BnC67uSs.js.gz +0 -0
  752. package/payload/server/public/assets/useCopyFeedback-1RmgkTFh.js.br +0 -0
  753. package/payload/server/public/assets/useCopyFeedback-1RmgkTFh.js.gz +0 -0
  754. package/payload/server/public/assets/useMediaQuery-BQslddHQ.js.br +0 -0
  755. package/payload/server/public/assets/useMediaQuery-BQslddHQ.js.gz +0 -0
  756. package/payload/server/public/assets/useVoiceRecorder-BeZNQEC4.js.br +0 -0
  757. package/payload/server/public/assets/useVoiceRecorder-BeZNQEC4.js.gz +0 -0
  758. package/payload/server/public/assets/vennDiagram-DHZGUBPP-Bzm1VDi1.js.br +0 -0
  759. package/payload/server/public/assets/vennDiagram-DHZGUBPP-Bzm1VDi1.js.gz +0 -0
  760. package/payload/server/public/assets/wardley-RL74JXVD-3QaECtQN.js +0 -1
  761. package/payload/server/public/assets/wardley-RL74JXVD-3QaECtQN.js.br +0 -0
  762. package/payload/server/public/assets/wardleyDiagram-NUSXRM2D-DIqGZr4v.js.br +0 -0
  763. package/payload/server/public/assets/wardleyDiagram-NUSXRM2D-DIqGZr4v.js.gz +0 -0
  764. package/payload/server/public/assets/wrench-D4ufQG6C.js.br +0 -0
  765. package/payload/server/public/assets/wrench-D4ufQG6C.js.gz +0 -0
  766. package/payload/server/public/assets/xychartDiagram-5P7HB3ND-0W2L2hQA.js.br +0 -0
  767. package/payload/server/public/assets/xychartDiagram-5P7HB3ND-0W2L2hQA.js.gz +0 -0
  768. package/payload/server/public/dispatch.html +0 -20
  769. /package/payload/server/public/assets/{_baseFor-D1duyODO.js → _baseFor-BApe6Tla.js} +0 -0
  770. /package/payload/server/public/assets/{_baseFor-D1duyODO.js.br → _baseFor-BApe6Tla.js.br} +0 -0
  771. /package/payload/server/public/assets/{_baseFor-D1duyODO.js.gz → _baseFor-BApe6Tla.js.gz} +0 -0
  772. /package/payload/server/public/assets/{array-j7Xa9Fap.js → array-eiH4WfvY.js} +0 -0
  773. /package/payload/server/public/assets/{array-j7Xa9Fap.js.br → array-eiH4WfvY.js.br} +0 -0
  774. /package/payload/server/public/assets/{chunk-DlZTsV_O.js → chunk-BycB0eMI.js} +0 -0
  775. /package/payload/server/public/assets/{chunk-DlZTsV_O.js.br → chunk-BycB0eMI.js.br} +0 -0
  776. /package/payload/server/public/assets/{chunk-DlZTsV_O.js.gz → chunk-BycB0eMI.js.gz} +0 -0
  777. /package/payload/server/public/assets/{cytoscape.esm-Dob3eilA.js → cytoscape.esm-BZ6NYo0w.js} +0 -0
  778. /package/payload/server/public/assets/{cytoscape.esm-Dob3eilA.js.br → cytoscape.esm-BZ6NYo0w.js.br} +0 -0
  779. /package/payload/server/public/assets/{cytoscape.esm-Dob3eilA.js.gz → cytoscape.esm-BZ6NYo0w.js.gz} +0 -0
  780. /package/payload/server/public/assets/{defaultLocale-BNILPWh2.js → defaultLocale-DWHqsa6O.js} +0 -0
  781. /package/payload/server/public/assets/{defaultLocale-BNILPWh2.js.br → defaultLocale-DWHqsa6O.js.br} +0 -0
  782. /package/payload/server/public/assets/{defaultLocale-BNILPWh2.js.gz → defaultLocale-DWHqsa6O.js.gz} +0 -0
  783. /package/payload/server/public/assets/{file-download-CN4H4Eih.js → file-download-B7zwa78w.js} +0 -0
  784. /package/payload/server/public/assets/{file-download-CN4H4Eih.js.br → file-download-B7zwa78w.js.br} +0 -0
  785. /package/payload/server/public/assets/{file-download-CN4H4Eih.js.gz → file-download-B7zwa78w.js.gz} +0 -0
  786. /package/payload/server/public/assets/{init-ve51bpJo.js → init-BdkYWjJJ.js} +0 -0
  787. /package/payload/server/public/assets/{init-ve51bpJo.js.br → init-BdkYWjJJ.js.br} +0 -0
  788. /package/payload/server/public/assets/{init-ve51bpJo.js.gz → init-BdkYWjJJ.js.gz} +0 -0
  789. /package/payload/server/public/assets/{katex-CJNaolDQ.js → katex-BCzoGtFh.js} +0 -0
  790. /package/payload/server/public/assets/{katex-CJNaolDQ.js.br → katex-BCzoGtFh.js.br} +0 -0
  791. /package/payload/server/public/assets/{katex-CJNaolDQ.js.gz → katex-BCzoGtFh.js.gz} +0 -0
  792. /package/payload/server/public/assets/{path-B4emajHp.js → path-DY2qBuPM.js} +0 -0
  793. /package/payload/server/public/assets/{path-B4emajHp.js.br → path-DY2qBuPM.js.br} +0 -0
  794. /package/payload/server/public/assets/{path-B4emajHp.js.gz → path-DY2qBuPM.js.gz} +0 -0
  795. /package/payload/server/public/assets/{preload-helper-3YNEDsJZ.js → preload-helper-eAV8hweq.js} +0 -0
  796. /package/payload/server/public/assets/{preload-helper-3YNEDsJZ.js.br → preload-helper-eAV8hweq.js.br} +0 -0
  797. /package/payload/server/public/assets/{preload-helper-3YNEDsJZ.js.gz → preload-helper-eAV8hweq.js.gz} +0 -0
  798. /package/payload/server/public/assets/{rough.esm-zabqYs6f.js → rough.esm-ec8xsRC7.js} +0 -0
  799. /package/payload/server/public/assets/{rough.esm-zabqYs6f.js.br → rough.esm-ec8xsRC7.js.br} +0 -0
  800. /package/payload/server/public/assets/{rough.esm-zabqYs6f.js.gz → rough.esm-ec8xsRC7.js.gz} +0 -0
@@ -106,16 +106,4 @@ export declare function postWithRetry(attempt: () => Promise<boolean>, opts: {
106
106
  * Falls back to the bare status when the body carries no usable reason. (No
107
107
  * terminal/logged-out branch — there is no external transport to log out of.) */
108
108
  export declare function buildReplyError(status: number, body: unknown): string;
109
- export declare const INTERNAL_LEAK_PATTERNS: {
110
- name: string;
111
- re: RegExp;
112
- }[];
113
- export interface Redaction {
114
- pattern: string;
115
- match: string;
116
- }
117
- export declare function redactInternalLeaks(text: string): {
118
- clean: string;
119
- redactions: Redaction[];
120
- };
121
109
  //# sourceMappingURL=notification.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"AAyBA,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAEvF;;uEAEuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,YAAY,EAAE,MA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AAA;CAAE,GAAG,OAAO,CAErE;AAED;;;mCAGmC;AACnC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAE7F;AAED;;;2DAG2D;AAC3D,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAEpC;AAID;;;;cAIc;AACd,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,EAC/B,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,GAChF,OAAO,CAAC,OAAO,CAAC,CAMlB;AAED;;kFAEkF;AAClF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAIrE"}
@@ -142,33 +142,12 @@ export function buildReplyError(status, body) {
142
142
  const reason = typeof b?.error === 'string' && b.error.length > 0 ? b.error : null;
143
143
  return reason ? `reply: ${reason}` : `reply: gateway returned ${status}`;
144
144
  }
145
- // Runtime internal-leak guard. The build-time gate check-no-task-id-leaks.mjs
146
- // scans source strings; it cannot catch a task number, repo path, or log tag the
147
- // model generates at runtime inside a reply. This is its runtime complement: it
148
- // redacts those patterns from outbound operator text before the reply leaves the
149
- // box. Precision the 2-digit floor on task numbers keeps "Task 3 on your list"
150
- // and a price "£829" out; the hyphen requirement on bracket tags keeps
151
- // "[urgent]" out; `.js` is not a source-file match (only `.ts`/`.tsx`), and the
152
- // built bundle server.js is matched explicitly. repo-path is ordered before
153
- // source-file so a full path like platform/ui/app/page.tsx redacts as ONE match,
154
- // not path + filename.
155
- export const INTERNAL_LEAK_PATTERNS = [
156
- { name: 'task-id', re: /\bTasks?[\s-]+\d{2,4}\b/g },
157
- { name: 'repo-path', re: /\bplatform\/[A-Za-z0-9_./-]+/g },
158
- { name: 'bundle', re: /\bserver\.(?:js|cjs|mjs)\b/g },
159
- { name: 'source-file', re: /\b[A-Za-z0-9_-]+\.tsx?\b/g },
160
- { name: 'log-tag', re: /\[[a-z]+(?:-[a-z]+)+\]/g },
161
- { name: 'op-tag', re: /\bop=[a-z][a-z-]*\b/g },
162
- ];
163
- export function redactInternalLeaks(text) {
164
- const redactions = [];
165
- let clean = text;
166
- for (const { name, re } of INTERNAL_LEAK_PATTERNS) {
167
- clean = clean.replace(re, (m) => {
168
- redactions.push({ pattern: name, match: m });
169
- return '[redacted]';
170
- });
171
- }
172
- return { clean, redactions };
173
- }
145
+ // Task 2495 — the runtime internal-leak guard moved out of this file. Task 834
146
+ // put it here to wrap the reply tool; Task 2078 retired that tool and Task 2521
147
+ // removed the turn-end POST, which left the list here with only server.ts's
148
+ // uncalled `guardOutbound` reading it. Nothing this door sends passes through
149
+ // this module any more, so the guard now lives beside the code that does send:
150
+ // platform/ui/app/lib/channel-delivery/outbound-guard.ts, applied in the
151
+ // emitter's fan-out branch. The whatsapp and webchat copies stay where they are
152
+ // WhatsApp's `send-to-party` tool still calls its own.
174
153
  //# sourceMappingURL=notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.js","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,iFAAiF;AACjF,yEAAyE;AACzE,gCAAgC;AAChC,EAAE;AACF,6EAA6E;AAC7E,iFAAiF;AACjF,gEAAgE;AAChE,6EAA6E;AAC7E,8EAA8E;AAC9E,gFAAgF;AAChF,kFAAkF;AAClF,iFAAiF;AACjF,kFAAkF;AAClF,+EAA+E;AAC/E,2FAA2F;AAC3F,+EAA+E;AAC/E,iFAAiF;AACjF,iFAA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I,OAAO,CAAC,IAAI,CAAC,CAO1C"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAmBA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAuClE,eAAO,MAAM,YAAY,QAA4B,CAAA;AAErD,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWf,CAAA;AAsDD,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4GtD;AAED,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAO1C"}
@@ -19,7 +19,7 @@ import { pathToFileURL } from 'node:url';
19
19
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
20
20
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
21
21
  import { ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js';
22
- import { acceptsKey, composeContent, buildReceivedPostBody, redactInternalLeaks, postWithRetry, } from './notification.js';
22
+ import { acceptsKey, composeContent, buildReceivedPostBody, postWithRetry, } from './notification.js';
23
23
  import { findJsonlForSessionId } from './jsonl.js';
24
24
  import { channelInstructions, resolveChannelRole } from './instructions.js';
25
25
  function requireEnv(name) {
@@ -80,16 +80,13 @@ mcp.oninitialized = () => {
80
80
  // to the gateway, which sends it to the chat. This server registers no tools at
81
81
  // all, so a Telegram spawn's whole surface is what the harness gives it.
82
82
  mcp.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [] }));
83
- // Redact internal-leak patterns from outbound operator text and log each
84
- // redaction before it leaves the box. Task 2078 the turn-end path is its only
85
- // caller now; it used to guard the reply tool as well.
86
- function guardOutbound(text) {
87
- const { clean, redactions } = redactInternalLeaks(text);
88
- for (const r of redactions) {
89
- console.error(`[channel-guard] op=redact senderId=${KEY} pattern=${r.pattern} bytes=${Buffer.byteLength(r.match, 'utf8')}`);
90
- }
91
- return clean;
92
- }
83
+ // Task 2495 `guardOutbound` is gone from this file. It survived Task 2078's
84
+ // retirement of the reply tool by guarding the turn-end text instead, and then
85
+ // Task 2521 removed the turn-end POST without removing it, so it sat here with
86
+ // no caller: a guard that read as protection and redacted nothing. This server
87
+ // sends no text at all now, so it has nothing to guard. The redaction runs where
88
+ // the answer actually leaves — the ui-server emitter's fan-out branch, see
89
+ // platform/ui/app/lib/channel-delivery/outbound-guard.ts.
93
90
  // Task 2078 — this server registers no tools, so every call is unknown. The
94
91
  // handler stays registered rather than being removed: without it a call would
95
92
  // fail as an unimplemented METHOD, which reads as a broken server, where this
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA,gFAAgF;AAChF,0EAA0E;AAC1E,eAAe;AACf,2EAA2E;AAC3E,uDAAuD;AACvD,4EAA4E;AAC5E,kFAAkF;AAClF,iFAAiF;AACjF,iFAAiF;AACjF,EAAE;AACF,oEAAoE;AACpE,gFAAgF;AAChF,8EAA8E;AAC9E,kEAAkE;AAClE,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,aAAa,GAAyB,MAAM,mBAAmB,CAAA;AAChJ,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3E,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CA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AC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAC7G,CAAA;QACH,CAAC;QACD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;IAC3D,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACxB,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAA;IAC7C,0EAA0E;IAC1E,yEAAyE;IACzE,uEAAuE;IACvE,eAAe;IACf,MAAM,gBAAgB,EAAE,CAAA;AAC1B,CAAC;AAED,+EAA+E;AAC/E,2EAA2E;AAC3E,2EAA2E;AAC3E,wBAAwB;AACxB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7F,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,6BAA6B,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC9F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -5,13 +5,13 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Activity — Maxy</title>
7
7
  <link rel="icon" href="/favicon.ico">
8
- <script type="module" crossorigin src="/assets/activity-BJxhblz-.js"></script>
9
- <link rel="modulepreload" crossorigin href="/assets/chunk-DlZTsV_O.js">
10
- <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-5lmxFBIw.js">
11
- <link rel="modulepreload" crossorigin href="/assets/useMediaQuery-BQslddHQ.js">
12
- <link rel="modulepreload" crossorigin href="/assets/AdminShell-D-wB90c3.js">
13
- <link rel="modulepreload" crossorigin href="/assets/triangle-alert-BnC67uSs.js">
14
- <link rel="stylesheet" crossorigin href="/assets/jsx-runtime-DxsQ5Y-z.css">
8
+ <script type="module" crossorigin src="/assets/activity-BL6qbB9a.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/assets/chunk-BycB0eMI.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-YcUntiud.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/useMediaQuery-BmG090FR.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/AdminShell-C_M7YE5Z.js">
13
+ <link rel="modulepreload" crossorigin href="/assets/triangle-alert-CrZ1ewbd.js">
14
+ <link rel="stylesheet" crossorigin href="/assets/jsx-runtime-ChVh0xOm.css">
15
15
  <link rel="stylesheet" crossorigin href="/assets/useMediaQuery-DXAuc8G-.css">
16
16
  <link rel="stylesheet" href="/brand-defaults.css">
17
17
  </head>
@@ -5,12 +5,12 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Agents — Maxy</title>
7
7
  <link rel="icon" href="/favicon.ico">
8
- <script type="module" crossorigin src="/assets/agents-DTL8kjfD.js"></script>
9
- <link rel="modulepreload" crossorigin href="/assets/chunk-DlZTsV_O.js">
10
- <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-5lmxFBIw.js">
11
- <link rel="modulepreload" crossorigin href="/assets/useMediaQuery-BQslddHQ.js">
12
- <link rel="modulepreload" crossorigin href="/assets/AdminShell-D-wB90c3.js">
13
- <link rel="stylesheet" crossorigin href="/assets/jsx-runtime-DxsQ5Y-z.css">
8
+ <script type="module" crossorigin src="/assets/agents-BzhfKZDN.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/assets/chunk-BycB0eMI.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-YcUntiud.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/useMediaQuery-BmG090FR.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/AdminShell-C_M7YE5Z.js">
13
+ <link rel="stylesheet" crossorigin href="/assets/jsx-runtime-ChVh0xOm.css">
14
14
  <link rel="stylesheet" crossorigin href="/assets/useMediaQuery-DXAuc8G-.css">
15
15
  <link rel="stylesheet" href="/brand-defaults.css">
16
16
  </head>
@@ -1 +1 @@
1
- import{o as e}from"./chunk-DlZTsV_O.js";import{i as t,t as n}from"./jsx-runtime-5lmxFBIw.js";import{O as r,Q as i,et as a,rt as o}from"./useMediaQuery-BQslddHQ.js";import{A as s}from"./useVoiceRecorder-BeZNQEC4.js";import{A as c,O as l,k as u,p as d}from"./AdminShell-D-wB90c3.js";var f=e(t(),1);function p(e=`admin`){let[t,n]=(0,f.useState)(`loading`),[r,i]=(0,f.useState)(``),[a,l]=(0,f.useState)(``),[u,d]=(0,f.useState)(``),[p,m]=(0,f.useState)(!1),[h,g]=(0,f.useState)(!1),[_,v]=(0,f.useState)(!1),[y,b]=(0,f.useState)(!1),[x,S]=(0,f.useState)(!1),[C,w]=(0,f.useState)(null),[T,E]=(0,f.useState)(null),[D,O]=(0,f.useState)(void 0),[k,A]=(0,f.useState)(null),[j,M]=(0,f.useState)(void 0),[N,P]=(0,f.useState)(null),[F,I]=(0,f.useState)(null),[L,R]=(0,f.useState)(void 0),z=(0,f.useRef)(void 0),[B,V]=(0,f.useState)(!1),[H,U]=(0,f.useState)(!0);(0,f.useEffect)(()=>{typeof window>`u`||fetch(`/api/remote-auth/status`).then(e=>e.ok?e.json():null).then(e=>{e?.configured&&V(!0)}).catch(()=>{})},[]);let W=(0,f.useRef)(null),G=(0,f.useRef)(null);(0,f.useEffect)(()=>{async function e(){let e=null;try{e=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!e)return!1;try{let t=await fetch(`/api/admin/session?session_key=${encodeURIComponent(e)}`);if(t.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}return!1}if(!t.ok)return!1;let r=await t.json();w(r.session_key),I(r.sessionId??null),O(r.businessName),A(r.role??null),M(r.userName===void 0?null:r.userName),P(r.avatar??null);let i=s(r.thinkingView);return z.current=i,R(i),n(`chat`),!0}catch(e){return console.error(`[admin] session restore failed:`,e),!1}}async function t(r=2){try{let i=await fetch(`/api/health`);if(!i.ok){if(r>0)return await new Promise(e=>setTimeout(e,1500)),t(r-1);console.error(`[admin] health check returned ${i.status} after retries`),n(`set-pin`);return}let a=await i.json();if(!a.pin_configured){n(`set-pin`);return}U(!!a.claude_authenticated);let o=!1;try{o=new URLSearchParams(window.location.search).get(`connect`)===`claude`}catch{}if(o){try{let e=new URL(window.location.href);e.searchParams.delete(`connect`),window.history.replaceState(null,``,e.pathname+e.search+e.hash)}catch{}if(!a.claude_authenticated){n(`connect-claude`);return}}if(await e())return;n(`enter-pin`)}catch(e){if(r>0)return await new Promise(e=>setTimeout(e,1500)),t(r-1);console.error(`[admin] health check failed:`,e),n(`set-pin`)}}t()},[]),(0,f.useEffect)(()=>{t===`chat`&&C&&fetch(`/api/admin/claude-info?session_key=${encodeURIComponent(C)}`).then(e=>{if(e.ok)return e.json()}).then(e=>{e&&E(e)}).catch(()=>{})},[t,C]);let K=(0,f.useRef)(null);(0,f.useEffect)(()=>{if(t!==`chat`)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/health`);if(e.ok){let t=await e.json();U(t.auth_status!==`dead`&&t.auth_status!==`missing`)}}catch{}if(C)try{let e=await fetch(`/api/admin/session?session_key=${encodeURIComponent(C)}`);if(e.status!==401)return;let t=(await e.clone().json().catch(()=>null))?.code??`unknown-401`;if(t===`remote-auth-required`){o(`heartbeat`,`/api/admin/session`);return}console.warn(`[admin-auth] outcome=heartbeat-detected-expiry code=${t}`),K.current?.()}catch{}},300*1e3);return()=>clearInterval(e)},[t,C]),(0,f.useEffect)(()=>{t===`connect-claude`&&fetch(`/api/health`).then(e=>e.ok?e.json():null).then(e=>{e?.claude_authenticated&&(U(!0),n(`enter-pin`))}).catch(()=>{})},[t]);async function q(e,t){g(!0);try{let r=await fetch(`/api/admin/session`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({pin:e,...t?{accountId:t}:{}})});if(!r.ok){let e=await r.json().catch(()=>({}));if(r.status===401&&e?.code===`remote-auth-required`){o(`enter-pin`,`/api/admin/session`);return}d(e.error||`Invalid PIN`);return}let a=await r.json();w(a.session_key),I(a.sessionId??null),O(a.businessName),A(a.role??null),M(a.userName===void 0?null:a.userName),P(a.avatar??null);let c=s(a.thinkingView);z.current=c,R(c);try{sessionStorage.setItem(`maxy-admin-session-key`,a.session_key)}catch{}i(``),n(`chat`)}catch(e){console.error(`[admin] connection error:`,e),d(`Could not connect.`)}finally{g(!1)}}let J=(0,f.useCallback)(async e=>{if(e.preventDefault(),h)return;d(``);let t=a.trim();if(!t){d(`Please enter your name.`);return}if(r.length<4){d(`PIN must be at least 4 characters.`);return}let s=r;g(!0);try{let e=await fetch(`/api/onboarding/set-pin`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({pin:s,name:t})});if(!e.ok){let t=await e.json().catch(()=>({}));if(e.status===401&&t?.code===`remote-auth-required`){o(`set-pin`,`/api/onboarding/set-pin`);return}if(e.status===409){try{let e=await fetch(`/api/health`);if(e.ok){let r=await e.json();r.pin_configured&&r.claude_authenticated?n(`enter-pin`):r.pin_configured?n(`connect-claude`):d(t.error||`Failed to set PIN.`)}else n(`enter-pin`)}catch{n(`enter-pin`)}return}d(t.error||`Failed to set PIN.`);return}let r=await fetch(`/api/health`);if((r.ok?await r.json():null)?.claude_authenticated){await q(s);return}i(``),n(`connect-claude`)}catch(e){console.error(`[admin] connection error:`,e),d(`Could not connect.`)}finally{g(!1)}},[r,h,a]),Y=(0,f.useCallback)(async e=>{e.preventDefault(),d(``),await q(r)},[r]),X=(0,f.useCallback)(async()=>{S(!0);try{if(!await c())return console.warn(`[admin-ui] claude-disconnect not verified — credentials may persist; staying put`),!1;U(!1),w(null),A(null),M(void 0),P(null);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}return n(`connect-claude`),!0}finally{S(!1)}},[]),Z=(0,f.useCallback)(()=>{w(null),A(null),M(void 0),P(null);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}i(``),d(``),n(`enter-pin`)},[]);return(0,f.useEffect)(()=>{K.current=Z},[Z]),{appState:t,setAppState:n,pin:r,setPin:i,operatorName:a,setOperatorName:l,pinError:u,setPinError:d,showPin:p,setShowPin:m,pinLoading:h,authPolling:_,setAuthPolling:v,authLoading:y,setAuthLoading:b,disconnecting:x,cacheKey:C,setCacheKey:w,claudeInfo:T,setClaudeInfo:E,businessName:D,role:k,userName:j,userAvatar:N,sessionId:F,setSessionId:I,expandAll:L,setExpandAll:R,expandAllDefaultRef:z,remoteAuthEnabled:B,claudeConnected:H,pinInputRef:W,setPinFormRef:G,handleSetPin:J,handleLogin:Y,handleDisconnect:X,handleLogout:Z}}var m=n();function h({inputRef:e,value:t,onChange:n,onComplete:r,showPin:i,autoFocus:a}){let o=(0,f.useRef)([]);function s(e,r){r.key===`Backspace`?(r.preventDefault(),t[e]?n(t.slice(0,e)+t.slice(e+1)):e>0&&(n(t.slice(0,e-1)+t.slice(e)),o.current[e-1]?.focus())):r.key===`ArrowLeft`&&e>0?o.current[e-1]?.focus():r.key===`ArrowRight`&&e<5?o.current[e+1]?.focus():r.key===`Enter`&&(r.preventDefault(),r.currentTarget.form?.requestSubmit())}function c(e,i){let a=i.nativeEvent.data;if(!a||!/^\d$/.test(a))return;let s=t.split(``);for(s[e]=a;s.length<e;)s.push(``);let c=s.join(``).replace(/\D/g,``).slice(0,6);n(c),c.length===6?r?.(c):e<5&&o.current[e+1]?.focus()}function l(e){e.preventDefault();let t=e.clipboardData.getData(`text`).replace(/\D/g,``).slice(0,6);t&&(n(t),t.length===6?r?.(t):o.current[t.length]?.focus())}return(0,m.jsx)(`div`,{className:`pin-field`,children:Array.from({length:6}).map((n,r)=>(0,m.jsx)(`input`,{ref:t=>{o.current[r]=t,r===0&&e&&(e.current=t)},type:`text`,inputMode:`numeric`,className:`pin-box${t[r]?` pin-box-filled`:``}`,value:t[r]?i?t[r]:`•`:``,onKeyDown:e=>s(r,e),onInput:e=>c(r,e),onPaste:l,onFocus:e=>e.target.select(),autoFocus:a&&r===0,autoComplete:`off`,maxLength:1,"aria-label":`PIN digit ${r+1}`},r))})}function g(e){let{pin:t,setPin:n,showPin:r,setShowPin:o,pinLoading:s,pinError:c,pinInputRef:d,setPinFormRef:f,onSubmit:p,operatorName:g,setOperatorName:_}=e;return(0,m.jsx)(`div`,{className:`connect-page`,children:(0,m.jsxs)(`div`,{className:`connect-content`,children:[(0,m.jsx)(`img`,{src:a,alt:i.productName,className:`connect-logo connect-logo--maxy`}),!i.logoContainsName&&(0,m.jsxs)(`h1`,{className:`connect-title`,children:[`Welcome to `,i.productName]}),(0,m.jsxs)(`p`,{className:`connect-subtitle`,children:[`Tell `,i.productName,` who you are, then choose a PIN.`]}),(0,m.jsxs)(`form`,{ref:f,onSubmit:p,className:`connect-pin-form`,children:[(0,m.jsxs)(`div`,{className:`pin-input-row`,children:[(0,m.jsx)(`input`,{type:`text`,className:`connect-name-input`,placeholder:`Your full name`,value:g,onChange:e=>_(e.target.value),autoComplete:`name`,autoFocus:!0,required:!0,"aria-label":`Your full name`}),(0,m.jsx)(`div`,{style:{width:38,flexShrink:0},"aria-hidden":`true`})]}),(0,m.jsxs)(`div`,{className:`pin-input-row`,children:[(0,m.jsx)(h,{inputRef:d,value:t,onChange:n,onComplete:()=>{},showPin:r}),(0,m.jsx)(l,{variant:`send`,type:`submit`,disabled:!t||!g.trim(),loading:s,"aria-label":`Set PIN`,children:(0,m.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,m.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,m.jsx)(`polyline`,{points:`12 5 19 12 12 19`})]})})]}),(0,m.jsx)(u,{checked:r,onChange:()=>o(e=>!e),label:`Show PIN`})]}),c&&(0,m.jsx)(`p`,{className:`admin-pin-error`,children:c})]})})}function _(e){let{pin:t,setPin:n,showPin:r,setShowPin:o,pinLoading:s,pinError:c,pinInputRef:d,onSubmit:f,remoteAuthEnabled:p,onSignOutRemote:g}=e;return(0,m.jsxs)(`div`,{className:`connect-page`,children:[p&&g&&(0,m.jsx)(`button`,{type:`button`,className:`connect-signout`,onClick:g,children:`Sign out`}),(0,m.jsxs)(`div`,{className:`connect-content`,children:[(0,m.jsx)(`img`,{src:a,alt:i.productName,className:`connect-logo connect-logo--maxy`}),!i.logoContainsName&&(0,m.jsx)(`h1`,{className:`connect-title`,children:i.productName}),(0,m.jsxs)(`form`,{onSubmit:f,className:`connect-pin-form`,children:[(0,m.jsxs)(`div`,{className:`pin-input-row`,children:[(0,m.jsx)(h,{inputRef:d,value:t,onChange:n,onComplete:()=>{},showPin:r,autoFocus:!0}),(0,m.jsx)(l,{variant:`send`,type:`submit`,disabled:!t,loading:s,children:(0,m.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,m.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,m.jsx)(`polyline`,{points:`12 5 19 12 12 19`})]})})]}),(0,m.jsx)(`div`,{className:`pin-options`,children:(0,m.jsx)(u,{checked:r,onChange:()=>o(e=>!e),label:`Show PIN`})})]}),c&&(0,m.jsx)(`p`,{className:`admin-pin-error`,children:c})]})]})}function v(e){let{authPolling:t,setAuthPolling:n,authLoading:r,setAuthLoading:o,pinError:s,setPinError:c,setAppState:u}=e,[p,h]=(0,f.useState)(!1),[g,_]=(0,f.useState)(!1),[v,y]=(0,f.useState)(``),[b,x]=(0,f.useState)(``),[S,C]=(0,f.useState)(``),[w,T]=(0,f.useState)(null),[E,D]=(0,f.useState)(null),[O,k]=(0,f.useState)(!1);(0,f.useEffect)(()=>{try{D(sessionStorage.getItem(`maxy-admin-session-key`))}catch{}k(!0)},[]);async function A(){C(``);try{let e=await(await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`paste-code`,code:b})})).json();e.accepted?(C(`Code submitted. Finishing sign-in…`),x(``)):C(e.error||`Could not submit code.`)}catch(e){console.error(`[admin] paste-code error:`,e),C(`Could not submit code.`)}}async function j(){_(!0),c(``);try{let e=await(await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`launch-browser`})})).json();e.launched?h(!0):e.error&&c(e.error)}catch(e){console.error(`[admin] browser launch error:`,e),c(`Could not launch browser.`)}_(!1)}async function M(){o(!0),c(``);try{let e=await(await fetch(`/api/onboarding/claude-auth`,{method:`POST`})).json();if(e.started){n(!0),h(!0),o(!1),y(e.transport||``);for(let e=0;e<120;e++){await new Promise(e=>setTimeout(e,2e3));let e=await(await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`wait`})})).json();if(typeof e.authTargetId==`string`&&T(e.authTargetId),e.authenticated){await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`stop`})}),u(`enter-pin`);return}}c(`Timed out waiting for sign-in. Try again.`),n(!1)}else e.error&&c(e.error)}catch(e){console.error(`[admin] auth flow error:`,e),c(`Could not start auth flow.`)}o(!1)}async function N(){await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`stop`})}),n(!1),c(``)}return t||p?(0,m.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100dvh`,overflow:`auto`},children:[(0,m.jsxs)(`header`,{className:`chat-header`,style:{paddingBottom:`12px`,flexShrink:0,position:`relative`,maxWidth:`680px`,width:`100%`,margin:`0 auto`,padding:`24px 20px 12px`},children:[t?(0,m.jsx)(`button`,{onClick:N,style:{position:`absolute`,top:`12px`,right:`12px`,background:`none`,border:`none`,color:`#999`,fontSize:`13px`,cursor:`pointer`,padding:`4px 8px`},"aria-label":`Cancel`,children:`✕`}):(0,m.jsx)(`button`,{onClick:()=>h(!1),style:{position:`absolute`,top:`12px`,right:`12px`,background:`none`,border:`none`,color:`#999`,fontSize:`13px`,cursor:`pointer`,padding:`4px 8px`},"aria-label":`Close browser`,children:`✕`}),(0,m.jsx)(`img`,{src:`/brand/claude.png`,alt:`Claude`,className:`chat-logo`}),(0,m.jsx)(`h1`,{className:`chat-tagline`,children:`Connect Claude`}),(0,m.jsx)(`p`,{className:`chat-intro`,children:t?`Sign in and authorize in the browser below.`:`Open your email or prepare your accounts, then sign in.`}),!t&&(0,m.jsx)(`div`,{style:{marginTop:`12px`},children:(0,m.jsx)(l,{variant:`primary`,onClick:M,disabled:r,children:r?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`span`,{className:`spin`,style:{display:`inline-block`},children:`✱`}),` Connecting…`]}):`Sign in to Claude`})}),t&&v===`native`&&(0,m.jsxs)(`div`,{style:{marginTop:`14px`,maxWidth:`420px`,margin:`14px auto 0`,display:`flex`,flexDirection:`column`,gap:`8px`},children:[(0,m.jsx)(`label`,{style:{fontSize:`12px`,color:`#999`,lineHeight:1.4},children:`If the browser didn't finish sign-in, paste the code or full redirect URL from Claude's page:`}),(0,m.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[(0,m.jsx)(`input`,{type:`text`,value:b,onChange:e=>x(e.target.value),placeholder:`Paste code or redirect URL`,style:{flex:1,padding:`8px 10px`,fontSize:`13px`,border:`1px solid #ccc`,borderRadius:`6px`}}),(0,m.jsx)(l,{variant:`primary`,onClick:A,disabled:!b.trim(),children:`Submit`})]}),S&&(0,m.jsx)(`p`,{style:{fontSize:`12px`,color:`#999`,margin:0},children:S})]})]}),(0,m.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,minHeight:0,gap:`10px`,padding:`0 0 16px`},children:O&&(0,m.jsx)(d,{preferTargetId:w,cacheKey:E,chrome:!1})}),s&&(0,m.jsx)(`p`,{className:`admin-pin-error`,style:{textAlign:`center`,padding:`0 20px 16px`},children:s})]}):(0,m.jsx)(`div`,{className:`connect-page`,children:(0,m.jsxs)(`div`,{className:`connect-content`,children:[(0,m.jsxs)(`div`,{className:`connect-logos`,children:[(0,m.jsx)(`div`,{className:`connect-logo-wrap`,children:(0,m.jsx)(`img`,{src:`/brand/claude.png`,alt:`Claude`,className:`connect-logo`})}),(0,m.jsx)(`svg`,{className:`connect-arrow`,viewBox:`0 0 48 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,m.jsx)(`path`,{d:`M0 12h44m0 0l-8-8m8 8l-8 8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,m.jsxs)(`div`,{className:`connect-logo-wrap`,children:[(0,m.jsx)(`img`,{src:a,alt:i.productName,className:`connect-logo connect-logo--maxy`}),!i.logoContainsName&&(0,m.jsx)(`span`,{className:`connect-logo-label`,children:i.productName})]})]}),(0,m.jsxs)(`h1`,{className:`connect-title`,children:[`Connect Claude to power `,i.productName]}),(0,m.jsx)(`p`,{className:`connect-subtitle`,children:`Sign in with your Anthropic account to get started.`}),(0,m.jsx)(l,{variant:`primary`,onClick:M,disabled:r,children:r?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`span`,{className:`spin`,style:{display:`inline-block`},children:`✱`}),` Connecting…`]}):`Sign in to Claude`}),(0,m.jsx)(`p`,{style:{marginTop:`6px`,fontSize:`11px`,color:`#999`,maxWidth:`300px`,textAlign:`center`,lineHeight:`1.4`},children:`First time? You may need to sign into your email and Anthropic account in the browser before connecting.`}),(0,m.jsx)(`button`,{onClick:j,disabled:g,style:{marginTop:`12px`,background:`none`,border:`none`,color:`var(--color-primary, #666)`,fontSize:`13px`,cursor:`pointer`,textDecoration:`underline`,textUnderlineOffset:`3px`},children:g?`Launching…`:`Open browser first`}),s&&(0,m.jsx)(`p`,{className:`admin-pin-error`,children:s})]})})}function y({auth:e}){return e.appState===`loading`?(0,m.jsx)(r,{surface:`gate`}):e.appState===`set-pin`?(0,m.jsx)(g,{pin:e.pin,setPin:e.setPin,showPin:e.showPin,setShowPin:e.setShowPin,pinLoading:e.pinLoading,pinError:e.pinError,pinInputRef:e.pinInputRef,setPinFormRef:e.setPinFormRef,onSubmit:e.handleSetPin,operatorName:e.operatorName,setOperatorName:e.setOperatorName}):e.appState===`connect-claude`?(0,m.jsx)(v,{authPolling:e.authPolling,setAuthPolling:e.setAuthPolling,authLoading:e.authLoading,setAuthLoading:e.setAuthLoading,pinError:e.pinError,setPinError:e.setPinError,setAppState:e.setAppState}):e.appState===`enter-pin`?(0,m.jsx)(_,{pin:e.pin,setPin:e.setPin,showPin:e.showPin,setShowPin:e.setShowPin,pinLoading:e.pinLoading,pinError:e.pinError,pinInputRef:e.pinInputRef,onSubmit:e.handleLogin,remoteAuthEnabled:e.remoteAuthEnabled,onSignOutRemote:()=>{window.location.href=`/__remote-auth/logout`}}):null}export{p as n,y as t};
1
+ import{o as e}from"./chunk-BycB0eMI.js";import{i as t,t as n}from"./jsx-runtime-YcUntiud.js";import{O as r,Q as i,et as a,rt as o}from"./useMediaQuery-BmG090FR.js";import{A as s}from"./useVoiceRecorder-9pf6FFJ-.js";import{A as c,O as l,k as u,p as d}from"./AdminShell-C_M7YE5Z.js";var f=e(t(),1);function p(e=`admin`){let[t,n]=(0,f.useState)(`loading`),[r,i]=(0,f.useState)(``),[a,l]=(0,f.useState)(``),[u,d]=(0,f.useState)(``),[p,m]=(0,f.useState)(!1),[h,g]=(0,f.useState)(!1),[_,v]=(0,f.useState)(!1),[y,b]=(0,f.useState)(!1),[x,S]=(0,f.useState)(!1),[C,w]=(0,f.useState)(null),[T,E]=(0,f.useState)(null),[D,O]=(0,f.useState)(void 0),[k,A]=(0,f.useState)(null),[j,M]=(0,f.useState)(void 0),[N,P]=(0,f.useState)(null),[F,I]=(0,f.useState)(null),[L,R]=(0,f.useState)(void 0),z=(0,f.useRef)(void 0),[B,V]=(0,f.useState)(!1),[H,U]=(0,f.useState)(!0);(0,f.useEffect)(()=>{typeof window>`u`||fetch(`/api/remote-auth/status`).then(e=>e.ok?e.json():null).then(e=>{e?.configured&&V(!0)}).catch(()=>{})},[]);let W=(0,f.useRef)(null),G=(0,f.useRef)(null);(0,f.useEffect)(()=>{async function e(){let e=null;try{e=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!e)return!1;try{let t=await fetch(`/api/admin/session?session_key=${encodeURIComponent(e)}`);if(t.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}return!1}if(!t.ok)return!1;let r=await t.json();w(r.session_key),I(r.sessionId??null),O(r.businessName),A(r.role??null),M(r.userName===void 0?null:r.userName),P(r.avatar??null);let i=s(r.thinkingView);return z.current=i,R(i),n(`chat`),!0}catch(e){return console.error(`[admin] session restore failed:`,e),!1}}async function t(r=2){try{let i=await fetch(`/api/health`);if(!i.ok){if(r>0)return await new Promise(e=>setTimeout(e,1500)),t(r-1);console.error(`[admin] health check returned ${i.status} after retries`),n(`set-pin`);return}let a=await i.json();if(!a.pin_configured){n(`set-pin`);return}U(!!a.claude_authenticated);let o=!1;try{o=new URLSearchParams(window.location.search).get(`connect`)===`claude`}catch{}if(o){try{let e=new URL(window.location.href);e.searchParams.delete(`connect`),window.history.replaceState(null,``,e.pathname+e.search+e.hash)}catch{}if(!a.claude_authenticated){n(`connect-claude`);return}}if(await e())return;n(`enter-pin`)}catch(e){if(r>0)return await new Promise(e=>setTimeout(e,1500)),t(r-1);console.error(`[admin] health check failed:`,e),n(`set-pin`)}}t()},[]),(0,f.useEffect)(()=>{t===`chat`&&C&&fetch(`/api/admin/claude-info?session_key=${encodeURIComponent(C)}`).then(e=>{if(e.ok)return e.json()}).then(e=>{e&&E(e)}).catch(()=>{})},[t,C]);let K=(0,f.useRef)(null);(0,f.useEffect)(()=>{if(t!==`chat`)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/health`);if(e.ok){let t=await e.json();U(t.auth_status!==`dead`&&t.auth_status!==`missing`)}}catch{}if(C)try{let e=await fetch(`/api/admin/session?session_key=${encodeURIComponent(C)}`);if(e.status!==401)return;let t=(await e.clone().json().catch(()=>null))?.code??`unknown-401`;if(t===`remote-auth-required`){o(`heartbeat`,`/api/admin/session`);return}console.warn(`[admin-auth] outcome=heartbeat-detected-expiry code=${t}`),K.current?.()}catch{}},300*1e3);return()=>clearInterval(e)},[t,C]),(0,f.useEffect)(()=>{t===`connect-claude`&&fetch(`/api/health`).then(e=>e.ok?e.json():null).then(e=>{e?.claude_authenticated&&(U(!0),n(`enter-pin`))}).catch(()=>{})},[t]);async function q(e,t){g(!0);try{let r=await fetch(`/api/admin/session`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({pin:e,...t?{accountId:t}:{}})});if(!r.ok){let e=await r.json().catch(()=>({}));if(r.status===401&&e?.code===`remote-auth-required`){o(`enter-pin`,`/api/admin/session`);return}d(e.error||`Invalid PIN`);return}let a=await r.json();w(a.session_key),I(a.sessionId??null),O(a.businessName),A(a.role??null),M(a.userName===void 0?null:a.userName),P(a.avatar??null);let c=s(a.thinkingView);z.current=c,R(c);try{sessionStorage.setItem(`maxy-admin-session-key`,a.session_key)}catch{}i(``),n(`chat`)}catch(e){console.error(`[admin] connection error:`,e),d(`Could not connect.`)}finally{g(!1)}}let J=(0,f.useCallback)(async e=>{if(e.preventDefault(),h)return;d(``);let t=a.trim();if(!t){d(`Please enter your name.`);return}if(r.length<4){d(`PIN must be at least 4 characters.`);return}let s=r;g(!0);try{let e=await fetch(`/api/onboarding/set-pin`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({pin:s,name:t})});if(!e.ok){let t=await e.json().catch(()=>({}));if(e.status===401&&t?.code===`remote-auth-required`){o(`set-pin`,`/api/onboarding/set-pin`);return}if(e.status===409){try{let e=await fetch(`/api/health`);if(e.ok){let r=await e.json();r.pin_configured&&r.claude_authenticated?n(`enter-pin`):r.pin_configured?n(`connect-claude`):d(t.error||`Failed to set PIN.`)}else n(`enter-pin`)}catch{n(`enter-pin`)}return}d(t.error||`Failed to set PIN.`);return}let r=await fetch(`/api/health`);if((r.ok?await r.json():null)?.claude_authenticated){await q(s);return}i(``),n(`connect-claude`)}catch(e){console.error(`[admin] connection error:`,e),d(`Could not connect.`)}finally{g(!1)}},[r,h,a]),Y=(0,f.useCallback)(async e=>{e.preventDefault(),d(``),await q(r)},[r]),X=(0,f.useCallback)(async()=>{S(!0);try{if(!await c())return console.warn(`[admin-ui] claude-disconnect not verified — credentials may persist; staying put`),!1;U(!1),w(null),A(null),M(void 0),P(null);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}return n(`connect-claude`),!0}finally{S(!1)}},[]),Z=(0,f.useCallback)(()=>{w(null),A(null),M(void 0),P(null);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}i(``),d(``),n(`enter-pin`)},[]);return(0,f.useEffect)(()=>{K.current=Z},[Z]),{appState:t,setAppState:n,pin:r,setPin:i,operatorName:a,setOperatorName:l,pinError:u,setPinError:d,showPin:p,setShowPin:m,pinLoading:h,authPolling:_,setAuthPolling:v,authLoading:y,setAuthLoading:b,disconnecting:x,cacheKey:C,setCacheKey:w,claudeInfo:T,setClaudeInfo:E,businessName:D,role:k,userName:j,userAvatar:N,sessionId:F,setSessionId:I,expandAll:L,setExpandAll:R,expandAllDefaultRef:z,remoteAuthEnabled:B,claudeConnected:H,pinInputRef:W,setPinFormRef:G,handleSetPin:J,handleLogin:Y,handleDisconnect:X,handleLogout:Z}}var m=n();function h({inputRef:e,value:t,onChange:n,onComplete:r,showPin:i,autoFocus:a}){let o=(0,f.useRef)([]);function s(e,r){r.key===`Backspace`?(r.preventDefault(),t[e]?n(t.slice(0,e)+t.slice(e+1)):e>0&&(n(t.slice(0,e-1)+t.slice(e)),o.current[e-1]?.focus())):r.key===`ArrowLeft`&&e>0?o.current[e-1]?.focus():r.key===`ArrowRight`&&e<5?o.current[e+1]?.focus():r.key===`Enter`&&(r.preventDefault(),r.currentTarget.form?.requestSubmit())}function c(e,i){let a=i.nativeEvent.data;if(!a||!/^\d$/.test(a))return;let s=t.split(``);for(s[e]=a;s.length<e;)s.push(``);let c=s.join(``).replace(/\D/g,``).slice(0,6);n(c),c.length===6?r?.(c):e<5&&o.current[e+1]?.focus()}function l(e){e.preventDefault();let t=e.clipboardData.getData(`text`).replace(/\D/g,``).slice(0,6);t&&(n(t),t.length===6?r?.(t):o.current[t.length]?.focus())}return(0,m.jsx)(`div`,{className:`pin-field`,children:Array.from({length:6}).map((n,r)=>(0,m.jsx)(`input`,{ref:t=>{o.current[r]=t,r===0&&e&&(e.current=t)},type:`text`,inputMode:`numeric`,className:`pin-box${t[r]?` pin-box-filled`:``}`,value:t[r]?i?t[r]:`•`:``,onKeyDown:e=>s(r,e),onInput:e=>c(r,e),onPaste:l,onFocus:e=>e.target.select(),autoFocus:a&&r===0,autoComplete:`off`,maxLength:1,"aria-label":`PIN digit ${r+1}`},r))})}function g(e){let{pin:t,setPin:n,showPin:r,setShowPin:o,pinLoading:s,pinError:c,pinInputRef:d,setPinFormRef:f,onSubmit:p,operatorName:g,setOperatorName:_}=e;return(0,m.jsx)(`div`,{className:`connect-page`,children:(0,m.jsxs)(`div`,{className:`connect-content`,children:[(0,m.jsx)(`img`,{src:a,alt:i.productName,className:`connect-logo connect-logo--maxy`}),!i.logoContainsName&&(0,m.jsxs)(`h1`,{className:`connect-title`,children:[`Welcome to `,i.productName]}),(0,m.jsxs)(`p`,{className:`connect-subtitle`,children:[`Tell `,i.productName,` who you are, then choose a PIN.`]}),(0,m.jsxs)(`form`,{ref:f,onSubmit:p,className:`connect-pin-form`,children:[(0,m.jsxs)(`div`,{className:`pin-input-row`,children:[(0,m.jsx)(`input`,{type:`text`,className:`connect-name-input`,placeholder:`Your full name`,value:g,onChange:e=>_(e.target.value),autoComplete:`name`,autoFocus:!0,required:!0,"aria-label":`Your full name`}),(0,m.jsx)(`div`,{style:{width:38,flexShrink:0},"aria-hidden":`true`})]}),(0,m.jsxs)(`div`,{className:`pin-input-row`,children:[(0,m.jsx)(h,{inputRef:d,value:t,onChange:n,onComplete:()=>{},showPin:r}),(0,m.jsx)(l,{variant:`send`,type:`submit`,disabled:!t||!g.trim(),loading:s,"aria-label":`Set PIN`,children:(0,m.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,m.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,m.jsx)(`polyline`,{points:`12 5 19 12 12 19`})]})})]}),(0,m.jsx)(u,{checked:r,onChange:()=>o(e=>!e),label:`Show PIN`})]}),c&&(0,m.jsx)(`p`,{className:`admin-pin-error`,children:c})]})})}function _(e){let{pin:t,setPin:n,showPin:r,setShowPin:o,pinLoading:s,pinError:c,pinInputRef:d,onSubmit:f,remoteAuthEnabled:p,onSignOutRemote:g}=e;return(0,m.jsxs)(`div`,{className:`connect-page`,children:[p&&g&&(0,m.jsx)(`button`,{type:`button`,className:`connect-signout`,onClick:g,children:`Sign out`}),(0,m.jsxs)(`div`,{className:`connect-content`,children:[(0,m.jsx)(`img`,{src:a,alt:i.productName,className:`connect-logo connect-logo--maxy`}),!i.logoContainsName&&(0,m.jsx)(`h1`,{className:`connect-title`,children:i.productName}),(0,m.jsxs)(`form`,{onSubmit:f,className:`connect-pin-form`,children:[(0,m.jsxs)(`div`,{className:`pin-input-row`,children:[(0,m.jsx)(h,{inputRef:d,value:t,onChange:n,onComplete:()=>{},showPin:r,autoFocus:!0}),(0,m.jsx)(l,{variant:`send`,type:`submit`,disabled:!t,loading:s,children:(0,m.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,m.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,m.jsx)(`polyline`,{points:`12 5 19 12 12 19`})]})})]}),(0,m.jsx)(`div`,{className:`pin-options`,children:(0,m.jsx)(u,{checked:r,onChange:()=>o(e=>!e),label:`Show PIN`})})]}),c&&(0,m.jsx)(`p`,{className:`admin-pin-error`,children:c})]})]})}function v(e){let{authPolling:t,setAuthPolling:n,authLoading:r,setAuthLoading:o,pinError:s,setPinError:c,setAppState:u}=e,[p,h]=(0,f.useState)(!1),[g,_]=(0,f.useState)(!1),[v,y]=(0,f.useState)(``),[b,x]=(0,f.useState)(``),[S,C]=(0,f.useState)(``),[w,T]=(0,f.useState)(null),[E,D]=(0,f.useState)(null),[O,k]=(0,f.useState)(!1);(0,f.useEffect)(()=>{try{D(sessionStorage.getItem(`maxy-admin-session-key`))}catch{}k(!0)},[]);async function A(){C(``);try{let e=await(await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`paste-code`,code:b})})).json();e.accepted?(C(`Code submitted. Finishing sign-in…`),x(``)):C(e.error||`Could not submit code.`)}catch(e){console.error(`[admin] paste-code error:`,e),C(`Could not submit code.`)}}async function j(){_(!0),c(``);try{let e=await(await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`launch-browser`})})).json();e.launched?h(!0):e.error&&c(e.error)}catch(e){console.error(`[admin] browser launch error:`,e),c(`Could not launch browser.`)}_(!1)}async function M(){o(!0),c(``);try{let e=await(await fetch(`/api/onboarding/claude-auth`,{method:`POST`})).json();if(e.started){n(!0),h(!0),o(!1),y(e.transport||``);for(let e=0;e<120;e++){await new Promise(e=>setTimeout(e,2e3));let e=await(await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`wait`})})).json();if(typeof e.authTargetId==`string`&&T(e.authTargetId),e.authenticated){await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`stop`})}),u(`enter-pin`);return}}c(`Timed out waiting for sign-in. Try again.`),n(!1)}else e.error&&c(e.error)}catch(e){console.error(`[admin] auth flow error:`,e),c(`Could not start auth flow.`)}o(!1)}async function N(){await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`stop`})}),n(!1),c(``)}return t||p?(0,m.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100dvh`,overflow:`auto`},children:[(0,m.jsxs)(`header`,{className:`chat-header`,style:{paddingBottom:`12px`,flexShrink:0,position:`relative`,maxWidth:`680px`,width:`100%`,margin:`0 auto`,padding:`24px 20px 12px`},children:[t?(0,m.jsx)(`button`,{onClick:N,style:{position:`absolute`,top:`12px`,right:`12px`,background:`none`,border:`none`,color:`#999`,fontSize:`13px`,cursor:`pointer`,padding:`4px 8px`},"aria-label":`Cancel`,children:`✕`}):(0,m.jsx)(`button`,{onClick:()=>h(!1),style:{position:`absolute`,top:`12px`,right:`12px`,background:`none`,border:`none`,color:`#999`,fontSize:`13px`,cursor:`pointer`,padding:`4px 8px`},"aria-label":`Close browser`,children:`✕`}),(0,m.jsx)(`img`,{src:`/brand/claude.png`,alt:`Claude`,className:`chat-logo`}),(0,m.jsx)(`h1`,{className:`chat-tagline`,children:`Connect Claude`}),(0,m.jsx)(`p`,{className:`chat-intro`,children:t?`Sign in and authorize in the browser below.`:`Open your email or prepare your accounts, then sign in.`}),!t&&(0,m.jsx)(`div`,{style:{marginTop:`12px`},children:(0,m.jsx)(l,{variant:`primary`,onClick:M,disabled:r,children:r?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`span`,{className:`spin`,style:{display:`inline-block`},children:`✱`}),` Connecting…`]}):`Sign in to Claude`})}),t&&v===`native`&&(0,m.jsxs)(`div`,{style:{marginTop:`14px`,maxWidth:`420px`,margin:`14px auto 0`,display:`flex`,flexDirection:`column`,gap:`8px`},children:[(0,m.jsx)(`label`,{style:{fontSize:`12px`,color:`#999`,lineHeight:1.4},children:`If the browser didn't finish sign-in, paste the code or full redirect URL from Claude's page:`}),(0,m.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[(0,m.jsx)(`input`,{type:`text`,value:b,onChange:e=>x(e.target.value),placeholder:`Paste code or redirect URL`,style:{flex:1,padding:`8px 10px`,fontSize:`13px`,border:`1px solid #ccc`,borderRadius:`6px`}}),(0,m.jsx)(l,{variant:`primary`,onClick:A,disabled:!b.trim(),children:`Submit`})]}),S&&(0,m.jsx)(`p`,{style:{fontSize:`12px`,color:`#999`,margin:0},children:S})]})]}),(0,m.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,minHeight:0,gap:`10px`,padding:`0 0 16px`},children:O&&(0,m.jsx)(d,{preferTargetId:w,cacheKey:E,chrome:!1})}),s&&(0,m.jsx)(`p`,{className:`admin-pin-error`,style:{textAlign:`center`,padding:`0 20px 16px`},children:s})]}):(0,m.jsx)(`div`,{className:`connect-page`,children:(0,m.jsxs)(`div`,{className:`connect-content`,children:[(0,m.jsxs)(`div`,{className:`connect-logos`,children:[(0,m.jsx)(`div`,{className:`connect-logo-wrap`,children:(0,m.jsx)(`img`,{src:`/brand/claude.png`,alt:`Claude`,className:`connect-logo`})}),(0,m.jsx)(`svg`,{className:`connect-arrow`,viewBox:`0 0 48 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,m.jsx)(`path`,{d:`M0 12h44m0 0l-8-8m8 8l-8 8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,m.jsxs)(`div`,{className:`connect-logo-wrap`,children:[(0,m.jsx)(`img`,{src:a,alt:i.productName,className:`connect-logo connect-logo--maxy`}),!i.logoContainsName&&(0,m.jsx)(`span`,{className:`connect-logo-label`,children:i.productName})]})]}),(0,m.jsxs)(`h1`,{className:`connect-title`,children:[`Connect Claude to power `,i.productName]}),(0,m.jsx)(`p`,{className:`connect-subtitle`,children:`Sign in with your Anthropic account to get started.`}),(0,m.jsx)(l,{variant:`primary`,onClick:M,disabled:r,children:r?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`span`,{className:`spin`,style:{display:`inline-block`},children:`✱`}),` Connecting…`]}):`Sign in to Claude`}),(0,m.jsx)(`p`,{style:{marginTop:`6px`,fontSize:`11px`,color:`#999`,maxWidth:`300px`,textAlign:`center`,lineHeight:`1.4`},children:`First time? You may need to sign into your email and Anthropic account in the browser before connecting.`}),(0,m.jsx)(`button`,{onClick:j,disabled:g,style:{marginTop:`12px`,background:`none`,border:`none`,color:`var(--color-primary, #666)`,fontSize:`13px`,cursor:`pointer`,textDecoration:`underline`,textUnderlineOffset:`3px`},children:g?`Launching…`:`Open browser first`}),s&&(0,m.jsx)(`p`,{className:`admin-pin-error`,children:s})]})})}function y({auth:e}){return e.appState===`loading`?(0,m.jsx)(r,{surface:`gate`}):e.appState===`set-pin`?(0,m.jsx)(g,{pin:e.pin,setPin:e.setPin,showPin:e.showPin,setShowPin:e.setShowPin,pinLoading:e.pinLoading,pinError:e.pinError,pinInputRef:e.pinInputRef,setPinFormRef:e.setPinFormRef,onSubmit:e.handleSetPin,operatorName:e.operatorName,setOperatorName:e.setOperatorName}):e.appState===`connect-claude`?(0,m.jsx)(v,{authPolling:e.authPolling,setAuthPolling:e.setAuthPolling,authLoading:e.authLoading,setAuthLoading:e.setAuthLoading,pinError:e.pinError,setPinError:e.setPinError,setAppState:e.setAppState}):e.appState===`enter-pin`?(0,m.jsx)(_,{pin:e.pin,setPin:e.setPin,showPin:e.showPin,setShowPin:e.setShowPin,pinLoading:e.pinLoading,pinError:e.pinError,pinInputRef:e.pinInputRef,onSubmit:e.handleLogin,remoteAuthEnabled:e.remoteAuthEnabled,onSignOutRemote:()=>{window.location.href=`/__remote-auth/logout`}}):null}export{p as n,y as t};
@@ -0,0 +1,3 @@
1
+ import{o as e}from"./chunk-BycB0eMI.js";import{i as t,r as n,t as r}from"./jsx-runtime-YcUntiud.js";import{$ as i,A as a,B as o,D as s,E as c,F as l,G as u,H as d,I as f,J as p,K as m,L as h,M as g,N as _,O as ee,Q as v,R as y,T as b,U as x,V as te,W as S,X as C,Y as ne,Z as w,_ as T,a as E,c as D,g as O,h as re,i as ie,j as k,m as A,n as ae,nt as oe,s as se,t as ce,tt as le,v as ue,z as j}from"./useMediaQuery-BmG090FR.js";async function de(){try{let e=await fetch(`/api/onboarding/claude-auth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`logout`})});return e.ok?(await e.json().catch(()=>({})))?.logged_out===!0:(console.error(`[admin-ui] claude-logout http-status=${e.status}`),!1)}catch(e){return console.error(`[admin-ui] claude-logout fetch failed: ${e instanceof Error?e.message:String(e)}`),!1}}var M=r();function fe({checked:e,onChange:t,label:n,disabled:r,ariaLabel:i=n}){return(0,M.jsxs)(`label`,{className:`maxy-checkbox${r?` maxy-checkbox--disabled`:``}`,children:[(0,M.jsx)(`input`,{type:`checkbox`,"aria-label":i,checked:e,onChange:e=>t(e.target.checked),disabled:r}),(0,M.jsx)(`span`,{className:`maxy-checkbox__box`,children:`✱`}),n&&(0,M.jsx)(`span`,{className:`maxy-checkbox__label`,children:n})]})}var N=e(t(),1),pe={sm:14,md:16,lg:18},P={sm:30,md:38,lg:46};function F({variant:e=`primary`,size:t=`md`,icon:n,iconPosition:r=`leading`,loading:i=!1,fullWidth:a=!1,disabled:o=!1,type:s=`button`,onClick:c,"aria-label":l,"aria-pressed":u,style:d,className:f,children:p}){let m=[`btn`,`btn--${e}`,t===`md`?``:`btn--${t}`,a?`btn--full`:``,f].filter(Boolean).join(` `),h=pe[t],g={...e===`send`?{width:P[t],height:P[t]}:{},...d},_=Object.keys(g).length>0;return(0,M.jsxs)(`button`,{type:s,className:m,disabled:i||o,onClick:c,"aria-label":l,"aria-pressed":u,style:_?g:void 0,children:[(0,M.jsxs)(`span`,{className:`btn__content`,style:{visibility:i?`hidden`:`visible`},children:[n&&r===`leading`&&(0,M.jsx)(n,{size:h}),p,n&&r===`trailing`&&(0,M.jsx)(n,{size:h})]}),i&&(0,M.jsx)(`span`,{className:`btn__spinner`,children:`✱`})]})}var me=w(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),he=w(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),I=w(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),L=w(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ge=w(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),_e=w(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ve=w(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),ye=w(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),be=w(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),xe=w(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),Se=w(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Ce=w(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),we=w(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Te=w(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Ee=w(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),De=w(`waypoints`,[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]),Oe=w(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),ke=`/cdp-screencast`;function Ae(e){return{format:`jpeg`,quality:60,maxWidth:e?Math.max(320,Math.round(e.width)):1280,maxHeight:e?Math.max(320,Math.round(e.height)):800,everyNthFrame:1}}function je(e,t,n,r){return n.width<=0||n.height<=0?{x:0,y:0}:{x:e/n.width*r.deviceWidth,y:t/n.height*r.deviceHeight}}function Me(e){return e===0?`left`:e===1?`middle`:e===2?`right`:`none`}function Ne(e,t){let n=Me(t.button);return{type:e,x:t.x,y:t.y,button:n,buttons:t.buttons,clickCount:e===`mouseMoved`?0:1,modifiers:t.modifiers}}function Pe(e){return{type:`mouseWheel`,x:e.x,y:e.y,button:`none`,buttons:0,clickCount:0,modifiers:e.modifiers,deltaX:e.deltaX,deltaY:e.deltaY}}var Fe={Backspace:8,Tab:9,Enter:13,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Delete:46},R={Enter:`\r`,Tab:` `};function Ie(e,t){let n=t.key.length===1,r=n&&/[a-z0-9]/i.test(t.key)?t.key.toUpperCase().charCodeAt(0):Fe[t.key]??0,i={type:e,key:t.key,code:t.code,modifiers:t.modifiers,windowsVirtualKeyCode:r,nativeVirtualKeyCode:r};if(e===`keyDown`){let e=n?t.key:R[t.key];e!==void 0&&(i.text=e,i.unmodifiedText=e)}return i}function Le(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`:``}function Re(e){try{return new URL(Le(e)).host}catch{return``}}function ze(e,t,n){return`${e.protocol===`https:`?`wss`:`ws`}://${e.host}${ke}?targetId=${encodeURIComponent(t)}&sid=${encodeURIComponent(n)}`}var Be=class{nextId=1;startId=null;frames=0;stopped=!1;lastMetadata=null;lastInputLogAtMs=null;inputsSinceLog=0;pending=new Map;constructor(e,t){this.ws=e,this.opts=t}frameCount(){return this.frames}start(e){this.send(`Page.enable`,{}),e&&this.setPaneSize(e);let t=Ae(e);this.startId=this.send(`Page.startScreencast`,t)}setPaneSize(e){let t=Math.max(1,Math.round(e.width)),n=Math.max(1,Math.round(e.height));this.send(`Emulation.setDeviceMetricsOverride`,{width:t,height:n,deviceScaleFactor:0,mobile:!1})}stop(){if(this.stopped)return;this.stopped=!0;let e=this.send(`Page.stopScreencast`,{})!==null;this.send(`Emulation.clearDeviceMetricsOverride`,{}),this.opts.onLog(`teardown`,{stopSent:e})}handleMessage(e){let t;try{t=JSON.parse(e)}catch{return}if(typeof t.id==`number`){let e=this.pending.get(t.id);if(e){this.pending.delete(t.id),e(t.error?null:t.result);return}}if(typeof t.id==`number`&&t.id===this.startId){if(t.error)this.opts.onLog(`start-failed`,{err:t.error.message??`unknown`});else{let e=Ae();this.opts.onLog(`screencast-started`,{format:e.format,everyNthFrame:e.everyNthFrame})}return}if(t.method===`Page.frameNavigated`){let e=t.params?.frame;e&&e.parentId===void 0&&typeof e.url==`string`&&this.opts.onUrlChange?.(e.url);return}if(t.method!==`Page.screencastFrame`||this.stopped)return;let n=t.params;if(typeof n?.data!=`string`||typeof n?.metadata!=`object`||n.metadata===null)return;let r=n.metadata;typeof n.sessionId==`number`&&this.send(`Page.screencastFrameAck`,{sessionId:n.sessionId}),this.frames+=1,this.lastMetadata=r,this.frames%30==0&&this.opts.onLog(`frame`,{seq:this.frames}),this.opts.onFrame({data:n.data,metadata:r})}dispatchMouse(e,t){let n=this.lastMetadata;if(!n)return;let r=je(t.canvasX,t.canvasY,t.rendered,n);this.send(`Input.dispatchMouseEvent`,Ne(e,{x:r.x,y:r.y,button:t.button,buttons:t.buttons,modifiers:t.modifiers})),this.logInput(`mouse`)}dispatchWheel(e){let t=this.lastMetadata;if(!t)return;let n=je(e.canvasX,e.canvasY,e.rendered,t);this.send(`Input.dispatchMouseEvent`,Pe({x:n.x,y:n.y,deltaX:e.deltaX,deltaY:e.deltaY,modifiers:e.modifiers})),this.logInput(`wheel`)}dispatchKey(e,t){this.send(`Input.dispatchKeyEvent`,Ie(e,t)),this.logInput(`key`)}insertText(e){e&&(this.send(`Input.insertText`,{text:e}),this.logInput(`paste`))}navigate(e){let t=Le(e);t&&(this.send(`Page.navigate`,{url:t}),this.opts.onLog(`navigate`,{host:Re(t)}))}async goHistory(e){let t=e<0?`back`:`forward`,n=await this.command(`Page.getNavigationHistory`,{});if(!n){this.opts.onLog(`history`,{dir:t,outcome:`no-result`});return}let{currentIndex:r,entries:i}=n,a=typeof r==`number`?i?.[r+e]:void 0;if(!a||typeof a.id!=`number`){this.opts.onLog(`history`,{dir:t,outcome:`no-entry`});return}this.send(`Page.navigateToHistoryEntry`,{entryId:a.id}),this.opts.onLog(`history`,{dir:t})}command(e,t){let n=this.send(e,t);return n===null?Promise.resolve(null):new Promise(e=>this.pending.set(n,e))}logInput(e){this.inputsSinceLog+=1;let t=(this.opts.now??Date.now)();if(this.lastInputLogAtMs!==null&&t-this.lastInputLogAtMs<1e3)return;this.lastInputLogAtMs=t;let n=this.inputsSinceLog;this.inputsSinceLog=0,this.opts.onLog(`input`,{kind:e,count:n})}send(e,t){let n=this.nextId++;try{return this.ws.send(JSON.stringify({id:n,method:e,params:t})),n}catch(t){return this.opts.onLog(`send-failed`,{method:e,err:t instanceof Error?t.message:String(t)}),null}}};function Ve(e){let{targets:t,activeId:n,url:r,busy:i}=e,[a,s]=(0,N.useState)(r),c=(0,N.useRef)(null);return(0,N.useEffect)(()=>{c.current&&document.activeElement===c.current||s(r)},[r]),(0,N.useEffect)(()=>{s(e.url)},[n]),(0,M.jsxs)(`div`,{className:`browser-chrome`,children:[(0,M.jsxs)(`div`,{className:`browser-chrome__tabs`,role:`tablist`,children:[t.map(t=>(0,M.jsxs)(`div`,{className:t.id===n?`browser-chrome__tab is-active`:`browser-chrome__tab`,role:`tab`,"aria-selected":t.id===n,children:[(0,M.jsx)(`button`,{type:`button`,className:`browser-chrome__tab-label`,onClick:()=>e.onSelect(t.id),title:t.url,children:t.title}),(0,M.jsx)(`button`,{type:`button`,className:`browser-chrome__tab-close`,"aria-label":`Close ${t.title}`,onClick:()=>e.onClose(t.id),disabled:i,children:(0,M.jsx)(k,{size:12,strokeWidth:2})})]},t.id)),(0,M.jsx)(`button`,{type:`button`,className:`browser-chrome__new`,"aria-label":`New tab`,title:`New tab`,onClick:e.onNew,disabled:i,children:(0,M.jsx)(f,{size:14,strokeWidth:2})}),(e.onToggleFull||e.onClosePane)&&(0,M.jsxs)(`div`,{className:`browser-chrome__window`,children:[e.onToggleFull&&(0,M.jsx)(`button`,{type:`button`,className:`browser-chrome__nav`,"aria-label":e.isFull?`Exit full screen`:`Full screen`,title:e.isFull?`Exit full screen`:`Full screen`,onClick:e.onToggleFull,children:e.isFull?(0,M.jsx)(Ce,{size:15,strokeWidth:1.75}):(0,M.jsx)(o,{size:15,strokeWidth:1.75})}),e.onClosePane&&(0,M.jsx)(`button`,{type:`button`,className:`browser-chrome__nav`,"aria-label":`Close browser`,title:`Close browser`,onClick:e.onClosePane,children:(0,M.jsx)(k,{size:16,strokeWidth:1.75})})]})]}),(0,M.jsxs)(`form`,{className:`browser-chrome__bar`,onSubmit:t=>{t.preventDefault(),e.onNavigate(a)},children:[(0,M.jsx)(`button`,{type:`button`,className:`browser-chrome__nav`,"aria-label":`Back`,title:`Back`,onClick:e.onBack,children:(0,M.jsx)(ne,{size:16,strokeWidth:1.75})}),(0,M.jsx)(`button`,{type:`button`,className:`browser-chrome__nav`,"aria-label":`Forward`,title:`Forward`,onClick:e.onForward,children:(0,M.jsx)(I,{size:16,strokeWidth:1.75})}),(0,M.jsx)(`input`,{ref:c,className:`browser-chrome__url`,"aria-label":`Address`,placeholder:`Type a URL`,value:a,onChange:e=>s(e.target.value)})]})]})}function He(e){return(e.altKey?1:0)|(e.ctrlKey?2:0)|(e.metaKey?4:0)|(e.shiftKey?8:0)}function Ue({preferTargetId:e=null,cacheKey:t=null,chrome:n=!0,surface:r=`browser`,onToggleFull:i,onClosePane:o,isFull:s=!1}={}){let[c,l]=(0,N.useState)(`probing`),[u,d]=(0,N.useState)([]),[f,p]=(0,N.useState)(null),[m,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(null),[ee,v]=(0,N.useState)(!1),[y,b]=(0,N.useState)(``),S=a(t),C=(0,N.useRef)(null),ne=(0,N.useRef)(null),w=(0,N.useRef)(null),T=(0,N.useRef)(``),E=(0,N.useRef)(e);E.current=e,T.current||=`sc-${Math.random().toString(36).slice(2,10)}`;let D=(0,N.useCallback)((e,t={})=>{S(`/api/admin/browser/screencast-event`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({sid:T.current,op:e,...t})}).catch(()=>{})},[S]),O=(0,N.useCallback)(async()=>{try{let e=await S(`/api/admin/browser/screencast-targets`);if(!e.ok){l(`unavailable`);return}let t=await e.json().catch(()=>({})),n=Array.isArray(t.targets)?t.targets:[];if(d(n),n.length===0){p(null),l(`no-tabs`);return}let r=E.current;p(e=>r&&n.some(e=>e.id===r)?r:e&&n.some(t=>t.id===e)?e:n[0].id),l(`live`)}catch{l(`unavailable`)}},[S]);(0,N.useEffect)(()=>{D(`request`),O()},[O,D]),(0,N.useEffect)(()=>{n&&D(`chrome-mounted`,{surface:r,chrome:`v1`})},[n,r,D]),(0,N.useEffect)(()=>{b(u.find(e=>e.id===f)?.url??``)},[u,f]);let re=(0,N.useRef)(null);(0,N.useEffect)(()=>{if(e){if(u.some(t=>t.id===e)){p(e);return}re.current!==e&&(re.current=e,O())}},[e,u,O]);let ie=(0,N.useCallback)(e=>{let t=C.current;if(!t)return;let n=new Image;n.onload=()=>{t.width=n.naturalWidth,t.height=n.naturalHeight,t.getContext(`2d`)?.drawImage(n,0,0)},n.src=`data:image/jpeg;base64,${e.data}`},[]),k=(0,N.useCallback)(()=>{let e=ne.current;if(!e)return;let t=e.getBoundingClientRect(),n=getComputedStyle(e),r=e=>Number.parseFloat(e)||0,i=t.width-r(n.paddingLeft)-r(n.paddingRight),a=t.height-r(n.paddingTop)-r(n.paddingBottom);if(!(i<1||a<1))return{width:i,height:a}},[]);(0,N.useEffect)(()=>{let e=ne.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{let e=k();e&&w.current?.setPaneSize(e)});return t.observe(e),()=>t.disconnect()},[c,k]),(0,N.useEffect)(()=>{if(c!==`live`||!f)return;let e=ze({protocol:window.location.protocol,host:window.location.host},f,T.current),t=new WebSocket(e),n=new Be(t,{onFrame:ie,onLog:D,onUrlChange:b});return w.current=n,t.addEventListener(`open`,()=>n.start(k())),t.addEventListener(`message`,e=>{typeof e.data==`string`&&n.handleMessage(e.data)}),()=>{n.stop(),t.close(),w.current=null}},[c,f,ie,D]);let A=(0,N.useCallback)(e=>t=>{let n=C.current;if(!n)return;let r=n.getBoundingClientRect();w.current?.dispatchMouse(e,{canvasX:t.clientX-r.left,canvasY:t.clientY-r.top,rendered:{width:r.width,height:r.height},button:e===`mouseMoved`?-1:t.button,buttons:t.buttons,modifiers:He(t)})},[]);(0,N.useEffect)(()=>{let e=C.current;if(!e)return;let t=t=>{t.preventDefault();let n=e.getBoundingClientRect();w.current?.dispatchWheel({canvasX:t.clientX-n.left,canvasY:t.clientY-n.top,rendered:{width:n.width,height:n.height},deltaX:t.deltaX,deltaY:t.deltaY,modifiers:He(t)})};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[c]);let ae=(0,N.useCallback)(e=>t=>{t.preventDefault(),w.current?.dispatchKey(e,{key:t.key,code:t.code,modifiers:He(t)})},[]),oe=(0,N.useCallback)(e=>{e.preventDefault();let t=e.clipboardData.getData(`text`);t&&w.current?.insertText(t)},[]),se=(0,N.useCallback)(async()=>{h(!0),_(null);try{let e=await S(`/api/admin/browser/launch`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||`Launch failed (${e.status})`)}await O()}catch(e){_(e instanceof Error?e.message:String(e))}finally{h(!1)}},[S,O]),ce=(0,N.useCallback)(async()=>{v(!0),_(null);try{c===`no-tabs`&&await S(`/api/admin/browser/launch`,{method:`POST`});let e=await S(`/api/admin/browser/tabs`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||`New tab failed (${e.status})`)}let t=await e.json().catch(()=>({}));await O(),t.id&&p(t.id)}catch(e){_(e instanceof Error?e.message:String(e))}finally{v(!1)}},[S,O,c]),le=(0,N.useCallback)(async e=>{v(!0),_(null);try{let t=await S(`/api/admin/browser/tabs/${encodeURIComponent(e)}`,{method:`DELETE`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`Close failed (${t.status})`)}await O()}catch(e){_(e instanceof Error?e.message:String(e))}finally{v(!1)}},[S,O]),ue=(0,N.useCallback)(e=>{w.current?.navigate(e)},[]),j=(0,N.useCallback)(e=>{w.current?.goHistory(e)},[]);return c===`probing`?(0,M.jsx)(`div`,{className:`cdp-screencast`,children:(0,M.jsxs)(`div`,{className:`data-loading`,children:[(0,M.jsx)(te,{size:18,className:`spin`}),` Connecting to the device browser…`]})}):c===`unavailable`?(0,M.jsx)(`div`,{className:`cdp-screencast`,children:(0,M.jsxs)(`div`,{className:`cdp-screencast__unavailable`,children:[(0,M.jsx)(x,{size:28,strokeWidth:1.75}),(0,M.jsx)(`p`,{children:`The device browser is not reachable.`})]})}):(0,M.jsxs)(`div`,{className:`cdp-screencast`,children:[n&&(0,M.jsx)(Ve,{targets:u,activeId:f,url:y,busy:ee,onSelect:p,onClose:le,onNew:ce,onBack:()=>j(-1),onForward:()=>j(1),onNavigate:ue,onToggleFull:i,onClosePane:o,isFull:s}),g&&(0,M.jsx)(`div`,{className:`cdp-screencast__toolbar`,children:(0,M.jsx)(`span`,{className:`cdp-screencast__error`,children:g})}),c===`no-tabs`?(0,M.jsxs)(`div`,{className:`cdp-screencast__unavailable`,children:[(0,M.jsx)(x,{size:28,strokeWidth:1.75}),(0,M.jsx)(`p`,{children:`No open tabs on the device browser.`}),(0,M.jsxs)(`button`,{type:`button`,className:`cdp-screencast__btn`,onClick:se,disabled:m,children:[m?(0,M.jsx)(te,{size:14,className:`spin`}):(0,M.jsx)(x,{size:14}),` Launch browser`]})]}):(0,M.jsxs)(M.Fragment,{children:[!n&&(0,M.jsx)(`div`,{className:`cdp-screencast__tabs`,children:u.map(e=>(0,M.jsx)(`button`,{type:`button`,className:e.id===f?`cdp-screencast__tab is-active`:`cdp-screencast__tab`,onClick:()=>p(e.id),title:e.url,children:e.title},e.id))}),(0,M.jsx)(`div`,{className:`cdp-screencast__viewport`,ref:ne,children:(0,M.jsx)(`canvas`,{ref:C,className:`cdp-screencast__canvas`,tabIndex:0,onMouseDown:A(`mousePressed`),onMouseUp:A(`mouseReleased`),onMouseMove:A(`mouseMoved`),onKeyDown:ae(`keyDown`),onKeyUp:ae(`keyUp`),onPaste:oe})})]})]})}var We=5e3,Ge=1200;function Ke(e){return Math.max(Ge,Math.round(We/(e<1?1:e)))}var z=500,B=new Set;function qe(e,t,n){let r=n??(typeof globalThis.fetch==`function`?globalThis.fetch:void 0);if(B.has(e)||!r)return!1;if(B.size>=z){for(let e of B)if(B.delete(e),B.size<z)break}B.add(e);try{Promise.resolve(r(`/api/admin/events`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({event:`channel-notify:rendered`,fields:{msgId:e,senderType:t}})})).catch(()=>{})}catch{}return!0}function Je({type:e}){return e===`admin`?(0,M.jsx)(`svg`,{className:`channel-notify-icon`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M8 1.5 13 3.5v4c0 3-2.1 5.8-5 7-2.9-1.2-5-4-5-7v-4z`})}):e===`manager-active`?(0,M.jsx)(`svg`,{className:`channel-notify-icon`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M2 5.5h9l-2.5-2.5 1-1L14 6l-4.5 4-1-1L11 6.5H2zM14 10.5H5l2.5 2.5-1 1L2 10l4.5-4 1 1L5 9.5h9z`})}):e===`manager-passive`?(0,M.jsx)(`svg`,{className:`channel-notify-icon`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M8 3C4.5 3 1.7 5.4 1 8c.7 2.6 3.5 5 7 5s6.3-2.4 7-5c-.7-2.6-3.5-5-7-5m0 8a3 3 0 1 1 0-6 3 3 0 0 1 0 6`})}):(0,M.jsx)(`svg`,{className:`channel-notify-icon`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,M.jsx)(`path`,{d:`M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m0 1.5c-3 0-5.5 1.6-5.5 3.5v1h11v-1c0-1.9-2.5-3.5-5.5-3.5`})})}function Ye({frames:e,onExpire:t}){let n=(0,N.useRef)(new Map),r=(0,N.useRef)(new Map);return(0,N.useEffect)(()=>{let i=Date.now(),a=Ke(e.length),o=new Set(e.map(e=>e.messageId));for(let e of[...n.current.keys()])o.has(e)||(n.current.delete(e),r.current.delete(e));let s=[];for(let o of e){let e=o.messageId;n.current.has(e)||(n.current.set(e,i),qe(e,o.senderType));let c=r.current.get(e),l=c===void 0?a:Math.min(c,a);r.current.set(e,l);let u=i-(n.current.get(e)??i);s.push(setTimeout(()=>t(e),Math.max(0,l-u)))}return()=>{for(let e of s)clearTimeout(e)}},[e,t]),e.length===0?null:(0,M.jsx)(`div`,{className:`channel-notify-host`,children:[...e].reverse().map(e=>(0,M.jsxs)(`div`,{className:`channel-notify-card channel-notify-card-${e.channel}`,role:`status`,children:[(0,M.jsxs)(`div`,{className:`channel-notify-head`,children:[(0,M.jsx)(`span`,{className:`channel-notify-pill channel-notify-pill-${e.channel}-${e.senderType}`,children:(0,M.jsx)(Je,{type:e.senderType})}),(0,M.jsx)(`span`,{className:`channel-notify-account`,children:e.accountName})]}),(0,M.jsx)(`div`,{className:`channel-notify-sender`,children:e.senderDisplay}),(0,M.jsxs)(`div`,{className:`channel-notify-body`,children:[e.body,e.truncated?`…`:``]})]},e.messageId))})}var V=`channel-notify`;function Xe({connected:e,onConnectClaude:t}){return e?(0,M.jsxs)(`span`,{className:`claude-status-pill`,"data-connected":`true`,title:`Claude is connected`,children:[(0,M.jsx)(`img`,{src:`/brand/claude.png`,alt:``,className:`claude-status-pill__mark`}),(0,M.jsx)(`span`,{className:`claude-status-pill__label`,children:`Connected`}),(0,M.jsx)(`span`,{className:`claude-status-pill__dot claude-status-pill__dot--live`,"aria-hidden":`true`})]}):(0,M.jsxs)(`button`,{type:`button`,className:`claude-status-pill claude-status-pill--action`,"data-connected":`false`,onClick:t,title:`Connect Claude`,children:[(0,M.jsx)(`img`,{src:`/brand/claude.png`,alt:``,className:`claude-status-pill__mark`}),(0,M.jsx)(`span`,{className:`claude-status-pill__label`,children:`Connect`}),(0,M.jsx)(`span`,{className:`claude-status-pill__dot claude-status-pill__dot--down`,"aria-hidden":`true`})]})}function Ze(e){return e===`/`||e===``?`Dashboard`:e.startsWith(`/chat`)?`Chat`:e.startsWith(`/tasks`)?`Tasks`:e.startsWith(`/data`)?`Data`:e.startsWith(`/calendar`)?`Calendar`:e.startsWith(`/graph`)?`Graph`:e.startsWith(`/activity`)?`Activity`:e.startsWith(`/browser`)?`Browser`:e.startsWith(`/routines`)?`Routines`:e.startsWith(`/skills`)?`Skills`:e.startsWith(`/agents`)?`Agents`:`Dashboard`}function Qe({title:e,sidebarOpen:t,onToggleSidebar:n,claudeConnected:r,onConnectClaude:i,onOpenBrowser:a}){let o=e??Ze(typeof window<`u`?window.location.pathname:`/`),s=r!==void 0&&i!==void 0,c=a!==void 0;return(0,M.jsxs)(`header`,{className:`admin-page-header`,children:[(0,M.jsxs)(`button`,{type:`button`,className:`admin-page-header__toggle`,"aria-label":t?`Hide sidebar`:`Show sidebar`,title:t?`Hide sidebar`:`Show sidebar`,"aria-expanded":t,onClick:n,children:[(0,M.jsx)(we,{className:`admin-page-header__toggle-desktop`,size:18,strokeWidth:1.75}),(0,M.jsx)(j,{className:`admin-page-header__toggle-mobile`,size:22,strokeWidth:1.75})]}),(0,M.jsx)(`h1`,{className:`admin-page-header__title`,children:o}),(0,M.jsxs)(`div`,{className:`admin-page-header__right`,children:[(0,M.jsx)(re,{}),s&&(0,M.jsx)(Xe,{connected:r,onConnectClaude:i}),c&&(0,M.jsx)(`button`,{type:`button`,className:`admin-page-header__icon`,"aria-label":`Show browser`,title:`Show browser`,onClick:a,children:(0,M.jsx)(x,{size:18,strokeWidth:1.75})})]})]})}var $e=[{label:`Home`,href:`/`,Icon:d,match:e=>e===`/`||e===``},{label:`Chat`,href:`/chat`,Icon:y,match:e=>e.startsWith(`/chat`)},{label:`Tasks`,href:`/tasks`,Icon:xe,match:e=>e.startsWith(`/tasks`)},{label:`Data`,href:`/data`,Icon:m,match:e=>e.startsWith(`/data`)},{label:`Calendar`,href:`/calendar`,Icon:p,match:e=>e.startsWith(`/calendar`)}],et=[{label:`Chat`,href:`/`,Icon:y,match:e=>e===`/`||e===``||e.startsWith(`/chat`)},{label:`Data`,href:`/data`,Icon:m,match:e=>e.startsWith(`/data`)}];function tt(e){let t=$e.find(t=>t.match(e));return t?t.href:`/`}function nt({variant:e=`admin`,onOpenConversations:t}={}){let n=typeof window<`u`?window.location.pathname:`/`,r=e===`operator`?et:$e,i=e===`operator`?et.find(e=>e.match(n))?.href??`/`:tt(n),a=e=>{let t=e.href===i,{Icon:n}=e;return(0,M.jsxs)(`a`,{href:e.href,className:`bottom-tab${t?` is-active`:``}`,"aria-current":t?`page`:void 0,children:[(0,M.jsx)(n,{size:19,strokeWidth:1.75}),(0,M.jsx)(`span`,{className:`bottom-tab__label`,children:e.label})]},e.href)};return(0,M.jsxs)(`nav`,{className:`bottom-tab-bar`,"aria-label":`Primary`,children:[r.slice(0,1).map(a),e===`operator`&&t&&(0,M.jsxs)(`button`,{type:`button`,className:`bottom-tab`,onClick:t,children:[(0,M.jsx)(y,{size:19,strokeWidth:1.75}),(0,M.jsx)(`span`,{className:`bottom-tab__label`,children:`Conversations`})]}),r.slice(1).map(a)]})}var rt=`maxy-shell-side-px`;function it(){if(typeof window>`u`)return 0;let e=document.querySelector(`.platform > .artefact`)?.getBoundingClientRect();return e&&e.width>0?Math.round(e.width):0}function at(e){if(typeof window>`u`)return e;let t=window.innerWidth,n=Math.max(248,t-480-it());return Math.min(Math.max(e,248),n)}function ot(){if(typeof window>`u`)return 264;try{let e=window.localStorage.getItem(rt);if(!e)return 264;let t=parseInt(e,10);if(!Number.isFinite(t))return console.warn(`[admin-ui] sidebar-width-parse-failed stored=${JSON.stringify(e)} fallback=264`),264;if(t>=248)return at(t)}catch{}return 264}function st({targetSelector:e=`.platform`}){let t=(0,N.useRef)(null),[n,r]=(0,N.useState)(()=>ot()),i=(0,N.useRef)(n);(0,N.useLayoutEffect)(()=>{let t=document.querySelector(e);!t||!(t instanceof HTMLElement)||(t.style.setProperty(`--side-px`,`${n}px`),i.current=n)},[n,e]);let a=(0,N.useCallback)(()=>{r(e=>{let t=at(e);return t===e?e:t})},[]);(0,N.useEffect)(()=>{a(),window.addEventListener(`resize`,a);let t=document.querySelector(e),n=null;return t instanceof HTMLElement&&(n=new MutationObserver(a),n.observe(t,{attributes:!0,attributeFilter:[`data-artefact`,`class`]})),()=>{window.removeEventListener(`resize`,a),n?.disconnect()}},[a,e]);let o=e=>{e.preventDefault();let n=t.current;if(!n)return;n.setPointerCapture(e.pointerId),n.classList.add(`dragging`);let a=!1,o=e=>{a=!0,r(at(Math.round(e.clientX)))},s=()=>{if(n.releasePointerCapture(e.pointerId),n.classList.remove(`dragging`),window.removeEventListener(`pointermove`,o),window.removeEventListener(`pointerup`,s),!a)return;let t=i.current;try{window.localStorage.setItem(rt,String(t))}catch{}};window.addEventListener(`pointermove`,o),window.addEventListener(`pointerup`,s)},s=()=>{r(at(264));try{window.localStorage.removeItem(rt)}catch{}};return(0,M.jsx)(`div`,{ref:t,className:`side-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize sidebar`,onPointerDown:o,onDoubleClick:s})}var H=n();function ct(e){return Math.max(14,e/2-386)}function lt(e){return e.left===0&&e.top===0&&e.width===0&&e.height===0}var ut={position:`fixed`,visibility:`hidden`};function dt({anchorRef:e,onClose:t,className:n,role:r,ariaLabel:i,anchorId:a,children:o}){let s=(0,N.useRef)(null),[c,l]=(0,N.useState)(ut),u=(0,N.useCallback)(()=>{let t=s.current;if(!t)return;let r=e.current,i=[n,a].filter(Boolean).join(`:`)||`unknown`,o=t.getBoundingClientRect(),c=window.innerWidth,u=window.innerHeight,d=o.width>0&&o.height>0,f=r?r.getBoundingClientRect():null,p=(e,t)=>console.error(`[anchored-popover] op=offscreen id=${i} left=${e} top=${t} w=${o.width} h=${o.height} viewport=${c},${u}`);if(!f){l({position:`fixed`,left:Math.max(4,c-o.width-ct(c)),top:Math.max(4,u-o.height-14),visibility:`visible`});return}if(d&&lt(f)){l(ut),p(f.left,f.top);return}let m=f.right-o.width,h=c-o.width-4;m>h&&(m=h),m<4&&(m=4);let g=u-f.bottom-4,_=f.top-4,ee=o.height+8<=g?!1:o.height+8<=_?!0:_>g,v=Math.max(0,ee?_:g),y=ee?Math.max(4,f.top-Math.min(o.height,v)):f.bottom;l({position:`fixed`,left:m,top:y,maxHeight:v,visibility:`visible`});let b=Math.min(o.height,v);d&&(m+o.width<=0||m>=c||y+b<=0||y>=u)&&p(m,y)},[e,a,n]);return(0,N.useLayoutEffect)(()=>{if(u(),typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>u());return s.current&&e.observe(s.current),()=>e.disconnect()},[u]),(0,N.useEffect)(()=>{let n=e=>{e.key===`Escape`&&t()},r=n=>{let r=n.target;e.current?.contains(r)||s.current?.contains(r)||t()},i=n=>{let r=e.current;r&&n.target instanceof Node&&n.target.contains(r)&&t()},a=()=>t();return document.addEventListener(`keydown`,n),document.addEventListener(`pointerdown`,r),window.addEventListener(`scroll`,i,!0),window.addEventListener(`resize`,a),()=>{document.removeEventListener(`keydown`,n),document.removeEventListener(`pointerdown`,r),window.removeEventListener(`scroll`,i,!0),window.removeEventListener(`resize`,a)}},[e,t]),(0,H.createPortal)((0,M.jsx)(`div`,{ref:s,className:n,role:r,"aria-label":i,style:c,children:o}),document.body)}function ft({actions:e,disabled:t,label:n=`Session actions`}){let[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(null),s=(0,N.useRef)(null),c=(0,N.useCallback)(()=>{i(!1),o(null)},[]);return(0,M.jsxs)(`div`,{className:`conv-actions`,children:[(0,M.jsx)(`button`,{ref:s,type:`button`,className:`conv-action conv-actions-overflow`,onClick:()=>i(e=>!e),disabled:t,"aria-haspopup":`menu`,"aria-expanded":r,"aria-label":n,title:n,children:(0,M.jsx)(j,{size:12})}),r&&(0,M.jsx)(dt,{anchorRef:s,onClose:c,className:`conv-actions-menu`,role:`menu`,children:e.map(e=>e.panel?(0,M.jsxs)(`div`,{className:`conv-actions-menu-disclosure`,children:[(0,M.jsxs)(`button`,{type:`button`,role:`menuitem`,"aria-haspopup":`dialog`,"aria-expanded":a===e.key,title:e.title,disabled:t||e.disabled,onClick:()=>o(t=>t===e.key?null:e.key),children:[e.icon,(0,M.jsx)(`span`,{children:e.menuLabel})]}),a===e.key&&(0,M.jsx)(`div`,{className:`conv-actions-menu-panel`,children:e.panel()})]},e.key):(0,M.jsxs)(`button`,{type:`button`,role:`menuitem`,className:e.danger?`conv-action-danger`:void 0,"aria-busy":e.busy,title:e.title,disabled:t||e.disabled,onClick:t=>{e.onClick?.(t),c()},children:[e.icon,(0,M.jsx)(`span`,{children:e.menuLabel})]},e.key))})]})}var U=`claude-opus-5[1m]`,pt=`claude-sonnet-5`,W=`claude-haiku-4-5`,G={[U]:`Opus 5 (1M context)`,[pt]:`Sonnet 5`,[W]:`Haiku 4.5`};function mt(e){return G[e]??e}var K=[U,pt,W];function ht(e){return e.replace(/\[1m\]$/,``)}function gt(e){return K.find(t=>ht(t)===ht(e))??e}var _t=[`default`,`acceptEdits`,`plan`,`auto`,`bypassPermissions`],q=[`low`,`medium`,`high`,`xhigh`];[..._t],[...q],[...q];var vt=[U,pt,W],yt={default:`Ask permissions`,acceptEdits:`Accept edits`,plan:`Plan mode`,auto:`Auto mode`,bypassPermissions:`Bypass permissions`},bt=_t.map(e=>({value:e,label:yt[e]??e})),xt={low:`Low`,medium:`Medium`,high:`High`,xhigh:`Highest`},St=q.map(e=>({value:e,label:xt[e]??e}));function Ct(e){if(e){let t=vt.find(t=>ht(t)===ht(e));if(t)return t}return U}function wt({row:e,adminFetch:t,onError:n}){let[r,i]=(0,N.useState)(()=>Ct(e.model)),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(!1),d=(0,N.useRef)(!1);(0,N.useEffect)(()=>{i(Ct(e.model))},[e.model]);let f=async()=>{if(!d.current){d.current=!0,u(!0);try{let i=await t(`/api/admin/session-reseat`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fromSessionId:e.sessionId,model:r,...a?{permissionMode:a}:{},...s?{effort:s}:{}})});if(!i.ok){n(`Could not reset ${e.title} (status ${i.status})`),console.error(`[admin-ui] dashboard-reseat-failed sessionId=${e.sessionId} status=${i.status}`),d.current=!1,u(!1);return}let o=await i.json().catch(()=>({}));o.target?window.location.assign(o.target):(n(`Reset of ${e.title} returned no target`),d.current=!1,u(!1))}catch(t){n(`Could not reset ${e.title} (network error)`),console.error(`[admin-ui] dashboard-reseat-failed sessionId=${e.sessionId} error=${t instanceof Error?t.message:String(t)}`),d.current=!1,u(!1)}}};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`label`,{className:`reseat-field`,children:[(0,M.jsx)(`span`,{children:`Model`}),(0,M.jsx)(`select`,{"data-kind":`model`,value:r,disabled:l,onChange:e=>i(e.target.value),children:vt.map(e=>(0,M.jsx)(`option`,{value:e,children:mt(e)},e))})]}),(0,M.jsxs)(`label`,{className:`reseat-field`,children:[(0,M.jsx)(`span`,{children:`Mode`}),(0,M.jsxs)(`select`,{"data-kind":`mode`,value:a,disabled:l,onChange:e=>o(e.target.value),children:[(0,M.jsx)(`option`,{value:``,children:`Keep current`}),bt.map(e=>(0,M.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]}),(0,M.jsxs)(`label`,{className:`reseat-field`,children:[(0,M.jsx)(`span`,{children:`Effort`}),(0,M.jsxs)(`select`,{"data-kind":`effort`,value:s,disabled:l,onChange:e=>c(e.target.value),children:[(0,M.jsx)(`option`,{value:``,children:`Keep current`}),St.map(e=>(0,M.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]}),(0,M.jsx)(`button`,{type:`button`,className:`reseat-apply`,disabled:l,"aria-busy":l,onClick:()=>void f(),children:l?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(te,{size:12,className:`spin`,"aria-hidden":`true`}),`Resetting…`]}):`Reset`})]})}function Tt(e){if(e<60)return`${e}s`;let t=Math.floor(e/60),n=e%60;return n>0?`${t}m ${n}s`:`${t}m`}function Et(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Dt({target:e,anchorEl:t,onConfirm:n,onCancel:r}){let i=(0,N.useRef)(null);return i.current=t,e?(0,M.jsxs)(dt,{anchorRef:i,onClose:r,className:`conv-delete-confirm`,role:`alertdialog`,ariaLabel:`Confirm delete session`,children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsx)(`span`,{children:`Delete this conversation?`}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:r,"aria-label":`Close`,children:`✕`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{padding:`12px 14px`,fontSize:`11px`,color:`var(--text-secondary)`},children:[(0,M.jsxs)(`div`,{className:`conv-delete-target`,children:[(0,M.jsx)(`span`,{className:`conv-delete-label`,title:e.title,children:e.title||`Untitled session`}),(0,M.jsx)(`code`,{className:`conv-delete-id`,title:e.sessionId,children:e.sessionId.slice(0,8)})]}),(0,M.jsx)(`div`,{style:{marginTop:`8px`},children:`This permanently removes the transcript. It is not moved to Archive and cannot be recovered.`}),e.live&&(0,M.jsx)(`div`,{style:{marginTop:`8px`},children:`This session is running; deleting stops it first.`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{display:`flex`,gap:`8px`,padding:`10px 14px`},children:[(0,M.jsx)(F,{variant:`danger`,size:`sm`,style:{flex:1},onClick:n,children:`Delete`}),(0,M.jsx)(F,{variant:`secondary`,size:`sm`,style:{flex:1},onClick:r,children:`Cancel`})]})]}):null}function Ot({target:e,anchorEl:t,onConfirm:n,onCancel:r}){let i=(0,N.useRef)(null);return i.current=t,e?(0,M.jsxs)(dt,{anchorRef:i,onClose:r,className:`conv-delete-confirm`,role:`alertdialog`,ariaLabel:`Confirm delete task`,children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsx)(`span`,{children:`Delete this task?`}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:r,"aria-label":`Close`,children:`✕`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{padding:`12px 14px`,fontSize:`11px`,color:`var(--text-secondary)`},children:[(0,M.jsxs)(`div`,{className:`conv-delete-target`,children:[(0,M.jsx)(`span`,{className:`conv-delete-label`,title:e.name,children:e.name}),(0,M.jsx)(`code`,{className:`conv-delete-id`,children:E(e.secondsLogged)})]}),(0,M.jsx)(`div`,{style:{marginTop:`8px`},children:`This permanently removes the task and every time record on it. It cannot be recovered.`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{display:`flex`,gap:`8px`,padding:`10px 14px`},children:[(0,M.jsx)(F,{variant:`danger`,size:`sm`,style:{flex:1},onClick:n,children:`Delete`}),(0,M.jsx)(F,{variant:`secondary`,size:`sm`,style:{flex:1},onClick:r,children:`Cancel`})]})]}):null}function kt({open:e,count:t,liveCount:n,onConfirm:r,onCancel:i}){if(!e)return null;let a=t===1?``:`s`;return(0,M.jsx)(`div`,{className:`claude-info-overlay`,onClick:i,children:(0,M.jsxs)(`div`,{className:`claude-info-modal`,onClick:e=>e.stopPropagation(),role:`alertdialog`,"aria-label":`Confirm delete sessions`,children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsxs)(`span`,{children:[`Delete `,t,` conversation`,a,`?`]}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:i,"aria-label":`Close`,children:`✕`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{padding:`12px 14px`,fontSize:`11px`,color:`var(--text-secondary)`},children:[`This permanently removes `,t,` transcript`,a,`. `,t===1?`It is`:`They are`,` not moved to Archive and cannot be recovered.`,n>0&&(0,M.jsxs)(`div`,{style:{marginTop:`8px`},children:[n,` `,n===1?`is`:`are`,` running and will be stopped first.`]})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{display:`flex`,gap:`8px`,padding:`10px 14px`},children:[(0,M.jsxs)(F,{variant:`danger`,size:`sm`,style:{flex:1},onClick:r,children:[`Delete `,t]}),(0,M.jsx)(F,{variant:`secondary`,size:`sm`,style:{flex:1},onClick:i,children:`Cancel`})]})]})})}function At(e,t){return`New session: ${T(e.toISOString(),t)}`}function jt({open:e,pending:t,onConfirm:n,onCancel:r,now:i}){let{zone:a}=ue(),[o,s]=(0,N.useState)(``),c=(0,N.useRef)(null),l=(0,N.useRef)(null),u=(0,N.useRef)(!1);if((0,N.useEffect)(()=>{if(!e){l.current=null,u.current=!1;return}if(l.current!==null)return;let t=At(i?i():new Date,a);l.current=t,s(t)},[e,i]),(0,N.useEffect)(()=>{if(!e||u.current||l.current===null||o!==l.current)return;let t=c.current;t&&(u.current=!0,t.focus(),t.setSelectionRange(0,t.value.length))},[e,o]),!e)return null;let d=o.trim(),f=d.length>0&&d.length<=200,p=()=>{f&&!t&&n(d)},m=e=>{t||r(e)};return(0,M.jsx)(`div`,{className:`claude-info-overlay`,onClick:()=>m(`backdrop`),children:(0,M.jsxs)(`div`,{className:`claude-info-modal`,onClick:e=>e.stopPropagation(),role:`dialog`,"aria-label":`Name this session`,children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsx)(`span`,{children:`Name this session`}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:()=>m(`cancel`),"aria-label":`Close`,disabled:t,children:`✕`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{padding:`12px 14px`},children:[(0,M.jsx)(`input`,{ref:c,className:`new-session-name-input`,"aria-label":`Session name`,value:o,disabled:t,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),p()),e.key===`Escape`&&(e.preventDefault(),m(`escape`))}}),(0,M.jsx)(`div`,{className:`new-session-name-hint`,children:d.length>200?`Too long by ${d.length-200}`:`You can rename it later from the session menu.`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{display:`flex`,gap:`8px`,padding:`10px 14px`},children:[(0,M.jsx)(F,{variant:`primary`,size:`sm`,style:{flex:1},disabled:!f||t,onClick:p,children:t?`Starting…`:`Start session`}),(0,M.jsx)(F,{variant:`secondary`,size:`sm`,style:{flex:1},disabled:t,onClick:()=>m(`cancel`),children:`Cancel`})]})]})})}var Mt=`auth-refresh-failed`;function Nt({error:e,onClose:t}){if(!e)return null;let n=e.reason===Mt,r=n?`Claude sign-in expired`:`Session didn’t open`,i=n?`Your claude.ai login has expired. Re-authenticate to resume sessions.`:`The session did not bind within 60 seconds, so there is no live conversation to open.`;return(0,M.jsx)(`div`,{className:`claude-info-overlay`,onClick:t,children:(0,M.jsxs)(`div`,{className:`claude-info-modal`,onClick:e=>e.stopPropagation(),role:`alertdialog`,"aria-label":`Session could not be opened`,children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsx)(`span`,{children:r}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:t,"aria-label":`Close`,children:`✕`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{padding:`12px 14px`,fontSize:`11px`,color:`var(--text-secondary)`},children:[i,(0,M.jsxs)(`div`,{className:`claude-info-row`,style:{marginTop:`8px`},children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Reason`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:e.reason})]}),e.sessionId&&(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Session`}),(0,M.jsxs)(`span`,{className:`claude-info-value`,children:[e.sessionId.slice(0,8),`…`]})]})]})]})})}function Pt(e){let{show:t,onClose:n,claudeInfo:r,messages:i,sessionElapsed:a,sessionId:o,cacheKey:s}=e,[c,l]=(0,N.useState)(null);if(!t)return null;let u=i.flatMap(e=>e.events?.filter(e=>e.type===`usage`)??[]),d=u.at(-1),f=d?.peak_request_pct==null?d?.context_window?Math.round((d.input_tokens+d.cache_creation_tokens+d.cache_read_tokens)/d.context_window*100):0:Math.round(d.peak_request_pct*100),p=u.reduce((e,t)=>e+t.input_tokens+t.cache_creation_tokens+t.cache_read_tokens+t.output_tokens,0),m=i.flatMap(e=>e.events?.filter(e=>e.type===`rate_limit`)??[]).at(-1),h=u.reduce((e,t)=>e+(t.total_cost_usd??0),0),g=r?.account?.subscriptionType,_=e=>{let t=e*1e3-Date.now();if(t<=0)return`now`;let n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4);return n>0?`${n}h ${r}m`:`${r}m`};return(0,M.jsx)(`div`,{className:`claude-info-overlay`,onClick:n,children:(0,M.jsxs)(`div`,{className:`claude-info-modal`,onClick:e=>e.stopPropagation(),children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsx)(`img`,{src:`/brand/claude.png`,alt:`Claude`,className:`claude-info-icon`}),(0,M.jsx)(`span`,{children:`Claude Code`}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:n,"aria-label":`Close`,children:`✕`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,children:[(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Version`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:r?r.version:`…`})]}),(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Email`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:r?.account?.email??`…`})]})]}),(g||m||h>0)&&(0,M.jsxs)(`div`,{className:`claude-info-section`,children:[g&&(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Plan`}),(0,M.jsx)(`span`,{className:`claude-info-value`,style:{textTransform:`capitalize`},children:g})]}),m&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Usage`}),(0,M.jsxs)(`span`,{className:`claude-info-value`,children:[Math.round(m.utilization*100),`%`]})]}),(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Resets in`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:_(m.resetsAt)})]}),m.isUsingOverage&&(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Overage`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:`Active`})]})]}),h>0&&(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Session cost`}),(0,M.jsxs)(`span`,{className:`claude-info-value`,children:[`$`,h<.01?h.toFixed(4):h.toFixed(2)]})]})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,children:[(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Model`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:r?.model??`…`})]}),(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Context used`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:f>0?`${f}%`:`—`})]}),(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Tokens`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:p>0?Et(p):`—`})]}),(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Session`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:Tt(a)})]}),(o||s)&&(()=>{let e=o??s??``;return(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Session`}),(0,M.jsx)(`button`,{type:`button`,className:`claude-info-value claude-info-id-copy`,title:`${e} (${o?`flushed`:`pre-flush`}) — click to copy`,onClick:async()=>{l(await ie(e)?`copied`:`failed`),setTimeout(()=>l(null),1200)},children:c===`copied`?`copied ✓`:c===`failed`?`copy failed ✕`:`${e.slice(0,8)}…`})]})})()]})]})})}function Ft({open:e,installed:t,latest:n,initialActionId:r,onClose:i}){let[a,o]=(0,N.useState)(r),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(null),[h,g]=(0,N.useState)(null),_=(0,N.useRef)(null);(0,N.useEffect)(()=>{o(r)},[r]),(0,N.useEffect)(()=>{if(!e||!a)return;let t=new EventSource(`/api/admin/actions/${a}/stream`);return t.onmessage=e=>{f(!1),c(t=>t+e.data+`
2
+ `)},t.addEventListener(`done`,e=>{m(JSON.parse(e.data)),t.close()}),t.onerror=()=>{f(!0)},()=>{t.close()}},[e,a]),(0,N.useEffect)(()=>{let e=_.current;e&&(e.scrollTop=e.scrollHeight)},[s]);let ee=(0,N.useCallback)(async()=>{u(!0),g(null);try{let e=await fetch(`/api/admin/actions/upgrade`,{method:`POST`}),t=await e.json().catch(()=>({}));if(!e.ok){g(t?.reason===`systemd-run-absent`?`This host has no systemd, so the installer cannot be started from here.`:`Could not start the update (HTTP ${e.status}).`);return}o(t.actionId)}catch(e){console.error(`[admin-ui] update-start failed:`,e),g(e instanceof Error?e.message:String(e))}finally{u(!1)}},[]);return e?(0,M.jsx)(`div`,{className:`claude-info-overlay`,onClick:i,children:(0,M.jsxs)(`div`,{className:`claude-info-modal update-modal`,onClick:e=>e.stopPropagation(),role:`dialog`,"aria-label":`Software update`,children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsx)(`span`,{children:`Software update`}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:i,"aria-label":`Close`,children:`✕`})]}),(0,M.jsxs)(`div`,{className:`update-modal-body`,children:[(0,M.jsxs)(`div`,{className:`update-modal-versions`,children:[(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Installed`}),(0,M.jsx)(`span`,{className:`claude-info-value`,children:t})]}),(0,M.jsxs)(`div`,{className:`claude-info-row`,children:[(0,M.jsx)(`span`,{className:`claude-info-label`,children:`Latest`}),(0,M.jsx)(`span`,{className:`claude-info-value update-version-new`,children:n??`unknown`})]})]}),h&&(0,M.jsx)(`div`,{className:`update-modal-launch-error`,children:h}),!a&&(0,M.jsx)(F,{variant:`primary`,size:`sm`,className:`update-modal-btn`,disabled:l,onClick:()=>{ee()},children:l?`Starting…`:`Update`}),a&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`pre`,{className:`update-modal-output`,ref:_,children:s}),d&&!p&&(0,M.jsx)(`div`,{className:`update-modal-reconnecting`,children:`Reconnecting. The update restarts the server, so this gap is expected and the install keeps running.`}),p&&(0,M.jsx)(`div`,{className:`update-modal-result`,children:p.code===0&&p.changed?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`update-success-icon`,children:`✓`}),` Updated to `,p.versionAfter,`.`]}):p.code===0?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`update-error-icon`,children:`!`}),` The installer finished but the version is still `,p.versionAfter,`.`]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`update-error-icon`,children:`!`}),` The installer exited with code `,p.code,`.`]})})]})]})]})}):null}function It({open:e,onConnect:t,onClose:n}){return e?(0,M.jsx)(`div`,{className:`claude-info-overlay`,onClick:n,children:(0,M.jsxs)(`div`,{className:`claude-info-modal`,onClick:e=>e.stopPropagation(),role:`alertdialog`,"aria-label":`Claude is not connected`,children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsx)(`span`,{children:`Claude isn’t connected`}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:n,"aria-label":`Close`,children:`✕`})]}),(0,M.jsxs)(`div`,{className:`claude-info-section`,style:{padding:`12px 14px`,fontSize:`11px`,color:`var(--text-secondary)`,display:`flex`,flexDirection:`column`,gap:`10px`},children:[(0,M.jsx)(`span`,{children:`This needs Claude, which is currently disconnected. Connect to continue — the rest of the dashboard stays available either way.`}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,alignItems:`center`},children:[(0,M.jsx)(F,{variant:`primary`,size:`sm`,onClick:t,children:`Connect Claude`}),(0,M.jsx)(`button`,{type:`button`,className:`claude-info-close`,style:{fontSize:`11px`},onClick:n,children:`Not now`})]})]})]})}):null}function Lt(e){let t=Math.round(e/6e4),n=Math.floor(t/60),r=t%60;return`${n}h ${String(r).padStart(2,`0`)}m`}function J(e){return e.activeMs.thinking+e.activeMs.messaging+e.activeMs.toolUse}function Rt(e){return e.toLocaleString(`en-GB`)}function zt(e){return`£${e.toFixed(2)}`}function Bt(e){let t=[`Day`,`Active`,`Output tokens`,`Input tokens`,`Cache write`,`Cache read`,`Opus 5 (GBP)`,`Sonnet 5 (GBP)`],n=(e,t)=>[e,Lt(J(t)),String(t.tokens.output),String(t.tokens.input),String(t.tokens.cacheWrite),String(t.tokens.cacheRead),t.costGBP.opus.toFixed(2),t.costGBP.sonnet.toFixed(2)];return[t,...e.days.map(e=>n(e.date,e)),n(`TOTAL (${e.days.length} d)`,e.totals)].map(e=>e.join(`,`)).join(`
3
+ `)}function Vt({label:e,d:t,bold:n}){let r=n?`th`:`td`;return(0,M.jsxs)(`tr`,{className:n?`usage-total-row`:void 0,children:[(0,M.jsx)(r,{className:`usage-day`,children:e}),(0,M.jsx)(r,{children:Lt(J(t))}),(0,M.jsx)(r,{children:Rt(t.tokens.output)}),(0,M.jsx)(r,{children:Rt(t.tokens.input)}),(0,M.jsx)(r,{children:Rt(t.tokens.cacheWrite)}),(0,M.jsx)(r,{children:Rt(t.tokens.cacheRead)}),(0,M.jsx)(r,{children:zt(t.costGBP.opus)}),(0,M.jsx)(r,{children:zt(t.costGBP.sonnet)})]})}function Ht({show:e,onClose:t,anchorEl:n,sessionId:r,summary:i,loading:a,error:o}){let s=(0,N.useRef)(null);if(s.current=n,!e)return null;let c=!!i&&i.days.length>0;return(0,M.jsxs)(dt,{anchorRef:s,onClose:t,className:`usage-popover`,role:`dialog`,ariaLabel:`Session usage and cost`,anchorId:r??void 0,children:[(0,M.jsxs)(`div`,{className:`claude-info-header`,children:[(0,M.jsxs)(`span`,{children:[`Usage & cost`,r?` · ${r.slice(0,8)}`:``]}),c&&(0,M.jsx)(`button`,{className:`usage-download`,onClick:()=>{if(!i)return;let e=new Blob([Bt(i)],{type:`text/csv;charset=utf-8`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`usage-${r?r.slice(0,8):`session`}.csv`,document.body.appendChild(n),n.click(),n.remove(),URL.revokeObjectURL(t)},"aria-label":`Download as CSV`,title:`Download as CSV`,children:(0,M.jsx)(u,{size:14})}),(0,M.jsx)(`button`,{className:`claude-info-close`,onClick:t,"aria-label":`Close`,children:(0,M.jsx)(k,{size:14})})]}),(0,M.jsxs)(`div`,{className:`claude-info-section usage-body`,children:[a&&(0,M.jsx)(`div`,{className:`usage-note`,children:`Computing usage…`}),!a&&o&&(0,M.jsx)(`div`,{className:`usage-note usage-error`,children:o}),!a&&!o&&i&&i.days.length===0&&(0,M.jsx)(`div`,{className:`usage-note`,children:`No usage recorded for this session yet.`}),!a&&!o&&i&&i.days.length>0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`usage-table-scroll`,children:(0,M.jsxs)(`table`,{className:`usage-table`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{className:`usage-day`,children:`Day`}),(0,M.jsx)(`th`,{children:`Active`}),(0,M.jsx)(`th`,{children:`Output tok`}),(0,M.jsx)(`th`,{children:`Input tok`}),(0,M.jsx)(`th`,{children:`Cache write`}),(0,M.jsx)(`th`,{children:`Cache read`}),(0,M.jsx)(`th`,{children:`Opus 5 (£)`}),(0,M.jsx)(`th`,{children:`Sonnet 5 (£)`})]})}),(0,M.jsxs)(`tbody`,{children:[i.days.map(e=>(0,M.jsx)(Vt,{label:e.date,d:e},e.date)),(0,M.jsx)(Vt,{label:`TOTAL (${i.days.length} d)`,d:i.totals,bold:!0})]})]})}),(0,M.jsxs)(`div`,{className:`usage-note usage-caveats`,children:[`Prices dated `,i.pricing.opusPriceDate,` · £/$ `,i.pricing.usdPerGbp,` · Sonnet tokenizer factor `,i.pricing.tokenizerFactor,`. Idle human-wait dominates the calendar span; cache-read tokens dominate cost.`]})]})]})]})}var Ut=`https://claude.ai/code`,Wt=200,Gt=[500,1e3,1500,2e3,2500,3e3,3e3];function Kt(e,t,n){if(e&&n.target)return{kind:`navigate`,url:n.target,sameOrigin:!0};let r=n.slug??n.bridgeSessionId??null;if(e&&r)return{kind:`navigate`,url:`${Ut}/${r}`,sameOrigin:!1};let i=n.reason||n.error||`status ${t}`;return{kind:`error`,sessionId:n.sessionId??null,reason:i}}var qt=`maxy:sidebar:nav-collapsed`;function Jt(e,t){return T(e,t)}function Yt(e){let{zone:t}=ue(),{businessName:n,cacheKey:r,onConnectClaude:o,role:ee,userName:b,userAvatar:x,onSelectProjects:ne,onSelectTasks:w,onCloseMobileDrawer:T,collapsed:E,onSelectData:O,initialDataSurface:re=!1,onLogout:ie,onDisconnect:k,disconnecting:ae,claudeConnected:oe=!0,subAccounts:ce,activeAccountId:j,switchingAccount:de,onSwitchAccount:pe,refreshAccounts:P,onOpenConversations:F}=e,I=a(r),Ce=(0,N.useCallback)(e=>({key:`reseat`,label:`Reset session ${e.title} (model, mode, effort)`,menuLabel:`Reset`,title:`Reset — move this session onto a chosen model, mode, and effort`,icon:(0,M.jsx)(Te,{size:12}),panel:()=>(0,M.jsx)(wt,{row:e,adminFetch:I,onError:e=>z({message:e,failed:!0})})}),[I]),we=v.productName,ke=n||we,Ae=typeof b==`string`?b:b===null?`name unavailable`:ke,je=(Ae.trim().charAt(0)||`?`).toUpperCase(),[Me,Ne]=(0,N.useState)(re?`data`:`sessions`),[Pe,Fe]=(0,N.useState)(!1),[R,Ie]=(0,N.useState)(null),[Le,Re]=(0,N.useState)(!1),[ze,Be]=(0,N.useState)(null);(0,N.useEffect)(()=>{let e=!1;return I(`/api/admin/version`).then(e=>e.json()).then(t=>{e||Ie(t)}).catch(e=>console.error(`[admin-ui] sidebar-version fetch failed:`,e)),I(`/api/admin/actions/latest`).then(e=>e.json()).then(t=>{e||Be(t?.action?.running?t.action.actionId:null)}).catch(e=>console.error(`[admin-ui] sidebar-latest-action fetch failed:`,e)),()=>{e=!0}},[I]);let[Ve,He]=(0,N.useState)(!1),Ue=!E&&(ce?.length??0)>1&&!!pe,We=ce?.find(e=>e.isHouse)??null,Ge=(0,N.useCallback)(()=>{We&&We.accountId!==j&&(He(!1),pe?.(We.accountId,`/`))},[We,j,pe]),[Ke,z]=(0,N.useState)(null),[B,qe]=(0,N.useState)(null),[Je,Ye]=(0,N.useState)(!1),[V,Xe]=(0,N.useState)([]),[Ze]=(0,N.useState)(()=>typeof window>`u`?null:new URLSearchParams(window.location.search).get(`session`)),[Qe,$e]=(0,N.useState)(!1),[et,tt]=(0,N.useState)(null),[nt,rt]=(0,N.useState)(!1),[it,at]=(0,N.useState)(!1),[ot,st]=(0,N.useState)(!1),[H,ct]=(0,N.useState)(!1);(0,N.useEffect)(()=>{let e=null;try{e=window.localStorage.getItem(qt)}catch{e=null}ct(e===`1`)},[]);let lt=(0,N.useCallback)(()=>{let e=!H;try{window.localStorage.setItem(qt,e?`1`:`0`)}catch(e){console.warn(`[admin-ui] sidebar-nav-collapse op=persist-failed error=${e instanceof Error?e.message:String(e)}`)}ct(e)},[H]),[ut,dt]=(0,N.useState)(null),[U,pt]=(0,N.useState)(new Set),W=(0,N.useRef)(new Map),[G,mt]=(0,N.useState)(!1),[K,ht]=(0,N.useState)(new Set),[gt,_t]=(0,N.useState)(!1),[q,vt]=(0,N.useState)(null),[yt,bt]=(0,N.useState)(new Set),[xt,St]=(0,N.useState)(new Set),[Ct,Tt]=(0,N.useState)(new Set),[Et,Ot]=(0,N.useState)(null),[At,Mt]=(0,N.useState)(``),[Pt,Lt]=(0,N.useState)(!1),[J,Rt]=(0,N.useState)(null),[zt,Bt]=(0,N.useState)(null),[Vt,Ut]=(0,N.useState)(!1),[Yt,Xt]=(0,N.useState)(null),[Y,$t]=(0,N.useState)(!1),[en,X]=(0,N.useState)(!1),tn=(0,N.useRef)(0);(0,N.useEffect)(()=>{if(!Ke)return;let e=setTimeout(()=>z(null),2500);return()=>clearTimeout(e)},[Ke]);let Z=(0,N.useCallback)(async()=>{if(!r)return null;let e=++tn.current;rt(!0),tt(null);try{let t=await I(`/api/admin/sidebar-sessions`);if(!t.ok)throw Error(`status ${t.status}`);let n=await t.json(),r=n.sessions??[];return e===tn.current?(Xe(r),dt(n.accountId??null),$e(!0),r):r}catch(t){let n=t instanceof Error?t.message:String(t);return e===tn.current&&tt(`Failed to load sessions: ${n}`),console.error(`[admin-ui] sidebar-sessions fetch failed: ${n}`),null}finally{e===tn.current&&rt(!1)}},[r,I]);(0,N.useEffect)(()=>{!r||Qe||Z()},[r,Qe,Z]),(0,N.useEffect)(()=>{if(!r)return;let e=null;function t(){Z()}function n(){e===null&&(e=setInterval(t,Zt))}function i(){e!==null&&(clearInterval(e),e=null)}function a(){document.hidden?i():(t(),n())}return document.hidden||n(),document.addEventListener(`visibilitychange`,a),()=>{i(),document.removeEventListener(`visibilitychange`,a)}},[r,Z]);let nn=()=>{Z()},rn=()=>{Ne(`data`),O(),T()},Q=typeof window<`u`&&window.location?.pathname||`/`,an=Me===`data`,on=typeof window<`u`&&window.location?.search||``,sn=new URLSearchParams(on),cn=sn.has(`label`)&&!sn.has(`nodeId`),$=e=>{T(),window.location.href=e},ln=[{key:`dashboard`,label:`Dashboard`,icon:(0,M.jsx)(d,{size:17,strokeWidth:1.75}),active:Q===`/`&&!an,onClick:()=>$(`/`)},{key:`chat`,label:`Chat`,icon:(0,M.jsx)(y,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/chat`),onClick:()=>$(`/chat`)},{key:`tasks`,label:`Tasks`,icon:(0,M.jsx)(xe,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/tasks`),onClick:()=>{w(),T()}},{key:`calendar`,label:`Calendar`,icon:(0,M.jsx)(p,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/calendar`),onClick:()=>$(`/calendar`)},{key:`routines`,label:`Routines`,icon:(0,M.jsx)(Oe,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/routines`),onClick:()=>$(`/routines`)},{key:`skills`,label:`Skills`,icon:(0,M.jsx)(Ee,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/skills`),onClick:()=>$(`/skills`)},{key:`agents`,label:`Agents`,icon:(0,M.jsx)(L,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/agents`),onClick:()=>$(`/agents`)},{key:`data`,label:`Data`,icon:(0,M.jsx)(m,{size:17,strokeWidth:1.75}),active:an,onClick:rn},{key:`container`,label:le().term,icon:(0,M.jsx)(S,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/graph`)&&cn,onClick:()=>{ne(),T()}},{key:`graph`,label:`Graph`,icon:(0,M.jsx)(De,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/graph`)&&!cn,onClick:()=>$(`/graph`)},{key:`activity`,label:`Activity`,icon:(0,M.jsx)(C,{size:17,strokeWidth:1.75}),active:Q.startsWith(`/activity`),onClick:()=>$(`/activity`)}],un=(0,N.useCallback)(async e=>{if(yt.has(e.sessionId))return;bt(t=>{let n=new Set(t);return n.add(e.sessionId),n});let t=window.open(``,`_blank`);try{let n=await I(`/api/admin/session-rc-spawn`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:e.sessionId,name:e.title||e.sessionId,...e.accountId?{targetAccountId:e.accountId}:{}})}),r=await n.json().catch(()=>({})),i=Kt(n.ok,n.status,{...r,sessionId:r.sessionId??e.sessionId});i.kind===`navigate`?(T(),t?t.location.href=i.url:window.open(i.url,`_blank`)):(t?.close(),console.error(`[admin-ui] sidebar-session-resume-failed sessionId=${e.sessionId} status=${n.status} reason=${i.reason}`),qe(i))}catch(n){t?.close();let r=n instanceof Error?n.message:String(n);console.error(`[admin-ui] sidebar-session-resume-failed sessionId=${e.sessionId} error=${r}`),qe({sessionId:e.sessionId,reason:r})}finally{bt(t=>{let n=new Set(t);return n.delete(e.sessionId),n})}},[I,T,yt]),dn=(0,N.useCallback)(async e=>{let t=e.slice(0,8);for(let t=1;t<=Gt.length;t++){await new Promise(e=>setTimeout(e,Gt[t-1]));let n=await Z();if(n&&n.some(t=>t.sessionId===e))return}console.error(`[admin-ui] sidebar-new-session-converge-timeout sessionId=${t}`)},[Z]),fn=(0,N.useCallback)(async e=>{if(!Y){$t(!0);try{let t=await I(`/api/admin/session-rc-spawn`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:e})}),n=await t.json().catch(()=>({})),r=Kt(t.ok,t.status,n);r.kind===`navigate`?r.sameOrigin?window.location.assign(r.url):(window.open(r.url,`_blank`),n.sessionId?dn(n.sessionId):console.error(`[admin-ui] sidebar-new-session-converge-skipped reason=no-session-id`)):t.status===503||r.reason===`claude-auth-dead`?(X(!1),Ye(!0)):(console.error(`[admin-ui] sidebar-new-session-failed status=${t.status} reason=${r.reason}`),X(!1),qe(r))}catch(e){let t=e instanceof Error?e.message:String(e);console.error(`[admin-ui] sidebar-new-session-failed error=${t}`),X(!1),qe({sessionId:null,reason:t})}finally{$t(!1)}}},[I,Y,dn]),pn=(0,N.useCallback)((e,t)=>{e.stopPropagation(),vt(t)},[]),mn=(0,N.useCallback)(async(e,t)=>{e.stopPropagation(),Rt(t),Bt(null),Xt(null),Ut(!0);try{let e=await I(`/api/admin/session-usage?sessionId=${encodeURIComponent(t.sessionId)}`),n=await e.json().catch(()=>({}));e.ok?Bt(n):Xt(n.error??`status ${e.status}`)}catch(e){Xt(e instanceof Error?e.message:String(e))}finally{Ut(!1)}},[I]),hn=(0,N.useCallback)(async(e,t={})=>{let n=t.refresh??!0;if(U.has(e.sessionId))return!1;pt(t=>{let n=new Set(t);return n.add(e.sessionId),n});try{let t=await I(`/api/admin/session-delete`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:e.sessionId})});if(!t.ok){let n=await t.json().catch(()=>({}));return console.error(`[admin-ui] sidebar-session-delete-failed sessionId=${e.sessionId} status=${t.status} error=${n.error??`unknown`}`),z({message:`Delete failed: ${n.error??`status ${t.status}`}`,failed:!0}),!1}return await t.json(),Xe(t=>t.filter(t=>t.sessionId!==e.sessionId)),n&&Z(),!0}catch(t){let n=t instanceof Error?t.message:String(t);return console.error(`[admin-ui] sidebar-session-delete-failed sessionId=${e.sessionId} error=${n}`),z({message:`Delete failed: ${n}`,failed:!0}),!1}finally{pt(t=>{let n=new Set(t);return n.delete(e.sessionId),n})}},[I,U,Z]),gn=(0,N.useCallback)(e=>{ht(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),_n=(0,N.useCallback)(()=>{mt(!1),ht(new Set)},[]),vn=(0,N.useCallback)(async()=>{let e=[...K].map(e=>V.find(t=>t.sessionId===e)).filter(e=>!!e),t=(await Promise.all(e.map(e=>hn(e,{refresh:!1})))).filter(Boolean).length,n=e.length-t;n>0&&console.warn(`[admin-ui] sidebar-bulk-delete op=done requested=${e.length} ok=${t} failed=${n}`),Z(),_n()},[K,V,hn,Z,_n]),yn=(0,N.useCallback)(async(e,t)=>{if(e.stopPropagation(),!xt.has(t.sessionId)){St(e=>{let n=new Set(e);return n.add(t.sessionId),n});try{let e=await I(`/api/admin/session-stop`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:t.sessionId})});if(!e.ok){let n=await e.json().catch(()=>({}));console.error(`[admin-ui] sidebar-session-stop-failed sessionId=${t.sessionId} status=${e.status} error=${n.error??`unknown`}`),z({message:`Stop failed: ${n.error??`status ${e.status}`}`,failed:!0});return}Z()}catch(e){let n=e instanceof Error?e.message:String(e);console.error(`[admin-ui] sidebar-session-stop-failed sessionId=${t.sessionId} error=${n}`),z({message:`Stop failed: ${n}`,failed:!0})}finally{St(e=>{let n=new Set(e);return n.delete(t.sessionId),n})}}},[I,xt,Z]),bn=(0,N.useCallback)(async(e,t,n)=>{if(e.stopPropagation(),!Ct.has(t.sessionId)){Tt(e=>{let n=new Set(e);return n.add(t.sessionId),n});try{let e=await I(`/api/admin/session-archive`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:t.sessionId,mode:n})});if(!e.ok){let r=await e.json().catch(()=>({})),i=r.detail??r.error??`status ${e.status}`;console.error(`[admin-ui] sidebar-session-archive-failed sessionId=${t.sessionId} mode=${n} status=${e.status} error=${r.error??`unknown`}`),z({message:`${n===`archive`?`Archive`:`Unarchive`} failed: ${i}`,failed:!0});return}Z()}catch(e){let r=e instanceof Error?e.message:String(e);console.error(`[admin-ui] sidebar-session-archive-failed sessionId=${t.sessionId} mode=${n} error=${r}`),z({message:`${n===`archive`?`Archive`:`Unarchive`} failed: ${r}`,failed:!0})}finally{Tt(e=>{let n=new Set(e);return n.delete(t.sessionId),n})}}},[I,Ct,Z]),xn=(0,N.useCallback)(async e=>{let t=At.trim();if(!t){z({message:`Title can’t be empty`,failed:!0});return}if(t.length>Wt){z({message:`Title too long (max ${Wt})`,failed:!0});return}Lt(!0);try{let n=await I(`/api/admin/session-rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:e.sessionId,title:t})});if(!n.ok){let t=await n.json().catch(()=>({})),r=t.reason??t.error??`status ${n.status}`;console.error(`[admin-ui] sidebar-session-rename sessionId=${e.sessionId.slice(0,8)} outcome=rejected reason=${r}`),z({message:`Rename failed: ${r}`,failed:!0});return}Ot(null),Mt(``),Z()}catch(t){let n=t instanceof Error?t.message:String(t);console.error(`[admin-ui] sidebar-session-rename sessionId=${e.sessionId.slice(0,8)} outcome=rejected reason=${n}`),z({message:`Rename failed: ${n}`,failed:!0})}finally{Lt(!1)}},[I,At,Z]);return(0,M.jsxs)(`aside`,{className:`side`,children:[(0,M.jsxs)(`div`,{className:`side-brand`,children:[Ue?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{type:`button`,className:`side-brand-icon-btn`,"aria-label":`Switch to house account`,disabled:!We,onClick:Ge,children:(0,M.jsx)(`img`,{className:`side-brand-icon`,src:i,alt:``,"aria-hidden":`true`})}),(0,M.jsxs)(`button`,{type:`button`,className:`side-brand-trigger`,"aria-haspopup":`menu`,"aria-expanded":Ve,"aria-label":`Switch sub-account`,onClick:()=>{let e=!Ve;He(e),e&&P?.()},children:[(0,M.jsxs)(`span`,{className:`side-brand-lockup`,children:[(0,M.jsx)(`span`,{className:`side-brand-business`,children:ke}),(0,M.jsx)(`span`,{className:`side-brand-product`,children:v.productName}),R&&(0,M.jsxs)(`span`,{className:`side-brand-version`,children:[`v`,R.installed]})]}),(0,M.jsx)(ge,{size:14,className:`side-brand-caret`,"aria-hidden":`true`})]})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`img`,{className:`side-brand-icon`,src:i,alt:``,"aria-hidden":`true`}),(0,M.jsxs)(`span`,{className:`side-brand-lockup`,children:[(0,M.jsx)(`span`,{className:`side-brand-business`,children:ke}),(0,M.jsx)(`span`,{className:`side-brand-product`,children:v.productName}),R&&(0,M.jsxs)(`span`,{className:`side-brand-version`,children:[`v`,R.installed]})]})]}),R?.updateAvailable&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`button`,{type:`button`,className:`side-brand-update`,"aria-label":`Software update available`,title:`Software update available`,onClick:()=>Re(!0),children:(0,M.jsx)(u,{size:14})}),(0,M.jsx)(`span`,{className:`side-brand-icon-dot`,"aria-hidden":`true`})]}),Ve&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`side-brand-scrim`,"aria-hidden":`true`,onClick:()=>He(!1)}),(0,M.jsx)(s,{open:Ve,accounts:ce??[],activeAccountId:j??null,switching:de??!1,onSelect:e=>pe?.(e),onClose:()=>He(!1)})]})]}),(0,M.jsxs)(`nav`,{className:`side-nav${H?` side-nav--collapsed`:``}`,children:[(0,M.jsxs)(`div`,{className:`group-head`,children:[(0,M.jsx)(`span`,{children:`Menu`}),(0,M.jsx)(`button`,{type:`button`,className:`side-nav-toggle`,"aria-expanded":!H,"aria-controls":`side-nav-rows`,"aria-label":H?`Expand the menu`:`Collapse the menu`,title:H?`Expand the menu`:`Collapse the menu`,onClick:lt,children:H?(0,M.jsx)(_e,{size:12}):(0,M.jsx)(ge,{size:12})})]}),(0,M.jsx)(`div`,{id:`side-nav-rows`,children:ln.map(e=>(0,M.jsxs)(`button`,{type:`button`,className:`admin-row nav-row${e.active?` active`:``}`,"aria-current":e.active?`page`:void 0,onClick:e.onClick,children:[e.icon,(0,M.jsx)(`span`,{className:`label`,children:e.label}),(0,M.jsx)(`span`,{className:`kbd`})]},e.key))})]}),(()=>{let e=V.filter(e=>it?!0:!e.isSubagent).filter(e=>ot?!0:!e.archived),n=V.some(e=>e.isSubagent),r=V.some(e=>e.archived);return(0,M.jsx)(`div`,{className:`side-sessions`,children:(0,M.jsxs)(`div`,{className:`side-list`,children:[(0,M.jsxs)(`div`,{className:`group-head`,children:[(0,M.jsx)(`span`,{children:`Sessions`}),(0,M.jsxs)(`span`,{className:`group-head-meta`,children:[(0,M.jsx)(`button`,{type:`button`,className:`group-head-select${G?` active`:``}`,"aria-pressed":G,title:G?`Exit select mode`:`Select multiple sessions to delete`,onClick:()=>{mt(e=>!e),ht(new Set),Ot(null),Mt(``)},children:`Select`}),(0,M.jsx)(`button`,{type:`button`,className:`group-head-refresh`,title:`Refresh sessions`,"aria-label":`Refresh sessions`,onClick:nn,disabled:nt,children:(0,M.jsx)(l,{size:12,className:nt?`spinning`:void 0})}),(0,M.jsx)(`span`,{children:nt?`…`:String(e.length)}),(0,M.jsxs)(`button`,{type:`button`,className:`admin-btn-cta side-sessions-new`,onClick:()=>{X(!0)},disabled:Y,"aria-busy":Y,"aria-label":Y?`Spawning session`:`New session`,title:Y?`Spawning session`:`New session`,children:[Y?(0,M.jsx)(te,{size:13,className:`spinning`}):(0,M.jsx)(f,{size:13}),(0,M.jsx)(`span`,{children:Y?`Spawning…`:`New session`})]})]})]}),G&&(0,M.jsxs)(`div`,{className:`session-select-bar`,children:[(0,M.jsxs)(`span`,{className:`session-select-count`,children:[K.size,` selected`]}),(0,M.jsxs)(`button`,{type:`button`,className:`session-select-delete`,disabled:K.size===0,onClick:()=>_t(!0),children:[`Delete `,K.size]}),(0,M.jsx)(`button`,{type:`button`,className:`session-select-cancel`,onClick:_n,children:`Cancel`})]}),ut&&(0,M.jsx)(`div`,{className:`side-account-id`,title:`This install's accountId. The first 8 characters match the truncated UUID label on the live Remote Control daemon entry in claude.ai/code.`,children:(0,M.jsx)(`code`,{children:ut})}),(n||r)&&(0,M.jsxs)(`div`,{className:`artefact-filter-chips`,children:[n&&(0,M.jsx)(`button`,{type:`button`,className:`artefact-filter-chip${it?` active`:``}`,"aria-pressed":it,onClick:()=>at(e=>!e),title:it?`Hide subagent sessions`:`Show subagent sessions`,children:`Subagents`}),r&&(0,M.jsx)(`button`,{type:`button`,className:`artefact-filter-chip${ot?` active`:``}`,"aria-pressed":ot,onClick:()=>st(e=>!e),title:ot?`Hide archived sessions`:`Show archived sessions`,children:`Archived`})]}),et&&(0,M.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:et}),Qe&&!et&&e.length===0&&(0,M.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:`No sessions yet`}),e.map(e=>{let n=Jt(e.startedAt,t),r=yt.has(e.sessionId),i=U.has(e.sessionId),a=xt.has(e.sessionId),o=Ct.has(e.sessionId),s=r||i||a||o,c=()=>{window.location.assign(`/chat?session=${e.sessionId}`)},l=[{key:`open`,label:`Resume session ${e.title} in claude.ai/code`,menuLabel:`Resume in claude.ai/code`,title:`Resume in a fresh local Remote Control PTY`,icon:(0,M.jsx)(ye,{size:12}),busy:r,onClick:()=>{un(e)}},{key:`message`,label:`Open session ${e.title} in admin webchat`,menuLabel:`Open in webchat`,title:`Open in admin webchat (/chat) — sending resumes this session`,icon:(0,M.jsx)(Se,{size:12}),onClick:()=>{c()}},{key:`usage`,label:`Usage and cost for session ${e.title}`,menuLabel:`Usage & cost`,title:`Per-day active time, tokens, and estimated GBP cost`,icon:(0,M.jsx)(be,{size:12}),onClick:t=>{mn(t,e)}},...e.live?[{key:`stop`,label:`Stop session ${e.title}`,menuLabel:`Stop`,title:`Stop session process (keeps the conversation, can resume later)`,icon:(0,M.jsx)(_,{size:12}),busy:a,onClick:t=>{yn(t,e)}}]:[],e.archived?{key:`unarchive`,label:`Unarchive session ${e.title}`,menuLabel:`Unarchive`,title:`Unarchive (move back to the active list)`,icon:(0,M.jsx)(me,{size:12}),busy:o,onClick:t=>{bn(t,e,`unarchive`)}}:{key:`archive`,label:`Archive session ${e.title}`,menuLabel:`Archive`,title:`Archive (hide from the list, keeps the conversation resumable)`,icon:(0,M.jsx)(he,{size:12}),busy:o,onClick:t=>{bn(t,e,`archive`)}},{key:`rename`,label:`Rename session ${e.title}`,menuLabel:`Rename`,title:`Rename this session`,icon:(0,M.jsx)(h,{size:12}),busy:Pt&&Et===e.sessionId,onClick:t=>{t.stopPropagation(),Ot(e.sessionId),Mt(e.personName??e.title)}},{key:`delete`,label:`Delete session ${e.title}`,menuLabel:`Delete`,title:`Delete session (stops the process, removes the conversation)`,icon:(0,M.jsx)(g,{size:12}),danger:!0,busy:i,onClick:t=>{pn(t,e)}},Ce({sessionId:e.sessionId,model:e.model??null,title:e.personName??e.title})],u=e.channel===`whatsapp`?` conv-channel-whatsapp`:e.channel===`telegram`?` conv-channel-telegram`:``,d=e.channel===`whatsapp`||e.channel===`telegram`||e.channel===`webchat`,f=D.includes(e.channel??``)&&e.senderId&&e.titleSource===`prefix`?se({operatorName:e.personName??null,whatsappName:e.whatsappName??null,senderId:e.senderId,title:e.title,channel:e.channel}):e.personName??e.title;return(0,M.jsxs)(`div`,{ref:t=>{let n=W.current;t?n.set(e.sessionId,t):n.delete(e.sessionId)},className:`conv conv-with-actions${u}${e.sessionId===Ze?` active`:``}`,children:[(0,M.jsxs)(`div`,{className:`conv-main-static conv-main-clickable`,role:`button`,tabIndex:0,"aria-label":`Open ${f} in webchat`,onClick:()=>{if(Et!==e.sessionId){if(G){gn(e.sessionId);return}c()}},onKeyDown:t=>{Et!==e.sessionId&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),G?gn(e.sessionId):c())},children:[G&&(0,M.jsx)(`span`,{className:`conv-select-check`,onClick:e=>e.stopPropagation(),children:(0,M.jsx)(fe,{checked:K.has(e.sessionId),ariaLabel:`Select ${f}`,onChange:()=>gn(e.sessionId)})}),(0,M.jsx)(`span`,{className:`conv-live-dot`,"data-live":e.live?`1`:`0`,"data-archived":e.archived?`1`:`0`,"aria-label":e.archived?`archived session`:e.live?`live session`:`ended session`}),(0,M.jsxs)(`span`,{className:`conv-stack`,children:[(0,M.jsxs)(`span`,{className:`conv-name-line`,children:[d&&(0,M.jsx)(A,{channel:e.channel,size:13}),Et===e.sessionId?(0,M.jsx)(`input`,{className:`conv-name conv-name-edit`,autoFocus:!0,onFocus:e=>e.currentTarget.select(),value:At,disabled:Pt,"aria-label":`New title for session ${e.title}`,onChange:e=>Mt(e.target.value),onClick:e=>e.stopPropagation(),onKeyDown:t=>{t.key===`Enter`?(t.preventDefault(),xn(e)):t.key===`Escape`&&(t.preventDefault(),Ot(null),Mt(``))},onBlur:()=>{Et===e.sessionId&&!Pt&&(Ot(null),Mt(``))}}):(0,M.jsx)(`span`,{className:`conv-name`,title:f,children:f})]}),(0,M.jsxs)(`span`,{className:`conv-timestamp`,children:[(0,M.jsx)(`code`,{className:`conv-session-id`,title:`First 8 characters of this session's id — distinguishes rows with identical auto-titles. The resume/delete buttons act on the full id.`,children:e.sessionId.slice(0,8)}),n&&(0,M.jsxs)(`span`,{children:[` · `,n]})]})]})]}),!G&&(0,M.jsx)(ft,{actions:l,disabled:s})]},e.sessionId)})]})})})(),(0,M.jsxs)(`div`,{className:`side-foot`,children:[(0,M.jsx)(`div`,{className:`avatar`,children:x?(0,M.jsx)(`img`,{src:x,alt:Ae}):je}),(0,M.jsxs)(`div`,{className:`who`,children:[(0,M.jsx)(`span`,{className:`name`,children:Ae}),(0,M.jsx)(Qt,{})]}),(0,M.jsx)(`button`,{type:`button`,className:`side-foot-kebab`,"aria-label":`Account menu`,"aria-haspopup":`menu`,"aria-expanded":Pe,onClick:()=>Fe(e=>!e),children:(0,M.jsx)(ve,{size:16})}),Pe&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`side-foot-menu-scrim`,"aria-hidden":`true`,onClick:()=>Fe(!1)}),(0,M.jsx)(`div`,{className:`side-foot-menu`,role:`menu`,children:(0,M.jsx)(c,{variant:`admin`,onCloseMenu:()=>Fe(!1),onLogout:ie??(()=>{}),onDisconnect:k,disconnecting:ae,claudeConnected:oe,onConnectClaude:o,cacheKey:r,onOpenConversations:F})})]})]}),Ke&&(0,M.jsx)(`div`,{className:`copy-toast${Ke.failed?` copy-toast-failed`:``}`,role:`status`,children:Ke.message}),(0,M.jsx)(jt,{open:en,pending:Y,onConfirm:e=>{fn(e)},onCancel:e=>{X(!1)}}),(0,M.jsx)(Nt,{error:B,onClose:()=>qe(null)}),(0,M.jsx)(Ft,{open:Le,installed:R?.installed??`unknown`,latest:R?.latest??null,initialActionId:ze,onClose:()=>Re(!1)}),(0,M.jsx)(It,{open:Je,onConnect:()=>{Ye(!1),o?.()},onClose:()=>Ye(!1)}),(0,M.jsx)(Dt,{target:q,anchorEl:q?W.current.get(q.sessionId)??null:null,onCancel:()=>vt(null),onConfirm:()=>{let e=q;vt(null),e&&hn(e)}},q?.sessionId??`none`),(0,M.jsx)(kt,{open:gt,count:K.size,liveCount:V.filter(e=>K.has(e.sessionId)&&e.live).length,onConfirm:()=>{_t(!1),vn()},onCancel:()=>_t(!1)}),(0,M.jsx)(Ht,{show:J!==null,onClose:()=>{Rt(null),Bt(null),Xt(null)},anchorEl:J?W.current.get(J.sessionId)??null:null,sessionId:J?.sessionId??null,summary:zt,loading:Vt,error:Yt},J?.sessionId??`none`)]})}var Xt=5e3,Zt=3e4;function Qt(){let[e,t]=(0,N.useState)(null);if((0,N.useEffect)(()=>{let e=!1,n=null;async function r(){try{let n=await fetch(`/api/admin/system-stats`);if(!n.ok){console.error(`[admin-ui] system-stats-fetch-failed status=${n.status}`);return}let r=await n.json();e||t(r)}catch(e){console.error(`[admin-ui] system-stats-fetch-failed reason=${e instanceof Error?e.message:String(e)}`)}}function i(){n===null&&(r(),n=setInterval(()=>{r()},Xt))}function a(){n!==null&&(clearInterval(n),n=null)}function o(){document.hidden?a():i()}return document.hidden||i(),document.addEventListener(`visibilitychange`,o),()=>{e=!0,a(),document.removeEventListener(`visibilitychange`,o)}},[]),!e||e.platform===`darwin`)return null;let n=e.cpuPct,r=e.memUsedPct,i=n!==null&&n>=.9,a=n!==null&&n>=.98,o=r!==null&&r>=.9,s=r!==null&&r>=.98,c=i||o,l=a||s,u=e=>e===null?`—`:`${Math.round(e*100)}%`,d=[`system-stats`];return c&&d.push(`system-stats--warn`),l&&d.push(`system-stats--crit`),(0,M.jsxs)(`span`,{className:d.join(` `),role:`status`,"aria-label":`host CPU and RAM`,children:[(0,M.jsxs)(`span`,{className:i?`system-stats__fig system-stats__fig--warn`:`system-stats__fig`,children:[`CPU `,u(n)]}),` · `,(0,M.jsxs)(`span`,{className:o?`system-stats__fig system-stats__fig--warn`:`system-stats__fig`,children:[`RAM `,u(r)]})]})}var Y=`maxy-shell-browser-px`;function $t(){if(typeof window>`u`)return 0;let e=document.querySelector(`.platform > .side`)?.getBoundingClientRect();return e&&e.width>0?Math.round(e.width):0}function en(){return typeof window>`u`?360:X(Math.round((window.innerWidth-$t())/2))}function X(e){if(typeof window>`u`)return e;let t=Math.max(360,window.innerWidth-$t()-480);return Math.min(Math.max(e,360),t)}function tn(){if(typeof window>`u`)return 360;try{let e=window.localStorage.getItem(Y);if(!e)return en();let t=parseInt(e,10);return Number.isFinite(t)?X(t):(console.warn(`[admin-ui] browser-width-parse-failed stored=${JSON.stringify(e)}`),en())}catch{return en()}}function Z({targetSelector:e=`.platform`}={}){let t=(0,N.useRef)(null),n=(0,N.useRef)(360),[,r]=(0,N.useState)(0),i=(0,N.useCallback)(t=>{n.current=t;let i=document.querySelector(e);i instanceof HTMLElement&&i.style.setProperty(`--artefact-px`,`${t}px`),r(e=>e+1)},[e]);(0,N.useLayoutEffect)(()=>{i(tn())},[i]),(0,N.useEffect)(()=>{let e=()=>i(X(n.current));return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[i]);let a=e=>{e.preventDefault();let r=t.current;if(!r)return;r.setPointerCapture(e.pointerId),r.classList.add(`dragging`);let a=!1,o=e=>{a=!0,i(X(Math.round(window.innerWidth-e.clientX)))},s=()=>{if(r.releasePointerCapture(e.pointerId),r.classList.remove(`dragging`),window.removeEventListener(`pointermove`,o),window.removeEventListener(`pointerup`,s),a)try{window.localStorage.setItem(Y,String(n.current))}catch{}};window.addEventListener(`pointermove`,o),window.addEventListener(`pointerup`,s)},o=()=>{i(en());try{window.localStorage.removeItem(Y)}catch{}};return(0,M.jsx)(`div`,{ref:t,className:`browser-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize browser`,onPointerDown:a,onDoubleClick:o})}var nn=1;function rn(e){let t=e.className,n=(typeof t==`string`?t:t?.baseVal??``).trim().split(/\s+/).filter(Boolean);return[e.tagName.toUpperCase(),...n].join(`.`)}function Q(e,t){let n=t.extent-t.vw;return n<nn?null:{op:`layout-overflow`,route:e,vw:t.vw,extent:Math.round(t.extent),delta:Math.round(n),offender:t.offender??``}}function an(e,t){if(!e||!t)return null;let n=e.documentElement?.clientWidth??0;if(n<=0)return null;let r=n,i=null;for(let t of Array.from(e.body?.querySelectorAll(`*`)??[])){let e=t.getBoundingClientRect().right;e>=r&&e>n+.5&&(r=e,i=rn(t))}return{vw:n,extent:r,offender:i}}function on(e){return e?`${e.route}|${e.delta}|${e.offender}`:null}function sn(e,t){if(!t)return;let n=Q(e,t);if(n)try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`event`,source:`layout-overflow`,...n}),keepalive:!0}).catch(()=>{})}catch{}}function cn(e,t,n=400){let r=0,i,a=0,o=null,s=()=>{if(a>=5)return;let n=t.location.pathname,r=an(e,t),i=on(r&&Q(n,r));if(!i){o=null;return}i!==o&&(o=i,a+=1,sn(n,r))},c=()=>{t.cancelAnimationFrame(r),r=t.requestAnimationFrame(s)},l=()=>{i!==void 0&&clearTimeout(i),i=setTimeout(c,n)};c(),t.addEventListener(`resize`,c);let u=new MutationObserver(l);return e.body&&u.observe(e.body,{childList:!0,subtree:!0}),()=>{t.cancelAnimationFrame(r),i!==void 0&&clearTimeout(i),t.removeEventListener(`resize`,c),u.disconnect()}}function $(e){return e.supported?e.secureContext?e.permission===`denied`?{show:!1,reason:`permission-denied`}:e.permission===`granted`?e.focused?{show:!1,reason:`focused`}:{show:!0}:{show:!1,reason:`permission-default`}:{show:!1,reason:`insecure-context`}:{show:!1,reason:`unsupported`}}function ln(){let e=typeof window<`u`&&`Notification`in window;return{supported:e,secureContext:typeof window<`u`&&window.isSecureContext===!0,permission:e?Notification.permission:`default`,focused:typeof document<`u`&&typeof document.hasFocus==`function`?document.hasFocus():!0}}var un=500,dn=new Set,fn=new Set;function pn(e,t){if(e.size>=un){for(let t of e)if(e.delete(t),e.size<un)break}e.add(t)}function mn(e){return e??(typeof globalThis.fetch==`function`?globalThis.fetch:void 0)}function hn(e,t,n){try{Promise.resolve(e(`/api/admin/events`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({event:t,fields:n})})).catch(()=>{})}catch{}}function gn(e,t){let n=mn(t);return n?(hn(n,`channel-notify:desktop-capability`,{supported:e.supported,secure:e.secureContext,permission:e.permission}),!0):!1}function _n(e,t,n,r){if(dn.has(e))return!1;let i=mn(r);return i?(pn(dn,e),hn(i,`channel-notify:desktop-outcome`,{msgId:e,senderType:t,reason:n}),!0):!1}function vn(e,t,n){try{if(fn.has(e.messageId))return;pn(fn,e.messageId);let r=$(ln());if(!r.show){_n(e.messageId,e.senderType,r.reason,n);return}new Notification(`${e.accountName} · ${e.senderDisplay}`,{body:e.body+(e.truncated?`…`:``),icon:t,tag:e.messageId}),_n(e.messageId,e.senderType,`shown`,n)}catch{_n(e.messageId,e.senderType,`construct-failed`,n)}}var yn=`admin-sidebar-collapsed`,bn=`admin-sidebar-drawer-open`,xn=1080;function Sn(){if(typeof window>`u`)return!1;let e=null;try{e=window.sessionStorage.getItem(yn)}catch{e=null}return e===null?typeof window.matchMedia==`function`?window.matchMedia(`(min-width: 721px) and (max-width: ${xn}px)`).matches:!1:e===`1`}function Cn(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(yn,`1`):window.sessionStorage.removeItem(yn)}catch{}}function wn(){if(typeof window>`u`)return!1;try{return window.sessionStorage.getItem(bn)===`1`}catch{return!1}}function Tn(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(bn,`1`):window.sessionStorage.removeItem(bn)}catch{}}var En=720;function Dn(e,t){return e===`/`?{via:`in-place`}:{via:`navigate`,href:`/?wa=${encodeURIComponent(t.remoteJid??``)}&acct=${encodeURIComponent(t.accountId??``)}`}}function On(e){return e===`/`?{via:`in-place`}:{via:`navigate`,href:`/?data=1`}}function kn(e,t){if(e!==`/`)return null;let n=new URLSearchParams(t),r=n.get(`wa`),i=n.get(`acct`);return!r||!i?null:{sessionId:``,projectDir:``,title:``,senderId:null,startedAt:``,channel:`whatsapp`,role:`public`,operatorName:null,whatsappName:null,lastMessageAt:null,modelGated:!1,model:null,source:`store`,accountId:i,remoteJid:r}}function An(e,t){return e===`/`?new URLSearchParams(t).has(`data`):!1}function jn(e,t){return t===`operator`&&e===`chat`||e===`dashboard`?`/`:e===`data`?`/data`:e===`graph`?`/graph`:e===`calendar`?`/calendar`:e===`chat`?`/chat`:e===`activity`?`/activity`:`/browser`}var Mn=`maxy-webchat-browser-pane`;function Nn(){try{let e=window.localStorage.getItem(Mn);return e===`split`||e===`full`?e:`closed`}catch{return`closed`}}function Pn(){return typeof window<`u`&&window.location.pathname.startsWith(`/chat`)}function Fn(e){let{cacheKey:t,businessName:n,variant:r=`admin`,onLogout:a,onDisconnect:o,disconnecting:s,claudeConnected:c,onConnectClaude:l,userName:u,userAvatar:d,role:f,onOpenConversations:p,children:m,footer:h}=e,{subAccounts:g,activeAccountId:_,switching:v,switchAccount:y,refreshAccounts:x}=ae(t),[te,S]=(0,N.useState)([]),[C,ne]=(0,N.useState)(!1),[w,T]=(0,N.useState)(`closed`);(0,N.useEffect)(()=>{let e=Pn();ne(e),e&&T(Nn())},[]);let E=(0,N.useCallback)(e=>{T(e);try{window.localStorage.setItem(Mn,e)}catch{}},[]),D=(0,N.useCallback)(()=>E(`split`),[E]),ie=(0,N.useCallback)(()=>{E(w===`full`?`split`:`full`)},[w,E]),k=(0,N.useCallback)(()=>E(`closed`),[E]),A=C?w:`closed`,se=A!==`closed`,ue=(0,N.useCallback)(e=>{S(t=>t.filter(t=>t.messageId!==e))},[]);(0,N.useEffect)(()=>{if(!t)return;let e=null;try{e=new EventSource(oe(`/api/admin/events`,t)),e.addEventListener(V,e=>{try{let t=JSON.parse(e.data);if(!t||typeof t.messageId!=`string`)return;S(e=>e.some(e=>e.messageId===t.messageId)?e:[...e,t]),vn(t,i)}catch{}}),e.onerror=()=>{console.error(`[admin-ui] channel-notify stream error`)}}catch(e){console.error(`[admin-ui] channel-notify unavailable reason=${e instanceof Error?e.message:String(e)}`)}return()=>{e?.close()}},[t]),(0,N.useEffect)(()=>{gn(ln())},[]);let[j,de]=(0,N.useState)(!0);(0,N.useEffect)(()=>{if(c!==void 0||r!==`admin`)return;let e=!1,t=async()=>{try{let t=await fetch(`/api/health`);if(!t.ok)return;let n=await t.json();e||de(n.auth_status!==`dead`&&n.auth_status!==`missing`)}catch{}};t();let n=setInterval(t,6e4);return()=>{e=!0,clearInterval(n)}},[c,r]);let fe=c??j,pe=l??(()=>{window.location.assign(`/?connect=claude`)}),[P,F]=(0,N.useState)(()=>Sn()),[me,he]=(0,N.useState)(!1),I=(0,N.useRef)(!0);(0,N.useEffect)(()=>{if(I.current){I.current=!1;return}he(!0);let e=setTimeout(()=>he(!1),260);return()=>clearTimeout(e)},[P]);let[L,ge]=(0,N.useState)(()=>wn()),_e=ce(`(max-width: ${En}px)`),[ve,ye]=(0,N.useState)(()=>typeof window>`u`||An(window.location.pathname,window.location.search)?null:kn(window.location.pathname,window.location.search)),[be,xe]=(0,N.useState)(()=>typeof window>`u`?!1:An(window.location.pathname,window.location.search)),[Se]=(0,N.useState)(()=>be),Ce=(0,N.useCallback)(e=>{Cn(e),F(e)},[]),we=(0,N.useCallback)(e=>{Tn(e),ge(e)},[]);(0,N.useEffect)(()=>{typeof window>`u`||window.location?.pathname},[]),(0,N.useEffect)(()=>{typeof window>`u`||!ve||window.history.replaceState(null,``,`/`)},[]),(0,N.useEffect)(()=>{typeof window>`u`||!be||window.history.replaceState(null,``,`/`)},[]);let Te=(0,N.useCallback)(e=>{if(xe(!1),e===null){ye(null);return}let t=Dn(typeof window<`u`?window.location.pathname:`/`,e);t.via===`in-place`?ye(e):window.location.href=t.href},[]),Ee=(0,N.useCallback)(()=>{let e=On(typeof window<`u`?window.location.pathname:`/`);if(e.via===`navigate`){window.location.href=e.href;return}ye(null),xe(!0)},[]),De=_e?L:!P,Oe=(0,N.useCallback)(()=>{typeof window>`u`||(window.matchMedia(`(max-width: ${En}px)`).matches?we(!L):Ce(!P))},[P,L,Ce,we]);(0,N.useEffect)(()=>{if(!(typeof window>`u`))return cn(document,window)},[]);let ke=(0,N.useCallback)(e=>{let t=jn(e,r);window.location.href=t},[r]),Ae={collapsed:P,mobileDrawerOpen:L,sidebarOpen:De,onToggleSidebar:Oe,setMobileDrawerOpen:we,selectedWhatsapp:ve,onClearWhatsapp:()=>ye(null),onSelectWhatsappConversation:Te,dataOpen:be};return r===`operator`?(0,M.jsx)(O,{cacheKey:t,children:(0,M.jsxs)(`div`,{className:`admin-shell admin-page admin-shell-root`,children:[v&&(0,M.jsx)(ee,{surface:`switch`}),(0,M.jsx)(b,{businessName:n,variant:r,onNavigate:ke,onOpenConversations:p,onToggleSidebar:Oe,sidebarOpen:De,onLogout:a,onDisconnect:o,disconnecting:s,cacheKey:t,subAccounts:g,activeAccountId:_,switchingAccount:v,onSwitchAccount:y,refreshAccounts:x}),(0,M.jsxs)(`div`,{className:`platform platform-operator`,children:[(0,M.jsx)(re,{}),typeof m==`function`?m(Ae):m]}),(0,M.jsx)(nt,{variant:`operator`,onOpenConversations:p}),h,(0,M.jsx)(Ye,{frames:te,onExpire:ue})]})}):(0,M.jsx)(O,{cacheKey:t,children:(0,M.jsxs)(`div`,{className:`admin-shell admin-page admin-shell-root`,children:[v&&(0,M.jsx)(ee,{surface:`switch`}),(0,M.jsxs)(`div`,{className:`platform${L?` menu-open`:``}${!_e&&P?` sidebar-collapsed`:``}${me?` sidebar-animating`:``}`,"data-artefact":se?`browser`:`closed`,"data-browser-pane":A,children:[(0,M.jsx)(Yt,{businessName:n,cacheKey:t,onConnectClaude:pe,role:f??null,userName:u,userAvatar:d??null,onSelectProjects:()=>{window.location.href=`/graph?label=${le().label}`},onSelectTasks:()=>{window.location.href=`/tasks`},onCloseMobileDrawer:()=>we(!1),collapsed:P,mobileDrawerOpen:L,onSelectData:Ee,onCloseData:()=>xe(!1),initialDataSurface:Se,onLogout:a,onDisconnect:o,disconnecting:s,claudeConnected:fe,subAccounts:g,activeAccountId:_,switchingAccount:v,onSwitchAccount:y,refreshAccounts:x,onOpenConversations:p}),!_e&&(0,M.jsx)(st,{}),(0,M.jsx)(Qe,{sidebarOpen:De,onToggleSidebar:Oe,claudeConnected:fe,onConnectClaude:pe,onOpenBrowser:C&&!se?D:void 0}),typeof m==`function`?m(Ae):m,se&&(0,M.jsxs)(`div`,{className:`webchat-browser-pane`,children:[A===`split`&&(0,M.jsx)(Z,{}),(0,M.jsx)(Ue,{cacheKey:e.cacheKey,surface:`webchat`,onToggleFull:ie,onClosePane:k,isFull:A===`full`})]})]}),L&&(0,M.jsx)(`div`,{className:`sidebar-backdrop menu-open`,"aria-hidden":`true`,onClick:()=>we(!1)}),(0,M.jsx)(nt,{}),h,(0,M.jsx)(Ye,{frames:te,onExpire:ue})]})})}export{de as A,_e as C,me as D,he as E,F as O,ve as S,L as T,Ce as _,Ot as a,be as b,U as c,mt as d,ft as f,Te as g,Ee as h,Pt as i,fe as k,pt as l,Oe as m,Kt as n,jt as o,Ue as p,It as r,W as s,Fn as t,gt as u,Se as v,ge as w,ye as x,xe as y};