elanous 0.2.19 → 0.2.20

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 (388) hide show
  1. package/apps/pwa/out/404/index.html +1 -1
  2. package/apps/pwa/out/404.html +1 -1
  3. package/apps/pwa/out/_next/static/{J5H7BvqgSI8DUjtRRcA_S → Bam1YziK2iH9bN4K0utGk}/_buildManifest.js +1 -1
  4. package/apps/pwa/out/_next/static/chunks/{4323.c5dfb6f503304775.js → 1268.0840ff91e083fcbd.js} +1 -1
  5. package/apps/pwa/out/_next/static/chunks/1307-77fad80cf54477c6.js +1 -0
  6. package/apps/pwa/out/_next/static/chunks/1612-f60c0c93ec773f81.js +1 -0
  7. package/apps/pwa/out/_next/static/chunks/1826-5d279da64bbbc2de.js +1 -0
  8. package/apps/pwa/out/_next/static/chunks/1844-9ec4b1d12f6e80eb.js +1 -0
  9. package/apps/pwa/out/_next/static/chunks/1866-e7a6999f25548b30.js +1 -0
  10. package/apps/pwa/out/_next/static/chunks/1948.15f356b15a625597.js +5 -0
  11. package/apps/pwa/out/_next/static/chunks/195-fb1d7690bf30bab4.js +1 -0
  12. package/apps/pwa/out/_next/static/chunks/1986-33e13d648a9df765.js +1 -0
  13. package/apps/pwa/out/_next/static/chunks/{2977-e38442e86289f1d3.js → 211-9c9090c59e2c5907.js} +1 -1
  14. package/apps/pwa/out/_next/static/chunks/2116-6429c188eb846ab8.js +1 -0
  15. package/apps/pwa/out/_next/static/chunks/2196-4700653d12a44b40.js +1 -0
  16. package/apps/pwa/out/_next/static/chunks/224-e7be8f762fe74986.js +1 -0
  17. package/apps/pwa/out/_next/static/chunks/2489-ff55a35b202c0f94.js +1 -0
  18. package/apps/pwa/out/_next/static/chunks/2537-6c289376caa88ca1.js +1 -0
  19. package/apps/pwa/out/_next/static/chunks/2549-89c518a4c8ed4d00.js +1 -0
  20. package/apps/pwa/out/_next/static/chunks/2699-325cc923ba7b8631.js +1 -0
  21. package/apps/pwa/out/_next/static/chunks/2957-96ffab3d521fb08f.js +1 -0
  22. package/apps/pwa/out/_next/static/chunks/311.e685738f92e6e2ec.js +1 -0
  23. package/apps/pwa/out/_next/static/chunks/3194-807b212fb8eae065.js +1 -0
  24. package/apps/pwa/out/_next/static/chunks/3324-d1d2979821dfa845.js +1 -0
  25. package/apps/pwa/out/_next/static/chunks/3558-bbb5ab553a0471d3.js +1 -0
  26. package/apps/pwa/out/_next/static/chunks/3857-995ea9f5ef33d71e.js +1 -0
  27. package/apps/pwa/out/_next/static/chunks/3916-3d02dd1fc257dd3c.js +1 -0
  28. package/apps/pwa/out/_next/static/chunks/4144-fad095b48a1862ee.js +1 -0
  29. package/apps/pwa/out/_next/static/chunks/4565-3d7e3fdeb43686a8.js +1 -0
  30. package/apps/pwa/out/_next/static/chunks/4795-f372490b178583fc.js +1 -0
  31. package/apps/pwa/out/_next/static/chunks/5360-be1f1d8f9fcc9755.js +1 -0
  32. package/apps/pwa/out/_next/static/chunks/5755-ea7ed88eb956f47b.js +1 -0
  33. package/apps/pwa/out/_next/static/chunks/5977-94ed6f78e9814b2b.js +1 -0
  34. package/apps/pwa/out/_next/static/chunks/{4847.56f5bc454fbcc827.js → 6110.1297d4093fdfbb0d.js} +2 -2
  35. package/apps/pwa/out/_next/static/chunks/6158.af2e93b7adff709b.js +2 -0
  36. package/apps/pwa/out/_next/static/chunks/6877-74399f69c7da1433.js +1 -0
  37. package/apps/pwa/out/_next/static/chunks/{1470.98a6ab61ccb4131c.js → 726.83532d69452ee24b.js} +1 -1
  38. package/apps/pwa/out/_next/static/chunks/7290-f09c928a06c52e2d.js +1 -0
  39. package/apps/pwa/out/_next/static/chunks/{6062-73e68343a9814f6a.js → 7327-2d69fb321ba73389.js} +1 -1
  40. package/apps/pwa/out/_next/static/chunks/{8870-9614a213b990b10b.js → 7748-6e51bfe927019f5c.js} +3 -3
  41. package/apps/pwa/out/_next/static/chunks/7797-df5aa0381fdc078f.js +1 -0
  42. package/apps/pwa/out/_next/static/chunks/8060-cc008cc6fedfa818.js +1 -0
  43. package/apps/pwa/out/_next/static/chunks/8085-d065d0393c1760f5.js +1 -0
  44. package/apps/pwa/out/_next/static/chunks/8401-35e94e9091f5eb8d.js +1 -0
  45. package/apps/pwa/out/_next/static/chunks/8682-7061dd4fa7bd62ed.js +1 -0
  46. package/apps/pwa/out/_next/static/chunks/8695-846034ce44852c70.js +1 -0
  47. package/apps/pwa/out/_next/static/chunks/9070.067c106528ec1ae6.js +1 -0
  48. package/apps/pwa/out/_next/static/chunks/9103-60fbef33e66f0a46.js +1 -0
  49. package/apps/pwa/out/_next/static/chunks/9247-c1753a059e7bac08.js +1 -0
  50. package/apps/pwa/out/_next/static/chunks/{7647.2fcd30d894d5ee30.js → 935.4ddaa99fc1d1126c.js} +1 -1
  51. package/apps/pwa/out/_next/static/chunks/{ae787e4c-e5b1ef00b2dbceca.js → a9f2b54d-33c0689b70ed8cf3.js} +1 -1
  52. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-c1a96669158471ec.js +1 -0
  53. package/apps/pwa/out/_next/static/chunks/app/approvals/page-c855c24de7db74fe.js +1 -0
  54. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-85b316bb4235980b.js +1 -0
  55. package/apps/pwa/out/_next/static/chunks/app/board/page-9b2b26a33cb2cd42.js +1 -0
  56. package/apps/pwa/out/_next/static/chunks/app/botlab/page-c9955fde67b1bcb5.js +1 -0
  57. package/apps/pwa/out/_next/static/chunks/app/bots/page-7a852956c74015a3.js +1 -0
  58. package/apps/pwa/out/_next/static/chunks/app/ceo/page-c5a5c621be0e04ae.js +1 -0
  59. package/apps/pwa/out/_next/static/chunks/app/chat/page-4ba4abe096b6c2a8.js +1 -0
  60. package/apps/pwa/out/_next/static/chunks/app/consult/page-575d4a8b4f7becb2.js +1 -0
  61. package/apps/pwa/out/_next/static/chunks/app/control/page-f5d56ff5f45ad164.js +1 -0
  62. package/apps/pwa/out/_next/static/chunks/app/decisions/page-2260e9eef0357421.js +1 -0
  63. package/apps/pwa/out/_next/static/chunks/app/design-check/page-7c058069c5e7fa63.js +1 -0
  64. package/apps/pwa/out/_next/static/chunks/app/editor/page-dc5da0b8a2edb8a4.js +1 -0
  65. package/apps/pwa/out/_next/static/chunks/app/exec/page-466bf0ee16ad1432.js +1 -0
  66. package/apps/pwa/out/_next/static/chunks/app/field/page-a23bc71713bcc08f.js +1 -0
  67. package/apps/pwa/out/_next/static/chunks/app/healthz/route-c1a96669158471ec.js +1 -0
  68. package/apps/pwa/out/_next/static/chunks/app/inside/{page-5b29d9b06ceadade.js → page-ed4a6f799f005d09.js} +1 -1
  69. package/apps/pwa/out/_next/static/chunks/app/intake/page-9cd565005b93aca6.js +1 -0
  70. package/apps/pwa/out/_next/static/chunks/app/layout-55f0f40c6db95f15.js +1 -0
  71. package/apps/pwa/out/_next/static/chunks/app/live/page-474cb5888ea0e8f3.js +1 -0
  72. package/apps/pwa/out/_next/static/chunks/app/loops/page-35bfec2e631d3eae.js +1 -0
  73. package/apps/pwa/out/_next/static/chunks/app/market/page-9ca21f9ad3208a61.js +1 -0
  74. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-f9ccb1b1adbea14d.js +1 -0
  75. package/apps/pwa/out/_next/static/chunks/app/morning/page-ec102c9b8b691e37.js +1 -0
  76. package/apps/pwa/out/_next/static/chunks/app/not-found-a9c2cfa8dda922a5.js +1 -0
  77. package/apps/pwa/out/_next/static/chunks/app/observatory/page-6da35144878feb6d.js +1 -0
  78. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-f6055495e9ed7ea8.js +1 -0
  79. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-25204694fa9984a5.js +1 -0
  80. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-a60e035f151d84d3.js +1 -0
  81. package/apps/pwa/out/_next/static/chunks/app/outputs/page-189c587f36874538.js +1 -0
  82. package/apps/pwa/out/_next/static/chunks/app/page-c56634bde705a65d.js +1 -0
  83. package/apps/pwa/out/_next/static/chunks/app/reflection/page-db03ae3589a81c9e.js +1 -0
  84. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-4a6463b97f0ad94f.js +1 -0
  85. package/apps/pwa/out/_next/static/chunks/app/sessions/page-75bffecc9aa1004e.js +1 -0
  86. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-a8d2fe0c669e0de4.js +1 -0
  87. package/apps/pwa/out/_next/static/chunks/app/settings/page-31d5b875760bb62d.js +1 -0
  88. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-c26fa10aac6c21c4.js +1 -0
  89. package/apps/pwa/out/_next/static/chunks/app/setup/layout-c1a96669158471ec.js +1 -0
  90. package/apps/pwa/out/_next/static/chunks/app/setup/page-68793c6e10331d66.js +1 -0
  91. package/apps/pwa/out/_next/static/chunks/app/share/page-46d5201d2207a511.js +1 -0
  92. package/apps/pwa/out/_next/static/chunks/app/showroom/page-d81c07a7b4f618ae.js +1 -0
  93. package/apps/pwa/out/_next/static/chunks/app/tasks/page-be1c4e8697f22360.js +1 -0
  94. package/apps/pwa/out/_next/static/chunks/app/term/page-cf0a4b4abead71ea.js +1 -0
  95. package/apps/pwa/out/_next/static/chunks/app/today/page-a4717e2c4bf7a28f.js +1 -0
  96. package/apps/pwa/out/_next/static/chunks/app/trace/page-0fd895fab9b62c1b.js +1 -0
  97. package/apps/pwa/out/_next/static/chunks/app/vault/page-8b6c1454a8e8f306.js +1 -0
  98. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-c6e4364d9de8f717.js +1 -0
  99. package/apps/pwa/out/_next/static/chunks/app/workflows/page-0acc8e198f7b0dfb.js +1 -0
  100. package/apps/pwa/out/_next/static/chunks/app/workspace/page-34882c84f84021c5.js +1 -0
  101. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-0506a1e0e4bdb2f5.js +1 -0
  102. package/apps/pwa/out/_next/static/chunks/{8046cadf-211ca3c0e00f2b72.js → f6231284-45726550aba08fca.js} +1 -1
  103. package/apps/pwa/out/_next/static/chunks/{2ea96958.e8c7e112de50b067.js → f6b7c9ba.64a895b8b2fedbdc.js} +1 -1
  104. package/apps/pwa/out/_next/static/chunks/framework-5c169757551134ed.js +1 -0
  105. package/apps/pwa/out/_next/static/chunks/main-59fe95fed40c7a01.js +1 -0
  106. package/apps/pwa/out/_next/static/chunks/main-app-4ca74dbbee7057c6.js +1 -0
  107. package/apps/pwa/out/_next/static/chunks/pages/_app-13a0a886df4d97a1.js +1 -0
  108. package/apps/pwa/out/_next/static/chunks/pages/_error-6af8591cd3a3f038.js +1 -0
  109. package/apps/pwa/out/_next/static/chunks/webpack-c260571513bf43c2.js +1 -0
  110. package/apps/pwa/out/_next/static/css/c23d959d3ee15e57.css +1 -0
  111. package/apps/pwa/out/approvals/index.html +1 -1
  112. package/apps/pwa/out/approvals/index.txt +23 -23
  113. package/apps/pwa/out/autopilot/index.html +1 -1
  114. package/apps/pwa/out/autopilot/index.txt +23 -23
  115. package/apps/pwa/out/board/index.html +1 -1
  116. package/apps/pwa/out/board/index.txt +23 -23
  117. package/apps/pwa/out/botlab/index.html +1 -1
  118. package/apps/pwa/out/botlab/index.txt +22 -22
  119. package/apps/pwa/out/bots/index.html +1 -1
  120. package/apps/pwa/out/bots/index.txt +22 -22
  121. package/apps/pwa/out/ceo/index.html +1 -1
  122. package/apps/pwa/out/ceo/index.txt +23 -23
  123. package/apps/pwa/out/chat/index.html +1 -1
  124. package/apps/pwa/out/chat/index.txt +22 -22
  125. package/apps/pwa/out/consult/index.html +1 -1
  126. package/apps/pwa/out/consult/index.txt +23 -23
  127. package/apps/pwa/out/control/index.html +1 -1
  128. package/apps/pwa/out/control/index.txt +23 -23
  129. package/apps/pwa/out/decisions/index.html +1 -1
  130. package/apps/pwa/out/decisions/index.txt +22 -22
  131. package/apps/pwa/out/design-check/index.html +1 -1
  132. package/apps/pwa/out/design-check/index.txt +23 -23
  133. package/apps/pwa/out/editor/index.html +1 -1
  134. package/apps/pwa/out/editor/index.txt +23 -23
  135. package/apps/pwa/out/exec/index.html +1 -1
  136. package/apps/pwa/out/exec/index.txt +23 -23
  137. package/apps/pwa/out/field/index.html +1 -1
  138. package/apps/pwa/out/field/index.txt +23 -23
  139. package/apps/pwa/out/healthz +1 -1
  140. package/apps/pwa/out/index.html +1 -1
  141. package/apps/pwa/out/index.txt +22 -22
  142. package/apps/pwa/out/inside/index.html +1 -1
  143. package/apps/pwa/out/inside/index.txt +22 -22
  144. package/apps/pwa/out/intake/index.html +1 -1
  145. package/apps/pwa/out/intake/index.txt +23 -23
  146. package/apps/pwa/out/live/index.html +1 -1
  147. package/apps/pwa/out/live/index.txt +23 -23
  148. package/apps/pwa/out/loops/index.html +1 -1
  149. package/apps/pwa/out/loops/index.txt +22 -22
  150. package/apps/pwa/out/market/index.html +1 -1
  151. package/apps/pwa/out/market/index.txt +22 -22
  152. package/apps/pwa/out/missions/placeholder/index.html +1 -1
  153. package/apps/pwa/out/missions/placeholder/index.txt +22 -22
  154. package/apps/pwa/out/morning/index.html +1 -1
  155. package/apps/pwa/out/morning/index.txt +23 -23
  156. package/apps/pwa/out/observatory/index.html +1 -1
  157. package/apps/pwa/out/observatory/index.txt +23 -23
  158. package/apps/pwa/out/ops/checklist/index.html +1 -1
  159. package/apps/pwa/out/ops/checklist/index.txt +22 -22
  160. package/apps/pwa/out/ops/release/index.html +1 -1
  161. package/apps/pwa/out/ops/release/index.txt +22 -22
  162. package/apps/pwa/out/ops/seats/index.html +1 -1
  163. package/apps/pwa/out/ops/seats/index.txt +22 -22
  164. package/apps/pwa/out/outputs/index.html +1 -1
  165. package/apps/pwa/out/outputs/index.txt +22 -22
  166. package/apps/pwa/out/reflection/index.html +1 -1
  167. package/apps/pwa/out/reflection/index.txt +23 -23
  168. package/apps/pwa/out/scheduler/index.html +1 -1
  169. package/apps/pwa/out/scheduler/index.txt +23 -23
  170. package/apps/pwa/out/sessions/index.html +1 -1
  171. package/apps/pwa/out/sessions/index.txt +22 -22
  172. package/apps/pwa/out/settings/devices/index.html +1 -1
  173. package/apps/pwa/out/settings/devices/index.txt +23 -23
  174. package/apps/pwa/out/settings/index.html +1 -1
  175. package/apps/pwa/out/settings/index.txt +23 -23
  176. package/apps/pwa/out/setup/done/index.html +1 -1
  177. package/apps/pwa/out/setup/done/index.txt +23 -23
  178. package/apps/pwa/out/setup/index.html +1 -1
  179. package/apps/pwa/out/setup/index.txt +23 -23
  180. package/apps/pwa/out/share/index.html +1 -1
  181. package/apps/pwa/out/share/index.txt +23 -23
  182. package/apps/pwa/out/showroom/index.html +1 -1
  183. package/apps/pwa/out/showroom/index.txt +22 -22
  184. package/apps/pwa/out/tasks/index.html +1 -1
  185. package/apps/pwa/out/tasks/index.txt +23 -23
  186. package/apps/pwa/out/term/index.html +1 -1
  187. package/apps/pwa/out/term/index.txt +23 -23
  188. package/apps/pwa/out/today/index.html +1 -1
  189. package/apps/pwa/out/today/index.txt +23 -23
  190. package/apps/pwa/out/trace/index.html +1 -1
  191. package/apps/pwa/out/trace/index.txt +23 -23
  192. package/apps/pwa/out/vault/index.html +1 -1
  193. package/apps/pwa/out/vault/index.txt +23 -23
  194. package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
  195. package/apps/pwa/out/workflows/chat-ui/index.txt +23 -23
  196. package/apps/pwa/out/workflows/index.html +1 -1
  197. package/apps/pwa/out/workflows/index.txt +23 -23
  198. package/apps/pwa/out/workspace/index.html +1 -1
  199. package/apps/pwa/out/workspace/index.txt +23 -23
  200. package/apps/pwa/out/worktrees/index.html +1 -1
  201. package/apps/pwa/out/worktrees/index.txt +23 -23
  202. package/graphs/demo/editor-recipes.yaml +22 -0
  203. package/graphs/retro/daily.yaml +25 -0
  204. package/graphs/retro/recipes.yaml +24 -0
  205. package/package.json +1 -1
  206. package/scripts/ask-marker-check.ts +3 -1
  207. package/scripts/land-global-checks.ts +89 -0
  208. package/scripts/lib/pch-regress-map.ts +2 -1
  209. package/scripts/release-loop/gate-node.ts +296 -25
  210. package/scripts/release-loop/gate-timing.ts +116 -7
  211. package/scripts/release-loop/preflight.ts +6 -4
  212. package/scripts/release-loop/publish-window.ts +141 -0
  213. package/scripts/release-loop/release-docs.ts +1 -4
  214. package/scripts/release-loop/release-universe.ts +38 -0
  215. package/scripts/release-loop/resume-release.ts +4 -1
  216. package/scripts/release-loop/unattended-release.ts +10 -2
  217. package/scripts/release-story/draft.ts +5 -1
  218. package/scripts/retro/shadow-compare.ts +71 -0
  219. package/scripts/rhythm/daily.ts +6 -1
  220. package/src/agent-mission/driver.ts +34 -6
  221. package/src/autopilot/build/llm-conflict-merge.ts +132 -7
  222. package/src/autopilot/build/merge-intent.ts +135 -7
  223. package/src/away/release-watch.ts +20 -3
  224. package/src/cli/config-drift.ts +513 -0
  225. package/src/cli/log-event-names.ts +4 -0
  226. package/src/cli/pr-cli.ts +20 -0
  227. package/src/cli/release-cli.ts +20 -5
  228. package/src/cli/retro-cli.ts +78 -0
  229. package/src/cli/tasks-cli.ts +94 -8
  230. package/src/dashboard/slash-runtime/dashboard-handlers.ts +5 -4
  231. package/src/dashboard/slash-runtime/help-from-registry.ts +57 -31
  232. package/src/domains/outbound-log-probe.ts +6 -1
  233. package/src/graph-runner/graph-run-api.ts +205 -0
  234. package/src/graph-runner/runner.ts +11 -1
  235. package/src/harness/harness-cli-command.ts +419 -52
  236. package/src/harness/harness-queue.ts +315 -25
  237. package/src/harness/harness-salvage-cli.ts +62 -0
  238. package/src/hq/fence-outcomes.ts +63 -0
  239. package/src/hq/fence-wrapper.ts +33 -0
  240. package/src/hq/hq.ts +11 -1
  241. package/src/index.ts +69 -6
  242. package/src/maturity/feature-maturity.ts +2 -2
  243. package/src/nexus/api/graph-kinds.ts +10 -4
  244. package/src/nexus/api/graphs-api.ts +178 -6
  245. package/src/nexus/api/http-server.ts +38 -3
  246. package/src/nexus/api/loop-edges.ts +4 -2
  247. package/src/nexus/api/ops-api.ts +22 -7
  248. package/src/nexus/api/ops-board-route.ts +48 -0
  249. package/src/onboarding/entry-hints.ts +5 -0
  250. package/src/onboarding.ts +24 -6
  251. package/src/release-loop/feature-store.ts +14 -11
  252. package/src/release-loop/gate-shards.ts +158 -0
  253. package/src/release-loop/release-schedule.ts +6 -2
  254. package/src/retro/daily.ts +372 -0
  255. package/src/seat-loop/op-decide.ts +173 -0
  256. package/src/seat-loop/seat-loop.ts +60 -3
  257. package/src/seat-loop/seat-report.ts +58 -3
  258. package/src/self-dev/ask-launch-flow.ts +5 -4
  259. package/src/self-dev/ask-launch-io.ts +49 -1
  260. package/src/self-dev/ask-path-candidates.ts +40 -2
  261. package/src/self-dev/draft-sweep.ts +371 -16
  262. package/src/self-dev/draft-triage-rules.ts +19 -4
  263. package/src/self-dev/pr-preview.ts +84 -16
  264. package/src/self-implement/blocked-draft-policy.ts +101 -0
  265. package/src/self-implement/execution-clarification.ts +11 -0
  266. package/src/self-implement/gate-env-retry.ts +83 -0
  267. package/src/self-implement/orchestrator.ts +218 -5
  268. package/src/self-implement/run-stop.ts +123 -0
  269. package/src/self-implement/run-ttl.ts +258 -0
  270. package/src/self-implement/salvage-retention.ts +123 -0
  271. package/src/self-implement/seams.ts +4 -0
  272. package/src/self-implement/self-implement-cli.ts +2 -0
  273. package/src/self-implement/sibling-resync.ts +223 -0
  274. package/src/self-implement/stop-autoheal.ts +204 -0
  275. package/src/task-agent/board.ts +1 -1
  276. package/src/task-agent/card-evidence.ts +99 -10
  277. package/src/task-agent/judge.ts +7 -0
  278. package/src/task-agent/live-moves.ts +120 -20
  279. package/src/task-agent/mission.ts +1 -1
  280. package/src/task-agent/shadow.ts +10 -1
  281. package/src/task-agent/task-hand.ts +7 -2
  282. package/src/task-orchestrator/surfaces/pod-command-job.ts +19 -5
  283. package/src/task-orchestrator/surfaces/pod-failure-reason.ts +4 -0
  284. package/src/task-orchestrator/surfaces/pod-install-slots.ts +89 -0
  285. package/src/task-orchestrator/surfaces/pod-lease.ts +93 -10
  286. package/src/task-orchestrator/surfaces/pod-pool.ts +147 -34
  287. package/src/task-orchestrator/surfaces/self-implement-pod.ts +19 -3
  288. package/src/telegram-commands.ts +41 -0
  289. package/src/testing/real-cli-spawn.ts +106 -0
  290. package/src/user-config.ts +56 -3
  291. package/src/version/packed-revision.json +1 -1
  292. package/apps/pwa/out/_next/static/chunks/1105-c473ed46272fba79.js +0 -1
  293. package/apps/pwa/out/_next/static/chunks/1157-cba0e8553d35a980.js +0 -1
  294. package/apps/pwa/out/_next/static/chunks/171-23a877ed11720de9.js +0 -1
  295. package/apps/pwa/out/_next/static/chunks/216-5acd01cbde4acda7.js +0 -1
  296. package/apps/pwa/out/_next/static/chunks/2330-c2f07246c8788af1.js +0 -1
  297. package/apps/pwa/out/_next/static/chunks/2336-e830c777eb6bce04.js +0 -1
  298. package/apps/pwa/out/_next/static/chunks/2375-e061bb24cd2b5cde.js +0 -1
  299. package/apps/pwa/out/_next/static/chunks/2415.ed6428ff334c7ce2.js +0 -1
  300. package/apps/pwa/out/_next/static/chunks/3094.67339318c7f72a3a.js +0 -2
  301. package/apps/pwa/out/_next/static/chunks/338-ceb956612dcfaa86.js +0 -1
  302. package/apps/pwa/out/_next/static/chunks/3395-835e4ceaa6335ba4.js +0 -1
  303. package/apps/pwa/out/_next/static/chunks/3403.4bc97b4066945a94.js +0 -5
  304. package/apps/pwa/out/_next/static/chunks/3441-be82e3595aef3a20.js +0 -1
  305. package/apps/pwa/out/_next/static/chunks/3689-89905039bf3e7257.js +0 -1
  306. package/apps/pwa/out/_next/static/chunks/371-4ad6af55dad02ced.js +0 -1
  307. package/apps/pwa/out/_next/static/chunks/3822-6f268bc26c6a84ac.js +0 -1
  308. package/apps/pwa/out/_next/static/chunks/4114-3e63117452378807.js +0 -1
  309. package/apps/pwa/out/_next/static/chunks/4457-d7df81c90f9d0268.js +0 -1
  310. package/apps/pwa/out/_next/static/chunks/4551-77dadae76f6cbace.js +0 -1
  311. package/apps/pwa/out/_next/static/chunks/4978.6fd93b974441e87f.js +0 -1
  312. package/apps/pwa/out/_next/static/chunks/5012-f746f6549b869f91.js +0 -1
  313. package/apps/pwa/out/_next/static/chunks/5609-012bb3557211f07e.js +0 -1
  314. package/apps/pwa/out/_next/static/chunks/5791-bb82743fa6299562.js +0 -1
  315. package/apps/pwa/out/_next/static/chunks/62-5bfed1e23790b745.js +0 -1
  316. package/apps/pwa/out/_next/static/chunks/6320-9bc8561fde416e07.js +0 -1
  317. package/apps/pwa/out/_next/static/chunks/649-ca96d1c5d09e02b8.js +0 -1
  318. package/apps/pwa/out/_next/static/chunks/6725-68ab7cc0b1faf00d.js +0 -1
  319. package/apps/pwa/out/_next/static/chunks/6726-85a7db59b288c53f.js +0 -1
  320. package/apps/pwa/out/_next/static/chunks/6735-33267c4630d0d963.js +0 -1
  321. package/apps/pwa/out/_next/static/chunks/6998-a654fe5c58271600.js +0 -1
  322. package/apps/pwa/out/_next/static/chunks/7633-141682015873beb6.js +0 -1
  323. package/apps/pwa/out/_next/static/chunks/7673-2eda1507d38dadb8.js +0 -1
  324. package/apps/pwa/out/_next/static/chunks/7990-e12efba616f46e03.js +0 -1
  325. package/apps/pwa/out/_next/static/chunks/8067-143791231c99bd02.js +0 -1
  326. package/apps/pwa/out/_next/static/chunks/8142-744998d65d7bb17e.js +0 -1
  327. package/apps/pwa/out/_next/static/chunks/8430-a10cfba8ef282d4e.js +0 -1
  328. package/apps/pwa/out/_next/static/chunks/920-f7dceb78f1c585ef.js +0 -1
  329. package/apps/pwa/out/_next/static/chunks/9454-12c2f30dea62291c.js +0 -1
  330. package/apps/pwa/out/_next/static/chunks/976-4a9b4ebdca7c739a.js +0 -1
  331. package/apps/pwa/out/_next/static/chunks/9989-15cdf568bafa9fc8.js +0 -1
  332. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-859cea1570b6227a.js +0 -1
  333. package/apps/pwa/out/_next/static/chunks/app/approvals/page-deef5ee191830f14.js +0 -1
  334. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-b193da485f9a14b2.js +0 -1
  335. package/apps/pwa/out/_next/static/chunks/app/board/page-b6e1a79df0e214f4.js +0 -1
  336. package/apps/pwa/out/_next/static/chunks/app/botlab/page-e84df4d907f703c7.js +0 -1
  337. package/apps/pwa/out/_next/static/chunks/app/bots/page-a5fb9a5db89ae4ea.js +0 -1
  338. package/apps/pwa/out/_next/static/chunks/app/ceo/page-1499f481d7fc52d6.js +0 -1
  339. package/apps/pwa/out/_next/static/chunks/app/chat/page-c7cf753aeb648790.js +0 -1
  340. package/apps/pwa/out/_next/static/chunks/app/consult/page-4118469e514e10fd.js +0 -1
  341. package/apps/pwa/out/_next/static/chunks/app/control/page-e968f7630654332a.js +0 -1
  342. package/apps/pwa/out/_next/static/chunks/app/decisions/page-505915052f947022.js +0 -1
  343. package/apps/pwa/out/_next/static/chunks/app/design-check/page-c2f962fb4a3b06c6.js +0 -1
  344. package/apps/pwa/out/_next/static/chunks/app/editor/page-7b5ed0bd8a589ec4.js +0 -1
  345. package/apps/pwa/out/_next/static/chunks/app/exec/page-cf8193250dd42dd4.js +0 -1
  346. package/apps/pwa/out/_next/static/chunks/app/field/page-cf3f5dfa35dea8e9.js +0 -1
  347. package/apps/pwa/out/_next/static/chunks/app/healthz/route-859cea1570b6227a.js +0 -1
  348. package/apps/pwa/out/_next/static/chunks/app/intake/page-a15e7fcc283e9ca7.js +0 -1
  349. package/apps/pwa/out/_next/static/chunks/app/layout-d2915e7b70ff3d0e.js +0 -1
  350. package/apps/pwa/out/_next/static/chunks/app/live/page-b70cd005d9169e25.js +0 -1
  351. package/apps/pwa/out/_next/static/chunks/app/loops/page-2595f0eba29f57e1.js +0 -1
  352. package/apps/pwa/out/_next/static/chunks/app/market/page-c776322454156e36.js +0 -1
  353. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-77bbd17f4435aa10.js +0 -1
  354. package/apps/pwa/out/_next/static/chunks/app/morning/page-049689e611ecc936.js +0 -1
  355. package/apps/pwa/out/_next/static/chunks/app/not-found-85954a4fb09c44eb.js +0 -1
  356. package/apps/pwa/out/_next/static/chunks/app/observatory/page-e773e552e1068ee6.js +0 -1
  357. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-5633c4bfa7684b4a.js +0 -1
  358. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-d829b92bd01b4994.js +0 -1
  359. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-061c317fc771becf.js +0 -1
  360. package/apps/pwa/out/_next/static/chunks/app/outputs/page-3a45ece8865ed4b6.js +0 -1
  361. package/apps/pwa/out/_next/static/chunks/app/page-0be990618c0d56bd.js +0 -1
  362. package/apps/pwa/out/_next/static/chunks/app/reflection/page-bfea4865dc244b73.js +0 -1
  363. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-0d6ba8e337741484.js +0 -1
  364. package/apps/pwa/out/_next/static/chunks/app/sessions/page-76a88b55d816482e.js +0 -1
  365. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-bba1542df59f61ce.js +0 -1
  366. package/apps/pwa/out/_next/static/chunks/app/settings/page-4185c95689bb372e.js +0 -1
  367. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-b699e1a8d5d34b8b.js +0 -1
  368. package/apps/pwa/out/_next/static/chunks/app/setup/layout-859cea1570b6227a.js +0 -1
  369. package/apps/pwa/out/_next/static/chunks/app/setup/page-c225e338c31bf274.js +0 -1
  370. package/apps/pwa/out/_next/static/chunks/app/share/page-449353f70507ca1f.js +0 -1
  371. package/apps/pwa/out/_next/static/chunks/app/showroom/page-90b889714102476d.js +0 -1
  372. package/apps/pwa/out/_next/static/chunks/app/tasks/page-f1ee7fbeb7f96ddc.js +0 -1
  373. package/apps/pwa/out/_next/static/chunks/app/term/page-d59a95e1434dfaa0.js +0 -1
  374. package/apps/pwa/out/_next/static/chunks/app/today/page-71491a23414d1a47.js +0 -1
  375. package/apps/pwa/out/_next/static/chunks/app/trace/page-de7112bdb65fa4fe.js +0 -1
  376. package/apps/pwa/out/_next/static/chunks/app/vault/page-feb4d0d88079660d.js +0 -1
  377. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-f17d887b40dd6b1d.js +0 -1
  378. package/apps/pwa/out/_next/static/chunks/app/workflows/page-8da77be2192bcd5d.js +0 -1
  379. package/apps/pwa/out/_next/static/chunks/app/workspace/page-72c3b9a5e9582b29.js +0 -1
  380. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-c3afe4c8d0c48c39.js +0 -1
  381. package/apps/pwa/out/_next/static/chunks/framework-ea806bb57f2b8923.js +0 -1
  382. package/apps/pwa/out/_next/static/chunks/main-8d2302399c2c8f87.js +0 -1
  383. package/apps/pwa/out/_next/static/chunks/main-app-b9308f2d8a931531.js +0 -1
  384. package/apps/pwa/out/_next/static/chunks/pages/_app-b10928c60f0b8488.js +0 -1
  385. package/apps/pwa/out/_next/static/chunks/pages/_error-689039227d443fab.js +0 -1
  386. package/apps/pwa/out/_next/static/chunks/webpack-6f35f9d892fa630b.js +0 -1
  387. package/apps/pwa/out/_next/static/css/85f53c6f35d11382.css +0 -1
  388. /package/apps/pwa/out/_next/static/{J5H7BvqgSI8DUjtRRcA_S → Bam1YziK2iH9bN4K0utGk}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7797],{9734:(e,t,i)=>{i.d(t,{$:()=>s});var n=i(55539),a=i(89545),l=i(17154),o=i(44373);let r=(0,l.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function s(e){let{className:t,variant:i="default",size:l="default",...s}=e;return(0,n.jsx)(a.$,{"data-slot":"button",className:(0,o.cn)(r({variant:i,size:l,className:t})),...s})}},44373:(e,t,i)=>{i.d(t,{cn:()=>l});var n=i(20852),a=i(30984);function l(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return(0,a.QP)((0,n.$)(t))}},53060:(e,t,i)=>{i.d(t,{Bg:()=>u,D9:()=>m,K0:()=>r,LW:()=>a,Ql:()=>n,T0:()=>c,YS:()=>s,eP:()=>b,f7:()=>h,j$:()=>l,mp:()=>o,nX:()=>d});let n=["budget","balanced","better","best","loaded"],a={budget:"Budget",balanced:"Balanced",better:"Better",best:"Best",loaded:"Loaded"},l="balanced";function o(e){return"string"==typeof e&&n.includes(e)}function r(e){return n.indexOf(e)}let s={budget:{label:"Local (whisper.cpp)",rationale:"Offline \xb7 $0/min \xb7 install local whisper.cpp first",usdPerMinAudio:0,loadedExtraUsdPerMin:0,provider:"whisper-cpp-local",model:"whisper.cpp",status:"wip"},balanced:{label:"OpenAI mini transcribe",rationale:"Sensible default \xb7 streaming \xb7 $0.003/min",usdPerMinAudio:.003,loadedExtraUsdPerMin:0,provider:"openai-realtime-stt",model:"gpt-4o-mini-transcribe",status:"shipping"},better:{label:"OpenAI gpt-4o transcribe",rationale:"Higher accuracy \xb7 still streaming \xb7 $0.006/min",usdPerMinAudio:.006,loadedExtraUsdPerMin:0,provider:"openai-realtime-stt",model:"gpt-4o-transcribe",status:"shipping"},best:{label:"OpenAI gpt-realtime-whisper",rationale:"Best accuracy \xb7 domain adaptation \xb7 $0.017/min",usdPerMinAudio:.017,loadedExtraUsdPerMin:0,provider:"openai-realtime-stt",model:"gpt-realtime-whisper",status:"shipping"},loaded:{label:"OpenAI gpt-realtime-whisper \xb7 loaded",rationale:"Loaded \xb7 logprobs + timestamps + tightest latency \xb7 ~$0.025/min",usdPerMinAudio:.017,loadedExtraUsdPerMin:.008,provider:"openai-realtime-stt",model:"gpt-realtime-whisper",status:"shipping"}};function d(e,t){return!Number.isFinite(t)||t<=0?0:30*t*function(e){let t=s[e];return t.usdPerMinAudio+t.loadedExtraUsdPerMin}(e)}function u(e){return!Number.isFinite(e)||e<=0?"$0/mo":e<.01?"<$0.01/mo":e<10?"$".concat(e.toFixed(2),"/mo"):e<100?"$".concat(e.toFixed(1),"/mo"):"$".concat(Math.round(e),"/mo")}let g={budget:{model:"claude-haiku-4-5",reasoningLevel:"off",label:"Claude Haiku 4.5",rationale:"Fast \xb7 cheap \xb7 default for most chat",status:"shipping"},balanced:{model:"claude-haiku-4-5",reasoningLevel:"off",label:"Claude Haiku 4.5",rationale:"Default \xb7 fast multi-turn",status:"shipping"},better:{model:"claude-sonnet-4-6",reasoningLevel:"low",label:"Claude Sonnet 4.6 \xb7 reasoning low",rationale:"Higher quality \xb7 reasoning hint",status:"shipping"},best:{model:"claude-opus-4-7",reasoningLevel:"medium",label:"Claude Opus 4.7 \xb7 reasoning medium",rationale:"Best reasoning \xb7 longer plans",status:"shipping"},loaded:{model:"claude-opus-4-7",reasoningLevel:"high",label:"Claude Opus 4.7 \xb7 extended thinking",rationale:"Loaded \xb7 extended thinking \xb7 multi-step depth",status:"shipping"}},p={anthropic:g,openai:{budget:{model:"gpt-4o-mini",reasoningLevel:"off",label:"GPT-4o-mini",rationale:"Fast \xb7 cheap",status:"shipping"},balanced:{model:"gpt-4o-mini",reasoningLevel:"off",label:"GPT-4o-mini",rationale:"Default \xb7 multi-turn",status:"shipping"},better:{model:"gpt-4o",reasoningLevel:"off",label:"GPT-4o",rationale:"Higher quality \xb7 multimodal",status:"shipping"},best:{model:"o1",reasoningLevel:"medium",label:"o1 \xb7 reasoning medium",rationale:"Best reasoning \xb7 slower",status:"shipping"},loaded:{model:"o1",reasoningLevel:"high",label:"o1 \xb7 reasoning high",rationale:"Loaded \xb7 deep multi-step reasoning",status:"shipping"}},gemini:{budget:{model:"gemini-2.5-flash",reasoningLevel:"off",label:"Gemini 2.5 Flash",rationale:"Fast \xb7 cheap",status:"shipping"},balanced:{model:"gemini-2.5-flash",reasoningLevel:"off",label:"Gemini 2.5 Flash",rationale:"Default \xb7 low-latency",status:"shipping"},better:{model:"gemini-2.5-pro",reasoningLevel:"off",label:"Gemini 2.5 Pro",rationale:"Higher quality \xb7 larger context",status:"shipping"},best:{model:"gemini-2.5-pro",reasoningLevel:"medium",label:"Gemini 2.5 Pro \xb7 thinking",rationale:"Pro with reasoning hint",status:"shipping"},loaded:{model:"gemini-2.5-pro",reasoningLevel:"high",label:"Gemini 2.5 Pro \xb7 deep thinking",rationale:"Loaded \xb7 deep reasoning \xb7 slowest",status:"shipping"}},"openai-codex":{budget:{model:"codex-mini",reasoningLevel:"off",label:"codex-mini",rationale:"Light tasks \xb7 ChatGPT OAuth",status:"shipping"},balanced:{model:"gpt-5.4",reasoningLevel:"off",label:"GPT-5.4",rationale:"Default \xb7 multi-turn coding",status:"shipping"},better:{model:"gpt-5.4",reasoningLevel:"low",label:"GPT-5.4 \xb7 reasoning low",rationale:"Reasoning hint",status:"shipping"},best:{model:"gpt-5.4",reasoningLevel:"medium",label:"GPT-5.4 \xb7 reasoning medium",rationale:"Deeper reasoning",status:"shipping"},loaded:{model:"gpt-5.4",reasoningLevel:"high",label:"GPT-5.4 \xb7 reasoning high",rationale:"Loaded \xb7 deep multi-step",status:"shipping"}},local:{budget:{model:"qwen3.6-coder-7b",label:"Qwen 3.6 Coder 7B",rationale:"Offline \xb7 cheap \xb7 install LM Studio / Ollama",status:"wip"},balanced:{model:"qwen3.6-coder-7b",label:"Qwen 3.6 Coder 7B",rationale:"Default local \xb7 fast",status:"wip"},better:{model:"glm-4.5-air",label:"GLM 4.5 Air",rationale:"Higher quality local",status:"wip"},best:{model:"qwen3.6-32b",label:"Qwen 3.6 32B",rationale:"Best local \xb7 needs ≥48GB RAM",status:"wip"},loaded:{model:"qwen3.6-32b",reasoningLevel:"high",label:"Qwen 3.6 32B \xb7 multi-turn",rationale:"Loaded local \xb7 long context \xb7 slowest",status:"wip"}},kimi:{budget:{model:"moonshot-v1-8k",label:"Moonshot v1 8K",rationale:"Fast \xb7 cheap",status:"shipping"},balanced:{model:"moonshot-v1-32k",label:"Moonshot v1 32K",rationale:"Default",status:"shipping"},better:{model:"moonshot-v1-128k",label:"Moonshot v1 128K",rationale:"Higher quality \xb7 long context",status:"shipping"},best:{model:"kimi-k2.6",label:"Kimi K2.6 (1T MoE)",rationale:"Best \xb7 K2.6 flagship",status:"shipping"},loaded:{model:"kimi-k2.6",reasoningLevel:"high",label:"Kimi K2.6 \xb7 reasoning high",rationale:"Loaded \xb7 deep multi-step",status:"shipping"}},qwen:{budget:{model:"qwen-turbo",label:"Qwen Turbo",rationale:"Fast \xb7 cheap",status:"shipping"},balanced:{model:"qwen-plus",label:"Qwen Plus",rationale:"Default",status:"shipping"},better:{model:"qwen-max",label:"Qwen Max",rationale:"Higher quality",status:"shipping"},best:{model:"qwen3.6-max-235b",label:"Qwen 3.6 Max 235B",rationale:"Best \xb7 flagship",status:"shipping"},loaded:{model:"qwen3.6-max-235b",reasoningLevel:"high",label:"Qwen 3.6 Max 235B \xb7 reasoning high",rationale:"Loaded \xb7 deep multi-step",status:"shipping"}},glm:{budget:{model:"glm-4-flash",label:"GLM 4 Flash",rationale:"Fast \xb7 cheap",status:"shipping"},balanced:{model:"glm-4-air",label:"GLM 4 Air",rationale:"Default",status:"shipping"},better:{model:"glm-4-plus",label:"GLM 4 Plus",rationale:"Higher quality",status:"shipping"},best:{model:"glm-5.1",label:"GLM 5.1 (754B MoE)",rationale:"Best \xb7 GLM-5.1 flagship",status:"shipping"},loaded:{model:"glm-5.1",reasoningLevel:"high",label:"GLM 5.1 \xb7 reasoning high",rationale:"Loaded \xb7 deep multi-step",status:"shipping"}},grok:{budget:{model:"grok-4.20-non-reasoning",reasoningLevel:"off",label:"Grok 4.20 (non-reasoning)",rationale:"$1.25/$2.50 \xb7 2M context",status:"shipping"},balanced:{model:"grok-4.20",reasoningLevel:"low",label:"Grok 4.20 \xb7 reasoning low",rationale:"저가 워크호스 \xb7 2M context",status:"shipping"},better:{model:"grok-4.6",reasoningLevel:"medium",label:"Grok 4.6 \xb7 reasoning medium",rationale:"Flagship 500k \xb7 구현/판정",status:"shipping"},best:{model:"grok-4.6",reasoningLevel:"high",label:"Grok 4.6 \xb7 reasoning high",rationale:"Flagship 심층 \xb7 골분해/리뷰",status:"shipping"},loaded:{model:"grok-4.6",reasoningLevel:"high",label:"Grok 4.6 \xb7 reasoning high",rationale:"4.6 의 추론 상한이 high 라 best 와 같다",status:"shipping"}}},c={anthropic:"Anthropic",openai:"OpenAI",gemini:"Gemini","openai-codex":"OpenAI Codex",local:"Local",kimi:"Kimi",qwen:"Qwen",glm:"GLM",grok:"Grok"};function m(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(p,e)}function h(e,t){return"auto"!==e&&m(e)?p[e][t]:g.balanced}let b={budget:{provider:"macos-say",model:"system",label:"macOS say (local)",rationale:"Free \xb7 offline \xb7 macOS only",usdPerCharacter:0,status:"shipping"},balanced:{provider:"openai-tts",model:"tts-1",label:"OpenAI TTS",rationale:"Default \xb7 $15/M chars \xb7 multi-voice",usdPerCharacter:15e-6,status:"shipping"},better:{provider:"openai-tts",model:"tts-1-hd",label:"OpenAI TTS HD",rationale:"Higher fidelity \xb7 $30/M chars",usdPerCharacter:3e-5,status:"shipping"},best:{provider:"elevenlabs-tts",model:"eleven_flash_v2_5",label:"ElevenLabs Flash v2.5",rationale:"Best \xb7 ~75ms latency \xb7 32 langs \xb7 $20/M chars",usdPerCharacter:2e-5,status:"shipping"},loaded:{provider:"elevenlabs-tts",model:"eleven_multilingual_v2",label:"ElevenLabs Multilingual v2",rationale:"Loaded \xb7 long-form fidelity \xb7 29 langs \xb7 ~$20/M chars",usdPerCharacter:2e-5,status:"shipping"}}},64655:(e,t,i)=>{i.d(t,{Ij:()=>r,Md:()=>p,Pv:()=>d,Pz:()=>s,ew:()=>c,gF:()=>u,lH:()=>m,oA:()=>g});var n=i(53060);let a="elanous.model-tier.prefs",l={audioMinPerDay:0};function o(e){return"number"!=typeof e||!Number.isFinite(e)||e<0?0:Math.min(e,1440)}function r(){if("undefined"==typeof localStorage)return{...l};try{let e=localStorage.getItem(a);if(!e)return{...l};let t=JSON.parse(e);return{stt:(0,n.mp)(t.stt)?t.stt:void 0,llm:(0,n.mp)(t.llm)?t.llm:void 0,tts:(0,n.mp)(t.tts)?t.tts:void 0,embedding:(0,n.mp)(t.embedding)?t.embedding:void 0,vision:(0,n.mp)(t.vision)?t.vision:void 0,audioMinPerDay:o(t.audioMinPerDay)}}catch(e){return{...l}}}function s(e){let t=r(),i={stt:void 0===e.stt?t.stt:(0,n.mp)(e.stt)?e.stt:void 0,llm:void 0===e.llm?t.llm:(0,n.mp)(e.llm)?e.llm:void 0,tts:void 0===e.tts?t.tts:(0,n.mp)(e.tts)?e.tts:void 0,embedding:void 0===e.embedding?t.embedding:(0,n.mp)(e.embedding)?e.embedding:void 0,vision:void 0===e.vision?t.vision:(0,n.mp)(e.vision)?e.vision:void 0,audioMinPerDay:void 0===e.audioMinPerDay?t.audioMinPerDay:o(e.audioMinPerDay)};if("undefined"!=typeof localStorage)try{localStorage.setItem(a,JSON.stringify(i))}catch(e){}return i}function d(){if("undefined"!=typeof localStorage)try{localStorage.removeItem(a)}catch(e){}return{...l}}function u(e){var t;return null!=(t=e.stt)?t:n.j$}function g(e){var t;return null!=(t=e.llm)?t:n.j$}function p(e){var t;return null!=(t=e.tts)?t:n.j$}function c(e){var t;return null!=(t=e.embedding)?t:n.j$}function m(e){var t;return null!=(t=e.vision)?t:n.j$}},65238:(e,t,i)=>{i.d(t,{Vl:()=>s,gh:()=>a,iQ:()=>l,s0:()=>r});var n=i(82068);async function a(e){if(!e.baseUrl)return null;try{let t=await fetch(e.baseUrl.replace(/\/$/,"")+"/v1/budget/status",{headers:function(e){let t={"content-type":"application/json"};return e.token&&(t.authorization="Bearer ".concat(e.token)),t}(e)});if(!t.ok)return null;return await t.json()}catch(e){return null}}async function l(e,t){let[i,a,l]=await Promise.all([(0,n.ZB)(e,t),(0,n.tM)(e,t),(0,n.pP)(e,t)]),o=["error","offline","syncing","idle","synced"];return[i,a,l].reduce((e,t)=>o.indexOf(t)<o.indexOf(e)?t:e,"synced")}function o(e,t){return"".concat("elanous.budget.dismissed.").concat(e,".").concat(t)}function r(e,t){if("undefined"!=typeof localStorage)try{localStorage.setItem(o(e,t),"1")}catch(e){}}function s(e){return!("ok"===e.status||!e.recommendedFallback||function(e,t){if("undefined"==typeof localStorage)return!1;try{return"1"===localStorage.getItem(o(e,t))}catch(e){return!1}}(e.monthYYYYMM,e.status))}},79689:(e,t,i)=>{i.d(t,{KS:()=>u,M_:()=>o,Qc:()=>a,ik:()=>d,lu:()=>s,u4:()=>l});let n="elanous.voice.prefs",a={speakingThresholdMultiplier:2},l=1,o=5;function r(e){return Number.isFinite(e)?Math.min(o,Math.max(l,e)):a.speakingThresholdMultiplier}function s(){if("undefined"==typeof localStorage)return{...a};try{let e=localStorage.getItem(n);if(!e)return{...a};let t=JSON.parse(e);return{speakingThresholdMultiplier:"number"==typeof t.speakingThresholdMultiplier?r(t.speakingThresholdMultiplier):a.speakingThresholdMultiplier}}catch(e){return{...a}}}function d(e){let t=s(),i={speakingThresholdMultiplier:"number"==typeof e.speakingThresholdMultiplier?r(e.speakingThresholdMultiplier):t.speakingThresholdMultiplier};if("undefined"==typeof localStorage)return i;try{localStorage.setItem(n,JSON.stringify(i))}catch(e){}return i}function u(){if("undefined"==typeof localStorage)return{...a};try{localStorage.removeItem(n)}catch(e){}return{...a}}},82068:(e,t,i)=>{i.d(t,{D4:()=>b,F$:()=>f,We:()=>h,ZB:()=>u,ee:()=>s,me:()=>r,pP:()=>c,tM:()=>p,zs:()=>m});var n=i(53060),a=i(64655);function l(e){let t={"content-type":"application/json"};return e.token&&(t.authorization="Bearer ".concat(e.token)),t}function o(e,t){return e.baseUrl.replace(/\/$/,"")+t}async function r(e){if(!e.baseUrl)return null;try{var t,i,a,r,s,d;let u=await fetch(o(e,"/v1/config/model-tier"),{headers:l(e)});if(!u.ok)return null;let g=await u.json(),p=null==(i=g.modelTier)||null==(t=i.voice)?void 0:t.stt,c=null==(r=g.modelTier)||null==(a=r.voice)?void 0:a.tts,m=null==(s=g.modelTier)?void 0:s.llm;return{...(0,n.mp)(p)?{stt:p}:{},...(0,n.mp)(m)?{llm:m}:{},...(0,n.mp)(c)?{tts:c}:{},..."number"==typeof(null==(d=g.budget)?void 0:d.monthlyUsdCap)?{monthlyUsdCap:g.budget.monthlyUsdCap}:{}}}catch(e){return null}}async function s(e){var t,i,n;let l=await r(e);if(!l)return null;let o=(0,a.Ij)();return(0,a.Pz)({stt:null!=(t=l.stt)?t:o.stt,llm:null!=(i=l.llm)?i:o.llm,tts:null!=(n=l.tts)?n:o.tts,audioMinPerDay:o.audioMinPerDay})}async function d(e,t){if(!e.baseUrl)return"offline";try{if(!(await fetch(o(e,"/v1/config/model-tier"),{method:"PUT",headers:l(e),body:JSON.stringify(t)})).ok)return"error";return"synced"}catch(e){if(e instanceof TypeError)return"offline";return"error"}}async function u(e,t){return null===t?(0,a.Pv)():(0,a.Pz)({stt:t}),d(e,null===t?{modelTier:null}:{modelTier:{voice:{stt:t}}})}function g(){let e=(0,a.Ij)(),t={},i={};return e.stt&&(i.stt=e.stt),e.tts&&(i.tts=e.tts),Object.keys(i).length>0&&(t.voice=i),e.llm&&(t.llm=e.llm),e.embedding&&(t.embedding=e.embedding),e.vision&&(t.vision=e.vision),0===Object.keys(t).length?null:t}async function p(e,t){return null===t?(0,a.Pz)({llm:void 0}):(0,a.Pz)({llm:t}),d(e,{modelTier:g()})}async function c(e,t){return null===t?(0,a.Pz)({tts:void 0}):(0,a.Pz)({tts:t}),d(e,{modelTier:g()})}async function m(e,t){return null===t?(0,a.Pz)({embedding:void 0}):(0,a.Pz)({embedding:t}),d(e,{modelTier:g()})}async function h(e,t){return null===t?(0,a.Pz)({vision:void 0}):(0,a.Pz)({vision:t}),d(e,{modelTier:g()})}async function b(e,t){if(!e.baseUrl)return"offline";let i={};if("undefined"!=typeof localStorage)try{let e=localStorage.getItem("elanous.tts-voice-map");e&&(i=JSON.parse(e))}catch(e){}let n={...i};for(let e of["default","chat","digest","alert","discord"])if(e in t){let i=t[e];null==i||""===i.trim()?delete n[e]:n[e]=i.trim()}let l=(0,a.Ij)(),o={};l.stt&&(o.stt=l.stt),l.tts&&(o.tts=l.tts),Object.keys(n).length>0&&(o.ttsVoice=n);let r={};return Object.keys(o).length>0&&(r.voice=o),l.llm&&(r.llm=l.llm),d(e,{modelTier:0===Object.keys(r).length?null:r})}async function f(e,t){if(!e.baseUrl)return"offline";if(null===t){let t=(0,a.Ij)(),i={},n={};return t.stt&&(n.stt=t.stt),t.tts&&(n.tts=t.tts),Object.keys(n).length>0&&(i.voice=n),t.llm&&(i.llm=t.llm),d(e,{modelTier:0===Object.keys(i).length?null:i})}if((0,a.Pz)({stt:t.tiers.stt,tts:t.tiers.tts,llm:t.tiers.llm}),t.ttsVoice&&"undefined"!=typeof localStorage)try{localStorage.setItem("elanous.tts-voice-map",JSON.stringify(t.ttsVoice))}catch(e){}let i=(0,a.Ij)(),n={};i.stt&&(n.stt=i.stt),i.tts&&(n.tts=i.tts),t.ttsVoice&&Object.keys(t.ttsVoice).length>0&&(n.ttsVoice=t.ttsVoice);let l={preset:t.id};Object.keys(n).length>0&&(l.voice=n),i.llm&&(l.llm=i.llm);let o={modelTier:l};return void 0!==t.monthlyUsdCap&&(o.budget={monthlyUsdCap:t.monthlyUsdCap}),d(e,o)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8060],{8101:(e,t,s)=>{function n(e){if("undefined"==typeof localStorage)return{migrated:!1,currentValue:null};let t=localStorage.getItem(e.currentKey);if(t&&t.length>0)return{migrated:!1,currentValue:t};let s=localStorage.getItem(e.legacyKey);if(!s||0===s.length)return{migrated:!1,currentValue:t};let n=s;if(e.transformValue)try{n=e.transformValue(s)}catch(e){n=null}if(!n||0===n.length)return{migrated:!1,currentValue:t};try{localStorage.setItem(e.currentKey,n),localStorage.removeItem(e.legacyKey)}catch(e){return{migrated:!1,currentValue:t}}return{migrated:!0,currentValue:n}}s.d(t,{yS:()=>d,uh:()=>u,Ip:()=>o,Fp:()=>l,Qc:()=>c});let r={baseUrl:"elanous.nexus.baseUrl",token:"elanous.daemon.token",provider:"elanous.daemon.provider"},a={daemonBaseUrl:"elanous.daemon.baseUrl",voiceWsUrl:"elanous.voice.wsUrl",voiceToken:"elanous.voice.token"};function o(){let e="https:"===window.location.protocol?"https:":"http:";return"".concat(e,"//").concat(window.location.host)}function i(e,t){if(!e)return"";let s=new URL(t,e);return s.protocol="https:"===s.protocol?"wss:":"ws:",s.toString()}function l(){var e,t;n({legacyKey:a.daemonBaseUrl,currentKey:r.baseUrl}),n({legacyKey:a.voiceWsUrl,currentKey:r.baseUrl,transformValue:e=>{try{let t=new URL(e);return t.protocol="wss:"===t.protocol?"https:":"http:",t.pathname="/",t.toString().replace(/\/$/,"")}catch(e){return null}}});let s=localStorage.getItem(a.voiceToken);s&&!localStorage.getItem(r.token)&&localStorage.setItem(r.token,s);let i=localStorage.getItem(r.baseUrl);return{baseUrl:i&&i.length>0?i:o(),token:null!=(e=localStorage.getItem(r.token))?e:"",provider:null!=(t=localStorage.getItem(r.provider))?t:""}}function c(e){void 0!==e.baseUrl&&localStorage.setItem(r.baseUrl,e.baseUrl),void 0!==e.token&&localStorage.setItem(r.token,e.token),void 0!==e.provider&&localStorage.setItem(r.provider,e.provider)}function d(e){return i(e.baseUrl,"/v1/acp")}function u(e){return i(e.baseUrl,"/v1/voice/ws")}},18060:(e,t,s)=>{s.d(t,{J_:()=>i,ki:()=>l});var n=s(18068),r=s(8101),a=s(72215),o=s(59318);class i extends Error{constructor(e,t,s=[]){super(t),this.status=e,this.code=t,this.seats=s}}class l{updateConfig(e){let t="".concat((0,r.yS)(this.cfg),"\0").concat(this.cfg.token),s="".concat((0,r.yS)(e),"\0").concat(e.token);this.cfg=e,t!==s&&(this.acpConnections.forEach(e=>e.dispose()),this.acpConnections.clear())}async fetchResponse(e,t){var s;let r=await fetch(this.url(e),{...t,headers:{...this.authHeaders(),...null!=(s=null==t?void 0:t.headers)?s:{}}});return 401===r.status&&(0,n.Qb)(e),r}async fetchJson(e,t){var s;if(e.startsWith("/v1/terminals")&&!e.startsWith("/v1/terminals/")&&(!t||(null!=(s=t.method)?s:"GET")==="GET"&&void 0===t.body)){let s=this.inflightTerminals.get(e);if(s)return s;let n=this.fetchJsonOnce(e,t).finally(()=>{this.inflightTerminals.delete(e)});return this.inflightTerminals.set(e,n),n}return this.fetchJsonOnce(e,t)}async fetchJsonOnce(e,t){var s,n,r;let a=await this.fetchResponse(e,t),o=(null!=(s=a.headers.get("content-type"))?s:"").includes("application/json")?await a.json():await a.text();if(!a.ok)throw Error(String("string"==typeof o?o:null!=(r=null!=(n=null==o?void 0:o.reason)?n:null==o?void 0:o.error)?r:"".concat(a.status)));return o}getCodexLogin(){return this.fetchJson("/v1/setup/codex-login")}startCodexLogin(e){return this.fetchJson("/v1/setup/codex-login",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:e})})}async health(){return this.fetchJson("/v1/health")}async fieldDefaultEvent(){return this.fetchJson("/v1/field/uploads")}async fieldReelStatus(e){return this.fetchJson("/v1/field/reel?event=".concat(encodeURIComponent(e)))}uploadField(e,t,s,r){let a=new FormData;t.forEach(e=>a.append("file",e,e.name)),t.forEach(()=>a.append("capturedAt",""));let o=new URLSearchParams({event:e,device:"pwa"});s.trim()&&(o.set("caption",s.trim()),a.append("caption",s.trim()));let i="/v1/field/uploads?".concat(o);return new Promise((e,t)=>{let s=new XMLHttpRequest;s.open("POST",this.url(i)),this.cfg.token&&s.setRequestHeader("authorization","Bearer ".concat(this.cfg.token)),s.upload.onprogress=e=>{e.lengthComputable&&e.total>0&&r(Math.min(100,Math.round(100*e.loaded/e.total)))},s.onerror=()=>t(Error("field upload: network error")),s.onload=()=>{let r;401===s.status&&(0,n.Qb)(i);try{r=JSON.parse(s.responseText)}catch(e){t(Error("field upload ".concat(s.status,": invalid response")));return}if("object"!=typeof r||null===r)return void t(Error("field upload ".concat(s.status,": invalid response")));if(s.status<200||s.status>=300||!0!==r.ok){var a,o;t(Error(null!=(o=null!=(a=r.reason)?a:r.error)?o:"field upload ".concat(s.status)));return}if("string"!=typeof r.event||"number"!=typeof r.count)return void t(Error("field upload ".concat(s.status,": invalid response")));e({event:r.event,count:r.count})},s.send(a)})}async submitConsultRequest(e){let t=await this.fetchResponse("/v1/consult-requests",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(202===t.status||400===t.status)return await t.json();throw Error("consult-requests ".concat(t.status))}async listExecRequests(){return this.fetchJson("/v1/exec-requests")}async getExecRequest(e){return this.fetchJson("/v1/exec-requests/".concat(encodeURIComponent(e)))}async submitExecRequest(e){let t=await this.fetchResponse("/v1/exec-requests",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:e})});if(202!==t.status)throw Error("exec-requests ".concat(t.status));return await t.json()}async listSeatRequests(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new URLSearchParams;void 0!==e.seat&&t.set("seat",e.seat),void 0!==e.limit&&t.set("limit",String(e.limit));let s=t.size?"?".concat(t):"";return this.fetchJson("/v1/seat-requests".concat(s))}async listSeatAskAnswers(e){return this.fetchJson("/v1/seat-requests?answers=1",{headers:{"x-seat-ask-client":e}})}async acknowledgeSeatAskAnswers(e,t){await this.fetchJson("/v1/seat-requests?answers=ack",{method:"POST",headers:{"content-type":"application/json","x-seat-ask-client":e},body:JSON.stringify({ids:t})})}async submitSeatAsk(e,t){let s=await this.fetchResponse("/v1/seat-requests",{method:"POST",headers:{"content-type":"application/json","x-seat-ask-client":t},body:JSON.stringify({seat:"TC",text:e})});if(!s.ok)throw Error("seat ask ".concat(s.status));return s.json()}async submitSeatRequest(e,t){let{seat:s,text:n,attachments:r}=e,a=await this.fetchResponse("/v1/seat-requests",{method:"POST",headers:{"content-type":"application/json","Idempotency-Key":t},body:JSON.stringify({...void 0!==s?{seat:s}:{},text:n,...(null==r?void 0:r.length)?{attachments:r.map(e=>{let{id:t,filename:s,mediaType:n,size:r}=e;return{id:t,name:s,mediaType:n,bytes:r}})}:{}})}),o=await a.json();if(!a.ok){var l,c;throw new i(a.status,null!=(l=o.error)?l:"http-".concat(a.status),null!=(c=o.seats)?c:[])}return o}subscribeChatEvents(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=new AbortController,r={method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:s.signal},o="".concat(this.url("/v1/chat/events"),"?sessionId=").concat(encodeURIComponent(e));return(0,a.cY)("webterm.chat.observer.subscribe",{sessionId:e}),(async()=>{var i,l;try{let e=await fetch(o,r);if(401===e.status&&(0,n.Qb)("/v1/chat/events"),!e.ok||!e.body){null==(i=t.onError)||i.call(t,{error:"observer_failed",message:"".concat(e.status,": ").concat(await e.text())});return}await f(e.body,t)}catch(e){if(s.signal.aborted)return;null==(l=t.onError)||l.call(t,{error:"observer_disconnected",message:e instanceof Error?e.message:String(e)})}(0,a.cY)("webterm.chat.observer.end",{sessionId:e})})(),()=>{(0,a.cY)("webterm.chat.observer.dispose",{sessionId:e});try{s.abort()}catch(e){}}}subscribeAgentStatusEvents(e,t){let s=new AbortController,r="".concat(this.url("/v1/events"),"?topics=agent.status");return(0,a.cY)("webterm.agent-status.subscribe",{sessionId:e}),(async()=>{var o,i;try{let a=await fetch(r,{method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:s.signal});if(401===a.status&&(0,n.Qb)("/v1/events"),!a.ok||!a.body){null==(o=t.onError)||o.call(t,{error:"agent_status_failed",message:"".concat(a.status,": ").concat(await a.text())});return}await g(a.body,e,t)}catch(e){if(s.signal.aborted)return;null==(i=t.onError)||i.call(t,{error:"agent_status_disconnected",message:e instanceof Error?e.message:String(e)})}(0,a.cY)("webterm.agent-status.end",{sessionId:e})})(),()=>{(0,a.cY)("webterm.agent-status.dispose",{sessionId:e});try{s.abort()}catch(e){}}}subscribeHudSegmentEvents(e,t){let s=new AbortController,r="".concat(this.url("/v1/events"),"?topics=hud.segment");return(0,a.cY)("webterm.hud-segment.subscribe",{sessionId:e}),(async()=>{var o,i;try{let a=await fetch(r,{method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:s.signal});if(401===a.status&&(0,n.Qb)("/v1/events"),!a.ok||!a.body){null==(o=t.onError)||o.call(t,{error:"hud_segment_failed",message:"".concat(a.status,": ").concat(await a.text())});return}await y(a.body,e,t)}catch(e){if(s.signal.aborted)return;null==(i=t.onError)||i.call(t,{error:"hud_segment_disconnected",message:e instanceof Error?e.message:String(e)})}(0,a.cY)("webterm.hud-segment.end",{sessionId:e})})(),()=>{(0,a.cY)("webterm.hud-segment.dispose",{sessionId:e});try{s.abort()}catch(e){}}}subscribeChatFeedbackEvents(e,t){let s=new AbortController,r=["agent.status","hud.segment"],o="".concat(this.url("/v1/events"),"?topics=").concat(r.join(","));return(0,a.cY)("webterm.chat-feedback.subscribe",{sessionId:e,topics:r}),(async()=>{var r,i,l,c,d,u,h,p;try{let a=await fetch(o,{method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:s.signal});if(401===a.status&&(0,n.Qb)("/v1/events"),!a.ok||!a.body){let e="".concat(a.status,": ").concat(await a.text());null==(r=(i=t.agentStatus).onError)||r.call(i,{error:"agent_status_failed",message:e}),null==(l=(c=t.hudSegment).onError)||l.call(c,{error:"hud_segment_failed",message:e});return}let[d,u]=a.body.tee();await Promise.all([g(d,e,t.agentStatus),y(u,e,t.hudSegment)])}catch(n){if(s.signal.aborted)return;let e=n instanceof Error?n.message:String(n);null==(d=(u=t.agentStatus).onError)||d.call(u,{error:"agent_status_disconnected",message:e}),null==(h=(p=t.hudSegment).onError)||h.call(p,{error:"hud_segment_disconnected",message:e})}(0,a.cY)("webterm.chat-feedback.end",{sessionId:e})})(),()=>{(0,a.cY)("webterm.chat-feedback.dispose",{sessionId:e});try{s.abort()}catch(e){}}}async promptStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.cY)("webterm.rest.prompt.stream",{sessionId:e.sessionId,len:e.userText.length});let s={method:"POST",headers:{"content-type":"application/json",accept:"text/event-stream",...this.authHeaders()},body:JSON.stringify({...void 0!==e.sessionId?{sessionId:e.sessionId}:{},userText:e.userText,...void 0!==e.userContent?{userContent:e.userContent}:{},...void 0!==e.provider?{provider:e.provider}:{},...void 0!==e.personaId?{personaId:e.personaId}:{}})};t.signal&&(s.signal=t.signal);let r=!0===t.debugTap?"/v1/prompt/stream?debug-tap=on":"/v1/prompt/stream",o=await fetch(this.url(r),s);if(401===o.status&&(0,n.Qb)(r),!o.ok||!o.body)throw Error("prompt/stream ".concat(o.status,": ").concat(await o.text()));return p(o.body,t)}connectAcp(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,r.yS)(this.cfg);if(!s)throw Error("daemon baseUrl not configured");if(!t.sessionId)return new c(s,this.cfg.token).acquire(t.onSession);let n=t.sessionId,a=this.acpConnections.get(n);return a&&!a.isTerminal?a.acquire(t.onSession):(e=new c(s,this.cfg.token,t.sessionId,()=>{this.acpConnections.get(n)===e&&this.acpConnections.delete(n)}),this.acpConnections.set(n,e),e.acquire(t.onSession))}voiceWsUrl(){return(0,r.uh)(this.cfg)}async voiceCost(){return this.fetchJson("/v1/voice/cost")}async listTerminals(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!0===e.all&&!0===e.includeTest?"?all=true&includeTest=true":"";return this.fetchJson("/v1/terminals".concat(t))}async fetchTerminalLineage(e){return this.fetchJson("/v1/terminals/lineage?key=".concat(encodeURIComponent(e)))}async fetchTerminalScrollback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=encodeURIComponent(e),r=new URLSearchParams({lines:String(t)});return s.sourceRoot&&r.set("sourceRoot",s.sourceRoot),this.fetchJson("/v1/terminals/".concat(n,"/scrollback?").concat(r))}streamTerminal(e,t,r,a){let o=new AbortController,i=t.sourceRoot?"?sourceRoot=".concat(encodeURIComponent(t.sourceRoot)):"",l=this.url("/v1/terminals/".concat(encodeURIComponent(e),"/stream").concat(i));return(async()=>{try{let e=await fetch(l,{method:"GET",headers:{accept:"text/event-stream",...this.authHeaders()},signal:o.signal});if(401===e.status&&(0,n.Qb)("/v1/terminals/stream"),!e.ok||!e.body)return void a("stream ".concat(e.status));let{parseTerminalSse:t}=await s.e(311).then(s.bind(s,20311)),i=e.body.getReader(),c=new TextDecoder,d="";for(;;){let e=await i.read();if(e.done)break;d+=c.decode(e.value,{stream:!0});let s=t(d);for(let e of(d=s.rest,s.events))r(e)}}catch(e){if(o.signal.aborted)return;a(e instanceof Error?e.message:String(e))}})(),()=>{try{o.abort()}catch(e){}}}async snapshotTerminal(e,t){return this.requestTerminalControl(e,{action:"snapshot",ansi:t.ansi},t)}async sendTerminalText(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.requestTerminalControl(e,{action:"input-text",chars:t},s)}async sendTerminalKey(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.requestTerminalControl(e,{action:"input-key",chars:t},s)}async sendTerminalMouse(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.requestTerminalControl(e,{action:"input-mouse",...t},s)}async controlTerminal(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.requestTerminalControl(e,{action:t},s)}async requestTerminalControl(e,t){let s,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=encodeURIComponent(e),o=r.sourceRoot?"?sourceRoot=".concat(encodeURIComponent(r.sourceRoot)):"",i=await fetch(this.url("/v1/terminals/".concat(a,"/control").concat(o)),{method:"POST",headers:{"content-type":"application/json",...this.authHeaders()},body:JSON.stringify(t)});401===i.status&&(0,n.Qb)("/v1/terminals/".concat(a,"/control"));try{s=await i.json()}catch(e){throw Error("terminal control ".concat(i.status,": invalid JSON response"))}let l=s&&"object"==typeof s?s.status:void 0,c="write-failed"===l?"failed":l;if("success"!==c&&"unknown-pty"!==c&&"denied"!==c&&"failed"!==c&&"owner-unreachable"!==c||i.status!==({success:200,"unknown-pty":404,denied:409,failed:502,"owner-unreachable":504})[c]){var d;let e=s&&"object"==typeof s?null!=(d=s.reason)?d:s.error:void 0;throw Error("terminal control ".concat(i.status,": ").concat(String(null!=e?e:"unexpected response")))}let u=s;if("snapshot"===t.action&&"success"===c&&"string"!=typeof u.screen)throw Error("terminal control ".concat(i.status,": missing screen"));return{status:c,..."string"==typeof u.reason?{reason:u.reason}:{},..."snapshot"===t.action&&"string"==typeof u.screen?{screen:u.screen}:{}}}async renameTerminal(e,t){let s,r=encodeURIComponent(e),a=await fetch(this.url("/v1/terminals/".concat(r,"/rename")),{method:"POST",headers:{"content-type":"application/json",...this.authHeaders()},body:JSON.stringify({name:t})});401===a.status&&(0,n.Qb)("/v1/terminals/".concat(r,"/rename"));try{s=await a.json()}catch(e){throw Error("terminal rename ".concat(a.status,": invalid JSON response"))}let o=s&&"object"==typeof s?s:{},i="write-failed"===o.status?"failed":"unknown-pty"===o.status||"denied"===o.status||"failed"===o.status||"owner-unreachable"===o.status?o.status:"success"===o.status?"success":"invalid-name"===o.error?"invalid-name":void 0;if(void 0===i||a.status!==({success:200,"invalid-name":400,"unknown-pty":404,denied:409,failed:502,"owner-unreachable":504})[i]||"success"===i&&("string"!=typeof o.id||"string"!=typeof o.name)){var l,c;throw Error("terminal rename ".concat(a.status,": ").concat(String(null!=(c=null!=(l=o.reason)?l:o.error)?c:"unexpected response")))}return"success"===i?{status:i,id:o.id,name:o.name}:{status:i}}async fetchTerminalFrame(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=encodeURIComponent(e),n=t.sourceRoot?"?sourceRoot=".concat(encodeURIComponent(t.sourceRoot)):"",r=await this.fetchJson("/v1/terminals/".concat(s,"/frame").concat(n));return{id:r.id,frame:r.frame,frameAt:r.frameAt,frameSource:r.frameSource}}async createAgentCliSession(e,t,s){let n=(null==s?void 0:s.hitl)==="off"?"/v1/agent-cli/sessions?hitl=off":"/v1/agent-cli/sessions";return this.fetchJson(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({backend:e,...t?{cwd:t}:{}})})}async agentCliPromptStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s={method:"POST",headers:{"content-type":"application/json",...this.authHeaders()},body:JSON.stringify(e)};t.signal&&(s.signal=t.signal);let r=await fetch(this.url("/v1/agent-cli/prompt"),s);if(401===r.status&&(0,n.Qb)("/v1/agent-cli/prompt"),!r.ok){let e=await r.text().catch(()=>"");throw Error("agent-cli/prompt ".concat(r.status,": ").concat(e))}if(!r.body)throw Error("agent-cli/prompt: no body");let a=r.body.getReader(),o=new TextDecoder,i="",l="",c="end_turn",d=e.sessionId,u=null;for(;;){let{value:e,done:s}=await a.read();if(s)break;let n=(i+=o.decode(e,{stream:!0})).indexOf("\n\n");for(;-1!==n;){var h,p,f,m,g,y;let e=i.slice(0,n);i=i.slice(n+2);let s=e.split("\n"),r="message",a=[];for(let e of s)e.startsWith("event: ")?r=e.slice(7).trim():e.startsWith("data: ")&&a.push(e.slice(6));let o=a.join("\n");if("chunk"===r)try{let e=JSON.parse(o);"string"==typeof e.text&&(l+=e.text,null==(h=t.onTextDelta)||h.call(t,{delta:e.text,full:l}))}catch(e){}else if("stop"===r)try{let e=JSON.parse(o);e.stopReason&&(c=e.stopReason),e.sessionId&&(d=e.sessionId),null==(p=t.onStop)||p.call(t,{stopReason:c,sessionId:d})}catch(e){}else if("tool_call"===r||"tool_call_update"===r)try{let e=JSON.parse(o),s=e.rawOutput,n=null===s||"object"!=typeof s||Array.isArray(s)?void 0:s,a=null==n?void 0:n._meta,i=null===a||"object"!=typeof a||Array.isArray(a)?void 0:a.ui,l=null===i||"object"!=typeof i||Array.isArray(i)?void 0:i.resourceUri,c=null==n?void 0:n["ui/resourceUri"],d="string"==typeof l?l:"string"==typeof c?c:void 0;null==(f=t.onToolCall)||f.call(t,{kind:r,...e.toolCallId?{toolCallId:e.toolCallId}:{},...e.title?{title:e.title}:{},...e.kind?{toolKind:e.kind}:{},...e.status?{status:e.status}:{},...e.contentText?{contentText:e.contentText}:{},...void 0!==s?{rawOutput:s}:{},...void 0!==d?{resourceUri:d}:{}})}catch(e){}else if("usage"===r)try{let e=JSON.parse(o);"number"==typeof e.turnDurationMs&&"number"==typeof e.toolCallCount&&"number"==typeof e.textBytes&&(null==(m=t.onUsage)||m.call(t,{turnDurationMs:e.turnDurationMs,toolCallCount:e.toolCallCount,textBytes:e.textBytes}))}catch(e){}else if("error"===r)try{u=null!=(y=JSON.parse(o).error)?y:"unknown",null==(g=t.onError)||g.call(t,{error:u})}catch(e){u="parse-error"}n=i.indexOf("\n\n")}}if(u)throw Error(u);return{sessionId:d,text:l,stopReason:c}}async cancelAgentCliSession(e){return this.fetchJson("/v1/agent-cli/cancel",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:e})})}async closeAgentCliSession(e){let t=encodeURIComponent(e);return this.fetchJson("/v1/agent-cli/sessions/".concat(t),{method:"DELETE"})}async listShowroomLayouts(){return this.fetchJson("/v1/showroom/layouts")}async getShowroomLayout(e){let t=encodeURIComponent(e);return this.fetchJson("/v1/showroom/layouts/".concat(t))}async saveShowroomLayout(e,t){let s=encodeURIComponent(e);return this.fetchJson("/v1/showroom/layouts/".concat(s),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}async deleteShowroomLayout(e){let t=encodeURIComponent(e);return this.fetchJson("/v1/showroom/layouts/".concat(t),{method:"DELETE"})}async fetchUrlContext(e){return this.fetchJson("/v1/context/fetch-url",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:e})})}async listLlmModels(){let e=await fetch(this.url("/v1/llm/models"),{method:"GET",headers:{...this.authHeaders()}});return(401===e.status&&(0,n.Qb)("/v1/llm/models"),e.ok)?await e.json():{models:[],error:"http-".concat(e.status)}}async getLlmHosts(){return this.fetchJson("/v1/llm/hosts")}async setLlmHosts(e){return this.fetchJson("/v1/llm/hosts",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}async clearLlmHosts(){return this.fetchJson("/v1/llm/hosts",{method:"DELETE"})}async transcribeAudio(e,t){let s=new FormData;s.append("file",e,e.name),t&&s.append("language",t);let r=await fetch(this.url("/v1/audio/stt"),{method:"POST",headers:{...this.authHeaders()},body:s});if(401===r.status&&(0,n.Qb)("/v1/audio/stt"),!r.ok){let e="";try{e=await r.text()}catch(e){}throw Error("audio-stt http ".concat(r.status,": ").concat(e.slice(0,200)))}return await r.json()}async judgeRole(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s={prompt:e};t.backend&&(s.backend=t.backend),t.model&&(s.model=t.model);let r=await fetch(this.url("/v1/showroom/role-judge"),{method:"POST",headers:{"content-type":"application/json",...this.authHeaders()},body:JSON.stringify(s)});if(401===r.status&&(0,n.Qb)("/v1/showroom/role-judge"),!r.ok)throw Error("role-judge http ".concat(r.status));return await r.json()}showroomLayoutsEventsUrl(){return this.cfg.baseUrl?this.url("/v1/showroom/layouts/events"):null}personasEventsUrl(){return this.cfg.baseUrl?this.url("/v1/personas/events"):null}sessionStoreEventsUrl(){return this.cfg.baseUrl?"".concat(this.url("/v1/events"),"?topics=session."):null}async listLogs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new URLSearchParams(e).toString();return this.fetchJson("/v1/logs".concat(t?"?".concat(t):""))}async listProgressFrames(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this.listLogs({event:"headless.progress-frame",limit:String(e)})}logsStreamUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.cfg.baseUrl)return null;let t=new URLSearchParams(e).toString();return"".concat(this.url("/v1/logs/stream")).concat(t?"?".concat(t):"")}async listPersonas(){return this.fetchJson("/v1/personas")}async getRegistryCatalog(){return this.fetchJson("/v1/registry/catalog")}url(e){let t=this.cfg.baseUrl.replace(/\/$/,"");return"".concat(t).concat(e)}authHeaders(){return this.cfg.token?{authorization:"Bearer ".concat(this.cfg.token)}:{}}constructor(e){this.cfg=e,this.acpConnections=new Map,this.inflightTerminals=new Map}}class c{get ready(){return this.readyPromise}sendRaw(e,t){if("FAILED"===this.stateValue||"CLOSED"===this.stateValue||this.ws.readyState!==WebSocket.OPEN){var s;return Promise.reject(null!=(s=this.stateError)?s:Error("socket is ".concat(this.stateValue)))}let n=this.nextId++,r={jsonrpc:"2.0",id:n,method:e,params:t};return(0,a.cY)("webterm.acp.send",{method:e,id:n}),new Promise((e,t)=>{this.pending.set(n,{resolve:e,reject:t});try{this.ws.send(JSON.stringify(r)+"\n")}catch(e){this.pending.delete(n),t(e),this.closeIfUnused()}})}get readyState(){return this.ws.readyState}get state(){return this.stateValue}get isTerminal(){return"FAILED"===this.stateValue||"CLOSED"===this.stateValue}acquire(e){return this.leases+=1,new d(this,e)}subscribeSession(e){return this.sessionHandlers.add(e),()=>this.sessionHandlers.delete(e)}release(){if(this.leases=Math.max(0,this.leases-1),0===this.leases){if(this.pending.size>0)return void(0,a.cY)("webterm.acp.release-deferred",{pending:this.pending.size});this.closeIfUnused()}}closeIfUnused(){0!==this.leases||0!==this.pending.size||this.isTerminal||this.dispose(Error("ACP transport released"))}dispose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Error("ACP transport disposed");"CLOSED"!==this.stateValue&&this.transition("CLOSED",e),this.rejectPending(e),this.notifyTerminal(),this.ws.readyState!==WebSocket.CLOSED&&this.ws.readyState!==WebSocket.CLOSING&&this.ws.close()}onState(e){return this.stateHandlers.add(e),this.notifyStateHandler(e,this.stateValue,this.stateError),()=>this.stateHandlers.delete(e)}transition(e,t){(this.stateValue!==e||this.stateError!==t)&&(this.stateValue=e,t&&(this.stateError=t),this.stateHandlers.forEach(s=>this.notifyStateHandler(s,e,t)),(0,a.cY)("webterm.acp.state",{state:e,reason:null==t?void 0:t.message}))}notifyStateHandler(e,t,s){try{e(t,s)}catch(e){(0,a.cY)("webterm.acp.state-handler.error",{state:t,reason:String(e)})}}rejectPending(e){this.pending.forEach(t=>t.reject(e)),this.pending.clear()}notifyTerminal(){var e;this.terminalNotified||(this.terminalNotified=!0,null==(e=this.onTerminal)||e.call(this))}terminate(e,t){this.isTerminal||this.transition(t,e),this.rejectPending(e),this.notifyTerminal()}fail(e){this.terminate(e,"FAILED"),(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)&&this.ws.close()}async send(e,t){return await this.readyPromise.catch(()=>void 0),this.sendRaw(e,t)}on(e,t){let s=this.kindHandlers.get(e);return s||(s=new Set,this.kindHandlers.set(e,s)),s.add(t),()=>s.delete(t)}onAny(e){return this.anyHandlers.add(e),()=>this.anyHandlers.delete(e)}onRequest(e,t){let s=Symbol(e),n=this.requestHandlers.get(e);return n||(n=new Map,this.requestHandlers.set(e,n)),n.set(s,t),()=>{let t=this.requestHandlers.get(e);t&&(t.delete(s),0===t.size&&this.requestHandlers.delete(e))}}close(){this.release()}async handleInboundRequest(e,t,s,n){(0,a.cY)("webterm.acp.request.in",{method:t,id:e});try{let r=await n(s);this.sendResponse({jsonrpc:"2.0",id:e,result:r},t)}catch(n){let s=n instanceof Error?n.message:String(n);this.sendResponse({jsonrpc:"2.0",id:e,error:{code:-32603,message:"internal error: ".concat(s)}},t)}}sendErrorResponse(e,t,s){this.sendResponse({jsonrpc:"2.0",id:e,error:{code:t,message:s}},"error-response")}sendResponse(e,t){if("OPEN"!==this.stateValue||this.ws.readyState!==WebSocket.OPEN)return void(0,a.cY)("webterm.acp.request.response.drop",{method:t,id:e.id,state:this.stateValue});try{this.ws.send(JSON.stringify(e)+"\n")}catch(s){(0,a.cY)("webterm.acp.request.response.fail",{method:t,id:e.id,reason:String(s)})}}async waitOpen(){if(this.ws.readyState!==WebSocket.OPEN){if(this.ws.readyState===WebSocket.CLOSED||this.ws.readyState===WebSocket.CLOSING)throw Error("socket already closed");await new Promise((e,t)=>{let s=()=>{a(),this.transition("OPEN"),e()},n=()=>{a(),t(Error("socket open failed"))},r=()=>{a(),t(Error("socket closed before open"))},a=()=>{this.ws.removeEventListener("open",s),this.ws.removeEventListener("error",n),this.ws.removeEventListener("close",r)};this.ws.addEventListener("open",s),this.ws.addEventListener("error",n),this.ws.addEventListener("close",r)})}}onMessage(e){var t;let s,n,r=e.data;if("string"==typeof r)s=r;else if(r instanceof ArrayBuffer)s=new TextDecoder().decode(new Uint8Array(r));else{if("undefined"!=typeof Blob&&r instanceof Blob)return void r.text().then(t=>this.onMessage({...e,data:t}));s=""}try{n=JSON.parse(s)}catch(e){(0,a.cY)("webterm.acp.parse-error",{err:String(e),len:s.length});return}if(!n.kind&&n.method&&"session/update"===n.method&&(n.kind="sessionUpdate"),(0,a.cY)("webterm.acp.frame.in",{method:null!=(t=n.method)?t:"(notif)",kind:n.kind,id:n.id}),void 0!==n.id&&this.pending.has(n.id)){let e=this.pending.get(n.id);this.pending.delete(n.id),n.error?e.reject(Error(n.error.message)):e.resolve(n.result),queueMicrotask(()=>this.closeIfUnused())}else if(void 0!==n.id&&n.method&&this.requestHandlers.has(n.method)){let e=[...this.requestHandlers.get(n.method).values()].at(-1);e&&this.handleInboundRequest(n.id,n.method,n.params,e)}else void 0!==n.id&&n.method&&this.sendErrorResponse(n.id,-32601,"method not found: ".concat(n.method));if(n.kind){let e=this.kindHandlers.get(n.kind);null==e||e.forEach(e=>e(n))}this.anyHandlers.forEach(e=>e(n))}constructor(e,t,s,n){this.nextId=1,this.pending=new Map,this.kindHandlers=new Map,this.anyHandlers=new Set,this.requestHandlers=new Map,this.sessionHandlers=new Set,this.stateHandlers=new Set,this.leases=0,this.stateValue="CONNECTING",this.handshakeComplete=!1,this.terminalNotified=!1;let r=s?"".concat(e,"?session=").concat(encodeURIComponent(s)):e;(0,a.cY)("webterm.acp.connect",{url:r,hasToken:!!t,sessionId:s}),this.ws=t?new WebSocket(r,["bearer.".concat(t)]):new WebSocket(r),this.onTerminal=n,this.ws.binaryType="arraybuffer",this.ws.addEventListener("message",e=>this.onMessage(e)),this.ws.addEventListener("error",()=>{let e=Error(function(e,t){let s="unknown-host";try{s=new URL(t).host}catch(e){}return 0===e?"socket error before open — daemon unreachable or refused (".concat(s,")"):"socket error while open — connection dropped (".concat(s,")")}(this.ws.readyState,r));this.fail(e),(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)&&this.ws.close(),(0,a.cY)("webterm.acp.error",{reason:e.message})}),this.ws.addEventListener("close",e=>{var t;let s=e.reason?": ".concat(e.reason):"",n=null!=(t=this.stateError)?t:Error("socket closed: ".concat(e.code).concat(s));this.terminate(n,this.handshakeComplete?"CLOSED":"FAILED"),(0,a.cY)("webterm.acp.close",{code:e.code,reason:e.reason,handshakeComplete:this.handshakeComplete})}),this.readyPromise=(async()=>{await this.waitOpen();let e=await this.sendRaw("initialize",{protocolVersion:1,clientCapabilities:{fs:{readTextFile:!1,writeTextFile:!1},terminal:!1,_meta:{elanous:{ui:{showModal:!0,showToast:!0,updateStatusPill:!0,usage:!1},term:{terminalOutput:!0,terminalExit:!0,terminalFrame:!0},ask:{askUserQuestion:!0}}}}});(0,a.cY)("webterm.acp.initialize.done",{res:e});let t="";if(s)try{await this.sendRaw("session/load",{sessionId:s,cwd:"/",mcpServers:[]}),t=s,(0,a.cY)("webterm.acp.session-load.done",{sessionId:t})}catch(e){(0,a.cY)("webterm.acp.session-load.miss",{sessionId:s,reason:String(e)})}if(!t){var n;let e=await this.sendRaw("session/new",{cwd:"/",mcpServers:[]});t=null!=(n=null==e?void 0:e.sessionId)?n:"",(0,a.cY)("webterm.acp.session-new.done",{sessionId:t})}return t&&this.sessionHandlers.forEach(e=>{try{e(t)}catch(e){}}),this.handshakeComplete=!0,t})().catch(e=>{let t=e instanceof Error?e:Error(String(e));return this.fail(t),(0,a.cY)("webterm.acp.handshake-failed",{reason:t.message}),""})}}class d{track(e){return this.closed?(e(),()=>{}):(this.disposers.add(e),()=>{this.disposers.delete(e),e()})}get ready(){return this.core.ready}get readyState(){return this.core.readyState}get state(){return this.core.state}send(e,t){return this.closed?Promise.reject(Error("ACP lease released")):this.core.send(e,t)}on(e,t){return this.closed?()=>{}:this.track(this.core.on(e,t))}onAny(e){return this.closed?()=>{}:this.track(this.core.onAny(e))}onRequest(e,t){return this.closed?()=>{}:this.track(this.core.onRequest(e,t))}onState(e){return this.closed?()=>{}:this.track(this.core.onState(e))}close(){this.closed||(this.closed=!0,this.disposers.forEach(e=>e()),this.disposers.clear(),this.core.release())}constructor(e,t){this.core=e,this.closed=!1,this.disposers=new Set,t&&this.disposers.add(e.subscribeSession(t))}}function u(e){if(!e||"object"!=typeof e||Array.isArray(e))return null;let t=e.result,s=null===t||"object"!=typeof t||Array.isArray(t)?void 0:t,n=null==s?void 0:s._meta,r=null===n||"object"!=typeof n||Array.isArray(n)?void 0:n.ui,a=null===r||"object"!=typeof r||Array.isArray(r)?void 0:r.resourceUri,o=null==s?void 0:s["ui/resourceUri"],i="string"==typeof a?a:"string"==typeof o?o:void 0;return{id:e.id,name:e.name,ok:e.ok,...void 0!==e.summary?{summary:e.summary}:{},...void 0!==t?{rawOutput:t}:{},...void 0!==i?{resourceUri:i}:{},...void 0!==e.resultOmittedReason?{resultOmittedReason:e.resultOmittedReason}:{}}}function h(e){let t="message",s="";for(let n of e.split("\n"))if(n.startsWith("event:"))t=n.slice(6).trim();else if(n.startsWith("data:")){let e=n.slice(5);s+=e.startsWith(" ")?e.slice(1):e}if(!s)return null;try{return{event:t,data:JSON.parse(s)}}catch(e){return null}}async function p(e,t){let s=e.getReader(),n=new TextDecoder,r="",i=null,l=null;for(;;){let e,{value:w,done:b}=await s.read();if(b)break;for(r+=n.decode(w,{stream:!0});(e=r.indexOf("\n\n"))>=0;){var c,d,p,f,m,g,y,v;let s=r.slice(0,e);r=r.slice(e+2);let n=h(s);if(n)if("turn-begin"===n.event)null==(c=t.onTurnBegin)||c.call(t,n.data);else if("text-delta"===n.event)null==(d=t.onTextDelta)||d.call(t,n.data);else if("image-block"===n.event)null==(p=t.onImageBlock)||p.call(t,n.data);else if("tool-call"===n.event)null==(f=t.onToolCall)||f.call(t,n.data);else if("tool-result"===n.event){let e=u(n.data);e&&(null==(m=t.onToolResult)||m.call(t,e))}else"feedback"===n.event?(0,o.L)(n.data)?null==(g=t.onFeedback)||g.call(t,n.data):(0,a.cY)("webterm.sse.feedback.drop",{reason:"schema-mismatch"}):"turn-end"===n.event?(i=n.data,null==(y=t.onTurnEnd)||y.call(t,i)):"error"===n.event&&(l=n.data,null==(v=t.onError)||v.call(t,l))}}if(l){let e=l.message?": ".concat(l.message):"";throw Error("".concat(l.error).concat(e))}if(!i)throw Error("prompt/stream closed without turn-end");return i}async function f(e,t){let s=e.getReader(),n=new TextDecoder,r="";for(;;){let{value:e,done:y}=await s.read();if(y)break;let v=(r+=n.decode(e,{stream:!0})).indexOf("\n\n");for(;v>=0;){var i,l,c,d,p,f,m,g;let e=r.slice(0,v);r=r.slice(v+2);let s=h(e);if(v=r.indexOf("\n\n"),s&&"subscribed"!==s.event)if("turn-begin"===s.event)null==(i=t.onTurnBegin)||i.call(t,s.data);else if("text-delta"===s.event)null==(l=t.onTextDelta)||l.call(t,s.data);else if("image-block"===s.event)null==(c=t.onImageBlock)||c.call(t,s.data);else if("tool-call"===s.event)null==(d=t.onToolCall)||d.call(t,s.data);else if("tool-result"===s.event){let e=u(s.data);e&&(null==(p=t.onToolResult)||p.call(t,e))}else"feedback"===s.event?(0,o.L)(s.data)?null==(f=t.onFeedback)||f.call(t,s.data):(0,a.cY)("webterm.sse.feedback.observer-drop",{reason:"schema-mismatch"}):"turn-end"===s.event?null==(m=t.onTurnEnd)||m.call(t,s.data):"error"===s.event&&(null==(g=t.onError)||g.call(t,s.data))}}}let m={idle:null,working:"running",awaiting:"queued",done:"done",err:"error"};async function g(e,t,s){let n=e.getReader(),r=new TextDecoder,i="",l=new Map,c=e=>{var t;let s=(null!=(t=l.get(e))?t:0)+1;return l.set(e,s),s};for(;;){let{value:e,done:l}=await n.read();if(l)break;let d=(i+=r.decode(e,{stream:!0})).indexOf("\n\n");for(;d>=0;){let e=i.slice(0,d);d=(i=i.slice(d+2)).indexOf("\n\n");let n=h(e);if(!n||"agent.status"!==n.event)continue;let r=n.data;if(!r||"object"!=typeof r)continue;let l=r.detail;if(!l||"string"!=typeof l.agentId||"string"!=typeof l.status)continue;let u=m[l.status];if(null==u)continue;let p="".concat(t,":agent-status:").concat(l.agentId),f={envelopeVersion:1,sessionId:t,blockId:p,kind:"agent.status",phase:"update",emittedAt:"number"==typeof l.updatedAt?l.updatedAt:r.ts,seq:c(p),payload:{agentId:l.agentId,status:u,..."string"==typeof l.lastEvent?{lastEvent:l.lastEvent}:{}},asciiFallback:["".concat(l.agentId," ").concat(u).concat(l.lastEvent?" \xb7 "+l.lastEvent:"")]};if(!(0,o.L)(f)){(0,a.cY)("webterm.agent-status.synthesize.drop",{agentId:l.agentId,status:l.status});continue}s.onFeedback(f)}}}async function y(e,t,s){let n=e.getReader(),r=new TextDecoder,i="",l=new Map,c=e=>{var t;let s=(null!=(t=l.get(e))?t:0)+1;return l.set(e,s),s};for(;;){let{value:e,done:l}=await n.read();if(l)break;let u=(i+=r.decode(e,{stream:!0})).indexOf("\n\n");for(;u>=0;){var d;let e=i.slice(0,u);u=(i=i.slice(u+2)).indexOf("\n\n");let n=h(e);if(!n||"hud.segment"!==n.event)continue;let r=n.data;if(!r||"object"!=typeof r)continue;let l=r.detail;if(!l||"string"!=typeof l.key||!l.key)continue;let p="end"===l.phase?"end":"update",f="".concat(t,":hud:").concat(l.key),m={key:l.key};if("update"===p){if("string"!=typeof l.value){(0,a.cY)("webterm.hud-segment.synthesize.drop",{key:l.key,reason:"missing-value"});continue}m.value=l.value,"number"==typeof l.priority&&(m.priority=l.priority),"string"==typeof l.tone&&(m.tone=l.tone),"string"==typeof l.glyph&&(m.glyph=l.glyph)}else m.value="";let g={envelopeVersion:1,sessionId:t,blockId:f,kind:"hud.segment",phase:p,emittedAt:r.ts,seq:c(f),payload:m,asciiFallback:"update"===p&&"string"==typeof l.value?["".concat(null!=(d=l.glyph)?d:"").concat(l.glyph?" ":"").concat(l.value)]:[]};if(!(0,o.L)(g)){(0,a.cY)("webterm.hud-segment.synthesize.drop",{key:l.key,reason:"wire-guard"});continue}s.onFeedback(g)}}}},18068:(e,t,s)=>{s.d(t,{Qb:()=>o,SI:()=>l,dJ:()=>i});let n="elanous:auth-required",r=null,a=!1;function o(e){null===r&&(r=e,window.dispatchEvent(new CustomEvent(n,{detail:{path:e}})))}function i(e){let t=window,s=t=>e(t.detail);return t.addEventListener(n,s),null===r||a||e({path:r}),()=>t.removeEventListener(n,s)}function l(){a=!0}},59318:(e,t,s)=>{s.d(t,{L:()=>a});let n=new Set(["tool.progress","tool.diff","tool.search-hit","agent.status","agent.thinking","agent.plan","debug.line","perf.tick","hud.segment","mission.update","agent.chat-stream","media.image","media.video","media.job"]),r=new Set(["start","delta","update","end"]);function a(e){return null!==e&&"object"==typeof e&&1===e.envelopeVersion&&"string"==typeof e.sessionId&&!!e.sessionId&&"string"==typeof e.blockId&&!!e.blockId&&"string"==typeof e.kind&&!!n.has(e.kind)&&"string"==typeof e.phase&&!!r.has(e.phase)&&"number"==typeof e.emittedAt&&"number"==typeof e.seq&&!(e.seq<0)&&!!Array.isArray(e.asciiFallback)&&void 0!==e.payload&&null!==e.payload&&(void 0===e.parentToolCallId||"string"==typeof e.parentToolCallId)&&!0}},72215:(e,t,s)=>{let n;s.d(t,{cY:()=>d,x8:()=>i});let r={debug:0,info:1,warn:2,error:3},a="/v1/debug-logs/batch",o=null;function i(e){o=e}class l{health(){return{pending:this.queue.length,consecutiveFailures:this.consecutiveFailures,lastOkAt:this.lastOkAt,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches}}push(e){if(!(r[function(e){let t=e.slice(e.lastIndexOf(".")+1).toLowerCase();return/^(error|exception|crash|fail|failed)$/.test(t)?"error":/^(warn|degraded|timeout)$/.test(t)?"warn":/^(boot|ready|start|begin|open|ok|done|resolve|end|stop|close)$/.test(t)?"info":"debug"}(e.category)]<r[this.minLevel])){if(this.queue.push(e),this.queue.length>500){let e=this.queue.length-500;this.droppedByCap+=e,this.queue.splice(0,e)}if(this.queue.length>=100&&!this.inFlight){null!==this.timer&&(clearTimeout(this.timer),this.timer=null),this.flush();return}null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},this.flushMs))}}async flush(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.inFlight||0===this.queue.length)return;let e=this.queue.slice(0,100);this.inFlight=!0;let t=!1,s=JSON.stringify({records:e});try{var n,r;t=await (n=this.fetchFn(s),r=this.postTimeoutMs,new Promise((e,t)=>{let s=setTimeout(()=>t(Error("debug-forward timeout after ".concat(r,"ms"))),r);n.then(t=>{clearTimeout(s),e(t)},e=>{clearTimeout(s),t(e)})}))}catch(e){t=!1}finally{this.inFlight=!1}if(!t){if(this.consecutiveFailures+=1,this.consecutiveFailures>=2&&o)try{await o(JSON.stringify({records:[...e,this.blockedNotice()]}))&&(this.fallbackBatches+=1)}catch(e){}this.wasFailing=!0,this.scheduleRetry();return}let a=this.lastOkAt;this.lastOkAt=Date.now();let i=this.consecutiveFailures;this.consecutiveFailures=0,this.queue.splice(0,e.length),this.wasFailing&&(this.wasFailing=!1,this.queue.push({ts:new Date().toISOString(),category:"pwa.debug-forwarder.recovered",event:"recovered",data:{consecutiveFailures:i,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches,pending:this.queue.length,previousOkAt:a},source:{platform:"pwa"}})),this.queue.length>0&&null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},this.flushMs))}scheduleRetry(){if(null!==this.timer||0===this.queue.length)return;let e=Math.min(this.flushMs*2**this.consecutiveFailures,3e4);this.timer=setTimeout(()=>{this.flush()},e)}blockedNotice(){return{ts:new Date().toISOString(),category:"pwa.debug-forwarder.http-blocked",event:"http-blocked",data:{consecutiveFailures:this.consecutiveFailures,pending:this.queue.length,droppedByCap:this.droppedByCap,lastOkAt:this.lastOkAt,via:"acp-fallback"},source:{platform:"pwa"}}}beaconFlush(){if(0!==this.queue.length)try{if("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon){let e=this.queue.slice(0,100),t=new Blob([JSON.stringify({records:e})],{type:"application/json"});navigator.sendBeacon(a,t)&&this.queue.splice(0,e.length)}}catch(e){}}get pending(){return this.queue.length}constructor(e=c,t="debug",s=1e4,n=100){this.fetchFn=e,this.minLevel=t,this.postTimeoutMs=s,this.flushMs=n,this.queue=[],this.timer=null,this.inFlight=!1,this.consecutiveFailures=0,this.lastOkAt=null,this.droppedByCap=0,this.fallbackBatches=0,this.wasFailing=!1}}async function c(e){return(await fetch(a,{method:"POST",headers:{"content-type":"application/json"},body:e,keepalive:!0,..."undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.timeout?{signal:AbortSignal.timeout(1e4)}:{}})).ok}function d(e,t){if("undefined"==typeof console)return;let s=new Date().toISOString();if(void 0!==t){let n="";try{let e=new WeakSet;n=JSON.stringify(t,(t,s)=>{if("bigint"==typeof s)return"".concat(s.toString(),"n");if("function"==typeof s)return"[fn ".concat(s.name||"anon","]");if(s&&"object"==typeof s){if(e.has(s))return"[circular]";e.add(s)}return s})}catch(e){n="[unserializable: ".concat(String(e),"]")}n&&n.length>800&&(n=n.slice(0,797)+"..."),console.debug("[".concat(s,"] ").concat(e," ").concat(n),t),u(s,e,n)}else console.debug("[".concat(s,"] ").concat(e)),u(s,e,void 0)}function u(e,t,s){let r,a=function(){if(void 0!==n)return n;let e=function(){try{let e="off"!==window.localStorage.getItem("elanous.pwa.debug.forward"),t=window.localStorage.getItem("elanous.pwa.debug.forwardLevel");return{forward:e,level:"info"===t||"warn"===t||"error"===t?t:"debug"}}catch(e){return{forward:!0,level:"debug"}}}();if(!e.forward)return n=null,null;let t=new l(c,e.level,1e4,1500);try{window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t.beaconFlush()})}catch(e){}return n=t,t}();if(!a)return;let o=t.slice(t.lastIndexOf(".")+1)||t;if(void 0!==s&&""!==s)try{r=JSON.parse(s)}catch(e){r=s}a.push({ts:e,category:t,event:o,...void 0!==r?{data:r}:{},source:{platform:"pwa"}})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8085],{3448:(e,t,n)=>{n.d(t,{N7:()=>u,Np:()=>i,SR:()=>a,Ui:()=>l,Xn:()=>o,dv:()=>r,jv:()=>d,zJ:()=>c});let r="none",l="trigger-press",u="trigger-hover",i="outside-press",a="close-press",o="focus-out",d="escape-key",c="imperative-action"},8085:(e,t,n)=>{n.d(t,{p:()=>N});var r=n(46124),l=n(7169),u=n(24541),i=n(10517),a=n(20892),o=n(31491);let d=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({}),c={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},s={disabled:!1,...c},f={valid:e=>null===e?null:e?{[d.valid]:""}:{[d.invalid]:""}},v=r.createContext({invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:o.tE,disabled:void 0,touched:c.touched,setTouched:o.tE,dirty:c.dirty,setDirty:o.tE,filled:c.filled,setFilled:o.tE,focused:c.focused,setFocused:o.tE,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:s,markedDirtyRef:{current:!1},registerFieldControl:o.tE,validation:{getValidationProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.t0;return e},getInputValidationProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.t0;return e},inputRef:{current:null},commit:async()=>{}}});function g(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=r.useContext(v);if(t.setValidityData===o.tE&&!e)throw Error((0,a.A)(28));return t}let p=r.createContext({controlId:void 0,registerControlId:o.tE,labelId:void 0,setLabelId:o.tE,messageIds:[],setMessageIds:o.tE,getDescriptionProps:e=>e});function m(){return r.useContext(p)}var h=n(74264),E=n(94205),b=n(75796),R=n(56992),y=n(61034),w=n(3448),C=n(59957);let I=r.forwardRef(function(e,t){let{render:n,className:a,id:d,name:c,value:s,disabled:v=!1,onValueChange:p,defaultValue:I,autoFocus:D=!1,style:N,...P}=e,{state:S,name:V,disabled:k,setTouched:M,setDirty:T,validityData:x,setFocused:F,setFilled:B,validationMode:_,validation:j}=g(),A=k||v,K={...S,disabled:A},{labelId:U}=m(),L=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{id:t,implicit:n=!1,controlRef:u}=e,{controlId:a,registerControlId:d}=m(),c=(0,b.e)(t),s=n?a:void 0,f=(0,h.j)(()=>Symbol("labelable-control")),v=r.useRef(!1),g=r.useRef(null!=t),p=(0,i.K)(()=>{v.current&&d!==o.tE&&(v.current=!1,d(f.current,void 0))});return(0,l.g)(()=>{let e;if(d!==o.tE){if(n){let n=null==u?void 0:u.current;e=(0,E.vq)(n)&&null!=n.closest("label")?null!=t?t:null:null!=s?s:c}else if(null!=t)g.current=!0,e=t;else{if(!g.current)return void p();e=c}if(void 0===e)return void p();v.current=!0,d(f.current,e)}},[t,u,s,d,n,c,f,p]),r.useEffect(()=>p,[p]),null!=a?a:c}({id:d});(0,l.g)(()=>{var e;let t=null!=s;(null==(e=j.inputRef.current)?void 0:e.value)||t&&""!==s?B(!0):t&&""===s&&B(!1)},[j.inputRef,B,s]);let O=r.useRef(null);(0,l.g)(()=>{D&&O.current===(0,C.RS)((0,u.R)(O.current))&&F(!0)},[D,F]);let[q]=function(e){let{controlled:t,default:n,name:l,state:u="value"}=e,{current:i}=r.useRef(void 0!==t),[a,o]=r.useState(n),d=r.useCallback(e=>{i||o(e)},[]);return[i?t:a,d]}({controlled:s,default:I,name:"FieldControl",state:"value"}),z=void 0!==s,J=z?q:void 0,W=(0,i.K)(()=>{var e;return null==(e=j.inputRef.current)?void 0:e.value});return!function(e,t){let{enabled:n=!0,getValue:u,id:i,value:a}=t,{registerFieldControl:o}=g(),d=r.useRef(null);d.current||(d.current=Symbol()),(0,l.g)(()=>{let t=d.current;if(t&&n)return o(t,{controlRef:e,getValue:u,id:i,value:a}),()=>{o(t,void 0)}},[e,n,u,i,o,a])}(j.inputRef,{id:L,value:J,getValue:W}),(0,R.o)("input",e,{ref:[t,O],state:K,props:[{id:L,disabled:A,name:null!=V?V:c,ref:j.inputRef,"aria-labelledby":U,autoFocus:D,...z?{value:J}:{defaultValue:I},onChange(e){let t=e.currentTarget.value;null==p||p(t,(0,y.d)(w.dv,e.nativeEvent)),T(t!==x.initialValue),B(""!==t)},onFocus(){F(!0)},onBlur(e){M(!0),F(!1),"onBlur"===_&&j.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(M(!0),j.commit(e.currentTarget.value))}},j.getInputValidationProps(),P],stateAttributesMapping:f})});var D=n(55539);let N=r.forwardRef(function(e,t){return(0,D.jsx)(I,{ref:t,...e})})},24541:(e,t,n)=>{n.d(t,{R:()=>r});function r(e){return e?.ownerDocument||document}},47150:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(46124);let l={...n.t(r,2)},u=0,i=l.useId;function a(e,t){if(void 0!==i){let n=i();return null!=e?e:t?"".concat(t,"-").concat(n):n}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mui",[n,l]=r.useState(e),i=e||n;return r.useEffect(()=>{null==n&&(u+=1,l("".concat(t,"-").concat(u)))},[n,t]),i}(e,t)}},59957:(e,t,n)=>{n.d(t,{EW:()=>i,RS:()=>l,gR:()=>u});var r=n(94205);function l(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function u(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&(0,r.Ng)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function i(e){return"composedPath"in e?e.composedPath()[0]:e.target}},61034:(e,t,n)=>{n.d(t,{d:()=>l});var r=n(31491);function l(e,t,n,l){let u=!1,i=!1,a=l??r.t0;return{reason:e,event:t??new Event("base-ui"),cancel(){u=!0},allowPropagation(){i=!0},get isCanceled(){return u},get isPropagationAllowed(){return i},trigger:n,...a}}},75796:(e,t,n)=>{n.d(t,{e:()=>l});var r=n(47150);function l(e){return(0,r.B)(e,"base-ui")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8401],{2021:(e,t,n)=>{n.d(t,{F:()=>d});var r=n(55539);n(46124);var a=n(245),s=n(48105),l=n(66901),o=n(83001),i=n(4333),c=n(44373);function d(e){let{className:t,children:n,...o}=e;return(0,r.jsxs)(a.V,{"data-slot":"scroll-area",className:(0,c.cn)("relative",t),...o,children:[(0,r.jsx)(s.B,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:n}),(0,r.jsx)(u,{}),(0,r.jsx)(l.I,{})]})}function u(e){let{className:t,orientation:n="vertical",...a}=e;return(0,r.jsx)(o.V,{"data-slot":"scroll-area-scrollbar","data-orientation":n,orientation:n,className:(0,c.cn)("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",t),...a,children:(0,r.jsx)(i.l,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}},9851:(e,t,n)=>{n.d(t,{V:()=>P});var r=n(55539),a=n(46124),s=n(85535),l=n(69147),o=n(94226),i=n(16190),c=n(87433),d=n(67327),u=n(9734),m=n(8114),p=n(65194),f=n(44373),x=n(53314),h=n(71633),g=n(36485),b=n(76573),v=n(25042),j=n(15151),y=n(72215),w=n(46923);function k(e){let{open:t,image:n,filename:s="photo.jpg",onClose:l}=e,{config:o}=(0,j.Q)(),[i,c]=(0,a.useState)("idle"),[m,p]=(0,a.useState)(""),[f,x]=(0,a.useState)("minimal"),[h,g]=(0,a.useState)("minimal"),k=(0,w.hn)(),[N,S]=(0,a.useState)(k.defaultUseLlmVision),[I,C]=(0,a.useState)(k.defaultPreferHandwriting),[D,E]=(0,a.useState)(""),[L,R]=(0,a.useState)(""),[A,T]=(0,a.useState)("");async function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:I;if(!n)return;if(!o.baseUrl){R("Daemon URL 미설정 — Settings 에서 입력"),c("error");return}c("ocr"),R("");let a=new FormData;a.append("image",n,s),a.append("polishMode",e);let l=[];t&&l.push("context-aware","diagrams"),r&&l.push("handwriting"),l.length>0&&a.append("strengths",l.join(",")),(0,y.cY)("notes.ocr.start",{polishMode:e,vision:t,handwriting:r,filename:s,size:n.size});try{let t=await fetch("".concat(o.baseUrl,"/v1/notes/from-image"),{method:"POST",body:a,...o.token?{headers:{authorization:"Bearer ".concat(o.token)}}:{}});if(!t.ok){let e=await t.text().catch(()=>"");R("OCR 실패 (HTTP ".concat(t.status,") ").concat(e.slice(0,160))),c("error"),(0,y.cY)("notes.ocr.error",{status:t.status,detail:e.slice(0,200)});return}let n=await t.json(),r=n.usedLlmPolish?n.polishMode:"minimal";if(0===n.markdown.trim().length){R(n.usedLlmPolish?"이미지에서 텍스트를 추출하지 못했습니다. 다른 사진으로 다시 시도해주세요.":"이미지에서 텍스트를 추출하지 못했습니다. 다른 사진을 사용하거나 polishMode를 'enrich'로 바꾸어 LLM polish를 시도해주세요."),x(n.polishMode),g(r),E(n.provider),c("error"),(0,y.cY)("notes.ocr.empty",{provider:n.provider,requested:e,applied:r,usedLlmPolish:n.usedLlmPolish});return}p(n.markdown),T(n.markdown),E(n.provider),x(n.polishMode),g(r),c("review"),(0,y.cY)("notes.ocr.ok",{provider:n.provider,requested:e,applied:r,usedLlmPolish:n.usedLlmPolish,chars:n.markdown.length})}catch(e){R("OCR 실패: ".concat(String(e instanceof Error?e.message:e))),c("error"),(0,y.cY)("notes.ocr.exception",{reason:String(e)})}}async function U(){if(!o.baseUrl){R("Daemon URL 미설정"),c("error");return}let e=m!==A;c("saving"),(0,y.cY)("notes.save.start",{provider:D,selectedPolishMode:f,appliedPolishMode:h,edited:e,chars:m.length}),e&&O("edit");try{let e=await fetch("".concat(o.baseUrl,"/v1/notes/save"),{method:"POST",headers:{"content-type":"application/json",...o.token?{authorization:"Bearer ".concat(o.token)}:{}},body:JSON.stringify({markdown:m,sourceProvider:D,polishMode:h})});if(!e.ok){let t=await e.text().catch(()=>"");R("저장 실패 (HTTP ".concat(e.status,") ").concat(t.slice(0,160))),c("error"),(0,y.cY)("notes.save.error",{status:e.status,detail:t.slice(0,200)});return}let t=await e.json();c("saved"),d.oR.success("\uD83D\uDCDD 저장됨 — ".concat(t.vaultLabel," \xb7 ").concat(t.knowledgeId)),(0,y.cY)("notes.save.ok",{knowledgeId:t.knowledgeId,vaultLabel:t.vaultLabel}),setTimeout(l,400)}catch(e){R("저장 실패: ".concat(String(e instanceof Error?e.message:e))),c("error"),(0,y.cY)("notes.save.exception",{reason:String(e)})}}function O(e){o.baseUrl&&fetch("".concat(o.baseUrl,"/v1/metrics/notes-event"),{method:"POST",headers:{"content-type":"application/json",...o.token?{authorization:"Bearer ".concat(o.token)}:{}},body:JSON.stringify({type:e,polishMode:f})}).catch(()=>{})}function P(){let e=m!==A;(0,y.cY)("notes.cancel",{phase:i,edited:e,chars:m.length}),O("cancel"),e&&"review"===i&&O("discard"),l()}return(0,a.useEffect)(()=>{if(!t){c("idle"),p(""),T(""),E(""),R(""),x("minimal"),g("minimal");let e=(0,w.hn)();S(e.defaultUseLlmVision),C(e.defaultPreferHandwriting)}},[t]),(0,a.useEffect)(()=>{t&&n&&"idle"===i&&M(f)},[t,n]),(0,r.jsx)(v.lG,{open:t,onOpenChange:e=>{e||P()},children:(0,r.jsxs)(v.Cf,{className:"sm:max-w-lg",children:[(0,r.jsxs)(v.c7,{children:[(0,r.jsx)(v.L3,{children:"사진 → 마크다운 노트"}),(0,r.jsx)(v.rr,{children:"OCR 로 추출한 본문을 검토 + 편집 후 저장합니다."})]}),"ocr"===i&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-muted-foreground",children:[(0,r.jsx)(b.A,{className:"h-4 w-4 animate-spin"}),(0,r.jsx)("span",{children:"OCR 인식 중…"})]}),"saving"===i&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-muted-foreground",children:[(0,r.jsx)(b.A,{className:"h-4 w-4 animate-spin"}),(0,r.jsx)("span",{children:"저장 중…"})]}),"saved"===i&&(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-emerald-600",children:"✓ 저장 완료"}),"error"===i&&(0,r.jsxs)("div",{className:"space-y-3 py-4",children:[(0,r.jsx)("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:L}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(u.$,{variant:"ghost",onClick:P,children:"닫기"}),n&&(0,r.jsx)(u.$,{onClick:()=>M(f),children:"다시 시도"})]})]}),"review"===i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,r.jsxs)("span",{children:["provider: ",(0,r.jsx)("code",{children:D||"?"})]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("label",{className:"flex items-center gap-1",children:["polish:",(0,r.jsxs)("select",{value:f,onChange:e=>{let t=e.target.value;x(t),t!==h&&M(t)},className:"rounded border border-input bg-background px-1 py-0.5","aria-label":"polish mode",children:[(0,r.jsx)("option",{value:"minimal",children:"minimal (raw)"}),(0,r.jsx)("option",{value:"enrich",children:"enrich (polished)"})]})]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("label",{className:"flex items-center gap-1",title:"LLM 비전 우선시 — 더 정확하지만 느림 + 비쌈",children:[(0,r.jsx)("input",{type:"checkbox",checked:N,onChange:e=>{let t=e.target.checked;S(t),M(f,t,I)},"aria-label":"prefer LLM vision"}),"LLM 비전"]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("label",{className:"flex items-center gap-1",title:"손글씨 우선시 — handwriting strength 추가 (registry 점수 boost)",children:[(0,r.jsx)("input",{type:"checkbox",checked:I,onChange:e=>{let t=e.target.checked;C(t),M(f,N,t)},"aria-label":"prefer handwriting"}),"손글씨"]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("span",{"data-testid":"notes-applied-polish",children:["applied: ",(0,r.jsx)("code",{children:h}),"enrich"===f&&"minimal"===h&&(0,r.jsx)("span",{className:"ml-1 text-amber-600",children:"(LLM polish 비활성)"})]}),(0,r.jsx)(u.$,{type:"button",variant:"ghost",size:"sm",className:"ml-auto text-xs",onClick:()=>M(f),"aria-label":"re-run OCR",children:"Re-OCR"})]}),(0,r.jsx)("textarea",{value:m,onChange:e=>p(e.target.value),rows:12,placeholder:"markdown 본문…","aria-label":"markdown editor",className:"w-full resize-y rounded-md border border-input bg-background px-3 py-2 font-mono text-xs shadow-xs focus:outline-none focus:ring-2 focus:ring-ring"})]}),(0,r.jsxs)(v.Es,{children:[(0,r.jsx)(u.$,{variant:"outline",onClick:P,children:"취소"}),(0,r.jsx)(u.$,{onClick:()=>void U(),disabled:0===m.trim().length,children:"저장"})]})]})]})})}function N(){let e=(0,a.useRef)(null),[t,n]=(0,a.useState)(!1),[s,l]=(0,a.useState)(null),[o,i]=(0,a.useState)("photo.jpg");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>{var t;return null==(t=e.current)?void 0:t.click()},"aria-label":"save photo as note",title:"사진 → 마크다운 노트로 저장",className:"rounded p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground",children:(0,r.jsx)(g.A,{className:"h-3.5 w-3.5"})}),(0,r.jsx)("input",{ref:e,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:function(e){var t;let r=null==(t=e.target.files)?void 0:t[0];e.target.value="",r&&(l(r),i(r.name),n(!0))}}),(0,r.jsx)(k,{open:t,image:s,filename:o,onClose:function(){n(!1),l(null)}})]})}var S=n(37100),I=n(56540);function C(){var e,t,n;let{client:s}=(0,j.Q)(),[l,o]=(0,a.useState)([]),[i,c]=(0,a.useState)(""),[u,m]=(0,a.useState)(!1),p=(0,a.useCallback)(async()=>{try{var e,t;let n=await s.fetchJson("/v1/setup/llm-providers");o(null!=(e=n.providers)?e:[]),c(null!=(t=n.activeProvider)?t:"")}catch(e){}},[s]);(0,a.useEffect)(()=>{p()},[p]);let f=l.filter(e=>"apiKey"===e.flow&&e.hasSavedKey||"auto"===e.flow),x=(0,a.useCallback)(async()=>{if(u||0===f.length)return;let e=f.findIndex(e=>e.provider===i),t=f[(e+1)%f.length];if(t.provider!==i||1!==f.length){m(!0);try{let e=await s.fetchJson("/v1/setup/llm-provider",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({provider:t.provider})});if(e&&e.error)d.oR.error("provider 전환 실패: ".concat(e.error));else{var n,r;c(null!=(r=null==e||null==(n=e.active)?void 0:n.provider)?r:t.provider)}}catch(e){d.oR.error("provider 전환 실패: ".concat(e instanceof Error?e.message:e))}finally{m(!1)}}},[u,f,i,s]);if(0===f.length)return null;let h=null!=(n=null!=(t=null==(e=l.find(e=>e.provider===i))?void 0:e.label)?t:i)?n:f[0].label;return(0,r.jsx)("button",{type:"button",onClick:()=>void x(),disabled:u||f.length<2,className:"rounded-full border border-border bg-card px-2 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground disabled:opacity-60",title:f.length<2?"LLM provider: ".concat(h):"클릭하면 다음 provider 로 순환 (현재 ".concat(h,")"),children:h})}var D=n(51281),E=n(18060);function L(e){let{seats:t,selected:n,onSelect:a,disabled:s}=e;return 0===t.length?null:(0,r.jsx)("div",{className:"mb-2 flex flex-wrap items-center gap-1.5","aria-label":"요청할 자리",children:t.map(e=>(0,r.jsx)("button",{type:"button",disabled:s,"aria-pressed":n===e.id,onClick:()=>a(n===e.id?null:e.id),className:(0,f.cn)("rounded-full border px-2.5 py-1 text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",n===e.id?"border-accent bg-accent/15 font-semibold text-foreground":"border-border text-muted-foreground hover:bg-muted",s&&"opacity-60"),children:e.title},e.id))})}let R=[],A="elanous.seat-ask.client",T=null;function M(e){return/^\s*CTO\s*에게\s*물어봐(?:\s*[::]\s*|\s+)\S/i.test(e)}let U="elanous.pwa.chat.promptHistory.v1";function O(e,t){let n=e.lastIndexOf(t);if(n<0)return null;let r=e.slice(n+1);if(/[\s]/.test(r))return null;if(n>0){let t=e[n-1];if(!/\s/.test(t))return null}return r}function P(e){let{onSubmit:t,disabled:n,attachments:g=R,onAttached:b,onRemoveAttachment:v,tabId:w,voice:k,onListFiles:P,onListSkills:_,prefill:F}=e,{client:z,config:Y}=(0,j.Q)(),[q,H]=(0,a.useState)([]),[J,$]=(0,a.useState)(null),[K,B]=(0,a.useState)([]),[V,W]=(0,a.useState)([]),Q=(0,a.useRef)(null);Q.current||(Q.current=function(){let e=null;try{e=window.sessionStorage.getItem(A)}catch(e){}try{var t,n;null!=e||(e=null!=(n=null==(t=/(?:^|; )elanous\.seat-ask\.client=([a-f0-9-]{36})(?:;|$)/i.exec(document.cookie))?void 0:t[1])?n:null)}catch(e){}null!=e||(e=null!=T?T:crypto.randomUUID()),T=e;try{window.sessionStorage.setItem(A,e)}catch(e){}try{document.cookie="".concat(A,"=").concat(e,"; Path=/; SameSite=Lax; Max-Age=2592000")}catch(e){}return e}()),(0,a.useEffect)(()=>{if("function"!=typeof(null==z?void 0:z.listSeatAskAnswers))return()=>{};let e=!0;if(!Q.current)return()=>{e=!1};let t=!1;try{var n;let e=JSON.parse(null!=(n=window.sessionStorage.getItem("elanous.seat-ask.messages"))?n:"[]");e.length&&W(t=>[...t.filter(t=>{let{id:n}=t;return!e.some(e=>e.id===n)}),...e])}catch(e){}let r=async()=>{if(!t){t=!0;try{let{items:t}=await z.listSeatAskAnswers(Q.current);if(!e||!t.length)return;let r=t.map(e=>{let{id:t,text:n}=e;return{id:t,text:n}});W(e=>[...e,...r.filter(t=>{let{id:n}=t;return!e.some(e=>e.id===n)})]);try{var n;let a=JSON.parse(null!=(n=window.sessionStorage.getItem("elanous.seat-ask.messages"))?n:"[]"),s=[...a,...r.filter(e=>{let{id:t}=e;return!a.some(e=>e.id===t)})];window.sessionStorage.setItem("elanous.seat-ask.messages",JSON.stringify(s)),e&&await z.acknowledgeSeatAskAnswers(Q.current,t.map(e=>{let{id:t}=e;return t}))}catch(e){}}catch(e){}finally{t=!1}}},a=setInterval(r,1e4);return r(),()=>{e=!1,clearInterval(a)}},[z]);let[G,Z]=(0,a.useState)(""),[X,ee]=(0,a.useState)(!1),et=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=!0;return"function"!=typeof(null==z?void 0:z.listSeatRequests)?()=>{e=!1}:(z.listSeatRequests().then(t=>{e&&H(t.seats)}).catch(()=>{}),()=>{e=!1})},[z]);let en=(0,I.o1)("chatInput",w),[er,ea]=(0,a.useState)(()=>{let e=(0,I.N2)(en);return"string"==typeof e?e:""}),[es,el]=(0,a.useState)(()=>(function(){try{let e=window.localStorage.getItem(U);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e)}catch(e){return[]}})()),[eo,ei]=(0,a.useState)(-1),ec=(0,a.useRef)(""),ed=!er.startsWith("/")||/\s/.test(er)?null:er.slice(1),eu=null!==ed?function(e){let t=e.trim().toLowerCase();return 0===t.length?m.bK:m.bK.filter(e=>e.name.toLowerCase().startsWith(t))}(ed):[],[em,ep]=(0,a.useState)(0);(0,a.useEffect)(()=>{ep(0)},[ed]);let ef=P?O(er,"@"):null,[ex,eh]=(0,a.useState)([]),[eg,eb]=(0,a.useState)(""),[ev,ej]=(0,a.useState)(0);(0,a.useEffect)(()=>{if(null===ef||!P)return;ej(0);let e=setTimeout(()=>{P(ef).then(e=>{eh(e.entries),eb(e.cwd)}).catch(()=>{})},200);return()=>clearTimeout(e)},[ef,P]),(0,a.useEffect)(()=>{null===ef&&(eh([]),eb(""),ej(0))},[ef]);let[ey,ew]=(0,a.useState)(!1),[ek,eN]=(0,a.useState)(0),eS=(0,a.useRef)(""),eI=ey?0===er.trim().length?es:es.filter(e=>e.toLowerCase().includes(er.trim().toLowerCase())):[],eC=()=>{ea(eS.current),ew(!1),eN(0),eS.current=""},eD=_?O(er,"$"):null,[eE,eL]=(0,a.useState)([]),[eR,eA]=(0,a.useState)(0),[eT,eM]=(0,a.useState)(D.kv);(0,a.useEffect)(()=>(eM((0,D.Vm)()),(0,D.$L)(eM)),[]);let{prediction:eU,predict:eO,clear:eP}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{baseUrl:t,token:n,enabled:r=!0,debounceMs:s=300}=e,[l,o]=(0,a.useState)(null),[i,c]=(0,a.useState)(!1),[d,u]=(0,a.useState)(null),m=(0,a.useRef)(null),p=(0,a.useRef)(null),f=(0,a.useCallback)(()=>{m.current&&(clearTimeout(m.current),m.current=null),p.current&&(p.current.abort(),p.current=null)},[]),x=(0,a.useCallback)(()=>{f(),o(null),u(null)},[f]),h=(0,a.useCallback)(function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(f(),!r||!t||0===e.trim().length&&0===a.length)return void o(null);m.current=setTimeout(async()=>{m.current=null;let r=new AbortController;p.current=r,c(!0);try{let s="".concat(t,"/v1/llm/route/predict"),l={"Content-Type":"application/json"};n&&n.length>0&&(l.Authorization="Bearer ".concat(n));let i=await fetch(s,{method:"POST",headers:l,body:JSON.stringify({text:e,attachments:a.map(e=>({kind:e}))}),signal:r.signal});if(r.signal.aborted)return;if(!i.ok)return void u("http-".concat(i.status));let c=await i.json();o(c),u(null)}catch(e){if(r.signal.aborted)return;u(e instanceof Error?e.message:String(e))}finally{p.current===r&&(p.current=null),c(!1)}},s)},[t,n,r,s,f]);return(0,a.useEffect)(()=>()=>f(),[f]),{prediction:l,inflight:i,error:d,predict:h,clear:x}}({baseUrl:Y.baseUrl,token:Y.token,enabled:eT.autoRouting});(0,a.useEffect)(()=>{if(!eT.autoRouting)return void eP();eO(er,g.map(e=>{var t;return(null==(t=e.mediaType)?void 0:t.startsWith("image/"))?"image":"document"}))},[er,eT.autoRouting,g,eO,eP]),(0,a.useEffect)(()=>{if(null===eD||!_)return;eA(0);let e=setTimeout(()=>{_(eD).then(e=>{eL(e.entries)}).catch(()=>{})},200);return()=>clearTimeout(e)},[eD,_]),(0,a.useEffect)(()=>{null===eD&&(eL([]),eA(0))},[eD]),(0,a.useEffect)(()=>{let e=(0,p.ht)();e&&(ea(e),d.oR.success("\uD83D\uDCE5 공유 받음 — 검토 후 보내세요"))},[]),(0,a.useEffect)(()=>{F&&(ea(F.text),(0,p.ht)())},[F]);let e_=(0,a.useRef)(null);(0,a.useEffect)(()=>(e_.current&&clearTimeout(e_.current),e_.current=setTimeout(()=>{0===er.length?(0,I.yd)(en):(0,I.Os)(en,er)},300),()=>{e_.current&&clearTimeout(e_.current)}),[er,en]);let eF=async e=>{ee(!0),Z("");try{if(M(e.text)){let t=await z.submitSeatAsk(e.text,Q.current);W(e=>[...e,{id:crypto.randomUUID(),text:t.reply}]),ea(""),(0,I.yd)(en);return}let t=await z.submitSeatRequest({seat:e.seat,text:e.text,...e.attachments.length?{attachments:e.attachments}:{}},e.key);for(let n of((0,y.cY)("pwa.seat-request.sent",{seat:t.seat,attachments:e.attachments.length}),B(e=>[...e,t]),et.current=null,e.attachments))null==v||v(n.id);ea(""),(0,I.yd)(en)}catch(t){et.current=e,t instanceof E.J_&&"unknown-seat"===t.code?(H(t.seats),J&&!t.seats.some(e=>e.id===J)&&($(null),et.current=null),Z("그 자리를 찾지 못했습니다 — ".concat(t.seats.map(e=>e.title).join(", ")))):t instanceof E.J_&&"attachments-unsupported"===t.code?Z("이 자리는 첨부를 받지 않습니다"):t instanceof E.J_&&"unknown-attachment"===t.code?Z("첨부가 만료됐습니다 — 다시 올려 주세요"):Z("접수하지 못했습니다 — 잠시 뒤 다시")}finally{ee(!1)}},ez=()=>eY(er),eY=e=>{if(n||X)return;let r=e.trim();if(M(r))return g.length?void Z("질문에는 첨부를 넣을 수 없습니다"):void eF({seat:"TC",text:r,attachments:[],key:crypto.randomUUID()});let a=/^@\S+\s+[\s\S]*\S$/.test(e.trimEnd());if((a||J)&&g.length>4)return void Z("자리 요청 첨부는 4개까지");if(J&&!r&&g.length)return void Z("자리 요청 내용을 입력해 주세요");if((a||J)&&r){let e=a?{text:r,attachments:[...g],key:crypto.randomUUID()}:{seat:J,text:r,attachments:[...g],key:crypto.randomUUID()},t=et.current;eF(t&&t.seat===e.seat&&t.text===e.text&&t.attachments.length===e.attachments.length&&t.attachments.every((t,n)=>{var r;return t.id===(null==(r=e.attachments[n])?void 0:r.id)})?t:e);return}(r||0!==g.length)&&(r.length>0&&(el(e=>{if(e[0]===r)return e;let t=[r,...e].slice(0,50);try{window.localStorage.setItem(U,JSON.stringify(t))}catch(e){}return t}),ei(-1),ec.current=""),t(r),ea(""),(0,I.yd)(en))},eq=e=>{let t=er.lastIndexOf("@");if(t<0)return;let n=er.slice(0,t),r=e.isDir?"".concat(e.relPath,"/"):e.relPath;ea("".concat(n,"@").concat(r).concat(e.isDir?"":" "))},eH=e=>{let t=er.lastIndexOf("$");if(t<0)return;let n=er.slice(0,t).trim();ea("/run-skill ".concat(e.name," ").concat(n?"".concat(n," "):""))},eJ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eu[Math.min(Math.max(em,0),eu.length-1)];e&&ea(":".concat(e.name," "))};(0,a.useEffect)(()=>{!(eo<0)&&es[eo]&&er!==es[eo]&&(ei(-1),ec.current="")},[er]);let e$=(0,m.FM)(er);return(0,r.jsxs)("div",{className:"border-t border-border bg-background p-3",children:[K.map(e=>{var t,n;return(0,r.jsxs)("div",{role:"status",className:"mb-2 rounded-md border border-border bg-card px-3 py-2 text-sm",children:["\uD83D\uDCE8 ",null!=(n=null==(t=q.find(t=>t.id===e.seat))?void 0:t.title)?n:e.seat," 접수 ",e.receiptId," \xb7 방금 \xb7 받음",e.attachments?" \xb7 첨부 ".concat(e.attachments):"",e.channel?" \xb7 채널 ".concat(e.channel):""]},e.receiptId)}),V.map(e=>(0,r.jsx)("p",{role:"status",className:"mb-2 rounded-md border border-border px-3 py-2 text-sm",children:e.text},e.id)),G&&(0,r.jsx)("p",{role:"alert",className:"mb-2 text-sm text-destructive",children:G}),(0,r.jsx)(L,{seats:q,selected:J,onSelect:e=>{$(e),Z("")},disabled:n||X}),ey&&(0,r.jsxs)("div",{className:"mb-2 overflow-hidden rounded-md border border-border bg-card shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsx)("span",{children:"\uD83D\uDD0E reverse-i-search"}),(0,r.jsxs)("span",{className:"text-xs font-semibold",children:[eI.length," match",1===eI.length?"":"es"]})]}),0===eI.length?(0,r.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:0===er.length?"history 가 비어 있음":"일치 없음 — '".concat(er,"'")}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("ul",{className:"divide-y divide-border",children:eI.slice(0,8).map((e,t)=>{let n=t===ek;return(0,r.jsx)("li",{role:"button",tabIndex:-1,onMouseDown:n=>{n.preventDefault(),eN(t),requestAnimationFrame(()=>{ew(!1),eS.current="",ea(e)})},className:(0,f.cn)("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm",n?"bg-accent/15 font-semibold":"hover:bg-accent/8"),children:(0,r.jsx)("span",{className:"line-clamp-2",children:e})},"".concat(e,"-").concat(t))})}),eI.length>8&&(0,r.jsxs)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground",children:["+ ",eI.length-8," more (refine query)"]})]})]}),null!==ef&&ex.length>0&&(0,r.jsxs)("div",{className:"mb-2 overflow-hidden rounded-md border border-border bg-card shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsxs)("span",{title:eg,children:["\uD83D\uDCC1 ",eg.length>48?"…"+eg.slice(-45):eg]}),(0,r.jsx)("span",{className:"text-xs font-semibold",children:ex.length})]}),(0,r.jsx)("ul",{className:"divide-y divide-border",children:ex.slice(0,12).map((e,t)=>{let n=t===ev;return(0,r.jsxs)("li",{role:"button",tabIndex:-1,onMouseDown:n=>{n.preventDefault(),ej(t),requestAnimationFrame(()=>eq(e))},className:(0,f.cn)("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm",n?"bg-accent/15":"hover:bg-accent/8"),children:[(0,r.jsx)("span",{className:"text-xs",children:e.isDir?"\uD83D\uDCC2":"\uD83D\uDCC4"}),(0,r.jsxs)("span",{className:(0,f.cn)("font-mono",n?"font-semibold":"font-normal"),children:[e.name,e.isDir?"/":""]}),e.isDir&&(0,r.jsx)("span",{className:"ml-auto text-[10px] uppercase text-muted-foreground",children:"dir"})]},e.relPath)})}),ex.length>12&&(0,r.jsxs)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground",children:["+ ",ex.length-12," more (refine query)"]})]}),null!==eD&&eE.length>0&&(0,r.jsxs)("div",{className:"mb-2 overflow-hidden rounded-md border border-border bg-card shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsx)("span",{children:"✨ skills"}),(0,r.jsx)("span",{className:"text-xs font-semibold",children:eE.length})]}),(0,r.jsx)("ul",{className:"divide-y divide-border",children:eE.map((e,t)=>{let n=t===eR;return(0,r.jsxs)("li",{role:"button",tabIndex:-1,onMouseDown:n=>{n.preventDefault(),eA(t),requestAnimationFrame(()=>eH(e))},className:(0,f.cn)("flex cursor-pointer flex-col gap-0.5 px-3 py-1.5",n?"bg-accent/15":"hover:bg-accent/8"),children:[(0,r.jsx)("span",{className:(0,f.cn)("font-mono text-sm",n?"font-semibold":"font-normal"),children:e.name}),e.description.length>0&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:e.description})]},e.name)})})]}),null!==ed&&(0,r.jsxs)("div",{className:"mb-2 overflow-hidden rounded-md border border-border bg-card shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsx)("span",{children:"slash commands"}),(0,r.jsx)("span",{className:"text-xs font-semibold",children:eu.length})]}),0===eu.length?(0,r.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:"일치하는 명령 없음"}):(0,r.jsx)("ul",{className:"divide-y divide-border",children:eu.map((e,t)=>{let n=t===em;return(0,r.jsxs)("li",{role:"button",tabIndex:-1,onMouseDown:n=>{n.preventDefault(),ep(t),eJ(e)},className:(0,f.cn)("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm",n?"bg-accent/15":"hover:bg-accent/8"),children:[(0,r.jsxs)("span",{className:(0,f.cn)("font-mono",n?"font-semibold text-foreground":"text-foreground/86"),children:[":",e.name]}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:e.description})]},e.name)})})]}),g.length>0&&(0,r.jsx)("ul",{className:"mb-2 flex flex-wrap gap-1.5",children:g.map(e=>{var t,n;let a="string"==typeof e.mediaType&&e.mediaType.startsWith("image/");return(0,r.jsxs)("li",{className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-1.5 py-0.5 text-[11px]",title:null!=(t=e.path)?t:e.filename,children:[a?(0,r.jsx)("img",{src:function(e,t,n){if(!e)return"";let r=e.includes("?")?"&":"?",a=n?"".concat(r,"auth=").concat(encodeURIComponent(n)):"";return"".concat(null!=t?t:"").concat(e).concat(a)}(e.downloadUrl,Y.baseUrl,Y.token),alt:e.filename,className:"h-6 w-6 rounded-sm object-cover",loading:"lazy"}):(0,r.jsx)(s.A,{className:"h-3 w-3 text-muted-foreground","aria-hidden":!0}),(0,r.jsx)("span",{className:"max-w-[160px] truncate font-mono",children:e.filename}),(0,r.jsx)("span",{className:"text-muted-foreground",children:(n=e.size)<1024?"".concat(n," B"):n<1048576?"".concat((n/1024).toFixed(1)," kB"):"".concat((n/1024/1024).toFixed(1)," MB")}),v&&(0,r.jsx)("button",{type:"button",onClick:()=>v(e.id),"aria-label":"remove ".concat(e.filename),className:"rounded text-muted-foreground hover:text-rose-500",children:(0,r.jsx)(l.A,{className:"h-3 w-3"})})]},e.id)})}),(0,r.jsxs)("div",{className:"relative flex flex-wrap items-end gap-2 sm:flex-nowrap",children:[(0,r.jsxs)("div",{className:"flex shrink-0 basis-full items-center gap-0.5 pb-1 sm:basis-auto","data-elanous-composer-tools":!0,children:[(0,r.jsx)(x.T,{onAttached:b?e=>b([e]):void 0}),(0,r.jsx)(h.u,{onAttached:b}),(0,r.jsx)(N,{}),(0,r.jsx)(S.z,{}),(0,r.jsx)(C,{}),eT.autoRouting&&eU&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground",title:"입력 의도 분류 \xb7 ACP 송신 경로는 변경하지 않습니다",children:eU.mission})]}),(0,r.jsx)("textarea",{value:er,onChange:e=>ea(e.target.value),onKeyDown:e=>{if(e.ctrlKey&&("r"===e.key||"R"===e.key)){e.preventDefault(),ey||(eS.current=er,ew(!0),eN(0),ea(""));return}if(ey){if("Enter"===e.key&&!e.shiftKey){e.preventDefault(),(()=>{if(0===eI.length)return eC();let e=Math.min(Math.max(ek,0),eI.length-1),t=eI[e];ew(!1),eN(0),eS.current="",ea(t)})();return}if("ArrowUp"===e.key){e.preventDefault(),eN(e=>Math.max(0,e-1));return}if("ArrowDown"===e.key){e.preventDefault(),eN(e=>Math.min(eI.length-1,e+1));return}if("Escape"===e.key){e.preventDefault(),eC();return}}if("Tab"===e.key&&!e.shiftKey&&(()=>{if(null!==ef&&ex.length>0){let e=Math.min(Math.max(ev,0),ex.length-1),t=ex[e],n=er.lastIndexOf("@");if(n<0)return!1;let r=er.slice(0,n),a=t.isDir?"".concat(t.name,"/"):t.name;return ea("".concat(r,"@").concat(a)),!0}if(null!==eD&&eE.length>0){let e=Math.min(Math.max(eR,0),eE.length-1),t=eE[e],n=er.lastIndexOf("$");if(n<0)return!1;let r=er.slice(0,n);return ea("".concat(r,"$").concat(t.name)),!0}if(null!==ed&&eu.length>0){let e=Math.min(Math.max(em,0),eu.length-1);return eJ(eu[e]),!0}return!1})())return void e.preventDefault();if(null!==ef&&ex.length>0){if("Enter"===e.key&&!e.shiftKey){e.preventDefault(),(()=>{if(0===ex.length)return;let e=Math.min(Math.max(ev,0),ex.length-1);eq(ex[e])})();return}if("ArrowUp"===e.key){e.preventDefault(),ej(e=>Math.max(0,e-1));return}if("ArrowDown"===e.key){e.preventDefault(),ej(e=>Math.min(ex.length-1,e+1));return}if("Escape"===e.key){e.preventDefault();let t=er.lastIndexOf("@");t>=0&&ea(er.slice(0,t));return}}if(null!==eD&&eE.length>0){if("Enter"===e.key&&!e.shiftKey){e.preventDefault(),(()=>{if(0===eE.length)return;let e=Math.min(Math.max(eR,0),eE.length-1);eH(eE[e])})();return}if("ArrowUp"===e.key){e.preventDefault(),eA(e=>Math.max(0,e-1));return}if("ArrowDown"===e.key){e.preventDefault(),eA(e=>Math.min(eE.length-1,e+1));return}if("Escape"===e.key){e.preventDefault();let t=er.lastIndexOf("$");t>=0&&ea(er.slice(0,t));return}}if(null!==ed&&eu.length>0){if("Enter"===e.key&&!e.shiftKey){e.preventDefault();let t=function(e,t,n){let r=t.find(t=>t.name.toLowerCase()===e.trim().toLowerCase());if(r)return{kind:"run",line:":".concat(r.name)};let a=t[Math.min(Math.max(n,0),t.length-1)];return a?{kind:"complete",value:":".concat(a.name," ")}:null}(ed,eu,em);(null==t?void 0:t.kind)==="run"?eY(t.line):t&&ea(t.value);return}if("ArrowUp"===e.key){e.preventDefault(),ep(e=>Math.max(0,e-1));return}if("ArrowDown"===e.key){e.preventDefault(),ep(e=>Math.min(eu.length-1,e+1));return}if("Escape"===e.key){e.preventDefault(),ea("");return}}if("Enter"===e.key&&!e.shiftKey){e.preventDefault(),ez();return}if("ArrowUp"===e.key){(()=>{if(0===es.length||er.includes("\n"))return!1;-1===eo&&(ec.current=er);let e=Math.min(eo+1,es.length-1);return e===eo||(ei(e),ea(es[e]),!0)})()&&e.preventDefault();return}if("ArrowDown"===e.key){(()=>{if(eo<0||er.includes("\n"))return!1;if(0===eo)return ei(-1),ea(ec.current),!0;let e=eo-1;return ei(e),ea(es[e]),!0})()&&e.preventDefault();return}},placeholder:"메시지 \xb7 :help 명령 목록",rows:2,disabled:n||X,className:(0,f.cn)("min-h-[44px] max-h-[180px] min-w-0 flex-1 resize-y rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",e$&&"border-accent text-accent-foreground bg-accent/10",n&&"opacity-60")}),k&&(0,r.jsx)("button",{type:"button",onClick:k.onToggle,disabled:k.disabled,title:k.disabled?"daemon URL 미설정":k.phaseLabel,"data-elanous-action":"chat-voice-toggle-inline",className:(0,f.cn)("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border transition-colors",k.active?"border-rose-500/40 bg-rose-500/10 text-rose-600 hover:bg-rose-500/20":"border-input bg-background text-foreground hover:bg-muted",k.disabled&&"cursor-not-allowed opacity-50"),children:(0,r.jsxs)("span",{className:"relative inline-flex",children:[k.active?(0,r.jsx)(o.A,{className:"h-4 w-4"}):(0,r.jsx)(i.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{"aria-hidden":!0,className:(0,f.cn)("absolute -right-0.5 -top-0.5 h-1.5 w-1.5 rounded-full",k.dotColor,("listening"===k.phase||"speaking"===k.phase)&&"animate-pulse")})]})}),(0,r.jsx)(u.$,{onClick:ez,disabled:n||X||!er.trim()&&0===g.length,size:"sm",children:(0,r.jsx)(c.A,{className:"h-4 w-4"})})]}),e$&&(0,r.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground",children:"meta command — handled locally, not sent to LLM"})]})}},25042:(e,t,n)=>{n.d(t,{Cf:()=>g,Es:()=>v,L3:()=>j,c7:()=>b,lG:()=>f,rr:()=>y});var r=n(55539);n(46124);var a=n(52537),s=n(44974),l=n(60606),o=n(53405),i=n(3456),c=n(39692),d=n(77532),u=n(44373),m=n(9734),p=n(69147);function f(e){let{...t}=e;return(0,r.jsx)(a.D,{"data-slot":"dialog",...t})}function x(e){let{...t}=e;return(0,r.jsx)(s.Z,{"data-slot":"dialog-portal",...t})}function h(e){let{className:t,...n}=e;return(0,r.jsx)(l.X,{"data-slot":"dialog-overlay",className:(0,u.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",t),...n})}function g(e){let{className:t,children:n,showCloseButton:a=!0,...s}=e;return(0,r.jsxs)(x,{children:[(0,r.jsx)(h,{}),(0,r.jsxs)(o.h,{"data-slot":"dialog-content",className:(0,u.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...s,children:[n,a&&(0,r.jsxs)(i.H,{"data-slot":"dialog-close",render:(0,r.jsx)(m.$,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,r.jsx)(p.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function b(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"dialog-header",className:(0,u.cn)("flex flex-col gap-2",t),...n})}function v(e){let{className:t,showCloseButton:n=!1,children:a,...s}=e;return(0,r.jsxs)("div",{"data-slot":"dialog-footer",className:(0,u.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",t),...s,children:[a,n&&(0,r.jsx)(i.H,{render:(0,r.jsx)(m.$,{variant:"outline"}),children:"Close"})]})}function j(e){let{className:t,...n}=e;return(0,r.jsx)(c.L,{"data-slot":"dialog-title",className:(0,u.cn)("font-heading text-base leading-none font-medium",t),...n})}function y(e){let{className:t,...n}=e;return(0,r.jsx)(d.r,{"data-slot":"dialog-description",className:(0,u.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),...n})}},25503:(e,t,n)=>{n.d(t,{h:()=>o,t:()=>l});var r=n(46124),a=n(15151),s=n(3155);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{client:t}=(0,a.Q)(),n=(0,s.hG)(t),l=()=>n.list(),o=(0,r.useSyncExternalStore)(e=>n.subscribe(e),l,l);return(0,r.useEffect)(()=>{if(e.activePoll)return n.enterActive()},[n,e.activePoll]),o}function o(){let{client:e}=(0,a.Q)(),t=(0,s.hG)(e),n=l({activePoll:!0}),[,o]=(0,r.useState)(0);return(0,r.useEffect)(()=>{t.forceRefresh().then(()=>o(e=>e+1))},[t]),n}},29039:(e,t,n)=>{n.d(t,{S:()=>d});var r=n(55539),a=n(46124),s=n(96395),l=n(92988),o=n(44373),i=n(64667),c=n(72215);function d(e){let{sessionId:t,source:n="inline",variant:d="default",className:u,showCopyIcon:m=!0}=e,[p,f]=(0,a.useState)(!1),x=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let h=async()=>{if(!t)return;let e=await (0,i.lW)(t);(0,c.cY)("webterm.session-id-chip.copy",{sessionId:t,ok:e,source:n}),e&&(f(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>f(!1),1200))},g=(0,i.o)(t),b=!t,v=t?"대화 ID 전체 (".concat(t.length,"자): ").concat(t,"\n\xb7 누르면 자동으로 복사됩니다 — 앞 8자만 표시합니다 (… 표시는 생략됨)\n\xb7 새 대화를 시작하면 다른 ID가 발급됩니다"):"대화가 선택되지 않았습니다";return(0,r.jsxs)("span",{role:"button",tabIndex:b?-1:0,"aria-disabled":b,onClick:b?void 0:e=>{e.stopPropagation(),h()},onKeyDown:b?void 0:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),h())},title:v,"aria-label":t?"대화 ID ".concat(t," 복사"):"대화가 선택되지 않았습니다","data-elanous-session-id":null!=t?t:"","data-elanous-action":"session-id-copy",className:(0,o.cn)("inline-flex items-center gap-1 rounded font-mono transition-colors select-none focus:outline-none focus:ring-1 focus:ring-ring","default"===d?"px-1 py-0.5 hover:bg-secondary":"opacity-70 hover:opacity-100 hover:bg-muted/40 px-0.5",p&&"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",b&&"cursor-not-allowed opacity-40",!b&&"cursor-copy",u),children:[(0,r.jsx)("span",{children:g}),m&&(p?(0,r.jsx)(s.A,{className:"h-3 w-3","aria-hidden":!0}):(0,r.jsx)(l.A,{className:"h-3 w-3 opacity-60","aria-hidden":!0}))]})}},33626:(e,t,n)=>{async function r(e){let t=await e.fetchResponse("/v1/ops-board/notices");if(!t.ok)throw Error("notices list failed: ".concat(t.status));return(await t.json()).notices}async function a(e,t,n){let r=await e.fetchResponse("/v1/ops-board/notices",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({noticeId:t,body:n})});if(!r.ok)throw Error("notice reply failed: ".concat(r.status));return(await r.json()).reply}async function s(e){let t=await e.fetchResponse("/v1/decisions?status=open");if(!t.ok)throw Error("decisions list failed: ".concat(t.status));return(await t.json()).decisions}async function l(e,t,n,r){let a=await e.fetchResponse("/v1/decisions/".concat(encodeURIComponent(t),"/decide"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({choice:n,...void 0===r?{}:{note:r}})});if(!a.ok)throw Error("decision failed: ".concat(a.status));return a.json()}n.d(t,{LD:()=>l,aj:()=>a,kh:()=>r,qK:()=>s})},36898:(e,t,n)=>{n.d(t,{D:()=>d});var r=n(55539),a=n(46124),s=n(94226),l=n(15151),o=n(44373),i=n(72215);function c(e){return!Number.isFinite(e)||e<0?"$0.00":"$".concat(e.toFixed(2))}function d(){let{client:e,config:t}=(0,l.Q)(),[n,d]=(0,a.useState)(null),[u,m]=(0,a.useState)(!1),p=!!t.baseUrl,f=(0,a.useCallback)(async()=>{if(p)try{let t=await e.voiceCost();d(t),m(!1)}catch(e){m(!0),(0,i.cY)("chat.voice.cost-pill.error",{reason:e instanceof Error?e.message:String(e)})}},[e,p]);if((0,a.useEffect)(()=>{if(!p)return;f();let e=setInterval(()=>void f(),6e4);return()=>clearInterval(e)},[p,f]),!p)return null;if(u&&!n)return(0,r.jsxs)("div",{className:"inline-flex items-center gap-1 rounded-md border border-border bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground",title:"voice cost — daemon /v1/voice/cost 응답 없음","data-elanous-pill":"voice-cost",children:[(0,r.jsx)(s.A,{className:"h-3 w-3","aria-hidden":!0}),(0,r.jsx)("span",{children:"—"})]});if(!n)return(0,r.jsxs)("div",{className:"inline-flex items-center gap-1 rounded-md border border-border bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground","data-elanous-pill":"voice-cost",children:[(0,r.jsx)(s.A,{className:"h-3 w-3","aria-hidden":!0}),(0,r.jsx)("span",{children:"…"})]});let x=n.totalUsd>0;return(0,r.jsxs)("div",{className:(0,o.cn)("inline-flex items-center gap-1 rounded-md border px-2 py-1 text-[11px]",x?"border-emerald-500/30 bg-emerald-500/5 text-emerald-700 dark:text-emerald-400":"border-border bg-muted/40 text-muted-foreground"),title:"voice cost ".concat(n.monthYYYYMM," \xb7 STT ").concat(c(n.sttUsd)," \xb7 TTS ").concat(c(n.ttsUsd)),"data-elanous-pill":"voice-cost",children:[(0,r.jsx)(s.A,{className:"h-3 w-3","aria-hidden":!0}),(0,r.jsx)("span",{children:c(n.totalUsd)}),(0,r.jsx)("span",{className:"text-muted-foreground",children:"/mo"})]})}},46923:(e,t,n)=>{n.d(t,{hn:()=>s,qv:()=>l,sg:()=>o});let r="elanous.ocr.prefs",a={defaultUseLlmVision:!1,defaultPreferHandwriting:!1};function s(){if("undefined"==typeof localStorage)return{...a};try{let e=localStorage.getItem(r);if(!e)return{...a};let t=JSON.parse(e);return{defaultUseLlmVision:"boolean"==typeof t.defaultUseLlmVision?t.defaultUseLlmVision:a.defaultUseLlmVision,defaultPreferHandwriting:"boolean"==typeof t.defaultPreferHandwriting?t.defaultPreferHandwriting:a.defaultPreferHandwriting}}catch(e){return{...a}}}function l(e){if("undefined"==typeof localStorage)return{...a,...e};let t={...s(),...e};try{localStorage.setItem(r,JSON.stringify(t))}catch(e){}return t}function o(){if("undefined"==typeof localStorage)return{...a};try{localStorage.removeItem(r)}catch(e){}return{...a}}},51281:(e,t,n)=>{n.d(t,{$L:()=>i,Kz:()=>o,Vm:()=>l,kv:()=>s});let r="elanous.pwa.chat.autoRouting",a="elanous-chat-routing-changed",s={autoRouting:!1};function l(){return{autoRouting:function(e,t){try{let n=window.localStorage.getItem(e);if("1"===n)return!0;if("0"===n)return!1;return t}catch(e){return t}}(r,s.autoRouting)}}function o(e){try{window.localStorage.setItem(r,e?"1":"0")}catch(e){}window.dispatchEvent(new CustomEvent(a))}function i(e){let t=()=>e(l()),n=t=>{t.key===r&&e(l())};return window.addEventListener(a,t),window.addEventListener("storage",n),()=>{window.removeEventListener(a,t),window.removeEventListener("storage",n)}}},53314:(e,t,n)=>{n.d(t,{T:()=>u});var r=n(55539),a=n(46124),s=n(76573),l=n(5358),o=n(15151),i=n(67327),c=n(72215),d=n(61897);function u(e){let{onAttached:t}=e,{config:n}=(0,o.Q)(),[u,m]=(0,a.useState)(!1),p=(0,a.useRef)(null),f=async e=>{var r;let a=null==(r=e.target.files)?void 0:r[0];if(e.target.value="",a){if(!n.baseUrl)return void i.oR.error("Daemon URL 미설정 — Settings 에서 입력");m(!0),(0,c.cY)("webterm.attach.pick",{filename:a.name,size:a.size,type:a.type});try{let e=await (0,d.v)({baseUrl:n.baseUrl,...n.token?{token:n.token}:{},file:a,filename:a.name});if(!e.ok){(0,c.cY)("webterm.attach.error",{status:e.status,detail:e.reason.slice(0,200)}),i.oR.error("업로드 실패 (".concat(e.status,")"));return}let{meta:r}=e;(0,c.cY)("webterm.attach.ok",{id:r.id,size:r.size}),i.oR.success("\uD83D\uDCCE ".concat(r.filename," (").concat((r.size/1024).toFixed(1)," kB)")),null==t||t(r)}catch(e){(0,c.cY)("webterm.attach.exception",{reason:String(e)}),i.oR.error("업로드 실패: ".concat(String(e instanceof Error?e.message:e)))}finally{m(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()},disabled:u,"aria-label":"attach photo",title:"attach photo (camera or file)",className:"rounded p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-50",children:u?(0,r.jsx)(s.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(l.A,{className:"h-3.5 w-3.5"})}),(0,r.jsx)("input",{ref:p,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:f})]})}},56540:(e,t,n)=>{function r(e,t){return"".concat("elanous.pwa.snapshot.").concat(e,".").concat(t&&t.length>0?t:"singleton")}function a(){try{return window.localStorage}catch(e){return null}}function s(e){let t=a();if(!t)return null;try{let n=t.getItem(e);if(null===n)return null;return JSON.parse(n)}catch(n){try{t.removeItem(e)}catch(e){}return null}}function l(e,t){let n,r=a();if(r){try{n=JSON.stringify(t)}catch(e){return}if(!(n.length>262144))try{r.setItem(e,n)}catch(e){}}}function o(e){let t=a();if(t)try{t.removeItem(e)}catch(e){}}n.d(t,{N2:()=>s,Os:()=>l,o1:()=>r,yd:()=>o})},60750:(e,t,n)=>{n.d(t,{g:()=>a,x:()=>r});let r={idle:"bg-slate-400",connecting:"bg-amber-500",listening:"bg-emerald-500",processing:"bg-sky-500",speaking:"bg-fuchsia-500",error:"bg-rose-600"},a={idle:"음성 대기",connecting:"연결 중…",listening:"듣는 중",processing:"생각 중",speaking:"말하는 중",error:"음성 오류"}},62483:(e,t,n)=>{n.d(t,{l:()=>s});var r=n(55539),a=n(46124);function s(e){let[t,n]=(0,a.useState)("");if("onChoose"in e){let{decision:t,onChoose:n,busy:a}=e;return(0,r.jsxs)("article",{className:"rounded border border-border bg-card p-3","data-decision-card":t.id,children:[(0,r.jsx)("h3",{className:"text-sm font-semibold",children:t.title}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm text-muted-foreground",children:t.situation}),(0,r.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:t.options.map(e=>(0,r.jsxs)("button",{type:"button",disabled:a,onClick:()=>n(e),className:"rounded-md border border-border px-2 py-1 text-sm hover:bg-muted disabled:opacity-50",children:[e.label,"option"in t.recommendation&&t.recommendation.option===e.id&&(0,r.jsx)("span",{className:"ml-1 text-primary",children:"추천"})]},e.id))})]})}let{decision:s,onDecide:l,decidingChoice:o}=e,i=s.resolution.status,c="decided"===s.resolution.status?s.resolution.chosen:null;return(0,r.jsxs)("article",{className:"rounded border border-zinc-200 bg-white p-3",children:[(0,r.jsxs)("header",{className:"flex items-baseline justify-between gap-2",children:[(0,r.jsx)("p",{className:"text-sm font-medium",children:s.question}),(0,r.jsx)("time",{className:"shrink-0 text-xs opacity-60",dateTime:new Date(s.ts).toISOString(),children:new Date(s.ts).toLocaleString()})]}),(0,r.jsx)("ul",{className:"mt-2 flex flex-col gap-2",children:s.opinions.map((e,t)=>(0,r.jsxs)("li",{className:"rounded bg-zinc-50 p-2 text-xs",children:[(0,r.jsxs)("div",{className:"font-medium",children:[e.role,e.modelId?(0,r.jsxs)("span",{className:"opacity-60",children:[" \xb7 ",e.modelId]}):null]}),(0,r.jsx)("pre",{className:"mt-1 whitespace-pre-wrap text-xs leading-snug",children:e.text})]},"".concat(e.role,"-").concat(t)))}),(0,r.jsxs)("footer",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,r.jsxs)("span",{className:"text-xs opacity-70",children:["resolution:"," ","decided"===i?(0,r.jsxs)("span",{className:"font-medium text-emerald-700",children:["decided → ",c]}):(0,r.jsx)("span",{className:"text-amber-700",children:"open"})]}),l&&"open"===i&&(0,r.jsxs)("form",{className:"flex items-center gap-1",onSubmit:e=>{e.preventDefault(),t.trim()&&l(t.trim())},children:[(0,r.jsx)("input",{className:"w-32 rounded border border-zinc-300 px-2 py-0.5 text-xs",placeholder:"chosen…",value:t,onChange:e=>n(e.target.value),disabled:null!==o}),(0,r.jsx)("button",{type:"submit",className:"rounded bg-emerald-700 px-2 py-0.5 text-xs text-white disabled:opacity-50",disabled:!t.trim()||null!==o,children:o===t?"…":"apply"})]})]})]})}},64667:(e,t,n)=>{n.d(t,{Qh:()=>y,lW:()=>v,o:()=>j});var r=n(55539),a=n(46124),s=n(15151),l=n(5997),o=n(25503),i=n(73746),c=n(88069),d=n(53539),u=n(77242),m=n(16199),p=n(96395),f=n(92988),x=n(45876),h=n(72215),g=n(29039);let b={cli:"cli",pwa:"pwa",tg:"tg",dc:"dc"};async function v(e){if(!e||"undefined"==typeof navigator||!navigator.clipboard)return!1;try{return await navigator.clipboard.writeText(e),!0}catch(e){return!1}}function j(e){return e?e.length<=8?e:"".concat(e.slice(0,8),"…"):"—"}function y(){var e,t,n,j,y;let w=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},k=(0,s.Q)(),N=(0,o.t)(),[S,I]=(0,a.useState)(!1),[C,D]=(0,a.useState)(!1),[E,L]=(0,a.useState)(!1),R=(0,a.useRef)(null),A=(0,a.useRef)(null),T=(0,a.useRef)(null),M=null!=(e=w.sessionId)?e:k.sessionId,U=N.find(e=>e.id===M);(0,a.useEffect)(()=>()=>{R.current&&clearTimeout(R.current),A.current&&clearTimeout(A.current)},[]),(0,a.useEffect)(()=>{if(!C)return;let e=e=>{T.current&&!T.current.contains(e.target)&&D(!1)},t=e=>{"Escape"===e.key&&D(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[C]);let O=async()=>{if(!M)return;let e=await v(M);(0,h.cY)("webterm.session-pill.copy",{sessionId:M,ok:e,source:"dropdown"}),e&&(L(!0),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>L(!1),1200))},P=S?"한 번 더 누르면 새 대화가 시작됩니다 — 지금 대화는 그대로 저장되고 대화 목록에 남습니다":"새 대화 시작 (두 번 클릭) — 빈 대화에서 새로 시작합니다",_=null!=(t=null==U?void 0:U.lastMsgPreview)?t:null;return(0,r.jsxs)("div",{ref:T,className:"relative flex items-center",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-border bg-card px-2 py-1 text-[11px]",children:[(0,r.jsx)("span",{className:"text-muted-foreground font-mono",children:"대화:"}),(0,r.jsx)(g.S,{sessionId:M,source:"pill"}),(null==U?void 0:U.origin)&&(0,r.jsx)("span",{className:"ml-1 rounded bg-muted px-1 py-0.5 font-mono text-[9px] uppercase text-muted-foreground",children:null!=(n=b[U.origin])?n:U.origin}),_&&(0,r.jsx)("span",{className:"ml-1 max-w-[180px] truncate border-l border-border pl-2 text-muted-foreground",title:_,children:_}),(0,r.jsxs)("span",{className:"ml-1 flex items-center gap-1 border-l border-border pl-1.5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>{if(!S){I(!0),(0,h.cY)("webterm.session-pill.fork-armed",{sessionId:M}),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{I(!1),(0,h.cY)("webterm.session-pill.fork-disarmed-timeout",{sessionId:M})},4e3);return}R.current&&(clearTimeout(R.current),R.current=null),I(!1);let e=(0,l.Zr)();(0,h.cY)("webterm.session-pill.fork-confirmed",{previous:M,next:e}),k.setSessionId(e)},className:S?"rounded p-0.5 bg-destructive text-destructive-foreground hover:bg-destructive/90":"rounded p-0.5 hover:bg-secondary",title:P,"aria-label":P,children:(0,r.jsx)(i.A,{className:"h-3 w-3"})}),S?(0,r.jsx)("span",{className:"text-[10px] text-destructive","aria-live":"polite",children:"새 대화?"}):null,(0,r.jsx)("button",{type:"button",onClick:()=>D(e=>!e),"aria-label":"대화 메뉴",className:"rounded p-0.5 hover:bg-secondary",title:"대화 메뉴",children:(0,r.jsx)(c.A,{className:"h-3 w-3"})})]})]}),C&&(0,r.jsxs)("div",{role:"menu",className:"absolute left-0 top-7 z-50 w-72 rounded-md border border-border bg-popover py-1 text-xs shadow-md",children:[(0,r.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{let e=(0,l.Zr)();(0,h.cY)("webterm.session-pill.new-chat",{previous:M,next:e,source:"menu"}),k.setSessionId(e),D(!1)},className:"flex w-full items-start gap-2 px-3 py-1.5 text-left hover:bg-secondary",children:[(0,r.jsx)(d.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,r.jsxs)("span",{children:["새 대화 시작",(0,r.jsx)("span",{className:"block text-[10px] text-muted-foreground",children:"빈 대화에서 새로 시작합니다 \xb7 지금 대화는 대화 목록에 남습니다"})]})]}),w.onAttachRequest&&(0,r.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{w.onAttachRequest(),D(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-secondary",children:[(0,r.jsx)(u.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),"다른 대화로 전환"]}),(0,r.jsxs)("div",{className:"px-3 py-1.5 text-muted-foreground",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(m.A,{className:"h-3 w-3 shrink-0"}),(0,r.jsx)("span",{className:"text-[10px] uppercase tracking-wide",children:"대화 ID"})]}),(0,r.jsxs)("div",{className:"mt-1 flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"flex-1 select-all break-all font-mono text-[11px] text-foreground",title:M||"",children:M||"(미설정)"}),(0,r.jsx)("button",{type:"button",onClick:()=>void O(),disabled:!M,className:"shrink-0 rounded p-1 hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-50",title:E?"복사됨":"대화 ID 전체 복사","aria-label":"대화 ID 복사","data-elanous-action":"session-id-copy-dropdown",children:E?(0,r.jsx)(p.A,{className:"h-3 w-3 text-emerald-500"}):(0,r.jsx)(f.A,{className:"h-3 w-3"})})]}),(0,r.jsxs)("div",{className:"mt-1 text-[10px]",children:[null!=(j=null==U?void 0:U.msgCount)?j:0," 메시지",(null==U?void 0:U.origin)&&" \xb7 ".concat(null!=(y=b[U.origin])?y:U.origin)]})]}),w.onForgetRequest&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"my-1 border-t border-border"}),(0,r.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{w.onForgetRequest(),D(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-rose-500 hover:bg-rose-500/10",children:[(0,r.jsx)(x.A,{className:"h-3.5 w-3.5"}),"이 대화 지우기"]})]})]})]})}},65194:(e,t,n)=>{n.d(t,{ht:()=>s,vn:()=>a});let r="elanous.pwa.sharePrefill";function a(e){try{window.sessionStorage.setItem(r,e)}catch(e){}}function s(){try{var e;let t=null!=(e=window.sessionStorage.getItem(r))?e:"";return window.sessionStorage.removeItem(r),t}catch(e){return""}}},67903:(e,t,n)=>{n.d(t,{rm:()=>o});var r=n(55539),a=n(46124),s=n(15151),l=n(65238);function o(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{loadStatus:n=l.gh,pollMs:o=6e4,initialStatus:i}=t,{config:c}=(0,s.Q)(),[d,u]=(0,a.useState)(void 0===i?void 0:i);if((0,a.useEffect)(()=>{let e=!1,t=async()=>{if(!c.baseUrl){e||u(null);return}let t=await n({baseUrl:c.baseUrl,...c.token?{token:c.token}:{}});e||u(t)};if(t(),o<=0)return()=>{e=!0};let r=setInterval(()=>{t()},o);return()=>{e=!0,clearInterval(r)}},[c.baseUrl,c.token,n,o]),void 0===d)return null;if(null===d)return(0,r.jsx)("div",{className:"rounded-md border border-border bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground",title:"예산 상태를 읽지 못했습니다","data-elanous-pill":"budget","data-budget-status":"unread",children:"budget —"});let m="warning"===(e=d.status)||"cap-exceeded"===e;return(0,r.jsx)("div",{className:m?"rounded-md border border-amber-500/50 bg-amber-500/10 px-2 py-1 text-[11px] font-medium text-amber-700 dark:text-amber-300":"rounded-md border border-border bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground",title:"".concat(d.monthYYYYMM," \xb7 ").concat(d.status),"data-elanous-pill":"budget","data-budget-status":d.status,"data-budget-emphasis":m?"true":"false",children:function(e){let t="이번 달 ".concat(function(e){let t=Number.isFinite(e)?e:0;return"$".concat(t.toFixed(2))}(e.monthSoFarUsd));return null!=e.percent&&Number.isFinite(e.percent)?"".concat(t," \xb7 ").concat(e.percent,"%"):t}(d)})}},71923:(e,t,n)=>{n.d(t,{K:()=>i,u:()=>a});var r=n(46124);let a=932,s="elanous.pwa.wideView",l="elanous:wide-view";function o(){try{return"1"===window.localStorage.getItem(s)}catch(e){return!1}}function i(){let[e,t]=(0,r.useState)(null),[n,i]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{t(window.innerWidth),i(o());let e=()=>t(window.innerWidth),n=e=>{let t=e.detail;i("boolean"==typeof t?t:o())};return window.addEventListener("resize",e),window.addEventListener(l,n),window.addEventListener("storage",n),()=>{window.removeEventListener("resize",e),window.removeEventListener(l,n),window.removeEventListener("storage",n)}},[]),{compact:null!==e&&e<=a&&!n,setWide:(0,r.useCallback)(e=>{i(e);try{e?window.localStorage.setItem(s,"1"):window.localStorage.removeItem(s)}catch(e){}window.dispatchEvent(new CustomEvent(l,{detail:e}))},[])}}},73426:(e,t,n)=>{n.d(t,{D:()=>eg});var r=n(55539),a=n(46124),s=n(2021),l=n(65761);let o=[n(77362).A];var i=n(73532);let c={"coo-admin":"운영 할 일","release-schedule":"판 일정","release-checklist":"판별 칸"};function d(e){let{card:t}=e,[n,s]=(0,a.useState)(!1),l=t.items.map((e,t)=>({item:e,index:t})).sort((e,t)=>{var n,r;return(null!=(n=e.item.daysLeft)?n:1/0)-(null!=(r=t.item.daysLeft)?r:1/0)||e.index-t.index}),o=n?l:l.slice(0,12);return(0,r.jsxs)("section",{className:"rounded-lg border border-border bg-card p-3 text-card-foreground","data-elanous-card-kind":t.kind,children:[(0,r.jsxs)("h3",{className:"mb-2 text-sm font-semibold",children:[c[t.kind]," ",(0,r.jsxs)("span",{className:"font-normal text-muted-foreground",children:["\xb7 ",t.items.length]})]}),0===t.items.length&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"항목이 없습니다"}),(0,r.jsx)("ul",{className:"space-y-2",children:o.map(e=>{var t;let{item:n,index:a}=e,s=n.url?function(e){let t=e.trim();if(!t.includes("\\")){if(/^https?:\/\//i.test(t))try{let e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol?t:void 0}catch(e){return}return/^\/(?!\/)/.test(t)?t:void 0}}(n.url):void 0,l=function(e){if(null!==e)return e<0?{label:"".concat(-e,"일 지남"),tone:"overdue"}:0===e?{label:"오늘",tone:"soon"}:{label:"D-".concat(e),tone:e<=3?"soon":void 0}}(n.daysLeft);return(0,r.jsxs)("li",{className:"rounded border border-border/60 px-2 py-1.5 text-sm","data-elanous-card-item":a,children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[l&&(0,r.jsx)("span",{"data-due-status":l.tone,className:"overdue"===l.tone?"font-semibold text-red-600 dark:text-red-400":"soon"===l.tone?"font-semibold text-orange-600 dark:text-orange-400":"text-muted-foreground",children:l.label}),s?(0,r.jsx)("a",{className:"font-medium text-primary underline underline-offset-2",href:s,target:"_blank",rel:"noopener noreferrer",children:n.title}):(0,r.jsx)("span",{className:"font-medium",children:n.title})]}),(0,r.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[n.state,n.owner,null!=(t=n.due)?t:void 0].filter(Boolean).join(" \xb7 ")})]},a)})}),t.items.length>12&&!n&&(0,r.jsxs)("button",{type:"button",className:"mt-2 text-xs font-medium text-primary underline underline-offset-2",onClick:()=>s(!0),children:[t.items.length-12,"개 더 보기"]})]})}function u(e){let{sources:t}=e;return(null==t?void 0:t.length)?(0,r.jsx)("ul",{"aria-label":"출처",className:"mt-1 space-y-0.5 rounded border border-border/60 bg-muted/20 px-2 py-1 text-xs text-muted-foreground",children:t.map((e,t)=>(0,r.jsxs)("li",{title:e.source,className:"break-words",children:[e.label,null!==e.ago?" \xb7 ".concat(e.ago):""]},"".concat(e.source,"-").concat(t)))}):null}var m=n(15151),p=n(2555),f=n(23196);function x(e){var t;let{acceptanceId:n}=e,{client:s}=(0,m.Q)(),[l,o]=(0,a.useState)(null),[i,c]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e;o(null),c(null);let t=!0,r=Date.now(),a=async()=>{if(!(!t||Date.now()-r>=36e5)){try{let e=await (0,f.PM)(s,n);if(!t||(o(e),c(null),(0,p.rr)(e.phase)))return}catch(n){if(!t)return;let e=n instanceof Error?n.message:String(n);if("harness ask not found"===e||/^HTTP 404\b/.test(e))return void c("접수 기록을 못 찾았습니다(데몬 재시작이면 사라질 수 있음)");c("상태 확인 실패 — ".concat(e.split(/\r?\n/,1)[0].slice(0,200)))}t&&Date.now()-r<36e5&&(e=setTimeout(()=>void a(),5e3))}};return a(),()=>{t=!1,e&&clearTimeout(e)}},[s,n]);let d="number"==typeof(null==l?void 0:l.elapsedSeconds)&&Number.isFinite(l.elapsedSeconds)?Math.max(0,Math.floor(l.elapsedSeconds)):0,u="string"==typeof(null==l?void 0:l.goalFile)?l.goalFile.split(/[\\/]/).pop():void 0;return(0,r.jsxs)("section",{"aria-label":"하니스 진행",className:"rounded-md border border-border bg-card px-3 py-2 text-xs not-italic text-card-foreground",children:[(0,r.jsx)("span",{className:"font-medium",children:(0,p.SK)(null!=(t=null==l?void 0:l.phase)?t:"accepted")}),(null==l?void 0:l.runId)&&(0,r.jsxs)("span",{className:"ml-2 font-mono",children:["런 ",l.runId.slice(0,8)]}),u&&(0,r.jsx)("span",{className:"ml-2 break-all",children:u}),(0,r.jsxs)("span",{className:"ml-2 text-muted-foreground",children:["경과 ",d>=60?"".concat(Math.floor(d/60),"분"):"".concat(d,"초")]}),i&&(0,r.jsx)("p",{role:"status",className:"mt-1 text-destructive",children:i})]})}var h=n(44373),g=n(96395),b=n(92988),v=n(43926),j=n(88069),y=n(72215);function w(e){let{block:t}=e,{msg:n,done:a,metrics:s}=t,l=[];if(s){let e=function(e){let t=Math.max(0,Math.round(e/1e3));return t<60?"".concat(t,"s"):t<3600?"".concat(Math.floor(t/60),"m ").concat(t%60,"s"):"".concat(Math.floor(t/3600),"h ").concat(Math.floor(t%3600/60),"m")}(s.elapsedMs);e&&s.elapsedMs>0&&l.push(e);let t=function(e){if(e<=0)return"";let t=e/1e3;return t>=1?"".concat(t.toFixed(1),"k tokens"):"".concat(e," tokens")}(s.tokenCount);t&&l.push(t)}let o=l.length?" (".concat(l.join(" \xb7 "),")"):"";return(0,r.jsxs)("div",{"data-elanous-block-kind":"agent_thinking","data-elanous-block-id":t.blockId,"data-elanous-done":a?"true":"false",className:(0,h.cn)("inline-flex items-center gap-1.5 rounded-full border bg-muted/30 px-2 py-0.5 text-[11px] font-mono",a?"border-border text-muted-foreground":"border-border/60 text-foreground"),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:(0,h.cn)("inline-block h-1.5 w-1.5 rounded-full",a?"bg-emerald-500":"bg-amber-400 motion-safe:animate-pulse")}),(0,r.jsxs)("span",{children:[a?"✓ ":"",n,a?"":"…",(0,r.jsx)("span",{className:"text-muted-foreground",children:o})]})]})}let k={running:"●",queued:"◌",done:"✓",error:"✗"},N={running:"border-amber-400/50 text-amber-300",queued:"border-border text-muted-foreground",done:"border-emerald-500/40 text-emerald-300",error:"border-destructive/50 text-destructive"};function S(e){let{block:t}=e,n=k[t.status],a=N[t.status];return(0,r.jsxs)("div",{"data-elanous-block-kind":"agent_status","data-elanous-block-id":t.blockId,"data-monad-agent-id":t.agentId,"data-elanous-status":t.status,className:(0,h.cn)("inline-flex items-center gap-1.5 rounded border bg-muted/20 px-2 py-0.5 text-[11px] font-mono",a),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:(0,h.cn)("running"===t.status?"motion-safe:animate-pulse":void 0),children:n}),(0,r.jsx)("span",{className:"font-semibold",children:t.agentId}),(0,r.jsx)("span",{className:"uppercase tracking-wide text-[10px] text-muted-foreground",children:t.status}),t.lastEvent&&(0,r.jsxs)("span",{className:"ml-1 truncate text-muted-foreground",children:["\xb7 ",t.lastEvent]})]})}let I={pending:"○","in-progress":"◐",done:"●",skipped:"⊘"},C={pending:"text-muted-foreground","in-progress":"text-amber-300",done:"text-emerald-400",skipped:"text-muted-foreground/60 line-through"};function D(e){let{block:t}=e;return(0,r.jsxs)("div",{"data-elanous-block-kind":"agent_plan","data-elanous-block-id":t.blockId,"data-elanous-plan-ref":t.ref,className:"rounded border border-border bg-muted/20 px-2 py-1.5 text-xs font-mono",children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsxs)("span",{children:["Plan \xb7 ",t.ref]}),"number"==typeof t.activeIndex&&t.steps.length>0&&(0,r.jsxs)("span",{children:[t.activeIndex+1,"/",t.steps.length]})]}),(0,r.jsx)("ol",{className:"m-0 list-none space-y-0.5 p-0",children:t.steps.map((e,n)=>{let a=n===t.activeIndex;return(0,r.jsxs)("li",{"data-elanous-step-index":n,"data-elanous-step-status":e.status,className:(0,h.cn)("flex items-start gap-2 leading-snug",C[e.status],a&&"done"!==e.status?"font-semibold motion-safe:animate-pulse":void 0),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"select-none",children:I[e.status]}),(0,r.jsx)("span",{className:"flex-1 whitespace-pre-wrap",children:e.text})]},n)})})]})}let E={add:"bg-emerald-500/10 text-emerald-300",del:"bg-rose-500/10 text-rose-300",ctx:"text-muted-foreground"},L={add:"+",del:"-",ctx:" "};function R(e){let{block:t}=e,[n,s]=(0,a.useState)(!1),{adds:l,dels:o}=function(e){let t=0,n=0;for(let r of e.hunks)for(let e of r.lines)"add"===e.kind?t+=1:"del"===e.kind&&(n+=1);return{adds:t,dels:n}}(t),i=t.hunks.length;return(0,r.jsxs)("div",{"data-elanous-block-kind":"tool_diff","data-elanous-block-id":t.blockId,"data-elanous-file-path":t.filePath,className:"rounded border border-border bg-muted/20 px-2 py-1 text-xs font-mono",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>s(!n),"aria-expanded":n,className:"flex w-full items-center gap-2 text-left",children:[(0,r.jsx)("span",{"aria-hidden":"true",children:"⌥"}),(0,r.jsx)("span",{className:"font-semibold truncate",children:t.filePath}),t.language&&(0,r.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:["\xb7",t.language]}),(0,r.jsxs)("span",{className:"ml-auto flex items-center gap-1.5 text-[10px]",children:[l>0&&(0,r.jsxs)("span",{className:"text-emerald-300",children:["+",l]}),o>0&&(0,r.jsxs)("span",{className:"text-rose-300",children:["-",o]}),(0,r.jsxs)("span",{className:"text-muted-foreground",children:[i," hunk",1===i?"":"s"]}),(0,r.jsx)("span",{"aria-hidden":"true",className:"text-muted-foreground",children:n?"▾":"▸"})]})]}),n&&(0,r.jsx)("div",{className:"mt-1 overflow-x-auto rounded bg-background/40",children:t.hunks.map((e,t)=>(0,r.jsxs)("div",{"data-elanous-hunk-index":t,className:"border-t border-border/40 first:border-t-0",children:[(0,r.jsxs)("div",{className:"px-2 py-0.5 text-[10px] text-muted-foreground bg-muted/30",children:["@@ -",e.oldStart,",",e.oldLines," +",e.newStart,",",e.newLines," @@"]}),(0,r.jsx)("pre",{className:"m-0 whitespace-pre p-0 text-[11px] leading-tight",children:e.lines.map((e,t)=>(0,r.jsxs)("div",{"data-elanous-line-kind":e.kind,className:(0,h.cn)("flex items-baseline px-2 py-px",E[e.kind]),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"w-3 shrink-0 select-none",children:L[e.kind]}),(0,r.jsx)("span",{className:"flex-1",children:e.text})]},t))})]},t))})]})}function A(e){var t,n,a,s;let{hit:l}=e;return(0,r.jsx)("li",{"data-elanous-search-hit-file":l.filePath,"data-elanous-search-hit-line":l.line,className:"rounded px-2 py-1 hover:bg-muted/30",children:(0,r.jsxs)("a",{href:function(e){var t;let n=null!=(t=e.column)?t:1;return"vscode://file/".concat(e.filePath,":").concat(e.line,":").concat(n)}(l),className:"block",target:"_blank",rel:"noopener",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2 text-[11px]",children:[(0,r.jsx)("span",{className:"font-semibold truncate",children:l.filePath}),(0,r.jsxs)("span",{className:"text-muted-foreground",children:[":",l.line]}),void 0!==l.column&&(0,r.jsxs)("span",{className:"text-muted-foreground",children:[":",l.column]})]}),(null!=(a=null==(t=l.contextBefore)?void 0:t.length)?a:0)>0&&(0,r.jsx)("pre",{className:"m-0 mt-0.5 whitespace-pre-wrap break-words text-[10px] text-muted-foreground/70",children:l.contextBefore.join("\n")}),(0,r.jsx)("pre",{className:"m-0 whitespace-pre-wrap break-words text-[10px] text-foreground",children:l.snippet}),(null!=(s=null==(n=l.contextAfter)?void 0:n.length)?s:0)>0&&(0,r.jsx)("pre",{className:"m-0 whitespace-pre-wrap break-words text-[10px] text-muted-foreground/70",children:l.contextAfter.join("\n")})]})})}function T(e){let{block:t}=e,[n,s]=(0,a.useState)(!1),l=t.hits.length,o=n?t.hits:t.hits.slice(0,5),i=l-o.length;return(0,r.jsxs)("div",{"data-elanous-block-kind":"tool_search_hits","data-elanous-block-id":t.blockId,"data-elanous-search-query":t.query,"data-elanous-accum-count":t.accumCount,className:(0,h.cn)("rounded border border-border bg-muted/20 px-2 py-1 text-xs font-mono"),children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2 mb-1",children:[(0,r.jsx)("span",{"aria-hidden":"true",children:"\uD83D\uDD0E"}),(0,r.jsx)("span",{className:"font-semibold",children:t.query}),(0,r.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[t.accumCount," hit",1===t.accumCount?"":"s"]}),t.truncated&&(0,r.jsx)("span",{className:"text-[10px] text-amber-300",children:"truncated"})]}),0===l?(0,r.jsx)("div",{className:"text-[10px] text-muted-foreground italic",children:"(no hits yet)"}):(0,r.jsx)("ul",{className:"m-0 list-none space-y-0.5 p-0",children:o.map((e,t)=>(0,r.jsx)(A,{hit:e},"".concat(e.filePath,":").concat(e.line,":").concat(t)))}),i>0&&(0,r.jsxs)("button",{type:"button",onClick:()=>s(!0),className:"mt-1 w-full rounded bg-muted/40 px-2 py-0.5 text-[10px] text-muted-foreground hover:bg-muted/60",children:["+ ",i," more"]}),n&&l>5&&(0,r.jsx)("button",{type:"button",onClick:()=>s(!1),className:"mt-1 w-full rounded bg-muted/40 px-2 py-0.5 text-[10px] text-muted-foreground hover:bg-muted/60",children:"collapse"})]})}let M={stdout:"text-foreground",stderr:"text-rose-300",http:"text-amber-300",generic:"text-muted-foreground"},U={stdout:"▌",stderr:"▌",http:"↹",generic:"\xb7"};function O(e){var t;let{block:n}=e,[s,l]=(0,a.useState)(!1),o=n.lines.length,i=0===o?"":n.lines[o-1],c=void 0===n.exitCode?"":0===n.exitCode?"text-emerald-300":"text-rose-300";return(0,r.jsxs)("div",{"data-elanous-block-kind":"tool_progress","data-elanous-block-id":n.blockId,"data-elanous-stream":n.stream,"data-elanous-done":n.done?"true":"false",className:"rounded border border-border bg-muted/20 px-2 py-1 text-xs font-mono",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>l(!s),"aria-expanded":s,className:"flex w-full items-center gap-2 text-left",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:(0,h.cn)(M[n.stream],!n.done&&"motion-safe:animate-pulse"),children:U[n.stream]}),(0,r.jsx)("span",{className:"uppercase tracking-wide text-[10px] text-muted-foreground",children:n.stream}),!s&&i&&(0,r.jsx)("span",{className:(0,h.cn)("flex-1 truncate",M[n.stream]),children:i}),(0,r.jsxs)("span",{className:"ml-auto flex items-center gap-1.5 text-[10px] text-muted-foreground",children:[(0,r.jsxs)("span",{children:[o," line",1===o?"":"s"]}),void 0!==n.bytesSoFar&&(0,r.jsxs)("span",{children:["\xb7 ",(t=n.bytesSoFar)<1024?"".concat(t,"B"):t<1048576?"".concat((t/1024).toFixed(1),"KB"):"".concat((t/1048576).toFixed(1),"MB")]}),void 0!==n.exitCode&&(0,r.jsxs)("span",{className:c,children:["\xb7 exit ",n.exitCode]}),n.done&&!n.exitCode&&(0,r.jsx)("span",{className:"text-emerald-300",children:"\xb7 ✓"}),(0,r.jsx)("span",{"aria-hidden":"true",children:s?"▾":"▸"})]})]}),s&&(0,r.jsx)("pre",{className:(0,h.cn)("m-0 mt-1 max-h-64 overflow-auto rounded bg-background/40 p-1.5 text-[11px] leading-tight whitespace-pre",M[n.stream]),children:0===n.lines.length?"(no output yet)":n.lines.join("\n")})]})}function P(e){var t;let{group:n}=e,a=function(e){if(0===e.samples.length)return"";if(1===e.samples.length)return"M0,".concat(9," L").concat(80,",").concat(9);let t=e.max-e.min||1,n=e.samples.map((n,r)=>{let a=r/(e.samples.length-1)*80,s=(n.value-e.min)/t;return"".concat(a.toFixed(1),",").concat((18-18*s).toFixed(1))});return"M".concat(n[0]," L").concat(n.slice(1).join(" L"))}(n);return(0,r.jsxs)("div",{"data-elanous-perf-metric":n.metric,"data-elanous-perf-latest":n.latest,className:"flex items-center gap-2 text-[10px] font-mono",children:[(0,r.jsx)("span",{className:"text-muted-foreground truncate min-w-[120px]",children:n.metric}),(0,r.jsx)("svg",{width:80,height:18,viewBox:"0 0 ".concat(80," ").concat(18),className:"shrink-0","aria-label":"".concat(n.metric," sparkline"),children:(0,r.jsx)("path",{d:a,fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round",strokeLinecap:"round",className:"text-amber-400"})}),(0,r.jsx)("span",{className:"text-foreground tabular-nums",children:(t=n.latest)>=1e3?(t/1e3).toFixed(1)+"k":t>=10?t.toFixed(0):t.toFixed(1)}),n.unit&&(0,r.jsx)("span",{className:"text-muted-foreground",children:n.unit})]})}function _(e){let{block:t}=e,n=(0,a.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=t.get(n.metric);e?e.push(n):t.set(n.metric,[n])}let n=[];for(let[e,r]of t.entries()){let t=1/0,a=-1/0;for(let e of r)e.value<t&&(t=e.value),e.value>a&&(a=e.value);let s=r[r.length-1].value,l={metric:e,samples:r,latest:s,min:t,max:a},o=r[r.length-1].unit;void 0!==o&&(l.unit=o),n.push(l)}return n.sort((e,t)=>t.samples.length-e.samples.length),n})(t.samples),[t.samples]);return 0===n.length?(0,r.jsx)("div",{"data-elanous-block-kind":"perf_session","data-elanous-block-id":t.blockId,className:"rounded border border-border bg-muted/20 px-2 py-1 text-[10px] text-muted-foreground italic",children:"(no perf samples yet)"}):(0,r.jsx)("div",{"data-elanous-block-kind":"perf_session","data-elanous-block-id":t.blockId,"data-elanous-perf-metric-count":n.length,className:(0,h.cn)("rounded border border-border bg-muted/20 px-2 py-1","flex flex-col gap-0.5"),children:n.map(e=>(0,r.jsx)(P,{group:e},e.metric))})}let F="'none'";function z(e){let t=function(e){if(!e)return[];let t=new Set;for(let n of e)if("string"==typeof n)try{let e=new URL(n);if("http:"!==e.protocol&&"https:"!==e.protocol||e.username||e.password||"/"!==e.pathname||e.search||e.hash)continue;t.add(e.origin)}catch(e){}return[...t]}(e);return t.length>0?t.join(" "):F}let Y="ui/notifications/tool-result",q=(e,t,n)=>"".concat(e,":").concat(t,":").concat(typeof n,":").concat(String(n));function H(e,t,n){return{jsonrpc:"2.0",id:e,error:{code:t,message:n}}}function J(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function $(e){return{frames:{...e.frames},pending:{...e.pending},pushes:[...e.pushes],unmatched:[...e.unmatched],nextGeneration:e.nextGeneration}}function K(e){return{jsonrpc:"2.0",method:Y,params:{content:[],_meta:{"elanous/resultOmittedReason":e}}}}function B(e){let{message:t,omitted:n,bytes:r}=function(e){if(!(J(e)&&(!("content"in e)||Array.isArray(e.content))))return{message:K("not_a_tool_result"),omitted:"not_a_tool_result",bytes:-1};let t={jsonrpc:"2.0",method:Y,params:e};try{structuredClone(t);let e=new TextEncoder().encode(JSON.stringify(t)).byteLength;if(e<=65536)return{message:t,bytes:e};return{message:K("too_large"),omitted:"too_large",bytes:e}}catch(e){return{message:K("unserializable"),omitted:"unserializable",bytes:-1}}}(e.result);return{kind:"notify",frameId:e.frameId,message:t,bytes:r,...n?{omitted:n}:{}}}function V(e,t){for(let[n,r]of(delete e.frames[t],Object.entries(e.pending)))r.frameId===t&&delete e.pending[n];e.pushes=e.pushes.filter(e=>e.frameId!==t)}function W(e){return{frames:{},pending:{},pushes:[],unmatched:[],nextGeneration:e.nextGeneration}}function Q(e,t,n,r,a){let s=q(t,n,r),l=e.frames[t];if(!e.pending[s]||!l||l.generation!==n)return{state:e,actions:[]};let o=$(e);return delete o.pending[s],{state:o,actions:[{kind:"respond",frameId:t,message:"result"in a?{jsonrpc:"2.0",id:r,result:a.result}:{jsonrpc:"2.0",id:r,error:{code:-32603,message:"Daemon tool call failed",data:a.error}}}]}}let G=new WeakMap;function Z(e){let{html:t,connectDomains:n,resourceDomains:s,server:l,tool:o,toolCallId:i,toolResult:c}=e,d=function(){let{connectDomains:e,resourceDomains:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=z(e),r=z(t);return["default-src ".concat(F),"connect-src ".concat(n),"img-src ".concat(r),"media-src ".concat(r),"style-src ".concat(r),"font-src ".concat(r),"script-src 'unsafe-inline' ".concat(r),"base-uri ".concat(F),"form-action ".concat(F),"navigate-to ".concat(F)].join("; ")}({connectDomains:n,resourceDomains:s}),u='<meta http-equiv="Content-Security-Policy" content="'.concat(d,'">').concat(t),p=(0,a.useRef)(null),f=(0,a.useId)(),x=(0,a.useContext)(m.C),[h,g]=(0,a.useState)(!1),[b,v]=(0,a.useState)(null),j=(0,a.useCallback)(()=>{var e,t;g(!0),v(null!=(t=null==(e=p.current)?void 0:e.contentWindow)?t:null)},[]);return(0,a.useEffect)(()=>{if(b&&x)return function(e,t){let n=e.register({frameId:t.frameId,source:t.source,server:t.server,...void 0!==t.tool?{tool:t.tool}:{},...void 0!==t.toolCallId?{toolCallId:t.toolCallId}:{}}),r=void 0!==t.toolResult&&void 0!==t.tool;return(0,y.cY)("mcp-app.bridge.attach",{frameId:t.frameId,server:t.server,hasTool:void 0!==t.tool,hasToolCallId:void 0!==t.toolCallId,hasToolResult:void 0!==t.toolResult,published:r,...r?{}:{skipped:void 0===t.tool?"no-tool":"no-tool-result"}}),r&&e.publish({server:t.server,tool:t.tool,...void 0!==t.toolCallId?{toolCallId:t.toolCallId}:{},result:t.toolResult}),n}(function(e,t){let n=G.get(e);if(n)return n;let r=function(e,t){let n={frames:{},pending:{},pushes:[],unmatched:[],nextGeneration:1},r=(e,t)=>{var r;let a=null==(r=n.frames[e])?void 0:r.source;if("function"!=typeof(null==a?void 0:a.postMessage))return"no-target";try{return a.postMessage(t,"*"),"posted"}catch(e){return"threw"}},a=e=>{for(let s of e){if("observe"===s.kind&&(0,y.cY)("mcp-app.bridge.discard",{reason:s.reason,...s.method?{method:s.method}:{}}),"notify"===s.kind){let e=r(s.frameId,s.message);(0,y.cY)("mcp-app.bridge.push",{frameId:s.frameId,post:e,bytes:s.bytes,maxBytes:65536,...s.omitted?{omitted:s.omitted}:{}})}"respond"===s.kind&&r(s.frameId,s.message),"daemon-tool-call"===s.kind&&t.callWidgetTool({server:s.server,tool:s.tool,arguments:s.arguments}).then(e=>{let t=Q(n,s.frameId,s.generation,s.id,{result:e});n=t.state,a(t.actions)},e=>{let t=Q(n,s.frameId,s.generation,s.id,{error:String(e)});n=t.state,a(t.actions)})}},s=e=>{let t=function(e,t,n){let r=Object.values(e.frames).find(e=>e.source===t);if(!r)return{state:e,actions:[{kind:"observe",reason:"untrusted-source"}]};if(!J(n)||"2.0"!==n.jsonrpc||"string"!=typeof n.method)return{state:e,actions:[{kind:"observe",reason:"malformed-message"}]};if("notifications/initialized"===n.method||"ui/notifications/initialized"===n.method){var a;if(r.ready)return{state:e,actions:[]};let t=$(e);t.frames[r.frameId]={...r,ready:!0};let n=t.pushes.filter(e=>e.frameId===r.frameId&&e.generation===r.generation);return t.pushes=t.pushes.filter(e=>e.frameId!==r.frameId||e.generation!==r.generation),{state:t,actions:n.map(B)}}if(!("string"==typeof(a=n.id)||"number"==typeof a&&Number.isFinite(a)))return{state:e,actions:[]};if("ui/initialize"===n.method)return{state:e,actions:[{kind:"respond",frameId:r.frameId,message:{jsonrpc:"2.0",id:n.id,result:{protocolVersion:"2025-11-21",hostInfo:{name:"elanous",version:"1"},hostCapabilities:{serverTools:{}},hostContext:{}}}}]};if("ui/open-link"===n.method||"tools/call"!==n.method)return{state:e,actions:[{kind:"observe",reason:"unknown-method",method:n.method},{kind:"respond",frameId:r.frameId,message:H(n.id,-32601,"Method not found")}]};if(!J(n.params)||"string"!=typeof n.params.name)return{state:e,actions:[{kind:"respond",frameId:r.frameId,message:H(n.id,-32602,"Invalid params")}]};let s=q(r.frameId,r.generation,n.id);if(e.pending[s])return{state:e,actions:[{kind:"respond",frameId:r.frameId,message:H(n.id,-32600,"Duplicate request id")}]};let l=$(e);return l.pending[s]={frameId:r.frameId,id:n.id,generation:r.generation},{state:l,actions:[{kind:"daemon-tool-call",frameId:r.frameId,id:n.id,generation:r.generation,server:r.server,tool:n.params.name,arguments:n.params.arguments}]}}(n,e.source,e.data);n=t.state,a(t.actions)};return e.addEventListener("message",s),{register(e){var t;let r=function(e,t){let n=$(e);for(let[e,r]of Object.entries(n.frames))(e===t.frameId||r.source===t.source)&&V(n,e);let r=n.nextGeneration++;n.frames[t.frameId]={...t,generation:r,ready:!1};let a=n.unmatched.filter(e=>e.server===t.server&&e.tool===t.tool&&void 0!==e.toolCallId&&e.toolCallId===t.toolCallId);for(let e of(n.unmatched=n.unmatched.filter(e=>!a.includes(e)),a))n.pushes.push({...e,frameId:t.frameId,generation:r});return{state:n,actions:[]}}(n,e);n=r.state,a(r.actions);let s=null==(t=n.frames[e.frameId])?void 0:t.generation;return()=>{void 0!==s&&(n=function(e,t,n){let r=e.frames[t];if(!r||void 0!==n&&r.generation!==n)return{state:e,actions:[]};let a=$(e);return V(a,t),{state:a,actions:[]}}(n,e.frameId,s).state)}},publish(e){let t=function(e,t){let n=e,r=[],a=!1;for(let s of Object.values(e.frames)){if(s.server!==t.server||s.tool!==t.tool||(void 0!==t.toolCallId||void 0!==s.toolCallId)&&t.toolCallId!==s.toolCallId)continue;a=!0;let e=function(e,t){let n=e.frames[t.frameId];if(!n||n.generation!==t.generation)return{state:e,actions:[]};if(n.ready)return{state:e,actions:[B(t)]};let r=$(e);return r.pushes.push(t),{state:r,actions:[]}}(n,{...t,frameId:s.frameId,generation:s.generation});n=e.state,r.push(...e.actions)}if(!a&&void 0!==t.toolCallId){let e=$(n);e.unmatched=[...e.unmatched,t],n=e}return{state:n,actions:r}}(n,e);n=t.state,a(t.actions)},disposeConversation(){n=W(n)},close(){e.removeEventListener("message",s),n=W(n)}}}(t,{async callWidgetTool(t){let{tool:n,arguments:r}=t;return e.fetchJson("/v1/mcp/widgets/call",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({toolName:n,args:null!=r?r:{}})})}});return G.set(e,r),r}(x.client,window),{frameId:f,source:b,server:null!=l?l:"",...void 0!==o?{tool:o}:{},...void 0!==i?{toolCallId:i}:{},...void 0!==c?{toolResult:c}:{}})},[b,x,f,l,o,i,c]),(0,r.jsx)("iframe",{ref:p,"data-elanous-mcp-app-frame":"true","data-elanous-mcp-server":null!=l?l:"",sandbox:"allow-scripts",srcDoc:u,title:"MCP App",onLoad:j,className:"mt-2 w-full rounded border border-border bg-background transition-[height] ".concat(h?"h-96":"h-10")})}function X(e,t){let n=e.headers.get(t);if(null!==n)return n.split(",").map(e=>e.trim()).filter(e=>e.length>0)}async function ee(e,t){if(!t.server||!t.uri)return null;try{let n=await e.fetchResponse(function(e,t){let n=new URLSearchParams({server:e,uri:t});return"".concat("/v1/mcp/resources","?").concat(n.toString())}(t.server,t.uri),t.signal?{signal:t.signal}:void 0);if(!n.ok)return null;let r=await n.text();if(0===r.length)return null;let a=X(n,"x-elanous-mcp-app-connect-domains"),s=X(n,"x-elanous-mcp-app-resource-domains");return{html:r,...a?{connectDomains:a}:{},...s?{resourceDomains:s}:{}}}catch(e){return null}}let et=["__","."];function en(e){var t,n,s,l,o,i;let{block:c}=e,d=function(e){for(let t of et){let n=e.indexOf(t);if(n>0)return e.slice(0,n)}return""}(c.toolName),u=(0,a.useContext)(m.C),[p,f]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(c.html||!u||!d||!c.screenUrl)return;let e=new AbortController,t=!0,n=Date.now();return(0,y.cY)("mcp-app.body.fetch",{server:d,uri:c.screenUrl,reason:"not-embedded"}),ee(u.client,{server:d,uri:c.screenUrl,signal:e.signal}).then(e=>{var r,a,s,l,o;t&&((0,y.cY)("mcp-app.body.fetched",{server:d,elapsedMs:Date.now()-n,ok:null!==e,bytes:null!=(s=null==e?void 0:e.html.length)?s:0,connectDomains:null!=(l=null==e||null==(r=e.connectDomains)?void 0:r.length)?l:null,resourceDomains:null!=(o=null==e||null==(a=e.resourceDomains)?void 0:a.length)?o:null}),f(e))}).catch(e=>{t&&(0,y.cY)("mcp-app.body.fetched",{server:d,elapsedMs:Date.now()-n,ok:!1,threw:!0,reason:e instanceof Error?e.message.slice(0,200):String(e).slice(0,200)})}),()=>{t=!1,e.abort()}},[c.html,c.screenUrl,u,d]);let x=null!=(n=null!=(t=c.html)?t:null==p?void 0:p.html)?n:void 0,{connectDomains:h,resourceDomains:g}={...(null!=(s=c.connectDomains)?s:null==p?void 0:p.connectDomains)?{connectDomains:null!=(l=c.connectDomains)?l:null==p?void 0:p.connectDomains}:{},...(null!=(o=c.resourceDomains)?o:null==p?void 0:p.resourceDomains)?{resourceDomains:null!=(i=c.resourceDomains)?i:null==p?void 0:p.resourceDomains}:{}};return(0,r.jsxs)("section",{"data-elanous-block-kind":"mcp_app","data-elanous-tool-id":c.toolId,"data-elanous-tool-name":c.toolName,className:"rounded border border-border bg-muted/40 px-3 py-2 text-sm",children:[(0,r.jsx)("div",{className:"font-medium",children:c.toolName}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:c.toolId}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-xs",children:c.screenUrl}),x&&(0,r.jsx)(Z,{html:x,connectDomains:h,resourceDomains:g,server:d,tool:c.toolName,toolCallId:c.toolId,toolResult:c.toolResult}),c.fallbackText&&(0,r.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-sm",children:c.fallbackText})]})}let er={pre:function(e){let{children:t}=e,n=(0,a.useMemo)(()=>(function e(t){if(null==t||"boolean"==typeof t)return"";if("string"==typeof t||"number"==typeof t)return String(t);if(Array.isArray(t))return t.map(e).join("");if("object"==typeof t&&"props"in t){let n=t.props;return e(null==n?void 0:n.children)}return""})(t),[t]),s=(0,a.useMemo)(()=>(function e(t){if(null==t||"object"!=typeof t)return null;if(Array.isArray(t)){for(let n of t){let t=e(n);if(t)return t}return null}let n=t.props;if((null==n?void 0:n.className)&&"string"==typeof n.className){var r;let e=/language-([\w+-]+)/.exec(n.className);if(e)return null!=(r=e[1])?r:null}return(null==n?void 0:n.children)?e(n.children):null})(t),[t]),l=(0,a.useMemo)(()=>"string"==typeof n&&0!==n.length&&(n.length>800||n.split("\n").length>12),[n]),[o,i]=(0,a.useState)(!l),[c,d]=(0,a.useState)(!1);if(!l)return(0,r.jsx)("pre",{children:t});let u=function(e){let t=e.split("\n");return t.length<=8?e:t.slice(0,8).join("\n")+"\n…"}(n),m=n.split("\n").length,p=async()=>{try{var e;await (null==(e=navigator.clipboard)?void 0:e.writeText(n)),d(!0),(0,y.cY)("pwa.code-block.copy",{lang:s,lineCount:m}),setTimeout(()=>d(!1),1500)}catch(e){(0,y.cY)("pwa.code-block.copy-error",{reason:String(e)})}};return(0,r.jsxs)("div",{className:"my-2 overflow-hidden rounded-md border border-border bg-muted/40","data-testid":"collapsible-code-block",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border bg-muted/60 px-2 py-1 text-[11px] text-muted-foreground",children:[(0,r.jsxs)("span",{className:"font-mono",children:[null!=s?s:"code"," \xb7 ",m," lines \xb7 ",n.length," chars"]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>{p()},"aria-label":"copy code",className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 hover:bg-muted hover:text-foreground",children:[c?(0,r.jsx)(g.A,{className:"h-3 w-3"}):(0,r.jsx)(b.A,{className:"h-3 w-3"}),c?"copied":"copy"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),"aria-label":o?"collapse code":"expand code",className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 hover:bg-muted hover:text-foreground",children:[o?(0,r.jsx)(v.A,{className:"h-3 w-3"}):(0,r.jsx)(j.A,{className:"h-3 w-3"}),o?"collapse":"show all"]})]})]}),(0,r.jsx)("pre",{className:"!my-0 overflow-x-auto !rounded-none !bg-transparent !p-2 !text-[13px]",children:o?t:u})]})}};function ea(e){let{text:t,showCards:n}=e;if(!n)return(0,r.jsx)(es,{text:t});let a=(0,i.g)(t);return(0,r.jsxs)(r.Fragment,{children:[a.text.trim()&&(0,r.jsx)(es,{text:a.text}),a.cards.map((e,t)=>(0,r.jsx)(d,{card:e},t))]})}function es(e){let{text:t}=e;return(0,r.jsx)("div",{className:"prose prose-sm max-w-none break-words [&_pre]:bg-muted [&_pre]:p-2 [&_pre]:rounded [&_code]:font-mono [&_code]:text-xs [&_p]:my-1 [&_table]:text-xs",children:(0,r.jsx)(l.oz,{remarkPlugins:o,components:er,children:t})})}function el(e){let{block:t,children:n,mobileSimple:s=!1}=e,[l,o]=(0,a.useState)(!1),i="running"===t.status?"⋯":"done"===t.status?"✓":"✗",c="running"===t.status?"text-muted-foreground border-border":"error"===t.status?"text-destructive border-destructive/40":"text-foreground border-border",d=s||!!t.args&&Object.keys(t.args).length>0||!!n,u=[t.startedAt,t.endedAt].filter(e=>"number"==typeof e).map(e=>new Date(e).toLocaleTimeString()).join(" → ");return(0,r.jsxs)("div",{"data-elanous-block-kind":"tool_use","data-elanous-tool-name":t.name,"data-elanous-tool-status":t.status,className:(0,h.cn)("rounded border bg-muted/40 px-2 py-1 text-xs font-mono",s&&"min-w-0",c),children:[(0,r.jsxs)("button",{type:"button",onClick:d?()=>o(!l):void 0,className:(0,h.cn)("flex w-full items-center gap-2 text-left",s&&"min-w-0 overflow-hidden whitespace-nowrap",d?"cursor-pointer":"cursor-default"),"aria-expanded":d?l:void 0,children:[(0,r.jsx)("span",{"aria-hidden":"true",children:i}),(0,r.jsx)("span",{className:"font-semibold",children:t.name}),t.summary&&(0,r.jsx)("span",{className:"ml-1 truncate text-muted-foreground",children:t.summary}),u&&(0,r.jsx)("span",{className:"ml-auto text-muted-foreground",children:u}),d&&(0,r.jsx)("span",{className:"ml-auto text-muted-foreground","aria-hidden":"true",children:l?"▾":"▸"})]}),l&&d&&(s?(0,r.jsxs)("div",{children:[!!t.args&&Object.keys(t.args).length>0&&(0,r.jsx)("pre",{className:"mt-1 overflow-x-auto rounded bg-background/60 p-1.5 text-[10px] leading-tight",children:JSON.stringify(t.args,null,2)}),n]}):(0,r.jsx)("pre",{className:"mt-1 overflow-x-auto rounded bg-background/60 p-1.5 text-[10px] leading-tight",children:JSON.stringify(t.args,null,2)}))]})}function eo(e){let{blocks:t,showCards:n,mobileSimple:a=!1}=e;return(0,r.jsx)("div",{className:"flex flex-col gap-2",children:t.map((e,t)=>{var s,l;return"harness_ask"===e.kind?(0,r.jsx)(x,{acceptanceId:e.acceptanceId},"".concat(e.acceptanceId,"-").concat(t)):"text"===e.kind?(0,r.jsx)(ea,{text:e.text,showCards:n},t):"image"===e.kind?(0,r.jsx)("img",{src:e.src,alt:null!=(s=e.alt)?s:"inline image (".concat(e.mediaType,")"),className:"max-w-full rounded border border-border","data-elanous-block-kind":"image","data-elanous-media-type":e.mediaType},t):"tool_use"===e.kind?(0,r.jsxs)("div",{children:[(0,r.jsx)(el,{block:e,mobileSimple:a,...a&&(null==(l=e.sources)?void 0:l.length)?{children:(0,r.jsx)(u,{sources:e.sources})}:{}}),!a&&(0,r.jsx)(u,{sources:e.sources})]},"".concat(e.id,"-").concat(t)):"mcp_app"===e.kind?(0,r.jsx)(en,{block:e},"".concat(e.toolId,"-").concat(t)):"agent_thinking"===e.kind?(0,r.jsx)(w,{block:e},"thinking-".concat(e.blockId)):"agent_status"===e.kind?(0,r.jsx)(S,{block:e},"status-".concat(e.blockId)):"agent_plan"===e.kind?(0,r.jsx)(D,{block:e},"plan-".concat(e.blockId)):"tool_diff"===e.kind?(0,r.jsx)(R,{block:e},"diff-".concat(e.blockId)):"tool_search_hits"===e.kind?(0,r.jsx)(T,{block:e},"search-".concat(e.blockId)):"tool_progress"===e.kind?(0,r.jsx)(O,{block:e},"progress-".concat(e.blockId)):"perf_session"===e.kind?(0,r.jsx)(_,{block:e},"perf-".concat(e.blockId)):null})})}function ei(e){var t,n,a,s,l;let{message:o,mobileSimple:i=!1}=e,c="user"===o.role,d="meta"===o.role,u="system"===o.role,m=new Date(o.timestamp).toLocaleTimeString();if(d)return(0,r.jsxs)("div",{className:"px-2 py-1 text-[11px] text-muted-foreground italic",children:[(0,r.jsx)("pre",{className:"whitespace-pre-wrap font-mono text-[11px]",children:o.text}),(null==(a=o.blocks)?void 0:a.some(e=>"harness_ask"===e.kind))&&(0,r.jsx)(eo,{blocks:o.blocks,showCards:!1,mobileSimple:i})]});if(u){let e="error"===(null!=(l=null==(s=o.meta)?void 0:s.systemLevel)?l:"note");return(0,r.jsx)("div",{className:"px-3 py-2",children:(0,r.jsxs)("div",{className:(0,h.cn)("rounded-md border px-3 py-2 text-xs font-mono",e?"border-rose-500/60 bg-rose-500/10 text-rose-300":"border-border/60 bg-muted/40 text-muted-foreground italic"),children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,r.jsx)("span",{className:(0,h.cn)("shrink-0 text-[10px] font-semibold uppercase tracking-wide",e?"text-rose-400":"text-muted-foreground/70"),children:e?"⚠ Error":"Note"}),(0,r.jsx)("pre",{className:"flex-1 whitespace-pre-wrap break-all",children:o.text})]}),(0,r.jsx)("div",{className:"mt-1 text-[10px] text-muted-foreground/80",children:m})]})})}let p=Array.isArray(o.blocks)&&o.blocks.length>0;return(0,r.jsx)("div",{className:(0,h.cn)("flex gap-3 px-4 py-3",c?"justify-end":"justify-start"),children:(0,r.jsxs)("div",{className:(0,h.cn)("max-w-[85%] rounded-lg px-3 py-2 text-sm shadow-sm",c?"bg-primary text-primary-foreground":"bg-card text-card-foreground border border-border"),children:[p?(0,r.jsx)(eo,{blocks:o.blocks,showCards:!c,mobileSimple:i}):(0,r.jsx)(ea,{text:o.text,showCards:!c}),(0,r.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-muted-foreground",children:[(0,r.jsx)("span",{children:m}),o.terminalId&&(0,r.jsx)("span",{title:"이 메시지가 나눈 터미널",className:"rounded border border-border/60 bg-muted/60 px-1 font-mono text-[9px] leading-4",children:o.terminalId}),(null==(t=o.meta)?void 0:t.provider)&&(0,r.jsxs)("span",{title:"답한 LLM",children:["\xb7 ",o.meta.provider,o.meta.model?" \xb7 ".concat(o.meta.model):""]}),(null==(n=o.meta)?void 0:n.stopReason)&&(0,r.jsxs)("span",{children:["\xb7 ",o.meta.stopReason]})]})]})})}var ec=n(33626),ed=n(62483);function eu(){let{client:e}=(0,m.Q)(),[t,n]=(0,a.useState)({client:e,item:null,busy:!1}),s=(0,a.useRef)(!1),l=(0,a.useRef)(e);l.current=e;let o=(0,a.useRef)(0),i=(0,a.useRef)(!1),c=t.client===e?t:null,d=(0,a.useCallback)(async()=>{if(!s.current||l.current!==e||"undefined"!=typeof document&&document.hidden)return;let t=++o.current;try{let r=await (0,ec.qK)(e);s.current&&l.current===e&&t===o.current&&n(t=>{var n;return t.client===e?{...t,item:null!=(n=r[0])?n:null}:t})}catch(r){s.current&&l.current===e&&t===o.current&&n(t=>t.client===e?{...t,item:null}:t)}},[e]);(0,a.useEffect)(()=>{s.current=!0,i.current=!1,n({client:e,item:null,busy:!1}),d();let t=globalThis.setInterval(()=>{d()},3e4),r=()=>{document.hidden||d()};return"undefined"!=typeof document&&document.addEventListener("visibilitychange",r),()=>{s.current=!1,i.current=!1,o.current++,globalThis.clearInterval(t),"undefined"!=typeof document&&document.removeEventListener("visibilitychange",r)}},[e,d]);let u=async t=>{if(!(null==c?void 0:c.item)||i.current)return;i.current=!0;let r=c.item.id;n(t=>t.client===e?{...t,busy:!0}:t);try{await (0,ec.LD)(e,r,t.id),s.current&&l.current===e&&(n(t=>{var n;return t.client===e&&(null==(n=t.item)?void 0:n.id)===r?{...t,item:null,busy:!1}:t}),await d())}catch(t){s.current&&l.current===e&&n(t=>t.client===e?{...t,busy:!1}:t)}finally{i.current=!1}};return(null==c?void 0:c.item)?(0,r.jsx)("div",{className:"px-4 py-3","data-chat-pending-decision":"",children:(0,r.jsx)(ed.l,{decision:c.item,onChoose:e=>{u(e)},busy:c.busy})}):null}function em(e){return ep(e)>240}function ep(e){return Math.max(0,e.scrollHeight-e.clientHeight-e.scrollTop)}function ef(e){var t;return null!=(t=null==e?void 0:e.querySelector('[data-slot="scroll-area-viewport"],[data-radix-scroll-area-viewport]'))?t:null}let ex=["wheel","touchmove","pointerdown","keydown"];var eh=n(56540);function eg(e){let{messages:t,pending:n,tabId:l,mobileSimple:o=!1}=e,i=(0,a.useRef)(null),c=(0,a.useRef)(null),d=(0,eh.o1)("chatScroll",l);(0,a.useEffect)(()=>{let e=ef(c.current);if(!e)return;let t=(0,eh.N2)(d);"number"==typeof t&&t>0&&(e.scrollTop=t)},[d]),(0,a.useEffect)(()=>{let e=ef(c.current);if(!e)return;let t=null,n=()=>{t&&clearTimeout(t),t=setTimeout(()=>{(0,eh.Os)(d,e.scrollTop)},250)};return e.addEventListener("scroll",n,{passive:!0}),()=>{e.removeEventListener("scroll",n),t&&clearTimeout(t)}},[d]);let[u,m]=(0,a.useState)(!1),p=(0,a.useRef)({stuck:!0}),f=(0,a.useRef)(!1),x=(0,a.useRef)(t.length);(0,a.useEffect)(()=>{let e=t[t.length-1];t.length>x.current&&(null==e?void 0:e.role)==="user"&&(f.current=!0),x.current=t.length},[t]),(0,a.useEffect)(()=>{var e,t;let n=ef(c.current),r=null==(e=i.current)?void 0:e.parentElement;if(!n||!r)return;let a=!1,s=e=>{var t;!a&&(m(em({scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,clientHeight:n.clientHeight})),t=p.current,(f.current||t.stuck)&&(f.current=!1,n.scrollTo({top:n.scrollHeight,behavior:e?"auto":"smooth"})))};s(!1);let l=()=>({scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,clientHeight:n.clientHeight}),o=null,d=()=>{let e=l();p.current=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:96;return{stuck:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:96;return ep(e)<=t}(t,n)}}(p.current,e),m(em(e))},u=()=>{m(em(l()))},x=e=>{var t;if("keydown"!==e.type||"PageUp"===(t=e.key)||"PageDown"===t||"Home"===t||"End"===t||"ArrowUp"===t||"ArrowDown"===t||" "===t||"Spacebar"===t){if("pointerdown"===e.type){a=!0,n.scrollTo({top:n.scrollTop,behavior:"auto"});return}"function"==typeof requestAnimationFrame?(null!==o&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{o=null,d()})):d()}},h=()=>{a&&(a=!1,d())};n.addEventListener("scroll",u,{passive:!0});let g=null!=(t=c.current)?t:n;for(let e of ex)g.addEventListener(e,x,{passive:!0});let b=window;null==b||b.addEventListener("pointerup",h,{passive:!0}),null==b||b.addEventListener("pointercancel",h,{passive:!0});let v=()=>{for(let e of(null!==o&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(o),o=null),n.removeEventListener("scroll",u),ex))g.removeEventListener(e,x);null==b||b.removeEventListener("pointerup",h),null==b||b.removeEventListener("pointercancel",h)};if("undefined"==typeof ResizeObserver)return v;let j=new ResizeObserver(()=>{s(!0)});return j.observe(r),()=>{j.disconnect(),v()}},[t.length,n]);let h=(0,a.useCallback)(()=>{let e=ef(c.current);p.current={stuck:!0},null==e||e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},[]);return 0!==t.length||n?(0,r.jsxs)("div",{ref:c,className:"relative flex-1 min-h-0",children:[(0,r.jsx)(s.F,{className:"h-full",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1 pt-2 ".concat("pb-24"),children:[t.map(e=>(0,r.jsx)(ei,{message:e,mobileSimple:o},e.id)),!o&&(0,r.jsx)(eu,{}),n&&(0,r.jsx)("div",{className:"flex justify-start px-4 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-sm text-muted-foreground",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-primary"}),"thinking…"]})}),(0,r.jsx)("div",{ref:i})]})}),u&&(0,r.jsx)("button",{type:"button",onClick:h,"data-elanous-jump-to-bottom":"true",className:"absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full border border-border bg-card/95 px-3 py-1.5 text-xs shadow-lg backdrop-blur transition-colors hover:bg-accent",children:"맨 아래로 ↓"})]}):(0,r.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8 text-center text-sm text-muted-foreground",children:[(0,r.jsx)("p",{children:"무엇이든 말을 걸어 보세요."}),(0,r.jsxs)("p",{className:"text-xs",children:[(0,r.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:":help"})," 를 치면 명령 목록이 나옵니다."]}),!o&&(0,r.jsx)(eu,{})]})}},87969:(e,t,n)=>{n.d(t,{$:()=>l});var r=n(46124);let a=/[.!?。!?]+\s*/g;function s(){return void 0!==window.speechSynthesis}function l(e){var t;let[n,l]=(0,r.useState)(!1);(0,r.useEffect)(()=>{l(s())},[]);let[,o]=(0,r.useState)({}),i=(0,r.useRef)(""),c=(0,r.useRef)(e.enabled);c.current=e.enabled;let d=null!=(t=e.maxBufferChars)?t:80,u=(0,r.useRef)(e.language);u.current=e.language,(0,r.useEffect)(()=>{var e,t;if(!n)return;let r=()=>o({});return window.speechSynthesis.getVoices(),null==(e=(t=window.speechSynthesis).addEventListener)||e.call(t,"voiceschanged",r),()=>{var e,t;null==(e=(t=window.speechSynthesis).removeEventListener)||e.call(t,"voiceschanged",r)}},[n]),(0,r.useEffect)(()=>{n&&(e.enabled||(window.speechSynthesis.cancel(),i.current=""))},[e.enabled,n]);let m=(0,r.useCallback)(e=>{if(!n||!c.current)return;let t=e.trim();if(!t)return;let r=new SpeechSynthesisUtterance(t),a=function(e){var t;if(!s()||!e)return null;let n=window.speechSynthesis.getVoices();if(0===n.length)return null;let r=e.toLowerCase(),a=n.find(e=>e.lang.toLowerCase()===r);if(a)return a;let l=r.split("-")[0];return null!=(t=n.find(e=>e.lang.toLowerCase().startsWith(l)))?t:null}(u.current);a&&(r.voice=a),u.current&&(r.lang=u.current),window.speechSynthesis.speak(r)},[n]),p=(0,r.useCallback)(e=>{if(!e||!c.current)return;i.current+=e;let{sentences:t,remainder:n}=function(e){let t,n=[],r=0;for(a.lastIndex=0;null!==(t=a.exec(e));){let a=t.index+t[0].length,s=e.slice(r,a).trim();s&&n.push(s),r=a}return{sentences:n,remainder:e.slice(r)}}(i.current);for(let e of(i.current=n,t))m(e);if(i.current.length>=d){let e=i.current;i.current="",m(e)}},[d,m]);return{pushText:p,flush:(0,r.useCallback)(()=>{let e=i.current.trim();i.current="",e&&m(e)},[m]),cancel:(0,r.useCallback)(()=>{n&&(window.speechSynthesis.cancel(),i.current="")},[n]),supported:n}}},92156:(e,t,n)=>{n.d(t,{vG:()=>s});var r=n(55539),a=n(46124);function s(e){let{children:t}=e;return!function(){let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{"public"===new URLSearchParams(window.location.search).get("capture")&&t(!0)},[]),e}()?(0,r.jsx)(r.Fragment,{children:t}):null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8682],{7169:(e,t,n)=>{n.d(t,{g:()=>l});var r=n(46124);let l="undefined"!=typeof document?r.useLayoutEffect:()=>{}},9131:(e,t,n)=>{n.d(t,{U:()=>o,a:()=>l});var r=n(74264);function l(e,t,n,l){var o,i,c,f,s;let d=(0,r.j)(u).current;return o=d,i=e,c=t,f=n,s=l,(o.refs[0]!==i||o.refs[1]!==c||o.refs[2]!==f||o.refs[3]!==s)&&a(d,[e,t,n,l]),d.callback}function o(e){var t,n;let l=(0,r.j)(u).current;return t=l,n=e,(t.refs.length!==n.length||t.refs.some((e,t)=>e!==n[t]))&&a(l,e),l.callback}function u(){return{callback:null,cleanup:null,refs:[]}}function a(e,t){if(e.refs=t,t.every(e=>null==e)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let l=t[e];if(null!=l)switch(typeof l){case"function":{let t=l(n);"function"==typeof t&&(r[e]=t);break}case"object":l.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(null!=n)switch(typeof n){case"function":{let t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}},10517:(e,t,n)=>{n.d(t,{K:()=>i});var r,l=n(46124),o=n(74264);let u=(r||(r=n.t(l,2)))["useInsertionEffect".concat(Math.random().toFixed(1)).slice(0,-3)],a=u&&u!==l.useLayoutEffect?u:e=>e();function i(e){let t=(0,o.j)(c).current;return t.next=e,a(t.effect),t.trampoline}function c(){let e={next:void 0,callback:f,trampoline:function(){for(var t,n=arguments.length,r=Array(n),l=0;l<n;l++)r[l]=arguments[l];return null==(t=e.callback)?void 0:t.call(e,...r)},effect:()=>{e.callback=e.next}};return e}function f(){}},17154:(e,t,n)=>{n.d(t,{F:()=>u});var r=n(20852);let l=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,o=r.$,u=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return o(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:u,defaultVariants:a}=t,i=Object.keys(u).map(e=>{let t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;let o=l(t)||l(r);return u[e][o]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return o(e,i,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:r,...l}=t;return Object.entries(l).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...c}[t]):({...a,...c})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}},20892:(e,t,n)=>{n.d(t,{A:()=>r});let r=function(e,...t){let n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`}},31491:(e,t,n)=>{function r(){}n.d(t,{t0:()=>l,tE:()=>r}),Object.freeze([]);let l=Object.freeze({})},38956:(e,t,n)=>{n.d(t,{s:()=>f});var r=n(46124),l=n(94205),o=n(10517),u=n(7169),a=n(89330),i=n(20892);let c=r.createContext(void 0);function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{disabled:t=!1,focusableWhenDisabled:n,tabIndex:l=0,native:f=!0,composite:d}=e,v=r.useRef(null),p=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=r.useContext(c);if(void 0===t&&!e)throw Error((0,i.A)(16));return t}(!0),y=null!=d?d:void 0!==p,{props:b}=function(e){let{focusableWhenDisabled:t,disabled:n,composite:l=!1,tabIndex:o=0,isNativeButton:u}=e,a=l&&!1!==t,i=l&&!1===t;return{props:r.useMemo(()=>{let e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return l||(e.tabIndex=o,!u&&n&&(e.tabIndex=t?o:-1)),(u&&(t||a)||!u&&n)&&(e["aria-disabled"]=n),u&&(!t||i)&&(e.disabled=n),e},[l,n,t,a,i,u,o])}}({focusableWhenDisabled:n,disabled:t,composite:y,tabIndex:l,isNativeButton:f}),m=r.useCallback(()=>{let e=v.current;s(e)&&y&&t&&void 0===b.disabled&&e.disabled&&(e.disabled=!1)},[t,b.disabled,y]);return(0,u.g)(m,[m]),{getButtonProps:r.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onClick:n,onMouseDown:r,onKeyUp:l,onKeyDown:o,onPointerDown:u,...i}=e,c=f?"button":void 0;return(0,a.v6)({type:c,onClick(e){if(t)return void e.preventDefault();null==n||n(e)},onMouseDown(e){t||null==r||r(e)},onKeyDown(e){var r;if(t||((0,a.PT)(e),null==o||o(e),e.baseUIHandlerPrevented))return;let l=e.target===e.currentTarget,u=e.currentTarget,i=s(u),c=!f&&!!((null==(r=u)?void 0:r.tagName)==="A"&&(null==r?void 0:r.href)),d=l&&(f?i:!c),v="Enter"===e.key,p=" "===e.key,b=u.getAttribute("role"),m=(null==b?void 0:b.startsWith("menuitem"))||"option"===b||"gridcell"===b;if(l&&y&&p){if(e.defaultPrevented&&m)return;e.preventDefault(),c||f&&i?(u.click(),e.preventBaseUIHandler()):d&&(null==n||n(e),e.preventBaseUIHandler());return}d&&(!f&&(p||v)&&e.preventDefault(),!f&&v&&(null==n||n(e)))},onKeyUp(e){if(!t){if((0,a.PT)(e),null==l||l(e),e.target===e.currentTarget&&f&&y&&s(e.currentTarget)&&" "===e.key)return void e.preventDefault();!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||f||y||" "!==e.key||null==n||n(e))}},onPointerDown(e){if(t)return void e.preventDefault();null==u||u(e)}},f?void 0:{role:"button"},b,i)},[t,b,y,f]),buttonRef:(0,o.K)(e=>{v.current=e,m()})}}function s(e){return(0,l.sb)(e)&&"BUTTON"===e.tagName}},56992:(e,t,n)=>{n.d(t,{o:()=>s});var r=n(20892),l=n(46124),o=n(9131),u=n(92451);function a(e){if(!l.isValidElement(e))return null;let t=e.props;return((0,u._)(19)?t?.ref:e.ref)??null}var i=n(80334),c=n(31491),f=n(89330);function s(e,t,n={}){let u=t.render,v=function(e,t={}){var n;let{className:r,style:l,render:u}=e,{state:s=c.t0,ref:d,props:v,stateAttributesMapping:p,enabled:y=!0}=t,b=y?"function"==typeof r?r(s):r:void 0,m=y?"function"==typeof l?l(s):l:void 0,h=y?function(e,t){let n={};for(let r in e){let l=e[r];if(t?.hasOwnProperty(r)){let e=t[r](l);null!=e&&Object.assign(n,e);continue}!0===l?n[`data-${r.toLowerCase()}`]="":l&&(n[`data-${r.toLowerCase()}`]=l.toString())}return n}(s,p):c.t0,g=y&&v?Array.isArray(n=v)?(0,f.lZ)(n):(0,f.v6)(void 0,n):void 0,k=y?(0,i.r)(h,g)??{}:c.t0;return("undefined"!=typeof document&&(y?Array.isArray(d)?k.ref=(0,o.U)([k.ref,a(u),...d]):k.ref=(0,o.a)(k.ref,a(u),d):(0,o.a)(null,null)),y)?(void 0!==b&&(k.className=(0,f.VN)(k.className,b)),void 0!==m&&(k.style=(0,i.r)(k.style,m)),k):c.t0}(t,n);return!1===n.enabled?null:function(e,t,n,o){if(t){if("function"==typeof t)return t(n,o);let e=(0,f.v6)(n,t.props);e.ref=n.ref;let r=t;return r?.$$typeof===d&&(r=l.Children.toArray(t)[0]),l.cloneElement(r,e)}if(e&&"string"==typeof e){var u,a;return u=e,a=n,"button"===u?(0,l.createElement)("button",{type:"button",...a,key:a.key}):"img"===u?(0,l.createElement)("img",{alt:"",...a,key:a.key}):l.createElement(u,a)}throw Error((0,r.A)(8))}(e,u,v,n.state??c.t0)}let d=Symbol.for("react.lazy")},74264:(e,t,n)=>{n.d(t,{j:()=>o});var r=n(46124);let l={};function o(e,t){let n=r.useRef(l);return n.current===l&&(n.current=e(t)),n}},80334:(e,t,n)=>{n.d(t,{r:()=>r});function r(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}},89330:(e,t,n)=>{n.d(t,{PT:()=>v,VN:()=>p,lZ:()=>u,v6:()=>o});var r=n(80334);let l={};function o(e,t,n,r,l){if(!n&&!r&&!l&&!e)return a(t);let o=a(e);return t&&(o=i(o,t)),n&&(o=i(o,n)),r&&(o=i(o,r)),l&&(o=i(o,l)),o}function u(e){if(0===e.length)return l;if(1===e.length)return a(e[0]);let t=a(e[0]);for(let n=1;n<e.length;n+=1)t=i(t,e[n]);return t}function a(e){return f(e)?{...s(e,l)}:function(e){let t={...e};for(let e in t){let n=t[e];c(e,n)&&(t[e]=d(n))}return t}(e)}function i(e,t){return f(t)?s(t,e):function(e,t){if(!t)return e;for(let n in t){let l=t[n];switch(n){case"style":e[n]=(0,r.r)(e.style,l);break;case"className":e[n]=p(e.className,l);break;default:c(n,l)?e[n]=function(e,t){return t?e?(...n)=>{let r=n[0];if(y(r)){v(r);let l=t(...n);return r.baseUIHandlerPrevented||e?.(...n),l}let l=t(...n);return e?.(...n),l}:d(t):e}(e[n],l):e[n]=l}}return e}(e,t)}function c(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),l=e.charCodeAt(2);return 111===n&&110===r&&l>=65&&l<=90&&("function"==typeof t||void 0===t)}function f(e){return"function"==typeof e}function s(e,t){return f(e)?e(t):e??l}function d(e){return e?(...t)=>{let n=t[0];return y(n)&&v(n),e(...t)}:e}function v(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function p(e,t){return t?e?t+" "+e:t:e}function y(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}},89545:(e,t,n)=>{n.d(t,{$:()=>u});var r=n(46124),l=n(38956),o=n(56992);let u=r.forwardRef(function(e,t){let{render:n,className:r,disabled:u=!1,focusableWhenDisabled:a=!1,nativeButton:i=!0,style:c,...f}=e,{getButtonProps:s,buttonRef:d}=(0,l.s)({disabled:u,focusableWhenDisabled:a,native:i});return(0,o.o)("button",e,{state:{disabled:u},ref:[t,d],props:[f,s]})})},92451:(e,t,n)=>{n.d(t,{_:()=>l});let r=parseInt(n(46124).version,10);function l(e){return r>=e}},94205:(e,t,n)=>{let r;function l(){return"undefined"!=typeof window}function o(e){return a(e)?(e.nodeName||"").toLowerCase():"#document"}function u(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function a(e){return!!l()&&(e instanceof Node||e instanceof u(e).Node)}function i(e){return!!l()&&(e instanceof Element||e instanceof u(e).Element)}function c(e){return!!l()&&(e instanceof HTMLElement||e instanceof u(e).HTMLElement)}function f(e){return!!l()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof u(e).ShadowRoot)}function s(e){let{overflow:t,overflowX:n,overflowY:r,display:l}=p(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==l&&"contents"!==l}function d(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function v(e){return/^(html|body|#document)$/.test(o(e))}function p(e){return u(e).getComputedStyle(e)}function y(e){var t;if("html"===o(e))return e;let n=e.assignedSlot||e.parentNode||f(e)&&e.host||(null==(t=(a(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement);return f(n)?n.host:n}n.d(t,{$4:()=>y,L9:()=>p,Ll:()=>a,Ng:()=>f,Tc:()=>d,ZU:()=>s,eu:()=>v,mq:()=>o,sb:()=>c,vq:()=>i,zk:()=>u})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8695],{8695:(e,r,n)=>{n.d(r,{Ck:()=>E,Ux:()=>h,XL:()=>k,Yk:()=>A,b_:()=>F,hM:()=>p,j3:()=>f,mP:()=>d,oE:()=>v,up:()=>y,uz:()=>b,xd:()=>w,yM:()=>c,zD:()=>g});var t=n(46124),o=n(50363),l=n(21501),u=n(67264),i=n(94306),a=n(65354),s=n(69370);function d(){let e=(0,i.M1)(),r=(0,o.jE)(),n=(0,l.I)({queryKey:a.AF.workflows(),queryFn:()=>e.getWorkflows(),refetchInterval:6e4});return(0,t.useEffect)(()=>{let n=e.workflowsEventsUrl();if(n)return(0,s.BX)(n,{events:{change:()=>{r.invalidateQueries({queryKey:a.AF.workflows()})}}})},[e,r]),n}function f(e){var r;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=(0,i.M1)();return(0,l.I)({queryKey:a.AF.workflow(e),queryFn:()=>t.getWorkflow(e),enabled:null!=(r=n.enabled)?r:e.length>0})}function c(){let e=(0,i.M1)(),r=(0,o.jE)();return(0,u.n)({mutationFn:r=>{let{name:n,body:t}=r;return e.saveWorkflow(n,t)},onSuccess:(e,n)=>{let{name:t}=n;r.invalidateQueries({queryKey:a.AF.workflows()}),r.invalidateQueries({queryKey:a.AF.workflow(t)})}})}function v(){let e=(0,i.M1)(),r=(0,o.jE)();return(0,u.n)({mutationFn:r=>{let{name:n,scope:t}=r;return e.deleteWorkflow(n,t?{scope:t}:void 0)},onSuccess:(e,n)=>{let{name:t}=n;r.invalidateQueries({queryKey:a.AF.workflows()}),r.invalidateQueries({queryKey:a.AF.workflow(t)})}})}function w(){let e=(0,i.M1)();return(0,u.n)({mutationFn:r=>{let{yaml:n,signal:t}=r;return e.validateWorkflow(n,t?{signal:t}:void 0)}})}function y(){let e=(0,i.M1)();return(0,u.n)({mutationFn:r=>e.generateWorkflow(r)})}function p(){let e=(0,i.M1)();return(0,u.n)({mutationFn:r=>e.synthesizeWorkflow(r)})}function k(){let e=(0,i.M1)();return(0,u.n)({mutationFn:r=>{let{name:n,args:t,dryRun:o}=r;return e.runWorkflow(n,t,o?{dryRun:!0}:void 0)}})}function F(){var e;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,i.M1)();return(0,l.I)({queryKey:a.AF.workflowRuns(),queryFn:()=>n.getWorkflowRuns(),enabled:null==(e=r.enabled)||e,refetchInterval:3e4})}function g(){var e;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,i.M1)();return(0,l.I)({queryKey:a.AF.pendingApprovals(),queryFn:()=>n.getPendingApprovals(),enabled:null==(e=r.enabled)||e,refetchInterval:1e3})}function A(){let e=(0,i.M1)(),r=(0,o.jE)();return(0,u.n)({mutationFn:r=>{let{runId:n,response:t}=r;return e.approveRun(n,t?{response:t}:{})},onSuccess:(e,n)=>{let{runId:t}=n;r.invalidateQueries({queryKey:a.AF.pendingApprovals()}),r.invalidateQueries({queryKey:a.AF.workflowRun(t)})}})}function h(){let e=(0,i.M1)(),r=(0,o.jE)();return(0,u.n)({mutationFn:r=>{let{runId:n,reason:t}=r;return e.rejectRun(n,t?{reason:t}:{})},onSuccess:(e,n)=>{let{runId:t}=n;r.invalidateQueries({queryKey:a.AF.pendingApprovals()}),r.invalidateQueries({queryKey:a.AF.workflowRun(t)})}})}function b(e){let r=(0,i.M1)();return(0,l.I)({queryKey:e?a.AF.workflowRun(e):["nexus","workflow-run","__none__"],queryFn:()=>{if(!e)throw Error("runId required");return r.getWorkflowRun(e)},enabled:!!e,refetchInterval:e=>{let r=e.state.data;return r?void 0===r.ok&&3e4:3e4}})}function E(){var e;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,i.M1)(),l=(0,o.jE)(),u=null==(e=r.enabled)||e,s=r.EventSourceImpl;(0,t.useEffect)(()=>{if(u)return function(e,r){var n;let t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=null!=(n=o.EventSourceImpl)?n:globalThis.EventSource;if(!l)return()=>{};let u="".concat(e,"/v1/events?topics=").concat(encodeURIComponent("workflow."));try{t=new l(u)}catch(e){return()=>{}}let i=e=>{try{var r;let n=JSON.parse(e.data);if("string"==typeof(null==n||null==(r=n.detail)?void 0:r.runId)&&n.detail.runId.length>0)return n.detail.runId}catch(e){}};for(let e of(t.addEventListener("workflow.approval.pending",()=>r.onApprovalPending()),t.addEventListener("workflow.approval.resolved",e=>r.onApprovalResolved(i(e))),["workflow.run.started","workflow.run.node-started","workflow.run.node-skipped","workflow.run.node-done","workflow.run.completed","workflow.run.failed"]))t.addEventListener(e,e=>r.onRunEvent(i(e)));return()=>{try{t.close()}catch(e){}}}(n.baseUrl,{onApprovalPending:()=>l.invalidateQueries({queryKey:a.AF.pendingApprovals()}),onApprovalResolved:e=>{l.invalidateQueries({queryKey:a.AF.pendingApprovals()}),e&&l.invalidateQueries({queryKey:a.AF.workflowRun(e)})},onRunEvent:e=>{l.invalidateQueries({queryKey:a.AF.workflowRuns()}),e&&l.invalidateQueries({queryKey:a.AF.workflowRun(e)})}},s?{EventSourceImpl:s}:{})},[n.baseUrl,u,l,s])}},69370:(e,r,n)=>{n.d(r,{BX:()=>o});let t=new Map;function o(e,r){var n,o;let l=t.get(e);if(!l){let o;try{o=new EventSource(e)}catch(e){return null==(n=r.onConstructError)||n.call(r,e),()=>{}}let u={source:o,subscribers:new Set};o.onmessage=e=>{var r,n;for(let t of[...u.subscribers])null==(r=(n=t.handlers).onMessage)||r.call(n,e)},o.onerror=e=>{var r,n;for(let t of[...u.subscribers])null==(r=(n=t.handlers).onError)||r.call(n,e)},t.set(e,u),l=u}let u=l,i=[];for(let[e,n]of Object.entries(null!=(o=r.events)?o:{})){let r=e=>{n(e)};u.source.addEventListener(e,r),i.push([e,r])}let a={handlers:r};u.subscribers.add(a);let s=!1;return()=>{if(!s){for(let[e,r]of(s=!0,i))try{u.source.removeEventListener(e,r)}catch(e){}if(u.subscribers.delete(a),0===u.subscribers.size){try{u.source.close()}catch(e){}t.get(e)===u&&t.delete(e)}}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9070],{29070:(e,t,n)=>{n.r(t),n.d(t,{PtyLiveView:()=>m});var r=n(55539),s=n(46124),l=n(54888),a=n(18808),c=n(51224);n(15232);let o={failures:0,stopped:!1,message:null,screen:null},u=/^\[screen \d+x\d+ cursor=[^\]\n]*\]\r?\n/;function i(e){let t=e.replace(u,"").replace(/\r?\n/g,"\r\n");return"\x1b[H\x1b[2J".concat(t)}function d(e,t){var n;if(e.stopped)return e;if((null==t?void 0:t.status)==="success"&&"string"==typeof t.screen)return{failures:0,stopped:!1,message:null,screen:i(t.screen)};if((null==t?void 0:t.status)==="unknown-pty")return{...e,stopped:!0,message:"PTY 가 끝났습니다"};if((null==t?void 0:t.status)==="denied")return{...e,failures:0,stopped:!0,message:t.reason||"화면 조회가 거부되었습니다"};let r=e.failures+1;return(null==t?void 0:t.status)!=="owner-unreachable"?{...e,failures:r,stopped:r>=5,message:(null==t?void 0:t.reason)||"화면 조회에 실패했습니다"}:{...e,failures:r,stopped:r>=5,message:r>=5?"소유 프로세스에 닿지 않습니다":null!=(n=t.reason)?n:null}}var p=n(72215);function m(e){var t,n;let{terminal:u,client:m,onClose:f}=e,h=(0,s.useRef)(null),v=(0,s.useRef)(null),g=(0,s.useRef)(null),b=(0,s.useRef)(o),[w,x]=(0,s.useState)(!1),[y,k]=(0,s.useState)(!1),T=(0,s.useRef)(!1),[R,S]=(0,s.useState)(null),[P,M]=(0,s.useState)("connecting");return(0,s.useEffect)(()=>{var e,t,n;let r;if(!h.current)return;let s={closed:!1,owned:!1,accepting:!1,queue:Promise.resolve(),takeover:null,release:null};g.current=s,T.current=!1,k(!1);let f={sourceRoot:null==(e=u.sourceRoot)?void 0:e.dbPath},w=new l.B({cols:110,rows:40,fontFamily:'"JetBrainsMono Nerd Font", "JetBrains Mono", monospace',fontSize:13,theme:{background:"#0d0c08",foreground:"#e9e3d4",cursor:"#e9e3d4"},cursorBlink:!1,disableStdin:!0,scrollback:0,allowProposedApi:!0});w.loadAddon(new a.c),w.loadAddon(new c.I),w.unicode.activeVersion="11",w.open(h.current),w.write("\x1b[?25l"),v.current=w,b.current=o,x(!1),S(null);let y=w.onData(e=>{if(!s.accepting||s.closed||!e)return;let t=e.startsWith("\x1b")||"\r"===e||"\n"===e||""===e||" "===e||"\x03"===e;s.queue=s.queue.then(async()=>{try{let n=t?await m.sendTerminalKey(u.id,e,f):await m.sendTerminalText(u.id,e,f);if(s.closed)return;"success"!==n.status&&("denied"===n.status&&(s.accepting=!1,x(!1),w.options.disableStdin=!0),S(n.reason||"입력 실패: ".concat(n.status)))}catch(e){s.closed||S("입력 전송 실패: ".concat(String(e)))}})}),R=h.current,P=!1,j=e=>{s.queue=s.queue.then(async()=>{try{var t;if(!m.sendTerminalMouse)return;let n=await m.sendTerminalMouse(u.id,e,f);if(s.closed||"success"===n.status)return;if((t=n.reason)&&/mouse mode is off|\?1006/i.test(t)){"click"!==e.kind||P||(P=!0,S("이 앱은 마우스를 받지 않는다(마우스 모드 꺼짐) — 키보드로 조작하세요."));return}S(n.reason||"마우스 전송 실패: ".concat(n.status))}catch(e){s.closed||S("마우스 전송 실패: ".concat(String(e)))}})},E=e=>{var t;let n=null==(t=w.element)?void 0:t.querySelector(".xterm-screen");return n?function(e,t,n,r,s){if(!(n.width>0)||!(n.height>0)||r<1||s<1)return null;let l=Math.floor((e-n.left)/n.width*r)+1,a=Math.floor((t-n.top)/n.height*s)+1;return{x:Math.min(r,Math.max(1,l)),y:Math.min(s,Math.max(1,a))}}(e.clientX,e.clientY,n.getBoundingClientRect(),w.cols,w.rows):null},N=()=>s.accepting&&!s.closed&&"none"===w.modes.mouseTrackingMode,Y=e=>{var t;if(!N())return;let n=0===(t=e.button)?"left":1===t?"middle":2===t?"right":null,r=E(e);n&&r&&j({...r,kind:"click",button:n})},q=e=>{if(!N()||0===e.deltaY)return;let t=E(e);t&&(e.preventDefault(),e.stopPropagation(),j({...t,kind:e.deltaY<0?"scroll-up":"scroll-down"}))};null==(t=R.addEventListener)||t.call(R,"mousedown",Y,{capture:!0}),null==(n=R.addEventListener)||n.call(R,"wheel",q,{passive:!1,capture:!0});let L=async()=>{var e,t,n,l;if(!s.closed&&(e=!document.hidden,t=b.current,e&&!t.stopped)){try{let e=await m.snapshotTerminal(u.id,{ansi:!0,sourceRoot:f.sourceRoot});if(s.closed)return;let t=d(b.current,e);b.current=t,null!==t.screen&&"success"===e.status&&w.write(t.screen+"\x1b[?25l"),S(t.message)}catch(t){if(s.closed)return;let e=d(b.current,null);b.current=e,S(e.message)}s.closed||(n=!document.hidden,l=b.current,!n||l.stopped)||(r=setTimeout(()=>{L()},800))}},z=!m.streamTerminal,B=null,C=()=>{!m.streamTerminal||s.closed||z||(M("connecting"),B=m.streamTerminal(u.id,{sourceRoot:f.sourceRoot},e=>{s.closed||("mode"===e.type?M("bytes"===e.mode?"stream-bytes":"stream-screen"):"reset"===e.type||"screen"===e.type?(w.write(i(e.screen)+"\x1b[?25l"),S(null)):"data"===e.type?w.write(e.chunk):"end"===e.type?(S("PTY 가 끝났습니다"),b.current={...b.current,stopped:!0}):"status"===e.type&&S("화면 조회: ".concat(e.status)))},e=>{s.closed||((0,p.cY)("pwa.terminal.stream-fallback",{id:u.id,reason:e}),z=!0,M("poll"),L())}))},_=()=>{if(r&&clearTimeout(r),r=void 0,!z)return void(document.hidden?(null==B||B(),B=null):B||b.current.stopped||C());document.hidden||s.closed||b.current.stopped||L()};return document.addEventListener("visibilitychange",_),z?(M("poll"),L()):C(),()=>{var e,t;s.closed=!0,s.accepting=!1,r&&clearTimeout(r),null==B||B(),document.removeEventListener("visibilitychange",_),y.dispose(),null==(e=R.removeEventListener)||e.call(R,"mousedown",Y,{capture:!0}),null==(t=R.removeEventListener)||t.call(R,"wheel",q,{capture:!0}),(async()=>{if(await s.takeover,s.release&&await s.release,s.owned){await s.queue;try{let e=await m.controlTerminal(u.id,"release",f);"success"===e.status&&(s.owned=!1)}catch(e){}}})(),g.current===s&&(g.current=null),v.current=null,w.dispose()}},[m,u.id,null==(t=u.sourceRoot)?void 0:t.dbPath]),(0,r.jsxs)("section",{className:"flex h-full min-h-0 flex-col bg-[#0d0c08]","aria-label":"PTY 라이브 화면",children:[(0,r.jsxs)("header",{className:"flex flex-wrap items-center gap-3 border-b border-zinc-700 px-3 py-2 text-sm text-zinc-100",children:[(0,r.jsx)("span",{className:"font-mono",children:u.id}),(0,r.jsx)("span",{children:null!=(n=u.kind)?n:"PTY"}),(0,r.jsx)("span",{children:w?"입력 가능":"읽기 전용"}),(0,r.jsx)("span",{className:"rounded bg-zinc-800 px-1.5 py-0.5 font-mono text-[10px] text-zinc-300","data-pty-feed":P,title:"화면을 받는 방식",children:"stream-bytes"===P?"● 실시간":"stream-screen"===P?"● 실시간(화면)":"poll"===P?"폴링 0.8s":"연결 중"}),(0,r.jsx)("button",{type:"button",disabled:y,onClick:()=>{(e=>{var t;let n=g.current;if(!n||n.closed||T.current)return;T.current=!0,k(!0);let r={sourceRoot:null==(t=u.sourceRoot)?void 0:t.dbPath};"release"===e&&(n.accepting=!1,v.current&&(v.current.options.disableStdin=!0));let s=(async()=>{try{"release"===e&&await n.queue;let t=await m.controlTerminal(u.id,e,r);if("success"===t.status&&(n.owned="takeover"===e),n.closed)return;"success"===t.status?(n.accepting="takeover"===e,x(n.accepting),v.current&&(v.current.options.disableStdin=!n.accepting),S(null)):("release"===e&&(n.accepting=n.owned,v.current&&(v.current.options.disableStdin=!n.accepting)),S(t.reason||("denied"===t.status?"제어 거부: 권한이 없습니다":"제어 실패: ".concat(t.status))))}catch(t){n.closed||("release"===e&&(n.accepting=n.owned,v.current&&(v.current.options.disableStdin=!n.accepting)),S("제어 요청 실패: ".concat(String(t))))}finally{n.closed||(T.current=!1,k(!1))}})();"takeover"===e?n.takeover=s:n.release=s})(w?"release":"takeover")},children:w?"release":"takeover"}),(0,r.jsx)("button",{type:"button",onClick:f,"aria-label":"PTY 라이브 닫기",children:"닫기"})]}),R&&(0,r.jsx)("p",{role:"status",className:"px-3 py-1 text-amber-300",children:R}),(0,r.jsx)("div",{ref:h,className:"min-h-0 flex-1 overflow-auto","aria-label":"".concat(u.id," 화면")})]})}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9103],{3004:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},5358:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]])},6164:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},8819:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},16199:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},18536:t=>{t.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_7a3ec7",variable:"__variable_7a3ec7"}},26741:(t,e,s)=>{"use strict";s.d(e,{y:()=>a});var r=s(46124);let i=[];function a(t){r.useEffect(t,i)}},27143:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]])},35622:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},44422:(t,e,s)=>{"use strict";s.d(e,{B:()=>h});var r=s(46124),i=s(55504),a=s(55539);let u=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new i.E,currentIdRef:{current:null},currentContextRef:{current:null}});function c(t){let{children:e,delay:s,timeoutMs:c=0}=t,n=r.useRef(s),h=r.useRef(s),l=r.useRef(null),o=r.useRef(null),d=(0,i.Z)();return(0,a.jsx)(u.Provider,{value:r.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:h,currentIdRef:l,timeoutMs:c,currentContextRef:o,timeout:d}),[c,d]),children:e})}let n=r.createContext(void 0),h=function(t){let{delay:e,closeDelay:s,timeout:i=400}=t,u=r.useMemo(()=>({delay:e,closeDelay:s}),[e,s]),h=r.useMemo(()=>({open:e,close:s}),[e,s]);return(0,a.jsx)(n.Provider,{value:u,children:(0,a.jsx)(c,{delay:h,timeoutMs:i,children:t.children})})}},46586:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},51748:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},51907:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("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"}]])},55504:(t,e,s)=>{"use strict";s.d(e,{E:()=>a,Z:()=>u});var r=s(74264),i=s(26741);class a{static create(){return new a}start(t,e){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,e()},t)}isStarted(){return 0!==this.currentId}constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}}function u(){let t=(0,r.j)(a.create).current;return(0,i.y)(t.disposeEffect),t}},58603:(t,e,s)=>{"use strict";var r=s(99027);s.o(r,"useParams")&&s.d(e,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(e,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(e,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(e,{useSearchParams:function(){return r.useSearchParams}})},59587:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},67264:(t,e,s)=>{"use strict";s.d(e,{n:()=>l});var r=s(46124),i=s(17600),a=s(92477),u=s(33814),c=s(40404),n=class extends u.Q{#t;#e=void 0;#s;#r;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,c.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,c.EN)(e.mutationKey)!==(0,c.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#a(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#a()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#i(){let t=this.#s?.state??(0,i.$)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#a(t){a.jG.batch(()=>{if(this.#r&&this.hasListeners()){let e=this.#e.variables,s=this.#e.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,s,r)}catch(t){Promise.reject(t)}try{this.#r.onSettled?.(t.data,null,e,s,r)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,s,r)}catch(t){Promise.reject(t)}try{this.#r.onSettled?.(void 0,t.error,e,s,r)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}},h=s(50363);function l(t,e){let s=(0,h.jE)(e),[i]=r.useState(()=>new n(s,t));r.useEffect(()=>{i.setOptions(t)},[i,t]);let u=r.useSyncExternalStore(r.useCallback(t=>i.subscribe(a.jG.batchCalls(t)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=r.useCallback((t,e)=>{i.mutate(t,e).catch(c.lQ)},[i]);if(u.error&&(0,c.GU)(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:l,mutateAsync:u.mutate}}},69122:(t,e,s)=>{"use strict";s.d(e,{D:()=>u});var r=s(46124),i=r.createContext(void 0),a={setTheme:t=>{},themes:[]},u=()=>{var t;return null!=(t=r.useContext(i))?t:a}},69147:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},72937:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},74264:(t,e,s)=>{"use strict";s.d(e,{j:()=>a});var r=s(46124);let i={};function a(t,e){let s=r.useRef(i);return s.current===i&&(s.current=t(e)),s}},75342:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},76573:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},81694:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},82142:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("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"}]])},85833:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},87285:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},88069:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},92988:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},94226:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]])},99426:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(3704).A)("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]])}}]);