@co0ontty/wand 4.106.0 → 4.106.1

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 (279) hide show
  1. package/README.md +2 -2
  2. package/dist/ai-text-runner.js +24 -14
  3. package/dist/build-info.d.ts +2 -0
  4. package/dist/build-info.js +18 -0
  5. package/dist/build-info.json +3 -3
  6. package/dist/cli.js +8 -2
  7. package/dist/daemon-maintenance-state.js +1 -1
  8. package/dist/daemon-maintenance-targets.d.ts +1 -0
  9. package/dist/daemon-maintenance-targets.js +25 -9
  10. package/dist/daemon-maintenance.d.ts +3 -0
  11. package/dist/daemon-maintenance.js +60 -13
  12. package/dist/employee-im-types.d.ts +1 -1
  13. package/dist/employee-input-scheduling.d.ts +4 -0
  14. package/dist/employee-knowledge-cli.js +5 -5
  15. package/dist/employee-knowledge.d.ts +3 -1
  16. package/dist/employee-knowledge.js +24 -8
  17. package/dist/git-quick-commit.d.ts +2 -0
  18. package/dist/git-quick-commit.js +15 -2
  19. package/dist/git-worktree-batch.d.ts +26 -0
  20. package/dist/git-worktree-batch.js +139 -0
  21. package/dist/global-knowledge.d.ts +12 -0
  22. package/dist/global-knowledge.js +124 -0
  23. package/dist/iteration-log.d.ts +13 -5
  24. package/dist/iteration-log.js +120 -59
  25. package/dist/knowledge-types.d.ts +12 -1
  26. package/dist/knowledge-types.js +4 -0
  27. package/dist/middleware/api-scope.js +1 -0
  28. package/dist/model-groups.js +6 -3
  29. package/dist/models/parsers/opencode.js +31 -1
  30. package/dist/models.js +15 -14
  31. package/dist/npm-update-utils.d.ts +5 -2
  32. package/dist/npm-update-utils.js +34 -4
  33. package/dist/opencode-cli.d.ts +6 -0
  34. package/dist/opencode-cli.js +51 -0
  35. package/dist/opencode-system-fallback.d.ts +1 -0
  36. package/dist/opencode-system-fallback.js +16 -4
  37. package/dist/pi-native-event-bridge.js +55 -3
  38. package/dist/pi-native-input.d.ts +22 -0
  39. package/dist/pi-native-input.js +77 -0
  40. package/dist/pi-tmux-host.d.ts +14 -5
  41. package/dist/pi-tmux-host.js +68 -17
  42. package/dist/process-manager.js +17 -3
  43. package/dist/pty-tmux-backend.d.ts +27 -2
  44. package/dist/pty-tmux-backend.js +471 -70
  45. package/dist/pty-tmux-log.d.ts +1 -1
  46. package/dist/pty-tmux-log.js +23 -2
  47. package/dist/retention-protection.d.ts +1 -1
  48. package/dist/retention-protection.js +3 -2
  49. package/dist/retention.d.ts +5 -0
  50. package/dist/retention.js +11 -0
  51. package/dist/server-knowledge-routes.js +2 -2
  52. package/dist/server-session-input-routes.js +38 -19
  53. package/dist/server-session-lifecycle-routes.js +14 -1
  54. package/dist/server-session-worktree-routes.js +105 -12
  55. package/dist/server-task-routes.js +41 -12
  56. package/dist/server-workspace-routes.js +77 -9
  57. package/dist/server.js +67 -35
  58. package/dist/session-registry.d.ts +17 -3
  59. package/dist/session-registry.js +66 -13
  60. package/dist/session-service.js +1 -1
  61. package/dist/storage/internal.d.ts +4 -3
  62. package/dist/storage/internal.js +3 -3
  63. package/dist/storage/knowledge-repository.d.ts +5 -0
  64. package/dist/storage/knowledge-repository.js +75 -16
  65. package/dist/storage/mappers.d.ts +1 -0
  66. package/dist/storage/mappers.js +6 -1
  67. package/dist/storage/migrations.js +60 -0
  68. package/dist/storage/session-input-repository.d.ts +19 -0
  69. package/dist/storage/session-input-repository.js +35 -0
  70. package/dist/storage/task-workflow-repository.d.ts +29 -0
  71. package/dist/storage/task-workflow-repository.js +110 -0
  72. package/dist/storage/tasks-repository.d.ts +6 -1
  73. package/dist/storage/tasks-repository.js +94 -34
  74. package/dist/storage/workspaces-repository.d.ts +7 -0
  75. package/dist/storage/workspaces-repository.js +28 -2
  76. package/dist/storage-cleanup.d.ts +7 -2
  77. package/dist/storage-cleanup.js +16 -0
  78. package/dist/storage-schema.js +2 -0
  79. package/dist/storage.d.ts +5 -1
  80. package/dist/storage.js +12 -0
  81. package/dist/structured-exec-host.d.ts +4 -0
  82. package/dist/structured-exec-pump.d.ts +1 -0
  83. package/dist/structured-exec-pump.js +18 -11
  84. package/dist/structured-opencode-adapter.d.ts +2 -1
  85. package/dist/structured-opencode-adapter.js +32 -8
  86. package/dist/structured-pi-adapter.js +13 -2
  87. package/dist/structured-runner.d.ts +6 -0
  88. package/dist/structured-session-manager-replay.d.ts +2 -0
  89. package/dist/structured-session-manager-replay.js +27 -0
  90. package/dist/structured-session-manager.d.ts +32 -21
  91. package/dist/structured-session-manager.js +395 -118
  92. package/dist/structured-tmux-host.d.ts +23 -2
  93. package/dist/structured-tmux-host.js +143 -20
  94. package/dist/task-actions.js +5 -3
  95. package/dist/task-archive-policy.js +2 -1
  96. package/dist/task-comment-dispatch.d.ts +2 -1
  97. package/dist/task-comment-dispatch.js +19 -6
  98. package/dist/task-execution-queue.d.ts +2 -0
  99. package/dist/task-execution-queue.js +10 -10
  100. package/dist/task-hierarchy.js +1 -1
  101. package/dist/task-read-model.d.ts +1 -1
  102. package/dist/task-read-model.js +2 -1
  103. package/dist/task-types.d.ts +34 -3
  104. package/dist/task-types.js +21 -5
  105. package/dist/task-workflow-cli.d.ts +2 -0
  106. package/dist/task-workflow-cli.js +29 -0
  107. package/dist/task-workflow-runner.d.ts +4 -0
  108. package/dist/task-workflow-runner.js +36 -0
  109. package/dist/task-workflow.d.ts +13 -0
  110. package/dist/task-workflow.js +48 -0
  111. package/dist/terminal-daemon-server.js +12 -4
  112. package/dist/tmux-policy.d.ts +9 -0
  113. package/dist/tmux-policy.js +46 -0
  114. package/dist/tmux-terminal-host.js +5 -2
  115. package/dist/tui/commands.js +2 -1
  116. package/dist/types.d.ts +5 -0
  117. package/dist/wand-task-sync.js +5 -0
  118. package/dist/web-ui/content/ai-teams.js +9 -9
  119. package/dist/web-ui/content/module-manifest.json +1 -1
  120. package/dist/web-ui/content/modules/{52574891ef08e29b → 014fa5c6f973badf}/host.js +3 -3
  121. package/dist/web-ui/content/modules/0818b1d31a11d006/employee-profile.js +1 -0
  122. package/dist/web-ui/content/modules/{31157ceb6d23b809 → 0a58d9ec273078e4}/chunk.js +3 -3
  123. package/dist/web-ui/content/modules/{bf3ee58e0da44822 → 0a979dcd165cd0cc}/chunk.js +1 -1
  124. package/dist/web-ui/content/modules/{5f298a8f43dd0589 → 0c143928e8f96abc}/chunk.js +1 -1
  125. package/dist/web-ui/content/modules/0e9e42a319f6b8fc/workspace-window.js +1 -0
  126. package/dist/web-ui/content/modules/{b713cad51ca4c512 → 0f0d1769b732c0bd}/chunk.js +1 -1
  127. package/dist/web-ui/content/modules/{4970319a83432ec7 → 1447886e6a1e74a4}/chunk.js +1 -1
  128. package/dist/web-ui/content/modules/151c734cbca31da5/host.js +1 -0
  129. package/dist/web-ui/content/modules/{e5174201f9d918fb → 16e4ab9c5263fcfd}/chunk.js +1 -1
  130. package/dist/web-ui/content/modules/17e752fb53952753/host.js +1 -0
  131. package/dist/web-ui/content/modules/{913187c92a98a1ac → 20ed1454fc09fa6f}/chunk.js +1 -1
  132. package/dist/web-ui/content/modules/255a3baf59d2b734/home.js +6 -0
  133. package/dist/web-ui/content/modules/{2f801e53dda62770 → 296dd81886c42b45}/chunk.js +1 -1
  134. package/dist/web-ui/content/modules/{8891ca8165435ca1 → 2a01f4e525c0725e}/chunk.js +1 -1
  135. package/dist/web-ui/content/modules/2ab4409c82b44fba/markdown.js +1 -0
  136. package/dist/web-ui/content/modules/2c955eced11610c2/chunk.js +1 -0
  137. package/dist/web-ui/content/modules/2d7ee4f9e2c0aca4/panel.js +1 -0
  138. package/dist/web-ui/content/modules/{3f8830f8ad28decc → 33ae550e4a295c85}/chunk.js +1 -1
  139. package/dist/web-ui/content/modules/35f4aa4443696bd0/chunk.js +1 -0
  140. package/dist/web-ui/content/modules/388b37ffcce9d4ff/host.js +1 -0
  141. package/dist/web-ui/content/modules/39279604dcdac7c7/runtime.js +338 -0
  142. package/dist/web-ui/content/modules/{57c357d321db5df9 → 3a3cdff2a662b7d3}/chunk.js +1 -1
  143. package/dist/web-ui/content/modules/{d49f106c4d106057 → 3ab646be55514243}/chunk.js +1 -1
  144. package/dist/web-ui/content/modules/{16dab1297efd71a7 → 3ae88a5c5e1949d2}/chunk.js +1 -1
  145. package/dist/web-ui/content/modules/3e3b0e71d6ce80d8/chunk.js +1 -0
  146. package/dist/web-ui/content/modules/{ec33e17c00c1eb24 → 434aaaaf9604dc34}/chunk.js +1 -1
  147. package/dist/web-ui/content/modules/4385cd48771e1d4f/host.js +1 -0
  148. package/dist/web-ui/content/modules/{face3dbf117d63e3 → 4638129d60f549a0}/chunk.js +1 -1
  149. package/dist/web-ui/content/modules/47407209931b7011/host.js +13 -0
  150. package/dist/web-ui/content/modules/4829dd712d8b366b/chunk.js +1 -0
  151. package/dist/web-ui/content/modules/488d5b747bf374c8/chunk.js +1 -0
  152. package/dist/web-ui/content/modules/{ed7405f064944215 → 4ab085c195f7d76a}/sha256.js +1 -1
  153. package/dist/web-ui/content/modules/{f27a5d3c6c02a71c → 4c485bd44740fec7}/chunk.js +1 -1
  154. package/dist/web-ui/content/modules/{771439a41e737ee2 → 4ca0494308ab2bb3}/chunk.js +1 -1
  155. package/dist/web-ui/content/modules/4ec571218779ba3e/composer-surface-adapter.js +1 -0
  156. package/dist/web-ui/content/modules/{5933ce8965aa4004 → 5023bf0294c2e7cb}/chunk.js +1 -1
  157. package/dist/web-ui/content/modules/{e63582a3bce48f7d → 5456e3417600bf15}/chunk.js +1 -1
  158. package/dist/web-ui/content/modules/55c588b0f5b41a52/host-bridge.js +1 -0
  159. package/dist/web-ui/content/modules/{9d941d6ff39861b8 → 5c3c8237ba7d8460}/chunk.js +1 -1
  160. package/dist/web-ui/content/modules/624b858da9834757/host.js +1 -0
  161. package/dist/web-ui/content/modules/6290be936320d4b1/host.js +1 -0
  162. package/dist/web-ui/content/modules/66be408793048cc3/progress.js +1 -0
  163. package/dist/web-ui/content/modules/67a11176a563317b/chunk.js +1 -0
  164. package/dist/web-ui/content/modules/{e060508ecd50fa7e → 68ef6ec7d26d78cd}/chunk.js +1 -1
  165. package/dist/web-ui/content/modules/{41445c6589dba325 → 6ec3e41df31927d9}/host.js +2 -2
  166. package/dist/web-ui/content/modules/{97d7f267959fd385 → 6f10f369445bbcbe}/chunk.js +1 -1
  167. package/dist/web-ui/content/modules/{d47d75a78ae598e3 → 7295d9ff92d5e1e7}/chunk.js +1 -1
  168. package/dist/web-ui/content/modules/{f383d892fef73483 → 72cd613de1a5f69b}/chunk.js +1 -1
  169. package/dist/web-ui/content/modules/73aae1daafeea7e7/workspaces-panel.js +4 -0
  170. package/dist/web-ui/content/modules/{c2f09c8a472f5d83 → 73d2689f13b9a3e9}/dialog-modal.js +1 -1
  171. package/dist/web-ui/content/modules/{2f97ddba3842adaa → 75cf0c048e9b92ab}/chunk.js +1 -1
  172. package/dist/web-ui/content/modules/{4ba1e8c74bed7ef2 → 75dabda3b141296e}/chunk.js +1 -1
  173. package/dist/web-ui/content/modules/{f3cff7792ba39df8 → 76c10b58d5f92d02}/login-visual.js +1 -1
  174. package/dist/web-ui/content/modules/{b63e075f222a1266 → 783583a12f5010f8}/library-bridge.js +1 -1
  175. package/dist/web-ui/content/modules/7e13a8a4a981f2f1/group-editor.js +1 -0
  176. package/dist/web-ui/content/modules/{0d76e582a7a71b2f → 7e3034fea34c6dae}/chunk.js +1 -1
  177. package/dist/web-ui/content/modules/80bf3291f2577a68/host.js +1 -0
  178. package/dist/web-ui/content/modules/{cba6f13c0b2aec1c → 82c3e08f34a6b828}/chunk.js +1 -1
  179. package/dist/web-ui/content/modules/{dedd4a19bb70e327 → 83d1f4cf82c65f19}/page.js +3 -3
  180. package/dist/web-ui/content/modules/844f97958f25240c/shell-file-panel-drawer.js +1 -0
  181. package/dist/web-ui/content/modules/{62e0023451f428cf → 899cdc467044d418}/chunk.js +1 -1
  182. package/dist/web-ui/content/modules/{5083a5dbb5b155b7 → 8c7ca1fe72741c07}/chunk.js +1 -1
  183. package/dist/web-ui/content/modules/8dae4ca2261525e4/task-board-host.js +27 -0
  184. package/dist/web-ui/content/modules/92195c14c74929da/list-filter-panel.js +1 -0
  185. package/dist/web-ui/content/modules/{a61393bfa976d8d5 → 93793696af76bcbf}/chunk.js +1 -1
  186. package/dist/web-ui/content/modules/{db521a246e14e5e4 → 97cd6af3da5622b8}/chunk.js +4 -4
  187. package/dist/web-ui/content/modules/{8de8368570ab089d → 9d3179258249ec77}/chunk.js +1 -1
  188. package/dist/web-ui/content/modules/{579d486763d47c0d → a234c484078c0568}/chunk.js +1 -1
  189. package/dist/web-ui/content/modules/a4d215448a089a7d/host.js +1 -0
  190. package/dist/web-ui/content/modules/{c0a446100d969f3e → ae003f89901c5687}/chunk.js +1 -1
  191. package/dist/web-ui/content/modules/ae712bdd45b9917e/employee-card.js +1 -0
  192. package/dist/web-ui/content/modules/{a2caed0139df4b21 → b2a15293f7965d09}/chunk.js +1 -1
  193. package/dist/web-ui/content/modules/b4ee65e9998f0088/host.js +61 -0
  194. package/dist/web-ui/content/modules/{bd3daf04a8bf4422 → b666137d17f83be9}/chunk.js +1 -1
  195. package/dist/web-ui/content/modules/{831b6c7b43e800be → b66beb6c0185256b}/host.js +1 -1
  196. package/dist/web-ui/content/modules/{816eb9b3a000fb2c → bb03b17e877657de}/chunk.js +1 -1
  197. package/dist/web-ui/content/modules/{1eab7410d5586038 → bc343afc991db1a1}/chunk.js +1 -1
  198. package/dist/web-ui/content/modules/bca45976ff8fe2ac/host.js +69 -0
  199. package/dist/web-ui/content/modules/{d434edbb2f4672e5 → c2715dbfc9eaf510}/chunk.js +1 -1
  200. package/dist/web-ui/content/modules/{d6fffe2c2a3a738d → c30c220281f35d74}/toast-region.js +1 -1
  201. package/dist/web-ui/content/modules/c4cc46fa9b4adddc/dropdown-surface.js +1 -0
  202. package/dist/web-ui/content/modules/c6dd19ee3d3ffd59/brand-identity.js +1 -0
  203. package/dist/web-ui/content/modules/c7ea6a114e6ff8ae/host.js +1 -0
  204. package/dist/web-ui/content/modules/{a59734be368daa7e → c916d82c8acef9c8}/chunk.js +1 -1
  205. package/dist/web-ui/content/modules/{182929e188c1ab3a → cceaedda619a737a}/host.js +1 -1
  206. package/dist/web-ui/content/modules/cf67f52b076b9d2d/panel-host.js +1 -0
  207. package/dist/web-ui/content/modules/{9e163d54ff8fd1aa → d26c86558d422313}/chunk.js +1 -1
  208. package/dist/web-ui/content/modules/d2b8c6c6f3706032/queue-view-adapter.js +1 -0
  209. package/dist/web-ui/content/modules/d52ebe2ef12a9fa8/chunk.js +3 -0
  210. package/dist/web-ui/content/modules/{3fe11a75284ad8ae → d552b3bff2151eb6}/host.js +2 -2
  211. package/dist/web-ui/content/modules/d5d6b4511ac76a6e/chunk.js +3 -0
  212. package/dist/web-ui/content/modules/{bd7dc4bb46731ee7 → df42e151d625463b}/chunk.js +1 -1
  213. package/dist/web-ui/content/modules/{2a791cd2e14aa1e0 → e0a04f5ae56c68aa}/notice-view.js +1 -1
  214. package/dist/web-ui/content/modules/{438807b8bf112cd0 → e28e607c95d6f63a}/chunk.js +1 -1
  215. package/dist/web-ui/content/modules/{50da446c1377c220 → e3880df97ea62d0c}/chunk.js +1 -1
  216. package/dist/web-ui/content/modules/{87c7f50d9455d55e → e66196f1ece3e3ad}/chunk.js +1 -1
  217. package/dist/web-ui/content/modules/{9b12c2301f3a18f3 → eb76307444ac9d71}/chunk.js +1 -1
  218. package/dist/web-ui/content/modules/{c33935155289c22d → ebff7ca22cee1468}/chunk.js +1 -1
  219. package/dist/web-ui/content/modules/{4861eca9a8a87ad0 → ed1c712c569960d6}/chunk.js +1 -1
  220. package/dist/web-ui/content/modules/ee8b9c2d4bec63d4/chunk.js +1 -0
  221. package/dist/web-ui/content/modules/f458a194ce4208e2/chunk.js +1 -0
  222. package/dist/web-ui/content/modules/{11af5d14b30e57b6 → f938e826420cfe1b}/chunk.js +1 -1
  223. package/dist/web-ui/content/modules/fa7b9bf6cc84bfc1/chat-render.js +81 -0
  224. package/dist/web-ui/content/modules/{ea8fe4b9999fd2aa → fd1fb1834f5f06df}/chunk.js +1 -1
  225. package/dist/web-ui/content/modules/fd3084e562a3dbd6/host.js +1 -0
  226. package/dist/web-ui/content/styles.css +1 -1
  227. package/dist/web-ui/embedded-assets.d.ts +416 -413
  228. package/dist/web-ui/embedded-assets.js +5 -5
  229. package/dist/web-ui/page-route.js +2 -2
  230. package/dist/web-ui/react/workspaces/types.d.ts +3 -0
  231. package/dist/web-ui/thinking-efforts.d.ts +2 -0
  232. package/dist/web-ui/thinking-efforts.js +8 -0
  233. package/package.json +1 -2
  234. package/scripts/stage-render-binaries.js +0 -1
  235. package/skills/wand-knowledge/SKILL.md +5 -3
  236. package/dist/structured-bounded-keys.d.ts +0 -19
  237. package/dist/structured-bounded-keys.js +0 -47
  238. package/dist/web-ui/content/modules/00b168a19664439e/dropdown-surface.js +0 -1
  239. package/dist/web-ui/content/modules/059c5fb7f128d340/task-board-host.js +0 -27
  240. package/dist/web-ui/content/modules/07494f5a623e4471/chat-render.js +0 -76
  241. package/dist/web-ui/content/modules/0a743ad3b4db6874/chunk.js +0 -3
  242. package/dist/web-ui/content/modules/1858670c0f84fec5/employee-profile.js +0 -1
  243. package/dist/web-ui/content/modules/20c47dc0442f5a04/host.js +0 -1
  244. package/dist/web-ui/content/modules/226241b999d12008/host.js +0 -1
  245. package/dist/web-ui/content/modules/23c4b8d223ec64c5/host.js +0 -61
  246. package/dist/web-ui/content/modules/2882c97388ff4f7b/employee-card.js +0 -1
  247. package/dist/web-ui/content/modules/2c90c3be260e6cce/progress.js +0 -1
  248. package/dist/web-ui/content/modules/2d7be9935394f397/workspace-window.js +0 -1
  249. package/dist/web-ui/content/modules/389a5112332ec23a/host.js +0 -1
  250. package/dist/web-ui/content/modules/3ea13e8b3c2deaa4/panel-host.js +0 -1
  251. package/dist/web-ui/content/modules/42e5c34002fcffb7/chunk.js +0 -1
  252. package/dist/web-ui/content/modules/4a5d669c90f545cb/host.js +0 -1
  253. package/dist/web-ui/content/modules/5705d25468274534/host.js +0 -1
  254. package/dist/web-ui/content/modules/5961ab2947c86ca1/shell-file-panel-drawer.js +0 -1
  255. package/dist/web-ui/content/modules/5b6e1369df7dea69/chunk.js +0 -1
  256. package/dist/web-ui/content/modules/6787bdcf56f743a5/host.js +0 -1
  257. package/dist/web-ui/content/modules/67c39b0398186a9f/host.js +0 -1
  258. package/dist/web-ui/content/modules/6b16f35c0627bafb/chunk.js +0 -1
  259. package/dist/web-ui/content/modules/6dd4f3e2f619f7a0/chunk.js +0 -1
  260. package/dist/web-ui/content/modules/70a2e13e0ccc8549/panel.js +0 -1
  261. package/dist/web-ui/content/modules/710db590e9707f73/runtime.js +0 -338
  262. package/dist/web-ui/content/modules/7249950f8771dbeb/workspaces-panel.js +0 -4
  263. package/dist/web-ui/content/modules/87dcd516ffd9f688/composer-surface-adapter.js +0 -1
  264. package/dist/web-ui/content/modules/8b7cd7bffdfd69e7/brand-identity.js +0 -1
  265. package/dist/web-ui/content/modules/8bf9917f6c3429f6/host.js +0 -1
  266. package/dist/web-ui/content/modules/8e612d4881fa4118/home.js +0 -6
  267. package/dist/web-ui/content/modules/8e6178262ea63dec/markdown.js +0 -1
  268. package/dist/web-ui/content/modules/96f2ae970f8c576b/host.js +0 -1
  269. package/dist/web-ui/content/modules/ba89cd97627e6682/queue-view-adapter.js +0 -1
  270. package/dist/web-ui/content/modules/c351eb11e0bdec2c/sidebar-peek.js +0 -1
  271. package/dist/web-ui/content/modules/ca7ca5902a35d26e/chunk.js +0 -1
  272. package/dist/web-ui/content/modules/d5d28ec375826ef2/chunk.js +0 -3
  273. package/dist/web-ui/content/modules/d6b16dedb9011c33/chunk.js +0 -1
  274. package/dist/web-ui/content/modules/d8a7011760f61719/group-editor.js +0 -1
  275. package/dist/web-ui/content/modules/d9e2b65e9679ad39/host.js +0 -75
  276. package/dist/web-ui/content/modules/eac72f69716dba05/chunk.js +0 -1
  277. package/dist/web-ui/content/modules/ebc53dedc3945514/host.js +0 -1
  278. package/dist/web-ui/content/modules/f43da7050badf54c/host.js +0 -1
  279. package/dist/web-ui/content/modules/fb2356eced24c4cc/host-bridge.js +0 -1
@@ -1,338 +0,0 @@
1
-
2
- const __wandCssTextPool = Object.freeze([":root{--wand-page-inset:20px;--wand-page-title-size:18px;--wand-page-toolbar-height:36px;--wand-page-header-height:56px}@media(max-width:639px){:root{--wand-page-inset:12px}}#overlay-root{isolation:isolate;position:fixed;inset:0;z-index:20000;pointer-events:none}.wand-ui-mount{display:contents}.wand-ui-portals{position:fixed;inset:0;pointer-events:none}.wand-ui-portals :is(.ant-modal-wrap,.ant-dropdown,.ant-dropdown-menu-submenu-popup,.ant-select-dropdown,.ant-popover,.ant-notification-notice){pointer-events:auto}.wand-ui-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.wand-ui-dialog-content .ant-modal-body{max-height:calc(100dvh - 180px - var(--wand-safe-top,0px) - var(--wand-safe-bottom,0px));overflow:auto;overscroll-behavior:contain}.wand-ui-dialog-title{font-size:var(--wand-page-title-size);font-weight:600;line-height:1.4}.wand-ui-dialog-description{white-space:pre-wrap;font-weight:400;font-size:13px;line-height:1.55;color:var(--text-secondary);padding-top:4px}.wand-ui-dialog-content .wand-dialog-sticky-actions{position:sticky;bottom:0;z-index:2;padding-block:12px;background:var(--bg-elevated);border-top:1px solid var(--border-subtle)}@media(max-width:639px){.wand-ui-dialog-content .ant-modal-body{max-height:calc(100dvh - 160px - var(--wand-safe-top,0px) - var(--wand-safe-bottom,0px))}}.wand-ui-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:20px}.wand-ui-switch-row{display:inline-flex;align-items:center;gap:9px}.wand-ui-menu{display:flex;flex-direction:column}.wand-ui-menu-item{justify-content:flex-start;width:100%}.wand-ui-menu-item-label{flex:1;min-width:0;text-align:start}.wand-ui-menu-item-hint,.wand-ui-dropdown-item-hint{margin-inline-start:auto}.wand-ui-badge{font-variant-numeric:tabular-nums;margin-inline-end:0}.wand-self-tag{margin-inline-start:6px;vertical-align:middle}.wand-ui-select-content{max-width:calc(100vw - var(--wand-safe-left, 0px) - var(--wand-safe-right, 0px) - 24px)}.wand-ui-select-content .ant-dropdown-menu{max-height:min(360px,60dvh);overflow-y:auto;overscroll-behavior:contain}.wand-ui-navigation-list{list-style:none;margin:0;padding:0}.wand-ui-navigation[data-orientation=horizontal] .wand-ui-navigation-list{display:flex}.wand-ui-navigation-link{height:auto;justify-content:flex-start;text-align:start}.wand-ui-stretch-tabs{position:relative;isolation:isolate}.wand-ui-stretch-tabs .ant-segmented-thumb{visibility:hidden}.wand-ui-stretch-tabs .ant-segmented-item-selected{background:transparent;box-shadow:none}.wand-ui-stretch-tabs .ant-segmented-item{position:relative;z-index:1}.wand-ui-stretch-indicator{position:absolute;z-index:0;top:2px;bottom:2px;border-radius:inherit;background:var(--bg-elevated, #fffdfa);box-shadow:var(--shadow-sm);pointer-events:none;transition:left var(--motion-indicator) var(--ease-in-out-smooth),width var(--motion-indicator) var(--ease-in-out-smooth)}\n","@keyframes wand-ui-fade-in{0%{opacity:0}to{opacity:1}}@keyframes wand-ui-fade-out{0%{opacity:1}to{opacity:0}}@keyframes wand-ui-dialog-in{0%{opacity:0;transform:translate(-50%,calc(-50% + 6px))}to{opacity:1;transform:translate(-50%,-50%)}}@keyframes wand-ui-dialog-out{0%{opacity:1;transform:translate(-50%,-50%)}to{opacity:0;transform:translate(-50%,calc(-50% + 4px))}}@keyframes wand-ui-scale-in{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@media(max-width:520px){.wand-ui-dialog-actions{flex-direction:column-reverse}.wand-ui-dialog-actions .wand-ui-button{width:100%}}\n","@media(prefers-reduced-motion:reduce){:is(.ant-dropdown,.ant-dropdown-menu-submenu-popup,.ant-popover,.ant-tooltip,.ant-picker-dropdown,.ant-select-dropdown){transition-property:none!important;animation-duration:.01ms!important;transform:none!important}.ant-modal{animation-duration:.01ms!important;transform:none!important}#overlay-root *,#overlay-root *:before,#overlay-root *:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n","@keyframes wand-settings-fade-in{0%{opacity:0}to{opacity:1}}\n",".wand-workspace-agent-model-select,.wand-new-session-model-select{width:100%}\n",".composer-config-select-host{display:inline-flex;flex:1 1 auto;min-width:0;max-width:100%}.wand-composer-select-trigger{width:100%;min-width:0}.wand-composer-select-trigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wand-composer-select-content{width:max-content;max-width:min(560px,calc(100vw - 28px));max-height:min(330px,var(--available-height));overflow:auto}.wand-composer-select-item{max-width:min(530px,calc(100vw - 48px))}.wand-composer-select-item .ant-dropdown-menu-title-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n","[data-pi-composer]{position:relative}[data-pi-settings-host]{position:absolute;inset-inline-start:0;bottom:calc(100% + 8px);width:min(640px,100%);z-index:55}[data-pi-settings-toggle-host]{display:contents}.input-composer:has(.permission-actions:not(.hidden)) [data-pi-settings-toggle-host]{display:none}.wand-pi-skill-switch:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px;border-radius:var(--control-radius)}\n",".local-preview-link{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.local-preview-link:hover{color:var(--accent-hover)}\n",".wand-media-stage.ant-btn{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%;padding:12px;overflow:auto;white-space:normal;background-image:linear-gradient(45deg,var(--bg-tertiary) 25%,transparent 25%),linear-gradient(-45deg,var(--bg-tertiary) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--bg-tertiary) 75%),linear-gradient(-45deg,transparent 75%,var(--bg-tertiary) 75%);background-position:0 0,0 8px,8px -8px,-8px 0;background-size:16px 16px;cursor:zoom-in}.wand-media-stage .ant-image{display:flex;max-width:100%;max-height:100%}.wand-media-stage img{max-width:100%;max-height:100%;object-fit:contain}.wand-media-stage.zoomed{align-items:flex-start;justify-content:flex-start;cursor:zoom-out}.wand-media-stage.zoomed .ant-image,.wand-media-stage.zoomed img{max-width:none;max-height:none}.wand-image-viewer-caption{display:block;max-width:100%;overflow-wrap:anywhere;text-align:center}.wand-image-viewer :is(.ant-image-preview-close,.ant-image-preview-switch,.ant-image-preview-actions-action){min-width:44px;min-height:44px}.wand-image-viewer.ant-image-preview .ant-image-preview-switch:not(:disabled){background:var(--bg-terminal)}.wand-image-viewer .ant-image-preview-img{touch-action:none}.markdown-content img[role=button]{max-width:100%;max-height:360px;object-fit:contain;cursor:zoom-in}.markdown-content img[role=button]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}\n",".wand-plush-avatar{position:relative;display:inline-grid;flex:none;place-items:center;overflow:visible;isolation:isolate;vertical-align:middle;line-height:0}.wand-plush-avatar canvas,.wand-plush-avatar-fallback{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}.wand-plush-avatar canvas{opacity:0}.wand-plush-avatar[data-renderer=webgl] canvas{opacity:1}.wand-plush-avatar[data-renderer=webgl] .wand-plush-avatar-fallback{visibility:hidden}.wand-avatar-file-fallback{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.wand-plush-avatar[data-renderer=webgl] .wand-avatar-file-fallback{visibility:hidden}\n",".wand-avatar-editor{min-width:0}.wand-avatar-editor-summary{flex-wrap:wrap}.wand-avatar-editor-trigger.ant-btn{flex:0 0 44px;width:44px;height:44px;padding:0;position:relative;overflow:visible}.wand-avatar-edit-mark{position:absolute;bottom:0;right:-2px;display:grid;place-items:center;width:16px;height:16px;border-radius:5px;background:var(--bg-elevated);color:var(--text-secondary);border:1px solid var(--border-subtle)}.wand-avatar-upload-hint{display:block;margin-top:4px;font-size:11px}.wand-avatar-options:disabled{opacity:.65}.wand-avatar-options:disabled input{cursor:default}.wand-avatar-editor-caption{font-size:12px}.wand-avatar-sculpt{display:grid;grid-template-columns:172px minmax(0,1fr);gap:12px 18px;margin-top:12px;padding:14px;background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:8px}.wand-avatar-sculpt-preview{min-width:0;align-self:center;display:flex;flex-direction:column;align-items:center;gap:5px}.wand-avatar-sculpt-preview>.ant-typography{font-size:11px}.wand-avatar-sculpt-preview>.ant-btn{font-size:12px}.wand-avatar-sculpt-controls{display:flex;flex-direction:column;gap:10px;min-width:0}.wand-avatar-options{margin:0;padding:0;border:0;min-width:0}.wand-avatar-options legend{display:flex;gap:8px;align-items:baseline;width:100%;margin:0 0 5px;padding:0;font-size:12px;color:var(--text-primary)}.wand-avatar-options legend>span{color:var(--text-secondary);font-size:11px}.wand-avatar-option-row{display:flex;flex-wrap:wrap;gap:4px}.wand-avatar-option{position:relative;width:32px;height:32px;cursor:pointer;display:grid;place-items:center}.wand-avatar-option input{appearance:none;position:absolute;margin:0;inset:0;width:100%;height:100%;border-radius:6px;border:1px solid transparent;background:transparent;cursor:pointer}.wand-avatar-option input:hover{background:var(--bg-hover)}.wand-avatar-option input:checked{background:var(--accent-muted);border-color:var(--primary)}.wand-avatar-option input:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px}.wand-avatar-option-mark{width:22px;height:22px;display:grid;place-items:center;color:var(--text-secondary);pointer-events:none;position:relative}.wand-avatar-option-mark svg{width:20px;height:20px;fill:var(--text-secondary);stroke:currentColor;stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round}.wand-avatar-color{width:18px;height:18px;border-radius:50%;box-shadow:inset 0 0 0 1px #0000001f}.wand-avatar-option-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.wand-avatar-sculpt-footer{grid-column:1/-1;padding-top:10px;border-top:1px solid var(--border-subtle)}.wand-avatar-sculpt-footer>.ant-typography{font-size:11px}@media(max-width:600px){.wand-avatar-sculpt{grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}.wand-avatar-sculpt-preview{flex-direction:row;flex-wrap:wrap;justify-content:center}.wand-avatar-sculpt-preview>[data-plush-avatar]{flex:0 0 140px}.wand-avatar-sculpt-preview>.ant-typography{display:none}.wand-avatar-sculpt-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}.wand-avatar-options:nth-child(-n+2){grid-column:1/-1}.wand-avatar-editor-summary>.ant-btn{padding-inline:6px}}@media(pointer:coarse){.wand-avatar-option{width:44px;height:44px}.wand-avatar-option-row{gap:2px}}@media(forced-colors:active){.wand-avatar-option input:checked{border-color:Highlight}.wand-avatar-color{border:1px solid CanvasText}}\n",".sidebar-session-preview{display:grid;grid-template-rows:1fr;opacity:1;min-width:0;transition:grid-template-rows var(--motion-normal) var(--ease-out-expo),opacity var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-session-preview[data-expanded=true]{grid-template-rows:0fr;opacity:0}.sidebar-session-preview-clip{min-height:0;min-width:0;overflow:hidden}.sidebar-session-preview-row{display:flex;align-items:center;gap:4px;min-width:0;padding:2px 4px 6px;overflow:hidden}.sidebar-session-preview .sidebar-session-tag.ant-btn{flex:none;width:36px;min-width:36px;height:28px;padding:0;gap:4px;border-radius:var(--radius-xs);color:var(--text-secondary);background:var(--sidebar-surface,var(--bg-surface));border:1px solid var(--border-subtle)}.sidebar-session-preview .sidebar-session-tag[data-titles=true]{width:auto;padding-inline:6px}.sidebar-session-preview .sidebar-session-tag[aria-pressed=true],.sidebar-session-preview .sidebar-session-more.ant-btn[data-contains-current=true]{background:var(--sidebar-selected,var(--bg-active));color:var(--sidebar-accent,var(--text-link));border-color:var(--sidebar-selected,var(--border-subtle))}.sidebar-session-preview :is(.sidebar-session-tag,.sidebar-session-more):focus-visible{outline:2px solid var(--sidebar-accent,var(--border-focus));outline-offset:-2px}.sidebar-session-preview .sidebar-session-more.ant-btn{flex:none;width:auto;min-width:0;max-width:100%;height:28px;padding:0 6px;font-size:11px;font-variant-numeric:tabular-nums;border-radius:var(--radius-xs);color:var(--text-secondary);background:var(--sidebar-surface,var(--bg-surface));border:1px solid var(--border-subtle)}.sidebar-session-tag-content{display:inline-flex;align-items:center;gap:4px}.sidebar-session-tag-title{font-size:11px;line-height:16px;white-space:nowrap}.sidebar-session-preview .sidebar-provider-mark{flex:none}.sidebar-session-preview .sidebar-provider-mark>svg{width:100%;height:100%}.sidebar-session-preview-status{display:inline-flex;align-items:center;justify-content:center;width:8px;height:8px;flex:none;line-height:0}.sidebar-session-preview-status .ant-badge{line-height:0}.sidebar-session-preview-status .ant-badge-status-dot{width:5px;height:5px}.sidebar-session-preview-measure-clip{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.sidebar-session-preview-measure{display:flex;width:max-content;gap:4px}.sidebar-session-preview-measure-clip .sidebar-session-more.ant-btn{max-width:none}.sidebar-session-preview-task{margin-inline-start:20px}.sidebar-session-preview-person{margin-inline-start:28px}@media(pointer:coarse){.sidebar-session-preview :is(.sidebar-session-tag,.sidebar-session-more).ant-btn{height:36px}}@media(prefers-reduced-motion:reduce){.sidebar-session-preview{transition:none}}\n",".sidebar-session-area{min-width:0;padding-inline-start:12px}.sidebar-session-area[data-empty]{min-height:36px}.sidebar-session-area-toggle.ant-btn{width:24px;min-width:24px;height:32px;padding:0;flex-shrink:0;color:var(--text-secondary)}.sidebar-session-area-content{min-width:0}.sidebar-session-area-content>.sidebar-session-preview{margin-inline-start:0}.sidebar-session-area-content .conversation-person-sessions,.sidebar .sidebar-session-area-content .im-sidebar-group-inner,.sidebar .sidebar-session-area-content .workspace-task-sessions{margin-inline-start:0}@media(pointer:coarse),(max-width:640px){.sidebar-session-area[data-empty]{min-height:44px}.sidebar-session-area-toggle.ant-btn{width:44px;min-width:44px;height:44px}}\n",".sidebar-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.workspaces-panel{position:relative}.sidebar-navigation-rail{width:56px;flex:none;min-height:0;padding:8px 4px;border-inline-end:1px solid var(--border-subtle);background:var(--sidebar-rail)}.sidebar-rail-scroll{width:100%;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.sidebar-rail-scroll>.sidebar-brand-mark{display:block;margin:8px auto 16px}.sidebar-list-panel{flex:1;min-width:0;min-height:0}.sidebar-list-panel[hidden]{display:none}.sidebar.context-rail .sidebar-navigation-rail{border-inline-end:1px solid var(--border-subtle)}.sidebar-navigation-rail :is(.wand-ui-icon-button,.sidebar-list-error,[data-daemon-update-status]){width:44px;min-width:44px;height:44px;padding:0;flex:none}.sidebar .conversation-navigation .wand-ui-icon-button{height:48px;display:flex;flex-direction:column;gap:3px;border-radius:var(--control-radius);color:var(--text-secondary)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]{color:var(--sidebar-accent);background:var(--sidebar-selected)}.sidebar-nav-icon{display:flex;height:20px;align-items:center;justify-content:center}.sidebar-nav-label{font-size:10px;line-height:14px;font-weight:500}.sidebar:focus-visible{outline:2px solid var(--sidebar-accent);outline-offset:-2px}.sidebar .wand-ui-button:focus-visible{outline:2px solid var(--sidebar-accent);outline-offset:2px}.sidebar-list-panel{background:var(--sidebar-surface);border-inline-end:1px solid var(--border-subtle)}.sidebar-rail-notices{margin-block:12px 4px;padding-block-start:12px;border-block-start:1px solid var(--border-subtle)}.sidebar .sidebar-profile-button{margin-block-start:8px;display:flex;flex-direction:column;gap:3px;color:var(--text-secondary)}.sidebar-notification-content{width:min(280px,calc(100vw - 64px));max-height:min(480px,65dvh);overflow:auto}.sidebar .conversation-navigation{width:100%}.sidebar:not(.collapsed) .conversation-navigation>.wand-ui-stretch-tabs,.sidebar:not(.collapsed) .conversation-navigation .ant-segmented{width:100%}.sidebar:not(.collapsed) .conversation-navigation .ant-segmented-group{display:flex}.sidebar:not(.collapsed) .conversation-navigation .ant-segmented-item{flex:1;text-align:center}.sidebar .sidebar-body{overscroll-behavior:contain;scrollbar-gutter:stable}.sidebar-header-primary{min-height:32px}.sidebar-header-main{min-width:0}.sidebar-header-actions{flex-shrink:0}.sidebar-compact-toggle-label,.conversation-create-label{display:none}.sidebar-header-actions :is(.sidebar-more-trigger,.sidebar-compact-toggle,.sidebar-close,.conversation-create-button){width:32px;min-width:32px;height:32px;padding:0}.sidebar-title{font-size:15px;letter-spacing:0}.sidebar-compact-toggle[aria-pressed=true] .sidebar-collapse-direction{transform:rotate(180deg)}.sidebar-new-task.ant-btn{height:34px;font-size:13px}.sidebar-status:empty{display:none}.sidebar-footer-actions{min-width:0}.sidebar-footer:has(#back-to-native-button,#switch-server-button){flex-wrap:wrap}.sidebar .conversation-list-tools,.sidebar-presentation-tools{position:sticky;top:0;z-index:2;background:var(--sidebar-surface)}.sidebar-search-slot{display:grid;flex:1;min-width:0;align-items:center;min-height:32px}.sidebar-list-title,.sidebar-search-expand{grid-area:1 / 1;min-width:0;transition:opacity var(--motion-fast) var(--ease-in-out-smooth),visibility var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-search-expand{opacity:0;pointer-events:none}.is-searching .sidebar-search-expand{opacity:1;pointer-events:auto}.is-searching .sidebar-list-title{opacity:0;visibility:hidden}.sidebar-search-input input::-webkit-search-cancel-button{display:none}.sidebar-disclosure-chevron{display:inline-flex;flex-shrink:0;transform:rotate(-90deg);transition:transform var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-disclosure-chevron[data-open=true]{transform:rotate(0)}.sidebar .workspace-row-main{min-height:48px}.sidebar .workspace-row-title{font-size:13px;font-weight:600}.sidebar .workspace-row-path{display:block;max-width:100%;line-height:1.5}.sidebar .workspace-row-count,.sidebar .workspace-task-count,.sidebar .im-sidebar-group-count{color:var(--text-secondary);font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0}.sidebar .workspace-row-count{min-width:2ch;text-align:end}.sidebar .sidebar-head-activity,.sidebar .im-sidebar-group-attention-slot{width:12px;flex:none;display:inline-flex;justify-content:center}.sidebar .wand-sidebar-group-toggle{min-height:48px;padding:6px}.sidebar .im-sidebar-group-title{min-width:0;font-size:13px;font-weight:600}.sidebar .im-sidebar-group-meta{display:inline-flex;align-items:center;gap:4px;flex:none}.sidebar .im-sidebar-group-action{display:inline-flex;flex:none}.sidebar .sidebar-recent-add{width:28px;min-width:28px;height:32px;padding:0}.sidebar .im-sidebar-group-inner{margin-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .sidebar-group-empty,.sidebar .sidebar-filter-empty{margin:0;padding:6px;font-size:12px;line-height:1.5}.sidebar .workspace-tasks{margin-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-task-sessions{margin-inline-start:6px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-task-main,.sidebar .workspace-session-main{min-height:36px}.sidebar .workspace-task-main{flex:1 1 0;min-width:0;overflow:hidden}.sidebar .workspace-task-name{font-size:13px;white-space:nowrap}.sidebar .workspace-task-disclosure-slot{width:20px;height:32px;flex:none;display:inline-flex;align-items:center}.sidebar .workspace-task-disclosure.ant-btn{width:20px;min-width:20px;height:32px;padding:0;color:var(--text-secondary)}.sidebar .sidebar-task-status{display:inline-flex;align-items:center;justify-content:flex-end;gap:3px;flex:0 0 auto;min-width:4em;white-space:nowrap;word-break:keep-all;font-size:12px;line-height:18px;color:var(--text-secondary)}.sidebar .sidebar-task-status>*{flex:none;white-space:nowrap}.sidebar .sidebar-task-status.tone-accent{color:var(--success)}.sidebar .sidebar-task-status.tone-warning{color:var(--warning)}.sidebar .sidebar-task-status.tone-success{color:var(--success)}.sidebar .workspace-task-children{margin-inline-start:8px;padding-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-session-name{font-size:13px}.sidebar .workspace-session-kind{color:var(--text-secondary);font-size:11px}.sidebar .workspace-loose-label{display:block;padding:8px 6px 4px;font-size:12px}.sidebar .workspace-loose-session-list{display:flex;flex-direction:column;gap:2px}.sidebar .sidebar-list-title{font-size:12px;color:var(--text-secondary)}.sidebar .sidebar-view-switch .ant-segmented-item-label{padding-inline:8px;font-size:12px}.sidebar .sidebar-body{scroll-padding-block:100px 12px}.sidebar :is(.workspace-task-action,.workspace-task-chevron-btn){width:28px;min-width:28px;height:32px;padding:0;flex-shrink:0}.sidebar-menu-heading{display:grid;gap:2px;min-width:0;padding-block:2px}.sidebar-menu-heading strong,.sidebar-menu-heading span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-menu-heading strong{color:var(--text-primary);font-weight:var(--font-weight-semibold)}.sidebar-menu-heading span{color:var(--text-secondary);font-size:var(--font-size-xs)}.sidebar-menu-error{color:var(--danger);white-space:normal;overflow-wrap:anywhere}:is(.sidebar-row-menu,.sidebar-menu-submenus) .ant-dropdown-menu{max-width:min(288px,calc(100vw - 24px))}.sidebar-menu-submenus .ant-dropdown-menu-submenu-popup{min-width:min(224px,calc(100vw - 24px));max-width:min(288px,calc(100vw - 24px))}.sidebar-menu-submenus .ant-dropdown-menu{max-height:min(360px,calc(100dvh - 24px));overflow-y:auto;overscroll-behavior:contain}:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){height:auto;min-height:32px}.sidebar [data-sidebar-menu-open=true]{border-radius:var(--control-radius);background:var(--sidebar-selected)}.sidebar .sidebar-footer-actions{align-items:center}.sidebar .conversation-search-host{padding:0 4px 10px}.sidebar .conversation-search-input{min-height:34px;font-size:12px;background:var(--bg-surface)}.sidebar .conversation-list-section{padding:0 4px 10px;gap:6px}.sidebar .conversation-list-count{padding-inline:2px;color:var(--text-secondary)}.sidebar .conversation-row:hover,.sidebar .conversation-row:focus-within{background:var(--sidebar-hover)}.sidebar .conversation-row[aria-current=page]{background:var(--sidebar-selected)}.sidebar .conversation-row[aria-current=page] .conversation-row-title{color:var(--sidebar-accent)}.sidebar .conversation-row-open.ant-btn:hover{color:inherit;background:transparent}.sidebar .conversation-row-time{color:var(--text-secondary)}.conversation-person-sessions{margin-inline-start:28px;border-inline-start:1px solid var(--border-subtle);padding-inline-start:4px;min-width:0;max-height:min(45dvh,360px);overflow-y:auto;overscroll-behavior:contain}.conversation-other-sessions{margin-top:8px}.conversation-other-toggle{width:100%;justify-content:flex-start;gap:8px;min-height:36px;color:var(--text-secondary)}.conversation-other-toggle span:last-child{margin-inline-start:auto}.sidebar .im-sidebar-group:has(.sidebar-session-preview) .im-sidebar-group-inner{max-height:min(45dvh,360px);overflow-y:auto;overscroll-behavior:contain}.conversation-person-sessions .wand-sidebar-session-row{min-height:44px}.sidebar :is(.workspace-session-main,.workspace-task-main,.wand-sidebar-session-row)[aria-current=page],.sidebar .wand-sidebar-session-row.active{color:var(--sidebar-accent);background:var(--sidebar-selected)}.sidebar .conversation-navigation .wand-ui-icon-button:hover{background:var(--sidebar-hover)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]{background:var(--sidebar-selected)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]:before{content:\"\";position:absolute;inset-inline-start:0;inset-block:14px;width:2px;border-radius:2px;background:var(--sidebar-accent)}.sidebar .conversation-list-filter{flex:1;min-width:0}.sidebar .conversation-list-filter .ant-segmented-item-label{padding-inline:6px}.sidebar .conversation-list-filter .ant-segmented-item-selected{color:var(--sidebar-accent)}.sidebar .sidebar-activity-filter.ant-btn{flex:none;width:48px;height:28px;padding:0;border-radius:var(--radius-full);font-size:12px;color:var(--text-secondary);background:transparent;border-color:var(--border-subtle)}.sidebar .sidebar-activity-filter.ant-btn[aria-pressed=true]{color:var(--sidebar-accent);background:var(--sidebar-selected);border-color:color-mix(in srgb,var(--sidebar-accent) 45%,var(--border-subtle))}.sidebar .conversation-search-input:focus-within{border-color:var(--sidebar-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--sidebar-accent) 14%,transparent)}.sidebar.collapsed .conversation-row{justify-content:center;padding:6px 0;min-height:48px}.sidebar.collapsed .sidebar-body{scrollbar-gutter:auto}@media(pointer:coarse),(max-width:640px){.sidebar-header-actions :is(.sidebar-compact-toggle,.sidebar-close,.conversation-create-button){width:44px;min-width:44px;height:44px}.sidebar-new-task.ant-btn{min-height:44px}.sidebar :is(.workspace-task-action,.workspace-task-chevron-btn){width:32px;min-width:32px;height:44px}.sidebar .workspace-task-main,.sidebar .workspace-session-main{min-height:44px}.sidebar .workspace-task-disclosure-slot{width:36px;height:44px}.sidebar .workspace-task-disclosure.ant-btn{width:36px;min-width:36px;height:44px}.sidebar .sidebar-activity-filter.ant-btn{min-height:44px}.sidebar .sidebar-recent-add{width:44px;min-width:44px;height:44px}:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){min-height:44px}}@media(max-width:640px){:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){min-height:44px}}@media(prefers-reduced-motion:reduce){.sidebar-list-title,.sidebar-search-expand,.sidebar-disclosure-chevron{transition:none}}.sidebar-full-list{opacity:1;visibility:visible;transition:opacity var(--motion-fast) var(--ease-in-out-smooth),visibility var(--motion-normal) var(--ease-in-out-smooth)}.workspaces-panel-compact .sidebar-full-list{position:absolute;inset:0 auto auto 0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth),visibility var(--motion-quick-exit) var(--ease-in-out-smooth)}.sidebar-projection-swap{position:relative}.sidebar-projection-current{opacity:1;transition:opacity var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-projection-swap[data-entering=true] .sidebar-projection-current{opacity:0}.sidebar-projection-old{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth)}@starting-style{.sidebar-projection-old{opacity:1}}@media(prefers-reduced-motion:reduce){.sidebar-full-list,.sidebar-projection-current,.sidebar-projection-old{transition:none}}.wand-workspace-manage-check{display:inline-flex;flex:none;margin-inline-end:6px;pointer-events:none}.wand-sidebar-modal-form{display:grid;gap:16px}.wand-sidebar-modal-body{min-width:0;max-height:64dvh;overflow:auto}.wand-sidebar-modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.wand-task-create-input{width:100%}.wand-subject-provider{width:20px;height:20px;flex:none}.wand-workspace-tabs{flex:1;min-width:0}.wand-workspace-tab-label{display:inline-flex;align-items:center;gap:6px;max-width:240px}.wand-workspace-tab-label>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:640px){.wand-workspace-tab-label{max-width:96px}[data-session-tabs=task] .wand-workspace-tabs .ant-tabs-tab-remove{display:none}}.wand-attention-list{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}.wand-attention-item{width:100%;height:auto;white-space:normal;text-align:start;justify-content:flex-start}.wand-attention-item strong,.wand-attention-item span{overflow-wrap:anywhere}.home-attention.is-sidebar{max-height:min(50dvh,520px);overflow-y:auto;overscroll-behavior:contain}.blank-chat-attention{position:absolute;inset-block-start:24px;inset-inline-start:24px;z-index:1}.wand-worktree-selection{display:flex;align-items:flex-start;width:100%;margin-block:8px}@media(prefers-reduced-motion:no-preference){#sessions-drawer.sidebar-refined[role=dialog]:not([data-drawer-gesture=active]){animation:sidebar-drawer-slide-in var(--motion-normal, .22s) cubic-bezier(.16,1,.3,1)}.drawer-backdrop.open:not([data-drawer-gesture=active]){animation:sidebar-backdrop-fade-in var(--motion-normal, .22s) cubic-bezier(.16,1,.3,1)}}@keyframes sidebar-drawer-slide-in{0%{transform:translate3d(-100%,0,0)}to{transform:translateZ(0)}}@keyframes sidebar-backdrop-fade-in{0%{opacity:0}to{opacity:1}}\n"]);
3
- var qee=Object.create,ex=Object.defineProperty,Wee=Object.getOwnPropertyDescriptor,Vee=Object.getOwnPropertyNames,Uee=Object.getPrototypeOf,Gee=Object.prototype.hasOwnProperty,Kee=(e,t,r)=>t in e?ex(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ir=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},ws=(e,t)=>{for(var r in t)ex(e,r,{get:t[r],enumerable:!0})},Xee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Vee(t))!Gee.call(e,a)&&a!==r&&ex(e,a,{get:()=>t[a],enumerable:!(n=Wee(t,a))||n.enumerable});return e},B=(e,t,r)=>(r=e!=null?qee(Uee(e)):{},Xee(t||!e||!e.__esModule?ex(r,"default",{value:e,enumerable:!0}):r,e)),ie=(e,t,r)=>Kee(e,typeof t!="symbol"?t+"":t,r);var Qee=ir(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function x(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function F(N,R,K){this.props=N,this.context=R,this.refs=S,this.updater=K||y}F.prototype.isReactComponent={},F.prototype.setState=function(N,R){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,R,"setState")},F.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function $(){}$.prototype=F.prototype;function C(N,R,K){this.props=N,this.context=R,this.refs=S,this.updater=K||y}var D=C.prototype=new $;D.constructor=C,E(D,F.prototype),D.isPureReactComponent=!0;var I=Array.isArray;function M(){}var A={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function P(N,R,K){var Q=K.ref;return{$$typeof:t,type:N,key:R,ref:Q!==void 0?Q:null,props:K}}function O(N,R){return P(N.type,R,N.props)}function V(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function W(N){var R={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(K){return R[K]})}var H=/\/+/g;function q(N,R){return typeof N=="object"&&N!==null&&N.key!=null?W(""+N.key):R.toString(36)}function z(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(M,M):(N.status="pending",N.then(function(R){N.status==="pending"&&(N.status="fulfilled",N.value=R)},function(R){N.status==="pending"&&(N.status="rejected",N.reason=R)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function L(N,R,K,Q,ee){var te=typeof N;(te==="undefined"||te==="boolean")&&(N=null);var ne=!1;if(N===null)ne=!0;else switch(te){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(N.$$typeof){case t:case r:ne=!0;break;case v:return ne=N._init,L(ne(N._payload),R,K,Q,ee)}}if(ne)return ee=ee(N),ne=Q===""?"."+q(N,0):Q,I(ee)?(K="",ne!=null&&(K=ne.replace(H,"$&/")+"/"),L(ee,R,K,"",function(he){return he})):ee!=null&&(V(ee)&&(ee=O(ee,K+(ee.key==null||N&&N.key===ee.key?"":(""+ee.key).replace(H,"$&/")+"/")+ne)),R.push(ee)),1;ne=0;var me=Q===""?".":Q+":";if(I(N))for(var se=0;se<N.length;se++)Q=N[se],te=me+q(Q,se),ne+=L(Q,R,K,te,ee);else if(se=x(N),typeof se=="function")for(N=se.call(N),se=0;!(Q=N.next()).done;)Q=Q.value,te=me+q(Q,se++),ne+=L(Q,R,K,te,ee);else if(te==="object"){if(typeof N.then=="function")return L(z(N),R,K,Q,ee);throw R=String(N),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return ne}function U(N,R,K){if(N==null)return N;var Q=[],ee=0;return L(N,Q,"","",function(te){return R.call(K,te,ee++)}),Q}function Y(N){if(N._status===-1){var R=N._result;R=R(),R.then(function(K){(N._status===0||N._status===-1)&&(N._status=1,N._result=K)},function(K){(N._status===0||N._status===-1)&&(N._status=2,N._result=K)}),N._status===-1&&(N._status=0,N._result=R)}if(N._status===1)return N._result.default;throw N._result}var X=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},J={map:U,forEach:function(N,R,K){U(N,function(){R.apply(this,arguments)},K)},count:function(N){var R=0;return U(N,function(){R++}),R},toArray:function(N){return U(N,function(R){return R})||[]},only:function(N){if(!V(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};e.Activity=g,e.Children=J,e.Component=F,e.Fragment=n,e.Profiler=o,e.PureComponent=C,e.StrictMode=a,e.Suspense=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,e.__COMPILER_RUNTIME={__proto__:null,c:function(N){return A.H.useMemoCache(N)}},e.cache=function(N){return function(){return N.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(N,R,K){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var Q=E({},N.props),ee=N.key;if(R!=null)for(te in R.key!==void 0&&(ee=""+R.key),R)!j.call(R,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&R.ref===void 0||(Q[te]=R[te]);var te=arguments.length-2;if(te===1)Q.children=K;else if(1<te){for(var ne=Array(te),me=0;me<te;me++)ne[me]=arguments[me+2];Q.children=ne}return P(N.type,ee,Q)},e.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:l,_context:N},N},e.createElement=function(N,R,K){var Q,ee={},te=null;if(R!=null)for(Q in R.key!==void 0&&(te=""+R.key),R)j.call(R,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ee[Q]=R[Q]);var ne=arguments.length-2;if(ne===1)ee.children=K;else if(1<ne){for(var me=Array(ne),se=0;se<ne;se++)me[se]=arguments[se+2];ee.children=me}if(N&&N.defaultProps)for(Q in ne=N.defaultProps,ne)ee[Q]===void 0&&(ee[Q]=ne[Q]);return P(N,te,ee)},e.createRef=function(){return{current:null}},e.forwardRef=function(N){return{$$typeof:d,render:N}},e.isValidElement=V,e.lazy=function(N){return{$$typeof:v,_payload:{_status:-1,_result:N},_init:Y}},e.memo=function(N,R){return{$$typeof:m,type:N,compare:R===void 0?null:R}},e.startTransition=function(N){var R=A.T,K={};A.T=K;try{var Q=N(),ee=A.S;ee!==null&&ee(K,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(M,X)}catch(te){X(te)}finally{R!==null&&K.types!==null&&(R.types=K.types),A.T=R}},e.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},e.use=function(N){return A.H.use(N)},e.useActionState=function(N,R,K){return A.H.useActionState(N,R,K)},e.useCallback=function(N,R){return A.H.useCallback(N,R)},e.useContext=function(N){return A.H.useContext(N)},e.useDebugValue=function(){},e.useDeferredValue=function(N,R){return A.H.useDeferredValue(N,R)},e.useEffect=function(N,R){return A.H.useEffect(N,R)},e.useEffectEvent=function(N){return A.H.useEffectEvent(N)},e.useId=function(){return A.H.useId()},e.useImperativeHandle=function(N,R,K){return A.H.useImperativeHandle(N,R,K)},e.useInsertionEffect=function(N,R){return A.H.useInsertionEffect(N,R)},e.useLayoutEffect=function(N,R){return A.H.useLayoutEffect(N,R)},e.useMemo=function(N,R){return A.H.useMemo(N,R)},e.useOptimistic=function(N,R){return A.H.useOptimistic(N,R)},e.useReducer=function(N,R,K){return A.H.useReducer(N,R,K)},e.useRef=function(N){return A.H.useRef(N)},e.useState=function(N){return A.H.useState(N)},e.useSyncExternalStore=function(N,R,K){return A.H.useSyncExternalStore(N,R,K)},e.useTransition=function(){return A.H.useTransition()},e.version="19.2.7"}),_=ir((e,t)=>{"use strict";t.exports=Qee()});var Yee=ir(e=>{"use strict";var t=_();function r(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(r(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(p,m,v){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:v}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(p,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(r(299));return l(p,m,null,v)},e.flushSync=function(p){var m=u.T,v=a.p;try{if(u.T=null,a.p=2,p)return p()}finally{u.T=m,a.p=v,a.d.f()}},e.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(p,m))},e.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},e.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,g=d(v,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?a.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:x}):v==="script"&&a.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},e.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=d(m.as,m.crossOrigin);a.d.M(p,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(p)},e.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,g=d(v,m.crossOrigin);a.d.L(p,v,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},e.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=d(m.as,m.crossOrigin);a.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(p)},e.requestFormReset=function(p){a.d.r(p)},e.unstable_batchedUpdates=function(p,m){return p(m)},e.useFormState=function(p,m,v){return u.H.useFormState(p,m,v)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version="19.2.7"}),Jt=ir((e,t)=>{"use strict";function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}r(),t.exports=Yee()}),Jee=ir(e=>{"use strict";function t(z,L){var U=z.length;z.push(L);e:for(;0<U;){var Y=U-1>>>1,X=z[Y];if(0<a(X,L))z[Y]=L,z[U]=X,U=Y;else break e}}function r(z){return z.length===0?null:z[0]}function n(z){if(z.length===0)return null;var L=z[0],U=z.pop();if(U!==L){z[0]=U;e:for(var Y=0,X=z.length,J=X>>>1;Y<J;){var N=2*(Y+1)-1,R=z[N],K=N+1,Q=z[K];if(0>a(R,U))K<X&&0>a(Q,R)?(z[Y]=Q,z[K]=U,Y=K):(z[Y]=R,z[N]=U,Y=N);else if(K<X&&0>a(Q,U))z[Y]=Q,z[K]=U,Y=K;else break e}}return L}function a(z,L){var U=z.sortIndex-L.sortIndex;return U!==0?U:z.id-L.id}e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"?(o=performance,e.unstable_now=function(){return o.now()}):(l=Date,u=l.now(),e.unstable_now=function(){return l.now()-u});var o,l,u,d=[],p=[],m=1,v=null,g=3,b=!1,x=!1,y=!1,E=!1,S=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function C(z){for(var L=r(p);L!==null;){if(L.callback===null)n(p);else if(L.startTime<=z)n(p),L.sortIndex=L.expirationTime,t(d,L);else break;L=r(p)}}function D(z){if(y=!1,C(z),!x)if(r(d)!==null)x=!0,I||(I=!0,V());else{var L=r(p);L!==null&&q(D,L.startTime-z)}}var I=!1,M=-1,A=5,j=-1;function P(){return E?!0:!(e.unstable_now()-j<A)}function O(){if(E=!1,I){var z=e.unstable_now();j=z;var L=!0;try{e:{x=!1,y&&(y=!1,F(M),M=-1),b=!0;var U=g;try{t:{for(C(z),v=r(d);v!==null&&!(v.expirationTime>z&&P());){var Y=v.callback;if(typeof Y=="function"){v.callback=null,g=v.priorityLevel;var X=Y(v.expirationTime<=z);if(z=e.unstable_now(),typeof X=="function"){v.callback=X,C(z),L=!0;break t}v===r(d)&&n(d),C(z)}else n(d);v=r(d)}if(v!==null)L=!0;else{var J=r(p);J!==null&&q(D,J.startTime-z),L=!1}}break e}finally{v=null,g=U,b=!1}L=void 0}}finally{L?V():I=!1}}}var V;typeof $=="function"?V=function(){$(O)}:typeof MessageChannel<"u"?(W=new MessageChannel,H=W.port2,W.port1.onmessage=O,V=function(){H.postMessage(null)}):V=function(){S(O,0)};var W,H;function q(z,L){M=S(function(){z(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(z){switch(g){case 1:case 2:case 3:var L=3;break;default:L=g}var U=g;g=L;try{return z()}finally{g=U}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(z,L){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var U=g;g=z;try{return L()}finally{g=U}},e.unstable_scheduleCallback=function(z,L,U){var Y=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?Y+U:Y):U=Y,z){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=U+X,z={id:m++,callback:L,priorityLevel:z,startTime:U,expirationTime:X,sortIndex:-1},U>Y?(z.sortIndex=U,t(p,z),r(d)===null&&z===r(p)&&(y?(F(M),M=-1):y=!0,q(D,U-Y))):(z.sortIndex=X,t(d,z),x||b||(x=!0,I||(I=!0,V()))),z},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(z){var L=g;return function(){var U=g;g=L;try{return z.apply(this,arguments)}finally{g=U}}}}),Zee=ir((e,t)=>{"use strict";t.exports=Jee()}),ete=ir(e=>{"use strict";var t=Zee(),r=_(),n=Jt();function a(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function l(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function u(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function d(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function p(i){if(l(i)!==i)throw Error(a(188))}function m(i){var s=i.alternate;if(!s){if(s=l(i),s===null)throw Error(a(188));return s!==i?null:i}for(var c=i,f=s;;){var w=c.return;if(w===null)break;var k=w.alternate;if(k===null){if(f=w.return,f!==null){c=f;continue}break}if(w.child===k.child){for(k=w.child;k;){if(k===c)return p(w),i;if(k===f)return p(w),s;k=k.sibling}throw Error(a(188))}if(c.return!==f.return)c=w,f=k;else{for(var T=!1,G=w.child;G;){if(G===c){T=!0,c=w,f=k;break}if(G===f){T=!0,f=w,c=k;break}G=G.sibling}if(!T){for(G=k.child;G;){if(G===c){T=!0,c=k,f=w;break}if(G===f){T=!0,f=k,c=w;break}G=G.sibling}if(!T)throw Error(a(189))}}if(c.alternate!==f)throw Error(a(190))}if(c.tag!==3)throw Error(a(188));return c.stateNode.current===c?i:s}function v(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=v(i),s!==null)return s;i=i.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),C=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function W(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var H=Symbol.for("react.client.reference");function q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===H?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case E:return"Fragment";case F:return"Profiler";case S:return"StrictMode";case I:return"Suspense";case M:return"SuspenseList";case P:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case y:return"Portal";case C:return i.displayName||"Context";case $:return(i._context.displayName||"Context")+".Consumer";case D:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case A:return s=i.displayName||null,s!==null?s:q(i.type)||"Memo";case j:s=i._payload,i=i._init;try{return q(i(s))}catch{}}return null}var z=Array.isArray,L=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},X=[],J=-1;function N(i){return{current:i}}function R(i){0>J||(i.current=X[J],X[J]=null,J--)}function K(i,s){J++,X[J]=i.current,i.current=s}var Q=N(null),ee=N(null),te=N(null),ne=N(null);function me(i,s){switch(K(te,s),K(ee,i),K(Q,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?_N(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=_N(s),i=NN(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}R(Q),K(Q,i)}function se(){R(Q),R(ee),R(te)}function he(i){i.memoizedState!==null&&K(ne,i);var s=Q.current,c=NN(s,i.type);s!==c&&(K(ee,i),K(Q,c))}function le(i){ee.current===i&&(R(Q),R(ee)),ne.current===i&&(R(ne),Lv._currentValue=Y)}var ke,Ae;function de(i){if(ke===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ke=s&&s[1]||"",Ae=-1<c.stack.indexOf(`
4
- at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
5
- `+ke+i+Ae}var ve=!1;function ye(i,s){if(!i||ve)return"";ve=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(s){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(be){var ge=be}Reflect.construct(i,[],Se)}else{try{Se.call()}catch(be){ge=be}i.call(Se.prototype)}}else{try{throw Error()}catch(be){ge=be}(Se=i())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(be){if(be&&ge&&typeof be.stack=="string")return[be.stack,ge.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=f.DetermineComponentFrameRoot(),T=k[0],G=k[1];if(T&&G){var re=T.split(`
6
- `),fe=G.split(`
7
- `);for(w=f=0;f<re.length&&!re[f].includes("DetermineComponentFrameRoot");)f++;for(;w<fe.length&&!fe[w].includes("DetermineComponentFrameRoot");)w++;if(f===re.length||w===fe.length)for(f=re.length-1,w=fe.length-1;1<=f&&0<=w&&re[f]!==fe[w];)w--;for(;1<=f&&0<=w;f--,w--)if(re[f]!==fe[w]){if(f!==1||w!==1)do if(f--,w--,0>w||re[f]!==fe[w]){var xe=`
8
- `+re[f].replace(" at new "," at ");return i.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",i.displayName)),xe}while(1<=f&&0<=w);break}}}finally{ve=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?de(c):""}function we(i,s){switch(i.tag){case 26:case 27:case 5:return de(i.type);case 16:return de("Lazy");case 13:return i.child!==s&&s!==null?de("Suspense Fallback"):de("Suspense");case 19:return de("SuspenseList");case 0:case 15:return ye(i.type,!1);case 11:return ye(i.type.render,!1);case 1:return ye(i.type,!0);case 31:return de("Activity");default:return""}}function Oe(i){try{var s="",c=null;do s+=we(i,c),c=i,i=i.return;while(i);return s}catch(f){return`
9
- Error generating stack: `+f.message+`
10
- `+f.stack}}var Fe=Object.prototype.hasOwnProperty,$e=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,qe=t.unstable_shouldYield,ze=t.unstable_requestPaint,Te=t.unstable_now,Ne=t.unstable_getCurrentPriorityLevel,Qe=t.unstable_ImmediatePriority,ot=t.unstable_UserBlockingPriority,et=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Re=t.log,ht=t.unstable_setDisableYieldValue,lt=null,Xe=null;function Pe(i){if(typeof Re=="function"&&ht(i),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(lt,i)}catch{}}var at=Math.clz32?Math.clz32:Yr,Nt=Math.log,Pt=Math.LN2;function Yr(i){return i>>>=0,i===0?32:31-(Nt(i)/Pt|0)|0}var Gt=256,Tr=262144,er=4194304;function It(i){var s=i&42;if(s!==0)return s;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function lr(i,s,c){var f=i.pendingLanes;if(f===0)return 0;var w=0,k=i.suspendedLanes,T=i.pingedLanes;i=i.warmLanes;var G=f&134217727;return G!==0?(f=G&~k,f!==0?w=It(f):(T&=G,T!==0?w=It(T):c||(c=G&~i,c!==0&&(w=It(c))))):(G=f&~k,G!==0?w=It(G):T!==0?w=It(T):c||(c=f&~i,c!==0&&(w=It(c)))),w===0?0:s!==0&&s!==w&&(s&k)===0&&(k=w&-w,c=s&-s,k>=c||k===32&&(c&4194048)!==0)?s:w}function $r(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function Vt(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var i=er;return er<<=1,(er&62914560)===0&&(er=4194304),i}function St(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function Le(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function tt(i,s,c,f,w,k){var T=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var G=i.entanglements,re=i.expirationTimes,fe=i.hiddenUpdates;for(c=T&~c;0<c;){var xe=31-at(c),Se=1<<xe;G[xe]=0,re[xe]=-1;var ge=fe[xe];if(ge!==null)for(fe[xe]=null,xe=0;xe<ge.length;xe++){var be=ge[xe];be!==null&&(be.lane&=-536870913)}c&=~Se}f!==0&&ut(i,f,0),k!==0&&w===0&&i.tag!==0&&(i.suspendedLanes|=k&~(T&~s))}function ut(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var f=31-at(s);i.entangledLanes|=s,i.entanglements[f]=i.entanglements[f]|1073741824|c&261930}function He(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var f=31-at(c),w=1<<f;w&s|i[f]&s&&(i[f]|=s),c&=~w}}function rt(i,s){var c=s&-s;return c=(c&42)!==0?1:gt(c),(c&(i.suspendedLanes|s))!==0?0:c}function gt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Kt(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Xt(){var i=U.p;return i!==0?i:(i=window.event,i===void 0?32:iP(i.type))}function on(i,s){var c=U.p;try{return U.p=i,s()}finally{U.p=c}}var Nr=Math.random().toString(36).slice(2),tr="__reactFiber$"+Nr,Wr="__reactProps$"+Nr,vt="__reactContainer$"+Nr,Rt="__reactEvents$"+Nr,gr="__reactListeners$"+Nr,In="__reactHandles$"+Nr,Xa="__reactResources$"+Nr,pr="__reactMarker$"+Nr;function mi(i){delete i[tr],delete i[Wr],delete i[Rt],delete i[gr],delete i[In]}function Qa(i){var s=i[tr];if(s)return s;for(var c=i.parentNode;c;){if(s=c[vt]||c[tr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=qN(i);i!==null;){if(c=i[tr])return c;i=qN(i)}return s}i=c,c=i.parentNode}return null}function Dr(i){if(i=i[tr]||i[vt]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Hn(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(a(33))}function Ca(i){var s=i[Xa];return s||(s=i[Xa]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function fr(i){i[pr]=!0}var Mi=new Set,io={};function Sa(i,s){bt(i,s),bt(i+"Capture",s)}function bt(i,s){for(io[i]=s,i=0;i<s.length;i++)Mi.add(s[i])}var Yn=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jn={},Zn={};function cp(i){return Fe.call(Zn,i)?!0:Fe.call(Jn,i)?!1:Yn.test(i)?Zn[i]=!0:(Jn[i]=!0,!1)}function hs(i,s,c){if(cp(s))if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var f=s.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+c)}}function al(i,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+c)}}function Ti(i,s,c,f){if(f===null)i.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(s,c,""+f)}}function Fa(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Tm(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function tv(i,s,c){var f=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var w=f.get,k=f.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return w.call(this)},set:function(T){c=""+T,k.call(this,T)}}),Object.defineProperty(i,s,{enumerable:f.enumerable}),{getValue:function(){return c},setValue:function(T){c=""+T},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function rv(i){if(!i._valueTracker){var s=Tm(i)?"checked":"value";i._valueTracker=tv(i,s,""+i[s])}}function Ve(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),f="";return i&&(f=Tm(i)?i.checked?"true":"false":i.value),i=f,i!==c?(s.setValue(i),!0):!1}function rr(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var jm=/[\n"\\]/g;function oo(i){return i.replace(jm,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function _m(i,s,c,f,w,k,T,G){i.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?i.type=T:i.removeAttribute("type"),s!=null?T==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+Fa(s)):i.value!==""+Fa(s)&&(i.value=""+Fa(s)):T!=="submit"&&T!=="reset"||i.removeAttribute("value"),s!=null?av(i,T,Fa(s)):c!=null?av(i,T,Fa(c)):f!=null&&i.removeAttribute("value"),w==null&&k!=null&&(i.defaultChecked=!!k),w!=null&&(i.checked=w&&typeof w!="function"&&typeof w!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?i.name=""+Fa(G):i.removeAttribute("name")}function nv(i,s,c,f,w,k,T,G){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(i.type=k),s!=null||c!=null){if(!(k!=="submit"&&k!=="reset"||s!=null)){rv(i);return}c=c!=null?""+Fa(c):"",s=s!=null?""+Fa(s):c,G||s===i.value||(i.value=s),i.defaultValue=s}f=f??w,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=G?i.checked:!!f,i.defaultChecked=!!f,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.name=T),rv(i)}function av(i,s,c){s==="number"&&rr(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function Nm(i,s,c,f){if(i=i.options,s){s={};for(var w=0;w<c.length;w++)s["$"+c[w]]=!0;for(c=0;c<i.length;c++)w=s.hasOwnProperty("$"+i[c].value),i[c].selected!==w&&(i[c].selected=w),w&&f&&(i[c].defaultSelected=!0)}else{for(c=""+Fa(c),s=null,w=0;w<i.length;w++){if(i[w].value===c){i[w].selected=!0,f&&(i[w].defaultSelected=!0);return}s!==null||i[w].disabled||(s=i[w])}s!==null&&(s.selected=!0)}}function AT(i,s,c){if(s!=null&&(s=""+Fa(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+Fa(c):""}function BT(i,s,c,f){if(s==null){if(f!=null){if(c!=null)throw Error(a(92));if(z(f)){if(1<f.length)throw Error(a(93));f=f[0]}c=f}c==null&&(c=""),s=c}c=Fa(s),i.defaultValue=c,f=i.textContent,f===c&&f!==""&&f!==null&&(i.value=f),rv(i)}function Pm(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var zJ=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function IT(i,s,c){var f=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?f?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":f?i.setProperty(s,c):typeof c!="number"||c===0||zJ.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function MT(i,s,c){if(s!=null&&typeof s!="object")throw Error(a(62));if(i=i.style,c!=null){for(var f in c)!c.hasOwnProperty(f)||s!=null&&s.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var w in s)f=s[w],s.hasOwnProperty(w)&&c[w]!==f&&IT(i,w,f)}else for(var k in s)s.hasOwnProperty(k)&&IT(i,k,s[k])}function LC(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var LJ=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),HJ=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function qw(i){return HJ.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function tu(){}var HC=null;function qC(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Rm=null,Om=null;function TT(i){var s=Dr(i);if(s&&(i=s.stateNode)){var c=i[Wr]||null;e:switch(i=s.stateNode,s.type){case"input":if(_m(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+oo(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var w=f[Wr]||null;if(!w)throw Error(a(90));_m(f,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(s=0;s<c.length;s++)f=c[s],f.form===i.form&&Ve(f)}break e;case"textarea":AT(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Nm(i,!!c.multiple,s,!1)}}}var WC=!1;function jT(i,s,c){if(WC)return i(s,c);WC=!0;try{var f=i(s);return f}finally{if(WC=!1,(Rm!==null||Om!==null)&&(I5(),Rm&&(s=Rm,i=Om,Om=Rm=null,TT(s),i)))for(s=0;s<i.length;s++)TT(i[s])}}function iv(i,s){var c=i.stateNode;if(c===null)return null;var f=c[Wr]||null;if(f===null)return null;c=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(a(231,s,typeof c));return c}var ru=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),VC=!1;if(ru)try{zm={},Object.defineProperty(zm,"passive",{get:function(){VC=!0}}),window.addEventListener("test",zm,zm),window.removeEventListener("test",zm,zm)}catch{VC=!1}var zm,vc=null,UC=null,Ww=null;function _T(){if(Ww)return Ww;var i,s=UC,c=s.length,f,w="value"in vc?vc.value:vc.textContent,k=w.length;for(i=0;i<c&&s[i]===w[i];i++);var T=c-i;for(f=1;f<=T&&s[c-f]===w[k-f];f++);return Ww=w.slice(i,1<f?1-f:void 0)}function Vw(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Uw(){return!0}function NT(){return!1}function ji(i){function s(c,f,w,k,T){this._reactName=c,this._targetInst=w,this.type=f,this.nativeEvent=k,this.target=T,this.currentTarget=null;for(var G in i)i.hasOwnProperty(G)&&(c=i[G],this[G]=c?c(k):k[G]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?Uw:NT,this.isPropagationStopped=NT,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Uw)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Uw)},persist:function(){},isPersistent:Uw}),s}var dp={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gw=ji(dp),ov=g({},dp,{view:0,detail:0}),qJ=ji(ov),GC,KC,sv,Kw=g({},ov,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:QC,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==sv&&(sv&&i.type==="mousemove"?(GC=i.screenX-sv.screenX,KC=i.screenY-sv.screenY):KC=GC=0,sv=i),GC)},movementY:function(i){return"movementY"in i?i.movementY:KC}}),PT=ji(Kw),WJ=g({},Kw,{dataTransfer:0}),VJ=ji(WJ),UJ=g({},ov,{relatedTarget:0}),XC=ji(UJ),GJ=g({},dp,{animationName:0,elapsedTime:0,pseudoElement:0}),KJ=ji(GJ),XJ=g({},dp,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),QJ=ji(XJ),YJ=g({},dp,{data:0}),RT=ji(YJ),JJ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZJ={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eZ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tZ(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=eZ[i])?!!s[i]:!1}function QC(){return tZ}var rZ=g({},ov,{key:function(i){if(i.key){var s=JJ[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Vw(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?ZJ[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:QC,charCode:function(i){return i.type==="keypress"?Vw(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Vw(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),nZ=ji(rZ),aZ=g({},Kw,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OT=ji(aZ),iZ=g({},ov,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:QC}),oZ=ji(iZ),sZ=g({},dp,{propertyName:0,elapsedTime:0,pseudoElement:0}),lZ=ji(sZ),uZ=g({},Kw,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),cZ=ji(uZ),dZ=g({},dp,{newState:0,oldState:0}),pZ=ji(dZ),fZ=[9,13,27,32],YC=ru&&"CompositionEvent"in window,lv=null;ru&&"documentMode"in document&&(lv=document.documentMode);var mZ=ru&&"TextEvent"in window&&!lv,zT=ru&&(!YC||lv&&8<lv&&11>=lv),LT=" ",HT=!1;function qT(i,s){switch(i){case"keyup":return fZ.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WT(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Lm=!1;function hZ(i,s){switch(i){case"compositionend":return WT(s);case"keypress":return s.which!==32?null:(HT=!0,LT);case"textInput":return i=s.data,i===LT&&HT?null:i;default:return null}}function gZ(i,s){if(Lm)return i==="compositionend"||!YC&&qT(i,s)?(i=_T(),Ww=UC=vc=null,Lm=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return zT&&s.locale!=="ko"?null:s.data;default:return null}}var vZ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function VT(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!vZ[i.type]:s==="textarea"}function UT(i,s,c,f){Rm?Om?Om.push(f):Om=[f]:Rm=f,s=z5(s,"onChange"),0<s.length&&(c=new Gw("onChange","change",null,c,f),i.push({event:c,listeners:s}))}var uv=null,cv=null;function bZ(i){AN(i,0)}function Xw(i){var s=Hn(i);if(Ve(s))return i}function GT(i,s){if(i==="change")return s}var KT=!1;ru&&(ru?(Qw="oninput"in document,Qw||(ZC=document.createElement("div"),ZC.setAttribute("oninput","return;"),Qw=typeof ZC.oninput=="function"),JC=Qw):JC=!1,KT=JC&&(!document.documentMode||9<document.documentMode));var JC,Qw,ZC;function XT(){uv&&(uv.detachEvent("onpropertychange",QT),cv=uv=null)}function QT(i){if(i.propertyName==="value"&&Xw(cv)){var s=[];UT(s,cv,i,qC(i)),jT(bZ,s)}}function yZ(i,s,c){i==="focusin"?(XT(),uv=s,cv=c,uv.attachEvent("onpropertychange",QT)):i==="focusout"&&XT()}function wZ(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Xw(cv)}function xZ(i,s){if(i==="click")return Xw(s)}function EZ(i,s){if(i==="input"||i==="change")return Xw(s)}function kZ(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var so=typeof Object.is=="function"?Object.is:kZ;function dv(i,s){if(so(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),f=Object.keys(s);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var w=c[f];if(!Fe.call(s,w)||!so(i[w],s[w]))return!1}return!0}function YT(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function JT(i,s){var c=YT(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=s&&f>=s)return{node:c,offset:s-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=YT(c)}}function ZT(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?ZT(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function ej(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=rr(i.document);s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=rr(i.document)}return s}function eS(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var CZ=ru&&"documentMode"in document&&11>=document.documentMode,Hm=null,tS=null,pv=null,rS=!1;function tj(i,s,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;rS||Hm==null||Hm!==rr(f)||(f=Hm,"selectionStart"in f&&eS(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),pv&&dv(pv,f)||(pv=f,f=z5(tS,"onSelect"),0<f.length&&(s=new Gw("onSelect","select",null,s,c),i.push({event:s,listeners:f}),s.target=Hm)))}function pp(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var qm={animationend:pp("Animation","AnimationEnd"),animationiteration:pp("Animation","AnimationIteration"),animationstart:pp("Animation","AnimationStart"),transitionrun:pp("Transition","TransitionRun"),transitionstart:pp("Transition","TransitionStart"),transitioncancel:pp("Transition","TransitionCancel"),transitionend:pp("Transition","TransitionEnd")},nS={},rj={};ru&&(rj=document.createElement("div").style,"AnimationEvent"in window||(delete qm.animationend.animation,delete qm.animationiteration.animation,delete qm.animationstart.animation),"TransitionEvent"in window||delete qm.transitionend.transition);function fp(i){if(nS[i])return nS[i];if(!qm[i])return i;var s=qm[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in rj)return nS[i]=s[c];return i}var nj=fp("animationend"),aj=fp("animationiteration"),ij=fp("animationstart"),SZ=fp("transitionrun"),FZ=fp("transitionstart"),$Z=fp("transitioncancel"),oj=fp("transitionend"),sj=new Map,aS="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");aS.push("scrollEnd");function gs(i,s){sj.set(i,s),Sa(s,[i])}var Yw=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Mo=[],Wm=0,iS=0;function Jw(){for(var i=Wm,s=iS=Wm=0;s<i;){var c=Mo[s];Mo[s++]=null;var f=Mo[s];Mo[s++]=null;var w=Mo[s];Mo[s++]=null;var k=Mo[s];if(Mo[s++]=null,f!==null&&w!==null){var T=f.pending;T===null?w.next=w:(w.next=T.next,T.next=w),f.pending=w}k!==0&&lj(c,w,k)}}function Zw(i,s,c,f){Mo[Wm++]=i,Mo[Wm++]=s,Mo[Wm++]=c,Mo[Wm++]=f,iS|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function oS(i,s,c,f){return Zw(i,s,c,f),e5(i)}function mp(i,s){return Zw(i,null,null,s),e5(i)}function lj(i,s,c){i.lanes|=c;var f=i.alternate;f!==null&&(f.lanes|=c);for(var w=!1,k=i.return;k!==null;)k.childLanes|=c,f=k.alternate,f!==null&&(f.childLanes|=c),k.tag===22&&(i=k.stateNode,i===null||i._visibility&1||(w=!0)),i=k,k=k.return;return i.tag===3?(k=i.stateNode,w&&s!==null&&(w=31-at(c),i=k.hiddenUpdates,f=i[w],f===null?i[w]=[s]:f.push(s),s.lane=c|536870912),k):null}function e5(i){if(50<jv)throw jv=0,h8=null,Error(a(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var Vm={};function DZ(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lo(i,s,c,f){return new DZ(i,s,c,f)}function sS(i){return i=i.prototype,!(!i||!i.isReactComponent)}function nu(i,s){var c=i.alternate;return c===null?(c=lo(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function uj(i,s){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,s=c.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function t5(i,s,c,f,w,k){var T=0;if(f=i,typeof i=="function")sS(i)&&(T=1);else if(typeof i=="string")T=Iee(i,c,Q.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case P:return i=lo(31,c,s,w),i.elementType=P,i.lanes=k,i;case E:return hp(c.children,w,k,s);case S:T=8,w|=24;break;case F:return i=lo(12,c,s,w|2),i.elementType=F,i.lanes=k,i;case I:return i=lo(13,c,s,w),i.elementType=I,i.lanes=k,i;case M:return i=lo(19,c,s,w),i.elementType=M,i.lanes=k,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case C:T=10;break e;case $:T=9;break e;case D:T=11;break e;case A:T=14;break e;case j:T=16,f=null;break e}T=29,c=Error(a(130,i===null?"null":typeof i,"")),f=null}return s=lo(T,c,s,w),s.elementType=i,s.type=f,s.lanes=k,s}function hp(i,s,c,f){return i=lo(7,i,f,s),i.lanes=c,i}function lS(i,s,c){return i=lo(6,i,null,s),i.lanes=c,i}function cj(i){var s=lo(18,null,null,0);return s.stateNode=i,s}function uS(i,s,c){return s=lo(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var dj=new WeakMap;function To(i,s){if(typeof i=="object"&&i!==null){var c=dj.get(i);return c!==void 0?c:(s={value:i,source:s,stack:Oe(s)},dj.set(i,s),s)}return{value:i,source:s,stack:Oe(s)}}var Um=[],Gm=0,r5=null,fv=0,jo=[],_o=0,bc=null,il=1,ol="";function au(i,s){Um[Gm++]=fv,Um[Gm++]=r5,r5=i,fv=s}function pj(i,s,c){jo[_o++]=il,jo[_o++]=ol,jo[_o++]=bc,bc=i;var f=il;i=ol;var w=32-at(f)-1;f&=~(1<<w),c+=1;var k=32-at(s)+w;if(30<k){var T=w-w%5;k=(f&(1<<T)-1).toString(32),f>>=T,w-=T,il=1<<32-at(s)+w|c<<w|f,ol=k+i}else il=1<<k|c<<w|f,ol=i}function cS(i){i.return!==null&&(au(i,1),pj(i,1,0))}function dS(i){for(;i===r5;)r5=Um[--Gm],Um[Gm]=null,fv=Um[--Gm],Um[Gm]=null;for(;i===bc;)bc=jo[--_o],jo[_o]=null,ol=jo[--_o],jo[_o]=null,il=jo[--_o],jo[_o]=null}function fj(i,s){jo[_o++]=il,jo[_o++]=ol,jo[_o++]=bc,il=s.id,ol=s.overflow,bc=i}var $a=null,sn=null,ur=!1,yc=null,No=!1,pS=Error(a(519));function wc(i){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mv(To(s,i)),pS}function mj(i){var s=i.stateNode,c=i.type,f=i.memoizedProps;switch(s[tr]=i,s[Wr]=f,c){case"dialog":Yt("cancel",s),Yt("close",s);break;case"iframe":case"object":case"embed":Yt("load",s);break;case"video":case"audio":for(c=0;c<Nv.length;c++)Yt(Nv[c],s);break;case"source":Yt("error",s);break;case"img":case"image":case"link":Yt("error",s),Yt("load",s);break;case"details":Yt("toggle",s);break;case"input":Yt("invalid",s),nv(s,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":Yt("invalid",s);break;case"textarea":Yt("invalid",s),BT(s,f.value,f.defaultValue,f.children)}c=f.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||f.suppressHydrationWarning===!0||TN(s.textContent,c)?(f.popover!=null&&(Yt("beforetoggle",s),Yt("toggle",s)),f.onScroll!=null&&Yt("scroll",s),f.onScrollEnd!=null&&Yt("scrollend",s),f.onClick!=null&&(s.onclick=tu),s=!0):s=!1,s||wc(i,!0)}function hj(i){for($a=i.return;$a;)switch($a.tag){case 5:case 31:case 13:No=!1;return;case 27:case 3:No=!0;return;default:$a=$a.return}}function Km(i){if(i!==$a)return!1;if(!ur)return hj(i),ur=!0,!1;var s=i.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||D8(i.type,i.memoizedProps)),c=!c),c&&sn&&wc(i),hj(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));sn=HN(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));sn=HN(i)}else s===27?(s=sn,jc(i.type)?(i=T8,T8=null,sn=i):sn=s):sn=$a?Po(i.stateNode.nextSibling):null;return!0}function gp(){sn=$a=null,ur=!1}function fS(){var i=yc;return i!==null&&(Ri===null?Ri=i:Ri.push.apply(Ri,i),yc=null),i}function mv(i){yc===null?yc=[i]:yc.push(i)}var mS=N(null),vp=null,iu=null;function xc(i,s,c){K(mS,s._currentValue),s._currentValue=c}function ou(i){i._currentValue=mS.current,R(mS)}function hS(i,s,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===c)break;i=i.return}}function gS(i,s,c,f){var w=i.child;for(w!==null&&(w.return=i);w!==null;){var k=w.dependencies;if(k!==null){var T=w.child;k=k.firstContext;e:for(;k!==null;){var G=k;k=w;for(var re=0;re<s.length;re++)if(G.context===s[re]){k.lanes|=c,G=k.alternate,G!==null&&(G.lanes|=c),hS(k.return,c,i),f||(T=null);break e}k=G.next}}else if(w.tag===18){if(T=w.return,T===null)throw Error(a(341));T.lanes|=c,k=T.alternate,k!==null&&(k.lanes|=c),hS(T,c,i),T=null}else T=w.child;if(T!==null)T.return=w;else for(T=w;T!==null;){if(T===i){T=null;break}if(w=T.sibling,w!==null){w.return=T.return,T=w;break}T=T.return}w=T}}function Xm(i,s,c,f){i=null;for(var w=s,k=!1;w!==null;){if(!k){if((w.flags&524288)!==0)k=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var T=w.alternate;if(T===null)throw Error(a(387));if(T=T.memoizedProps,T!==null){var G=w.type;so(w.pendingProps.value,T.value)||(i!==null?i.push(G):i=[G])}}else if(w===ne.current){if(T=w.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(i!==null?i.push(Lv):i=[Lv])}w=w.return}i!==null&&gS(s,i,c,f),s.flags|=262144}function n5(i){for(i=i.firstContext;i!==null;){if(!so(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function bp(i){vp=i,iu=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Da(i){return gj(vp,i)}function a5(i,s){return vp===null&&bp(i),gj(i,s)}function gj(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},iu===null){if(i===null)throw Error(a(308));iu=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else iu=iu.next=s;return c}var AZ=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(c,f){i.push(f)}};this.abort=function(){s.aborted=!0,i.forEach(function(c){return c()})}},BZ=t.unstable_scheduleCallback,IZ=t.unstable_NormalPriority,qn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vS(){return{controller:new AZ,data:new Map,refCount:0}}function hv(i){i.refCount--,i.refCount===0&&BZ(IZ,function(){i.controller.abort()})}var gv=null,bS=0,Qm=0,Ym=null;function MZ(i,s){if(gv===null){var c=gv=[];bS=0,Qm=x8(),Ym={status:"pending",value:void 0,then:function(f){c.push(f)}}}return bS++,s.then(vj,vj),s}function vj(){if(--bS===0&&gv!==null){Ym!==null&&(Ym.status="fulfilled");var i=gv;gv=null,Qm=0,Ym=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function TZ(i,s){var c=[],f={status:"pending",value:null,reason:null,then:function(w){c.push(w)}};return i.then(function(){f.status="fulfilled",f.value=s;for(var w=0;w<c.length;w++)(0,c[w])(s)},function(w){for(f.status="rejected",f.reason=w,w=0;w<c.length;w++)(0,c[w])(void 0)}),f}var bj=L.S;L.S=function(i,s){tN=Te(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&MZ(i,s),bj!==null&&bj(i,s)};var yp=N(null);function yS(){var i=yp.current;return i!==null?i:Vr.pooledCache}function i5(i,s){s===null?K(yp,yp.current):K(yp,s.pool)}function yj(){var i=yS();return i===null?null:{parent:qn._currentValue,pool:i}}var Jm=Error(a(460)),wS=Error(a(474)),o5=Error(a(542)),s5={then:function(){}};function wj(i){return i=i.status,i==="fulfilled"||i==="rejected"}function xj(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(tu,tu),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,kj(i),i;default:if(typeof s.status=="string")s.then(tu,tu);else{if(i=Vr,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=s,i.status="pending",i.then(function(f){if(s.status==="pending"){var w=s;w.status="fulfilled",w.value=f}},function(f){if(s.status==="pending"){var w=s;w.status="rejected",w.reason=f}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,kj(i),i}throw xp=s,Jm}}function wp(i){try{var s=i._init;return s(i._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(xp=c,Jm):c}}var xp=null;function Ej(){if(xp===null)throw Error(a(459));var i=xp;return xp=null,i}function kj(i){if(i===Jm||i===o5)throw Error(a(483))}var Zm=null,vv=0;function l5(i){var s=vv;return vv+=1,Zm===null&&(Zm=[]),xj(Zm,i,s)}function bv(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function u5(i,s){throw s.$$typeof===b?Error(a(525)):(i=Object.prototype.toString.call(s),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function Cj(i){function s(ce,oe){if(i){var pe=ce.deletions;pe===null?(ce.deletions=[oe],ce.flags|=16):pe.push(oe)}}function c(ce,oe){if(!i)return null;for(;oe!==null;)s(ce,oe),oe=oe.sibling;return null}function f(ce){for(var oe=new Map;ce!==null;)ce.key!==null?oe.set(ce.key,ce):oe.set(ce.index,ce),ce=ce.sibling;return oe}function w(ce,oe){return ce=nu(ce,oe),ce.index=0,ce.sibling=null,ce}function k(ce,oe,pe){return ce.index=pe,i?(pe=ce.alternate,pe!==null?(pe=pe.index,pe<oe?(ce.flags|=67108866,oe):pe):(ce.flags|=67108866,oe)):(ce.flags|=1048576,oe)}function T(ce){return i&&ce.alternate===null&&(ce.flags|=67108866),ce}function G(ce,oe,pe,Ce){return oe===null||oe.tag!==6?(oe=lS(pe,ce.mode,Ce),oe.return=ce,oe):(oe=w(oe,pe),oe.return=ce,oe)}function re(ce,oe,pe,Ce){var dt=pe.type;return dt===E?xe(ce,oe,pe.props.children,Ce,pe.key):oe!==null&&(oe.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===j&&wp(dt)===oe.type)?(oe=w(oe,pe.props),bv(oe,pe),oe.return=ce,oe):(oe=t5(pe.type,pe.key,pe.props,null,ce.mode,Ce),bv(oe,pe),oe.return=ce,oe)}function fe(ce,oe,pe,Ce){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==pe.containerInfo||oe.stateNode.implementation!==pe.implementation?(oe=uS(pe,ce.mode,Ce),oe.return=ce,oe):(oe=w(oe,pe.children||[]),oe.return=ce,oe)}function xe(ce,oe,pe,Ce,dt){return oe===null||oe.tag!==7?(oe=hp(pe,ce.mode,Ce,dt),oe.return=ce,oe):(oe=w(oe,pe),oe.return=ce,oe)}function Se(ce,oe,pe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return oe=lS(""+oe,ce.mode,pe),oe.return=ce,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:return pe=t5(oe.type,oe.key,oe.props,null,ce.mode,pe),bv(pe,oe),pe.return=ce,pe;case y:return oe=uS(oe,ce.mode,pe),oe.return=ce,oe;case j:return oe=wp(oe),Se(ce,oe,pe)}if(z(oe)||W(oe))return oe=hp(oe,ce.mode,pe,null),oe.return=ce,oe;if(typeof oe.then=="function")return Se(ce,l5(oe),pe);if(oe.$$typeof===C)return Se(ce,a5(ce,oe),pe);u5(ce,oe)}return null}function ge(ce,oe,pe,Ce){var dt=oe!==null?oe.key:null;if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return dt!==null?null:G(ce,oe,""+pe,Ce);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case x:return pe.key===dt?re(ce,oe,pe,Ce):null;case y:return pe.key===dt?fe(ce,oe,pe,Ce):null;case j:return pe=wp(pe),ge(ce,oe,pe,Ce)}if(z(pe)||W(pe))return dt!==null?null:xe(ce,oe,pe,Ce,null);if(typeof pe.then=="function")return ge(ce,oe,l5(pe),Ce);if(pe.$$typeof===C)return ge(ce,oe,a5(ce,pe),Ce);u5(ce,pe)}return null}function be(ce,oe,pe,Ce,dt){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return ce=ce.get(pe)||null,G(oe,ce,""+Ce,dt);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case x:return ce=ce.get(Ce.key===null?pe:Ce.key)||null,re(oe,ce,Ce,dt);case y:return ce=ce.get(Ce.key===null?pe:Ce.key)||null,fe(oe,ce,Ce,dt);case j:return Ce=wp(Ce),be(ce,oe,pe,Ce,dt)}if(z(Ce)||W(Ce))return ce=ce.get(pe)||null,xe(oe,ce,Ce,dt,null);if(typeof Ce.then=="function")return be(ce,oe,pe,l5(Ce),dt);if(Ce.$$typeof===C)return be(ce,oe,pe,a5(oe,Ce),dt);u5(oe,Ce)}return null}function nt(ce,oe,pe,Ce){for(var dt=null,yr=null,it=oe,Ot=oe=0,ar=null;it!==null&&Ot<pe.length;Ot++){it.index>Ot?(ar=it,it=null):ar=it.sibling;var wr=ge(ce,it,pe[Ot],Ce);if(wr===null){it===null&&(it=ar);break}i&&it&&wr.alternate===null&&s(ce,it),oe=k(wr,oe,Ot),yr===null?dt=wr:yr.sibling=wr,yr=wr,it=ar}if(Ot===pe.length)return c(ce,it),ur&&au(ce,Ot),dt;if(it===null){for(;Ot<pe.length;Ot++)it=Se(ce,pe[Ot],Ce),it!==null&&(oe=k(it,oe,Ot),yr===null?dt=it:yr.sibling=it,yr=it);return ur&&au(ce,Ot),dt}for(it=f(it);Ot<pe.length;Ot++)ar=be(it,ce,Ot,pe[Ot],Ce),ar!==null&&(i&&ar.alternate!==null&&it.delete(ar.key===null?Ot:ar.key),oe=k(ar,oe,Ot),yr===null?dt=ar:yr.sibling=ar,yr=ar);return i&&it.forEach(function(Oc){return s(ce,Oc)}),ur&&au(ce,Ot),dt}function Et(ce,oe,pe,Ce){if(pe==null)throw Error(a(151));for(var dt=null,yr=null,it=oe,Ot=oe=0,ar=null,wr=pe.next();it!==null&&!wr.done;Ot++,wr=pe.next()){it.index>Ot?(ar=it,it=null):ar=it.sibling;var Oc=ge(ce,it,wr.value,Ce);if(Oc===null){it===null&&(it=ar);break}i&&it&&Oc.alternate===null&&s(ce,it),oe=k(Oc,oe,Ot),yr===null?dt=Oc:yr.sibling=Oc,yr=Oc,it=ar}if(wr.done)return c(ce,it),ur&&au(ce,Ot),dt;if(it===null){for(;!wr.done;Ot++,wr=pe.next())wr=Se(ce,wr.value,Ce),wr!==null&&(oe=k(wr,oe,Ot),yr===null?dt=wr:yr.sibling=wr,yr=wr);return ur&&au(ce,Ot),dt}for(it=f(it);!wr.done;Ot++,wr=pe.next())wr=be(it,ce,Ot,wr.value,Ce),wr!==null&&(i&&wr.alternate!==null&&it.delete(wr.key===null?Ot:wr.key),oe=k(wr,oe,Ot),yr===null?dt=wr:yr.sibling=wr,yr=wr);return i&&it.forEach(function(Hee){return s(ce,Hee)}),ur&&au(ce,Ot),dt}function Or(ce,oe,pe,Ce){if(typeof pe=="object"&&pe!==null&&pe.type===E&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case x:e:{for(var dt=pe.key;oe!==null;){if(oe.key===dt){if(dt=pe.type,dt===E){if(oe.tag===7){c(ce,oe.sibling),Ce=w(oe,pe.props.children),Ce.return=ce,ce=Ce;break e}}else if(oe.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===j&&wp(dt)===oe.type){c(ce,oe.sibling),Ce=w(oe,pe.props),bv(Ce,pe),Ce.return=ce,ce=Ce;break e}c(ce,oe);break}else s(ce,oe);oe=oe.sibling}pe.type===E?(Ce=hp(pe.props.children,ce.mode,Ce,pe.key),Ce.return=ce,ce=Ce):(Ce=t5(pe.type,pe.key,pe.props,null,ce.mode,Ce),bv(Ce,pe),Ce.return=ce,ce=Ce)}return T(ce);case y:e:{for(dt=pe.key;oe!==null;){if(oe.key===dt)if(oe.tag===4&&oe.stateNode.containerInfo===pe.containerInfo&&oe.stateNode.implementation===pe.implementation){c(ce,oe.sibling),Ce=w(oe,pe.children||[]),Ce.return=ce,ce=Ce;break e}else{c(ce,oe);break}else s(ce,oe);oe=oe.sibling}Ce=uS(pe,ce.mode,Ce),Ce.return=ce,ce=Ce}return T(ce);case j:return pe=wp(pe),Or(ce,oe,pe,Ce)}if(z(pe))return nt(ce,oe,pe,Ce);if(W(pe)){if(dt=W(pe),typeof dt!="function")throw Error(a(150));return pe=dt.call(pe),Et(ce,oe,pe,Ce)}if(typeof pe.then=="function")return Or(ce,oe,l5(pe),Ce);if(pe.$$typeof===C)return Or(ce,oe,a5(ce,pe),Ce);u5(ce,pe)}return typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint"?(pe=""+pe,oe!==null&&oe.tag===6?(c(ce,oe.sibling),Ce=w(oe,pe),Ce.return=ce,ce=Ce):(c(ce,oe),Ce=lS(pe,ce.mode,Ce),Ce.return=ce,ce=Ce),T(ce)):c(ce,oe)}return function(ce,oe,pe,Ce){try{vv=0;var dt=Or(ce,oe,pe,Ce);return Zm=null,dt}catch(it){if(it===Jm||it===o5)throw it;var yr=lo(29,it,null,ce.mode);return yr.lanes=Ce,yr.return=ce,yr}}}var Ep=Cj(!0),Sj=Cj(!1),Ec=!1;function xS(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ES(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function kc(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Cc(i,s,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(kr&2)!==0){var w=f.pending;return w===null?s.next=s:(s.next=w.next,w.next=s),f.pending=s,s=e5(i),lj(i,null,c),s}return Zw(i,f,s,c),e5(i)}function yv(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,He(i,c)}}function kS(i,s){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var w=null,k=null;if(c=c.firstBaseUpdate,c!==null){do{var T={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};k===null?w=k=T:k=k.next=T,c=c.next}while(c!==null);k===null?w=k=s:k=k.next=s}else w=k=s;c={baseState:f.baseState,firstBaseUpdate:w,lastBaseUpdate:k,shared:f.shared,callbacks:f.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}var CS=!1;function wv(){if(CS){var i=Ym;if(i!==null)throw i}}function xv(i,s,c,f){CS=!1;var w=i.updateQueue;Ec=!1;var k=w.firstBaseUpdate,T=w.lastBaseUpdate,G=w.shared.pending;if(G!==null){w.shared.pending=null;var re=G,fe=re.next;re.next=null,T===null?k=fe:T.next=fe,T=re;var xe=i.alternate;xe!==null&&(xe=xe.updateQueue,G=xe.lastBaseUpdate,G!==T&&(G===null?xe.firstBaseUpdate=fe:G.next=fe,xe.lastBaseUpdate=re))}if(k!==null){var Se=w.baseState;T=0,xe=fe=re=null,G=k;do{var ge=G.lane&-536870913,be=ge!==G.lane;if(be?(nr&ge)===ge:(f&ge)===ge){ge!==0&&ge===Qm&&(CS=!0),xe!==null&&(xe=xe.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var nt=i,Et=G;ge=s;var Or=c;switch(Et.tag){case 1:if(nt=Et.payload,typeof nt=="function"){Se=nt.call(Or,Se,ge);break e}Se=nt;break e;case 3:nt.flags=nt.flags&-65537|128;case 0:if(nt=Et.payload,ge=typeof nt=="function"?nt.call(Or,Se,ge):nt,ge==null)break e;Se=g({},Se,ge);break e;case 2:Ec=!0}}ge=G.callback,ge!==null&&(i.flags|=64,be&&(i.flags|=8192),be=w.callbacks,be===null?w.callbacks=[ge]:be.push(ge))}else be={lane:ge,tag:G.tag,payload:G.payload,callback:G.callback,next:null},xe===null?(fe=xe=be,re=Se):xe=xe.next=be,T|=ge;if(G=G.next,G===null){if(G=w.shared.pending,G===null)break;be=G,G=be.next,be.next=null,w.lastBaseUpdate=be,w.shared.pending=null}}while(!0);xe===null&&(re=Se),w.baseState=re,w.firstBaseUpdate=fe,w.lastBaseUpdate=xe,k===null&&(w.shared.lanes=0),Ac|=T,i.lanes=T,i.memoizedState=Se}}function Fj(i,s){if(typeof i!="function")throw Error(a(191,i));i.call(s)}function $j(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Fj(c[i],s)}var eh=N(null),c5=N(0);function Dj(i,s){i=hu,K(c5,i),K(eh,s),hu=i|s.baseLanes}function SS(){K(c5,hu),K(eh,eh.current)}function FS(){hu=c5.current,R(eh),R(c5)}var uo=N(null),vs=null;function Sc(i){var s=i.alternate;K(Mn,Mn.current&1),K(uo,i),vs===null&&(s===null||eh.current!==null||s.memoizedState!==null)&&(vs=i)}function $S(i){K(Mn,Mn.current),K(uo,i),vs===null&&(vs=i)}function Aj(i){i.tag===22?(K(Mn,Mn.current),K(uo,i),vs===null&&(vs=i)):Fc(i)}function Fc(){K(Mn,Mn.current),K(uo,uo.current)}function co(i){R(uo),vs===i&&(vs=null),R(Mn)}var Mn=N(0);function d5(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||I8(c)||M8(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var su=0,Mt=null,Pr=null,Wn=null,p5=!1,th=!1,kp=!1,f5=0,Ev=0,rh=null,jZ=0;function Cn(){throw Error(a(321))}function DS(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!so(i[c],s[c]))return!1;return!0}function AS(i,s,c,f,w,k){return su=k,Mt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,L.H=i===null||i.memoizedState===null?p_:WS,kp=!1,k=c(f,w),kp=!1,th&&(k=Ij(s,c,f,w)),Bj(i),k}function Bj(i){L.H=Sv;var s=Pr!==null&&Pr.next!==null;if(su=0,Wn=Pr=Mt=null,p5=!1,Ev=0,rh=null,s)throw Error(a(300));i===null||Vn||(i=i.dependencies,i!==null&&n5(i)&&(Vn=!0))}function Ij(i,s,c,f){Mt=i;var w=0;do{if(th&&(rh=null),Ev=0,th=!1,25<=w)throw Error(a(301));if(w+=1,Wn=Pr=null,i.updateQueue!=null){var k=i.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}L.H=f_,k=s(c,f)}while(th);return k}function _Z(){var i=L.H,s=i.useState()[0];return s=typeof s.then=="function"?kv(s):s,i=i.useState()[0],(Pr!==null?Pr.memoizedState:null)!==i&&(Mt.flags|=1024),s}function BS(){var i=f5!==0;return f5=0,i}function IS(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function MS(i){if(p5){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}p5=!1}su=0,Wn=Pr=Mt=null,th=!1,Ev=f5=0,rh=null}function hi(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wn===null?Mt.memoizedState=Wn=i:Wn=Wn.next=i,Wn}function Tn(){if(Pr===null){var i=Mt.alternate;i=i!==null?i.memoizedState:null}else i=Pr.next;var s=Wn===null?Mt.memoizedState:Wn.next;if(s!==null)Wn=s,Pr=i;else{if(i===null)throw Mt.alternate===null?Error(a(467)):Error(a(310));Pr=i,i={memoizedState:Pr.memoizedState,baseState:Pr.baseState,baseQueue:Pr.baseQueue,queue:Pr.queue,next:null},Wn===null?Mt.memoizedState=Wn=i:Wn=Wn.next=i}return Wn}function m5(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kv(i){var s=Ev;return Ev+=1,rh===null&&(rh=[]),i=xj(rh,i,s),s=Mt,(Wn===null?s.memoizedState:Wn.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?p_:WS),i}function h5(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return kv(i);if(i.$$typeof===C)return Da(i)}throw Error(a(438,String(i)))}function TS(i){var s=null,c=Mt.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var f=Mt.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(s={data:f.data.map(function(w){return w.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=m5(),Mt.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(i),f=0;f<i;f++)c[f]=O;return s.index++,c}function lu(i,s){return typeof s=="function"?s(i):s}function g5(i){var s=Tn();return jS(s,Pr,i)}function jS(i,s,c){var f=i.queue;if(f===null)throw Error(a(311));f.lastRenderedReducer=c;var w=i.baseQueue,k=f.pending;if(k!==null){if(w!==null){var T=w.next;w.next=k.next,k.next=T}s.baseQueue=w=k,f.pending=null}if(k=i.baseState,w===null)i.memoizedState=k;else{s=w.next;var G=T=null,re=null,fe=s,xe=!1;do{var Se=fe.lane&-536870913;if(Se!==fe.lane?(nr&Se)===Se:(su&Se)===Se){var ge=fe.revertLane;if(ge===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),Se===Qm&&(xe=!0);else if((su&ge)===ge){fe=fe.next,ge===Qm&&(xe=!0);continue}else Se={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(G=re=Se,T=k):re=re.next=Se,Mt.lanes|=ge,Ac|=ge;Se=fe.action,kp&&c(k,Se),k=fe.hasEagerState?fe.eagerState:c(k,Se)}else ge={lane:Se,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(G=re=ge,T=k):re=re.next=ge,Mt.lanes|=Se,Ac|=Se;fe=fe.next}while(fe!==null&&fe!==s);if(re===null?T=k:re.next=G,!so(k,i.memoizedState)&&(Vn=!0,xe&&(c=Ym,c!==null)))throw c;i.memoizedState=k,i.baseState=T,i.baseQueue=re,f.lastRenderedState=k}return w===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function _S(i){var s=Tn(),c=s.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=i;var f=c.dispatch,w=c.pending,k=s.memoizedState;if(w!==null){c.pending=null;var T=w=w.next;do k=i(k,T.action),T=T.next;while(T!==w);so(k,s.memoizedState)||(Vn=!0),s.memoizedState=k,s.baseQueue===null&&(s.baseState=k),c.lastRenderedState=k}return[k,f]}function Mj(i,s,c){var f=Mt,w=Tn(),k=ur;if(k){if(c===void 0)throw Error(a(407));c=c()}else c=s();var T=!so((Pr||w).memoizedState,c);if(T&&(w.memoizedState=c,Vn=!0),w=w.queue,RS(_j.bind(null,f,w,i),[i]),w.getSnapshot!==s||T||Wn!==null&&Wn.memoizedState.tag&1){if(f.flags|=2048,nh(9,{destroy:void 0},jj.bind(null,f,w,c,s),null),Vr===null)throw Error(a(349));k||(su&127)!==0||Tj(f,s,c)}return c}function Tj(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Mt.updateQueue,s===null?(s=m5(),Mt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function jj(i,s,c,f){s.value=c,s.getSnapshot=f,Nj(s)&&Pj(i)}function _j(i,s,c){return c(function(){Nj(s)&&Pj(i)})}function Nj(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!so(i,c)}catch{return!0}}function Pj(i){var s=mp(i,2);s!==null&&Oi(s,i,2)}function NS(i){var s=hi();if(typeof i=="function"){var c=i;if(i=c(),kp){Pe(!0);try{c()}finally{Pe(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:i},s}function Rj(i,s,c,f){return i.baseState=c,jS(i,Pr,typeof f=="function"?f:lu)}function NZ(i,s,c,f,w){if(y5(i))throw Error(a(485));if(i=s.action,i!==null){var k={payload:w,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){k.listeners.push(T)}};L.T!==null?c(!0):k.isTransition=!1,f(k),c=s.pending,c===null?(k.next=s.pending=k,Oj(s,k)):(k.next=c.next,s.pending=c.next=k)}}function Oj(i,s){var c=s.action,f=s.payload,w=i.state;if(s.isTransition){var k=L.T,T={};L.T=T;try{var G=c(w,f),re=L.S;re!==null&&re(T,G),zj(i,s,G)}catch(fe){PS(i,s,fe)}finally{k!==null&&T.types!==null&&(k.types=T.types),L.T=k}}else try{k=c(w,f),zj(i,s,k)}catch(fe){PS(i,s,fe)}}function zj(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(f){Lj(i,s,f)},function(f){return PS(i,s,f)}):Lj(i,s,c)}function Lj(i,s,c){s.status="fulfilled",s.value=c,Hj(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,Oj(i,c)))}function PS(i,s,c){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do s.status="rejected",s.reason=c,Hj(s),s=s.next;while(s!==f)}i.action=null}function Hj(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function qj(i,s){return s}function Wj(i,s){if(ur){var c=Vr.formState;if(c!==null){e:{var f=Mt;if(ur){if(sn){t:{for(var w=sn,k=No;w.nodeType!==8;){if(!k){w=null;break t}if(w=Po(w.nextSibling),w===null){w=null;break t}}k=w.data,w=k==="F!"||k==="F"?w:null}if(w){sn=Po(w.nextSibling),f=w.data==="F!";break e}}wc(f)}f=!1}f&&(s=c[0])}}return c=hi(),c.memoizedState=c.baseState=s,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qj,lastRenderedState:s},c.queue=f,c=u_.bind(null,Mt,f),f.dispatch=c,f=NS(!1),k=qS.bind(null,Mt,!1,f.queue),f=hi(),w={state:s,dispatch:null,action:i,pending:null},f.queue=w,c=NZ.bind(null,Mt,w,k,c),w.dispatch=c,f.memoizedState=i,[s,c,!1]}function Vj(i){var s=Tn();return Uj(s,Pr,i)}function Uj(i,s,c){if(s=jS(i,s,qj)[0],i=g5(lu)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var f=kv(s)}catch(T){throw T===Jm?o5:T}else f=s;s=Tn();var w=s.queue,k=w.dispatch;return c!==s.memoizedState&&(Mt.flags|=2048,nh(9,{destroy:void 0},PZ.bind(null,w,c),null)),[f,k,i]}function PZ(i,s){i.action=s}function Gj(i){var s=Tn(),c=Pr;if(c!==null)return Uj(s,c,i);Tn(),s=s.memoizedState,c=Tn();var f=c.queue.dispatch;return c.memoizedState=i,[s,f,!1]}function nh(i,s,c,f){return i={tag:i,create:c,deps:f,inst:s,next:null},s=Mt.updateQueue,s===null&&(s=m5(),Mt.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,s.lastEffect=i),i}function Kj(){return Tn().memoizedState}function v5(i,s,c,f){var w=hi();Mt.flags|=i,w.memoizedState=nh(1|s,{destroy:void 0},c,f===void 0?null:f)}function b5(i,s,c,f){var w=Tn();f=f===void 0?null:f;var k=w.memoizedState.inst;Pr!==null&&f!==null&&DS(f,Pr.memoizedState.deps)?w.memoizedState=nh(s,k,c,f):(Mt.flags|=i,w.memoizedState=nh(1|s,k,c,f))}function Xj(i,s){v5(8390656,8,i,s)}function RS(i,s){b5(2048,8,i,s)}function RZ(i){Mt.flags|=4;var s=Mt.updateQueue;if(s===null)s=m5(),Mt.updateQueue=s,s.events=[i];else{var c=s.events;c===null?s.events=[i]:c.push(i)}}function Qj(i){var s=Tn().memoizedState;return RZ({ref:s,nextImpl:i}),function(){if((kr&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function Yj(i,s){return b5(4,2,i,s)}function Jj(i,s){return b5(4,4,i,s)}function Zj(i,s){if(typeof s=="function"){i=i();var c=s(i);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function e_(i,s,c){c=c!=null?c.concat([i]):null,b5(4,4,Zj.bind(null,s,i),c)}function OS(){}function t_(i,s){var c=Tn();s=s===void 0?null:s;var f=c.memoizedState;return s!==null&&DS(s,f[1])?f[0]:(c.memoizedState=[i,s],i)}function r_(i,s){var c=Tn();s=s===void 0?null:s;var f=c.memoizedState;if(s!==null&&DS(s,f[1]))return f[0];if(f=i(),kp){Pe(!0);try{i()}finally{Pe(!1)}}return c.memoizedState=[f,s],f}function zS(i,s,c){return c===void 0||(su&1073741824)!==0&&(nr&261930)===0?i.memoizedState=s:(i.memoizedState=c,i=nN(),Mt.lanes|=i,Ac|=i,c)}function n_(i,s,c,f){return so(c,s)?c:eh.current!==null?(i=zS(i,c,f),so(i,s)||(Vn=!0),i):(su&42)===0||(su&1073741824)!==0&&(nr&261930)===0?(Vn=!0,i.memoizedState=c):(i=nN(),Mt.lanes|=i,Ac|=i,s)}function a_(i,s,c,f,w){var k=U.p;U.p=k!==0&&8>k?k:8;var T=L.T,G={};L.T=G,qS(i,!1,s,c);try{var re=w(),fe=L.S;if(fe!==null&&fe(G,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var xe=TZ(re,f);Cv(i,s,xe,mo(i))}else Cv(i,s,f,mo(i))}catch(Se){Cv(i,s,{then:function(){},status:"rejected",reason:Se},mo())}finally{U.p=k,T!==null&&G.types!==null&&(T.types=G.types),L.T=T}}function OZ(){}function LS(i,s,c,f){if(i.tag!==5)throw Error(a(476));var w=i_(i).queue;a_(i,w,s,Y,c===null?OZ:function(){return o_(i),c(f)})}function i_(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:Y},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function o_(i){var s=i_(i);s.next===null&&(s=i.alternate.memoizedState),Cv(i,s.next.queue,{},mo())}function HS(){return Da(Lv)}function s_(){return Tn().memoizedState}function l_(){return Tn().memoizedState}function zZ(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=mo();i=kc(c);var f=Cc(s,i,c);f!==null&&(Oi(f,s,c),yv(f,s,c)),s={cache:vS()},i.payload=s;return}s=s.return}}function LZ(i,s,c){var f=mo();c={lane:f,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},y5(i)?c_(s,c):(c=oS(i,s,c,f),c!==null&&(Oi(c,i,f),d_(c,s,f)))}function u_(i,s,c){var f=mo();Cv(i,s,c,f)}function Cv(i,s,c,f){var w={lane:f,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(y5(i))c_(s,w);else{var k=i.alternate;if(i.lanes===0&&(k===null||k.lanes===0)&&(k=s.lastRenderedReducer,k!==null))try{var T=s.lastRenderedState,G=k(T,c);if(w.hasEagerState=!0,w.eagerState=G,so(G,T))return Zw(i,s,w,0),Vr===null&&Jw(),!1}catch{}if(c=oS(i,s,w,f),c!==null)return Oi(c,i,f),d_(c,s,f),!0}return!1}function qS(i,s,c,f){if(f={lane:2,revertLane:x8(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},y5(i)){if(s)throw Error(a(479))}else s=oS(i,c,f,2),s!==null&&Oi(s,i,2)}function y5(i){var s=i.alternate;return i===Mt||s!==null&&s===Mt}function c_(i,s){th=p5=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function d_(i,s,c){if((c&4194048)!==0){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,He(i,c)}}var Sv={readContext:Da,use:h5,useCallback:Cn,useContext:Cn,useEffect:Cn,useImperativeHandle:Cn,useLayoutEffect:Cn,useInsertionEffect:Cn,useMemo:Cn,useReducer:Cn,useRef:Cn,useState:Cn,useDebugValue:Cn,useDeferredValue:Cn,useTransition:Cn,useSyncExternalStore:Cn,useId:Cn,useHostTransitionStatus:Cn,useFormState:Cn,useActionState:Cn,useOptimistic:Cn,useMemoCache:Cn,useCacheRefresh:Cn};Sv.useEffectEvent=Cn;var p_={readContext:Da,use:h5,useCallback:function(i,s){return hi().memoizedState=[i,s===void 0?null:s],i},useContext:Da,useEffect:Xj,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,v5(4194308,4,Zj.bind(null,s,i),c)},useLayoutEffect:function(i,s){return v5(4194308,4,i,s)},useInsertionEffect:function(i,s){v5(4,2,i,s)},useMemo:function(i,s){var c=hi();s=s===void 0?null:s;var f=i();if(kp){Pe(!0);try{i()}finally{Pe(!1)}}return c.memoizedState=[f,s],f},useReducer:function(i,s,c){var f=hi();if(c!==void 0){var w=c(s);if(kp){Pe(!0);try{c(s)}finally{Pe(!1)}}}else w=s;return f.memoizedState=f.baseState=w,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:w},f.queue=i,i=i.dispatch=LZ.bind(null,Mt,i),[f.memoizedState,i]},useRef:function(i){var s=hi();return i={current:i},s.memoizedState=i},useState:function(i){i=NS(i);var s=i.queue,c=u_.bind(null,Mt,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:OS,useDeferredValue:function(i,s){var c=hi();return zS(c,i,s)},useTransition:function(){var i=NS(!1);return i=a_.bind(null,Mt,i.queue,!0,!1),hi().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var f=Mt,w=hi();if(ur){if(c===void 0)throw Error(a(407));c=c()}else{if(c=s(),Vr===null)throw Error(a(349));(nr&127)!==0||Tj(f,s,c)}w.memoizedState=c;var k={value:c,getSnapshot:s};return w.queue=k,Xj(_j.bind(null,f,k,i),[i]),f.flags|=2048,nh(9,{destroy:void 0},jj.bind(null,f,k,c,s),null),c},useId:function(){var i=hi(),s=Vr.identifierPrefix;if(ur){var c=ol,f=il;c=(f&~(1<<32-at(f)-1)).toString(32)+c,s="_"+s+"R_"+c,c=f5++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=jZ++,s="_"+s+"r_"+c.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:HS,useFormState:Wj,useActionState:Wj,useOptimistic:function(i){var s=hi();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=qS.bind(null,Mt,!0,c),c.dispatch=s,[i,s]},useMemoCache:TS,useCacheRefresh:function(){return hi().memoizedState=zZ.bind(null,Mt)},useEffectEvent:function(i){var s=hi(),c={impl:i};return s.memoizedState=c,function(){if((kr&2)!==0)throw Error(a(440));return c.impl.apply(void 0,arguments)}}},WS={readContext:Da,use:h5,useCallback:t_,useContext:Da,useEffect:RS,useImperativeHandle:e_,useInsertionEffect:Yj,useLayoutEffect:Jj,useMemo:r_,useReducer:g5,useRef:Kj,useState:function(){return g5(lu)},useDebugValue:OS,useDeferredValue:function(i,s){var c=Tn();return n_(c,Pr.memoizedState,i,s)},useTransition:function(){var i=g5(lu)[0],s=Tn().memoizedState;return[typeof i=="boolean"?i:kv(i),s]},useSyncExternalStore:Mj,useId:s_,useHostTransitionStatus:HS,useFormState:Vj,useActionState:Vj,useOptimistic:function(i,s){var c=Tn();return Rj(c,Pr,i,s)},useMemoCache:TS,useCacheRefresh:l_};WS.useEffectEvent=Qj;var f_={readContext:Da,use:h5,useCallback:t_,useContext:Da,useEffect:RS,useImperativeHandle:e_,useInsertionEffect:Yj,useLayoutEffect:Jj,useMemo:r_,useReducer:_S,useRef:Kj,useState:function(){return _S(lu)},useDebugValue:OS,useDeferredValue:function(i,s){var c=Tn();return Pr===null?zS(c,i,s):n_(c,Pr.memoizedState,i,s)},useTransition:function(){var i=_S(lu)[0],s=Tn().memoizedState;return[typeof i=="boolean"?i:kv(i),s]},useSyncExternalStore:Mj,useId:s_,useHostTransitionStatus:HS,useFormState:Gj,useActionState:Gj,useOptimistic:function(i,s){var c=Tn();return Pr!==null?Rj(c,Pr,i,s):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:TS,useCacheRefresh:l_};f_.useEffectEvent=Qj;function VS(i,s,c,f){s=i.memoizedState,c=c(f,s),c=c==null?s:g({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var US={enqueueSetState:function(i,s,c){i=i._reactInternals;var f=mo(),w=kc(f);w.payload=s,c!=null&&(w.callback=c),s=Cc(i,w,f),s!==null&&(Oi(s,i,f),yv(s,i,f))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var f=mo(),w=kc(f);w.tag=1,w.payload=s,c!=null&&(w.callback=c),s=Cc(i,w,f),s!==null&&(Oi(s,i,f),yv(s,i,f))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=mo(),f=kc(c);f.tag=2,s!=null&&(f.callback=s),s=Cc(i,f,c),s!==null&&(Oi(s,i,c),yv(s,i,c))}};function m_(i,s,c,f,w,k,T){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,k,T):s.prototype&&s.prototype.isPureReactComponent?!dv(c,f)||!dv(w,k):!0}function h_(i,s,c,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,f),s.state!==i&&US.enqueueReplaceState(s,s.state,null)}function Cp(i,s){var c=s;if("ref"in s){c={};for(var f in s)f!=="ref"&&(c[f]=s[f])}if(i=i.defaultProps){c===s&&(c=g({},c));for(var w in i)c[w]===void 0&&(c[w]=i[w])}return c}function g_(i){Yw(i)}function v_(i){console.error(i)}function b_(i){Yw(i)}function w5(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(f){setTimeout(function(){throw f})}}function y_(i,s,c){try{var f=i.onCaughtError;f(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function GS(i,s,c){return c=kc(c),c.tag=3,c.payload={element:null},c.callback=function(){w5(i,s)},c}function w_(i){return i=kc(i),i.tag=3,i}function x_(i,s,c,f){var w=c.type.getDerivedStateFromError;if(typeof w=="function"){var k=f.value;i.payload=function(){return w(k)},i.callback=function(){y_(s,c,f)}}var T=c.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(i.callback=function(){y_(s,c,f),typeof w!="function"&&(Bc===null?Bc=new Set([this]):Bc.add(this));var G=f.stack;this.componentDidCatch(f.value,{componentStack:G!==null?G:""})})}function HZ(i,s,c,f,w){if(c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(s=c.alternate,s!==null&&Xm(s,c,w,!0),c=uo.current,c!==null){switch(c.tag){case 31:case 13:return vs===null?M5():c.alternate===null&&Sn===0&&(Sn=3),c.flags&=-257,c.flags|=65536,c.lanes=w,f===s5?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([f]):s.add(f),b8(i,f,w)),!1;case 22:return c.flags|=65536,f===s5?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([f])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([f]):c.add(f)),b8(i,f,w)),!1}throw Error(a(435,c.tag))}return b8(i,f,w),M5(),!1}if(ur)return s=uo.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=w,f!==pS&&(i=Error(a(422),{cause:f}),mv(To(i,c)))):(f!==pS&&(s=Error(a(423),{cause:f}),mv(To(s,c))),i=i.current.alternate,i.flags|=65536,w&=-w,i.lanes|=w,f=To(f,c),w=GS(i.stateNode,f,w),kS(i,w),Sn!==4&&(Sn=2)),!1;var k=Error(a(520),{cause:f});if(k=To(k,c),Tv===null?Tv=[k]:Tv.push(k),Sn!==4&&(Sn=2),s===null)return!0;f=To(f,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=w&-w,c.lanes|=i,i=GS(c.stateNode,f,i),kS(c,i),!1;case 1:if(s=c.type,k=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(Bc===null||!Bc.has(k))))return c.flags|=65536,w&=-w,c.lanes|=w,w=w_(w),x_(w,i,c,f),kS(c,w),!1}c=c.return}while(c!==null);return!1}var KS=Error(a(461)),Vn=!1;function Aa(i,s,c,f){s.child=i===null?Sj(s,null,c,f):Ep(s,i.child,c,f)}function E_(i,s,c,f,w){c=c.render;var k=s.ref;if("ref"in f){var T={};for(var G in f)G!=="ref"&&(T[G]=f[G])}else T=f;return bp(s),f=AS(i,s,c,T,k,w),G=BS(),i!==null&&!Vn?(IS(i,s,w),uu(i,s,w)):(ur&&G&&cS(s),s.flags|=1,Aa(i,s,f,w),s.child)}function k_(i,s,c,f,w){if(i===null){var k=c.type;return typeof k=="function"&&!sS(k)&&k.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=k,C_(i,s,k,f,w)):(i=t5(c.type,null,f,s,s.mode,w),i.ref=s.ref,i.return=s,s.child=i)}if(k=i.child,!r8(i,w)){var T=k.memoizedProps;if(c=c.compare,c=c!==null?c:dv,c(T,f)&&i.ref===s.ref)return uu(i,s,w)}return s.flags|=1,i=nu(k,f),i.ref=s.ref,i.return=s,s.child=i}function C_(i,s,c,f,w){if(i!==null){var k=i.memoizedProps;if(dv(k,f)&&i.ref===s.ref)if(Vn=!1,s.pendingProps=f=k,r8(i,w))(i.flags&131072)!==0&&(Vn=!0);else return s.lanes=i.lanes,uu(i,s,w)}return XS(i,s,c,f,w)}function S_(i,s,c,f){var w=f.children,k=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((s.flags&128)!==0){if(k=k!==null?k.baseLanes|c:c,i!==null){for(f=s.child=i.child,w=0;f!==null;)w=w|f.lanes|f.childLanes,f=f.sibling;f=w&~k}else f=0,s.child=null;return F_(i,s,k,c,f)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&i5(s,k!==null?k.cachePool:null),k!==null?Dj(s,k):SS(),Aj(s);else return f=s.lanes=536870912,F_(i,s,k!==null?k.baseLanes|c:c,c,f)}else k!==null?(i5(s,k.cachePool),Dj(s,k),Fc(s),s.memoizedState=null):(i!==null&&i5(s,null),SS(),Fc(s));return Aa(i,s,w,c),s.child}function Fv(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function F_(i,s,c,f,w){var k=yS();return k=k===null?null:{parent:qn._currentValue,pool:k},s.memoizedState={baseLanes:c,cachePool:k},i!==null&&i5(s,null),SS(),Aj(s),i!==null&&Xm(i,s,f,!0),s.childLanes=w,null}function x5(i,s){return s=k5({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function $_(i,s,c){return Ep(s,i.child,null,c),i=x5(s,s.pendingProps),i.flags|=2,co(s),s.memoizedState=null,i}function qZ(i,s,c){var f=s.pendingProps,w=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(ur){if(f.mode==="hidden")return i=x5(s,f),s.lanes=536870912,Fv(null,i);if($S(s),(i=sn)?(i=LN(i,No),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:bc!==null?{id:il,overflow:ol}:null,retryLane:536870912,hydrationErrors:null},c=cj(i),c.return=s,s.child=c,$a=s,sn=null)):i=null,i===null)throw wc(s);return s.lanes=536870912,null}return x5(s,f)}var k=i.memoizedState;if(k!==null){var T=k.dehydrated;if($S(s),w)if(s.flags&256)s.flags&=-257,s=$_(i,s,c);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(a(558));else if(Vn||Xm(i,s,c,!1),w=(c&i.childLanes)!==0,Vn||w){if(f=Vr,f!==null&&(T=rt(f,c),T!==0&&T!==k.retryLane))throw k.retryLane=T,mp(i,T),Oi(f,i,T),KS;M5(),s=$_(i,s,c)}else i=k.treeContext,sn=Po(T.nextSibling),$a=s,ur=!0,yc=null,No=!1,i!==null&&fj(s,i),s=x5(s,f),s.flags|=4096;return s}return i=nu(i.child,{mode:f.mode,children:f.children}),i.ref=s.ref,s.child=i,i.return=s,i}function E5(i,s){var c=s.ref;if(c===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(a(284));(i===null||i.ref!==c)&&(s.flags|=4194816)}}function XS(i,s,c,f,w){return bp(s),c=AS(i,s,c,f,void 0,w),f=BS(),i!==null&&!Vn?(IS(i,s,w),uu(i,s,w)):(ur&&f&&cS(s),s.flags|=1,Aa(i,s,c,w),s.child)}function D_(i,s,c,f,w,k){return bp(s),s.updateQueue=null,c=Ij(s,f,c,w),Bj(i),f=BS(),i!==null&&!Vn?(IS(i,s,k),uu(i,s,k)):(ur&&f&&cS(s),s.flags|=1,Aa(i,s,c,k),s.child)}function A_(i,s,c,f,w){if(bp(s),s.stateNode===null){var k=Vm,T=c.contextType;typeof T=="object"&&T!==null&&(k=Da(T)),k=new c(f,k),s.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=US,s.stateNode=k,k._reactInternals=s,k=s.stateNode,k.props=f,k.state=s.memoizedState,k.refs={},xS(s),T=c.contextType,k.context=typeof T=="object"&&T!==null?Da(T):Vm,k.state=s.memoizedState,T=c.getDerivedStateFromProps,typeof T=="function"&&(VS(s,c,T,f),k.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(T=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),T!==k.state&&US.enqueueReplaceState(k,k.state,null),xv(s,f,k,w),wv(),k.state=s.memoizedState),typeof k.componentDidMount=="function"&&(s.flags|=4194308),f=!0}else if(i===null){k=s.stateNode;var G=s.memoizedProps,re=Cp(c,G);k.props=re;var fe=k.context,xe=c.contextType;T=Vm,typeof xe=="object"&&xe!==null&&(T=Da(xe));var Se=c.getDerivedStateFromProps;xe=typeof Se=="function"||typeof k.getSnapshotBeforeUpdate=="function",G=s.pendingProps!==G,xe||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(G||fe!==T)&&h_(s,k,f,T),Ec=!1;var ge=s.memoizedState;k.state=ge,xv(s,f,k,w),wv(),fe=s.memoizedState,G||ge!==fe||Ec?(typeof Se=="function"&&(VS(s,c,Se,f),fe=s.memoizedState),(re=Ec||m_(s,c,re,f,ge,fe,T))?(xe||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(s.flags|=4194308)):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=fe),k.props=f,k.state=fe,k.context=T,f=re):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{k=s.stateNode,ES(i,s),T=s.memoizedProps,xe=Cp(c,T),k.props=xe,Se=s.pendingProps,ge=k.context,fe=c.contextType,re=Vm,typeof fe=="object"&&fe!==null&&(re=Da(fe)),G=c.getDerivedStateFromProps,(fe=typeof G=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(T!==Se||ge!==re)&&h_(s,k,f,re),Ec=!1,ge=s.memoizedState,k.state=ge,xv(s,f,k,w),wv();var be=s.memoizedState;T!==Se||ge!==be||Ec||i!==null&&i.dependencies!==null&&n5(i.dependencies)?(typeof G=="function"&&(VS(s,c,G,f),be=s.memoizedState),(xe=Ec||m_(s,c,xe,f,ge,be,re)||i!==null&&i.dependencies!==null&&n5(i.dependencies))?(fe||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(f,be,re),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(f,be,re)),typeof k.componentDidUpdate=="function"&&(s.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof k.componentDidUpdate!="function"||T===i.memoizedProps&&ge===i.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&ge===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=be),k.props=f,k.state=be,k.context=re,f=xe):(typeof k.componentDidUpdate!="function"||T===i.memoizedProps&&ge===i.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&ge===i.memoizedState||(s.flags|=1024),f=!1)}return k=f,E5(i,s),f=(s.flags&128)!==0,k||f?(k=s.stateNode,c=f&&typeof c.getDerivedStateFromError!="function"?null:k.render(),s.flags|=1,i!==null&&f?(s.child=Ep(s,i.child,null,w),s.child=Ep(s,null,c,w)):Aa(i,s,c,w),s.memoizedState=k.state,i=s.child):i=uu(i,s,w),i}function B_(i,s,c,f){return gp(),s.flags|=256,Aa(i,s,c,f),s.child}var QS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function YS(i){return{baseLanes:i,cachePool:yj()}}function JS(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=fo),i}function I_(i,s,c){var f=s.pendingProps,w=!1,k=(s.flags&128)!==0,T;if((T=k)||(T=i!==null&&i.memoizedState===null?!1:(Mn.current&2)!==0),T&&(w=!0,s.flags&=-129),T=(s.flags&32)!==0,s.flags&=-33,i===null){if(ur){if(w?Sc(s):Fc(s),(i=sn)?(i=LN(i,No),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:bc!==null?{id:il,overflow:ol}:null,retryLane:536870912,hydrationErrors:null},c=cj(i),c.return=s,s.child=c,$a=s,sn=null)):i=null,i===null)throw wc(s);return M8(i)?s.lanes=32:s.lanes=536870912,null}var G=f.children;return f=f.fallback,w?(Fc(s),w=s.mode,G=k5({mode:"hidden",children:G},w),f=hp(f,w,c,null),G.return=s,f.return=s,G.sibling=f,s.child=G,f=s.child,f.memoizedState=YS(c),f.childLanes=JS(i,T,c),s.memoizedState=QS,Fv(null,f)):(Sc(s),ZS(s,G))}var re=i.memoizedState;if(re!==null&&(G=re.dehydrated,G!==null)){if(k)s.flags&256?(Sc(s),s.flags&=-257,s=e8(i,s,c)):s.memoizedState!==null?(Fc(s),s.child=i.child,s.flags|=128,s=null):(Fc(s),G=f.fallback,w=s.mode,f=k5({mode:"visible",children:f.children},w),G=hp(G,w,c,null),G.flags|=2,f.return=s,G.return=s,f.sibling=G,s.child=f,Ep(s,i.child,null,c),f=s.child,f.memoizedState=YS(c),f.childLanes=JS(i,T,c),s.memoizedState=QS,s=Fv(null,f));else if(Sc(s),M8(G)){if(T=G.nextSibling&&G.nextSibling.dataset,T)var fe=T.dgst;T=fe,f=Error(a(419)),f.stack="",f.digest=T,mv({value:f,source:null,stack:null}),s=e8(i,s,c)}else if(Vn||Xm(i,s,c,!1),T=(c&i.childLanes)!==0,Vn||T){if(T=Vr,T!==null&&(f=rt(T,c),f!==0&&f!==re.retryLane))throw re.retryLane=f,mp(i,f),Oi(T,i,f),KS;I8(G)||M5(),s=e8(i,s,c)}else I8(G)?(s.flags|=192,s.child=i.child,s=null):(i=re.treeContext,sn=Po(G.nextSibling),$a=s,ur=!0,yc=null,No=!1,i!==null&&fj(s,i),s=ZS(s,f.children),s.flags|=4096);return s}return w?(Fc(s),G=f.fallback,w=s.mode,re=i.child,fe=re.sibling,f=nu(re,{mode:"hidden",children:f.children}),f.subtreeFlags=re.subtreeFlags&65011712,fe!==null?G=nu(fe,G):(G=hp(G,w,c,null),G.flags|=2),G.return=s,f.return=s,f.sibling=G,s.child=f,Fv(null,f),f=s.child,G=i.child.memoizedState,G===null?G=YS(c):(w=G.cachePool,w!==null?(re=qn._currentValue,w=w.parent!==re?{parent:re,pool:re}:w):w=yj(),G={baseLanes:G.baseLanes|c,cachePool:w}),f.memoizedState=G,f.childLanes=JS(i,T,c),s.memoizedState=QS,Fv(i.child,f)):(Sc(s),c=i.child,i=c.sibling,c=nu(c,{mode:"visible",children:f.children}),c.return=s,c.sibling=null,i!==null&&(T=s.deletions,T===null?(s.deletions=[i],s.flags|=16):T.push(i)),s.child=c,s.memoizedState=null,c)}function ZS(i,s){return s=k5({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function k5(i,s){return i=lo(22,i,null,s),i.lanes=0,i}function e8(i,s,c){return Ep(s,i.child,null,c),i=ZS(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function M_(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),hS(i.return,s,c)}function t8(i,s,c,f,w,k){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:w,treeForkCount:k}:(T.isBackwards=s,T.rendering=null,T.renderingStartTime=0,T.last=f,T.tail=c,T.tailMode=w,T.treeForkCount=k)}function T_(i,s,c){var f=s.pendingProps,w=f.revealOrder,k=f.tail;f=f.children;var T=Mn.current,G=(T&2)!==0;if(G?(T=T&1|2,s.flags|=128):T&=1,K(Mn,T),Aa(i,s,f,c),f=ur?fv:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&M_(i,c,s);else if(i.tag===19)M_(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(w){case"forwards":for(c=s.child,w=null;c!==null;)i=c.alternate,i!==null&&d5(i)===null&&(w=c),c=c.sibling;c=w,c===null?(w=s.child,s.child=null):(w=c.sibling,c.sibling=null),t8(s,!1,w,c,k,f);break;case"backwards":case"unstable_legacy-backwards":for(c=null,w=s.child,s.child=null;w!==null;){if(i=w.alternate,i!==null&&d5(i)===null){s.child=w;break}i=w.sibling,w.sibling=c,c=w,w=i}t8(s,!0,c,null,k,f);break;case"together":t8(s,!1,null,null,void 0,f);break;default:s.memoizedState=null}return s.child}function uu(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Ac|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(Xm(i,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(a(153));if(s.child!==null){for(i=s.child,c=nu(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=nu(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function r8(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&n5(i)))}function WZ(i,s,c){switch(s.tag){case 3:me(s,s.stateNode.containerInfo),xc(s,qn,i.memoizedState.cache),gp();break;case 27:case 5:he(s);break;case 4:me(s,s.stateNode.containerInfo);break;case 10:xc(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,$S(s),null;break;case 13:var f=s.memoizedState;if(f!==null)return f.dehydrated!==null?(Sc(s),s.flags|=128,null):(c&s.child.childLanes)!==0?I_(i,s,c):(Sc(s),i=uu(i,s,c),i!==null?i.sibling:null);Sc(s);break;case 19:var w=(i.flags&128)!==0;if(f=(c&s.childLanes)!==0,f||(Xm(i,s,c,!1),f=(c&s.childLanes)!==0),w){if(f)return T_(i,s,c);s.flags|=128}if(w=s.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),K(Mn,Mn.current),f)break;return null;case 22:return s.lanes=0,S_(i,s,c,s.pendingProps);case 24:xc(s,qn,i.memoizedState.cache)}return uu(i,s,c)}function j_(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)Vn=!0;else{if(!r8(i,c)&&(s.flags&128)===0)return Vn=!1,WZ(i,s,c);Vn=(i.flags&131072)!==0}else Vn=!1,ur&&(s.flags&1048576)!==0&&pj(s,fv,s.index);switch(s.lanes=0,s.tag){case 16:e:{var f=s.pendingProps;if(i=wp(s.elementType),s.type=i,typeof i=="function")sS(i)?(f=Cp(i,f),s.tag=1,s=A_(null,s,i,f,c)):(s.tag=0,s=XS(null,s,i,f,c));else{if(i!=null){var w=i.$$typeof;if(w===D){s.tag=11,s=E_(null,s,i,f,c);break e}else if(w===A){s.tag=14,s=k_(null,s,i,f,c);break e}}throw s=q(i)||i,Error(a(306,s,""))}}return s;case 0:return XS(i,s,s.type,s.pendingProps,c);case 1:return f=s.type,w=Cp(f,s.pendingProps),A_(i,s,f,w,c);case 3:e:{if(me(s,s.stateNode.containerInfo),i===null)throw Error(a(387));f=s.pendingProps;var k=s.memoizedState;w=k.element,ES(i,s),xv(s,f,null,c);var T=s.memoizedState;if(f=T.cache,xc(s,qn,f),f!==k.cache&&gS(s,[qn],c,!0),wv(),f=T.element,k.isDehydrated)if(k={element:f,isDehydrated:!1,cache:T.cache},s.updateQueue.baseState=k,s.memoizedState=k,s.flags&256){s=B_(i,s,f,c);break e}else if(f!==w){w=To(Error(a(424)),s),mv(w),s=B_(i,s,f,c);break e}else for(i=s.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,sn=Po(i.firstChild),$a=s,ur=!0,yc=null,No=!0,c=Sj(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(gp(),f===w){s=uu(i,s,c);break e}Aa(i,s,f,c)}s=s.child}return s;case 26:return E5(i,s),i===null?(c=GN(s.type,null,s.pendingProps,null))?s.memoizedState=c:ur||(c=s.type,i=s.pendingProps,f=L5(te.current).createElement(c),f[tr]=s,f[Wr]=i,Ba(f,c,i),fr(f),s.stateNode=f):s.memoizedState=GN(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return he(s),i===null&&ur&&(f=s.stateNode=WN(s.type,s.pendingProps,te.current),$a=s,No=!0,w=sn,jc(s.type)?(T8=w,sn=Po(f.firstChild)):sn=w),Aa(i,s,s.pendingProps.children,c),E5(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&ur&&((w=f=sn)&&(f=bee(f,s.type,s.pendingProps,No),f!==null?(s.stateNode=f,$a=s,sn=Po(f.firstChild),No=!1,w=!0):w=!1),w||wc(s)),he(s),w=s.type,k=s.pendingProps,T=i!==null?i.memoizedProps:null,f=k.children,D8(w,k)?f=null:T!==null&&D8(w,T)&&(s.flags|=32),s.memoizedState!==null&&(w=AS(i,s,_Z,null,null,c),Lv._currentValue=w),E5(i,s),Aa(i,s,f,c),s.child;case 6:return i===null&&ur&&((i=c=sn)&&(c=yee(c,s.pendingProps,No),c!==null?(s.stateNode=c,$a=s,sn=null,i=!0):i=!1),i||wc(s)),null;case 13:return I_(i,s,c);case 4:return me(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Ep(s,null,f,c):Aa(i,s,f,c),s.child;case 11:return E_(i,s,s.type,s.pendingProps,c);case 7:return Aa(i,s,s.pendingProps,c),s.child;case 8:return Aa(i,s,s.pendingProps.children,c),s.child;case 12:return Aa(i,s,s.pendingProps.children,c),s.child;case 10:return f=s.pendingProps,xc(s,s.type,f.value),Aa(i,s,f.children,c),s.child;case 9:return w=s.type._context,f=s.pendingProps.children,bp(s),w=Da(w),f=f(w),s.flags|=1,Aa(i,s,f,c),s.child;case 14:return k_(i,s,s.type,s.pendingProps,c);case 15:return C_(i,s,s.type,s.pendingProps,c);case 19:return T_(i,s,c);case 31:return qZ(i,s,c);case 22:return S_(i,s,c,s.pendingProps);case 24:return bp(s),f=Da(qn),i===null?(w=yS(),w===null&&(w=Vr,k=vS(),w.pooledCache=k,k.refCount++,k!==null&&(w.pooledCacheLanes|=c),w=k),s.memoizedState={parent:f,cache:w},xS(s),xc(s,qn,w)):((i.lanes&c)!==0&&(ES(i,s),xv(s,null,null,c),wv()),w=i.memoizedState,k=s.memoizedState,w.parent!==f?(w={parent:f,cache:f},s.memoizedState=w,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=w),xc(s,qn,f)):(f=k.cache,xc(s,qn,f),f!==w.cache&&gS(s,[qn],c,!0))),Aa(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function cu(i){i.flags|=4}function n8(i,s,c,f,w){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(w&335544128)===w)if(i.stateNode.complete)i.flags|=8192;else if(sN())i.flags|=8192;else throw xp=s5,wS}else i.flags&=-16777217}function __(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!JN(s))if(sN())i.flags|=8192;else throw xp=s5,wS}function C5(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?ct():536870912,i.lanes|=s,sh|=s)}function $v(i,s){if(!ur)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function ln(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var w=i.child;w!==null;)c|=w.lanes|w.childLanes,f|=w.subtreeFlags&65011712,f|=w.flags&65011712,w.return=i,w=w.sibling;else for(w=i.child;w!==null;)c|=w.lanes|w.childLanes,f|=w.subtreeFlags,f|=w.flags,w.return=i,w=w.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function VZ(i,s,c){var f=s.pendingProps;switch(dS(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ln(s),null;case 1:return ln(s),null;case 3:return c=s.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),s.memoizedState.cache!==f&&(s.flags|=2048),ou(qn),se(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(Km(s)?cu(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,fS())),ln(s),null;case 26:var w=s.type,k=s.memoizedState;return i===null?(cu(s),k!==null?(ln(s),__(s,k)):(ln(s),n8(s,w,null,f,c))):k?k!==i.memoizedState?(cu(s),ln(s),__(s,k)):(ln(s),s.flags&=-16777217):(i=i.memoizedProps,i!==f&&cu(s),ln(s),n8(s,w,i,f,c)),null;case 27:if(le(s),c=te.current,w=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==f&&cu(s);else{if(!f){if(s.stateNode===null)throw Error(a(166));return ln(s),null}i=Q.current,Km(s)?mj(s,i):(i=WN(w,f,c),s.stateNode=i,cu(s))}return ln(s),null;case 5:if(le(s),w=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==f&&cu(s);else{if(!f){if(s.stateNode===null)throw Error(a(166));return ln(s),null}if(k=Q.current,Km(s))mj(s,k);else{var T=L5(te.current);switch(k){case 1:k=T.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:k=T.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":k=T.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":k=T.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":k=T.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof f.is=="string"?T.createElement("select",{is:f.is}):T.createElement("select"),f.multiple?k.multiple=!0:f.size&&(k.size=f.size);break;default:k=typeof f.is=="string"?T.createElement(w,{is:f.is}):T.createElement(w)}}k[tr]=s,k[Wr]=f;e:for(T=s.child;T!==null;){if(T.tag===5||T.tag===6)k.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===s)break e;for(;T.sibling===null;){if(T.return===null||T.return===s)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}s.stateNode=k;e:switch(Ba(k,w,f),w){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&cu(s)}}return ln(s),n8(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,c),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==f&&cu(s);else{if(typeof f!="string"&&s.stateNode===null)throw Error(a(166));if(i=te.current,Km(s)){if(i=s.stateNode,c=s.memoizedProps,f=null,w=$a,w!==null)switch(w.tag){case 27:case 5:f=w.memoizedProps}i[tr]=s,i=!!(i.nodeValue===c||f!==null&&f.suppressHydrationWarning===!0||TN(i.nodeValue,c)),i||wc(s,!0)}else i=L5(i).createTextNode(f),i[tr]=s,s.stateNode=i}return ln(s),null;case 31:if(c=s.memoizedState,i===null||i.memoizedState!==null){if(f=Km(s),c!==null){if(i===null){if(!f)throw Error(a(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[tr]=s}else gp(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ln(s),i=!1}else c=fS(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=c),i=!0;if(!i)return s.flags&256?(co(s),s):(co(s),null);if((s.flags&128)!==0)throw Error(a(558))}return ln(s),null;case 13:if(f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(w=Km(s),f!==null&&f.dehydrated!==null){if(i===null){if(!w)throw Error(a(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(a(317));w[tr]=s}else gp(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ln(s),w=!1}else w=fS(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=w),w=!0;if(!w)return s.flags&256?(co(s),s):(co(s),null)}return co(s),(s.flags&128)!==0?(s.lanes=c,s):(c=f!==null,i=i!==null&&i.memoizedState!==null,c&&(f=s.child,w=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(w=f.alternate.memoizedState.cachePool.pool),k=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(k=f.memoizedState.cachePool.pool),k!==w&&(f.flags|=2048)),c!==i&&c&&(s.child.flags|=8192),C5(s,s.updateQueue),ln(s),null);case 4:return se(),i===null&&k8(s.stateNode.containerInfo),ln(s),null;case 10:return ou(s.type),ln(s),null;case 19:if(R(Mn),f=s.memoizedState,f===null)return ln(s),null;if(w=(s.flags&128)!==0,k=f.rendering,k===null)if(w)$v(f,!1);else{if(Sn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(k=d5(i),k!==null){for(s.flags|=128,$v(f,!1),i=k.updateQueue,s.updateQueue=i,C5(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)uj(c,i),c=c.sibling;return K(Mn,Mn.current&1|2),ur&&au(s,f.treeForkCount),s.child}i=i.sibling}f.tail!==null&&Te()>A5&&(s.flags|=128,w=!0,$v(f,!1),s.lanes=4194304)}else{if(!w)if(i=d5(k),i!==null){if(s.flags|=128,w=!0,i=i.updateQueue,s.updateQueue=i,C5(s,i),$v(f,!0),f.tail===null&&f.tailMode==="hidden"&&!k.alternate&&!ur)return ln(s),null}else 2*Te()-f.renderingStartTime>A5&&c!==536870912&&(s.flags|=128,w=!0,$v(f,!1),s.lanes=4194304);f.isBackwards?(k.sibling=s.child,s.child=k):(i=f.last,i!==null?i.sibling=k:s.child=k,f.last=k)}return f.tail!==null?(i=f.tail,f.rendering=i,f.tail=i.sibling,f.renderingStartTime=Te(),i.sibling=null,c=Mn.current,K(Mn,w?c&1|2:c&1),ur&&au(s,f.treeForkCount),i):(ln(s),null);case 22:case 23:return co(s),FS(),f=s.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(s.flags|=8192):f&&(s.flags|=8192),f?(c&536870912)!==0&&(s.flags&128)===0&&(ln(s),s.subtreeFlags&6&&(s.flags|=8192)):ln(s),c=s.updateQueue,c!==null&&C5(s,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==c&&(s.flags|=2048),i!==null&&R(yp),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),ou(qn),ln(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function UZ(i,s){switch(dS(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ou(qn),se(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return le(s),null;case 31:if(s.memoizedState!==null){if(co(s),s.alternate===null)throw Error(a(340));gp()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(co(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(a(340));gp()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return R(Mn),null;case 4:return se(),null;case 10:return ou(s.type),null;case 22:case 23:return co(s),FS(),i!==null&&R(yp),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return ou(qn),null;case 25:return null;default:return null}}function N_(i,s){switch(dS(s),s.tag){case 3:ou(qn),se();break;case 26:case 27:case 5:le(s);break;case 4:se();break;case 31:s.memoizedState!==null&&co(s);break;case 13:co(s);break;case 19:R(Mn);break;case 10:ou(s.type);break;case 22:case 23:co(s),FS(),i!==null&&R(yp);break;case 24:ou(qn)}}function Dv(i,s){try{var c=s.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var w=f.next;c=w;do{if((c.tag&i)===i){f=void 0;var k=c.create,T=c.inst;f=k(),T.destroy=f}c=c.next}while(c!==w)}}catch(G){_r(s,s.return,G)}}function $c(i,s,c){try{var f=s.updateQueue,w=f!==null?f.lastEffect:null;if(w!==null){var k=w.next;f=k;do{if((f.tag&i)===i){var T=f.inst,G=T.destroy;if(G!==void 0){T.destroy=void 0,w=s;var re=c,fe=G;try{fe()}catch(xe){_r(w,re,xe)}}}f=f.next}while(f!==k)}}catch(xe){_r(s,s.return,xe)}}function P_(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{$j(s,c)}catch(f){_r(i,i.return,f)}}}function R_(i,s,c){c.props=Cp(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(f){_r(i,s,f)}}function Av(i,s){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof c=="function"?i.refCleanup=c(f):c.current=f}}catch(w){_r(i,s,w)}}function sl(i,s){var c=i.ref,f=i.refCleanup;if(c!==null)if(typeof f=="function")try{f()}catch(w){_r(i,s,w)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(w){_r(i,s,w)}else c.current=null}function O_(i){var s=i.type,c=i.memoizedProps,f=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&f.focus();break e;case"img":c.src?f.src=c.src:c.srcSet&&(f.srcset=c.srcSet)}}catch(w){_r(i,i.return,w)}}function a8(i,s,c){try{var f=i.stateNode;pee(f,i.type,c,s),f[Wr]=s}catch(w){_r(i,i.return,w)}}function z_(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&jc(i.type)||i.tag===4}function i8(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||z_(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&jc(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function o8(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(i),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=tu));else if(f!==4&&(f===27&&jc(i.type)&&(c=i.stateNode,s=null),i=i.child,i!==null))for(o8(i,s,c),i=i.sibling;i!==null;)o8(i,s,c),i=i.sibling}function S5(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(f===27&&jc(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(S5(i,s,c),i=i.sibling;i!==null;)S5(i,s,c),i=i.sibling}function L_(i){var s=i.stateNode,c=i.memoizedProps;try{for(var f=i.type,w=s.attributes;w.length;)s.removeAttributeNode(w[0]);Ba(s,f,c),s[tr]=i,s[Wr]=c}catch(k){_r(i,i.return,k)}}var du=!1,Un=!1,s8=!1,H_=typeof WeakSet=="function"?WeakSet:Set,ma=null;function GZ(i,s){if(i=i.containerInfo,F8=K5,i=ej(i),eS(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var w=f.anchorOffset,k=f.focusNode;f=f.focusOffset;try{c.nodeType,k.nodeType}catch{c=null;break e}var T=0,G=-1,re=-1,fe=0,xe=0,Se=i,ge=null;t:for(;;){for(var be;Se!==c||w!==0&&Se.nodeType!==3||(G=T+w),Se!==k||f!==0&&Se.nodeType!==3||(re=T+f),Se.nodeType===3&&(T+=Se.nodeValue.length),(be=Se.firstChild)!==null;)ge=Se,Se=be;for(;;){if(Se===i)break t;if(ge===c&&++fe===w&&(G=T),ge===k&&++xe===f&&(re=T),(be=Se.nextSibling)!==null)break;Se=ge,ge=Se.parentNode}Se=be}c=G===-1||re===-1?null:{start:G,end:re}}else c=null}c=c||{start:0,end:0}}else c=null;for($8={focusedElem:i,selectionRange:c},K5=!1,ma=s;ma!==null;)if(s=ma,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ma=i;else for(;ma!==null;){switch(s=ma,k=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(c=0;c<i.length;c++)w=i[c],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&k!==null){i=void 0,c=s,w=k.memoizedProps,k=k.memoizedState,f=c.stateNode;try{var nt=Cp(c.type,w);i=f.getSnapshotBeforeUpdate(nt,k),f.__reactInternalSnapshotBeforeUpdate=i}catch(Et){_r(c,c.return,Et)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)B8(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":B8(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=s.sibling,i!==null){i.return=s.return,ma=i;break}ma=s.return}}function q_(i,s,c){var f=c.flags;switch(c.tag){case 0:case 11:case 15:fu(i,c),f&4&&Dv(5,c);break;case 1:if(fu(i,c),f&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(T){_r(c,c.return,T)}else{var w=Cp(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(w,s,i.__reactInternalSnapshotBeforeUpdate)}catch(T){_r(c,c.return,T)}}f&64&&P_(c),f&512&&Av(c,c.return);break;case 3:if(fu(i,c),f&64&&(i=c.updateQueue,i!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{$j(i,s)}catch(T){_r(c,c.return,T)}}break;case 27:s===null&&f&4&&L_(c);case 26:case 5:fu(i,c),s===null&&f&4&&O_(c),f&512&&Av(c,c.return);break;case 12:fu(i,c);break;case 31:fu(i,c),f&4&&U_(i,c);break;case 13:fu(i,c),f&4&&G_(i,c),f&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=ree.bind(null,c),wee(i,c))));break;case 22:if(f=c.memoizedState!==null||du,!f){s=s!==null&&s.memoizedState!==null||Un,w=du;var k=Un;du=f,(Un=s)&&!k?mu(i,c,(c.subtreeFlags&8772)!==0):fu(i,c),du=w,Un=k}break;case 30:break;default:fu(i,c)}}function W_(i){var s=i.alternate;s!==null&&(i.alternate=null,W_(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&mi(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var pn=null,_i=!1;function pu(i,s,c){for(c=c.child;c!==null;)V_(i,s,c),c=c.sibling}function V_(i,s,c){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(lt,c)}catch{}switch(c.tag){case 26:Un||sl(c,s),pu(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Un||sl(c,s);var f=pn,w=_i;jc(c.type)&&(pn=c.stateNode,_i=!1),pu(i,s,c),Rv(c.stateNode),pn=f,_i=w;break;case 5:Un||sl(c,s);case 6:if(f=pn,w=_i,pn=null,pu(i,s,c),pn=f,_i=w,pn!==null)if(_i)try{(pn.nodeType===9?pn.body:pn.nodeName==="HTML"?pn.ownerDocument.body:pn).removeChild(c.stateNode)}catch(k){_r(c,s,k)}else try{pn.removeChild(c.stateNode)}catch(k){_r(c,s,k)}break;case 18:pn!==null&&(_i?(i=pn,ON(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),hh(i)):ON(pn,c.stateNode));break;case 4:f=pn,w=_i,pn=c.stateNode.containerInfo,_i=!0,pu(i,s,c),pn=f,_i=w;break;case 0:case 11:case 14:case 15:$c(2,c,s),Un||$c(4,c,s),pu(i,s,c);break;case 1:Un||(sl(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"&&R_(c,s,f)),pu(i,s,c);break;case 21:pu(i,s,c);break;case 22:Un=(f=Un)||c.memoizedState!==null,pu(i,s,c),Un=f;break;default:pu(i,s,c)}}function U_(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{hh(i)}catch(c){_r(s,s.return,c)}}}function G_(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{hh(i)}catch(c){_r(s,s.return,c)}}function KZ(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new H_),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new H_),s;default:throw Error(a(435,i.tag))}}function F5(i,s){var c=KZ(i);s.forEach(function(f){if(!c.has(f)){c.add(f);var w=nee.bind(null,i,f);f.then(w,w)}})}function Ni(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var w=c[f],k=i,T=s,G=T;e:for(;G!==null;){switch(G.tag){case 27:if(jc(G.type)){pn=G.stateNode,_i=!1;break e}break;case 5:pn=G.stateNode,_i=!1;break e;case 3:case 4:pn=G.stateNode.containerInfo,_i=!0;break e}G=G.return}if(pn===null)throw Error(a(160));V_(k,T,w),pn=null,_i=!1,k=w.alternate,k!==null&&(k.return=null),w.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)K_(s,i),s=s.sibling}var bs=null;function K_(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Ni(s,i),Pi(i),f&4&&($c(3,i,i.return),Dv(3,i),$c(5,i,i.return));break;case 1:Ni(s,i),Pi(i),f&512&&(Un||c===null||sl(c,c.return)),f&64&&du&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?f:c.concat(f))));break;case 26:var w=bs;if(Ni(s,i),Pi(i),f&512&&(Un||c===null||sl(c,c.return)),f&4){var k=c!==null?c.memoizedState:null;if(f=i.memoizedState,c===null)if(f===null)if(i.stateNode===null){e:{f=i.type,c=i.memoizedProps,w=w.ownerDocument||w;t:switch(f){case"title":k=w.getElementsByTagName("title")[0],(!k||k[pr]||k[tr]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=w.createElement(f),w.head.insertBefore(k,w.querySelector("head > title"))),Ba(k,f,c),k[tr]=i,fr(k),f=k;break e;case"link":var T=QN("link","href",w).get(f+(c.href||""));if(T){for(var G=0;G<T.length;G++)if(k=T[G],k.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&k.getAttribute("rel")===(c.rel==null?null:c.rel)&&k.getAttribute("title")===(c.title==null?null:c.title)&&k.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){T.splice(G,1);break t}}k=w.createElement(f),Ba(k,f,c),w.head.appendChild(k);break;case"meta":if(T=QN("meta","content",w).get(f+(c.content||""))){for(G=0;G<T.length;G++)if(k=T[G],k.getAttribute("content")===(c.content==null?null:""+c.content)&&k.getAttribute("name")===(c.name==null?null:c.name)&&k.getAttribute("property")===(c.property==null?null:c.property)&&k.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&k.getAttribute("charset")===(c.charSet==null?null:c.charSet)){T.splice(G,1);break t}}k=w.createElement(f),Ba(k,f,c),w.head.appendChild(k);break;default:throw Error(a(468,f))}k[tr]=i,fr(k),f=k}i.stateNode=f}else YN(w,i.type,i.stateNode);else i.stateNode=XN(w,f,i.memoizedProps);else k!==f?(k===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):k.count--,f===null?YN(w,i.type,i.stateNode):XN(w,f,i.memoizedProps)):f===null&&i.stateNode!==null&&a8(i,i.memoizedProps,c.memoizedProps)}break;case 27:Ni(s,i),Pi(i),f&512&&(Un||c===null||sl(c,c.return)),c!==null&&f&4&&a8(i,i.memoizedProps,c.memoizedProps);break;case 5:if(Ni(s,i),Pi(i),f&512&&(Un||c===null||sl(c,c.return)),i.flags&32){w=i.stateNode;try{Pm(w,"")}catch(nt){_r(i,i.return,nt)}}f&4&&i.stateNode!=null&&(w=i.memoizedProps,a8(i,w,c!==null?c.memoizedProps:w)),f&1024&&(s8=!0);break;case 6:if(Ni(s,i),Pi(i),f&4){if(i.stateNode===null)throw Error(a(162));f=i.memoizedProps,c=i.stateNode;try{c.nodeValue=f}catch(nt){_r(i,i.return,nt)}}break;case 3:if(W5=null,w=bs,bs=H5(s.containerInfo),Ni(s,i),bs=w,Pi(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{hh(s.containerInfo)}catch(nt){_r(i,i.return,nt)}s8&&(s8=!1,X_(i));break;case 4:f=bs,bs=H5(i.stateNode.containerInfo),Ni(s,i),Pi(i),bs=f;break;case 12:Ni(s,i),Pi(i);break;case 31:Ni(s,i),Pi(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,F5(i,f)));break;case 13:Ni(s,i),Pi(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(D5=Te()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,F5(i,f)));break;case 22:w=i.memoizedState!==null;var re=c!==null&&c.memoizedState!==null,fe=du,xe=Un;if(du=fe||w,Un=xe||re,Ni(s,i),Un=xe,du=fe,Pi(i),f&8192)e:for(s=i.stateNode,s._visibility=w?s._visibility&-2:s._visibility|1,w&&(c===null||re||du||Un||Sp(i)),c=null,s=i;;){if(s.tag===5||s.tag===26){if(c===null){re=c=s;try{if(k=re.stateNode,w)T=k.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{G=re.stateNode;var Se=re.memoizedProps.style,ge=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;G.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(nt){_r(re,re.return,nt)}}}else if(s.tag===6){if(c===null){re=s;try{re.stateNode.nodeValue=w?"":re.memoizedProps}catch(nt){_r(re,re.return,nt)}}}else if(s.tag===18){if(c===null){re=s;try{var be=re.stateNode;w?zN(be,!0):zN(re.stateNode,!1)}catch(nt){_r(re,re.return,nt)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}f&4&&(f=i.updateQueue,f!==null&&(c=f.retryQueue,c!==null&&(f.retryQueue=null,F5(i,c))));break;case 19:Ni(s,i),Pi(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,F5(i,f)));break;case 30:break;case 21:break;default:Ni(s,i),Pi(i)}}function Pi(i){var s=i.flags;if(s&2){try{for(var c,f=i.return;f!==null;){if(z_(f)){c=f;break}f=f.return}if(c==null)throw Error(a(160));switch(c.tag){case 27:var w=c.stateNode,k=i8(i);S5(i,k,w);break;case 5:var T=c.stateNode;c.flags&32&&(Pm(T,""),c.flags&=-33);var G=i8(i);S5(i,G,T);break;case 3:case 4:var re=c.stateNode.containerInfo,fe=i8(i);o8(i,fe,re);break;default:throw Error(a(161))}}catch(xe){_r(i,i.return,xe)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function X_(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;X_(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function fu(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)q_(i,s.alternate,s),s=s.sibling}function Sp(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:$c(4,s,s.return),Sp(s);break;case 1:sl(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&R_(s,s.return,c),Sp(s);break;case 27:Rv(s.stateNode);case 26:case 5:sl(s,s.return),Sp(s);break;case 22:s.memoizedState===null&&Sp(s);break;case 30:Sp(s);break;default:Sp(s)}i=i.sibling}}function mu(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var f=s.alternate,w=i,k=s,T=k.flags;switch(k.tag){case 0:case 11:case 15:mu(w,k,c),Dv(4,k);break;case 1:if(mu(w,k,c),f=k,w=f.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(fe){_r(f,f.return,fe)}if(f=k,w=f.updateQueue,w!==null){var G=f.stateNode;try{var re=w.shared.hiddenCallbacks;if(re!==null)for(w.shared.hiddenCallbacks=null,w=0;w<re.length;w++)Fj(re[w],G)}catch(fe){_r(f,f.return,fe)}}c&&T&64&&P_(k),Av(k,k.return);break;case 27:L_(k);case 26:case 5:mu(w,k,c),c&&f===null&&T&4&&O_(k),Av(k,k.return);break;case 12:mu(w,k,c);break;case 31:mu(w,k,c),c&&T&4&&U_(w,k);break;case 13:mu(w,k,c),c&&T&4&&G_(w,k);break;case 22:k.memoizedState===null&&mu(w,k,c),Av(k,k.return);break;case 30:break;default:mu(w,k,c)}s=s.sibling}}function l8(i,s){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&hv(c))}function u8(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&hv(i))}function ys(i,s,c,f){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Q_(i,s,c,f),s=s.sibling}function Q_(i,s,c,f){var w=s.flags;switch(s.tag){case 0:case 11:case 15:ys(i,s,c,f),w&2048&&Dv(9,s);break;case 1:ys(i,s,c,f);break;case 3:ys(i,s,c,f),w&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&hv(i)));break;case 12:if(w&2048){ys(i,s,c,f),i=s.stateNode;try{var k=s.memoizedProps,T=k.id,G=k.onPostCommit;typeof G=="function"&&G(T,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(re){_r(s,s.return,re)}}else ys(i,s,c,f);break;case 31:ys(i,s,c,f);break;case 13:ys(i,s,c,f);break;case 23:break;case 22:k=s.stateNode,T=s.alternate,s.memoizedState!==null?k._visibility&2?ys(i,s,c,f):Bv(i,s):k._visibility&2?ys(i,s,c,f):(k._visibility|=2,ah(i,s,c,f,(s.subtreeFlags&10256)!==0||!1)),w&2048&&l8(T,s);break;case 24:ys(i,s,c,f),w&2048&&u8(s.alternate,s);break;default:ys(i,s,c,f)}}function ah(i,s,c,f,w){for(w=w&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var k=i,T=s,G=c,re=f,fe=T.flags;switch(T.tag){case 0:case 11:case 15:ah(k,T,G,re,w),Dv(8,T);break;case 23:break;case 22:var xe=T.stateNode;T.memoizedState!==null?xe._visibility&2?ah(k,T,G,re,w):Bv(k,T):(xe._visibility|=2,ah(k,T,G,re,w)),w&&fe&2048&&l8(T.alternate,T);break;case 24:ah(k,T,G,re,w),w&&fe&2048&&u8(T.alternate,T);break;default:ah(k,T,G,re,w)}s=s.sibling}}function Bv(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=i,f=s,w=f.flags;switch(f.tag){case 22:Bv(c,f),w&2048&&l8(f.alternate,f);break;case 24:Bv(c,f),w&2048&&u8(f.alternate,f);break;default:Bv(c,f)}s=s.sibling}}var Iv=8192;function ih(i,s,c){if(i.subtreeFlags&Iv)for(i=i.child;i!==null;)Y_(i,s,c),i=i.sibling}function Y_(i,s,c){switch(i.tag){case 26:ih(i,s,c),i.flags&Iv&&i.memoizedState!==null&&Mee(c,bs,i.memoizedState,i.memoizedProps);break;case 5:ih(i,s,c);break;case 3:case 4:var f=bs;bs=H5(i.stateNode.containerInfo),ih(i,s,c),bs=f;break;case 22:i.memoizedState===null&&(f=i.alternate,f!==null&&f.memoizedState!==null?(f=Iv,Iv=16777216,ih(i,s,c),Iv=f):ih(i,s,c));break;default:ih(i,s,c)}}function J_(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function Mv(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var f=s[c];ma=f,eN(f,i)}J_(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Z_(i),i=i.sibling}function Z_(i){switch(i.tag){case 0:case 11:case 15:Mv(i),i.flags&2048&&$c(9,i,i.return);break;case 3:Mv(i);break;case 12:Mv(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,$5(i)):Mv(i);break;default:Mv(i)}}function $5(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var f=s[c];ma=f,eN(f,i)}J_(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:$c(8,s,s.return),$5(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,$5(s));break;default:$5(s)}i=i.sibling}}function eN(i,s){for(;ma!==null;){var c=ma;switch(c.tag){case 0:case 11:case 15:$c(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var f=c.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:hv(c.memoizedState.cache)}if(f=c.child,f!==null)f.return=c,ma=f;else e:for(c=i;ma!==null;){f=ma;var w=f.sibling,k=f.return;if(W_(f),f===c){ma=null;break e}if(w!==null){w.return=k,ma=w;break e}ma=k}}}var XZ={getCacheForType:function(i){var s=Da(qn),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c},cacheSignal:function(){return Da(qn).controller.signal}},QZ=typeof WeakMap=="function"?WeakMap:Map,kr=0,Vr=null,Qt=null,nr=0,jr=0,po=null,Dc=!1,oh=!1,c8=!1,hu=0,Sn=0,Ac=0,Fp=0,d8=0,fo=0,sh=0,Tv=null,Ri=null,p8=!1,D5=0,tN=0,A5=1/0,B5=null,Bc=null,ea=0,Ic=null,lh=null,gu=0,f8=0,m8=null,rN=null,jv=0,h8=null;function mo(){return(kr&2)!==0&&nr!==0?nr&-nr:L.T!==null?x8():Xt()}function nN(){if(fo===0)if((nr&536870912)===0||ur){var i=Tr;Tr<<=1,(Tr&3932160)===0&&(Tr=262144),fo=i}else fo=536870912;return i=uo.current,i!==null&&(i.flags|=32),fo}function Oi(i,s,c){(i===Vr&&(jr===2||jr===9)||i.cancelPendingCommit!==null)&&(uh(i,0),Mc(i,nr,fo,!1)),Le(i,c),((kr&2)===0||i!==Vr)&&(i===Vr&&((kr&2)===0&&(Fp|=c),Sn===4&&Mc(i,nr,fo,!1)),ll(i))}function aN(i,s,c){if((kr&6)!==0)throw Error(a(327));var f=!c&&(s&127)===0&&(s&i.expiredLanes)===0||$r(i,s),w=f?ZZ(i,s):v8(i,s,!0),k=f;do{if(w===0){oh&&!f&&Mc(i,s,0,!1);break}else{if(c=i.current.alternate,k&&!YZ(c)){w=v8(i,s,!1),k=!1;continue}if(w===2){if(k=s,i.errorRecoveryDisabledLanes&k)var T=0;else T=i.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){s=T;e:{var G=i;w=Tv;var re=G.current.memoizedState.isDehydrated;if(re&&(uh(G,T).flags|=256),T=v8(G,T,!1),T!==2){if(c8&&!re){G.errorRecoveryDisabledLanes|=k,Fp|=k,w=4;break e}k=Ri,Ri=w,k!==null&&(Ri===null?Ri=k:Ri.push.apply(Ri,k))}w=T}if(k=!1,w!==2)continue}}if(w===1){uh(i,0),Mc(i,s,0,!0);break}e:{switch(f=i,k=w,k){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:Mc(f,s,fo,!Dc);break e;case 2:Ri=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(w=D5+300-Te(),10<w)){if(Mc(f,s,fo,!Dc),lr(f,0,!0)!==0)break e;gu=s,f.timeoutHandle=PN(iN.bind(null,f,c,Ri,B5,p8,s,fo,Fp,sh,Dc,k,"Throttled",-0,0),w);break e}iN(f,c,Ri,B5,p8,s,fo,Fp,sh,Dc,k,null,-0,0)}}break}while(!0);ll(i)}function iN(i,s,c,f,w,k,T,G,re,fe,xe,Se,ge,be){if(i.timeoutHandle=-1,Se=s.subtreeFlags,Se&8192||(Se&16785408)===16785408){Se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tu},Y_(s,k,Se);var nt=(k&62914560)===k?D5-Te():(k&4194048)===k?tN-Te():0;if(nt=Tee(Se,nt),nt!==null){gu=k,i.cancelPendingCommit=nt(fN.bind(null,i,s,k,c,f,w,T,G,re,xe,Se,null,ge,be)),Mc(i,k,T,!fe);return}}fN(i,s,k,c,f,w,T,G,re)}function YZ(i){for(var s=i;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var f=0;f<c.length;f++){var w=c[f],k=w.getSnapshot;w=w.value;try{if(!so(k(),w))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Mc(i,s,c,f){s&=~d8,s&=~Fp,i.suspendedLanes|=s,i.pingedLanes&=~s,f&&(i.warmLanes|=s),f=i.expirationTimes;for(var w=s;0<w;){var k=31-at(w),T=1<<k;f[k]=-1,w&=~T}c!==0&&ut(i,c,s)}function I5(){return(kr&6)===0?(_v(0,!1),!1):!0}function g8(){if(Qt!==null){if(jr===0)var i=Qt.return;else i=Qt,iu=vp=null,MS(i),Zm=null,vv=0,i=Qt;for(;i!==null;)N_(i.alternate,i),i=i.return;Qt=null}}function uh(i,s){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,hee(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),gu=0,g8(),Vr=i,Qt=c=nu(i.current,null),nr=s,jr=0,po=null,Dc=!1,oh=$r(i,s),c8=!1,sh=fo=d8=Fp=Ac=Sn=0,Ri=Tv=null,p8=!1,(s&8)!==0&&(s|=s&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=s;0<f;){var w=31-at(f),k=1<<w;s|=i[w],f&=~k}return hu=s,Jw(),c}function oN(i,s){Mt=null,L.H=Sv,s===Jm||s===o5?(s=Ej(),jr=3):s===wS?(s=Ej(),jr=4):jr=s===KS?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,po=s,Qt===null&&(Sn=1,w5(i,To(s,i.current)))}function sN(){var i=uo.current;return i===null?!0:(nr&4194048)===nr?vs===null:(nr&62914560)===nr||(nr&536870912)!==0?i===vs:!1}function lN(){var i=L.H;return L.H=Sv,i===null?Sv:i}function uN(){var i=L.A;return L.A=XZ,i}function M5(){Sn=4,Dc||(nr&4194048)!==nr&&uo.current!==null||(oh=!0),(Ac&134217727)===0&&(Fp&134217727)===0||Vr===null||Mc(Vr,nr,fo,!1)}function v8(i,s,c){var f=kr;kr|=2;var w=lN(),k=uN();(Vr!==i||nr!==s)&&(B5=null,uh(i,s)),s=!1;var T=Sn;e:do try{if(jr!==0&&Qt!==null){var G=Qt,re=po;switch(jr){case 8:g8(),T=6;break e;case 3:case 2:case 9:case 6:uo.current===null&&(s=!0);var fe=jr;if(jr=0,po=null,ch(i,G,re,fe),c&&oh){T=0;break e}break;default:fe=jr,jr=0,po=null,ch(i,G,re,fe)}}JZ(),T=Sn;break}catch(xe){oN(i,xe)}while(!0);return s&&i.shellSuspendCounter++,iu=vp=null,kr=f,L.H=w,L.A=k,Qt===null&&(Vr=null,nr=0,Jw()),T}function JZ(){for(;Qt!==null;)cN(Qt)}function ZZ(i,s){var c=kr;kr|=2;var f=lN(),w=uN();Vr!==i||nr!==s?(B5=null,A5=Te()+500,uh(i,s)):oh=$r(i,s);e:do try{if(jr!==0&&Qt!==null){s=Qt;var k=po;t:switch(jr){case 1:jr=0,po=null,ch(i,s,k,1);break;case 2:case 9:if(wj(k)){jr=0,po=null,dN(s);break}s=function(){jr!==2&&jr!==9||Vr!==i||(jr=7),ll(i)},k.then(s,s);break e;case 3:jr=7;break e;case 4:jr=5;break e;case 7:wj(k)?(jr=0,po=null,dN(s)):(jr=0,po=null,ch(i,s,k,7));break;case 5:var T=null;switch(Qt.tag){case 26:T=Qt.memoizedState;case 5:case 27:var G=Qt;if(T?JN(T):G.stateNode.complete){jr=0,po=null;var re=G.sibling;if(re!==null)Qt=re;else{var fe=G.return;fe!==null?(Qt=fe,T5(fe)):Qt=null}break t}}jr=0,po=null,ch(i,s,k,5);break;case 6:jr=0,po=null,ch(i,s,k,6);break;case 8:g8(),Sn=6;break e;default:throw Error(a(462))}}eee();break}catch(xe){oN(i,xe)}while(!0);return iu=vp=null,L.H=f,L.A=w,kr=c,Qt!==null?0:(Vr=null,nr=0,Jw(),Sn)}function eee(){for(;Qt!==null&&!qe();)cN(Qt)}function cN(i){var s=j_(i.alternate,i,hu);i.memoizedProps=i.pendingProps,s===null?T5(i):Qt=s}function dN(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=D_(c,s,s.pendingProps,s.type,void 0,nr);break;case 11:s=D_(c,s,s.pendingProps,s.type.render,s.ref,nr);break;case 5:MS(s);default:N_(c,s),s=Qt=uj(s,hu),s=j_(c,s,hu)}i.memoizedProps=i.pendingProps,s===null?T5(i):Qt=s}function ch(i,s,c,f){iu=vp=null,MS(s),Zm=null,vv=0;var w=s.return;try{if(HZ(i,w,s,c,nr)){Sn=1,w5(i,To(c,i.current)),Qt=null;return}}catch(k){if(w!==null)throw Qt=w,k;Sn=1,w5(i,To(c,i.current)),Qt=null;return}s.flags&32768?(ur||f===1?i=!0:oh||(nr&536870912)!==0?i=!1:(Dc=i=!0,(f===2||f===9||f===3||f===6)&&(f=uo.current,f!==null&&f.tag===13&&(f.flags|=16384))),pN(s,i)):T5(s)}function T5(i){var s=i;do{if((s.flags&32768)!==0){pN(s,Dc);return}i=s.return;var c=VZ(s.alternate,s,hu);if(c!==null){Qt=c;return}if(s=s.sibling,s!==null){Qt=s;return}Qt=s=i}while(s!==null);Sn===0&&(Sn=5)}function pN(i,s){do{var c=UZ(i.alternate,i);if(c!==null){c.flags&=32767,Qt=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(i=i.sibling,i!==null)){Qt=i;return}Qt=i=c}while(i!==null);Sn=6,Qt=null}function fN(i,s,c,f,w,k,T,G,re){i.cancelPendingCommit=null;do j5();while(ea!==0);if((kr&6)!==0)throw Error(a(327));if(s!==null){if(s===i.current)throw Error(a(177));if(k=s.lanes|s.childLanes,k|=iS,tt(i,c,k,T,G,re),i===Vr&&(Qt=Vr=null,nr=0),lh=s,Ic=i,gu=c,f8=k,m8=w,rN=f,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,aee(et,function(){return bN(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||f){f=L.T,L.T=null,w=U.p,U.p=2,T=kr,kr|=4;try{GZ(i,s,c)}finally{kr=T,U.p=w,L.T=f}}ea=1,mN(),hN(),gN()}}function mN(){if(ea===1){ea=0;var i=Ic,s=lh,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=L.T,L.T=null;var f=U.p;U.p=2;var w=kr;kr|=4;try{K_(s,i);var k=$8,T=ej(i.containerInfo),G=k.focusedElem,re=k.selectionRange;if(T!==G&&G&&G.ownerDocument&&ZT(G.ownerDocument.documentElement,G)){if(re!==null&&eS(G)){var fe=re.start,xe=re.end;if(xe===void 0&&(xe=fe),"selectionStart"in G)G.selectionStart=fe,G.selectionEnd=Math.min(xe,G.value.length);else{var Se=G.ownerDocument||document,ge=Se&&Se.defaultView||window;if(ge.getSelection){var be=ge.getSelection(),nt=G.textContent.length,Et=Math.min(re.start,nt),Or=re.end===void 0?Et:Math.min(re.end,nt);!be.extend&&Et>Or&&(T=Or,Or=Et,Et=T);var ce=JT(G,Et),oe=JT(G,Or);if(ce&&oe&&(be.rangeCount!==1||be.anchorNode!==ce.node||be.anchorOffset!==ce.offset||be.focusNode!==oe.node||be.focusOffset!==oe.offset)){var pe=Se.createRange();pe.setStart(ce.node,ce.offset),be.removeAllRanges(),Et>Or?(be.addRange(pe),be.extend(oe.node,oe.offset)):(pe.setEnd(oe.node,oe.offset),be.addRange(pe))}}}}for(Se=[],be=G;be=be.parentNode;)be.nodeType===1&&Se.push({element:be,left:be.scrollLeft,top:be.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Se.length;G++){var Ce=Se[G];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}K5=!!F8,$8=F8=null}finally{kr=w,U.p=f,L.T=c}}i.current=s,ea=2}}function hN(){if(ea===2){ea=0;var i=Ic,s=lh,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=L.T,L.T=null;var f=U.p;U.p=2;var w=kr;kr|=4;try{q_(i,s.alternate,s)}finally{kr=w,U.p=f,L.T=c}}ea=3}}function gN(){if(ea===4||ea===3){ea=0,ze();var i=Ic,s=lh,c=gu,f=rN;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ea=5:(ea=0,lh=Ic=null,vN(i,i.pendingLanes));var w=i.pendingLanes;if(w===0&&(Bc=null),Kt(c),s=s.stateNode,Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(lt,s,void 0,(s.current.flags&128)===128)}catch{}if(f!==null){s=L.T,w=U.p,U.p=2,L.T=null;try{for(var k=i.onRecoverableError,T=0;T<f.length;T++){var G=f[T];k(G.value,{componentStack:G.stack})}}finally{L.T=s,U.p=w}}(gu&3)!==0&&j5(),ll(i),w=i.pendingLanes,(c&261930)!==0&&(w&42)!==0?i===h8?jv++:(jv=0,h8=i):jv=0,_v(0,!1)}}function vN(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,hv(s)))}function j5(){return mN(),hN(),gN(),bN()}function bN(){if(ea!==5)return!1;var i=Ic,s=f8;f8=0;var c=Kt(gu),f=L.T,w=U.p;try{U.p=32>c?32:c,L.T=null,c=m8,m8=null;var k=Ic,T=gu;if(ea=0,lh=Ic=null,gu=0,(kr&6)!==0)throw Error(a(331));var G=kr;if(kr|=4,Z_(k.current),Q_(k,k.current,T,c),kr=G,_v(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(lt,k)}catch{}return!0}finally{U.p=w,L.T=f,vN(i,s)}}function yN(i,s,c){s=To(c,s),s=GS(i.stateNode,s,2),i=Cc(i,s,2),i!==null&&(Le(i,2),ll(i))}function _r(i,s,c){if(i.tag===3)yN(i,i,c);else for(;s!==null;){if(s.tag===3){yN(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Bc===null||!Bc.has(f))){i=To(c,i),c=w_(2),f=Cc(s,c,2),f!==null&&(x_(c,f,s,i),Le(f,2),ll(f));break}}s=s.return}}function b8(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new QZ;var w=new Set;f.set(s,w)}else w=f.get(s),w===void 0&&(w=new Set,f.set(s,w));w.has(c)||(c8=!0,w.add(c),i=tee.bind(null,i,s,c),s.then(i,i))}function tee(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,Vr===i&&(nr&c)===c&&(Sn===4||Sn===3&&(nr&62914560)===nr&&300>Te()-D5?(kr&2)===0&&uh(i,0):d8|=c,sh===nr&&(sh=0)),ll(i)}function wN(i,s){s===0&&(s=ct()),i=mp(i,s),i!==null&&(Le(i,s),ll(i))}function ree(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),wN(i,c)}function nee(i,s){var c=0;switch(i.tag){case 31:case 13:var f=i.stateNode,w=i.memoizedState;w!==null&&(c=w.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(a(314))}f!==null&&f.delete(s),wN(i,c)}function aee(i,s){return $e(i,s)}var _5=null,dh=null,y8=!1,N5=!1,w8=!1,Tc=0;function ll(i){i!==dh&&i.next===null&&(dh===null?_5=dh=i:dh=dh.next=i),N5=!0,y8||(y8=!0,oee())}function _v(i,s){if(!w8&&N5){w8=!0;do for(var c=!1,f=_5;f!==null;){if(!s)if(i!==0){var w=f.pendingLanes;if(w===0)var k=0;else{var T=f.suspendedLanes,G=f.pingedLanes;k=(1<<31-at(42|i)+1)-1,k&=w&~(T&~G),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(c=!0,CN(f,k))}else k=nr,k=lr(f,f===Vr?k:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(k&3)===0||$r(f,k)||(c=!0,CN(f,k));f=f.next}while(c);w8=!1}}function iee(){xN()}function xN(){N5=y8=!1;var i=0;Tc!==0&&mee()&&(i=Tc);for(var s=Te(),c=null,f=_5;f!==null;){var w=f.next,k=EN(f,s);k===0?(f.next=null,c===null?_5=w:c.next=w,w===null&&(dh=c)):(c=f,(i!==0||(k&3)!==0)&&(N5=!0)),f=w}ea!==0&&ea!==5||_v(i,!1),Tc!==0&&(Tc=0)}function EN(i,s){for(var c=i.suspendedLanes,f=i.pingedLanes,w=i.expirationTimes,k=i.pendingLanes&-62914561;0<k;){var T=31-at(k),G=1<<T,re=w[T];re===-1?((G&c)===0||(G&f)!==0)&&(w[T]=Vt(G,s)):re<=s&&(i.expiredLanes|=G),k&=~G}if(s=Vr,c=nr,c=lr(i,i===s?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,c===0||i===s&&(jr===2||jr===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&Me(f),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||$r(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(f!==null&&Me(f),Kt(c)){case 2:case 8:c=ot;break;case 32:c=et;break;case 268435456:c=Ie;break;default:c=et}return f=kN.bind(null,i),c=$e(c,f),i.callbackPriority=s,i.callbackNode=c,s}return f!==null&&f!==null&&Me(f),i.callbackPriority=2,i.callbackNode=null,2}function kN(i,s){if(ea!==0&&ea!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(j5()&&i.callbackNode!==c)return null;var f=nr;return f=lr(i,i===Vr?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(aN(i,f,s),EN(i,Te()),i.callbackNode!=null&&i.callbackNode===c?kN.bind(null,i):null)}function CN(i,s){if(j5())return null;aN(i,s,!0)}function oee(){gee(function(){(kr&6)!==0?$e(Qe,iee):xN()})}function x8(){if(Tc===0){var i=Qm;i===0&&(i=Gt,Gt<<=1,(Gt&261888)===0&&(Gt=256)),Tc=i}return Tc}function SN(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:qw(""+i)}function FN(i,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,i.id&&c.setAttribute("form",i.id),s.parentNode.insertBefore(c,s),i=new FormData(i),c.parentNode.removeChild(c),i}function see(i,s,c,f,w){if(s==="submit"&&c&&c.stateNode===w){var k=SN((w[Wr]||null).action),T=f.submitter;T&&(s=(s=T[Wr]||null)?SN(s.formAction):T.getAttribute("formAction"),s!==null&&(k=s,T=null));var G=new Gw("action","action",null,f,w);i.push({event:G,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Tc!==0){var re=T?FN(w,T):new FormData(w);LS(c,{pending:!0,data:re,method:w.method,action:k},null,re)}}else typeof k=="function"&&(G.preventDefault(),re=T?FN(w,T):new FormData(w),LS(c,{pending:!0,data:re,method:w.method,action:k},k,re))},currentTarget:w}]})}}for(R5=0;R5<aS.length;R5++)P5=aS[R5],$N=P5.toLowerCase(),DN=P5[0].toUpperCase()+P5.slice(1),gs($N,"on"+DN);var P5,$N,DN,R5;gs(nj,"onAnimationEnd"),gs(aj,"onAnimationIteration"),gs(ij,"onAnimationStart"),gs("dblclick","onDoubleClick"),gs("focusin","onFocus"),gs("focusout","onBlur"),gs(SZ,"onTransitionRun"),gs(FZ,"onTransitionStart"),gs($Z,"onTransitionCancel"),gs(oj,"onTransitionEnd"),bt("onMouseEnter",["mouseout","mouseover"]),bt("onMouseLeave",["mouseout","mouseover"]),bt("onPointerEnter",["pointerout","pointerover"]),bt("onPointerLeave",["pointerout","pointerover"]),Sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nv="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),lee=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Nv));function AN(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],w=f.event;f=f.listeners;e:{var k=void 0;if(s)for(var T=f.length-1;0<=T;T--){var G=f[T],re=G.instance,fe=G.currentTarget;if(G=G.listener,re!==k&&w.isPropagationStopped())break e;k=G,w.currentTarget=fe;try{k(w)}catch(xe){Yw(xe)}w.currentTarget=null,k=re}else for(T=0;T<f.length;T++){if(G=f[T],re=G.instance,fe=G.currentTarget,G=G.listener,re!==k&&w.isPropagationStopped())break e;k=G,w.currentTarget=fe;try{k(w)}catch(xe){Yw(xe)}w.currentTarget=null,k=re}}}}function Yt(i,s){var c=s[Rt];c===void 0&&(c=s[Rt]=new Set);var f=i+"__bubble";c.has(f)||(BN(s,i,2,!1),c.add(f))}function E8(i,s,c){var f=0;s&&(f|=4),BN(c,i,f,s)}var O5="_reactListening"+Math.random().toString(36).slice(2);function k8(i){if(!i[O5]){i[O5]=!0,Mi.forEach(function(c){c!=="selectionchange"&&(lee.has(c)||E8(c,!1,i),E8(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[O5]||(s[O5]=!0,E8("selectionchange",!1,s))}}function BN(i,s,c,f){switch(iP(s)){case 2:var w=Nee;break;case 8:w=Pee;break;default:w=R8}c=w.bind(null,s,c,i),w=void 0,!VC||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(w=!0),f?w!==void 0?i.addEventListener(s,c,{capture:!0,passive:w}):i.addEventListener(s,c,!0):w!==void 0?i.addEventListener(s,c,{passive:w}):i.addEventListener(s,c,!1)}function C8(i,s,c,f,w){var k=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var T=f.tag;if(T===3||T===4){var G=f.stateNode.containerInfo;if(G===w)break;if(T===4)for(T=f.return;T!==null;){var re=T.tag;if((re===3||re===4)&&T.stateNode.containerInfo===w)return;T=T.return}for(;G!==null;){if(T=Qa(G),T===null)return;if(re=T.tag,re===5||re===6||re===26||re===27){f=k=T;continue e}G=G.parentNode}}f=f.return}jT(function(){var fe=k,xe=qC(c),Se=[];e:{var ge=sj.get(i);if(ge!==void 0){var be=Gw,nt=i;switch(i){case"keypress":if(Vw(c)===0)break e;case"keydown":case"keyup":be=nZ;break;case"focusin":nt="focus",be=XC;break;case"focusout":nt="blur",be=XC;break;case"beforeblur":case"afterblur":be=XC;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":be=PT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=VJ;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=oZ;break;case nj:case aj:case ij:be=KJ;break;case oj:be=lZ;break;case"scroll":case"scrollend":be=qJ;break;case"wheel":be=cZ;break;case"copy":case"cut":case"paste":be=QJ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=OT;break;case"toggle":case"beforetoggle":be=pZ}var Et=(s&4)!==0,Or=!Et&&(i==="scroll"||i==="scrollend"),ce=Et?ge!==null?ge+"Capture":null:ge;Et=[];for(var oe=fe,pe;oe!==null;){var Ce=oe;if(pe=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||pe===null||ce===null||(Ce=iv(oe,ce),Ce!=null&&Et.push(Pv(oe,Ce,pe))),Or)break;oe=oe.return}0<Et.length&&(ge=new be(ge,nt,null,c,xe),Se.push({event:ge,listeners:Et}))}}if((s&7)===0){e:{if(ge=i==="mouseover"||i==="pointerover",be=i==="mouseout"||i==="pointerout",ge&&c!==HC&&(nt=c.relatedTarget||c.fromElement)&&(Qa(nt)||nt[vt]))break e;if((be||ge)&&(ge=xe.window===xe?xe:(ge=xe.ownerDocument)?ge.defaultView||ge.parentWindow:window,be?(nt=c.relatedTarget||c.toElement,be=fe,nt=nt?Qa(nt):null,nt!==null&&(Or=l(nt),Et=nt.tag,nt!==Or||Et!==5&&Et!==27&&Et!==6)&&(nt=null)):(be=null,nt=fe),be!==nt)){if(Et=PT,Ce="onMouseLeave",ce="onMouseEnter",oe="mouse",(i==="pointerout"||i==="pointerover")&&(Et=OT,Ce="onPointerLeave",ce="onPointerEnter",oe="pointer"),Or=be==null?ge:Hn(be),pe=nt==null?ge:Hn(nt),ge=new Et(Ce,oe+"leave",be,c,xe),ge.target=Or,ge.relatedTarget=pe,Ce=null,Qa(xe)===fe&&(Et=new Et(ce,oe+"enter",nt,c,xe),Et.target=pe,Et.relatedTarget=Or,Ce=Et),Or=Ce,be&&nt)t:{for(Et=uee,ce=be,oe=nt,pe=0,Ce=ce;Ce;Ce=Et(Ce))pe++;Ce=0;for(var dt=oe;dt;dt=Et(dt))Ce++;for(;0<pe-Ce;)ce=Et(ce),pe--;for(;0<Ce-pe;)oe=Et(oe),Ce--;for(;pe--;){if(ce===oe||oe!==null&&ce===oe.alternate){Et=ce;break t}ce=Et(ce),oe=Et(oe)}Et=null}else Et=null;be!==null&&IN(Se,ge,be,Et,!1),nt!==null&&Or!==null&&IN(Se,Or,nt,Et,!0)}}e:{if(ge=fe?Hn(fe):window,be=ge.nodeName&&ge.nodeName.toLowerCase(),be==="select"||be==="input"&&ge.type==="file")var yr=GT;else if(VT(ge))if(KT)yr=EZ;else{yr=wZ;var it=yZ}else be=ge.nodeName,!be||be.toLowerCase()!=="input"||ge.type!=="checkbox"&&ge.type!=="radio"?fe&&LC(fe.elementType)&&(yr=GT):yr=xZ;if(yr&&(yr=yr(i,fe))){UT(Se,yr,c,xe);break e}it&&it(i,ge,fe),i==="focusout"&&fe&&ge.type==="number"&&fe.memoizedProps.value!=null&&av(ge,"number",ge.value)}switch(it=fe?Hn(fe):window,i){case"focusin":(VT(it)||it.contentEditable==="true")&&(Hm=it,tS=fe,pv=null);break;case"focusout":pv=tS=Hm=null;break;case"mousedown":rS=!0;break;case"contextmenu":case"mouseup":case"dragend":rS=!1,tj(Se,c,xe);break;case"selectionchange":if(CZ)break;case"keydown":case"keyup":tj(Se,c,xe)}var Ot;if(YC)e:{switch(i){case"compositionstart":var ar="onCompositionStart";break e;case"compositionend":ar="onCompositionEnd";break e;case"compositionupdate":ar="onCompositionUpdate";break e}ar=void 0}else Lm?qT(i,c)&&(ar="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(ar="onCompositionStart");ar&&(zT&&c.locale!=="ko"&&(Lm||ar!=="onCompositionStart"?ar==="onCompositionEnd"&&Lm&&(Ot=_T()):(vc=xe,UC="value"in vc?vc.value:vc.textContent,Lm=!0)),it=z5(fe,ar),0<it.length&&(ar=new RT(ar,i,null,c,xe),Se.push({event:ar,listeners:it}),Ot?ar.data=Ot:(Ot=WT(c),Ot!==null&&(ar.data=Ot)))),(Ot=mZ?hZ(i,c):gZ(i,c))&&(ar=z5(fe,"onBeforeInput"),0<ar.length&&(it=new RT("onBeforeInput","beforeinput",null,c,xe),Se.push({event:it,listeners:ar}),it.data=Ot)),see(Se,i,fe,c,xe)}AN(Se,s)})}function Pv(i,s,c){return{instance:i,listener:s,currentTarget:c}}function z5(i,s){for(var c=s+"Capture",f=[];i!==null;){var w=i,k=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||k===null||(w=iv(i,c),w!=null&&f.unshift(Pv(i,w,k)),w=iv(i,s),w!=null&&f.push(Pv(i,w,k))),i.tag===3)return f;i=i.return}return[]}function uee(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function IN(i,s,c,f,w){for(var k=s._reactName,T=[];c!==null&&c!==f;){var G=c,re=G.alternate,fe=G.stateNode;if(G=G.tag,re!==null&&re===f)break;G!==5&&G!==26&&G!==27||fe===null||(re=fe,w?(fe=iv(c,k),fe!=null&&T.unshift(Pv(c,fe,re))):w||(fe=iv(c,k),fe!=null&&T.push(Pv(c,fe,re)))),c=c.return}T.length!==0&&i.push({event:s,listeners:T})}var cee=/\r\n?/g,dee=/\u0000|\uFFFD/g;function MN(i){return(typeof i=="string"?i:""+i).replace(cee,`
11
- `).replace(dee,"")}function TN(i,s){return s=MN(s),MN(i)===s}function Rr(i,s,c,f,w,k){switch(c){case"children":typeof f=="string"?s==="body"||s==="textarea"&&f===""||Pm(i,f):(typeof f=="number"||typeof f=="bigint")&&s!=="body"&&Pm(i,""+f);break;case"className":al(i,"class",f);break;case"tabIndex":al(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":al(i,c,f);break;case"style":MT(i,f,k);break;case"data":if(s!=="object"){al(i,"data",f);break}case"src":case"href":if(f===""&&(s!=="a"||c!=="href")){i.removeAttribute(c);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=qw(""+f),i.setAttribute(c,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof k=="function"&&(c==="formAction"?(s!=="input"&&Rr(i,s,"name",w.name,w,null),Rr(i,s,"formEncType",w.formEncType,w,null),Rr(i,s,"formMethod",w.formMethod,w,null),Rr(i,s,"formTarget",w.formTarget,w,null)):(Rr(i,s,"encType",w.encType,w,null),Rr(i,s,"method",w.method,w,null),Rr(i,s,"target",w.target,w,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=qw(""+f),i.setAttribute(c,f);break;case"onClick":f!=null&&(i.onclick=tu);break;case"onScroll":f!=null&&Yt("scroll",i);break;case"onScrollEnd":f!=null&&Yt("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(a(61));if(c=f.__html,c!=null){if(w.children!=null)throw Error(a(60));i.innerHTML=c}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}c=qw(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""+f):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":f===!0?i.setAttribute(c,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,f):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(c,f):i.removeAttribute(c);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(c):i.setAttribute(c,f);break;case"popover":Yt("beforetoggle",i),Yt("toggle",i),hs(i,"popover",f);break;case"xlinkActuate":Ti(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Ti(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Ti(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Ti(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Ti(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Ti(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Ti(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Ti(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Ti(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":hs(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=LJ.get(c)||c,hs(i,c,f))}}function S8(i,s,c,f,w,k){switch(c){case"style":MT(i,f,k);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(a(61));if(c=f.__html,c!=null){if(w.children!=null)throw Error(a(60));i.innerHTML=c}}break;case"children":typeof f=="string"?Pm(i,f):(typeof f=="number"||typeof f=="bigint")&&Pm(i,""+f);break;case"onScroll":f!=null&&Yt("scroll",i);break;case"onScrollEnd":f!=null&&Yt("scrollend",i);break;case"onClick":f!=null&&(i.onclick=tu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!io.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(w=c.endsWith("Capture"),s=c.slice(2,w?c.length-7:void 0),k=i[Wr]||null,k=k!=null?k[c]:null,typeof k=="function"&&i.removeEventListener(s,k,w),typeof f=="function")){typeof k!="function"&&k!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(s,f,w);break e}c in i?i[c]=f:f===!0?i.setAttribute(c,""):hs(i,c,f)}}}function Ba(i,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yt("error",i),Yt("load",i);var f=!1,w=!1,k;for(k in c)if(c.hasOwnProperty(k)){var T=c[k];if(T!=null)switch(k){case"src":f=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Rr(i,s,k,T,c,null)}}w&&Rr(i,s,"srcSet",c.srcSet,c,null),f&&Rr(i,s,"src",c.src,c,null);return;case"input":Yt("invalid",i);var G=k=T=w=null,re=null,fe=null;for(f in c)if(c.hasOwnProperty(f)){var xe=c[f];if(xe!=null)switch(f){case"name":w=xe;break;case"type":T=xe;break;case"checked":re=xe;break;case"defaultChecked":fe=xe;break;case"value":k=xe;break;case"defaultValue":G=xe;break;case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(a(137,s));break;default:Rr(i,s,f,xe,c,null)}}nv(i,k,G,re,fe,T,w,!1);return;case"select":Yt("invalid",i),f=T=k=null;for(w in c)if(c.hasOwnProperty(w)&&(G=c[w],G!=null))switch(w){case"value":k=G;break;case"defaultValue":T=G;break;case"multiple":f=G;default:Rr(i,s,w,G,c,null)}s=k,c=T,i.multiple=!!f,s!=null?Nm(i,!!f,s,!1):c!=null&&Nm(i,!!f,c,!0);return;case"textarea":Yt("invalid",i),k=w=f=null;for(T in c)if(c.hasOwnProperty(T)&&(G=c[T],G!=null))switch(T){case"value":f=G;break;case"defaultValue":w=G;break;case"children":k=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(91));break;default:Rr(i,s,T,G,c,null)}BT(i,f,w,k);return;case"option":for(re in c)c.hasOwnProperty(re)&&(f=c[re],f!=null)&&(re==="selected"?i.selected=f&&typeof f!="function"&&typeof f!="symbol":Rr(i,s,re,f,c,null));return;case"dialog":Yt("beforetoggle",i),Yt("toggle",i),Yt("cancel",i),Yt("close",i);break;case"iframe":case"object":Yt("load",i);break;case"video":case"audio":for(f=0;f<Nv.length;f++)Yt(Nv[f],i);break;case"image":Yt("error",i),Yt("load",i);break;case"details":Yt("toggle",i);break;case"embed":case"source":case"link":Yt("error",i),Yt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in c)if(c.hasOwnProperty(fe)&&(f=c[fe],f!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Rr(i,s,fe,f,c,null)}return;default:if(LC(s)){for(xe in c)c.hasOwnProperty(xe)&&(f=c[xe],f!==void 0&&S8(i,s,xe,f,c,void 0));return}}for(G in c)c.hasOwnProperty(G)&&(f=c[G],f!=null&&Rr(i,s,G,f,c,null))}function pee(i,s,c,f){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,k=null,T=null,G=null,re=null,fe=null,xe=null;for(be in c){var Se=c[be];if(c.hasOwnProperty(be)&&Se!=null)switch(be){case"checked":break;case"value":break;case"defaultValue":re=Se;default:f.hasOwnProperty(be)||Rr(i,s,be,null,f,Se)}}for(var ge in f){var be=f[ge];if(Se=c[ge],f.hasOwnProperty(ge)&&(be!=null||Se!=null))switch(ge){case"type":k=be;break;case"name":w=be;break;case"checked":fe=be;break;case"defaultChecked":xe=be;break;case"value":T=be;break;case"defaultValue":G=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(a(137,s));break;default:be!==Se&&Rr(i,s,ge,be,f,Se)}}_m(i,T,G,re,fe,xe,k,w);return;case"select":be=T=G=ge=null;for(k in c)if(re=c[k],c.hasOwnProperty(k)&&re!=null)switch(k){case"value":break;case"multiple":be=re;default:f.hasOwnProperty(k)||Rr(i,s,k,null,f,re)}for(w in f)if(k=f[w],re=c[w],f.hasOwnProperty(w)&&(k!=null||re!=null))switch(w){case"value":ge=k;break;case"defaultValue":G=k;break;case"multiple":T=k;default:k!==re&&Rr(i,s,w,k,f,re)}s=G,c=T,f=be,ge!=null?Nm(i,!!c,ge,!1):!!f!=!!c&&(s!=null?Nm(i,!!c,s,!0):Nm(i,!!c,c?[]:"",!1));return;case"textarea":be=ge=null;for(G in c)if(w=c[G],c.hasOwnProperty(G)&&w!=null&&!f.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:Rr(i,s,G,null,f,w)}for(T in f)if(w=f[T],k=c[T],f.hasOwnProperty(T)&&(w!=null||k!=null))switch(T){case"value":ge=w;break;case"defaultValue":be=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(a(91));break;default:w!==k&&Rr(i,s,T,w,f,k)}AT(i,ge,be);return;case"option":for(var nt in c)ge=c[nt],c.hasOwnProperty(nt)&&ge!=null&&!f.hasOwnProperty(nt)&&(nt==="selected"?i.selected=!1:Rr(i,s,nt,null,f,ge));for(re in f)ge=f[re],be=c[re],f.hasOwnProperty(re)&&ge!==be&&(ge!=null||be!=null)&&(re==="selected"?i.selected=ge&&typeof ge!="function"&&typeof ge!="symbol":Rr(i,s,re,ge,f,be));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Et in c)ge=c[Et],c.hasOwnProperty(Et)&&ge!=null&&!f.hasOwnProperty(Et)&&Rr(i,s,Et,null,f,ge);for(fe in f)if(ge=f[fe],be=c[fe],f.hasOwnProperty(fe)&&ge!==be&&(ge!=null||be!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(a(137,s));break;default:Rr(i,s,fe,ge,f,be)}return;default:if(LC(s)){for(var Or in c)ge=c[Or],c.hasOwnProperty(Or)&&ge!==void 0&&!f.hasOwnProperty(Or)&&S8(i,s,Or,void 0,f,ge);for(xe in f)ge=f[xe],be=c[xe],!f.hasOwnProperty(xe)||ge===be||ge===void 0&&be===void 0||S8(i,s,xe,ge,f,be);return}}for(var ce in c)ge=c[ce],c.hasOwnProperty(ce)&&ge!=null&&!f.hasOwnProperty(ce)&&Rr(i,s,ce,null,f,ge);for(Se in f)ge=f[Se],be=c[Se],!f.hasOwnProperty(Se)||ge===be||ge==null&&be==null||Rr(i,s,Se,ge,f,be)}function jN(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fee(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,c=performance.getEntriesByType("resource"),f=0;f<c.length;f++){var w=c[f],k=w.transferSize,T=w.initiatorType,G=w.duration;if(k&&G&&jN(T)){for(T=0,G=w.responseEnd,f+=1;f<c.length;f++){var re=c[f],fe=re.startTime;if(fe>G)break;var xe=re.transferSize,Se=re.initiatorType;xe&&jN(Se)&&(re=re.responseEnd,T+=xe*(re<G?1:(G-fe)/(re-fe)))}if(--f,s+=8*(k+T)/(w.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var F8=null,$8=null;function L5(i){return i.nodeType===9?i:i.ownerDocument}function _N(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function NN(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function D8(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var A8=null;function mee(){var i=window.event;return i&&i.type==="popstate"?i===A8?!1:(A8=i,!0):(A8=null,!1)}var PN=typeof setTimeout=="function"?setTimeout:void 0,hee=typeof clearTimeout=="function"?clearTimeout:void 0,RN=typeof Promise=="function"?Promise:void 0,gee=typeof queueMicrotask=="function"?queueMicrotask:typeof RN<"u"?function(i){return RN.resolve(null).then(i).catch(vee)}:PN;function vee(i){setTimeout(function(){throw i})}function jc(i){return i==="head"}function ON(i,s){var c=s,f=0;do{var w=c.nextSibling;if(i.removeChild(c),w&&w.nodeType===8)if(c=w.data,c==="/$"||c==="/&"){if(f===0){i.removeChild(w),hh(s);return}f--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")f++;else if(c==="html")Rv(i.ownerDocument.documentElement);else if(c==="head"){c=i.ownerDocument.head,Rv(c);for(var k=c.firstChild;k;){var T=k.nextSibling,G=k.nodeName;k[pr]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&k.rel.toLowerCase()==="stylesheet"||c.removeChild(k),k=T}}else c==="body"&&Rv(i.ownerDocument.body);c=w}while(c);hh(s)}function zN(i,s){var c=i;i=0;do{var f=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),f&&f.nodeType===8)if(c=f.data,c==="/$"){if(i===0)break;i--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||i++;c=f}while(c)}function B8(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":B8(c),mi(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function bee(i,s,c,f){for(;i.nodeType===1;){var w=c;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[pr])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(k=i.getAttribute("rel"),k==="stylesheet"&&i.hasAttribute("data-precedence")||k!==w.rel||i.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||i.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||i.getAttribute("title")!==(w.title==null?null:w.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(k=i.getAttribute("src"),(k!==(w.src==null?null:w.src)||i.getAttribute("type")!==(w.type==null?null:w.type)||i.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&k&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var k=w.name==null?null:""+w.name;if(w.type==="hidden"&&i.getAttribute("name")===k)return i}else return i;if(i=Po(i.nextSibling),i===null)break}return null}function yee(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=Po(i.nextSibling),i===null))return null;return i}function LN(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=Po(i.nextSibling),i===null))return null;return i}function I8(i){return i.data==="$?"||i.data==="$~"}function M8(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function wee(i,s){var c=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||c.readyState!=="loading")s();else{var f=function(){s(),c.removeEventListener("DOMContentLoaded",f)};c.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function Po(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var T8=null;function HN(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"||c==="/&"){if(s===0)return Po(i.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}i=i.nextSibling}return null}function qN(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return i;s--}else c!=="/$"&&c!=="/&"||s++}i=i.previousSibling}return null}function WN(i,s,c){switch(s=L5(c),i){case"html":if(i=s.documentElement,!i)throw Error(a(452));return i;case"head":if(i=s.head,!i)throw Error(a(453));return i;case"body":if(i=s.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function Rv(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);mi(i)}var Ro=new Map,VN=new Set;function H5(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var vu=U.d;U.d={f:xee,r:Eee,D:kee,C:Cee,L:See,m:Fee,X:Dee,S:$ee,M:Aee};function xee(){var i=vu.f(),s=I5();return i||s}function Eee(i){var s=Dr(i);s!==null&&s.tag===5&&s.type==="form"?o_(s):vu.r(i)}var ph=typeof document>"u"?null:document;function UN(i,s,c){var f=ph;if(f&&typeof s=="string"&&s){var w=oo(s);w='link[rel="'+i+'"][href="'+w+'"]',typeof c=="string"&&(w+='[crossorigin="'+c+'"]'),VN.has(w)||(VN.add(w),i={rel:i,crossOrigin:c,href:s},f.querySelector(w)===null&&(s=f.createElement("link"),Ba(s,"link",i),fr(s),f.head.appendChild(s)))}}function kee(i){vu.D(i),UN("dns-prefetch",i,null)}function Cee(i,s){vu.C(i,s),UN("preconnect",i,s)}function See(i,s,c){vu.L(i,s,c);var f=ph;if(f&&i&&s){var w='link[rel="preload"][as="'+oo(s)+'"]';s==="image"&&c&&c.imageSrcSet?(w+='[imagesrcset="'+oo(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(w+='[imagesizes="'+oo(c.imageSizes)+'"]')):w+='[href="'+oo(i)+'"]';var k=w;switch(s){case"style":k=fh(i);break;case"script":k=mh(i)}Ro.has(k)||(i=g({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),Ro.set(k,i),f.querySelector(w)!==null||s==="style"&&f.querySelector(Ov(k))||s==="script"&&f.querySelector(zv(k))||(s=f.createElement("link"),Ba(s,"link",i),fr(s),f.head.appendChild(s)))}}function Fee(i,s){vu.m(i,s);var c=ph;if(c&&i){var f=s&&typeof s.as=="string"?s.as:"script",w='link[rel="modulepreload"][as="'+oo(f)+'"][href="'+oo(i)+'"]',k=w;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=mh(i)}if(!Ro.has(k)&&(i=g({rel:"modulepreload",href:i},s),Ro.set(k,i),c.querySelector(w)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(zv(k)))return}f=c.createElement("link"),Ba(f,"link",i),fr(f),c.head.appendChild(f)}}}function $ee(i,s,c){vu.S(i,s,c);var f=ph;if(f&&i){var w=Ca(f).hoistableStyles,k=fh(i);s=s||"default";var T=w.get(k);if(!T){var G={loading:0,preload:null};if(T=f.querySelector(Ov(k)))G.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":s},c),(c=Ro.get(k))&&j8(i,c);var re=T=f.createElement("link");fr(re),Ba(re,"link",i),re._p=new Promise(function(fe,xe){re.onload=fe,re.onerror=xe}),re.addEventListener("load",function(){G.loading|=1}),re.addEventListener("error",function(){G.loading|=2}),G.loading|=4,q5(T,s,f)}T={type:"stylesheet",instance:T,count:1,state:G},w.set(k,T)}}}function Dee(i,s){vu.X(i,s);var c=ph;if(c&&i){var f=Ca(c).hoistableScripts,w=mh(i),k=f.get(w);k||(k=c.querySelector(zv(w)),k||(i=g({src:i,async:!0},s),(s=Ro.get(w))&&_8(i,s),k=c.createElement("script"),fr(k),Ba(k,"link",i),c.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},f.set(w,k))}}function Aee(i,s){vu.M(i,s);var c=ph;if(c&&i){var f=Ca(c).hoistableScripts,w=mh(i),k=f.get(w);k||(k=c.querySelector(zv(w)),k||(i=g({src:i,async:!0,type:"module"},s),(s=Ro.get(w))&&_8(i,s),k=c.createElement("script"),fr(k),Ba(k,"link",i),c.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},f.set(w,k))}}function GN(i,s,c,f){var w=(w=te.current)?H5(w):null;if(!w)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=fh(c.href),c=Ca(w).hoistableStyles,f=c.get(s),f||(f={type:"style",instance:null,count:0,state:null},c.set(s,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=fh(c.href);var k=Ca(w).hoistableStyles,T=k.get(i);if(T||(w=w.ownerDocument||w,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(i,T),(k=w.querySelector(Ov(i)))&&!k._p&&(T.instance=k,T.state.loading=5),Ro.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Ro.set(i,c),k||Bee(w,i,c,T.state))),s&&f===null)throw Error(a(528,""));return T}if(s&&f!==null)throw Error(a(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=mh(c),c=Ca(w).hoistableScripts,f=c.get(s),f||(f={type:"script",instance:null,count:0,state:null},c.set(s,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function fh(i){return'href="'+oo(i)+'"'}function Ov(i){return'link[rel="stylesheet"]['+i+"]"}function KN(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function Bee(i,s,c,f){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?f.loading=1:(s=i.createElement("link"),f.preload=s,s.addEventListener("load",function(){return f.loading|=1}),s.addEventListener("error",function(){return f.loading|=2}),Ba(s,"link",c),fr(s),i.head.appendChild(s))}function mh(i){return'[src="'+oo(i)+'"]'}function zv(i){return"script[async]"+i}function XN(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var f=i.querySelector('style[data-href~="'+oo(c.href)+'"]');if(f)return s.instance=f,fr(f),f;var w=g({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),fr(f),Ba(f,"style",w),q5(f,c.precedence,i),s.instance=f;case"stylesheet":w=fh(c.href);var k=i.querySelector(Ov(w));if(k)return s.state.loading|=4,s.instance=k,fr(k),k;f=KN(c),(w=Ro.get(w))&&j8(f,w),k=(i.ownerDocument||i).createElement("link"),fr(k);var T=k;return T._p=new Promise(function(G,re){T.onload=G,T.onerror=re}),Ba(k,"link",f),s.state.loading|=4,q5(k,c.precedence,i),s.instance=k;case"script":return k=mh(c.src),(w=i.querySelector(zv(k)))?(s.instance=w,fr(w),w):(f=c,(w=Ro.get(k))&&(f=g({},c),_8(f,w)),i=i.ownerDocument||i,w=i.createElement("script"),fr(w),Ba(w,"link",f),i.head.appendChild(w),s.instance=w);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(f=s.instance,s.state.loading|=4,q5(f,c.precedence,i));return s.instance}function q5(i,s,c){for(var f=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=f.length?f[f.length-1]:null,k=w,T=0;T<f.length;T++){var G=f[T];if(G.dataset.precedence===s)k=G;else if(k!==w)break}k?k.parentNode.insertBefore(i,k.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function j8(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function _8(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var W5=null;function QN(i,s,c){if(W5===null){var f=new Map,w=W5=new Map;w.set(c,f)}else w=W5,f=w.get(c),f||(f=new Map,w.set(c,f));if(f.has(i))return f;for(f.set(i,null),c=c.getElementsByTagName(i),w=0;w<c.length;w++){var k=c[w];if(!(k[pr]||k[tr]||i==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var T=k.getAttribute(s)||"";T=i+T;var G=f.get(T);G?G.push(k):f.set(T,[k])}}return f}function YN(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function Iee(i,s,c){if(c===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(i=s.disabled,typeof s.precedence=="string"&&i==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function JN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Mee(i,s,c,f){if(c.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var w=fh(f.href),k=s.querySelector(Ov(w));if(k){s=k._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=V5.bind(i),s.then(i,i)),c.state.loading|=4,c.instance=k,fr(k);return}k=s.ownerDocument||s,f=KN(f),(w=Ro.get(w))&&j8(f,w),k=k.createElement("link"),fr(k);var T=k;T._p=new Promise(function(G,re){T.onload=G,T.onerror=re}),Ba(k,"link",f),c.instance=k}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(i.count++,c=V5.bind(i),s.addEventListener("load",c),s.addEventListener("error",c))}}var N8=0;function Tee(i,s){return i.stylesheets&&i.count===0&&G5(i,i.stylesheets),0<i.count||0<i.imgCount?function(c){var f=setTimeout(function(){if(i.stylesheets&&G5(i,i.stylesheets),i.unsuspend){var k=i.unsuspend;i.unsuspend=null,k()}},6e4+s);0<i.imgBytes&&N8===0&&(N8=62500*fee());var w=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&G5(i,i.stylesheets),i.unsuspend)){var k=i.unsuspend;i.unsuspend=null,k()}},(i.imgBytes>N8?50:800)+s);return i.unsuspend=c,function(){i.unsuspend=null,clearTimeout(f),clearTimeout(w)}}:null}function V5(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)G5(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var U5=null;function G5(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,U5=new Map,s.forEach(jee,i),U5=null,V5.call(i))}function jee(i,s){if(!(s.state.loading&4)){var c=U5.get(i);if(c)var f=c.get(null);else{c=new Map,U5.set(i,c);for(var w=i.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<w.length;k++){var T=w[k];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(c.set(T.dataset.precedence,T),f=T)}f&&c.set(null,f)}w=s.instance,T=w.getAttribute("data-precedence"),k=c.get(T)||f,k===f&&c.set(null,w),c.set(T,w),this.count++,f=V5.bind(this),w.addEventListener("load",f),w.addEventListener("error",f),k?k.parentNode.insertBefore(w,k.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(w,i.firstChild)),s.state.loading|=4}}var Lv={$$typeof:C,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function _ee(i,s,c,f,w,k,T,G,re){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=f,this.onUncaughtError=w,this.onCaughtError=k,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function ZN(i,s,c,f,w,k,T,G,re,fe,xe,Se){return i=new _ee(i,s,c,T,re,fe,xe,Se,G),s=1,k===!0&&(s|=24),k=lo(3,null,null,s),i.current=k,k.stateNode=i,s=vS(),s.refCount++,i.pooledCache=s,s.refCount++,k.memoizedState={element:f,isDehydrated:c,cache:s},xS(k),i}function eP(i){return i?(i=Vm,i):Vm}function tP(i,s,c,f,w,k){w=eP(w),f.context===null?f.context=w:f.pendingContext=w,f=kc(s),f.payload={element:c},k=k===void 0?null:k,k!==null&&(f.callback=k),c=Cc(i,f,s),c!==null&&(Oi(c,i,s),yv(c,i,s))}function rP(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function P8(i,s){rP(i,s),(i=i.alternate)&&rP(i,s)}function nP(i){if(i.tag===13||i.tag===31){var s=mp(i,67108864);s!==null&&Oi(s,i,67108864),P8(i,67108864)}}function aP(i){if(i.tag===13||i.tag===31){var s=mo();s=gt(s);var c=mp(i,s);c!==null&&Oi(c,i,s),P8(i,s)}}var K5=!0;function Nee(i,s,c,f){var w=L.T;L.T=null;var k=U.p;try{U.p=2,R8(i,s,c,f)}finally{U.p=k,L.T=w}}function Pee(i,s,c,f){var w=L.T;L.T=null;var k=U.p;try{U.p=8,R8(i,s,c,f)}finally{U.p=k,L.T=w}}function R8(i,s,c,f){if(K5){var w=O8(f);if(w===null)C8(i,s,f,X5,c),oP(i,f);else if(Oee(w,i,s,c,f))f.stopPropagation();else if(oP(i,f),s&4&&-1<Ree.indexOf(i)){for(;w!==null;){var k=Dr(w);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var T=It(k.pendingLanes);if(T!==0){var G=k;for(G.pendingLanes|=2,G.entangledLanes|=2;T;){var re=1<<31-at(T);G.entanglements[1]|=re,T&=~re}ll(k),(kr&6)===0&&(A5=Te()+500,_v(0,!1))}}break;case 31:case 13:G=mp(k,2),G!==null&&Oi(G,k,2),I5(),P8(k,2)}if(k=O8(f),k===null&&C8(i,s,f,X5,c),k===w)break;w=k}w!==null&&f.stopPropagation()}else C8(i,s,f,null,c)}}function O8(i){return i=qC(i),z8(i)}var X5=null;function z8(i){if(X5=null,i=Qa(i),i!==null){var s=l(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=u(s),i!==null)return i;i=null}else if(c===31){if(i=d(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return X5=i,null}function iP(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ne()){case Qe:return 2;case ot:return 8;case et:case Ue:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var L8=!1,_c=null,Nc=null,Pc=null,Hv=new Map,qv=new Map,Rc=[],Ree="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function oP(i,s){switch(i){case"focusin":case"focusout":_c=null;break;case"dragenter":case"dragleave":Nc=null;break;case"mouseover":case"mouseout":Pc=null;break;case"pointerover":case"pointerout":Hv.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":qv.delete(s.pointerId)}}function Wv(i,s,c,f,w,k){return i===null||i.nativeEvent!==k?(i={blockedOn:s,domEventName:c,eventSystemFlags:f,nativeEvent:k,targetContainers:[w]},s!==null&&(s=Dr(s),s!==null&&nP(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,w!==null&&s.indexOf(w)===-1&&s.push(w),i)}function Oee(i,s,c,f,w){switch(s){case"focusin":return _c=Wv(_c,i,s,c,f,w),!0;case"dragenter":return Nc=Wv(Nc,i,s,c,f,w),!0;case"mouseover":return Pc=Wv(Pc,i,s,c,f,w),!0;case"pointerover":var k=w.pointerId;return Hv.set(k,Wv(Hv.get(k)||null,i,s,c,f,w)),!0;case"gotpointercapture":return k=w.pointerId,qv.set(k,Wv(qv.get(k)||null,i,s,c,f,w)),!0}return!1}function sP(i){var s=Qa(i.target);if(s!==null){var c=l(s);if(c!==null){if(s=c.tag,s===13){if(s=u(c),s!==null){i.blockedOn=s,on(i.priority,function(){aP(c)});return}}else if(s===31){if(s=d(c),s!==null){i.blockedOn=s,on(i.priority,function(){aP(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Q5(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=O8(i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);HC=f,c.target.dispatchEvent(f),HC=null}else return s=Dr(c),s!==null&&nP(s),i.blockedOn=c,!1;s.shift()}return!0}function lP(i,s,c){Q5(i)&&c.delete(s)}function zee(){L8=!1,_c!==null&&Q5(_c)&&(_c=null),Nc!==null&&Q5(Nc)&&(Nc=null),Pc!==null&&Q5(Pc)&&(Pc=null),Hv.forEach(lP),qv.forEach(lP)}function Y5(i,s){i.blockedOn===s&&(i.blockedOn=null,L8||(L8=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zee)))}var J5=null;function uP(i){J5!==i&&(J5=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){J5===i&&(J5=null);for(var s=0;s<i.length;s+=3){var c=i[s],f=i[s+1],w=i[s+2];if(typeof f!="function"){if(z8(f||c)===null)continue;break}var k=Dr(c);k!==null&&(i.splice(s,3),s-=3,LS(k,{pending:!0,data:w,method:c.method,action:f},f,w))}}))}function hh(i){function s(re){return Y5(re,i)}_c!==null&&Y5(_c,i),Nc!==null&&Y5(Nc,i),Pc!==null&&Y5(Pc,i),Hv.forEach(s),qv.forEach(s);for(var c=0;c<Rc.length;c++){var f=Rc[c];f.blockedOn===i&&(f.blockedOn=null)}for(;0<Rc.length&&(c=Rc[0],c.blockedOn===null);)sP(c),c.blockedOn===null&&Rc.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(f=0;f<c.length;f+=3){var w=c[f],k=c[f+1],T=w[Wr]||null;if(typeof k=="function")T||uP(c);else if(T){var G=null;if(k&&k.hasAttribute("formAction")){if(w=k,T=k[Wr]||null)G=T.formAction;else if(z8(w)!==null)continue}else G=T.action;typeof G=="function"?c[f+1]=G:(c.splice(f,3),f-=3),uP(c)}}}function cP(){function i(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(T){return w=T})},focusReset:"manual",scroll:"manual"})}function s(){w!==null&&(w(),w=null),f||setTimeout(c,20)}function c(){if(!f&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,w=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){f=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),w!==null&&(w(),w=null)}}}function H8(i){this._internalRoot=i}Z5.prototype.render=H8.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(a(409));var c=s.current,f=mo();tP(c,f,i,s,null,null)},Z5.prototype.unmount=H8.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;tP(i.current,2,null,i,null,null),I5(),s[vt]=null}};function Z5(i){this._internalRoot=i}Z5.prototype.unstable_scheduleHydration=function(i){if(i){var s=Xt();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Rc.length&&s!==0&&s<Rc[c].priority;c++);Rc.splice(c,0,i),c===0&&sP(i)}};var dP=r.version;if(dP!=="19.2.7")throw Error(a(527,dP,"19.2.7"));U.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=m(s),i=i!==null?v(i):null,i=i===null?null:i.stateNode,i};var Lee={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Vv=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Vv.isDisabled&&Vv.supportsFiber))try{lt=Vv.inject(Lee),Xe=Vv}catch{}var Vv;e.createRoot=function(i,s){if(!o(i))throw Error(a(299));var c=!1,f="",w=g_,k=v_,T=b_;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(w=s.onUncaughtError),s.onCaughtError!==void 0&&(k=s.onCaughtError),s.onRecoverableError!==void 0&&(T=s.onRecoverableError)),s=ZN(i,1,!1,null,null,c,f,null,w,k,T,cP),i[vt]=s.current,k8(i),new H8(s)},e.hydrateRoot=function(i,s,c){if(!o(i))throw Error(a(299));var f=!1,w="",k=g_,T=v_,G=b_,re=null;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onUncaughtError!==void 0&&(k=c.onUncaughtError),c.onCaughtError!==void 0&&(T=c.onCaughtError),c.onRecoverableError!==void 0&&(G=c.onRecoverableError),c.formState!==void 0&&(re=c.formState)),s=ZN(i,1,!0,s,c??null,f,w,re,k,T,G,cP),s.context=eP(null),c=s.current,f=mo(),f=gt(f),w=kc(f),w.callback=null,Cc(c,w,f),c=f,s.current.lanes=c,Le(s,c),ll(s),i[vt]=s.current,k8(i),new Z5(s)},e.version="19.2.7"}),Ja=ir((e,t)=>{"use strict";function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}r(),t.exports=ete()}),tte=ir(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:t,type:a,key:u,ref:o!==void 0?o:null,props:l}}e.Fragment=r,e.jsx=n,e.jsxs=n}),Ee=ir((e,t)=>{"use strict";t.exports=tte()}),rte=ir(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function y(E){if(typeof E=="object"&&E!==null){var S=E.$$typeof;switch(S){case t:switch(E=E.type,E){case n:case o:case a:case p:case m:case b:return E;default:switch(E=E&&E.$$typeof,E){case u:case d:case g:case v:return E;case l:return E;default:return S}}case r:return S}}}e.ContextConsumer=l,e.ContextProvider=u,e.Element=t,e.ForwardRef=d,e.Fragment=n,e.Lazy=g,e.Memo=v,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=p,e.SuspenseList=m,e.isContextConsumer=function(E){return y(E)===l},e.isContextProvider=function(E){return y(E)===u},e.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},e.isForwardRef=function(E){return y(E)===d},e.isFragment=function(E){return y(E)===n},e.isLazy=function(E){return y(E)===g},e.isMemo=function(E){return y(E)===v},e.isPortal=function(E){return y(E)===r},e.isProfiler=function(E){return y(E)===o},e.isStrictMode=function(E){return y(E)===a},e.isSuspense=function(E){return y(E)===p},e.isSuspenseList=function(E){return y(E)===m},e.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===o||E===a||E===p||E===m||E===b||typeof E=="object"&&E!==null&&(E.$$typeof===g||E.$$typeof===v||E.$$typeof===u||E.$$typeof===l||E.$$typeof===d||E.$$typeof===x||E.getModuleId!==void 0)},e.typeOf=y}),nte=ir((e,t)=>{"use strict";t.exports=rte()}),ate=ir((e,t)=>{"use strict";t.exports=o,t.exports.isMobile=o,t.exports.default=o;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,a=/android|ipad|playbook|silk/i;function o(l){l||(l={});let u=l.ua;if(!u&&typeof navigator<"u"&&(u=navigator.userAgent),u&&u.headers&&typeof u.headers["user-agent"]=="string"&&(u=u.headers["user-agent"]),typeof u!="string")return!1;let d=r.test(u)&&!n.test(u)||!!l.tablet&&a.test(u);return!d&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&u.indexOf("Macintosh")!==-1&&u.indexOf("Safari")!==-1&&(d=!0),d}});function OR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=OR(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Z(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=OR(e))&&(n&&(n+=" "),n+=t);return n}var aF=Z,ite=B(_()),ote=(0,ite.createContext)({}),$h=ote,tx=B(_()),ste=B(_()),Ex=B(_()),pP="data-rc-order",fP="data-rc-priority",lte="rc-util-key",u4=new Map;function zR(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ute(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function LR({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:lte}function iF(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function cte(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function oF(e){return Array.from((u4.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function HR(e,t={}){if(!zR())return null;let{csp:r,prepend:n,priority:a=0}=t,o=cte(n),l=o==="prependQueue",u=document.createElement("style");u.setAttribute(pP,o),l&&a&&u.setAttribute(fP,`${a}`),r?.nonce&&(u.nonce=r.nonce),u.innerHTML=e;let d=iF(t),{firstChild:p}=d;if(n){if(l){let m=(t.styles||oF(d)).filter(v=>{if(!["prepend","prependQueue"].includes(v.getAttribute(pP)))return!1;let g=Number(v.getAttribute(fP)||0);return a>=g});if(m.length)return d.insertBefore(u,m[m.length-1].nextSibling),u}d.insertBefore(u,p)}else d.appendChild(u);return u}function dte(e,t={}){let{styles:r}=t;return r||(r=oF(iF(t))),r.find(n=>n.getAttribute(LR(t))===e)}function pte(e,t){let r=u4.get(e);if(!r||!ute(document,r)){let n=HR("",t);if(!n)return;let{parentNode:a}=n;u4.set(e,a),e.removeChild(n)}}function fte(e,t,r={}){if(!zR())return null;let n=iF(r),a=oF(n),o={...r,styles:a};pte(n,o);let l=dte(t,o);if(l)return o.csp?.nonce&&l.nonce!==o.csp.nonce&&(l.nonce=o.csp.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;let u=HR(e,o);return u?.setAttribute(LR(o),t),u}function mte(e){return e?.getRootNode?.()}function hte(e){let t=mte(e);return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t:null}var mP={};function gte(e,t){e||mP[t]||(mP[t]=!0)}function vte(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function sF(e,t){gte(e,`[@ant-design/icons] ${t}`)}function kx(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function hP(e={}){return Object.keys(e).reduce((t,r)=>{let n=e[r];return r==="class"?(t.className=n,delete t.class):(delete t[r],t[vte(r)]=n),t},{})}function c4(e,t,r){return r?Ex.default.createElement(e.tag,{key:t,...hP(e.attrs),...r},(e.children||[]).map((n,a)=>c4(n,`${t}-${e.tag}-${a}`))):Ex.default.createElement(e.tag,{key:t,...hP(e.attrs)},(e.children||[]).map((n,a)=>c4(n,`${t}-${e.tag}-${a}`)))}var bte={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},yte=`
12
- .anticon {
13
- display: inline-flex;
14
- align-items: center;
15
- color: inherit;
16
- font-style: normal;
17
- line-height: 0;
18
- text-align: center;
19
- text-transform: none;
20
- vertical-align: -0.125em;
21
- text-rendering: optimizeLegibility;
22
- -webkit-font-smoothing: antialiased;
23
- -moz-osx-font-smoothing: grayscale;
24
- }
25
-
26
- .anticon > * {
27
- line-height: 1;
28
- }
29
-
30
- .anticon svg {
31
- display: inline-block;
32
- vertical-align: inherit;
33
- }
34
-
35
- .anticon::before {
36
- display: none;
37
- }
38
-
39
- .anticon .anticon-icon {
40
- display: block;
41
- }
42
-
43
- .anticon[tabindex] {
44
- cursor: pointer;
45
- }
46
-
47
- .anticon-spin {
48
- -webkit-animation: loadingCircle 1s infinite linear;
49
- animation: loadingCircle 1s infinite linear;
50
- }
51
-
52
- @-webkit-keyframes loadingCircle {
53
- 100% {
54
- -webkit-transform: rotate(360deg);
55
- transform: rotate(360deg);
56
- }
57
- }
58
-
59
- @keyframes loadingCircle {
60
- 100% {
61
- -webkit-transform: rotate(360deg);
62
- transform: rotate(360deg);
63
- }
64
- }
65
- `,qR=e=>{let{csp:t,prefixCls:r,layer:n,zeroRuntime:a}=(0,Ex.useContext)($h),o=yte;r&&(o=o.replace(/anticon/g,r)),n&&(o=`@layer ${n} {
66
- ${o}
67
- }`),(0,Ex.useEffect)(()=>{if(a)return;let l=e.current,u=hte(l);fte(o,"@ant-design-icons",{prepend:!n,csp:t,attachTo:u})},[])},WR=e=>{let{icon:t,className:r,onClick:n,style:a,primaryColor:o,secondaryColor:l,...u}=e,d=ste.useRef(null);if(qR(d),sF(kx(t),`icon should be icon definiton, but got ${typeof t}`),!kx(t))return null;let p=t;return c4(p.icon,`svg-${p.name}`,{className:r,onClick:n,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...u,ref:d})};WR.displayName="IconReact";var wte=WR;function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d4.apply(this,arguments)}var xte=tx.forwardRef((e,t)=>{let{className:r,icon:n,spin:a,rotate:o,tabIndex:l,onClick:u,twoToneColor:d,...p}=e,{prefixCls:m="anticon",rootClassName:v}=tx.useContext($h);if(sF(kx(n),`icon should be icon definiton, but got ${typeof n}`),!kx(n))return null;let g=Z(v,m,{[`${m}-${n.name}`]:!!n.name,[`${m}-spin`]:!!a||n.name==="loading"},r),b=l;b===void 0&&u&&(b=-1);let x=o?{msTransform:`rotate(${o}deg)`,transform:`rotate(${o}deg)`}:void 0;return tx.createElement("span",d4({role:"img","aria-label":n.name},p,{ref:t,tabIndex:b,onClick:u,className:g}),tx.createElement(wte,{icon:n,style:x}))}),Zt=xte,Ete=B(_()),p4=B(_());function Ya(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var gP=Ya()?p4.useLayoutEffect:p4.useEffect,VR=(e,t)=>{let r=p4.useRef(!0);gP(()=>e(r.current),t),gP(()=>(r.current=!1,()=>{r.current=!0}),[])},lF=(e,t)=>{VR(r=>{if(!r)return e()},t)},or=VR;function qt(e,t){let[r,n]=(0,Ete.useState)(e),a=t!==void 0?t:r;return or(o=>{o||n(t)},[t]),[a,n]}var f4=B(_());function kte(){return{...f4}.useId}var vP=0;function Cte(e,t){let r=String(t).replace(/[^a-zA-Z0-9_.:-]/g,"-");return`${e}-${r}`}var bP=kte(),pl=bP?function(e){let t=bP();return e||t}:function(e){let[t,r]=f4.useState("ssr-id");return f4.useEffect(()=>{let n=vP;vP+=1,r(`rc_unique_${n}`)},[]),e||t};function zr(e){return e!=null}function Lt(e){return zr(e)&&e!==!1&&e!==""}function Ut(e,t){let r=Object.assign({},e);return Array.isArray(t)&&t.forEach(n=>{delete r[n]}),r}var Ste=Symbol.for("react.element"),Fte=Symbol.for("react.transitional.element"),$te=Symbol.for("react.fragment");function UR(e){return e&&typeof e=="object"&&(e.$$typeof===Ste||e.$$typeof===Fte)&&e.type===$te}var Dte=B(_());function xr(e,t={}){let r=[];return Dte.default.Children.forEach(e,n=>{n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(xr(n)):UR(n)&&n.props?r=r.concat(xr(n.props.children,t)):r.push(n))}),r}function Ate(...e){let t={};for(let r of e)if(r)for(let n of Object.keys(r))r[n]!==void 0&&(t[n]=r[n]);return t}var Dx=Ate,Bte=B(Ja()),Cx="__rc_react_root__";function uF(e,t){let r=t[Cx]||(0,Bte.createRoot)(t);r.render(e),t[Cx]=r}async function cF(e){return Promise.resolve().then(()=>{e[Cx]?.unmount(),delete e[Cx]})}var yP=B(_()),Ite=e=>{let t=yP.useRef(e);return t.current=e,yP.useCallback((...r)=>t.current?.(...r),[])},wt=Ite,q8=B(_()),Mte=e=>{let t=q8.useRef(!1),[r,n]=q8.useState(e);q8.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function a(o,l){l&&t.current||n(o)}return[r,a]},GR=Mte,wP=B(_()),KR=e=>+setTimeout(e,16),XR=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(KR=e=>window.requestAnimationFrame(e),XR=e=>window.cancelAnimationFrame(e));var xP=0,dF=new Map;function QR(e){dF.delete(e)}var YR=(e,t=1)=>{xP+=1;let r=xP;function n(a){if(a===0)QR(r),e();else{let o=KR(()=>{n(a-1)});dF.set(r,o)}}return n(t),r};YR.cancel=e=>{let t=dF.get(e);return QR(e),XR(t)};var vr=YR;function Dh(e){let[t,r]=wP.useState(e),n=wP.useRef(null),a=wt(()=>{if(n.current){let[l,u]=n.current;l?vr.cancel(u):clearTimeout(u),n.current=null}}),o=wt((l,u)=>{let d=u||{frame:1};a(),d===!0?r(l):"ms"in d?n.current=[!1,setTimeout(()=>r(l),d.ms)]:n.current=[!0,vr(()=>r(l),d.frame)]});return[t,o]}var Tte=B(_());function Ah(e,t,r){let n=Tte.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var EP=B(_());function jte(e){let[,t]=EP.useReducer(o=>o+1,0),r=EP.useRef(e),n=wt(()=>r.current),a=wt(o=>{r.current=typeof o=="function"?o(r.current):o,t()});return[n,a]}var JR=jte,ZR=B(_()),W8=B(nte()),_te=Number(ZR.version.split(".")[0]),Nte=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},fn=(...e)=>{let t=e.filter(Boolean);return t.length<=1?t[0]:r=>{e.forEach(n=>{Nte(n,r)})}},Za=(...e)=>Ah(()=>fn(...e),e,(t,r)=>t.length!==r.length||t.every((n,a)=>n!==r[a])),wu=e=>{if(!e)return!1;if(pF(e)&&_te>=19)return!0;let t=(0,W8.isMemo)(e)?e.type.type:e.type;return!(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==W8.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==W8.ForwardRef)};function pF(e){return(0,ZR.isValidElement)(e)&&!UR(e)}var Ax=e=>pF(e)&&wu(e),Hi=e=>{if(e&&pF(e)){let t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function eO(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var kP="data-rc-order",CP="data-rc-priority",Pte="rc-util-key",m4=new Map;function tO({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Pte}function Bx(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Rte(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function fF(e){return Array.from((m4.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function rO(e,t={}){if(!Ya())return null;let{csp:r,prepend:n,priority:a=0}=t,o=Rte(n),l=o==="prependQueue",u=document.createElement("style");u.setAttribute(kP,o),l&&a&&u.setAttribute(CP,`${a}`),r?.nonce&&(u.nonce=r?.nonce),u.innerHTML=e;let d=Bx(t),{firstChild:p}=d;if(n){if(l){let m=(t.styles||fF(d)).filter(v=>{if(!["prepend","prependQueue"].includes(v.getAttribute(kP)))return!1;let g=Number(v.getAttribute(CP)||0);return a>=g});if(m.length)return d.insertBefore(u,m[m.length-1].nextSibling),u}d.insertBefore(u,p)}else d.appendChild(u);return u}function nO(e,t={}){let{styles:r}=t;return r||(r=fF(Bx(t))),r.find(n=>n.getAttribute(tO(t))===e)}function tb(e,t={}){let r=nO(e,t);r&&Bx(t).removeChild(r)}function Ote(e,t){let r=m4.get(e);if(!r||!eO(document,r)){let n=rO("",t),{parentNode:a}=n;m4.set(e,a),e.removeChild(n)}}function jp(e,t,r={}){let n=Bx(r),a=fF(n),o={...r,styles:a};Ote(n,o);let l=nO(t,o);if(l)return o.csp?.nonce&&l.nonce!==o.csp?.nonce&&(l.nonce=o.csp?.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;let u=rO(e,o);return u.setAttribute(tO(o),t),u}function kh(e){return e instanceof HTMLElement||e instanceof SVGElement}function Ix(e){return e&&typeof e=="object"&&kh(e.nativeElement)?e.nativeElement:kh(e)?e:null}var Kv=B(_()),ob=(e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){let{width:t,height:r}=e.getBBox();if(t||r)return!0}if(e.getBoundingClientRect){let{width:t,height:r}=e.getBoundingClientRect();if(t||r)return!0}}return!1});function SP(e,t=!1){if(ob(e)){let r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),a=e.getAttribute("tabindex"),o=Number(a),l=null;return a&&!Number.isNaN(o)?l=o:n&&l===null&&(l=0),n&&e.disabled&&(l=null),l!==null&&(l>=0||t&&l<0)}return!1}function sb(e,t=!1){let r=[...e.querySelectorAll("*")].filter(n=>SP(n,t));return SP(e,t)&&r.unshift(e),r}function Mx(e,t){if(!e)return;e.focus(t);let{cursor:r}=t||{};if(r&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){let n=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}var Eh=null,qc=[],h4=new Map,mF=new Map;function hF(){return qc[qc.length-1]}function zte(e){let t=hF();if(e&&t){let r;for(let[a,o]of h4.entries())if(o===t){r=a;break}let n=mF.get(r);return!!n&&(n===e||n.contains(e))}return!1}function Lte(e){let{activeElement:t}=document;return e===t||e.contains(t)}function V8(){let e=hF(),{activeElement:t}=document;if(!zte(t))if(e&&!Lte(e)){let r=sb(e);(r.includes(Eh)?Eh:r[0])?.focus({preventScroll:!0})}else Eh=t}function FP(e){if(e.key==="Tab"){let{activeElement:t}=document,r=hF(),n=sb(r),a=n[n.length-1];e.shiftKey&&t===n[0]?Eh=a:!e.shiftKey&&t===a&&(Eh=n[0])}}function Hte(e,t){return e&&(h4.set(t,e),qc=qc.filter(r=>r!==e),qc.push(e),window.addEventListener("focusin",V8),window.addEventListener("keydown",FP,!0),V8()),()=>{Eh=null,qc=qc.filter(r=>r!==e),h4.delete(t),mF.delete(t),qc.length===0&&(window.removeEventListener("focusin",V8),window.removeEventListener("keydown",FP,!0))}}function qte(e,t){let r=(0,Kv.useRef)(0),[n,a]=(0,Kv.useState)(0);(0,Kv.useEffect)(()=>{r.current=0},t),(0,Kv.useEffect)(()=>{let[o,l]=e(r.current);return l||(r.current+=1,a(u=>u+1)),o},[...t,n])}function Wte(e,t){let r=pl(),n=(0,Kv.useRef)(t);return n.current=t,qte(a=>{if(!e)return[void 0,!0];let o=n.current();return o?[Hte(o,r),!0]:[void 0,a>=1]},[r,e]),[a=>{a&&mF.set(r,a)}]}function aO(e){return e?.getRootNode?.()}function Vte(e){return aO(e)instanceof ShadowRoot}function g4(e){return Vte(e)?aO(e):null}var iO=e=>{if(Ya()&&window.document.documentElement){let t=Array.isArray(e)?e:[e],{documentElement:r}=window.document;return t.some(n=>n in r.style)}return!1},Ute=(e,t)=>{if(!iO(e))return!1;let r=document.createElement("div"),n=r.style[e];return r.style[e]=t,r.style[e]!==n};function Tx(e,t){return!Array.isArray(e)&&t!==void 0?Ute(e,t):iO(e)}var Ft={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){let{keyCode:t}=e;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Ft.F1&&t<=Ft.F12)return!1;switch(t){case Ft.ALT:case Ft.CAPS_LOCK:case Ft.CONTEXT_MENU:case Ft.CTRL:case Ft.DOWN:case Ft.END:case Ft.ESC:case Ft.HOME:case Ft.INSERT:case Ft.LEFT:case Ft.MAC_FF_META:case Ft.META:case Ft.NUMLOCK:case Ft.NUM_CENTER:case Ft.PAGE_DOWN:case Ft.PAGE_UP:case Ft.PAUSE:case Ft.PRINT_SCREEN:case Ft.RIGHT:case Ft.SHIFT:case Ft.UP:case Ft.WIN_KEY:case Ft.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Ft.ZERO&&e<=Ft.NINE||e>=Ft.NUM_ZERO&&e<=Ft.NUM_MULTIPLY||e>=Ft.A&&e<=Ft.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&e===0)return!0;switch(e){case Ft.SPACE:case Ft.QUESTION_MARK:case Ft.NUM_PLUS:case Ft.NUM_MINUS:case Ft.NUM_PERIOD:case Ft.NUM_DIVISION:case Ft.SEMICOLON:case Ft.DASH:case Ft.EQUALS:case Ft.COMMA:case Ft.PERIOD:case Ft.SLASH:case Ft.APOSTROPHE:case Ft.SINGLE_QUOTE:case Ft.OPEN_SQUARE_BRACKET:case Ft.BACKSLASH:case Ft.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},isEditableTarget:function(e){let t=e.target;if(!(t instanceof HTMLElement))return!1;let r=t.tagName;return!!(r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||t.isContentEditable)}},vn=Ft;function Gte(e){let t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,r=document.createElement("div");r.id=t;let n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";let a,o;if(e){let d=getComputedStyle(e);n.scrollbarColor=d.scrollbarColor,n.scrollbarWidth=d.scrollbarWidth;let p=getComputedStyle(e,"::-webkit-scrollbar"),m=parseInt(p.width,10),v=parseInt(p.height,10);try{let g=m?`width: ${p.width};`:"",b=v?`height: ${p.height};`:"";jp(`
68
- #${t}::-webkit-scrollbar {
69
- ${g}
70
- ${b}
71
- }`,t)}catch(g){console.error(g),a=m,o=v}}document.body.appendChild(r);let l=e&&a&&!Number.isNaN(a)?a:r.offsetWidth-r.clientWidth,u=e&&o&&!Number.isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),tb(t),{width:l,height:u}}function Kte(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:Gte(e)}var v4={},Xte=[],Qte=e=>{Xte.push(e)};function Yte(e,t){}function Jte(e,t){}function Zte(){v4={}}function oO(e,t,r){!t&&!v4[r]&&(e(!1,r),v4[r]=!0)}function jx(e,t){oO(Yte,e,t)}function ere(e,t){oO(Jte,e,t)}jx.preMessage=Qte;jx.resetWarned=Zte;jx.noteOnce=ere;var Ia=jx;function tre(e,t,r=!1){let n=new Set;function a(o,l,u=1){let d=n.has(o);if(Ia(!d,"Warning: There may be circular references"),d)return!1;if(o===l)return!0;if(r&&u>1)return!1;n.add(o);let p=u+1;if(Array.isArray(o)){if(!Array.isArray(l)||o.length!==l.length)return!1;for(let m=0;m<o.length;m++)if(!a(o[m],l[m],p))return!1;return!0}if(o&&l&&typeof o=="object"&&typeof l=="object"){let m=Object.keys(o);return m.length!==Object.keys(l).length?!1:m.every(v=>a(o[v],l[v],p))}return!1}return a(e,t)}var Qc=tre,rre=B(ate()),U8,nre=()=>(typeof U8>"u"&&(U8=(0,rre.default)()),U8),gF=nre,are=`accept acceptCharset accessKey action allowFullScreen allowTransparency
72
- alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
73
- charSet checked classID className colSpan cols content contentEditable contextMenu
74
- controls coords crossOrigin data dateTime default defer dir disabled download draggable
75
- encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
76
- headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
77
- is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
78
- mediaGroup method min minLength multiple muted name noValidate nonce open
79
- optimum pattern placeholder poster preload radioGroup readOnly rel required
80
- reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
81
- shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
82
- summary tabIndex target title type useMap value width wmode wrap`,ire=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
83
- onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
84
- onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
85
- onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
86
- onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
87
- onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
88
- onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad
89
- onPointerDown onPointerMove onPointerUp onPointerCancel onPointerEnter onPointerLeave onPointerOver onPointerOut onGotPointerCapture onLostPointerCapture
90
- onAnimationStart onAnimationEnd onAnimationIteration
91
- onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
92
- onBeforeInput onReset onInvalid
93
- onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,ore=`${are} ${ire}`.split(/[\s\n]+/),sre="aria-",lre="data-";function $P(e,t){return e.indexOf(t)===0}function ei(e,t=!1){let r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r={...t};let n={};return Object.keys(e).forEach(a=>{(r.aria&&(a==="role"||$P(a,sre))||r.data&&$P(a,lre)||r.attr&&ore.includes(a))&&(n[a]=e[a])}),n}function ure(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get(r,n){if(t[n])return t[n];let a=r[n];return typeof a=="function"?a.bind(r):a}}):e}function Li(e,t){let r=e;for(let n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function sO(e,t,r,n){if(!t.length)return r;let[a,...o]=t,l;return!e&&typeof a=="number"?l=[]:Array.isArray(e)?l=[...e]:l={...e},n&&r===void 0&&o.length===1?delete l[a][o[0]]:l[a]=sO(l[a],o,r,n),l}function vi(e,t,r,n=!1){return t.length&&n&&r===void 0&&!Li(e,t.slice(0,-1))?e:sO(e,t,r,n)}function cre(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function DP(e){return Array.isArray(e)?[]:{}}var dre=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function pre(e,t={}){let{prepareArray:r}=t,n=r||(()=>[]),a=DP(e[0]);return e.forEach(o=>{function l(u,d){let p=new Set(d),m=Li(o,u),v=Array.isArray(m);if(v||cre(m)){if(!p.has(m)){p.add(m);let g=Li(a,u);v?a=vi(a,u,n(g,m)):(!g||typeof g!="object")&&(a=vi(a,u,DP(m))),dre(m).forEach(b=>{Object.getOwnPropertyDescriptor(m,b).enumerable&&l([...u,b],p)})}}else a=vi(a,u,m)}l([])}),a}function Yc(...e){return pre(e)}var L$e=B(_()),H$e=B(Jt());function b4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function fre(e){if(Array.isArray(e))return b4(e)}function mre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lO(e,t){if(e){if(typeof e=="string")return b4(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b4(e,t):void 0}}function hre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
94
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zr(e){return fre(e)||mre(e)||lO(e)||hre()}var Kn=e=>typeof e=="number"&&!Number.isNaN(e),ti=e=>typeof e=="string",kt=e=>e!==null&&typeof e=="object",cr=e=>typeof e=="function",gre=e=>zr(e)&&cr(e.then),vF=e=>typeof e!="object"&&!cr(e)||e===null,lb=e=>kt(e)&&"propertyName"in e&&ti(e.propertyName),_x=B(_()),y4=(e,t)=>{let r={...e};return Object.keys(t).forEach(n=>{t[n]._default?r[n]||(r[n]={}):r[n]=y4(r[n],t[n])}),r},uO=(e={},...t)=>t.filter(r=>!!r).reduce((r,n)=>(Object.keys(n).forEach(a=>{let o=e[a],l=n[a];if(o)if(kt(l))r[a]=uO(o,r[a],l);else{let{_default:u}=o;u&&(r[a]=r[a]||{},r[a][u]=Z(r[a][u],l))}else r[a]=Z(r[a],l)}),r),{}),vre=(e,...t)=>_x.useMemo(()=>uO.apply(void 0,[e].concat(t)),[e].concat(t)),bre=(...e)=>e.filter(t=>!!t).reduce((t,r={})=>(Object.keys(r).forEach(n=>{t[n]={...t[n],...r[n]}}),t),{}),yre=(...e)=>_x.useMemo(()=>bre.apply(void 0,e),[].concat(e)),Ge=(e,t="root")=>_x.useMemo(()=>e?{[t]:e}:void 0,[e,t]),w4=(e,t)=>cr(e)?e(t):e,Ct=(e,t,r,n)=>{let a=e.map(d=>d?w4(d,r):void 0),o=t.map(d=>d?w4(d,r):void 0),l=vre.apply(void 0,[n].concat(Zr(a))),u=yre.apply(void 0,Zr(o));return _x.useMemo(()=>n?[y4(l,n),y4(u,n)]:[l,u],[l,u,n])},wre=B(_());function xre(){}var{resetWarned:q$e}=Ia,Ere=wre.createContext({}),cO=()=>{let e=()=>{};return e.deprecated=xre,e},Bh=cO,dO=B(_()),Gc="ant",Nx="anticon",bF=["outlined","borderless","filled","underlined"],kre=(e,t)=>t||(e?`${Gc}-${e}`:Gc),st=dO.createContext({getPrefixCls:kre,iconPrefixCls:Nx}),{Consumer:W$e}=st,AP={};function xt(e){let t=dO.useContext(st),{getPrefixCls:r,direction:n,getPopupContainer:a,renderEmpty:o}=t,l=t[e];return{classNames:AP,styles:AP,...l,getPrefixCls:r,direction:n,getPopupContainer:a,renderEmpty:o}}var BP=B(_());function Cre(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var rb=Cre,Sre=B(_()),Fre=B(_());function x4(e){return e.join("%")}var IP=0,$re=class{constructor(e){ie(this,"instanceId"),ie(this,"cache",new Map),ie(this,"updateTimes",new Map),ie(this,"extracted",new Set),this.instanceId=e}get(e){return this.opGet(x4(e))}opGet(e){return this.cache.get(e)||null}update(e,t){return this.opUpdate(x4(e),t)}opUpdate(e,t){let r=this.cache.get(e),n=t(r);n===null?(this.cache.delete(e),this.updateTimes.delete(e)):(this.cache.set(e,n),this.updateTimes.set(e,IP),IP+=1)}},Dre=$re,Px="data-token-hash",dl="data-css-hash",Wc="__cssinjs_instance__";function Are(){let e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){let t=document.body.querySelectorAll(`style[${dl}]`)||[],{firstChild:r}=document.head;Array.from(t).forEach(a=>{a[Wc]||(a[Wc]=e),a[Wc]===e&&document.head.insertBefore(a,r)});let n={};Array.from(document.querySelectorAll(`style[${dl}]`)).forEach(a=>{let o=a.getAttribute(dl);n[o]?a[Wc]===e&&a.parentNode?.removeChild(a):n[o]=!0})}return new Dre(e)}var Bre=Fre.createContext({hashPriority:"low",cache:Are(),defaultCache:!0,autoPrefix:!1}),Jc=Bre,Ire="CALC_UNIT",V$e=new RegExp(Ire,"g");function Mre(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var E4=class k4{constructor(){ie(this,"cache"),ie(this,"keys"),ie(this,"cacheCallTimes"),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,r=!1){let n={map:this.cache};return t.forEach(a=>{n?n=n?.map?.get(a):n=void 0}),n?.value&&r&&(n.value[1]=this.cacheCallTimes++),n?.value}get(t){return this.internalGet(t,!0)?.[0]}has(t){return!!this.internalGet(t)}set(t,r){if(!this.has(t)){if(this.size()+1>k4.MAX_CACHE_SIZE+k4.MAX_CACHE_OFFSET){let[a]=this.keys.reduce((o,l)=>{let[,u]=o;return this.internalGet(l)[1]<u?[l,this.internalGet(l)[1]]:o},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(t)}let n=this.cache;t.forEach((a,o)=>{if(o===t.length-1)n.set(a,{value:[r,this.cacheCallTimes++]});else{let l=n.get(a);l?l.map||(l.map=new Map):n.set(a,{map:new Map}),n=n.get(a).map}})}deleteByPath(t,r){let n=t.get(r[0]);if(r.length===1)return n.map?t.set(r[0],{map:n.map}):t.delete(r[0]),n.value?.[0];let a=this.deleteByPath(n.map,r.slice(1));return(!n.map||n.map.size===0)&&!n.value&&t.delete(r[0]),a}delete(t){if(this.has(t))return this.keys=this.keys.filter(r=>!Mre(r,t)),this.deleteByPath(this.cache,t)}};ie(E4,"MAX_CACHE_SIZE",20),ie(E4,"MAX_CACHE_OFFSET",5);var Tre=E4,MP=0,pO=class{constructor(e){ie(this,"derivatives"),ie(this,"id"),this.derivatives=Array.isArray(e)?e:[e],this.id=MP,e.length===0&&e.length>0,MP+=1}getDerivativeToken(e){return this.derivatives.reduce((t,r)=>r(e,t),void 0)}},G8=new Tre;function Ch(e){let t=Array.isArray(e)?e:[e];return G8.has(t)||G8.set(t,new pO(t)),G8.get(t)}var jre=new WeakMap,K8={};function _re(e,t){let r=jre;for(let n=0;n<t.length;n+=1){let a=t[n];r.has(a)||r.set(a,new WeakMap),r=r.get(a)}return r.has(K8)||r.set(K8,e()),r.get(K8)}var TP=new WeakMap;function Yv(e){let t=TP.get(e)||"";return t||(Object.keys(e).forEach(r=>{let n=e[r];t+=r,n instanceof pO?t+=n.id:n&&typeof n=="object"?t+=Yv(n):t+=n}),t=rb(t),TP.set(e,t)),t}function Nre(e,t){return rb(`${t}_${Yv(e)}`)}var U$e=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),C4=Ya();function ue(e){return typeof e=="number"?`${e}px`:e}function Sx(e,t,r,n={},a=!1){if(a)return e;let o={...n,[Px]:t,[dl]:r};return`<style ${Object.keys(o).map(l=>{let u=o[l];return u?`${l}="${u}"`:null}).filter(l=>l).join(" ")}>${e}</style>`}function fO(e){let{hashCls:t,hashPriority:r="low"}=e||{};if(!t)return"";let n=`.${t}`;return r==="low"?`:where(${n})`:n}var Pre=e=>e!=null;function yF(e,t){let r=typeof t=="function"?t():t;return r?{...e,csp:{...e.csp,nonce:r}}:e}var hx=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),Rre=(e,t,r)=>{let{hashCls:n,hashPriority:a="low",scope:o}=r||{};if(!Object.keys(e).length)return"";let l=`${fO({hashCls:n,hashPriority:a})}.${t}`,u=[o].flat().filter(Boolean);return`${u.length?u.map(d=>`${l}.${d}`).join(", "):l}{${Object.entries(e).map(([d,p])=>`${d}:${p};`).join("")}}`},mO=(e,t,r)=>{let{hashCls:n,hashPriority:a="low",prefix:o,unitless:l,ignore:u,preserve:d}=r||{},p={},m={};return Object.entries(e).forEach(([v,g])=>{if(d?.[v])m[v]=g;else if((typeof g=="string"||typeof g=="number")&&!u?.[v]){let b=hx(v,o);p[b]=typeof g=="number"&&!l?.[v]?`${g}px`:String(g),m[v]=`var(${b})`}}),[m,Rre(p,t,{scope:r?.scope,hashCls:n,hashPriority:a})]},jP=B(_()),Ore=B(_());function zre(){return!1}var Lre=zre,rx=new Map;function wF(e,t,r,n,a){let{cache:o}=jP.useContext(Jc),l=[e,...t],u=x4(l),d=Lre(),p=v=>{o.opUpdate(u,g=>{let[b=0,x]=g||[void 0,void 0],y=x||r(),E=[b,y];return v?v(E):E})};jP.useMemo(()=>{p()},[u]);let m=o.opGet(u)[1];return(0,Ore.useInsertionEffect)(()=>(p(([v,g])=>[v+1,g]),rx.has(u)||(a?.(m),rx.set(u,!0),Promise.resolve().then(()=>{rx.delete(u)})),()=>{o.opUpdate(u,v=>{let[g=0,b]=v||[];return g-1===0?(n?.(b,!1),rx.delete(u),null):[g-1,b]})}),[u]),m}var Hre={},qre="css",Ap=new Map;function Wre(e){Ap.set(e,(Ap.get(e)||0)+1)}function Vre(e,t){typeof document<"u"&&document.querySelectorAll(`style[${Px}="${e}"]`).forEach(r=>{r[Wc]===t&&r.parentNode?.removeChild(r)})}var Ure=-1;function Gre(e,t){Ap.set(e,(Ap.get(e)||0)-1);let r=new Set;Ap.forEach((n,a)=>{n<=0&&r.add(a)}),Ap.size-r.size>Ure&&r.forEach(n=>{Vre(n,t),Ap.delete(n)})}var Rx=(e,t,r,n)=>{let a={...r.getDerivativeToken(e),...t};return n&&(a=n(a)),a},hO="token";function gO(e,t,r){let{cache:{instanceId:n},container:a,hashPriority:o}=(0,Sre.useContext)(Jc),{salt:l="",override:u=Hre,formatToken:d,getComputedToken:p,cssVar:m,nonce:v}=r,g=_re(()=>Object.assign({},...t),t),b=Yv(g),x=Yv(u),y=Yv(m);return wF(hO,[l,e.id,b,x,y],()=>{let E=p?p(g,u,e):Rx(g,u,e,d),S={...E},F=`${l}_${m.prefix}`,$=rb(F),C=`${qre}-${$}`;S._tokenKey=Nre(S,F);let[D,I]=mO(E,m.key,{prefix:m.prefix,ignore:m.ignore,unitless:m.unitless,preserve:m.preserve,hashPriority:o,hashCls:m.hashed?C:void 0});return D._hashId=$,Wre(m.key),[D,C,S,I,m.key]},([,,,,E])=>{Gre(E,n)},([,,,E,S])=>{if(!E)return;let F={mark:dl,prepend:"queue",attachTo:a,priority:-999};F=yF(F,v);let $=jp(E,rb(`css-var-${S}`),F);$[Wc]=n,$.setAttribute(Px,S)})}var Kre=(e,t,r)=>{let[,,n,a,o]=e,{plain:l}=r||{};if(!a)return null;let u=n._tokenKey,d=-999,p={"data-rc-order":"prependQueue","data-rc-priority":`${d}`},m=Sx(a,o,u,p,l);return[d,u,m]},Xre=B(_()),Qre=B(_()),Yre={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Jre=Yre,un="-ms-",Jv="-moz-",Cr="-webkit-",vO="comm",xF="rule",EF="decl",Zre="@import",ene="@namespace",bO="@keyframes",tne="@layer",rne=Math.abs,Zv=String.fromCharCode,S4=Object.assign;function nne(e,t){return ta(e,0)^45?(((t<<2^ta(e,0))<<2^ta(e,1))<<2^ta(e,2))<<2^ta(e,3):0}function yO(e){return e.trim()}function bu(e,t){return(e=t.exec(e))?e[0]:e}function Ht(e,t,r){return e.replace(t,r)}function X8(e,t){return e.indexOf(t)}function ta(e,t){return e.charCodeAt(t)|0}function Np(e,t,r){return e.slice(t,r)}function xs(e){return e.length}function wO(e){return e.length}function Xv(e,t){return t.push(e),e}function ane(e,t){return e.map(t).join("")}function _P(e,t){return e.filter(function(r){return!bu(r,t)})}var Ox=1,Sh=1,xO=0,Lo=0,Gn=0,Ih="";function zx(e,t,r,n,a,o,l,u){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:Ox,column:Sh,length:l,return:"",siblings:u}}function Hc(e,t){return S4(zx("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function gh(e){for(;e.root;)e=Hc(e.root,{children:[e]});Xv(e,e.siblings)}function ine(){return Gn}function one(){return Gn=Lo>0?ta(Ih,--Lo):0,Sh--,Gn===10&&(Sh=1,Ox--),Gn}function ks(){return Gn=Lo<xO?ta(Ih,Lo++):0,Sh++,Gn===10&&(Sh=1,Ox++),Gn}function Vc(){return ta(Ih,Lo)}function gx(){return Lo}function Lx(e,t){return Np(Ih,e,t)}function nb(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function sne(e){return Ox=Sh=1,xO=xs(Ih=e),Lo=0,[]}function lne(e){return Ih="",e}function Q8(e){return yO(Lx(Lo-1,F4(e===91?e+2:e===40?e+1:e)))}function une(e){for(;(Gn=Vc())&&Gn<33;)ks();return nb(e)>2||nb(Gn)>3?"":" "}function cne(e,t){for(;--t&&ks()&&!(Gn<48||Gn>102||Gn>57&&Gn<65||Gn>70&&Gn<97););return Lx(e,gx()+(t<6&&Vc()==32&&ks()==32))}function F4(e){for(;ks();)switch(Gn){case e:return Lo;case 34:case 39:e!==34&&e!==39&&F4(Gn);break;case 40:e===41&&F4(e);break;case 92:ks();break}return Lo}function dne(e,t){for(;ks()&&e+Gn!==57&&!(e+Gn===84&&Vc()===47););return"/*"+Lx(t,Lo-1)+"*"+Zv(e===47?e:ks())}function pne(e){for(;!nb(Vc());)ks();return Lx(e,Lo)}function NP(e){return lne(vx("",null,null,null,[""],e=sne(e),0,[0],e))}function vx(e,t,r,n,a,o,l,u,d){for(var p=0,m=0,v=l,g=0,b=0,x=0,y=1,E=1,S=1,F=0,$=0,C="",D=a,I=o,M=n,A=C;E;)switch(x=$,$=ks()){case 40:x!=108&&ta(A,v-1)==58?(F++,A+="("):A+=Q8($);break;case 41:F--,A+=")";break;case 34:case 39:case 91:A+=Q8($);break;case 9:case 10:case 13:case 32:if(F>0){A+=Zv($);break}A+=une(x);break;case 92:A+=cne(gx()-1,7);continue;case 47:switch(Vc()){case 42:case 47:Xv(fne(dne(ks(),gx()),t,r,d),d),(nb(x||1)==5||nb(Vc()||1)==5)&&xs(A)&&Np(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*y:u[p++]=xs(A)*S;case 125*y:case 59:case 0:if(F>0&&$){A+=Zv($);break}switch($){case 0:case 125:E=0;case 59+m:S==-1&&(A=Ht(A,/\f/g,"")),b>0&&(xs(A)-v||y===0)&&Xv(b>32?RP(A+";",n,r,v-1,d):RP(Ht(A," ","")+";",n,r,v-2,d),d);break;case 59:A+=";";default:if(Xv(M=PP(A,t,r,p,m,a,u,C,D=[],I=[],v,o),o),$===123)if(m===0)vx(A,t,M,M,D,o,v,u,I);else{switch(g){case 99:if(ta(A,3)===110)break;case 108:if(ta(A,2)===97)break;default:m=0;case 100:case 109:case 115:}m?vx(e,M,M,n&&Xv(PP(e,M,M,0,0,a,u,C,a,D=[],v,I),I),a,I,v,u,n?D:I):vx(A,M,M,M,[""],I,0,u,I)}}p=m=b=0,y=S=1,C=A="",v=l;break;case 58:v=1+xs(A),b=x;default:if(y<1){if($==123)--y;else if($==125&&y++==0&&one()==125)continue}switch(A+=Zv($),$*y){case 38:S=m>0?1:(A+="\f",-1);break;case 44:if(F>0)break;u[p++]=(xs(A)-1)*S,S=1;break;case 64:Vc()===45&&(A+=Q8(ks())),g=Vc(),m=v=xs(C=A+=pne(gx())),$++;break;case 45:x===45&&xs(A)==2&&(y=0)}}return o}function PP(e,t,r,n,a,o,l,u,d,p,m,v){for(var g=a-1,b=a===0?o:[""],x=wO(b),y=0,E=0,S=0;y<n;++y)for(var F=0,$=Np(e,g+1,g=rne(E=l[y])),C=e;F<x;++F)(C=yO(E>0?b[F]+" "+$:Ht($,/&\f/g,b[F])))&&(d[S++]=C);return zx(e,t,r,a===0?xF:u,d,p,m,v)}function fne(e,t,r,n){return zx(e,t,r,vO,Zv(ine()),Np(e,2,-2),0,n)}function RP(e,t,r,n,a){return zx(e,t,r,EF,Np(e,0,n),Np(e,n+1,-1),n,a)}function EO(e,t,r){switch(nne(e,t)){case 5103:return Cr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Cr+e+e;case 4855:return Cr+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Jv+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Cr+e+Jv+e+un+e+e;case 5936:switch(ta(e,t+11)){case 114:return Cr+e+un+Ht(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Cr+e+un+Ht(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Cr+e+un+Ht(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Cr+e+un+e+e;case 6165:return Cr+e+un+"flex-"+e+e;case 5187:return Cr+e+Ht(e,/(\w+).+(:[^]+)/,Cr+"box-$1$2"+un+"flex-$1$2")+e;case 5443:return Cr+e+un+"flex-item-"+Ht(e,/flex-|-self/g,"")+(bu(e,/flex-|baseline/)?"":un+"grid-row-"+Ht(e,/flex-|-self/g,""))+e;case 4675:return Cr+e+un+"flex-line-pack"+Ht(e,/align-content|flex-|-self/g,"")+e;case 5548:return Cr+e+un+Ht(e,"shrink","negative")+e;case 5292:return Cr+e+un+Ht(e,"basis","preferred-size")+e;case 6060:return Cr+"box-"+Ht(e,"-grow","")+Cr+e+un+Ht(e,"grow","positive")+e;case 4554:return Cr+Ht(e,/([^-])(transform)/g,"$1"+Cr+"$2")+e;case 6187:return Ht(Ht(Ht(e,/(zoom-|grab)/,Cr+"$1"),/(image-set)/,Cr+"$1"),e,"")+e;case 5495:case 3959:return Ht(e,/(image-set\([^]*)/,Cr+"$1$`$1");case 4968:return Ht(Ht(e,/(.+:)(flex-)?(.*)/,Cr+"box-pack:$3"+un+"flex-pack:$3"),/space-between/,"justify")+Cr+e+e;case 4200:if(!bu(e,/flex-|baseline/))return un+"grid-column-align"+Np(e,t)+e;break;case 2592:case 3360:return un+Ht(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,a){return t=a,bu(n.props,/grid-\w+-end/)})?~X8(e+(r=r[t].value),"span")?e:un+Ht(e,"-start","")+e+un+"grid-row-span:"+(~X8(r,"span")?bu(r,/\d+/):+bu(r,/\d+/)-+bu(e,/\d+/))+";":un+Ht(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return bu(n.props,/grid-\w+-start/)})?e:un+Ht(Ht(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ht(e,/(.+)-inline(.+)/,Cr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xs(e)-1-t>6)switch(ta(e,t+1)){case 109:if(ta(e,t+4)!==45)break;case 102:return Ht(e,/(.+:)(.+)-([^]+)/,"$1"+Cr+"$2-$3$1"+Jv+(ta(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~X8(e,"stretch")?EO(Ht(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Ht(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,a,o,l,u,d,p){return un+a+":"+o+p+(l?un+a+"-span:"+(u?d:+d-+o)+p:"")+e});case 4949:if(ta(e,t+6)===121)return Ht(e,":",":"+Cr)+e;break;case 6444:switch(ta(e,ta(e,14)===45?18:11)){case 120:return Ht(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Cr+(ta(e,14)===45?"inline-":"")+"box$3$1"+Cr+"$2$3$1"+un+"$2box$3")+e;case 100:return Ht(e,":",":"+un)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ht(e,"scroll-","scroll-snap-")+e}return e}function ab(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function OP(e,t,r,n){switch(e.type){case tne:if(e.children.length)break;case Zre:case ene:case EF:return e.return=e.return||e.value;case vO:return"";case bO:return e.return=e.value+"{"+ab(e.children,n)+"}";case xF:if(!xs(e.value=e.props.join(",")))return""}return xs(r=ab(e.children,n))?e.return=e.value+"{"+r+"}":""}function mne(e){var t=wO(e);return function(r,n,a,o){for(var l="",u=0;u<t;u++)l+=e[u](r,n,a,o)||"";return l}}function hne(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case EF:e.return=EO(e.value,e.length,r);return;case bO:return ab([Hc(e,{value:Ht(e.value,"@","@"+Cr)})],n);case xF:if(e.length)return ane(r=e.props,function(a){switch(bu(a,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":gh(Hc(e,{props:[Ht(a,/:(read-\w+)/,":"+Jv+"$1")]})),gh(Hc(e,{props:[a]})),S4(e,{props:_P(r,n)});break;case"::placeholder":gh(Hc(e,{props:[Ht(a,/:(plac\w+)/,":"+Cr+"input-$1")]})),gh(Hc(e,{props:[Ht(a,/:(plac\w+)/,":"+Jv+"$1")]})),gh(Hc(e,{props:[Ht(a,/:(plac\w+)/,un+"input-$1")]})),gh(Hc(e,{props:[a]})),S4(e,{props:_P(r,n)});break}return""})}}var zP="data-ant-cssinjs-cache-path",kO="_FILE_STYLE__",_p,CO=!0;function gne(){if(!_p&&(_p={},Ya())){let e=document.createElement("div");e.className=zP,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(n=>{let[a,o]=n.split(":");_p[a]=o});let r=document.querySelector(`style[${zP}]`);r&&(CO=!1,r.parentNode?.removeChild(r)),document.body.removeChild(e)}}function vne(e){return gne(),!!_p[e]}function bne(e){let t=_p[e],r=null;if(t&&Ya())if(CO)r=kO;else{let n=document.querySelector(`style[${dl}="${_p[e]}"]`);n?r=n.innerHTML:delete _p[e]}return[r,t]}var yne="_skip_check_",SO="_multi_value_";function bx(e,t){return(t?ab(NP(e),mne([hne,OP])):ab(NP(e),OP)).replace(/\{%%%\:[^;];}/g,";")}function wne(e){return typeof e=="object"&&e&&(yne in e||SO in e)}function LP(e,t,r="high"){if(!t)return e;let n=fO({hashCls:t,hashPriority:r});return e.split(",").map(a=>{let o=a.trim().split(/\s+/),l=o[0]||"",u=l.match(/^\w+/)?.[0]||"";return l=`${u}${n}${l.slice(u.length)}`,[l,...o.slice(1)].join(" ")}).join(",")}var $4=(e,t={},{root:r,injectHash:n,parentSelectors:a}={root:!0,parentSelectors:[]})=>{let{hashId:o,layer:l,path:u,hashPriority:d,transformers:p=[],linters:m=[]}=t,v="",g={};function b(y){let E=y.getName(o);if(!g[E]){let[S]=$4(y.style,t,{root:!1,parentSelectors:a});g[E]=`@keyframes ${y.getName(o)}${S}`}}function x(y,E=[]){return y.forEach(S=>{Array.isArray(S)?x(S,E):S&&E.push(S)}),E}return x(Array.isArray(e)?e:[e]).forEach(y=>{let E=typeof y=="string"&&!r?{}:y;if(typeof E=="string")v+=`${E}
95
- `;else if(E._keyframe)b(E);else{let S=p.reduce((F,$)=>$?.visit?.(F)||F,E);Object.keys(S).forEach(F=>{let $=S[F];if(typeof $=="object"&&$&&(F!=="animationName"||!$._keyframe)&&!wne($)){let C=!1,D=F.trim(),I=!1;(r||n)&&o?D.startsWith("@")?C=!0:D==="&"?D=LP("",o,d):D=LP(F,o,d):r&&!o&&(D==="&"||D==="")&&(D="",I=!0);let[M,A]=$4($,t,{root:I,injectHash:C,parentSelectors:[...a,D]});g={...g,...A},v+=`${D}${M}`}else{let C=function(I,M){let A=I.replace(/[A-Z]/g,P=>`-${P.toLowerCase()}`),j=M;!Jre[I]&&typeof j=="number"&&j!==0&&(j=`${j}px`),I==="animationName"&&M?._keyframe&&(b(M),j=M.getName(o)),v+=`${A}:${j};`},D=$?.value??$;typeof $=="object"&&$?.[SO]&&Array.isArray(D)?D.forEach(I=>{C(F,I)}):Pre(D)&&C(F,D)}})}}),r?l&&(v&&(v=`@layer ${l.name} {${v}}`),l.dependencies&&(g[`@layer ${l.name}`]=l.dependencies.map(y=>`@layer ${y}, ${l.name};`).join(`
96
- `))):v=`{${v}}`,[v,g]};function FO(e,t){return rb(`${e.join("%")}${t}`)}var $O="style";function D4(e,t){let{path:r,hashId:n,layer:a,nonce:o,clientOnly:l,order:u=0}=e,{mock:d,hashPriority:p,container:m,transformers:v,linters:g,cache:b,layer:x,autoPrefix:y}=Qre.useContext(Jc),E=[n||""];x&&E.push("layer"),E.push(...r);let S=C4;wF($O,E,()=>{let F=E.join("|");if(vne(F)){let[A,j]=bne(F);if(A)return[A,j,{},l,u]}let $=t(),[C,D]=$4($,{hashId:n,hashPriority:p,layer:x?a:void 0,path:r.join("-"),transformers:v,linters:g}),I=bx(C,y||!1),M=FO(E,I);return[I,M,D,l,u]},(F,$)=>{let[,C]=F;$&&C4&&tb(C,{mark:dl,attachTo:m})},F=>{let[$,C,D,,I]=F;if(S&&$!==kO){let M={mark:dl,prepend:x?!1:"queue",attachTo:m,priority:I};M=yF(M,o);let A=[],j=[];Object.keys(D).forEach(O=>{O.startsWith("@layer")?A.push(O):j.push(O)}),A.forEach(O=>{jp(bx(D[O],y||!1),`_layer-${O}`,{...M,prepend:!0})});let P=jp($,C,M);P[Wc]=b.instanceId,j.forEach(O=>{jp(bx(D[O],y||!1),`_effect-${O}`,M)})}})}var xne=(e,t,r)=>{let[n,a,o,l,u]=e,{plain:d,autoPrefix:p}=r||{};if(l)return null;let m=n,v={"data-rc-order":"prependQueue","data-rc-priority":`${u}`};return m=Sx(n,void 0,a,v,d),o&&Object.keys(o).forEach(g=>{if(!t[g]){t[g]=!0;let b=bx(o[g],p||!1),x=Sx(b,void 0,`_effect-${g}`,v,d);g.startsWith("@layer")?m=x+m:m+=x}}),[u,a,m]},DO="cssVar",Ene=(e,t)=>{let{key:r,prefix:n,unitless:a,ignore:o,token:l,hashId:u,scope:d,nonce:p}=e,{cache:{instanceId:m},container:v,hashPriority:g}=(0,Xre.useContext)(Jc),{_tokenKey:b}=l,x=Array.isArray(d)?d.join("@@"):d,y=[...e.path,r,x,b];return wF(DO,y,()=>{let E=t(),[S,F]=mO(E,r,{prefix:n,unitless:a,ignore:o,scope:d,hashPriority:g,hashCls:u}),$=FO(y,F);return[S,F,$,r]},([,,E])=>{C4&&tb(E,{mark:dl,attachTo:v})},([,E,S])=>{if(!E)return;let F={mark:dl,prepend:"queue",attachTo:v,priority:-999};F=yF(F,p);let $=jp(E,S,F);$[Wc]=m,$.setAttribute(Px,r)})},kne=(e,t,r)=>{let[,n,a,o]=e,{plain:l}=r||{};if(!n)return null;let u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":`${u}`},p=Sx(n,o,a,d,l);return[u,a,p]},Cne=Ene,G$e={[$O]:xne,[hO]:Kre,[DO]:kne},Sne=class{constructor(e,t){ie(this,"name"),ie(this,"style"),ie(this,"_keyframe",!0),this.name=e,this.style=t}getName(e=""){return e?`${e}-${this.name}`:this.name}},Dt=Sne;function vh(e){return e.notSplit=!0,e}var K$e={inset:["top","right","bottom","left"],insetBlock:["top","bottom"],insetBlockStart:["top"],insetBlockEnd:["bottom"],insetInline:["left","right"],insetInlineStart:["left"],insetInlineEnd:["right"],marginBlock:["marginTop","marginBottom"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],marginInline:["marginLeft","marginRight"],marginInlineStart:["marginLeft"],marginInlineEnd:["marginRight"],paddingBlock:["paddingTop","paddingBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"],paddingInline:["paddingLeft","paddingRight"],paddingInlineStart:["paddingLeft"],paddingInlineEnd:["paddingRight"],borderBlock:vh(["borderTop","borderBottom"]),borderBlockStart:vh(["borderTop"]),borderBlockEnd:vh(["borderBottom"]),borderInline:vh(["borderLeft","borderRight"]),borderInlineStart:vh(["borderLeft"]),borderInlineEnd:vh(["borderRight"]),borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndWidth:["borderBottomWidth"],borderInlineWidth:["borderLeftWidth","borderRightWidth"],borderInlineStartWidth:["borderLeftWidth"],borderInlineEndWidth:["borderRightWidth"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderBlockStartStyle:["borderTopStyle"],borderBlockEndStyle:["borderBottomStyle"],borderInlineStyle:["borderLeftStyle","borderRightStyle"],borderInlineStartStyle:["borderLeftStyle"],borderInlineEndStyle:["borderRightStyle"],borderBlockColor:["borderTopColor","borderBottomColor"],borderBlockStartColor:["borderTopColor"],borderBlockEndColor:["borderBottomColor"],borderInlineColor:["borderLeftColor","borderRightColor"],borderInlineStartColor:["borderLeftColor"],borderInlineEndColor:["borderRightColor"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"]},Fne="6.6.5",$ne=Fne,Dne=B(_()),ub={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Ane={...ub,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
97
- 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
98
- 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,focusOutline:!0,motion:!0},Kc=Ane,Bne={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},ha=Math.round;function Y8(e,t){let r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)n[a]=t(n[a]||0,r[a]||"",a);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}var HP=(e,t,r)=>r===0?e:e/100;function Uv(e,t){let r=t||255;return e>r?r:e<0?0:e}var Ar=class AO{constructor(t){ie(this,"isValid",!0),ie(this,"r",0),ie(this,"g",0),ie(this,"b",0),ie(this,"a",1),ie(this,"_h"),ie(this,"_hsl_s"),ie(this,"_hsv_s"),ie(this,"_l"),ie(this,"_v"),ie(this,"_max"),ie(this,"_min"),ie(this,"_brightness");function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let n=function(o){return a.startsWith(o)},a=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(a))this.fromHexString(a);else if(n("rgb"))this.fromRgbString(a);else if(n("hsl"))this.fromHslString(a);else if(n("hsv")||n("hsb"))this.fromHsvString(a);else{let o=Bne[a.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(t instanceof AO)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Uv(t.r),this.g=Uv(t.g),this.b=Uv(t.b),this.a=typeof t.a=="number"?Uv(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){let r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(o){let l=o/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}let r=t(this.r),n=t(this.g),a=t(this.b);return .2126*r+.7152*n+.0722*a}getHue(){if(typeof this._h>"u"){let t=this.getMax()-this.getMin();t===0?this._h=0:this._h=ha(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s>"u"){let t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){let t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{let r=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*r-1))}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){let r=this.getHue(),n=this.getSaturation(),a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:r,s:n,l:a,a:this.a})}lighten(t=10){let r=this.getHue(),n=this.getSaturation(),a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:r,s:n,l:a,a:this.a})}mix(t,r=50){let n=this._c(t),a=r/100,o=u=>(n[u]-this[u])*a+this[u],l={r:ha(o("r")),g:ha(o("g")),b:ha(o("b")),a:ha(o("a")*100)/100};return this._c(l)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){let r=this._c(t),n=this.a+r.a*(1-this.a),a=o=>ha((this[o]*this.a+r[o]*r.a*(1-this.a))/n);return this._c({r:a("r"),g:a("g"),b:a("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#",r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;let n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;let a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){let o=ha(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let t=this.getHue(),r=ha(this.getHSLSaturation()*100),n=ha(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){let a=this.clone();return a[t]=Uv(r,n),a}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){let r=t.replace("#","");function n(a,o){return parseInt(r[a]+r[o||a],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a}){let o=(t%360+360)%360;if(this._h=o,this._hsl_s=r,this._l=n,this.a=typeof a=="number"?a:1,r<=0){let b=ha(n*255);this.r=b,this.g=b,this.b=b;return}let l=0,u=0,d=0,p=o/60,m=(1-Math.abs(2*n-1))*r,v=m*(1-Math.abs(p%2-1));p>=0&&p<1?(l=m,u=v):p>=1&&p<2?(l=v,u=m):p>=2&&p<3?(u=m,d=v):p>=3&&p<4?(u=v,d=m):p>=4&&p<5?(l=v,d=m):p>=5&&p<6&&(l=m,d=v);let g=n-m/2;this.r=ha((l+g)*255),this.g=ha((u+g)*255),this.b=ha((d+g)*255)}fromHsv({h:t,s:r,v:n,a}){let o=(t%360+360)%360;this._h=o,this._hsv_s=r,this._v=n,this.a=typeof a=="number"?a:1;let l=ha(n*255);if(this.r=l,this.g=l,this.b=l,r<=0)return;let u=o/60,d=Math.floor(u),p=u-d,m=ha(n*(1-r)*255),v=ha(n*(1-r*p)*255),g=ha(n*(1-r*(1-p))*255);switch(d){case 0:this.g=g,this.b=m;break;case 1:this.r=v,this.b=m;break;case 2:this.r=m,this.b=g;break;case 3:this.r=m,this.g=v;break;case 4:this.r=g,this.g=m;break;default:this.g=m,this.b=v;break}}fromHsvString(t){let r=Y8(t,HP);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=Y8(t,HP);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=Y8(t,(n,a)=>a.includes("%")?ha(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}},nx=2,qP=.16,Ine=.05,Mne=.05,Tne=.15,BO=5,IO=4,jne=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function WP(e,t,r){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-nx*t:Math.round(e.h)+nx*t:n=r?Math.round(e.h)+nx*t:Math.round(e.h)-nx*t,n<0?n+=360:n>=360&&(n-=360),n}function VP(e,t,r){if(e.h===0&&e.s===0)return e.s;let n;return r?n=e.s-qP*t:t===IO?n=e.s+qP:n=e.s+Ine*t,n>1&&(n=1),r&&t===BO&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function UP(e,t,r){let n;return r?n=e.v+Mne*t:n=e.v-Tne*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Mh(e,t={}){let r=[],n=new Ar(e),a=n.toHsv();for(let o=BO;o>0;o-=1){let l=new Ar({h:WP(a,o,!0),s:VP(a,o,!0),v:UP(a,o,!0)});r.push(l)}r.push(n);for(let o=1;o<=IO;o+=1){let l=new Ar({h:WP(a,o),s:VP(a,o),v:UP(a,o)});r.push(l)}return t.theme==="dark"?jne.map(({index:o,amount:l})=>new Ar(t.backgroundColor||"#141414").mix(r[o],l).toHexString()):r.map(o=>o.toHexString())}var yx={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},A4=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];A4.primary=A4[5];var B4=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];B4.primary=B4[5];var I4=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];I4.primary=I4[5];var Fh=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Fh.primary=Fh[5];var M4=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];M4.primary=M4[5];var T4=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];T4.primary=T4[5];var j4=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];j4.primary=j4[5];var _4=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];_4.primary=_4[5];var N4=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];N4.primary=N4[5];var P4=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];P4.primary=P4[5];var R4=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];R4.primary=R4[5];var O4=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];O4.primary=O4[5];var z4=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];z4.primary=z4[5];var J8={red:A4,volcano:B4,orange:I4,gold:Fh,yellow:M4,lime:T4,green:j4,cyan:_4,blue:N4,geekblue:P4,purple:R4,magenta:O4,grey:z4},GP=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];GP.primary=GP[5];var KP=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];KP.primary=KP[5];var XP=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];XP.primary=XP[5];var QP=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];QP.primary=QP[5];var YP=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];YP.primary=YP[5];var JP=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];JP.primary=JP[5];var ZP=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];ZP.primary=ZP[5];var eR=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];eR.primary=eR[5];var tR=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];tR.primary=tR[5];var rR=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];rR.primary=rR[5];var nR=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];nR.primary=nR[5];var aR=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];aR.primary=aR[5];var iR=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];iR.primary=iR[5];var bi=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Hx(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){let{colorSuccess:n,colorWarning:a,colorError:o,colorInfo:l,colorPrimary:u,colorBgBase:d,colorTextBase:p}=e,m=t(u),v=t(n),g=t(a),b=t(o),x=t(l),y=r(d,p),E=e.colorLink||e.colorInfo,S=t(E),F=new Ar(b[1]).mix(new Ar(b[3]),50).toHexString(),$={};return bi.forEach(C=>{let D=e[C];if(D){let I=t(D);$[`${C}Hover`]=I[5],$[`${C}Active`]=I[7]}}),{...y,colorPrimaryBg:m[1],colorPrimaryBgHover:m[2],colorPrimaryBorder:m[3],colorPrimaryBorderHover:m[4],colorPrimaryHover:m[5],colorPrimary:m[6],colorPrimaryActive:m[7],colorPrimaryTextHover:m[8],colorPrimaryText:m[9],colorPrimaryTextActive:m[10],colorSuccessBg:v[1],colorSuccessBgHover:v[2],colorSuccessBorder:v[3],colorSuccessBorderHover:v[4],colorSuccessHover:v[4],colorSuccess:v[6],colorSuccessActive:v[7],colorSuccessTextHover:v[8],colorSuccessText:v[9],colorSuccessTextActive:v[10],colorErrorBg:b[1],colorErrorBgHover:b[2],colorErrorBgFilledHover:F,colorErrorBgActive:b[3],colorErrorBorder:b[3],colorErrorBorderHover:b[4],colorErrorHover:b[5],colorError:b[6],colorErrorActive:b[7],colorErrorTextHover:b[8],colorErrorText:b[9],colorErrorTextActive:b[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:x[1],colorInfoBgHover:x[2],colorInfoBorder:x[3],colorInfoBorderHover:x[4],colorInfoHover:x[4],colorInfo:x[6],colorInfoActive:x[7],colorInfoTextHover:x[8],colorInfoText:x[9],colorInfoTextActive:x[10],colorLinkHover:S[4],colorLink:S[6],colorLinkActive:S[7],...$,colorBgMask:new Ar("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}var _ne=e=>{let t=e,r=e,n=e,a=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:a}},Nne=_ne;function Pne(e){let{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:a}=e;return{motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:a+1,...Nne(n)}}var Rne=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},qx=Rne;function Th(e){return(e+8)/e}function One(e){let t=Array.from({length:10}).map((r,n)=>{let a=n-1,o=e*Math.E**(a/5),l=n>1?Math.floor(o):Math.ceil(o);return Math.floor(l/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:Th(r)}))}var zne=e=>{let t=One(e),r=t.map(m=>m.size),n=t.map(m=>m.lineHeight),a=r[1],o=r[0],l=r[2],u=n[1],d=n[0],p=n[2];return{fontSizeSM:o,fontSize:a,fontSizeLG:l,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:u,lineHeightLG:p,lineHeightSM:d,fontHeight:Math.round(u*a),fontHeightLG:Math.round(p*l),fontHeightSM:Math.round(d*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},Wx=zne;function Lne(e){let{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}var Oo=(e,t)=>new Ar(e).setA(t).toRgbString(),bh=(e,t)=>new Ar(e).darken(t).toHexString(),Hne=e=>{let t=Mh(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},qne=(e,t,r)=>{let n=e||"#fff",a=t||"#000";return{colorBgBase:n,colorTextBase:a,colorShadow:r||"#000",colorText:Oo(a,.88),colorTextSecondary:Oo(a,.65),colorTextTertiary:Oo(a,.45),colorTextQuaternary:Oo(a,.25),colorFill:Oo(a,.15),colorFillSecondary:Oo(a,.06),colorFillTertiary:Oo(a,.04),colorFillQuaternary:Oo(a,.02),colorBgSolid:Oo(a,1),colorBgSolidHover:Oo(a,.75),colorBgSolidActive:Oo(a,.95),colorBgLayout:bh(n,4),colorBgContainer:bh(n,0),colorBgElevated:bh(n,0),colorBgSpotlight:Oo(a,.85),colorBgBlur:"transparent",colorBorder:bh(n,15),colorBorderDisabled:bh(n,15),colorBorderSecondary:bh(n,6)}};function jh(e){yx.pink=yx.magenta,J8.pink=J8.magenta;let t=Object.keys(ub).map(r=>{let n=e[r]===yx[r]?J8[r]:Mh(e[r]);return Array.from({length:10},()=>1).reduce((a,o,l)=>(a[`${r}-${l+1}`]=n[l],a[`${r}${l+1}`]=n[l],a),{})}).reduce((r,n)=>(r={...r,...n},r),{});return{...e,...t,...Hx(e,{generateColorPalettes:Hne,generateNeutralColorPalettes:qne}),...Wx(e.fontSize),...Lne(e),...qx(e),...Pne(e)}}var Wne=Ch(jh),cb=Wne,Pp={token:Kc,override:{override:Kc},hashed:!0},db=Dne.default.createContext(Pp);function Z8(e){return e>=0&&e<=255}function Vne(e,t){let{r,g:n,b:a,a:o}=new Ar(e).toRgb();if(o<1)return e;let{r:l,g:u,b:d}=new Ar(t).toRgb();for(let p=.01;p<=1;p+=.01){let m=Math.round((r-l*(1-p))/p),v=Math.round((n-u*(1-p))/p),g=Math.round((a-d*(1-p))/p);if(Z8(m)&&Z8(v)&&Z8(g))return new Ar({r:m,g:v,b:g,a:Math.round(p*100)/100}).toRgbString()}return new Ar({r,g:n,b:a,a:1}).toRgbString()}var Mp=Vne;function Vx(e){let{override:t,...r}=e,n={...t};Object.keys(Kc).forEach(y=>{delete n[y]});let a={...r,...n},o=new Ar(a.colorShadow),l=o.a,u=y=>o.clone().setA(l*y).toRgbString(),d=480,p=576,m=768,v=992,g=1200,b=1600,x=1920;return a.motion===!1&&(a.motionDurationFast="0s",a.motionDurationMid="0s",a.motionDurationSlow="0s"),{...a,colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:Mp(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:Mp(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:Mp(a.colorWarningBg,a.colorBgContainer),colorErrorAffix:a.colorError,colorWarningAffix:a.colorWarning,fontHeight:Math.round(a.fontSize*a.lineHeight),fontHeightSM:Math.round(a.fontSizeSM*a.lineHeightSM),fontHeightLG:Math.round(a.fontSizeLG*a.lineHeightLG),fontSizeIcon:a.fontSizeSM,lineWidthFocus:a.focusOutline===!1?0:a.lineWidth*3,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:Mp(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
99
- 0 6px 16px 0 ${u(.08)},
100
- 0 3px 6px -4px ${u(.12)},
101
- 0 9px 28px 8px ${u(.05)}
102
- `,boxShadowSecondary:`
103
- 0 6px 16px 0 ${u(.08)},
104
- 0 3px 6px -4px ${u(.12)},
105
- 0 9px 28px 8px ${u(.05)}
106
- `,boxShadowTertiary:`
107
- 0 1px 2px 0 ${u(.05)},
108
- 0 1px 6px -1px ${u(.03)},
109
- 0 2px 4px 0 ${u(.03)}
110
- `,screenXS:d,screenXSMin:d,screenXSMax:p-1,screenSM:p,screenSMMin:p,screenSMMax:m-1,screenMD:m,screenMDMin:m,screenMDMax:v-1,screenLG:v,screenLGMin:v,screenLGMax:g-1,screenXL:g,screenXLMin:g,screenXLMax:b-1,screenXXL:b,screenXXLMin:b,screenXXLMax:x-1,screenXXXL:x,screenXXXLMin:x,boxShadowPopoverArrow:`2px 2px 5px ${u(.05)}`,dropShadowPopover:`drop-shadow(0 6px 16px ${u(.08)}) drop-shadow(0 3px 6px ${u(.12)}) drop-shadow(0 9px 28px ${u(.05)})`,boxShadowCard:`
111
- 0 1px 2px -2px ${u(.16)},
112
- 0 3px 6px 0 ${u(.12)},
113
- 0 5px 12px 4px ${u(.09)}
114
- `,boxShadowDrawerRight:`
115
- -6px 0 16px 0 ${u(.08)},
116
- -3px 0 6px -4px ${u(.12)},
117
- -9px 0 28px 8px ${u(.05)}
118
- `,boxShadowDrawerLeft:`
119
- 6px 0 16px 0 ${u(.08)},
120
- 3px 0 6px -4px ${u(.12)},
121
- 9px 0 28px 8px ${u(.05)}
122
- `,boxShadowDrawerUp:`
123
- 0 6px 16px 0 ${u(.08)},
124
- 0 3px 6px -4px ${u(.12)},
125
- 0 9px 28px 8px ${u(.05)}
126
- `,boxShadowDrawerDown:`
127
- 0 -6px 16px 0 ${u(.08)},
128
- 0 -3px 6px -4px ${u(.12)},
129
- 0 -9px 28px 8px ${u(.05)}
130
- `,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px ${u(.08)}`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px ${u(.08)}`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px ${u(.08)}`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px ${u(.08)}`,...n}}var MO={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Une={motionBase:!0,motionUnit:!0},Gne={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},TO=(e,t,r)=>{let n=r.getDerivativeToken(e),{override:a,...o}=t,l={...n,override:a};return l=Vx(l),o&&Object.entries(o).forEach(([u,d])=>{let{theme:p,...m}=d,v=m;p&&(v=TO({...l,...m},{override:m},p)),l[u]=v}),l};function Ma(){let{token:e,hashed:t,theme:r,override:n,cssVar:a,zeroRuntime:o}=BP.default.useContext(db),{csp:l,getPrefixCls:u}=BP.default.useContext(st),d={prefix:a?.prefix??u(),key:a?.key??"css-var-root"},p=`${$ne}-${t||""}`,m=r||cb,[v,g,b]=gO(m,[Kc,e],{salt:p,override:n,getComputedToken:TO,cssVar:{...d,unitless:MO,ignore:Une,preserve:Gne},nonce:l?.nonce});return[m,b,t?g:"",v,d,!!o]}function Cs(e){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function Kne(e){if(Array.isArray(e))return e}function Xne(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,l,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(m){p=!0,a=m}finally{try{if(!d&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(p)throw a}}return u}}function Qne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
131
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kF(e,t){return Kne(e)||Xne(e,t)||lO(e,t)||Qne()}function Yne(e,t){if(Cs(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jO(e){var t=Yne(e,"string");return Cs(t)=="symbol"?t:t+""}function zo(e,t,r){return(t=jO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(r),!0).forEach(function(n){zo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Jne=B(_());function xu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jO(n.key),n)}}function Eu(e,t,r){return t&&sR(e.prototype,t),r&&sR(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eb(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L4(e,t){return L4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},L4(e,t)}function pb(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L4(e,t)}function Xc(e){return Xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xc(e)}function fb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fb=function(){return!!e})()}function Ux(e,t){if(t&&(Cs(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eb(e)}function _O(e){var t=fb();return function(){var r,n=Xc(e);if(t){var a=Xc(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Ux(this,r)}}var Zne=Eu(function e(){xu(this,e)}),NO=Zne,PO="CALC_UNIT",eae=new RegExp(PO,"g");function e4(e){return typeof e=="number"?"".concat(e).concat(PO):e}var tae=(function(e){pb(r,e);var t=_O(r);function r(n,a){var o;xu(this,r),o=t.call(this),zo(eb(o),"result",""),zo(eb(o),"unitlessCssVar",void 0),zo(eb(o),"lowPriority",void 0);var l=Cs(n);return o.unitlessCssVar=a,n instanceof r?o.result="(".concat(n.result,")"):l==="number"?o.result=e4(n):l==="string"&&(o.result=n),o}return Eu(r,[{key:"add",value:function(n){return n instanceof r?this.result="".concat(this.result," + ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," + ").concat(e4(n))),this.lowPriority=!0,this}},{key:"sub",value:function(n){return n instanceof r?this.result="".concat(this.result," - ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," - ").concat(e4(n))),this.lowPriority=!0,this}},{key:"mul",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," * ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," * ").concat(n)),this.lowPriority=!1,this}},{key:"div",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," / ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," / ").concat(n)),this.lowPriority=!1,this}},{key:"getResult",value:function(n){return this.lowPriority||n?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(n){var a=this,o=n||{},l=o.unit,u=!0;return typeof l=="boolean"?u=l:Array.from(this.unitlessCssVar).some(function(d){return a.result.includes(d)})&&(u=!1),this.result=this.result.replace(eae,u?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r})(NO),rae=(function(e){pb(r,e);var t=_O(r);function r(n){var a;return xu(this,r),a=t.call(this),zo(eb(a),"result",0),n instanceof r?a.result=n.result:typeof n=="number"&&(a.result=n),a}return Eu(r,[{key:"add",value:function(n){return n instanceof r?this.result+=n.result:typeof n=="number"&&(this.result+=n),this}},{key:"sub",value:function(n){return n instanceof r?this.result-=n.result:typeof n=="number"&&(this.result-=n),this}},{key:"mul",value:function(n){return n instanceof r?this.result*=n.result:typeof n=="number"&&(this.result*=n),this}},{key:"div",value:function(n){return n instanceof r?this.result/=n.result:typeof n=="number"&&(this.result/=n),this}},{key:"equal",value:function(){return this.result}}]),r})(NO),nae=rae,aae=function(e,t){var r=e==="css"?tae:nae;return function(n){return new r(n,t)}},iae=aae,oae=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))},lR=oae;function sae(e,t,r,n){var a=zi({},t[e]);if(n!=null&&n.deprecatedTokens){var o=n.deprecatedTokens;o.forEach(function(u){var d=kF(u,2),p=d[0],m=d[1];if(a!=null&&a[p]||a!=null&&a[m]){var v;(v=a[m])!==null&&v!==void 0||(a[m]=a?.[p])}})}var l=zi(zi({},r),a);return Object.keys(l).forEach(function(u){l[u]===t[u]&&delete l[u]}),l}var uR=sae,RO=typeof CSSINJS_STATISTIC<"u",H4=!0;function yt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!RO)return Object.assign.apply(Object,[{}].concat(t));H4=!1;var n={};return t.forEach(function(a){if(Cs(a)==="object"){var o=Object.keys(a);o.forEach(function(l){Object.defineProperty(n,l,{configurable:!0,enumerable:!0,get:function(){return a[l]}})})}}),H4=!0,n}var cR={};function lae(){}var uae=function(e){var t,r=e,n=lae;return RO&&typeof Proxy<"u"&&(t=new Set,r=new Proxy(e,{get:function(a,o){if(H4){var l;(l=t)===null||l===void 0||l.add(o)}return a[o]}}),n=function(a,o){var l;cR[a]={global:Array.from(t),component:zi(zi({},(l=cR[a])===null||l===void 0?void 0:l.component),o)}}),{token:r,keys:t,flush:n}},cae=uae;function dae(e,t,r){if(typeof r=="function"){var n;return r(yt(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}var dR=dae;function pae(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"max(".concat(r.map(function(a){return ue(a)}).join(","),")")},min:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"min(".concat(r.map(function(a){return ue(a)}).join(","),")")}}}var fae=pae,mae=B(_()),hae=1e3*60*10,gae=(function(){function e(){xu(this,e),zo(this,"map",new Map),zo(this,"objectIDMap",new WeakMap),zo(this,"nextID",0),zo(this,"lastAccessBeat",new Map),zo(this,"accessBeat",0)}return Eu(e,[{key:"set",value:function(t,r){this.clear();var n=this.getCompositeKey(t);this.map.set(n,r),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(t){var r=this.getCompositeKey(t),n=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(t){var r=this,n=t.map(function(a){return a&&Cs(a)==="object"?"obj_".concat(r.getObjectID(a)):"".concat(Cs(a),"_").concat(a)});return n.join("|")}},{key:"getObjectID",value:function(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);var r=this.nextID;return this.objectIDMap.set(t,r),this.nextID+=1,r}},{key:"clear",value:function(){var t=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(n,a){r-n>hae&&(t.map.delete(a),t.lastAccessBeat.delete(a))}),this.accessBeat=0}}}]),e})(),pR=new gae;function vae(e,t){return mae.default.useMemo(function(){var r=pR.get(t);if(r)return r;var n=e();return pR.set(t,n),n},t)}var bae=vae,yae=function(){return{}},wae=yae;function xae(e){var t=e.useCSP,r=t===void 0?wae:t,n=e.useToken,a=e.usePrefix,o=e.getResetStyles,l=e.getCommonStyle,u=e.getCompUnitless;function d(g,b,x,y){var E=Array.isArray(g)?g[0]:g;function S(A){return"".concat(String(E)).concat(A.slice(0,1).toUpperCase()).concat(A.slice(1))}var F=y?.unitless||{},$=typeof u=="function"?u(g):{},C=zi(zi({},$),{},zo({},S("zIndexPopup"),!0));Object.keys(F).forEach(function(A){C[S(A)]=F[A]});var D=zi(zi({},y),{},{unitless:C,prefixToken:S}),I=m(g,b,x,D),M=p(E,x,D);return function(A){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A,P=I(A,j),O=y?.extraCssVarPrefixCls,V=typeof O=="function"?O({prefixCls:A,rootCls:j}):O,W=M(V!=null&&V.length?[j].concat(Zr(V)):j);return[P,W]}}function p(g,b,x){var y=x.unitless,E=x.prefixToken,S=x.ignore;return function(F){var $=n(),C=$.cssVar,D=$.realToken,I=r();return Cne({path:[g],prefix:C.prefix,key:C.key,unitless:y,ignore:S,token:D,scope:F,nonce:function(){return I.nonce}},function(){var M=dR(g,D,b),A=uR(g,D,M,{deprecatedTokens:x?.deprecatedTokens});return M&&Object.keys(M).forEach(function(j){A[E(j)]=A[j],delete A[j]}),A}),C?.key}}function m(g,b,x){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},E=Array.isArray(g)?g:[g,g],S=kF(E,1),F=S[0],$=E.join("-"),C=e.layer||{name:"antd"};return function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:D,M=n(),A=M.theme,j=M.realToken,P=M.hashId,O=M.token,V=M.cssVar,W=M.zeroRuntime,H=(0,Jne.useMemo)(function(){return W},[]);if(H)return P;var q=a(),z=q.rootPrefixCls,L=q.iconPrefixCls,U=r(),Y="css",X=bae(function(){var Q=new Set;return Object.keys(y.unitless||{}).forEach(function(ee){Q.add(hx(ee,V.prefix)),Q.add(hx(ee,lR(F,V.prefix)))}),iae(Y,Q)},[Y,F,V?.prefix]),J=fae(Y),N=J.max,R=J.min,K={theme:A,token:O,hashId:P,nonce:function(){return U.nonce},clientOnly:y.clientOnly,layer:C,order:y.order||-999};return typeof o=="function"&&D4(zi(zi({},K),{},{clientOnly:!1,path:["Shared",z]}),function(){return o(O,{prefix:{rootPrefixCls:z,iconPrefixCls:L},csp:U})}),D4(zi(zi({},K),{},{path:[$,D,L]}),function(){if(y.injectStyle===!1)return[];var Q=cae(O),ee=Q.token,te=Q.flush,ne=dR(F,j,x),me=".".concat(D),se=uR(F,j,ne,{deprecatedTokens:y.deprecatedTokens});ne&&Cs(ne)==="object"&&Object.keys(ne).forEach(function(Ae){ne[Ae]="var(".concat(hx(Ae,lR(F,V.prefix)),")")});var he=yt(ee,{componentCls:me,prefixCls:D,iconCls:".".concat(L),antCls:".".concat(z),calc:X,max:N,min:R},ne),le=b(he,{hashId:P,prefixCls:D,rootPrefixCls:z,iconPrefixCls:L});te(F,se);var ke=typeof l=="function"?l(he,D,I,y.resetFont):null;return[y.resetStyle===!1?null:ke,le]}),P}}function v(g,b,x){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},E=m(g,b,x,zi({resetStyle:!1,order:-998},y)),S=function(F){var $=F.prefixCls,C=F.rootCls,D=C===void 0?$:C;return E($,D),null};return S}return{genStyleHooks:d,genSubStyleComponent:v,genComponentStyleHook:m}}var OO=xae,fR=B(_()),fl={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Tt=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Rp=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block",verticalAlign:"inherit"}}),Eae=new Dt("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),_h=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),yi=(e,t)=>({outline:`${ue(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(r=>`${r} 0s`).join(", ")}),Xn=(e,t)=>({"&:focus-visible":yi(e,t)}),kae=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...Xn(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Cae=(e,t,r,n)=>{let a=`[class^="${t}"], [class*=" ${t}"]`,o=r?`.${r}`:a,l={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},u={};return n!==!1&&(u={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:{...u,...l,[a]:l}}},zO=e=>({[`.${e}`]:{...Rp(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:Eae,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),Gx=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...Xn(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:pt,genComponentStyleHook:CF,genSubStyleComponent:Nh}=OO({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,fR.useContext)(st);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,r,n,a,o]=Ma();return{theme:e,realToken:t,hashId:r,token:n,cssVar:a,zeroRuntime:o}},useCSP:()=>{let{csp:e}=(0,fR.useContext)(st);return e??{}},getResetStyles:(e,t)=>{let r=kae(e);return[r,{"&":r},zO(t?.prefix.iconPrefixCls??Nx)]},getCommonStyle:Cae,getCompUnitless:()=>MO}),bn=(e,t)=>{let r=`--${e.replace(/\./g,"")}-${t}-`;return[n=>`${r}${n}`,(n,a)=>a?`var(${r}${n}, ${a})`:`var(${r}${n})`]};function Zc(e,t){return bi.reduce((r,n)=>{let a=e[`${n}1`],o=e[`${n}3`],l=e[`${n}6`],u=e[`${n}7`];return{...r,...t(n,{lightColor:a,lightBorderColor:o,darkColor:l,textColor:u})}},{})}var Sae=(e,t)=>{let[r,n]=Ma();return D4({theme:r,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>zO(e))},Fae=Sae,t4=B(_()),$ae=B(_()),Dae=(0,$ae.createContext)(void 0),SF=Dae,Aae={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},LO=Aae,Bae={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},Iae={...Bae,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},Mae=Iae,Tae={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},HO=Tae,jae={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...Mae},timePickerLocale:{...HO}},FF=jae,qO=FF,ho="${label} is not a valid ${type}",_ae={locale:"en",Pagination:LO,DatePicker:FF,TimePicker:HO,Calendar:qO,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ho,method:ho,array:ho,object:ho,number:ho,date:ho,boolean:ho,integer:ho,float:ho,regexp:ho,email:ho,url:ho,hex:ho},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},yu=_ae,Nae=(e,t)=>{let r=t4.useContext(SF),n=t4.useMemo(()=>{let o=t||yu[e],l=r?.[e]??{};return{...cr(o)?o():o,...l||{}}},[e,t,r]),a=t4.useMemo(()=>{let o=r?.locale;return r?.exist&&!o?yu.locale:o},[r]);return[n,a]},Op=Nae,r4=B(_()),wx={...yu.Modal},xx=[],mR=()=>xx.reduce((e,t)=>({...e,...t}),yu.Modal);function Pae(e){if(e){let t={...e};return xx.push(t),wx=mR(),()=>{xx=xx.filter(r=>r!==t),wx=mR()}}wx={...yu.Modal}}function Rae(){return wx}var Oae="internalMark",zae=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e;r4.useEffect(()=>Pae(t?.Modal),[t]);let a=r4.useMemo(()=>({...t,exist:!0}),[t]);return r4.createElement(SF.Provider,{value:a},r)},Lae=zae,Fx=B(_());function mb(e){return e&&Fx.default.isValidElement(e)&&e.type===Fx.default.Fragment}var Kx=(e,t,r)=>Fx.default.isValidElement(e)?Fx.default.cloneElement(e,cr(r)?r(e.props||{}):r):t;function Sr(e,t){return Kx(e,e,t)}var hR=B(_()),$p=B(_()),Hae=B(Jt()),qae=B(_()),Wae=qae.createContext(null),WO=Wae,gR=!1;function Vae(e){return typeof e=="boolean"&&(gR=e),gR}var ax=B(_()),vR=[];function Uae(e,t){let[r]=ax.useState(()=>Ya()?document.createElement("div"):null),n=ax.useRef(!1),a=ax.useContext(WO),[o,l]=ax.useState(vR),u=a||(n.current?void 0:m=>{l(v=>[m,...v])});function d(){r.parentElement||document.body.appendChild(r),n.current=!0}function p(){r.parentElement?.removeChild(r),n.current=!1}return or(()=>(e?a?a(d):d():p(),p),[e]),or(()=>{o.length&&(o.forEach(m=>m()),l(vR))},[o]),[r,u]}var Gae=B(_());function Kae(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Xae=`rc-util-locker-${Date.now()}`,bR=0;function Qae(e){let t=!!e,[r]=Gae.useState(()=>(bR+=1,`${Xae}_${bR}`));or(()=>{if(t){let n=Kte(document.body).width,a=Kae();jp(`
132
- html body {
133
- overflow-y: hidden;
134
- ${a?`width: calc(100% - ${n}px);`:""}
135
- }`,r)}else tb(r);return()=>{tb(r)}},[t,r])}var yR=B(_()),Tp=[],Yae=200,VO=0,UO=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-VO<Yae)return;let t=Tp.length;for(let r=t-1;r>=0;r-=1)Tp[r].onEsc({top:r===t-1,event:e})}},GO=()=>{VO=Date.now()};function Jae(){window.addEventListener("keydown",UO),window.addEventListener("compositionend",GO)}function Zae(){Tp.length===0&&(window.removeEventListener("keydown",UO),window.removeEventListener("compositionend",GO))}function eie(e,t){let r=pl(),n=wt(t),a=()=>{Tp.find(l=>l.id===r)||Tp.push({id:r,onEsc:n})},o=()=>{Tp=Tp.filter(l=>l.id!==r)};(0,yR.useMemo)(()=>{e?a():e||o()},[e]),(0,yR.useEffect)(()=>{if(e)return a(),Jae(),()=>{o(),Zae()}},[e])}var wR=e=>e===!1?!1:!Ya()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,tie=$p.forwardRef((e,t)=>{let{open:r,autoLock:n,getContainer:a,debug:o,autoDestroy:l=!0,children:u,onEsc:d}=e,[p,m]=$p.useState(r),v=p||r;$p.useEffect(()=>{(l||r)&&m(r)},[r,l]);let[g,b]=$p.useState(()=>wR(a));$p.useEffect(()=>{let D=wR(a);b(()=>D??null)});let[x,y]=Uae(v&&!g,o),E=g??x;Qae(n&&r&&Ya()&&(E===x||E===document.body)),eie(r,d);let S=null;u&&wu(u)&&t&&(S=Hi(u));let F=Za(S,t);if(!v||!Ya()||g===void 0)return null;let $=E===!1||Vae(),C=u;return t&&(C=$p.cloneElement(u,{ref:F})),$p.createElement(WO.Provider,{value:y},$?C:(0,Hae.createPortal)(C,E))}),rie=tie,Xx=rie,KO=B(_()),wh=B(_()),xh=B(_()),q4=xh.createContext(null);function nie({children:e,onBatchResize:t}){let r=xh.useRef(0),n=xh.useRef([]),a=xh.useContext(q4),o=xh.useCallback((l,u,d)=>{r.current+=1;let p=r.current;n.current.push({size:l,element:u,data:d}),Promise.resolve().then(()=>{p===r.current&&(t?.(n.current),n.current=[])}),a?.(l,u,d)},[t,a]);return xh.createElement(q4.Provider,{value:o},e)}var n4=B(_()),Uc=new Map;function aie(e){e.forEach(t=>{let{target:r}=t;Uc.get(r)?.forEach(n=>n(r))})}var a4;function XO(){return a4||(a4=new ResizeObserver(aie)),a4}function iie(e,t){Uc.has(e)||(Uc.set(e,new Set),XO().observe(e)),Uc.get(e).add(t)}function oie(e,t){Uc.has(e)&&(Uc.get(e).delete(t),Uc.get(e).size||(XO().unobserve(e),Uc.delete(e)))}function QO(e,t,r,n){let a=n4.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),o=wt(d=>{let{width:p,height:m}=d.getBoundingClientRect(),{offsetWidth:v,offsetHeight:g}=d,b=Math.floor(p),x=Math.floor(m);if(a.current.width!==b||a.current.height!==x||a.current.offsetWidth!==v||a.current.offsetHeight!==g){let y={width:b,height:x,offsetWidth:v,offsetHeight:g};a.current=y;let E=v===Math.round(p)?p:v,S=g===Math.round(m)?m:g,F={...y,offsetWidth:E,offsetHeight:S};n?.(F,d),Promise.resolve().then(()=>{r?.(F,d)})}}),l=typeof t=="function",u=n4.useRef(0);n4.useEffect(()=>{let d=l?t():t;return d&&e?iie(d,o):e&&l&&(u.current+=1),()=>{d&&oie(d,o)}},[e,l?u.current:t])}function sie(e,t){let{children:r,disabled:n,onResize:a,data:o}=e,l=wh.useRef(null),u=wh.useContext(q4),d=typeof r=="function",p=d?r(l):r,m=!d&&wh.isValidElement(p)&&wu(p),v=m?Hi(p):null,g=Za(v,l),b=()=>Ix(l.current);return wh.useImperativeHandle(t,()=>b()),QO(!n,b,a,(x,y)=>{u?.(x,y,o)}),m?wh.cloneElement(p,{ref:g}):p}var lie=wh.forwardRef(sie),uie=lie;function W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W4.apply(this,arguments)}var cie="rc-observer-key";function die(e,t){let{children:r}=e;return(typeof r=="function"?[r]:xr(r)).map((n,a)=>{let o=n?.key||`${cie}-${a}`;return KO.createElement(uie,W4({},e,{key:o,ref:a===0?t:void 0}),n)})}var YO=KO.forwardRef(die);YO.Collection=nie;var Ta=YO,Jr=B(_()),zc=B(_()),pie=B(_()),V4=B(_()),JO=V4.createContext({}),fie=e=>{let{children:t,...r}=e,n=V4.useMemo(()=>({motion:r.motion}),[r.motion]);return V4.createElement(JO.Provider,{value:n},t)},mie=fie,ix=B(_()),Dp=B(_()),cl="none",ox="appear",sx="enter",lx="leave",xR="none",Es="prepare",Bp="start",Ip="active",ZO="prepared",hie=B(_()),gie=B(_());function ER(e,t){let r={};return r[e.toLowerCase()]=t.toLowerCase(),r[`Webkit${e}`]=`webkit${t}`,r[`Moz${e}`]=`moz${t}`,r[`ms${e}`]=`MS${t}`,r[`O${e}`]=`o${t.toLowerCase()}`,r}function vie(e,t){let r={animationend:ER("Animation","AnimationEnd"),transitionend:ER("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var bie=vie(Ya(),typeof window<"u"?window:{}),ez={};Ya()&&({style:ez}=document.createElement("div"));var ux={};function tz(e){if(ux[e])return ux[e];let t=bie[e];if(t){let r=Object.keys(t),n=r.length;for(let a=0;a<n;a+=1){let o=r[a];if(Object.prototype.hasOwnProperty.call(t,o)&&o in ez)return ux[e]=t[o],ux[e]}}return""}var rz=tz("animationend"),nz=tz("transitionend"),az=!!(rz&&nz),kR=rz||"animationend",CR=nz||"transitionend";function SR(e,t){if(!e)return null;if(typeof e=="object"){let r=t.replace(/-\w/g,n=>n[1].toUpperCase());return e[r]}return`${e}-${t}`}var yie=(e=>{let t=(0,gie.useRef)();function r(a){a&&(a.removeEventListener(CR,e),a.removeEventListener(kR,e))}function n(a){t.current&&t.current!==a&&r(t.current),a&&a!==t.current&&(a.addEventListener(CR,e),a.addEventListener(kR,e),t.current=a)}return hie.useEffect(()=>()=>{r(t.current),t.current=null},[]),[n,r]}),FR=B(_()),wie=Ya()?FR.useLayoutEffect:FR.useEffect,iz=wie,xie=B(_()),$R=B(_()),Eie=(()=>{let e=$R.useRef(null);function t(){vr.cancel(e.current)}function r(n,a=2){t();let o=vr(()=>{a<=1?n({isCanceled:()=>o!==e.current}):r(n,a-1)});e.current=o}return $R.useEffect(()=>()=>{t()},[]),[r,t]}),kie=[Es,Bp,Ip,"end"],Cie=[Es,ZO],oz=!1,Sie=!0;function sz(e){return e===Ip||e==="end"}var Fie=((e,t,r)=>{let[n,a]=GR(xR),[o,l]=Eie();function u(){a(Es,!0)}let d=t?Cie:kie;return iz(()=>{if(n!==xR&&n!=="end"){let p=d.indexOf(n),m=d[p+1],v=r(n);v===oz?a(m,!0):m&&o(g=>{function b(){g.isCanceled()||a(m,!0)}v===!0?b():Promise.resolve(v).then(b)})}},[e,n]),xie.useEffect(()=>()=>{l()},[]),[u,n]});function $ie(e,t,r,{motionEnter:n=!0,motionAppear:a=!0,motionLeave:o=!0,motionDeadline:l,motionLeaveImmediately:u,onAppearPrepare:d,onEnterPrepare:p,onLeavePrepare:m,onAppearStart:v,onEnterStart:g,onLeaveStart:b,onAppearActive:x,onEnterActive:y,onLeaveActive:E,onAppearEnd:S,onEnterEnd:F,onLeaveEnd:$,onVisibleChanged:C}){let[D,I]=ix.useState(),[M,A]=JR(cl),[j,P]=ix.useState([null,null]),O=M(),V=(0,Dp.useRef)(!1),W=(0,Dp.useRef)(null);function H(){return r()}let q=(0,Dp.useRef)(!1);function z(){A(cl),P([null,null])}let L=wt(ne=>{let me=M();if(me===cl)return;let se=H();if(ne&&!ne.deadline&&ne.target!==se)return;let he=q.current,le;me===ox&&he?le=S?.(se,ne):me===sx&&he?le=F?.(se,ne):me===lx&&he&&(le=$?.(se,ne)),he&&le!==!1&&z()}),[U]=yie(L),Y=ne=>{switch(ne){case ox:return{[Es]:d,[Bp]:v,[Ip]:x};case sx:return{[Es]:p,[Bp]:g,[Ip]:y};case lx:return{[Es]:m,[Bp]:b,[Ip]:E};default:return{}}},X=ix.useMemo(()=>Y(O),[O]),[J,N]=Fie(O,!e,ne=>{if(ne===Es){let me=X[Es];return me?me(H()):oz}return ne in X&&P([X[ne]?.(H(),null)||null,ne]),ne===Ip&&O!==cl&&(U(H()),l>0&&(clearTimeout(W.current),W.current=setTimeout(()=>{L({deadline:!0})},l))),ne===ZO&&z(),Sie}),R=sz(N);q.current=R;let K=(0,Dp.useRef)(null);iz(()=>{if(V.current&&K.current===t)return;I(t);let ne=V.current;V.current=!0;let me;!ne&&t&&a&&(me=ox),ne&&t&&n&&(me=sx),(ne&&!t&&o||!ne&&u&&!t&&o)&&(me=lx);let se=Y(me);me&&(e||se[Es])?(A(me),J()):A(cl),K.current=t},[t]),(0,Dp.useEffect)(()=>{(O===ox&&!a||O===sx&&!n||O===lx&&!o)&&A(cl)},[a,n,o]),(0,Dp.useEffect)(()=>()=>{V.current=!1,clearTimeout(W.current)},[]);let Q=ix.useRef(!1);(0,Dp.useEffect)(()=>{D&&(Q.current=!0),D!==void 0&&O===cl&&((Q.current||D)&&C?.(D),Q.current=!0)},[D,O]);let ee=j[0];X[Es]&&N===Bp&&(ee={transition:"none",...ee});let te=j[1];return[M,N,ee,D??t,!V.current&&O===cl&&e&&a?"NONE":N===Bp||N===Ip?te===N:!0]}function lz(e){return e?.length<2}function Die(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function r(a,o){return!!(a.motionName&&t&&o!==!1)}let n=zc.forwardRef((a,o)=>{let{visible:l=!0,removeOnLeave:u=!0,forceRender:d,children:p,motionName:m,leavedClassName:v,eventProps:g}=a,{motion:b}=zc.useContext(JO),x=r(a,b),y=(0,pie.useRef)();function E(){return Ix(y.current)}let[S,F,$,C,D]=$ie(x,l,E,a),I=S(),M=zc.useRef(C);C&&(M.current=!0);let A=zc.useMemo(()=>{let O={};return Object.defineProperties(O,{nativeElement:{enumerable:!0,get:E},inMotion:{enumerable:!0,get:()=>()=>S()!==cl},enableMotion:{enumerable:!0,get:()=>()=>x}}),O},[]);zc.useImperativeHandle(o,()=>A,[]);let j=zc.useRef(0);D&&(j.current+=1);let P=zc.useMemo(()=>{if(D==="NONE")return null;let O,V={...g,visible:l};if(!p)O=null;else if(I===cl)C?O=p({...V},y):!u&&M.current&&v?O=p({...V,className:v},y):d||!u&&!v?O=p({...V,style:{display:"none"}},y):O=null;else{let W;F===Es?W="prepare":sz(F)?W="active":F===Bp&&(W="start");let H=SR(m,`${I}-${W}`);O=p({...V,className:Z(SR(m,I),{[H]:H&&W,[m]:typeof m=="string"}),style:$},y)}return O},[j.current]);if(lz(p)&&Ax(P)){let O=Hi(P);if(O!==y)return zc.cloneElement(P,{ref:fn(O,y)})}return P});return n.displayName="CSSMotion",n}var uz=Die(az),cx=B(_()),U4="keep",G4="remove",i4="removed";function Aie(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function K4(e=[]){return e.map(Aie)}function Bie(e=[],t=[]){let r=[],n=0,a=t.length,o=K4(e),l=K4(t);o.forEach(d=>{let p=!1;for(let m=n;m<a;m+=1){let v=l[m];if(v.key===d.key){n<m&&(r=r.concat(l.slice(n,m).map(g=>({...g,status:"add"}))),n=m),r.push({...v,status:U4}),n+=1,p=!0;break}}p||r.push({...d,status:G4})}),n<a&&(r=r.concat(l.slice(n).map(d=>({...d,status:"add"}))));let u={};return r.forEach(({key:d})=>{u[d]=(u[d]||0)+1}),Object.keys(u).filter(d=>u[d]>1).forEach(d=>{r=r.filter(({key:p,status:m})=>p!==d||m!==G4),r.forEach(p=>{p.key===d&&(p.status=U4)})}),r}function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X4.apply(this,arguments)}var Iie=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Mie(e,t=uz){class r extends cx.Component{constructor(){super(...arguments),ie(this,"state",{keyEntities:[]}),ie(this,"removeKey",a=>{this.setState(o=>({keyEntities:o.keyEntities.map(l=>l.key!==a?l:{...l,status:i4})}),()=>{let{keyEntities:o}=this.state;o.filter(({status:l})=>l!==i4).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved()})})}static getDerivedStateFromProps({keys:a},{keyEntities:o}){let l=K4(a);return{keyEntities:Bie(o,l).filter(u=>{let d=o.find(({key:p})=>u.key===p);return!(d&&d.status===i4&&u.status===G4)})}}render(){let{keyEntities:a}=this.state,{component:o,children:l,onVisibleChanged:u,onAllRemoved:d,...p}=this.props,m=o||cx.Fragment,v={};return Iie.forEach(g=>{v[g]=p[g],delete p[g]}),delete p.keys,cx.createElement(m,p,a.map(({status:g,...b},x)=>{let y=g==="add"||g===U4;return cx.createElement(t,X4({},v,{key:b.key,visible:y,eventProps:b,onVisibleChanged:E=>{u?.(E,{key:b.key}),E||this.removeKey(b.key)}}),lz(l)?E=>l({...E,index:x}):(E,S)=>l({...E,index:x},S))}))}}return ie(r,"defaultProps",{component:"div"}),r}var Tie=Mie(az),ra=uz,ul=B(_()),DR=B(_());function jie(e){let{prefixCls:t,align:r,arrow:n,arrowPos:a}=e,{className:o,content:l,style:u}=n||{},{x:d=0,y:p=0}=a,m=DR.useRef(null);if(!r||!r.points)return null;let v={position:"absolute"};if(r.autoArrow!==!1){let g=r.points[0],b=r.points[1],x=g[0],y=g[1],E=b[0],S=b[1];x===E||!["t","b"].includes(x)?v.top=p:x==="t"?v.top=0:v.bottom=0,y===S||!["l","r"].includes(y)?v.left=d:y==="l"?v.left=0:v.right=0}return DR.createElement("div",{ref:m,className:Z(`${t}-arrow`,o),style:{...v,...u}},l)}var AR=B(_());function Q4(){return Q4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Q4.apply(this,arguments)}function _ie(e){let{prefixCls:t,open:r,zIndex:n,mask:a,motion:o,mobile:l}=e;return a?AR.createElement(ra,Q4({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),({className:u})=>AR.createElement("div",{style:{zIndex:n},className:Z(`${t}-mask`,l&&`${t}-mobile-mask`,u)})):null}var Nie=B(_()),Pie=Nie.memo(({children:e})=>e,(e,t)=>t.cache),Rie=Pie;function cz(e,t,r,n,a,o,l,u){let d="auto",p=e?{}:{left:"-1000vw",top:"-1000vh",right:d,bottom:d};if(!e&&(t||!r)){let{points:m}=n,v=n.dynamicInset||n._experimental?.dynamicInset,g=v&&m[0][1]==="r",b=v&&m[0][0]==="b";g?(p.right=a,p.left=d):(p.left=l,p.right=d),b?(p.bottom=o,p.top=d):(p.top=u,p.bottom=d)}return p}function Y4(){return Y4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y4.apply(this,arguments)}var Oie=ul.forwardRef((e,t)=>{let{onEsc:r,popup:n,className:a,prefixCls:o,style:l,target:u,onVisibleChanged:d,open:p,keepDom:m,fresh:v,onClick:g,mask:b,arrow:x,arrowPos:y,align:E,motion:S,maskMotion:F,mobile:$,forceRender:C,getPopupContainer:D,autoDestroy:I,portal:M,children:A,zIndex:j,onMouseEnter:P,onMouseLeave:O,onPointerEnter:V,onPointerDownCapture:W,ready:H,offsetX:q,offsetY:z,offsetR:L,offsetB:U,onAlign:Y,onPrepare:X,onResize:J,stretch:N,targetWidth:R,targetHeight:K}=e,Q=typeof n=="function"?n():n,ee=p||m,te=!!$,[ne,me,se]=ul.useMemo(()=>$?[$.mask,$.maskMotion,$.motion]:[b,F,S],[$,b,F,S]),he=D?.length>0,[le,ke]=ul.useState(!D||!he);or(()=>{!le&&he&&u&&ke(!0)},[le,he,u]);let Ae=wt((ye,we)=>{J?.(ye,we),Y()}),de=cz(te,H,p,E,L,U,q,z);if(!le)return null;let ve={};return N&&(N.includes("height")&&K?ve.height=K:N.includes("minHeight")&&K&&(ve.minHeight=K),N.includes("width")&&R?ve.width=R:N.includes("minWidth")&&R&&(ve.minWidth=R)),p||(ve.pointerEvents="none"),ul.createElement(M,{open:C||ee,getContainer:D&&(()=>D(u)),autoDestroy:I,onEsc:r},ul.createElement(_ie,{prefixCls:o,open:p,zIndex:j,mask:ne,motion:me,mobile:te}),ul.createElement(Ta,{onResize:Ae,disabled:!p},ye=>ul.createElement(ra,Y4({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:C,leavedClassName:`${o}-hidden`},se,{onAppearPrepare:X,onEnterPrepare:X,visible:p,onVisibleChanged:we=>{S?.onVisibleChanged?.(we),d(we)}}),({className:we,style:Oe},Fe)=>{let $e=Z(o,we,a,{[`${o}-mobile`]:te});return ul.createElement("div",{ref:fn(ye,t,Fe),className:$e,style:{"--arrow-x":`${y.x||0}px`,"--arrow-y":`${y.y||0}px`,...de,...ve,...Oe,boxSizing:"border-box",zIndex:j,...l},onMouseEnter:P,onMouseLeave:O,onPointerEnter:V,onClick:g,onPointerDownCapture:W},x&&ul.createElement(jie,{prefixCls:o,arrow:x,arrowPos:y,align:E}),ul.createElement(Rie,{cache:!p&&!v},Q))})),A)}),dz=Oie,pz=B(_()),zie=pz.createContext(null),$x=zie,fz=pz.createContext(null),Lie=B(_());function BR(e){return e?Array.isArray(e)?e:[e]:[]}function Hie(e,t,r){return Lie.useMemo(()=>{let n=BR(t??e),a=BR(r??e),o=new Set(n),l=new Set(a);return o.has("hover")&&!o.has("click")&&o.add("touch"),l.has("hover")&&!l.has("click")&&l.add("touch"),[o,l]},[e,t,r])}var dx=B(_());function qie(e=[],t=[],r){let n=(a,o)=>a[o]||"";return r?n(e,0)===n(t,0):n(e,0)===n(t,0)&&n(e,1)===n(t,1)}function mz(e,t,r,n){let{points:a}=r,o=Object.keys(e);for(let l=0;l<o.length;l+=1){let u=o[l];if(qie(e[u]?.points,a,n))return`${t}-placement-${u}`}return""}function hb(e){return e.ownerDocument.defaultView}function J4(e){let t=[],r=e?.parentElement,n=["hidden","scroll","clip","auto"];for(;r;){let{overflowX:a,overflowY:o,overflow:l}=hb(r).getComputedStyle(r);[a,o,l].some(u=>n.includes(u))&&t.push(r),r=r.parentElement}return t}function ib(e,t=1){return Number.isNaN(e)?t:e}function Gv(e){return ib(parseFloat(e),0)}function IR(e,t){let r={...e};return(t||[]).forEach(n=>{if(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)return;let{overflow:a,overflowClipMargin:o,borderTopWidth:l,borderBottomWidth:u,borderLeftWidth:d,borderRightWidth:p}=hb(n).getComputedStyle(n),m=n.getBoundingClientRect(),{offsetHeight:v,clientHeight:g,offsetWidth:b,clientWidth:x}=n,y=Gv(l),E=Gv(u),S=Gv(d),F=Gv(p),$=ib(Math.round(m.width/b*1e3)/1e3),C=ib(Math.round(m.height/v*1e3)/1e3),D=(b-x-S-F)*$,I=(v-g-y-E)*C,M=y*C,A=E*C,j=S*$,P=F*$,O=0,V=0;if(a==="clip"){let L=Gv(o);O=L*$,V=L*C}let W=m.x+j-O,H=m.y+M-V,q=W+m.width+2*O-j-P-D,z=H+m.height+2*V-M-A-I;r.left=Math.max(r.left,W),r.top=Math.max(r.top,H),r.right=Math.min(r.right,q),r.bottom=Math.min(r.bottom,z)}),r}function MR(e,t=0){let r=`${t}`,n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function TR(e,t){let[r,n]=t||[];return[MR(e.width,r),MR(e.height,n)]}function jR(e=""){return[e[0],e[1]]}function yh(e,t){let r=t[0],n=t[1],a,o;return r==="t"?o=e.y:r==="b"?o=e.y+e.height:o=e.y+e.height/2,n==="l"?a=e.x:n==="r"?a=e.x+e.width:a=e.x+e.width/2,{x:a,y:o}}function Lc(e,t){let r={t:"b",b:"t",l:"r",r:"l"},n=[...e];return n[t]=r[e[t]]||"c",n}function _R(e){return e.join("")}function hz(e,t,r,n,a,o,l,u){let[d,p]=dx.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[n]||{}}),m=dx.useRef(0),v=dx.useMemo(()=>!t||u?[]:J4(t),[t]),g=dx.useRef({});e||(g.current={});let b=wt(()=>{if(t&&r&&e&&!u){let E=function(bt,Yn,Jn=ye){let Zn=z.x+bt,cp=z.y+Yn,hs=Zn+ee,al=cp+Q,Ti=Math.max(Zn,Jn.left),Fa=Math.max(cp,Jn.top),Tm=Math.min(hs,Jn.right),tv=Math.min(al,Jn.bottom);return Math.max(0,(Tm-Ti)*(tv-Fa))},S=function(){Le=z.y+at,tt=Le+Q,ut=z.x+Pe,He=ut+ee},F=t,$=F.ownerDocument,C=hb(F),{position:D}=C.getComputedStyle(F),I=F.style.left,M=F.style.top,A=F.style.right,j=F.style.bottom,P=F.style.overflow,O=F.style.overflowX,V=F.style.overflowY,W={...a[n],...o},H=$.createElement("div");F.parentElement?.appendChild(H),H.style.left=`${F.offsetLeft}px`,H.style.top=`${F.offsetTop}px`,H.style.position=D,H.style.height=`${F.offsetHeight}px`,H.style.width=`${F.offsetWidth}px`,F.style.left="0",F.style.top="0",F.style.right="auto",F.style.bottom="auto",F.style.overflow="hidden";let q;if(Array.isArray(r))q={x:r[0],y:r[1],width:0,height:0};else{let bt=r.getBoundingClientRect();bt.x=bt.x??bt.left,bt.y=bt.y??bt.top,q={x:bt.x,y:bt.y,width:bt.width,height:bt.height}}let z=F.getBoundingClientRect(),{height:L,width:U}=C.getComputedStyle(F);z.x=z.x??z.left,z.y=z.y??z.top;let{clientWidth:Y,clientHeight:X,scrollWidth:J,scrollHeight:N,scrollTop:R,scrollLeft:K}=$.documentElement,Q=z.height,ee=z.width,te=q.height,ne=q.width,me={left:0,top:0,right:Y,bottom:X},se={left:-K,top:-R,right:J-K,bottom:N-R},{htmlRegion:he}=W,le="visible",ke="visibleFirst";he!=="scroll"&&he!==ke&&(he=le);let Ae=he===ke,de=IR(se,v),ve=IR(me,v),ye=he===le?ve:de,we=Ae?ve:ye;F.style.left="auto",F.style.top="auto",F.style.right="0",F.style.bottom="0";let Oe=F.getBoundingClientRect();F.style.left=I,F.style.top=M,F.style.right=A,F.style.bottom=j,F.style.overflow=P,F.style.overflowX=O,F.style.overflowY=V,F.parentElement?.removeChild(H);let Fe=ib(Math.round(ee/parseFloat(U)*1e3)/1e3),$e=ib(Math.round(Q/parseFloat(L)*1e3)/1e3);if(Fe===0||$e===0||kh(r)&&!ob(r))return;let{offset:Me,targetOffset:qe}=W,[ze,Te]=TR(z,Me),[Ne,Qe]=TR(q,qe);q.x-=Ne,q.y-=Qe;let[ot,et]=W.points||[],Ue=jR(et),Ie=jR(ot),Re=yh(q,Ue),ht=yh(z,Ie),lt={...W},Xe=[Ie,Ue],Pe=Re.x-ht.x+ze,at=Re.y-ht.y+Te,Nt=E(Pe,at),Pt=E(Pe,at,ve),Yr=yh(q,["t","l"]),Gt=yh(z,["t","l"]),Tr=yh(q,["b","r"]),er=yh(z,["b","r"]),It=W.overflow||{},{adjustX:lr,adjustY:$r,shiftX:Vt,shiftY:ct}=It,St=bt=>typeof bt=="boolean"?bt:bt>=0,Le,tt,ut,He;S();let rt=St($r),gt=Ie[0]===Ue[0];if(rt&&Ie[0]==="t"&&(tt>we.bottom||g.current.bt)){let bt=at;gt?bt-=Q-te:bt=Yr.y-er.y-Te;let Yn=E(Pe,bt),Jn=E(Pe,bt,ve);Yn>Nt||Yn===Nt&&(!Ae||Jn>=Pt)?(g.current.bt=!0,at=bt,Te=-Te,Xe=[Lc(Xe[0],0),Lc(Xe[1],0)]):g.current.bt=!1}if(rt&&Ie[0]==="b"&&(Le<we.top||g.current.tb)){let bt=at;gt?bt+=Q-te:bt=Tr.y-Gt.y-Te;let Yn=E(Pe,bt),Jn=E(Pe,bt,ve);Yn>Nt||Yn===Nt&&(!Ae||Jn>=Pt)?(g.current.tb=!0,at=bt,Te=-Te,Xe=[Lc(Xe[0],0),Lc(Xe[1],0)]):g.current.tb=!1}let Kt=St(lr),Xt=Ie[1]===Ue[1];if(Kt&&Ie[1]==="l"&&(He>we.right||g.current.rl)){let bt=Pe;Xt?bt-=ee-ne:bt=Yr.x-er.x-ze;let Yn=E(bt,at),Jn=E(bt,at,ve);Yn>Nt||Yn===Nt&&(!Ae||Jn>=Pt)?(g.current.rl=!0,Pe=bt,ze=-ze,Xe=[Lc(Xe[0],1),Lc(Xe[1],1)]):g.current.rl=!1}if(Kt&&Ie[1]==="r"&&(ut<we.left||g.current.lr)){let bt=Pe;Xt?bt+=ee-ne:bt=Tr.x-Gt.x-ze;let Yn=E(bt,at),Jn=E(bt,at,ve);Yn>Nt||Yn===Nt&&(!Ae||Jn>=Pt)?(g.current.lr=!0,Pe=bt,ze=-ze,Xe=[Lc(Xe[0],1),Lc(Xe[1],1)]):g.current.lr=!1}lt.points=[_R(Xe[0]),_R(Xe[1])],S();let on=Vt===!0?0:Vt;typeof on=="number"&&(ut<ve.left&&(Pe-=ut-ve.left-ze,q.x+ne<ve.left+on&&(Pe+=q.x-ve.left+ne-on)),He>ve.right&&(Pe-=He-ve.right-ze,q.x>ve.right-on&&(Pe+=q.x-ve.right+on)));let Nr=ct===!0?0:ct;typeof Nr=="number"&&(Le<ve.top&&(at-=Le-ve.top-Te,q.y+te<ve.top+Nr&&(at+=q.y-ve.top+te-Nr)),tt>ve.bottom&&(at-=tt-ve.bottom-Te,q.y>ve.bottom-Nr&&(at+=q.y-ve.bottom+Nr)));let tr=z.x+Pe,Wr=tr+ee,vt=z.y+at,Rt=vt+Q,gr=q.x,In=gr+ne,Xa=q.y,pr=Xa+te,mi=Math.max(tr,gr),Qa=Math.min(Wr,In),Dr=(mi+Qa)/2-tr,Hn=Math.max(vt,Xa),Ca=Math.min(Rt,pr),fr=(Hn+Ca)/2-vt;l?.(t,lt);let Mi=Oe.right-z.x-(Pe+z.width),io=Oe.bottom-z.y-(at+z.height);Fe===1&&(Pe=Math.floor(Pe),Mi=Math.floor(Mi)),$e===1&&(at=Math.floor(at),io=Math.floor(io));let Sa={ready:!0,offsetX:Pe/Fe,offsetY:at/$e,offsetR:Mi/Fe,offsetB:io/$e,arrowX:Dr/Fe,arrowY:fr/$e,scaleX:Fe,scaleY:$e,align:lt};p(Sa)}}),x=()=>{m.current+=1;let E=m.current;Promise.resolve().then(()=>{m.current===E&&b()})},y=()=>{p(E=>({...E,ready:!1}))};return or(y,[n]),or(()=>{e||y()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,x]}var NR=B(_());function gz(){let e=NR.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},r=(n,a)=>{t(),a===0?n():e.current=setTimeout(()=>{n()},a*1e3)};return NR.useEffect(()=>()=>{t()},[]),r}function Wie(e,t,r,n,a){or(()=>{if(e&&t&&r){let o=function(){n(),a()},l=t,u=r,d=J4(l),p=J4(u),m=hb(u),v=new Set([m,...d,...p]);return v.forEach(g=>{g.addEventListener("scroll",o,{passive:!0})}),m.addEventListener("resize",o,{passive:!0}),n(),()=>{v.forEach(g=>{g.removeEventListener("scroll",o),m.removeEventListener("resize",o)})}}},[e,t,r])}var o4=B(_());function Vie(e,t,r,n,a,o,l,u){let d=o4.useRef(e);d.current=e;let p=o4.useRef(!1);o4.useEffect(()=>{if(t&&n&&(!a||o)){let v=()=>{p.current=!1},g=y=>{d.current&&!l(y.composedPath?.()?.[0]||y.target)&&!p.current&&u(!1)},b=hb(n);b.addEventListener("pointerdown",v,!0),b.addEventListener("mousedown",g,!0),b.addEventListener("contextmenu",g,!0);let x=g4(r);return x&&(x.addEventListener("mousedown",g,!0),x.addEventListener("contextmenu",g,!0)),()=>{b.removeEventListener("pointerdown",v,!0),b.removeEventListener("mousedown",g,!0),b.removeEventListener("contextmenu",g,!0),x&&(x.removeEventListener("mousedown",g,!0),x.removeEventListener("contextmenu",g,!0))}}},[t,r,n,a,o]);function m(){p.current=!0}return m}var gi=B(_()),px=B(_());function Uie(){let[e,t]=px.default.useState(null),[r,n]=px.default.useState(!1),[a,o]=px.default.useState(!1),l=px.default.useRef(null),u=wt(p=>{p===!1?(l.current=null,n(!1)):a&&r?l.current=p:(n(!0),t(p),l.current=null,r||o(!0))}),d=wt(p=>{p?(o(!1),l.current&&(t(l.current),l.current=null)):(o(!1),l.current=null)});return[u,r,e,d]}var fx=B(_());function Z4(){return Z4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z4.apply(this,arguments)}var Gie=e=>{let{prefixCls:t,isMobile:r,ready:n,open:a,align:o,offsetR:l,offsetB:u,offsetX:d,offsetY:p,arrowPos:m,popupSize:v,motion:g,uniqueContainerClassName:b,uniqueContainerStyle:x}=e,y=`${t}-unique-container`,[E,S]=fx.default.useState(!1),F=cz(r,n,a,o,l,u,d,p),$=fx.default.useRef(F);n&&($.current=F);let C={};return v&&(C.width=v.width,C.height=v.height),fx.default.createElement(ra,Z4({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${y}-hidden`},g,{visible:a,onVisibleChanged:D=>{S(D)}}),({className:D,style:I})=>{let M=Z(y,D,b,{[`${y}-visible`]:E});return fx.default.createElement("div",{className:M,style:{"--arrow-x":`${m?.x||0}px`,"--arrow-y":`${m?.y||0}px`,...$.current,...C,...I,...x}})})},Kie=Gie,Xie=({children:e,postTriggerProps:t})=>{let[r,n,a,o]=Uie(),l=gi.useMemo(()=>!a||!t?a:t(a),[a,t]),[u,d]=gi.useState(null),[p,m]=gi.useState(null),v=gi.useRef(null),g=wt(U=>{v.current=U,kh(U)&&u!==U&&d(U)}),b=gi.useRef(null),x=gz(),y=wt((U,Y)=>{b.current=Y,x(()=>{r(U)},U.delay)}),E=U=>{x(()=>{b.current?.()||r(!1)},U)},S=wt(U=>{o(U)}),[F,$,C,D,I,M,A,,,j,P]=hz(n,u,l?.target,l?.popupPlacement,l?.builtinPlacements||{},l?.popupAlign,void 0,!1),O=gi.useMemo(()=>{if(!l)return"";let U=mz(l.builtinPlacements||{},l.prefixCls||"",j,!1);return Z(U,l.getPopupClassNameFromAlign?.(j))},[j,l?.getPopupClassNameFromAlign,l?.builtinPlacements,l?.prefixCls]),V=gi.useMemo(()=>({show:y,hide:E}),[]);gi.useEffect(()=>{P()},[l?.target]);let W=wt(()=>(P(),Promise.resolve())),H=gi.useRef({}),q=gi.useContext($x),z=gi.useMemo(()=>({registerSubPopup:(U,Y)=>{H.current[U]=Y,q?.registerSubPopup(U,Y)}}),[q]),L=l?.prefixCls;return gi.createElement(fz.Provider,{value:V},e,l&&gi.createElement($x.Provider,{value:z},gi.createElement(dz,{ref:g,portal:Xx,onEsc:l.onEsc,prefixCls:L,popup:l.popup,className:Z(l.popupClassName,O,`${L}-unique-controlled`),style:l.popupStyle,target:l.target,open:n,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:S,ready:F,offsetX:$,offsetY:C,offsetR:D,offsetB:I,onAlign:P,onPrepare:W,onResize:U=>m({width:U.offsetWidth,height:U.offsetHeight}),arrowPos:{x:M,y:A},align:j,zIndex:l.zIndex,mask:l.mask,arrow:l.arrow,motion:l.popupMotion,maskMotion:l.maskMotion,getPopupContainer:l.getPopupContainer},gi.createElement(Kie,{prefixCls:L,isMobile:!1,ready:F,open:n,align:j,offsetR:D,offsetB:I,offsetX:$,offsetY:C,arrowPos:{x:M,y:A},popupSize:p,motion:l.popupMotion,uniqueContainerClassName:Z(l.uniqueContainerClassName,O),uniqueContainerStyle:l.uniqueContainerStyle}))))},Qie=Xie,Yie=B(Jt());function Jie(e=Xx){return Jr.forwardRef((t,r)=>{let{prefixCls:n="rc-trigger-popup",children:a,action:o="hover",showAction:l,hideAction:u,disabled:d=!1,popupVisible:p,defaultPopupVisible:m,onOpenChange:v,afterOpenChange:g,onPopupVisibleChange:b,afterPopupVisibleChange:x,mouseEnterDelay:y,mouseLeaveDelay:E=.1,focusDelay:S,blurDelay:F,mask:$,maskClosable:C=!0,getPopupContainer:D,forceRender:I,autoDestroy:M,popup:A,popupClassName:j,uniqueContainerClassName:P,uniqueContainerStyle:O,popupStyle:V,popupPlacement:W,builtinPlacements:H={},popupAlign:q,zIndex:z,stretch:L,getPopupClassNameFromAlign:U,fresh:Y,unique:X,alignPoint:J,onPopupClick:N,onPopupAlign:R,arrow:K,popupMotion:Q,maskMotion:ee,mobile:te,...ne}=t,me=M||!1,se=p===void 0,he=!!te,le=Jr.useRef({}),ke=Jr.useContext($x),Ae=Jr.useMemo(()=>({registerSubPopup:(Ve,rr)=>{le.current[Ve]=rr,ke?.registerSubPopup(Ve,rr)}}),[ke]),de=Jr.useContext(fz),ve=pl(),[ye,we]=Jr.useState(null),Oe=Jr.useRef(null),Fe=wt(Ve=>{Oe.current=Ve,kh(Ve)&&ye!==Ve&&we(Ve),ke?.registerSubPopup(ve,Ve)}),[$e,Me]=Jr.useState(null),qe=Jr.useRef(null),ze=wt(Ve=>{let rr=Ix(Ve);kh(rr)&&$e!==rr&&(Me(rr),qe.current=rr)}),Te={},Ne=wt(Ve=>{let rr=$e;return rr?.contains(Ve)||g4(rr)?.host===Ve||Ve===rr||ye?.contains(Ve)||g4(ye)?.host===Ve||Ve===ye||Object.values(le.current).some(jm=>jm?.contains(Ve)||Ve===jm)}),Qe=K?{...K!==!0?K:{}}:null,[ot,et]=qt(m||!1,p),Ue=ot||!1,Ie=Ue&&!d,Re=Jr.useMemo(()=>{let Ve=typeof a=="function"?a({open:Ie}):a;return Jr.Children.only(Ve)},[a,Ie]),ht=Re?.props||{},lt=wt(()=>Ie),Xe=wt((Ve=0)=>({popup:A,target:$e,delay:Ve,prefixCls:n,popupClassName:j,uniqueContainerClassName:P,uniqueContainerStyle:O,popupStyle:V,popupPlacement:W,builtinPlacements:H,popupAlign:q,zIndex:z,mask:$,maskClosable:C,popupMotion:Q,maskMotion:ee,arrow:Qe,getPopupContainer:D,getPopupClassNameFromAlign:U,id:ve,onEsc:Yr}));or(()=>{de&&X&&$e&&!se&&!ke&&(Ie?de.show(Xe(y),lt):de.hide(E))},[Ie,$e]);let Pe=Jr.useRef(Ie);Pe.current=Ie;let at=wt(Ve=>{(0,Yie.flushSync)(()=>{Ue!==Ve&&(et(Ve),v?.(Ve),b?.(Ve))})}),Nt=gz(),Pt=(Ve,rr=0)=>{if(p!==void 0){Nt(()=>{at(Ve)},rr);return}if(de&&X&&se&&!ke){Ve?de.show(Xe(rr),lt):de.hide(rr);return}Nt(()=>{at(Ve)},rr)};function Yr({top:Ve}){Ve&&Pt(!1)}let[Gt,Tr]=Jr.useState(!1);or(Ve=>{(!Ve||Ie)&&Tr(!0)},[Ie]);let[er,It]=Jr.useState(null),[lr,$r]=Jr.useState(null),Vt=Ve=>{$r([Ve.clientX,Ve.clientY])},[ct,St,Le,tt,ut,He,rt,gt,Kt,Xt,on]=hz(Ie,ye,J&&lr!==null?lr:$e,W,H,q,R,he),[Nr,tr]=Hie(o,l,u),Wr=Nr.has("click"),vt=tr.has("click")||tr.has("contextMenu"),Rt=wt(()=>{Gt||on()});Wie(Ie,$e,ye,Rt,()=>{Pe.current&&J&&vt&&Pt(!1)}),or(()=>{Rt()},[lr,W]),or(()=>{Ie&&!H?.[W]&&Rt()},[JSON.stringify(q)]);let gr=Jr.useMemo(()=>{let Ve=mz(H,n,Xt,J);return Z(Ve,U?.(Xt))},[Xt,U,H,n,J]);Jr.useImperativeHandle(r,()=>({nativeElement:qe.current,popupElement:Oe.current,forceAlign:Rt}));let[In,Xa]=Jr.useState(0),[pr,mi]=Jr.useState(0),Qa=()=>{if(L&&$e){let Ve=$e.getBoundingClientRect();Xa(Ve.width),mi(Ve.height)}},Dr=()=>{Qa(),Rt()},Hn=Ve=>{Tr(!1),on(),g?.(Ve),x?.(Ve)},Ca=()=>new Promise(Ve=>{Qa(),It(()=>Ve)});or(()=>{er&&(on(),er(),It(null))},[er]);function fr(Ve,rr,jm,oo,_m){Te[Ve]=(nv,...av)=>{(!_m||!_m())&&(oo?.(nv),Pt(rr,jm)),ht[Ve]?.(nv,...av)}}let Mi=Nr.has("touch"),io=tr.has("touch"),Sa=Jr.useRef(!1);(Mi||io)&&(Te.onTouchStart=(...Ve)=>{Sa.current=!0,Pe.current&&io?Pt(!1):!Pe.current&&Mi&&Pt(!0),ht.onTouchStart?.(...Ve)}),(Wr||vt)&&(Te.onClick=(Ve,...rr)=>{Pe.current&&vt?Pt(!1):!Pe.current&&Wr&&(Vt(Ve),Pt(!0)),ht.onClick?.(Ve,...rr),Sa.current=!1});let bt=Vie(Ie,vt||io,$e,ye,$,C,Ne,Pt),Yn=Nr.has("hover"),Jn=tr.has("hover"),Zn,cp,hs=()=>Sa.current;if(Yn){let Ve=rr=>{Vt(rr)};fr("onMouseEnter",!0,y,Ve,hs),fr("onPointerEnter",!0,y,Ve,hs),Zn=rr=>{(Ie||Gt)&&ye?.contains(rr.target)&&Pt(!0,y)},J&&(Te.onMouseMove=rr=>{ht.onMouseMove?.(rr)})}Jn&&(fr("onMouseLeave",!1,E,void 0,hs),fr("onPointerLeave",!1,E,void 0,hs),cp=()=>{Pt(!1,E)}),Nr.has("focus")&&fr("onFocus",!0,S),tr.has("focus")&&fr("onBlur",!1,F),Nr.has("contextMenu")&&(Te.onContextMenu=(Ve,...rr)=>{Pe.current&&tr.has("contextMenu")?Pt(!1):(Vt(Ve),Pt(!0)),Ve.preventDefault(),ht.onContextMenu?.(Ve,...rr)});let al=Jr.useRef(!1);al.current||(al.current=I||Ie||Gt);let Ti={...ht,...Te},Fa={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(Ve=>{ne[Ve]&&(Fa[Ve]=(...rr)=>{Ti[Ve]?.(...rr),ne[Ve](...rr)})});let Tm={x:He,y:rt};QO(Ie,$e,Dr);let tv=Za(ze,Hi(Re)),rv=Jr.cloneElement(Re,{...Ti,...Fa,ref:tv});return Jr.createElement(Jr.Fragment,null,rv,al.current&&(!de||!X)&&Jr.createElement($x.Provider,{value:Ae},Jr.createElement(dz,{portal:e,ref:Fe,prefixCls:n,popup:A,className:Z(j,!he&&gr),style:V,target:$e,onMouseEnter:Zn,onMouseLeave:cp,onPointerEnter:Zn,zIndex:z,open:Ie,keepDom:Gt,fresh:Y,onClick:N,onPointerDownCapture:bt,mask:$,motion:Q,maskMotion:ee,onVisibleChanged:Hn,onPrepare:Ca,forceRender:I,autoDestroy:me,getPopupContainer:D,onEsc:Yr,align:Xt,arrow:Qe,arrowPos:Tm,ready:ct,offsetX:St,offsetY:Le,offsetR:tt,offsetB:ut,onAlign:Rt,stretch:L,targetWidth:In/gt,targetHeight:pr/Kt,mobile:te})))})}var Ph=Jie(Xx),s4=B(_()),Zie=({children:e})=>{let{getPrefixCls:t}=s4.default.useContext(st),r=t();return s4.default.isValidElement(e)?s4.default.createElement(ra,{visible:!0,motionName:`${r}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:n,className:a})=>Sr(e,o=>({className:Z(o.className,a),style:{...o.style,...n}}))):e},eoe=Zie,mx=[null,null];function toe(e){if(mx[0]!==e){let t={};Object.keys(e).forEach(r=>{t[r]={...e[r],dynamicInset:!1}}),mx[0]=e,mx[1]=t}return mx[1]}var roe=({children:e})=>{let t=r=>{let{id:n,builtinPlacements:a,popup:o}=r,l=cr(o)?o():o,u=toe(a);return{...r,getPopupContainer:null,arrow:!1,popup:hR.default.createElement(eoe,{key:n},l),builtinPlacements:u}};return hR.default.createElement(Qie,{postTriggerProps:t},e)},Qx=roe,eF=B(_()),tF=eF.createContext(!1),vz=({children:e,disabled:t})=>{let r=eF.useContext(tF);return eF.createElement(tF.Provider,{value:t??r},e)},ja=tF,gn=B(_()),noe=B(_()),bz=(0,noe.createContext)(void 0),PR=B(_()),rF=B(_()),nF=rF.createContext(void 0),aoe=({children:e,size:t})=>{let r=rF.useContext(nF);return rF.createElement(nF.Provider,{value:t||r},e)},Rh=nF;function ioe(){let e=(0,PR.useContext)(ja),t=(0,PR.useContext)(Rh);return{componentDisabled:e,componentSize:t}}var ooe=ioe,soe=B(_());function loe(e,t,r){let n=Bh("ConfigProvider"),a=e||{},o=a.inherit===!1||!t?{...Pp,hashed:t?.hashed??Pp.hashed,cssVar:t?.cssVar,zeroRuntime:t?.zeroRuntime}:t,l=(0,soe.useId)();return Ah(()=>{if(!e)return t;let u={...o.components};Object.keys(e.components||{}).forEach(m=>{u[m]={...u[m],...e.components[m]}});let d=`css-var-${l.replace(/:/g,"")}`,p={prefix:r?.prefixCls,...o.cssVar,...a.cssVar,key:a.cssVar?.key||d};return{...o,...a,token:{...o.token,...a.token},components:u,cssVar:p}},[a,o,r?.prefixCls,l],(u,d)=>u.some((p,m)=>{let v=d[m];return!Qc(p,v,!0)}))}var Qv=B(_()),RR=Qv.createContext(!0);function uoe(e){let t=Qv.useContext(RR),{children:r}=e,[,n]=Ma(),{motion:a}=n,o=Qv.useRef(!1);return o.current||(o.current=t!==a),o.current?Qv.createElement(RR.Provider,{value:a},Qv.createElement(mie,{motion:a},r)):r}var X$e=B(_()),coe=()=>null,doe=({iconPrefixCls:e,csp:t})=>(Fae(e,t),null),poe=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],$F,yz,wz,xz;function l4(){return $F||Gc}function foe(){return yz||Nx}var moe=e=>{let{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:a}=e;t!==void 0&&($F=t),r!==void 0&&(yz=r),"holderRender"in e&&(xz=a),n&&(wz=n)},hoe=()=>({getPrefixCls:(e,t)=>t||(e?`${l4()}-${e}`:l4()),getIconPrefixCls:foe,getRootPrefixCls:()=>$F||l4(),getTheme:()=>wz,holderRender:xz}),goe=e=>{let{children:t,csp:r,autoInsertSpaceInButton:n,alert:a,affix:o,anchor:l,app:u,form:d,locale:p,componentSize:m,direction:v,space:g,splitter:b,virtual:x,dropdownMatchSelectWidth:y,popupMatchSelectWidth:E,popupOverflow:S,legacyLocale:F,parentContext:$,iconPrefixCls:C,theme:D,componentDisabled:I,segmented:M,statistic:A,spin:j,calendar:P,carousel:O,cascader:V,collapse:W,typography:H,checkbox:q,descriptions:z,divider:L,drawer:U,skeleton:Y,steps:X,image:J,layout:N,list:R,listy:K,mentions:Q,modal:ee,progress:te,result:ne,slider:me,breadcrumb:se,masonry:he,menu:le,pagination:ke,input:Ae,inputPassword:de,inputSearch:ve,textArea:ye,otp:we,empty:Oe,badge:Fe,borderBeam:$e,radio:Me,rate:qe,ribbon:ze,switch:Te,transfer:Ne,avatar:Qe,message:ot,tag:et,table:Ue,card:Ie,cardMeta:Re,tabs:ht,timeline:lt,timePicker:Xe,upload:Pe,notification:at,tree:Nt,colorPicker:Pt,datePicker:Yr,rangePicker:Gt,flex:Tr,wave:er,dropdown:It,warning:lr,tour:$r,tooltip:Vt,popover:ct,popconfirm:St,qrcode:Le,floatButton:tt,floatButtonGroup:ut,variant:He,inputNumber:rt,treeSelect:gt,watermark:Kt}=e,Xt=gn.useMemo(()=>kt(p)&&Object.prototype.hasOwnProperty.call(p,"default")&&p.default?.locale?p.default:p,[p]),on=gn.useCallback((Dr,Hn)=>{let{prefixCls:Ca}=e;if(Hn)return Hn;let fr=Ca||$.getPrefixCls("");return Dr?`${fr}-${Dr}`:fr},[$.getPrefixCls,e.prefixCls]),Nr=C||$.iconPrefixCls||Nx,tr=r||$.csp,Wr=loe(D,$.theme,{prefixCls:on("")}),vt={csp:tr,autoInsertSpaceInButton:n,alert:a,affix:o,anchor:l,app:u,locale:Xt||F,direction:v,space:g,splitter:b,virtual:x,popupMatchSelectWidth:E??y,popupOverflow:S,getPrefixCls:on,iconPrefixCls:Nr,theme:Wr,segmented:M,statistic:A,spin:j,calendar:P,carousel:O,cascader:V,collapse:W,typography:H,checkbox:q,descriptions:z,divider:L,drawer:U,skeleton:Y,steps:X,image:J,input:Ae,inputPassword:de,inputSearch:ve,textArea:ye,otp:we,layout:N,list:R,listy:K,mentions:Q,modal:ee,progress:te,result:ne,slider:me,breadcrumb:se,masonry:he,menu:le,pagination:ke,empty:Oe,badge:Fe,borderBeam:$e,radio:Me,rate:qe,ribbon:ze,switch:Te,transfer:Ne,avatar:Qe,message:ot,tag:et,table:Ue,card:Ie,cardMeta:Re,tabs:ht,timeline:lt,timePicker:Xe,upload:Pe,notification:at,tree:Nt,colorPicker:Pt,datePicker:Yr,rangePicker:Gt,flex:Tr,wave:er,dropdown:It,warning:lr,tour:$r,tooltip:Vt,popover:ct,popconfirm:St,qrcode:Le,floatButton:tt,floatButtonGroup:ut,variant:He,inputNumber:rt,treeSelect:gt,watermark:Kt},Rt={...$};Object.keys(vt).forEach(Dr=>{vt[Dr]!==void 0&&(Rt[Dr]=vt[Dr])}),poe.forEach(Dr=>{let Hn=e[Dr];Hn&&(Rt[Dr]=Hn)}),typeof n<"u"&&(Rt.button={autoInsertSpace:n,...Rt.button});let gr=Ah(()=>Rt,Rt,(Dr,Hn)=>{let Ca=Object.keys(Dr),fr=Object.keys(Hn);return Ca.length!==fr.length||Ca.some(Mi=>Dr[Mi]!==Hn[Mi])}),{layer:In}=gn.useContext(Jc),Xa=gn.useMemo(()=>({prefixCls:Nr,csp:tr,layer:In?"antd":void 0,zeroRuntime:!!In||Wr?.zeroRuntime}),[Nr,tr,In,Wr?.zeroRuntime]),pr=gn.createElement(gn.Fragment,null,gn.createElement(doe,{iconPrefixCls:Nr,csp:tr}),gn.createElement(coe,{dropdownMatchSelectWidth:y}),t),mi=gn.useMemo(()=>Yc(yu.Form?.defaultValidateMessages||{},gr.locale?.Form?.defaultValidateMessages||{},gr.form?.validateMessages||{},d?.validateMessages||{}),[gr,d?.validateMessages]);Object.keys(mi).length>0&&(pr=gn.createElement(bz.Provider,{value:mi},pr)),Xt&&(pr=gn.createElement(Lae,{locale:Xt,_ANT_MARK__:Oae},pr)),(Nr||tr)&&(pr=gn.createElement($h.Provider,{value:Xa},pr)),m&&(pr=gn.createElement(aoe,{size:m},pr)),pr=gn.createElement(uoe,null,pr),Vt?.unique&&(pr=gn.createElement(Qx,null,pr));let Qa=gn.useMemo(()=>{let{algorithm:Dr,token:Hn,components:Ca,cssVar:fr,...Mi}=Wr||{},io=Dr&&(!Array.isArray(Dr)||Dr.length>0)?Ch(Dr):cb,Sa={};Object.entries(Ca||{}).forEach(([Yn,Jn])=>{let Zn={...Jn};"algorithm"in Zn&&(Zn.algorithm===!0?Zn.theme=io:(Array.isArray(Zn.algorithm)||cr(Zn.algorithm))&&(Zn.theme=Ch(Zn.algorithm)),delete Zn.algorithm),Sa[Yn]=Zn});let bt={...Kc,...Hn};return{...Mi,theme:io,token:bt,components:Sa,override:{override:bt,...Sa},cssVar:fr}},[Wr]);return D&&(pr=gn.createElement(db.Provider,{value:Qa},pr)),gr.warning&&(pr=gn.createElement(Ere.Provider,{value:gr.warning},pr)),I!==void 0&&(pr=gn.createElement(vz,{disabled:I},pr)),gn.createElement(st.Provider,{value:gr},pr)},Oh=e=>{let t=gn.useContext(st),r=gn.useContext(SF);return gn.createElement(goe,{parentContext:t,legacyLocale:r,...e})};Oh.ConfigContext=st;Oh.SizeContext=Rh;Oh.config=moe;Oh.useConfig=ooe;Object.defineProperty(Oh,"SizeContext",{get:()=>Rh});var ed=Oh,voe=e=>`${e}-css-var`,yn=voe;var Ez=B(_(),1),boe=B(_(),1),yoe={folder:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}],["path",{d:"M2 10h20"}]],terminal:[["path",{d:"M12 19h8"}],["path",{d:"m4 17 6-6-6-6"}]],explorer:[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1"}]],more:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"12",cy:"5",r:"1"}],["circle",{cx:"12",cy:"19",r:"1"}]],plus:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],close:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],git:[["path",{d:"M15 6a9 9 0 0 0-9 9V3"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}]],branch:[["path",{d:"M15 6a9 9 0 0 0-9 9V3"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}]],rail:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],splitHorizontal:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M12 3v18"}]],splitVertical:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 12h18"}]],copy:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]],trash:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],hash:[["line",{x1:"4",x2:"20",y1:"9",y2:"9"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21"}]],merge:[["circle",{cx:"18",cy:"18",r:"3"}],["circle",{cx:"6",cy:"6",r:"3"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9"}]],check:[["path",{d:"M20 6 9 17l-5-5"}]],chevronLeft:[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],eye:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]],chevronDown:[["path",{d:"m6 9 6 6 6-6"}]]};function woe(e){return yoe[e==="back"?"chevronLeft":e]?.map(([t,r],n)=>boe.createElement(t,{...r,key:n}))}var ae=B(Ee(),1),kz=Ez.createContext("default"),DF=kz.Provider;function AF(e){return e?"branch":"task"}function De({name:e,size:t=14,className:r,strokeWidth:n=1.8,slot:a}){let o=Ez.useContext(kz)==="lucide"?woe(e):void 0,l=o?2:n,u={width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:l,style:{width:t,height:t,strokeWidth:l},strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-hidden":!0,"data-wand-icon":e,"data-icon":a??e};if(o)return(0,ae.jsx)("svg",{...u,"data-wand-icon-family":"lucide",children:o});switch(e){case"archive":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3",y:"4",width:"18",height:"4",rx:"1"}),(0,ae.jsx)("path",{d:"M5 8v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8"}),(0,ae.jsx)("path",{d:"M10 12h4"})]});case"audio":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M9 18V5l11-2v13"}),(0,ae.jsx)("circle",{cx:"7",cy:"18",r:"3"}),(0,ae.jsx)("circle",{cx:"18",cy:"16",r:"3"})]});case"back":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"9",y:"3",width:"12",height:"18",rx:"2"}),(0,ae.jsx)("path",{d:"M15 18h.01"}),(0,ae.jsx)("path",{d:"M6 8L2 12l4 4M2 12h8"})]});case"bell":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4"})});case"user":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"12",cy:"7.5",r:"3.5"}),(0,ae.jsx)("path",{d:"M5 20v-1a7 7 0 0 1 14 0v1"})]});case"users":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"9",cy:"7.5",r:"3"}),(0,ae.jsx)("path",{d:"M3.5 20v-1a5.5 5.5 0 0 1 11 0v1M16 5a3 3 0 0 1 0 5.5M20.5 20v-1a5.5 5.5 0 0 0-3.5-5.1"})]});case"binary":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M12 3l8 9-8 9-8-9 8-9z"})});case"board":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3.5",y:"4",width:"4",height:"12",rx:"1"}),(0,ae.jsx)("rect",{x:"10",y:"4",width:"4",height:"16",rx:"1"}),(0,ae.jsx)("rect",{x:"16.5",y:"4",width:"4",height:"8",rx:"1"})]});case"brain":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M12 5a3 3 0 0 0-5.8 1A4 4 0 0 0 4 13a4 4 0 0 0 8 5V5Zm0 0a3 3 0 0 1 5.8 1A4 4 0 0 1 20 13a4 4 0 0 1-8 5M8 10l4 2 4-2"})});case"branch":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,ae.jsx)("circle",{cx:"6",cy:"18",r:"2.5"}),(0,ae.jsx)("circle",{cx:"18",cy:"8",r:"2.5"}),(0,ae.jsx)("path",{d:"M6 8.5v7M18 10.5c0 4-6 2.5-6 6.5"})]});case"calendar":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"4",y:"5",width:"16",height:"16",rx:"2"}),(0,ae.jsx)("path",{d:"M8 3v4M16 3v4M4 10h16M8 14h2M14 14h2M8 18h2M14 18h2"})]});case"chat":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M5.5 4h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5.5 3V6a2 2 0 0 1 2-2Z"}),(0,ae.jsx)("path",{d:"M8 9h8"})]});case"check":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M20 6L9 17l-5-5"})});case"chevron":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M6 9l6 6 6-6"})});case"chevronDown":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M6 9l6 6 6-6"})});case"chevronUp":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M6 15l6-6 6 6"})});case"chevronLeft":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M15 6l-6 6 6 6"})});case"circle":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"7"})});case"clipboard":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"8",y:"3",width:"8",height:"4",rx:"1"}),(0,ae.jsx)("path",{d:"M16 5h2a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V7a2 2 0 012-2h2"})]});case"close":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})});case"copy":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),(0,ae.jsx)("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]});case"cpu":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,ae.jsx)("rect",{x:"10",y:"10",width:"4",height:"4",rx:".5"}),(0,ae.jsx)("path",{d:"M9 3v3M15 3v3M9 18v3M15 18v3M3 9h3M3 15h3M18 9h3M18 15h3"})]});case"download":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3"})});case"edit":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M12 20h9"}),(0,ae.jsx)("path",{d:"M16.5 3.5a2.1 2.1 0 013 3L8 18l-4 1 1-4z"})]});case"enter":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M9 10l-5 5 5 5"}),(0,ae.jsx)("path",{d:"M4 15h11a5 5 0 005-5V4"})]});case"explorer":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M14 3.5H6.5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V9L14 3.5ZM14 3.5V9h5.5M8.5 13h7M8.5 16.5h5"})});case"eye":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"}),(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"file":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9z"}),(0,ae.jsx)("path",{d:"M14 3v6h6"})]});case"folder":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M20.5 18a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2H10l2 3h6.5a2 2 0 0 1 2 2v9Z"})});case"gear":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"m9.5 3-.6 2.5-2.2 1.3-2.5-.7-2.5 4.3 1.9 1.8v2.6l-1.9 1.8 2.5 4.3 2.5-.7 2.2 1.3.6 2.5h5l.6-2.5 2.2-1.3 2.5.7 2.5-4.3-1.9-1.8v-2.6l1.9-1.8-2.5-4.3-2.5.7-2.2-1.3L14.5 3Z",transform:"translate(2 1) scale(.833333)"}),(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"git":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,ae.jsx)("path",{d:"M12 3v6M12 15v6"})]});case"hash":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M4 9h16M4 15h16M10 3L8 21M16 3l-2 18"})});case"history":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ae.jsx)("path",{d:"M12 7v5l3.5 2"})]});case"home":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M4 11l8-7 8 7v9a2 2 0 01-2 2h-4v-7H10v7H6a2 2 0 01-2-2z"})});case"image":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,ae.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,ae.jsx)("path",{d:"m21 15-4.5-4.5L5 21"})]});case"info":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ae.jsx)("path",{d:"M12 11v5M12 8h.01"})]});case"keyboard":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"2",y:"6",width:"20",height:"12",rx:"2"}),(0,ae.jsx)("path",{d:"M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"})]});case"keycaps":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3",y:"4",width:"8",height:"6",rx:"1.5"}),(0,ae.jsx)("rect",{x:"14",y:"4",width:"7",height:"6",rx:"1.5"}),(0,ae.jsx)("rect",{x:"3",y:"13",width:"18",height:"7",rx:"1.5"}),(0,ae.jsx)("path",{d:"M9 16.5h6"})]});case"lock":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),(0,ae.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4M12 15v2"})]});case"unlock":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),(0,ae.jsx)("path",{d:"M8 11V7a4 4 0 0 1 7.8-1.2M12 15v2"})]});case"logout":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9"})});case"markdown":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,ae.jsx)("path",{d:"M7 15V9l3 4 3-4v6"})]});case"merge":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,ae.jsx)("circle",{cx:"6",cy:"18",r:"2.5"}),(0,ae.jsx)("circle",{cx:"18",cy:"18",r:"2.5"}),(0,ae.jsx)("path",{d:"M6 8.5v7M8.5 18H15.5M8.5 6c6 0 7.5 5 7.5 9.5"})]});case"milestone":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M5 21V4"}),(0,ae.jsx)("path",{d:"M5 5h11l-1.6 3.5L16 12H5z"})]});case"pin":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"m9 3 6 0-1 5 4 4v2h-5v7l-1-2-1 2v-7H6v-2l4-4z"})});case"more":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"12",cy:"5",r:"1"}),(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,ae.jsx)("circle",{cx:"12",cy:"19",r:"1"})]});case"paperclip":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M21.44 11.05 12.25 20.24a6 6 0 0 1-8.49-8.49l8.84-8.84a4 4 0 1 1 5.66 5.66L9.41 17.41a2 2 0 1 1-2.83-2.83l8.84-8.83"})});case"parallel":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M12 3l9 5-9 5-9-5 9-5z"}),(0,ae.jsx)("path",{d:"M3 13l9 5 9-5"}),(0,ae.jsx)("path",{d:"M3 17l9 5 9-5"})]});case"pdf":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9z"}),(0,ae.jsx)("path",{d:"M14 3v6h6M8 13h5M8 17h8"})]});case"plus":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M12 5v14M5 12h14"})});case"question":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ae.jsx)("path",{d:"M9.8 9a2.5 2.5 0 113.5 2.3c-.9.4-1.3 1-1.3 2.2M12 17h.01"})]});case"rail":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"3"}),(0,ae.jsx)("path",{d:"M7 4v16"}),(0,ae.jsx)("path",{d:"M11 8h6M11 12h6M11 16h4"})]});case"refresh":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M21 12a9 9 0 11-3-6.7"}),(0,ae.jsx)("path",{d:"M21 3v6h-6"})]});case"resume":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M1 4v6h6M3.5 15A9 9 0 109 3.6L3 10"})});case"search":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,ae.jsx)("path",{d:"M20 20l-3.5-3.5"})]});case"server":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"2",y:"3",width:"20",height:"8",rx:"2"}),(0,ae.jsx)("rect",{x:"2",y:"13",width:"20",height:"8",rx:"2"}),(0,ae.jsx)("path",{d:"M6 7h.01M6 17h.01"})]});case"shield":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})});case"shieldCheck":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),(0,ae.jsx)("path",{d:"M9 12l2 2 4-4"})]});case"sigma":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M18 4H6l7 8-7 8h12"})});case"sliders":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M4 7h10M18 7h2"}),(0,ae.jsx)("circle",{cx:"16",cy:"7",r:"2"}),(0,ae.jsx)("path",{d:"M4 17h2M10 17h10"}),(0,ae.jsx)("circle",{cx:"8",cy:"17",r:"2"})]});case"spark":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M12 2v4M12 18v4M4.9 4.9l2.8 2.8M16.3 16.3l2.8 2.8M2 12h4M18 12h4M4.9 19.1l2.8-2.8M16.3 7.7l2.8-2.8"}),(0,ae.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"sparkle":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M12 3l1.3 3.8L17 8.1l-3.7 1.3L12 13l-1.3-3.6L7 8.1l3.7-1.3L12 3z"}),(0,ae.jsx)("path",{d:"M18 13l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7.7-2z"})]});case"splitHorizontal":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,ae.jsx)("path",{d:"M12 4v16M6 9l3 3-3 3M18 9l-3 3 3 3"})]});case"splitVertical":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,ae.jsx)("path",{d:"M3 12h18M9 7l3 3 3-3M9 17l3-3 3 3"})]});case"stop":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})});case"task":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"5",y:"4",width:"14",height:"16",rx:"2"}),(0,ae.jsx)("path",{d:"M9 9h6M9 13h6M9 17h4"})]});case"terminal":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"2.5",y:"3.5",width:"19",height:"17",rx:"3"}),(0,ae.jsx)("path",{d:"m5 7 5 5-5 5M12 17h7"})]});case"trash":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6"})});case"up":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})});case"video":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,ae.jsx)("path",{d:"m10 9 5 3-5 3z"})]});case"warning":return(0,ae.jsxs)("svg",{...u,children:[(0,ae.jsx)("path",{d:"M12 3l10 18H2L12 3z"}),(0,ae.jsx)("path",{d:"M12 10v5M12 18h.01"})]});case"wrench":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M14.7 6.3a4 4 0 1 1 4 4l-9 9-3.5 1 1-3.5 7.5-7.5z"})});case"zap":return(0,ae.jsx)("svg",{...u,children:(0,ae.jsx)("path",{d:"M13 2L4 14h7l-1 8 9-12h-7l1-8z"})})}}var zh=B(_()),xoe=B(_()),Lp="RC_FORM_INTERNAL_HOOKS",Lr=()=>{Ia(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Eoe=xoe.createContext({getFieldValue:Lr,getFieldsValue:Lr,getFieldError:Lr,getFieldWarning:Lr,getFieldsError:Lr,isFieldsTouched:Lr,isFieldTouched:Lr,isFieldValidating:Lr,isFieldsValidating:Lr,resetFields:Lr,setFields:Lr,setFieldValue:Lr,setFieldsValue:Lr,validateFields:Lr,submit:Lr,getInternalHooks:()=>(Lr(),{dispatch:Lr,initEntityValue:Lr,registerField:Lr,useSubscribe:Lr,setInitialValues:Lr,destroyForm:Lr,setCallbacks:Lr,registerWatch:Lr,getFields:Lr,setValidateMessages:Lr,setPreserve:Lr,getInitialValue:Lr})}),Hp=Eoe;function TF(e){return e==null?[]:Array.isArray(e)?e:[e]}function koe(e){return e&&!!e._init}function Fn(e){return TF(e)}function Cz(e,t){let r={};return t.forEach(n=>{let a=Li(e,n);r=vi(r,n,a)}),r}function qh(e,t,r=!1){return e&&e.some(n=>t2(t,n,r))}function t2(e,t,r=!1){return!e||!t||!r&&e.length!==t.length?!1:t.every((n,a)=>e[a]===n)}function Coe(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;let r=Object.keys(e),n=Object.keys(t);return[...new Set([...r,...n])].every(a=>{let o=e[a],l=t[a];return typeof o=="function"&&typeof l=="function"?!0:o===l})}function Soe(e,...t){let r=t[0];return r&&r.target&&typeof r.target=="object"&&e in r.target?r.target[e]:r}function Sz(e,t,r){let{length:n}=e;if(t<0||t>=n||r<0||r>=n)return e;let a=e[t],o=t-r;return o>0?[...e.slice(0,r),a,...e.slice(r,t),...e.slice(t+1,n)]:o<0?[...e.slice(0,t),...e.slice(t+1,r+1),a,...e.slice(r+1,n)]:e}function BF(e){try{return JSON.stringify(e)}catch{return Math.random()}}function Foe(...e){let[t,r={}]=e,n=koe(r)?{form:r}:r,a=n.form,[o,l]=(0,zh.useState)(()=>typeof t=="function"?t({}):void 0),u=(0,zh.useMemo)(()=>BF(o),[o]),d=(0,zh.useRef)(u);d.current=u;let p=(0,zh.useContext)(Hp),m=a||p,v=m&&m._init,{getFieldsValue:g,getInternalHooks:b}=m,{registerWatch:x}=b(Lp),y=wt((S,F)=>{let $=n.preserve?F??g(!0):S??g(),C=typeof t=="function"?t($):Li($,Fn(t));BF(o)!==BF(C)&&l(C)}),E=typeof t=="function"?t:JSON.stringify(t);return(0,zh.useEffect)(()=>{v&&y()},[v,E]),(0,zh.useEffect)(()=>v?x((S,F)=>{y(S,F)}):void 0,[v]),o}var jz=Foe,$oe=B(_()),Cu=B(_()),Doe=B(_()),Aoe=Doe.createContext(null),wb=Aoe;function jF(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){let e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var _F=jF(),Boe=/%[sdj%]/g,Ioe=()=>{};typeof process<"u"&&process.env;function NF(e){if(!e||!e.length)return null;let t={};return e.forEach(r=>{let n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function go(e,...t){let r=0,n=t.length;return typeof e=="function"?e.apply(null,t):typeof e=="string"?e.replace(Boe,a=>{if(a==="%%")return"%";if(r>=n)return a;switch(a){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch{return"[Circular]"}break;default:return a}}):e}function Moe(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function na(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Moe(t)&&typeof e=="string"&&!e)}function Toe(e,t,r){let n=[],a=0,o=e.length;function l(u){n.push(...u||[]),a++,a===o&&r(n)}e.forEach(u=>{t(u,l)})}function Fz(e,t,r){let n=0,a=e.length;function o(l){if(l&&l.length){r(l);return}let u=n;n=n+1,u<a?t(e[u],o):r([])}o([])}function joe(e){let t=[];return Object.keys(e).forEach(r=>{t.push(...e[r]||[])}),t}var $z=class extends Error{constructor(e,t){super("Async Validation Error"),ie(this,"errors"),ie(this,"fields"),this.errors=e,this.fields=t}};function _oe(e,t,r,n,a){if(t.first){let v=new Promise((g,b)=>{let x=E=>(n(E),E.length?b(new $z(E,NF(E))):g(a)),y=joe(e);Fz(y,r,x)});return v.catch(g=>g),v}let o=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),u=l.length,d=0,p=[],m=new Promise((v,g)=>{let b=x=>{if(p.push.apply(p,x),d++,d===u)return n(p),p.length?g(new $z(p,NF(p))):v(a)};l.length||(n(p),v(a)),l.forEach(x=>{let y=e[x];o.indexOf(x)!==-1?Fz(y,r,b):Toe(y,r,b)})});return m.catch(v=>v),m}function Noe(e){return!!(e&&e.message!==void 0)}function Poe(e,t){let r=e;for(let n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function Dz(e,t){return r=>{let n;return e.fullFields?n=Poe(t,e.fullFields):n=t[r.field||e.fullField],Noe(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function Az(e,t){if(t){for(let r in t)if(t.hasOwnProperty(r)){let n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]={...e[r],...n}:e[r]=n}}return e}var Lh="enum",Roe=(e,t,r,n,a)=>{e[Lh]=Array.isArray(e[Lh])?e[Lh]:[],e[Lh].indexOf(t)===-1&&n.push(go(a.messages[Lh],e.fullField,e[Lh].join(", ")))},Ooe=Roe,zoe=(e,t,r,n,a)=>{e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||n.push(go(a.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||n.push(go(a.messages.pattern.mismatch,e.fullField,t,e.pattern))))},Loe=zoe,Hoe=(e,t,r,n,a)=>{let o=typeof e.len=="number",l=typeof e.min=="number",u=typeof e.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=t,m=null,v=typeof t=="number",g=typeof t=="string",b=Array.isArray(t);if(v?m="number":g?m="string":b&&(m="array"),!m)return!1;b&&(p=t.length),g&&(p=t.replace(d,"_").length),o?p!==e.len&&n.push(go(a.messages[m].len,e.fullField,e.len)):l&&!u&&p<e.min?n.push(go(a.messages[m].min,e.fullField,e.min)):u&&!l&&p>e.max?n.push(go(a.messages[m].max,e.fullField,e.max)):l&&u&&(p<e.min||p>e.max)&&n.push(go(a.messages[m].range,e.fullField,e.min,e.max))},qoe=Hoe,Woe=(e,t,r,n,a,o)=>{e.required&&(!r.hasOwnProperty(e.field)||na(t,o||e.type))&&n.push(go(a.messages.required,e.fullField))},_z=Woe,Yx,Voe=(()=>{if(Yx)return Yx;let e="[a-fA-F\\d:]",t=x=>x&&x.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",a=`(?:${[`(?:${n}:){7}(?:${n}|:)`,`(?:${n}:){6}(?:${r}|:${n}|:)`,`(?:${n}:){5}(?::${r}|(?::${n}){1,2}|:)`,`(?:${n}:){4}(?:(?::${n}){0,1}:${r}|(?::${n}){1,3}|:)`,`(?:${n}:){3}(?:(?::${n}){0,2}:${r}|(?::${n}){1,4}|:)`,`(?:${n}:){2}(?:(?::${n}){0,3}:${r}|(?::${n}){1,5}|:)`,`(?:${n}:){1}(?:(?::${n}){0,4}:${r}|(?::${n}){1,6}|:)`,`(?::(?:(?::${n}){0,5}:${r}|(?::${n}){1,7}|:))`].join("|")})(?:%[0-9a-zA-Z]{1,})?`,o=new RegExp(`(?:^${r}$)|(?:^${a}$)`),l=new RegExp(`^${r}$`),u=new RegExp(`^${a}$`),d=x=>x&&x.exact?o:new RegExp(`(?:${t(x)}${r}${t(x)})|(?:${t(x)}${a}${t(x)})`,"g");d.v4=x=>x&&x.exact?l:new RegExp(`${t(x)}${r}${t(x)}`,"g"),d.v6=x=>x&&x.exact?u:new RegExp(`${t(x)}${a}${t(x)}`,"g");let p="(?:(?:[a-z]+:)?//)",m="(?:\\S+(?::\\S*)?@)?",v=d.v4().source,g=d.v6().source,b=`(?:${p}|www\\.)${m}(?:localhost|${v}|${g}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return Yx=new RegExp(`(?:^${b}$)`,"i"),Yx}),IF={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},vb={integer(e){return vb.number(e)&&parseInt(e,10)===e},float(e){return vb.number(e)&&!vb.integer(e)},array(e){return Array.isArray(e)},regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number(e){return isNaN(e)?!1:typeof e=="number"},object(e){return typeof e=="object"&&!vb.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(IF.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(IF.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Voe())},hex(e){return typeof e=="string"&&!!e.match(IF.hex)}},Uoe=(e,t,r,n,a)=>{if(e.required&&t===void 0){_z(e,t,r,n,a);return}let o=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],l=e.type;o.indexOf(l)>-1?vb[l](t)||n.push(go(a.messages.types[l],e.fullField,e.type)):l&&typeof t!==e.type&&n.push(go(a.messages.types[l],e.fullField,e.type))},Goe=Uoe,Koe=(e,t,r,n,a)=>{(/^\s+$/.test(t)||t==="")&&n.push(go(a.messages.whitespace,e.fullField))},Xoe=Koe,sr={required:_z,whitespace:Xoe,type:Goe,range:qoe,enum:Ooe,pattern:Loe},Qoe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();sr.required(e,t,n,o,a)}r(o)},Yoe=Qoe,Joe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t==null&&!e.required)return r();sr.required(e,t,n,o,a,"array"),t!=null&&(sr.type(e,t,n,o,a),sr.range(e,t,n,o,a))}r(o)},Zoe=Joe,ese=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();sr.required(e,t,n,o,a),t!==void 0&&sr.type(e,t,n,o,a)}r(o)},tse=ese,rse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t,"date")&&!e.required)return r();if(sr.required(e,t,n,o,a),!na(t,"date")){let l;t instanceof Date?l=t:l=new Date(t),sr.type(e,l,n,o,a),l&&sr.range(e,l.getTime(),n,o,a)}}r(o)},nse=rse,ase="enum",ise=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();sr.required(e,t,n,o,a),t!==void 0&&sr[ase](e,t,n,o,a)}r(o)},ose=ise,sse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();sr.required(e,t,n,o,a),t!==void 0&&(sr.type(e,t,n,o,a),sr.range(e,t,n,o,a))}r(o)},lse=sse,use=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();sr.required(e,t,n,o,a),t!==void 0&&(sr.type(e,t,n,o,a),sr.range(e,t,n,o,a))}r(o)},cse=use,dse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();sr.required(e,t,n,o,a),t!==void 0&&sr.type(e,t,n,o,a)}r(o)},pse=dse,fse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t===""&&(t=void 0),na(t)&&!e.required)return r();sr.required(e,t,n,o,a),t!==void 0&&(sr.type(e,t,n,o,a),sr.range(e,t,n,o,a))}r(o)},mse=fse,hse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();sr.required(e,t,n,o,a),t!==void 0&&sr.type(e,t,n,o,a)}r(o)},gse=hse,vse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t,"string")&&!e.required)return r();sr.required(e,t,n,o,a),na(t,"string")||sr.pattern(e,t,n,o,a)}r(o)},bse=vse,yse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();sr.required(e,t,n,o,a),na(t)||sr.type(e,t,n,o,a)}r(o)},wse=yse,xse=(e,t,r,n,a)=>{let o=[],l=Array.isArray(t)?"array":typeof t;sr.required(e,t,n,o,a,l),r(o)},Ese=xse,kse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t,"string")&&!e.required)return r();sr.required(e,t,n,o,a,"string"),na(t,"string")||(sr.type(e,t,n,o,a),sr.range(e,t,n,o,a),sr.pattern(e,t,n,o,a),e.whitespace===!0&&sr.whitespace(e,t,n,o,a))}r(o)},Cse=kse,Sse=(e,t,r,n,a)=>{let o=e.type,l=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t,o)&&!e.required)return r();sr.required(e,t,n,l,a,o),na(t,o)||sr.type(e,t,n,l,a)}r(l)},Jx=Sse,yb={string:Cse,method:pse,number:mse,boolean:tse,regexp:wse,integer:cse,float:lse,array:Zoe,object:gse,enum:ose,pattern:bse,date:nse,url:Jx,hex:Jx,email:Jx,tel:Jx,required:Ese,any:Yoe},bb=class PF{constructor(t){ie(this,"rules",null),ie(this,"_messages",_F),this.define(t)}define(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(r=>{let n=t[r];this.rules[r]=Array.isArray(n)?n:[n]})}messages(t){return t&&(this._messages=Az(jF(),t)),this._messages}validate(t,r={},n=()=>{}){let a=t,o=r,l=n;if(typeof o=="function"&&(l=o,o={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function u(m){let v=[],g={};function b(x){Array.isArray(x)?v=v.concat(...x):v.push(x)}for(let x=0;x<m.length;x++)b(m[x]);v.length?(g=NF(v),l(v,g)):l(null,a)}if(o.messages){let m=this.messages();m===_F&&(m=jF()),Az(m,o.messages),o.messages=m}else o.messages=this.messages();let d={};(o.keys||Object.keys(this.rules)).forEach(m=>{let v=this.rules[m],g=a[m];v.forEach(b=>{let x=b;typeof x.transform=="function"&&(a===t&&(a={...a}),g=a[m]=x.transform(g),g!=null&&(x.type=x.type||(Array.isArray(g)?"array":typeof g))),typeof x=="function"?x={validator:x}:x={...x},x.validator=this.getValidationMethod(x),x.validator&&(x.field=m,x.fullField=x.fullField||m,x.type=this.getType(x),d[m]=d[m]||[],d[m].push({rule:x,value:g,source:a,field:m}))})});let p={};return _oe(d,o,(m,v)=>{let g=m.rule,b=(g.type==="object"||g.type==="array")&&(typeof g.fields=="object"||typeof g.defaultField=="object");b=b&&(g.required||!g.required&&m.value),g.field=m.field;function x(S,F){return{...F,fullField:`${g.fullField}.${S}`,fullFields:g.fullFields?[...g.fullFields,S]:[S]}}function y(S=[]){let F=Array.isArray(S)?S:[S];!o.suppressWarning&&F.length&&PF.warning("async-validator:",F),F.length&&g.message!==void 0&&g.message!==null&&(F=[].concat(g.message));let $=F.map(Dz(g,a));if(o.first&&$.length)return p[g.field]=1,v($);if(!b)v($);else{if(g.required&&!m.value)return g.message!==void 0?$=[].concat(g.message).map(Dz(g,a)):o.error&&($=[o.error(g,go(o.messages.required,g.field))]),v($);let C={};g.defaultField&&Object.keys(m.value).map(M=>{C[M]=g.defaultField}),C={...C,...m.rule.fields};let D={};Object.keys(C).forEach(M=>{let A=C[M],j=Array.isArray(A)?A:[A];D[M]=j.map(x.bind(null,M))});let I=new PF(D);I.messages(o.messages),m.rule.options&&(m.rule.options.messages=o.messages,m.rule.options.error=o.error),I.validate(m.value,m.rule.options||o,M=>{let A=[];$&&$.length&&A.push(...$),M&&M.length&&A.push(...M),v(A.length?A:null)})}}let E;if(g.asyncValidator)E=g.asyncValidator(g,m.value,y,m.source,o);else if(g.validator){try{E=g.validator(g,m.value,y,m.source,o)}catch(S){console.error?.(S),o.suppressValidatorError||setTimeout(()=>{throw S},0),y(S.message)}E===!0?y():E===!1?y(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||`${g.fullField||g.field} fails`):E instanceof Array?y(E):E instanceof Error&&y(E.message)}E&&E.then&&E.then(()=>y(),S=>y(S))},m=>{u(m)},a)}getType(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!yb.hasOwnProperty(t.type))throw new Error(go("Unknown rule type %s",t.type));return t.type||"string"}getValidationMethod(t){if(typeof t.validator=="function")return t.validator;let r=Object.keys(t),n=r.indexOf("message");return n!==-1&&r.splice(n,1),r.length===1&&r[0]==="required"?yb.required:yb[this.getType(t)]||void 0}};ie(bb,"register",function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");yb[e]=t}),ie(bb,"warning",Ioe),ie(bb,"messages",_F),ie(bb,"validators",yb);var Fse=bb,$se=Fse,Bz=B(_()),qi="'${name}' is not a valid ${type}",Nz={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:qi,method:qi,array:qi,object:qi,number:qi,date:qi,boolean:qi,integer:qi,float:qi,regexp:qi,email:qi,tel:qi,url:qi,hex:qi},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Iz=$se;function Dse(e,t){return e.replace(/\\?\$\{\w+\}/g,r=>{if(r.startsWith("\\"))return r.slice(1);let n=r.slice(2,-1);return t[n]})}var Mz="CODE_LOGIC_ERROR";async function RF(e,t,r,n,a){let o={...r};if(delete o.ruleIndex,Iz.warning=()=>{},o.validator){let v=o.validator;o.validator=(...g)=>{try{return v(...g)}catch(b){return console.error(b),Promise.reject(Mz)}}}let l=null;o&&o.type==="array"&&o.defaultField&&(l=o.defaultField,delete o.defaultField);let u=new Iz({[e]:[o]}),d=Yc(Nz,n.validateMessages);u.messages(d);let p=[];try{await Promise.resolve(u.validate({[e]:t},{...n}))}catch(v){v.errors&&(p=v.errors.map(({message:g},b)=>{let x=g===Mz?d.default:g;return Bz.isValidElement(x)?Bz.cloneElement(x,{key:`error_${b}`}):x}))}if(!p.length&&l&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((v,g)=>RF(`${e}.${g}`,v,l,n,a)))).reduce((v,g)=>[...v,...g],[]);let m={...r,name:e,enum:(r.enum||[]).join(", "),...a};return p.map(v=>typeof v=="string"?Dse(v,m):v)}function Ase(e,t,r,n,a,o){let l=e.join("."),u=r.map((p,m)=>{let v=p.validator,g={...p,ruleIndex:m};return v&&(g.validator=(b,x,y)=>{let E=!1,S=v(b,x,(...F)=>{Promise.resolve().then(()=>{Ia(!E,"Your validator function has already return a promise. `callback` will be ignored."),E||y(...F)})});E=S&&typeof S.then=="function"&&typeof S.catch=="function",Ia(E,"`callback` is deprecated. Please return a promise instead."),E&&S.then(()=>{y()}).catch(F=>{y(F||" ")})}),g}).sort(({warningOnly:p,ruleIndex:m},{warningOnly:v,ruleIndex:g})=>!!p==!!v?m-g:p?1:-1),d;if(a===!0)d=new Promise(async(p,m)=>{for(let v=0;v<u.length;v+=1){let g=u[v],b=await RF(l,t,g,n,o);if(b.length){m([{errors:b,rule:g}]);return}}p([])});else{let p=u.map(m=>RF(l,t,m,n,o).then(v=>({errors:v,rule:m})));d=(a?Ise(p):Bse(p)).then(m=>Promise.reject(m))}return d.catch(p=>p),d}async function Bse(e){return Promise.all(e).then(t=>[].concat(...t))}async function Ise(e){let t=0;return new Promise(r=>{e.forEach(n=>{n.then(a=>{a.errors.length&&r([a]),t+=1,t===e.length&&r([])})})})}var Pz=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Mse=class{constructor(e){ie(this,"namePathList",[]),ie(this,"taskId",0),ie(this,"watcherList",new Set),ie(this,"form"),this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(t=>{this.namePathList.every(r=>!t2(r,t))&&this.namePathList.push(t)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;Pz(()=>{if(e===this.taskId&&this.watcherList.size){let t=this.form.getForm(),r=t.getFieldsValue(),n=t.getFieldsValue(!0);this.watcherList.forEach(a=>{a(r,n,this.namePathList)}),this.namePathList=[]}})}};async function Tse(){return new Promise(e=>{Pz(()=>{vr(()=>{e()})})})}function OF(){return OF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},OF.apply(this,arguments)}var zp=[],gb=[];function MF(e,t,r,n,a,o){return typeof e=="function"?e(t,r,"source"in o?{source:o.source}:{}):n!==a}var Rz=class extends Cu.PureComponent{constructor(e){if(super(e),ie(this,"state",{resetCount:0}),ie(this,"cancelRegisterFunc",null),ie(this,"mounted",!1),ie(this,"touched",!1),ie(this,"dirty",!1),ie(this,"validatePromise"),ie(this,"prevValidating"),ie(this,"errors",zp),ie(this,"warnings",gb),ie(this,"cancelRegister",()=>{let{preserve:t,isListField:r,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,t,Fn(n)),this.cancelRegisterFunc=null}),ie(this,"getNamePath",()=>{let{name:t,fieldContext:r}=this.props,{prefixName:n=[]}=r;return t!==void 0?[...n,...t]:[]}),ie(this,"getRules",()=>{let{rules:t=[],fieldContext:r}=this.props;return t.map(n=>typeof n=="function"?n(r):n)}),ie(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:t})=>({resetCount:t+1}))}),ie(this,"metaCache",null),ie(this,"triggerMetaEvent",t=>{let{onMetaChange:r}=this.props;if(r){let n={...this.getMeta(),destroy:t};Qc(this.metaCache,n)||r(n),this.metaCache=n}else this.metaCache=null}),ie(this,"onStoreChange",(t,r,n)=>{let{shouldUpdate:a,dependencies:o=[],onReset:l}=this.props,{store:u}=n,d=this.getNamePath(),p=this.getValue(t),m=this.getValue(u),v=r&&qh(r,d);switch(n.type==="valueUpdate"&&n.source==="external"&&!Qc(p,m)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=zp,this.warnings=gb,this.triggerMetaEvent()),n.type){case"reset":if(!r||v){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=zp,this.warnings=gb,this.triggerMetaEvent(),l?.(),this.refresh();return}break;case"remove":{if(a&&MF(a,t,u,p,m,n)){this.reRender();return}break}case"setField":{let{data:g}=n;if(v){"touched"in g&&(this.touched=g.touched),"validating"in g&&!("originRCField"in g)&&(this.validatePromise=g.validating?Promise.resolve([]):null),"errors"in g&&(this.errors=g.errors||zp),"warnings"in g&&(this.warnings=g.warnings||gb),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in g&&qh(r,d,!0)){this.reRender();return}if(a&&!d.length&&MF(a,t,u,p,m,n)){this.reRender();return}break}case"dependenciesUpdate":{if(o.map(Fn).some(g=>qh(n.relatedFields,g))){this.reRender();return}break}default:if(v||(!o.length||d.length||a)&&MF(a,t,u,p,m,n)){this.reRender();return}break}a===!0&&this.reRender()}),ie(this,"validateRules",t=>{let r=this.getNamePath(),n=this.getValue(),{triggerName:a,validateOnly:o=!1,delayFrame:l}=t||{},u=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:d=!1,messageVariables:p,validateDebounce:m}=this.props;l&&await Tse();let v=this.getRules();if(a&&(v=v.filter(b=>b).filter(b=>{let{validateTrigger:x}=b;return x?TF(x).includes(a):!0})),m&&a&&(await new Promise(b=>{setTimeout(b,m)}),this.validatePromise!==u))return[];let g=Ase(r,n,v,t,d,p);return g.catch(b=>b).then((b=zp)=>{if(this.validatePromise===u){this.validatePromise=null;let x=[],y=[];b.forEach?.(({rule:{warningOnly:E},errors:S=zp})=>{E?y.push(...S):x.push(...S)}),this.errors=x,this.warnings=y,this.triggerMetaEvent(),this.reRender()}}),g});return o||(this.validatePromise=u,this.dirty=!0,this.errors=zp,this.warnings=gb,this.triggerMetaEvent(),this.reRender()),u}),ie(this,"isFieldValidating",()=>!!this.validatePromise),ie(this,"isFieldTouched",()=>this.touched),ie(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:t}=this.props,{getInitialValue:r}=t.getInternalHooks(Lp);return r(this.getNamePath())!==void 0}),ie(this,"getErrors",()=>this.errors),ie(this,"getWarnings",()=>this.warnings),ie(this,"isListField",()=>this.props.isListField),ie(this,"isList",()=>this.props.isList),ie(this,"isPreserve",()=>this.props.preserve),ie(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null})),ie(this,"getOnlyChild",t=>{if(typeof t=="function"){let n=this.getMeta();return{...this.getOnlyChild(t(this.getControlled(),n,this.props.fieldContext)),isFunction:!0}}let r=xr(t);return r.length!==1||!Cu.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}}),ie(this,"getValue",t=>{let{getFieldsValue:r}=this.props.fieldContext,n=this.getNamePath();return Li(t||r(!0),n)}),ie(this,"getControlled",(t={})=>{let{name:r,trigger:n="onChange",validateTrigger:a,getValueFromEvent:o,normalize:l,valuePropName:u="value",getValueProps:d,fieldContext:p}=this.props,m=a!==void 0?a:p.validateTrigger,v=this.getNamePath(),{getInternalHooks:g,getFieldsValue:b}=p,{dispatch:x}=g(Lp),y=this.getValue(),E=d||(C=>({[u]:C})),S=t[n],F=r!==void 0?E(y):{},$={...t,...F};return $[n]=(...C)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let D=this.getValue(),I;o?I=o(...C):I=Soe(u,...C),l&&(I=l(I,D,b(!0))),I!==D&&x({type:"updateValue",namePath:v,value:I}),S&&S(...C)},TF(m||[]).forEach(C=>{let D=$[C];$[C]=(...I)=>{D&&D(...I);let{rules:M}=this.props;M&&M.length&&x({type:"validateField",namePath:v,triggerName:C})}}),$}),e.fieldContext){let{getInternalHooks:t}=e.fieldContext,{initEntityValue:r}=t(Lp);r(this)}}componentDidMount(){let{shouldUpdate:e,fieldContext:t}=this.props;if(this.mounted=!0,t){let{getInternalHooks:r}=t,{registerField:n}=r(Lp);this.cancelRegisterFunc=n(this)}e===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:r,isFunction:n}=this.getOnlyChild(t),a;return n?a=r:Cu.isValidElement(r)?a=Cu.cloneElement(r,this.getControlled(r.props)):(Ia(!r,"`children` of Field is not validate ReactElement."),a=r),Cu.createElement(Cu.Fragment,{key:e},a)}};ie(Rz,"contextType",Hp);function jse({name:e,...t}){let r=Cu.useContext(Hp),n=Cu.useContext(wb),a=e!==void 0?Fn(e):void 0,o=t.isListField??!!n,l="keep";return o||(l=`_${(a||[]).join("_")}`),Cu.createElement(Rz,OF({key:l,name:a,isListField:o},t,{fieldContext:r}))}var qF=jse,ku=B(_());function _se({name:e,initialValue:t,children:r,rules:n,validateTrigger:a,isListField:o}){let l=ku.useContext(Hp),u=ku.useContext(wb),d=ku.useRef({keys:[],id:0}).current,p=ku.useMemo(()=>[...Fn(l.prefixName)||[],...Fn(e)],[l.prefixName,e]),m=ku.useMemo(()=>({...l,prefixName:p}),[l,p]),v=ku.useMemo(()=>({getKey:b=>{let x=p.length,y=b[x];return[d.keys[y],b.slice(x+1)]}}),[d,p]);if(typeof r!="function")return Ia(!1,"Form.List only accepts function as children."),null;let g=(b,x,{source:y})=>y==="internal"?!1:b!==x;return ku.createElement(wb.Provider,{value:v},ku.createElement(Hp.Provider,{value:m},ku.createElement(qF,{name:[],shouldUpdate:g,rules:n,validateTrigger:a,initialValue:t,isList:!0,isListField:o??!!u},({value:b=[],onChange:x},y)=>{let{getFieldValue:E}=l,S=()=>E(p||[])||[],F={add:(C,D)=>{let I=S();D>=0&&D<=I.length?(d.keys=[...d.keys.slice(0,D),d.id,...d.keys.slice(D)],x([...I.slice(0,D),C,...I.slice(D)])):(d.keys=[...d.keys,d.id],x([...I,C])),d.id+=1},remove:C=>{let D=S(),I=new Set(Array.isArray(C)?C:[C]);I.size<=0||(d.keys=d.keys.filter((M,A)=>!I.has(A)),x(D.filter((M,A)=>!I.has(A))))},move(C,D){if(C===D)return;let I=S();C<0||C>=I.length||D<0||D>=I.length||(d.keys=Sz(d.keys,C,D),x(Sz(I,C,D)))}},$=b||[];return Array.isArray($)||($=[]),r($.map((C,D)=>{let I=d.keys[D];return I===void 0&&(d.keys[D]=d.id,I=d.keys[D],d.id+=1),{name:D,key:I,isListField:!0}}),F,y)})))}var Oz=_se,Tz=B(_());function Nse(e){let t=!1,r=e.length,n=[];return e.length?new Promise((a,o)=>{e.forEach((l,u)=>{l.catch(d=>(t=!0,d)).then(d=>{r-=1,n[u]=d,!(r>0)&&(t&&o(n),a(n))})})}):Promise.resolve([])}var zF="__@field_split__";function Zx(e){return e.map(t=>`${typeof t}:${t}`).join(zF)}var Pse=class{constructor(){ie(this,"kvs",new Map)}set(e,t){this.kvs.set(Zx(e),t)}get(e){return this.kvs.get(Zx(e))}getAsPrefix(e){let t=Zx(e),r=t+zF,n=[],a=this.kvs.get(t);return a!==void 0&&n.push(a),this.kvs.forEach((o,l)=>{l.startsWith(r)&&n.push(o)}),n}update(e,t){let r=this.get(e),n=t(r);n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(Zx(e))}map(e){return[...this.kvs.entries()].map(([t,r])=>{let n=t.split(zF);return e({key:n.map(a=>{let[,o,l]=a.match(/^([^:]*):(.*)$/);return o==="number"?Number(l):l}),value:r})})}toJSON(){let e={};return this.map(({key:t,value:r})=>(e[t.join(".")]=r,null)),e}},Hh=Pse,Rse=class{constructor(e){ie(this,"formHooked",!1),ie(this,"forceRootUpdate"),ie(this,"subscribable",!0),ie(this,"store",{}),ie(this,"fieldEntities",[]),ie(this,"initialValues",{}),ie(this,"callbacks",{}),ie(this,"validateMessages",null),ie(this,"preserve",null),ie(this,"lastValidatePromise",null),ie(this,"watcherCenter",new Mse(this)),ie(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks})),ie(this,"getInternalHooks",t=>t===Lp?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(Ia(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)),ie(this,"useSubscribe",t=>{this.subscribable=t}),ie(this,"prevWithoutPreserves",null),ie(this,"setInitialValues",(t,r)=>{if(this.initialValues=t||{},r){let n=Yc(t,this.store);this.prevWithoutPreserves?.map(({key:a})=>{n=vi(n,a,Li(t,a))}),this.prevWithoutPreserves=null,this.updateStore(n)}}),ie(this,"destroyForm",t=>{if(t)this.updateStore({});else{let r=new Hh;this.getFieldEntities(!0).forEach(n=>{this.isMergedPreserve(n.isPreserve())||r.set(n.getNamePath(),!0)}),this.prevWithoutPreserves=r}}),ie(this,"getInitialValue",t=>{let r=Li(this.initialValues,t);return t.length?Yc(r):r}),ie(this,"setCallbacks",t=>{this.callbacks=t}),ie(this,"setValidateMessages",t=>{this.validateMessages=t}),ie(this,"setPreserve",t=>{this.preserve=t}),ie(this,"registerWatch",t=>this.watcherCenter.register(t)),ie(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)}),ie(this,"timeoutId",null),ie(this,"warningUnhooked",()=>{}),ie(this,"updateStore",t=>{this.store=t}),ie(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(r=>r.getNamePath().length):this.fieldEntities),ie(this,"getFieldsMap",(t=!1)=>{let r=new Hh;return this.getFieldEntities(t).forEach(n=>{let a=n.getNamePath();r.set(a,n)}),r}),ie(this,"getFieldEntitiesForNamePathList",(t,r=!1)=>{if(!t)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return r?t.flatMap(a=>{let o=Fn(a),l=n.getAsPrefix(o);return l.length?l:[{INVALIDATE_NAME_PATH:o}]}):t.map(a=>{let o=Fn(a);return n.get(o)||{INVALIDATE_NAME_PATH:Fn(a)}})}),ie(this,"getFieldsValue",(t,r)=>{this.warningUnhooked();let n,a;if(t===!0||Array.isArray(t)?(n=t,a=r):t&&typeof t=="object"&&(a=t.filter),n===!0&&!a)return this.store;let o=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),l=[],u=[];o.forEach(p=>{let m=p.INVALIDATE_NAME_PATH||p.getNamePath();if(p.isList?.()){u.push(m);return}if(!a)l.push(m);else{let v="getMeta"in p?p.getMeta():null;a(v)&&l.push(m)}});let d=Cz(this.store,l.map(Fn));return u.forEach(p=>{Li(d,p)||(d=vi(d,p,[]))}),d}),ie(this,"getFieldValue",t=>{this.warningUnhooked();let r=Fn(t);return Li(this.store,r)}),ie(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,n)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:Fn(t[n]),errors:[],warnings:[]}))),ie(this,"getFieldError",t=>{this.warningUnhooked();let r=Fn(t);return this.getFieldsError([r])[0].errors}),ie(this,"getFieldWarning",t=>{this.warningUnhooked();let r=Fn(t);return this.getFieldsError([r])[0].warnings}),ie(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();let[r,n]=t,a,o=!1;t.length===0?a=null:t.length===1?Array.isArray(r)?(a=r.map(Fn),o=!1):(a=null,o=r):(a=r.map(Fn),o=n);let l=this.getFieldEntities(!0),u=v=>v.isFieldTouched();if(!a)return o?l.every(v=>u(v)||v.isList()):l.some(u);let d=new Hh;a.forEach(v=>{d.set(v,[])}),l.forEach(v=>{let g=v.getNamePath();a.forEach(b=>{b.every((x,y)=>g[y]===x)&&d.update(b,x=>[...x,v])})});let p=v=>v.some(u),m=d.map(({value:v})=>v);return o?m.every(p):m.some(p)}),ie(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t]))),ie(this,"isFieldsValidating",t=>{this.warningUnhooked();let r=this.getFieldEntities();if(!t)return r.some(a=>a.isFieldValidating());let n=t.map(Fn);return r.some(a=>{let o=a.getNamePath();return qh(n,o)&&a.isFieldValidating()})}),ie(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t]))),ie(this,"resetWithFieldInitialValue",(t={})=>{let r=new Hh,n=this.getFieldEntities(!0);n.forEach(l=>{let{initialValue:u}=l.props,d=l.getNamePath();if(u!==void 0){let p=r.get(d)||new Set;p.add({entity:l,value:u}),r.set(d,p)}});let a=l=>{l.forEach(u=>{let{initialValue:d}=u.props;if(d!==void 0){let p=u.getNamePath();if(this.getInitialValue(p)!==void 0)Ia(!1,`Form already set 'initialValues' with path '${p.join(".")}'. Field can not overwrite it.`);else{let m=r.get(p);if(m&&m.size>1)Ia(!1,`Multiple Field with path '${p.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(m){let v=this.getFieldValue(p);!u.isListField()&&(!t.skipExist||v===void 0)&&this.updateStore(vi(this.store,p,[...m][0].value))}}}})},o;t.entities?o=t.entities:t.namePathList?(o=[],t.namePathList.forEach(l=>{let u=r.get(l);u&&o.push(...[...u].map(d=>d.entity))})):o=n,a(o)}),ie(this,"resetFields",t=>{this.warningUnhooked();let r=this.store;if(!t){this.updateStore(Yc(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(r,null,{type:"reset"}),this.notifyWatch();return}let n=t.map(Fn);n.forEach(a=>{let o=this.getInitialValue(a);this.updateStore(vi(this.store,a,o))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(r,n,{type:"reset"}),this.notifyWatch(n)}),ie(this,"setFields",t=>{this.warningUnhooked();let r=this.store,n=[];t.forEach(a=>{let{name:o,...l}=a,u=Fn(o);n.push(u),"value"in l&&this.updateStore(vi(this.store,u,l.value)),this.notifyObservers(r,[u],{type:"setField",data:a})}),this.notifyWatch(n)}),ie(this,"getFields",()=>this.getFieldEntities(!0).map(t=>{let r=t.getNamePath(),n={...t.getMeta(),name:r,value:this.getFieldValue(r)};return Object.defineProperty(n,"originRCField",{value:!0}),n})),ie(this,"initEntityValue",t=>{let{initialValue:r}=t.props;if(r!==void 0){let n=t.getNamePath();Li(this.store,n)===void 0&&this.updateStore(vi(this.store,n,r))}}),ie(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0),ie(this,"registerField",t=>{this.fieldEntities.push(t);let r=t.getNamePath();if(this.notifyWatch([r]),t.props.initialValue!==void 0){let n=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(n,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(n,a,o=[])=>{if(this.fieldEntities=this.fieldEntities.filter(l=>l!==t),!this.isMergedPreserve(a)&&(!n||o.length>1)){let l=n?void 0:this.getInitialValue(r);if(r.length&&this.getFieldValue(r)!==l&&this.fieldEntities.every(u=>!t2(u.getNamePath(),r))){let u=this.store;this.updateStore(vi(u,r,l,!0)),this.notifyObservers(u,[r],{type:"remove"}),this.triggerDependenciesUpdate(u,r)}}this.notifyWatch([r])}}),ie(this,"dispatch",t=>{switch(t.type){case"updateValue":{let{namePath:r,value:n}=t;this.updateValue(r,n);break}case"validateField":{let{namePath:r,triggerName:n}=t;this.validateFields([r],{triggerName:n});break}default:}}),ie(this,"notifyObservers",(t,r,n)=>{if(this.subscribable){let a={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:o})=>{o(t,r,a)})}else this.forceRootUpdate()}),ie(this,"triggerDependenciesUpdate",(t,r)=>{let n=this.getDependencyChildrenFields(r);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(t,n,{type:"dependenciesUpdate",relatedFields:[r,...n]}),n}),ie(this,"updateValue",(t,r)=>{let n=Fn(t),a=this.store;this.updateStore(vi(this.store,n,r)),this.notifyObservers(a,[n],{type:"valueUpdate",source:"internal"}),this.notifyWatch([n]);let o=this.triggerDependenciesUpdate(a,n),{onValuesChange:l}=this.callbacks;if(l){let u=Cz(this.store,[n]),d=this.getFieldsValue(),p=vi(d,n,Li(u,n));l(u,p)}this.triggerOnFieldsChange([n,...o])}),ie(this,"setFieldsValue",t=>{this.warningUnhooked();let r=this.store;if(t){let n=Yc(this.store,t);this.updateStore(n)}this.notifyObservers(r,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()}),ie(this,"setFieldValue",(t,r)=>{this.setFields([{name:t,value:r,errors:[],warnings:[],touched:!0}])}),ie(this,"getDependencyChildrenFields",t=>{let r=new Set,n=[],a=new Hh;this.getFieldEntities().forEach(l=>{let{dependencies:u}=l.props;(u||[]).forEach(d=>{let p=Fn(d);a.update(p,(m=new Set)=>(m.add(l),m))})});let o=l=>{(a.get(l)||new Set).forEach(u=>{if(!r.has(u)){r.add(u);let d=u.getNamePath();u.isFieldDirty()&&d.length&&(n.push(d),o(d))}})};return o(t),n}),ie(this,"triggerOnFieldsChange",(t,r)=>{let{onFieldsChange:n}=this.callbacks;if(n){let a=this.getFields();if(r){let l=new Hh;r.forEach(({name:u,errors:d})=>{l.set(u,d)}),a.forEach(u=>{u.errors=l.get(u.name)||u.errors})}let o=a.filter(({name:l})=>qh(t,l));o.length&&n(o,a)}}),ie(this,"validateFields",(t,r)=>{this.warningUnhooked();let n,a;Array.isArray(t)||typeof t=="string"||typeof r=="string"?(n=t,a=r):a=t;let o=!!n,l=o?n.map(Fn):[],u=[...l],d=[],p=String(Date.now()),m=new Set,{recursive:v,dirty:g}=a||{};this.getFieldEntities(!0).forEach(E=>{let S=E.getNamePath();if(o||((!E.isList()||!l.some(F=>t2(F,S,!0)))&&u.push(S),l.push(S)),!(!E.props.rules||!E.props.rules.length)&&!(g&&!E.isFieldDirty())&&(m.add(S.join(p)),!o||qh(l,S,v))){let F=E.validateRules({validateMessages:{...Nz,...this.validateMessages},...a});d.push(F.then(()=>({name:S,errors:[],warnings:[]})).catch($=>{let C=[],D=[];return $.forEach?.(({rule:{warningOnly:I},errors:M})=>{I?D.push(...M):C.push(...M)}),C.length?Promise.reject({name:S,errors:C,warnings:D}):{name:S,errors:C,warnings:D}}))}});let b=Nse(d);this.lastValidatePromise=b,b.catch(E=>E).then(E=>{let S=E.map(({name:F})=>F);this.notifyObservers(this.store,S,{type:"validateFinish"}),this.triggerOnFieldsChange(S,E)});let x=b.then(()=>this.lastValidatePromise===b?Promise.resolve(this.getFieldsValue(u)):Promise.reject([])).catch(E=>{let S=E.filter($=>$&&$.errors.length),F=S[0]?.errors?.[0];return Promise.reject({message:F,values:this.getFieldsValue(l),errorFields:S,outOfDate:this.lastValidatePromise!==b})});x.catch(E=>E);let y=l.filter(E=>m.has(E.join(p)));return this.triggerOnFieldsChange(y),x}),ie(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{let{onFinish:r}=this.callbacks;if(r)try{r(t)}catch(n){console.error(n)}}).catch(t=>{let{onFinishFailed:r}=this.callbacks;r&&r(t)})}),this.forceRootUpdate=e}};function Ose(e){let t=Tz.useRef(null),[,r]=Tz.useState({});if(!t.current)if(e)t.current=e;else{let n=()=>{r({})},a=new Rse(n);t.current=a.getForm()}return[t.current]}var WF=Ose,Ho=B(_()),e2=B(_()),LF=e2.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),zz=({validateMessages:e,onFormChange:t,onFormFinish:r,children:n})=>{let a=e2.useContext(LF),o=e2.useRef({});return e2.createElement(LF.Provider,{value:{...a,validateMessages:{...a.validateMessages,...e},triggerFormChange:(l,u)=>{t&&t(l,{changedFields:u,forms:o.current}),a.triggerFormChange(l,u)},triggerFormFinish:(l,u)=>{r&&r(l,{values:u,forms:o.current}),a.triggerFormFinish(l,u)},registerForm:(l,u)=>{l&&(o.current={...o.current,[l]:u}),a.registerForm(l,u)},unregisterForm:l=>{let u={...o.current};delete u[l],o.current=u,a.unregisterForm(l)}}},n)},zse=LF;function HF(){return HF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},HF.apply(this,arguments)}var Lse=(e,t)=>{let{name:r,initialValues:n,fields:a,form:o,preserve:l,children:u,component:d="form",validateMessages:p,validateTrigger:m="onChange",onValuesChange:v,onFieldsChange:g,onFinish:b,onFinishFailed:x,clearOnDestroy:y,...E}=e,S=Ho.useRef(null),F=Ho.useContext(zse),[$]=WF(o),{useSubscribe:C,setInitialValues:D,setCallbacks:I,setValidateMessages:M,setPreserve:A,destroyForm:j}=$.getInternalHooks(Lp);Ho.useImperativeHandle(t,()=>({...$,nativeElement:S.current})),Ho.useEffect(()=>(F.registerForm(r,$),()=>{F.unregisterForm(r)}),[F,$,r]),M({...F.validateMessages,...p}),I({onValuesChange:v,onFieldsChange:(z,...L)=>{F.triggerFormChange(r,z),g&&g(z,...L)},onFinish:z=>{F.triggerFormFinish(r,z),b&&b(z)},onFinishFailed:x}),A(l);let P=Ho.useRef(null);D(n,!P.current),P.current||(P.current=!0),Ho.useEffect(()=>()=>j(y),[]);let O,V=typeof u=="function";if(V){let z=$.getFieldsValue(!0);O=u(z,$)}else O=u;C(!V);let W=Ho.useRef(null);Ho.useEffect(()=>{Coe(W.current||[],a||[])||$.setFields(a||[]),W.current=a},[a,$]);let H=Ho.useMemo(()=>({...$,validateTrigger:m}),[$,m]),q=Ho.createElement(wb.Provider,{value:null},Ho.createElement(Hp.Provider,{value:H},O));return d===!1?q:Ho.createElement(d,HF({},E,{ref:S,onSubmit:z=>{z.preventDefault(),z.stopPropagation(),$.submit()},onReset:z=>{z.preventDefault(),$.resetFields(),E.onReset?.(z)}}),q)},Hse=Lse,qse=$oe.forwardRef(Hse),Wh=qse;Wh.FormProvider=zz;Wh.Field=qF;Wh.List=Oz;Wh.useForm=WF;Wh.useWatch=jz;var Wse=Wh,Su=B(_()),Vse=Su.createContext({labelAlign:"right",layout:"horizontal",itemRef:()=>{}}),Use=Su.createContext(null),Gse=e=>{let t=Ut(e,["prefixCls"]);return Su.createElement(zz,{...t})},Kse=Su.createContext({prefixCls:""}),vo=Su.createContext({}),VF=({children:e,status:t,override:r})=>{let n=Su.useContext(vo),a=Su.useMemo(()=>{let o={...n};return r&&delete o.isFormItemInput,t&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[t,r,n]);return Su.createElement(vo.Provider,{value:a},e)},UF=Su.createContext(void 0);var Lz=B(_()),Xse=(e,t,r,n)=>{let a=Lz.useContext(st),{variant:o,[e]:l}=a,u=Lz.useContext(UF),d=n?a[n]:void 0,p=l?.variant??d?.variant,m=typeof t<"u"||r===!1||typeof u<"u"||typeof p<"u"||typeof o<"u",v;typeof t<"u"?v=t:r===!1?v="borderless":v=u??p??o??"outlined";let g=bF.includes(v);return[v,g,m]},Fu=Xse;function xb(...e){return e.find(t=>t!==void 0)}var qp=(e,t,r)=>Z({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r}),Vh=(e,t)=>t||e;var Hz=B(_()),Qse=e=>{let t=Hz.default.useContext(Rh);return Hz.default.useMemo(()=>e?ti(e)?e??t:cr(e)?e(t):t:t,[e,t])},Ur=Qse,GF=()=>({height:0,opacity:0}),qz=e=>({height:e?.scrollHeight??0,opacity:e?1:0}),Yse=e=>({height:e?.offsetHeight??0}),KF=(e,t)=>t?.deadline===!0||lb(t)&&t.propertyName==="height",Jse=(e=Gc)=>({motionName:`${e}-motion-collapse`,onAppearStart:GF,onEnterStart:GF,onAppearActive:qz,onEnterActive:qz,onLeaveStart:Yse,onLeaveActive:GF,onAppearEnd:KF,onEnterEnd:KF,onLeaveEnd:KF,motionDeadline:500}),Wp=(e,t,r)=>r!==void 0?r:`${e}-${t}`,Eb=Jse,Wz=e=>({animationDuration:e,animationFillMode:"both"}),r2=(e,t,r,n,a=!1)=>{let o=a?"&":"";return{[`
136
- ${o}${e}-enter,
137
- ${o}${e}-appear
138
- `]:{...Wz(n),animationPlayState:"paused"},[`${o}${e}-leave`]:{...Wz(n),animationPlayState:"paused"},[`
139
- ${o}${e}-enter${e}-enter-active,
140
- ${o}${e}-appear${e}-appear-active
141
- `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},Zse=new Dt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),ele=new Dt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),XF=(e,t=!1)=>{let{antCls:r}=e,n=`${r}-fade`,a=t?"&":"";return[r2(n,Zse,ele,e.motionDurationMid,t),{[`
142
- ${a}${n}-enter,
143
- ${a}${n}-appear
144
- `]:{opacity:0,animationTimingFunction:"linear"},[`${a}${n}-leave`]:{animationTimingFunction:"linear"}}]},Uh=new Dt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Gh=new Dt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Kh=new Dt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Xh=new Dt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),n2=new Dt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),a2=new Dt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),i2=new Dt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),o2=new Dt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),tle={"slide-up":{inKeyframes:Uh,outKeyframes:Gh},"slide-down":{inKeyframes:Kh,outKeyframes:Xh},"slide-left":{inKeyframes:n2,outKeyframes:a2},"slide-right":{inKeyframes:i2,outKeyframes:o2}},qo=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=tle[t];return[r2(n,a,o,e.motionDurationMid),{[`
145
- ${n}-enter,
146
- ${n}-appear
147
- `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},Wo=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),Qh=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}}),Gz=new Dt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),rle=new Dt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Vz=new Dt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Uz=new Dt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),nle=new Dt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),ale=new Dt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),ile=new Dt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),ole=new Dt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),sle=new Dt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),lle=new Dt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),ule=new Dt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),cle=new Dt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),dle={zoom:{inKeyframes:Gz,outKeyframes:rle},"zoom-big":{inKeyframes:Vz,outKeyframes:Uz},"zoom-big-fast":{inKeyframes:Vz,outKeyframes:Uz},"zoom-left":{inKeyframes:ile,outKeyframes:ole},"zoom-right":{inKeyframes:sle,outKeyframes:lle},"zoom-up":{inKeyframes:nle,outKeyframes:ale},"zoom-down":{inKeyframes:ule,outKeyframes:cle}},$u=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=dle[t];return[r2(n,a,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
148
- ${n}-enter,
149
- ${n}-appear
150
- `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},ple=e=>{let{componentCls:t,antCls:r,motionDurationMid:n,motionEaseInOut:a}=e;return{[t]:{[`${r}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(o=>`${o} ${n} ${a}`).join(", ")} !important`}},[`${r}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(o=>`${o} ${n} ${a}`).join(", ")} !important`}}}},kb=ple,fle=new Dt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),mle=new Dt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),hle=new Dt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),gle=new Dt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),vle=new Dt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ble=new Dt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),yle=new Dt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),wle=new Dt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),xle={"move-up":{inKeyframes:yle,outKeyframes:wle},"move-down":{inKeyframes:fle,outKeyframes:mle},"move-left":{inKeyframes:hle,outKeyframes:gle},"move-right":{inKeyframes:vle,outKeyframes:ble}},s2=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=xle[t];return[r2(n,a,o,e.motionDurationMid),{[`
151
- ${n}-enter,
152
- ${n}-appear
153
- `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var Ele=B(_()),Kz=e=>e==="horizontal"||e==="vertical",Vo=(e,t,r)=>(0,Ele.useMemo)(()=>{let n=Kz(e),a;return n?a=e:typeof t=="boolean"?a=t?"vertical":"horizontal":a=Kz(r)?r:"horizontal",[a,a==="vertical"]},[r,e,t]),Wi=B(_()),kle=e=>{let{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},Cle=pt(["Space","Compact"],kle,()=>({}),{resetStyle:!1}),l2=Wi.createContext(null),ml=(e,t)=>{let r=Wi.useContext(l2),n=Wi.useMemo(()=>{if(!r)return"";let{compactDirection:a,isFirstItem:o,isLastItem:l}=r,u=a==="vertical"?"-vertical-":"-";return Z(`${e}-compact${u}item`,{[`${e}-compact${u}first-item`]:o,[`${e}-compact${u}last-item`]:l,[`${e}-compact${u}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r?.compactSize,compactDirection:r?.compactDirection,compactItemClassnames:n}},YF=e=>{let{children:t}=e;return Wi.createElement(l2.Provider,{value:null},t)},Sle=e=>{let{children:t,...r}=e;return Wi.createElement(l2.Provider,{value:Wi.useMemo(()=>r,[r])},t)},Fle=Wi.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=Wi.useContext(st),{size:a,direction:o,orientation:l,block:u,prefixCls:d,className:p,rootClassName:m,children:v,vertical:g,...b}=e,[x,y]=Vo(l,g,o),E=Ur(A=>a??A),S=r("space-compact",d),[F]=Cle(S),$=Z(S,F,{[`${S}-rtl`]:n==="rtl",[`${S}-block`]:u,[`${S}-vertical`]:y},p,m),C=Wi.useContext(l2),D=Wi.useRef(null);Wi.useImperativeHandle(t,()=>({nativeElement:D.current}));let I=xr(v),M=Wi.useMemo(()=>I.map((A,j)=>{let P=A?.key||`${S}-item-${j}`;return Wi.createElement(Sle,{key:P,compactSize:E,compactDirection:x,isFirstItem:j===0&&(!C||C?.isFirstItem),isLastItem:j===I.length-1&&(!C||C?.isLastItem)},A)}),[I,C,x,E,S]);return I.length===0?null:Wi.createElement("div",{ref:D,className:$,...b},M)}),Cb=Fle,ADe=B(_()),QF=e=>Math.round(Number(e||0)),$le=e=>{if(e instanceof Ar)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){let{b:t,...r}=e;return{...r,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},Vp=class extends Ar{constructor(e){super($le(e))}toHsbString(){let e=this.toHsb(),t=QF(e.s*100),r=QF(e.b*100),n=QF(e.h),a=e.a,o=`hsb(${n}, ${t}%, ${r}%)`,l=`hsba(${n}, ${t}%, ${r}%, ${a.toFixed(a===0?0:2)})`;return a===1?o:l}toHsb(){let{v:e,...t}=this.toHsv();return{...t,b:e,a:this.a}}},Dle=e=>e instanceof Vp?e:new Vp(e),BDe=Dle("#1677ff"),IDe=B(_()),MDe=B(_()),TDe=B(_()),jDe=B(_()),_De=B(_()),NDe=B(_()),PDe=B(_()),RDe=B(_()),ODe=B(_()),zDe=B(_()),Ale=(e,t)=>e?.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6)||"",Ble=(e,t)=>e?Ale(e,t):"",Up=(function(){function e(t){if(xu(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=t.colors?.map(n=>({color:new e(n.color),percent:n.percent})),this.cleared=t.cleared;return}let r=Array.isArray(t);r&&t.length?(this.colors=t.map(({color:n,percent:a})=>({color:new e(n),percent:a})),this.metaColor=new Vp(this.colors[0].color.metaColor)):this.metaColor=new Vp(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Eu(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return Ble(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){let{colors:t}=this;return t?`linear-gradient(90deg, ${t.map(r=>`${r.color.toRgbString()} ${r.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(t){return!t||this.isGradient()!==t.isGradient()?!1:this.isGradient()?this.colors.length===t.colors.length&&this.colors.every((r,n)=>{let a=t.colors[n];return r.percent===a.percent&&r.color.equals(a.color)}):this.toHexString()===t.toHexString()}}])})(),JF=e=>e instanceof Up?e:new Up(e);var Xz=B(_()),Ile=e=>{let{space:t,form:r,children:n}=e;if(!Lt(n))return null;let a=n;return r&&(a=Xz.default.createElement(VF,{override:!0,status:!0},a)),t&&(a=Xz.default.createElement(YF,null,a)),a},td=Ile;var Qz=B(_()),Mle={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},Tle=Mle;function ZF(){return ZF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ZF.apply(this,arguments)}var jle=(e,t)=>Qz.createElement(Zt,ZF({},e,{ref:t,icon:Tle})),_le=Qz.forwardRef(jle),Gp=_le;function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jn.apply(null,arguments)}var Yh=B(_()),iL=B(_()),Nle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},Ple=Nle;function o7(){return o7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o7.apply(this,arguments)}var Rle=(e,t)=>iL.createElement(Zt,o7({},e,{ref:t,icon:Ple})),Ole=iL.forwardRef(Rle),Au=Ole,Yz=B(_()),oL=B(_()),Du=B(_()),Sb=B(_()),zle=Sb.default.forwardRef((e,t)=>{let{prefixCls:r,forceRender:n,className:a,style:o,children:l,isActive:u,role:d,classNames:p,styles:m}=e,[v,g]=Sb.default.useState(u||n);return Sb.default.useEffect(()=>{(n||u)&&g(!0)},[n,u]),v?Sb.default.createElement("div",{ref:t,className:Z(`${r}-panel`,{[`${r}-panel-active`]:u,[`${r}-panel-inactive`]:!u},a),style:o,role:d},Sb.default.createElement("div",{className:Z(`${r}-body`,p?.body),style:m?.body},l)):null}),Lle=zle,Hle=Du.default.forwardRef((e,t)=>{let{showArrow:r=!0,headerClass:n,isActive:a,onItemClick:o,forceRender:l,className:u,classNames:d={},styles:p={},prefixCls:m,collapsible:v,accordion:g,panelKey:b,extra:x,header:y,expandIcon:E,openMotion:S,destroyOnHidden:F,children:$,...C}=e,D=v==="disabled",I=x!=null&&typeof x!="boolean",M={onClick:()=>{o?.(b)},onKeyDown:V=>{(V.key==="Enter"||V.keyCode===vn.ENTER||V.which===vn.ENTER)&&o?.(b)},role:g?"tab":"button","aria-expanded":a,"aria-disabled":D,tabIndex:D?-1:0},A=typeof E=="function"?E(e):Du.default.createElement("i",{className:"arrow"}),j=A&&Du.default.createElement("div",jn({className:Z(`${m}-expand-icon`,d?.icon),style:p?.icon},["header","icon"].includes(v)?M:{}),A),P=Z(`${m}-item`,{[`${m}-item-active`]:a,[`${m}-item-disabled`]:D},u),O={className:Z(n,`${m}-header`,{[`${m}-collapsible-${v}`]:!!v},d?.header),style:p?.header,...["header","icon"].includes(v)?{}:M};return Du.default.createElement("div",jn({},C,{ref:t,className:P}),Du.default.createElement("div",O,r&&j,Du.default.createElement("span",jn({className:Z(`${m}-title`,d?.title),style:p?.title},v==="header"?M:{}),y),I&&Du.default.createElement("div",{className:`${m}-extra`},x)),Du.default.createElement(ra,jn({visible:a,leavedClassName:`${m}-panel-hidden`},S,{forceRender:l,removeOnLeave:F}),({className:V,style:W},H)=>Du.default.createElement(Lle,{ref:H,prefixCls:m,className:V,classNames:d,style:W,styles:p,isActive:a,forceRender:l,role:g?"tabpanel":void 0},$)))}),sL=Hle;function lL(e,t,r){if(!e||!t)return e||t;let n=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),a={};return n.forEach(o=>{a[o]=r(e[o],t[o])}),a}function qle(e,t){return lL(e,t,(r,n)=>aF(r,n))}function Wle(e,t){return lL(e,t,(r,n)=>({...r,...n}))}var Vle=(e,t)=>{let{prefixCls:r,accordion:n,collapsible:a,destroyOnHidden:o,onItemClick:l,activeKey:u,openMotion:d,expandIcon:p,classNames:m,styles:v}=t;return e.map((g,b)=>{let{children:x,label:y,key:E,collapsible:S,onItemClick:F,destroyOnHidden:$,classNames:C,styles:D,...I}=g,M=String(E??b),A=S??a,j=$??o,P=V=>{A!=="disabled"&&(l(V),F?.(V))},O=!1;return n?O=u[0]===M:O=u.indexOf(M)>-1,oL.default.createElement(sL,jn({},I,{classNames:qle(m,C),styles:Wle(v,D),prefixCls:r,key:M,panelKey:M,isActive:O,accordion:n,openMotion:d,expandIcon:p,header:y,collapsible:A,onItemClick:P,destroyOnHidden:j}),x)})},Ule=(e,t,r)=>{if(!e)return null;let{prefixCls:n,accordion:a,collapsible:o,destroyOnHidden:l,onItemClick:u,activeKey:d,openMotion:p,expandIcon:m,classNames:v,styles:g}=r,b=e.key||String(t),{header:x,headerClass:y,destroyOnHidden:E,collapsible:S,onItemClick:F}=e.props,$=!1;a?$=d[0]===b:$=d.indexOf(b)>-1;let C=S??o,D=M=>{C!=="disabled"&&(u(M),F?.(M))},I={key:b,panelKey:b,header:x,headerClass:y,classNames:v,styles:g,isActive:$,prefixCls:n,destroyOnHidden:E??l,openMotion:p,accordion:a,children:e.props.children,onItemClick:D,expandIcon:m,collapsible:C};return typeof e.type=="string"?e:(Object.keys(I).forEach(M=>{typeof I[M]>"u"&&delete I[M]}),oL.default.cloneElement(e,I))};function Gle(e,t,r){return Array.isArray(e)?Vle(e,r):xr(t).map((n,a)=>Ule(n,a,r))}var Kle=Gle;function Jz(e){let t=e;if(!Array.isArray(t)){let r=typeof t;t=r==="number"||r==="string"?[t]:[]}return t.map(r=>String(r))}var Xle=Yz.default.forwardRef((e,t)=>{let{prefixCls:r="rc-collapse",destroyOnHidden:n=!1,style:a,accordion:o,className:l,children:u,collapsible:d,openMotion:p,expandIcon:m,activeKey:v,defaultActiveKey:g,onChange:b,items:x,classNames:y,styles:E}=e,S=Z(r,l),[F,$]=qt(g,v),C=Jz(F),D=wt(A=>{let j=Jz(A);$(j),b?.(j)}),I=A=>{D(o?C[0]===A?[]:[A]:C.includes(A)?C.filter(j=>j!==A):[...C,A])};Ia(!u,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");let M=Kle(x,u,{prefixCls:r,accordion:o,openMotion:p,expandIcon:m,collapsible:d,destroyOnHidden:n,onItemClick:I,activeKey:C,classNames:y,styles:E});return Yz.default.createElement("div",jn({ref:t,className:S,style:a,role:o?"tablist":void 0},ei(e,{aria:!0,data:!0})),M)}),uL=Object.assign(Xle,{Panel:sL}),cL=uL,{Panel:sAe}=uL,e7=B(_()),Qle=e7.forwardRef((e,t)=>{let{getPrefixCls:r}=e7.useContext(st),{prefixCls:n,className:a,showArrow:o=!0}=e,l=r("collapse",n),u=Z({[`${l}-no-arrow`]:!o},a);return e7.createElement(cL.Panel,{ref:t,...e,prefixCls:l,className:u})}),Yle=Qle,Jle=e=>{let{componentCls:t,contentBg:r,padding:n,headerBg:a,headerPadding:o,headerPaddingSM:l,headerPaddingLG:u,collapsePanelBorderRadius:d,lineWidth:p,lineType:m,colorBorder:v,colorText:g,colorTextHeading:b,colorTextDisabled:x,fontSizeLG:y,lineHeight:E,lineHeightLG:S,marginSM:F,paddingSM:$,paddingLG:C,paddingXS:D,motionDurationSlow:I,fontSizeIcon:M,contentPadding:A,contentPaddingSM:j,contentPaddingLG:P,fontHeight:O,fontHeightLG:V}=e,W=`${ue(p)} ${m} ${v}`;return{[t]:{...Tt(e),backgroundColor:a,border:W,borderRadius:d,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:W,"&:first-child":{[`
154
- &,
155
- & > ${t}-header`]:{borderRadius:`${ue(d)} ${ue(d)} 0 0`}},"&:last-child":{[`
156
- &,
157
- & > ${t}-header`]:{borderRadius:`0 0 ${ue(d)} ${ue(d)}`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:b,lineHeight:E,cursor:"pointer",transition:`all ${I}, visibility 0s`,...Xn(e),[`> ${t}-title`]:{flex:"auto"},[`${t}-expand-icon`]:{height:O,display:"flex",alignItems:"center",marginInlineEnd:F},[`${t}-arrow`]:{...Rp(),fontSize:M,transition:`transform ${I}`,svg:{transition:`transform ${I}`}},[`${t}-title`]:{marginInlineEnd:"auto","> svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"}}},[`${t}-collapsible-header`]:{cursor:"default",[`${t}-title`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-panel`]:{color:g,backgroundColor:r,borderTop:W,[`& > ${t}-body`]:{padding:A},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:l,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc($).sub(D).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:j}}},"&-large":{[`> ${t}-item`]:{fontSize:y,lineHeight:S,[`> ${t}-header`]:{padding:u,[`> ${t}-expand-icon`]:{height:V,marginInlineStart:e.calc(C).sub(n).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:P}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${ue(d)} ${ue(d)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:x,cursor:"not-allowed"}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:F}}}}}}},Zle=e=>{let{componentCls:t}=e,r=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[r]:{transform:"rotate(180deg)"}}}},eue=e=>{let{componentCls:t,headerBg:r,borderlessContentPadding:n,borderlessContentBg:a,colorBorder:o}=e;return{[`${t}-borderless`]:{backgroundColor:r,border:0,[`> ${t}-item`]:{borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${o}`},[`
158
- > ${t}-item:last-child,
159
- > ${t}-item:last-child ${t}-header
160
- `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:a,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:n}}}},tue=e=>{let{componentCls:t,paddingSM:r}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:"transparent",border:0,[`> ${t}-body`]:{paddingBlock:r}}}}}},rue=e=>({headerPadding:`${ue(e.paddingSM)} ${ue(e.padding)}`,headerPaddingSM:`${ue(e.paddingXS)} ${ue(e.paddingSM)} ${ue(e.paddingXS)} ${ue(e.paddingXS)}`,headerPaddingLG:`${ue(e.padding)} ${ue(e.paddingLG)} ${ue(e.padding)} ${ue(e.padding)}`,headerBg:e.colorFillAlter,contentPadding:`${ue(e.padding)} ${ue(16)}`,contentPaddingSM:e.paddingSM,contentPaddingLG:e.paddingLG,contentBg:e.colorBgContainer,borderlessContentPadding:`${ue(e.paddingXXS)} ${ue(16)} ${ue(e.padding)}`,borderlessContentBg:"transparent"}),nue=pt("Collapse",e=>{let t=yt(e,{collapsePanelBorderRadius:e.borderRadiusLG});return[Jle(t),eue(t),tue(t),Zle(t),kb(t)]},rue),aue=Yh.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,expandIcon:a,className:o,style:l,classNames:u,styles:d}=xt("collapse"),{prefixCls:p,className:m,rootClassName:v,style:g,bordered:b=!0,ghost:x,size:y,expandIconPlacement:E,expandIconPosition:S,children:F,destroyInactivePanel:$,destroyOnHidden:C,expandIcon:D,classNames:I,styles:M}=e,A=Ur(K=>y??K??"middle"),j=r("collapse",p),P=r(),[O,V]=nue(j),W=E??S??"start",H={...e,size:A,bordered:b,expandIconPlacement:W},q=Ge(l),z=Ge(g),[L,U]=Ct([u,I],[d,q,M,z],{props:H}),Y=D??a,X=Yh.useCallback((K={})=>{let Q=K.collapsible==="header"||K.collapsible==="icon",ee=cr(Y)?Y(K):Yh.createElement(Au,{rotate:K.isActive?n==="rtl"?-90:90:void 0,...Q?{"aria-label":K.isActive?"expanded":"collapsed"}:{"aria-hidden":!0}});return Sr(ee,te=>({className:Z(te.className,`${j}-arrow`)}))},[Y,j,n]),J=Z(`${j}-icon-placement-${W}`,{[`${j}-borderless`]:!b,[`${j}-rtl`]:n==="rtl",[`${j}-ghost`]:!!x,[`${j}-large`]:A==="large",[`${j}-small`]:A==="small"},o,m,v,O,V,L.root),N=Yh.useMemo(()=>({...Eb(P),motionAppear:!1,leavedClassName:`${j}-panel-hidden`}),[P,j]),R=Yh.useMemo(()=>F?xr(F).map(K=>K):null,[F]);return Yh.createElement(cL,{ref:t,openMotion:N,...Ut(e,["rootClassName"]),expandIcon:X,prefixCls:j,className:J,style:U.root,classNames:L,styles:U,destroyOnHidden:C??$},R)}),iue=Object.assign(aue,{Panel:Yle}),l7=iue,u2=B(_()),oue=e=>{let{componentCls:t,colorPrimary:r,motionDurationSlow:n,motionEaseInOut:a,motionEaseOutCirc:o,antCls:l}=e,[,u]=bn(l,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:u("color",r),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(d=>`${d} ${o}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(d=>`${d} ${n} ${a}`).join(",")}}}}},sue=CF("Wave",oue),t7=B(_()),$b=`${Gc}-wave-target`,bo=B(_()),Zz=e=>e?ti(e)&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!=="transparent"&&e!=="canvastext":!1;function lue(e,t=null){let r=getComputedStyle(e),{borderTopColor:n,borderColor:a,backgroundColor:o}=r;return t&&Zz(r[t])?r[t]:[n,a,o].find(Zz)??null}function r7(e){return Number.isNaN(e)?0:e}var uue=e=>{let{className:t,target:r,component:n,colorSource:a}=e,o=bo.useRef(null),{getPrefixCls:l}=bo.useContext(st),u=l(),[d]=bn(u,"wave"),[p,m]=bo.useState(null),[v,g]=bo.useState([]),[b,x]=bo.useState(0),[y,E]=bo.useState(0),[S,F]=bo.useState(0),[$,C]=bo.useState(0),[D,I]=bo.useState(!1),M={left:b,top:y,width:S,height:$,borderRadius:v.map(P=>`${P}px`).join(" ")};p&&(M[d("color")]=p);function A(){let P=getComputedStyle(r);m(lue(r,a));let O=P.position==="static",{borderLeftWidth:V,borderTopWidth:W}=P;x(O?r.offsetLeft:r7(-Number.parseFloat(V))),E(O?r.offsetTop:r7(-Number.parseFloat(W))),F(r.offsetWidth),C(r.offsetHeight);let{borderTopLeftRadius:H,borderTopRightRadius:q,borderBottomLeftRadius:z,borderBottomRightRadius:L}=P;g([H,q,L,z].map(U=>r7(Number.parseFloat(U))))}if(bo.useEffect(()=>{if(r){let P=vr(()=>{A(),I(!0)}),O;return typeof ResizeObserver<"u"&&(O=new ResizeObserver(A),O.observe(r)),()=>{vr.cancel(P),O?.disconnect()}}},[r]),!D)return null;let j=(n==="Checkbox"||n==="Radio")&&r?.classList.contains($b);return bo.createElement(ra,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(P,O)=>{if(O.deadline||lb(O)&&O.propertyName==="opacity"){let V=o.current?.parentElement;cF(V).then(()=>{V?.remove()})}return!1}},({className:P},O)=>bo.createElement("div",{ref:fn(o,O),className:Z(t,P,{"wave-quick":j}),style:M}))},cue=(e,t)=>{let{component:r}=t;if(r==="Checkbox"&&!e.querySelector("input")?.checked)return;let n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",e?.insertBefore(n,e?.firstChild),uF(bo.createElement(uue,{...t,target:e}),n)},due=cue,pue=(e,t,r,n)=>{let{wave:a}=t7.useContext(st),[,o,l]=Ma(),u=wt(p=>{let m=e.current;if(a?.disabled||!m)return;let v=m.querySelector(`.${$b}`)||m,{showEffect:g}=a||{};(g||due)(v,{className:t,token:o,component:r,event:p,hashId:l,colorSource:n})}),d=t7.useRef(null);return t7.useEffect(()=>()=>{vr.cancel(d.current)},[]),p=>{vr.cancel(d.current),d.current=vr(()=>{u(p)})}},fue=pue,eL={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},mue=e=>{let{children:t,disabled:r,component:n,colorSource:a}=e,{getPrefixCls:o,wave:l}=(0,u2.useContext)(st),u=(0,u2.useRef)(null),d=o("wave"),p=sue(d),m=fue(u,Z(d,p),n,a);if(u2.default.useEffect(()=>{let g=u.current;if(!g||g.nodeType!==window.Node.ELEMENT_NODE||r)return;let b=E=>{!ob(E.target)||!g.getAttribute||g.getAttribute("disabled")||g.disabled||g.className.includes("disabled")&&!g.className.includes("disabled:")||g.getAttribute("aria-disabled")==="true"||g.className.includes("-leave")||m(E)},x=l?.triggerType,y=x&&x in eL?eL[x]:"click";return g.addEventListener(y,b,!0),()=>{g.removeEventListener(y,b,!0)}},[r,l?.triggerType]),!u2.default.isValidElement(t))return t??null;let v=wu(t)?fn(Hi(t),u):u;return Sr(t,{ref:v})},rd=mue,c2=B(_()),tL=/^[\u4E00-\u9FA5]{2}$/,s7=tL.test.bind(tL);function hue(e){return e==="danger"?{danger:!0}:{type:e}}function n7(e){return e==="text"||e==="link"}function gue(e,t,r,n){if(!Lt(e))return;let a=t?" ":"";return!ti(e)&&!Kn(e)&&ti(e.type)&&s7(e.props.children)?Sr(e,o=>{let l=Z(o.className,n)||void 0,u={...r,...o.style};return{...o,children:o.children.split("").join(a),className:l,style:u}}):ti(e)?c2.default.createElement("span",{className:n,style:r},s7(e)?e.split("").join(a):e):mb(e)?c2.default.createElement("span",{className:n,style:r},e):Sr(e,o=>({...o,className:Z(o.className,n)||void 0,style:{...o.style,...r}}))}function vue(e,t,r,n){let a=!1,o=[];return c2.default.Children.forEach(e,l=>{let u=ti(l)||Kn(l);if(a&&u){let d=o.length-1,p=o[d];o[d]=`${p}${l}`}else o.push(l);a=u}),c2.default.Children.map(o,l=>gue(l,t,r,n))}var lAe=["default","primary","danger"].concat(Zr(bi)),aa=B(_()),Fb=B(_()),dL=Fb.createContext(void 0),bue=e=>{let{getPrefixCls:t,direction:r}=Fb.useContext(st),{prefixCls:n,size:a,className:o,...l}=e,u=t("btn-group",n),[,,d]=Ma(),p=Fb.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]),m=Z(u,{[`${u}-${p}`]:p,[`${u}-rtl`]:r==="rtl"},o,d);return Fb.createElement(dL.Provider,{value:a},Fb.createElement("div",{...l,className:m}))},yue=bue,Jh=B(_()),rL=B(_()),wue=(0,rL.forwardRef)((e,t)=>{let{className:r,style:n,children:a,prefixCls:o}=e,l=Z(`${o}-icon`,r);return rL.default.createElement("span",{ref:t,className:l,style:n},a)}),pL=wue,nL=(0,Jh.forwardRef)((e,t)=>{let{prefixCls:r,className:n,style:a,iconClassName:o}=e,l=Z(`${r}-loading-icon`,n);return Jh.default.createElement(pL,{prefixCls:r,className:l,style:a,ref:t},Jh.default.createElement(Gp,{className:o}))}),a7=()=>({width:0,opacity:0,transform:"scale(0)"}),i7=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),xue=e=>{let{prefixCls:t,loading:r,existIcon:n,className:a,style:o,mount:l}=e,u=!!r;return n?Jh.default.createElement(nL,{prefixCls:t,className:a,style:o}):Jh.default.createElement(ra,{visible:u,motionName:`${t}-loading-icon-motion`,motionAppear:!l,motionEnter:!l,motionLeave:!l,removeOnLeave:!0,onAppearStart:a7,onAppearActive:i7,onEnterStart:a7,onEnterActive:i7,onLeaveStart:i7,onLeaveActive:a7},({className:d,style:p},m)=>{let v={...o,...p};return Jh.default.createElement(nL,{prefixCls:t,className:Z(a,d),style:v,ref:m})})},Eue=xue,aL=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),kue=e=>{let{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:a,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},aL(`${t}-primary`,a),aL(`${t}-danger`,o)]}},Cue=kue,uAe=B(_()),d2=(e,t)=>{let{r,g:n,b:a,a:o}=e.toRgb(),l=new Vp(e.toRgbString()).onBackground(t).toHsv();return o<=.5?l.v>.5:r*.299+n*.587+a*.114>192},fL=e=>{let{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return yt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},mL=e=>{let t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,a=e.contentLineHeight??Th(t),o=e.contentLineHeightSM??Th(r),l=e.contentLineHeightLG??Th(n),u=d2(new Up(e.colorBgSolid),"#fff")?"#000":"#fff",d=bi.reduce((v,g)=>({...v,[`${g}ShadowColor`]:`0 ${ue(e.controlOutlineWidth)} 0 ${Mp(e[`${g}1`],e.colorBgContainer)}`}),{}),p=e.colorBgContainerDisabled,m=e.colorBgContainerDisabled;return{...d,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:u,contentFontSize:t,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:a,contentLineHeightSM:o,contentLineHeightLG:l,paddingBlock:Math.max((e.controlHeight-t*a)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-r*o)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*l)/2-e.lineWidth,0),defaultBgDisabled:p,dashedBgDisabled:m}},Sue=e=>{let{componentCls:t,antCls:r,lineWidth:n,lineType:a}=e,[o,l]=bn(r,"btn");return{[t]:[{[o("border-width")]:n,[o("border-color")]:"#000",[o("border-color-hover")]:l("border-color"),[o("border-color-active")]:l("border-color"),[o("border-color-disabled")]:l("border-color"),[o("border-style")]:a,[o("text-color")]:"#000",[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color"),[o("text-color-disabled")]:l("text-color"),[o("bg-color")]:"#ddd",[o("bg-color-hover")]:l("bg-color"),[o("bg-color-active")]:l("bg-color"),[o("bg-color-disabled")]:e.colorBgContainerDisabled,[o("bg-color-container")]:e.colorBgContainer,[o("shadow")]:"none"},{border:[l("border-width"),l("border-style"),l("border-color")].join(" "),color:l("text-color"),backgroundColor:l("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[l("border-width"),l("border-style"),l("border-color-hover")].join(" "),color:l("text-color-hover"),backgroundColor:l("bg-color-hover")},"&:active":{border:[l("border-width"),l("border-style"),l("border-color-active")].join(" "),color:l("text-color-active"),backgroundColor:l("bg-color-active")}}},{[`&${t}-variant-solid`]:{[o("solid-bg-color")]:l("color-base"),[o("solid-bg-color-hover")]:l("color-hover"),[o("solid-bg-color-active")]:l("color-active"),[o("border-color")]:"transparent",[o("text-color")]:e.colorTextLightSolid,[o("bg-color")]:l("solid-bg-color"),[o("bg-color-hover")]:l("solid-bg-color-hover"),[o("bg-color-active")]:l("solid-bg-color-active"),boxShadow:l("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("border-color")]:l("color-base"),[o("border-color-hover")]:l("color-hover"),[o("border-color-active")]:l("color-active"),[o("bg-color")]:l("bg-color-container"),[o("text-color")]:l("color-base"),[o("text-color-hover")]:l("color-hover"),[o("text-color-active")]:l("color-active"),boxShadow:l("shadow")},[`&${t}-variant-dashed`]:{[o("border-style")]:"dashed",[o("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[o("border-color")]:"transparent",[o("text-color")]:l("color-base"),[o("bg-color")]:l("color-light"),[o("bg-color-hover")]:l("color-light-hover"),[o("bg-color-active")]:l("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[o("border-color")]:"transparent",[o("text-color")]:l("color-base"),[o("text-color-hover")]:l("color-hover"),[o("text-color-active")]:l("color-active"),[o("bg-color")]:"transparent",[o("bg-color-hover")]:"transparent",[o("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[o("bg-color-hover")]:l("color-light"),[o("bg-color-active")]:l("color-light-active")}},{[`&${t}-variant-link`]:{[o("color-base")]:e.colorLink,[o("color-hover")]:e.colorLinkHover,[o("color-active")]:e.colorLinkActive,[o("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[o("color-base")]:e.colorPrimary,[o("color-hover")]:e.colorPrimaryHover,[o("color-active")]:e.colorPrimaryActive,[o("color-light")]:e.colorPrimaryBg,[o("color-light-hover")]:e.colorPrimaryBgHover,[o("color-light-active")]:e.colorPrimaryBorder,[o("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.primaryColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")}},[`&${t}-color-dangerous`]:{[o("color-base")]:e.colorError,[o("color-hover")]:e.colorErrorHover,[o("color-active")]:e.colorErrorActive,[o("color-light")]:e.colorErrorBg,[o("color-light-hover")]:e.colorErrorBgFilledHover,[o("color-light-active")]:e.colorErrorBgActive,[o("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.dangerColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")}},[`&${t}-color-default`]:{[o("solid-bg-color")]:e.colorBgSolid,[o("solid-bg-color-hover")]:e.colorBgSolidHover,[o("solid-bg-color-active")]:e.colorBgSolidActive,[o("color-base")]:e.defaultBorderColor,[o("color-hover")]:e.defaultHoverBorderColor,[o("color-active")]:e.defaultActiveBorderColor,[o("color-light")]:e.colorFillTertiary,[o("color-light-hover")]:e.colorFillSecondary,[o("color-light-active")]:e.colorFill,[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[o("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[o("text-color")]:e.solidTextColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("bg-color-container")]:e.defaultBg,[o("bg-color-hover")]:e.defaultHoverBg,[o("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[o("text-color")]:e.textTextColor,[o("text-color-hover")]:e.textTextHoverColor,[o("text-color-active")]:e.textTextActiveColor,[o("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultGhostColor,[o("border-color")]:e.defaultGhostBorderColor}}}},bi.map(u=>{let d=e[`${u}6`],p=e[`${u}1`],m=e[`${u}Hover`],v=e[`${u}2`],g=e[`${u}3`],b=e[`${u}Active`],x=e[`${u}ShadowColor`];return{[`&${t}-color-${u}`]:{[o("color-base")]:d,[o("color-hover")]:m,[o("color-active")]:b,[o("color-light")]:p,[o("color-light-hover")]:v,[o("color-light-active")]:g,[o("shadow")]:x}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:l("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[o("bg-color")]:e.ghostBg,[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg,[o("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg}}}]}},Fue=Sue,$ue=e=>{let{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:a,motionDurationSlow:o,motionEaseInOut:l,iconGap:u,calc:d}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:u,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...Wo(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Rp(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[r]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":Xn(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:a,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(p=>`${p} ${o} ${l}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:d(u).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:d(u).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:d(u).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:d(u).mul(-1).equal()}}}}}},Due=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),u7=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:a,borderRadius:o,buttonPaddingHorizontal:l,iconCls:u,buttonPaddingVertical:d,buttonIconOnlyFontSize:p}=e;return[{[t]:{fontSize:a,height:n,padding:`${ue(d)} ${ue(l)}`,borderRadius:o,[`&${r}-icon-only`]:{width:n,[u]:{fontSize:p}}}},{[`${r}${r}-circle${t}`]:Due(e)},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},Aue=e=>{let t=yt(e,{fontSize:e.contentFontSize});return u7(t,e.componentCls)},Bue=e=>{let t=yt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return u7(t,`${e.componentCls}-sm`)},Iue=e=>{let t=yt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return u7(t,`${e.componentCls}-lg`)},Mue=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},Tue=pt("Button",e=>{let t=fL(e);return[$ue(t),Aue(t),Bue(t),Iue(t),Mue(t),Fue(t),Cue(t)]},mL,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function jue(e,t,r,n){let{focusElCls:a,focus:o,borderElCls:l}=r,u=l?"> *":"",d=u?` ${u}`:"",p=g=>g.filter(Boolean).map(b=>`&:${b}${d}`).join(","),m=p(["hover",a?`hover${a}`:null]),v=p([o?"focus":null,"active"]);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{[v]:{zIndex:3},[m]:{zIndex:4},...a?{[`&${a}`]:{zIndex:3}}:{},[`&[disabled] ${u}`]:{zIndex:0}}}}function _ue(e,t,r){let{borderElCls:n}=r,a=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${a}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${a}, &${e}-sm ${a}, &${e}-lg ${a}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${a}, &${e}-sm ${a}, &${e}-lg ${a}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Zh(e,t={focus:!0}){let{componentCls:r}=e,{componentCls:n}=t,a=n||r,o=`${a}-compact`;return{[o]:{...jue(e,o,t,a),..._ue(a,o,t)}}}function Nue(e,t,r){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function Pue(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Rue(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...Nue(e,t,e.componentCls),...Pue(e.componentCls,t)}}}var Oue=e=>{let{antCls:t,componentCls:r,lineWidth:n,calc:a,colorBgContainer:o}=e,l=`${r}-variant-solid:not([disabled])`,u=a(n).mul(-1).equal(),[d,p]=bn(t,"btn"),m=v=>({[`${r}-compact${v?"-vertical":""}-item`]:{[d("compact-connect-border-color")]:p("bg-color-hover"),[`&${l}`]:{transition:"none",[`& + ${l}:before`]:[{position:"absolute",backgroundColor:p("compact-connect-border-color"),content:'""'},v?{top:u,insetInline:u,height:n}:{insetBlock:u,insetInlineStart:u,width:n}],"&:hover:before":{display:"none"}}}});return[m(),m(!0),{[`${l}${r}-color-default`]:{[d("compact-connect-border-color")]:`color-mix(in srgb, ${p("bg-color-hover")} 75%, ${o})`}}]},zue=Nh(["Button","compact"],e=>{let t=fL(e);return[Zh(t),Rue(t),Oue(t)]},mL);function Lue(e){if(kt(e)){let t=e?.delay;return t=Kn(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var Hue={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},que=aa.default.forwardRef((e,t)=>{let{_skipSemantic:r,loading:n=!1,prefixCls:a,color:o,variant:l,type:u,danger:d=!1,shape:p,size:m,disabled:v,className:g,rootClassName:b,children:x,icon:y,iconPosition:E,iconPlacement:S,ghost:F=!1,block:$=!1,htmlType:C="button",classNames:D,styles:I,style:M,autoInsertSpace:A,autoFocus:j,...P}=e,O=xr(x),V=u||"default",{getPrefixCls:W,direction:H,autoInsertSpace:q,className:z,style:L,classNames:U,styles:Y,loadingIcon:X,shape:J,color:N,variant:R}=xt("button"),K=p||J||"default",[Q,ee]=(0,aa.useMemo)(()=>{if(o&&l)return[o,l];if(u||d){let Vt=Hue[V]||[];return d?["danger",Vt[1]]:Vt}return l==="solid"?["primary",l]:N&&R?[N,R]:R==="solid"?["primary",R]:["default","outlined"]},[o,l,u,d,N,R,V]),[te,ne]=(0,aa.useMemo)(()=>F&&ee==="solid"?[Q,"outlined"]:[Q,ee],[Q,ee,F]),me=te==="danger",se=me?"dangerous":te,he=A??q??!0,le=W("btn",a),[ke,Ae]=Tue(le),de=(0,aa.useContext)(ja),ve=v??de,ye=(0,aa.useContext)(dL),we=(0,aa.useMemo)(()=>Lue(n),[n]),[Oe,Fe]=Dh(we.loading),[$e,Me]=(0,aa.useState)(!1),qe=(0,aa.useRef)(null),ze=Za(t,qe),Te=O.length===1&&!y&&!n7(ne),Ne=(0,aa.useRef)(!0);aa.default.useEffect(()=>(Ne.current=!1,()=>{Ne.current=!0}),[]),or(()=>{we.delay>0?Fe(!0,{ms:we.delay}):Fe(we.loading,!0)},[we.delay,we.loading]),(0,aa.useEffect)(()=>{if(!qe.current||!he)return;let Vt=qe.current.textContent||"";Te&&s7(Vt)?$e||Me(!0):$e&&Me(!1)}),(0,aa.useEffect)(()=>{j&&qe.current?.focus()},[]);let Qe=aa.default.useCallback(Vt=>{if(Oe||ve){Vt.preventDefault();return}e.onClick?.(("href"in e,Vt))},[e.onClick,Oe,ve]),{compactSize:ot,compactItemClassnames:et}=ml(le,H),Ue=Ur(Vt=>m??ot??ye??Vt),Ie=Oe?"loading":y,Re=S??E??"start",ht=Ut(P,["navigate"]),lt={...e,type:V,color:te,variant:ne,danger:me,shape:K,size:Ue,disabled:ve,loading:Oe,iconPlacement:Re},Xe=Ge(L),Pe=Ge(M),[at,Nt]=Ct([r?void 0:U,D],[r?void 0:Y,Xe,I,Pe],{props:lt}),Pt=Z(le,ke,Ae,{[`${le}-${K}`]:K!=="default"&&K!=="square"&&K,[`${le}-${V}`]:V,[`${le}-dangerous`]:d,[`${le}-color-${se}`]:se,[`${le}-variant-${ne}`]:ne,[`${le}-lg`]:Ue==="large",[`${le}-sm`]:Ue==="small",[`${le}-icon-only`]:!x&&x!==0&&!!Ie,[`${le}-background-ghost`]:F&&!n7(ne),[`${le}-loading`]:Oe,[`${le}-two-chinese-chars`]:$e&&he&&!Oe,[`${le}-block`]:$,[`${le}-rtl`]:H==="rtl",[`${le}-icon-end`]:Re==="end"},et,g,b,z,at.root),Yr={className:at.icon,style:Nt.icon},Gt=Vt=>aa.default.createElement(pL,{prefixCls:le,...Yr},Vt),Tr=aa.default.createElement(Eue,{existIcon:!!y,prefixCls:le,loading:Oe,mount:Ne.current,...Yr}),er=kt(n)&&n.icon||X,It;y&&!Oe?It=Gt(y):n&&er?It=Gt(er):It=Tr;let lr=Lt(x)?vue(x,Te&&he,Nt.content,at.content):null;if(ht.href!==void 0)return aa.default.createElement("a",{...ht,className:Z(Pt,{[`${le}-disabled`]:ve}),href:ve?void 0:ht.href,style:Nt.root,onClick:Qe,ref:ze,tabIndex:ve?-1:0,"aria-disabled":ve},It,lr);let $r=aa.default.createElement("button",{...P,type:C,className:Pt,style:Nt.root,onClick:Qe,disabled:ve,ref:ze},It,lr,et&&aa.default.createElement(zue,{prefixCls:le}));return n7(ne)||($r=aa.default.createElement(rd,{component:"Button",disabled:Oe},$r)),$r}),c7=que;c7.Group=yue;c7.__ANT_BUTTON=!0;var Db=c7;var hL=B(_()),Wue={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},Vue=Wue;function d7(){return d7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d7.apply(this,arguments)}var Uue=(e,t)=>hL.createElement(Zt,d7({},e,{ref:t,icon:Vue})),Gue=hL.forwardRef(Uue),Ab=Gue;var hl=B(_()),Vi=B(_());function Kue(e){return!!(e.addonBefore||e.addonAfter)}function Xue(e){return!!(e.prefix||e.suffix||e.allowClear)}function gL(e,t,r){let n=t.cloneNode(!0),a=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=(...o)=>{t.setSelectionRange(...o)},a}function p2(e,t,r,n){if(!r)return;let a=t;if(t.type==="click"){a=gL(t,e,""),r(a);return}if(e.type!=="file"&&n!==void 0){a=gL(t,e,n),r(a);return}r(a)}function g7(){return g7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g7.apply(this,arguments)}var Que=Vi.default.forwardRef((e,t)=>{let{inputElement:r,children:n,prefixCls:a,prefix:o,suffix:l,addonBefore:u,addonAfter:d,className:p,style:m,disabled:v,readOnly:g,focused:b,triggerFocus:x,allowClear:y,value:E,handleReset:S,hidden:F,classes:$,classNames:C,dataAttrs:D,styles:I,components:M,onClear:A}=e,j=n??r,P=M?.affixWrapper||"span",O=M?.groupWrapper||"span",V=M?.wrapper||"span",W=M?.groupAddon||"span",H=(0,Vi.useRef)(null),q=Y=>{H.current?.contains(Y.target)&&x?.()},z=Xue(e),L=(0,Vi.cloneElement)(j,{value:E,className:Z(j.props?.className,!z&&C?.variant)||null}),U=(0,Vi.useRef)(null);if(Vi.default.useImperativeHandle(t,()=>({nativeElement:U.current||H.current})),z){let Y=null;if(y){let R=!v&&!g&&E&&!(typeof y=="object"&&y.disabled),K=`${a}-clear-icon`,Q=typeof y=="object"&&y?.clearIcon?y.clearIcon:"\u2716";Y=Vi.default.createElement("button",{type:"button",onClick:ee=>{S?.(ee),A?.()},onMouseDown:ee=>ee.preventDefault(),className:Z(K,{[`${K}-hidden`]:!R,[`${K}-has-suffix`]:!!l},C?.clear),style:I?.clear},Q)}let X=`${a}-affix-wrapper`,J=Z(X,{[`${a}-disabled`]:v,[`${X}-disabled`]:v,[`${X}-focused`]:b,[`${X}-readonly`]:g,[`${X}-input-with-clear-btn`]:l&&y&&E},$?.affixWrapper,C?.affixWrapper,C?.variant),N=(l||y)&&Vi.default.createElement("span",{className:Z(`${a}-suffix`,C?.suffix),style:I?.suffix},Y,l);L=Vi.default.createElement(P,g7({className:J,style:I?.affixWrapper,onClick:q},D?.affixWrapper,{ref:H}),o&&Vi.default.createElement("span",{className:Z(`${a}-prefix`,C?.prefix),style:I?.prefix},o),L,N)}if(Kue(e)){let Y=`${a}-group`,X=`${Y}-addon`,J=`${Y}-wrapper`,N=Z(`${a}-wrapper`,Y,$?.wrapper,C?.wrapper),R=Z(J,{[`${J}-disabled`]:v},$?.group,C?.groupWrapper);L=Vi.default.createElement(O,{className:R,ref:U},Vi.default.createElement(V,{className:N},u&&Vi.default.createElement(W,{className:X},u),L,d&&Vi.default.createElement(W,{className:X},d)))}return Vi.default.cloneElement(L,{className:Z(L.props?.className,p)||null,style:{...L.props?.style,...m},hidden:F})}),SL=Que,yo=B(_()),Yue=B(_());function FL(e,t){return Yue.useMemo(()=>{let r={};t&&(r.show=typeof t=="object"&&t.formatter?t.formatter:!!t),r={...r,...e};let{show:n,...a}=r;return{...a,show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:a.strategy||(o=>o.length)}},[e,t])}var Jue=B(_());function $L({countConfig:e,value:t,maxLength:r}){return Jue.useMemo(()=>{let n=e.max??r,a=e.strategy(t),o=!!n&&a>n,l=Number(n)>0,u=e.show?e.showFormatter?e.showFormatter({value:t,count:a,maxLength:n}):`${a}${l?` / ${n}`:""}`:void 0;return{mergedMax:n,isOutOfRange:o,dataCount:u}},[e,r,t])}var Bb=B(_());function DL({countConfig:e,getTarget:t}){let[r,n]=Bb.useState(null),a=Bb.useRef(t);return Bb.useEffect(()=>{a.current=t},[t]),Bb.useEffect(()=>{r&&(a.current()?.setSelectionRange(...r),n(null))},[r]),Bb.useCallback((o,l)=>{let u=o;return!l&&e.exceedFormatter&&e.max&&e.strategy(o)>e.max&&(u=e.exceedFormatter(o,{max:e.max}),o!==u&&n([a.current()?.selectionStart||0,a.current()?.selectionEnd||0])),u},[e])}function AL(e,t){let[r,n]=qt(e,t),a=r==null?"":String(r);return{value:r,setValue:n,formatValue:a}}function f2(){return f2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f2.apply(this,arguments)}var Zue=(0,yo.forwardRef)((e,t)=>{let{autoComplete:r,onChange:n,onFocus:a,onBlur:o,onPressEnter:l,onKeyDown:u,onKeyUp:d,prefixCls:p="rc-input",disabled:m,htmlSize:v,className:g,maxLength:b,suffix:x,showCount:y,count:E,type:S="text",classes:F,classNames:$,styles:C,onCompositionStart:D,onCompositionEnd:I,...M}=e,[A,j]=(0,yo.useState)(!1),P=(0,yo.useRef)(!1),O=(0,yo.useRef)(!1),V=(0,yo.useRef)(null),W=(0,yo.useRef)(null),H=le=>{V.current&&Mx(V.current,le)},{setValue:q,formatValue:z}=AL(e.defaultValue,e.value),L=FL(E,y),{isOutOfRange:U,dataCount:Y}=$L({countConfig:L,value:z,maxLength:b}),X=DL({countConfig:L,getTarget:()=>V.current});(0,yo.useImperativeHandle)(t,()=>({focus:H,blur:()=>{V.current?.blur()},setSelectionRange:(le,ke,Ae)=>{V.current?.setSelectionRange(le,ke,Ae)},select:()=>{V.current?.select()},input:V.current,nativeElement:W.current?.nativeElement||V.current})),(0,yo.useEffect)(()=>{O.current&&(O.current=!1),j(le=>le&&m?!1:le)},[m]);let J=(le,ke,Ae)=>{let de=X(ke,P.current);Ae.source==="compositionEnd"&&ke===de||(q(de),V.current&&p2(V.current,le,n,de))},N=le=>{J(le,le.target.value,{source:"change"})},R=le=>{P.current=!1,J(le,le.currentTarget.value,{source:"compositionEnd"}),I?.(le)},K=le=>{l&&le.key==="Enter"&&!O.current&&!le.nativeEvent.isComposing&&(O.current=!0,l(le)),u?.(le)},Q=le=>{le.key==="Enter"&&(O.current=!1),d?.(le)},ee=le=>{j(!0),a?.(le)},te=le=>{O.current&&(O.current=!1),j(!1),o?.(le)},ne=le=>{q(""),H(),V.current&&p2(V.current,le,n)},me=U&&`${p}-out-of-range`,se=()=>{let le=Ut(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return yo.default.createElement("input",f2({autoComplete:r},le,{onChange:N,onFocus:ee,onBlur:te,onKeyDown:K,onKeyUp:Q,className:Z(p,{[`${p}-disabled`]:m},$?.input),style:C?.input,ref:V,size:v,type:S,onCompositionStart:ke=>{P.current=!0,D?.(ke)},onCompositionEnd:R}))},he=()=>x||L.show?yo.default.createElement(yo.default.Fragment,null,L.show&&yo.default.createElement("span",{className:Z(`${p}-show-count-suffix`,{[`${p}-show-count-has-suffix`]:!!x},$?.count),style:{...C?.count}},Y),x):null;return yo.default.createElement(SL,f2({},M,{prefixCls:p,className:Z(g,me),handleReset:ne,value:z,focused:A,triggerFocus:H,suffix:he(),disabled:m,classes:F,classNames:$,styles:C,ref:W}),se())}),ece=Zue,wo=B(_()),gl=B(_()),tce=`
161
- min-height:0 !important;
162
- max-height:none !important;
163
- height:0 !important;
164
- visibility:hidden !important;
165
- overflow:hidden !important;
166
- position:absolute !important;
167
- z-index:-1000 !important;
168
- top:0 !important;
169
- right:0 !important;
170
- pointer-events: none !important;
171
- `,rce=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],p7={},xo;function nce(e,t=!1){let r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&p7[r])return p7[r];let n=window.getComputedStyle(e),a=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),o=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),l=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),u={sizingStyle:rce.map(d=>`${d}:${n.getPropertyValue(d)}`).join(";"),paddingSize:o,borderSize:l,boxSizing:a};return t&&r&&(p7[r]=u),u}function ace(e,t=!1,r=null,n=null){xo||(xo=document.createElement("textarea"),xo.setAttribute("tab-index","-1"),xo.setAttribute("aria-hidden","true"),xo.setAttribute("name","hiddenTextarea"),document.body.appendChild(xo)),e.getAttribute("wrap")?xo.setAttribute("wrap",e.getAttribute("wrap")):xo.removeAttribute("wrap");let{paddingSize:a,borderSize:o,boxSizing:l,sizingStyle:u}=nce(e,t);xo.setAttribute("style",`${u};${tce}`),xo.value=e.value||e.placeholder||"";let d,p,m,v=xo.scrollHeight;if(l==="border-box"?v+=o:l==="content-box"&&(v-=a),r!==null||n!==null){xo.value=" ";let b=xo.scrollHeight-a;r!==null&&(d=b*r,l==="border-box"&&(d=d+a+o),v=Math.max(d,v)),n!==null&&(p=b*n,l==="border-box"&&(p=p+a+o),m=v>p?void 0:"hidden",v=Math.min(p,v))}let g={height:v,overflowY:m,resize:"none"};return d&&(g.minHeight=d),p&&(g.maxHeight=p),g}function v7(){return v7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v7.apply(this,arguments)}var f7=0,m7=1,h7=2,ice=gl.forwardRef((e,t)=>{let{prefixCls:r,defaultValue:n,value:a,autoSize:o,onResize:l,className:u,style:d,disabled:p,onChange:m,onInternalAutoSize:v,...g}=e,[b,x]=qt(n,a),y=b??"",E=H=>{x(H.target.value),m?.(H)},S=gl.useRef(null);gl.useImperativeHandle(t,()=>({textArea:S.current}));let[F,$]=gl.useMemo(()=>o&&typeof o=="object"?[o.minRows,o.maxRows]:[],[o]),C=!!o,[D,I]=gl.useState(h7),[M,A]=gl.useState(),j=()=>{I(f7)};or(()=>{C&&j()},[a,F,$,C]),or(()=>{if(D===f7)I(m7);else if(D===m7){let H=ace(S.current,!1,F,$);I(h7),A(H)}},[D]);let P=gl.useRef(void 0),O=()=>{P.current!==void 0&&vr.cancel(P.current)},V=H=>{D===h7&&(l?.(H),o&&(O(),P.current=vr(()=>{j()})))};gl.useEffect(()=>O,[]);let W={...d,...C?M:null};return(D===f7||D===m7)&&(W.overflowY="hidden",W.overflowX="hidden"),gl.createElement(Ta,{onResize:V,disabled:!(o||l)},gl.createElement("textarea",v7({},g,{ref:S,style:W,className:Z(r,u,{[`${r}-disabled`]:p}),disabled:p,value:y,onChange:E})))}),oce=ice;function b7(){return b7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},b7.apply(this,arguments)}var sce=wo.default.forwardRef(({defaultValue:e,value:t,onFocus:r,onBlur:n,onChange:a,allowClear:o,maxLength:l,onCompositionStart:u,onCompositionEnd:d,suffix:p,prefixCls:m="rc-textarea",showCount:v,count:g,className:b,style:x,disabled:y,hidden:E,classNames:S,styles:F,onResize:$,onClear:C,onPressEnter:D,readOnly:I,autoSize:M,onKeyDown:A,...j},P)=>{let[O,V]=wo.default.useState(!1),W=wo.default.useRef(!1),[H,q]=wo.default.useState(null),z=(0,wo.useRef)(null),L=(0,wo.useRef)(null),U=()=>L.current?.textArea||null,{setValue:Y,formatValue:X}=AL(e,t),J=FL(g,v),{isOutOfRange:N,dataCount:R}=$L({countConfig:J,value:X,maxLength:l}),K=DL({countConfig:J,getTarget:()=>L.current?.textArea||null}),Q=()=>{U()?.focus()};(0,wo.useImperativeHandle)(P,()=>({resizableTextArea:L.current,focus:Q,blur:()=>{U()?.blur()},nativeElement:z.current?.nativeElement||U()})),(0,wo.useEffect)(()=>{V(ye=>!y&&ye)},[y]);let ee=(ye,we)=>{let Oe=K(we,W.current);Y(Oe),p2(ye.currentTarget,ye,a,Oe)},te=ye=>{W.current=!0,u?.(ye)},ne=ye=>{W.current=!1,ee(ye,ye.currentTarget.value),d?.(ye)},me=ye=>{ee(ye,ye.target.value)},se=ye=>{ye.key==="Enter"&&D&&!ye.nativeEvent.isComposing&&D(ye),A?.(ye)},he=ye=>{V(!0),r?.(ye)},le=ye=>{V(!1),n?.(ye)},ke=ye=>{Y(""),Q();let we=U();we&&p2(we,ye,a)},Ae=p;J.show&&(Ae=wo.default.createElement(wo.default.Fragment,null,Ae,wo.default.createElement("span",{className:Z(`${m}-data-count`,S?.count),style:F?.count},R)));let de=ye=>{$?.(ye),U()?.style.height&&q(!0)},ve=!M&&!v&&!o;return wo.default.createElement(SL,{ref:z,value:X,allowClear:o,handleReset:ke,suffix:Ae,prefixCls:m,classNames:{...S,affixWrapper:Z(S?.affixWrapper,{[`${m}-show-count`]:v,[`${m}-textarea-allow-clear`]:o})},disabled:y,focused:O,className:Z(b,N&&`${m}-out-of-range`),style:{...x,...H&&!ve?{height:"auto"}:{}},dataAttrs:typeof R=="string"?{affixWrapper:{"data-count":R}}:void 0,styles:F,hidden:E,readOnly:I,onClear:C},wo.default.createElement(oce,b7({},j,{autoSize:M,maxLength:l,onKeyDown:se,onChange:me,onFocus:he,onBlur:le,onCompositionStart:te,onCompositionEnd:ne,className:Z(S?.textarea),style:{resize:x?.resize,...F?.textarea},disabled:y,prefixCls:m,onResize:de,ref:L,readOnly:I})))}),lce=sce,uce=ece,vL=B(_()),y7=e=>{let{allowClear:t,clearIcon:r,contextAllowClear:n,contextClearIcon:a,defaultAllowClear:o,componentName:l}=e;return(0,vL.useMemo)(()=>t??n??o?{clearIcon:xb(kt(t)?t?.clearIcon:r,kt(n)?n?.clearIcon:a,vL.default.createElement(Ab,null)),disabled:(kt(t)?t?.disabled:void 0)??(kt(n)?n?.disabled:void 0)}:!1,[t,r,n,a,o])},bL=B(_());function m2(e,t){let r=(0,bL.useRef)([]),n=()=>{r.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute("type")==="password"&&e.current?.input.hasAttribute("value")&&e.current?.input.removeAttribute("value")}))};return(0,bL.useEffect)(()=>(t&&n(),()=>r.current.forEach(a=>{a&&clearTimeout(a)})),[t]),n}function Kp(e){return yt(e,{inputAffixPadding:e.paddingXXS})}var Xp=e=>{let{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:a,lineWidthFocus:o,controlHeightSM:l,controlHeightLG:u,fontSizeLG:d,lineHeightLG:p,paddingSM:m,controlPaddingHorizontalSM:v,controlPaddingHorizontal:g,colorFillAlter:b,colorPrimaryHover:x,colorPrimary:y,controlOutlineWidth:E,controlOutline:S,colorErrorOutline:F,colorWarningOutline:$,colorBgContainer:C,inputFontSize:D,inputFontSizeLG:I,inputFontSizeSM:M}=e,A=D||r,j=M||A,P=I||d,O=Math.round((t-A*n)/2*10)/10-a,V=Math.round((l-j*n)/2*10)/10-a,W=Math.ceil((u-P*p)/2*10)/10-a;return{lineWidthFocus:o===0?0:a,paddingBlock:Math.max(O,0),paddingBlockSM:Math.max(V,0),paddingBlockLG:Math.max(W,0),paddingInline:m-a,paddingInlineSM:v-a,paddingInlineLG:g-a,addonBg:b,activeBorderColor:y,hoverBorderColor:x,activeShadow:`0 0 0 ${E}px ${S}`,errorActiveShadow:`0 0 0 ${E}px ${F}`,warningActiveShadow:`0 0 0 ${E}px ${$}`,hoverBg:C,activeBg:C,inputFontSize:A,inputFontSizeLG:P,inputFontSizeSM:j}},cce=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),h2=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...cce(yt(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),w7=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),yL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...w7(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),BL=(e,t)=>({"&-outlined":{...w7(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...h2(e)},...yL(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...yL(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),wL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),dce=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...wL(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...wL(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...h2(e)}}}}),IL="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",ML=(e,t)=>({outline:`${ue(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:ue(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(r=>`${r} 0s`).join(", ")}),xL=(e,t)=>({"&, & input, & textarea":{color:t.color},[IL]:ML(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),TL=(e,t)=>{let{componentCls:r}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${r}-sm, &${r}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${r}-lg, &${r}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:"none"},[IL]:ML(e,e.activeBorderColor),[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:xL(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${r}-status-warning`]:xL(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},jL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:t?.inputColor??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),EL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...jL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),_L=(e,t)=>({"&-filled":{...jL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...h2(e)},...EL(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...EL(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),kL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),pce=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...kL(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...kL(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),NL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ue(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),CL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...NL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),PL=(e,t)=>({"&-underlined":{...NL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...CL(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...CL(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),RL=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),x7=e=>{let{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:a}=e;return{padding:`${ue(t)} ${ue(a)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},E7=e=>({padding:`${ue(e.paddingBlockSM)} ${ue(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),k7=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ue(e.paddingBlock)} ${ue(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...RL(e.colorTextPlaceholder),"&-lg":{...x7(e),...t.largeStyle},"&-sm":{...E7(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),fce=e=>{let{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...x7(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...E7(e)},[`&-lg ${r}-select-single`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ue(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${ue(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ue(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${ue(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${r}-cascader-picker`]:{margin:`-9px ${ue(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",..._h(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
172
- & > ${t}-affix-wrapper,
173
- & > ${t}-number-affix-wrapper,
174
- & > ${r}-picker-range
175
- `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select,
176
- & > ${r}-select-auto-complete ${t},
177
- & > ${r}-cascader-picker ${t},
178
- & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
179
- & > ${r}-select:first-child,
180
- & > ${r}-select-auto-complete:first-child ${t},
181
- & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
182
- & > ${r}-select:last-child,
183
- & > ${r}-cascader-picker:last-child ${t},
184
- & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},mce=e=>{let{componentCls:t,controlHeightSM:r,lineWidth:n,calc:a}=e,o=a(r).sub(a(n).mul(2)).sub(16).div(2).equal();return{[t]:{...Tt(e),...k7(e),...BL(e),..._L(e),...TL(e),...PL(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:o,paddingBottom:o}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},hce=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...yi(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ue(e.inputAffixPadding)}`}}}},gce=e=>{let{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:a,colorIcon:o,colorIconHover:l}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[u]:{...k7(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r},"&-password-icon":{display:"inline-flex",color:o,cursor:"pointer",transition:`all ${a}`,"&:hover":{color:l}}},...hce(e)},[`${t}-underlined`]:{borderRadius:0},[d]:{[`${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},vce=e=>{let{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:{...Tt(e),...fce(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}},...dce(e),...pce(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},bce=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},OL=pt(["Input","Shared"],e=>{let t=yt(e,Kp(e));return[mce(t),gce(t)]},Xp,{resetFont:!1}),g2=pt(["Input","Component"],e=>{let t=yt(e,Kp(e));return[vce(t),bce(t),Zh(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Xp,{resetFont:!1});function yce(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var wce=(0,hl.forwardRef)((e,t)=>{let{prefixCls:r,bordered:n=!0,status:a,size:o,disabled:l,onBlur:u,onFocus:d,suffix:p,allowClear:m,addonAfter:v,addonBefore:g,className:b,style:x,styles:y,rootClassName:E,onChange:S,classNames:F,variant:$,...C}=e,{getPrefixCls:D,direction:I,allowClear:M,autoComplete:A,className:j,style:P,classNames:O,styles:V}=xt("input"),W=D("input",r),H=(0,hl.useRef)(null),q=yn(W),[z,L]=OL(W,E);g2(W,q);let{compactSize:U,compactItemClassnames:Y}=ml(W,I),X=Ur(Me=>o??U??Me),J=hl.default.useContext(ja),N=l??J,R={...e,size:X,disabled:N},K=Ge(P),Q=Ge(x),[ee,te]=Ct([O,F],[V,K,y,Q],{props:R}),{status:ne,hasFeedback:me,feedbackIcon:se}=(0,hl.useContext)(vo),he=Vh(ne,a),le=yce(e)||!!me,ke=(0,hl.useRef)(le),Ae=m2(H,!0),de=Me=>{Ae(),u?.(Me)},ve=Me=>{Ae(),d?.(Me)},ye=Me=>{Ae(),S?.(Me)},we=(me||p)&&hl.default.createElement(hl.default.Fragment,null,p,me&&se),Oe=y7({allowClear:m,contextAllowClear:M,componentName:"Input"}),[Fe,$e]=Fu("input",$,n);return hl.default.createElement(uce,{ref:fn(t,H),prefixCls:W,autoComplete:A,...C,disabled:N,onBlur:de,onFocus:ve,style:te.root,styles:te,suffix:we,allowClear:Oe,className:Z(b,E,L,q,Y,j,ee.root),onChange:ye,addonBefore:g&&hl.default.createElement(td,{form:!0,space:!0},g),addonAfter:v&&hl.default.createElement(td,{form:!0,space:!0},v),classNames:{...ee,input:Z({[`${W}-sm`]:X==="small",[`${W}-lg`]:X==="large",[`${W}-rtl`]:I==="rtl"},ee.input,z),variant:Z({[`${W}-${Fe}`]:$e},qp(W,he)),affixWrapper:Z({[`${W}-affix-wrapper-sm`]:X==="small",[`${W}-affix-wrapper-lg`]:X==="large",[`${W}-affix-wrapper-rtl`]:I==="rtl"},z),wrapper:Z({[`${W}-group-rtl`]:I==="rtl"},z),groupWrapper:Z({[`${W}-group-wrapper-sm`]:X==="small",[`${W}-group-wrapper-lg`]:X==="large",[`${W}-group-wrapper-rtl`]:I==="rtl",[`${W}-group-wrapper-${Fe}`]:$e},qp(`${W}-group-wrapper`,he,me),z)}})}),e0=wce,nd=B(_()),xce=B(_()),Ece=e=>{let{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical","@media (hover: none) and (pointer: coarse)":{resize:"none"},[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
185
- &-allow-clear > ${t},
186
- &-affix-wrapper${n}-has-feedback ${t}
187
- `]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},kce=pt(["Input","TextArea"],e=>{let t=yt(e,Kp(e));return Ece(t)},Xp,{resetFont:!1}),Cce=(0,xce.forwardRef)((e,t)=>{let{prefixCls:r,bordered:n=!0,size:a,disabled:o,status:l,allowClear:u,classNames:d,rootClassName:p,className:m,style:v,styles:g,variant:b,showCount:x,onMouseDown:y,onResize:E,...S}=e,{getPrefixCls:F,direction:$,allowClear:C,autoComplete:D,className:I,style:M,classNames:A,styles:j}=xt("textArea"),P=nd.useContext(ja),O=o??P,{status:V,hasFeedback:W,feedbackIcon:H}=nd.useContext(vo),q=Vh(V,l),z=Ge(M),L=Ge(v),[U,Y]=Ct([A,d],[j,z,g,L],{props:e}),X=nd.useRef(null);nd.useImperativeHandle(t,()=>({resizableTextArea:X.current?.resizableTextArea,focus:ye=>{Mx(X.current?.resizableTextArea?.textArea,ye)},blur:()=>X.current?.blur(),nativeElement:X.current?.nativeElement||null}));let J=F("input",r),N=yn(J),[R,K]=OL(J,p);kce(J,N);let{compactSize:Q,compactItemClassnames:ee}=ml(J,$),te=Ur(ye=>a??Q??ye),[ne,me]=Fu("textArea",b,n),se=y7({allowClear:u,contextAllowClear:C,componentName:"TextArea"}),[he,le]=nd.useState(!1),[ke,Ae]=nd.useState(!1),de=ye=>{le(!0),y?.(ye);let we=()=>{le(!1),document.removeEventListener("mouseup",we)};document.addEventListener("mouseup",we)},ve=ye=>{if(E?.(ye),he&&cr(getComputedStyle)){let we=X.current?.nativeElement?.querySelector("textarea");we&&getComputedStyle(we).resize==="both"&&Ae(!0)}};return nd.createElement(lce,{autoComplete:D,...S,style:Y.root,styles:Y,disabled:O,allowClear:se,className:Z(K,N,m,p,ee,I,U.root,{[`${J}-textarea-affix-wrapper-resize-dirty`]:ke}),classNames:{...U,textarea:Z({[`${J}-sm`]:te==="small",[`${J}-lg`]:te==="large"},R,U.textarea,he&&`${J}-mouse-active`),variant:Z({[`${J}-${ne}`]:me},qp(J,q)),affixWrapper:Z(`${J}-textarea-affix-wrapper`,{[`${J}-affix-wrapper-rtl`]:$==="rtl",[`${J}-affix-wrapper-sm`]:te==="small",[`${J}-affix-wrapper-lg`]:te==="large",[`${J}-textarea-show-count`]:x||e.count?.show},R)},prefixCls:J,suffix:W&&nd.createElement("span",{className:`${J}-textarea-suffix`},H),showCount:x,ref:X,onResize:ve,onMouseDown:de})}),Ib=Cce;var Sce=B(_()),Fce=Sce.default.createContext(void 0),t0=Fce,$ce=B(_()),Bu=100,Dce=10,zL=Bu*Dce,IAe=zL+Bu,LL={Modal:Bu,Drawer:Bu,Popover:Bu,Popconfirm:Bu,Tooltip:Bu,Tour:Bu,FloatButton:Bu},Ace={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},Bce=e=>e in LL,Qp=(e,t)=>{let[,r]=Ma(),n=$ce.default.useContext(t0),a=Bce(e),o;if(t!==void 0)o=[t,t];else{let l=n??0;a?l+=(n?0:r.zIndexPopupBase)+LL[e]:l+=Ace[e],o=[n===void 0?t:l,l]}return o};var Uo=B(_()),Ice=B(_()),Mce=e=>{let{children:t,prefixCls:r,id:n,classNames:a,styles:o,className:l,style:u}=e;return Ice.createElement("div",{id:n,className:Z(`${r}-container`,a?.container,l),style:{...o?.container,...u},role:"tooltip"},typeof t=="function"?t():t)},Tb=Mce,r0=B(_()),HL=B(_()),n0={shiftX:64,adjustY:1},a0={adjustX:1,shiftY:!0},Go=[0,0],Tce={left:{points:["cr","cl"],overflow:a0,offset:[-4,0],targetOffset:Go},right:{points:["cl","cr"],overflow:a0,offset:[4,0],targetOffset:Go},top:{points:["bc","tc"],overflow:n0,offset:[0,-4],targetOffset:Go},bottom:{points:["tc","bc"],overflow:n0,offset:[0,4],targetOffset:Go},topLeft:{points:["bl","tl"],overflow:n0,offset:[0,-4],targetOffset:Go},leftTop:{points:["tr","tl"],overflow:a0,offset:[-4,0],targetOffset:Go},topRight:{points:["br","tr"],overflow:n0,offset:[0,-4],targetOffset:Go},rightTop:{points:["tl","tr"],overflow:a0,offset:[4,0],targetOffset:Go},bottomRight:{points:["tr","br"],overflow:n0,offset:[0,4],targetOffset:Go},rightBottom:{points:["bl","br"],overflow:a0,offset:[4,0],targetOffset:Go},bottomLeft:{points:["tl","bl"],overflow:n0,offset:[0,4],targetOffset:Go},leftBottom:{points:["br","bl"],overflow:a0,offset:[-4,0],targetOffset:Go}};function C7(){return C7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C7.apply(this,arguments)}var jce=r0.forwardRef((e,t)=>{let{trigger:r=["hover","focus"],mouseEnterDelay:n=0,mouseLeaveDelay:a=.1,prefixCls:o="rc-tooltip",children:l,onVisibleChange:u,afterVisibleChange:d,motion:p,placement:m="right",align:v={},destroyOnHidden:g=!1,defaultVisible:b,getTooltipContainer:x,arrowContent:y,overlay:E,id:S,showArrow:F=!0,classNames:$,styles:C,...D}=e,I=pl(S),M=(0,HL.useRef)(null);(0,HL.useImperativeHandle)(t,()=>M.current);let A={...D};"visible"in e&&(A.popupVisible=e.visible);let j=r0.useMemo(()=>{if(!F)return!1;let O=F===!0?{}:F;return{...O,className:Z(O.className,$?.arrow),style:{...O.style,...C?.arrow},content:O.content??y}},[F,$?.arrow,C?.arrow,y]),P=({open:O})=>{let V=r0.Children.only(l),W={"aria-describedby":[V.props["aria-describedby"],E&&O?I:void 0].filter(Boolean).join(" ")||void 0};return r0.cloneElement(V,W)};return r0.createElement(Ph,C7({popupClassName:$?.root,prefixCls:o,popup:r0.createElement(Tb,{key:"content",prefixCls:o,id:I,classNames:$,styles:C},E),action:r,builtinPlacements:Tce,popupPlacement:m,ref:M,popupAlign:v,getPopupContainer:x,onOpenChange:u,afterOpenChange:d,popupMotion:p,defaultPopupVisible:b,autoDestroy:g,mouseLeaveDelay:a,popupStyle:C?.root,mouseEnterDelay:n,arrow:j,uniqueContainerClassName:$?.uniqueContainer,uniqueContainerStyle:C?.uniqueContainer},A),P)}),_ce=jce,Nce=_ce;function i0(e){let{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,a=t/2,o=0,l=a,u=n*1/Math.sqrt(2),d=a-n*(1-1/Math.sqrt(2)),p=a-r*(1/Math.sqrt(2)),m=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),v=2*a-p,g=m,b=2*a-u,x=d,y=2*a-o,E=l,S=a*Math.sqrt(2)+n*(Math.sqrt(2)-2),F=n*(Math.sqrt(2)-1),$=`polygon(${F}px 100%, 50% ${F}px, ${2*a-F}px 100%, ${F}px 100%)`,C=`path('M ${o} ${l} A ${n} ${n} 0 0 0 ${u} ${d} L ${p} ${m} A ${r} ${r} 0 0 1 ${v} ${g} L ${b} ${x} A ${n} ${n} 0 0 0 ${y} ${E} Z')`;return{arrowShadowWidth:S,arrowPath:C,arrowPolygon:$}}var VL=(e,t,r)=>{let{sizePopupArrow:n,arrowPolygon:a,arrowPath:o,arrowShadowWidth:l,borderRadiusXS:u,calc:d}=e,p={content:'""',position:"absolute",width:l,height:l,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${ue(u)} 0`},transform:"translateY(50%) rotate(-135deg)",zIndex:0,background:"transparent"};return r&&(p.boxShadow=r),{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:d(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[a,o]},content:'""'},"&::after":p}},UL=8;function Yp(e){let{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?UL:n}}var Pce=(e,t,r)=>{let{componentCls:n,boxShadowPopoverArrow:a,arrowOffsetVertical:o,arrowOffsetHorizontal:l,antCls:u}=e,[d]=bn(u,"tooltip"),{arrowDistance:p=0,arrowShadow:m=!0}=r||{};return{[n]:{[`${n}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...VL(e,t,m?a:!1),"&:before":{background:t}}],[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:p,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[d("arrow-offset-x")]:l,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:l}}},"&-placement-topRight":{[d("arrow-offset-x")]:`calc(100% - ${ue(l)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:l}}},[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:p,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[d("arrow-offset-x")]:l,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:l}}},"&-placement-bottomRight":{[d("arrow-offset-x")]:`calc(100% - ${ue(l)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:l}}},[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:p},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:o},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:o},[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:p},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:o},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:o}}}},o0=Pce;function Rce(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};let a=kt(n)?n:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+r,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+r,o.shiftX=!0,o.adjustX=!0;break}let l={...o,...a};return l.shiftX||(l.adjustX=!0),l.shiftY||(l.adjustY=!0),l}var qL={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},Oce={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},zce=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function v2(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:a,borderRadius:o,visibleFirst:l}=e,u=t/2,d={},p=Yp({contentRadius:o,limitVerticalRadius:!0});return Object.keys(qL).forEach(m=>{let v={...n&&Oce[m]||qL[m],offset:[0,0],dynamicInset:!0};switch(d[m]=v,zce.has(m)&&(v.autoArrow=!1),m){case"top":case"topLeft":case"topRight":v.offset[1]=-u-a;break;case"bottom":case"bottomLeft":case"bottomRight":v.offset[1]=u+a;break;case"left":case"leftTop":case"leftBottom":v.offset[0]=-u-a;break;case"right":case"rightTop":case"rightBottom":v.offset[0]=u+a;break}if(n)switch(m){case"topLeft":case"bottomLeft":v.offset[0]=-p.arrowOffsetHorizontal-u;break;case"topRight":case"bottomRight":v.offset[0]=p.arrowOffsetHorizontal+u;break;case"leftTop":case"rightTop":v.offset[1]=-p.arrowOffsetHorizontal*2+u;break;case"leftBottom":case"rightBottom":v.offset[1]=p.arrowOffsetHorizontal*2-u;break}v.overflow=Rce(m,p,t,r),l&&(v.htmlRegion="visibleFirst")}),d}var Lce=B(_()),Hce=Lce.default.createContext(!1),qce=Hce,Wce=B(_()),Vce=(e,t)=>{let r=n=>typeof n=="boolean"?{show:n}:n||{};return Wce.default.useMemo(()=>{let n=r(e),a=r(t);return{...a,...n,show:n.show??a.show??!0}},[e,t])},b2=Vce,Mb=B(_()),WL="50%",Uce=e=>{let{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:a,tooltipBg:o,tooltipBorderRadius:l,zIndexPopup:u,controlHeight:d,dropShadowPopover:p,paddingSM:m,paddingXS:v,arrowOffsetHorizontal:g,sizePopupArrow:b,antCls:x}=e,[y,E]=bn(x,"tooltip"),S=t(l).add(b).add(g).equal(),F={minWidth:t(l).mul(2).add(b).equal(),minHeight:d,padding:`${ue(e.calc(m).div(2).equal())} ${ue(v)}`,color:E("overlay-color",a),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:l,boxSizing:"border-box"},$={[y("valid-offset-x")]:E("arrow-offset-x","var(--arrow-x)"),transformOrigin:[E("valid-offset-x",WL),`var(--arrow-y, ${WL})`].join(" ")};return[{[r]:{...Tt(e),position:"absolute",zIndex:u,display:"block",width:"max-content",maxWidth:n,visibility:"visible",filter:p,...$,"&-hidden":{display:"none"},[y("arrow-background-color")]:o,[`${r}-container`]:[F,XF(e,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:S},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(l,UL)}},[`${r}-content`]:{position:"relative"},...Zc(e,(C,{darkColor:D})=>({[`&${r}-${C}`]:{[`${r}-container`]:{backgroundColor:D},[`${r}-arrow`]:{[y("arrow-background-color")]:D}}})),"&-rtl":{direction:"rtl"}}},o0(e,E("arrow-background-color"),{arrowShadow:!1}),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${r}-unique-container`]:{...F,...$,position:"absolute",zIndex:t(u).sub(1).equal(),filter:p,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Gce=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...Yp({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...i0(yt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),GL=(e,t,r=!0)=>pt("Tooltip",n=>{let{borderRadius:a,colorTextLightSolid:o,colorBgSpotlight:l,maxWidth:u}=n,d=yt(n,{tooltipMaxWidth:u,tooltipColor:o,tooltipBorderRadius:a,tooltipBg:l});return[Uce(d),$u(n,"zoom-big-fast")]},Gce,{resetStyle:!1,injectStyle:r})(e,t),Kce=bi.map(e=>`${e}-inverse`),Xce=["success","processing","error","default","warning"];function Jp(e,t=!0){return t?[].concat(Zr(Kce),Zr(bi)).includes(e):bi.includes(e)}function S7(e){return Xce.includes(e)}var KL=(e,t,r)=>{let n=Jp(r),[a]=bn(e,"tooltip"),o=Z({[`${t}-${r}`]:r&&n}),l={},u={},d=JF(r).toRgb(),p=(.299*d.r+.587*d.g+.114*d.b)/255<.5?"#FFF":"#000";return r&&!n&&(l.background=r,l[a("overlay-color")]=p,u[a("arrow-background-color")]=r),{className:o,overlayStyle:l,arrowStyle:u}},Qce=e=>{let{prefixCls:t,className:r,placement:n="top",title:a,color:o,overlayInnerStyle:l,classNames:u,styles:d}=e,{getPrefixCls:p}=Mb.useContext(st),m=p("tooltip",t),v=p(),g=yn(m),[b,x]=GL(m,g),y=KL(v,m,o),E=y.arrowStyle,S=Mb.useMemo(()=>({container:{...l,...y.overlayStyle}}),[l,y.overlayStyle]),F={...e,placement:n},[$,C]=Ct([u],[S,d],{props:F}),D=Z(g,b,x,m,`${m}-pure`,`${m}-placement-${n}`,r,y.className);return Mb.createElement("div",{className:D,style:E},Mb.createElement("div",{className:`${m}-arrow`}),Mb.createElement(Tb,{...e,className:b,prefixCls:m,classNames:$,styles:C},a))},Yce=Qce,Jce=Uo.forwardRef((e,t)=>{let{prefixCls:r,openClassName:n,getTooltipContainer:a,color:o,children:l,afterOpenChange:u,arrow:d,destroyTooltipOnHide:p,destroyOnHidden:m,title:v,overlay:g,trigger:b,builtinPlacements:x,autoAdjustOverflow:y=!0,motion:E,getPopupContainer:S,placement:F="top",mouseEnterDelay:$,mouseLeaveDelay:C,rootClassName:D,styles:I,classNames:M,onOpenChange:A,overlayInnerStyle:j,overlayStyle:P,overlayClassName:O,...V}=e,[,W]=Ma(),H=e["data-popover-inject"],{getPopupContainer:q,getPrefixCls:z,direction:L,...U}=xt("tooltip"),{className:Y,style:X,classNames:J,styles:N,arrow:R,trigger:K,mouseEnterDelay:Q,mouseLeaveDelay:ee}=H?{}:U,te=$??Q??.1,ne=C??ee??.1,me=b2(d,R),se=me.show,he=b||K||"hover",le=S||a||q,ke=m??!!p,Ae=Uo.useContext(qce),de=Bh("Tooltip"),ve=Uo.useRef(null),ye=()=>{ve.current?.forceAlign()};Uo.useImperativeHandle(t,()=>({forceAlign:ye,nativeElement:ve.current?.nativeElement,popupElement:ve.current?.popupElement}));let[we,Oe]=qt(e.defaultOpen??!1,e.open),Fe=!v&&!g&&v!==0,$e=Vt=>{Oe(Fe?!1:Vt),!Fe&&A&&A(Vt)},Me=Uo.useMemo(()=>x||v2({arrowPointAtCenter:me?.pointAtCenter??!1,autoAdjustOverflow:y,arrowWidth:se?W.sizePopupArrow:0,borderRadius:W.borderRadius,offset:W.marginXXS,visibleFirst:!0}),[me,x,W,se,y]),qe=Uo.useMemo(()=>v===0?v:g||v||"",[g,v]),ze=Uo.createElement(td,{space:!0,form:!0},cr(qe)?qe():qe),Te={...e,trigger:he,builtinPlacements:Me,getPopupContainer:le,destroyOnHidden:ke,mouseEnterDelay:te,mouseLeaveDelay:ne},Ne=Ge(X),Qe=Ge(P),[ot,et]=Ct([J,M],[N,Ne,I,Qe],{props:Te}),Ue=z("tooltip",r),Ie=z(),Re=we;(!("open"in e)&&Fe||Ae)&&(Re=!1);let ht=Uo.isValidElement(l)&&!mb(l)?l:Uo.createElement("span",null,l),lt=ht.props,Xe=!lt.className||typeof lt.className=="string"?Z(lt.className,n||`${Ue}-open`):lt.className,Pe=yn(Ue),[at,Nt]=GL(Ue,Pe,!H),Pt=KL(Ie,Ue,o),Yr=Pt.arrowStyle,Gt=Z(Pe,at,Nt),Tr=Z(O,{[`${Ue}-rtl`]:L==="rtl"},Pt.className,D,Gt,Y,ot.root),[er,It]=Qp("Tooltip",V.zIndex),lr={...et.container,...j,...Pt.overlayStyle},$r=Uo.createElement(Nce,{unique:!0,...V,zIndex:er,showArrow:se,placement:F,mouseEnterDelay:te,mouseLeaveDelay:ne,prefixCls:Ue,classNames:{root:Tr,container:ot.container,arrow:ot.arrow,uniqueContainer:Z(Gt,ot.container)},styles:{root:{...Yr,...et.root},container:lr,uniqueContainer:lr,arrow:et.arrow},ref:ve,overlay:ze,visible:Re,onVisibleChange:$e,afterVisibleChange:u,arrowContent:Uo.createElement("span",{className:`${Ue}-arrow-content`}),motion:{motionName:Wp(Ie,"zoom-big-fast",typeof E?.motionName=="string"?E?.motionName:void 0),motionDeadline:1e3},trigger:he,builtinPlacements:Me,getTooltipContainer:le,destroyOnHidden:ke},Re&&!V.disabled?Sr(ht,{className:Xe}):ht);return Uo.createElement(t0.Provider,{value:It},$r)}),F7=Jce;F7._InternalPanelDoNotUseOrYouWillBeFired=Yce;F7.UniqueProvider=Qx;var wi=F7;var Ui=Db;function Zp(e){return["small","middle","medium","large"].includes(e)}function y2(e){return e?Kn(e):!1}var $7=B(_()),XL=["wrap","nowrap","wrap-reverse"],QL=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],YL=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],Zce=(e,t)=>{let r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&XL.includes(r)}},ede=(e,t)=>{let r={};return YL.forEach(n=>{r[`${e}-align-${n}`]=t.align===n}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},tde=(e,t)=>{let r={};return QL.forEach(n=>{r[`${e}-justify-${n}`]=t.justify===n}),r},rde=(e,t)=>Z({...Zce(e,t),...ede(e,t),...tde(e,t)}),nde=rde,ade=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},ide=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},ode=e=>{let{componentCls:t}=e,r={};return XL.forEach(n=>{r[`${t}-wrap-${n}`]={flexWrap:n}}),r},sde=e=>{let{componentCls:t}=e,r={};return YL.forEach(n=>{r[`${t}-align-${n}`]={alignItems:n}}),r},lde=e=>{let{componentCls:t}=e,r={};return QL.forEach(n=>{r[`${t}-justify-${n}`]={justifyContent:n}}),r},ude=()=>({}),cde=pt("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:n}=e,a=yt(e,{flexGapSM:t,flexGap:r,flexGapLG:n});return[ade(a),ide(a),ode(a),sde(a),lde(a)]},ude,{resetStyle:!1}),dde=$7.default.forwardRef((e,t)=>{let{prefixCls:r,rootClassName:n,className:a,style:o,flex:l,gap:u,vertical:d,orientation:p,component:m="div",children:v,...g}=e,{flex:b,direction:x,getPrefixCls:y}=$7.default.useContext(st),E=y("flex",r),[S,F]=cde(E),[,$]=Vo(p,d??b?.vertical),C=Z(a,n,b?.className,E,S,F,nde(E,{...e,vertical:$}),{[`${E}-rtl`]:x==="rtl",[`${E}-gap-${u}`]:Zp(u),[`${E}-vertical`]:$}),D={...b?.style,...o};return zr(l)&&(D.flex=l),zr(u)&&!Zp(u)&&(D.gap=u),$7.default.createElement(m,{ref:t,className:C,style:D,...Ut(g,["justify","wrap","align"])},v)}),Ye=dde,JL=B(_()),pde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},fde=pde;function D7(){return D7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D7.apply(this,arguments)}var mde=(e,t)=>JL.createElement(Zt,D7({},e,{ref:t,icon:fde})),hde=JL.forwardRef(mde),I7=hde,ZL=B(_()),gde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},vde=gde;function A7(){return A7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A7.apply(this,arguments)}var bde=(e,t)=>ZL.createElement(Zt,A7({},e,{ref:t,icon:vde})),yde=ZL.forwardRef(bde),M7=yde,eH=B(_()),wde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},xde=wde;function B7(){return B7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B7.apply(this,arguments)}var Ede=(e,t)=>eH.createElement(Zt,B7({},e,{ref:t,icon:xde})),kde=eH.forwardRef(Ede),T7=kde;var tH=B(_()),Cde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Sde=Cde;function j7(){return j7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j7.apply(this,arguments)}var Fde=(e,t)=>tH.createElement(Zt,j7({},e,{ref:t,icon:Sde})),$de=tH.forwardRef(Fde),_7=$de;var rH=B(_()),br=B(_()),Iu=B(_()),Dde=(e,t,r,n)=>{let{titleMarginBottom:a,fontWeightStrong:o}=n;return{marginBottom:a,color:r,fontWeight:o,fontSize:e,lineHeight:t}},Ade=e=>{let t=[1,2,3,4,5],r={};return t.forEach(n=>{r[`
188
- h${n}&,
189
- div&-h${n},
190
- div&-h${n} > textarea,
191
- h${n}
192
- `]=Dde(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},Bde=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...Gx(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none",[`${t}-actions`]:{pointerEvents:"auto"}}}}}},Ide=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:`${ue(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:`${ue(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Fh[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:`${ue(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85},table:{width:"100%",textAlign:"start",borderCollapse:"separate",borderSpacing:0,marginBlock:"1em","th, td":{padding:ue(e.padding),overflowWrap:"break-word",borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"thead > tr:first-child > th:first-child":{borderStartStartRadius:e.borderRadiusLG},"thead > tr:first-child > th:last-child":{borderStartEndRadius:e.borderRadiusLG},"thead > tr > th":{textAlign:"start",position:"relative",color:e.colorTextHeading,fontWeight:e.fontWeightStrong,backgroundColor:e.colorFillAlter,transition:`background-color ${e.motionDurationMid} ease`,"&:not(:last-child)::before":{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:e.colorSplit,transform:"translateY(-50%)",content:'""'}},"tbody > tr":{"> th, > td":{transition:`background-color ${e.motionDurationMid} ease`},"&:hover > th, &:hover > td":{backgroundColor:e.colorFillAlter}}}}),Mde=e=>{let{componentCls:t,paddingSM:r}=e,n=r;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(n).div(-2).add(1).equal(),marginBottom:e.calc(n).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},[`&${t}-edit-content textarea`]:{margin:"0!important",fontSize:"inherit",lineHeight:"inherit",fontFamily:"inherit",fontWeight:"inherit",MozTransition:"none",height:"1em"}}}},Tde=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),jde=()=>({"a&-ellipsis, span&-ellipsis":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{...fl,"a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),_de=e=>{let{componentCls:t,titleMarginTop:r}=e;return{[t]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"div&, p":{marginBottom:"1em"},...Ade(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:r},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:r}},...Ide(e),...Bde(e),[`${t}-actions`]:{display:"inline"},[`
193
- ${t}-expand,
194
- ${t}-collapse,
195
- ${t}-edit,
196
- ${t}-copy
197
- `]:{...Gx(e),marginInlineStart:e.marginXXS},[`${t}-actions-start`]:{[`
198
- ${t}-expand,
199
- ${t}-collapse,
200
- ${t}-edit,
201
- ${t}-copy:not(${t}-copy-icon-only)
202
- `]:{marginInlineStart:0,marginInlineEnd:e.marginXXS}},...Mde(e),...Tde(e),...jde(),"&-rtl":{direction:"rtl"}}}},Nde=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),dH=pt("Typography",_de,Nde),Pde=e=>{let{prefixCls:t,"aria-label":r,className:n,style:a,classNames:o,styles:l,direction:u,maxLength:d,autoSize:p=!0,value:m,onSave:v,onCancel:g,onEnd:b,component:x,enterIcon:y=Iu.createElement(M7,null)}=e,E=Iu.useRef(null),S=Iu.useRef(!1),F=Iu.useRef(null),[$,C]=Iu.useState(m);Iu.useEffect(()=>{C(m)},[m]),Iu.useEffect(()=>{if(E.current?.resizableTextArea){let{textArea:q}=E.current.resizableTextArea;q.focus();let{length:z}=q.value;q.setSelectionRange(z,z)}},[]);let D=({target:q})=>{C(q.value.replace(/[\n\r]/g,""))},I=()=>{S.current=!0},M=()=>{S.current=!1},A=({keyCode:q})=>{S.current||(F.current=q)},j=()=>{v($.trim())},P=({keyCode:q,ctrlKey:z,altKey:L,metaKey:U,shiftKey:Y})=>{F.current!==q||S.current||z||L||U||Y||(q===vn.ENTER?(j(),b?.()):q===vn.ESC&&g())},O=()=>{j()},[V,W]=dH(t),H=Z(t,`${t}-edit-content`,{[`${t}-rtl`]:u==="rtl",[`${t}-${x}`]:!!x},n,o.root,V,W);return Iu.createElement("div",{className:H,style:{...l.root,...a}},Iu.createElement(Ib,{ref:E,maxLength:d,value:$,onChange:D,onKeyDown:A,onKeyUp:P,onCompositionStart:I,onCompositionEnd:M,onBlur:O,"aria-label":r,rows:1,autoSize:p,className:o.textarea,style:l.textarea}),y!==null?Sr(y,{className:`${t}-edit-content-confirm`}):null)},Rde=Pde,Ode=B(_()),zde=(e,t)=>{let r=!1,n=a=>{a.stopPropagation(),a.preventDefault(),a.clipboardData?.clearData(),a.clipboardData?.setData("text/plain",e),t&&a.clipboardData?.setData("text/html",e),r=!0};try{return document.addEventListener("copy",n,{capture:!0}),document.execCommand("copy"),r}catch{return!1}finally{document.removeEventListener("copy",n,{capture:!0})}},Lde=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function Hde(e,t){if(typeof e!="string")return!1;let r=t?.format==="text/html";return!!(await Lde(e,r)||zde(e,r))}var qde=Hde,Wde=(e,t={})=>!zr(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],pH=Wde,Vde=({copyConfig:e,children:t})=>{let[r,n]=Dh(!1),[a,o]=Ode.useState(!1),l={};e.format&&(l.format=e.format);let u=wt(async d=>{d?.preventDefault(),d?.stopPropagation(),o(!0);try{let p=cr(e.text)?await e.text():e.text;await qde(p||pH(t,{skipEmpty:!0}).join("")||"",l),o(!1),n(!0,!0),n(!1,{ms:3e3}),e.onCopy?.(d)}catch(p){throw o(!1),p}});return{copied:r,copyLoading:a,onClick:u}},Ude=Vde,Gde=B(_()),Kde=(e,t)=>{let r=!!e;return Gde.useMemo(()=>{let n={...t,...r&&kt(e)?e:null};return[r,n]},[r,e,t])},N7=Kde,nH=B(_()),Xde=e=>{let t=(0,nH.useRef)(void 0);return(0,nH.useEffect)(()=>{t.current=e}),t.current},Qde=Xde,aH=B(_()),Yde=(e,t,r)=>(0,aH.useMemo)(()=>e===!0?{title:t??r}:(0,aH.isValidElement)(e)?{title:e}:kt(e)?{title:t??r,...e}:{title:e},[e,t,r]),Jde=Yde,Zde=B(_()),fH=(e,t,r,n,a)=>{let{getPrefixCls:o,direction:l,className:u,style:d,classNames:p,styles:m}=xt("typography"),v=n??l,g=o("typography",e),b={...a,prefixCls:g,direction:v},x=(0,Zde.useMemo)(()=>({root:u}),[u]),y=Ge(d),[E,S]=Ct([x,p,t],[m,y,r],{props:b});return[E,S,g,v]},E2=B(_()),mH=E2.forwardRef((e,t)=>{let{component:r="article",className:n,rootClassName:a,children:o,direction:l,style:u,classNames:d,styles:p,prefixCls:m,...v}=e,[g,b]=dH(m),x=Z(m,{[`${m}-rtl`]:l==="rtl"},n,a,g,b,d?.root),y={...p?.root,...u};return E2.createElement(r,{...v,className:x,style:y,ref:t},o)}),epe=E2.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:a,direction:o,classNames:l,styles:u,...d}=e,[p,m,v,g]=fH(r,l,u,o,e);return E2.createElement(mH,{ref:t,className:Z(n,a),direction:g,classNames:p,styles:m,prefixCls:v,...d})}),tpe=epe,jb=B(_()),iH=e=>e===!1?[!1,!1]:pH(e);function P7(e,t,r){return e===!0||e===void 0?t:e||r&&t}function rpe(e){let t=document.createElement("em");e.appendChild(t);let r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}var q7=e=>["string","number"].includes(typeof e),npe=e=>{let{prefixCls:t,copied:r,locale:n,iconOnly:a,tooltips:o,icon:l,tabIndex:u,onCopy:d,loading:p,className:m,style:v}=e,g=iH(o),b=iH(l),{copied:x,copy:y}=n??{},E=r?x:y,S=P7(g[r?1:0],E),F=typeof S=="string"?S:E;return jb.createElement(wi,{title:S},jb.createElement("button",{type:"button",className:Z(`${t}-copy`,m,{[`${t}-copy-success`]:r,[`${t}-copy-icon-only`]:a}),style:v,onClick:d,"aria-label":F,tabIndex:u},r?P7(b[1],jb.createElement(_7,null),!0):P7(b[0],p?jb.createElement(Gp,null):jb.createElement(T7,null),!0)))},ape=npe,Hr=B(_()),w2=Hr.forwardRef(({style:e,children:t},r)=>{let n=Hr.useRef(null);return Hr.useImperativeHandle(r,()=>({isExceed:()=>{let a=n.current;return a.scrollHeight>a.clientHeight},getHeight:()=>n.current.clientHeight})),Hr.createElement("span",{"aria-hidden":!0,ref:n,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},t)}),ipe=e=>e.reduce((t,r)=>t+(q7(r)?String(r).length:1),0);function oH(e,t){let r=0,n=[];for(let a=0;a<e.length;a+=1){if(r===t)return n;let o=e[a],l=q7(o)?String(o).length:1,u=r+l;if(u>t){let d=t-r;return n.push(String(o).slice(0,d)),n}n.push(o),r=u}return e}var R7=0,O7=1,z7=2,L7=3,sH=4,x2={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function ope(e){let{enableMeasure:t,width:r,text:n,children:a,rows:o,expanded:l,measureDeps:u,miscDeps:d,onEllipsis:p}=e,m=Hr.useMemo(()=>xr(n),[n]),v=Hr.useMemo(()=>ipe(m),[n]),g=Hr.useMemo(()=>a(m,!1),[n].concat(Zr(u))),[b,x]=Hr.useState(null),y=Hr.useRef(null),E=Hr.useRef(null),S=Hr.useRef(null),F=Hr.useRef(null),$=Hr.useRef(null),[C,D]=Hr.useState(!1),[I,M]=Hr.useState(R7),[A,j]=Hr.useState(0),[P,O]=Hr.useState(null);or(()=>{M(t&&r&&v?O7:R7)},[r,n,o,t,m].concat(Zr(u))),or(()=>{if(I===O7){M(z7);let q=E.current&&getComputedStyle(E.current).whiteSpace;O(q)}else if(I===z7){let q=!!S.current?.isExceed();M(q?L7:sH),x(q?[0,v]:null),D(q);let z=S.current?.getHeight()||0,L=o===1?0:F.current?.getHeight()||0,U=$.current?.getHeight()||0,Y=Math.max(z,L+U);j(Y+1),p(q)}},[I]);let V=b?Math.ceil((b[0]+b[1])/2):0;or(()=>{let[q,z]=b||[0,0];if(q!==z){let L=(y.current?.getHeight()||0)>A,U=V;z-q===1&&(U=L?q:z),x(L?[q,U]:[U,z])}},[b,V]);let W=Hr.useMemo(()=>{if(!t)return a(m,!1);if(I!==L7||!b||b[0]!==b[1]){let q=a(m,!1);return[sH,R7].includes(I)?q:Hr.createElement("span",{style:{...x2,WebkitLineClamp:o}},q)}return a(l?m:oH(m,b[0]),C)},[l,I,b,m].concat(Zr(d))),H={width:r,margin:0,padding:0,whiteSpace:P==="nowrap"?"normal":"inherit"};return Hr.createElement(Hr.Fragment,null,W,I===z7&&Hr.createElement(Hr.Fragment,null,Hr.createElement(w2,{style:{...H,...x2,WebkitLineClamp:o},ref:S},g),Hr.createElement(w2,{style:{...H,...x2,WebkitLineClamp:o-1},ref:F},g),Hr.createElement(w2,{style:{...H,...x2,WebkitLineClamp:1},ref:$},a([],!0))),I===L7&&b&&b[0]!==b[1]&&Hr.createElement(w2,{style:{...H,top:400},ref:y},a(oH(m,V),!0)),I===O7&&Hr.createElement("span",{style:{whiteSpace:"inherit"},ref:E}))}var spe=B(_()),lpe=({enableEllipsis:e,isEllipsis:t,disabled:r,children:n,tooltipProps:a})=>!a?.title||!e?n:spe.createElement(wi,{...a,disabled:!t||r},n),upe=lpe;function cpe({mark:e,code:t,underline:r,delete:n,strong:a,keyboard:o,italic:l},u){let d=u;function p(m,v){v&&(d=br.createElement(m,{},d))}return p("strong",a),p("u",r),p("del",n),p("code",t),p("mark",e),p("kbd",o),p("i",l),d}var dpe="...",lH=["delete","mark","code","underline","strong","keyboard","italic"],ppe=br.forwardRef((e,t)=>{let{prefixCls:r,className:n,style:a,classNames:o,styles:l,direction:u,type:d,disabled:p,children:m,ellipsis:v,editable:g,copyable:b,actions:x,component:y,title:E,onMouseEnter:S,onMouseLeave:F,...$}=e,[C]=Op("Text"),D=br.useRef(null),I=br.useRef(null),[M,A,j,P]=fH(r,o,l,u,e),O=Ut($,lH),[V,W]=N7(g),[H,q]=qt(!1,W.editing),{triggerType:z=["icon"]}=W,L=ct=>{ct&&W.onStart?.(),q(ct)},U=Qde(H);or(()=>{!H&&U&&I.current?.focus()},[H]);let Y=ct=>{ct?.preventDefault(),L(!0)},X=ct=>{W.onChange?.(ct),L(!1)},J=()=>{W.onCancel?.(),L(!1)},[N,R]=N7(b),{placement:K="end"}=x??{},{copied:Q,copyLoading:ee,onClick:te}=Ude({copyConfig:R,children:m}),[ne,me]=br.useState(!1),[se,he]=br.useState(!1),[le,ke]=br.useState(!1),[Ae,de]=br.useState(!1),[ve,ye]=br.useState(!0),[we,Oe]=N7(v,{expandable:!1,symbol:ct=>ct?C?.collapse:C?.expand}),[Fe,$e]=qt(Oe.defaultExpanded||!1,Oe.expanded),Me=we&&(!Fe||Oe.expandable==="collapsible"),{rows:qe=1}=Oe,ze=br.useMemo(()=>Me&&(Oe.suffix!==void 0||Oe.onEllipsis||Oe.expandable||V||N),[Me,Oe,V,N]);or(()=>{we&&!ze&&(me(Tx("webkitLineClamp")),he(Tx("textOverflow")))},[ze,we]);let[Te,Ne]=br.useState(Me),Qe=br.useMemo(()=>ze?!1:qe===1?se:ne,[ze,qe,ne,se]);or(()=>{Ne(Qe&&Me)},[Qe,Me]);let ot=Jde(Oe.tooltip,W.text,m),et=Te&&!!ot.title,Ue=Me&&(Te?et&&Ae:le),Ie=Me&&qe===1&&Te,Re=Me&&qe>1&&Te,ht=(ct,St)=>{$e(St.expanded),Oe.onExpand?.(ct,St)},[lt,Xe]=br.useState(0),[Pe,at]=Dh(!1),Nt=br.useRef(!1),Pt=({offsetWidth:ct})=>{Xe(ct)},Yr=ct=>{ke(ct),le!==ct&&Oe.onEllipsis?.(ct)},Gt=br.useCallback(()=>{let ct=D.current;if(we&&et&&ct){let St=rpe(ct);de(Le=>Le===St?Le:St)}},[we,et]);br.useEffect(()=>{Nt.current&&Gt()},[Gt,m,Re,ve,lt]),br.useEffect(()=>{let ct=D.current;if(typeof IntersectionObserver>"u"||!ct||!et||!Me)return;let St=new IntersectionObserver(()=>{ye(!!ct.offsetParent)});return St.observe(ct),()=>{St.disconnect()}},[et,Me]);let Tr=br.useMemo(()=>{if(!(!we||Te))return[W.text,m,E,ot.title].find(q7)},[we,Te,E,ot.title,Ue,W.text]);if(H)return br.createElement(Rde,{value:W.text??(typeof m=="string"?m:""),onSave:X,onCancel:J,onEnd:W.onEnd,prefixCls:j,className:n,style:a,direction:P,component:y,maxLength:W.maxLength,autoSize:W.autoSize,enterIcon:W.enterIcon,classNames:M,styles:A});let er=()=>{let{expandable:ct,symbol:St}=Oe;return ct?br.createElement("button",{type:"button",key:"expand",className:Z(`${j}-${Fe?"collapse":"expand"}`,M.action),style:A.action,onClick:Le=>ht(Le,{expanded:!Fe}),"aria-label":Fe?C.collapse:C?.expand},cr(St)?St(Fe):St):null},It=()=>{if(!V)return;let{icon:ct,tooltip:St,tabIndex:Le}=W,tt=xr(St)[0]||C?.edit,ut=typeof tt=="string"?tt:"";return z.includes("icon")?br.createElement(wi,{key:"edit",title:St===!1?"":tt},br.createElement("button",{type:"button",ref:I,className:Z(`${j}-edit`,M.action),style:A.action,onClick:Y,"aria-label":ut,tabIndex:Le},ct||br.createElement(I7,{role:"button"}))):null},lr=()=>N?br.createElement(ape,{key:"copy",...R,prefixCls:j,copied:Q,locale:C,onCopy:te,loading:ee,iconOnly:!Lt(m),className:M.action,style:A.action}):null,$r=ct=>{let St=ct&&er(),Le=It(),tt=lr();return!St&&!Le&&!tt?null:br.createElement("span",{key:"operations",className:Z(`${j}-actions`,M.actions,{[`${j}-actions-start`]:K==="start"}),style:A.actions,onMouseEnter:()=>at(!0,!0),onMouseLeave:()=>at(!1,{ms:500})},St,Le,tt)},Vt=ct=>[ct&&!Fe&&br.createElement("span",{"aria-hidden":!0,key:"ellipsis"},dpe),Oe.suffix];return br.createElement(Ta,{onResize:Pt,disabled:!Me},ct=>br.createElement(upe,{tooltipProps:ot,enableEllipsis:Me,isEllipsis:Ue,disabled:Pe},br.createElement(mH,{onMouseEnter:St=>{Nt.current=!0,Gt(),S?.(St)},onMouseLeave:St=>{Nt.current=!1,F?.(St)},className:Z({[`${j}-${d}`]:d,[`${j}-disabled`]:p,[`${j}-ellipsis`]:we,[`${j}-ellipsis-single-line`]:Ie,[`${j}-ellipsis-multiple-line`]:Re,[`${j}-link`]:y==="a"},n),classNames:M,styles:A,prefixCls:j,style:{...a,WebkitLineClamp:Re?qe:void 0},component:y,ref:fn(ct,D,t),direction:P,onClick:z.includes("text")?Y:void 0,"aria-label":Tr?.toString(),title:E,...O},br.createElement(ope,{enableMeasure:Me&&!Te,text:m,rows:qe,width:lt,onEllipsis:Yr,expanded:Fe,measureDeps:[K],miscDeps:[Q,Fe,ee,V,N,K,C].concat(Zr(lH.map(St=>e[St])))},(St,Le)=>cpe(e,br.createElement(br.Fragment,null,K==="start"?$r(Le):null,St.length>0&&Le&&!Fe&&Tr?br.createElement("span",{key:"show-content","aria-hidden":!0},St):St,Vt(Le),K==="start"?null:$r(Le)))))))}),k2=ppe,fpe=rH.forwardRef((e,t)=>{let{ellipsis:r,rel:n,children:a,navigate:o,...l}=e,u={...l,rel:n===void 0&&l.target==="_blank"?"noopener noreferrer":n};return rH.createElement(k2,{...u,ref:t,ellipsis:!!r,component:"a"},a)}),mpe=fpe,uH=B(_()),hpe=uH.forwardRef((e,t)=>{let{children:r,...n}=e;return uH.createElement(k2,{ref:t,...n,component:"div"},r)}),gpe=hpe,H7=B(_()),vpe=H7.forwardRef((e,t)=>{let{ellipsis:r,children:n,...a}=e,o=H7.useMemo(()=>kt(r)?Ut(r,["expandable","rows"]):r,[r]);return H7.createElement(k2,{ref:t,...a,ellipsis:o,component:"span"},n)}),bpe=vpe,cH=B(_()),ype=[1,2,3,4,5],wpe=cH.forwardRef((e,t)=>{let{level:r=1,children:n,...a}=e,o=ype.includes(r)?`h${r}`:"h1";return cH.createElement(k2,{ref:t,...a,component:o},n)}),xpe=wpe,_b=tpe;_b.Text=bpe;_b.Link=mpe;_b.Title=xpe;_b.Paragraph=gpe;var Wt=_b;var Nb=B(_(),1),_n=B(Ee(),1);function W7({label:e,count:t,preview:r,icon:n,expanded:a,id:o,className:l}){return(0,_n.jsx)(Ui,{id:o,type:"default",className:`composer-work-trigger ${l??""}`,"aria-expanded":a,"aria-label":`${e}\uFF0C${t}`,title:r,children:(0,_n.jsxs)("span",{className:"composer-work-summary",children:[(0,_n.jsx)(De,{name:n,size:16}),(0,_n.jsxs)("span",{className:"composer-work-label",children:[e,(0,_n.jsx)("span",{className:"composer-work-count",children:t})]}),(0,_n.jsx)("span",{className:"composer-work-preview",children:r}),(0,_n.jsx)("span",{className:"composer-work-chevron","data-open":a,children:(0,_n.jsx)(De,{name:"chevronDown",size:12})})]})})}function V7({title:e,description:t,onClose:r,actions:n,children:a,footer:o,className:l}){return(0,_n.jsxs)("section",{className:`composer-work-panel ${l??""}`,children:[(0,_n.jsxs)("header",{className:"composer-work-header",children:[(0,_n.jsxs)("div",{children:[(0,_n.jsx)(Wt.Text,{strong:!0,children:e}),t&&(0,_n.jsx)("p",{children:t})]}),(0,_n.jsxs)("div",{className:"composer-work-header-actions",children:[n,(0,_n.jsx)(Ui,{type:"text",size:"small","aria-label":`\u5173\u95ED${e}`,onClick:r,icon:(0,_n.jsx)(De,{name:"close",size:16})})]})]}),(0,_n.jsx)("div",{className:"composer-work-scroll",tabIndex:0,"aria-label":`${e}\u5217\u8868`,children:a}),o&&(0,_n.jsx)("footer",{className:"composer-work-footer",children:o})]})}function U7({text:e,limit:t=60}){let[r,n]=Nb.useState(!1),[a,o]=Nb.useState(!1),l=Nb.useRef(null),u=Nb.useId();return Nb.useLayoutEffect(()=>{let d=l.current;if(!d)return;let p=()=>{r||o(d.scrollHeight>d.clientHeight+1)};p();let m=new ResizeObserver(p);return m.observe(d),()=>m.disconnect()},[e,r]),(0,_n.jsxs)("div",{children:[(0,_n.jsx)("p",{ref:l,id:u,className:"composer-work-text","data-full":r,children:e}),(e.length>t||a)&&(0,_n.jsx)(Ui,{type:"link",size:"small",className:"composer-work-read-more","aria-expanded":r,"aria-controls":u,onClick:()=>n(!r),children:r?"\u6536\u8D77\u5168\u6587":"\u5C55\u5F00\u5168\u6587"})]})}var vl=class{constructor(e){ie(this,"equals",e),ie(this,"snapshot"),ie(this,"listeners",new Set),ie(this,"subscribe",t=>(this.listeners.add(t),()=>this.listeners.delete(t))),ie(this,"getSnapshot",()=>this.snapshot),this.snapshot=Object.freeze({revision:0,mounts:Object.freeze([])})}sync(e){let t=this.snapshot.mounts;if(!(t.length===e.length&&e.every((r,n)=>this.equals(t[n],r)))){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let r of this.listeners)r()}}clear(){this.snapshot.mounts.length!==0&&this.sync([])}};var Epe=class extends vl{constructor(){super((e,t)=>e.target===t.target&&e.toggleTarget===t.toggleTarget&&e.sessionId===t.sessionId&&e.draft===t.draft&&e.open===t.open&&e.openRevision===t.openRevision),ie(this,"dismissed",null),ie(this,"expanded",null),ie(this,"opener","draft"),ie(this,"focusPending",!1),ie(this,"openRevision",0),ie(this,"panelFocus",null)}sync(e){this.expanded&&this.expanded!==e[0]?.sessionId&&(this.expanded=null);let t=this.getSnapshot().mounts[0];t?.sessionId!==e[0]?.sessionId&&(this.focusPending=!1,this.opener="draft"),e[0]?.open&&(!t?.open||t.sessionId!==e[0].sessionId)&&this.openRevision++,super.sync(e.map(r=>({...r,openRevision:this.openRevision})))}isDismissed(e,t){return this.dismissed?.sessionId===e&&this.dismissed.draft===t}isExpanded(e){return this.expanded===e}openedBy(){return this.opener}toggle(e){let t=this.getSnapshot().mounts[0];return!t||t.sessionId!==e?!1:t.open?(this.dismiss(),!1):(this.dismissed=null,this.expanded=e,this.opener="toggle",this.focusPending=!0,this.sync([{...t,open:!0}]),!0)}dismiss(){let e=this.getSnapshot().mounts[0];e&&(this.dismissed={sessionId:e.sessionId,draft:e.draft},this.expanded=null,this.focusPending=!1,this.sync([{...e,open:!1}]))}reopen(){this.dismissed=null,this.expanded=null,this.opener="draft";let e=this.getSnapshot().mounts[0];e&&this.sync([{...e,open:!0}])}hasPendingFocus(){return this.focusPending}clearPendingFocus(){this.focusPending=!1}registerFocus(e,t){let r={sessionId:e.sessionId,target:e.target,focus:t};return this.panelFocus=r,()=>{this.panelFocus===r&&(this.panelFocus=null)}}focusControl(e=!1){let t=this.getSnapshot().mounts[0];return t?.open&&this.panelFocus?.sessionId===t.sessionId&&this.panelFocus.target===t.target?this.panelFocus.focus(e):!1}},ia=new Epe;function C2(e){return/^wlt_[a-zA-Z0-9_-]{43}$/.test(e)}function G7(e){let t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;t?t.call(e,""):e.value="",e.dispatchEvent(new Event("input",{bubbles:!0}))}var Ko={viewport:108,inset:24,background:"#E3E8EE",paths:[{fill:"#6B7B8D",d:"M6,0h6v6h-6z M48,0h6v6h-6z M0,6h6v6h-6z M12,6h6v6h-6z M42,6h6v6h-6z M54,6h6v6h-6z M0,12h6v6h-6z M54,12h6v6h-6z M6,36h6v6h-6z M48,36h6v6h-6z M18,48h6v6h-6z M36,48h6v6h-6z"},{fill:"#9EAAB8",d:"M6,6h6v6h-6z M48,6h6v6h-6z M6,12h48v6h-48z M0,18h12v6h-12z M24,18h12v6h-12z M48,18h12v6h-12z M0,24h12v6h-12z M24,24h12v6h-12z M48,24h12v6h-12z M0,30h24v6h-24z M36,30h24v6h-24z M0,36h6v6h-6z M12,36h6v6h-6z M24,36h12v6h-12z M42,36h6v6h-6z M54,36h6v6h-6z M6,42h48v6h-48z M12,48h6v6h-6z M24,48h12v6h-12z M42,48h6v6h-6z M18,54h6v6h-6z M36,54h6v6h-6z"},{fill:"#FFFFFF",d:"M12,18h6v6h-6z M36,18h6v6h-6z M12,24h12v6h-12z M36,24h12v6h-12z"},{fill:"#7EC88B",d:"M18,18h6v6h-6z M42,18h6v6h-6z"},{fill:"#F28B9A",d:"M24,30h12v6h-12z"},{fill:"#C5CED8",d:"M18,36h6v6h-6z M36,36h6v6h-6z"}]};function hH(e="wand-brand-mark"){let t=e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),{viewport:r,inset:n,background:a,paths:o}=Ko;return`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${r} ${r}" aria-hidden="true" focusable="false" data-wand-brand="pixel-cat"><rect width="${r}" height="${r}" rx="24" fill="${a}"/><g transform="translate(${n} ${n})">`+o.map(({fill:l,d:u})=>`<path fill="${l}" d="${u}"/>`).join("")+"</g></svg>"}var K7="data:image/svg+xml,"+encodeURIComponent(hH());var s0=B(_(),1),gH=(0,s0.createContext)(null);function kpe(e){return{subscribe:t=>e.subscribe(t),getSnapshot:()=>e.getSnapshot()}}function X7({store:e,children:t}){return(0,s0.createElement)(gH.Provider,{value:e},t)}function vH(){let e=(0,s0.useContext)(gH);if(!e)throw new Error("useUiStore must be used inside UiStoreProvider");return e}function xi(){let e=vH(),t=(0,s0.useMemo)(()=>kpe(e),[e]);return(0,s0.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot)}function Gi(){let e=vH();return(0,s0.useCallback)(t=>e.dispatch(t),[e])}function Je(...e){return e.filter(Boolean).join(" ")}var bH=B(_(),1),Pb=B(Ee(),1);function yH(e){let t=e.trim();return t?(t=t.replace(/\/{2,}/g,"/"),t=t.replace(/\/+$/,""),t||"/"):""}function Cpe(e){let t=yH(e);return t==="/"||!t?"/":t.slice(0,t.lastIndexOf("/"))||"/"}function Q7({explorerRef:e,suspended:t=!1}={}){let r=xi(),n=Gi(),a=r.layout.filePanelOpen&&!t,[o,l]=bH.useState(null);return bH.useEffect(()=>{if(!a||o)return;let u=!0;return globalThis.__wandImportBrowserModule("5f0e00d267a0d1e3").then(d=>{u&&l(()=>d.ShellFilePanelDrawer)}),()=>{u=!1}},[a,o]),(0,Pb.jsxs)(Pb.Fragment,{children:[(0,Pb.jsx)("div",{id:"file-panel-backdrop",className:Je("file-panel-backdrop",r.layout.filePanelBackdropVisible&&"open"),"aria-hidden":"true",onClick:()=>{n({type:"layout.files.close"})},hidden:!0}),(0,Pb.jsx)("div",{className:"file-explorer legacy-file-explorer-host",id:"file-explorer",ref:e,hidden:!0,"aria-hidden":"true"}),o?(0,Pb.jsx)(o,{explorerRef:e,suspended:t}):null]})}var ef=globalThis.__wandBrowserRuntime??{configPath:"${wandConfigPath}",aiTeamsChunkSrc:"${aiTeamsChunkSrc}",plushAvatarChunkSrc:"${plushAvatarChunkSrc}"},S2="wand-decision-expert",F2="\u77F3\u4E00",Spe="Wand \u672C\u5730\u51B3\u7B56\u6A21\u578B \xB7 LAYA";var Mu=["claude","codex","opencode","grok","qoder","pi"],Fpe=["claude","codex","opencode","grok","qoder","pi"],$pe=`^(?:${Fpe.join("|")}):[a-z0-9][a-z0-9_-]{0,31}$`;function $2(e){return typeof e=="string"&&Dpe.test(e)}var Dpe=new RegExp($pe),Ape=new Set(Mu);function J7(e){return typeof e=="string"&&Ape.has(e)}function D2(e){return e==="qoder"?"qodercli":e}var Bpe={claude:"claude-cli-print",codex:"codex-cli-exec",opencode:"opencode-cli-run",grok:"grok-cli-headless",qoder:"qoder-cli-print",pi:"pi-cli-json"};function Z7(e){return Bpe[e]}var bl={claude:"Claude",codex:"Codex",opencode:"OpenCode",grok:"Grok",qoder:"Qoder",pi:"Pi"},Rb="Wand Agent",Ipe={anthropic:"claude",claude:"claude","claude-cli":"claude","claude-cli-print":"claude","claude-sdk":"claude",codex:"codex","codex-cli":"codex","codex-cli-exec":"codex",grok:"grok","grok-cli":"grok","grok-cli-headless":"grok","open-code":"opencode",open_code:"opencode",opencode:"opencode","opencode-cli-run":"opencode",qoder:"qoder","qoder-cli":"qoder","qoder-cli-print":"qoder",qodercli:"qoder",pi:"pi","pi-cli":"pi","pi-cli-json":"pi"};function Xo(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();return t?Ipe[t]??null:null}var Mpe=new Set(["npx","pnpx","bunx","yarn","pnpm","corepack"]),Tpe=new Set(["dlx","exec","x"]);function Y7(e){let t=e.match(/^(?:"([^"]+)"|'([^']+)'|(\S+))/);return(t?.[1]??t?.[2]??t?.[3]??"").split(/[\\/]/).pop()?.replace(/\.(?:cmd|exe)$/i,"")??""}function jpe(e){if(typeof e!="string")return;let t=e.trim();if(!t)return;let r=t.match(/"[^"]*"|'[^']*'|\S+/g)??[],n=0;if(Mpe.has(Y7(r[0]??"").toLowerCase()))for(n=1;n<r.length;){let a=r[n];if(a.startsWith("-")){n+=1;continue}if(Tpe.has(Y7(a).toLowerCase())){n+=1;continue}break}return Xo(Y7(r[n]??""))??void 0}function Ob(e){if(typeof e=="string"&&e.trim().toLowerCase()==="terminal")return"\u7EC8\u7AEF";let t=Xo(e);return t?bl[t]:typeof e=="string"&&e.trim()?e.trim():"AI"}var Tu=jpe,l0="wand-agent",u0=[{id:"claude",provider:"claude",label:bl.claude,description:"Claude Code"},{id:"codex",provider:"codex",label:bl.codex,description:"OpenAI Codex CLI"},{id:"opencode",provider:"opencode",label:bl.opencode,description:"OpenCode CLI"},{id:"grok",provider:"grok",label:bl.grok,description:"Grok Build CLI"},{id:"qoder",provider:"qoder",label:bl.qoder,description:"Qoder CLI"},{id:"pi",provider:"pi",engine:"cli",label:bl.pi,description:"Pi CLI\uFF1A\u7ED3\u6784\u5316 JSON \u6216 PTY \u7EC8\u7AEF"},{id:l0,provider:"pi",engine:"sdk",label:Rb,description:"Wand \u81EA\u5E26 Agent\uFF1A\u8FDB\u7A0B\u5185 SDK \u6267\u884C\uFF0C\u53EA\u652F\u6301\u7ED3\u6784\u5316\u4F1A\u8BDD"}];function zb(e){return e?u0.find(t=>t.id===e)??null:null}function e3(e,t){return e==="pi"&&t==="sdk"?l0:e}function yl(e,t){return Xo(e)==="pi"&&(t==="sdk"||t==="core")?Rb:Ob(e)}var A2="#D97757",B2="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",I2="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",_pe="M517.36 400H634.72V634.72H517.36Z",M2=[{fill:"#F09082",d:"M165.29 165.29H517.36V400H400V282.65H165.29Z"},{fill:"#4D9ABF",d:"M165.29 282.65H282.65V400H400V517.36H282.65V634.72H165.29Z"},{fill:"#F1BE58",d:_pe}],T2=["M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449.844576C33.5314.730667 33.6139.616757 33.6964.5L29.1113 5.09055V5.07631L13.2343 21.0436Z","M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745.36364 32.5L10.9474 23.0341Z"];function Npe(e){let t=Xo(e),r=`class="${`wand-provider-logo wand-provider-logo-${t??"generic"}`}" aria-hidden="true" focusable="false" data-provider-logo="${t??"generic"}"`;return t==="opencode"?`<svg ${r} viewBox="0 0 512 512"><path d="M0 0H512V512H0Z" fill="#131010"/><path d="M320 224V352H192V224H320Z" fill="#5A5858"/><path d="M384 416H128V96H384V416ZM320 160H192V352H320V160Z" fill="#fff" fill-rule="evenodd"/></svg>`:t==="qoder"?`<svg ${r} viewBox="0 0 180 180"><rect width="180" height="180" rx="40" fill="#111113"/><path d="M78 31c18 0 35 6 49 18l8 7c-5-2-10-3-15-3-10 0-19 3-26 9-11 10-17 24-17 40v18c0 12 5 21 13 28l-45-24c-8-4-13-12-13-21V80c0-27 20-49 46-49Z" fill="#fff"/><path d="M126 53c13 4 22 15 22 29v54c0 8-8 13-15 9l-10-5c-6 5-14 8-23 8-14 0-26-7-34-17l-6-9c15-7 26-19 33-33 4-9 6-18 6-28v-8c8-3 18-3 27 0Z" fill="#2ADB5C"/></svg>`:t==="grok"?`<svg ${r} viewBox="0 0 34 33" fill="currentColor">${T2.map(n=>`<path d="${n}"/>`).join("")}</svg>`:t==="pi"?`<svg ${r} viewBox="0 0 800 800">${M2.map(({d:n,fill:a})=>`<path d="${n}" fill="${a}"/>`).join("")}</svg>`:t==="claude"?`<svg ${r} viewBox="0 0 24 24" fill="${A2}"><path d="${B2}"/></svg>`:t==="codex"?`<svg ${r} viewBox="0 0 24 24" fill="currentColor"><path d="${I2}"/></svg>`:`<svg ${r} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/><circle cx="12" cy="12" r="3"/></svg>`}var WBe=B(_(),1),oa=B(Ee(),1);function wl({provider:e,className:t}){let r=Xo(e),n=Je("wand-provider-logo",`wand-provider-logo-${r??"generic"}`,t);return r==="qoder"?(0,oa.jsxs)("svg",{className:n,viewBox:"0 0 180 180","aria-hidden":"true",focusable:"false","data-provider-logo":"qoder",children:[(0,oa.jsx)("rect",{width:"180",height:"180",rx:"40",fill:"#111113"}),(0,oa.jsx)("path",{d:"M78 31c18 0 35 6 49 18l8 7c-5-2-10-3-15-3-10 0-19 3-26 9-11 10-17 24-17 40v18c0 12 5 21 13 28l-45-24c-8-4-13-12-13-21V80c0-27 20-49 46-49Z",fill:"#fff"}),(0,oa.jsx)("path",{d:"M126 53c13 4 22 15 22 29v54c0 8-8 13-15 9l-10-5c-6 5-14 8-23 8-14 0-26-7-34-17l-6-9c15-7 26-19 33-33 4-9 6-18 6-28v-8c8-3 18-3 27 0Z",fill:"#2ADB5C"})]}):r==="opencode"?(0,oa.jsxs)("svg",{className:n,viewBox:"0 0 512 512","aria-hidden":"true",focusable:"false","data-provider-logo":"opencode",children:[(0,oa.jsx)("path",{d:"M0 0H512V512H0Z",fill:"#131010"}),(0,oa.jsx)("path",{d:"M320 224V352H192V224H320Z",fill:"#5A5858"}),(0,oa.jsx)("path",{d:"M384 416H128V96H384V416ZM320 160H192V352H320V160Z",fill:"#fff",fillRule:"evenodd"})]}):r==="grok"?(0,oa.jsx)("svg",{className:n,viewBox:"0 0 34 33",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"grok",children:T2.map(a=>(0,oa.jsx)("path",{d:a},a))}):r==="pi"?(0,oa.jsx)("svg",{className:n,viewBox:"0 0 800 800",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"pi",children:M2.map(({d:a,fill:o})=>(0,oa.jsx)("path",{d:a,fill:o},o))}):r==="claude"?(0,oa.jsx)("svg",{className:n,viewBox:"0 0 24 24",fill:A2,"aria-hidden":"true",focusable:"false","data-provider-logo":"claude",children:(0,oa.jsx)("path",{d:B2})}):r==="codex"?(0,oa.jsx)("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"codex",children:(0,oa.jsx)("path",{d:I2})}):(0,oa.jsxs)("svg",{className:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false","data-provider-logo":"generic",children:[(0,oa.jsx)("path",{d:"M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"}),(0,oa.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}var Ppe=B(_()),tf=["xxxl","xxl","xl","lg","md","sm","xs"],Rpe=[].concat(tf).reverse(),Ope=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),zpe=e=>{let t=e,r=[].concat(tf).reverse();return r.forEach((n,a)=>{let o=n.toUpperCase(),l=`screen${o}Min`,u=`screen${o}`;if(!(t[l]<=t[u]))throw new Error(`${l}<=${u} fails : !(${t[l]}<=${t[u]})`);if(a<r.length-1){let d=`screen${o}Max`;if(!(t[u]<=t[d]))throw new Error(`${u}<=${d} fails : !(${t[u]}<=${t[d]})`);let p=`screen${r[a+1].toUpperCase()}Min`;if(!(t[d]<=t[p]))throw new Error(`${d}<=${p} fails : !(${t[d]}<=${t[p]})`)}}),e},Lpe=(e,t)=>{if(t){for(let r of tf)if(e[r]&&t?.[r]!==void 0)return t[r]}},Hpe=()=>{let[,e]=Ma(),t=Ope(zpe(e));return Ppe.default.useMemo(()=>{let r=new Map,n=-1,a={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return a=o,r.forEach(l=>{l(a)}),r.size>=1},subscribe(o){return r.size||this.register(),n+=1,r.set(n,o),o(a),n},unsubscribe(o){r.delete(o),r.size||this.unregister()},register(){Object.entries(t).forEach(([o,l])=>{let u=({matches:p})=>{this.dispatch({...a,[o]:p})},d=window.matchMedia(l);cr(d.addEventListener)&&d.addEventListener("change",u),this.matchHandlers[l]={mql:d,listener:u},u(d)})},unregister(){Object.values(t).forEach(o=>{let l=this.matchHandlers[o];cr(l?.mql.removeEventListener)&&l.mql.removeEventListener("change",l?.listener)}),r.clear()}}},[t])},qpe=Hpe,Wpe=B(_()),Vpe=B(_()),wH=()=>Vpe.default.useReducer(e=>e+1,0);function Upe(e=!0,t={}){let r=(0,Wpe.useRef)(t),[,n]=wH(),a=qpe();return or(()=>{let o=a.subscribe(l=>{r.current=l,e&&n()});return()=>a.unsubscribe(o)},[e]),r.current}var t3=Upe;var Lb=B(_()),r3=B(_()),Gpe=e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:o,fontSizeLG:l,fontSizeSM:u,borderRadiusLG:d,borderRadiusSM:p,colorBgContainerDisabled:m,lineWidth:v,lineType:g,antCls:b}=e,[x,y]=bn(b,"space-addon");return{[t]:[{...Tt(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:n,margin:0,borderWidth:v,borderStyle:g,borderRadius:r,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:l,borderRadius:d},"&-small":{paddingInline:o,borderRadius:p,fontSize:u},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[x("addon-border-color")]:a,[x("addon-background")]:m,[x("addon-border-color-outlined")]:a,[x("addon-background-filled")]:m,borderColor:y("addon-border-color"),background:y("addon-background"),"&-variant-outlined":{[x("addon-border-color")]:y("addon-border-color-outlined")},"&-variant-filled":{[x("addon-border-color")]:"transparent",[x("addon-background")]:y("addon-background-filled"),[`&${t}-disabled`]:{[x("addon-border-color")]:a,[x("addon-background")]:m}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[x("addon-border-color-outlined")]:e.colorError,[x("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[x("addon-border-color-outlined")]:e.colorWarning,[x("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},Kpe=pt("Addon",e=>[Gpe(e),Zh(e,{focus:!1})]),Xpe=r3.default.forwardRef((e,t)=>{let{className:r,children:n,style:a,prefixCls:o,variant:l="outlined",disabled:u,status:d,...p}=e,{getPrefixCls:m,direction:v}=r3.default.useContext(st),g=m("space-addon",o),[b,x]=Kpe(g),{compactItemClassnames:y,compactSize:E}=ml(g,v),S=qp(g,d),F=Z(g,b,y,x,`${g}-variant-${l}`,S,{[`${g}-${E}`]:E,[`${g}-disabled`]:u},r);return r3.default.createElement("div",{ref:t,className:F,style:a,...p},n)}),xH=Xpe,Qpe=B(_()),EH=Qpe.default.createContext({latestIndex:0}),Ype=EH.Provider,Hb=B(_()),Jpe=e=>{let{className:t,prefix:r,index:n,children:a,separator:o,style:l,classNames:u,styles:d}=e,{latestIndex:p}=Hb.useContext(EH);return Lt(a)?Hb.createElement(Hb.Fragment,null,Hb.createElement("div",{className:t,style:l},a),n<p&&o&&Hb.createElement("span",{className:Z(`${r}-item-separator`,u?.separator),style:d?.separator},o)):null},Zpe=Jpe,efe=e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},tfe=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},rfe=pt("Space",e=>{let t=yt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[efe(t),tfe(t)]},()=>({}),{resetStyle:!1}),nfe=Lb.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,size:a,className:o,style:l,classNames:u,styles:d}=xt("space"),{size:p=a??"small",align:m,className:v,rootClassName:g,children:b,direction:x,orientation:y,prefixCls:E,split:S,separator:F,style:$,vertical:C,wrap:D=!1,classNames:I,styles:M,...A}=e,[j,P]=Array.isArray(p)?p:[p,p],O=Zp(P),V=Zp(j),W=y2(P),H=y2(j),q=xr(b,{keepEmpty:!0}),[z,L]=Vo(y,C,x),U=m===void 0&&!L?"center":m,Y=F??S,X=r("space",E),[J,N]=rfe(X),R={...e,size:p,orientation:z,align:U},K=Ge(l),Q=Ge($),[ee,te]=Ct([u,I],[d,K,M,Q],{props:R}),ne=Z(X,o,J,`${X}-${z}`,{[`${X}-rtl`]:n==="rtl",[`${X}-align-${U}`]:U,[`${X}-gap-row-${P}`]:O,[`${X}-gap-col-${j}`]:V},v,g,N,ee.root),me=Z(`${X}-item`,ee.item),se=q.map((ke,Ae)=>{let de=ke?.key||`${me}-${Ae}`;return Lb.createElement(Zpe,{prefix:X,classNames:ee,styles:te,className:me,key:de,index:Ae,separator:Y,style:te.item},ke)}),he=Lb.useMemo(()=>({latestIndex:q.reduce((ke,Ae,de)=>Lt(Ae)?de:ke,0)}),[q]);if(q.length===0)return null;let le={};return D&&(le.flexWrap="wrap"),!V&&H&&(le.columnGap=j),!O&&W&&(le.rowGap=P),Lb.createElement("div",{ref:t,className:ne,style:{...le,...te.root},...A},Lb.createElement(Ype,{value:he},se))}),n3=nfe;n3.Compact=Cb;n3.Addon=xH;var a3=n3;var kH=B(_()),afe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},ife=afe;function i3(){return i3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i3.apply(this,arguments)}var ofe=(e,t)=>kH.createElement(Zt,i3({},e,{ref:t,icon:ife})),sfe=kH.forwardRef(ofe),l3=sfe,CH=B(_()),lfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},ufe=lfe;function o3(){return o3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o3.apply(this,arguments)}var cfe=(e,t)=>CH.createElement(Zt,o3({},e,{ref:t,icon:ufe})),dfe=CH.forwardRef(cfe),u3=dfe,SH=B(_()),pfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ffe=pfe;function s3(){return s3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s3.apply(this,arguments)}var mfe=(e,t)=>SH.createElement(Zt,s3({},e,{ref:t,icon:ffe})),hfe=SH.forwardRef(mfe),c3=hfe;var FH=B(_()),d3=B(_()),gfe=e=>{let{getPrefixCls:t,direction:r}=(0,d3.useContext)(st),{prefixCls:n,className:a}=e,o=t("input-group",n),l=t("input"),[u,d]=g2(l),p=Z(o,d,{[`${o}-lg`]:e.size==="large",[`${o}-sm`]:e.size==="small",[`${o}-compact`]:e.compact,[`${o}-rtl`]:r==="rtl"},u,a),m=(0,d3.useContext)(vo),v=(0,d3.useMemo)(()=>({...m,isFormItemInput:!1}),[m]);return FH.createElement(vo.Provider,{value:v},FH.createElement(a3.Compact,{className:p,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},vfe=gfe,Ei=B(_()),bfe=e=>{let{componentCls:t,paddingXS:r}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:r,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText,"&::selection":{color:"transparent"}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},yfe=pt(["Input","OTP"],e=>{let t=yt(e,Kp(e));return bfe(t)},Xp),rf=B(_()),wfe="\u2022",xfe=rf.forwardRef((e,t)=>{let{className:r,value:n,onChange:a,onActiveChange:o,index:l,mask:u,onFocus:d,type:p,...m}=e,{getPrefixCls:v}=rf.useContext(st),g=v("otp"),b=typeof u=="string"?u:wfe,x=rf.useRef(null);rf.useImperativeHandle(t,()=>x.current);let y=$=>{a(l,$.target.value)},E=()=>{vr(()=>{let $=x.current?.input;document.activeElement===$&&$&&$.select()})},S=$=>{d?.($),E()},F=$=>{let{key:C,ctrlKey:D,metaKey:I}=$;C==="ArrowLeft"?o(l-1):C==="ArrowRight"?o(l+1):C==="z"&&(D||I)?$.preventDefault():C==="Backspace"&&!n&&o(l-1),E()};return rf.createElement("span",{className:`${g}-input-wrapper`,role:"presentation"},u&&n!==""&&n!==void 0&&rf.createElement("span",{className:`${g}-mask-icon`,"aria-hidden":"true"},b),rf.createElement(e0,{"aria-label":`OTP Input ${l+1}`,...m,type:p??(u?"password":"text"),ref:x,value:n,onInput:y,onFocus:S,onKeyDown:F,onMouseDown:E,onMouseUp:E,className:Z(r,{[`${g}-mask-input`]:u})}))}),Efe=xfe;function j2(e){return(e||"").split("")}var kfe=e=>{let{index:t,prefixCls:r,separator:n,className:a,style:o}=e,l=cr(n)?n(t):n;return l?Ei.createElement("span",{className:Z(`${r}-separator`,a),style:o},l):null},Cfe=Ei.forwardRef((e,t)=>{let{prefixCls:r,length:n=6,size:a,defaultValue:o,value:l,onChange:u,formatter:d,separator:p,variant:m,disabled:v,status:g,autoFocus:b,mask:x,type:y,autoComplete:E,onInput:S,onFocus:F,inputMode:$,classNames:C,styles:D,className:I,style:M,...A}=e,{classNames:j,styles:P,getPrefixCls:O,direction:V,style:W,className:H}=xt("otp"),q=O("otp",r),[z]=Fu("otp",m,void 0,"input"),L={...e,length:n,variant:z},U=Ge(W),Y=Ge(M),[X,J]=Ct([j,C],[P,U,D,Y],{props:L}),N=ei(A,{aria:!0,data:!0,attr:!0}),[R,K]=yfe(q),Q=Ur(Fe=>a??Fe),ee=Ei.useContext(vo),te=Vh(ee.status,g),ne=Ei.useMemo(()=>({...ee,status:te,hasFeedback:!1,feedbackIcon:null}),[ee,te]),me=Ei.useRef(null),se=Ei.useRef({});Ei.useImperativeHandle(t,()=>({focus:()=>{se.current[0]?.focus()},blur:()=>{for(let Fe=0;Fe<n;Fe+=1)se.current[Fe]?.blur()},nativeElement:me.current}));let he=Fe=>d?d(Fe):Fe,[le,ke]=Ei.useState(()=>j2(he(o||"")));Ei.useEffect(()=>{l!==void 0&&ke(j2(l))},[l]);let Ae=wt(Fe=>{ke(Fe),S&&S(Fe),u&&Fe.length===n&&Fe.every($e=>$e)&&Fe.some(($e,Me)=>le[Me]!==$e)&&u(Fe.join(""))}),de=wt((Fe,$e)=>{let Me=Zr(le);for(let ze=0;ze<Fe;ze+=1)Me[ze]||(Me[ze]="");$e.length<=1?Me[Fe]=$e:Me=Me.slice(0,Fe).concat(j2($e)),Me=Me.slice(0,n);for(let ze=Me.length-1;ze>=0&&!Me[ze];ze-=1)Me.pop();let qe=he(Me.map(ze=>ze||" ").join(""));return Me=j2(qe).map((ze,Te)=>ze===" "&&!Me[Te]?Me[Te]:ze),Me}),ve=(Fe,$e)=>{let Me=de(Fe,$e),qe=Math.min(Fe+$e.length,n-1);qe!==Fe&&Me[Fe]!==void 0&&se.current[qe]?.focus(),Ae(Me)},ye=Fe=>{se.current[Fe]?.focus()},we=(Fe,$e)=>{for(let Me=0;Me<$e;Me+=1)if(!se.current[Me]?.input?.value){se.current[Me]?.focus();break}F?.(Fe)},Oe={variant:z,disabled:v,status:te,mask:x,type:y,inputMode:$,autoComplete:E};return Ei.createElement("div",{...N,ref:me,className:Z(I,q,{[`${q}-sm`]:Q==="small",[`${q}-lg`]:Q==="large",[`${q}-rtl`]:V==="rtl"},K,R,H,X.root),style:J.root,role:"group"},Ei.createElement(vo.Provider,{value:ne},Array.from({length:n}).map((Fe,$e)=>{let Me=`otp-${$e}`,qe=le[$e]||"";return Ei.createElement(Ei.Fragment,{key:Me},Ei.createElement(Efe,{ref:ze=>{se.current[$e]=ze},index:$e,size:Q,htmlSize:1,className:Z(X.input,`${q}-input`),style:J.input,onChange:ve,value:qe,onActiveChange:ye,autoFocus:$e===0&&b,onFocus:ze=>we(ze,$e),...Oe}),$e<n-1&&Ei.createElement(kfe,{separator:p,index:$e,prefixCls:q,className:Z(X.separator),style:J.separator}))})))}),Sfe=Cfe,ju=B(_()),$H=B(_()),Ffe=e=>e?ju.createElement(u3,null):ju.createElement(l3,null),$fe={click:"onClick",hover:"onMouseOver"},Dfe=ju.forwardRef((e,t)=>{let{disabled:r,action:n="click",visibilityToggle:a=!0,iconRender:o,prefixCls:l,inputPrefixCls:u,suffix:d,className:p,style:m,classNames:v,styles:g,variant:b,...x}=e,{getPrefixCls:y,className:E,style:S,classNames:F,styles:$,iconRender:C}=xt("inputPassword"),[D]=Fu("inputPassword",b,e.bordered,"input"),[I]=Op("global"),M=ju.useContext(ja),A=r??M,j={...e,disabled:A,variant:D},P=Ge(S),O=Ge(m),[V,W]=Ct([F,v],[$,P,g,O],{props:j}),H=kt(a)&&a.visible!==void 0,[q,z]=(0,$H.useState)(()=>H?a.visible:!1),L=(0,$H.useRef)(null);ju.useEffect(()=>{H&&z(a.visible)},[H,a]);let U=m2(L),Y=()=>{if(A)return;q&&U();let ee=!q;H||z(ee),kt(a)&&a.onVisibleChange?.(ee)},X=ee=>{let te=$fe[n]||"",ne=(o||C||Ffe)(q),me=kt(a)?a.tabIndex:void 0;return ju.createElement("span",{key:"passwordIcon",role:"button",tabIndex:A?-1:me??0,className:`${ee}-icon`,"aria-disabled":A,"aria-pressed":q,"aria-label":q?I.hide:I.show,onMouseDown:se=>{se.preventDefault()},onMouseUp:se=>{se.preventDefault()},onKeyDown:se=>{(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),se.repeat||Y())},[te]:Y},ne)},J=y("input",u),N=y("input-password",l),R=a&&X(N),K=Z(N,E,p,{[`${N}-${e.size}`]:!!e.size}),Q={...x,type:q?"text":"password",prefixCls:J,suffix:ju.createElement(ju.Fragment,null,R,d),disabled:A,className:K,classNames:V,styles:W,variant:D};return ju.createElement(e0,{ref:fn(t,L),...Q})}),Afe=Dfe,ad=B(_()),Bfe=e=>{let{componentCls:t,antCls:r,calc:n,max:a}=e,o=`${t}-btn`,[l,u]=bn(r,"input-search"),d=e.inputFontSizeSM??e.fontSize,p=a(e.controlHeightSM,n(d).mul(e.lineHeight).add(n(e.paddingBlockSM).mul(2)).add(n(e.lineWidth).mul(2)).equal());return{[t]:{[l("btn-height")]:ue(e.controlHeight),width:"100%",[o]:{height:u("btn-height"),"&:focus-visible":{zIndex:5},[`&${r}-btn-icon-only`]:{width:u("btn-height")},"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}},[`&${t}-large`]:{[l("btn-height")]:ue(e.controlHeightLG)},[`&${t}-small`]:{[l("btn-height")]:ue(e.controlHeightSM)},[`&${t}-small ${o}`]:{minHeight:p,[`&${e.antCls}-btn-icon-only`]:{minWidth:p}}}}},Ife=pt(["Input","Search"],e=>{let t=yt(e,Kp(e));return Bfe(t)},Xp),Mfe=ad.forwardRef((e,t)=>{let{prefixCls:r,inputPrefixCls:n,className:a,size:o,style:l,enterButton:u=!1,searchIcon:d,addonAfter:p,loading:m,disabled:v,onSearch:g,onChange:b,onCompositionStart:x,onCompositionEnd:y,variant:E,onPressEnter:S,classNames:F,styles:$,hidden:C,...D}=e,{direction:I,getPrefixCls:M,className:A,style:j,classNames:P,styles:O,searchIcon:V}=xt("inputSearch"),W=ad.useContext(ja),H=v??W,[q,,z]=Fu("inputSearch",E,e.bordered),L=z?q:void 0,[U]=Fu("inputSearch",E,e.bordered,"input"),Y={...e,enterButton:u,variant:L},X=Ge(j),J=Ge(l),[N,R]=Ct([P,F],[O,X,$,J],{props:Y},{button:{_default:"root"}}),K=ad.useRef(!1),Q=M("input-search",r),ee=M("input",n),[te,ne]=Ife(Q),{compactSize:me}=ml(Q,I),se=Ur(Qe=>o??me??Qe),he=ad.useRef(null),le=Qe=>{Qe?.target&&Qe.type==="click"&&g&&g(Qe.target.value,Qe,{source:"clear"}),b?.(Qe)},ke=Qe=>{document.activeElement===he.current?.input&&Qe.preventDefault()},Ae=Qe=>{g&&g(he.current?.input?.value,Qe,{source:"input"})},de=Qe=>{K.current||m||(S?.(Qe),Ae(Qe))},ve=typeof u=="boolean"?xb(d,V,ad.createElement(c3,null)):null,ye=`${Q}-btn`,we=Z(ye,{[`${ye}-${L}`]:L}),Oe,Fe=u||{},$e=Fe.type&&Fe.type.__ANT_BUTTON===!0;if($e||Fe.type==="button"){let Qe=Fe.props;Oe=Sr(Fe,{disabled:H||Qe.disabled||!$e&&m,onMouseDown:ot=>{Qe.onMouseDown?.(ot),ke(ot)},onClick:ot=>{Fe?.props?.onClick?.(ot),Ae(ot)},key:"enterButton",...$e?{className:Z(we,Qe.className),loading:m||Qe.loading,size:se}:{}})}else Oe=ad.createElement(Db,{classNames:N.button,styles:R.button,className:we,color:u?"primary":"default",size:se,disabled:v,key:"enterButton",onMouseDown:ke,onClick:Ae,loading:m,icon:ve,variant:L==="borderless"||L==="filled"||L==="underlined"?"text":u?"solid":void 0},u);p&&(Oe=[Oe,Sr(p,{key:"addonAfter"})]);let Me=Z(Q,ne,{[`${Q}-rtl`]:I==="rtl",[`${Q}-${se}`]:!!se,[`${Q}-with-button`]:!!u},a,A,te,N.root),qe=Qe=>{K.current=!0,x?.(Qe)},ze=Qe=>{K.current=!1,y?.(Qe)},Te=ei(D,{data:!0}),Ne=Ut({...D,classNames:Ut(N,["button","root"]),styles:Ut(R,["button","root"]),prefixCls:ee,type:"search",size:se,variant:U,onPressEnter:de,onCompositionStart:qe,onCompositionEnd:ze,onChange:le,disabled:v},Object.keys(Te));return ad.createElement(Cb,{className:Me,style:R.root,...Te,hidden:C},ad.createElement(e0,{ref:fn(he,t),...Ne}),Oe)}),Tfe=Mfe,c0=e0;c0.Group=vfe;c0.Search=Tfe;c0.TextArea=Ib;c0.Password=Afe;c0.OTP=Sfe;var p3=c0;var b3=ir((e,t)=>{(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=n()})(e,(function(){"use strict";var r=1e3,n=6e4,a=36e5,o="millisecond",l="second",u="minute",d="hour",p="day",m="week",v="month",g="quarter",b="year",x="date",y="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var q=["th","st","nd","rd"],z=H%100;return"["+H+(q[(z-20)%10]||q[z]||q[0])+"]"}},$=function(H,q,z){var L=String(H);return!L||L.length>=q?H:""+Array(q+1-L.length).join(z)+H},C={s:$,z:function(H){var q=-H.utcOffset(),z=Math.abs(q),L=Math.floor(z/60),U=z%60;return(q<=0?"+":"-")+$(L,2,"0")+":"+$(U,2,"0")},m:function H(q,z){if(q.date()<z.date())return-H(z,q);var L=12*(z.year()-q.year())+(z.month()-q.month()),U=q.clone().add(L,v),Y=z-U<0,X=q.clone().add(L+(Y?-1:1),v);return+(-(L+(z-U)/(Y?U-X:X-U))||0)},a:function(H){return H<0?Math.ceil(H)||0:Math.floor(H)},p:function(H){return{M:v,y:b,w:m,d:p,D:x,h:d,m:u,s:l,ms:o,Q:g}[H]||String(H||"").toLowerCase().replace(/s$/,"")},u:function(H){return H===void 0}},D="en",I={};I[D]=F;var M="$isDayjsObject",A=function(H){return H instanceof V||!(!H||!H[M])},j=function H(q,z,L){var U;if(!q)return D;if(typeof q=="string"){var Y=q.toLowerCase();I[Y]&&(U=Y),z&&(I[Y]=z,U=Y);var X=q.split("-");if(!U&&X.length>1)return H(X[0])}else{var J=q.name;I[J]=q,U=J}return!L&&U&&(D=U),U||!L&&D},P=function(H,q){if(A(H))return H.clone();var z=typeof q=="object"?q:{};return z.date=H,z.args=arguments,new V(z)},O=C;O.l=j,O.i=A,O.w=function(H,q){return P(H,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var V=(function(){function H(z){this.$L=j(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[M]=!0}var q=H.prototype;return q.parse=function(z){this.$d=(function(L){var U=L.date,Y=L.utc;if(U===null)return new Date(NaN);if(O.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var X=U.match(E);if(X){var J=X[2]-1||0,N=(X[7]||"0").substring(0,3);return Y?new Date(Date.UTC(X[1],J,X[3]||1,X[4]||0,X[5]||0,X[6]||0,N)):new Date(X[1],J,X[3]||1,X[4]||0,X[5]||0,X[6]||0,N)}}return new Date(U)})(z),this.init()},q.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},q.$utils=function(){return O},q.isValid=function(){return this.$d.toString()!==y},q.isSame=function(z,L){var U=P(z);return this.startOf(L)<=U&&U<=this.endOf(L)},q.isAfter=function(z,L){return P(z)<this.startOf(L)},q.isBefore=function(z,L){return this.endOf(L)<P(z)},q.$g=function(z,L,U){return O.u(z)?this[L]:this.set(U,z)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(z,L){var U=this,Y=!!O.u(L)||L,X=O.p(z),J=function(me,se){var he=O.w(U.$u?Date.UTC(U.$y,se,me):new Date(U.$y,se,me),U);return Y?he:he.endOf(p)},N=function(me,se){return O.w(U.toDate()[me].apply(U.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(se)),U)},R=this.$W,K=this.$M,Q=this.$D,ee="set"+(this.$u?"UTC":"");switch(X){case b:return Y?J(1,0):J(31,11);case v:return Y?J(1,K):J(0,K+1);case m:var te=this.$locale().weekStart||0,ne=(R<te?R+7:R)-te;return J(Y?Q-ne:Q+(6-ne),K);case p:case x:return N(ee+"Hours",0);case d:return N(ee+"Minutes",1);case u:return N(ee+"Seconds",2);case l:return N(ee+"Milliseconds",3);default:return this.clone()}},q.endOf=function(z){return this.startOf(z,!1)},q.$set=function(z,L){var U,Y=O.p(z),X="set"+(this.$u?"UTC":""),J=(U={},U[p]=X+"Date",U[x]=X+"Date",U[v]=X+"Month",U[b]=X+"FullYear",U[d]=X+"Hours",U[u]=X+"Minutes",U[l]=X+"Seconds",U[o]=X+"Milliseconds",U)[Y],N=Y===p?this.$D+(L-this.$W):L;if(Y===v||Y===b){var R=this.clone().set(x,1);R.$d[J](N),R.init(),this.$d=R.set(x,Math.min(this.$D,R.daysInMonth())).$d}else J&&this.$d[J](N);return this.init(),this},q.set=function(z,L){return this.clone().$set(z,L)},q.get=function(z){return this[O.p(z)]()},q.add=function(z,L){var U,Y=this;z=Number(z);var X=O.p(L),J=function(K){var Q=P(Y);return O.w(Q.date(Q.date()+Math.round(K*z)),Y)};if(X===v)return this.set(v,this.$M+z);if(X===b)return this.set(b,this.$y+z);if(X===p)return J(1);if(X===m)return J(7);var N=(U={},U[u]=n,U[d]=a,U[l]=r,U)[X]||1,R=this.$d.getTime()+z*N;return O.w(R,this)},q.subtract=function(z,L){return this.add(-1*z,L)},q.format=function(z){var L=this,U=this.$locale();if(!this.isValid())return U.invalidDate||y;var Y=z||"YYYY-MM-DDTHH:mm:ssZ",X=O.z(this),J=this.$H,N=this.$m,R=this.$M,K=U.weekdays,Q=U.months,ee=U.meridiem,te=function(se,he,le,ke){return se&&(se[he]||se(L,Y))||le[he].slice(0,ke)},ne=function(se){return O.s(J%12||12,se,"0")},me=ee||function(se,he,le){var ke=se<12?"AM":"PM";return le?ke.toLowerCase():ke};return Y.replace(S,(function(se,he){return he||(function(le){switch(le){case"YY":return String(L.$y).slice(-2);case"YYYY":return O.s(L.$y,4,"0");case"M":return R+1;case"MM":return O.s(R+1,2,"0");case"MMM":return te(U.monthsShort,R,Q,3);case"MMMM":return te(Q,R);case"D":return L.$D;case"DD":return O.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return te(U.weekdaysMin,L.$W,K,2);case"ddd":return te(U.weekdaysShort,L.$W,K,3);case"dddd":return K[L.$W];case"H":return String(J);case"HH":return O.s(J,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return me(J,N,!0);case"A":return me(J,N,!1);case"m":return String(N);case"mm":return O.s(N,2,"0");case"s":return String(L.$s);case"ss":return O.s(L.$s,2,"0");case"SSS":return O.s(L.$ms,3,"0");case"Z":return X}return null})(se)||X.replace(":","")}))},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(z,L,U){var Y,X=this,J=O.p(L),N=P(z),R=(N.utcOffset()-this.utcOffset())*n,K=this-N,Q=function(){return O.m(X,N)};switch(J){case b:Y=Q()/12;break;case v:Y=Q();break;case g:Y=Q()/3;break;case m:Y=(K-R)/6048e5;break;case p:Y=(K-R)/864e5;break;case d:Y=K/a;break;case u:Y=K/n;break;case l:Y=K/r;break;default:Y=K}return U?Y:O.a(Y)},q.daysInMonth=function(){return this.endOf(v).$D},q.$locale=function(){return I[this.$L]},q.locale=function(z,L){if(!z)return this.$L;var U=this.clone(),Y=j(z,L,!0);return Y&&(U.$L=Y),U},q.clone=function(){return O.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},H})(),W=V.prototype;return P.prototype=W,[["$ms",o],["$s",l],["$m",u],["$H",d],["$W",p],["$M",v],["$y",b],["$D",x]].forEach((function(H){W[H[1]]=function(q){return this.$g(q,H[0],H[1])}})),P.extend=function(H,q){return H.$i||(H(q,V,P),H.$i=!0),P},P.locale=j,P.isDayjs=A,P.unix=function(H){return P(1e3*H)},P.en=I[D],P.Ls=I,P.p={},P}))}),jfe=ir(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.call=u,e.default=void 0,e.note=o,e.noteOnce=p,e.preMessage=void 0,e.resetWarned=l,e.warning=a,e.warningOnce=d;var t={},r=[],n=v=>{r.push(v)};e.preMessage=n;function a(v,g){}function o(v,g){}function l(){t={}}function u(v,g,b){!g&&!t[b]&&(v(!1,b),t[b]=!0)}function d(v,g){u(a,v,g)}function p(v,g){u(o,v,g)}d.preMessage=n,d.resetWarned=l,d.noteOnce=p;var m=e.default=d}),p0=ir((e,t)=>{function r(n){return n&&n.__esModule?n:{default:n}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),_fe=ir(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},r=e.default=t}),IH=ir(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commonLocale=void 0;var t=e.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}}),Nfe=ir(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=IH(),r={...t.commonLocale,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},n=e.default=r}),MH=ir(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},r=e.default=t}),TH=ir(e=>{"use strict";var t=p0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(Nfe()),n=t(MH()),a={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...r.default},timePickerLocale:{...n.default}},o=e.default=a}),Pfe=ir(e=>{"use strict";var t=p0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(TH()),n=e.default=r.default}),Rfe=ir(e=>{"use strict";var t=p0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(_fe()),n=t(Pfe()),a=t(TH()),o=t(MH()),l="${label} is not a valid ${type}",u={locale:"en",Pagination:r.default,DatePicker:a.default,TimePicker:o.default,Calendar:n.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},d=e.default=u}),Ofe=ir((e,t)=>{t.exports=Rfe()}),zfe=ir(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},r=e.default=t}),Lfe=ir(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=IH(),r={...t.commonLocale,locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",week:"\u5468",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",previousYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA",yearFormat:"YYYY\u5E74",cellDateFormat:"D",monthBeforeYear:!1},n=e.default=r}),jH=ir(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]},r=e.default=t}),_H=ir(e=>{"use strict";var t=p0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(Lfe()),n=t(jH()),a={lang:{placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeQuarterPlaceholder:["\u5F00\u59CB\u5B63\u5EA6","\u7ED3\u675F\u5B63\u5EA6"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"],...r.default},timePickerLocale:{...n.default}};a.lang.ok="\u786E\u5B9A";var o=e.default=a}),Hfe=ir(e=>{"use strict";var t=p0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(_H()),n=e.default=r.default}),qfe=ir(e=>{"use strict";var t=p0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(zfe()),n=t(Hfe()),a=t(_H()),o=t(jH()),l="${label}\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684${type}",u={locale:"zh-cn",Pagination:r.default,DatePicker:a.default,TimePicker:o.default,Calendar:n.default,global:{placeholder:"\u8BF7\u9009\u62E9",close:"\u5173\u95ED",sortable:"\u53EF\u6392\u5E8F",show:"\u663E\u793A",hide:"\u9690\u85CF"},Table:{filterTitle:"\u7B5B\u9009",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E",filterEmptyText:"\u65E0\u7B5B\u9009\u9879",filterCheckAll:"\u5168\u9009",filterSearchPlaceholder:"\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",emptyText:"\u6682\u65E0\u6570\u636E",selectAll:"\u5168\u9009\u5F53\u9875",selectInvert:"\u53CD\u9009\u5F53\u9875",selectNone:"\u6E05\u7A7A\u6240\u6709",selectionAll:"\u5168\u9009\u6240\u6709",sortTitle:"\u6392\u5E8F",expand:"\u5C55\u5F00\u884C",collapse:"\u5173\u95ED\u884C",triggerDesc:"\u70B9\u51FB\u964D\u5E8F",triggerAsc:"\u70B9\u51FB\u5347\u5E8F",cancelSort:"\u53D6\u6D88\u6392\u5E8F"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},Tour:{Next:"\u4E0B\u4E00\u6B65",Previous:"\u4E0A\u4E00\u6B65",Finish:"\u7ED3\u675F\u5BFC\u89C8"},Popconfirm:{cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A"},Transfer:{titles:["",""],searchPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",itemUnit:"\u9879",itemsUnit:"\u9879",remove:"\u5220\u9664",selectCurrent:"\u5168\u9009\u5F53\u9875",removeCurrent:"\u5220\u9664\u5F53\u9875",selectAll:"\u5168\u9009\u6240\u6709",deselectAll:"\u53D6\u6D88\u5168\u9009",removeAll:"\u5220\u9664\u5168\u90E8",selectInvert:"\u53CD\u9009\u5F53\u9875"},Upload:{uploading:"\u6587\u4EF6\u4E0A\u4F20\u4E2D",removeFile:"\u5220\u9664\u6587\u4EF6",uploadError:"\u4E0A\u4F20\u9519\u8BEF",previewFile:"\u9884\u89C8\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D\u6587\u4EF6"},Empty:{description:"\u6682\u65E0\u6570\u636E"},Icon:{icon:"\u56FE\u6807"},Text:{edit:"\u7F16\u8F91",copy:"\u590D\u5236",copied:"\u590D\u5236\u6210\u529F",expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"},Carousel:{prevSlide:"\u4E0A\u4E00\u5F20\u5E7B\u706F\u7247",nextSlide:"\u4E0B\u4E00\u5F20\u5E7B\u706F\u7247"},Form:{optional:"\uFF08\u53EF\u9009\uFF09",defaultValidateMessages:{default:"\u5B57\u6BB5\u9A8C\u8BC1\u9519\u8BEF${label}",required:"\u8BF7\u8F93\u5165${label}",enum:"${label}\u5FC5\u987B\u662F\u5176\u4E2D\u4E00\u4E2A[${enum}]",whitespace:"${label}\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26",date:{format:"${label}\u65E5\u671F\u683C\u5F0F\u65E0\u6548",parse:"${label}\u4E0D\u80FD\u8F6C\u6362\u4E3A\u65E5\u671F",invalid:"${label}\u662F\u4E00\u4E2A\u65E0\u6548\u65E5\u671F"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label}\u987B\u4E3A${len}\u4E2A\u5B57\u7B26",min:"${label}\u6700\u5C11${min}\u4E2A\u5B57\u7B26",max:"${label}\u6700\u591A${max}\u4E2A\u5B57\u7B26",range:"${label}\u987B\u5728${min}-${max}\u5B57\u7B26\u4E4B\u95F4"},number:{len:"${label}\u5FC5\u987B\u7B49\u4E8E${len}",min:"${label}\u6700\u5C0F\u503C\u4E3A${min}",max:"${label}\u6700\u5927\u503C\u4E3A${max}",range:"${label}\u987B\u5728${min}-${max}\u4E4B\u95F4"},array:{len:"\u987B\u4E3A${len}\u4E2A${label}",min:"\u6700\u5C11${min}\u4E2A${label}",max:"\u6700\u591A${max}\u4E2A${label}",range:"${label}\u6570\u91CF\u987B\u5728${min}-${max}\u4E4B\u95F4"},pattern:{mismatch:"${label}\u4E0E\u6A21\u5F0F\u4E0D\u5339\u914D${pattern}"}}},QRCode:{expired:"\u4E8C\u7EF4\u7801\u8FC7\u671F",refresh:"\u70B9\u51FB\u5237\u65B0",scanned:"\u5DF2\u626B\u63CF"},ColorPicker:{presetEmpty:"\u6682\u65E0",transparent:"\u65E0\u8272",singleColor:"\u5355\u8272",gradientColor:"\u6E10\u53D8\u8272"}},d=e.default=u}),Wfe=ir((e,t)=>{t.exports=qfe()}),Vfe=ir((e,t)=>{(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n(b3()):typeof define=="function"&&define.amd?define(["dayjs"],n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_locale_zh_cn=n(r.dayjs)})(e,(function(r){"use strict";function n(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var a=n(r),o={name:"zh-cn",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(l,u){return u==="W"?l+"\u5468":l+"\u65E5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524D",s:"\u51E0\u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:function(l,u){var d=100*l+u;return d<600?"\u51CC\u6668":d<900?"\u65E9\u4E0A":d<1100?"\u4E0A\u5348":d<1300?"\u4E2D\u5348":d<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};return a.default.locale(o,null,!0),o}))}),NH={};ws(NH,{MOTION_DWELL_FAILED_MS:()=>m0,MOTION_DWELL_RESULT_SENTENCE_MS:()=>PH,MOTION_DWELL_SENT_MS:()=>f0,MOTION_PROCESSING_STAGGER_MS:()=>RH,readMotionTokenMs:()=>Wb,useReducedMotion:()=>ga});var DH=B(_(),1),f0=720,m0=1500,PH=1200,RH=150;function Wb(e){if(typeof document>"u")return 0;let t=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(t);return Number.isFinite(r)?r*(t.endsWith("ms")?1:1e3):0}function ga(){let e=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,[t,r]=DH.useState(e);return DH.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let n=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>r(n.matches);return n.addEventListener("change",a),a(),()=>n.removeEventListener("change",a)},[]),t}var OH={};ws(OH,{PopupOwnerProvider:()=>P2,PortalContainerProvider:()=>id,REACT_UI_PORTALS_ID:()=>of,documentPortalContainer:()=>Vb,useParentPopupOwner:()=>h0,usePortalContainer:()=>va});var N2=B(_(),1),zH=B(Ee(),1),of="wand-react-ui-portals",LH=(0,N2.createContext)(null),HH=(0,N2.createContext)(null);function P2({owner:e,children:t}){return(0,zH.jsx)(HH.Provider,{value:e,children:t})}function h0(){return(0,N2.useContext)(HH)}function id({container:e,children:t}){return(0,zH.jsx)(LH.Provider,{value:e,children:t})}function Vb(){if(!(typeof document>"u"))return document.getElementById(of)??void 0}function va(){return(0,N2.useContext)(LH)??Vb()}var qH={};ws(qH,{WandUiBoundary:()=>Bt,WandUiMeasurementProvider:()=>Gb,WandUiProvider:()=>sa,getWandTerminalTheme:()=>sd,getWandTheme:()=>Ub,installWandThemeTokens:()=>v3,wandTheme:()=>od});var d0=B(_(),1),nf=B(_()),AH=B(_()),F9e=B(jfe()),$9e=B(_());function Ufe(){}var Gfe=Ufe,Kfe=Gfe,Xfe=B(_()),Qfe=(0,Xfe.createContext)(void 0),WH=Qfe,Yfe=B(Ofe()),f3=B(_()),Jfe={locale:"en",Conversations:{create:"New chat"},Sender:{stopLoading:"Stop loading",speechRecording:"Speech recording"},Actions:{feedbackLike:"Like",feedbackDislike:"Dislike",audio:"Play audio",audioRunning:"Audio playing",audioError:"Playback error",audioLoading:"Loading audio"},Bubble:{editableOk:"OK",editableCancel:"Cancel"},Mermaid:{zoomIn:"Zoom in",zoomOut:"Zoom out",zoomReset:"Reset",download:"Download",code:"Code",image:"Image"},Folder:{selectFile:"Please select a file",loadError:"Failed to load file",noService:"File content service not configured",loadFailed:"Failed to load file"}},m3=Jfe,Zfe=(e,t)=>{let r=f3.useContext(WH),n=f3.useMemo(()=>{let o=t||m3?.[e]||Yfe.default?.[e],l=r?.[e]??{};return{...typeof o=="function"?o():o,...l||{}}},[e,t,r]),a=f3.useMemo(()=>{let o=r?.locale;return r?.exist&&!o?m3.locale:o},[r]);return[n,a]},eme=Zfe,tme="internalMark",rme=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e,a=AH.useMemo(()=>({...t,exist:!0}),[t]);return AH.createElement(WH.Provider,{value:a},r)},nme=rme,ame=B(_()),ime=ame.default.createContext({}),VH=ime,ome=B(_()),sme="ant";function lme(){let{getPrefixCls:e,direction:t,csp:r,iconPrefixCls:n,theme:a}=ome.default.useContext(ed.ConfigContext);return{theme:a,getPrefixCls:e,direction:t,csp:r,iconPrefixCls:n}}var ume=lme,cme=e=>{let{actions:t,attachments:r,bubble:n,conversations:a,prompts:o,sender:l,suggestion:u,thoughtChain:d,welcome:p,fileCard:m,think:v,theme:g,locale:b,children:x,mermaid:y,codeHighlighter:E,iconPrefixCls:S,...F}=e,$=nf.default.useMemo(()=>({actions:t,attachments:r,bubble:n,conversations:a,prompts:o,sender:l,suggestion:u,thoughtChain:d,fileCard:m,think:v,mermaid:y,codeHighlighter:E,welcome:p}),[t,r,n,a,o,l,u,d,p,y,v,m,E]),C=x;b&&(C=nf.default.createElement(nme,{locale:b,_ANT_MARK__:tme},C));let{layer:D}=nf.default.useContext(Jc),I=nf.default.useMemo(()=>({prefixCls:S,csp:F.csp,layer:D?"antdx":void 0}),[S,F.csp,D]);return(S||F.csp)&&(C=nf.default.createElement($h.Provider,{value:I},C)),nf.default.createElement(VH.Provider,{value:$},nf.default.createElement(ed,jn({},F,{theme:g,locale:b}),C))},dme=cme;function pme(){let e=dme,t=typeof e=="function"?e:e?.default;if(typeof t!="function")throw new Error("@ant-design/x/es/x-provider \u672A\u5BFC\u51FA XProvider \u7EC4\u4EF6");return t}var UH=pme(),GH=B(Wfe(),1),fme={locale:"zh-cn",Conversations:{create:"\u65B0\u5BF9\u8BDD"},Sender:{stopLoading:"\u505C\u6B62\u8BF7\u6C42",speechRecording:"\u6B63\u5728\u5F55\u97F3"},Actions:{feedbackLike:"\u559C\u6B22",feedbackDislike:"\u4E0D\u559C\u6B22",audio:"\u64AD\u653E\u8BED\u97F3",audioRunning:"\u8BED\u97F3\u64AD\u653E\u4E2D",audioError:"\u64AD\u653E\u51FA\u9519\u4E86",audioLoading:"\u6B63\u5728\u52A0\u8F7D\u8BED\u97F3"},Bubble:{editableOk:"\u786E\u8BA4",editableCancel:"\u53D6\u6D88"},Mermaid:{zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",zoomReset:"\u91CD\u7F6E",download:"\u4E0B\u8F7D",code:"\u4EE3\u7801",image:"\u56FE\u7247"},Folder:{selectFile:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6587\u4EF6",loadError:"\u6587\u4EF6\u52A0\u8F7D\u5931\u8D25",noService:"\u672A\u914D\u7F6E\u6587\u4EF6\u5185\u5BB9\u670D\u52A1",loadFailed:"\u52A0\u8F7D\u6587\u4EF6\u5931\u8D25"}},KH=fme,mme=B(b3(),1),D9e=B(Vfe(),1),hme=e=>{let t=e?.algorithm?Ch(e.algorithm):cb,r={...Kc,...e?.token};return Rx(r,{override:e?.token},t,Vx)},gme=hme;function vme(e){let{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}var bme=(e,t)=>{let r=t??jh(e),n=r.fontSizeSM,a=r.controlHeight-4;return{...r,...vme(t??e),...Wx(n),controlHeight:a,...qx({...r,controlHeight:a})}},yme=bme,Qo=(e,t)=>new Ar(e).setA(t).toRgbString(),af=(e,t)=>new Ar(e).lighten(t).toHexString(),BH=e=>{let t=Mh(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},wme=(e,t,r)=>{let n=e||"#000",a=t||"#fff";return{colorBgBase:n,colorTextBase:a,colorShadow:r||"rgba(255, 255, 255, 0.2)",colorText:Qo(a,.85),colorTextSecondary:Qo(a,.65),colorTextTertiary:Qo(a,.45),colorTextQuaternary:Qo(a,.25),colorFill:Qo(a,.18),colorFillSecondary:Qo(a,.12),colorFillTertiary:Qo(a,.08),colorFillQuaternary:Qo(a,.04),colorBgSolid:Qo(a,.95),colorBgSolidHover:Qo(a,1),colorBgSolidActive:Qo(a,.9),colorBgElevated:af(n,12),colorBgContainer:af(n,8),colorBgLayout:af(n,0),colorBgSpotlight:af(n,26),colorBgBlur:Qo(a,.04),colorBorder:af(n,26),colorBorderDisabled:af(n,26),colorBorderSecondary:af(n,19)}},xme=(e,t)=>{let r=Object.keys(ub).map(l=>{let u=Mh(e[l],{theme:"dark"});return Array.from({length:10},()=>1).reduce((d,p,m)=>(d[`${l}-${m+1}`]=u[m],d[`${l}${m+1}`]=u[m],d),{})}).reduce((l,u)=>(l={...l,...u},l),{}),n=t??jh(e),a=Hx(e,{generateColorPalettes:BH,generateNeutralColorPalettes:wme}),o=bi.reduce((l,u)=>{let d=e[u];if(d){let p=BH(d);l[`${u}Hover`]=p[7],l[`${u}Active`]=p[5]}return l},{});return{...n,...r,...a,...o,colorPrimaryBg:a.colorPrimaryBorder,colorPrimaryBgHover:a.colorPrimaryBorderHover}},Eme=xme;function kme(){let[e,t,r,n]=Ma();return{theme:e,token:t,hashId:r,cssVar:n}}var Cme={defaultSeed:Pp.token,useToken:kme,defaultAlgorithm:jh,darkAlgorithm:Eme,compactAlgorithm:yme,getDesignToken:gme,defaultConfig:Pp,_internalContext:db},y3=Cme,w3="wand-theme",_2=[{id:"warm",name:"\u6696\u767D\u94DC\u8272",dark:!1,primary:"#b8562f",primaryHover:"#9e4b29",primaryActive:"#873e23",link:"#9e4b29",focus:"#b8562f",text:"#29241f",secondary:"#6b5e54",background:"#faf8f5",surface:"#fffdfa",sidebar:"#f4f0e9",selected:"#ebe0d3",hover:"#ece6dd",border:"#ebe5dd",terminal:"#17120f",terminalText:"#f4eee6",terminalCursor:"#d88d60"},{id:"blue",name:"\u77F3\u58A8\u84DD",dark:!1,primary:"#395f87",primaryHover:"#2e4f73",primaryActive:"#24415f",link:"#395f87",focus:"#395f87",text:"#252d36",secondary:"#546477",background:"#f6f8fa",surface:"#fcfdff",sidebar:"#edf1f6",selected:"#dee7f1",hover:"#e6ecf3",border:"#dfe6ee",terminal:"#141b24",terminalText:"#e5edf7",terminalCursor:"#93b9e6"},{id:"forest",name:"\u68EE\u6797\u7EFF",dark:!1,primary:"#3c6750",primaryHover:"#2f5441",primaryActive:"#254534",link:"#3c6750",focus:"#3c6750",text:"#253029",secondary:"#526759",background:"#f7f9f6",surface:"#fcfdfa",sidebar:"#edf2eb",selected:"#dfe9dd",hover:"#e7eee4",border:"#dfe7dc",terminal:"#142019",terminalText:"#e7f0e5",terminalCursor:"#a0cba4"},{id:"mauve",name:"\u96FE\u7D2B",dark:!1,primary:"#735583",primaryHover:"#604570",primaryActive:"#50395e",link:"#735583",focus:"#735583",text:"#302934",secondary:"#675b6d",background:"#f9f7fa",surface:"#fefcfe",sidebar:"#f1edf4",selected:"#e8dfed",hover:"#eee7f1",border:"#e7dfea",terminal:"#201923",terminalText:"#f0e7f5",terminalCursor:"#c7a9dc"},{id:"graphite",name:"\u6DF1\u8272\u77F3\u58A8",dark:!0,primary:"#47678e",primaryHover:"#4f7399",primaryActive:"#3c587a",link:"#b0c9e9",focus:"#a5c5ef",text:"#e5e9ef",secondary:"#b0b9c7",background:"#191d23",surface:"#232830",sidebar:"#1e232a",selected:"#303f51",hover:"#2c333e",border:"#3b4452",terminal:"#11151a",terminalText:"#e5e9ef",terminalCursor:"#a5c5ef"}];function XH(e){return _2.find(t=>t.id===e)?.id??"warm"}function x3(e){return _2.find(t=>t.id===e)??_2[0]}function Sme(e,t){return{...e.dark?{algorithm:t}:{},token:{colorPrimary:e.primary,colorPrimaryHover:e.primaryHover,colorPrimaryActive:e.primaryActive,colorPrimaryText:e.link,colorPrimaryTextHover:e.dark?"#c5d8f1":e.primaryHover,colorPrimaryTextActive:e.dark?"#dbe6f5":e.primaryActive,colorPrimaryBg:e.selected,colorPrimaryBgHover:e.hover,colorPrimaryBorder:e.focus,colorLink:e.link,colorLinkHover:e.dark?"#c5d8f1":e.primaryHover,colorLinkActive:e.dark?"#dbe6f5":e.primaryActive,lineWidthFocus:2,controlOutline:e.focus,controlOutlineWidth:2,colorInfo:e.primary,colorInfoText:e.link,colorInfoBg:e.selected,colorSuccess:"#4f7a58",colorSuccessText:e.dark?"#9acda5":"#456d4e",colorSuccessTextHover:e.dark?"#b3dfbc":"#3b5f43",colorSuccessTextActive:e.dark?"#c7e8cd":"#2f5036",colorSuccessBg:e.dark?"#24392d":"#eff6ed",colorWarning:"#8b640d",colorWarningText:e.dark?"#ddbc72":"#8b640d",colorWarningBg:e.dark?"#3b3221":"#fff6dd",colorError:"#b7342e",colorErrorHover:"#9f2a25",colorErrorActive:"#87201d",colorErrorBg:e.dark?"#3c2728":"#fff1ee",colorErrorBgHover:e.dark?"#4b2c2e":"#ffe9e4",colorErrorBgFilledHover:e.dark?"#4b2c2e":"#ffe7e2",colorErrorBgActive:e.dark?"#522e30":"#ffddd6",colorErrorBorder:e.dark?"#ae645f":"#d87c70",colorErrorBorderHover:e.dark?"#f3978e":"#b7342e",colorErrorText:e.dark?"#f3978e":"#b7342e",colorErrorTextHover:e.dark?"#ffb7af":"#9f2a25",colorErrorTextActive:e.dark?"#ffd1cb":"#87201d",colorText:e.text,colorTextSecondary:e.secondary,colorTextDescription:e.secondary,colorTextPlaceholder:e.secondary,colorBgLayout:e.background,colorBgContainer:e.surface,colorBgElevated:e.surface,colorBorderSecondary:e.border,borderRadius:8,fontFamily:'-apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif',fontSize:14,fontSizeSM:12,zIndexPopupBase:20010},components:{Layout:{siderBg:e.sidebar,headerBg:e.surface,bodyBg:e.background},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemSelectedBg:e.selected,itemSelectedColor:e.link,itemHoverBg:e.hover},Tree:{nodeHoverBg:e.hover,directoryNodeSelectedBg:e.selected,directoryNodeSelectedColor:e.link},Button:{primaryShadow:"none"}}}}function Fme(e,t){return{"bg-primary":e.colorBgLayout,"bg-secondary":e.colorFillAlter,"bg-tertiary":e.colorFillSecondary,"bg-elevated":e.colorBgContainer,"bg-surface":e.colorBgContainer,"bg-sidebar":t.sidebar,"bg-terminal":t.terminal,"bg-hover":t.hover,"bg-active":t.selected,"sidebar-rail":t.id==="warm"?"#eeede9":t.sidebar,"sidebar-surface":t.id==="warm"?"#f7f6f2":t.surface,"sidebar-hover":t.id==="warm"?"#eeece7":t.hover,"sidebar-selected":t.id==="warm"?"#e9e3f4":t.selected,"sidebar-accent":t.id==="warm"?"#6a5486":t.link,"border-subtle":e.colorBorderSecondary,"border-default":e.colorBorder,"border-strong":e.colorTextTertiary,border:e.colorBorder,"border-focus":t.focus,"text-primary":e.colorText,"text-secondary":e.colorTextSecondary,"text-tertiary":e.colorTextTertiary,"text-muted":e.colorTextSecondary,"text-inverse":e.colorTextLightSolid,"text-link":e.colorLink,accent:t.link,"accent-solid":e.colorPrimary,"accent-hover":e.colorPrimaryTextHover,"accent-solid-hover":e.colorPrimaryHover,"accent-active":e.colorPrimaryTextActive,"accent-strong":e.colorPrimaryTextActive,"accent-muted":t.selected,"accent-soft":e.colorPrimaryBorder,success:e.colorSuccessText,"success-hover":e.colorSuccessTextHover,"success-muted":e.colorSuccessBg,warning:e.colorWarningText,"warning-muted":e.colorWarningBg,danger:e.colorErrorText,"danger-hover":e.colorErrorTextHover,"danger-muted":e.colorErrorBg,info:e.colorInfoText,"info-muted":e.colorInfoBg,permission:e.colorWarningText,"permission-muted":e.colorWarningBg,thinking:e.colorTextSecondary,"syntax-keyword":t.dark?"#cfb4ed":"#8250df","syntax-string":t.dark?"#9acda5":"#0a7d37","syntax-number":t.dark?"#ddbc72":"#965100","syntax-comment":t.secondary,"syntax-operator":t.dark?"#f1a9ce":"#b2085f","selection-bg":t.dark?"#364965":t.selected,"find-highlight-bg":t.dark?"#54461b":"#fff5bd","find-active-bg":t.dark?"#644324":"#ffdbc0","font-sans":e.fontFamily,"font-mono":e.fontFamilyCode,"font-size-2xs":"12px","font-size-xs":`${e.fontSizeSM}px`,"font-size-sm":`${e.fontSize}px`,"font-size-base":`${e.fontSize}px`,"font-size-lg":`${e.fontSizeLG}px`,"font-size-xl":`${e.fontSizeHeading3}px`,"font-weight-regular":400,"font-weight-medium":500,"font-weight-semibold":e.fontWeightStrong,"font-weight-bold":e.fontWeightStrong,"line-height-tight":e.lineHeightHeading3,"line-height-base":e.lineHeight,"line-height-relaxed":e.lineHeight,"radius-xs":`${e.borderRadiusSM}px`,"radius-sm":`${e.borderRadius}px`,"radius-md":`${e.borderRadiusLG}px`,"radius-lg":`${e.borderRadiusLG}px`,"radius-full":"9999px","control-radius":`${e.borderRadius}px`,"shadow-xs":e.boxShadowTertiary,"shadow-sm":e.boxShadowTertiary,"shadow-md":e.boxShadowSecondary,"shadow-lg":e.boxShadowSecondary,"shadow-xl":e.boxShadow,"shadow-elevated":e.boxShadowSecondary,"float-bg":e.colorBgElevated,"float-border":e.colorBorderSecondary,"float-radius":`${e.borderRadiusLG}px`,"float-shadow":e.boxShadowSecondary,"scrollbar-thumb":e.colorTextQuaternary,"scrollbar-hover":e.colorTextTertiary,"scrollbar-active":e.colorTextSecondary,"scrollbar-track":"transparent"}}function $me(e){return`:root { ${Object.entries(e).map(([t,r])=>`--${t}: ${r};`).join(" ")} }`}function QH(){try{return XH(window.localStorage.getItem(w3))}catch{return"warm"}}var h3=QH(),g3=new Set;function YH(e){if(e!==h3){h3=e;for(let t of g3)t()}}var Eo={subscribe(e){return g3.add(e),()=>{g3.delete(e)}},getSnapshot:()=>h3,getServerSnapshot:()=>"warm"};function Dme(e){let t=XH(e),r=!0;try{window.localStorage.setItem(w3,t)}catch{r=!1}return YH(t),r}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===w3||e.key===null)&&YH(QH())});var qb=B(Ee(),1);mme.default.locale("zh-cn");var E3=d0.createContext(!1);function Ub(e){return Sme(x3(e),y3.darkAlgorithm)}var od=Ub("warm");function sd(e=Eo.getSnapshot()){let t=x3(e);return{background:t.terminal,foreground:t.terminalText,cursor:t.terminalCursor,selectionBackground:t.dark?"#364965":"#49413d"}}function v3(e=document){let t=Eo.getSnapshot(),r=x3(t),n=y3.getDesignToken(Ub(t)),a=e.getElementById("wand-theme-tokens");a||(a=e.createElement("style"),a.id="wand-theme-tokens",e.head.appendChild(a)),a.textContent=$me(Fme(n,r)),e.documentElement.dataset.wandTheme=t,e.documentElement.style.colorScheme=r.dark?"dark":"light",e.querySelector('meta[name="theme-color"]')?.setAttribute("content",r.background)}typeof document<"u"&&(v3(),Eo.subscribe(()=>v3()));function sa({children:e}){let t=d0.useSyncExternalStore(Eo.subscribe,Eo.getSnapshot,Eo.getServerSnapshot),r=d0.useMemo(()=>Ub(t),[t]),n=va(),a=ga(),o=d0.useMemo(()=>{let l=typeof document>"u"?null:getComputedStyle(document.documentElement),u=(d,p)=>l?.getPropertyValue(d).trim()||p;return{...r,cssVar:{key:a?"wand-ui-reduced":"wand-ui"},token:{...r.token,motion:!0,motionDurationFast:a?"0.00001s":u("--motion-fast","0.12s"),motionDurationMid:a?"0.00001s":u("--motion-normal","0.22s"),motionDurationSlow:a?"0.00001s":u("--motion-normal","0.22s"),motionEaseInOut:u("--ease-in-out-smooth","ease-in-out"),motionEaseOut:u("--ease-out-expo","ease-out")}}},[a,r]);return(0,qb.jsx)(E3.Provider,{value:!0,children:(0,qb.jsx)(UH,{locale:{...GH.default,...KH},theme:o,getPopupContainer:()=>n??document.body,children:e})})}function Bt({children:e}){return d0.useContext(E3)?e:(0,qb.jsx)(sa,{children:e})}function Gb({children:e}){let t=d0.useSyncExternalStore(Eo.subscribe,Eo.getSnapshot,Eo.getServerSnapshot),r=Ub(t);return(0,qb.jsx)(E3.Provider,{value:!0,children:(0,qb.jsx)(UH,{locale:{...GH.default,...KH},theme:{...r,cssVar:{key:"wand-ui-measurement"},token:{...r.token,motion:!1}},children:e})})}var Ame=B(_(),1),R2=B(Ee(),1);function _u({className:e,size:t="md",inputSize:r=t,variant:n="outline",inputProps:a,startSlot:o,endSlot:l,clearable:u,clearLabel:d="\u6E05\u9664\u8F93\u5165",onClear:p,ref:m,...v}){let g=Ame.useCallback(x=>{let y=x?.input??null;if(typeof m=="function")return m(y);m&&(m.current=y)},[m]),b=a?.["aria-invalid"]??v["aria-invalid"];return(0,R2.jsx)(Bt,{children:(0,R2.jsx)(p3,{...v,...a,status:b===!0||b==="true"?"error":void 0,variant:n==="outline"?"outlined":"filled",ref:g,prefix:o,suffix:l,allowClear:u?{clearIcon:(0,R2.jsx)("span",{"aria-label":d,children:(0,R2.jsx)(De,{name:"close",size:14})})}:!1,onClear:p,size:r==="sm"?"small":r==="lg"?"large":"middle",className:Je("wand-ui-input",e)})})}var JH=B(_(),1);function rq(){let e=!1,t=0,r,n=()=>{r!==void 0&&clearTimeout(r),r=void 0};return{onCompositionStart(){n(),t+=1,e=!0},onCompositionEnd(){n(),e=!0;let a=t;r=setTimeout(()=>{t===a&&(e=!1,r=void 0)},0)},isComposing(){return e},shouldIgnore(a){return e||a.isComposing===!0||a.keyCode===229||a.nativeEvent?.isComposing===!0||a.nativeEvent?.keyCode===229},reset(){n(),t+=1,e=!1}}}function Kb(){let e=(0,JH.useRef)(null);return e.current||(e.current=rq()),(0,JH.useEffect)(()=>()=>e.current?.reset(),[]),e.current}var nq={};ws(nq,{hasOpenOwnedPopupSurface:()=>z2,hasOpenPopupSurface:()=>sf,isWandPopupOwnedBy:()=>lf,popupOffset:()=>cd,popupPlacement:()=>ud,registerPopupDismiss:()=>iq,registerPopupOwner:()=>g0,usePopupDismiss:()=>Qn});var ZH=B(_(),1);function ud(e,t){return e==="top"||e==="bottom"?t==="center"?e:`${e}${t==="end"?"Right":"Left"}`:t==="center"?e:`${e}${t==="end"?"Bottom":"Top"}`}function cd(e,t){return e==="left"?[-t,0]:e==="right"?[t,0]:[0,e==="top"?-t:t]}var Ss=[],ld=rq();function aq(){for(let e=Ss.length-1;e>=0;e-=1)if(Ss[e]?.priority==="blocking")return Ss[e];return Ss.at(-1)}function sf(){return Ss.length>0||Array.from(document.querySelectorAll("[role=dialog],[data-wand-dialog-surface],.ant-select-dropdown,.ant-dropdown,.ant-popover")).some(e=>e.getClientRects().length&&getComputedStyle(e).visibility!=="hidden")}function eq(e){if(!(e.key!=="Escape"||!Ss.length)){if(ld.shouldIgnore(e)){e.stopImmediatePropagation();return}e.preventDefault(),e.stopImmediatePropagation(),aq()?.dismiss()}}function tq(){aq()?.dismiss()}function iq(e,t="normal"){Ss.length||(document.addEventListener("compositionstart",ld.onCompositionStart,!0),document.addEventListener("compositionend",ld.onCompositionEnd,!0),document.addEventListener("focusout",ld.reset,!0),document.addEventListener("keydown",eq,!0),window.addEventListener("popstate",tq));let r={dismiss:e,priority:t};return Ss.push(r),()=>{let n=Ss.indexOf(r);n>=0&&Ss.splice(n,1),Ss.length||(document.removeEventListener("compositionstart",ld.onCompositionStart,!0),document.removeEventListener("compositionend",ld.onCompositionEnd,!0),document.removeEventListener("focusout",ld.reset,!0),document.removeEventListener("keydown",eq,!0),window.removeEventListener("popstate",tq),ld.reset())}}var O2=new Map;function g0(e,t){return!t||e===t?()=>{}:(O2.set(e,t),()=>{O2.get(e)===t&&O2.delete(e)})}function lf(e,t){let r=e instanceof Element?e.closest("[data-wand-popup-owner]")?.getAttribute("data-wand-popup-owner"):null,n=new Set;for(;r&&!n.has(r);){if(r===t)return!0;n.add(r),r=O2.get(r)??null}return!1}function z2(e){return!e.length||typeof document>"u"?!1:Array.from(document.querySelectorAll("[data-wand-popup-owner]")).some(t=>t.getClientRects().length>0&&getComputedStyle(t).visibility!=="hidden"&&e.some(r=>lf(t,r)))}function Qn(e,t,r="normal"){let n=(0,ZH.useRef)(t);n.current=t,(0,ZH.useEffect)(()=>e?iq(()=>n.current(),r):void 0,[e,r])}var k3=B(_()),L2=e=>Lt(e)?cr(e)?e():e:null,xl=B(_()),oq="50%",Bme=e=>{let{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:a,innerPadding:o,dropShadowPopover:l,colorTextHeading:u,borderRadiusLG:d,zIndexPopup:p,titleMarginBottom:m,colorBgElevated:v,popoverBg:g,titleBorderBottom:b,innerContentPadding:x,titlePadding:y,antCls:E}=e,[S,F]=bn(E,"tooltip");return[{[t]:{...Tt(e),position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:p,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",filter:l,[S("valid-offset-x")]:F("arrow-offset-x","var(--arrow-x)"),transformOrigin:[F("valid-offset-x",oq),`var(--arrow-y, ${oq})`].join(" "),[S("arrow-background-color")]:v,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-container`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:d,padding:o},[`${t}-title`]:{minWidth:n,marginBottom:m,color:u,fontWeight:a,borderBottom:b,padding:y},[`${t}-content`]:{color:r,padding:x}}},o0(e,F("arrow-background-color"),{arrowShadow:!1}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block"}}]},Ime=e=>{let{componentCls:t,antCls:r}=e,[n]=bn(r,"tooltip");return{[t]:bi.map(a=>{let o=e[`${a}6`];return{[`&${t}-${a}`]:{[n("arrow-background-color")]:o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}})}},Mme=e=>{let{lineWidth:t,controlHeight:r,fontHeight:n,padding:a,wireframe:o,zIndexPopupBase:l,borderRadiusLG:u,marginXS:d,lineType:p,colorSplit:m,paddingSM:v}=e,g=r-n,b=g/2,x=g/2-t,y=a;return{titleMinWidth:177,zIndexPopup:l+30,...i0(e),...Yp({contentRadius:u,limitVerticalRadius:!0}),innerPadding:o?0:12,titleMarginBottom:o?0:d,titlePadding:o?`${b}px ${y}px ${x}px`:0,titleBorderBottom:o?`${t}px ${p} ${m}`:"none",innerContentPadding:o?`${v}px ${y}px`:0}},lq=pt("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,n=yt(e,{popoverBg:t,popoverColor:r});return[Bme(n),Ime(n),$u(n,"zoom-big")]},Mme,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),uq=e=>{let{title:t,content:r,prefixCls:n,classNames:a,styles:o}=e;return!Lt(t)&&!Lt(r)?null:xl.createElement(xl.Fragment,null,Lt(t)&&xl.createElement("div",{className:Z(`${n}-title`,a?.title),style:o?.title},t),Lt(r)&&xl.createElement("div",{className:Z(`${n}-content`,a?.content),style:o?.content},r))},Tme=e=>{let{hashId:t,prefixCls:r,className:n,style:a,placement:o="top",title:l,content:u,children:d,classNames:p,styles:m}=e,v=L2(l),g=L2(u),b={...e,placement:o},[x,y]=Ct([p],[m],{props:b}),E=Z(t,r,`${r}-pure`,`${r}-placement-${o}`,n);return xl.createElement("div",{className:E,style:a},xl.createElement("div",{className:`${r}-arrow`}),xl.createElement(Tb,{...e,className:t,prefixCls:r,classNames:x,styles:y},d||xl.createElement(uq,{prefixCls:r,title:v,content:g,classNames:x,styles:y})))},jme=e=>{let{prefixCls:t,className:r,...n}=e,{getPrefixCls:a}=xl.useContext(st),o=a("popover",t),[l,u]=lq(o);return xl.createElement(Tme,{...n,prefixCls:o,hashId:l,className:Z(r,u)})},_me=jme,Nme=k3.forwardRef((e,t)=>{let{prefixCls:r,title:n,content:a,overlayClassName:o,placement:l="top",trigger:u,children:d,mouseEnterDelay:p,mouseLeaveDelay:m,onOpenChange:v,overlayStyle:g={},styles:b,classNames:x,motion:y,arrow:E,...S}=e,{getPrefixCls:F,className:$,style:C,classNames:D,styles:I,arrow:M,trigger:A,mouseEnterDelay:j,mouseLeaveDelay:P}=xt("popover"),O=p??j??.1,V=m??P??.1,W=F("popover",r),[H,q]=lq(W),z=F(),L=b2(E,M),U=u||A||"hover",Y={...e,placement:l,trigger:U,mouseEnterDelay:O,mouseLeaveDelay:V,overlayStyle:g,styles:b,classNames:x},X=Ge(C),J=Ge(g),[N,R]=Ct([D,x],[I,X,b,J],{props:Y}),K=Z(o,H,q,$,N.root),[Q,ee]=qt(e.defaultOpen??!1,e.open),te=se=>{ee(se),v?.(se)},ne=L2(n),me=L2(a);return k3.createElement(wi,{unique:!1,arrow:L,placement:l,trigger:U,mouseEnterDelay:O,mouseLeaveDelay:V,...S,prefixCls:W,classNames:{root:K,container:N.container,arrow:N.arrow},styles:{root:R.root,container:R.container,arrow:R.arrow},ref:t,open:Q,onOpenChange:te,overlay:Lt(ne)||Lt(me)?k3.createElement(uq,{prefixCls:W,title:ne,content:me,classNames:N,styles:R}):null,motion:{motionName:Wp(z,"zoom-big",typeof y?.motionName=="string"?y?.motionName:void 0)},"data-popover-inject":!0},d)}),cq=Nme;cq._InternalPanelDoNotUseOrYouWillBeFired=_me;var v0=cq,sq=B(_(),1),C3=B(Ee(),1);function ko({trigger:e,triggerActions:t="click",children:r,ariaLabel:n,align:a="center",side:o="bottom",sideOffset:l=8,className:u,open:d,contentId:p,contentRole:m,popupOwner:v=p??n,onOpenChange:g}){let b=va(),x=sq.useRef(null),[y,E]=sq.useState(!1),S=d??y,F=$=>{E($),g?.($)};return Qn(S,()=>{F(!1),x.current?.nativeElement?.focus({preventScroll:!0})}),(0,C3.jsx)(Bt,{children:(0,C3.jsx)(v0,{ref:x,open:S,onOpenChange:F,trigger:t,arrow:!1,placement:ud(o,a),destroyOnHidden:!0,getPopupContainer:()=>b??document.body,align:{offset:cd(o,l)},classNames:{root:Je("wand-ui-popover-content",u)},content:(0,C3.jsx)("div",{id:p,role:m,"aria-label":n,"data-wand-popup-owner":v,children:r}),children:e})})}var _a=B(_()),Pme=B(_()),Rme=Pme.createContext({}),S3=Rme,Ome=e=>{let{antCls:t,componentCls:r,iconCls:n,avatarBg:a,avatarColor:o,containerSize:l,containerSizeLG:u,containerSizeSM:d,textFontSize:p,textFontSizeLG:m,textFontSizeSM:v,iconFontSize:g,iconFontSizeLG:b,iconFontSizeSM:x,borderRadius:y,borderRadiusLG:E,borderRadiusSM:S,lineWidth:F,lineType:$}=e,C=(D,I,M,A)=>({width:D,height:D,borderRadius:"50%",fontSize:I,[`&${r}-square`]:{borderRadius:A},[`&${r}-icon`]:{fontSize:M,[`> ${n}`]:{margin:0}}});return{[r]:{...Tt(e),position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:o,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:a,border:`${ue(F)} ${$} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"},...C(l,p,g,y),"&-lg":{...C(u,m,b,E)},"&-sm":{...C(d,v,x,S)},"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}}}},zme=e=>{let{componentCls:t,groupBorderColor:r,groupOverlapping:n,groupSpace:a}=e;return{[`${t}-group`]:{display:"inline-flex",[t]:{borderColor:r},"> *:not(:first-child)":{marginInlineStart:n}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:a}}}},Lme=e=>{let{controlHeight:t,controlHeightLG:r,controlHeightSM:n,fontSize:a,fontSizeLG:o,fontSizeXL:l,fontSizeHeading3:u,marginXS:d,marginXXS:p,colorBorderBg:m}=e;return{containerSize:t,containerSizeLG:r,containerSizeSM:n,textFontSize:a,textFontSizeLG:a,textFontSizeSM:a,iconFontSize:Math.round((o+l)/2),iconFontSizeLG:u,iconFontSizeSM:a,groupSpace:p,groupOverlapping:-d,groupBorderColor:m}},pq=pt("Avatar",e=>{let{colorTextLightSolid:t,colorTextPlaceholder:r}=e,n=yt(e,{avatarBg:r,avatarColor:t});return[Ome(n),zme(n)]},Lme),Hme=_a.forwardRef((e,t)=>{let{prefixCls:r,shape:n,size:a,src:o,srcSet:l,icon:u,className:d,rootClassName:p,style:m,alt:v,draggable:g,children:b,crossOrigin:x,gap:y=4,onError:E,...S}=e,[F,$]=_a.useState(1),[C,D]=_a.useState(!1),[I,M]=_a.useState(!0),A=_a.useRef(null),j=_a.useRef(null),P=fn(t,A),{getPrefixCls:O,className:V,style:W}=xt("avatar"),H=_a.useContext(S3),q=()=>{if(!j.current||!A.current)return;let le=j.current.offsetWidth,ke=A.current.offsetWidth;le!==0&&ke!==0&&y*2<ke&&$(ke-y*2<le?(ke-y*2)/le:1)};_a.useEffect(()=>{D(!0)},[]),_a.useEffect(()=>{M(!0),$(1)},[o,l]),_a.useEffect(q,[y]);let z=()=>{E?.()!==!1&&M(!1)},L=Ur(le=>a??H?.size??le??"medium"),U=Object.keys(kt(L)?L||{}:{}).some(le=>tf.includes(le)),Y=Lt(u),X=t3(U),J=_a.useMemo(()=>{if(!kt(L))return{};let le=tf.find(Ae=>X[Ae]),ke=L[le];return ke?{width:ke,height:ke,fontSize:ke&&(Y||Lt(b))?ke/2:18}:{}},[X,L,Y,b]),N=O("avatar",r),R=yn(N),[K,Q]=pq(N,R),ee=Z({[`${N}-lg`]:L==="large",[`${N}-sm`]:L==="small"}),te=_a.isValidElement(o),ne=n||H?.shape||"circle",me=Z(N,ee,V,`${N}-${ne}`,{[`${N}-image`]:te||o&&I,[`${N}-icon`]:Y},Q,R,d,p,K),se=Kn(L)?{width:L,height:L,fontSize:Y?L/2:18}:{},he;if(typeof o=="string"&&I)he=_a.createElement("img",{src:o,draggable:g,srcSet:l,onError:z,alt:v,crossOrigin:x});else if(te)he=o;else if(Y)he=u;else if(C||F!==1){let le=`scale(${F})`,ke={msTransform:le,WebkitTransform:le,transform:le};he=_a.createElement(Ta,{onResize:q},_a.createElement("span",{className:`${N}-string`,ref:j,style:ke},b))}else he=_a.createElement("span",{className:`${N}-string`,style:{opacity:0},ref:j},b);return _a.createElement("span",{...S,style:{...se,...J,...W,...m},className:me,ref:P},he)}),fq=Hme,Co=B(_()),dq=e=>{let{size:t,shape:r}=Co.useContext(S3),n=Co.useMemo(()=>({size:e.size||t,shape:e.shape||r}),[e.size,e.shape,t,r]);return Co.createElement(S3.Provider,{value:n},e.children)},qme=Co.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=Co.useContext(st),{prefixCls:a,className:o,rootClassName:l,style:u,maxCount:d,maxStyle:p,size:m,shape:v,maxPopoverPlacement:g,maxPopoverTrigger:b,children:x,max:y}=e,E=r("avatar",a),S=`${E}-group`,F=yn(E),[$,C]=pq(E,F),D=Z(S,{[`${S}-rtl`]:n==="rtl"},C,F,o,l,$),I=xr(x).map((P,O)=>Sr(P,{key:`avatar-key-${O}`})),M=Co.useRef(null);Co.useImperativeHandle(t,()=>({nativeElement:M.current}));let A=y?.count||d,j=I.length;if(A&&A<j){let P=I.slice(0,A),O=I.slice(A,j),V=y?.style||p,W=y?.popover?.trigger||b||"hover",H=y?.popover?.placement||g||"top",q={content:O,...y?.popover,placement:H,trigger:W,rootClassName:Z(`${S}-popover`,y?.popover?.rootClassName)};return P.push(Co.createElement(v0,{key:"avatar-popover-key",destroyOnHidden:!0,...q},Co.createElement(fq,{style:V},`+${j-A}`))),Co.createElement(dq,{shape:v,size:m},Co.createElement("div",{ref:M,className:D,style:u},P))}return Co.createElement(dq,{shape:v,size:m},Co.createElement("div",{ref:M,className:D,style:u},I))}),Wme=qme,mq=fq;mq.Group=Wme;var ki=mq;var dd=B(_()),b0=B(_()),Xb=B(_()),cf=B(_()),hq=e=>{let{prefixCls:t,value:r,current:n,offset:a=0}=e,o;return a&&(o={position:"absolute",top:`${a}00%`,left:0}),cf.createElement("span",{style:o,className:Z(`${t}-only-unit`,{current:n})},r)};function Vme(e,t,r){let n=e,a=0;for(;(n+10)%10!==t;)n+=r,a+=r;return a}var Ume=e=>{let{prefixCls:t,count:r,value:n}=e,a=Number(n),o=Math.abs(r),[l,u]=cf.useState(a),[d,p]=cf.useState(o),m=()=>{u(a),p(o)};cf.useEffect(()=>{let b=setTimeout(m,1e3);return()=>clearTimeout(b)},[a]);let v,g;if(l===a||Number.isNaN(a)||Number.isNaN(l))v=[cf.createElement(hq,{...e,key:a,current:!0})],g={transition:"none"};else{v=[];let b=a+10,x=[];for(let S=a;S<=b;S+=1)x.push(S);let y=d<o?1:-1,E=x.findIndex(S=>S%10===l);v=(y<0?x.slice(0,E+1):x.slice(E)).map((S,F)=>{let $=S%10;return cf.createElement(hq,{...e,key:S,value:$,offset:y<0?F-E:F,current:F===E})}),g={transform:`translateY(${-Vme(l,a,y)}00%)`}}return cf.createElement("span",{className:`${t}-only`,style:g,onTransitionEnd:m},v)},Gme=Ume,Kme=Xb.forwardRef((e,t)=>{let{prefixCls:r,count:n,className:a,motionClassName:o,style:l,title:u,show:d,component:p="sup",children:m,...v}=e,{getPrefixCls:g}=Xb.useContext(st),b=g("scroll-number",r),x={...v,"data-show":d,style:l,className:Z(b,a,o),title:u},y=n;if(n&&Number(n)%1===0){let E=String(n).split("");y=Xb.createElement("bdi",null,E.map((S,F)=>Xb.createElement(Gme,{prefixCls:b,count:Number(n),value:S,key:E.length-F})))}return l?.borderColor&&(x.style={...l,boxShadow:`0 0 0 1px ${l.borderColor} inset`}),m?Sr(m,E=>({className:Z(`${b}-custom-component`,E?.className,o)})):Xb.createElement(p,{...x,ref:t},y)}),Xme=Kme,Qme=new Dt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Yme=new Dt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Jme=new Dt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Zme=new Dt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),ehe=new Dt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),the=new Dt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),rhe=e=>{let{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:a,textFontSize:o,textFontSizeSM:l,statusSize:u,dotSize:d,textFontWeight:p,indicatorHeight:m,indicatorHeightSM:v,marginXS:g,calc:b}=e,x=`${n}-scroll-number`,y=Zc(e,(E,{darkColor:S})=>({[`&${t} ${t}-color-${E}`]:{background:S,[`&:not(${t}-count)`]:{color:S},"a:hover &":{background:S}}}));return{[t]:{...Tt(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:m,height:m,color:e.badgeTextColor,fontWeight:p,fontSize:o,lineHeight:ue(m),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:b(m).div(2).equal(),boxShadow:`0 0 0 ${ue(a)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:v,height:v,fontSize:l,lineHeight:ue(v),borderRadius:b(v).div(2).equal()},[`${t}-multiple-words`]:{paddingInline:e.paddingInline,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:d,minWidth:d,height:d,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${ue(a)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${x}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${r}-spin`]:{animationName:the,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:u,height:u,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfoTextHover,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:a,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:Qme,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:g,color:e.colorText,fontSize:e.fontSize}},...y,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Yme,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:Jme,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Zme,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:ehe,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${x}-custom-component, ${t}-count`]:{transform:"none"},[`${x}-custom-component, ${x}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[x]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${x}-only`]:{position:"relative",display:"inline-block",height:m,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${x}-only-unit`]:{height:m,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${x}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${x}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},gq=e=>{let{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:a}=e,o=t,l=r,u=e.colorTextLightSolid,d=e.colorError,p=e.colorErrorHover;return yt(e,{badgeFontHeight:o,badgeShadowSize:l,badgeTextColor:u,badgeColor:d,badgeColorHover:p,badgeShadowColor:a,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},vq=e=>{let{fontSize:t,lineHeight:r,fontSizeSM:n,lineWidth:a,paddingXS:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*a,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2,paddingInline:o}},nhe=pt("Badge",e=>{let t=gq(e);return rhe(t)},vq),ahe=dd.forwardRef((e,t)=>{let{prefixCls:r,scrollNumberPrefixCls:n,children:a,status:o,text:l,color:u,count:d=null,overflowCount:p=99,dot:m=!1,size:v="medium",title:g,offset:b,style:x,className:y,rootClassName:E,classNames:S,styles:F,showZero:$=!1,...C}=e,{getPrefixCls:D,direction:I,className:M,style:A,classNames:j,styles:P}=xt("badge"),O=D("badge",r),[V,W]=nhe(O),H={...e,overflowCount:p,size:v,dot:m,showZero:$},q=d>p?`${p}+`:d,z=q==="0"||q===0||l==="0"||l===0,L=d===null||z&&!$,U=(zr(o)||zr(u))&&L,Y=zr(o)||!z,X=!!(!a&&U&&(l||Y||!L)),J=(0,b0.useMemo)(()=>{if(!b)return;let Te=Number.parseInt(b[0],10);return{marginTop:b[1],insetInlineEnd:-Te}},[b]),N=(0,b0.useMemo)(()=>({...J,...A,...x}),[J,x,A]),R=X?"root":"indicator",K=Ge(A,R),Q=Ge(x,R),[ee,te]=Ct([j,S],[P,K,F,Q],{props:H}),ne=m&&!z,me=ne?"":q,se=(0,b0.useMemo)(()=>(!Lt(me)&&!Lt(l)||z&&!$)&&!ne,[me,z,$,ne,l]),he=(0,b0.useRef)(d);se||(he.current=d);let le=he.current,ke=(0,b0.useRef)(me);se||(ke.current=me);let Ae=ke.current,de=(0,b0.useRef)(ne);se||(de.current=ne);let ve=ti(le)||Kn(le)?le:void 0,ye=g===null||g===!1?void 0:g??ve,we=!se&&(l===0?$:!!l&&l!==!0),Oe=we?dd.createElement("span",{className:`${O}-status-text`},l):null,Fe=kt(le)?Sr(le,Te=>({style:{...N,...Te.style}})):void 0,$e=Jp(u,!1),Me=Z(ee.indicator,{[`${O}-status-dot`]:U,[`${O}-status-${o}`]:!!o,[`${O}-color-${u}`]:$e}),qe={};u&&!$e&&(qe.color=u,qe.background=u);let ze=Z(O,{[`${O}-status`]:U,[`${O}-not-a-wrapper`]:!a,[`${O}-rtl`]:I==="rtl"},y,E,M,ee.root,V,W);if(X){let Te=te.root?.color;return dd.createElement("span",{ref:t,...C,className:ze,style:{...J,...te.root}},dd.createElement("span",{className:Me,style:{...te.indicator,...qe}}),we&&dd.createElement("span",{style:{color:Te},className:`${O}-status-text`},l))}return dd.createElement("span",{ref:t,...C,className:ze,style:te.root},a,dd.createElement(ra,{visible:!se,motionName:`${O}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Te})=>{let Ne=D("scroll-number",n),Qe=de.current,ot=Z(ee.indicator,{[`${O}-dot`]:Qe,[`${O}-count`]:!Qe,[`${O}-count-sm`]:v==="small",[`${O}-multiple-words`]:!Qe&&Ae&&Ae.toString().length>1,[`${O}-status-${o}`]:!!o,[`${O}-color-${u}`]:$e}),et={...J,...te.indicator};return u&&!$e&&(et=et||{},et.background=u),dd.createElement(Xme,{prefixCls:Ne,show:!se,motionClassName:Te,className:ot,count:Ae,title:ye,style:et,key:"scrollNumber"},Fe)}),Oe)}),ihe=ahe,uf=B(_()),ohe=e=>{let{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:a,calc:o}=e,l=`${t}-ribbon`,u=`${t}-ribbon-wrapper`,d=Zc(e,(p,{darkColor:m})=>({[`&${l}-color-${p}`]:{background:m,color:m}}));return{[u]:{position:"relative"},[l]:{...Tt(e),position:"absolute",top:n,padding:`0 ${ue(e.paddingXS)}`,color:e.colorPrimary,lineHeight:ue(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${l}-content`]:{color:e.badgeTextColor},[`${l}-corner`]:{position:"absolute",top:"100%",width:a,height:a,color:"currentcolor",border:`${ue(o(a).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...d,[`&${l}-placement-end`]:{insetInlineEnd:o(a).mul(-1).equal(),borderEndEndRadius:0,[`${l}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${l}-placement-start`]:{insetInlineStart:o(a).mul(-1).equal(),borderEndStartRadius:0,[`${l}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},she=pt(["Badge","Ribbon"],e=>{let t=gq(e);return ohe(t)},vq),lhe=uf.forwardRef((e,t)=>{let{className:r,prefixCls:n,style:a,color:o,children:l,text:u,placement:d="end",rootClassName:p,styles:m,classNames:v}=e,{getPrefixCls:g,direction:b,className:x,style:y,classNames:E,styles:S}=xt("ribbon"),F=g("ribbon",n),$=`${F}-wrapper`,[C,D]=she(F,$),I={...e,placement:d},M=Ge(y,"indicator"),A=Ge(a,"indicator"),[j,P]=Ct([E,v],[S,M,m,A],{props:I}),O=Jp(o,!1),V=Z(F,`${F}-placement-${d}`,{[`${F}-rtl`]:b==="rtl",[`${F}-color-${o}`]:O},r,x,j.indicator),W={},H={};o&&!O&&(W.background=o,H.color=o);let q=uf.useRef(null);return uf.useImperativeHandle(t,()=>({nativeElement:q.current})),uf.createElement("div",{ref:q,className:Z($,p,C,D,j.root),style:P.root},l,uf.createElement("div",{className:Z(V,C),style:{...W,...P.indicator}},uf.createElement("span",{className:Z(`${F}-content`,j.content),style:P.content},u),uf.createElement("div",{className:`${F}-corner`,style:H})))}),uhe=lhe,bq=ihe;bq.Ribbon=uhe;var Ci=bq;var Yo=B(_());function che(e,t,r){var n=r||{},a=n.noTrailing,o=a===void 0?!1:a,l=n.noLeading,u=l===void 0?!1:l,d=n.debounceMode,p=d===void 0?void 0:d,m,v=!1,g=0;function b(){m&&clearTimeout(m)}function x(E){var S=E||{},F=S.upcomingOnly,$=F===void 0?!1:F;b(),v=!$}function y(){for(var E=arguments.length,S=new Array(E),F=0;F<E;F++)S[F]=arguments[F];var $=this,C=Date.now()-g;if(v)return;function D(){g=Date.now(),t.apply($,S)}function I(){m=void 0}!u&&p&&!m&&D(),b(),p===void 0&&C>e?u?(g=Date.now(),o||(m=setTimeout(p?I:D,e))):D():o!==!0&&(m=setTimeout(p?I:D,p===void 0?e-C:e))}return y.cancel=x,y}function dhe(e,t,r){var n=r||{},a=n.atBegin,o=a===void 0?!1:a;return che(e,t,{debounceMode:o!==!1})}var yq=B(_()),y0=B(_()),w0=B(_()),H2=100,kq=H2/5,Cq=H2/2-kq/2,F3=Cq*2*Math.PI,wq=50,xq=e=>{let{dotClassName:t,style:r,hasCircleCls:n}=e;return w0.createElement("circle",{className:Z(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:Cq,cx:wq,cy:wq,strokeWidth:kq,style:r})},phe=({percent:e,prefixCls:t})=>{let r=`${t}-dot`,n=`${r}-holder`,a=`${n}-hidden`,[o,l]=w0.useState(!1);or(()=>{e!==0&&l(!0)},[e]);let u=Math.max(Math.min(e,100),0);if(!o)return null;let d={strokeDashoffset:`${F3/4}`,strokeDasharray:`${F3*u/100} ${F3*(100-u)/100}`};return w0.createElement("span",{className:Z(n,`${r}-progress`,{[a]:u<=0})},w0.createElement("svg",{viewBox:`0 0 ${H2} ${H2}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u},w0.createElement(xq,{dotClassName:r,hasCircleCls:!0}),w0.createElement(xq,{dotClassName:r,style:d})))},fhe=phe;function mhe(e){let{prefixCls:t,percent:r=0,className:n,style:a}=e,o=`${t}-dot`,l=`${o}-holder`,u=`${l}-hidden`;return y0.createElement(y0.Fragment,null,y0.createElement("span",{className:Z(l,n,r>0&&u),style:a},y0.createElement("span",{className:Z(o,`${t}-dot-spin`)},[1,2,3,4].map(d=>y0.createElement("i",{className:`${t}-dot-item`,key:d})))),y0.createElement(fhe,{prefixCls:t,percent:r}))}function hhe(e){let{prefixCls:t,indicator:r,percent:n,className:a,style:o}=e,l=`${t}-dot`;return r&&yq.isValidElement(r)?Sr(r,u=>({className:Z(u.className,l,a),style:{...u.style,...o},percent:n})):yq.createElement(mhe,{prefixCls:t,percent:n,className:a,style:o})}var ghe=new Dt("antSpinMove",{to:{opacity:1}}),vhe=new Dt("antRotate",{to:{transform:"rotate(405deg)"}}),bhe=e=>{let{componentCls:t}=e,r=`${t}-section`;return{[t]:{...Tt(e),position:"relative","&-rtl":{direction:"rtl"},[`&${r}, > ${r}`]:{display:"flex",alignItems:"center",flexDirection:"column",gap:e.paddingSM,color:e.colorPrimary},[`&${r}`]:{display:"inline-flex"},[`> ${r}`]:{position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)",zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-fullscreen":{position:"fixed",inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:"none",transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:"auto"},[`> ${r}`]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},yhe=e=>{let{componentCls:t,antCls:r,motionDurationSlow:n}=e,[a,o]=bn(r,"spin");return{[t]:{[a("dot-holder-size")]:e.dotSize,[a("dot-item-size")]:`calc((${o("dot-holder-size")} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:"1em",height:"1em",fontSize:o("dot-holder-size"),display:"inline-block",transition:["transform","opacity"].map(l=>`${l} ${n} ease`).join(", "),transformOrigin:"50% 50%",lineHeight:1,"&-hidden":{transform:"scale(0.3)",opacity:0}},position:"relative",display:"inline-block",fontSize:o("dot-holder-size"),width:"1em",height:"1em","&-spin":{transform:"rotate(45deg)",animationName:vhe,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-item":{position:"absolute",display:"block",width:o("dot-item-size"),height:o("dot-item-size"),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:ghe,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-progress":{position:"absolute",left:"50%",top:0,transform:"translateX(-50%)"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(l=>`${l} ${n} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},whe=e=>{let{componentCls:t}=e,[r]=bn(e.antCls,"spin");return{[t]:{"&-sm":{[r("dot-holder-size")]:e.dotSizeSM},"&-lg":{[r("dot-holder-size")]:e.dotSizeLG}}}},xhe=e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},Ehe=pt("Spin",e=>{let t=yt(e,{spinDotDefault:e.colorTextDescription});return[bhe(t),yhe(t),whe(t)]},xhe),$3=B(_()),khe=200,Eq=[[30,.05],[70,.03],[96,.01]];function Che(e,t){let[r,n]=$3.useState(0),a=$3.useRef(null),o=t==="auto";return $3.useEffect(()=>(o&&e&&(n(0),a.current=setInterval(()=>{n(l=>{let u=100-l;for(let d=0;d<Eq.length;d+=1){let[p,m]=Eq[d];if(l<=p)return l+u*m}return l})},khe)),()=>{a.current&&(clearInterval(a.current),a.current=null)}),[o,e]),o?r:t}var Sq;function She(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var Fq=Yo.forwardRef((e,t)=>{let{prefixCls:r,spinning:n=!0,delay:a=0,className:o,rootClassName:l,size:u,tip:d,description:p,wrapperClassName:m,style:v,children:g,fullscreen:b=!1,indicator:x,percent:y,classNames:E,styles:S,...F}=e,{getPrefixCls:$,direction:C,indicator:D,className:I,style:M,classNames:A,styles:j}=xt("spin"),P=$("spin",r),[O,V]=Ehe(P),[W,H]=Yo.useState(()=>n&&!She(n,a)),q=Che(W,y);Yo.useEffect(()=>{if(n){let te=dhe(a,()=>{H(!0)});return te(),()=>{te?.cancel?.()}}H(!1)},[a,n]);let z=Ur(te=>u??te),L=p??d,U={...e,size:z,spinning:W,tip:L,description:L,fullscreen:b,children:g,percent:q},Y=Ge(M),[X,J]=Ct([A,E],[j,Y,S],{props:U}),N=x??D??Sq,R=typeof g<"u",K=R||b,Q=Yo.createElement(Yo.Fragment,null,Yo.createElement(hhe,{className:Z(X.indicator),style:J.indicator,prefixCls:P,indicator:N,percent:q}),L&&Yo.createElement("div",{className:Z(`${P}-description`,X.tip,X.description),style:{...J.tip,...J.description}},L)),ee=Yo.useRef(null);return Yo.useImperativeHandle(t,()=>({nativeElement:ee.current})),Yo.createElement("div",{ref:ee,className:Z(P,{[`${P}-sm`]:z==="small",[`${P}-lg`]:z==="large",[`${P}-spinning`]:W,[`${P}-rtl`]:C==="rtl",[`${P}-fullscreen`]:b},l,X.root,b&&X.mask,K?m:[`${P}-section`,X.section],I,o,O,V),style:{...J.root,...K?{}:J.section,...b?J.mask:{},...v},"aria-live":"polite","aria-busy":W,...F},W&&(K?Yo.createElement("div",{className:Z(`${P}-section`,X.section),style:J.section},Q):Q),R&&Yo.createElement("div",{className:Z(`${P}-container`,X.container),style:J.container},g))});Fq.setDefaultIndicator=e=>{Sq=e};var Ki=Fq;var Dq={};ws(Dq,{installReactUiStyles:()=>x0,installStyleSheet:()=>ba});var Fhe=__wandCssTextPool[0],$he=__wandCssTextPool[1],Dhe=__wandCssTextPool[2],Ahe=__wandCssTextPool[3],Bhe=__wandCssTextPool[4],Ihe=__wandCssTextPool[5],Mhe=__wandCssTextPool[6],The=__wandCssTextPool[7],jhe=__wandCssTextPool[8],$q="wand-react-ui-styles",_he=[Fhe,Ahe,$he,Bhe,Ihe,The,jhe,"",Mhe,Dhe].join("");function x0(e=document){if(e.getElementById($q))return;let t=e.createElement("style");t.id=$q,t.textContent=_he,e.head.appendChild(t)}function ba(e,t,r=document){if(r.getElementById(e))return;let n=r.createElement("style");n.id=e,n.textContent=t,r.head.appendChild(n)}var Tq="wand-hr",Jb=2,N3="wand-ops",jq="e_wand_ops",Nhe="\u52E4\u52B3\u7684\u521D\u4E8C",P3="\u7CFB\u7EDF\u7528\u6237";function _q(e){return e?.systemKey===N3}var R3="wand-default",Nq="e_wand_default",Pq="\u9ED8\u8BA4\u7528\u6237";function Rq(e){return e?.systemKey===R3}function Phe(e){return e?.systemKey===S2}function O3(e){let t=e?.systemKey;return t===N3||t===R3||t===S2||t===Tq}var A3=8,B3=20;function Rhe(e){return _q(e)||Phe(e)||e.systemKey===Tq?[P3]:Rq(e)?[Pq]:e.tags??[]}function Ohe(e){if(!Array.isArray(e))throw new Error("\u5458\u5DE5\u6807\u7B7E\u5FC5\u987B\u662F\u6570\u7EC4\u3002");let t=[];for(let r of e){if(typeof r!="string")throw new Error("\u5458\u5DE5\u6807\u7B7E\u5FC5\u987B\u662F\u6587\u5B57\u3002");let n=r.trim();if(n){if(n.length>B3)throw new Error(`\u6BCF\u4E2A\u5458\u5DE5\u6807\u7B7E\u4E0D\u80FD\u8D85\u8FC7 ${B3} \u4E2A\u5B57\u7B26\u3002`);if(/[,,、\x00-\x1f\x7f]/.test(n))throw new Error("\u5458\u5DE5\u6807\u7B7E\u4E0D\u80FD\u5305\u542B\u5206\u9694\u7B26\u6216\u63A7\u5236\u5B57\u7B26\u3002");if(n===P3||n===Pq)throw new Error(`\u300C${n}\u300D\u662F\u5185\u7F6E\u6807\u7B7E\uFF0C\u4E0D\u53EF\u81EA\u5B9A\u4E49\u3002`);t.includes(n)||t.push(n)}}if(t.length>A3)throw new Error(`\u6700\u591A ${A3} \u4E2A\u5458\u5DE5\u6807\u7B7E\u3002`);return t}function zhe(e){return Ohe(e.split(/[,,、\n]+/))}var Lhe=[{id:Nq,systemKey:R3,avatar:"plush-cat:v1:silver"},{id:jq,systemKey:N3,avatar:"plush-cat:v1:orange"}];function z3(e){return Lhe.find(t=>t.id===e.id&&t.systemKey===e.systemKey)?.avatar??null}function Hhe(e){return z3(e)??e.avatar??""}function L3(e){return z3(e)!==null}var Na=B(Ee(),1);function Oq({activity:e,pawColor:t}){return e==="idle"?null:(0,Na.jsx)("svg",{className:"wand-avatar-file-fallback",viewBox:"0 0 100 100","aria-hidden":"true","data-file-prop":e,children:e==="reading"?(0,Na.jsxs)(Na.Fragment,{children:[(0,Na.jsx)("path",{d:"M25 70Q38 67 50 73Q62 67 75 70V90Q62 87 50 93Q38 87 25 90Z",fill:"#426a70"}),(0,Na.jsx)("path",{d:"M25 71Q38 69 50 74Q62 69 75 71L74 74Q61 71 50 77Q39 71 26 74Z",fill:"#fff3d5"}),(0,Na.jsx)("circle",{cx:"25",cy:"84",r:"4.2",fill:t}),(0,Na.jsx)("circle",{cx:"75",cy:"84",r:"4.2",fill:t}),(0,Na.jsx)("path",{d:"M50 77v15m-20-14 1 9m38-9-1 9",stroke:"#dba758",strokeWidth:"1"})]}):(0,Na.jsxs)(Na.Fragment,{children:[(0,Na.jsx)("path",{d:"M28 75L70 72L74 92L31 95Z",fill:"#426a70"}),(0,Na.jsx)("path",{d:"M31 76L68 74L70 76L32 78Z",fill:"#fff3d5"}),(0,Na.jsx)("path",{d:"M34 78l2 12",stroke:"#626c78",strokeWidth:"1"}),(0,Na.jsx)("path",{d:"M53 77L59 66",stroke:"#dba758",strokeWidth:"3",strokeLinecap:"round"}),(0,Na.jsx)("path",{d:"M53 77L51 79L55 78Z",fill:"#626c78"}),(0,Na.jsx)("circle",{cx:"30",cy:"86",r:"4.2",fill:t}),(0,Na.jsx)("circle",{cx:"56",cy:"72",r:"4",fill:t})]})})}var qhe=B(_(),1),q2=B(Ee(),1);function C0(){let e=ga();return qhe.useLayoutEffect(()=>ba("wand-avatar-thinking",`
203
- .wand-avatar-thinking{position:absolute;left:var(--plush-thinking-x,4px);top:var(--plush-thinking-y,0px);transform:translate(-50%,-50%);z-index:2;line-height:0;color:var(--text-secondary);pointer-events:none}
204
- .wand-avatar-thinking .ant-spin{display:block;color:inherit;line-height:0}
205
- .wand-avatar-thinking .ant-spin-dot{font-size:24px}
206
- .wand-avatar-thinking .ant-spin-dot-spin{animation-duration:var(--motion-spin)}
207
- .wand-avatar-thinking[data-reduced-motion="true"] .ant-spin-dot-spin{animation:none}
208
- .wand-plush-avatar[data-render-state="paused"] .ant-spin-dot-spin{animation-play-state:paused}
209
- `),[]),(0,q2.jsx)("span",{className:"wand-avatar-thinking","data-reduced-motion":e,"aria-hidden":"true",children:(0,q2.jsx)(Ki,{size:"small",indicator:(0,q2.jsx)("svg",{className:"ant-spin-dot-spin",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"var(--bg-primary)",strokeWidth:"0.6",children:[1,.9,.75,.6,.45,.3,.2,.15].map((t,r)=>(0,q2.jsx)("rect",{x:"10.5",y:"1",width:"3",height:"6",rx:"1.5",opacity:t,transform:`rotate(${r*45} 12 12)`},r))})})})}var Fs=B(_(),1),Whe=[[[.17,0,0],[.47,.06,-.02],[.78,.22,-.065],[1.035,.27,-.1],[1.13,.19,-.12],[1.07,.075,-.132],[.93,.11,-.105],[.96,.21,-.078]],[[.195,-.013,0],[.5,-.025,-.03],[.79,-.09,-.06],[1.04,-.14,-.105],[1.11,-.27,-.12],[1.03,-.36,-.1],[.91,-.32,-.072],[.94,-.23,-.062]],[[.17,-.026,0],[.39,-.07,-.015],[.56,-.18,-.04],[.73,-.31,-.08],[.78,-.44,-.11],[.68,-.48,-.097],[.6,-.39,-.075]],[[.195,-.039,0],[.46,.06,-.03],[.66,.11,-.04],[.8,.035,-.05],[.78,-.06,-.06],[.69,-.09,-.065]]];function Vhe(e,t){let r=Whe[e];if(!r)throw new RangeError("Unknown Chuer whisker");let n=r[0],a=t>0;return r.map(([o,l,u])=>[t*(n[0]+(o-n[0])*(a?.94:1)),n[1]+(l-n[1])*(a?e%2?.85:1.08:1),u*(a?.92:1)])}function Uhe(e,t,r){let n=Vhe(e,t),a=l=>`${50+l[0]*36} ${50-(r+l[1])*36}`,o=`M${a(n[0])}`;for(let l=0;l<n.length-1;l++){let u=n[l],d=n[l+1],p=n[l-1]??[2*u[0]-d[0],2*u[1]-d[1],2*u[2]-d[2]],m=n[l+2]??[2*d[0]-u[0],2*d[1]-u[1],2*d[2]-u[2]],v=[u[0]+(d[0]-p[0])/6,u[1]+(d[1]-p[1])/6,0],g=[d[0]-(m[0]-u[0])/6,d[1]-(m[1]-u[1])/6,0];o+=`C${a(v)} ${a(g)} ${a(d)}`}return o}var Ghe={silver:{breed:"sculpted-huniu",pattern:"silver-tabby",coat:"#bdc2c0",dark:"#535d5b",pale:"#ece9e1",iris:"#819374",innerEar:"#c8b3ad",nose:"#a27667",head:[.9,.85,.58],ear:[.26,.34,.32],earX:.58,earY:.65,eyeX:.335,eyeY:.11,eyeWidth:.204,eyeUpper:.152,eyeLower:.139,pupilWidth:.086,pupilHeight:.12,cheekDepth:.036,noseY:-.205,noseWidth:.101,noseHeight:.074,muzzleY:-.315,mouthY:-.375,chinY:-.535,chinDepth:.065,chinWidth:.265,chinHeight:.16,jawDepth:.018,muzzleDepth:.089,furLength:.67},orange:{breed:"sculpted-chuer",pattern:"brown-tabby-white",coat:"#81735c",dark:"#37382e",pale:"#e9e3d5",iris:"#929d6d",innerEar:"#b6a18e",nose:"#a77f76",head:[.96,.78,.455],ear:[.245,.21,.31],earX:.62,earY:.62,eyeX:.365,eyeY:.075,eyeWidth:.193,eyeUpper:.105,eyeLower:.128,pupilWidth:.065,pupilHeight:.104,cheekDepth:.069,noseY:-.055,noseWidth:.081,noseHeight:.052,muzzleY:-.18,mouthY:-.277,chinY:-.445,chinDepth:.115,chinWidth:.29,chinHeight:.17,jawDepth:.025,muzzleDepth:.086,furLength:1.62}},Khe={silver:[{points:[[-.04,.75],[-.1,.61],[-.07,.43],[-.045,.28]],width:.035,opacity:.82},{points:[[.06,.74],[.105,.59],[.07,.41],[.04,.27]],width:.032,opacity:.76},{points:[[-.37,.67],[-.32,.54],[-.25,.43],[-.205,.32]],width:.035,opacity:.58},{points:[[.36,.67],[.31,.52],[.24,.43],[.2,.32]],width:.034,opacity:.57},{points:[[-.3,.55],[-.19,.575],[-.1,.5]],width:.026,opacity:.51},{points:[[.3,.55],[.19,.56],[.1,.49]],width:.025,opacity:.49},{points:[[-.49,.04],[-.65,-.015],[-.8,.02],[-.9,.095]],width:.04,opacity:.67},{points:[[.49,.04],[.66,-.02],[.8,.02],[.9,.09]],width:.04,opacity:.67},{points:[[-.57,-.16],[-.72,-.19],[-.9,-.12]],width:.035,opacity:.5},{points:[[.57,-.16],[.73,-.19],[.9,-.12]],width:.035,opacity:.5}],orange:[{points:[[-.035,.71],[-.09,.55],[-.045,.37],[-.075,.22]],width:.067,opacity:.9},{points:[[.04,.72],[.105,.55],[.065,.35],[.09,.19]],width:.067,opacity:.9},{points:[[-.38,.68],[-.34,.53],[-.26,.4],[-.2,.29]],width:.062,opacity:.75},{points:[[.37,.68],[.33,.52],[.27,.39],[.21,.29]],width:.06,opacity:.74},{points:[[-.33,.54],[-.2,.565],[-.11,.46]],width:.048,opacity:.62},{points:[[.32,.535],[.19,.545],[.12,.46]],width:.045,opacity:.61},{points:[[-.55,.33],[-.7,.23],[-.93,.27]],width:.065,opacity:.64},{points:[[.55,.33],[.71,.23],[.94,.27]],width:.065,opacity:.64},{points:[[-.53,-.04],[-.71,-.12],[-.97,-.065]],width:.068,opacity:.69},{points:[[.53,-.04],[.72,-.1],[.97,-.045]],width:.062,opacity:.64}]};function I3(e){return Ghe[e.coat]}function Xhe(e,t){let r=(t+.045)/e.head[1],n=Math.max(0,1-(r/.8)**2)**3;return e.head[0]*(1+.025*Math.exp(-(((r+.12)/.82)**2))-.038*n)}var Zb=[{id:"heart",label:"\u5FC3\u5F62"},{id:"triangle",label:"\u5706\u89D2\u4E09\u89D2"},{id:"diamond",label:"\u83F1\u5F62"},{id:"round",label:"\u5706\u5F62"},{id:"square",label:"\u5706\u89D2\u65B9\u5F62"},{id:"capsule",label:"\u80F6\u56CA"}],pd=[{id:"coral",label:"\u73CA\u745A",color:"#E99589"},{id:"sage",label:"\u7070\u7EFF",color:"#A9BDA7"},{id:"lavender",label:"\u6DE1\u7D2B",color:"#BFB0D9"},{id:"cream",label:"\u5976\u6CB9",color:"#E8D8B8"},{id:"blue",label:"\u96FE\u84DD",color:"#A9C6D5"},{id:"ochre",label:"\u8D6D\u9EC4",color:"#D4AE65"}],e1=[{id:"none",label:"\u65E0\u773C\u955C"},{id:"gold",label:"\u91D1\u6846\u773C\u955C"},{id:"ink",label:"\u9ED1\u6846\u773C\u955C"}],t1=[{id:"none",label:"\u65E0\u5E3D\u5B50"},{id:"beanie",label:"\u9488\u7EC7\u5E3D"},{id:"beret",label:"\u8D1D\u96F7\u5E3D"}];function zq(e){return"kind"in e&&e.kind==="dog"}function r1(e){return e==="plush-dog:v1:shiba:red-scarf"?{version:1,kind:"dog",breed:"shiba",scarf:"red"}:null}function M3(e){return"kind"in e&&e.kind==="cat"}function n1(e){return e==="plush-cat:v1:silver"?{version:1,kind:"cat",coat:"silver"}:e==="plush-cat:v1:orange"?{version:1,kind:"cat",coat:"orange"}:null}function K2(e){let t=Hhe(e);return r1(t)??n1(t)??i1({...e,avatar:t})}function W2(e,t){return e.some(r=>r.id===t)}function S0(e){let t=e.split(":");if(t.length!==6||t[0]!=="plush"||t[1]!=="v1")return null;let[,,r,n,a,o]=t;return!W2(Zb,r)||!W2(pd,n)||!W2(e1,a)||!W2(t1,o)?null:{version:1,shape:r,color:n,glasses:a,hat:o}}function H3(e){let t=`plush:v${e.version}:${e.shape}:${e.color}:${e.glasses}:${e.hat}`;if(!S0(t))throw new Error("\u6BDB\u7ED2\u5934\u50CF\u914D\u7F6E\u65E0\u6548\u3002");return t}function Qhe(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t=Math.imul(t^e.charCodeAt(r),16777619);return t=Math.imul(t^t>>>16,2246822507),t=Math.imul(t^t>>>13,3266489909),(t^t>>>16)>>>0}function a1({id:e,name:t}){let r=(e??"").trim()||(t??"").trim()||"member",n=(a,o)=>o[Qhe(`plush:v1:${r}:${a}`)%o.length].id;return{version:1,shape:n("shape",Zb),color:n("color",pd),glasses:n("glasses",e1),hat:n("hat",t1)}}function i1(e){let t=e.avatar??"";return t.startsWith("data:image/")||/^cat:\d+$/.test(t)?null:S0(t)??a1(e)}var ft=B(Ee(),1),V2=ef.plushAvatarChunkSrc,Lq=3,Hq=1,Yhe=[750,2e3],Qb=null,T3=!1,Aq=0,E0=new Set,mn={status:"idle",assetPath:V2.split("?")[0],attempts:0,cycleAttempts:0,maxCycleAttempts:Lq,onlineRecoveries:0,maxOnlineRecoveries:Hq,startedAt:0,finishedAt:0};globalThis.__wandPlushLoaderDiagnostics=()=>({...mn});function Jhe(){return new Promise((e,t)=>{let r=document.createElement("script"),n=!1,a=u=>{n||(n=!0,window.clearTimeout(o),r.onload=r.onerror=null,u?(r.remove(),t(u)):e(globalThis.__wandPlushRuntime))},o=window.setTimeout(()=>a("timeout"),15e3);r.async=!0,r.onload=()=>a(globalThis.__wandPlushRuntime?void 0:"loaded-missing-runtime"),r.onerror=()=>a("download");let l=mn.attempts<=1?V2:`${V2}${V2.includes("?")?"&":"?"}wandPlushRetry=${mn.attempts}`;try{r.src=l,document.head.append(r)}catch{a("download")}})}function Zhe(){let e=globalThis;return e.__wandPlushRuntime?(mn.status="ready",mn.failure=void 0,Promise.resolve(e.__wandPlushRuntime)):Qb||(T3?Promise.reject(mn.failure):(mn.status="loading",mn.startedAt=Date.now(),mn.finishedAt=0,mn.cycleAttempts=0,Qb=(async()=>{for(let t=0;t<Lq;t++){if(t&&await new Promise(r=>window.setTimeout(r,Yhe[t-1])),e.__wandPlushRuntime)return mn.status="ready",mn.failure=void 0,mn.finishedAt=Date.now(),e.__wandPlushRuntime;mn.attempts++,mn.cycleAttempts++;try{let r=await Jhe();return mn.status="ready",mn.failure=void 0,mn.finishedAt=Date.now(),r}catch(r){mn.failure=r==="timeout"||r==="loaded-missing-runtime"?r:"download"}}throw T3=!0,mn.status="failed",mn.finishedAt=Date.now(),mn.failure})().finally(()=>{Qb=null}),Qb))}function qq(e){if(Qb||mn.status!=="failed"||!E0.size||e&&Aq>=Hq)return!1;e&&(mn.onlineRecoveries=++Aq),T3=!1;for(let t of E0)t();return!0}var Bq=()=>{qq(!0)};function e0e(){return qq(!1)}var t0e=2500,Wq=650,r0e=1e3,U2=!1,k0=!1,G2=!1,j3=0,Vq=0,D3=!1,df=new Set;function Iq(){document.hidden||q3()}function q3(){if(k0)return;if(!df.size){G2=!1;return}if(document.hidden){document.addEventListener("visibilitychange",Iq,{once:!0});return}if(D3)return;D3=!0;let e=()=>{if(D3=!1,k0)return;if(!df.size){G2=!1;return}if(document.hidden){document.addEventListener("visibilitychange",Iq,{once:!0});return}k0=!0;let t=[...df];df.clear();for(let r of t)r()};typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e,{timeout:r0e}):window.setTimeout(e,0)}function _3(){U2||(U2=!0,window.clearTimeout(j3),j3=0,window.removeEventListener("load",_3),Vq=window.setTimeout(q3,Wq))}function n0e(){if(!(k0||G2||!df.size)){if(G2=!0,U2||document.readyState==="complete"){U2=!0,Vq=window.setTimeout(q3,Wq);return}window.addEventListener("load",_3,{once:!0}),j3=window.setTimeout(_3,Math.max(0,t0e-performance.now()))}}function a0e(e){return k0?(e(),()=>{}):(df.add(e),n0e(),()=>{df.delete(e)})}var Uq=__wandCssTextPool[9],i0e={heart:"M50 84C42 80 13 61 13 35C13 13 37 9 50 27C63 9 87 13 87 35C87 61 58 80 50 84Z",triangle:"M42 20Q50 7 58 20L86 68Q95 86 76 87H24Q5 86 14 68Z",diamond:"M41 15Q50 6 59 15L85 41Q94 50 85 59L59 85Q50 94 41 85L15 59Q6 50 15 41Z",round:"M88 50A38 38 0 1 1 12 50A38 38 0 1 1 88 50Z",square:"M32 14H68Q86 14 86 32V68Q86 86 68 86H32Q14 86 14 68V32Q14 14 32 14Z",capsule:"M50 9Q79 9 79 39V61Q79 91 50 91Q21 91 21 61V39Q21 9 50 9Z"};function Gq({config:e}){let t=Fs.useId();if(zq(e))return(0,ft.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ft.jsx)("path",{d:"M17 42L21 9Q23 4 28 10L43 28H57L72 10Q77 4 79 9L83 42V65Q83 84 50 85Q17 84 17 65Z",fill:"#cb803f"}),(0,ft.jsx)("path",{d:"M24 17L27 35L36 30ZM76 17L73 35L64 30Z",fill:"#eebf90"}),(0,ft.jsx)("path",{d:"M18 58Q30 58 37 47Q50 43 63 47Q70 58 82 58V65Q82 81 50 82Q18 81 18 65",fill:"#fff0da"}),(0,ft.jsx)("ellipse",{cx:"35",cy:"45",rx:"4",ry:"5",fill:"#29201b"}),(0,ft.jsx)("ellipse",{cx:"65",cy:"45",rx:"4",ry:"5",fill:"#29201b"}),(0,ft.jsx)("path",{d:"M44 58Q50 55 56 58Q57 63 50 65Q43 63 44 58Z",fill:"#29201b"}),(0,ft.jsx)("path",{d:"M50 65v4m-10 0q10 9 20 0",fill:"none",stroke:"#66402b",strokeWidth:"2",strokeLinecap:"round"}),(0,ft.jsx)("path",{d:"M24 77Q50 87 76 77L78 86Q50 97 22 86Z",fill:"#c43f3b"}),(0,ft.jsx)("path",{d:"M62 83L77 86L73 98L60 93Z",fill:"#ae302d"})]});if(M3(e)){let n=e.coat==="silver",a=I3(e),{coat:o,dark:l,pale:u,iris:d,innerEar:p,nose:m}=a,v=E=>50+E*36,g=E=>50-E*36,b=[];for(let E of[-1,1])for(let S=0;S<=48;S++){let F=(E<0?S:48-S)/48*Math.PI,$=Math.cos(F)*a.head[1]-.045,C=!n&&$<.2&&$>-.55&&S%3===0?.035:0;b.push([v(E*(Math.sin(F)*Xhe(a,$)+C)),g($)])}let x=b.map(([E,S],F)=>`${F?"L":"M"}${E} ${S}`).join(" ")+"Z",y=E=>Array.from({length:65},(S,F)=>{let $=F/64*Math.PI*2,C=Math.cos($),D=Math.sin($);return`${F?"L":"M"}${v(E*a.eyeX+C*a.eyeWidth)} ${g(a.eyeY+Math.sign(D)*Math.pow(Math.abs(D),.82)*(D>=0?a.eyeUpper:a.eyeLower)+E*C*.018)}`}).join(" ")+"Z";return(0,ft.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ft.jsxs)("defs",{children:[(0,ft.jsx)("clipPath",{id:t,children:(0,ft.jsx)("path",{d:x})}),(0,ft.jsxs)("radialGradient",{id:`${t}-jaw`,cx:"50",cy:g(a.chinY),r:a.chinWidth*56,gradientUnits:"userSpaceOnUse",children:[(0,ft.jsx)("stop",{offset:"0",stopColor:u}),(0,ft.jsx)("stop",{offset:".65",stopColor:u,stopOpacity:".97"}),(0,ft.jsx)("stop",{offset:"1",stopColor:u,stopOpacity:".86"})]})]}),[-1,1].map(E=>(0,ft.jsxs)("g",{transform:`translate(${v(E*a.earX)} ${g(a.earY)}) rotate(${E*16})`,children:[(0,ft.jsx)("path",{d:"M-.18 -.93 Q0 -1.22 .18 -.93 L.87 .48 Q1.03 .8 .66 .83 Q0 .92 -.66 .83 Q-1.03 .8 -.87 .48Z",transform:`scale(${a.ear[0]*36} ${a.ear[1]*36})`,fill:o}),(0,ft.jsx)("path",{d:"M-.18 -.93 Q0 -1.22 .18 -.93 L.87 .48 Q1.03 .8 .66 .83 Q0 .92 -.66 .83 Q-1.03 .8 -.87 .48Z",transform:`translate(0 .7) scale(${a.ear[0]*21} ${a.ear[1]*23})`,fill:p})]},E)),(0,ft.jsx)("path",{d:x,fill:o}),(0,ft.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,ft.jsx)("path",{d:n?"M16 63Q25 57 32 57Q35 53 44 53Q50 51 56 53Q65 53 68 57Q75 57 84 63L78 94H22Z":"M10 64Q24 61 28 62Q34 64 40 54Q47 53 48 48Q49 40 52 45Q53 53 61 53Q63 61 76 62L89 66L82 94H16Z",fill:`url(#${t}-jaw)`}),Khe[e.coat].map((E,S)=>(0,ft.jsx)("path",{d:E.points.map(([F,$],C)=>`${C?"L":"M"}${v(F)} ${g($)}`).join(" "),fill:"none",stroke:l,strokeWidth:E.width*56,opacity:E.opacity,strokeLinecap:"round",strokeLinejoin:"round"},S))]}),[-1,1].map(E=>(0,ft.jsxs)("g",{children:[(0,ft.jsx)("path",{d:y(E),fill:d,stroke:"#354134",strokeWidth:".8"}),(0,ft.jsx)("ellipse",{cx:v(E*a.eyeX-E*.008),cy:g(a.eyeY),rx:a.pupilWidth*36,ry:a.pupilHeight*36,fill:"#152018"}),(0,ft.jsx)("ellipse",{cx:v(E*a.eyeX-.041),cy:g(a.eyeY+.048),rx:".54",ry:".75",fill:"#f5f2df"}),(n?[0,1,2]:[0,1,2,3]).map(S=>(0,ft.jsx)("path",{"data-whisker":n?"straight":"curly",d:n?`M${v(E*.18)} ${g(a.muzzleY-S*.013)}Q${v(E*.63)} ${g(a.muzzleY+.115-S*.074)} ${v(E*(.97+S%2*.09))} ${g(a.muzzleY+.19-S*.143)}`:Uhe(S,E,a.muzzleY),fill:"none",stroke:"#eae5d8",strokeWidth:n?".3":".36"},S))]},E)),(0,ft.jsx)("path",{d:`M${v(-a.noseWidth)} ${g(a.noseY+a.noseHeight*.4)}Q50 ${g(a.noseY+a.noseHeight*.65)} ${v(a.noseWidth)} ${g(a.noseY+a.noseHeight*.4)}L50 ${g(a.noseY-a.noseHeight*.7)}Z`,fill:m,stroke:"#665344",strokeWidth:".45"}),(0,ft.jsx)("path",{d:`M50 ${g(a.noseY-a.noseHeight*.6)}V${g(a.mouthY+.035)}m-4 1q4-1 8 0`,fill:"none",stroke:"#665344",strokeWidth:".6",strokeLinecap:"round"})]})}let r=pd.find(n=>n.id===e.color)?.color??"#ecb6a3";return(0,ft.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ft.jsx)("path",{d:i0e[e.shape],fill:r}),(0,ft.jsx)("ellipse",{cx:"38",cy:"51",rx:"2.6",ry:"4",fill:"#25211e"}),(0,ft.jsx)("ellipse",{cx:"62",cy:"51",rx:"2.6",ry:"4",fill:"#25211e"}),(0,ft.jsx)("path",{d:"M45 62Q50 68 55 62",fill:"none",stroke:"#25211e",strokeWidth:"2.3",strokeLinecap:"round"}),e.glasses!=="none"?(0,ft.jsxs)("g",{fill:"none",stroke:e.glasses==="gold"?"#a88143":"#302d29",strokeWidth:e.glasses==="gold"?1.4:2.2,children:[(0,ft.jsx)("circle",{cx:"38",cy:"50",r:"10"}),(0,ft.jsx)("circle",{cx:"62",cy:"50",r:"10"}),(0,ft.jsx)("path",{d:"M48 49Q50 47 52 49M28 48H18M72 48H82"})]}):null,e.hat==="beanie"?(0,ft.jsxs)("g",{fill:"#b96843",children:[(0,ft.jsx)("path",{d:"M23 28Q24 2 50 2Q76 2 77 28Z"}),(0,ft.jsx)("rect",{x:"20",y:"21",width:"60",height:"10",rx:"4"}),(0,ft.jsx)("circle",{cx:"50",cy:"4",r:"7"})]}):null,e.hat==="beret"?(0,ft.jsxs)("g",{fill:"#e9dfca",children:[(0,ft.jsx)("ellipse",{cx:"51",cy:"19",rx:"33",ry:"12",transform:"rotate(12 51 19)"}),(0,ft.jsx)("path",{d:"M54 9L55 3",stroke:"#d4c6a9",strokeWidth:"4"})]}):null]})}function W3({config:e,size:t=32,className:r=""}){return Fs.useEffect(()=>{ba("wand-plush-avatar-styles",Uq)},[]),(0,ft.jsx)("span",{className:`wand-plush-avatar ${r}`.trim(),"data-plush-avatar":"","data-avatar-config":JSON.stringify(e),"data-renderer":"static","aria-hidden":"true",style:{width:t,height:t},children:(0,ft.jsx)(Gq,{config:e})})}function F0({config:e,size:t=32,className:r="",speaking:n=!1,thinking:a=!1,loading:o=!1,fileActivity:l="idle",interactive:u=!1,onRendererChange:d}){let p=Fs.useRef(null),m=Fs.useRef(null),v=ga(),[g,b]=Fs.useState("deferred"),[x,y]=Fs.useState("static"),[E,S]=Fs.useState(),F=JSON.stringify(e),$=Fs.useRef({config:e,size:t,speaking:n,thinking:a,fileActivity:l,interactive:u,reducedMotion:v}),C=Fs.useRef(d);return C.current=d,$.current={config:e,size:t,speaking:n,thinking:a,fileActivity:l,interactive:u,reducedMotion:v},Fs.useEffect(()=>{ba("wand-plush-avatar-styles",Uq);let D=p.current;if(!D)return;let I=!0,M=!1,A=!1,j="",P=null,O=null,V=null,W=(L,U)=>{let Y=`${L}:${U??""}`;j!==Y&&(j=Y,C.current?.(L,U))},H=()=>{!I||M||m.current||(M=!0,A=!1,V?.disconnect(),b("loading"),y("static"),S(void 0),W("loading"),Zhe().then(L=>{M=!1,I&&(m.current=L.attach(D,$.current,(U,Y,X)=>{I&&(b(U),y(Y),S(X),W(U,X))}))},()=>{M=!1,A=!0,I&&(b("fallback"),y("fallback"),S("runtime-load"),W("fallback","runtime-load"))}))},q=()=>{if(!(!I||M||m.current)){if(O?.(),O=null,document.hidden){let L=()=>{document.hidden||(document.removeEventListener("visibilitychange",L),O=null,q())};document.addEventListener("visibilitychange",L),O=()=>document.removeEventListener("visibilitychange",L);return}if(u||k0){H();return}P||(P=a0e(()=>{P=null,H()}))}};V=new IntersectionObserver(L=>{if(L.some(U=>U.isIntersecting)){q();return}P?.(),P=null},{rootMargin:"48px"}),V.observe(D);let z=()=>{A&&H()};return E0.size||window.addEventListener("online",Bq),E0.add(z),()=>{E0.delete(z),E0.size||window.removeEventListener("online",Bq),I=!1,V?.disconnect(),P?.(),P=null,O?.(),O=null,m.current?.dispose(),m.current=null}},[]),Fs.useEffect(()=>{m.current?.update($.current)},[F,t,n,a,l,u,v]),(0,ft.jsxs)("span",{className:`wand-plush-avatar ${r}`.trim(),"data-plush-avatar":"","data-avatar-config":F,"data-avatar-breed":M3(e)?I3(e).breed:void 0,"data-file-activity":l,"data-renderer":g,"data-render-state":x,"data-fallback-reason":E,title:g==="fallback"?E==="webgl-unavailable"?"\u9759\u6001\u5934\u50CF \xB7 \u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 3D":E==="runtime-load"?"\u9759\u6001\u5934\u50CF \xB7 3D \u7EC4\u4EF6\u672A\u80FD\u52A0\u8F7D":"\u9759\u6001\u5934\u50CF \xB7 3D \u6682\u4E0D\u53EF\u7528":void 0,"aria-hidden":"true",style:{width:t,height:t},children:[g==="webgl"?null:(0,ft.jsx)(Gq,{config:e}),(0,ft.jsx)("canvas",{ref:p,width:t,height:t}),l!=="idle"?(0,ft.jsx)(Oq,{activity:l,pawColor:M3(e)?I3(e).coat:zq(e)?"#cb803f":pd.find(D=>D.id===e.color)?.color??"#ecb6a3"}):o||a||g==="loading"?(0,ft.jsx)(C0,{}):null]})}var Yb=[{name:"\u6A58\u732B",base:"#F0923A",dark:"#C46A1A",light:"#F0923A"},{name:"\u94F6\u6E10\u5C42",base:"#9EAAB8",dark:"#6B7B8D",light:"#C5CED8",eye:"#3F8F55"},{name:"\u5976\u725B\u732B",base:"#F4F1EA",dark:"#2F2F33",light:"#F4F1EA"},{name:"\u9ED1\u732B",base:"#3A3A40",dark:"#1E1E22",light:"#55555C",eye:"#E9C63F"},{name:"\u66B9\u7F57",base:"#E9DCC4",dark:"#6B4A36",light:"#F4ECDD",eye:"#3F7FD8"},{name:"\u84DD\u732B",base:"#7C8BA6",dark:"#56627A",light:"#98A6BE",eye:"#E0A43A"},{name:"\u4E09\u82B1",base:"#F2E6D4",dark:"#C46A1A",light:"#3A3A40"},{name:"\u6A31\u7C89",base:"#F2B8C6",dark:"#C9788D",light:"#F8D3DC"}],en="";function o0e(e){let t=Yb[e%Yb.length],r=t.base,n=t.dark,a=t.light??t.base,o="#FFFFFF",l=t.eye??"#2D2D2D",u="#F28B9A";return[[en,n,en,en,en,en,en,en,n,en],[n,r,n,en,en,en,en,n,r,n],[n,r,r,r,r,r,r,r,r,n],[r,r,o,l,r,r,o,l,r,r],[r,r,o,o,r,r,o,o,r,r],[r,r,r,r,u,u,r,r,r,r],[r,n,r,a,r,r,a,r,n,r],[en,r,r,r,r,r,r,r,r,en],[en,en,r,n,r,r,n,r,en,en],[en,en,en,r,en,en,r,en,en,en]]}function Kq(e,t){let r=0;for(let n=0;n<e.length;n+=1)r=(r<<5)-r+e.charCodeAt(n)|0;return Math.abs(r)%t}function Xq(e){let t=/^cat:(\d+)$/.exec(e.avatar??"");return t?Number(t[1])%Yb.length:Kq(e.id||e.name||"member",Yb.length)}var s0e="#FFFFFF",Mq=[{name:"\u8D6D\u6A59",from:"#A8471F",to:"#7E3214"},{name:"\u6E56\u84DD",from:"#2F6DB5",to:"#1F4E8A"},{name:"\u677E\u7EFF",from:"#2E7D5B",to:"#1C5B41"},{name:"\u7D2B\u68E0",from:"#6B4EA8",to:"#4F3883"},{name:"\u975B\u9752",from:"#2C6E7F",to:"#1B4F5E"},{name:"\u7EDB\u7EA2",from:"#B03A48",to:"#872633"},{name:"\u82A5\u9EC4",from:"#8A6A16",to:"#674D0D"},{name:"\u77F3\u9752",from:"#4A5B8C",to:"#34426A"}],l0e=/^cat:(\d+)$/;function u0e({id:e,name:t}){return(e??"").trim()||(t??"").trim()||"member"}function c0e({id:e,name:t}){let r=(t??"").trim()||(e??"").trim(),n=Array.from(r)[0]??"";return n?/^[a-z]$/.test(n)?n.toUpperCase():n:"?"}function o1(e){let t=Mq[Kq(u0e(e),Mq.length)];return{from:t.from,to:t.to,text:s0e,glyph:c0e(e)}}function X2(e){return{background:`linear-gradient(135deg, ${e.from}, ${e.to})`,color:e.text}}function Qq(e){let t=e.avatar??"";return t.startsWith("data:image/")?{kind:"upload",src:t}:!e.id&&!e.name?null:l0e.test(t)?{kind:"cat",coat:Xq({id:e.id??"",name:e.name??"",avatar:t})}:{kind:"generated",face:o1(e)}}var la=B(Ee(),1);function Yq({coat:e}){let t=o0e(e),r=new Map;for(let n=0;n<t.length;n+=1){let a=t[n];for(let o=0;o<a.length;o+=1){let l=a[o];if(!l)continue;let u=r.get(l);u?u.push(`M${o} ${n}h1v1h-1z`):r.set(l,[`M${o} ${n}h1v1h-1z`])}}return(0,la.jsx)("svg",{className:"wand-team-avatar-cat",width:"74%",height:"74%",viewBox:"0 0 10 10",shapeRendering:"crispEdges","aria-hidden":"true",children:[...r].map(([n,a])=>(0,la.jsx)("path",{d:a.join(""),fill:n},n))})}function Q2({face:e,size:t}){return(0,la.jsx)("span",{className:"wand-generated-avatar-glyph","aria-hidden":"true",style:{display:"block",fontSize:Math.max(10,Math.round(t*.42)),fontWeight:600,lineHeight:1,color:e.text},children:e.glyph})}function Y2(e,t){let r=r1(e.avatar??"")??n1(e.avatar??"")??S0(e.avatar??"");if(r)return{style:{background:"transparent"},icon:(0,la.jsx)(F0,{config:r,size:t})};let n=Qq(e)??{kind:"generated",face:o1(e)};return n.kind==="upload"?{src:n.src}:n.kind==="cat"?{icon:(0,la.jsx)(Yq,{coat:n.coat})}:{style:X2(n.face),icon:(0,la.jsx)(Q2,{face:n.face,size:t})}}function Jq({member:e,size:t="md",state:r="idle",showProvider:n=!1,className:a}){let o={sm:36,md:48,lg:56}[t],l=r==="done"?"var(--success)":r==="failed"?"var(--danger)":r==="waiting"?"var(--warning)":r==="working"?"var(--info)":void 0,u=e.employeeId?K2({...e,id:e.employeeId}):null,d=u?{style:{background:"transparent"},icon:(0,la.jsx)(F0,{config:u,size:o})}:Y2(e,o);return(0,la.jsx)(Bt,{children:(0,la.jsx)(Ci,{className:Je("wand-team-avatar",a),"data-size":t,"data-state":r==="idle"?void 0:r,"data-leader":e.isLeader||void 0,title:e.name,offset:[-o/2,-4],count:e.isLeader?(0,la.jsx)("span",{"aria-hidden":"true",style:{color:"var(--warning)"},children:"\u265B"}):void 0,children:(0,la.jsx)(Ci,{offset:[0,o],count:r==="done"?(0,la.jsx)(ki,{size:16,style:{background:l},icon:(0,la.jsx)("span",{children:"\u2713"})}):n?(0,la.jsx)(ki,{size:18,shape:"square",icon:(0,la.jsx)(wl,{provider:e.agent.provider})}):void 0,children:(0,la.jsx)(ki,{shape:"square",size:o,src:d.src,style:{...d.style,outline:l?`2px solid ${l}`:void 0,outlineOffset:1},icon:d.icon})})})})}function d0e({members:e,max:t=5,size:r="sm"}){let n=[...e].sort((a,o)=>Number(o.isLeader)-Number(a.isLeader));return(0,la.jsx)(Bt,{children:(0,la.jsx)(ki.Group,{className:"wand-team-avatar-stack","data-size":r,max:{count:t},children:n.map((a,o)=>(0,la.jsx)(Jq,{member:a,size:r},a.id||o))})})}async function V3(e,t){let r=URL.createObjectURL(e);try{let n=await new Promise((d,p)=>{let m=new Image;m.onload=()=>d(m),m.onerror=()=>p(new Error("\u56FE\u7247\u8BFB\u53D6\u5931\u8D25\u3002")),m.src=r}),a=document.createElement("canvas");a.width=96,a.height=96;let o=a.getContext("2d");if(!o)throw new Error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u56FE\u7247\u88C1\u526A\u3002");let l=Math.min(n.naturalWidth,n.naturalHeight);o.drawImage(n,(n.naturalWidth-l)/2,(n.naturalHeight-l)/2,l,l,0,0,96,96);let u=a.toDataURL("image/jpeg",.8);if(u.length>t)throw new Error("\u56FE\u7247\u592A\u5927\uFF0C\u8BF7\u6362\u4E00\u5F20\u3002");return u}finally{URL.revokeObjectURL(r)}}var U3="\u6211",p0e=6e4,f0e=/^data:image\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$/,m0e=/^cat:(\d{1,2})$/,Zq=24;function eW(e){return typeof e=="string"?e.trim():""}function h0e(e){return m0e.test(e)||f0e.test(e)||!!(S0(e)??n1(e)??r1(e))}function g0e(e){let t=eW(e);return!t||t.length<=p0e&&h0e(t)?t:""}function G3(e){if(!e||typeof e!="object")return;let t=e,r=eW(t.name).slice(0,Zq),n=g0e(t.avatar);if(!(!r&&!n))return{...r?{name:r}:{},...n?{avatar:n}:{}}}function ya(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function $0(e){return ya(e)?e:{}}function Ke(e,t=""){return typeof e=="string"?e:t}function Pa(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}async function $s(e){try{let t=await e.json();return ya(t)?t:{error:"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}catch(t){if(t instanceof Error&&t.name==="AbortError")throw t;return{error:e.ok?"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002":`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`}}}var tW={sessions:"sessions","structured-sessions":"sessions",commands:"sessions","session-list":"sessions","session-directories":"sessions",conversations:"conversations","wand-tasks":"tasks","wand-task-agent-defaults":"tasks",tasks:"tasks","workspace-tasks":"tasks",workspaces:"tasks","wand-milestones":"tasks",missions:"tasks","scheduled-tasks":"tasks",files:"files",upload:"files",directory:"files","session-files":"files","file-preview":"files","file-read":"files","file-write":"files","recent-paths":"files",settings:"settings",config:"settings","user-profile":"settings","auto-update":"settings","update-channel":"settings",models:"models","model-groups":"models","local-models":"models",login:"authentication",logout:"authentication","app-login":"authentication","session-check":"authentication","set-password":"authentication",update:"server_update","update-status":"server_update","check-update":"server_update","android-apk-update":"app_update","android-apk":"app_update","macos-app-update":"app_update","macos-dmg-update":"app_update","macos-dmg":"app_update","ios-ipa-update":"app_update","ios-ipa":"app_update","provider-cli-updates":"provider_update","daemon-maintenance":"daemon_update","storage-cleanup":"storage",git:"repository",github:"repository"};function v0e(e){let t=e.split("?")[0].split("/")[2]??"";return Object.prototype.hasOwnProperty.call(tW,t)?tW[t]:"api"}function K3(e){let t;try{t=new URL(e,"https://wand.invalid").pathname}catch{return"api"}return v0e(t)}var rW=null,s1=new Map,X3=0;function Y3(e){rW=e}function b0e(e,t){let r=new TextEncoder;return r.encode(e).length<=t?e:new TextDecoder().decode(r.encode(e).subarray(0,t-3)).replace(/\uFFFD$/,"")+"\u2026"}function Q3(e,t){return b0e(e.replace(/\b(Bearer|Basic)\s+[^\s"',;]+/gi,"$1 [REDACTED]").replace(/((?:authorization|cookie|set-cookie)\s*:\s*)[^\r\n]+/gi,"$1[REDACTED]").replace(/(["']?(?:password|passwd|api[_-]?key|access[_-]?token|refresh[_-]?token|token|secret)["']?\s*[:=]\s*)(?:"[^"\r\n]*"|'[^'\r\n]*'|[^\s&,;\r\n}]+)/gi,"$1[REDACTED]").replace(/(https?:\/\/)[^\s/@]+:[^\s/@]+@/gi,"$1[REDACTED]@"),t)}function Nu(e,t,r){try{let n=rW;if(!n||!n.ready()||!n.secure()||X3>=2||!(t instanceof Error)&&typeof t!="string"||t instanceof Error&&(t.name==="AbortError"||t.name==="CancellationError"))return;let a=t instanceof Error?t.name:"Error",o=r??(e==="update_failed"?"server_update":e==="websocket_error"?"realtime":e==="http_5xx"?"api":e==="startup_failed"?"startup":"runtime"),l=`${o}:${e}:${a}`,u=Date.now();if(u-(s1.get(l)??0)<5*6e4)return;s1.size>=32&&s1.delete(s1.keys().next().value),s1.set(l,u);let d=n.version(),p={schema:1,source:"web",event:e,feature:o,version:/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]{1,80})?$/.test(d)?d:"0.0.0",error:{name:Q3(a,128),message:Q3(t instanceof Error?t.message:t,8192),stack:Q3(t instanceof Error?t.stack??"":"",16384)}};if(new TextEncoder().encode(JSON.stringify(p)).length>32768)return;X3++,Promise.resolve().then(()=>n.fetch("/api/feedback/client",{method:"POST",credentials:"same-origin",redirect:"error",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),signal:AbortSignal.timeout(3e3)})).then(m=>m.body?.cancel()).catch(()=>{}).finally(()=>{X3--})}catch{}}function J3(e){let t=n=>{n.error instanceof Error&&Nu("uncaught_exception",n.error)},r=n=>Nu("unhandled_rejection",n.reason);return e.addEventListener("error",t),e.addEventListener("unhandledrejection",r),()=>{e.removeEventListener("error",t),e.removeEventListener("unhandledrejection",r)}}var Ra=class extends Error{constructor(e,t,r){super(e),ie(this,"status",t),this.name="HttpResponseError",t>=500&&Nu("http_5xx",this,r)}};function Z3(){let e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();if(typeof e?.getRandomValues!="function")throw new Error("\u5F53\u524D\u6D4F\u89C8\u5668\u65E0\u6CD5\u751F\u6210\u8BF7\u6C42\u6807\u8BC6\uFF0C\u8BF7\u4F7F\u7528\u652F\u6301\u5B89\u5168\u968F\u673A\u6570\u7684\u6D4F\u89C8\u5668\u3002");let t=e.getRandomValues(new Uint8Array(16));t[6]=t[6]&15|64,t[8]=t[8]&63|128;let r=Array.from(t,n=>n.toString(16).padStart(2,"0"));return`${r.slice(0,4).join("")}-${r.slice(4,6).join("")}-${r.slice(6,8).join("")}-${r.slice(8,10).join("")}-${r.slice(10).join("")}`}async function jt(e){let t;try{t=await e.json()}catch(n){throw n instanceof Error&&n.name==="AbortError"?n:new Ra(e.ok?"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002":`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`,e.status,K3(e.url))}let r=ya(t)&&typeof t.error=="string"?t.error:"";if(!e.ok||r)throw new Ra(r||`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`,e.status,K3(e.url));if(t===null||typeof t!="object")throw new Ra("\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002",e.status,K3(e.url));return t}async function mt(e,t){let r;try{r=await fetch(e,t)}catch(n){throw n instanceof Error&&n.name==="AbortError"?n:new Ra("\u65E0\u6CD5\u8FDE\u63A5\u670D\u52A1\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u786E\u8BA4 Wand \u670D\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u7136\u540E\u91CD\u8BD5\u3002",0)}return jt(r)}function tn(e,t="POST"){return{method:t,headers:{"content-type":"application/json"},body:JSON.stringify(e)}}var J2=B(Ee(),1);function Pu({className:e,style:t}){return(0,J2.jsxs)("svg",{className:e,style:{width:24,height:24,flexShrink:0,...t},viewBox:`0 0 ${Ko.viewport} ${Ko.viewport}`,"aria-hidden":"true",focusable:"false","data-wand-brand":"pixel-cat",children:[(0,J2.jsx)("rect",{width:Ko.viewport,height:Ko.viewport,rx:"24",fill:Ko.background}),(0,J2.jsx)("g",{transform:`translate(${Ko.inset} ${Ko.inset})`,children:Ko.paths.map(({fill:r,d:n})=>(0,J2.jsx)("path",{fill:r,d:n},r))})]})}var e$=B(Ee(),1);function je({className:e,kind:t="secondary",size:r="medium",type:n="button",ref:a,...o}){return(0,e$.jsx)(Bt,{children:(0,e$.jsx)(Ui,{...o,ref:a,htmlType:n,type:t==="soft"?void 0:t==="primary"||t==="danger"?"primary":t==="ghost"?"text":"default",color:t==="soft"?"default":void 0,danger:t==="danger",variant:t==="soft"?"filled":void 0,size:r==="medium"?"middle":r,className:Je("wand-ui-button",`wand-ui-button-${t}`,r!=="medium"&&`wand-ui-button-${r}`,e)})})}function Fr({className:e,kind:t="ghost",size:r="small",children:n,...a}){return(0,e$.jsx)(je,{...a,kind:t,size:r,className:Je("wand-ui-icon-button",e),children:n})}var nW=B(_()),y0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},w0e=y0e;function t$(){return t$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t$.apply(this,arguments)}var x0e=(e,t)=>nW.createElement(Zt,t$({},e,{ref:t,icon:w0e})),E0e=nW.forwardRef(x0e),r$=E0e;var aW=B(_()),k0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},C0e=k0e;function n$(){return n$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n$.apply(this,arguments)}var S0e=(e,t)=>aW.createElement(Zt,n$({},e,{ref:t,icon:C0e})),F0e=aW.forwardRef(S0e),a$=F0e;var iW=B(_()),$0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},D0e=$0e;function i$(){return i$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i$.apply(this,arguments)}var A0e=(e,t)=>iW.createElement(Zt,i$({},e,{ref:t,icon:D0e})),B0e=iW.forwardRef(A0e),o$=B0e;var oW=B(_()),I0e={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},M0e=I0e;function s$(){return s$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s$.apply(this,arguments)}var T0e=(e,t)=>oW.createElement(Zt,s$({},e,{ref:t,icon:M0e})),j0e=oW.forwardRef(T0e),fd=j0e;var wn=B(_()),Z2=(e,t,r)=>({background:e,[`${r}-icon`]:{color:t}}),_0e=e=>{let{componentCls:t,motionDurationSlow:r,marginXS:n,marginSM:a,fontSize:o,fontSizeLG:l,lineHeight:u,motionEaseInOutCirc:d,borderRadius:p,withDescriptionIconSize:m,colorText:v,colorTextHeading:g,withDescriptionPadding:b,defaultPadding:x,lineWidth:y,lineType:E,colorSuccessBorder:S,colorWarningBorder:F,colorErrorBorder:$,colorInfoBorder:C}=e;return{[t]:{...Tt(e),position:"relative",display:"flex",alignItems:"center",padding:x,wordWrap:"break-word",borderRadius:p,borderWidth:ue(y),borderStyle:E,[`&${t}-success`]:{borderColor:S},[`&${t}-info`]:{borderColor:C},[`&${t}-warning`]:{borderColor:F},[`&${t}-error`]:{borderColor:$},[`&${t}-filled`]:{borderColor:"transparent"},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:n,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:u},"&-title":{color:g},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(D=>`${D} ${r} ${d}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0},[`&${t}-with-description`]:{alignItems:"flex-start",padding:b,[`${t}-icon`]:{marginInlineEnd:a,fontSize:m,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:n,color:g,fontSize:l},[`${t}-description`]:{display:"block",color:v}},[`&${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}}},N0e=e=>{let{componentCls:t,colorSuccess:r,colorSuccessBg:n,colorWarning:a,colorWarningBg:o,colorError:l,colorErrorBg:u,colorInfo:d,colorInfoBg:p}=e;return{[t]:{"&-success":Z2(n,r,t),"&-info":Z2(p,d,t),"&-warning":Z2(o,a,t),"&-error":{...Z2(u,l,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},P0e=e=>{let{componentCls:t,iconCls:r,motionDurationMid:n,marginXS:a,fontSizeIcon:o,colorIcon:l,colorIconHover:u}=e;return{[t]:{[`${t}-actions`]:{marginInlineStart:a},[`${t}-close-icon`]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:o,lineHeight:ue(o),backgroundColor:"transparent",border:"none",cursor:"pointer",...Xn(e),[`${r}-close`]:{color:l,transition:`color ${n}`,"&:hover":{color:u}}},"&-close-text":{color:l,transition:`color ${n}`,"&:hover":{color:u}}}}},R0e=e=>({borderRadius:e.borderRadiusLG,withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),O0e=pt("Alert",e=>[_0e(e),N0e(e),P0e(e)],R0e),z0e=e=>{let{icon:t,type:r,className:n,style:a,successIcon:o,infoIcon:l,warningIcon:u,errorIcon:d}=e;return wn.createElement("span",{className:n,style:a},t??{success:o??wn.createElement(o$,null),info:l??wn.createElement(r$,null),error:d??wn.createElement(Ab,null),warning:u??wn.createElement(a$,null)}[r])},L0e=e=>{let{isClosable:t,prefixCls:r,closeIcon:n,handleClose:a,ariaProps:o,className:l,style:u}=e,d=n===!0||n===void 0?wn.createElement(fd,null):n;return t?wn.createElement("button",{type:"button",onClick:a,className:Z(`${r}-close-icon`,l),tabIndex:0,style:u,...o},d):null},H0e=wn.forwardRef((e,t)=>{let{description:r,prefixCls:n,message:a,title:o,banner:l,className:u,rootClassName:d,style:p,onMouseEnter:m,onMouseLeave:v,onClick:g,afterClose:b,showIcon:x,closable:y,closeText:E,closeIcon:S,action:F,id:$,styles:C,classNames:D,...I}=e,M=o??a,[A,j]=wn.useState(!1),P=wn.useRef(null);wn.useImperativeHandle(t,()=>({nativeElement:P.current}));let{getPrefixCls:O,direction:V,variant:W,closable:H,closeIcon:q,className:z,style:L,classNames:U,styles:Y,successIcon:X,infoIcon:J,warningIcon:N,errorIcon:R}=xt("alert"),K=O("alert",n),[Q,ee]=O0e(K),{onClose:te,afterClose:ne}=kt(y)?y:{},me=qe=>{j(!0),(te??e.onClose)?.(qe)},se=wn.useMemo(()=>e.type!==void 0?e.type:l?"warning":"info",[e.type,l]),he=e.variant??W??"outlined",le=wn.useMemo(()=>kt(y)||E?!0:typeof y=="boolean"?y:S!==!1&&zr(S)?!0:!!H,[E,S,y,H]),ke=l&&x===void 0?!0:x,Ae={...e,prefixCls:K,variant:he,type:se,showIcon:ke,closable:le},de=Ge(L),ve=Ge(p),[ye,we]=Ct([U,D],[Y,de,C,ve],{props:Ae}),Oe=Z(K,`${K}-${se}`,`${K}-${he}`,{[`${K}-with-description`]:Lt(r),[`${K}-no-icon`]:!ke,[`${K}-banner`]:!!l,[`${K}-rtl`]:V==="rtl"},z,u,d,ye.root,ee,Q),Fe=ei(I,{aria:!0,data:!0}),$e=wn.useMemo(()=>kt(y)&&y.closeIcon?y.closeIcon:E||(S!==void 0?S:kt(H)&&H.closeIcon?H.closeIcon:q),[S,y,H,E,q]),Me=wn.useMemo(()=>{let qe=y??H;return kt(qe)?ei(qe,{data:!0,aria:!0}):{}},[y,H]);return wn.createElement(ra,{visible:!A,motionName:`${K}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:qe=>({maxHeight:qe.offsetHeight}),onLeaveEnd:ne??b},({className:qe,style:ze},Te)=>wn.createElement("div",{id:$,ref:fn(P,Te),"data-show":!A,className:Z(Oe,qe),style:{...we.root,...ze},onMouseEnter:m,onMouseLeave:v,onClick:g,role:"alert",...Fe},ke?wn.createElement(z0e,{className:Z(`${K}-icon`,ye.icon),style:we.icon,description:r,icon:e.icon,prefixCls:K,type:se,successIcon:X,infoIcon:J,warningIcon:N,errorIcon:R}):null,wn.createElement("div",{className:Z(`${K}-section`,ye.section),style:we.section},Lt(M)?wn.createElement("div",{className:Z(`${K}-title`,ye.title),style:we.title},M):null,Lt(r)?wn.createElement("div",{className:Z(`${K}-description`,ye.description),style:we.description},r):null),Lt(F)?wn.createElement("div",{className:Z(`${K}-actions`,ye.actions),style:we.actions},F):null,wn.createElement(L0e,{className:ye.close,style:we.close,isClosable:le,prefixCls:K,closeIcon:$e,handleClose:me,ariaProps:Me})))}),sW=H0e;function q0e(e,t,r){return t=Xc(t),Ux(e,fb()?Reflect.construct(t,r||[],Xc(e).constructor):t.apply(e,r))}var l$=B(_()),W0e=(function(e){function t(){var r;return xu(this,t),r=q0e(this,t,arguments),r.state={error:void 0,info:{}},r}return pb(t,e),Eu(t,[{key:"componentDidCatch",value:function(r,n){this.setState({error:r,info:n})}},{key:"render",value:function(){let{message:r,title:n,description:a,id:o,children:l}=this.props,{error:u,info:d}=this.state,p=n??r,m=d?.componentStack||null,v=zr(p)?p:u?.toString(),g=zr(a)?a:m;return u?l$.createElement(sW,{id:o,type:"error",title:v,description:l$.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},g)}):l}}])})(l$.PureComponent),V0e=W0e,lW=sW;lW.ErrorBoundary=V0e;var ri=lW;var U0e=2,G0e=8,K0e=4;function X0e(e){let t=e.engine==="sdk"?"|sdk":"";return`${e.provider}|${e.model}|${e.thinkingEffort}|${e.mode}|${e.kind}${t}`}var dW=6e4,Q0e=["running","awaiting_approval","waiting_user"];function pW(e,t){return Xo(t===void 0?e.agents?.[0]?.provider:t)}function fW(e,t){let r=yl(e,t);return e==="pi"&&(t==="sdk"||t==="core")?r:`${r} CLI`}var Y0e=__wandCssTextPool[10];function mW(){ba("wand-avatar-editor-styles",Y0e)}var Oa=B(_(),1),We=B(Ee(),1);function hd({employee:e,provider:t,engine:r,size:n="md",className:a="",renderMode:o="live",speaking:l=!1,thinking:u=!1,loading:d=!1,fileActivity:p="idle"}){let m=pW(e,t),v=t===void 0?e.agents?.[0]?.engine:r,g=m?fW(m,v):"",b={sm:36,md:48,lg:56,xl:88,chat:48,composer:72}[n],x=b<=36?14:b>=56?20:18,y=K2(e),E=y?null:Y2(e,b);return(0,We.jsx)(Bt,{children:(0,We.jsx)(Ci,{className:`wand-team-avatar wand-employee-avatar ${a}`.trim(),"data-size":n,title:e.name,offset:[0,b-x/2],count:m?(0,We.jsx)("span",{role:"img","aria-label":g,title:g,className:"wand-employee-avatar-provider",children:(0,We.jsx)(ki,{size:x,shape:"square",icon:m==="pi"&&(v==="sdk"||v==="core")?(0,We.jsx)(Pu,{style:{width:14,height:14}}):(0,We.jsx)(wl,{provider:m})})}):void 0,children:y?o==="static"?(0,We.jsx)("span",{style:{position:"relative",display:"inline-flex"},children:(0,We.jsx)(W3,{config:y,size:b})}):(0,We.jsx)(F0,{config:y,size:b,speaking:l,thinking:u,loading:d,fileActivity:p}):(0,We.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,We.jsx)(ki,{shape:"square",size:b,src:E?.src,style:E?.style,icon:E?.icon}),o==="static"?null:d||u?(0,We.jsx)(C0,{}):null]})})})}var J0e={heart:"M12 20C10 18 3 13 3 8.5C3 3 10 2 12 7C14 2 21 3 21 8.5C21 13 14 18 12 20Z",triangle:"M9 5Q12 1 15 5L21 16Q23 20 18 20H6Q1 20 3 16Z",diamond:"M10 3Q12 1 14 3L21 10Q23 12 21 14L14 21Q12 23 10 21L3 14Q1 12 3 10Z",round:"M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18Z",square:"M7 3H17Q21 3 21 7V17Q21 21 17 21H7Q3 21 3 17V7Q3 3 7 3Z",capsule:"M12 2Q19 2 19 9V15Q19 22 12 22Q5 22 5 15V9Q5 2 12 2Z"};function Z0e({field:e,id:t}){return e==="color"?(0,We.jsx)("span",{className:"wand-avatar-color",style:{background:pd.find(r=>r.id===t)?.color}}):e==="shape"?(0,We.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:(0,We.jsx)("path",{d:J0e[t]})}):t==="none"?(0,We.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,We.jsx)("circle",{cx:"12",cy:"12",r:"8",fill:"none"}),(0,We.jsx)("path",{d:"M6 18L18 6",fill:"none"})]}):e==="glasses"?(0,We.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",style:{color:t==="gold"?"#9b7135":"currentColor"},children:[(0,We.jsx)("circle",{cx:"6.5",cy:"12",r:"4.5",fill:"none"}),(0,We.jsx)("circle",{cx:"17.5",cy:"12",r:"4.5",fill:"none"}),(0,We.jsx)("path",{d:"M11 12h2M2 10H0M22 10h2",fill:"none"})]}):(0,We.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:t==="beanie"?(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)("path",{d:"M5 15C5 3 19 3 19 15Z"}),(0,We.jsx)("rect",{x:"4",y:"15",width:"16",height:"4",rx:"1"}),(0,We.jsx)("circle",{cx:"12",cy:"3",r:"2"})]}):(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)("path",{d:"M3 13C0 4 21 3 22 11C22 16 6 18 3 13Z"}),(0,We.jsx)("path",{d:"M7 17h11M14 5l1-3",fill:"none"})]})})}function e6({field:e,label:t,options:r,config:n,onChange:a,disabled:o}){let l=Oa.useId();return(0,We.jsxs)("fieldset",{className:"wand-avatar-options",disabled:o,children:[(0,We.jsxs)("legend",{children:[t,(0,We.jsx)("span",{children:r.find(u=>u.id===n[e])?.label})]}),(0,We.jsx)("div",{className:"wand-avatar-option-row",children:r.map(u=>(0,We.jsxs)("label",{className:"wand-avatar-option","data-selected":n[e]===u.id,children:[(0,We.jsx)("input",{type:"radio",name:l,value:u.id,checked:n[e]===u.id,"aria-label":u.label,onChange:()=>a({...n,[e]:u.id})}),(0,We.jsx)("span",{className:"wand-avatar-option-mark",children:(0,We.jsx)(Z0e,{field:e,id:u.id})}),(0,We.jsx)("span",{className:"wand-avatar-option-name",children:u.label})]},u.id))})]})}function ege({avatar:e,name:t,employeeId:r="",disabled:n,onChange:a,onBusyChange:o}){let l={id:r||"employee-draft",name:t,avatar:e},u=Oa.useRef(null),d=Oa.useRef(null),p=Oa.useRef(null),[m,v]=Oa.useState(!1),[g,b]=Oa.useState(!1),[x,y]=Oa.useState(()=>i1(l)??a1(l)),[E,S]=Oa.useState(""),[F,$]=Oa.useState(!1),[C,D]=Oa.useState(!1),I=Oa.useRef(0),M=Oa.useRef(e),A=n||F;Oa.useEffect(()=>{mW()},[]),Oa.useEffect(()=>()=>{++I.current},[]),Oa.useEffect(()=>{o?.(F)},[F,o]),Oa.useEffect(()=>{++I.current,$(!1),g&&M.current!==e&&(b(!1),D(!1),S("\u5934\u50CF\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u634F\u8138\u3002"))},[e]),Oa.useEffect(()=>{if(g){let H=requestAnimationFrame(()=>p.current?.querySelector("input:checked")?.focus());return()=>cancelAnimationFrame(H)}},[g]);let j=()=>{b(!1),D(!1),u.current?.focus({preventScroll:!0})};Qn(g,j);let P=()=>{v(!1),S(""),M.current=e,y(i1(l)??a1(l)),b(!0)},O=()=>{v(!1),S(""),d.current?.click()},V=H=>{let q=H.target.files?.[0];if(H.target.value="",!q)return;if(!/^image\/(png|jpeg|webp)$/.test(q.type)||q.size>10*1024*1024){S("\u8BF7\u9009\u62E9 10 MB \u4EE5\u5185\u7684 PNG\u3001JPEG \u6216 WebP \u56FE\u7247\u3002");return}$(!0),S("");let z=++I.current;V3(q,dW).then(L=>{z===I.current&&(b(!1),D(!1),a(L))}).catch(L=>{z===I.current&&S(L instanceof Error?L.message:"\u56FE\u7247\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}).finally(()=>{z===I.current&&$(!1)})},W=e.startsWith("data:image/")?"\u5DF2\u4E0A\u4F20\u56FE\u7247":e.startsWith("plush:v1:")?"\u81EA\u5B9A\u4E49\u6BDB\u7ED2\u5934\u50CF":/^cat:/.test(e)?"\u50CF\u7D20\u732B\u5934\u50CF":"\u81EA\u52A8\u6BDB\u7ED2\u5934\u50CF";return(0,We.jsxs)("section",{className:"wand-avatar-editor","aria-label":"\u5458\u5DE5\u5934\u50CF",children:[(0,We.jsxs)(Ye,{align:"center",gap:10,className:"wand-avatar-editor-summary",children:[(0,We.jsx)(ko,{open:m&&!A,onOpenChange:v,align:"start",ariaLabel:"\u5934\u50CF\u64CD\u4F5C",trigger:(0,We.jsxs)(Ui,{ref:u,className:"wand-avatar-editor-trigger",type:"text",disabled:A,"aria-label":"\u7F16\u8F91\u5458\u5DE5\u5934\u50CF","aria-haspopup":"true","aria-expanded":m||g,children:[(0,We.jsx)(hd,{employee:l,provider:"",size:"lg"}),(0,We.jsx)("span",{className:"wand-avatar-edit-mark",children:(0,We.jsx)(De,{name:"edit",size:10})})]}),children:(0,We.jsxs)(Ye,{vertical:!0,gap:2,children:[(0,We.jsxs)(je,{kind:"ghost",onClick:O,children:[(0,We.jsx)(De,{name:"image",size:14}),"\u4E0A\u4F20\u56FE\u7247"]}),(0,We.jsx)(je,{kind:"ghost",onClick:P,children:"\u634F\u8138"})]})}),(0,We.jsxs)(Ye,{vertical:!0,gap:2,style:{flex:1,minWidth:0},children:[(0,We.jsx)(Wt.Text,{children:"\u5934\u50CF"}),(0,We.jsx)(Wt.Text,{type:"secondary",className:"wand-avatar-editor-caption",children:F?"\u6B63\u5728\u5904\u7406\u56FE\u7247\u2026":W})]}),(0,We.jsx)(je,{kind:"ghost",size:"small",disabled:A,onClick:P,children:"\u634F\u8138"}),(0,We.jsx)(je,{kind:"ghost",size:"small",disabled:A,onClick:O,children:"\u4E0A\u4F20"}),e?(0,We.jsx)(je,{kind:"ghost",size:"small",disabled:A,onClick:()=>{j(),S(""),a("")},children:"\u6062\u590D\u9ED8\u8BA4"}):null]}),(0,We.jsx)(Wt.Text,{type:"secondary",className:"wand-avatar-upload-hint",children:"PNG\u3001JPEG \u6216 WebP \xB7 \u6700\u5927 10 MB"}),(0,We.jsx)("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp",hidden:!0,tabIndex:-1,"aria-label":"\u4E0A\u4F20\u5934\u50CF\u56FE\u7247",onChange:V}),g?(0,We.jsxs)("div",{ref:p,className:"wand-avatar-sculpt",role:"region","aria-label":"\u634F\u8138",onKeyDown:H=>{H.key==="Escape"&&(H.preventDefault(),H.stopPropagation(),j())},children:[(0,We.jsxs)("div",{className:"wand-avatar-sculpt-preview",children:[(0,We.jsx)(F0,{config:x,size:156,interactive:!0,speaking:C}),(0,We.jsx)(Wt.Text,{type:"secondary",children:"\u5B9E\u65F6\u9884\u89C8"}),(0,We.jsx)(je,{kind:"ghost",size:"small","aria-pressed":C,disabled:A,onClick:()=>D(H=>!H),children:C?"\u505C\u6B62\u9884\u89C8":"\u9884\u89C8\u8BF4\u8BDD\u52A8\u4F5C"})]}),(0,We.jsxs)("div",{className:"wand-avatar-sculpt-controls",children:[(0,We.jsx)(e6,{field:"shape",label:"\u9020\u578B",options:Zb,config:x,disabled:A,onChange:y}),(0,We.jsx)(e6,{field:"color",label:"\u989C\u8272",options:pd,config:x,disabled:A,onChange:y}),(0,We.jsx)(e6,{field:"glasses",label:"\u773C\u955C",options:e1,config:x,disabled:A,onChange:y}),(0,We.jsx)(e6,{field:"hat",label:"\u5E3D\u5B50",options:t1,config:x,disabled:A,onChange:y})]}),(0,We.jsxs)(Ye,{className:"wand-avatar-sculpt-footer",align:"center",wrap:!0,gap:8,justify:"space-between",children:[(0,We.jsx)(Wt.Text,{type:"secondary",children:"\u4FDD\u5B58\u5458\u5DE5\u540E\u751F\u6548"}),(0,We.jsxs)(Ye,{gap:6,children:[(0,We.jsx)(je,{kind:"ghost",disabled:A,onClick:j,children:"\u53D6\u6D88"}),(0,We.jsx)(je,{kind:"primary",disabled:A,onClick:()=>{a(H3(x)),j()},children:"\u4F7F\u7528\u8FD9\u4E2A\u5934\u50CF"})]})]})]}):null,E?(0,We.jsx)(ri,{type:"error",showIcon:!0,role:"alert",title:E}):null]})}var md=B(_(),1);function D0(e,t={}){let r=null,n=null,a=0,o=0,l=!1,u=new Set,d=()=>{for(let m of[...u])m()},p=m=>{let v=r===null||!t.equals?.(r,m);r=m,v&&d()};return{peek:()=>r,load:m=>{if(!m?.force&&r!==null&&!l){let x=m?.maxAgeMs;if(x===void 0||Date.now()-o<=x)return Promise.resolve(r)}if(n)return n;let v=a,g;try{g=e()}catch(x){g=Promise.reject(x)}let b;return b=g.then(x=>(n===b&&(n=null),v!==a?r??x:(o=Date.now(),l=!1,p(x),x)),x=>{throw n===b&&(n=null),x}),n=b,b},publish(m){a++,n=null,p(m)},invalidate(){a++,n=null,r=null,o=0,l=!1},stale(){l=!0},subscribe(m){return u.add(m),()=>{u.delete(m)}}}}function tge(e,t){if(L3(e)){let o={};for(let l of["name","duty","prompt","agents","systemSessionLimit","maxConcurrentTasks"])t[l]!==void 0&&Object.assign(o,{[l]:l==="maxConcurrentTasks"?t.maxConcurrentTasks??Jb:t[l]});return o}if(O3(e))return{agents:t.agents??e.agents,...t.systemSessionLimit!==void 0?{systemSessionLimit:t.systemSessionLimit}:{},...t.maxConcurrentTasks!==void 0?{maxConcurrentTasks:t.maxConcurrentTasks??Jb}:{}};let r={name:t.name??e.name,duty:t.duty??e.duty,prompt:t.prompt??e.prompt,avatar:t.avatar??e.avatar,tags:t.tags??e.tags??[],agents:t.agents??e.agents},n=t.systemSessionLimit!==void 0?t.systemSessionLimit:e.systemSessionLimit;n!==void 0&&(r.systemSessionLimit=n);let a=t.maxConcurrentTasks!==void 0?t.maxConcurrentTasks:e.maxConcurrentTasks;return a!==void 0&&(r.maxConcurrentTasks=a??Jb),r}var u$=new Set,rge=new Set,uW=new Map;function l1(e){let t=uW.get(e);if(!t){let r=e?"?includeArchived=1":"";t=D0(async()=>(await mt(`/api/silicon-employees${r}`,{cache:"no-store"})).employees??[]),uW.set(e,t)}return t}function nge(){l1(!1).invalidate(),l1(!0).invalidate();for(let e of rge)e()}function cW(e=!1){return l1(e).peek()}function c$(e){return l1(!1).peek()?.find(t=>t.id===e)??null}function Ru(e){nge();for(let t of u$)t(e)}function t6(e){return u$.add(e),()=>{u$.delete(e)}}var hW={list(e){return l1(e?.includeArchived===!0).load()},get(e){return mt(`/api/silicon-employees/${encodeURIComponent(e)}`,{cache:"no-store"})},async draft(e){return(await mt("/api/silicon-employees/draft",tn({expectation:e}))).draft},async create(e){let t=await mt("/api/silicon-employees",tn(e));return Ru(t.id),t},async update(e,t){let r=await mt(`/api/silicon-employees/${encodeURIComponent(e)}`,tn(t,"PUT"));return Ru(r.id),r},async archive(e){await mt(`/api/silicon-employees/${encodeURIComponent(e)}/archive`,{method:"POST"}),Ru(e)},async unarchive(e){await mt(`/api/silicon-employees/${encodeURIComponent(e)}/unarchive`,{method:"POST"}),Ru(e)},async remove(e){await mt(`/api/silicon-employees/${encodeURIComponent(e)}`,{method:"DELETE"}),Ru(e)}};function d$(e){let t=e?.includeArchived===!0,[r,n]=md.useState(()=>cW(t)??[]),a=e?.enabled!==!1,[o,l]=md.useState(()=>a&&cW(t)===null),[u,d]=md.useState(null),p=md.useRef(!1),m=md.useRef(a),v=md.useRef(0);m.current=a;let g=md.useCallback(()=>{if(!p.current||!m.current)return;let b=++v.current,x=()=>p.current&&m.current&&v.current===b;l(!0),hW.list({includeArchived:t}).then(y=>{x()&&(n(y),d(null))}).catch(y=>{x()&&d(y instanceof Error?y.message:String(y))}).finally(()=>{x()&&l(!1)})},[t]);return md.useEffect(()=>{if(!a){l(!1);return}p.current=!0,g();let b=t6(g);return()=>{p.current=!1,v.current++,b()}},[g,a]),{employees:r,loading:o,error:u,reload:g}}var pf=D0(async()=>mt("/api/config",{credentials:"same-origin"}));function u1(){return pf.peek()}function c1(){return pf.load()}function p$(e){return pf.subscribe(e)}function age(e){let t=pf.peek();if(!t){pf.invalidate();return}pf.publish({...t,...e})}function f$(){pf.invalidate()}typeof window<"u"&&window.addEventListener("wand-settings-config-saved",e=>{let t=e.detail;t&&typeof t=="object"&&age(t)});function v$(e){return`${Math.max(0,Math.ceil(e*2))}px 0px 0px 0px`}var wW=-1;function xW(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function ige(e){let t=e.scrollHeight-(e.scrollTop+e.clientHeight);return t<=24?wW:-(Math.round(t)+2)}function oge(e,t){let r=xW(e);if(r===void 0||r===wW)return{top:t.scrollHeight,needsEarlier:!1};if(r>=0)return{top:r,needsEarlier:!1};let n=t.scrollHeight-t.clientHeight-(-r-2);return{top:Math.max(0,n),needsEarlier:n<0}}function sge(e,t){return e.messageId??`${e.requestId??""}:${e.role}:${e.createdAt??""}:${e.author?.id??""}:${t}`}function m$(e){let t=new Date(e??"");return Number.isFinite(t.getTime())?t.toLocaleDateString([],{year:"numeric",month:"long",day:"numeric"}):""}function lge(e){let t=new Date(e??"");return Number.isFinite(t.getTime())?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):""}function uge(e,t){if(!e||!t||e.notice||t.notice||e.role!==t.role||e.role!=="user"&&(!e.author?.id||e.author.id!==t.author?.id)||e.conversationTarget?.runId!==t.conversationTarget?.runId)return!1;let r=Date.parse(t.createdAt??"")-Date.parse(e.createdAt??"");return r>=0&&r<5*6e4&&m$(e.createdAt)===m$(t.createdAt)}function cge(e,t){if(!e)return[];if(!e.length)return[...t];let r=t.indexOf(e[e.length-1]);if(r<0)return[];let n=Math.min(r+1,e.length);return e.slice(-n).every((a,o)=>a===t[r+1-n+o])?t.slice(r+1):[]}function b$(e){if(e.task.status==="archived")return"\u5DF2\u5F52\u6863";let t=e.runs[0];return t?{running:"\u8FDB\u884C\u4E2D",waiting_user:"\u7B49\u4F60\u56DE\u590D",awaiting_approval:"\u7B49\u4F60\u6279\u51C6",done:"\u5B8C\u6210",failed:"\u5931\u8D25",stopped:"\u5DF2\u505C\u6B62"}[t.status]??"":e.startup?.state==="failed"?"\u542F\u52A8\u5931\u8D25":"\u5F85\u5F00\u5DE5"}var h$=new Set;function y$(e){for(let t of h$)t(e)}function dge(e){return h$.add(e),()=>{h$.delete(e)}}function pge(e){let t=/^[\p{L}\p{N}_.:-]{1,64}$/u.test(e.name)?e.name:"\u5DE5\u5177\u8C03\u7528";switch(e.activity?.kind){case"read_file":return`\u8BFB\u53D6\u6587\u4EF6 \xB7 ${t}`;case"edit_file":return`\u4FEE\u6539\u6587\u4EF6 \xB7 ${t}`;case"run_command":return`\u8FD0\u884C\u547D\u4EE4 \xB7 ${t}`;default:return t}}function EW(e){if(e.archived||["failed","stopped","done","exited"].includes(e.status??"")||!(e.structuredState?.inFlight||e.ptyRunning))return null;let t=e.messages??[],r=e.structuredState?.activeRequestId,n=Date.parse(e.structuredState?.turnStartedAt??e.turnStartedAt??""),a=t.length-1;for(;a>=0&&!(t[a].role==="user"&&(t[a].content??[]).some(g=>g.type==="text"&&!g.__subagent&&g.text.trim()));)a--;let o=t[a];if(r&&o?.requestId&&o.requestId!==r)return null;let l=!!(r&&o?.requestId===r),u=g=>{if(g.author?.sessionId&&g.author.sessionId!==e.id)return!1;if(r&&g.requestId)return g.requestId===r;if(l)return!0;let b=Date.parse(g.createdAt??"");return Number.isFinite(n)&&Number.isFinite(b)&&b>=n},d=new Map,p=new Set,m=null;for(let g=a+1;g<t.length;g++){let b=t[g];if(u(b))for(let x of b.content??[])x.__subagent||(x.type==="tool_result"&&(p.add(x.tool_use_id),m=null),b.role==="assistant"&&(x.type==="tool_use"?(d.set(x.id,x),m=null):!b.completedAt&&x.type==="text"&&x.text.trim()?m={kind:"output",label:"\u6B63\u5728\u8F93\u51FA"}:!b.completedAt&&x.type==="thinking"&&(m={kind:"thinking",label:"\u6B63\u5728\u601D\u8003"})))}let v=[...d.values()].reverse().find(g=>!p.has(g.id));return v?.semantic?.kind==="question_request"||v?.name==="AskUserQuestion"?{kind:"waiting",toolId:v.id,label:"\u7B49\u5F85\u4F60\u7684\u8F93\u5165"}:v?{kind:"tool",toolId:v.id,label:pge(v)}:m}var kW=6e4,w$=new Set(["failed","stopped","exited","done"]),fge=new Set(["waiting-input","waiting_input","waiting_user","awaiting_approval"]),mge=new Set(["running","thinking","waiting-input","waiting_input","awaiting_approval","waiting_user"]);function ff(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}function n6(e){return e?ff(e.structuredState?.turnStartedAt)??ff(e.turnStartedAt):null}function hge(e){if(!e)return null;let t=e.structuredState?.lastActivityAt;return ff(t)??ff(e.lastActivityAt)??ff(e.lastActivityAt)}function CW(e){if(!e||e.archived)return!1;let t=e;if(t.archived||w$.has(t.status??""))return!1;if(t.permissionBlocked||t.pendingEscalation||t.structuredState?.inFlight)return!0;let r=e.status;return typeof r=="string"&&mge.has(r)}function SW(e){return!e||e.archived||w$.has(e.status??"")?!1:!!e.structuredState?.inFlight||e.ptyRunning===!0}function mf(e,t=!1){return!e||e.archived||w$.has(e.status??"")?"idle":e.permissionBlocked||e.pendingEscalation||fge.has(e.status??"")?"waiting":(t?CW(e):SW(e))?!t&&EW(e)?.kind==="waiting"?"waiting":"executing":(e.queuedMessages?.length??0)>0||t&&e.status==="starting"?"received":"idle"}function FW(e,t,r=!1){if(!(r?CW(e):SW(e)))return 0;let n=hge(e);return n===null?0:Math.max(0,t-n)}function p1(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t} \u79D2`;let r=Math.floor(t/60);if(r<60)return`${r} \u5206\u949F`;let n=Math.floor(r/60),a=r%60;return a?`${n} \u5C0F\u65F6 ${a} \u5206\u949F`:`${n} \u5C0F\u65F6`}var gW={received:"\u5DF2\u63A5\u6536",executing:"\u6B63\u5728\u6267\u884C",waiting:"\u7B49\u5F85\u4F60\u7684\u8F93\u5165",idle:""};function f1(e,t=!1){let r=mf(e,t),n={phase:r,stage:r,label:gW[r],action:null,active:r!=="idle"};if(!e||e.archived)return n;if(e.status==="failed"||e.status==="stopped")return{...n,stage:e.status,label:e.status==="failed"?"\u6267\u884C\u5931\u8D25":"\u5DF2\u505C\u6B62",active:!1};if(r==="received")return{...n,label:"\u5DF2\u63A5\u6536 \xB7 \u6392\u961F\u4E2D"};if(r==="waiting")return{...n,label:e.permissionBlocked||e.pendingEscalation||e.status==="awaiting_approval"?"\u7B49\u5F85\u4F60\u786E\u8BA4\u64CD\u4F5C":gW.waiting};if(r!=="executing"||t)return n;if(e.structuredState?.phase==="background")return{...n,stage:"background",label:"\u7B49\u5F85\u540E\u53F0\u4EFB\u52A1"};let a=EW(e);return a?{...n,stage:a.kind,label:a.kind==="tool"?"\u6B63\u5728\u4F7F\u7528\u5DE5\u5177":a.label,action:a.kind==="tool"?a.label:null,toolId:a.toolId}:n}function gge(e,t,r=!1){let n=f1(e,r);if(!n.label)return"";let a=[n.label];if(n.action&&a.push(n.action),!n.active||n.phase==="received")return a.join(" \xB7 ");let o=r?ff(e?.turnStartedAt)??ff(e?.startedAt):n6(e);o!==null&&a.push(`\u5DF2\u8FD0\u884C ${p1(Math.max(0,t-o))}`);let l=FW(e,t,r);return l>=kW&&a.push(`\u5DF2 ${p1(l)}\u65E0\u65B0\u6D88\u606F`),a.join(" \xB7 ")}var vW=B(_(),1);function vge(e){let[t,r]=vW.useState(()=>Date.now());return vW.useEffect(()=>{if(!e)return;r(Date.now());let n=window.setInterval(()=>r(Date.now()),1e3),a=()=>{document.visibilityState==="visible"&&r(Date.now())};return document.addEventListener("visibilitychange",a),()=>{window.clearInterval(n),document.removeEventListener("visibilitychange",a)}},[e]),t}var r6=B(Ee(),1),bge={received:"enter",executing:"spark",tool:"wrench",output:"enter",thinking:"spark",background:"history",waiting:"shield",failed:"warning",stopped:"stop",idle:"spark"};function m1(e){let t=e.activity,r=e.runMode===!0,n=f1(t,r),a=vge(n.active&&n.phase!=="received"),o=ga(),l=gge(t,a,r);if(!l)return null;let u=n.phase==="waiting",d=n.active&&n.phase!=="received"&&FW(t,a,r)>=kW;return(0,r6.jsxs)("div",{className:`chat-running-bar${u?" is-waiting":""}`,"data-phase":n.stage,"data-source-session":r?void 0:t?.id,"data-silent":d?"true":void 0,role:"status","aria-live":"polite",children:[(0,r6.jsx)("span",{className:`chat-running-pulse${o||!n.active?" is-instant":""}`,"data-phase":n.stage,"aria-hidden":"true",children:(0,r6.jsx)(De,{name:bge[n.stage],size:13})}),(0,r6.jsx)("span",{className:"chat-running-text",children:l})]})}var bW=B(_(),1),g$=new Set,El={name:"",avatar:"",loaded:!1};function $W(e){if(!(e.name===El.name&&e.avatar===El.avatar&&e.loaded===El.loaded)){El=e;for(let t of g$)t()}}function x$(e){let t=G3(e);return{name:t?.name??"",avatar:t?.avatar??"",loaded:!0}}function DW(){let e=u1();e&&$W(x$(e.userProfile))}var yW=u1();yW&&(El=x$(yW.userProfile));p$(DW);function yge(){return c1().then(DW,()=>{})}typeof window<"u"&&window.addEventListener("wand-settings-config-saved",e=>{u1()||$W(x$(e.detail?.userProfile))});var d1={subscribe(e){return g$.add(e),()=>{g$.delete(e)}},getSnapshot(){return El},refresh(){yge()}};function A0(){let e=bW.useSyncExternalStore(d1.subscribe,d1.getSnapshot,d1.getSnapshot);return bW.useEffect(()=>{d1.refresh()},[]),e}function AW(){return{id:"user",name:El.name||"\u6211",...El.avatar?{avatar:El.avatar}:{}}}function wge(e){let t=AW();if(e?.role!=="user")return{id:"",name:"",avatar:t.avatar};let r=e.author;return!r||r.id!=="user"?t:{...t,name:El.loaded?t.name:r.name||t.name}}var hf=B(Ee(),1);function E$({title:e,members:t,size:r=48}){let n=A0(),a=Math.ceil(Math.sqrt(t.length+1)),o=(r-4-(a-1))/a;return(0,hf.jsxs)("span",{className:"conversation-group-avatar conversation-group-mosaic",role:"img","aria-label":`\u7FA4\u804A\uFF1A${e}\uFF1B${n.name||"\u6211"}\u3001${t.map(l=>l.name).join("\u3001")}`,style:{width:r,height:r,gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},children:[(0,hf.jsx)("span",{className:"conversation-group-cell","aria-hidden":"true",children:(0,hf.jsx)("span",{style:{width:36,height:36,transform:`scale(${o/36})`},children:(0,hf.jsx)(hd,{employee:{id:"user",name:n.name||"\u6211",avatar:n.avatar},provider:"",size:"sm"})})}),t.map(l=>(0,hf.jsx)("span",{className:"conversation-group-cell","aria-hidden":"true",title:l.name,children:(0,hf.jsx)("span",{style:{width:36,height:36,transform:`scale(${o/36})`},children:(0,hf.jsx)(hd,{employee:{id:l.employeeId||l.id,name:l.name,avatar:l.avatar},provider:"",size:"sm"})})},l.id))]})}function xge(e){return e>=1e6?`${(e/1e6).toFixed(1).replace(/\.0$/,"")}M`:e>=1e3?`${(e/1e3).toFixed(1).replace(/\.0$/,"")}k`:String(Math.round(e))}function k$(e){let t,r={};for(let n of e)if(n.role==="user"&&(r={}),!(n.role!=="assistant"||!n.usage)){for(let a of["inputTokens","outputTokens","cacheReadInputTokens","cacheCreationInputTokens","reasoningOutputTokens","totalCostUsd"]){let o=n.usage[a];typeof o=="number"&&Number.isFinite(o)&&o>=0&&(r[a]=(r[a]??0)+o)}n.usage.estimated&&(r.estimated=!0),t={...r}}return t}function Ege(e){if(!e)return[];let t=[],r=[["inputTokens","\u8F93\u5165",!1],["cacheReadInputTokens","\u7F13\u5B58\u547D\u4E2D",!1],["cacheCreationInputTokens","\u7F13\u5B58\u5199\u5165",!1],["outputTokens","\u8F93\u51FA",!0],["reasoningOutputTokens","\u63A8\u7406",!0]];for(let[a,o,l]of r){let u=e[a];if(typeof u!="number"||!Number.isFinite(u)||u<=0)continue;let d=e.estimated===!0&&l?"\u2248":"";t.push({key:a,label:o,value:d+xge(u),title:`${o} ${d}${Math.round(u)} Token${d?"\uFF08\u4F30\u7B97\uFF09":""}`})}let n=e.totalCostUsd;return typeof n=="number"&&Number.isFinite(n)&&n>0&&t.push({key:"totalCostUsd",label:"\u8D39\u7528",value:`$${n.toFixed(4).replace(/0+$/,"").replace(/\.$/,"")}`,title:`\u8D39\u7528 $${n}`}),!t.length&&e.estimated===!0&&t.push({key:"pending",label:"\u7528\u91CF",value:"\u7EDF\u8BA1\u4E2D\u2026",title:"\u6B63\u5728\u7EDF\u8BA1\u7528\u91CF\uFF0C\u5C1A\u65E0\u53EF\u663E\u793A\u7684\u8BA1\u6570"}),t}function kge(e){if(e.role!=="assistant"||!e.createdAt||!e.completedAt)return null;let t=Date.parse(e.completedAt)-Date.parse(e.createdAt);return!Number.isFinite(t)||t<=0?null:t<1e3?"\u4E0D\u8DB3 1 \u79D2":p1(t)}var BW=B(_(),1);function Cge(e){return!e.webgl||!e.webglWithoutCaveat||e.maxTextureSize>0&&e.maxTextureSize<2048||e.cores!==void 0&&e.cores<4||e.memoryGb!==void 0&&e.memoryGb<4?"static":"live"}function IW(e,t){let r={alpha:!0,antialias:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:t};return e.getContext("webgl2",r)??e.getContext("webgl",r)}function Sge(){let e=globalThis.navigator,t=e&&Number.isFinite(e.hardwareConcurrency)?e.hardwareConcurrency:void 0,r=e&&Number.isFinite(e.deviceMemory)?e.deviceMemory:void 0;if(typeof document>"u")return{cores:t,memoryGb:r,webgl:!1,webglWithoutCaveat:!1,maxTextureSize:0};let n=document.createElement("canvas");try{let a=IW(n,!0),o=a??IW(n,!1),l=o&&Number(o.getParameter(o.MAX_TEXTURE_SIZE))||0;return o?.getExtension("WEBGL_lose_context")?.loseContext(),{cores:t,memoryGb:r,maxTextureSize:l,webgl:!!o,webglWithoutCaveat:!!a}}catch{return{cores:t,memoryGb:r,webgl:!1,webglWithoutCaveat:!1,maxTextureSize:0}}}var a6=null;function Fge(){return a6||(a6=Cge(Sge())),a6}function $ge(){return a6}var Jo=B(Ee(),1);function C$({usage:e,activity:t,employeeName:r,legacyStatus:n=!1,showName:a=!0}){let o=Ege(e);return!r&&!o.length&&mf(t)==="idle"?null:(0,Jo.jsxs)("div",{className:"composer-usage-line",role:"status","aria-label":r?`${r}\uFF0C\u72B6\u6001\u4E0E\u7528\u91CF`:"\u6700\u8FD1\u4E00\u8F6E\u7528\u91CF",tabIndex:0,title:o.map(l=>l.title).join(" \xB7 "),children:[r&&a?(0,Jo.jsxs)("span",{className:"composer-identity-name",title:r,children:[r,"\uFF1A"]}):null,n?(0,Jo.jsx)("span",{"data-composer-running-host":""}):(0,Jo.jsx)(m1,{activity:t}),o.length?(0,Jo.jsx)(ko,{side:"top",ariaLabel:"\u6700\u8FD1\u4E00\u8F6E\u7528\u91CF\u8BE6\u60C5",trigger:(0,Jo.jsx)(je,{kind:"ghost",size:"small",className:"composer-usage-caption",children:"\u7528\u91CF"}),children:(0,Jo.jsx)("div",{className:"composer-usage-details",children:o.map(l=>(0,Jo.jsxs)("span",{className:"composer-usage-metric",title:l.title,children:[l.label," ",(0,Jo.jsx)("span",{className:"composer-usage-number",children:l.value})]},l.key))})}):null]})}function Dge(){let[e,t]=BW.useState(()=>$ge()??"pending");return BW.useEffect(()=>{e==="pending"&&t(Fge())},[e]),e}function S$({employee:e,thinking:t=!1,fileActivity:r="idle"}){let n=Dge(),a=t&&r==="idle",o=n!=="live",l=n==="pending";return(0,Jo.jsxs)("span",{className:"composer-floating-avatar",role:"img","aria-label":`${e.name}${r==="reading"?"\uFF0C\u6B63\u5728\u67E5\u770B\u6587\u4EF6":r==="writing"?"\uFF0C\u6B63\u5728\u7F16\u5199\u6587\u4EF6":""}`,"data-file-activity":r,"data-avatar-choice":n,children:[(0,Jo.jsx)(hd,{employee:e,provider:"",size:"composer",renderMode:o?"static":"live",loading:l,thinking:a,fileActivity:r}),o&&(l||a)?(0,Jo.jsx)(C0,{}):null]})}var Ou=B(_(),1),Age=B(Jt(),1),Bge=B(Ee(),1);function F$({owner:e,input:t,surface:r,phase:n,pending:a,locked:o,forceExpanded:l,onDismiss:u,popupOwners:d=[]}){let[p,m]=Ou.useState(!1),[v,g]=Ou.useState(!1),b=Ou.useRef({input:t,surface:r,locked:o,phase:n,popupOwners:d,onDismiss:u,forceExpanded:l});b.current={input:t,surface:r,locked:o,phase:n,popupOwners:d,onDismiss:u,forceExpanded:l},Ou.useLayoutEffect(()=>{m(!1),g(!1)},[e]),Ou.useEffect(()=>{(n==="failed"||n==="unknown")&&(g(!0),m(!0)),n==="sent"&&!a&&(g(!1),m(!1),t()?.blur())},[n,a]);let x=p||v||!!o||!!l||n==="sending",y=Ou.useRef(x);y.current=x,Ou.useEffect(()=>{let S=t(),F=r();if(!S||!F)return;let $=new Set,C=O=>{if(!(O.target instanceof Node)||!F.contains(O.target))return;let{owner:V,active:W}=O.detail;W?$.add(V):$.delete(V)},D=()=>{m(!0)},I=()=>{g(!1),m(!0)},M=O=>{let V=b.current;$.size||V.locked||["sending","failed","unknown"].includes(V.phase)||(m(!1),S.blur(),V.onDismiss?.(O))},A=()=>M("escape"),j=O=>{O.key!=="Escape"||!y.current||O.defaultPrevented||O.isComposing||sf()||!F.contains(document.activeElement)||z2(b.current.popupOwners)||(O.preventDefault(),O.stopPropagation(),b.current.forceExpanded&&M("escape"))},P=()=>{sf()||M("back")};return document.addEventListener("wand-composer-focus-borrow",C),S.addEventListener("focus",D),S.addEventListener("input",I),S.addEventListener("wand-composer-close",A),document.addEventListener("keydown",j,!0),window.addEventListener("popstate",P),()=>{document.removeEventListener("wand-composer-focus-borrow",C),S.removeEventListener("focus",D),S.removeEventListener("input",I),S.removeEventListener("wand-composer-close",A),document.removeEventListener("keydown",j,!0),window.removeEventListener("popstate",P)}},[e]);let E=Ou.useRef(e);return E.current=e,Ou.useLayoutEffect(()=>{let S=t();S&&(S.tabIndex=x?0:-1)},[x,e]),{expanded:x,open:()=>{(0,Age.flushSync)(()=>m(!0));let S=t();E.current!==e||!S||(S.focus({preventScroll:!0}),requestAnimationFrame(()=>{E.current===e&&S===b.current.input()&&S.isConnected&&document.activeElement===document.body&&S.focus({preventScroll:!0})}))},close:()=>{t()?.dispatchEvent(new Event("wand-composer-close"))}}}function $$({text:e,attachments:t,placeholder:r,disabled:n,onOpen:a}){let o=e.trim().split(/\n/).find(Boolean),l=o?`\u8349\u7A3F \xB7 ${o}`:t?`\u8349\u7A3F \xB7 ${t} \u4E2A\u9644\u4EF6`:r;return(0,Bge.jsx)(je,{kind:"ghost",className:"composer-compact-entry",disabled:n,"aria-label":e||t?"\u7F16\u8F91\u672A\u53D1\u9001\u8349\u7A3F\u53CA\u9644\u4EF6":"\u5C55\u5F00\u6587\u5B57\u8F93\u5165",onClick:a,children:l})}function D$(e,t=[]){if(mf(e)!=="executing")return"idle";let r=t.length-1;for(;r>=0&&t[r].role!=="user";)r--;let n=new Map,a=new Set;for(let o=r+1;o<t.length;o++){let l=t[o];for(let u of l.content??[]){if(u.__subagent||(u.type==="tool_result"&&a.add(u.tool_use_id),u.type!=="tool_use"||l.completedAt))continue;let d=u.activity?.kind;(d==="read_file"||d==="edit_file")&&n.set(u.id,d==="read_file"?"reading":"writing")}}return[...n].reverse().find(([o])=>!a.has(o))?.[1]??"idle"}var A$=null,i6=new Set,h1={open(e,t){A$={...e,trigger:t},i6.forEach(r=>r())},close(){A$=null,i6.forEach(e=>e())}},B$={subscribe(e){return i6.add(e),()=>{i6.delete(e)}},getSnapshot(){return A$},getServerSnapshot(){return null}},I$="local-owner";function M$(e){return`dm_${e}`}function g1(e){let t=null;return{preload(){if(t)return;let r=e();t=r,r.catch(()=>{t===r&&(t=null)})},load(){let r=t;return t=null,r??e()},clear(){t=null}}}var T$=new Set;function Xi(){for(let e of T$)e()}function Ds(e){return T$.add(e),()=>{T$.delete(e)}}function o6(e){return Xi(),e}function gd(e){return jt(e).then(o6)}function j$(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.floor(e)):0}function Ige(e){return e==="dirty"||e==="conflict"||e==="empty"||e==="unavailable"?e:"ready"}function Mge(e){let t=$0(e),r=Ke(t.taskId).trim(),n=Ke(t.branch).trim(),a=Ke(t.path).trim();if(!r||!n||!a)return null;let o=Array.isArray(t.commits)?t.commits.flatMap(l=>{let u=$0(l),d=Ke(u.hash).trim();return d?[{hash:d,shortHash:Ke(u.shortHash,d.slice(0,7)),subject:Ke(u.subject)}]:[]}):[];return{taskId:r,taskName:Ke(t.taskName,n),taskStatus:t.taskStatus==="done"?"done":"active",branch:n,path:a,baseRef:Ke(t.baseRef),state:Ige(t.state),actionable:t.actionable===!0,reason:Ke(t.reason),aheadCount:j$(t.aheadCount),hasUncommittedChanges:t.hasUncommittedChanges===!0,hasConflicts:t.hasConflicts===!0,commits:o}}function Tge(e){let t=$0(e);return{workspaceId:Ke(t.workspaceId),repoRoot:Ke(t.repoRoot),targetBranch:Ke(t.targetBranch),worktrees:Array.isArray(t.worktrees)?t.worktrees.map(Mge).filter(r=>r!==null):[]}}var jge=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ie(this,"fetchImpl",e),ie(this,"startupGroups",g1(()=>this.readTaskGroups()))}preloadTaskGroups(){this.startupGroups.preload()}clearPreload(){this.startupGroups.clear()}async list(){let e=await jt(await this.fetchImpl("/api/workspaces",{credentials:"same-origin"})),t=Array.isArray(e)?e:e.workspaces;return Array.isArray(t)?t.map(r=>{let n=$0(r);return{...r,sessionCount:j$(n.sessionCount),worktreeCount:j$(n.worktreeCount)}}):[]}listTaskGroups(e){return e===void 0?this.startupGroups.load():this.readTaskGroups(e)}async readTaskGroups(e){let t=`?revision=${encodeURIComponent(e??"")}&includeArchived=1`,r=await jt(await this.fetchImpl(`/api/tasks${t}`,{credentials:"same-origin"}));if(Array.isArray(r))return{groups:r,unchanged:!1};let n=r&&typeof r=="object"?r:{};return{groups:Array.isArray(n.groups)?n.groups:[],revision:typeof n.revision=="string"?n.revision:void 0,unchanged:n.unchanged===!0}}async get(e){return jt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}`,{credentials:"same-origin"}))}async create(e){return gd(await this.fetchImpl("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)}))}async update(e,t){return jt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async remove(e,t=!1){await jt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}${t?"?cascade=1":""}`,{method:"DELETE",credentials:"same-origin"}))}async renameDirectory(e,t){await jt(await this.fetchImpl("/api/session-directories/name",{method:"PUT",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,name:t})}))}async saveLayout(e,t){return(await jt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/layout`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({layout:t})}))).layout??null}async listTasks(e){let t=await jt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/tasks`,{credentials:"same-origin"}));return Array.isArray(t)?t:[]}async createTask(e,t){return gd(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/tasks`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async createStandaloneTask(e){return gd(await this.fetchImpl("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)}))}async getTask(e){return jt(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}`,{credentials:"same-origin"}))}async updateTask(e,t){return gd(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async deleteTask(e,t=!1){await gd(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}${t?"?cascade=1":""}`,{method:"DELETE",credentials:"same-origin"}))}async archiveTask(e){return gd(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/archive`,{method:"POST",credentials:"same-origin"}))}async organizeByTitle(e,t=[],r="auto"){return this.organizeTasks({taskIds:e,sessionIds:t,mode:r})}async organizeTarget(e,t="auto"){return this.organizeTasks({target:e,mode:t})}async organizeTasks(e){return gd(await this.fetchImpl("/api/tasks/organize-by-title",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))}async prepareConversationOrganization(e){return(await jt(await this.fetchImpl("/api/sessions/auto-organize",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview",...e})}))).preview}async startConversationOrganization(e,t=!1){try{return(await jt(await this.fetchImpl("/api/sessions/auto-organize",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"start",token:e,force:t})}))).job}catch(r){try{return(await jt(await this.fetchImpl(`/api/sessions/auto-organize/by-token/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}catch{throw r}}}async conversationOrganizationJobByToken(e){return(await jt(await this.fetchImpl(`/api/sessions/auto-organize/by-token/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}async conversationOrganizationJob(e){return(await jt(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}async watchConversationOrganization(e,t,r){let n=e,a="";for(;;){r?.throwIfAborted(),t?.(n);let o=`${n.result.createdTasks.length}:${n.result.movedSessions.length}`;if(o!==a&&o!=="0:0"&&(a=o,o6(n.result)),n.status!=="running")return n;await new Promise(l=>setTimeout(l,800)),n=(await jt(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(n.id)}`,{credentials:"same-origin",signal:r}))).job}}async cancelConversationOrganization(e){await jt(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(e)}/cancel`,{method:"POST",credentials:"same-origin"}))}async moveSession(e,t){await gd(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/sessions`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})}))}async saveTaskLayout(e,t,r){let n=await jt(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/layout`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({layout:t,layoutRevision:r})}));return{layout:n.layout??null,layoutRevision:n.layoutRevision}}async listWorktrees(e,t={}){let r=await jt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/worktrees`,{credentials:"same-origin",signal:t.signal}));return Tge(r)}async deleteSessions(e){let t=[...new Set(e.filter(n=>typeof n=="string"&&n.trim().length>0))];if(t.length===0)return;let r=await jt(await this.fetchImpl("/api/sessions/batch-delete",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:t})}));if(Array.isArray(r.failed)&&r.failed.length>0)throw new Error(`\u6709 ${r.failed.length} \u4E2A\u7EC8\u7AEF\u65E0\u6CD5\u5173\u95ED\u3002`)}async archiveSession(e,t){await jt(await this.fetchImpl(`/api/sessions/${encodeURIComponent(e)}/${t?"archive":"unarchive"}`,{method:"POST",credentials:"same-origin"}))}async batchArchiveSessions(e,t){let r=[...new Set(e.filter(a=>typeof a=="string"&&a.trim().length>0))];if(r.length===0)return;let n=await jt(await this.fetchImpl("/api/sessions/batch-archive",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:r,archived:t})}));if(Array.isArray(n.failed)&&n.failed.length>0)throw new Error(`\u6709 ${n.failed.length} \u4E2A\u4F1A\u8BDD\u672A\u80FD\u5F52\u6863\u3002`)}},cn=new jge;Ds(()=>cn.clearPreload());var MW=B(_()),_ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},Nge=_ge;function _$(){return _$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_$.apply(this,arguments)}var Pge=(e,t)=>MW.createElement(Zt,_$({},e,{ref:t,icon:Nge})),Rge=MW.forwardRef(Pge),N$=Rge;var TW=B(_()),Oge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},zge=Oge;function P$(){return P$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P$.apply(this,arguments)}var Lge=(e,t)=>TW.createElement(Zt,P$({},e,{ref:t,icon:zge})),Hge=TW.forwardRef(Lge),v1=Hge;var jW=B(_()),qge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},Wge=qge;function R$(){return R$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},R$.apply(this,arguments)}var Vge=(e,t)=>jW.createElement(Zt,R$({},e,{ref:t,icon:Wge})),Uge=jW.forwardRef(Vge),vd=Uge;var O$=B(_(),1);function Gge(e){let t=new Map;function r(a){let o=t.get(a);return o||(o={detail:null,listeners:new Set},t.set(a,o)),o}function n(a){let o=r(a);if(o.pending)return o.pending;let l=e.getTask(a).then(u=>{if(u.id!==a)throw new Error("\u4EFB\u52A1\u8BE6\u60C5\u4E0E\u8BF7\u6C42\u4E0D\u5339\u914D\u3002");if(t.get(a)===o&&o.pending===l){o.detail=u;for(let d of o.listeners)d()}return u}).finally(()=>{o.pending===l&&(o.pending=void 0,o.listeners.size===0&&t.get(a)===o&&t.delete(a))});return o.pending=l,l}return{load:n,reload(a){return r(a).pending=void 0,n(a)},getSnapshot(a){return a?t.get(a)?.detail??null:null},subscribe(a,o){if(!a)return()=>{};let l=r(a);return l.listeners.add(o),l.timer||(n(a).catch(()=>{}),l.timer=setInterval(()=>{n(a).catch(()=>{})},4e3)),()=>{l.listeners.delete(o),!(l.listeners.size>0)&&(clearInterval(l.timer),t.get(a)===l&&t.delete(a))}}}}var As=Gge(cn);function q$(e){let t=(0,O$.useCallback)(n=>As.subscribe(e,n),[e]),r=(0,O$.useCallback)(()=>As.getSnapshot(e),[e]);return(0,O$.useSyncExternalStore)(t,r,()=>null)}var _W=B(_()),Kge=(0,_W.forwardRef)((e,t)=>{let{prefixCls:r,className:n,children:a,destroyOnHidden:o=!1,size:l,style:u,supportMotion:d}=e,p=l===0||typeof l=="string"&&Number.parseFloat(l)===0,m=Z(`${r}-panel`,{[`${r}-panel-hidden`]:p,[`${r}-panel-transition`]:d},n),v=l!==void 0;return _W.default.createElement("div",{ref:t,className:m,style:{...u,flexBasis:v?l:"auto",flexGrow:v?0:1}},!(o&&p)&&a)}),Xge=()=>null,Qge=Xge,Zo=B(_()),NW=B(_());function Yge(e){if(kt(e))return{...e,showCollapsibleIcon:e.showCollapsibleIcon===void 0?"auto":e.showCollapsibleIcon};let t=!!e;return{start:t,end:t,showCollapsibleIcon:"auto"}}function Jge(e){return NW.useMemo(()=>xr(e).filter(t=>NW.isValidElement(t)).map(t=>{let{props:r}=t,{collapsible:n,...a}=r;return{...a,collapsible:Yge(n)}}),[e])}var Zge=Jge,eve=B(_());function PW(e,t){return e.collapsible&&t.collapsible?e.showCollapsibleIcon===!0||t.showCollapsibleIcon===!0?!0:e.showCollapsibleIcon==="auto"||t.showCollapsibleIcon==="auto"?"auto":!1:e.collapsible?e.showCollapsibleIcon:t.collapsible?t.showCollapsibleIcon:!1}function tve(e,t,r){return eve.useMemo(()=>{let n=[];for(let a=0;a<e.length-1;a+=1){let o=e[a],l=e[a+1],u=t[a],d=t[a+1],{resizable:p=!0,min:m,collapsible:v}=o,{resizable:g=!0,min:b,collapsible:x}=l,y=p&&g&&(u!==0||!m)&&(d!==0||!b),E=!!v.end&&u>0,S=!!x.start&&d===0&&u>0,F=E||S,$=!!x.start&&d>0,C=!!v.end&&u===0&&d>0,D=$||C,I=PW({collapsible:E,showCollapsibleIcon:v.showCollapsibleIcon},{collapsible:S,showCollapsibleIcon:x.showCollapsibleIcon}),M=PW({collapsible:$,showCollapsibleIcon:x.showCollapsibleIcon},{collapsible:C,showCollapsibleIcon:v.showCollapsibleIcon});n[a]={resizable:y,startCollapsible:!!(r?D:F),endCollapsible:!!(r?F:D),showStartCollapsibleIcon:r?M:I,showEndCollapsibleIcon:r?I:M}}return n},[t,e,r])}var z$=B(_()),gf=B(_());function rve(e,t,r){let n=e.map((x,y)=>x===0?0:t[y]??0),a=e.map((x,y)=>x===0?0:r[y]??1),o=n.some((x,y)=>x>a[y]),l=n.reduce((x,y)=>x+y,0),u=a.reduce((x,y)=>x+y,0);if(o||l>1||u<1)return e;let d=e.map((x,y)=>Math.min(a[y],Math.max(n[y],x))),p=d.reduce((x,y)=>x+y,0);if(p===1)return d;let m=p<1,v=d.map((x,y)=>m?a[y]-x:x-n[y]),g=v.reduce((x,y)=>x+y,0),b=1-p;return d.map((x,y)=>x+b*(v[y]/g))}function nve(e,t,r){let n=0,a=[];e.forEach((x,y)=>{x===void 0?a.push(y):n+=x});let o=1-n,l=a.length;if(e.length&&!a.length&&n!==1){if(n===0){let E=1/e.length;return e.map(()=>E)}let x=1/n,y=e.map(E=>E*x);return rve(y,t,r)}if(o<0){let x=1/n;return e.map(y=>y===void 0?0:y*x)}let u=0,d=0,p=0,m=1;for(let x of a){let y=t[x]||0,E=r[x]||1;u+=y,d+=E,p=Math.max(p,y),m=Math.min(m,E)}if(u>1&&d<1){let x=1/l;return e.map(y=>y===void 0?x:y)}let v=o/l;if(p<=v&&v<=m)return e.map(x=>x===void 0?v:x);let g=Zr(e),b=o-u;for(let x=0;x<l;x+=1){let y=a[x],E=t[y]||0,S=r[y]||1;g[y]=E;let F=S-E,$=Math.min(F,b);g[y]+=$,b-=$}return g}function s6(e){return Number(e.slice(0,-1))/100}function L$(e){return typeof e=="string"&&e.endsWith("%")}function ave(e,t){let r=e.map(b=>b.size),n=e.length,a=t||0,o=b=>b*a,[l,u]=gf.default.useState(()=>e.map(b=>b.defaultSize)),d=gf.default.useMemo(()=>r.some(zr)?r:l,[n,l,r]),p=gf.default.useMemo(()=>e.map(b=>L$(b.min)?s6(b.min):(b.min||0)/a),[e,a]),m=gf.default.useMemo(()=>e.map(b=>L$(b.max)?s6(b.max):(b.max||a)/a),[e,a]),v=gf.default.useMemo(()=>{let b=[];for(let x=0;x<n;x+=1){let y=d[x];if(L$(y))b[x]=s6(y);else if(y||y===0){let E=Number(y);Number.isNaN(E)||(b[x]=E/a)}else b[x]=void 0}return nve(b,p,m)},[n,d,a,p,m]),g=gf.default.useMemo(()=>v.map(o),[v,a]);return[gf.default.useMemo(()=>t?g:d,[g,d,t]),g,v,p,m,u]}function ive(e,t,r,n,a,o){let l=e.map(E=>[E.min,E.max]),u=n||0,d=E=>E*u;function p(E,S){return typeof E=="string"?d(s6(E)):E??S}let[m,v]=z$.useState([]),g=z$.useRef([]),[b,x]=z$.useState(null),y=()=>r.map(d);return[E=>{v(y()),x({index:E,confirmed:!1})},(E,S)=>{let F=null;if((!b||!b.confirmed)&&S!==0){if(S>0)F=E,x({index:E,confirmed:!0});else for(let O=E;O>=0;O-=1)if(m[O]>0&&t[O].resizable){F=O,x({index:O,confirmed:!0});break}}let $=F??b?.index??E,C=Zr(m),D=$+1,I=p(l[$][0],0),M=p(l[D][0],0),A=p(l[$][1],u),j=p(l[D][1],u),P=S;return C[$]+P<I&&(P=I-C[$]),C[D]-P<M&&(P=C[D]-M),C[$]+P>A&&(P=A-C[$]),C[D]-P>j&&(P=C[D]-j),C[$]+=P,C[D]-=P,a(C),C},()=>{x(null)},(E,S)=>{let F=y(),$=o?S==="start"?"end":"start":S,C=$==="start"?E:E+1,D=$==="start"?E+1:E,I=F[C],M=F[D];if(I!==0&&M!==0)F[C]=0,F[D]+=I,g.current[E]=I;else{let A=I+M,j=p(l[C][0],0),P=p(l[C][1],u),O=p(l[D][0],0),V=p(l[D][1],u),W=Math.max(j,A-V),H=Math.min(P,A-O),q=O||(H-W)/2,z=g.current[E],L=A-z;z&&z<=V&&z>=O&&L<=P&&L>=j?(F[D]=z,F[C]=L):(F[C]-=q,F[D]+=q)}return a(F),F},b?.index]}var ni=B(_()),H$=e=>Kn(e)&&Number.isFinite(e)?Math.round(e):0,ove=300,sve=e=>{let{prefixCls:t,rootPrefixCls:r,vertical:n,index:a,active:o,ariaNow:l,ariaMin:u,ariaMax:d,resizable:p,draggerIcon:m,draggerStyle:v,draggerClassName:g,collapsibleIcon:b,startCollapsible:x,endCollapsible:y,onDraggerDoubleClick:E,onOffsetStart:S,onOffsetUpdate:F,onOffsetEnd:$,onCollapse:C,lazy:D,containerSize:I,showStartCollapsibleIcon:M,showEndCollapsibleIcon:A}=e,j=`${t}-bar`,P=(0,ni.useRef)(0),[O]=bn(r,"splitter"),[V,W]=(0,ni.useState)(null),[H,q]=(0,ni.useState)(0),z=n?0:H,L=n?H:0,U=se=>{se.stopPropagation();let he=Date.now(),le=he-P.current;le>0&&le<ove||(P.current=he,p&&se.currentTarget&&(W([se.pageX,se.pageY]),S(a)))},Y=se=>{if(p&&se.touches.length===1){let he=se.touches[0];W([he.pageX,he.pageY]),S(a)}},X=se=>{let he=I*l/100,le=he+se,ke=Math.max(0,I*u/100),Ae=Math.min(I,I*d/100);return Math.max(ke,Math.min(Ae,le))-he},J=wt((se,he)=>{let le=X(n?he:se);q(le)}),N=wt(()=>{F(a,z,L,!0),q(0),$(!0)}),R=(se,he)=>{(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),C(a,he))},K=se=>{switch(se){case!0:return`${j}-collapse-bar-always-visible`;case!1:return`${j}-collapse-bar-always-hidden`;case"auto":return`${j}-collapse-bar-hover-only`}};or(()=>{if(!V)return;let se={mousemove:he=>{let{pageX:le,pageY:ke}=he,Ae=le-V[0],de=ke-V[1];D?J(Ae,de):F(a,Ae,de)},mouseup:()=>{D?N():$(),W(null)},touchmove:he=>{if(he.touches.length===1){let le=he.touches[0],ke=le.pageX-V[0],Ae=le.pageY-V[1];D?J(ke,Ae):F(a,ke,Ae)}},touchend:()=>{D?N():$(),W(null)}};for(let[he,le]of Object.entries(se))window.addEventListener(he,le);return()=>{for(let[he,le]of Object.entries(se))window.removeEventListener(he,le)}},[V,a,D]);let Q={[O("bar-preview-offset")]:`${H}px`},[ee,te,ne,me]=ni.default.useMemo(()=>{let se=null,he=null,le=b?.start!==void 0,ke=b?.end!==void 0;return n?(se=le?b.start:ni.default.createElement(N$,null),he=ke?b.end:ni.default.createElement(v1,null)):(se=le?b.start:ni.default.createElement(vd,null),he=ke?b.end:ni.default.createElement(Au,null)),[se,he,le,ke]},[b,n]);return ni.default.createElement("div",{className:j},D&&ni.default.createElement("div",{className:Z(`${j}-preview`,{[`${j}-preview-active`]:!!H}),style:Q}),ni.default.createElement("div",{style:v?.default,className:Z(`${j}-dragger`,{[`${j}-dragger-disabled`]:!p,[`${j}-dragger-active`]:o,[`${j}-dragger-customize`]:m!==void 0},g?.default,o&&g?.active),onMouseDown:U,onTouchStart:Y,onDoubleClick:()=>E?.(a),role:"separator","aria-disabled":!p,"aria-orientation":n?"horizontal":"vertical","aria-valuenow":H$(l),"aria-valuemin":H$(u),"aria-valuemax":H$(d)},m!==void 0?ni.default.createElement("div",{className:Z(`${j}-dragger-icon`)},m):null),x&&ni.default.createElement("div",{className:Z(`${j}-collapse-bar`,`${j}-collapse-bar-start`,{[`${j}-collapse-bar-customize`]:ne},K(M)),role:"button",tabIndex:0,"aria-label":"Toggle start panel",onClick:()=>C(a,"start"),onKeyDown:se=>R(se,"start")},ni.default.createElement("span",{className:Z(`${j}-collapse-icon`,`${j}-collapse-start`)},ee)),y&&ni.default.createElement("div",{className:Z(`${j}-collapse-bar`,`${j}-collapse-bar-end`,{[`${j}-collapse-bar-customize`]:me},K(A)),role:"button",tabIndex:0,"aria-label":"Toggle end panel",onClick:()=>C(a,"end"),onKeyDown:se=>R(se,"end")},ni.default.createElement("span",{className:Z(`${j}-collapse-icon`,`${j}-collapse-end`)},te)))},lve=sve,b1={position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"},uve=e=>{let{componentCls:t,colorFill:r,splitBarDraggableSize:n,splitBarSize:a,splitTriggerSize:o,controlItemBgHover:l,controlItemBgActive:u,controlItemBgActiveHover:d,colorPrimary:p,antCls:m,calc:v}=e,[,g]=bn(m,"splitter"),b=`${t}-bar`,x=`${t}-mask`,y=`${t}-panel`,E=v(o).div(2).equal(),S={position:"absolute",background:e.colorPrimary,opacity:.2,pointerEvents:"none",transition:"none",zIndex:1,display:"none"};return{[t]:{...Tt(e),display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`> ${b}`]:{flex:"none",position:"relative",userSelect:"none",[`${b}-dragger`]:{...b1,zIndex:1,"&::before":{content:'""',background:l,...b1},"&::after":{content:'""',background:r,...b1},[`&:hover:not(${b}-dragger-active)`]:{"&::before":{background:u}},"&-active":{zIndex:2,"&::before":{background:d}},[`&-active${b}-dragger-customize`]:{[`${b}-dragger-icon`]:{color:p}},[`&-disabled${b}-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:l}},"&::after":{display:"none"},[`${b}-dragger-icon`]:{display:"none"}},"&-customize":{[`${b}-dragger-icon`]:{...b1,display:"flex",alignItems:"center",color:r},"&::after":{display:"none"}}},[`${b}-collapse-bar`]:{...b1,zIndex:e.zIndexPopupBase,background:l,fontSize:e.fontSizeSM,borderRadius:e.borderRadiusXS,color:e.colorText,cursor:"pointer",opacity:0,display:"flex",alignItems:"center",justifyContent:"center","&:focus-visible":yi(e),[`&:hover:not(${b}-collapse-bar-customize)`]:{background:u},[`&:active:not(${b}-collapse-bar-customize)`]:{background:d},[`${b}-collapse-icon`]:{display:"flex",alignItems:"center"}},[`${b}-collapse-bar-customize`]:{background:"transparent"},"&:hover, &:active, &:focus-within":{[`${b}-collapse-bar-hover-only`]:{opacity:1}},[`${b}-collapse-bar-hover-only`]:{"@media(hover:none)":{opacity:1}},[`${b}-collapse-bar-always-hidden`]:{display:"none"},[`${b}-collapse-bar-always-visible`]:{opacity:1}},[x]:{position:"fixed",zIndex:e.zIndexPopupBase,inset:0,"&-horizontal":{cursor:"col-resize"},"&-vertical":{cursor:"row-resize"}},"&-horizontal":{flexDirection:"row",[`> ${b}`]:{width:0,[`${b}-preview`]:{height:"100%",width:a,...S,[`&${b}-preview-active`]:{display:"block",transform:`translate3d(${g("bar-preview-offset")}, 0, 0)`}},[`${b}-dragger`]:{cursor:"col-resize",height:"100%",width:o,"&::before":{height:"100%",width:a},"&::after":{height:n,width:a}},[`${b}-collapse-bar`]:{width:e.fontSizeSM,height:e.controlHeightSM,"&-start":{left:{_skip_check_:!0,value:"auto"},right:{_skip_check_:!0,value:E},transform:"translateY(-50%)"},"&-end":{left:{_skip_check_:!0,value:E},right:{_skip_check_:!0,value:"auto"},transform:"translateY(-50%)"}}}},"&-vertical":{flexDirection:"column",[`> ${b}`]:{height:0,[`${b}-preview`]:{height:a,width:"100%",...S,[`&${b}-preview-active`]:{display:"block",transform:`translate3d(0, ${g("bar-preview-offset")}, 0)`}},[`${b}-dragger`]:{cursor:"row-resize",width:"100%",height:o,"&::before":{width:"100%",height:a},"&::after":{width:n,height:a}},[`${b}-collapse-bar`]:{height:e.fontSizeSM,width:e.controlHeightSM,"&-start":{top:"auto",bottom:E,transform:"translateX(-50%)"},"&-end":{top:E,bottom:"auto",transform:"translateX(-50%)"}}}},[y]:{overflow:"auto",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{overflow:"hidden"},[`&:has(${t}:only-child)`]:{overflow:"hidden"},"&-transition":{transition:`flex-basis ${e.motionDurationSlow} ${e.motionEaseInOut}`,...Wo()}}}}},cve=e=>{let t=e.splitBarSize||2,r=e.splitTriggerSize||6,n=e.resizeSpinnerSize||20,a=e.splitBarDraggableSize??n;return{splitBarSize:t,splitTriggerSize:r,splitBarDraggableSize:a,resizeSpinnerSize:n}},dve=pt("Splitter",uve,cve),pve=(e,t)=>{let{prefixCls:r,className:n,classNames:a,collapsible:o,style:l,styles:u,layout:d,orientation:p,vertical:m,children:v,destroyOnHidden:g,draggerIcon:b,collapsibleIcon:x,rootClassName:y,onDraggerDoubleClick:E,onResizeStart:S,onResize:F,onResizeEnd:$,lazy:C}=e,{getPrefixCls:D,direction:I,className:M,style:A,classNames:j,styles:P}=xt("splitter"),O=D("splitter",r),V=D(),W=yn(O),[H,q]=dve(O,W),[z,L]=Vo(p,m,d),U=I==="rtl",Y=!L&&U,X=Zge(v),[J,N]=(0,Zo.useState)(),R=et=>{let{offsetWidth:Ue,offsetHeight:Ie}=et,Re=L?Ie:Ue;Re!==0&&N(Re)},[K,Q,ee,te,ne,me]=ave(X,J),se=tve(X,Q,Y),[he,le,ke,Ae,de]=ive(X,se,ee,J,me,Y),ve=wt(et=>{he(et),S?.(Q)}),ye=wt((et,Ue,Ie)=>{let Re=le(et,Ue);Ie?$?.(Re):F?.(Re)}),we=wt(et=>{ke(),et||$?.(Q)}),Oe=wt((et,Ue)=>{let Ie=Ae(et,Ue);F?.(Ie),$?.(Ie);let Re=Ie.map(ht=>Math.abs(ht)<Number.EPSILON);e.onCollapse?.(Re,Ie)}),Fe={...e,vertical:L,orientation:z},$e=Ge(A),Me=Ge(l),[qe,ze]=Ct([j,a],[P,$e,u,Me],{props:Fe},{dragger:{_default:"default"}}),Te=Z(O,n,`${O}-${z}`,{[`${O}-rtl`]:U},y,qe.root,M,q,W,H),Ne=Zo.default.useRef(null);Zo.default.useImperativeHandle(t,()=>({nativeElement:Ne.current}));let Qe=`${O}-mask`,ot=Zo.default.useMemo(()=>{let et=[],Ue=0,Ie=X.length;for(let Re=0;Re<Ie;Re+=1)Ue+=ee[Re],et.push(Ue);return et},[ee,X.length]);return Zo.default.createElement(Ta,{onResize:R},Zo.default.createElement("div",{ref:Ne,style:ze.root,className:Te},X.map((et,Ue)=>{let Ie={...et,className:Z(qe.panel,et.className),style:{...ze.panel,...et.style}},Re=Zo.default.createElement(Kge,{...Ie,prefixCls:O,size:K[Ue],supportMotion:o?.motion&&de===void 0,destroyOnHidden:et.destroyOnHidden??g}),ht=null,lt=se[Ue];if(lt){let Xe=Number.isFinite(ot[Ue-1])?ot[Ue-1]:0,Pe=Number.isFinite(ot[Ue+1])?ot[Ue+1]:1,at=Xe+te[Ue],Nt=Pe-ne[Ue+1],Pt=Xe+ne[Ue],Yr=Pe-te[Ue+1];ht=Zo.default.createElement(lve,{lazy:C,index:Ue,active:de===Ue,prefixCls:O,rootPrefixCls:V,vertical:L,resizable:lt.resizable,draggerStyle:ze.dragger,draggerClassName:qe.dragger,draggerIcon:b,collapsibleIcon:o?.icon||x,ariaNow:ot[Ue]*100,ariaMin:Math.max(at,Nt)*100,ariaMax:Math.min(Pt,Yr)*100,startCollapsible:lt.startCollapsible,endCollapsible:lt.endCollapsible,showStartCollapsibleIcon:lt.showStartCollapsibleIcon,showEndCollapsibleIcon:lt.showEndCollapsibleIcon,onDraggerDoubleClick:E,onOffsetStart:ve,onOffsetUpdate:(Gt,Tr,er,It)=>{let lr=L?er:Tr;Y&&(lr=-lr),ye(Gt,lr,It)},onOffsetEnd:we,onCollapse:Oe,containerSize:J||0})}return Zo.default.createElement(Zo.default.Fragment,{key:`split-panel-${Ue}`},Re,ht)}),Kn(de)&&Zo.default.createElement("div",{"aria-hidden":!0,className:Z(Qe,`${Qe}-${z}`)})))},fve=Zo.default.forwardRef(pve),mve=fve,RW=mve;RW.Panel=Qge;var y1=RW;var vf=null,Nn={open:!1,dismissable:!0,context:null,revision:0},l6=new Set;function OW(e,t){Nn={open:e,dismissable:!0,context:t,revision:Nn.revision+1};for(let r of l6)r()}function hve(e){if(!(!Nn.open||Nn.dismissable===e)){Nn={...Nn,dismissable:e};for(let t of l6)t()}}var bd={open(e){let t=e.sessionId.trim();if(!vf||!t)return!1;if(Nn.open&&Nn.context?.sessionId===t)return!0;let r={sessionId:t};return vf.onOpen(r),OW(!0,r),!0},close(){if(!Nn.open||!Nn.context)return;let e=Nn.context;OW(!1,null),vf?.onClose(e)},closeIfOpen(){return!Nn.open||!Nn.dismissable?!1:(this.close(),!0)},closeTopmost(){return Nn.open?(Nn.dismissable&&this.close(),!0):!1},isOpen(){return Nn.open},isCurrentLifecycle(e,t){return Nn.open&&Nn.revision===e&&Nn.context?.sessionId===t},setDismissable(e){hve(e)}},W$={subscribe(e){return l6.add(e),()=>l6.delete(e)},getSnapshot(){return Nn},getRuntime(){return vf}};function V$(e){return vf=e,()=>{vf===e&&(Nn.open&&bd.close(),vf=null)}}var B0=null,ua={open:!1,dismissable:!0,context:null,revision:0},u6=new Set;function zW(e,t){ua={open:e,dismissable:!0,context:t,revision:ua.revision+1};for(let r of u6)r()}function gve(e){if(!(!ua.open||ua.dismissable===e)){ua={...ua,dismissable:e};for(let t of u6)t()}}var yd={open(e){let t=e.sessionId.trim();if(!t)return!1;let r={...e,sessionId:t};return ua.open&&ua.context?.sessionId===t&&ua.context.intent===r.intent||(B0?.onOpen(r),zW(!0,r)),!0},close(){if(!ua.open||!ua.context)return;let e=ua.context;zW(!1,null),B0?.onClose(e)},closeIfOpen(){return!ua.open||!ua.dismissable?!1:(this.close(),!0)},closeTopmost(){return ua.open?(ua.dismissable&&this.close(),!0):!1},isOpen(){return ua.open},setDismissable(e){gve(e)}},U$={subscribe(e){return u6.add(e),()=>u6.delete(e)},getSnapshot(){return ua},getRuntime(){return B0}};function G$(e){return B0=e,()=>{B0===e&&(ua.open&&yd.close(),B0=null)}}var Bs={open:!1,dismissable:!0,revision:0},I0=null,c6=new Set;function LW(e){Bs={open:e,dismissable:!0,revision:Bs.revision+1};for(let t of c6)t()}var bf={open(){return I0?.onOpen(),LW(!0),!0},close(){Bs.open&&(LW(!1),I0?.onClose())},closeIfOpen(){return Bs.open?Bs.dismissable?(this.close(),!0):!1:!0},isOpen(){return Bs.open},setDismissable(e){if(!(!Bs.open||Bs.dismissable===e)){Bs={...Bs,dismissable:e};for(let t of c6)t()}}},K$={subscribe(e){return c6.add(e),()=>c6.delete(e)},getSnapshot(){return Bs},getRuntime(){return I0}};function X$(e){return I0=e,()=>{I0===e&&(I0=null)}}var w1={open:!1,sessionId:"",revision:0},Q$=new Set;function HW(e){w1={...w1,...e,revision:w1.revision+1},Q$.forEach(t=>t())}var x1={open(e=""){return HW({open:!0,sessionId:e}),!0},close(){w1.open&&HW({open:!1})}},Y$={subscribe(e){return Q$.add(e),()=>Q$.delete(e)},getSnapshot(){return w1}};var J$="wand:page-route",Z$=new Set(["view","session","workspace","workspaceTask","window","tab","task","run","team","settings","range","sidebar","sidebarQuery","workspaceView","conversation","conversationTask","conversationRun","chatFilter","chatActivity","chatQuery","directoryTab","directoryQuery","boardView","q","directory","sort","filters","scheduleView","scheduleQuery","scheduleFilter","scheduleRange","scheduleDate","teamQuery","teamFilter","teamPage","settingsNested","knowledgeScope","knowledgeOwner","knowledgeDocument"]),qW=["sidebarMode","display","zoom","hideCompleted","queue","expandedTask","boardCollapsed","scheduleExpanded"],vve=[{views:["knowledge"],keys:["knowledgeScope","knowledgeOwner","knowledgeDocument"]},{views:["taskboard","issues"],keys:["boardView","q","sort","filters","directory","task"]},{views:["teams","teamchat"],keys:["team","teamQuery","teamFilter","teamPage","run"]},{views:["schedules","calendar"],keys:["scheduleView","scheduleQuery","scheduleFilter","scheduleRange","scheduleDate","range"]},{views:["chats","contacts"],keys:["conversation","conversationTask","conversationRun","chatFilter","chatActivity","chatQuery","directoryTab","directoryQuery"]}],bve=new Set([...qW,"embed","reactUi","nativeInput","reactShell","backToNative","switchServer","passthrough"]);function $n(){return typeof window>"u"?"":window.location.search}function Si(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),window.addEventListener(J$,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(J$,e)})}var yve=256,wve=300,d6=null,M0=null;function xve(e,t){let r=new URLSearchParams(e);for(let o of qW)r.delete(o);let n=t.view;if(n&&n!==r.get("view")){for(let o of vve)if(!o.views.includes(n))for(let l of o.keys)l in t||r.delete(l)}for(let[o,l]of Object.entries(t))l===null||l===""||l.length>yve?r.delete(o):r.set(o,l);let a=r.toString();return a?`?${a}`:""}function WW(e,t){let r=new URL(window.location.href);r.search=xve(r.search,e);let n=`${r.pathname}${r.search}${r.hash}`;n!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(window.history[t==="push"?"pushState":"replaceState"](window.history.state,"",n),window.dispatchEvent(new Event(J$)))}function eD(){M0&&(clearTimeout(M0),M0=null);let e=d6;d6=null,e&&typeof window<"u"&&WW(e,"replace")}function tD(e){typeof window>"u"||(d6={...d6,...e},M0&&clearTimeout(M0),M0=setTimeout(eD,wve))}typeof window<"u"&&window.addEventListener("pagehide",eD);function wa(e,t="push"){typeof window>"u"||(eD(),WW(e,t))}function rD(e,t){let r=new URLSearchParams(e),n=r.get("session");return r.get("view")==="workspace"&&n&&t&&t!==n?"replace":"push"}function yf(e){let t=e.trim();t&&wa({view:"workspace",session:t,task:null,workspace:null,workspaceTask:null,window:null,tab:null})}function zu(e=$n()){return[...new URLSearchParams(e).keys()].some(t=>Z$.has(t))}function nD(e){let t=new URL(e),r=new URL(t.pathname,t.origin);for(let[n,a]of t.searchParams)Z$.has(n)&&r.searchParams.append(n,a);return r.href}function aD(e){return[...new Set(new URLSearchParams(e).keys())].filter(t=>!Z$.has(t)&&!bve.has(t))}var sD=new Set;function iD(e){sD.forEach(t=>t(e))}function UW(e){return sD.add(e),()=>{sD.delete(e)}}var GW={owners:()=>mt("/api/knowledge/owners",{cache:"no-store"}),async list(e){let t=new URLSearchParams({scope:e.scope,ownerId:e.ownerId}),r=await mt(`/api/knowledge?${t}`,{cache:"no-store"});if(r.scope!==e.scope||r.ownerId!==e.ownerId||r.entries.some(n=>n.scope!==e.scope||n.ownerId!==e.ownerId))throw new Error("\u77E5\u8BC6\u5E93\u5F52\u5C5E\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002");return r},async save(e,t,r){let n=await mt(r?`/api/knowledge/${encodeURIComponent(r.id)}`:"/api/knowledge",tn({...e,...t,...r?{revision:r.revision}:{}},r?"PATCH":"POST"));if(n.entry.scope!==e.scope||n.entry.ownerId!==e.ownerId)throw new Error("\u4FDD\u5B58\u56DE\u6267\u5F52\u5C5E\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u5237\u65B0\u786E\u8BA4\uFF1B\u8349\u7A3F\u5DF2\u4FDD\u7559\u3002");return iD(e),n.entry},async remove(e){await mt(`/api/knowledge/${encodeURIComponent(e.id)}`,tn({scope:e.scope,ownerId:e.ownerId,revision:e.revision},"DELETE")),iD(e)},async clearPersonal(e){await mt(`/api/silicon-employees/${encodeURIComponent(e)}/knowledge`,{method:"DELETE"}),iD({scope:"personal",ownerId:e})}},Eve={open:!1,scope:"project",ownerId:"",selectedId:"",mobileDocument:!1,query:"",owners:null,library:null,loading:!1,error:"",busy:!1,conflict:!1,notice:"",draft:null,validationFailed:!1};function za(e){return`${e.scope}:${e.ownerId}`}function wf(e,t){return`${za(e)}:${t||"new"}`}function oD(e){return e instanceof Error?e.message:"\u77E5\u8BC6\u5E93\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"}function KW(e){return!!e&&(!e.original||e.title!==e.original.title||e.content!==e.original.content||e.folder!==e.original.folder)}var kve=class{constructor(e=GW,t=wa){ie(this,"repository",e),ie(this,"route",t),ie(this,"snapshot",{...Eve}),ie(this,"listeners",new Set),ie(this,"drafts",new Map),ie(this,"reads",0),ie(this,"writes",0),ie(this,"getSnapshot",()=>this.snapshot),ie(this,"subscribe",r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}))}publish(e){this.snapshot={...this.snapshot,...e},this.listeners.forEach(t=>t())}rememberDraft(){this.snapshot.draft&&this.drafts.set(wf(this.snapshot,this.snapshot.draft.id),this.snapshot.draft)}hasDrafts(){return[...this.drafts.values(),this.snapshot.draft].some(KW)}restore(e,t=this.snapshot.scope,r=this.snapshot.ownerId,n=this.snapshot.selectedId){let a=this.snapshot;this.rememberDraft();let o=za(a)!==za({scope:t,ownerId:r});(o||!e)&&this.reads++,this.publish({open:e,scope:t,ownerId:r,selectedId:n,mobileDocument:e&&(!a.open||o||a.selectedId!==n)?!!n:a.mobileDocument,...o?{library:null,loading:!1,query:"",error:"",conflict:!1,notice:"",validationFailed:!1}:{},draft:this.drafts.get(wf({scope:t,ownerId:r},n))??null})}open(e,t){let r=e??this.snapshot.scope,n=t??(r===this.snapshot.scope?this.snapshot.ownerId:""),a=r===this.snapshot.scope&&n===this.snapshot.ownerId?this.snapshot.selectedId:"";this.restore(!0,r,n,a),this.route({view:"knowledge",knowledgeScope:r,knowledgeOwner:n,knowledgeDocument:a})}close(){this.snapshot.open&&(this.restore(!1),this.route({view:"workspace"}))}select(e){this.rememberDraft(),this.publish({selectedId:e,mobileDocument:!0,draft:this.drafts.get(wf(this.snapshot,e))??null,error:"",conflict:!1,notice:"",validationFailed:!1}),this.route({knowledgeDocument:e},"replace")}directory(){this.publish({mobileDocument:!1})}search(e){this.publish({query:e})}async load(){let e=++this.reads,t={scope:this.snapshot.scope,ownerId:this.snapshot.ownerId};this.publish({loading:!0,error:"",validationFailed:!1});try{let r=await this.repository.owners();if(e!==this.reads)return;let n=t.scope==="project"?r.projects:r.employees;if(t.ownerId||(t.ownerId=n[0]?.id??""),this.publish({owners:r,ownerId:t.ownerId}),!t.ownerId){this.publish({library:null,loading:!1});return}if(!n.some(l=>l.id===t.ownerId))throw this.publish({library:null}),new Error(t.scope==="personal"?"\u8FD9\u4F4D\u5458\u5DE5\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u5458\u5DE5\u3002":"\u8FD9\u4E2A\u9879\u76EE\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u9879\u76EE\u3002");let a=await this.repository.list(t);if(e!==this.reads)return;let o=this.snapshot.draft?this.snapshot.draft.id:this.snapshot.selectedId||a.entries[0]?.id||"";this.publish({library:a,loading:!1,selectedId:o,draft:this.snapshot.draft??this.drafts.get(wf(t,o))??null}),this.snapshot.open&&this.route({knowledgeScope:t.scope,knowledgeOwner:t.ownerId,knowledgeDocument:o},"replace")}catch(r){if(e===this.reads){let n=r?.status;this.publish({loading:!1,error:oD(r),...n===403||n===404?{library:null}:{}})}}}edit(e){if(this.snapshot.busy||this.snapshot.library?.readOnly||!this.snapshot.library)return;let t={title:e?.title??"",content:e?.content??"",folder:e?.folder??""},r={...t,id:e?.id??"",revision:e?.revision,original:e?t:null,generation:0};this.publish({draft:r,selectedId:e?.id??"",mobileDocument:!0,error:"",conflict:!1,notice:"",validationFailed:!1}),this.rememberDraft()}change(e){if(!this.snapshot.draft||this.snapshot.busy)return;let t={...this.snapshot.draft,...e,generation:this.snapshot.draft.generation+1};this.publish({draft:t,notice:"",...this.snapshot.validationFailed&&t.title.trim()&&t.content.trim()?{validationFailed:!1,error:""}:{}}),this.rememberDraft()}discard(){this.snapshot.busy||(this.snapshot.draft&&this.drafts.delete(wf(this.snapshot,this.snapshot.draft.id)),this.publish({draft:null,error:"",conflict:!1,validationFailed:!1}))}acceptLatestRevision(){let e=this.snapshot.draft,t=this.snapshot.library?.entries.find(r=>r.id===e?.id);!e||!t||t.revision===e.revision||this.snapshot.busy||(this.publish({draft:{...e,revision:t.revision,original:{title:t.title,content:t.content,folder:t.folder},generation:e.generation+1},conflict:!1,error:"",notice:"\u5DF2\u4FDD\u7559\u8349\u7A3F\uFF0C\u8BF7\u5B8C\u6210\u5408\u5E76\u540E\u4FDD\u5B58\u3002"}),this.rememberDraft())}async save(){let e=this.snapshot,t=e.draft;if(!t||e.busy||!e.library||e.library.readOnly)return;if(!t.title.trim()||!t.content.trim()){this.publish({error:"\u8BF7\u586B\u5199\u6587\u6863\u6807\u9898\u548C\u6B63\u6587\u3002",validationFailed:!0});return}let r=wf(e,t.id),n=++this.writes;this.publish({busy:!0,error:"",conflict:!1,notice:"",validationFailed:!1});try{let a=await this.repository.save({scope:e.scope,ownerId:e.ownerId},{title:t.title,content:t.content,folder:t.folder},t.id&&t.revision?{id:t.id,revision:t.revision}:void 0);if(this.drafts.get(r)?.generation===t.generation&&this.drafts.delete(r),n!==this.writes||za(e)!==za(this.snapshot)||this.snapshot.draft!==t)return;this.publish({draft:null,selectedId:a.id,notice:"\u5DF2\u4FDD\u5B58",library:e.library?{...e.library,entries:[a,...e.library.entries.filter(o=>o.id!==a.id)],total:e.library.total+(e.library.entries.some(o=>o.id===a.id)?0:1)}:null}),this.snapshot.open&&this.route({knowledgeDocument:a.id},"replace")}catch(a){za(e)===za(this.snapshot)&&this.snapshot.draft===t&&this.publish({error:oD(a),conflict:a.status===409})}finally{n===this.writes&&(this.publish({busy:!1}),this.snapshot.open&&this.snapshot.draft!==t&&za(e)===za(this.snapshot)&&this.load())}}async remove(e){if(this.snapshot.busy||za(e)!==za(this.snapshot))return;let t=++this.writes;this.publish({busy:!0,error:"",notice:""});try{if(await this.repository.remove(e),this.drafts.delete(wf(e,e.id)),za(e)!==za(this.snapshot))return;let r=this.snapshot.library;r&&this.publish({library:{...r,entries:r.entries.filter(n=>n.id!==e.id),total:Math.max(0,r.total-(r.entries.some(n=>n.id===e.id)?1:0))}}),this.snapshot.selectedId===e.id&&this.publish({selectedId:"",draft:null,mobileDocument:!1,notice:"\u5DF2\u5220\u9664"}),await this.load()}catch(r){za(e)===za(this.snapshot)&&this.publish({error:oD(r)})}finally{t===this.writes&&this.publish({busy:!1})}}},es=new kve,kl=es,VW=!1;function lD(){if(VW||typeof window>"u")return;VW=!0;let e=()=>{let t=new URLSearchParams($n());if(t.get("view")!=="knowledge"){es.restore(!1);return}es.restore(!0,t.get("knowledgeScope")==="personal"?"personal":"project",t.get("knowledgeOwner")??"",t.get("knowledgeDocument")??"")};Si(e),e(),UW(t=>{let r=kl.getSnapshot();r.open&&!r.busy&&za(r)===za(t)&&es.load()}),window.addEventListener("beforeunload",t=>{es.hasDrafts()&&(t.preventDefault(),t.returnValue="")})}var uD=B(_(),1),wd=B(_(),1);function cD(e,t){return e?Array.from(e.querySelectorAll(t)).find(r=>!r.matches(":disabled, [aria-disabled='true']")&&r.getClientRects().length>0)??null:null}function Cve(e,t){let r=e.ownerDocument,n=r.defaultView?.MutationObserver;if(!n)return()=>{};let a=!0,o=new n(()=>{if(!a)return;let u=cD(e,"[data-wand-autofocus]");if(!u)return;let d=r.activeElement===(t??e);l(),d&&u.focus()});function l(){a&&(a=!1,o.disconnect(),r.removeEventListener("pointerdown",l,!0),r.removeEventListener("keydown",l,!0))}return r.addEventListener("pointerdown",l,!0),r.addEventListener("keydown",l,!0),o.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-wand-autofocus","disabled","aria-disabled","hidden","style","class"]}),l}function Sve(e,t,r,n,a,o){if(!e&&t.reason==="outside-press"&&(!r||a-n<500)){t.cancel();return}if(!e&&!r&&t.reason==="escape-key"){t.cancel();return}o(e)}var ai=B(Ee(),1),Fve={info:"info",warning:"warning",danger:"warning",success:"check",question:"question"};function Cl({open:e,title:t,description:r,children:n,width:a=520,styles:o,zIndex:l,className:u="wand-ui-dialog-content",overlayClassName:d="wand-ui-dialog-overlay",titleClassName:p="wand-ui-dialog-title",descriptionClassName:m="wand-ui-dialog-description",headerClassName:v="wand-ui-dialog-heading",closeLabel:g="\u5173\u95ED",closeContent:b=(0,ai.jsx)(De,{name:"close",size:18}),testId:x,showClose:y=!0,dismissable:E=!0,onOpenChange:S,onEscape:F,dismissalPriority:$="normal",focusTriggerAfterClose:C,onAfterClose:D}){let I=va(),M=uD.useId(),A=(0,wd.useRef)(null),j=(0,wd.useRef)(0),P=(0,wd.useRef)(null);Qn(e,()=>{F?F():E&&S(!1)},$),(0,wd.useEffect)(()=>(e&&(j.current=performance.now()),()=>{P.current?.(),P.current=null}),[e]);let O=()=>{P.current?.();let H=A.current,q=cD(H,"[data-wand-autofocus]"),z=cD(H,"input, textarea, select, button, [tabindex='0']");(q??z)?.focus({preventScroll:!0}),H&&!q&&(P.current=Cve(H,z))},[V,W]=uD.useState(null);return uD.useEffect(()=>{if(!e||V)return;let H=!0;return globalThis.__wandImportBrowserModule("0f5fdbfe56fd9050").then(q=>{H&&W(()=>q.WandDialogModal)}),()=>{H=!1}},[e,V]),V?(0,ai.jsx)(Bt,{children:(0,ai.jsx)(V,{open:e,centered:!0,footer:null,destroyOnHidden:!0,getContainer:I??void 0,"aria-describedby":r?M:void 0,keyboard:!1,closable:!1,mask:{closable:E},width:a,styles:o,zIndex:l,focusable:{focusTriggerAfterClose:C??!D},afterClose:D,classNames:{container:`wand-ui-dialog-content ${u}`,mask:d},onCancel:H=>{let q=H.type==="keydown"?"escape-key":"outside-press";Sve(!1,{reason:q,cancel(){}},E,j.current,performance.now(),S)},afterOpenChange:H=>{H&&O()},modalRender:H=>(0,ai.jsx)("div",{ref:A,"data-testid":x,"data-wand-dialog-surface":"","data-slot":"dialog-popup",children:H}),title:(0,ai.jsxs)(Ye,{className:v,align:"flex-start",justify:"space-between",gap:"small",children:[(0,ai.jsxs)(Ye,{vertical:!0,style:{flex:1,minWidth:0,overflowWrap:"anywhere"},children:[(0,ai.jsx)(Wt.Text,{className:p,style:{fontSize:"inherit",fontWeight:"inherit"},children:t}),r&&(0,ai.jsx)(Wt.Paragraph,{id:M,className:m,style:{margin:0,whiteSpace:"pre-wrap",fontWeight:"normal"},children:r})]}),y&&(0,ai.jsx)(je,{kind:"ghost",style:{flexShrink:0},"aria-label":g,disabled:!E,onClick:()=>S(!1),children:b})]}),children:n})}):(0,ai.jsx)(Bt,{children:null})}function xf({open:e,title:t,description:r,tone:n="info",icon:a,actions:o,input:l,dismissable:u=!0,focusTriggerAfterClose:d,onAction:p,onDismiss:m}){let v=(0,wd.useRef)(null),g=(0,wd.useRef)(!1),[b,x]=(0,wd.useState)(l?.value??"");(0,wd.useEffect)(()=>{if(!e||!l)return;let F=requestAnimationFrame(()=>{v.current?.focus(),v.current?.select()});return()=>cancelAnimationFrame(F)},[e,!!l]);let y=o.find(F=>F.kind==="primary"||F.kind==="danger")??o.at(-1),E=F=>{F.key!=="Enter"||!y||g.current||F.nativeEvent.isComposing||F.nativeEvent.keyCode===229||(F.preventDefault(),p(y.value,b))},S=a==null||["","i","!","\u2713","?"].includes(String(a))?(0,ai.jsx)(De,{name:Fve[n],size:18}):a;return(0,ai.jsxs)(Cl,{open:e,title:t,description:r,dismissable:u,showClose:!1,focusTriggerAfterClose:d,onOpenChange:F=>{F||m()},children:[(0,ai.jsx)("div",{"aria-hidden":"true",className:"wand-ui-dialog-icon",children:S}),l&&(0,ai.jsx)(_u,{ref:v,"data-wand-autofocus":"true","aria-label":l.label??t,autoComplete:"off",spellCheck:!1,placeholder:l.placeholder,value:b,onChange:F=>x(F.currentTarget.value),onCompositionStart:()=>{g.current=!0},onCompositionEnd:()=>{g.current=!1},onKeyDown:E}),(0,ai.jsx)("div",{className:"wand-ui-dialog-actions",children:o.map((F,$)=>(0,ai.jsx)(je,{kind:F.kind,"data-wand-autofocus":F.autoFocus?"true":void 0,onClick:()=>p(F.value,l?b:void 0),children:F.label},`${F.label}:${$}`))})]})}var Ef=B(_(),1),ii=B(Ee(),1);function Pn(e,t,r,n){let a=null,o=null;function l(){return a?Promise.resolve(a):(o||(o=e().then(u=>(a=u,u)).catch(u=>{throw o=null,u})),o)}return function(u){let d=Ef.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot),p=r(d,u),m=n.dismissable?.(u)!==!1,[v,g]=Ef.useState(()=>a),[b,x]=Ef.useState(""),[y,E]=Ef.useState(0),S=Ef.useRef(!1);if(p&&(S.current=!0),Ef.useEffect(()=>{if(!p||v)return;let $=!0;return l().then(C=>{$&&g(()=>C)},()=>{$&&x("\u8D44\u6E90\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\uFF1B\u670D\u52A1\u66F4\u65B0\u540E\u53EF\u80FD\u9700\u8981\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002")}),()=>{$=!1}},[p,v,y]),Ef.useEffect(()=>{if(!p||v||!n.page||!m)return;let $=C=>{C.key!=="Escape"||C.defaultPrevented||C.isComposing||(C.preventDefault(),n.close())};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[p,v,m]),v&&S.current)return(0,ii.jsx)(v,{...u});if(!p)return null;let F=(0,ii.jsx)(Ye,{vertical:!0,gap:"small","aria-busy":!b,children:b?(0,ii.jsxs)(ii.Fragment,{children:[(0,ii.jsx)(ri,{type:"error",showIcon:!0,title:b}),(0,ii.jsxs)(Ye,{gap:"small",children:[(0,ii.jsx)(je,{onClick:()=>{x(""),E($=>$+1)},children:"\u91CD\u8BD5"}),(0,ii.jsx)(je,{onClick:()=>window.location.reload(),children:"\u91CD\u65B0\u52A0\u8F7D\u9875\u9762"})]})]}):(0,ii.jsxs)(Ye,{align:"center",gap:"small",role:"status",children:[(0,ii.jsx)(Ki,{}),"\u6B63\u5728\u52A0\u8F7D",n.title,"\u2026"]})});return n.renderPending?n.renderPending(F,u,{failed:!!b}):n.inline?F:n.page?(0,ii.jsxs)(Ye,{vertical:!0,gap:"middle",component:"section","aria-label":n.title,style:{position:"absolute",inset:0,zIndex:8,background:"var(--bg-primary)",padding:"var(--wand-page-inset)",overflow:"auto"},children:[(0,ii.jsxs)(Ye,{align:"center",gap:"small",children:[m?(0,ii.jsx)(je,{kind:"soft",onClick:n.close,children:"\u8FD4\u56DE"}):null,(0,ii.jsx)("h1",{children:n.title})]}),F]}):(0,ii.jsx)(Cl,{open:!0,title:n.title,onOpenChange:$=>{$||n.close()},children:F})}}var $ve={subscribe:()=>()=>{},getSnapshot:()=>null};function T0(e,t){return Pn(()=>e().then(r=>function({enabled:n,...a}){return(0,ii.jsx)(r,{...a})}),$ve,(r,n)=>n.enabled!==!1,{...t,inline:!0,close:()=>{}})}var ts=B(_(),1);function E1(){return ts.useSyncExternalStore(Si,$n,()=>"")}function dD(e,t,r=l=>l,n=String,a="replace",o=0){let l=ts.useSyncExternalStore(Si,()=>new URLSearchParams($n()).get(e),()=>null),u=ts.useRef({fallback:t,parse:r,serialize:n});u.current={fallback:t,parse:r,serialize:n};let d=S=>{if(S===null)return u.current.fallback;try{return u.current.parse(S)}catch{return u.current.fallback}},p=ts.useMemo(()=>d(l),[e,l]),[m,v]=ts.useState(null),g=ts.useRef(null),b=ts.useRef(null),x=ts.useCallback(S=>{let F=u.current.serialize(S),$=u.current.serialize(u.current.fallback);wa({[e]:F===$?null:F},a)},[e,a]),y=ts.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null);let S=b.current;b.current=null,S&&x(S.value),v(null)},[x]);ts.useEffect(()=>{b.current&&(g.current&&(clearTimeout(g.current),g.current=null),b.current=null,v(null))},[l]),ts.useEffect(()=>()=>{g.current&&clearTimeout(g.current),b.current=null},[]);let E=ts.useCallback(S=>{let F=b.current?b.current.value:d(new URLSearchParams($n()).get(e)),$=typeof S=="function"?S(F):S;if(!o){x($);return}b.current={value:$},v({value:$}),g.current&&clearTimeout(g.current),g.current=setTimeout(y,o)},[e,x,y,o]);return[m?m.value:p,E]}var Dve=JSON.stringify;function Ave(e,t){return r=>e.includes(r)?r:t}var k1=B(_(),1),Bve=B(Jt(),1),Dn=B(Ee(),1);function kf({active:e,from:t,to:r,size:n=18}){let a=ga();return(0,Dn.jsx)("span",{className:"conversation-morph-icon",style:{width:n,height:n},"aria-hidden":"true",children:[t,r].map((o,l)=>(0,Dn.jsx)("span",{"data-active":l===1===e,style:{opacity:l===1===e?1:0,transform:a?"none":l===1===e?"rotate(0) scale(1)":`rotate(${l?-18:18}deg) scale(.9)`,transition:a?"none":void 0},children:(0,Dn.jsx)(De,{name:o,size:n})},l))})}function Ive({phase:e,disabled:t,onClick:r}){let n=ga(),a={idle:"\u660E\u786E\u6279\u51C6\u672C\u8F6E\u8BA1\u5212",sending:"\u6279\u51C6\u4E2D",sent:"\u5DF2\u6279\u51C6",result:"\u6279\u51C6\u5DF2\u63A5\u53D7",failed:"\u6279\u51C6\u5931\u8D25",unknown:"\u6279\u51C6\u672A\u786E\u8BA4"};return(0,Dn.jsx)(je,{className:"conversation-approval","aria-label":a[e],disabled:t,onClick:r,style:{minWidth:96,height:44,flexShrink:0},children:(0,Dn.jsx)("span",{"data-approval-phase":e,style:{display:"grid"},"aria-live":"polite",children:Object.entries(a).map(([o,l])=>(0,Dn.jsx)("span",{"aria-hidden":o!==e,style:{gridArea:"1 / 1",opacity:o===e?1:0,transition:n?"none":"opacity var(--motion-fast) var(--ease-in-out-smooth)"},children:l},o))})})}var pD=["\u53D1\u9001\u6D88\u606F","\u53D1\u9001\u5E76\u5F00\u59CB\u65B0\u5DE5\u4F5C","\u53D1\u9001\u4E2D","\u5DF2\u63A5\u53D7","\u64CD\u4F5C\u5931\u8D25","\u9001\u8FBE\u672A\u786E\u8BA4","\u505C\u6B62\u672C\u8F6E","\u6D3E\u53D1\u4EFB\u52A1","\u786E\u8BA4\u7EE7\u7EED\u6B64\u4EFB\u52A1"];function Mve(e){return pD.includes(e)?pD:[...pD,e]}function Tve({phase:e,stops:t,disabled:r,label:n,onClick:a,showLabel:o=!1,disabledReason:l,descriptionId:u}){return(0,Dn.jsxs)(Fr,{kind:"primary",className:`conversation-submit conversation-composer-control${o?" conversation-submit-labelled":""}`,"aria-label":n,title:r&&l?l:n,"aria-describedby":u,disabled:r,onClick:a,children:[(0,Dn.jsxs)("span",{className:"conversation-submit-slots","data-phase":e,children:[(0,Dn.jsx)("span",{"data-slot":"idle",children:(0,Dn.jsx)(kf,{active:t,from:"up",to:"stop"})}),(0,Dn.jsx)("span",{"data-slot":"sending",children:(0,Dn.jsx)(De,{name:"refresh"})}),(0,Dn.jsx)("span",{"data-slot":"sent",children:(0,Dn.jsx)(De,{name:"check"})}),(0,Dn.jsx)("span",{"data-slot":"failed",children:(0,Dn.jsx)(De,{name:"warning"})}),(0,Dn.jsx)("span",{"data-slot":"unknown",children:(0,Dn.jsx)(De,{name:"question"})})]}),o?(0,Dn.jsx)("span",{className:"conversation-submit-labels","aria-hidden":"true",children:Mve(n).map(d=>(0,Dn.jsx)("span",{className:"conversation-submit-label","data-active":d===n||void 0,children:d},d))}):null]})}function fD({open:e,owner:t,anchorRef:r,triggerRef:n,onClose:a,direction:o="down",focusKey:l,children:u}){let d=ga(),p=k1.useRef(null),m=k1.useRef(a);m.current=a;let v=h0(),g=va();k1.useLayoutEffect(()=>e?g0(t,v):void 0,[e,t,v]),Qn(e,()=>{m.current(),n.current?.focus({preventScroll:!0})}),k1.useEffect(()=>{if(!e)return;let x=y=>{r.current?.contains(y.target)||lf(y.target,t)||m.current()};return document.addEventListener("pointerdown",x,!0),()=>{document.removeEventListener("pointerdown",x,!0)}},[e,r,n,t]),k1.useLayoutEffect(()=>{let x=r.current,y=p.current;if(!e||!x||!y)return;let E=o==="up"?x.closest(".conversation-composer")??x:x,S=()=>{let j=x.closest(".sidebar,.conversation-root")?.getBoundingClientRect(),P=E.getBoundingClientRect(),O=j?.left??0,V=j?.right??window.innerWidth,W=Math.min(o==="up"?P.width:360,V-O-24,window.innerWidth-24),H=o==="up"?P.left:Math.max(O+12,Math.min(P.right-W,V-W-12));y.style.width=`${W}px`,y.style.left=`${Math.max(12,Math.min(H,window.innerWidth-W-12))}px`,y.style.right="auto";let q=o==="up"||window.innerHeight-P.bottom<Math.min(y.scrollHeight,280)&&P.top>window.innerHeight-P.bottom;y.style.top=q?"auto":`${P.bottom+4}px`,y.style.bottom=q?`${window.innerHeight-P.top+4}px`:"auto",y.style.maxHeight=`${Math.max(80,Math.min(window.innerHeight*.66,(q?P.top:window.innerHeight-P.bottom)-16))}px`};S();let F=!1,$=!1,C=0,D=()=>{if(F||$)return $;let j=Array.from(y.querySelectorAll("input,button,[tabindex='0']")).find(P=>!P.matches(":disabled")&&!P.closest("[hidden],[inert]")&&P.getClientRects().length&&getComputedStyle(P).visibility==="visible");return j?.focus({preventScroll:!0}),$=!!j&&document.activeElement===j,$};C=requestAnimationFrame(()=>{if(D()||F)return;let j=y.getAnimations();j.length&&Promise.allSettled(j.map(P=>P.finished)).then(()=>{F||(C=requestAnimationFrame(D))})});let I=()=>{F=!0,cancelAnimationFrame(C)},M=new MutationObserver(()=>{F||$||(cancelAnimationFrame(C),C=requestAnimationFrame(D))});M.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","hidden","inert"]}),document.addEventListener("pointerdown",I,!0),document.addEventListener("keydown",I,!0);let A=new ResizeObserver(S);return A.observe(x),A.observe(y),E!==x&&A.observe(E),window.addEventListener("resize",S),window.addEventListener("scroll",S,!0),()=>{I(),M.disconnect(),document.removeEventListener("pointerdown",I,!0),document.removeEventListener("keydown",I,!0),A.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("scroll",S,!0)}},[e,r,o,l]);let b=(0,Dn.jsx)("div",{ref:p,id:t,className:`conversation-panel conversation-panel-${o}`,"data-open":e,"data-wand-popup-owner":t,"aria-hidden":!e,inert:!e,style:{position:"fixed",transition:d?"none":void 0},children:(0,Dn.jsx)(P2,{owner:t,children:u})});return typeof document>"u"?b:(0,Bve.createPortal)(b,g??document.body)}var j0=B(_()),p6=e=>{if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}},QW={},XW=(e,t)=>{if(!e&&(e===!1||t===!1||t===null))return!1;if(!zr(e)&&!zr(t))return null;let r={closeIcon:typeof t!="boolean"&&zr(t)?t:void 0};return kt(e)&&(r={...r,...e}),r},jve=(e,t,r)=>e===!1?!1:e?Dx(r,t,e):t===!1?!1:t?Dx(r,t):r.closable?r:!1,_ve=(e,t,r)=>{let{closeIconRender:n}=t,{closeIcon:a,...o}=e,l=a,u=ei(o,!0);return zr(l)&&(n&&(l=n(l)),l=j0.default.isValidElement(l)?j0.default.cloneElement(l,{"aria-label":r,...l.props,...u}):j0.default.createElement("span",{"aria-label":r,...u},l)),[l,{"aria-label":r,...u}]},YW=(e,t,r=QW,n="Close")=>{let a=XW(e?.closable,e?.closeIcon),o=XW(t?.closable,t?.closeIcon),l={closeIcon:j0.default.createElement(fd,null),...r},u=jve(a,o,l),d=typeof u!="boolean"?!!u?.disabled:!1;if(u===!1)return[!1,null,d,{}];let[p,m]=_ve(u,l,n);return[!0,p,d,m]},mD=(e,t,r=QW)=>{let[n]=Op("global",yu.global);return j0.default.useMemo(()=>YW(e,t,{closeIcon:j0.default.createElement(fd,null),...r},n.close),[e,t,r,n.close])};var Qi=B(_()),C1=B(_()),Nve=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:a,calc:o}=e,l=o(n).sub(r).equal(),u=o(t).sub(r).equal();return{[a]:{...Tt(e),display:"inline-block",height:"auto",paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:u,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:"not-allowed",[`&:not(${a}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:"transparent"}},[`&${a}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${a}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:"flex",flexWrap:"wrap",gap:e.paddingXS}},"&-hidden":{display:"none"},"> svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},[`> ${e.iconCls} + span, > span + ${e.iconCls}, > svg + span, > span + svg`]:{marginInlineStart:l}},[`&${e.componentCls}-solid`]:{borderColor:"transparent",color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${a}-default`]:{color:e.solidTextColor}},[`${a}-filled`]:{borderColor:"transparent",backgroundColor:e.tagBorderlessBg},[`&${a}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",backgroundColor:e.colorBgContainerDisabled,a:{cursor:"not-allowed",pointerEvents:"none",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${a}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${a}-solid, &${a}-filled`]:{color:e.colorTextDisabled,[`${a}-close-icon`]:{color:e.colorTextDisabled}},[`${a}-close-icon`]:{cursor:"not-allowed",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},hD=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return yt(e,{tagFontSize:a,tagLineHeight:ue(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},gD=e=>{let t=d2(new Up(e.colorBgSolid),"#fff")?"#000":"#fff";return{defaultBg:new Ar(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},vD=pt("Tag",e=>{let t=hD(e);return Nve(t)},gD),Pve=C1.forwardRef((e,t)=>{let{prefixCls:r,style:n,className:a,checked:o,children:l,icon:u,onChange:d,onClick:p,onKeyDown:m,disabled:v,...g}=e,{getPrefixCls:b,tag:x}=C1.useContext(st),y=C1.useContext(ja),E=v??y,S=M=>{E||(d?.(!o),p?.(M))},F=M=>{m?.(M),!(M.defaultPrevented||E)&&M.key===" "&&(M.preventDefault(),M.repeat||d?.(!o))},$=b("tag",r),[C,D]=vD($),I=Z($,`${$}-checkable`,{[`${$}-checkable-checked`]:o,[`${$}-checkable-disabled`]:E},x?.className,a,C,D);return C1.createElement("span",{...g,ref:t,role:"checkbox","aria-checked":o,"aria-disabled":E||void 0,tabIndex:E?-1:0,style:{...x?.style,...n},className:I,onClick:S,onKeyDown:F},u,C1.createElement("span",null,l))}),JW=Pve,_0=B(_()),Rve=_0.default.forwardRef((e,t)=>{let{id:r,prefixCls:n,rootClassName:a,className:o,style:l,classNames:u,styles:d,disabled:p,options:m,value:v,defaultValue:g,onChange:b,multiple:x,...y}=e,{getPrefixCls:E,direction:S,className:F,style:$,classNames:C,styles:D}=xt("tag"),I=E("tag",n),M=`${I}-checkable-group`,A=yn(I),[j,P]=vD(I,A),O=Ge($),V=Ge(l),[W,H]=Ct([C,u],[D,O,d,V],{props:e}),q=(0,_0.useMemo)(()=>Array.isArray(m)?m.map(J=>kt(J)?J:{value:J,label:J}):[],[m]),[z,L]=qt(g,v),U=(J,N)=>{let R=null;if(x){let K=z||[];R=J?[].concat(Zr(K),[N.value]):K.filter(Q=>Q!==N.value)}else R=J?N.value:null;L(R),b?.(R)},Y=_0.default.useRef(null);(0,_0.useImperativeHandle)(t,()=>({nativeElement:Y.current}));let X=ei(y,{aria:!0,data:!0});return _0.default.createElement("div",{...X,className:Z(M,F,a,{[`${M}-disabled`]:p,[`${M}-rtl`]:S==="rtl"},j,P,o,W.root),style:H.root,id:r,ref:Y},q.map(J=>_0.default.createElement(JW,{key:J.value,className:Z(`${M}-item`,W.item,J.className),style:{...H.item,...J.style},checked:x?(z||[]).includes(J.value):z===J.value,onChange:N=>U(N,J),disabled:p},J.label)))}),Ove=Rve,zve=B(_());function Lve(e,t){let{color:r,variant:n,bordered:a}=e;return zve.useMemo(()=>{let o=r?.endsWith("-inverse"),l;n?l=n:o?l="solid":a===!1?l="filled":l=t||"filled";let u=o?r?.replace("-inverse",""):r;u===void 0&&l==="solid"&&(u="default");let d=Jp(u),p=S7(u),m={};if(!d&&!p&&u)if(l==="solid")m.backgroundColor=r;else{let v=new Ar(u).toHsl();v.l=.95,m.backgroundColor=new Ar(v).toHexString(),m.color=r,l==="outlined"&&(m.borderColor=r)}return[l,u,d,p,m]},[r,n,a,t])}var Hve=e=>Zc(e,(t,{textColor:r,lightBorderColor:n,lightColor:a,darkColor:o})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:a,borderColor:n,color:r},[`&${e.componentCls}-solid`]:{backgroundColor:o,borderColor:o,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:a,color:r}}})),qve=Nh(["Tag","preset"],e=>{let t=hD(e);return Hve(t)},gD);function Wve(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}var f6=(e,t,r)=>{let n=Wve(r);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${n}Bg`],borderColor:e[`color${n}Border`],color:e[`color${r}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${r}`],borderColor:e[`color${r}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${n}Bg`],color:e[`color${r}`]}}}},Vve=Nh(["Tag","status"],e=>{let t=hD(e);return[f6(t,"success","Success"),f6(t,"processing","Info"),f6(t,"error","Error"),f6(t,"warning","Warning")]},gD),Uve=Qi.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:a,style:o,children:l,icon:u,color:d,variant:p,onClose:m,bordered:v,disabled:g,href:b,target:x,styles:y,classNames:E,...S}=e,{getPrefixCls:F,direction:$,className:C,variant:D,style:I,classNames:M,styles:A}=xt("tag"),[j,P,O,V,W]=Lve(e,D),H=O||V,q=Qi.useContext(ja),z=g??q,{tag:L}=Qi.useContext(st),[U,Y]=Qi.useState(!0),X=Ut(S,["closeIcon","closable"]),J={...e,color:P,variant:j,disabled:z},N=Ge(I),R=Ge(o),[K,Q]=Ct([M,E],[A,N,y,R],{props:J}),ee=Qi.useMemo(()=>{let we=Q.root;return z||(we={...W,...we}),we},[Q.root,W,z]),te=F("tag",r),[ne,me]=vD(te),se=Z(te,C,K.root,`${te}-${j}`,{[`${te}-${P}`]:H,[`${te}-hidden`]:!U,[`${te}-rtl`]:$==="rtl",[`${te}-disabled`]:z},n,a,ne,me),he=we=>{z||(we.stopPropagation(),m?.(we),!we.defaultPrevented&&(b&&we.preventDefault(),Y(!1)))},le=we=>{(we.key==="Enter"||we.key===" ")&&(we.preventDefault(),we.repeat||we.currentTarget.click())},[,ke]=mD(p6(e),p6(L),{closable:!1,closeIconRender:we=>{let Oe=Qi.createElement("span",{role:"button",tabIndex:z?-1:0,"aria-disabled":z||void 0,className:Z(`${te}-close-icon`,K.close),onClick:he,onKeyDown:le,style:Q.close},we);return Kx(we,Oe,Fe=>({onClick:$e=>{Fe?.onClick?.($e),he($e)},onKeyDown:$e=>{Fe?.onKeyDown?.($e),$e.defaultPrevented||le($e)},role:"button",tabIndex:z?-1:0,"aria-disabled":z||void 0,className:Z(Fe?.className,`${te}-close-icon`,K.close),style:{...Q.close,...Fe?.style}}))}}),Ae=cr(S.onClick)||l&&l.type==="a",de=Sr(u,{className:Z(Qi.isValidElement(u)?u.props?.className:void 0,K.icon),style:Q.icon}),ve=de?Qi.createElement(Qi.Fragment,null,de,Lt(l)&&Qi.createElement("span",{className:K.content,style:Q.content},l)):l,ye=Qi.createElement(b?"a":"span",{...X,ref:t,className:se,style:ee,href:z?void 0:b,target:x,onClick:z?void 0:X.onClick,...b&&z?{"aria-disabled":!0}:{}},ve,ke,O&&Qi.createElement(qve,{key:"preset",prefixCls:te}),V&&Qi.createElement(Vve,{key:"status",prefixCls:te}));return Ae?Qi.createElement(rd,{component:"Tag"},ye):ye}),bD=Uve;bD.CheckableTag=JW;bD.CheckableTagGroup=Ove;var xd=bD;var Gr=B(_(),1),Is=B(Ee(),1),wD=Gr.createContext(null);function Ed({children:e,contextTrigger:t,triggers:r=["click"],open:n,defaultOpen:a=!1,onOpenChange:o,closeOnSelect:l=!0}){let u=va(),d=Gr.useRef(null),p=Gr.useRef(null),m=Gr.useRef(null),v=Gr.useCallback(R=>{let K=p.current;if(p.current=R,R||!K)return;let Q=m.current;m.current=null;let ee=document.activeElement;Q?.isConnected&&(ee===document.body||ee&&K.contains(ee))&&Q.focus({preventScroll:!0})},[]),[g,b]=Gr.useState(a),[x,y]=Gr.useState(()=>new Map),E=Gr.useCallback((R,K,Q)=>(y(ee=>new Map(ee).set(R,{item:K,marker:Q})),()=>y(ee=>{let te=new Map(ee);return te.delete(R),te})),[]),S=n??g,F=R=>{R&&(m.current=null),b(R),o?.(R)},[$,C]=Gr.useState(null),D=Gr.useRef(null),I=Gr.useCallback(()=>$?Promise.resolve():(D.current||(D.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(R=>{C(()=>R.DropdownSurface)})),D.current),[$]);Gr.useEffect(()=>{S&&I()},[S,I]);let M=Gr.Children.toArray(e).filter(Gr.isValidElement),A=M.find(R=>R.type===Lu),j=M.find(R=>R.type===Hu);if(Qn(S,()=>{F(!1),d.current?.focus({preventScroll:!0})}),!A&&!t||!j)return null;let{align:P="start",side:O="bottom",sideOffset:V=6,container:W,collisionPadding:H=12,popupOwner:q,className:z,children:L,...U}=j.props,Y={items:[...x.values()].sort((R,K)=>{if(!R.marker||!K.marker)return 0;let Q=R.marker.compareDocumentPosition(K.marker);return Q&Node.DOCUMENT_POSITION_FOLLOWING?-1:Q&Node.DOCUMENT_POSITION_PRECEDING?1:0}).map(R=>R.item),selectable:!1,onClick:()=>{l&&(m.current=d.current,F(!1))}},X=t??Gr.cloneElement(A,{"aria-haspopup":"menu","aria-expanded":S,"aria-controls":U.id}),J=(t??A)?.props,N=Gr.cloneElement(t??A,{"aria-haspopup":"menu","aria-expanded":S,"aria-controls":U.id,onClick:R=>{J?.onClick?.(R),r.includes("click")&&F(!0)},onMouseEnter:R=>{J?.onMouseEnter?.(R),r.includes("hover")&&F(!0)},onContextMenu:R=>{J?.onContextMenu?.(R),r.includes("contextMenu")&&F(!0)}});return(0,Is.jsxs)(Bt,{children:[(0,Is.jsx)(wD.Provider,{value:E,children:L}),$?(0,Is.jsx)($,{trigger:X,triggerRef:d,open:S,onOpenChange:(R,K)=>{K.source==="menu"&&!l||F(R)},triggers:r,getPopupContainer:()=>W??u??document.body,placement:ud(O,P),destroyOnHidden:!0,autoFocus:!0,align:{offset:cd(O,V),overflow:{adjustX:!0,adjustY:!0,shiftX:H,shiftY:H}},classNames:{root:Je("wand-ui-dropdown-content",z)},menu:Y,popupRender:R=>(0,Is.jsx)("div",{...U,ref:v,"data-wand-popup-owner":q??U.id,children:R})}):N]})}function Lu({render:e,className:t,...r}){return e?Gr.cloneElement(e,{...r,className:Je("wand-ui-dropdown-trigger",e.props.className,t)}):(0,Is.jsx)(je,{...r,type:r.type??"button",className:Je("wand-ui-dropdown-trigger",t)})}function Hu(e){return null}function rn({className:e,icon:t,iconSlot:r="start",hint:n,tone:a,children:o,onSelect:l,onClick:u,...d}){let p=Gr.useContext(wD),m=Gr.useId(),v=Gr.useRef(null),{type:g,...b}=d,x=Gr.useRef({onSelect:l,onClick:u});x.current={onSelect:l,onClick:u};let y=Gr.useMemo(()=>({...b,key:m,danger:a==="danger",className:Je("wand-ui-dropdown-item",e),icon:t?(0,Is.jsx)(De,{name:t,slot:r,size:15}):void 0,label:(0,Is.jsxs)(Is.Fragment,{children:[o,n!=null?(0,Is.jsx)("span",{className:"wand-ui-dropdown-item-hint",children:n}):null]}),onClick:({domEvent:E})=>{x.current.onClick?.(E),x.current.onSelect?.()}}),[m,d.id,d.disabled,d.title,e,a,t,r,n,o]);return Gr.useLayoutEffect(()=>p?.(m,y,v.current),[p,m,y]),(0,Is.jsx)("span",{hidden:!0,ref:v})}function Ms({className:e}){let t=Gr.useContext(wD),r=Gr.useId(),n=Gr.useRef(null);return Gr.useLayoutEffect(()=>t?.(r,{key:r,type:"divider",className:e},n.current),[t,r,e]),(0,Is.jsx)("span",{hidden:!0,ref:n})}var ZW=B(_(),1),S1=B(Ee(),1),eV=ZW.createContext(null);function xD({className:e,active:t=null,orientation:r="vertical",variant:n,size:a,children:o,...l}){return(0,S1.jsx)(eV.Provider,{value:t,children:(0,S1.jsx)("nav",{...l,className:Je("wand-ui-navigation",e),"data-orientation":r,children:o})})}function ED({className:e,...t}){return(0,S1.jsx)("ul",{...t,className:Je("wand-ui-navigation-list",e)})}function kD({className:e,...t}){return(0,S1.jsx)("li",{...t,className:Je("wand-ui-navigation-item",e)})}function CD({className:e,render:t,active:r,value:n,orientation:a,size:o="md",variant:l,indicator:u,children:d,...p}){let m=ZW.useContext(eV),v=r??(n!=null&&n===m);return(0,S1.jsxs)(je,{...t?.props,...p,className:Je("wand-ui-navigation-link",t?.props.className,e),kind:v?"soft":"ghost","data-active":v?"":void 0,"aria-current":v?"page":void 0,size:o==="sm"?"small":o==="lg"?"large":"medium",children:[d??t?.props.children,u]})}var yD=B(_(),1),m6=B(Ee(),1);function qu({className:e,size:t="md",variant:r="soft",dismissible:n=!1,open:a,onOpenChange:o,onDismiss:l,closeLabel:u="Dismiss",onClick:d,children:p,...m}){let[v,g]=yD.useState(!0),b=a??v,x=yD.useRef(b);yD.useEffect(()=>{x.current&&!b&&l?.(),x.current=b},[b,l]);let y=m.kind??(r==="destructive"?"danger":r);if(!n)return(0,m6.jsx)(je,{...m,onClick:d,kind:y,size:t==="sm"?"small":t==="lg"?"large":"medium",className:Je("wand-ui-chip",e),children:p});if(!b)return null;let E=()=>{g(!1),o?.(!1)};return(0,m6.jsx)(Bt,{children:(0,m6.jsx)(xd,{className:Je("wand-ui-chip",e),closeIcon:(0,m6.jsx)("span",{"aria-label":u,children:"\xD7"}),closable:!m.disabled,color:y==="primary"?"var(--accent-solid)":y==="danger"?"error":void 0,onClick:S=>{d?.(S),m.disabled||E()},onClose:E,children:p})})}var tV=B(Ee(),1);function F1({open:e,size:t=18}){return(0,tV.jsx)("span",{className:"sidebar-toggle-morph","data-open":e?"true":"false","aria-hidden":"true",children:(0,tV.jsx)(kf,{active:e,from:"rail",to:"close",size:t})})}var rV=B(_(),1),h6=B(Ee(),1);function SD({label:e="\u590D\u5236\u5F53\u524D\u9875\u9762\u94FE\u63A5",menuItem:t=!1}){let r=E1(),[n,a]=rV.useState("idle");rV.useEffect(()=>a("idle"),[r]);let o=()=>{a("pending"),Promise.resolve().then(()=>navigator.clipboard.writeText(nD(window.location.href))).then(()=>a("done"),()=>a("failed"))},l=n==="pending"?"\u6B63\u5728\u590D\u5236\u2026":n==="done"?"\u94FE\u63A5\u5DF2\u590D\u5236":n==="failed"?"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":e;return t?(0,h6.jsx)(rn,{icon:"copy","aria-label":e,disabled:n==="pending",onSelect:o,children:l}):(0,h6.jsxs)(je,{kind:"ghost",size:"small","aria-label":e,title:e,disabled:n==="pending",style:{minWidth:144},onClick:o,children:[(0,h6.jsx)(De,{name:"copy",slot:"start"}),(0,h6.jsx)("span",{"aria-live":"polite",children:l})]})}function FD(){let e=null,t=!1;return{open(r){e=r,t=!1},clear(){e=null,t=!1},loaded(r){e===r&&(t=!0)},isOpen(r){return e===r},isLoaded(r){return e===r&&t}}}function g6(e,t){return t.completionRevision===void 0&&t.viewedCompletionRevision===void 0?{}:{completionRevision:Math.max(e?.completionRevision??0,t.completionRevision??0),viewedCompletionRevision:Math.max(e?.viewedCompletionRevision??0,t.viewedCompletionRevision??0)}}function Yi(e){return(e.completionRevision??0)>(e.viewedCompletionRevision??0)&&!e.archived&&!e.ptyBusy&&!e.ptyCommandRunning&&!e.inFlight&&!e.structuredState?.inFlight&&!e.permissionBlocked&&!e.pendingEscalation&&!(typeof e.providerCliExitCode=="number"&&e.providerCliExitCode!==0)&&["idle","running","exited"].includes(e.status??"")}function v6(e,t){if(e.type==="pane")return t(e);let[r,n]=e.children;return{...e,children:[v6(r,t),v6(n,t)]}}function Gve(e,t,r){return iV(e,t,0,r)}function iV(e,t,r,n){if(e.type==="pane")return e;if(r>=t.length)return{...e,ratio:n};let a=t[r]??0,[o,l]=e.children,u=iV(a===0?o:l,t,r+1,n);return{...e,children:a===0?[u,l]:[o,u]}}function Kve(e){let t=Math.max(0,e.tabs.length-1),r=e.tabs.length===0?0:Math.min(Math.max(0,e.active),t);return r===e.active?e:{type:"pane",active:r,tabs:e.tabs}}function oV(e){if(e.type==="pane")return e;let[t,r]=e.children.map(oV),n=t.type==="pane"&&t.tabs.length===0,a=r.type==="pane"&&r.tabs.length===0;return n&&a?t:n?r:a?t:{...e,children:[t,r]}}function AD(e,t){let r=v6(e,n=>n.tabs.findIndex(a=>a.id===t)<0?n:{type:"pane",active:n.active,tabs:n.tabs.filter(a=>a.id!==t)});return oV(v6(r,n=>Kve(n)))}function Sl(e,t){return e.type==="pane"?e.tabs.find(r=>r.id===t):Sl(e.children[0],t)??Sl(e.children[1],t)}function Xve(e){return{id:`tab-${e}`,kind:"session",sessionId:e}}function N0(e){return{type:"pane",tabs:[e],active:0}}function rs(e){return e.type==="pane"?e.tabs:[...rs(e.children[0]),...rs(e.children[1])]}function So(e){return rs(e).filter(t=>t.kind==="session").map(t=>t.sessionId)}function Ji(e,t){if(t){let r=Sl(e,t);if(r)return r}return e.type==="pane"?e.tabs[e.active]??e.tabs[0]:Ji(e.children[0])??Ji(e.children[1])}function Sf(e){return!e||e.windows.length===0?null:e.windows.find(t=>t.id===e.activeWindowId)??e.windows[0]??null}function Ts(e){let t=Sf(e);return t?Ji(t.layout,t.activeTabId):void 0}function nV(e){return!!(e&&e.type==="windows"&&Array.isArray(e.windows))}function $1(e,t){let r=e||"window",n=2;for(;t.has(r);)r=`${e||"window"}-${n++}`;return t.add(r),r}function b6(e){return e.kind==="session"?`window-${e.sessionId}`:`window-${e.id}`}function $D(e,t,r){if(e.type==="pane"){let d=e.tabs.filter(v=>r.has(v.id)||v.kind==="session"&&!t.has(v.sessionId)?!1:(r.add(v.id),!0));if(d.length===0)return{node:{type:"pane",tabs:[],active:0},extras:[]};let p=e.tabs[e.active],m=p&&d.some(v=>v.id===p.id)?p:d[0];return{node:N0(m),extras:d.filter(v=>v.id!==m.id)}}let n=$D(e.children[0],t,r),a=$D(e.children[1],t,r),o=rs(n.node).length===0,l=rs(a.node).length===0,u=[...n.extras,...a.extras];return o&&l?{node:n.node,extras:u}:o?{node:a.node,extras:u}:l?{node:n.node,extras:u}:{node:{...e,children:[n.node,a.node]},extras:u}}function Wu(e,t,r){let n=new Set(t),a=nV(e)?e.windows:e?[{id:"window-legacy",layout:e}]:[],o=new Set,l=new Set,u=[];for(let m of a){let v=$D(m.layout,n,o);if(rs(v.node).length>0){let g=$1(m.id,l),b=Ji(v.node,m.activeTabId);u.push({id:g,layout:v.node,activeTabId:b?.id})}for(let g of v.extras){let b=$1(b6(g),l);u.push({id:b,layout:N0(g),activeTabId:g.id})}}for(let m of t){let v=Xve(m);if(o.has(v.id))continue;o.add(v.id);let g=$1(b6(v),l);u.push({id:g,layout:N0(v),activeTabId:v.id})}let d=nV(e)?e.activeWindowId:null,p=(r?u.find(m=>So(m.layout).includes(r)):void 0)?.id??u.find(m=>m.id===d)?.id??u[0]?.id??null;return{type:"windows",windows:u,activeWindowId:p}}function y6(e,t){return!e.windows.some(r=>r.id===t)||e.activeWindowId===t?e:{...e,activeWindowId:t}}function Qve(e,t,r){let n=e.activeWindowId!==t,a=e.windows.map(o=>o.id!==t||!Sl(o.layout,r)||o.activeTabId===r?o:(n=!0,{...o,activeTabId:r}));return n?{...e,activeWindowId:t,windows:a}:e}function Yve(e,t,r,n){let a=e.windows.map(o=>o.id===t?{...o,layout:r,activeTabId:Ji(r,n??o.activeTabId)?.id}:o);return{...e,windows:a}}function sV(e,t){for(let r of e.windows){let n=rs(r.layout).find(a=>a.kind==="session"&&a.sessionId===t);if(n)return n}}function DD(e,t,r,n){return e.type==="pane"?e.tabs.some(a=>a.id===t)?{type:"split",dir:n,ratio:.5,children:[e,N0(r)]}:e:Sl(e.children[0],t)?{...e,children:[DD(e.children[0],t,r,n),e.children[1]]}:Sl(e.children[1],t)?{...e,children:[e.children[0],DD(e.children[1],t,r,n)]}:e}function BD(e,t,r,n,a){let o=sV(e,t),l=e.windows.find(g=>g.id===r),u=l&&Ji(l.layout,n??l.activeTabId);if(!o||!u||o.id===u.id)return e;let d=e.windows.map(g=>Sl(g.layout,o.id)?{...g,layout:AD(g.layout,o.id)}:g).filter(g=>rs(g.layout).length>0),p=d.findIndex(g=>g.id===r);if(p<0)return e;let m=d[p],v={...m,layout:DD(m.layout,u.id,o,a),activeTabId:o.id};return d=d.map((g,b)=>b===p?v:g),{...e,windows:d,activeWindowId:r}}function Jve(e,t){let r=e.windows.findIndex(p=>So(p.layout).includes(t));if(r<0)return e;let n=e.windows[r],a=sV(e,t);if(!a)return e;if(rs(n.layout).length<=1)return y6(e,n.id);let o=AD(n.layout,a.id),l=new Set(e.windows.map(p=>p.id)),u={id:$1(b6(a),l),layout:N0(a),activeTabId:a.id},d=[...e.windows];return d.splice(r,1,{...n,layout:o,activeTabId:Ji(o)?.id},u),{...e,windows:d,activeWindowId:u.id}}function Zve(e,t,r,n){return n.length===0?null:e.activeWindowId!==r?n.some(a=>a.id===e.activeWindowId)?e.activeWindowId:n[0].id:n[Math.max(0,t-1)]?.id??n[0].id}function w6(e,t){let r=e.windows.findIndex(a=>a.id===t);if(r<0)return e;let n=e.windows.filter(a=>a.id!==t);return{...e,windows:n,activeWindowId:Zve(e,r,t,n)}}function ID(e,t){let r=e.windows.findIndex(u=>So(u.layout).includes(t));if(r<0)return e;let n=e.windows[r],a=rs(n.layout).find(u=>u.kind==="session"&&u.sessionId===t);if(!a)return e;let o=AD(n.layout,a.id);if(rs(o).length===0)return w6(e,n.id);let l=e.windows.map((u,d)=>d===r?{...n,layout:o,activeTabId:Ji(o,n.activeTabId)?.id}:u);return{...e,windows:l}}function ebe(e,t){let r=e.windows.findIndex(m=>m.id===t);if(r<0)return e;let n=e.windows[r],a=rs(n.layout);if(a.length<=1)return e;let o=new Set(e.windows.filter(m=>m.id!==t).map(m=>m.id)),l=a.map(m=>({id:$1(b6(m),o),layout:N0(m),activeTabId:m.id})),u=Ji(n.layout,n.activeTabId)??a[0],d=l[a.findIndex(m=>m.id===u.id)]??l[0],p=[...e.windows];return p.splice(r,1,...l),{...e,windows:p,activeWindowId:d?.id??null}}function tbe(e){let t=[],r=[];for(let n of e)n.teamStep&&(n.teamStep.runFinished&&!Yi(n)?r:t).push(n);return{live:t,history:r}}function rbe(e){return e.filter(t=>!t.teamStep)}var aV=26;function nbe(e){let t=(e.title||"").replace(/\s+/g," ").trim();return t?Array.from(t).length<=aV?t:`${Array.from(t).slice(0,aV-1).join("")}\u2026`:e.kind==="leader"?"\u8D1F\u8D23\u4EBA\u56DE\u5408":e.memberName||"\u56E2\u961F\u4F1A\u8BDD"}function abe(e){return e.teamChat?.chatTitle?.trim()||e.title?.trim()||"\u4EFB\u52A1\u5904\u7406\u7FA4"}function lV(e){switch(e){case"claude":return"Claude";case"codex":return"Codex";case"opencode":return"OpenCode";case"grok":return"Grok";case"qoder":return"Qoder";case"pi":return"Pi";default:return"\u7EC8\u7AEF"}}function Fl(e){return e.provider==="claude"||e.provider==="codex"||e.provider==="opencode"||e.provider==="grok"||e.provider==="qoder"||e.provider==="pi"?e.provider:Tu(e.command)??void 0}function uV(e){let t=e.trim().toLowerCase();return!t||t==="\u4F1A\u8BDD"||t==="wand \u4F1A\u8BDD"||t==="claude"||t==="codex"||t==="opencode"||t==="grok"||t==="qoder"||t==="pi"||t==="\u7EC8\u7AEF"||/^(claude|codex|opencode|grok|qoder|pi|终端)\s+\d+$/i.test(t)}function cV(e){let t=(e.title||"").trim().toLowerCase(),r=(e.cwd||"").replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean).at(-1)?.toLowerCase()??"";return!!r&&t===r}function Ff(e){return e.map((t,r)=>({session:t,index:r,startedAt:Date.parse(t.startedAt||"")})).sort((t,r)=>{let n=Number.isFinite(t.startedAt),a=Number.isFinite(r.startedAt);return n&&a&&t.startedAt!==r.startedAt?t.startedAt-r.startedAt:n!==a?n?-1:1:t.index-r.index}).map(({session:t})=>t)}function $f(e,t){let r=(e.title||"").trim();return!uV(r)&&!cV(e)?r:`${lV(Fl(e))} ${t+1}`}function P0(e,t,r){return e.teamStep?nbe(e.teamStep):e.teamChat?abe(e):$f(D1(e,r),t)}function D1(e,t){let r=(t||"").trim();return uV(r)||cV({...e,title:r})?e:{...e,title:r}}var Cf=B(Ee(),1);function Df({session:e,className:t,size:r}){let n=Fl(e);return n?r===void 0?(0,Cf.jsx)(wl,{provider:n,className:t}):(0,Cf.jsx)("span",{className:t?`sidebar-provider-mark ${t}`:"sidebar-provider-mark","data-mark-size":r,title:n,style:{display:"inline-flex",width:r,height:r,fontSize:r,lineHeight:0},children:(0,Cf.jsx)(wl,{provider:n})}):(0,Cf.jsx)(De,{name:"terminal",size:r??13,className:t})}function ibe({teamChat:e}){let t=Array.from({length:Math.min(Math.max(e.memberCount,1),2)},(r,n)=>o1({id:`${e.runId}#${n}`,name:e.teamName}));return(0,Cf.jsx)(ki.Group,{className:"workspace-session-team-cats",size:18,children:t.map((r,n)=>(0,Cf.jsx)(ki,{shape:"square",size:18,style:X2(r),icon:(0,Cf.jsx)(Q2,{face:r,size:18})},n))})}var obe=new Set(["claude","codex","opencode","grok","qoder","pi"]);function dV(e){return e.sessionKind==="structured"||e.runner==="claude-cli-print"}function x6(e){return!e||e.status!=="running"||dV(e)?!1:e.provider&&obe.has(e.provider)?e.ptyBusy===!0:e.ptyCommandRunning===!0}function R0(e){if(!e||e.archived)return{active:!1,inFlight:!1,ptyRunning:!1,permissionBlocked:!1};let t=!!e.permissionBlocked,r=dV(e)&&!!e.structuredState?.inFlight,n=x6(e)&&(!e.provider||e.providerCliActive!==!1);return{active:r||n||t,inFlight:r,ptyRunning:n,permissionBlocked:t}}var $l=B(_(),1),pV="wand.sidebar.displayMode",E6=["full","folded","active"],sbe=new Set(["failed","waiting-input","waiting_input","permission-blocked","reconnecting"]);function lbe(e){return E6.includes(e)?e:"full"}function ube(e){let t=E6.indexOf(e);return E6[(t+1)%E6.length]}function O0(e){return sbe.has(String(e.status??""))}function kd(e){return e.archived?!1:e.ptyBusy===!0||e.inFlight===!0||e.status==="thinking"||x6(e)}function Af(e){return!e.archived&&!kd(e)&&!O0(e)&&(e.executionStatus==="queued"||e.status==="queued")}function Bf(e){return!e.archived&&(O0(e)||kd(e)||Af(e)||Yi(e))}function cbe(e,t){return e.map(r=>{let n=u=>Bf(u),a=new Set(r.tasks.filter(u=>u.executionStatus==="queued"||u.executionStatus==="running"||u.sessions.some(n)).map(u=>u.id));for(let u of[...a]){let d=r.tasks.find(m=>m.id===u)?.parentWorkspaceTaskId,p=new Set;for(;d&&!p.has(d);)p.add(d),a.add(d),d=r.tasks.find(m=>m.id===d)?.parentWorkspaceTaskId}let o=r.tasks.filter(u=>a.has(u.id)).map(u=>({...u,sessions:u.sessions.filter(n),archivedSessions:[]})),l=r.standaloneSessions.filter(n);return{...r,tasks:o,standaloneSessions:l,archivedSessions:[]}}).filter(r=>r.tasks.length>0||r.standaloneSessions.length>0)}function dbe(){let[e,t]=$l.useState(()=>{try{return lbe(window.localStorage.getItem(pV))}catch{return"full"}}),r=$l.useCallback(a=>{t(a);try{window.localStorage.setItem(pV,a)}catch{return}},[]),n=$l.useCallback(()=>r(ube(e)),[e,r]);return[e,n,r]}var js=$l.createContext(null);function pbe(e,t,r){return e===t?r:{}}function MD(e,t,r,n,a,o=!0){return a?!0:e==="full"?t:r??(e==="active"?o:n)}function TD(){let[e,,t]=dbe(),[r,n]=dD("sidebarQuery","",void 0,void 0,"replace",250),[a,o]=$l.useState({}),[l,u]=$l.useState({}),d=$l.useCallback(v=>{u(g=>pbe(e,v,g)),t(v)},[e,t]),p=$l.useCallback((v,g)=>{o(b=>({...b,[v]:g}))},[]),m=$l.useCallback((v,g)=>{u(b=>({...b,[v]:g}))},[]);return $l.useMemo(()=>({mode:e,query:r,setMode:d,setQuery:n,normal:a,setNormal:p,overrides:l,setOverride:m}),[e,r,d,a,p,l,m])}var k6={workspaceId:null,workspaceName:"",taskId:null,taskName:"",cwd:"",layout:null,layoutRevision:void 0},A1=k6,C6=new Set,Kr={subscribe(e){return C6.add(e),()=>{C6.delete(e)}},getSnapshot(){return A1},getServerSnapshot(){return k6}};function Dl(e){A1={...A1,...e};for(let t of C6)t()}function jD(){if(A1!==k6){A1=k6;for(let e of C6)e()}}var If=null,oi={open:!1,dismissable:!0,initialCwd:"",initialEmployeeId:"",initialKind:"",workspaceId:"",workspaceTaskId:"",taskName:"",newTask:!1,revision:0},S6=new Set,fV=new Map,_D=new Map;function mV(e,t="",r="",n="",a="",o="",l="",u=!1,d){oi={open:e,dismissable:!0,initialCwd:e?t.trim():"",initialEmployeeId:e?r.trim():"",initialKind:e?n:"",workspaceId:e?a.trim():"",workspaceTaskId:e?o.trim():"",taskName:e?l.trim():"",newTask:e&&u,taskDraft:e?d:void 0,revision:oi.revision+1};for(let p of S6)p()}function fbe(e){if(!(!oi.open||oi.dismissable===e)){oi={...oi,dismissable:e};for(let t of S6)t()}}var La={open(e={}){return!If||oi.open&&!oi.dismissable?!1:(If.onOpen(),mV(!0,e.initialCwd,e.initialEmployeeId,e.initialKind??"",e.workspaceId,e.workspaceTaskId,e.taskName,e.newTask,e.taskDraft),!0)},close(){oi.open&&(mV(!1),If?.onClose())},closeIfOpen(){return!oi.open||!oi.dismissable?!1:(this.close(),!0)},closeTopmost(){return oi.open?(oi.dismissable&&this.close(),!0):!1},isOpen(){return oi.open},setDismissable(e){fbe(e)},getUnknownCreation(e){return fV.get(e)},markUnknownCreation(e){fV.set(e.scope,e)},getAcceptedCreation(e){return _D.get(e)},setAcceptedCreation(e,t){t?_D.set(e,t):_D.delete(e)}},Al={subscribe(e){return S6.add(e),()=>S6.delete(e)},getSnapshot(){return oi},getRuntime(){return If}};function PD(e){return If=e,()=>{If===e&&(oi.open&&La.close(),If=null)}}var z0=null,Zi={open:!1,dismissable:!0,initialCwd:"",initialKind:"task",revision:0},F6=new Set;function ND(e){Zi={...Zi,...e,revision:Zi.revision+1};for(let t of F6)t()}function mbe(e){if(!(!Zi.open||Zi.dismissable===e)){Zi={...Zi,dismissable:e};for(let t of F6)t()}}var Mf={open(e,t="task"){return La.open({initialCwd:e,newTask:t==="task"}),z0?.onOpen(),ND({open:!0,dismissable:!0,initialCwd:e??"",initialKind:t}),!0},close(){La.close(),Zi.open&&(ND({open:!1}),z0?.onClose())},closeIfOpen(){return La.closeIfOpen(),!Zi.open||!Zi.dismissable?!1:(this.close(),!0)},isOpen(){return Zi.open||La.isOpen()},setDismissable(e){La.setDismissable(e),mbe(e)}},Ha={subscribe(e){return F6.add(e),()=>F6.delete(e)},getSnapshot(){return Zi},getRuntime(){return z0},consumeOpen(){Zi.open&&ND({open:!1})}};function RD(e){return z0=e,()=>{z0===e&&(Zi.open&&Mf.close(),z0=null)}}var hbe="Failed to fetch";function _s(e,t){return!(e instanceof Error)||!e.message||e.message===hbe?t:e.message}function Tf(e,t){return _s(e,t)}function Cd(e){return e instanceof DOMException&&e.name==="AbortError"}function si(e,t){return{message:Tf(e,t)}}var jf=B(_(),1),hV=jf.createContext(void 0),L0=jf.createContext(!0);function OD(){let e=jf.useContext(L0),t=jf.useContext(js),[r,n]=jf.useState(!1);return jf.useEffect(()=>{n(!1)},[e,t?.mode,t?.query]),[e&&r,n]}function zD(){return jf.useContext(hV)}var Sd=B(_(),1);function LD({sessionId:e,taskId:t,intoNewTask:r,open:n,onMoved:a}){let[o,l]=Sd.useState([]),[u,d]=Sd.useState(!1),[p,m]=Sd.useState(!1),[v,g]=Sd.useState(""),[b,x]=Sd.useState(0),y=Sd.useRef(!1),E=Sd.useRef(null);Sd.useEffect(()=>{if(!n)return;let F=!1;return d(!0),g(""),cn.listTaskGroups().then(({groups:$})=>{F||l($.flatMap(C=>C.tasks.filter(D=>D.id!==t).map(D=>({id:D.id,label:`${C.workspaceName} / ${D.name}`}))))}).catch($=>{F||g(_s($,"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u3002"))}).finally(()=>{F||d(!1)}),()=>{F=!0}},[n,t,b]);let S=async(F,$,C)=>{if(y.current)return;y.current=!0,m(!0),g("");try{await F()}catch(I){g(_s(I,C)),y.current=!1,m(!1);return}a?.();let D=Ha.getRuntime();D?.toast($,"success");try{await D?.refreshSessions()}catch(I){D?.toast(_s(I,"\u5F52\u5C5E\u5DF2\u66F4\u65B0\uFF0C\u4F46\u5217\u8868\u5237\u65B0\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u5217\u8868\u3002"),"danger")}finally{y.current=!1,m(!1)}};return{targets:o,loading:u,busy:p,error:v,move:F=>{let $=o.find(C=>C.id===F);return $?S(()=>cn.moveSession(F,e),`\u5DF2\u79FB\u81F3 ${$.label}\uFF0C\u8FD0\u884C\u76EE\u5F55\u4E0D\u53D8`,"\u65E0\u6CD5\u79FB\u52A8\u4F1A\u8BDD\u3002"):Promise.resolve()},summarize:()=>r?S(async()=>{if(E.current?.sessionId!==e||E.current.workspaceId!==r.workspaceId){let F=r.synthetic||r.global?await cn.createStandaloneTask({worktree:!1,cwd:r.workspaceCwd}):await cn.createTask(r.workspaceId,{worktree:!1});E.current={sessionId:e,workspaceId:r.workspaceId,id:F.id}}await cn.moveSession(E.current.id,e),E.current=null},"\u5DF2\u5F52\u7EB3\u4E3A\u65B0\u4EFB\u52A1\uFF0C\u7A0D\u540E\u6309\u4F1A\u8BDD\u5185\u5BB9\u81EA\u52A8\u547D\u540D","\u65E0\u6CD5\u5F52\u7EB3\u4E3A\u65B0\u4EFB\u52A1\u3002"):Promise.resolve(),retry:()=>x(F=>F+1)}}function gbe(e,t){for(let r of e){let n=r.tasks.find(a=>a.sessions.some(o=>o.id===t));if(n)return{group:r,task:n}}return null}function HD(e,t){let r=t.trim();if(!r)return null;for(let n of e){let a=n.tasks.find(o=>o.id===r);if(a)return{group:n,task:a}}return null}function $6(e,t){let r={workspaceId:e.task.workspaceId,workspaceName:e.group.global?"":e.group.workspaceName,taskId:e.task.id,taskName:e.task.name,cwd:e.task.cwd};return t&&(r.preferredSessionId=t),r}async function qD(e,t){let r=Ha.getRuntime(),n=e.trim();if(!r||!n){t(e);return}try{let a=await cn.listTaskGroups(),o=gbe(a.groups,n);if(!o){let l=a.groups.find(u=>u.standaloneSessions.some(d=>d.id===n&&!d.teamChat));if(!l){t(e);return}l.synthetic||l.global?r.closeWorkspace():r.openWorkspace({id:l.workspaceId,name:l.workspaceName,cwd:l.workspaceCwd,layout:null,createdAt:l.createdAt??"",lastOpenedAt:null}),r.selectSession(n);return}if(Kr.getSnapshot().taskId===o.task.id){t(e);return}await r.openTask($6(o,n)),r.selectSession(n)}catch{t(e)}}var vbe="system-ai:",WD="\u8FD9\u662F\u7CFB\u7EDF\u8C03\u7528\u8BB0\u5F55\uFF0C\u53EA\u80FD\u67E5\u770B\u65E5\u5FD7\uFF0C\u4E0D\u80FD\u7EE7\u7EED\u53D1\u9001\u6216\u6062\u590D\u6267\u884C\u3002";function Ns(e){return typeof e?.automationId=="string"&&e.automationId.startsWith(vbe)}var gV={"system-text":"unspecified","session-title":"auxiliary","task-title":"auxiliary","task-organize":"auxiliary","conversation-organize-job":"auxiliary","conversation-organize":"auxiliary","conversation-summary":"auxiliary","prompt-optimize":"auxiliary","git-commit":"auxiliary","git-tag":"auxiliary","git-fallback":"auxiliary","model-auto-assign":"auxiliary","user-memory":"auxiliary","employee-draft":"auxiliary",decision:"agent-call"},$_e=Object.keys(gV).filter(e=>gV[e]==="auxiliary");async function _f(e){if(typeof WandNative<"u"&&typeof WandNative.copyToClipboard=="function"){if(WandNative.copyToClipboard(e)!=="ok")throw new Error("\u590D\u5236\u5230\u7CFB\u7EDF\u526A\u8D34\u677F\u5931\u8D25\u3002");return}if(!globalThis.navigator?.clipboard?.writeText)throw new Error("\u5F53\u524D\u73AF\u5883\u65E0\u6CD5\u8BBF\u95EE\u526A\u8D34\u677F\u3002");await globalThis.navigator.clipboard.writeText(e)}var Vu=new Map,VD=new Set,bbe=0,UD=()=>{for(let e of VD)e()};function GD(e){return VD.add(e),()=>{VD.delete(e)}}function KD(){return[...Vu.values()]}function ybe(e){Vu.delete(e)&&UD()}function B1(e,t={}){for(let[a,o]of Vu)o.expiresAt!==null&&o.expiresAt<=Date.now()&&Vu.delete(a);for(;Vu.size>=20;)Vu.delete(Vu.keys().next().value);let r=`wand-toast-${++bbe}`,n=t.duration??3200;return Vu.set(r,{id:r,message:e,options:t,expiresAt:n>0?Date.now()+n:null}),UD(),{id:r,dismiss(){Vu.delete(r),UD()}}}var wbe=0,Fd=[],vV={activeDialog:null},XD=new Set;function bV(){vV={activeDialog:Fd[0]??null};for(let e of XD)e()}var xn={dialog(e){let t=++wbe;return new Promise(r=>{Fd=[...Fd,{id:t,options:e,resolve:r}],bV()})},toast(e,t={}){return B1(e,t)},closeTopmost(){let e=Fd[0];return!e||e.options.dismissable===!1?!1:(Ps.completeDialog(e.id,{dismissed:!0}),!0)}},Ps={subscribe(e){return XD.add(e),()=>XD.delete(e)},getSnapshot(){return vV},cancelDialogRequest(e){let t=Fd.find(r=>r.options===e);t&&this.completeDialog(t.id,{dismissed:!0})},completeDialog(e,t){let r=Fd.find(n=>n.id===e);r&&(Fd=Fd.filter(n=>n.id!==e),bV(),r.resolve(t))}};function yV(e){return e.ptyBusy||e.ptyCommandRunning||e.inFlight||e.structuredState?.inFlight||e.permissionBlocked||e.pendingEscalation||e.queuedMessages?.length||e.queuedMessageCount||["thinking","initializing","starting","reconnecting","permission-blocked","waiting-input","waiting_input"].includes(e.status??"")?!0:e.status==="running"&&(e.sessionKind==="structured"||e.runner==="claude-cli-print")}var Rn=B(_(),1),xbe=B(Jt(),1),$d=B(Ee(),1),Ebe=500;function A6({row:e,menu:t,open:r,onOpenChange:n,label:a,title:o,description:l,error:u,className:d,disabled:p=!1,rowRef:m}){let v=zD(),g=va(),b=Rn.useContext(L0),x=p||!b,y=r&&!x,E=Rn.useId(),S=Rn.useRef(null),F=Rn.useRef(null),$=Rn.useRef(null),C=Rn.useRef(null),D=Rn.useRef(!1),I=Rn.useRef(null),M=Rn.useRef(null),A=Rn.useRef(!1),[j,P]=Rn.useState([]),O=Rn.useRef(!1);O.current=j.length>0;let V=()=>{I.current!==null&&clearTimeout(I.current),I.current=null,M.current=null},W=R=>{let K=F.current;R.length&&K?.parentElement&&K.parentElement.appendChild(K),P(R),t.onOpenChange?.(R)},H=()=>{let R=C.current;R?.isConnected?R.focus({preventScroll:!0}):$.current?.querySelector("button,a[href]")?.focus({preventScroll:!0})};Qn(y,()=>{n(!1),H()}),Qn(y&&j.length>0,()=>{if(!O.current){n(!1),H();return}O.current=!1,W([]),S.current?.querySelector(".ant-dropdown-menu-submenu-title")?.focus({preventScroll:!0})}),Rn.useEffect(()=>(y||(V(),P([])),x&&r&&n(!1),V),[y,x]),Rn.useEffect(()=>(document.addEventListener("scroll",V,!0),()=>{V(),document.removeEventListener("scroll",V,!0)}),[]),Rn.useEffect(()=>{if(!y)return;let R=!1,K=()=>{R||S.current?.querySelector('[role="menuitem"]:not([aria-disabled="true"])')?.focus({preventScroll:!0})},Q=requestAnimationFrame(()=>{K();let te=S.current?.closest(".ant-dropdown");Promise.allSettled(te?.getAnimations({subtree:!0}).map(ne=>ne.finished)??[]).then(K)}),ee=()=>{R=!0,cancelAnimationFrame(Q)};return document.addEventListener("pointerdown",ee,!0),document.addEventListener("keydown",ee,!0),()=>{ee(),document.removeEventListener("pointerdown",ee,!0),document.removeEventListener("keydown",ee,!0)}},[y]);let q=(R,K,Q)=>{C.current=Q,D.current=!0,$.current?.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:R,clientY:K,button:2})),D.current=!1},[z,L]=Rn.useState(null),U=Rn.useRef(null),Y=Rn.useRef(null),X=Rn.useCallback(()=>z?Promise.resolve():(U.current||(U.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(R=>{L(()=>R.DropdownSurface)})),U.current),[z]);Rn.useEffect(()=>{if(!z)return;let R=Y.current;if(!R)return;Y.current=null;let K=$.current?.querySelectorAll("button,a[href],[tabindex]")[R.focusIndex];q(R.x,R.y,K??$.current)},[z]);let J=Rn.cloneElement(e,{ref:R=>{$.current=R,m&&(m.current=R),typeof e.props.ref=="function"?e.props.ref(R):e.props.ref&&(e.props.ref.current=R)},tabIndex:e.props.tabIndex??-1,"aria-haspopup":x?void 0:"menu","aria-expanded":x?void 0:y,"aria-controls":y?E:void 0,"aria-description":x?void 0:"\u53F3\u952E\u3001\u957F\u6309\u6216\u6309 Shift+F10 \u6253\u5F00\u64CD\u4F5C\u83DC\u5355","data-sidebar-menu-open":y||void 0,onContextMenu:R=>{R.preventDefault(),R.stopPropagation(),V(),!D.current&&!A.current&&(C.current=R.target.closest("button,a[href],[tabindex]")??$.current),!x&&A.current&&!D.current&&n(!0),e.props.onContextMenu?.(R),!x&&!z&&(Y.current={x:R.clientX,y:R.clientY,focusIndex:Array.from($.current?.querySelectorAll("button,a[href],[tabindex]")??[]).indexOf(C.current)},X())},onKeyDown:R=>{if(e.props.onKeyDown?.(R),!(x||R.defaultPrevented||R.nativeEvent.isComposing)&&(R.key==="ContextMenu"||R.shiftKey&&R.key==="F10")){R.preventDefault(),R.stopPropagation(),V();let K=R.target,Q=K.getBoundingClientRect();q(Q.left+12,Q.bottom,K)}},onPointerDown:R=>{if(e.props.onPointerDown?.(R),V(),A.current=!1,x||R.pointerType!=="touch")return;let K={x:R.clientX,y:R.clientY};M.current=K;let Q=R.target.closest("button,a[href],[tabindex]")??$.current;I.current=setTimeout(()=>{I.current=null,A.current=!0,q(K.x,K.y,Q)},Ebe)},onPointerMove:R=>{e.props.onPointerMove?.(R),M.current&&Math.hypot(R.clientX-M.current.x,R.clientY-M.current.y)>8&&V()},onPointerUp:R=>{V(),A.current&&(R.preventDefault(),R.stopPropagation()),e.props.onPointerUp?.(R)},onTouchEnd:R=>{A.current&&(R.preventDefault(),R.stopPropagation()),e.props.onTouchEnd?.(R)},onPointerCancel:R=>{V(),e.props.onPointerCancel?.(R)},onClickCapture:R=>{A.current?(A.current=!1,R.preventDefault(),R.stopPropagation()):e.props.onClickCapture?.(R)}}),N=[...o?[{key:"context",type:"group",label:(0,$d.jsxs)("div",{className:"sidebar-menu-heading",children:[(0,$d.jsx)("strong",{title:o,children:o}),l?(0,$d.jsx)("span",{title:l,children:l}):null]}),children:[]}]:[],...t.items??[],...u?[{key:"action-error",disabled:!0,label:(0,$d.jsx)("span",{role:"alert",className:"sidebar-menu-error",children:u})}]:[]];return(0,$d.jsxs)(Bt,{children:[z?(0,$d.jsx)(z,{trigger:J,open:y,disabled:x,triggers:["contextMenu"],onOpenChange:(R,K)=>{K.source==="trigger"&&n(R)},getPopupContainer:()=>g??document.body,placement:"bottomLeft",destroyOnHidden:!0,align:{overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},classNames:{root:Je("sidebar-row-menu",d)},styles:{root:{minWidth:"min(224px, calc(100vw - 24px))",maxWidth:"min(288px, calc(100vw - 24px))"},itemContent:{whiteSpace:"normal",overflowWrap:"anywhere"}},menu:{...t,id:E,"aria-label":a,selectable:!1,items:N,openKeys:j,onOpenChange:W,triggerSubMenuAction:"click",getPopupContainer:()=>F.current??g??document.body,builtinPlacements:{rightTop:{points:["tl","tr"],overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},leftTop:{points:["tr","tl"],overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},...t.builtinPlacements},style:{maxHeight:"calc(100dvh - 24px)",overflowY:"auto",overscrollBehavior:"contain",...t.style}},popupRender:R=>(0,$d.jsx)("div",{ref:S,"data-wand-popup-owner":v,onKeyDown:K=>{K.key==="Tab"&&!K.nativeEvent.isComposing&&(n(!1),H(),K.stopPropagation())},children:R})}):J,y&&(0,xbe.createPortal)((0,$d.jsx)("div",{ref:F,className:"sidebar-menu-submenus","data-wand-popup-owner":v}),g??document.body)]})}var QD=B(_(),1),kbe=B(Ee(),1);function M1({title:e,selector:t,children:r}){let n=QD.useRef(null),a=va(),[o,l]=QD.useState(!1);return Qn(o,()=>l(!1)),(0,kbe.jsx)(wi,{title:e,open:o,trigger:["hover","focus"],placement:"bottom",align:{overflow:{adjustX:!0,adjustY:!0,shiftX:!0,shiftY:!0}},getPopupContainer:()=>a??document.body,onOpenChange:u=>{let d=n.current?.querySelector(t);l(u&&!!d&&d.scrollWidth>d.clientWidth)},children:QD.cloneElement(r,{ref:n,title:void 0,onPointerDownCapture:u=>{l(!1),r.props.onPointerDownCapture?.(u)},onContextMenuCapture:u=>{l(!1),r.props.onContextMenuCapture?.(u)},onKeyDownCapture:u=>{(u.key==="ContextMenu"||u.key==="F10"&&u.shiftKey)&&l(!1),r.props.onKeyDownCapture?.(u)}})})}var Nf=B(_(),1);async function Cbe(e){let t=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,r=await xn.dialog({title:`\u5220\u9664\u4F1A\u8BDD\u300C${e}\u300D\uFF1F`,description:"\u5C06\u505C\u6B62\u6B64\u4F1A\u8BDD\u5E76\u5220\u9664\u8BB0\u5F55\uFF0C\u65E0\u6CD5\u64A4\u9500\u3002\u4EFB\u52A1\u548C\u5176\u4ED6\u4F1A\u8BDD\u4FDD\u7559\u3002",focusTriggerAfterClose:t?!1:void 0,actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u5220\u9664\u4F1A\u8BDD",value:!0,kind:"danger"}]});return t&&await new Promise(n=>requestAnimationFrame(()=>{t.isConnected&&!t.closest('[inert], [aria-hidden="true"]')&&(document.activeElement===document.body||document.activeElement?.closest('[role="dialog"]'))&&t.focus({preventScroll:!0}),n()})),r.dismissed!==!0&&!!r.action}var Rs=B(Ee(),1);function B6({row:e,session:t,label:r,disabled:n,intoNewTask:a,onOpen:o,onArchive:l,onDelete:u}){let[d,p]=OD(),[m,v]=Nf.useState(!1),[g,b]=Nf.useState(null),[x,y]=Nf.useState(""),E=Nf.useRef(!1),S=Nf.useRef(null),F=t.archived===!0,$=Ns(t),C=F||t.canArchive!==!1&&!yV(t),D=LD({sessionId:t.id,taskId:t.workspaceTaskId,intoNewTask:a,open:d&&m,onMoved:()=>p(!1)}),I=g!==null||D.busy;Nf.useEffect(()=>{d||v(!1)},[d]);let M=async A=>{if(!(E.current||I||A==="archive"&&!C)){E.current=!0,y("");try{if(A==="delete"&&(p(!1),S.current?.querySelector("button,a[href]")?.focus({preventScroll:!0}),!await Cbe(r)))return;b(A),A==="archive"?await l?.(!F):await u?.(),p(!1)}catch(j){y(_s(j,A==="delete"?"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002":F?"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002":"\u65E0\u6CD5\u5F52\u6863\u4F1A\u8BDD\u3002")),A==="delete"&&S.current?.contains(document.activeElement)&&p(!0)}finally{E.current=!1,b(null)}}};return(0,Rs.jsx)(A6,{row:Nf.cloneElement(e,{"aria-busy":I||void 0,draggable:I?!1:e.props.draggable}),rowRef:S,disabled:n,open:d,onOpenChange:A=>{(!A||!I)&&p(A)},label:`\u4F1A\u8BDD ${r} \u7684\u64CD\u4F5C`,title:r,description:$?"\u7CFB\u7EDF\u8C03\u7528 \xB7 \u53EA\u8BFB\u8BB0\u5F55":F?"\u5DF2\u5F52\u6863\u4F1A\u8BDD":void 0,className:"workspace-session-menu",error:x,menu:{multiple:!0,onOpenChange:A=>{v(A.includes("move")),A.includes("move")&&y("")},items:[{key:"open",disabled:I,icon:(0,Rs.jsx)(De,{name:"chat"}),label:"\u6253\u5F00\u4F1A\u8BDD"},...t.cwd?.trim()?[{key:"copy-cwd",disabled:I,icon:(0,Rs.jsx)(De,{name:"copy"}),label:"\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55"}]:[],...!F&&!$?[{key:"move",disabled:I,icon:(0,Rs.jsx)(De,{name:"folder"}),label:"\u79FB\u52A8\u5230\u4EFB\u52A1",popupClassName:"workspace-session-move-menu",children:[{key:"move-context",type:"group",label:"\u4FDD\u7559\u8FD0\u884C\u76EE\u5F55",children:[]},...a?[{key:"new-task",disabled:I,icon:(0,Rs.jsx)(De,{name:"plus"}),label:D.busy?"\u6B63\u5728\u79FB\u52A8\u2026":"\u5F52\u7EB3\u4E3A\u65B0\u4EFB\u52A1"},{key:"move-divider",type:"divider"}]:[],...D.loading?[{key:"loading",disabled:!0,label:(0,Rs.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u4EFB\u52A1\u2026"})}]:D.targets.length?D.targets.map(A=>({key:`target:${A.id}`,disabled:I,icon:(0,Rs.jsx)(De,{name:"folder"}),label:A.label,title:A.label})):D.error?[]:[{key:"empty",disabled:!0,label:"\u8BF7\u5148\u521B\u5EFA\u53E6\u4E00\u4E2A\u4EFB\u52A1\u3002"}],...D.error?[{key:"move-error",disabled:!0,label:(0,Rs.jsx)("span",{role:"alert",className:"sidebar-menu-error",children:D.error})},{key:"retry",disabled:I||D.loading,icon:(0,Rs.jsx)(De,{name:"refresh"}),label:"\u91CD\u65B0\u52A0\u8F7D\u4EFB\u52A1"}]:[]]}]:[],...l&&C?[{key:"archive",disabled:I,icon:(0,Rs.jsx)(De,{name:F?"resume":"archive"}),label:g==="archive"?F?"\u6B63\u5728\u6062\u590D\u2026":"\u6B63\u5728\u5F52\u6863\u2026":F?"\u6062\u590D\u4F1A\u8BDD":"\u5F52\u6863\u4F1A\u8BDD"}]:[],...u?[{key:"danger-divider",type:"divider"},{key:"delete",disabled:I,danger:!0,icon:(0,Rs.jsx)(De,{name:"trash"}),label:"\u5220\u9664\u4F1A\u8BDD\u2026"}]:[]],onClick:({key:A,domEvent:j})=>{j.stopPropagation(),!I&&(y(""),A==="open"?(p(!1),o()):A==="copy-cwd"&&t.cwd?.trim()?_f(t.cwd).then(()=>p(!1)).catch(P=>y(_s(P,"\u65E0\u6CD5\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55\u3002"))):A==="archive"||A==="delete"?M(A):A==="new-task"?D.summarize():A==="retry"?D.retry():A.startsWith("target:")&&D.move(A.slice(7)))}}})}var Sbe=B(Ee(),1);function JD({active:e,onChange:t,label:r="\u53EA\u770B\u6D3B\u52A8\u4F1A\u8BDD"}){return(0,Sbe.jsx)(je,{kind:"outline",size:"small",className:"sidebar-activity-filter","aria-label":r,"aria-pressed":e,title:"\u6392\u961F\u4E2D\u3001\u5728\u8DD1\u3001\u5F85\u5904\u7406\u53CA\u5C1A\u672A\u67E5\u770B\u7684\u521A\u5B8C\u6210\u5185\u5BB9",onClick:()=>t(!e),children:"\u6D3B\u52A8"})}async function I6(e,t){let r=[...new Set(e.filter(a=>a.trim().length>0))];if(!r.length)return;await cn.deleteSessions(r);let n=Ha.getRuntime();try{let a=Kr.getSnapshot();if(n&&t&&a.taskId===t.id&&a.layout){let o=r.reduce((l,u)=>ID(l,u),a.layout);await n.saveTaskLayout(o)}}finally{await n?.refreshSessions()}}async function M6(e,t){await cn.batchArchiveSessions([e],t),await Ha.getRuntime()?.refreshSessions()}var q0=B(_(),1),I1=B(Ee(),1);function T6({open:e,size:t=16,className:r=""}){return(0,I1.jsx)("span",{className:"sidebar-disclosure-chevron","data-open":e,"aria-hidden":"true",children:(0,I1.jsx)(De,{name:"chevronDown",size:t,className:r})})}function Fbe(e,t=!1){let r=q0.useContext(js),n=`wand.sidebar.${e}`,a=()=>{try{let p=window.localStorage.getItem(n);return p===null?t:p==="true"}catch{return t}},[o,l]=q0.useState(a),u=r?.normal[e]??o,d=p=>{l(p),r?.setNormal(e,p);try{window.localStorage.setItem(n,String(p))}catch{return}};return[u,()=>d(!u),d]}function $be(e,t=!1,r=!1,n,a=!0){let o=q0.useContext(js),[l,,u]=Fbe(e,t),[d,p]=q0.useState(()=>{try{return window.localStorage.getItem(`wand.sidebar.${e}`)!==null}catch{return!1}}),m=d||o?.normal[e]!==void 0;return[MD(o?.mode??"full",m?!l:n??!l,o?.overrides[e],r,!!o?.query.trim(),a),v=>{o?.query.trim()||(!o||o.mode==="full"?(p(!0),u(!v)):o.setOverride(e,v))}]}function W0(e,t){let r=e.closest(".sidebar-peek-body, .sidebar-body");if(!r){t();return}let n=e.getBoundingClientRect().top,a=e.getAttribute("aria-controls"),o=a?r.querySelector(`[id="${CSS.escape(a)}"]`):null;e.getAttribute("aria-expanded")==="true"&&o?.contains(document.activeElement)&&e.focus({preventScroll:!0});let l=r.querySelector(":scope > .sidebar-scroll-compensation");l||(l=document.createElement("div"),l.className="sidebar-scroll-compensation",l.setAttribute("aria-hidden","true"),l.inert=!0,r.append(l));let u=l,d=()=>{if(!e.isConnected){v();return}let g=e.getBoundingClientRect().top-n;if(Math.abs(g)<1)return;let b=r.scrollTop+g,x=Math.max(0,b-(r.scrollHeight-r.clientHeight));x&&(u.style.height=`${u.offsetHeight+x}px`),r.scrollTop=b},p=typeof ResizeObserver>"u"?null:new ResizeObserver(d),m=r.firstElementChild;m&&p?.observe(m);let v=()=>{p?.disconnect(),u.remove(),r.removeEventListener("wheel",v),r.removeEventListener("touchstart",v),r.removeEventListener("pointerdown",v),r.removeEventListener("keydown",v),window.removeEventListener("resize",v)};r.addEventListener("wheel",v,{once:!0,passive:!0}),r.addEventListener("touchstart",v,{once:!0,passive:!0}),r.addEventListener("pointerdown",v,{once:!0}),r.addEventListener("keydown",v,{once:!0}),window.addEventListener("resize",v,{once:!0}),t(),requestAnimationFrame(d)}function j6(e,t,r){if(e.target!==e.currentTarget||e.nativeEvent.isComposing||e.key!=="ArrowRight"&&e.key!=="ArrowLeft")return;e.preventDefault();let n=e.key==="ArrowRight";n!==t&&W0(e.currentTarget,()=>r(n))}function T1({id:e,open:t,children:r}){let n=q0.useRef(null);return q0.useLayoutEffect(()=>{let a=n.current;if(!a)return;let o=a.closest(".sidebar"),l=a.closest(".workspaces-panel"),u=o??l,d=[u?.querySelector(`[aria-controls="${CSS.escape(e)}"]`)],p=a.parentElement?.closest(".wand-sidebar-disclosure");for(;p;)d.push(u?.querySelector(`[aria-controls="${CSS.escape(p.id)}"]`)),p=p.parentElement?.closest(".wand-sidebar-disclosure");d.push(...Array.from(a.closest(".sidebar-peek")?.querySelectorAll(".sidebar-peek-header button")??[]),...Array.from(u?.querySelectorAll(".sidebar-list-actions button, .sidebar-header-actions button")??[]));let m=()=>{d.find(v=>v?.isConnected&&!v.matches(":disabled")&&!v.closest('[inert], [aria-hidden="true"]')&&v.getClientRects().length>0&&getComputedStyle(v).visibility!=="hidden")?.focus({preventScroll:!0})};return!t&&a.contains(document.activeElement)&&m(),()=>{a.contains(document.activeElement)&&(m(),queueMicrotask(()=>{document.activeElement!==document.body&&!a.contains(document.activeElement)||m()}))}},[e,t]),(0,I1.jsx)("div",{ref:n,id:e,className:"wand-sidebar-disclosure","data-open":t,inert:!t,"aria-hidden":!t,children:(0,I1.jsx)(Bt,{children:(0,I1.jsx)(l7,{ghost:!0,destroyOnHidden:!0,activeKey:t?[e]:[],items:[{key:e,label:null,showArrow:!1,collapsible:"disabled",children:r,styles:{header:{display:"none"},body:{padding:0}}}]})})})}var aNe=B(Ee(),1);function _6(e){if(e!=="none")return e==="queued"?"var(--text-secondary)":e==="failed"?"var(--danger, #b24f45)":e==="permission"||e==="waiting-input"||e==="reconnecting"?"var(--warning, #a96a2f)":e==="thinking"?"var(--info, #4a6fa5)":"var(--success, #4f7a58)"}function j1(e){return e.permissionBlocked||e.status==="permission-blocked"?"permission":e.status==="waiting-input"||e.status==="waiting_input"?"waiting-input":e.status==="reconnecting"?"reconnecting":e.status==="failed"?"failed":kd(e)?e.status==="thinking"?"thinking":"running":Af(e)?"queued":Yi(e)?"just-completed":"none"}function Pf(e){switch(e.status){case"failed":return{label:"\u5931\u8D25",icon:"warning",tone:"warning"};case"permission-blocked":return{label:"\u7B49\u5F85\u6388\u6743",icon:"shield",tone:"warning"};case"waiting-input":case"waiting_input":return{label:"\u7B49\u5F85\u56DE\u7B54",icon:"question",tone:"warning"};case"reconnecting":return{label:"\u91CD\u8FDE\u4E2D",icon:"refresh",tone:"warning"}}if(kd(e))return e.status==="thinking"?{label:"\u601D\u8003\u4E2D",icon:"brain",tone:"accent"}:{label:"\u8FD0\u884C\u4E2D",icon:"refresh",tone:"accent",spinning:!0};if(Af(e))return{label:"\u6392\u961F\u4E2D",icon:"history",tone:"muted"};if(Yi(e))return{label:"\u521A\u5B8C\u6210",icon:"check",tone:"success"};switch(e.status){case"exited":return{label:"\u5DF2\u7ED3\u675F",icon:"stop",tone:"muted"};case"stopped":return{label:"\u5DF2\u505C\u6B62",icon:"stop",tone:"muted"};case"idle":case"running":return{label:"\u7A7A\u95F2",icon:"circle",tone:"muted"};default:return{label:"\u72B6\u6001\u672A\u77E5",icon:"question",tone:"muted"}}}function Dbe(e,t){let r=e.filter(O0).length,n=e.filter(kd).length,a=t?.queuedExecutionCount??e.filter(Af).length,o=n>0||t?.executionStatus==="running",l=t?.executionStatus==="queued"||e.some(Af),u=e.filter(d=>!O0(d)&&!kd(d)&&Yi(d)).length;return{label:r?"\u5F85\u5904\u7406":o?"\u8FD0\u884C\u4E2D":l?"\u6392\u961F\u4E2D":u?"\u521A\u5B8C\u6210":"",tone:r?"warning":o?"accent":l?"muted":u?"success":"muted",description:`\u5F53\u524D\u5339\u914D ${e.length} \u4E2A\u4F1A\u8BDD\uFF0C${r} \u4E2A\u5F85\u5904\u7406\uFF0C${n} \u4E2A\u8FD0\u884C\u4E2D${a?`\uFF0C${a} \u6761\u6392\u961F\u4E2D`:""}\uFF0C${u} \u4E2A\u521A\u5B8C\u6210`}}function wV(e,t){return t.standaloneSessions.length>0&&t.standaloneSessions.every(r=>e.sessionIds.includes(r.id))}function Abe(e,t){let r=new Set(t.standaloneSessions.map(n=>n.id));return{...e,sessionIds:wV(e,t)?e.sessionIds.filter(n=>!r.has(n)):[...new Set([...e.sessionIds,...r])]}}function xV(e){return`${e.workspaceName} - \u672A\u5206\u7EC4\u4EFB\u52A1`}function Bbe(e){return{id:`ungrouped:${e.workspaceId}`,workspaceId:e.workspaceId,name:xV(e),cwd:e.workspaceCwd,worktree:null,isolated:!1,layout:null,status:"active",createdAt:e.createdAt??"",lastOpenedAt:null,canArchive:!1,sessions:e.standaloneSessions,archivedSessions:e.archivedSessions}}function Il(e,...t){let r=e.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return!0;let n=t.filter(Boolean).join(" ").toLocaleLowerCase();return r.every(a=>n.includes(a))}function Ibe(e,t,r,n={}){return t.archived||t.status==="done"?[]:e.tasks.some(a=>a.id===t.parentWorkspaceTaskId&&Il(r,a.name))||Il(r,e.workspaceName,e.workspaceCwd,t.name,t.cwd)?t.sessions:t.sessions.filter(a=>Il(r,a.title,n[a.id],a.cwd,a.provider,a.employeeName,a.teamStep?.title,a.teamStep?.memberName,a.teamChat?.chatTitle))}function Mbe(e,t,r={}){let n=new Map(e.flatMap(p=>p.tasks.map(m=>[m.id,p.workspaceId]))),a=new Map(e.flatMap(p=>p.tasks.map(m=>[m.id,m]))),o=p=>{let m=p,v=new Set([m.id]);for(;m.parentWorkspaceTaskId&&a.has(m.parentWorkspaceTaskId)&&!v.has(m.parentWorkspaceTaskId);)m=a.get(m.parentWorkspaceTaskId),v.add(m.id);return n.get(m.id)},l=e.map(p=>({...p,tasks:e.flatMap(m=>m.tasks.filter(v=>v.parentWorkspaceTaskId?o(v)===p.workspaceId:m.workspaceId===p.workspaceId))})).map(p=>{let m=p.tasks,v=new Set(m.filter(b=>!b.archived&&b.status!=="done"&&(b.sessions.length>0||b.executionStatus==="queued"||b.executionStatus==="running"||t.trim()&&Il(t,b.name,b.cwd))).map(b=>b.id)),g=new Map(m.map(b=>[b.id,b]));for(let b of[...v]){let x=g.get(b)?.parentWorkspaceTaskId,y=new Set;for(;x&&!y.has(x);)y.add(x),v.add(x),x=g.get(x)?.parentWorkspaceTaskId}return{...p,workspaceName:p.global?"\u672A\u5F52\u5C5E\u5DE5\u4F5C\u533A":p.workspaceName,tasks:m.filter(b=>v.has(b.id))}}).filter(p=>p.tasks.length>0||p.standaloneSessions.length>0||!!(t.trim()&&p.archivedSessions?.length)).sort((p,m)=>+!!p.global-+!!m.global);if(!t.trim())return l;let u=(...p)=>Il(t,...p),d=p=>[p.title,p.cwd,p.provider,r[p.id]].filter(Boolean).join(" ");return l.flatMap(p=>{let m=p.workspaceName;if(u(m,p.workspaceCwd))return[p];let v=p.tasks.filter(S=>u(m,S.name,S.cwd,...S.sessions.map(d),...(S.archivedSessions??[]).map(d))),g=new Set(v.map(S=>S.id));for(let S of p.tasks)S.parentWorkspaceTaskId&&v.some(F=>F.id===S.parentWorkspaceTaskId)&&g.add(S.id);for(let S of v){let F=S.parentWorkspaceTaskId,$=new Set;for(;F&&!$.has(F);)$.add(F),g.add(F),F=p.tasks.find(C=>C.id===F)?.parentWorkspaceTaskId}let b=p.tasks.filter(S=>g.has(S.id)),x=xV(p),y=p.standaloneSessions.filter(S=>u(x,d(S))),E=p.archivedSessions?.filter(S=>u(x,d(S)));return b.length||y.length||E?.length||u(x)?[{...p,tasks:b,standaloneSessions:y,archivedSessions:E}]:[]})}var Bl=B(_(),1);function Tbe(e,t,r,n,a){let o=t.length;if(!o||!Number.isFinite(e)||e<=0)return{titles:!1,count:0};let l=Number.isFinite(n)?Math.max(0,n):0;if(t.every(d=>Number.isFinite(d)&&d>0)&&t.reduce((d,p)=>d+p,0)+l*(o-1)<=e)return{titles:!0,count:o};if(!Number.isFinite(r)||r<=0)return{titles:!1,count:0};if(r*o+l*(o-1)<=e)return{titles:!1,count:o};let u=0;for(let d=0;d<o;d++){let p=a(o-d);if(!Number.isFinite(p)||p<=0||d*(r+l)+p>e)break;u=d}return{titles:!1,count:u}}var On=B(Ee(),1),jbe=__wandCssTextPool[11];function _be({session:e}){let t=j1(e),r=_6(t)??"var(--text-tertiary)";return(0,On.jsx)("span",{className:"sidebar-session-preview-status",style:{color:r},"aria-hidden":"true",children:t==="just-completed"?(0,On.jsx)(De,{name:"check",size:8}):(0,On.jsx)(Ci,{color:r})})}function ZD({sessions:e,expanded:t,selectedSessionId:r,liveTitles:n,label:a,className:o="",disabled:l=!1,expansionRef:u,onActivate:d,onExpand:p}){let m=Bl.useRef(null),v=Bl.useRef(null),g=Bl.useRef(null),b=Bl.useRef(null),x=Bl.useRef(null),[y,E]=Bl.useState({titles:!1,count:0}),[S,F]=Bl.useState(!1),[$,C]=Bl.useState(null),D=e.map((W,H)=>P0(W,H,n?.[W.id])),I=JSON.stringify(e.map((W,H)=>[W.id,D[H]]));if(Bl.useLayoutEffect(()=>{ba("wand-sidebar-session-preview",jbe)},[]),Bl.useLayoutEffect(()=>{let W=m.current,H=v.current;if(!W||!H||!g.current||!b.current||!x.current)return;let q=!0,z=()=>{if(!q)return;let U=getComputedStyle(W),Y=Number.parseFloat(U.columnGap)||0,X=(Number.parseFloat(U.paddingInlineStart)||0)+(Number.parseFloat(U.paddingInlineEnd)||0),J=W.clientWidth-X,N=g.current.getBoundingClientRect().width,R=N>0&&N*e.length+Y*(e.length-1)<=J;F(ee=>ee===R?ee:R);let K=R&&H.children.length===e.length?Array.from(H.children).map(ee=>ee.getBoundingClientRect().width):Array(e.length).fill(0),Q=Tbe(J,K,N,Y,ee=>(x.current.textContent=`+${ee}`,b.current.getBoundingClientRect().width));E(ee=>ee.titles===Q.titles&&ee.count===Q.count?ee:Q)};z();let L=typeof ResizeObserver>"u"?null:new ResizeObserver(z);return L?.observe(W),L?.observe(H),window.addEventListener("resize",z),document.fonts?.ready.then(z),document.fonts?.addEventListener("loadingdone",z),()=>{q=!1,L?.disconnect(),window.removeEventListener("resize",z),document.fonts?.removeEventListener("loadingdone",z)}},[I,S]),!e.length)return null;let M=e.slice(0,y.count),A=e.length-M.length,j=e.slice(M.length).some(W=>W.id===r),P=(W,H,q)=>(0,On.jsxs)("span",{className:"sidebar-session-tag-content",children:[(0,On.jsx)(_be,{session:W}),(0,On.jsx)(Df,{session:W,size:14}),q?(0,On.jsx)("span",{className:"sidebar-session-tag-title",children:D[H]}):null]}),O=()=>{u?.current?.focus({preventScroll:!0})},V=`\u8FD8\u6709 ${A} \u4E2A\u5339\u914D\u4F1A\u8BDD${j?"\uFF0C\u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""}\uFF0C\u5C55\u5F00\u5B8C\u6574\u5217\u8868`;return(0,On.jsx)(Bt,{children:(0,On.jsx)("div",{className:`sidebar-session-preview ${o}`,"data-expanded":t,inert:t||l,"aria-hidden":t||void 0,children:(0,On.jsx)("div",{className:"sidebar-session-preview-clip",children:(0,On.jsxs)("div",{ref:m,className:"sidebar-session-preview-row","data-title-mode":y.titles?"full":"icons","data-total-count":e.length,"data-visible-count":M.length,role:"group","aria-label":a,children:[M.map((W,H)=>{let q=Pf(W),z=Fl(W),L=z?yl(z,W.engine):"\u7EC8\u7AEF",U=`${D[H]} \xB7 ${L} \xB7 ${q.label}`;return(0,On.jsx)(wi,{title:U,open:t||$===W.id?!1:void 0,children:(0,On.jsx)(qu,{size:"sm",kind:"ghost",className:"sidebar-session-tag","data-preview-session-id":W.id,"data-titles":y.titles,"aria-label":U,"aria-pressed":W.id===r,disabled:l,onMouseEnter:()=>C(Y=>Y===W.id?null:Y),onFocus:()=>C(Y=>Y===W.id?null:Y),onClick:Y=>{C(W.id),Y.stopPropagation(),d(W)},children:P(W,H,y.titles)})},W.id)}),A>0?(0,On.jsx)(wi,{title:V,open:t?!1:void 0,children:(0,On.jsxs)(qu,{size:"sm",kind:"ghost",className:"sidebar-session-more","data-hidden-count":A,"data-contains-current":j,"aria-label":V,"aria-expanded":t,"aria-controls":u?.current?.getAttribute("aria-controls")??void 0,disabled:l||!p,onClick:W=>{W.stopPropagation(),O(),p?.()},children:["+",A]})}):null,(0,On.jsxs)("div",{className:"sidebar-session-preview-measure-clip","aria-hidden":"true",inert:!0,children:[(0,On.jsx)("div",{ref:v,className:"sidebar-session-preview-measure",children:S?e.map((W,H)=>(0,On.jsx)(qu,{size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-tag","data-titles":"true",children:P(W,H,!0)},W.id)):null}),(0,On.jsx)(qu,{ref:g,size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-tag",children:P(e[0],0,!1)}),(0,On.jsx)(qu,{ref:b,size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-more",children:(0,On.jsxs)("span",{ref:x,children:["+",e.length]})})]})]})})})})}var EV=B(_(),1),D6=B(Ee(),1),kV=__wandCssTextPool[12];function N6({id:e,open:t,label:r,toggleRef:n,className:a="",disabled:o=!1,onOpenChange:l}){return EV.useLayoutEffect(()=>{ba("wand-sidebar-session-area",kV)},[]),(0,D6.jsx)(Fr,{ref:n,className:`sidebar-session-area-toggle ${a}`,disabled:o,"aria-label":`${t?"\u6536\u8D77":"\u5C55\u5F00"}${r}\u7684\u4F1A\u8BDD\u5217\u8868`,"aria-expanded":t,"aria-controls":e,onClick:u=>{u.stopPropagation(),W0(u.currentTarget,()=>l(!t))},onKeyDown:u=>j6(u,t,l),children:(0,D6.jsx)(T6,{open:t,size:14})})}function P6({hasSessions:e=!0,reserve:t=!1,children:r}){return EV.useLayoutEffect(()=>{ba("wand-sidebar-session-area",kV)},[]),!e&&!t?null:(0,D6.jsx)("div",{className:"sidebar-session-area","data-empty":!e||void 0,children:(0,D6.jsx)("div",{className:"sidebar-session-area-content",children:r})})}function R6(e,t,r=[]){let n=e.tasks.find(o=>o.id===t.workspaceTaskId)??e.tasks.find(o=>o.sessions.some(l=>l.id===t.id));if(n)return n;let a=r.find(o=>o.workspaceId===e.workspaceId);if(a)return a.tasks.find(o=>o.id===t.workspaceTaskId)??a.tasks.find(o=>o.sessions.some(l=>l.id===t.id))}var H0=null,YD=new Set;function Nbe(e){H0&&e&&H0.kind===e.kind&&H0.message===e.message||H0===null&&e===null||(H0=e?{...e}:null,YD.forEach(t=>t()))}function O6(){return H0}function eA(e){return YD.add(e),()=>YD.delete(e)}function tA(e){return e.kind!=="group"}function Pbe(e){return e.sessionSource!=="quick-terminal"&&!e.teamChat}function z6(e){return e.global||e.workspaceId==="wand-global"?"":(e.workspaceName.trim()||e.workspaceCwd.trim()).replace(/\\/g,"/").split("/").filter(Boolean).at(-1)??""}function Rbe(e,t,r){if(t.workspaceId)return{workspaceId:t.workspaceId,taskId:t.taskId};if(r)for(let n of e){let a=n.tasks.find(o=>o.sessions.some(l=>l.id===r));if(a||n.standaloneSessions.some(o=>o.id===r))return{workspaceId:n.workspaceId,taskId:a?.id??null}}return{workspaceId:null,taskId:null}}function Obe(e,t){let r=new Date(e);if(!Number.isFinite(r.getTime()))return"";let n=Math.max(0,Math.floor((t-r.getTime())/6e4));if(n<1)return"\u521A\u521A";if(n<60)return`${n}\u5206`;if(n<1440)return`${Math.floor(n/60)}\u65F6`;if(n<10080)return`${Math.floor(n/1440)}\u5929`;let a=`${r.getMonth()+1}/${r.getDate()}`;return r.getFullYear()===new Date(t).getFullYear()?a:`${r.getFullYear()}/${a}`}var Rf=B(_(),1);function H6(){ba("wand-sidebar-layout",__wandCssTextPool[13])}var L6=B(Ee(),1);function q6({value:e,children:t,animate:r=!0}){Rf.useLayoutEffect(()=>{H6()},[]);let n=Rf.useContext(js),a=ga(),o=Rf.useRef({value:e,children:t,scope:n}),[l,u]=Rf.useState(null),[d,p]=Rf.useState(!1);return Rf.useLayoutEffect(()=>{let m=0;return a||!r?(u(null),p(!1)):o.current.value!==e&&(u(o.current),p(!0),m=requestAnimationFrame(()=>p(!1))),()=>cancelAnimationFrame(m)},[e,a,r]),Rf.useLayoutEffect(()=>{o.current={value:e,children:t,scope:n}}),(0,L6.jsxs)("div",{className:"sidebar-projection-swap","data-entering":d,children:[(0,L6.jsx)("div",{className:"sidebar-projection-current",children:t}),l?(0,L6.jsx)("div",{className:"sidebar-projection-old","aria-hidden":"true",inert:!0,onTransitionEnd:m=>{m.target===m.currentTarget&&m.propertyName==="opacity"&&u(null)},children:(0,L6.jsx)(js.Provider,{value:l.scope,children:l.children})}):null]})}var Of=null,rA=new Set;function CV(e){Of=e;for(let t of rA)t()}var Dd={subscribe(e){return rA.add(e),()=>rA.delete(e)},getSnapshot(){return Of},open(e,t,r=null){if(Of?.sessionId===e&&Of.toolId===t){this.close();return}CV({sessionId:e,toolId:t,trigger:r})},isOpen(){return Of!==null},close(){let e=Of?.trigger;CV(null),e?.isConnected&&e.focus({preventScroll:!0})},closeIfOpen(){return Of?(this.close(),!0):!1}};var aA="wand-chat-width",zbe="data-chat-width";function SV(e){return e==="column"?"column":"full"}function FV(){try{return SV(window.localStorage.getItem(aA))}catch{return"full"}}function $V(e){typeof document>"u"||document.documentElement.setAttribute(zbe,e)}var W6=FV(),nA=new Set;$V(W6);var Lbe={subscribe(e){return nA.add(e),()=>{nA.delete(e)}},getSnapshot(){return W6},getServerSnapshot(){return"full"}};function DV(e){if(e!==W6){W6=e,$V(e);for(let t of nA)t()}}function Hbe(e){let t=SV(e),r=!0;try{window.localStorage.setItem(aA,t)}catch{r=!1}return DV(t),r}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===aA||e.key===null)&&DV(FV())});function Ad(){return typeof document<"u"&&document.documentElement?.dataset.wandPage==="settings"}function qbe(){return Ad()&&document.documentElement.dataset.wandSettingsAuth==="client"}var Ml=B(_(),1);function Wbe(e){return e.pending?e.phase==="updating"?"\u5E95\u5C42\u7EC4\u4EF6\u6B63\u5728\u81EA\u52A8\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":e.phase==="retrying"?"\u5E95\u5C42\u7EC4\u4EF6\u66F4\u65B0\u5C1A\u672A\u5B8C\u6210\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002\u65E0\u9700\u64CD\u4F5C\u3002":"\u5E95\u5C42\u7EC4\u4EF6\u66F4\u65B0\u6B63\u5728\u7B49\u5F85\u6267\u884C\u4E0E\u961F\u5217\u7ED3\u675F\uFF0C\u5C4A\u65F6\u81EA\u52A8\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":""}var Uu=B(Ee(),1);function iA({compact:e=!1,visible:t=!0}){let[r,n]=Ml.useState({pending:!1,phase:"idle"}),[a,o]=Ml.useState(!1),[l,u]=Ml.useState(!1),[d,p]=Ml.useState(""),m=Ml.useRef(0),v=Ml.useRef(!0),g=Ml.useRef(!1),b=Ml.useRef(null);Qn(a,()=>{o(!1),b.current?.focus()}),Ml.useEffect(()=>{t||o(!1)},[t]),Ml.useEffect(()=>{let F=!1;v.current=!0;let $,C=null,D=async()=>{if(F||C||document.hidden)return;$&&clearTimeout($);let M=new AbortController;C=M;let A=m.current,j=setTimeout(()=>M.abort(),1e4);try{let P=await mt("/api/daemon-maintenance",{signal:M.signal,cache:"no-store"});!F&&A===m.current&&!g.current&&typeof P.pending=="boolean"&&["idle","waiting","updating","retrying"].includes(P.phase)&&n(P)}catch{}finally{clearTimeout(j),C=null,F||($=setTimeout(()=>{D()},15e3))}},I=()=>{document.hidden||D()};return document.addEventListener("visibilitychange",I),D(),()=>{F=!0,v.current=!1,$&&clearTimeout($),C?.abort(),document.removeEventListener("visibilitychange",I)}},[]);let x=async()=>{if(!g.current){g.current=!0,o(!1);try{let F=await xn.dialog({title:"\u5F3A\u5236\u66F4\u65B0\u5E95\u5C42\u7EC4\u4EF6\uFF1F",description:"\u5C06\u4E2D\u65AD\u5F53\u524D\u6240\u6709\u6B63\u5728\u6267\u884C\u7684\u7EC8\u7AEF\u548C\u6A21\u578B\u4EFB\u52A1\uFF0C\u5E76\u66F4\u65B0\u5E95\u5C42\u7EC4\u4EF6\u3002\u4F1A\u8BDD\u5386\u53F2\u4E0E\u6392\u961F\u6D88\u606F\u4F1A\u4FDD\u7559\uFF0C\u6392\u961F\u6D88\u606F\u53EF\u80FD\u5728\u66F4\u65B0\u540E\u7EE7\u7EED\u6267\u884C\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u4E2D\u65AD\u5E76\u66F4\u65B0",value:!0,kind:"danger"}]});if(F.dismissed!==!1||!F.action||!v.current)return;m.current++,u(!0),p("");let $=await mt("/api/daemon-maintenance/force-update",{...tn({confirmInterrupt:!0}),signal:AbortSignal.timeout(6e4)});v.current&&n($)}catch(F){v.current&&(p(F instanceof Error?F.message:"\u66F4\u65B0\u672A\u5B8C\u6210\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"),o(!0))}finally{g.current=!1,v.current&&u(!1)}}};if(!r.pending)return null;let y=l||r.phase==="updating",E=y?"\u7EC4\u4EF6\u66F4\u65B0\u4E2D":r.phase==="retrying"?"\u7EC4\u4EF6\u66F4\u65B0\u5F85\u91CD\u8BD5":"\u7EC4\u4EF6\u5F85\u66F4\u65B0",S=(0,Uu.jsx)(je,{kind:"ghost",size:"small",loading:l,disabled:y||r.canForceUpdate===!1,"data-daemon-update-action":!0,title:r.canForceUpdate===!1?"\u9700\u8981\u7BA1\u7406\u5458\u6743\u9650":void 0,onClick:()=>{x()},children:"\u5F3A\u5236\u66F4\u65B0"});return(0,Uu.jsxs)(Ye,{className:"daemon-update-notice",align:"center",gap:4,children:[(0,Uu.jsx)(v0,{open:a,onOpenChange:o,trigger:"click",placement:"bottomLeft",content:(0,Uu.jsxs)(Ye,{vertical:!0,gap:"small",style:{maxWidth:"min(280px, calc(100vw - 48px))"},children:[(0,Uu.jsx)(Wt.Text,{children:l?"\u5E95\u5C42\u7EC4\u4EF6\u6B63\u5728\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":Wbe(r)}),d&&(0,Uu.jsx)(Wt.Text,{type:"danger",role:"alert",children:d}),e&&S]}),children:(0,Uu.jsxs)(je,{ref:b,kind:"ghost",size:"small","data-daemon-update-status":!0,"aria-label":E,"aria-expanded":a,title:E,children:[(0,Uu.jsx)(De,{name:"info",size:12}),(0,Uu.jsx)("span",{hidden:e,role:"status","aria-live":"polite",children:E})]})}),!e&&S]})}function Vbe(e,t){return e.resources?.skills.includes(t)?e.lockedSkills?.includes(t)?"locked":"on":"off"}function Ube(e,t,r){let n=e.resources??{skills:[],mcpServers:[]},a=e.lockedSkills??[];return{resources:{...n,skills:r==="off"?n.skills.filter(o=>o!==t):[...new Set([...n.skills,t])]},lockedSkills:r==="locked"?[...new Set([...a,t])]:a.filter(o=>o!==t)}}function Gbe(e,t,r){if(!r||t.lockedSkills!==void 0&&JSON.stringify(r.lockedSkills)!==JSON.stringify(t.lockedSkills))return!1;if(t.resources===void 0&&t.lockedSkills===void 0)return!0;let n=t.resources??e.resources;if(!r.resources)return!n&&!t.lockedSkills?.length;let a;try{a=Kbe(r.resources)}catch{return!1}let o=new Set(t.lockedSkills===void 0?[]:(e.lockedSkills??[]).filter(u=>!t.lockedSkills.includes(u))),l=(n?.skills??[]).filter(u=>!o.has(u)||a.skills.includes(u));return JSON.stringify(a.skills)===JSON.stringify(l)&&JSON.stringify(a.mcpServers)===JSON.stringify(n?.mcpServers??[])}function Kbe(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("\u8BF7\u9009\u62E9\u6709\u6548\u7684 Skills / MCP \u5217\u8868\u3002");let t=e;if(Object.keys(t).some(n=>n!=="skills"&&n!=="mcpServers"))throw new Error("\u8D44\u6E90\u9009\u62E9\u4E0D\u80FD\u5305\u542B\u8DEF\u5F84\u3001\u547D\u4EE4\u6216\u5176\u4ED6\u8BBE\u7F6E\u3002");let r=n=>{let a=t[n];if(!Array.isArray(a)||a.length>64||new Set(a).size!==a.length||a.some(o=>typeof o!="string"||!/^(?:skill-[a-f0-9]{24}|mcp-[a-f0-9]{24})$/.test(o)))throw new Error("\u8D44\u6E90\u9009\u62E9\u5FC5\u987B\u662F\u65E0\u91CD\u590D\u7684\u5DF2\u5B89\u88C5\u8D44\u6E90 ID\uFF08\u6BCF\u7C7B\u6700\u591A64\u9879\uFF09\u3002");return[...a]};return{skills:r("skills"),mcpServers:r("mcpServers")}}var DNe=Object.freeze({tools:!1,codemode:!1,codemodeOnly:!1,globalTools:!1,goalMode:!1,localDecision:!1,autoCompaction:!1});function _1(e){let t=e.trim();return t==="/"||["/settings","/codemode","/tools","/goal-mode"].some(r=>t.length>1&&r.startsWith(t))}var V6=new Map;function AV(e,t){if(t())return Promise.resolve();let r=V6.get(e);if(r)return r;let n=document.querySelector(`meta[name="wand-${e}-script"]`)?.content;if(!n)return Promise.reject(new Error("\u7EC4\u4EF6\u5730\u5740\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002"));let a=new Promise((o,l)=>{let u=document.createElement("script");u.src=n,u.async=!0;let d=!1,p=v=>{d||(d=!0,clearTimeout(m),u.onload=null,u.onerror=null,v?(u.remove(),l(v)):o())},m=setTimeout(()=>p(new Error("\u7EC4\u4EF6\u52A0\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5\u3002")),2e4);u.onload=()=>p(t()?void 0:new Error("\u7EC4\u4EF6\u52A0\u8F7D\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5\u3002")),u.onerror=()=>p(new Error("\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")),document.head.appendChild(u)}).finally(()=>{V6.get(e)===a&&V6.delete(e)});return V6.set(e,a),a}async function Xbe(){let e=globalThis;return await AV("qrcode",()=>typeof e.QRCodeLib?.toCanvas=="function"),e.QRCodeLib}async function zf(){await AV("xterm",()=>{let e=globalThis.XTermLib;return typeof e?.Terminal=="function"&&typeof e.FitAddon=="function"})}var ca={open:!1,tab:"profile",nested:null,detail:!1,revision:0},oA=new Set;function V0(e){ca={...e,revision:ca.revision+1};for(let t of oA)t()}var Fo={open(e){V0({open:!0,tab:e??"profile",nested:null,detail:e!==void 0})},close(){!ca.open&&ca.nested===null||V0({...ca,open:!1,nested:null,detail:!1})},closeTopmost(){return ca.nested!==null?(V0({...ca,nested:null}),!0):ca.open&&ca.detail?(qa.showDirectory(),!0):this.closeIfOpen()},closeIfOpen(){return ca.open?(this.close(),!0):!1},isOpen(){return ca.open}},qa={subscribe(e){return oA.add(e),()=>oA.delete(e)},getSnapshot(){return ca},setTab(e){ca.tab===e&&ca.detail||V0({...ca,tab:e,detail:!0})},showDirectory(){ca.detail&&V0({...ca,detail:!1,nested:null})},setNested(e){ca.nested!==e&&V0({...ca,nested:e})}};async function sA(e){let t=new TextEncoder().encode(e),r=globalThis.crypto?.subtle,n=r?new Uint8Array(await r.digest("SHA-256",t)):(await globalThis.__wandImportBrowserModule("7950d87a3f5a01bd")).default(t);return Array.from(n,a=>a.toString(16).padStart(2,"0")).join("")}var U0=null,U6=new Set;function lA(e){return U0=e,U6.forEach(t=>t()),()=>{U0===e&&(U0=null,U6.forEach(t=>t()))}}function Lf(){if(!U0)throw new Error("\u7FA4\u804A\u8F93\u5165\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002");return U0}var G0={discardScope:e=>Lf().discardScope?.(e),ready:()=>U0!==null,subscribeReady:e=>(U6.add(e),()=>{U6.delete(e)}),read:e=>Lf().read(e),edit:(e,t)=>Lf().edit(e,t),submit:(e,t,r)=>Lf().submit(e,t,r),subscribe:e=>Lf().subscribe(e),revision:e=>Lf().read(e).revision,transfer:(e,t,r)=>Lf().transfer?.(e,t,r)??!1};var ns=B(_(),1),uA=new Set;function G6(e){for(let t of uA)t(e)}function X0(e){return uA.add(e),()=>{uA.delete(e)}}var cA=new Set;function N1(e){MV();for(let t of cA)t(e)}function BV(e){return cA.add(e),()=>{cA.delete(e)}}var dA=new Set;function mA(e){for(let t of dA)t(e)}function IV(e){return dA.add(e),()=>{dA.delete(e)}}function Qbe(e){return mt(Bd(e,"/live"))}var Bd=(e,t="")=>`/api/ai-team-runs/${encodeURIComponent(e)}${t}`,Id=null,K0=null,pA=0,fA=new Set;function MV(){pA++,Id=null,K0=null}var Ybe=e=>new Promise(t=>{window.setTimeout(t,e)}),P1={list(){if(Id)return Promise.resolve(Id);if(!K0){let e=pA,t=mt("/api/ai-teams").then(r=>{if(e===pA){Id=r;for(let n of fA)n()}return r}).finally(()=>{K0===t&&(K0=null)});K0=t}return K0},async create(e){let t=await mt("/api/ai-teams",tn(e));return MV(),t},async update(e,t){let r=await mt(`/api/ai-teams/${encodeURIComponent(e)}`,tn(t,"PUT"));return N1(r.id),r},async remove(e){await mt(`/api/ai-teams/${encodeURIComponent(e)}`,{method:"DELETE"}),N1(e)},runs(e={}){let t=new URLSearchParams;e.teamId&&t.set("teamId",e.teamId),e.activeOnly&&t.set("active","1"),e.limit&&t.set("limit",String(e.limit));let r=t.toString();return mt(`/api/ai-team-runs${r?`?${r}`:""}`)},runsForTask(e){return mt(`/api/wand-tasks/${encodeURIComponent(e)}/team-runs`)},runsForChat(e,t){return P1.runsForTask(e).then(r=>r.filter(n=>n.chatSessionId===t))},start(e,t,r){return mt(`/api/wand-tasks/${encodeURIComponent(e)}/team-runs`,tn({teamId:t,note:r}))},startDirect(e,t){return mt(`/api/ai-teams/${encodeURIComponent(e)}/runs`,tn({note:t.note,workspaceId:t.workspaceId}))},dispatchPlan(e){return mt("/api/team-dispatch/plan",tn({note:e.note,...e.maxMembers===void 0?{}:{maxMembers:e.maxMembers}}))},dispatchStart(e){return mt("/api/team-dispatch/start",tn({workspaceId:e.workspaceId,note:e.note,members:e.members}))},settle(e){return Ybe(e==="error"?m0:f0)},detail(e){return mt(Bd(e))},live:Qbe,subscribeAiTeamStepLive:IV,approve(e){return mt(Bd(e,"/approve"),tn({}))},reject(e,t){return mt(Bd(e,"/reject"),tn({feedback:t}))},reply(e,t){return mt(Bd(e,"/reply"),tn({text:t}))},continueRun(e,t){return mt(Bd(e,"/continue"),tn({extraSteps:t}))},completeStep(e,t,r){return mt(Bd(e,`/steps/${encodeURIComponent(t)}/complete`),tn({report:r}))},stop(e){return mt(Bd(e,"/stop"),tn({}))}};function Jbe(e){let t=`${e.members.length} \u4EBA`;return{id:e.id,name:e.name,detail:e.description.trim()?`${t} \xB7 ${e.description.trim()}`:t}}function Zbe(e){let[t,r]=ns.useState(null);return ns.useEffect(()=>{if(!e)return;let n=!0;return P1.list().then(a=>{n&&r(a)},()=>{n&&r([])}),()=>{n=!1}},[e]),t}function e1e(e){let[t,r]=ns.useState(()=>Id??[]),[n,a]=ns.useState(e&&!Id),[o,l]=ns.useState(null),u=ns.useRef(!1),d=ns.useRef(e),p=ns.useRef(0);d.current=e;let m=ns.useCallback(()=>{if(!u.current||!d.current)return;let v=++p.current,g=()=>u.current&&d.current&&p.current===v;a(!0),P1.list().then(b=>{g()&&(r(b),l(null))},b=>{g()&&l(b instanceof Error?b.message:"\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}).finally(()=>{g()&&a(!1)})},[]);return ns.useEffect(()=>{if(!e){a(!1);return}u.current=!0;let v=()=>{!u.current||!d.current||!Id||(r(Id),l(null))};fA.add(v),m();let g=BV(m);return()=>{u.current=!1,p.current++,fA.delete(v),g()}},[e,m]),{teams:t,loading:n,error:o,reload:m}}function hA(e=!0){let[t,r]=ns.useState(0);return ns.useEffect(()=>{if(!e)return;let n=!0,a=()=>{P1.runs({activeOnly:!0}).then(l=>{n&&r(l.filter(u=>u.status!=="running").length)}).catch(()=>{})};a();let o=X0(a);return()=>{n=!1,o()}},[e]),e?t:0}function t1e(e,t){if(e&&e.id!==t.id&&(e=null),t.unchanged){if(!e)throw new Error("\u7F3A\u5C11\u5BF9\u8BDD\u540C\u6B65\u57FA\u7EBF\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002");return{...e,history:t.history}}let r=new Map((t.reset?[]:e?.messages??[]).map(o=>[o.messageId,o]));for(let o of t.messages??[])r.set(o.messageId,o);let n=(t.messageOrder??[]).map(o=>{let l=r.get(o);if(!l)throw new Error("\u5BF9\u8BDD\u540C\u6B65\u7F3A\u5C11\u6D88\u606F\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002");return l}),a=t.detail??e;if(!a||a.id!==t.id)throw new Error("\u5BF9\u8BDD\u540C\u6B65\u8EAB\u4EFD\u4E0D\u4E00\u81F4\u3002");return{...a,messages:n,history:t.history}}var as=B(_(),1),Q0=D0(async()=>{let e=await mt("/api/sessions",{credentials:"same-origin"});if(!Array.isArray(e)||e.some(t=>!t||typeof t.id!="string"))throw new Error("Invalid session list response");return e});function r1e(){return Q0.peek()}function O1(e){return Q0.load(e)}function Q6(e){Q0.publish(e)}var n1e=["automationId","sessionSource","engine","provider","sessionKind","runner","command","title","titleGenerating","status","completionRevision","viewedCompletionRevision","cwd","startedAt","workspaceTaskId","ptyBusy","ptyCommandRunning","archived","archivedAt","providerCliActive","providerCliExitCode","inFlight","executionStatus","queuedMessageCount","canArchive","employeeId","employeeName","employeeAvatar","teamChat","teamStep"];function Y6(e){let t=[];for(let r of e){if(!r||typeof r!="object")continue;let n=r;if(typeof n.id!="string"||n.sessionSource==="quick-terminal")continue;let a={id:n.id};for(let o of n1e)n[o]!==void 0&&(a[o]=n[o]);t.push(a)}return t}function a1e(e){return Q0.subscribe(e)}function z1(){Q0.invalidate()}function i1e(){Q0.stale()}var X6=class extends Error{constructor(e){super("\u9001\u8FBE\u672A\u786E\u8BA4\uFF0C\u8BF7\u5148\u6838\u5BF9\u8BB0\u5F55\uFF0C\u52FF\u91CD\u590D\u53D1\u9001\u3002"),ie(this,"requestId",e),ie(this,"__wandAmbiguousDelivery",!0)}};async function TV(e,t){let r=await fetch(e,t),n=await r.json();if(!r.ok)throw new Ra(n.error||"\u8BF7\u6C42\u5931\u8D25\u3002",r.status);if(!n||typeof n.requestId!="string"||!["pending","accepted","rejected"].includes(n.state))throw new Error("\u65E0\u6CD5\u786E\u8BA4\u63A5\u53D7\u56DE\u6267\u3002");return n}var jV="wand-conversation-requests-v1",Tl=new Map;try{let e=JSON.parse(localStorage.getItem(jV)??"{}");Object.entries(e).slice(0,200).forEach(([t,r])=>{typeof r=="string"&&Tl.set(t,r)})}catch{}function K6(){try{localStorage.setItem(jV,JSON.stringify(Object.fromEntries(Tl)))}catch{}}var R1=new Set;function Md(){for(let e of R1)e()}function o1e(e){return R1.add(e),()=>{R1.delete(e)}}var Hf={list:()=>mt("/api/conversations").then(e=>e.conversations),systemSessions:e=>O1({force:e?.fresh,maxAgeMs:e?.maxAgeMs}).then(t=>t.filter(r=>Ns(r)&&!!r.employeeId)),peekSystemSessions:()=>{let e=r1e();return e?e.filter(t=>Ns(t)&&!!t.employeeId):[]},async updateListState(e,t){let r=await mt(`/api/conversations/${encodeURIComponent(e)}/list-state`,tn(t,"PATCH"));return Md(),r},async remove(e){await mt(`/api/conversations/${encodeURIComponent(e)}`,{method:"DELETE"}),G0.ready()&&G0.discardScope(`conversation-draft:${location.origin}:local-owner:${e}:`),Md()},async detail(e,t=null,r=!1){let n=new URLSearchParams;t?.id===e&&t.history&&(n.set("since",t.history.revision),t.history.from&&n.set("from",t.history.from)),r&&n.set("older","1");try{let a=await mt(`/api/conversations/${encodeURIComponent(e)}/sync?${n}`);return t1e(t,a)}catch(a){if(a instanceof Ra&&a.status===404)return mt(`/api/conversations/${encodeURIComponent(e)}`);throw a}},receipt:e=>TV(`/api/conversations/requests/${encodeURIComponent(e)}`),async post(e,t){let r=await sA(e+"\0"+JSON.stringify(t)),n=Tl.get(r);if(n)throw new X6(n);if(Tl.size>=200)throw new Ra("\u8BF7\u5148\u6838\u5BF9\u672A\u786E\u8BA4\u8BF7\u6C42\uFF0C\u518D\u7EE7\u7EED\u63D0\u4EA4\u3002",400);let a=Z3();Tl.set(r,a),K6();try{let o=await TV(e,tn({...t,requestId:a}));if(o.requestId!==a||o.state==="pending")throw new X6(a);if(o.state==="rejected")throw new Ra(o.error||"\u8BF7\u6C42\u672A\u63A5\u53D7\u3002",400);return Tl.delete(r),K6(),Md(),o}catch(o){throw o instanceof Ra&&o.status>=400&&o.status<500&&o.status!==408&&o.status!==409?(Tl.delete(r),K6(),Object.assign(o,{httpStatus:o.status})):new X6(a)}},pending:()=>[...Tl.values()],async reconcile(e){let t=await this.receipt(e);if(t.state!=="pending"){for(let[r,n]of Tl)n===e&&Tl.delete(r);K6(),Md()}return t}},s1e=6e4;function gA(e=!1,t=!0){let[r,n]=as.useState([]),[a,o]=as.useState([]),[l,u]=as.useState(""),[d,p]=as.useState(!1),m=as.useRef(0),v=as.useRef(0),g=as.useCallback(async(E=!1,S)=>{let F=++m.current,$=v.current;try{let[C,D]=await Promise.all([Hf.list(),e?Hf.systemSessions({fresh:E,maxAgeMs:S}):Promise.resolve([])]);F===m.current&&(n(C),p(!0),u("")),F===m.current&&$===v.current&&o(D)}catch(C){F===m.current&&u(C instanceof Error?C.message:"\u5BF9\u8BDD\u5217\u8868\u8BFB\u53D6\u5931\u8D25\u3002")}},[e]),b=as.useCallback(()=>{g(!0)},[g]),x=as.useCallback(()=>{g(!1,s1e)},[g]),y=as.useCallback(()=>{i1e(),g(!1)},[g]);return as.useEffect(()=>{if(e)return a1e(()=>{v.current++,o(Hf.peekSystemSessions())})},[e]),as.useEffect(()=>{if(!t)return;g(),R1.add(x);let E=[X0(x),Ds(x),t6(y)],S=window.setInterval(()=>{document.hidden||x()},3e4);return()=>{++m.current,R1.delete(x),E.forEach(F=>F()),clearInterval(S)}},[g,x,y,t]),{items:r,systemSessions:a,error:l,loaded:d,refresh:b}}var Y0=B(_(),1),_t=B(Ee(),1),J0=null,L1=null,l1e=ef.aiTeamsChunkSrc;function _V(){if(J0)return Promise.resolve(J0);if(L1)return L1;let e=globalThis;return e.__wandAiTeamsChunk?(J0=e.__wandAiTeamsChunk,Promise.resolve(J0)):(L1=Promise.all([globalThis.__wandImportBrowserModule("7f75952f913a9d96"),globalThis.__wandImportBrowserModule("b216e4997a446eba")]).then(([t,r])=>(t.installSharedLibraryBridge(),r.installAiTeamsHostBridge(),new Promise((n,a)=>{let o=document.createElement("script");o.src=l1e,o.async=!0,o.onload=()=>{let l=e.__wandAiTeamsChunk;l?n(l):a(new Error("AI \u56E2\u961F\u811A\u672C\u6CA1\u6709\u6CE8\u518C\u7EC4\u4EF6"))},o.onerror=()=>{o.remove(),a(new Error("AI \u56E2\u961F\u811A\u672C\u4E0B\u8F7D\u5931\u8D25"))},document.head.appendChild(o)}))).then(t=>(J0=t,t),t=>{throw L1=null,t}),L1)}function Z0(e=!0){let[t,r]=Y0.useState(J0),[n,a]=Y0.useState(""),[o,l]=Y0.useState(0);Y0.useEffect(()=>{if(t||!e)return;let d=!0;return _V().then(p=>{d&&r(p)},p=>{d&&a(Tf(p,"AI \u56E2\u961F\u52A0\u8F7D\u5931\u8D25"))}),()=>{d=!1}},[t,o,e]);let u=Y0.useCallback(()=>{a(""),l(d=>d+1)},[]);return{chunk:t,error:n,retry:u}}function u1e({admin:e}){let[t,r]=Y0.useState(!1),{chunk:n,error:a,retry:o}=Z0(t);return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(je,{kind:"secondary",onClick:()=>r(!0),children:`\u914D\u7F6E\u300C${F2}\u300D\u8C03\u7528\u94FE`}),n?(0,_t.jsx)(n.DecisionChainEditor,{admin:e,open:t,onOpenChange:r,providerOptions:u0.filter(l=>l.engine!=="sdk").map(l=>({value:l.provider,label:l.label}))}):(0,_t.jsx)(Cl,{open:t,onOpenChange:r,title:`${F2} \xB7 \u8C03\u7528\u94FE`,children:a?(0,_t.jsx)(ri,{type:"error",showIcon:!0,title:(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("span",{children:"\u8C03\u7528\u94FE\u7F16\u8F91\u5668\u52A0\u8F7D\u5931\u8D25\u3002"}),(0,_t.jsx)(je,{kind:"soft",onClick:o,children:"\u91CD\u8BD5"})]})}):(0,_t.jsxs)("div",{role:"status","aria-busy":"true",children:[(0,_t.jsx)(Ki,{}),"\u6B63\u5728\u52A0\u8F7D\u8C03\u7528\u94FE\u7F16\u8F91\u5668\u2026"]})})]})}function vA(e){let{chunk:t,error:r,retry:n}=Z0();return t?(0,_t.jsx)(t.AiTeamsPage,{...e}):(0,_t.jsx)(Ye,{vertical:!0,gap:12,align:"center",justify:"center",component:"section",style:{height:"100%"},className:"task-board-native-page","aria-label":"AI \u56E2\u961F","aria-busy":!r,children:r?(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(ri,{type:"error",showIcon:!0,title:r}),(0,_t.jsx)(je,{kind:"soft",size:"small",onClick:n,children:"\u91CD\u8BD5"})]}):(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(Ki,{}),(0,_t.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D AI \u56E2\u961F\u2026"})]})})}function c1e(e){let{chunk:t,error:r,retry:n}=Z0();return t?(0,_t.jsx)(t.EmployeeListPage,{...e}):(0,_t.jsxs)("div",{role:"status",children:[r||"\u6B63\u5728\u8BFB\u53D6\u5458\u5DE5\u8D44\u6599\u2026",r?(0,_t.jsx)(je,{onClick:n,children:"\u91CD\u8BD5"}):(0,_t.jsx)(Ki,{size:"small"})]})}function d1e(e){let{chunk:t}=Z0();return t?(0,_t.jsx)(t.TaskTeamRunPanel,{...e}):null}async function p1e(e,t){return(await _V()).chatAttachmentPrompt(e,t)}function f1e(e){let{chunk:t,error:r,retry:n}=Z0(e.active!==!1);if(t)return(0,_t.jsx)(t.ConversationMessages,{...e});let a=e.active===!1;return(0,_t.jsx)("div",{className:"conversation-messages-loading",role:a?void 0:"status","aria-hidden":a||void 0,style:{flex:"1 1 auto",minHeight:"100%",display:"flex",alignItems:"center"},children:a?null:(0,_t.jsxs)(_t.Fragment,{children:[r||"\u6B63\u5728\u8BFB\u53D6\u6D88\u606F\u7EC4\u4EF6\u2026",r?(0,_t.jsx)(je,{onClick:n,children:"\u91CD\u8BD5"}):null]})})}function bA(e){let{chunk:t,error:r,retry:n}=Z0();return t?(0,_t.jsx)(t.TeamChatPage,{...e}):(0,_t.jsx)(Ye,{vertical:!0,gap:12,align:"center",justify:"center",component:"section",style:{height:"100%"},className:"task-board-native-page","aria-label":"\u7FA4\u804A","aria-busy":!r,children:r?(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(ri,{type:"error",showIcon:!0,title:r}),(0,_t.jsx)(je,{kind:"soft",size:"small",onClick:n,children:"\u91CD\u8BD5"})]}):(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(Ki,{}),(0,_t.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u7FA4\u804A\u2026"})]})})}function Wf(e,t){let r=t??(typeof window>"u"?void 0:window.location.origin);if(!r||!/^https?:\/\//i.test(e)||/[\u0000-\u001f]/.test(e))return null;try{let n=new URL(e);return n.origin!==new URL(r).origin||n.username||n.password||!/^\/api\/(?:file-raw|file-preview|session-file|local-file|local-preview)(?:[/?]|$)/.test(n.pathname)?null:n.pathname+n.search+n.hash}catch{return null}}var jl={open:!1,mode:"url",value:"",previewUrl:null,sourceLabel:"",error:null},yA=new Set;function Os(e={}){jl={...jl,...e};for(let t of yA)t()}function NV(e){return["localhost","127.0.0.1","[::1]","::1"].includes(e.toLowerCase())}function qf(e,t){try{let r=Wf(e.trim(),t)??e.trim();if(/[\u0000-\u001f]/.test(r))return null;if(r.startsWith("/api/local-preview/")){let o=new URL(r,"http://wand.invalid"),l=/^\/api\/local-preview\/([^/]+)\/(\d{1,5})(\/.*)?$/.exec(o.pathname);return!l||!NV(l[1])||Number(l[2])<1||Number(l[2])>65535?null:`/api/local-preview/${l[1].includes(":")?"::1":"127.0.0.1"}/${Number(l[2])}${l[3]||"/"}${o.search}${o.hash}`}/^(?:localhost|127\.0\.0\.1|\[::1\])(?::\d{1,5})?(?:[/?#]|$)/i.test(r)&&(r="http://"+r);let n=new URL(r);if(n.protocol!=="http:"||!NV(n.hostname)||n.username||n.password)return null;let a=n.port||"80";return Number(a)<1?null:`/api/local-preview/${n.hostname.includes(":")?"::1":"127.0.0.1"}/${a}${n.pathname}${n.search}${n.hash}`}catch{return null}}function PV(e){let t=e.trim();if(!t)throw new Error("\u8BF7\u8F93\u5165\u672C\u5730\u7AEF\u53E3\u6216\u5730\u5740\u3002");if(Wf(t)?.startsWith("/api/local-preview/")||t.startsWith("/api/local-preview/")){let a=qf(t);if(!a)throw new Error("\u53EA\u5141\u8BB8\u9884\u89C8\u672C\u673A\uFF08localhost\uFF09HTTP \u670D\u52A1\u3002");return a}if(/^\d{1,5}$/.test(t)){let a=Number(t);if(a<1||a>65535)throw new Error("\u7AEF\u53E3\u53F7\u5FC5\u987B\u662F 1\u201365535\u3002");return`/api/local-preview/127.0.0.1/${a}/`}let r=/^https?:\/\//i.test(t)?t:`http://${t}`,n=qf(r);if(!n)throw new Error("\u53EA\u5141\u8BB8\u9884\u89C8\u672C\u673A\uFF08localhost\uFF09HTTP \u670D\u52A1\u3002");return n}function m1e(e){let t=new TextEncoder().encode(e),r="";for(let n of t)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function eg(e){let t=e.trim();return!t.startsWith("/")&&!t.startsWith("~/")?null:`/api/local-file/${m1e(t)}/`}function RV(e){let t=Wf(e.trim())??e.trim();if(H1(t))return t;if(/^file:/i.test(t)){let r=new URL(t);if(r.hostname&&r.hostname!=="localhost")throw new Error("\u53EA\u5141\u8BB8\u6253\u5F00\u670D\u52A1\u7AEF\u672C\u5730\u6587\u4EF6\u3002");return(eg(decodeURIComponent(r.pathname))??"")+r.search+r.hash}if(!t)throw new Error("\u8BF7\u8F93\u5165\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84\u3002");return eg(t)??(()=>{throw new Error("\u8BF7\u8F93\u5165\u670D\u52A1\u7AEF\u6587\u4EF6\u8DEF\u5F84\u3002")})()}function h1e(e){try{return Os({open:!0,mode:"file",value:e,previewUrl:RV(e),sourceLabel:e.trim(),error:null}),!0}catch(t){return Os({open:!0,mode:"file",value:e,previewUrl:null,error:t instanceof Error?t.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u6587\u4EF6\u9884\u89C8\u3002"}),!1}}function g1e(e){try{return Os({open:!0,mode:"url",value:e,previewUrl:PV(e),sourceLabel:e.trim(),error:null}),!0}catch(t){return Os({open:!0,mode:"url",value:e,previewUrl:null,error:t instanceof Error?t.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u9884\u89C8\u3002"}),!1}}function H1(e){if(e=Wf(e)??e,!e.startsWith("/api/")||/[\u0000-\u001f]/.test(e))return!1;try{let t=new URL(e,"http://wand.invalid");if(/^\/api\/local-file\/[A-Za-z0-9_-]+(?:\/.*)?$/.test(t.pathname))return!0;let r=t.searchParams.get("path");return/^\/api\/session-file\/[^/]+$/.test(t.pathname)&&!!r&&!r.startsWith("/")&&t.searchParams.getAll("path").length===1&&t.searchParams.get("mode")==="preview"}catch{return!1}}var zs={openPreview(e,t="HTML \u9884\u89C8"){return H1(e)?(Os({open:!0,mode:"file",value:e,previewUrl:e,sourceLabel:t,error:null}),!0):!1},subscribe(e){return yA.add(e),()=>yA.delete(e)},getSnapshot(){return jl},isOpen(){return jl.open},closeIfOpen(){return jl.open?(this.close(),!0):!1},show(e=""){Os({open:!0,value:e,error:null})},close(){Os({open:!1,error:null})},setMode(e){e!==jl.mode&&Os({mode:e,error:null})},setValue(e){Os({value:e,error:null})},openUrl:g1e,openFile:h1e,submit(){try{let e=jl.mode==="url"?PV(jl.value):RV(jl.value);Os({previewUrl:e,sourceLabel:jl.value.trim(),error:null})}catch(e){Os({previewUrl:null,error:e instanceof Error?e.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u9884\u89C8\u3002"})}}};function wA(e){return/^[^:/?#]+\.[^:/?#]+:\d+(?::\d+)?(?:[?#]|$)/.test(e)}function EA(e,t={}){let r=e.trim();if(!r||/[\u0000-\u001f]/.test(r)||(r=Wf(r,t.serverOrigin)??r,qf(r,t.serverOrigin)))return null;let n="",a="";if(/^file:/i.test(r))try{let d=new URL(r);if(d.hostname&&d.hostname!=="localhost")return null;r=decodeURIComponent(d.pathname),n=d.search,a=d.hash}catch{return null}else if(r.startsWith("/api/local-file/"))try{let d=new URL(r,"http://wand.invalid"),p=/^\/api\/local-file\/([A-Za-z0-9_-]+)(\/.*)?$/.exec(d.pathname);if(!p)return null;let m=p[1].replace(/-/g,"+").replace(/_/g,"/"),v=Uint8Array.from(atob(m),g=>g.charCodeAt(0));if(r=new TextDecoder("utf-8",{fatal:!0}).decode(v),!r.startsWith("/")&&!r.startsWith("~/"))return null;if(d.searchParams.delete("__wand_file_action"),p[2]&&p[2]!=="/"){let g=decodeURIComponent(p[2]),b=d.pathname+d.search,x=new URL(b,"http://wand.invalid");return x.searchParams.set("__wand_file_action","download"),{path:g,rawUrl:b,downloadUrl:x.pathname+x.search,previewUrl:/\.html?(?::\d+(?::\d+)?)?$/i.test(g)||g.endsWith("/")?b+d.hash:null}}if(!/\.html?(?::\d+(?::\d+)?)?$/i.test(r)&&!r.endsWith("/")){let g=d.pathname+d.search+d.hash;return d.searchParams.set("__wand_file_action","download"),{path:r,rawUrl:g,downloadUrl:d.pathname+d.search,previewUrl:null}}n=d.search,a=d.hash}catch{return null}else if(/^\/api\/session-file\/[^/?#]+\?/.test(r))try{let d=new URL(r,"http://wand.invalid");if(!/^\/api\/session-file\/[^/]+$/.test(d.pathname)||d.searchParams.getAll("path").length!==1||(r=d.searchParams.get("path")||"",r.startsWith("/")||/^[a-z][a-z\d+.-]*:/i.test(r)&&!wA(r)))return null;t={sessionId:decodeURIComponent(d.pathname.split("/")[3])},n=d.searchParams.get("search")||"",a=d.hash}catch{return null}else if(/^\/api\/file-(?:raw|preview)\?/.test(r))try{let d=new URL(r,"http://wand.invalid");if(d.searchParams.getAll("path").length!==1)return null;r=d.searchParams.get("path")||"",n=d.searchParams.get("search")||"",a=d.hash}catch{return null}else{if(/^(?:\/\/|#)/.test(r)||/^[a-z][a-z\d+.-]*:/i.test(r)&&!wA(r))return null;let d=r.indexOf("#");d>=0&&(a=r.slice(d),r=r.slice(0,d));let p=r.indexOf("?");p>=0&&(n=r.slice(p),r=r.slice(0,p));try{r=decodeURIComponent(r)}catch{}}if(n&&(!n.startsWith("?")||/[\u0000-\u001f]/.test(n))||(/^#L\d+(?:C\d+)?$/i.test(a)&&(a=""),!r||/[\u0000-\u001f]/.test(r)||/^\/(?:api|android|macos)(?:\/|$)/.test(r)))return null;let o=r.endsWith("/"),l=/\.html?(?::\d+(?::\d+)?)?$/i.test(r)||o;if(!r.startsWith("/")&&!r.startsWith("~/")){if(!t.sessionId&&!t.cwd?.startsWith("/"))return null;if(t.sessionId){let p="/api/session-file/"+encodeURIComponent(t.sessionId)+"?path="+encodeURIComponent(r);return{path:r,rawUrl:p,downloadUrl:p+"&mode=download",previewUrl:l?p+"&mode=preview"+(n?"&search="+encodeURIComponent(n):"")+a:null}}let d=[];for(let p of r.split("/"))if(!(!p||p==="."))if(p===".."){if(!d.length)return null;d.pop()}else d.push(p);r=t.cwd.replace(/\/$/,"")+"/"+d.join("/")}if(o){r.endsWith("/")||(r+="/");let d=eg(r);return{path:r,rawUrl:d,downloadUrl:d+"?__wand_file_action=download",previewUrl:d+n+a}}let u="/api/file-raw?path="+encodeURIComponent(r);return{path:r,rawUrl:u,downloadUrl:u+"&download=1",previewUrl:l?eg(r)+n+a:null}}function v1e(e){if(/^\/api\/(?:session-file|local-file)\//.test(e)){let r=new URL(e,"http://wand.invalid");return r.searchParams.set(e.startsWith("/api/local-file/")?"__wand_file_action":"mode","metadata"),r.pathname+r.search}let t=e.startsWith("/api/file-raw?")?new URL(e,"http://wand.invalid").searchParams.get("path")??e:e;return"/api/file-preview?path="+encodeURIComponent(t)}function b1e(e,t){let r=EA("/api/file-raw?path="+encodeURIComponent(e));return r?.previewUrl&&t?.startsWith("/api/local-file/")?{...r,previewUrl:t}:r}function J6(e){let t=e.trim().replace(/[\\/]+$/,"");return t.split(/[\\/]/).pop()||t||"file"}function Z6(e){let t=e.lastIndexOf(".");return t>0?e.slice(t).toLowerCase():""}function kA(e){let t=typeof e=="string"?{path:e}:e,r=t.path.trim();if(!r)return null;let n=new Set,a=[];for(let o of t.siblings??[]){let l=o.path.trim();!l||o.type==="dir"||n.has(l)||(n.add(l),a.push({path:l,name:o.name?.trim()||J6(l),type:"file"}))}return{path:r,siblings:a}}function CA(e,t){let r=e?.siblings??[];if(r.length<2||!e)return null;let n=r.findIndex(l=>l.path===e.path);if(n<0)return null;let a=(n+t+r.length)%r.length,o=r[a];return o&&o.path!==e.path?o:null}function q1(e){return Number.isFinite(e)?Math.max(10,Math.min(22,Math.round(e))):13}function tg(){return 13}function y1e(e){let t=typeof e=="number"&&Number.isFinite(e)?Math.max(0,e):0;if(t<1024)return`${Math.round(t)} B`;let r=["KB","MB","GB","TB"],n=t/1024,a=0;for(;n>=1024&&a<r.length-1;)n/=1024,a+=1;return`${n>=10?n.toFixed(0):n.toFixed(1)} ${r[a]}`}function w1e(e){return e.kind==="text"?e.lang||e.ext.replace(/^\./,"")||"text":{image:"\u56FE\u7247",pdf:"PDF",video:"\u89C6\u9891",audio:"\u97F3\u9891",binary:"\u4E8C\u8FDB\u5236"}[e.kind]||e.ext.replace(/^\./,"")||e.kind}function x1e(e){switch(e){case"image":case"pdf":case"video":case"audio":case"binary":return e;default:return"file"}}function SA(e){return e.lang==="markdown"||/\.(md|markdown|mdx)$/i.test(e.name)}function FA(e){return`'${e.replace(/'/g,"'\\''")}'`}var E1e=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","default","def","delete","do","else","enum","export","extends","false","finally","fn","for","from","func","function","go","if","impl","import","in","instanceof","interface","let","match","mod","new","nil","null","of","package","pass","private","protected","pub","public","raise","readonly","return","self","static","struct","super","switch","throw","trait","true","try","type","typeof","undefined","unsafe","use","var","void","while","with","yield"]),k1e=/\/\/[^\n]*|#[^\n]*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`(?:[^`\\]|\\.)*`|\b(?:0x[\da-fA-F]+|0b[01]+|\d+(?:\.\d+)?)\b|\b[A-Za-z_$][\w$]*\b|[+\-*/%=<>!&|^~?:]+/g;function C1e(e){let t=[],r=0;for(let n of e.matchAll(k1e)){let a=n.index??0;a>r&&t.push({value:e.slice(r,a)});let o=n[0],l;o.startsWith("//")||o.startsWith("#")?l="comment":/^["'`]/.test(o)?l="string":/^(?:0x|0b|\d)/.test(o)?l="number":E1e.has(o)?l="keyword":/^[+\-*/%=<>!&|^~?:]+$/.test(o)&&(l="operator"),t.push({value:o,kind:l}),r=a+o.length}return r<e.length&&t.push({value:e.slice(r)}),t}function S1e(e){switch(e){case"image":case"pdf":case"video":case"audio":case"binary":return e;default:return"text"}}function xA(e,t=!1){return`/api/file-raw?${t?"download=1&":""}path=${encodeURIComponent(e)}`}function OV(e,t,r,n){r=Ke(t.path,r);let a=J6(r),o=Pa(t.size,-1),l={message:Ke(t.error,`${n} (HTTP ${e.status})`),status:e.status,size:o>=0?o:void 0,maxSize:Pa(t.maxSize,-1)>=0?Pa(t.maxSize):void 0};if(e.status===413){let u=r.startsWith("/api/")?EA(r):null;l.download={path:r,name:a,url:u?.downloadUrl??xA(r,!0),size:l.size}}return l}function eE(e,t){let r=ya(e)?e:{},n=Ke(r.path,t).trim()||t,a=Ke(r.name,J6(n)),o=S1e(r.kind),l=o==="text"?Ke(r.content):void 0;return{kind:o,path:n,name:a,ext:Ke(r.ext,Z6(a)),size:Math.max(0,Pa(r.size)),mime:Ke(r.mime)||void 0,lang:Ke(r.lang)||void 0,content:l,rawUrl:xA(n),url:xA(n,!0)}}var F1e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ie(this,"fetchImpl",e)}async load(e,t={}){let r=await this.fetchImpl(v1e(e),{credentials:"same-origin",signal:t.signal}),n=await $s(r);return!r.ok||typeof n.error=="string"?{ok:!1,failure:OV(r,n,e,"\u52A0\u8F7D\u9884\u89C8\u5931\u8D25")}:{ok:!0,file:eE(n,e)}}async save(e,t){let r=await this.fetchImpl("/api/file-write",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,content:t})}),n=await $s(r);return!r.ok||typeof n.error=="string"?{ok:!1,failure:OV(r,n,e,"\u4FDD\u5B58\u6587\u4EF6\u5931\u8D25")}:{ok:!0,result:{path:Ke(n.path,e),size:Math.max(0,Pa(n.size,new TextEncoder().encode(t).byteLength)),mtime:Ke(n.mtime)||void 0}}}},$A=new F1e;var $1e=500;function LV(e,t,r={}){if(!t)return[];let n=r.caseSensitive===!0,a=n?e:e.toLowerCase();if(a.length!==e.length)return D1e(e,t);let o=n?t:t.toLowerCase(),l=[],u=1,d=0,p=a.indexOf(o);for(;p!==-1;)u+=HV(e,d,p),d=p,l.push({start:p,end:p+o.length,line:u}),p=a.indexOf(o,p+o.length);return l}function D1e(e,t){let r=[],n=1,a=0,o=e.indexOf(t);for(;o!==-1;)n+=HV(e,a,o),a=o,r.push({start:o,end:o+t.length,line:n}),o=e.indexOf(t,o+t.length);return r}function HV(e,t,r){let n=0;for(let a=t;a<r;a+=1)e.charCodeAt(a)===10&&(n+=1);return n}function A1e(e,t,r){return t<=0?0:(((e%t+t)%t+r)%t+t)%t}function zV(e,t,r){return{message:Ke(t.error,`${r} (HTTP ${e.status})`),status:e.status,size:Pa(t.size,-1)>=0?Pa(t.size):void 0,maxSize:Pa(t.maxSize,-1)>=0?Pa(t.maxSize):void 0}}function B1e(e,t,r){return{message:Ke(e.error,r),path:Ke(e.path,t)||t,size:Pa(e.size,-1)>=0?Pa(e.size):void 0,mtime:Ke(e.mtime)||void 0}}var I1e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ie(this,"fetchImpl",e)}async load(e,t={}){let r=await this.fetchImpl(`/api/file-preview?path=${encodeURIComponent(e)}`,{credentials:"same-origin",signal:t.signal}),n=await $s(r);if(!r.ok||typeof n.error=="string")return{ok:!1,failure:zV(r,n,"\u6253\u5F00\u6587\u4EF6\u5931\u8D25")};let a=eE(n,e);if(a.kind!=="text")return{ok:!1,failure:{message:"\u4EC5\u652F\u6301\u7F16\u8F91\u6587\u672C\u6587\u4EF6\u3002",status:415,size:a.size}};let o=a.content??"";return{ok:!0,file:{path:a.path,name:a.name,ext:a.ext||Z6(a.name),lang:a.lang,size:a.size??0,mime:a.mime,mtime:Ke(n.mtime)||void 0,baseline:o,draft:o,dirty:!1}}}async save(e,t,r={}){let n={path:e,content:t};r.overwrite||(r.expectedMtime&&(n.expectedMtime=r.expectedMtime),typeof r.expectedSize=="number"&&Number.isFinite(r.expectedSize)&&(n.expectedSize=r.expectedSize));let a=await this.fetchImpl("/api/file-write",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),o=await $s(a);return a.status===409?{ok:!1,conflict:B1e(o,e,"\u6587\u4EF6\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\u3002")}:!a.ok||typeof o.error=="string"?{ok:!1,failure:zV(a,o,"\u4FDD\u5B58\u6587\u4EF6\u5931\u8D25")}:{ok:!0,result:{path:Ke(o.path,e),size:Math.max(0,Pa(o.size,new TextEncoder().encode(t).byteLength)),mtime:Ke(o.mtime)||void 0}}}},M1e=new I1e;function DA(e=0){return{open:!1,revision:e,activePath:null,tabs:[],file:null,status:"idle",failure:null,saving:!1,fontSize:tg(),wrap:!1,preview:!1,findOpen:!1,findQuery:"",findCaseSensitive:!1,findIndex:0}}function T1e(e,t){return e==="switch"?{title:"\u5207\u6362\u6587\u4EF6\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002`}:e==="replace"?{title:"\u5173\u95ED\u7F16\u8F91\u5668\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002`}:{title:"\u5173\u95ED\u6587\u4EF6\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002`}}function j1e(e){return`\u300C${e}\u300D`}var _1e={async confirmDiscard(e,t){let r=T1e(e,j1e(t.split("/").pop()||t)),n=await xn.dialog({title:r.title,description:r.message,tone:"warning",actions:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autoFocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],dismissable:!0});return"action"in n&&n.action===!0},async confirmConflict(e){let t=await xn.dialog({title:"\u78C1\u76D8\u6587\u4EF6\u5DF2\u66F4\u6539",description:`\u300C${e}\u300D\u5728\u6253\u5F00\u540E\u88AB\u5916\u90E8\u4FEE\u6539\u3002\u91CD\u65B0\u52A0\u8F7D\u4F1A\u4E22\u5F03\u5F53\u524D\u8349\u7A3F\uFF1B\u8986\u76D6\u4F1A\u7528\u7F16\u8F91\u5668\u5185\u5BB9\u66FF\u6362\u78C1\u76D8\u6587\u4EF6\u3002`,tone:"warning",actions:[{label:"\u53D6\u6D88",value:"cancel",kind:"secondary",autoFocus:!0},{label:"\u91CD\u65B0\u52A0\u8F7D",value:"reload",kind:"secondary"},{label:"\u4ECD\u8981\u8986\u76D6",value:"overwrite",kind:"danger"}],dismissable:!0});return"action"in t?t.action:"cancel"},notify(e,t){xn.toast(e,{tone:t})},onSaved(){}};function N1e(e){let t=new Set,r=DA(),n=e.runtime??_1e,a=0,o=null,l=new Map;function u(C){r={...r,...C,revision:r.revision+1};for(let D of t)D()}function d(C){return C?SA(C):!1}function p(C){let D=[];for(let I of l.values())D.push({path:I.path,name:I.name,dirty:I.dirty});return D}function m(C){u({tabs:p(r.activePath),file:C!==void 0?C:r.activePath?l.get(r.activePath)??null:null})}async function v(C,D){let I=D??(r.activePath?l.get(r.activePath)??null:null);if(!I||!I.dirty)return!0;try{return await n.confirmDiscard(C,I.path)}catch(M){return n.notify(si(M,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function g(){let C=[...l.values()].filter(M=>M.dirty);if(C.length===0)return!0;let D=C.slice(0,3).map(M=>M.name).join("\u3001"),I=`${C.length} \u4E2A\u672A\u4FDD\u5B58\u6587\u4EF6\uFF08${D}${C.length>3?"\u2026":""}\uFF09`;try{return await n.confirmDiscard("replace",I)}catch(M){return n.notify(si(M,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function b(){await g()&&(l.clear(),o?.abort(),o=null,u(DA(r.revision+1)))}async function x(C){o?.abort();let D=new AbortController;o=D;let I=++a;u({open:!0,activePath:C,status:"loading",file:null,failure:null,findIndex:0});try{let M=await e.repository.load(C,{signal:D.signal});return I!==a||D.signal.aborted||!r.open?!1:(o=null,M.ok===!1||!M.file?(u({status:"error",failure:M.failure??{message:"\u6253\u5F00\u6587\u4EF6\u5931\u8D25"}}),!1):(l.set(C,M.file),u({status:"ready",file:M.file,failure:null,preview:d(M.file),tabs:p(C)}),!0))}catch(M){return I!==a||D.signal.aborted||Cd(M)||!r.open||(o=null,u({status:"error",failure:si(M,"\u6253\u5F00\u6587\u4EF6\u5931\u8D25")})),!1}}async function y(C){if(!n.confirmConflict)return"cancel";try{return await n.confirmConflict(C)}catch(D){return n.notify(si(D,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u8986\u76D6\u5916\u90E8\u4FEE\u6539\u3002").message,"error"),"cancel"}}function E(C,D,I,M){let A=l.get(C);if(!A)return;let j={...A,baseline:D,draft:A.draft,dirty:A.draft!==D,size:I,mtime:M};l.set(C,j);let P=r.activePath?l.get(r.activePath)??null:null;u({saving:!1,file:P,failure:null,tabs:p(r.activePath)})}async function S(C,D){u({saving:!0,failure:null});let I=C.draft;try{let M=await e.repository.save(C.path,I,{expectedMtime:C.mtime,expectedSize:C.size,overwrite:D.overwrite});if(!(l.get(C.path)??null))return u({saving:!1}),!1;if(M.ok===!1&&"conflict"in M){u({saving:!1,failure:{message:M.conflict.message,status:409,size:M.conflict.size}}),n.notify(M.conflict.message,"warning");let A=await y(C.path);if(A==="reload"){let j=await x(C.path);return j&&n.notify("\u5DF2\u91CD\u65B0\u52A0\u8F7D\u78C1\u76D8\u6587\u4EF6","info"),j}if(A==="overwrite"){let j=l.get(C.path);return j?S(j,{overwrite:!0}):!1}return!1}if(M.ok===!1)return u({saving:!1,failure:M.failure}),n.notify(M.failure.message,"error"),!1;E(C.path,I,M.result.size,M.result.mtime),n.notify("\u5DF2\u4FDD\u5B58","success");try{await n.onSaved?.(C.path)}catch{}return!0}catch(M){return u({saving:!1,failure:si(M,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF")}),n.notify(si(M,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF").message,"error"),!1}}function F(){let C=r.activePath?l.get(r.activePath):null;return LV(C?.draft??"",r.findQuery,{caseSensitive:r.findCaseSensitive}).length}async function $(C){switch(C.type){case"close":{if(r.saving)return!1;let D=C.path??r.activePath;if(!D)return!0;let I=l.get(D);if(I?.dirty&&!await v("close",I))return!1;l.delete(D);let M=p(null).filter(j=>j.path!==D);if(M.length===0)return u(DA(r.revision+1)),!0;let A=r.activePath===D?M[0].path:r.activePath;return u({activePath:A,file:A?l.get(A)??null:null,preview:d(A?l.get(A):null),tabs:M,status:A?"ready":"idle",findIndex:0}),!0}case"activate":{if(r.saving)return!1;if(r.activePath===C.path)return!0;let D=l.get(C.path)??null;return u({activePath:C.path,file:D,status:D?"ready":"loading",failure:null,preview:d(D),findIndex:0}),D?!0:x(C.path)}case"change":{if(!r.activePath)return!1;let D=l.get(r.activePath);if(!D)return!1;let I={...D,draft:C.value,dirty:C.value!==D.baseline};return l.set(D.path,I),m(I),!0}case"revert":{if(!r.activePath)return!1;let D=l.get(r.activePath);if(!D)return!1;let I={...D,draft:D.baseline,dirty:!1};return l.set(D.path,I),m(I),!0}case"save":{if(!r.activePath||r.saving)return!1;let D=l.get(r.activePath);return D?D.dirty?S(D,{overwrite:!1}):(n.notify("\u6CA1\u6709\u6539\u52A8","info"),!0):!1}case"wrap.toggle":return u({wrap:!r.wrap}),!0;case"preview.toggle":{let D=r.activePath?l.get(r.activePath):null;if(!D||!d(D))return!1;let I=!r.preview;return u({preview:I,...I?{findOpen:!1}:{}}),!0}case"font.adjust":return u({fontSize:q1(r.fontSize+C.delta)}),!0;case"find.open":return u({findOpen:!0}),!0;case"find.close":return r.findOpen&&u({findOpen:!1}),!0;case"find.set":return C.query===r.findQuery||u({findQuery:C.query,findOpen:!0,findIndex:0}),!0;case"find.step":{if(!r.findQuery)return!1;let D=F();return D===0?!1:(u({findIndex:A1e(r.findIndex,D,C.delta)}),!0)}case"find.case.toggle":return u({findCaseSensitive:!r.findCaseSensitive,findIndex:0}),!0}}return{controller:{async open(C){let D=C.trim();return!D||r.saving?!1:l.has(D)?r.activePath===D?(u({open:!0}),!0):$({type:"activate",path:D}):x(D)},execute:$,closeAll(){b()},isActive(){return r.open&&r.activePath!==null},hasDirty(){for(let C of l.values())if(C.dirty)return!0;return!1}},store:{subscribe(C){return t.add(C),()=>t.delete(C)},getSnapshot(){return r}},configureRuntime(C){let D=n;return n=C,()=>{n===C&&(n=D)}}}}var qV=N1e({repository:M1e}),W1=qV.controller,Td=qV.store;var WV=B(_(),1),V1=B(_(),1),P1e=B(Jt(),1),U1=B(Ee(),1),G1=V1.createContext(null);function rg({children:e}){let t=V1.useContext(G1),r=V1.useId(),n=t?.registerChrome;V1.useLayoutEffect(()=>n?.(r),[n,r]);let a=(0,U1.jsx)(DF,{value:"lucide",children:(0,U1.jsx)("div",{className:"wand-workbar-host",children:e})});return t?(0,P1e.createPortal)(a,t.chromeHost):a}function ng(){let e=V1.useContext(G1);return e?(0,U1.jsx)(Fr,{ref:e.trigger,"aria-label":"\u6253\u5F00\u7EC8\u7AEF",title:"\u6253\u5F00\u7EC8\u7AEF\uFF08\u8FD0\u884C\u5728 Wand / PTY \u4E3B\u673A\uFF09","aria-expanded":e.open,"aria-controls":"quick-terminal-panel","data-pressed":e.open||void 0,onClick:e.show,children:(0,U1.jsx)(De,{name:"terminal",size:18})}):null}function AA({visible:e}){return e?(0,U1.jsx)(ng,{}):null}var jd=B(Ee(),1),BA=WV.createContext(!1);function IA(){let e=WV.useSyncExternalStore(Al.subscribe,Al.getSnapshot,Al.getSnapshot);return e.open?(0,jd.jsx)(rg,{children:(0,jd.jsxs)(Ye,{align:"center",gap:12,className:"new-work-heading unified-new-work-heading",children:[(0,jd.jsxs)(je,{kind:"ghost","aria-label":"\u8FD4\u56DE\u539F\u9875\u9762",disabled:!e.dismissable,onClick:()=>La.close(),children:[(0,jd.jsx)(De,{name:"chevronLeft",size:18}),(0,jd.jsx)("span",{children:"\u8FD4\u56DE"})]}),(0,jd.jsx)("span",{className:"new-work-page-label",title:e.taskName||void 0,children:e.taskName?`\u65B0\u5EFA\u5DE5\u4F5C \xB7 ${e.taskName}`:"\u65B0\u5EFA\u5DE5\u4F5C"}),(0,jd.jsx)("div",{className:"workbar-spacer"}),(0,jd.jsx)(ng,{})]})}):null}var tE=g1(()=>mt("/api/wand-tasks"));Ds(()=>tE.clear());function MA(){tE.preload()}function TA(){tE.clear()}function R1e(e){return e?mt(`/api/wand-tasks?workspaceId=${encodeURIComponent(e)}`):tE.load()}var _d=B(_(),1);function O1e(e){let t=[],r=[];for(let n of e)n.archived?r.push(n):t.push(n);return{active:t,archived:r}}function VV(e,t=[]){let r=new Map;for(let o of e)r.has(o.id)||r.set(o.id,o);let{active:n,archived:a}=O1e([...r.values()]);for(let o of t)r.has(o.id)||(r.set(o.id,o),a.push(o));return{active:n,archived:a}}function z1e(e){let{active:t,archived:r}=VV(e.sessions,e.archivedSessions);return{...e,sessions:t,archivedSessions:r}}function L1e(e){return e.map(t=>{let r=VV(t.standaloneSessions,t.archivedSessions);return{...t,tasks:t.tasks.map(z1e),standaloneSessions:r.active,archivedSessions:r.archived}})}function K1(e){return e.replace(/https?:\/\/[^\s,。;]+/gi,"[\u670D\u52A1\u5730\u5740]").replace(/(?:Bearer\s+\S+|(?:token|password|connectionCode|appToken)\s*[:=]\s*\S+)/gi,"[\u51ED\u636E\u5DF2\u9690\u85CF]").replace(/(?:\/[\w.~-]+){2,}/g,"[\u8DEF\u5F84]")}var jA={groups:[],loading:!0,error:""};function H1e(e,t={}){let r=new Set,n=t.subscribeChanges??Ds,a=t.setInterval??setInterval,o=t.clearInterval??clearInterval,l=jA,u,d=0,p,m=!1,v,g;function b(y){if(!(l.groups===y.groups&&l.loading===y.loading&&l.error===y.error)){l=y;for(let E of r)E()}}function x(y){if(p)return y&&(m=!0),p;let E=d,S=Promise.resolve().then(async()=>{if(E===d)do{m=!1;try{let F=await e.listTaskGroups(u);if(E!==d)return;u=F.revision??(F.unchanged?u:void 0),b({groups:F.unchanged?l.groups:L1e(F.groups),loading:!0,error:""})}catch(F){if(E!==d)return;b({...l,error:K1(_s(F,"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u5217\u8868\u3002"))})}}while(m&&E===d)}).finally(()=>{E!==d||p!==S||(p=void 0,b({...l,loading:!1}))});return p=S,b({...l,loading:!0}),S}return{getSnapshot:()=>l,getServerSnapshot:()=>jA,reload:()=>x(!0),subscribe(y){return r.add(y),r.size===1&&(g=n(()=>{x(!0)}),v=a(()=>{x(!1)},6e3),x(!1)),()=>{r.delete(y),!(r.size>0)&&(g?.(),g=void 0,v!==void 0&&o(v),v=void 0,d+=1,p=void 0,m=!1,u=void 0,l=jA)}}}}var Ls=H1e(cn),q1e=Object.freeze({groups:[],loading:!0,error:""});function _A(e=0){let t=(0,_d.useSyncExternalStore)(Ls.subscribe,Ls.getSnapshot,Ls.getServerSnapshot),r=(0,_d.useRef)(e);return(0,_d.useEffect)(()=>{r.current!==e&&(r.current=e,Ls.reload())},[e]),{...t,reload:Ls.reload}}function NA(){let[e,t]=(0,_d.useState)(!1);(0,_d.useEffect)(()=>{if(e)return;let a=!1,o=()=>{a||t(!0)},l=typeof window<"u"&&typeof window.requestIdleCallback=="function",u=l?window.requestIdleCallback(o,{timeout:1500}):window.setTimeout(o,0);return()=>{a=!0,l?window.cancelIdleCallback(u):window.clearTimeout(u)}},[e]);let r=(0,_d.useCallback)(a=>e?Ls.subscribe(a):()=>{},[e]),n=(0,_d.useCallback)(()=>e?Ls.getSnapshot():q1e,[e]);return(0,_d.useSyncExternalStore)(r,n,n)}var W1e="taskboard",V1e="teams",U1e="teamchat",G1e="schedules",K1e="calendar",nE={board:W1e,teams:V1e,teamchat:U1e,schedules:G1e,calendar:K1e},is={open:!1,page:"board",workspaceId:"",sessionId:"",runId:"",teamId:"",calendarRange:"month",revision:0},PA=new Set,UV=!1;function rE(e){is={...is,...e,revision:is.revision+1},PA.forEach(t=>t())}function X1e(e){let t=new URLSearchParams(e).get("view");return t==="issues"||Object.values(nE).includes(t??"")}function Q1e(e){let t=new URLSearchParams(e).get("view");return Object.keys(nE).find(r=>nE[r]===t)??"board"}function Y1e(e){return new URLSearchParams(e).get("run")??""}function GV(){let e=$n(),t=X1e(e),r=Q1e(e),n=new URLSearchParams(e),a=r==="teamchat"?Y1e(e):"",o=r==="teams"?n.get("team")??"":"",l=n.get("range")==="week"?"week":"month";t===is.open&&r===is.page&&a===is.runId&&o===is.teamId&&l===is.calendarRange||rE({open:t,page:r,runId:a,teamId:o,calendarRange:l})}function X1(){UV||typeof window>"u"||(UV=!0,Si(GV),GV())}var En={open(e="",t="",r="board",n="",a=""){X1();let o=new URLSearchParams($n());wa({view:nE[r],run:r==="teamchat"?n:null,...r==="teams"&&a?{team:a}:{},...r==="board"&&!o.has("directory")&&e?{directory:e}:{}}),rE({open:!0,page:r,workspaceId:r==="calendar"?"":e,sessionId:r==="calendar"?"":t,runId:r==="teamchat"?n:"",teamId:r==="teams"&&(a||o.get("team"))||""})},calendarRange(e){wa({range:e}),is.calendarRange!==e&&rE({calendarRange:e})},close(){X1(),is.open&&(wa({view:"workspace"}),is.open&&rE({open:!1}))}},_l={subscribe(e){return PA.add(e),()=>{PA.delete(e)}},getSnapshot(){return is}};var J1e=B(_(),1),KV="wand-conversations-local-owner-v1";function RA(e){return e==="active"||e==="archived"?e:"all"}function Z1e(){let e={};try{let t=JSON.parse(localStorage.getItem(KV)??"{}");t&&typeof t=="object"&&!Array.isArray(t)&&(e=t)}catch{}return{mode:e.mode==="tasks"?"tasks":"chats",active:e.active??null,selectedId:typeof e.selectedId=="string"?e.selectedId:"",directory:!1,listFilter:RA(e.listFilter),activityOnly:e.activityOnly===!0,targets:e.targets??{},filters:e.filters??{},scrolls:e.scrolls??{},focusRequest:null}}function XV(e){let t=new URLSearchParams($n());if(!zu())return e;let r=t.get("view"),n=t.get("conversation")??"",a=t.get("conversationTask")??"",o=t.get("conversationRun");return{...e,mode:t.get("sidebar")==="tasks"?"tasks":t.get("sidebar")==="chats"||r==="chats"||r==="contacts"?"chats":"tasks",active:r==="chats"||r==="contacts",directory:r==="contacts",selectedId:n,listFilter:RA(t.get("chatFilter")),activityOnly:t.get("chatActivity")==="true",filters:{"list-query":t.get("chatQuery")??"",...n?{[n]:a}:{}},targets:n?{[n]:a&&o?{taskId:a,runId:o}:null}:{},focusRequest:e.selectedId===n?e.focusRequest:null}}var Br=XV(Z1e()),Vf=0,aE=new Set;function os(e){Br={...Br,...e};try{localStorage.setItem(KV,JSON.stringify({...Br,directory:!1,focusRequest:null}))}catch{}let t={};"mode"in e&&(t.sidebar=Br.mode),("active"in e||"directory"in e||"selectedId"in e)&&(t.view=Br.directory?"contacts":Br.active?"chats":"workspace",t.sidebar=Br.mode,t.conversation=Br.selectedId),"listFilter"in e&&(t.chatFilter=Br.listFilter==="all"?null:Br.listFilter),"activityOnly"in e&&(t.chatActivity=Br.activityOnly?"true":null),"filters"in e&&(t.chatQuery=Br.filters["list-query"]??"",t.conversationTask=Br.filters[Br.selectedId]??""),"targets"in e&&(t.conversationTask=Br.targets[Br.selectedId]?.taskId??"",t.conversationRun=Br.targets[Br.selectedId]?.runId??"");let r="selectedId"in e||"active"in e||"directory"in e;!r&&Object.keys(e).every(n=>n==="filters")?tD(t):wa(t,r?"push":"replace");for(let n of aE)n()}Si(()=>{let e=XV(Br);(e.selectedId!==Br.selectedId||e.active!==Br.active)&&++Vf,Br=e;for(let t of aE)t()});var Ir={subscribe:e=>(aE.add(e),()=>{aE.delete(e)}),getSnapshot:()=>Br,selectionRevision:()=>Vf,select:(e,t=!1)=>{let r=++Vf;os({selectedId:e,active:!0,directory:!1,focusRequest:t?{id:e,revision:r}:null})},openTask:(e,t,r)=>{++Vf,os({selectedId:e,active:!0,directory:!1,focusRequest:null,filters:{...Br.filters,[e]:t},targets:{...Br.targets,[e]:r?{taskId:t,runId:r}:null}})},consumeFocus:e=>{Br.focusRequest?.revision===e&&os({focusRequest:null})},show:()=>{++Vf,os({active:!0,directory:!1,focusRequest:null})},suspend:()=>{++Vf,os({active:!1,directory:!1,focusRequest:null})},directory:e=>{++Vf,os({directory:e,active:e?!0:Br.active,focusRequest:null})},mode:e=>os({mode:e,active:e==="chats",directory:!1,focusRequest:null}),listFilter:e=>os({listFilter:RA(e)}),activityOnly:e=>os({activityOnly:e}),target:(e,t)=>os({targets:{...Br.targets,[e]:t}}),filter:(e,t)=>os({filters:{...Br.filters,[e]:t}}),scroll:(e,t)=>os({scrolls:{...Br.scrolls,[e]:t}})};function ag(){return J1e.useSyncExternalStore(Ir.subscribe,Ir.getSnapshot,Ir.getSnapshot)}function eye(e,t,r=!1){return`conversation-draft:${typeof location>"u"?"server":location.origin}:local-owner:${e||"unselected"}:${r?"dispatch":t?`${t.taskId}:${t.runId}`:"talk"}`}var tye="wand-model-group/",rye="wand-auto-assign/auto",Q1="wand-openrouter-free",Nd=`${Q1}/auto`,QV="wand-decision/laya";function Pd(e){return e?.startsWith(tye)===!0}function Gu(e){return e?.trim()===rye}function OA(e){return e?.startsWith(`${Q1}/`)===!0}function nye(e){return e===QV}var Rd="\u514D\u8D39\u5206\u7EC4",rU="opencode-free",aye="\u514D\u8D39\u5206\u7EC4";function iye(e){return/^opencode\/[a-z0-9][a-z0-9._-]*$/.test(e)&&e!=="opencode/default"&&e!=="opencode/auto"}function oye(e){return e.id===rU&&e.provider==="opencode"}var ig="\u667A\u80FD\u5206\u914D",HA="openrouter-free";function sye(e){return e.id===HA&&e.provider==="pi"||oye(e)}var iE=32,zA=32,lye=/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/;function uye(e){if(!Array.isArray(e)||e.length>iE*Mu.length+2)throw new Error("\u6A21\u578B\u5206\u7EC4\u5FC5\u987B\u662F\u6709\u754C\u6570\u7EC4\u3002");let t=new Set,r=new Set,n=new Map;return e.map(a=>{if(!a||typeof a!="object"||Array.isArray(a))throw new Error("\u6A21\u578B\u5206\u7EC4\u683C\u5F0F\u65E0\u6548\u3002");let o=a,l=typeof o.id=="string"?o.id.trim():"",u=typeof o.name=="string"?o.name.trim():"";if(!lye.test(l)||!J7(o.provider))throw new Error("\u6A21\u578B\u5206\u7EC4\u6807\u8BC6\u6216\u5DE5\u5177\u65E0\u6548\u3002");let d=o.provider;if(!u||u.length>40||/[\x00-\x1f\x7f]/.test(u))throw new Error("\u5206\u7EC4\u540D\u79F0\u9700\u4E3A 1\u201340 \u4E2A\u5B57\u7B26\u3002");let p=l===HA,m=l===rU,v=p||m;if(p&&(d!=="pi"||u!==Rd)||m&&(d!=="opencode"||u!==aye))throw new Error("\u514D\u8D39\u5206\u7EC4\u7684\u5DE5\u5177\u4E0E\u540D\u79F0\u4E0D\u53EF\u4FEE\u6539\u3002");if(!v&&d==="pi"&&u===Rd)throw new Error("\u514D\u8D39\u5206\u7EC4\u662F\u5185\u7F6E\u5206\u7EC4\uFF0C\u8BF7\u76F4\u63A5\u8C03\u6574\u5B83\u7684\u987A\u5E8F\u3002");let g=`${d}/${l}`,b=`${d}/${u}`;if(t.has(g)||r.has(b))throw new Error("\u540C\u4E00\u5DE5\u5177\u7684\u5206\u7EC4\u6807\u8BC6\u6216\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\u3002");t.add(g),r.add(b);let x=(n.get(d)??0)+(v?0:1);if(x>iE)throw new Error(`\u6BCF\u4E2A\u5DE5\u5177\u6700\u591A ${iE} \u4E2A\u5206\u7EC4\u3002`);if(n.set(d,x),!Array.isArray(o.models)||!v&&!o.models.length||o.models.length>(v?128:zA))throw new Error(`\u5206\u7EC4\u9700\u5305\u542B 1\u2013${zA} \u4E2A\u6A21\u578B\uFF1B\u514D\u8D39\u5206\u7EC4\u53EF\u7559\u7A7A\u4F7F\u7528\u81EA\u52A8\u987A\u5E8F\u3002`);let y=o.models.map(E=>{let S=typeof E=="string"?E.trim():"";if(!S||S==="default"||S.length>256||/[\s\x00-\x1f\x7f]/.test(S)||Pd(S)||Gu(S)||S===Nd||S.startsWith("-"))throw new Error("\u7EC4\u5185\u5FC5\u987B\u662F\u5177\u4F53\u6A21\u578B ID\uFF0C\u4E0D\u80FD\u5D4C\u5957\u5206\u7EC4\u6216\u4F7F\u7528\u9ED8\u8BA4\u503C\u3002");if(OA(S)&&d!=="pi")throw new Error("\u514D\u8D39\u6A21\u578B\u4EC5\u5C5E\u4E8E Pi\u3002");if(p&&!S.startsWith(`${Q1}/`)||m&&!iye(S))throw new Error("\u514D\u8D39\u5206\u7EC4\u53EA\u80FD\u5305\u542B\u5BF9\u5E94\u514D\u8D39\u6C60\u4E2D\u7684\u6A21\u578B\u3002");return S});if(new Set(y).size!==y.length)throw new Error("\u540C\u4E00\u5206\u7EC4\u4E2D\u7684\u6A21\u578B\u4E0D\u80FD\u91CD\u590D\u3002");return{id:l,provider:d,name:u,models:y}})}function cye(e,t){let r=new Set(e);return[...new Set([...t.filter(n=>r.has(n)),...e])]}var Uf="default";function YV(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||typeof r!="object")continue;let n=r,a=typeof n.effort=="string"?n.effort.trim().toLowerCase():"";if(!/^[a-z][a-z0-9_-]{0,31}$/.test(a))continue;let o=typeof n.description=="string"?n.description.trim():"";t.push(o?{effort:a,description:o}:{effort:a})}return t}function dye(e){let t=typeof e.id=="string"?e.id.trim():"";if(!t)return null;let r=typeof e.label=="string"&&e.label.trim()?e.label.trim():t;return{value:t,label:r,...typeof e.group=="string"&&e.group?{group:e.group}:{}}}var JV=[["claude","models","defaultModel"],["codex","codexModels","defaultCodexModel"],["opencode","opencodeModels","defaultOpenCodeModel"],["grok","grokModels","defaultGrokModel"],["qoder","qoderModels","defaultQoderModel"],["pi","piModels","defaultPiModel"]];function nU(e){let t=e&&typeof e=="object"?e:{},r=t.defaultModels&&typeof t.defaultModels=="object"?t.defaultModels:{},n={},a={},o={};for(let[d,p,m]of JV){let v=Array.isArray(t[p])?t[p]:[],g=v.map(dye).filter(y=>y!==null),b=(typeof r[d]=="string"?r[d]:typeof t[m]=="string"?t[m]:"").trim();b&&(a[d]=b),g.some(y=>y.value===Uf)||g.unshift({value:Uf,label:b?`\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4\uFF08${b===Nd?Rd:Pd(b)?g.find(y=>y.value===b)?.label||"\u6A21\u578B\u5206\u7EC4":Gu(b)?g.find(y=>y.value===b)?.label||ig:b}\uFF09`:"\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4"}),n[d]=g;let x={};for(let y of v){let E=typeof y.id=="string"?y.id.trim():"",S=YV(y.reasoningEfforts);if(!E||!S.length)continue;let F=typeof y.defaultReasoningEffort=="string"?y.defaultReasoningEffort.trim():"";x[E]=F?{efforts:S,defaultEffort:F}:{efforts:S}}Object.keys(x).length&&(o[d]=x)}let l=t.thinkingEfforts&&typeof t.thinkingEfforts=="object"?t.thinkingEfforts:{},u={};for(let[d]of JV){let p=YV(l[d]);p.length&&(u[d]=p)}return{byProvider:n,defaultModels:a,effortsByProvider:u,modelEfforts:o,refreshedAt:typeof t.refreshedAt=="string"?t.refreshedAt:""}}function ZV(e,t){return!e||!t?[]:e.byProvider[t]??[]}var pye=/^跟随.*默认$/,fye=/\s*[((][^(())]*默认[^(())]*[))]\s*$/;function mye(e,t,r){let n=(r??"").trim(),a=u=>u===Nd?Rd:Pd(u)||Gu(u)?ZV(e,t).find(d=>d.value===u)?.label||(Gu(u)?ig:"\u6A21\u578B\u5206\u7EC4"):u;if(n&&n!==Uf)return a(n);let o=e?.defaultModels?.[t??""]?.trim();if(o)return a(o);let l=(ZV(e,t).find(u=>u.value===Uf)?.label.trim()??"").replace(fye,"").trim();return pye.test(l)?"":l}function hye(e,t,r){if(!e)return{efforts:[]};let n=e.modelEfforts[t],a=r?n?.[r]:void 0,o=n?.[Uf],l=a?.efforts.length?a:o;return l?.efforts.length?l:{efforts:e.effortsByProvider[t]??[]}}function gye(e,t){let r=e?.byProvider[t];return r&&r.length>0?r:[{value:Uf,label:"\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4"}]}var vye=6e4,bye=6e4,Y1=null,aU=0,eU=0,LA=new Set;function yye(e){return LA.add(e),()=>{LA.delete(e)}}function tU(e){return JSON.stringify({refreshedAt:e.refreshedAt,byProvider:e.byProvider,defaultModels:e.defaultModels,effortsByProvider:e.effortsByProvider,modelEfforts:e.modelEfforts})}function og(e){let t=nU(e),r=Y1!==null&&tU(Y1)===tU(t);if(Y1=t,aU=Date.now(),r)return t;for(let n of LA)n(t);return typeof window<"u"&&window.dispatchEvent(new CustomEvent("wand-model-catalog",{detail:e})),t}function qA(){typeof window>"u"||eU||(eU=window.setInterval(()=>{mt("/api/models",{credentials:"same-origin"}).then(e=>{og(e)}).catch(()=>{})},vye))}function iU(){return Y1&&Date.now()-aU<bye?Y1:null}async function wye(e){return iU()||og(await mt("/api/models",{signal:e,credentials:"same-origin"}))}var xye={claude:{standard:"low",deep:"medium",max:"max"},codex:{standard:"low",deep:"medium",max:"xhigh"},opencode:{standard:"low",deep:"high",max:"max"},grok:{standard:"low",deep:"high",max:"xhigh"},qoder:{standard:"low",deep:"high",max:"max"},pi:{standard:"low",deep:"high",max:"max"}},Eye={auto:"\u81EA\u52A8",none:"\u5173\u95ED",minimal:"\u6700\u4F4E",low:"\u4F4E",medium:"\u4E2D",high:"\u9AD8",xhigh:"\u8D85\u9AD8",max:"\u6781\u9AD8",ultra:"\u6781\u9650",ultracode:"\u6781\u9650\u4EE3\u7801"};function kye(e,t){let r=xye[e];return r?.standard===t?"standard":r?.deep===t?"deep":r?.max===t?"max":`${e}:${t}`}function WA(e){return Eye[e]??e}function VA(e,t,r){if(!t.map(l=>l.effort.trim().toLowerCase()).filter(l=>/^[a-z][a-z0-9_-]{0,31}$/.test(l)).length)return null;let n=t.map(l=>({effort:l.effort.trim().toLowerCase(),description:l.description?.trim()||""})).filter(l=>/^[a-z][a-z0-9_-]{0,31}$/.test(l.effort)&&l.effort!=="off");if(!n.length)return[{id:"off",label:"auto",hint:"\u8FD9\u4E2A\u6A21\u578B\u4E0D\u80FD\u8C03\u601D\u8003\u6DF1\u5EA6"}];let a=[{id:"off",label:"auto",hint:r?`\u4F7F\u7528\u6A21\u578B\u9ED8\u8BA4\u6863\u4F4D\uFF08${r}\uFF09`:"\u4F7F\u7528\u6A21\u578B\u9ED8\u8BA4\u6863\u4F4D"}],o=new Set(["off"]);for(let l of n){let u=kye(e,l.effort);o.has(u)||(o.add(u),a.push({id:u,label:l.effort,hint:l.description||l.effort}))}return a}var Od=null,li={open:!1,dismissable:!0,initialPath:"",revision:0},oE=new Set;function oU(e,t=li.initialPath){li={open:e,dismissable:!0,initialPath:t,revision:li.revision+1};for(let r of oE)r()}function Cye(e){if(!(!li.open||li.dismissable===e)){li={...li,dismissable:e};for(let t of oE)t()}}var zd={open(e){if(!Od)return!1;let t=(e??Od.getInitialPath()).trim();return t?(Od.onOpen?.(),oU(!0,t),!0):!1},close(){li.open&&(oU(!1),Od?.onClose?.())},closeIfOpen(){return!li.open||!li.dismissable?!1:(this.close(),!0)},closeTopmost(){return li.open?(li.dismissable&&this.close(),!0):!1},isOpen(){return li.open},setDismissable(e){Cye(e)},async choose(e){let t=e.trim(),r=Od;return!li.open||!r||!t?!1:(await r.applySelection(t),this.close(),!0)}},UA={subscribe(e){return oE.add(e),()=>oE.delete(e)},getSnapshot(){return li}};function GA(e){return Od=e,()=>{Od===e&&(li.open&&zd.close(),Od=null)}}var Sye=e=>{let{checkboxCls:t,checkboxSize:r,lineWidth:n}=e,a=`${t}-wrapper`,o="@media (hover: hover) and (pointer: fine)";return[{[`${t}-group`]:{...Tt(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[a]:{...Tt(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${a}`]:{marginInlineStart:0}},[t]:{...Tt(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:r,height:r,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${ue(n)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,flex:"none",...Wo(),"&:after":{boxSizing:"border-box",position:"absolute",top:`calc(${r} / 2 - ${n})`,insetInlineStart:`calc(${r} / 4 - ${n})`,display:"table",width:e.calc(r).div(14).mul(5).equal(),height:e.calc(r).div(14).mul(8).equal(),border:`${ue(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...Qh()},[`${t}-input`]:{position:"absolute",inset:`calc(-1 * (${n}))`,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:yi(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[o]:{[`
210
- ${a}:not(${a}-disabled),
211
- ${t}:not(${t}-disabled)
212
- `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${a}:not(${a}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Qh()},[o]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'},[o]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}}},{[`${a}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function sU(e,t){let r=yt(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return Sye(r)}var sE=pt("Checkbox",(e,{prefixCls:t})=>[sU(t,e)]);var lU=B(_()),lE=B(_());function KA(){return KA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},KA.apply(this,arguments)}var Fye=(0,lE.forwardRef)((e,t)=>{let{prefixCls:r="rc-checkbox",className:n,style:a,checked:o,disabled:l,defaultChecked:u=!1,type:d="checkbox",title:p,onChange:m,...v}=e,g=(0,lE.useRef)(null),b=(0,lE.useRef)(null),[x,y]=qt(u,o);(0,lE.useImperativeHandle)(t,()=>({focus:F=>{g.current?.focus(F)},blur:()=>{g.current?.blur()},input:g.current,nativeElement:b.current}));let E=Z(r,n,{[`${r}-checked`]:x,[`${r}-disabled`]:l}),S=F=>{l||("checked"in e||y(F.target.checked),m?.({target:{...e,type:d,checked:F.target.checked},stopPropagation(){F.stopPropagation()},preventDefault(){F.preventDefault()},nativeEvent:F.nativeEvent}))};return lU.createElement("span",{className:E,title:p,style:a,ref:b},lU.createElement("input",KA({},v,{className:`${r}-input`,ref:g,onChange:S,disabled:l,checked:!!x,type:d})))}),XA=Fye,$ye=B(_());function QA(e){let t=$ye.default.useRef(null),r=()=>{vr.cancel(t.current),t.current=null};return[()=>{r(),t.current=vr(()=>{t.current=null})},n=>{t.current&&(n.stopPropagation(),r()),e?.(n)}]}var Hs=B(_()),Dye=B(_()),Aye=Dye.default.createContext(null),uU=Aye,Bye=(e,t)=>{let{prefixCls:r,children:n,indeterminate:a=!1,onMouseEnter:o,onMouseLeave:l,skipGroup:u=!1,disabled:d,rootClassName:p,className:m,style:v,classNames:g,styles:b,name:x,value:y,checked:E,defaultChecked:S,onChange:F,...$}=e,{getPrefixCls:C,direction:D,className:I,style:M,classNames:A,styles:j}=xt("checkbox"),P=Hs.useContext(uU),{isFormItemInput:O}=Hs.useContext(vo),V=Hs.useContext(ja),W=d??P?.disabled??V,[H,q]=qt(S,E),z=H,L=wt(Ae=>{q(Ae.target.checked),F?.(Ae),!u&&P?.toggleOption&&P.toggleOption({label:n,value:y})});P&&!u&&(z=P.value.includes(y));let U=Hs.useRef(null),Y=Za(t,U);Hs.useEffect(()=>{if(!(u||!P))return P.registerValue(y),()=>{P.cancelValue(y)}},[y,u]),Hs.useEffect(()=>{U.current?.input&&(U.current.input.indeterminate=a)},[a]);let X=C("checkbox",r),J=yn(X),[N,R]=sE(X,J),K={...$},Q={...e,indeterminate:a,disabled:W,checked:z},ee=Ge(M),te=Ge(v),[ne,me]=Ct([A,g],[j,ee,b,te],{props:Q}),se=Z(`${X}-wrapper`,{[`${X}-rtl`]:D==="rtl",[`${X}-wrapper-checked`]:z,[`${X}-wrapper-disabled`]:W,[`${X}-wrapper-in-form-item`]:O},I,m,ne.root,p,R,J,N),he=Z(ne.icon,{[`${X}-indeterminate`]:a},$b,N),[le,ke]=QA(K.onClick);return Hs.createElement(rd,{component:"Checkbox",disabled:W},Hs.createElement("label",{className:se,style:me.root,onMouseEnter:o,onMouseLeave:l,onClick:le},Hs.createElement(XA,{...K,name:!u&&P?P.name:x,checked:z,onClick:ke,onChange:L,prefixCls:X,className:he,style:me.icon,disabled:W,ref:Y,value:y}),Lt(n)&&Hs.createElement("span",{className:Z(`${X}-label`,ne.label),style:me.label},n)))},Iye=Hs.forwardRef(Bye),cU=Iye,Ld=B(_()),Mye=Ld.forwardRef((e,t)=>{let{defaultValue:r,children:n,options:a=[],prefixCls:o,className:l,rootClassName:u,style:d,onChange:p,role:m="group",...v}=e,{getPrefixCls:g,direction:b}=Ld.useContext(st),[x,y]=qt(r||[],v.value),E=x||[],[S,F]=Ld.useState([]),$=Ld.useMemo(()=>a.map(z=>ti(z)||Kn(z)?{label:z,value:z}:z).filter(z=>zr(z)&&zr(z.value)),[a]),C=z=>{F(L=>L.filter(U=>U!==z))},D=z=>{F(L=>[].concat(Zr(L),[z]))},I=z=>{let L=E.indexOf(z.value),U=Zr(E);L===-1?U.push(z.value):U.splice(L,1),y(U),p?.(U.filter(Y=>S.includes(Y)).sort((Y,X)=>{let J=$.findIndex(R=>R.value===Y),N=$.findIndex(R=>R.value===X);return J-N}))},M=g("checkbox",o),A=`${M}-group`,j=yn(M),[P,O]=sE(M,j),V=Ut(v,["value","disabled"]),W=Array.isArray($)&&$.length>0?$.map(z=>Ld.createElement(cU,{prefixCls:M,key:z.value.toString(),disabled:"disabled"in z?z.disabled:v.disabled,value:z.value,checked:E.includes(z.value),onChange:z.onChange,className:Z(`${A}-item`,z.className),style:z.style,title:z.title,id:z.id,required:z.required},z.label)):n,H=Ld.useMemo(()=>({toggleOption:I,value:E,disabled:v.disabled,name:v.name,registerValue:D,cancelValue:C}),[I,E,v.disabled,v.name,D,C]),q=Z(A,{[`${A}-rtl`]:b==="rtl"},l,u,O,j,P);return Ld.createElement("div",{className:q,style:d,role:m,...V,ref:t},Ld.createElement(uU.Provider,{value:H},W))}),Tye=Mye,YA=cU;YA.Group=Tye;YA.__ANT_CHECKBOX=!0;var JA=YA;var Hd=B(_()),eo=B(_()),qd=B(_()),dU=(e,t)=>{if(!e)return null;let r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},sg=e=>e!==void 0?`${e}px`:void 0;function jye(e){let{prefixCls:t,containerRef:r,value:n,getValueIndex:a,motionName:o,onMotionStart:l,onMotionEnd:u,direction:d,vertical:p=!1}=e,m=qd.useRef(null),[v,g]=qd.useState(n),b=M=>{let A=a(M),j=r.current?.querySelectorAll(`.${t}-item`)[A];return j?.offsetParent&&j},[x,y]=qd.useState(null),[E,S]=qd.useState(null);or(()=>{if(v!==n){let M=b(v),A=b(n),j=dU(M,p),P=dU(A,p);g(n),y(j),S(P),M&&A?l():u()}},[n]);let F=qd.useMemo(()=>sg(p?x?.top??0:d==="rtl"?-x?.right:x?.left),[p,d,x]),$=qd.useMemo(()=>sg(p?E?.top??0:d==="rtl"?-E?.right:E?.left),[p,d,E]),C=()=>p?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},D=()=>p?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},I=()=>{y(null),S(null),u()};return!x||!E?null:qd.createElement(ra,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:C,onAppearActive:D,onVisibleChanged:I},({className:M,style:A},j)=>{let P={...A,"--thumb-start-left":F,"--thumb-start-width":sg(x?.width),"--thumb-active-left":$,"--thumb-active-width":sg(E?.width),"--thumb-start-top":F,"--thumb-start-height":sg(x?.height),"--thumb-active-top":$,"--thumb-active-height":sg(E?.height)},O={ref:fn(m,j),style:P,className:Z(`${t}-thumb`,M)};return qd.createElement("div",O)})}function uE(){return uE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uE.apply(this,arguments)}function _ye(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function Nye(e){return e.map(t=>{if(typeof t=="object"&&t!==null){let r=_ye(t);return{...t,value:t.value,title:r}}return{label:t?.toString(),title:t?.toString(),value:t}})}var Pye=({prefixCls:e,className:t,style:r,styles:n,classNames:a,data:o,disabled:l,checked:u,label:d,title:p,value:m,name:v,onChange:g,onFocus:b,onBlur:x,onKeyDown:y,onKeyUp:E,onMouseDown:S,itemRender:F=$=>$})=>{let $=D=>{l||g(D,m)},C=eo.createElement("label",{className:Z(t,{[`${e}-item-disabled`]:l}),style:r,onMouseDown:S},eo.createElement("input",{name:v,className:`${e}-item-input`,type:"radio",disabled:l,checked:u,onChange:$,onFocus:b,onBlur:x,onKeyDown:y,onKeyUp:E}),eo.createElement("div",{className:Z(`${e}-item-label`,a?.label),title:p,style:n?.label},d));return F(C,{item:o})},Rye=eo.forwardRef((e,t)=>{let{prefixCls:r="rc-segmented",direction:n,vertical:a,options:o=[],disabled:l,defaultValue:u,value:d,name:p,onChange:m,className:v="",style:g,styles:b,classNames:x,motionName:y="thumb-motion",itemRender:E,...S}=e,F=eo.useRef(null),$=eo.useMemo(()=>fn(F,t),[F,t]),C=eo.useMemo(()=>Nye(o),[o]),[D,I]=qt(u??C[0]?.value,d),[M,A]=eo.useState(!1),j=(N,R)=>{I(R),m?.(R)},P=Ut(S,["children"]),[O,V]=eo.useState(!1),[W,H]=eo.useState(!1),q=()=>{H(!0)},z=()=>{H(!1)},L=()=>{V(!1)},U=N=>{N.key==="Tab"&&V(!0)},Y=N=>{let R=C.filter(ne=>ne.value===D||!ne.disabled),K=R.findIndex(ne=>ne.value===D),Q=R.length,ee=(K+N+Q)%Q,te=R[ee];te&&te.value!==D&&(I(te.value),m?.(te.value))},X=N=>{switch(N.key){case"ArrowLeft":case"ArrowUp":Y(-1);break;case"ArrowRight":case"ArrowDown":Y(1);break}},J=N=>{let{value:R,disabled:K}=N;return eo.createElement(Pye,uE({},N,{name:p,data:N,itemRender:E,key:R,prefixCls:r,className:Z(N.className,`${r}-item`,x?.item,{[`${r}-item-selected`]:R===D&&!M,[`${r}-item-selected-text`]:R===D,[`${r}-item-focused`]:W&&O&&R===D}),style:b?.item,classNames:x,styles:b,checked:R===D,onChange:j,onFocus:q,onBlur:z,onKeyDown:X,onKeyUp:U,onMouseDown:L,disabled:!!l||!!K}))};return eo.createElement("div",uE({role:"radiogroup","aria-label":"segmented control",tabIndex:l?void 0:0,"aria-orientation":a?"vertical":"horizontal",style:g},P,{className:Z(r,{[`${r}-rtl`]:n==="rtl",[`${r}-disabled`]:l,[`${r}-vertical`]:a},v),ref:$}),eo.createElement("div",{className:`${r}-group`},eo.createElement(jye,{vertical:a,prefixCls:r,value:D,containerRef:F,motionName:`${r}-${y}`,direction:n,getValueIndex:N=>C.findIndex(R=>R.value===N),onMotionStart:()=>{A(!0)},onMotionEnd:()=>{A(!1)}}),C.map(J)))}),Oye=Rye,zye=Oye;function pU(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}var fU=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),Lye={overflow:"hidden",...fl},Hye=e=>{let{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,motionDurationMid:a}=e,o=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),l=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),u=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:{...Tt(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${a}`,...Xn(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${ue(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${a}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...fU(e),color:e.itemSelectedColor},"&-selected-text":{color:e.itemSelectedColor,transition:`color ${a}`},"&-focused":yi(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,pointerEvents:"none",transition:["opacity","background-color"].map(d=>`${d} ${a}`).join(", ")},[`&:not(${t}-item-selected):not(${t}-item-selected-text):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:o,lineHeight:ue(o),padding:`0 ${ue(e.segmentedPaddingHorizontal)}`,...Lye},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-icon > svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...fU(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${ue(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:l,lineHeight:ue(l),padding:`0 ${ue(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:u,lineHeight:ue(u),padding:`0 ${ue(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...pU(`&-disabled ${t}-item`,e),...pU(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{willChange:"transform, width",transition:["transform","width"].map(d=>`${d} ${r} ${n}`).join(", ")},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}},qye=e=>{let{colorTextLabel:t,colorText:r,colorFillSecondary:n,colorBgElevated:a,colorFill:o,lineWidthBold:l,colorBgLayout:u}=e;return{trackPadding:l,trackBg:u,itemColor:t,itemHoverColor:r,itemHoverBg:n,itemSelectedBg:a,itemActiveBg:o,itemSelectedColor:r}},Wye=pt("Segmented",e=>{let{lineWidth:t,calc:r}=e,n=yt(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()});return Hye(n)},qye);function Vye(e){return kt(e)&&!!e?.icon}var Uye=Hd.forwardRef((e,t)=>{let r=pl(),{prefixCls:n,className:a,rootClassName:o,block:l,options:u=[],size:d,style:p,vertical:m,orientation:v,shape:g="default",name:b=r,styles:x,classNames:y,...E}=e,{getPrefixCls:S,direction:F,className:$,style:C,classNames:D,styles:I}=xt("segmented"),M={...e,options:u,size:d,shape:g},A=Ge(C),j=Ge(p),[P,O]=Ct([D,y],[I,A,x,j],{props:M}),V=S("segmented",n),[W,H]=Wye(V),q=Ur(d),z=Hd.useMemo(()=>u.map(X=>{if(Vye(X)){let{icon:J,label:N,...R}=X;return{...R,label:Hd.createElement(Hd.Fragment,null,Hd.createElement("span",{className:Z(`${V}-item-icon`,P.icon),style:O.icon},J),Lt(N)&&Hd.createElement("span",null,N))}}return X}),[u,V,P.icon,O.icon]),[,L]=Vo(v,m),U=Z(a,o,$,P.root,{[`${V}-block`]:l,[`${V}-sm`]:q==="small",[`${V}-lg`]:q==="large",[`${V}-vertical`]:L,[`${V}-shape-${g}`]:g==="round"},W,H),Y=(X,{item:J})=>{if(!J.tooltip)return X;let N=kt(J.tooltip)?J.tooltip:{title:J.tooltip};return Hd.createElement(wi,{...N},X)};return Hd.createElement(zye,{...E,name:b,className:U,style:O.root,classNames:P,styles:O,itemRender:Y,options:z,ref:t,prefixCls:V,direction:F,vertical:L})}),Gye=Uye,gU=Gye,Gf=B(_(),1);function Kye(e,t,r){if(!e||r)return[t];let n=Math.min(e.left,t.left),a=Math.max(e.left+e.width,t.left+t.width),o={left:n,width:a-n};return o.left===t.left&&o.width===t.width?[t]:[o,t]}var J1=B(Ee(),1);function mU(e,t){let r=e.querySelector(`[data-stretch-value="${CSS.escape(t)}"]`)?.closest(".ant-segmented-item");return r?{left:r.offsetLeft,width:r.offsetWidth}:null}function hU(e,t){return Math.abs(e.left-t.left)<1&&Math.abs(e.width-t.width)<1}function Z1({tabs:e,value:t,ariaLabel:r,className:n,onValueChange:a}){let o=Gf.useRef(null),l=Gf.useRef(null),u=Gf.useRef(null),d=Gf.useRef(null),p=ga(),[m,v]=Gf.useState(null),g=e.map(b=>b.value).join("\0");return Gf.useLayoutEffect(()=>{let b=o.current;if(!b)return;let x=mU(b,t);if(!x)return;let y=u.current,E=y&&l.current?{left:y.offsetLeft,width:y.offsetWidth}:l.current,S=Kye(E,x,p);l.current=x,d.current=S[1]??null,v(S[0]??x),y&&S[1]&&hU({left:y.offsetLeft,width:y.offsetWidth},S[0])&&(d.current=null,v(x))},[p,g,t]),Gf.useEffect(()=>{let b=o.current;if(!b||typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{if(d.current)return;let y=mU(b,t);y&&(l.current=y,v(y))});return x.observe(b),()=>x.disconnect()},[g,t]),(0,J1.jsx)(Bt,{children:(0,J1.jsxs)("div",{ref:o,className:Je("wand-ui-stretch-tabs",n),onKeyDown:b=>{if(b.key!=="Home"&&b.key!=="End")return;b.preventDefault();let x=e[b.key==="Home"?0:e.length-1];x&&(a(x.value),o.current?.querySelector(`[data-stretch-value="${CSS.escape(x.value)}"]`)?.closest(".ant-segmented-item")?.querySelector("input")?.focus({preventScroll:!0}))},children:[m?(0,J1.jsx)("span",{ref:u,className:"wand-ui-stretch-indicator",onTransitionEnd:b=>{if(b.target!==b.currentTarget||!m||p||b.propertyName!=="left"&&b.propertyName!=="width")return;let x=b.currentTarget;if(!hU({left:x.offsetLeft,width:x.offsetWidth},m))return;let y=d.current;y&&(d.current=null,v(y))},style:{left:m.left,width:m.width},"aria-hidden":"true"}):null,(0,J1.jsx)(gU,{value:t,onChange:a,"aria-label":r,options:e.map(b=>({value:b.value,label:(0,J1.jsx)("span",{"data-stretch-value":b.value,children:b.label})}))})]})})}var Nl=B(_()),Kf=B(_()),cE=B(_()),lg=void 0;function Xye(e,t){let{prefixCls:r,invalidate:n,item:a,renderItem:o,responsive:l,responsiveDisabled:u,registerSize:d,itemKey:p,className:m,style:v,children:g,display:b,order:x,component:y="div",...E}=e,S=l&&!b;function F(M){d(p,M)}cE.useEffect(()=>()=>{F(null)},[]);let $=o&&a!==lg?o(a,{index:x}):g,C;n||(C={opacity:S?0:1,height:S?0:lg,overflowY:S?"hidden":lg,order:l?x:lg,pointerEvents:S?"none":lg,position:S?"absolute":lg});let D={};S&&(D["aria-hidden"]=!0);let I=cE.createElement(y,jn({className:Z(!n&&r,m),style:{...C,...v}},D,E,{ref:t}),$);return l&&(I=cE.createElement(Ta,{onResize:({offsetWidth:M})=>{F(M)},disabled:u},I)),I}var Qye=cE.forwardRef(Xye),ey=Qye,vU=B(_()),Yye=B(Jt());function Jye(e){if(typeof MessageChannel>"u")vr(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function Zye(){let e=vU.useRef(null);return t=>{e.current||(e.current=[],Jye(()=>{(0,Yye.unstable_batchedUpdates)(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(t)}}function ug(e,t){let[r,n]=vU.useState(t),a=wt(o=>{e(()=>{n(o)})});return[r,a]}var ty=B(_()),ewe=B(_()),dE=ewe.default.createContext(null),twe=(e,t)=>{let r=ty.useContext(dE);if(!r){let{component:u="div",...d}=e;return ty.createElement(u,jn({},d,{ref:t}))}let{className:n,...a}=r,{className:o,...l}=e;return ty.createElement(dE.Provider,{value:null},ty.createElement(ey,jn({ref:t,className:Z(n,o)},a,l)))},rwe=ty.forwardRef(twe),nwe=rwe,bU="responsive",yU="invalidate";function awe(e){return`+ ${e.length} ...`}function iwe(e,t){let{prefixCls:r="rc-overflow",data:n=[],renderItem:a,renderRawItem:o,itemKey:l,itemWidth:u=10,ssr:d,style:p,className:m,maxCount:v,renderRest:g,renderRawRest:b,prefix:x,suffix:y,component:E="div",itemComponent:S,onVisibleChange:F,...$}=e,C=d==="full",D=Zye(),[I,M]=ug(D,null),A=I||0,[j,P]=ug(D,new Map),[O,V]=ug(D,0),[W,H]=ug(D,0),[q,z]=ug(D,0),[L,U]=ug(D,0),[Y,X]=(0,Kf.useState)(null),[J,N]=(0,Kf.useState)(null),R=Nl.useMemo(()=>J===null&&C?Number.MAX_SAFE_INTEGER:J||0,[J,I]),[K,Q]=(0,Kf.useState)(!1),ee=`${r}-item`,te=Math.max(O,W),ne=v===bU,me=n.length&&ne,se=v===yU,he=me||typeof v=="number"&&n.length>v,le=(0,Kf.useMemo)(()=>{let Ie=n;return me?I===null&&C?Ie=n:Ie=n.slice(0,Math.min(n.length,A/u)):typeof v=="number"&&(Ie=n.slice(0,v)),Ie},[n,u,I,v,me]),ke=(0,Kf.useMemo)(()=>me?n.slice(R+1):n.slice(le.length),[n,le,me,R]),Ae=(0,Kf.useCallback)((Ie,Re)=>typeof l=="function"?l(Ie):(l&&Ie?.[l])??Re,[l]),de=(0,Kf.useCallback)(a||(Ie=>Ie),[a]);function ve(Ie,Re,ht){J===Ie&&(Re===void 0||Re===Y)||(N(Ie),ht||(Q(Ie<n.length-1),F?.(Ie)),Re!==void 0&&X(Re))}function ye(Ie,Re){M(Re.clientWidth)}function we(Ie,Re){P(ht=>{let lt=new Map(ht);return Re===null?lt.delete(Ie):lt.set(Ie,Re),lt})}function Oe(Ie,Re){H(Re),V(W)}function Fe(Ie,Re){z(Re)}function $e(Ie,Re){U(Re)}function Me(Ie){return j.get(Ae(le[Ie],Ie))}or(()=>{if(A&&typeof te=="number"&&le){let Ie=q+L,Re=le.length,ht=Re-1;if(!Re){ve(0,null);return}for(let lt=0;lt<Re;lt+=1){let Xe=Me(lt);if(C&&(Xe=Xe||0),Xe===void 0){ve(lt-1,void 0,!0);break}if(Ie+=Xe,ht===0&&Ie<=A||lt===ht-1&&Ie+Me(ht)<=A){ve(ht,null);break}else if(Ie+te>A){ve(lt-1,Ie-Xe-L+W);break}}y&&Me(0)+L>A&&X(null)}},[A,j,W,q,L,Ae,le]);let qe=K&&!!ke.length,ze={};Y!==null&&me&&(ze={position:"absolute",top:0,insetInlineStart:Y});let Te={prefixCls:ee,responsive:me,component:S,invalidate:se},Ne=o?(Ie,Re)=>{let ht=Ae(Ie,Re);return Nl.createElement(dE.Provider,{key:ht,value:{...Te,order:Re,item:Ie,itemKey:ht,registerSize:we,display:Re<=R}},o(Ie,Re))}:(Ie,Re)=>{let ht=Ae(Ie,Re);return Nl.createElement(ey,jn({},Te,{order:Re,key:ht,item:Ie,renderItem:de,itemKey:ht,registerSize:we,display:Re<=R}))},Qe={order:qe?R:Number.MAX_SAFE_INTEGER,className:`${ee}-rest`,registerSize:Oe,display:qe},ot=g||awe,et=b?Nl.createElement(dE.Provider,{value:{...Te,...Qe}},b(ke)):Nl.createElement(ey,jn({},Te,Qe),typeof ot=="function"?ot(ke):ot),Ue=Nl.createElement(E,jn({className:Z(!se&&r,m),style:p,ref:t},$),x&&Nl.createElement(ey,jn({},Te,{responsive:ne,responsiveDisabled:!me,order:-1,className:`${ee}-prefix`,registerSize:Fe,display:!0}),x),le.map(Ne),he?et:null,y&&Nl.createElement(ey,jn({},Te,{responsive:ne,responsiveDisabled:!me,order:R,className:`${ee}-suffix`,registerSize:$e,display:!0,style:ze}),y));return ne?Nl.createElement(Ta,{onResize:ye,disabled:!me},Ue):Ue}var pE=Nl.forwardRef(iwe);pE.Item=nwe;pE.RESPONSIVE=bU;pE.INVALIDATE=yU;var owe=pE,Xf=owe;var Jf=B(_()),tB=B(_()),Ws=tB.createContext(null);function swe(e,t){let r={...e};return Object.keys(t).forEach(n=>{let a=t[n];a!==void 0&&(r[n]=a)}),r}function iy({children:e,locked:t,...r}){let n=tB.useContext(Ws),a=Ah(()=>swe(n,r),[n,r],(o,l)=>!t&&(o[0]!==l[0]||!Qc(o[1],l[1],!0)));return tB.createElement(Ws.Provider,{value:a},e)}var hg=B(_()),lwe=[],DU=hg.createContext(null);function bE(){return hg.useContext(DU)}var AU=hg.createContext(lwe);function Vd(e){let t=hg.useContext(AU);return hg.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}var BU=hg.createContext(null),wU=B(_());function pB(e,t){return xr(e).map((r,n)=>{if(wU.isValidElement(r)){let{key:a}=r,o=r.props?.eventKey??a;return o==null&&(o=`tmp_key-${[...t,n].join("-")}`),wU.cloneElement(r,{key:o,eventKey:o})}return r})}function hE(){return hE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hE.apply(this,arguments)}var uwe=Jf.forwardRef((e,t)=>{let{className:r,title:n,eventKey:a,children:o,...l}=e,{prefixCls:u,classNames:d,styles:p}=Jf.useContext(Ws),m=`${u}-item-group`;return Jf.createElement("li",hE({ref:t,role:"presentation"},l,{onClick:v=>v.stopPropagation(),className:Z(m,r)}),Jf.createElement("div",{role:"presentation",className:Z(`${m}-title`,d?.listTitle),style:p?.listTitle,title:typeof n=="string"?n:void 0},n),Jf.createElement("ul",{role:"group",className:Z(`${m}-list`,d?.list),style:p?.list},o))}),cwe=Jf.forwardRef((e,t)=>{let{eventKey:r,children:n}=e,a=Vd(r),o=pB(n,a);return bE()?o:Jf.createElement(uwe,hE({ref:t},Ut(e,["warnKey"])),o)}),ly=cwe,qr=B(_()),dwe=B(_()),pwe=B(Jt()),IU=B(_()),MU=IU.createContext(null);function TU(e,t){return`${e}-${t}`}function jU(e){let t=IU.useContext(MU);return TU(t,e)}var fwe=B(_()),mwe=fwe.createContext({}),fB=mwe,ZA=B(_()),{LEFT:rB,RIGHT:nB,UP:aB,DOWN:fE,ENTER:mE,ESC:_U,HOME:ry,END:ny}=vn,xU=[aB,fE,rB,nB];function hwe(e,t,r,n){let a="prev",o="next",l="children",u="parent";if(e==="inline"&&n===mE)return{inlineTrigger:!0};let d={[aB]:a,[fE]:o},p={[rB]:r?o:a,[nB]:r?a:o,[fE]:l,[mE]:l},m={[aB]:a,[fE]:o,[mE]:l,[_U]:u,[rB]:r?l:u,[nB]:r?u:l};switch({inline:d,horizontal:p,vertical:m,inlineSub:d,horizontalSub:m,verticalSub:m}[`${e}${t?"":"Sub"}`]?.[n]){case a:return{offset:-1,sibling:!0};case o:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function gwe(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function vwe(e,t){let r=e||document.activeElement;for(;r;){if(t.has(r))return r;r=r.parentElement}return null}function mB(e,t){return sb(e,!0).filter(r=>t.has(r))}function EU(e,t,r,n=1){if(!e)return null;let a=mB(e,t),o=a.length,l=a.findIndex(u=>r===u);return n<0?l===-1?l=o-1:l-=1:n>0&&(l+=1),l=(l+o)%o,a[l]}var gE=(e,t)=>{let r=new Set,n=new Map,a=new Map;return e.forEach(o=>{let l=document.querySelector(`[data-menu-id='${TU(t,o)}']`);l&&(r.add(l),a.set(l,o),n.set(o,l))}),{elements:r,key2element:n,element2key:a}};function bwe(e,t,r,n,a,o,l,u,d,p){let m=ZA.useRef(void 0),v=ZA.useRef(void 0);v.current=t;let g=()=>{vr.cancel(m.current)};return ZA.useEffect(()=>()=>{g()},[]),b=>{let{which:x}=b;if([...xU,mE,_U,ry,ny].includes(x)){let y=o(),E=gE(y,n),{elements:S,key2element:F,element2key:$}=E,C=F.get(t),D=vwe(C,S),I=$.get(D),M=hwe(e,l(I,!0).length===1,r,x);if(!M&&x!==ry&&x!==ny)return;(xU.includes(x)||[ry,ny].includes(x))&&b.preventDefault();let A=j=>{if(j){let P=j,O=j.querySelector("a");O?.getAttribute("href")&&(P=O);let V=$.get(j);u(V),g(),m.current=vr(()=>{v.current===V&&P.focus()})}};if([ry,ny].includes(x)||M.sibling||!D){let j;!D||e==="inline"?j=a.current:j=gwe(D);let P,O=mB(j,S);x===ry?P=O[0]:x===ny?P=O[O.length-1]:P=EU(j,S,D,M.offset),A(P)}else if(M.inlineTrigger)d(I);else if(M.offset>0)d(I,!0),g(),m.current=vr(()=>{E=gE(y,n);let j=D.getAttribute("aria-controls"),P=document.getElementById(j),O=EU(P,E.elements);A(O)},5);else if(M.offset<0){let j=l(I,!0),P=j[j.length-2],O=F.get(P);d(P,!1),A(O)}}p?.(b)}}var eB=B(_()),Pl=B(_());function ywe(e){Promise.resolve().then(e)}var hB="__RC_UTIL_PATH_SPLIT__",kU=e=>e.join(hB),wwe=e=>e.split(hB),iB="rc-menu-more";function xwe(){let[,e]=eB.useState({}),t=(0,Pl.useRef)(new Map),r=(0,Pl.useRef)(new Map),[n,a]=eB.useState([]),o=(0,Pl.useRef)(0),l=(0,Pl.useRef)(!1),u=()=>{l.current||e({})},d=(0,Pl.useCallback)((y,E)=>{let S=kU(E);r.current.set(S,y),t.current.set(y,S),o.current+=1;let F=o.current;ywe(()=>{F===o.current&&u()})},[]),p=(0,Pl.useCallback)((y,E)=>{let S=kU(E);r.current.delete(S),t.current.delete(y)},[]),m=(0,Pl.useCallback)(y=>{a(y)},[]),v=(0,Pl.useCallback)((y,E)=>{let S=t.current.get(y)||"",F=wwe(S);return E&&n.includes(F[0])&&F.unshift(iB),F},[n]),g=(0,Pl.useCallback)((y,E)=>y.filter(S=>S!==void 0).some(S=>v(S,!0).includes(E)),[v]),b=()=>{let y=[...t.current.keys()];return n.length&&y.push(iB),y},x=(0,Pl.useCallback)(y=>{let E=`${t.current.get(y)}${hB}`,S=new Set;return[...r.current.keys()].forEach(F=>{F.startsWith(E)&&S.add(r.current.get(F))}),S},[]);return eB.useEffect(()=>()=>{l.current=!0},[]),{registerPath:d,unregisterPath:p,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:v,getKeys:b,getSubPathKeys:x}}var CU=B(_());function ay(e){let t=CU.useRef(e);t.current=e;let r=CU.useCallback((...n)=>t.current?.(...n),[]);return e?r:void 0}var ss=B(_()),Ewe=B(_());function NU(e,t,r,n){let{activeKey:a,onActive:o,onInactive:l}=Ewe.useContext(Ws),u={active:a===e};return t||(u.onMouseEnter=d=>{r?.({key:e,domEvent:d}),o(e)},u.onMouseLeave=d=>{n?.({key:e,domEvent:d}),l(e)}),u}var kwe=B(_());function PU(e){let{mode:t,rtl:r,inlineIndent:n}=kwe.useContext(Ws);if(t!=="inline")return null;let a=e;return r?{paddingRight:a*n}:{paddingLeft:a*n}}var Cwe=B(_());function RU({icon:e,props:t,children:r}){let n;return e===null||e===!1?null:(typeof e=="function"?n=Cwe.createElement(e,{...t}):typeof e!="boolean"&&(n=e),n||r||null)}function vE({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Ia(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function oy(){return oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oy.apply(this,arguments)}var Swe=class extends ss.Component{render(){let{title:e,attribute:t,elementRef:r,...n}=this.props,a=Ut(n,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ia(!t,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),ss.createElement(Xf.Item,oy({},t,{title:typeof e=="string"?e:void 0},a,{ref:r}))}},Fwe=ss.forwardRef((e,t)=>{let{style:r,className:n,eventKey:a,warnKey:o,disabled:l,itemIcon:u,children:d,itemData:p,role:m,onMouseEnter:v,onMouseLeave:g,onClick:b,onKeyDown:x,onFocus:y,...E}=e,S=jU(a),{prefixCls:F,onItemClick:$,disabled:C,overflowDisabled:D,itemIcon:I,selectedKeys:M,onActive:A}=ss.useContext(Ws),{_internalRenderMenuItem:j}=ss.useContext(fB),P=`${F}-item`,O=ss.useRef(null),V=ss.useRef(null),W=C||l,H=Za(t,V),q=Vd(a),z=te=>{let ne=p||{key:a||"",label:d,itemIcon:u,extra:e.extra,title:e.title};return{key:a,keyPath:[...q].reverse(),item:O.current,domEvent:te,itemData:p||ne}},L=u||I,{active:U,...Y}=NU(a,W,v,g),X=M.includes(a),J=PU(q.length),N=te=>{if(W)return;let ne=z(te);b?.(vE(ne)),$(ne)},R=te=>{if(x?.(te),te.which===vn.ENTER){let ne=z(te);b?.(vE(ne)),$(ne)}},K=te=>{A(a),y?.(te)},Q={};e.role==="option"&&(Q["aria-selected"]=X);let ee=ss.createElement(Swe,oy({ref:O,elementRef:H,role:m===null?"none":m||"menuitem",tabIndex:l?null:-1,"data-menu-id":D&&S?null:S},Ut(E,["extra"]),Y,Q,{component:"li","aria-disabled":l,style:{...J,...r},className:Z(P,{[`${P}-active`]:U,[`${P}-selected`]:X,[`${P}-disabled`]:W},n),onClick:N,onKeyDown:R,onFocus:K}),d,ss.createElement(RU,{props:{...e,isSelected:X},icon:L}));return j&&(ee=j(ee,e,{selected:X})),ee});function $we(e,t){let{eventKey:r}=e,n=bE(),a=Vd(r);return ss.useEffect(()=>{if(n)return n.registerPath(r,a),()=>{n.unregisterPath(r,a)}},[a]),n?null:ss.createElement(Fwe,oy({},e,{ref:t}))}var Ud=ss.forwardRef($we),hn=B(_()),oB=B(_());function sB(){return sB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sB.apply(this,arguments)}var Dwe=({className:e,children:t,...r},n)=>{let{prefixCls:a,mode:o,rtl:l}=oB.useContext(Ws);return oB.createElement("ul",sB({className:Z(a,l&&`${a}-rtl`,`${a}-sub`,`${a}-${o==="inline"?"inline":"vertical"}`,e),role:"menu"},r,{"data-menu-list":!0,ref:n}),t)},Awe=oB.forwardRef(Dwe),OU=Awe,cg=B(_()),ui={adjustX:1,adjustY:1},Bwe={topLeft:{points:["bl","tl"],overflow:ui},topRight:{points:["br","tr"],overflow:ui},bottomLeft:{points:["tl","bl"],overflow:ui},bottomRight:{points:["tr","br"],overflow:ui},leftTop:{points:["tr","tl"],overflow:ui},leftBottom:{points:["br","bl"],overflow:ui},rightTop:{points:["tl","tr"],overflow:ui},rightBottom:{points:["bl","br"],overflow:ui}},Iwe={topLeft:{points:["bl","tl"],overflow:ui},topRight:{points:["br","tr"],overflow:ui},bottomLeft:{points:["tl","bl"],overflow:ui},bottomRight:{points:["tr","br"],overflow:ui},rightTop:{points:["tr","tl"],overflow:ui},rightBottom:{points:["br","bl"],overflow:ui},leftTop:{points:["tl","tr"],overflow:ui},leftBottom:{points:["bl","br"],overflow:ui}};function zU(e,t,r){if(t)return t;if(r)return r[e]||r.other}var Mwe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Twe({prefixCls:e,visible:t,children:r,popup:n,popupStyle:a,popupClassName:o,popupOffset:l,disabled:u,mode:d,onVisibleChange:p}){let{getPopupContainer:m,rtl:v,subMenuOpenDelay:g,subMenuCloseDelay:b,builtinPlacements:x,triggerSubMenuAction:y,forceSubMenuRender:E,rootClassName:S,motion:F,defaultMotions:$}=cg.useContext(Ws),[C,D]=cg.useState(!1),I=v?{...Iwe,...x}:{...Bwe,...x},M=Mwe[d],A=zU(d,F,$),j=cg.useRef(A);d!=="inline"&&(j.current=A);let P={...j.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},O=cg.useRef(void 0);return cg.useEffect(()=>(O.current=vr(()=>{D(t)}),()=>{vr.cancel(O.current)}),[t]),cg.createElement(Ph,{prefixCls:e,popupClassName:Z(`${e}-popup`,{[`${e}-rtl`]:v},o,S),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:I,popupPlacement:M,popupVisible:C,popup:n,popupStyle:a,popupAlign:l&&{offset:l},action:u?[]:[y],mouseEnterDelay:g,mouseLeaveDelay:b,onPopupVisibleChange:p,forceRender:E,popupMotion:P,fresh:!0},r)}var Qf=B(_());function lB(){return lB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lB.apply(this,arguments)}function jwe({id:e,open:t,keyPath:r,children:n}){let a="inline",{prefixCls:o,forceSubMenuRender:l,motion:u,defaultMotions:d,mode:p}=Qf.useContext(Ws),m=Qf.useRef(!1);m.current=p===a;let[v,g]=Qf.useState(!m.current),b=m.current?t:!1;Qf.useEffect(()=>{m.current&&g(!1)},[p]);let x={...zU(a,u,d)};r.length>1&&(x.motionAppear=!1);let y=x.onVisibleChanged;return x.onVisibleChanged=E=>(!m.current&&!E&&g(!0),y?.(E)),v?null:Qf.createElement(iy,{mode:a,locked:!m.current},Qf.createElement(ra,lB({visible:b},x,{forceRender:l,removeOnLeave:!1,leavedClassName:`${o}-hidden`}),({className:E,style:S})=>Qf.createElement(OU,{id:e,className:E,style:S},n)))}function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sy.apply(this,arguments)}var _we=hn.forwardRef((e,t)=>{let{style:r,className:n,styles:a,classNames:o,title:l,itemTitle:u,eventKey:d,warnKey:p,disabled:m,internalPopupClose:v,children:g,itemIcon:b,expandIcon:x,popupClassName:y,popupOffset:E,popupStyle:S,onClick:F,onMouseEnter:$,onMouseLeave:C,onTitleClick:D,onTitleMouseEnter:I,onTitleMouseLeave:M,popupRender:A,...j}=e,P=jU(d),{prefixCls:O,mode:V,openKeys:W,disabled:H,overflowDisabled:q,activeKey:z,selectedKeys:L,itemIcon:U,expandIcon:Y,onItemClick:X,onOpenChange:J,onActive:N,popupRender:R}=hn.useContext(Ws),{_internalRenderSubMenuItem:K}=hn.useContext(fB),{isSubPathKey:Q}=hn.useContext(BU),ee=Vd(),te=`${O}-submenu`,ne=H||m,me=hn.useRef(null),se=hn.useRef(null),he=b??U,le=x??Y,ke=W.includes(d),Ae=!q&&ke,de=Q(L,d),{active:ve,...ye}=NU(d,ne,I,M),[we,Oe]=hn.useState(!1),Fe=Pe=>{ne||Oe(Pe)},$e=Pe=>{Fe(!0),$?.({key:d,domEvent:Pe})},Me=Pe=>{Fe(!1),C?.({key:d,domEvent:Pe})},qe=hn.useMemo(()=>ve||(V!=="inline"?we||Q([z],d):!1),[V,ve,z,we,d,Q]),ze=PU(ee.length),Te=Pe=>{ne||(D?.({key:d,domEvent:Pe}),V==="inline"&&J(d,!ke))},Ne=ay(Pe=>{F?.(vE(Pe)),X(Pe)}),Qe=Pe=>{V!=="inline"&&J(d,Pe)},ot=()=>{N(d)},et=P&&`${P}-popup`,Ue=hn.useMemo(()=>hn.createElement(RU,{icon:V!=="horizontal"?le:void 0,props:{...e,isOpen:Ae,isSubMenu:!0}},hn.createElement("i",{className:`${te}-arrow`})),[V,le,e,Ae,te]),Ie=hn.createElement("div",sy({role:"menuitem",style:ze,className:`${te}-title`,tabIndex:ne?null:-1,ref:me,title:u??(typeof l=="string"?l:null),"data-menu-id":q&&P?null:P,"aria-expanded":Ae,"aria-haspopup":!0,"aria-controls":et,"aria-disabled":ne,onClick:Te,onFocus:ot},ye),l,Ue),Re=hn.useRef(V);V!=="inline"&&ee.length>1?Re.current="vertical":Re.current=V;let ht=Re.current,lt=hn.useMemo(()=>{let Pe=hn.createElement(iy,{classNames:o,styles:a,mode:ht==="horizontal"?"vertical":ht},hn.createElement(OU,{id:et,ref:se},g)),at=A||R;return at?at(Pe,{item:e,keys:ee}):Pe},[A,R,ee,et,g,e,ht]);if(!q){let Pe=Re.current;Ie=hn.createElement(Twe,{mode:Pe,prefixCls:te,visible:!v&&Ae&&V!=="inline",popupClassName:y,popupOffset:E,popupStyle:S,popup:lt,disabled:ne,onVisibleChange:Qe},Ie)}let Xe=hn.createElement(Xf.Item,sy({ref:t,role:"none"},j,{component:"li",style:r,className:Z(te,`${te}-${V}`,n,{[`${te}-open`]:Ae,[`${te}-active`]:qe,[`${te}-selected`]:de,[`${te}-disabled`]:ne}),onMouseEnter:$e,onMouseLeave:Me}),Ie,!q&&hn.createElement(jwe,{id:et,open:Ae,keyPath:ee},g));return K&&(Xe=K(Xe,e,{selected:de,active:qe,open:Ae,disabled:ne})),hn.createElement(iy,{classNames:o,styles:a,onItemClick:Ne,mode:V==="horizontal"?"vertical":V,itemIcon:he,expandIcon:le},Xe)}),Nwe=hn.forwardRef((e,t)=>{let{eventKey:r,children:n}=e,a=Vd(r),o=pB(n,a),l=bE();hn.useEffect(()=>{if(l)return l.registerPath(r,a),()=>{l.unregisterPath(r,a)}},[a]);let u;return l?u=o:u=hn.createElement(_we,sy({ref:t},e),o),hn.createElement(AU.Provider,{value:a},u)}),gg=Nwe,Wd=B(_()),SU=B(_());function uy({className:e,style:t}){let{prefixCls:r}=SU.useContext(Ws);return bE()?null:SU.createElement("li",{role:"separator",className:Z(`${r}-item-divider`,e),style:t})}function mg(){return mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mg.apply(this,arguments)}function uB(e,t,r){let{item:n,group:a,submenu:o,divider:l}=t;return(e||[]).map((u,d)=>{if(u&&typeof u=="object"){let{label:p,children:m,key:v,type:g,extra:b,...x}=u,y=v??`tmp-${d}`;if(m||g==="group"){if(g==="group")return Wd.createElement(a,mg({key:y},x,{title:p}),uB(m,t,r));let{title:S,...F}=x;return Wd.createElement(o,mg({key:y},F,{title:p,itemTitle:typeof S=="string"?S:void 0}),uB(m,t,r))}if(g==="divider")return Wd.createElement(l,mg({key:y},x));let E=!!b||b===0;return Wd.createElement(n,mg({key:y},x,{extra:b,itemData:{...u,key:y}}),E?Wd.createElement(Wd.Fragment,null,Wd.createElement("span",{className:`${r}-item-label`},p),Wd.createElement("span",{className:`${r}-item-extra`},b)):p)}return null}).filter(u=>u)}function FU(e,t,r,n,a){let o=e,l={divider:uy,item:Ud,group:ly,submenu:gg,...n};return t&&(o=uB(t,l,a)),pB(o,r)}function cB(){return cB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cB.apply(this,arguments)}var Yf=[],Pwe=qr.forwardRef((e,t)=>{let{prefixCls:r="rc-menu",rootClassName:n,style:a,className:o,styles:l,classNames:u,tabIndex:d=0,items:p,children:m,direction:v,id:g,mode:b="vertical",inlineCollapsed:x,disabled:y,disabledOverflow:E,subMenuOpenDelay:S=.1,subMenuCloseDelay:F=.1,forceSubMenuRender:$,defaultOpenKeys:C,openKeys:D,activeKey:I,defaultActiveFirst:M,selectable:A=!0,multiple:j=!1,defaultSelectedKeys:P,selectedKeys:O,onSelect:V,onDeselect:W,inlineIndent:H=24,motion:q,defaultMotions:z,triggerSubMenuAction:L="hover",builtinPlacements:U,itemIcon:Y,expandIcon:X,overflowedIndicator:J="...",overflowedIndicatorPopupClassName:N,getPopupContainer:R,onClick:K,onOpenChange:Q,onKeyDown:ee,openAnimation:te,openTransitionName:ne,_internalRenderMenuItem:me,_internalRenderSubMenuItem:se,_internalComponents:he,popupRender:le,...ke}=e,[Ae,de]=qr.useMemo(()=>[FU(m,p,Yf,he,r),FU(m,p,Yf,{},r)],[m,p,he]),[ve,ye]=qr.useState(!1),we=qr.useRef(null),Oe=pl(),Fe=g??`rc-menu-uuid-${Oe}`,$e=v==="rtl",[Me,qe]=qt(C,D),ze=Me||Yf,Te=(vt,Rt=!1)=>{function gr(){qe(vt),Q?.(vt)}Rt?(0,pwe.flushSync)(gr):gr()},[Ne,Qe]=qr.useState(ze),ot=qr.useRef(!1),[et,Ue]=qr.useMemo(()=>(b==="inline"||b==="vertical")&&x?["vertical",x]:[b,!1],[b,x]),Ie=et==="inline",[Re,ht]=qr.useState(et),[lt,Xe]=qr.useState(Ue);qr.useEffect(()=>{ht(et),Xe(Ue),ot.current&&(Ie?qe(Ne):Te(Yf))},[et,Ue]);let[Pe,at]=qr.useState(0),Nt=Pe>=Ae.length-1||Re!=="horizontal"||E;qr.useEffect(()=>{Ie&&Qe(ze)},[ze]),qr.useEffect(()=>(ot.current=!0,()=>{ot.current=!1}),[]);let{registerPath:Pt,unregisterPath:Yr,refreshOverflowKeys:Gt,isSubPathKey:Tr,getKeyPath:er,getKeys:It,getSubPathKeys:lr}=xwe(),$r=qr.useMemo(()=>({registerPath:Pt,unregisterPath:Yr}),[Pt,Yr]),Vt=qr.useMemo(()=>({isSubPathKey:Tr}),[Tr]);qr.useEffect(()=>{Gt(Nt?Yf:Ae.slice(Pe+1).map(vt=>vt.key))},[Pe,Nt]);let[ct,St]=qt(I||M&&Ae[0]?.key,I),Le=ay(vt=>{St(vt)}),tt=ay(()=>{St(void 0)});(0,dwe.useImperativeHandle)(t,()=>({list:we.current,focus:vt=>{let Rt=It(),{elements:gr,key2element:In,element2key:Xa}=gE(Rt,Fe),pr=mB(we.current,gr),mi;ct&&Rt.includes(ct)?mi=ct:mi=pr[0]?Xa.get(pr[0]):Ae.find(Dr=>!Dr.props.disabled)?.key;let Qa=In.get(mi);mi&&Qa&&Qa?.focus?.(vt)},findItem:({key:vt})=>{let Rt=It(),{key2element:gr}=gE(Rt,Fe);return gr.get(vt)||null}}));let[ut,He]=qt(P||[],O),rt=qr.useMemo(()=>Array.isArray(ut)?ut:ut==null?Yf:[ut],[ut]),gt=vt=>{if(A){let{key:Rt}=vt,gr=rt.includes(Rt),In;j?gr?In=rt.filter(pr=>pr!==Rt):In=[...rt,Rt]:In=[Rt],He(In);let Xa={...vt,selectedKeys:In};gr?W?.(Xa):V?.(Xa)}!j&&ze.length&&Re!=="inline"&&Te(Yf)},Kt=ay(vt=>{K?.(vE(vt)),gt(vt)}),Xt=ay((vt,Rt)=>{let gr=ze.filter(In=>In!==vt);if(Rt)gr.push(vt);else if(Re!=="inline"){let In=lr(vt);gr=gr.filter(Xa=>!In.has(Xa))}Qc(ze,gr,!0)||Te(gr,!0)}),on=bwe(Re,ct,$e,Fe,we,It,er,St,(vt,Rt)=>{let gr=Rt??!ze.includes(vt);Xt(vt,gr)},ee);qr.useEffect(()=>{ye(!0)},[]);let Nr=qr.useMemo(()=>({_internalRenderMenuItem:me,_internalRenderSubMenuItem:se}),[me,se]),tr=Re!=="horizontal"||E?Ae:Ae.map((vt,Rt)=>qr.createElement(iy,{key:vt.key,overflowDisabled:Rt>Pe,classNames:u,styles:l},vt)),Wr=qr.createElement(Xf,cB({id:g,ref:we,prefixCls:`${r}-overflow`,component:"ul",itemComponent:Ud,className:Z(r,`${r}-root`,`${r}-${Re}`,o,{[`${r}-inline-collapsed`]:lt,[`${r}-rtl`]:$e},n),dir:v,style:a,role:"menu",tabIndex:d,data:tr,renderRawItem:vt=>vt,renderRawRest:vt=>{let Rt=vt.length,gr=Rt?Ae.slice(-Rt):null;return qr.createElement(gg,{eventKey:iB,title:J,disabled:Nt,internalPopupClose:Rt===0,popupClassName:N},gr)},maxCount:Re!=="horizontal"||E?Xf.INVALIDATE:Xf.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:vt=>{at(vt)},onKeyDown:on},ke));return qr.createElement(fB.Provider,{value:Nr},qr.createElement(MU.Provider,{value:Fe},qr.createElement(iy,{prefixCls:r,rootClassName:n,classNames:u,styles:l,mode:Re,openKeys:ze,rtl:$e,disabled:y,motion:ve?q:null,defaultMotions:ve?z:null,activeKey:ct,onActive:Le,onInactive:tt,selectedKeys:rt,inlineIndent:H,subMenuOpenDelay:S,subMenuCloseDelay:F,forceSubMenuRender:$,builtinPlacements:U,triggerSubMenuAction:L,getPopupContainer:R,itemIcon:Y,expandIcon:X,onItemClick:Kt,onOpenChange:Xt,popupRender:le},qr.createElement(BU.Provider,{value:Vt},Wr),qr.createElement("div",{style:{display:"none"},"aria-hidden":!0},qr.createElement(DU.Provider,{value:$r},de)))))}),Rwe=Pwe,cy=Rwe;cy.Item=Ud;cy.SubMenu=gg;cy.ItemGroup=ly;cy.Divider=uy;var dy=cy,qs=B(_()),$U=B(_()),{ESC:Owe,TAB:zwe}=vn;function Lwe({visible:e,triggerRef:t,onVisibleChange:r,autoFocus:n,overlayRef:a}){let o=$U.useRef(!1),l=()=>{e&&(t.current?.focus?.(),r?.(!1))},u=()=>a.current?.focus?(a.current.focus(),o.current=!0,!0):!1,d=p=>{switch(p.keyCode){case Owe:l();break;case zwe:{let m=!1;o.current||(m=u()),m?p.preventDefault():l();break}}};$U.useEffect(()=>e?(window.addEventListener("keydown",d),n&&vr(u,3),()=>{window.removeEventListener("keydown",d),o.current=!1}):()=>{o.current=!1},[e])}var dg=B(_()),Hwe=(0,dg.forwardRef)((e,t)=>{let{overlay:r,arrow:n,prefixCls:a}=e,o=(0,dg.useMemo)(()=>{let u;return typeof r=="function"?u=r():u=r,u},[r]),l=fn(t,Hi(o));return dg.default.createElement(dg.default.Fragment,null,n&&dg.default.createElement("div",{className:`${a}-arrow`}),dg.default.cloneElement(o,{ref:wu(o)?l:void 0}))}),qwe=Hwe,pg={adjustX:1,adjustY:1},fg=[0,0],Wwe={topLeft:{points:["bl","tl"],overflow:pg,offset:[0,-4],targetOffset:fg},top:{points:["bc","tc"],overflow:pg,offset:[0,-4],targetOffset:fg},topRight:{points:["br","tr"],overflow:pg,offset:[0,-4],targetOffset:fg},bottomLeft:{points:["tl","bl"],overflow:pg,offset:[0,4],targetOffset:fg},bottom:{points:["tc","bc"],overflow:pg,offset:[0,4],targetOffset:fg},bottomRight:{points:["tr","br"],overflow:pg,offset:[0,4],targetOffset:fg}},Vwe=Wwe;function dB(){return dB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dB.apply(this,arguments)}var Uwe=qs.default.forwardRef((e,t)=>{let{arrow:r=!1,prefixCls:n="rc-dropdown",transitionName:a,animation:o,align:l,placement:u="bottomLeft",placements:d=Vwe,getPopupContainer:p,showAction:m,hideAction:v,overlayClassName:g,overlayStyle:b,visible:x,trigger:y=["hover"],autoFocus:E,overlay:S,children:F,onVisibleChange:$,disabled:C,...D}=e,[I,M]=qs.default.useState(),A="visible"in e?x:I,j=o?`${n}-${o}`:a,P=qs.default.useRef(null),O=qs.default.useRef(null),V=qs.default.useRef(null);qs.default.useImperativeHandle(t,()=>P.current);let W=K=>{M(K),$?.(K)};Lwe({visible:A,triggerRef:V,onVisibleChange:W,autoFocus:E,overlayRef:O});let H=K=>{let{onOverlayClick:Q}=e;M(!1),Q&&Q(K)},q=()=>qs.default.createElement(qwe,{ref:O,overlay:S,prefixCls:n,arrow:r}),z=()=>typeof S=="function"?q:q(),L=()=>{let{minOverlayWidthMatchTrigger:K,alignPoint:Q}=e;return"minOverlayWidthMatchTrigger"in e?K:!Q},U=()=>{let{openClassName:K}=e;return K!==void 0?K:`${n}-open`},Y=F,X=Z(Y.props?.className,A&&U()),J={className:X,ref:fn(V,Hi(Y))},N=wu(Y)?qs.default.cloneElement(Y,J):qs.default.createElement("span",{className:X,ref:V},qs.default.cloneElement(Y,{className:X})),R=v;return!R&&y.indexOf("contextMenu")!==-1&&(R=["click"]),qs.default.createElement(Ph,dB({builtinPlacements:d},D,{prefixCls:n,ref:P,popupClassName:Z(g,{[`${n}-show-arrow`]:r}),popupStyle:b,action:y,showAction:m,hideAction:R,popupPlacement:u,popupAlign:l,popupMotion:{motionName:j},popupVisible:A,stretch:L()?"minWidth":"",popup:z(),onOpenChange:W,onPopupClick:H,getPopupContainer:p}),N)}),Gwe=Uwe,py=Gwe;var LU=B(_()),Kwe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},Xwe=Kwe;function gB(){return gB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gB.apply(this,arguments)}var Qwe=(e,t)=>LU.createElement(Zt,gB({},e,{ref:t,icon:Xwe})),Ywe=LU.forwardRef(Qwe),vB=Ywe;var HU=B(_()),Jwe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Zwe=Jwe;function bB(){return bB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bB.apply(this,arguments)}var e5e=(e,t)=>HU.createElement(Zt,bB({},e,{ref:t,icon:Zwe})),t5e=HU.forwardRef(e5e),fy=t5e;var Ku=B(_()),Zf=B(_()),my=B(_()),r5e=B(_()),kB=(0,r5e.createContext)(null),n5e=B(_()),to=B(_()),da=B(_()),yE=B(_()),a5e=e=>{let{activeTabOffset:t,horizontal:r,rtl:n,indicator:a={}}=e,{size:o,align:l="center"}=a,[u,d]=(0,yE.useState)(),p=(0,yE.useRef)(void 0),m=yE.default.useCallback(g=>typeof o=="function"?o(g):typeof o=="number"?o:g,[o]);function v(){vr.cancel(p.current)}return(0,yE.useEffect)(()=>{let g={};if(t)if(r){g.width=m(t.width);let b=n?"right":"left";l==="start"&&(g[b]=t[b]),l==="center"&&(g[b]=t[b]+t.width/2,g.transform=n?"translateX(50%)":"translateX(-50%)"),l==="end"&&(g[b]=t[b]+t.width,g.transform="translateX(-100%)")}else g.height=m(t.height),l==="start"&&(g.top=t.top),l==="center"&&(g.top=t.top+t.height/2,g.transform="translateY(-50%)"),l==="end"&&(g.top=t.top+t.height,g.transform="translateY(-100%)");return v(),p.current=vr(()=>{u&&g&&Object.keys(g).every(b=>{let x=g[b],y=u[b];return typeof x=="number"&&typeof y=="number"?Math.round(x)===Math.round(y):x===y})||d(g)}),v},[JSON.stringify(t),r,n,l,m]),{style:u}},i5e=a5e,o5e=B(_()),qU={width:0,height:0,left:0,top:0};function s5e(e,t,r){return(0,o5e.useMemo)(()=>{let n=new Map,a=t.get(e[0]?.key)||qU,o=a.left+a.width;for(let l=0;l<e.length;l+=1){let{key:u}=e[l],d=t.get(u);d||(d=t.get(e[l-1]?.key)||qU);let p=n.get(u)||{...d};p.right=o-p.left-p.width,n.set(u,p)}return n},[e.map(n=>n.key).join("_"),t,r])}var WU=B(_());function VU(e,t){let r=WU.useRef(e),[,n]=WU.useState({});function a(o){let l=typeof o=="function"?o(r.current):o;l!==r.current&&t(l,r.current),r.current=l,n({})}return[r.current,a]}var l5e=B(_()),em=B(_()),u5e=.1,UU=.01,EE=20,GU=.995**EE;function c5e(e,t){let[r,n]=(0,em.useState)(),[a,o]=(0,em.useState)(0),[l,u]=(0,em.useState)(0),[d,p]=(0,em.useState)(),m=(0,em.useRef)(void 0);function v(S){let{screenX:F,screenY:$}=S.touches[0];n({x:F,y:$}),window.clearInterval(m.current)}function g(S){if(!r)return;let{screenX:F,screenY:$}=S.touches[0];n({x:F,y:$});let C=F-r.x,D=$-r.y;t(C,D);let I=Date.now();o(I),u(I-a),p({x:C,y:D})}function b(){if(r&&(n(null),p(null),d)){let S=d.x/l,F=d.y/l,$=Math.abs(S),C=Math.abs(F);if(Math.max($,C)<u5e)return;let D=S,I=F;m.current=window.setInterval(()=>{if(Math.abs(D)<UU&&Math.abs(I)<UU){window.clearInterval(m.current);return}D*=GU,I*=GU,t(D*EE,I*EE)},EE)}}let x=(0,em.useRef)(void 0);function y(S){let{deltaX:F,deltaY:$}=S,C,D=Math.abs(F),I=Math.abs($);D===I?C=x.current==="x"?F:$:D>I?(C=F,x.current="x"):(C=$,x.current="y"),t(-C,-C)&&S.preventDefault()}let E=(0,em.useRef)(null);E.current={onTouchStart:v,onTouchMove:g,onTouchEnd:b,onWheel:y},l5e.useEffect(()=>{function S(D){E.current.onTouchStart(D)}function F(D){E.current.onTouchMove(D)}function $(D){E.current.onTouchEnd(D)}function C(D){E.current.onWheel(D)}return document.addEventListener("touchmove",F,{passive:!1}),document.addEventListener("touchend",$,{passive:!0}),e.current.addEventListener("touchstart",S,{passive:!0}),e.current.addEventListener("wheel",C,{passive:!1}),()=>{document.removeEventListener("touchmove",F),document.removeEventListener("touchend",$)}},[])}var bg=B(_());function eG(e){let[t,r]=(0,bg.useState)(0),n=(0,bg.useRef)(0),a=(0,bg.useRef)(void 0);return a.current=e,lF(()=>{a.current?.()},[t]),()=>{n.current===t&&(n.current+=1,r(n.current))}}function d5e(e){let t=(0,bg.useRef)([]),[,r]=(0,bg.useState)({}),n=(0,bg.useRef)(typeof e=="function"?e():e),a=eG(()=>{let l=n.current;t.current.forEach(u=>{l=u(l)}),t.current=[],n.current=l,r({})});function o(l){t.current.push(l),a()}return[n.current,o]}var p5e=B(_()),KU={width:0,height:0,left:0,top:0,right:0};function f5e(e,t,r,n,a,o,{tabs:l,tabPosition:u,rtl:d}){let p,m,v;return["top","bottom"].includes(u)?(p="width",m=d?"right":"left",v=Math.abs(r)):(p="height",m="top",v=-r),(0,p5e.useMemo)(()=>{if(!l.length)return[0,0];let g=l.length,b=g;for(let y=0;y<g;y+=1){let E=e.get(l[y].key)||KU;if(Math.floor(E[m]+E[p])>Math.floor(v+t)){b=y-1;break}}let x=0;for(let y=g-1;y>=0;y-=1)if((e.get(l[y].key)||KU)[m]<v){x=y+1;break}return x>b?[0,-1]:[x,b]},[e,t,n,a,o,v,u,l.map(g=>g.key).join("_"),d])}function XU(e){let t;return e instanceof Map?(t={},e.forEach((r,n)=>{t[n]=r})):t=e,JSON.stringify(t)}var m5e="TABS_DQ";function tG(e){return String(e).replace(/"/g,m5e)}function CB(e,t,r,n){return!(!r||n||e===!1||e===void 0&&(t===!1||t===null))}var QU=B(_()),h5e=QU.forwardRef((e,t)=>{let{prefixCls:r,editable:n,locale:a,style:o}=e;return!n||n.showAdd===!1?null:QU.createElement("button",{ref:t,type:"button",className:`${r}-nav-add`,style:o,"aria-label":a?.addAriaLabel||"Add tab",onClick:l=>{n.onEdit("add",{event:l})}},n.addIcon||"+")}),rG=h5e,yB=B(_()),g5e=yB.forwardRef((e,t)=>{let{position:r,prefixCls:n,extra:a}=e;if(!a)return null;let o,l={};return typeof a=="object"&&!yB.isValidElement(a)?l=a:l.right=a,r==="right"&&(o=l.right),r==="left"&&(o=l.left),o?yB.createElement("div",{className:`${n}-extra-content`,ref:t},o):null}),YU=g5e,Rl=B(_()),wE=B(_());function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xB.apply(this,arguments)}var v5e=Rl.forwardRef((e,t)=>{let{prefixCls:r,id:n,tabs:a,locale:o,mobile:l,more:u={},style:d,className:p,editable:m,tabBarGutter:v,rtl:g,removeAriaLabel:b,onTabClick:x,getPopupContainer:y,popupClassName:E,popupStyle:S,classNames:F,styles:$}=e,[C,D]=(0,wE.useState)(!1),[I,M]=(0,wE.useState)(null),{icon:A="More",popupRender:j}=u,P=`${n}-more-popup`,O=`${r}-dropdown`,V=I!==null?`${P}-${I}`:null,W=o?.dropdownAriaLabel;function H(N,R){N.preventDefault(),N.stopPropagation(),m.onEdit("remove",{key:R,event:N})}let q=Rl.createElement(dy,{onClick:({key:N,domEvent:R})=>{x(N,R),D(!1)},prefixCls:`${O}-menu`,id:P,tabIndex:-1,role:"listbox","aria-activedescendant":V,selectedKeys:[I],"aria-label":W!==void 0?W:"expanded dropdown"},a.map(N=>{let{closable:R,disabled:K,closeIcon:Q,key:ee,label:te}=N,ne=CB(R,Q,m,K);return Rl.createElement(Ud,{key:ee,id:`${P}-${ee}`,role:"option","aria-controls":n&&`${n}-panel-${ee}`,disabled:K},Rl.createElement("span",null,te),ne&&Rl.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:Z(`${O}-menu-item-remove`,F?.remove),style:$?.remove,onClick:me=>{me.stopPropagation(),H(me,ee)}},Q||m.removeIcon||"\xD7"))})),z=j?j(q,{restTabs:a,onClose:()=>D(!1)}):q;function L(N){let R=a.filter(ee=>!ee.disabled),K=R.findIndex(ee=>ee.key===I)||0,Q=R.length;for(let ee=0;ee<Q;ee+=1){K=(K+N+Q)%Q;let te=R[K];if(!te.disabled){M(te.key);return}}}function U(N){let{which:R}=N;if(!C){[vn.DOWN,vn.SPACE,vn.ENTER].includes(R)&&(D(!0),N.preventDefault());return}switch(R){case vn.UP:L(-1),N.preventDefault();break;case vn.DOWN:L(1),N.preventDefault();break;case vn.ESC:D(!1);break;case vn.SPACE:case vn.ENTER:I!==null&&x(I,N);break}}(0,wE.useEffect)(()=>{let N=document.getElementById(V);N?.scrollIntoView&&N.scrollIntoView(!1)},[V,I]),(0,wE.useEffect)(()=>{C||M(null)},[C]);let Y={marginInlineStart:v};a.length||(Y.visibility="hidden",Y.order=1);let X=Z(E,{[`${O}-rtl`]:g}),J=l?null:Rl.createElement(py,xB({prefixCls:O,overlay:z,visible:a.length?C:!1,onVisibleChange:D,overlayClassName:X,overlayStyle:S,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:y},u),Rl.createElement("button",{type:"button",className:`${r}-nav-more`,style:Y,"aria-haspopup":"listbox","aria-controls":P,id:`${n}-more`,"aria-expanded":C,onKeyDown:U},A));return Rl.createElement("div",{className:Z(`${r}-nav-operations`,p),style:d,ref:t},J,Rl.createElement(rG,{prefixCls:r,locale:o,editable:m}))}),b5e=Rl.memo(v5e,(e,t)=>t.tabMoving),Xu=B(_()),y5e=e=>{let{prefixCls:t,id:r,active:n,focus:a,tab:{key:o,label:l,disabled:u,closeIcon:d,icon:p},closable:m,renderWrapper:v,removeAriaLabel:g,editable:b,onClick:x,onFocus:y,onBlur:E,onKeyDown:S,onMouseDown:F,onMouseUp:$,styles:C,classNames:D,tabCount:I,currentPosition:M}=e,A=`${t}-tab`,j=CB(m,d,b,u);function P(q){u||x(q)}function O(q){q.preventDefault(),q.stopPropagation(),b.onEdit("remove",{key:o,event:q})}let V=Xu.useMemo(()=>p&&typeof l=="string"?Xu.createElement("span",null,l):l,[l,p]),W=Xu.useRef(null);Xu.useEffect(()=>{a&&W.current&&W.current.focus()},[a]);let H=Xu.createElement("div",{key:o,"data-node-key":tG(o),className:Z(A,D?.item,{[`${A}-with-remove`]:j,[`${A}-active`]:n,[`${A}-disabled`]:u,[`${A}-focus`]:a}),style:C?.item,onClick:P},Xu.createElement("div",{ref:W,role:"tab","aria-selected":n,id:r&&`${r}-tab-${o}`,className:`${A}-btn`,"aria-controls":r&&`${r}-panel-${o}`,"aria-disabled":u,tabIndex:u?null:n?0:-1,onClick:q=>{q.stopPropagation(),P(q)},onKeyDown:S,onMouseDown:F,onMouseUp:$,onFocus:y,onBlur:E},a&&Xu.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${M} of ${I}`),p&&Xu.createElement("span",{className:`${A}-icon`},p),l&&V),j&&Xu.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:n?0:-1,className:Z(`${A}-remove`,D?.remove),style:C?.remove,onClick:q=>{q.stopPropagation(),O(q)}},d||b.removeIcon||"\xD7"));return v?v(H):H},w5e=y5e;function EB(){return EB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},EB.apply(this,arguments)}var x5e=(e,t)=>{let{offsetWidth:r,offsetHeight:n,offsetTop:a,offsetLeft:o}=e,{width:l,height:u,left:d,top:p}=e.getBoundingClientRect();return Math.abs(l-r)<1?[l,u,d-t.left,p-t.top]:[r,n,o,a]},vg=e=>{let{offsetWidth:t=0,offsetHeight:r=0}=e.current||{};if(e.current){let{width:n,height:a}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,a]}return[t,r]},xE=(e,t)=>e[t?0:1],E5e=to.forwardRef((e,t)=>{let{className:r,style:n,id:a,animated:o,activeKey:l,rtl:u,extra:d,editable:p,locale:m,tabPosition:v,tabBarGutter:g,children:b,onTabClick:x,onTabScroll:y,indicator:E,classNames:S,styles:F}=e,{prefixCls:$,tabs:C}=to.useContext(kB),D=(0,da.useRef)(null),I=(0,da.useRef)(null),M=(0,da.useRef)(null),A=(0,da.useRef)(null),j=(0,da.useRef)(null),P=(0,da.useRef)(null),O=(0,da.useRef)(null),V=v==="top"||v==="bottom",[W,H]=VU(0,(Le,tt)=>{V&&y&&y({direction:Le>tt?"left":"right"})}),[q,z]=VU(0,(Le,tt)=>{!V&&y&&y({direction:Le>tt?"top":"bottom"})}),[L,U]=(0,da.useState)([0,0]),[Y,X]=(0,da.useState)([0,0]),[J,N]=(0,da.useState)([0,0]),[R,K]=(0,da.useState)([0,0]),[Q,ee]=d5e(new Map),te=s5e(C,Q,Y[0]),ne=xE(L,V),me=xE(Y,V),se=xE(J,V),he=xE(R,V),le=Math.floor(ne)<Math.floor(me+se),ke=le?ne-he:ne-se,Ae=`${$}-nav-operations-hidden`,de=0,ve=0;V&&u?(de=0,ve=Math.max(0,me-ke)):(de=Math.min(0,ke-me),ve=0);function ye(Le){return Le<de?de:Le>ve?ve:Le}let we=(0,da.useRef)(null),[Oe,Fe]=(0,da.useState)();function $e(){Fe(Date.now())}function Me(){we.current&&clearTimeout(we.current)}c5e(A,(Le,tt)=>{function ut(He,rt){He(gt=>ye(gt+rt))}return le?(V?ut(H,Le):ut(z,tt),Me(),$e(),!0):!1}),(0,da.useEffect)(()=>(Me(),Oe&&(we.current=setTimeout(()=>{Fe(0)},100)),Me),[Oe]);let[qe,ze]=f5e(te,ke,V?W:q,me,se,he,{...e,tabs:C}),Te=wt((Le=l)=>{let tt=te.get(Le)||{width:0,height:0,left:0,right:0,top:0};if(V){let ut=W;u?tt.right<W?ut=tt.right:tt.right+tt.width>W+ke&&(ut=tt.right+tt.width-ke):tt.left<-W?ut=-tt.left:tt.left+tt.width>-W+ke&&(ut=-(tt.left+tt.width-ke)),z(0),H(ye(ut))}else{let ut=q;tt.top<-q?ut=-tt.top:tt.top+tt.height>-q+ke&&(ut=-(tt.top+tt.height-ke)),H(0),z(ye(ut))}}),[Ne,Qe]=(0,da.useState)(),[ot,et]=(0,da.useState)(!1),Ue=C.filter(Le=>!Le.disabled).map(Le=>Le.key),Ie=Le=>{let tt=Ue.indexOf(Ne||l),ut=Ue.length,He=(tt+Le+ut)%ut,rt=Ue[He];Qe(rt)},Re=(Le,tt)=>{let ut=Ue.indexOf(Le),He=C.find(rt=>rt.key===Le);CB(He?.closable,He?.closeIcon,p,He?.disabled)&&(tt.preventDefault(),tt.stopPropagation(),p.onEdit("remove",{key:Le,event:tt}),ut===Ue.length-1?Ie(-1):Ie(1))},ht=(Le,tt)=>{et(!0),tt.button===1&&Re(Le,tt)},lt=Le=>{let{code:tt}=Le,ut=u&&V,He=Ue[0],rt=Ue[Ue.length-1];switch(tt){case"ArrowLeft":{V&&Ie(ut?1:-1);break}case"ArrowRight":{V&&Ie(ut?-1:1);break}case"ArrowUp":{Le.preventDefault(),V||Ie(-1);break}case"ArrowDown":{Le.preventDefault(),V||Ie(1);break}case"Home":{Le.preventDefault(),Qe(He);break}case"End":{Le.preventDefault(),Qe(rt);break}case"Enter":case"Space":{Le.preventDefault(),x(Ne??l,Le);break}case"Backspace":case"Delete":{Re(Ne,Le);break}}},Xe={};V?Xe.marginInlineStart=g:Xe.marginTop=g;let Pe=C.map((Le,tt)=>{let{key:ut}=Le;return to.createElement(w5e,{id:a,prefixCls:$,key:ut,tab:Le,classNames:{item:S?.item,remove:S?.remove},styles:{item:tt===0?F?.item:{...Xe,...F?.item},remove:F?.remove},closable:Le.closable,editable:p,active:ut===l,focus:ut===Ne,renderWrapper:b,removeAriaLabel:m?.removeAriaLabel,tabCount:Ue.length,currentPosition:tt+1,onClick:He=>{x(ut,He)},onKeyDown:lt,onFocus:()=>{ot||Qe(ut),Te(ut),$e(),A.current&&(u||(A.current.scrollLeft=0),A.current.scrollTop=0)},onBlur:()=>{Qe(void 0)},onMouseDown:He=>ht(ut,He),onMouseUp:()=>{et(!1)}})}),at=()=>ee(()=>{let Le=new Map,tt=j.current?.getBoundingClientRect();return C.forEach(({key:ut})=>{let He=j.current?.querySelector(`[data-node-key="${tG(ut)}"]`);if(He){let[rt,gt,Kt,Xt]=x5e(He,tt);Le.set(ut,{width:rt,height:gt,left:Kt,top:Xt})}}),Le});(0,da.useEffect)(()=>{at()},[C.map(Le=>Le.key).join("_")]);let Nt=eG(()=>{let Le=vg(D),tt=vg(I),ut=vg(M);U([Le[0]-tt[0]-ut[0],Le[1]-tt[1]-ut[1]]);let He=vg(O);N(He);let rt=vg(P);K(rt);let gt=vg(j);X([gt[0]-He[0],gt[1]-He[1]]),at()}),Pt=C.slice(0,qe),Yr=C.slice(ze+1),Gt=[...Pt,...Yr],Tr=te.get(l),{style:er}=i5e({activeTabOffset:Tr,horizontal:V,indicator:E,rtl:u});(0,da.useEffect)(()=>{Te()},[l,de,ve,XU(Tr),XU(te),V]),(0,da.useEffect)(()=>{Nt()},[u]);let It=!!Gt.length,lr=`${$}-nav-wrap`,$r,Vt,ct,St;return V?u?(Vt=W>0,$r=W!==ve):($r=W<0,Vt=W!==de):(ct=q<0,St=q!==de),to.createElement(Ta,{onResize:Nt},to.createElement("div",{ref:Za(t,D),role:"tablist","aria-orientation":V?"horizontal":"vertical",className:Z(`${$}-nav`,r,S?.header),style:{...F?.header,...n},onKeyDown:()=>{$e()}},to.createElement(YU,{ref:I,position:"left",extra:d,prefixCls:$}),to.createElement(Ta,{onResize:Nt},to.createElement("div",{className:Z(lr,{[`${lr}-ping-left`]:$r,[`${lr}-ping-right`]:Vt,[`${lr}-ping-top`]:ct,[`${lr}-ping-bottom`]:St}),ref:A},to.createElement(Ta,{onResize:Nt},to.createElement("div",{ref:j,className:`${$}-nav-list`,style:{transform:`translate(${W}px, ${q}px)`,transition:Oe?"none":void 0}},Pe,to.createElement(rG,{ref:O,prefixCls:$,locale:m,editable:p,style:{...Pe.length===0?void 0:Xe,visibility:It?"hidden":null}}),to.createElement("div",{className:Z(`${$}-ink-bar`,S?.indicator,{[`${$}-ink-bar-animated`]:o.inkBar}),style:{...er,...F?.indicator}}))))),to.createElement(b5e,EB({},e,{removeAriaLabel:m?.removeAriaLabel,ref:P,prefixCls:$,tabs:Gt,className:!It&&Ae,popupStyle:F?.popup,tabMoving:!!Oe})),to.createElement(YU,{ref:M,position:"right",extra:d,prefixCls:$})))}),JU=E5e,k5e=({renderTabBar:e,...t})=>e?e(t,JU):n5e.createElement(JU,t),C5e=k5e,hy=B(_()),wB=B(_()),S5e=wB.forwardRef((e,t)=>{let{prefixCls:r,className:n,style:a,id:o,active:l,tabKey:u,children:d}=e,p=wB.Children.count(d)>0;return wB.createElement("div",{id:o&&`${o}-panel-${u}`,role:"tabpanel",tabIndex:l&&p?0:-1,"aria-labelledby":o&&`${o}-tab-${u}`,"aria-hidden":!l,style:a,className:Z(r,l&&`${r}-active`,n),ref:t},d)}),F5e=S5e;function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kE.apply(this,arguments)}var $5e=e=>{let{id:t,activeKey:r,animated:n,tabPosition:a,destroyOnHidden:o,bodyStyle:l,bodyClassName:u,contentStyle:d,contentClassName:p}=e,{prefixCls:m,tabs:v}=hy.useContext(kB),g=n.tabPane,b=`${m}-body`,x=`${m}-content`;return hy.createElement("div",{className:Z(`${b}-holder`)},hy.createElement("div",{className:Z(b,`${b}-${a}`,{[`${b}-animated`]:g},u),style:l},v.map(y=>{let{key:E,forceRender:S,style:F,className:$,destroyOnHidden:C,...D}=y,I=E===r;return hy.createElement(ra,kE({key:E,visible:I,forceRender:S,removeOnLeave:!!(o??C),leavedClassName:`${x}-hidden`},n.tabPaneMotion),({style:M,className:A},j)=>hy.createElement(F5e,kE({},D,{prefixCls:x,id:t,tabKey:E,animated:g,active:I,style:{...d,...F,...M},className:Z(p,$,A),ref:j})))})))},D5e=$5e;function A5e(e={inkBar:!0,tabPane:!1}){let t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t={inkBar:!0,...typeof e=="object"?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gy.apply(this,arguments)}var ZU=0,B5e=Zf.forwardRef((e,t)=>{let{id:r,prefixCls:n="rc-tabs",className:a,items:o,direction:l,activeKey:u,defaultActiveKey:d,editable:p,animated:m,tabPosition:v="top",tabBarGutter:g,tabBarStyle:b,tabBarExtraContent:x,locale:y,more:E,destroyOnHidden:S,renderTabBar:F,onChange:$,onTabClick:C,onTabScroll:D,getPopupContainer:I,popupClassName:M,indicator:A,classNames:j,styles:P,...O}=e,V=Zf.useMemo(()=>(o||[]).filter(te=>te&&typeof te=="object"&&"key"in te),[o]),W=l==="rtl",H=A5e(m),[q,z]=(0,my.useState)(!1);(0,my.useEffect)(()=>{z(gF())},[]);let[L,U]=qt(d??V[0]?.key,u),[Y,X]=(0,my.useState)(()=>V.findIndex(te=>te.key===L));(0,my.useEffect)(()=>{let te=V.findIndex(ne=>ne.key===L);te===-1&&(te=Math.max(0,Math.min(Y,V.length-1)),U(V[te]?.key)),X(te)},[V.map(te=>te.key).join("_"),L,Y]);let[J,N]=qt(null,r);(0,my.useEffect)(()=>{r||(N(`rc-tabs-${ZU}`),ZU+=1)},[]);function R(te,ne){C?.(te,ne);let me=te!==L;U(te),me&&$?.(te)}let K={id:J,activeKey:L,animated:H,tabPosition:v,rtl:W,mobile:q},Q={...K,editable:p,locale:y,more:E,tabBarGutter:g,onTabClick:R,onTabScroll:D,extra:x,style:b,getPopupContainer:I,popupClassName:Z(M,j?.popup),indicator:A,styles:P,classNames:j},ee=Zf.useMemo(()=>({tabs:V,prefixCls:n}),[V,n]);return Zf.createElement(kB.Provider,{value:ee},Zf.createElement("div",gy({ref:t,id:r,className:Z(n,`${n}-${v}`,{[`${n}-mobile`]:q,[`${n}-editable`]:p,[`${n}-rtl`]:W},a)},O),Zf.createElement(C5e,gy({},Q,{renderTabBar:F})),Zf.createElement(D5e,gy({destroyOnHidden:S},K,{bodyStyle:P?.body,bodyClassName:j?.body,contentStyle:P?.content,contentClassName:j?.content,animated:H}))))}),I5e=B5e,M5e=I5e,T5e={motionAppear:!1,motionEnter:!0,motionLeave:!0};function j5e(e,t={inkBar:!0,tabPane:!1}){let r;return t===!1?r={inkBar:!1,tabPane:!1}:t===!0?r={inkBar:!0,tabPane:!0}:r={inkBar:!0,...kt(t)?t:{}},r.tabPane&&(r.tabPaneMotion={...T5e,motionName:Wp(e,"switch")}),r}var _5e=B(_());function N5e(e){return e.filter(t=>t)}function P5e(e,t){if(e)return e.map(n=>({...n,destroyOnHidden:n.destroyOnHidden??n.destroyInactiveTabPane}));let r=xr(t).map(n=>{if(_5e.isValidElement(n)){let{key:a,props:o}=n,{tab:l,...u}=o||{};return{key:String(a),...u,label:l}}return null});return N5e(r)}var R5e=P5e,O5e=e=>{let{componentCls:t,motionDurationSlow:r}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${r}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${r}`}}}}},[qo(e,"slide-up"),qo(e,"slide-down")]]},z5e=O5e,L5e=e=>{let{componentCls:t,tabsCardPadding:r,cardBg:n,cardGutter:a,colorBorderSecondary:o,itemSelectedColor:l}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:r,background:n,border:`${ue(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:l,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:yi(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:ue(a)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${ue(e.borderRadiusLG)} ${ue(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${ue(e.borderRadiusLG)} ${ue(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:ue(a)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ue(e.borderRadiusLG)} 0 0 ${ue(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ue(e.borderRadiusLG)} ${ue(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},H5e=e=>{let{antCls:t,componentCls:r,itemHoverColor:n,dropdownEdgeChildVerticalPadding:a}=e;return{[`${r}-dropdown`]:{...Tt(e),position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`&${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottomLeft,
213
- &${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottomLeft,
214
- &${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottom,
215
- &${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottom,
216
- &${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottomRight,
217
- &${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottomRight`]:{animationName:Uh},[`&${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-topLeft,
218
- &${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-topLeft,
219
- &${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-top,
220
- &${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-top,
221
- &${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-topRight,
222
- &${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-topRight`]:{animationName:Kh},[`&${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottomLeft,
223
- &${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottom,
224
- &${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottomRight`]:{animationName:Gh},[`&${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-topLeft,
225
- &${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-top,
226
- &${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-topRight`]:{animationName:Xh},[`${r}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${ue(a)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":{...fl,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${ue(e.paddingXXS)} ${ue(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}}}}}},q5e=e=>{let{componentCls:t,margin:r,colorBorderSecondary:n,horizontalMargin:a,verticalItemPadding:o,verticalItemMargin:l,motionDurationSlow:u,calc:d}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:a,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:["width","left","right"].map(p=>`${p} ${u}`).join(", ")}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
227
- > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:r,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:d(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:l},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:["height","top"].map(p=>`${p} ${u}`).join(", ")}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{marginLeft:{_skip_check_:!0,value:ue(d(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0,marginRight:{_skip_check_:!0,value:d(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},W5e=e=>{let{componentCls:t,cardPaddingSM:r,cardPaddingLG:n,cardHeightSM:a,cardHeightLG:o,horizontalItemPaddingSM:l,horizontalItemPaddingLG:u}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:l,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:u,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${ue(e.borderRadius)} ${ue(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${ue(e.borderRadius)} ${ue(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ue(e.borderRadius)} ${ue(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ue(e.borderRadius)} 0 0 ${ue(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},V5e=e=>{let{componentCls:t,itemActiveColor:r,itemHoverColor:n,iconCls:a,tabsHorizontalItemMargin:o,horizontalItemPadding:l,itemSelectedColor:u,itemColor:d}=e,p=`${t}-tab`;return{[p]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:l,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:d,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:r}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${p}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM},[`${p}-icon > svg`]:{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"}},"&-remove":{flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Xn(e)},"&:hover":{color:n},[`&${p}-active ${p}-btn`]:{color:u},[`&${p}-focus ${p}-btn:focus-visible`]:yi(e),[`&${p}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${p}-disabled ${p}-btn, &${p}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${p}-remove ${a}`]:{margin:0,verticalAlign:"middle"},[`${a}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${p} + ${p}`]:{margin:{_skip_check_:!0,value:o}}}},U5e=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:r,iconCls:n,cardGutter:a,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:r},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[n]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:o(e.marginXXS).mul(-1).equal()},[n]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-body-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-body-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:a},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},G5e=e=>{let{componentCls:t,tabsCardPadding:r,cardHeight:n,cardGutter:a,itemHoverColor:o,itemActiveColor:l,colorBorderSecondary:u}=e;return{[t]:{...Tt(e),display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:r,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:{minWidth:n,minHeight:n,marginLeft:{_skip_check_:!0,value:a},background:"transparent",border:`${ue(e.lineWidth)} ${e.lineType} ${u}`,borderRadius:`${ue(e.borderRadiusLG)} ${ue(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:l},...Xn(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...V5e(e),[`${t}-body`]:{position:"relative",width:"100%"},[`${t}-body-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-content`]:{...Xn(e),"&-hidden":{display:"none"}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},K5e=e=>{let{cardHeight:t,cardHeightSM:r,cardHeightLG:n,controlHeight:a,controlHeightLG:o}=e,l=t||o,u=r||a,d=n||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:l,cardHeightSM:u,cardHeightLG:d,cardPadding:`${(l-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(u-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(d-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},X5e=pt("Tabs",e=>{let t=yt(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${ue(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${ue(e.horizontalItemGutter)}`});return[W5e(t),U5e(t),q5e(t),H5e(t),L5e(t),G5e(t),z5e(t)]},K5e),Q5e=()=>null,Y5e=Q5e,J5e=Ku.forwardRef((e,t)=>{let{type:r,className:n,rootClassName:a,size:o,onEdit:l,hideAdd:u,centered:d,addIcon:p,removeIcon:m,moreIcon:v,more:g,popupClassName:b,children:x,items:y,animated:E,style:S,indicatorSize:F,indicator:$,classNames:C,styles:D,destroyInactiveTabPane:I,destroyOnHidden:M,tabPlacement:A,tabPosition:j,...P}=e,{prefixCls:O}=P,{getPrefixCls:V,direction:W,getPopupContainer:H,className:q,style:z,classNames:L,styles:U}=xt("tabs"),{tabs:Y}=Ku.useContext(st),X=V("tabs",O),J=yn(X),[N,R]=X5e(X,J),K=Ku.useRef(null);Ku.useImperativeHandle(t,()=>({nativeElement:K.current}));let Q;r==="editable-card"&&(Q={onEdit:(ye,{key:we,event:Oe})=>{l?.(ye==="add"?Oe:we,ye)},removeIcon:m??Y?.removeIcon??Ku.createElement(fd,null),addIcon:(p??Y?.addIcon)||Ku.createElement(vB,null),showAdd:u!==!0});let ee=V(),te=Ur(o),ne=R5e(y,x),me=j5e(X,E),se={align:$?.align??Y?.indicator?.align,size:$?.size??F??Y?.indicator?.size??Y?.indicatorSize},he=Ku.useMemo(()=>{let ye=A??j??void 0,we=W==="rtl";switch(ye){case"start":return we?"right":"left";case"end":return we?"left":"right";default:return ye}},[A,j,W]),le={...e,size:te,tabPlacement:he,items:ne},ke=Ge(z),Ae=Ge(S),[de,ve]=Ct([L,C],[U,ke,D,Ae],{props:le},{popup:{_default:"root"}});return Ku.createElement(M5e,{ref:K,direction:W,getPopupContainer:H,...P,items:ne,className:Z({[`${X}-large`]:te==="large",[`${X}-small`]:te==="small",[`${X}-card`]:["card","editable-card"].includes(r),[`${X}-editable-card`]:r==="editable-card",[`${X}-centered`]:d},q,n,a,de.root,N,R,J),classNames:{...de,popup:Z(b,N,R,J,de.popup?.root)},styles:{...ve,popup:ve.popup?.root},style:ve.root,editable:Q,more:{icon:Y?.more?.icon??Y?.moreIcon??v??Ku.createElement(fy,null),transitionName:`${ee}-slide-up`,...g},prefixCls:X,animated:me,indicator:se,destroyOnHidden:M??I,tabPosition:he})}),nG=J5e;nG.TabPane=Y5e;var vy=nG;var aG=B(_(),1),iG=B(Ee(),1);function by({value:e,onValueChange:t,onSearch:r,label:n,placeholder:a=n,disabled:o,className:l,inputRef:u,listId:d,activeOptionId:p}){let m=aG.useRef(null),v=u??m,g=Kb(),b=aG.useRef(!1),x=()=>{g.reset(),b.current=!1,t(""),r?.(""),v.current?.focus()};return(0,iG.jsx)(_u,{className:Je("wand-ui-search",l),startSlot:(0,iG.jsx)(De,{name:"search",size:16}),clearable:!!e,clearLabel:"\u6E05\u7A7A\u641C\u7D22",onClear:x,ref:v,type:"search","aria-label":n,placeholder:a,value:e,disabled:o,autoComplete:"off",spellCheck:!1,role:d?"combobox":void 0,"aria-expanded":d?!0:void 0,"aria-autocomplete":d?"list":void 0,"aria-controls":d,"aria-activedescendant":p,onCompositionStart:()=>{b.current=!0,g.onCompositionStart()},onCompositionEnd:y=>{b.current=!1,g.onCompositionEnd(),r?.(y.currentTarget.value)},onChange:y=>{let E=y.currentTarget.value;t(E),b.current||r?.(E)},onKeyDown:y=>{g.shouldIgnore(y)||y.key==="Escape"&&e&&(y.preventDefault(),y.stopPropagation(),x())}})}var oG=B(Ee(),1);function SB({tabs:e,value:t,defaultValue:r,ariaLabel:n,className:a,orientation:o="horizontal",onValueChange:l}){return(0,oG.jsx)(Bt,{children:(0,oG.jsx)(vy,{className:a,"aria-label":n,activeKey:t,defaultActiveKey:r??e[0]?.value,tabPlacement:o==="vertical"?"start":"top",onChange:l,items:e.map(u=>({key:u.value,label:u.label,children:u.content,disabled:u.disabled}))})})}var sG=B(_()),Z5e={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},exe=Z5e;function FB(){return FB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},FB.apply(this,arguments)}var txe=(e,t)=>sG.createElement(Zt,FB({},e,{ref:t,icon:exe})),rxe=sG.forwardRef(txe),$B=rxe;var lG=B(_()),DB=B(_()),$o=B(_()),yg=B(_()),nxe=B(_()),SE=nxe.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),axe=e=>{let{antCls:t,componentCls:r,colorText:n,footerBg:a,headerHeight:o,headerPadding:l,headerColor:u,footerPadding:d,fontSize:p,bodyBg:m,headerBg:v}=e;return{[r]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:m,"&, *":{boxSizing:"border-box"},[`&${r}-has-sider`]:{flexDirection:"row",[`> ${r}, > ${r}-content`]:{width:0}},[`${r}-header, &${r}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${r}-header`]:{height:o,padding:l,color:u,lineHeight:ue(o),background:v,[`${t}-menu`]:{lineHeight:"inherit"}},[`${r}-footer`]:{padding:d,color:n,fontSize:p,background:a},[`${r}-content`]:{flex:"auto",color:n,minHeight:0}}},vG=e=>{let{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:a,controlHeightSM:o,marginXXS:l,colorTextLightSolid:u,colorBgContainer:d}=e,p=n*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:r*2,headerPadding:`0 ${p}px`,headerColor:a,footerPadding:`${o}px ${p}px`,footerBg:t,siderBg:"#001529",triggerHeight:n+l*2,triggerBg:"#002140",triggerColor:u,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:d,lightTriggerBg:d,lightTriggerColor:a}},bG=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],FE=pt("Layout",axe,vG,{deprecatedTokens:bG}),ixe=e=>{let{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:a,antCls:o,triggerHeight:l,triggerColor:u,triggerBg:d,headerHeight:p,zeroTriggerWidth:m,zeroTriggerHeight:v,borderRadiusLG:g,lightSiderBg:b,lightTriggerColor:x,lightTriggerBg:y,bodyBg:E}=e;return{[t]:{position:"relative",minWidth:0,background:r,transition:`all ${n}, background 0s`,"&-has-trigger":{paddingBottom:l},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:l,color:u,lineHeight:ue(l),textAlign:"center",background:d,cursor:"pointer",transition:`all ${n}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:p,insetInlineEnd:e.calc(m).mul(-1).equal(),zIndex:1,width:m,height:v,color:u,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderRadius:`0 ${ue(g)} ${ue(g)} 0`,cursor:"pointer",transition:`background-color ${a} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${a}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(m).mul(-1).equal(),borderRadius:`${ue(g)} 0 0 ${ue(g)}`}},"&-light":{background:b,[`${t}-trigger`]:{color:x,background:y},[`${t}-zero-width-trigger`]:{color:x,background:y,border:`${ue(e.lineWidth)} ${e.lineType} ${E}`,borderInlineStart:0}}}}},oxe=pt(["Layout","Sider"],ixe,vG,{deprecatedTokens:bG}),uG={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1839.98px"},sxe=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),wg=$o.createContext({}),lxe=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),uxe=$o.forwardRef((e,t)=>{let{prefixCls:r,className:n,trigger:a,children:o,defaultCollapsed:l=!1,theme:u="dark",style:d={},collapsible:p=!1,reverseArrow:m=!1,width:v=200,collapsedWidth:g=80,zeroWidthTriggerStyle:b,breakpoint:x,onCollapse:y,onBreakpoint:E,classNames:S,styles:F,...$}=e,{siderHook:C}=(0,yg.useContext)(SE),[D,I]=qt(l,e.collapsed),[M,A]=(0,yg.useState)(!1),j=(se,he)=>{I(se),y?.(se,he)},P={...e,collapsed:D,defaultCollapsed:l,theme:u,style:d,collapsible:p,reverseArrow:m,width:v,collapsedWidth:g,zeroWidthTriggerStyle:b,breakpoint:x,onCollapse:y,onBreakpoint:E},[O,V]=Ct([S],[F],{props:P}),{getPrefixCls:W,direction:H}=(0,yg.useContext)(st),q=W("layout-sider",r),[z,L]=oxe(q),U=(0,yg.useRef)(null);U.current=se=>{A(se.matches),E?.(se.matches),D!==se.matches&&j(se.matches,"responsive")},(0,yg.useEffect)(()=>{function se(le){return U.current?.(le)}let he;return typeof window?.matchMedia<"u"&&x&&x in uG&&(he=window.matchMedia(`screen and (max-width: ${uG[x]})`),cr(he?.addEventListener)&&he.addEventListener("change",se),se(he)),()=>{cr(he?.removeEventListener)&&he.removeEventListener("change",se)}},[x]),(0,yg.useEffect)(()=>{let se=lxe("ant-sider-");return C.addSider(se),()=>C.removeSider(se)},[]);let Y=()=>{j(!D,"clickTrigger")},X=Ut($,["collapsed"]),J=D?g:v,N=sxe(J)?`${J}px`:String(J),R=Number.parseFloat(String(g||0))===0?$o.createElement("span",{onClick:Y,className:Z(`${q}-zero-width-trigger`,`${q}-zero-width-trigger-${m?"right":"left"}`),style:b},a||$o.createElement($B,null)):null,K=H==="rtl"==!m,Q={expanded:K?$o.createElement(Au,null):$o.createElement(vd,null),collapsed:K?$o.createElement(vd,null):$o.createElement(Au,null)}[D?"collapsed":"expanded"],ee=a!==null?R||$o.createElement("div",{className:`${q}-trigger`,onClick:Y,style:{width:N}},a||Q):null,te={...d,flex:`0 0 ${N}`,maxWidth:N,minWidth:N,width:N},ne=Z(q,`${q}-${u}`,{[`${q}-collapsed`]:!!D,[`${q}-has-trigger`]:p&&a!==null&&!R,[`${q}-below`]:!!M,[`${q}-zero-width`]:Number.parseFloat(N)===0},n,O.root,z,L),me=$o.useMemo(()=>({siderCollapsed:D}),[D]);return $o.createElement(wg.Provider,{value:me},$o.createElement("aside",{className:ne,...X,style:{...V.root,...te},ref:t},$o.createElement("div",{className:Z(`${q}-children`,O.body),style:V.body},o),p||M&&R?ee:null))}),$E=uxe,Qu=B(_()),cxe=B(_()),dxe=B(_()),pxe=(0,dxe.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),CE=pxe,cG=B(_()),fxe=e=>{let{prefixCls:t,className:r,dashed:n,...a}=e,{getPrefixCls:o}=cG.useContext(st),l=o("menu",t),u=Z({[`${l}-item-divider-dashed`]:!!n},r);return cG.createElement(uy,{className:u,...a})},yG=fxe,Yu=B(_()),mxe=e=>{let{className:t,children:r,icon:n,title:a,danger:o,extra:l}=e,{prefixCls:u,firstLevel:d,direction:p,disableMenuItemTitleTooltip:m,tooltip:v,inlineCollapsed:g,styles:b,classNames:x}=Yu.useContext(CE),{siderCollapsed:y}=Yu.useContext(wg),E=!!(y||g),[S,F]=Yu.useState(!1);Yu.useEffect(()=>{F(!1)},[E]);let $=P=>{let O=r?.[0],V=Yu.createElement("span",{className:Z(`${u}-title-content`,d?x?.itemContent:x?.subMenu?.itemContent,{[`${u}-title-content-with-extra`]:!!l||l===0}),style:d?b?.itemContent:b?.subMenu?.itemContent},r);return(!n||Yu.isValidElement(r)&&r.type==="span")&&r&&P&&d&&typeof O=="string"?Yu.createElement("div",{className:`${u}-inline-collapsed-noicon`},O.charAt(0)):V},C=a;typeof a>"u"?C=d?r:"":a===!1&&(C="");let D=v===!1?void 0:v,I=D&&D.title!==void 0?D.title:C,M={...D??null,title:I};E?(M.open=D?.open??S,M.onOpenChange=P=>{F(P),D?.onOpenChange?.(P)}):(M.title=null,M.open=!1);let A=xr(r).length,j=Yu.createElement(Ud,{...Ut(e,["title","icon","danger"]),className:Z(d?x?.item:x?.subMenu?.item,{[`${u}-item-danger`]:o,[`${u}-item-only-child`]:(n?A+1:A)===1},t),style:{...d?b?.item:b?.subMenu?.item,...e.style},title:typeof a=="string"?a:void 0,itemData:e?.itemData??{...e,key:e.eventKey}},Sr(n,P=>({className:Z(`${u}-item-icon`,d?x?.itemIcon:x?.subMenu?.itemIcon,P.className),style:{...d?b?.itemIcon:b?.subMenu?.itemIcon,...P.style}})),$(g));if(!m&&v!==!1){let P=D&&D.placement?D.placement:p==="rtl"?"left":"right",O=`${u}-inline-collapsed-tooltip`,V=H=>({...H,root:Z(O,H?.root)}),W=cr(D?.classNames)?H=>{let q=D.classNames(H);return V(q)}:V(D?.classNames);j=Yu.createElement(wi,{...M,placement:P,classNames:W},j)}return j},wG=mxe,tm=B(_()),BB=tm.createContext(null),IB=tm.forwardRef((e,t)=>{let{children:r,...n}=e,a=tm.useContext(BB),o=tm.useMemo(()=>({...a,...n}),[a,n.prefixCls,n.mode,n.selectable,n.rootClassName]),l=Ax(r),u=Za(t,l?Hi(r):null);return tm.createElement(BB.Provider,{value:o},tm.createElement(td,{space:!0},l?tm.cloneElement(r,{ref:u}):r))}),dG=BB,hxe=e=>{let{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:a,lineWidth:o,lineType:l,itemPaddingInline:u}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${ue(o)} ${l} ${a}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:u},[`> ${t}-item:hover,
228
- > ${t}-item-active,
229
- > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(d=>`${d} ${r}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},gxe=hxe,vxe=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
230
- ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ue(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ue(t)})`}}}}),bxe=vxe,pG=e=>yi(e),yxe=(e,t)=>{let{componentCls:r,itemColor:n,itemSelectedColor:a,subMenuItemSelectedColor:o,groupTitleColor:l,itemBg:u,subMenuItemBg:d,itemSelectedBg:p,activeBarHeight:m,activeBarWidth:v,activeBarBorderWidth:g,motionDurationSlow:b,motionEaseInOut:x,motionEaseOut:y,itemPaddingInline:E,motionDurationMid:S,itemHoverColor:F,lineType:$,colorSplit:C,itemDisabledColor:D,dangerItemColor:I,dangerItemHoverColor:M,dangerItemSelectedColor:A,dangerItemActiveBg:j,dangerItemSelectedBg:P,popupBg:O,itemHoverBg:V,itemActiveBg:W,menuSubMenuBg:H,horizontalItemSelectedColor:q,horizontalItemSelectedBg:z,horizontalItemBorderRadius:L,horizontalItemHoverBg:U}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:u,[`&${r}-root:focus-visible`]:{...pG(e)},[`${r}-item`]:{"&-group-title, &-extra":{color:l}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:o},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:{...pG(e)}},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${D} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:F}},[`${r}-submenu:not(${r}-submenu-selected)`]:{[`> ${r}-submenu-title:hover`]:{color:F}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:V},"&:active":{backgroundColor:W}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:V},"&:active":{backgroundColor:W}}},[`${r}-item-danger`]:{color:I,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:M}},[`&${r}-item:active`]:{background:j}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:a,[`&${r}-item-danger`]:{color:A},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:p,[`&${r}-item-danger`]:{backgroundColor:P}},[`&${r}-submenu > ${r}`]:{backgroundColor:H},[`&${r}-popup > ${r}`]:{backgroundColor:O},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:O},[`&${r}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${r}-item, > ${r}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:L,"&::after":{position:"absolute",insetInline:E,bottom:0,pointerEvents:"none",borderBottom:`${ue(m)} solid transparent`,transition:`border-color ${b} ${x}`,content:'""'},"&:hover, &-active, &-open":{background:U,"&::after":{borderBottomWidth:m,borderBottomColor:q}},"&-selected":{color:q,backgroundColor:z,"&:hover":{backgroundColor:z},"&::after":{borderBottomWidth:m,borderBottomColor:q}}}},[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${ue(g)} ${$} ${C}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:d},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ue(v)} solid ${a}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(Y=>`${Y} ${S} ${y}`).join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:A}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(Y=>`${Y} ${S} ${x}`).join(",")}}}}}},fG=yxe,mG=e=>{let{componentCls:t,itemHeight:r,itemMarginInline:n,padding:a,menuArrowSize:o,marginXS:l,itemMarginBlock:u,itemWidth:d,itemPaddingInline:p}=e,m=e.calc(o).add(a).add(l).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:ue(r),paddingInline:p,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:u,width:d},[`> ${t}-item,
231
- > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:ue(r)},[`${t}-item-group-list ${t}-submenu-title,
232
- ${t}-submenu-title`]:{paddingInlineEnd:m}}},wxe=e=>{let{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:a,dropdownWidth:o,controlHeightLG:l,padding:u,paddingXL:d,itemMarginInline:p,fontSizeLG:m,motionDurationSlow:v,paddingXS:g,boxShadowSecondary:b,collapsedWidth:x,collapsedIconSize:y}=e,E={height:n,lineHeight:ue(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...mG(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...mG(e),boxShadow:b}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${ue(e.calc(l).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${v}`,`background-color ${v}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:E,[`& ${t}-item-group-title`]:{paddingInlineStart:d}},[`${t}-item`]:E}},{[`${t}-inline-collapsed`]:{width:x,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{transition:["border-color","background-color"].map(S=>`${S} ${v}`).join(","),[`> ${t}-inline-collapsed-noicon`]:{fontSize:m,textAlign:"center",width:"100%"}}},[`> ${t}-item,
233
- > ${t}-item-group > ${t}-item-group-list > ${t}-item,
234
- > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
235
- > ${t}-submenu > ${t}-submenu-title`]:{display:"flex",alignItems:"center",justifyContent:"flex-start",insetInlineStart:0,paddingInline:`calc(50% - ${ue(e.calc(y).div(2).equal())} - ${ue(p)})`,textOverflow:"clip",[`
236
- ${t}-submenu-arrow,
237
- ${t}-submenu-expand-icon
238
- `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:y,lineHeight:ue(n),"+ span":{display:"inline-block",width:0,opacity:0,overflow:"hidden",marginInlineStart:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},[`${t}-item-extra`]:{paddingInlineStart:u},"a, a:hover":{color:a}},[`${t}-item-group-title`]:{...fl,paddingInline:g}}}]},xxe=wxe,hG=e=>{let{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:a,motionEaseOut:o,iconCls:l,iconSize:u,iconMarginInlineEnd:d}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background-color ${r}`,`padding calc(${r} + 0.1s) ${a}`].join(","),[`${t}-item-icon, ${l}`]:{minWidth:u,fontSize:u,transition:[`font-size ${n} ${o}`,`margin ${r} ${a}`,`color ${r}`].join(","),"+ span":{marginInlineStart:d,opacity:1,transition:[`opacity ${r} ${a}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:{...Rp()},[`&${t}-item-only-child`]:{[`> ${l}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},gG=e=>{let{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:a,menuArrowSize:o,menuArrowOffset:l}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(u=>`${u} ${r}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:a,transition:["background-color","transform","top","color"].map(u=>`${u} ${r} ${n}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${ue(e.calc(l).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ue(l)})`}}}}},Exe=e=>{let{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:a,motionDurationMid:o,motionEaseInOut:l,paddingXS:u,padding:d,colorSplit:p,lineWidth:m,zIndexPopup:v,borderRadiusLG:g,subMenuItemBorderRadius:b,menuArrowSize:x,menuArrowOffset:y,lineType:E,groupTitleLineHeight:S,groupTitleFontSize:F,iconSize:$,iconMarginInlineEnd:C}=e,D=[`> ${t}-typography-ellipsis-single-line`,`> ${r}-item-label > ${t}-typography-ellipsis-single-line`].join(",");return[{"":{[r]:{..._h(),"&-hidden":{display:"none"}}},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:{...Tt(e),..._h(),marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${a} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${ue(u)} ${ue(d)}`,fontSize:F,lineHeight:S,transition:`all ${a}`},[`&-horizontal ${r}-submenu`]:{transition:["border-color","background-color"].map(I=>`${I} ${a} ${l}`).join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${a}`,`background-color ${a}`,`padding ${o}`].map(I=>`${I} ${l}`).join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(I=>`${I} ${a} ${l}`).join(",")},[`${r}-title-content`]:{transition:`color ${a}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%",minWidth:0},[`${r}-item-label`]:{flex:"auto",minWidth:0,...fl},[D]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{flex:"none",marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item-icon + ${r}-title-content-with-extra`]:{width:`calc(100% - ${ue(e.calc($).add(C??0).equal())})`},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:p,borderStyle:E,borderWidth:0,borderTopWidth:m,marginBlock:m,padding:0,"&-dashed":{borderStyle:"dashed"}},...hG(e),[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${ue(e.calc(n).mul(2).equal())} ${ue(d)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:v,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:{borderRadius:g,...hG(e),...gG(e),[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:b},[`${r}-submenu-title::after`]:{transition:`transform ${a} ${l}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:"100% 0"},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:"100% 100%"},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:"0 100%"},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:"0 0"},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...gG(e),[`&-inline-collapsed ${r}-submenu-arrow,
239
- &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ue(y)})`},"&::after":{transform:`rotate(45deg) translateX(${ue(e.calc(y).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${ue(e.calc(x).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ue(e.calc(y).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ue(y)})`}}}},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},kxe=e=>{let{colorPrimary:t,colorError:r,colorTextDisabled:n,colorErrorBg:a,colorText:o,colorTextDescription:l,colorBgContainer:u,colorFillAlter:d,colorFillContent:p,lineWidth:m,lineWidthBold:v,controlItemBgActive:g,colorBgTextHover:b,controlHeightLG:x,lineHeight:y,colorBgElevated:E,marginXXS:S,padding:F,fontSize:$,controlHeightSM:C,fontSizeLG:D,colorTextLightSolid:I,colorErrorHover:M}=e,A=e.activeBarWidth??0,j=e.activeBarBorderWidth??m,P=e.itemMarginInline??e.marginXXS,O=new Ar(I).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:o,itemColor:o,colorItemTextHover:o,itemHoverColor:o,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:l,groupTitleColor:l,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:u,itemBg:u,colorItemBgHover:b,itemHoverBg:b,colorItemBgActive:p,itemActiveBg:g,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:A,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:m,activeBarBorderWidth:j,colorItemTextDisabled:n,itemDisabledColor:n,colorDangerItemText:r,dangerItemColor:r,colorDangerItemTextHover:r,dangerItemHoverColor:r,colorDangerItemTextSelected:r,dangerItemSelectedColor:r,colorDangerItemBgActive:a,dangerItemActiveBg:a,colorDangerItemBgSelected:a,dangerItemSelectedBg:a,itemMarginInline:P,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:x,groupTitleLineHeight:y,collapsedWidth:x*2,popupBg:E,itemMarginBlock:S,itemPaddingInline:F,horizontalLineHeight:`${x*1.15}px`,iconSize:$,iconMarginInlineEnd:C-$,collapsedIconSize:D,groupTitleFontSize:$,darkItemDisabledColor:new Ar(I).setA(.25).toRgbString(),darkItemColor:O,darkDangerItemColor:r,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:t,darkDangerItemSelectedBg:r,darkItemHoverBg:"transparent",darkGroupTitleColor:O,darkItemHoverColor:I,darkDangerItemHoverColor:M,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:r,itemWidth:A?`calc(100% + ${j}px)`:`calc(100% - ${P*2}px)`}},Cxe=(e,t=e,r=!0)=>pt("Menu",n=>{let{colorBgElevated:a,controlHeightLG:o,fontSize:l,darkItemColor:u,darkDangerItemColor:d,darkItemBg:p,darkSubMenuItemBg:m,darkItemSelectedColor:v,darkItemSelectedBg:g,darkDangerItemSelectedBg:b,darkItemHoverBg:x,darkGroupTitleColor:y,darkItemHoverColor:E,darkItemDisabledColor:S,darkDangerItemHoverColor:F,darkDangerItemSelectedColor:$,darkDangerItemActiveBg:C,popupBg:D,darkPopupBg:I}=n,M=n.calc(l).div(7).mul(5).equal(),A=yt(n,{menuArrowSize:M,menuHorizontalHeight:n.calc(o).mul(1.15).equal(),menuArrowOffset:n.calc(M).mul(.25).equal(),menuSubMenuBg:a,calc:n.calc,popupBg:D}),j=yt(A,{itemColor:u,itemHoverColor:E,groupTitleColor:y,itemSelectedColor:v,subMenuItemSelectedColor:v,itemBg:p,popupBg:I,subMenuItemBg:m,itemActiveBg:"transparent",itemSelectedBg:g,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:x,itemDisabledColor:S,dangerItemColor:d,dangerItemHoverColor:F,dangerItemSelectedColor:$,dangerItemActiveBg:C,dangerItemSelectedBg:b,menuSubMenuBg:m,horizontalItemSelectedColor:v,horizontalItemSelectedBg:g});return[Exe(A),gxe(A),xxe(A),fG(A,"light"),fG(j,"dark"),bxe(A),kb(A),qo(A,"slide-up"),qo(A,"slide-down"),$u(A,"zoom-big")]},kxe,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),Ol=B(_()),Sxe=e=>{let{popupClassName:t,icon:r,title:n,theme:a}=e,o=Ol.useContext(CE),{prefixCls:l,inlineCollapsed:u,theme:d,classNames:p,styles:m}=o,v=Vd(),g;if(!r)g=u&&!v.length&&n&&typeof n=="string"?Ol.createElement("div",{className:`${l}-inline-collapsed-noicon`},n.charAt(0)):Ol.createElement("span",{className:`${l}-title-content`},n);else{let y=Ol.isValidElement(n)&&n.type==="span";g=Ol.createElement(Ol.Fragment,null,Sr(r,E=>({className:Z(E.className,`${l}-item-icon`,p?.itemIcon),style:{...E.style,...m?.itemIcon}})),y?n:Ol.createElement("span",{className:`${l}-title-content`},n))}let b=Ol.useMemo(()=>({...o,firstLevel:!1}),[o]),[x]=Qp("Menu");return Ol.createElement(CE.Provider,{value:b},Ol.createElement(gg,{...Ut(e,["icon"]),title:g,classNames:{list:p?.subMenu?.list,listTitle:p?.subMenu?.itemTitle},styles:{list:m?.subMenu?.list,listTitle:m?.subMenu?.itemTitle},popupClassName:Z(l,t,p?.popup?.root,`${l}-${a||d}`),popupStyle:{zIndex:x,...e.popupStyle,...m?.popup?.root}}))},xG=Sxe;function AB(e){return e===null||e===!1}var Fxe={item:wG,submenu:xG,divider:yG},$xe=(0,cxe.forwardRef)((e,t)=>{let r=Qu.useContext(dG),n=r||{},{prefixCls:a,className:o,style:l,theme:u="light",expandIcon:d,_internalDisableMenuItemTitleTooltip:p,tooltip:m,inlineCollapsed:v,siderCollapsed:g,rootClassName:b,mode:x,selectable:y,onClick:E,overflowedIndicatorPopupClassName:S,classNames:F,styles:$,...C}=e,{menu:D}=Qu.useContext(st),{getPrefixCls:I,getPopupContainer:M,direction:A,className:j,style:P,classNames:O,styles:V}=xt("menu"),W=I(),H=Ut(C,["collapsedWidth"]);n.validator?.({mode:x});let q=wt((...le)=>{E?.(...le),n.onClick?.()}),z=n.mode||x,L=y??n.selectable,U=v??g,Y={...e,mode:z,inlineCollapsed:U,selectable:L,theme:u},X=Ge(P),J=Ge(l),[N,R]=Ct([O,F],[V,X,$,J],{props:Y},{popup:{_default:"root"},subMenu:{_default:"item"}}),K={horizontal:{motionName:`${W}-slide-up`},inline:Eb(W),other:{motionName:`${W}-zoom-big`}},Q=I("menu",a||n.prefixCls),ee=yn(Q),[te,ne]=Cxe(Q,ee,!r),me=Z(`${Q}-${u}`,j,o),se=Qu.useMemo(()=>{if(cr(d)||AB(d))return d||null;if(cr(n.expandIcon)||AB(n.expandIcon))return n.expandIcon||null;if(cr(D?.expandIcon)||AB(D?.expandIcon))return D?.expandIcon||null;let le=d??n?.expandIcon??D?.expandIcon;return Sr(le,{className:Z(`${Q}-submenu-expand-icon`,Qu.isValidElement(le)?le.props?.className:void 0)})},[d,n?.expandIcon,D?.expandIcon,Q]),he=Qu.useMemo(()=>({prefixCls:Q,inlineCollapsed:U||!1,direction:A,firstLevel:!0,theme:u,mode:z,disableMenuItemTitleTooltip:p,tooltip:m,classNames:N,styles:R}),[Q,U,A,p,u,z,N,R,m]);return Qu.createElement(dG.Provider,{value:null},Qu.createElement(CE.Provider,{value:he},Qu.createElement(dy,{getPopupContainer:M,overflowedIndicator:Qu.createElement(fy,null),overflowedIndicatorPopupClassName:Z(Q,`${Q}-${u}`,S),classNames:{list:N.list,listTitle:N.itemTitle},styles:{list:R.list,listTitle:R.itemTitle},mode:z,selectable:L,onClick:q,...H,inlineCollapsed:U,style:R.root,className:me,prefixCls:Q,direction:A,defaultMotions:K,expandIcon:se,ref:t,rootClassName:Z(b,te,n.rootClassName,ne,ee,N.root),_internalComponents:Fxe})))}),Dxe=$xe,yy=(0,DB.forwardRef)((e,t)=>{let r=(0,DB.useRef)(null),n=lG.useContext(wg);return(0,DB.useImperativeHandle)(t,()=>({menu:r.current,focus:a=>{r.current?.focus(a)}})),lG.createElement(Dxe,{ref:r,...e,...n})});yy.Item=wG;yy.SubMenu=xG;yy.Divider=yG;yy.ItemGroup=ly;var MB=yy;var Gd={open:!1,src:"",label:"",items:[],current:0},NB=new Set,TB;function jB(e){Gd={...Gd,...e};for(let t of NB)t()}function _B(e){return e.startsWith("data:image/")||e.startsWith("blob:")||e.startsWith("/")||/^https?:\/\//i.test(e)}var zl={afterClosed(){if(Gd.open)return;let e=TB;TB=void 0,e?.()},subscribe(e){return NB.add(e),()=>NB.delete(e)},getSnapshot(){return Gd},isOpen(){return Gd.open},close(){jB({open:!1,src:"",label:"",items:[],current:0})},closeIfOpen(){return Gd.open?(this.close(),!0):!1},open(e,t=""){return this.openGroup([{src:e,label:t}])},openGroup(e,t=0,r){let n=e[t];if(!Number.isInteger(t)||!n||!_B(n.src.trim()))return!1;let a=e.map(l=>({src:l.src.trim(),label:l.label?.trim()||"\u56FE\u7247"})).filter(l=>_B(l.src)),o=e.slice(0,t).filter(l=>_B(l.src.trim())).length;return TB=r,jB({open:!0,items:a,current:o,src:a[o].src,label:a[o].label}),!0},select(e){let t=Gd.items[e];!Gd.open||!Number.isInteger(e)||!t||jB({current:e,src:t.src,label:t.label||"\u56FE\u7247"})}};var Axe=".markdown-content img, .wand-markdown-preview img, .inline-tool-image-thumb, .user-attachment-thumb";function PB(e){e.focus({preventScroll:!0});let t=e.closest(".chat-message")??e.closest('[data-chat-renderer="canonical"]')??e.closest(".wand-markdown-preview, .markdown-content, .chat-activity-detail-section"),r=t?Array.from(t.querySelectorAll(Axe)).filter(a=>!a.closest('[hidden], [inert], [data-image-state="error"]')&&!(a.complete&&a.naturalWidth===0)):[e],n=r.indexOf(e);return n<0?zl.open(e.currentSrc||e.src,e.alt):zl.openGroup(r.map(a=>({src:a.currentSrc||a.src,label:a.alt})),n)}function EG(e=0){return{open:!1,revision:e,request:null,status:"idle",file:null,failure:null,editing:!1,draft:"",baseline:"",dirty:!1,saving:!1,wrap:!1,fontSize:tg(),imageZoomed:!1}}function Bxe(e){return e==="exit-edit"?{title:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u9000\u51FA\u7F16\u8F91\u540E\u4F1A\u4E22\u5931\u3002"}:e==="replace"?{title:"\u5207\u6362\u9884\u89C8\u6587\u4EF6\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002"}:{title:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002"}}var Ixe={async confirmDiscard(e){let t=Bxe(e),r=await xn.dialog({title:t.title,description:t.message,tone:"warning",actions:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autoFocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],dismissable:!0});return r.dismissed===!1&&r.action===!0},async copyText(e){await _f(e)},appendToComposer(){return!1},notify(e,t){xn.toast(e,{tone:t})},onSaved(){}};function Mxe(e){let t=new Set,r=EG(),n=e.runtime??Ixe,a=0,o=null;function l(g){r={...r,...g,revision:r.revision+1};for(let b of t)b()}function u(){o?.abort(),o=null,a+=1,r=EG(r.revision+1);for(let g of t)g()}async function d(g){if(!r.dirty||!r.request)return!0;try{return await n.confirmDiscard(g,r.request.path)}catch(b){return n.notify(si(b,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function p(g){o?.abort();let b=new AbortController;o=b;let x=++a;l({open:!0,request:g,status:"loading",file:null,failure:null,editing:!1,draft:"",baseline:"",dirty:!1,saving:!1,wrap:!1,fontSize:tg(),imageZoomed:!1});try{let y=await e.repository.load(g.path,{signal:b.signal});if(x!==a||b.signal.aborted||!r.open)return!1;if(o=null,y.ok===!1)return l({status:"error",failure:y.failure}),!1;let E=y.file.kind==="text"?y.file.content??"":"";return l({status:"ready",file:y.file,failure:null,draft:E,baseline:E}),!0}catch(y){return x!==a||b.signal.aborted||Cd(y)||!r.open||(o=null,l({status:"error",failure:si(y,"\u52A0\u8F7D\u9884\u89C8\u5931\u8D25")})),!1}}async function m(g,b){try{return await n.copyText(g),n.notify(b,"success"),!0}catch(x){return n.notify(si(x,"\u590D\u5236\u5931\u8D25\u3002").message,"error"),!1}}async function v(g){if(!r.open)return!1;switch(g.type){case"close":return r.saving?!1:r.dirty?await d("close")?(u(),!0):!1:(u(),!0);case"navigate":{if(r.editing||r.saving)return!1;let b=CA(r.request,g.direction);return!b||!r.request?!1:p({...r.request,path:b.path})}case"edit.enter":{if(r.status!=="ready"||r.file?.kind!=="text"||r.saving)return!1;let b=r.file.content??"";return l({editing:!0,draft:b,baseline:b,dirty:!1,failure:null}),!0}case"edit.change":return!r.editing||r.saving?!1:(l({draft:g.value,dirty:g.value!==r.baseline,failure:null}),!0);case"edit.revert":return!r.editing||r.saving?!1:(l({draft:r.baseline,dirty:!1,failure:null}),!0);case"edit.exit":return!r.editing||r.saving||!await d("exit-edit")?!1:(l({editing:!1,draft:r.baseline,dirty:!1,failure:null}),!0);case"edit.save":{if(!r.editing||r.saving||r.file?.kind!=="text"||!r.request)return!1;if(r.draft===r.baseline)return n.notify("\u6CA1\u6709\u6539\u52A8","info"),!0;let b=r.file.path,x=r.request.path,y=a,E=r.draft;l({saving:!0,failure:null});try{let S=await e.repository.save(b,E);if(!r.open||r.request?.path!==x||y!==a)return!1;if(S.ok===!1)return l({saving:!1,failure:S.failure}),n.notify(S.failure.message,"error"),!1;let F=r.file;l({saving:!1,file:F&&{...F,content:E,size:S.result.size},baseline:E,draft:E,dirty:!1,failure:null}),n.notify("\u5DF2\u4FDD\u5B58","success");try{await n.onSaved(b)}catch{}return!0}catch(S){if(!r.open||r.request?.path!==x||y!==a)return!1;let F=si(S,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF");return l({saving:!1,failure:F}),n.notify(F.message,"error"),!1}}case"copy.path":return r.file?m(r.file.path,"\u5DF2\u590D\u5236\u8DEF\u5F84"):!1;case"copy.content":return r.file?.kind==="text"?m(r.file.content??"","\u5DF2\u590D\u5236\u5185\u5BB9"):!1;case"composer.path":{if(!r.file)return!1;let b=n.appendToComposer(r.file.path);return n.notify(b?"\u5DF2\u7C98\u8D34\u5230\u8F93\u5165\u6846":"\u65E0\u6CD5\u7C98\u8D34\u5230\u8F93\u5165\u6846",b?"success":"error"),b}case"composer.cat":{if(!r.file)return!1;let b=n.appendToComposer(`cat -- ${FA(r.file.path)}`);return n.notify(b?"\u547D\u4EE4\u5DF2\u7C98\u8D34\u5230\u8F93\u5165\u6846":"\u65E0\u6CD5\u7C98\u8D34\u5230\u8F93\u5165\u6846",b?"success":"error"),b}case"view.wrap.toggle":return r.file?.kind!=="text"||r.editing?!1:(l({wrap:!r.wrap}),!0);case"view.font.adjust":return r.file?.kind!=="text"||r.editing?!1:(l({fontSize:q1(r.fontSize+g.delta)}),!0);case"view.image.zoom.toggle":return r.file?.kind!=="image"||r.editing?!1:(l({imageZoomed:!r.imageZoomed}),!0)}}return{controller:{async open(g){let b=kA(g);return b?r.open&&r.request?.path===b.path&&!r.dirty?(l({request:b}),!0):r.open&&r.dirty&&!await d("replace")?!1:p(b):!1},execute:v,closeIfOpen(){return r.open?(v({type:"close"}),!0):!1},closeTopmost(){return this.closeIfOpen()},isOpen(){return r.open}},store:{subscribe(g){return t.add(g),()=>t.delete(g)},getSnapshot(){return r}},configureRuntime(g){let b=n;return n=g,()=>{n===g&&(n=b)}}}}var RB=Mxe({repository:$A}),Vs=RB.controller,rm=RB.store,OB=RB.configureRuntime;function Txe(e,t){return e.index===t.index&&e.name===t.name&&e.size===t.size&&e.sizeLabel===t.sizeLabel&&e.previewUrl===t.previewUrl}function jxe(e,t){if(e.target!==t.target||e.items.length!==t.items.length)return!1;for(let r=0;r<e.items.length;r+=1)if(!Txe(e.items[r],t.items[r]))return!1;return!0}var _xe=class extends vl{constructor(){super(jxe)}},DE=new _xe;function ak(e,t,r){if(e===null||typeof e!="object")return t?.kind==="value"&&Object.is(t.value,e)?t:{revision:r(),kind:"value",value:e};let n=Array.isArray(e)?"array":"object",a=Object.keys(e),o=Array.isArray(e)?e.length:void 0,l=t?.kind===n&&t.length===o&&a.length===t.keys?.length&&a.every((d,p)=>d===t.keys[p]),u=a.map((d,p)=>ak(e[d],l?t.children[p]:void 0,r));return l&&u.every((d,p)=>d===t.children[p])?t:{revision:r(),kind:n,keys:a,length:o,children:u}}var PK=class{constructor(){ie(this,"generation",0),ie(this,"revision",0),ie(this,"sessionId",null),ie(this,"messages",[]),ie(this,"rows",[]),ie(this,"structure")}reset(){this.generation++,this.sessionId=null,this.messages=[],this.rows=[],this.structure=void 0}prepare(e,t,r,n){let a=this.sessionId===e,o=()=>++this.revision,l=t.map((m,v)=>ak(m,a?this.messages[v]:void 0,o)),u=r(l.map(m=>m.revision)),d=l.map((m,v)=>ak({message:m.revision,dependencies:u[v]},a?this.rows[v]:void 0,o)),p=ak(n,a?this.structure:void 0,o);return{generation:this.generation,sessionId:e,messages:l,rows:d,structure:p,changedIndices:d.flatMap((m,v)=>!a||m!==this.rows[v]?[v]:[]),structureChanged:!a||p!==this.structure}}commit(e){e.generation===this.generation&&(this.sessionId=e.sessionId,this.messages=e.messages,this.rows=e.rows,this.structure=e.structure)}};function Nxe(e,t){return e===!1?!1:e===!0?!0:!t}function Pxe(e){if(!e)return!1;var t=e;if(t.__wandAmbiguousDelivery===!0||t.errorCode==="duplicate_idempotency_key"||t.errorCode==="duplicate_queued_message")return!0;if(typeof t.httpStatus=="number")return t.httpStatus>=500||t.httpStatus===408||t.httpStatus===409;var r=t.message==null?"":String(t.message);return r?/failed to fetch|networkerror|load failed|network connection was lost|aborted|aborterror|err_network|err_connection/i.test(r):!1}function l9(e){return!e}function kG(e){let t=e.attachments.map(r=>[r.name,r.size,r.file.lastModified||0].join(":")).join("|");return e.text.trim()+"\0"+t}var Rxe=class{constructor(e){ie(this,"dependencies",e),ie(this,"sessions",new Map),ie(this,"listeners",new Set),ie(this,"revision",0)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){for(let e of this.listeners)e()}session(e){let t=this.sessions.get(e);if(!t){let r="";try{r=this.dependencies.storage().getItem("wand-draft-"+e)??""}catch{}t={text:r,attachments:[],memoryOnly:!1,revision:++this.revision,submissions:new Map},this.sessions.set(e,t)}return t}read(e){let t=e?this.session(e):null;return{text:t?.text??"",attachments:t?.attachments.slice()??[],memoryOnly:t?.memoryOnly??!1,revision:t?.revision??0,recovery:t?.recovery?.payload??null,queueRetrieval:t?.queueRetrieval?{text:t.queueRetrieval.text,status:t.queueRetrieval.status}:null,queueRemoval:t?.queueRemoval?{text:t.queueRemoval.text,status:t.queueRemoval.status}:null}}isCurrentRevision(e,t){return this.sessions.get(e)?.revision===t}writeText(e,t,r,n){if(t.text!==r&&(t.revision=++this.revision),t.text=r,n===!1){t.memoryOnly=!0;try{this.dependencies.storage().removeItem("wand-draft-"+e)}catch{}}else if(Nxe(n,this.dependencies.isUnloading())){t.memoryOnly=!1;try{this.dependencies.storage().setItem("wand-draft-"+e,r)}catch{}}}edit(e,t){if(!e||"text"in t&&t.expectedRevision!==void 0&&!this.sessions.has(e))return!1;let r=this.session(e);if("text"in t){if(t.expectedRevision!==void 0&&t.expectedRevision!==r.revision)return!1;this.writeText(e,r,t.text,t.persist)}else if("preserve"in t)this.writeText(e,r,t.preserve,!r.memoryOnly);else if("addAttachment"in t)r.attachments.push(t.addAttachment),r.revision=++this.revision;else if("removeAttachment"in t){if(t.removeAttachment<0||t.removeAttachment>=r.attachments.length)return!1;let[n]=r.attachments.splice(t.removeAttachment,1);this.dependencies.disposeAttachment(n),r.revision=++this.revision}else{if("acknowledgeRevision"in t)return r.revision!==t.acknowledgeRevision?!1:(r.attachments.forEach(this.dependencies.disposeAttachment),r.attachments=[],this.edit(e,{clear:!0}));if("forgetRecovery"in t)r.recovery?.payload.attachments.forEach(this.dependencies.disposeAttachment),r.recovery=void 0,r.revision=++this.revision;else if("recoverCapture"in t){let n=r.recovery;return n?(r.recovery=void 0,this.edit(e,{restore:n.payload,persist:n.persist})):!1}else if("restore"in t){let n=t.restore.text,a=r.text;this.writeText(e,r,a&&a!==n?n?n+`
240
- `+a:a:n,t.persist),t.restore.attachments.length>0&&(r.attachments=[...t.restore.attachments,...r.attachments.filter(o=>!t.restore.attachments.includes(o))],r.revision=++this.revision)}else{r.revision=++this.revision,r.text="",r.memoryOnly=!1;try{this.dependencies.storage().removeItem("wand-draft-"+e)}catch{}}}return this.notify(),!0}beginQueueRetrieval(e,t){let r=this.session(e);if(r.queueRetrieval)return null;let n={};return r.queueRetrieval={text:t,status:"pending",token:n},this.notify(),n}finishQueueRetrieval(e,t,r){let n=this.sessions.get(e)?.queueRetrieval;return!n||n.token!==t?!1:(n.status=r,this.notify(),!0)}restoreQueueRetrieval(e){let t=this.sessions.get(e);if(!t?.queueRetrieval||t.queueRetrieval.status!=="confirmed")return!1;let r=t.queueRetrieval.text;return t.queueRetrieval=void 0,this.edit(e,{text:t.text?t.text+`
241
-
242
- `+r:r,persist:!t.memoryOnly})}dismissQueueRetrieval(e){let t=this.sessions.get(e);!t?.queueRetrieval||t.queueRetrieval.status==="pending"||(t.queueRetrieval=void 0,this.notify())}beginQueueRemoval(e,t){let r=this.session(e);if(r.queueRemoval||!t.length)return null;let n={};return r.queueRemoval={text:t.join(`
243
-
244
- `),status:"pending",token:n},this.notify(),n}finishQueueRemoval(e,t,r){let n=this.sessions.get(e)?.queueRemoval;return!n||n.token!==t?!1:(n.status=r,this.notify(),!0)}restoreQueueRemoval(e){let t=this.sessions.get(e);if(!t?.queueRemoval||t.queueRemoval.status!=="confirmed")return!1;let r=t.queueRemoval.text;return t.queueRemoval=void 0,this.edit(e,{text:t.text?t.text+`
245
-
246
- `+r:r,persist:!t.memoryOnly})}dismissQueueRemoval(e){let t=this.sessions.get(e);!t?.queueRemoval||t.queueRemoval.status==="pending"||(t.queueRemoval=void 0,this.notify())}transfer(e,t,r){let n=this.sessions.get(e);if(!n||n.revision!==r||n.submissions.size)return!1;let a=this.session(t);return a.text||a.attachments.length||a.submissions.size?!1:(a.attachments=n.attachments,a.revision=++this.revision,n.attachments=[],this.writeText(t,a,n.text,!n.memoryOnly),this.edit(e,{clear:!0}),this.notify(),!0)}pendingSubmission(e,t){return e?this.session(e).submissions.get(kG(t))??null:null}submit(e,t,r){let n=this.session(e),a={text:t,attachments:n.attachments.slice()},o=kG(a),l=n.submissions.get(o);if(l)return l;n.attachments=[],this.edit(e,{clear:!0});let u=Promise.resolve().then(()=>r(a)).then(d=>(a.attachments.forEach(this.dependencies.disposeAttachment),d),d=>{if(this.sessions.get(e)===n){let p=!Pxe(d);e.startsWith("conversation-draft:")&&(n.text||n.attachments.length)?(n.recovery?.payload.attachments.forEach(this.dependencies.disposeAttachment),n.recovery={payload:a,persist:p},n.revision=++this.revision,this.notify()):this.edit(e,{restore:a,persist:p})}else a.attachments.forEach(this.dependencies.disposeAttachment);throw d}).finally(()=>{n.submissions.get(o)===u&&n.submissions.delete(o)});return n.submissions.set(o,u),u}discardScope(e){for(let[t,r]of this.sessions)if(t.startsWith(e)){new Set([...r.attachments,...r.recovery?.payload.attachments??[]]).forEach(this.dependencies.disposeAttachment),this.sessions.delete(t);try{this.dependencies.storage().removeItem("wand-draft-"+t)}catch{}}try{let t=this.dependencies.storage();for(let r=(t.length??0)-1;r>=0;r--){let n=t.key?.(r);n?.startsWith("wand-draft-"+e)&&t.removeItem(n)}}catch{}this.notify()}retain(e){for(let[t,r]of this.sessions)if(!(e.has(t)||t.startsWith("conversation-draft:"))){r.attachments.forEach(this.dependencies.disposeAttachment),this.sessions.delete(t);try{this.dependencies.storage().removeItem("wand-draft-"+t)}catch{}}}},Oxe=class{constructor(){ie(this,"versions",new Map)}read(e){return{...this.versions.get(e)??{revision:0,epoch:0}}}advance(e,t){let r=this.read(e);return t==="server"?r.epoch+=1:r.revision+=1,this.versions.set(e,r),{...r}}filter(e,t,r){let n=this.read(t);if(n.revision===r.revision&&n.epoch===r.epoch)return e;let{queuedMessages:a,...o}=e;return o}rollback(e,t,r,n,a){let o=this.read(e);if(o.epoch!==n.epoch||!a&&o.revision!==n.revision)return null;let l=r.slice();if(a){l=t.slice();let u=l[a.index]===a.text?a.index:l.lastIndexOf(a.text);if(u<0)return null;l.splice(u,1)}return this.advance(e,"local"),l}},CG=8,Ry=12,iI=96*1024;function zxe(e){return Math.max(0,e.scrollHeight-e.clientHeight-Math.abs(e.scrollTop))}function Lxe(e){return e.clientHeight>0&&zxe(e)<e.clientHeight*2}var Hxe=class{constructor(){ie(this,"attempt","")}canAttempt(e,t,r=!1){return r||this.attempt!==`${e}\0${t}`}attempted(e,t){this.attempt=`${e}\0${t}`}},At=new Rxe({storage:()=>localStorage,isUnloading:()=>!!h.pageUnloading,disposeAttachment:e=>{e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}}),pi=new Oxe,nc=new Map,oI=ef.configPath,u9="wand-chat-expand-state-v1",AE=[function(){},function(){localStorage.setItem("wand-sidebar-pinned","true"),localStorage.setItem("wand-sidebar-collapsed","false")}];(function(){try{var e=localStorage.getItem("wand-ls-schema"),t=e==null?0:parseInt(e,10);t>=0||(t=0);for(var r=t;r<AE.length;r++)try{AE[r]()}catch{}t<AE.length&&localStorage.setItem("wand-ls-schema",String(AE.length))}catch{}})();function Oy(e,t){try{var r=localStorage.getItem(e);return r==="true"?!0:r==="false"?!1:t}catch{return t}}function Xr(e,t){try{localStorage.setItem(e,String(!!t))}catch{}}var h={selectedId:(function(){try{var e=new URL(window.location.href),t=e.searchParams.get("session");if(t)return t}catch{}if(zu())return null;try{return localStorage.getItem("wand-selected-session")||null}catch{return null}})(),pollTimer:null,config:null,sessions:[],terminal:null,terminalFitAddon:null,terminalWriteQueue:Promise.resolve(),terminalWriteGeneration:0,terminalRestoreGeneration:0,terminalRestoring:!1,terminalStatesBySession:{},terminalSessionId:null,terminalOutput:"",terminalLiveStreamSessions:{},terminalHealthTimer:null,terminalAutoFollow:!0,terminalProgrammaticScrollUntil:0,showTerminalJumpToBottom:!1,terminalViewportEl:null,terminalViewportScrollHandler:null,terminalViewportTouchHandler:null,terminalViewportTouchStartHandler:null,terminalComposing:!1,composerComposing:!1,composerCompositionGeneration:0,composerCompositionTarget:null,resizeObserver:null,resizeHandler:null,resizeTimer:null,inputQueue:Promise.resolve(),pendingMessages:[],messageQueue:[],crossSessionQueue:(function(){try{var e=localStorage.getItem("wand-cross-session-queue"),t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}})(),structuredInputQueue:[],queueBarExpanded:!1,queueBarDrag:null,queueBarPromoting:!1,pageUnloading:!1,promptOptimizeRequest:null,actionError:null,loginPending:!1,loginChecked:!1,loginLockUntil:0,loginLockTicker:0,sessionsDrawerOpen:Oy("wand-sidebar-open",!1),sidebarPinned:Oy("wand-sidebar-pinned",!0),sidebarCollapsed:Oy("wand-sidebar-collapsed",!1),chatMode:"managed",chatModels:(function(){try{var e=localStorage.getItem("wand-chat-model")||"",t={};return Mu.forEach(function(n){t[n]=localStorage.getItem("wand-chat-model-"+n)||(n==="claude"?e:"")}),t}catch{var r={};return Mu.forEach(function(n){r[n]=""}),r}})(),chatModel:(function(){try{return localStorage.getItem("wand-chat-model")||""}catch{return""}})(),chatThinking:(function(){try{var e=localStorage.getItem("wand-thinking-effort")||"off";return e==="off"||e==="standard"||e==="deep"||e==="max"||$2(e)?e:"off"}catch{return"off"}})(),availableModels:[],availableCodexModels:[],availableOpenCodeModels:[],availableGrokModels:[],availableQoderModels:[],availablePiModels:[],providerThinkingEfforts:{},modelCatalogRevision:"",modelsRefreshing:!1,sessionTool:"claude",preferredCommand:"claude",lastResize:{cols:0,rows:0},isOnline:navigator.onLine,ws:null,wsConnected:!1,lastWsMessageAt:0,wsHeartbeatCheckTimer:null,_updateBubbleShown:!1,notificationHistory:{},notifSound:(function(){try{var e=localStorage.getItem("wand-notif-sound");return e===null?!0:e==="true"}catch{return!0}})(),notifVolume:(function(){try{var e=localStorage.getItem("wand-notif-volume");return e===null?80:Math.max(0,Math.min(100,parseInt(e,10)||80))}catch{return 80}})(),notifBubble:(function(){try{var e=localStorage.getItem("wand-notif-bubble");return e===null?!0:e==="true"}catch{return!0}})(),toolContentCache:{},lastSeqBySession:{},chatResyncPendingBySession:{},currentView:"terminal",terminalScale:(function(){try{var e=localStorage.getItem("wand-terminal-scale");return e?parseFloat(e):1}catch{return 1}})(),terminalBaseFontSize:13,filePanelOpen:(function(){try{return localStorage.getItem("wand-file-panel-open")==="true"}catch{return!1}})(),topbarMoreOpen:!1,gitStatus:null,gitStatusSessionId:null,gitStatusLastFetchAt:0,turnActiveBySession:{},chatStickToBottom:!0,chatUnreadCount:0,chatUnreadStartIndex:-1,chatScrollThreshold:160,chatIsProgrammaticScroll:!1,chatProgrammaticScrollUntil:0,chatScrollElement:null,chatScrollHandler:null,chatScrollWheelHandler:null,chatScrollTouchStartHandler:null,chatScrollTouchMoveHandler:null,chatTouchStartY:0,chatInitialRenderDone:!1,lastForegroundSyncAt:0,foregroundSyncTimer:null,wsReconnectAttempts:0,wsReconnectTimer:null,currentMessages:[],chatRenderCache:new PK,chatRenderEpoch:0,chatRenderPendingToken:null,lastRenderedMsgCount:0,lastRenderedEmpty:null,renderPending:!1,chatPageSize:CG,chatRenderedCount:CG,chatRenderWindowMessageCount:0,currentTask:null,terminalInteractive:!1,claudeHistory:[],claudeHistoryLoaded:!1,claudeHistoryExpanded:!1,claudeHistoryExpandedDirs:{},sessionsManageMode:!1,selectedSessionIds:{},selectedClaudeHistoryIds:{},codexHistory:[],codexHistoryLoaded:!1,codexHistoryExpandedDirs:{},selectedCodexHistoryIds:{},askUserSelections:{},workingDir:(function(){try{var e=localStorage.getItem("wand-working-dir");return e||""}catch{return""}})()};(function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var e=function(){h.pageUnloading=!0};window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),window.addEventListener("pageshow",function(){h.pageUnloading=!1})}})();var c9="\u4E2D\u6587",ik={\u4E2D\u6587:{"agentRun.count":"{count} \u4E2A\u5B50 Agent","agentRun.subagent":"\u5B50 Agent","agentRun.status.failed":"\u5931\u8D25","agentRun.status.running":"\u8FD0\u884C\u4E2D","agentRun.status.background":"\u8FD0\u884C\u72B6\u6001\u672A\u77E5","agentRun.status.backgroundDone":"\u8FD0\u884C\u72B6\u6001\u672A\u77E5","agentRun.status.interrupted":"\u5DF2\u4E2D\u65AD","agentRun.status.pending":"\u672A\u5B8C\u6210","agentRun.status.completed":"\u5DF2\u5B8C\u6210","agentRun.noOutput":"\uFF08\u65E0\u8F93\u51FA\uFF09","agentRun.noTask":"\u672A\u63D0\u4F9B\u4EFB\u52A1\u8BF4\u660E","agentRun.agent_list":"\u5B50 Agent \u5217\u8868","agentRun.process":"\u8FC7\u7A0B","agentRun.process_count":"{count} \u6B65","agentRun.result.done":"\u6700\u7EC8\u7ED3\u8BBA","agentRun.result.failed":"\u5931\u8D25\u539F\u56E0","agentRun.receipt.action":"\u4EC5\u6709\u6D3E\u53D1\u56DE\u6267","agentRun.receipt.note":"\u4EC5\u6536\u5230\u540E\u53F0\u6D3E\u53D1\u56DE\u6267\uFF0C\u5C1A\u65E0\u53EF\u5173\u8054\u7684\u539F\u751F\u7EC8\u6001\u6216\u7ED3\u679C\uFF1B\u5F53\u524D\u8FD0\u884C\u72B6\u6001\u672A\u77E5\uFF0C\u4E3B\u4F1A\u8BDD\u72B6\u6001\u4E0D\u80FD\u8BC1\u660E\u5B50\u4EFB\u52A1\u4ECD\u5728\u6267\u884C\u6216\u5DF2\u5B8C\u6210\u3002","agentRun.receipt.run":"\u540E\u53F0\u4EFB\u52A1","agentRun.receipt.output":"\u8F93\u51FA\u6587\u4EF6","agentRun.waiting":"\u7B49\u5F85\u5B50 Agent \u8F93\u51FA\u2026","agentRun.summary_aria":"\u5B50 Agent\uFF0C{count} \u4E2A\uFF0C{status}\u3002\u6700\u540E\u52A8\u4F5C\uFF1A{latest}","history.expand":"\u5C55\u5F00\u5386\u53F2\u5BF9\u8BDD","history.collapse":"\u6536\u8D77\u5386\u53F2\u5BF9\u8BDD","stop.confirm.title":"\u505C\u6B62\u4EFB\u52A1","stop.confirm.message":"\u786E\u5B9A\u8981\u505C\u6B62\u5F53\u524D\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u5417\uFF1F","stop.confirm.ok":"\u505C\u6B62","stop.confirm.cancel":"\u53D6\u6D88"},English:{"agentRun.count":"{count} subagents","agentRun.subagent":"Subagent","agentRun.status.failed":"Failed","agentRun.status.running":"Running","agentRun.status.background":"Run status unknown","agentRun.status.backgroundDone":"Run status unknown","agentRun.status.interrupted":"Interrupted","agentRun.status.pending":"No result","agentRun.status.completed":"Done","agentRun.noOutput":"(no output)","agentRun.noTask":"No task description","agentRun.agent_list":"Subagents","agentRun.process":"Process","agentRun.process_count":"{count} steps","agentRun.result.done":"Final result","agentRun.result.failed":"Failure reason","agentRun.receipt.action":"Dispatch receipt only","agentRun.receipt.note":"Only a background dispatch receipt is available, without a correlated native terminal event or result. The run status is unknown; the parent session status cannot establish whether the child is running or finished.","agentRun.receipt.run":"Background task","agentRun.receipt.output":"Output file","agentRun.waiting":"Waiting for subagent output\u2026","agentRun.summary_aria":"Subagents, {count}, {status}. Last action: {latest}","history.expand":"Show earlier conversation","history.collapse":"Hide earlier conversation","stop.confirm.title":"Stop task","stop.confirm.message":"Stop the task that's currently running?","stop.confirm.ok":"Stop","stop.confirm.cancel":"Cancel"}};function RK(){var e=h.config&&typeof h.config.language=="string"?h.config.language.trim():"";if(!e)return c9;if(ik[e])return e;var t=e.toLowerCase();return t==="english"||t==="en"||t.indexOf("english")===0||t.indexOf("\u82F1")===0?"English":t==="\u4E2D\u6587"||t==="zh"||t.indexOf("zh")===0||t.indexOf("\u4E2D")===0||t.indexOf("chinese")===0?"\u4E2D\u6587":"English"}function My(e,t){var r=RK(),n=ik[r]||ik[c9],a=n&&e in n?n[e]:null;if(a==null){var o=ik[c9];a=o&&e in o?o[e]:e}if(t&&typeof a=="string")for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(a=a.split("{"+l+"}").join(t[l]));return a}var qxe={shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>',shieldCheck:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10"/>',cpu:'<rect x="7" y="7" width="10" height="10" rx="2"/><path d="M9 1v3"/><path d="M15 1v3"/><path d="M9 20v3"/><path d="M15 20v3"/><path d="M20 9h3"/><path d="M20 15h3"/><path d="M1 9h3"/><path d="M1 15h3"/><rect x="10" y="10" width="4" height="4" rx="1"/>',brain:'<path d="M9.5 4.5a3 3 0 0 0-4.7 3.1 3.3 3.3 0 0 0 .3 6.1A3 3 0 0 0 8 19h1.5V4.5z"/><path d="M14.5 4.5a3 3 0 0 1 4.7 3.1 3.3 3.3 0 0 1-.3 6.1A3 3 0 0 1 16 19h-1.5V4.5z"/><path d="M9.5 8H7.8"/><path d="M14.5 8h1.7"/><path d="M9.5 13H7.6"/><path d="M14.5 13h1.9"/>',keyboard:'<rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"/>',terminal:'<polyline points="4 7 9 12 4 17"/><line x1="12" y1="17" x2="20" y2="17"/>',chat:'<path d="M21 12a8 8 0 0 1-12.9 6.3L3 20l1.7-5.1A8 8 0 1 1 21 12z"/>',folder:'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>',chevronDown:'<polyline points="6 9 12 15 18 9"/>',chevronRight:'<polyline points="9 6 15 12 9 18"/>',wrench:'<path d="M14.7 6.3a4 4 0 1 1 4 4l-9 9-3.5 1 1-3.5 7.5-7.5z"/>',sliders:'<path d="M4 7h10M18 7h2"/><circle cx="16" cy="7" r="2"/><path d="M4 17h2M10 17h10"/><circle cx="8" cy="17" r="2"/>',sparkle:'<path d="M12 3l1.3 3.8L17 8.1l-3.7 1.3L12 13l-1.3-3.6L7 8.1l3.7-1.3L12 3z"/><path d="M18 13l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7.7-2z"/>',spark:'<path d="M12 2v4M12 18v4M4.9 4.9l2.8 2.8M16.3 16.3l2.8 2.8M2 12h4M18 12h4M4.9 19.1l2.8-2.8M16.3 7.7l2.8-2.8"/><circle cx="12" cy="12" r="3"/>',info:'<circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/>',warning:'<path d="M12 3l10 18H2L12 3z"/><path d="M12 10v5M12 18h.01"/>',question:'<circle cx="12" cy="12" r="9"/><path d="M9.8 9a2.5 2.5 0 1 1 3.5 2.3c-.9.4-1.3 1-1.3 2.2M12 17h.01"/>',check:'<path d="M20 6 9 17l-5-5"/>',circle:'<circle cx="12" cy="12" r="7"/>',close:'<path d="M18 6 6 18"/><path d="M6 6l12 12"/>',paw:'<circle cx="7.5" cy="9" r="2" fill="currentColor" stroke="none"/><circle cx="12" cy="6.8" r="2" fill="currentColor" stroke="none"/><circle cx="16.5" cy="9" r="2" fill="currentColor" stroke="none"/><circle cx="18" cy="13.3" r="1.8" fill="currentColor" stroke="none"/><path d="M7.2 16.3c.5-2.9 2.3-4.8 4.8-4.8s4.3 1.9 4.8 4.8c.3 1.8-.9 3.2-2.6 2.6-.8-.3-1.4-.6-2.2-.6s-1.4.3-2.2.6c-1.7.6-2.9-.8-2.6-2.6z" fill="currentColor" stroke="none"/>',refresh:'<polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/>',signal:'<path d="M2 12a15 15 0 0 1 20 0"/><path d="M5 16a10 10 0 0 1 14 0"/><path d="M9 20a4 4 0 0 1 6 0"/><circle cx="12" cy="20" r="0.5" fill="currentColor"/>',file:'<path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><polyline points="14 3 14 9 20 9"/>',sigma:'<polyline points="18 4 6 4 13 12 6 20 18 20"/>',x:'<path d="M18 6 6 18"/><path d="M6 6l12 12"/>',plus:'<line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>',paperclip:'<path d="M21.44 11.05 12.25 20.24a6 6 0 0 1-8.49-8.49l8.84-8.84a4 4 0 1 1 5.66 5.66L9.41 17.41a2 2 0 1 1-2.83-2.83l8.84-8.83"/>'};function d9(e,t){var r=qxe[e];if(!r)return"";t=t||{};var n=t.size||14,a=t.strokeWidth||1.8,o=t.cls?' class="'+t.cls+'"':"",l=t.fill||"none";return"<svg"+o+' width="'+n+'" height="'+n+'" viewBox="0 0 24 24" fill="'+l+'" stroke="currentColor" stroke-width="'+a+'" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">'+r+"</svg>"}function OK(e){let t=e.messages??[],r=null;for(let n=t.length-1;n>=0;n-=1){let a=t[n];if(a.role!=="user"||a.notice)continue;let o=a.content??[];if(o.some(m=>m.__queued)||(r===null&&a.requestId&&(r=a.requestId),o.length&&o.every(m=>m.type==="tool_result")))continue;let l=a.requestId||a.messageId||a.createdAt;if(!l||n===0&&(e.leadingBlockOffset??0)>0||!o.some(m=>m.type==="text"&&!!m.text.trim()||m.type==="image"))return null;let u=e.structuredState?.inFlight?e.structuredState.activeRequestId:null;if(u&&u!==r)return null;let d=new Set,p=[];for(let m of t.slice(n+1))for(let v of m.content??[])v.__subagent||(v.type==="tool_result"&&d.add(v.tool_use_id),v.type==="tool_use"&&(v.semantic?.kind==="question_request"||v.name==="AskUserQuestion")&&p.push(v.id));return{key:JSON.stringify([e.id,(e.messageOffset??0)+n,l]),startIndex:n+1,requestId:r,waitingQuestion:p.some(m=>!d.has(m))}}return null}function Wxe(e,t,r){let n=OK(t);if(!n)return;let a=e?.sourceKey===n.key&&e.requestId===n.requestId?e:void 0;if(!r)return a;r.type==="init"&&(a=void 0);let o=r.data?.structuredState?.activeRequestId;if(r.data?.structuredState?.inFlight===!0&&typeof o=="string"&&o===n.requestId)return{sourceKey:n.key,requestId:o};let l=r.data?.turnOutcome;return a&&["done","failed","stopped"].includes(l)&&Array.isArray(r.data?.messages)&&t.structuredState?.inFlight!==!0&&(!r.data.terminalRequestId||r.data.terminalRequestId===a.requestId)?{...a,outcome:l}:a}function Vxe(e,t,r,n=!0){let a="unknown",o=e.structuredState?e.structuredState.inFlight===!0:e.ptyBusy===!0,l=r?.sourceKey===t.key&&r.requestId===t.requestId?r.outcome:void 0;n&&!e.archived&&(l&&!o?a=l==="done"?"ended":l:l&&o?a="unknown":e.status==="failed"?a="failed":e.status==="stopped"?a="stopped":e.permissionBlocked||e.pendingEscalation?a="permission":!o&&e.status==="running"&&t.waitingQuestion?a="waiting":o&&e.status==="running"&&(a="running"));let u={running:["\u8FD0\u884C\u4E2D","\u8FDB\u5EA6\u6765\u81EA\u672C\u8F6E\u5DE5\u5177\u8BB0\u5F55\uFF1B\u6E05\u5355\u5B8C\u6210\u4E0D\u4EE3\u8868\u6267\u884C\u5DF2\u7ED3\u675F\u3002"],stopped:["\u5DF2\u505C\u6B62","\u672C\u8F6E\u5DF2\u505C\u6B62\u3002\u4EE5\u4E0B\u662F\u505C\u6B62\u524D\u6700\u540E\u8BB0\u5F55\uFF0C\u4E0D\u63D0\u4F9B\u7EED\u8DD1\u64CD\u4F5C\u3002"],waiting:["\u7B49\u5F85\u8F93\u5165","\u4EE5\u4E0B\u8FDB\u5EA6\u53EA\u8BFB\uFF1B\u8BF7\u5728\u672C\u8F6E\u539F\u63D0\u95EE\u5361\u56DE\u7B54\uFF0C\u4E0D\u5728\u8FD9\u91CC\u6062\u590D\u6267\u884C\u3002"],permission:["\u7B49\u5F85\u6388\u6743","\u4EE5\u4E0B\u8FDB\u5EA6\u53EA\u8BFB\uFF1B\u8BF7\u5728\u539F\u6388\u6743\u5165\u53E3\u5904\u7406\u3002"],failed:["\u6267\u884C\u5931\u8D25","\u4EE5\u4E0B\u662F\u5931\u8D25\u524D\u6700\u540E\u8BB0\u5F55\uFF0C\u4E0D\u81EA\u52A8\u91CD\u8BD5\u6216\u8865\u5168\u6E05\u5355\u3002"],ended:["\u672C\u8F6E\u5DF2\u7ED3\u675F","\u4EE5\u4E0B\u662F\u672C\u8F6E\u6700\u540E\u8BB0\u5F55\uFF1B\u672A\u5B8C\u6210\u9879\u4E0D\u81EA\u52A8\u8865\u5168\uFF0C\u6267\u884C\u7ED3\u675F\u4E0D\u4EE3\u8868\u4E1A\u52A1\u4EFB\u52A1\u9A8C\u6536\u901A\u8FC7\u3002"],unknown:["\u6700\u8FD1\u8BB0\u5F55","\u6267\u884C\u72B6\u6001\u672A\u786E\u8BA4\uFF1B\u672A\u5B8C\u6210\u9879\u4E0D\u4EE3\u8868\u4ECD\u5728\u8FD0\u884C\u3002"]};return{sourceKey:t.key,kind:a,label:u[a][0],note:u[a][1]}}function sI(e){if(!e)return null;let t=e.querySelector(".chat-messages");if(t)return t;let r=document.createElement("div");return r.className="chat-messages",e.appendChild(r),r}var zK=null;function Uxe(e){zK=e}function Gxe(){return zK}var zB=B(_(),1),Kxe=B(Ja(),1),p9=B(Jt(),1),ro=B(Ee(),1),mm=new Map;function Xxe({attrs:e,source:t}){let r=zB.useRef(null),n=l=>({phase:l.dataset.phase||"idle",queued:l.classList.contains("queue-mode"),disabled:l.disabled,label:l.getAttribute("aria-label")||void 0,title:l.title}),[a,o]=zB.useState(()=>n(t));return zB.useLayoutEffect(()=>{let l=r.current;if(!l)return;let u=()=>o(p=>{let m=n(l);return p.phase===m.phase&&p.queued===m.queued&&p.disabled===m.disabled&&p.label===m.label&&p.title===m.title?p:m}),d=new MutationObserver(()=>(0,p9.flushSync)(u));return d.observe(l,{attributes:!0,attributeFilter:["data-phase","class","disabled","aria-label","title"]}),u(),()=>d.disconnect()},[]),(0,ro.jsx)(Ui,{...e,ref:r,htmlType:"button",size:"middle","data-phase":a.phase,"aria-label":a.label,title:a.title,className:[...Array.from(t.classList).filter(l=>l!=="queue-mode"&&!l.startsWith("ant-btn")),a.queued&&"queue-mode"].filter(Boolean).join(" "),type:a.queued?"default":"primary",danger:a.phase==="running"||a.phase==="failed",disabled:a.disabled,loading:a.phase==="sending",icon:a.phase==="sending"?void 0:(0,ro.jsx)("span",{className:"composer-send-icons",children:["up","history","stop","check"].map(l=>(0,ro.jsx)("span",{"data-active":l===(a.phase==="running"?"stop":a.phase==="sent"?"check":a.queued?"history":"up"),children:(0,ro.jsx)(De,{name:l,size:15})},l))}),children:(0,ro.jsx)("span",{children:a.phase==="sending"?"\u53D1\u9001\u4E2D":a.phase==="running"?"\u505C\u6B62":a.phase==="sent"?"\u5DF2\u63A5\u53D7":a.phase==="failed"?"\u91CD\u8BD5":a.queued?"\u52A0\u5165\u961F\u5217":"\u53D1\u9001"})})}function LK(e){let t=mm.get(e);return t?t.key:e.matches("button[data-antd-control]")?JSON.stringify(["library-button",e.id||null,Array.from(e.classList).filter(r=>!/^(is-|selected$|copied$)/.test(r)),e.getAttribute("data-action"),e.getAttribute("data-tool-use-id"),e.getAttribute("data-question-index"),e.getAttribute("data-option-index"),e.getAttribute("data-agent-run-id"),e.getAttribute("data-agent-task-id"),e.getAttribute("onclick")]):null}function Qxe(e,t){return mm.has(e)&&t.matches("button[data-antd-control]")}function lI(e,t,r){let n=e.querySelector("button");n?.classList.contains("copied")&&(t=t.cloneNode(!0),t.classList.add("copied"),t.textContent=n.textContent),r.source=t;let a={};for(let l of Array.from(t.attributes))!["class","type","data-antd-control","style","disabled"].includes(l.name)&&!l.name.startsWith("on")&&(a[l.name]=l.value);let o=Array.from(t.attributes).filter(l=>l.name.startsWith("on"));if(t.id==="send-input-button"){(0,p9.flushSync)(()=>r.root.render((0,ro.jsx)(sa,{children:(0,ro.jsx)(Xxe,{attrs:a,source:t})})));return}(0,p9.flushSync)(()=>r.root.render((0,ro.jsx)(sa,{children:(0,ro.jsx)(Ui,{...a,htmlType:"button",size:t.hasAttribute("data-composer-control")?"middle":"small",block:t.classList.contains("ask-user-option"),type:t.dataset.antdControl==="primary"||t.classList.contains("ask-user-option")&&t.classList.contains("selected")?"primary":t.id==="todo-progress-toggle"?"text":"default",disabled:t.disabled,className:t.className||void 0,ref:l=>{if(l){for(let u of o)l.setAttribute(u.name,u.value);t.hasAttribute("style")&&(l.style.cssText=t.style.cssText)}},children:t.classList.contains("ask-user-option")?(0,ro.jsxs)(Ye,{vertical:!0,gap:"small",align:"start",children:[(0,ro.jsx)(Wt.Text,{strong:!0,children:t.dataset.optionLabel||t.querySelector(".ask-user-option-label")?.textContent}),t.querySelector(".ask-user-option-desc")&&(0,ro.jsx)(Wt.Text,{type:"secondary",children:t.querySelector(".ask-user-option-desc")?.textContent})]}):t.classList.contains("prompt-optimize-btn")?(0,ro.jsx)(Ye,{component:"span",align:"center",gap:4,dangerouslySetInnerHTML:{__html:t.innerHTML}}):(0,ro.jsx)("span",{dangerouslySetInnerHTML:{__html:t.innerHTML}})})})))}function HK(e,t,r){let n=e.parentElement,a=n&&mm.get(n);if(!n||!a?.source){e.textContent=t,e.classList.toggle("copied",r);return}e.classList.remove("copied");let o=a.source.cloneNode(!0);o.textContent=t,o.classList.toggle("copied",r),lI(n,o,a)}function Yxe(e,t){let r=mm.get(e);return!r||!t.matches("button[data-antd-control]")?!1:(lI(e,t,r),!0)}function zy(e){ba("wand-browser-control-motion",`
247
- /* These actions carry business summaries, not a one-line button label. */
248
- .ant-btn.agent-run-summary, .ant-btn.agent-run-agent, .ant-btn.ask-user-option { height:auto; white-space:normal; }
249
- .ant-btn.agent-run-summary > span:not([class]), .ant-btn.agent-run-agent > span:not([class]) { display:flex; align-items:center; gap:8px; width:100%; min-width:0; }
250
- .ant-btn.code-copy { width:80px; flex-shrink:0; }
251
- `);for(let[t,r]of mm)t.isConnected||(r.root.unmount(),mm.delete(t));e.querySelectorAll("button[data-antd-control]").forEach(t=>{t.closest(".input-composer")&&t.setAttribute("data-composer-control","");let r=document.createElement("span");r.style.display="contents";let n={root:(0,Kxe.createRoot)(r),key:LK(t)};t.replaceWith(r),mm.set(r,n),lI(r,t,n)})}var eC=null;function Jxe(e){eC=e}var Zxe=e=>{eC?.presentChat(e)},qK=e=>{eC?.refreshChatPresentation(e)},e2e=(e,t,r)=>eC?.patchChatPresentation(e,t,r)??!1,tc=null,Ly=0,Hy=0,wk=new Map,xk=new WeakMap,qy=null;function hm(){tc=null,wk.clear(),xk=new WeakMap,Ly++}function t2e(){wk.clear(),xk=new WeakMap}function WK(e){let t=tc?.root;return!!t&&e.some(r=>Array.from(r.removedNodes).some(n=>n===t||n instanceof Element&&n.contains(t)))}function VK(){qy&&WK(qy.takeRecords())&&hm()}function uI(e){if(typeof HTMLElement>"u")return null;VK();let t=e||document.querySelector("#chat-output > .chat-messages"),r=h.currentView||"chat";return!t?.isConnected||r!=="chat"?(hm(),null):((!tc||tc.root!==t||tc.sessionId!==h.selectedId||tc.view!==r)&&(hm(),tc={id:++Ly,sessionId:h.selectedId,view:r,root:t},qy||(qy=new MutationObserver(n=>{WK(n)&&hm()}),qy.observe(document,{childList:!0,subtree:!0}))),tc)}function cI(e){return VK(),!!e&&tc===e&&e.root.isConnected&&h.selectedId===e.sessionId&&(h.currentView||"chat")===e.view&&document.querySelector("#chat-output > .chat-messages")===e.root}if(typeof document<"u"){for(let e of["focusin","pointerdown","wheel","touchstart"])document.addEventListener(e,()=>{Hy++},{capture:!0,passive:!0});document.addEventListener("keydown",e=>{e.key==="Tab"&&Hy++},!0),window.addEventListener("blur",()=>{Hy++}),window.addEventListener("pagehide",hm),window.addEventListener("beforeunload",hm)}function SG(e){return!Array.isArray(e?.content)||!e.content.some(t=>t?.__processing||t?.__queued)}function r2e(e){return JSON.stringify([e?.role,e?.author?.id||null,!!e?.notice])}function n2e(e,t,r){let n=uI(r);if(!n)return null;let a=Array.isArray(e.messages)?e.messages:[],o=new Map,l=new Map,u=0;for(let v of a)SG(v)&&(o.set(v,u++),l.set(v,(l.get(v)||0)+1));let d=new Map;function p(v){for(let g of["uuid","id","messageId","turnId"])if(typeof v?.[g]=="string"&&v[g])return JSON.stringify([g,v[g]]);return null}for(let v of t){let g=p(v);g&&d.set(g,(d.get(g)||0)+1)}let m=new Map;return{messages:t.map(v=>{if(!SG(v))return null;let g=p(v),b=o.get(v),x=null;!g&&b!==void 0&&e.sessionKind!=="structured"&&l.get(v)===1&&(x=xk.get(v)||"reference:"+ ++Ly,xk.set(v,x));let y=g&&d.get(g)===1?"id:"+g:!g&&e.sessionKind==="structured"&&b!==void 0?"structured:"+((e.messageOffset||0)+b):x;if(!y)return null;let E=r2e(v),S=wk.get(y),F=S?.guard===E?S:{key:"view:"+n.id+":turn:"+ ++Ly,displayKey:"source:"+y+":"+ ++Ly,guard:E,blockOffset:0},$=b===0&&Number.isInteger(e.leadingBlockOffset)?e.leadingBlockOffset:0,C={...F,blockOffset:$};return m.set(y,C),C}),commit(){cI(n)&&(wk=m)}}}function a2e(e,t){if(!e||typeof HTMLElement>"u")return e;let r=document.createElement("template");return r.innerHTML=e,Array.from(r.content.children).forEach((n,a)=>{n.setAttribute("data-chat-key",JSON.stringify(["block",t,a]))}),r.innerHTML}function BE(e){let t=LK(e);if(t)return t;if(e.matches(".chat-file-attachment"))return"attachment:"+e.getAttribute("data-path");let r=e.getAttribute("data-chat-key");if(r)return r;let n=e.getAttribute("data-entry-key");if(n)return"entry:"+n;if(e.classList.contains("agent-run-agent")||e.classList.contains("agent-run-detail-panel"))return e.tagName+":agent:"+e.getAttribute("data-agent-run-id")+":"+e.getAttribute("data-agent-task-id");let a=e.getAttribute("data-expand-key");if(a)return"expand:"+a;let o=e.getAttribute("data-tool-use-id");return o?e.tagName+":tool:"+o:e.matches("a[href]")?"link:"+e.getAttribute("href"):e.matches(".ask-user-option")?e.tagName+":option:"+e.getAttribute("data-question-index")+":"+e.getAttribute("data-option-index"):e.matches("button, summary, [role='button']")?"control:"+f9(e)+":"+(e.getAttribute("onclick")||""):null}function FG(e){return e instanceof Element&&e.matches(".assistant-reply-disclosure, .assistant-reply-host, .msg-copy-btn")}function f9(e){return e instanceof Element?e.tagName+":"+Array.from(e.classList).filter(t=>!/^(?:is-|collapsed$|expanded$|selected$|copied$|visible$|inline-tool-open$|assistant-reply-(?:collapsed|expanded)$)/.test(t)).join(" "):String(e.nodeType)}function i2e(e,t){let r=e instanceof HTMLDetailsElement?e.open:null,n=e.matches(".code-copy, .msg-copy-btn")&&e.classList.contains("copied"),a=e.matches(".msg-copy-btn")&&e.classList.contains("visible"),o=e.matches(".chat-message")?["assistant-reply-collapsed","assistant-reply-expanded"].filter(l=>e.classList.contains(l)):[];n&&o.push("copied"),a&&o.push("visible");for(let l of Array.from(e.attributes))!t.hasAttribute(l.name)&&l.name!=="open"&&l.name!=="data-x-presentation"&&e.removeAttribute(l.name);for(let l of Array.from(t.attributes)){if(l.name==="open"&&r!==null)continue;let u=l.name==="class"&&o.length?Array.from(new Set(l.value.split(/\s+/).concat(o))).join(" "):l.value;e.getAttribute(l.name)!==u&&e.setAttribute(l.name,u)}r!==null&&(e.open=r),n&&e.classList.add("copied"),a&&e.classList.add("visible")}function dI(e,t){if(e.isEqualNode(t))return;if(!(e instanceof Element)||!(t instanceof Element)){e.nodeValue!==t.nodeValue&&(e.nodeValue=t.nodeValue);return}if(Yxe(e,t)||(i2e(e,t),e.matches(".code-copy.copied, .msg-copy-btn.copied")))return;let r=e.scrollLeft,n=e.scrollTop,a=o2e(e);e2e(e,t,dI)||UK(e,t),e instanceof HTMLElement&&e.matches(".chat-activity-timeline")&&Zxe(e),e.scrollLeft!==r&&(e.scrollLeft=r);let o=a?.node.isConnected&&e.contains(a.node)?n+a.node.getBoundingClientRect().top-e.getBoundingClientRect().top-a.top:n;e.scrollTop!==o&&(e.scrollTop=o)}function o2e(e){if(!e.matches(".chat-activity-timeline")||e.closest("[inert]"))return null;let t=e.getBoundingClientRect(),r=o=>{let l=o.getBoundingClientRect();return l.bottom>t.top&&l.top<t.bottom},n=document.activeElement,a=n instanceof HTMLElement&&e.contains(n)&&r(n)?n:Array.from(e.querySelectorAll(".chat-call")).find(r);return a?{node:a,top:a.getBoundingClientRect().top-t.top}:null}function UK(e,t){let r=Array.from(e.childNodes).filter(p=>!FG(p)),n=Array.from(t.childNodes),a=new Map,o=new Set;for(let p of r){let m=p instanceof Element?BE(p):null;m&&(a.has(m)?o.add(m):a.set(m,p))}let l=new Set;for(let p of n){let m=p instanceof Element?BE(p):null;m&&(l.has(m)&&o.add(m),l.add(m))}let u=new Set,d=e.firstChild;for(;d&&FG(d);)d=d.nextSibling;n.forEach((p,m)=>{let v=p instanceof Element?BE(p):null,g=v&&!o.has(v)?a.get(v):void 0;if(!v){let b=y=>!(y instanceof Element&&BE(y))&&f9(y)===f9(p),x=r.filter(b);x.length===1&&n.filter(b).length===1?g=x[0]:r.length===n.length&&r[m]&&b(r[m])&&(g=r[m])}if(g&&(u.has(g)||g.nodeType!==p.nodeType||g instanceof Element&&p instanceof Element&&g.tagName!==p.tagName&&!Qxe(g,p))&&(g=void 0),g){if(u.add(g),dI(g,p),g!==d)if(g instanceof Element&&g.contains(document.activeElement))for(;d&&d!==g;){let b=d.nextSibling;e.appendChild(d),d=b}else e.insertBefore(g,d);d=g.nextSibling}else e.insertBefore(p,d),u.add(p)});for(let p of r)!u.has(p)&&p.parentNode===e&&e.removeChild(p)}function GK(e,t){return dI(e,t),e}function s2e(e,t){let r=document.createElement(e.tagName);r.innerHTML=t,UK(e,r)}function l2e(e,t){let r=document.createElement("template");r.innerHTML=t;let n=Array.from(e.children),a=new Map;for(let d of n){let p=d.getAttribute("data-chat-owner");p&&a.set(p,d)}let o=Array.from(r.content.children),l=new Set,u=e.firstElementChild;for(let d of o){let p=d.getAttribute("data-chat-owner"),m=p?a.get(p):null;if(m&&!l.has(m)){if(GK(m,d),l.add(m),m!==u)if(m.contains(document.activeElement))for(;u&&u!==m;){let v=u.nextElementSibling;e.appendChild(u),u=v}else e.insertBefore(m,u);u=m.nextElementSibling}else e.insertBefore(d,u),l.add(d)}for(let d of n)!l.has(d)&&d.parentElement===e&&d.remove()}function $G(e){return e instanceof HTMLElement&&e.isConnected&&!e.closest("[hidden], [inert], .assistant-reply-collapsed .chat-message-content")&&!e.matches(":disabled, [aria-disabled='true']")&&e.getClientRects().length>0&&e.matches("button, a[href], summary, [tabindex]")}function u2e(e){let t=uI(e);if(!t)return null;let r=document.activeElement,n=r instanceof HTMLElement&&e.contains(r)?r:null,a=n?.closest(".chat-message"),o=!a||a.getAttribute("data-chat-owner")?.startsWith("view:"+t.id+":")?n:null,l=Hy,u=o?[o.closest(".chat-tool-card, .inline-terminal, .inline-diff"),o.closest(".chat-call"),o.closest(".chat-activity"),o.closest(".agent-run-process"),o.closest(".agent-run"),a]:[],d=[];for(let b of u){let x=b?.querySelector(".chat-tool-header[tabindex], .term-header, .diff-header, .chat-call-button, .chat-process-summary, .agent-run-process-summary, .agent-run-summary, .assistant-reply-disclosure");x&&x!==o&&d.push(x)}let p=e.getBoundingClientRect(),m=o?.getBoundingClientRect(),v=o&&m&&m.bottom>p.top&&m.top<p.bottom?{node:o,top:m.top-p.top}:null,g=()=>cI(t)&&l===Hy;return{anchor:v,current:g,finish(){if(!o||!g()||$G(o)||!document.hasFocus())return;let b=document.activeElement;if(b!==o&&b!==document.body)return;let x=d.find($G);x?x.focus({preventScroll:!0}):(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}}}var KK=B(Ja(),1),XK=B(Jt(),1);function c2e(){O1().catch(()=>{});let e=new URLSearchParams($n()),t=e.get("view");(t==="taskboard"||t==="issues")&&(MA(),globalThis.__wandImportBrowserModule("91408c351070d6d7").catch(()=>{})),(e.get("sidebar")==="tasks"||!e.has("sidebar")&&Ir.getSnapshot().mode==="tasks")&&(cn.preloadTaskGroups(),globalThis.__wandImportBrowserModule("5f635cbcab701433").catch(()=>{}))}function Ek(){TA(),cn.clearPreload()}Si(Ek);async function d2e(e,t={}){let r=C2(e),n;try{n=await fetch(r?"/api/login/ticket":"/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r?{ticket:e}:{password:e}),credentials:"same-origin"})}catch{return{ok:!1,kind:r?"unknown":"offline",message:r?"\u7968\u636E\u767B\u5F55\u7ED3\u679C\u672A\u77E5\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002":t.networkMessage??"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002"}}if(n.status===429){let o=await n.json().catch(()=>null),l=o&&typeof o.retryAfter=="number"?Math.max(1,Math.ceil(o.retryAfter)):0;return{ok:!1,kind:"rejected",message:o&&typeof o.error=="string"?o.error:"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002",retryAfterMs:l?l*1e3:void 0}}if(!n.ok){if(r){let o=await n.json().catch(()=>null);return{ok:!1,kind:"rejected",message:o&&typeof o.error=="string"?o.error:"\u7968\u636E\u767B\u5F55\u672A\u786E\u8BA4\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u81EA\u52A8\u91CD\u8BD5\u3002"}}return{ok:!1,kind:"rejected",message:"\u5BC6\u7801\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5\u3002",credentialInvalid:!0}}let a;try{a=await fetch("/api/config",{credentials:"same-origin"})}catch{return{ok:!1,kind:"unknown",message:r?"\u7968\u636E\u767B\u5F55\u7ED3\u679C\u672A\u77E5\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002":"\u767B\u5F55\u7ED3\u679C\u672A\u786E\u8BA4\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002"}}return a.ok?{ok:!0,config:await a.json().catch(()=>null)}:{ok:!1,kind:"cookie-not-stored",message:t.cookieMessage??"\u767B\u5F55\u72B6\u6001\u672A\u80FD\u4FDD\u5B58\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}function p2e(e,t){e&&C2(t)&&G7(e)}function QK(e,t,r,n){return e==="pty"&&!!r&&t==="running"&&!n}function m9(e,t=new Map){if(e===null||typeof e!="object")return e;let r=t.get(e);if(r!==void 0)return r;if(Array.isArray(e)){let a=[];t.set(e,a);for(let o of e)a.push(m9(o,t));return a}let n={};t.set(e,n);for(let[a,o]of Object.entries(e))n[a]=m9(o,t);return n}function YK(e,t=new Set){if(e===null||typeof e!="object"||t.has(e))return e;t.add(e);for(let r of Object.values(e))YK(r,t);return Object.freeze(e)}function DG(e,t,r){let n=m9({auth:e.auth,viewport:e.viewport,capabilities:e.capabilities,layout:e.layout,selected:e.selected,sidebar:e.sidebar,topbar:e.topbar,legacyVisibility:e.legacyVisibility,revision:t});return r?YK(n):n}function f2e(e){let t=e??0;if(!Number.isFinite(t)||t<0||t>200)throw new RangeError("batchMs must be between 0 and 200 milliseconds");return t}function m2e(e){let t=globalThis.reportError;if(typeof t=="function"){t(e);return}console.error("[wand-ui-store] subscriber failed",e)}function h2e(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var g2e=class{constructor(e){ie(this,"readSnapshot"),ie(this,"applyAction"),ie(this,"batchMs"),ie(this,"freezeSnapshots"),ie(this,"listeners",new Set),ie(this,"snapshot"),ie(this,"disposed",!1),ie(this,"pending",!1),ie(this,"scheduleGeneration",0),ie(this,"timer",null),this.readSnapshot=e.readSnapshot,this.applyAction=e.applyAction,this.batchMs=f2e(e.batchMs),this.freezeSnapshots=e.freezeSnapshots!==!1,this.snapshot=DG(this.readSnapshot(),0,this.freezeSnapshots)}getSnapshot(){return this.snapshot}subscribe(e){if(this.disposed)return()=>{};this.listeners.add(e);let t=!0;return()=>{t&&(t=!1,this.listeners.delete(e))}}dispatch(e){if(this.disposed)throw new Error("UiStore has been disposed");let t=this.applyAction(e);if(this.publish({sync:!0,reason:`action:${e.type}`}),!!h2e(t))return Promise.resolve(t).then(r=>(this.publish({sync:!0,reason:`action-settled:${e.type}`}),r),r=>{throw this.publish({sync:!0,reason:`action-settled:${e.type}`}),r})}publish(e={}){if(this.disposed)return;if(e.sync){this.cancelPendingPublish(),this.flush();return}if(this.pending)return;this.pending=!0;let t=++this.scheduleGeneration;if(this.batchMs===0){queueMicrotask(()=>this.flushScheduled(t));return}this.timer=setTimeout(()=>this.flushScheduled(t),this.batchMs)}dispose(){this.disposed||(this.disposed=!0,this.cancelPendingPublish(),this.listeners.clear())}isDisposed(){return this.disposed}flushScheduled(e){this.disposed||!this.pending||e!==this.scheduleGeneration||(this.pending=!1,this.timer=null,this.flush())}cancelPendingPublish(){this.pending=!1,this.scheduleGeneration+=1,this.timer!==null&&clearTimeout(this.timer),this.timer=null}flush(){if(!this.disposed){this.snapshot=DG(this.readSnapshot(),this.snapshot.revision+1,this.freezeSnapshots);for(let e of[...this.listeners])try{e()}catch(t){m2e(t)}}}},v2e=class{constructor(e){ie(this,"store"),ie(this,"unsubscribeLegacy"),this.store=new g2e({readSnapshot:e.readSnapshot,applyAction:e.applyAction,batchMs:e.batchMs,freezeSnapshots:e.freezeSnapshots});let t=e.subscribeLegacy(r=>this.publish({reason:r}));this.unsubscribeLegacy=typeof t=="function"?t:()=>{}}getSnapshot(){return this.store.getSnapshot()}subscribe(e){return this.store.subscribe(e)}dispatch(e){return this.store.dispatch(e)}publish(e){this.store.publish(e)}dispose(){this.store.dispose();let e=this.unsubscribeLegacy;this.unsubscribeLegacy=()=>{},e()}};function JK(e){return e.width>=640?e.coarsePointer&&e.height<480:!0}var b2e={idle:"\u7A7A\u95F2",stopped:"\u5DF2\u505C\u6B62",running:"\u8FD0\u884C\u4E2D",thinking:"\u601D\u8003\u4E2D","waiting-input":"\u7B49\u5F85\u8F93\u5165",waiting_input:"\u7B49\u5F85\u8F93\u5165",reconnecting:"\u91CD\u8FDE\u4E2D",exited:"\u5DF2\u9000\u51FA",failed:"\u5DF2\u5931\u8D25"};function AG(e,t=0){if(!e)return t;let r=new Date(e).getTime();return Number.isFinite(r)?r:t}function y2e(e){return e?Object.values(e).filter(Boolean).length:0}function w2e(e){return e.config?"authenticated":e.loginChecked?"anonymous":"booting"}function ZK(e){let t=Ke(e.sessionSource).toLowerCase();return t==="automation"||t==="startup"}function x2e(e){if(e.permissionBlocked)return"\u7B49\u5F85\u6388\u6743";let t=e.sessionKind==="structured"?"structured":"pty";if(t==="structured"&&e.structuredState?.inFlight)return e.structuredState.phase==="background"?"\u540E\u53F0\u4EFB\u52A1\u4E2D":"\u601D\u8003\u4E2D";if(Yi(e))return"\u521A\u5B8C\u6210";let r=Ke(e.status,"idle");return QK(t,r,e.provider??"",!!e.ptyBusy)||t==="pty"&&!e.provider&&r==="running"&&!e.ptyCommandRunning?"\u7A7A\u95F2":b2e[r]??r}function E2e(e){if(e.permissionBlocked)return"permission-blocked";let t=e.sessionKind==="structured"?"structured":"pty";if(t==="structured"&&e.structuredState?.inFlight)return"running";if(Yi(e))return"just-completed";let r=Ke(e.status);return QK(t,r,e.provider??"",!!e.ptyBusy)||t==="pty"&&!e.provider&&r==="running"&&!e.ptyCommandRunning?"idle":r}function eX(e){return Ke(e.workingDir)||Ke(e.config?.defaultCwd)||Ke(e.config?.cwd)||"/tmp"}function k2e(e){return Ke(e.title)||Ke(e.description)||Ke(e.summary)||Ke(e.command)||"Wand \u4F1A\u8BDD"}function BG(e,t,r){let n=Ke(e.id),a=Ke(e.provider),o=Xo(a)??(a||Tu(e.command)||"terminal"),l=Ke(e.status,"idle"),u=e.sessionKind==="structured"?"structured":"pty",d=!!(e.worktree?.enabled??e.worktreeEnabled),p=ZK(e)?"automation":"wand",m=R0(e),v=a==="pi"&&u==="structured"?e.structuredState?.engine==="core"?"sdk":"cli":void 0;return{id:n,source:p,provider:o,...v?{engine:v}:{},kind:u,title:k2e(e),description:Ke(e.description),cwd:Ke(e.cwd,eX(t)),status:l,statusLabel:x2e(e),active:n!==""&&n===t.selectedId,selected:!!r[n],resumable:u!=="structured"&&l!=="running"&&!!e.claudeSessionId,permissionBlocked:m.permissionBlocked,inFlight:m.inFlight,turnActive:m.inFlight||m.ptyRunning,titleGenerating:!!e.titleGenerating,...e.employeeId?{employeeId:e.employeeId}:{},...e.employeeName?{employeeName:e.employeeName}:{},...e.employeeAvatar?{employeeAvatar:e.employeeAvatar}:{},...e.startedAt?{startedAt:e.startedAt}:{},...e.endedAt?{endedAt:e.endedAt}:{},...(()=>{let g=Ke(e.structuredState?.turnStartedAt)||Ke(e.turnStartedAt),b=Ke(e.structuredState?.lastActivityAt)||Ke(e.lastActivityAt);return{...g?{turnStartedAt:g}:{},...b?{lastActivityAt:b}:{}}})(),...e.claudeSessionId?{claudeSessionId:e.claudeSessionId}:{},...e.workspaceId?{workspaceId:e.workspaceId}:{},...e.workspaceTaskId?{workspaceTaskId:e.workspaceTaskId}:{},...e.archived?{archived:!0}:{},...d?{worktree:{enabled:!0,branch:Ke(e.worktree?.branch??e.worktreeBranch)||void 0,path:Ke(e.worktree?.path??e.worktreePath)||void 0,mergeStatus:Ke(e.worktree?.mergeStatus??e.worktreeMergeStatus)||void 0}}:{}}}function IG(e,t){let r=new Map;return t.forEach((n,a)=>{n.id&&r.set(n.id,a)}),e.sort((n,a)=>{let o=AG(n.startedAt),l=AG(a.startedAt);return o!==l?l-o:(r.get(a.id)??0)-(r.get(n.id)??0)})}function tX(e,t){let r=(e.sessions??[]).filter(C=>C.sessionSource!=="quick-terminal"),n=Object.fromEntries(r.flatMap(C=>C.id?[[C.id,!!e.selectedSessionIds?.[C.id]]]:[])),a=r.map(C=>BG(C,e,n)),o=e.sessions?.find(C=>C.id===e.selectedId)??null,l=o?BG(o,e,n):null,u=IG(a.filter(C=>C.source==="wand"),r),d=IG(a.filter(C=>C.source==="automation"),r),p=t.width<=768,m=JK({width:t.width,height:t.height??Number.POSITIVE_INFINITY,coarsePointer:t.coarsePointer??!1}),v=!!e.sessionsDrawerOpen,g=!!e.sidebarPinned,b=!m&&g&&!!e.sidebarCollapsed,x=!!e.filePanelOpen,y=l?.kind==="structured"||e.currentView==="chat"?"chat":"terminal",E=!!e.sessionsManageMode,S=y2e(n),F=l?.cwd??eX(e),$=l&&e.gitStatusSessionId===l.id&&e.gitStatus?.isGit?{branch:Ke(e.gitStatus.branch,"?"),modifiedCount:Number(e.gitStatus.modifiedCount)||0,clean:(Number(e.gitStatus.modifiedCount)||0)===0}:null;return{auth:{phase:w2e(e)},viewport:{mobile:p,online:typeof e.isOnline=="boolean"?e.isOnline:t.online,embedTerminal:t.embedTerminal,nativeInput:t.nativeInput},capabilities:{backToNative:t.backToNative,switchServer:t.switchServer},layout:{sessionsDrawerOpen:v,sidebarPinned:g,sidebarCollapsed:b,sidebarDrawer:m,sidebarAnchored:!m&&(g||v),sessionsBackdropVisible:v&&(m||!g),filePanelOpen:x,filePanelBackdropVisible:x&&p,topbarMoreOpen:!!e.topbarMoreOpen,currentView:y},selected:l,sidebar:{interactiveCount:r.filter(C=>!ZK(C)).length,totalCount:u.length+d.length,manageMode:E,selectedCount:S,groups:[{kind:"wand",label:"Wand \u4F1A\u8BDD",expanded:!0,entries:u},{kind:"automation",label:"\u81EA\u52A8\u5316",expanded:E||!!t.automationExpanded,entries:d}]},topbar:{title:l?.title??"Wand \u63A7\u5236\u53F0",description:l?.description??"",statusLabel:l?.statusLabel??"",statusTone:o?E2e(o):"",cwd:F,currentTask:Ke(e.currentTask?.title)||Ke(o?.currentTaskTitle),titleGenerating:!!o?.titleGenerating,git:$},legacyVisibility:{terminal:!!l&&y==="terminal",chat:!!l&&y==="chat",blank:!l,composer:!!l&&!Ns(o)}}}var C2e=class{constructor(e,t){ie(this,"name"),ie(this,"port"),ie(this,"rememberedSlot",null),ie(this,"mounted",!1),ie(this,"disposed",!1),ie(this,"generation",0),this.name=e,this.port=t}mount(e){if(this.disposed)throw new Error(`${this.name} has been disposed`);if(this.rememberedSlot&&this.rememberedSlot!==e)throw new Error(`${this.name} cannot switch to a different slot`);if(this.mounted)return this.currentLease();if(!this.rememberedSlot&&e.childNodes.length!==0)throw new Error(`${this.name} requires an empty React slot`);return this.port.mount(e),this.rememberedSlot=e,this.mounted=!0,this.generation+=1,this.currentLease()}unmount(e){if(e&&this.rememberedSlot&&e!==this.rememberedSlot)throw new Error(`${this.name} cannot unmount a different slot`);if(!this.mounted||!this.rememberedSlot)return;let t=this.rememberedSlot;this.mounted=!1,this.generation+=1,this.port.unmount?.(t)}currentLease(){if(!this.mounted||!this.rememberedSlot||this.disposed)throw new Error(`${this.name} is not mounted`);return Object.freeze({slot:this.rememberedSlot,generation:this.generation})}isCurrent(e){return!this.disposed&&this.mounted&&this.rememberedSlot===e.slot&&this.generation===e.generation}isMounted(){return!this.disposed&&this.mounted}dispose(){if(!this.disposed)try{this.unmount()}finally{this.disposed=!0}}};function S2e(e,t){switch(t.type){case"nav.home":return e.goHome();case"nav.refresh":return e.refreshPage();case"terminal.display":return e.terminalDisplay?.(t.command);case"session.new":return e.openNewSession();case"session.newAt":return e.openNewSession(t.cwd);case"missions.open":return e.openMissions?.();case"workspace.new":return e.openNewProject?.();case"workspace.newAt":return e.openNewProject?.(t.cwd);case"session.quickStart.claude":return e.quickStartClaudeTerminal();case"session.quickStart.codex":return e.quickStartCodexTerminal();case"session.quickStart.opencode":return e.quickStartOpenCodeTerminal();case"session.quickStart.structured":return e.quickStartStructuredSession();case"session.select":return t.focusInput===!1?e.selectSession(t.id,{focusInput:!1}):e.selectSession(t.id);case"session.resume":return e.resumeSession(t.id);case"session.resumeHistory":return e.resumeHistory(t.provider,t.id,t.cwd);case"session.delete":return e.deleteItem(t.target,t.id);case"session.merge":return e.mergeSession(t.id);case"session.cleanup":return e.cleanupSession(t.id);case"session.manage.toggle":return e.toggleManageMode();case"session.manage.select":return e.toggleManagedSelection(t.target,t.id);case"session.manage.selectAll":return e.selectAllManaged();case"session.manage.clear":return e.clearManagedSelection();case"session.manage.deleteSelected":return e.deleteManagedSelection();case"layout.drawer.toggle":return e.toggleSessionsDrawer();case"layout.drawer.open":return e.openSessionsDrawer?e.openSessionsDrawer():e.toggleSessionsDrawer();case"layout.drawer.close":return e.closeSessionsDrawer();case"layout.drawer.pin":return e.toggleSidebarPin();case"layout.drawer.collapse":return e.toggleSidebarCollapsed();case"layout.drawer.expandGroup":return e.expandSidebarGroup(t.group);case"layout.drawer.group.set":return e.setSidebarGroupExpanded(t.group,t.expanded);case"layout.files.toggle":return e.toggleFilePanel();case"layout.files.close":return e.closeFilePanel();case"folderPicker.open":return e.openFolderPicker();case"topbar.menu.toggle":return e.toggleTopbarMenu();case"topbar.copy":return e.copyTopbarField(t.field);case"topbar.gitCommit":return e.openGitCommit();case"settings.open":return e.openSettings();case"native.back":return e.backToNative();case"native.switchServer":return e.switchServer();case"auth.logout":return e.logout();default:return F2e(t)}}function F2e(e){throw new Error(`Unsupported UI action: ${JSON.stringify(e)}`)}var $2e=B(_(),1),D2e=B(_(),1),LB=B(Ee(),1),rX="",h9=new Set;function hw(e){rX=e,h9.forEach(t=>t())}var A2e=e=>(h9.add(e),()=>{h9.delete(e)}),MG=()=>rX,B2e=["knowledge","taskboard","issues","teams","teamchat","schedules","calendar","workspace","chats","contacts"];function I2e(){let e=E1(),t=D2e.useSyncExternalStore(A2e,MG,MG),r=aD(e),n=new URLSearchParams(e),a=n.has("view")&&!B2e.includes(n.get("view")),o=n.get("settings"),l=o&&!["directory","profile","notifications","display","ai","local-models","general","connectors","security","presets","about"].includes(o),u=a||l;return!t&&!r.length&&!u?null:(0,LB.jsx)("div",{style:{flexShrink:0,padding:8,zIndex:30},children:(0,LB.jsx)(ri,{type:"warning",showIcon:!0,role:"alert",title:t||(u?"\u94FE\u63A5\u4E2D\u7684\u9875\u9762\u6216\u8BBE\u7F6E\u9879\u65E0\u6548":"\u94FE\u63A5\u542B\u6709\u4E0D\u652F\u6301\u7684\u53C2\u6570\uFF0C\u5DF2\u5FFD\u7565"),action:(0,LB.jsx)(je,{size:"small",onClick:()=>{hw(""),wa(Object.fromEntries([...r.map(d=>[d,null]),...["view","settings","session","workspace","workspaceTask","window","tab","conversation","conversationTask","conversationRun"].map(d=>[d,null]),["view","workspace"]]))},children:"\u8FD4\u56DE\u5DE5\u4F5C\u533A"})})})}var Ks=B(_());function M2e(e,t,r){return typeof r=="boolean"?r:e.length?!0:xr(t).some(n=>n.type===$E)}var tC=({suffixCls:e,tagName:t,displayName:r})=>n=>Ks.forwardRef((a,o)=>Ks.createElement(n,{ref:o,suffixCls:e,tagName:t,...a})),pI=Ks.forwardRef((e,t)=>{let{prefixCls:r,suffixCls:n,className:a,tagName:o,...l}=e,{getPrefixCls:u}=Ks.useContext(st),d=u("layout",r),[p,m]=FE(d),v=n?`${d}-${n}`:d;return Ks.createElement(o,{className:Z(r||v,a,p,m),ref:t,...l})}),T2e=Ks.forwardRef((e,t)=>{let{direction:r}=Ks.useContext(st),[n,a]=Ks.useState([]),{prefixCls:o,className:l,rootClassName:u,children:d,hasSider:p,tagName:m,style:v,...g}=e,b=Ut(g,["suffixCls"]),{getPrefixCls:x,className:y,style:E}=xt("layout"),S=x("layout",o),F=M2e(n,d,p),[$,C]=FE(S),D=Z(S,{[`${S}-has-sider`]:F,[`${S}-rtl`]:r==="rtl"},y,l,u,$,C),I=Ks.useMemo(()=>({siderHook:{addSider:M=>{a(A=>[].concat(Zr(A),[M]))},removeSider:M=>{a(A=>A.filter(j=>j!==M))}}}),[]);return Ks.createElement(SE.Provider,{value:I},Ks.createElement(m,{ref:t,className:D,style:{...E,...v},...b},d))}),j2e=tC({tagName:"div",displayName:"Layout"})(T2e),_2e=tC({suffixCls:"header",tagName:"header",displayName:"Header"})(pI),N2e=tC({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(pI),P2e=tC({suffixCls:"content",tagName:"main",displayName:"Content"})(pI),R2e=j2e,Pg=R2e;Pg.Header=_2e;Pg.Footer=N2e;Pg.Content=P2e;Pg.Sider=$E;Pg._InternalSiderContext=wg;var kk=Pg,xg=B(_(),1),g9=B(Ee(),1),fI=Pn(()=>globalThis.__wandImportBrowserModule("8bc3bf586a2b73fe").then(e=>e.ComposerAttachmentsHost),DE,e=>e.mounts.length>0,{title:"\u9644\u4EF6",close:()=>{},renderPending:()=>(0,g9.jsx)(g9.Fragment,{})}),mI=Pn(()=>globalThis.__wandImportBrowserModule("4a6ed04ec80dea3c").then(e=>e.PiExecutionHost),Dd,e=>e!==null,{title:"\u6267\u884C\u8BE6\u60C5",close:()=>Dd.close()}),rC=Pn(()=>globalThis.__wandImportBrowserModule("70e00ced5ceba32d").then(e=>e.SettingsHost),qa,(e,t)=>e.open||t.presentation==="page",{title:"\u8BBE\u7F6E",page:!0,close:()=>Fo.close(),dismissable:e=>e.presentation!=="page"}),O2e=Pn(()=>globalThis.__wandImportBrowserModule("e280bc3e8ac49e67").then(e=>e.CodeEditorHost),Td,e=>e.open,{title:"\u6587\u4EF6\u7F16\u8F91\u5668",page:!0,close:()=>{W1.execute({type:"close"})}}),z2e=Pn(()=>globalThis.__wandImportBrowserModule("91408c351070d6d7").then(e=>e.TaskBoardHost),_l,e=>e.open&&e.page!=="teams"&&e.page!=="teamchat",{title:"\u4EFB\u52A1\u770B\u677F",page:!0,close:()=>En.close()}),L2e=Pn(()=>globalThis.__wandImportBrowserModule("4bd2adb3495d6dd4").then(e=>e.NewSessionHost),Al,e=>e.open,{title:"\u65B0\u5EFA\u4F1A\u8BDD",page:!0,close:()=>La.close(),renderPending:e=>(0,g9.jsx)("section",{"aria-label":"\u65B0\u5EFA\u4F1A\u8BDD\u52A0\u8F7D",style:{position:"absolute",inset:0,zIndex:8,background:"var(--bg-primary)",padding:"var(--wand-page-inset)"},children:e})}),hI=Pn(()=>globalThis.__wandImportBrowserModule("349206312bb65200").then(e=>e.FolderPickerHost),UA,e=>e.open,{title:"\u9009\u62E9\u76EE\u5F55",close:()=>zd.close()}),gI=Pn(()=>globalThis.__wandImportBrowserModule("608565cf9381774c").then(e=>e.QuickCommitHost),W$,e=>e.open,{title:"\u5FEB\u901F\u63D0\u4EA4",close:()=>bd.close()}),vI=Pn(()=>globalThis.__wandImportBrowserModule("4574de49797344ae").then(e=>e.WorktreeMergeHost),U$,e=>e.open,{title:"\u5408\u5E76\u5DE5\u4F5C\u6811",close:()=>yd.close()}),bI=Pn(()=>globalThis.__wandImportBrowserModule("20b70b89cf3b3846").then(e=>e.FilePreviewHost),rm,e=>e.open,{title:"\u6587\u4EF6\u9884\u89C8",close:()=>{Vs.execute({type:"close"})}}),yI=Pn(()=>globalThis.__wandImportBrowserModule("5a62d8f81561e955").then(e=>e.LocalPreviewHost),zs,e=>e.open,{title:"\u672C\u5730\u9884\u89C8",close:()=>zs.close()}),wI=Pn(()=>globalThis.__wandImportBrowserModule("ddc5d213cdc1ffeb").then(e=>e.ImageViewerHost),zl,e=>e.open,{title:"\u56FE\u7247",close:()=>zl.close()}),xI=Pn(()=>globalThis.__wandImportBrowserModule("79f6d648c25a1c7b").then(e=>e.MissionsHost),K$,e=>e.open,{title:"\u4EFB\u52A1",close:()=>bf.close()}),EI=Pn(()=>globalThis.__wandImportBrowserModule("b14b581260fe30bf").then(e=>e.WorkspacesHost),Ha,e=>e.open,{title:"\u5DE5\u4F5C\u533A",close:()=>Mf.close()}),kI=Pn(()=>globalThis.__wandImportBrowserModule("90c5a1669e510ab4").then(e=>e.GithubIssuesHost),Y$,e=>e.open,{title:"GitHub Issues",close:()=>x1.close()}),IE=B(_(),1),TG=B(_(),1),Wa=B(Ee(),1);function H2e({label:e,count:t,totalCount:r=t,description:n,activity:a,containsCurrent:o=!1,avatarNode:l,action:u,expanded:d=!0,onToggle:p,onSetOpen:m,onActivate:v,toggleRef:g,collapsedPreview:b,children:x}){let y=TG.useId(),E=TG.useId(),S=b!==void 0,F=C=>{m?m(C):C!==d&&p?.()},$=(0,Wa.jsx)(T1,{id:y,open:d,children:(0,Wa.jsx)("div",{className:"im-sidebar-group-inner",style:{paddingInlineStart:4},children:x})});return(0,Wa.jsxs)("div",{className:`im-sidebar-group${d?" is-expanded":""}`,onKeyDown:C=>{if(C.key!=="Escape"||C.defaultPrevented||!d||!m&&!p||!C.currentTarget.contains(C.target))return;C.preventDefault(),C.stopPropagation();let D=C.currentTarget.querySelector(S?".sidebar-session-area-toggle":".wand-sidebar-group-toggle");D?.focus({preventScroll:!0}),D&&W0(D,()=>F(!1))},children:[(0,Wa.jsxs)(Ye,{align:"center",gap:4,className:"im-sidebar-group-header",children:[(0,Wa.jsx)(M1,{title:`${e} \xB7 ${n??`${r} \u4E2A\u4F1A\u8BDD`}`,selector:".im-sidebar-group-title",children:(0,Wa.jsxs)(je,{ref:S?void 0:g,kind:"ghost",type:"button",className:"wand-sidebar-group-toggle",style:{flex:1,minWidth:0,height:"auto",justifyContent:"flex-start",whiteSpace:"normal"},"aria-expanded":v?void 0:d,"aria-controls":v?void 0:y,"aria-describedby":E,"aria-label":v?`\u6253\u5F00${e}\u7684\u5BF9\u8BDD`:`${e} \xB7 \u663E\u793A ${t} \u4E2A\u4F1A\u8BDD\uFF0C\u5171 ${r} \u4E2A\u4F1A\u8BDD${o?" \xB7 \u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""}`,title:`${e} \xB7 ${n??`${t} \u4E2A\u4F1A\u8BDD`}${o?" \xB7 \u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""}`,onClick:C=>v?v():W0(C.currentTarget,()=>F(!d)),onKeyDown:v?void 0:C=>j6(C,d,F),children:[S?null:(0,Wa.jsx)(T6,{open:d}),(0,Wa.jsx)("span",{className:"im-sidebar-group-avatar","aria-hidden":"true",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:36,height:36,flexShrink:0},children:l}),(0,Wa.jsx)(Wt.Text,{ellipsis:!0,className:"im-sidebar-group-title",style:{flex:1,textAlign:"start"},children:e}),(0,Wa.jsxs)("span",{className:"im-sidebar-group-meta",children:[(0,Wa.jsx)(Wt.Text,{type:"secondary",className:"im-sidebar-group-count",title:`\u663E\u793A ${t} / \u5171 ${r} \u4E2A\u4F1A\u8BDD`,children:t===r?t:`${t}/${r}`}),(0,Wa.jsx)("span",{className:`im-sidebar-group-attention-slot tone-${a?.tone??"muted"}`,title:a?.label,"aria-label":a?.label||void 0,children:a?.label?(0,Wa.jsx)(Ci,{status:a.tone==="warning"?"warning":a.tone==="success"?"success":"processing"}):null})]})]})}),S&&t>0?(0,Wa.jsx)(N6,{id:y,open:d,label:e,toggleRef:g,onOpenChange:F}):null,u?(0,Wa.jsx)("span",{className:"im-sidebar-group-action",children:u}):null]}),(0,Wa.jsxs)("span",{id:E,className:"sidebar-visually-hidden",hidden:!0,children:[n,o?"\uFF0C\u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""]}),S?(0,Wa.jsxs)(P6,{hasSessions:t>0,children:[b,$]}):$]})}var Bn=B(_(),1),zn=B(_(),1),q2e=B(_(),1),nm=B(Ee(),1);function nX({id:e,avatarNode:t,title:r,titleGenerating:n=!1,state:a,glow:o,summary:l,active:u=!1,onClick:d}){let p=o??(a.label==="\u8FD0\u884C\u4E2D"?"running":a.label==="\u601D\u8003\u4E2D"?"thinking":a.label==="\u521A\u5B8C\u6210"?"just-completed":a.tone==="warning"?"permission":a.label==="\u5931\u8D25"?"failed":"none"),m=q2e.useId();return(0,nm.jsx)(M1,{title:`${r} \xB7 ${l}`,selector:".im-sidebar-item-name",children:(0,nm.jsxs)(je,{kind:u?"soft":"ghost",type:"button",className:`session-item wand-sidebar-session-row${u?" active":""}`,style:{width:"100%",height:"auto",whiteSpace:"normal",justifyContent:"flex-start",padding:8},"data-session-id":e,"aria-current":u?"page":void 0,"aria-describedby":m,title:`${r} \xB7 ${l}`,onClick:d,children:[(0,nm.jsx)("span",{className:Je("im-sidebar-item-avatar-wrap",p!=="none"&&`wand-logo-glow glow-${p}`),style:{width:28,height:28,display:"inline-flex",flexShrink:0},"data-glow":p,"aria-hidden":"true",children:(0,nm.jsx)(Ci,{dot:p!=="none",color:_6(p),children:t})}),(0,nm.jsxs)(Ye,{vertical:!0,className:"im-sidebar-item-body",style:{minWidth:0,textAlign:"start",flex:1},children:[(0,nm.jsx)(Wt.Text,{ellipsis:!0,className:Je("im-sidebar-item-name",n&&"title-generating"),"aria-busy":n||void 0,"aria-label":n?`${r}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,title:n?"AI \u6B63\u5728\u751F\u6210\u6807\u9898":void 0,children:r}),(0,nm.jsx)(Wt.Text,{ellipsis:!0,type:"secondary",id:m,title:l,className:"im-sidebar-item-summary",style:{fontSize:12},children:l})]})]})})}function W2e(e){return e.flatMap(t=>[...t.tasks.flatMap(r=>[...r.sessions,...r.archivedSessions??[]]),...t.standaloneSessions,...t.archivedSessions??[]])}function V2e(e,t,r,n){let a=new Set([e.sessionId,e.communicationSessionId,...e.historySessionIds??[],...e.tasks.flatMap(o=>o.runs.map(l=>l.chatSessionId))].filter(Boolean));return t.some(o=>(e.kind==="dm"?o.employeeId===e.peerEmployeeId&&!o.teamChat:a.has(o.id))&&Bf(o))?!0:e.tasks.some(o=>{if(o.task.status==="archived")return!1;let l=o.runs[0];return l?["running","waiting_user","awaiting_approval","failed"].includes(l.status):o.startup?.state==="pending"||o.startup?.state==="failed"})}function U2e(e){return e.startedAt??""}function jG(e){let t=Date.parse(U2e(e));return Number.isFinite(t)?t:0}function aX(e,t){return jG(t.session)-jG(e.session)||e.session.id.localeCompare(t.session.id)}function G2e(e,t=[]){let r=new Map,n=new Set,a=(o,l,u,d=!1)=>{if(!l.employeeId||l.teamChat||n.has(l.id))return;n.add(l.id);let p=r.get(l.employeeId)??[];p.push({group:o,session:l,taskName:u,archived:d||l.archived===!0}),r.set(l.employeeId,p)};for(let o of e){for(let l of o.tasks){for(let u of l.sessions)a(o,u,l.name,l.archived===!0);for(let u of l.archivedSessions??[])a(o,u,l.name,!0)}for(let l of o.standaloneSessions)a(o,l,null);for(let l of o.archivedSessions??[])a(o,l,null,!0)}for(let o of t)Ns(o)&&a({workspaceId:`system-calls:${o.employeeId}`,workspaceName:"\u7CFB\u7EDF\u8C03\u7528\u8BB0\u5F55",workspaceCwd:o.cwd??"",synthetic:!0,tasks:[],standaloneSessions:[]},o,null);for(let o of r.values())o.sort(aX);return r}function K2e(e){let t=[],r=new Set,n=(a,o,l,u=!1)=>{o.employeeId||o.teamChat||o.sessionSource==="quick-terminal"||r.has(o.id)||(r.add(o.id),t.push({group:a,session:o,taskName:l,archived:u||o.archived===!0}))};for(let a of e){for(let o of a.tasks){for(let l of o.sessions)n(a,l,o.name,o.archived===!0);for(let l of o.archivedSessions??[])n(a,l,o.name,!0)}for(let o of a.standaloneSessions)n(a,o,null);for(let o of a.archivedSessions??[])n(a,o,null,!0)}return t.sort(aX)}function X2e(e,t,r,n={},a=!1){return e.filter(o=>(t==="archived"?!o.archived:t==="active"&&o.archived)||a&&!Bf(o.session)?!1:Il(r,o.session.title??"",n[o.session.id]??"",o.taskName??"",o.group.workspaceName,o.session.cwd??"",o.session.provider??""))}function _G(e,t,r){let n=new Set(t.filter(o=>o.kind==="dm"&&o.peerEmployeeId).map(o=>o.peerEmployeeId)),a=[];for(let[o,l]of e){if(n.has(o)||l.length===0)continue;let u=l.find(p=>!p.archived)??l[0],d=r.find(p=>p.id===o)?.name?.trim()||u.session.employeeName?.trim()||"\u5458\u5DE5";a.push({id:M$(o),owner:I$,kind:"dm",peerEmployeeId:o,name:d,nameSource:"auto",sourceTemplateId:null,team:null,memberVersion:1,joinedVersions:{},sessionId:null,communicationSessionId:null,createdAt:"",updatedAt:"",title:d,unavailableReason:null,memberUnavailableReasons:{},tasks:[],preview:u.session.title?.trim()||"\u6709\u5DE5\u4F5C\u4F1A\u8BDD\uFF0C\u5C1A\u672A\u5F00\u59CB\u79C1\u804A",messageAt:u.session.startedAt??""})}return a}function Q2e(e,t){return e.length?t==="archived"?e.some(r=>r.archived):t==="active"?e.some(r=>!r.archived):!0:!1}function iX(e,t){let r=e.session;return[r.title??"",t[r.id]??"",e.taskName??"",e.group.workspaceName,r.cwd??"",r.employeeName??"",r.teamStep?.title??"",yl(Fl(r),r.engine)]}function oX(e,t,r,n,a={},o=!1,l=null){return e.kind!=="dm"||!e.peerEmployeeId?[]:(t.get(e.peerEmployeeId)??[]).filter(u=>(r==="archived"?!u.archived:r==="active"&&u.archived)||o&&!Bf(u.session)?!1:Il(n,e.title,e.name,...iX(u,a)))}function NG(e,t,r,n={}){return oX(e,t,r,"",n).flatMap(a=>iX(a,n))}var _e=B(Ee(),1),Y2e=T0(()=>globalThis.__wandImportBrowserModule("03a539f59a10f2c6").then(e=>e.GroupEditor),{title:"\u7FA4\u804A",renderPending:()=>(0,_e.jsx)(_e.Fragment,{})});function J2e({activePage:e,teamAttention:t,onNavigate:r}){let n=[{value:"chats",label:"\u5BF9\u8BDD",icon:"chat"},{value:"tasks",label:"\u5DE5\u4F5C\u533A",icon:"folder"},{value:"knowledge",label:"\u77E5\u8BC6\u5E93",icon:"file",id:"knowledge-library-button"},{value:"board",label:"\u4EFB\u52A1\u770B\u677F",icon:"board",id:"task-board-button"},{value:"teams",label:"\u56E2\u961F",icon:"users",id:"ai-teams-button"},{value:"calendar",label:"\u5B9A\u65F6",icon:"calendar",id:"global-calendar-button"}],a=e==="schedules"?"calendar":e;return(0,_e.jsx)(Ye,{component:"nav",vertical:!0,gap:4,className:"conversation-navigation","aria-label":"\u529F\u80FD\u5BFC\u822A",children:n.filter(o=>o.value!=="teams").map(o=>(0,_e.jsxs)(Fr,{id:"id"in o?o.id:void 0,"data-stretch-value":o.value,"aria-label":o.label,title:o.label,kind:a===o.value?"soft":"ghost","aria-current":a===o.value?"page":void 0,"aria-pressed":a===o.value,onClick:()=>r(o.value),children:[(0,_e.jsx)("span",{className:"sidebar-nav-icon","aria-hidden":"true",children:o.value==="teams"?(0,_e.jsx)(Ci,{count:t,size:"small",children:(0,_e.jsx)(De,{name:o.icon,size:18})}):(0,_e.jsx)(De,{name:o.icon,size:18})}),(0,_e.jsx)("span",{className:"sidebar-nav-label","aria-hidden":"true",children:o.value==="board"?"\u4EFB\u52A1":o.label})]},o.value))})}function Z2e({enabled:e,onNavigate:t,onCreateSession:r}){let n=ag(),[a,o]=zn.useState("closed"),l=zn.useRef(null),u=zn.useRef(null);return zn.useEffect(()=>{o("closed")},[e,n.mode]),n.mode!=="tasks"?null:(0,_e.jsxs)(Ye,{ref:l,align:"center",className:"conversation-sidebar-tools",style:{position:"relative"},children:[(0,_e.jsxs)(Fr,{ref:u,className:"conversation-create-button","aria-label":n.mode==="tasks"?"\u65B0\u5EFA\u4F1A\u8BDD":a==="closed"?"\u53D1\u8D77\u7FA4\u804A":"\u5173\u95ED\u7FA4\u804A\u8868\u5355","aria-expanded":a!=="closed","aria-controls":"conversation-create-panel",onClick:()=>n.mode==="tasks"?r?.():o(a==="closed"?"group":"closed"),children:[(0,_e.jsx)(kf,{active:a!=="closed",from:"plus",to:"close"}),(0,_e.jsx)("span",{className:"conversation-create-label",children:n.mode==="tasks"?"\u65B0\u5EFA\u4F1A\u8BDD":a==="closed"?"\u53D1\u8D77\u7FA4\u804A":"\u5173\u95ED"})]}),(0,_e.jsx)(fD,{open:e&&a!=="closed",owner:"conversation-create-panel",focusKey:a,anchorRef:l,triggerRef:u,onClose:()=>o("closed"),children:(0,_e.jsx)("div",{hidden:a!=="group",children:(0,_e.jsx)(Y2e,{open:e&&a==="group",enabled:e&&a==="group",owner:"conversation-create-panel",onCancel:()=>o("closed"),onCreated:d=>{o("closed"),Ir.select(d,!0),t()}})})})]})}function PG(e,t=new Date){let r=new Date(e);return!e||!Number.isFinite(r.getTime())?"":r.toDateString()===t.toDateString()?r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):r.toLocaleDateString([],{...r.getFullYear()!==t.getFullYear()?{year:"numeric"}:{},month:"2-digit",day:"2-digit"})}function CI(e){return!!e.dissolvedAt||(e.tasks??[]).some(t=>t.task.status==="archived")}function e6e(e){return e==="archived"?"\u5DF2\u5F52\u6863":e==="active"?"\u672A\u5F52\u6863":"\u6700\u8FD1\u804A\u5929"}function v9(e,t,r,n,a){let o=r.trim().toLowerCase();return e.filter(l=>{let u=CI(l);return(t==="archived"?!u:t==="active"&&u)||a&&!a(l)?!1:o?[l.title,l.preview,...l.tasks.map(d=>d.task.title),...n?.(l)??[]].join(" ").toLowerCase().includes(o):!0})}function t6e(e,t,r,n,a){let o=e.filter(CI).length,l=e.length-o;return{total:e.length,active:l,archived:o,scope:v9(e,t,"",n,a).length,matches:v9(e,t,r,n,a).length}}function r6e({compact:e,enabled:t=!0,onNavigate:r,onOpenSession:n,selectedSessionId:a=null,sessionTitles:o={}}){let{items:l,systemSessions:u,error:d,loaded:p,refresh:m}=gA(!0,t),v=zn.useMemo(()=>l.filter(tA),[l]),{groups:g}=NA(),b=zn.useMemo(()=>G2e(g,u),[g,u]),x=zn.useMemo(()=>[...W2e(g),...u],[g,u]),{employees:y}=d$({enabled:t}),E=ag(),S=(E.filters["list-query"]??"").trim().toLowerCase(),F=E.listFilter,[$,C]=zn.useState(""),D=zn.useRef(null),[I,M]=zn.useState(!1),A=zn.useRef([]);I||(A.current=[...v,..._G(b,v,y)].map(N=>N.id));let j=new Map(A.current.map((N,R)=>[N,R])),P=v.slice().sort((N,R)=>{let K=j.get(N.id)??-1,Q=j.get(R.id)??-1;return+!!R.pinnedAt-+!!N.pinnedAt||(R.pinnedAt??"").localeCompare(N.pinnedAt??"")||(K<0?v.length:K)-(Q<0?v.length:Q)}),O=zn.useMemo(()=>_G(b,v,y).filter(N=>{let R=N.peerEmployeeId?b.get(N.peerEmployeeId)??[]:[];return!Q2e(R,F)||E.activityOnly&&!R.some(K=>!K.archived&&Bf(K.session))?!1:S?[N.title,N.preview,...NG(N,b,F,o)].join(" ").toLowerCase().includes(S):!0}),[b,v,y,F,E.activityOnly,S,o]),V=N=>NG(N,b,F,o),W=E.activityOnly?N=>V2e(N,x,E.active===!0?E.selectedId:null,a):void 0,H=[...v9(P,F,S,V,W),...O].sort((N,R)=>+!!R.pinnedAt-+!!N.pinnedAt||(R.pinnedAt??"").localeCompare(N.pinnedAt??"")||(j.get(N.id)??A.current.length)-(j.get(R.id)??A.current.length)),q=X2e(K2e(g),F,S,o,E.activityOnly),z=new Set(O.map(N=>N.id)),L=t6e(v,F,S,V,W),U=p?`${E.activityOnly?"\u6D3B\u52A8 \xB7 ":""}${e6e(F)}\u5171 ${L.scope} \u4E2A\u5BF9\u8BDD${S?`\uFF0C\u641C\u7D22\u5339\u914D ${L.matches} \u4E2A`:""}\uFF1B\u5168\u90E8 ${L.total}\uFF0C\u672A\u5F52\u6863 ${L.active}\uFF0C\u5DF2\u5F52\u6863 ${L.archived}`:d?"\u5BF9\u8BDD\u6570\u91CF\u5C1A\u672A\u52A0\u8F7D":"\u6B63\u5728\u8BFB\u53D6\u5BF9\u8BDD\u6570\u91CF",Y=N=>{Ir.select(N),r()},X=async(N,R)=>{C("");try{await Hf.updateListState(N.id,R)}catch(K){C(K instanceof Error?K.message:"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}},J=async N=>{let R=await xn.dialog({title:`\u5220\u9664\u5BF9\u8BDD\u300C${N.title}\u300D\uFF1F`,description:N.external?"\u4EC5\u5220\u9664 Wand \u4E2D\u7684\u7FA4\u955C\u50CF\u3001\u672C\u5730\u6D88\u606F\u548C\u5173\u8054\u6267\u884C\uFF1B\u4E0D\u4F1A\u9000\u51FA\u6216\u89E3\u6563\u9489\u9489\u7FA4\uFF0C\u4E5F\u4E0D\u4F1A\u5220\u9664\u5176\u4ED6\u7FA4\u5171\u7528\u7684\u673A\u5668\u4EBA\u3002\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002":N.kind==="group"?`\u5C06\u5220\u9664\u8FD9\u4E2A\u7FA4\u804A\u3001${N.tasks.length} \u4E2A\u5173\u8054\u4EFB\u52A1\uFF0C\u4EE5\u53CA\u5B83\u4EEC\u7684\u6D88\u606F\u3001\u6267\u884C\u8BB0\u5F55\u548C\u8D44\u6E90\u6587\u4EF6\u3002\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002`:"\u5C06\u6C38\u4E45\u5220\u9664\u6B64\u79C1\u804A\u7684\u6D88\u606F\u8BB0\u5F55\u548C\u4F1A\u8BDD\u6587\u4EF6\u3002\u5458\u5DE5\u8D44\u6599\u53CA\u5DF2\u7ECF\u6D3E\u51FA\u7684\u7FA4\u804A\u4EFB\u52A1\u4FDD\u7559\u3002\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u5220\u9664\u5BF9\u8BDD",value:!0,kind:"danger"}]});if(R.dismissed!==!0&&R.action)try{await Hf.remove(N.id),Ir.getSnapshot().selectedId===N.id&&Ir.select("")}catch(K){C(K instanceof Error?K.message:"\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}};return(0,_e.jsxs)("div",{className:"conversation-sidebar-list",onPointerEnter:()=>M(!0),onPointerLeave:()=>M(!1),onFocusCapture:()=>M(!0),onBlurCapture:N=>{N.currentTarget.contains(N.relatedTarget)||M(!1)},children:[e?null:(0,_e.jsxs)("div",{className:"conversation-list-tools",children:[(0,_e.jsx)("div",{className:"conversation-search-host",children:(0,_e.jsx)(by,{inputRef:D,className:"conversation-search-input",label:"\u641C\u7D22\u5BF9\u8BDD\u6216\u4EFB\u52A1",value:E.filters["list-query"]??"",onValueChange:N=>Ir.filter("list-query",N)})}),(0,_e.jsxs)(Ye,{vertical:!0,align:"stretch",gap:4,className:"conversation-list-section",children:[(0,_e.jsxs)(Ye,{align:"center",gap:6,className:"conversation-filter-row",children:[(0,_e.jsx)(Z1,{className:"conversation-list-filter",ariaLabel:"\u5BF9\u8BDD\u5F52\u6863\u7B5B\u9009",tabs:[{value:"all",label:"\u5168\u90E8"},{value:"active",label:"\u672A\u5F52\u6863"},{value:"archived",label:"\u5DF2\u5F52\u6863"}],value:F,onValueChange:Ir.listFilter}),(0,_e.jsx)(JD,{active:E.activityOnly,label:"\u53EA\u770B\u6D3B\u52A8\u5BF9\u8BDD",onChange:Ir.activityOnly})]}),(0,_e.jsx)(Wt.Text,{type:"secondary",className:"conversation-list-count",title:U,"aria-label":U,children:p?S?`\u5339\u914D ${L.matches} / ${L.scope}`:`${L.scope} \u4E2A\u5BF9\u8BDD`:d?"\u6570\u91CF\u672A\u52A0\u8F7D":"\u8BFB\u53D6\u4E2D\u2026"})]})]}),d?(0,_e.jsxs)(Wt.Text,{type:"danger",role:"status",children:[d,(0,_e.jsx)(je,{size:"small",onClick:m,children:"\u91CD\u65B0\u8BFB\u53D6"})]}):null,$?(0,_e.jsx)(Wt.Paragraph,{type:"danger",role:"alert",children:$}):null,(0,_e.jsxs)(q6,{value:`${F}:${E.activityOnly}`,children:[H.map(N=>(0,_e.jsx)(n6e,{item:N,employee:y.find(R=>R.id===N.peerEmployeeId)??null,compact:e,query:S,enabled:t,filter:F,writable:!z.has(N.id),selected:E.selectedId===N.id&&E.active!==!1,onSelect:()=>Y(N.id),sessionEntries:oX(N,b,F,S,o,E.activityOnly,a),sessionTitles:o,selectedSessionId:a,onOpenSession:n,onUpdate:R=>X(N,R),onRemove:()=>J(N)},N.id)),!e&&q.length?(0,_e.jsx)(a6e,{entries:q,query:S,enabled:t,selectedSessionId:a,sessionTitles:o,onOpenSession:n}):null,p&&!H.length&&!q.length?(0,_e.jsxs)("div",{className:"conversation-list-empty",role:"status",children:[(0,_e.jsx)(De,{name:S?"search":"chat",size:20}),(0,_e.jsx)(Wt.Paragraph,{type:"secondary",children:S?"\u6CA1\u6709\u5339\u914D\u7684\u5BF9\u8BDD\u6216\u4EFB\u52A1":E.activityOnly?"\u73B0\u5728\u6CA1\u6709\u7B26\u5408\u7B5B\u9009\u6761\u4EF6\u7684\u6D3B\u52A8\u5BF9\u8BDD\u3002":F==="archived"?"\u8FD8\u6CA1\u6709\u5DF2\u5F52\u6863\u7684\u5BF9\u8BDD\uFF0C\u5F52\u6863\u4EFB\u52A1\u540E\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002":F==="active"?"\u8FD8\u6CA1\u6709\u672A\u5F52\u6863\u7684\u5BF9\u8BDD\u3002":"\u8FD8\u6CA1\u6709\u5BF9\u8BDD\uFF0C\u53EF\u4EE5\u4ECE\u901A\u8BAF\u5F55\u627E\u4E00\u4F4D\u5458\u5DE5\u3002"}),S?(0,_e.jsx)(je,{kind:"ghost",size:"small",onClick:()=>{Ir.filter("list-query",""),D.current?.focus({preventScroll:!0})},children:"\u6E05\u7A7A\u641C\u7D22"}):null]}):null]})]})}function n6e({item:e,employee:t,compact:r,query:n,enabled:a,filter:o,writable:l=!0,selected:u,onSelect:d,onUpdate:p,onRemove:m,sessionEntries:v,sessionTitles:g,selectedSessionId:b,onOpenSession:x}){let y=t??(e.peerEmployeeId?c$(e.peerEmployeeId):null)??(e.peerEmployeeId?{id:e.peerEmployeeId,name:e.title}:null),E=A0().name||"\u6211",[S,F]=zn.useState(!1),[$,C]=zn.useState(!1),[D,I]=zn.useState(!1),M=zn.useRef(null),A=zn.useRef(null),j=zn.useId(),[P,O]=zn.useState(!1);zn.useEffect(()=>{F(!1),O(!1)},[a,r,n,o]);let V=async J=>{if(!D){I(!0),F(!1),(M.current?.querySelector(".conversation-row-open")??M.current?.querySelector("button"))?.focus({preventScroll:!0});try{await J()}finally{I(!1)}}},W=n?e.tasks.filter(J=>J.task.title.toLowerCase().includes(n)):e.tasks,H=!r&&!e.dissolvedAt&&(e.kind!=="dm"||$)&&($||!!n&&W.length>0),q=!r&&e.kind==="dm"&&P,z=v.map(J=>J.session),L=()=>{C(!1),O(!P)},U=async()=>{await Ls.reload(),Md()},Y=CI(e),X=(0,_e.jsxs)("div",{ref:M,className:`conversation-row conversation-row-${e.kind}`,"aria-current":u?"page":void 0,"data-pinned":!!e.pinnedAt,"data-archived":Y||void 0,"data-conversation-id":e.id,"aria-busy":D||void 0,children:[(0,_e.jsx)(Fr,{className:"conversation-row-avatar conversation-avatar-button","aria-label":y&&!r?`\u67E5\u770B${e.title}\u7684\u8D44\u6599`:`\u6253\u5F00${e.title}`,onClick:J=>y&&!r?h1.open(y,J.currentTarget):d(),children:y?(0,_e.jsx)(hd,{employee:y,size:"sm"}):e.external?(0,_e.jsx)(ki,{size:36,icon:(0,_e.jsx)(De,{name:"users",size:18})}):e.kind==="group"?(0,_e.jsx)(E$,{title:e.title,members:e.team?.members??[],size:36}):(0,_e.jsx)(ki,{size:36,icon:(0,_e.jsx)(De,{name:"chat",size:16})})}),r?null:(0,_e.jsx)(M1,{title:e.title,selector:".conversation-row-title",children:(0,_e.jsx)(je,{kind:"ghost",className:"conversation-row-open",title:e.title,onClick:d,children:(0,_e.jsxs)("span",{className:"conversation-row-copy",children:[(0,_e.jsxs)("span",{className:"conversation-row-topline",children:[(0,_e.jsx)("span",{className:"conversation-row-title",children:e.title}),PG(e.messageAt)?(0,_e.jsx)("time",{className:"conversation-row-time",dateTime:e.messageAt,children:PG(e.messageAt)}):null]}),(0,_e.jsxs)("span",{className:"conversation-row-bottomline",children:[e.external?(0,_e.jsx)("span",{className:"conversation-archived-tag",children:"\u9489\u9489"}):null,Y?(0,_e.jsx)("span",{className:"conversation-archived-tag",children:"\u5DF2\u5F52\u6863"}):null,(0,_e.jsx)("span",{className:"conversation-row-preview",children:e.dissolvedAt?"\u7FA4\u804A\u5DF2\u89E3\u6563 \xB7 \u70B9\u51FB\u67E5\u770B\u6216\u6062\u590D":e.preview||(e.kind==="group"?`${E} + ${e.team?.members.length??0} \u4F4D\u5458\u5DE5`:"\u79C1\u804A")}),e.pinnedAt?(0,_e.jsx)("span",{className:"conversation-pin",title:"\u5DF2\u7F6E\u9876","aria-label":"\u5DF2\u7F6E\u9876",children:(0,_e.jsx)(De,{name:"pin",size:13})}):null]})]})})}),r?null:(0,_e.jsxs)("div",{className:"conversation-row-actions",children:[e.kind==="dm"&&z.length>0?(0,_e.jsx)(N6,{id:j,open:q,label:e.title,toggleRef:A,className:"conversation-session-toggle",disabled:!a||D,onOpenChange:J=>{C(!1),O(J)}}):null,(0,_e.jsx)(Fr,{className:"conversation-row-more","aria-label":`${e.title}\u7684\u83DC\u5355`,"aria-haspopup":"menu","aria-expanded":S,onClick:J=>{if(J.stopPropagation(),S){F(!1);return}let N=J.currentTarget.getBoundingClientRect();J.currentTarget.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:N.right,clientY:N.bottom,button:2}))},children:(0,_e.jsx)(De,{name:"more",size:16})})]})]});return(0,_e.jsxs)("div",{className:"conversation-list-item",onKeyDown:J=>{J.key!=="Escape"||J.defaultPrevented||!q||S||!J.currentTarget.contains(J.target)||(J.preventDefault(),J.stopPropagation(),A.current?.focus({preventScroll:!0}),O(!1))},children:[(0,_e.jsx)(A6,{row:X,rowRef:M,open:S,disabled:!a,onOpenChange:J=>{(!J||!D)&&F(J)},label:"\u5BF9\u8BDD\u83DC\u5355",title:e.title,className:"conversation-row-menu",menu:{items:[{key:"open",disabled:D,icon:(0,_e.jsx)(De,{name:"chat"}),label:"\u6253\u5F00\u5BF9\u8BDD"},...y?[{key:"profile",disabled:D,icon:(0,_e.jsx)(De,{name:"info"}),label:"\u67E5\u770B\u5458\u5DE5\u8D44\u6599"}]:[],...l?[{key:"pin",disabled:D,icon:(0,_e.jsx)(De,{name:"pin"}),label:e.pinnedAt?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"}]:[],...e.kind==="dm"?[{key:"sessions",disabled:D,icon:(0,_e.jsx)(De,{name:"chat"}),label:q?"\u6536\u8D77\u4F1A\u8BDD":`\u67E5\u770B ${z.length} \u4E2A\u4F1A\u8BDD`}]:[],...!e.dissolvedAt&&e.tasks.length>0?[{key:"tasks",disabled:D,icon:(0,_e.jsx)(De,{name:"task"}),label:$?"\u6536\u8D77\u4EFB\u52A1":`\u67E5\u770B ${e.tasks.length} \u4E2A\u4EFB\u52A1`}]:[],...l?[{key:"danger-divider",type:"divider"},...e.kind==="group"&&!e.external?[{key:"dissolve",disabled:D,icon:(0,_e.jsx)(De,{name:e.dissolvedAt?"resume":"archive"}),label:e.dissolvedAt?"\u6062\u590D\u7FA4\u804A":"\u89E3\u6563\u7FA4\u804A\u2026"}]:[],{key:"delete",disabled:D,danger:!0,icon:(0,_e.jsx)(De,{name:"trash"}),label:e.external?"\u5220\u9664\u672C\u5730\u7FA4\u955C\u50CF\u2026":e.kind==="group"?"\u5220\u9664\u7FA4\u804A\u2026":"\u5220\u9664\u5BF9\u8BDD\u2026"}]:[]],onClick:({key:J})=>{D||(F(!1),J==="open"?d():J==="profile"&&y?h1.open(y,M.current?.querySelector("button")??null):J==="tasks"?(O(!1),C(!$)):J==="sessions"?L():J==="pin"?V(()=>p({pinned:!e.pinnedAt})):J==="delete"?V(m):J==="dissolve"&&V(async()=>{if(e.dissolvedAt){await p({dissolved:!1});return}let N=await xn.dialog({title:`\u89E3\u6563\u7FA4\u804A\u300C${e.title}\u300D\uFF1F`,description:"\u7FA4\u804A\u5C06\u5F52\u6863\u5E76\u4FDD\u7559\u5728\u4F1A\u8BDD\u5217\u8868\u3002\u5386\u53F2\u8BB0\u5F55\u548C\u5173\u8054\u4EFB\u52A1\u4FDD\u7559\uFF0C\u6062\u590D\u540E\u53EF\u7EE7\u7EED\u804A\u5929\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u89E3\u6563\u7FA4\u804A",value:!0,kind:"danger"}]});N.dismissed!==!0&&N.action&&await p({dissolved:!0})}))}}}),!r&&e.kind==="dm"?(0,_e.jsxs)(P6,{hasSessions:z.length>0,reserve:!0,children:[(0,_e.jsx)(ZD,{sessions:z,expanded:q||H,label:`${e.title}\u7684\u4F1A\u8BDD\u9884\u89C8`,className:"sidebar-session-preview-person",disabled:!a||D,liveTitles:g,selectedSessionId:b,expansionRef:A,onExpand:()=>{C(!1),O(!0)},onActivate:J=>{C(!1),O(!1),x?.(J.id)}}),(0,_e.jsx)(T1,{id:j,open:q,children:(0,_e.jsx)(L0.Provider,{value:a&&!r&&q,children:(0,_e.jsxs)("div",{className:"conversation-person-sessions",role:"group","aria-label":`${e.title}\u7684\u4F1A\u8BDD\u5217\u8868`,children:[v.map((J,N)=>{let R=J.session,K=P0(R,N,g[R.id]);return(0,_e.jsx)(B6,{session:{...R,archived:J.archived},label:K,disabled:!a||D,intoNewTask:R.workspaceTaskId?void 0:J.group,onOpen:()=>x?.(R.id),onArchive:async Q=>{await M6(R.id,Q),await U()},onDelete:async()=>{await I6([R.id],R6(J.group,R)??null),await U()},row:(0,_e.jsx)("div",{className:"conversation-person-session",children:(0,_e.jsx)(nX,{id:R.id,title:K,titleGenerating:R.titleGenerating,avatarNode:(0,_e.jsx)(Df,{session:R,size:14}),state:Pf(R),glow:j1(R),summary:[Pf(R).label,z6(J.group),yl(Fl(R),R.engine)].filter(Boolean).join(" \xB7 "),active:R.id===b,onClick:()=>x?.(R.id)})})},R.id)}),z.length?null:(0,_e.jsx)(Wt.Paragraph,{type:"secondary",className:"sidebar-group-empty",children:"\u6682\u65E0\u7B26\u5408\u6761\u4EF6\u7684\u4F1A\u8BDD"})]})})})]}):null,!r&&e.kind!=="dm"&&!e.dissolvedAt&&e.tasks.length>0?(0,_e.jsxs)(je,{kind:"ghost",className:"conversation-task-toggle","aria-expanded":H,onClick:()=>C(!$),children:[(0,_e.jsx)(De,{name:"chevronDown",size:12}),e.tasks.length," \u4E2A\u4EFB\u52A1",H?" \xB7 \u6536\u8D77":""]}):null,H?W.map(J=>(0,_e.jsxs)(je,{kind:"ghost",className:"conversation-task-row",onClick:()=>{d(),Ir.filter(e.id,J.task.id)},children:[(0,_e.jsx)(De,{name:"task"}),(0,_e.jsx)("span",{className:"conversation-row-title",children:J.task.title}),(0,_e.jsx)("span",{className:"conversation-row-status","data-archived":J.task.status==="archived"||void 0,children:b$(J)})]},J.task.id)):null]})}function a6e({entries:e,query:t,enabled:r,selectedSessionId:n,sessionTitles:a,onOpenSession:o}){let[l,u]=zn.useState(!1),d=l||t.length>0,p=async()=>{await Ls.reload(),Md()};return(0,_e.jsxs)("div",{className:"conversation-other-sessions",children:[(0,_e.jsxs)(je,{kind:"ghost",className:"conversation-other-toggle","aria-expanded":d,onClick:()=>u(!l),children:[(0,_e.jsx)(De,{name:"terminal",size:14}),"\u5176\u4ED6\u4F1A\u8BDD",(0,_e.jsx)("span",{children:e.length})]}),d?(0,_e.jsx)("div",{className:"conversation-person-sessions",role:"group","aria-label":"\u5176\u4ED6\u4F1A\u8BDD",children:e.map((m,v)=>{let g=m.session,b=P0(g,v,a[g.id]);return(0,_e.jsx)(B6,{session:{...g,archived:m.archived},label:b,disabled:!r,intoNewTask:g.workspaceTaskId?void 0:m.group,onOpen:()=>o?.(g.id),onArchive:async x=>{await M6(g.id,x),await p()},onDelete:async()=>{await I6([g.id],R6(m.group,g)??null),await p()},row:(0,_e.jsx)("div",{className:"conversation-person-session",children:(0,_e.jsx)(nX,{id:g.id,title:b,titleGenerating:g.titleGenerating,avatarNode:(0,_e.jsx)(Df,{session:g,size:14}),state:Pf(g),glow:j1(g),summary:[Pf(g).label,z6(m.group),yl(Fl(g),g.engine)].filter(Boolean).join(" \xB7 "),active:g.id===n,onClick:()=>o?.(g.id)})})},g.id)})}):null]})}var sm=B(_(),1),i6e=B(_(),1),sX={items:[]},lX=sX,b9=new Set,ME=0,HB=null,qB=null;function o6e(e){lX=e;for(let t of b9)t()}function y9(){qB||(qB=mt("/api/attention").then(e=>{o6e({items:Array.isArray(e.items)?e.items:[]})}).catch(()=>{}).finally(()=>{qB=null}))}function s6e(e){return b9.add(e),ME+=1,ME===1&&(HB=X0(()=>y9()),y9()),()=>{b9.delete(e),ME-=1,ME===0&&(HB?.(),HB=null)}}function l6e(){return(0,i6e.useSyncExternalStore)(s6e,()=>lX.items,()=>sX.items)}var nn=B(Ee(),1);function u6e(e){return e.map(t=>t.entries.map(r=>`${r.id}:${r.status}`).join(",")).join("|")}function uX(){let e=l6e(),t=xi(),r=u6e(t.sidebar.groups);return sm.useEffect(()=>{y9()},[r]),e}function cX(e,t,r){if(r(),e.sessionId){En.close(),t({type:"session.select",id:e.sessionId});return}En.open("","","teams")}function dX({items:e,onOpen:t}){return(0,nn.jsx)(Bt,{children:(0,nn.jsx)("ul",{className:"wand-attention-list",children:e.map(r=>(0,nn.jsx)("li",{children:(0,nn.jsx)(je,{kind:"ghost",className:"wand-attention-item",onClick:()=>t(r),children:(0,nn.jsxs)("span",{children:[(0,nn.jsx)("strong",{children:r.title}),(0,nn.jsx)("br",{}),r.detail]})})},r.id))})})}function c6e({open:e,onToggle:t,compact:r=!1}){let n=uX(),a=Gi(),o=sm.useRef(null);if(r)return(0,nn.jsx)(ko,{open:e,onOpenChange:d=>{d!==e&&t(),d||o.current?.focus({preventScroll:!0})},side:"right",align:"start",contentId:"sidebar-notifications",ariaLabel:"\u901A\u77E5",trigger:(0,nn.jsx)(Fr,{ref:o,className:"sidebar-notification-button",title:"\u901A\u77E5","aria-label":n.length?`\u901A\u77E5\uFF0C${n.length} \u4E2A\u62A5\u9519`:"\u901A\u77E5","aria-expanded":e,"aria-controls":"sidebar-notifications",kind:"ghost",children:(0,nn.jsx)(Ci,{count:n.length,size:"small",children:(0,nn.jsx)(De,{name:"bell",size:20})})}),children:(0,nn.jsxs)("div",{className:"sidebar-notification-content",children:[(0,nn.jsx)(Wt.Text,{strong:!0,children:"\u901A\u77E5"}),n.length?(0,nn.jsx)(dX,{items:n,onOpen:d=>cX(d,a,t)}):(0,nn.jsx)(Wt.Paragraph,{type:"secondary",children:"\u6682\u65E0\u9700\u8981\u5904\u7406\u7684\u901A\u77E5"})]})});if(n.length===0)return null;let l=`${n.length} \u4E2A\u62A5\u9519`,u=e?`${l}\uFF0C\u6536\u8D77\u6E05\u5355`:`${l}\uFF0C\u70B9\u5F00\u67E5\u770B`;return(0,nn.jsxs)(je,{kind:"ghost",type:"button",className:Je("sidebar-attention-badge",e&&"is-open"),title:u,"aria-label":u,"aria-expanded":e,"aria-controls":"sidebar-attention-list",onClick:t,children:[(0,nn.jsx)(De,{name:"info",size:12,className:"sidebar-attention-badge-icon"}),(0,nn.jsx)("span",{className:"sidebar-attention-badge-label",children:l}),(0,nn.jsx)(De,{name:"chevronDown",size:11,className:"sidebar-attention-badge-chevron"})]})}function d6e(){let e=uX(),t=Gi(),[r,n]=sm.useState(!1),a=sm.useCallback(()=>n(!1),[]),o=sm.useId(),l=sm.useRef(null);if(sm.useEffect(()=>{e.length===0&&n(!1)},[e.length]),e.length===0)return null;let u=`${e.length} \u4E2A\u62A5\u9519`,d=r?`${u}\uFF0C\u6536\u8D77\u6E05\u5355`:`${u}\uFF0C\u70B9\u5F00\u67E5\u770B`;return(0,nn.jsxs)("section",{className:"home-attention","aria-label":"\u9700\u8981\u5904\u7406\u7684\u62A5\u9519",onKeyDown:p=>{p.key!=="Escape"||p.defaultPrevented||p.nativeEvent.isComposing||!r||(p.preventDefault(),p.stopPropagation(),n(!1),l.current?.focus({preventScroll:!0}))},children:[(0,nn.jsxs)(je,{kind:"ghost",type:"button",className:"home-attention-trigger",ref:l,"aria-controls":o,"aria-expanded":r,"aria-label":d,title:d,onClick:()=>n(p=>!p),children:[(0,nn.jsx)(De,{name:"info",size:13,className:"home-attention-trigger-icon"}),(0,nn.jsx)("span",{children:u}),(0,nn.jsx)(De,{name:"chevronDown",size:13,className:"home-attention-trigger-chevron"})]}),(0,nn.jsx)(T1,{id:o,open:r,children:(0,nn.jsx)(dX,{items:e,onOpen:p=>cX(p,t,a)})})]})}var An=B(_(),1);function p6e(){let e="(hover: hover) and (pointer: fine)",t=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(e).matches,[r,n]=An.useState(t);return An.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let a=window.matchMedia(e),o=()=>n(a.matches);return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),r}function f6e(e,t,r,n){let[a,o]=An.useState(!1),[l,u]=An.useState(!1),d=An.useRef(0),p=An.useRef(0),m=An.useRef(null),v=An.useRef(null),g=An.useRef(!1),b=ga(),x=An.useCallback(()=>{window.clearTimeout(d.current),window.clearTimeout(p.current)},[]),y=An.useCallback(()=>{x(),g.current=!1,o(!1)},[x]),E=An.useCallback(A=>{window.clearTimeout(p.current),window.clearTimeout(d.current),g.current=!0,d.current=window.setTimeout(()=>{u(!0),o(!0)},A)},[]),S=An.useCallback(()=>{if(window.clearTimeout(d.current),window.clearTimeout(p.current),g.current=!1,b){o(!1);return}p.current=window.setTimeout(()=>o(!1),Wb("--motion-normal"))},[b]),F=An.useCallback(A=>{e&&E(A)},[e,E]),$=An.useCallback(A=>A instanceof Node&&r.current?.contains(A)===!0,[r]);An.useEffect(()=>{e||(x(),g.current=!1,o(!1),u(!1))},[e,x]),An.useEffect(()=>x,[x]),An.useEffect(()=>{b&&(x(),e&&g.current&&u(!0),o(e&&g.current))},[b,e,x]);let C=An.useCallback(A=>{if(!(A instanceof Element))return!1;let j=A.closest("[data-wand-popup-owner]")?.dataset.wandPopupOwner;return j?Array.from(r.current?.querySelectorAll("[data-sidebar-popup-owner]")??[]).some(P=>P.dataset.sidebarPopupOwner===j):!1},[r]),D=An.useCallback(A=>A instanceof Node&&(r.current?.contains(A)===!0||t.current?.contains(A)===!0),[r,t]);An.useEffect(()=>{if(!a)return;let A=P=>{if(P.key!=="Escape"||P.defaultPrevented)return;let O=document.activeElement;D(O)&&(C(P.target)||(P.preventDefault(),P.stopPropagation(),v.current=m.current,y(),m.current?.focus({preventScroll:!0})))},j=P=>{let O=P.target;O instanceof Node&&(r.current?.contains(O)||t.current?.contains(O)||C(O)||y())};return document.addEventListener("keydown",A),document.addEventListener("pointerdown",j,!0),()=>{document.removeEventListener("keydown",A),document.removeEventListener("pointerdown",j,!0)}},[a,y,D,C,r,t]);let I=An.useCallback(A=>{C(A.relatedTarget)||(v.current=null,S())},[S,C]),M=(A,j)=>{if(!e||$(A)||C(A))return;let P=A instanceof Element?A.closest("[data-sidebar-directory-id]"):null,O=P?.dataset.sidebarDirectoryId;if(!P||!O||!t.current?.contains(P)){S();return}v.current!==P&&(m.current=P,n(O,P),F(b?0:j))};return{mounted:l,open:a,close:y,triggerBindings:{onKeyDown:A=>{if(A.key!=="Tab"||A.shiftKey||!a||A.defaultPrevented||document.activeElement!==m.current)return;let j=r.current?.querySelector("button, [tabindex='0']");j&&(A.preventDefault(),j.focus({preventScroll:!0}))},onPointerOver:A=>M(A.target,Wb("--motion-fast")),onClick:A=>{let j=A.target instanceof Element?A.target.closest("[data-sidebar-directory-id]"):null;if(v.current=null,a&&j===m.current){y();return}M(A.target,0)},onPointerLeave:I,onFocusCapture:A=>M(A.target,0),onBlurCapture:A=>{D(A.relatedTarget)||C(A.relatedTarget)||S()}},surfaceBindings:{onKeyDown:A=>{if(A.key!=="Tab"||!A.shiftKey)return;let j=r.current?.querySelector("button, [tabindex='0']");document.activeElement===j&&(A.preventDefault(),m.current?.focus({preventScroll:!0}))},onPointerEnter:()=>{g.current=!0,window.clearTimeout(p.current)},onPointerLeave:I,onFocusCapture:()=>{g.current=!0,window.clearTimeout(p.current)},onBlurCapture:A=>{D(A.relatedTarget)||C(A.relatedTarget)||y()}}}}var WB=B(_(),1);function m6e(e,t){let r=WB.useRef(null),n=WB.useRef(t);return n.current=t,WB.useEffect(()=>{let a=r.current;if(!e||!a)return;let o=document.activeElement instanceof HTMLElement?document.activeElement:null;a.focus({preventScroll:!0});let l=u=>{if(!(u.defaultPrevented||!a.contains(u.target))){if(u.key==="Tab"){let d=[],p=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT);for(;p.nextNode();){let g=p.currentNode;g instanceof HTMLElement&&g.tabIndex>=0&&!g.matches(":disabled")&&!g.closest('[inert], [aria-hidden="true"]')&&g.getClientRects().length>0&&getComputedStyle(g).visibility!=="hidden"&&d.push(g)}let m=d[0],v=d[d.length-1];(!m||(u.shiftKey?document.activeElement===m||document.activeElement===a:document.activeElement===v||document.activeElement===a))&&(u.preventDefault(),(u.shiftKey?v:m)?.focus({preventScroll:!0}));return}u.key==="Escape"&&(u.preventDefault(),n.current())}};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),a.contains(document.activeElement)&&o?.focus({preventScroll:!0})}},[e]),r}var TE=B(_(),1),RG=8,jE=.28,h6e=50,OG=.35,g6e=56;function v6e({drawerRef:e,backdropRef:t,enabled:r,isOpen:n,onOpen:a,onClose:o}){let l=TE.useRef(a),u=TE.useRef(o);l.current=a,u.current=o;let d=TE.useRef({phase:"idle",startX:0,startY:0,startTime:0,currentX:0,currentY:0,initialOpen:!1,samples:[],drawerWidth:320,cleanups:[]});TE.useEffect(()=>{if(!r||typeof window>"u")return;let p=d.current,m=()=>{let S=e.current;return S&&S.offsetWidth>0?S.offsetWidth:Math.min(344,Math.max(260,window.innerWidth-24))},v=S=>{if(!(S instanceof Element))return!1;let F=S.closest("input, textarea, select, [contenteditable='true']");return!!(F&&document.activeElement===F||S.closest(".ant-tabs-nav, pre, code, [data-scroll-x], [data-no-drawer-gesture]"))},g=()=>{let S=e.current,F=t.current;S&&(S.style.transform="",S.style.transition="",S.style.willChange="",S.style.pointerEvents="",delete S.dataset.drawerGesture),F&&(F.style.opacity="",F.style.transition="",F.style.willChange="",F.style.pointerEvents="",delete F.dataset.drawerGesture)},b=S=>{if(S.touches.length!==1||p.phase==="animating")return;let F=S.touches[0];if(!F||v(S.target))return;let $=Math.max(g6e,Math.round(window.innerWidth*.16)),C=F.clientX<=$,D=e.current,I=t.current,M=D&&D.contains(S.target)||I&&I.contains(S.target);!n&&!C||n&&!M||(p.phase="tracking",p.startX=F.clientX,p.startY=F.clientY,p.startTime=Date.now(),p.currentX=F.clientX,p.currentY=F.clientY,p.initialOpen=n,p.drawerWidth=m(),p.samples=[{x:F.clientX,y:F.clientY,time:p.startTime}])},x=S=>{if(p.phase==="idle"||p.phase==="animating")return;let F=S.touches[0];if(!F)return;let $=Date.now(),C=F.clientX-p.startX,D=F.clientY-p.startY;if(p.phase==="tracking"){let V=Math.abs(C),W=Math.abs(D);if(V<RG&&W<RG)return;if(W>=V){p.phase="idle";return}if(!p.initialOpen&&C<=0){p.phase="idle";return}if(p.initialOpen&&C>=0){p.phase="idle";return}p.phase="dragging";let H=e.current,q=t.current;H&&(H.dataset.drawerGesture="active",H.style.display="flex",H.style.willChange="transform",H.style.transition="none",H.style.pointerEvents="auto"),q&&(q.dataset.drawerGesture="active",q.style.display="block",q.style.willChange="opacity",q.style.transition="none",q.style.pointerEvents="auto")}if(p.phase!=="dragging")return;S.cancelable&&S.preventDefault(),p.currentX=F.clientX,p.currentY=F.clientY,p.samples.push({x:F.clientX,y:F.clientY,time:$});let I=$-140;for(;p.samples.length>2&&(p.samples[0]?.time??0)<I;)p.samples.shift();let M=p.drawerWidth,A=0,j=0;p.initialOpen?(A=Math.min(1,Math.max(0,1+C/M)),j=Math.min(0,Math.max(-M,C))):(A=Math.min(1,Math.max(0,C/M)),j=-M+C,j=Math.min(0,j));let P=e.current,O=t.current;P&&(P.style.transform=`translate3d(${j}px, 0, 0)`),O&&(O.style.opacity=String(A*.98))},y=()=>{if(p.phase!=="dragging"){p.phase="idle";return}p.phase="animating";let S=Date.now(),F=p.samples,$=0,C=0;if(F.length>=2){let X=F[0],J=F[F.length-1],N=Math.max(1,J.time-X.time);if($=(J.x-X.x)/N,F.length>=3){let R=F[Math.floor(F.length/2)],K=Math.max(1,R.time-X.time),Q=Math.max(1,J.time-R.time),ee=(R.x-X.x)/K;C=((J.x-R.x)/Q-ee)/Q}}let D=$+C*h6e,I=p.drawerWidth,M=p.currentX-p.startX,A=p.initialOpen?Math.max(0,1+M/I):Math.max(0,M/I);A=Math.min(1,A);let j=!1;p.initialOpen?D<=-jE?j=!1:D>=jE?j=!0:j=A>=1-OG:D>=jE?j=!0:D<=-jE?j=!1:j=A>=OG;let P=window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=e.current,V=t.current,W=()=>{g(),p.phase="idle",j?l.current():u.current()};if(P||!O){W();return}let H=j?0:-I,q=j?1:0,z=Math.abs((j?0:-I)-(p.initialOpen?M:-I+M)),L=Math.round(Math.min(260,Math.max(140,z/Math.max(.8,Math.abs(D)*1.5))));O.style.transition=`transform ${L}ms cubic-bezier(0.16, 1, 0.3, 1)`,O.style.transform=`translate3d(${H}px, 0, 0)`,V&&(V.style.transition=`opacity ${L}ms cubic-bezier(0.16, 1, 0.3, 1)`,V.style.opacity=String(q));let U=null,Y=X=>{X.target!==O||X.propertyName!=="transform"||(O.removeEventListener("transitionend",Y),U&&clearTimeout(U),W())};O.addEventListener("transitionend",Y),U=setTimeout(()=>{O.removeEventListener("transitionend",Y),W()},L+40)},E=()=>{p.phase==="dragging"&&g(),p.phase="idle"};return document.addEventListener("touchstart",b,{passive:!0}),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",y,{passive:!0}),document.addEventListener("touchcancel",E,{passive:!0}),()=>{document.removeEventListener("touchstart",b),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",y),document.removeEventListener("touchcancel",E),g()}},[r,n,e,t])}var Be=B(Ee(),1),pX="\u5408\u5E76\u5230\u4E3B\u5206\u652F\u2026",fX="\u91CD\u8BD5 worktree \u6E05\u7406",mX="\u5220\u9664\u4F1A\u8BDD",b6e=T0(()=>globalThis.__wandImportBrowserModule("5f635cbcab701433").then(e=>e.WorkspacesPanel),{title:"\u5DE5\u4F5C\u533A",renderPending:()=>(0,Be.jsx)("div",{role:"status",style:{padding:12,fontSize:12,color:"var(--text-secondary)"},children:"\u6B63\u5728\u52A0\u8F7D\u5DE5\u4F5C\u533A\u2026"})}),y6e=Bn.lazy(()=>globalThis.__wandImportBrowserModule("6cd6c4f4aa02b1ec").then(e=>({default:e.SidebarPeek})));function hX(e){return e.source.endsWith("-history")?e.source:"session"}function gX(e){return e.source.endsWith("-history")}function vX(e){if(!gX(e))return null;let t=e.source.slice(0,-8);return t==="codex"||t==="opencode"||t==="qoder"?t:"claude"}function SI(e,t){let r=hX(e);if(t)return{primary:{type:"session.manage.select",target:r,id:e.id},resume:null,delete:null,merge:null,cleanup:null};let n=vX(e),a=n?{type:"session.resumeHistory",provider:n,id:e.id,cwd:e.cwd}:null,o=e.worktree?.enabled&&e.worktree.mergeStatus==="merged"?{type:"session.cleanup",id:e.id}:null,l=e.worktree?.enabled&&e.worktree.branch&&e.worktree.path&&e.worktree.mergeStatus!=="merged"?{type:"session.merge",id:e.id}:null;return{primary:a??{type:"session.select",id:e.id},resume:a??(e.resumable?{type:"session.resume",id:e.id}:null),delete:{type:"session.delete",target:r,id:e.id},merge:l,cleanup:o}}function _E({action:e,dispatch:t,actionName:r,label:n,icon:a,className:o,disabled:l,data:u}){return(0,Be.jsx)(Fr,{className:Je("session-action-btn",o),"data-action":r,"data-session-id":u?.sessionId,"data-claude-session-id":u?.historyId,"data-cwd":u?.cwd,"aria-label":n,title:n,disabled:l,onClick:d=>{d.stopPropagation(),t(e)},children:(0,Be.jsx)(De,{name:a})})}function w6e({entry:e,dispatch:t}){let r=hX(e);return(0,Be.jsx)("span",{className:"wand-session-manage-check",onClick:n=>n.stopPropagation(),children:(0,Be.jsx)(Bt,{children:(0,Be.jsx)(JA,{"data-action":"toggle-selection","data-kind":r==="session"?"sessions":r==="codex-history"?"codex":"history","data-id":e.id,checked:e.selected,"aria-label":`\u9009\u62E9\u4F1A\u8BDD ${e.title}`,onChange:()=>{t({type:"session.manage.select",target:r,id:e.id})}})})})}function x6e({entry:e}){if(!e.worktree?.enabled)return null;let t={ready:"\u53EF\u5408\u5E76",checking:"\u68C0\u67E5\u4E2D",merging:"\u5408\u5E76\u4E2D",merged:"\u5DF2\u5408\u5E76",failed:"\u5408\u5E76\u5931\u8D25"},r=[e.worktree.branch&&`Worktree: ${e.worktree.branch}`,e.worktree.path&&`Path: ${e.worktree.path}`].filter(Boolean).join(`
252
- `);return(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(xd,{className:"session-kind-badge worktree",title:r||void 0,children:"Worktree"}),e.worktree.mergeStatus&&(0,Be.jsx)(xd,{className:Je("session-kind-badge worktree-merge",e.worktree.mergeStatus),children:t[e.worktree.mergeStatus]??e.worktree.mergeStatus})]})}function E6e(e){let t=e.endedAt??e.startedAt;if(!t)return"";let r=new Date(t);if(!Number.isFinite(r.getTime()))return"";if(!e.endedAt&&e.turnActive){let a=e.turnStartedAt??e.startedAt;if(!a)return"";let o=new Date(a).getTime();if(!Number.isFinite(o))return"";let l=Math.max(0,Math.floor((Date.now()-o)/1e3)),u=Math.floor(l/3600),d=Math.floor(l%3600/60),p=l%60;return u>0?`${u}:${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`:`${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`}let n=Math.max(0,Date.now()-r.getTime());return n<6e4?"\u521A\u521A":n<36e5?`${Math.floor(n/6e4)}\u5206\u949F\u524D`:n<864e5?`${Math.floor(n/36e5)}\u5C0F\u65F6\u524D`:n<6048e5?`${Math.floor(n/864e5)}\u5929\u524D`:r.toLocaleDateString([],{month:"numeric",day:"numeric"})}function k6e({entry:e}){let t=e.engine==="sdk"?Rb:Ob(e.provider),r=Xo(e.provider);return(0,Be.jsx)("span",{className:Je("session-provider-mark",`provider-${r??"generic"}`,e.engine==="sdk"&&"provider-engine-sdk"),"aria-hidden":"true",title:t,children:(0,Be.jsx)(wl,{provider:r})})}function zG({path:e}){return e?(0,Be.jsx)(Wt.Text,{ellipsis:!0,type:"secondary",className:"session-path",style:{maxWidth:160,fontSize:12},title:e,"aria-label":e,children:e}):null}function C6e({entry:e,manageMode:t,dispatch:r}){let n=SI(e,t),a=gX(e),o=vX(e)??"claude",l=a?{historyId:e.id,cwd:e.cwd}:{sessionId:e.id},u=()=>{r(n.primary)},d=E6e(e),p=!a&&(e.permissionBlocked||e.inFlight||e.turnActive||["thinking","waiting-input","waiting_input","reconnecting"].includes(e.status)),m=e.permissionBlocked||["waiting-input","waiting_input","reconnecting"].includes(e.status),v=a?"none":e.permissionBlocked?"permission":e.status==="waiting-input"||e.status==="waiting_input"?"waiting-input":e.status==="reconnecting"?"reconnecting":e.status==="failed"?"failed":e.inFlight||e.turnActive&&e.status==="running"?e.status==="thinking"?"thinking":"running":e.status==="running"&&e.provider&&e.kind==="pty"&&!e.ptyBusy?"none":e.status==="running"?"running":e.status==="thinking"?"thinking":Yi(e)?"just-completed":"none";return(0,Be.jsx)("div",{className:Je("session-item",a&&"non-wand-session",e.active&&"active",t&&e.selected&&"selected",t&&"session-managing",p&&"status-prominent",m&&"status-prominent-warning"),style:{marginBlock:4},"data-session-id":a?void 0:e.id,"data-claude-history-id":a?e.id:void 0,"data-provider":a?o:void 0,"data-cwd":a?e.cwd:void 0,children:(0,Be.jsx)("div",{className:"session-item-content",children:(0,Be.jsxs)(Ye,{align:"center",gap:4,className:"session-item-row",children:[t&&(0,Be.jsx)(w6e,{entry:e,dispatch:r}),(0,Be.jsxs)(je,{kind:e.active?"soft":"ghost",className:"session-main wand-sidebar-history-action",style:{flex:1,minWidth:0,height:"auto",whiteSpace:"normal",padding:8,display:"flex",flexDirection:"column",alignItems:"stretch",textAlign:"start"},"aria-current":e.active?"page":void 0,onClick:u,children:[(0,Be.jsxs)(Ye,{align:"center",gap:"small",className:"session-title-row",children:[(0,Be.jsx)("span",{className:Je("session-leading-slot",v!=="none"&&`wand-logo-glow glow-${v}`),"data-glow":v,style:{display:"inline-flex",width:20,height:20,flexShrink:0},children:(0,Be.jsx)(k6e,{entry:e})}),(0,Be.jsx)("div",{className:Je(a?"session-command claude-history-preview":"session-title",e.titleGenerating&&"title-generating"),"aria-busy":e.titleGenerating||void 0,"aria-label":e.titleGenerating?`${e.title}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]}),e.description&&(0,Be.jsx)("div",{className:"session-description",children:e.description}),(0,Be.jsxs)(Ye,{gap:"small",wrap:!0,className:"session-meta",style:{fontSize:12},children:[(0,Be.jsx)("span",{className:"session-leading-slot session-time",children:d}),a?(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsxs)("span",{className:"session-context session-context-recoverable",children:[(0,Be.jsx)(De,{name:"history",size:11}),"\u53EF\u6062\u590D"]}),(0,Be.jsx)(zG,{path:e.cwd})]}):(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(zG,{path:e.cwd}),(0,Be.jsx)(x6e,{entry:e})]})]})]}),!t&&(0,Be.jsxs)(Ye,{align:"center",gap:2,className:"session-actions",children:[n.resume&&(0,Be.jsx)(_E,{action:n.resume,dispatch:r,actionName:a?o==="claude"?"resume-history":`resume-${o}-history`:"resume",label:a?`\u6062\u590D\u6B64 ${Ob(o)} \u4F1A\u8BDD`:"\u6062\u590D\u4F1A\u8BDD",icon:"resume",data:l}),n.merge&&(0,Be.jsx)(_E,{action:n.merge,dispatch:r,actionName:"worktree-merge",label:pX,icon:"merge",className:"merge-btn",disabled:e.status==="running"||e.worktree?.mergeStatus==="merging",data:l}),n.cleanup&&(0,Be.jsx)(_E,{action:n.cleanup,dispatch:r,actionName:"worktree-cleanup",label:fX,icon:"trash",className:"merge-btn",data:l}),n.delete&&(0,Be.jsx)(_E,{action:n.delete,dispatch:r,actionName:a?o==="claude"?"delete-history":`delete-${o}-history`:"delete-session",label:mX,icon:"trash",className:"delete-btn",data:l})]})]})})})}var S6e={load:"\u52A0\u8F7D\u5931\u8D25",sync:"\u672A\u540C\u6B65"};function F6e(){let e=Bn.useSyncExternalStore(eA,O6,O6),[t,r]=Bn.useState(!1);if(Bn.useEffect(()=>{e||r(!1)},[e]),!e)return null;let n=S6e[e.kind];return(0,Be.jsx)(je,{kind:"ghost",type:"button",className:Je("sidebar-list-error",t&&"is-retrying"),title:`${K1(e.message)}\uFF5C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D`,"aria-label":`${n}\uFF1A${K1(e.message)}\uFF0C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D`,disabled:t,onClick:()=>{r(!0),e.retry().finally(()=>r(!1))},children:(0,Be.jsx)(De,{name:"refresh",size:18,className:"sidebar-list-error-icon"})})}function $6e(){return{action:{type:"workspace.new"},label:"\u65B0\u5EFA\u4F1A\u8BDD",ariaLabel:"\u65B0\u5EFA\u4F1A\u8BDD"}}function D6e(e){switch(e.type){case"session.select":case"session.resume":case"session.resumeHistory":case"nav.home":case"auth.logout":case"native.back":case"native.switchServer":return!0;default:return!1}}async function A6e(e,t){let r=await xn.dialog({title:"\u9000\u51FA\u767B\u5F55\uFF1F",focusTriggerAfterClose:!1,description:"\u9000\u51FA\u540E\u9700\u8981\u91CD\u65B0\u8FDE\u63A5\u3002\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u4F1A\u7EE7\u7EED\u6267\u884C\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u9000\u51FA\u767B\u5F55",value:!0,kind:"danger"}]});r.dismissed!==!0&&r.action?e():t?.()}function B6e({active:e,onToggle:t}){let r=e?"\u5C55\u5F00\u5B8C\u6574\u4FA7\u8FB9\u680F":"\u6536\u8D77\u4E3A\u7A84\u680F";return(0,Be.jsxs)(Fr,{className:Je("sidebar-compact-toggle",e&&"active"),kind:"ghost",size:"small","aria-label":r,"aria-pressed":e,"data-pressed":e||void 0,title:r,onClick:t,children:[(0,Be.jsx)(De,{name:"chevronLeft",className:"sidebar-collapse-direction"}),(0,Be.jsx)("span",{className:"sidebar-compact-toggle-label",children:e?"\u5C55\u5F00":"\u6536\u8D77"})]})}function I6e({group:e,manageMode:t,dispatch:r}){if(e.entries.length===0)return null;let n=(0,Be.jsx)("section",{className:Je("session-group",e.kind==="automation"&&"automation-session-list",e.kind==="history"&&"non-wand-session-list"),children:e.entries.map(l=>(0,Be.jsx)(C6e,{entry:l,manageMode:t,dispatch:r},`${l.source}:${l.id}`))});if(e.kind==="wand")return n;let a=e.kind==="automation",o=l=>{t||r({type:"layout.drawer.group.set",group:a?"automation":"history",expanded:l})};return(0,Be.jsx)("div",{className:Je(a?"automation-session-group":"non-wand-session-group",t&&"manage-mode"),children:(0,Be.jsx)(H2e,{label:e.label,count:e.entries.length,description:a?"\u7531\u81EA\u52A8\u5316\u6216\u542F\u52A8\u4EFB\u52A1\u521B\u5EFA\uFF0C\u4E0D\u53C2\u4E0E\u666E\u901A Wand \u4F1A\u8BDD\u6392\u5E8F":"\u672C\u673A\u539F\u751F\u4F1A\u8BDD\uFF0C\u4E0D\u53C2\u4E0E Wand \u4F1A\u8BDD\u6392\u5E8F",avatarNode:(0,Be.jsx)(De,{name:a?"zap":"history"}),expanded:t||e.expanded,onToggle:()=>o(!e.expanded),onSetOpen:o,children:n})})}function M6e(){let e=xi(),t=ag(),[r,n]=Bn.useState(()=>new Set([t.mode])),a=r.has(t.mode);Bn.useLayoutEffect(()=>{a||n(Q=>new Set(Q).add(t.mode))},[a,t.mode]);let o=Gi(),l=Bn.useSyncExternalStore(_l.subscribe,_l.getSnapshot,_l.getSnapshot),u=Bn.useSyncExternalStore(kl.subscribe,kl.getSnapshot,kl.getSnapshot),d=Bn.useSyncExternalStore(qa.subscribe,qa.getSnapshot,qa.getSnapshot),p=hA(!1),m=A0().name||U3,[v,g]=Bn.useState(!1),b=Bn.useRef(null),x=TD(),{query:y,setQuery:E}=x,[S,F]=Bn.useState(!1),$=!e.layout.sidebarDrawer&&(d.open||t.directory||l.open||u.open||e.layout.filePanelOpen),C=!e.layout.sidebarDrawer&&e.layout.sidebarPinned&&e.layout.sidebarCollapsed,D=Je("sidebar sidebar-refined",e.layout.sessionsDrawerOpen&&"open",!e.layout.sidebarDrawer&&e.layout.sidebarAnchored&&"pinned",C&&!$&&"collapsed",$&&"context-rail",t.mode==="chats"&&!$&&"sidebar-home"),I=$6e(),M=e.layout.sessionsDrawerOpen||!e.layout.sidebarDrawer&&e.layout.sidebarAnchored,A=M&&(e.layout.sidebarDrawer||!e.layout.sidebarPinned),j=m6e(A,()=>{o({type:"layout.drawer.close"})}),P=Bn.useRef(null);v6e({drawerRef:j,backdropRef:P,enabled:e.layout.sidebarDrawer||A,isOpen:e.layout.sessionsDrawerOpen,onOpen:()=>{o({type:"layout.drawer.open"})},onClose:()=>{o({type:"layout.drawer.close"})}});let O=Bn.useRef(null),V=Bn.useRef(null),W=p6e(),[H,q]=Bn.useState(null),z=Bn.useCallback((Q,ee)=>{let te=j.current?.getBoundingClientRect().top??0,ne=Math.max(8,Math.min(ee.getBoundingClientRect().top-te,window.innerHeight-te-300)),me=ee.dataset.sidebarDirectoryName??"\u76EE\u5F55";q(se=>se?.id===Q&&se.name===me&&se.top===ne?se:{id:Q,name:me,top:ne})},[j]),L=f6e(M&&!$&&C&&W&&!v,j,V,z),U=Bn.useRef({...t.scrolls});Bn.useLayoutEffect(()=>{let Q=O.current;if(!Q)return;let ee=`sidebar:${t.mode}:${C?"compact":"full"}`;return Q.scrollTop=U.current[ee]??0,()=>{U.current[ee]=Q.scrollTop,Ir.scroll(ee,Q.scrollTop)}},[C,t.mode]);let Y=()=>{L.close(),A&&o({type:"layout.drawer.close"})},X=Q=>{D6e(Q)&&(Fo.close(),En.close(),es.close(),Ir.suspend()),Q.type==="nav.home"&&Ir.show(),Y(),o(Q)},J=()=>{Fo.close(),En.close(),es.close(),Ir.suspend(),Y()},N=Q=>{if(Q.type==="session.select"||Q.type==="session.resume"||Q.type==="session.resumeHistory"){X(Q);return}o(Q)};Bn.useEffect(()=>{g(!1)},[M,C,$,t.mode,t.directory]),Bn.useEffect(()=>{M||F(!1)},[M]);let R=e.sidebar.groups.filter(Q=>Q.kind==="history").map(Q=>({...Q,entries:y.trim()?Q.entries.filter(ee=>Il(y,ee.title,ee.description,ee.cwd,ee.provider)):Q.entries})).map(Q=>(0,Be.jsx)(I6e,{group:Q,manageMode:!1,dispatch:N},Q.kind)),K=(Q,ee)=>(0,Be.jsx)(b6e,{compact:Q,directoryId:ee,peekDirectoryId:L.open?H?.id:void 0,onExpand:()=>{L.close(),o({type:"layout.drawer.collapse"})},onNavigate:J,onOpenDialog:Y,searchQuery:y,surfacesEnabled:ee?M&&L.open:M&&!C&&!$&&t.mode==="tasks",onSearchChange:E,selectedSessionId:e.selected?.id??null,sessionTitles:Object.fromEntries(e.sidebar.groups.flatMap(te=>te.entries.map(ne=>[ne.id,ne.title]))),sessionTitleGenerating:Object.fromEntries(e.sidebar.groups.flatMap(te=>te.entries.map(ne=>[ne.id,ne.titleGenerating]))),extraGroups:R},ee??"sidebar-tree");return(0,Be.jsxs)(js.Provider,{value:x,children:[(0,Be.jsx)("div",{id:"sessions-drawer-backdrop",ref:P,className:Je("drawer-backdrop",e.layout.sessionsBackdropVisible&&"open"),"aria-hidden":"true",style:{position:"fixed",inset:0,background:"var(--bg-overlay)",zIndex:19999,display:e.layout.sessionsBackdropVisible?void 0:"none"},onClick:()=>{o({type:"layout.drawer.close"})}}),(0,Be.jsxs)(kk.Sider,{id:"sessions-drawer",ref:j,className:D,width:$?56:"min(344px, calc(100vw - 24px))",collapsedWidth:112,collapsed:C&&!$,theme:"light",style:{position:A?"fixed":"relative",top:A?"var(--wand-safe-top, 0px)":void 0,bottom:A?"var(--wand-safe-bottom, 0px)":void 0,left:0,display:M?void 0:"none",zIndex:A?2e4:2,height:"100%",overflow:"visible"},styles:{body:{display:"flex",flexDirection:"row",height:"100%",minHeight:0}},"aria-label":"\u4E3B\u5BFC\u822A\u4E0E\u4F1A\u8BDD\u5217\u8868",role:A?"dialog":void 0,"aria-modal":A||void 0,"aria-hidden":!M||void 0,inert:!M,tabIndex:-1,...L.triggerBindings,children:[(0,Be.jsxs)(Ye,{vertical:!0,align:"center",className:"sidebar-navigation-rail",children:[(0,Be.jsxs)("div",{className:"sidebar-rail-scroll",children:[(0,Be.jsx)(Pu,{className:"sidebar-brand-mark",style:{width:"var(--conversation-brand-size, 24px)",height:"var(--conversation-brand-size, 24px)"}}),(0,Be.jsx)(J2e,{activePage:d.open?null:u.open?"knowledge":l.open?l.page==="board"?"board":l.page==="schedules"?"schedules":l.page==="calendar"?"calendar":"teams":t.directory?"teams":t.mode,teamAttention:p,onNavigate:Q=>{F(!1),Fo.close(),L.close(),Q!=="knowledge"&&u.open&&es.close(),Q==="knowledge"?(En.close(),es.open()):Q==="board"||Q==="teams"||Q==="schedules"||Q==="calendar"?En.open(Q==="calendar"?"":e.selected?.workspaceId??"",Q==="calendar"?"":e.selected?.id??"",Q):(En.close(),Q==="contacts"?Ir.directory(!0):(Ir.mode(Q),Q==="chats"?Ir.show():Ir.suspend())),Q!=="chats"&&Q!=="tasks"&&Y()}}),(0,Be.jsxs)(Ye,{vertical:!0,align:"center",gap:4,className:"sidebar-rail-notices",children:[(0,Be.jsx)(c6e,{compact:!0,open:S,onToggle:()=>F(Q=>!Q)}),(0,Be.jsx)(F6e,{}),(0,Be.jsx)(iA,{compact:!0,visible:M})]})]}),(0,Be.jsxs)(Ed,{open:v,onOpenChange:g,modal:!1,children:[(0,Be.jsx)(Lu,{ref:b,render:(0,Be.jsxs)(Fr,{kind:d.open?"soft":"ghost","aria-current":d.open?"page":void 0,id:"settings-button",className:"sidebar-profile-button",title:`${m} \xB7 \u8BBE\u7F6E`,"aria-label":"\u8D26\u6237\u4E0E\u8BBE\u7F6E",children:[(0,Be.jsx)(De,{name:"gear",size:18}),(0,Be.jsx)("span",{className:"sidebar-nav-label","aria-hidden":"true",children:"\u8BBE\u7F6E"})]})}),(0,Be.jsxs)(Hu,{id:"sidebar-account-menu",className:"sidebar-tools-menu","aria-label":"\u8D26\u6237\u4E0E\u8BBE\u7F6E",side:"right",align:"end",sideOffset:6,children:[(0,Be.jsx)(rn,{icon:"user",onClick:()=>{g(!1),Fo.close(),En.close(),Ir.directory(!0),Y()},children:"\u5458\u5DE5\u4E0E\u901A\u8BAF\u5F55"}),(0,Be.jsx)(rn,{id:"sidebar-settings-entry",icon:"gear",onClick:()=>{g(!1),F(!1),X({type:"settings.open"})},children:"\u8BBE\u7F6E"}),(0,Be.jsx)(Ms,{}),(0,Be.jsx)(SD,{menuItem:!0}),(0,Be.jsx)(rn,{id:"logout-button",icon:"logout",tone:"danger",onClick:()=>{g(!1),A6e(()=>X({type:"auth.logout"}),()=>{requestAnimationFrame(()=>b.current?.focus({preventScroll:!0}))})},children:"\u9000\u51FA\u767B\u5F55"})]})]})]}),(0,Be.jsxs)(Ye,{vertical:!0,className:"sidebar-list-panel",hidden:$,inert:$,children:[(0,Be.jsx)(Ye,{vertical:!0,gap:"small",className:"sidebar-header",style:{padding:C?"8px 4px":"10px 12px",flexShrink:0},children:(0,Be.jsxs)(Ye,{vertical:C,align:"center",justify:"space-between",gap:"small",className:"sidebar-header-primary",children:[(0,Be.jsx)(Ye,{align:"center",gap:"small",className:"sidebar-header-main",children:(0,Be.jsx)(Wt.Text,{strong:!0,className:"sidebar-title",hidden:C,style:{whiteSpace:"nowrap"},children:t.mode==="tasks"?"\u5DE5\u4F5C\u533A":"\u5BF9\u8BDD"})}),(0,Be.jsxs)(Ye,{align:"center",gap:4,vertical:C,className:"sidebar-header-actions",children:[(0,Be.jsx)("div",{hidden:t.mode!=="chats",children:(0,Be.jsx)(Z2e,{enabled:M&&!$&&t.mode==="chats",onCreateSession:()=>X(I.action),onNavigate:()=>{En.close(),Y()}})}),!e.layout.sidebarDrawer&&(0,Be.jsx)(B6e,{active:C,onToggle:()=>{L.close(),o({type:"layout.drawer.collapse"})}}),e.layout.sidebarDrawer&&(0,Be.jsx)(Fr,{id:"close-drawer-button",className:"sidebar-close","aria-label":"\u5173\u95ED\u4FA7\u680F",title:"\u5173\u95ED\u4FA7\u680F",size:"medium",onClick:()=>{o({type:"layout.drawer.close"})},children:(0,Be.jsx)(F1,{open:!0})})]})]})}),(0,Be.jsx)(Ye,{hidden:t.mode!=="tasks",vertical:!0,className:"sidebar-feature-nav",style:{padding:C?"0 4px 8px":"0 12px 8px",flexShrink:0},children:(0,Be.jsxs)(je,{id:"drawer-new-session-button",className:"sidebar-new-task",kind:"primary",title:I.label,"aria-label":I.ariaLabel,onClick:()=>X(I.action),children:[(0,Be.jsx)(De,{name:"plus",size:18}),(0,Be.jsx)("span",{hidden:C,children:I.label})]})}),(0,Be.jsx)("div",{className:"sidebar-body",ref:O,style:{flex:1,minHeight:0,overflow:"auto",padding:C?4:"0 8px"},children:(0,Be.jsx)("div",{id:"sessions-panel",children:(0,Be.jsx)("div",{className:"sessions-list",id:"sessions-list",children:(0,Be.jsxs)(q6,{value:t.mode,children:[r.has("chats")?(0,Be.jsx)("div",{hidden:t.mode!=="chats",inert:t.mode!=="chats",children:(0,Be.jsx)(r6e,{compact:C,enabled:M&&!$&&t.mode==="chats",selectedSessionId:e.selected?.id??null,sessionTitles:Object.fromEntries(e.sidebar.groups.flatMap(Q=>Q.entries.map(ee=>[ee.id,ee.title]))),onNavigate:()=>{En.close(),Y()},onOpenSession:Q=>{En.close(),Ir.suspend(),Y(),qD(Q,ee=>{o({type:"session.select",id:ee})})}})}):null,r.has("tasks")?(0,Be.jsx)("div",{hidden:t.mode!=="tasks",inert:t.mode!=="tasks",children:K(C)}):null]})})})}),C&&W&&L.mounted&&H?(0,Be.jsx)(Bn.Suspense,{fallback:null,children:(0,Be.jsx)(y6e,{title:H.name,top:H.top,open:L.open,surfaceRef:V,onExpand:()=>{L.close(),o({type:"layout.drawer.collapse"})},...L.surfaceBindings,children:(0,Be.jsx)("div",{className:"sessions-list",children:K(!1,H.id)})})}):null,(e.layout.sidebarDrawer||e.capabilities.backToNative||e.capabilities.switchServer)&&(0,Be.jsx)(Ye,{vertical:C,align:"center",justify:"space-between",gap:"small",className:"sidebar-footer",style:{flexShrink:0,padding:C?8:"8px 16px",borderTop:"1px solid var(--border-subtle)"},children:(0,Be.jsxs)(Ye,{component:"nav",wrap:!0,gap:4,vertical:C,className:"sidebar-footer-actions","aria-label":"\u4FA7\u680F\u5FEB\u6377\u64CD\u4F5C",children:[e.layout.sidebarDrawer&&(0,Be.jsxs)(Fr,{id:"file-panel-toggle-btn",title:"\u67E5\u770B\u6587\u4EF6","aria-label":"\u6587\u4EF6","aria-pressed":e.layout.filePanelOpen,onClick:()=>X({type:"layout.files.toggle"}),children:[(0,Be.jsx)(De,{name:"explorer",size:16}),(0,Be.jsx)("span",{children:"\u6587\u4EF6"})]}),e.capabilities.backToNative&&(0,Be.jsxs)(Fr,{id:"back-to-native-button",title:"\u8FD4\u56DE App \u539F\u751F\u754C\u9762","aria-label":"\u8FD4\u56DE App",onClick:()=>X({type:"native.back"}),children:[(0,Be.jsx)(De,{name:"back",size:16}),(0,Be.jsx)("span",{hidden:C,children:"\u8FD4\u56DEApp"})]}),e.capabilities.switchServer&&(0,Be.jsxs)(Fr,{id:"switch-server-button",title:"\u5207\u6362\u670D\u52A1\u5668","aria-label":"\u5207\u6362\u670D\u52A1\u5668",onClick:()=>X({type:"native.switchServer"}),children:[(0,Be.jsx)(De,{name:"server",size:16}),(0,Be.jsx)("span",{hidden:C,children:"\u5207\u6362"})]})]})})]})]})]})}var Ck=B(_(),1),T6e=B(Ee(),1);function bX({id:e="topbar-git-badge",className:t}={}){let r=xi(),n=Gi(),a=r.topbar.git;if(!a)return null;let o=`${a.branch} \xB7 ${a.clean?"\u5DE5\u4F5C\u533A\u5E72\u51C0":`${a.modifiedCount} \u4E2A\u6587\u4EF6\u5F85\u63D0\u4EA4`}`;return(0,T6e.jsxs)(rn,{id:e,className:t,icon:"git",title:o,"aria-label":"\u5FEB\u6377\u63D0\u4EA4",onSelect:()=>{n({type:"topbar.gitCommit"})},hint:a.clean?"\u65E0\u6539\u52A8":`${a.modifiedCount} \u4E2A\u6539\u52A8`,children:["\u5FEB\u6377\u63D0\u4EA4 \xB7 ",a.branch]})}var $t=B(Ee(),1);function j6e(e,t){let r=[];return e.claudeSessionId&&r.push({action:{type:"topbar.copy",field:"providerSessionId"},actionName:"copy-claude-session-id",label:e.provider==="codex"?"\u590D\u5236 Codex thread ID":e.provider==="opencode"?"\u590D\u5236 OpenCode session ID":`\u590D\u5236 ${yl(e.provider,e.engine)} \u4F1A\u8BDD ID`,icon:"copy"}),e.cwd&&r.push({action:{type:"topbar.copy",field:"cwd"},actionName:"copy-cwd",label:"\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55",icon:"folder"}),r.push({action:{type:"topbar.copy",field:"sessionId"},actionName:"copy-session-id",label:"\u590D\u5236\u4F1A\u8BDD ID",icon:"hash"}),t?.merge&&r.push({action:t.merge,actionName:"worktree-merge",label:pX,icon:"merge",dividerBefore:!0,disabled:e.status==="running"||e.worktree?.mergeStatus==="merging"}),t?.cleanup&&r.push({action:t.cleanup,actionName:"worktree-cleanup",label:fX,icon:"trash"}),t?.delete&&r.push({action:t.delete,actionName:"delete-session",label:mX,icon:"trash",tone:"danger"}),r}function yX({selected:e,actions:t,onAction:r,terminalControls:n=!0}){return(0,$t.jsxs)($t.Fragment,{children:[n&&e.kind==="pty"&&(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(rn,{onSelect:()=>r({type:"terminal.display",command:"zoom-in"}),children:"\u653E\u5927\u7EC8\u7AEF\u5B57\u53F7"}),(0,$t.jsx)(rn,{onSelect:()=>r({type:"terminal.display",command:"zoom-out"}),children:"\u7F29\u5C0F\u7EC8\u7AEF\u5B57\u53F7"}),(0,$t.jsx)(rn,{onSelect:()=>r({type:"terminal.display",command:"reset"}),children:"\u6062\u590D\u9ED8\u8BA4\u5B57\u53F7"}),(0,$t.jsx)(rn,{icon:"refresh",onSelect:()=>r({type:"terminal.display",command:"refresh"}),children:"\u5237\u65B0\u7EC8\u7AEF\u663E\u793A"}),(0,$t.jsx)(Ms,{})]}),j6e(e,t).map(a=>(0,$t.jsxs)(Ck.Fragment,{children:[a.dividerBefore?(0,$t.jsx)(Ms,{}):null,(0,$t.jsx)(rn,{"data-action":a.actionName,icon:a.icon,tone:a.tone??"default",disabled:a.disabled,onClick:()=>r(a.action),children:a.label})]},a.actionName))]})}function _6e({terminalActionVisible:e=!0}={}){let t=xi(),r=Gi(),n=t.layout.topbarMoreOpen,a=Ck.useRef(n);Ck.useEffect(()=>{a.current=n},[n]);let o=(0,$t.jsx)(wX,{snapshot:t,onAction:r,terminalActionVisible:e,onMoreOpenChange:l=>{l!==a.current&&(a.current=l,r({type:"topbar.menu.toggle"}))}});return e?(0,$t.jsx)(rg,{children:o}):o}function wX({snapshot:e,onAction:t,onMoreOpenChange:r,measurement:n=!1,terminalActionVisible:a=!0}){let o=e.selected,l=e.layout.topbarMoreOpen,u=o?SI(o,!1):null,d=v=>n?void 0:v,p=Ck.useRef(null),m=v=>{p.current?.focus({preventScroll:!0}),t?.(v)};return(0,$t.jsxs)(Ye,{align:"center",gap:"small",wrap:!0,className:Je("main-header-row",(o?.turnActive||o?.permissionBlocked)&&"is-running",o?.permissionBlocked&&"is-permission-blocked"),style:{flexShrink:0,padding:"8px var(--wand-page-inset, 20px)",borderBottom:"1px solid var(--border-subtle)"},children:[(0,$t.jsxs)(Ye,{align:"center",gap:"small",className:"topbar-left",children:[(e.layout.sidebarDrawer||!e.layout.sidebarAnchored)&&(0,$t.jsx)(Fr,{id:d("sessions-toggle-button"),className:Je("floating-sidebar-toggle",e.layout.sessionsDrawerOpen&&"active"),"aria-label":e.layout.sessionsDrawerOpen?"\u5173\u95ED\u4F1A\u8BDD\u4FA7\u680F":"\u6253\u5F00\u4F1A\u8BDD\u4FA7\u680F","aria-expanded":e.layout.sessionsDrawerOpen,"aria-controls":n?void 0:"sessions-drawer","data-pressed":e.layout.sessionsDrawerOpen||void 0,onClick:()=>{t?.({type:"layout.drawer.toggle"})},children:(0,$t.jsx)(F1,{open:e.layout.sessionsDrawerOpen,size:18})}),!e.layout.sidebarAnchored&&(0,$t.jsx)(Pu,{className:"topbar-brand",style:{width:24,height:24}})]}),(0,$t.jsx)(Ye,{vertical:!0,gap:2,className:"topbar-center",style:{flex:"1 1 0",minWidth:0},children:o?(0,$t.jsx)($t.Fragment,{children:(0,$t.jsxs)(Ye,{align:"center",gap:8,className:"topbar-title-row",children:[(0,$t.jsx)(Wt.Text,{ellipsis:!0,className:Je("topbar-session-title",e.topbar.titleGenerating&&"title-generating"),title:[e.topbar.title,e.topbar.titleGenerating&&"AI \u6B63\u5728\u751F\u6210\u6807\u9898",e.topbar.description].filter(Boolean).join(`
253
- `),"aria-label":e.topbar.titleGenerating?`${e.topbar.title}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,"aria-busy":e.topbar.titleGenerating||void 0,style:{minWidth:0,maxWidth:520,fontWeight:"var(--font-weight-semibold)"},children:e.topbar.title}),(0,$t.jsx)(Wt.Text,{className:Je("current-task",!e.topbar.currentTask&&"hidden"),id:d("current-task"),title:e.topbar.currentTask||void 0,hidden:!e.topbar.currentTask,children:e.topbar.currentTask})]})}):(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)("span",{className:"topbar-tagline",children:e.topbar.title||"Wand \u63A7\u5236\u53F0"}),(0,$t.jsx)("span",{className:"current-task hidden",id:d("current-task")})]})}),(0,$t.jsxs)(Ye,{align:"center",gap:4,className:"topbar-right",children:[!n&&(0,$t.jsx)(AA,{visible:a}),(0,$t.jsx)("div",{className:"topbar-more-wrap",children:n?(0,$t.jsx)(Fr,{kind:"ghost",size:"medium",children:(0,$t.jsx)(De,{name:"more",size:18})}):(0,$t.jsxs)(Ed,{open:l,onOpenChange:r,children:[(0,$t.jsx)(Lu,{ref:p,render:(0,$t.jsx)(Fr,{id:d("topbar-more-button"),kind:"ghost",size:"medium","aria-label":"\u5F53\u524D\u4F1A\u8BDD\u64CD\u4F5C",title:"\u5F53\u524D\u4F1A\u8BDD\u64CD\u4F5C","data-pressed":l||void 0,children:(0,$t.jsx)(De,{name:"more",size:18})})}),(0,$t.jsxs)(Hu,{id:d("topbar-more-menu"),"aria-label":"\u5F53\u524D\u4F1A\u8BDD",align:"end",sideOffset:6,children:[(0,$t.jsx)(rn,{id:"topbar-file-button",icon:"explorer",onSelect:()=>m({type:"layout.files.toggle"}),children:e.layout.filePanelOpen?"\u5173\u95ED\u6587\u4EF6\u9762\u677F":"\u6587\u4EF6"}),(0,$t.jsx)(rn,{id:"topbar-local-preview-button",icon:"eye",onSelect:()=>zs.show(),children:"\u672C\u5730\u9884\u89C8"}),(0,$t.jsx)(bX,{}),o&&(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(Ms,{}),(0,$t.jsx)(yX,{selected:o,actions:u,onAction:m})]})]})]})})]})]})}var pa=B(Ee(),1);function xX({windowActions:e}){let t=xi(),r=Gi(),n=IE.useSyncExternalStore(Kr.subscribe,Kr.getSnapshot,Kr.getServerSnapshot),[a,o]=IE.useState(!1),l=IE.useRef(null),u=n.layout?.windows.find(m=>m.id===n.layout?.activeWindowId)?.layout.type==="split";IE.useEffect(()=>o(!1),[t.selected?.id,n.taskId,n.layout?.activeWindowId]);let d=()=>o(!1),p=m=>{d(),l.current?.focus({preventScroll:!0}),r(m)};return(0,pa.jsxs)("div",{className:"workbar-actions",children:[(0,pa.jsx)(ng,{}),(0,pa.jsxs)(Ed,{open:a,onOpenChange:o,children:[(0,pa.jsx)(Lu,{ref:l,render:(0,pa.jsx)(Fr,{"aria-label":"\u5F53\u524D\u4F1A\u8BDD\u4E0E\u7A97\u53E3\u64CD\u4F5C",title:"\u66F4\u591A\u64CD\u4F5C",children:(0,pa.jsx)(De,{name:"more",size:18})})}),(0,pa.jsxs)(Hu,{align:"end","aria-label":"\u5F53\u524D\u4F1A\u8BDD\u4E0E\u7A97\u53E3\u64CD\u4F5C",children:[(0,pa.jsx)(rn,{icon:"explorer",onSelect:()=>p({type:"layout.files.toggle"}),children:t.layout.filePanelOpen?"\u5173\u95ED\u6587\u4EF6\u9762\u677F":"\u6587\u4EF6"}),(0,pa.jsx)(rn,{icon:"eye",onSelect:()=>{d(),zs.show()},children:"\u672C\u5730\u9884\u89C8"}),(0,pa.jsx)(bX,{id:"workspace-tab-git-badge"}),t.selected&&(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(Ms,{}),(0,pa.jsx)(yX,{selected:t.selected,actions:SI(t.selected,!1),onAction:p,terminalControls:!u})]}),e&&(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(Ms,{}),e(d)]})]})]})]})}function EX(){let e=xi(),t=Gi();return e.layout.sidebarDrawer||!e.layout.sidebarAnchored?(0,pa.jsx)(Fr,{"aria-label":e.layout.sessionsDrawerOpen?"\u5173\u95ED\u4F1A\u8BDD\u4FA7\u680F":"\u6253\u5F00\u4F1A\u8BDD\u4FA7\u680F","aria-expanded":e.layout.sessionsDrawerOpen,"aria-controls":"sessions-drawer",onClick:()=>{t({type:"layout.drawer.toggle"})},children:(0,pa.jsx)(F1,{open:e.layout.sessionsDrawerOpen,size:18})}):null}var Eg=B(_(),1),Mr=B(Ee(),1);function N6e({status:e}){let t=e==="running"||e==="thinking",r=e==="waiting-input"?"\u7B49\u5F85\u8F93\u5165":e==="failed"?"\u5931\u8D25":t?"\u8FD0\u884C\u4E2D":e==="stopped"||e==="exited"?"\u5DF2\u7ED3\u675F":"\u7A7A\u95F2";return!t&&e!=="failed"&&e!=="waiting-input"?(0,Mr.jsx)("span",{className:"workbar-accessible-title",children:r}):(0,Mr.jsx)("span",{"aria-label":r,title:r,children:(0,Mr.jsx)(Ci,{status:e==="failed"?"error":t?"processing":"warning",className:Je("workspace-tab-dot",t?"running":"idle"),"aria-hidden":!0})})}function P6e({className:e,...t}={}){return(0,Mr.jsx)(je,{kind:"ghost","aria-label":"\u5DE5\u4F5C\u7A97\u53E3\u64CD\u4F5C",title:"\u5DE5\u4F5C\u7A97\u53E3\u64CD\u4F5C",...t,className:Je("workspace-tab-more",e),children:(0,Mr.jsx)(De,{name:"more",size:18})})}function R6e({children:e,onClose:t}){return(0,Mr.jsxs)("div",{className:"workbar-actions",children:[e,(0,Mr.jsx)(je,{kind:"ghost","aria-label":"\u6253\u5F00\u7EC8\u7AEF",children:(0,Mr.jsx)(De,{name:"terminal",size:18})}),(0,Mr.jsx)(P6e,{onClick:t})]})}function nC({mobile:e,taskName:t,variant:r="task",activeWindowId:n,windows:a,movingDir:o,closingWindowId:l,onSelectWindow:u,onCloseWindow:d,onNewSession:p,onCancelMove:m,leading:v,actions:g}){let b=r==="standalone",x=a.find(y=>y.id===n);return(0,Mr.jsxs)(Ye,{align:"center",gap:8,className:"workspace-tab-bar","data-session-tabs":r,children:[(0,Mr.jsx)("h1",{className:"workbar-accessible-title",children:x?.label||t||"\u5DE5\u4F5C\u7A97\u53E3"}),v,(0,Mr.jsxs)(Ye,{align:"center",gap:8,className:"workspace-tab-bar-list",children:[(0,Mr.jsx)(Bt,{children:(0,Mr.jsx)(ed,{theme:{components:{Tabs:{cardBg:"transparent",cardPadding:"6px 10px",itemSelectedColor:"var(--text-link)",itemActiveColor:"var(--text-link)",itemHoverColor:"var(--text-link)"}}},children:(0,Mr.jsx)(vy,{className:"wand-workspace-tabs",type:"editable-card",hideAdd:!0,tabBarStyle:{marginBottom:0},style:{flex:1,minWidth:0},"aria-label":b?"\u672A\u5206\u7EC4\u4F1A\u8BDD\u6807\u7B7E":`\u4EFB\u52A1 ${t} \u7684\u5DE5\u4F5C\u7A97\u53E3\u6807\u7B7E`,activeKey:n??void 0,items:a.map(y=>({key:y.id,closable:b||!e,label:(0,Mr.jsxs)("span",{className:Je("wand-workspace-tab-label",o&&!y.containsMoving&&"move-target",y.containsMoving&&"moving-source"),title:o&&!y.containsMoving?`\u628A\u5F53\u524D\u7EC8\u7AEF\u79FB\u5165\u300C${y.label}\u300D`:`${y.label}${y.count>1?"\uFF08\u5206\u5C4F\u5DE5\u4F5C\u7A97\u53E3\uFF09":""}${y.titleGenerating?" \xB7 AI \u6B63\u5728\u751F\u6210\u6807\u9898":""}`,children:[(0,Mr.jsx)(N6e,{status:y.status}),y.session?(0,Mr.jsx)(Df,{session:y.session,className:"workspace-tab-logo"}):null,(0,Mr.jsx)("span",{className:y.titleGenerating?"title-generating":void 0,"aria-busy":y.titleGenerating||void 0,children:y.label})]}),closeIcon:(0,Mr.jsx)("span",{title:b?"\u5173\u95ED\u5E76\u5220\u9664\u4F1A\u8BDD":"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3\uFF08\u5C06\u7ED3\u675F\u5E76\u5220\u9664\u5176\u4E2D\u4F1A\u8BDD\uFF09","aria-label":`${b?"\u5173\u95ED\u5E76\u5220\u9664\u4F1A\u8BDD":"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3"} ${y.label}`,"aria-busy":l===y.id,"aria-disabled":l!=null,children:(0,Mr.jsx)(De,{name:"close",size:12})})})),onChange:o?void 0:y=>u?.(y),onTabClick:o?y=>u?.(y):void 0,onEdit:(y,E)=>{E==="remove"&&typeof y=="string"&&!l&&d?.(y)}})})}),(0,Mr.jsx)(je,{kind:"ghost",type:"button",className:"workspace-tab-add",title:b?"\u5728\u5F53\u524D\u76EE\u5F55\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF":"\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF\uFF08\u5728\u540C\u4E00 worktree\uFF09","aria-label":"\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF",onClick:p,children:(0,Mr.jsx)(De,{name:"plus",size:18})})]}),(0,Mr.jsx)("div",{className:"workbar-spacer"}),o?(0,Mr.jsxs)(je,{kind:"ghost",className:"workspace-tab-move-hint",title:"\u9009\u62E9\u76EE\u6807\u7A97\u53E3 \xB7 Esc \u53D6\u6D88",onClick:m,children:[(0,Mr.jsx)(De,{name:"close",size:14}),(0,Mr.jsx)("span",{children:"\u9009\u62E9\u76EE\u6807 \xB7 Esc \u53D6\u6D88"})]}):null,g??(0,Mr.jsx)(R6e,{})]})}function O6e({mobile:e,taskName:t,session:r}){return(0,Mr.jsx)(nC,{mobile:e,taskName:t,activeWindowId:r.id,windows:[{id:r.id,label:$f(r,0),status:r.status,count:1,session:r}]})}function z6e({mobile:e,session:t}){return(0,Mr.jsx)(nC,{mobile:e,variant:"standalone",taskName:"",activeWindowId:t.id,windows:[{id:t.id,label:$f(t,0),status:t.status,count:1,session:t}]})}var wy=B(_(),1);function L6e(e,t,r){if(!t||t.source!=="wand"&&t.source!=="automation"||t.workspaceTaskId||t.archived)return null;let n=e.find(a=>a.standaloneSessions.some(o=>o.id===t.id));if(n){let a=Ff(n.standaloneSessions.filter(o=>{let l=r?.get(o.id);return!o.archived&&!o.teamChat&&!o.workspaceTaskId&&(!r||!!l)&&!l?.archived&&!l?.workspaceTaskId}));return a.some(o=>o.id===t.id)?{group:n,sessions:a}:null}return e.some(a=>a.archivedSessions?.some(o=>o.id===t.id)||a.tasks.some(o=>[...o.sessions,...o.archivedSessions??[]].some(l=>l.id===t.id)))?null:{group:null,sessions:[{id:t.id,title:t.title,cwd:t.cwd,status:t.status,provider:Fl(t),sessionKind:t.kind,startedAt:t.startedAt}]}}var NE=B(Ee(),1);function H6e({fallback:e=null}={}){let t=xi(),r=Gi(),{groups:n,loading:a,reload:o}=_A(),l=t.selected,[u,d]=wy.useState(null),p=wy.useRef(!1),m=wy.useRef(null),v=m.current;v&&t.selected?.id!==v.ownerId&&(t.selected||t.sidebar.groups.some(S=>S.entries.some(F=>F.id===v.ownerId)))&&(v.navigatedAway=!0);let g=wy.useRef(t);g.current=t,wy.useEffect(()=>{l?.id&&!(a&&n.length===0)&&!n.some(S=>S.standaloneSessions.some(F=>F.id===l.id))&&o()},[l?.id,o]);let b=new Map(t.sidebar.groups.flatMap(S=>S.entries.map(F=>[F.id,F]))),x=L6e(n,l,b);if(!x||!l)return e;let y=x.sessions.map(S=>{let F=b.get(S.id);return{...D1(S,F?.title),status:F?.status??S.status}}),E=x.group;return(0,NE.jsx)(rg,{children:(0,NE.jsx)(nC,{mobile:t.viewport.mobile,variant:"standalone",taskName:"",leading:(0,NE.jsx)(EX,{}),actions:(0,NE.jsx)(xX,{}),activeWindowId:l.id,closingWindowId:u,windows:y.map((S,F)=>({id:S.id,label:$f(S,F),status:S.status,count:1,session:S,titleGenerating:S.id===l.id&&t.topbar.titleGenerating})),onSelectWindow:S=>{S!==l.id&&r({type:"session.select",id:S,focusInput:!1})},onCloseWindow:S=>{let F=Ha.getRuntime(),$=y.findIndex(D=>D.id===S);if(!F||p.current||$<0)return;p.current=!0;let C={ownerId:l.id,navigatedAway:!1};m.current=C,d(S),(async()=>{try{if(!await F.closeTaskSessions([S],"terminal"))return;let D=g.current;if(!C.navigatedAway&&l.id===S&&(!D.selected||D.selected.id===S)){let I=new Map(D.sidebar.groups.flatMap(A=>A.entries.map(j=>[j.id,j]))),M=[...y.slice($+1),...y.slice(0,$).reverse()].find(A=>{let j=I.get(A.id);return j&&!j.archived&&!j.workspaceTaskId});await r(M?{type:"session.select",id:M.id,focusInput:!1}:{type:"nav.home"})}await o()}catch(D){F.toast(D instanceof Error?D.message:"\u5173\u95ED\u4F1A\u8BDD\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","danger")}finally{m.current=null,p.current=!1,d(null)}})()},onNewSession:()=>La.open({initialCwd:l.cwd||E?.workspaceCwd,workspaceId:E?!E.synthetic&&!E.global?E.workspaceId:void 0:l.workspaceId})})})}var Do=B(Ee(),1);function PE(){return Ha.getRuntime()}function q6e(e,t){return e!==null&&JSON.stringify(e)===JSON.stringify(t)}function W6e(e,t){let r=So(e.layout),n=Ji(e.layout,e.activeTabId),a=n?.kind==="session"?n.sessionId:r[0],o=a?t.get(a):void 0,l=o?$f(o.session,o.index):"\u5DE5\u4F5C\u7A97\u53E3";return{label:r.length>1?`${l} \xB7 ${r.length}`:l,status:o?.session.status,count:r.length,session:o?.session}}function V6e({fallback:e=null}={}){let t=Eg.useSyncExternalStore(Kr.subscribe,Kr.getSnapshot,Kr.getServerSnapshot),r=xi(),n=Gi(),a=r.viewport.mobile,[o,l]=Eg.useState(null),[u,d]=Eg.useState(null),p=r.selected?.id??null,m=q$(t.taskId);Eg.useEffect(()=>{l(null)},[t.taskId]),Eg.useEffect(()=>{if(!o)return;let A=j=>{j.key==="Escape"&&l(null)};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[o]);let v=new Map(r.sidebar.groups.flatMap(A=>A.entries.map(j=>[j.id,j.title]))),g=Ff(m?.sessions??[]).map(A=>D1(A,v.get(A.id))),b=m?.cwd??t.cwd,x=g.map(A=>A.id),y=t.layout??m?.layout??null,E=Wu(y,x,p),S=new Map(g.map((A,j)=>[A.id,{session:A,index:j}]));if(Eg.useEffect(()=>{!t.taskId||!m||q6e(y,E)||PE()?.saveTaskLayout(E,{automatic:!0})},[y,t.taskId,m,E]),a)return e;if(!t.taskId)return(0,Do.jsx)(H6e,{fallback:e});if(E.windows.length===0)return e;let F=A=>{let j=PE();if(!j)return;if(o){let V=Ji(A.layout,A.activeTabId),W=BD(E,o.sessionId,A.id,V?.id,o.dir);if(W!==E){j.saveTaskLayout(W);let H=Ts(W);H?.kind==="session"&&n({type:"session.select",id:H.sessionId})}l(null);return}let P=y6(E,A.id);j.saveTaskLayout(P);let O=Ji(A.layout,A.activeTabId);O?.kind==="session"&&n({type:"session.select",id:O.sessionId,focusInput:!1})},$=A=>{let j=Ts(E);j?.kind!=="session"||E.windows.length<2||l({sessionId:j.sessionId,dir:A})},C=async A=>{let j=PE();if(!j||u)return;let P=So(A.layout);d(A.id);try{if(!await j.closeTaskSessions(P,"window")||Kr.getSnapshot().taskId!==t.taskId)return;let O=w6(E,A.id);j.saveTaskLayout(O);let V=Ts(O);V?.kind==="session"&&n({type:"session.select",id:V.sessionId}),l(null),t.taskId&&As.load(t.taskId).catch(()=>{}),j.toast(P.length>1?`\u5DF2\u5173\u95ED ${P.length} \u4E2A\u7EC8\u7AEF`:"\u5DF2\u5173\u95ED\u7EC8\u7AEF","success")}finally{d(null)}},D=()=>{PE()?.closeWorkspace(),n({type:"nav.home"})},I=()=>La.open({initialCwd:b,workspaceId:t.workspaceId||void 0,workspaceTaskId:t.taskId||void 0,taskName:t.taskName||void 0}),M=E.windows.find(A=>A.id===E.activeWindowId);return(0,Do.jsx)(rg,{children:(0,Do.jsx)(nC,{mobile:a,taskName:t.taskName,activeWindowId:E.activeWindowId,windows:E.windows.map(A=>({id:A.id,...W6e(A,S),titleGenerating:So(A.layout).includes(p??"")&&r.topbar.titleGenerating,containsMoving:!!(o&&So(A.layout).includes(o.sessionId))})),movingDir:o?.dir,closingWindowId:u,onSelectWindow:A=>{let j=E.windows.find(P=>P.id===A);j&&F(j)},onCloseWindow:A=>{let j=E.windows.find(P=>P.id===A);j&&C(j)},onNewSession:I,onCancelMove:()=>l(null),leading:(0,Do.jsx)(EX,{}),actions:(0,Do.jsx)(xX,{windowActions:A=>(0,Do.jsxs)(Do.Fragment,{children:[E.windows.length>1&&(0,Do.jsxs)(Do.Fragment,{children:[(0,Do.jsx)(rn,{icon:"splitHorizontal",onSelect:()=>{A(),$("h")},children:"\u79FB\u52A8\u5F53\u524D\u4F1A\u8BDD\u5E76\u5DE6\u53F3\u5206\u5C4F"}),(0,Do.jsx)(rn,{icon:"splitVertical",onSelect:()=>{A(),$("v")},children:"\u79FB\u52A8\u5F53\u524D\u4F1A\u8BDD\u5E76\u4E0A\u4E0B\u5206\u5C4F"})]}),M&&(0,Do.jsx)(rn,{icon:"close",disabled:u!==null,onSelect:()=>{A(),C(M)},children:"\u5173\u95ED\u5F53\u524D\u5DE5\u4F5C\u7A97\u53E3"}),(0,Do.jsx)(rn,{icon:"back",onSelect:()=>{A(),D()},children:"\u9000\u51FA\u4EFB\u52A1\u6807\u7B7E\u7EC4"})]})})})})}function w9(e){return typeof e=="string"?e.trim().replace(/^v/,"").split("+")[0]:""}function U6e(e,t){let r=e.previousInstanceId.trim(),n=w9(e.expectedVersion),a=t.serverInstanceId.trim(),o=w9(t.packageVersion||t.currentVersion),l=!r||a.length>0&&a!==r,u=!n||o===n;return{ready:l&&u,instanceReady:l,versionReady:u,currentInstanceId:a,currentVersion:o}}function G6e(e){return e.lastError?`\u670D\u52A1\u6682\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u7EE7\u7EED\u7B49\u5F85\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.attempts===0?e.mode==="auto-update"?"\u6B63\u5728\u7B49\u5F85\u66F4\u65B0\u5B8C\u6210\u5E76\u91CD\u542F\u670D\u52A1\u2026":"\u6B63\u5728\u7B49\u5F85\u670D\u52A1\u91CD\u65B0\u542F\u52A8\u2026":!e.readiness.instanceReady&&!e.readiness.versionReady?`\u6B63\u5728\u7B49\u5F85\u65B0\u670D\u52A1\u5B9E\u4F8B\u548C\u76EE\u6807\u7248\u672C\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.readiness.instanceReady?e.readiness.versionReady?`\u6B63\u5728\u7B49\u5F85\u670D\u52A1\u5C31\u7EEA\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:`\u65B0\u670D\u52A1\u5DF2\u542F\u52A8\uFF0C\u6B63\u5728\u7B49\u5F85\u7248\u672C ${e.target.expectedVersion||e.latestVersion||"\u76EE\u6807\u7248\u672C"}\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:`\u76EE\u6807\u7248\u672C\u5DF2\u5C31\u7EEA\uFF0C\u6B63\u5728\u7B49\u5F85\u65B0\u670D\u52A1\u5B9E\u4F8B\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`}function FI(e){let t=e.mode==="auto-update",r=t?"\u81EA\u52A8\u66F4\u65B0\u4E2D":e.target.expectedVersion?"\u6B63\u5728\u5B8C\u6210\u66F4\u65B0":"\u670D\u52A1\u6B63\u5728\u91CD\u542F",n=t?`${e.currentVersion||"-"} \u2192 ${e.latestVersion||"-"}
254
- \u6B63\u5728\u4E0B\u8F7D\u5E76\u5B89\u88C5\u65B0\u7248\u672C\uFF0C\u5B8C\u6210\u540E\u5C06\u81EA\u52A8\u91CD\u542F\u3002`:e.target.expectedVersion?"\u5B89\u88C5\u5B8C\u6210\u5E76\u542F\u52A8\u65B0\u7248\u672C\u540E\u5C06\u81EA\u52A8\u5237\u65B0\u9875\u9762\u3002":"\u670D\u52A1\u6062\u590D\u540E\u5C06\u81EA\u52A8\u5237\u65B0\u9875\u9762\u3002",a="";return e.phase==="checking"?a=`\u6B63\u5728\u68C0\u67E5\u670D\u52A1\u72B6\u6001\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.phase==="ready"?a="\u65B0\u670D\u52A1\u548C\u76EE\u6807\u7248\u672C\u5747\u5DF2\u5C31\u7EEA\uFF0C\u6B63\u5728\u5237\u65B0\u9875\u9762\u2026":e.phase==="timed-out"?a=e.lastError||"\u7B49\u5F85\u670D\u52A1\u91CD\u542F\u8D85\u65F6\uFF0C\u8BF7\u624B\u52A8\u5237\u65B0\u9875\u9762\u3002":e.phase==="waiting"&&(a=G6e(e)),e.phase==="timed-out"&&(r=t||e.target.expectedVersion?"\u66F4\u65B0\u672A\u5B8C\u6210":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA",n="\u8BF7\u67E5\u770B\u5931\u8D25\u539F\u56E0\uFF0C\u624B\u52A8\u5237\u65B0\u540E\u6838\u5BF9\u670D\u52A1\u72B6\u6001\u3002"),{title:r,description:n,liveStatus:a}}function K6e(e){let t=ya(e)?e:{};return{serverInstanceId:Ke(t.serverInstanceId),packageVersion:Ke(t.packageVersion),currentVersion:Ke(t.currentVersion)}}var LG=class extends Error{constructor(e,t=0){super(e),ie(this,"status",t),this.name="RestartOverlayRepositoryError"}},X6e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ie(this,"fetchImpl",e)}async loadConfig(e={}){let t=await this.fetchImpl("/api/config",{credentials:"same-origin",signal:e.signal}),r;try{r=await t.json()}catch{throw new LG(`\u670D\u52A1\u72B6\u6001\u54CD\u5E94\u65E0\u6548\uFF08HTTP ${t.status}\uFF09\u3002`,t.status)}let n=ya(r)?r:{};if(!t.ok||typeof n.error=="string")throw new LG(Ke(n.error)||`\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF08HTTP ${t.status}\uFF09\u3002`,t.status);let a=K6e(n);if(e.expectedVersion){let o=await this.fetchImpl("/api/update-status",{credentials:"same-origin",signal:e.signal,cache:"no-store"});if(o.ok){let l=await o.json();ya(l)&&l.version===e.expectedVersion&&ya(l.status)&&l.status.phase==="failed"&&(a.updateFailure=Ke(l.status.message)||"\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002",Nu("update_failed",new Error(a.updateFailure)))}}return a}},Q6e=new X6e,$I=2e3,Sk=180,Y6e=$I,J6e=$I*Sk;function HG(e=0){return{open:!1,mode:"restart",phase:"idle",currentVersion:"",latestVersion:"",target:{previousInstanceId:"",expectedVersion:""},attempts:0,maxAttempts:Sk,readiness:{ready:!1,instanceReady:!1,versionReady:!1,currentInstanceId:"",currentVersion:""},lastError:"",revision:e}}function RE(e){return typeof e=="string"?e.trim():""}function Z6e(e){let t=HG(),r=null,n=null,a=null,o=null,l=0,u=new Set;function d(C){t={...t,...C,revision:t.revision+1};for(let D of u)D()}function p(){r!==null&&(e.clock.clearInterval(r),r=null)}function m(){n!==null&&(e.clock.clearTimeout(n),n=null)}function v(){a!==null&&(e.clock.clearTimeout(a),a=null)}function g(C=new DOMException("Restart probe cancelled.","AbortError")){v();let D=o;o=null,D?.abort(C)}function b(){p(),m()}function x(){b(),g()}function y(C){C!==l||!t.open||t.phase==="ready"||t.phase==="timed-out"||(b(),g(),d({phase:"timed-out"}))}function E(C){d({phase:"timed-out",lastError:Tf(C,"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002")})}function S(){try{e.reloadPage()}catch(C){E(C)}}async function F(C){if(C!==l||!t.open||t.phase==="timed-out"||t.phase==="ready")return;o!==null&&g(new DOMException("Restart probe timed out.","TimeoutError"));let D=new AbortController;o=D;let I=t.attempts+1;d({phase:"checking",attempts:I,lastError:""});let M=()=>{},A=new Promise((P,O)=>{let V=()=>{M(),O(D.signal.reason instanceof Error?D.signal.reason:new DOMException("Restart probe cancelled.","AbortError"))};M=()=>D.signal.removeEventListener("abort",V),D.signal.addEventListener("abort",V,{once:!0})});a=e.clock.setTimeout(()=>{C!==l||o!==D||D.abort(new DOMException("Restart probe timed out.","TimeoutError"))},Y6e);let j=!1;try{let P=await Promise.race([e.repository.loadConfig({signal:D.signal,expectedVersion:t.target.expectedVersion}),A]);if(D.signal.aborted||C!==l||o!==D||!t.open)return;if(P.updateFailure){b(),d({phase:"timed-out",lastError:P.updateFailure});return}let O=U6e(t.target,P);j=O.ready,d({phase:O.ready?"ready":"waiting",readiness:O,lastError:""}),O.ready&&(b(),S())}catch(P){if(C!==l||o!==D||!t.open)return;if(D.signal.aborted&&D.signal.reason instanceof DOMException){if(D.signal.reason.name!=="TimeoutError")return;d({phase:"waiting",lastError:"\u670D\u52A1\u72B6\u6001\u68C0\u67E5\u8D85\u65F6\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002"})}else d({phase:"waiting",lastError:Tf(P,"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002")})}finally{M(),o===D&&(v(),o=null)}!j&&C===l&&t.open&&I>=Sk&&y(C)}function $(C,D,I,M,A){l+=1,x();let j={previousInstanceId:RE(M),expectedVersion:w9(A)};t={open:!0,mode:C,phase:"waiting",currentVersion:RE(D),latestVersion:RE(I),target:j,attempts:0,maxAttempts:Sk,readiness:{ready:!1,instanceReady:!j.previousInstanceId,versionReady:!j.expectedVersion,currentInstanceId:"",currentVersion:""},lastError:"",revision:t.revision+1};for(let O of u)O();let P=l;r=e.clock.setInterval(()=>{F(P)},$I),n=e.clock.setTimeout(()=>y(P),J6e)}return{showRestart(C,D){$("restart","",RE(D),C,D)},showAutoUpdate(C,D,I){$("auto-update",C,D,I,D)},manualRefresh(){t.open&&S()},isOpen(){return t.open},subscribe(C){return u.add(C),()=>u.delete(C)},getSnapshot(){return t},dispose(){if(l+=1,x(),!(!t.open&&t.phase==="idle")){t=HG(t.revision+1);for(let C of u)C()}}}}var eEe={setInterval(e,t){return globalThis.setInterval(()=>{e()},t)},clearInterval(e){globalThis.clearInterval(e)},setTimeout(e,t){return globalThis.setTimeout(()=>{e()},t)},clearTimeout(e){globalThis.clearTimeout(e)}},Xl=Z6e({repository:Q6e,clock:eEe,reloadPage:()=>globalThis.location.reload()});function tEe(e,t){Xl.showRestart(e,t)}function rEe(e,t,r){Xl.showAutoUpdate(e,t,r)}var Er=B(Ee(),1),nEe=T0(()=>globalThis.__wandImportBrowserModule("5efc2e6b76e3291b").then(e=>e.ConversationHome),{title:"\u804A\u5929"}),aEe=T0(()=>globalThis.__wandImportBrowserModule("fcc0972fcce206cc").then(e=>e.WorkspaceWindow),{title:"\u5206\u5C4F\u7EC8\u7AEF",renderPending:e=>(0,Er.jsx)("div",{className:"workspace-window",style:{flex:1,minHeight:0,minWidth:0},children:e})}),iEe=Pn(()=>globalThis.__wandImportBrowserModule("7a48036819d5122b").then(e=>e.ScheduledTasksPage),_l,(e,t)=>e.open&&(e.page==="schedules"||e.page==="calendar")&&t.visible,{title:"\u5B9A\u65F6",page:!0,close:()=>En.close()}),oEe=Pn(()=>globalThis.__wandImportBrowserModule("b2c1133bca66543a").then(e=>e.KnowledgeHost),kl,(e,t)=>e.open&&t.visible,{title:"\u77E5\u8BC6\u5E93",page:!0,close:()=>es.close()});function sEe(e){return{terminal:`terminal-container ${e.terminal?"active":"hidden"}`,chat:`chat-container ${e.chat?"active":"hidden"}`,blank:`blank-chat${e.blank?"":" hidden"}`,composer:`input-panel${e.composer?"":" hidden"}`}}function lEe({className:e,queueRef:t,workspaceTask:r,workspaceProject:n}){return(0,Er.jsxs)(Ye,{vertical:!0,id:"blank-chat",className:e,style:{flex:1,minHeight:0,overflow:"auto",padding:24,position:"relative",display:e.includes("hidden")?"none":void 0},children:[(0,Er.jsx)("div",{className:"blank-chat-attention",children:(0,Er.jsx)(d6e,{})}),(0,Er.jsxs)(Ye,{vertical:!0,align:"center",justify:"center",gap:"middle",style:{flex:1},children:[(0,Er.jsx)(Pu,{style:{width:48,height:48}}),(0,Er.jsx)(Wt.Title,{level:2,children:r?.taskName||n?.workspaceName||"\u5F00\u59CB\u65B0\u7684\u5DE5\u4F5C"}),(0,Er.jsx)(je,{id:"welcome-new-work",kind:"primary",onClick:()=>La.open({initialCwd:r?.cwd||n?.cwd,workspaceId:r?.workspaceId||n?.workspaceId,workspaceTaskId:r?.taskId,taskName:r?.taskName}),children:"\u65B0\u5EFA\u5DE5\u4F5C"})]}),(0,Er.jsx)("div",{id:"cross-session-queue-host",ref:t})]})}function uEe({legacyRefs:e}={}){let t=xg.useSyncExternalStore(Td.subscribe,Td.getSnapshot,Td.getSnapshot),r=xg.useSyncExternalStore(qa.subscribe,qa.getSnapshot,qa.getSnapshot),n=xi(),a=ag(),o=Gi(),l=xg.useSyncExternalStore(_l.subscribe,_l.getSnapshot,_l.getSnapshot),u=xg.useSyncExternalStore(kl.subscribe,kl.getSnapshot,kl.getSnapshot),d=sEe(n.legacyVisibility),p=xg.useSyncExternalStore(Kr.subscribe,Kr.getSnapshot,Kr.getServerSnapshot),m=!!p.taskId&&Sf(p.layout)?.layout.type==="split",v=xg.useSyncExternalStore(Al.subscribe,Al.getSnapshot,Al.getSnapshot),g=!v.open&&!r.open&&!l.open&&!u.open&&!t.open&&(a.active===!0||a.active===null&&!m&&!n.selected&&!p.workspaceId),b=v.open||r.open||g||l.open||u.open||t.open;return(0,Er.jsxs)(Ye,{component:"main",vertical:!0,inert:n.layout.sessionsBackdropVisible,className:`main-content${n.layout.filePanelOpen&&!r.open?" file-panel-open":""}${m?" main-content-in-split":""}${g?" main-content-conversation":""}${l.open?" task-board-main-content":""}${b?" main-content-page-layer":""}`,style:{flex:1,minWidth:0,minHeight:0,position:"relative",overflow:"hidden"},children:[!b&&(0,Er.jsx)(V6e,{fallback:(0,Er.jsx)(_6e,{})}),v.open&&!r.open&&(0,Er.jsx)(IA,{}),(0,Er.jsx)(Q7,{explorerRef:e?.fileExplorer,suspended:r.open||v.open||u.open}),(0,Er.jsx)("div",{id:"output",inert:b,className:d.terminal,ref:e?.terminal,style:{flex:1,minHeight:0,position:"relative",overflow:"hidden",display:n.legacyVisibility.terminal&&!m?"flex":"none"}}),(0,Er.jsx)("div",{id:"chat-output",inert:b,className:d.chat,ref:e?.chat,style:{flex:1,minHeight:0,position:"relative",overflow:"hidden",display:n.legacyVisibility.chat&&!m?"flex":"none",flexDirection:"column"}}),(0,Er.jsx)(lEe,{className:`${d.blank}${m||v.open||g||r.open||u.open?" hidden":""}`,queueRef:e?.crossSessionQueue,workspaceTask:p.taskId&&p.workspaceId?{workspaceId:p.workspaceId,workspaceName:p.workspaceName,taskId:p.taskId,taskName:p.taskName,cwd:p.cwd}:void 0,workspaceProject:!p.taskId&&p.workspaceId?{workspaceId:p.workspaceId,workspaceName:p.workspaceName,cwd:p.cwd}:void 0}),(0,Er.jsx)("div",{inert:b,className:d.composer,ref:e?.composer,style:{flexShrink:0,position:"relative",display:n.legacyVisibility.composer&&!m?void 0:"none"}}),m?(0,Er.jsx)("div",{style:{display:"contents"},inert:v.open||g||r.open||u.open,"aria-hidden":v.open||g||r.open||u.open,children:(0,Er.jsx)(aEe,{})}):null,(0,Er.jsx)("div",{style:{display:"contents",visibility:r.open||v.open||u.open?"hidden":void 0},inert:r.open||v.open||u.open,"aria-hidden":r.open||v.open||u.open,children:(0,Er.jsx)(O2e,{})}),(0,Er.jsx)(nEe,{enabled:g,visible:g,sidebarOpen:n.layout.sessionsDrawerOpen,onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:yf}),(0,Er.jsxs)("div",{style:{display:"contents",visibility:r.open||v.open||u.open?"hidden":void 0},inert:r.open||v.open||u.open,"aria-hidden":r.open||v.open||u.open,children:[l.open&&l.page==="teamchat"?(0,Er.jsx)(bA,{runId:l.runId,sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:yf}):l.open&&l.page==="teams"?(0,Er.jsx)(vA,{sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:yf}):l.open&&l.page==="board"?(0,Er.jsx)(z2e,{sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:yf}):null,(0,Er.jsx)(iEe,{visible:l.open&&(l.page==="schedules"||l.page==="calendar")&&!r.open,view:l.page==="calendar"?"calendar":"list",calendarMode:l.calendarRange,onViewChange:x=>En.open("","",x==="calendar"?"calendar":"schedules"),onCalendarModeChange:x=>En.calendarRange(x),sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:yf})]}),(0,Er.jsx)(oEe,{visible:u.open&&!r.open&&!v.open,onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0}),(0,Er.jsx)(BA.Provider,{value:!0,children:(0,Er.jsx)(L2e,{})}),(0,Er.jsx)(rC,{showRestart:Xl.showRestart})]})}var mr=B(_(),1),qG=B(Jt(),1);function kX(e,t){if(!e||t.sessionId&&t.sessionId!==e)return;if(t.type==="disconnected")return"\u5DF2\u65AD\u5F00 \xB7 \u81EA\u52A8\u91CD\u8FDE\u4E2D";if(t.type==="connected")return"\u8FDE\u63A5\u4E2D";if(t.sessionId!==e)return;let r=["stopped","exited","failed"].includes(t.data?.status||"");if(t.type==="init")return r?"\u8FDB\u7A0B\u5DF2\u7ED3\u675F":"\u5DF2\u8FDE\u63A5";if(t.type==="ended"||t.type==="status"&&r)return"\u8FDB\u7A0B\u5DF2\u7ED3\u675F";if(t.type==="status"&&(t.data?.status==="running"||t.data?.status==="idle"))return"\u5DF2\u8FDE\u63A5";if(t.type==="resync_required")return"\u8FDE\u63A5\u4E2D";if(t.type==="pty_error"||t.type==="error")return"\u8FDE\u63A5\u5F02\u5E38"}var x9=null;function cEe(e){x9=e}function Ju(){if(!x9)throw new Error("\u7EC8\u7AEF\u8FD0\u884C\u65F6\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002");return x9}function dEe(){ba("wand-quick-terminal",`
255
- .quick-terminal-workspace { min-width:0; min-height:0; }
256
- .quick-terminal-toolbar .wand-ui-icon-button { flex:none; }
257
- .quick-terminal-split > .ant-splitter-panel { overflow:hidden; min-width:0; min-height:0; }
258
- .quick-terminal-split[data-dragging="false"] > .ant-splitter-panel { transition:flex-basis var(--motion-normal) var(--ease-out-expo); }
259
- .quick-terminal-panel { display:flex; flex-direction:column; height:100%; min-height:0; min-width:0; overflow:hidden; background:var(--bg-terminal); opacity:0; transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth); }
260
- .quick-terminal-panel[data-open="true"] { opacity:1; transition-duration:var(--motion-normal); }
261
- .quick-terminal-header { flex:none; min-width:0; min-height:40px; padding:4px 8px; box-sizing:border-box; background:var(--bg-primary); }
262
- .quick-terminal-title, .quick-terminal-status, .quick-terminal-header .wand-ui-icon-button { flex:none; }
263
- .quick-terminal-status { font-size:var(--font-size-xs); }
264
- .quick-terminal-header .quick-terminal-directory { flex:1; min-width:0; font-size:var(--font-size-xs); color:var(--text-secondary); }
265
- .quick-terminal-surface .pooled-terminal-wrap { width:100%; height:100%; overflow:hidden; }
266
- @media(prefers-reduced-motion:reduce) { .quick-terminal-split > .ant-splitter-panel,.quick-terminal-panel { transition:none !important; } }
267
- `)}var DI="wand.quick-terminal.v1";function pEe(e){return e==="bottom"?"bottom":"right"}function OE(e){try{let t=JSON.parse(e.getItem(DI)||"{}");return{dock:pEe(t?.dock),sessionId:typeof t?.sessionId=="string"?t.sessionId:"",...t?.creationPending===!0?{creationPending:!0}:{}}}catch{return{dock:"right",sessionId:""}}}function fEe(e,t){try{return e.setItem(DI,JSON.stringify(t)),!0}catch{return!1}}async function VB(e){return typeof navigator<"u"&&navigator.locks?navigator.locks.request(DI,e):e()}var CX=class extends Error{constructor(e){super("\u539F\u7EC8\u7AEF\u5DF2\u4E0D\u5B58\u5728\uFF0C\u53EF\u4EE5\u65B0\u5EFA\u7EC8\u7AEF\u7EE7\u7EED\u4F7F\u7528\u3002"),ie(this,"sessionId",e)}};async function WG(e,t,r=fetch){let n=await r(e?`/api/sessions/${encodeURIComponent(e)}`:"/api/sessions",e?{credentials:"same-origin"}:{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:"pty",shell:!0,cwd:t||"~",sessionSource:"quick-terminal"})});if(!n.ok)throw e&&(n.status===404||n.status===410)?new CX(e):new Error(e?n.status===401?"\u767B\u5F55\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u540E\u8FDE\u63A5\u539F\u7EC8\u7AEF\u3002":n.status===403?"\u6CA1\u6709\u8BBF\u95EE\u539F\u7EC8\u7AEF\u7684\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u8FDE\u63A5\u8D26\u53F7\u3002":"\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u539F\u7EC8\u7AEF\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u65B0\u5EFA\u8FDB\u7A0B\u3002":"\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\uFF0C\u5DF2\u6682\u505C\u91CD\u590D\u521B\u5EFA\uFF0C\u907F\u514D\u4EA7\u751F\u591A\u4E2A\u8FDB\u7A0B\u3002\u5237\u65B0\u9875\u9762\u4E0D\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002");let a=await n.json();if(!a||typeof a.id!="string"||!a.id||a.sessionKind!=="pty"||a.provider)throw new Error("\u7EC8\u7AEF\u54CD\u5E94\u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u590D\u521B\u5EFA\u3002");if(e&&a.id!==e)throw new Error("\u539F\u7EC8\u7AEF\u5F15\u7528\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");let o=!e;if(e&&a.sessionSource!=="quick-terminal"){let l=await r(`/api/sessions/${encodeURIComponent(e)}/quick-terminal`,{method:"PUT",credentials:"same-origin"});if(!l.ok)throw new Error("\u539F\u7EC8\u7AEF\u4ECD\u4FDD\u7559\uFF0C\u4F46\u65E0\u6CD5\u66F4\u65B0\u5FEB\u6377\u7EC8\u7AEF\u6807\u8BB0\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");if(a=await l.json(),a?.id!==e||a.sessionKind!=="pty"||a.provider||a.sessionSource!=="quick-terminal")throw new Error("\u5FEB\u6377\u7EC8\u7AEF\u6807\u8BB0\u672A\u786E\u8BA4\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u65B0\u5EFA\u8FDB\u7A0B\u3002");o=!0}return{id:a.id,cwd:typeof a.cwd=="string"?a.cwd:t,status:a.status,navigationChanged:o}}var zt=B(Ee(),1);function UB({host:e}){let t=mr.useCallback(r=>{r&&r.appendChild(e)},[e]);return(0,zt.jsx)("div",{ref:t,style:{width:"100%",height:"100%",minWidth:0,minHeight:0,overflow:"hidden"}})}function VG(){Xi(),Promise.resolve().then(()=>Ha.getRuntime()?.refreshSessions()).catch(()=>{})}function mEe({children:e}){return typeof document>"u"?(0,zt.jsx)(zt.Fragment,{children:e}):(0,zt.jsx)(hEe,{children:e})}function hEe({children:e}){let t=xi(),[r,n]=mr.useState(()=>{try{return OE(localStorage)}catch{return{dock:"right",sessionId:""}}}),a=mr.useRef(r),[o,l]=mr.useState(!1),[u,d]=mr.useState(!1),[p,m]=mr.useState(!1),[v,g]=mr.useState(""),[b,x]=mr.useState("\u672A\u8FDE\u63A5"),[y,E]=mr.useState(r.creationPending?"\u4E0A\u6B21\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\uFF0C\u5DF2\u6682\u505C\u91CD\u590D\u521B\u5EFA\u3002":""),[S,F]=mr.useState(""),[$,C]=mr.useState(!1),[D,I]=mr.useState(!1),[M,A]=mr.useState(null),[j,P]=mr.useState(!1),[O,V]=mr.useState(()=>new Set),W=mr.useCallback(de=>(V(ve=>new Set(ve).add(de)),()=>V(ve=>{let ye=new Set(ve);return ye.delete(de),ye})),[]),H=O.size>0,q=mr.useRef(null),z=mr.useRef(null),L=mr.useRef(""),U=mr.useRef(!1),Y=mr.useRef(!1),X=mr.useRef(0),J=mr.useRef(!1),N=mr.useRef(!1),[R]=mr.useState(()=>document.createElement("div")),[K]=mr.useState(()=>document.createElement("div")),[Q]=mr.useState(()=>document.createElement("div")),ee=mr.useRef(null),te=de=>{a.current=de,n(de);let ve=!1;try{ve=fEe(localStorage,de)}catch{}return C(!ve),ve};mr.useLayoutEffect(()=>{dEe(),R.style.width="100%";for(let ve of[K,Q])Object.assign(ve.style,{width:"100%",height:"100%",minWidth:"0",minHeight:"0",display:"flex",flexDirection:"column"});let de=new ResizeObserver(ve=>I(ve[0].contentRect.width<680));return q.current&&de.observe(q.current),()=>de.disconnect()},[R,K,Q]);let ne=mr.useCallback(()=>{if(!N.current||!Y.current||!U.current||!L.current)return;let de=document.activeElement;(de===z.current||de===document.body||Q.contains(de))&&Ju().focus(L.current),N.current=!1},[Q]);mr.useLayoutEffect(()=>{o&&ne()},[o,ne]),mr.useEffect(()=>{if(t.auth.phase!=="authenticated")return;let de=!1;return VB(async()=>{if(de)return;let ve=a.current;try{let we=OE(localStorage);(we.sessionId||we.creationPending)&&(ve=we)}catch{}if(!ve.sessionId||ve.creationPending)return;let ye=await WG(ve.sessionId,"");!de&&ye.navigationChanged&&VG()}).catch(()=>{}),()=>{de=!0}},[t.auth.phase]),mr.useEffect(()=>Ju().observe(de=>{if(a.current.creationPending)return;let ve=kX(L.current,de);ve&&(x(ve),de.sessionId===L.current&&(de.type==="ended"||(de.type==="init"||de.type==="status")&&["stopped","exited","failed"].includes(de.data?.status||"")?F(L.current):(de.type==="init"||de.type==="status"&&["running","idle"].includes(de.data?.status||""))&&F("")),de.type==="init"?(E(""),de.data?.cwd&&g(de.data.cwd),ve==="\u5DF2\u8FDE\u63A5"&&ne()):ve==="\u8FDE\u63A5\u5F02\u5E38"&&E("\u7EC8\u7AEF\u64CD\u4F5C\u672A\u786E\u8BA4\uFF0C\u8BF7\u68C0\u67E5\u8F93\u51FA\u540E\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u53D1\u8F93\u5165\u3002"))}),[ne]),mr.useEffect(()=>()=>{X.current++,U.current=!1,N.current=!1,J.current=!1,L.current&&(Ju().retain(L.current,!1),Ju().dispose(L.current))},[]);let me=async(de=!1,ve="")=>{if(Y.current=!0,l(!0),d(!1),N.current=!0,L.current&&U.current&&!de&&!ve&&!a.current.creationPending){o&&ne();return}if(J.current)return;let ye=X.current;J.current=!0,m(!0),x("\u8FDE\u63A5\u4E2D"),E(""),F("");try{let we=Kr.getSnapshot(),Oe=t.selected?.worktree?.path||we.cwd||t.selected?.cwd||"~",Fe=L.current&&!de&&!ve&&!a.current.creationPending?{id:L.current,cwd:v}:await VB(async()=>{if(ye!==X.current)throw new Error("\u7EC8\u7AEF\u9762\u677F\u5DF2\u5173\u95ED\u3002");let $e=a.current;try{let ze=OE(localStorage);(ze.sessionId||ze.creationPending)&&($e=ze)}catch{}if(!$e.sessionId&&$e.creationPending)throw te({...$e,dock:a.current.dock}),new Error("\u4E0A\u6B21\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\uFF0C\u5DF2\u6682\u505C\u91CD\u590D\u521B\u5EFA\u3002");let Me=$e;if(ve&&$e.sessionId===ve&&($e={dock:$e.dock,sessionId:""}),!$e.sessionId&&!te({...$e,creationPending:!0}))throw te(Me),new Error("\u65E0\u6CD5\u4FDD\u5B58\u7EC8\u7AEF\u521B\u5EFA\u72B6\u6001\uFF0C\u8BF7\u5141\u8BB8\u672C\u7AD9\u5B58\u50A8\u540E\u91CD\u65B0\u8FDE\u63A5\uFF1B\u5C1A\u672A\u521B\u5EFA\u65B0\u7EC8\u7AEF\u3002");let qe=await WG($e.sessionId,Oe);return te({dock:a.current.dock,sessionId:qe.id}),qe.navigationChanged&&VG(),qe});if(ye!==X.current||(L.current&&L.current!==Fe.id&&(Ju().retain(L.current,!1),Ju().dispose(L.current),U.current=!1),L.current=Fe.id,g(Fe.cwd),await zf(),ye!==X.current))return;if(!ee.current)throw new Error("\u7EC8\u7AEF\u5BB9\u5668\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");if(Ju().retain(Fe.id,!0),!Ju().mount(Fe.id,ee.current))throw new Error("\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");U.current=!0,de&&Ju().reconnect(Fe.id)}catch(we){if(ye!==X.current)return;we instanceof CX&&F(we.sessionId),x("\u8FDE\u63A5\u5931\u8D25"),E(we instanceof Error?we.message:"\u7EC8\u7AEF\u8FDE\u63A5\u5931\u8D25")}finally{ye===X.current&&(J.current=!1,m(!1))}},se=()=>{Y.current=!1,N.current=!1,d(!1),l(!1),z.current?.focus({preventScroll:!0})},he=D?"bottom":r.dock,le=de=>{let ve=X.current;VB(async()=>{if(ve!==X.current)return;let ye=a.current;try{let we=OE(localStorage);(we.sessionId||we.creationPending)&&(ye=we)}catch{}te({...ye,dock:de}),A(null)})},ke=!!(L.current||r.sessionId),Ae=!!S&&!r.creationPending;return(0,zt.jsx)(G1.Provider,{value:{open:o,show:()=>{me()},trigger:z,chromeHost:R,registerChrome:W},children:(0,zt.jsxs)(Ye,{vertical:!0,ref:q,className:"quick-terminal-workspace",style:{flex:1,minWidth:0,minHeight:0,overflow:"hidden"},children:[(0,zt.jsxs)(Ye,{align:"center",justify:"end",className:"quick-terminal-toolbar",style:{padding:H?0:"2px var(--wand-page-inset, 20px)",borderBottom:H?void 0:"1px solid var(--border-subtle)",flexShrink:0},children:[(0,zt.jsx)("div",{style:{width:"100%",display:H?void 0:"none"},children:(0,zt.jsx)(UB,{host:R})}),!H&&(0,zt.jsx)(ng,{})]}),(0,zt.jsxs)(y1,{orientation:he==="right"?"horizontal":"vertical",className:"quick-terminal-split","data-dragging":j,onResizeStart:()=>P(!0),onResizeEnd:()=>P(!1),style:{flex:1,minHeight:0,minWidth:0},onResize:de=>{let ve=de[0]+de[1];o&&ve&&A(de[1]/ve*100)},children:[(0,zt.jsx)(y1.Panel,{min:o?"20%":0,size:o?`${100-(M??(he==="right"?40:35))}%`:"100%",children:(0,zt.jsx)(UB,{host:K})}),(0,zt.jsx)(y1.Panel,{min:o?"25%":0,max:"70%",size:o?`${M??(he==="right"?40:35)}%`:0,resizable:o,children:(0,zt.jsx)(UB,{host:Q})})]},he),(0,qG.createPortal)(e,K),(0,qG.createPortal)((0,zt.jsxs)("section",{id:"quick-terminal-panel","aria-label":"\u5FEB\u6377\u7EC8\u7AEF","aria-describedby":"quick-terminal-description","aria-hidden":!o,inert:!o,className:"quick-terminal-panel","data-open":o,"data-dock":he,children:[(0,zt.jsxs)(Ye,{align:"center",gap:8,className:"quick-terminal-header",children:[(0,zt.jsx)(Wt.Text,{strong:!0,className:"quick-terminal-title",children:"\u7EC8\u7AEF"}),(0,zt.jsx)("span",{role:"status",className:"quick-terminal-status",title:p?"\u8FDE\u63A5\u4E2D":b,children:!p&&b==="\u5DF2\u8FDE\u63A5"?(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(Ci,{status:"success","aria-hidden":!0}),(0,zt.jsx)("span",{className:"workbar-accessible-title",children:"\u5DF2\u8FDE\u63A5"})]}):p?"\u8FDE\u63A5\u4E2D":b}),(0,zt.jsx)(Wt.Text,{ellipsis:{tooltip:v||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55"},title:v||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55",className:"quick-terminal-directory",children:v.replace(/[\\/]+$/,"").split(/[\\/]/).pop()||v||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55"}),(0,zt.jsxs)(Ed,{open:u&&o,onOpenChange:d,children:[(0,zt.jsx)(Lu,{render:(0,zt.jsx)(Fr,{"aria-label":"\u7EC8\u7AEF\u9009\u9879",title:`\u7EC8\u7AEF\u9009\u9879 \xB7 ${he==="right"?"\u53F3\u4FA7":"\u5E95\u90E8"}\u505C\u9760`,children:(0,zt.jsx)(De,{name:"more",size:16})})}),(0,zt.jsxs)(Hu,{"aria-label":"\u7EC8\u7AEF\u9009\u9879",align:"end",children:[(0,zt.jsx)(rn,{onSelect:()=>le("right"),hint:r.dock==="right"?"\u5DF2\u9009":void 0,children:"\u505C\u9760\u5230\u53F3\u4FA7"}),(0,zt.jsx)(rn,{onSelect:()=>le("bottom"),hint:r.dock==="bottom"?"\u5DF2\u9009":void 0,children:"\u505C\u9760\u5230\u5E95\u90E8"}),(0,zt.jsx)(Ms,{}),(0,zt.jsx)(rn,{icon:"refresh",disabled:p||!ke,onSelect:()=>{me(!0)},children:"\u91CD\u65B0\u8FDE\u63A5"})]})]}),(0,zt.jsx)(Fr,{"aria-label":"\u5173\u95ED\u7EC8\u7AEF\u9762\u677F",title:"\u4EC5\u9690\u85CF\u9762\u677F\uFF0C\u547D\u4EE4\u7EE7\u7EED\u8FD0\u884C\uFF1B\u7ED3\u675F shell \u8BF7\u5728\u7EC8\u7AEF\u8F93\u5165 exit",onClick:se,children:(0,zt.jsx)(De,{name:"close",size:16})})]}),(0,zt.jsxs)("span",{id:"quick-terminal-description",className:"workbar-accessible-title",children:["\u8FD0\u884C\u5728 Wand \u4E3B\u673A\uFF1B\u5173\u95ED\u4EC5\u9690\u85CF\uFF0C\u547D\u4EE4\u7EE7\u7EED\u8FD0\u884C\u3002\u7ED3\u675F shell \u8BF7\u5728\u7EC8\u7AEF\u8F93\u5165 exit\u3002",D&&r.dock==="right"?"\u7A84\u7A97\u4E34\u65F6\u5728\u5E95\u90E8\u663E\u793A\u3002":""]}),$&&(0,zt.jsx)(ri,{type:"warning",title:"\u672C\u9875\u5DF2\u5E94\u7528\uFF0C\u4F46\u5BA2\u6237\u7AEF\u5B58\u50A8\u4E0D\u53EF\u7528\uFF0C\u5237\u65B0\u540E\u53EF\u80FD\u65E0\u6CD5\u6062\u590D\u4F4D\u7F6E\u6216\u7EC8\u7AEF\u3002"}),(y||Ae)&&(0,zt.jsx)(ri,{type:Ae?"info":"error",title:y||"\u539F\u7EC8\u7AEF\u8FDB\u7A0B\u5DF2\u7ED3\u675F\uFF0C\u53EF\u4EE5\u65B0\u5EFA\u7EC8\u7AEF\uFF1B\u539F\u4F1A\u8BDD\u8BB0\u5F55\u4F1A\u4FDD\u7559\u3002",action:Ae?(0,zt.jsx)(je,{disabled:p,onClick:()=>{me(!1,S)},children:"\u65B0\u5EFA\u7EC8\u7AEF"}):ke?(0,zt.jsx)(je,{disabled:p,onClick:()=>{me(!0)},children:"\u91CD\u65B0\u8FDE\u63A5"}):void 0}),(0,zt.jsx)("div",{ref:ee,className:"quick-terminal-surface",style:{flex:1,minWidth:0,minHeight:0,position:"relative",overflow:"hidden"}})]}),Q)]})})}var us=B(Ee(),1),gEe=Pn(()=>globalThis.__wandImportBrowserModule("6ed5e5176549288a").then(e=>e.EmployeeProfileHost),B$,e=>e!==null,{title:"\u5458\u5DE5\u8D44\u6599",close:()=>h1.close(),renderPending:()=>(0,us.jsx)(us.Fragment,{})});function vEe(e){let t=["main-layout"];return e.sessionsDrawerOpen&&t.push("sidebar-open"),e.sidebarAnchored&&t.push("sidebar-pinned"),e.sidebarPinned&&e.sidebarCollapsed&&t.push("sidebar-collapsed"),t.join(" ")}function bEe({legacyRefs:e}={}){let t=xi();return(0,us.jsxs)(kk,{className:"app-container",style:{position:"fixed",top:"calc(var(--app-viewport-top, 0px) + var(--conversation-frame-top, 0px))",left:"var(--conversation-frame-inline, 0px)",right:"var(--conversation-frame-inline, 0px)",height:"calc(var(--app-viewport-height, 100dvh) - var(--conversation-frame-top, 0px) - var(--conversation-frame-bottom, 0px))",overflow:"hidden",paddingTop:"var(--wand-safe-top, 0px)",paddingBottom:"var(--wand-safe-bottom, 0px)"},children:[(0,us.jsx)(I2e,{}),(0,us.jsxs)(kk,{hasSider:!0,className:vEe(t.layout.sidebarDrawer?{...t.layout,sidebarAnchored:!1,sidebarCollapsed:!1}:t.layout),style:{flex:1,minHeight:0},children:[(0,us.jsx)(M6e,{}),(0,us.jsx)(mEe,{children:(0,us.jsx)(uEe,{legacyRefs:e})}),(0,us.jsx)(gEe,{mobile:t.viewport.mobile})]})]})}function yEe({store:e,legacyRefs:t}){return $2e.useLayoutEffect(()=>H6(),[]),(0,us.jsx)(sa,{children:(0,us.jsx)(X7,{store:e,children:(0,us.jsx)(bEe,{legacyRefs:t})})})}var wEe="wand-automation-sessions-expanded",xEe="wand-non-wand-sessions-expanded",E9=new Set;function Ka(e){for(let t of[...E9])t(e)}function SX(){let e=typeof WandNative>"u"?void 0:WandNative;return{width:window.innerWidth,height:window.innerHeight,coarsePointer:typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches,online:navigator.onLine,embedTerminal:document.documentElement.classList.contains("is-wand-embed-terminal"),nativeInput:!!(window.__wandImeNative||window.__wandIosNative),backToNative:typeof e?.backToNative=="function",switchServer:typeof e?.switchServer=="function",automationExpanded:Oy(wEe,!1),historyExpanded:Oy(xEe,!1)}}function EEe(e){E9.add(e);let t=()=>e("viewport:resize"),r=()=>e("network:online"),n=()=>e("network:offline");return window.addEventListener("resize",t),window.addEventListener("online",r),window.addEventListener("offline",n),()=>{E9.delete(e),window.removeEventListener("resize",t),window.removeEventListener("online",r),window.removeEventListener("offline",n)}}function kEe(e,t={}){return new v2e({readSnapshot:()=>tX(h,SX()),applyAction:r=>S2e(e,r),subscribeLegacy:EEe,batchMs:t.batchMs,freezeSnapshots:t.freezeSnapshots})}function FX(e){return e?.sessionKind==="structured"&&e.provider==="pi"}function AI(){let e=h.sessions.find(l=>l.id===h.selectedId),t=document.querySelector("[data-pi-settings-host]"),r=document.querySelector("[data-pi-settings-toggle-host]"),n=document.getElementById("input-box");if(!t||!r||!n||!FX(e)||h.terminalInteractive){ia.clear();return}let a=n.value,o=ia.isExpanded(e.id)||_1(a)&&!h.composerComposing&&!ia.isDismissed(e.id,a);ia.sync([{key:"pi-settings",target:t,toggleTarget:r,sessionId:e.id,draft:a,open:o,onSaved:(l,u)=>{let d=h.sessions.find(p=>p.id===l);d&&(d.piSettings=u,Ka("pi-settings"))},returnFocus:()=>{if(h.selectedId===e.id){if(ia.openedBy()==="toggle"){r.querySelector("button")?.focus();return}n.focus()}}}])}function CEe(e,t){return!FX(t)||h.terminalInteractive?!1:_1(e)?(AI(),ia.reopen(),ia.focusControl(),!0):(ia.dismiss(),!1)}function SEe(e){let t=ia.getSnapshot().mounts[0];return!t||!t.open||e.isComposing||e.keyCode===229?!1:e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),ia.dismiss(),t.returnFocus(),!0):ia.openedBy()==="toggle"&&!_1(t.draft)?!1:(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="Enter")&&!e.shiftKey?(e.preventDefault(),e.stopPropagation(),ia.focusControl(e.key==="ArrowUp"),!0):!1}var UG=Object.freeze({mode:"shortcuts",ctrl:!1,shift:!1,open:!1}),kg=new Map,GB=new Set,di={read(e){return e?kg.get(e)??UG:UG},subscribe(e){return GB.add(e),()=>{GB.delete(e)}},update(e,t){if(!e)return;let r=this.read(e),n={...r,...t};if(!(n.mode===r.mode&&n.ctrl===r.ctrl&&n.shift===r.shift&&n.open===r.open)){kg.delete(e),kg.set(e,Object.freeze(n)),kg.size>128&&kg.delete(kg.keys().next().value);for(let a of GB)a()}},toggle(e,t){this.update(e,{[t]:!this.read(e)[t]})}};function rw(e,t){let r=di.read(e);return{ctrl:t.ctrl||r.ctrl,shift:t.shift||r.shift,alt:t.alt}}function aC(e,t){let{ctrl:r,shift:n,alt:a}=t;if(!r&&!n&&!a)return null;let o=1+(n?1:0)+(a?2:0)+(r?4:0),l={up:"A",down:"B",right:"C",left:"D",home:"H",end:"F"}[e];if(l)return`\x1B[1;${o}${l}`;let u={insert:2,delete:3,pageup:5,pagedown:6}[e];if(u)return`\x1B[${u};${o}~`;if(e==="tab"&&n)return"\x1B[Z";if(e.length!==1)return null;let d=n?e.toUpperCase():e;if(r){let p=d.toLowerCase();if(p>="a"&&p<="z")return String.fromCharCode(p.charCodeAt(0)-96);let m={" ":0,"@":0,"[":27,"\\":28,"]":29,"^":30,_:31};return m[d]===void 0?null:String.fromCharCode(m[d])}return a?"\x1B"+d:d}function FEe(e,t,r){return t?.inputType!=="insertText"||t.data!==e||e.length!==1||e.charCodeAt(0)>127?null:aC(e,r)}function $Ee(){let e=new Map;return{begin(t){let r=new Map;return e.set(t,r),{isCurrent:()=>e.get(t)===r,changed:n=>r.has(n),merge(n,a){let o={...n};if(a)for(let l of r.get(n.id)??[])l in a?o[l]=a[l]:delete o[l];return o},finish(){e.get(t)===r&&e.delete(t)}}},record(t){for(let r of e.values()){let n=r.get(t.id);n||r.set(t.id,n=new Set);for(let a of Object.keys(t))a!=="id"&&n.add(a);if("messages"in t)for(let a of["messages","messageOffset","messageTotal","leadingBlockOffset","leadingBlockTotal"])n.add(a);("permissionBlocked"in t||"pendingEscalation"in t)&&(n.add("permissionBlocked"),n.add("pendingEscalation"))}},reset(){e.clear()}}}function an(e,t){let r;try{r=new Headers(t?.headers!==void 0?t.headers:typeof e=="object"&&e!==null&&"headers"in e?e.headers:void 0),r.set("X-Wand-Tool-Projection","compact")}catch(n){return Promise.reject(n)}return fetch(e,{...t,headers:r})}function Ua(e,t){return e instanceof Error?e.message:t??String(e)}var ok=new Map;function DEe(e){for(let t of ok.get(e)??[])t()}function AEe(e,t=400){return new Promise(r=>{let n=ok.get(e)??new Set;ok.set(e,n);let a=u=>{clearTimeout(l),n.delete(o),n.size||ok.delete(e),r(u)},o=()=>a(!0),l=setTimeout(()=>a(!1),t);n.add(o)})}function GG(e){if(!e||!Array.isArray(e.content))return 0;for(var t=0,r=0;r<e.content.length;r++){var n=e.content[r];if(n){if(typeof n.text=="string"&&(t+=n.text.length),typeof n.thinking=="string"&&(t+=n.thinking.length),typeof n.content=="string")t+=n.content.length;else if(Array.isArray(n.content))for(var a=0;a<n.content.length;a++){var o=n.content[a];o&&typeof o.text=="string"&&(t+=o.text.length)}if(n.input)try{t+=JSON.stringify(n.input).length}catch{}}}return t}function $X(e,t,r="unknown"){return e?t?r==="latest"||GG(t)>=GG(e)?t:Object.assign({},e,{usage:t.usage||e.usage}):e:t}function BEe(e,t,r,n,a="unknown"){return r>0&&e?.role===t?.role&&Array.isArray(t?.content)&&t.content.length>=n?t:$X(e,t,a)}function IEe(e,t,r){return e?.role==="assistant"&&t?.role==="assistant"?$X(e,t,r):t||e}function MEe(e,t,r,n,a,o,l="unknown"){var u=e&&typeof e.messageOffset=="number"?e.messageOffset:0,d=e&&typeof e.leadingBlockOffset=="number"?e.leadingBlockOffset:0,p=e&&typeof e.leadingBlockTotal=="number"?e.leadingBlockTotal:0,m=e&&Array.isArray(e.messages)?e.messages:[],v=typeof n=="number"?n:r+t.length;if(l!=="latest"&&m.length&&v<(e.messageTotal||0))return{messages:m,messageOffset:u,messageTotal:e.messageTotal,leadingBlockOffset:d,leadingBlockTotal:p};if(m.length&&r>u&&a>0){var g=m[r-u],b=t[0];if(g?.role===b?.role&&Array.isArray(g.content)&&Array.isArray(b.content)&&g.content.length>=a&&(g.content.length<=o||l==="latest")){var x=l==="latest"?g.content.slice(0,o):g.content.slice();if(b.content.forEach(function(O,V){x[a+V]=O}),x.length>=o&&Array.from(x).every(function(O){return O!==void 0})){var y=t.slice();y[0]=Object.assign({},b,{content:x});var E=k9(e,y,r,n,l);return E.messages[r-E.messageOffset]=y[0],{...E,leadingBlockOffset:d,leadingBlockTotal:p}}}return{messages:t,messageOffset:r,messageTotal:v,leadingBlockOffset:a,leadingBlockTotal:o}}var S=t,F=!1,$=a,C=o;if(m.length&&t.length&&r===u&&!(l==="latest"&&a===0)&&!(d===0&&a===0)){var D=m[0],I=t[0];if(D?.role===I?.role&&Array.isArray(D.content)&&Array.isArray(I.content)){var M=Math.min(d,a),A=l==="latest"&&o>0?Math.max(o,a+I.content.length):Math.max(d+D.content.length,a+I.content.length),j=new Array(A-M);D.content.forEach(function(O,V){d+V<A&&(j[d+V-M]=O)}),I.content.forEach(function(O,V){j[a+V-M]=O}),Array.from(j).every(function(O){return O!==void 0})&&(S=t.slice(),S[0]=Object.assign({},I,{content:j}),F=!0,$=M,C=l==="latest"?Math.max(o,A):Math.max(p,o,A))}}var P=k9(e,S,r,n,l);return F&&P.messageOffset===r&&(P.messages[0]=S[0]),P.messageOffset<r&&($=d,C=p),{...P,leadingBlockOffset:$,leadingBlockTotal:C}}function k9(e,t,r,n,a="unknown"){var o=r||0,l=typeof n=="number"?n:Math.max(o+t.length,t.length),u=e&&Array.isArray(e.messages)?e.messages:[],d=e&&typeof e.messageOffset=="number"?e.messageOffset:0,p=e&&typeof e.messageTotal=="number"?e.messageTotal:d+u.length;if(a!=="latest"&&t.length===0&&u.length>0&&l===0)return{messages:u,messageOffset:d,messageTotal:p};if(a!=="latest"&&u.length>0&&l<p)return{messages:u,messageOffset:d,messageTotal:p};if(u.length===0)return{messages:t,messageOffset:o,messageTotal:l};if(a==="latest"&&l===0)return{messages:[],messageOffset:0,messageTotal:0};var m=a==="latest"?Math.min(d+u.length,l):d+u.length,v=o+t.length;if(o>m||d>v)return{messages:t,messageOffset:o,messageTotal:l};for(var g=Math.min(d,o),b=Math.max(m,v),x=[],y=g;y<b;y++){var E=y>=d&&y<m?u[y-d]:void 0,S=y>=o&&y<v?t[y-o]:void 0;x.push(IEe(E,S,a))}return{messages:x,messageOffset:g,messageTotal:a==="latest"?l:Math.max(p,l,g+x.length)}}var TEe=B(Ja(),1),Ll=B(Ee(),1);function jEe(e,t,r){let n=document.createElement("div");n.dataset.chatLoadState=t?"failed":"loading",e.replaceChildren(n);let a=(0,TEe.createRoot)(n);return a.render((0,Ll.jsx)(Bt,{children:(0,Ll.jsx)(Ye,{vertical:!0,gap:"small",style:{padding:"var(--wand-page-inset)",minHeight:144},"aria-busy":!t,children:t?(0,Ll.jsxs)(Ll.Fragment,{children:[(0,Ll.jsx)(ri,{type:"error",showIcon:!0,title:"\u4F1A\u8BDD\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\uFF1B\u670D\u52A1\u66F4\u65B0\u540E\u53EF\u80FD\u9700\u8981\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"}),(0,Ll.jsxs)(Ye,{gap:"small",children:[(0,Ll.jsx)(je,{onClick:r,children:"\u91CD\u8BD5"}),(0,Ll.jsx)(je,{onClick:()=>window.location.reload(),children:"\u91CD\u65B0\u52A0\u8F7D\u9875\u9762"})]})]}):(0,Ll.jsxs)(Ye,{align:"center",gap:"small",role:"status",children:[(0,Ll.jsx)(Ki,{}),"\u6B63\u5728\u52A0\u8F7D\u4F1A\u8BDD\u7EC4\u4EF6\u2026"]})})})),()=>{a.unmount(),n.remove()}}function BI(){return C9??(C9=Gxe())}var C9=null,zE=null,Yd=null,Qd=null,Fk=0,Wy=null;function $k(e){return Fk===e.generation&&h.selectedId===e.sessionId&&(h.chatRenderEpoch||0)===e.epoch&&(h.currentView||"chat")==="chat"&&e.root.isConnected&&document.querySelector("#chat-output > .chat-messages")===e.root}function Dk(){Wy?.dispose(),Wy=null}function DX(e,t){$k(e)&&(Wy?.root===e.root&&Wy.failed===t||(Dk(),Wy={root:e.root,failed:t,dispose:jEe(e.root,t,()=>{!Yd||!$k(Yd)||(Qd=null,xa(!0))})}))}function _Ee(){zE||(zE=globalThis.__wandImportBrowserModule("f11e12767426d28a").then(e=>{C9=e;let t=Yd;return Yd=null,Qd=null,e.clearActivityDetailState(),Dk(),t&&$k(t)&&e.renderChat(t.force),e}).catch(e=>{let t=Yd;return t&&$k(t)?(Qd=t,DX(t,!0)):Dk(),console.warn("[wand] chat component download failed"),Promise.reject(e)}).finally(()=>{zE=null}),zE.catch(()=>{}))}function xa(e=!1){let t=BI();if(t){t.renderChat(e);return}if(!h.selectedId||(h.currentView||"chat")!=="chat")return;let r=sI(document.getElementById("chat-output"));if(!r)return;let n={sessionId:h.selectedId,epoch:h.chatRenderEpoch||0,generation:Fk,root:r,force:!!e||!!Yd?.force};Yd=n,!(Qd&&Qd.generation===Fk&&Qd.sessionId===h.selectedId&&Qd.root===r)&&(DX(n,!1),_Ee())}function sc(e=!1){let t=BI();t?t.scheduleChatRender(e):xa()}function iC(){Fk++,Yd=null,Qd=null,Dk(),BI()?.clearActivityDetailState()}typeof window<"u"&&(window.__scheduleChatRender=()=>sc(!0));function Vy(e,t=0){if(t>4||!e)return null;if(typeof e=="string"){let r=e.trim();if(!/^[\[{]/.test(r)||!/"type"\s*:\s*"image(?:_url)?"/.test(r))return null;try{return Vy(JSON.parse(r),t+1)}catch{return null}}if(Array.isArray(e))return e.some(r=>Ak(r)||Vy(r?.text,t+1))?e:null;if(typeof e=="object"){let r=e;return Ak(r)?[r]:Vy(r.content,t+1)}return null}function Ak(e){if(!e||typeof e!="object")return"";if(e.type==="image"){let t=e.source||{},r=t.type==="base64"?t.data:e.data,n=t.media_type||e.mimeType||e.mime_type||"image/png";return typeof r=="string"&&/^image\/[a-z0-9.+-]+$/i.test(n)?`data:${n};base64,${r}`:typeof t.url=="string"?t.url:typeof e.url=="string"?e.url:""}return e.type==="image_url"?typeof e.image_url=="string"?e.image_url:e.image_url?.url||"":""}function II(e){let t=Vy(e);return t?t.flatMap(r=>{let n=Ak(r);return n?[{src:n}]:r?.type==="text"?II(r.text):[]}):[]}function nw(e){if(!e)return"";let t=Vy(e);return t?t.map(r=>r?.type==="text"?nw(r.text):Ak(r)?"":JSON.stringify(r)).filter(Boolean).join(`
268
- `):typeof e=="string"?e:Array.isArray(e)?e.map(r=>{if(!r||typeof r!="object")return"";if(r.type==="text"&&typeof r.text=="string")return nw(r.text);if(r.type==="image"||r.type==="image_url")return"";try{return JSON.stringify(r)}catch{return""}}).filter(Boolean).join(`
269
- `):""}function NEe(e){if(!e)return"";let t=e.preview||"";return II(e.content).length||/"type"\s*:\s*"image(?:_url)?"/.test(t)||/(?:data:image\/[\w.+-]+;base64,|\/(?:9j|wAB)|iVBORw0KGgo)[A-Za-z0-9+/=]{16,}/.test(t)?"\u56FE\u7247\u7ED3\u679C \xB7 \u5C55\u5F00\u67E5\u770B":t}var Ty=/\bgpt-\d+(?:\.\d+)?(?:\s+[a-z0-9.-]+)?\s+·\s+\d+%\s+left\s+·\s+(?:\/|~\/).+/i,KG=/^(?:thinking|working|running|planning|applying|reading|searching|inspecting|reviewing|summarizing|editing|updating|writing|completed)\b/i;function PEe(e){if(!e)return!1;var t=String(e).trim();return t?!!(t.indexOf("\u2500\u2500\u2500\u2500")===0||t==="\u276F"||t==="\u203A"||/^[╭╰│┌└┐┘├┤┬┴┼─═]{2,}$/.test(t)||/^[▁▂▃▄▅▆▇█▔▕▏▐]+$/.test(t)||t.indexOf("esc to interrupt")!==-1||t.indexOf("Claude Code v")!==-1||/^Sonnet\b/.test(t)||t.indexOf("Failed to install Anthropic")!==-1||t.indexOf("Claude Code has switched")!==-1||t.indexOf("? for shortcuts")!==-1||t.indexOf("Claude is waiting")!==-1||t.indexOf("[wand]")!==-1||t.indexOf("0;")===0||t.indexOf("9;")===0||t.indexOf("ctrl+g")!==-1||t.indexOf("/effort")!==-1||/^Using .* for .* session/.test(t)||t.indexOf("Press ")===0&&t.indexOf(" for")!==-1||t.indexOf("type ")===0&&t.indexOf(" to ")!==-1||t.indexOf("auto mode is unavailable")!==-1||/MCP server.*failed/i.test(t)||t.indexOf("Germinating")!==-1||t.indexOf("Doodling")!==-1||t.indexOf("Brewing")!==-1||t.indexOf("Permissions")!==-1&&t.indexOf("mode")!==-1||t.indexOf("\u25CF")===0&&t.indexOf("\xB7")!==-1||t.indexOf("[>")===0||t.indexOf("[<")===0||t.indexOf("Captured Claude session ID")!==-1||/^>_\s*OpenAI Codex\b/.test(t)||/^OpenAI Codex\b/i.test(t)||/^(model|directory):\s+/i.test(t)||/^(tip|context):\s+/i.test(t)||/^work(tree|space):\s+/i.test(t)||/^(approvals?|sandbox|provider|session id):\s+/i.test(t)||/^(thinking|working)(\.\.\.|…)?$/i.test(t)||/^[•◦·]\s+Working\b/i.test(t)||/^[•◦·]\s+(Running|Planning|Applying|Reading|Searching)\b/i.test(t)||/^[•◦·]\s+(Inspecting|Reviewing|Summarizing|Editing|Updating|Writing)\b/i.test(t)||/^[•◦·]\s+Completed\b/i.test(t)||/^(ctrl|enter|tab|shift|esc|alt)\+/i.test(t)||/\b(open|close|toggle) (chat|terminal)\b/i.test(t)||/\b(approve|deny)\b.*\b(permission|approval)\b/i.test(t)||/^(use|press) .* (to|for) .*/i.test(t)||/^(?:token|context window|remaining context|conversation):\s+/i.test(t)||/^(?:cwd|path):\s+\//i.test(t)||/^[<>│┆╎].*[<>│┆╎]$/.test(t)&&t.length<8):!1}function REe(e){if(!e)return!1;var t=String(e).trim();return t?!!(t.indexOf("\u2500\u2500\u2500\u2500")===0||t==="\u276F"||t==="?"||t.indexOf("Claude Code v")!==-1||t.indexOf("Opus")!==-1&&t.indexOf("with")!==-1||t.indexOf("Sonnet")!==-1&&t.indexOf("with")!==-1||t.indexOf("API Usage")!==-1||t.indexOf("Billing")!==-1||t.indexOf("for shortcuts")!==-1||t.indexOf("/effort")!==-1||/^[▸▐▝▘▗▖█▌▍▎▏▔▁▂▃▄▅▆▇██]/.test(t)):!1}function Cg(e){var t=String(e||"").trim();return!!(!t||PEe(t)||Ty.test(t)||/^[╭╰│┌└┐┘├┤┬┴┼─═]/.test(t)||/^\[>[0-9;?]*u$/i.test(t)||/^M+$/i.test(t)||/^(?:OpenAI Codex|Codex)\b/i.test(t)||/^(?:tokens?|context window|remaining context|approvals?|sandbox|provider|session id):\s*/i.test(t)||/^(?:thinking|working)\s*(?:\.\.\.|…)?$/i.test(t)||/^[•◦·]\s+(?:thinking|working|running|planning|applying|reading|searching|inspecting|reviewing|summarizing|editing|updating|writing|completed)\b/i.test(t)||/^(?:model|directory|tip|context|cwd|path):\s+/i.test(t))}function OEe(e){return!e||e.indexOf("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")===0||e==="\u276F"||e.indexOf("esc to interrupt")!==-1||e.indexOf("Claude Code v")!==-1||e.indexOf("Sonnet")!==-1||e.indexOf("~/")===0||e.indexOf("\u25CF high")!==-1||e.indexOf("Failed to install Anthropic marketplace")!==-1||e.indexOf("Claude Code has switched from npm to native installer")!==-1||e.indexOf("Fluttering")!==-1||e.indexOf("? for shortcuts")!==-1||e.indexOf("0;")===0||e.indexOf("9;")===0||e.indexOf("Claude is waiting")!==-1||e.indexOf("\u2722")!==-1||e.indexOf("\u2733")!==-1||e.indexOf("\u2736")!==-1||e.indexOf("\u273B")!==-1||e.indexOf("\u273D")!==-1||e.indexOf("\u2590")===0||e.indexOf("\u259D")===0||e.indexOf("\u2598")===0||(e==="lu"||e==="ue"||e==="tr"||e==="ti"||e==="g"||e==="n"||e==="i\u2026"||e==="\u2026"||e==="uts"||e==="lt"||e==="rg"||e==="\xB7")&&e.length<4||e.indexOf("\u273DF")===0||e.indexOf("\u273BF")===0||e.indexOf("npm WARN")!==-1||e.indexOf("npm notice")!==-1||e.indexOf("added ")!==-1&&e.indexOf(" packages")!==-1||e.indexOf("audited ")!==-1||e.indexOf("found ")!==-1&&e.indexOf(" vulnerabilities")!==-1||e.indexOf("Using ")!==-1&&e.indexOf(" for ")!==-1&&e.indexOf("session")!==-1||e.indexOf("You can use")!==-1||e.indexOf("Press ")!==-1&&e.indexOf(" for")!==-1||e.indexOf("type ")===0&&e.indexOf(" to ")!==-1||e.indexOf("[wand]")===0||e.indexOf("Captured Claude session ID")!==-1||e.indexOf("\u23F5")!==-1||e.indexOf("acceptedit")!==-1||e.indexOf("shift+tab")!==-1||e.indexOf("tabtocycle")!==-1||e.indexOf("ctrl+g")!==-1||e.indexOf("/effort")!==-1||e.indexOf("Opus")!==-1&&e.indexOf("model")!==-1||e.indexOf("Haiku")!==-1||e.indexOf("to cycle")!==-1||e.indexOf("high \xB7")!==-1||e.indexOf("high\xB7")!==-1||e.indexOf("medium \xB7")!==-1||e.indexOf("medium\xB7")!==-1||e.indexOf("low \xB7")!==-1||e.indexOf("low\xB7")!==-1}function zEe(e){return String(e||"").replace(/\x1b\][^\x07]*(\x07|\x1b\\)/g,"").replace(/\x1b\[(\d+)C/g,function(t,r){return" ".repeat(Number(r)||1)}).replace(/\x1b\[[0-9;?]*[AB]/g,`
270
- `).replace(/\x1b\[[0-9;?]*[su]/g,"").replace(/\x1b\[[0-9;?]*[HfJKr]/g,`
271
- `).replace(/\x1bM/g,`
272
- `).replace(/\x1b\[[0-9;?]*[ST]/g,`
273
- `).replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b[><=ePX^_]/g,"").replace(/[\u00a0\u200b-\u200d\ufeff]/g," ").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"").replace(/\r\n?/g,`
274
- `).replace(/[ \t]+\n/g,`
275
- `).replace(/\n{3,}/g,`
276
-
277
- `)}function AX(e,t){var r=[];if(!e)return r;var n=String(e||""),a=`
278
- `,o="\r",l="\x1B";if(/^codex\b/.test(String(t||"").trim())){let er=function(He){return String(He||"").replace(/\x1b\][^\x07]*(\x07|\x1b\\)/g,"").replace(/\x1b\[(\d+)C/g,function(rt,gt){return" ".repeat(Number(gt)||1)}).replace(/\x1b\[[0-9;?]*[AB]/g,a).replace(/\x1b\[[0-9;?]*[su]/g,"").replace(/\x1b\[[0-9;?]*[HfJKr]/g,a).replace(/\x1bM/g,a).replace(/\x1b\[[0-9;?]*[ST]/g,a).replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b[><=ePX^_]/g,"").replace(/[\u00a0\u200b-\u200d\ufeff]/g," ").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"").replace(/[ \t]+\n/g,a)},It=function(He){return String(He||"").replace(/\s+/g," ").replace(/[M]+$/g,"").trim()},lr=function(He){return String(He||"").replace(/^›\s*/,"").replace(/^>\s*/,"").trim()},$r=function(He){var rt=String(He||"").trim();if(!/^›(?:\s|$)/.test(rt)||Ty.test(rt))return null;var gt=It(lr(rt));return!gt||Cg(gt)?null:gt},Vt=function(He){var rt=String(He||"").trim();if(!/^[•◦·⏺]/.test(rt))return null;var gt=rt.replace(/^[•◦·]\s*/,"").replace(/^⏺\s+/,"").replace(/^│\s*/,"").trim();return!gt||/^[•◦·⏺]$/.test(gt)||(gt=gt.replace(/\s*\(\d+[smh]?\s*•\s*esc to interrupt\)[\s\S]*$/i,"").replace(/(?:[a-z]{1,6})?›[\s\S]*$/,"").replace(/\s{2,}gpt-\d[\s\S]*$/i,"").replace(/\b(?:OpenAI Codex|model:|directory:|Tip:)\b[\s\S]*$/i,""),gt=It(gt),!gt||gt.length<2||KG.test(gt)||Cg(gt))?null:gt},ct=function(He){var rt=It(He);return!rt||Cg(rt)||/^[•◦·⏺›]/.test(rt)||/^[\[\]<>0-9;?]+u?$/i.test(rt)||/^[╭╰│┌└┐┘├┤┬┴┼─═]/.test(rt)||rt.length>500?null:rt},St=function(He,rt){if(He.indexOf(rt)!==0)return!1;var gt=He.slice(rt.length);return/^[a-z]{1,4}$/i.test(gt)},Le=function(He){for(var rt=[],gt=0;gt<He.length;gt++){var Kt=It(He[gt]);if(!(!Kt||Kt.length<2||Cg(Kt))){var Xt=rt[rt.length-1];if(!Xt){rt.push(Kt);continue}if(Kt!==Xt){if(Kt.indexOf(Xt)===0){rt[rt.length-1]=Kt;continue}if(Xt.indexOf(Kt)===0){St(Xt,Kt)&&(rt[rt.length-1]=Kt);continue}rt.push(Kt)}}}return rt.join(a).trim()},tt=function(He){for(var rt=0;rt<He.length;rt++){var gt=String(He[rt]||"").trim();if(gt){var Kt=$r(gt);if(Kt)return Kt;if(gt==="\u203A")for(var Xt=rt+1;Xt<He.length;Xt++){var on=It(He[Xt]);if(!(!on||Ty.test(on)||Cg(on)))return on}}}return null},ut=function(He){for(var rt=[],gt=!1,Kt=0;Kt<He.length;Kt++){var Xt=String(He[Kt]||"").trim();if(!Xt){if(gt)break;continue}var on=Vt(Xt);if(on){rt.push(on),gt=!0;continue}if(gt){if(Xt==="\u203A"||/^›(?:\s|$)/.test(Xt)||Ty.test(Xt)||Cg(Xt))break;rt.push(It(Xt))}}return rt};for(var u=er,d=It,p=lr,m=$r,v=Vt,g=ct,b=St,x=Le,y=tt,E=ut,S=[],F=0,$=n.replace(/\r\n?/g,a).split(a),C=0;C<$.length;C++)for(var D=er($[C]),I=D.split(a),M=0;M<I.length;M++){var A=String(I[M]||"").trim();if(A){var j=$r(A);if(j){S.push({kind:"user",order:F++,text:j});continue}var P=Vt(A);if(P){S.push({kind:"assistant",order:F++,text:P});continue}var O=ct(A);O&&S.push({kind:"echo",order:F++,text:O})}}for(var V=S.filter(function(He,rt,gt){var Kt=gt[rt-1];return!Kt||Kt.kind!==He.kind||Kt.text!==He.text}),W=V.filter(function(He){return He.kind==="user"}),H=V.filter(function(He){return He.kind==="assistant"}),q=V.filter(function(He){return He.kind==="echo"}),z=zEe(n),L=z.split(a).map(function(He){return String(He||"").trimEnd()}),U=tt(L),Y=W.length?W[W.length-1]:null,X=q.map(function(He){return He.text}).filter(function(He){return He.length>=3}),J=null,N=X.length-1;N>=0;N--)if(X[N]!==U){J=X[N];break}!J&&X.length&&(J=X[X.length-1]);for(var R=Y?Y.text:J,K=H.filter(function(He){return!Y||He.order>Y.order}).map(function(He){return He.text}),Q=[],ee=z.match(/^[ \t]*[•◦·⏺][ \t]*(.+)$/gm)||[],te=0;te<ee.length;te++){var ne=It(ee[te].replace(/^[ \t]*[•◦·⏺][ \t]*/,""));ne&&(KG.test(ne)||Ty.test(ne)||/\b(?:OpenAI Codex|model:|directory:|Tip:|esc to interrupt)\b/i.test(ne)||Q.push(ne))}var me=Le(K)||Le(ut(L))||(Q.length?Q[Q.length-1]:null);return R&&r.push({role:"user",content:R}),me&&r.push({role:"assistant",content:me}),!r.length&&Y?r.push({role:"user",content:Y.text}):!r.length&&J&&r.push({role:"user",content:J}),r}for(var se="\0",he="\b",le="\v",ke="\f",Ae="",de="",ve="\xA0",ye="\x07",we=new RegExp(l+"\\[[0-9;?]*[a-zA-Z]|"+l+"\\][^"+ye+"]*("+ye+"|"+l+"\\\\\\\\)|"+l+"[><=eP_X^]|["+se+"-"+he+le+ke+Ae+"-"+de+"]|"+ve+"|"+o,"g"),Oe=n.replace(we,function(er){return er===ve?" ":er===o?a:""}).split(o).join(a),Fe=Oe.split(a).map(function(er){return er.trim()}).filter(Boolean),$e=[/thinking with high effort/i,/thinking with medium effort/i,/thinking with low effort/i,new RegExp("thought for [0-9]+s","i"),new RegExp("Sauteed for [0-9]+m","i"),/Germinating/i,/Doodling/i,/Brewing/i],Me=[],qe=[],ze=[],Te=0;Te<Fe.length;Te++){var Ne=Fe[Te],Qe=Ne.replace(/^❯\s*/,"");if(Qe.indexOf('Try"')===0||Qe.indexOf('Try "')===0){Me.push(Qe);continue}for(var ot=!1,et=0;et<$e.length;et++)if($e[et].test(Ne)){ot=!0,ze.push(Ne);break}if(!ot&&!OEe(Ne)){if(Ne.indexOf("\u25CF")===0){if(Ne=Ne.slice(1).trim(),!Ne)continue;qe.push(Ne);continue}Ne.length<3&&!/^[a-zA-Z]{3}$/.test(Ne)||qe.push(Ne)}}if(ze.length>0){var Ue=ze[ze.length-1],Ie=Ue.match(new RegExp("for ([0-9]+[ms]+| [0-9]+m [0-9]+s)","i")),Re=Ie?"\u6DF1\u5EA6\u601D\u8003 "+Ie[0].replace(/for /i,""):"\u6DF1\u5EA6\u601D\u8003\u4E2D...";r.push({role:"thinking",content:Re,type:"deep-thought"})}if(Me.length>0){var ht=Me[Me.length-1].replace(/^Try\s*/,"").trim();r.push({role:"prompt",content:ht,type:"suggestion"})}if(!qe.length)return r;for(var lt=[],Xe=null,Pe=[],Te=0;Te<qe.length;Te++)if(Ne=qe[Te],Ne.indexOf("\u276F")===0){var at=Ne.replace(/^❯\s*/,"").trim();if(at.indexOf('Try"')===0||at.indexOf('Try "')===0)continue;Xe!==null&&Pe.length>0&&(lt.push({user:Xe,assistantLines:Pe}),Pe=[]),at?Xe=at:(Xe!==null&&Pe.length>0&&(lt.push({user:Xe,assistantLines:Pe}),Pe=[]),Xe=null)}else Xe!==null&&(Ne.indexOf("\u23FA")!==-1&&(Ne.indexOf("Hi!")!==-1||Ne.indexOf("Hello")!==-1||Ne.indexOf("What")!==-1||Ne.indexOf("working")!==-1)?Pe.push(Ne):Ne.indexOf("\u23FA")===0?Pe.push(Ne.slice(1).trim()||Ne):Ne.length>=8&&Ne.indexOf("\u2722")===-1&&Ne.indexOf("\u2733")===-1&&Ne.indexOf("\u2736")===-1&&Ne.indexOf("\u273B")===-1&&Ne.indexOf("\u273D")===-1&&Ne.indexOf("\u2590")!==0&&Ne.indexOf("\u259D")!==0&&Ne.indexOf("\u2598")!==0&&Ne.indexOf("esctointerrupt")===-1&&Ne.indexOf("?for")!==0&&Ne.indexOf("? for")!==0&&Pe.push(Ne));if(Xe!==null&&Pe.length>0&&lt.push({user:Xe,assistantLines:Pe}),lt.length===0){for(var Nt="",Pt=-1,Te=0;Te<qe.length;Te++)if(Ne=qe[Te],!(Ne.indexOf('Try"')===0||Ne.indexOf('Try "')===0)&&Ne.indexOf("Failed to install")===-1&&Ne.indexOf("ctrl+g")===-1&&Ne.indexOf("\u25CF ")!==0&&!(Ne.length<2||Ne.length>100)&&/^[a-zA-Z]/.test(Ne)){Nt=Ne.trim(),Pt=Te;break}if(Nt&&Pt>=0){var Yr=qe.slice(Pt+1).filter(function(er){return er.length>=8});Yr.length>0&&lt.push({user:Nt,assistantLines:Yr})}}for(var Gt=0;Gt<lt.length;Gt++)if(r.push({role:"user",content:lt[Gt].user}),lt[Gt].assistantLines.length>0){var Tr=LEe(lt[Gt].assistantLines.join(a));r.push({role:"assistant",content:Tr})}return r}function LEe(e){if(!e)return"";for(var t=`
279
- `,r=e.split(t),n=[],a=!1,o=0;o<r.length;o++){var l=r[o],u=l.trim();if(!(!a&&!u)){if(a=!0,u.indexOf("\u23FA")===0&&u.length>2){n.push(u.slice(1).trim());continue}if(u.indexOf("\u25CF")===0){if(u=u.slice(1).trim(),!u)continue;l=u}n.push(l)}}for(;n.length>0&&!n[n.length-1].trim();)n.pop();for(var d=[],p={},m=0;m<n.length;m++){var v=n[m].replace(/\s+/g,"");v.length>5&&p[v]||(v.length>5&&(p[v]=!0),d.push(n[m]))}return d.join(t)}var BX=null;function MI(e){BX=e}var S9=0;function gw(e){S9++;try{return e()}finally{S9--}}var F9=0;function HEe(){let e=F9;return()=>e===F9}function IX(){S9||(F9++,BX?.())}var MX=null;function TI(e){MX=e}function qEe(){return MX?.()??Promise.resolve(!1)}var WEe=B(Ja(),1),VEe=B(Jt(),1),KB=B(Ee(),1),xy=new Map,LE=new Set;function UEe(){for(let[t,r]of xy)t.isConnected||(r.unmount(),xy.delete(t));let e=document.querySelector("[data-login-controls]");!e||xy.has(e)||LE.has(e)||(LE.add(e),Promise.all([globalThis.__wandImportBrowserModule("75fb0efeeb030780"),globalThis.__wandImportBrowserModule("fc7dd2f84cb9b470"),globalThis.__wandImportBrowserModule("d0fff09448324ac0")]).then(([{LoginForm:t},{renderLoginVisual:r},{renderWandBrandMarkup:n}])=>{if(LE.delete(e),!e.isConnected||xy.has(e))return;let a=(0,WEe.createRoot)(e);xy.set(e,a);let o=(0,KB.jsx)("div",{dangerouslySetInnerHTML:{__html:r(n("brand-logo"))}}),l="http://"+location.host+location.pathname;(0,VEe.flushSync)(()=>a.render((0,KB.jsx)(sa,{children:(0,KB.jsx)(t,{checking:e.dataset.checking==="true",switchServer:e.dataset.switchServer==="true",visual:o,httpHref:l})})))}).catch(()=>{LE.delete(e),e.textContent="\u767B\u5F55\u754C\u9762\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"}))}var GEe={piExecution:Dd,folderPicker:zd,imageViewer:zl,localPreview:zs,missions:bf,newSession:La,quickCommit:bd,settings:Fo,worktreeMerge:yd,workspaces:Mf};function KEe(e){return!e?.isOpen()||e.closeIfOpen()}function Di(e=[]){let t=new Set(e);for(let[r,n]of Object.entries(GEe))if(!t.has(r)&&!KEe(n))return!1;return!0}function TX(e,t){return e?'<pre class="inline-tool-result-text" style="max-height: 300px; overflow-y: auto;">'+cc(e)+"</pre>":'<span class="inline-tool-empty">\u65E0\u8F93\u51FA</span>'}function jX(e){var t=String(e||"").trim();return t.length<=24?t||"\u672A\u9009\u62E9\u4F1A\u8BDD":t.slice(0,21)+"..."}function _X(e,t){e.closest(".inline-tool-image")?.setAttribute("data-image-state",t)}var Zu=B(_(),1),XEe=B(Ja(),1),Fg=B(Jt(),1),QEe=B(_(),1),no=B(Ee(),1),NX=QEe.forwardRef(({mode:e,hasDraft:t,disabled:r,onToggle:n},a)=>{let o=e==="keyboard",l=o?"\u5207\u6362\u5230\u5FEB\u6377\u952E":"\u5207\u6362\u5230\u952E\u76D8\u8F93\u5165"+(t?" \xB7 \u6709\u8349\u7A3F":"");return(0,no.jsxs)(je,{ref:a,kind:"soft",className:"pty-input-mode-toggle","data-mode":e,"aria-label":l,title:l,"aria-controls":"input-box terminal-shortcuts",disabled:r,onPointerDown:u=>u.preventDefault(),onClick:n,children:[(0,no.jsx)(kf,{from:"keyboard",to:"keycaps",active:o}),(0,no.jsxs)("span",{className:"pty-input-mode-label","aria-hidden":"true",children:[(0,no.jsxs)("span",{"data-active":!o,children:["\u952E\u76D8",t?(0,no.jsx)("i",{className:"pty-draft-dot"}):null]}),(0,no.jsx)("span",{"data-active":o,children:"\u5FEB\u6377\u952E"})]})]})});function PX({collapsed:e,hasDraft:t,disabled:r,onToggle:n}){let a=e?"\u5C55\u5F00\u7EC8\u7AEF\u6309\u952E"+(t?" \xB7 \u6709\u8349\u7A3F":""):"\u6536\u8D77\u7EC8\u7AEF\u6309\u952E";return(0,no.jsx)(je,{kind:"soft",className:"pty-dock-toggle","data-collapsed":e,"aria-label":a,title:a,"aria-expanded":!e,"aria-controls":"terminal-shortcuts",disabled:r,onPointerDown:o=>o.preventDefault(),onClick:n,children:e?(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(De,{name:"keyboard",size:16}),(0,no.jsxs)("span",{children:["\u6309\u952E",t?(0,no.jsx)("i",{className:"pty-draft-dot"}):null]}),(0,no.jsx)(De,{name:"chevronUp",size:14})]}):(0,no.jsx)(De,{name:"chevronDown",size:16})})}var XG=B(Ee(),1);function RX({ctrl:e,shift:t,disabled:r,onToggle:n}){return(0,XG.jsx)("div",{className:"pty-modifier-buttons",role:"group","aria-label":"\u6301\u7EED\u7EC4\u5408\u952E",children:["ctrl","shift"].map(a=>{let o=a==="ctrl"?e:t,l=a==="ctrl"?"Ctrl":"Shift";return(0,XG.jsx)(je,{className:"pty-modifier-toggle",kind:"soft","data-modifier":a,"aria-pressed":o,"aria-label":`${l} ${o?"\u5DF2\u6301\u7EED\u5F00\u542F\uFF0C\u518D\u70B9\u5173\u95ED":"\u70B9\u51FB\u6301\u7EED\u5F00\u542F"}`,title:`${l} ${o?"\u5DF2\u6301\u7EED\u5F00\u542F\uFF0C\u518D\u70B9\u5173\u95ED":"\u70B9\u51FB\u6301\u7EED\u5F00\u542F\uFF0C\u53EF\u4E0E\u5B57\u6BCD\u548C\u65B9\u5411\u952E\u7EC4\u5408"}`,disabled:r,onPointerDown:u=>u.preventDefault(),onClick:()=>n(a),children:l},a)})})}var ci=B(Ee(),1),HE=new Map;function QG({host:e,input:t,resize:r}){let[,n]=Zu.useReducer(C=>C+1,0);Zu.useEffect(()=>At.subscribe(n),[]),Zu.useEffect(()=>di.subscribe(n),[]),Zu.useLayoutEffect(()=>{let C=e.querySelector(".composer-inline-config");if(!C)return;let D=()=>{let M=C.getBoundingClientRect();e.style.setProperty("--composer-runtime-width",`${Math.ceil(M.width)}px`),e.style.setProperty("--composer-runtime-height",`${Math.ceil(M.height)}px`)};D();let I=new ResizeObserver(D);return I.observe(C),()=>I.disconnect()},[e]),Zu.useEffect(()=>{let C=new MutationObserver(n),D=e.querySelector("#send-input-button");D&&C.observe(D,{attributes:!0,attributeFilter:["data-phase"]}),C.observe(t,{attributes:!0,attributeFilter:["disabled","readonly","placeholder"]});let I=e.querySelector(".terminal-shortcuts");I&&C.observe(I,{attributes:!0,attributeFilter:["hidden"]});let M=0,A=()=>{M=requestAnimationFrame(n)};return t.addEventListener("compositionstart",n),t.addEventListener("compositionend",A),()=>{C.disconnect(),cancelAnimationFrame(M),t.removeEventListener("compositionstart",n),t.removeEventListener("compositionend",A)}},[e,t]);let a=h.selectedId??"",o=At.read(a),l=e.querySelector("#send-input-button")?.dataset.phase??"idle",u=e.querySelector(".terminal-shortcuts"),d=!!u&&!u.hidden,p=di.read(a),m=Zu.useRef(null),v=Zu.useRef(null),g=l==="failed"||l==="unknown"||!!o.recovery,b=g?"keyboard":p.mode,x=t.readOnly||!!o.recovery||h.composerComposing,y=()=>{v.current={owner:a,start:t.selectionStart,end:t.selectionEnd,direction:t.selectionDirection,scroll:t.scrollTop}};Zu.useEffect(()=>{d&&g&&di.update(a,{mode:"keyboard"})},[a,d,g]);let E=F$({owner:a,input:()=>t,surface:()=>e,phase:l,pending:!!o.text||!!o.attachments.length,locked:x,forceExpanded:d&&b==="keyboard",onDismiss:C=>{d&&(y(),di.update(a,{mode:"shortcuts"}),(C==="escape"||C==="back")&&requestAnimationFrame(()=>(m.current?.offsetParent?m.current:e.querySelector(".pty-dock-toggle"))?.focus({preventScroll:!0})))},popupOwners:["composer-plus-popover","composer-main",`wand-pi-settings-${a}`,`wand-pi-codemode-${a}`,`pty-extra-keys-${a}`]}),S=d&&!p.open&&b==="shortcuts"&&!p.ctrl&&!p.shift;Zu.useLayoutEffect(()=>{e.dataset.composerExpanded=String(E.expanded),d?e.dataset.ptyInputMode=b:delete e.dataset.ptyInputMode,S?e.dataset.ptyCollapsed="true":delete e.dataset.ptyCollapsed;let C=d?b==="keyboard":E.expanded;t.tabIndex=C?0:-1;let D=e.querySelector(".composer-input-wrap");D&&(D.inert=!C),u&&(u.inert=d&&(C||S),u.setAttribute("aria-hidden",String(!d||C||S)));let I=e.querySelector("[data-pty-extra-keys-host]");I&&(I.inert=!d||C||S);let M=e.querySelector("[data-composer-rail-host]");M&&(M.inert=d&&!C);let A=e.querySelector(".composer-editor-controls");A&&(A.inert=!C),r(t)},[e,t,u,r,E.expanded,d,b,S]);let F=()=>{if(!(x||l==="sending"||g||h.composerComposing))if(Zd(),b==="keyboard")y(),t.blur(),(0,Fg.flushSync)(()=>di.update(a,{mode:"shortcuts"})),m.current?.focus({preventScroll:!0});else{(0,Fg.flushSync)(()=>di.update(a,{mode:"keyboard"})),E.open();let C=v.current;C?.owner===a&&(t.setSelectionRange(C.start,C.end,C.direction),t.scrollTop=C.scroll)}},$=()=>{if(!h.composerComposing){if(Zd(),S){di.update(a,{open:!0});return}b==="keyboard"&&(y(),t.blur()),di.update(a,{open:!1,mode:"shortcuts",ctrl:!1,shift:!1})}};return(0,ci.jsxs)(ci.Fragment,{children:[(0,Fg.createPortal)((0,ci.jsx)(ci.Fragment,{children:d?(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsx)(PX,{collapsed:S,hasDraft:!!o.text||!!o.attachments.length,disabled:g&&!S,onToggle:$}),(0,ci.jsx)(NX,{ref:m,mode:b,hasDraft:!!o.text||!!o.attachments.length,disabled:x||l==="sending"||g,onToggle:F}),(0,ci.jsx)(RX,{ctrl:p.ctrl,shift:p.shift,disabled:h.composerComposing,onToggle:C=>{h.composerComposing||di.toggle(a,C)}})]}):null}),e.querySelector(".composer-main-row")),!d&&(0,Fg.createPortal)((0,ci.jsx)(je,{kind:"ghost",className:"composer-manual-collapse",title:"\u6536\u8D77\u8F93\u5165\u6846","aria-label":"\u6536\u8D77\u8F93\u5165\u6846",disabled:x||l==="sending",style:{visibility:E.expanded?"visible":"hidden"},onClick:E.close,children:(0,ci.jsx)(De,{name:"chevronDown",size:16})}),e.querySelector(".composer-actions-right")),(0,Fg.createPortal)((0,ci.jsx)($$,{text:o.text,attachments:o.attachments.length,placeholder:t.placeholder,disabled:t.disabled,onOpen:E.open}),e.querySelector(".composer-actions-left"))]})}function YEe(e){for(let[l,u]of HE)l.isConnected||(u.root.unmount(),HE.delete(l));let t=document.querySelector(".input-composer"),r=t?.querySelector("#input-box");if(!t||!r)return;let n=HE.get(t);if(n){n.root.render((0,ci.jsx)(sa,{children:(0,ci.jsx)(QG,{host:t,input:r,resize:e})}));return}let a=document.createElement("span");t.appendChild(a);let o=(0,XEe.createRoot)(a);HE.set(t,{root:o,chrome:a}),(0,Fg.flushSync)(()=>o.render((0,ci.jsx)(sa,{children:(0,ci.jsx)(QG,{host:t,input:r,resize:e})})))}var sk=null,Ey=null,$9=new Map;function JEe(){return sk?Promise.resolve(sk):(Ey||(Ey=globalThis.__wandImportBrowserModule("2a86f5afb165815d").then(e=>(sk=e,Ey=null,e),e=>{throw Ey=null,e})),Ey)}function OX(e){let t=($9.get(e)??0)+1;return $9.set(e,t),t}function oC(e,t){let r=OX(e);JEe().then(n=>{$9.get(e)===r&&t(n)},()=>{e.textContent="\u901A\u77E5\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"})}function jI(e){OX(e),sk?.clearNoticeView(e)}function ZEe(e){oC(e,t=>t.paintOfflineNotice(e))}function _I(e,t,r){oC(e,n=>n.paintBootNotice(e,t,r))}function eke(e,t){oC(e,r=>r.paintNotificationNotice(e,t))}function tke(e,t,r){oC(e,n=>n.paintUpdateNotice(e,t,r))}var D9="wand-active-task",rke="wand-selected-session";function Rg(e){try{e?localStorage.setItem(D9,e):localStorage.removeItem(D9)}catch{}}function nke(){try{return(localStorage.getItem(D9)||"").trim()}catch{return""}}var ake=oke();async function ike(e=ake,t=()=>!0){if(YG()||!t()||await qEe()||!t())return;let r=nke();if(!r||YG())return;let n=Ha.getRuntime();if(n)try{let a=await cn.listTaskGroups();if(!t())return;let o=HD(a.groups,r);if(!o||o.task.status==="done"){Rg(null);return}await n.openTask({...$6(o,e||void 0),navigationCurrent:t}),e&&t()&&n.selectSession(e)}catch{}}function oke(){try{return(localStorage.getItem(rke)||"").trim()||null}catch{return null}}function YG(){return typeof document<"u"&&document.documentElement?.classList?.contains("is-wand-embed-terminal")===!0}function ske(e){try{let t=e&&e._core&&e._core._renderService&&e._core._renderService.dimensions&&e._core._renderService.dimensions.css?e._core._renderService.dimensions.css.cell:null,r=Number(t&&t.width),n=Number(t&&t.height);return!(r>0)||!(n>0)?null:{width:r,height:n}}catch{return null}}function Sg(e){let t=parseInt(e||"",10);return Number.isFinite(t)?t:null}function lke(e){if(Number(e&&e.options&&e.options.scrollback)===0)return 0;try{if(!e.element||!e.element.querySelector(".xterm-decoration-overview-ruler"))return 0}catch{return 0}let t=Number(e.options&&e.options.overviewRuler&&e.options.overviewRuler.width);return t>0?t:14}function zX(e){let t=e&&e.element,r=t&&t.parentElement;if(!r||typeof getComputedStyle!="function")return null;let n=ske(e);if(!n)return null;let a=getComputedStyle(r),o=getComputedStyle(t),l=Sg(a.getPropertyValue("width")),u=Sg(a.getPropertyValue("height"));if(l===null||u===null)return null;let d=(Sg(o.getPropertyValue("padding-left"))||0)+(Sg(o.getPropertyValue("padding-right"))||0),p=(Sg(o.getPropertyValue("padding-top"))||0)+(Sg(o.getPropertyValue("padding-bottom"))||0),m=Math.max(0,l-d-lke(e)),v=u-p;return v>0?{cols:Math.max(2,Math.floor(m/n.width)),rows:Math.max(1,Math.floor(v/n.height))}:null}function ep(e,t){let r=zX(e);if(r){if(r.cols!==e.cols||r.rows!==e.rows){try{e._core&&e._core._renderService&&e._core._renderService.clear()}catch{}e.resize(r.cols,r.rows)}return}t&&typeof t.fit=="function"&&t.fit()}var XB=0,qE=0,JG=0,ky=0,Bk=[],Ik=[];function NI(){return window.__wandIosNative===!0}function LX(e){JG=Math.max(JG,Date.now()+(e||1800))}function HX(e,t){setTimeout(function(){var r=document.activeElement;lk(r)&&r!==t||LX(e)},30)}function uke(e){return Math.max(window.innerHeight||0,e&&e.height||0,document.documentElement&&document.documentElement.clientHeight||0,document.body&&document.body.clientHeight||0)}function cke(e){var t=document.documentElement,r=Math.max(window.innerWidth||0,e&&e.width||0,t&&t.clientWidth||0),n=uke(e);return!XB||Math.abs(r-XB)>8?(XB=r,qE=n):n>qE&&(qE=n),Math.max(1,Math.round(qE||n||1))}function dke(e,t,r,n){return e||!NI()?!1:t>0||n>r+1}function $g(e){var t=window.visualViewport;if(t){var r=document.documentElement;if(r.classList.toggle("is-keyboard-open",!!e),window.__wandImeNative){r.style.setProperty("--app-viewport-top","0px"),r.style.setProperty("--app-viewport-height",Math.round(t.height)+"px");return}var n=cke(t),a=Math.max(0,Math.round(t.offsetTop||0)),o=Math.max(1,Math.round(t.height));(!e&&NI()||dke(e,a,o,n))&&(a=0,o=Math.max(o,n)),r.style.setProperty("--app-viewport-top",a+"px"),r.style.setProperty("--app-viewport-height",o+"px"),(e||(window.scrollY||0)>0)&&J9()}}function lk(e){if(!e)return!1;var t=e.tagName;if(t==="TEXTAREA"||t==="SELECT")return!0;if(t==="INPUT"){var r=(e.getAttribute("type")||"text").toLowerCase();return!/^(button|checkbox|color|file|hidden|image|radio|range|reset|submit)$/i.test(r)}return!!e.isContentEditable}function pke(){if(!("visualViewport"in window)||window.__wandViewportHandlersBound)return;window.__wandViewportHandlersBound=!0;var e=window.visualViewport,t=e.height,r=!1,n=Math.max(window.innerWidth||0,e.width||0),a=Math.max(window.innerHeight||0,e.height||0);function o(){return Math.max(window.innerHeight||0,e.height||0)}function l(){var b=Math.max(window.innerWidth||0,e.width||0),x=o();if(Math.abs(b-n)>8){n=b,a=x;return}x>a&&(a=x)}function u(b,x){var y=document.activeElement,E=y===b||lk(y),S=a-e.height,F=a-(window.innerHeight||e.height||0),$=Date.now()<ky;return $?!!(E&&(S>120||F>120)):!!(x>80||E&&(S>120||F>120)||r&&(S>80||x>32))}function d(){Bk.forEach(function(b){clearTimeout(b)}),Bk=[60,180,360,620,900].map(function(b){return setTimeout(function(){$g(r)},b)})}function p(){Ik.forEach(function(b){clearTimeout(b)}),Ik=[0,50,120,220,360,560].map(function(b){return setTimeout(function(){m();var x=document.getElementById("input-box");x&&document.activeElement===x&&Vk(x)},b)})}function m(){if(e){var b=document.getElementById("input-box"),x=window.innerHeight-e.height-e.offsetTop;l();var y=u(b,x),E=Math.abs(e.height-t)>8;if($g(y),y&&(!r||E)&&a4e(e,b)&&Vk(b),!r&&y){var S=h.terminalAutoFollow;ao("keyboard-open",{forceReplay:!0}),window.__wandImeNative||setTimeout(function(){$g(!0)},220),d(),S&&setTimeout(function(){h.terminal&&h.terminalAutoFollow&&Wl("force")},220)}if(r&&!y){var F=!!window.__wandImeNative;F||(LX(2200),ky=Date.now()+1200,$g(!1),J9()),d(),setTimeout(function(){F||($g(!1),J9()),ao("keyboard-close",{forceReplay:!0}),Wl("keyboard")},200)}E&&r===y&&ao("viewport"),r=y,t=e.height}}var v=null;function g(){v!==null&&cancelAnimationFrame(v),v=requestAnimationFrame(function(){v=null,m()})}e.addEventListener("resize",g),e.addEventListener("scroll",g),document.addEventListener("visibilitychange",function(){document.visibilityState==="visible"&&(g(),setTimeout(g,240),setTimeout(g,720))}),window.addEventListener("pageshow",function(b){b&&b.persisted&&(g(),setTimeout(g,240))}),document.addEventListener("focusout",function(b){!b||!b.target||lk(b.target)&&(HX(1600,b.target),NI()&&(ky=Math.max(ky,Date.now()+1200)),setTimeout(g,80),setTimeout(g,420))}),document.addEventListener("focusin",function(b){!b||!b.target||!lk(b.target)||p()}),window.addEventListener("wand-ios-ime-state",function(b){var x=b&&b.detail&&b.detail.state;x==="hidden"&&(ky=Date.now()+900),p(),d()}),m()}function fke(){var e=document.getElementById("output");if(e){var t=document.createElement("div");t.className="terminal-resize-handle",t.setAttribute("role","separator"),t.setAttribute("aria-orientation","horizontal"),t.setAttribute("aria-label","\u8C03\u6574\u7EC8\u7AEF\u9AD8\u5EA6"),t.innerHTML='<span aria-hidden="true">&#8942;</span>',e.appendChild(t);var r=!1,n=0,a=0;t.addEventListener("mousedown",function(o){r=!0,n=o.clientY,a=e.getBoundingClientRect().height,document.body.style.cursor="ns-resize",document.body.style.userSelect="none",o.preventDefault()}),h.resizeMouseMove=function(o){if(r){var l=o.clientY-n,u=Math.max(200,Math.min(a+l,window.innerHeight-200));e.style.height=u+"px",e.style.flex="none",ac()}},document.addEventListener("mousemove",h.resizeMouseMove),h.resizeMouseUp=function(){r&&(r=!1,document.body.style.cursor="",document.body.style.userSelect="",ac())},document.addEventListener("mouseup",h.resizeMouseUp),t.addEventListener("touchstart",function(o){r=!0,n=o.touches[0].clientY,a=e.getBoundingClientRect().height,o.preventDefault()},{passive:!1}),h.resizeTouchMove=function(o){if(r){var l=o.touches[0].clientY-n,u=Math.max(200,Math.min(a+l,window.innerHeight-200));e.style.height=u+"px",e.style.flex="none",ac(),o.preventDefault()}},document.addEventListener("touchmove",h.resizeTouchMove,{passive:!1}),h.resizeTouchEnd=function(){r&&(r=!1,ac())},document.addEventListener("touchend",h.resizeTouchEnd)}}function mke(){var e=document.getElementById("output");if(e){var t=!Bo();h.resizeHandler=function(){ac(!0);var r=!Bo();t!==r&&(t=r,!r&&h.sidebarPinned&&h.sessionsDrawerOpen?(h.sessionsDrawerOpen=!1,Xr("wand-sidebar-open",!1),xm()):r&&h.sidebarPinned&&!h.sessionsDrawerOpen&&(h.sessionsDrawerOpen=!0,Xr("wand-sidebar-open",!0),xm()))},window.addEventListener("resize",h.resizeHandler),window.visualViewport&&(h.visualViewportHandler=function(){ac(!0)},window.visualViewport.addEventListener("resize",h.visualViewportHandler)),h.visibilityHandler=function(){document.hidden||ao("visibility",{forceReplay:!0})},document.addEventListener("visibilitychange",h.visibilityHandler),h.orientationHandler=function(){ao("orientation",{forceReplay:!0})},window.addEventListener("orientationchange",h.orientationHandler),requestAnimationFrame(function(){ac(!0)})}}function hke(){h.terminalHealthTimer||(h.terminalHealthTimer=setInterval(function(){if(!(!h.terminal||h.currentView!=="terminal"||document.hidden)){var e=h.sessions.find(function(t){return t.id===h.selectedId});!e||e.sessionKind==="structured"||ao("health")}},5e3))}function gke(){h.terminalHealthTimer&&(clearInterval(h.terminalHealthTimer),h.terminalHealthTimer=null)}function vw(){gke(),Bk.forEach(function(a){clearTimeout(a)}),Bk=[],Ik.forEach(function(a){clearTimeout(a)}),Ik=[],h.resizeTimer&&(clearTimeout(h.resizeTimer),h.resizeTimer=null),h.resizeObserver&&(h.resizeObserver.disconnect(),h.resizeObserver=null),h.resizeHandler&&(window.removeEventListener("resize",h.resizeHandler),h.resizeHandler=null),h.visualViewportHandler&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",h.visualViewportHandler),h.visualViewportHandler=null),h.visibilityHandler&&(document.removeEventListener("visibilitychange",h.visibilityHandler),h.visibilityHandler=null),h.orientationHandler&&(window.removeEventListener("orientationchange",h.orientationHandler),h.orientationHandler=null),[["mousemove","resizeMouseMove"],["mouseup","resizeMouseUp"],["touchmove","resizeTouchMove"],["touchend","resizeTouchEnd"]].forEach(function(a){h[a[1]]&&(document.removeEventListener(a[0],h[a[1]]),h[a[1]]=null)});var e=document.getElementById("output");if(h.terminalViewportEl&&(h.terminalViewportScrollHandler&&h.terminalViewportEl.removeEventListener("scroll",h.terminalViewportScrollHandler),h.terminalViewportTouchHandler&&h.terminalViewportEl.removeEventListener("touchmove",h.terminalViewportTouchHandler),h.terminalViewportTouchStartHandler&&h.terminalViewportEl.removeEventListener("touchstart",h.terminalViewportTouchStartHandler)),e&&(h.terminalWheelHandler&&e.removeEventListener("wheel",h.terminalWheelHandler,!0),h.terminalClickHandler&&e.removeEventListener("click",h.terminalClickHandler)),h.terminalViewportEl=null,h.terminalViewportScrollHandler=null,h.terminalViewportTouchHandler=null,h.terminalViewportTouchStartHandler=null,h.terminalWheelHandler=null,h.terminalClickHandler=null,h.terminalScrollbarHideTimer&&(clearTimeout(h.terminalScrollbarHideTimer),h.terminalScrollbarHideTimer=null),h.terminalScrollbarEl&&h.terminalScrollbarEl.parentNode&&h.terminalScrollbarEl.parentNode.removeChild(h.terminalScrollbarEl),h.terminalScrollbarEl=null,h.terminalScrollbarDragging=!1,h.terminalScrollbarRafPending=!1,h.terminal&&(typeof h.terminal.dispose=="function"?h.terminal.dispose():typeof h.terminal.destroy=="function"&&h.terminal.destroy(),h.terminal=null),e)for(var t=e.querySelectorAll(".terminal-scroll-wrap"),r=0;r<t.length;r++){var n=t[r];n.parentNode===e&&e.removeChild(n)}h.terminalSessionId=null,h.terminalFitAddon=null,h.terminalWriteQueue=Promise.resolve(),h.terminalRestoring=!1,h.terminalWriteGeneration=(h.terminalWriteGeneration||0)+1,h.terminalRestoreGeneration=(h.terminalRestoreGeneration||0)+1,h.terminalOutput="",h.terminalAutoFollow=!0,h.showTerminalJumpToBottom=!1,Ys(),h.softResyncTimer&&(clearTimeout(h.softResyncTimer),h.softResyncTimer=null),h.lastResize={cols:0,rows:0}}function bw(e,t){if(!(!h.selectedId||h.terminalRestoring)){var r=h.sessions.find(function(a){return a.id===h.selectedId});if(!(!r||r.status!=="running")&&!hr(r)){e=Math.max(20,Math.min(Math.floor(e),1e3)),t=Math.max(5,Math.min(Math.floor(t),500));var n={cols:e,rows:t};(h.lastResize.cols!==n.cols||h.lastResize.rows!==n.rows)&&(h.lastResize=n,h.ws&&h.ws.readyState===WebSocket.OPEN?h.ws.send(JSON.stringify({type:"pty_resize",sessionId:h.selectedId,cols:n.cols,rows:n.rows})):an("/api/sessions/"+h.selectedId+"/resize",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(n)}).catch(function(){}))}}}function ao(e,t){if(!h.terminal||h.terminalRestoring)return!1;var r=document.getElementById("output");if(!r||r.offsetWidth===0||r.offsetHeight===0)return aw(e||"fit-retry"),!1;var n=h.terminalAutoFollow;return requestAnimationFrame(function(){requestAnimationFrame(function(){!h.terminal||h.terminalRestoring||(h.terminalFitAddon&&typeof h.terminalFitAddon.fit=="function"&&ep(h.terminal,h.terminalFitAddon),bw(h.terminal.cols,h.terminal.rows),n&&h.terminalAutoFollow?Wl("force"):Ys())})}),!0}function aw(e,t){if(!h.terminal)return;var r=0,n=8;function a(){if(h.terminal){var o=document.getElementById("output");if(o&&o.offsetHeight,o&&o.offsetWidth>0&&o.offsetHeight>0){ao(e);return}++r>=n||(r<=4?requestAnimationFrame(a):setTimeout(a,32))}}a()}function ac(e){h.resizeTimer&&(clearTimeout(h.resizeTimer),h.resizeTimer=null);var t=e?0:100;h.resizeTimer=setTimeout(function(){h.resizeTimer=null,requestAnimationFrame(vke)},t)}function vke(){!h.terminal||h.terminalRestoring||(h.terminalAutoFollow&&Wl("force"),bw(h.terminal.cols,h.terminal.rows))}var lm=B(Jt(),1),qX=B(Ja(),1),Hl=B(_(),1),bke=B(Jt(),1),ls=B(Ee(),1),WE=[{key:"enter",label:"Enter",title:"\u53D1\u9001\u56DE\u8F66"},{key:"up",label:"\u2191",title:"\u65B9\u5411\u952E\u4E0A"},{key:"down",label:"\u2193",title:"\u65B9\u5411\u952E\u4E0B"},{key:"left",label:"\u2190",title:"\u65B9\u5411\u952E\u5DE6"},{key:"right",label:"\u2192",title:"\u65B9\u5411\u952E\u53F3"},{key:"escape",label:"Esc",title:"Escape"},{key:"tab",label:"Tab",title:"Tab"},{key:"ctrl_c",label:"Ctrl+C",title:"Ctrl+C \xB7 \u4E2D\u65AD"},{key:"home",label:"Home",title:"\u884C\u9996"},{key:"end",label:"End",title:"\u884C\u5C3E"},{key:"backspace",label:"\u232B",title:"\u9000\u683C"},{key:"delete",label:"Del",title:"\u5220\u9664\u540E\u4E00\u5B57\u7B26"},{key:"pageup",label:"PgUp",title:"\u4E0A\u4E00\u9875"},{key:"pagedown",label:"PgDn",title:"\u4E0B\u4E00\u9875"}];function yke(e,t,r){let n=0,a=0;for(let o of t){let l=n+(a?r:0)+o;if(l>e+.5)break;n=l,a++}return a}function WX({disabled:e,onKey:t,owner:r=""}){let n=Hl.useRef(null),a=Hl.useRef(null),[o,l]=Hl.useState(WE.length),[u,d]=Hl.useState(null),[p,m]=Hl.useState(!1),v=Hl.useRef(null),g=Hl.useSyncExternalStore(di.subscribe,()=>di.read(r),()=>di.read(r));Hl.useEffect(()=>{(g.mode!=="shortcuts"||e)&&m(!1)},[g.mode,e]),Hl.useEffect(()=>{m(!1)},[r]),Hl.useLayoutEffect(()=>{let x=n.current,y=a.current;if(!x||!y)return;let E=()=>{let $=x.clientWidth;if(!$)return;let C=parseFloat(getComputedStyle(x).columnGap)||0,D=Array.from(y.querySelectorAll("button"),I=>I.getBoundingClientRect().width);D.every(I=>I>0)&&l(yke($,D,C))};E();let S=new ResizeObserver(E);S.observe(x),S.observe(y);let F=!0;return document.fonts.ready.then(()=>{F&&E()}),d(r?x.closest(".input-composer")?.querySelector("[data-pty-extra-keys-host]")??null:null),()=>{F=!1,S.disconnect()}},[r]);let b=WE.slice(o);return(0,ls.jsxs)(ls.Fragment,{children:[(0,ls.jsxs)(Ye,{ref:n,gap:4,wrap:!1,role:"group","aria-label":"PTY \u5FEB\u6377\u952E",className:"terminal-shortcuts-row",children:[WE.map(({key:x,label:y,title:E},S)=>(0,ls.jsx)(Ui,{"data-terminal-key":x,hidden:S>=o,disabled:e,title:E,"aria-label":E,onMouseDown:F=>{F.button===0&&F.preventDefault()},onClick:()=>t?.(x),children:y},x)),(0,ls.jsx)("div",{className:"terminal-shortcuts-measure","aria-hidden":"true",inert:!0,children:(0,ls.jsx)(Ye,{ref:a,gap:4,wrap:!1,className:"terminal-shortcuts-row terminal-shortcuts-probe",children:WE.map(({key:x,label:y})=>(0,ls.jsx)(Ui,{tabIndex:-1,children:y},x))})})]}),u?(0,bke.createPortal)((0,ls.jsx)(ko,{side:"top",ariaLabel:"\u5176\u4ED6\u7EC8\u7AEF\u6309\u952E",popupOwner:`pty-extra-keys-${r}`,open:p,onOpenChange:m,trigger:(0,ls.jsx)(je,{ref:v,className:"pty-extra-keys-trigger",kind:"soft","aria-label":"\u66F4\u591A\u7EC8\u7AEF\u6309\u952E",title:"\u66F4\u591A\u7EC8\u7AEF\u6309\u952E",disabled:e||!b.length,"aria-expanded":p,style:{visibility:b.length?void 0:"hidden"},children:(0,ls.jsx)(De,{name:"more",size:18})}),children:(0,ls.jsx)("div",{className:"pty-extra-keys-grid",role:"group","aria-label":"\u672A\u663E\u793A\u7684\u7EC8\u7AEF\u6309\u952E",children:b.map(({key:x,label:y,title:E})=>(0,ls.jsx)(je,{title:E,"aria-label":E,"data-extra-terminal-key":x,onClick:()=>{t?.(x),m(!1),v.current?.focus({preventScroll:!0})},children:y},x))})}),u):null]})}var wke=B(_(),1),xke=B(Jt(),1),Eke=Object.freeze({revision:0,mounts:Object.freeze([])}),kke=class{constructor(){ie(this,"snapshot",Eke),ie(this,"listeners",new Set),ie(this,"subscribe",e=>(this.listeners.add(e),()=>this.listeners.delete(e))),ie(this,"getSnapshot",()=>this.snapshot)}sync(e){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let t of this.listeners)t()}clear(){this.snapshot.mounts.length!==0&&this.sync([])}},Uy=new kke,uk=B(Ee(),1),ZG="\u53D1\u9001\u56DE\u8F66\u5230\u7EC8\u7AEF\uFF08\u76F8\u5F53\u4E8E Enter\uFF09";function VX({disabled:e,hint:t,onSubmit:r}){return(0,uk.jsxs)(je,{className:"wand-composer-rail-submit",kind:"soft",size:"medium",disabled:e,title:t??ZG,"aria-label":t??ZG,onClick:r,children:[(0,uk.jsx)(De,{name:"enter",slot:"start",size:14}),(0,uk.jsx)("span",{children:"\u53D1\u9001"})]})}function PI(){return(0,wke.useSyncExternalStore)(Uy.subscribe,Uy.getSnapshot,Uy.getSnapshot).mounts.map(e=>(0,xke.createPortal)((0,uk.jsx)(VX,{disabled:e.disabled,hint:e.hint,onSubmit:e.onSubmit}),e.target,e.key))}var Ao=B(Ee(),1),UX=0;function RI(e,t,r){let n=document.createElement("div");n.dataset.terminalCreationMeasure="true",n.setAttribute("aria-hidden","true"),n.inert=!0,Object.assign(n.style,{position:"fixed",left:"-10000px",top:"0",width:`${t}px`,visibility:"hidden",pointerEvents:"none",contain:"layout style"}),document.body.appendChild(n);let a;try{return a=(0,qX.createRoot)(n,{identifierPrefix:`wand-terminal-measure-${++UX}-`}),(0,lm.flushSync)(()=>a.render((0,Ao.jsx)(Gb,{children:(0,Ao.jsx)(kk,{children:e})}))),n.querySelector(r)?.getBoundingClientRect().height??0}finally{try{(0,lm.flushSync)(()=>a?.unmount())}finally{n.remove()}}}function Cke(e,t){return RI((0,Ao.jsx)(wX,{snapshot:e,measurement:!0}),t,".main-header-row")}function Ske(e,t){return RI((0,Ao.jsx)(O6e,{...e}),t,".workspace-tab-bar")}function Fke(e,t){return RI((0,Ao.jsx)(z6e,{...e}),t,'[data-session-tabs="standalone"]')}function $ke(e){let t=[],r=[],n=(l,u,d)=>{let p=l.style.getPropertyValue(u),m=l.style.getPropertyPriority(u);r.push(()=>p?l.style.setProperty(u,p,m):l.style.removeProperty(u)),l.style.setProperty(u,d,"important")},a,o=()=>{try{(0,lm.flushSync)(()=>a?.unmount())}finally{for(let l of t)l.remove();for(let l of r.reverse())l()}};try{let l=e.querySelector(".composer-top-row");l&&n(l,"display","none");let u=e.querySelector(".input-composer");if(u){let b=u.className;r.push(()=>{u.className=b}),u.classList.add("is-terminal-interactive");let x=u.dataset.ptyInputMode;r.push(()=>{x===void 0?delete u.dataset.ptyInputMode:u.dataset.ptyInputMode=x}),u.dataset.ptyInputMode="shortcuts";let y=u.dataset.ptyCollapsed;r.push(()=>{y===void 0?delete u.dataset.ptyCollapsed:u.dataset.ptyCollapsed=y}),u.dataset.ptyCollapsed="true";for(let E of["--motion-normal","--motion-fast","--motion-quick-exit","--motion-morph"])n(u,E,"0s")}let d=e.querySelector(".input-textarea");if(d){n(d,"min-height","");let b=parseFloat(getComputedStyle(d).minHeight);n(d,"height",`${Number.isFinite(b)?b:40}px`)}let p=[],m=u?.querySelector(".composer-main-row");if(m&&!m.querySelector(".pty-input-mode-toggle")){let b=document.createElement("span");b.style.display="contents",t.push(b),m.appendChild(b),p.push((0,lm.createPortal)((0,Ao.jsxs)(Ao.Fragment,{children:[(0,Ao.jsx)(PX,{collapsed:!0,onToggle:()=>{}}),(0,Ao.jsx)(NX,{mode:"shortcuts",onToggle:()=>{}}),(0,Ao.jsx)(RX,{ctrl:!1,shift:!1,onToggle:()=>{}})]}),b))}let v=e.querySelector(".terminal-shortcuts");if(v?.hidden&&!document.documentElement.classList.contains("is-wand-native-input")){let b=document.createElement("div");b.className="terminal-shortcuts",t.push(b),v.before(b),p.push((0,lm.createPortal)((0,Ao.jsx)(WX,{disabled:!1}),b))}let g=e.querySelector("[data-composer-rail-host]");if(g&&!document.documentElement.classList.contains("is-wand-embed-terminal")&&!g.querySelector(".wand-composer-rail-submit")){let b=document.createElement("span");b.style.display="contents",t.push(b),g.appendChild(b),p.push((0,lm.createPortal)((0,Ao.jsx)(VX,{}),b))}if(p.length){let b=document.createElement("div");t.push(b),b.dataset.terminalCreationMeasure="true",b.inert=!0,document.body.appendChild(b),a=(0,qX.createRoot)(b,{identifierPrefix:`wand-terminal-measure-${++UX}-`}),(0,lm.flushSync)(()=>a.render((0,Ao.jsx)(Gb,{children:p})))}return o}catch(l){throw o(),l}}function GX(e,t){if(!Number.isFinite(e.deltaY)||e.deltaY===0||(t.accumulatedPixels+=e.deltaY,Math.abs(t.accumulatedPixels)<40))return 0;let r=t.accumulatedPixels<0?1:-1;return t.accumulatedPixels=0,r}function KX(e,t){let r=1,n=l=>{l.preventDefault(),r=1},a=l=>{l.preventDefault();let u=l.scale;typeof u=="number"&&Number.isFinite(u)&&(r=u)},o=l=>{l.preventDefault(),r>=1.08?t(1):r<=.92&&t(-1),r=1};e.addEventListener("gesturestart",n),e.addEventListener("gesturechange",a),e.addEventListener("gestureend",o)}var Dke=180,eK=80,Ake=80,Bke=180;function XX(e,t,r,n=Date.now()){if(!Number.isFinite(e.deltaY)||e.deltaY===0)return 0;var a=e.deltaY<0?-1:1,o=Math.abs(YX(e,r));return o===0||((t.direction!==a||n-t.lastEventAt>Bke)&&(t.accumulatedPixels=0),t.direction=a,t.lastEventAt=n,t.accumulatedPixels+=o,t.accumulatedPixels<eK)||n-t.lastPageAt<Ake?0:(t.accumulatedPixels%=eK,t.lastPageAt=n,a)}var tK=60,Ike=80;function Mke(e,t,r=Date.now()){if(!Number.isFinite(e)||e===0||(t.accumulatedPixels+=e,Math.abs(t.accumulatedPixels)<tK)||r-t.lastPageAt<Ike)return 0;var n=t.accumulatedPixels>0?1:-1;return t.accumulatedPixels-=n*tK,t.lastPageAt=r,n}function QX(e,t,r,n,a=Date.now()){if(!Number.isFinite(e.deltaY)||e.deltaY===0)return 0;var o=YX(e,n);if(!Number.isFinite(o)||o===0)return 0;a-t.lastEventAt>Dke&&(t.accumulatedPixels=0),t.lastEventAt=a;var l=Number.isFinite(r)&&r>0?r:16;t.accumulatedPixels+=o;var u=Math.trunc(t.accumulatedPixels/l);return u===0?0:(t.accumulatedPixels-=u*l,u)}function OI(e){return e<0?"\x1B[5~":e>0?"\x1B[6~":""}function YX(e,t){return e.deltaMode===1?e.deltaY*16:e.deltaMode===2?e.deltaY*Math.max(1,t):e.deltaY}function iw(e){let t=typeof e=="string"?e.trim():"";return!t||!Di(["localPreview"])?!1:H1(t)?zs.openPreview(t):qf(t)?zs.openUrl(t):t.startsWith("/")?zs.openFile(t):zs.openUrl(t)}var ic=new Map;function JX(e){return{...e.base,data:e.prefix+e.base.data,pending:[...e.base.pending,...e.live?[{type:"data",data:e.live}]:[]],historyBefore:e.before}}function ZX(e,t){let r=ic.get(e);return r?.base===t&&!r.stale?JX(r):null}function eQ(e,t){ic.delete(e),!(!t||t.version!==1||!Number.isSafeInteger(t.historyBefore)||!Number.isSafeInteger(t.historyRevision))&&ic.set(e,{base:t,prefix:"",before:t.historyBefore,revision:t.historyRevision,live:"",stale:!1,resyncRequested:!1,loading:!1})}function Tke(e,t){let r=ic.get(e);!r||r.stale||(r.live+=t,r.live.length>2e5&&(r.live="",r.stale=!0))}async function tQ(e,t){let r=ic.get(e);if(!r||r.loading||r.before<=0)return;if(r.stale){if(!r.resyncRequested&&h.ws?.readyState===WebSocket.OPEN)try{h.ws.send(JSON.stringify({type:"resync",sessionId:e})),r.resyncRequested=!0}catch{}return}r.loading=!0;let n=r.before;try{let a=await fetch(`/api/sessions/${encodeURIComponent(e)}/pty-history?before=${n}&revision=${r.revision}`,{credentials:"same-origin"});if(a.status===409){ic.delete(e),h.ws?.readyState===WebSocket.OPEN&&h.ws.send(JSON.stringify({type:"resync",sessionId:e}));return}let o=await jt(a);if(ic.get(e)!==r||r.stale||r.before!==n||!Number.isSafeInteger(o.start)||o.start<0||o.start>=n||o.before!==n||o.revision!==r.revision||typeof o.data!="string"||o.separator!==""&&o.separator!==`\r
280
- `)return;let l=o.data+o.separator+r.prefix;await t({...JX(r),data:l+r.base.data,historyBefore:o.start},n-o.start)&&ic.get(e)===r&&!r.stale&&r.before===n&&(r.prefix=l,r.before=o.start)}catch{}finally{r.loading=!1}}function jke(e){ic.delete(e)}var VE=new WeakMap,_ke=64*1024;function rQ(e,t,r,n,a,o){let l=VE.get(e);if(l&&l.tail===r&&l.current()&&n()&&l.chars+t.length<=_ke)return l.chunks.push(t),l.chars+=t.length,l.consumed.push(o),l.tail;let u={chunks:[t],chars:t.length,tail:Promise.resolve(),current:n,consumed:[o]};return u.tail=r.catch(()=>{}).then(async()=>{VE.get(e)===u&&VE.delete(e);try{if(!n())return;await new Promise((d,p)=>{try{e.write(u.chunks.join(""),d)}catch(m){p(m)}}),n()&&a()}finally{for(let d of u.consumed)try{d()}catch{}}}),VE.set(e,u),u.tail}Eo.subscribe(()=>{h.terminal&&(h.terminal.options.theme=sd())});function sC(e){h.workingDir=e;try{localStorage.setItem("wand-working-dir",e)}catch{}Nke(e)}function Nke(e){return fetch("/api/recent-paths",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({path:e})}).then(function(t){return jt(t)}).catch(function(t){console.warn("[wand] \u8BB0\u5F55\u6700\u8FD1\u8DEF\u5F84\u5931\u8D25\uFF1A"+Ua(t,"\u672A\u77E5\u9519\u8BEF"))})}function yw(e,t){var r=h.sessions.find(function(a){return a.id===h.selectedId});if(r){var n=r[e];if(!n){Ze("\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9\u3002","error");return}zY(String(n),null,function(){Ze(t||"\u5DF2\u590D\u5236","info")})}}function cs(){return!h.terminal||!h.terminal.element?null:(h.terminalViewportEl=h.terminal.element.querySelector(".xterm-viewport"),h.terminalViewportEl)}function Ys(){var e=document.getElementById("terminal-jump-bottom"),t=!!h.selectedId&&h.currentView==="terminal"&&!h.terminalAutoFollow&&!A9();h.showTerminalJumpToBottom=t,e&&e.classList.toggle("visible",t);var r=document.getElementById("output");r&&r.classList.toggle("has-jump-btn",t)}function A9(){if(h.terminal?.buffer?.active){var e=h.terminal.buffer.active;return e.viewportY>=e.baseY}var t=cs();if(!t)return!0;var r=t.scrollHeight-t.clientHeight-t.scrollTop;return r<=2}function B9(e){if(h.terminal){var t=cs();if(t){var r=e?500:120;h.terminalProgrammaticScrollUntil=Math.max(h.terminalProgrammaticScrollUntil,Date.now()+r),e?t.scrollTo({top:t.scrollHeight,behavior:"smooth"}):h.terminal.scrollToBottom()}}}function jy(){h.terminalAutoFollow=!1,h.terminalProgrammaticScrollUntil=0,Ys()}function Wl(e){if(h.terminal){var t=e==="force";if(t){h.terminalAutoFollow=!0,B9(!1),Ys();return}if(!h.terminalAutoFollow){Ys();return}B9(!1),Ys()}}function rK(){if(!QB){var e=typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):function(t){return window.setTimeout(t,16)};QB=e(function(){QB=0,Wl()})}}function ck(e){if(!(h.terminal!==e||h.terminalAutoFollow!==!1||Date.now()<h.terminalProgrammaticScrollUntil||e.buffer.active.type!=="normal")&&!(e.buffer.active.viewportY>12||!h.selectedId)){var t=h.selectedId;tQ(t,async function(r){return h.terminal!==e||h.selectedId!==t?!1:(jk(t,r,h.terminalOutput,!0),await h.terminalWriteQueue,h.terminal===e&&h.selectedId===t)})}}function Pke(e,t){var r=null,n=0,a=16,o=0,l=0,u={accumulatedPixels:0,lastPageAt:0};function d(){try{var g=e.querySelector(".xterm-screen");if(g&&t.rows>0){var b=g.clientHeight/t.rows;if(b>4)return b}}catch{}var x=getComputedStyle(e).getPropertyValue("--term-row-height").trim(),y=parseFloat(x);return y>0?y:16}function p(){try{return!!t.element&&t.element.classList.contains("enable-mouse-events")}catch{return!1}}function m(g,b){var x=t.cols||80,y=t.rows||24,E=1,S=1;try{var F=e.querySelector(".xterm-screen");if(F){var $=F.getBoundingClientRect();$.width>0&&$.height>0&&(E=Math.min(x,Math.max(1,Math.floor((b.clientX-$.left)/($.width/x))+1)),S=Math.min(y,Math.max(1,Math.floor((b.clientY-$.top)/($.height/y))+1)))}}catch{}var C=g>0?65:64;return"\x1B[<"+C+";"+E+";"+S+"M"}e.addEventListener("touchstart",function(g){if(g.touches.length!==1){r=null;return}var b=g.touches[0];r=b.identifier,n=b.clientY,a=d(),o=0,l=0,u.accumulatedPixels=0,u.lastPageAt=0},{passive:!0}),e.addEventListener("touchmove",function(g){if(r!==null){for(var b=null,x=0;x<g.touches.length;x++)if(g.touches[x].identifier===r){b=g.touches[x];break}if(b){g.cancelable&&g.preventDefault();var y=b.clientY-n;if(n=b.clientY,y!==0){l+=Math.abs(y);var E=t.buffer.active.type==="alternate";if(E){var S=Mke(-y,u,Date.now());if(S!==0){var F=p()?m(S,b):OI(S);F&&_y(F)}return}o-=y;var $=Math.trunc(o/a);$!==0&&(o-=$*a,t.scrollLines($)),l>8&&(jy(),y>0&&ck(t))}}}},{passive:!1});function v(){r=null}e.addEventListener("touchend",v,{passive:!0}),e.addEventListener("touchcancel",v,{passive:!0})}function Rke(e){var t=document.createElement("div");t.className="terminal-scrollbar";var r=document.createElement("div");r.className="terminal-scrollbar-track";var n=document.createElement("div");n.className="terminal-scrollbar-thumb",r.appendChild(n),t.appendChild(r),e.appendChild(t),h.terminalScrollbarEl=t,h.terminalScrollbarHideTimer=null,h.terminalScrollbarDragging=!1,h.terminalScrollbarRafPending=!1;function a(){h.terminalScrollbarHideTimer&&(clearTimeout(h.terminalScrollbarHideTimer),h.terminalScrollbarHideTimer=null),t.classList.add("visible")}function o(){h.terminalScrollbarDragging||(h.terminalScrollbarHideTimer&&clearTimeout(h.terminalScrollbarHideTimer),h.terminalScrollbarHideTimer=setTimeout(function(){h.terminalScrollbarHideTimer=null,h.terminalScrollbarDragging||t.classList.remove("visible")},1500))}function l(){h.terminalScrollbarRafPending=!1;var y=cs();if(y){var E=y.scrollHeight,S=y.clientHeight;if(E<=S){t.classList.remove("visible");return}var F=r.clientHeight,$=Math.max(28,S/E*F),C=E-S,D=y.scrollTop/C,I=D*(F-$);n.style.height=$+"px",n.style.top=I+"px"}}function u(){h.terminalScrollbarRafPending||(h.terminalScrollbarRafPending=!0,requestAnimationFrame(l))}var d=cs();d&&d.addEventListener("scroll",function(){a(),u(),o()},{passive:!0}),r.addEventListener("mousedown",function(y){if(y.target!==n){y.preventDefault();var E=cs();if(E){var S=r.getBoundingClientRect(),F=(y.clientY-S.top)/S.height,$=E.scrollHeight-E.clientHeight;E.scrollTop=F*$}}});var p=0,m=0;n.addEventListener("mousedown",function(y){y.preventDefault(),y.stopPropagation(),h.terminalScrollbarDragging=!0,n.classList.add("dragging"),p=y.clientY;var E=cs();m=E?E.scrollTop:0,document.addEventListener("mousemove",v),document.addEventListener("mouseup",g)});function v(y){y.preventDefault();var E=cs();if(E){var S=r.clientHeight,F=E.scrollHeight,$=E.clientHeight,C=F-$;if(!(C<=0)){var D=Math.max(28,$/F*S),I=S-D;if(!(I<=0)){var M=y.clientY-p,A=M/I*C;E.scrollTop=m+A}}}}function g(){h.terminalScrollbarDragging=!1,n.classList.remove("dragging"),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",g),o()}n.addEventListener("touchstart",function(y){if(y.touches.length===1){y.stopPropagation(),h.terminalScrollbarDragging=!0,n.classList.add("dragging"),p=y.touches[0].clientY;var E=cs();m=E?E.scrollTop:0,document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",x),document.addEventListener("touchcancel",x)}},{passive:!1});function b(y){if(y.touches.length===1){y.preventDefault();var E=cs();if(E){var S=r.clientHeight,F=E.scrollHeight,$=E.clientHeight,C=F-$;if(!(C<=0)){var D=Math.max(28,$/F*S),I=S-D;if(!(I<=0)){var M=y.touches[0].clientY-p,A=M/I*C;E.scrollTop=m+A}}}}}function x(){h.terminalScrollbarDragging=!1,n.classList.remove("dragging"),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",x),document.removeEventListener("touchcancel",x),o()}t.addEventListener("mouseenter",function(){a()}),t.addEventListener("mouseleave",function(){h.terminalScrollbarDragging||o()}),u()}var Oke=150,zke=30,Lke=160*1024,Hke=192*1024,QB=0,qke=120,Wke=120,Vke=800,Uke=1500,Gke=5e3,Kke=3e3;function lC(e){return h.terminal?(h.terminal.refresh(0,Math.max(0,h.terminal.rows-1)),!0):!1}function Xke(e){h.softResyncTimer&&clearTimeout(h.softResyncTimer),h.softResyncTimer=setTimeout(function(){h.softResyncTimer=null,lC()},typeof e=="number"?e:0)}function Gy(e){return!e||e.length<=Hke?e:e.slice(-Lke)}function nQ(e){return!h.ws||h.ws.readyState!==WebSocket.OPEN?!1:(h.ws.send(JSON.stringify(e)),!0)}function _y(e,t){return!h.selectedId||!e||h.terminalRestoring?!1:nQ({type:"pty_input",sessionId:h.selectedId,data:e,shortcutKey:t,userInput:h.terminalInteractive===!0})}function nK(e,t){!e||!(t>0)||nQ({type:"pty_ack",sessionId:e,bytes:t})}var zI=0;function Mk(e,t){var r=typeof e=="number"?e:Date.now(),n=r+(typeof t=="number"?t:Uke);return new Promise(function(a){(function o(){var l=Date.now(),u=zI,d=u>r?Math.max(u+Wke,r+qke):r+Vke;if(l>=d||l>=n){a(null);return}setTimeout(o,Math.max(10,Math.min(60,d-l)))})()})}function Qke(e){var t=Date.now(),r=t+Kke,n=t+(typeof e=="number"?e:Gke);return new Promise(function(a){(function o(){var l=Date.now();if(l>=n){a(null);return}if(l>=r&&zI>t){Mk(l).then(function(){a(null)});return}setTimeout(o,50)})()})}function Tk(e,t,r,n){if(!e||t==null||t==="")return r&&n&&nK(n,r),Promise.resolve();var a=String(t);zI=Date.now();var o=h.terminalWriteGeneration||0,l=h.terminalWriteQueue||Promise.resolve();return h.terminalWriteQueue=rQ(e,a,l,function(){return e===h.terminal&&o===(h.terminalWriteGeneration||0)},function(){h.terminalAutoFollow!==!1&&B9(!1)},function(){r&&n&&nK(n,r)}),h.terminalWriteQueue}function Yke(){h.terminal&&(h.terminal.reset(),h.terminal.clear())}function I9(e,t){return new Promise(function(r){if(!t){r(null);return}e.write(t,function(){r(null)})})}function jk(e,t,r,n=!1){if(!t||t.version!==1)return!1;if(e&&!n){var a=ZX(e,t);h.terminalStatesBySession[e]=t,a?t=a:eQ(e,t)}if(!h.terminal)return!0;var o=h.terminal;h.terminalWriteGeneration=(h.terminalWriteGeneration||0)+1;var l=(h.terminalRestoreGeneration||0)+1;h.terminalRestoreGeneration=l,h.terminalProgrammaticScrollUntil=Date.now()+400;var u=h.terminalWriteQueue||Promise.resolve();return h.terminalWriteQueue=u.catch(function(){}).then(async function(){if(!(o!==h.terminal||l!==h.terminalRestoreGeneration)){var d=h.terminalAutoFollow===!1,p=cs(),m=Math.max(0,o.buffer.active.baseY-o.buffer.active.viewportY);!Number.isFinite(m)&&p&&(m=p.scrollHeight-p.clientHeight-p.scrollTop),h.terminalRestoring=!0;try{if(o.reset(),o.clear(),t.cols>0&&t.rows>0&&o.resize(t.cols,t.rows),await I9(o,String(t.data||"")),o!==h.terminal||l!==h.terminalRestoreGeneration)return;for(var v=Array.isArray(t.pending)?t.pending:[],g=0;g<v.length;g++){if(o!==h.terminal||l!==h.terminalRestoreGeneration)return;var b=v[g]||{};b.type==="resize"&&b.cols>0&&b.rows>0?o.resize(b.cols,b.rows):b.type==="data"&&await I9(o,String(b.data||""))}if(o!==h.terminal||l!==h.terminalRestoreGeneration)return;h.lastResize={cols:o.cols,rows:o.rows},h.terminalSessionId=e||null,h.terminalOutput=String(r||""),h.terminalProgrammaticScrollUntil=Date.now()+120,d&&m>0?(h.terminalAutoFollow=!1,h.terminalFitAddon&&typeof h.terminalFitAddon.fit=="function"&&ep(o,h.terminalFitAddon),o.scrollToLine(Math.max(0,o.buffer.active.baseY-m))):(h.terminalAutoFollow=!0,h.terminalFitAddon&&typeof h.terminalFitAddon.fit=="function"&&ep(o,h.terminalFitAddon),o.scrollToBottom()),Ys()}finally{o===h.terminal&&(h.terminalRestoring=!1)}o===h.terminal&&l===h.terminalRestoreGeneration&&bw(o.cols,o.rows)}}),!0}function ow(e,t,r){if(!h.terminal)return!1;var n=String(t||""),a=e||null,o=r||{},l=o.mode==="replace",u=h.terminalSessionId!==a,d=String(h.terminalOutput||""),p=!1;if(u||l){var m=h.terminal,v=(h.terminalWriteGeneration||0)+1;h.terminalWriteGeneration=v,h.terminalRestoreGeneration=(h.terminalRestoreGeneration||0)+1,h.terminalWriteQueue=(h.terminalWriteQueue||Promise.resolve()).catch(function(){}).then(async function(){if(!(m!==h.terminal||v!==h.terminalWriteGeneration)){h.terminalRestoring=!0;try{Yke(),await I9(m,n)}finally{m===h.terminal&&(h.terminalRestoring=!1)}}}),p=!!n||u}else if(n.startsWith(d)){var g=n.slice(d.length);g&&(Tk(h.terminal,g),p=!0)}else return!1;return h.terminalSessionId=a,h.terminalOutput=n,o.scroll!==!1&&p&&Wl("output"),u&&bw(h.terminal.cols,h.terminal.rows),p}var UE=!1,ec=null,Us=null;function aQ(e,t){let r=e.parentElement;if(!r||!t&&e.offsetWidth>0&&e.offsetHeight>0)return function(){};let n=[],a=[],o=[],l=function(p,m,v){o.push({node:p,property:m,value:p.style.getPropertyValue(m),priority:p.style.getPropertyPriority(m)}),p.style.setProperty(m,v,"important")},u=function(p){if(!(p>0))return;let m=document.createElement("div");m.dataset.terminalCreationSpace="true",Object.assign(m.style,{height:`${p}px`,flexShrink:"0",visibility:"hidden"}),n.push(m),r.insertBefore(m,e)},d=function(){try{for(let p of a)p()}finally{for(let p of n)p.remove();for(let p of o.reverse())p.value?p.node.style.setProperty(p.property,p.value,p.priority):p.node.style.removeProperty(p.property)}};try{if(l(e,"display","flex"),l(e,"visibility","hidden"),t&&!document.documentElement.classList.contains("is-wand-embed-terminal")){let p="terminal-creation-measurement",m=tX({...h,selectedId:p,currentTask:null,gitStatus:null,currentView:"terminal",sessions:[{id:p,sessionKind:"pty",status:"running",cwd:t.cwd||h.workingDir,provider:t.kind==="shell"?void 0:t.provider,command:t.command||(t.kind==="shell"?"Shell":t.provider)}]},SX()),v={id:p,sessionKind:"pty",status:"running",provider:t.kind==="shell"?void 0:t.provider,command:t.command||(t.kind==="shell"?"Shell":t.provider),cwd:t.cwd,workspaceTaskId:t.workspaceTaskId},g=r.closest(".quick-terminal-workspace")?.querySelector(".quick-terminal-toolbar"),b=r.querySelector(".main-header-row, .workspace-tab-bar"),x=g?.clientWidth||r.clientWidth,y=m.viewport.mobile?Cke(m,x):t.workspaceTaskId?Ske({mobile:!1,taskName:Kr.getSnapshot().taskName,session:v},x):Fke({mobile:!1,session:v},x),E=g||b;E?(l(E,"box-sizing","border-box"),l(E,"height",`${y}px`),l(E,"min-height",`${y}px`),l(E,"max-height",`${y}px`)):u(y);for(let S of r.querySelectorAll(".workspace-mobile-navigation, .workspace-window"))l(S,"display","none")}for(let p of Array.from(r.children))if(!(!(p instanceof HTMLElement)||p===e)&&((p.id==="chat-output"||p.id==="blank-chat")&&l(p,"display","none"),p.classList.contains("input-panel"))){if(document.documentElement.classList.contains("is-wand-embed-terminal")&&document.documentElement.classList.contains("is-wand-native-input"))continue;getComputedStyle(p).display==="none"&&(l(p,"display","block"),l(p,"visibility","hidden")),t&&(l(p,"visibility","hidden"),a.push($ke(p)))}}catch(p){throw d(),p}return d}function Jke(e){let t=document.getElementById("output");if(!t||!h.terminal)return null;let r=aQ(t,e);try{return zX(h.terminal)}finally{r()}}function Js(e){if(!e?.prepare&&Ir.getSnapshot().active===!0)return;Us&&!Us.wrap.isConnected&&Us.release();var t=document.getElementById("output");if(!t||h.terminal||h.terminalInitializing)return;var r=h.sessions.find(function($){return $.id===h.selectedId});if(!e?.prepare&&(!r||hr(r))||!e?.prepare&&ec&&ec===h.selectedId)return;if(typeof XTermLib>"u"||!XTermLib.Terminal){if(UE||ec===h.selectedId)return;UE=!0;let $=document.createElement("div");$.dataset.terminalLoadState="loading",$.setAttribute("role","status"),t.querySelector("[data-terminal-load-state]")?.remove(),$.textContent="\u6B63\u5728\u52A0\u8F7D\u7EC8\u7AEF\u2026",t.appendChild($),zf().then(()=>{UE=!1,ec=null,Js(e)}).catch(()=>{if(UE=!1,h.terminal||Us)return;let C=h.sessions.find(I=>I.id===h.selectedId),D=document.getElementById("output");if(ec=C&&!hr(C)?C.id:null,D?.isConnected&&ec){D.querySelector("[data-terminal-load-state]")?.remove();let I=document.createElement("div");I.dataset.terminalLoadState="error";let M=document.createElement("button");M.type="button",M.dataset.antdControl="default",M.textContent="\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5",I.appendChild(M),D.appendChild(I),zy(D),I.querySelector("button")?.addEventListener("click",()=>{ec=null,Js()})}});return}h.terminalInitRetries=0,h.terminalInitializing=!0,t.querySelector("[data-terminal-load-state]")?.remove(),zy(t);var n=!!r&&!hr(r)&&h.currentView==="terminal";n&&(t.classList.remove("hidden"),t.classList.add("active"));for(var a=t.querySelectorAll(".terminal-scroll-wrap"),o=0;o<a.length;o++){var l=a[o];l.parentNode===t&&t.removeChild(l)}var u=document.createElement("div");u.className="terminal-scroll-wrap",t.appendChild(u);var d=getComputedStyle(u),p=d.getPropertyValue("--term-font-family").trim()||"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",m=h.terminalBaseFontSize,v=Math.max(8,Math.round(m*Number(h.terminalScale||1))),g=null,b=null,x=!1;let y={wrap:u,release:function(){if(x)return;x=!0;let $=Us===y;if($&&(Us=null),g&&h.terminal===g){try{vw()}catch{try{b?.dispose?.()}catch{}try{g?.dispose?.()}catch{}h.terminal=null,h.terminalFitAddon=null,u.remove()}window.__wandTerminal===g&&(window.__wandTerminal=null)}else{try{b?.dispose?.()}catch{}try{g?.dispose?.()}catch{}u.remove()}$&&!h.terminal&&(h.terminalInitializing=!1)}};Us=y;let E=function($){let C=Us===y||g&&h.terminal===g;if(y.release(),C){console.error("[wand] xterm init failed:",$);let D=h.sessions.find(I=>I.id===h.selectedId);if(t.isConnected&&D&&!hr(D)){ec=D.id;let I=document.createElement("div");I.dataset.terminalLoadState="error";let M=document.createElement("button");M.type="button",M.dataset.antdControl="default",M.textContent="\u7EC8\u7AEF\u672A\u80FD\u6253\u5F00\uFF0C\u70B9\u51FB\u91CD\u8BD5",I.appendChild(M),t.appendChild(I),zy(t),I.querySelector("button")?.addEventListener("click",()=>{ec=null,Js()})}}};try{g=new XTermLib.Terminal({cols:120,rows:36,allowProposedApi:!0,convertEol:!1,cursorBlink:!1,disableStdin:!1,fontFamily:p,fontSize:v,lineHeight:1.25,scrollback:5e3,theme:sd()}),b=new XTermLib.FitAddon;var S=new XTermLib.Unicode11Addon;g.loadAddon(b),g.loadAddon(S),g.unicode.activeVersion="11";var F=document.fonts&&typeof document.fonts.ready=="object"?Promise.race([document.fonts.ready,new Promise(function($){setTimeout($,800)})]):Promise.resolve();F.then(function(){if(Us!==y||!u.isConnected||document.getElementById("output")!==t||!e?.prepare&&Ir.getSnapshot().active===!0){y.release();return}let $=e?.prepare?aQ(t):function(){};try{let W=function(){try{var H=u.querySelector(".xterm-screen");if(H&&g.rows>0){var q=H.clientHeight/g.rows;if(q>4)return q}}catch{}return Math.max(1,v*1.25)};var C=W;g.options.theme=sd(),g.open(u),g.registerLinkProvider({provideLinks:function(H,q){for(var z=g.buffer.active.getLine(H),L=z?z.translateToString(!0):"",U=[],Y=/https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::\d+)?(?:\/[^\s]+)?/gi,X;(X=Y.exec(L))!==null;){var J=X.index+1,N=X.index+X[0].length;U.push({text:X[0],range:{start:{x:J,y:H},end:{x:N,y:H}},activate:function(te,ne){iw(ne)}})}for(var R=/(^|[\s(\['"])(\/[^\s]+?\.(?:html?|\/))(?=$|[\s)\]'"])/gi;(X=R.exec(L))!==null;){var K=X[2],Q=X.index+X[1].length+1,ee=X.index+X[1].length+K.length;U.push({text:K,range:{start:{x:Q,y:H},end:{x:ee,y:H}},activate:function(te,ne){iw(ne)}})}q(U.length?U:void 0)}}),g.attachCustomKeyEventHandler(function(H){if(!h.terminalInteractive||H.defaultPrevented)return!1;let q=di.read(h.selectedId);if(H.type!=="keydown"||H.isComposing||H.keyCode===229||H.metaKey||!q.ctrl&&!q.shift||H.ctrlKey&&H.key.toLowerCase()==="c"&&pw())return!0;let z=aC(qk(H),rw(h.selectedId,{ctrl:H.ctrlKey,shift:H.shiftKey,alt:H.altKey}));return z===null?!0:(H.preventDefault(),_y(z,q.ctrl&&H.key.length===1?"ctrl_"+H.key.toLowerCase():qk(H)),!1)});var D={direction:0,accumulatedPixels:0,lastEventAt:0,lastPageAt:0},I={accumulatedPixels:0,lastEventAt:0},M={accumulatedPixels:0};KX(u,function(H){ym(H*.25)}),u.addEventListener("wheel",function(H){if(H.ctrlKey||H.metaKey){H.preventDefault(),H.stopPropagation();var q=GX(H,M);q!==0&&ym(q*.25);return}if(!(Math.abs(H.deltaY)<=Math.abs(H.deltaX))){if(H.preventDefault(),H.stopPropagation(),g.buffer.active.type==="alternate"){var z=cs(),L=XX(H,D,z?z.clientHeight:g.rows*W()),U=OI(L);U&&_y(U);return}H.deltaY<0&&jy();var Y=QX(H,I,W(),g.rows*W());Y!==0&&g.scrollLines(Y)}},{capture:!0,passive:!1});var A=u.querySelector(".xterm-helper-textarea");A&&(A.readOnly=np()?!0:!h.terminalInteractive),H8e(),Wk(),h.terminal=g;try{window.__wandTerminal=g}catch{}h.terminalFitAddon=b,h.terminalWriteQueue=Promise.resolve(),h.terminalInitializing=!1,ep(g,b),g.onData(function(H){_y(H)}),g.onBinary(function(H){h.terminalInteractive&&_y(H)}),g.onResize(function(H){bw(H.cols,H.rows)}),h.terminalAutoFollow=!0;var j=cs();if(j&&(h.terminalViewportScrollHandler=function(){if(Date.now()<h.terminalProgrammaticScrollUntil){Ys();return}A9()?h.terminalAutoFollow=!0:jy(),Ys(),ck(g)},j.addEventListener("scroll",h.terminalViewportScrollHandler,{passive:!0})),h.terminalWheelHandler=function(H){H.deltaY<0&&g.buffer.active.type==="normal"&&(jy(),ck(g))},t.addEventListener("wheel",h.terminalWheelHandler,{capture:!0,passive:!0}),g.onScroll(function(){Date.now()<h.terminalProgrammaticScrollUntil||(A9()?h.terminalAutoFollow=!0:h.terminalAutoFollow&&jy(),Ys(),ck(g))}),Rke(t),Pke(u,g),h.selectedId){var P=h.sessions.find(function(H){return H.id===h.selectedId}),O=P&&h.terminalStatesBySession[P.id],V=P&&(P.terminalState||O);P&&!jk(P.id,V,P.output||"")&&ow(P.id,P.output||"",{mode:"replace",scroll:!1})}else Tk(g,`\u70B9\u51FB\u4E0A\u65B9\u300C\u65B0\u5BF9\u8BDD\u300D\u5F00\u59CB\u4F60\u7684\u7B2C\u4E00\u6B21\u5BF9\u8BDD\u3002\r
281
- `);h.terminalClickHandler=function(H){if(!pw()){if(np()){Wk();return}h.terminalInteractive?g.focus():Ql(H)}},t.addEventListener("click",h.terminalClickHandler),Ys(),fke(),mke(),hke(),ao("mount"),document.documentElement.classList.contains("is-wand-embed-terminal")&&[120,350,700].forEach(function(H){setTimeout(function(){h.terminal&&ao("embed-settle")},H)}),Us===y&&(Us=null)}finally{$()}}).catch(E)}catch($){E($)}}function Zke(e,t){return e===t?!0:!e||!t?!1:e.total===t.total&&e.command===t.command&&e.file===t.file&&e.tool===t.tool}function eCe(e,t){return e.key!==t.key||e.target!==t.target?!1:e.kind==="auto-approve"&&t.kind==="auto-approve"?e.sessionId===t.sessionId&&e.enabled===t.enabled&&e.pending===t.pending:e.kind==="permissions"&&t.kind==="permissions"?e.sessionId===t.sessionId&&e.pending===t.pending&&e.permission.requestId===t.permission.requestId&&e.permission.label===t.permission.label&&e.permission.autoApproving===t.permission.autoApproving:e.kind==="approval-stats"&&t.kind==="approval-stats"?Zke(e.stats,t.stats):!1}var tCe=class extends vl{constructor(){super(eCe)}},Og=new tCe,rCe=B(Jt(),1);function ww(e){let t=[];document.querySelectorAll(e.selector).forEach((n,a)=>{if(!n.isConnected)return;let o=e.build(n,a);o&&t.push(o)});let r=()=>{t.length===0?e.store.clear():e.store.sync(t)};e.flush?(0,rCe.flushSync)(r):r()}function nCe(e){return!e||e.autoApproveHidden?{visible:!1,enabled:!1}:{visible:!0,enabled:e.autoApproveEnabled}}function aCe(e){return e&&e.total>0?e:null}function iCe(e){let t=e.resolve();ww({selector:"[data-composer-badge-host]",store:Og,build(r,n){let a=r.dataset.composerBadgeHost,o=a||`composer-badge-${n}`;if(a==="auto-approve"){let{visible:l,enabled:u}=nCe(t);if(r.classList.toggle("hidden",!l),!l||!t)return null;let d=t.sessionId;return{key:o,kind:"auto-approve",target:r,sessionId:d,pending:t.autoApprovePending,enabled:u,onToggle(){e.onToggleAutoApprove(d)}}}if(a==="permissions"){if(r.classList.toggle("hidden",!t?.permission),!t?.permission)return null;let{sessionId:l,permission:u}=t;return{key:o,kind:"permissions",target:r,sessionId:l,pending:t.permissionPending,permission:u,onAction(d){e.onPermissionAction(l,u.requestId,d)}}}if(a==="approval-stats"){let l=aCe(t?.approvalStats);return r.classList.toggle("hidden",!l),{key:o,kind:"approval-stats",target:r,stats:l}}return null}})}function iQ(e){if(!e||e.provider==="codex")return null;let t=e.pendingEscalation;if(!t&&!e.permissionBlocked)return null;let r=!!e.autoApprovePermissions,n=r?"\u81EA\u52A8\u6279\u51C6\u4E2D...":t?(t.reason||"\u7B49\u5F85\u6388\u6743")+(t.target?` \xB7 ${t.target}`:""):"\u7B49\u5F85\u6388\u6743";return{requestId:t?.requestId||null,label:n,autoApproving:r}}function oCe(e){var t=e&&e.messages;if(!t||t.length===0)return"";for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.role==="assistant"){for(var a=n.content||[],o=0;o<a.length;o++)if(a[o].type==="text"&&a[o].text&&a[o].text.trim()){var l=a[o].text.trim();l=l.replace(/^#+\s+/gm,"").replace(/\*\*/g,"").replace(/`/g,"");var u=l.split(`
282
- `)[0].trim();return u.slice(0,100)}}}return""}function sCe(e,t){let r=h.sessions.find(n=>n.id===e);r&&(r.output=Gy((r.output||"")+t))}function oQ(e,t){let r=h.sessions.find(n=>n.id===e);r&&(r.output=Gy(t))}var dn=new Map,LI=new Map,el=new Set,M9=new Set;function Dg(e){for(let t of el){let r=dn.get(t),n=kX(t,e);r&&n&&(r.terminal.options.disableStdin=n!=="\u5DF2\u8FDE\u63A5")}for(let t of M9)t(e)}function lCe(e){return M9.add(e),()=>{M9.delete(e)}}function uCe(e,t){t?el.add(e):el.delete(e)}function aK(e){return el.has(e)}function cCe(e){dn.get(e)?.terminal.focus()}function dCe(e){tp({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}})}function sQ(e){return Math.round(Math.max(.5,Math.min(2,e))*4)/4}function HI(){return h.ws&&h.ws.readyState===WebSocket.OPEN?h.ws:null}function tp(e){let t=HI();t&&t.send(JSON.stringify(e))}function pCe(){return(typeof getComputedStyle=="function"?getComputedStyle(document.documentElement).getPropertyValue("--term-font-family").trim():"")||"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}function T9(e=Number(h.terminalScale||1)){let t=h.terminalBaseFontSize||13;return Math.max(8,Math.round(t*e))}function YB(e,t){if(!dn.get(e)?.restoring){if(el.has(e)&&!HI()){Dg({sessionId:e,type:"pty_error"});return}tp({type:"pty_input",sessionId:e,data:t,userInput:el.has(e)||h.terminalInteractive===!0})}}function lQ(e,t,r){let n=dn.get(e);if(n?.restoring||!HI())return;let a=Math.max(20,Math.min(Math.floor(t),1e3)),o=Math.max(5,Math.min(Math.floor(r),500)),l=`${a}x${o}`;n?.lastSize!==l&&(n&&(n.lastSize=l),tp({type:"pty_resize",sessionId:e,cols:a,rows:o}))}function Ky(e){if(e.disposed||e.restoring||el.has(e.sessionId)&&(e.container.clientWidth<=0||e.container.clientHeight<=0))return;try{ep(e.terminal,e.fitAddon)}catch{}let t=Number(e.terminal.cols),r=Number(e.terminal.rows);t>0&&r>0&&lQ(e.sessionId,t,r)}function j9(e){requestAnimationFrame(()=>{Ky(e),requestAnimationFrame(()=>Ky(e))}),window.setTimeout(()=>Ky(e),120)}function cm(e){return LI.get(e)??sQ(Number(h.terminalScale||1))}function sw(e,t){let r=sQ(t);LI.set(e,r);let n=dn.get(e);return!n||n.disposed||(n.terminal.options.fontSize=T9(r),j9(n)),r}Eo.subscribe(()=>{for(let e of dn.values())e.disposed||(e.terminal.options.theme=sd())});function Ig(e){return dn.has(e)}function fCe(e){return!!dn.get(e)?.terminal?.modes?.bracketedPasteMode}function _9(e,t,r=e.restoreGeneration){return!t||e.disposed||r!==e.restoreGeneration?Promise.resolve():new Promise(n=>{try{e.terminal.write(t,()=>n())}catch{n()}})}function uC(e,t){if(!e||!t)return!1;let r=dn.get(e);if(r&&!r.disposed){if(r.container!==t){try{r.resizeObserver.disconnect()}catch{}t.appendChild(r.wrap),r.container=t,r.resizeObserver.observe(t)}return j9(r),!0}let n=globalThis.XTermLib;if(!n||!n.Terminal||!n.FitAddon)return!1;let a=document.createElement("div");a.className="terminal-scroll-wrap pooled-terminal-wrap",a.dataset.ptySessionId=e,t.appendChild(a);let o=null,l=null,u=null;try{let d=new n.Terminal({cols:120,rows:36,allowProposedApi:!0,convertEol:!1,cursorBlink:!1,disableStdin:el.has(e),fontFamily:pCe(),fontSize:T9(cm(e)),lineHeight:1.25,scrollback:5e3,theme:sd()});o=d;let p=new n.FitAddon;l=p;let m=null;try{n.Unicode11Addon&&(m=new n.Unicode11Addon,d.loadAddon(m),d.unicode.activeVersion="11")}catch{}d.loadAddon(p),d.open(a);try{ep(d,p)}catch{}d.onData(C=>YB(e,C)),d.onBinary(C=>{(el.has(e)||h.terminalInteractive)&&YB(e,C)}),d.onResize(C=>lQ(e,C.cols,C.rows));let v=new ResizeObserver(()=>{let C=dn.get(e);C&&Ky(C)});u=v,v.observe(t);let g={direction:0,accumulatedPixels:0,lastEventAt:0,lastPageAt:0},b={accumulatedPixels:0,lastEventAt:0},x=()=>{let C=dn.get(e);!C||C.autoFollow||C.disposed||d.buffer.active.type!=="normal"||d.buffer.active.viewportY>12||tQ(e,async D=>dn.get(e)!==C?!1:(_k(e,D,"",!0),await C.writeQueue,dn.get(e)===C))},y=()=>{try{let C=a.querySelector(".xterm-screen");if(C&&d.rows>0){let D=C.clientHeight/d.rows;if(D>4)return D}}catch{}return Math.max(1,T9(cm(e))*1.25)},E={accumulatedPixels:0};KX(a,C=>{sw(e,cm(e)+C*.25)}),a.addEventListener("wheel",C=>{if(C.ctrlKey||C.metaKey){C.preventDefault(),C.stopPropagation();let I=GX(C,E);I!==0&&sw(e,cm(e)+I*.25);return}if(Math.abs(C.deltaY)<=Math.abs(C.deltaX))return;if(C.preventDefault(),C.stopPropagation(),d.buffer.active.type==="alternate"){let I=XX(C,g,t.clientHeight||d.rows*y()),M=OI(I);M&&YB(e,M);return}if(C.deltaY<0){let I=dn.get(e);I&&(I.autoFollow=!1)}let D=QX(C,b,y(),t.clientHeight||d.rows*y());if(D!==0&&d.scrollLines(D),C.deltaY<0&&x(),d.buffer.active.viewportY>=d.buffer.active.baseY){let I=dn.get(e);I&&(I.autoFollow=!0)}},{capture:!0,passive:!1}),d.onScroll(()=>{let C=dn.get(e);C&&d.buffer.active.viewportY>=d.buffer.active.baseY&&(C.autoFollow=!0)});let S={sessionId:e,terminal:d,fitAddon:p,wrap:a,container:t,resizeObserver:v,writeQueue:Promise.resolve(),wheelPagingState:g,wheelScrollState:b,autoFollow:!0,restoreGeneration:0,restoring:!1,disposed:!1};dn.set(e,S);let F=h.sessions.find(C=>C.id===e),$=h.terminalStatesBySession?.[e];return _k(e,F?.terminalState??$,F?.output||"")||dk(e,F?.output||""),tp({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}}),j9(S),!0}catch(d){if(dn.has(e))uQ(e);else{u?.disconnect();try{l?.dispose?.()}catch{}try{o?.dispose?.()}catch{}a.remove()}throw d}}function mCe(){for(let e of dn.keys())tp({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}})}function hCe(e,t,r){sCe(e,t);let n=dn.get(e);if(!n||n.disposed){r&&e&&tp({type:"pty_ack",sessionId:e,bytes:r});return}let a=n.restoreGeneration;n.writeQueue=rQ(n.terminal,t,n.writeQueue,()=>!n.disposed&&a===n.restoreGeneration,()=>{n.autoFollow&&n.terminal.scrollToBottom()},()=>{r&&e&&tp({type:"pty_ack",sessionId:e,bytes:r})})}function dk(e,t){oQ(e,t);let r=dn.get(e);if(!r||r.disposed)return;let n=++r.restoreGeneration;r.writeQueue=r.writeQueue.catch(()=>{}).then(async()=>{if(!(r.disposed||n!==r.restoreGeneration)){r.restoring=!0;try{try{r.terminal.reset(),r.terminal.clear()}catch{}if(await _9(r,t,n),r.disposed||n!==r.restoreGeneration)return;try{r.terminal.scrollToBottom()}catch{}}finally{r.restoring=!1}}})}function _k(e,t,r="",n=!1){if(!t||t.version!==1)return!1;if(e&&!n){let l=ZX(e,t);h.terminalStatesBySession[e]=t,l?t=l:eQ(e,t)}n||oQ(e,r);let a=dn.get(e);if(!a||a.disposed)return!0;let o=++a.restoreGeneration;return a.writeQueue=a.writeQueue.catch(()=>{}).then(async()=>{if(a.disposed||o!==a.restoreGeneration)return;let l=!a.autoFollow,u=a.terminal.buffer.active.baseY-a.terminal.buffer.active.viewportY;a.restoring=!0;try{try{a.terminal.reset(),a.terminal.clear(),t.cols>0&&t.rows>0&&a.terminal.resize(t.cols,t.rows)}catch{}await _9(a,String(t.data||""),o);let d=Array.isArray(t.pending)?t.pending:[];for(let p of d){if(a.disposed||o!==a.restoreGeneration)return;if(p?.type==="resize"&&p.cols>0&&p.rows>0)try{a.terminal.resize(p.cols,p.rows)}catch{}else p?.type==="data"&&await _9(a,String(p.data||""),o)}if(a.disposed||o!==a.restoreGeneration)return;a.lastSize=`${a.terminal.cols}x${a.terminal.rows}`;try{a.container.clientWidth!==0&&a.container.clientHeight!==0&&ep(a.terminal,a.fitAddon),l?(a.autoFollow=!1,a.terminal.scrollToLine(Math.max(0,a.terminal.buffer.active.baseY-u))):a.terminal.scrollToBottom()}catch{}}finally{a.restoring=!1}!a.disposed&&o===a.restoreGeneration&&Ky(a)}),!0}function zg(e){el.has(e)||uQ(e)}function uQ(e){LI.delete(e),jke(e);let t=dn.get(e);if(t){t.disposed=!0;try{t.resizeObserver.disconnect()}catch{}try{t.terminal.dispose()}catch{}t.wrap.parentNode&&t.wrap.parentNode.removeChild(t.wrap),dn.delete(e),tp({type:"unsubscribe",sessionId:e})}}function xw(){for(let e of[...dn.keys()])el.has(e)||zg(e)}cEe({mount:uC,dispose:zg,retain:uCe,focus:cCe,reconnect:dCe,observe:lCe});var N9=!1;function gCe(){N9=!1,nc.clear()}function GE(e,t){if(e){h.turnActiveBySession||(h.turnActiveBySession={});var r=h.turnActiveBySession[e];h.turnActiveBySession[e]=t,r===!0&&!t&&$Q()}}function P9(e){if(!(!h.ws||h.ws.readyState!==WebSocket.OPEN)){var t=h.chatResyncPendingBySession||(h.chatResyncPendingBySession={});if(!t[e]){t[e]=!0;try{h.ws.send(JSON.stringify({type:"resync",sessionId:e}))}catch(r){delete t[e],console.error("[wand] chat resync failed:",r)}}}}function KE(e){if(e!==h.selectedId)return null;var t=h.sessions.find(function(r){return r.id===e});return t?(h.currentMessages=Xs(t,uc(t,t.output,!1)),t):null}function cQ(){fQ(),PCe(),kSe(),bCe(),!cC()&&(h.pollTimer=setInterval(Yl,1600))}var vCe=3e4,Xy=null;function bCe(){Xy===null&&(Xy=setInterval(function(){var e=document.querySelectorAll(".session-time");e.length>0&&Ag()},vCe))}function yCe(){Xy!==null&&(clearInterval(Xy),Xy=null)}function qI(){h.wsReconnectTimer&&(clearTimeout(h.wsReconnectTimer),h.wsReconnectTimer=null)}var wCe=1e4,xCe=4e4;function ECe(){dQ(),h.wsHeartbeatCheckTimer=setInterval(pQ,wCe)}function dQ(){h.wsHeartbeatCheckTimer&&(clearInterval(h.wsHeartbeatCheckTimer),h.wsHeartbeatCheckTimer=null)}function pQ(){if(!(!h.ws||h.ws.readyState!==WebSocket.OPEN)&&h.lastWsMessageAt){var e=Date.now()-h.lastWsMessageAt;e>xCe&&WI("heartbeat-stale-"+Math.round(e/1e3)+"s")}}function WI(e){if(qI(),h.ws){var t=h.ws;try{t.onopen=null}catch{}try{t.onclose=null}catch{}try{t.onerror=null}catch{}try{t.onmessage=null}catch{}try{t.close()}catch{}h.ws=null}h.wsConnected=!1,h.wsReconnectAttempts=0,cC(e)}function iK(){if(!h.wsReconnectTimer&&!document.hidden){var e=h.wsReconnectAttempts||0,t=[500,1e3,2e3,4e3,8e3],r=t[e<t.length?e:t.length-1];h.wsReconnectAttempts=e+1,h.wsReconnectTimer=setTimeout(function(){h.wsReconnectTimer=null,h.config&&!h.ws&&!document.hidden&&cC("backoff")},r)}}function cC(e){if(!window.WebSocket)return!1;if(h.ws){if(h.ws.readyState===WebSocket.OPEN||h.ws.readyState===WebSocket.CONNECTING)return!0;h.ws.onopen=h.ws.onmessage=h.ws.onclose=h.ws.onerror=null;try{h.ws.close()}catch{}h.ws=null}var t=window.location.protocol==="https:"?"wss:":"ws:",r=t+"//"+window.location.host+"/ws";try{var n=new WebSocket(r);return h.ws=n,h.wsConnected=!1,n.onopen=function(){if(h.ws===n){try{window.__wandWs=n}catch{}h.wsConnected=!0,nc.clear(),Dg({type:"connected"}),h.lastWsMessageAt=Date.now(),h.wsReconnectAttempts=0,qI(),h.lastSeqBySession={},h.chatResyncPendingBySession={},N9&&(z1(),Ru(),Ai({skipSelectedOutputReload:!0})),N9=!0,ECe(),$C(h.selectedId),mCe(),X8e(),aw("ws-reconnect")}},n.onmessage=function(a){if(h.ws===n){h.lastWsMessageAt=Date.now();try{var o=JSON.parse(a.data);if(o&&o.type==="ping"){if(h.ws&&h.ws.readyState===WebSocket.OPEN)try{h.ws.send(JSON.stringify({type:"pong",t:o.t}))}catch{}return}if(o&&o.type==="pty_error"){Dg(o),Ze("\u7EC8\u7AEF\u64CD\u4F5C\u672A\u786E\u8BA4\u3002\u8BF7\u68C0\u67E5\u8F93\u51FA\u540E\u518D\u91CD\u8BD5\u3002","error"),o.sessionId&&h.ws&&h.ws.readyState===WebSocket.OPEN&&h.ws.send(JSON.stringify({type:"resync",sessionId:o.sessionId}));return}if(o&&o.type==="resync_required"&&o.sessionId){Dg(o),nc.delete(o.sessionId),P9(o.sessionId),h.lastSeqBySession||(h.lastSeqBySession={}),h.lastSeqBySession[o.sessionId]=0;return}if(o&&(o.type==="init"||o.type==="output")&&o.sessionId&&typeof o.seq=="number"){h.lastSeqBySession||(h.lastSeqBySession={});var l=h.lastSeqBySession[o.sessionId]||0;if(o.type==="init"){if(l>0&&o.seq<=l)return;h.lastSeqBySession[o.sessionId]=o.seq}else if(o.seq===l+1)h.lastSeqBySession[o.sessionId]=o.seq;else if(o.seq>l+1&&l>0){nc.delete(o.sessionId),P9(o.sessionId),h.lastSeqBySession[o.sessionId]=0;return}else{if(l>0&&o.seq<=l)return;h.lastSeqBySession[o.sessionId]=o.seq}}o?.sessionId&&(o.type==="init"||Array.isArray(o.data?.messages))&&h.chatResyncPendingBySession&&delete h.chatResyncPendingBySession[o.sessionId],Dg(o),kCe(o),o.type==="init"&&o.sessionId&&DEe(o.sessionId)}catch{}}},n.onclose=function(){h.ws===n&&(h.ws=null,h.wsConnected=!1,nc.clear(),sc(),Dg({type:"disconnected"}),dQ(),iK())},n.onerror=function(){h.ws===n&&(Nu("websocket_error",new Error("WebSocket transport error")),n.close())},!0}catch(a){return Nu("websocket_error",a),iK(),!1}}function kCe(e){switch(e.type){case"output":if(e.sessionId&&typeof e.data?.chunk=="string"&&Tke(e.sessionId,e.data.chunk),e.data&&e.sessionId&&Object.prototype.hasOwnProperty.call(e.data,"isResponding")&&GE(e.sessionId,!!e.data.isResponding),e.data&&e.sessionId&&e.data.structuredState&&GE(e.sessionId,e.data.structuredState.inFlight===!0),e.data&&e.sessionId){var t=!!e.data.incremental,r={id:e.sessionId},n=!1;if(!t&&e.data.output!==void 0&&(r.output=e.data.output),Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")&&(r.permissionBlocked=!!e.data.permissionBlocked),Object.prototype.hasOwnProperty.call(e.data,"queuedMessages")&&(r.queuedMessages=e.data.queuedMessages||[],pi.advance(e.sessionId,"server")),e.data.structuredState&&(r.structuredState=e.data.structuredState),e.data.sessionKind&&(r.sessionKind=e.data.sessionKind),Object.prototype.hasOwnProperty.call(e.data,"title")&&(r.title=e.data.title,n=!0),Object.prototype.hasOwnProperty.call(e.data,"description")&&(r.description=e.data.description,n=!0),Object.prototype.hasOwnProperty.call(e.data,"titleGenerating")&&(r.titleGenerating=!!e.data.titleGenerating,n=!0),Object.prototype.hasOwnProperty.call(e.data,"summary")&&(r.summary=e.data.summary),e.data.messages)r.messages=e.data.messages,typeof e.data.messageOffset=="number"&&(r.messageOffset=e.data.messageOffset),typeof e.data.messageTotal=="number"&&(r.messageTotal=e.data.messageTotal),typeof e.data.leadingBlockOffset=="number"&&(r.leadingBlockOffset=e.data.leadingBlockOffset,r.leadingBlockTotal=e.data.leadingBlockTotal);else if(t&&e.data.lastMessage){var a=h.sessions.find(function(Y){return Y.id===e.sessionId});if(a){var o=Array.isArray(a.messages)?a.messages.slice():[],l=e.data.messageCount,u=typeof a.messageOffset=="number"?a.messageOffset:0,d=u+o.length,p=e.data.lastMessage,m=h.chatResyncPendingBySession?.[e.sessionId];m||!Number.isInteger(l)||!(l===d&&o.length>0||l===d+1)?P9(e.sessionId):(l===d+1?o.push(p):o[o.length-1]=BEe(o[o.length-1],p,o.length===1&&a.leadingBlockOffset||0,a.leadingBlockTotal||0,"latest"),r.messages=o,r.messageOffset=u,r.messageTotal=l,r.leadingBlockOffset=a.leadingBlockOffset||0,r.leadingBlockTotal=a.leadingBlockTotal||0,o.length===1&&(r.leadingBlockOffset=0,r.leadingBlockTotal=Array.isArray(p.content)?p.content.length:0))}}var v=t&&e.data.chunk&&!e.data.lastMessage&&!r.messages&&r.output===void 0&&!e.data.structuredState&&!e.data.sessionKind&&!n;if(v){if(e.data.permissionBlocked!==void 0){var g=h.sessions.find(function(Y){return Y.id===e.sessionId});g&&!!g.permissionBlocked!=!!e.data.permissionBlocked&&(dr(r,"latest"),e.sessionId===h.selectedId&&Xd())}}else if((r.output!==void 0||r.messages||t||e.data.permissionBlocked!==void 0||r.title||r.description||r.titleGenerating!==void 0)&&(dr(r,"latest",e),n&&Ag(),e.sessionId===h.selectedId)){var b=h.sessions.find(function(Y){return Y.id===e.sessionId})||r;KE(e.sessionId),Xd(),b.sessionKind==="structured"||e.data.sessionKind==="structured"?xa():sc()}}e.sessionId===h.selectedId&&h.terminal&&e.data&&aK(e.sessionId)&&(e.data.chunk&&wK(e.sessionId)?(Tk(h.terminal,String(e.data.chunk)),h.terminalOutput=Gy((h.terminalOutput||"")+String(e.data.chunk)),rK()):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")&&ow(e.sessionId,e.data.output||"",{mode:"append"})),e.sessionId===h.selectedId&&h.terminal&&e.data&&!Ig(e.sessionId)?e.data.chunk&&wK(e.sessionId)?(h.terminalLiveStreamSessions[e.sessionId]=!0,Tk(h.terminal,e.data.chunk,e.ptyBytes,e.sessionId),h.terminalSessionId=e.sessionId,e.data.output?h.terminalOutput=Gy(String(e.data.output)):h.terminalOutput=Gy((h.terminalOutput||"")+String(e.data.chunk)),rK()):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")&&ow(e.sessionId,e.data.output||"",{mode:"append"}):e.data&&Ig(e.sessionId)?e.data.chunk?hCe(e.sessionId,String(e.data.chunk),e.ptyBytes):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")?(dk(e.sessionId,String(e.data.output||"")),e.ptyBytes&&h.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes}))):e.ptyBytes&&h.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes})):e.ptyBytes&&h.ws&&h.ws.readyState===WebSocket.OPEN&&h.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes}));break;case"started":e.data&&e.data.id?dr(e.data):dr({id:e.sessionId,status:"running"}),Ag(),Xi();break;case"ended":{$Q();var x=e.data&&e.data.status?e.data.status:"exited",y=e.data&&Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")?!!e.data.permissionBlocked:!1,E={id:e.sessionId,status:x,permissionBlocked:y};for(let Y of["completionRevision","viewedCompletionRevision"])typeof e.data?.[Y]=="number"&&(E[Y]=e.data[Y]);e.data&&e.data.messages&&(E.messages=e.data.messages,typeof e.data.messageOffset=="number"&&(E.messageOffset=e.data.messageOffset),typeof e.data.leadingBlockOffset=="number"&&(E.leadingBlockOffset=e.data.leadingBlockOffset,E.leadingBlockTotal=e.data.leadingBlockTotal),typeof e.data.messageTotal=="number"&&(E.messageTotal=e.data.messageTotal)),e.data&&e.data.structuredState&&(E.structuredState=e.data.structuredState),e.data&&e.data.queuedMessages&&(E.queuedMessages=e.data.queuedMessages),dr(E,"latest",e),typeof e.data?.completionRevision=="number"&&Xi(),h.currentView==="terminal"&&Kk(h.sessions.find(Y=>Y.id===e.sessionId)),e.sessionId===h.selectedId&&(KE(e.sessionId),sc(!0));var S=h.sessions.find(function(Y){return Y.id===e.sessionId}),F=e.data&&e.data.exitCode,$=F!=null&&F!==0,C=S&&S.summary||"",D=S?oCe(S):"",I=$?"\u4EFB\u52A1\u5F02\u5E38\u7ED3\u675F":"\u4EFB\u52A1\u5DF2\u5B8C\u6210",M="";C?(M=C,D&&!$&&(M+=`
283
- `+D)):M=S&&S.command||e.sessionId,uSe(e.sessionId,I,M),kQ(e.sessionId),q9(),(e.sessionId!==h.selectedId||document.hidden)&&L9({title:I,body:M,type:$?"warning":"success",duration:6e3,actionLabel:"\u67E5\u770B",action:function(){Ln(e.sessionId)}}),h.messageQueue=[],h.pendingMessages=[];var A=h.sessions.find(function(Y){return Y.id===e.sessionId}),j=e.sessionId===h.selectedId?h.sessions.find(function(Y){return Y.id===h.selectedId}):null,P=!!(A&&A.sessionKind==="structured"||j&&j.sessionKind==="structured");P&&e.sessionId===h.selectedId?(bK(),Gk(e.sessionId)):P||(h.structuredInputQueue=[],Gk(h.selectedId),Jd()),e.sessionId===h.selectedId&&(P||bm(!1),h.currentTask=null,Xd()),e.sessionId===h.selectedId&&Bw(),Ag(),fC(),e.sessionId===h.selectedId&&(P||Kl(e.sessionId));break}case"init":if(e.sessionId===h.selectedId&&e.data){h.chatRenderTimer&&(clearTimeout(h.chatRenderTimer),h.chatRenderTimer=null),dr(e.data,"latest",e),KE(e.sessionId),xa(!0),Xd(),ql();var O=e.data.output||"";aK(e.sessionId)&&(jk(e.sessionId,e.data.terminalState,O)||oK(O,e.sessionId,"replace")),Ig(e.sessionId)?_k(e.sessionId,e.data.terminalState,O)||dk(e.sessionId,O):jk(e.sessionId,e.data.terminalState,O)||(oK(O,e.sessionId,"replace"),aw("init"))}else if(e.data&&Ig(e.sessionId)){dr(e.data,"latest",e);var V=e.data.output||"";_k(e.sessionId,e.data.terminalState,V)||dk(e.sessionId,V)}e.data&&e.data.structuredState&&e.data.structuredState.inFlight===!0&&Hk(e.sessionId);break;case"usage":break;case"task":e.sessionId===h.selectedId&&(h.currentTask=e.data||null,Xd()),sSe(e.sessionId,e.data||null),W9(e.sessionId),Ag();break;case"status":if(e.sessionId&&e.data){var W={id:e.sessionId};for(let X of["completionRevision","viewedCompletionRevision"])typeof e.data[X]=="number"&&(W[X]=e.data[X]);if(Object.prototype.hasOwnProperty.call(e.data,"status")&&(W.status=e.data.status),Object.prototype.hasOwnProperty.call(e.data,"exitCode")&&(W.exitCode=e.data.exitCode),Object.prototype.hasOwnProperty.call(e.data,"providerCliActive")&&(W.providerCliActive=!!e.data.providerCliActive),Object.prototype.hasOwnProperty.call(e.data,"providerCliExitCode")&&(W.providerCliExitCode=e.data.providerCliExitCode),Object.prototype.hasOwnProperty.call(e.data,"ptyBusy")&&(W.ptyBusy=!!e.data.ptyBusy),Object.prototype.hasOwnProperty.call(e.data,"ptyCommandRunning")&&(W.ptyCommandRunning=e.data.ptyCommandRunning===!0,Xi()),e.data.structuredState)W.structuredState=e.data.structuredState;else if(Object.prototype.hasOwnProperty.call(e.data,"status")){var a=h.sessions.find(function(J){return J.id===e.sessionId});a&&a.sessionKind==="structured"&&(W.structuredState=Object.assign({},a.structuredState||{},{inFlight:e.data.status==="running"}))}if(Object.prototype.hasOwnProperty.call(e.data,"queuedMessages")&&(W.queuedMessages=e.data.queuedMessages||[],pi.advance(e.sessionId,"server")),Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")&&(W.permissionBlocked=!!e.data.permissionBlocked),e.data.pendingEscalation?W.pendingEscalation=e.data.pendingEscalation:e.data.permissionRequest&&(W.pendingEscalation={scope:e.data.permissionRequest.scope,target:e.data.permissionRequest.target,reason:e.data.permissionRequest.prompt}),e.data.pendingEscalation||e.data.permissionRequest){var H=h.sessions.find(function(X){return X.id===e.sessionId}),q=H&&(H.summary||H.command)||e.sessionId,z=e.data.pendingEscalation?e.data.pendingEscalation.reason||"\u9700\u8981\u6743\u9650\u5BA1\u6279":e.data.permissionRequest.prompt||"\u9700\u8981\u6743\u9650\u5BA1\u6279",L=e.data.pendingEscalation?e.data.pendingEscalation.target:e.data.permissionRequest.target,U=q;L?U+=`
284
- `+z+" \xB7 "+L:U+=`
285
- `+z,lSe(e.sessionId,U),e.sessionId!==h.selectedId&&L9({title:"\u9700\u8981\u4F60\u7684\u6388\u6743",body:U,type:"warning",duration:0,actionLabel:"\u53BB\u5904\u7406",action:function(){Ln(e.sessionId)}})}e.data.permissionBlocked===!1&&(W.pendingEscalation=null),e.data.approvalStats&&(W.approvalStats=e.data.approvalStats);var n=!1;Object.prototype.hasOwnProperty.call(e.data,"title")&&(W.title=e.data.title,n=!0),Object.prototype.hasOwnProperty.call(e.data,"description")&&(W.description=e.data.description,n=!0),Object.prototype.hasOwnProperty.call(e.data,"summary")&&(W.summary=e.data.summary),Object.prototype.hasOwnProperty.call(e.data,"titleGenerating")&&(W.titleGenerating=!!e.data.titleGenerating,n=!0),W.structuredState&&GE(e.sessionId,W.structuredState.inFlight===!0),W.structuredState&&W.structuredState.inFlight===!0&&Hk(e.sessionId),Object.prototype.hasOwnProperty.call(e.data,"ptyBusy")&&GE(e.sessionId,!!e.data.ptyBusy),Array.isArray(e.data.messages)&&(W.messages=e.data.messages,["messageOffset","messageTotal","leadingBlockOffset","leadingBlockTotal"].forEach(function(X){typeof e.data[X]=="number"&&(W[X]=e.data[X])})),dr(W,"latest",e),typeof e.data.completionRevision=="number"&&(Xi(),h.currentView==="terminal"&&Kk(h.sessions.find(X=>X.id===e.sessionId))),n&&Ag(),W9(e.sessionId),q9(),e.sessionId===h.selectedId&&(Xd(),e.data.approvalStats&&ql(),(W.structuredState||W.messages||Object.prototype.hasOwnProperty.call(W,"ptyBusy")||Object.prototype.hasOwnProperty.call(W,"ptyCommandRunning"))&&(W.structuredState&&!W.structuredState.inFlight&&bK(),KE(e.sessionId),sc()))}break;case"notification":e.data&&(e.data.kind==="models"?NY():e.data.kind==="update"?EQ(e.data.current||"-",e.data.latest||"-"):e.data.kind==="auto-update-start"?hSe(e.data.current||"-",e.data.latest||"-",e.data.previousInstanceId||null):e.data.kind==="auto-update-restart"?uw(e.data.previousInstanceId||null,e.data.latest||null):e.data.kind==="restart"?uw():e.data.kind==="conversation-session-preview"&&typeof e.data.sessionId=="string"&&typeof e.data.conversationId=="string"&&typeof e.data.preview?.text=="string"?y$(e.data):e.data.kind==="conversations-changed"?G6({runId:"",taskId:""}):e.data.kind==="ai-team-run"&&typeof e.data.runId=="string"?G6({runId:e.data.runId,taskId:String(e.data.taskId||"")}):e.data.kind==="ai-team-definition"&&typeof e.data.teamId=="string"?N1(e.data.teamId):e.data.kind==="silicon-employee-definition"&&typeof e.data.employeeId=="string"?Ru(e.data.employeeId):e.data.kind==="task-retention"?(Xi(),Ai({skipSelectedOutputReload:!0})):e.data.kind==="ai-team-step-live"&&typeof e.data.runId=="string"&&mA({runId:e.data.runId,taskId:String(e.data.taskId||""),steps:Array.isArray(e.data.steps)?e.data.steps:[]}));break}}function Xd(){Ka("task:update"),ql()}function ql(){var e=h.sessions.find(function(t){return t.id===h.selectedId});iCe({resolve:function(){return e?{sessionId:e.id,autoApprovePending:fk.has(e.id),permissionPending:pk.has(e.id),permission:iQ(e),autoApproveHidden:pFe(e),autoApproveEnabled:!!e.autoApprovePermissions,approvalStats:e.approvalStats||null}:null},onToggleAutoApprove:function(t){SCe(t)},onPermissionAction:function(t,r,n){CCe(t,r,n)}})}var pk=new Set;async function CCe(e,t,r){if(e!==h.selectedId||pk.has(e))return;let n=h.sessions.find(function(u){return u.id===e}),a=iQ(n);if(!a||a.autoApproving||a.requestId!==t){ql();return}if(r==="approve-turn"&&!t)return;let o="/api/sessions/"+encodeURIComponent(e),l=r==="approve-turn"?o+"/escalations/"+encodeURIComponent(t)+"/resolve":o+(r==="approve"?"/approve-permission":"/deny-permission");pk.add(e),ql();try{let u=await an(l,{method:"POST",credentials:"same-origin",...r==="approve-turn"?{headers:{"content-type":"application/json"},body:JSON.stringify({resolution:"approve_turn"})}:{}}),d=await jt(u);if(d.id!==e)throw new Error("\u6388\u6743\u54CD\u5E94\u4E0E\u5F53\u524D\u64CD\u4F5C\u7684\u4F1A\u8BDD\u4E0D\u4E00\u81F4\u3002");dr(d),Xd()}catch(u){Ze(Ua(u,"\u65E0\u6CD5\u5B8C\u6210\u6388\u6743\u64CD\u4F5C\u3002"),"error")}finally{pk.delete(e),ql()}}var fk=new Set;async function SCe(e){if(!e||e!==h.selectedId||fk.has(e))return;let t=h.sessions.find(function(r){return r.id===e});if(t){if(t.provider==="codex"){Ze("Codex \u4F1A\u8BDD\u56FA\u5B9A\u4EE5 full-access PTY \u542F\u52A8\uFF0C\u4E0D\u652F\u6301\u5207\u6362\u81EA\u52A8\u6279\u51C6\u3002","info");return}fk.add(e),ql();try{let r=await an("/api/sessions/"+encodeURIComponent(e)+"/toggle-auto-approve",{method:"POST",credentials:"same-origin"}),n=await jt(r);if(n.id!==e)throw new Error("\u81EA\u52A8\u6279\u51C6\u54CD\u5E94\u4E0E\u5F53\u524D\u64CD\u4F5C\u7684\u4F1A\u8BDD\u4E0D\u4E00\u81F4\u3002");dr(n),h.selectedId===e&&Ze(n.autoApprovePermissions?"\u81EA\u52A8\u6279\u51C6\u5DF2\u5F00\u542F":"\u81EA\u52A8\u6279\u51C6\u5DF2\u5173\u95ED","info")}catch(r){Ze(Ua(r,"\u65E0\u6CD5\u5207\u6362\u81EA\u52A8\u6279\u51C6\u3002"),"error")}finally{fk.delete(e),ql()}}}function FCe(){ql()}function oK(e,t,r){return h.terminal?ow(t||h.selectedId,e,{mode:r||"append"}):!1}function fQ(){h.pollTimer&&(clearInterval(h.pollTimer),h.pollTimer=null),CSe(),yCe()}function $Ce(e,t){return e.target===t.target&&e.message===t.message}var DCe=class extends vl{constructor(){super($Ce)}},Lg=new DCe;function Nk(e){h.actionError=e,mQ()}function mQ(){ww({selector:"[data-composer-action-error-host]",store:Lg,flush:!0,build(e){let t=h.actionError;return t?{key:"action-error",target:e,message:t}:null}})}var ACe=B(_(),1),R9=B(Jt(),1),BCe=B(Ja(),1),O9=null,rc=null;function VI(e){if(rc)throw new Error("Cannot replace browser shell commands after mount");O9=e}function dC(){return rc!==null}function ICe(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}function MCe(e){let t=document.createElement("template");t.innerHTML=e;let r=[{name:"BrowserTerminalSlot",selector:"#output",key:"terminal"},{name:"BrowserChatSlot",selector:"#chat-output",key:"chat"},{name:"BrowserComposerSlot",selector:".input-panel",key:"composer"},{name:"BrowserFileExplorerSlot",selector:"#file-explorer",key:"fileExplorer"},{name:"BrowserCrossSessionQueueSlot",selector:"#cross-session-queue-host",key:"crossSessionQueue"}],n={},a=r.map(({name:o,selector:l,key:u})=>{let d=t.content.querySelector(l);if(!d)throw new Error(`${o} seed is missing ${l}`);let p=new C2e(o,{mount(m){ICe(d,m)}});return n[u]=m=>{m?p.mount(m):p.unmount()},p});return{refs:n,hosts:a}}function TCe(e,t){if(!O9)throw new Error("Browser shell commands were not configured");if(rc){if(rc.app!==e)throw new Error("React shell cannot move to a different #app root");return(0,R9.flushSync)(()=>rc?.store.publish({sync:!0,reason:"legacy:render"})),"updated"}let r=MCe(t()),n=kEe(O9,{batchMs:0});e.replaceChildren(),e.dataset.reactShell="enabled";let a=(0,BCe.createRoot)(e);rc={app:e,root:a,store:n,hosts:r.hosts};try{(0,R9.flushSync)(()=>a.render(ACe.createElement(yEe,{store:n,legacyRefs:r.refs})))}catch(o){rc=null,n.dispose();for(let l of r.hosts)l.dispose();throw delete e.dataset.reactShell,o}return"mounted"}function sK(){let e=rc;if(e){rc=null,(0,R9.flushSync)(()=>e.root.unmount()),e.store.dispose();for(let t of e.hosts)t.dispose();delete e.app.dataset.reactShell}}function Cm(e){var t=e||{};h.chatRenderCache?.reset(),h.chatRenderEpoch=(h.chatRenderEpoch||0)+1,h.chatRenderPendingToken=null,h.lastRenderedMsgCount=0,h.lastRenderedEmpty=null,h.renderPending=!1,t.preserveStickState||(h.chatRenderedCount=h.chatPageSize,h.chatRenderWindowMessageCount=0,hm(),h.askUserSelections={}),h.chatScrollElement&&(h.chatScrollHandler&&h.chatScrollElement.removeEventListener("scroll",h.chatScrollHandler),h.chatScrollWheelHandler&&h.chatScrollElement.removeEventListener("wheel",h.chatScrollWheelHandler),h.chatScrollTouchStartHandler&&h.chatScrollElement.removeEventListener("touchstart",h.chatScrollTouchStartHandler),h.chatScrollTouchMoveHandler&&h.chatScrollElement.removeEventListener("touchmove",h.chatScrollTouchMoveHandler)),h.chatScrollElement=null,h.chatScrollHandler=null,h.chatScrollWheelHandler=null,h.chatScrollTouchStartHandler=null,h.chatScrollTouchMoveHandler=null,h.chatIsProgrammaticScroll=!1,t.preserveStickState||(h.chatStickToBottom=!0,h.chatUnreadCount=0,h.chatUnreadStartIndex=-1,h.chatInitialRenderDone=!1)}function ds(){return h.workingDir||C4e()}window.addEventListener("online",function(){h.isOnline=!0,Pk()});window.addEventListener("offline",function(){h.isOnline=!1,Pk()});function Pk(){var e=document.getElementById("offline-banner");if(!h.isOnline&&!e){var t=document.createElement("div");t.id="offline-banner",t.className="offline-banner",t.style.cssText="position:fixed;top:var(--wand-safe-top);left:50%;transform:translateX(-50%);z-index:20030;width:min(440px,calc(100vw - 32px))",document.body.appendChild(t),ZEe(t)}else h.isOnline&&e&&(jI(e),e.remove())}function jCe(){if(!Ad()){var e=document.getElementById("app");e&&_I(e)}}function _Ce(){var e=document.getElementById("app");e&&_I(e,"\u754C\u9762\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u91CD\u8BD5")}function Cy(e,t){if(h.config&&!document.hidden){var r=t&&t.immediate===!0,n=Date.now();!r&&n-h.lastForegroundSyncAt<1500||(h.lastForegroundSyncAt=n,h.foregroundSyncTimer&&(clearTimeout(h.foregroundSyncTimer),h.foregroundSyncTimer=null),NCe(e,r))}}function NCe(e,t){return!h.config||document.hidden?Promise.resolve():(t||pQ(),t?WI("resume-force"):(!h.ws||h.ws.readyState!==WebSocket.OPEN&&h.ws.readyState!==WebSocket.CONNECTING)&&cC(),h.selectedId&&Ew(h.selectedId,{force:!0}),Ai({skipSelectedOutputReload:!0}).catch(function(r){console.error("[wand] foreground sync failed:",e,r)}))}function PCe(){window.__wandForegroundSyncBound||(window.__wandForegroundSyncBound=!0,document.addEventListener("visibilitychange",function(){document.hidden?qI():(Cy("visibility"),aw("visibility"))}),window.addEventListener("focus",function(){Cy("focus")}),window.addEventListener("pageshow",function(){Cy("pageshow")}),window.addEventListener("resume",function(){Cy("resume")}),window.addEventListener("wand-android-resume",function(){Cy("android-resume",{immediate:!0}),aw("android-resume")}),window.addEventListener("wand-ime-state",function(e){var t=e&&e.detail&&e.detail.state;if(t==="shown"||t==="hidden")try{ao("native-ime-"+t,{forceReplay:!0}),Wl("native-ime")}catch{}}),window.addEventListener("wand-android-network",function(e){var t=e&&e.detail&&e.detail.state;if(t==="lost"){h.isOnline=!1;try{Pk()}catch{}return}if(t==="available"||t==="changed"||t==="validated"){h.isOnline=!0;try{Pk()}catch{}WI("android-network-"+t)}}))}function RCe(){if(Ad())return;let e=HEe();fetch("/api/session-check",{credentials:"same-origin"}).then(function(t){return t.ok?t.json():{authed:!1}}).then(function(t){if(!t||!t.authed)return h.loginChecked=!0,dm(),null;let r=c1();return c2e(),r.catch(function(n){if(Ek(),z1(),n&&typeof n.status=="number"&&n.status>0)return h.loginChecked=!0,dm(),null;throw n})}).then(function(t){t&&(h.config=t,Aw(t),h.loginChecked=!0,requestAnimationFrame(function(){if(h.config===t){try{dm({skipShellChrome:!0})}catch{}cQ(),Ai({reuseSnapshot:!0,skipSelectedOutputReload:zu()}).then(function(){if(h.config!==t||!e())return;let r=$n();return ike(void 0,()=>h.config===t&&e()&&$n()===r)}),NY(),aSe(),t.updateAvailable&&t.latestVersion&&EQ(t.currentVersion||"-",t.latestVersion),wQ&&EFe(),H9&&kFe()}}))}).catch(function(){if(Ek(),h.loginChecked=!0,!navigator.onLine){var t=document.getElementById("app");t&&_I(t,"\u65E0\u6CD5\u8FDE\u63A5\u5230\u670D\u52A1\u5668","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u6216\u786E\u8BA4 Wand \u670D\u52A1\u6B63\u5728\u8FD0\u884C\u3002"),window.addEventListener("online",function(){location.reload()},{once:!0});return}dm()})}document.addEventListener("click",function(e){if(!Bo()&&!h.sidebarPinned&&!h.sidebarCollapsed&&h.sessionsDrawerOpen){var t=e.target;!t||!(t instanceof Element)||t.closest("#sessions-drawer")||t.closest("#sessions-toggle-button")||t.closest(".floating-sidebar-toggle")||t.closest(".sidebar-tile-bubble")||t.closest(".modal-backdrop, .modal-overlay, .modal-container, [role='dialog'], [role='menu'], .topbar-more-menu, .sidebar-header-overflow, .path-suggestions")||vFe()}},!0);jCe();RCe();function dm(e){if(Ad())return;let t=document.getElementById("app");t&&jI(t);var r=e&&e.skipShellChrome,n=document.getElementById("app");if(n){var a=h.config!==null,o=dC(),l=!a||!o&&!!document.getElementById("output");l&&vw(),!a&&o&&sK(),document.documentElement.classList.add("no-transition"),h.sidebarPinned&&!h.sidebarCollapsed&&!Bo()&&(h.sessionsDrawerOpen=!0,Xr("wand-sidebar-open",!0));var u,d=!1;if(a){try{u=TCe(n,zCe)}catch(p){console.error("[wand] React shell mount failed",p),sK(),document.documentElement.classList.remove("no-transition"),_Ce();return}d=u==="mounted"}else n.innerHTML=OCe(),d=!0;d&&(Cm(),h4e()),xm(),BY(),PM(qg()),ql(),mQ(),OM(),r||Bw(),document.body.offsetHeight,requestAnimationFrame(function(){a&&Ea(document.getElementById("input-box")),document.documentElement.classList.remove("no-transition")}),a&&h.selectedId&&h.gitStatusSessionId!==h.selectedId&&Ew(h.selectedId),QY()}}function OCe(){return'<div data-login-controls style="height:100%" data-checking="'+!h.loginChecked+'" data-switch-server="'+CY()+'"></div>'}function zCe(){var e=h.sessions.find(function(r){return r.id===h.selectedId}),t=At.read(h.selectedId).text;return'<div class="file-explorer" id="file-explorer"></div><div id="output" class="terminal-container'+(h.selectedId?"":" hidden")+' active"><button data-antd-control id="terminal-jump-bottom" class="terminal-jump-bottom'+(h.showTerminalJumpToBottom?" visible":"")+'" type="button" title="\u56DE\u5230\u5E95\u90E8" aria-label="\u56DE\u5230\u5E95\u90E8"><svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3.5v9M3.5 8l4.5 4.5L12.5 8"/></svg></button></div><div id="chat-output" class="chat-container hidden"><div id="chat-fold-bar" class="chat-fold-bar hidden" aria-live="polite"></div><button data-antd-control id="chat-unread-bubble" class="chat-unread-bubble" type="button" title="\u56DE\u5230\u6700\u65B0\u6D88\u606F" aria-label="\u56DE\u5230\u6700\u65B0\u6D88\u606F"><span class="chat-unread-bubble-icon"><svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3.5v9M3.5 8l4.5 4.5L12.5 8"/></svg></span><span class="chat-unread-bubble-count" aria-hidden="true"></span></button></div><div id="chat-running-host"></div><div id="cross-session-queue-host"></div><div class="input-panel'+(h.selectedId?"":" hidden")+'"><div class="input-composer-row" data-pi-composer=""><span data-pi-settings-host=""></span><div class="input-composer'+(String(t||"").trim()?" has-text":"")+(h.terminalInteractive?" is-terminal-interactive":"")+'" role="group" aria-label="\u6D88\u606F\u7F16\u8F91\u5668"><div class="composer-top-row"><div id="todo-progress" class="todo-progress hidden"></div><div id="queue-bar-host" class="queue-bar-host" hidden></div></div><div class="composer-input-divider" aria-hidden="true"></div><div class="composer-main-row"><div id="terminal-shortcuts" class="terminal-shortcuts" hidden></div><div class="composer-input-wrap"><span data-composer-avatar-host></span><span class="composer-attachments-host" data-composer-attachments-host="main"></span><div data-composer-sender><textarea id="input-box" class="input-textarea" aria-label="\u6D88\u606F\u8F93\u5165" placeholder="'+$Y(e,h.terminalInteractive)+'" rows="1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" enterkeyhint="send">'+cc(t)+'</textarea></div></div><div class="composer-actions-left" role="group" aria-label="\u6DFB\u52A0\u5185\u5BB9\u4E0E\u6743\u9650"><button id="attach-btn" data-antd-control class="composer-attach-trigger" type="button" title="\u9644\u4EF6\u4E0E\u6267\u884C\u9009\u9879\uFF08\u601D\u8003\u6DF1\u5EA6\u3001\u6A21\u578B\u548C\u6743\u9650\uFF09" aria-label="\u66F4\u591A\u64CD\u4F5C" aria-haspopup="dialog" aria-controls="composer-plus-popover" aria-expanded="false">'+d9("plus",{size:18,strokeWidth:2.2})+'</button><div class="composer-inline-config"><span class="composer-config-host" data-composer-config-host="runtime"></span></div><input type="file" id="file-upload-input" multiple tabindex="-1" style="position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0,0,0,0);pointer-events:none"><span class="composer-pi-settings-toggle-host" data-pi-settings-toggle-host=""></span><div class="composer-status-row" id="composer-status-row"><span class="composer-config-host" data-composer-config-host="mode"></span><span class="composer-badge-host" data-composer-badge-host="auto-approve"></span><span class="composer-badge-host hidden" data-composer-badge-host="permissions"></span><span class="composer-badge-host" data-composer-badge-host="approval-stats"></span><span class="composer-status-line" id="composer-status-line" role="status" aria-live="polite">'+cc(FY)+'</span></div></div><div class="composer-actions-right" role="group" aria-label="\u6A21\u578B\u4E0E\u53D1\u9001"><span class="composer-rail-host" data-pty-extra-keys-host></span><span class="composer-rail-host" data-composer-rail-host="pty"></span><button id="send-input-button" data-antd-control="primary" type="button" data-phase="idle" title="\u53D1\u9001" aria-label="\u53D1\u9001\u6D88\u606F"></button></div></div></div></div><div class="composer-plus-popover hidden" id="composer-plus-popover" data-wand-popup-owner="composer-plus-popover" role="dialog" aria-modal="false" aria-label="\u66F4\u591A\u64CD\u4F5C" aria-hidden="true"><span class="plus-popover-items-host" data-composer-popover-host="items"></span><button data-antd-control class="prompt-optimize-btn" id="prompt-optimize-btn" type="button" title="\u4F18\u5316\u63D0\u793A\u8BCD" aria-label="\u4F18\u5316\u63D0\u793A\u8BCD">'+d9("sparkle",{size:15,strokeWidth:1.9,cls:"prompt-optimize-icon"})+'<span class="prompt-optimize-label">\u4F18\u5316\u63D0\u793A\u8BCD</span></button><div class="plus-popover-sep" aria-hidden="true"></div><div class="plus-popover-trio-wrap"><p class="composer-settings-scope">\u6267\u884C\u9009\u9879 \xB7 \u5E94\u7528\u4E8E\u5F53\u524D\u4F1A\u8BDD\uFF1B\u6A21\u578B\u548C\u601D\u8003\u6DF1\u5EA6\u540C\u65F6\u8BB0\u4E3A\u6B64\u8BBE\u5907\u7684\u65B0\u4F1A\u8BDD\u504F\u597D\u3002\u5DF2\u542F\u52A8\u7684\u7EC8\u7AEF\u53C2\u6570\u4FDD\u6301\u4E0D\u53D8\u3002</p><span class="composer-config-host" data-composer-config-host="all"></span></div></div><span class="composer-action-error-host" data-composer-action-error-host="main"></span></div>'}var LCe=B(Ja(),1),JB=B(Ee(),1),lK=Promise.resolve(),Rk=null;function HCe(e){let t=lK.then(()=>new Promise((r,n)=>{x0();let a=document.createElement("div");a.dataset.wandOwnedDialogRoot="",document.body.appendChild(a);let o=document.createElement("div");a.appendChild(o);let l=Vb(),u=l??document.createElement("div");l||(u.className="wand-ui-portals",u.style.zIndex=String(od.token?.zIndexPopupBase??20010),a.appendChild(u));let d=!1,p=(0,LCe.createRoot)(o,{onUncaughtError:v=>m(void 0,v)}),m=(v,g)=>{d||(d=!0,Rk=null,queueMicrotask(()=>{p.unmount(),a.remove(),g?n(g):r(v)}))};Rk=()=>{e.dismissable!==!1&&m({dismissed:!0})},p.render((0,JB.jsx)(id,{container:u,children:(0,JB.jsx)(sa,{children:(0,JB.jsx)(xf,{open:!0,title:e.title,description:e.description,tone:e.tone,icon:e.icon,actions:e.actions,input:e.input,dismissable:e.dismissable,onAction:(v,g)=>m({dismissed:!1,action:v,inputValue:g}),onDismiss:()=>m({dismissed:!0})})})}))}));return lK=t.then(()=>{},()=>{}),t}function qCe(){return Rk?(Rk(),!0):!1}var gm=0,z9=null,Qy=!1;function hQ(){let e=window.__wandReactUi;return!e||typeof e.dialog!="function"||typeof e.toast!="function"?null:e}function WCe(e){switch(e){case"warning":case"danger":case"success":case"question":return e;case"error":return"danger";default:return"info"}}function VCe(e){switch(e){case"success":case"warning":case"error":return e;case"danger":return"error";default:return"info"}}function uK(e){switch(e){case"primary":case"outline":case"ghost":case"danger":return e;default:return"secondary"}}function UCe(e){return Array.isArray(e.buttons)&&e.buttons.length>0?e.buttons:[{label:"\u597D",value:!0,kind:"primary",autofocus:!0}]}function GCe(e){return e.cancelValue!==void 0?e.cancelValue:e.input?null:!1}function KCe(){if(typeof document>"u")return null;let e=document.activeElement;return e&&typeof e.focus=="function"?e:null}function XCe(){Qy||(Qy=!0,(typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):e=>setTimeout(()=>e(Date.now()),0))(()=>{if(Qy=!1,gm>0)return;let e=z9;if(z9=null,!(!e||!e.isConnected||typeof document>"u"||!document.contains(e)))try{e.focus()}catch{}}))}function QCe(){gm=Math.max(0,gm-1),gm===0&&XCe()}function YCe(e){let t=hQ();return t?gQ(e,t):null}function cK(e){return gQ(e,{dialog:HCe})}function gQ(e,t){let r=gm===0&&!Qy?KCe():null,n=UCe(e),a=WCe(e.type),o=!!e.input,l={title:e.title?String(e.title):a==="danger"?"\u786E\u8BA4\u64CD\u4F5C":"\u63D0\u793A",description:e.message?String(e.message):void 0,tone:a,icon:e.icon==null?void 0:String(e.icon),actions:n.map(d=>({label:d.label==null?"":String(d.label),value:{button:d},kind:uK(d.kind),autoFocus:d.autofocus===!0||d.autoFocus===!0})),input:o?{value:e.inputValue==null?"":String(e.inputValue),placeholder:e.inputPlaceholder==null?void 0:String(e.inputPlaceholder),label:e.inputLabel==null?e.title==null?"\u8F93\u5165\u5185\u5BB9":String(e.title):String(e.inputLabel)}:void 0,dismissable:e.dismissable!==!1},u;try{u=Promise.resolve(t.dialog(l))}catch{return Ps.cancelDialogRequest(l),null}return gm===0&&!Qy&&(z9=r),gm+=1,u.then(d=>{if(d.dismissed===!0)return GCe(e);let p=d.action.button;return o&&uK(p.kind)==="primary"?d.inputValue??"":p.value}).catch(d=>{throw Ps.cancelDialogRequest(l),d}).finally(QCe)}function JCe(e,t,r){let n=hQ();if(!n)return!1;let a={tone:VCe(t),duration:r};try{return n.toast(e,a),!0}catch{return!1}}function Yy(e,t){if(e){e.textContent=t,e.classList.remove("hidden");for(var r=e.previousElementSibling;r;){if(r.tagName==="INPUT"){r.setAttribute("data-error","true");break}r=r.previousElementSibling}}}function vQ(e){if(e){e.textContent="",e.classList.add("hidden");for(var t=e.previousElementSibling;t;){if(t.tagName==="INPUT"){t.setAttribute("data-error","false");break}t=t.previousElementSibling}}}function Ze(e,t){var r=t==="error"||t==="danger",n=r?4e3:2200;JCe(e,t,n)||L9({title:e,type:r?"warning":t==="success"?"success":"info",duration:n})}function Sm(e){e=e||{};var t=YCe(e);return t?t.catch(function(){return cK(e)}):cK(e)}function ZCe(e,t){return t=t||{},Sm({title:t.title||"\u63D0\u793A",message:typeof e=="string"?e:String(e??""),type:t.type||"info",dismissable:t.dismissable,buttons:[{label:t.okLabel||"\u597D",value:void 0,kind:"primary",autofocus:!0}]})}function UI(e,t){t=t||{};var r=!!t.danger||t.type==="danger";return Sm({title:t.title||(r?"\u786E\u8BA4\u64CD\u4F5C":"\u8BF7\u786E\u8BA4"),message:typeof e=="string"?e:String(e??""),type:t.type||(r?"danger":"question"),cancelValue:!1,dismissable:t.dismissable,buttons:[{label:t.cancelLabel||"\u53D6\u6D88",value:!1,kind:"secondary"},{label:t.okLabel||(r?"\u5220\u9664":"\u786E\u5B9A"),value:!0,kind:r?"danger":"primary",autofocus:!r}]}).then(function(n){return n===!0})}function eSe(e,t,r){return r=r||{},Sm({title:r.title||"\u8BF7\u8F93\u5165",message:typeof e=="string"?e:String(e??""),type:r.type||"question",input:!0,inputValue:t==null?"":String(t),inputPlaceholder:r.placeholder||"",cancelValue:null,dismissable:r.dismissable,buttons:[{label:r.cancelLabel||"\u53D6\u6D88",value:null,kind:"secondary"},{label:r.okLabel||"\u786E\u5B9A",value:void 0,kind:"primary"}]}).then(function(n){return n==null?null:String(n)})}window.wandAlert=ZCe;window.wandConfirm=UI;window.wandPrompt=eSe;window.openWandDialog=Sm;window.showToast=Ze;var oc=[],bQ=0,tSe=6,rSe=16;function L9(e){if((e.actionLabel||e.playSound)&&CQ(),!h.notifBubble)return{dismiss:function(){}};var t=++bQ,r=e.type||"info",n=e.duration!==void 0?e.duration:8e3,a=document.createElement("div");a.className="notification-bubble",a.setAttribute("data-nid",String(t)),document.body.appendChild(a),eke(a,e);var o={id:t,el:a};oc.push(o),GI();var l=a.querySelector(".notification-bubble-close");if(l&&(l.onclick=function(){Ny(t)}),e.actionLabel&&e.action){var u=a.querySelector(".notification-bubble-actions button");u&&(u.onclick=function(){e.action(),Ny(t)})}return n>0&&setTimeout(function(){Ny(t)},n),{dismiss:function(){Ny(t)}}}function Ny(e){for(var t=-1,r=0;r<oc.length;r++)if(oc[r].id===e){t=r;break}if(t!==-1){var n=oc[t];n.el.classList.add("slide-out"),oc.splice(t,1),GI(),setTimeout(function(){jI(n.el),n.el.parentNode&&n.el.parentNode.removeChild(n.el)},300)}}function GI(){for(var e=rSe,t=0;t<oc.length;t++)oc[t].el.style.top=e+"px",e+=oc[t].el.offsetHeight+tSe}try{dK=navigator.userAgent.match(/WandPlatform\/macOS/),ZB=window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.wandNative||null,dK&&ZB&&typeof window.WandNative>"u"&&(window.WandNative={downloadUpdate:function(e,t,r){try{ZB.postMessage({type:"downloadUpdate",url:String(e||""),fileName:String(t||"wand-update.dmg"),source:String(r||"local")})}catch{}}})}catch{}var dK,ZB,Fm=typeof WandNative<"u"&&typeof WandNative.sendNotification=="function",lw=navigator.userAgent.match(/WandApp\/([^\s]+)/),yQ=/WandPlatform\/macOS/.test(navigator.userAgent),nSe=!!lw&&!yQ,wQ=lw&&nSe?lw[1]:null,H9=lw&&yQ?lw[1]:null;function q9(){if(Fm){var e=h.sessions.some(function(t){return!t.archived&&(t.status==="running"||t.status==="thinking"||t.status==="initializing")});if(typeof WandNative.setKeepScreenOn=="function")try{WandNative.setKeepScreenOn(e)}catch{}if(e){if(typeof WandNative.startKeepAlive=="function")try{WandNative.startKeepAlive()}catch{}}else if(typeof WandNative.stopKeepAlive=="function")try{WandNative.stopKeepAlive()}catch{}}}function xQ(){if(Fm&&typeof WandNative.getPermission=="function")try{return WandNative.getPermission()}catch{}return null}function aSe(){if(Fm){var e=xQ();if(e==="default"||e==="denied")try{WandNative.requestPermission()}catch{}return}typeof Notification<"u"&&Notification.permission==="default"&&Notification.requestPermission()}function iSe(e){var t=e||{};return!(t.onlyWhenHidden&&!document.hidden||t.skipWhenSelectedSessionId&&t.skipWhenSelectedSessionId===h.selectedId&&!document.hidden)}function oSe(e,t){if(!e||!t||t<=0)return!1;var r=h.notificationHistory[e]||0,n=Date.now();return n-r<t?!0:(h.notificationHistory[e]=n,!1)}function pC(e,t,r){var n=r||{},a=n.tag||"";if(iSe(n)&&!oSe(a,n.minIntervalMs||0)){if(Fm){var o=xQ();if(o!=="granted")return;try{var l=a;n.kind&&(l=n.kind+(a?":"+a:"")),WandNative.sendNotification(e||"Wand",t||"",l||"")}catch{}return}if(!(typeof Notification>"u"||Notification.permission!=="granted")&&document.hidden)try{var u=new Notification(e,{body:t||"",icon:n.icon||K7,tag:a||void 0});u.onclick=function(){window.focus(),u.close(),n.onClick&&n.onClick()},setTimeout(function(){u.close()},1e4)}catch{}}}function sSe(e,t){if(!(!t||!t.title)){var r=h.sessions.find(function(a){return a.id===e});if(r){var n=r.summary||r.command||e;pC("\u4EFB\u52A1\u8FDB\u884C\u4E2D",n+`
286
- `+t.title,{kind:"task",tag:"wand-task-"+e+"-"+t.title,minIntervalMs:9e4,onlyWhenHidden:!0,skipWhenSelectedSessionId:e,onClick:function(){e!==h.selectedId&&Ln(e)}})}}}function EQ(e,t){!h.config||h.config.canManageSettings===!1||(fSe(e||"-",t||"-"),pC("Wand \u53D1\u73B0\u65B0\u7248\u672C","\u5F53\u524D "+(e||"-")+" \u2192 \u6700\u65B0 "+(t||"-"),{kind:"update",tag:"wand-update",minIntervalMs:3e5}))}function lSe(e,t){pC("\u9700\u8981\u4F60\u7684\u6388\u6743",t,{kind:"permission",tag:"wand-perm-"+e,minIntervalMs:6e4,onlyWhenHidden:!0,skipWhenSelectedSessionId:e,onClick:function(){e!==h.selectedId&&Ln(e)}})}function uSe(e,t,r){pC(t,r,{kind:"task-ended",tag:"wand-ended-"+e,minIntervalMs:1e4,onClick:function(){e!==h.selectedId&&Ln(e)}})}var pm={},cSe=30;function pK(e){if(!e)return"";var t=String(e).replace(/^#+\s+/gm,"").replace(/\*\*/g,"").replace(/`/g,"").trim(),r=t.split(`
287
- `)[0].trim();return r.length>100&&(r=r.slice(0,100)+"\u2026"),r}function W9(e){!Fm||typeof WandNative.updateSessionProgress!="function"||e&&(pm[e]&&clearTimeout(pm[e]),pm[e]=setTimeout(function(){delete pm[e],dSe(e)},cSe))}function dSe(e){var t=h.sessions.find(function(D){return D.id===e});if(t){var r=t.summary||t.command||e,n=t.status||"running";if(n==="idle"||n==="archived"||n==="exited"){kQ(e);return}for(var a=null,o="",l="",u=[],d=t.messages||[],p=d.length-1;p>=0;p--){var m=d[p];if(!(!m.content||!Array.isArray(m.content))){if(!l&&m.role==="assistant")for(var v=m.content.length-1;v>=0;v--){var g=m.content[v];if(g&&g.type==="text"&&g.text&&g.text.trim()){l=pK(g.text);break}}if(m.role==="user"){var b=m.content.some(function(D){return D&&D.__queued});if(!b)for(var x=0;x<m.content.length;x++){var y=m.content[x];if(y&&y.type==="text"&&y.text&&y.text.trim()){var E=pK(y.text);o||(o=E),u.length<4&&u.push(E);break}}}if(!a)for(var S=m.content.length-1;S>=0;S--){var F=m.content[S];if(F&&F.type==="tool_use"&&F.name==="TodoWrite"&&F.input&&F.input.todos){a=F.input.todos;break}}if(a&&u.length>=4&&l)break}}u.reverse();var $="";e===h.selectedId&&h.currentTask&&h.currentTask.title&&($=h.currentTask.title);var C={sessionLabel:r,status:n,currentTask:$,latestUserText:o,latestAssistantText:l,todos:a||[],recentUserTexts:u};try{WandNative.updateSessionProgress(e,JSON.stringify(C))}catch{}}}function kQ(e){if(!(!Fm||typeof WandNative.clearSessionProgress!="function")){pm[e]&&(clearTimeout(pm[e]),delete pm[e]);try{WandNative.clearSessionProgress(e)}catch{}}}window.handleNativeBack=function(){if(Xl.isOpen()||qCe())return!0;var e=window.__wandReactUi;if(e&&typeof e.closeTopmost=="function")try{if(e.closeTopmost())return!0}catch{}var t=window.__wandReactFilePreview;if(t&&typeof t.closeTopmost=="function")try{if(t.closeTopmost())return!0}catch{}if(Dd.closeIfOpen()||zl.closeIfOpen())return!0;var r=window.__wandReactQuickCommit;if(r&&typeof r.closeTopmost=="function")try{if(r.closeTopmost())return!0}catch{}var n=window.__wandReactNewSession;if(n&&typeof n.closeTopmost=="function")try{if(n.closeTopmost())return!0}catch{}var a=window.__wandReactFolderPicker;if(a&&typeof a.closeTopmost=="function")try{if(a.closeTopmost())return!0}catch{}var o=window.__wandReactWorktreeMerge;if(o&&typeof o.closeTopmost=="function")try{if(o.closeTopmost())return!0}catch{}var l=window.__wandReactSettings;if(l&&typeof l.closeTopmost=="function")try{if(l.closeTopmost())return!0}catch{}return h.filePanelOpen&&CK()?(Wg(!1),!0):h.sessionsDrawerOpen&&Bo()?(Xg(),!0):CK()&&h.selectedId?(h.selectedId=null,op(),h.sessionsDrawerOpen=!0,Xr("wand-sidebar-open",!0),dm(),!0):!1};function CQ(){h.notifSound&&pSe()}function pSe(){try{let a=function(o,l,u){var d=r.createOscillator(),p=r.createGain();d.type="sine",d.frequency.value=o,p.gain.setValueAtTime(0,r.currentTime+l),p.gain.linearRampToValueAtTime(.5*n,r.currentTime+l+.04),p.gain.exponentialRampToValueAtTime(.001,r.currentTime+l+u),d.connect(p),p.connect(r.destination),d.start(r.currentTime+l),d.stop(r.currentTime+l+u)};var e=a,t=window.AudioContext||window.webkitAudioContext;if(!t)return!1;var r=new t;r.state==="suspended"&&r.resume();var n=(h.notifVolume||0)/100;return a(523,0,.25),a(659,.12,.3),setTimeout(function(){r.close()},600),!0}catch{return!1}}function fSe(e,t){if(h._updateBubbleShown)return;h._updateBubbleShown=!0,CQ();var r=++bQ,n=document.createElement("div");n.className="notification-bubble update-card",n.setAttribute("data-nid",String(r)),document.body.appendChild(n),tke(n,e,t);var a={id:r,el:n};oc.push(a),GI();var o=n.querySelector(".update-card-close");o&&(o.onclick=function(){Ny(r),h._updateBubbleShown=!1});var l=n.querySelector("#update-bubble-action"),u=n.querySelector(".update-card-action-label"),d=n.querySelector("#update-card-subtitle"),p=n.querySelector("#update-card-status"),m=n.querySelector("#update-card-progress");function v(y,E){if(p){if(p.textContent=y||"",p.classList.remove("hidden","error","success"),!y){p.classList.add("hidden");return}E&&p.classList.add(E)}}function g(y){d&&(d.textContent=y||"")}function b(y){m&&m.classList.toggle("active",!!y)}function x(y){b(!1),n.classList.remove("is-busy","is-success"),g("\u66F4\u65B0\u672A\u5B8C\u6210"),v(y,"error"),l.disabled=!1,u&&(u.textContent="\u91CD\u8BD5")}l&&(l.onclick=function(){l.disabled=!0,n.classList.add("is-busy"),u&&(u.textContent="\u66F4\u65B0\u4E2D\u2026"),g("\u6B63\u5728\u4E0B\u8F7D\u5E76\u5B89\u88C5\u65B0\u7248\u672C\u2026"),b(!0),v(""),fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then(function(y){return jt(y)}).then(function(y){if(n.classList.add("is-success"),g((y.message||"\u66F4\u65B0\u5B8C\u6210")+"\uFF0C\u6B63\u5728\u91CD\u542F\u670D\u52A1\u2026"),v(""),u&&(u.textContent="\u6B63\u5728\u91CD\u542F\u2026"),y.detachedUpdate){uw(y.previousInstanceId||null,y.version||null);return}if(y.restartRequired===!1){b(!1),n.classList.remove("is-busy"),l.disabled=!1,u&&(u.textContent="\u5DF2\u5B8C\u6210");return}mSe(x)}).catch(function(y){Nu("update_failed",y),x(y instanceof Ra?Ua(y,"\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"):"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u540E\u91CD\u8BD5")})})}function mSe(e){fetch("/api/restart",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then(function(t){return jt(t)}).then(function(){uw()}).catch(function(t){if(t instanceof Ra&&t.status>0){e(Ua(t,"\u91CD\u542F\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"));return}uw()})}function uw(e,t){tEe(e,t)}function hSe(e,t,r){rEe(e,t,r)}var gSe={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),setInterval:(e,t)=>globalThis.setInterval(e,t),clearInterval:e=>globalThis.clearInterval(e)};function vSe(e){let t=e.timers??gSe,r=null,n=null;function a(){r!==null||!e.selectedSessionId()||(r=t.setTimeout(()=>{r=null;let u=e.selectedSessionId();u&&e.refresh(u)},e.coalesceMs))}function o(){n===null&&(n=t.setInterval(()=>{if(e.hidden())return;let u=e.selectedSessionId();u&&e.refresh(u)},e.pollMs))}function l(){r!==null&&(t.clearTimeout(r),r=null),n!==null&&(t.clearInterval(n),n=null)}return{schedule:a,startPolling:o,stop:l}}var e9=0;function KI(){return e9=Math.max(Date.now(),e9+1),e9}function bSe(){let e=new Map;return{accept(t,r,n){if(!t||!r)return!1;let a=e.get(t);return a&&n<a.requestedAt?!1:(e.set(t,{status:r,requestedAt:n}),!0)},peek(t){return t?e.get(t)?.status??null:null},forget(t){e.delete(t)}}}var mk=null,XE=null,QE=null,hk=null;function ySe(e){let t=[];for(let r of e)r.type!=="file"||typeof r.path!="string"||!r.path.trim()||t.push({path:r.path,...typeof r.name=="string"&&r.name?{name:r.name}:{},type:"file"});return t}function wSe(){return Di()}function XI(e){XE?.(),mk=e,XE=OB({confirmDiscard:e.confirmDiscard,async copyText(r){if(!await e.copyText(r))throw new Error("\u590D\u5236\u5931\u8D25\u3002")},appendToComposer:e.appendToComposer,notify:e.notify,onSaved:e.onSaved});let t=!1;return()=>{t||mk!==e||(t=!0,hk=null,Vs.closeIfOpen(),XE?.(),XE=null,mk=null)}}function xSe(e){let t=mk,r=typeof e=="string"?e.trim():"";return!t||!r||Xl.isOpen()||!wSe()?!1:(Vs.open({path:r,siblings:ySe(t.getSiblings(r))}),!0)}function $m(e){if(!Vs.isOpen())return!0;let t=rm.getSnapshot();return t.saving?!1:t.dirty?(hk=e,QE||(QE=Vs.execute({type:"close"}),QE.then(r=>{let n=hk;if(hk=null,QE=null,!(!r||!n))try{n()}catch(a){console.warn("[wand] Failed to continue overlay open intent",a)}})),!1):(Vs.closeIfOpen(),!Vs.isOpen())}function ESe(){Ka("topbar:git")}var QI=vSe({coalesceMs:1200,pollMs:2e4,selectedSessionId:function(){return h.selectedId},hidden:function(){return document.hidden},refresh:function(e){Ew(e,{force:!0})}}),YI=bSe(),Sy=new Map;function JI(e,t,r){h.gitStatus=t||null,h.gitStatusSessionId=t?e:null,r&&(h.gitStatusLastFetchAt=Date.now()),ESe()}function SQ(e,t,r){YI.accept(e,t,r??KI())&&e===h.selectedId&&JI(e,t,!0)}function FQ(e){JI(e,e?YI.peek(e):null,!1)}function $Q(){QI.schedule()}function kSe(){QI.startPolling()}function CSe(){QI.stop()}function Ew(e,t){if(!e)return Promise.resolve(null);var r=t&&t.force,n=Date.now();if(!r&&h.gitStatusSessionId===e&&h.gitStatus&&n-h.gitStatusLastFetchAt<1e3)return Promise.resolve(h.gitStatus);if(!r&&Sy.has(e))return Sy.get(e);var a=KI(),o=fetch("/api/sessions/"+encodeURIComponent(e)+"/git-status",{credentials:"same-origin"}).then(function(l){if(!l.ok)throw new Error("git-status "+l.status);return l.json()}).then(function(l){return SQ(e,l||{isGit:!1},a),l}).catch(function(){var l=YI.peek(e);return e===h.selectedId&&JI(e,l,!1),null}).finally(function(){Sy.get(e)===o&&Sy.delete(e)});return Sy.set(e,o),o}V$({onOpen:function(){Di(["quickCommit"])},onClose:function(){},onArchived:function(){Yl()},nextStatusRequestTime:KI,onStatusLoaded:function(e,t,r){SQ(e,t,r)},toast:function(e,t){Ze(e,t)}});function ZI(){if(h.selectedId){var e=h.selectedId,t=function(){Di(["quickCommit"])&&bd.open({sessionId:e})};$m(t)&&t()}}var SSe=B(Ja(),1),fK=B(Ee(),1),_g=new Map;function FSe(e){if(!e)return"";let t=e.structuredState,r=f1(e);return JSON.stringify([e.id??"",e.archived===!0,r.stage,r.label,r.action,r.toolId,t?.activeRequestId??"",e.status??"",e.ptyRunning?"1":"0",e.permissionBlocked?"1":"0",e.pendingEscalation?"1":"0",t?.inFlight?"1":"0",t?.phase??"",t?.turnStartedAt??"",t?.lastActivityAt??"",e.turnStartedAt??"",e.lastActivityAt??"",e.queuedMessages?.length??0])}function $Se(){for(let[e,t]of _g)e.isConnected||(t.root.unmount(),_g.delete(e))}function DSe(e,t){$Se();let r=FSe(t),n=_g.get(e);n&&n.lastKey===r||(n?n.lastKey=r:(n={root:(0,SSe.createRoot)(e),lastKey:r},_g.set(e,n)),n.root.render((0,fK.jsx)(sa,{children:(0,fK.jsx)(m1,{activity:t??null})})))}function ASe(e){let t=_g.get(e);t&&(t.root.unmount(),_g.delete(e)),e.replaceChildren()}var BSe=B(Ja(),1),ISe=B(Jt(),1),mK=B(Ee(),1),YE=new Map;function MSe(e,t,r,n=""){for(let[l,u]of YE)l.isConnected||(u.root.unmount(),YE.delete(l));let a=YE.get(e);if(a&&a.disabled===t&&a.onKey===r&&a.owner===n)return;let o=a?.root??(0,BSe.createRoot)(e);YE.set(e,{root:o,disabled:t,onKey:r,owner:n}),(0,ISe.flushSync)(()=>o.render((0,mK.jsx)(sa,{children:(0,mK.jsx)(WX,{disabled:t,onKey:r,owner:n})})))}var TSe="\x1B[200~",jSe="\x1B[201~";function DQ(e,t=!0){if(!e)return"";let r=e.replace(/\r?\n/g,"\r");if(!t)return r;let n=r.replace(/\u001b/g,"\u241B");return`${TSe}${n}${jSe}`}function _Se(e){return e?/^[a-zA-Z0-9_./:@%+,=-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`:""}function NSe(e,t=!0){return DQ(_Se(e),t)}function PSe(e){let t=String(e||"").trim().toLowerCase();return t==="claude"||t==="pi"}var RSe=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/i;function AQ(e){return e?cw(e.mimeType)||RSe.test(e.savedPath||e.originalName||""):!1}function BQ(e,t={}){let r=t.bracketedPaste!==!1,n=PSe(t.provider),a=[];for(let o of e||[]){let l=typeof o?.savedPath=="string"?o.savedPath:"";if(!l)continue;let u=AQ(o);a.push({data:NSe(l,r),shortcutKey:"paste",...u?{image:!0}:{}}),(!u||n)&&a.push({data:" "})}return a}function cw(e){return typeof e=="string"&&e.toLowerCase().startsWith("image/")}function OSe(e){switch(String(e||"").toLowerCase()){case"image/jpeg":case"image/jpg":return".jpg";case"image/gif":return".gif";case"image/webp":return".webp";case"image/bmp":return".bmp";case"image/svg+xml":return".svg";default:return".png"}}function zSe(e){if(!e.active()){Uy.clear();return}let t=[];document.querySelectorAll("[data-composer-rail-host]").forEach((r,n)=>{r.isConnected&&t.push({key:r.dataset.composerRailHost||`composer-rail-${n}`,target:r,onSubmit(){e.submit(),e.focusInput()}})}),Uy.sync(t)}function LSe(e,t){return e.target===t.target&&e.interactiveVisible===t.interactiveVisible&&e.interactiveOn===t.interactiveOn}var HSe=class extends vl{constructor(){super(LSe)}},Hg=new HSe,qSe="[data-composer-popover-host]";function WSe(e){ww({selector:qSe,store:Hg,flush:!0,build(t){return{key:"composer-popover-items",target:t,...e.resolve(),onAttach:e.onAttach,onToggleInteractive:e.onToggleInteractive}}})}function VSe(e,t){if(!e||!t)return null;for(var r=t;r&&r.parentNode&&r.parentNode!==e;)r=r.parentNode;return!r||r.parentNode!==e?null:r}function USe(e,t){if(!e)return null;for(var r=0;r<t.length;r++){var n=VSe(e,t[r]);if(n)return n}return null}var rp=null,t9=!1,Ok=new Map,zk=new Map;function IQ(){rp||t9||(t9=!0,globalThis.__wandImportBrowserModule("843c2750657d433e").then(e=>{rp=e,Ok.forEach(t=>e.paintQueueBar(...t)),zk.forEach(t=>e.paintCrossSessionQueue(...t)),Ok.clear(),zk.clear()}).catch(()=>{t9=!1}))}function GSe(...e){if(IQ(),rp){rp.paintQueueBar(...e);return}Ok.set(e[0],e)}function KSe(...e){if(IQ(),rp){rp.paintCrossSessionQueue(...e);return}zk.set(e[0],e)}function V9(e){Ok.delete(e),zk.delete(e),rp?rp.clearQueueView(e):e.replaceChildren()}function Ea(e){if(e){e.style.minHeight="";var t=window.getComputedStyle(e),r=parseFloat(t.minHeight||""),n=Number.isFinite(r)?r:40,a=parseFloat(t.maxHeight||""),o=Number.isFinite(a)?Math.max(n,a):120,l=dc(),u=e.classList.contains("is-terminal-passthrough")&&e.closest(".input-composer")?.dataset.composerExpanded!=="true";if(u||!e.value||e.value.trim()===""){e.style.height=n+"px",e.style.minHeight=n+"px",e.style.overflowY=l?"auto":"hidden",e.scrollTop=0,e.classList.remove("has-multiline-draft","has-clipped-draft"),e.closest(".input-composer")?.classList.remove("is-expanded"),km(e);return}var d=e.scrollTop,p=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;e.style.overflowY="hidden",e.style.height=n+"px";var m=e.scrollHeight,v=Math.max(n,Math.min(m,o)),g=m>o,b=m>n+1;if(e.style.height=v+"px",e.style.minHeight=n+"px",e.style.overflowY=g||l?"auto":"hidden",e.classList.toggle("has-multiline-draft",b),e.classList.toggle("has-clipped-draft",g),e.closest(".input-composer")?.classList.toggle("is-expanded",b),g)if(p)Vk(e);else{var x=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTop=Math.min(d,x)}else e.scrollTop=0;km(e)}}var Py=!1;function MQ(e){return!e||e.archived?!1:hr(e)?!!(e.structuredState&&e.structuredState.inFlight):e.status==="running"}function TQ(){return h.sessions.some(MQ)}function XSe(){var e=h.sessions.filter(MQ);if(e.length===0)return null;if(h.selectedId){var t=e.find(function(r){return r.id===h.selectedId});if(t)return t}return e.sort(function(r,n){return(Date.parse(n.startedAt)||0)-(Date.parse(r.startedAt)||0)}),e[0]}function jQ(e){if(!e)return"";for(var t=Array.isArray(e.queuedMessages)?e.queuedMessages:[],r=t.length-1;r>=0;r--){var n=typeof t[r]=="string"?t[r].trim():"";if(n)return n}for(var a=Array.isArray(e.messages)?e.messages:[],o=a.length-1;o>=0;o--){var l=a[o];if(!(!l||l.role!=="user"||!Array.isArray(l.content))){var u=l.content.filter(function(m){return m&&m.type==="text"&&typeof m.text=="string"}).map(function(m){return m.text});if(u.length)return u.join(`
288
- `).trim();for(var d=0;d<l.content.length;d++){var p=l.content[d];if(p&&p.type==="tool_result"&&typeof p.content=="string")return p.content.trim()}return""}}return""}function _Q(e,t,r,n){var a=h.sessions.find(function(l){return l.id===e}),o=a&&Array.isArray(a.queuedMessages)?a.queuedMessages:[];return pi.rollback(e,o,[],n,{text:t,index:r})}function QSe(e,t){var r=typeof t=="string"?t.trim():"";if(r&&jQ(e)===r)return Ze("\u4E0E\u4E0A\u4E00\u6761\u6D88\u606F\u76F8\u540C\uFF0C\u5DF2\u5FFD\u7565\uFF0C\u4E0D\u4F1A\u52A0\u5165\u6392\u961F\u3002","warning"),Promise.resolve();var n=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),a=Array.isArray(e.queuedMessages)?e.queuedMessages.slice():[],o=a.slice();o.push(t);var l=pi.advance(e.id,"local");dr({id:e.id,queuedMessages:o}),e.id===h.selectedId&&kn();var u=e.title||jX(e.command)||"\u5F53\u524D\u4F1A\u8BDD";return Ze("\u5DF2\u52A0\u5165\u300C"+u+"\u300D\u7684\u5F85\u53D1\u9001\u961F\u5217\uFF08\u4FDD\u7559\u4E0A\u4E0B\u6587\uFF09\u3002","info"),an("/api/structured-sessions/"+e.id+"/messages",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:t,idempotencyKey:n})}).then(function(d){return d.ok?d.json():d.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(p){throw new Error(p&&p.error||"\u65E0\u6CD5\u6392\u961F\u6D88\u606F\u3002")})}).then(function(d){d&&d.id&&(d=pi.filter(d,e.id,l),dr(d),d.id===h.selectedId&&kn())}).catch(function(d){var p=_Q(e.id,t,a.length,l);p&&dr({id:e.id,queuedMessages:p}),e.id===h.selectedId&&kn(),Ze(d&&d.message||"\u6392\u961F\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002","error")})}function YSe(e){var t=XSe();if(t&&hr(t)){QSe(t,e);return}if(h.crossSessionQueue.length>=10){Ze("\u6392\u961F\u6D88\u606F\u5DF2\u6EE1\uFF08\u6700\u591A 10 \u6761\uFF09\uFF0C\u8BF7\u7B49\u5F85\u5F53\u524D\u4F1A\u8BDD\u5B8C\u6210\u3002","warning");return}var r="csq-"+Date.now()+"-"+Math.random().toString(36).slice(2,8);h.crossSessionQueue.push({id:r,text:e,cwd:ds(),mode:h.chatMode||"managed",tool:ap(),queuedAt:Date.now()}),pc(),Vl()}function JSe(e){if(Py){h.crossSessionQueue.unshift(e),l9(!!h.pageUnloading)&&pc(),Vl();return}Py=!0,an("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Jl({kind:"pty",command:e.tool,cwd:e.cwd,mode:e.mode,initialInput:e.text}))}).then(function(t){return jt(t)}).then(function(t){return Py=!1,Cw(t)}).catch(function(t){Py=!1,Ze(t&&t.message||"\u65E0\u6CD5\u542F\u52A8\u6392\u961F\u4F1A\u8BDD\u3002","error"),h.crossSessionQueue.unshift(e),l9(!!h.pageUnloading)&&pc(),Vl()})}function ZSe(e){var t=h.crossSessionQueue.findIndex(function(n){return n.id===e});if(!(t<0)){var r=h.crossSessionQueue.splice(t,1)[0];pc(),Vl(),an("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Jl({kind:"pty",command:r.tool,cwd:r.cwd,mode:r.mode,initialInput:r.text}))}).then(function(n){return jt(n)}).then(function(n){return Cw(n)}).catch(function(n){Ze(n&&n.message||"\u65E0\u6CD5\u542F\u52A8\u6392\u961F\u4F1A\u8BDD\u3002","error"),h.crossSessionQueue.splice(t,0,r),l9(!!h.pageUnloading)&&pc(),Vl()})}}function e8e(e){var t=h.crossSessionQueue.findIndex(function(r){return r.id===e});t<0||(h.crossSessionQueue.splice(t,1),pc(),Vl())}function fC(){if(h.config&&h.crossSessionQueue.length!==0&&!TQ()&&!Py){var e=h.crossSessionQueue.shift();pc(),JSe(e),Vl()}}function NQ(e){var t=Math.floor((Date.now()-e)/1e3);if(t<60)return t+"s";var r=Math.floor(t/60);return r<60?r+"m":Math.floor(r/60)+"h"}function Vl(){try{t8e()}catch(e){console.error("[wand] cross-session queue render failed:",e)}finally{a8e()}}function t8e(){var e=document.querySelector(".cross-session-queue"),t=document.querySelector(".input-panel"),r=document.querySelector(".structured-status-bar"),n=document.querySelector(".input-composer"),a=document.getElementById("cross-session-queue-host");if(h.crossSessionQueue.length===0){e&&(V9(e),e.remove()),pc();return}var o=t&&!t.classList.contains("hidden"),l=o?t:a;if(l){var u=o?USe(l,[r,n]):null;e&&e.parentNode!==l&&(V9(e),e.remove(),e=null),e?o&&u&&e.nextSibling!==u&&l.insertBefore(e,u):(e=document.createElement("div"),e.className="cross-session-queue",u?l.insertBefore(e,u):l.appendChild(e)),KSe(e,h.crossSessionQueue.map(d=>({id:d.id,text:d.text,age:NQ(d.queuedAt)})))}}var r8e=5e3,Jy=null;function n8e(){if(h.crossSessionQueue.length===0){eM();return}var e=document.querySelectorAll(".queue-item-age");h.crossSessionQueue.forEach(function(t,r){e[r]&&(e[r].textContent=NQ(t.queuedAt))}),fC()}function eM(){Jy!==null&&(clearInterval(Jy),Jy=null)}function a8e(){if(h.crossSessionQueue.length===0){eM();return}Jy===null&&(Jy=setInterval(n8e,r8e))}document.addEventListener("click",function(e){var t=e.target;if(t.closest("#queue-clear-all")){e.preventDefault(),h.crossSessionQueue=[],pc(),Vl();return}var r=t.closest(".queue-item-send-now");if(r){e.preventDefault(),ZSe(r.dataset.queueId);return}var n=t.closest(".queue-item-cancel");if(n){e.preventDefault(),e8e(n.dataset.queueId);return}});function i8e(e){e=e||{};var t=document.getElementById("input-box"),r=t?t.value:"",n=r.trim();if(h.selectedId){MC(r,h.selectedId)&&Dm(e);return}if(n&&TQ()){t&&(t.value=""),km(t),YSe(n);return}var a=h.chatMode||"managed",o=ds(),l=ap();an("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Jl({kind:"pty",command:l,provider:l,cwd:o,mode:a,initialInput:n||void 0}))}).then(function(u){return jt(u)}).then(function(u){return Am(u.id),!h.selectedId&&t&&(t.value=""),Cw(u)}).catch(function(u){Ze(Ua(u,l==="codex"?"\u65E0\u6CD5\u542F\u52A8 Codex \u4F1A\u8BDD\u3002":"\u65E0\u6CD5\u542F\u52A8 Claude \u4F1A\u8BDD\u3002"),"error")})}var U9=0;function tM(e){var t=U9,r=document.activeElement;return function(){return h.selectedId===e&&U9===t&&(document.activeElement===r||document.activeElement===document.body)}}function o8e(e,t){U9++;var r=h.sessions.find(function(a){return a.id===e}),n=hr(r);n?h.currentView="chat":h.currentView="terminal",n||h.terminal||Js(),OM(),hC(),mc(e),t?.focusInput!==!1&&h.terminalInteractive?dc()||oM():t?.focusInput!==!1&&Ql(!0),!n&&r&&kw(r)&&s8e(r,t),n||ao("view-switch",{forceReplay:!0}),Ka("session:view")}var JE=null;function s8e(e,t){if(!(!e||JE===e.id||!kw(e))){var r=tM(e.id);JE=e.id,dM(e.id).then(function(n){if(!(!n||h.selectedId!==e.id))return dr(n),Bi(),$C(n.id),Kl(n.id).then(function(){h.selectedId===e.id&&(hC(),t?.focusInput!==!1&&r()&&h.terminalInteractive&&!dc()&&oM())})}).finally(function(){JE===e.id&&(JE=null)})}}function l8e(e,t,r,n){At.edit(e,{restore:{text:t,attachments:r},persist:n}),mc(e),Ga()}function u8e(e,t){if(!(!e||!dc())){var r=function(){if(!(h.selectedId!==t||!e.isConnected||e.disabled))try{e.focus({preventScroll:!0})}catch{e.focus()}};r(),requestAnimationFrame(r)}}function hK(e,t,r){var n=GQ(r);if(e&&t){l8e(e,t,[],!1),Fi("\u8FD9\u6BB5\u8F93\u5165\u6CA1\u6709\u9001\u5230\u7EC8\u7AEF\uFF08"+n+"\uFF09\uFF0C\u5DF2\u653E\u56DE\u8F93\u5165\u6846\uFF1B\u91CD\u8BD5\u524D\u5148\u770B\u7EC8\u7AEF\u91CC\u662F\u5426\u7559\u4E0B\u534A\u884C\u3002",e);return}Fi("\u56DE\u8F66\u6CA1\u6709\u9001\u5230\u7EC8\u7AEF\uFF08"+n+"\uFF09\u3002",e)}function Dm(e){e=e||{};var t=!!e.interrupt,r=document.documentElement.classList.contains("is-wand-embed-terminal");if(h.terminalInteractive&&!r){var n=document.getElementById("input-box"),a=n?n.value:"",o=h.selectedId,l=h.currentView;return n&&a?(n.value="",Em("",!0),Ea(n),fa(a,"interactive_text",l,o).then(function(){return fa("\r","enter_text",l,o)}).catch(function(E){hK(o,a,E)})):fa("\r","enter_text",l,o).catch(function(E){hK(o,"",E)})}var u=document.getElementById("input-box"),d=qg(),p=d&&d.id||h.selectedId,m=h.currentView,v=u?u.value:VY(p),g=Mw(p);if(h.promptOptimizeRequest&&h.promptOptimizeRequest.sessionId===p||CEe(v,d)||!p||!MC(v,p))return Promise.resolve();var b=At.pendingSubmission(p,{text:v,attachments:g});if(b)return b;u&&h.selectedId===p&&(u.value="",Ea(u)),Ga(),u8e(u,p);var x=OQ("\u6B63\u5728\u53D1\u9001\u2026",p,"\u5DF2\u53D1\u9001"),y=At.submit(p,v,function(E){var S=E.attachments;return Promise.resolve().then(function(){return S.length?qY(p,S).catch(function(F){throw new Error("\u9644\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF1A"+(F&&F.message||F))}):[]}).then(function(F){var $=!!v.trim(),C=jK(F)+($?v:F.length?"\u8BF7\u67E5\u770B\u9644\u4EF6\u3002":""),D=null;if(!hr(d)&&F.length){var I=F.filter(function(P){return AQ({savedPath:P&&P.savedPath,mimeType:P&&(P.mimeType||P.type),originalName:P&&P.originalName})});if(I.length){var M=F.filter(function(P){return I.indexOf(P)<0}),A=jK(M)+($?v:M.length?"\u8BF7\u67E5\u770B\u9644\u4EF6\u3002":"");D=BQ(I,{bracketedPaste:GM(d.id,d.provider),provider:d.provider||Tu(d.command||"")}),A&&D.push({data:A,shortcutKey:"enter_text"}),D.push({data:"\r",shortcutKey:"enter_text"})}}if(p===h.selectedId&&KY(),hr(d))return d8e(C,u,d,{interrupt:t,composerCaptured:!0});var j=D||F8e(d,C);if(h.selectedId!==p)throw new Error("\u53D1\u9001\u524D\u4F1A\u8BDD\u5DF2\u5207\u6362\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");if(!h.wsConnected)throw new Error("\u7F51\u7EDC\u5DF2\u65AD\u5F00\uFF0C\u6D88\u606F\u672A\u53D1\u9001\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");return S8e(d).then(function(P){if(!P){var O=new Error("\u4F1A\u8BDD\u5C1A\u672A\u51C6\u5907\u597D\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");throw O.__wandComposerReported=!0,O}if(h.selectedId!==p)throw new Error("\u53D1\u9001\u524D\u4F1A\u8BDD\u5DF2\u5207\u6362\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");return lY(),A8e(j,"enter_text",D?0:30,m,P.id||p,!!D)})}).then(function(F){return Hk(p,x),F})}).catch(function(E){mc(p),E&&E.__wandComposerReported||Fi(GQ(E),p)}).finally(function(){Ga()});return Tw(),y}var ZE={},c8e=350;function d8e(e,t,r,n){n=n||{};var a=!!n.interrupt;if(!e)return Promise.resolve();if(!r)return Promise.reject(new Error("\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002"));var o=!!(r.structuredState&&r.structuredState.inFlight&&r.status==="running");if(o&&!a&&jQ(r)===e.trim())return n.composerCaptured||(t&&r.id===h.selectedId&&(t.value="",Ea(t)),Yk(r.id,"",!0)),Fi("\u4E0E\u4E0A\u4E00\u6761\u6D88\u606F\u76F8\u540C\uFF0C\u672A\u52A0\u5165\u6392\u961F\u3002",r.id),Promise.resolve();var l=Date.now(),u=!n.composerCaptured,d=ZE[r.id],p=typeof d=="number"?d:d&&d.at||0,m=typeof d=="number"?e:d&&d.input;if(u&&m===e&&l-p<c8e)return Promise.resolve();var v=u?{at:l,input:e}:null;v&&(ZE[r.id]=v),r.id===h.selectedId&&dw(!1);var g=o&&a,b=o&&!a,x=pi.read(r.id),y=-1,E=yC(Array.isArray(r.messages)?r.messages.slice():[]),S;if(b){var F=Array.isArray(r.queuedMessages)?r.queuedMessages.slice():[];if(y=F.length,F.push(e),x=pi.advance(r.id,"local"),S={id:r.id,queuedMessages:F},dr(S),r.id===h.selectedId){var $=h.sessions.find(function(A){return A.id===r.id})||r;h.currentMessages=Xs($,uc($,$.output,!1)),xa(!0),Jd()}r.id===h.selectedId?X9(F.length>1?"\u5DF2\u52A0\u5165\u6392\u961F\uFF08\u5171 "+F.length+" \u6761\u7B49\u5F85\uFF09":"\u5DF2\u52A0\u5165\u961F\u5217\uFF0C\u5C06\u6309\u6267\u884C\u5668\u652F\u6301\u7684\u65F6\u673A\u81EA\u52A8\u53D1\u9001\u3002",r.id):Ze(F.length>1?"\u5DF2\u52A0\u5165\u300C"+(r.title||"\u8BE5\u4F1A\u8BDD")+"\u300D\u6392\u961F\uFF08\u5171 "+F.length+" \u6761\u7B49\u5F85\uFF09":"\u5DF2\u52A0\u5165\u300C"+(r.title||"\u8BE5\u4F1A\u8BDD")+"\u300D\u7684\u5F85\u53D1\u9001\u961F\u5217\u3002","info")}else{var C={role:"user",content:[{type:"text",text:e}]};E.push(C);var D=Object.assign({},r.structuredState||{},{inFlight:!0});dr({id:r.id,status:"running",messages:E,structuredState:D}),r.id===h.selectedId&&(h.currentMessages=Xs(Object.assign({},r,{status:"running",messages:E,structuredState:D}),E),lY(),xa(!0),g&&X9("\u5DF2\u4E2D\u65AD\u4E0A\u4E00\u6761\u56DE\u590D\uFF0C\u6B63\u5728\u5904\u7406\u65B0\u6D88\u606F\u2026",r.id))}n.composerCaptured||(t&&r.id===h.selectedId&&(t.value="",Ea(t)),Yk(r.id,"",!0));var I=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),M=!1;return an("/api/structured-sessions/"+r.id+"/messages",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,interrupt:g||void 0,idempotencyKey:I})}).then(function(A){return A.ok?(M=!0,A.json()):A.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(j){var P=new Error(j&&j.error||"\u65E0\u6CD5\u53D1\u9001\u7ED3\u6784\u5316\u6D88\u606F\u3002");throw P.errorCode=j&&j.errorCode,P.httpStatus=A.status,P})}).then(function(A){if(A&&A.error)throw new Error(A.error);if(A&&A.id&&(A=pi.filter(A,r.id,x),dr(A),A.id===h.selectedId)){var j=h.sessions.find(function(P){return P.id===A.id})||A;h.currentMessages=Xs(j,uc(j,A.output,!1)),xa(!0),Jd()}}).catch(function(A){if(M&&(A=aM(A)),A&&A.errorCode==="duplicate_idempotency_key"){r.id===h.selectedId?Fi(A.message||"\u68C0\u6D4B\u5230\u91CD\u590D\u53D1\u9001\uFF0C\u5DF2\u62E6\u622A\u3002",r.id):Ze(A.message||"\u68C0\u6D4B\u5230\u91CD\u590D\u53D1\u9001\uFF0C\u5DF2\u62E6\u622A\u3002","warning");return}if(v&&ZE[r.id]===v&&delete ZE[r.id],b){var j=_Q(r.id,e,y,x);if(j&&dr({id:r.id,queuedMessages:j}),r.id===h.selectedId){var P=h.sessions.find(function(H){return H.id===r.id})||r;h.currentMessages=Xs(P,uc(P,P.output,!1)),xa(!0),Jd()}}else{var O=E.slice(0,-1);dr({id:r.id,status:r.status,messages:O,structuredState:Object.assign({},r.structuredState||{},{inFlight:!1})}),r.id===h.selectedId&&(h.currentMessages=Xs(Object.assign({},r,{messages:O,structuredState:Object.assign({},r.structuredState||{},{inFlight:!1})}),O),xa(!0))}var V=A&&A.message||"",W=V==="Failed to fetch"||V==="NetworkError when attempting to fetch resource."||V==="Load failed"||/aborted|aborterror|networkerror|failed to fetch/i.test(V);throw W&&(A.__wandAmbiguousDelivery=!0,Fi("\u7F51\u7EDC\u4E2D\u65AD\uFF0C\u8FD9\u6761\u6D88\u606F\u53EF\u80FD\u5DF2\u9001\u8FBE\uFF1B\u8349\u7A3F\u5DF2\u56DE\u586B\uFF0C\u91CD\u8BD5\u524D\u8BF7\u5148\u770B\u4F1A\u8BDD\u5185\u5BB9\u3002",r.id),A.__wandComposerReported=!0),A})}var Lk=null,G9="",Fy=0,vm=null,gK=0,K9=0,PQ="",gk=new Set;function rM(e){return e==="failed"?m0:f0}function p8e(e,t){return!t&&R0(e).active?"running":"idle"}function f8e(){var e=document.getElementById("send-input-button");return e&&e.getAttribute("data-phase")||"idle"}function RQ(e){var t=e===void 0?h.selectedId:e;return!!vm&&vm===t}function m8e(e){return FY}function h8e(e,t,r,n){return e==="running"?{title:"\u505C\u6B62\u751F\u6210",label:"\u505C\u6B62\u751F\u6210"}:e==="sending"?{title:"\u6B63\u5728\u53D1\u9001\u2026",label:"\u6B63\u5728\u53D1\u9001\u2026"}:e==="sent"?{title:n||"\u5DF2\u53D1\u9001",label:"\u5DF2\u53D1\u9001"}:e==="failed"?{title:n||"\u53D1\u9001\u5931\u8D25",label:"\u53D1\u9001\u5931\u8D25"}:{title:t,label:r}}function g8e(e,t,r){var n=document.getElementById("composer-status-line");if(n){var a=e==="sending"||e==="sent"||e==="failed",o=a&&t?t:m8e(r);n.textContent!==o&&(n.textContent=o);var l=a?e:"",u=(n.getAttribute("data-tone")||"")!==l;u&&n.removeAttribute("data-tone"),l&&u&&(n.offsetWidth,n.setAttribute("data-tone",l))}}function v8e(){var e=document.getElementById("composer-status-line");return!!e&&e.getClientRects().length>0}function mC(e,t,r,n){Fy&&(clearTimeout(Fy),Fy=0),Lk=e,G9=t||"",vm=n===void 0?h.selectedId||null:n||null,Ga(),e==="failed"&&(!RQ()||!v8e())&&Ze(t||"\u64CD\u4F5C\u672A\u5B8C\u6210\u3002","error"),!(r<=0)&&(Fy=window.setTimeout(function(){Fy=0,Lk=null,G9="",vm=null,Ga()},r))}function OQ(e,t,r){return gK+=1,K9=gK,PQ=r||"\u5DF2\u53D1\u9001",mC("sending",e,0,t),K9}function X9(e,t){mC("sent",e,rM("sent"),t)}function Fi(e,t){mC("failed",e,rM("failed"),t)}function Hk(e,t){Lk!=="sending"||!vm||e&&e!==vm||t!==void 0&&t!==K9||mC("sent",PQ||"\u5DF2\u53D1\u9001",rM("sent"),vm)}function Jd(){kn()}var b8e=10;function y8e(){return!!h.queueBarExpanded}function dw(e){!!h.queueBarExpanded!=!!e&&(h.queueBarExpanded=!!e,kn())}var vK=null;function kn(){var e=document.getElementById("queue-bar-host");if(e){var t=h.sessions.find(function(d){return d.id===h.selectedId});vK!==(t?.id??null)&&(vK=t?.id??null,h.queueBarExpanded=!1,h.queueBarDrag&&um(null,!0));var r=t&&t.sessionKind==="structured",n=r?DM(t):[];n=Array.isArray(n)?n:[];var a=t?At.read(t.id).queueRetrieval:null,o=t?At.read(t.id).queueRemoval:null;if(h.queueBarDrag){let d=h.queueBarDrag;if(!r||!h.queueBarExpanded||JSON.stringify(n)!==JSON.stringify(d.queueSnapshot))um(null,!0);else return}if(!r||n.length===0&&!a&&!o){e.hidden=!0,V9(e),h.queueBarExpanded=!1;return}e.hidden=!1;var l=!!(t.structuredState&&t.structuredState.inFlight&&t.status==="running"),u=n.length>=b8e;GSe(e,n,l,u,{expanded:!!h.queueBarExpanded,onExpandedChange:dw,busy:lc.has(t.id)||Zs.has(t.id),retrieval:a,removal:o,steering:t.provider==="pi"&&t.structuredState?.engine==="core",onDragStart:UQ,onAction:(d,p,m)=>{if(h.selectedId===t.id){if(d==="restore-retrieved"){nM(t.id);return}if(d==="dismiss-retrieved"){At.dismissQueueRetrieval(t.id),kn();return}if(d==="dismiss-removed"){At.dismissQueueRemoval(t.id),kn();return}if(d==="restore-removed"){if(h.composerComposing||!At.restoreQueueRemoval(t.id))return;mc(t.id),document.getElementById("input-box")?.focus({preventScroll:!0}),dw(!1),kn();return}var v=h.sessions.find(g=>g.id===t.id)?.queuedMessages||[];if(v.length!==m.length||v.some((g,b)=>g!==m[b])){Fi("\u961F\u5217\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u6838\u5BF9\u540E\u91CD\u8BD5\u3002",t.id),kn();return}if(d==="edit"){zQ(p);return}if(d==="promote-item"){VQ(p);return}if(d==="delete"){LQ(p);return}if(d==="clear-all"){HQ();return}(d==="move-up"||d==="move-down")&&w8e(t.id,p,d==="move-up"?-1:1,m)}}})}}var lc=new Set,Zs=new Set;async function zQ(e){var t=h.sessions.find(function(v){return v.id===h.selectedId}),r=t&&t.queuedMessages&&t.queuedMessages[e];if(!(typeof r!="string"||lc.has(t.id)||Zs.has(t.id))){var n=t.id,a=At.beginQueueRetrieval(n,r);if(a){var o=pi.advance(n,"local");lc.add(n),kn();var l=!1;try{var u=await an("/api/structured-sessions/"+encodeURIComponent(n)+"/queued/"+e,{method:"DELETE",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedText:r})});if(!u.ok){l=u.status>=400&&u.status<500&&u.status!==408;var d=await u.json().catch(function(){return{}});throw new Error(d&&d.error||"\u53D6\u56DE\u6392\u961F\u6D88\u606F\u5931\u8D25\u3002")}var p=await u.json();if(p.id!==n||!Array.isArray(p.queuedMessages))throw new Error("\u53D6\u56DE\u7ED3\u679C\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u68C0\u67E5\u6392\u961F\u5185\u5BB9\u3002");if(!h.sessions.some(function(v){return v.id===n}))return;var m=pi.filter({id:n,queuedMessages:p.queuedMessages},n,o);if(m.queuedMessages&&dr(m),!At.finishQueueRetrieval(n,a,"confirmed"))return;(h.selectedId!==n||!h.composerComposing)&&nM(n)}catch(v){At.finishQueueRetrieval(n,a,l?"rejected":"unknown"),h.selectedId===n&&(Fi(Ua(v,"\u53D6\u56DE\u7ED3\u679C\u672A\u77E5\uFF0C\u539F\u6587\u5DF2\u4FDD\u7559\uFF0C\u672A\u81EA\u52A8\u91CD\u8BD5\u3002"),n),Kl(n))}finally{lc.delete(n),h.selectedId===n&&kn()}}}}function nM(e){if(!(h.selectedId===e&&h.composerComposing)&&At.restoreQueueRetrieval(e)&&h.selectedId===e){mc(e);var t=document.getElementById("input-box");if(t){km(t);try{t.focus({preventScroll:!0})}catch{t.focus()}}dw(!1),kn()}}function LQ(e){var t=h.sessions.find(function(n){return n.id===h.selectedId}),r=t?.queuedMessages?.[e];typeof r=="string"&&qQ(t.id,"/"+e,{expectedText:r},[r])}function HQ(){var e=h.sessions.find(function(t){return t.id===h.selectedId});e?.queuedMessages?.length&&qQ(e.id,"",{expectedQueue:e.queuedMessages.slice()},e.queuedMessages.slice())}async function qQ(e,t,r,n){if(!(lc.has(e)||Zs.has(e))){var a=At.beginQueueRemoval(e,n);if(a){var o=!1;Zs.add(e);var l=pi.advance(e,"local");kn();try{var u=await an("/api/structured-sessions/"+encodeURIComponent(e)+"/queued"+t,{method:"DELETE",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),d=await u.json();if(!u.ok)throw o=u.status>=400&&u.status<500&&u.status!==408&&u.status!==409,new Error(d.error||"\u65E0\u6CD5\u66F4\u65B0\u6392\u961F\u6D88\u606F\u3002");if(d.id!==e||!Array.isArray(d.queuedMessages))throw new Error("\u961F\u5217\u56DE\u6267\u65E0\u6548\uFF0C\u8BF7\u6838\u5BF9\u6700\u65B0\u72B6\u6001\u3002");h.sessions.some(function(p){return p.id===e})&&(dr(pi.filter(d,e,l)),At.finishQueueRemoval(e,a,"confirmed"))}catch(p){At.finishQueueRemoval(e,a,o?"rejected":"unknown"),h.selectedId===e&&(Fi(Ua(p,"\u961F\u5217\u66F4\u65B0\u7ED3\u679C\u672A\u77E5\uFF0C\u672A\u81EA\u52A8\u91CD\u8BD5\u3002"),e),Kl(e))}finally{Zs.delete(e),h.selectedId===e&&kn()}}}}async function w8e(e,t,r,n){if(Zs.has(e)||lc.has(e))return;let a=t+r;if(t<0||t>=n.length||a<0||a>=n.length)return;let o=n.map((l,u)=>u);return[o[t],o[a]]=[o[a],o[t]],WQ(e,o,n)}async function WQ(e,t,r){if(h.selectedId!==e||Zs.has(e)||lc.has(e))return;let n=h.sessions.find(o=>o.id===e)?.queuedMessages||[];if(JSON.stringify(n)!==JSON.stringify(r)){kn();return}Zs.add(e);let a=pi.advance(e,"local");kn();try{let o=await an("/api/structured-sessions/"+encodeURIComponent(e)+"/queued",{method:"PATCH",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:t,expectedQueue:r})}),l=await o.json();if(!o.ok||l.id!==e||!Array.isArray(l.queuedMessages))throw new Error(l.error||"\u961F\u5217\u6392\u5E8F\u7ED3\u679C\u5F85\u6838\u5BF9\u3002");h.sessions.some(u=>u.id===e)&&dr(pi.filter(l,e,a))}catch(o){h.selectedId===e&&(Fi(Ua(o,"\u6392\u5E8F\u7ED3\u679C\u672A\u77E5\uFF0C\u672A\u81EA\u52A8\u91CD\u8BD5\u3002"),e),Kl(e))}finally{Zs.delete(e),h.selectedId===e&&kn()}}function VQ(e){if(!h.queueBarPromoting){var t=h.sessions.find(function(p){return p.id===h.selectedId});if(!(!t||lc.has(t.id)||Zs.has(t.id))){var r=Array.isArray(t.queuedMessages)?t.queuedMessages.slice():[];if(!(e<0||e>=r.length)){var n=r[e],a=r.slice(0,e).concat(r.slice(e+1)),o=!!(t.structuredState&&t.structuredState.inFlight&&t.status==="running");h.queueBarPromoting=!0,a.length===0&&(h.queueBarExpanded=!1);var l=pi.advance(t.id,"local");dr({id:t.id,queuedMessages:a});var u=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),d=OQ(o?"\u6B63\u5728\u63D2\u961F\u53D1\u9001\uFF0C\u51C6\u5907\u6253\u65AD\u5F53\u524D\u56DE\u590D\u2026":"\u6B63\u5728\u53D1\u9001\u8FD9\u6761\u2026",t.id,o?"\u5DF2\u4E2D\u65AD\u4E0A\u4E00\u6761\u56DE\u590D\uFF0C\u8FD9\u6761\u7ACB\u5373\u53D1\u9001\u3002":"\u5DF2\u7ACB\u5373\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002");an("/api/structured-sessions/"+t.id+"/queued/"+e+"/promote",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({expectedText:n,idempotencyKey:u})}).then(function(p){return p.ok?p.json():p.json().catch(function(){return{}}).then(function(m){throw new Error(m&&m.error||"\u7ACB\u5373\u53D1\u9001\u5931\u8D25")})}).then(function(p){if(p&&p.id&&(p=pi.filter(p,t.id,l),dr(p),p.id===h.selectedId)){var m=h.sessions.find(function(v){return v.id===p.id})||p;h.currentMessages=Xs(m,uc(m,p.output,!1)),xa(!0),kn()}Hk(t.id,d),h.queueBarPromoting=!1}).catch(function(p){h.queueBarPromoting=!1,h.selectedId===t.id&&Kl(t.id),Fi(p&&p.message||"\u7ACB\u5373\u53D1\u9001\u7ED3\u679C\u672A\u77E5\uFF0C\u8BF7\u6838\u5BF9\u5BF9\u8BDD\uFF1B\u672A\u81EA\u52A8\u91CD\u8BD5\u3002",t.id)})}}}}function UQ(e,t){if(!(h.queueBarDrag||!e.target?.closest?.(".queue-drag-handle"))){var r=h.sessions.find(function(E){return E.id===h.selectedId});if(!(!r||lc.has(r.id)||Zs.has(r.id))){var n=Array.isArray(r.queuedMessages)?r.queuedMessages.slice():[];if(!(n.length<=1)&&t){var a=t.parentElement;if(a){var o=Number(t.getAttribute("data-index")),l=Array.prototype.slice.call(a.children),u=l.map(function(E){return E.getBoundingClientRect()}),d=3;u.length>=2&&(d=Math.max(0,u[1].top-u[0].top-u[0].height)),e.preventDefault();var p=t.querySelector(".queue-drag-handle");if(p){p.focus({preventScroll:!0});try{p.setPointerCapture(e.pointerId)}catch{}if(navigator&&navigator.vibrate)try{navigator.vibrate(8)}catch{}h.queueBarDrag={pointerId:e.pointerId,handleEl:p,itemEl:t,listEl:a,siblings:l,rects:u,origIndex:o,targetIndex:o,startY:e.clientY,gap:d,queueSnapshot:n,sessionId:r.id},t.classList.add("dragging"),l.forEach(function(E){E!==t&&E.classList.add("queue-bar-item-sliding")});var m=function(E){E8e(E)},v=function(E){um(E)},g=function(E){um(E,!0)},b=function(){um(null,!0)},x=function(){document.hidden&&um(null,!0)},y=function(E){E.key==="Escape"&&um(null,!0)};Object.assign(h.queueBarDrag,{moveHandler:m,upHandler:v,cancelHandler:g,blurHandler:b,hiddenHandler:x,keyHandler:y}),p.addEventListener("pointermove",m),p.addEventListener("pointerup",v),p.addEventListener("pointercancel",g),p.addEventListener("lostpointercapture",g),window.addEventListener("blur",b),document.addEventListener("visibilitychange",x),document.addEventListener("keydown",y,!0)}}}}}}function x8e(e,t,r,n){for(var a=r.length,o=[],l=0;l<a;l++)o.push(l);o.splice(e,1),o.splice(t,0,e);for(var u=r[0].top,d=1;d<a;d++)r[d].top<u&&(u=r[d].top);for(var p={},m=u,v=0;v<a;v++){var g=o[v];p[g]=m,m+=r[g].height+n}return p}function E8e(e){var t=h.queueBarDrag;if(!(!t||e.pointerId!==t.pointerId)){e.preventDefault();var r=e.clientY-t.startY;t.itemEl.style.transform="translateY("+r+"px)";for(var n=t.rects[t.origIndex].top+t.rects[t.origIndex].height/2+r,a=t.origIndex,o=0;o<t.rects.length;o++)if(o!==t.origIndex){var l=t.rects[o].top+t.rects[o].height/2;o<t.origIndex&&n<l?a=Math.min(a,o):o>t.origIndex&&n>l&&(a=Math.max(a,o))}if(a!==t.targetIndex){t.targetIndex=a;var u=x8e(t.origIndex,a,t.rects,t.gap);t.siblings.forEach(function(d,p){if(p!==t.origIndex){var m=u[p]-t.rects[p].top;d.style.transform=m?"translateY("+m+"px)":""}})}}}function um(e,t=!1){var r=h.queueBarDrag;if(!(!r||e&&e.pointerId!==r.pointerId)){h.queueBarDrag=null,r.handleEl.removeEventListener("pointermove",r.moveHandler),r.handleEl.removeEventListener("pointerup",r.upHandler),r.handleEl.removeEventListener("pointercancel",r.cancelHandler),r.handleEl.removeEventListener("lostpointercapture",r.cancelHandler),window.removeEventListener("blur",r.blurHandler),document.removeEventListener("visibilitychange",r.hiddenHandler),document.removeEventListener("keydown",r.keyHandler,!0);try{r.handleEl.releasePointerCapture(r.pointerId)}catch{}var n=r.origIndex,a=r.targetIndex,o=r.queueSnapshot;if(r.siblings.forEach(function(m){m.style.transform="",m.classList.remove("queue-bar-item-sliding")}),r.itemEl.classList.remove("dragging"),t||!e||e.type!=="pointerup"||n===a){kn();return}for(var l=[],u=0;u<o.length;u++)l.push(u);l.splice(n,1),l.splice(a,0,n);var d=h.sessions.find(function(m){return m.id===h.selectedId});if(!d||d.id!==r.sessionId){kn();return}var p=Array.isArray(d.queuedMessages)?d.queuedMessages:[];if(p.length!==o.length||p.some(function(m,v){return m!==o[v]})){kn(),Fi("\u6392\u961F\u5185\u5BB9\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u91CD\u65B0\u62D6\u52A8\u6392\u5E8F\u3002",d.id);return}WQ(d.id,l,o)}}function k8e(){var e=document.getElementById("queue-bar-host");!e||e.__queueDelegated||(e.__queueDelegated=!0,e.addEventListener("click",function(t){var r=t.target,n=r&&r.closest?r.closest("[data-action]"):null;if(n&&e.contains(n)){var a=n.getAttribute("data-action");if(a==="drag")return;if(t.preventDefault(),t.stopPropagation(),a==="edit"){var o=n.closest(".queue-bar-item");o&&zQ(Number(o.getAttribute("data-index")))}else if(a==="promote-item"){var l=n.closest(".queue-bar-item");l&&VQ(Number(l.getAttribute("data-index")))}else if(a==="delete"){var u=n.closest(".queue-bar-item");u&&LQ(Number(u.getAttribute("data-index")))}else a==="clear-all"?HQ():a==="restore-retrieved"?nM(h.selectedId):a==="dismiss-retrieved"&&(At.dismissQueueRetrieval(h.selectedId),kn());return}}),e.addEventListener("pointerdown",function(t){if(!(t.button!==void 0&&t.button!==0)){var r=t.target;if(r?.closest?.(".queue-drag-handle")){var n=r&&r.closest?r.closest(".queue-bar-item"):null;n&&UQ(t,n)}}}),e.addEventListener("keydown",function(t){t.key==="Escape"&&y8e()&&(t.stopPropagation(),dw(!1))}))}function Xs(e,t){var r=Array.isArray(t)?yC(t):[],n=Array.isArray(r)?r.slice():[];if(!e||e.sessionKind!=="structured")return n;if(e.structuredState&&e.structuredState.inFlight){for(var a=null,o=n.length-1;o>=0;o--){var l=n[o];if(l.role!=="user"||!Array.isArray(l.content)||l.content.some(function(u){return u?.type!=="tool_result"})){a=l;break}}(!a||a.role!=="assistant")&&n.push({role:"assistant",content:[{type:"text",text:"",__processing:!0}]})}return n}function bK(){var e=h.sessions.find(function(t){return t.id===h.selectedId});bC(e),Jd()}function GQ(e){var t=qg(),r=t&&t.provider==="codex";return e&&(e.errorCode==="SESSION_NOT_RUNNING"||e.errorCode==="SESSION_NO_PTY")?r?"Codex \u4F1A\u8BDD\u5DF2\u7ED3\u675F\uFF1B\u82E5\u5B58\u5728 Codex \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u5728\u4F60\u4E0B\u6B21\u53D1\u9001\u6D88\u606F\u65F6\u81EA\u52A8\u6062\u590D\u3002":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F\uFF1B\u82E5\u5B58\u5728 Claude \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u5728\u4F60\u4E0B\u6B21\u53D1\u9001\u6D88\u606F\u65F6\u81EA\u52A8\u6062\u590D\u3002":e&&e.errorCode==="SESSION_NOT_FOUND"?"\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002":e&&e.message||(r?"Codex \u4F1A\u8BDD\u6682\u4E0D\u53EF\u7528\uFF1B\u82E5\u5B58\u5728 Codex \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u81EA\u52A8\u5C1D\u8BD5\u6062\u590D\u3002":"\u4F1A\u8BDD\u6682\u4E0D\u53EF\u7528\uFF1B\u82E5\u5B58\u5728 Claude \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u81EA\u52A8\u5C1D\u8BD5\u6062\u590D\u3002")}function KQ(e){var t=new Error(e&&e.error||"\u4F1A\u8BDD\u5DF2\u7ED3\u675F\u3002");return e&&typeof e=="object"&&(t.errorCode=e.errorCode||null,t.sessionId=e.sessionId||h.selectedId||null,t.sessionStatus=Object.prototype.hasOwnProperty.call(e,"sessionStatus")?e.sessionStatus:null),t}function XQ(e){return e&&(e.errorCode==="SESSION_NOT_RUNNING"||e.errorCode==="SESSION_NO_PTY"||e.errorCode==="SESSION_NOT_FOUND")}function C8e(e,t){e&&dr({id:e,status:t||"exited"})}function kw(e){return!!(e&&!hr(e)&&Mu.indexOf(e.provider)!==-1&&e.status!=="running"&&e.claudeSessionId)}function S8e(e){if(!e)return Fi("\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002"),Promise.resolve(null);if(e.status==="running")return Promise.resolve(e);if(!kw(e)){var t=e&&bl[e.provider]||"Provider";return Fi("\u8BE5\u4F1A\u8BDD\u6CA1\u6709\u53EF\u6062\u590D\u7684 "+t+" \u5386\u53F2\u4E0A\u4E0B\u6587\uFF0C\u8BF7\u65B0\u5EFA\u4F1A\u8BDD\u3002",e.id),Promise.resolve(null)}var r=tM(e.id);return dM(e.id).then(function(n){return n?(dr(n),Bi(),$C(n.id),Kl(n.id).then(function(){return r()&&Ql(!0),hr(n)?n:Qke().then(function(){return n})})):null})}function F8e(e,t){return[t,"\r"]}function $8e(e){return typeof e=="string"?e?{data:e}:null:e&&typeof e.data=="string"&&e.data?{data:e.data,shortcutKey:e.shortcutKey,image:!!e.image}:null}var D8e=3e3;function aM(e){return Object.assign(new Error(Ua(e,"\u8F93\u5165\u63D0\u4EA4\u7ED3\u679C\u672A\u77E5\u3002")),e,{__wandAmbiguousDelivery:!0})}function A8e(e,t,r,n,a,o){var l=(Array.isArray(e)?e:[]).map($8e).filter(Boolean);if(l.length===0)return Promise.resolve();var u=typeof r=="number"?r:0,d=0;return l.reduce(function(p,m,v){var g=m.shortcutKey!==void 0?m.shortcutKey:t&&(v===0||v===l.length-1)?t:void 0;return p.then(function(){if(v>0){var b=l[v-1],x=o?Mk(void 0,b&&b.image?D8e:void 0):u>0?new Promise(function(y){setTimeout(y,u)}):Promise.resolve();return x.then(function(){return fa(m.data,g,n,a)})}return fa(m.data,g,n,a)}).then(function(b){return d+=1,b})},Promise.resolve()).catch(function(p){throw d>0?aM(p):p})}var B8e=5e3,I8e=100;function yK(e){e&&(h.pendingMessages.length>=I8e&&h.pendingMessages.shift(),h.pendingMessages.push({input:e,at:Date.now()}))}function fa(e,t,r,n){var a=n||h.selectedId;if(!e||!a)return Promise.resolve();var o=r||h.currentView;if(o==="terminal"&&a===h.selectedId&&h.ws&&h.ws.readyState===WebSocket.OPEN){try{h.ws.send(JSON.stringify({type:"pty_input",sessionId:a,data:e,shortcutKey:t,userInput:!0}))}catch(u){return Promise.reject(u)}return Promise.resolve()}h.messageQueue.push(e);var l=h.inputQueue.then(function(){return M8e(e,t,r,a,!!n).finally(function(){var u=h.messageQueue.indexOf(e);u>-1&&h.messageQueue.splice(u,1)})});return h.inputQueue=l.catch(function(){}),l}function M8e(e,t,r,n,a){var o=n||h.selectedId;if(!o)return Promise.resolve();var l=r||h.currentView,u=h.sessions.find(function(v){return v.id===o}),d=!!u&&!hr(u)&&u.status==="running";if(!d){if(a){var p=new Error("\u76EE\u6807\u4F1A\u8BDD\u5DF2\u505C\u6B62\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");throw p.errorCode=u?"SESSION_NOT_RUNNING":"SESSION_NOT_FOUND",p}return h.wsConnected?(console.warn("[wand] postInput: session not running, skipping send",{sessionId:o}),Ze("\u4F1A\u8BDD\u672A\u8FD0\u884C\uFF0C\u6B63\u5728\u7B49\u5F85\u81EA\u52A8\u6062\u590D\u540E\u91CD\u8BD5\u3002","info"),Promise.resolve()):(yK(e),Promise.resolve())}if(!h.wsConnected){if(a)throw new Error("\u7F51\u7EDC\u5DF2\u65AD\u5F00\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");return yK(e),Promise.resolve()}var m=!1;return an("/api/sessions/"+o+"/input",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,view:l,shortcutKey:t||void 0})}).then(function(v){return v.ok?(m=!0,v.json()):v.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(g){var b=KQ(g);throw b.httpStatus=v.status,console.error("[wand] postInput: request failed",{status:v.status,errorCode:b.errorCode,message:b.message,sessionId:o}),XQ(b)&&C8e(o,b.sessionStatus||"exited"),b})}).then(function(v){return v&&v.id&&(dr(v),v.id===h.selectedId&&(v.messages&&v.messages.length>0&&(h.currentMessages=v.messages),xa(!0))),v}).catch(function(v){throw m?aM(v):v})}function qg(){return h.sessions.find(function(e){return e.id===h.selectedId})||null}function iM(){return!!h.selectedId&&h.currentView==="terminal"}function wK(e){return!(!h.terminal||!e||e!==h.selectedId||h.terminalSessionId&&h.terminalSessionId!==e)}function QQ(e){return!!e&&(!!e.isComposing||e.keyCode===229||!!h.composerComposing)}function YQ(e){if(!h.terminalInteractive||!iM()||e.defaultPrevented||QQ(e))return!1;var t=e.target;return t?!(t.closest&&t.closest("#input-box")||_8e(t)):!0}var T8e={Esc:"escape",ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Enter:"enter",Tab:"tab",Backspace:"backspace",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown",Delete:"delete",Insert:"insert"," ":"space"},j8e={space:" ",tab:" ",shift_tab:"\x1B[Z",backspace:"\x7F",home:"\x1B[H",end:"\x1B[F",pageup:"\x1B[5~",pagedown:"\x1B[6~",delete:"\x1B[3~",insert:"\x1B[2~"},xK={" ":0,"[":27,"\\":28,"]":29,"^":30,_:31};function _8e(e){return e?!!(e.closest&&e.closest('[role="dialog"], [role="alertdialog"], .wand-ui-select-trigger, .wand-ui-select-content, [role="listbox"], [role="option"], [data-wand-popup-owner], .terminal-shortcuts, .pty-input-mode-toggle, .pty-modifier-toggle, .composer-actions-left button, .composer-actions-right button')):!1}var N8e=new Set(["ctrl","alt","shift"]);function JQ(e){return N8e.has(e)}function P8e(e){return j8e[e]||""}function R8e(e){var t=e.toLowerCase();return t>="a"&&t<="z"?String.fromCharCode(t.charCodeAt(0)-96):Object.prototype.hasOwnProperty.call(xK,t)?String.fromCharCode(xK[t]):""}function qk(e){return T8e[e.key]||e.key}function O8e(e,t){return{ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey&&(t.length===1||t==="tab"),meta:e.metaKey}}function Q9(e,t){e&&fa(e,t).catch(function(){})}function oM(){oY()}function z8e(){iM()&&bm(!h.terminalInteractive)}function L8e(e=!1){Zd(e);var t=document.getElementById("file-upload-input");t&&t.click()}function ZQ(e){return!!e&&!hr(e)&&e.status==="running"&&h.currentView==="terminal"}function sM(){return document.documentElement.classList.contains("is-wand-native-input")}function np(){return sM()&&!document.documentElement.classList.contains("is-wand-terminal-passthrough")}function Wk(){if(!np())return!1;if(h.terminal&&h.terminal.element){var e=h.terminal.element.querySelector(".xterm-helper-textarea");if(e&&(e.readOnly=!0,e.setAttribute("aria-readonly","true"),document.activeElement===e))try{e.blur()}catch{}}return!0}var EK=!1;function H8e(){EK||!np()||(EK=!0,document.addEventListener("focusin",function(e){var t=e.target;!t||!t.classList||!t.classList.contains("xterm-helper-textarea")||Wk()},!0))}function bm(e,t){var r=t||{},n=!!e&&iM();if(h.terminalInteractive!==n){if(h.terminalInteractive=n,h.terminal&&h.terminal.element){var a=h.terminal.element.querySelector(".xterm-helper-textarea");a&&(a.readOnly=np()?!0:!n)}n?(G8e(),r.focus!==!1&&!np()&&oM(),r.announce!==!1&&Ze("\u7EC8\u7AEF\u4EA4\u4E92\u6A21\u5F0F\u5DF2\u5F00\u542F","info")):K8e(),Ga();var o=document.getElementById("input-box");o&&Ea(o)}}function hC(){var e=h.sessions.find(function(n){return n.id===h.selectedId}),t=ZQ(e),r=!t;if(r&&h.terminalInteractive){bm(!1);return}if(t&&!h.terminalInteractive){bm(!0,{announce:!1,focus:!1});return}Ga()}function Ga(e=!1){e||Zk(Ea);var t=h.sessions.find(function(W){return W.id===h.selectedId}),r=hr(t),n=t&&t.provider==="codex",a=r?!!(t&&t.structuredState&&t.structuredState.inFlight):!!t&&t.status==="running",o=document.getElementById("input-box"),l=document.querySelector(".input-composer"),u=h.promptOptimizeRequest,d=!!(u&&u.sessionId===h.selectedId),p=!!u,m=ZQ(t),v=!r&&!a&&kw(t);if(!e){WSe({resolve:function(){return{interactiveVisible:!(r||h.currentView!=="terminal"||!t||m),interactiveOn:h.terminalInteractive}},onAttach:function(W){L8e(W)},onToggleInteractive:z8e}),o&&(o.placeholder=$Y(t,h.terminalInteractive),o.disabled=!r&&!!t&&!a&&!v,o.setAttribute("aria-disabled",o.disabled?"true":"false"),o.readOnly=d,o.setAttribute("aria-readonly",o.readOnly?"true":"false"),o.setAttribute("aria-busy",d?"true":"false"),o.classList.toggle("is-terminal-passthrough",!!h.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal"))),l&&(l.classList.toggle("is-optimizing",d),l.classList.toggle("is-terminal-interactive",!!h.terminalInteractive)),zSe({active:function(){return!!h.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal")},submit:function(){Dm(void 0)},focusInput:function(){hM(document.getElementById("input-box"))}}),AI();var g=document.getElementById("prompt-optimize-btn");if(g){g.hidden=h.terminalInteractive,g.disabled=p,g.classList.toggle("is-loading",d),g.setAttribute("aria-busy",d?"true":"false"),g.setAttribute("aria-label",d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":p?"\u5176\u4ED6\u4F1A\u8BDD\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":"\u4F18\u5316\u63D0\u793A\u8BCD"),g.setAttribute("title",d?"\u6B63\u5728\u4F18\u5316\u2026":p?"\u5176\u4ED6\u4F1A\u8BDD\u6B63\u5728\u4F18\u5316\u2026":"\u4F18\u5316\u63D0\u793A\u8BCD");var b=g.querySelector(".prompt-optimize-label");b&&(b.textContent=d?"\u4F18\u5316\u4E2D":"\u4F18\u5316")}}var x=document.getElementById("send-input-button"),y=r&&a;if(x){var E=!r&&!!t&&!a&&!v,S=o?o.value:"",F=Mw(h.selectedId),$=MC(S,h.selectedId),C=!!($&&At.pendingSubmission(h.selectedId,{text:S,attachments:F})),D=d||!$||C||E,I=RQ(),M=I?G9:"",A=I&&Lk||p8e(t,$);A==="running"&&(D=!1),h.selectedId&&gk.has(h.selectedId)&&(D=!0),x.disabled!==D&&(x.disabled=D),x.getAttribute("aria-disabled")!==String(D)&&x.setAttribute("aria-disabled",String(D)),x.dataset.phase!==A&&(x.dataset.phase=A);var j=d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":r?y?"\u52A0\u5165\u5F85\u53D1\u9001\u961F\u5217":"\u53D1\u9001":n?a?"\u53D1\u9001\u7ED9 Codex":"Codex \u4F1A\u8BDD\u5DF2\u7ED3\u675F":!t||a||v?"\u53D1\u9001":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F",P=d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":y?"\u52A0\u5165\u53D1\u9001\u961F\u5217":"\u53D1\u9001\u6D88\u606F",O=h8e(A,j,P,M);x.title!==O.title&&(x.title=O.title),x.getAttribute("aria-label")!==O.label&&x.setAttribute("aria-label",O.label),x.classList.toggle("queue-mode",y&&A!=="running"),g8e(A,M,n)}if(!e){var V=document.getElementById("output");V&&V.classList.toggle("interactive",!r&&h.terminalInteractive),U8e(),YEe(Ea),q8e()}}function q8e(){var e=document.getElementById("chat-running-host");if(e){var t=h.sessions.find(function(n){return n.id===h.selectedId}),r=!!t&&document.getElementById("chat-output")!=null&&!document.getElementById("chat-output").classList.contains("hidden");if(!r){ASe(e);return}DSe(e,t?{...t,ptyRunning:R0(t).ptyRunning,turnStartedAt:t.ptyTurnStartedAt,lastActivityAt:t.ptyLastActivityAt}:null)}}function pw(){var e=window.getSelection&&window.getSelection();if(!e||e.isCollapsed)return!1;var t=document.getElementById("output");if(!t)return!1;var r=e.anchorNode;return r&&r.nodeType===3&&(r=r.parentNode),!!(r&&t.contains(r))}function eY(e){if(YQ(e)&&!e.metaKey){var t=qk(e);if(t){var r=O8e(e,t),n={...r,...rw(h.selectedId,r)};if(!JQ(t)&&!(r.ctrl&&t.length===1&&t.toLowerCase()==="c"&&pw())){var a=lM(t,n);a&&(e.preventDefault(),Q9(a,t))}}}}function W8e(){h.terminal&&Xke(500)}function V8e(e){var t=qg();if(!(!t||hr(t)||sM())&&t.status==="running"){if(e==="enter"){if(h.composerComposing||h.terminalComposing)return;var r=document.getElementById("input-box");h.terminalInteractive||MC(r?r.value:"",t.id)?Dm(void 0):Q9("\r","enter_text");return}Q9(lM(e,rw(t.id,{ctrl:!1,shift:!1})),e),W8e()}}function U8e(){var e=document.getElementById("terminal-shortcuts");if(e){var t=qg();e.hidden=!t||hr(t)||sM(),!e.hidden&&MSe(e,t.status!=="running",V8e,t.id)}}function G8e(){if(h.terminal&&h.terminal.element){var e=h.terminal.element.querySelector(".xterm-helper-textarea");e&&(e.readOnly=!!np())}}function K8e(){if(document.removeEventListener("keydown",eY,!0),h.terminal&&h.terminal.element){var e=h.terminal.element.querySelector(".xterm-helper-textarea");e&&(e.readOnly=!0)}}function lM(e,t){var r=t||{ctrl:!1,alt:!1,shift:!1};if(JQ(e))return"";var n=aC(e,r);if(n!==null)return n;if(e==="tab"&&r.shift)return"\x1B[Z";var a=P8e(e);if(a)return a;if(e.indexOf("ctrl_")===0)return String.fromCharCode(e.charCodeAt(e.length-1)-96);var o=Mg(e);if(o)return o;if(!e)return"";var l=e.length===1?e:"";return l?(r.shift&&(l=l.toUpperCase()),r.ctrl?R8e(l):r.alt?"\x1B"+l:l):""}function Mg(e){switch(e){case"yes":return"y\r";case"no":return"n\r";case"up":return"\x1B[A";case"down":return"\x1B[B";case"left":return"\x1B[D";case"right":return"\x1B[C";case"enter":return"\r";case"ctrl_c":return"";case"ctrl_d":return"";case"ctrl_l":return"\f";case"ctrl_u":return"";case"ctrl_k":return"\v";case"ctrl_w":return"";case"ctrl_z":return"";case"escape":return"\x1B";default:return""}}function X8e(){if(h.pendingMessages.length!==0){var e=qg();if(hr(e)){h.pendingMessages=[];return}var t=Date.now(),r=[],n=0;h.pendingMessages.forEach(function(o){if(typeof o=="string"){r.push(o);return}if(!(!o||typeof o.input!="string")){if(t-(o.at||0)>B8e){n++;return}r.push(o.input)}}),h.pendingMessages=[];var a=Promise.resolve();r.forEach(function(o){a=a.then(function(){return Q8e(o).catch(function(){})})})}}function Q8e(e){if(!e||!h.selectedId)return Promise.resolve();var t=h.selectedId;return an("/api/sessions/"+t+"/input",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,view:h.currentView})}).then(function(r){return r.ok?r.json():r.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(n){var a=KQ(n);if(a.httpStatus=r.status,XQ(a))return null;throw a})}).then(function(r){return r&&r.id&&(dr(r),r.id===h.selectedId&&(r.messages&&r.messages.length>0&&(h.currentMessages=r.messages),xa(!0))),r})}function Y9(){if(!(!h.selectedId||gk.has(h.selectedId))){var e=h.selectedId;return gk.add(e),Ga(),UI(My("stop.confirm.message"),{title:My("stop.confirm.title"),danger:!0,okLabel:My("stop.confirm.ok"),cancelLabel:My("stop.confirm.cancel")}).then(function(t){if(t&&h.selectedId===e){var r=h.sessions.find(function(a){return a.id===e});if(r){var n=hr(r)?an("/api/sessions/"+e+"/stop",{method:"POST",credentials:"same-origin"}).then(function(a){return jt(a)}).then(function(a){if(!a||a.id!==e)throw new Error("\u505C\u6B62\u56DE\u590D\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u4F1A\u8BDD\u72B6\u6001\u3002");dr(a)}):fa(Mg("ctrl_c"),"ctrl_c","chat",e);return n.then(function(){h.selectedId===e&&X9("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u56DE\u590D\u3002"),Yl()})}}}).catch(function(t){h.selectedId===e?Fi(Ua(t,"\u65E0\u6CD5\u505C\u6B62\u5F53\u524D\u56DE\u590D\u3002")):Ze(Ua(t,"\u65E0\u6CD5\u505C\u6B62\u539F\u4F1A\u8BDD\u7684\u56DE\u590D\u3002"),"error")}).finally(function(){gk.delete(e),Ga()})}}function uM(e){var t=h.sessions.find(function(n){return n.id===e}),r=t&&t.claudeSessionId;setTimeout(function(){an("/api/sessions/"+e,{method:"DELETE",credentials:"same-origin"}).then(function(n){return n.json()}).then(function(n){if(n&&n.error)throw new Error(n.error);return At.retain(new Set(h.sessions.filter(function(a){return a.id!==e}).map(function(a){return a.id}))),h.selectedId===e&&(iC(),h.selectedId=null,op()),r&&(h.claudeHistory=h.claudeHistory.filter(function(a){return a.claudeSessionId!==r}),h.codexHistory=h.codexHistory.filter(function(a){return a.claudeSessionId!==r})),Yl()}).catch(function(){Nk("\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002")})},250)}function Y8e(e,t){t&&t.classList.add("deleting"),setTimeout(function(){fetch("/api/claude-history/"+encodeURIComponent(e),{method:"DELETE",credentials:"same-origin"}).then(function(r){return r.json()}).then(function(r){if(r&&r.error)throw new Error(r.error);h.claudeHistory=h.claudeHistory.filter(function(n){return n.claudeSessionId!==e}),delete h.selectedClaudeHistoryIds[e],Bi()}).catch(function(){t&&t.classList.remove("deleting"),Nk("\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002")})},250)}function cM(e,t){Y8e(e,t)}var r9=!1;function dM(e){return!e||r9?Promise.resolve(null):(r9=!0,an("/api/sessions/"+encodeURIComponent(e)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Jl({mode:h.chatMode||h.config.defaultMode||"default"}))}).then(function(t){return t.json()}).then(function(t){return t.error?(Ze(t.error,"error"),null):t}).catch(function(t){var r=t&&t.message||"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002";return Ze(r,"error"),null}).finally(function(){r9=!1}))}function Cw(e){return!e||!e.id?Promise.resolve():(dr(e),Promise.resolve(Ln(e.id)))}function pM(e){return dM(e).then(function(t){return t?(t.claudeSessionId&&(t.provider==="codex"?h.codexHistory=h.codexHistory.filter(function(r){return r.claudeSessionId!==t.claudeSessionId}):h.claudeHistory=h.claudeHistory.filter(function(r){return r.claudeSessionId!==t.claudeSessionId})),Cw(t).then(function(){return t})):null})}function tY(e,t,r){return fetch("/api/"+e+"-sessions/"+encodeURIComponent(t)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Jl({mode:h.chatMode||h.config&&h.config.defaultMode||"default",cwd:r}))}).then(function(n){return n.json()}).then(function(n){return n.error?(Ze(n.error,"error"),null):n}).catch(function(n){return Ze(n&&n.message||"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002","error"),null})}function J8e(e,t){return tY("codex",e,t)}function Z8e(e,t){return tY("claude",e,t)}function fM(e,t,r){var n=e==="codex"?J8e(t,r):e==="claude"?Z8e(t,r):fetch("/api/"+encodeURIComponent(e)+"-sessions/"+encodeURIComponent(t)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({mode:h.chatMode||h.config&&h.config.defaultMode||"default",cwd:r})}).then(function(a){return a.json()}).then(function(a){if(a&&a.error)throw new Error(a.error);return a});return n.then(function(a){return!a||!a.id?null:(e==="codex"?h.codexHistory=h.codexHistory.filter(function(o){return o.claudeSessionId!==t}):e==="claude"&&(h.claudeHistory=h.claudeHistory.filter(function(o){return o.claudeSessionId!==t})),Cw(a).then(function(){return $i(),a}))})}function gC(e,t){return fetch("/api/"+encodeURIComponent(e)+"-history/"+encodeURIComponent(t),{method:"DELETE",credentials:"same-origin"}).then(function(r){return r.json()}).then(function(r){if(!r||r.ok!==!0)throw new Error(r&&r.error||"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002");return Bi(),r})}function mM(e){return fetch("/api/codex-history/"+encodeURIComponent(e),{method:"DELETE",credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!t||t.ok!==!0)throw new Error(t&&t.error||"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002");return h.codexHistory=h.codexHistory.filter(function(r){return r.claudeSessionId!==e}),Bi(),t})}function dc(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function Ql(e){if(!h.terminalInteractive){var t=document.getElementById("input-box");!t||!h.selectedId||document.activeElement!==t&&(e&&dc()||hM(t))}}function rY(){var e=document.querySelector(".input-panel");e&&e.style.removeProperty("--keyboard-offset")}function nY(e){if(e){var t=e.selectionStart,r=e.selectionEnd;Vk(e),typeof t=="number"&&typeof r=="number"&&e.setSelectionRange(t,r)}}function aY(e){!e||e.dataset.touchScrollBound==="true"||(e.dataset.touchScrollBound="true",e.addEventListener("touchstart",function(){e.scrollHeight<=e.clientHeight+1||(e.scrollTop<=0?e.scrollTop=1:e.scrollTop+e.clientHeight>=e.scrollHeight&&(e.scrollTop=Math.max(1,e.scrollHeight-e.clientHeight-1)))},{passive:!0}))}function iY(e){e&&(Ea(e),nY(e))}function e4e(e){var t=e&&e.target?e.target:document.getElementById("input-box");t&&(rY(),iY(t))}function t4e(e){var t=e&&e.target?e.target:document.getElementById("input-box");if(rY(),t&&Ea(t),!!dc()){HX(2200,t);var r=[80,200,380,620,900];r.forEach(function(n,a){setTimeout(function(){document.activeElement!==t&&($g(!1),t&&t.value&&Ea(t),a===1&&dc()&&(ao("keyboard-blur",{forceReplay:!0}),Wl("keyboard")))},n)})}}function r4e(e){e&&(e.setSelectionRange(e.value.length,e.value.length),nY(e))}function hM(e){e&&(e.focus({preventScroll:!0}),r4e(e))}function n4e(e){aY(e),iY(e)}function $y(e){n4e(e)}function a4e(e,t){if(!e||!t||document.activeElement!==t)return!1;var r=window.innerHeight-e.height-e.offsetTop;if(r<=50)return!1;var n=t.getBoundingClientRect();return n.bottom>e.offsetTop+e.height-12}function Vk(e){if(e){var t=e.scrollHeight>e.clientHeight+1;if(!t){e.scrollTop=0;return}e.scrollTop=e.scrollHeight}}function kK(){if(h.terminalInteractive){oY();return}if(!dc()){var e=document.getElementById("input-box");!e||!h.selectedId||document.activeElement===e||hM(e)}}function oY(){if(np()){Wk();return}var e=document.getElementById("output");e&&(e.setAttribute("tabindex","0"),e.focus(),h.terminal&&h.terminal.focus&&h.terminal.focus())}function i4e(){var e=document.querySelector(".input-panel"),t=document.querySelector(".chat-messages");if("virtualKeyboard"in navigator){var r=navigator.virtualKeyboard;r.addEventListener("geometrychange",function(){e&&e.style.removeProperty("padding-bottom")})}var n=document.getElementById("output");n&&n.addEventListener("click",function(){kK()}),t&&t.addEventListener("click",function(a){var o=a.target;o.tagName!=="A"&&o.tagName!=="BUTTON"&&!o.closest("button")&&!o.closest("[data-tool-toggle]")&&kK()}),document.addEventListener("click",function(a){if(dc()){var o=document.getElementById("input-box");if(!(!o||document.activeElement!==o)){var l=a.target;!l||typeof l.closest!="function"||l.closest(".input-panel")||o.blur()}}},!0)}function J9(){try{window.scrollTo(0,0)}catch{}document.scrollingElement&&(document.scrollingElement.scrollTop=0),document.documentElement&&(document.documentElement.scrollTop=0),document.body&&(document.body.scrollTop=0)}function o4e(){return sY().filter(function(e){return!!h.selectedSessionIds[e.id]}).map(function(e){return e.id})}function gM(){h.selectedSessionIds={},h.selectedClaudeHistoryIds={},h.selectedCodexHistoryIds={}}function vM(e){h.sessionsManageMode=typeof e=="boolean"?e:!h.sessionsManageMode,h.sessionsManageMode||gM(),Bi()}function sY(){return h.sessions.filter(function(e){return e.sessionSource!=="quick-terminal"})}function bM(){var e={};sY().forEach(function(t){e[t.id]=!0}),h.selectedSessionIds=e,h.selectedClaudeHistoryIds={},h.selectedCodexHistoryIds={},Bi()}function yM(){gM(),Bi()}function wM(e,t){if(!(!h.sessionsManageMode||!t)){var r=e==="history"?h.selectedClaudeHistoryIds:e==="codex"?h.selectedCodexHistoryIds:h.selectedSessionIds;r[t]?delete r[t]:r[t]=!0,Bi()}}function Sw(e,t){return UI(e,Object.assign({type:"danger",danger:!0,okLabel:"\u5220\u9664"},t||{}))}function xM(){var e=o4e(),t=e.length;t&&Sw("\u786E\u8BA4\u5220\u9664\u6240\u9009 "+t+" \u9879\u5417\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",{title:"\u5220\u9664\u6240\u9009 "+t+" \u9879"}).then(function(r){r&&fetch("/api/sessions/batch-delete",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:e})}).then(function(n){return jt(n)}).then(function(n){var a=n&&Array.isArray(n.failed)?n.failed:[];return a.length>0&&Nk("\u6709 "+a.length+" \u4E2A\u4F1A\u8BDD\u672A\u80FD\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u3002"),e.indexOf(h.selectedId)!==-1&&a.indexOf(h.selectedId)===-1&&(h.selectedId=null,op()),gM(),a.forEach(function(o){h.selectedSessionIds[o]=!0}),Yl()}).catch(function(n){Nk(Ua(n,"\u65E0\u6CD5\u6279\u91CF\u5220\u9664\u6240\u9009\u9879\u76EE\u3002"))})})}function CK(){return window.innerWidth<=768}function Bo(){return JK({width:window.innerWidth,height:window.innerHeight,coarsePointer:typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches})}function Wg(e){h.filePanelOpen=e;try{localStorage.setItem("wand-file-panel-open",String(h.filePanelOpen))}catch{}h.filePanelOpen&&Bo()&&(h.sessionsDrawerOpen=!1,Xr("wand-sidebar-open",!1)),Ul()}function EM(){Wg(!h.filePanelOpen)}function s4e(){Ka("layout:files")}function Ul(){xm(),s4e()}function l4e(e){Ka("layout:file-cwd")}function kM(){h.filePanelOpen&&Wg(!1)}function ym(e){Fw(h.terminalScale+e)}function Fw(e){var t=Math.max(.5,Math.min(2,e));if(t=Math.round(t*4)/4,t!==h.terminalScale){h.terminalScale=t;try{localStorage.setItem("wand-terminal-scale",String(t))}catch{}c4e()}}function u4e(e){if(!e||e.altKey||!(e.metaKey||e.ctrlKey)||h.currentView!=="terminal")return!1;var t=e.key==="="||e.key==="+"?.25:e.key==="-"||e.key==="_"?-.25:e.key==="0"?0:null;if(t===null)return!1;var r=e.target;return r&&r.closest&&r.closest("input, textarea, [contenteditable='true']")&&(!r.classList||!r.classList.contains("xterm-helper-textarea"))?!1:(e.preventDefault(),t===0?Fw(1):ym(t),!0)}function c4e(){if(!(!h.terminal||!h.terminal.element)){var e=h.terminalBaseFontSize*h.terminalScale,t=Math.max(1,Math.round(e));h.terminal.options.fontSize=t,requestAnimationFrame(function(){!h.terminal||!h.terminalFitAddon||ep(h.terminal,h.terminalFitAddon)})}}function CM(e){var t=document.getElementById("input-box");if(!t)return!1;var r=t.value||"",n=r&&!r.endsWith(" ")&&!r.endsWith(`
289
- `)?" ":"";t.value=r+n+e,t.dispatchEvent(new Event("input",{bubbles:!0}));try{t.focus(),t.setSelectionRange(t.value.length,t.value.length)}catch{}return!0}function SM(e){if(navigator.clipboard&&navigator.clipboard.writeText)return navigator.clipboard.writeText(e).then(function(){return!0}).catch(function(){return t()});return Promise.resolve(t());function t(){try{var r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select();var n=document.execCommand("copy");return document.body.removeChild(r),n}catch{return!1}}}function d4e(e){xSe(e)}function p4e(e,t){if(!(!h.selectedId||!e)){var r=h.selectedId+":"+e;if(h.toolContentCache[r]){t(null,h.toolContentCache[r]);return}fetch("/api/sessions/"+encodeURIComponent(h.selectedId)+"/tool-content/"+encodeURIComponent(e),{credentials:"same-origin"}).then(function(n){return jt(n)}).then(function(n){h.toolContentCache[r]=n,t(null,n)}).catch(function(n){if(n instanceof Ra){t(Ua(n,"\u52A0\u8F7D\u5931\u8D25")+"\uFF08HTTP "+n.status+"\uFF09",null);return}t(Ua(n,"\u52A0\u8F7D\u5931\u8D25"),null)})}}function f4e(e){var t=h.config&&h.config.cardDefaults&&h.config.cardDefaults[e];return e==="thinking"&&t==null?!0:!!t}function FM(e,t,r,n){if(!(!e||e.dataset.truncated!=="true"||e.dataset.loaded==="true")){var a=e.dataset.toolUseId;a&&(t&&(t.innerHTML='<div class="tool-content-loading">\u52A0\u8F7D\u4E2D\u2026</div>'),e.dataset.loaded="loading",p4e(a,function(o,l){if(o){t&&(t.innerHTML=n||'<div class="tool-content-error">\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5</div>'),e.dataset.loaded="";return}e.dataset.truncated="false",e.dataset.loaded="true";var u=typeof l.content=="string"?l.content:JSON.stringify(l.content);r(u,l)}))}}window.__tcToggle=function(e,t){var r=t.closest(".chat-tool-card")||t.closest(".inline-diff");if(r){var n=r.classList.contains("collapsed");r.classList.toggle("collapsed");var a=n;t.setAttribute("aria-expanded",a?"true":"false");var o=r.querySelector(".chat-tool-body, .diff-body");o&&o.setAttribute("aria-hidden",a?"false":"true");var l=r.dataset.expandKind||"tool-card";if(Vg(r,l),n){var u=r.querySelector(".tool-use-result");FM(r,u,function(d){u&&(u.innerHTML='<pre class="tool-use-result-content">'+cc(d)+"</pre>")},`<div class="tool-content-error" onclick="__tcToggle(null, this.closest('.chat-tool-card,.inline-diff').querySelector('.chat-tool-header,.diff-header'))">\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5</div>`)}}e&&(e.preventDefault(),e.stopPropagation())};window.__openAuthorSession=function(e){typeof e=="string"&&e&&Ln(e)};window.__thinkingToggle=function(e){var t=e.classList.contains("collapsed");e.classList.toggle("collapsed",!t),e.classList.toggle("expanded",t),Vg(e,"thinking")};window.__piExecutionOpen=function(e,t){e.preventDefault(),e.stopPropagation();let r=t.dataset.toolId;!h.selectedId||!r||!Di(["piExecution"])||Dd.open(h.selectedId,r,t)};window.__agentRunToggle=function(e,t){e&&(e.preventDefault(),e.stopPropagation());var r=t&&t.closest?t.closest(".agent-run"):null;if(r){var n=r.getAttribute("data-expanded")!=="true";AM(r,"agent-run",n),Vg(r,"agent-run"),qK(r)}};window.__agentRunSelect=function(e,t){var r=t&&t.closest?t.closest(".agent-run"):null;if(r){var n=Array.prototype.slice.call(r.querySelectorAll(".agent-run-agent"));if(n.length){var a=e&&e.type==="keydown"?String(e.key||""):"";if(a){if(a!=="ArrowLeft"&&a!=="ArrowRight"&&a!=="Home"&&a!=="End")return;e&&(e.preventDefault(),e.stopPropagation());var o=n.indexOf(t);o<0&&(o=0);var l=o;a==="ArrowLeft"?l=(o-1+n.length)%n.length:a==="ArrowRight"?l=(o+1)%n.length:a==="Home"?l=0:a==="End"&&(l=n.length-1);var u=n[l];SK(r,n,u);try{u.focus()}catch{}return}e&&e.stopPropagation(),SK(r,n,t)}}};function SK(e,t,r){if(!(!e||!r)){for(var n=r.getAttribute("data-agent-task-id")||"",a=e.getAttribute("data-agent-run-id")||"",o=0;o<t.length;o++){var l=t[o]===r;t[o].classList.toggle("is-selected",l),t[o].setAttribute("aria-selected",l?"true":"false"),t[o].setAttribute("tabindex",l?"0":"-1")}for(var u=e.querySelectorAll(".agent-run-detail-panel"),d=0;d<u.length;d++){var p=u[d].getAttribute("data-agent-task-id")===n;u[d].classList.toggle("is-selected",p),p?u[d].removeAttribute("hidden"):u[d].setAttribute("hidden","")}a&&n&&A4e(a,n),qK(e)}}window.__openFilePreview=function(e){e&&d4e(e)};window.__openImageViewer=function(e,t){e instanceof HTMLImageElement?PB(e):e&&zl.open(String(e),typeof t=="string"?t:"")};window.__inlineToolImageState=function(e,t){e&&_X(e,t==="error"?"error":"ready")};window.__inlineToolToggle=function(e){var t=e.classList.toggle("inline-tool-open");e.setAttribute("aria-expanded",t?"true":"false");var r=e.querySelector(".inline-tool-expanded"),n=e.querySelector(".inline-tool-expanded-inner");r&&(r.inert=!t,t?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden","true"));var a=e.querySelector(".inline-tool-status");a&&(e.dataset.status==="error"?a.textContent="\u2717":e.dataset.status==="done"&&(a.textContent="\u2713")),t&&FM(e,n,function(o){e.dataset.result=o,n&&(n.innerHTML='<div class="inline-tool-result">'+TX(o,"")+"</div>")}),Vg(e,"inline-tool")};window.__inlineToolKeydown=function(e,t){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),window.__inlineToolToggle(t))};window.__terminalExpand=function(e){var t=e.closest(".inline-terminal");if(t){var r=t.querySelector(".term-body");if(r){var n=r.style.display==="none";r.style.display=n?"block":"none",t.dataset.expanded=n?"true":"false",e.setAttribute("aria-expanded",n?"true":"false"),r.setAttribute("aria-hidden",n?"false":"true");var a=e.querySelector(".term-toggle-icon");if(a&&(a.textContent=n?"\u25BC":"\u25B6"),Vg(t,"terminal"),n){var o=r.querySelector(".term-output");FM(t,o,function(l){if(o){for(var u=l.split(`
290
- `),d="",p=0;p<u.length;p++)!u[p]&&p===u.length-1||(d+='<div class="term-line">'+cc(u[p])+"</div>");o.innerHTML=d}})}}}};window.__askSelect=function(e,t,r,n){var a=h.askUserSelections[e];if(a||(a={submitted:!1},h.askUserSelections[e]=a),!a.submitted){var o=a[t]||[];if(n){var l=o.indexOf(r);l===-1?o.push(r):o.splice(l,1)}else o=o[0]===r?[]:[r];a[t]=o,window.__askRender(e)}};window.__askRender=function(e){var t=document.querySelector('[data-tool-use-id="'+e+'"]');if(t){var r=h.askUserSelections[e]||{};t.querySelectorAll(".ask-user-option").forEach(function(l){var u=parseInt(l.dataset.questionIndex,10),d=parseInt(l.dataset.optionIndex,10),p=(r[u]||[]).indexOf(d)!==-1;l.classList.toggle("selected",p)});var n=t.querySelector(".ask-user-submit");if(n){var a=t.querySelectorAll(".ask-user-question-group"),o=!0;a.forEach(function(l,u){(!r[u]||r[u].length===0)&&(o=!1)}),n.disabled=!o||!!r.submitted,r.submitted&&(n.textContent="\u5DF2\u63D0\u4EA4...",n.classList.add("ask-user-submitted"))}}};window.__askSubmit=function(e){var t=h.askUserSelections[e];if(!(!t||t.submitted||!h.selectedId)){var r=document.querySelector('[data-tool-use-id="'+e+'"]');if(r){var n=r.querySelectorAll(".ask-user-question-group"),a=[],o=!0;if(n.forEach(function(u,d){var p=t[d]||[];if(p.length===0){o=!1;return}var m=[];p.forEach(function(v){var g=u.querySelector('[data-option-index="'+v+'"]');g&&m.push(g.dataset.optionLabel)}),a.push(m.join(", "))}),!!o){t.submitted=!0,window.__askRender(e);var l=a.join(`
291
- `);fetch("/api/sessions/"+h.selectedId+"/input",{method:"POST",headers:{"Content-Type":"application/json","X-Wand-Tool-Projection":"compact"},credentials:"same-origin",body:JSON.stringify({input:l+`
292
- `,view:h.currentView})}).catch(function(u){console.error("[wand] Error sending answer:",u),t.submitted=!1,window.__askRender(e)})}}}};var am=null;function m4e(){h.__globalListenersBound||(h.__globalListenersBound=!0,document.addEventListener("paste",function(e){jFe(e)&&e.stopPropagation()},!0),document.addEventListener("click",function(e){if(h.plusPopoverOpen){var t=document.getElementById("composer-plus-popover"),r=document.getElementById("attach-btn"),n=e.target;n&&typeof n.closest=="function"&&n.closest(".wand-composer-select-content")||t&&t.contains(e.target)||r&&r.contains(e.target)||Zd()}}),document.addEventListener("keydown",function(e){if(e.key==="Escape"&&h.plusPopoverOpen){var t=e.target;if(t&&typeof t.closest=="function"&&t.closest(".wand-composer-select-content"))return;e.preventDefault(),Zd(!0)}}),document.addEventListener("click",function(e){var t=e.target;!t||t.closest}),document.addEventListener("change",function(e){var t=e.target;if(!(!t||t.nodeType!==1)&&!(typeof t.matches!="function"||!t.matches("[data-mode-control]"))){var r=t.getAttribute("data-mode-control"),n=t.value;r==="mode"?RY(n):r==="model"?PY(n):r==="thinking"&&_Y(n),t.closest&&t.closest("#composer-plus-popover")&&Zd(!0)}}))}function h4e(){m4e(),am&&(am.disconnect(),am=null),UEe(),Zk($y),zy(document);var e=document.getElementById("login-button");if(e){e.addEventListener("click",i9);var t=document.getElementById("login-form");t&&t.addEventListener("submit",function(y){y.preventDefault(),i9()});var r=document.getElementById("login-switch-server-button");r&&r.addEventListener("click",xC);var n=document.getElementById("password");n&&(n.addEventListener("keydown",function(y){y.key==="Enter"&&i9()}),n.addEventListener("input",function(){n.dataset.error="false",n.setAttribute("aria-invalid","false");var y=document.getElementById("login-error");y&&vQ(y)}),n.focus());return}var a=document.getElementById("send-input-button");a&&a.addEventListener("click",function(){if($i(),f8e()==="running"){Y9();return}i8e()});var o=document.getElementById("input-box");if(o){h.composerCompositionTarget!==o&&(h.composerCompositionGeneration+=1,h.composerCompositionTarget=o,h.composerComposing=!1,h.terminalComposing=!1),aY(o),o.addEventListener("keydown",CFe),o.addEventListener("paste",_Fe),o.addEventListener("input",function(y){h.terminalComposing||_K(o,y)||(Em(o.value,!0),$y(o),AI())}),o.addEventListener("compositionstart",function(){h.composerCompositionGeneration+=1,h.composerCompositionTarget=o,h.composerComposing=!0,h.terminalComposing=!!h.terminalInteractive}),o.addEventListener("compositionend",function(){var y=h.composerCompositionGeneration,E=h.terminalComposing;setTimeout(function(){if(y===h.composerCompositionGeneration){if(!o.isConnected){h.composerCompositionTarget===o&&(h.composerCompositionTarget=null),h.terminalComposing=!1,h.composerComposing=!1;return}E&&(h.terminalComposing=!1,h.terminalInteractive?_K(o):($y(o),Em(o.value,!0),km(o))),h.composerComposing=!1}},0)}),o.addEventListener("focus",function(){$i(),e4e({target:o})}),o.addEventListener("blur",t4e),$y(o);var l=o.closest(".composer-input-wrap");if(l&&typeof ResizeObserver<"u"){var u=-1;am=new ResizeObserver(function(y){if(!o.isConnected){am?.disconnect(),am=null;return}var E=y[0]?y[0].contentRect.width:l.getBoundingClientRect().width;E<=0||Math.abs(E-u)<.5||(u=E,$y(o))}),am.observe(l)}}var d=document.getElementById("attach-btn"),p=document.getElementById("file-upload-input"),m=document.getElementById("composer-plus-popover");d&&m&&(d.addEventListener("click",function(y){y.stopPropagation(),yFe(y.detail===0)}),m.addEventListener("keydown",function(y){var E=y.target;if(!(y.target instanceof HTMLSelectElement||y.target instanceof HTMLInputElement||E.matches('[role="combobox"], .wand-ui-select-trigger, .wand-ui-select-search-input')||typeof E.closest=="function"&&E.closest(".wand-composer-select-content"))&&["ArrowDown","ArrowUp","Home","End"].includes(y.key)){var S=Array.from(m.querySelectorAll('button:not([disabled]):not(.hidden), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(function(C){return C.getClientRects().length>0});if(S.length){y.preventDefault();var F=S.indexOf(document.activeElement),$=y.key==="Home"?0:y.key==="End"?S.length-1:y.key==="ArrowUp"?F<=0?S.length-1:F-1:(F+1)%S.length;S[$]?.focus()}}})),p&&p.addEventListener("change",function(){var y=p.files;y&&rI(y),p.value=""});var v=document.getElementById("prompt-optimize-btn");v&&(v.addEventListener("pointerdown",function(y){y.preventDefault()}),v.addEventListener("click",function(){Zd(),NFe()}));var g=document.querySelector(".input-composer");g&&(g.addEventListener("dragover",function(y){y.preventDefault(),y.stopPropagation(),g.classList.add("drag-over")}),g.addEventListener("dragleave",function(y){y.preventDefault(),y.stopPropagation(),g.classList.remove("drag-over")}),g.addEventListener("drop",function(y){y.preventDefault(),y.stopPropagation(),g.classList.remove("drag-over");var E=y.dataTransfer&&y.dataTransfer.files;E&&rI(E)}));var b=document.getElementById("terminal-jump-bottom");b&&b.addEventListener("click",function(){Wl("force")});var x=document.getElementById("chat-unread-bubble");x&&x.addEventListener("click",function(){v4e(!0)}),Js(),i4e(),pke(),k8e(),kn()}function Gl(){var e=document.getElementById("chat-output");return e?.querySelector(".chat-messages")||null}function $M(e){var t=e||Gl();return t?Math.abs(t.scrollTop)<h.chatScrollThreshold:!0}function vC(e){e=e||{};var t=h.chatUnreadCount>0||h.chatUnreadStartIndex>=0;if(h.chatUnreadCount=0,h.chatUnreadStartIndex=-1,e.removeDivider!==!1){var r=Gl();if(r){var n=r.querySelector(".chat-unread-divider");n&&n.parentNode&&n.parentNode.removeChild(n)}}t&&Qs()}function g4e(e){if(e||(e=Gl()),!!e){var t=e.querySelector(".chat-unread-divider");if(h.chatUnreadStartIndex<0||h.chatUnreadCount<=0){t&&t.parentNode&&t.parentNode.removeChild(t);return}for(var r=h.chatUnreadStartIndex,n=e.querySelectorAll(".chat-message"),a=null,o=0;o<n.length;o++){var l=n[o].getAttribute("data-msg-index");if(l!==null){var u=parseInt(l,10);if(!isNaN(u)&&u<r){a=n[o];break}}}var d=h.chatUnreadCount+" \u6761\u65B0\u6D88\u606F";t||(t=document.createElement("div"),t.className="chat-unread-divider",t.setAttribute("role","separator"),t.innerHTML='<span class="chat-unread-divider-line"></span><span class="chat-unread-divider-label"></span><span class="chat-unread-divider-line"></span>'),t.querySelector(".chat-unread-divider-label").textContent=d,a?(t.nextSibling!==a||t.parentNode!==e)&&e.insertBefore(t,a):(t.parentNode!==e||t.nextSibling!==null)&&e.appendChild(t)}}function Qs(){var e=document.getElementById("chat-unread-bubble");if(e){var t=h.sessions.find(function(u){return u.id===h.selectedId}),r=!$M(),n=!!t&&h.currentView==="chat"&&r;e.classList.toggle("visible",n),e.classList.toggle("has-unread",h.chatUnreadCount>0);var a=e.querySelector(".chat-unread-bubble-count");a&&(h.chatUnreadCount>0?(a.textContent=h.chatUnreadCount>99?"99+":String(h.chatUnreadCount),a.classList.add("visible")):(a.textContent="",a.classList.remove("visible")));var o=h.chatUnreadCount>0?h.chatUnreadCount+" \u6761\u65B0\u6D88\u606F\uFF0C\u70B9\u51FB\u67E5\u770B":"\u56DE\u5230\u6700\u65B0\u6D88\u606F";e.setAttribute("aria-label",o),e.setAttribute("title",o);var l=document.getElementById("chat-output");l&&l.classList.toggle("has-jump-btn",n)}}function v4e(e){var t=Gl();if(!(!t||!t.isConnected)){h.chatIsProgrammaticScroll=!0;var r=function(){h.chatIsProgrammaticScroll=!1,h.chatStickToBottom=!0,vC({removeDivider:!0}),Qs()};if(e&&typeof t.scrollTo=="function"){t.scrollTo({top:0,behavior:"smooth"}),setTimeout(r,260);return}t.scrollTop=0,requestAnimationFrame(r)}}function lY(){var e=Gl();h.chatStickToBottom=!0,vC({removeDivider:!0}),e&&e.isConnected&&(h.chatIsProgrammaticScroll=!0,h.chatProgrammaticScrollUntil=Date.now()+180,e.scrollTop=0,requestAnimationFrame(function(){h.chatIsProgrammaticScroll=!1})),Qs()}function b4e(e){if(e!==Gl())return;let t=h.selectedId;h.chatStickToBottom=!1,h.chatIsProgrammaticScroll=!0,h.chatProgrammaticScrollUntil=0,requestAnimationFrame(()=>{h.selectedId===t&&Gl()===e&&(h.chatIsProgrammaticScroll=!1,Qs())})}function uY(){var e=Gl();if(!e||!e.isConnected)return;if(h.chatScrollElement===e&&h.chatScrollHandler){Qs();return}h.chatScrollElement&&(h.chatScrollHandler&&h.chatScrollElement.removeEventListener("scroll",h.chatScrollHandler),h.chatScrollWheelHandler&&h.chatScrollElement.removeEventListener("wheel",h.chatScrollWheelHandler),h.chatScrollTouchStartHandler&&h.chatScrollElement.removeEventListener("touchstart",h.chatScrollTouchStartHandler),h.chatScrollTouchMoveHandler&&h.chatScrollElement.removeEventListener("touchmove",h.chatScrollTouchMoveHandler)),h.chatScrollElement=e;function t(){h.chatStickToBottom=!1,e.querySelector(".chat-history-summary")&&xa(!0),Qs()}h.chatScrollHandler=function(){if(e.isConnected){if(Uk(),h.chatIsProgrammaticScroll||Date.now()<h.chatProgrammaticScrollUntil){Qs();return}var r=$M(e);if(r)h.chatStickToBottom=!0,vC({removeDivider:!0});else{t();return}Qs()}},h.chatScrollWheelHandler=function(r){h.chatIsProgrammaticScroll||r.deltaY<0&&t()},h.chatScrollTouchStartHandler=function(r){!r.touches||r.touches.length===0||(h.chatTouchStartY=r.touches[0].clientY)},h.chatScrollTouchMoveHandler=function(r){if(!h.chatIsProgrammaticScroll&&!(!r.touches||r.touches.length===0)){var n=r.touches[0].clientY-h.chatTouchStartY;n>4&&t()}},e.addEventListener("scroll",h.chatScrollHandler,{passive:!0}),e.addEventListener("wheel",h.chatScrollWheelHandler,{passive:!0}),e.addEventListener("touchstart",h.chatScrollTouchStartHandler,{passive:!0}),e.addEventListener("touchmove",h.chatScrollTouchMoveHandler,{passive:!0}),Qs()}var n9=new Hxe;function cY(e=!1){var t=h.sessions.find(function(o){return o.id===h.selectedId});if(!(!t||h.currentView!=="chat")){var r=t.id+":"+(h.chatRenderEpoch||0),n=h.chatRenderedCount<h.currentMessages.length,a=n?"local:"+h.chatRenderedCount+":"+h.currentMessages.length:"server:"+(t.messageOffset||0)+":"+(t.leadingBlockOffset||0);n9.canAttempt(r,a,e)&&(n?(n9.attempted(r,a),h.chatRenderedCount=Math.min(h.currentMessages.length,h.chatRenderedCount+h.chatPageSize),xa(!0)):(t.messageOffset>0||t.leadingBlockOffset>0)&&gFe()&&n9.attempted(r,a))}}function Uk(){if(!(document.hidden||h.currentView!=="chat")){var e=Gl();!e?.isConnected||!document.getElementById("chat-load-more-sentinel")||Lxe(e)&&cY()}}var fm=null;function dY(){fm!==null&&cancelAnimationFrame(fm);var e=h.selectedId,t=h.chatRenderEpoch||0;fm=requestAnimationFrame(function(){fm=null,h.selectedId===e&&(h.chatRenderEpoch||0)===t&&Uk()})}document.addEventListener("visibilitychange",function(){document.hidden||dY()});function FK(e,t,r){if(!(h.selectedId!==e||(h.chatRenderEpoch||0)!==t)){var n=document.getElementById("chat-load-more-sentinel"),a=n?.querySelector(".chat-load-more-btn");!n||!a||(n.dataset.historyLoad=r,HK(a,r==="loading"?"\u6B63\u5728\u52A0\u8F7D\u66F4\u65E9\u5185\u5BB9\u2026":r==="failed"?"\u52A0\u8F7D\u5931\u8D25 \xB7 \u70B9\u51FB\u91CD\u8BD5":"\u52A0\u8F7D\u66F4\u65E9\u7684\u6D88\u606F",!1),a.setAttribute("aria-busy",String(r==="loading")),r==="idle"&&dY())}}var Dy=null,ek=null;function y4e(){fm!==null&&(cancelAnimationFrame(fm),fm=null),Dy?.disconnect(),Dy=null,ek?.disconnect(),ek=null;var e=document.getElementById("chat-load-more-sentinel"),t=Gl();if(!(!e||!t)){var r=e.querySelector(".chat-load-more-btn");r&&(r.onclick=function(){cY(!0)});var n=h.selectedId,a=h.chatRenderEpoch||0,o=function(){return h.selectedId===n&&(h.chatRenderEpoch||0)===a&&t.isConnected&&e.isConnected&&document.getElementById("chat-load-more-sentinel")===e},l=function(){Dy?.disconnect(),!(!o()||t.clientHeight<=0)&&(typeof IntersectionObserver<"u"&&(Dy=new IntersectionObserver(function(u){o()&&u.some(function(d){return d.isIntersecting})&&Uk()},{root:t,rootMargin:v$(t.clientHeight)}),Dy.observe(e)),Uk())};l(),typeof ResizeObserver<"u"&&(ek=new ResizeObserver(l),ek.observe(t))}}function op(){try{h.selectedId?localStorage.setItem("wand-selected-session",h.selectedId):localStorage.removeItem("wand-selected-session")}catch{}}function DM(e){return e&&Array.isArray(e.queuedMessages)?e.queuedMessages:h.structuredInputQueue}function w4e(){var e=h.sessions.find(function(t){return t.id===h.selectedId});return DM(e)}function bC(e){var t=DM(e);h.structuredInputQueue=Array.isArray(t)?t.slice():[]}function pY(e,t){return!!(e&&Array.isArray(e.content)&&e.content.some(function(r){return r&&typeof r=="object"&&r[t]}))}function x4e(e){return!!(e&&e.role==="user"&&pY(e,"__queued"))}function E4e(e){return!!(e&&e.role==="assistant"&&pY(e,"__processing"))}function yC(e){if(!Array.isArray(e))return[];for(var t=!1,r=[],n=0;n<e.length;n++){var a=e[n];if(x4e(a)||E4e(a)){t=!0;continue}r.push(a)}return t?r:e}function k4e(e,t){if(!e||!Array.isArray(e.messages))return e;var r=e.sessionKind||t&&t.sessionKind;if(r!=="structured")return e;var n=yC(e.messages);return n===e.messages?e:Object.assign({},e,{messages:n})}function fY(){try{if(!h.selectedId)return;var e=w4e();if(e.length===0){Gk(h.selectedId);return}localStorage.setItem("wand-structured-queue",JSON.stringify({sessionId:h.selectedId,items:e}))}catch{}}function Gk(e){try{var t=localStorage.getItem("wand-structured-queue");if(!t)return;var r=JSON.parse(t);(!e||!r||r.sessionId===e)&&localStorage.removeItem("wand-structured-queue")}catch{localStorage.removeItem("wand-structured-queue")}}function mY(){var e=h.sessions.find(function(n){return n.id===h.selectedId});if(e&&Array.isArray(e.queuedMessages)){bC(e),fY();return}if(e&&e.status!=="running"){h.structuredInputQueue=[],Gk(e.id);return}try{var t=localStorage.getItem("wand-structured-queue");if(!t)return;var r=JSON.parse(t);if(!r||r.sessionId!==h.selectedId||!Array.isArray(r.items))return;h.structuredInputQueue=r.items.slice(0,10)}catch{h.structuredInputQueue=[]}}function pc(){try{if(h.crossSessionQueue.length===0){localStorage.removeItem("wand-cross-session-queue");return}localStorage.setItem("wand-cross-session-queue",JSON.stringify(h.crossSessionQueue))}catch{}}function C4e(){return h.config&&h.config.defaultCwd||"/tmp"}function hY(){try{var e=localStorage.getItem(u9);if(!e)return{};var t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function S4e(e){try{if(!e||Object.keys(e).length===0){localStorage.removeItem(u9);return}localStorage.setItem(u9,JSON.stringify(e))}catch{}}function F4e(){var e=h.selectedId;if(!e)return{};var t=hY(),r=t[e];return r&&typeof r=="object"?r:{}}function gY(e){if(!e||!h.selectedId)return null;var t=F4e();return typeof t[e]=="boolean"?t[e]:null}function vY(e,t){if(!(!e||!h.selectedId)){var r=hY(),n=h.selectedId,a=r[n];(!a||typeof a!="object")&&(a={}),a[e]=!!t,r[n]=a,S4e(r)}}var Z9="wand-agent-run-selection-v1";function $4e(){try{var e=localStorage.getItem(Z9);if(!e)return{};var t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function D4e(e){try{if(!e||Object.keys(e).length===0){localStorage.removeItem(Z9);return}localStorage.setItem(Z9,JSON.stringify(e))}catch{}}function A4e(e,t){if(!(!e||!t||!h.selectedId)){var r=$4e(),n=h.selectedId,a=r[n];(!a||typeof a!="object")&&(a={}),a[e]=t,r[n]=a,D4e(r)}}function B4e(e,t){return e?e.uuid?"msg:"+e.uuid:e.id?"msg:"+e.id:e.messageId?"msg:"+e.messageId:e.turnId?"msg:"+e.turnId:"msg:"+(typeof t=="number"?t:0):"msg:unknown-"+(typeof t=="number"?t:0)}function I4e(e,t){for(var r=[],n=0;n<t.length;n++){var a=t[n];a==null||a===""||r.push(String(a))}return e+":"+r.join(":")}function bY(e){return!e||!e.dataset?"":e.dataset.expandKey||""}function M4e(e,t){if(!e)return!1;switch(t){case"tool-card":case"diff":return!e.classList.contains("collapsed");case"thinking":return e.classList.contains("expanded")&&!e.classList.contains("collapsed");case"inline-tool":return e.classList.contains("inline-tool-open");case"terminal":{var r=e.querySelector(".term-body");return r?r.style.display!=="none":e.dataset.expanded==="true"}case"agent-run":return e.getAttribute("data-expanded")==="true";case"activity":return e.getAttribute("data-expanded")==="true";default:return!1}}function AM(e,t,r){if(e)switch(t){case"tool-card":case"diff":{e.classList.toggle("collapsed",!r);break}case"thinking":{e.classList.toggle("collapsed",!r),e.classList.toggle("expanded",!!r);break}case"inline-tool":{e.classList.toggle("inline-tool-open",!!r),e.setAttribute("aria-expanded",r?"true":"false");var n=e.querySelector(".inline-tool-expanded");n&&(n.toggleAttribute("inert",!r),r?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden","true"));break}case"terminal":{var a=e.querySelector(".term-body");a&&(a.style.display=r?"block":"none"),e.dataset.expanded=r?"true":"false";var o=e.querySelector(".term-toggle-icon");o&&(o.textContent=r?"\u25BC":"\u25B6");break}case"activity":{e.setAttribute("data-expanded",r?"true":"false");var l=e.querySelector(".chat-activity-menu");l&&(l.toggleAttribute("inert",!r),r?l.removeAttribute("aria-hidden"):l.setAttribute("aria-hidden","true"));var u=e.querySelector(".chat-process-summary");u&&u.setAttribute("aria-expanded",r?"true":"false");break}case"agent-run":{e.setAttribute("data-expanded",r?"true":"false");var d=e.querySelector(".agent-run-summary");d&&d.setAttribute("aria-expanded",r?"true":"false");var p=e.querySelector(".agent-run-body");p&&p.setAttribute("aria-hidden",r?"false":"true");break}}}function Vg(e,t){var r=bY(e);r&&vY(r,M4e(e,t))}function T4e(e){!e||!h.selectedId||e.querySelectorAll("[data-expand-key]").forEach(function(t){var r=bY(t),n=t.dataset.expandKind||"",a=gY(r);a===null||!n||AM(t,n,a)})}var j4e=new Set(["ready","checking","merging","merged","failed"]),om=null;function im(e){return typeof e!="string"?void 0:e.trim()||void 0}function _4e(e){return typeof e=="string"&&j4e.has(e)?e:void 0}function N4e(e,t){if(!e)return null;let r=im(e.id);if(!r)return null;let n=ya(e.worktree)?e.worktree:{},a=ya(e.worktreeMergeInfo)?e.worktreeMergeInfo:{},o=im(n.branch)??im(e.worktreeBranch),l=im(n.path)??im(e.worktreePath),u=im(a.targetBranch),d=im(e.status),p=_4e(e.worktreeMergeStatus),m=p==="merged"&&a.cleanupDone===!1;return{sessionId:r,intent:t??(m?"cleanup":"merge"),...o?{sourceBranch:o}:{},...l?{worktreePath:l}:{},...u?{targetBranch:u}:{},...d?{sessionStatus:d}:{},...p?{mergeStatus:p}:{},cleanupPending:m}}function yY(){return Di(["worktreeMerge"])}function $K(e,t){let r=t instanceof Error&&t.message?`\uFF1A${t.message}`:"";e.toast(`Worktree \u5DF2\u66F4\u65B0\uFF0C\u4F46\u4F1A\u8BDD\u5217\u8868\u5237\u65B0\u5931\u8D25${r}`,"error")}function P4e(e,t){try{Promise.resolve(e.refreshSessions(t)).catch(r=>{$K(e,r)})}catch(r){$K(e,r)}}function R4e(e){return{onOpen(t){yY(),e.onOpen?.(t)},onClose(t){e.onClose?.(t)},onRepositoryChanged(t){P4e(e,t)},toast(t,r){e.toast(t,r)}}}function BM(e){if(om?.dependencies===e)return om.dispose;om?.dispose();let t=G$(R4e(e)),r=!1,n={dependencies:e,dispose(){r||(r=!0,t(),om===n&&(om=null))}};return om=n,n.dispose}function wY(e,t){let r=om,n=e.trim();return!r||!n||!$m(()=>{DK(r,n,t)})?!1:DK(r,n,t)}function DK(e,t,r){if(!yY())return!1;let n=N4e(e.dependencies.getSession(t),r);return n?yd.open(n)?!0:(e.dependencies.toast("Worktree \u5408\u5E76\u754C\u9762\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002","error"),!1):(e.dependencies.toast("\u672A\u627E\u5230\u53EF\u64CD\u4F5C\u7684 worktree \u4F1A\u8BDD\u3002","error"),!1)}var O4e=Object.freeze({revision:0,mounts:Object.freeze([])}),z4e=class{constructor(){ie(this,"snapshot",O4e),ie(this,"listeners",new Set),ie(this,"subscribe",e=>(this.listeners.add(e),()=>this.listeners.delete(e))),ie(this,"getSnapshot",()=>this.snapshot)}sync(e){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let t of this.listeners)t()}clear(){this.snapshot.mounts.length!==0&&this.sync([])}},Ug=new z4e;function L4e(e){return e==="mode"||e==="model"||e==="thinking"||e==="tool"}function H4e(e){return e==="mode"||e==="runtime"||e==="all"||e==="dropdown"}function q4e(e){let t=[];document.querySelectorAll("[data-composer-select-host]").forEach((r,n)=>{let a=r.dataset.modeControl,o=r.dataset.composerSelectScope;if(!L4e(a)||!H4e(o)||!r.isConnected)return;let l=e.resolve(a,o);t.push({key:r.dataset.composerSelectKey||`${o}-${a}-${n}`,target:r,control:a,scope:o,value:l.value,options:l.options,ariaLabel:l.ariaLabel,placeholder:l.placeholder,displayValue:l.displayValue,displayTitle:l.displayTitle,disabled:l.disabled,align:a==="mode"?"start":"end",onValueChange(u){e.onValueChange(a,u,o)}})}),Ug.sync(t)}function W4e(e,t){return e.groupTitle===t.groupTitle&&e.modeLabel===t.modeLabel&&e.modelFullLabel===t.modelFullLabel&&e.modelRefreshing===t.modelRefreshing&&e.thinkingValue===t.thinkingValue&&e.thinkingLabel===t.thinkingLabel&&e.toolVisible===t.toolVisible&&e.toolStatus===t.toolStatus&&e.toolDisabled===t.toolDisabled}function V4e(e,t){return e.target===t.target&&e.scope===t.scope&&W4e(e,t)}var U4e=class extends vl{constructor(){super(V4e)}},Gg=new U4e;function G4e(e){return e==="mode"||e==="runtime"||e==="all"}function K4e(e){ww({selector:"[data-composer-config-host]",store:Gg,flush:!0,build(t){let r=t.dataset.composerConfigHost;return G4e(r)?{key:`composer-config-${r}`,target:t,scope:r,...e.resolve(r),onRefreshModels:e.onRefreshModels}:null}})}function X4e(e){ww({selector:"[data-composer-attachments-host]",store:DE,build(t){let r=e.resolve();return r.length===0?null:{key:"composer-attachments",target:t,items:r,onRemove:e.onRemove}}})}function xY(e){return e==="default"?"":e||""}function Q4e(e,t,r){let n=e||r;return t.some(a=>a.value===n)?n:r}var a9="default";function EY(e){let t=e.split(/\s+·\s+/);return t.length>1&&t[0].trim().toLocaleLowerCase()===t[1].trim().toLocaleLowerCase()&&t.splice(1,1),t.join(" \xB7 ")}var Y4e=/^跟随.*默认$/,J4e=/\s*[((][^(())]*默认[^(())]*[))]\s*$/;function Z4e(e,t,r){let n=(e??"").trim();if(n&&n!==a9)return n===Nd?Rd:(t.find(l=>l.id===n)?.label??"").trim()||(Pd(n)?"\u6A21\u578B\u5206\u7EC4":Gu(n)?ig:n);let a=(r??"").trim();if(a&&a!==a9)return a===Nd?Rd:(t.find(l=>l.id===a)?.label??"").trim()||(Pd(a)?"\u6A21\u578B\u5206\u7EC4":Gu(a)?ig:a);let o=(t.find(l=>l.id===a9)?.label??"").trim().replace(J4e,"").trim();return Y4e.test(o)?"":o}function kY(e,t=0){return!!e&&e.sessionKind==="structured"&&e.status==="idle"&&!e.archived&&!e.structuredState?.inFlight&&!e.claudeSessionId&&!e.resumedFromSessionId&&!e.autoRecovered&&!e.automationId&&(!e.sessionSource||e.sessionSource==="interactive")&&!(e.messages?.length||e.messageCount||e.messageTotal||t)&&!e.queuedMessages?.length}function eI(e){return e3(e?.provider,e?.structuredState?.engine==="core"?"sdk":"cli")}var wm=$Ee(),tk=new Map,wC=FD();async function Kk(e){if(!e||!wC.isLoaded(e.id)||h.selectedId!==e.id||document.visibilityState!=="visible"||!Yi(e)||!document.getElementById(h.currentView==="chat"?"chat-output":"output")?.getClientRects().length||Array.from(document.querySelectorAll('[role="dialog"][aria-modal="true"]')).some(r=>r.getClientRects().length>0))return;let t=e.completionRevision;if(tk.get(e.id)!==t){tk.set(e.id,t);try{let r=await fetch("/api/sessions/"+encodeURIComponent(e.id)+"/completion/view",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({completionRevision:t})}),n=await jt(r);dr({id:e.id,completionRevision:n.completionRevision,viewedCompletionRevision:n.viewedCompletionRevision},"latest"),Bi(),Xi()}catch{}finally{tk.get(e.id)===t&&tk.delete(e.id)}}}function AK(e){return e?[e.sessionSource??"",e.status??"",e.title??"",e.titleGenerating===!0?"1":"0",e.archived===!0?"1":"0",e.employeeId??"",e.employeeName??"",e.teamChat?"1":"0",e.teamStep?.title??""].join(""):""}function eFe(){var e=document.getElementById("login-cert-hint");e&&e.classList.remove("hidden");var t=document.getElementById("login-cert-http-link");t&&(t.href="http://"+location.host+location.pathname,t.style.display=location.protocol==="https:"?"":"none")}function tFe(){var e=document.getElementById("login-cert-hint");e&&e.classList.add("hidden")}function tI(){h.loginLockTicker||(h.loginLockTicker=setTimeout(function(){h.loginLockTicker=0;var e=document.getElementById("login-button"),t=document.getElementById("login-error"),r=Math.ceil((h.loginLockUntil-Date.now())/1e3);if(r>0){if(tI(),h.loginPending||!e)return;e.disabled=!0,e.textContent="\u8BF7\u7B49\u5F85 "+r+"s",t&&Yy(t,"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7B49\u5F85 "+r+" \u79D2\u3002");return}h.loginLockUntil=0,e&&(e.disabled=!1,e.textContent="\u8FDB\u5165\u63A7\u5236\u53F0"),t&&Yy(t,"\u73B0\u5728\u53EF\u4EE5\u518D\u8BD5\u4E00\u6B21\u4E86\u3002")},1e3))}function i9(){var e=document.getElementById("password"),t=document.getElementById("login-button"),r=document.getElementById("login-error");if(!(!e||!t||!r)){var n=Math.ceil((h.loginLockUntil-Date.now())/1e3);if(n>0){Yy(r,"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7B49\u5F85 "+n+" \u79D2\u3002"),tI();return}if(!h.loginPending){vQ(r),tFe(),e.dataset.error="false",e.setAttribute("aria-invalid","false"),h.loginPending=!0,t.disabled=!0,t.textContent="\u767B\u5F55\u4E2D...";var a=e.value;p2e(e,a),d2e(a).then(function(o){if(!o.ok){o.retryAfterMs&&(h.loginLockUntil=Date.now()+o.retryAfterMs,tI()),o.kind==="cookie-not-stored"&&location.protocol==="https:"&&eFe(),o.credentialInvalid&&(e.dataset.error="true",e.setAttribute("aria-invalid","true")),Yy(r,o.message);return}return h.config=o.config,Aw(h.config),Yl().then(function(){cQ(),dm()})}).catch(function(o){Yy(r,"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}).finally(function(){if(h.loginPending=!1,h.loginLockUntil>Date.now()){t.disabled=!0;return}h.loginLockUntil=0,t.disabled=!1,t.textContent="\u8FDB\u5165\u63A7\u5236\u53F0"})}}}function CY(){return typeof WandNative<"u"&&typeof WandNative.switchServer=="function"}function xC(){if(CY())try{WandNative.switchServer()}catch{}}function IM(){try{if(typeof WandNative<"u"&&typeof WandNative.backToNative=="function"){WandNative.backToNative();return}typeof window.__wandBackToNative=="function"&&window.__wandBackToNative()}catch{}}function SY(){Ek(),wm.reset(),z1(),f$(),gCe(),Bg.clear(),fQ(),eM(),bm(!1),vw(),h.config=null,h.selectedId=null,op(),h.sessions=[],h.claudeHistory=[],h.claudeHistoryLoaded=!1,h.claudeHistoryExpanded=!1,h.claudeHistoryExpandedDirs={},h.sessionsDrawerOpen=!1,Xr("wand-sidebar-open",!1),dm()}async function MM(){var e;try{e=await fetch("/api/logout",{method:"POST",credentials:"same-origin"})}catch(t){Ze(Ua(t,"\u6CE8\u9500\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002"),"error");return}if(!e.ok){Ze("\u6CE8\u9500\u5931\u8D25\uFF08HTTP "+e.status+"\uFF09\uFF0C\u8BF7\u91CD\u8BD5\u3002","error");return}SY()}function rFe(){SY()}function Yl(){return Ai()}function BK(e){return e==="full-access"?"\u5B8C\u5168\u8BBF\u95EE":e==="default"?"\u9ED8\u8BA4":e==="native"?"\u539F\u751F":e==="auto-edit"?"\u81EA\u52A8\u7F16\u8F91":e==="managed"?"\u6258\u7BA1":e}function ap(){return h.sessionTool||h.preferredCommand||"claude"}var FY="Enter \u53D1\u9001 \xB7 Shift+Enter \u6362\u884C";function $Y(e,t){return Ns(e)?WD:t?"\u952E\u76D8\u8F93\u5165\u76F4\u901A\u7EC8\u7AEF \xB7 Enter \u63D0\u4EA4":e&&(e.status==="exited"||e.status==="failed"||e.status==="stopped")?kw(e)?"\u8F93\u5165\u6D88\u606F\u4EE5\u7EE7\u7EED\u4F1A\u8BDD":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F":hr(e)&&e.structuredState&&e.structuredState.inFlight?"\u56DE\u590D\u4E2D\uFF0C\u53EF\u7EE7\u7EED\u8F93\u5165":document.documentElement.classList.contains("is-wand-app")?"\u6253\u5B57\u6216\u6309\u4F4F\u8BF4\u8BDD":"\u8F93\u5165\u6D88\u606F\u2026"}function DY(e){return e==="codex"?["full-access"]:e==="opencode"||e==="grok"?["default","full-access","managed"]:e==="qoder"?["default","full-access","auto-edit","managed"]:["default","full-access","auto-edit","native","managed"]}function ip(e,t){var r=DY(e);if(r.indexOf(t)!==-1)return t;var n=h.config&&h.config.defaultMode?h.config.defaultMode:"default";return r.indexOf(n)!==-1?n:r[0]}function AY(e){return e?hr(e)||e.provider==="codex":!1}function nFe(e,t){if(!e||!e.is_error||!t||t.is_error)return!1;var r=nw(e.content).toLowerCase(),n=nw(t.content).toLowerCase();return r?r.indexOf("invalid pages parameter")!==-1&&n.length>0:!1}function hr(e){return!!e&&(e.sessionKind==="structured"||e.runner==="claude-cli-print")}function BY(){h.chatMode=ip("claude",h.chatMode),Io()}var IK=Object.create(null),rk=Object.create(null),Xk=Object.create(null),jg=new Map;async function aFe(e){let t=Va(),r=zb(e);if(!r||!kY(t,h.currentMessages?.length)||EC(t.id)||jg.get(t.id)?.pending||eI(t)===e)return;let n={pending:!0,status:"\u6B63\u5728\u5207\u6362\u5DE5\u5177\u2026",failed:!1};jg.set(t.id,n),Io(),Ga();try{let a=await kC(t.id,async function(){let o=await an("/api/sessions/"+encodeURIComponent(t.id)+"/provider",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r.provider,engine:r.engine})}),l=await jt(o);if(l.id!==t.id||l.employeeId!==t.employeeId||eI(l)!==e)throw new Error("\u672A\u6536\u5230\u6709\u6548\u7684\u5DE5\u5177\u5207\u6362\u56DE\u6267\uFF0C\u8BF7\u5237\u65B0\u4F1A\u8BDD\u6838\u5BF9\u3002");return l});a.latest&&h.sessions.some(function(o){return o.id===t.id})&&(dr(a.data),TM(t.id),h.selectedId===t.id&&(h.sessionTool=r.provider,h.chatMode=a.data.mode),n.status="\u5DF2\u5207\u6362\u4E3A "+r.label,Bi())}catch(a){n.failed=!0,n.status=Ua(a?.error??a,"\u5207\u6362\u5DE5\u5177\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u6838\u5BF9\u3002")}finally{n.pending=!1,Io(),Ga()}}function EC(e){return e&&Xk[e]||null}function Qk(e,t,r){if(e){var n=Xk[e]||(Xk[e]={});n[t]=r}}function TM(e){e&&delete Xk[e]}function kC(e,t){var r=(rk[e]||0)+1;rk[e]=r;var n=IK[e]||Promise.resolve(),a=n.catch(function(){}).then(t);return IK[e]=a.catch(function(){}),a.then(function(o){return{data:o,latest:rk[e]===r}},function(o){return Promise.reject({error:o,latest:rk[e]===r})})}function fw(e,t){TM(e),Promise.resolve(Ai()).catch(function(){}).finally(function(){Io()}),Ze(t,"error")}function jM(e,t){if(!t.latest)return!1;var r=t.data;return r&&r.error?(fw(e,r.error),!1):!r||!r.id?(fw(e,"\u4F1A\u8BDD\u8BBE\u7F6E\u66F4\u65B0\u5931\u8D25"),!1):(dr(r),TM(e),Io(),!0)}function CC(e,t){var r=dFe(e,t);return!r||r==="auto"?"\u81EA\u52A8":WA(r)}function mw(e,t){var r=Z4e(e,NM(t),_M($w(t)));return r||"\u9ED8\u8BA4"}function iFe(e,t){var r=EY(mw(e,t)),n=r.search(/[((]/);n>0&&(r=r.slice(0,n).trim());var a=r.lastIndexOf("/");return a>=0&&a<r.length-1&&(r=r.slice(a+1).trim()),r}function oFe(e,t){var r=SC(t);return r.map(function(n){var a=n.id==="off"?"\u81EA\u52A8\uFF08\u6A21\u578B\u9ED8\u8BA4\uFF09":CC(n.id,t);return{value:n.id,label:a}})}function Io(){var e=Va(),t=h.chatMode||"default",r=MY(e);sFe(e,t,IY(e)||"",r)}function sFe(e,t,r,n){var a=ap();for(let[S,F]of jg)!F.pending&&!h.sessions.some(function($){return $.id===S})&&jg.delete(S);let o=jg.get(e?.id),l=kY(e,h.currentMessages?.length),u=!!e||l,d=!!o?.pending;var p=uFe(r,e),m=xY(r),v=oFe(n,e),g=Q4e(n,v,"off"),b=BK(t),x=iFe(m,e),y=mw(m,e)||x,E=CC(g,e);K4e({resolve:function(){return{groupTitle:"\u6A21\u5F0F "+b+" \xB7 \u6A21\u578B "+y+" \xB7 \u601D\u8003 "+E,modeLabel:b,modelFullLabel:y,modelRefreshing:!!h.modelsRefreshing||d,toolVisible:u,toolStatus:o?.status,toolDisabled:d,thinkingValue:g,thinkingLabel:E}},onRefreshModels:function(){fFe()}}),q4e({resolve:function(S,F){if(S==="tool"){let $=eI(e);return{value:$,options:u0.map(function(C){return{value:C.id,label:C.label}}),ariaLabel:"\u66F4\u6362\u6267\u884C\u5DE5\u5177",displayValue:d?"\u5207\u6362\u4E2D\u2026":o?.failed?"\u5207\u6362\u5931\u8D25":zb($)?.label,displayTitle:o?.status||zb($)?.description,disabled:!l||d||!!EC(e?.id)}}return S==="mode"?{value:t,disabled:d,options:DY(a).map(function($){return{value:$,label:BK($)}}),ariaLabel:"\u6A21\u5F0F",placeholder:b,displayValue:b}:S==="model"?{value:m,disabled:d,options:p,ariaLabel:"\u6A21\u578B",placeholder:x,displayValue:x,displayTitle:y}:{value:g,disabled:d,options:v,ariaLabel:"\u601D\u8003\u6DF1\u5EA6",placeholder:E,displayValue:F==="runtime"?"\u601D\u8003\uFF1A"+E:E}},onValueChange:function(S,F,$){S==="tool"?aFe(F):S==="mode"?RY(F):S==="model"?PY(F):_Y(F),$==="all"&&requestAnimationFrame(function(){Zd(!0)})}})}function Kg(e){return e==="codex"||e==="opencode"||e==="grok"||e==="qoder"||e==="pi"?e:"claude"}function $w(e){return Kg(e&&e.provider||h.sessionTool||"claude")}function lFe(){var e=h.config&&h.config.defaultModels&&typeof h.config.defaultModels=="object"?h.config.defaultModels:{};return{claude:typeof e.claude=="string"?e.claude:h.config&&h.config.defaultModel||"",codex:typeof e.codex=="string"?e.codex:h.config&&h.config.defaultCodexModel||"",opencode:typeof e.opencode=="string"?e.opencode:h.config&&h.config.defaultOpenCodeModel||"",grok:typeof e.grok=="string"?e.grok:h.config&&h.config.defaultGrokModel||"",qoder:typeof e.qoder=="string"?e.qoder:h.config&&h.config.defaultQoderModel||"",pi:typeof e.pi=="string"?e.pi:h.config&&h.config.defaultPiModel||""}}function _M(e){var t=lFe(),r=Kg(e);return r==="codex"?t.codex||"":r==="opencode"?t.opencode||"":r==="grok"?t.grok||"":r==="qoder"?t.qoder||"":r==="pi"?t.pi||"":t.claude||""}function tl(e){var t=Kg(e),r=h.chatModels&&typeof h.chatModels[t]=="string"?h.chatModels[t]:"";return!r&&t==="claude"&&(r=h.chatModel||""),r||""}function Dw(e,t){var r=Kg(e),n=(t||"").trim();h.chatModels||(h.chatModels={},Mu.forEach(function(a){h.chatModels[a]=""})),h.chatModels[r]=n,h.chatModel=n;try{localStorage.setItem("wand-chat-model-"+r,n),localStorage.removeItem("wand-chat-model")}catch{}}function IY(e){var t=e&&e.id?EC(e.id):null;if(t&&Object.prototype.hasOwnProperty.call(t,"model"))return t.model||"";if(e&&e.selectedModel)return e.selectedModel;var r=$w(e),n=tl(r);return n||_M(r)||""}function NM(e){var t=Kg(e&&e.provider||h.sessionTool||"claude");return t==="codex"?h.availableCodexModels||[]:t==="opencode"?h.availableOpenCodeModels||[]:t==="grok"?h.availableGrokModels||[]:t==="qoder"?h.availableQoderModels||[]:t==="pi"?(h.availablePiModels||[]).filter(function(r){return e?.sessionKind!=="pty"||!r.id.startsWith("wand-openrouter-free/")}):h.availableModels||[]}function uFe(e,t){for(var r=NM(t),n=xY(e),a=[{value:"",label:"\u9ED8\u8BA4 \xB7 "+mw("",t)}],o=0;o<r.length;o++){var l=r[o];if(l.id!=="default"){var u=EY(l.label||l.id),d=$w(t)==="claude"?l.availability==="verified"?" \xB7 \u5DF2\u9A8C\u8BC1":l.availability==="stale"?" \xB7 \u5F85\u5237\u65B0":l.source==="models-api"?" \xB7 API \u5019\u9009":" \xB7 \u5019\u9009":"";a.push({value:l.id,label:u+d,group:l.group})}}return n&&!r.some(function(p){return p.id===n})&&a.push({value:n,label:n+"\uFF08\u81EA\u5B9A\u4E49\uFF09"}),a}function PM(e){Io()}var vk=[{id:"off",label:"auto",hint:"\u4F7F\u7528 provider / \u6A21\u578B\u9ED8\u8BA4\u601D\u8003\u6863\u4F4D"},{id:"standard",label:"low",hint:"Claude/Codex: low \xB7 OpenCode variant: low"},{id:"deep",label:"medium",hint:"Claude/Codex: medium \xB7 OpenCode variant: high"},{id:"max",label:"max",hint:"Claude: max \xB7 Codex: xhigh \xB7 OpenCode variant: max"}];function cFe(e){var t=$w(e),r=IY(e)||"default",n=NM(e),a=n.find(function(u){return u.id===r})||n.find(function(u){return u.id==="default"});if(a&&Array.isArray(a.reasoningEfforts)&&a.reasoningEfforts.length)return{provider:t,efforts:a.reasoningEfforts,defaultEffort:a.defaultReasoningEffort||""};var o=h.providerThinkingEfforts||{},l=Array.isArray(o[t])?o[t]:[];return{provider:t,efforts:l,defaultEffort:""}}function SC(e){var t=cFe(e),r=VA(t.provider,t.efforts,t.defaultEffort);return r||vk}function dFe(e,t){for(var r=SC(t),n=0;n<r.length;n++)if(r[n].id===e)return r[n].label;if(typeof e=="string"&&e.indexOf("codex:")===0)return e.slice(6);for(var a=0;a<vk.length;a++)if(vk[a].id===e)return vk[a].label;return"auto"}function MY(e){var t=e&&e.id?EC(e.id):null;return t&&Object.prototype.hasOwnProperty.call(t,"thinking")?t.thinking||"off":e&&e.thinkingEffort?e.thinkingEffort:h.chatThinking?h.chatThinking:"off"}function TY(e){h.chatThinking=e;try{localStorage.setItem("wand-thinking-effort",e)}catch{}}function Aw(e){var t=e&&typeof e=="object"?e.defaultThinkingEffort:"",r=t==="off"||t==="standard"||t==="deep"||t==="max"||$2(String(t||""));if(r){try{if(localStorage.getItem("wand-thinking-effort"))return}catch{}h.chatThinking!==t&&(h.chatThinking=t,Io())}}function jY(e,t,r,n){return kC(e.id,function(){return n&&!n.ok?{error:n.error||"\u5207\u6362\u6A21\u578B\u5931\u8D25"}:an("/api/sessions/"+encodeURIComponent(e.id)+"/thinking-effort",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({thinkingEffort:t})}).then(function(a){return a.json()})}).then(function(a){jM(e.id,a)&&typeof Ze=="function"&&Ze(r||"\u5DF2\u5207\u6362\u601D\u8003\u6DF1\u5EA6 \u2192 "+CC(t,Va()),"success")}).catch(function(a){a&&a.latest&&fw(e.id,"\u5207\u6362\u601D\u8003\u6DF1\u5EA6\u5931\u8D25")})}function _Y(e){var t=(e||"off").trim(),r=Va(),n=SC(r).some(function(a){return a.id===t});n||(t="off"),TY(t),r&&Qk(r.id,"thinking",t),Io(),r&&jY(r,t,"\u5DF2\u5207\u6362\u601D\u8003\u6DF1\u5EA6 \u2192 "+CC(t,r))}function pFe(e){if(!e)return!1;var t=e.mode;return t==="managed"||t==="full-access"}function NY(){return qA(),fetch("/api/models",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){return RM(e),og(e),e}).catch(function(){return null})}function RM(e){return!e||!Array.isArray(e.models)?!1:(h.availableModels=e.models,h.availableCodexModels=Array.isArray(e.codexModels)?e.codexModels:[],h.availableOpenCodeModels=Array.isArray(e.opencodeModels)?e.opencodeModels:[],h.availableGrokModels=Array.isArray(e.grokModels)?e.grokModels:[],h.availableQoderModels=Array.isArray(e.qoderModels)?e.qoderModels:[],h.availablePiModels=Array.isArray(e.piModels)?e.piModels:[],h.providerThinkingEfforts=e.thinkingEfforts&&typeof e.thinkingEfforts=="object"?e.thinkingEfforts:{},e.revision&&(h.modelCatalogRevision=e.revision),PM(Va()),!0)}typeof window<"u"&&window.addEventListener("wand-model-catalog",function(e){var t=e&&e.detail;!t||!Array.isArray(t.models)||t.revision&&t.revision===h.modelCatalogRevision||RM(t)});function fFe(){return h.modelsRefreshing?Promise.resolve(null):(h.modelsRefreshing=!0,Io(),fetch("/api/models/refresh",{method:"POST",credentials:"same-origin"}).then(function(e){return e.ok?e.json():e.json().catch(function(){return{}}).then(function(t){throw new Error(t&&t.error?t.error:"\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002")})}).then(function(e){if(!RM(e))throw new Error("\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002");return og(e),Ze("\u6A21\u578B\u5217\u8868\u5DF2\u5237\u65B0\u3002","success"),e}).catch(function(e){return Ze(e&&e.message?e.message:"\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002","error"),null}).finally(function(){h.modelsRefreshing=!1,Io()}))}function Va(){if(!h.selectedId)return null;for(var e=0;e<h.sessions.length;e++)if(h.sessions[e].id===h.selectedId)return h.sessions[e];return null}function PY(e){var t=(e||"").trim(),r=Va(),n=$w(r);Dw(n,t),r&&Qk(r.id,"model",t);var a=!1;if(SC(r).some(function(u){return u.id===MY(r)})||(a=!0,TY("off"),r&&Qk(r.id,"thinking","off")),Io(),!!r){var o={ok:!1,error:""};if(kC(r.id,function(){return an("/api/sessions/"+encodeURIComponent(r.id)+"/model",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({model:t||null})}).then(function(u){return u.json()}).then(function(u){return o.ok=!!(u&&u.id&&!u.error),o.error=u&&u.error?u.error:"",u})}).then(function(u){if(!a&&jM(r.id,u)&&typeof Ze=="function"){var d=mw(t,Va()||r),p=r.provider==="codex"?"\uFF08\u4E0B\u6B21\u5BF9\u8BDD\u751F\u6548\uFF09":"";Ze("\u5DF2\u5207\u6362\u6A21\u578B \u2192 "+d+p,"success")}}).catch(function(u){o.ok=!1,!a&&u&&u.latest&&fw(r.id,"\u5207\u6362\u6A21\u578B\u5931\u8D25")}),a){var l=mw(t,r);jY(r,"off","\u5DF2\u5207\u6362\u6A21\u578B \u2192 "+l+"\uFF1B\u601D\u8003\u6DF1\u5EA6\u5DF2\u56DE\u843D\u4E3A\u81EA\u52A8",o)}}}function RY(e){var t=ip(ap(),(e||"default").trim());h.chatMode=t,Io();var r=Va();if(!r||!r.id){Ze&&Ze("\u65B0\u4F1A\u8BDD\u6A21\u5F0F\uFF1A"+t,"info");return}Qk(r.id,"mode",t),kC(r.id,function(){return an("/api/sessions/"+encodeURIComponent(r.id)+"/mode",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({mode:t})}).then(function(n){return n.json()})}).then(function(n){if(jM(r.id,n)&&typeof Ze=="function"){var a=h.sessions.find(function(u){return u.id===r.id})||r,o=a.mode||t;h.chatMode=ip(a.provider||ap(),o),Io();var l=r.provider==="codex"?"\uFF08Codex \u56FA\u5B9A\u5168\u6743\u9650\uFF09":"";Ze("\u5DF2\u5207\u6362\u6A21\u5F0F \u2192 "+o+l,"success")}}).catch(function(n){n&&n.latest&&fw(r.id,"\u5207\u6362\u6A21\u5F0F\u5931\u8D25")})}function FC(e,t,r,n,a){var o=a&&a.provider||Kg(h.sessionTool),l=(a&&a.model?String(a.model):"").trim(),u=l||tl(o)||_M(o),d=h.chatThinking||"off",p={kind:"structured",cwd:t||ds(),mode:r||h.chatMode||h.config&&h.config.defaultMode||"default",provider:o,runner:Z7(o),engine:a&&a.engine?a.engine:void 0,prompt:e||void 0,worktreeEnabled:n===!0,model:u||void 0,thinkingEffort:d,sessionSource:"interactive",workspaceId:a&&a.workspaceId,workspaceTaskId:a&&a.workspaceTaskId,systemPrompt:a&&a.systemPrompt,employeeId:a&&a.employeeId,respondImmediately:e?!0:void 0};return an("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(p)}).then(function(m){return m.json()}).then(function(m){if(m.error)throw new Error(m.error);return Am(m.id,!0),dr(m),Promise.resolve(Ln(m.id)).then(function(){return m})})}function OM(){var e=!!h.selectedId,t=document.getElementById("chat-output"),r=h.sessions.find(function(o){return o.id===h.selectedId}),n=hr(r),a=e&&(n||h.currentView!=="terminal");n?h.currentView="chat":e||(h.currentView="terminal"),t&&a&&sI(t),uY(),Qs(),Ga(),Ka("shell:view")}function dr(e,t="unknown",r){if(!e||!e.id)return;t==="latest"&&(Array.isArray(e.messages)||typeof e.output=="string")&&wC.loaded(e.id);var n=AK(h.sessions.find(function(b){return b.id===e.id})),a=h.sessions.find(function(b){return b.id===e.id})||null,o=Object.assign({},k4e(e,a),g6(a,e));if(t==="latest"&&Array.isArray(o.messages)&&typeof o.messageOffset!="number"&&(o.messageOffset=0,o.messageTotal=o.messages.length),Array.isArray(o.messages)&&typeof o.messageOffset=="number"){var l=o.messageOffset,u=typeof o.leadingBlockOffset=="number"?MEe(a,o.messages,o.messageOffset,o.messageTotal,o.leadingBlockOffset,o.leadingBlockTotal||0,t):k9(a,o.messages,o.messageOffset,o.messageTotal,t);Object.assign(o,u),typeof o.leadingBlockOffset!="number"&&(o.leadingBlockOffset=u.messageOffset<l&&a?.leadingBlockOffset||0,o.leadingBlockTotal=o.messages[0]?.content?.length||0)}let d=Object.assign({},a,o),p=Wxe(nc.get(e.id),d,r);p?nc.set(e.id,p):nc.delete(e.id),wm.record(o);var m=!1;h.sessions=h.sessions.map(function(b){return b.id!==o.id?b:(m=!0,Object.assign({},b,o))}),m||h.sessions.unshift(o);var v=AK(h.sessions.find(function(b){return b.id===e.id}));v!==n&&Q6(Y6(h.sessions));var g=h.sessions.find(function(b){return b.id===o.id})||o;g&&Array.isArray(g.queuedMessages)&&o.id===h.selectedId&&(bC(g),fY(),Jd()),o.id===h.selectedId&&(hC(),Xd()),o.status&&o.status!=="running"&&h.crossSessionQueue.length>0&&setTimeout(fC,0)}function $C(e){!e||!h.ws||h.ws.readyState!==WebSocket.OPEN||h.ws.send(JSON.stringify({type:"subscribe",mode:Ig(e)?"add":"replace",sessionId:e,blockBudget:Ry,byteBudget:iI,omitStructuredOutput:!0,compactTools:!0,capabilities:{ptyAck:!0}}))}function mFe(e,t){if(!e)return t;var r=Object.assign({},e,t,g6(e,t)),n=!Array.isArray(t.messages)&&typeof t.output!="string";if(n)return Array.isArray(e.messages)&&!Array.isArray(t.messages)&&(r.messages=e.messages),typeof e.output=="string"&&typeof t.output!="string"&&(r.output=e.output),r;var a=typeof t.output=="string"&&t.output.length>0;!a&&typeof e.output=="string"&&(r.output=e.output);var o=e.structuredState||null,l=t.structuredState||null,u=e.sessionKind==="structured"||t.sessionKind==="structured",d=!!(e.messages&&e.messages.length&&(function(){var g=e.messages[e.messages.length-1];return g&&g.role==="assistant"&&Array.isArray(g.content)&&g.content.some(function(b){return b&&b.__processing})})()),p=Array.isArray(t.messages)?u?yC(t.messages):t.messages:[],m=p.length>0&&(function(){var g=p[p.length-1];return g&&g.role==="assistant"&&Array.isArray(g.content)&&!g.content.some(function(b){return b&&b.__processing})})(),v=e.sessionKind==="structured"&&!!o&&o.inFlight===!0&&(!l||l.inFlight!==!0)&&d&&!!o.activeRequestId&&!!l&&!!l.activeRequestId&&l.activeRequestId===o.activeRequestId&&!m;return v&&(r.status=e.status||r.status,r.structuredState=Object.assign({},l||{},o,{inFlight:!0}),r.messages=e.messages),e.id===h.selectedId&&(e.permissionBlocked&&!t.permissionBlocked&&t.permissionBlocked!==!1&&(r.permissionBlocked=!0),e.pendingEscalation&&!t.pendingEscalation&&t.permissionBlocked!==!1&&(r.pendingEscalation=e.pendingEscalation)),r}function uc(e,t,r){if(e&&e.messages&&e.messages.length>0)return e.messages;if(e&&e.sessionKind==="structured")return[];if(!r)return[];var n=typeof t=="string"?t:e&&e.output||"";return n?AX(n,e&&e.command):[]}function hFe(e){if(!e||!e.length)return null;if(h.selectedId){var t=e.find(function(a){return a.id===h.selectedId});return t?t.id:null}if(zu())return null;var r=e.find(function(a){return a.status==="running"});if(r)return r.id;var n=e.find(function(a){return!a.archived});return n?n.id:e[0].id}function Ai(e){var t=e||{},r=wm.begin("list");return O1({force:!t.reuseSnapshot}).then(function(n){if(r.isCurrent()){if(!Array.isArray(n)||n.some(function(m){return!m||typeof m.id!="string"}))throw new Error("Invalid session list response");var a=n.slice();h.sessions.forEach(function(m){r.changed(m.id)&&!a.some(function(v){return v.id===m.id})&&a.push(m)});var o=new Set(a.map(function(m){return m.id})),l=h.selectedId;At.retain(o),Object.keys(h.terminalStatesBySession).forEach(function(m){o.has(m)||delete h.terminalStatesBySession[m]}),h.sessions=a.map(function(m){var v=h.sessions.find(function(b){return b.id===m.id}),g=r.merge(m,v);return wm.record(g),mFe(v,g)}),Q6(Y6(h.sessions));var u=t.preserveNoSelection&&!h.selectedId?null:hFe(h.sessions);u!==void 0&&(h.selectedId=u),h.selectedId!==l&&(h.selectedId?mc(h.selectedId):Tw()),mY(),Jd(),op(),Bw(),h.selectedId&&h.gitStatusSessionId!==h.selectedId&&Ew(h.selectedId);var d=Promise.resolve();if(!t.skipSelectedOutputReload&&h.selectedId)d=Kl(h.selectedId);else if(h.selectedId){var p=h.sessions.find(function(m){return m.id===h.selectedId});hr(p)&&(Cm({preserveStickState:!0}),sc(!0))}return d.then(function(){r.isCurrent()&&(h.crossSessionQueue.length>0&&fC(),Vl(),q9())})}}).catch(function(n){if(r.isCurrent()){if(n&&n.status===401){rFe();return}var a=n&&n.message||"",o=a==="Failed to fetch"||a==="NetworkError when attempting to fetch resource."||a==="Load failed"||/aborted|aborterror|networkerror|failed to fetch/i.test(a);o||console.error("[wand] loadSessions failed:",n)}}).finally(function(){r.finish()})}var o9=null;function Ag(){o9||(o9=setTimeout(function(){o9=null,Bi()},200))}function Bi(){Ka("sessions:update"),Bw(),h.crossSessionQueue.length>0&&Vl()}function Bw(){var e=h.sessions.find(function(r){return r.id===h.selectedId});e||(bm(!1),Ga()),FCe();var t=document.getElementById("output");!h.terminal&&t&&e&&!hr(e)&&Js(),h.terminal&&t&&e&&!hr(e)&&!t.contains(h.terminal.element)&&(vw(),Js()),e||(h.terminalSessionId=null,h.terminalOutput=""),h.terminal&&e&&h.currentView==="terminal"&&Wl("view"),BY(),PM(Va()),OM(),hC(),Ka("shell:chrome")}function Kl(e){var t=wm.begin("detail");h.chatRenderTimer&&(clearTimeout(h.chatRenderTimer),h.chatRenderTimer=null);var r=h.sessions.find(function(a){return a.id===e}),n="/api/sessions/"+e;return AY(r)&&(n+="?format=chat&blockBudget="+Ry+"&byteBudget="+iI+"&output=omit"),an(n,{credentials:"same-origin"}).then(async function(a){if(!(!a||!t.isCurrent()||h.selectedId!==e))return a.status===404?{missing:!0}:jt(a)}).then(function(a){if(!(!t.isCurrent()||h.selectedId!==e)&&a){if(a.missing){h.selectedId===e&&(iC(),h.selectedId=null,op()),Ai();return}if(a.id!==e)throw new Error("Session detail identity mismatch");if(a=t.merge(a,h.sessions.find(function(u){return u.id===e})),dr(a,"latest"),Bw(),h.terminal&&e===h.selectedId&&a.output!==void 0){var o=!!h.ws&&(h.ws.readyState===WebSocket.OPEN||h.ws.readyState===WebSocket.CONNECTING);o?ao("session-switch"):(ow(e,a.output,{mode:"append"}),ao("session-switch",{forceReplay:!0}))}var l=h.sessions.find(function(u){return u.id===e});h.currentMessages=Xs(l,uc(l,a.output,!1)),xa(!1),a.sessionKind!=="structured"&&Kk(l)}}).catch(function(a){t.isCurrent()&&console.error("[wand] loadOutput failed:",a)}).finally(function(){t.finish()})}var Bg=new Map;function gFe(){var e=h.selectedId;if(!e||Bg.has(e))return!1;var t=h.sessions.find(function(d){return d.id===e});if(!t)return!1;var r=typeof t.messageOffset=="number"?t.messageOffset:0,n=typeof t.leadingBlockOffset=="number"?t.leadingBlockOffset:0;if(r<=0&&n<=0)return!1;var a={},o=h.chatRenderEpoch||0,l=!1;Bg.set(e,a),FK(e,o,"loading");var u=n>0?"/api/sessions/"+encodeURIComponent(e)+"/messages?turn="+r+"&blockOffset="+n+"&blockLimit="+Ry+"&blockBudget="+Ry:"/api/sessions/"+encodeURIComponent(e)+"/messages?before="+r+"&blockBudget="+Ry;return u+="&byteBudget="+iI,an(u,{credentials:"same-origin"}).then(function(d){return jt(d)}).then(function(d){if(Bg.get(e)===a&&(t=h.sessions.find(function(v){return v.id===e}),!!t)){if(n>0&&d&&Array.isArray(d.blocks)&&t.messageOffset===r&&t.leadingBlockOffset===n&&d.turnIndex===r&&d.blockOffset<n&&d.blockOffset+d.blocks.length===n){var p=Array.isArray(t.messages)?t.messages.slice():[];if(!p.length)return;p[0]=Object.assign({},p[0],{content:d.blocks.concat(p[0].content)}),t.messages=p,t.leadingBlockOffset=d.blockOffset,t.leadingBlockTotal=d.blockTotal,l=!0,wm.record({id:e,messages:p,leadingBlockOffset:d.blockOffset,leadingBlockTotal:d.blockTotal}),e===h.selectedId&&(h.currentMessages=Xs(t,uc(t,t.output,!1)),xa(!0));return}if(n===0&&d&&Array.isArray(d.messages)&&t.messageOffset===r&&Number.isSafeInteger(d.offset)&&d.offset>=0&&d.offset<r&&d.offset+d.messages.length===r&&Number.isSafeInteger(d.leadingBlockOffset)&&d.leadingBlockOffset>=0){var m=Array.isArray(t.messages)?t.messages:[];t.messages=d.messages.concat(m),t.messageOffset=d.offset,t.leadingBlockOffset=d.leadingBlockOffset,t.leadingBlockTotal=d.leadingBlockTotal,typeof d.total=="number"&&(t.messageTotal=d.total),l=!0,wm.record({id:e,messages:t.messages,messageOffset:t.messageOffset,messageTotal:t.messageTotal,leadingBlockOffset:t.leadingBlockOffset,leadingBlockTotal:t.leadingBlockTotal}),e===h.selectedId&&(h.currentMessages=Xs(t,uc(t,t.output,!1)),xa(!0))}}}).catch(function(){}).finally(function(){if(Bg.get(e)===a){Bg.delete(e);var d=h.sessions.find(function(p){return p.id===e});(l||d&&(d.messageOffset||0)===r&&(d.leadingBlockOffset||0)===n)&&FK(e,o,l?"idle":"failed")}}),!0}function Ln(e,t){var r=h.sessions.find(function(v){return v.id===e});if(!r)return;Kr.getSnapshot().taskId&&!r.workspaceTaskId&&Ha.getRuntime()?.closeWorkspace(),wC.open(e);var n=h.selectedId;if(n&&n!==e){var a=document.getElementById("input-box");a&&At.edit(n,{preserve:a.value})}h.selectedId!==e&&(Dd.closeIfOpen(),vw()),iC(),h.selectedId=e,op(),t?.updateRoute!==!1&&IX(),h.toolContentCache={},h.messageQueue=[],h.pendingMessages=[],bC(r),mY(),Jd(),Cm(),h.currentMessages=[],h.chatRenderTimer&&(clearTimeout(h.chatRenderTimer),h.chatRenderTimer=null),KY();var o=document.querySelector(".structured-status-bar");o&&o.remove(),h._statusBarTimerId&&(clearInterval(h._statusBarTimerId),h._statusBarTimerId=null),h._statusBarStartTime=0;var l=document.querySelector(".input-composer");l&&l.classList.remove("in-flight");var u=r;h.preferredCommand=ap(),h.chatMode=ip("claude",u&&u.mode?u.mode:h.chatMode),h.terminalInteractive&&u&&u.status!=="running"&&bm(!1),Bi(),o8e(e,t);var d=tM(e);xa(!0),h.filePanelOpen&&l4e(u);let p=h.ws&&typeof h.ws.readyState=="number"&&AY(u)&&(h.ws.readyState===WebSocket.OPEN||h.ws.readyState===WebSocket.CONNECTING)?AEe(e):null;$C(e);var m=(p?p.then(function(v){if(!v&&h.selectedId===e&&d())return Kl(e)}):Kl(e)).then(function(){t?.focusInput!==!1&&d()&&Ql(!0)});return FQ(e),Ew(e,{force:!0}),m}function fc(e){wC.clear(),e?.updateRoute!==!1&&IX(),h.selectedId&&(iC(),h.selectedId=null,h.currentTask=null,h.currentMessages=[],FQ(null),op(),Cm(),$i(),Bi())}function xm(){Ka("layout:drawer")}function zM(){var e=Bo();if(!e){var t=h.sidebarPinned?!1:!h.sessionsDrawerOpen;h.sessionsDrawerOpen=t,t&&(h.sidebarCollapsed=!1,Xr("wand-sidebar-collapsed",!1)),Xr("wand-sidebar-open",h.sessionsDrawerOpen),Ul(),Qg();return}if(h.sessionsDrawerOpen=!h.sessionsDrawerOpen,Xr("wand-sidebar-open",h.sessionsDrawerOpen),h.sessionsDrawerOpen){h.filePanelOpen=!1;try{localStorage.setItem("wand-file-panel-open","false")}catch{}}Ul()}function LM(){var e=Bo();if(!e){if(h.sidebarPinned&&!h.sidebarCollapsed)return;h.sessionsDrawerOpen=!0,h.sidebarCollapsed=!1,Xr("wand-sidebar-collapsed",!1),Xr("wand-sidebar-open",!0),Ul(),Qg();return}if(!h.sessionsDrawerOpen){h.sessionsDrawerOpen=!0,Xr("wand-sidebar-open",!0),h.filePanelOpen=!1;try{localStorage.setItem("wand-file-panel-open","false")}catch{}Ul()}}function Xg(){var e=Bo();if(!e){if(!h.sidebarPinned&&!h.sessionsDrawerOpen)return;h.sidebarPinned=!1,h.sessionsDrawerOpen=!1,Xr("wand-sidebar-pinned",!1),Xr("wand-sidebar-open",!1),Ul(),Qg();return}h.sessionsDrawerOpen&&(h.sessionsDrawerOpen=!1,Xr("wand-sidebar-open",!1),Ul())}function vFe(){if(Bo()){Xg();return}h.sidebarPinned||h.sidebarCollapsed||!h.sessionsDrawerOpen||(h.sessionsDrawerOpen=!1,Xr("wand-sidebar-open",!1),Ul(),Qg())}function bFe(e){var t=e&&e.querySelector('button:not([disabled]):not(.hidden), select:not([disabled]), [tabindex]:not([tabindex="-1"])');if(t)try{t.focus({preventScroll:!0})}catch{t.focus()}}function OY(e,t=!1){var r=document.getElementById("composer-plus-popover"),n=document.getElementById("attach-btn");h.plusPopoverOpen=!!e,r&&(e&&r.classList.toggle("is-keyboard-open",!!t),r.classList.toggle("hidden",!e),r.setAttribute("aria-hidden",e?"false":"true")),n&&(n.classList.toggle("active",!!e),n.setAttribute("aria-expanded",e?"true":"false"),n.setAttribute("aria-label",e?"\u5173\u95ED\u66F4\u591A\u64CD\u4F5C":"\u66F4\u591A\u64CD\u4F5C"),n.setAttribute("title",e?"\u5173\u95ED":"\u66F4\u591A")),e&&t&&r&&requestAnimationFrame(function(){h.plusPopoverOpen&&r.isConnected&&bFe(r)})}function yFe(e=!1){OY(!h.plusPopoverOpen,!h.plusPopoverOpen&&!!e)}function Zd(e=!1){if(h.plusPopoverOpen){var t=document.getElementById("attach-btn"),r=document.getElementById("composer-plus-popover"),n=!!e||!!(r&&r.contains(document.activeElement));if(n&&t)try{t.focus({preventScroll:!0})}catch{t.focus()}OY(!1,!1)}}function $i(){Bo()&&h.sessionsDrawerOpen&&Xg()}function Qg(){var e=document.querySelector(".main-layout");if(e){var t=function(r){r.propertyName==="padding-left"&&(e.removeEventListener("transitionend",t),ac(!0))};e.addEventListener("transitionend",t)}setTimeout(function(){ac(!0)},350)}function DC(){var e=Bo();h.sidebarPinned||(h.sidebarPinned=!0,Xr("wand-sidebar-pinned",!0)),h.sidebarCollapsed=!h.sidebarCollapsed,Xr("wand-sidebar-collapsed",h.sidebarCollapsed),h.sidebarCollapsed?h.sessionsDrawerOpen=!1:e?(h.sidebarPinned=!1,h.sessionsDrawerOpen=!0,Xr("wand-sidebar-pinned",!1)):h.sessionsDrawerOpen=!0,Xr("wand-sidebar-open",h.sessionsDrawerOpen),Ul(),Bi(),wFe(),Qg()}function HM(){Bo()||(h.sidebarPinned=!h.sidebarPinned,h.sessionsDrawerOpen=!0,Xr("wand-sidebar-pinned",h.sidebarPinned),Xr("wand-sidebar-open",!0),Ul(),Qg())}function wFe(){Ka("layout:collapse-button")}function xFe(e){if(Di(["newSession"])){var t=window.__wandReactNewSession;if(t&&typeof t.open=="function")try{if(t.open(e?{initialCwd:e}:void 0))return}catch(n){console.warn("[wand] React new-session host unavailable",n)}try{var r=new URL(window.location.href).searchParams.get("reactUi")==="0";if(r){Ze("\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u5DF2\u88AB ?reactUi=0 \u7981\u7528\uFF1B\u79FB\u9664\u8BE5\u53C2\u6570\u5E76\u5237\u65B0\u540E\u5373\u53EF\u4F7F\u7528\u3002","error");return}if(window.localStorage.getItem("wand.reactUi.enabled")==="false"){window.localStorage.setItem("wand.reactUi.enabled","true"),Ze("\u6B63\u5728\u542F\u7528\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u2026","info"),window.setTimeout(function(){window.location.reload()},120);return}}catch{}Ze("\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error")}}function AC(e){var t=function(){xFe(e)};$m(t)&&t()}function qM(e){wY(e,"merge")}function WM(e){wY(e,"cleanup")}function MK(){if(Di(["settings"])){var e=window.__wandReactSettings;if(e&&typeof e.open=="function"){var t=document.getElementById("settings-button");t&&t.focus({preventScroll:!0}),e.open();return}try{var r=new URL(window.location.href).searchParams.get("reactUi")==="0";if(r){Ze("\u8BBE\u7F6E\u754C\u9762\u5DF2\u88AB ?reactUi=0 \u7981\u7528\uFF1B\u79FB\u9664\u8BE5\u53C2\u6570\u5E76\u5237\u65B0\u540E\u5373\u53EF\u4F7F\u7528\u3002","error");return}if(window.localStorage.getItem("wand.reactUi.enabled")==="false"){window.localStorage.setItem("wand.reactUi.enabled","true"),Ze("\u6B63\u5728\u542F\u7528\u8BBE\u7F6E\u754C\u9762\u2026","info"),window.setTimeout(function(){window.location.reload()},120);return}}catch{}Ze("\u8BBE\u7F6E\u754C\u9762\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error")}}function VM(){$m(MK)&&MK()}function zY(e,t,r){if(!e)return;function n(){if(r){r();return}if(t){var a=t.textContent;t.textContent="\u5DF2\u590D\u5236",setTimeout(function(){t.textContent=a},1500)}}if(Fm&&typeof WandNative.copyToClipboard=="function")try{if(WandNative.copyToClipboard(e)==="ok"){n();return}}catch{}navigator.clipboard.writeText(e).then(n).catch(function(){var a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),n()})}function EFe(){fetch("/api/auto-update",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){if(e.apk)return fetch("/api/android-apk-update?currentVersion="+encodeURIComponent(wQ),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!(!t.updateAvailable||!t.downloadUrl))try{WandNative.downloadUpdate(t.downloadUrl,t.fileName||"wand-update.apk",t.source||"local")}catch{}})}).catch(function(){})}function kFe(){H9&&fetch("/api/auto-update",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){if(e.dmg)return fetch("/api/macos-dmg-update?currentVersion="+encodeURIComponent(H9),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!(!t.updateAvailable||!t.downloadUrl))try{WandNative.downloadUpdate(t.downloadUrl,t.fileName||"wand-update.dmg",t.source||"local")}catch{}})}).catch(function(){})}function Jl(e,t){if(!e||typeof e!="object"||!h.terminal)return e;var r;try{r=Jke(t)}catch{}var n=r?.cols??h.terminal.cols,a=r?.rows??h.terminal.rows;return typeof n=="number"&&typeof a=="number"&&Number.isFinite(n)&&Number.isFinite(a)&&n>0&&a>0&&(e.cols=n,e.rows=a),e}async function Iw(){return h.terminal&&h.terminal.cols?Promise.resolve():(await zf(),new Promise(function(e){var t=!1,r=function(){t||(t=!0,e())},n=setTimeout(r,2e3);try{Js({prepare:!0})}catch{}requestAnimationFrame(function(){requestAnimationFrame(function(){h.terminal&&h.terminal.cols&&(clearTimeout(n),r())})})}))}function UM(){var e=ap(),t=D2(e),r=ds(),n=ip(e,h.config&&h.config.defaultMode?h.config.defaultMode:"default");return h.preferredCommand=e,h.chatMode=ip(e,h.chatMode),Iw().then(function(){return an("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Jl({kind:"pty",command:t,provider:e,cwd:r,mode:n,sessionSource:"interactive"},{kind:"pty",provider:e,command:t,cwd:r}))})}).then(function(a){return a.json()}).then(function(a){if(a.error){Ze(a.error,"error");return}var o=String(a.id);return Am(o,!0),Ai({skipSelectedOutputReload:!0}).then(function(){Ln(o)})}).then(function(){Ql(!0)}).catch(function(){Ze("\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002","error")})}function BC(e,t){var r=!!(t&&t.shell),n=r?"":t&&t.provider||ap(),a=(t&&t.model?String(t.model):"").trim(),o=r?"pty":t&&t.kind||h.config&&h.config.defaultSessionKind||"structured";if(o==="structured")return FC(t&&t.initialInput,e,t&&t.mode,!1,{workspaceId:t&&t.workspaceId,workspaceTaskId:t&&t.workspaceTaskId,provider:n,engine:t&&t.engine,model:a||void 0,systemPrompt:t&&t.systemPrompt,employeeId:t&&t.employeeId});var l=r?"default":ip(n,t&&t.mode||(h.config&&h.config.defaultMode?h.config.defaultMode:"default"));r||(h.preferredCommand=n,h.chatMode=ip(n,h.chatMode));var u=r?void 0:D2(n),d=r?{kind:"pty",shell:!0,cwd:e,mode:l,sessionSource:"interactive"}:{kind:"pty",command:u,provider:n,cwd:e,mode:l,model:a||void 0,initialInput:t&&t.initialInput,systemPrompt:t&&t.systemPrompt,sessionSource:"interactive"};return t&&t.workspaceId&&(d.workspaceId=t.workspaceId),t&&t.workspaceTaskId&&(d.workspaceTaskId=t.workspaceTaskId),Iw().then(function(){return an("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Jl(d,{kind:r?"shell":"pty",provider:r?void 0:n,command:u,cwd:e,workspaceTaskId:t?.workspaceTaskId}))})}).then(function(p){return p.json()}).then(function(p){if(p.error)throw new Error(String(p.error));if(!p.id)throw new Error("\u670D\u52A1\u7AEF\u672A\u8FD4\u56DE\u65B0\u4F1A\u8BDD ID\u3002");var m=String(p.id);return Am(m,!0),Ai({skipSelectedOutputReload:!0}).then(function(){return Ln(m),m})}).then(function(p){return Ql(!0),p}).catch(function(p){throw Ze(p&&p.message?p.message:"\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002","error"),p})}function CFe(e){if(QQ(e)||SEe(e)||u4e(e))return;let t=Va(),r=di.read(h.selectedId);if(!hr(t)&&(r.ctrl||r.shift)&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&!e.target?.readOnly){let x=aC(e.key,rw(h.selectedId,{ctrl:!1,shift:e.shiftKey}));if(x!==null){e.preventDefault(),r.ctrl||h.terminalInteractive?fa(x,r.ctrl?"ctrl_"+e.key.toLowerCase():"interactive_text").catch(function(){}):nI(e.target,x);return}}if(!hr(t)&&h.terminalInteractive&&(r.ctrl||r.shift)&&!e.metaKey&&!e.target?.readOnly){let x=qk(e);if(["up","down","left","right","home","end","pageup","pagedown","delete","tab"].includes(x)){e.preventDefault(),fa(lM(x,rw(h.selectedId,{ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey})),x).catch(function(){});return}}if(YQ(e)){eY(e);return}if(e.key==="Enter"){if(h.promptOptimizeRequest&&h.promptOptimizeRequest.sessionId===h.selectedId){e.preventDefault();return}if(e.shiftKey){e.preventDefault();var n=document.getElementById("input-box");n&&nI(n,`
293
- `);return}e.preventDefault();var a=!!(e.metaKey||e.ctrlKey);Dm(a?{interrupt:!0}:void 0);return}if(e.key==="Backspace"){if(h.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal")){e.preventDefault(),fa("\x7F","backspace").catch(function(){});return}setTimeout(function(){var x=document.getElementById("input-box");x&&Em(x.value,!0)},0);return}if(e.key==="Escape"){if(e.preventDefault(),h.plusPopoverOpen||sf())return;var o=Va();hr(o)?o&&o.structuredState&&o.structuredState.inFlight&&Y9():fa(Mg("escape"),"escape");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="c"){var l=document.getElementById("input-box"),u=l&&l.selectionStart!==l.selectionEnd||pw();if(u)return;var d=Va();if(hr(d)){e.preventDefault(),d&&d.structuredState&&d.structuredState.inFlight&&Y9();return}e.preventDefault(),fa(Mg("ctrl_c"),"ctrl_c");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="d"){var p=document.getElementById("input-box"),m=p&&p.selectionStart!==p.selectionEnd||pw();if(m)return;var v=Va();if(hr(v)){e.preventDefault();return}e.preventDefault(),fa(Mg("ctrl_d"),"ctrl_d");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="l"){e.preventDefault();var g=Va();if(hr(g))return;fa(Mg("ctrl_l"),"ctrl_l");return}if(!((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="a")&&!((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="v")){if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="x"){var n=document.getElementById("input-box"),b=n&&n.selectionStart!==n.selectionEnd;if(b)return;e.preventDefault(),fa("","ctrl_x");return}e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&setTimeout(function(){var x=document.getElementById("input-box");x&&Em(x.value)},0)}}var SFe=10*1024*1024;function FFe(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function $Fe(e){return/^image\/(png|jpe?g|gif|webp|bmp|svg\+xml)/.test(e)}function LY(e){var t=e?h.sessions.find(function(r){return r.id===e}):Va();return h.currentView==="terminal"&&t&&!hr(t)&&t.status==="running"?t:null}function DFe(e){var t=e&&e.target;if(!t||typeof t.closest!="function")return null;var r=t.closest("[data-pty-session-id]");return r&&r.dataset.ptySessionId?r.dataset.ptySessionId:t.closest("#output, .xterm")||h.terminalInteractive&&t.closest("#input-box")?h.selectedId:null}function AFe(e,t){var r=typeof e.name=="string"?e.name.trim():"",n=cw(e.type),a=n?"clipboard-image-"+Date.now()+"-"+((t||0)+1)+OSe(e.type):"attachment-"+Date.now()+"-"+((t||0)+1),o=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/i.test(r);return{file:e,name:n&&!o?a:r||a,size:e.size,previewUrl:null}}function HY(e){var t=[],r=Array.from(e||[]).slice(0,5);(e&&e.length||0)>5&&Ze("\u4E00\u6B21\u6700\u591A\u7C98\u8D34\u6216\u4E0A\u4F20 5 \u4E2A\u9644\u4EF6\u3002","warning");for(var n=0;n<r.length;n++){var a=r[n];if(a){if(a.size>SFe){Ze("\u6587\u4EF6\u8FC7\u5927\uFF08\u4E0A\u9650 10 MB\uFF09: "+(a.name||"\u526A\u8D34\u677F\u56FE\u7247"),"error");continue}t.push(AFe(a,n))}}return t}function GM(e,t){if(!t){var r=h.sessions.find(function(n){return n.id===e});t=r&&(r.provider||Tu(r.command||""))}return String(t||"").toLowerCase()==="codex"?!0:Ig(e)?fCe(e):!!(h.terminal&&h.terminal.modes&&h.terminal.modes.bracketedPasteMode)}var s9=Promise.resolve(),TK=0;function BFe(e,t){var r=s9;return s9=r.then(function(){return TK?Mk():void 0}).then(function(){return e.reduce(function(n,a,o){var l=n.then(function(){return TK+=1,fa(a.data,a.shortcutKey,"terminal",t)});return o<e.length-1?l.then(Mk):l},Promise.resolve())}),s9}function IFe(e,t,r,n){var a=BQ(t,{bracketedPaste:r,provider:n});return a.length?BFe(a,e):Promise.resolve()}function IC(e,t){var r=LY(t);if(!r)return!1;var n=HY(e);if(!n.length)return!0;var a=r.id,o=r.provider||Tu(r.command||""),l=n.filter(function(d){return cw(d.file&&d.file.type)}).length,u=GM(a,o);return Ze(l===n.length?"\u6B63\u5728\u7C98\u8D34\u56FE\u7247\u2026":"\u6B63\u5728\u4E0A\u4F20\u9644\u4EF6\u2026","info"),qY(a,n).then(function(d){return IFe(a,d,u,o).then(function(){var p=l===n.length?n.length+" \u5F20\u56FE\u7247":n.length+" \u4E2A\u9644\u4EF6",m=o==="codex"?"Codex":"CLI";Ze("\u5DF2\u5C06 "+p+"\u7C98\u8D34\u5230 "+m+" \u8F93\u5165\u533A\u3002","info")})}).catch(function(d){Ze("\u9644\u4EF6\u7C98\u8D34\u5931\u8D25: "+(d&&d.message||d),"error")}),!0}function rI(e){var t=Array.from(e||[]);if(t.length&&!(h.terminalInteractive&&IC(t)))for(var r=0;r<t.length;r++)MFe(t[r])}function MFe(e){if(e&&h.selectedId&&!(h.terminalInteractive&&IC([e]))){var t=HY([e]);if(t.length){var r=t[0];$Fe(e.type)&&(r.previewUrl=URL.createObjectURL(e)),At.edit(h.selectedId,{addAttachment:r}),Tw()}}}function TFe(e){At.edit(h.selectedId,{removeAttachment:e}),Tw()}function Mw(e){var t=e===void 0?h.selectedId:e;return At.read(t).attachments}function Tw(){var e=Mw(h.selectedId);X4e({resolve:function(){return e.map(function(t,r){return{index:r,name:t.name,sizeLabel:FFe(t.size),size:t.size,previewUrl:t.previewUrl||null}})},onRemove:function(t){TFe(t)}}),Ga()}function qY(e,t){var r=t||Mw(e);if(!r.length)return Promise.resolve([]);var n=new FormData;return r.forEach(function(a){n.append("files",a.file,a.name)}),fetch("/api/sessions/"+encodeURIComponent(e)+"/upload",{method:"POST",body:n,credentials:"same-origin"}).then(function(a){return a.ok?a.json():a.json().then(function(o){throw new Error(o.error||"\u4E0A\u4F20\u5931\u8D25")})}).then(function(a){return a.files||[]})}function jK(e){if(!e||!e.length)return"";var t=e.map(function(r){return r.savedPath});return`[\u9644\u4EF6\u5DF2\u4E0A\u4F20\uFF0C\u8BF7\u67E5\u770B\u4EE5\u4E0B\u6587\u4EF6:
294
- `+t.join(`
295
- `)+`]
296
-
297
- `}function _K(e,t){if(!e||hr(Va())||document.documentElement.classList.contains("is-wand-embed-terminal"))return!1;var r=e.value||"";if(!r)return!1;let n=di.read(h.selectedId),a=t?.data??r,o=FEe(a,t,n);if(!h.terminalInteractive){if(!n.ctrl||o===null||!h.selectedId)return!1;let l=Math.max(0,e.selectionStart-a.length);return e.value=At.read(h.selectedId).text,e.setSelectionRange(l,l),Ea(e),fa(o,"ctrl_"+a.toLowerCase()).catch(function(){}),!0}return fa(r===a&&o!==null?o:r,n.ctrl&&o!==null&&r===a?"ctrl_"+a.toLowerCase():"interactive_text").catch(function(){}),e.value="",Ea(e),Em("",!0),!0}function WY(e){var t=e&&e.clipboardData;if(!t)return[];var r=[],n=t.items;if(n){for(var a=0;a<n.length;a++)if(cw(n[a].type)){var o=n[a].getAsFile();o&&r.push(o)}}if(!r.length&&t.files)for(var l=0;l<t.files.length;l++)cw(t.files[l].type)&&r.push(t.files[l]);return r}function jFe(e){var t=DFe(e);if(!t||!LY(t))return!1;var r=WY(e);return r.length?(e.preventDefault(),IC(r,t)):!1}function _Fe(e){var t=WY(e);if(t.length){if(e.preventDefault(),h.terminalInteractive&&IC(t))return;rI(t);return}var r=e.clipboardData&&e.clipboardData.getData("text");if(r){if(e.preventDefault(),h.terminalInteractive){var n=Va(),a=n&&(n.provider||Tu(n.command||""));fa(DQ(r,GM(h.selectedId,a)),"paste").catch(function(){});return}var o=document.getElementById("input-box");o&&nI(o,r)}}function VY(e){return At.read(e).text}function Yk(e,t,r,n){if(e&&(At.edit(e,{text:String(t||""),persist:n}),!r&&e===h.selectedId)){var a=document.getElementById("input-box");a&&(a.value=t,Ea(a))}}function Am(e,t){if(e&&(At.edit(e,{clear:!0}),!t&&e===h.selectedId)){var r=document.getElementById("input-box");r&&(r.value="",Ea(r),km(r))}}function Em(e,t){Yk(h.selectedId,e,t)}function nI(e,t){if(!e)return"";if(e.readOnly||h.promptOptimizeRequest&&h.promptOptimizeRequest.sessionId===h.selectedId)return e.value;var r=e.selectionStart===null?e.value.length:e.selectionStart,n=e.selectionEnd===null?r:e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t,r,n,"end");else{var a=e.value;e.value=a.slice(0,r)+t+a.slice(n);var o=r+t.length;e.setSelectionRange(o,o)}return Em(e.value,!0),Ea(e),km(e),e.value}function mc(e){if(!(!e||e!==h.selectedId)){var t=document.getElementById("input-box");if(t){var r=VY(e);t.value=r,Ea(t);try{t.setSelectionRange(r.length,r.length)}catch{}}Tw()}}function MC(e,t){var r=t===void 0?h.selectedId:t;return Ns(h.sessions.find(n=>n.id===r))||jg.get(r)?.pending?!1:!!String(e||"").trim()||Mw(r).length>0}function NFe(){if(!h.promptOptimizeRequest){var e=document.getElementById("input-box"),t=document.getElementById("prompt-optimize-btn");if(e){var r=(e.value||"").trim(),n=h.selectedId;if(!r){typeof Ze=="function"&&Ze("\u8BF7\u5148\u8F93\u5165\u8981\u4F18\u5316\u7684\u5185\u5BB9\u3002","info"),e.focus();return}n&&At.edit(n,{text:e.value});var a={sessionId:n,revision:At.read(n).revision},o=document.activeElement===t,l=document.activeElement===e||o;h.promptOptimizeRequest=a,Ga();var u={text:r};n&&(u.sessionId=n),fetch("/api/optimize-prompt",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}).then(function(d){return d.text().then(function(p){var m={};if(p)try{m=JSON.parse(p)}catch{}return{ok:d.ok,status:d.status,data:m}})}).then(function(d){if(!d.ok)throw new Error(d.data&&d.data.error||"\u63D0\u793A\u8BCD\u4F18\u5316\u5931\u8D25\uFF08HTTP "+d.status+"\uFF09\u3002");var p=d.data&&d.data.optimized||"";if(!p)throw new Error("Claude \u8FD4\u56DE\u4E3A\u7A7A\u3002");if(n&&!At.edit(n,{text:p,expectedRevision:a.revision})){Ze("\u539F\u8349\u7A3F\u5DF2\u4FEE\u6539\uFF0C\u4FDD\u7559\u6700\u65B0\u5185\u5BB9\u3002","info");return}if(n&&h.selectedId!==n){typeof Ze=="function"&&Ze("\u63D0\u793A\u8BCD\u5DF2\u5199\u56DE\u539F\u4F1A\u8BDD\u8349\u7A3F\u3002","info");return}var m=document.getElementById("input-box");m&&PFe(m,p,n)}).catch(function(d){typeof Ze=="function"&&Ze(d&&d.message||"\u63D0\u793A\u8BCD\u4F18\u5316\u5931\u8D25\u3002","error");var p=document.getElementById("prompt-optimize-btn");p&&h.selectedId===n&&(p.classList.add("is-error"),setTimeout(function(){p.isConnected&&p.classList.remove("is-error")},800))}).finally(function(){if(h.promptOptimizeRequest===a&&(h.promptOptimizeRequest=null),Ga(),l&&h.selectedId===n){var d=document.getElementById("input-box");if(d)try{d.focus({preventScroll:!0})}catch{d.focus()}}})}}}function PFe(e,t,r){if(e){var n=r||h.selectedId,a=String(t||"");if(Yk(n,a,!0),!(n&&h.selectedId!==n)){e.value=a,Ea(e);try{e.setSelectionRange(a.length,a.length)}catch{}}}}function km(e){var t=document.querySelector(".input-composer");if(t){var r=e||document.getElementById("input-box"),n=!!(r&&String(r.value||"").trim());t.classList.toggle("has-text",n),Ga(!0)}}function cc(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var NK=B(_(),1),RFe=B(Ja(),1),OFe=B(Jt(),1);function Zy(e){return e==="completed"||e==="in_progress"?e:"pending"}function zFe(e){let t=0,r=0,n="";for(let o of e){let l=Zy(o.status);l==="completed"&&(t+=1),l==="in_progress"&&(r+=1,n||(n=o.activeForm||o.content||""))}if(!n){let o=e.find(l=>Zy(l.status)==="pending"&&!!(l.activeForm||l.content));n=o&&(o.activeForm||o.content)||""}let a=e.length;return{total:a,completed:t,inProgress:r,activeTask:n,ratio:a>0?t/a:0,allDone:a>0&&t===a}}var Gs=B(Ee(),1),bk=null,Jk=null,UY=[],aI=null,Ng=!1;function yk(e,t=!1){Ng!==e&&(Ng=e,e&&document.dispatchEvent(new CustomEvent("wand-composer-work-popup",{detail:"todo"})),GY(),t&&document.getElementById("todo-progress-toggle")?.focus({preventScroll:!0}))}function LFe({todos:e,context:t}){let r=zFe(e),n=`${r.completed}/${r.total}`;if(NK.useEffect(()=>{let d=p=>{p.detail!=="todo"&&yk(!1)};return document.addEventListener("wand-composer-work-popup",d),()=>document.removeEventListener("wand-composer-work-popup",d)},[]),!t)return null;let a=t.kind==="running",o=t.kind==="ended"?"\u5DF2\u7ED3\u675F":t.kind==="failed"?"\u5931\u8D25":t.label,l=e.find(d=>Zy(d.status)==="in_progress")??e.find(d=>Zy(d.status)==="pending"),u=r.allDone?"\u6E05\u5355\u5DF2\u5B8C\u6210":a?r.activeTask||"\u5C1A\u65E0\u5F53\u524D\u9879":l?.content||"\u53EA\u8BFB\u8BB0\u5F55";return(0,Gs.jsx)(ko,{open:Ng,onOpenChange:yk,side:"top",align:"center",className:"composer-work-popover composer-todo-popover",contentId:"todo-progress-body",contentRole:"dialog",popupOwner:"composer-todo",ariaLabel:"\u672C\u8F6E\u5F85\u529E\u8FDB\u5EA6",trigger:NK.cloneElement(W7({label:`\u5F85\u529E ${o}`,count:n,preview:u,icon:"task",expanded:Ng,id:"todo-progress-toggle",className:"todo-progress-header"}),{"aria-label":`\u5F85\u529E\uFF0C${t.label}\uFF0C\u5DF2\u5B8C\u6210 ${n}\uFF0C${u}\uFF0C\u67E5\u770B\u8BE6\u60C5`,"aria-controls":"todo-progress-body"}),children:(0,Gs.jsx)(V7,{className:"composer-todo-panel",title:`\u5F85\u529E \xB7 \u5DF2\u5B8C\u6210 ${n}`,description:a?r.allDone?"\u6E05\u5355\u5DF2\u5B8C\u6210\uFF0C\u4E0D\u4EE3\u8868\u6267\u884C\u7ED3\u675F\u6216\u4EFB\u52A1\u9A8C\u6536\u901A\u8FC7\u3002":void 0:`${t.label} \xB7 ${t.note}`,onClose:()=>yk(!1,!0),children:(0,Gs.jsx)("ol",{className:"composer-todo-list",id:"todo-progress-list","data-execution":t.kind,children:e.map((d,p)=>{let m=Zy(d.status);return(0,Gs.jsxs)("li",{"data-status":!a&&m==="in_progress"?"pending":m,"data-recorded-status":m,"aria-current":a&&m==="in_progress"?"step":void 0,children:[(0,Gs.jsx)("span",{className:"composer-todo-icon",role:"img","aria-label":m==="completed"?"\u5DF2\u5B8C\u6210":m==="in_progress"?a?"\u8FDB\u884C\u4E2D":"\u6700\u540E\u8BB0\u5F55\u9879\uFF0C\u975E\u8FD0\u884C\u4FE1\u53F7":"\u5F85\u5904\u7406",children:(0,Gs.jsx)(De,{name:m==="completed"?"check":"circle",size:16})}),(0,Gs.jsxs)("div",{"data-short":(d.content||"").length<=60,children:[m==="in_progress"&&(0,Gs.jsx)("span",{className:"composer-todo-status",children:a?`\u5F53\u524D \xB7 \u7B2C ${p+1} \u9879`:`\u6700\u540E\u8BB0\u5F55 \xB7 \u7B2C ${p+1} \u9879`}),(0,Gs.jsx)(U7,{text:d.content||"\uFF08\u672A\u63D0\u4F9B\u4EFB\u52A1\u6B63\u6587\uFF09"})]})]},`${t.sourceKey}:${p}:${d.content}`)})})})})}function GY(){!Jk||!bk?.isConnected||(0,OFe.flushSync)(()=>Jk.render((0,Gs.jsx)(sa,{children:(0,Gs.jsx)(LFe,{todos:UY,context:aI})})))}function HFe(e,t){let r=document.getElementById("todo-progress");r&&(bk!==r&&(Jk?.unmount(),bk=r,Jk=(0,RFe.createRoot)(bk),Ng=!1),aI?.sourceKey!==t?.sourceKey&&(Ng=!1),UY=e,aI=t,GY())}h._statusBarTimerId=null;h._statusBarStartTime=0;function KY(){yk(!1),document.getElementById("todo-progress")?.classList.add("hidden")}function XY(e,t){var r=document.querySelector("[data-composer-running-host]"),n=document.querySelector(".structured-status-bar"),a=document.querySelector(".input-composer");if(n&&r&&n.parentElement!==r&&r.appendChild(n),!t||!hr(t)){n&&n.remove(),a&&a.classList.remove("in-flight"),clearInterval(h._statusBarTimerId),h._statusBarTimerId=null;return}var o=t.structuredState&&t.structuredState.inFlight,l=t.structuredState&&t.structuredState.phase==="background"?"\u540E\u53F0\u4EFB\u52A1\u4E2D":"\u56DE\u590D\u4E2D";if(o){var u=n6(t);if(h._statusBarStartTime=u??0,a&&a.classList.add("in-flight"),!n&&r){var d=document.createElement("div");d.className="structured-status-bar",d.innerHTML='<span class="status-bar-dot"></span><span class="status-bar-label">'+l+'</span><span class="status-bar-timer">0.0s</span>',r.appendChild(d),n=d}else if(n&&n.classList.contains("completed")){n.classList.remove("completed"),n.style.animation="none",n.querySelector(".status-bar-label").textContent=l;var p=n.querySelector(".status-bar-dot");p&&(p.style.display="")}var m=n&&n.querySelector(".status-bar-label");m&&(m.textContent=l);var v=n&&n.querySelector(".status-bar-timer");v&&(v.hidden=u===null,u!==null&&(v.textContent=(Math.max(0,Date.now()-u)/1e3).toFixed(1)+"s")),u===null&&(clearInterval(h._statusBarTimerId),h._statusBarTimerId=null),!h._statusBarTimerId&&u!==null&&(h._statusBarTimerId=setInterval(function(){var S=document.querySelector(".structured-status-bar:not(.completed)");if(!S){clearInterval(h._statusBarTimerId),h._statusBarTimerId=null;return}var F=(Math.max(0,Date.now()-h._statusBarStartTime)/1e3).toFixed(1),$=S.querySelector(".status-bar-timer");$&&($.textContent=F+"s")},100))}else if(clearInterval(h._statusBarTimerId),h._statusBarTimerId=null,a&&a.classList.remove("in-flight"),n&&!n.classList.contains("completed")){var g=h._statusBarStartTime?((Date.now()-h._statusBarStartTime)/1e3).toFixed(1):"0.0";n.classList.add("completed"),n.querySelector(".status-bar-label").textContent="\u5B8C\u6210";var b=new Date,x=function(F){return F<10?"0"+F:String(F)},y=x(b.getHours())+":"+x(b.getMinutes())+":"+x(b.getSeconds()),E=n.querySelector(".status-bar-timer");E&&(E.hidden=!1,E.textContent=y,E.title="\u8017\u65F6 "+g+"s");var p=n.querySelector(".status-bar-dot");p&&(p.style.display="none"),h._statusBarStartTime=0,setTimeout(function(){n.classList.contains("completed")&&n.parentNode&&n.remove()},3e3)}}function qFe(e,t,r){var n=String(e||""),a=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),o=a>=0?n.slice(0,a+1):"",l=a>=0?n.slice(a+1):n;return'<span class="'+t+' tail-marquee-path" title="'+cc(n)+'"'+(r||"")+'><span class="tail-marquee-path-inner"><span class="tail-marquee-prefix">'+cc(o)+'</span><span class="tail-marquee-leaf">'+cc(l)+"</span></span></span>"}var WFe=/\.(png|jpe?g|gif|webp|svg|avif|bmp|ico|heic|heif)$/i;function VFe(e){if(typeof e!="string")return!1;var t=e.trim().split(/[?#]/)[0];return WFe.test(t)}function UFe(e){if(e){var t=function(){try{var r=e.firstElementChild&&e.firstElementChild.classList&&e.firstElementChild.classList.contains("tail-marquee-path-inner")?e.firstElementChild:null;if(r){var n=Math.max(0,r.scrollWidth-e.clientWidth);e.classList.toggle("is-overflowing",n>1),e.style.setProperty("--tail-marquee-shift",n+"px");var a=Math.max(4.8,n/18);e.style.setProperty("--tail-marquee-duration",Math.max(6.8,a/.68)+"s");return}e.scrollWidth>e.clientWidth&&(e.scrollLeft=e.scrollWidth)}catch{}};t(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(t)}}function QY(e){var t=e||document;!t||typeof t.querySelectorAll!="function"||t.querySelectorAll(".tail-marquee-path").forEach(function(r){UFe(r)})}var Tg=B(Ee(),1),Ay=new Map,nk=new Map,ew=null,By=null,Kd=null;function GFe(){return ew?Promise.resolve(ew):(By||(By=globalThis.__wandImportBrowserModule("a1195decf69de8a4").then(e=>(ew=e,By=null,e),e=>{throw By=null,e})),By)}var tw=null,Iy=null;function KFe(){return tw?Promise.resolve(tw):(Iy||(Iy=globalThis.__wandImportBrowserModule("1cdc7dc11ebbb0be").then(e=>(tw=e,Iy=null,e),e=>{throw Iy=null,e})),Iy)}var XFe={subscribe:At.subscribe.bind(At),revision:()=>At.read(h.selectedId).revision,text:()=>At.read(h.selectedId).text,isComposing:()=>h.composerComposing};function YY(){for(let[n,a]of nk)n.isConnected||(a.unmount(),nk.delete(n));let e=document.querySelector("[data-composer-avatar-host]"),t=h.sessions.find(n=>n.id===h.selectedId),r=t?{...t,ptyRunning:R0(t).ptyRunning,turnStartedAt:t.ptyTurnStartedAt,lastActivityAt:t.ptyLastActivityAt}:void 0;if(e){let n=nk.get(e)??(0,KK.createRoot)(e);nk.set(e,n),(0,XK.flushSync)(()=>n.render((0,Tg.jsxs)(Tg.Fragment,{children:[t?.employeeId?(0,Tg.jsx)(S$,{fileActivity:D$(r,t.messages),thinking:mf(r)==="executing",employee:{id:t.employeeId,name:t.employeeName||"\u5458\u5DE5",avatar:t.employeeAvatar}}):null,(0,Tg.jsx)(C$,{employeeName:t?.employeeId?t.employeeName||"\u5458\u5DE5":void 0,usage:k$(t?.messages??[]),activity:r,legacyStatus:t?.sessionKind==="structured"})]}))),XY(null,t)}}function Zk(e){if(!tw){Kd=e,KFe().then(()=>{let p=Kd;Kd=null,p&&Zk(p)},()=>{Kd=null});return}tw.mountComposerSurfaces(),YY();let t=h.sessions.find(p=>p.id===h.selectedId);ba("wand-sender-owned-input","[data-composer-sender] .ant-sender-input { width:100%; }");for(let[p,m]of Ay)p.isConnected||(m.root.unmount(),Ay.delete(p));let r=document.querySelector("[data-composer-sender]");if(!r)return;let n=t?.sessionKind==="structured",a=Ay.get(r);if(!n){if(a){let p=document.activeElement===a.input,m=r;m.moveBefore?m.moveBefore(a.input,null):(r.appendChild(a.input),p&&a.input.focus({preventScroll:!0})),a.root.unmount(),a.chrome.remove(),Ay.delete(r),a.input.className="input-textarea"}return}if(a)return;if(!ew){Kd=e,GFe().then(()=>{let p=Kd;Kd=null,p&&Zk(p)},()=>{Kd=null});return}let o=r.querySelector("#input-box");if(!o)return;let l=document.createElement("div");r.appendChild(l);let u=(0,KK.createRoot)(l);Ay.set(r,{root:u,chrome:l,input:o});let{ComposerSender:d}=ew;(0,XK.flushSync)(()=>u.render((0,Tg.jsx)(sa,{children:(0,Tg.jsx)(d,{input:o,resize:e,projection:XFe})})))}function QFe(e,t){let r=t.trim();if(!r)return e;let n=e.replace(/\\/g,"/").replace(/\/+$/,"");return n?`${n}/${r}`:`/${r}`}function Zl(e){let t=e.replace(/\\/g,"/").replace(/\/+$/,"");if(!t||t==="/")return"/";let r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}function YFe(e){let t=e.replace(/\\/g,"/").replace(/\/+$/,""),r=t.lastIndexOf("/");return r<0?t:t.slice(r+1)}function KM(e,t){let r=t.replace(/\\/g,"/").replace(/\/+$/,""),n=e.replace(/\\/g,"/").replace(/\/+$/,"");return r?n===r||n.startsWith(`${r}/`):!1}function XM(e,t,r){return{message:Ke(t.error,`${r} (HTTP ${e.status})`),status:e.status}}function JY(e){let t=Ke(e.path),r=Ke(e.name);if(!t||!r)return null;let n=e.type==="dir"?"dir":"file",a={path:t,name:r,type:n};typeof e.size=="number"&&Number.isFinite(e.size)&&(a.size=e.size),typeof e.mtime=="string"&&e.mtime&&(a.mtime=e.mtime);let o=ya(e.gitStatus)?e.gitStatus:void 0;if(o){let l={},u=Ke(o.staged),d=Ke(o.unstaged);(u==="added"||u==="modified"||u==="deleted"||u==="renamed")&&(l.staged=u),(d==="modified"||d==="deleted")&&(l.unstaged=d),o.untracked&&(l.untracked=!0),a.gitStatus=l}return a}async function TC(e,t,r,n,a){let o=await e(t,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),l=await $s(o);return!o.ok||typeof l.error=="string"?{ok:!1,failure:XM(o,l,n)}:{ok:!0,affectedPath:a}}var JFe=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ie(this,"fetchImpl",e)}async list(e,t){let r=await this.fetchImpl(`/api/directory?q=${encodeURIComponent(e)}&gitStatus=true`,{credentials:"same-origin",signal:t}),n=await $s(r);if(!r.ok||typeof n.error=="string")return{ok:!1,failure:XM(r,n,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25")};let a=Array.isArray(n.items)?n.items:[],o=[];for(let l of a){let u=ya(l)?JY(l):null;u&&o.push(u)}return{ok:!0,entries:o,truncated:!!n.truncated,total:Pa(n.total,o.length)}}async search(e,t,r,n=!1){let a=new URLSearchParams({q:e,cwd:t,depth:"5",limit:"80"});n&&a.set("includeGenerated","true");let o=await this.fetchImpl(`/api/file-search?${a.toString()}`,{credentials:"same-origin",signal:r}),l=await $s(o);if(!o.ok||typeof l.error=="string")return{ok:!1,failure:XM(o,l,"\u641C\u7D22\u5931\u8D25")};let u=Array.isArray(l.results)?l.results:[],d=[];for(let p of u){let m=ya(p)?JY(p):null;m&&d.push(m)}return{ok:!0,results:d,truncated:!!l.truncated}}createFile(e){return TC(this.fetchImpl,"/api/file-create",{path:e},"\u521B\u5EFA\u6587\u4EF6\u5931\u8D25",e)}createDir(e){return TC(this.fetchImpl,"/api/dir-create",{path:e},"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25",e)}rename(e,t){return TC(this.fetchImpl,"/api/file-rename",{from:e,to:t},"\u91CD\u547D\u540D\u5931\u8D25",t)}delete(e){return TC(this.fetchImpl,"/api/file-delete",{path:e},"\u5220\u9664\u5931\u8D25",e)}},ZFe=new JFe,e7e={openFile(){},notify(e,t){xn.toast(e,{tone:t})},async copyText(e){try{return await _f(e),!0}catch{return!1}},async confirmDelete(e,t){let r=await xn.dialog({title:"\u786E\u8BA4\u5220\u9664",description:`\u786E\u5B9A\u8981\u5220\u9664${t?"\u6587\u4EF6\u5939":"\u6587\u4EF6"}\u300C${e}\u300D\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002`,tone:"warning",actions:[{label:"\u53D6\u6D88",value:!1,kind:"secondary",autoFocus:!0},{label:"\u5220\u9664",value:!0,kind:"danger"}],dismissable:!0});return r.dismissed===!1&&r.action===!0},async promptForName(e,t){let r=await xn.dialog({title:e,input:{value:t,label:"\u540D\u79F0"},actions:[{label:"\u53D6\u6D88",value:"",kind:"secondary"},{label:"\u786E\u8BA4",value:"confirm",kind:"primary",autoFocus:!0}],dismissable:!0});return r.dismissed===!0||r.action!=="confirm"?null:(r.inputValue??"").trim()||null}};function t7e(e){let t=new Set,r={revision:0,root:"",activeDir:"",expanded:new Map,searchQuery:"",searchResults:null,searchFilter:"all",includeGenerated:!1,searchTruncated:!1,searchDurationMs:null,searching:!1,revealPath:null,busy:!1},n=e.runtime??e7e,a=new Map,o=null;function l($){r={...r,...$,revision:r.revision+1};for(let C of t)C()}function u($){l({expanded:new Map($)})}function d($,C){return $?.message||C}async function p($){a.get($)?.abort();let C=new AbortController;a.set($,C);let D=new Map(r.expanded);D.set($,{entries:[],status:"loading"}),u(D);try{let I=await e.repository.list($,C.signal);if(C.signal.aborted)return;let M=new Map(r.expanded);I.ok&&I.entries?M.set($,{entries:I.entries,status:"loaded"}):M.set($,{entries:[],status:"error",error:d(I.failure,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25")}),u(M)}catch(I){if(C.signal.aborted||Cd(I))return;let M=new Map(r.expanded);M.set($,{entries:[],status:"error",error:si(I,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25").message}),u(M)}finally{a.delete($)}}function m($){$&&(r.root!==$&&(o?.abort(),l({root:$,activeDir:$,searchQuery:"",searchResults:null,searching:!1,searchError:"",searchDurationMs:null,searchTruncated:!1,revealPath:null})),r.expanded.has($)||p($))}async function v($){if(o?.abort(),!$.trim()||!r.root){l({searchQuery:$,searchResults:null,searchDurationMs:null,searchTruncated:!1,searching:!1,searchError:""});return}let C=new AbortController;if(o=C,l({searchQuery:$,searching:!0,searchResults:null,searchTruncated:!1,searchError:"",revealPath:null}),await new Promise(I=>{let M=setTimeout(I,300);C.signal.addEventListener("abort",()=>{clearTimeout(M),I()},{once:!0})}),C.signal.aborted)return;let D=Date.now();try{let I=await e.repository.search($.trim(),r.root,C.signal,r.includeGenerated);if(C.signal.aborted)return;l({searching:!1,searchResults:I.ok&&I.results?I.results:[],searchDurationMs:I.ok?Date.now()-D:null,searchTruncated:!!(I.ok&&I.truncated),searchError:I.ok?"":d(I.failure,"\u641C\u7D22\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")})}catch(I){if(C.signal.aborted||Cd(I))return;l({searching:!1,searchResults:[],searchDurationMs:null,searchError:si(I,"\u641C\u7D22\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002").message})}}function g(){o?.abort(),o=null,l({searchQuery:"",searchResults:null,searchDurationMs:null,searchTruncated:!1,searching:!1,searchError:""})}async function b($){let C=r.root;if(!C||!KM($,C))return!1;g();let D=[],I=Zl($);for(;I!==C&&KM(I,C);){D.unshift(I);let P=Zl(I);if(P===I)break;I=P}for(let P of D)r.expanded.has(P)||await p(P);let M=Zl($),A=$===C,j=A||x(M,$);return j&&!A&&!r.expanded.has($)&&await p($),l({activeDir:j?$:M,revealPath:$}),!0}function x($,C){return r.expanded.get($)?.entries.some(D=>D.path===C&&D.type==="dir")??!1}function y($,C){let D=C.trim();return D?`${$.replace(/\/+$/,"")}/${D}`:$}function E($){let C=new Set;for(let D of $){let I=Zl(D);I&&r.expanded.has(I)&&C.add(I),r.root&&r.expanded.has(r.root)&&C.add(r.root),r.expanded.has(D)&&C.add(D)}for(let D of C)p(D)}function S($){E([$])}async function F($){switch($.type){case"setRoot":return m($.root),!0;case"navigate":return $.dir?(n.openDirectory?.($.dir),!0):!1;case"toggle":{let C=new Map(r.expanded);return C.get($.dir)?(C.delete($.dir),u(C),!0):(await p($.dir),!0)}case"expand":return await p($.dir),!0;case"refresh":{let C=$.dir??r.root;return C?(await p(C),!0):!1}case"reveal":return b($.path);case"reveal.done":return r.revealPath===null||l({revealPath:null}),!0;case"search.start":return await v($.query),!0;case"search.filter":return r.searchFilter===$.filter||l({searchFilter:$.filter}),!0;case"search.scope":return r.includeGenerated===$.includeGenerated||(l({includeGenerated:$.includeGenerated}),await v(r.searchQuery)),!0;case"search.clear":return g(),!0;case"create.file":{let C=y($.dir,$.name);l({busy:!0});try{let D=await e.repository.createFile(C);return D.ok?(n.notify("\u5DF2\u521B\u5EFA\u6587\u4EF6","success"),S($.dir),n.openFile(C)):n.notify(d(D.failure,"\u521B\u5EFA\u6587\u4EF6\u5931\u8D25"),"error"),D.ok}finally{l({busy:!1})}}case"create.dir":{let C=y($.dir,$.name);l({busy:!0});try{let D=await e.repository.createDir(C);return D.ok?(n.notify("\u5DF2\u521B\u5EFA\u6587\u4EF6\u5939","success"),S($.dir)):n.notify(d(D.failure,"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25"),"error"),D.ok}finally{l({busy:!1})}}case"rename":{l({busy:!0});try{let C=await e.repository.rename($.from,$.to);return C.ok?(n.notify("\u5DF2\u91CD\u547D\u540D","success"),S(Zl($.from))):n.notify(d(C.failure,"\u91CD\u547D\u540D\u5931\u8D25"),"error"),C.ok}finally{l({busy:!1})}}case"move":{l({busy:!0});try{let C=await e.repository.rename($.from,$.to);return C.ok?(n.notify("\u5DF2\u79FB\u52A8","success"),E([$.from,$.to])):n.notify(d(C.failure,"\u79FB\u52A8\u5931\u8D25"),"error"),C.ok}finally{l({busy:!1})}}case"delete":{let C=r.expanded.has($.path)||r.activeDir===$.path,D=(r.expanded.get(Zl($.path))?.entries??[]).find(I=>I.path===$.path)?.type==="dir"||C;if(!await n.confirmDelete($.path,D))return!1;l({busy:!0});try{let I=await e.repository.delete($.path);return I.ok?(n.notify("\u5DF2\u5220\u9664","success"),S(Zl($.path))):n.notify(d(I.failure,"\u5220\u9664\u5931\u8D25"),"error"),I.ok}finally{l({busy:!1})}}}}return{controller:{setRoot($){m($)},execute:F},store:{subscribe($){return t.add($),()=>t.delete($)},getSnapshot(){return r}},configureRuntime($){let C=n;return n=$,()=>{n===$&&(n=C)}}}}var ZY=t7e({repository:ZFe}),QM=ZY.controller,YM=ZY.store;var JM=B(Ee(),1);function ZM({id:e,icon:t,label:r,onClick:n}){return(0,JM.jsxs)(je,{kind:"ghost",id:e,type:"button",onClick:n,children:[(0,JM.jsx)(De,{name:t,size:14,strokeWidth:1.8,className:"plus-popover-icon"}),(0,JM.jsx)("span",{className:"plus-popover-label",children:r})]})}function eT(e){return e==="shell"?"":e===l0?"pi":e}function tT(e){return e===l0?"sdk":void 0}var Ii=B(_(),1),ps=B(Ee(),1);function jw({value:e,defaultValue:t,options:r,placeholder:n="\u8BF7\u9009\u62E9",displayValue:a,displayTitle:o,ariaLabel:l,id:u,"aria-describedby":d,"aria-invalid":p,triggerRef:m,disabled:v,triggerKind:g,searchable:b,searchPlaceholder:x="\u641C\u7D22",className:y,contentClassName:E,itemClassName:S,side:F="bottom",align:$="start",sideOffset:C=6,collisionPadding:D=12,popupOwner:I=l,onValueChange:M,onOpenChange:A}){let j=va(),P=h0();Ii.useEffect(()=>g0(I,P),[I,P]);let O=Ii.useId(),[V,W]=Ii.useState(t),H=e===void 0?V:e,[q,z]=Ii.useState(!1),L=Ii.useRef(!1),[U,Y]=Ii.useState(""),X=Kb(),J=Ii.useRef(null),N=Ii.useRef(null),R=Ii.useRef(null),K=Ii.useCallback(de=>{if(!de||R.current===de)return;let ve=requestAnimationFrame(()=>{!L.current||!de.isConnected||(R.current=de,de.focus({preventScroll:!0}))});return()=>cancelAnimationFrame(ve)},[]),Q=a??r.find(de=>de.value===H)?.label??n,ee=de=>{L.current=de,z(de),de||(Y(""),X.reset(),R.current=null),A?.(de)},te=jC(r,U),ne=[];te.forEach((de,ve)=>{de.group!==te[ve-1]?.group&&(de.group||te[ve-1]?.group)&&ne.push({type:"group",key:`group:${ve}`,label:de.group||"\u5176\u4ED6\u6A21\u578B",children:[]});let ye={key:de.value,label:de.label,title:de.label,disabled:de.disabled,role:"option","aria-selected":de.value===H,className:Je("wand-ui-select-item",S)};ne.push(ye)}),Qn(q,()=>{ee(!1),J.current?.focus({preventScroll:!0})}),Ii.useEffect(()=>{v&&q&&ee(!1)},[v,q]);let[me,se]=Ii.useState(null),he=Ii.useRef(null),le=Ii.useCallback(()=>me?Promise.resolve():(he.current||(he.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(de=>{se(()=>de.DropdownSurface)})),he.current),[me]);Ii.useEffect(()=>{q&&le()},[q,le]);let ke=(0,ps.jsxs)(je,{ref:de=>{if(J.current=de,typeof m=="function")return m(de);m&&(m.current=de)},kind:g,id:u,"aria-describedby":d,"aria-invalid":p,disabled:v,className:Je("wand-ui-select-trigger",y),"data-popup-open":q?"":void 0,"data-placeholder":H===void 0&&!a?"":void 0,"aria-controls":q?O:void 0,role:"combobox","aria-haspopup":"listbox","aria-expanded":q,"aria-label":l,title:o??Q,children:[(0,ps.jsx)("span",{className:"wand-ui-select-value",children:Q}),(0,ps.jsx)(De,{name:"chevronDown",size:14})]}),Ae=(0,ps.jsxs)(je,{ref:de=>{if(J.current=de,typeof m=="function")return m(de);m&&(m.current=de)},kind:g,id:u,"aria-describedby":d,"aria-invalid":p,disabled:v,className:Je("wand-ui-select-trigger",y),"data-popup-open":q?"":void 0,"data-placeholder":H===void 0&&!a?"":void 0,"aria-controls":q?O:void 0,role:"combobox","aria-haspopup":"listbox","aria-expanded":q,"aria-label":l,title:o??Q,onClick:()=>{v||ee(!0)},children:[(0,ps.jsx)("span",{className:"wand-ui-select-value",children:Q}),(0,ps.jsx)(De,{name:"chevronDown",size:14})]});return(0,ps.jsx)(Bt,{children:me?(0,ps.jsx)(me,{trigger:ke,open:q,triggers:["click"],disabled:v,onOpenChange:(de,ve)=>{ve.source==="trigger"&&ee(de)},getPopupContainer:()=>j??document.body,placement:ud(F,$),destroyOnHidden:!0,align:{offset:cd(F,C),overflow:{adjustX:!0,adjustY:!0,shiftX:D,shiftY:D}},classNames:{root:Je("wand-ui-select-content",b&&"wand-ui-select-searchable",E)},menu:{id:O,items:ne,role:"listbox",selectable:!0,selectedKeys:H===void 0?[]:[H],onClick:({key:de})=>{W(de),M?.(de),ee(!1),J.current?.focus({preventScroll:!0})}},popupRender:de=>(0,ps.jsxs)("div",{ref:N,"data-wand-popup-owner":I,children:[b&&(0,ps.jsx)(_u,{ref:K,type:"search","aria-label":x,placeholder:x,value:U,onChange:ve=>Y(ve.currentTarget.value),onCompositionStart:X.onCompositionStart,onCompositionEnd:X.onCompositionEnd,startSlot:(0,ps.jsx)(De,{name:"search",size:14}),onKeyDown:ve=>{if(!X.shouldIgnore(ve)&&(ve.key==="ArrowDown"||ve.key==="ArrowUp")){ve.preventDefault();let ye=N.current?.querySelectorAll('[role="option"]:not([aria-disabled="true"])');(ve.key==="ArrowUp"?ye?.[ye.length-1]:ye?.[0])?.focus()}}}),te.length?de:(0,ps.jsx)("div",{role:"status",children:"\u6CA1\u6709\u5339\u914D\u7684\u9009\u9879"})]})}):Ae})}function jC(e,t){return t.trim()?e.filter(r=>r7e(n7e(r),t)):e.slice()}function r7e(e,t){return t.trim().toLowerCase().split(/\s+/).filter(Boolean).every(r=>e.toLowerCase().includes(r))}function n7e(e){return`${e.value} ${e.label} ${e.group??""}`}var hc=B(_());function eJ(e){return t=>hc.createElement(ed,{theme:{token:{motion:!1,zIndexPopupBase:0}}},hc.createElement(e,{...t}))}var a7e=(e,t,r,n,a)=>eJ(o=>{let{prefixCls:l,style:u}=o,d=hc.useRef(null),[p,m]=hc.useState(0),[v,g]=hc.useState(0),[b,x]=qt(!1,o.open),{getPrefixCls:y}=hc.useContext(st),E=y(n||"select",l);hc.useEffect(()=>{if(x(!0),typeof ResizeObserver<"u"){let F=new ResizeObserver(C=>{let D=C[0].target;m(D.offsetHeight+8),g(D.offsetWidth)}),$=setInterval(()=>{let C=a?`.${a(E)}`:`.${E}-dropdown`,D=d.current?.querySelector(C);D&&(clearInterval($),F.observe(D))},10);return()=>{clearInterval($),F.disconnect()}}},[E]);let S={...o,style:{...u,margin:0},open:b,getPopupContainer:()=>d.current};return r&&(S=r(S)),t&&(S={...S,[t]:{overflow:{adjustX:!1,adjustY:!1}}}),hc.createElement("div",{ref:d,style:{paddingBottom:p,position:"relative",minWidth:v}},hc.createElement(e,{...S}))}),rT=a7e;var ka=B(_()),i7e=e=>{let{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:a}=e,o=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:n,"&:hover":{color:a,backgroundColor:n}}}}}},o7e=i7e,s7e=e=>{let{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:a,sizePopupArrow:o,antCls:l,iconCls:u,motionDurationMid:d,paddingBlock:p,fontSize:m,dropdownEdgeChildPadding:v,colorTextDisabled:g,fontSizeIcon:b,controlPaddingHorizontal:x,colorBgElevated:y,controlHeightLG:E}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(a).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:`calc(100vh - ${ue(e.calc(E).mul(2.5).equal())})`,overflowY:"auto"},[`&-trigger${l}-btn`]:{[`& > ${u}-down, & > ${l}-btn-icon > ${u}-down`]:{fontSize:b}},[`${t}-wrap`]:{position:"relative",[`${l}-btn > ${u}-down`]:{fontSize:b},[`${u}-down::before`]:{transition:`transform ${d}`}},[`${t}-wrap-open`]:{[`${u}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft,
298
- &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft,
299
- &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom,
300
- &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom,
301
- &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight,
302
- &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Uh},[`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft,
303
- &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft,
304
- &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top,
305
- &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top,
306
- &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight,
307
- &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Kh},[`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft,
308
- &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom,
309
- &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Gh},[`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft,
310
- &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top,
311
- &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Xh},[`&${l}-slide-right-enter${l}-slide-right-enter-active${t}-placement-right,
312
- &${l}-slide-right-appear${l}-slide-right-appear-active${t}-placement-right,
313
- &${l}-slide-right-enter${l}-slide-right-enter-active${t}-placement-rightTop,
314
- &${l}-slide-right-appear${l}-slide-right-appear-active${t}-placement-rightTop,
315
- &${l}-slide-right-enter${l}-slide-right-enter-active${t}-placement-rightBottom,
316
- &${l}-slide-right-appear${l}-slide-right-appear-active${t}-placement-rightBottom`]:{animationName:n2},[`&${l}-slide-left-enter${l}-slide-left-enter-active${t}-placement-left,
317
- &${l}-slide-left-appear${l}-slide-left-appear-active${t}-placement-left,
318
- &${l}-slide-left-enter${l}-slide-left-enter-active${t}-placement-leftTop,
319
- &${l}-slide-left-appear${l}-slide-left-appear-active${t}-placement-leftTop,
320
- &${l}-slide-left-enter${l}-slide-left-enter-active${t}-placement-leftBottom,
321
- &${l}-slide-left-appear${l}-slide-left-appear-active${t}-placement-leftBottom`]:{animationName:i2},[`&${l}-slide-right-leave${l}-slide-right-leave-active${t}-placement-right,
322
- &${l}-slide-right-leave${l}-slide-right-leave-active${t}-placement-rightTop,
323
- &${l}-slide-right-leave${l}-slide-right-leave-active${t}-placement-rightBottom`]:{animationName:a2},[`&${l}-slide-left-leave${l}-slide-left-leave-active${t}-placement-left,
324
- &${l}-slide-left-leave${l}-slide-left-leave-active${t}-placement-leftTop,
325
- &${l}-slide-left-leave${l}-slide-left-leave-active${t}-placement-leftBottom`]:{animationName:o2}}},o0(e,y),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...Tt(e),[r]:{padding:v,listStyleType:"none",backgroundColor:y,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Xn(e),"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${ue(p)} ${ue(x)}`,color:e.colorTextDescription,transition:`all ${d}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:m,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> a, > ${r}-item-label > a`]:{color:"inherit",transition:`all ${d}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:{display:"flex",margin:0,padding:`${ue(p)} ${ue(x)}`,color:e.colorText,fontWeight:"normal",fontSize:m,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${d}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Xn(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:y,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ue(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:b,fontStyle:"normal"}}},[`${r}-item-group-list`]:{margin:`0 ${ue(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(x).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:y,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[qo(e,"slide-up"),qo(e,"slide-down"),qo(e,"slide-left"),qo(e,"slide-right"),s2(e,"move-up"),s2(e,"move-down"),$u(e,"zoom-big")]]},l7e=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Yp({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...i0(e)}),u7e=pt("Dropdown",e=>{let{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:a}=e,o=yt(e,{menuCls:`${a}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[s7e(o),o7e(o)]},l7e,{resetStyle:!1}),nT=ka.forwardRef((e,t)=>{let{menu:r,arrow:n,prefixCls:a,children:o,trigger:l,disabled:u,dropdownRender:d,popupRender:p,getPopupContainer:m,overlayClassName:v,rootClassName:g,overlayStyle:b,open:x,onOpenChange:y,mouseEnterDelay:E=.15,mouseLeaveDelay:S=.1,autoAdjustOverflow:F=!0,placement:$="",transitionName:C,classNames:D,styles:I,destroyPopupOnHide:M,destroyOnHidden:A}=e,{getPrefixCls:j,direction:P,getPopupContainer:O,className:V,style:W,classNames:H,styles:q}=xt("dropdown"),z={...e,mouseEnterDelay:E,mouseLeaveDelay:S,autoAdjustOverflow:F},L=Ge(W),U=Ge(b),[Y,X]=Ct([H,D],[q,L,I,U],{props:z}),J={...X.root},N=p||d,R=Bh("Dropdown"),K=ka.useMemo(()=>{let Ne=j();return C!==void 0?C:$.startsWith("top")?`${Ne}-slide-down`:$.startsWith("left")?`${Ne}-slide-right`:$.startsWith("right")?`${Ne}-slide-left`:`${Ne}-slide-up`},[j,$,C]),Q=ka.useMemo(()=>$?$.includes("Center")?$.slice(0,$.indexOf("Center")):$:P==="rtl"?"bottomRight":"bottomLeft",[$,P]),ee=j("dropdown",a),te=yn(ee),[ne,me]=u7e(ee,te),[,se]=Ma(),he=ka.Children.only(vF(o)?ka.createElement("span",null,o):o),le=Za(t,Hi(he)),ke=Sr(he,{className:Z(`${ee}-trigger`,{[`${ee}-rtl`]:P==="rtl"},he.props.className),disabled:he.props.disabled??u,ref:le}),Ae=u?[]:l,de=!!Ae?.includes("contextMenu"),[ve,ye]=qt(!1,x),we=wt(Ne=>{y?.(Ne,{source:"trigger"}),ye(Ne)}),Oe=Z(v,g,ne,me,te,V,Y.root,{[`${ee}-rtl`]:P==="rtl"}),Fe=v2({arrowPointAtCenter:kt(n)&&n.pointAtCenter,autoAdjustOverflow:F,offset:se.marginXXS,arrowWidth:n?se.sizePopupArrow:0,borderRadius:se.borderRadius}),$e=wt(()=>{r?.selectable&&r?.multiple||(y?.(!1,{source:"menu"}),ye(!1))}),Me=()=>{let Ne=Ut(Y,["root"]),Qe=Ut(X,["root"]),ot;return r?.items&&(ot=ka.createElement(MB,{...r,classNames:{...Ne,subMenu:{...Ne}},styles:{...Qe,subMenu:{...Qe}}})),N&&(ot=N(ot)),ti(ot)?ot=ka.createElement("span",null,ot):ka.isValidElement(ot)||(ot=ka.createElement(ka.Fragment,null,ot)),ka.createElement(IB,{prefixCls:`${ee}-menu`,rootClassName:Z(me,te),expandIcon:ka.createElement("span",{className:`${ee}-menu-submenu-arrow`},P==="rtl"?ka.createElement(vd,{className:`${ee}-menu-submenu-arrow-icon`}):ka.createElement(Au,{className:`${ee}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:$e,validator:({mode:et})=>{}},ot)},[qe,ze]=Qp("Dropdown",J.zIndex),Te=ka.createElement(py,{alignPoint:de,...Ut(e,["rootClassName","onOpenChange"]),mouseEnterDelay:E,mouseLeaveDelay:S,visible:ve,builtinPlacements:Fe,arrow:!!n,overlayClassName:Oe,prefixCls:ee,getPopupContainer:m||O,transitionName:K,trigger:Ae,overlay:Me,placement:Q,onVisibleChange:we,overlayStyle:{...J,zIndex:qe},autoDestroy:A??M},ke);return qe&&(Te=ka.createElement(t0.Provider,{value:ze},Te)),Te}),c7e=rT(nT,"align",void 0,"dropdown",e=>e),d7e=e=>ka.createElement(c7e,{...e},ka.createElement("span",null));nT._InternalPanelDoNotUseOrYouWillBeFired=d7e;var aT=nT;var tJ=B(_(),1),rJ=B(Ee(),1);function _w(){let[e,t]=tJ.useState(null);return tJ.useEffect(()=>{if(e)return;let r=!0,n=!1,a=()=>{n||(n=!0,globalThis.__wandImportBrowserModule("e4f0f5105c74ead9").then(l=>{n=!1,r&&t(()=>l.WandToastRegion)},()=>{n=!1}))},o=GD(()=>{a()});return KD().length>0&&a(),()=>{r=!1,o()}},[e]),(0,rJ.jsx)(Bt,{children:e?(0,rJ.jsx)(e,{}):null})}var gc=B(_()),iT=B(_()),nJ=B(_()),p7e=e=>{let{prefixCls:t,className:r,style:n,size:a,shape:o}=e,l=Z({[`${t}-lg`]:a==="large",[`${t}-sm`]:a==="small"}),u=Z({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),d=nJ.useMemo(()=>Kn(a)?{width:a,height:a,lineHeight:`${a}px`}:{},[a]);return nJ.createElement("span",{className:Z(t,l,u,r),style:{...d,...n}})},_C=p7e,f7e=new Dt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),fT=e=>({height:e,lineHeight:ue(e)}),sp=e=>({width:e,...fT(e)}),m7e=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:f7e,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),oT=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...fT(e)}),h7e=e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:n,controlHeightLG:a,controlHeightSM:o}=e;return{[t]:{display:"inline-block",verticalAlign:"top",background:r,...sp(n)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...sp(a)},[`${t}${t}-sm`]:{...sp(o)}}},g7e=e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:n,controlHeightLG:a,controlHeightSM:o,gradientFromColor:l,calc:u}=e;return{[n]:{display:"inline-block",verticalAlign:"top",background:l,borderRadius:r,...oT(t,u)},[`${n}-lg`]:{...oT(a,u)},[`${n}-sm`]:{...oT(o,u)}}},iJ=e=>{let{gradientFromColor:t,borderRadiusSM:r,imageSizeBase:n,calc:a}=e;return{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:r,...sp(a(n).mul(2).equal())}},v7e=e=>({[e.skeletonNodeCls]:{...iJ(e)}}),b7e=e=>{let{skeletonImageCls:t,imageSizeBase:r,calc:n}=e;return{[t]:{...iJ(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...sp(r),maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},sT=(e,t,r)=>{let{skeletonButtonCls:n}=e;return{[`${r}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${n}-round`]:{borderRadius:t}}},lT=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...fT(e)}),y7e=e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:n,controlHeightLG:a,controlHeightSM:o,gradientFromColor:l,calc:u}=e;return{[r]:{display:"inline-block",verticalAlign:"top",background:l,borderRadius:t,width:u(n).mul(2).equal(),minWidth:u(n).mul(2).equal(),...lT(n,u)},...sT(e,n,r),[`${r}-lg`]:{...lT(a,u)},...sT(e,a,`${r}-lg`),[`${r}-sm`]:{...lT(o,u)},...sT(e,o,`${r}-sm`)}},w7e=e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:n,skeletonParagraphCls:a,skeletonButtonCls:o,skeletonInputCls:l,skeletonNodeCls:u,skeletonImageCls:d,controlHeight:p,controlHeightLG:m,controlHeightSM:v,gradientFromColor:g,padding:b,marginSM:x,borderRadius:y,titleHeight:E,blockRadius:S,paragraphLiHeight:F,controlHeightXS:$,paragraphMarginTop:C}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",[r]:{display:"inline-block",verticalAlign:"top",background:g,...sp(p)},[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:{...sp(m)},[`${r}-sm`]:{...sp(v)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:E,background:g,borderRadius:S,[`+ ${a}`]:{marginBlockStart:v}},[a]:{padding:0,"> li":{width:"100%",height:F,listStyle:"none",background:g,borderRadius:S,"+ li":{marginBlockStart:$}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${n}, ${a} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-section`]:{[n]:{marginBlockStart:x,[`+ ${a}`]:{marginBlockStart:C}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...y7e(e),...h7e(e),...g7e(e),...v7e(e),...b7e(e)},[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[l]:{width:"100%"}},[`${t}${t}-active`]:{[`
326
- ${n},
327
- ${a} > li,
328
- ${r},
329
- ${o},
330
- ${l},
331
- ${u},
332
- ${d}
333
- `]:{...m7e(e)}}}},x7e=e=>{let{colorFillContent:t,colorFill:r}=e,n=t,a=r;return{color:n,colorGradientEnd:a,gradientFromColor:n,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},Pw=pt("Skeleton",e=>{let{componentCls:t,calc:r}=e,n=yt(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return w7e(n)},x7e,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),E7e=e=>{let{prefixCls:t,className:r,classNames:n,rootClassName:a,active:o,style:l,styles:u,shape:d="circle",size:p,...m}=e,{getPrefixCls:v}=iT.useContext(st),g=v("skeleton",t),[b,x]=Pw(g),y=Ur(S=>p??S),E=Z(g,`${g}-element`,{[`${g}-active`]:o},n?.root,r,a,b,x);return iT.createElement("div",{className:E,style:u?.root},iT.createElement(_C,{prefixCls:`${g}-avatar`,className:n?.content,style:{...u?.content,...l},shape:d,size:y,...m}))},k7e=E7e,uT=B(_()),C7e=e=>{let{prefixCls:t,className:r,rootClassName:n,classNames:a,active:o,style:l,styles:u,block:d=!1,size:p,...m}=e,{getPrefixCls:v}=uT.useContext(st),g=v("skeleton",t),[b,x]=Pw(g),y=Ur(S=>p??S),E=Z(g,`${g}-element`,{[`${g}-active`]:o,[`${g}-block`]:d},a?.root,r,n,b,x);return uT.createElement("div",{className:E,style:u?.root},uT.createElement(_C,{prefixCls:`${g}-button`,className:a?.content,style:{...u?.content,...l},size:y,...m}))},S7e=C7e,Nw=B(_()),cT=B(_()),F7e=e=>{let{prefixCls:t,className:r,classNames:n,rootClassName:a,internalClassName:o,style:l,styles:u,active:d,children:p}=e,{getPrefixCls:m}=cT.useContext(st),v=m("skeleton",t),[g,b]=Pw(v),x=Z(v,`${v}-element`,{[`${v}-active`]:d},g,n?.root,r,a,b);return cT.createElement("div",{className:x,style:u?.root},cT.createElement("div",{className:Z(n?.content,o||`${v}-node`),style:{...u?.content,...l}},p))},oJ=F7e,$7e=e=>{let{getPrefixCls:t}=Nw.useContext(st),r=t("skeleton",e.prefixCls);return Nw.createElement(oJ,{...e,internalClassName:`${r}-image`},Nw.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${r}-image-svg`,"aria-hidden":"true",focusable:"false"},Nw.createElement("title",null,"Image placeholder"),Nw.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:`${r}-image-path`})))},D7e=$7e,dT=B(_()),A7e=e=>{let{prefixCls:t,className:r,classNames:n,rootClassName:a,active:o,block:l,style:u,styles:d,size:p,...m}=e,{getPrefixCls:v}=dT.useContext(st),g=v("skeleton",t),[b,x]=Pw(g),y=Ur(S=>p??S),E=Z(g,`${g}-element`,{[`${g}-active`]:o,[`${g}-block`]:l},n?.root,r,a,b,x);return dT.createElement("div",{className:E,style:d?.root},dT.createElement(_C,{prefixCls:`${g}-input`,className:n?.content,style:{...d?.content,...u},size:y,...m}))},B7e=A7e,aJ=B(_()),I7e=(e,t)=>{let{width:r,rows:n=2}=t;if(Array.isArray(r))return r[e];if(n-1===e)return r},M7e=e=>{let{prefixCls:t,className:r,style:n,rows:a=0}=e,o=Array.from({length:a}).map((l,u)=>aJ.createElement("li",{key:u,style:{width:I7e(u,e)}}));return aJ.createElement("ul",{className:Z(t,r),style:n},o)},T7e=M7e,j7e=B(_()),_7e=({prefixCls:e,className:t,width:r,style:n})=>j7e.createElement("h3",{className:Z(e,t),style:{width:r,...n}}),N7e=_7e;function pT(e){return kt(e)?e:{}}function P7e(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function R7e(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function O7e(e,t){let r={};return(!e||!t)&&(r.width="61%"),!e&&t?r.rows=3:r.rows=2,r}var Yg=gc.default.forwardRef((e,t)=>{let{prefixCls:r,loading:n,className:a,rootClassName:o,classNames:l,style:u,styles:d,children:p,avatar:m=!1,title:v=!0,paragraph:g=!0,active:b,round:x}=e,{getPrefixCls:y,direction:E,className:S,style:F,classNames:$,styles:C}=xt("skeleton"),D=y("skeleton",r),[I,M]=Pw(D),A={...e,avatar:m,title:v,paragraph:g},j=Ge(F),P=Ge(u),[O,V]=Ct([$,l],[C,j,d,P],{props:A}),W=gc.default.useRef(null);if(gc.default.useImperativeHandle(t,()=>({nativeElement:W.current})),n||!("loading"in e)){let H=!!m,q=!!v,z=!!g,L;if(H){let X={className:O.avatar,prefixCls:`${D}-avatar`,...P7e(q,z),...pT(m),style:V.avatar};L=gc.default.createElement("div",{className:Z(O.header,`${D}-header`),style:V.header},gc.default.createElement(_C,{...X}))}let U;if(q||z){let X;if(q){let N={className:O.title,prefixCls:`${D}-title`,...R7e(H,z),...pT(v),style:V.title};X=gc.default.createElement(N7e,{...N})}let J;if(z){let N={className:O.paragraph,prefixCls:`${D}-paragraph`,...O7e(H,q),...pT(g),style:V.paragraph};J=gc.default.createElement(T7e,{...N})}U=gc.default.createElement("div",{className:Z(O.section,`${D}-section`),style:V.section},X,J)}let Y=Z(D,{[`${D}-with-avatar`]:H,[`${D}-active`]:b,[`${D}-rtl`]:E==="rtl",[`${D}-round`]:x},O.root,S,a,o,I,M);return gc.default.createElement("div",{ref:W,className:Y,style:V.root},L,U)}return p??null});Yg.Button=S7e;Yg.Avatar=k7e;Yg.Input=B7e;Yg.Image=D7e;Yg.Node=oJ;var z7e=Yg,mT=z7e;var sJ=B(Ee(),1),L7e={neutral:void 0,accent:"var(--accent-solid)",info:"processing",success:"success",warning:"warning"};function uJ({className:e,tone:t="neutral",size:r,...n}){return(0,sJ.jsx)(Bt,{children:(0,sJ.jsx)(xd,{...n,color:L7e[t],className:Je("wand-ui-badge",`wand-ui-badge-${t}`,e)})})}var nl=B(_()),H7e=B(_()),q7e=H7e.default.createContext({}),bT=q7e,eu=B(_()),hT=B(_()),cJ=({children:e})=>{let{getPrefixCls:t}=hT.useContext(st),r=t("breadcrumb"),n=hT.useContext(bT),{classNames:a,styles:o}=n;return hT.createElement("li",{className:Z(`${r}-separator`,a?.separator),style:o?.separator,"aria-hidden":"true"},e===""?e:e??"/")};cJ.__ANT_BREADCRUMB_SEPARATOR=!0;var yT=cJ,lJ=B(_());function W7e(e,t){if(!Lt(e.title))return null;let r=Object.keys(t).join("|");return kt(e.title)?e.title:String(e.title).replace(new RegExp(`:(${r})`,"g"),(n,a)=>t[a]||n)}function dJ(e,t,r,n){if(!Lt(r))return null;let{className:a,onClick:o,...l}=t,u={...ei(l,{data:!0,aria:!0}),onClick:o};return n!==void 0?lJ.createElement("a",{...u,className:Z(`${e}-link`,a),href:n},r):lJ.createElement("span",{...u,className:Z(`${e}-link`,a)},r)}function V7e(e,t){return(r,n,a,o,l)=>{if(t)return t(r,n,a,o);let u=W7e(r,n);return dJ(e,r,u,l)}}var pJ=e=>{let{prefixCls:t,separator:r="/",children:n,menu:a,dropdownProps:o,href:l,dropdownIcon:u}=e,d=eu.useContext(bT),{classNames:p,styles:m}=d,v=(g=>{if(a){let b={...o};if(a){let{items:x,...y}=a||{};b.menu={...y,items:x?.map(({key:E,title:S,label:F,path:$,...C},D)=>{let I=F??S;return $&&(I=eu.createElement("a",{href:`${l}${$}`},I)),{...C,key:E??D,label:I}})}}return eu.createElement(aT,{placement:"bottom",...b},eu.createElement("span",{className:`${t}-overlay-link`},g,u))}return g})(n);return zr(v)?eu.createElement(eu.Fragment,null,eu.createElement("li",{className:Z(`${t}-item`,p?.item),style:m?.item},v),Lt(r)&&eu.createElement(yT,null,r)):null},fJ=e=>{let{prefixCls:t,children:r,href:n,...a}=e,{getPrefixCls:o}=eu.useContext(st),l=o("breadcrumb",t);return eu.createElement(pJ,{...a,prefixCls:l},dJ(l,a,r,n))};fJ.__ANT_BREADCRUMB_ITEM=!0;var U7e=fJ,G7e=e=>{let{componentCls:t,iconCls:r,calc:n}=e;return{[t]:{...Tt(e),color:e.itemColor,fontSize:e.fontSize,[r]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},[`${t}-item a`]:{color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${ue(e.paddingXXS)}`,borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",marginInline:n(e.marginXXS).mul(-1).equal(),"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover},...Xn(e)},[`${t}-item:last-child`]:{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{"> svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},[`
334
- > ${r} + span,
335
- > ${r} + a,
336
- > svg + span,
337
- > svg + a
338
- `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",padding:`0 ${ue(e.paddingXXS)}`,marginInline:n(e.marginXXS).mul(-1).equal(),[`> ${r}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}}},K7e=e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}),X7e=pt("Breadcrumb",e=>{let t=yt(e,{});return G7e(t)},K7e),Q7e=B(_());function Y7e(e){let{breadcrumbName:t,children:r,...n}=e,a={title:t,...n};return r&&(a.menu={items:r.map(({breadcrumbName:o,...l})=>({...l,title:o}))}),a}function J7e(e,t){return(0,Q7e.useMemo)(()=>e||(t?t.map(Y7e):null),[e,t])}var Z7e=(e,t)=>{if(t===void 0)return t;let r=(t||"").replace(/^\//,"");return Object.keys(e).forEach(n=>{r=r.replace(`:${n}`,e[n])}),r},e3e=(e,t)=>{let{prefixCls:r,separator:n,style:a,className:o,rootClassName:l,routes:u,items:d,children:p,itemRender:m,params:v={},classNames:g,styles:b,dropdownIcon:x,...y}=e,{getPrefixCls:E,direction:S,className:F,style:$,classNames:C,styles:D,separator:I,dropdownIcon:M}=xt("breadcrumb"),A=n??I??"/",j=x??M??nl.createElement(v1,null),P,O=E("breadcrumb",r),[V,W]=X7e(O),H=J7e(d,u),q=nl.useMemo(()=>({...e,separator:A}),[e,A]),z=Ge($),L=Ge(a),[U,Y]=Ct([C,g],[D,z,b,L],{props:q}),X=V7e(O,m);if(H&&H.length>0){let Q=[],ee=d||u;P=H.map((te,ne)=>{let{path:me,key:se,type:he,menu:le,onClick:ke,className:Ae,style:de,separator:ve,dropdownProps:ye}=te,we=Z7e(v,me);we!==void 0&&Q.push(we);let Oe=se??ne;if(he==="separator")return nl.createElement(yT,{key:Oe},ve);let Fe={},$e=ne===H.length-1;le&&(Fe.menu=le);let{href:Me}=te;return Q.length&&we!==void 0&&(Me=`#/${Q.join("/")}`),nl.createElement(pJ,{key:Oe,...Fe,...ei(te,{data:!0,aria:!0}),className:Ae,style:de,dropdownProps:ye,dropdownIcon:j,href:Me,separator:$e?"":A,onClick:ke,prefixCls:O},X(te,v,ee,Q,Me))})}else if(p){let Q=xr(p).length;P=xr(p).map((ee,te)=>{if(!ee)return ee;let ne=te===Q-1;return Sr(ee,{separator:ne?"":A,key:te})})}let J=Z(O,F,{[`${O}-rtl`]:S==="rtl"},o,l,U.root,V,W),N={...Y.root},R=nl.useMemo(()=>({classNames:U,styles:Y}),[U,Y]),K=nl.useRef(null);return nl.useImperativeHandle(t,()=>({nativeElement:K.current})),nl.createElement(bT.Provider,{value:R},nl.createElement("nav",{ref:K,className:J,style:N,...y},nl.createElement("ol",null,P)))},t3e=nl.forwardRef(e3e),r3e=t3e,wT=r3e;wT.Item=U7e;wT.Separator=yT;var n3e=wT,Rw=B(Ee(),1);function mJ({items:e,variant:t="compact",className:r,ariaLabel:n="\u9762\u5305\u5C51"}){return(0,Rw.jsx)(Bt,{children:(0,Rw.jsx)(n3e,{className:Je("wand-crumb",t==="title"?"is-title":"is-compact",r),"aria-label":n,items:e.map((a,o)=>({title:o===e.length-1?t==="title"?(0,Rw.jsx)("h1",{"aria-current":"page",children:a.label}):(0,Rw.jsx)("strong",{"aria-current":"page",children:a.label}):(0,Rw.jsx)(je,{kind:"ghost",size:"small",type:"button",onClick:a.onNavigate,children:a.label})}))})})}var a3e=B(_(),1),rl=B(_()),i3e=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},o3e=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:a,textPaddingInline:o,orientationMargin:l,verticalMarginInline:u}=e,d=`${t}-rail`;return{[t]:{...Tt(e),borderBlockStart:`${ue(a)} solid ${n}`,[d]:{borderBlockStart:`${ue(a)} solid ${n}`},"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:u,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${ue(a)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${ue(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${ue(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,[`${d}-start, ${d}-end`]:{width:"50%",borderBlockStartColor:"inherit",borderBlockEnd:0,content:"''"}},[`&-horizontal${t}-with-text-start`]:{[`${d}-start`]:{width:`calc(${l} * 100%)`},[`${d}-end`]:{width:`calc(100% - ${l} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${d}-start`]:{width:`calc(100% - ${l} * 100%)`},[`${d}-end`]:{width:`calc(${l} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${ue(a)} 0 0`,[d]:{borderBlockStart:`${ue(a)} dashed ${n}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${d}-start, ${d}-end`]:{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${ue(a)} 0 0`,[d]:{borderBlockStart:`${ue(a)} dotted ${n}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${d}-start`]:{width:0},[`${d}-end`]:{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${d}-start`]:{width:"100%"},[`${d}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}}}},s3e=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),l3e=pt("Divider",e=>{let t=yt(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[o3e(t),i3e(t)]},s3e,{unitless:{orientationMargin:!0}}),u3e=["left","right","center","start","end"],c3e=rl.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,className:a,style:o,classNames:l,styles:u}=xt("divider"),{prefixCls:d,type:p,orientation:m,vertical:v,titlePlacement:g,orientationMargin:b,className:x,rootClassName:y,children:E,dashed:S,variant:F="solid",plain:$,style:C,size:D,classNames:I,styles:M,...A}=e,j=r("divider",d),P=`${j}-rail`,[O,V]=l3e(j),W=Ur(D),H=!!E,q=u3e.includes(m||""),z=rl.useMemo(()=>{let me=g??(q?m:"center");return me==="left"?n==="rtl"?"end":"start":me==="right"?n==="rtl"?"start":"end":me},[n,m,g,q]),L=z==="start"&&b!=null,U=z==="end"&&b!=null,[Y,X]=Vo(m,v,p),J={...e,orientation:Y,titlePlacement:z,size:W},N=Ge(o),[R,K]=Ct([l,I],[u,N,M],{props:J}),Q=Z(j,a,O,V,`${j}-${Y}`,{[`${j}-with-text`]:H,[`${j}-with-text-${z}`]:H,[`${j}-dashed`]:!!S,[`${j}-${F}`]:F!=="solid",[`${j}-plain`]:!!$,[`${j}-rtl`]:n==="rtl",[`${j}-no-default-orientation-margin-start`]:L,[`${j}-no-default-orientation-margin-end`]:U,[`${j}-md`]:W==="medium"||W==="middle",[`${j}-sm`]:W==="small",[P]:!E,[R.rail]:R.rail&&!E},x,y,R.root),ee=rl.useMemo(()=>Kn(b)?b:/^\d+$/.test(b)?Number(b):b,[b]),te={marginInlineStart:L?ee:void 0,marginInlineEnd:U?ee:void 0},ne=rl.useRef(null);return rl.useImperativeHandle(t,()=>({nativeElement:ne.current})),rl.createElement("div",{ref:ne,className:Q,style:{...K.root,...E?{}:K.rail,...C},...A,role:"separator"},E&&!X&&rl.createElement(rl.Fragment,null,rl.createElement("div",{className:Z(P,`${P}-start`,R.rail),style:K.rail}),rl.createElement("span",{className:Z(`${j}-inner-text`,R.content),style:{...te,...K.content}},E),rl.createElement("div",{className:Z(P,`${P}-end`,R.rail),style:K.rail})))}),hJ=c3e,lp=B(Ee(),1),gJ=(0,a3e.forwardRef)(function({label:e,icon:t,hint:r,shortcut:n,tone:a="default",selected:o,className:l,type:u,...d},p){return(0,lp.jsxs)(je,{kind:a==="danger"?"danger":"ghost",...d,onClick:d.onClick,ref:p,type:u??"button",role:d.role??"menuitem","aria-checked":o===void 0?d["aria-checked"]:o,className:Je("wand-ui-menu-item",a==="danger"&&"wand-ui-menu-item-danger",l),children:[t?(0,lp.jsx)(De,{className:"wand-ui-menu-item-icon",name:t,size:15}):null,(0,lp.jsx)("span",{className:"wand-ui-menu-item-label",children:e}),r!=null?(0,lp.jsx)("span",{className:"wand-ui-menu-item-hint",children:r}):null,n?(0,lp.jsx)("span",{className:"wand-ui-menu-item-hint",children:n}):null]})});function vJ({className:e}){return(0,lp.jsx)(hJ,{className:Je("wand-ui-menu-separator",e)})}function d3e({children:e,className:t}){return(0,lp.jsx)("div",{className:Je("wand-ui-menu-label",t),children:e})}function p3e({children:e,className:t}){return(0,lp.jsx)("div",{className:Je("wand-ui-menu",t),children:e})}var gT=B(Ee(),1);function bJ({className:e,effect:t="shimmer",...r}){return(0,gT.jsx)(Bt,{children:(0,gT.jsx)("div",{...r,"aria-hidden":"true",className:Je("wand-ui-skeleton",e),children:(0,gT.jsx)(mT.Input,{active:t!=="none",block:!0,size:"small"})})})}var Jg=B(_()),Ow=B(_());function vT(){return vT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vT.apply(this,arguments)}var yJ=Ow.forwardRef(({prefixCls:e="rc-switch",className:t,checked:r,defaultChecked:n,disabled:a,loadingIcon:o,checkedChildren:l,unCheckedChildren:u,onClick:d,onChange:p,onKeyDown:m,styles:v,classNames:g,...b},x)=>{let[y,E]=qt(n??!1,r);function S(D,I){let M=y;return a||(M=D,E(M),p?.(M,I)),M}function F(D){D.which===vn.LEFT?S(!1,D):D.which===vn.RIGHT&&S(!0,D),m?.(D)}function $(D){let I=S(!y,D);d?.(I,D)}let C=Z(e,t,{[`${e}-checked`]:y,[`${e}-disabled`]:a});return Ow.createElement("button",vT({},b,{type:"button",role:"switch","aria-checked":y,disabled:a,className:C,ref:x,onKeyDown:F,onClick:$}),o,Ow.createElement("span",{className:`${e}-inner`},Ow.createElement("span",{className:Z(`${e}-inner-checked`,g?.content),style:v?.content},l),Ow.createElement("span",{className:Z(`${e}-inner-unchecked`,g?.content),style:v?.content},u)))});yJ.displayName="Switch";var f3e=yJ,m3e=e=>{let{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:o,innerMaxMarginSM:l,handleSizeSM:u,calc:d}=e,p=`${t}-inner`,m=ue(d(u).add(d(n).mul(2)).equal()),v=ue(d(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:r,lineHeight:ue(r),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:o,[`${p}-checked, ${p}-unchecked`]:{minHeight:r},[`${p}-checked`]:{marginInlineStart:`calc(-100% + ${m} - ${v})`,marginInlineEnd:`calc(100% - ${m} + ${v})`},[`${p}-unchecked`]:{marginTop:d(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:u,height:u},[`${t}-loading-icon`]:{top:d(d(u).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:l,[`${p}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${p}-unchecked`]:{marginInlineStart:`calc(100% - ${m} + ${v})`,marginInlineEnd:`calc(-100% + ${m} - ${v})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ue(d(u).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${p}`]:{[`${p}-unchecked`]:{marginInlineStart:d(e.marginXXS).div(2).equal(),marginInlineEnd:d(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${p}`]:{[`${p}-checked`]:{marginInlineStart:d(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:d(e.marginXXS).div(2).equal()}}}}}}},h3e=e=>{let{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},g3e=e=>{let{componentCls:t,trackPadding:r,handleBg:n,handleShadow:a,handleSize:o,calc:l}=e,u=`${t}-handle`;return{[t]:{[u]:{position:"absolute",top:r,insetInlineStart:r,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,...Wo(),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:l(o).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""',...Qh()}},[`&${t}-checked ${u}`]:{insetInlineStart:`calc(100% - ${ue(l(o).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${u}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${u}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},v3e=e=>{let{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:o,handleSize:l,switchDuration:u,calc:d}=e,p=`${t}-inner`,m=ue(d(l).add(d(n).mul(2)).equal()),v=ue(d(o).mul(2).equal());return{[t]:{[p]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:a,transition:["padding-inline-start","padding-inline-end"].map(g=>`${g} ${u} ease-in-out`).join(", "),...Wo(),[`${p}-checked, ${p}-unchecked`]:{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:"none",minHeight:r,transition:["margin-inline-start","margin-inline-end"].map(g=>`${g} ${u} ease-in-out`).join(", "),...Wo()},[`${p}-checked`]:{marginInlineStart:`calc(-100% + ${m} - ${v})`,marginInlineEnd:`calc(100% - ${m} + ${v})`},[`${p}-unchecked`]:{marginTop:d(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${p}`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${p}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${p}-unchecked`]:{marginInlineStart:`calc(100% - ${m} + ${v})`,marginInlineEnd:`calc(-100% + ${m} - ${v})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${p}`]:{[`${p}-unchecked`]:{marginInlineStart:d(n).mul(2).equal(),marginInlineEnd:d(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${p}`]:{[`${p}-checked`]:{marginInlineStart:d(n).mul(-1).mul(2).equal(),marginInlineEnd:d(n).mul(2).equal()}}}}}},b3e=e=>{let{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:{...Tt(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:ue(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",...Wo(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...Xn(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}}}},y3e=e=>{let{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:a}=e,o=t*r,l=n/2,u=2,d=o-u*2,p=l-u*2;return{trackHeight:o,trackHeightSM:l,trackMinWidth:d*2+u*4,trackMinWidthSM:p*2+u*2,trackPadding:u,handleBg:a,handleSize:d,handleSizeSM:p,handleShadow:`0 2px 4px 0 ${new Ar("#00230b").setA(.2).toRgbString()}`,innerMinMargin:d/2,innerMaxMargin:d+u+u*2,innerMinMarginSM:p/2,innerMaxMarginSM:p+u+u*2}},w3e=pt("Switch",e=>{let t=yt(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[b3e(t),v3e(t),g3e(t),h3e(t),m3e(t)]},y3e),x3e=Jg.forwardRef((e,t)=>{let{prefixCls:r,size:n,disabled:a,loading:o,className:l,rootClassName:u,style:d,checked:p,value:m,defaultChecked:v,defaultValue:g,onChange:b,styles:x,classNames:y,...E}=e,[S,F]=qt(v??g??!1,p??m),{getPrefixCls:$,direction:C,className:D,style:I,classNames:M,styles:A}=xt("switch"),j=Jg.useContext(ja),P=(a??j)||o,O=$("switch",r),[V,W]=w3e(O),H=Ur(n),q={...e,size:H,disabled:P},z=Ge(I),L=Ge(d),[U,Y]=Ct([M,y],[A,z,x,L],{props:q}),X=Jg.createElement("div",{className:Z(`${O}-handle`,U.indicator),style:Y.indicator},o&&Jg.createElement(Gp,{className:`${O}-loading-icon`})),J=Z(D,{[`${O}-small`]:H==="small",[`${O}-loading`]:o,[`${O}-rtl`]:C==="rtl"},l,u,U.root,V,W);return Jg.createElement(rd,{component:"Switch",disabled:P},Jg.createElement(f3e,{...E,classNames:U,styles:Y,checked:S,onChange:(...N)=>{F(N[0]),b?.(...N)},prefixCls:O,className:J,style:Y.root,disabled:P,ref:t,loadingIcon:X}))}),wJ=x3e;wJ.__ANT_SWITCH=!0;var xJ=wJ,E3e=B(_(),1),NC=B(Ee(),1);function EJ({checked:e,onCheckedChange:t,ariaLabel:r,label:n,disabled:a,className:o,id:l,size:u="lg"}){let d=(0,E3e.useId)(),p=l??d;return(0,NC.jsxs)("div",{className:Je("wand-ui-switch-row",o),children:[(0,NC.jsx)(Bt,{children:(0,NC.jsx)(xJ,{id:p,size:u==="sm"?"small":"default",className:"wand-ui-switch",checked:e,disabled:a,"aria-label":r,onChange:t})}),n?(0,NC.jsx)("label",{htmlFor:p,children:n}):null]})}var kJ={};ws(kJ,{PortalContainerProvider:()=>id,REACT_UI_PORTALS_ID:()=>of,WandBadge:()=>uJ,WandBrandMark:()=>Pu,WandBreadcrumb:()=>mJ,WandButton:()=>je,WandChip:()=>qu,WandDialog:()=>xf,WandDialogSurface:()=>Cl,WandDropdownMenu:()=>Ed,WandDropdownMenuContent:()=>Hu,WandDropdownMenuItem:()=>rn,WandDropdownMenuSeparator:()=>Ms,WandDropdownMenuTrigger:()=>Lu,WandIcon:()=>De,WandIconButton:()=>Fr,WandInput:()=>_u,WandMenu:()=>p3e,WandMenuItem:()=>gJ,WandMenuLabel:()=>d3e,WandMenuSeparator:()=>vJ,WandNavigation:()=>xD,WandNavigationItem:()=>kD,WandNavigationLink:()=>CD,WandNavigationList:()=>ED,WandPopover:()=>ko,WandSearchField:()=>by,WandSelect:()=>jw,WandSkeleton:()=>bJ,WandStretchTabs:()=>Z1,WandSwitch:()=>EJ,WandTabs:()=>SB,WandToastRegion:()=>_w,WandUiBoundary:()=>Bt,WandUiProvider:()=>sa,filterSelectOptions:()=>jC,isWandPopupOwnedBy:()=>lf,showWandToast:()=>B1,usePortalContainer:()=>va,wandTheme:()=>od,workspaceTaskIconName:()=>AF});var k3e=()=>Ya()&&window.document.documentElement;var PJ="wand-legacy-pwa-cleanup-v1",C3e=["wand-static-","wand-runtime-"];function RC(e){if(!e)return!1;try{let t=new URL(e.scriptURL,location.href);return t.origin===location.origin&&t.pathname==="/sw.js"}catch{return!1}}function S3e(e){return RC(e.installing)||RC(e.waiting)||RC(e.active)}function F3e(){try{return localStorage.getItem(PJ)==="done"}catch{return!1}}function $3e(){try{localStorage.setItem(PJ,"done")}catch{}}async function D3e(){if(!("serviceWorker"in navigator))return!0;try{let e=(await navigator.serviceWorker.getRegistrations()).filter(S3e);return await Promise.all(e.map(t=>t.unregister())),!0}catch{return!1}}async function A3e(){if(!("caches"in window))return!0;try{let e=(await caches.keys()).filter(t=>C3e.some(r=>t.startsWith(r)));return await Promise.all(e.map(t=>caches.delete(t))),!0}catch{return!1}}async function B3e(){if(F3e())return;let e="serviceWorker"in navigator&&RC(navigator.serviceWorker.controller),[t,r]=await Promise.all([D3e(),A3e()]);!t||!r||($3e(),e&&location.reload())}B3e();var I3e=B(Ja(),1),M3e="wand.reactUi.enabled";function CJ(e){if(e==null||e==="")return null;let t=e.trim().toLowerCase();return["1","true","on","enabled"].includes(t)?!0:["0","false","off","disabled"].includes(t)?!1:null}function T3e(e=window){try{let r=CJ(new URL(e.location.href).searchParams.get("reactUi"));if(r!=null)return r}catch{}let t=e.__wandFeatureFlags?.reactUi;if(typeof t=="boolean")return t;try{let r=CJ(e.localStorage.getItem(M3e));if(r!=null)return r}catch{}return!0}var j3e=B(_(),1),Zg=B(_(),1),RJ=B(_(),1),fs=B(Ee(),1),_3e=RJ.lazy(()=>globalThis.__wandImportBrowserModule("4d02d91878bb9936").then(e=>({default:e.RestartProgress})));function N3e({controller:e=Xl}){let t=(0,Zg.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot),r=FI(t),n=(0,Zg.useRef)(null),a=(0,Zg.useRef)(null),o=(0,Zg.useRef)(null);(0,Zg.useEffect)(()=>{if(!t.open)return;let d=a.current?.ownerDocument??document,p=m=>{a.current&&(m.stopPropagation(),a.current.contains(m.target)||(n.current??o.current)?.focus({preventScroll:!0}))};return d.addEventListener("focusin",p,!0),()=>{d.removeEventListener("focusin",p,!0)}},[t.open]),(0,Zg.useEffect)(()=>{t.phase==="timed-out"&&n.current?.focus()},[t.phase]);let l=t.phase==="waiting"||t.phase==="checking",u=t.maxAttempts>0?Math.min(100,Math.round(Math.min(t.attempts,t.maxAttempts)/t.maxAttempts*100)):0;return(0,fs.jsx)(fs.Fragment,{children:(0,fs.jsx)(Cl,{open:t.open,onOpenChange:()=>{},title:r.title,description:r.description,className:"wand-restart-surface",width:{xs:"calc(100vw - 32px)",sm:520},zIndex:(od.token?.zIndexPopupBase??1e3)+2e3,styles:{wrapper:{padding:"max(16px, var(--wand-safe-top)) max(16px, var(--wand-safe-right)) max(16px, var(--wand-safe-bottom)) max(16px, var(--wand-safe-left))"}},testId:"restart-overlay",showClose:!1,dismissable:!1,dismissalPriority:"blocking",children:(0,fs.jsxs)(Ye,{ref:a,vertical:!0,align:"center",gap:"middle",className:"wand-restart-body","aria-busy":l,style:{paddingBlock:24},children:[t.phase!=="timed-out"?(0,fs.jsx)(Ki,{size:"large","aria-hidden":"true"}):null,(0,fs.jsx)(Wt.Paragraph,{ref:o,className:"wand-restart-live",role:t.phase==="timed-out"?"alert":"status","aria-live":t.phase==="timed-out"?"assertive":"polite","data-wand-autofocus":t.phase==="timed-out"?void 0:"true",tabIndex:-1,children:r.liveStatus}),t.phase!=="timed-out"?(0,fs.jsxs)(fs.Fragment,{children:[(0,fs.jsx)(RJ.Suspense,{fallback:null,children:(0,fs.jsx)(_3e,{percent:u})}),(0,fs.jsxs)(Wt.Text,{type:"secondary",className:"wand-restart-attempts",children:["\u5DF2\u68C0\u67E5 ",t.attempts," / ",t.maxAttempts," \u6B21"]})]}):(0,fs.jsx)(je,{ref:n,className:"wand-restart-manual","data-wand-autofocus":"true",kind:"primary",onClick:()=>e.manualRefresh(),children:"\u624B\u52A8\u5237\u65B0"})]})})})}var P3e=B(_(),1),R3e=B(Jt(),1),O3e=B(Ee(),1);function z3e(){return(0,P3e.useSyncExternalStore)(Ug.subscribe,Ug.getSnapshot,Ug.getSnapshot).mounts.map(e=>(0,R3e.createPortal)((0,O3e.jsx)(jw,{value:e.value,options:e.options,ariaLabel:e.ariaLabel,popupOwner:e.scope==="dropdown"?"composer-plus-popover":"composer-main",placeholder:e.placeholder,displayValue:e.displayValue,displayTitle:e.displayTitle,disabled:e.disabled,triggerKind:e.scope==="runtime"?"ghost":void 0,searchable:e.control==="model",searchPlaceholder:"\u641C\u7D22\u6A21\u578B",className:`wand-composer-select-trigger wand-composer-select-trigger-${e.control}`,contentClassName:`wand-composer-select-content wand-composer-select-content-${e.control}`,itemClassName:"wand-composer-select-item",side:"top",align:e.align,sideOffset:8,collisionPadding:14,onValueChange:e.onValueChange}),e.target,e.key))}var L3e=B(_(),1),H3e=B(Jt(),1),ms=B(Ee(),1);function q3e(e){return e==="mode"?"\u6743\u9650\u6A21\u5F0F":e==="runtime"?"\u6A21\u578B\u4E0E\u601D\u8003\u8BBE\u7F6E":"\u4F1A\u8BDD\u8BBE\u7F6E"}function PC(e,t){return(0,ms.jsx)("span",{className:"composer-config-select-host","data-composer-select-host":"","data-composer-select-key":`${e}-${t}`,"data-composer-select-scope":e,"data-mode-control":t})}function W3e({mount:e}){let{scope:t}=e,r=t!=="runtime",n=t!=="mode",a=t==="all";return(0,ms.jsxs)(Ye,{align:"center",gap:6,wrap:t!=="runtime",style:{flex:n?1:void 0,minWidth:0},className:`composer-config-controls composer-config-controls-${t}`,"data-config-scope":t,role:"group","aria-label":q3e(t),title:e.groupTitle,children:[n&&e.toolVisible&&(0,ms.jsx)("span",{"data-mode-control-pill":"tool",style:{display:"inline-flex",width:120,flexShrink:t==="runtime"?1:0},"aria-live":"polite","aria-busy":e.toolDisabled||void 0,title:e.toolStatus,children:PC(t,"tool")}),r&&(0,ms.jsx)("span",{"data-mode-control-pill":"mode",title:`\u6A21\u5F0F\uFF1A${e.modeLabel}${e.modeLabel==="\u5B8C\u5168\u8BBF\u95EE"?"\uFF1B\u8BF7\u6838\u5BF9\u6267\u884C\u4EFB\u52A1\u4E0E\u5DE5\u4F5C\u76EE\u5F55\u540E\u53D1\u9001":""}`,children:PC(t,"mode")}),n&&(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)("span",{"data-mode-control-pill":"model",style:{minWidth:t==="runtime"?60:120},title:`\u6A21\u578B\uFF1A${e.modelFullLabel}`,children:PC(t,"model")}),a&&(0,ms.jsx)(Fr,{size:"medium",type:"button","data-models-refresh":"","data-models-refresh-scope":t,"aria-label":e.modelRefreshing?"\u6B63\u5728\u5237\u65B0\u6A21\u578B\u5217\u8868":"\u5237\u65B0\u6A21\u578B\u5217\u8868",title:e.modelRefreshing?"\u6B63\u5728\u5237\u65B0\u6A21\u578B\u5217\u8868":"\u5237\u65B0\u6A21\u578B\u5217\u8868","aria-busy":e.modelRefreshing?"true":"false",disabled:e.modelRefreshing,onClick:e.onRefreshModels,children:(0,ms.jsx)(De,{name:"refresh",size:13,strokeWidth:1.9})}),t==="runtime"?(0,ms.jsx)("span",{className:"composer-runtime-separator","aria-hidden":"true",children:"\xB7"}):null,(0,ms.jsx)("span",{"aria-label":`\u601D\u8003\u6DF1\u5EA6\uFF1A${e.thinkingLabel}`,"data-mode-control-pill":"thinking",style:{minWidth:68},"data-thinking":e.thinkingValue,title:`\u601D\u8003\u6DF1\u5EA6\uFF1A${e.thinkingLabel}`,children:PC(t,"thinking")})]})]})}function V3e(){return(0,L3e.useSyncExternalStore)(Gg.subscribe,Gg.getSnapshot,Gg.getSnapshot).mounts.map(e=>(0,H3e.createPortal)((0,ms.jsx)(W3e,{mount:e}),e.target,e.key))}var xT=B(_(),1),SJ=B(Jt(),1),zC=B(Ee(),1),U3e=e=>`wand-pi-settings-panel-${e.sessionId}`;function G3e({mount:e}){let t=e.open;return(0,zC.jsx)(je,{kind:"ghost",type:"button",className:"btn-circle btn-circle-action composer-pi-settings-toggle","data-open":t?"true":"false","aria-expanded":t,"aria-controls":U3e(e),"aria-label":t?"\u6536\u8D77\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E":"\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E\uFF1ACodeMode / Skills / MCP",title:t?"\u6536\u8D77\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E":"\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E\uFF1ACodeMode / Skills / MCP",onClick:()=>{ia.toggle(e.sessionId)},children:(0,zC.jsx)(De,{name:t?"close":"gear",size:17,strokeWidth:1.9})})}function K3e(){let e=xT.useSyncExternalStore(ia.subscribe,ia.getSnapshot,ia.getSnapshot),[t,r]=xT.useState(null),n=e.mounts.some(a=>a.open);return xT.useEffect(()=>{if(!n||t)return;let a=!0;return globalThis.__wandImportBrowserModule("9ed60ee59dc91419").then(o=>{a&&r(()=>o.PiSettingsPanelHost)}),()=>{a=!1}},[n,t]),e.mounts.flatMap(a=>[(0,SJ.createPortal)((0,zC.jsx)(G3e,{mount:a},`${a.sessionId}-toggle`),a.toggleTarget,`${a.key}-toggle`),...t?[(0,SJ.createPortal)((0,zC.jsx)(t,{mount:a},a.sessionId),a.target,a.key)]:[]])}var X3e=B(_(),1),Q3e=B(Jt(),1),up=B(Ee(),1);function Y3e({mount:e}){let t=`${e.interactiveOn?"is-on":""}${e.interactiveVisible?"":" hidden"}`;return(0,up.jsxs)(up.Fragment,{children:[(0,up.jsx)(ZM,{id:"plus-attach-item",icon:"paperclip",label:"\u4E0A\u4F20\u9644\u4EF6",onClick:r=>e.onAttach(r.detail===0)}),(0,up.jsxs)(je,{kind:"ghost",className:t,id:"terminal-interactive-toggle-top",type:"button","aria-pressed":e.interactiveOn?"true":"false",title:"\u7EC8\u7AEF\u4EA4\u4E92\u5F00\u542F\u65F6\uFF0C\u952E\u76D8\u76F4\u901A\u539F\u59CB\u7EC8\u7AEF\uFF1B\u5173\u95ED\u540E\u5728\u5BF9\u8BDD\u4E2D\u9605\u8BFB\u89E3\u6790\u540E\u7684\u8F93\u51FA",onClick:()=>e.onToggleInteractive(),children:[(0,up.jsx)(De,{name:"keyboard",size:14,strokeWidth:1.8,className:"plus-popover-icon"}),(0,up.jsx)("span",{className:"plus-popover-label",children:"\u7EC8\u7AEF\u4EA4\u4E92"}),(0,up.jsx)("span",{className:"plus-popover-toggle-state",children:e.interactiveOn?"\u5F00":"\u5173"})]})]})}function J3e(){return(0,X3e.useSyncExternalStore)(Hg.subscribe,Hg.getSnapshot,Hg.getSnapshot).mounts.map(e=>(0,Q3e.createPortal)((0,up.jsx)(Y3e,{mount:e}),e.target,e.key))}var Z3e=B(_(),1),e$e=B(Jt(),1),ST=B(Ee(),1);function t$e({mount:e}){return(0,ST.jsx)(Bt,{children:(0,ST.jsx)(ri,{id:"action-error",role:"alert",type:"error",title:e.message,showIcon:!0})})}function r$e(){return(0,Z3e.useSyncExternalStore)(Lg.subscribe,Lg.getSnapshot,Lg.getSnapshot).mounts.map(e=>(0,e$e.createPortal)((0,ST.jsx)(t$e,{mount:e}),e.target,e.key))}var n$e=B(_(),1),a$e=B(Jt(),1),fi=B(Ee(),1);function i$e({enabled:e,pending:t=!1,onToggle:r}){return(0,fi.jsxs)(je,{id:"auto-approve-toggle",size:"medium",kind:e?"soft":"ghost","aria-pressed":e,"aria-busy":t||void 0,disabled:t,"aria-label":`\u81EA\u52A8\u6279\u51C6\u5DF2${e?"\u542F\u7528\uFF0C\u70B9\u51FB\u5173\u95ED":"\u5173\u95ED\uFF0C\u70B9\u51FB\u5F00\u542F"}`,onClick:r,children:[(0,fi.jsx)(De,{name:e?"shieldCheck":"shield",size:12}),e?"\u81EA\u52A8":"\u624B\u52A8"]})}function o$e({stats:e}){return e?(0,fi.jsx)(ko,{ariaLabel:"\u81EA\u52A8\u6279\u51C6\u7EDF\u8BA1",contentId:"approval-stats-popup",trigger:(0,fi.jsxs)(je,{id:"approval-stats-badge",kind:"ghost",size:"medium","aria-label":"\u672C\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6279\u51C6\u7EDF\u8BA1",children:[(0,fi.jsx)(De,{name:"shield",size:12}),e.total]}),children:(0,fi.jsxs)("div",{id:"approval-stats",children:["\u547D\u4EE4\u6267\u884C ",e.command," \xB7 \u6587\u4EF6\u5199\u5165 ",e.file," \xB7 \u5176\u4ED6\u5DE5\u5177 ",e.tool," \xB7 \u5408\u8BA1 ",e.total]})}):null}function s$e({permission:e,pending:t,onAction:r}){return(0,fi.jsxs)("span",{id:"permission-actions","aria-busy":t||void 0,children:[(0,fi.jsx)("span",{id:"permission-actions-label",role:"status","aria-live":"polite","aria-atomic":"true",children:e.label}),!e.autoApproving&&(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsx)(je,{id:"approve-permission-btn",size:"medium",kind:"primary",disabled:t,onClick:()=>r("approve"),children:"\u6279\u51C6"}),e.requestId&&(0,fi.jsx)(je,{id:"approve-turn-permission-btn",size:"medium",disabled:t,onClick:()=>r("approve-turn"),children:"\u672C\u8F6E\u5141\u8BB8"}),(0,fi.jsx)(je,{id:"deny-permission-btn",size:"medium",kind:"danger",disabled:t,onClick:()=>r("deny"),children:"\u62D2\u7EDD"})]})]})}function l$e(e,t){return e.kind==="permissions"?(0,fi.jsx)(s$e,{permission:e.permission,pending:e.pending,onAction:e.onAction}):e.kind==="auto-approve"?(0,fi.jsx)(i$e,{enabled:e.enabled,pending:e.pending,onToggle:e.onToggle}):(0,fi.jsx)(o$e,{stats:e.stats,revision:t})}function u$e(){let e=(0,n$e.useSyncExternalStore)(Og.subscribe,Og.getSnapshot,Og.getSnapshot);return e.mounts.map(t=>(0,a$e.createPortal)(l$e(t,e.revision),t.target,t.key))}var Qr=B(Ee(),1);function c$e({portalContainer:e,settingsPresentation:t="workspace"}){let r=(0,j3e.useSyncExternalStore)(Ps.subscribe,Ps.getSnapshot,Ps.getSnapshot).activeDialog;return(0,Qr.jsxs)(id,{container:e,children:[t==="workspace"?(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsx)(z3e,{}),(0,Qr.jsx)(V3e,{}),(0,Qr.jsx)(K3e,{}),(0,Qr.jsx)(mI,{}),(0,Qr.jsx)(J3e,{}),(0,Qr.jsx)(r$e,{}),(0,Qr.jsx)(fI,{}),(0,Qr.jsx)(u$e,{}),(0,Qr.jsx)(PI,{}),(0,Qr.jsx)(xI,{}),(0,Qr.jsx)(EI,{}),(0,Qr.jsx)(kI,{})]}):null,t==="page"?(0,Qr.jsx)(rC,{presentation:"page",showRestart:Xl.showRestart}):null,t==="workspace"?(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsx)(hI,{}),(0,Qr.jsx)(gI,{}),(0,Qr.jsx)(vI,{}),(0,Qr.jsx)(bI,{}),(0,Qr.jsx)(yI,{}),(0,Qr.jsx)(wI,{})]}):null,(0,Qr.jsx)(N3e,{}),(0,Qr.jsx)(_w,{}),r?(0,Qr.jsx)(xf,{open:!0,title:r.options.title,description:r.options.description,tone:r.options.tone,icon:r.options.icon,actions:r.options.actions,input:r.options.input,dismissable:r.options.dismissable,focusTriggerAfterClose:r.options.focusTriggerAfterClose,onAction:(n,a)=>{Ps.completeDialog(r.id,{dismissed:!1,action:n,inputValue:a})},onDismiss:()=>{Ps.completeDialog(r.id,{dismissed:!0})}},r.id):null]})}var d$e=["profile","notifications","display","ai","local-models","general","connectors","security","presets","about"];function p$e(e){let t=new URLSearchParams(e).get("settings");return t==="directory"||d$e.includes(t)?t:null}function f$e(){let e=!1,t=qa.getSnapshot(),r=()=>{e=!0;let o=p$e(window.location.search),l=qa.getSnapshot();o?((!l.open||(o==="directory"?l.detail:l.tab!==o||!l.detail))&&Fo.open(o==="directory"?void 0:o),qa.setNested(new URLSearchParams(window.location.search).get("settingsNested")==="environment"?"environment":null)):Fo.close(),t=qa.getSnapshot(),e=!1};r();let n=qa.subscribe(()=>{let o=qa.getSnapshot();e||((o.open!==t.open||o.tab!==t.tab||o.detail!==t.detail||o.nested!==t.nested)&&wa({settings:o.open?o.detail?o.tab:"directory":null,settingsNested:o.open?o.nested:null}),t=o)}),a=Si(r);return()=>{n(),a()}}var FJ=B(Ee(),1),$J="overlay-root",m$e="wand-react-ui-mount",ET=null;function DJ(e,t,r){let n=document.getElementById(t);if(n&&n.parentElement===e)return n;let a=document.createElement("div");return a.id=t,a.className=r,e.appendChild(a),a}function h$e(){let e=document.getElementById($J);if(e)return e;let t=document.createElement("div");return t.id=$J,t.dataset.wandUiRoot="",document.body.appendChild(t),t}function g$e(){window.__wandReactSettings=Fo,window.__wandReactNewSession=La,window.__wandReactFolderPicker=zd,window.__wandReactQuickCommit=bd,window.__wandReactWorktreeMerge=yd,window.__wandReactRestartOverlay=Xl,window.__wandReactFilePreview=Vs,window.__wandReactMissions=bf,window.__wandReactWorkspaces=Mf,window.__wandReactGithubIssues=x1,window.__wandReactTaskBoard=En,X1(),lD()}function v$e(){let e=h$e(),t=T3e(),r=Ad();if(!ET){r||f$e(),x0();let n=DJ(e,m$e,"wand-ui-mount"),a=DJ(e,of,"wand-ui-portals");ET=(0,I3e.createRoot)(n),ET.render((0,FJ.jsx)(sa,{children:(0,FJ.jsx)(c$e,{portalContainer:a,settingsPresentation:r?"page":"workspace"})}))}return r?window.__wandReactSettings=Fo:g$e(),e.dataset.reactUi=t?"enabled":"fallback",t?(window.__wandReactUi=xn,xn):(delete window.__wandReactUi,null)}var AJ=null;function b$e(e){Ka("working-dir")}var y$e={getInitialPath:ds,onOpen(){Di(["folderPicker"])},onClose(){},applySelection(e){sC(e),b$e(e)}};function BJ(){return Di(["folderPicker"])?zd.open(ds())?!0:(Ze("\u5DE5\u4F5C\u76EE\u5F55\u9009\u62E9\u5668\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error"),!1):!1}function w$e(){return $m(()=>{BJ()})?BJ():!1}function x$e(){AJ||(AJ=GA(y$e))}var IJ=null;function E$e(){IJ||(IJ=lA({discardScope:e=>At.discardScope(e),read:e=>At.read(e),edit:(e,t)=>At.edit(e,t),submit:(e,t,r)=>At.submit(e,t,r),subscribe:e=>At.subscribe(e),transfer:(e,t,r)=>At.transfer(e,t,r)}))}var MJ=null,k$e={onOpen(){Di(["newSession"]),h.sessionsDrawerOpen=!1,Xr("wand-sidebar-open",!1),xm()},onClose(){},getContext(){return{effectiveCwd:ds(),selectedModels:{claude:tl("claude"),codex:tl("codex"),opencode:tl("opencode"),grok:tl("grok"),qoder:tl("qoder"),pi:tl("pi")},thinkingEffort:h.chatThinking||"off"}},rememberModel(e,t){Dw(e,t||"")},async prepareCreate(e,t){return e==="structured"?{}:(await zf(),Js({prepare:!0}),await Iw(),Jl({},{kind:e,provider:t?.kind==="pty"?t.provider:void 0,command:t?.kind==="pty"?t.command:void 0,cwd:t?.cwd||ds(),workspaceTaskId:t?.workspaceTaskId}))},async completeCreate(e,t,r){if(h.chatMode=e.mode,e.kind!=="shell"&&(h.sessionTool=e.provider,h.preferredCommand=e.provider),Am(t.id,!0),sC(e.cwd),await Ai({skipSelectedOutputReload:!0}),e.workspaceTaskId){await As.reload(e.workspaceTaskId).catch(()=>{});let n=Ha.getRuntime();if(Kr.getSnapshot().taskId===e.workspaceTaskId&&n){let a=Kr.getSnapshot().layout,o=a?a.windows.flatMap(u=>So(u.layout)):[],l=Wu(a,[...o,t.id],t.id);n.saveTaskLayout(l)}Xi()}if(Ir.suspend(),r&&!G0.transfer(r.key,t.id,r.revision))throw new Error("\u65B0\u5DE5\u4F5C\u5DF2\u521B\u5EFA\uFF0C\u4F46\u8F93\u5165\u5DF2\u53D8\u5316\uFF0C\u8349\u7A3F\u4FDD\u7559\u3002\u8BF7\u4ECE\u4F1A\u8BDD\u5217\u8868\u6253\u5F00\u540E\u7EE7\u7EED\u3002");Ln(t.id),$i(),r&&(mc(t.id),Dm(void 0)),window.setTimeout(()=>Ql(!0),0)}};function C$e(){MJ||(MJ=PD(k$e))}function S$e(){window.addEventListener("wand-settings-notifications-changed",e=>{let t=e.detail||{};typeof t.sound=="boolean"&&(h.notifSound=t.sound),typeof t.volume=="number"&&(h.notifVolume=t.volume),typeof t.bubble=="boolean"&&(h.notifBubble=t.bubble)}),window.addEventListener("wand-settings-config-saved",e=>{let t=e.detail;t&&(h.config||(h.config={}),Object.assign(h.config,t),Aw(t))})}function F$e(e){return e==="claude-history"?"history":e==="codex-history"?"codex":e==="opencode-history"||e==="qoder-history"?"history":"sessions"}function $$e(e,t){return Sw(`\u786E\u8BA4\u5220\u9664\u8FD9\u6761 ${e==="codex-history"?"Codex":e==="opencode-history"?"OpenCode":e==="qoder-history"?"Qoder":e==="claude-history"?"Claude":"Wand"} \u4F1A\u8BDD\u5417\uFF1F`,{title:"\u5220\u9664\u4F1A\u8BDD"}).then(r=>{if(r)return e==="codex-history"?mM(t):e==="claude-history"?cM(t,null):e==="opencode-history"?gC("opencode",t):e==="qoder-history"?gC("qoder",t):uM(t)})}function OJ(e){h.sessionTool=e,h.preferredCommand=e}function kT(e){return OJ(e),UM()}function D$e(){return OJ("claude"),FC().then(e=>(Ql(!0),e))}function A$e(e){let t=h.sessions.find(n=>n.id===h.selectedId);if(e==="cwd")return yw("cwd","\u5DE5\u4F5C\u76EE\u5F55\u5DF2\u590D\u5236");if(e==="sessionId")return yw("id","\u4F1A\u8BDD ID \u5DF2\u590D\u5236");let r=t?.provider;return yw("claudeSessionId",r==="codex"?"Codex thread ID \u5DF2\u590D\u5236":r==="opencode"?"OpenCode session ID \u5DF2\u590D\u5236":r==="grok"?"Grok \u4F1A\u8BDD ID \u5DF2\u590D\u5236":r==="qoder"?"Qoder \u4F1A\u8BDD ID \u5DF2\u590D\u5236":"Claude \u4F1A\u8BDD ID \u5DF2\u590D\u5236")}function B$e(){return{goHome:fc,refreshPage:()=>window.location.reload(),terminalDisplay:e=>{e==="zoom-in"?ym(.25):e==="zoom-out"?ym(-.25):e==="reset"?Fw(1):(lC(),Cm({preserveStickState:!0}),sc(!0))},openNewSession:e=>AC(e),openMissions:()=>{bf.open()},openNewProject:e=>AC(e),quickStartClaudeTerminal:()=>kT("claude"),quickStartCodexTerminal:()=>kT("codex"),quickStartOpenCodeTerminal:()=>kT("opencode"),quickStartStructuredSession:D$e,selectSession:(e,t)=>{let r=Ln(e,t);return $i(),r},resumeSession:e=>pM(e).then(t=>($i(),t)),resumeHistory:(e,t,r)=>fM(e,t,r),deleteItem:$$e,mergeSession:qM,cleanupSession:WM,toggleManageMode:vM,toggleManagedSelection:(e,t)=>wM(F$e(e),t),selectAllManaged:bM,clearManagedSelection:yM,deleteManagedSelection:xM,toggleSessionsDrawer:zM,openSessionsDrawer:LM,closeSessionsDrawer:Xg,toggleSidebarPin:HM,toggleSidebarCollapsed:DC,expandSidebarGroup:e=>{Xr(e==="automation"?"wand-automation-sessions-expanded":"wand-non-wand-sessions-expanded",!0),DC()},setSidebarGroupExpanded:(e,t)=>{Xr(e==="automation"?"wand-automation-sessions-expanded":"wand-non-wand-sessions-expanded",t)},toggleFilePanel:EM,closeFilePanel:kM,openFolderPicker:()=>{w$e()},toggleTopbarMenu:()=>{h.topbarMoreOpen=!h.topbarMoreOpen},copyTopbarField:A$e,openGitCommit:ZI,openSettings:VM,backToNative:IM,switchServer:xC,logout:MM}}function I$e(e){return{openFiles(){return e.isReady()?(e.setFilePanelOpen(!0),!0):!1},getCloseState(){return e.isSavingFile()?"busy":e.hasUnsavedFiles()?"unsaved":"ready"},getSelectedSessionId(){return e.isReady()?e.getSelectedSessionId():""}}}var TJ=null;function M$e(){TJ||(TJ=X$({onOpen(){Di(["missions"]),$i()},onClose(){},effectiveCwd:ds,async openSession(e){await Ai({skipSelectedOutputReload:!0}),h.sessions.some(t=>t.id===e)&&(Ln(e),$i())}}))}function T$e(e,t){let r=new Map;function n(d){let p=r.get(d);return p||(p={epoch:0,automaticBlocked:!1},r.set(d,p)),p}async function a(d,p){let m=await e.getTask(d);if(m.id!==d)throw new Error("\u4EFB\u52A1\u8BE6\u60C5\u4E0E\u8BF7\u6C42\u4E0D\u5339\u914D\u3002");return p.revision=m.layoutRevision??0,m}function o(d,p){d.pending?.resolve(p),d.pending=void 0}async function l(d,p){for(;p.pending;){let m=p.pending;p.pending=void 0;try{p.revision===void 0&&await a(d,p);let v=await e.saveTaskLayout(d,m.layout,p.revision);p.revision=v.layoutRevision,m.automatic||(p.automaticBlocked=!1),t.onSaved(d,v.layoutRevision),m.resolve("saved")}catch(v){let g=p.epoch,b=m.automatic&&v instanceof Ra&&v.status===409;p.automaticBlocked=!b,o(p,"failed"),p.revision=void 0,b||t.onError(d,v);try{let x=await a(d,p);p.epoch===g&&t.onRestore(d,x)}catch{}m.resolve("failed")}}}function u(d,p){p.running||(p.running=l(d,p).finally(()=>{p.running=void 0,p.pending&&u(d,p)}))}return{remember(d,p){let m=n(d);m.running||(m.revision=p??0)},canSaveAutomatically(d){return!r.get(d)?.automaticBlocked},save(d,p,m={}){let v=n(d);if(m.automatic&&v.automaticBlocked)return Promise.resolve("failed");v.epoch++,o(v,"superseded");let g=new Promise(b=>{v.pending={layout:p,resolve:b,automatic:m.automatic===!0}});return u(d,v),g},isSaving(d){return!!r.get(d)?.running},async flush(d){let p=r.get(d);for(;p?.running;)await p.running}}}var jJ=null,zw=0;function Im(){return Kr.getSnapshot().taskId}var Bm=T$e(cn,{onSaved(e,t){Im()===e&&Dl({layoutRevision:t})},onError(e,t){let r=t instanceof Error?t.message:"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002";Ze(`\u4EFB\u52A1 ${e} \u7684\u5E03\u5C40\u672A\u4FDD\u5B58\uFF1A${r}`,"danger")},onRestore(e,t){if(Im()!==e)return;let r=Ff(t.sessions).map(u=>u.id),n=Ts(t.layout),a=n?.kind==="session"?n.sessionId:r[0],o=Wu(t.layout,r,a);Sf(o)?.layout.type!=="split"&&xw();let l=Ts(o);l?.kind==="session"?Ln(l.sessionId):fc(),Dl({layout:o,layoutRevision:t.layoutRevision})}});function CT(e,t,r){return r?.automatic&&!Bm.canSaveAutomatically(e)?Promise.resolve("failed"):(Im()===e&&(Sf(t)?.layout.type!=="split"&&xw(),Dl({layout:t})),Bm.save(e,t,r))}function j$e(){if(jJ)return;let e=Ds(()=>{let r=Im();r&&Bm.flush(r).then(async()=>{let n=await As.reload(r);Im()===r&&(Bm.remember(r,n.layoutRevision),Dl({taskName:n.name,cwd:n.cwd,workspaceId:n.workspaceId,layout:n.layout,layoutRevision:n.layoutRevision}))}).catch(()=>{})}),t=RD({onOpen(){Di(["workspaces"]),$i()},onClose(){},effectiveCwd:ds,openWorkspace(r){++zw,Rg(null),Dl({workspaceId:r.id,workspaceName:r.name,taskId:null,taskName:"",cwd:r.cwd,provider:r.defaultProvider,layout:null}),Ka("workspace:open"),fc(),$i()},closeWorkspace(){++zw,Rg(null),jD(),Ka("workspace:close")},refreshSessions:Yl,selectSession(r){Ln(r),$i()},async openTask(r){let n=++zw,a=r.preferredSessionId||h.selectedId;Rg(r.taskId),Dl({workspaceId:r.workspaceId,workspaceName:r.workspaceName,taskId:r.taskId,taskName:r.taskName,cwd:r.cwd,provider:r.provider,layout:null,layoutRevision:void 0}),Ka("workspace:open"),fc({updateRoute:!r.restoreRoute});let o=Bm.isSaving(r.taskId);if(await Bm.flush(r.taskId),!(n!==zw||r.navigationCurrent?.()===!1))return(o?As.reload(r.taskId):As.load(r.taskId)).then(l=>{if(n!==zw||r.navigationCurrent?.()===!1)return;let u=Ff(l.sessions).map(g=>g.id),d=Ts(l.layout),p=a&&u.includes(a)?a:d?.kind==="session"&&u.includes(d.sessionId)?d.sessionId:u[0],m=u.length>0?Wu(l.layout,u,p):Wu(l.layout,[],null),v=Ts(m);v?.kind==="session"&&Ln(v.sessionId,{updateRoute:!r.restoreRoute}),Bm.remember(r.taskId,l.layoutRevision),Dl({layout:m,layoutRevision:l.layoutRevision}),!r.restoreRoute&&JSON.stringify(m)!==JSON.stringify(l.layout)&&CT(r.taskId,m,{automatic:!0}),$i()}).catch(()=>{})},newTaskSession(r){return Promise.resolve(BC(r.cwd,{workspaceId:r.workspaceId,workspaceTaskId:r.taskId,shell:r.target==="shell",provider:eT(r.target)||void 0,engine:tT(r.target),kind:r.target==="shell"?"pty":r.kind??"structured",model:r.model,employeeId:r.employeeId,initialInput:r.prompt})).then(async n=>{let a=typeof n=="string"&&n?n:n&&typeof n=="object"&&"id"in n&&typeof n.id=="string"&&n.id?n.id:void 0;if(a){if(!r.taskId)return Xi(),a;if(await As.reload(r.taskId).catch(()=>{}),Im()===r.taskId){let o=Kr.getSnapshot().layout,l=o?o.windows.flatMap(d=>So(d.layout)):[],u=Wu(o,[...l,a],a);CT(r.taskId,u)}return Xi(),a}})},startWorktreeMergeAgent(r){return BC(r.cwd,{workspaceId:r.workspaceId,provider:r.provider,mode:"managed",systemPrompt:r.systemPrompt,initialInput:r.prompt})},saveTaskLayout(r,n){let a=Im();if(a)return CT(a,r,n)},async closeTaskSessions(r,n){let a=[...new Set(r.filter(Boolean))];if(a.length===0)return!0;let o=n==="window";if(!await Sw(o&&a.length>1?`\u5173\u95ED\u8FD9\u4E2A\u5DE5\u4F5C\u7A97\u53E3\uFF1F\u5176\u4E2D\u7684 ${a.length} \u4E2A\u7EC8\u7AEF\u4F1A\u8BDD\u4F1A\u7ED3\u675F\u5E76\u88AB\u5220\u9664\u3002`:"\u5173\u95ED\u8FD9\u4E2A\u7EC8\u7AEF\uFF1F\u5F53\u524D\u4F1A\u8BDD\u4F1A\u7ED3\u675F\u5E76\u88AB\u5220\u9664\u3002",{title:o?"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3":"\u5173\u95ED\u7EC8\u7AEF",okLabel:"\u5173\u95ED"}))return!1;try{return await cn.deleteSessions(a),a.forEach(l=>zg(l)),await Ai({preserveNoSelection:!0}),!0}catch(l){return await Ai({preserveNoSelection:!0}).catch(()=>{}),Ze(l instanceof Error?l.message:"\u65E0\u6CD5\u5173\u95ED\u7EC8\u7AEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","danger"),!1}},mountSessionTerminal(r,n){return uC(r,n)},unmountSessionTerminal(r){zg(r)},getSessionTerminalScale(r){return cm(r)},setSessionTerminalScale(r,n){return sw(r,n)},disposeAllSessionTerminals(){xw()},modelPreference(r){return tl(r)||""},rememberModelPreference(r,n){Dw(r,n||"")},toast(r,n){Ze(r,n)}});jJ=()=>{e(),t()}}var _J=!1,Mm=!1,ev=0,FT=0,OC=!1,$T=!1,Hw="";function Lw(){let e=new URLSearchParams($n());return JSON.stringify(["view","session","workspace","workspaceTask","window","tab"].map(t=>e.get(t)))}function DT(e="push",t=!1){!Mm||ev&&!t||OC||(OC=!0,queueMicrotask(()=>{if(OC=!1,!Mm||ev&&!t)return;let r=Kr.getSnapshot(),n=r.layout?.windows.find(l=>l.id===r.layout?.activeWindowId),a=new URLSearchParams($n());$T=!0;let o=e==="push"?rD($n(),h.selectedId||null):e;wa({...a.has("view")?{}:{view:"workspace"},session:h.selectedId||null,workspace:r.workspaceId,workspaceTask:r.taskId,window:n?.id??null,tab:n?.activeTabId??null},o),$T=!1,Hw=Lw()}))}async function NJ(){if(!zu()){Mm=!0;let o=Ir.getSnapshot();return o.active===!0||o.directory?(wa({view:o.directory?"contacts":"chats",sidebar:o.mode,conversation:o.selectedId,chatFilter:o.listFilter,chatActivity:String(o.activityOnly),chatQuery:o.filters["list-query"]??""},"replace"),Hw=Lw()):DT("replace"),!1}let e=++FT,t=Lw();Hw=t;let r=new URLSearchParams($n()),n=Ha.getRuntime();if(!n)return!0;ev++,hw("");let a=()=>e===FT&&Lw()===t;try{let o=r.get("session"),l=r.get("workspace"),u=r.get("window"),d=r.get("tab"),p=o?h.sessions.find(v=>v.id===o):null;if(o&&!p)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728\u3001\u5DF2\u5220\u9664\u6216\u65E0\u6743\u8BBF\u95EE\u3002");let m=r.get("workspaceTask")||p?.workspaceTaskId;if((u||d)&&!m)throw new Error("\u7A97\u53E3\u94FE\u63A5\u7F3A\u5C11\u6240\u5C5E\u4EFB\u52A1\uFF0C\u8BF7\u8FD4\u56DE\u5DE5\u4F5C\u533A\u91CD\u65B0\u9009\u62E9\u3002");if(m){let v=await cn.getTask(m);if(!a())return!0;if(l&&v.workspaceId!==l)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4EFB\u52A1\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u5DE5\u4F5C\u533A\u3002");if(p&&p.workspaceTaskId!==m)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u4EFB\u52A1\u3002");if(await n.openTask({workspaceId:v.workspaceId,workspaceName:"",taskId:v.id,taskName:v.name,cwd:v.cwd,preferredSessionId:o||void 0,restoreRoute:!0,navigationCurrent:a}),!a())return!0;let g=Kr.getSnapshot().layout;if(g&&u){let x=g.windows.find(y=>y.id===u);if(!x)throw new Error("\u94FE\u63A5\u4E2D\u7684\u7A97\u53E3\u5DF2\u5173\u95ED\u6216\u4E0D\u5B58\u5728\u3002");if(d&&!Sl(x.layout,d))throw new Error("\u94FE\u63A5\u4E2D\u7684\u7A97\u683C\u5DF2\u5173\u95ED\u6216\u4E0D\u5B58\u5728\u3002");if(o&&!So(x.layout).includes(o))throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5728\u6307\u5B9A\u7A97\u53E3\u5185\u3002");g={...g,activeWindowId:u,windows:g.windows.map(y=>y.id===u&&d?{...y,activeTabId:d}:y)},Dl({layout:g})}let b=Ts(g);o?await Ln(o,{focusInput:!1,updateRoute:!1}):b?.kind==="session"?await Ln(b.sessionId,{focusInput:!1,updateRoute:!1}):fc({updateRoute:!1})}else{if(gw(()=>n.closeWorkspace()),l){let v=await cn.list();if(!a())return!0;let g=v.find(b=>b.id===l);if(!g)throw new Error("\u94FE\u63A5\u4E2D\u7684\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u3001\u5DF2\u5220\u9664\u6216\u65E0\u6743\u8BBF\u95EE\u3002");if(p&&p.workspaceId!==l)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u5DE5\u4F5C\u533A\u3002");gw(()=>n.openWorkspace(g))}o?await Ln(o,{focusInput:!1,updateRoute:!1}):fc({updateRoute:!1})}}catch(o){a()&&(gw(()=>n.closeWorkspace()),fc({updateRoute:!1}),hw(o instanceof Error?o.message:"\u94FE\u63A5\u76EE\u6807\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u8FD4\u56DE\u5DE5\u4F5C\u533A\u91CD\u8BD5\u3002"))}finally{ev--,Mm=!0}return!0}function _$e(){_J||(_J=!0,MI(()=>{(ev||!Mm)&&(FT++,Mm=!0),DT("push",!0)}),TI(NJ),Kr.subscribe(()=>DT()),Si(()=>{let e=Lw();!Mm&&!ev||$T||e===Hw||(Hw=e,!OC&&NJ())}))}Y3({ready:()=>!!h.config&&!h.pageUnloading,version:()=>String(h.config?.currentVersion||h.config?.packageVersion||"0.0.0"),secure:()=>window.location.protocol==="https:"||["localhost","127.0.0.1","[::1]"].includes(window.location.hostname),fetch:(e,t)=>globalThis.fetch(e,t)});J3(window);E$e();S$e();VI(B$e());window.__wandDesktopTools=I$e({isReady:dC,setFilePanelOpen:Wg,hasUnsavedFiles:()=>W1.hasDirty()||rm.getSnapshot().dirty,isSavingFile:()=>Td.getSnapshot().saving||rm.getSnapshot().saving,getSelectedSessionId:()=>h.selectedId||""});(function(){try{var e=navigator&&navigator.userAgent||"";/WandApp\//.test(e)&&document.documentElement.classList.add("is-wand-app"),/WandPlatform\/iOS/.test(e)&&document.documentElement.classList.add("is-wand-ios"),/WandPlatform\/Android/.test(e)&&document.documentElement.classList.add("is-wand-android"),/WandPlatform\/macOS/.test(e)&&document.documentElement.classList.add("is-wand-macos")}catch{}try{let t=new URL(window.location.href).searchParams;t.get("embed")==="terminal"&&(document.documentElement.classList.add("is-wand-embed-terminal"),t.get("nativeInput")==="1"&&document.documentElement.classList.add("is-wand-native-input"),t.get("passthrough")==="1"&&document.documentElement.classList.add("is-wand-terminal-passthrough"))}catch{}try{window.__wandNativeBackHooked=!0}catch{}try{window.__wandConfigPath=oI}catch{}})();v$e();C$e();M$e();j$e();_$e();x$e();BM({getSession(e){return h.sessions.find(t=>t.id===e)??null},refreshSessions(){return Yl()},toast(e,t){Ze(e,t)}});(function(){try{window.__openLocalPreview=e=>iw(String(e??""))}catch{}})();XI({getSiblings(e){let t=YM.getSnapshot(),r=t.expanded.get(Zl(e))??t.expanded.get(t.activeDir);return r?r.entries:[]},confirmDiscard(e){let t=e==="replace";return Sm({type:"warning",title:t?"\u5207\u6362\u9884\u89C8\u6587\u4EF6\uFF1F":"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:t?"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002":e==="exit-edit"?"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u9000\u51FA\u7F16\u8F91\u540E\u4F1A\u4E22\u5931\u3002":"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002",buttons:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autofocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],cancelValue:!1}).then(r=>r===!0)},copyText:SM,appendToComposer:CM,notify(e,t){Ze(e,t)},onSaved(){return QM.execute({type:"refresh"}).then(function(){})}});export{Dd as shared100_a,Lbe as shared101_a,Hbe as shared101_b,Ad as shared101_c,qbe as shared101_d,iA as shared101_e,Vbe as shared102_a,Ube as shared102_b,Gbe as shared102_c,_1 as shared102_d,Xbe as shared103_a,zf as shared103_b,Fo as shared104_a,qa as shared104_b,O1 as shared105_a,Q6 as shared105_b,Y6 as shared105_c,z1 as shared105_d,X6 as shared105_e,Md as shared105_f,o1e as shared105_g,Hf as shared105_h,gA as shared105_i,sA as shared106_a,lA as shared107_a,G0 as shared107_b,G6 as shared108_a,X0 as shared108_b,N1 as shared108_c,BV as shared108_d,mA as shared108_e,IV as shared108_f,P1 as shared108_g,Jbe as shared108_h,Zbe as shared108_i,e1e as shared108_j,hA as shared108_k,u1e as shared109_a,vA as shared109_b,c1e as shared109_c,d1e as shared109_d,p1e as shared109_e,f1e as shared109_f,bA as shared109_g,Hp as shared10_a,wb as shared10_b,qF as shared10_c,Oz as shared10_d,WF as shared10_e,jz as shared10_f,Wse as shared10_g,Vse as shared10_h,Use as shared10_i,Gse as shared10_j,Kse as shared10_k,vo as shared10_l,VF as shared10_m,UF as shared10_n,$1e as shared110_a,LV as shared110_b,W1 as shared110_c,Td as shared110_d,wA as shared111_a,EA as shared111_b,b1e as shared111_c,J6 as shared111_d,Z6 as shared111_e,kA as shared111_f,CA as shared111_g,q1 as shared111_h,tg as shared111_i,y1e as shared111_j,w1e as shared111_k,x1e as shared111_l,SA as shared111_m,FA as shared111_n,C1e as shared111_o,eE as shared111_p,$A as shared111_q,Wf as shared112_a,qf as shared112_b,eg as shared112_c,H1 as shared112_d,zs as shared112_e,G1 as shared113_a,rg as shared113_b,ng as shared113_c,AA as shared113_d,BA as shared113_e,IA as shared113_f,MA as shared114_a,TA as shared114_b,R1e as shared114_c,K1 as shared115_a,Ls as shared115_b,_A as shared115_c,NA as shared115_d,X1 as shared116_a,En as shared116_b,_l as shared116_c,Ir as shared117_a,ag as shared117_b,eye as shared117_c,WA as shared118_a,VA as shared118_b,Rd as shared118_c,ig as shared118_d,HA as shared118_e,sye as shared118_f,iE as shared118_g,zA as shared118_h,uye as shared118_i,cye as shared118_j,Uf as shared118_k,nU as shared118_l,mye as shared118_m,hye as shared118_n,gye as shared118_o,yye as shared118_p,og as shared118_q,qA as shared118_r,iU as shared118_s,wye as shared118_t,Q1 as shared119_a,Nd as shared119_b,QV as shared119_c,Pd as shared119_d,Gu as shared119_e,OA as shared119_f,nye as shared119_g,xb as shared11_a,zd as shared120_a,UA as shared120_b,GA as shared120_c,JA as shared121_a,sU as shared122_a,sE as shared122_b,XA as shared123_a,QA as shared123_b,gU as shared124_a,Z1 as shared124_b,by as shared125_a,SB as shared125_b,vy as shared126_a,py as shared127_a,Vd as shared127_b,Ud as shared127_c,gg as shared127_d,uy as shared127_e,ly as shared127_f,dy as shared127_g,Xf as shared128_a,vB as shared129_a,qp as shared12_a,Vh as shared12_b,fy as shared130_a,SE as shared131_a,FE as shared131_b,wg as shared131_c,$E as shared131_d,IB as shared131_e,MB as shared131_f,$B as shared132_a,PB as shared133_a,Vs as shared133_b,rm as shared133_c,OB as shared133_d,zl as shared134_a,DE as shared135_a,QFe as shared136_a,Zl as shared136_b,YFe as shared136_c,KM as shared136_d,QM as shared136_e,YM as shared136_f,ZM as shared137_a,eT as shared138_a,tT as shared138_b,uJ as shared139_a,mJ as shared139_b,hJ as shared139_c,gJ as shared139_d,vJ as shared139_e,bJ as shared139_f,xJ as shared139_g,EJ as shared139_h,kJ as shared139_i,td as shared13_a,jw as shared140_a,jC as shared140_b,aT as shared141_a,eJ as shared142_a,rT as shared142_b,_w as shared143_a,mT as shared144_a,k3e as shared145_a,Vo as shared14_a,ml as shared14_b,YF as shared14_c,Cb as shared14_d,Vp as shared14_e,Up as shared14_f,JF as shared14_g,Ur as shared15_a,Wp as shared15_b,Eb as shared15_c,kb as shared15_d,XF as shared15_e,s2 as shared15_f,Uh as shared15_g,Gh as shared15_h,Kh as shared15_i,Xh as shared15_j,n2 as shared15_k,a2 as shared15_l,i2 as shared15_m,o2 as shared15_n,qo as shared15_o,Wo as shared15_p,Qh as shared15_q,Gz as shared15_r,$u as shared15_s,Zh as shared16_a,$b as shared16_b,rd as shared16_c,hue as shared16_d,Au as shared16_e,l7 as shared16_f,d2 as shared16_g,Db as shared16_h,Gp as shared17_a,jn as shared18_a,Ab as shared19_a,yw as shared1_$,vY as shared1_$a,Ka as shared1_A,pM as shared1_Aa,uc as shared1_Ab,sI as shared1_B,fM as shared1_Ba,Ai as shared1_Bb,Uxe as shared1_C,gC as shared1_Ca,Ln as shared1_Cb,Jxe as shared1_D,mM as shared1_Da,fc as shared1_Db,HK as shared1_E,Ql as shared1_Ea,xm as shared1_Eb,zy as shared1_F,vM as shared1_Fa,zM as shared1_Fb,t2e as shared1_G,bM as shared1_Ga,LM as shared1_Gb,uI as shared1_H,yM as shared1_Ha,Xg as shared1_Hb,cI as shared1_I,wM as shared1_Ia,$i as shared1_Ib,n2e as shared1_J,Sw as shared1_Ja,DC as shared1_Jb,a2e as shared1_K,xM as shared1_Ka,HM as shared1_Kb,GK as shared1_L,Wg as shared1_La,AC as shared1_Lb,s2e as shared1_M,EM as shared1_Ma,qM as shared1_Mb,l2e as shared1_N,kM as shared1_Na,WM as shared1_Nb,u2e as shared1_O,ym as shared1_Oa,VM as shared1_Ob,YY as shared1_P,Fw as shared1_Pa,zY as shared1_Pb,Di as shared1_Q,CM as shared1_Qa,Jl as shared1_Qb,TX as shared1_R,SM as shared1_Ra,Iw as shared1_Rb,jX as shared1_S,f4e as shared1_Sa,UM as shared1_Sb,_X as shared1_T,$M as shared1_Ta,BC as shared1_Tb,MI as shared1_U,vC as shared1_Ua,Am as shared1_Ub,gw as shared1_V,g4e as shared1_Va,mc as shared1_Vb,TI as shared1_W,Qs as shared1_Wa,XY as shared1_Wb,Rg as shared1_X,b4e as shared1_Xa,qFe as shared1_Xb,PI as shared1_Y,uY as shared1_Ya,VFe as shared1_Yb,iw as shared1_Z,y4e as shared1_Za,QY as shared1_Zb,sC as shared1__,gY as shared1__a,PK as shared1_a,Oke as shared1_aa,B4e as shared1_ab,At as shared1_b,zke as shared1_ba,I4e as shared1_bb,nc as shared1_c,lC as shared1_ca,AM as shared1_cb,oI as shared1_d,Js as shared1_da,Vg as shared1_db,Xr as shared1_e,Og as shared1_ea,T4e as shared1_eb,h as shared1_f,cm as shared1_fa,cc as shared1_fb,RK as shared1_g,sw as shared1_ga,HFe as shared1_gb,My as shared1_h,uC as shared1_ha,REe as shared1_hb,d9 as shared1_i,zg as shared1_ia,II as shared1_ib,OK as shared1_j,xw as shared1_ja,nw as shared1_jb,Vxe as shared1_k,Lg as shared1_ka,NEe as shared1_kb,hw as shared1_l,VI as shared1_la,AX as shared1_lb,fI as shared1_m,dC as shared1_ma,sc as shared1_mb,mI as shared1_n,Cm as shared1_na,BM as shared1_nb,rC as shared1_o,ds as shared1_oa,Ug as shared1_ob,hI as shared1_p,Ze as shared1_pa,Gg as shared1_pb,gI as shared1_q,Sm as shared1_qa,Kk as shared1_qb,vI as shared1_r,W9 as shared1_ra,xC as shared1_rb,bI as shared1_s,XI as shared1_sa,IM as shared1_sb,yI as shared1_t,$m as shared1_ta,MM as shared1_tb,wI as shared1_u,ZI as shared1_ua,Yl as shared1_ub,xI as shared1_v,Hg as shared1_va,nFe as shared1_vb,EI as shared1_w,Dm as shared1_wa,tl as shared1_wb,kI as shared1_x,Xs as shared1_xa,Dw as shared1_xb,FI as shared1_y,uM as shared1_ya,Aw as shared1_yb,Xl as shared1_z,cM as shared1_za,FC as shared1_zb,Tb as shared20_a,i0 as shared20_b,VL as shared20_c,Yp as shared20_d,o0 as shared20_e,v2 as shared20_f,b2 as shared20_g,Jp as shared20_h,S7 as shared20_i,wi as shared20_j,t0 as shared21_a,zL as shared21_b,Qp as shared21_c,Ye as shared22_a,I7 as shared22_b,M7 as shared22_c,T7 as shared22_d,Zp as shared23_a,y2 as shared23_b,Ui as shared23_c,_7 as shared24_a,ia as shared25_a,vl as shared26_a,C2 as shared27_a,G7 as shared27_b,hH as shared28_a,K7 as shared28_b,Ko as shared29_a,W7 as shared2_a,V7 as shared2_b,U7 as shared2_c,yH as shared30_a,Cpe as shared30_b,Q7 as shared30_c,X7 as shared31_a,xi as shared31_b,Gi as shared31_c,Je as shared32_a,E$ as shared33_a,k$ as shared33_b,kge as shared33_c,C$ as shared33_d,S$ as shared33_e,D$ as shared33_f,F$ as shared33_g,$$ as shared33_h,v$ as shared34_a,xW as shared34_b,ige as shared34_c,oge as shared34_d,sge as shared34_e,m$ as shared34_f,lge as shared34_g,uge as shared34_h,cge as shared34_i,b$ as shared34_j,y$ as shared34_k,dge as shared34_l,n6 as shared34_m,mf as shared34_n,p1 as shared34_o,f1 as shared34_p,m1 as shared34_q,d1 as shared34_r,A0 as shared34_s,AW as shared34_t,wge as shared34_u,U3 as shared35_a,Zq as shared35_b,G3 as shared35_c,C0 as shared36_A,e0e as shared36_B,W3 as shared36_C,F0 as shared36_D,Yb as shared36_E,Xq as shared36_F,o1 as shared36_G,X2 as shared36_H,Qq as shared36_I,Yq as shared36_J,Q2 as shared36_K,Y2 as shared36_L,Jq as shared36_M,d0e as shared36_N,V3 as shared36_O,Jb as shared36_a,jq as shared36_b,Nhe as shared36_c,P3 as shared36_d,_q as shared36_e,Nq as shared36_f,Rq as shared36_g,O3 as shared36_h,A3 as shared36_i,B3 as shared36_j,Rhe as shared36_k,zhe as shared36_l,z3 as shared36_m,L3 as shared36_n,Zb as shared36_o,pd as shared36_p,e1 as shared36_q,t1 as shared36_r,r1 as shared36_s,n1 as shared36_t,K2 as shared36_u,S0 as shared36_v,H3 as shared36_w,a1 as shared36_x,i1 as shared36_y,Oq as shared36_z,ef as shared37_a,S2 as shared37_b,F2 as shared37_c,Spe as shared37_d,wl as shared38_a,Mu as shared39_a,$2 as shared39_b,J7 as shared39_c,D2 as shared39_d,Z7 as shared39_e,bl as shared39_f,Rb as shared39_g,Xo as shared39_h,Ob as shared39_i,Tu as shared39_j,l0 as shared39_k,u0 as shared39_l,zb as shared39_m,e3 as shared39_n,yl as shared39_o,A2 as shared39_p,B2 as shared39_q,I2 as shared39_r,M2 as shared39_s,T2 as shared39_t,Npe as shared39_u,DF as shared3_a,AF as shared3_b,De as shared3_c,ki as shared40_a,wH as shared41_a,tf as shared41_b,Rpe as shared41_c,Lpe as shared41_d,t3 as shared41_e,v0 as shared42_a,ko as shared42_b,_u as shared43_a,Kb as shared43_b,ud as shared43_c,cd as shared43_d,sf as shared43_e,g0 as shared43_f,lf as shared43_g,z2 as shared43_h,Qn as shared43_i,nq as shared43_j,p3 as shared44_a,xH as shared45_a,a3 as shared45_b,l3 as shared46_a,u3 as shared46_b,c3 as shared46_c,sd as shared47_A,sa as shared47_B,Bt as shared47_C,Gb as shared47_D,qH as shared47_E,Kfe as shared47_a,m3 as shared47_b,eme as shared47_c,VH as shared47_d,sme as shared47_e,ume as shared47_f,b3 as shared47_g,y3 as shared47_h,f0 as shared47_i,m0 as shared47_j,PH as shared47_k,RH as shared47_l,Wb as shared47_m,ga as shared47_n,NH as shared47_o,of as shared47_p,P2 as shared47_q,h0 as shared47_r,id as shared47_s,Vb as shared47_t,va as shared47_u,OH as shared47_v,_2 as shared47_w,Eo as shared47_x,Dme as shared47_y,od as shared47_z,Ci as shared48_a,Ki as shared49_a,ti as shared4_$,Vx as shared4_$a,ob as shared4_A,Gx as shared4_Aa,Ee as shared4_Ab,sb as shared4_B,kF as shared4_Ba,Mx as shared4_C,zo as shared4_Ca,Wte as shared4_D,xu as shared4_Da,Tx as shared4_E,Eu as shared4_Ea,vn as shared4_F,pb as shared4_Fa,Ia as shared4_G,Xc as shared4_Ga,Qc as shared4_H,fb as shared4_Ha,zr as shared4_I,Ux as shared4_Ia,Lt as shared4_J,yt as shared4_Ja,gF as shared4_K,OO as shared4_Ka,Ut as shared4_L,bi as shared4_La,ei as shared4_M,Th as shared4_Ma,ure as shared4_N,ub as shared4_Na,xr as shared4_O,Kc as shared4_Oa,Dx as shared4_P,Ar as shared4_Pa,Li as shared4_Q,Mh as shared4_Qa,vi as shared4_R,yx as shared4_Ra,Yc as shared4_S,Fh as shared4_Sa,Jt as shared4_T,Hx as shared4_Ta,Ja as shared4_U,qx as shared4_Ua,uF as shared4_V,Wx as shared4_Va,cF as shared4_W,jh as shared4_Wa,Tie as shared4_X,cb as shared4_Xa,ra as shared4_Y,Pp as shared4_Ya,Zr as shared4_Z,db as shared4_Za,Kn as shared4__,Mp as shared4__a,Z as shared4_a,kt as shared4_aa,Ma as shared4_ab,aF as shared4_b,cr as shared4_ba,pt as shared4_bb,$h as shared4_c,gre as shared4_ca,CF as shared4_cb,sF as shared4_d,vF as shared4_da,Nh as shared4_db,bte as shared4_e,lb as shared4_ea,bn as shared4_eb,qR as shared4_f,Ge as shared4_fa,Zc as shared4_fb,Zt as shared4_g,w4 as shared4_ga,LO as shared4_gb,wt as shared4_h,Ct as shared4_ha,FF as shared4_hb,Ya as shared4_i,cO as shared4_ia,qO as shared4_ib,lF as shared4_j,Bh as shared4_ja,yu as shared4_jb,or as shared4_k,Gc as shared4_ka,Rae as shared4_kb,GR as shared4_l,bF as shared4_la,Op as shared4_lb,qt as shared4_m,st as shared4_ma,bz as shared4_mb,vr as shared4_n,xt as shared4_na,Xx as shared4_nb,Dh as shared4_o,Jc as shared4_oa,Ta as shared4_ob,Cte as shared4_p,Ch as shared4_pa,Ph as shared4_pb,pl as shared4_q,ue as shared4_qa,mb as shared4_qb,Ah as shared4_r,Rx as shared4_ra,Kx as shared4_rb,JR as shared4_s,gO as shared4_sa,Sr as shared4_sb,fn as shared4_t,Dt as shared4_ta,Qx as shared4_tb,Za as shared4_u,fl as shared4_ua,vz as shared4_ub,wu as shared4_v,Tt as shared4_va,ja as shared4_vb,Ax as shared4_w,Rp as shared4_wa,Rh as shared4_wb,Hi as shared4_x,_h as shared4_xa,hoe as shared4_xb,eO as shared4_y,yi as shared4_ya,ed as shared4_yb,Ix as shared4_z,Xn as shared4_za,yn as shared4_zb,x0 as shared50_a,ba as shared50_b,Dq as shared50_c,u1 as shared51_a,c1 as shared51_b,p$ as shared51_c,f$ as shared51_d,D0 as shared52_a,U0e as shared52_b,G0e as shared52_c,K0e as shared52_d,X0e as shared52_e,dW as shared52_f,Q0e as shared52_g,pW as shared52_h,fW as shared52_i,mW as shared52_j,hd as shared52_k,ege as shared52_l,tge as shared52_m,c$ as shared52_n,Ru as shared52_o,t6 as shared52_p,hW as shared52_q,d$ as shared52_r,Y3 as shared53_a,Nu as shared53_b,J3 as shared53_c,Ra as shared53_d,Z3 as shared53_e,jt as shared53_f,mt as shared53_g,tn as shared53_h,ya as shared54_a,$0 as shared54_b,Ke as shared54_c,Pa as shared54_d,$s as shared54_e,Pu as shared55_a,je as shared56_a,Fr as shared56_b,ri as shared57_a,r$ as shared58_a,a$ as shared59_a,_ as shared5_a,o$ as shared60_a,fd as shared61_a,h1 as shared62_a,B$ as shared62_b,I$ as shared62_c,M$ as shared62_d,As as shared63_a,q$ as shared63_b,y1 as shared63_c,cn as shared64_a,g1 as shared65_a,Xi as shared66_a,Ds as shared66_b,o6 as shared66_c,N$ as shared67_a,v1 as shared68_a,vd as shared69_a,ir as shared6_a,ws as shared6_b,B as shared6_c,ie as shared6_d,bd as shared70_a,W$ as shared70_b,V$ as shared70_c,yd as shared71_a,U$ as shared71_b,G$ as shared71_c,bf as shared72_a,K$ as shared72_b,X$ as shared72_c,x1 as shared73_a,Y$ as shared73_b,UW as shared74_a,GW as shared74_b,KW as shared74_c,es as shared74_d,kl as shared74_e,lD as shared74_f,$n as shared75_a,Si as shared75_b,tD as shared75_c,wa as shared75_d,rD as shared75_e,yf as shared75_f,zu as shared75_g,nD as shared75_h,aD as shared75_i,Pn as shared76_a,T0 as shared76_b,Cl as shared77_a,xf as shared77_b,F1 as shared78_a,SD as shared78_b,E1 as shared79_a,dD as shared79_b,Dve as shared79_c,Ave as shared79_d,Wt as shared7_a,kf as shared80_a,Ive as shared80_b,Tve as shared80_c,fD as shared80_d,qu as shared81_a,Ed as shared81_b,Lu as shared81_c,Hu as shared81_d,rn as shared81_e,Ms as shared81_f,xD as shared81_g,ED as shared81_h,kD as shared81_i,CD as shared81_j,xd as shared82_a,p6 as shared83_a,YW as shared83_b,mD as shared83_c,Nbe as shared84_A,O6 as shared84_B,eA as shared84_C,yV as shared84_a,A6 as shared84_b,M1 as shared84_c,B6 as shared84_d,JD as shared84_e,I6 as shared84_f,M6 as shared84_g,T6 as shared84_h,$be as shared84_i,W0 as shared84_j,j6 as shared84_k,T1 as shared84_l,_6 as shared84_m,j1 as shared84_n,Pf as shared84_o,Dbe as shared84_p,wV as shared84_q,Abe as shared84_r,Bbe as shared84_s,Il as shared84_t,Ibe as shared84_u,Mbe as shared84_v,ZD as shared84_w,N6 as shared84_x,P6 as shared84_y,R6 as shared84_z,Gve as shared85_a,Sl as shared85_b,So as shared85_c,Ji as shared85_d,Sf as shared85_e,Ts as shared85_f,Wu as shared85_g,y6 as shared85_h,Qve as shared85_i,Yve as shared85_j,BD as shared85_k,Jve as shared85_l,w6 as shared85_m,ID as shared85_n,ebe as shared85_o,tbe as shared85_p,rbe as shared85_q,lV as shared85_r,Fl as shared85_s,Ff as shared85_t,$f as shared85_u,P0 as shared85_v,D1 as shared85_w,Df as shared85_x,ibe as shared85_y,FD as shared86_a,g6 as shared86_b,Yi as shared86_c,hV as shared87_a,L0 as shared87_b,OD as shared87_c,zD as shared87_d,LD as shared87_e,HD as shared87_f,$6 as shared87_g,qD as shared87_h,O0 as shared88_a,kd as shared88_b,Af as shared88_c,Bf as shared88_d,cbe as shared88_e,js as shared88_f,MD as shared88_g,TD as shared88_h,x6 as shared89_a,R0 as shared89_b,y7 as shared8_a,m2 as shared8_b,Kp as shared8_c,Xp as shared8_d,h2 as shared8_e,w7 as shared8_f,BL as shared8_g,TL as shared8_h,_L as shared8_i,PL as shared8_j,RL as shared8_k,x7 as shared8_l,E7 as shared8_m,k7 as shared8_n,g2 as shared8_o,e0 as shared8_p,Ib as shared8_q,Kr as shared90_a,Dl as shared90_b,jD as shared90_c,La as shared91_a,Al as shared91_b,PD as shared91_c,Mf as shared91_d,Ha as shared91_e,RD as shared91_f,_s as shared92_a,Tf as shared92_b,Cd as shared92_c,si as shared92_d,WD as shared93_a,Ns as shared93_b,_f as shared94_a,xn as shared95_a,Ps as shared95_b,GD as shared96_a,KD as shared96_b,ybe as shared96_c,B1 as shared96_d,tA as shared97_a,Pbe as shared97_b,z6 as shared98_a,Rbe as shared98_b,Obe as shared98_c,H6 as shared99_a,q6 as shared99_b,Fu as shared9_a};