@iislee/opencodex 2.11.0 → 2.31.0

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 (675) hide show
  1. package/AGENTS_INSTALL.md +109 -0
  2. package/README.md +114 -19
  3. package/bin/ocx.mjs +164 -36
  4. package/bin/package-main.mjs +1 -1
  5. package/gui/dist/assets/index-BF38heuV.js +104 -0
  6. package/gui/dist/assets/index-DMiI18Kv.css +1 -0
  7. package/gui/dist/index.html +2 -2
  8. package/gui/dist/provider-icons/alibaba-color.svg +1 -1
  9. package/gui/dist/provider-icons/antigravity-color.svg +1 -1
  10. package/gui/dist/provider-icons/claude-color.svg +1 -1
  11. package/gui/dist/provider-icons/cline-color.svg +16 -0
  12. package/gui/dist/provider-icons/cloudflare-ai-gateway-color.svg +1 -1
  13. package/gui/dist/provider-icons/commandcode-color.svg +1 -0
  14. package/gui/dist/provider-icons/copilot-color.svg +1 -1
  15. package/gui/dist/provider-icons/cursor-color.svg +1 -1
  16. package/gui/dist/provider-icons/deepseek-color.svg +1 -1
  17. package/gui/dist/provider-icons/firepass-color.svg +1 -1
  18. package/gui/dist/provider-icons/fireworks-color.svg +1 -1
  19. package/gui/dist/provider-icons/gemini-color.svg +1 -1
  20. package/gui/dist/provider-icons/github-copilot-color.svg +1 -1
  21. package/gui/dist/provider-icons/gitlab-duo-color.svg +1 -1
  22. package/gui/dist/provider-icons/grok.svg +1 -1
  23. package/gui/dist/provider-icons/groq-color.svg +1 -1
  24. package/gui/dist/provider-icons/huggingface-color.svg +1 -1
  25. package/gui/dist/provider-icons/kimi-color.svg +1 -1
  26. package/gui/dist/provider-icons/kiro-color.svg +2 -2
  27. package/gui/dist/provider-icons/lm-studio-color.svg +1 -1
  28. package/gui/dist/provider-icons/mistral-color.svg +1 -1
  29. package/gui/dist/provider-icons/moonshot-color.svg +1 -1
  30. package/gui/dist/provider-icons/nvidia-color.svg +1 -1
  31. package/gui/dist/provider-icons/ollama-color.svg +1 -1
  32. package/gui/dist/provider-icons/openai.svg +1 -1
  33. package/gui/dist/provider-icons/opencode.svg +2 -1
  34. package/gui/dist/provider-icons/openrouter-color.svg +1 -1
  35. package/gui/dist/provider-icons/pi.svg +2 -2
  36. package/gui/dist/provider-icons/qianfan-color.svg +1 -1
  37. package/gui/dist/provider-icons/qwen-portal-color.svg +1 -1
  38. package/gui/dist/provider-icons/vercel-ai-gateway-color.svg +1 -1
  39. package/gui/dist/provider-icons/vllm-color.svg +1 -1
  40. package/gui/dist/provider-icons/xiaomi-color.svg +1 -1
  41. package/package.json +19 -10
  42. package/src/adapters/anthropic-output-schema.ts +137 -0
  43. package/src/adapters/anthropic.ts +376 -52
  44. package/src/adapters/base.ts +54 -7
  45. package/src/adapters/client-fingerprint.ts +18 -12
  46. package/src/adapters/cline-pass-deepseek-v4-tool-replay.ts +69 -0
  47. package/src/adapters/command-code.ts +601 -0
  48. package/src/adapters/cursor/checkpoint-store.ts +303 -0
  49. package/src/adapters/cursor/cursor-errors.ts +129 -6
  50. package/src/adapters/cursor/discovery.ts +61 -4
  51. package/src/adapters/cursor/effort-map.ts +27 -3
  52. package/src/adapters/cursor/framing.ts +39 -0
  53. package/src/adapters/cursor/h2-pool.ts +123 -0
  54. package/src/adapters/cursor/http1-bidi.ts +361 -0
  55. package/src/adapters/cursor/images.ts +704 -0
  56. package/src/adapters/cursor/live-models.ts +174 -58
  57. package/src/adapters/cursor/live-transport.ts +609 -170
  58. package/src/adapters/cursor/native-exec-common.ts +23 -2
  59. package/src/adapters/cursor/native-exec-fs.ts +10 -7
  60. package/src/adapters/cursor/native-exec-network.ts +1 -1
  61. package/src/adapters/cursor/native-exec-shell.ts +0 -1
  62. package/src/adapters/cursor/native-exec.ts +101 -14
  63. package/src/adapters/cursor/protobuf-events.ts +829 -11
  64. package/src/adapters/cursor/protobuf-request.ts +383 -65
  65. package/src/adapters/cursor/request-builder.ts +237 -31
  66. package/src/adapters/cursor/tool-definitions.ts +242 -12
  67. package/src/adapters/cursor/tool-result-normalize.ts +92 -0
  68. package/src/adapters/cursor/transport.ts +22 -0
  69. package/src/adapters/cursor/types.ts +28 -1
  70. package/src/adapters/cursor.ts +133 -7
  71. package/src/adapters/google-antigravity-replay.ts +558 -34
  72. package/src/adapters/google-antigravity-wire.ts +43 -10
  73. package/src/adapters/google-http.ts +38 -10
  74. package/src/adapters/google-tool-schema.ts +80 -15
  75. package/src/adapters/google-truncation.ts +11 -0
  76. package/src/adapters/google.ts +618 -74
  77. package/src/adapters/identity.ts +39 -6
  78. package/src/adapters/kiro-errors.ts +11 -0
  79. package/src/adapters/kiro-events.ts +19 -1
  80. package/src/adapters/kiro-thinking.ts +18 -2
  81. package/src/adapters/kiro-tools.ts +10 -1
  82. package/src/adapters/kiro.ts +92 -54
  83. package/src/adapters/mimo-free.ts +17 -0
  84. package/src/adapters/openai-chat-url.ts +11 -0
  85. package/src/adapters/openai-chat.ts +1311 -336
  86. package/src/adapters/openai-responses-url.ts +16 -0
  87. package/src/adapters/openai-responses.ts +830 -56
  88. package/src/adapters/registry.ts +175 -0
  89. package/src/adapters/responses-tool-schema.ts +67 -0
  90. package/src/adapters/tool-call-id.ts +119 -0
  91. package/src/adapters/tool-catalog-nudge.ts +104 -21
  92. package/src/adapters/xai-web-search.ts +185 -0
  93. package/src/bridge.ts +428 -61
  94. package/src/chat/inbound.ts +43 -19
  95. package/src/chat/outbound.ts +82 -26
  96. package/src/claude/agents-inject.ts +32 -9
  97. package/src/claude/context-windows.ts +21 -5
  98. package/src/claude/desktop-3p.ts +243 -9
  99. package/src/claude/gateway-cache.ts +41 -4
  100. package/src/claude/inbound.ts +72 -3
  101. package/src/claude/model-info.ts +38 -15
  102. package/src/claude/outbound.ts +70 -16
  103. package/src/cli/account-api.ts +35 -1
  104. package/src/cli/account-auth.ts +33 -6
  105. package/src/cli/account-catalog-refresh.ts +14 -0
  106. package/src/cli/account-extended.ts +389 -2
  107. package/src/cli/account-main.ts +317 -0
  108. package/src/cli/account.ts +30 -6
  109. package/src/cli/agent.ts +45 -1
  110. package/src/cli/claude-agent-startup-sync.ts +73 -0
  111. package/src/cli/claude-desktop.ts +29 -4
  112. package/src/cli/claude.ts +103 -34
  113. package/src/cli/codex-log-guard-doctor.ts +103 -0
  114. package/src/cli/codex-shim-autorestore.ts +2 -0
  115. package/src/cli/codex-shim-readiness.ts +76 -0
  116. package/src/cli/combo.ts +8 -0
  117. package/src/cli/config-command.ts +74 -10
  118. package/src/cli/dispatch.ts +593 -0
  119. package/src/cli/doctor.ts +315 -43
  120. package/src/cli/ensure-desired-integrations.ts +152 -0
  121. package/src/cli/export-command.ts +46 -20
  122. package/src/cli/help.ts +20 -271
  123. package/src/cli/index.ts +378 -519
  124. package/src/cli/init.ts +4 -17
  125. package/src/cli/integrations.ts +120 -2
  126. package/src/cli/lab.ts +607 -0
  127. package/src/cli/launcher-context.ts +77 -0
  128. package/src/cli/minimax.ts +497 -0
  129. package/src/cli/models-runtime.ts +35 -2
  130. package/src/cli/models.ts +100 -14
  131. package/src/cli/observe.ts +92 -3
  132. package/src/cli/opencode.ts +4 -2
  133. package/src/cli/provider-runtime.ts +18 -1
  134. package/src/cli/provider.ts +24 -3
  135. package/src/cli/ready.ts +301 -0
  136. package/src/cli/registry.ts +437 -0
  137. package/src/cli/root.ts +86 -0
  138. package/src/cli/route-policy.ts +92 -0
  139. package/src/cli/runtime-api.ts +6 -3
  140. package/src/cli/star-prompt.ts +71 -15
  141. package/src/cli/status.ts +10 -3
  142. package/src/cli/system-restart-client.ts +146 -0
  143. package/src/cli/tray-proxy.ts +153 -6
  144. package/src/cli/v2.ts +105 -10
  145. package/src/cli.ts +1 -1
  146. package/src/clients/config-export.ts +1358 -21
  147. package/src/codex/account-label.ts +14 -1
  148. package/src/codex/account-lifecycle.ts +130 -13
  149. package/src/codex/account-namespaces.ts +49 -3
  150. package/src/codex/account-priority.ts +83 -0
  151. package/src/codex/account-store.ts +29 -2
  152. package/src/codex/account-usability.ts +25 -2
  153. package/src/codex/admission.ts +256 -0
  154. package/src/codex/affinity-debug.ts +162 -0
  155. package/src/codex/app-server-processes.ts +493 -106
  156. package/src/codex/app-server-restart-service.ts +232 -0
  157. package/src/codex/auth-api.ts +849 -242
  158. package/src/codex/auth-collision.ts +5 -3
  159. package/src/codex/auth-context.ts +345 -32
  160. package/src/codex/autostart-health.ts +8 -1
  161. package/src/codex/catalog/account-models.ts +67 -0
  162. package/src/codex/catalog/aggregation.ts +68 -10
  163. package/src/codex/catalog/bundled.ts +331 -33
  164. package/src/codex/catalog/effort.ts +121 -30
  165. package/src/codex/catalog/filesystem-evidence.ts +302 -0
  166. package/src/codex/catalog/kinds.ts +2 -0
  167. package/src/codex/catalog/metadata.ts +529 -45
  168. package/src/codex/catalog/native-models.ts +72 -0
  169. package/src/codex/catalog/parsing.ts +224 -30
  170. package/src/codex/catalog/provider-fetch.ts +1460 -134
  171. package/src/codex/catalog/sync.ts +1449 -186
  172. package/src/codex/catalog-admission.ts +199 -0
  173. package/src/codex/catalog-refresh-status.ts +105 -0
  174. package/src/codex/catalog-write-serialization.ts +242 -0
  175. package/src/codex/catalog.ts +6 -3
  176. package/src/codex/codex-write-lock.ts +384 -0
  177. package/src/codex/convergence-types.ts +614 -0
  178. package/src/codex/convergence.ts +651 -0
  179. package/src/codex/coordinator-doctor.ts +332 -0
  180. package/src/codex/custom-model-catalog-migration.ts +176 -0
  181. package/src/codex/desired-state.ts +230 -0
  182. package/src/codex/features.ts +636 -39
  183. package/src/codex/generation.ts +202 -0
  184. package/src/codex/history-job.ts +407 -0
  185. package/src/codex/history-lock.ts +242 -0
  186. package/src/codex/history-migration-guardian.ts +26 -20
  187. package/src/codex/history-provider.ts +231 -28
  188. package/src/codex/history-transition.ts +105 -0
  189. package/src/codex/history-worker.ts +220 -0
  190. package/src/codex/inject-coordination.ts +290 -0
  191. package/src/codex/inject.ts +1073 -152
  192. package/src/codex/injected-marker.ts +37 -3
  193. package/src/codex/integration-record.ts +266 -0
  194. package/src/codex/internal/catalog-writer.ts +203 -0
  195. package/src/codex/internal/history-writer.ts +80 -0
  196. package/src/codex/journal.ts +66 -4
  197. package/src/codex/log-guard/inspect.ts +506 -0
  198. package/src/codex/log-guard/lock.ts +150 -0
  199. package/src/codex/log-guard/maintenance.ts +403 -0
  200. package/src/codex/log-guard/path-safety.ts +88 -0
  201. package/src/codex/log-guard/policy.ts +44 -0
  202. package/src/codex/log-guard/processes.ts +205 -0
  203. package/src/codex/log-guard/protection.ts +489 -0
  204. package/src/codex/log-guard/sqlite-errors.ts +9 -0
  205. package/src/codex/main-account-cache.ts +24 -0
  206. package/src/codex/main-account.ts +29 -1
  207. package/src/codex/management-convergence.ts +167 -0
  208. package/src/codex/model-cache.ts +56 -10
  209. package/src/codex/model-entitlements.ts +353 -0
  210. package/src/codex/native-main-admission.ts +47 -0
  211. package/src/codex/native-main-auth-temp.ts +187 -0
  212. package/src/codex/native-main-claim.ts +178 -0
  213. package/src/codex/native-main-lock-file.ts +162 -0
  214. package/src/codex/native-main-owner.ts +329 -0
  215. package/src/codex/native-profile-api.ts +247 -0
  216. package/src/codex/native-profile-manager.ts +1531 -0
  217. package/src/codex/native-profile-processes.ts +121 -0
  218. package/src/codex/native-profile-recovery.ts +99 -0
  219. package/src/codex/native-profile-stage-store.ts +387 -0
  220. package/src/codex/native-profile-startup.ts +492 -0
  221. package/src/codex/native-profile-store.ts +855 -0
  222. package/src/codex/native-profile-types.ts +120 -0
  223. package/src/codex/native-residue.ts +682 -0
  224. package/src/codex/paths.ts +80 -1
  225. package/src/codex/plan-from-token.ts +140 -0
  226. package/src/codex/plan.ts +40 -0
  227. package/src/codex/plugins-doctor.ts +1 -1
  228. package/src/codex/pool-rotation.ts +74 -4
  229. package/src/codex/project-config-warnings.ts +20 -6
  230. package/src/codex/prompt-journal.ts +352 -0
  231. package/src/codex/prompt-layers.ts +967 -0
  232. package/src/codex/prompt-lock.ts +143 -0
  233. package/src/codex/quota-rejection.ts +298 -0
  234. package/src/codex/quota.ts +175 -13
  235. package/src/codex/refresh.ts +11 -2
  236. package/src/codex/reset-credit-recovery.ts +1044 -0
  237. package/src/codex/routing.ts +505 -94
  238. package/src/codex/runtime.ts +159 -38
  239. package/src/codex/shim.ts +1009 -28
  240. package/src/codex/subagent-model-fallback.ts +350 -35
  241. package/src/codex/sync.ts +191 -2
  242. package/src/codex/transition-state.ts +612 -0
  243. package/src/codex/upstream-host-health.ts +368 -0
  244. package/src/codex/user-identity.ts +557 -0
  245. package/src/codex/warmup.ts +187 -81
  246. package/src/codex/write-coordination.ts +114 -0
  247. package/src/combos/failover.ts +20 -0
  248. package/src/combos/index.ts +4 -0
  249. package/src/combos/request.ts +32 -0
  250. package/src/combos/types.ts +81 -9
  251. package/src/config/provider-name.ts +24 -0
  252. package/src/config.ts +1762 -140
  253. package/src/generated/compatibility-version.json +3164 -0
  254. package/src/generated/{jawcode-model-metadata.ts → model-metadata.ts} +19 -17
  255. package/src/grok/inject.ts +16 -5
  256. package/src/grok/inspect.ts +45 -0
  257. package/src/grok/sync.ts +2 -2
  258. package/src/images/loop.ts +152 -29
  259. package/src/images/plan.ts +23 -13
  260. package/src/integrations/config-io.ts +269 -0
  261. package/src/integrations/journal.ts +315 -0
  262. package/src/integrations/merge.ts +135 -0
  263. package/src/integrations/mutation-flight.ts +71 -0
  264. package/src/integrations/native/ownership-preflight.ts +202 -0
  265. package/src/integrations/omp-yaml-source.ts +358 -0
  266. package/src/integrations/owned-refresh.ts +74 -0
  267. package/src/integrations/ownership.ts +111 -0
  268. package/src/integrations/registry.ts +159 -0
  269. package/src/integrations/serialize.ts +314 -0
  270. package/src/integrations/state.ts +361 -0
  271. package/src/integrations/store.ts +103 -0
  272. package/src/integrations/writer-lock.ts +98 -0
  273. package/src/integrations/writer.ts +691 -0
  274. package/src/lab/artifacts/sanitize.ts +586 -0
  275. package/src/lab/artifacts/secure-fs.ts +475 -0
  276. package/src/lab/artifacts/store.ts +310 -0
  277. package/src/lab/automation/budgets.ts +78 -0
  278. package/src/lab/automation/config-persistence.ts +256 -0
  279. package/src/lab/automation/constants.ts +39 -0
  280. package/src/lab/automation/cooldown.ts +103 -0
  281. package/src/lab/automation/dispatch.ts +211 -0
  282. package/src/lab/automation/index.ts +13 -0
  283. package/src/lab/automation/orchestrator.ts +499 -0
  284. package/src/lab/automation/persistence.ts +512 -0
  285. package/src/lab/automation/planner.ts +371 -0
  286. package/src/lab/automation/policy.ts +136 -0
  287. package/src/lab/automation/queue.ts +191 -0
  288. package/src/lab/automation/recovery.ts +24 -0
  289. package/src/lab/automation/route-context.ts +21 -0
  290. package/src/lab/automation/run-key.ts +44 -0
  291. package/src/lab/automation/runs-query.ts +34 -0
  292. package/src/lab/automation/types.ts +160 -0
  293. package/src/lab/conformance/assertion.ts +325 -0
  294. package/src/lab/conformance/digest.ts +22 -0
  295. package/src/lab/conformance/executor.ts +741 -0
  296. package/src/lab/conformance/fixture-provider.ts +27 -0
  297. package/src/lab/conformance/fixtures/live-v1-cases.json +175 -0
  298. package/src/lab/conformance/fixtures/protocol-v1-cases.json +461 -0
  299. package/src/lab/conformance/harness-budget.ts +47 -0
  300. package/src/lab/conformance/index.ts +5 -0
  301. package/src/lab/conformance/jcs.ts +64 -0
  302. package/src/lab/conformance/json-pointer.ts +39 -0
  303. package/src/lab/conformance/manifest.ts +180 -0
  304. package/src/lab/conformance/mcp-stub.ts +179 -0
  305. package/src/lab/conformance/negative-controls.ts +164 -0
  306. package/src/lab/conformance/observation.ts +355 -0
  307. package/src/lab/conformance/runner.ts +68 -0
  308. package/src/lab/conformance/sse-normalize.ts +59 -0
  309. package/src/lab/conformance/suite-manifest.ts +78 -0
  310. package/src/lab/conformance/types.ts +214 -0
  311. package/src/lab/constants.ts +126 -0
  312. package/src/lab/digest.ts +64 -0
  313. package/src/lab/events/errors.ts +9 -0
  314. package/src/lab/events/limits.ts +117 -0
  315. package/src/lab/events/types.ts +229 -0
  316. package/src/lab/events/validate.ts +781 -0
  317. package/src/lab/fabric/constants.ts +40 -0
  318. package/src/lab/fabric/executor.ts +492 -0
  319. package/src/lab/fabric/index.ts +80 -0
  320. package/src/lab/fabric/manifest.ts +222 -0
  321. package/src/lab/fabric/observe.ts +489 -0
  322. package/src/lab/fabric/patch.ts +79 -0
  323. package/src/lab/fabric/producer-child.ts +139 -0
  324. package/src/lab/fabric/producer-isolate.ts +276 -0
  325. package/src/lab/fabric/producer-protocol.ts +61 -0
  326. package/src/lab/fabric/scratch.ts +439 -0
  327. package/src/lab/fabric/subject.ts +106 -0
  328. package/src/lab/fabric/types.ts +134 -0
  329. package/src/lab/fabric/verifier.ts +98 -0
  330. package/src/lab/index.ts +54 -0
  331. package/src/lab/ledger/artifact-refs.ts +127 -0
  332. package/src/lab/ledger/invalidation.ts +136 -0
  333. package/src/lab/ledger/purge.ts +310 -0
  334. package/src/lab/ledger/store.ts +532 -0
  335. package/src/lab/live/credential-lease.ts +53 -0
  336. package/src/lab/live/destination.ts +155 -0
  337. package/src/lab/live/executor.ts +336 -0
  338. package/src/lab/live/inert-tools.ts +56 -0
  339. package/src/lab/live/manifest.ts +85 -0
  340. package/src/lab/live/mcp-loopback.ts +57 -0
  341. package/src/lab/live/runner.ts +19 -0
  342. package/src/lab/live/sandbox.ts +61 -0
  343. package/src/lab/live/suite-manifest.ts +41 -0
  344. package/src/lab/live/transport.ts +118 -0
  345. package/src/lab/live/types.ts +197 -0
  346. package/src/lab/observe/from-conformance.ts +301 -0
  347. package/src/lab/observe/from-live.ts +117 -0
  348. package/src/lab/paths.ts +153 -0
  349. package/src/lab/projection/rebuild.ts +495 -0
  350. package/src/lab/projection/schema.ts +135 -0
  351. package/src/lab/projection/verdicts.ts +474 -0
  352. package/src/lab/projection/verification.ts +412 -0
  353. package/src/lab/public/bundle.ts +217 -0
  354. package/src/lab/public/community-authority.ts +175 -0
  355. package/src/lab/public/community-files.ts +29 -0
  356. package/src/lab/public/community.ts +479 -0
  357. package/src/lab/public/file-safety.ts +155 -0
  358. package/src/lab/public/ids.ts +26 -0
  359. package/src/lab/public/index.ts +16 -0
  360. package/src/lab/public/mutation-lock.ts +424 -0
  361. package/src/lab/public/operator.ts +353 -0
  362. package/src/lab/public/origin-purge.ts +79 -0
  363. package/src/lab/public/origin.ts +203 -0
  364. package/src/lab/public/privacy.ts +143 -0
  365. package/src/lab/public/private-file.ts +261 -0
  366. package/src/lab/public/project.ts +124 -0
  367. package/src/lab/public/purge-test-fault.ts +21 -0
  368. package/src/lab/public/purge.ts +223 -0
  369. package/src/lab/public/registry.ts +44 -0
  370. package/src/lab/public/revocation.ts +252 -0
  371. package/src/lab/public/signature.ts +243 -0
  372. package/src/lab/public/storage.ts +105 -0
  373. package/src/lab/public/strict-json.ts +206 -0
  374. package/src/lab/public/time.ts +26 -0
  375. package/src/lab/public/types.ts +172 -0
  376. package/src/lab/public/validate.ts +391 -0
  377. package/src/lab/query/catalog.ts +101 -0
  378. package/src/lab/query/connection.ts +107 -0
  379. package/src/lab/query/constants.ts +4 -0
  380. package/src/lab/query/cursor.ts +132 -0
  381. package/src/lab/query/dto-map.ts +277 -0
  382. package/src/lab/query/errors.ts +22 -0
  383. package/src/lab/query/freshness.ts +53 -0
  384. package/src/lab/query/index.ts +45 -0
  385. package/src/lab/query/latest-observation.ts +59 -0
  386. package/src/lab/query/passive-production.ts +159 -0
  387. package/src/lab/query/queries.ts +444 -0
  388. package/src/lab/query/types.ts +266 -0
  389. package/src/lab/subject/behavior-fingerprint.ts +77 -0
  390. package/src/lab/subject/installation-salt.ts +112 -0
  391. package/src/lab/subject/protocol-subject.ts +80 -0
  392. package/src/lab/subject/route-subject.ts +74 -0
  393. package/src/lib/app-owned-memory-stores.ts +22 -0
  394. package/src/lib/bounded-body.ts +153 -9
  395. package/src/lib/bun-runtime.ts +125 -12
  396. package/src/lib/bun-stream-caps.ts +13 -9
  397. package/src/lib/codex-restart-contract.ts +120 -0
  398. package/src/lib/config-ownership.ts +6 -2
  399. package/src/lib/destination-policy.ts +65 -1
  400. package/src/lib/errors.ts +44 -2
  401. package/src/lib/fabric-task-execution-authority.ts +7 -0
  402. package/src/lib/fabric-task-host.ts +29 -0
  403. package/src/lib/lab-activation.ts +223 -0
  404. package/src/lib/lab-live-execution-authority.ts +13 -0
  405. package/src/lib/lab-live-host.ts +30 -0
  406. package/src/lib/lab-live-pinned-sender.ts +56 -0
  407. package/src/lib/lab-live-route-production.ts +130 -0
  408. package/src/lib/lab-passive-linker-registration.ts +26 -0
  409. package/src/lib/local-management-attestation.ts +51 -0
  410. package/src/lib/local-management-capability.ts +100 -0
  411. package/src/lib/local-provider-reload-contract.ts +100 -0
  412. package/src/lib/optional-shutdown-hooks.ts +57 -0
  413. package/src/lib/pinned-http.ts +145 -26
  414. package/src/lib/process-control.ts +4 -1
  415. package/src/lib/provider-outbound.ts +49 -9
  416. package/src/lib/redact.ts +419 -3
  417. package/src/lib/self-launch-argv.ts +15 -0
  418. package/src/lib/server-resource-ownership.ts +71 -0
  419. package/src/lib/shadow-call.ts +35 -4
  420. package/src/lib/sse-decoder.ts +41 -0
  421. package/src/lib/state-store-registrations.ts +10 -2
  422. package/src/lib/system-restart-contract.ts +73 -0
  423. package/src/lib/token-estimate.ts +19 -2
  424. package/src/lib/tool-argument-integers.ts +202 -0
  425. package/src/lib/translator-budget.ts +44 -0
  426. package/src/lib/upstream-http-version.ts +57 -0
  427. package/src/lib/upstream-reachability.ts +95 -0
  428. package/src/lib/upstream-retry.ts +156 -3
  429. package/src/lib/windows-atomic-replace.ts +155 -0
  430. package/src/lib/windows-elevation.ts +70 -2
  431. package/src/lib/windows-secret-acl.ts +409 -69
  432. package/src/lib/windows-service-wrappers.ts +72 -0
  433. package/src/lib/windows-text.ts +106 -0
  434. package/src/lib/windows-user-principal.ts +341 -0
  435. package/src/lib/winsw.ts +33 -5
  436. package/src/oauth/account-import/google-antigravity-adapter.ts +74 -0
  437. package/src/oauth/account-import/index.ts +15 -0
  438. package/src/oauth/account-import/parser.ts +83 -0
  439. package/src/oauth/account-import/registry.ts +18 -0
  440. package/src/oauth/account-import/service.ts +75 -0
  441. package/src/oauth/account-import/types.ts +91 -0
  442. package/src/oauth/anthropic.ts +12 -1
  443. package/src/oauth/callback-server.ts +8 -2
  444. package/src/oauth/chatgpt.ts +12 -1
  445. package/src/oauth/command-code.ts +239 -0
  446. package/src/oauth/cursor.ts +46 -5
  447. package/src/oauth/google-antigravity.ts +35 -3
  448. package/src/oauth/health.ts +20 -12
  449. package/src/oauth/index.ts +398 -66
  450. package/src/oauth/key-providers.ts +16 -0
  451. package/src/oauth/kimi.ts +16 -2
  452. package/src/oauth/kiro.ts +50 -6
  453. package/src/oauth/local-token-detect.ts +11 -2
  454. package/src/oauth/log.ts +3 -1
  455. package/src/oauth/login-cli.ts +88 -28
  456. package/src/oauth/nous.ts +798 -0
  457. package/src/oauth/store.ts +119 -21
  458. package/src/oauth/token-guardian.ts +9 -3
  459. package/src/pi/models.ts +2 -2
  460. package/src/providers/alibaba-region-migration.ts +1 -1
  461. package/src/providers/antigravity-models.ts +521 -31
  462. package/src/providers/base-url-choices.ts +10 -0
  463. package/src/providers/codex-capacity.ts +292 -0
  464. package/src/providers/command-code-efforts.ts +144 -0
  465. package/src/providers/context-cap.ts +22 -5
  466. package/src/providers/cursor-pool.ts +72 -0
  467. package/src/providers/derive.ts +253 -6
  468. package/src/providers/fastwire.ts +501 -0
  469. package/src/providers/free-directory.ts +10 -7
  470. package/src/providers/google-vertex-location.ts +14 -0
  471. package/src/providers/key-failover.ts +71 -3
  472. package/src/providers/label.ts +1 -1
  473. package/src/providers/model-discovery-limits.ts +16 -0
  474. package/src/providers/model-discovery.ts +115 -22
  475. package/src/providers/model-rename-migration.ts +255 -0
  476. package/src/providers/model-rename-startup.ts +28 -0
  477. package/src/providers/openai-sidecar.ts +72 -4
  478. package/src/providers/openai-tier-startup.ts +31 -2
  479. package/src/providers/openai-tiers.ts +119 -4
  480. package/src/providers/openai-virtual-models.ts +1 -0
  481. package/src/providers/opencode-zen-rate-limit.ts +102 -0
  482. package/src/providers/provider-id-rewrite.ts +29 -0
  483. package/src/providers/quota.ts +1319 -38
  484. package/src/providers/registry.ts +1429 -111
  485. package/src/providers/request-pacing.ts +310 -0
  486. package/src/providers/service-tier.ts +277 -0
  487. package/src/providers/slug-codec.ts +42 -6
  488. package/src/providers/static-model-discovery.ts +86 -0
  489. package/src/providers/xai-responses-opt-in.ts +15 -0
  490. package/src/providers/xai-transport.ts +11 -4
  491. package/src/reasoning-effort.ts +49 -1
  492. package/src/responses/compaction.ts +26 -1
  493. package/src/responses/custom-tool-compat.ts +266 -0
  494. package/src/responses/hosted-tool-policy.ts +9 -0
  495. package/src/responses/namespace-tool-compat.ts +355 -0
  496. package/src/responses/parser.ts +220 -38
  497. package/src/responses/provider-continuation.ts +98 -0
  498. package/src/responses/provider-opaque-metadata.ts +73 -0
  499. package/src/responses/reasoning-envelope.ts +9 -1
  500. package/src/responses/reasoning-replay-cache.ts +426 -0
  501. package/src/responses/schema.ts +7 -1
  502. package/src/responses/spill-store.ts +75 -10
  503. package/src/responses/state.ts +565 -27
  504. package/src/responses/thought-signature-replay.ts +347 -0
  505. package/src/responses/tool-search-compat.ts +301 -0
  506. package/src/responses/truncated-stop-reason.ts +60 -0
  507. package/src/router.ts +366 -30
  508. package/src/routing/analytics.ts +378 -0
  509. package/src/routing/capability.ts +244 -0
  510. package/src/routing/compatibility/assemble.ts +73 -0
  511. package/src/routing/compatibility/behavior.ts +278 -0
  512. package/src/routing/compatibility/catalog.ts +99 -0
  513. package/src/routing/compatibility/endpoint.ts +52 -0
  514. package/src/routing/compatibility/lab-evidence-provider.ts +130 -0
  515. package/src/routing/compatibility/policy.ts +181 -0
  516. package/src/routing/compatibility/provider-slot.ts +56 -0
  517. package/src/routing/compatibility/reader.ts +110 -0
  518. package/src/routing/compatibility/subject.ts +191 -0
  519. package/src/routing/compatibility/types.ts +64 -0
  520. package/src/routing/compatibility/version.ts +104 -0
  521. package/src/routing/cost.ts +77 -0
  522. package/src/routing/evaluator.ts +495 -0
  523. package/src/routing/health.ts +412 -0
  524. package/src/routing/history/cursor.ts +43 -0
  525. package/src/routing/history/indexer.ts +605 -0
  526. package/src/routing/history/schema.ts +72 -0
  527. package/src/routing/profile-namespace.ts +15 -0
  528. package/src/routing/profile.ts +547 -0
  529. package/src/routing/quota.ts +145 -0
  530. package/src/routing/request-evidence.ts +45 -0
  531. package/src/routing/trace.ts +776 -0
  532. package/src/server/adapter-resolve.ts +2 -29
  533. package/src/server/auth-cors.ts +267 -46
  534. package/src/server/background-lifecycle.ts +182 -0
  535. package/src/server/chat-completions.ts +130 -56
  536. package/src/server/chat-native-sse.ts +331 -0
  537. package/src/server/chat-native.ts +426 -0
  538. package/src/server/claude-messages.ts +159 -43
  539. package/src/server/direct-local-http.ts +347 -0
  540. package/src/server/effort-policy.ts +18 -0
  541. package/src/server/github-copilot-responses-repair.ts +338 -0
  542. package/src/server/gui-static.ts +39 -10
  543. package/src/server/images.ts +94 -12
  544. package/src/server/index.ts +865 -181
  545. package/src/server/lifecycle.ts +284 -13
  546. package/src/server/live.ts +136 -17
  547. package/src/server/local-management-read-client.ts +90 -0
  548. package/src/server/local-provider-reload-client.ts +137 -0
  549. package/src/server/management/agent-settings-routes.ts +398 -103
  550. package/src/server/management/api-key-usage.ts +31 -5
  551. package/src/server/management/body.ts +6 -0
  552. package/src/server/management/combo-routes.ts +62 -24
  553. package/src/server/management/config-routes.ts +464 -51
  554. package/src/server/management/context.ts +80 -2
  555. package/src/server/management/integration-routes.ts +498 -0
  556. package/src/server/management/lab-automation-routes.ts +206 -0
  557. package/src/server/management/lab-routes.ts +563 -0
  558. package/src/server/management/logs-usage-routes.ts +101 -32
  559. package/src/server/management/model-routes.ts +189 -131
  560. package/src/server/management/model-rows.ts +163 -0
  561. package/src/server/management/native-integration-routes.ts +769 -0
  562. package/src/server/management/oauth-account-routes.ts +80 -4
  563. package/src/server/management/provider-capability-config.ts +48 -0
  564. package/src/server/management/provider-routes.ts +764 -157
  565. package/src/server/management/request-history-routes.ts +191 -0
  566. package/src/server/management/routing-analytics-routes.ts +74 -0
  567. package/src/server/management/routing-profile-routes.ts +380 -0
  568. package/src/server/management/shared.ts +27 -11
  569. package/src/server/management/sidebar-routes.ts +47 -31
  570. package/src/server/management/storage-log-guard-routes.ts +186 -0
  571. package/src/server/management/sync-response.ts +69 -0
  572. package/src/server/management/system-restart.ts +288 -32
  573. package/src/server/management/system-routes.ts +77 -0
  574. package/src/server/management/usage-summary-cache.ts +9 -1
  575. package/src/server/management/vision-sidecar-options.ts +167 -0
  576. package/src/server/management/web-search-sidecar-options.ts +120 -0
  577. package/src/server/management-api.ts +115 -14
  578. package/src/server/management-auth.ts +220 -5
  579. package/src/server/passive-route-linker.ts +66 -0
  580. package/src/server/ports.ts +41 -1
  581. package/src/server/proxy-liveness.ts +132 -5
  582. package/src/server/readiness.ts +99 -0
  583. package/src/server/relay-eager.ts +82 -42
  584. package/src/server/relay.ts +236 -76
  585. package/src/server/request-decompress.ts +113 -6
  586. package/src/server/request-log.ts +235 -22
  587. package/src/server/responses/agent-task-recovery-cache.ts +143 -0
  588. package/src/server/responses/agent-task-recovery.ts +465 -0
  589. package/src/server/responses/collaboration.ts +204 -35
  590. package/src/server/responses/compact.ts +442 -55
  591. package/src/server/responses/core.ts +2872 -331
  592. package/src/server/responses/empty-completion-guard.ts +276 -0
  593. package/src/server/responses/encrypted-payload.ts +62 -39
  594. package/src/server/responses/fetch-helpers.ts +79 -4
  595. package/src/server/responses/input-admission.ts +185 -0
  596. package/src/server/responses/pacing-overload.ts +13 -0
  597. package/src/server/responses/policy-fallback.ts +178 -0
  598. package/src/server/responses/responses-field-backfill.ts +251 -0
  599. package/src/server/responses/terminal-guard.ts +26 -5
  600. package/src/server/responses/upstream-error.ts +5 -0
  601. package/src/server/responses/ws-upstream.ts +308 -0
  602. package/src/server/responses-custom-tool-repair.ts +282 -0
  603. package/src/server/responses-item-id-repair.ts +54 -6
  604. package/src/server/responses-json-events.ts +90 -0
  605. package/src/server/responses-model-rewrite.ts +29 -0
  606. package/src/server/responses-reasoning-summary-rewrite.ts +178 -0
  607. package/src/server/responses-snapshot-repair.ts +621 -0
  608. package/src/server/responses-terminal-repair.ts +342 -0
  609. package/src/server/responses-tool-search-repair.ts +267 -0
  610. package/src/server/responses-undeclared-tool-guard.ts +153 -0
  611. package/src/server/responses.ts +18 -2
  612. package/src/server/search.ts +78 -13
  613. package/src/server/sse-frame-buffer.ts +292 -0
  614. package/src/server/sse-payload-rewrite.ts +110 -22
  615. package/src/server/startup-action-control.ts +8 -1
  616. package/src/server/startup-health-cache.ts +19 -1
  617. package/src/server/system-env.ts +80 -9
  618. package/src/server/ws-bridge.ts +39 -38
  619. package/src/service-manager-probe.ts +892 -0
  620. package/src/service.ts +1111 -90
  621. package/src/sidecar/auth.ts +92 -0
  622. package/src/sidecar/candidates.ts +83 -0
  623. package/src/storage/cleanup.ts +2 -2
  624. package/src/storage/scanner.ts +1 -1
  625. package/src/storage/worker-lifecycle.ts +14 -14
  626. package/src/tray/windows-tray.ps1 +83 -9
  627. package/src/tray/windows.ts +43 -16
  628. package/src/types/accounts.ts +37 -0
  629. package/src/types/config.ts +845 -0
  630. package/src/types/provider.ts +545 -0
  631. package/src/types/request.ts +384 -0
  632. package/src/types/tools.ts +131 -0
  633. package/src/types/wire.ts +80 -0
  634. package/src/types.ts +104 -1236
  635. package/src/update/index.ts +32 -19
  636. package/src/update/job.ts +442 -67
  637. package/src/update/notify.ts +12 -6
  638. package/src/update/npm-cache-preflight.d.mts +47 -0
  639. package/src/update/npm-cache-preflight.mjs +201 -0
  640. package/src/update/transactional-install.d.mts +22 -0
  641. package/src/update/transactional-install.mjs +259 -0
  642. package/src/usage/cost.ts +0 -0
  643. package/src/usage/expected-prices.ts +268 -16
  644. package/src/usage/log.ts +606 -41
  645. package/src/usage/summary.ts +177 -9
  646. package/src/usage/user-cost-overlay-reconciler.ts +313 -0
  647. package/src/usage/user-cost-overlays.ts +314 -0
  648. package/src/vision/anthropic-describe.ts +10 -6
  649. package/src/vision/backends.ts +97 -0
  650. package/src/vision/describe.ts +9 -3
  651. package/src/vision/eligibility.ts +250 -0
  652. package/src/vision/index.ts +238 -24
  653. package/src/vision/reasoning.ts +55 -0
  654. package/src/vision/routed-describe.ts +175 -0
  655. package/src/vision/timeout-bounds.ts +9 -0
  656. package/src/web-search/anthropic-executor.ts +13 -7
  657. package/src/web-search/backends.ts +108 -0
  658. package/src/web-search/exa-executor.ts +88 -0
  659. package/src/web-search/executor.ts +11 -3
  660. package/src/web-search/gemini-executor.ts +141 -0
  661. package/src/web-search/index.ts +150 -15
  662. package/src/web-search/loop.ts +279 -50
  663. package/src/web-search/parse.ts +125 -30
  664. package/src/web-search/sources.ts +60 -0
  665. package/src/web-search/xai-executor.ts +219 -0
  666. package/gui/dist/assets/index-DTpMHS4F.js +0 -67
  667. package/gui/dist/assets/index-ZNVDE3C7.css +0 -1
  668. package/gui/dist/provider-icons/antigravity.svg +0 -1
  669. package/gui/dist/provider-icons/claude.svg +0 -1
  670. package/gui/dist/provider-icons/copilot.svg +0 -1
  671. package/gui/dist/provider-icons/cursor.svg +0 -2
  672. package/gui/dist/provider-icons/gemini.svg +0 -1
  673. package/gui/dist/provider-icons/grok-color.svg +0 -1
  674. package/gui/dist/provider-icons/kiro.svg +0 -14
  675. package/src/cli/internal-dispatch.ts +0 -20
@@ -1,67 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],B=-1;function V(e){return{current:e}}function H(e){0>B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var W=V(null),ee=V(null),G=V(null),te=V(null);function ne(e,t){switch(U(G,t),U(ee,e),U(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(W),U(W,e)}function K(){H(W),H(ee),H(G)}function re(e){e.memoizedState!==null&&U(te,e);var t=W.current,n=Hd(t,e.type);t!==n&&(U(ee,e),U(W,n))}function ie(e){ee.current===e&&(H(W),H(ee)),te.current===e&&(H(te),Qf._currentValue=R)}var ae,oe;function q(e){if(ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||``,oe=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+ae+e+oe}var se=!1;function ce(e,t){if(!e||se)return``;se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
- `),l=s.split(`
5
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?q(n):``}function le(e,t){switch(e.tag){case 26:case 27:case 5:return q(e.type);case 16:return q(`Lazy`);case 13:return e.child!==t&&t!==null?q(`Suspense Fallback`):q(`Suspense`);case 19:return q(`SuspenseList`);case 0:case 15:return ce(e.type,!1);case 11:return ce(e.type.render,!1);case 1:return ce(e.type,!0);case 31:return q(`Activity`);default:return``}}function J(e){try{var t=``,n=null;do t+=le(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var ue=Object.prototype.hasOwnProperty,de=t.unstable_scheduleCallback,fe=t.unstable_cancelCallback,pe=t.unstable_shouldYield,me=t.unstable_requestPaint,he=t.unstable_now,ge=t.unstable_getCurrentPriorityLevel,_e=t.unstable_ImmediatePriority,ve=t.unstable_UserBlockingPriority,ye=t.unstable_NormalPriority,be=t.unstable_LowPriority,xe=t.unstable_IdlePriority,Se=t.log,Ce=t.unstable_setDisableYieldValue,we=null,Te=null;function Ee(e){if(typeof Se==`function`&&Ce(e),Te&&typeof Te.setStrictMode==`function`)try{Te.setStrictMode(we,e)}catch{}}var De=Math.clz32?Math.clz32:Ae,Oe=Math.log,ke=Math.LN2;function Ae(e){return e>>>=0,e===0?32:31-(Oe(e)/ke|0)|0}var je=256,Me=262144,Ne=4194304;function Pe(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Pe(n))):i=Pe(o):i=Pe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Pe(n))):i=Pe(o)):i=Pe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ie(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Le(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Re(){var e=Ne;return Ne<<=1,!(Ne&62914560)&&(Ne=4194304),e}function ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Y(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Be(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-De(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ve(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ve(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-De(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function He(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-De(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ue(e,t){var n=t&-t;return n=n&42?1:We(n),(n&(e.suspendedLanes|t))===0?n:0}function We(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ge(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ke(){var e=L.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function qe(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var Je=Math.random().toString(36).slice(2),Ye=`__reactFiber$`+Je,Xe=`__reactProps$`+Je,Ze=`__reactContainer$`+Je,Qe=`__reactEvents$`+Je,$e=`__reactListeners$`+Je,et=`__reactHandles$`+Je,tt=`__reactResources$`+Je,nt=`__reactMarker$`+Je;function X(e){delete e[Ye],delete e[Xe],delete e[Qe],delete e[$e],delete e[et]}function rt(e){var t=e[Ye];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ze]||n[Ye]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[Ye])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function it(e){if(e=e[Ye]||e[Ze]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function at(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ot(e){var t=e[tt];return t||=e[tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function st(e){e[nt]=!0}var ct=new Set,lt={};function ut(e,t){dt(e,t),dt(e+`Capture`,t)}function dt(e,t){for(lt[e]=t,e=0;e<t.length;e++)ct.add(t[e])}var ft=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]*$`),pt={},mt={};function ht(e){return ue.call(mt,e)?!0:ue.call(pt,e)?!1:ft.test(e)?mt[e]=!0:(pt[e]=!0,!1)}function gt(e,t,n){if(ht(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function _t(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function vt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function yt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function St(e){if(!e._valueTracker){var t=bt(e)?`checked`:`value`;e._valueTracker=xt(e,t,``+e[t])}}function Ct(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function wt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Tt=/[\n"\\]/g;function Et(e){return e.replace(Tt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Dt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+yt(t)):e.value!==``+yt(t)&&(e.value=``+yt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):kt(e,o,yt(n)):kt(e,o,yt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+yt(s):e.removeAttribute(`name`)}function Ot(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){St(e);return}n=n==null?``:``+yt(n),t=t==null?n:``+yt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),St(e)}function kt(e,t,n){t===`number`&&wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function At(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+yt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function jt(e,t,n){if(t!=null&&(t=``+yt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+yt(n)}function Mt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=yt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),St(e)}function Nt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pt=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 Ft(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Pt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function It(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Ft(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Ft(e,o,t[o])}function Lt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 Rt=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`]]),zt=/^[\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 Bt(e){return zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Vt(){}var Ht=null;function Ut(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wt=null,Gt=null;function Kt(e){var t=it(e);if(t&&(e=t.stateNode)){var n=e[Xe]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Dt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Et(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Xe]||null;if(!a)throw Error(i(90));Dt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ct(r)}break a;case`textarea`:jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&At(e,!!n.multiple,t,!1)}}}var qt=!1;function Jt(e,t,n){if(qt)return e(t,n);qt=!0;try{return e(t)}finally{if(qt=!1,(Wt!==null||Gt!==null)&&(_u(),Wt&&(t=Wt,e=Gt,Gt=Wt=null,Kt(t),e)))for(t=0;t<e.length;t++)Kt(e[t])}}function Yt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Xe]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Xt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Zt=!1;if(Xt)try{var Qt={};Object.defineProperty(Qt,"passive",{get:function(){Zt=!0}}),window.addEventListener(`test`,Qt,Qt),window.removeEventListener(`test`,Qt,Qt)}catch{Zt=!1}var $t=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t=en,n=t.length,r,i=`value`in $t?$t.value:$t.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return tn=i.slice(e,1<r?1-r:void 0)}function rn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function an(){return!0}function on(){return!1}function sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?an:on,this.isPropagationStopped=on,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var Z={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Q=sn(Z),cn=h({},Z,{view:0,detail:0}),ln=sn(cn),un,dn,fn,pn=h({},cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==fn&&(fn&&e.type===`mousemove`?(un=e.screenX-fn.screenX,dn=e.screenY-fn.screenY):dn=un=0,fn=e),un)},movementY:function(e){return`movementY`in e?e.movementY:dn}}),mn=sn(pn),hn=sn(h({},pn,{dataTransfer:0})),gn=sn(h({},cn,{relatedTarget:0})),_n=sn(h({},Z,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=sn(h({},Z,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),yn=sn(h({},Z,{data:0})),bn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},xn={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`},Sn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sn[e])?!!t[e]:!1}function wn(){return Cn}var Tn=sn(h({},cn,{key:function(e){if(e.key){var t=bn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=rn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wn,charCode:function(e){return e.type===`keypress`?rn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?rn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),En=sn(h({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Dn=sn(h({},cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wn})),On=sn(h({},Z,{propertyName:0,elapsedTime:0,pseudoElement:0})),kn=sn(h({},pn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),An=sn(h({},Z,{newState:0,oldState:0})),jn=[9,13,27,32],Mn=Xt&&`CompositionEvent`in window,Nn=null;Xt&&`documentMode`in document&&(Nn=document.documentMode);var Pn=Xt&&`TextEvent`in window&&!Nn,Fn=Xt&&(!Mn||Nn&&8<Nn&&11>=Nn),In=` `,Ln=!1;function Rn(e,t){switch(e){case`keyup`:return jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Bn=!1;function Vn(e,t){switch(e){case`compositionend`:return zn(t);case`keypress`:return t.which===32?(Ln=!0,In):null;case`textInput`:return e=t.data,e===In&&Ln?null:e;default:return null}}function Hn(e,t){if(Bn)return e===`compositionend`||!Mn&&Rn(e,t)?(e=nn(),tn=en=$t=null,Bn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Fn&&t.locale!==`ko`?null:t.data;default:return null}}var Un={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 Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Un[e.type]:t===`textarea`}function Gn(e,t,n,r){Wt?Gt?Gt.push(r):Gt=[r]:Wt=r,t=Td(t,`onChange`),0<t.length&&(n=new Q(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Kn=null,qn=null;function Jn(e){_d(e,0)}function Yn(e){if(Ct(at(e)))return e}function Xn(e,t){if(e===`change`)return t}var Zn=!1;if(Xt){var Qn;if(Xt){var $n=`oninput`in document;if(!$n){var er=document.createElement(`div`);er.setAttribute(`oninput`,`return;`),$n=typeof er.oninput==`function`}Qn=$n}else Qn=!1;Zn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Kn&&(Kn.detachEvent(`onpropertychange`,nr),qn=Kn=null)}function nr(e){if(e.propertyName===`value`&&Yn(qn)){var t=[];Gn(t,qn,e,Ut(e)),Jt(Jn,t)}}function rr(e,t,n){e===`focusin`?(tr(),Kn=t,qn=n,Kn.attachEvent(`onpropertychange`,nr)):e===`focusout`&&tr()}function ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Yn(qn)}function ar(e,t){if(e===`click`)return Yn(t)}function or(e,t){if(e===`input`||e===`change`)return Yn(t)}function sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var cr=typeof Object.is==`function`?Object.is:sr;function lr(e,t){if(cr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ue.call(t,i)||!cr(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dr(e,t){var n=ur(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=ur(n)}}function fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=wt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=wt(e.document)}return t}function mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var hr=Xt&&`documentMode`in document&&11>=document.documentMode,gr=null,_r=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yr||gr==null||gr!==wt(r)||(r=gr,`selectionStart`in r&&mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),vr&&lr(vr,r)||(vr=r,r=Td(_r,`onSelect`),0<r.length&&(t=new Q(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Sr={animationend:xr(`Animation`,`AnimationEnd`),animationiteration:xr(`Animation`,`AnimationIteration`),animationstart:xr(`Animation`,`AnimationStart`),transitionrun:xr(`Transition`,`TransitionRun`),transitionstart:xr(`Transition`,`TransitionStart`),transitioncancel:xr(`Transition`,`TransitionCancel`),transitionend:xr(`Transition`,`TransitionEnd`)},Cr={},wr={};Xt&&(wr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),`TransitionEvent`in window||delete Sr.transitionend.transition);function Tr(e){if(Cr[e])return Cr[e];if(!Sr[e])return e;var t=Sr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wr)return Cr[e]=t[n];return e}var Er=Tr(`animationend`),Dr=Tr(`animationiteration`),Or=Tr(`animationstart`),kr=Tr(`transitionrun`),Ar=Tr(`transitionstart`),jr=Tr(`transitioncancel`),Mr=Tr(`transitionend`),Nr=new Map,Pr=`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(` `);Pr.push(`scrollEnd`);function Fr(e,t){Nr.set(e,t),ut(t,[e])}var Ir=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Lr=[],Rr=0,zr=0;function Br(){for(var e=Rr,t=zr=Rr=0;t<e;){var n=Lr[t];Lr[t++]=null;var r=Lr[t];Lr[t++]=null;var i=Lr[t];Lr[t++]=null;var a=Lr[t];if(Lr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Wr(n,i,a)}}function Vr(e,t,n,r){Lr[Rr++]=e,Lr[Rr++]=t,Lr[Rr++]=n,Lr[Rr++]=r,zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Hr(e,t,n,r){return Vr(e,t,n,r),Gr(e)}function Ur(e,t){return Vr(e,null,null,t),Gr(e)}function Wr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-De(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Gr(e){if(50<cu)throw cu=0,lu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Kr={};function qr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jr(e,t,n,r){return new qr(e,t,n,r)}function Yr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xr(e,t){var n=e.alternate;return n===null?(n=Jr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Zr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Qr(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Yr(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,W.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=Jr(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return $r(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=Jr(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=Jr(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=Jr(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Jr(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function $r(e,t,n,r){return e=Jr(7,e,r,t),e.lanes=n,e}function ei(e,t,n){return e=Jr(6,e,null,t),e.lanes=n,e}function ti(e){var t=Jr(18,null,null,0);return t.stateNode=e,t}function ni(e,t,n){return t=Jr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ri=new WeakMap;function ii(e,t){if(typeof e==`object`&&e){var n=ri.get(e);return n===void 0?(t={value:e,source:t,stack:J(t)},ri.set(e,t),t):n}return{value:e,source:t,stack:J(t)}}var ai=[],oi=0,si=null,ci=0,li=[],ui=0,di=null,fi=1,pi=``;function mi(e,t){ai[oi++]=ci,ai[oi++]=si,si=e,ci=t}function hi(e,t,n){li[ui++]=fi,li[ui++]=pi,li[ui++]=di,di=e;var r=fi;e=pi;var i=32-De(r)-1;r&=~(1<<i),n+=1;var a=32-De(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,fi=1<<32-De(t)+i|n<<i|r,pi=a+e}else fi=1<<a|n<<i|r,pi=e}function gi(e){e.return!==null&&(mi(e,1),hi(e,1,0))}function _i(e){for(;e===si;)si=ai[--oi],ai[oi]=null,ci=ai[--oi],ai[oi]=null;for(;e===di;)di=li[--ui],li[ui]=null,pi=li[--ui],li[ui]=null,fi=li[--ui],li[ui]=null}function vi(e,t){li[ui++]=fi,li[ui++]=pi,li[ui++]=di,fi=t.id,pi=t.overflow,di=e}var yi=null,bi=null,xi=!1,Si=null,Ci=!1,wi=Error(i(519));function Ti(e){throw ji(ii(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),wi}function Ei(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ye]=e,t[Xe]=r,n){case`dialog`:vd(`cancel`,t),vd(`close`,t);break;case`iframe`:case`object`:case`embed`:vd(`load`,t);break;case`video`:case`audio`:for(n=0;n<hd.length;n++)vd(hd[n],t);break;case`source`:vd(`error`,t);break;case`img`:case`image`:case`link`:vd(`error`,t),vd(`load`,t);break;case`details`:vd(`toggle`,t);break;case`input`:vd(`invalid`,t),Ot(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:vd(`invalid`,t);break;case`textarea`:vd(`invalid`,t),Mt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&(vd(`beforetoggle`,t),vd(`toggle`,t)),r.onScroll!=null&&vd(`scroll`,t),r.onScrollEnd!=null&&vd(`scrollend`,t),r.onClick!=null&&(t.onclick=Vt),t=!0):t=!1,t||Ti(e,!0)}function Di(e){for(yi=e.return;yi;)switch(yi.tag){case 5:case 31:case 13:Ci=!1;return;case 27:case 3:Ci=!0;return;default:yi=yi.return}}function Oi(e){if(e!==yi)return!1;if(!xi)return Di(e),xi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&bi&&Ti(e),Di(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));bi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));bi=uf(e)}else t===27?(t=bi,Zd(e.type)?(e=lf,lf=null,bi=e):bi=t):bi=yi?cf(e.stateNode.nextSibling):null;return!0}function ki(){bi=yi=null,xi=!1}function Ai(){var e=Si;return e!==null&&(Jl===null?Jl=e:Jl.push.apply(Jl,e),Si=null),e}function ji(e){Si===null?Si=[e]:Si.push(e)}var Mi=V(null),Ni=null,Pi=null;function Fi(e,t,n){U(Mi,t._currentValue),t._currentValue=n}function Ii(e){e._currentValue=Mi.current,H(Mi)}function Li(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ri(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Li(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Li(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function zi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;cr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===te.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Ri(t,e,n,r),t.flags|=262144}function Bi(e){for(e=e.firstContext;e!==null;){if(!cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vi(e){Ni=e,Pi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Hi(e){return Wi(Ni,e)}function Ui(e,t){return Ni===null&&Vi(e),Wi(e,t)}function Wi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Pi===null){if(e===null)throw Error(i(308));Pi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pi=Pi.next=t;return n}var Gi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ki=t.unstable_scheduleCallback,qi=t.unstable_NormalPriority,Ji={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yi(){return{controller:new Gi,data:new Map,refCount:0}}function Xi(e){e.refCount--,e.refCount===0&&Ki(qi,function(){e.controller.abort()})}var Zi=null,Qi=0,$i=0,ea=null;function ta(e,t){if(Zi===null){var n=Zi=[];Qi=0,$i=ld(),ea={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Qi++,t.then(na,na),t}function na(){if(--Qi===0&&Zi!==null){ea!==null&&(ea.status=`fulfilled`);var e=Zi;Zi=null,$i=0,ea=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ra(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ia=I.S;I.S=function(e,t){Zl=he(),typeof t==`object`&&t&&typeof t.then==`function`&&ta(e,t),ia!==null&&ia(e,t)};var aa=V(null);function oa(){var e=aa.current;return e===null?Ml.pooledCache:e}function sa(e,t){t===null?U(aa,aa.current):U(aa,t.pool)}function ca(){var e=oa();return e===null?null:{parent:Ji._currentValue,pool:e}}var la=Error(i(460)),ua=Error(i(474)),da=Error(i(542)),fa={then:function(){}};function pa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ma(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Vt,Vt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,va(e),e;default:if(typeof t.status==`string`)t.then(Vt,Vt);else{if(e=Ml,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,va(e),e}throw ga=t,la}}function ha(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ga=e,la):e}}var ga=null;function _a(){if(ga===null)throw Error(i(459));var e=ga;return ga=null,e}function va(e){if(e===la||e===da)throw Error(i(483))}var ya=null,ba=0;function xa(e){var t=ba;return ba+=1,ya===null&&(ya=[]),ma(ya,e,t)}function Sa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ca(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function wa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Xr(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ei(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&ha(i)===t.type)?(t=a(t,n.props),Sa(t,n),t.return=e,t):(t=Qr(n.type,n.key,n.props,null,e.mode,r),Sa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ni(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=$r(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ei(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=Qr(t.type,t.key,t.props,null,e.mode,n),Sa(n,t),n.return=e,n;case v:return t=ni(t,e.mode,n),t.return=e,t;case O:return t=ha(t),f(e,t,n)}if(F(t)||M(t))return t=$r(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,xa(t),n);if(t.$$typeof===C)return f(e,Ui(e,t),n);Ca(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ha(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,xa(n),r);if(n.$$typeof===C)return p(e,t,Ui(e,n),r);Ca(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ha(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,xa(r),i);if(r.$$typeof===C)return m(e,t,n,Ui(t,r),i);Ca(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),xi&&mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return xi&&mi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),xi&&mi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),xi&&mi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return xi&&mi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),xi&&mi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ha(l)===r.type){n(e,r.sibling),c=a(r,o.props),Sa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=$r(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Qr(o.type,o.key,o.props,null,e.mode,c),Sa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ni(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ha(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,xa(o),c);if(o.$$typeof===C)return b(e,r,Ui(e,o),c);Ca(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ei(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ba=0;var i=b(e,t,n,r);return ya=null,i}catch(t){if(t===la||t===da)throw t;var a=Jr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ta=wa(!0),Ea=wa(!1),Da=!1;function Oa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Aa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,jl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Gr(e),Wr(e,null,n),t}return Vr(e,r,t,n),Gr(e)}function Ma(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,He(e,n)}}function Na(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Pa=!1;function Fa(){if(Pa){var e=ea;if(e!==null)throw e}}function Ia(e,t,n,r){Pa=!1;var i=e.updateQueue;Da=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Pl&f)===f:(r&f)===f){f!==0&&f===$i&&(Pa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Da=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Hl|=o,e.lanes=o,e.memoizedState=d}}function La(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ra(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)La(n[e],t)}var za=V(null),Ba=V(0);function Va(e,t){e=Bl,U(Ba,e),U(za,t),Bl=e|t.baseLanes}function Ha(){U(Ba,Bl),U(za,za.current)}function Ua(){Bl=Ba.current,H(za),H(Ba)}var Wa=V(null),Ga=null;function Ka(e){var t=e.alternate;U(Za,Za.current&1),U(Wa,e),Ga===null&&(t===null||za.current!==null||t.memoizedState!==null)&&(Ga=e)}function qa(e){U(Za,Za.current),U(Wa,e),Ga===null&&(Ga=e)}function Ja(e){e.tag===22?(U(Za,Za.current),U(Wa,e),Ga===null&&(Ga=e)):Ya(e)}function Ya(){U(Za,Za.current),U(Wa,Wa.current)}function Xa(e){H(Wa),Ga===e&&(Ga=null),H(Za)}var Za=V(0);function Qa(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $a=0,$=null,eo=null,to=null,no=!1,ro=!1,io=!1,ao=0,oo=0,so=null,co=0;function lo(){throw Error(i(321))}function uo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function fo(e,t,n,r,i,a){return $a=a,$=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?ks:As,io=!1,a=n(r,i),io=!1,ro&&(a=mo(t,n,r,i)),po(e),a}function po(e){I.H=Os;var t=eo!==null&&eo.next!==null;if($a=0,to=eo=$=null,no=!1,oo=0,so=null,t)throw Error(i(300));e===null||qs||(e=e.dependencies,e!==null&&Bi(e)&&(qs=!0))}function mo(e,t,n,r){$=e;var a=0;do{if(ro&&(so=null),oo=0,ro=!1,25<=a)throw Error(i(301));if(a+=1,to=eo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=js,o=t(n,r)}while(ro);return o}function ho(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?So(t):t,e=e.useState()[0],(eo===null?null:eo.memoizedState)!==e&&($.flags|=1024),t}function go(){var e=ao!==0;return ao=0,e}function _o(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function vo(e){if(no){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}no=!1}$a=0,to=eo=$=null,ro=!1,oo=ao=0,so=null}function yo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return to===null?$.memoizedState=to=e:to=to.next=e,to}function bo(){if(eo===null){var e=$.alternate;e=e===null?null:e.memoizedState}else e=eo.next;var t=to===null?$.memoizedState:to.next;if(t!==null)to=t,eo=e;else{if(e===null)throw $.alternate===null?Error(i(467)):Error(i(310));eo=e,e={memoizedState:eo.memoizedState,baseState:eo.baseState,baseQueue:eo.baseQueue,queue:eo.queue,next:null},to===null?$.memoizedState=to=e:to=to.next=e}return to}function xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function So(e){var t=oo;return oo+=1,so===null&&(so=[]),e=ma(so,e,t),t=$,(to===null?t.memoizedState:to.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?ks:As),e}function Co(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return So(e);if(e.$$typeof===C)return Hi(e)}throw Error(i(438,String(e)))}function wo(e){var t=null,n=$.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=$.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=xo(),$.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function To(e,t){return typeof t==`function`?t(e):t}function Eo(e){return Do(bo(),eo,e)}function Do(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?($a&f)===f:(Pl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===$i&&(d=!0);else if(($a&p)===p){u=u.next,p===$i&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,$.lanes|=p,Hl|=p;f=u.action,io&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,$.lanes|=f,Hl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!cr(o,e.memoizedState)&&(qs=!0,d&&(n=ea,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Oo(e){var t=bo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);cr(o,t.memoizedState)||(qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ko(e,t,n){var r=$,a=bo(),o=xi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!cr((eo||a).memoizedState,n);if(s&&(a.memoizedState=n,qs=!0),a=a.queue,es(Mo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||to!==null&&to.memoizedState.tag&1){if(r.flags|=2048,Yo(9,{destroy:void 0},jo.bind(null,r,a,n,t),null),Ml===null)throw Error(i(349));o||$a&127||Ao(r,t,n)}return n}function Ao(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$.updateQueue,t===null?(t=xo(),$.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function jo(e,t,n,r){t.value=n,t.getSnapshot=r,No(t)&&Po(e)}function Mo(e,t,n){return n(function(){No(t)&&Po(e)})}function No(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cr(e,n)}catch{return!0}}function Po(e){var t=Ur(e,2);t!==null&&fu(t,e,2)}function Fo(e){var t=yo();if(typeof e==`function`){var n=e;if(e=n(),io){Ee(!0);try{n()}finally{Ee(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:e},t}function Io(e,t,n,r){return e.baseState=n,Do(e,eo,typeof r==`function`?r:To)}function Lo(e,t,n,r,a){if(Ts(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ro(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ro(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),zo(e,t,s)}catch(n){Vo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),zo(e,t,a)}catch(n){Vo(e,t,n)}}function zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Bo(e,t,n)},function(n){return Vo(e,t,n)}):Bo(e,t,n)}function Bo(e,t,n){t.status=`fulfilled`,t.value=n,Ho(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ro(e,n)))}function Vo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ho(t),t=t.next;while(t!==r)}e.action=null}function Ho(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Uo(e,t){return t}function Wo(e,t){if(xi){var n=Ml.formState;if(n!==null){a:{var r=$;if(xi){if(bi){b:{for(var i=bi,a=Ci;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){bi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ti(r)}r=!1}r&&(t=n[0])}}return n=yo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:t},n.queue=r,n=Ss.bind(null,$,r),r.dispatch=n,r=Fo(!1),a=ws.bind(null,$,!1,r.queue),r=yo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Lo.bind(null,$,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Go(e){return Ko(bo(),eo,e)}function Ko(e,t,n){if(t=Do(e,t,Uo)[0],e=Eo(To)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=So(t)}catch(e){throw e===la?da:e}else r=t;t=bo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&($.flags|=2048,Yo(9,{destroy:void 0},qo.bind(null,i,n),null)),[r,a,e]}function qo(e,t){e.action=t}function Jo(e){var t=bo(),n=eo;if(n!==null)return Ko(t,n,e);bo(),t=t.memoizedState,n=bo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Yo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=$.updateQueue,t===null&&(t=xo(),$.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Xo(){return bo().memoizedState}function Zo(e,t,n,r){var i=yo();$.flags|=e,i.memoizedState=Yo(1|t,{destroy:void 0},n,r===void 0?null:r)}function Qo(e,t,n,r){var i=bo();r=r===void 0?null:r;var a=i.memoizedState.inst;eo!==null&&r!==null&&uo(r,eo.memoizedState.deps)?i.memoizedState=Yo(t,a,n,r):($.flags|=e,i.memoizedState=Yo(1|t,a,n,r))}function $o(e,t){Zo(8390656,8,e,t)}function es(e,t){Qo(2048,8,e,t)}function ts(e){$.flags|=4;var t=$.updateQueue;if(t===null)t=xo(),$.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ns(e){var t=bo().memoizedState;return ts({ref:t,nextImpl:e}),function(){if(jl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function rs(e,t){return Qo(4,2,e,t)}function is(e,t){return Qo(4,4,e,t)}function as(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function os(e,t,n){n=n==null?null:n.concat([e]),Qo(4,4,as.bind(null,t,e),n)}function ss(){}function cs(e,t){var n=bo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&uo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ls(e,t){var n=bo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&uo(t,r[1]))return r[0];if(r=e(),io){Ee(!0);try{e()}finally{Ee(!1)}}return n.memoizedState=[r,t],r}function us(e,t,n){return n===void 0||$a&1073741824&&!(Pl&261930)?e.memoizedState=t:(e.memoizedState=n,e=du(),$.lanes|=e,Hl|=e,n)}function ds(e,t,n,r){return cr(n,t)?n:za.current===null?!($a&42)||$a&1073741824&&!(Pl&261930)?(qs=!0,e.memoizedState=n):(e=du(),$.lanes|=e,Hl|=e,t):(e=us(e,n,r),cr(e,t)||(qs=!0),e)}function fs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,ws(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Cs(e,t,ra(c,r),uu(e)):Cs(e,t,r,uu(e))}catch(n){Cs(e,t,{then:function(){},status:`rejected`,reason:n},uu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ps(){}function ms(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=hs(e).queue;fs(e,a,t,R,n===null?ps:function(){return gs(e),n(r)})}function hs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function gs(e){var t=hs(e);t.next===null&&(t=e.alternate.memoizedState),Cs(e,t.next.queue,{},uu())}function _s(){return Hi(Qf)}function vs(){return bo().memoizedState}function ys(){return bo().memoizedState}function bs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=uu();e=Aa(n);var r=ja(t,e,n);r!==null&&(fu(r,t,n),Ma(r,t,n)),t={cache:Yi()},e.payload=t;return}t=t.return}}function xs(e,t,n){var r=uu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ts(e)?Es(t,n):(n=Hr(e,t,n,r),n!==null&&(fu(n,e,r),Ds(n,t,r)))}function Ss(e,t,n){Cs(e,t,n,uu())}function Cs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ts(e))Es(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,cr(s,o))return Vr(e,t,i,0),Ml===null&&Br(),!1}catch{}if(n=Hr(e,t,i,r),n!==null)return fu(n,e,r),Ds(n,t,r),!0}return!1}function ws(e,t,n,r){if(r={lane:2,revertLane:ld(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ts(e)){if(t)throw Error(i(479))}else t=Hr(e,n,r,2),t!==null&&fu(t,e,2)}function Ts(e){var t=e.alternate;return e===$||t!==null&&t===$}function Es(e,t){ro=no=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ds(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,He(e,n)}}var Os={readContext:Hi,use:Co,useCallback:lo,useContext:lo,useEffect:lo,useImperativeHandle:lo,useLayoutEffect:lo,useInsertionEffect:lo,useMemo:lo,useReducer:lo,useRef:lo,useState:lo,useDebugValue:lo,useDeferredValue:lo,useTransition:lo,useSyncExternalStore:lo,useId:lo,useHostTransitionStatus:lo,useFormState:lo,useActionState:lo,useOptimistic:lo,useMemoCache:lo,useCacheRefresh:lo};Os.useEffectEvent=lo;var ks={readContext:Hi,use:Co,useCallback:function(e,t){return yo().memoizedState=[e,t===void 0?null:t],e},useContext:Hi,useEffect:$o,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Zo(4194308,4,as.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zo(4194308,4,e,t)},useInsertionEffect:function(e,t){Zo(4,2,e,t)},useMemo:function(e,t){var n=yo();t=t===void 0?null:t;var r=e();if(io){Ee(!0);try{e()}finally{Ee(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=yo();if(n!==void 0){var i=n(t);if(io){Ee(!0);try{n(t)}finally{Ee(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=xs.bind(null,$,e),[r.memoizedState,e]},useRef:function(e){var t=yo();return e={current:e},t.memoizedState=e},useState:function(e){e=Fo(e);var t=e.queue,n=Ss.bind(null,$,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ss,useDeferredValue:function(e,t){return us(yo(),e,t)},useTransition:function(){var e=Fo(!1);return e=fs.bind(null,$,e.queue,!0,!1),yo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=$,a=yo();if(xi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ml===null)throw Error(i(349));Pl&127||Ao(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,$o(Mo.bind(null,r,o,e),[e]),r.flags|=2048,Yo(9,{destroy:void 0},jo.bind(null,r,o,n,t),null),n},useId:function(){var e=yo(),t=Ml.identifierPrefix;if(xi){var n=pi,r=fi;n=(r&~(1<<32-De(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ao++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:_s,useFormState:Wo,useActionState:Wo,useOptimistic:function(e){var t=yo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ws.bind(null,$,!0,n),n.dispatch=t,[e,t]},useMemoCache:wo,useCacheRefresh:function(){return yo().memoizedState=bs.bind(null,$)},useEffectEvent:function(e){var t=yo(),n={impl:e};return t.memoizedState=n,function(){if(jl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},As={readContext:Hi,use:Co,useCallback:cs,useContext:Hi,useEffect:es,useImperativeHandle:os,useInsertionEffect:rs,useLayoutEffect:is,useMemo:ls,useReducer:Eo,useRef:Xo,useState:function(){return Eo(To)},useDebugValue:ss,useDeferredValue:function(e,t){return ds(bo(),eo.memoizedState,e,t)},useTransition:function(){var e=Eo(To)[0],t=bo().memoizedState;return[typeof e==`boolean`?e:So(e),t]},useSyncExternalStore:ko,useId:vs,useHostTransitionStatus:_s,useFormState:Go,useActionState:Go,useOptimistic:function(e,t){return Io(bo(),eo,e,t)},useMemoCache:wo,useCacheRefresh:ys};As.useEffectEvent=ns;var js={readContext:Hi,use:Co,useCallback:cs,useContext:Hi,useEffect:es,useImperativeHandle:os,useInsertionEffect:rs,useLayoutEffect:is,useMemo:ls,useReducer:Oo,useRef:Xo,useState:function(){return Oo(To)},useDebugValue:ss,useDeferredValue:function(e,t){var n=bo();return eo===null?us(n,e,t):ds(n,eo.memoizedState,e,t)},useTransition:function(){var e=Oo(To)[0],t=bo().memoizedState;return[typeof e==`boolean`?e:So(e),t]},useSyncExternalStore:ko,useId:vs,useHostTransitionStatus:_s,useFormState:Jo,useActionState:Jo,useOptimistic:function(e,t){var n=bo();return eo===null?(n.baseState=e,[e,n.queue.dispatch]):Io(n,eo,e,t)},useMemoCache:wo,useCacheRefresh:ys};js.useEffectEvent=ns;function Ms(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ns={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=uu(),i=Aa(r);i.payload=t,n!=null&&(i.callback=n),t=ja(e,i,r),t!==null&&(fu(t,e,r),Ma(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=uu(),i=Aa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ja(e,i,r),t!==null&&(fu(t,e,r),Ma(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=uu(),r=Aa(n);r.tag=2,t!=null&&(r.callback=t),t=ja(e,r,n),t!==null&&(fu(t,e,n),Ma(t,e,n))}};function Ps(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!lr(n,r)||!lr(i,a):!0}function Fs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ns.enqueueReplaceState(t,t.state,null)}function Is(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ls(e){Ir(e)}function Rs(e){console.error(e)}function zs(e){Ir(e)}function Bs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Vs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Hs(e,t,n){return n=Aa(n),n.tag=3,n.payload={element:null},n.callback=function(){Bs(e,t)},n}function Us(e){return e=Aa(e),e.tag=3,e}function Ws(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Vs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Vs(t,n,r),typeof i!=`function`&&(eu===null?eu=new Set([this]):eu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Gs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&zi(t,n,a,!0),n=Wa.current,n!==null){switch(n.tag){case 31:case 13:return Ga===null?wu():n.alternate===null&&Vl===0&&(Vl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===fa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Uu(e,r,a)),!1;case 22:return n.flags|=65536,r===fa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Uu(e,r,a)),!1}throw Error(i(435,n.tag))}return Uu(e,r,a),wu(),!1}if(xi)return t=Wa.current,t===null?(r!==wi&&(t=Error(i(423),{cause:r}),ji(ii(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ii(r,n),a=Hs(e.stateNode,r,a),Na(e,a),Vl!==4&&(Vl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==wi&&(e=Error(i(422),{cause:r}),ji(ii(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ii(o,n),ql===null?ql=[o]:ql.push(o),Vl!==4&&(Vl=2),t===null)return!0;r=ii(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Hs(n.stateNode,r,e),Na(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(eu===null||!eu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Us(a),Ws(a,e,n,r),Na(n,a),!1}n=n.return}while(n!==null);return!1}var Ks=Error(i(461)),qs=!1;function Js(e,t,n,r){t.child=e===null?Ea(t,null,n,r):Ta(t,e.child,n,r)}function Ys(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Vi(t),r=fo(e,t,n,o,a,i),s=go(),e!==null&&!qs?(_o(e,t,i),yc(e,t,i)):(xi&&s&&gi(t),t.flags|=1,Js(e,t,r,i),t.child)}function Xs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Yr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Zs(e,t,a,r,i)):(e=Qr(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!bc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?lr:n,n(o,r)&&e.ref===t.ref)return yc(e,t,i)}return t.flags|=1,e=Xr(a,r),e.ref=t.ref,e.return=t,t.child=e}function Zs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref)if(qs=!1,t.pendingProps=r=a,bc(e,i))e.flags&131072&&(qs=!0);else return t.lanes=e.lanes,yc(e,t,i)}return ac(e,t,n,r,i)}function Qs(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ec(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&sa(t,a===null?null:a.cachePool),a===null?Ha():Va(t,a),Ja(t);else return r=t.lanes=536870912,ec(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&sa(t,null),Ha(),Ya(t)):(sa(t,a.cachePool),Va(t,a),Ya(t),t.memoizedState=null);return Js(e,t,i,n),t.child}function $s(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ec(e,t,n,r,i){var a=oa();return a=a===null?null:{parent:Ji._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&sa(t,null),Ha(),Ja(t),e!==null&&zi(e,t,r,!0),t.childLanes=i,null}function tc(e,t){return t=mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function nc(e,t,n){return Ta(t,e.child,null,n),e=tc(t,t.pendingProps),e.flags|=2,Xa(t),t.memoizedState=null,e}function rc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(xi){if(r.mode===`hidden`)return e=tc(t,r),t.lanes=536870912,$s(null,e);if(qa(t),(e=bi)?(e=rf(e,Ci),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:di===null?null:{id:fi,overflow:pi},retryLane:536870912,hydrationErrors:null},n=ti(e),n.return=t,t.child=n,yi=t,bi=null)):e=null,e===null)throw Ti(t);return t.lanes=536870912,null}return tc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(qa(t),a)if(t.flags&256)t.flags&=-257,t=nc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(qs||zi(e,t,n,!1),a=(n&e.childLanes)!==0,qs||a){if(r=Ml,r!==null&&(s=Ue(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ur(e,s),fu(r,e,s),Ks;wu(),t=nc(e,t,n)}else e=o.treeContext,bi=cf(s.nextSibling),yi=t,xi=!0,Si=null,Ci=!1,e!==null&&vi(t,e),t=tc(t,r),t.flags|=4096;return t}return e=Xr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ic(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ac(e,t,n,r,i){return Vi(t),n=fo(e,t,n,r,void 0,i),r=go(),e!==null&&!qs?(_o(e,t,i),yc(e,t,i)):(xi&&r&&gi(t),t.flags|=1,Js(e,t,n,i),t.child)}function oc(e,t,n,r,i,a){return Vi(t),t.updateQueue=null,n=mo(t,r,n,i),po(e),r=go(),e!==null&&!qs?(_o(e,t,a),yc(e,t,a)):(xi&&r&&gi(t),t.flags|=1,Js(e,t,n,a),t.child)}function sc(e,t,n,r,i){if(Vi(t),t.stateNode===null){var a=Kr,o=n.contextType;typeof o==`object`&&o&&(a=Hi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ns,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Oa(t),o=n.contextType,a.context=typeof o==`object`&&o?Hi(o):Kr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ms(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ns.enqueueReplaceState(a,a.state,null),Ia(t,r,a,i),Fa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Is(n,s);a.props=c;var l=a.context,u=n.contextType;o=Kr,typeof u==`object`&&u&&(o=Hi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Fs(t,a,r,o),Da=!1;var f=t.memoizedState;a.state=f,Ia(t,r,a,i),Fa(),l=t.memoizedState,s||f!==l||Da?(typeof d==`function`&&(Ms(t,n,d,r),l=t.memoizedState),(c=Da||Ps(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ka(e,t),o=t.memoizedProps,u=Is(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Kr,typeof l==`object`&&l&&(c=Hi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Fs(t,a,r,c),Da=!1,f=t.memoizedState,a.state=f,Ia(t,r,a,i),Fa();var p=t.memoizedState;o!==d||f!==p||Da||e!==null&&e.dependencies!==null&&Bi(e.dependencies)?(typeof s==`function`&&(Ms(t,n,s,r),p=t.memoizedState),(u=Da||Ps(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Bi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ic(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ta(t,e.child,null,i),t.child=Ta(t,null,n,i)):Js(e,t,n,i),t.memoizedState=a.state,e=t.child):e=yc(e,t,i),e}function cc(e,t,n,r){return ki(),t.flags|=256,Js(e,t,n,r),t.child}var lc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uc(e){return{baseLanes:e,cachePool:ca()}}function dc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Gl),e}function fc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(Za.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(xi){if(a?Ka(t):Ya(t),(e=bi)?(e=rf(e,Ci),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:di===null?null:{id:fi,overflow:pi},retryLane:536870912,hydrationErrors:null},n=ti(e),n.return=t,t.child=n,yi=t,bi=null)):e=null,e===null)throw Ti(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Ya(t),a=t.mode,c=mc({mode:`hidden`,children:c},a),r=$r(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=uc(n),r.childLanes=dc(e,s,n),t.memoizedState=lc,$s(null,r)):(Ka(t),pc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Ka(t),t.flags&=-257,t=hc(e,t,n)):t.memoizedState===null?(Ya(t),c=r.fallback,a=t.mode,r=mc({mode:`visible`,children:r.children},a),c=$r(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ta(t,e.child,null,n),r=t.child,r.memoizedState=uc(n),r.childLanes=dc(e,s,n),t.memoizedState=lc,t=$s(null,r)):(Ya(t),t.child=e.child,t.flags|=128,t=null);else if(Ka(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,ji({value:r,source:null,stack:null}),t=hc(e,t,n)}else if(qs||zi(e,t,n,!1),s=(n&e.childLanes)!==0,qs||s){if(s=Ml,s!==null&&(r=Ue(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Ur(e,r),fu(s,e,r),Ks;af(c)||wu(),t=hc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,bi=cf(c.nextSibling),yi=t,xi=!0,Si=null,Ci=!1,e!==null&&vi(t,e),t=pc(t,r.children),t.flags|=4096);return t}return a?(Ya(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=Xr(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=$r(c,a,n,null),c.flags|=2):c=Xr(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,$s(null,r),r=t.child,c=e.child.memoizedState,c===null?c=uc(n):(a=c.cachePool,a===null?a=ca():(l=Ji._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=dc(e,s,n),t.memoizedState=lc,$s(e.child,r)):(Ka(t),n=e.child,e=n.sibling,n=Xr(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function pc(e,t){return t=mc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function mc(e,t){return e=Jr(22,e,null,t),e.lanes=0,e}function hc(e,t,n){return Ta(t,e.child,null,n),e=pc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Li(e.return,t,n)}function _c(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function vc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Za.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,U(Za,o),Js(e,t,r,n),r=xi?ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gc(e,n,t);else if(e.tag===19)gc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Qa(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),_c(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qa(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}_c(t,!0,n,null,a,r);break;case`together`:_c(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function yc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(zi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Xr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function bc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Bi(e))):!0}function xc(e,t,n){switch(t.tag){case 3:ne(t,t.stateNode.containerInfo),Fi(t,Ji,e.memoizedState.cache),ki();break;case 27:case 5:re(t);break;case 4:ne(t,t.stateNode.containerInfo);break;case 10:Fi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ka(t),e=yc(e,t,n),e===null?null:e.sibling):fc(e,t,n):(Ka(t),t.flags|=128,null);Ka(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(zi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return vc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(Za,Za.current),r)break;return null;case 22:return t.lanes=0,Qs(e,t,n,t.pendingProps);case 24:Fi(t,Ji,e.memoizedState.cache)}return yc(e,t,n)}function Sc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)qs=!0;else{if(!bc(e,n)&&!(t.flags&128))return qs=!1,xc(e,t,n);qs=!!(e.flags&131072)}else qs=!1,xi&&t.flags&1048576&&hi(t,ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ha(t.elementType),t.type=e,typeof e==`function`)Yr(e)?(r=Is(e,r),t.tag=1,t=sc(null,t,e,r,n)):(t.tag=0,t=ac(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=Ys(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=Xs(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return ac(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Is(r,t.pendingProps),sc(e,t,r,a,n);case 3:a:{if(ne(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ka(e,t),Ia(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Fi(t,Ji,r),r!==o.cache&&Ri(t,[Ji],n,!0),Fa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=cc(e,t,r,n);break a}else if(r!==a){a=ii(Error(i(424)),t),ji(a),t=cc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(bi=cf(e.firstChild),yi=t,xi=!0,Si=null,Ci=!0,n=Ea(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ki(),r===a){t=yc(e,t,n);break a}Js(e,t,r,n)}t=t.child}return t;case 26:return ic(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:xi||(n=t.type,e=t.pendingProps,r=Bd(G.current).createElement(n),r[Ye]=t,r[Xe]=e,Pd(r,n,e),st(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return re(t),e===null&&xi&&(r=t.stateNode=ff(t.type,t.pendingProps,G.current),yi=t,Ci=!0,a=bi,Zd(t.type)?(lf=a,bi=cf(r.firstChild)):bi=a),Js(e,t,t.pendingProps.children,n),ic(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xi&&((a=r=bi)&&(r=tf(r,t.type,t.pendingProps,Ci),r===null?a=!1:(t.stateNode=r,yi=t,bi=cf(r.firstChild),Ci=!1,a=!0)),a||Ti(t)),re(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=fo(e,t,ho,null,null,n),Qf._currentValue=a),ic(e,t),Js(e,t,r,n),t.child;case 6:return e===null&&xi&&((e=n=bi)&&(n=nf(n,t.pendingProps,Ci),n===null?e=!1:(t.stateNode=n,yi=t,bi=null,e=!0)),e||Ti(t)),null;case 13:return fc(e,t,n);case 4:return ne(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ta(t,null,r,n):Js(e,t,r,n),t.child;case 11:return Ys(e,t,t.type,t.pendingProps,n);case 7:return Js(e,t,t.pendingProps,n),t.child;case 8:return Js(e,t,t.pendingProps.children,n),t.child;case 12:return Js(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Fi(t,t.type,r.value),Js(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Vi(t),a=Hi(a),r=r(a),t.flags|=1,Js(e,t,r,n),t.child;case 14:return Xs(e,t,t.type,t.pendingProps,n);case 15:return Zs(e,t,t.type,t.pendingProps,n);case 19:return vc(e,t,n);case 31:return rc(e,t,n);case 22:return Qs(e,t,n,t.pendingProps);case 24:return Vi(t),r=Hi(Ji),e===null?(a=oa(),a===null&&(a=Ml,o=Yi(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Oa(t),Fi(t,Ji,a)):((e.lanes&n)!==0&&(ka(e,t),Ia(t,null,null,n),Fa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Fi(t,Ji,r),r!==a.cache&&Ri(t,[Ji],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Fi(t,Ji,r))),Js(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Cc(e){e.flags|=4}function wc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(xu())e.flags|=8192;else throw ga=fa,ua}else e.flags&=-16777217}function Tc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(xu())e.flags|=8192;else throw ga=fa,ua}function Ec(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Re(),e.lanes|=t,Kl|=t)}function Dc(e,t){if(!xi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Oc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function kc(e,t,n){var r=t.pendingProps;switch(_i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oc(t),null;case 1:return Oc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ii(Ji),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Oi(t)?Cc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ai())),Oc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Cc(t),o===null?(Oc(t),wc(t,a,null,r,n)):(Oc(t),Tc(t,o))):o?o===e.memoizedState?(Oc(t),t.flags&=-16777217):(Cc(t),Oc(t),Tc(t,o)):(e=e.memoizedProps,e!==r&&Cc(t),Oc(t),wc(t,a,e,r,n)),null;case 27:if(ie(t),n=G.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Cc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Oc(t),null}e=W.current,Oi(t)?Ei(t,e):(e=ff(a,r,n),t.stateNode=e,Cc(t))}return Oc(t),null;case 5:if(ie(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Cc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Oc(t),null}if(o=W.current,Oi(t))Ei(t,o);else{var s=Bd(G.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ye]=t,o[Xe]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Cc(t)}}return Oc(t),wc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Cc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=G.current,Oi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=yi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ye]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ti(t,!0)}else e=Bd(e).createTextNode(r),e[Ye]=t,t.stateNode=e}return Oc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Oi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ye]=t}else ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Oc(t),e=!1}else n=Ai(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Xa(t),t):(Xa(t),null);if(t.flags&128)throw Error(i(558))}return Oc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Oi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ye]=t}else ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Oc(t),a=!1}else a=Ai(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Xa(t),t):(Xa(t),null)}return Xa(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ec(t,t.updateQueue),Oc(t),null);case 4:return K(),e===null&&xd(t.stateNode.containerInfo),Oc(t),null;case 10:return Ii(t.type),Oc(t),null;case 19:if(H(Za),r=t.memoizedState,r===null)return Oc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Dc(r,!1);else{if(Vl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Qa(e),o!==null){for(t.flags|=128,Dc(r,!1),e=o.updateQueue,t.updateQueue=e,Ec(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Zr(n,e),n=n.sibling;return U(Za,Za.current&1|2),xi&&mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&he()>Ql&&(t.flags|=128,a=!0,Dc(r,!1),t.lanes=4194304)}else{if(!a)if(e=Qa(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ec(t,e),Dc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!xi)return Oc(t),null}else 2*he()-r.renderingStartTime>Ql&&n!==536870912&&(t.flags|=128,a=!0,Dc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Oc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=he(),e.sibling=null,n=Za.current,U(Za,a?n&1|2:n&1),xi&&mi(t,r.treeForkCount),e);case 22:case 23:return Xa(t),Ua(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Oc(t),t.subtreeFlags&6&&(t.flags|=8192)):Oc(t),n=t.updateQueue,n!==null&&Ec(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&H(aa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ii(Ji),Oc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ac(e,t){switch(_i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ii(Ji),K(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ie(t),null;case 31:if(t.memoizedState!==null){if(Xa(t),t.alternate===null)throw Error(i(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Xa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Za),null;case 4:return K(),null;case 10:return Ii(t.type),null;case 22:case 23:return Xa(t),Ua(),e!==null&&H(aa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ii(Ji),null;case 25:return null;default:return null}}function jc(e,t){switch(_i(t),t.tag){case 3:Ii(Ji),K();break;case 26:case 27:case 5:ie(t);break;case 4:K();break;case 31:t.memoizedState!==null&&Xa(t);break;case 13:Xa(t);break;case 19:H(Za);break;case 10:Ii(t.type);break;case 22:case 23:Xa(t),Ua(),e!==null&&H(aa);break;case 24:Ii(Ji)}}function Mc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Hu(t,t.return,e)}}function Nc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Hu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Hu(t,t.return,e)}}function Pc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ra(t,n)}catch(t){Hu(e,e.return,t)}}}function Fc(e,t,n){n.props=Is(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Hu(e,t,n)}}function Ic(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Hu(e,t,n)}}function Lc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Hu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Hu(e,t,n)}else n.current=null}function Rc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Hu(e,e.return,t)}}function zc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[Xe]=t}catch(t){Hu(e,e.return,t)}}function Bc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Vc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Bc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Hc(e,t,n),e=e.sibling;e!==null;)Hc(e,t,n),e=e.sibling}function Uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}function Wc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[Ye]=e,t[Xe]=n}catch(t){Hu(e,e.return,t)}}var Gc=!1,Kc=!1,qc=!1,Jc=typeof WeakSet==`function`?WeakSet:Set,Yc=null;function Xc(e,t){if(e=e.containerInfo,Rd=sp,e=pr(e),mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,Yc=t;Yc!==null;)if(t=Yc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Yc=e;else for(;Yc!==null;){switch(t=Yc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Is(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Hu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Yc=e;break}Yc=t.return}}function Zc(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:fl(e,n),r&4&&Mc(5,n);break;case 1:if(fl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Hu(n,n.return,e)}else{var i=Is(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Hu(n,n.return,e)}}r&64&&Pc(n),r&512&&Ic(n,n.return);break;case 3:if(fl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ra(e,t)}catch(e){Hu(n,n.return,e)}}break;case 27:t===null&&r&4&&Wc(n);case 26:case 5:fl(e,n),t===null&&r&4&&Rc(n),r&512&&Ic(n,n.return);break;case 12:fl(e,n);break;case 31:fl(e,n),r&4&&rl(e,n);break;case 13:fl(e,n),r&4&&il(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ku.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Gc,!r){t=t!==null&&t.memoizedState!==null||Kc,i=Gc;var a=Kc;Gc=r,(Kc=t)&&!a?ml(e,n,(n.subtreeFlags&8772)!=0):fl(e,n),Gc=i,Kc=a}break;case 30:break;default:fl(e,n)}}function Qc(e){var t=e.alternate;t!==null&&(e.alternate=null,Qc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&X(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var $c=null,el=!1;function tl(e,t,n){for(n=n.child;n!==null;)nl(e,t,n),n=n.sibling}function nl(e,t,n){if(Te&&typeof Te.onCommitFiberUnmount==`function`)try{Te.onCommitFiberUnmount(we,n)}catch{}switch(n.tag){case 26:Kc||Lc(n,t),tl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Kc||Lc(n,t);var r=$c,i=el;Zd(n.type)&&($c=n.stateNode,el=!1),tl(e,t,n),pf(n.stateNode),$c=r,el=i;break;case 5:Kc||Lc(n,t);case 6:if(r=$c,i=el,$c=null,tl(e,t,n),$c=r,el=i,$c!==null)if(el)try{($c.nodeType===9?$c.body:$c.nodeName===`HTML`?$c.ownerDocument.body:$c).removeChild(n.stateNode)}catch(e){Hu(n,t,e)}else try{$c.removeChild(n.stateNode)}catch(e){Hu(n,t,e)}break;case 18:$c!==null&&(el?(e=$c,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd($c,n.stateNode));break;case 4:r=$c,i=el,$c=n.stateNode.containerInfo,el=!0,tl(e,t,n),$c=r,el=i;break;case 0:case 11:case 14:case 15:Nc(2,n,t),Kc||Nc(4,n,t),tl(e,t,n);break;case 1:Kc||(Lc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Fc(n,t,r)),tl(e,t,n);break;case 21:tl(e,t,n);break;case 22:Kc=(r=Kc)||n.memoizedState!==null,tl(e,t,n),Kc=r;break;default:tl(e,t,n)}}function rl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Hu(t,t.return,e)}}}function il(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Hu(t,t.return,e)}}function al(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jc),t;default:throw Error(i(435,e.tag))}}function ol(e,t){var n=al(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=qu.bind(null,e,t);t.then(r,r)}})}function sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){$c=c.stateNode,el=!1;break a}break;case 5:$c=c.stateNode,el=!1;break a;case 3:case 4:$c=c.stateNode.containerInfo,el=!0;break a}c=c.return}if($c===null)throw Error(i(160));nl(o,s,a),$c=null,el=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ll(t,e),t=t.sibling}var cl=null;function ll(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sl(t,e),ul(e),r&4&&(Nc(3,e,e.return),Mc(3,e),Nc(5,e,e.return));break;case 1:sl(t,e),ul(e),r&512&&(Kc||n===null||Lc(n,n.return)),r&64&&Gc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=cl;if(sl(t,e),ul(e),r&512&&(Kc||n===null||Lc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[nt]||o[Ye]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[Ye]=e,st(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[Ye]=e,st(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&zc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:sl(t,e),ul(e),r&512&&(Kc||n===null||Lc(n,n.return)),n!==null&&r&4&&zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(sl(t,e),ul(e),r&512&&(Kc||n===null||Lc(n,n.return)),e.flags&32){a=e.stateNode;try{Nt(a,``)}catch(t){Hu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,zc(e,a,n===null?a:n.memoizedProps)),r&1024&&(qc=!0);break;case 6:if(sl(t,e),ul(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Hu(e,e.return,t)}}break;case 3:if(Bf=null,a=cl,cl=gf(t.containerInfo),sl(t,e),cl=a,ul(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Hu(e,e.return,t)}qc&&(qc=!1,dl(e));break;case 4:r=cl,cl=gf(e.stateNode.containerInfo),sl(t,e),ul(e),cl=r;break;case 12:sl(t,e),ul(e);break;case 31:sl(t,e),ul(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ol(e,r)));break;case 13:sl(t,e),ul(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Xl=he()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ol(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Gc,d=Kc;if(Gc=u||a,Kc=d||l,sl(t,e),Kc=d,Gc=u,ul(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Gc||Kc||pl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Hu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Hu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Hu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ol(e,n))));break;case 19:sl(t,e),ul(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ol(e,r)));break;case 30:break;case 21:break;default:sl(t,e),ul(e)}}function ul(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Bc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Uc(e,Vc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Nt(o,``),n.flags&=-33),Uc(e,Vc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Hc(e,Vc(e),s);break;default:throw Error(i(161))}}catch(t){Hu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;dl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zc(e,t.alternate,t),t=t.sibling}function pl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Nc(4,t,t.return),pl(t);break;case 1:Lc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Fc(t,t.return,n),pl(t);break;case 27:pf(t.stateNode);case 26:case 5:Lc(t,t.return),pl(t);break;case 22:t.memoizedState===null&&pl(t);break;case 30:pl(t);break;default:pl(t)}e=e.sibling}}function ml(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:ml(i,a,n),Mc(4,a);break;case 1:if(ml(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Hu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)La(c[i],s)}catch(e){Hu(r,r.return,e)}}n&&o&64&&Pc(a),Ic(a,a.return);break;case 27:Wc(a);case 26:case 5:ml(i,a,n),n&&r===null&&o&4&&Rc(a),Ic(a,a.return);break;case 12:ml(i,a,n);break;case 31:ml(i,a,n),n&&o&4&&rl(i,a);break;case 13:ml(i,a,n),n&&o&4&&il(i,a);break;case 22:a.memoizedState===null&&ml(i,a,n),Ic(a,a.return);break;case 30:break;default:ml(i,a,n)}t=t.sibling}}function hl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Xi(n))}function gl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xi(e))}function _l(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vl(e,t,n,r),t=t.sibling}function vl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:_l(e,t,n,r),i&2048&&Mc(9,t);break;case 1:_l(e,t,n,r);break;case 3:_l(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xi(e)));break;case 12:if(i&2048){_l(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Hu(t,t.return,e)}}else _l(e,t,n,r);break;case 31:_l(e,t,n,r);break;case 13:_l(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?_l(e,t,n,r):(a._visibility|=2,yl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?_l(e,t,n,r):bl(e,t),i&2048&&hl(o,t);break;case 24:_l(e,t,n,r),i&2048&&gl(t.alternate,t);break;default:_l(e,t,n,r)}}function yl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:yl(a,o,s,c,i),Mc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,yl(a,o,s,c,i)):u._visibility&2?yl(a,o,s,c,i):bl(a,o),i&&l&2048&&hl(o.alternate,o);break;case 24:yl(a,o,s,c,i),i&&l&2048&&gl(o.alternate,o);break;default:yl(a,o,s,c,i)}t=t.sibling}}function bl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:bl(n,r),i&2048&&hl(r.alternate,r);break;case 24:bl(n,r),i&2048&&gl(r.alternate,r);break;default:bl(n,r)}t=t.sibling}}var xl=8192;function Sl(e,t,n){if(e.subtreeFlags&xl)for(e=e.child;e!==null;)Cl(e,t,n),e=e.sibling}function Cl(e,t,n){switch(e.tag){case 26:Sl(e,t,n),e.flags&xl&&e.memoizedState!==null&&Gf(n,cl,e.memoizedState,e.memoizedProps);break;case 5:Sl(e,t,n);break;case 3:case 4:var r=cl;cl=gf(e.stateNode.containerInfo),Sl(e,t,n),cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=xl,xl=16777216,Sl(e,t,n),xl=r):Sl(e,t,n));break;default:Sl(e,t,n)}}function wl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Tl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Yc=r,Ol(r,e)}wl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)El(e),e=e.sibling}function El(e){switch(e.tag){case 0:case 11:case 15:Tl(e),e.flags&2048&&Nc(9,e,e.return);break;case 3:Tl(e);break;case 12:Tl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Dl(e)):Tl(e);break;default:Tl(e)}}function Dl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Yc=r,Ol(r,e)}wl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nc(8,t,t.return),Dl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Dl(t));break;default:Dl(t)}e=e.sibling}}function Ol(e,t){for(;Yc!==null;){var n=Yc;switch(n.tag){case 0:case 11:case 15:Nc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Xi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Yc=r;else a:for(n=e;Yc!==null;){r=Yc;var i=r.sibling,a=r.return;if(Qc(r),r===n){Yc=null;break a}if(i!==null){i.return=a,Yc=i;break a}Yc=a}}}var kl={getCacheForType:function(e){var t=Hi(Ji),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Hi(Ji).controller.signal}},Al=typeof WeakMap==`function`?WeakMap:Map,jl=0,Ml=null,Nl=null,Pl=0,Fl=0,Il=null,Ll=!1,Rl=!1,zl=!1,Bl=0,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=null,Jl=null,Yl=!1,Xl=0,Zl=0,Ql=1/0,$l=null,eu=null,tu=0,nu=null,ru=null,iu=0,au=0,ou=null,su=null,cu=0,lu=null;function uu(){return jl&2&&Pl!==0?Pl&-Pl:I.T===null?Ke():ld()}function du(){if(Gl===0)if(!(Pl&536870912)||xi){var e=Me;Me<<=1,!(Me&3932160)&&(Me=262144),Gl=e}else Gl=536870912;return e=Wa.current,e!==null&&(e.flags|=32),Gl}function fu(e,t,n){(e===Ml&&(Fl===2||Fl===9)||e.cancelPendingCommit!==null)&&(yu(e,0),gu(e,Pl,Gl,!1)),Y(e,n),(!(jl&2)||e!==Ml)&&(e===Ml&&(!(jl&2)&&(Ul|=n),Vl===4&&gu(e,Pl,Gl,!1)),td(e))}function pu(e,t,n){if(jl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ie(e,t),a=r?Du(e,t):Tu(e,t,!0),o=r;do{if(a===0){Rl&&!r&&gu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!hu(n)){a=Tu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ql;var l=c.current.memoizedState.isDehydrated;if(l&&(yu(c,s).flags|=256),s=Tu(c,s,!1),s!==2){if(zl&&!l){c.errorRecoveryDisabledLanes|=o,Ul|=o,a=4;break a}o=Jl,Jl=a,o!==null&&(Jl===null?Jl=o:Jl.push.apply(Jl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){yu(e,0),gu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:gu(r,t,Gl,!Ll);break a;case 2:Jl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Xl+300-he(),10<a)){if(gu(r,t,Gl,!Ll),Fe(r,0,!0)!==0)break a;iu=t,r.timeoutHandle=Kd(mu.bind(null,r,n,Jl,$l,Yl,t,Gl,Ul,Kl,Ll,o,`Throttled`,-0,0),a);break a}mu(r,n,Jl,$l,Yl,t,Gl,Ul,Kl,Ll,o,null,-0,0)}}break}while(1);td(e)}function mu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vt},Cl(t,a,d);var m=(a&62914560)===a?Xl-he():(a&4194048)===a?Zl-he():0;if(m=qf(d,m),m!==null){iu=a,e.cancelPendingCommit=m(Pu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),gu(e,a,o,!l);return}}Pu(e,t,a,n,r,i,o,s,c)}function hu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!cr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gu(e,t,n,r){t&=~Wl,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-De(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ve(e,n,t)}function _u(){return jl&6?!0:(nd(0,!1),!1)}function vu(){if(Nl!==null){if(Fl===0)var e=Nl.return;else e=Nl,Pi=Ni=null,vo(e),ya=null,ba=0,e=Nl;for(;e!==null;)jc(e.alternate,e),e=e.return;Nl=null}}function yu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),iu=0,vu(),Ml=e,Nl=n=Xr(e.current,null),Pl=t,Fl=0,Il=null,Ll=!1,Rl=Ie(e,t),zl=!1,Kl=Gl=Wl=Ul=Hl=Vl=0,Jl=ql=null,Yl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-De(r),a=1<<i;t|=e[i],r&=~a}return Bl=t,Br(),n}function bu(e,t){$=null,I.H=Os,t===la||t===da?(t=_a(),Fl=3):t===ua?(t=_a(),Fl=4):Fl=t===Ks?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Il=t,Nl===null&&(Vl=1,Bs(e,ii(t,e.current)))}function xu(){var e=Wa.current;return e===null?!0:(Pl&4194048)===Pl?Ga===null:(Pl&62914560)===Pl||Pl&536870912?e===Ga:!1}function Su(){var e=I.H;return I.H=Os,e===null?Os:e}function Cu(){var e=I.A;return I.A=kl,e}function wu(){Vl=4,Ll||(Pl&4194048)!==Pl&&Wa.current!==null||(Rl=!0),!(Hl&134217727)&&!(Ul&134217727)||Ml===null||gu(Ml,Pl,Gl,!1)}function Tu(e,t,n){var r=jl;jl|=2;var i=Su(),a=Cu();(Ml!==e||Pl!==t)&&($l=null,yu(e,t)),t=!1;var o=Vl;a:do try{if(Fl!==0&&Nl!==null){var s=Nl,c=Il;switch(Fl){case 8:vu(),o=6;break a;case 3:case 2:case 9:case 6:Wa.current===null&&(t=!0);var l=Fl;if(Fl=0,Il=null,ju(e,s,c,l),n&&Rl){o=0;break a}break;default:l=Fl,Fl=0,Il=null,ju(e,s,c,l)}}Eu(),o=Vl;break}catch(t){bu(e,t)}while(1);return t&&e.shellSuspendCounter++,Pi=Ni=null,jl=r,I.H=i,I.A=a,Nl===null&&(Ml=null,Pl=0,Br()),o}function Eu(){for(;Nl!==null;)ku(Nl)}function Du(e,t){var n=jl;jl|=2;var r=Su(),a=Cu();Ml!==e||Pl!==t?($l=null,Ql=he()+500,yu(e,t)):Rl=Ie(e,t);a:do try{if(Fl!==0&&Nl!==null){t=Nl;var o=Il;b:switch(Fl){case 1:Fl=0,Il=null,ju(e,t,o,1);break;case 2:case 9:if(pa(o)){Fl=0,Il=null,Au(t);break}t=function(){Fl!==2&&Fl!==9||Ml!==e||(Fl=7),td(e)},o.then(t,t);break a;case 3:Fl=7;break a;case 4:Fl=5;break a;case 7:pa(o)?(Fl=0,Il=null,Au(t)):(Fl=0,Il=null,ju(e,t,o,7));break;case 5:var s=null;switch(Nl.tag){case 26:s=Nl.memoizedState;case 5:case 27:var c=Nl;if(s?Wf(s):c.stateNode.complete){Fl=0,Il=null;var l=c.sibling;if(l!==null)Nl=l;else{var u=c.return;u===null?Nl=null:(Nl=u,Mu(u))}break b}}Fl=0,Il=null,ju(e,t,o,5);break;case 6:Fl=0,Il=null,ju(e,t,o,6);break;case 8:vu(),Vl=6;break a;default:throw Error(i(462))}}Ou();break}catch(t){bu(e,t)}while(1);return Pi=Ni=null,I.H=r,I.A=a,jl=n,Nl===null?(Ml=null,Pl=0,Br(),Vl):0}function Ou(){for(;Nl!==null&&!pe();)ku(Nl)}function ku(e){var t=Sc(e.alternate,e,Bl);e.memoizedProps=e.pendingProps,t===null?Mu(e):Nl=t}function Au(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=oc(n,t,t.pendingProps,t.type,void 0,Pl);break;case 11:t=oc(n,t,t.pendingProps,t.type.render,t.ref,Pl);break;case 5:vo(t);default:jc(n,t),t=Nl=Zr(t,Bl),t=Sc(n,t,Bl)}e.memoizedProps=e.pendingProps,t===null?Mu(e):Nl=t}function ju(e,t,n,r){Pi=Ni=null,vo(t),ya=null,ba=0;var i=t.return;try{if(Gs(e,i,t,n,Pl)){Vl=1,Bs(e,ii(n,e.current)),Nl=null;return}}catch(t){if(i!==null)throw Nl=i,t;Vl=1,Bs(e,ii(n,e.current)),Nl=null;return}t.flags&32768?(xi||r===1?e=!0:Rl||Pl&536870912?e=!1:(Ll=e=!0,(r===2||r===9||r===3||r===6)&&(r=Wa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Nu(t,e)):Mu(t)}function Mu(e){var t=e;do{if(t.flags&32768){Nu(t,Ll);return}e=t.return;var n=kc(t.alternate,t,Bl);if(n!==null){Nl=n;return}if(t=t.sibling,t!==null){Nl=t;return}Nl=t=e}while(t!==null);Vl===0&&(Vl=5)}function Nu(e,t){do{var n=Ac(e.alternate,e);if(n!==null){n.flags&=32767,Nl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Nl=e;return}Nl=e=n}while(e!==null);Vl=6,Nl=null}function Pu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do zu();while(tu!==0);if(jl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=zr,Be(e,n,o,s,c,l),e===Ml&&(Nl=Ml=null,Pl=0),ru=t,nu=e,iu=n,au=o,ou=a,su=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Ju(ye,function(){return Bu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=jl,jl|=4;try{Xc(e,t,n)}finally{jl=s,L.p=a,I.T=r}}tu=1,Fu(),Iu(),Lu()}}function Fu(){if(tu===1){tu=0;var e=nu,t=ru,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=jl;jl|=4;try{ll(t,e);var a=zd,o=pr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&fr(s.ownerDocument.documentElement,s)){if(c!==null&&mr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=dr(s,h),v=dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{jl=i,L.p=r,I.T=n}}e.current=t,tu=2}}function Iu(){if(tu===2){tu=0;var e=nu,t=ru,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=jl;jl|=4;try{Zc(e,t.alternate,t)}finally{jl=i,L.p=r,I.T=n}}tu=3}}function Lu(){if(tu===4||tu===3){tu=0,me();var e=nu,t=ru,n=iu,r=su;t.subtreeFlags&10256||t.flags&10256?tu=5:(tu=0,ru=nu=null,Ru(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(eu=null),Ge(n),t=t.stateNode,Te&&typeof Te.onCommitFiberRoot==`function`)try{Te.onCommitFiberRoot(we,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{I.T=t,L.p=i}}iu&3&&zu(),td(e),i=e.pendingLanes,n&261930&&i&42?e===lu?cu++:(cu=0,lu=e):cu=0,nd(0,!1)}}function Ru(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xi(t)))}function zu(){return Fu(),Iu(),Lu(),Bu()}function Bu(){if(tu!==5)return!1;var e=nu,t=au;au=0;var n=Ge(iu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=ou,ou=null;var o=nu,s=iu;if(tu=0,ru=nu=null,iu=0,jl&6)throw Error(i(331));var c=jl;if(jl|=4,El(o.current),vl(o,o.current,s,n),jl=c,nd(0,!1),Te&&typeof Te.onPostCommitFiberRoot==`function`)try{Te.onPostCommitFiberRoot(we,o)}catch{}return!0}finally{L.p=a,I.T=r,Ru(e,t)}}function Vu(e,t,n){t=ii(n,t),t=Hs(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(Y(e,2),td(e))}function Hu(e,t,n){if(e.tag===3)Vu(e,e,n);else for(;t!==null;){if(t.tag===3){Vu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(eu===null||!eu.has(r))){e=ii(n,e),n=Us(2),r=ja(t,n,2),r!==null&&(Ws(n,r,t,e),Y(r,2),td(r));break}}t=t.return}}function Uu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Al;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(zl=!0,i.add(n),e=Wu.bind(null,e,t,n),t.then(e,e))}function Wu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ml===e&&(Pl&n)===n&&(Vl===4||Vl===3&&(Pl&62914560)===Pl&&300>he()-Xl?!(jl&2)&&yu(e,0):Wl|=n,Kl===Pl&&(Kl=0)),td(e)}function Gu(e,t){t===0&&(t=Re()),e=Ur(e,t),e!==null&&(Y(e,t),td(e))}function Ku(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gu(e,n)}function qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Gu(e,n)}function Ju(e,t){return de(e,t)}var Yu=null,Xu=null,Zu=!1,Qu=!1,$u=!1,ed=0;function td(e){e!==Xu&&e.next===null&&(Xu===null?Yu=Xu=e:Xu=Xu.next=e),Qu=!0,Zu||(Zu=!0,cd())}function nd(e,t){if(!$u&&Qu){$u=!0;do for(var n=!1,r=Yu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-De(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,sd(r,a))}else a=Pl,a=Fe(r,r===Ml?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ie(r,a)||(n=!0,sd(r,a));r=r.next}while(n);$u=!1}}function rd(){id()}function id(){Qu=Zu=!1;var e=0;ed!==0&&Gd()&&(e=ed);for(var t=he(),n=null,r=Yu;r!==null;){var i=r.next,a=ad(r,t);a===0?(r.next=null,n===null?Yu=i:n.next=i,i===null&&(Xu=n)):(n=r,(e!==0||a&3)&&(Qu=!0)),r=i}tu!==0&&tu!==5||nd(e,!1),ed!==0&&(ed=0)}function ad(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-De(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Le(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ml,n=Pl,n=Fe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Fl===2||Fl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&fe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ie(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&fe(r),Ge(n)){case 2:case 8:n=ve;break;case 32:n=ye;break;case 268435456:n=xe;break;default:n=ye}return r=od.bind(null,e),n=de(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&fe(r),e.callbackPriority=2,e.callbackNode=null,2}function od(e,t){if(tu!==0&&tu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(zu()&&e.callbackNode!==n)return null;var r=Pl;return r=Fe(e,e===Ml?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(pu(e,r,t),ad(e,he()),e.callbackNode!=null&&e.callbackNode===n?od.bind(null,e):null)}function sd(e,t){if(zu())return null;pu(e,t,!0)}function cd(){Yd(function(){jl&6?de(_e,rd):id()})}function ld(){if(ed===0){var e=$i;e===0&&(e=je,je<<=1,!(je&261888)&&(je=256)),ed=e}return ed}function ud(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Bt(``+e)}function dd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function fd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=ud((i[Xe]||null).action),o=r.submitter;o&&(t=(t=o[Xe]||null)?ud(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Q(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ed!==0){var e=o?dd(i,o):new FormData(i);ms(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?dd(i,o):new FormData(i),ms(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var pd=0;pd<Pr.length;pd++){var md=Pr[pd];Fr(md.toLowerCase(),`on`+(md[0].toUpperCase()+md.slice(1)))}Fr(Er,`onAnimationEnd`),Fr(Dr,`onAnimationIteration`),Fr(Or,`onAnimationStart`),Fr(`dblclick`,`onDoubleClick`),Fr(`focusin`,`onFocus`),Fr(`focusout`,`onBlur`),Fr(kr,`onTransitionRun`),Fr(Ar,`onTransitionStart`),Fr(jr,`onTransitionCancel`),Fr(Mr,`onTransitionEnd`),dt(`onMouseEnter`,[`mouseout`,`mouseover`]),dt(`onMouseLeave`,[`mouseout`,`mouseover`]),dt(`onPointerEnter`,[`pointerout`,`pointerover`]),dt(`onPointerLeave`,[`pointerout`,`pointerover`]),ut(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ut(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ut(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ut(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ut(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ut(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var hd=`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(` `),gd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(hd));function _d(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ir(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ir(e)}i.currentTarget=null,a=c}}}}function vd(e,t){var n=t[Qe];n===void 0&&(n=t[Qe]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,ct.forEach(function(t){t!==`selectionchange`&&(gd.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!Zt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=rt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Jt(function(){var r=a,i=Ut(n),s=[];a:{var c=Nr.get(e);if(c!==void 0){var l=Q,u=e;switch(e){case`keypress`:if(rn(n)===0)break a;case`keydown`:case`keyup`:l=Tn;break;case`focusin`:u=`focus`,l=gn;break;case`focusout`:u=`blur`,l=gn;break;case`beforeblur`:case`afterblur`:l=gn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=mn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Dn;break;case Er:case Dr:case Or:l=_n;break;case Mr:l=On;break;case`scroll`:case`scrollend`:l=ln;break;case`wheel`:l=kn;break;case`copy`:case`cut`:case`paste`:l=vn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=En;break;case`toggle`:case`beforetoggle`:l=An}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Yt(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Ht&&(u=n.relatedTarget||n.fromElement)&&(rt(u)||u[Ze]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?rt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=mn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=En,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:at(l),h=u==null?c:at(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,rt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?at(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Xn;else if(Wn(c))if(Zn)v=or;else{v=ir;var y=rr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Lt(r.elementType)&&(v=Xn):v=ar;if(v&&=v(e,r)){Gn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&kt(c,`number`,c.value)}switch(y=r?at(r):window,e){case`focusin`:(Wn(y)||y.contentEditable===`true`)&&(gr=y,_r=r,vr=null);break;case`focusout`:vr=_r=gr=null;break;case`mousedown`:yr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:yr=!1,br(s,n,i);break;case`selectionchange`:if(hr)break;case`keydown`:case`keyup`:br(s,n,i)}var b;if(Mn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Bn?Rn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Fn&&n.locale!==`ko`&&(Bn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Bn&&(b=nn()):($t=i,en=`value`in $t?$t.value:$t.textContent,Bn=!0)),y=Td(r,x),0<y.length&&(x=new yn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=zn(n),b!==null&&(x.data=b)))),(b=Pn?Vn(e,n):Hn(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new yn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),fd(s,e,r,n,i)}_d(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Yt(e,n),i!=null&&r.unshift(wd(e,i,a)),i=Yt(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Yt(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=Yt(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
9
- `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Nt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Nt(e,``+r);break;case`className`:_t(e,`class`,r);break;case`tabIndex`:_t(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:_t(e,n,r);break;case`style`:It(e,r,o);break;case`data`:if(t!==`object`){_t(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Bt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Bt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`onScroll`:r!=null&&vd(`scroll`,e);break;case`onScrollEnd`:r!=null&&vd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Bt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:vd(`beforetoggle`,e),vd(`toggle`,e),gt(e,`popover`,r);break;case`xlinkActuate`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:gt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Rt.get(n)||n,gt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:It(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Nt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Nt(e,``+r);break;case`onScroll`:r!=null&&vd(`scroll`,e);break;case`onScrollEnd`:r!=null&&vd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!lt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[Xe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):gt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:vd(`error`,e),vd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:vd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Ot(e,o,c,l,u,s,a,!1);return;case`select`:for(a in vd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&At(e,!!r,n,!0):At(e,!!r,t,!1);return;case`textarea`:for(s in vd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Mt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:vd(`beforetoggle`,e),vd(`toggle`,e),vd(`cancel`,e),vd(`close`,e);break;case`iframe`:case`object`:vd(`load`,e);break;case`video`:case`audio`:for(r=0;r<hd.length;r++)vd(hd[r],e);break;case`image`:vd(`error`,e),vd(`load`,e);break;case`details`:vd(`toggle`,e);break;case`embed`:case`source`:case`link`:vd(`error`,e),vd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Lt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Dt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?At(e,!!n,n?[]:``,!1):At(e,!!n,t,!0)):At(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Lt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),X(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[nt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);X(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=L.d;L.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=_u();return e||t}function yf(e){var t=it(e);t!==null&&t.tag===5&&t.type===`form`?gs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Et(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),st(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Et(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Et(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Et(n.imageSizes)+`"]`)):i+=`[href="`+Et(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),st(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Et(r)+`"][href="`+Et(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),st(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=ot(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);st(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=ot(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),st(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=ot(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),st(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=G.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=ot(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=ot(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=ot(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Et(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),st(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Et(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Et(n.href)+`"]`);if(r)return t.instance=r,st(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),st(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,st(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),st(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,st(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),st(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[nt]||a[Ye]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,st(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),st(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ze(0),this.hiddenUpdates=ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Jr(3,null,null,t),e.current=a,a.stateNode=e,t=Yi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Oa(a),e}function tp(e){return e?(e=Kr,e):Kr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Aa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=ja(e,r,t),n!==null&&(fu(n,e,t),Ma(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Ur(e,67108864);t!==null&&fu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=uu();t=We(t);var n=Ur(e,t);n!==null&&fu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,up(e,t,n,r)}finally{L.p=a,I.T=i}}function lp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,up(e,t,n,r)}finally{L.p=a,I.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=it(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Pe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-De(o);s.entanglements[1]|=c,o&=~c}td(a),!(jl&6)&&(Ql=he()+500,nd(0,!1))}}break;case 31:case 13:s=Ur(a,2),s!==null&&fu(s,a,2),_u(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=Ut(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=rt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){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(ge()){case _e:return 2;case ve:return 8;case ye:case be:return 32;case xe:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=it(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=rt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,qe(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,qe(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ht=r,n.target.dispatchEvent(r),Ht=null}else return t=it(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=it(n);a!==null&&(e.splice(t,3),t-=3,ms(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Xe]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Xe]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,uu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),_u(),t[Ze]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ke();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{we=zp.inject(Rp),Te=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ls,s=Rs,c=zs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[Ze]=t.current,xd(e),new Fp(t)}})),g=c(o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()}))(),1),_=c(u(),1),v=new Map,y={data:void 0,error:void 0,loading:!1,refreshing:!1,hasSucceeded:!1,lastAttemptOk:!1};function b(e){let t=v.get(e);return t||(t={snapshot:{data:void 0,error:void 0,loading:!1,refreshing:!1,hasSucceeded:!1,lastAttemptOk:!1},listeners:new Set,pollByListener:new Map,pauseWhenHiddenByListener:new Map,fetcherByListener:new Map,subscriberCount:0,pollTimer:null,pollIntervalMs:void 0,inflight:null,inflightOwner:null,visibilityListener:null,generation:0,seedNeedsRevalidate:!1},v.set(e,t)),t}function x(e){for(let t of e.listeners)t()}function S(e){e.pollTimer!==null&&(clearInterval(e.pollTimer),e.pollTimer=null),e.pollIntervalMs=void 0}function C(){return typeof document<`u`&&document.visibilityState===`hidden`}function w(e){if(!C())return T(e);for(let[t,n]of e.pollByListener)if(!(typeof n!=`number`||n<=0)&&e.pauseWhenHiddenByListener.get(t)===!1){let n=e.fetcherByListener.get(t);if(n)return{owner:t,fetcher:n}}return null}function T(e){for(let[t,n]of e.pollByListener)if(typeof n==`number`&&n>0){let n=e.fetcherByListener.get(t);if(n)return{owner:t,fetcher:n}}for(let[t,n]of e.fetcherByListener)return{owner:t,fetcher:n};return null}function E(e){let t;for(let n of e.pollByListener.values())typeof n==`number`&&n>0&&(t=t===void 0?n:Math.min(t,n));if(!(t===e.pollIntervalMs&&(t===void 0||e.pollTimer!==null))){if(S(e),e.pollIntervalMs=t,t===void 0){O(e);return}e.pollTimer=setInterval(()=>{let t=w(e);t&&k(e,t.fetcher,{replaceInflight:!1,owner:t.owner})},t),D(e)}}function D(e){if(typeof document>`u`||e.visibilityListener)return;let t=()=>{if(C()||e.pollIntervalMs===void 0)return;let t=T(e);t&&k(e,t.fetcher,{replaceInflight:!1,owner:t.owner})};document.addEventListener(`visibilitychange`,t),e.visibilityListener=t}function O(e){e.visibilityListener&&=(typeof document<`u`&&document.removeEventListener(`visibilitychange`,e.visibilityListener),null)}async function k(e,t,n){let r=n?.replaceInflight!==!1;if(e.inflight&&!r)return;r&&e.inflight?.abort();let i=new AbortController;e.inflight=i,e.inflightOwner=n?.owner??null;let a=++e.generation,o=e.snapshot.data===void 0||n?.forceLoading===!0;e.snapshot={...e.snapshot,loading:o?!0:e.snapshot.loading,refreshing:!0},x(e);try{let n=await t(i.signal);if(a!==e.generation||i.signal.aborted)return;e.seedNeedsRevalidate=!1,e.snapshot={data:n,error:void 0,loading:!1,refreshing:!1,hasSucceeded:!0,lastAttemptOk:!0}}catch(t){if(a!==e.generation||i.signal.aborted)return;e.seedNeedsRevalidate=!1,e.snapshot={...e.snapshot,error:t===void 0?Error(`resource load failed`):t,loading:!1,refreshing:!1,lastAttemptOk:!1}}finally{e.inflight===i&&(e.inflight=null,e.inflightOwner=null),x(e)}}function A(e,t){return e.inflightOwner===t?(e.inflight?.abort(),e.inflight=null,e.inflightOwner=null,e.generation++,e.snapshot.refreshing&&(e.snapshot={...e.snapshot,refreshing:!1},x(e)),!0):!1}function j(e,t){S(t),O(t),setTimeout(()=>{t.subscriberCount===0&&v.get(e)===t&&(t.inflight?.abort(),t.inflight=null,t.inflightOwner=null,v.delete(e))},0)}function M(e,t,n,r,i=!0){let a=b(e);return a.listeners.add(r),a.pollByListener.set(r,n),a.pauseWhenHiddenByListener.set(r,i),a.fetcherByListener.set(r,t),a.subscriberCount++,a.subscriberCount===1&&(a.snapshot.data===void 0||a.seedNeedsRevalidate)&&k(a,t,{replaceInflight:!0,owner:r}),E(a),()=>{a.listeners.delete(r),a.pollByListener.delete(r),a.pauseWhenHiddenByListener.delete(r),a.fetcherByListener.delete(r),a.subscriberCount--;let t=A(a,r);if(a.subscriberCount===0){j(e,a);return}if(t){let e=T(a);e&&k(a,e.fetcher,{replaceInflight:!0,owner:e.owner})}E(a)}}function N(e,t){let n=b(e);n.subscriberCount!==0||n.snapshot.data!==void 0||L(e,t)}function P(e,t,n){let r=n?.enabled!==!1,i=n?.pollMs,a=n?.pauseWhenHidden!==!1;r&&n?.initialData!==void 0&&N(e,n.initialData);let o=(0,_.useRef)(t);(0,_.useLayoutEffect)(()=>{o.current=t});let s=(0,_.useCallback)(e=>o.current(e),[]),c=(0,_.useRef)(null),l=(0,_.useCallback)(t=>r?(c.current=t,M(e,s,i,t,a)):()=>{},[e,s,i,r,a]),u=(0,_.useCallback)(()=>r?b(e).snapshot:y,[e,r]),d=(0,_.useSyncExternalStore)(l,u,u),f=(0,_.useCallback)(t=>{r&&k(b(e),s,{replaceInflight:!0,owner:c.current,forceLoading:t?.forceLoading})},[e,s,r]);return{...d,refresh:f}}function F(e,t){if(e===null)return!1;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!0;return!1}function I(e,t,n,r){let i=P(e,n,r),a=(0,_.useRef)(null),o=(0,_.useRef)(null);return(0,_.useLayoutEffect)(()=>{let n=a.current,r=o.current;a.current=t,o.current=e,F(n,t)&&(r!==null&&r!==e||i.refresh({forceLoading:!0}))}),i}function L(e,t){let n=b(e);n.inflight?.abort(),n.inflight=null,n.inflightOwner=null,n.generation++,n.snapshot={data:t,error:void 0,loading:!1,refreshing:!1,hasSucceeded:!0,lastAttemptOk:!0},n.seedNeedsRevalidate=n.subscriberCount===0,x(n)}var R=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=o(((e,t)=>{t.exports=R()}))(),B=e=>({viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e}),V=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`rect`,{x:`3`,y:`3`,width:`7`,height:`7`,rx:`1.5`}),(0,z.jsx)(`rect`,{x:`14`,y:`3`,width:`7`,height:`7`,rx:`1.5`}),(0,z.jsx)(`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1.5`}),(0,z.jsx)(`rect`,{x:`14`,y:`14`,width:`7`,height:`7`,rx:`1.5`})]}),H=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`7`,rx:`2`}),(0,z.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`7`,rx:`2`}),(0,z.jsx)(`path`,{d:`M7 7.5h.01M7 16.5h.01`})]}),U=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`path`,{d:`M12 2 4 6v6l8 4 8-4V6l-8-4Z`}),(0,z.jsx)(`path`,{d:`m4 6 8 4 8-4M12 10v8`})]}),W=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`11`,rx:`3`}),(0,z.jsx)(`path`,{d:`M12 8V4M8 2h8`}),(0,z.jsx)(`circle`,{cx:`9`,cy:`13`,r:`1`}),(0,z.jsx)(`circle`,{cx:`15`,cy:`13`,r:`1`})]}),ee=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01`})}),G=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h16`})}),te=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`path`,{d:`m4 17 6-5-6-5`}),(0,z.jsx)(`path`,{d:`M12 19h8`})]}),ne=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M22 12h-4l-3 9L9 3l-3 9H2`})}),K=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`path`,{d:`M22 12H2`}),(0,z.jsx)(`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11Z`}),(0,z.jsx)(`path`,{d:`M6 16h.01M10 16h.01`})]}),re=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`})}),ie=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`m20 6-11 11-5-5`})}),ae=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),oe=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M12 5v14M5 12h14`})}),q=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M21 12a9 9 0 0 1-9 9 9.8 9.8 0 0 1-6.7-2.7L3 16M3 21v-5h5M3 12a9 9 0 0 1 9-9 9.8 9.8 0 0 1 6.7 2.7L21 8M21 3v5h-5`})}),se=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M8 5v14M16 5v14`})}),ce=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`m7 4 13 8-13 8Z`})}),le=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6`})}),J=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`path`,{d:`M10.3 3.7 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.7a2 2 0 0 0-3.4 0Z`}),(0,z.jsx)(`path`,{d:`M12 9v4M12 17h.01`})]}),ue=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,z.jsx)(`path`,{d:`M12 16v-4M12 8h.01`})]}),de=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,z.jsx)(`path`,{d:`m21 21-4.3-4.3`})]}),fe=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M12 19V5M5 12l7-7 7 7`})}),pe=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M12 5v14M19 12l-7 7-7-7`})}),me=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3`})}),he=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`m9 18 6-6-6-6`})}),ge=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M9 19c-5 1.5-5-2.5-7-3m14 6v-3.9a3.4 3.4 0 0 0-.9-2.6c3-.3 6.2-1.5 6.2-6.7A5.2 5.2 0 0 0 20 4.8 4.9 4.9 0 0 0 19.9 1S18.7.6 16 2.5a13.4 13.4 0 0 0-7 0C6.3.6 5.1 1 5.1 1A4.9 4.9 0 0 0 5 4.8a5.2 5.2 0 0 0-1.4 3.7c0 5.1 3.1 6.4 6.1 6.7a3.4 3.4 0 0 0-.9 2.5V22`})}),_e=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`path`,{d:`M18.4 5.6a9 9 0 1 1-12.8 0`}),(0,z.jsx)(`path`,{d:`M12 2v10`})]}),ve=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`})}),ye=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`4.5`}),(0,z.jsx)(`path`,{d:`m10.7 12.3 9.6-9.6M16 7l3 3M14 9l2 2`})]}),be=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`rect`,{x:`4`,y:`11`,width:`16`,height:`10`,rx:`2`}),(0,z.jsx)(`path`,{d:`M8 11V7a4 4 0 0 1 8 0v4`})]}),xe=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`}),(0,z.jsx)(`path`,{d:`M13 5v2`}),(0,z.jsx)(`path`,{d:`M13 17v2`}),(0,z.jsx)(`path`,{d:`M13 11v2`})]}),Se=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2M15 7h2a5 5 0 0 1 0 10h-2M8 12h8`})}),Ce=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,z.jsx)(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4`})]}),we=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8Z`})}),Te=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`}),(0,z.jsx)(`path`,{d:`M8 21h8M12 17v4`})]}),Ee=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,z.jsx)(`path`,{d:`M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18`})]}),De=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M12 3v18M5.6 5.6l12.8 12.8M3 12h18M5.6 18.4 18.4 5.6`})}),Oe=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`path`,{d:`m18 14 4 4-4 4`}),(0,z.jsx)(`path`,{d:`m18 2 4 4-4 4`}),(0,z.jsx)(`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`}),(0,z.jsx)(`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`}),(0,z.jsx)(`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`})]}),ke=e=>(0,z.jsxs)(`svg`,{...B(e),children:[(0,z.jsx)(`circle`,{cx:`9`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`15`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`9`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`15`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`9`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,z.jsx)(`circle`,{cx:`15`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`})]}),Ae=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z`})}),je=e=>(0,z.jsx)(`svg`,{...B(e),children:(0,z.jsx)(`path`,{d:`M4 5h16l-6 7v5l-4 2v-7L4 5z`})}),Me={"nav.dashboard":`Dashboard`,"nav.startup":`Startup`,"nav.providers":`Providers`,"nav.models":`Models`,"nav.combos":`Combos`,"nav.subagents":`Subagents`,"nav.logs":`Logs & Debug`,"nav.usage":`Usage`,"common.github":`GitHub`,"sidebar.star":`Star on GitHub`,"sidebar.starred":`Starred on GitHub`,"sidebar.starUnauthenticated":`Open GitHub to star (gh CLI is not signed in)`,"sidebar.starFailed":`Could not star through gh. Opening GitHub instead.`,"sidebar.updateAvailable":`Update available: {version}`,"sidebar.checkUpdate":`Check for updates`,"common.save":`Save`,"common.saving":`Saving…`,"common.cancel":`Cancel`,"common.discard":`Discard`,"common.close":`Close`,"common.ok":`OK`,"common.remove":`Remove`,"common.loading":`Loading…`,"common.retry":`Retry`,"app.logoAria":`opencodex logo`,"app.claudeOn":`Claude ON`,"app.claudeOff":`Claude OFF`,"theme.label":`Theme`,"theme.light":`Light`,"theme.dark":`Dark`,"theme.system":`System`,"lang.label":`Language`,"provider.name.volcengine":`Volcengine Ark`,"provider.name.volcengineCodingPlan":`Volcengine Ark Coding Plan`,"provider.name.volcengineAgentPlan":`Volcengine Ark Agent Plan`,"errorBoundary.title":`Page failed to load`,"errorBoundary.message":`This section hit a rendering error. Reload it to try again.`,"errorBoundary.details":`Error`,"errorBoundary.reload":`Reload`,"startup.title":`Startup safety`,"startup.subtitle":`Verify that Codex can reach opencodex after a restart, before local proxy routing becomes a reconnect loop.`,"startup.refresh":`Refresh`,"startup.backToDashboard":`Back to Dashboard`,"startup.loading":`Checking startup protection…`,"startup.error":`Could not read startup protection.`,"startup.staleData":`The latest startup check failed. The values below are stale and must not be treated as proof of protection.`,"startup.status.native":`Native routing`,"startup.status.protected":`Restart protected`,"startup.status.atRisk":`Action required`,"startup.summary.native":`Codex does not depend on the local proxy`,"startup.summary.protected":`opencodex will be available after restart`,"startup.summary.atRisk":`Codex can lose model access after restart`,"startup.riskDetail":`Codex is pinned to the local proxy, but no persistent service or healthy launcher shim will start it again.`,"startup.riskDetailCustomLocal":`Codex points to a custom local gateway. opencodex cannot manage or verify that gateway's restart lifecycle.`,"startup.riskDetailWindowsShim":`The launcher shim protects supported CLI scripts, but Codex Desktop and direct codex.exe launches can bypass it on Windows.`,"startup.safeDetail":`The current routing and startup mechanism are consistent. No manual ocx start should be required after restart.`,"startup.routing":`Codex routing`,"startup.routing.proxy":`Local proxy`,"startup.routing.native":`Native OpenAI`,"startup.routing.customLocal":`Custom local gateway`,"startup.routing.customRemote":`Custom remote gateway`,"startup.routing.unknown":`Unknown or invalid routing`,"startup.restartProtection":`Restart protection`,"startup.preference":`On-demand startup`,"startup.enabled":`Enabled`,"startup.disabled":`Disabled`,"startup.protection.service":`Background service`,"startup.protection.shim":`Launcher shim`,"startup.protection.none":`Not installed`,"startup.details":`Protection details`,"startup.service":`Background service`,"startup.serviceHint":`Starts at login and restarts the proxy after a crash.`,"startup.installed":`Installed`,"startup.notInstalled":`Not installed`,"startup.unsupported":`Unsupported`,"startup.shim":`Codex launcher shim`,"startup.shimHint":`Runs ocx ensure when a supported Codex script launcher starts.`,"startup.healthy":`Healthy`,"startup.cliOnly":`CLI only`,"startup.stale":`Stale`,"startup.viable":`Ready`,"startup.unhealthy":`Installed but unhealthy`,"startup.conflict":`Service conflict`,"startup.installedDisabled":`Installed but disabled`,"startup.install":`Install`,"startup.installing":`Installing…`,"startup.repair":`Repair`,"startup.repairing":`Repairing…`,"startup.serviceInstalled":`Background service installed successfully.`,"startup.serviceRepaired":`Background service repaired successfully.`,"startup.shimInstalled":`Codex launcher shim installed successfully.`,"startup.shimRepaired":`Codex launcher shim repaired successfully.`,"startup.installFailed":`Installation failed:`,"startup.tray.title":`Windows system tray`,"startup.tray.hint":`Install a login tray icon for one-click proxy start, stop, restart, dashboard, and status controls.`,"startup.tray.login":`Start tray at Windows login`,"startup.tray.notProtection":`The tray is a controller, not restart protection. A viable background service is still required for unattended proxy recovery.`,"startup.tray.running":`Running`,"startup.tray.stopped":`Installed, hidden`,"startup.tray.stale":`Repair required`,"startup.tray.notInstalled":`Not installed`,"startup.tray.loading":`Checking…`,"startup.tray.unavailable":`Status unavailable`,"startup.tray.install":`Install and show tray`,"startup.tray.start":`Show tray icon`,"startup.tray.stop":`Exit tray icon`,"startup.tray.uninstall":`Remove login tray`,"startup.tray.error":`The Windows tray action failed. Check ocx tray status for details.`,"startup.recovery":`Repair options`,"startup.recoveryHint":`Use the one-click installers above, or copy a command for manual repair. The background service is recommended for Codex Desktop and Windows executables.`,"startup.command.service":`Recommended: persistent background service`,"startup.command.shim":`Alternative: CLI launcher shim`,"startup.command.native":`Fail-safe: restore native Codex routing`,"startup.copy":`Copy`,"startup.copied":`Copied`,"startup.recommended":`Recommended repair: {cmd}`,"startup.navRisk":`Startup protection requires attention`,"startup.codexRuntime.clampHidden":`Some reasoning effort options were hidden because OpenCodex used Codex {version}.`,"startup.codexRuntime.clampHiddenWithEfforts":`Some reasoning effort options were hidden because OpenCodex used Codex {version} (removed: {efforts}).`,"startup.codexRuntime.olderBinary":`OpenCodex is using an older Codex binary ({version}). A newer installation is available.`,"dash.subtitle":`Live status of the local opencodex proxy, its providers, and the models routed into Codex.`,"dash.workspace.overview":`Overview`,"dash.workspace.sections":`Sections`,"dash.status":`Status`,"dash.online":`Online`,"dash.offline":`Offline`,"dash.version":`Version`,"dash.versionLocal":`Local version`,"dash.versionRemote":`npm latest`,"dash.installSource":`source checkout`,"dash.installNpm":`npm global`,"dash.installBun":`bun global`,"dash.installUnknown":`unknown install`,"dash.uptime":`Uptime`,"dash.providers":`Providers`,"dash.tokens30d":`Tokens (30d)`,"dash.coverage":`{pct} coverage`,"dash.mem.title":`Memory observability`,"dash.mem.hint":`Read-only runtime diagnostics. Observed memory is max(RSS, external, ArrayBuffers) so Windows working-set trimming does not hide committed retention.`,"dash.mem.rss":`Resident set (RSS)`,"dash.mem.jsHeap":`JS heap in use`,"dash.mem.jsHeapArena":`arena {total}`,"dash.mem.pressure":`Against warn threshold`,"dash.mem.pressureOf":`{pct}% of threshold`,"dash.mem.pressureUnknown":`No threshold reported`,"dash.mem.jscHeap":`JSC heap`,"dash.mem.external":`External`,"dash.mem.arrayBuffers":`ArrayBuffers`,"dash.mem.observed":`Observed`,"dash.mem.runtime":`Runtime counters`,"dash.mem.growth":`Observed drift / hour`,"dash.mem.perHour":`/h`,"dash.mem.store":`Continuation store`,"dash.mem.storeHint":`Proxy previous_response_id cache. Rising total bytes under a rising heap points at conversation retention rather than the runtime allocator.`,"dash.mem.storeEntries":`Entries`,"dash.mem.storeTotal":`Total`,"dash.mem.storeLargest":`Largest`,"dash.mem.storeOldest":`Oldest`,"dash.mem.threshold":`Warn threshold`,"dash.mem.lastWarn":`Last warning`,"dash.mem.never":`Never`,"dash.mem.details":`Details`,"dash.mem.unavailable":`Memory diagnostics unavailable (older proxy).`,"dash.mem.inFlight":`In-flight requests`,"dash.mem.restart":`Drain & restart`,"dash.mem.restartConfirm":`Wait for {count} in-flight request(s), then restart (up to {seconds}s; remaining requests are cut on timeout).`,"dash.mem.draining":`Draining {count} request(s)… restarting when complete`,"dash.mem.reconnecting":`Proxy restarting… waiting to reconnect`,"dash.mem.restartFailed":`Drain & restart failed. Check that the proxy is running.`,"dash.mem.restartNoSupervisor":`No restart protection detected. The proxy may stay down after restart unless you start it again.`,"dash.activeProviders":`Active providers`,"dash.noProviders":`No providers configured. Run {cmd}.`,"dash.col.name":`Name`,"dash.col.adapter":`Adapter`,"dash.col.baseUrl":`Base URL`,"dash.col.model":`Model`,"dash.modelsNoResults":`No models match your search.`,"dash.availableModels":`Available models`,"dash.noModels":`No models found. Check provider API keys.`,"dash.cannotConnect":`Cannot connect to proxy. Is it running?`,"dash.runStart":`Run {cmd} to start the proxy.`,"dash.stop":`Stop Proxy`,"dash.stopConfirm":`Stop the proxy and restore native Codex?`,"dash.stopFailed":`Failed to stop proxy (HTTP {status}).`,"dash.stopping":`Stopping…`,"dash.codexAutoStart":`Start opencodex with Codex`,"dash.codexAutoStartHint":`Allows an installed launcher shim to run ocx ensure. This setting does not install restart protection; check Startup safety for the effective state.`,"dash.searchModel":`Search sidecar model`,"dash.searchModelHint":`Model used for web_search on non-OpenAI routed models. Requires ChatGPT login.`,"dash.searchReasoning":`Search reasoning effort`,"dash.visionModel":`Vision sidecar model`,"dash.visionModelHint":`Model used to describe images for text-only routed models. Requires ChatGPT login.`,"dash.webSearchSidecar":`Web search sidecar`,"dash.webSearchSidecarHint":`Choose the backend and model used for web search on routed models.`,"dash.visionSidecar":`Vision sidecar`,"dash.visionSidecarHint":`Choose the backend and model used to describe images for text-only routed models.`,"dash.shadowCallIntercept":`Shadow Call Intercept`,"dash.shadowCallInterceptHint":`Intercepts Codex App's background helper calls ({models}) for title generation and commit messages and redirects them to your chosen model. Effort is fixed to low.`,"dash.shadowCallWarning":`⚠ When enabled, ALL requests for {models} will be replaced with the selected model.`,"dash.shadowCallOriginal":`Original`,"dash.shadowCallModel":`Replacement model`,"dash.shadowCallTooltip":`Codex App makes background helper calls for thread title generation, commit message generation, and skill orchestration. The helper model changed across client versions, so opencodex intercepts every model in this set: {models}. Enable this to redirect those calls to your chosen model.`,"models.shadowCallIntercept":`Shadow Call Intercept`,"models.shadowCallInterceptHint":`Intercepts Codex App's background helper calls ({models}) for titles and commit messages and redirects them to your chosen model.`,"dash.sidecarBackend":`Backend`,"dash.sidecarModel":`Model`,"dash.backendAuto":`Auto`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`Sidecar settings saved. Applied on the next request.`,"dash.sidecarSaveFailed":`Failed to save sidecar settings.`,"dash.injectionLabel":`Sub-agent delegation`,"dash.injectionHint":`Pick the model Codex should hand sub-agent work to. The two switches below decide where that pick is used.`,"dash.injectionManage":`Open settings`,"dash.syncCodexSubagentDefaults":`Also save as a Codex default`,"dash.syncCodexSubagentDefaultsHint":`On, the pick above is written into Codex's own config, so new tasks start with that model too. Off, it is remembered only here. It takes effect on the next sync or restart, and your hand-written [agents] settings are left alone.`,"dash.multiAgentGuidance":`Tell Codex how to split work`,"dash.multiAgentGuidanceHint":`Sends a short note telling Codex how to hand work to sub-agents. On v2 it names the models it may use and which to prefer; on v1 it only applies at max or ultra reasoning effort. Off, no note is added.`,"dash.injectionNone":`None`,"dash.injectionEffortLabel":`Reasoning effort`,"dash.injectionEffortNone":`Model default`,"dash.effortCapLabel":`V2 ultra effort limit`,"dash.subagentEffortCapLabel":`V2 sub-agent effort limit`,"dash.effortCapHelp":`Limits the reasoning effort for V2 ultra-mode turns. When set, incoming max-effort requests (from ultra mode) are capped to the selected level. The sub-agent limit applies only to spawned child agents. Caps only lower effort, never raise it. If a model doesn't support the capped level, it snaps down to the nearest supported level.`,"dash.effortCapNone":`No cap`,"dash.maintenance":`Maintenance`,"dash.maintenanceHint":`Refresh Codex's model catalog or install a newer opencodex release.`,"dash.syncModels":`Sync models`,"dash.syncModelsHint":`Rewrite Codex's model catalog from the providers you have connected.`,"dash.syncRun":`Sync now`,"dash.syncing":`Syncing…`,"dash.syncOk":`Sync complete. {count} model(s) appended.`,"dash.syncStaleHint":`If Codex still shows an older list, restart its long-lived app-server ({cmd}).`,"dash.syncFailed":`Sync failed: {error}`,"dash.projectConfigTitle":`Project Codex config bypasses OpenCodex`,"dash.projectConfigHint":`These repo-local settings override the OpenCodex proxy (e.g. route to OpenCode Go directly). Remove them so ~/.codex/config.toml routing applies in that project.`,"dash.checkUpdate":`Check update`,"dash.updateTitle":`Update opencodex`,"dash.updateDesc":`Check npm for the selected channel, then choose whether to restart the proxy after installation.`,"dash.updateChannel":`Channel`,"dash.updateChecking":`Checking for updates…`,"dash.updateInstalled":`Installed`,"dash.updateLatest":`Latest`,"dash.updateAvailable":`Update available`,"dash.updateCurrent":`Up to date`,"dash.updateCommand":`Command`,"dash.updateSource":`This is a source checkout. Update it from the terminal with the shown command.`,"dash.updateUnavailable":`Could not read the latest version from npm. Try again later.`,"dash.updateRetry":`Retry`,"dash.updateRecheck":`Re-check`,"dash.updateCannotAuto":`One-click update is unavailable ({reason}).`,"dash.updateReason.source_checkout":`source checkout`,"dash.updateReason.latest_unavailable":`npm registry unreachable`,"dash.updateReason.already_latest":`already on latest`,"dash.updateReason.unknown":`update unavailable`,"dash.updateRestart":`Restart after update`,"dash.updateRestartHint":`Recommended. The current GUI keeps running the old code until the proxy restarts.`,"dash.runUpdate":`Update`,"dash.updateReconnecting":`Waiting for the restarted proxy…`,"dash.updateStatus.running":`Updating opencodex.`,"dash.updateStatus.restarting":`Update installed. Restarting proxy.`,"dash.updateStatus.succeeded":`Update finished.`,"dash.updateStatus.failed":`Update failed.`,"prov.subtitle":`Configure the upstream providers opencodex routes into Codex. Log in with an account, add a provider, or edit the raw config.`,"prov.add":`Add Provider`,"prov.editJson":`Edit JSON`,"prov.accountLogin":`Account login`,"prov.noOauth":`No OAuth providers available.`,"prov.loggedIn":`logged in`,"prov.notLoggedIn":`not logged in`,"prov.logout":`Logout`,"prov.login":`Login`,"prov.loginWith":`Login with {provider}`,"prov.waitingBrowser":`Waiting for browser…`,"prov.didntOpen":`Didn't open? Click here`,"prov.copyLink":`Copy link`,"prov.linkCopied":`Copied`,"prov.linkCopyUnavailable":`Clipboard unavailable`,"prov.deviceCode":`Device code`,"prov.copyCode":`Copy code`,"prov.codeCopied":`Code copied`,"prov.editAlias":`Edit alias`,"prov.aliasPrompt":`Display name (leave empty to clear)`,"prov.aliasSaved":`Alias saved`,"prov.aliasSaveFailed":`Could not save alias`,"prov.accountId":`ID`,"prov.pasteRedirect":`Paste redirect URL or code`,"prov.pasteRedirectHint":`If the browser shows a localhost error, copy the full URL from its address bar and paste it here (or paste the authorization code).`,"prov.pasteSubmit":`Submit`,"prov.pasteSubmitting":`Submitting…`,"prov.pasteOk":`Code submitted — finishing login…`,"prov.pasteFail":`Could not submit code: {error}`,"prov.port":`Port`,"prov.default":`Default`,"prov.loadingConfig":`Loading…`,"prov.saved":`Saved! Restart proxy to apply.`,"prov.loadConfigFail":`Failed to load config`,"prov.invalidJson":`Invalid JSON`,"prov.saveFailed":`Save failed`,"prov.loginFailStart":`{provider} login failed to start`,"prov.loginError":`{provider} login error: {error}`,"prov.loginRequestFail":`{provider} login request failed`,"prov.loginCancelled":`{provider} login cancelled`,"prov.loginTimeout":`{provider} login timed out — browser closed or never finished. Try again.`,"prov.loginOk":`Logged in to {provider}. Run {cmd} (or it applies live) to list its models.`,"oauthTos.highTitle":`{provider}: subscription OAuth risk`,"oauthTos.elevatedTitle":`{provider}: unofficial OAuth bridge`,"oauthTos.anthropicBody":`Directly reusing Claude subscription OAuth tokens through a third-party proxy such as OpenCodex is not a supported Anthropic integration and may lead to access restrictions. Supported Agent SDK integrations that use Claude subscriptions are separate.`,"oauthTos.highBody":`OpenCodex connects {provider} through a third-party OAuth path. Unsupported use may lead to access limits or suspension.`,"oauthTos.elevatedBody":`OpenCodex connects {provider} through an unofficial OAuth path. Use the official client when possible; unusual or automated traffic may be treated as abuse and access may be limited or suspended.`,"oauthTos.saferPath":`Safer option: configure an API key in OpenCodex instead.`,"oauthTos.acknowledge":`I understand the risk and want to continue with OAuth anyway.`,"oauthTos.continue":`Continue with OAuth`,"prov.logoutOk":`Logged out of {provider}.`,"prov.logoutFail":`Could not log out of {provider}. Your account state is unchanged.`,"prov.removed":`Removed "{name}".`,"prov.removedDefault":`Removed "{name}". Default provider is now "{defaultProvider}".`,"prov.removeFail":`Failed to remove "{name}".`,"prov.removeLastProvider":`You can't remove this provider when no other enabled provider can become the default.`,"prov.removeHasDependentCombos":`Remove or update these dependent combos first: {combos}.`,"prov.setDefault":`Set as default`,"prov.setDefaultSuccess":`"{name}" is now the default provider.`,"prov.setDefaultFail":`Couldn't set "{name}" as the default provider.`,"prov.defaultDisabled":`Enable this provider before making it the default.`,"prov.updateFail":`Couldn't update this provider.`,"prov.networkError":`Network error. Check that the proxy is running and try again.`,"prov.added":`Added "{name}". Live now — run {cmd} (or restart) to list its models in Codex's picker.`,"prov.removeConfirm":`Remove provider "{name}"? Its models disappear from Codex's picker.`,"prov.hasApiKey":`api key configured`,"prov.hasHeaders":`custom headers configured`,"prov.accounts":`Accounts ({n})`,"prov.accountsAria":`Toggle {name} accounts`,"prov.accountActive":`Active`,"prov.accountReauth":`Re-login`,"prov.reauthenticate":`Re-authenticate`,"prov.reauthAccountMissing":`Selected account was not found after login`,"prov.reauthIdentityMismatch":`Signed-in account did not match the selected account`,"prov.accountAdd":`Add account`,"prov.accountNoLabel":`account {id}`,"prov.accountSwitchTitle":`Use this account`,"prov.accountSwitched":`Switched to {email}.`,"prov.accountSwitchFail":`Failed to switch account`,"prov.accountRemoved":`Removed {email}.`,"prov.accountRemoveFail":`Could not remove {email}. The account is unchanged.`,"prov.accountRemoveAria":`Remove {email}`,"prov.accountRemoveConfirm":`Remove account {email}? Its login is deleted from this proxy.`,"prov.keyAdd":`Add API key`,"prov.keyAdded":`Added API key to {name}.`,"prov.keyAddFail":`Failed to add API key`,"prov.keyPlaceholder":`Paste API key`,"prov.keySwitchTitle":`Use this key`,"prov.keySwitched":`Switched to key {key}.`,"prov.keySwitchFail":`Failed to switch key`,"prov.keyRemoved":`Removed key {key}.`,"prov.keyRemoveAria":`Remove key {key}`,"prov.keyRemoveConfirm":`Remove API key {key}? It is deleted from this proxy's config.`,"prov.activeBadge":`Active`,"prov.disabledBadge":`Disabled`,"prov.defaultBadge":`Default`,"prov.enable":`Enable`,"prov.disable":`Disable`,"prov.enabled":`Enabled "{name}". Its models can appear in Codex again.`,"prov.disabled":`Disabled "{name}". Settings are kept, but its models are hidden.`,"prov.enableFail":`Failed to enable "{name}".`,"prov.disableFail":`Failed to disable "{name}".`,"prov.enableAria":`Enable provider {name}`,"prov.disableAria":`Disable provider {name}`,"prov.defaultCannotDisable":`Default provider can't be disabled`,"prov.openaiAccountMode":`Codex account mode`,"prov.openaiModePool":`Pool`,"prov.openaiModeDirect":`Direct`,"prov.openaiPoolDesc":`Default. Rotate the main login and added accounts using affinity, quota, cooldown, and failover.`,"prov.openaiDirectDesc":`Use only the current/main Codex login. Stored pool accounts are not read or rotated.`,"prov.openaiModeSaved":`OpenAI account mode changed to {mode}.`,"prov.openaiModeSaveFailed":`Could not change the OpenAI account mode.`,"prov.openaiApiDesc":`Uses an OpenAI API key and never uses Codex account credentials.`,"prov.manageCodexAccounts":`Manage Codex accounts`,"prov.openaiApiMissing":`API key required`,"prov.openaiApiSetup":`Set up API key`,"models.subtitle":`Toggle which models Codex sees — native GPT passthrough and routed providers, grouped by provider (click a header to collapse). Hidden models stay off the catalog + model picker but remain directly callable by exact id. Changes apply on the next Codex turn — opencodex invalidates Codex's 5-min model cache so no restart is needed.`,"models.nativeGroupLabel":`OpenAI native`,"models.nativeHint":`Passthrough models use the Pool or Direct account option selected on Providers. Toggling one off hides it from the Codex picker (the catalog entry is kept, so re-enabling restores it exactly).`,"models.active":`{active}/{total} visible`,"models.workspace.providers":`Providers`,"models.workspace.allProviders":`All providers`,"models.workspace.mainAria":`Model details`,"models.combosEmpty":`No combos configured yet`,"models.combosSetup":`Set up`,"models.combosAdd":`Add combo`,"models.combosActive":`{count} active`,"models.allOn":`All on`,"models.allOff":`All off`,"models.cap350k":`Cap 350k`,"models.capApplied":`Context cap applied — takes effect on the next Codex turn.`,"models.capSaveFailed":`Failed to save context cap`,"models.contextCapped":`350k cap`,"models.contextCapLabel":`Context cap`,"models.v2Label":`Sub-agent`,"models.shadowCallOriginal":`⚠ {models} →`,"models.v2DocsLink":`What is v1 / v2?`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`All models → v1 surface`,"models.v2ModeDesc_default":`Upstream defaults (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`All models → v2 surface`,"models.v2Help":`Controls the multi-agent surface for all models.
10
-
11
- v1: Classic single-thread agent. Every model uses the v1 collab surface.
12
- base: Upstream defaults — sol/terra use v2, luna uses v1, others follow the codex feature flag.
13
- v2: Multi-thread agent with spawn_agent. Every model uses the v2 collab surface.
14
-
15
- Changes apply to new sessions.`,"dash.multiAgent":`Sub-agent`,"models.v2Conflict":`[agents] max_threads is set — codex will refuse to start; remove it from config.toml`,"models.v2Applied":`Sub-agent mode updated — applies to new sessions (restart the Codex app to refresh the picker)`,"models.v2ThreadsLabel":`Max threads`,"models.v2ThreadsDefault":`default (4)`,"models.v2ThreadsApplied":`Thread limit updated — applies to new sessions`,"models.v2ThreadsInvalid":`Thread limit must be an integer >= 1`,"models.v2ThreadsApply":`Apply`,"models.capValue":`Cap {value}`,"models.contextCappedValue":`{value} cap`,"models.setAll":`Set all`,"models.setAllHint":`Apply the {value} context cap to every routed provider. Native providers are unaffected.`,"models.collapseAll":`Collapse all`,"models.expandAll":`Expand all`,"models.orderHint":`Picker order: Subagents picks (in the selected order) → remaining routed models alphabetically by provider, then model ID → native models. Visibility switches only filter models; they do not change this order.`,"models.custom":`Custom…`,"models.customApply":`Apply`,"models.customPlaceholder":`Tokens (e.g. 420000)`,"models.customAdd":`Add custom model`,"models.customAddTitle":`Add custom model — {provider}`,"models.customEditTitle":`Edit custom model — {provider}`,"models.customAdded":`Custom model added`,"models.customUpdated":`Custom model updated`,"models.customDeleted":`Custom model deleted`,"models.customSaveFailed":`Failed to save custom model`,"models.customSaving":`Saving…`,"models.customAddBtn":`Add`,"models.customEditBtn":`Update`,"models.customEdit":`Edit`,"models.customDelete":`Delete`,"models.customDeleteConfirm":`Delete the {name} model?`,"models.customBadge":`Custom`,"models.customSummary":`{count} custom`,"models.customFieldModelId":`Model ID (endpoint slug)`,"models.customFieldModelIdPlaceholder":`e.g. qwen4-max-preview`,"models.customFieldDisplayName":`Display name (optional)`,"models.customFieldDisplayNamePlaceholder":`e.g. Qwen 4 Max Preview`,"models.customFieldContext":`Context window`,"models.customFieldModalities":`Input modalities`,"models.tipProvider":`Provider`,"models.tipContext":`Context`,"models.tipModalities":`Modalities`,"models.tipStatus":`Status`,"models.tipActive":`Active`,"models.tipDisabled":`Disabled`,"models.applied":`Applied — takes effect on the next Codex turn.`,"models.saveFailed":`Save failed`,"models.networkError":`Network error — is the proxy running?`,"models.loadFail":`Failed to load models — is the proxy running?`,"models.noRouted":`No routed models`,"models.noRoutedHint":`Log into a provider or add one first.`,"models.emptyDiscovery":`No models were discovered. Check the provider endpoint or add a static/custom model.`,"models.emptyDiscoveryDisabled":`Live model discovery is off and no static models are configured.`,"models.discoveryFailedBadge":`Discovery failed`,"models.discoveryFailedHttp":`Model discovery failed (HTTP {status}).`,"models.discoveryFailedBlocked":`Model discovery was blocked by the destination policy.`,"models.discoveryFailedInvalidResponse":`Model discovery returned an invalid response.`,"models.discoveryFailedNetwork":`Model discovery failed due to a network error.`,"models.discoveryFailedProvider":`The provider reported a model discovery error.`,"models.discoveryFailedGeneric":`Model discovery failed.`,"models.openProviderSettings":`Open provider settings`,"models.loading":`Loading…`,"models.search":`Search models…`,"models.showMore":`Show {n} more`,"models.allowlistLabel":`Only selected`,"models.allowlistHint":`Only checked models ship to the catalog (empty = all). Useful for providers exposing thousands of models.`,"models.selectedCount":`{n} selected`,"sub.subtitle":`Codex's {cmd} advertises only the first 5 models (by priority) as overrides. Pick up to 5 here — native gpt or routed — and opencodex sets their catalog priority so exactly these lead. Any other model is still callable by its exact name; this only controls what's shown.`,"sub.featured":`Featured`,"sub.orderHint":`The order shown here sets positions 1–5 at the top of the Codex model picker and the default model candidates for {cmd}.`,"sub.noneSelected":`None selected — pick from the list below.`,"sub.models":`Models`,"sub.search":`Search models (native gpt + routed)…`,"sub.settings":`Settings`,"sub.sections":`Subagent sections`,"sub.delegation.model":`Model to call first`,"sub.delegation.modelHint":`The model Codex reaches for first when it hands off work. Featured above is the list it may call; this is the one it calls first.`,"sub.noModels":`No models — log into a provider or add one first.`,"sub.saved":`Saved {n} models. Start a new Codex session (or run {cmd}) to see them as spawn_agent overrides.`,"sub.saveFailed":`Save failed`,"sub.networkError":`Network error — is the proxy running?`,"sub.loadFail":`Failed to load models — is the proxy running?`,"sub.loading":`Loading…`,"sub.moveUp":`Move {m} up`,"sub.moveDown":`Move {m} down`,"sub.removeAria":`Remove {m}`,"sub.workspace.addToFeatured":`Add {m} to featured`,"sub.workspace.allModels":`All models`,"sub.workspace.featuredFull":`Featured list is full (max 5)`,"sub.workspace.mainAria":`Subagent model details`,"sub.workspace.notFeatured":`Not featured`,"sub.workspace.priority":`Priority`,"sub.workspace.removeFromFeatured":`Remove {m} from featured`,"sub.workspace.selectModel":`Select a model`,"sub.workspace.selectModelDesc":`Pick a model from the list to see details and feature it for spawn_agent.`,"sub.workspace.selector":`Public selector`,"logs.title":`Request Logs`,"logs.tabLogs":`Logs`,"logs.tabDebug":`Debug`,"logs.subtitle":`Recent requests routed through the local opencodex proxy, newest first.`,"logs.autoRefresh":`Auto-refresh`,"logs.noRequests":`No requests yet.`,"logs.loadError":`Could not load request logs.`,"logs.filter.surface.label":`Surface`,"logs.filter.surface.all":`All`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.filter.surface.grok":`Grok`,"logs.filter.conversation.label":`Conversation`,"logs.filter.conversation.placeholder":`Paste conversation id`,"logs.filter.conversation.clear":`Clear`,"logs.filter.conversation.apply":`Filter logs`,"logs.conversation.totals":`{requests} requests · {tokens} tokens · {cost}`,"logs.conversation.scope":`Totals cover the currently loaded Logs ring only.`,"logs.conversation.excluded":`({unpriced} unpriced, {unmetered} unmetered excluded from ~$)`,"logs.detail.conversation":`Conversation`,"logs.badge.claude":`Claude`,"logs.badge.grok":`Grok`,"logs.col.time":`Time`,"logs.col.request":`Request`,"logs.col.model":`Model`,"logs.col.effort":`Effort`,"logs.col.provider":`Provider`,"logs.col.status":`Status`,"logs.col.tokens":`Tokens`,"logs.col.tokPerSec":`tok/s`,"logs.col.estimatedCost":`~$`,"logs.metric.tokPerSecTitle":`Output tokens per second over the full request duration`,"logs.metric.estimatedCostTitle":`API list-price equivalent, not an actual charge; unmatched pricing is unavailable`,"usage.cost.total":`API list-price equivalent (this range)`,"usage.cost.disclaimer":`Not a billing receipt. Subscription usage or provider credits may apply instead.`,"usage.cost.unpricedNote":`{count} requests excluded (no price or usage)`,"logs.detail.section.basic":`Basic information`,"logs.detail.section.performance":`Performance`,"logs.detail.section.cost":`API list-price equivalent`,"logs.detail.section.attempts":`Combo attempts`,"logs.detail.section.usage":`Raw usage`,"logs.detail.ttft":`TTFT`,"logs.detail.costTotal":`List-price equivalent`,"logs.detail.totalTokens":`Total tokens`,"logs.detail.matchedKey":`Matched jawcode key`,"logs.detail.priceSource":`Price source`,"logs.detail.unavailableReason":`Unavailable reason`,"logs.detail.copyRequestId":`Copy request ID`,"logs.detail.copied":`Copied`,"logs.detail.source.jawcode":`jawcode catalog`,"logs.detail.source.expected":`Expected price overlay`,"logs.detail.verification.verified":`Verified`,"logs.detail.verification.derived":`Derived from base model`,"logs.detail.attempt.target":`Provider / model`,"logs.detail.attempt.reason":`Result / reason`,"logs.detail.attempt.completed":`Completed`,"logs.detail.attempt.e2eNote":`Top-level tok/s is end-to-end; each attempt uses its own duration.`,"logs.detail.reason.usage_missing":`Usage was not reported.`,"logs.detail.reason.usage_unsupported":`This provider does not report usage.`,"logs.detail.reason.output_missing":`No positive output token count was reported.`,"logs.detail.reason.invalid_duration":`The request duration is not valid.`,"logs.detail.reason.price_unmatched":`No matching jawcode price was found.`,"logs.detail.reason.invalid_cache_breakdown":`Cache token details conflict with total input tokens.`,"logs.detail.reason.invalid_usage":`Usage contains an invalid token value.`,"logs.detail.reason.combo_attempt_unavailable":`At least one combo attempt could not be priced.`,"logs.detail.estimate.usage_estimated":`Provider usage is estimated.`,"logs.detail.estimate.cache_detail_missing":`Cache details were unavailable; input is an upper-bound estimate.`,"logs.detail.estimate.expected_price_overlay":`A verified expected list price was used.`,"logs.col.error":`Error`,"logs.col.upstreamReason":`Upstream reason`,"logs.col.duration":`Duration`,"logs.tokens.reported":`reported`,"logs.tokens.unreported":`unreported`,"logs.tokens.unsupported":`unsupported`,"logs.tokens.estimated":`estimated`,"logs.tokens.input":`input`,"logs.tokens.output":`output`,"logs.tokens.cacheRead":`cache read (c)`,"logs.tokens.cacheWrite":`cache write (w)`,"logs.tokens.reasoning":`reasoning`,"logs.tokens.noCache":`no cache data`,"logs.tokens.contextTotal":`active context`,"logs.tokens.noCacheNote":`this provider does not report cache tokens`,"logs.tokens.noCacheCursor":`Cursor cache detail unreported`,"logs.tokens.noCacheCursorNote":`Cursor does not expose cache read/write token counts; this is unknown, not a confirmed cache miss`,"logs.tokens.estimatedNote":`estimated (provider reports no exact usage)`,"logs.details":`Details`,"logs.detailTitle":`Request details`,"logs.detailRaw":`Raw log entry`,"debug.title":`Debug`,"debug.subtitle":`Opt-in provider transport and usage-extraction diagnostics. Request errors and 502s stay on the Logs tab.`,"debug.debug":`Provider debug`,"debug.usage":`Usage extraction`,"debug.injection":`Injection log`,"debug.claude":`Claude inbound`,"debug.claudeInbound.title":`Claude inbound requests`,"debug.claudeInbound.sub":`What Claude Code/Desktop actually sends (thinking, effort, metadata) — no prompt text is stored.`,"debug.claudeInbound.empty":`No requests captured yet. Send a message from Claude while this is on.`,"debug.claudeInbound.time":`Time`,"debug.claudeInbound.endpoint":`Endpoint`,"debug.claudeInbound.model":`Model`,"debug.claudeInbound.none":`none`,"debug.reset":`Clear runtime overrides`,"debug.refresh":`Refresh`,"debug.follow":`Follow`,"debug.streamProvider":`Provider`,"debug.streamUsage":`Usage`,"debug.streamInjection":`Injection`,"debug.loading":`Loading debug settings…`,"debug.loadFailed":`Could not load debug settings.`,"debug.emptyTitle":`Debug logging is off`,"debug.empty":`Turn on Provider debug or Usage extraction in the card above. Lines appear here after you send a request through the proxy.`,"debug.noLinesTitle":`Waiting for lines`,"debug.noLines.provider":`Provider debug is on, but it only records transport anomalies (dropped or malformed frames, and Cursor dial/retry events). A clean request through a provider like Anthropic can produce no lines.`,"debug.noLines.usage":`Usage extraction is on but nothing has been captured yet. Send a chat/request through Codex and it appears here.`,"debug.noLines.injection":`Injection log is on but nothing has been captured yet. It records multi-agent guidance injection and effort-cap decisions on collab and sub-agent turns.`,"usage.title":`Usage`,"usage.subtitle":`Local token accounting from your proxy. Missing usage is never shown as zero.`,"usage.loading":`Loading usage data…`,"usage.empty":`No usage recorded yet. Send a request through the proxy to see activity here.`,"usage.loadError":`Could not load usage data.`,"usage.range.all":`All`,"usage.range.available":`Available history`,"usage.historyTruncated":`Totals cover available history only because older usage was not loaded.`,"usage.range.30d":`30d`,"usage.range.7d":`7d`,"usage.card.requests":`Requests`,"usage.card.measured":`Measured`,"usage.card.reported":`Reported`,"usage.card.totalTokens":`Total tokens`,"usage.card.cachedTokens":`Cache reads`,"usage.card.cachedTokensHint":`Prompt tokens served from the provider cache (reads). Cache writes are shown below when present.`,"usage.card.cacheWriteTokens":`cache writes`,"usage.card.coverage":`Coverage`,"usage.card.activeDays":`Active days`,"usage.section.heatmap":`Daily activity`,"usage.section.overview":`Overview`,"usage.section.models":`Models`,"usage.section.providers":`Providers`,"usage.section.coverage":`Coverage breakdown`,"usage.workspace.report":`Usage report`,"usage.workspace.sections":`Usage sections`,"usage.coverage.measured":`Measured`,"usage.coverage.reported":`Provider reported`,"usage.coverage.estimated":`Estimated`,"usage.coverage.note":`Measured entries include provider-reported and estimated token counts. Unreported and unsupported requests are tracked but never inflated to zero tokens.`,"usage.search.models":`Search models…`,"usage.col.requests":`Requests`,"usage.col.measured":`Measured`,"usage.col.reported":`Reported`,"usage.col.tokens":`Tokens`,"usage.col.share":`Share`,"usage.heatmap.less":`Less`,"usage.heatmap.more":`More`,"usage.dayMon":`Mon`,"usage.dayWed":`Wed`,"usage.dayFri":`Fri`,"usage.heatmap.tooltipTokens":`{tokens} tokens`,"usage.heatmap.tooltipRequests":`{requests} requests`,"nav.storage":`Storage`,"storage.title":`Storage`,"storage.subtitle":`See what’s using CODEX_HOME. Cleanup never touches active sessions.`,"storage.loading":`Scanning storage…`,"storage.empty":`CODEX_HOME is empty or missing — nothing to report.`,"storage.error":`Storage scan failed. Check that CODEX_HOME points at a valid directory.`,"storage.refresh":`Rescan`,"storage.rescanned":`Scan complete.`,"storage.card.total":`Total size`,"storage.card.files":`Files`,"storage.card.home":`CODEX_HOME`,"storage.snapshot.lastScan":`Last scan`,"storage.snapshot.scanning":`Scanning…`,"storage.snapshot.unavailable":`No scan yet.`,"storage.cleanupCard.title":`Free up space`,"storage.cleanupCard.tabs":`Cleanup options`,"storage.cleanupCard.tab.policy":`Policy`,"storage.cleanupCard.tab.quarantine":`Quarantine`,"storage.cleanup.noArchives":`No archived sessions to clean up.`,"storage.section.buckets":`Buckets`,"storage.section.largest":`Largest files`,"storage.workspace.overview":`Overview`,"storage.workspace.selectBucket":`Select a bucket from the list to see its breakdown.`,"storage.col.bucket":`Bucket`,"storage.col.size":`Size`,"storage.col.files":`Files`,"storage.col.oldest":`Oldest`,"storage.col.newest":`Newest`,"storage.col.rows":`DB rows`,"storage.rows.unknown":`unknown (locked)`,"storage.bucket.sessions":`Active sessions`,"storage.bucket.archived_sessions":`Archived sessions`,"storage.bucket.logs_db":`Logs database`,"storage.bucket.state_db":`State database`,"storage.bucket.attachments":`Attachments`,"storage.bucket.deletion_manifests":`Deletion manifests`,"storage.bucket.other":`Other`,"storage.cleanup.title":`Archived cleanup`,"storage.cleanup.help":`Remove the oldest archived sessions by percentage. Active sessions are never touched. Quarantine is the default — files move to CODEX_HOME/.trash.`,"storage.cleanup.slider":`Oldest archived percent`,"storage.cleanup.percent":`{percent}%`,"storage.cleanup.preset":`{percent}`,"storage.cleanup.preview":`Preview`,"storage.cleanup.confirmTitle":`Confirm archived cleanup`,"storage.cleanup.confirmBody":`This will process {count} archived file(s) (~{size}), the oldest {percent}%.`,"storage.cleanup.moreFiles":`…and {n} more`,"storage.cleanup.permanent":`Delete permanently (skip quarantine)`,"storage.cleanup.permanentWarn":`Permanent delete cannot be undone.`,"storage.cleanup.quarantineNote":`Files move to .trash under CODEX_HOME. You can restore them from the Quarantine tab.`,"storage.cleanup.cancel":`Cancel`,"storage.cleanup.confirmQuarantine":`Quarantine`,"storage.cleanup.confirmPermanent":`Delete permanently`,"storage.cleanup.doneQuarantine":`Quarantined {count} file(s) ({size}).`,"storage.cleanup.donePermanent":`Permanently deleted {count} file(s) ({size}).`,"storage.cleanup.previewFailed":`Preview failed.`,"storage.cleanup.cleanupFailed":`Cleanup failed.`,"storage.cleanup.err.codex_busy":`Codex is using state.sqlite — try again after quitting Codex.`,"storage.cleanup.err.stale_preview":`Archived files changed since preview — run Preview again.`,"storage.cleanup.err.restore_pending_overlap":`Selected archives overlap an incomplete trash restore — finish or retry restore first.`,"storage.cleanup.err.referenced_history":`Selected archives are still referenced by forked or paginated history.`,"storage.cleanup.err.invalid_digest":`Preview digest is missing or invalid.`,"storage.cleanup.err.invalid_mode":`Cleanup mode must be quarantine or permanent.`,"storage.cleanup.err.fs_failed":`Filesystem cleanup failed. Some changes may already be applied — check CODEX_HOME/.trash and any recovery path shown.`,"storage.cleanup.err.fs_failed_trash":`Filesystem cleanup failed. Some changes may already be applied — check {trashDir} and manifest.json for recoverable files.`,"storage.cleanup.err.db_reconcile_failed":`Could not update Codex state database.`,"storage.cleanup.err.cleanup_failed":`Cleanup failed.`,"storage.trash.title":`Quarantine`,"storage.trash.help":`Archived sessions moved to CODEX_HOME/.trash. Restore puts JSONL files and thread rows back.`,"storage.trash.empty":`No quarantined entries.`,"storage.trash.loading":`Loading quarantine…`,"storage.trash.col.when":`Quarantined`,"storage.trash.col.files":`Files`,"storage.trash.col.size":`Size`,"storage.trash.col.mode":`Mode`,"storage.trash.col.id":`Entry`,"storage.trash.restore":`Restore`,"storage.trash.confirmTitle":`Restore quarantine entry?`,"storage.trash.confirmBody":`Restore {count} file(s) (~{size}) from {id} back to archived sessions.`,"storage.trash.cancel":`Cancel`,"storage.trash.confirmRestore":`Restore`,"storage.trash.done":`Restored {count} file(s) ({size}).`,"storage.trash.restoreFailed":`Restore failed.`,"storage.trash.listFailed":`Could not list quarantine entries.`,"storage.trash.mode.quarantine":`quarantine`,"storage.trash.mode.permanent":`permanent (incomplete)`,"storage.trash.err.codex_busy":`Codex is using state.sqlite — try again after quitting Codex.`,"storage.trash.err.invalid_trash":`Trash entry id is missing or invalid.`,"storage.trash.err.missing_trash":`Trash entry was not found.`,"storage.trash.err.dest_exists":`Restore destination already exists — remove or rename the archived file and retry.`,"storage.trash.err.fs_failed":`Filesystem restore failed. Some files may already be restored — check archived_sessions and .trash.`,"storage.trash.err.db_reconcile_failed":`Could not restore Codex state database rows.`,"storage.trash.err.storage_mutation_busy":`Another storage cleanup or restore is in progress — try again shortly.`,"storage.trash.err.restore_failed":`Restore failed.`,"storage.trash.err.restore_worker_timeout":`Restore took too long (over 10 minutes) and was stopped.`,"storage.trash.err.restore_worker_aborted":`Restore was cancelled during shutdown.`,"storage.trash.err.restore_worker_failed":`Restore worker crashed or failed unexpectedly.`,"storage.policy.title":`Auto-cleanup policy`,"storage.policy.help":`Optional batch cleanup when archived sessions exceed a threshold. Off by default — never enabled automatically.`,"storage.policy.loading":`Loading policy…`,"storage.policy.loadFailed":`Could not load cleanup policy.`,"storage.policy.saveFailed":`Could not save cleanup policy.`,"storage.policy.runFailed":`Policy run failed.`,"storage.policy.alreadyRunning":`A cleanup policy run is already in progress.`,"storage.policy.invalid":`Invalid policy values.`,"storage.policy.enabled":`Enable auto-cleanup`,"storage.policy.enabledHint":`Default is off. Enabling runs only on the schedule you choose (or Run now).`,"storage.policy.threshold":`When archived size exceeds (GiB)`,"storage.policy.trigger":`Trigger`,"storage.policy.target":`Cleanup target`,"storage.policy.targetPercent":`Remove oldest archived (%)`,"storage.policy.targetReduce":`Reduce archived size to (GiB)`,"storage.policy.thresholdInc":`Increase threshold`,"storage.policy.thresholdDec":`Decrease threshold`,"storage.policy.percentInc":`Increase percent`,"storage.policy.percentDec":`Decrease percent`,"storage.policy.reduceInc":`Increase reduce-to size`,"storage.policy.reduceDec":`Decrease reduce-to size`,"storage.policy.schedule":`Schedule`,"storage.policy.schedule.manual":`Manual only`,"storage.policy.schedule.startup":`On proxy startup`,"storage.policy.schedule.daily":`Daily`,"storage.policy.schedule.weekly":`Weekly`,"storage.policy.mode":`Deletion mode`,"storage.policy.mode.quarantine":`Quarantine (default)`,"storage.policy.mode.permanent":`Permanent delete`,"storage.policy.permanentWarn":`Permanent mode cannot be undone. Prefer quarantine unless you are sure.`,"storage.policy.lastRun":`Last run`,"storage.policy.lastRunDetail":`Removed {count} · freed {size}`,"storage.policy.nextRun":`Next run`,"storage.policy.never":`Never`,"storage.policy.save":`Save`,"storage.policy.runNow":`Run now`,"storage.policy.running":`Running…`,"storage.policy.saved":`Policy saved.`,"storage.policy.skippedDisabled":`Policy is disabled — enable it first.`,"storage.policy.skippedUnder":`Archived size is under the threshold — nothing to do.`,"storage.policy.skippedEmpty":`No archived candidates matched the target.`,"storage.policy.doneQuarantine":`Policy quarantined {count} file(s) ({size}).`,"storage.policy.donePermanent":`Policy permanently deleted {count} file(s) ({size}).`,"modal.addNamed":`Add: {label}`,"modal.add":`Add provider`,"modal.search":`Search providers…`,"modal.logInWith":`Log in with {label}`,"modal.waitingBrowser":`Waiting for browser…`,"modal.providerName":`Provider name`,"modal.adapter":`Adapter`,"modal.baseUrl":`Base URL`,"modal.endpoint":`Endpoint`,"modal.endpoint.tokenPlan":`Token plan`,"modal.endpoint.payAsYouGo":`Pay as you go`,"modal.endpoint.custom":`Custom`,"modal.defaultModel":`Default model (optional)`,"modal.allowPrivateNetwork":`Allow local/private network`,"modal.allowPrivateNetworkHint":`Enable only for intentionally self-hosted providers. Metadata endpoints remain blocked.`,"modal.nameRequired":`Provider name is required`,"modal.baseUrlRequired":`Base URL is required`,"modal.networkError":`Network error — is the proxy running?`,"modal.loginFailStart":`Login failed to start`,"modal.waitingLogin":`Waiting for browser login…`,"modal.loggingIn":`Logging in…`,"modal.loginTimeout":`Login timed out — try again.`,"modal.back":`Back`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`Custom provider`,"modal.failedStatus":`Failed ({status})`,"modal.loginError":`Login error: {error}`,"modal.badge.codexLogin":`Codex login`,"modal.badge.local":`Local`,"modal.badge.apiKey":`API key`,"modal.badge.direct":`Direct`,"modal.badge.pool":`Pool`,"modal.badge.free":`Free`,"modal.invalidPreset":`This built-in provider preset is incomplete. Restart the proxy and try again.`,"modal.freeTierTitle":`Free tier`,"modal.freeTierDefault":`No API key required. Works out of the box.`,"modal.tab.accounts":`Accounts`,"modal.tab.free":`Free`,"modal.tab.paid":`Paid`,"modal.accountsHint":`Sign in to ChatGPT/Codex, OAuth providers, and API-key accounts here. OpenAI is built in — log in rather than adding it again.`,"modal.accountsCodexAuthLink":`Codex Auth`,"modal.notListed":`Provider not listed? Add a custom one`,"modal.catalogLoading":`Loading catalog…`,"modal.accountLogin":`Log in`,"modal.accountLogout":`Log out`,"modal.accountAdd":`Add account`,"modal.accountManage":`Manage`,"modal.accountCodexPool":`ChatGPT account pool`,"modal.accountLoggedIn":`Logged in`,"modal.accountLoggedOut":`Not logged in`,"quota.fiveHourLimit":`5-hour limit`,"quota.weeklyLimit":`Weekly limit`,"quota.monthlyLimit":`30-day limit`,"quota.monthlyCredits":`Monthly credits`,"quota.requestWindow":`Request window`,"quota.grokBuild":`GrokBuild`,"quota.cursorFirstParty":`First-party models`,"quota.cursorApiUsage":`API usage`,"quota.totalSubscriptionCredits":`Total subscription credits`,"quota.usedPercent":`{pct}% used`,"quota.limitReached":`Limit reached`,"quota.resetsToday":`Resets today at {time}`,"quota.resetsTomorrow":`Resets tomorrow at {time}`,"quota.resetsAt":`Resets {when}`,"quota.resetsRelativeMinutes":`Resets in {n} min`,"quota.resetsRelativeHours":`Resets in {n} h`,"pws.status.ready":`Ready`,"pws.status.needsSetup":`Needs setup`,"pws.status.needsAttention":`Needs attention`,"pws.auth.chatgptPassthrough":`ChatGPT passthrough`,"pws.auth.noKey":`No key needed`,"pws.freeTitle":`Free pricing (a key may still be required)`,"pws.localTitle":`Local runtime`,"pws.modelCountOne":`1 model`,"pws.modelCount":`{count} models`,"pws.rail.suffixDefault":` · default`,"pws.rail.suffixLocal":` · local`,"pws.rail.suffixFree":` · free`,"pws.rail.selectAria":`Select {name} — {status}{suffix}`,"pws.searchPlaceholder":`Search providers…`,"pws.filterAria":`Filter providers`,"pws.providerFiltersAria":`Provider filters`,"pws.filters":`Filters`,"pws.filterStatus":`Status`,"pws.pricing":`Pricing`,"pws.paid":`Paid`,"pws.filterType":`Type`,"pws.type.cloud":`Cloud`,"pws.type.local":`Local`,"pws.type.selfHosted":`Self-hosted`,"pws.type.login":`Login`,"pws.sort":`Sort`,"pws.sortProvidersAria":`Sort providers`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`Free first`,"pws.sort.paidFree":`Paid first`,"pws.sort.accountsFirst":`Accounts first`,"pws.resetAll":`Reset all`,"pws.providerList":`Provider list`,"pws.providersAria":`Providers`,"pws.groupReady":`Ready ({count})`,"pws.groupNeedsSetup":`Needs setup ({count})`,"pws.groupDisabled":`Disabled ({count})`,"pws.noSearchResults":`No providers match your search.`,"pws.noMatchFilters":`No providers match the filters.`,"pws.noProvidersConfigured":`No providers configured.`,"pws.workspaceMainAria":`Provider details`,"pws.detailComingSoon":`Detail view coming soon — use the classic view to manage this provider.`,"pws.selectPrompt":`Select a provider from the list.`,"pws.connectFirst":`Connect your first provider`,"pws.empty.browseFree":`Browse free providers`,"pws.empty.browseFreeDesc":`Start without a subscription`,"pws.empty.connectAccount":`Connect an account`,"pws.empty.connectAccountDesc":`Use your ChatGPT or provider login`,"pws.empty.addEndpoint":`Add an endpoint`,"pws.empty.addEndpointDesc":`Custom base URL and API key`,"pws.tab.overview":`Overview`,"pws.tab.models":`Models`,"pws.tab.usage":`Usage`,"pws.tab.accounts":`Accounts`,"pws.tab.settings":`Settings`,"pws.connection":`Connection`,"pws.status.connected":`Connected`,"pws.attentionTitle":`Needs attention`,"pws.attention.reauth":`Active account needs re-authentication`,"pws.attention.reauthForward":`Active Codex account needs re-authentication — open Accounts to fix it`,"pws.attention.missingCredentials":`Missing credentials`,"pws.cell.auth":`Authentication`,"pws.cell.note":`Note`,"pws.cell.defaultModel":`Default model`,"pws.statsAria":`Provider statistics`,"pws.statsTitle":`Statistics`,"pws.stats.totalRequests":`Requests (30d)`,"pws.stats.totalTokens":`Tokens (30d)`,"pws.stats.quotaUpdated":`Quota updated`,"pws.stats.quotaTracked":`Rate limits tracked on the Usage tab.`,"pws.stats.source":`Source`,"pws.usageLast30d":`Usage (last 30 days)`,"pws.estimatedCost":`Estimated cost`,"pws.costDisclaimer":`API list-price estimate, not an actual charge.`,"pws.modelBreakdown":`Model breakdown`,"pws.col.model":`Model`,"pws.col.cost":`Est. cost`,"pws.col.tokens":`Tokens`,"pws.col.requests":`Req.`,"pws.col.share":`Share`,"pws.tokenInput":`Input`,"pws.tokenOutput":`Output`,"pws.metricRequests":`requests`,"pws.metricTokens":`tokens`,"pws.usageUnavailable":`No usage recorded yet.`,"pws.rateLimits":`Rate limits`,"pws.quotaUnavailable":`No quota data for this provider.`,"pws.accountQuotaUnavailable":`Rate-limit data temporarily unavailable; showing last known values when present.`,"pws.accountPlan":`Account plan`,"pws.accountPlanOnly":`{plan} — no monthly credit pool on this account (consumer task quotas are not exposed via Grok CLI OAuth).`,"pws.selected":`Selected`,"pws.copyModelId":`Copy ID`,"pws.modelCopied":`Copied!`,"pws.modelsAvailable":`{count} available`,"pws.modelSearchPlaceholder":`Filter models…`,"pws.modelsLoading":`Loading models…`,"pws.modelsLoadFailed":`Could not load models.`,"pws.modelsNeedsReauth":`Account needs re-login before live model discovery works. Showing configured models for now.`,"pws.modelsConfiguredFallback":`Showing configured models (live discovery unavailable).`,"pws.modelsTruncated":`Showing first {shown} of {total} models. Filter to narrow the list.`,"pws.retry":`Retry`,"pws.noModels":`No models discovered for this provider.`,"pws.noModelMatch":`No models match the filter.`,"pws.adapterBaseRequired":`Adapter and base URL are required.`,"pws.addAccount":`Add account`,"pws.addKey":`Add API key`,"pws.apiKeys":`API Keys`,"pws.authMode":`Auth mode`,"pws.availableAccounts":`Available accounts`,"pws.accountOrdinal":`Account {count}`,"pws.accountsLoading":`Loading accounts…`,"pws.accountsLoadFailed":`Accounts could not be loaded.`,"pws.retryAccounts":`Retry`,"pws.noAccounts":`No accounts are connected yet.`,"pws.accountSwitching":`Switching…`,"pws.accountCurrent":`Current account`,"pws.defaultModelNone":`None (use provider default)`,"pws.discardSettings":`Discard`,"pws.jsonEditorDesc":`Edit the raw provider JSON config. Changes are saved immediately.`,"pws.jsonEditorTitle":`JSON editor — {name}`,"pws.jsonRestore":`Restore`,"pws.jsonSave":`Save`,"pws.loggedInTitle":`Logged in`,"pws.notLoggedInTitle":`Not logged in`,"pws.note":`Note`,"pws.allowPrivateNetwork":`Allow local/private network`,"pws.liveModels":`Discover models from provider`,"pws.liveModelsDesc":`Fetch the provider's live model catalog. Turn this off to use only configured/static models.`,"pws.optionalPlaceholder":`Optional`,"pws.providerId":`Provider ID`,"pws.reauth":`Needs re-auth`,"pws.reauthenticate":`Re-authenticate`,"pws.copyDoctor":`Copy ocx doctor`,"pws.doctorCopied":`Copied`,"pws.doctorCopyUnavailable":`Clipboard unavailable`,"pws.healthCooldownHint":`Wait until the cooldown ends. Do not probe this account yet.`,"pws.healthLabel.rateLimited":`Rate limited`,"pws.healthLabel.quotaLimited":`Quota limited`,"pws.healthLabel.reauthRequired":`Reauthentication required`,"pws.healthLabel.refreshFailed":`Refresh failed`,"pws.healthLabel.metadataMismatch":`Metadata mismatch`,"pws.healthLabel.credentialConflict":`Credential conflict`,"pws.healthSummary.rateLimited":`{provider} {account}: rate limited until {until}. Routing for this account is paused until then.`,"pws.healthSummary.quotaLimited":`{provider} {account}: quota limited until {until}. Routing for this account is paused until then.`,"pws.healthSummary.reauthRequired":`{provider} {account}: reauthentication required.`,"pws.healthSummary.credentialConflict":`{provider} {account}: credential conflict.`,"pws.healthSummary.metadataMismatch":`{provider} {account}: metadata mismatch.`,"pws.healthSummary.staleCredentials":`{provider} {account}: incomplete credentials.`,"pws.removeConfirm":`Remove`,"pws.removeConfirmBody":`Remove provider "{name}"? This cannot be undone.`,"pws.removeDefaultConfirmBody":`Remove default provider "{name}"? "{defaultProvider}" will become the default provider. This cannot be undone.`,"pws.removeConfirmTitle":`Remove provider`,"pws.saveSettings":`Save`,"pws.saving":`Saving…`,"pws.settingsSaved":`Settings saved.`,"pws.settingsUnsavedBar":`You have unsaved changes.`,"pws.unsavedLeaveBody":`You have unsaved changes. Save them before leaving?`,"pws.unsavedLeaveTitle":`Unsaved changes`,"pws.attentionRequired":`Attention required`,"pws.attentionAria":`{name}: {reason}`,"pws.missingCredentials":`Missing credentials`,"pws.editJsonDesc":`Edit the raw proxy config as JSON`,"pws.updatesUnavailable":`Provider updates are not available.`,"pws.dashboard.title":`Providers overview`,"pws.dashboard.subtitle":`Manage all your model providers in one place.`,"pws.dashboard.rateLimits":`RATE LIMITS`,"pws.dashboard.recentlyUsed":`RECENTLY USED`,"pws.dashboard.requests":`{count} requests`,"pws.dashboard.checkedAgo":`Checked {time}`,"pws.dashboard.noQuota":`No quota data`,"pws.dashboard.noUsage":`No usage data yet`,"pws.dashboard.noRateLimits":`No rate-limit data yet`,"pws.allProviders":`Provider Overview`,"pws.enabledLabel":`Enabled`,"pws.testConnection":`Test connection`,"pws.testing":`Testing…`,"pws.connectionOk":`Connection OK`,"pws.connectionFailed":`Connection failed`,"pws.connectionNotApplicable":`Not applicable — this provider uses a static model catalog.`,"pws.editSettings":`Edit settings`,"pws.viewUsage":`View detailed usage`,"pws.allSystemsOk":`All systems operational`,"pws.apiKeyConfigured":`API key configured`,"pws.addApiKey":`Add API key`,"pws.loggedInAs":`Logged in as {email}`,"pws.notLoggedIn":`Not logged in`,"pws.passthrough":`Codex passthrough`,"pws.notes":`NOTES`,"pws.notePlaceholder":`Add a note about this provider...`,"pws.noteSaved":`Note saved`,"pws.authSummary":`AUTHENTICATION`,"time.justNow":`Just now`,"time.notChecked":`Not checked`,"time.minutesAgo":`{n}m ago`,"time.hoursAgo":`{n}h ago`,"time.daysAgo":`{n}d ago`,"modal.noMatch":`No match.`,"modal.oauthDefaultNote":`Log in with your account — no API key needed.`,"modal.oauthComingSoon":`OAuth login for {label} arrives in the next update. Use an API key for now.`,"modal.oauthComingSoonShort":`OAuth login for this provider arrives in the next update — use an API key for now.`,"modal.useApiKeyInstead":`Use an API key instead`,"modal.setupGuide":`Setup guide`,"modal.setupStep1Prefix":`Go to`,"modal.setupDashboardLink":`{label} dashboard`,"modal.setupStep1Suffix":`and copy your API key`,"modal.setupStep2":`Paste it in the API key field below`,"modal.setupStep3":`Click Add provider — models are auto-discovered`,"modal.namePlaceholder":`e.g. openrouter`,"modal.duplicateWarn":`Provider "{name}" exists and will be overwritten.`,"modal.forwardHintPrefix":`No key needed — the proxy forwards your`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`credentials to this provider.`,"modal.localHint":`No API key is stored. This adds Cursor's static public model catalog for Codex, but live Cursor transport and native file/shell execution remain disabled until audited.`,"modal.getApiKey":`Get your {label} API key`,"modal.apiKey":`API key`,"modal.apiKeyTransport":`API key header`,"modal.apiKeyTransportNative":`x-api-key (Anthropic native)`,"modal.apiKeyTransportBearer":`Authorization: Bearer`,"modal.apiKeyPlaceholder":`sk-… (or $ENV_VAR)`,"modal.defaultModelPlaceholder":`e.g. gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.baseUrlPlaceholderError":`Base URL contains an unresolved {placeholder}. Replace it with your actual value.`,"modal.baseUrlPlaceholderHint":`Replace the {placeholder} in the Base URL with your actual Account ID before adding.`,"modal.adding":`Adding…`,"modal.useOauthLogin":`← Use OAuth login`,"nav.codexAuth":`Codex Auth`,"nav.api":`API`,"nav.clients":`Clients`,"nav.openMenu":`Open menu`,"nav.closeMenu":`Close menu`,"codexAuth.mainAccount":`Main Account`,"codexAuth.codexApp":`Codex App`,"codexAuth.appLogin":`App login`,"codexAuth.accountPool":`Account Pool`,"codexAuth.accountModeTitle":`OpenAI account mode`,"codexAuth.accountModePool":`Pool mode`,"codexAuth.accountModePoolDesc":`The main login and eligible added accounts rotate here.`,"codexAuth.accountModeDirect":`Direct mode`,"codexAuth.accountModeDirectDesc":`Requests use only the main login; added accounts remain stored for Pool mode.`,"codexAuth.openaiMissing":`The built-in OpenAI provider is not configured.`,"codexAuth.openaiDisabled":`The built-in OpenAI provider is disabled.`,"codexAuth.openaiUnavailableDesc":`Your OpenAI accounts are still available. Enable the provider to route Codex requests.`,"codexAuth.enableOpenai":`Enable OpenAI`,"codexAuth.enablingOpenai":`Enabling...`,"codexAuth.enableOpenaiFailed":`Failed to enable the OpenAI provider.`,"codexAuth.openaiPresetLoadFailed":`Failed to load the OpenAI provider preset.`,"codexAuth.openaiPresetUnavailable":`OpenAI provider preset is unavailable.`,"codexAuth.openProviders":`Open Providers`,"codexAuth.add":`Add`,"codexAuth.refreshQuota":`Refresh quotas`,"codexAuth.refreshingQuota":`Refreshing...`,"codexAuth.quotaRefreshed":`Quotas refreshed`,"codexAuth.quotaRefreshFailed":`Failed to refresh quotas`,"codexAuth.pauseExhausted":`Pause exhausted`,"codexAuth.pausingExhausted":`Checking quotas...`,"codexAuth.pauseExhaustedSucceeded":`Accounts at the limit paused: {count}`,"codexAuth.pauseExhaustedNone":`No accounts have confirmed 100% usage.`,"codexAuth.pauseExhaustedFailed":`Failed to check and pause exhausted accounts.`,"codexAuth.noPool":`No pool accounts added yet.`,"codexAuth.pause":`Pause`,"codexAuth.resume":`Resume`,"codexAuth.paused":`PAUSED`,"codexAuth.pauseSucceeded":`{email} is paused`,"codexAuth.resumeSucceeded":`{email} is available to the pool again`,"codexAuth.pauseFailed":`Could not pause {email}. Nothing was changed.`,"codexAuth.resumeFailed":`Could not resume {email}. Nothing was changed.`,"codexAuth.pausedHint":`Excluded from automatic switching, retries, cooldown recovery, and manual selection until resumed.`,"codexAuth.fiveHour":`5h`,"codexAuth.weekly":`Week`,"codexAuth.monthly":`30d`,"codexAuth.resets":`resets`,"codexAuth.today":`Today`,"codexAuth.current":`CURRENT`,"codexAuth.nextSession":`SELECTED`,"codexAuth.poolPrepared":`PREPARED FOR POOL`,"codexAuth.preparePoolTitle":`Prepare this account for Pool mode?`,"codexAuth.preparePoolDesc":`Direct requests keep using the main login. This account becomes the prepared Pool selection when Pool mode is enabled.`,"codexAuth.prepareForPool":`Prepare for Pool`,"codexAuth.poolPreparedToast":`{email} is prepared for Pool mode`,"codexAuth.switchTitle":`Switch active account?`,"codexAuth.switchDesc":`This applies to the next request from existing and new Codex sessions. In-flight requests keep their captured account.`,"codexAuth.cacheWarning":`OpenCodex replays the conversation after any account change, but the provider-side prompt cache may be cold.`,"codexAuth.setAsNext":`Select Account`,"codexAuth.cancel":`Cancel`,"codexAuth.switchBack":`Switch back to Main?`,"codexAuth.switchBackDesc":`The next request from existing and new Codex sessions will use your App login account.`,"codexAuth.autoSwitch":`Usage-based proactive switching`,"codexAuth.autoSwitchQuotaDesc":`Quota: at {threshold}% usage or above, the next request may move to a lower-usage eligible account, including an already-bound task; Go/Free use 30d only.`,"codexAuth.autoSwitchQuotaOffDesc":`Usage-based proactive switching is off. New/unbound assignment and failure recovery still apply.`,"codexAuth.autoSwitchRoundRobinDesc":`Round-robin assignment does not use this threshold; it continues to rotate new/unbound tasks.`,"codexAuth.autoSwitchFillFirstDesc":`Fill-first: {threshold}% is the drain point for new/unbound tasks; healthy bound tasks keep their account.`,"codexAuth.autoSwitchFillFirstOffDesc":`Fill-first has no usage drain point for new/unbound tasks; cooldown, reauthentication, and failure recovery can still move routing.`,"codexAuth.failureRecoveryNote":`Failure recovery is separate: a request rejected before output with 429/402, cooldown, reauthentication, exclusion, or configured transient failover may select another eligible account.`,"codexAuth.autoSwitchThreshold":`Usage threshold`,"codexAuth.autoSwitchThresholdAria":`Usage threshold, percent`,"codexAuth.autoSwitchThresholdInc":`Increase usage threshold`,"codexAuth.autoSwitchThresholdDec":`Decrease usage threshold`,"codexAuth.autoSwitchLoadFailed":`Usage-based switching setting could not be loaded.`,"codexAuth.autoSwitchThresholdInvalid":`Enter a whole number from 1 to 100`,"codexAuth.autoSwitchUpdated":`Usage-based proactive switching updated`,"codexAuth.autoSwitchUpdateFailed":`The usage-based switching update could not be confirmed. The last confirmed value is shown.`,"anthropicPool.title":`Claude account pool (experimental)`,"anthropicPool.enabledDesc":`On 429, cools the account and fails over. New sessions prefer usage under {threshold}% (5-hour bar).`,"anthropicPool.disabledDesc":`Uses only the active Claude account. Enable only if you accept experimental routing.`,"anthropicPool.experimentalWarning":`Experimental and not battle-tested. Anthropic may restrict accounts that look like automated multi-account rotation. Same organization can share quota — pooling those accounts will not help. Keep this off unless you understand the risk.`,"anthropicPool.needTwoAccounts":`Add at least two Claude OAuth accounts before enabling the pool.`,"anthropicPool.threshold":`New-session usage threshold`,"anthropicPool.thresholdAria":`New-session usage threshold, percent`,"anthropicPool.thresholdHelp":`0 disables quota-based picking (affinity + active account only). Default 80.`,"anthropicPool.thresholdInvalid":`Enter a whole number from 0 to 100`,"anthropicPool.loadFailed":`Claude pool settings could not be loaded.`,"anthropicPool.saveFailed":`Claude pool settings could not be saved.`,"anthropicPool.on":`On`,"anthropicPool.off":`Off`,"accountPool.strategy":`Rotation strategy`,"accountPool.strategyDesc":`How OpenCodex assigns an account to a new/unbound task.`,"accountPool.strategyQuota":`Quota`,"accountPool.strategyRoundRobin":`Round-robin`,"accountPool.strategyFillFirst":`Fill-first`,"accountPool.strategyHintQuota":`Quota can also rebind an existing task on its next request after the usage threshold is crossed.`,"accountPool.strategyHintRoundRobin":`Round-robin rotates only tasks without a live binding; the usage threshold does not change normal rotation.`,"accountPool.strategyHintFillFirst":`Fill-first uses the threshold as a drain point for unbound tasks; healthy bound tasks keep affinity.`,"accountPool.unboundDefinition":`New/unbound task means a request with no current account binding; an existing visible task can become unbound after a proxy or affinity reset.`,"accountPool.stickyLimit":`New/unbound assignments before rotate`,"accountPool.stickyLimitAria":`New/unbound assignments before rotate`,"accountPool.stickyLimitInc":`Increase sticky limit`,"accountPool.stickyLimitDec":`Decrease sticky limit`,"accountPool.stickyLimitHelp":`Keep the selected account for this many new/unbound task assignments before advancing; the counter increments when the task is bound, not after upstream success.`,"accountPool.stickyLimitInvalid":`Enter a whole number from 1 to 100`,"accountPool.strategyLoadFailed":`Rotation strategy could not be loaded.`,"accountPool.strategyUpdateFailed":`Rotation strategy could not be saved.`,"codexAuth.switched":`{email} is selected for the next request`,"codexAuth.loadFailed":`Codex account settings could not be loaded.`,"codexAuth.switchFailed":`The account could not be switched. Your previous selection is unchanged.`,"codexAuth.removeConfirm":`Remove {id}?`,"codexAuth.removeFailed":`The account could not be removed. Nothing was changed.`,"codexAuth.addTitle":`Add Codex Account`,"codexAuth.addIdLabel":`Account ID (slug)`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team...`,"codexAuth.resetCreditsAria":`{count} reset credit(s)`,"codexAuth.addJsonLabel":`auth.json content`,"codexAuth.addHelp":`Copy from another machine's ~/.codex/auth.json, or use codex-auth export.`,"codexAuth.importBtn":`Import`,"codexAuth.importInvalidJson":`Invalid JSON`,"codexAuth.importMissingTokens":`Missing access_token or refresh_token in JSON`,"codexAuth.importMissingId":`Account ID is required`,"codexAuth.accountAdded":`Account added to pool`,"codexAuth.addPickDesc":`Login with another ChatGPT account to add it to the pool.`,"codexAuth.oauthLogin":`OAuth Login`,"codexAuth.oauthDesc":`Opens ChatGPT login in browser`,"codexAuth.importAuthJson":`Import auth.json`,"codexAuth.importAuthJsonDesc":`From another Codex install or codex-auth export`,"codexAuth.back":`Back`,"codexAuth.oauthAlreadyInProgress":`Login already in progress. Complete it in your browser.`,"codexAuth.oauthWaiting":`Waiting for ChatGPT login to complete in your browser...`,"codexAuth.oauthSubmittingCode":`Submitting code…`,"codexAuth.oauthCodeSubmitted":`Code submitted — waiting for login to finish…`,"codexAuth.oauthStatusRetrying":`Network or proxy error while checking login status — retrying…`,"codexAuth.oauthCancelled":`Login was cancelled.`,"codexAuth.loginFailed":`Login failed`,"codexAuth.needsReauth":`Re-login`,"codexAuth.reauthenticate":`Re-authenticate`,"codexAuth.tokenExpired":`Token expired — re-authenticate this account`,"codexAuth.mainTokenExpired":`Token expired — sign in again via Codex App login`,"codexAuth.emailCollision":`This account matches your main Codex login. Use a different account.`,"codexAuth.resetCreditsTitle":`Reset Credits`,"codexAuth.resetCreditsAvailable":`You have {count} reset credit(s) available.`,"codexAuth.resetCreditsDesc":`Each credit resets your current hourly and weekly usage limits instantly.`,"codexAuth.noResetCredits":`You don't have any reset credits.`,"codexAuth.earnCreditsHint":`Credits are earned monthly and via the referral program.`,"codexAuth.creditsExpireNote":`Credits expire 30 days after earning.`,"codexAuth.useOneCredit":`Use 1 Credit`,"codexAuth.confirmResetTitle":`Use Reset Credit?`,"codexAuth.confirmResetDesc":`This will instantly reset your current rate limits. You have {count} credit(s) remaining.`,"codexAuth.irreversible":`This action cannot be undone.`,"codexAuth.useCredit":`Use Credit`,"codexAuth.redeeming":`Resetting...`,"codexAuth.resetSuccess":`Rate limits reset! {remaining} credit(s) remaining.`,"codexAuth.resetSuccessGeneric":`Rate limits reset!`,"codexAuth.resetAlreadyRedeemed":`This credit was already redeemed. Credits unchanged.`,"codexAuth.resetNothingToReset":`No rate-limit window needs resetting right now.`,"codexAuth.resetNoCredit":`No reset credits available.`,"codexAuth.resetError":`Failed to redeem reset credit. Please try again.`,"codexAuth.fifoNote":`The oldest credit is used first.`,"codexAuth.confirmWhichCredit":`Credit from {date} will be used.`,"codexAuth.creditNext":`Next to use`,"codexAuth.creditLabel":`Credit #{n}`,"codexAuth.creditNextBadge":`NEXT`,"codexAuth.creditGranted":`Granted {date}`,"codexAuth.creditExpires":`Expires {date} ({days}d left)`,"api.title":`API Access`,"api.subtitle":`Use generated API keys to access the opencodex proxy from external apps. Keys authenticate via the {authHeader} header; see the table below for what each endpoint accepts.`,"api.baseUrl":`Base URL`,"api.responsesEndpoint":`Responses API`,"api.chatCompletionsEndpoint":`Chat Completions API`,"api.messagesEndpoint":`Messages API`,"api.modelsEndpoint":`Models API`,"api.endpointNote":`Use the base URL with OpenAI-compatible clients. Responses and Chat Completions are exposed under /v1.`,"api.endpointsTitle":`Endpoints`,"api.authTitle":`Authentication`,"api.authLoopback":`Loopback binds (127.0.0.1 or ::1) bypass authentication. Remote binds require a generated ocx_ key or OPENCODEX_API_AUTH_TOKEN.`,"api.authBaseUrlNote":`Configure clients with the base URL, then choose the protocol-specific endpoint below.`,"api.newKeyTitle":`New key created`,"api.newKeyNote":`Copy this key now — it won't be shown again.`,"api.copy":`Copy`,"api.copied":`Copied`,"api.dismiss":`Dismiss`,"api.generateTitle":`Generate key`,"api.keyNamePlaceholder":`Key name (optional)`,"api.generate":`Generate`,"api.generating":`Creating…`,"api.activeKeys":`Active keys ({count})`,"api.activeKeysLoading":`Active keys`,"api.noKeys":`No API keys yet. Generate one above.`,"api.workspace.sections":`API sections`,"api.section.keys":`Keys`,"api.section.connect":`Connect`,"api.section.endpoints":`Endpoints`,"api.section.models":`Models`,"api.section.examples":`Examples`,"api.workspace.details":`API key details`,"api.workspace.keyDetails":`Key details`,"api.workspace.keyPrefix":`Key prefix`,"api.workspace.deleteKey":`Delete key`,"api.workspace.deleteConfirm":`Are you sure you want to delete this key? This cannot be undone.`,"api.workspace.usageExamples":`Usage examples`,"api.copyUrlHint":`Click to copy URL`,"api.urlCopied":`URL copied`,"api.copyExampleHint":`Click to copy example`,"api.exampleCopied":`Example copied`,"api.colName":`Name`,"api.colKey":`Key`,"api.colCreated":`Created`,"api.confirm":`Confirm`,"api.deleteAria":`Delete API key`,"api.modelsTitle":`External model catalog`,"api.modelsCount":`{count} callable`,"api.modelsLoading":`Loading models…`,"api.modelsSearch":`Search models`,"api.modelsSubtitle":`Use these exact model IDs with /v1/models and your chosen inbound protocol.`,"api.modelsEmpty":`No externally callable models are available yet.`,"api.modelsNoMatch":`No models match “{query}”.`,"api.modelsLoadFailed":`Could not load the external model catalog.`,"api.colModel":`Model`,"api.colSource":`Source`,"api.colProtocols":`Protocols`,"api.sourceNative":`ChatGPT pool`,"api.sourceCombo":`Combo route`,"api.sourceCustom":`Custom`,"api.protocolResponses":`Responses`,"api.protocolChatCompletions":`Chat Completions`,"api.protocolMessages":`Messages`,"api.copyModelId":`Copy ID`,"api.modelCopied":`Copied`,"api.testModel":`Test`,"api.testingModel":`Testing…`,"api.testSucceeded":`OK`,"api.testFailed":`Failed`,"api.usageChatTitle":`Chat Completions example`,"api.usageResponsesTitle":`Responses example`,"api.usageMessagesTitle":`Messages example`,"api.usageSampleInput":`Hello, world!`,"api.clientConfig.title":`Client config`,"api.clientConfig.rowsLabel":`Connect a client`,"api.clientConfig.details":`Details`,"api.clientConfig.detailsAria":`{client} config details`,"api.clientConfig.copyAria":`Copy {client} config JSON`,"api.clientConfig.downloadAria":`Download {client} config`,"api.clientConfig.rowMeta":`{destination} · {count} model(s)`,"api.clientConfig.rowError":`Could not build the {client} config.`,"api.clientConfig.copiedAnnounceClient":`{client} config JSON copied to the clipboard.`,"api.clientConfig.clientOpencode":`OpenCode`,"api.clientConfig.clientPi":`Pi`,"api.clientConfig.copy":`Copy JSON`,"api.clientConfig.download":`Download`,"api.clientConfig.loading":`Building client config…`,"api.clientConfig.jsonLabel":`{client} config JSON`,"api.clientConfig.destination":`Destination file`,"api.clientConfig.envHint":`Set the key before launching`,"api.clientConfig.mergeWarning":`Merge this into the destination file. Replacing it would drop your other providers and MCP settings.`,"api.clientConfig.modelCount":`{count} model(s) exported`,"api.clientConfig.missingLimits":`{count} of {total} model(s) ship without a context limit; the client applies its own defaults.`,"api.clientConfig.noKeyYet":`{env} has no key behind it yet. Generate a key above before using this config off loopback.`,"api.clientConfig.loadFailed":`Could not read the model list, so no client config was produced.`,"api.clientConfig.copiedAnnounce":`Client config JSON copied to the clipboard.`,"api.clientConfig.copyFailed":`Could not copy the client config JSON.`,"api.clientConfig.downloadedAnnounce":`Downloaded {filename}. Nothing changed yet — merge it into {destination} yourself.`,"api.clientConfig.whereDisclosure":`Where this file goes`,"api.clientConfig.whereBody":`The destination above is the global path. A project-local config file in the working directory takes precedence over it, and the client reads the key from the environment variable named in the config — never from this file.`,"api.keysLoadFailed":`Could not load API keys.`,"api.createFailed":`Could not create API key.`,"api.deleteFailed":`Could not delete API key.`,"api.auth.endpoint":`Endpoint`,"api.auth.required":`Required`,"api.auth.accepted":`Accepted`,"api.auth.rejected":`Not accepted`,"api.auth.testProtocol":`Test {protocol}`,"api.auth.testNeedsFreshKey":`Generate a key and keep its one-time value on screen to run an authenticated test.`,"api.key.name":`Key name`,"api.key.rename":`Rename`,"api.key.saveName":`Save name`,"api.key.renaming":`Saving…`,"api.key.renameFailed":`Could not rename the key. Your draft was kept.`,"api.key.deleting":`Deleting…`,"api.key.copyFailed":`Could not copy the key. Select it and copy it manually before dismissing this panel.`,"api.attribution.title":`Attributed usage`,"api.attribution.requests7d":`Requests, last 7 days`,"api.attribution.totalRequests":`Total attributed requests`,"api.attribution.totalRequestsAvailable":`Requests in available history`,"api.attribution.sinceAvailable":`Available attribution since`,"api.attribution.lastUsed":`Last used`,"api.attribution.since":`Attribution available since`,"api.attribution.neverUsed":`Not used since attribution began`,"api.attribution.unavailable":`Usage unavailable`,"api.attribution.unavailableDetail":`No usage has been attributed yet. Requests recorded before attribution began cannot be assigned retroactively.`,"api.attribution.ambiguous":`Two keys share this ID, so usage cannot be attributed to one of them. Give each key a unique ID in the config file.`,"api.attribution.railAmbiguous":`duplicate ID`,"nav.claude":`Claude`,"claude.subtitle":`Use GPT, Gemini, and other models inside Claude Code.`,"claude.pageTitle":`Claude Code`,"claude.workspace.settings":`Settings`,"claude.enabledLabel":`Claude connection`,"claude.enabledHint":`When off, Claude Code cannot use this proxy.`,"claude.authMode":`Auth Mode`,"claude.authModeHint":`Subscription requires Claude account, Proxy works without Anthropic account`,"claude.authModeSubscription":`Subscription (Claude account)`,"claude.authModeProxy":`Proxy (no account needed)`,"claude.authModeAuto":`Auto (detect Claude auth)`,"claude.effectiveMode.label":`Effective on next launch`,"claude.effectiveMode.manual":`Manual: {mode}`,"claude.effectiveMode.autoPresent":`Auto: subscription — Claude auth found via {source}`,"claude.effectiveMode.autoAbsent":`Auto: proxy mode — no Claude auth found`,"claude.effectiveMode.autoUnknown":`Auto: subscription — auth could not be verified`,"claude.effectiveMode.admissionKey":`This proxy's API key is still sent.`,"claude.authSource.claude-json-oauth":`Claude account`,"claude.authSource.claude-credentials-file":`credentials file`,"claude.authSource.macos-keychain":`macOS Keychain`,"claude.authSource.exported-env":`environment variable`,"claude.authSource.unknown":`a detected credential`,"claude.systemEnv":`Auto-connect`,"claude.systemEnvDesc":`When on, running claude in any terminal automatically goes through the proxy.`,"claude.systemEnvUnsupported":`Auto-connect is available on macOS only. On this system, start Claude with {cmd}.`,"claude.systemEnvWarn":`⚠ You must fully quit and relaunch your terminal app for this to take effect. Not recommended.`,"claude.fastMode":`Fast Mode (OpenAI)`,"claude.fastModeDesc":`Controls service_tier for OpenAI models. ON = priority (faster). OFF = default. Auto = passthrough (client decides).`,"claude.fastAuto":`Auto`,"claude.fastOn":`ON`,"claude.fastOff":`OFF`,"claude.autoContext":`Use big context automatically`,"claude.autoContextDesc":`Controls how far the 1M marking goes. ON: every model above 200k tokens (GPT models etc.) gets a big-context row. OFF: only true 1M models get one.`,"claude.autoContextInert":`Inactive because a legacy context-size value (maxContextTokens) exists in the config file. Remove it there to re-enable.`,"claude.autoCompactWindow":`Auto-summarize point`,"claude.autoCompactDefault":`350k (default)`,"claude.autoCompactWindowDesc":`Older messages are summarized when the chat reaches this point. It never exceeds each model's own limit, so 200k models are unaffected.`,"claude.autoCompactWindowWarn":`Changing this can break GPT models — set higher than a model's real limit, chats will error before the summary kicks in.`,"claude.injectAgents":`Auto-register subagents`,"claude.injectAgentsDesc":`Registers the models picked on the Subagents tab (plus the current default model) as dispatchable Claude Code agents (ocx-*). Applies from the next session.`,"claude.webSearchSidecar":`Web search sidecar override`,"claude.webSearchSidecarHint":`Override the main web search sidecar for Claude Code requests.`,"claude.visionSidecar":`Vision sidecar override`,"claude.visionSidecarHint":`Override the main vision sidecar for Claude Code requests.`,"claude.useMainSetting":`Use main setting`,"claude.sidecarModelPlaceholder":`Main setting model`,"claude.quickstart":`Get started`,"claude.quickstartHint":`{cmd} opens Claude Code through the proxy. Your claude.ai login stays active.`,"claude.manualEnv":`Manual setup (advanced)`,"claude.smallFastModel":`Background helper model`,"claude.smallFastModelHint":`The model Claude Code uses for background work like chat summaries and topic detection. The haiku subagent alias uses it too. Empty = Claude default (Haiku).`,"claude.smallFastModelAccurateHint":`The model Claude Code uses for background work such as chat summaries and topic detection. The haiku subagent alias uses it too.`,"claude.smallFastModelUnsetOption":`Let Claude Code choose (native model)`,"claude.smallFastModelNativeWarning":`When unset, OpenCodex leaves the helper-model overrides unset. Claude Code may use its native Sonnet model, which may incur charges from your native provider.`,"claude.slotUnset":`Use Claude default`,"claude.modelMap":`Model interception`,"claude.modelMapHint":`Intercepts requests for a specific model and reroutes them to the one you pick. Empty by default — nothing happens until you add a rule.`,"claude.mapFrom":`Original model (e.g. claude-sonnet-4-5)`,"claude.mapTo":`Swap to (e.g. gemini/gemini-3-pro)`,"claude.addMapping":`Add rule`,"claude.removeMapping":`Remove rule`,"claude.aliases":`Available models`,"claude.aliasesHint":`Models that appear in Claude Code's /model menu.`,"claude.aliasProviderOther":`Other`,"claude.loading":`Loading…`,"claude.loadFail":`Failed to load Claude settings`,"claude.saved":`Saved.`,"claude.saveFailed":`Save failed`,"claude.networkError":`Network error — is the proxy running?`,"claude.toggleAria":`Toggle Claude connection`,"claude.none":`None`,"cws.loading":`Loading combos…`,"cws.loadFailed":`Could not load combos.`,"cws.saveFailed":`Could not save combo.`,"cws.removeFailed":`Could not remove combo.`,"cws.saved":`Combo saved.`,"cws.created":`Created {model}.`,"cws.removed":`Removed combo/{id}.`,"cws.renamed":`Renamed {from} to {to}.`,"cws.add":`Add combo`,"cws.addTitle":`Add combo`,"cws.addSubtitle":`Create a virtual model across providers and choose the exact model name clients will request.`,"cws.create":`Create combo`,"cws.railAria":`Combo list`,"cws.searchPlaceholder":`Search combos or targets…`,"cws.noSearchResults":`No combos match your search.`,"cws.group.failover":`Failover`,"cws.group.roundRobin":`Round-robin`,"cws.targetCount":`{count} targets`,"cws.targetCountOne":`1 target`,"cws.overviewTitle":`Combos`,"cws.overviewBlurb":`Virtual models that fail over across provider/model targets or use deterministic smooth weighted round-robin.`,"cws.count.total":`Total`,"cws.count.failover":`Failover`,"cws.count.roundRobin":`Round-robin`,"cws.howTitle":`How it works`,"cws.howBody":`Ask Codex for the combo's public model name. Without one, the default is combo/<id>. OpenCodex selects a target and hops only on retryable upstream failures. If no target remains available, the request fails closed instead of using the global default provider.`,"cws.attentionTitle":`Needs attention`,"cws.attention.empty":`No targets configured`,"cws.attention.few":`Only one target — failover has nowhere to hop`,"cws.attention.catalogOmitted":`Missing from the model catalog — member capabilities are incomplete or incompatible (missing context window / metadata, or empty modality intersection). Routing by alias still works`,"cws.emptyTitle":`Create your first combo`,"cws.empty.createDesc":`Name a virtual model and chain two or more backends.`,"cws.backToAll":`Back to all combos`,"cws.allCombos":`All combos`,"cws.copyModel":`Copy id`,"cws.copied":`Copied`,"cws.tab.config":`Config`,"cws.tab.about":`About`,"cws.strategy":`Strategy`,"cws.strategy.failover":`Failover`,"cws.strategy.roundRobin":`Round-robin`,"cws.strategy.failoverHint":`Try targets in order. If the first fails with a retryable error (rate limit, outage, subscription gate), hop to the next.`,"cws.strategy.roundRobinHint":`Deterministically balance traffic by weight. Keep each selected target for a batch of successful requests, then advance.`,"cws.field.id":`Combo id`,"cws.field.idHint":`Clients will request {model}`,"cws.field.idInternalHint":`Internal combo id. You can change it after creation.`,"cws.field.idHintEdit":`Renaming moves the combo to a new id. Clients request {model}.`,"cws.field.alias":`Public model name`,"cws.field.aliasPlaceholder":`deepseek-v4-flash or vendor/model`,"cws.field.aliasHint":`Optional. Use a bare name with no prefix, a custom prefix like vendor/model, or leave blank to use combo/<id>.`,"cws.field.stickyLimit":`Sticky successes before rotate`,"cws.field.stickyLimitHint":`Retain the selected target for this many successful requests before the weighted selector advances.`,"cws.field.defaultEffort":`Default reasoning`,"cws.field.defaultEffortNone":`None (target default)`,"cws.field.defaultEffortHint":`Used only when the client omits reasoning effort. Options are the intersection of the selected targets' advertised efforts; targets without catalog effort metadata offer none.`,"cws.field.defaultEffortUnsupported":`This effort is not in the targets' common ladder — it will be ignored or snapped at request time.`,"cws.field.defaultEffortUnsupportedOption":`not in intersection`,"cws.targets":`Targets`,"cws.targets.failoverHint":`Order matters — first is primary.`,"cws.targets.roundRobinHint":`Weights control deterministic relative selection; order breaks ties in the rotation ring.`,"cws.target.provider":`Provider`,"cws.target.model":`Model`,"cws.target.weight":`Weight`,"cws.target.pickProvider":`Select provider…`,"cws.target.pickProviderFirst":`Select a provider first…`,"cws.target.pickModel":`Select model…`,"cws.target.noModels":`No models for this provider`,"cws.target.modelPlaceholder":`model id`,"cws.target.add":`Add target`,"cws.target.drag":`Drag to reorder`,"cws.target.moveUp":`Move up`,"cws.target.moveDown":`Move down`,"cws.aboutTitle":`Runtime`,"cws.aboutBody":`Failed targets cool down briefly, honoring Retry-After. Invalid or context errors do not hop. Each target adapts effort to its own capabilities; exhausted combos fail closed. Logs and Usage retain ordered physical attempts and per-attempt usage.`,"cws.removeConfirmTitle":`Remove {model}?`,"cws.removeConfirmDesc":`This removes the virtual model from config and the Codex catalog. It does not delete any providers.`,"cws.unsavedTitle":`Unsaved changes`,"cws.unsavedDesc":`Discard edits to this combo and continue?`,"cws.keepEditing":`Keep editing`,"cws.err.missingId":`Combo id is required.`,"cws.err.invalidId":`Id must start with a letter or number and use only letters, numbers, dots, underscores, or hyphens (max 64).`,"cws.err.duplicateId":`A combo with this id already exists.`,"cws.err.invalidAlias":`Alias must use letters, numbers, dots, underscores, or hyphens, with at most one "/" segment.`,"cws.err.aliasReservedNamespace":`The alias must not use the reserved "combo/" namespace.`,"cws.err.aliasNativeFamily":`Bare aliases in the OpenAI native family (gpt-*, o1-*, o3-*, o4-*, codex-*) are not allowed.`,"cws.err.duplicateAlias":`Another combo already uses this alias.`,"cws.err.noTargets":`Add at least one target.`,"cws.err.incompleteTarget":`Each target needs a provider and model.`,"cws.target.disabled":`{name} (disabled)`,"cws.err.reservedNamespace":`A physical provider named combo must be renamed before creating combos.`,"cws.err.providerCollision":`The combo ID conflicts with a configured provider name.`,"cws.err.unknownProvider":`Each target must use a configured provider.`,"cws.err.duplicateTarget":`The same provider/model target can appear only once.`,"cws.err.invalidStickyLimit":`Sticky successes must be an integer from 1 to 100.`,"cws.err.invalidWeight":`Each round-robin weight must be an integer from 1 to 10000.`,"cws.err.noEnabledTarget":`At least one target must use an enabled provider.`,"claude.tabsLabel":`Claude client`,"claude.tabCode":`Code`,"claude.tabDesktop":`Desktop`,"claudeDesktop.title":`Claude Desktop`,"claudeDesktop.subtitle":`Route each Claude model family through an available model on port {port}.`,"claudeDesktop.importJson":`Import JSON`,"claudeDesktop.exportJson":`Export JSON`,"claudeDesktop.loading":`Loading Claude Desktop profile…`,"claudeDesktop.loadFail":`Failed to load Claude Desktop profile.`,"claudeDesktop.retry":`Retry`,"claudeDesktop.saveFailed":`Failed to save Claude Desktop profile.`,"claudeDesktop.applyFailed":`Profile was saved, but could not be applied.`,"claudeDesktop.updateFailed":`Claude Desktop update failed.`,"claudeDesktop.savedApplied":`Profile saved and applied to Claude Desktop.`,"claudeDesktop.savedAppliedAnnounce":`Claude Desktop profile saved and applied.`,"claudeDesktop.saved":`Profile saved.`,"claudeDesktop.savedAnnounce":`Claude Desktop profile saved.`,"claudeDesktop.exported":`Profile exported as JSON.`,"claudeDesktop.importExpected":`Expected a version 1 Claude Desktop profile.`,"claudeDesktop.importReady":`JSON imported. Review the draft, then save and apply it.`,"claudeDesktop.importedAnnounce":`Profile JSON imported. Unsaved changes are ready for review.`,"claudeDesktop.importInvalid":`The selected file is not a valid profile.`,"claudeDesktop.importFailed":`Import failed. {error}`,"claudeDesktop.moved":`{route} moved to {family}.`,"claudeDesktop.unsaved":`Unsaved changes`,"claudeDesktop.upToDate":`Profile is up to date`,"claudeDesktop.saving":`Saving…`,"claudeDesktop.applying":`Applying…`,"claudeDesktop.saveApply":`Save & apply`,"claudeDesktop.emptyTitle":`No models available`,"claudeDesktop.emptyHint":`Add or enable a provider, then return to assign Claude Desktop routes.`,"claudeDesktop.assignmentsLabel":`Claude model family assignments`,"claudeDesktop.family.opus":`Opus`,"claudeDesktop.family.fable":`Fable`,"claudeDesktop.family.sonnet":`Sonnet`,"claudeDesktop.family.haiku":`Haiku`,"claudeDesktop.modelCountOne":`{count} model`,"claudeDesktop.modelCountMany":`{count} models`,"claudeDesktop.chooseDefault":`Choose a default`,"claudeDesktop.temporaryDefault":`Temporary default`,"claudeDesktop.laneEmpty":`Drop a model here or use its Move control.`,"claudeDesktop.laneNoMatch":`No model in this family matches your search.`,"nav.grok":`Grok`,"nav.cloud":`Cloud Sync`,"cloud.subtitle":`Backup and restore ~/.opencodex to your Microsoft OneDrive (OAuth device login).`,"cloud.statusTitle":`Status`,"cloud.statusHint":`Local device id and last OneDrive push/pull.`,"cloud.loggedIn":`Microsoft account`,"cloud.notLoggedIn":`Not signed in`,"cloud.account":`Account`,"cloud.device":`This device`,"cloud.remote":`Remote folder`,"cloud.lastSync":`Last sync`,"cloud.never":`Never`,"cloud.remoteManifest":`Cloud snapshot`,"cloud.hasVault":`encrypted vault`,"cloud.remoteError":`Cloud check`,"cloud.clientIdTitle":`Azure app client ID`,"cloud.clientIdHint":`Create a public client app in Azure AD. Browser login needs Authentication → Add platform “Mobile and desktop applications” with the redirect URI shown below (exact match). Add Graph delegated scopes offline_access, User.Read, Files.ReadWrite.`,"cloud.clientIdSaved":`Client ID saved.`,"cloud.clientIdSecretSaved":`Client ID and client secret saved.`,"cloud.clientSecret":`Client secret (optional)`,"cloud.clientSecretPlaceholder":`Only if Azure requires client_secret`,"cloud.clientSecretSet":`Secret saved (leave empty and save to clear; type a new value to replace)`,"cloud.clientSecretHint":`Preferred: Authentication → Allow public client flows = Yes (no secret). For Web apps, create a client secret under Certificates & secrets, paste here, then Save.`,"cloud.azurePortal":`Azure app registrations`,"cloud.azureSteps":`Public client flows OR client secret · redirect URI exact match · Graph scopes`,"cloud.redirectUriTitle":`Register this exact redirect URI in Azure`,"cloud.redirectUriHint":`Authentication → Add a platform → Mobile and desktop applications → custom redirect URI (must match exactly, including port):`,"cloud.redirectUriWhere":`Do not use #cloud, port 10100, or https. Save, wait ~1 minute, then sign in.`,"cloud.loginTitle":`Sign in to Microsoft`,"cloud.loginHint":`Register the redirect URI above in Azure first, then use browser sign-in.`,"cloud.login":`Sign in with Microsoft`,"cloud.loginDevice":`Device code (advanced)`,"cloud.logout":`Sign out`,"cloud.loginOk":`Signed in as {account}`,"cloud.loginFailed":`Microsoft sign-in failed`,"cloud.logoutOk":`Signed out of OneDrive.`,"cloud.browserLoginTitle":`Browser sign-in`,"cloud.browserLoginHint":`Complete Microsoft sign-in in the opened tab, then return here.`,"cloud.openAuthPage":`Open sign-in page`,"cloud.redirectUri":`Loopback redirect`,"cloud.deviceCodeTitle":`Device code`,"cloud.deviceCodeHint":`Open the link, enter this code, then approve access:`,"cloud.waitingAuth":`Waiting for Microsoft approval…`,"cloud.transferTitle":`Push / pull`,"cloud.transferHint":`Push uploads config to OneDrive. Pull overwrites this machine’s ~/.opencodex from the cloud snapshot.`,"cloud.passphrase":`Vault passphrase`,"cloud.passphrasePlaceholder":`Min 8 characters (encrypts oauth tokens)`,"cloud.passphraseShort":`Passphrase must be at least 8 characters when the vault is enabled.`,"cloud.includeVault":`Include encrypted token vault (oauth.json / auth.json)`,"cloud.includeUsage":`Include usage / logs DBs (larger)`,"cloud.push":`Push to OneDrive`,"cloud.pull":`Pull from OneDrive`,"cloud.pushOk":`Pushed: {files}`,"cloud.pullOk":`Pulled: {files}`,"cloud.pullConfirm":`Pull will overwrite local OpenCodex config and auth files from OneDrive. Continue?`,"cloud.securityNote":`Plain config is stored under OneDrive/OpenCodex/sync/. OAuth tokens only go into the AES-256-GCM vault when you set a passphrase. Never share your client secret or vault passphrase.`,"grok.title":`Grok Build`,"grok.subtitle":`xAI account quota and Grok Build model wiring.`,"grok.loading":`Loading Grok status…`,"grok.loadFail":`Could not read the Grok config.`,"grok.notConfiguredTitle":`Grok Build is not wired up`,"grok.notConfiguredHint":`Start or restart the proxy with Grok installed and opencodex writes a managed block into:`,"grok.endpoint":`Endpoint`,"grok.colModel":`Model`,"grok.colAlias":`Grok alias`,"grok.colContext":`Context`,"grok.groupNative":`Native models`,"grok.groupRouted":`Routed models`,"grok.enabledCount":`{on} of {total} registered`,"grok.saved":`Selection saved.`,"grok.savedApplied":`Selection saved and written to your Grok config.`,"grok.saveFailed":`Could not save the Grok selection.`,"grok.applyFailed":`Selection saved, but the Grok config could not be updated.`,"grok.applySkipped":`Selection saved. The Grok config was not changed.`,"grok.saveApply":`Save & apply`,"grok.saving":`Saving…`,"grok.applying":`Applying…`,"grok.unsaved":`Unsaved changes`,"grok.upToDate":`Selection is up to date`,"grok.toggleModel":`Register {id} with Grok`,"claudeDesktop.available":`Available`,"claudeDesktop.defaultBadge":`Default`,"claudeDesktop.supports1m":`1M`,"claudeDesktop.unavailable":`Unavailable`,"claudeDesktop.contextM":`{n}M context`,"claudeDesktop.contextK":`{n}k context`,"claudeDesktop.contextUnknown":`context unknown`,"claudeDesktop.alias":`Alias`,"claudeDesktop.useAsDefault":`Use as {family} default`,"claudeDesktop.moveTo":`Move to`,"claudeDesktop.move":`Move`,"claudeDesktop.status.applied":`Applied to Desktop`,"claudeDesktop.status.stale":`Config stale — re-apply`,"claudeDesktop.status.notApplied":`Not applied`,"claudeDesktop.status.notActiveProfile":`Desktop is serving another profile — re-apply`,"claudeDesktop.health.lastRequest":`Last request`,"claudeDesktop.health.stats":`{count} req / {errors} err`,"claudeDesktop.effort.supported":`effort`,"claudeDesktop.effort.displayOnly":`effort (display only)`,"nav.pi":`Pi`,"pi.title":`Pi`,"pi.subtitle":`Manage Pi models, settings, packages, and extensions. Only the opencodex provider block is written to models.json.`,"pi.loading":`Loading Pi status…`,"pi.loadFail":`Could not read Pi status.`,"pi.actionOk":`Done.`,"pi.actionFail":`Action failed.`,"pi.applySkipped":`Pi apply was skipped (policy or missing install).`,"pi.statusTitle":`Install status`,"pi.binary":`pi binary`,"pi.agentDir":`Agent directory`,"pi.modelsFile":`models.json`,"pi.missing":`not found`,"pi.modelsTitle":`Models (providers.opencodex)`,"pi.modelsHint":`Apply writes only providers.opencodex from the live catalog. Your other providers stay untouched.`,"pi.apply":`Apply models`,"pi.applying":`Applying…`,"pi.applied":`Pi models applied.`,"pi.remove":`Remove opencodex block`,"pi.removing":`Removing…`,"pi.removed":`Pi opencodex provider removed.`,"pi.modelsNotPresentTitle":`opencodex not in models.json yet`,"pi.modelsNotPresentHint":`Click Apply to register the current catalog as providers.opencodex.`,"pi.endpoint":`Endpoint`,"pi.modelCount":`{count} models registered`,"pi.moreModels":`…and {n} more`,"pi.settingsTitle":`Settings`,"pi.settingsHint":`Curated subset of ~/.pi/agent/settings.json. Unknown keys are preserved.`,"pi.saveSettings":`Save settings`,"pi.savingSettings":`Saving…`,"pi.settingsSaved":`Pi settings saved.`,"pi.defaultProvider":`Default provider`,"pi.defaultModel":`Default model`,"pi.thinking":`Thinking level`,"pi.theme":`Theme`,"pi.projectTrust":`Project trust default`,"pi.hideThinking":`Hide thinking blocks`,"pi.quietStartup":`Quiet startup`,"pi.unset":`(unset)`,"pi.otherKeys":`{count} other keys left untouched`,"pi.packagesTitle":`Packages`,"pi.packagesHint":"Install runs `pi install` on the server machine. Packages execute with full system access — review sources before installing.","pi.install":`Install`,"pi.installing":`Installing…`,"pi.packageInstalled":`Package install finished.`,"pi.packageRemoved":`Package removed.`,"pi.removePackage":`Remove`,"pi.noPackages":`No packages in settings.json.`,"pi.extensionsTitle":`Extensions`,"pi.extensionsHint":`Auto-discovered under ~/.pi/agent/extensions plus paths listed in settings. Source editing is not available here.`,"pi.noExtensions":`No extensions found.`,"pi.cliHint":`CLI: ocx pi status | apply | settings | packages · launch with ocx pi`,"grok.modelsSection":`Grok Build models`,"grok.modelsSectionSub":`Choose which opencodex models appear in Grok Build, then save and apply.`,"grok.account.sectionAria":`xAI account and quota`,"grok.account.title":`xAI account quota`,"grok.account.subtitle":`Same depth as Codex Auth: active Grok account, plan, and usage bars. No need to open Providers.`,"grok.account.refreshQuota":`Refresh quota`,"grok.account.refreshing":`Refreshing…`,"grok.account.addAccount":`Add account`,"grok.account.login":`Log in with xAI`,"grok.account.loggingIn":`Waiting for login…`,"grok.account.cancelLogin":`Cancel login`,"grok.account.loading":`Loading accounts…`,"grok.account.empty":`No xAI account yet. Log in to see plan and quota bars here.`,"grok.account.loadFail":`Could not load xAI accounts.`,"grok.account.loginFail":`xAI login failed to start.`,"grok.account.loginOk":`xAI login succeeded.`,"grok.account.loginCancelled":`xAI login cancelled.`,"grok.account.select":`Select account`,"grok.account.switched":`Active xAI account updated.`,"grok.account.switchFail":`Could not switch xAI account.`,"grok.account.removeConfirm":`Remove this xAI account from opencodex?`,"grok.account.removeFail":`Could not remove account.`,"grok.account.removed":`Account removed.`,"grok.account.unnamed":`xAI account`,"clients.title":`Clients`,"clients.subtitle":`See which base URL and model each coding agent is actually using on disk — useful when CC Switch, ocx inject, and launchers stack.`,"clients.refresh":`Refresh`,"clients.loading":`Loading client status…`,"clients.loadFail":`Could not read client status.`,"clients.proxyTitle":`Proxy`,"clients.proxyRunning":`Proxy running`,"clients.proxyStopped":`Proxy not detected`,"clients.generatedAt":`Checked {time}`,"clients.readOnlyHint":`Read-only. This page never rewrites client configs or shows API keys.`,"clients.tableTitle":`Effective client routing`,"clients.col.client":`Client`,"clients.col.verdict":`Verdict`,"clients.col.baseUrl":`Base URL`,"clients.col.model":`Model`,"clients.col.launcher":`Launcher`,"clients.col.switcher":`Switcher profile`,"clients.col.details":`Details`,"clients.col.configPaths":`Config paths`,"clients.col.notes":`Notes`,"clients.verdict.ocx":`via ocx`,"clients.verdict.direct":`direct`,"clients.verdict.mixed":`mixed`,"clients.verdict.missing":`missing`,"clients.verdict.unknown":`unknown`,"clients.manage":`Manage`,"clients.noNotes":`No notes`,"clients.exportHint":`Need a generated config template instead? Open the API page export panel.`},Ne={en:Me,de:{"nav.dashboard":`Übersicht`,"nav.startup":`Startsicherheit`,"nav.providers":`Anbieter`,"nav.models":`Modelle`,"nav.combos":`Combos`,"nav.subagents":`Sub-Agenten`,"nav.logs":`Protokolle & Diagnose`,"nav.usage":`Nutzung`,"common.github":`GitHub`,"sidebar.star":`Auf GitHub mit Stern markieren`,"sidebar.starred":`Auf GitHub markiert`,"sidebar.starUnauthenticated":`GitHub öffnen, um zu markieren (gh CLI nicht angemeldet)`,"sidebar.starFailed":`Markieren über gh fehlgeschlagen. GitHub wird stattdessen geöffnet.`,"sidebar.updateAvailable":`Update verfügbar: {version}`,"sidebar.checkUpdate":`Nach Updates suchen`,"common.save":`Speichern`,"common.saving":`Speichern…`,"common.cancel":`Abbrechen`,"common.discard":`Verwerfen`,"common.remove":`Entfernen`,"common.loading":`Lädt…`,"common.retry":`Wiederholen`,"theme.label":`Design`,"theme.light":`Hell`,"theme.dark":`Dunkel`,"theme.system":`System`,"lang.label":`Sprache`,"provider.name.volcengine":`Volcengine Ark`,"provider.name.volcengineCodingPlan":`Volcengine Ark Coding-Tarif`,"provider.name.volcengineAgentPlan":`Volcengine Ark Agent-Tarif`,"errorBoundary.title":`Seite konnte nicht geladen werden`,"errorBoundary.message":`In diesem Bereich ist ein Darstellungsfehler aufgetreten. Lade ihn neu, um es noch einmal zu versuchen.`,"errorBoundary.details":`Fehler`,"errorBoundary.reload":`Neu laden`,"startup.title":`Startsicherheit`,"startup.subtitle":`Prüft, ob Codex opencodex nach einem Neustart erreicht, bevor lokales Proxy-Routing in einer Wiederverbindungsschleife endet.`,"startup.refresh":`Aktualisieren`,"startup.backToDashboard":`Zurück zum Dashboard`,"startup.loading":`Startschutz wird geprüft…`,"startup.error":`Startschutz konnte nicht gelesen werden.`,"startup.staleData":`Die aktuelle Prüfung ist fehlgeschlagen. Die Werte unten sind veraltet und kein Nachweis für Schutz.`,"startup.status.native":`Natives Routing`,"startup.status.protected":`Neustartgeschützt`,"startup.status.atRisk":`Aktion erforderlich`,"startup.summary.native":`Codex ist nicht vom lokalen Proxy abhängig`,"startup.summary.protected":`opencodex ist nach einem Neustart verfügbar`,"startup.summary.atRisk":`Codex kann nach einem Neustart den Modellzugriff verlieren`,"startup.riskDetail":`Codex ist auf den lokalen Proxy festgelegt, aber weder ein dauerhafter Dienst noch ein intakter Launcher-Shim startet ihn erneut.`,"startup.riskDetailCustomLocal":`Codex verwendet ein benutzerdefiniertes lokales Gateway. opencodex kann dessen Neustart-Lebenszyklus weder verwalten noch prüfen.`,"startup.riskDetailWindowsShim":`Der Launcher-Shim schützt unterstützte CLI-Skripte, aber Codex Desktop und direkte codex.exe-Aufrufe können ihn unter Windows umgehen.`,"startup.safeDetail":`Routing und Startmechanismus stimmen überein. Nach einem Neustart sollte kein manuelles ocx start nötig sein.`,"startup.routing":`Codex-Routing`,"startup.routing.proxy":`Lokaler Proxy`,"startup.routing.native":`Natives OpenAI`,"startup.routing.customLocal":`Benutzerdefiniertes lokales Gateway`,"startup.routing.customRemote":`Benutzerdefiniertes Remote-Gateway`,"startup.routing.unknown":`Unbekanntes oder ungültiges Routing`,"startup.restartProtection":`Neustartschutz`,"startup.preference":`Start bei Bedarf`,"startup.enabled":`Aktiviert`,"startup.disabled":`Deaktiviert`,"startup.protection.service":`Hintergrunddienst`,"startup.protection.shim":`Launcher-Shim`,"startup.protection.none":`Nicht installiert`,"startup.details":`Schutzdetails`,"startup.service":`Hintergrunddienst`,"startup.serviceHint":`Startet bei der Anmeldung und startet den Proxy nach einem Absturz neu.`,"startup.installed":`Installiert`,"startup.notInstalled":`Nicht installiert`,"startup.unsupported":`Nicht unterstützt`,"startup.shim":`Codex-Launcher-Shim`,"startup.shimHint":`Führt ocx ensure aus, wenn ein unterstützter Codex-Skript-Launcher startet.`,"startup.healthy":`Intakt`,"startup.cliOnly":`Nur CLI`,"startup.stale":`Veraltet`,"startup.viable":`Einsatzbereit`,"startup.unhealthy":`Installiert, aber fehlerhaft`,"startup.conflict":`Dienstkonflikt`,"startup.installedDisabled":`Installiert, aber deaktiviert`,"startup.install":`Installieren`,"startup.installing":`Wird installiert…`,"startup.repair":`Reparieren`,"startup.repairing":`Wird repariert…`,"startup.serviceInstalled":`Hintergrunddienst wurde erfolgreich installiert.`,"startup.serviceRepaired":`Hintergrunddienst wurde erfolgreich repariert.`,"startup.shimInstalled":`Codex-Launcher-Shim wurde erfolgreich installiert.`,"startup.shimRepaired":`Codex-Launcher-Shim wurde erfolgreich repariert.`,"startup.installFailed":`Installation fehlgeschlagen:`,"startup.tray.title":`Windows-Infobereich`,"startup.tray.hint":`Installiert ein Anmeldesymbol für Proxy-Start, Stopp, Neustart, Dashboard und Status per Klick.`,"startup.tray.login":`Infobereich bei Windows-Anmeldung starten`,"startup.tray.notProtection":`Das Symbol ist nur eine Steuerung, kein Neustartschutz. Für unbeaufsichtigte Wiederherstellung bleibt ein funktionsfähiger Hintergrunddienst nötig.`,"startup.tray.running":`Wird ausgeführt`,"startup.tray.stopped":`Installiert, ausgeblendet`,"startup.tray.stale":`Reparatur erforderlich`,"startup.tray.notInstalled":`Nicht installiert`,"startup.tray.loading":`Wird geprüft…`,"startup.tray.unavailable":`Status nicht verfügbar`,"startup.tray.install":`Installieren und anzeigen`,"startup.tray.start":`Symbol anzeigen`,"startup.tray.stop":`Symbol beenden`,"startup.tray.uninstall":`Anmeldesymbol entfernen`,"startup.tray.error":`Die Windows-Infobereichsaktion ist fehlgeschlagen. Details: ocx tray status.`,"startup.recovery":`Reparaturoptionen`,"startup.recoveryHint":`Nutze die Ein-Klick-Installation oben oder kopiere einen Befehl für die manuelle Reparatur. Für Codex Desktop und Windows-Programme wird der Hintergrunddienst empfohlen.`,"startup.command.service":`Empfohlen: dauerhafter Hintergrunddienst`,"startup.command.shim":`Alternative: CLI-Launcher-Shim`,"startup.command.native":`Ausfallsicher: natives Codex-Routing wiederherstellen`,"startup.copy":`Kopieren`,"startup.copied":`Kopiert`,"startup.recommended":`Empfohlene Reparatur: {cmd}`,"startup.navRisk":`Der Startschutz erfordert Aufmerksamkeit`,"startup.codexRuntime.clampHidden":`Einige Reasoning-Effort-Optionen wurden ausgeblendet, weil OpenCodex Codex {version} verwendet hat.`,"startup.codexRuntime.clampHiddenWithEfforts":`Einige Reasoning-Effort-Optionen wurden ausgeblendet, weil OpenCodex Codex {version} verwendet hat (entfernt: {efforts}).`,"startup.codexRuntime.olderBinary":`OpenCodex verwendet eine ältere Codex-Binary ({version}). Eine neuere Installation ist verfügbar.`,"dash.subtitle":`Live-Status des lokalen opencodex-Proxys, seiner Anbieter und der in Codex gerouteten Modelle.`,"dash.workspace.overview":`Übersicht`,"dash.workspace.sections":`Abschnitte`,"dash.status":`Status`,"dash.online":`Online`,"dash.offline":`Offline`,"dash.version":`Version`,"dash.versionLocal":`Lokale Version`,"dash.versionRemote":`npm aktuell`,"dash.installSource":`Quellcode`,"dash.installNpm":`npm global`,"dash.installBun":`bun global`,"dash.installUnknown":`Installation unbekannt`,"dash.uptime":`Laufzeit`,"dash.providers":`Anbieter`,"dash.tokens30d":`Tokens (30d)`,"dash.coverage":`{pct} Abdeckung`,"dash.mem.title":`Speicherbeobachtung`,"dash.mem.hint":`Schreibgeschützte Laufzeitdiagnose. Beobachteter Speicher ist max(RSS, external, ArrayBuffers), damit Windows-Working-Set-Trimming gebundenen Speicher nicht versteckt.`,"dash.mem.rss":`Resident Set (RSS)`,"dash.mem.jsHeap":`JS-Heap belegt`,"dash.mem.jsHeapArena":`Arena {total}`,"dash.mem.pressure":`Gegen Warnschwelle`,"dash.mem.pressureOf":`{pct}% der Schwelle`,"dash.mem.pressureUnknown":`Keine Schwelle gemeldet`,"dash.mem.jscHeap":`JSC-Heap`,"dash.mem.external":`External`,"dash.mem.arrayBuffers":`ArrayBuffers`,"dash.mem.observed":`Beobachtet`,"dash.mem.runtime":`Laufzeit-Zähler`,"dash.mem.growth":`Beobachtete Drift / Stunde`,"dash.mem.perHour":`/Std`,"dash.mem.store":`Fortsetzungsspeicher`,"dash.mem.storeHint":`Proxy-Cache für previous_response_id. Steigende Gesamtbytes bei steigendem Heap deuten auf Konversationsspeicherung hin, nicht auf den Laufzeit-Allokator.`,"dash.mem.storeEntries":`Einträge`,"dash.mem.storeTotal":`Gesamt`,"dash.mem.storeLargest":`Größter`,"dash.mem.storeOldest":`Ältester`,"dash.mem.threshold":`Warnschwelle`,"dash.mem.lastWarn":`Letzte Warnung`,"dash.mem.never":`Nie`,"dash.mem.details":`Details`,"dash.mem.unavailable":`Speicherdiagnose nicht verfügbar (älterer Proxy).`,"dash.mem.inFlight":`Laufende Anfragen`,"dash.mem.restart":`Abwarten & neu starten`,"dash.mem.restartConfirm":`Auf {count} laufende Anfrage(n) warten, dann neu starten (bis zu {seconds}s; Rest wird bei Timeout abgebrochen).`,"dash.mem.draining":`{count} Anfrage(n) werden abgewartet… Neustart danach`,"dash.mem.reconnecting":`Proxy wird neu gestartet… warte auf Verbindung`,"dash.mem.restartFailed":`Abwarten & Neustart fehlgeschlagen. Prüfen Sie, ob der Proxy läuft.`,"dash.mem.restartNoSupervisor":`Kein Neustartschutz erkannt. Der Proxy bleibt nach dem Neustart möglicherweise aus, bis Sie ihn erneut starten.`,"dash.activeProviders":`Aktive Anbieter`,"dash.noProviders":`Keine Anbieter konfiguriert. Führe {cmd} aus.`,"dash.col.name":`Name`,"dash.col.adapter":`Adapter`,"dash.col.baseUrl":`Basis-URL`,"dash.col.model":`Modell`,"dash.modelsNoResults":`Keine Modelle entsprechen deiner Suche.`,"dash.availableModels":`Verfügbare Modelle`,"dash.noModels":`Keine Modelle gefunden. Prüfe die API-Schlüssel des Anbieters.`,"dash.cannotConnect":`Keine Verbindung zum Proxy. Läuft er?`,"dash.runStart":`Führe {cmd} aus, um den Proxy zu starten.`,"dash.stop":`Proxy stoppen`,"dash.stopConfirm":`Proxy stoppen und natives Codex wiederherstellen?`,"dash.stopFailed":`Proxy konnte nicht gestoppt werden (HTTP {status}).`,"dash.stopping":`Wird gestoppt…`,"dash.codexAutoStart":`opencodex mit Codex starten`,"dash.codexAutoStartHint":`Erlaubt einem installierten Launcher-Shim, ocx ensure auszuführen. Diese Einstellung installiert keinen Neustartschutz; prüfe den effektiven Zustand unter Startsicherheit.`,"dash.searchModel":`Such-Sidecar-Modell`,"dash.searchModelHint":`Modell für web_search bei nicht über OpenAI gerouteten Modellen. Erfordert ChatGPT-Login.`,"dash.searchReasoning":`Such-Reasoning-Aufwand`,"dash.visionModel":`Vision-Sidecar-Modell`,"dash.visionModelHint":`Modell zur Beschreibung von Bildern für nur-Text-Routen. Erfordert ChatGPT-Login.`,"dash.webSearchSidecar":`Websuche-Sidecar`,"dash.webSearchSidecarHint":`Backend und Modell für die Websuche gerouteter Modelle auswählen.`,"dash.visionSidecar":`Vision-Sidecar`,"dash.visionSidecarHint":`Backend und Modell zur Bildbeschreibung für reine Textmodelle auswählen.`,"dash.shadowCallIntercept":`Shadow-Call-Abfangen`,"dash.shadowCallInterceptHint":`Fängt die Hintergrund-Hilfsaufrufe der Codex-App ({models}) ab und leitet sie an das gewählte Modell um. Effort wird auf low fixiert.`,"dash.shadowCallWarning":`⚠ Bei Aktivierung werden ALLE Anfragen an {models} durch das gewählte Modell ersetzt.`,"dash.shadowCallOriginal":`Original`,"dash.shadowCallModel":`Ersatzmodell`,"dash.shadowCallTooltip":`Die Codex-App ruft im Hintergrund ein Hilfsmodell für Titelgenerierung, Commit-Nachrichten und Skill-Orchestrierung auf. Das Modell wechselt zwischen Client-Versionen, daher fängt opencodex diesen Satz ab: {models}.`,"models.shadowCallIntercept":`Shadow-Call-Abfangen`,"models.shadowCallInterceptHint":`Fängt die Hintergrund-Hilfsaufrufe der Codex-App ({models}) ab und leitet sie an das gewählte Modell um.`,"dash.sidecarBackend":`Backend`,"dash.sidecarModel":`Modell`,"dash.backendAuto":`Automatisch`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`Sidecar-Einstellungen gespeichert. Angewendet bei der nächsten Anfrage.`,"dash.sidecarSaveFailed":`Sidecar-Einstellungen konnten nicht gespeichert werden.`,"dash.injectionLabel":`Sub-Agent-Delegation`,"dash.injectionHint":`Wähle das Modell, an das Codex Sub-Agent-Arbeit übergibt. Wo diese Wahl gilt, entscheiden die beiden Schalter unten.`,"dash.syncCodexSubagentDefaults":`Auch als Codex-Standard speichern`,"dash.syncCodexSubagentDefaultsHint":`Eingeschaltet wird die Wahl von oben in Codex' eigene Konfiguration geschrieben, sodass auch neue Aufgaben mit diesem Modell starten. Ausgeschaltet wird sie nur hier gemerkt. Wirksam beim nächsten Sync oder Neustart; deine selbst geschriebenen [agents]-Einstellungen bleiben unberührt.`,"dash.multiAgentGuidance":`Codex sagen, wie Arbeit aufgeteilt wird`,"dash.multiAgentGuidanceHint":`Schickt Codex eine kurze Notiz, wie Arbeit an Sub-Agenten übergeben werden soll. Auf v2 nennt sie die verfügbaren Modelle und das bevorzugte; auf v1 wirkt sie nur bei Reasoning-Effort max oder ultra. Ausgeschaltet wird keine Notiz angehängt.`,"dash.injectionNone":`Keine`,"dash.injectionEffortLabel":`Reasoning-Aufwand`,"dash.injectionEffortNone":`Modell-Standard`,"dash.effortCapLabel":`V2 Ultra Effort-Limit`,"dash.subagentEffortCapLabel":`V2 Sub-Agent Effort-Limit`,"dash.effortCapHelp":`Begrenzt die Reasoning-Intensität für V2-Ultra-Modus-Turns. Wenn gesetzt, werden eingehende Max-Anfragen (aus dem Ultra-Modus) auf das gewählte Niveau begrenzt. Das Sub-Agent-Limit gilt nur für erzeugte Kind-Agenten. Limits senken die Intensität nur, sie erhöhen sie nie. Wenn ein Modell das gewählte Niveau nicht unterstützt, wird automatisch auf das nächste unterstützte Niveau herabgesetzt.`,"dash.effortCapNone":`Kein Limit`,"dash.maintenance":`Wartung`,"dash.maintenanceHint":`Aktualisiere Codex’ Modellkatalog oder installiere eine neuere opencodex-Version.`,"dash.syncModels":`Modelle synchronisieren`,"dash.syncing":`Synchronisiere…`,"dash.syncOk":`Synchronisierung abgeschlossen. {count} Modell(e) angehängt.`,"dash.syncStaleHint":`Falls Codex weiterhin eine alte Liste zeigt, starte den langlebigen App-Server neu ({cmd}).`,"dash.syncFailed":`Synchronisierung fehlgeschlagen: {error}`,"dash.projectConfigTitle":`Projekt-Codex-Konfig umgeht OpenCodex`,"dash.projectConfigHint":`Diese repo-lokalen Einstellungen überschreiben den OpenCodex-Proxy (z. B. direkt zu OpenCode Go routen). Entferne sie, damit die Routing aus ~/.codex/config.toml in diesem Projekt greift.`,"dash.checkUpdate":`Update prüfen`,"dash.updateTitle":`opencodex aktualisieren`,"dash.updateDesc":`Prüfe npm auf den ausgewählten Kanal und wähle dann, ob der Proxy nach der Installation neu gestartet wird.`,"dash.updateChannel":`Kanal`,"dash.updateChecking":`Updates werden geprüft…`,"dash.updateInstalled":`Installiert`,"dash.updateLatest":`Neueste`,"dash.updateAvailable":`Update verfügbar`,"dash.updateCurrent":`Auf dem neuesten Stand`,"dash.updateCommand":`Befehl`,"dash.updateSource":`Dies ist ein Source-Checkout. Aktualisiere es im Terminal mit dem angezeigten Befehl.`,"dash.updateUnavailable":`Die neueste Version konnte nicht von npm gelesen werden. Versuche es später erneut.`,"dash.updateRetry":`Wiederholen`,"dash.updateRecheck":`Erneut prüfen`,"dash.updateCannotAuto":`Ein-Klick-Update ist nicht verfügbar ({reason}).`,"dash.updateReason.source_checkout":`Quellcode-Checkout`,"dash.updateReason.latest_unavailable":`npm-Registry nicht erreichbar`,"dash.updateReason.already_latest":`bereits auf dem neuesten Stand`,"dash.updateReason.unknown":`Update nicht verfügbar`,"dash.updateRestart":`Nach Update neu starten`,"dash.updateRestartHint":`Empfohlen. Die aktuelle GUI läuft weiter mit altem Code, bis der Proxy neu startet.`,"dash.runUpdate":`Aktualisieren`,"dash.updateReconnecting":`Warten auf den neu gestarteten Proxy…`,"dash.updateStatus.running":`opencodex wird aktualisiert.`,"dash.updateStatus.restarting":`Update installiert. Proxy wird neu gestartet.`,"dash.updateStatus.succeeded":`Update abgeschlossen.`,"dash.updateStatus.failed":`Update fehlgeschlagen.`,"prov.subtitle":`Konfiguriere die Upstream-Anbieter, die opencodex in Codex routet. Melde dich mit einem Konto an, füge einen Anbieter hinzu oder bearbeite die Rohkonfiguration.`,"prov.add":`Anbieter hinzufügen`,"prov.editJson":`JSON bearbeiten`,"prov.accountLogin":`Konto-Login`,"prov.noOauth":`Keine OAuth-Anbieter verfügbar.`,"prov.loggedIn":`angemeldet`,"prov.notLoggedIn":`nicht angemeldet`,"prov.logout":`Abmelden`,"prov.login":`Anmelden`,"prov.loginWith":`Anmelden mit {provider}`,"prov.waitingBrowser":`Warten auf Browser…`,"prov.didntOpen":`Hat sich nicht geöffnet? Hier klicken`,"prov.copyLink":`Link kopieren`,"prov.linkCopied":`Kopiert`,"prov.linkCopyUnavailable":`Zwischenablage nicht verfügbar`,"prov.deviceCode":`Gerätecode`,"prov.copyCode":`Code kopieren`,"prov.codeCopied":`Code kopiert`,"prov.editAlias":`Alias bearbeiten`,"prov.aliasPrompt":`Anzeigename (leer lassen zum Entfernen)`,"prov.aliasSaved":`Alias gespeichert`,"prov.aliasSaveFailed":`Alias konnte nicht gespeichert werden`,"prov.accountId":`ID`,"prov.pasteRedirect":`Redirect-URL oder Code einfügen`,"prov.pasteRedirectHint":`Zeigt der Browser einen localhost-Fehler, kopiere die vollständige URL aus der Adressleiste und füge sie hier ein (oder den Autorisierungscode).`,"prov.pasteSubmit":`Senden`,"prov.pasteSubmitting":`Wird gesendet…`,"prov.pasteOk":`Code gesendet — Anmeldung wird abgeschlossen…`,"prov.pasteFail":`Code konnte nicht gesendet werden: {error}`,"prov.port":`Port`,"prov.default":`Standard`,"prov.loadingConfig":`Lädt…`,"prov.saved":`Gespeichert! Proxy neu starten, um anzuwenden.`,"prov.loadConfigFail":`Konfiguration konnte nicht geladen werden`,"prov.invalidJson":`Ungültiges JSON`,"prov.saveFailed":`Speichern fehlgeschlagen`,"prov.loginFailStart":`{provider}-Login konnte nicht gestartet werden`,"prov.loginError":`{provider}-Login-Fehler: {error}`,"prov.loginRequestFail":`{provider}-Login-Anfrage fehlgeschlagen`,"prov.loginCancelled":`{provider}-Login abgebrochen`,"prov.loginTimeout":`{provider}-Login abgelaufen — Browser geschlossen oder nicht beendet. Erneut versuchen.`,"prov.loginOk":`Bei {provider} angemeldet. Führe {cmd} aus (oder es gilt live), um seine Modelle aufzulisten.`,"oauthTos.highTitle":`{provider}: Risiko bei Abo-OAuth`,"oauthTos.elevatedTitle":`{provider}: inoffizielle OAuth-Brücke`,"oauthTos.anthropicBody":`Die direkte Wiederverwendung von Claude-Abo-OAuth-Tokens über einen Drittanbieter-Proxy wie OpenCodex ist keine von Anthropic unterstützte Integration und kann zu Zugriffsbeschränkungen führen. Unterstützte Agent-SDK-Integrationen, die Claude-Abos verwenden, sind davon getrennt.`,"oauthTos.highBody":`OpenCodex verbindet {provider} über einen OAuth-Pfad eines Drittanbieters. Bei nicht unterstützter Nutzung kann der Zugriff eingeschränkt oder gesperrt werden.`,"oauthTos.elevatedBody":`OpenCodex verbindet {provider} über einen inoffiziellen OAuth-Pfad. Nutze nach Möglichkeit den offiziellen Client; ungewöhnlicher oder automatisierter Traffic kann als Missbrauch gewertet und der Zugriff eingeschränkt oder gesperrt werden.`,"oauthTos.saferPath":`Sicherere Option: Hinterlege stattdessen einen API-Schlüssel in OpenCodex.`,"oauthTos.acknowledge":`Ich verstehe das Risiko und möchte trotzdem mit OAuth fortfahren.`,"oauthTos.continue":`Mit OAuth fortfahren`,"prov.logoutOk":`Von {provider} abgemeldet.`,"prov.logoutFail":`Abmeldung von {provider} fehlgeschlagen. Der Kontostatus bleibt unverändert.`,"prov.removed":`"{name}" entfernt.`,"prov.removedDefault":`"{name}" entfernt. Standardanbieter ist jetzt "{defaultProvider}".`,"prov.removeFail":`"{name}" konnte nicht entfernt werden.`,"prov.removeLastProvider":`Der Standardanbieter kann nicht entfernt werden, wenn kein anderer aktivierter Anbieter Standard werden kann.`,"prov.removeHasDependentCombos":`Entferne oder aktualisiere zuerst diese abhängigen Combos: {combos}.`,"prov.setDefault":`Als Standard festlegen`,"prov.setDefaultSuccess":`"{name}" ist jetzt der Standardanbieter.`,"prov.setDefaultFail":`"{name}" konnte nicht als Standardanbieter festgelegt werden.`,"prov.defaultDisabled":`Aktiviere diesen Anbieter, bevor du ihn als Standard festlegst.`,"prov.updateFail":`Dieser Anbieter konnte nicht aktualisiert werden.`,"prov.networkError":`Netzwerkfehler. Prüfe, ob der Proxy läuft, und versuche es erneut.`,"prov.added":`"{name}" hinzugefügt. Sofort aktiv — führe {cmd} aus (oder starte neu), um seine Modelle in Codex’ Auswahl zu listen.`,"prov.removeConfirm":`Anbieter "{name}" entfernen? Seine Modelle verschwinden aus Codex’ Auswahl.`,"prov.hasApiKey":`API-Schlüssel konfiguriert`,"prov.hasHeaders":`benutzerdefinierte Header konfiguriert`,"prov.accounts":`Konten ({n})`,"prov.accountsAria":`{name}-Konten umschalten`,"prov.accountActive":`Aktiv`,"prov.accountReauth":`Erneut anmelden`,"prov.reauthenticate":`Erneut authentifizieren`,"prov.reauthAccountMissing":`Ausgewähltes Konto nach dem Login nicht gefunden`,"prov.reauthIdentityMismatch":`Angemeldetes Konto stimmt nicht mit dem ausgewählten Konto überein`,"prov.accountAdd":`Konto hinzufügen`,"prov.accountNoLabel":`Konto {id}`,"prov.accountSwitchTitle":`Dieses Konto verwenden`,"prov.accountSwitched":`Zu {email} gewechselt.`,"prov.accountSwitchFail":`Konto-Wechsel fehlgeschlagen`,"prov.accountRemoved":`{email} entfernt.`,"prov.accountRemoveFail":`{email} konnte nicht entfernt werden. Das Konto bleibt unverändert.`,"prov.accountRemoveAria":`{email} entfernen`,"prov.accountRemoveConfirm":`Konto {email} entfernen? Sein Login wird aus diesem Proxy gelöscht.`,"prov.keyAdd":`API-Schlüssel hinzufügen`,"prov.keyAdded":`API-Schlüssel zu {name} hinzugefügt.`,"prov.keyAddFail":`API-Schlüssel konnte nicht hinzugefügt werden`,"prov.keyPlaceholder":`API-Schlüssel einfügen`,"prov.keySwitchTitle":`Diesen Schlüssel verwenden`,"prov.keySwitched":`Zu Schlüssel {key} gewechselt.`,"prov.keySwitchFail":`Schlüssel-Wechsel fehlgeschlagen`,"prov.keyRemoved":`Schlüssel {key} entfernt.`,"prov.keyRemoveAria":`Schlüssel {key} entfernen`,"prov.keyRemoveConfirm":`API-Schlüssel {key} entfernen? Er wird aus der Proxy-Konfiguration gelöscht.`,"prov.activeBadge":`Aktiv`,"prov.disabledBadge":`Deaktiviert`,"prov.defaultBadge":`Standard`,"prov.enable":`Aktivieren`,"prov.disable":`Deaktivieren`,"prov.enabled":`"{name}" aktiviert. Seine Modelle können wieder in Codex erscheinen.`,"prov.disabled":`"{name}" deaktiviert. Einstellungen bleiben erhalten, aber seine Modelle sind verborgen.`,"prov.enableFail":`"{name}" konnte nicht aktiviert werden.`,"prov.disableFail":`"{name}" konnte nicht deaktiviert werden.`,"prov.enableAria":`Anbieter {name} aktivieren`,"prov.disableAria":`Anbieter {name} deaktivieren`,"prov.defaultCannotDisable":`Standard-Anbieter kann nicht deaktiviert werden`,"prov.openaiAccountMode":`Codex-Kontomodus`,"prov.openaiModePool":`Pool`,"prov.openaiModeDirect":`Direkt`,"prov.openaiPoolDesc":`Standard. Wechselt mit Affinität, Kontingent, Abklingzeit und Ausfallsicherung zwischen Hauptanmeldung und hinzugefügten Konten.`,"prov.openaiDirectDesc":`Verwendet nur die aktuelle primäre Codex-Anmeldung. Gespeicherte Pool-Konten werden weder gelesen noch gewechselt.`,"prov.openaiModeSaved":`OpenAI-Kontomodus wurde zu {mode} geändert.`,"prov.openaiModeSaveFailed":`Der OpenAI-Kontomodus konnte nicht geändert werden.`,"prov.openaiApiDesc":`Verwendet nur einen OpenAI-API-Schlüssel und keine Codex-Kontodaten.`,"prov.manageCodexAccounts":`Codex-Konten verwalten`,"prov.openaiApiMissing":`API-Schlüssel erforderlich`,"prov.openaiApiSetup":`API-Schlüssel einrichten`,"models.subtitle":`Steuere, welche Modelle Codex sieht — natives GPT-Passthrough und geroutete Anbieter, nach Anbieter gruppiert (Kopfzeile zum Einklappen anklicken). Ausgeblendete Modelle fehlen in Katalog und Auswahl, bleiben aber per genauer ID aufrufbar. Änderungen gelten bei der nächsten Codex-Runde — opencodex invalidiert Codex 5-Minuten-Modell-Cache, kein Neustart nötig.`,"models.nativeGroupLabel":`OpenAI nativ`,"models.nativeHint":`Passthrough-Modelle verwenden die unter Anbieter gewählte Pool- oder Direkt-Option. Ausblenden entfernt sie aus der Codex-Auswahl (Katalogeintrag bleibt, Reaktivierung stellt exakt wieder her).`,"models.active":`{active}/{total} sichtbar`,"models.workspace.providers":`Anbieter`,"models.workspace.allProviders":`Alle Anbieter`,"models.workspace.mainAria":`Modelldetails`,"models.combosEmpty":`Noch keine Kombos konfiguriert`,"models.combosSetup":`Einrichten`,"models.combosAdd":`Kombo hinzufügen`,"models.combosActive":`{count} aktiv`,"models.allOn":`Alle an`,"models.allOff":`Alle aus`,"models.cap350k":`Limit 350k`,"models.capApplied":`Kontext-Limit angewendet — greift bei der nächsten Codex-Runde.`,"models.capSaveFailed":`Kontext-Limit konnte nicht gespeichert werden`,"models.contextCapped":`350k-Limit`,"models.contextCapLabel":`Kontext-Limit`,"models.v2Label":`Sub-Agent`,"models.shadowCallOriginal":`⚠ {models} →`,"models.v2DocsLink":`Was ist v1 / v2?`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`Alle Modelle → v1-Oberfläche`,"models.v2ModeDesc_default":`Upstream-Standard (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`Alle Modelle → v2-Oberfläche`,"models.v2Help":`Steuert die Multi-Agent-Oberfläche für alle Modelle.
16
-
17
- v1: Klassischer Single-Thread-Agent. Jedes Modell nutzt die v1-Collab-Oberfläche.
18
- base: Upstream-Standard — sol/terra nutzen v2, luna v1, andere folgen dem Codex-Feature-Flag.
19
- v2: Multi-Thread-Agent mit spawn_agent. Jedes Modell nutzt die v2-Collab-Oberfläche.
20
-
21
- Änderungen gelten für neue Sitzungen.`,"dash.multiAgent":`Sub-Agent`,"models.v2Conflict":`[agents] max_threads ist gesetzt — codex verweigert den Start; entferne es aus config.toml`,"models.v2Applied":`Sub-Agent-Modus aktualisiert — gilt für neue Sitzungen (Codex-App neu starten, um die Auswahl zu aktualisieren)`,"models.v2ThreadsLabel":`Max. Threads`,"models.v2ThreadsDefault":`Standard (4)`,"models.v2ThreadsApplied":`Thread-Limit aktualisiert — gilt für neue Sitzungen`,"models.v2ThreadsInvalid":`Thread-Limit muss eine ganze Zahl >= 1 sein`,"models.v2ThreadsApply":`Anwenden`,"models.capValue":`Limit {value}`,"models.contextCappedValue":`{value}-Limit`,"models.setAll":`Alle setzen`,"models.setAllHint":`Wendet das {value}-Kontext-Limit auf alle gerouteten Anbieter an. Native Anbieter bleiben unberührt.`,"models.collapseAll":`Alle einklappen`,"models.expandAll":`Alle ausklappen`,"models.orderHint":`Reihenfolge in der Modellauswahl: Subagents-Auswahl (in der festgelegten Reihenfolge) → übrige geroutete Modelle alphabetisch nach Anbieter, dann Modell-ID → native Modelle. Sichtbarkeitsschalter filtern nur; sie ändern diese Reihenfolge nicht.`,"models.custom":`Benutzerdefiniert…`,"models.customApply":`Anwenden`,"models.customPlaceholder":`Tokens (z. B. 420000)`,"models.customAdd":`Benutzerdefiniertes Modell hinzufügen`,"models.customAddTitle":`Benutzerdefiniertes Modell hinzufügen — {provider}`,"models.customEditTitle":`Benutzerdefiniertes Modell bearbeiten — {provider}`,"models.customAdded":`Benutzerdefiniertes Modell hinzugefügt`,"models.customUpdated":`Benutzerdefiniertes Modell aktualisiert`,"models.customDeleted":`Benutzerdefiniertes Modell gelöscht`,"models.customSaveFailed":`Benutzerdefiniertes Modell konnte nicht gespeichert werden`,"models.customSaving":`Wird gespeichert…`,"models.customAddBtn":`Hinzufügen`,"models.customEditBtn":`Aktualisieren`,"models.customEdit":`Bearbeiten`,"models.customDelete":`Löschen`,"models.customDeleteConfirm":`Modell {name} löschen?`,"models.customBadge":`Benutzerdefiniert`,"models.customSummary":`{count} benutzerdefiniert`,"models.customFieldModelId":`Modell-ID (Endpunkt-Slug)`,"models.customFieldModelIdPlaceholder":`z. B. qwen4-max-preview`,"models.customFieldDisplayName":`Anzeigename (optional)`,"models.customFieldDisplayNamePlaceholder":`z. B. Qwen 4 Max Preview`,"models.customFieldContext":`Kontextfenster`,"models.customFieldModalities":`Eingabemodalitäten`,"models.tipProvider":`Anbieter`,"models.tipContext":`Kontext`,"models.tipModalities":`Modalitäten`,"models.tipStatus":`Status`,"models.tipActive":`Aktiv`,"models.tipDisabled":`Deaktiviert`,"models.applied":`Angewendet — greift bei der nächsten Codex-Runde.`,"models.saveFailed":`Speichern fehlgeschlagen`,"models.networkError":`Netzwerkfehler — läuft der Proxy?`,"models.loadFail":`Modelle konnten nicht geladen werden — läuft der Proxy?`,"models.noRouted":`Keine gerouteten Modelle`,"models.noRoutedHint":`Melde dich zuerst bei einem Anbieter an oder füge einen hinzu.`,"models.emptyDiscovery":`Es wurden keine Modelle gefunden. Prüfe den Anbieter-Endpunkt oder füge ein statisches/eigenes Modell hinzu.`,"models.emptyDiscoveryDisabled":`Die Live-Modellerkennung ist aus und es sind keine statischen Modelle konfiguriert.`,"models.discoveryFailedBadge":`Erkennung fehlgeschlagen`,"models.discoveryFailedHttp":`Die Modellerkennung ist fehlgeschlagen (HTTP {status}).`,"models.discoveryFailedBlocked":`Die Modellerkennung wurde durch die Zielrichtlinie blockiert.`,"models.discoveryFailedInvalidResponse":`Die Modellerkennung lieferte eine ungültige Antwort.`,"models.discoveryFailedNetwork":`Die Modellerkennung ist an einem Netzwerkfehler gescheitert.`,"models.discoveryFailedProvider":`Der Anbieter meldete einen Fehler bei der Modellerkennung.`,"models.discoveryFailedGeneric":`Die Modellerkennung ist fehlgeschlagen.`,"models.openProviderSettings":`Anbietereinstellungen öffnen`,"models.loading":`Lädt…`,"models.search":`Modelle suchen…`,"models.showMore":`{n} weitere anzeigen`,"models.allowlistLabel":`Nur ausgewählte`,"models.allowlistHint":`Nur geprüfte Modelle gehen in den Katalog (leer = alle). Nützlich für Anbieter mit tausenden Modellen.`,"models.selectedCount":`{n} ausgewählt`,"sub.subtitle":`Codex {cmd} bewirbt nur die ersten 5 Modelle (nach Priorität) als Overrides. Wähle hier bis zu 5 — natives gpt oder geroutet — und opencodex setzt ihre Katalog-Priorität, sodass genau diese führen. Jedes andere Modell bleibt über seinen exakten Namen aufrufbar; dies steuert nur die Anzeige.`,"sub.featured":`Empfohlen`,"sub.orderHint":`Die hier gewählte und angezeigte Reihenfolge bestimmt die Plätze 1–5 oben in der Codex-Modellauswahl und die Standard-Modellkandidaten für {cmd}.`,"sub.noneSelected":`Nichts ausgewählt — wähle aus der Liste unten.`,"sub.models":`Modelle`,"sub.search":`Modelle suchen (nativ gpt + geroutet)…`,"sub.noModels":`Keine Modelle — melde dich zuerst bei einem Anbieter an oder füge einen hinzu.`,"sub.saved":`{n} Modelle gespeichert. Starte eine neue Codex-Sitzung (oder führe {cmd} aus), um sie als spawn_agent-Overrides zu sehen.`,"sub.saveFailed":`Speichern fehlgeschlagen`,"sub.networkError":`Netzwerkfehler — läuft der Proxy?`,"sub.loadFail":`Modelle konnten nicht geladen werden — läuft der Proxy?`,"sub.loading":`Lädt…`,"sub.moveUp":`{m} nach oben`,"sub.moveDown":`{m} nach unten`,"sub.removeAria":`{m} entfernen`,"sub.workspace.addToFeatured":`{m} zu Hervorgehobenen hinzufügen`,"sub.workspace.allModels":`Alle Modelle`,"sub.workspace.featuredFull":`Hervorgehobene Liste ist voll (max. 5)`,"sub.workspace.mainAria":`Subagent-Modelldetails`,"sub.workspace.notFeatured":`Nicht hervorgehoben`,"sub.workspace.priority":`Priorität`,"sub.workspace.removeFromFeatured":`{m} aus Hervorgehobenen entfernen`,"sub.workspace.selectModel":`Modell auswählen`,"sub.workspace.selectModelDesc":`Wählen Sie ein Modell aus der Liste, um Details anzuzeigen und es für spawn_agent hervorzuheben.`,"sub.workspace.selector":`Öffentlicher Selektor`,"logs.title":`Anfrage-Protokolle`,"logs.tabLogs":`Protokolle`,"logs.tabDebug":`Diagnose`,"logs.subtitle":`Letzte Anfragen über den lokalen opencodex-Proxy, neueste zuerst.`,"logs.autoRefresh":`Auto-Aktualisierung`,"logs.noRequests":`Noch keine Anfragen.`,"logs.loadError":`Anfrageprotokolle konnten nicht geladen werden.`,"logs.filter.surface.label":`Oberfläche`,"logs.filter.surface.all":`Alle`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.filter.surface.grok":`Grok`,"logs.filter.conversation.label":`Konversation`,"logs.filter.conversation.placeholder":`Konversations-ID einfügen`,"logs.filter.conversation.clear":`Löschen`,"logs.filter.conversation.apply":`Logs filtern`,"logs.conversation.totals":`{requests} Anfragen · {tokens} Tokens · {cost}`,"logs.conversation.scope":`Summen gelten nur für den aktuell geladenen Logs-Ring.`,"logs.conversation.excluded":`({unpriced} ohne Preis, {unmetered} ohne Messung vom ~$ ausgenommen)`,"logs.detail.conversation":`Konversation`,"logs.badge.claude":`Claude`,"logs.badge.grok":`Grok`,"logs.col.time":`Zeit`,"logs.col.request":`Anfrage`,"logs.col.model":`Modell`,"logs.col.effort":`Aufwand`,"logs.col.provider":`Anbieter`,"logs.col.status":`Status`,"logs.col.tokens":`Tokens`,"logs.col.tokPerSec":`tok/s`,"logs.col.estimatedCost":`~$`,"logs.metric.tokPerSecTitle":`Ausgabe-Tokens pro Sekunde über die gesamte Anfragedauer`,"logs.metric.estimatedCostTitle":`API-Listenpreis-Äquivalent, keine tatsächliche Belastung; bei fehlendem Preisabgleich nicht verfügbar`,"usage.cost.total":`API-Listenpreis-Äquivalent (dieser Zeitraum)`,"usage.cost.disclaimer":`Kein Abrechnungsbeleg. Stattdessen können Abonnementnutzung oder Anbieter-Guthaben gelten.`,"usage.cost.unpricedNote":`{count} Anfragen ohne Preis oder Nutzung ausgeschlossen`,"logs.detail.section.basic":`Grundinformationen`,"logs.detail.section.performance":`Leistung`,"logs.detail.section.cost":`API-Listenpreis-Äquivalent`,"logs.detail.section.attempts":`Combo-Versuche`,"logs.detail.section.usage":`Roh-Nutzung`,"logs.detail.ttft":`TTFT`,"logs.detail.costTotal":`Listenpreis-Äquivalent`,"logs.detail.totalTokens":`Tokens gesamt`,"logs.detail.matchedKey":`Zugeordneter jawcode-Schlüssel`,"logs.detail.priceSource":`Preisquelle`,"logs.detail.unavailableReason":`Grund der Nichtverfügbarkeit`,"logs.detail.copyRequestId":`Anfrage-ID kopieren`,"logs.detail.copied":`Kopiert`,"logs.detail.source.jawcode":`jawcode-Katalog`,"logs.detail.source.expected":`Expected-Preis-Overlay`,"logs.detail.verification.verified":`Verifiziert`,"logs.detail.verification.derived":`Vom Basismodell abgeleitet`,"logs.detail.attempt.target":`Anbieter / Modell`,"logs.detail.attempt.reason":`Ergebnis / Grund`,"logs.detail.attempt.completed":`Abgeschlossen`,"logs.detail.attempt.e2eNote":`Tok/s auf oberster Ebene ist Ende-zu-Ende; jeder Versuch nutzt seine eigene Dauer.`,"logs.detail.reason.usage_missing":`Nutzung wurde nicht gemeldet.`,"logs.detail.reason.usage_unsupported":`Dieser Anbieter meldet keine Nutzung.`,"logs.detail.reason.output_missing":`Es wurden keine positiven Ausgabe-Tokens gemeldet.`,"logs.detail.reason.invalid_duration":`Die Anfragedauer ist ungültig.`,"logs.detail.reason.price_unmatched":`Kein passender jawcode-Preis gefunden.`,"logs.detail.reason.invalid_cache_breakdown":`Cache-Token-Details widersprechen den Eingabe-Tokens.`,"logs.detail.reason.invalid_usage":`Die Nutzung enthält einen ungültigen Token-Wert.`,"logs.detail.reason.combo_attempt_unavailable":`Mindestens ein Combo-Versuch konnte nicht bepreist werden.`,"logs.detail.estimate.usage_estimated":`Die Anbieternutzung ist geschätzt.`,"logs.detail.estimate.cache_detail_missing":`Cache-Details fehlen; Eingabe ist als Obergrenze geschätzt.`,"logs.detail.estimate.expected_price_overlay":`Ein verifizierter Expected-Listenpreis wurde verwendet.`,"logs.col.error":`Fehler`,"logs.col.upstreamReason":`Upstream-Grund`,"logs.col.duration":`Dauer`,"logs.tokens.reported":`gemeldet`,"logs.tokens.unreported":`nicht gemeldet`,"logs.tokens.unsupported":`nicht unterstützt`,"logs.tokens.estimated":`geschätzt`,"logs.tokens.input":`Eingabe`,"logs.tokens.output":`Ausgabe`,"logs.tokens.cacheRead":`Cache-Treffer (c)`,"logs.tokens.cacheWrite":`Cache-Schreiben (w)`,"logs.tokens.reasoning":`Reasoning`,"logs.tokens.noCache":`keine Cache-Daten`,"logs.tokens.contextTotal":`aktiver Kontext`,"logs.tokens.noCacheNote":`dieser Anbieter meldet keine Cache-Tokens`,"logs.tokens.noCacheCursor":`Cursor-Cache-Details nicht gemeldet`,"logs.tokens.noCacheCursorNote":`Cursor liefert keine Cache-Read/Write-Tokenzahlen; das ist unbekannt und kein bestätigter Cache-Miss`,"logs.tokens.estimatedNote":`Schätzung (Anbieter meldet keine exakte Nutzung)`,"logs.details":`Details`,"logs.detailTitle":`Anfragedetails`,"logs.detailRaw":`Roh-Protokolleintrag`,"debug.title":`Fehlerdiagnose`,"debug.subtitle":`Opt-in-Diagnose für Provider-Transport und Nutzungs-Extraktion. Anfragefehler und 502er bleiben im Protokolle-Tab.`,"debug.debug":`Provider-Diagnose`,"debug.usage":`Nutzungs-Extraktion`,"debug.injection":`Injektions-Log`,"debug.claude":`Claude-Inbound`,"debug.claudeInbound.title":`Claude-Inbound-Anfragen`,"debug.claudeInbound.sub":`Zeigt, was Claude Code/Desktop tatsächlich sendet (thinking, effort, metadata) — kein Prompt-Text wird gespeichert.`,"debug.claudeInbound.empty":`Noch keine Anfragen erfasst. Sende bei aktivierter Erfassung eine Nachricht aus Claude.`,"debug.claudeInbound.time":`Zeit`,"debug.claudeInbound.endpoint":`Endpunkt`,"debug.claudeInbound.model":`Modell`,"debug.claudeInbound.none":`keine`,"debug.reset":`Laufzeit-Überschreibungen löschen`,"debug.refresh":`Aktualisieren`,"debug.follow":`Folgen`,"debug.streamProvider":`Anbieter`,"debug.streamUsage":`Nutzung`,"debug.streamInjection":`Injektion`,"debug.loading":`Lade Diagnose-Einstellungen…`,"debug.loadFailed":`Diagnose-Einstellungen konnten nicht geladen werden.`,"debug.emptyTitle":`Diagnose-Logging ist aus`,"debug.empty":`Aktiviere Provider-Diagnose oder Nutzungs-Extraktion in der Karte oben. Zeilen erscheinen hier, nachdem du eine Anfrage über den Proxy gesendet hast.`,"debug.noLinesTitle":`Warte auf Zeilen`,"debug.noLines.provider":`Anbieter-Debug ist an, erfasst aber nur Transport-Anomalien (verworfene oder fehlerhafte Frames sowie Cursor-Dial/Retry-Ereignisse). Eine saubere Anfrage über einen Anbieter wie Anthropic kann null Zeilen erzeugen.`,"debug.noLines.usage":`Nutzungserfassung ist an, aber es wurde noch nichts erfasst. Sende einen Chat/eine Anfrage über Codex, dann erscheint es hier.`,"debug.noLines.injection":`Injektions-Log ist an, aber es wurde noch nichts erfasst. Es erfasst Multi-Agent-Guidance-Injektion und Effort-Cap-Entscheidungen bei Collab- und Sub-Agent-Turns.`,"usage.title":`Nutzung`,"usage.subtitle":`Lokale Token-Buchhaltung deines Proxys. Fehlende Nutzung wird nie als Null angezeigt.`,"usage.loading":`Lade Nutzungsdaten…`,"usage.empty":`Noch keine Nutzung erfasst. Sende eine Anfrage über den Proxy, um Aktivität hier zu sehen.`,"usage.loadError":`Nutzungsdaten konnten nicht geladen werden.`,"usage.range.all":`Alle`,"usage.range.available":`Verfügbarer Verlauf`,"usage.historyTruncated":`Die Summen beziehen sich nur auf den verfügbaren Verlauf, da ältere Nutzungsdaten nicht geladen wurden.`,"usage.range.30d":`30d`,"usage.range.7d":`7d`,"usage.card.requests":`Anfragen`,"usage.card.measured":`Gemessen`,"usage.card.reported":`Gemeldet`,"usage.card.totalTokens":`Gesamt-Tokens`,"usage.card.cachedTokens":`Cache-Treffer-Tokens`,"usage.card.cachedTokensHint":`Prompt-Tokens aus dem Provider-Cache (Treffer). Cache-Schreibvorgänge werden darunter separat angezeigt.`,"usage.card.cacheWriteTokens":`Cache-Schreiben`,"usage.card.coverage":`Abdeckung`,"usage.card.activeDays":`Aktive Tage`,"usage.section.heatmap":`Tägliche Aktivität`,"usage.section.overview":`Übersicht`,"usage.section.models":`Modelle`,"usage.section.providers":`Anbieter`,"usage.section.coverage":`Abdeckungs-Aufschlüsselung`,"usage.workspace.report":`Nutzungsbericht`,"usage.workspace.sections":`Nutzungsabschnitte`,"usage.coverage.measured":`Gemessen`,"usage.coverage.reported":`Anbieter gemeldet`,"usage.coverage.estimated":`Geschätzt`,"usage.coverage.note":`Gemessene Einträge enthalten anbieter-gemeldete und geschätzte Token-Zahlen. Nicht gemeldete und nicht unterstützte Anfragen werden erfasst, aber nie auf Null aufgebläht.`,"usage.search.models":`Modelle suchen…`,"usage.col.requests":`Anfragen`,"usage.col.measured":`Gemessen`,"usage.col.reported":`Gemeldet`,"usage.col.tokens":`Tokens`,"usage.col.share":`Anteil`,"usage.heatmap.less":`Weniger`,"usage.heatmap.more":`Mehr`,"modal.addNamed":`Hinzufügen: {label}`,"modal.add":`Anbieter hinzufügen`,"modal.search":`Anbieter suchen…`,"modal.logInWith":`Anmelden mit {label}`,"modal.waitingBrowser":`Warten auf Browser…`,"modal.providerName":`Anbietername`,"modal.adapter":`Adapter`,"modal.baseUrl":`Basis-URL`,"modal.endpoint":`Endpunkt`,"modal.endpoint.tokenPlan":`Token-Plan`,"modal.endpoint.payAsYouGo":`Pay as you go`,"modal.endpoint.custom":`Benutzerdefiniert`,"modal.defaultModel":`Standardmodell (optional)`,"modal.allowPrivateNetwork":`Lokales/privates Netzwerk erlauben`,"modal.allowPrivateNetworkHint":`Nur für absichtlich selbst gehostete Provider aktivieren. Metadaten-Endpunkte bleiben blockiert.`,"modal.nameRequired":`Anbietername ist erforderlich`,"modal.baseUrlRequired":`Basis-URL ist erforderlich`,"modal.networkError":`Netzwerkfehler — läuft der Proxy?`,"modal.loginFailStart":`Login konnte nicht gestartet werden`,"modal.waitingLogin":`Warten auf Browser-Login…`,"modal.loggingIn":`Anmelden…`,"modal.loginTimeout":`Login-Zeitüberschreitung — versuche es erneut.`,"nav.codexAuth":`Codex-Auth`,"nav.api":`API`,"nav.openMenu":`Menü öffnen`,"nav.closeMenu":`Menü schließen`,"codexAuth.mainAccount":`Hauptkonto`,"codexAuth.codexApp":`Codex App`,"codexAuth.appLogin":`App-Login`,"codexAuth.accountPool":`Kontopool`,"codexAuth.accountModeTitle":`OpenAI-Kontomodus`,"codexAuth.accountModePool":`Pool-Modus`,"codexAuth.accountModePoolDesc":`Die Hauptanmeldung und geeignete hinzugefügte Konten wechseln sich hier ab.`,"codexAuth.accountModeDirect":`Direktmodus`,"codexAuth.accountModeDirectDesc":`Anfragen verwenden nur die Hauptanmeldung; hinzugefügte Konten bleiben für den Pool-Modus gespeichert.`,"codexAuth.openaiMissing":`Der integrierte OpenAI-Anbieter ist nicht konfiguriert.`,"codexAuth.openaiDisabled":`Der integrierte OpenAI-Anbieter ist deaktiviert.`,"codexAuth.openaiUnavailableDesc":`Deine OpenAI-Konten sind weiterhin verfügbar. Aktiviere den Anbieter, um Codex-Anfragen weiterzuleiten.`,"codexAuth.enableOpenai":`OpenAI aktivieren`,"codexAuth.enablingOpenai":`Wird aktiviert...`,"codexAuth.enableOpenaiFailed":`OpenAI-Anbieter konnte nicht aktiviert werden.`,"codexAuth.openaiPresetLoadFailed":`OpenAI-Anbieter-Preset konnte nicht geladen werden.`,"codexAuth.openaiPresetUnavailable":`OpenAI-Anbieter-Preset ist nicht verfügbar.`,"codexAuth.openProviders":`Anbieter öffnen`,"codexAuth.add":`Hinzufügen`,"codexAuth.refreshQuota":`Kontingente aktualisieren`,"codexAuth.refreshingQuota":`Aktualisiere…`,"codexAuth.quotaRefreshed":`Kontingente aktualisiert`,"codexAuth.quotaRefreshFailed":`Kontingente konnten nicht aktualisiert werden`,"codexAuth.pauseExhausted":`Ausgeschöpfte pausieren`,"codexAuth.pausingExhausted":`Kontingente werden geprüft…`,"codexAuth.pauseExhaustedSucceeded":`Konten am Limit pausiert: {count}`,"codexAuth.pauseExhaustedNone":`Keine Konten mit bestätigter 100-%-Nutzung.`,"codexAuth.pauseExhaustedFailed":`Ausgeschöpfte Konten konnten nicht geprüft und pausiert werden.`,"codexAuth.noPool":`Noch keine Pool-Konten hinzugefügt.`,"codexAuth.pause":`Pausieren`,"codexAuth.resume":`Fortsetzen`,"codexAuth.paused":`PAUSIERT`,"codexAuth.pauseSucceeded":`{email} ist pausiert`,"codexAuth.resumeSucceeded":`{email} ist wieder im Pool verfügbar`,"codexAuth.pauseFailed":`{email} konnte nicht pausiert werden. Es wurde nichts geändert.`,"codexAuth.resumeFailed":`{email} konnte nicht fortgesetzt werden. Es wurde nichts geändert.`,"codexAuth.pausedHint":`Bis zur Fortsetzung von automatischem Wechsel, Wiederholungen, Cooldown-Wiederherstellung und manueller Auswahl ausgeschlossen.`,"codexAuth.fiveHour":`5 Std.`,"codexAuth.weekly":`Woche`,"codexAuth.monthly":`30d`,"codexAuth.resets":`zurücksetzen`,"codexAuth.today":`Heute`,"codexAuth.current":`AKTUELL`,"codexAuth.nextSession":`AUSGEWÄHLT`,"codexAuth.poolPrepared":`FÜR POOL VORBEREITET`,"codexAuth.preparePoolTitle":`Dieses Konto für den Pool-Modus vorbereiten?`,"codexAuth.preparePoolDesc":`Direkte Anfragen verwenden weiterhin die Hauptanmeldung. Dieses Konto wird zur vorbereiteten Pool-Auswahl, sobald der Pool-Modus aktiviert ist.`,"codexAuth.prepareForPool":`Für Pool vorbereiten`,"codexAuth.poolPreparedToast":`{email} ist für den Pool-Modus vorbereitet`,"codexAuth.switchTitle":`Aktives Konto wechseln?`,"codexAuth.switchDesc":`Dies gilt für die nächste Anfrage bestehender und neuer Codex-Sitzungen. Laufende Anfragen behalten ihr Konto.`,"codexAuth.cacheWarning":`OpenCodex spielt den Gesprächskontext nach jedem Kontowechsel erneut ab, aber der providerseitige Prompt-Cache kann kalt sein.`,"codexAuth.setAsNext":`Konto auswählen`,"codexAuth.cancel":`Abbrechen`,"codexAuth.switchBack":`Zurück zum Hauptkonto?`,"codexAuth.switchBackDesc":`Die nächste Anfrage bestehender und neuer Codex-Sitzungen verwendet dein App-Login-Konto.`,"codexAuth.autoSwitch":`Proaktiver Wechsel nach Nutzung`,"codexAuth.autoSwitchQuotaDesc":`Kontingent: Ab {threshold} % Nutzung kann die nächste Anfrage zu einem geeigneten Konto mit geringerer Nutzung wechseln, auch bei einer bereits gebundenen Aufgabe; Go/Free nutzen nur 30 Tage.`,"codexAuth.autoSwitchQuotaOffDesc":`Der proaktive Wechsel nach Nutzung ist aus. Zuweisung neuer/ungebundener Aufgaben und Fehlerbehebung bleiben aktiv.`,"codexAuth.autoSwitchRoundRobinDesc":`Round-Robin-Zuweisung verwendet diesen Schwellenwert nicht und rotiert weiter neue/ungebundene Aufgaben.`,"codexAuth.autoSwitchFillFirstDesc":`Fill-first: {threshold} % ist der Entleerungspunkt für neue/ungebundene Aufgaben; gesunde gebundene Aufgaben behalten ihr Konto.`,"codexAuth.autoSwitchFillFirstOffDesc":`Fill-first hat keinen nutzungsbasierten Entleerungspunkt für neue/ungebundene Aufgaben; Cooldown, Neuanmeldung und Fehlerbehebung können das Routing weiterhin ändern.`,"codexAuth.failureRecoveryNote":`Fehlerbehebung ist getrennt: Eine Ablehnung vor der Ausgabe mit 429/402, Cooldown, Neuanmeldung, Ausschluss oder konfiguriertes temporäres Failover kann ein anderes geeignetes Konto auswählen.`,"codexAuth.autoSwitchThreshold":`Nutzungsschwelle`,"codexAuth.autoSwitchThresholdAria":`Nutzungsschwelle in Prozent`,"codexAuth.autoSwitchThresholdInc":`Nutzungsschwelle erhöhen`,"codexAuth.autoSwitchThresholdDec":`Nutzungsschwelle verringern`,"codexAuth.autoSwitchLoadFailed":`Die Einstellung für den nutzungsbasierten Wechsel konnte nicht geladen werden.`,"codexAuth.autoSwitchThresholdInvalid":`Gib eine ganze Zahl von 1 bis 100 ein`,"codexAuth.autoSwitchUpdated":`Der proaktive Wechsel nach Nutzung wurde aktualisiert`,"codexAuth.autoSwitchUpdateFailed":`Die Aktualisierung des nutzungsbasierten Wechsels konnte nicht bestätigt werden. Der zuletzt bestätigte Wert wird angezeigt.`,"anthropicPool.title":`Claude-Kontenpool (experimentell)`,"anthropicPool.enabledDesc":`Bei 429 wird das Konto gekühlt und umgeschaltet. Neue Sitzungen bevorzugen Nutzung unter {threshold}% (5-Stunden-Balken).`,"anthropicPool.disabledDesc":`Nutzt nur das aktive Claude-Konto. Nur aktivieren, wenn experimentelles Routing akzeptabel ist.`,"anthropicPool.experimentalWarning":`Experimentell und nicht kampferprobt. Anthropic kann Konten einschränken, die wie automatische Multi-Konto-Rotation wirken. Dieselbe Organisation kann Kontingent teilen — Pooling hilft dann nicht. Ausgeschaltet lassen, sofern das Risiko unklar ist.`,"anthropicPool.needTwoAccounts":`Füge mindestens zwei Claude-OAuth-Konten hinzu, bevor du den Pool aktivierst.`,"anthropicPool.threshold":`Nutzungsschwelle für neue Sitzungen`,"anthropicPool.thresholdAria":`Nutzungsschwelle für neue Sitzungen in Prozent`,"anthropicPool.thresholdHelp":`0 deaktiviert die kontingentbasierte Auswahl (nur Affinität + aktives Konto). Standard 80.`,"anthropicPool.thresholdInvalid":`Gib eine ganze Zahl von 0 bis 100 ein`,"anthropicPool.loadFailed":`Claude-Pool-Einstellungen konnten nicht geladen werden.`,"anthropicPool.saveFailed":`Claude-Pool-Einstellungen konnten nicht gespeichert werden.`,"anthropicPool.on":`An`,"anthropicPool.off":`Aus`,"accountPool.strategy":`Rotationsstrategie`,"accountPool.strategyDesc":`Wie OpenCodex einer neuen/ungebundenen Aufgabe ein Konto zuweist.`,"accountPool.strategyQuota":`Kontingent`,"accountPool.strategyRoundRobin":`Round-Robin`,"accountPool.strategyFillFirst":`Fill-first`,"accountPool.strategyHintQuota":`Kontingent kann eine bestehende Aufgabe bei ihrer nächsten Anfrage neu binden, nachdem die Nutzungsschwelle überschritten wurde.`,"accountPool.strategyHintRoundRobin":`Round-Robin rotiert nur Aufgaben ohne aktive Bindung; die Nutzungsschwelle ändert die normale Rotation nicht.`,"accountPool.strategyHintFillFirst":`Fill-first nutzt die Schwelle als Entleerungspunkt für ungebundene Aufgaben; gesunde gebundene Aufgaben behalten ihre Affinität.`,"accountPool.unboundDefinition":`Neue/ungebundene Aufgabe bedeutet eine Anfrage ohne aktuelle Kontobindung; eine sichtbare bestehende Aufgabe kann nach einem Proxy- oder Affinitätsreset ungebunden sein.`,"accountPool.stickyLimit":`Neue/ungebundene Zuweisungen vor Rotation`,"accountPool.stickyLimitAria":`Neue/ungebundene Zuweisungen vor Rotation`,"accountPool.stickyLimitInc":`Sticky-Limit erhöhen`,"accountPool.stickyLimitDec":`Sticky-Limit verringern`,"accountPool.stickyLimitHelp":`So viele neue/ungebundene Aufgaben dem gewählten Konto zuweisen, bevor weitergeschaltet wird; gezählt wird bei der Bindung, nicht nach einem Upstream-Erfolg.`,"accountPool.stickyLimitInvalid":`Gib eine ganze Zahl von 1 bis 100 ein`,"accountPool.strategyLoadFailed":`Rotationsstrategie konnte nicht geladen werden.`,"accountPool.strategyUpdateFailed":`Rotationsstrategie konnte nicht gespeichert werden.`,"codexAuth.switched":`{email} ist für die nächste Anfrage ausgewählt`,"codexAuth.loadFailed":`Die Codex-Kontoeinstellungen konnten nicht geladen werden.`,"codexAuth.switchFailed":`Das Konto konnte nicht gewechselt werden. Die vorherige Auswahl bleibt erhalten.`,"codexAuth.removeConfirm":`{id} entfernen?`,"codexAuth.removeFailed":`Das Konto konnte nicht entfernt werden. Es wurde nichts geändert.`,"codexAuth.addTitle":`Codex-Konto hinzufügen`,"codexAuth.addIdLabel":`Konto-ID (slug)`,"codexAuth.addJsonLabel":`auth.json-Inhalt`,"codexAuth.addHelp":`Kopiere von ~/.codex/auth.json einer anderen Maschine oder nutze codex-auth export.`,"codexAuth.importBtn":`Importieren`,"codexAuth.importInvalidJson":`Ungültiges JSON`,"codexAuth.importMissingTokens":`access_token oder refresh_token fehlen in JSON`,"codexAuth.importMissingId":`Konto-ID ist erforderlich`,"codexAuth.accountAdded":`Konto zum Pool hinzugefügt`,"codexAuth.addPickDesc":`Melde dich mit einem anderen ChatGPT-Konto an, um es zum Pool hinzuzufügen.`,"codexAuth.oauthLogin":`OAuth-Login`,"codexAuth.oauthDesc":`Öffnet ChatGPT-Login im Browser`,"codexAuth.importAuthJson":`auth.json importieren`,"codexAuth.importAuthJsonDesc":`Von einer anderen Codex-Installation oder codex-auth export`,"codexAuth.back":`Zurück`,"codexAuth.oauthAlreadyInProgress":`Login läuft bereits. Schließe es in deinem Browser ab.`,"codexAuth.oauthWaiting":`Warte auf Abschluss des ChatGPT-Logins in deinem Browser…`,"codexAuth.oauthSubmittingCode":`Code wird gesendet…`,"codexAuth.oauthCodeSubmitted":`Code gesendet — warte auf Abschluss der Anmeldung…`,"codexAuth.oauthStatusRetrying":`Beim Prüfen des Login-Status ist ein Netzwerk- oder Proxyfehler aufgetreten — erneuter Versuch…`,"codexAuth.oauthCancelled":`Login wurde abgebrochen.`,"codexAuth.loginFailed":`Login fehlgeschlagen`,"codexAuth.needsReauth":`Erneut anmelden`,"codexAuth.reauthenticate":`Re-authenticate`,"codexAuth.tokenExpired":`Token abgelaufen — dieses Konto erneut authentifizieren`,"codexAuth.mainTokenExpired":`Token abgelaufen — erneut über Codex-App-Login anmelden`,"codexAuth.emailCollision":`Dieses Konto entspricht deinem Haupt-Codex-Login. Nutze ein anderes Konto.`,"codexAuth.resetCreditsTitle":`Gutschriften zurücksetzen`,"codexAuth.resetCreditsAvailable":`Du hast {count} Reset-Gutschrift(en) verfügbar.`,"codexAuth.resetCreditsDesc":`Jede Gutschrift setzt deine aktuellen stündlichen und wöchentlichen Nutzungsgrenzen sofort zurück.`,"codexAuth.noResetCredits":`Du hast keine Reset-Gutschriften.`,"codexAuth.earnCreditsHint":`Gutschriften werden monatlich und über das Empfehlungsprogramm verdient.`,"codexAuth.creditsExpireNote":`Gutschriften verfallen 30 Tage nach Erhalt.`,"codexAuth.useOneCredit":`1 Gutschrift nutzen`,"codexAuth.confirmResetTitle":`Reset-Gutschrift nutzen?`,"codexAuth.confirmResetDesc":`Dies setzt deine aktuellen Ratenbegrenzungen sofort zurück. Du hast noch {count} Gutschrift(en).`,"codexAuth.irreversible":`Diese Aktion kann nicht rückgängig gemacht werden.`,"codexAuth.useCredit":`Gutschrift nutzen`,"codexAuth.redeeming":`Wird zurückgesetzt…`,"codexAuth.resetSuccess":`Ratenbegrenzungen zurückgesetzt! {remaining} Gutschrift(en) übrig.`,"codexAuth.resetSuccessGeneric":`Ratenbegrenzungen zurückgesetzt!`,"codexAuth.resetAlreadyRedeemed":`Diese Gutschrift wurde bereits eingelöst. Gutschriften unverändert.`,"codexAuth.resetNothingToReset":`Kein Ratenbegrenzungs-Fenster muss gerade zurückgesetzt werden.`,"codexAuth.resetNoCredit":`Keine Reset-Gutschriften verfügbar.`,"codexAuth.resetError":`Reset-Gutschrift konnte nicht eingelöst werden. Bitte erneut versuchen.`,"codexAuth.fifoNote":`Die älteste Gutschrift wird zuerst verwendet.`,"codexAuth.confirmWhichCredit":`Gutschrift vom {date} wird verwendet.`,"codexAuth.creditNext":`Als nächstes`,"codexAuth.creditLabel":`Gutschrift #{n}`,"codexAuth.creditNextBadge":`NÄCHSTE`,"codexAuth.creditGranted":`Erhalten {date}`,"codexAuth.creditExpires":`Läuft ab {date} ({days} Tage übrig)`,"api.title":`API-Zugriff`,"api.subtitle":`Mit generierten API-Schlüsseln greifen externe Apps auf den opencodex-Proxy zu. Die Authentifizierung läuft über den {authHeader}-Header; welche Header ein Endpunkt akzeptiert, steht in der Tabelle unten.`,"api.baseUrl":`Basis-URL`,"api.responsesEndpoint":`Responses API`,"api.chatCompletionsEndpoint":`Chat Completions API`,"api.messagesEndpoint":`Messages API`,"api.modelsEndpoint":`Models API`,"api.endpointNote":`Nutze die Basis-URL für OpenAI-kompatible Clients. Responses und Chat Completions liegen unter /v1.`,"api.endpointsTitle":`Gateway-Endpunkte`,"api.authBaseUrlNote":`Konfiguriere Clients mit der Basis-URL und wähle dann den protokollspezifischen Endpunkt unten.`,"api.authTitle":`Authentifizierung`,"api.authLoopback":`Loopback-Binds (127.0.0.1 oder ::1) umgehen die Authentifizierung. Remote-Binds benötigen einen generierten ocx_-Schlüssel oder OPENCODEX_API_AUTH_TOKEN.`,"api.modelsTitle":`Externe Modelle`,"api.modelsCount":`{count} aufrufbar`,"api.modelsSearch":`Modelle suchen`,"api.modelsSubtitle":`Verwende diese exakten Modell-IDs mit /v1/models und dem gewählten eingehenden Protokoll.`,"api.modelsLoading":`Modelle werden geladen…`,"api.modelsEmpty":`Noch keine extern aufrufbaren Modelle verfügbar.`,"api.modelsNoMatch":`Keine Modelle passen zu „{query}“.`,"api.modelsLoadFailed":`Der externe Modellkatalog konnte nicht geladen werden.`,"api.colModel":`Modell`,"api.colSource":`Quelle`,"api.colProtocols":`Protokolle`,"api.copyModelId":`ID kopieren`,"api.modelCopied":`Kopiert`,"api.testModel":`Testen`,"api.testingModel":`Teste…`,"api.testFailed":`Fehlgeschlagen`,"api.protocolResponses":`Responses`,"api.protocolChatCompletions":`Chat Completions`,"api.protocolMessages":`Messages`,"api.sourceNative":`ChatGPT-Pool`,"api.sourceCombo":`Combo`,"api.sourceCustom":`Benutzerdefiniert`,"api.usageResponsesTitle":`Responses-Beispiel`,"api.usageChatTitle":`Chat-Completions-Beispiel`,"api.usageMessagesTitle":`Messages-Beispiel`,"api.testSucceeded":`OK`,"api.newKeyTitle":`Neuer Schlüssel erstellt`,"api.newKeyNote":`Kopiere diesen Schlüssel jetzt — er wird nicht erneut angezeigt.`,"api.copy":`Kopieren`,"api.copied":`Kopiert`,"api.dismiss":`Schließen`,"api.generateTitle":`Schlüssel generieren`,"api.keyNamePlaceholder":`Schlüsselname (optional)`,"api.generate":`Generieren`,"api.generating":`Erstelle…`,"api.activeKeys":`Aktive Schlüssel ({count})`,"api.activeKeysLoading":`Aktive Schlüssel`,"api.noKeys":`Noch keine API-Schlüssel. Erstelle oben einen.`,"api.workspace.sections":`API-Abschnitte`,"api.section.keys":`Schlüssel`,"api.section.connect":`Verbinden`,"api.section.endpoints":`Endpunkte`,"api.section.models":`Modelle`,"api.section.examples":`Beispiele`,"api.workspace.details":`API-Schlüsseldetails`,"api.workspace.keyDetails":`Schlüsseldetails`,"api.workspace.keyPrefix":`Schlüssel-Präfix`,"api.workspace.deleteKey":`Schlüssel löschen`,"api.workspace.deleteConfirm":`Diesen Schlüssel wirklich löschen? Das lässt sich nicht rückgängig machen.`,"api.workspace.usageExamples":`Nutzungsbeispiele`,"api.copyUrlHint":`Klick um URL zu kopieren`,"api.urlCopied":`URL kopiert`,"api.copyExampleHint":`Klick um Beispiel zu kopieren`,"api.exampleCopied":`Beispiel kopiert`,"api.colName":`Name`,"api.colKey":`Schlüssel`,"api.colCreated":`Erstellt`,"api.confirm":`Bestätigen`,"api.deleteAria":`API-Schlüssel löschen`,"api.usageSampleInput":`Hallo, Welt!`,"api.clientConfig.title":`Client-Konfiguration`,"api.clientConfig.rowsLabel":`Client verbinden`,"api.clientConfig.details":`Details`,"api.clientConfig.detailsAria":`Details zur {client}-Konfiguration`,"api.clientConfig.copyAria":`{client}-Konfigurations-JSON kopieren`,"api.clientConfig.downloadAria":`{client}-Konfiguration herunterladen`,"api.clientConfig.rowMeta":`{destination} · {count} Modell(e)`,"api.clientConfig.rowError":`Die {client}-Konfiguration konnte nicht erstellt werden.`,"api.clientConfig.copiedAnnounceClient":`{client}-Konfigurations-JSON in die Zwischenablage kopiert.`,"api.clientConfig.clientOpencode":`OpenCode`,"api.clientConfig.clientPi":`Pi`,"api.clientConfig.copy":`JSON kopieren`,"api.clientConfig.download":`Herunterladen`,"api.clientConfig.loading":`Client-Konfiguration wird erstellt…`,"api.clientConfig.jsonLabel":`{client}-Konfigurations-JSON`,"api.clientConfig.destination":`Zieldatei`,"api.clientConfig.envHint":`Schlüssel vor dem Start setzen`,"api.clientConfig.mergeWarning":`Führe dies in die Zieldatei ein. Ein Ersetzen würde deine anderen Provider und MCP-Einstellungen entfernen.`,"api.clientConfig.modelCount":`{count} Modell(e) exportiert`,"api.clientConfig.missingLimits":`{count} von {total} Modell(en) haben kein Kontextlimit; der Client verwendet dafür seine eigenen Vorgaben.`,"api.clientConfig.noKeyYet":`Für {env} existiert noch kein Schlüssel. Erzeuge oben einen Schlüssel, bevor du diese Konfiguration außerhalb von Loopback nutzt.`,"api.clientConfig.loadFailed":`Die Modellliste konnte nicht gelesen werden, daher wurde keine Client-Konfiguration erzeugt.`,"api.clientConfig.copiedAnnounce":`Client-Konfigurations-JSON in die Zwischenablage kopiert.`,"api.clientConfig.copyFailed":`Client-Konfigurations-JSON konnte nicht kopiert werden.`,"api.clientConfig.downloadedAnnounce":`{filename} heruntergeladen. Es hat sich noch nichts geändert — führe die Datei selbst in {destination} ein.`,"api.clientConfig.whereDisclosure":`Wohin diese Datei gehört`,"api.clientConfig.whereBody":`Der Pfad oben ist der globale Speicherort. Eine projektlokale Konfigurationsdatei im Arbeitsverzeichnis hat Vorrang, und der Schlüssel wird aus der in der Konfiguration genannten Umgebungsvariable gelesen — nie aus dieser Datei.`,"api.keysLoadFailed":`API-Schlüssel konnten nicht geladen werden.`,"api.createFailed":`API-Schlüssel konnte nicht erstellt werden.`,"api.deleteFailed":`API-Schlüssel konnte nicht gelöscht werden.`,"api.auth.endpoint":`Endpunkt`,"api.auth.required":`Erforderlich`,"api.auth.accepted":`Akzeptiert`,"api.auth.rejected":`Nicht akzeptiert`,"api.auth.testProtocol":`{protocol} testen`,"api.auth.testNeedsFreshKey":`Für einen authentifizierten Test einen Schlüssel erzeugen und den einmalig angezeigten Wert auf dem Bildschirm lassen.`,"api.key.name":`Schlüsselname`,"api.key.rename":`Umbenennen`,"api.key.saveName":`Namen speichern`,"api.key.renaming":`Wird gespeichert…`,"api.key.renameFailed":`Schlüssel konnte nicht umbenannt werden. Deine Eingabe wurde behalten.`,"api.key.deleting":`Wird gelöscht…`,"api.key.copyFailed":`Schlüssel konnte nicht kopiert werden. Vor dem Schließen dieses Panels manuell markieren und kopieren.`,"api.attribution.title":`Zugeordnete Nutzung`,"api.attribution.requests7d":`Anfragen, letzte 7 Tage`,"api.attribution.totalRequests":`Zugeordnete Anfragen gesamt`,"api.attribution.totalRequestsAvailable":`Anfragen im verfügbaren Verlauf`,"api.attribution.sinceAvailable":`Verfügbare Zuordnung seit`,"api.attribution.lastUsed":`Zuletzt verwendet`,"api.attribution.since":`Zuordnung verfügbar seit`,"api.attribution.neverUsed":`Seit Beginn der Zuordnung nicht verwendet`,"api.attribution.unavailable":`Keine Nutzungsdaten`,"api.attribution.unavailableDetail":`Es wurde noch keine Nutzung zugeordnet. Anfragen von vor dem Start der Zuordnung lassen sich nicht rückwirkend zuweisen.`,"api.attribution.ambiguous":`Zwei Schlüssel teilen sich diese ID, daher lässt sich die Nutzung keinem davon zuordnen. Vergib in der Konfigurationsdatei je Schlüssel eine eindeutige ID.`,"api.attribution.railAmbiguous":`doppelte ID`,"nav.claude":`Claude`,"claude.subtitle":`GPT, Gemini und andere Modelle in Claude Code verwenden.`,"claude.enabledLabel":`Claude-Verbindung`,"claude.enabledHint":`Wenn aus, kann Claude Code diesen Proxy nicht verwenden.`,"claude.authMode":`Auth-Modus`,"claude.authModeHint":`Subscription erfordert Claude-Konto, Proxy funktioniert ohne Anthropic-Konto`,"claude.authModeSubscription":`Subscription (Claude-Konto)`,"claude.authModeProxy":`Proxy (kein Konto nötig)`,"claude.authModeAuto":`Auto (Claude-Anmeldung erkennen)`,"claude.effectiveMode.label":`Beim nächsten Start aktiv`,"claude.effectiveMode.manual":`Manuell: {mode}`,"claude.effectiveMode.autoPresent":`Auto: Abo — Claude-Anmeldung über {source} gefunden`,"claude.effectiveMode.autoAbsent":`Auto: Proxy-Modus — keine Claude-Anmeldung gefunden`,"claude.effectiveMode.autoUnknown":`Auto: Abo — Anmeldung konnte nicht geprüft werden`,"claude.effectiveMode.admissionKey":`Der API-Schlüssel dieses Proxys wird weiterhin gesendet.`,"claude.authSource.claude-json-oauth":`Claude-Konto`,"claude.authSource.claude-credentials-file":`Anmeldedatei`,"claude.authSource.macos-keychain":`macOS-Schlüsselbund`,"claude.authSource.exported-env":`Umgebungsvariable`,"claude.authSource.unknown":`erkannte Anmeldedaten`,"claude.systemEnv":`Auto-Verbindung`,"claude.systemEnvDesc":`Wenn an, wird claude in jedem Terminal automatisch über den Proxy geleitet.`,"claude.systemEnvUnsupported":`Auto-Verbindung ist nur unter macOS verfügbar. Starten Sie Claude auf diesem System mit {cmd}.`,"claude.systemEnvWarn":`⚠ Die Terminal-App muss vollständig beendet und neu gestartet werden. Nicht empfohlen.`,"claude.fastMode":`Fast Mode (OpenAI)`,"claude.fastModeDesc":`Steuert service_tier für OpenAI-Modelle. ON = Priorität (schneller). OFF = Standard. Auto = Durchleitung.`,"claude.fastAuto":`Auto`,"claude.fastOn":`ON`,"claude.fastOff":`OFF`,"claude.autoContext":`Großen Kontext automatisch nutzen`,"claude.autoContextDesc":`Steuert, wie weit die 1M-Markierung geht. AN: jedes Modell über 200k Tokens (GPT-Modelle usw.) erhält eine Big-Context-Zeile. AUS: nur echte 1M-Modelle.`,"claude.autoContextInert":`Inaktiv, weil in der Konfigurationsdatei ein alter Kontextgrößen-Wert (maxContextTokens) steht. Dort entfernen, um es wieder zu aktivieren.`,"claude.autoCompactWindow":`Punkt für Auto-Zusammenfassung`,"claude.autoCompactDefault":`350k (Standard)`,"claude.autoCompactWindowDesc":`Ältere Nachrichten werden an diesem Punkt zusammengefasst. Das eigene Limit jedes Modells wird nie überschritten — 200k-Modelle bleiben unberührt.`,"claude.autoCompactWindowWarn":`Eine Änderung kann GPT-Modelle stören — liegt der Wert über dem echten Modelllimit, kommt es vor der Zusammenfassung zu Fehlern.`,"claude.injectAgents":`Subagenten automatisch registrieren`,"claude.injectAgentsDesc":`Registriert die im Subagenten-Tab gewählten Modelle (plus das aktuelle Standardmodell) als aufrufbare Claude-Code-Agenten (ocx-*). Gilt ab der nächsten Sitzung.`,"claude.webSearchSidecar":`Websuche-Sidecar überschreiben`,"claude.webSearchSidecarHint":`Überschreibt den allgemeinen Websuche-Sidecar für Claude-Code-Anfragen.`,"claude.visionSidecar":`Vision-Sidecar überschreiben`,"claude.visionSidecarHint":`Überschreibt den allgemeinen Vision-Sidecar für Claude-Code-Anfragen.`,"claude.useMainSetting":`Haupteinstellung verwenden`,"claude.sidecarModelPlaceholder":`Modell der Haupteinstellung`,"claude.quickstart":`Erste Schritte`,"claude.quickstartHint":`{cmd} öffnet Claude Code über den Proxy. Dein claude.ai-Login bleibt aktiv.`,"claude.manualEnv":`Manuelle Einrichtung (erweitert)`,"claude.smallFastModel":`Hintergrund-Hilfsmodell`,"claude.smallFastModelHint":`Das Modell für Hintergrundarbeit wie Chat-Zusammenfassungen und Themenerkennung. Auch der haiku-Alias der Subagenten nutzt es. Leer = Claude-Standard (Haiku).`,"claude.smallFastModelAccurateHint":`Das Modell, das Claude Code für Hintergrundaufgaben wie Chat-Zusammenfassungen und Themenerkennung verwendet. Auch der haiku-Alias der Subagenten nutzt es.`,"claude.smallFastModelUnsetOption":`Claude Code wählen lassen (natives Modell)`,"claude.smallFastModelNativeWarning":`Wenn kein Modell gewählt ist, setzt OpenCodex keine Hilfsmodell-Overrides. Claude Code kann dann sein natives Sonnet-Modell verwenden, wodurch Kosten bei deinem nativen Anbieter entstehen können.`,"claude.slotUnset":`Claude-Standard verwenden`,"claude.modelMap":`Modell-Abfangen`,"claude.modelMapHint":`Fängt Anfragen für ein bestimmtes Modell ab und leitet sie an das gewählte Modell um. Standardmäßig leer — wirkt erst mit einer Regel.`,"claude.mapFrom":`Originalmodell (z. B. claude-sonnet-4-5)`,"claude.mapTo":`Ersetzen durch (z. B. gemini/gemini-3-pro)`,"claude.addMapping":`Regel hinzufügen`,"claude.removeMapping":`Regel entfernen`,"claude.aliases":`Verfügbare Modelle`,"claude.aliasesHint":`Modelle, die im /model-Menü von Claude Code erscheinen.`,"claude.aliasProviderOther":`Sonstiges`,"claude.loading":`Lädt…`,"claude.loadFail":`Claude-Einstellungen konnten nicht geladen werden`,"claude.saved":`Gespeichert.`,"claude.saveFailed":`Speichern fehlgeschlagen`,"claude.networkError":`Netzwerkfehler — läuft der Proxy?`,"claude.toggleAria":`Claude-Verbindung umschalten`,"claude.none":`Keine`,"common.close":`Schließen`,"common.ok":`OK`,"app.logoAria":`opencodex-Logo`,"app.claudeOn":`Claude AN`,"app.claudeOff":`Claude AUS`,"usage.dayMon":`Mo`,"usage.dayWed":`Mi`,"usage.dayFri":`Fr`,"usage.heatmap.tooltipTokens":`{tokens} Tokens`,"usage.heatmap.tooltipRequests":`{requests} Anfragen`,"nav.storage":`Speicher`,"storage.title":`Speicher`,"storage.subtitle":`Zeigt, was CODEX_HOME belegt. Die Bereinigung lässt aktive Sitzungen unberührt.`,"storage.loading":`Speicher wird gescannt…`,"storage.empty":`CODEX_HOME ist leer oder fehlt — nichts zu berichten.`,"storage.error":`Speicher-Scan fehlgeschlagen. Prüfe, ob CODEX_HOME auf ein gültiges Verzeichnis zeigt.`,"storage.refresh":`Neu scannen`,"storage.rescanned":`Scan abgeschlossen.`,"storage.card.total":`Gesamtgröße`,"storage.card.files":`Dateien`,"storage.card.home":`CODEX_HOME`,"storage.snapshot.lastScan":`Letzter Scan`,"storage.snapshot.scanning":`Scanne…`,"storage.snapshot.unavailable":`Noch kein Scan.`,"storage.cleanupCard.title":`Speicher freigeben`,"storage.cleanupCard.tabs":`Bereinigungsoptionen`,"storage.cleanupCard.tab.policy":`Richtlinie`,"storage.cleanupCard.tab.quarantine":`Quarantäne`,"storage.cleanup.noArchives":`Keine archivierten Sitzungen zum Bereinigen.`,"storage.section.buckets":`Bereiche`,"storage.section.largest":`Größte Dateien`,"storage.workspace.overview":`Übersicht`,"storage.workspace.selectBucket":`Wähle einen Bucket aus der Liste, um die Aufschlüsselung zu sehen.`,"storage.col.bucket":`Bereich`,"storage.col.size":`Größe`,"storage.col.files":`Dateien`,"storage.col.oldest":`Älteste`,"storage.col.newest":`Neueste`,"storage.col.rows":`DB-Zeilen`,"storage.rows.unknown":`unbekannt (gesperrt)`,"storage.bucket.sessions":`Aktive Sitzungen`,"storage.bucket.archived_sessions":`Archivierte Sitzungen`,"storage.bucket.logs_db":`Log-Datenbank`,"storage.bucket.state_db":`Status-Datenbank`,"storage.bucket.attachments":`Anhänge`,"storage.bucket.deletion_manifests":`Lösch-Manifeste`,"storage.bucket.other":`Sonstiges`,"storage.cleanup.title":`Archivbereinigung`,"storage.cleanup.help":`Entfernt die ältesten archivierten Sitzungen nach Prozentsatz. Aktive Sitzungen werden nie angefasst. Standard ist Quarantäne — Dateien wandern nach CODEX_HOME/.trash.`,"storage.cleanup.slider":`Ältester Archivanteil`,"storage.cleanup.percent":`{percent}%`,"storage.cleanup.preset":`{percent}`,"storage.cleanup.preview":`Vorschau`,"storage.cleanup.confirmTitle":`Archivbereinigung bestätigen`,"storage.cleanup.confirmBody":`Es werden {count} archivierte Datei(en) (~{size}) verarbeitet, die ältesten {percent}%.`,"storage.cleanup.moreFiles":`…und {n} weitere`,"storage.cleanup.permanent":`Dauerhaft löschen (ohne Quarantäne)`,"storage.cleanup.permanentWarn":`Dauerhaftes Löschen kann nicht rückgängig gemacht werden.`,"storage.cleanup.quarantineNote":`Dateien wandern nach .trash unter CODEX_HOME. Du kannst sie im Tab Quarantäne wiederherstellen.`,"storage.cleanup.cancel":`Abbrechen`,"storage.cleanup.confirmQuarantine":`In Quarantäne`,"storage.cleanup.confirmPermanent":`Dauerhaft löschen`,"storage.cleanup.doneQuarantine":`{count} Datei(en) in Quarantäne ({size}).`,"storage.cleanup.donePermanent":`{count} Datei(en) dauerhaft gelöscht ({size}).`,"storage.cleanup.previewFailed":`Vorschau fehlgeschlagen.`,"storage.cleanup.cleanupFailed":`Bereinigung fehlgeschlagen.`,"storage.cleanup.err.codex_busy":`Codex verwendet state.sqlite — beende Codex und versuche es erneut.`,"storage.cleanup.err.stale_preview":`Archivdateien haben sich seit der Vorschau geändert — führe Vorschau erneut aus.`,"storage.cleanup.err.restore_pending_overlap":`Ausgewählte Archive überschneiden sich mit einer unvollständigen Wiederherstellung — zuerst Wiederherstellung abschließen oder erneut versuchen.`,"storage.cleanup.err.referenced_history":`Ausgewählte Archive werden noch von Fork- oder paginierter Historie referenziert.`,"storage.cleanup.err.invalid_digest":`Vorschaudigest fehlt oder ist ungültig.`,"storage.cleanup.err.invalid_mode":`Modus muss quarantine oder permanent sein.`,"storage.cleanup.err.fs_failed":`Dateisystem-Bereinigung fehlgeschlagen. Einige Änderungen können bereits angewendet sein — prüfen Sie CODEX_HOME/.trash und den angezeigten Wiederherstellungspfad.`,"storage.cleanup.err.fs_failed_trash":`Dateisystem-Bereinigung fehlgeschlagen. Einige Änderungen können bereits angewendet sein — prüfen Sie {trashDir} und manifest.json auf wiederherstellbare Dateien.`,"storage.cleanup.err.db_reconcile_failed":`Codex-Statusdatenbank konnte nicht aktualisiert werden.`,"storage.cleanup.err.cleanup_failed":`Bereinigung fehlgeschlagen.`,"storage.trash.title":`Quarantäne`,"storage.trash.help":`Archivierte Sitzungen in CODEX_HOME/.trash. Wiederherstellen legt JSONL-Dateien und Thread-Zeilen zurück.`,"storage.trash.empty":`Keine Quarantäne-Einträge.`,"storage.trash.loading":`Quarantäne wird geladen…`,"storage.trash.col.when":`Quarantäne seit`,"storage.trash.col.files":`Dateien`,"storage.trash.col.size":`Größe`,"storage.trash.col.mode":`Modus`,"storage.trash.col.id":`Eintrag`,"storage.trash.restore":`Wiederherstellen`,"storage.trash.confirmTitle":`Quarantäne-Eintrag wiederherstellen?`,"storage.trash.confirmBody":`{count} Datei(en) (~{size}) aus {id} zurück in archivierte Sitzungen legen.`,"storage.trash.cancel":`Abbrechen`,"storage.trash.confirmRestore":`Wiederherstellen`,"storage.trash.done":`{count} Datei(en) wiederhergestellt ({size}).`,"storage.trash.restoreFailed":`Wiederherstellung fehlgeschlagen.`,"storage.trash.listFailed":`Quarantäne-Einträge konnten nicht geladen werden.`,"storage.trash.mode.quarantine":`quarantine`,"storage.trash.mode.permanent":`permanent (unvollständig)`,"storage.trash.err.codex_busy":`Codex verwendet state.sqlite — beende Codex und versuche es erneut.`,"storage.trash.err.invalid_trash":`Trash-Eintrags-ID fehlt oder ist ungültig.`,"storage.trash.err.missing_trash":`Trash-Eintrag wurde nicht gefunden.`,"storage.trash.err.dest_exists":`Wiederherstellungsziel existiert bereits — entferne oder benenne die Archivdatei um und versuche es erneut.`,"storage.trash.err.fs_failed":`Dateisystem-Wiederherstellung fehlgeschlagen. Einige Dateien können bereits wiederhergestellt sein — prüfe archived_sessions und .trash.`,"storage.trash.err.storage_mutation_busy":`Eine andere Speicher-Bereinigung oder Wiederherstellung läuft — bitte kurz warten.`,"storage.trash.err.db_reconcile_failed":`Codex-Statusdatenbankzeilen konnten nicht wiederhergestellt werden.`,"storage.trash.err.restore_failed":`Wiederherstellung fehlgeschlagen.`,"storage.trash.err.restore_worker_timeout":`Wiederherstellung dauerte zu lange (über 10 Minuten) und wurde abgebrochen.`,"storage.trash.err.restore_worker_aborted":`Wiederherstellung wurde beim Herunterfahren abgebrochen.`,"storage.trash.err.restore_worker_failed":`Wiederherstellungs-Worker ist abgestürzt oder unerwartet fehlgeschlagen.`,"storage.policy.title":`Automatische Bereinigungsrichtlinie`,"storage.policy.help":`Optionale Stapelbereinigung, wenn archivierte Sitzungen einen Schwellwert überschreiten. Standardmäßig aus — wird nie automatisch aktiviert.`,"storage.policy.loading":`Richtlinie wird geladen…`,"storage.policy.loadFailed":`Bereinigungsrichtlinie konnte nicht geladen werden.`,"storage.policy.saveFailed":`Bereinigungsrichtlinie konnte nicht gespeichert werden.`,"storage.policy.runFailed":`Richtlinienlauf fehlgeschlagen.`,"storage.policy.alreadyRunning":`Ein Bereinigungsrichtlinienlauf läuft bereits.`,"storage.policy.invalid":`Ungültige Richtlinienwerte.`,"storage.policy.enabled":`Automatische Bereinigung aktivieren`,"storage.policy.enabledHint":`Standard ist aus. Bei Aktivierung nur nach gewähltem Zeitplan (oder Jetzt ausführen).`,"storage.policy.threshold":`Wenn Archivgröße größer als (GiB)`,"storage.policy.trigger":`Auslöser`,"storage.policy.target":`Bereinigungsziel`,"storage.policy.targetPercent":`Älteste Archive entfernen (%)`,"storage.policy.targetReduce":`Archivgröße reduzieren auf (GiB)`,"storage.policy.thresholdInc":`Schwellwert erhöhen`,"storage.policy.thresholdDec":`Schwellwert verringern`,"storage.policy.percentInc":`Prozent erhöhen`,"storage.policy.percentDec":`Prozent verringern`,"storage.policy.reduceInc":`Zielgröße erhöhen`,"storage.policy.reduceDec":`Zielgröße verringern`,"storage.policy.schedule":`Zeitplan`,"storage.policy.schedule.manual":`Nur manuell`,"storage.policy.schedule.startup":`Beim Proxy-Start`,"storage.policy.schedule.daily":`Täglich`,"storage.policy.schedule.weekly":`Wöchentlich`,"storage.policy.mode":`Löschmodus`,"storage.policy.mode.quarantine":`Quarantäne (Standard)`,"storage.policy.mode.permanent":`Endgültig löschen`,"storage.policy.permanentWarn":`Endgültiger Modus kann nicht rückgängig gemacht werden. Quarantäne bevorzugen, sofern unsicher.`,"storage.policy.lastRun":`Letzter Lauf`,"storage.policy.lastRunDetail":`{count} entfernt · {size} freigegeben`,"storage.policy.nextRun":`Nächster Lauf`,"storage.policy.never":`Nie`,"storage.policy.save":`Speichern`,"storage.policy.runNow":`Jetzt ausführen`,"storage.policy.running":`Läuft…`,"storage.policy.saved":`Richtlinie gespeichert.`,"storage.policy.skippedDisabled":`Richtlinie ist deaktiviert — zuerst aktivieren.`,"storage.policy.skippedUnder":`Archivgröße unter dem Schwellwert — nichts zu tun.`,"storage.policy.skippedEmpty":`Keine Archivkandidaten passend zum Ziel.`,"storage.policy.doneQuarantine":`Richtlinie hat {count} Datei(en) in Quarantäne ({size}).`,"storage.policy.donePermanent":`Richtlinie hat {count} Datei(en) endgültig gelöscht ({size}).`,"modal.back":`Zurück`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`Benutzerdefinierter Anbieter`,"modal.failedStatus":`Fehlgeschlagen ({status})`,"modal.loginError":`Login-Fehler: {error}`,"modal.badge.codexLogin":`Codex-Login`,"modal.badge.local":`Lokal`,"modal.badge.apiKey":`API-Schlüssel`,"modal.badge.direct":`Direct`,"modal.badge.pool":`Pool`,"modal.badge.free":`Kostenlos`,"modal.invalidPreset":`Diese integrierte Anbietervorlage ist unvollständig. Starten Sie den Proxy neu und versuchen Sie es erneut.`,"modal.freeTierTitle":`Kostenloser Tarif`,"modal.freeTierDefault":`Kein API-Schlüssel nötig. Funktioniert sofort.`,"modal.tab.accounts":`Konten`,"modal.tab.free":`Kostenlos`,"modal.tab.paid":`Bezahlt`,"modal.accountsHint":`Hier ChatGPT/Codex, OAuth-Provider und API-Key-Konten anmelden. OpenAI ist eingebaut — anmelden statt erneut hinzufügen.`,"modal.accountsCodexAuthLink":`Codex Auth`,"modal.notListed":`Provider nicht dabei? Eigenen hinzufügen`,"modal.catalogLoading":`Katalog wird geladen…`,"modal.accountLogin":`Anmelden`,"modal.accountLogout":`Abmelden`,"modal.accountAdd":`Konto hinzufügen`,"modal.accountManage":`Verwalten`,"modal.accountCodexPool":`ChatGPT-Kontopool`,"modal.accountLoggedIn":`Angemeldet`,"modal.accountLoggedOut":`Nicht angemeldet`,"quota.fiveHourLimit":`5-Stunden-Limit`,"quota.weeklyLimit":`Wochenlimit`,"quota.monthlyLimit":`30-Tage-Limit`,"quota.monthlyCredits":`Monatliches Guthaben`,"quota.requestWindow":`Anfragefenster`,"quota.grokBuild":`GrokBuild`,"quota.cursorFirstParty":`Erstanbieter-Modelle`,"quota.cursorApiUsage":`API-Nutzung`,"quota.totalSubscriptionCredits":`Gesamtes Abo-Guthaben`,"quota.usedPercent":`{pct} % genutzt`,"quota.limitReached":`Limit erreicht`,"quota.resetsToday":`Zurücksetzung heute um {time}`,"quota.resetsTomorrow":`Zurücksetzung morgen um {time}`,"quota.resetsAt":`Zurücksetzung {when}`,"quota.resetsRelativeMinutes":`Zurücksetzung in {n} Min.`,"quota.resetsRelativeHours":`Zurücksetzung in {n} Std.`,"pws.status.ready":`Bereit`,"pws.status.needsSetup":`Einrichtung nötig`,"pws.status.needsAttention":`Aufmerksamkeit nötig`,"pws.auth.chatgptPassthrough":`ChatGPT-Passthrough`,"pws.auth.noKey":`Kein Schlüssel nötig`,"pws.freeTitle":`Kostenlos (Schlüssel ggf. erforderlich)`,"pws.localTitle":`Lokale Laufzeit`,"pws.modelCountOne":`1 Modell`,"pws.modelCount":`{count} Modelle`,"pws.rail.suffixDefault":` · Standard`,"pws.rail.suffixLocal":` · lokal`,"pws.rail.suffixFree":` · kostenlos`,"pws.rail.selectAria":`{name} auswählen — {status}{suffix}`,"pws.searchPlaceholder":`Provider durchsuchen…`,"pws.filterAria":`Provider filtern`,"pws.providerFiltersAria":`Provider-Filter`,"pws.filters":`Filter`,"pws.filterStatus":`Status`,"pws.pricing":`Preis`,"pws.paid":`Bezahlt`,"pws.filterType":`Typ`,"pws.type.cloud":`Cloud`,"pws.type.local":`Lokal`,"pws.type.selfHosted":`Selbst gehostet`,"pws.type.login":`Login`,"pws.sort":`Sortierung`,"pws.sortProvidersAria":`Provider sortieren`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`Kostenlos zuerst`,"pws.sort.paidFree":`Bezahlt zuerst`,"pws.sort.accountsFirst":`Konten zuerst`,"pws.resetAll":`Alle zurücksetzen`,"pws.providerList":`Provider-Liste`,"pws.providersAria":`Provider`,"pws.groupReady":`Bereit ({count})`,"pws.groupNeedsSetup":`Einrichtung nötig ({count})`,"pws.groupDisabled":`Deaktiviert ({count})`,"pws.noSearchResults":`Keine Provider entsprechen der Suche.`,"pws.noMatchFilters":`Keine Provider entsprechen den Filtern.`,"pws.noProvidersConfigured":`Keine Provider konfiguriert.`,"pws.workspaceMainAria":`Provider-Details`,"pws.detailComingSoon":`Detailansicht folgt — nutze die klassische Ansicht zur Verwaltung.`,"pws.selectPrompt":`Wähle einen Provider aus der Liste.`,"pws.connectFirst":`Verbinde deinen ersten Provider`,"pws.empty.browseFree":`Kostenlose Provider ansehen`,"pws.empty.browseFreeDesc":`Ohne Abo starten`,"pws.empty.connectAccount":`Konto verbinden`,"pws.empty.connectAccountDesc":`ChatGPT- oder Provider-Login nutzen`,"pws.empty.addEndpoint":`Endpunkt hinzufügen`,"pws.empty.addEndpointDesc":`Eigene Base-URL und API-Schlüssel`,"pws.tab.overview":`Übersicht`,"pws.tab.models":`Modelle`,"pws.tab.usage":`Nutzung`,"pws.tab.accounts":`Konten`,"pws.tab.settings":`Einstellungen`,"pws.connection":`Verbindung`,"pws.status.connected":`Verbunden`,"pws.attentionTitle":`Aufmerksamkeit nötig`,"pws.attention.reauth":`Aktives Konto muss erneut authentifiziert werden`,"pws.attention.reauthForward":`Aktives Codex-Konto muss erneut authentifiziert werden — unter Konten beheben`,"pws.attention.missingCredentials":`Anmeldedaten fehlen`,"pws.cell.auth":`Authentifizierung`,"pws.cell.note":`Notiz`,"pws.cell.defaultModel":`Standardmodell`,"pws.statsAria":`Provider-Statistiken`,"pws.statsTitle":`Statistiken`,"pws.stats.totalRequests":`Anfragen (30 T.)`,"pws.stats.totalTokens":`Tokens (30 T.)`,"pws.stats.quotaUpdated":`Kontingent aktualisiert`,"pws.stats.quotaTracked":`Limits siehe Nutzungs-Tab.`,"pws.stats.source":`Quelle`,"pws.usageLast30d":`Nutzung (letzte 30 Tage)`,"pws.estimatedCost":`Geschätzte Kosten`,"pws.costDisclaimer":`Schätzung basierend auf API-Listenpreisen, keine tatsächliche Abrechnung.`,"pws.modelBreakdown":`Modellaufschlüsselung`,"pws.col.model":`Modell`,"pws.col.cost":`Gesch. Kosten`,"pws.col.tokens":`Token`,"pws.col.requests":`Anfr.`,"pws.col.share":`Anteil`,"pws.tokenInput":`Eingabe`,"pws.tokenOutput":`Ausgabe`,"pws.metricRequests":`Anfragen`,"pws.metricTokens":`Tokens`,"pws.usageUnavailable":`Noch keine Nutzung erfasst.`,"pws.rateLimits":`Limits`,"pws.quotaUnavailable":`Keine Kontingentdaten für diesen Provider.`,"pws.accountQuotaUnavailable":`Ratenlimit-Daten vorübergehend nicht verfügbar; falls vorhanden, werden zuletzt bekannte Werte angezeigt.`,"pws.accountPlan":`Kontotarif`,"pws.accountPlanOnly":`{plan} — kein monatliches Guthaben (Grok-CLI-OAuth liefert keine Web-Aufgabenlimits).`,"pws.selected":`Ausgewählt`,"pws.copyModelId":`ID kopieren`,"pws.modelCopied":`Kopiert!`,"pws.modelsAvailable":`{count} verfügbar`,"pws.modelSearchPlaceholder":`Modelle filtern…`,"pws.modelsLoading":`Modelle werden geladen…`,"pws.modelsLoadFailed":`Modelle konnten nicht geladen werden.`,"pws.modelsNeedsReauth":`Konto muss neu angemeldet werden, bevor Live-Modelle geladen werden. Zeige konfigurierte Modelle.`,"pws.modelsConfiguredFallback":`Zeige konfigurierte Modelle (Live-Erkennung nicht verfügbar).`,"pws.modelsTruncated":`Zeige die ersten {shown} von {total} Modellen. Filtern, um die Liste einzugrenzen.`,"pws.retry":`Erneut versuchen`,"pws.noModels":`Keine Modelle für diesen Provider gefunden.`,"pws.noModelMatch":`Keine Modelle entsprechen dem Filter.`,"pws.adapterBaseRequired":`Adapter und Basis-URL sind erforderlich.`,"pws.addAccount":`Konto hinzufügen`,"pws.addKey":`API-Schlüssel hinzufügen`,"pws.apiKeys":`API-Schlüssel`,"pws.authMode":`Auth-Modus`,"pws.availableAccounts":`Verfügbare Konten`,"pws.accountOrdinal":`Konto {count}`,"pws.accountsLoading":`Konten werden geladen…`,"pws.accountsLoadFailed":`Konten konnten nicht geladen werden.`,"pws.retryAccounts":`Erneut versuchen`,"pws.noAccounts":`Noch keine Konten verbunden.`,"pws.accountSwitching":`Wechsel läuft…`,"pws.accountCurrent":`Aktuelles Konto`,"pws.defaultModelNone":`Keins (Standard des Anbieters verwenden)`,"pws.discardSettings":`Verwerfen`,"pws.jsonEditorDesc":`Bearbeiten Sie die JSON-Konfiguration des Anbieters. Änderungen werden sofort gespeichert.`,"pws.jsonEditorTitle":`JSON-Editor — {name}`,"pws.jsonRestore":`Wiederherstellen`,"pws.jsonSave":`Speichern`,"pws.loggedInTitle":`Angemeldet`,"pws.notLoggedInTitle":`Nicht angemeldet`,"pws.note":`Notiz`,"pws.allowPrivateNetwork":`Lokales/privates Netzwerk erlauben`,"pws.liveModels":`Modelle beim Anbieter erkennen`,"pws.liveModelsDesc":`Lädt den Live-Modellkatalog des Anbieters. Ausschalten, um nur konfigurierte statische Modelle zu verwenden.`,"pws.optionalPlaceholder":`Optional`,"pws.providerId":`Anbieter-ID`,"pws.reauth":`Erneute Anmeldung erforderlich`,"pws.reauthenticate":`Erneut authentifizieren`,"pws.copyDoctor":`ocx doctor kopieren`,"pws.doctorCopied":`Kopiert`,"pws.healthCooldownHint":`Warten Sie, bis die Abkühlzeit endet. Prüfen Sie dieses Konto noch nicht.`,"pws.doctorCopyUnavailable":`Zwischenablage nicht verfügbar`,"pws.healthLabel.rateLimited":`Ratelimit`,"pws.healthLabel.quotaLimited":`Kontingent begrenzt`,"pws.healthLabel.reauthRequired":`Erneute Anmeldung erforderlich`,"pws.healthLabel.refreshFailed":`Aktualisierung fehlgeschlagen`,"pws.healthLabel.metadataMismatch":`Metadaten stimmen nicht überein`,"pws.healthLabel.credentialConflict":`Anmeldedaten-Konflikt`,"pws.healthSummary.rateLimited":`{provider} {account}: ratelimited bis {until}. Routing für dieses Konto ist bis dahin pausiert.`,"pws.healthSummary.quotaLimited":`{provider} {account}: Kontingent begrenzt bis {until}. Routing für dieses Konto ist bis dahin pausiert.`,"pws.healthSummary.reauthRequired":`{provider} {account}: erneute Anmeldung erforderlich.`,"pws.healthSummary.credentialConflict":`{provider} {account}: Anmeldedaten-Konflikt.`,"pws.healthSummary.metadataMismatch":`{provider} {account}: Metadaten stimmen nicht überein.`,"pws.healthSummary.staleCredentials":`{provider} {account}: unvollständige Anmeldedaten.`,"pws.removeConfirm":`Entfernen`,"pws.removeConfirmBody":`Anbieter "{name}" entfernen? Dies kann nicht rückgängig gemacht werden.`,"pws.removeDefaultConfirmBody":`Standardanbieter "{name}" entfernen? "{defaultProvider}" wird zum Standardanbieter. Dies kann nicht rückgängig gemacht werden.`,"pws.removeConfirmTitle":`Anbieter entfernen`,"pws.saveSettings":`Speichern`,"pws.saving":`Wird gespeichert…`,"pws.settingsSaved":`Einstellungen gespeichert.`,"pws.settingsUnsavedBar":`Es gibt ungespeicherte Änderungen.`,"pws.unsavedLeaveBody":`Es gibt ungespeicherte Änderungen. Vor dem Verlassen speichern?`,"pws.unsavedLeaveTitle":`Ungespeicherte Änderungen`,"pws.attentionRequired":`Aufmerksamkeit erforderlich`,"pws.attentionAria":`{name}: {reason}`,"pws.missingCredentials":`Zugangsdaten fehlen`,"pws.editJsonDesc":`Rohe Proxy-Konfiguration als JSON bearbeiten`,"pws.updatesUnavailable":`Anbieter-Updates sind nicht verfügbar.`,"pws.dashboard.title":`Anbieterübersicht`,"pws.dashboard.subtitle":`Verwalten Sie alle Ihre Modellanbieter an einem Ort.`,"pws.dashboard.rateLimits":`RATE LIMITS`,"pws.dashboard.recentlyUsed":`KÜRZLICH VERWENDET`,"pws.dashboard.requests":`{count} Anfragen`,"pws.dashboard.checkedAgo":`Geprüft {time}`,"pws.dashboard.noQuota":`Keine Kontingentdaten`,"pws.dashboard.noUsage":`Noch keine Nutzungsdaten`,"pws.dashboard.noRateLimits":`Noch keine Limit-Daten`,"pws.allProviders":`Anbieterübersicht`,"pws.enabledLabel":`Aktiviert`,"pws.testConnection":`Verbindung testen`,"pws.testing":`Teste…`,"pws.connectionOk":`Verbindung OK`,"pws.connectionFailed":`Verbindung fehlgeschlagen`,"pws.connectionNotApplicable":`Nicht zutreffend — dieser Anbieter verwendet einen statischen Modellkatalog.`,"pws.editSettings":`Einstellungen bearbeiten`,"pws.viewUsage":`Detaillierte Nutzung anzeigen`,"pws.allSystemsOk":`Alle Systeme betriebsbereit`,"pws.apiKeyConfigured":`API-Schlüssel konfiguriert`,"pws.addApiKey":`API-Schlüssel hinzufügen`,"pws.loggedInAs":`Angemeldet als {email}`,"pws.notLoggedIn":`Nicht angemeldet`,"pws.passthrough":`Codex-Passthrough`,"pws.notes":`NOTIZEN`,"pws.notePlaceholder":`Notiz zu diesem Anbieter hinzufügen...`,"pws.noteSaved":`Notiz gespeichert`,"pws.authSummary":`AUTHENTIFIZIERUNG`,"time.justNow":`Gerade eben`,"time.notChecked":`Nicht geprüft`,"time.minutesAgo":`vor {n} Min.`,"time.hoursAgo":`vor {n} Std.`,"time.daysAgo":`vor {n} T.`,"modal.noMatch":`Kein Treffer.`,"modal.oauthDefaultNote":`Mit deinem Konto anmelden — kein API-Schlüssel nötig.`,"modal.oauthComingSoon":`OAuth-Login für {label} kommt im nächsten Update. Nutze vorerst einen API-Schlüssel.`,"modal.oauthComingSoonShort":`OAuth-Login für diesen Anbieter kommt im nächsten Update — nutze vorerst einen API-Schlüssel.`,"modal.useApiKeyInstead":`Stattdessen API-Schlüssel verwenden`,"modal.setupGuide":`Einrichtungsanleitung`,"modal.setupStep1Prefix":`Gehe zu`,"modal.setupDashboardLink":`{label}-Dashboard`,"modal.setupStep1Suffix":`und kopiere deinen API-Schlüssel`,"modal.setupStep2":`Füge ihn unten in das API-Schlüssel-Feld ein`,"modal.setupStep3":`Klicke auf Anbieter hinzufügen — Modelle werden automatisch erkannt`,"modal.namePlaceholder":`z. B. openrouter`,"modal.duplicateWarn":`Anbieter "{name}" existiert und wird überschrieben.`,"modal.forwardHintPrefix":`Kein Schlüssel nötig — der Proxy leitet deine`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`Anmeldedaten an diesen Anbieter weiter.`,"modal.localHint":`Es wird kein API-Schlüssel gespeichert. Damit wird Cursors öffentlicher Modellkatalog für Codex hinzugefügt; live Cursor-Transport und native Datei-/Shell-Ausführung bleiben deaktiviert, bis sie geprüft sind.`,"modal.getApiKey":`{label}-API-Schlüssel holen`,"modal.apiKey":`API-Schlüssel`,"modal.apiKeyTransport":`API-Schlüssel-Header`,"modal.apiKeyTransportNative":`x-api-key (Anthropic-Standard)`,"modal.apiKeyTransportBearer":`Authorization: Bearer`,"modal.apiKeyPlaceholder":`sk-… (oder $ENV_VAR)`,"modal.defaultModelPlaceholder":`z. B. gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.baseUrlPlaceholderError":`Base-URL enthält einen ungelösten {Platzhalter}. Ersetze ihn durch deinen tatsächlichen Wert.`,"modal.baseUrlPlaceholderHint":`Ersetze den {Platzhalter} in der Base-URL durch deine tatsächliche Account-ID, bevor du hinzufügst.`,"modal.adding":`Wird hinzugefügt…`,"modal.useOauthLogin":`← OAuth-Login verwenden`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team…`,"codexAuth.resetCreditsAria":`{count} Reset-Guthaben`,"claude.pageTitle":`Claude Code`,"claude.workspace.settings":`Einstellungen`,"cws.loading":`Combos werden geladen…`,"cws.loadFailed":`Combos konnten nicht geladen werden.`,"cws.saveFailed":`Combo konnte nicht gespeichert werden.`,"cws.removeFailed":`Combo konnte nicht entfernt werden.`,"cws.saved":`Combo gespeichert.`,"cws.created":`{model} erstellt.`,"cws.removed":`combo/{id} entfernt.`,"cws.renamed":`{from} wurde in {to} umbenannt.`,"cws.add":`Combo hinzufügen`,"cws.addTitle":`Combo hinzufügen`,"cws.addSubtitle":`Erstellen Sie ein virtuelles Modell über mehrere Anbieter und wählen Sie den exakten Modellnamen für Clients.`,"cws.create":`Combo erstellen`,"cws.railAria":`Combo-Liste`,"cws.searchPlaceholder":`Combos oder Ziele suchen…`,"cws.noSearchResults":`Keine Combos passen zur Suche.`,"cws.group.failover":`Failover`,"cws.group.roundRobin":`Round-Robin`,"cws.targetCount":`{count} Ziele`,"cws.targetCountOne":`1 Ziel`,"cws.overviewTitle":`Combos`,"cws.overviewBlurb":`Virtuelle Modelle mit Failover über Anbieter/Modell-Ziele oder deterministischem Smooth Weighted Round-Robin.`,"cws.count.total":`Gesamt`,"cws.count.failover":`Failover`,"cws.count.roundRobin":`Round-Robin`,"cws.howTitle":`So funktioniert es`,"cws.howBody":`Fordern Sie in Codex den öffentlichen Modellnamen der Combo an. Ohne eigenen Namen gilt combo/<id>. OpenCodex wählt ein Ziel und springt nur bei wiederholbaren Upstream-Fehlern. Ist kein Ziel verfügbar, schlägt die Anfrage geschlossen fehl, statt den globalen Standardanbieter zu verwenden.`,"cws.attentionTitle":`Aufmerksamkeit nötig`,"cws.attention.empty":`Keine Ziele konfiguriert`,"cws.attention.few":`Nur ein Ziel — Failover hat kein Ersatzziel`,"cws.attention.catalogOmitted":`Fehlt im Modellkatalog — Mitgliederfähigkeiten sind unvollständig oder inkompatibel (fehlendes Context-Window/Metadaten oder leere Modalitäts-Schnittmenge). Routing per Alias funktioniert weiterhin`,"cws.emptyTitle":`Erste Combo erstellen`,"cws.empty.createDesc":`Virtuelles Modell benennen und zwei oder mehr Backends verketten.`,"cws.backToAll":`Zurück zu allen Combos`,"cws.allCombos":`Alle Combos`,"cws.copyModel":`ID kopieren`,"cws.copied":`Kopiert`,"cws.tab.config":`Konfiguration`,"cws.tab.about":`Info`,"cws.strategy":`Strategie`,"cws.strategy.failover":`Failover`,"cws.strategy.roundRobin":`Round-Robin`,"cws.strategy.failoverHint":`Ziele der Reihe nach versuchen. Bei einem wiederholbaren Fehler (Limit, Ausfall, Abo-Sperre) zum nächsten springen.`,"cws.strategy.roundRobinHint":`Datenverkehr deterministisch nach Gewicht verteilen. Das gewählte Ziel für einen Block erfolgreicher Anfragen behalten und dann weiterschalten.`,"cws.field.id":`Combo-ID`,"cws.field.idHintEdit":`Das Ändern der ID benennt die Combo um. Clients fordern {model} an.`,"cws.field.alias":`Öffentlicher Modellname`,"cws.field.aliasPlaceholder":`deepseek-v4-flash oder vendor/model`,"cws.field.aliasHint":`Optional. Verwenden Sie einen Namen ohne Präfix, ein eigenes Präfix wie vendor/model oder lassen Sie das Feld leer für combo/<id>.`,"cws.field.idHint":`Clients fordern {model} an`,"cws.field.idInternalHint":`Interne Combo-ID. Sie kann nach dem Erstellen geändert werden.`,"cws.field.stickyLimit":`Sticky-Erfolge vor Rotation`,"cws.field.stickyLimitHint":`Das gewählte Ziel für so viele erfolgreiche Anfragen behalten, bevor die gewichtete Auswahl weiterschaltet.`,"cws.field.defaultEffort":`Standard-Reasoning`,"cws.field.defaultEffortNone":`Keine (Ziel-Standard)`,"cws.field.defaultEffortHint":`Nur verwendet, wenn der Client keinen Reasoning-Aufwand sendet. Optionen sind die Schnittmenge der beworbenen Aufwände der gewählten Ziele.`,"cws.field.defaultEffortUnsupported":`Dieser Aufwand liegt nicht in der gemeinsamen Leiter der Ziele — er wird zur Anfragezeit ignoriert oder angepasst.`,"cws.field.defaultEffortUnsupportedOption":`nicht in der Schnittmenge`,"cws.targets":`Ziele`,"cws.targets.failoverHint":`Reihenfolge zählt — das erste ist primär.`,"cws.targets.roundRobinHint":`Gewichte steuern die deterministische relative Auswahl; die Reihenfolge löst Gleichstände im Rotationsring.`,"cws.target.provider":`Anbieter`,"cws.target.model":`Modell`,"cws.target.weight":`Gewicht`,"cws.target.pickProvider":`Anbieter wählen…`,"cws.target.pickProviderFirst":`Zuerst Anbieter wählen…`,"cws.target.pickModel":`Modell wählen…`,"cws.target.noModels":`Keine Modelle für diesen Anbieter`,"cws.target.modelPlaceholder":`Modell-ID`,"cws.target.add":`Ziel hinzufügen`,"cws.target.drag":`Ziehen zum Umsortieren`,"cws.target.moveUp":`Nach oben`,"cws.target.moveDown":`Nach unten`,"cws.aboutTitle":`Laufzeit`,"cws.aboutBody":`Fehlgeschlagene Ziele kühlen kurz ab; Retry-After wird beachtet. Ungültige oder Kontextfehler springen nicht. Jedes Ziel passt den Aufwand an seine Fähigkeiten an; erschöpfte Combos schlagen geschlossen fehl. Protokolle und Nutzung behalten geordnete physische Versuche samt Nutzung je Versuch.`,"cws.removeConfirmTitle":`{model} entfernen?`,"cws.removeConfirmDesc":`Entfernt das virtuelle Modell aus Config und Codex-Katalog. Anbieter bleiben erhalten.`,"cws.unsavedTitle":`Ungespeicherte Änderungen`,"cws.unsavedDesc":`Änderungen an dieser Combo verwerfen und fortfahren?`,"cws.keepEditing":`Weiter bearbeiten`,"cws.err.missingId":`Combo-ID ist erforderlich.`,"cws.err.invalidId":`ID muss mit Buchstabe/Zahl beginnen und darf nur Buchstaben, Zahlen, Punkte, Unterstriche oder Bindestriche enthalten (max. 64).`,"cws.err.duplicateId":`Eine Combo mit dieser ID existiert bereits.`,"cws.err.invalidAlias":`Der Alias darf nur Buchstaben, Zahlen, Punkte, Unterstriche oder Bindestriche enthalten, mit höchstens einem "/"-Segment.`,"cws.err.aliasReservedNamespace":`Der Alias darf den reservierten Namensraum "combo/" nicht verwenden.`,"cws.err.aliasNativeFamily":`Einfache Aliase aus der OpenAI-nativen Familie (gpt-*, o1-*, o3-*, o4-*, codex-*) sind nicht erlaubt.`,"cws.err.duplicateAlias":`Eine andere Combo verwendet diesen Alias bereits.`,"cws.err.noTargets":`Mindestens ein Ziel hinzufügen.`,"cws.err.incompleteTarget":`Jedes Ziel braucht Anbieter und Modell.`,"cws.target.disabled":`{name} (deaktiviert)`,"cws.err.reservedNamespace":`Ein physischer Anbieter namens combo muss vor dem Erstellen von Combos umbenannt werden.`,"cws.err.providerCollision":`Die Combo-ID kollidiert mit einem konfigurierten Anbieternamen.`,"cws.err.unknownProvider":`Jedes Ziel muss einen konfigurierten Anbieter verwenden.`,"cws.err.duplicateTarget":`Dasselbe Anbieter/Modell-Ziel darf nur einmal vorkommen.`,"cws.err.invalidStickyLimit":`Sticky-Erfolge müssen eine Ganzzahl von 1 bis 100 sein.`,"cws.err.invalidWeight":`Jedes Round-Robin-Gewicht muss eine Ganzzahl von 1 bis 10000 sein.`,"cws.err.noEnabledTarget":`Mindestens ein Ziel muss einen aktivierten Anbieter verwenden.`,"claude.tabsLabel":`Claude-Client`,"claude.tabCode":`Code`,"claude.tabDesktop":`Desktop`,"claudeDesktop.title":`Claude Desktop`,"claudeDesktop.subtitle":`Leite jede Claude-Modellfamilie über ein verfügbares Modell auf Port {port}.`,"claudeDesktop.importJson":`JSON importieren`,"claudeDesktop.exportJson":`JSON exportieren`,"claudeDesktop.loading":`Claude-Desktop-Profil wird geladen…`,"claudeDesktop.loadFail":`Claude-Desktop-Profil konnte nicht geladen werden.`,"claudeDesktop.retry":`Erneut versuchen`,"claudeDesktop.saveFailed":`Claude-Desktop-Profil konnte nicht gespeichert werden.`,"claudeDesktop.applyFailed":`Das Profil wurde gespeichert, konnte aber nicht angewendet werden.`,"claudeDesktop.updateFailed":`Claude-Desktop-Aktualisierung fehlgeschlagen.`,"claudeDesktop.savedApplied":`Profil gespeichert und auf Claude Desktop angewendet.`,"claudeDesktop.savedAppliedAnnounce":`Claude-Desktop-Profil gespeichert und angewendet.`,"claudeDesktop.saved":`Profil gespeichert.`,"claudeDesktop.savedAnnounce":`Claude-Desktop-Profil gespeichert.`,"claudeDesktop.exported":`Profil als JSON exportiert.`,"claudeDesktop.importExpected":`Ein Claude-Desktop-Profil der Version 1 wurde erwartet.`,"claudeDesktop.importReady":`JSON importiert. Prüfe den Entwurf und speichere und wende ihn dann an.`,"claudeDesktop.importedAnnounce":`Profil-JSON importiert. Ungespeicherte Änderungen können geprüft werden.`,"claudeDesktop.importInvalid":`Die ausgewählte Datei ist kein gültiges Profil.`,"claudeDesktop.importFailed":`Import fehlgeschlagen. {error}`,"claudeDesktop.moved":`{route} wurde nach {family} verschoben.`,"claudeDesktop.unsaved":`Ungespeicherte Änderungen`,"claudeDesktop.upToDate":`Profil ist aktuell`,"claudeDesktop.saving":`Speichert…`,"claudeDesktop.applying":`Wird angewendet…`,"claudeDesktop.saveApply":`Speichern & anwenden`,"claudeDesktop.emptyTitle":`Keine Modelle verfügbar`,"claudeDesktop.emptyHint":`Füge einen Anbieter hinzu oder aktiviere ihn und weise dann Claude-Desktop-Routen zu.`,"claudeDesktop.assignmentsLabel":`Zuweisungen der Claude-Modellfamilien`,"claudeDesktop.family.opus":`Opus`,"claudeDesktop.family.fable":`Fable`,"claudeDesktop.family.sonnet":`Sonnet`,"claudeDesktop.family.haiku":`Haiku`,"claudeDesktop.modelCountOne":`{count} Modell`,"claudeDesktop.modelCountMany":`{count} Modelle`,"claudeDesktop.chooseDefault":`Standard wählen`,"claudeDesktop.temporaryDefault":`Temporärer Standard`,"claudeDesktop.laneEmpty":`Modell hier ablegen oder die Verschieben-Steuerung verwenden.`,"claudeDesktop.laneNoMatch":`Kein Modell dieser Familie passt zur Suche.`,"nav.grok":`Grok`,"grok.title":`Grok Build`,"grok.subtitle":`Modelle, die opencodex in deiner Grok-Konfiguration registriert hat.`,"grok.loading":`Grok-Status wird geladen…`,"grok.loadFail":`Die Grok-Konfiguration konnte nicht gelesen werden.`,"grok.notConfiguredTitle":`Grok Build ist nicht eingerichtet`,"grok.notConfiguredHint":`Starte den Proxy mit installiertem Grok neu; opencodex schreibt dann einen verwalteten Block nach:`,"grok.endpoint":`Endpunkt`,"grok.colModel":`Modell`,"grok.colAlias":`Grok-Alias`,"grok.colContext":`Kontext`,"grok.groupNative":`Native Modelle`,"grok.groupRouted":`Geroutete Modelle`,"grok.enabledCount":`{on} von {total} registriert`,"grok.saved":`Auswahl gespeichert.`,"grok.savedApplied":`Auswahl gespeichert und in die Grok-Konfiguration geschrieben.`,"grok.saveFailed":`Grok-Auswahl konnte nicht gespeichert werden.`,"grok.applyFailed":`Auswahl gespeichert, aber die Grok-Konfiguration konnte nicht aktualisiert werden.`,"grok.applySkipped":`Auswahl gespeichert. Die Grok-Konfiguration wurde nicht geändert.`,"grok.saveApply":`Speichern & anwenden`,"grok.saving":`Speichern…`,"grok.applying":`Anwenden…`,"grok.unsaved":`Ungespeicherte Änderungen`,"grok.upToDate":`Auswahl ist aktuell`,"grok.toggleModel":`{id} bei Grok registrieren`,"claudeDesktop.available":`Verfügbar`,"claudeDesktop.defaultBadge":`Standard`,"claudeDesktop.supports1m":`1M`,"claudeDesktop.unavailable":`Nicht verfügbar`,"claudeDesktop.contextM":`{n}M Kontext`,"claudeDesktop.contextK":`{n}k Kontext`,"claudeDesktop.contextUnknown":`Kontext unbekannt`,"claudeDesktop.alias":`Alias`,"claudeDesktop.useAsDefault":`Als {family}-Standard verwenden`,"claudeDesktop.moveTo":`Verschieben nach`,"claudeDesktop.move":`Verschieben`,"claudeDesktop.status.applied":`Auf Desktop angewendet`,"claudeDesktop.status.stale":`Konfiguration veraltet — erneut anwenden`,"claudeDesktop.status.notApplied":`Nicht angewendet`,"claudeDesktop.status.notActiveProfile":`Desktop nutzt ein anderes Profil — erneut anwenden`,"claudeDesktop.health.lastRequest":`Letzte Anfrage`,"claudeDesktop.health.stats":`{count} Anf. / {errors} Fehl.`,"claudeDesktop.effort.supported":`effort`,"claudeDesktop.effort.displayOnly":`effort (nur Anzeige)`,"nav.cloud":`Cloud Sync`,"cloud.subtitle":`Backup and restore ~/.opencodex to your Microsoft OneDrive (OAuth device login).`,"cloud.statusTitle":`Status`,"cloud.statusHint":`Local device id and last OneDrive push/pull.`,"cloud.loggedIn":`Microsoft account`,"cloud.notLoggedIn":`Not signed in`,"cloud.account":`Account`,"cloud.device":`This device`,"cloud.remote":`Remote folder`,"cloud.lastSync":`Last sync`,"cloud.never":`Never`,"cloud.remoteManifest":`Cloud snapshot`,"cloud.hasVault":`encrypted vault`,"cloud.remoteError":`Cloud check`,"cloud.clientIdTitle":`Azure app client ID`,"cloud.clientIdHint":`Create a public client app in Azure AD once, enable “Allow public client flows”, add delegated scopes Files.ReadWrite and offline_access, then paste the Application (client) ID here.`,"cloud.clientIdSaved":`Client ID saved.`,"cloud.azurePortal":`Azure app registrations`,"cloud.azureSteps":`Public client · device code · Files.ReadWrite + offline_access`,"cloud.loginTitle":`Sign in to Microsoft`,"cloud.login":`Sign in with Microsoft`,"cloud.logout":`Sign out`,"cloud.loginOk":`Signed in as {account}`,"cloud.loginFailed":`Microsoft sign-in failed`,"cloud.logoutOk":`Signed out of OneDrive.`,"cloud.deviceCodeTitle":`Device code`,"cloud.deviceCodeHint":`Open the link, enter this code, then approve access:`,"cloud.waitingAuth":`Waiting for Microsoft approval…`,"cloud.transferTitle":`Push / pull`,"cloud.transferHint":`Push uploads config to OneDrive. Pull overwrites this machine’s ~/.opencodex from the cloud snapshot.`,"cloud.passphrase":`Vault passphrase`,"cloud.passphrasePlaceholder":`Min 8 characters (encrypts oauth tokens)`,"cloud.passphraseShort":`Passphrase must be at least 8 characters when the vault is enabled.`,"cloud.includeVault":`Include encrypted token vault (oauth.json / auth.json)`,"cloud.includeUsage":`Include usage / logs DBs (larger)`,"cloud.push":`Push to OneDrive`,"cloud.pull":`Pull from OneDrive`,"cloud.pushOk":`Pushed: {files}`,"cloud.pullOk":`Pulled: {files}`,"cloud.pullConfirm":`Pull will overwrite local OpenCodex config and auth files from OneDrive. Continue?`,"cloud.securityNote":`Plain config is stored under OneDrive/OpenCodex/sync/. OAuth tokens only go into the AES-256-GCM vault when you set a passphrase. Never share your client secret or vault passphrase.`,"cloud.loginHint":`Browser login (recommended): Azure platform “Mobile and desktop” + redirect URI http://localhost. Device code needs Allow public client flows = Yes.`,"cloud.loginDevice":`Device code (advanced)`,"cloud.browserLoginTitle":`Browser sign-in`,"cloud.browserLoginHint":`Complete Microsoft sign-in in the opened tab, then return here.`,"cloud.openAuthPage":`Open sign-in page`,"cloud.redirectUri":`Loopback redirect`,"cloud.redirectUriTitle":`Register this exact redirect URI in Azure`,"cloud.redirectUriHint":`Authentication → Add a platform → Mobile and desktop applications → custom redirect URI (must match exactly, including port):`,"cloud.redirectUriWhere":`Do not use #cloud, port 10100, or https. Save, wait ~1 minute, then sign in.`,"cloud.clientIdSecretSaved":`Client ID and client secret saved.`,"cloud.clientSecret":`Client secret (optional)`,"cloud.clientSecretPlaceholder":`Only if Azure requires client_secret`,"cloud.clientSecretSet":`Secret saved (leave empty and save to clear; type a new value to replace)`,"cloud.clientSecretHint":`Preferred: Authentication → Allow public client flows = Yes (no secret). For Web apps, create a client secret under Certificates & secrets, paste here, then Save.`,"dash.injectionManage":`Einstellungen öffnen`,"sub.settings":`Einstellungen`,"sub.sections":`Subagent-Abschnitte`,"sub.delegation.model":`Zuerst aufgerufenes Modell`,"sub.delegation.modelHint":`Das Modell, zu dem Codex zuerst greift, wenn es Arbeit übergibt. Oben steht, wen es überhaupt aufrufen darf; hier wählst du den Ersten davon.`,"dash.syncModelsHint":`Schreibt Codex' Modellkatalog anhand deiner verbundenen Provider neu.`,"dash.syncRun":`Jetzt synchronisieren`,"nav.pi":`Pi`,"pi.title":`Pi`,"pi.subtitle":`Manage Pi models, settings, packages, and extensions. Only the opencodex provider block is written to models.json.`,"pi.loading":`Loading Pi status…`,"pi.loadFail":`Could not read Pi status.`,"pi.actionOk":`Done.`,"pi.actionFail":`Action failed.`,"pi.applySkipped":`Pi apply was skipped (policy or missing install).`,"pi.statusTitle":`Install status`,"pi.binary":`pi binary`,"pi.agentDir":`Agent directory`,"pi.modelsFile":`models.json`,"pi.missing":`not found`,"pi.modelsTitle":`Models (providers.opencodex)`,"pi.modelsHint":`Apply writes only providers.opencodex from the live catalog. Your other providers stay untouched.`,"pi.apply":`Apply models`,"pi.applying":`Applying…`,"pi.applied":`Pi models applied.`,"pi.remove":`Remove opencodex block`,"pi.removing":`Removing…`,"pi.removed":`Pi opencodex provider removed.`,"pi.modelsNotPresentTitle":`opencodex not in models.json yet`,"pi.modelsNotPresentHint":`Click Apply to register the current catalog as providers.opencodex.`,"pi.endpoint":`Endpoint`,"pi.modelCount":`{count} models registered`,"pi.moreModels":`…and {n} more`,"pi.settingsTitle":`Settings`,"pi.settingsHint":`Curated subset of ~/.pi/agent/settings.json. Unknown keys are preserved.`,"pi.saveSettings":`Save settings`,"pi.savingSettings":`Saving…`,"pi.settingsSaved":`Pi settings saved.`,"pi.defaultProvider":`Default provider`,"pi.defaultModel":`Default model`,"pi.thinking":`Thinking level`,"pi.theme":`Theme`,"pi.projectTrust":`Project trust default`,"pi.hideThinking":`Hide thinking blocks`,"pi.quietStartup":`Quiet startup`,"pi.unset":`(unset)`,"pi.otherKeys":`{count} other keys left untouched`,"pi.packagesTitle":`Packages`,"pi.packagesHint":"Install runs `pi install` on the server machine. Packages execute with full system access — review sources before installing.","pi.install":`Install`,"pi.installing":`Installing…`,"pi.packageInstalled":`Package install finished.`,"pi.packageRemoved":`Package removed.`,"pi.removePackage":`Remove`,"pi.noPackages":`No packages in settings.json.`,"pi.extensionsTitle":`Extensions`,"pi.extensionsHint":`Auto-discovered under ~/.pi/agent/extensions plus paths listed in settings. Source editing is not available here.`,"pi.noExtensions":`No extensions found.`,"pi.cliHint":`CLI: ocx pi status | apply | settings | packages · launch with ocx pi`,"grok.modelsSection":`Grok Build models`,"grok.modelsSectionSub":`Choose which opencodex models appear in Grok Build, then save and apply.`,"grok.account.sectionAria":`xAI account and quota`,"grok.account.title":`xAI account quota`,"grok.account.subtitle":`Same depth as Codex Auth: active Grok account, plan, and usage bars. No need to open Providers.`,"grok.account.refreshQuota":`Refresh quota`,"grok.account.refreshing":`Refreshing…`,"grok.account.addAccount":`Add account`,"grok.account.login":`Log in with xAI`,"grok.account.loggingIn":`Waiting for login…`,"grok.account.cancelLogin":`Cancel login`,"grok.account.loading":`Loading accounts…`,"grok.account.empty":`No xAI account yet. Log in to see plan and quota bars here.`,"grok.account.loadFail":`Could not load xAI accounts.`,"grok.account.loginFail":`xAI login failed to start.`,"grok.account.loginOk":`xAI login succeeded.`,"grok.account.loginCancelled":`xAI login cancelled.`,"grok.account.select":`Select account`,"grok.account.switched":`Active xAI account updated.`,"grok.account.switchFail":`Could not switch xAI account.`,"grok.account.removeConfirm":`Remove this xAI account from opencodex?`,"grok.account.removeFail":`Could not remove account.`,"grok.account.removed":`Account removed.`,"grok.account.unnamed":`xAI account`,"nav.clients":`Clients`,"clients.title":`Clients`,"clients.subtitle":`See which base URL and model each coding agent is actually using on disk — useful when CC Switch, ocx inject, and launchers stack.`,"clients.refresh":`Refresh`,"clients.loadFail":`Could not read client status.`,"clients.proxyTitle":`Proxy`,"clients.proxyRunning":`Proxy running`,"clients.proxyStopped":`Proxy not detected`,"clients.generatedAt":`Checked {time}`,"clients.readOnlyHint":`Read-only. This page never rewrites client configs or shows API keys.`,"clients.tableTitle":`Effective client routing`,"clients.col.client":`Client`,"clients.col.verdict":`Verdict`,"clients.col.baseUrl":`Base URL`,"clients.col.model":`Model`,"clients.col.launcher":`Launcher`,"clients.col.switcher":`Switcher profile`,"clients.col.details":`Details`,"clients.col.configPaths":`Config paths`,"clients.col.notes":`Notes`,"clients.verdict.ocx":`via ocx`,"clients.verdict.direct":`direct`,"clients.verdict.mixed":`mixed`,"clients.verdict.missing":`missing`,"clients.verdict.unknown":`unknown`,"clients.manage":`Manage`,"clients.noNotes":`No notes`,"clients.exportHint":`Need a generated config template instead? Open the API page export panel.`,"clients.loading":`Loading client status…`},ko:{"nav.dashboard":`대시보드`,"nav.startup":`시작 안전성`,"nav.providers":`프로바이더`,"nav.models":`모델`,"nav.combos":`콤보`,"nav.subagents":`서브에이전트`,"nav.logs":`로그&디버그`,"nav.usage":`사용량`,"common.github":`GitHub`,"sidebar.star":`GitHub에서 스타 누르기`,"sidebar.starred":`GitHub 스타 완료`,"sidebar.starUnauthenticated":`GitHub에서 스타 누르기 (gh CLI 로그인 안 됨)`,"sidebar.starFailed":`gh로 스타를 누르지 못했습니다. GitHub를 대신 엽니다.`,"sidebar.updateAvailable":`업데이트 있음: {version}`,"sidebar.checkUpdate":`업데이트 확인`,"common.save":`저장`,"common.saving":`저장 중…`,"common.cancel":`취소`,"common.discard":`버리기`,"common.remove":`삭제`,"common.loading":`불러오는 중…`,"common.retry":`재시도`,"theme.label":`테마`,"theme.light":`라이트`,"theme.dark":`다크`,"theme.system":`시스템`,"lang.label":`언어`,"provider.name.volcengine":`Volcengine Ark`,"provider.name.volcengineCodingPlan":`Volcengine Ark 코딩 플랜`,"provider.name.volcengineAgentPlan":`Volcengine Ark 에이전트 플랜`,"errorBoundary.title":`페이지를 불러오지 못했습니다`,"errorBoundary.message":`이 섹션을 렌더링하는 중 오류가 발생했습니다. 다시 불러와 재시도하세요.`,"errorBoundary.details":`오류`,"errorBoundary.reload":`다시 불러오기`,"startup.title":`시작 안전성`,"startup.subtitle":`재부팅 후 로컬 프록시 라우팅이 재연결 반복으로 이어지기 전에 Codex가 opencodex에 연결될 수 있는지 확인합니다.`,"startup.refresh":`새로고침`,"startup.backToDashboard":`대시보드로 돌아가기`,"startup.loading":`시작 보호 상태 확인 중…`,"startup.error":`시작 보호 상태를 읽지 못했습니다.`,"startup.staleData":`최신 시작 상태 확인에 실패했습니다. 아래 값은 이전 결과이며 보호 증거로 사용하면 안 됩니다.`,"startup.status.native":`네이티브 라우팅`,"startup.status.protected":`재부팅 보호됨`,"startup.status.atRisk":`조치 필요`,"startup.summary.native":`Codex가 로컬 프록시에 의존하지 않습니다`,"startup.summary.protected":`재부팅 후에도 opencodex가 자동으로 준비됩니다`,"startup.summary.atRisk":`재부팅 후 Codex 모델 연결이 끊길 수 있습니다`,"startup.riskDetail":`Codex는 로컬 프록시를 바라보지만 이를 다시 시작할 영구 서비스나 정상 launcher shim이 없습니다.`,"startup.riskDetailCustomLocal":`Codex가 사용자 지정 로컬 게이트웨이를 바라봅니다. opencodex는 해당 게이트웨이의 재시작 수명주기를 관리하거나 검증할 수 없습니다.`,"startup.riskDetailWindowsShim":`Launcher shim은 지원되는 CLI 스크립트만 보호하며 Windows의 Codex Desktop과 직접 codex.exe 실행은 이를 우회할 수 있습니다.`,"startup.safeDetail":`현재 라우팅과 시작 방식이 일치합니다. 재부팅 후 ocx start를 수동으로 실행할 필요가 없습니다.`,"startup.routing":`Codex 라우팅`,"startup.routing.proxy":`로컬 프록시`,"startup.routing.native":`OpenAI 네이티브`,"startup.routing.customLocal":`사용자 지정 로컬 게이트웨이`,"startup.routing.customRemote":`사용자 지정 원격 게이트웨이`,"startup.routing.unknown":`알 수 없거나 잘못된 라우팅`,"startup.restartProtection":`재부팅 보호`,"startup.preference":`필요 시 자동 시작`,"startup.enabled":`켜짐`,"startup.disabled":`꺼짐`,"startup.protection.service":`백그라운드 서비스`,"startup.protection.shim":`Launcher shim`,"startup.protection.none":`설치되지 않음`,"startup.details":`보호 상태 상세`,"startup.service":`백그라운드 서비스`,"startup.serviceHint":`로그인할 때 시작하고 프록시가 중단되면 다시 실행합니다.`,"startup.installed":`설치됨`,"startup.notInstalled":`설치되지 않음`,"startup.unsupported":`지원되지 않음`,"startup.shim":`Codex launcher shim`,"startup.shimHint":`지원되는 Codex 스크립트 런처가 시작될 때 ocx ensure를 실행합니다.`,"startup.healthy":`정상`,"startup.cliOnly":`CLI 전용`,"startup.stale":`업데이트 필요`,"startup.viable":`사용 가능`,"startup.unhealthy":`설치됐지만 비정상`,"startup.conflict":`서비스 충돌`,"startup.installedDisabled":`설치됐지만 꺼짐`,"startup.install":`설치하기`,"startup.installing":`설치 중…`,"startup.repair":`복구`,"startup.repairing":`복구 중…`,"startup.serviceInstalled":`백그라운드 서비스를 설치했습니다.`,"startup.serviceRepaired":`백그라운드 서비스를 복구했습니다.`,"startup.shimInstalled":`Codex launcher shim을 설치했습니다.`,"startup.shimRepaired":`Codex launcher shim을 복구했습니다.`,"startup.installFailed":`설치하지 못했습니다:`,"startup.tray.title":`Windows 시스템 트레이`,"startup.tray.hint":`로그인할 때 트레이 아이콘을 띄우고 프록시 시작·중지·재시작·대시보드·상태를 클릭으로 제어합니다.`,"startup.tray.login":`Windows 로그인 시 트레이 시작`,"startup.tray.notProtection":`트레이는 제어 화면이며 재부팅 보호 서비스가 아닙니다. 무인 복구에는 정상 백그라운드 서비스가 별도로 필요합니다.`,"startup.tray.running":`실행 중`,"startup.tray.stopped":`설치됨, 숨김`,"startup.tray.stale":`복구 필요`,"startup.tray.notInstalled":`설치되지 않음`,"startup.tray.loading":`확인 중…`,"startup.tray.unavailable":`상태 확인 불가`,"startup.tray.install":`트레이 설치 및 표시`,"startup.tray.start":`트레이 아이콘 표시`,"startup.tray.stop":`트레이 아이콘 종료`,"startup.tray.uninstall":`로그인 트레이 제거`,"startup.tray.error":`Windows 트레이 작업에 실패했습니다. ocx tray status에서 상세 내용을 확인하세요.`,"startup.recovery":`복구 방법`,"startup.recoveryHint":`위의 원클릭 설치를 사용하거나 수동 복구 명령을 복사할 수 있습니다. Codex Desktop과 Windows 실행 파일에는 백그라운드 서비스를 권장합니다.`,"startup.command.service":`권장: 영구 백그라운드 서비스`,"startup.command.shim":`대안: CLI launcher shim`,"startup.command.native":`안전 전환: Codex 네이티브 라우팅 복구`,"startup.copy":`복사`,"startup.copied":`복사됨`,"startup.recommended":`권장 복구 명령: {cmd}`,"startup.navRisk":`시작 보호 상태에 조치가 필요합니다`,"startup.codexRuntime.clampHidden":`OpenCodex가 Codex {version}을(를) 사용해 일부 reasoning effort 옵션이 숨겨졌습니다.`,"startup.codexRuntime.clampHiddenWithEfforts":`OpenCodex가 Codex {version}을(를) 사용해 일부 reasoning effort 옵션이 숨겨졌습니다(제거됨: {efforts}).`,"startup.codexRuntime.olderBinary":`OpenCodex가 더 오래된 Codex 바이너리({version})를 사용 중입니다. 더 새 설치를 사용할 수 있습니다.`,"dash.subtitle":`로컬 opencodex 프록시와 프로바이더, 그리고 Codex로 라우팅되는 모델의 실시간 상태입니다.`,"dash.workspace.overview":`개요`,"dash.workspace.sections":`섹션`,"dash.status":`상태`,"dash.online":`온라인`,"dash.offline":`오프라인`,"dash.version":`버전`,"dash.versionLocal":`로컬 버전`,"dash.versionRemote":`npm 최신`,"dash.installSource":`소스 실행`,"dash.installNpm":`npm 전역`,"dash.installBun":`bun 전역`,"dash.installUnknown":`설치 방식 알 수 없음`,"dash.uptime":`가동 시간`,"dash.providers":`프로바이더`,"dash.tokens30d":`토큰 (30일)`,"dash.coverage":`커버리지 {pct}`,"dash.mem.title":`메모리 관찰`,"dash.mem.hint":`읽기 전용 런타임 진단. 관측 메모리는 max(RSS, external, ArrayBuffers)라 Windows working set trimming이 커밋된 보존 메모리를 숨기지 못합니다.`,"dash.mem.rss":`상주 메모리 (RSS)`,"dash.mem.jsHeap":`JS 힙 사용량`,"dash.mem.jsHeapArena":`아레나 {total}`,"dash.mem.pressure":`경고 임계값 대비`,"dash.mem.pressureOf":`임계값의 {pct}%`,"dash.mem.pressureUnknown":`임계값 정보 없음`,"dash.mem.jscHeap":`JSC 힙`,"dash.mem.external":`External`,"dash.mem.arrayBuffers":`ArrayBuffers`,"dash.mem.observed":`관측값`,"dash.mem.runtime":`런타임 카운터`,"dash.mem.growth":`시간당 관측 변화`,"dash.mem.perHour":`/시간`,"dash.mem.store":`연속 응답 저장소`,"dash.mem.storeHint":`프록시 previous_response_id 캐시. 힙이 증가하는 가운데 총 바이트가 늘면 런타임 할당기보다 대화 보존을 가리킵니다.`,"dash.mem.storeEntries":`항목`,"dash.mem.storeTotal":`합계`,"dash.mem.storeLargest":`최대`,"dash.mem.storeOldest":`가장 오래됨`,"dash.mem.threshold":`경고 임계값`,"dash.mem.lastWarn":`마지막 경고`,"dash.mem.never":`없음`,"dash.mem.details":`상세 정보`,"dash.mem.unavailable":`메모리 진단을 사용할 수 없음 (구버전 프록시).`,"dash.mem.inFlight":`진행 중 요청`,"dash.mem.restart":`작업 완료 후 재시작`,"dash.mem.restartConfirm":`진행 중 요청 {count}개가 끝날 때까지 기다린 뒤 재시작합니다(최대 {seconds}초; 시간이 지나면 남은 요청은 중단됩니다).`,"dash.mem.draining":`요청 {count}개 완료 대기 중… 끝나면 재시작`,"dash.mem.reconnecting":`프록시 재시작 중… 다시 연결하는 중`,"dash.mem.restartFailed":`작업 완료 후 재시작에 실패했습니다. 프록시가 실행 중인지 확인하세요.`,"dash.mem.restartNoSupervisor":`재시작 보호가 없습니다. 재시작 후 프록시가 자동으로 올라오지 않을 수 있습니다.`,"dash.activeProviders":`활성 프로바이더`,"dash.noProviders":`설정된 프로바이더가 없습니다. {cmd} 를 실행하세요.`,"dash.col.name":`이름`,"dash.col.adapter":`어댑터`,"dash.col.baseUrl":`Base URL`,"dash.col.model":`모델`,"dash.modelsNoResults":`검색과 일치하는 모델이 없습니다.`,"dash.availableModels":`사용 가능한 모델`,"dash.noModels":`모델을 찾을 수 없습니다. 프로바이더 API 키를 확인하세요.`,"dash.cannotConnect":`프록시에 연결할 수 없습니다. 실행 중인가요?`,"dash.runStart":`{cmd} 를 실행해 프록시를 시작하세요.`,"dash.stop":`프록시 중지`,"dash.stopConfirm":`프록시를 중지하고 Codex 원본 설정을 복원할까요?`,"dash.stopFailed":`프록시를 중지하지 못했습니다 (HTTP {status}).`,"dash.stopping":`중지 중…`,"dash.codexAutoStart":`Codex 실행 시 opencodex 시작`,"dash.codexAutoStartHint":`설치된 launcher shim이 ocx ensure를 실행하도록 허용합니다. 이 설정은 재부팅 보호를 설치하지 않으므로 시작 안전성에서 실제 상태를 확인하세요.`,"dash.searchModel":`서치 사이드카 모델`,"dash.searchModelHint":`비-OpenAI 라우팅 모델의 web_search에 사용되는 모델입니다. ChatGPT 로그인 필요.`,"dash.searchReasoning":`서치 추론 강도`,"dash.visionModel":`비전 사이드카 모델`,"dash.visionModelHint":`텍스트 전용 라우팅 모델에 이미지를 설명하는 데 사용되는 모델입니다. ChatGPT 로그인 필요.`,"dash.webSearchSidecar":`웹 검색 사이드카`,"dash.webSearchSidecarHint":`라우팅 모델의 웹 검색에 쓸 백엔드와 모델을 고릅니다.`,"dash.visionSidecar":`비전 사이드카`,"dash.visionSidecarHint":`텍스트 전용 라우팅 모델이 이미지를 읽을 때 쓸 백엔드와 모델을 고릅니다.`,"dash.shadowCallIntercept":`쉐도우 호출 가로채기`,"dash.shadowCallInterceptHint":`Codex 앱이 제목·커밋 메시지 생성에 쓰는 백그라운드 호출({models})을 가로채 선택한 모델로 바꿉니다. effort는 low로 고정됩니다.`,"dash.shadowCallWarning":`⚠ 활성화하면 {models} 요청이 모두 선택한 모델로 대체됩니다.`,"dash.shadowCallOriginal":`원본`,"dash.shadowCallModel":`대체 모델`,"dash.shadowCallTooltip":`Codex 앱은 스레드 제목 자동 생성, 커밋 메시지 생성, 스킬 오케스트레이션 같은 내부 작업을 백그라운드로 호출합니다. 이때 쓰는 모델은 클라이언트 버전마다 달라서 opencodex는 {models}를 모두 가로챕니다. 이 설정을 켜면 해당 호출이 선택한 모델로 넘어갑니다.`,"models.shadowCallIntercept":`쉐도우 호출 가로채기`,"models.shadowCallInterceptHint":`Codex 앱의 백그라운드 호출({models}, 제목·커밋 메시지)을 가로채 선택한 모델로 바꿉니다.`,"dash.sidecarBackend":`백엔드`,"dash.sidecarModel":`모델`,"dash.backendAuto":`자동`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`사이드카 설정이 저장됐습니다. 다음 요청부터 적용됩니다.`,"dash.sidecarSaveFailed":`사이드카 설정 저장에 실패했습니다.`,"dash.injectionLabel":`서브에이전트 위임`,"dash.injectionHint":`Codex가 서브에이전트에게 일을 넘길 때 쓸 모델을 고릅니다. 이 선택을 어디에 적용할지는 아래 두 스위치가 정합니다.`,"dash.injectionManage":`설정 열기`,"dash.syncCodexSubagentDefaults":`Codex 설정에도 기본값으로 저장`,"dash.syncCodexSubagentDefaultsHint":`켜면 위에서 고른 모델이 Codex 설정 파일에 저장돼, 새로 시작하는 작업도 처음부터 그 모델을 씁니다. 끄면 여기서만 기억합니다. 반영은 다음 동기화나 재시작 때이고, 직접 적어둔 [agents] 설정은 그대로 둡니다.`,"dash.multiAgentGuidance":`일 나누는 방법 알려주기`,"dash.multiAgentGuidanceHint":`Codex에게 "일을 이렇게 나눠 맡기면 된다"는 짧은 쪽지를 붙여 보냅니다. v2에서는 쓸 수 있는 모델 목록과 우선 모델을 알려주고, v1에서는 추론 강도가 max나 ultra일 때만 동작합니다. 끄면 아무 쪽지도 붙지 않습니다.`,"dash.injectionNone":`없음`,"dash.injectionEffortLabel":`추론 강도`,"dash.injectionEffortNone":`모델 기본값`,"dash.effortCapLabel":`V2 ultra 추론 강도 제한`,"dash.subagentEffortCapLabel":`V2 서브에이전트 추론 강도 제한`,"dash.effortCapHelp":`V2 ultra 모드 턴의 추론 강도를 제한합니다. 설정하면 ultra 모드에서 들어오는 max 요청이 선택한 수준으로 내려갑니다. 서브에이전트 제한은 스폰된 자식 에이전트에만 적용됩니다. 강도를 낮추기만 하고 올리지는 않습니다. 모델이 해당 수준을 지원하지 않으면 가장 가까운 지원 수준으로 내려갑니다.`,"dash.effortCapNone":`상한 없음`,"dash.maintenance":`유지보수`,"dash.maintenanceHint":`Codex 모델 카탈로그를 새로고침하거나 최신 opencodex 릴리스를 설치합니다.`,"dash.syncModels":`모델 동기화`,"dash.syncModelsHint":`연결해둔 프로바이더를 기준으로 Codex 모델 카탈로그를 다시 씁니다.`,"dash.syncRun":`지금 동기화`,"dash.syncing":`동기화 중…`,"dash.syncOk":`동기화 완료. {count}개 모델이 추가됐습니다.`,"dash.syncStaleHint":`Codex에 여전히 예전 목록이 보이면 오래 실행 중인 app-server를 재시작하세요 ({cmd}).`,"dash.syncFailed":`동기화 실패: {error}`,"dash.projectConfigTitle":`프로젝트 Codex 설정이 OpenCodex를 우회합니다`,"dash.projectConfigHint":`저장소 로컬 설정이 OpenCodex 프록시를 덮어씁니다(예: OpenCode Go로 직접 라우팅). 해당 프로젝트에서 ~/.codex/config.toml 프록시를 쓰려면 제거하세요.`,"dash.checkUpdate":`업데이트 확인`,"dash.updateTitle":`opencodex 업데이트`,"dash.updateDesc":`선택한 채널의 npm 최신 버전을 확인한 뒤, 설치 후 프록시를 재시작할지 선택합니다.`,"dash.updateChannel":`채널`,"dash.updateChecking":`업데이트 확인 중…`,"dash.updateInstalled":`설치됨`,"dash.updateLatest":`최신`,"dash.updateAvailable":`업데이트 가능`,"dash.updateCurrent":`최신 상태`,"dash.updateCommand":`명령`,"dash.updateSource":`현재는 소스 체크아웃입니다. 표시된 명령을 터미널에서 실행해 업데이트하세요.`,"dash.updateUnavailable":`npm에서 최신 버전을 읽지 못했습니다. 잠시 후 다시 시도하세요.`,"dash.updateRetry":`재시도`,"dash.updateRecheck":`다시 확인`,"dash.updateCannotAuto":`원클릭 업데이트를 사용할 수 없습니다 ({reason}).`,"dash.updateReason.source_checkout":`소스 체크아웃`,"dash.updateReason.latest_unavailable":`npm 레지스트리에 연결할 수 없음`,"dash.updateReason.already_latest":`이미 최신 버전`,"dash.updateReason.unknown":`업데이트 불가`,"dash.updateRestart":`업데이트 후 재시작`,"dash.updateRestartHint":`권장. 프록시를 재시작하기 전까지 현재 GUI는 이전 코드로 계속 실행됩니다.`,"dash.runUpdate":`업데이트`,"dash.updateReconnecting":`재시작된 프록시를 기다리는 중…`,"dash.updateStatus.running":`opencodex 업데이트 중입니다.`,"dash.updateStatus.restarting":`업데이트 설치 완료. 프록시를 재시작하는 중입니다.`,"dash.updateStatus.succeeded":`업데이트가 완료됐습니다.`,"dash.updateStatus.failed":`업데이트에 실패했습니다.`,"prov.subtitle":`opencodex가 Codex로 라우팅하는 업스트림 프로바이더를 설정합니다. 계정으로 로그인하거나, 프로바이더를 추가하거나, 원본 설정을 편집하세요.`,"prov.add":`프로바이더 추가`,"prov.editJson":`JSON 편집`,"prov.accountLogin":`계정 로그인`,"prov.noOauth":`사용 가능한 OAuth 프로바이더가 없습니다.`,"prov.loggedIn":`로그인됨`,"prov.notLoggedIn":`로그인 안 됨`,"prov.logout":`로그아웃`,"prov.login":`로그인`,"prov.loginWith":`{provider} 로 로그인`,"prov.waitingBrowser":`브라우저 대기 중…`,"prov.didntOpen":`안 열렸나요? 여기를 클릭하세요`,"prov.copyLink":`링크 복사`,"prov.linkCopied":`복사됨`,"prov.linkCopyUnavailable":`클립보드를 사용할 수 없음`,"prov.deviceCode":`기기 인증 코드`,"prov.copyCode":`코드 복사`,"prov.codeCopied":`코드 복사됨`,"prov.editAlias":`별칭 편집`,"prov.aliasPrompt":`표시 이름 (비우면 삭제)`,"prov.aliasSaved":`별칭이 저장되었습니다`,"prov.aliasSaveFailed":`별칭을 저장하지 못했습니다`,"prov.accountId":`ID`,"prov.pasteRedirect":`리다이렉트 URL 또는 코드 붙여넣기`,"prov.pasteRedirectHint":`브라우저에 localhost 오류가 표시되면, 주소창의 전체 URL을 복사해 여기에 붙여넣으세요(또는 인증 코드 붙여넣기).`,"prov.pasteSubmit":`제출`,"prov.pasteSubmitting":`제출 중…`,"prov.pasteOk":`코드를 제출했습니다 — 로그인 완료 중…`,"prov.pasteFail":`코드 제출 실패: {error}`,"prov.port":`포트`,"prov.default":`기본값`,"prov.loadingConfig":`불러오는 중…`,"prov.saved":`저장됨! 적용하려면 프록시를 재시작하세요.`,"prov.loadConfigFail":`설정을 불러오지 못했습니다`,"prov.invalidJson":`잘못된 JSON`,"prov.saveFailed":`저장 실패`,"prov.loginFailStart":`{provider} 로그인을 시작하지 못했습니다`,"prov.loginError":`{provider} 로그인 오류: {error}`,"prov.loginRequestFail":`{provider} 로그인 요청 실패`,"prov.loginCancelled":`{provider} 로그인이 취소되었습니다`,"prov.loginTimeout":`{provider} 로그인 시간 초과 — 브라우저를 닫았거나 완료되지 않았습니다. 다시 시도하세요.`,"prov.loginOk":`{provider} 에 로그인했습니다. 모델을 표시하려면 {cmd} 를 실행하세요(또는 실시간 적용됩니다).`,"oauthTos.highTitle":`{provider}: 구독 OAuth 위험`,"oauthTos.elevatedTitle":`{provider}: 비공식 OAuth 브리지`,"oauthTos.anthropicBody":`Claude 구독 OAuth 토큰을 OpenCodex 같은 타사 프록시에서 직접 재사용하는 방식은 Anthropic이 지원하는 통합이 아니며 접근이 제한될 수 있습니다. Claude 구독을 사용하는 공식 Agent SDK 통합은 별도입니다.`,"oauthTos.highBody":`OpenCodex는 {provider}를 타사 OAuth 경로로 연결합니다. 지원되지 않는 사용 방식이면 접근이 제한되거나 정지될 수 있습니다.`,"oauthTos.elevatedBody":`OpenCodex는 {provider}를 비공식 OAuth 경로로 연결합니다. 가능하면 공식 클라이언트를 사용하세요. 비정상적이거나 자동화된 트래픽은 남용으로 간주되어 접근이 제한되거나 정지될 수 있습니다.`,"oauthTos.saferPath":`더 안전한 방법: OpenCodex에 API 키를 대신 설정하세요.`,"oauthTos.acknowledge":`위험을 이해했으며 OAuth로 계속 진행합니다.`,"oauthTos.continue":`OAuth로 계속`,"prov.logoutOk":`{provider} 에서 로그아웃했습니다.`,"prov.logoutFail":`{provider}에서 로그아웃하지 못했습니다. 계정 상태는 그대로입니다.`,"prov.removed":`"{name}" 을(를) 삭제했습니다.`,"prov.removedDefault":`"{name}"을(를) 삭제했습니다. 이제 기본 프로바이더는 "{defaultProvider}"입니다.`,"prov.removeFail":`"{name}" 삭제에 실패했습니다.`,"prov.removeLastProvider":`활성화된 다른 프로바이더가 기본이 될 수 없으면 이 프로바이더를 삭제할 수 없습니다.`,"prov.removeHasDependentCombos":`먼저 이 프로바이더를 사용하는 콤보를 삭제하거나 수정하세요: {combos}.`,"prov.setDefault":`기본으로 설정`,"prov.setDefaultSuccess":`"{name}"이(가) 기본 프로바이더로 설정되었습니다.`,"prov.setDefaultFail":`"{name}"을(를) 기본 프로바이더로 설정하지 못했습니다.`,"prov.defaultDisabled":`기본으로 설정하려면 먼저 이 프로바이더를 활성화하세요.`,"prov.updateFail":`이 프로바이더를 업데이트하지 못했습니다.`,"prov.networkError":`네트워크 오류입니다. 프록시가 실행 중인지 확인한 후 다시 시도하세요.`,"prov.added":`"{name}" 을(를) 추가했습니다. 지금 활성화됨 — Codex 모델 선택기에 표시하려면 {cmd} 를 실행하세요(또는 재시작).`,"prov.removeConfirm":`프로바이더 "{name}" 을(를) 삭제할까요? 해당 모델이 Codex 선택기에서 사라집니다.`,"prov.hasApiKey":`API 키 설정됨`,"prov.hasHeaders":`커스텀 헤더 설정됨`,"prov.accounts":`계정 ({n})`,"prov.accountsAria":`{name} 계정 목록 열기/닫기`,"prov.accountActive":`활성`,"prov.accountReauth":`재로그인`,"prov.reauthenticate":`재인증`,"prov.reauthAccountMissing":`로그인 후 선택한 계정을 찾을 수 없습니다`,"prov.reauthIdentityMismatch":`로그인한 계정이 선택한 계정과 일치하지 않습니다`,"prov.accountAdd":`계정 추가`,"prov.accountNoLabel":`계정 {id}`,"prov.accountSwitchTitle":`이 계정 사용`,"prov.accountSwitched":`{email} 계정으로 전환했습니다.`,"prov.accountSwitchFail":`계정 전환에 실패했습니다`,"prov.accountRemoved":`{email} 계정을 제거했습니다.`,"prov.accountRemoveFail":`{email} 계정을 제거하지 못했습니다. 계정은 그대로입니다.`,"prov.accountRemoveAria":`{email} 제거`,"prov.accountRemoveConfirm":`{email} 계정을 제거할까요? 이 프록시에서 로그인이 삭제됩니다.`,"prov.keyAdd":`API 키 추가`,"prov.keyAdded":`{name}에 API 키를 추가했습니다.`,"prov.keyAddFail":`API 키 추가에 실패했습니다`,"prov.keyPlaceholder":`API 키 붙여넣기`,"prov.keySwitchTitle":`이 키 사용`,"prov.keySwitched":`{key} 키로 전환했습니다.`,"prov.keySwitchFail":`키 전환에 실패했습니다`,"prov.keyRemoved":`{key} 키를 제거했습니다.`,"prov.keyRemoveAria":`{key} 키 제거`,"prov.keyRemoveConfirm":`API 키 {key}를 제거할까요? 이 프록시 설정에서 삭제됩니다.`,"prov.activeBadge":`활성`,"prov.disabledBadge":`비활성`,"prov.defaultBadge":`기본`,"prov.enable":`활성화`,"prov.disable":`비활성화`,"prov.enabled":`"{name}" 을(를) 활성화했습니다. 해당 모델을 다시 Codex에서 사용할 수 있습니다.`,"prov.disabled":`"{name}" 을(를) 비활성화했습니다. 설정은 유지되고 모델은 숨겨집니다.`,"prov.enableFail":`"{name}" 활성화에 실패했습니다.`,"prov.disableFail":`"{name}" 비활성화에 실패했습니다.`,"prov.enableAria":`{name} 프로바이더 활성화`,"prov.disableAria":`{name} 프로바이더 비활성화`,"prov.defaultCannotDisable":`기본 프로바이더는 비활성화할 수 없습니다`,"prov.openaiAccountMode":`Codex 계정 모드`,"prov.openaiModePool":`풀`,"prov.openaiModeDirect":`직접`,"prov.openaiPoolDesc":`기본값입니다. 메인 로그인과 추가 계정을 친화도, 할당량, 대기 시간, 장애 조치에 따라 순환합니다.`,"prov.openaiDirectDesc":`현재 메인 Codex 로그인만 사용합니다. 저장된 풀 계정은 읽거나 순환하지 않습니다.`,"prov.openaiModeSaved":`OpenAI 계정 모드를 {mode} 모드로 변경했습니다.`,"prov.openaiModeSaveFailed":`OpenAI 계정 모드를 변경하지 못했습니다.`,"prov.openaiApiDesc":`OpenAI API 키만 사용하며 Codex 계정 인증과 섞이지 않습니다.`,"prov.manageCodexAccounts":`Codex 계정 관리`,"prov.openaiApiMissing":`API 키 필요`,"prov.openaiApiSetup":`API 키 설정`,"models.subtitle":`Codex가 보는 모델을 켜고 끕니다 — 네이티브 GPT passthrough와 라우팅된 모델을 프로바이더별로 묶어 보여줍니다(헤더를 클릭하면 접힘). 숨긴 모델은 카탈로그와 선택기에서 빠지지만 정확한 id로 직접 호출할 수 있습니다. 변경 사항은 다음 Codex 턴에 적용됩니다 — opencodex가 Codex의 5분 모델 캐시를 무효화하므로 재시작이 필요 없습니다.`,"models.nativeGroupLabel":`OpenAI 네이티브`,"models.nativeHint":`프로바이더에서 선택한 풀 또는 직접 계정 옵션으로 서빙되는 passthrough 모델입니다. 끄면 Codex 선택기에서 숨겨지고, 카탈로그 항목은 유지되므로 다시 켜면 그대로 복원됩니다.`,"models.active":`{active}/{total} 표시`,"models.workspace.providers":`프로바이더`,"models.workspace.allProviders":`모든 프로바이더`,"models.workspace.mainAria":`모델 세부정보`,"models.combosEmpty":`아직 설정된 콤보가 없습니다`,"models.combosSetup":`설정하기`,"models.combosAdd":`콤보 추가하기`,"models.combosActive":`{count}개 활성`,"models.allOn":`모두 켜기`,"models.allOff":`모두 끄기`,"models.cap350k":`350k 제한`,"models.capApplied":`컨텍스트 제한 적용됨 — 다음 Codex 턴부터 반영됩니다.`,"models.capSaveFailed":`컨텍스트 제한 저장 실패`,"models.contextCapped":`350k 제한`,"models.contextCapLabel":`컨텍스트 제한`,"models.v2Label":`서브에이전트`,"models.shadowCallOriginal":`⚠ {models} →`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`전 모델 → v1 서피스`,"models.v2ModeDesc_default":`업스트림 기본값 (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`전 모델 → v2 서피스`,"models.v2Help":`모든 모델의 멀티에이전트 서피스를 제어합니다.
22
-
23
- v1: 단일 스레드 에이전트. 모든 모델이 v1 서피스를 사용합니다.
24
- base: 업스트림 기본값 — sol/terra는 v2, luna는 v1, 나머지는 codex 플래그를 따릅니다.
25
- v2: 멀티 스레드 에이전트(spawn_agent). 모든 모델이 v2 서피스를 사용합니다.
26
-
27
- 새 세션부터 적용됩니다.`,"models.v2DocsLink":`v1 / v2가 뭔가요?`,"dash.multiAgent":`서브에이전트`,"models.v2Conflict":`[agents] max_threads가 남아 있어 codex가 부팅을 거부합니다 — config.toml에서 제거하세요`,"models.v2Applied":`서브에이전트 모드 변경됨 — 새 세션부터 적용 (피커 갱신은 Codex 앱 재시작)`,"models.v2ThreadsLabel":`최대 스레드`,"models.v2ThreadsDefault":`기본값 (4)`,"models.v2ThreadsApplied":`스레드 한도 변경됨 — 새 세션부터 적용`,"models.v2ThreadsInvalid":`스레드 한도는 1 이상 정수여야 합니다`,"models.v2ThreadsApply":`적용`,"models.capValue":`{value} 제한`,"models.contextCappedValue":`{value} 제한`,"models.setAll":`전체 적용`,"models.setAllHint":`{value} 컨텍스트 상한을 라우팅된 모든 프로바이더에 적용합니다. 네이티브 프로바이더는 영향을 받지 않습니다.`,"models.collapseAll":`모두 접기`,"models.expandAll":`모두 펼치기`,"models.orderHint":`피커 순서: Subagents에서 지정한 순서 → 나머지 라우팅 모델(프로바이더, 모델 ID 순 알파벳 정렬) → 네이티브 모델. 노출 토글은 모델을 필터링할 뿐 이 순서를 바꾸지 않습니다.`,"models.custom":`직접 입력…`,"models.customApply":`적용`,"models.customPlaceholder":`토큰 (예: 420000)`,"models.customAdd":`커스텀 모델 추가`,"models.customAddTitle":`커스텀 모델 추가 — {provider}`,"models.customEditTitle":`커스텀 모델 편집 — {provider}`,"models.customAdded":`커스텀 모델 추가됨`,"models.customUpdated":`커스텀 모델 수정됨`,"models.customDeleted":`커스텀 모델 삭제됨`,"models.customSaveFailed":`커스텀 모델 저장 실패`,"models.customSaving":`저장 중…`,"models.customAddBtn":`추가`,"models.customEditBtn":`수정`,"models.customEdit":`편집`,"models.customDelete":`삭제`,"models.customDeleteConfirm":`{name} 모델을 삭제하시겠습니까?`,"models.customBadge":`커스텀`,"models.customSummary":`커스텀 {count}개`,"models.customFieldModelId":`모델 ID (엔드포인트 슬러그)`,"models.customFieldModelIdPlaceholder":`예: qwen4-max-preview`,"models.customFieldDisplayName":`표시명 (선택)`,"models.customFieldDisplayNamePlaceholder":`예: Qwen 4 Max Preview`,"models.customFieldContext":`컨텍스트 윈도우`,"models.customFieldModalities":`입력 모달리티`,"models.tipProvider":`프로바이더`,"models.tipContext":`컨텍스트`,"models.tipModalities":`모달리티`,"models.tipStatus":`상태`,"models.tipActive":`활성`,"models.tipDisabled":`비활성`,"models.applied":`적용됨 — 다음 Codex 턴부터 반영됩니다.`,"models.saveFailed":`저장 실패`,"models.networkError":`네트워크 오류 — 프록시가 실행 중인가요?`,"models.loadFail":`모델을 불러오지 못했습니다 — 프록시가 실행 중인가요?`,"models.noRouted":`라우팅된 모델 없음`,"models.noRoutedHint":`먼저 프로바이더에 로그인하거나 추가하세요.`,"models.emptyDiscovery":`발견된 모델이 없습니다. 프로바이더 엔드포인트를 확인하거나 정적/사용자 모델을 추가하세요.`,"models.emptyDiscoveryDisabled":`실시간 모델 검색이 꺼져 있고 정적 모델도 설정되지 않았습니다.`,"models.discoveryFailedBadge":`검색 실패`,"models.discoveryFailedHttp":`모델 검색에 실패했습니다(HTTP {status}).`,"models.discoveryFailedBlocked":`대상 정책 때문에 모델 검색이 차단되었습니다.`,"models.discoveryFailedInvalidResponse":`모델 검색이 잘못된 응답을 받았습니다.`,"models.discoveryFailedNetwork":`네트워크 오류로 모델 검색에 실패했습니다.`,"models.discoveryFailedProvider":`프로바이더가 모델 검색 오류를 보고했습니다.`,"models.discoveryFailedGeneric":`모델 검색에 실패했습니다.`,"models.openProviderSettings":`프로바이더 설정 열기`,"models.loading":`불러오는 중…`,"models.search":`모델 검색…`,"models.showMore":`{n}개 더 보기`,"models.allowlistLabel":`선택만 노출`,"models.allowlistHint":`체크한 모델만 카탈로그에 노출돼요 (비우면 전체). 수천 개 모델을 노출하는 프로바이더에 유용해요.`,"models.selectedCount":`{n}개 선택`,"sub.subtitle":`Codex의 {cmd} 는 우선순위 상위 5개 모델만 오버라이드로 노출합니다. 여기서 최대 5개를 선택하면 — 네이티브 gpt 또는 라우팅된 모델 — opencodex가 카탈로그 우선순위를 설정해 정확히 이들이 앞에 옵니다. 다른 모델도 정확한 이름으로 호출할 수 있으며, 이 설정은 표시 항목만 제어합니다.`,"sub.featured":`추천`,"sub.orderHint":`여기서 선택해 표시된 순서가 Codex 모델 피커 최상단 1~5위와 {cmd}의 기본 모델 후보를 결정합니다.`,"sub.noneSelected":`선택된 항목 없음 — 아래 목록에서 선택하세요.`,"sub.models":`모델`,"sub.search":`모델 검색(네이티브 gpt + 라우팅)…`,"sub.settings":`설정`,"sub.sections":`서브에이전트 구역`,"sub.delegation.model":`먼저 부를 모델`,"sub.delegation.modelHint":`Codex가 일을 나눠 맡길 때 가장 먼저 부를 모델입니다. 위 추천 목록이 부를 수 있는 후보라면, 여기서 고른 모델이 그중 1순위가 됩니다.`,"sub.noModels":`모델 없음 — 먼저 프로바이더에 로그인하거나 추가하세요.`,"sub.saved":`{n}개 모델을 저장했습니다. spawn_agent 오버라이드로 보려면 새 Codex 세션을 시작하거나 {cmd} 를 실행하세요.`,"sub.saveFailed":`저장 실패`,"sub.networkError":`네트워크 오류 — 프록시가 실행 중인가요?`,"sub.loadFail":`모델을 불러오지 못했습니다 — 프록시가 실행 중인가요?`,"sub.loading":`불러오는 중…`,"sub.moveUp":`{m} 위로 이동`,"sub.moveDown":`{m} 아래로 이동`,"sub.removeAria":`{m} 삭제`,"sub.workspace.addToFeatured":`{m}을(를) 추천에 추가`,"sub.workspace.allModels":`모든 모델`,"sub.workspace.featuredFull":`추천 목록이 가득 찼습니다 (최대 5개)`,"sub.workspace.mainAria":`서브에이전트 모델 세부 정보`,"sub.workspace.notFeatured":`추천되지 않음`,"sub.workspace.priority":`우선순위`,"sub.workspace.removeFromFeatured":`{m}을(를) 추천에서 제거`,"sub.workspace.selectModel":`모델 선택`,"sub.workspace.selectModelDesc":`목록에서 모델을 선택하여 세부 정보를 확인하고 spawn_agent에 추천하세요.`,"sub.workspace.selector":`공개 셀렉터`,"logs.title":`요청 로그`,"logs.tabLogs":`로그`,"logs.tabDebug":`디버그`,"logs.subtitle":`로컬 opencodex 프록시를 거친 최근 요청입니다. 최신순.`,"logs.autoRefresh":`자동 새로고침`,"logs.noRequests":`아직 요청이 없습니다.`,"logs.loadError":`요청 로그를 불러오지 못했습니다.`,"logs.filter.surface.label":`표면`,"logs.filter.surface.all":`전체`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.filter.surface.grok":`Grok`,"logs.filter.conversation.label":`대화`,"logs.filter.conversation.placeholder":`대화 ID 붙여넣기`,"logs.filter.conversation.clear":`지우기`,"logs.filter.conversation.apply":`로그 필터`,"logs.conversation.totals":`{requests}건 요청 · {tokens} 토큰 · {cost}`,"logs.conversation.scope":`합계는 현재 로드된 Logs 링만 포함합니다.`,"logs.conversation.excluded":`(~$에서 가격 없음 {unpriced}건, 미측정 {unmetered}건 제외)`,"logs.detail.conversation":`대화`,"logs.badge.claude":`Claude`,"logs.badge.grok":`Grok`,"logs.col.time":`시간`,"logs.col.request":`요청`,"logs.col.model":`모델`,"logs.col.effort":`추론 강도`,"logs.col.provider":`프로바이더`,"logs.col.status":`상태`,"logs.col.tokens":`토큰`,"logs.col.tokPerSec":`tok/s`,"logs.col.estimatedCost":`~$`,"logs.metric.tokPerSecTitle":`전체 요청 시간 기준 초당 출력 토큰`,"logs.metric.estimatedCostTitle":`API 정가 환산치이며 실제 청구액이 아닙니다. 가격 미매칭은 표시하지 않습니다.`,"usage.cost.total":`API 정가 환산치 (이 기간)`,"usage.cost.disclaimer":`결제 영수증이 아닙니다. 구독 사용량 또는 프로바이더 크레딧이 대신 적용될 수 있습니다.`,"usage.cost.unpricedNote":`비용 산정 불가 {count}건 제외`,"logs.detail.section.basic":`기본 정보`,"logs.detail.section.performance":`성능`,"logs.detail.section.cost":`API 정가 환산치`,"logs.detail.section.attempts":`Combo 시도`,"logs.detail.section.usage":`원본 usage`,"logs.detail.ttft":`TTFT`,"logs.detail.costTotal":`정가 환산치`,"logs.detail.totalTokens":`전체 토큰`,"logs.detail.matchedKey":`매칭된 jawcode 키`,"logs.detail.priceSource":`가격 출처`,"logs.detail.unavailableReason":`표시 불가 사유`,"logs.detail.copyRequestId":`요청 ID 복사`,"logs.detail.copied":`복사됨`,"logs.detail.source.jawcode":`jawcode 카탈로그`,"logs.detail.source.expected":`expected 가격 오버레이`,"logs.detail.verification.verified":`검증됨`,"logs.detail.verification.derived":`기반 모델 유도`,"logs.detail.attempt.target":`프로바이더 / 모델`,"logs.detail.attempt.reason":`결과 / 사유`,"logs.detail.attempt.completed":`완료`,"logs.detail.attempt.e2eNote":`상위 tok/s는 전체 요청 기준이며 각 시도는 자체 소요 시간을 사용합니다.`,"logs.detail.reason.usage_missing":`usage가 보고되지 않았습니다.`,"logs.detail.reason.usage_unsupported":`이 프로바이더는 usage 보고를 지원하지 않습니다.`,"logs.detail.reason.output_missing":`양수 출력 토큰 수가 보고되지 않았습니다.`,"logs.detail.reason.invalid_duration":`요청 소요 시간이 유효하지 않습니다.`,"logs.detail.reason.price_unmatched":`매칭되는 jawcode 가격을 찾지 못했습니다.`,"logs.detail.reason.invalid_cache_breakdown":`캐시 토큰 상세가 전체 입력 토큰과 모순됩니다.`,"logs.detail.reason.invalid_usage":`usage에 유효하지 않은 토큰 값이 있습니다.`,"logs.detail.reason.combo_attempt_unavailable":`하나 이상의 combo 시도 비용을 계산할 수 없습니다.`,"logs.detail.estimate.usage_estimated":`프로바이더 usage가 추정치입니다.`,"logs.detail.estimate.cache_detail_missing":`캐시 상세가 없어 입력 전액을 상한으로 추정했습니다.`,"logs.detail.estimate.expected_price_overlay":`검증된 expected 정가를 사용했습니다.`,"logs.col.error":`오류`,"logs.col.upstreamReason":`업스트림 원인`,"logs.col.duration":`소요 시간`,"logs.tokens.reported":`측정됨`,"logs.tokens.unreported":`미보고`,"logs.tokens.unsupported":`미지원`,"logs.tokens.estimated":`추정`,"logs.tokens.input":`입력`,"logs.tokens.output":`출력`,"logs.tokens.cacheRead":`캐시 히트 (c)`,"logs.tokens.cacheWrite":`캐시 생성 (w)`,"logs.tokens.reasoning":`추론`,"logs.tokens.noCache":`캐시 미보고`,"logs.tokens.contextTotal":`활성 컨텍스트`,"logs.tokens.noCacheNote":`이 프로바이더는 캐시 토큰 수치를 제공하지 않습니다`,"logs.tokens.noCacheCursor":`Cursor 캐시 상세 미보고`,"logs.tokens.noCacheCursorNote":`Cursor 프로토콜은 캐시 read/write 토큰 수치를 제공하지 않습니다. 캐시 미스가 확인됐다는 뜻은 아닙니다`,"logs.tokens.estimatedNote":`추정치 (프로바이더가 정확한 사용량을 제공하지 않음)`,"logs.details":`상세보기`,"logs.detailTitle":`요청 상세`,"logs.detailRaw":`원본 로그`,"debug.title":`디버그`,"debug.subtitle":`선택적 provider transport 및 usage 추출 진단. 요청 오류와 502는 로그 탭에 표시됩니다.`,"debug.debug":`Provider debug`,"debug.usage":`Usage 추출`,"debug.injection":`주입 로그`,"debug.claude":`Claude 인바운드`,"debug.claudeInbound.title":`Claude 인바운드 요청`,"debug.claudeInbound.sub":`Claude Code/Desktop이 실제로 보내는 값(thinking, effort, metadata)을 보여줍니다 — 프롬프트 원문은 저장하지 않습니다.`,"debug.claudeInbound.empty":`아직 캡처된 요청이 없습니다. 켜진 상태에서 Claude로 메시지를 보내보세요.`,"debug.claudeInbound.time":`시간`,"debug.claudeInbound.endpoint":`엔드포인트`,"debug.claudeInbound.model":`모델`,"debug.claudeInbound.none":`없음`,"debug.reset":`런타임 재정의 해제`,"debug.refresh":`새로고침`,"debug.follow":`Follow`,"debug.streamProvider":`Provider`,"debug.streamUsage":`Usage`,"debug.streamInjection":`Injection`,"debug.loading":`디버그 설정 로딩 중…`,"debug.loadFailed":`디버그 설정을 불러오지 못했습니다.`,"debug.emptyTitle":`디버그 로깅 꺼짐`,"debug.empty":`위 카드에서 Provider debug 또는 Usage extraction을 켜세요. 프록시로 요청을 보낸 뒤 라인이 표시됩니다.`,"debug.noLinesTitle":`라인 대기 중`,"debug.noLines.provider":`공급자 디버그는 켜져 있지만 전송 이상(드롭되거나 잘못된 프레임, Cursor dial/retry 이벤트)만 기록합니다. Anthropic 같은 공급자로의 정상 요청은 라인을 생성하지 않을 수 있습니다.`,"debug.noLines.usage":`사용량 추출은 켜져 있지만 아직 캡처된 항목이 없습니다. Codex로 요청을 보내면 여기에 표시됩니다.`,"debug.noLines.injection":`주입 로그는 켜져 있지만 아직 캡처된 항목이 없습니다. Collab 및 서브 에이전트 턴의 멀티 에이전트 가이던스 주입과 effort-cap 결정을 기록합니다.`,"usage.title":`사용량`,"usage.subtitle":`프록시의 로컬 토큰 집계입니다. 누락된 사용량은 0으로 표시하지 않습니다.`,"usage.loading":`사용량 데이터를 불러오는 중…`,"usage.empty":`아직 기록된 사용량이 없습니다. 프록시로 요청을 보내면 여기에 표시됩니다.`,"usage.loadError":`사용량 데이터를 불러오지 못했습니다.`,"usage.range.all":`전체`,"usage.range.available":`사용 가능한 기록`,"usage.historyTruncated":`이전 사용 기록을 불러오지 않아 합계는 사용 가능한 기록만 포함합니다.`,"usage.range.30d":`30일`,"usage.range.7d":`7일`,"usage.card.requests":`요청`,"usage.card.measured":`측정됨`,"usage.card.reported":`측정됨`,"usage.card.totalTokens":`총 토큰`,"usage.card.cachedTokens":`캐시 히트 토큰`,"usage.card.cachedTokensHint":`프로바이더 캐시에서 읽어온 프롬프트 토큰(히트)입니다. 캐시 생성(쓰기)은 아래에 별도 표시됩니다.`,"usage.card.cacheWriteTokens":`캐시 생성`,"usage.card.coverage":`커버리지`,"usage.card.activeDays":`활동일`,"usage.section.heatmap":`일별 활동`,"usage.section.overview":`개요`,"usage.section.models":`모델`,"usage.section.providers":`프로바이더`,"usage.section.coverage":`커버리지 상세`,"usage.workspace.report":`사용량 보고서`,"usage.workspace.sections":`사용량 섹션`,"usage.coverage.measured":`측정됨`,"usage.coverage.reported":`제공자 보고`,"usage.coverage.estimated":`추정`,"usage.coverage.note":`측정됨 항목은 제공자 보고와 추정 토큰 수치를 함께 포함합니다. 미보고/미지원 요청은 추적만 하고 0으로 환산하지 않습니다.`,"usage.search.models":`모델 검색…`,"usage.col.requests":`요청`,"usage.col.measured":`측정됨`,"usage.col.reported":`측정됨`,"usage.col.tokens":`토큰`,"usage.col.share":`비율`,"usage.heatmap.less":`적음`,"usage.heatmap.more":`많음`,"modal.addNamed":`추가: {label}`,"modal.add":`프로바이더 추가`,"modal.search":`프로바이더 검색…`,"modal.logInWith":`{label} 로 로그인`,"modal.waitingBrowser":`브라우저 대기 중…`,"modal.providerName":`프로바이더 이름`,"modal.adapter":`어댑터`,"modal.baseUrl":`Base URL`,"modal.endpoint":`엔드포인트`,"modal.endpoint.tokenPlan":`토큰 플랜`,"modal.endpoint.payAsYouGo":`종량제`,"modal.endpoint.custom":`사용자 지정`,"modal.defaultModel":`기본 모델(선택)`,"modal.allowPrivateNetwork":`로컬/사설 네트워크 허용`,"modal.allowPrivateNetworkHint":`의도적으로 자체 호스팅하는 프로바이더에만 활성화하세요. 메타데이터 엔드포인트는 계속 차단됩니다.`,"modal.nameRequired":`프로바이더 이름을 입력하세요`,"modal.baseUrlRequired":`Base URL을 입력하세요`,"modal.networkError":`네트워크 오류 — 프록시가 실행 중인가요?`,"modal.loginFailStart":`로그인을 시작하지 못했습니다`,"modal.waitingLogin":`브라우저 로그인 대기 중…`,"modal.loggingIn":`로그인 중…`,"modal.loginTimeout":`로그인 시간 초과 — 다시 시도하세요.`,"nav.api":`API`,"nav.codexAuth":`Codex 인증`,"nav.openMenu":`메뉴 열기`,"nav.closeMenu":`메뉴 닫기`,"codexAuth.mainAccount":`메인 계정`,"codexAuth.codexApp":`Codex App`,"codexAuth.appLogin":`앱 로그인`,"codexAuth.accountPool":`계정 풀`,"codexAuth.accountModeTitle":`OpenAI 계정 모드`,"codexAuth.accountModePool":`풀 모드`,"codexAuth.accountModePoolDesc":`메인 로그인과 사용 가능한 추가 계정이 여기에서 순환됩니다.`,"codexAuth.accountModeDirect":`직접 모드`,"codexAuth.accountModeDirectDesc":`요청은 메인 로그인만 사용하며, 추가 계정은 풀 모드용으로 계속 저장됩니다.`,"codexAuth.openaiMissing":`내장 OpenAI 프로바이더가 설정되지 않았습니다.`,"codexAuth.openaiDisabled":`내장 OpenAI 프로바이더가 비활성화되어 있습니다.`,"codexAuth.openaiUnavailableDesc":`OpenAI 계정은 그대로 사용할 수 있습니다. Codex 요청을 라우팅하려면 프로바이더를 활성화하세요.`,"codexAuth.enableOpenai":`OpenAI 활성화`,"codexAuth.enablingOpenai":`활성화 중...`,"codexAuth.enableOpenaiFailed":`OpenAI 공급자를 활성화하지 못했습니다.`,"codexAuth.openaiPresetLoadFailed":`OpenAI 공급자 프리셋을 불러오지 못했습니다.`,"codexAuth.openaiPresetUnavailable":`OpenAI 공급자 프리셋을 사용할 수 없습니다.`,"codexAuth.openProviders":`프로바이더 열기`,"codexAuth.add":`추가`,"codexAuth.refreshQuota":`할당량 새로고침`,"codexAuth.refreshingQuota":`새로고침 중...`,"codexAuth.quotaRefreshed":`할당량을 다시 조회했습니다`,"codexAuth.quotaRefreshFailed":`할당량 재조회에 실패했습니다`,"codexAuth.pauseExhausted":`한도 도달 계정 일시 중지`,"codexAuth.pausingExhausted":`할당량 확인 중...`,"codexAuth.pauseExhaustedSucceeded":`한도에 도달해 일시 중지된 계정: {count}`,"codexAuth.pauseExhaustedNone":`사용량 100%가 확인된 계정이 없습니다.`,"codexAuth.pauseExhaustedFailed":`한도 도달 계정을 확인하고 일시 중지하지 못했습니다.`,"codexAuth.noPool":`풀 계정이 아직 없습니다.`,"codexAuth.pause":`일시 중지`,"codexAuth.resume":`재개`,"codexAuth.paused":`일시 중지됨`,"codexAuth.pauseSucceeded":`{email} 계정을 일시 중지했습니다`,"codexAuth.resumeSucceeded":`{email} 계정을 풀에서 다시 사용할 수 있습니다`,"codexAuth.pauseFailed":`{email} 계정을 일시 중지하지 못했습니다. 변경 사항이 없습니다.`,"codexAuth.resumeFailed":`{email} 계정을 재개하지 못했습니다. 변경 사항이 없습니다.`,"codexAuth.pausedHint":`재개할 때까지 자동 전환, 재시도, 쿨다운 복구 및 수동 선택에서 제외됩니다.`,"codexAuth.fiveHour":`5시간`,"codexAuth.weekly":`주간`,"codexAuth.monthly":`30일`,"codexAuth.resets":`리셋`,"codexAuth.today":`오늘`,"codexAuth.current":`현재`,"codexAuth.nextSession":`선택됨`,"codexAuth.poolPrepared":`풀 모드 준비됨`,"codexAuth.preparePoolTitle":`이 계정을 풀 모드용으로 준비할까요?`,"codexAuth.preparePoolDesc":`직접 모드 요청은 계속 메인 로그인을 사용합니다. 풀 모드를 켜면 이 계정이 준비된 풀 선택으로 사용됩니다.`,"codexAuth.prepareForPool":`풀 모드용으로 준비`,"codexAuth.poolPreparedToast":`{email} 계정을 풀 모드용으로 준비했습니다`,"codexAuth.switchTitle":`활성 계정을 변경하시겠습니까?`,"codexAuth.switchDesc":`기존 세션과 새 세션의 다음 요청부터 적용됩니다. 진행 중인 요청은 기존 계정을 유지합니다.`,"codexAuth.cacheWarning":`계정이 바뀌어도 OpenCodex는 대화 문맥을 재생하지만, 프로바이더 측 프롬프트 캐시는 다시 예열해야 할 수 있습니다.`,"codexAuth.setAsNext":`계정 선택`,"codexAuth.cancel":`취소`,"codexAuth.switchBack":`메인 계정으로 돌아가시겠습니까?`,"codexAuth.switchBackDesc":`기존 세션과 새 세션의 다음 요청부터 앱 로그인 계정을 사용합니다.`,"codexAuth.autoSwitch":`사용량 기반 선제 전환`,"codexAuth.autoSwitchQuotaDesc":`할당량: 사용량이 {threshold}% 이상이면 이미 바인딩된 작업을 포함해 다음 요청이 사용량이 더 낮은 적격 계정으로 이동할 수 있습니다. Go/Free는 30일만 봅니다.`,"codexAuth.autoSwitchQuotaOffDesc":`사용량 기반 선제 전환이 꺼져 있습니다. 새 작업/바인딩 없는 작업 배정과 실패 복구는 계속 적용됩니다.`,"codexAuth.autoSwitchRoundRobinDesc":`라운드로빈 배정은 이 임계값을 사용하지 않으며, 바인딩 없는 새 작업을 계속 순환합니다.`,"codexAuth.autoSwitchFillFirstDesc":`필 퍼스트: {threshold}%는 새 작업/바인딩 없는 작업의 소진 기준이며, 정상적인 바인딩 작업은 계정을 유지합니다.`,"codexAuth.autoSwitchFillFirstOffDesc":`필 퍼스트에는 새 작업/바인딩 없는 작업의 사용량 소진 기준이 없습니다. 쿨다운, 재인증, 실패 복구는 여전히 라우팅을 바꿀 수 있습니다.`,"codexAuth.failureRecoveryNote":`실패 복구는 별도입니다. 출력 전 429/402 거절, 쿨다운, 재인증, 제외 또는 설정된 일시적 장애 조치로 다른 적격 계정이 선택될 수 있습니다.`,"codexAuth.autoSwitchThreshold":`사용량 임계값`,"codexAuth.autoSwitchThresholdAria":`사용량 임계값(퍼센트)`,"codexAuth.autoSwitchThresholdInc":`사용량 임계값 증가`,"codexAuth.autoSwitchThresholdDec":`사용량 임계값 감소`,"codexAuth.autoSwitchLoadFailed":`사용량 기반 전환 설정을 불러오지 못했습니다.`,"codexAuth.autoSwitchThresholdInvalid":`1~100 사이의 정수를 입력하세요`,"codexAuth.autoSwitchUpdated":`사용량 기반 선제 전환 설정을 저장했습니다`,"codexAuth.autoSwitchUpdateFailed":`사용량 기반 전환 설정 변경을 확인하지 못했습니다. 마지막으로 확인된 값을 표시합니다.`,"anthropicPool.title":`Claude 계정 풀(실험적)`,"anthropicPool.enabledDesc":`429 시 계정을 쿨다운하고 장애 조치합니다. 새 세션은 5시간 사용량이 {threshold}% 미만인 계정을 우선합니다.`,"anthropicPool.disabledDesc":`활성 Claude 계정만 사용합니다. 실험적 라우팅을 감수할 때만 켜세요.`,"anthropicPool.experimentalWarning":`실험적이며 충분히 검증되지 않았습니다. 자동 다중 계정 로테이션처럼 보이는 동작은 Anthropic이 계정을 제한할 수 있습니다. 같은 조직은 할당량을 공유할 수 있어 풀링이 도움이 되지 않을 수 있습니다. 위험을 이해하지 못하면 꺼 두세요.`,"anthropicPool.needTwoAccounts":`풀을 켜기 전에 Claude OAuth 계정을 두 개 이상 추가하세요.`,"anthropicPool.threshold":`새 세션 사용량 임계값`,"anthropicPool.thresholdAria":`새 세션 사용량 임계값(퍼센트)`,"anthropicPool.thresholdHelp":`0은 할당량 기반 선택을 끕니다(어피니티 + 활성 계정만). 기본값 80.`,"anthropicPool.thresholdInvalid":`0에서 100 사이의 정수를 입력하세요`,"anthropicPool.loadFailed":`Claude 풀 설정을 불러오지 못했습니다.`,"anthropicPool.saveFailed":`Claude 풀 설정을 저장하지 못했습니다.`,"anthropicPool.on":`켜짐`,"anthropicPool.off":`꺼짐`,"accountPool.strategy":`로테이션 전략`,"accountPool.strategyDesc":`OpenCodex가 새 작업/바인딩 없는 작업에 계정을 배정하는 방식입니다.`,"accountPool.strategyQuota":`할당량`,"accountPool.strategyRoundRobin":`라운드로빈`,"accountPool.strategyFillFirst":`필 퍼스트`,"accountPool.strategyHintQuota":`할당량 전략은 사용량 임계값을 넘으면 기존 작업의 다음 요청도 다른 계정에 다시 바인딩할 수 있습니다.`,"accountPool.strategyHintRoundRobin":`라운드로빈은 현재 바인딩이 없는 작업만 순환하며, 사용량 임계값은 기본 순환에 영향을 주지 않습니다.`,"accountPool.strategyHintFillFirst":`필 퍼스트는 임계값을 바인딩 없는 작업의 소진 기준으로 사용하며, 정상적인 바인딩 작업은 어피니티를 유지합니다.`,"accountPool.unboundDefinition":`새 작업/바인딩 없는 작업은 현재 계정 바인딩이 없는 요청입니다. 기존에 보이던 작업도 프록시나 어피니티 상태가 초기화되면 바인딩이 없어질 수 있습니다.`,"accountPool.stickyLimit":`회전 전 새 작업/바인딩 없는 작업 배정 횟수`,"accountPool.stickyLimitAria":`회전 전 새 작업/바인딩 없는 작업 배정 횟수`,"accountPool.stickyLimitInc":`스티키 한도 증가`,"accountPool.stickyLimitDec":`스티키 한도 감소`,"accountPool.stickyLimitHelp":`다음 계정으로 넘어가기 전에 이 횟수의 새 작업/바인딩 없는 작업을 선택 계정에 배정합니다. 카운터는 업스트림 성공 후가 아니라 작업을 바인딩할 때 증가합니다.`,"accountPool.stickyLimitInvalid":`1에서 100 사이의 정수를 입력하세요`,"accountPool.strategyLoadFailed":`로테이션 전략을 불러오지 못했습니다.`,"accountPool.strategyUpdateFailed":`로테이션 전략을 저장하지 못했습니다.`,"codexAuth.switched":`다음 요청에 {email}을(를) 사용합니다`,"codexAuth.loadFailed":`Codex 계정 설정을 불러오지 못했습니다.`,"codexAuth.switchFailed":`계정을 전환하지 못했습니다. 이전 선택은 그대로 유지됩니다.`,"codexAuth.removeConfirm":`{id}을(를) 삭제하시겠습니까?`,"codexAuth.removeFailed":`계정을 제거하지 못했습니다. 변경된 내용은 없습니다.`,"codexAuth.addTitle":`Codex 계정 추가`,"codexAuth.addIdLabel":`계정 ID (슬러그)`,"codexAuth.addJsonLabel":`auth.json 내용`,"codexAuth.addHelp":`다른 머신의 ~/.codex/auth.json을 복사하거나, codex-auth export를 사용하세요.`,"codexAuth.importBtn":`가져오기`,"codexAuth.importInvalidJson":`유효하지 않은 JSON`,"codexAuth.importMissingTokens":`JSON에 access_token 또는 refresh_token이 없습니다`,"codexAuth.importMissingId":`계정 ID를 입력하세요`,"codexAuth.accountAdded":`풀에 계정이 추가되었습니다`,"codexAuth.addPickDesc":`다른 ChatGPT 계정으로 로그인하여 풀에 추가하세요.`,"codexAuth.oauthLogin":`OAuth 로그인`,"codexAuth.oauthDesc":`브라우저에서 ChatGPT 로그인 열기`,"codexAuth.importAuthJson":`auth.json 가져오기`,"codexAuth.importAuthJsonDesc":`다른 Codex 설치 또는 codex-auth export에서`,"codexAuth.back":`뒤로`,"codexAuth.oauthAlreadyInProgress":`로그인이 이미 진행 중입니다. 브라우저에서 완료하세요.`,"codexAuth.oauthWaiting":`브라우저에서 ChatGPT 로그인 완료를 기다리는 중...`,"codexAuth.oauthSubmittingCode":`코드를 제출 중…`,"codexAuth.oauthCodeSubmitted":`코드를 제출했습니다 — 로그인 완료를 기다리는 중입니다…`,"codexAuth.oauthStatusRetrying":`로그인 상태를 확인하는 중 네트워크 또는 프록시 오류가 발생했습니다 — 재시도 중…`,"codexAuth.oauthCancelled":`로그인이 취소되었습니다.`,"codexAuth.loginFailed":`로그인에 실패했습니다`,"codexAuth.needsReauth":`재로그인`,"codexAuth.reauthenticate":`Re-authenticate`,"codexAuth.tokenExpired":`토큰 만료 — 이 계정을 다시 인증하세요`,"codexAuth.mainTokenExpired":`토큰 만료 — Codex 앱 로그인으로 다시 로그인하세요`,"codexAuth.emailCollision":`이 계정은 메인 Codex 로그인과 동일합니다. 다른 계정을 사용하세요.`,"codexAuth.resetCreditsTitle":`리셋 크레딧`,"codexAuth.resetCreditsAvailable":`사용 가능한 리셋 크레딧이 {count}개 있습니다.`,"codexAuth.resetCreditsDesc":`크레딧 1개로 현재 시간/주간 사용량 제한을 즉시 초기화합니다.`,"codexAuth.noResetCredits":`사용 가능한 리셋 크레딧이 없습니다.`,"codexAuth.earnCreditsHint":`크레딧은 매월 자동 지급되며 추천 프로그램으로도 획득할 수 있습니다.`,"codexAuth.creditsExpireNote":`크레딧은 획득 후 30일 뒤 만료됩니다.`,"codexAuth.useOneCredit":`크레딧 1개 사용`,"codexAuth.confirmResetTitle":`리셋 크레딧을 사용하시겠습니까?`,"codexAuth.confirmResetDesc":`현재 사용량 제한이 즉시 초기화됩니다. 남은 크레딧: {count}개.`,"codexAuth.irreversible":`이 작업은 되돌릴 수 없습니다.`,"codexAuth.useCredit":`크레딧 사용`,"codexAuth.redeeming":`초기화 중...`,"codexAuth.resetSuccess":`사용량 제한이 초기화되었습니다! 남은 크레딧: {remaining}개.`,"codexAuth.resetSuccessGeneric":`사용량 제한이 초기화되었습니다!`,"codexAuth.resetAlreadyRedeemed":`이 크레딧은 이미 사용되었습니다. 크레딧은 변경되지 않았습니다.`,"codexAuth.resetNothingToReset":`현재 초기화할 사용량 윈도우가 없습니다.`,"codexAuth.resetNoCredit":`사용 가능한 리셋 크레딧이 없습니다.`,"codexAuth.resetError":`리셋 크레딧 사용에 실패했습니다. 다시 시도해 주세요.`,"codexAuth.fifoNote":`가장 오래된 크레딧부터 사용됩니다.`,"codexAuth.confirmWhichCredit":`{date}에 획득한 크레딧이 사용됩니다.`,"codexAuth.creditNext":`다음 사용 대상`,"codexAuth.creditLabel":`크레딧 #{n}`,"codexAuth.creditNextBadge":`NEXT`,"codexAuth.creditGranted":`획득 {date}`,"codexAuth.creditExpires":`만료 {date} ({days}일 남음)`,"api.title":`API 액세스`,"api.subtitle":`생성한 API 키로 외부 앱에서 opencodex 프록시에 접속합니다. 인증은 {authHeader} 헤더로 하며, 엔드포인트별로 받는 헤더는 아래 표에 있습니다.`,"api.endpointNote":`기본 URL을 OpenAI 호환 클라이언트에 사용하세요. Responses와 Chat Completions는 /v1 아래에 제공됩니다.`,"api.baseUrl":`기본 URL`,"api.responsesEndpoint":`Responses API`,"api.chatCompletionsEndpoint":`Chat Completions API`,"api.messagesEndpoint":`Messages API`,"api.modelsEndpoint":`Models API`,"api.endpointsTitle":`게이트웨이 엔드포인트`,"api.authBaseUrlNote":`클라이언트에는 기본 URL을 설정한 뒤 아래에서 프로토콜별 엔드포인트를 선택하세요.`,"api.authTitle":`인증`,"api.authLoopback":`루프백 바인드(127.0.0.1 또는 ::1)는 인증을 건너뜁니다. 원격 바인드는 생성된 ocx_ 키 또는 OPENCODEX_API_AUTH_TOKEN이 필요합니다.`,"api.modelsTitle":`외부 모델 카탈로그`,"api.modelsCount":`{count}개 호출 가능`,"api.modelsSearch":`모델 검색`,"api.modelsSubtitle":`이 정확한 모델 ID를 /v1/models와 선택한 인바운드 프로토콜과 함께 사용하세요.`,"api.modelsLoading":`모델 불러오는 중…`,"api.modelsEmpty":`아직 외부에서 호출 가능한 모델이 없습니다.`,"api.modelsNoMatch":`“{query}”와 일치하는 모델이 없습니다.`,"api.modelsLoadFailed":`외부 모델 카탈로그를 불러오지 못했습니다.`,"api.colModel":`모델`,"api.colSource":`출처`,"api.colProtocols":`프로토콜`,"api.copyModelId":`ID 복사`,"api.modelCopied":`복사됨`,"api.testModel":`테스트`,"api.testingModel":`테스트 중…`,"api.testSucceeded":`확인`,"api.testFailed":`실패`,"api.protocolResponses":`Responses`,"api.protocolChatCompletions":`Chat Completions`,"api.protocolMessages":`Messages`,"api.sourceNative":`ChatGPT 풀`,"api.sourceCombo":`콤보 경로`,"api.sourceCustom":`사용자 정의`,"api.usageResponsesTitle":`Responses 예시`,"api.usageChatTitle":`Chat Completions 예시`,"api.usageMessagesTitle":`Messages 예시`,"api.newKeyTitle":`새 키 생성됨`,"api.newKeyNote":`지금 키를 복사하세요. 다시 표시되지 않습니다.`,"api.copy":`복사`,"api.copied":`복사됨`,"api.dismiss":`닫기`,"api.generateTitle":`키 생성`,"api.keyNamePlaceholder":`키 이름 (선택)`,"api.generate":`생성`,"api.generating":`생성 중…`,"api.activeKeys":`활성 키 ({count})`,"api.activeKeysLoading":`활성 키`,"api.noKeys":`아직 API 키가 없습니다. 위에서 하나 생성하세요.`,"api.workspace.sections":`API 섹션`,"api.section.keys":`키`,"api.section.connect":`연결`,"api.section.endpoints":`엔드포인트`,"api.section.models":`모델`,"api.section.examples":`예제`,"api.workspace.details":`API 키 세부 정보`,"api.workspace.keyDetails":`키 세부 정보`,"api.workspace.keyPrefix":`키 접두사`,"api.workspace.deleteKey":`키 삭제`,"api.workspace.deleteConfirm":`이 키를 삭제하시겠습니까? 되돌릴 수 없습니다.`,"api.workspace.usageExamples":`사용 예제`,"api.copyUrlHint":`클릭하여 URL 복사`,"api.urlCopied":`URL 복사됨`,"api.copyExampleHint":`클릭하여 예제 복사`,"api.exampleCopied":`예제 복사됨`,"api.colName":`이름`,"api.colKey":`키`,"api.colCreated":`생성일`,"api.confirm":`확인`,"api.deleteAria":`API 키 삭제`,"api.usageSampleInput":`안녕하세요, 세계!`,"api.clientConfig.title":`클라이언트 설정`,"api.clientConfig.rowsLabel":`클라이언트 연결`,"api.clientConfig.details":`자세히`,"api.clientConfig.detailsAria":`{client} 설정 자세히 보기`,"api.clientConfig.copyAria":`{client} 설정 JSON 복사`,"api.clientConfig.downloadAria":`{client} 설정 다운로드`,"api.clientConfig.rowMeta":`{destination} · 모델 {count}개`,"api.clientConfig.rowError":`{client} 설정을 만들지 못했습니다.`,"api.clientConfig.copiedAnnounceClient":`{client} 설정 JSON을 클립보드에 복사했습니다.`,"api.clientConfig.clientOpencode":`OpenCode`,"api.clientConfig.clientPi":`Pi`,"api.clientConfig.copy":`JSON 복사`,"api.clientConfig.download":`다운로드`,"api.clientConfig.loading":`클라이언트 설정 생성 중…`,"api.clientConfig.jsonLabel":`{client} 설정 JSON`,"api.clientConfig.destination":`대상 파일`,"api.clientConfig.envHint":`실행 전 키 설정`,"api.clientConfig.mergeWarning":`대상 파일에 병합하세요. 덮어쓰면 기존 프로바이더와 MCP 설정이 사라집니다.`,"api.clientConfig.modelCount":`모델 {count}개 내보냄`,"api.clientConfig.missingLimits":`{total}개 중 {count}개 모델에 컨텍스트 한도가 없어 클라이언트 기본값이 적용됩니다.`,"api.clientConfig.noKeyYet":`{env}에 연결된 키가 아직 없습니다. 루프백 밖에서 쓰려면 위에서 키를 발급하세요.`,"api.clientConfig.loadFailed":`모델 목록을 읽지 못해 클라이언트 설정을 만들지 못했습니다.`,"api.clientConfig.copiedAnnounce":`클라이언트 설정 JSON을 클립보드에 복사했습니다.`,"api.clientConfig.copyFailed":`클라이언트 설정 JSON을 복사하지 못했습니다.`,"api.clientConfig.downloadedAnnounce":`{filename} 파일을 다운로드했습니다. 아직 아무것도 바뀌지 않았으니 {destination}에 직접 병합하세요.`,"api.clientConfig.whereDisclosure":`이 파일이 들어갈 위치`,"api.clientConfig.whereBody":`위 경로는 전역 설정 경로입니다. 작업 디렉터리의 프로젝트 설정 파일이 우선하며, 키는 설정에 적힌 환경 변수에서 읽고 이 파일에는 저장되지 않습니다.`,"api.keysLoadFailed":`API 키를 불러오지 못했습니다.`,"api.createFailed":`API 키를 만들지 못했습니다.`,"api.deleteFailed":`API 키를 삭제하지 못했습니다.`,"api.auth.endpoint":`엔드포인트`,"api.auth.required":`필수`,"api.auth.accepted":`가능`,"api.auth.rejected":`안 됨`,"api.auth.testProtocol":`{protocol} 테스트`,"api.auth.testNeedsFreshKey":`인증 테스트를 하려면 키를 새로 만들고 한 번만 보이는 값을 화면에 둔 채로 실행하세요.`,"api.key.name":`키 이름`,"api.key.rename":`이름 변경`,"api.key.saveName":`이름 저장`,"api.key.renaming":`저장 중…`,"api.key.renameFailed":`이름을 바꾸지 못했습니다. 입력한 내용은 그대로 뒀습니다.`,"api.key.deleting":`삭제 중…`,"api.key.copyFailed":`키를 복사하지 못했습니다. 이 패널을 닫기 전에 직접 선택해서 복사하세요.`,"api.attribution.title":`키별 사용량`,"api.attribution.requests7d":`최근 7일 요청`,"api.attribution.totalRequests":`집계된 전체 요청`,"api.attribution.totalRequestsAvailable":`사용 가능한 기록의 요청`,"api.attribution.sinceAvailable":`사용 가능한 집계 시작일`,"api.attribution.lastUsed":`마지막 사용`,"api.attribution.since":`집계 시작`,"api.attribution.neverUsed":`집계 이후 사용 없음`,"api.attribution.unavailable":`사용량 없음`,"api.attribution.unavailableDetail":`아직 집계된 사용량이 없습니다. 집계가 시작되기 전 요청은 소급해서 배정할 수 없습니다.`,"api.attribution.ambiguous":`두 키가 같은 ID를 쓰고 있어 어느 쪽 사용량인지 가릴 수 없습니다. 설정 파일에서 키마다 다른 ID를 주세요.`,"api.attribution.railAmbiguous":`ID 중복`,"nav.claude":`Claude`,"claude.subtitle":`Claude Code에서 GPT, Gemini 등 다른 모델도 쓸 수 있게 해줍니다.`,"claude.enabledLabel":`Claude 연결`,"claude.enabledHint":`끄면 Claude Code가 이 프록시를 사용할 수 없습니다.`,"claude.authMode":`인증 모드`,"claude.authModeHint":`subscription은 Claude 계정 필요, proxy는 opencodex 프록시만으로 사용 가능`,"claude.authModeSubscription":`Subscription (Claude 계정)`,"claude.authModeProxy":`Proxy (계정 불필요)`,"claude.authModeAuto":`자동 (Claude 인증 감지)`,"claude.effectiveMode.label":`다음 실행 시 적용`,"claude.effectiveMode.manual":`수동: {mode}`,"claude.effectiveMode.autoPresent":`자동: 구독 — {source}에서 Claude 인증을 찾았습니다`,"claude.effectiveMode.autoAbsent":`자동: 프록시 모드 — Claude 인증이 없습니다`,"claude.effectiveMode.autoUnknown":`자동: 구독 — 인증을 확인하지 못했습니다`,"claude.effectiveMode.admissionKey":`이 프록시의 API 키는 계속 전송됩니다.`,"claude.authSource.claude-json-oauth":`Claude 계정`,"claude.authSource.claude-credentials-file":`자격 증명 파일`,"claude.authSource.macos-keychain":`macOS 키체인`,"claude.authSource.exported-env":`환경 변수`,"claude.authSource.unknown":`감지된 자격 증명`,"claude.systemEnv":`자동 연결`,"claude.systemEnvDesc":`켜면 터미널에서 claude를 바로 실행해도 프록시를 거칩니다.`,"claude.systemEnvUnsupported":`자동 연결은 macOS에서만 지원됩니다. 이 시스템에서는 {cmd}로 Claude를 실행하세요.`,"claude.systemEnvWarn":`⚠ 터미널 앱을 완전히 종료했다 다시 열어야 적용됩니다. 사용을 권장하지 않습니다.`,"claude.fastMode":`Fast Mode (OpenAI)`,"claude.fastModeDesc":`OpenAI 모델의 추론 속도를 제어합니다. ON = 빠른 추론. OFF = 기본 속도. Auto = 클라이언트 설정 그대로.`,"claude.fastAuto":`Auto`,"claude.fastOn":`ON`,"claude.fastOff":`OFF`,"claude.autoContext":`큰 컨텍스트 자동 활용`,"claude.autoContextDesc":`1M 표기를 어디까지 붙일지 정합니다. 켜면 20만 토큰을 넘는 모델 전부(GPT 계열 등)에 큰 컨텍스트 행이 생기고, 끄면 진짜 1M 모델에만 생깁니다.`,"claude.autoContextInert":`설정 파일에 이전 방식의 컨텍스트 크기 값(maxContextTokens)이 있어 이 기능이 지금은 적용되지 않아요. 설정에서 그 값을 지우면 다시 켜집니다.`,"claude.autoCompactWindow":`자동 요약 지점`,"claude.autoCompactDefault":`350k (기본값)`,"claude.autoCompactWindowDesc":`대화가 이 지점에 다다르면 오래된 내용을 자동 요약합니다. 모델마다 자기 한도를 넘지 않는 선에서만 적용되니 200k 모델은 영향받지 않아요.`,"claude.autoCompactWindowWarn":`값을 직접 바꾸면 GPT 모델들이 제대로 동작하지 않을 수 있어요 — 모델의 실제 한도보다 크게 잡으면 요약이 되기 전에 대화가 오류로 멈춥니다.`,"claude.injectAgents":`서브에이전트 자동 등록`,"claude.injectAgentsDesc":`위 '서브에이전트' 탭에서 고른 모델들(+현재 기본 모델)을 Claude Code의 파견 가능한 에이전트(ocx-*)로 자동 등록합니다. 새 세션부터 적용돼요.`,"claude.webSearchSidecar":`웹 검색 사이드카 덮어쓰기`,"claude.webSearchSidecarHint":`Claude Code 요청에만 메인 웹 검색 사이드카 대신 이 설정을 씁니다.`,"claude.visionSidecar":`비전 사이드카 덮어쓰기`,"claude.visionSidecarHint":`Claude Code 요청에만 메인 비전 사이드카 대신 이 설정을 씁니다.`,"claude.useMainSetting":`메인 설정 사용`,"claude.sidecarModelPlaceholder":`메인 설정의 모델`,"claude.quickstart":`시작하기`,"claude.quickstartHint":`{cmd} 을 실행하면 프록시를 거쳐 Claude Code가 열립니다. claude.ai 로그인은 그대로 유지됩니다.`,"claude.manualEnv":`직접 설정하기 (고급)`,"claude.smallFastModel":`백그라운드 보조 모델`,"claude.smallFastModelHint":`Claude Code가 대화 요약, 주제 감지 같은 배후 작업에 쓰는 모델입니다. 서브에이전트의 haiku 별칭도 이 모델을 씁니다. 비워두면 Claude 기본값(Haiku).`,"claude.smallFastModelAccurateHint":`Claude Code가 대화 요약, 주제 감지 같은 백그라운드 작업에 쓰는 모델입니다. 서브에이전트의 haiku 별칭도 이 모델을 사용합니다.`,"claude.smallFastModelUnsetOption":`Claude Code가 선택(네이티브 모델)`,"claude.smallFastModelNativeWarning":`비워 두면 OpenCodex가 보조 모델 환경 변수를 설정하지 않습니다. Claude Code가 네이티브 Sonnet 모델을 사용할 수 있으며, 네이티브 프로바이더 요금이 발생할 수 있습니다.`,"claude.slotUnset":`Claude 기본값 사용`,"claude.modelMap":`모델 가로채기`,"claude.modelMapHint":`Claude가 특정 모델을 요청하면 가로채서 지정한 모델로 보냅니다. 기본값은 비어 있어요 — 규칙을 추가할 때만 동작합니다.`,"claude.mapFrom":`원래 모델 (예: claude-sonnet-4-5)`,"claude.mapTo":`바꿀 모델 (예: gemini/gemini-3-pro)`,"claude.addMapping":`규칙 추가`,"claude.removeMapping":`규칙 삭제`,"claude.aliases":`사용 가능한 모델`,"claude.aliasesHint":`Claude Code의 /model 메뉴에 표시되는 모델 목록입니다.`,"claude.aliasProviderOther":`기타`,"claude.loading":`불러오는 중…`,"claude.loadFail":`Claude 설정을 불러오지 못했습니다`,"claude.saved":`저장되었습니다.`,"claude.saveFailed":`저장 실패`,"claude.networkError":`네트워크 오류 — 프록시가 실행 중인가요?`,"claude.toggleAria":`Claude 인바운드 켜기/끄기`,"claude.none":`없음`,"common.close":`닫기`,"common.ok":`확인`,"app.logoAria":`opencodex 로고`,"app.claudeOn":`Claude ON`,"app.claudeOff":`Claude OFF`,"usage.dayMon":`월`,"usage.dayWed":`수`,"usage.dayFri":`금`,"usage.heatmap.tooltipTokens":`{tokens} 토큰`,"usage.heatmap.tooltipRequests":`{requests} 요청`,"nav.storage":`저장소`,"storage.title":`저장소`,"storage.subtitle":`CODEX_HOME 사용량을 확인합니다. 정리는 활성 세션을 건드리지 않습니다.`,"storage.loading":`저장소 스캔 중…`,"storage.empty":`CODEX_HOME이 비어 있거나 없습니다 — 표시할 내용이 없습니다.`,"storage.error":`저장소 스캔에 실패했습니다. CODEX_HOME이 올바른 디렉터리를 가리키는지 확인하세요.`,"storage.refresh":`다시 스캔`,"storage.rescanned":`스캔이 완료되었습니다.`,"storage.card.total":`전체 크기`,"storage.card.files":`파일 수`,"storage.card.home":`CODEX_HOME`,"storage.snapshot.lastScan":`마지막 스캔`,"storage.snapshot.scanning":`스캔 중…`,"storage.snapshot.unavailable":`아직 스캔 없음.`,"storage.cleanupCard.title":`공간 확보`,"storage.cleanupCard.tabs":`정리 옵션`,"storage.cleanupCard.tab.policy":`정책`,"storage.cleanupCard.tab.quarantine":`격리`,"storage.cleanup.noArchives":`정리할 보관 세션이 없습니다.`,"storage.section.buckets":`버킷`,"storage.section.largest":`가장 큰 파일`,"storage.workspace.overview":`개요`,"storage.workspace.selectBucket":`목록에서 버킷을 선택하면 세부 내역을 볼 수 있습니다.`,"storage.col.bucket":`버킷`,"storage.col.size":`크기`,"storage.col.files":`파일`,"storage.col.oldest":`가장 오래됨`,"storage.col.newest":`가장 최근`,"storage.col.rows":`DB 행 수`,"storage.rows.unknown":`알 수 없음 (잠김)`,"storage.bucket.sessions":`활성 세션`,"storage.bucket.archived_sessions":`보관된 세션`,"storage.bucket.logs_db":`로그 데이터베이스`,"storage.bucket.state_db":`상태 데이터베이스`,"storage.bucket.attachments":`첨부 파일`,"storage.bucket.deletion_manifests":`삭제 매니페스트`,"storage.bucket.other":`기타`,"storage.cleanup.title":`보관 정리`,"storage.cleanup.help":`가장 오래된 보관 세션을 비율로 제거합니다. 활성 세션은 건드리지 않습니다. 기본은 격리이며 파일은 CODEX_HOME/.trash로 이동합니다.`,"storage.cleanup.slider":`오래된 보관 비율`,"storage.cleanup.percent":`{percent}%`,"storage.cleanup.preset":`{percent}`,"storage.cleanup.preview":`미리보기`,"storage.cleanup.confirmTitle":`보관 정리 확인`,"storage.cleanup.confirmBody":`보관 파일 {count}개(약 {size}), 오래된 {percent}%를 처리합니다.`,"storage.cleanup.moreFiles":`…외 {n}개`,"storage.cleanup.permanent":`영구 삭제(격리 건너뛰기)`,"storage.cleanup.permanentWarn":`영구 삭제는 되돌릴 수 없습니다.`,"storage.cleanup.quarantineNote":`파일은 CODEX_HOME 아래 .trash로 이동합니다. 격리 탭에서 복원할 수 있습니다.`,"storage.cleanup.cancel":`취소`,"storage.cleanup.confirmQuarantine":`격리`,"storage.cleanup.confirmPermanent":`영구 삭제`,"storage.cleanup.doneQuarantine":`파일 {count}개를 격리했습니다({size}).`,"storage.cleanup.donePermanent":`파일 {count}개를 영구 삭제했습니다({size}).`,"storage.cleanup.previewFailed":`미리보기에 실패했습니다.`,"storage.cleanup.cleanupFailed":`정리에 실패했습니다.`,"storage.cleanup.err.codex_busy":`Codex가 state.sqlite를 사용 중입니다 — Codex를 종료한 뒤 다시 시도하세요.`,"storage.cleanup.err.stale_preview":`미리보기 이후 보관 파일이 변경되었습니다 — 미리보기를 다시 실행하세요.`,"storage.cleanup.err.restore_pending_overlap":`선택한 보관 파일이 미완료 휴지통 복원과 겹칩니다 — 복원을 완료하거나 다시 시도하세요.`,"storage.cleanup.err.referenced_history":`선택한 보관본이 포크 또는 페이지 기록에서 아직 참조됩니다.`,"storage.cleanup.err.invalid_digest":`미리보기 digest가 없거나 잘못되었습니다.`,"storage.cleanup.err.invalid_mode":`모드는 quarantine 또는 permanent여야 합니다.`,"storage.cleanup.err.fs_failed":`파일 시스템 정리에 실패했습니다. 일부 변경이 이미 적용되었을 수 있습니다 — CODEX_HOME/.trash와 표시된 복구 경로를 확인하세요.`,"storage.cleanup.err.fs_failed_trash":`파일 시스템 정리에 실패했습니다. 일부 변경이 이미 적용되었을 수 있습니다 — {trashDir}와 manifest.json에서 복구 가능한 파일을 확인하세요.`,"storage.cleanup.err.db_reconcile_failed":`Codex 상태 데이터베이스를 업데이트할 수 없습니다.`,"storage.cleanup.err.cleanup_failed":`정리에 실패했습니다.`,"storage.trash.title":`격리`,"storage.trash.help":`CODEX_HOME/.trash로 옮긴 보관 세션입니다. 복원하면 JSONL과 스레드 행이 돌아갑니다.`,"storage.trash.empty":`격리된 항목이 없습니다.`,"storage.trash.loading":`격리 목록 불러오는 중…`,"storage.trash.col.when":`격리 시각`,"storage.trash.col.files":`파일`,"storage.trash.col.size":`크기`,"storage.trash.col.mode":`모드`,"storage.trash.col.id":`항목`,"storage.trash.restore":`복원`,"storage.trash.confirmTitle":`격리 항목을 복원할까요?`,"storage.trash.confirmBody":`{id}에서 파일 {count}개(약 {size})를 보관 세션으로 되돌립니다.`,"storage.trash.cancel":`취소`,"storage.trash.confirmRestore":`복원`,"storage.trash.done":`파일 {count}개를 복원했습니다({size}).`,"storage.trash.restoreFailed":`복원에 실패했습니다.`,"storage.trash.listFailed":`격리 목록을 불러오지 못했습니다.`,"storage.trash.mode.quarantine":`격리`,"storage.trash.mode.permanent":`영구(미완료)`,"storage.trash.err.codex_busy":`Codex가 state.sqlite를 사용 중입니다 — Codex를 종료한 뒤 다시 시도하세요.`,"storage.trash.err.invalid_trash":`격리 항목 ID가 없거나 잘못되었습니다.`,"storage.trash.err.missing_trash":`격리 항목을 찾을 수 없습니다.`,"storage.trash.err.dest_exists":`복원 대상이 이미 있습니다 — 보관 파일을 삭제하거나 이름을 바꾼 뒤 다시 시도하세요.`,"storage.trash.err.fs_failed":`파일 시스템 복원에 실패했습니다. 일부 파일이 이미 복원되었을 수 있습니다 — archived_sessions와 .trash를 확인하세요.`,"storage.trash.err.storage_mutation_busy":`다른 저장소 정리 또는 복원이 진행 중입니다 — 잠시 후 다시 시도하세요.`,"storage.trash.err.db_reconcile_failed":`Codex 상태 데이터베이스 행을 복원할 수 없습니다.`,"storage.trash.err.restore_failed":`복원에 실패했습니다.`,"storage.trash.err.restore_worker_timeout":`복원 시간이 너무 길어(10분 초과) 중단되었습니다.`,"storage.trash.err.restore_worker_aborted":`종료 중 복원이 취소되었습니다.`,"storage.trash.err.restore_worker_failed":`복원 워커가 충돌하거나 예기치 않게 실패했습니다.`,"storage.policy.title":`자동 정리 정책`,"storage.policy.help":`보관 세션이 임계값을 넘을 때 선택적으로 일괄 정리합니다. 기본은 꺼짐 — 자동으로 켜지지 않습니다.`,"storage.policy.loading":`정책을 불러오는 중…`,"storage.policy.loadFailed":`정리 정책을 불러오지 못했습니다.`,"storage.policy.saveFailed":`정리 정책을 저장하지 못했습니다.`,"storage.policy.runFailed":`정책 실행에 실패했습니다.`,"storage.policy.alreadyRunning":`정리 정책이 이미 실행 중입니다.`,"storage.policy.invalid":`정책 값이 올바르지 않습니다.`,"storage.policy.enabled":`자동 정리 사용`,"storage.policy.enabledHint":`기본은 꺼짐입니다. 켜면 선택한 일정(또는 지금 실행)에만 동작합니다.`,"storage.policy.threshold":`보관 용량이 초과하면 (GiB)`,"storage.policy.trigger":`트리거`,"storage.policy.target":`정리 목표`,"storage.policy.targetPercent":`가장 오래된 보관 제거 (%)`,"storage.policy.targetReduce":`보관 용량을 다음까지 줄이기 (GiB)`,"storage.policy.thresholdInc":`임계값 증가`,"storage.policy.thresholdDec":`임계값 감소`,"storage.policy.percentInc":`퍼센트 증가`,"storage.policy.percentDec":`퍼센트 감소`,"storage.policy.reduceInc":`축소 목표 증가`,"storage.policy.reduceDec":`축소 목표 감소`,"storage.policy.schedule":`일정`,"storage.policy.schedule.manual":`수동만`,"storage.policy.schedule.startup":`프록시 시작 시`,"storage.policy.schedule.daily":`매일`,"storage.policy.schedule.weekly":`매주`,"storage.policy.mode":`삭제 모드`,"storage.policy.mode.quarantine":`격리(기본)`,"storage.policy.mode.permanent":`영구 삭제`,"storage.policy.permanentWarn":`영구 모드는 되돌릴 수 없습니다. 확실하지 않으면 격리를 사용하세요.`,"storage.policy.lastRun":`마지막 실행`,"storage.policy.lastRunDetail":`{count}개 제거 · {size} 확보`,"storage.policy.nextRun":`다음 실행`,"storage.policy.never":`없음`,"storage.policy.save":`저장`,"storage.policy.runNow":`지금 실행`,"storage.policy.running":`실행 중…`,"storage.policy.saved":`정책을 저장했습니다.`,"storage.policy.skippedDisabled":`정책이 꺼져 있습니다 — 먼저 켜세요.`,"storage.policy.skippedUnder":`보관 용량이 임계값 미만입니다 — 할 일이 없습니다.`,"storage.policy.skippedEmpty":`목표에 맞는 보관 후보가 없습니다.`,"storage.policy.doneQuarantine":`정책이 파일 {count}개를 격리했습니다({size}).`,"storage.policy.donePermanent":`정책이 파일 {count}개를 영구 삭제했습니다({size}).`,"modal.back":`뒤로`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`사용자 지정 프로바이더`,"modal.failedStatus":`실패 ({status})`,"modal.loginError":`로그인 오류: {error}`,"modal.badge.codexLogin":`Codex 로그인`,"modal.badge.local":`로컬`,"modal.badge.apiKey":`API 키`,"modal.badge.direct":`Direct`,"modal.badge.pool":`풀`,"modal.badge.free":`무료`,"modal.invalidPreset":`내장 프로바이더 설정이 완전하지 않습니다. 프록시를 다시 시작한 뒤 재시도하세요.`,"modal.freeTierTitle":`무료 티어`,"modal.freeTierDefault":`API 키가 필요 없습니다. 바로 사용할 수 있습니다.`,"modal.tab.accounts":`계정`,"modal.tab.free":`무료`,"modal.tab.paid":`유료`,"modal.accountsHint":`여기서 ChatGPT/Codex, OAuth, API 키 계정에 로그인하세요. OpenAI는 기본 제공 — 다시 추가하지 말고 로그인하세요.`,"modal.accountsCodexAuthLink":`Codex 인증`,"modal.notListed":`찾는 프로바이더가 없나요? 직접 추가`,"modal.catalogLoading":`카탈로그 불러오는 중…`,"modal.accountLogin":`로그인`,"modal.accountLogout":`로그아웃`,"modal.accountAdd":`계정 추가`,"modal.accountManage":`관리`,"modal.accountCodexPool":`ChatGPT 계정 풀`,"modal.accountLoggedIn":`로그인됨`,"modal.accountLoggedOut":`로그인 안 됨`,"quota.fiveHourLimit":`5시간 한도`,"quota.weeklyLimit":`주간 한도`,"quota.monthlyLimit":`30일 한도`,"quota.monthlyCredits":`월간 크레딧`,"quota.requestWindow":`요청 윈도우`,"quota.grokBuild":`GrokBuild`,"quota.cursorFirstParty":`자사 모델`,"quota.cursorApiUsage":`API 사용량`,"quota.totalSubscriptionCredits":`전체 구독 크레딧`,"quota.usedPercent":`{pct}% 사용`,"quota.limitReached":`한도 도달`,"quota.resetsToday":`오늘 {time} 초기화`,"quota.resetsTomorrow":`내일 {time} 초기화`,"quota.resetsAt":`{when} 초기화`,"quota.resetsRelativeMinutes":`{n}분 후 초기화`,"quota.resetsRelativeHours":`{n}시간 후 초기화`,"pws.status.ready":`준비됨`,"pws.status.needsSetup":`설정 필요`,"pws.status.needsAttention":`확인 필요`,"pws.auth.chatgptPassthrough":`ChatGPT 패스스루`,"pws.auth.noKey":`키 불필요`,"pws.freeTitle":`무료 요금제 (키는 필요할 수 있음)`,"pws.localTitle":`로컬 런타임`,"pws.modelCountOne":`모델 1개`,"pws.modelCount":`모델 {count}개`,"pws.rail.suffixDefault":` · 기본`,"pws.rail.suffixLocal":` · 로컬`,"pws.rail.suffixFree":` · 무료`,"pws.rail.selectAria":`{name} 선택 — {status}{suffix}`,"pws.searchPlaceholder":`프로바이더 검색…`,"pws.filterAria":`프로바이더 필터`,"pws.providerFiltersAria":`프로바이더 필터`,"pws.filters":`필터`,"pws.filterStatus":`상태`,"pws.pricing":`요금`,"pws.paid":`유료`,"pws.filterType":`유형`,"pws.type.cloud":`클라우드`,"pws.type.local":`로컬`,"pws.type.selfHosted":`셀프 호스팅`,"pws.type.login":`로그인`,"pws.sort":`정렬`,"pws.sortProvidersAria":`프로바이더 정렬`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`무료 우선`,"pws.sort.paidFree":`유료 우선`,"pws.sort.accountsFirst":`계정 우선`,"pws.resetAll":`모두 초기화`,"pws.providerList":`프로바이더 목록`,"pws.providersAria":`프로바이더`,"pws.groupReady":`준비됨 ({count})`,"pws.groupNeedsSetup":`설정 필요 ({count})`,"pws.groupDisabled":`비활성화 ({count})`,"pws.noSearchResults":`검색과 일치하는 프로바이더가 없습니다.`,"pws.noMatchFilters":`필터와 일치하는 프로바이더가 없습니다.`,"pws.noProvidersConfigured":`설정된 프로바이더가 없습니다.`,"pws.workspaceMainAria":`프로바이더 상세`,"pws.detailComingSoon":`상세 보기는 준비 중입니다 — 클래식 보기에서 관리하세요.`,"pws.selectPrompt":`목록에서 프로바이더를 선택하세요.`,"pws.connectFirst":`첫 프로바이더를 연결하세요`,"pws.empty.browseFree":`무료 프로바이더 보기`,"pws.empty.browseFreeDesc":`구독 없이 시작`,"pws.empty.connectAccount":`계정 연결`,"pws.empty.connectAccountDesc":`ChatGPT 또는 프로바이더 로그인 사용`,"pws.empty.addEndpoint":`엔드포인트 추가`,"pws.empty.addEndpointDesc":`커스텀 base URL과 API 키`,"pws.tab.overview":`개요`,"pws.tab.models":`모델`,"pws.tab.usage":`사용량`,"pws.tab.accounts":`계정`,"pws.tab.settings":`설정`,"pws.connection":`연결`,"pws.status.connected":`연결됨`,"pws.attentionTitle":`확인 필요`,"pws.attention.reauth":`활성 계정 재인증이 필요합니다`,"pws.attention.reauthForward":`활성 Codex 계정 재인증이 필요합니다 — 계정에서 해결하세요`,"pws.attention.missingCredentials":`자격 증명 없음`,"pws.cell.auth":`인증`,"pws.cell.note":`메모`,"pws.cell.defaultModel":`기본 모델`,"pws.statsAria":`프로바이더 통계`,"pws.statsTitle":`통계`,"pws.stats.totalRequests":`요청 수 (30일)`,"pws.stats.totalTokens":`토큰 (30일)`,"pws.stats.quotaUpdated":`쿼터 갱신`,"pws.stats.quotaTracked":`사용량 탭에서 한도를 확인할 수 있습니다.`,"pws.stats.source":`출처`,"pws.usageLast30d":`사용량 (최근 30일)`,"pws.estimatedCost":`추정 비용`,"pws.costDisclaimer":`API 공시가 기준 추정치이며, 실제 청구 금액이 아닙니다.`,"pws.modelBreakdown":`모델별 사용량`,"pws.col.model":`모델`,"pws.col.cost":`추정 비용`,"pws.col.tokens":`토큰`,"pws.col.requests":`요청`,"pws.col.share":`점유율`,"pws.tokenInput":`입력`,"pws.tokenOutput":`출력`,"pws.metricRequests":`요청`,"pws.metricTokens":`토큰`,"pws.usageUnavailable":`아직 기록된 사용량이 없습니다.`,"pws.rateLimits":`요청 한도`,"pws.quotaUnavailable":`이 프로바이더의 쿼터 데이터가 없습니다.`,"pws.accountQuotaUnavailable":`요금 한도 데이터를 일시적으로 가져올 수 없습니다. 이전 값이 있으면 그대로 표시합니다.`,"pws.accountPlan":`계정 플랜`,"pws.accountPlanOnly":`{plan} — 월간 크레딧 풀 없음(Grok CLI OAuth는 웹 작업 횟수 한도를 제공하지 않음).`,"pws.selected":`선택됨`,"pws.copyModelId":`ID 복사`,"pws.modelCopied":`복사됨!`,"pws.modelsAvailable":`{count}개 사용 가능`,"pws.modelSearchPlaceholder":`모델 필터…`,"pws.modelsLoading":`모델 불러오는 중…`,"pws.modelsLoadFailed":`모델을 불러오지 못했습니다.`,"pws.modelsNeedsReauth":`실시간 모델 목록을 받으려면 다시 로그인해야 합니다. 지금은 설정된 모델을 표시합니다.`,"pws.modelsConfiguredFallback":`설정된 모델을 표시합니다 (실시간 검색 불가).`,"pws.modelsTruncated":`{total}개 모델 중 처음 {shown}개를 표시합니다. 필터로 목록을 좁히세요.`,"pws.retry":`다시 시도`,"pws.noModels":`이 프로바이더에서 발견된 모델이 없습니다.`,"pws.noModelMatch":`필터와 일치하는 모델이 없습니다.`,"pws.adapterBaseRequired":`어댑터와 기본 URL은 필수입니다.`,"pws.addAccount":`계정 추가`,"pws.addKey":`API 키 추가`,"pws.apiKeys":`API 키`,"pws.authMode":`인증 방식`,"pws.availableAccounts":`사용 가능한 계정`,"pws.accountOrdinal":`계정 {count}`,"pws.accountsLoading":`계정 불러오는 중…`,"pws.accountsLoadFailed":`계정을 불러오지 못했습니다.`,"pws.retryAccounts":`다시 시도`,"pws.noAccounts":`연결된 계정이 아직 없습니다.`,"pws.accountSwitching":`전환 중…`,"pws.accountCurrent":`현재 계정`,"pws.defaultModelNone":`없음 (프로바이더 기본값 사용)`,"pws.discardSettings":`되돌리기`,"pws.jsonEditorDesc":`프로바이더 JSON 설정을 직접 편집합니다. 저장 즉시 반영됩니다.`,"pws.jsonEditorTitle":`JSON 편집기 — {name}`,"pws.jsonRestore":`복원`,"pws.jsonSave":`저장`,"pws.loggedInTitle":`로그인됨`,"pws.notLoggedInTitle":`로그인 필요`,"pws.note":`메모`,"pws.allowPrivateNetwork":`로컬/사설 네트워크 허용`,"pws.liveModels":`프로바이더에서 모델 검색`,"pws.liveModelsDesc":`프로바이더의 실시간 모델 카탈로그를 가져옵니다. 끄면 설정된 정적 모델만 사용합니다.`,"pws.optionalPlaceholder":`선택사항`,"pws.providerId":`프로바이더 ID`,"pws.reauth":`재인증 필요`,"pws.reauthenticate":`재인증`,"pws.copyDoctor":`ocx doctor 복사`,"pws.doctorCopied":`복사됨`,"pws.healthCooldownHint":`쿨다운이 끝날 때까지 기다리세요. 지금은 이 계정을 프로브하지 마세요.`,"pws.doctorCopyUnavailable":`클립보드를 사용할 수 없음`,"pws.healthLabel.rateLimited":`요청 한도 초과`,"pws.healthLabel.quotaLimited":`할당량 제한`,"pws.healthLabel.reauthRequired":`재인증 필요`,"pws.healthLabel.refreshFailed":`새로고침 실패`,"pws.healthLabel.metadataMismatch":`메타데이터 불일치`,"pws.healthLabel.credentialConflict":`자격 증명 충돌`,"pws.healthSummary.rateLimited":`{provider} {account}: {until}까지 요청 한도 초과. 그전까지 이 계정 라우팅이 일시 중지됩니다.`,"pws.healthSummary.quotaLimited":`{provider} {account}: {until}까지 할당량 제한. 그전까지 이 계정 라우팅이 일시 중지됩니다.`,"pws.healthSummary.reauthRequired":`{provider} {account}: 재인증이 필요합니다.`,"pws.healthSummary.credentialConflict":`{provider} {account}: 자격 증명 충돌.`,"pws.healthSummary.metadataMismatch":`{provider} {account}: 메타데이터 불일치.`,"pws.healthSummary.staleCredentials":`{provider} {account}: 자격 증명이 불완전합니다.`,"pws.removeConfirm":`제거`,"pws.removeConfirmBody":`프로바이더 "{name}"을(를) 제거하시겠습니까? 되돌릴 수 없습니다.`,"pws.removeDefaultConfirmBody":`기본 프로바이더 "{name}"을(를) 제거하시겠습니까? "{defaultProvider}"이(가) 기본 프로바이더가 됩니다. 이 작업은 되돌릴 수 없습니다.`,"pws.removeConfirmTitle":`프로바이더 제거`,"pws.saveSettings":`저장`,"pws.saving":`저장 중…`,"pws.settingsSaved":`설정이 저장되었습니다.`,"pws.settingsUnsavedBar":`저장하지 않은 변경사항이 있습니다.`,"pws.unsavedLeaveBody":`저장하지 않은 변경사항이 있습니다. 나가기 전에 저장하시겠습니까?`,"pws.unsavedLeaveTitle":`미저장 변경사항`,"pws.attentionRequired":`주의 필요`,"pws.attentionAria":`{name}: {reason}`,"pws.missingCredentials":`자격 증명 없음`,"pws.editJsonDesc":`프록시 설정을 JSON으로 편집`,"pws.updatesUnavailable":`프로바이더 업데이트를 사용할 수 없습니다.`,"pws.dashboard.title":`프로바이더 개요`,"pws.dashboard.subtitle":`모든 모델 프로바이더를 한곳에서 관리합니다.`,"pws.dashboard.rateLimits":`사용량 제한`,"pws.dashboard.recentlyUsed":`최근 사용`,"pws.dashboard.requests":`{count}건 요청`,"pws.dashboard.checkedAgo":`{time} 전 확인`,"pws.dashboard.noQuota":`할당량 데이터 없음`,"pws.dashboard.noUsage":`아직 사용 데이터 없음`,"pws.dashboard.noRateLimits":`아직 한도 데이터 없음`,"pws.allProviders":`프로바이더 개요`,"pws.enabledLabel":`활성화`,"pws.testConnection":`연결 테스트`,"pws.testing":`테스트 중…`,"pws.connectionOk":`연결 성공`,"pws.connectionFailed":`연결 실패`,"pws.connectionNotApplicable":`해당 없음 — 이 프로바이더는 정적 모델 카탈로그를 사용합니다.`,"pws.editSettings":`설정 편집`,"pws.viewUsage":`사용량 상세 보기`,"pws.allSystemsOk":`모든 시스템 정상`,"pws.apiKeyConfigured":`API 키 설정됨`,"pws.addApiKey":`API 키 추가`,"pws.loggedInAs":`{email}으로 로그인됨`,"pws.notLoggedIn":`로그인되지 않음`,"pws.passthrough":`Codex 패스스루`,"pws.notes":`메모`,"pws.notePlaceholder":`이 프로바이더에 대한 메모를 추가하세요...`,"pws.noteSaved":`메모 저장됨`,"pws.authSummary":`인증`,"time.justNow":`방금 전`,"time.notChecked":`확인 안 됨`,"time.minutesAgo":`{n}분 전`,"time.hoursAgo":`{n}시간 전`,"time.daysAgo":`{n}일 전`,"modal.noMatch":`일치 항목 없음.`,"modal.oauthDefaultNote":`계정으로 로그인 — API 키 불필요.`,"modal.oauthComingSoon":`{label} OAuth 로그인은 다음 업데이트에 제공됩니다. 지금은 API 키를 사용하세요.`,"modal.oauthComingSoonShort":`이 프로바이더의 OAuth 로그인은 다음 업데이트에 제공됩니다 — 지금은 API 키를 사용하세요.`,"modal.useApiKeyInstead":`대신 API 키 사용`,"modal.setupGuide":`설정 안내`,"modal.setupStep1Prefix":`다음으로 이동:`,"modal.setupDashboardLink":`{label} 대시보드`,"modal.setupStep1Suffix":`에서 API 키를 복사하세요`,"modal.setupStep2":`아래 API 키 필드에 붙여넣으세요`,"modal.setupStep3":`프로바이더 추가를 클릭하세요 — 모델은 자동으로 검색됩니다`,"modal.namePlaceholder":`예: openrouter`,"modal.duplicateWarn":`프로바이더 "{name}"이(가) 이미 있어 덮어씁니다.`,"modal.forwardHintPrefix":`키 불필요 — 프록시가`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`자격 증명을 이 프로바이더로 전달합니다.`,"modal.localHint":`API 키는 저장되지 않습니다. Cursor의 공개 모델 카탈로그만 Codex에 추가되며, live Cursor 전송과 네이티브 파일/셸 실행은 검토 전까지 비활성입니다.`,"modal.getApiKey":`{label} API 키 받기`,"modal.apiKey":`API 키`,"modal.apiKeyTransport":`API 키 헤더`,"modal.apiKeyTransportNative":`x-api-key (Anthropic 기본)`,"modal.apiKeyTransportBearer":`Authorization: Bearer`,"modal.apiKeyPlaceholder":`sk-… (또는 $ENV_VAR)`,"modal.defaultModelPlaceholder":`예: gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.baseUrlPlaceholderError":`Base URL에 해결되지 않은 {placeholder}가 있습니다. 실제 값으로 교체하세요.`,"modal.baseUrlPlaceholderHint":`추가하기 전에 Base URL의 {placeholder}를 실제 Account ID로 교체하세요.`,"modal.adding":`추가 중…`,"modal.useOauthLogin":`← OAuth 로그인 사용`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team…`,"codexAuth.resetCreditsAria":`리셋 크레딧 {count}개`,"claude.pageTitle":`Claude Code`,"claude.workspace.settings":`설정`,"cws.loading":`콤보 불러오는 중…`,"cws.loadFailed":`콤보를 불러오지 못했습니다.`,"cws.saveFailed":`콤보를 저장하지 못했습니다.`,"cws.removeFailed":`콤보를 삭제하지 못했습니다.`,"cws.saved":`콤보를 저장했습니다.`,"cws.created":`{model}을(를) 만들었습니다.`,"cws.removed":`combo/{id}을(를) 삭제했습니다.`,"cws.renamed":`{from}을(를) {to}(으)로 이름을 변경했습니다.`,"cws.add":`콤보 추가`,"cws.addTitle":`콤보 추가`,"cws.addSubtitle":`여러 프로바이더를 사용하는 가상 모델을 만들고 클라이언트가 요청할 정확한 모델 이름을 선택하세요.`,"cws.create":`콤보 만들기`,"cws.railAria":`콤보 목록`,"cws.searchPlaceholder":`콤보 또는 대상 검색…`,"cws.noSearchResults":`검색과 일치하는 콤보가 없습니다.`,"cws.group.failover":`장애 조치`,"cws.group.roundRobin":`라운드로빈`,"cws.targetCount":`대상 {count}개`,"cws.targetCountOne":`대상 1개`,"cws.overviewTitle":`콤보`,"cws.overviewBlurb":`프로바이더/모델 대상 사이에서 장애 조치하거나 결정적 Smooth Weighted 라운드로빈을 사용하는 가상 모델입니다.`,"cws.count.total":`전체`,"cws.count.failover":`장애 조치`,"cws.count.roundRobin":`라운드로빈`,"cws.howTitle":`동작 방식`,"cws.howBody":`Codex에서 콤보의 공개 모델 이름을 요청하세요. 설정하지 않으면 combo/<id>가 기본값입니다. OpenCodex는 재시도 가능한 업스트림 오류에서만 다음 대상으로 넘깁니다. 사용 가능한 대상이 없으면 전역 기본 프로바이더로 우회하지 않고 요청을 실패 처리합니다.`,"cws.attentionTitle":`확인 필요`,"cws.attention.empty":`구성된 대상 없음`,"cws.attention.few":`대상이 하나뿐 — 장애 조치할 곳이 없음`,"cws.attention.catalogOmitted":`모델 카탈로그에 없음 — 멤버 능력이 불완전하거나 호환되지 않음(context window/메타데이터 부족 또는 modality 교집합이 비어 있음). 별칭 라우팅은 계속 동작`,"cws.emptyTitle":`첫 콤보 만들기`,"cws.empty.createDesc":`가상 모델 이름을 정하고 백엔드를 둘 이상 연결하세요.`,"cws.backToAll":`모든 콤보로`,"cws.allCombos":`모든 콤보`,"cws.copyModel":`ID 복사`,"cws.copied":`복사됨`,"cws.tab.config":`설정`,"cws.tab.about":`정보`,"cws.strategy":`전략`,"cws.strategy.failover":`장애 조치`,"cws.strategy.roundRobin":`라운드로빈`,"cws.strategy.failoverHint":`대상을 순서대로 시도합니다. 재시도 가능한 오류(한도, 장애, 구독 게이트)면 다음으로 넘어갑니다.`,"cws.strategy.roundRobinHint":`가중치에 따라 트래픽을 결정적으로 분배합니다. 선택된 대상을 성공 요청 묶음 동안 유지한 뒤 다음 대상으로 진행합니다.`,"cws.field.id":`콤보 ID`,"cws.field.idHintEdit":`ID를 변경하면 콤보 이름이 바뀝니다. 클라이언트는 {model}을(를) 요청합니다.`,"cws.field.alias":`공개 모델 이름`,"cws.field.aliasPlaceholder":`deepseek-v4-flash 또는 vendor/model`,"cws.field.aliasHint":`선택 사항입니다. 접두사 없는 이름, vendor/model 같은 사용자 지정 접두사를 사용하거나 비워 두어 combo/<id>를 사용할 수 있습니다.`,"cws.field.idHint":`클라이언트는 {model}을(를) 요청합니다`,"cws.field.idInternalHint":`내부 콤보 ID입니다. 생성 후에도 변경할 수 있습니다.`,"cws.field.stickyLimit":`회전 전 sticky 성공 횟수`,"cws.field.stickyLimitHint":`가중 선택기가 다음 대상으로 진행하기 전에 선택된 대상을 이 성공 요청 횟수만큼 유지합니다.`,"cws.field.defaultEffort":`기본 추론 수준`,"cws.field.defaultEffortNone":`없음 (대상 기본값)`,"cws.field.defaultEffortHint":`클라이언트가 추론 수준을 생략한 경우에만 사용합니다. 옵션은 선택한 대상이 광고하는 수준의 교집합입니다.`,"cws.field.defaultEffortUnsupported":`이 수준은 대상의 공통 사다리에 없습니다 — 요청 시 무시되거나 스냅됩니다.`,"cws.field.defaultEffortUnsupportedOption":`교집합에 없음`,"cws.targets":`대상`,"cws.targets.failoverHint":`순서가 중요합니다 — 첫 번째가 기본입니다.`,"cws.targets.roundRobinHint":`가중치는 결정적 상대 선택을 제어하고, 순서는 회전 고리의 동률을 결정합니다.`,"cws.target.provider":`프로바이더`,"cws.target.model":`모델`,"cws.target.weight":`가중치`,"cws.target.pickProvider":`프로바이더 선택…`,"cws.target.pickProviderFirst":`먼저 프로바이더를 선택하세요…`,"cws.target.pickModel":`모델 선택…`,"cws.target.noModels":`이 프로바이더에 모델 없음`,"cws.target.modelPlaceholder":`모델 ID`,"cws.target.add":`대상 추가`,"cws.target.drag":`드래그하여 순서 변경`,"cws.target.moveUp":`위로`,"cws.target.moveDown":`아래로`,"cws.aboutTitle":`런타임`,"cws.aboutBody":`실패한 대상은 Retry-After를 반영해 잠시 쿨다운됩니다. 잘못된 요청과 컨텍스트 오류는 다음 대상으로 넘기지 않습니다. 각 대상은 자체 기능에 맞게 추론 수준을 조정하며, 모든 대상 소진 시 우회 없이 실패합니다. 로그와 사용량에는 순서가 있는 실제 시도와 시도별 사용량이 남습니다.`,"cws.removeConfirmTitle":`{model}을(를) 삭제할까요?`,"cws.removeConfirmDesc":`설정과 Codex 카탈로그에서 가상 모델만 제거합니다. 프로바이더는 삭제되지 않습니다.`,"cws.unsavedTitle":`저장되지 않은 변경`,"cws.unsavedDesc":`이 콤보의 편집을 버리고 계속할까요?`,"cws.keepEditing":`계속 편집`,"cws.err.missingId":`콤보 ID가 필요합니다.`,"cws.err.invalidId":`ID는 문자/숫자로 시작하고 문자·숫자·점·밑줄·하이픈만 사용할 수 있습니다(최대 64).`,"cws.err.duplicateId":`같은 ID의 콤보가 이미 있습니다.`,"cws.err.invalidAlias":`별칭은 문자·숫자·점·밑줄·하이픈만 사용할 수 있으며 "/" 구분은 최대 한 번만 허용됩니다.`,"cws.err.aliasReservedNamespace":`별칭은 예약된 "combo/" 네임스페이스를 사용할 수 없습니다.`,"cws.err.aliasNativeFamily":`OpenAI 네이티브 계열(gpt-*, o1-*, o3-*, o4-*, codex-*)의 접두사 없는 별칭은 허용되지 않습니다.`,"cws.err.duplicateAlias":`다른 콤보가 이미 이 별칭을 사용하고 있습니다.`,"cws.err.noTargets":`대상을 하나 이상 추가하세요.`,"cws.err.incompleteTarget":`각 대상에 프로바이더와 모델이 필요합니다.`,"cws.target.disabled":`{name} (비활성화됨)`,"cws.err.reservedNamespace":`콤보를 만들기 전에 combo라는 실제 프로바이더의 이름을 변경하세요.`,"cws.err.providerCollision":`콤보 ID가 설정된 프로바이더 이름과 충돌합니다.`,"cws.err.unknownProvider":`각 대상은 설정된 프로바이더를 사용해야 합니다.`,"cws.err.duplicateTarget":`같은 프로바이더/모델 대상은 한 번만 추가할 수 있습니다.`,"cws.err.invalidStickyLimit":`sticky 성공 횟수는 1~100의 정수여야 합니다.`,"cws.err.invalidWeight":`각 라운드로빈 가중치는 1~10000의 정수여야 합니다.`,"cws.err.noEnabledTarget":`하나 이상의 대상이 활성화된 프로바이더를 사용해야 합니다.`,"claude.tabsLabel":`Claude 클라이언트`,"claude.tabCode":`Code`,"claude.tabDesktop":`Desktop`,"claudeDesktop.title":`Claude Desktop`,"claudeDesktop.subtitle":`각 Claude 모델 패밀리를 포트 {port}의 사용 가능한 모델로 연결합니다.`,"claudeDesktop.importJson":`JSON 가져오기`,"claudeDesktop.exportJson":`JSON 내보내기`,"claudeDesktop.loading":`Claude Desktop 프로필을 불러오는 중…`,"claudeDesktop.loadFail":`Claude Desktop 프로필을 불러오지 못했습니다.`,"claudeDesktop.retry":`다시 시도`,"claudeDesktop.saveFailed":`Claude Desktop 프로필을 저장하지 못했습니다.`,"claudeDesktop.applyFailed":`프로필은 저장했지만 적용하지 못했습니다.`,"claudeDesktop.updateFailed":`Claude Desktop 업데이트에 실패했습니다.`,"claudeDesktop.savedApplied":`프로필을 저장하고 Claude Desktop에 적용했습니다.`,"claudeDesktop.savedAppliedAnnounce":`Claude Desktop 프로필 저장과 적용을 마쳤습니다.`,"claudeDesktop.saved":`프로필을 저장했습니다.`,"claudeDesktop.savedAnnounce":`Claude Desktop 프로필을 저장했습니다.`,"claudeDesktop.exported":`프로필을 JSON으로 내보냈습니다.`,"claudeDesktop.importExpected":`버전 1 Claude Desktop 프로필이 필요합니다.`,"claudeDesktop.importReady":`JSON을 가져왔습니다. 초안을 검토한 뒤 저장하고 적용하세요.`,"claudeDesktop.importedAnnounce":`프로필 JSON을 가져왔습니다. 저장하지 않은 변경 사항을 검토할 수 있습니다.`,"claudeDesktop.importInvalid":`선택한 파일은 올바른 프로필이 아닙니다.`,"claudeDesktop.importFailed":`가져오기에 실패했습니다. {error}`,"claudeDesktop.moved":`{route} 모델을 {family}(으)로 옮겼습니다.`,"claudeDesktop.unsaved":`저장하지 않은 변경 사항`,"claudeDesktop.upToDate":`프로필이 최신 상태입니다`,"claudeDesktop.saving":`저장 중…`,"claudeDesktop.applying":`적용 중…`,"claudeDesktop.saveApply":`저장 및 적용`,"claudeDesktop.emptyTitle":`사용 가능한 모델이 없습니다`,"claudeDesktop.emptyHint":`프로바이더를 추가하거나 활성화한 뒤 Claude Desktop 경로를 할당하세요.`,"claudeDesktop.assignmentsLabel":`Claude 모델 패밀리 할당`,"claudeDesktop.family.opus":`Opus`,"claudeDesktop.family.fable":`Fable`,"claudeDesktop.family.sonnet":`Sonnet`,"claudeDesktop.family.haiku":`Haiku`,"claudeDesktop.modelCountOne":`모델 {count}개`,"claudeDesktop.modelCountMany":`모델 {count}개`,"claudeDesktop.chooseDefault":`기본 모델 선택`,"claudeDesktop.temporaryDefault":`임시 기본 모델`,"claudeDesktop.laneEmpty":`모델을 여기에 놓거나 이동 컨트롤을 사용하세요.`,"claudeDesktop.laneNoMatch":`검색어와 일치하는 모델이 이 계열에 없습니다.`,"nav.grok":`Grok`,"grok.title":`Grok Build`,"grok.subtitle":`opencodex가 Grok 설정에 등록한 모델입니다.`,"grok.loading":`Grok 상태를 불러오는 중…`,"grok.loadFail":`Grok 설정을 읽지 못했습니다.`,"grok.notConfiguredTitle":`Grok Build가 연결되지 않았습니다`,"grok.notConfiguredHint":`Grok을 설치한 뒤 프록시를 다시 시작하면 opencodex가 관리 블록을 다음 위치에 씁니다:`,"grok.endpoint":`엔드포인트`,"grok.colModel":`모델`,"grok.colAlias":`Grok 별칭`,"grok.colContext":`컨텍스트`,"grok.groupNative":`네이티브 모델`,"grok.groupRouted":`라우팅 모델`,"grok.enabledCount":`{total}개 중 {on}개 등록됨`,"grok.saved":`선택을 저장했습니다.`,"grok.savedApplied":`선택을 저장하고 Grok 설정에 반영했습니다.`,"grok.saveFailed":`Grok 선택을 저장하지 못했습니다.`,"grok.applyFailed":`선택은 저장했지만 Grok 설정을 갱신하지 못했습니다.`,"grok.applySkipped":`선택은 저장했지만 Grok 설정은 바뀌지 않았습니다.`,"grok.saveApply":`저장 및 적용`,"grok.saving":`저장 중…`,"grok.applying":`적용 중…`,"grok.unsaved":`저장되지 않은 변경`,"grok.upToDate":`선택이 최신 상태입니다`,"grok.toggleModel":`{id} 모델을 Grok에 등록`,"claudeDesktop.available":`사용 가능`,"claudeDesktop.defaultBadge":`기본`,"claudeDesktop.supports1m":`1M`,"claudeDesktop.unavailable":`사용 불가`,"claudeDesktop.contextM":`컨텍스트 {n}M`,"claudeDesktop.contextK":`컨텍스트 {n}k`,"claudeDesktop.contextUnknown":`컨텍스트 불명`,"claudeDesktop.alias":`별칭`,"claudeDesktop.useAsDefault":`{family} 기본 모델로 사용`,"claudeDesktop.moveTo":`이동 위치`,"claudeDesktop.move":`이동`,"claudeDesktop.status.applied":`Desktop에 적용됨`,"claudeDesktop.status.stale":`설정 변경됨 — 재적용 필요`,"claudeDesktop.status.notApplied":`미적용`,"claudeDesktop.status.notActiveProfile":`Desktop이 다른 프로필을 사용 중 — 재적용 필요`,"claudeDesktop.health.lastRequest":`마지막 요청`,"claudeDesktop.health.stats":`{count} 요청 / {errors} 에러`,"claudeDesktop.effort.supported":`effort`,"claudeDesktop.effort.displayOnly":`effort (표시만)`,"nav.cloud":`Cloud Sync`,"cloud.subtitle":`Backup and restore ~/.opencodex to your Microsoft OneDrive (OAuth device login).`,"cloud.statusTitle":`Status`,"cloud.statusHint":`Local device id and last OneDrive push/pull.`,"cloud.loggedIn":`Microsoft account`,"cloud.notLoggedIn":`Not signed in`,"cloud.account":`Account`,"cloud.device":`This device`,"cloud.remote":`Remote folder`,"cloud.lastSync":`Last sync`,"cloud.never":`Never`,"cloud.remoteManifest":`Cloud snapshot`,"cloud.hasVault":`encrypted vault`,"cloud.remoteError":`Cloud check`,"cloud.clientIdTitle":`Azure app client ID`,"cloud.clientIdHint":`Create a public client app in Azure AD once, enable “Allow public client flows”, add delegated scopes Files.ReadWrite and offline_access, then paste the Application (client) ID here.`,"cloud.clientIdSaved":`Client ID saved.`,"cloud.azurePortal":`Azure app registrations`,"cloud.azureSteps":`Public client · device code · Files.ReadWrite + offline_access`,"cloud.loginTitle":`Sign in to Microsoft`,"cloud.login":`Sign in with Microsoft`,"cloud.logout":`Sign out`,"cloud.loginOk":`Signed in as {account}`,"cloud.loginFailed":`Microsoft sign-in failed`,"cloud.logoutOk":`Signed out of OneDrive.`,"cloud.deviceCodeTitle":`Device code`,"cloud.deviceCodeHint":`Open the link, enter this code, then approve access:`,"cloud.waitingAuth":`Waiting for Microsoft approval…`,"cloud.transferTitle":`Push / pull`,"cloud.transferHint":`Push uploads config to OneDrive. Pull overwrites this machine’s ~/.opencodex from the cloud snapshot.`,"cloud.passphrase":`Vault passphrase`,"cloud.passphrasePlaceholder":`Min 8 characters (encrypts oauth tokens)`,"cloud.passphraseShort":`Passphrase must be at least 8 characters when the vault is enabled.`,"cloud.includeVault":`Include encrypted token vault (oauth.json / auth.json)`,"cloud.includeUsage":`Include usage / logs DBs (larger)`,"cloud.push":`Push to OneDrive`,"cloud.pull":`Pull from OneDrive`,"cloud.pushOk":`Pushed: {files}`,"cloud.pullOk":`Pulled: {files}`,"cloud.pullConfirm":`Pull will overwrite local OpenCodex config and auth files from OneDrive. Continue?`,"cloud.securityNote":`Plain config is stored under OneDrive/OpenCodex/sync/. OAuth tokens only go into the AES-256-GCM vault when you set a passphrase. Never share your client secret or vault passphrase.`,"cloud.loginHint":`Browser login (recommended): Azure platform “Mobile and desktop” + redirect URI http://localhost. Device code needs Allow public client flows = Yes.`,"cloud.loginDevice":`Device code (advanced)`,"cloud.browserLoginTitle":`Browser sign-in`,"cloud.browserLoginHint":`Complete Microsoft sign-in in the opened tab, then return here.`,"cloud.openAuthPage":`Open sign-in page`,"cloud.redirectUri":`Loopback redirect`,"cloud.redirectUriTitle":`Register this exact redirect URI in Azure`,"cloud.redirectUriHint":`Authentication → Add a platform → Mobile and desktop applications → custom redirect URI (must match exactly, including port):`,"cloud.redirectUriWhere":`Do not use #cloud, port 10100, or https. Save, wait ~1 minute, then sign in.`,"cloud.clientIdSecretSaved":`Client ID and client secret saved.`,"cloud.clientSecret":`Client secret (optional)`,"cloud.clientSecretPlaceholder":`Only if Azure requires client_secret`,"cloud.clientSecretSet":`Secret saved (leave empty and save to clear; type a new value to replace)`,"cloud.clientSecretHint":`Preferred: Authentication → Allow public client flows = Yes (no secret). For Web apps, create a client secret under Certificates & secrets, paste here, then Save.`,"nav.pi":`Pi`,"pi.title":`Pi`,"pi.subtitle":`Manage Pi models, settings, packages, and extensions. Only the opencodex provider block is written to models.json.`,"pi.loading":`Loading Pi status…`,"pi.loadFail":`Could not read Pi status.`,"pi.actionOk":`Done.`,"pi.actionFail":`Action failed.`,"pi.applySkipped":`Pi apply was skipped (policy or missing install).`,"pi.statusTitle":`Install status`,"pi.binary":`pi binary`,"pi.agentDir":`Agent directory`,"pi.modelsFile":`models.json`,"pi.missing":`not found`,"pi.modelsTitle":`Models (providers.opencodex)`,"pi.modelsHint":`Apply writes only providers.opencodex from the live catalog. Your other providers stay untouched.`,"pi.apply":`Apply models`,"pi.applying":`Applying…`,"pi.applied":`Pi models applied.`,"pi.remove":`Remove opencodex block`,"pi.removing":`Removing…`,"pi.removed":`Pi opencodex provider removed.`,"pi.modelsNotPresentTitle":`opencodex not in models.json yet`,"pi.modelsNotPresentHint":`Click Apply to register the current catalog as providers.opencodex.`,"pi.endpoint":`Endpoint`,"pi.modelCount":`{count} models registered`,"pi.moreModels":`…and {n} more`,"pi.settingsTitle":`Settings`,"pi.settingsHint":`Curated subset of ~/.pi/agent/settings.json. Unknown keys are preserved.`,"pi.saveSettings":`Save settings`,"pi.savingSettings":`Saving…`,"pi.settingsSaved":`Pi settings saved.`,"pi.defaultProvider":`Default provider`,"pi.defaultModel":`Default model`,"pi.thinking":`Thinking level`,"pi.theme":`Theme`,"pi.projectTrust":`Project trust default`,"pi.hideThinking":`Hide thinking blocks`,"pi.quietStartup":`Quiet startup`,"pi.unset":`(unset)`,"pi.otherKeys":`{count} other keys left untouched`,"pi.packagesTitle":`Packages`,"pi.packagesHint":"Install runs `pi install` on the server machine. Packages execute with full system access — review sources before installing.","pi.install":`Install`,"pi.installing":`Installing…`,"pi.packageInstalled":`Package install finished.`,"pi.packageRemoved":`Package removed.`,"pi.removePackage":`Remove`,"pi.noPackages":`No packages in settings.json.`,"pi.extensionsTitle":`Extensions`,"pi.extensionsHint":`Auto-discovered under ~/.pi/agent/extensions plus paths listed in settings. Source editing is not available here.`,"pi.noExtensions":`No extensions found.`,"pi.cliHint":`CLI: ocx pi status | apply | settings | packages · launch with ocx pi`,"grok.modelsSection":`Grok Build models`,"grok.modelsSectionSub":`Choose which opencodex models appear in Grok Build, then save and apply.`,"grok.account.sectionAria":`xAI account and quota`,"grok.account.title":`xAI account quota`,"grok.account.subtitle":`Same depth as Codex Auth: active Grok account, plan, and usage bars. No need to open Providers.`,"grok.account.refreshQuota":`Refresh quota`,"grok.account.refreshing":`Refreshing…`,"grok.account.addAccount":`Add account`,"grok.account.login":`Log in with xAI`,"grok.account.loggingIn":`Waiting for login…`,"grok.account.cancelLogin":`Cancel login`,"grok.account.loading":`Loading accounts…`,"grok.account.empty":`No xAI account yet. Log in to see plan and quota bars here.`,"grok.account.loadFail":`Could not load xAI accounts.`,"grok.account.loginFail":`xAI login failed to start.`,"grok.account.loginOk":`xAI login succeeded.`,"grok.account.loginCancelled":`xAI login cancelled.`,"grok.account.select":`Select account`,"grok.account.switched":`Active xAI account updated.`,"grok.account.switchFail":`Could not switch xAI account.`,"grok.account.removeConfirm":`Remove this xAI account from opencodex?`,"grok.account.removeFail":`Could not remove account.`,"grok.account.removed":`Account removed.`,"grok.account.unnamed":`xAI account`,"nav.clients":`Clients`,"clients.title":`Clients`,"clients.subtitle":`See which base URL and model each coding agent is actually using on disk — useful when CC Switch, ocx inject, and launchers stack.`,"clients.refresh":`Refresh`,"clients.loadFail":`Could not read client status.`,"clients.proxyTitle":`Proxy`,"clients.proxyRunning":`Proxy running`,"clients.proxyStopped":`Proxy not detected`,"clients.generatedAt":`Checked {time}`,"clients.readOnlyHint":`Read-only. This page never rewrites client configs or shows API keys.`,"clients.tableTitle":`Effective client routing`,"clients.col.client":`Client`,"clients.col.verdict":`Verdict`,"clients.col.baseUrl":`Base URL`,"clients.col.model":`Model`,"clients.col.launcher":`Launcher`,"clients.col.switcher":`Switcher profile`,"clients.col.details":`Details`,"clients.col.configPaths":`Config paths`,"clients.col.notes":`Notes`,"clients.verdict.ocx":`via ocx`,"clients.verdict.direct":`direct`,"clients.verdict.mixed":`mixed`,"clients.verdict.missing":`missing`,"clients.verdict.unknown":`unknown`,"clients.manage":`Manage`,"clients.noNotes":`No notes`,"clients.exportHint":`Need a generated config template instead? Open the API page export panel.`,"clients.loading":`Loading client status…`},zh:{"nav.dashboard":`仪表盘`,"nav.startup":`启动安全`,"nav.providers":`提供方`,"nav.models":`模型`,"nav.combos":`组合`,"nav.subagents":`子代理`,"nav.logs":`日志与调试`,"nav.usage":`用量`,"common.github":`GitHub`,"sidebar.star":`在 GitHub 上加星`,"sidebar.starred":`已在 GitHub 加星`,"sidebar.starUnauthenticated":`打开 GitHub 加星(gh CLI 未登录)`,"sidebar.starFailed":`无法通过 gh 加星,改为打开 GitHub。`,"sidebar.updateAvailable":`有可用更新:{version}`,"sidebar.checkUpdate":`检查更新`,"common.save":`保存`,"common.saving":`保存中…`,"common.cancel":`取消`,"common.discard":`丢弃`,"common.remove":`移除`,"common.loading":`加载中…`,"common.retry":`重试`,"theme.label":`主题`,"theme.light":`浅色`,"theme.dark":`深色`,"theme.system":`跟随系统`,"lang.label":`语言`,"provider.name.volcengine":`火山方舟`,"provider.name.volcengineCodingPlan":`火山方舟编程套餐`,"provider.name.volcengineAgentPlan":`火山方舟智能体套餐`,"errorBoundary.title":`页面加载失败`,"errorBoundary.message":`此部分在渲染时发生错误。请重新加载后再试。`,"errorBoundary.details":`错误`,"errorBoundary.reload":`重新加载`,"startup.title":`启动安全`,"startup.subtitle":`检查重启后 Codex 是否仍能连接 opencodex,避免本地代理路由陷入重复重连。`,"startup.refresh":`刷新`,"startup.backToDashboard":`返回仪表盘`,"startup.loading":`正在检查启动保护…`,"startup.error":`无法读取启动保护状态。`,"startup.staleData":`最新启动检查失败。以下数据已过期,不能视为已受保护的证明。`,"startup.status.native":`原生路由`,"startup.status.protected":`已保护重启`,"startup.status.atRisk":`需要处理`,"startup.summary.native":`Codex 不依赖本地代理`,"startup.summary.protected":`重启后 opencodex 会自动可用`,"startup.summary.atRisk":`重启后 Codex 可能无法访问模型`,"startup.riskDetail":`Codex 已指向本地代理,但没有持久服务或正常的 launcher shim 将其重新启动。`,"startup.riskDetailCustomLocal":`Codex 指向自定义本地网关。opencodex 无法管理或验证该网关的重启生命周期。`,"startup.riskDetailWindowsShim":`Launcher shim 仅保护受支持的 CLI 脚本;Windows 上的 Codex Desktop 和直接 codex.exe 启动可以绕过它。`,"startup.safeDetail":`当前路由与启动机制一致。重启后无需手动运行 ocx start。`,"startup.routing":`Codex 路由`,"startup.routing.proxy":`本地代理`,"startup.routing.native":`OpenAI 原生`,"startup.routing.customLocal":`自定义本地网关`,"startup.routing.customRemote":`自定义远程网关`,"startup.routing.unknown":`未知或无效的路由`,"startup.restartProtection":`重启保护`,"startup.preference":`按需启动`,"startup.enabled":`已启用`,"startup.disabled":`已禁用`,"startup.protection.service":`后台服务`,"startup.protection.shim":`Launcher shim`,"startup.protection.none":`未安装`,"startup.details":`保护详情`,"startup.service":`后台服务`,"startup.serviceHint":`登录时启动,并在代理崩溃后重新启动。`,"startup.installed":`已安装`,"startup.notInstalled":`未安装`,"startup.unsupported":`不支持`,"startup.shim":`Codex launcher shim`,"startup.shimHint":`支持的 Codex 脚本启动器运行时执行 ocx ensure。`,"startup.healthy":`正常`,"startup.cliOnly":`仅 CLI`,"startup.stale":`已失效`,"startup.viable":`可用`,"startup.unhealthy":`已安装但异常`,"startup.conflict":`服务冲突`,"startup.installedDisabled":`已安装但禁用`,"startup.install":`安装`,"startup.installing":`正在安装…`,"startup.repair":`修复`,"startup.repairing":`正在修复…`,"startup.serviceInstalled":`后台服务安装成功。`,"startup.serviceRepaired":`后台服务修复成功。`,"startup.shimInstalled":`Codex 启动器 shim 安装成功。`,"startup.shimRepaired":`Codex 启动器 shim 修复成功。`,"startup.installFailed":`安装失败:`,"startup.tray.title":`Windows 系统托盘`,"startup.tray.hint":`登录时启动托盘图标,一键控制代理启动、停止、重启、面板和状态。`,"startup.tray.login":`Windows 登录时启动托盘`,"startup.tray.notProtection":`托盘只是控制器,并非重启保护。无人值守恢复仍需要正常的后台服务。`,"startup.tray.running":`运行中`,"startup.tray.stopped":`已安装,未显示`,"startup.tray.stale":`需要修复`,"startup.tray.notInstalled":`未安装`,"startup.tray.loading":`正在检查…`,"startup.tray.unavailable":`状态不可用`,"startup.tray.install":`安装并显示托盘`,"startup.tray.start":`显示托盘图标`,"startup.tray.stop":`退出托盘图标`,"startup.tray.uninstall":`移除登录托盘`,"startup.tray.error":`Windows 托盘操作失败。请运行 ocx tray status 查看详情。`,"startup.recovery":`修复选项`,"startup.recoveryHint":`使用上方的一键安装,或复制命令进行手动修复。Codex Desktop 和 Windows 可执行文件建议使用后台服务。`,"startup.command.service":`推荐:持久后台服务`,"startup.command.shim":`备选:CLI launcher shim`,"startup.command.native":`安全恢复:还原 Codex 原生路由`,"startup.copy":`复制`,"startup.copied":`已复制`,"startup.recommended":`推荐修复:{cmd}`,"startup.navRisk":`启动保护需要处理`,"startup.codexRuntime.clampHidden":`部分推理强度选项已隐藏,因为 OpenCodex 正在使用 Codex {version}。`,"startup.codexRuntime.clampHiddenWithEfforts":`部分推理强度选项已隐藏,因为 OpenCodex 正在使用 Codex {version}(已移除:{efforts})。`,"startup.codexRuntime.olderBinary":`OpenCodex 正在使用较旧的 Codex 二进制文件({version})。检测到可用的较新安装。`,"dash.subtitle":`本地 opencodex 代理、其提供方以及路由到 Codex 的模型的实时状态。`,"dash.workspace.overview":`概览`,"dash.workspace.sections":`板块`,"dash.status":`状态`,"dash.online":`在线`,"dash.offline":`离线`,"dash.version":`版本`,"dash.versionLocal":`本地版本`,"dash.versionRemote":`npm 最新`,"dash.installSource":`源码运行`,"dash.installNpm":`npm 全局`,"dash.installBun":`bun 全局`,"dash.installUnknown":`安装方式未知`,"dash.uptime":`运行时间`,"dash.providers":`提供方`,"dash.tokens30d":`Token (30 天)`,"dash.coverage":`覆盖率 {pct}`,"dash.mem.title":`内存可观测性`,"dash.mem.hint":`只读运行时诊断。观测内存为 max(RSS, external, ArrayBuffers),避免 Windows working set trimming 隐藏已提交的保留内存。`,"dash.mem.rss":`常驻内存 (RSS)`,"dash.mem.jsHeap":`JS 堆已用`,"dash.mem.jsHeapArena":`堆区 {total}`,"dash.mem.pressure":`相对告警阈值`,"dash.mem.pressureOf":`阈值的 {pct}%`,"dash.mem.pressureUnknown":`未提供阈值`,"dash.mem.jscHeap":`JSC 堆`,"dash.mem.external":`External`,"dash.mem.arrayBuffers":`ArrayBuffers`,"dash.mem.observed":`观测值`,"dash.mem.runtime":`运行时计数器`,"dash.mem.growth":`每小时观测变化`,"dash.mem.perHour":`/小时`,"dash.mem.store":`延续存储`,"dash.mem.storeHint":`代理 previous_response_id 缓存。堆上升时总字节数增加,说明是对话保留而非运行时分配器。`,"dash.mem.storeEntries":`条目`,"dash.mem.storeTotal":`总计`,"dash.mem.storeLargest":`最大`,"dash.mem.storeOldest":`最旧`,"dash.mem.threshold":`告警阈值`,"dash.mem.lastWarn":`上次告警`,"dash.mem.never":`从不`,"dash.mem.details":`详情`,"dash.mem.unavailable":`内存诊断不可用(旧版代理)。`,"dash.mem.inFlight":`进行中的请求`,"dash.mem.restart":`排空并重启`,"dash.mem.restartConfirm":`等待 {count} 个进行中的请求结束后再重启(最多 {seconds} 秒;超时将中断剩余请求)。`,"dash.mem.draining":`正在等待 {count} 个请求完成… 完成后重启`,"dash.mem.reconnecting":`代理正在重启… 等待重新连接`,"dash.mem.restartFailed":`排空并重启失败。请确认代理正在运行。`,"dash.mem.restartNoSupervisor":`未检测到重启保护。重启后代理可能不会自动恢复,需手动启动。`,"dash.activeProviders":`活跃提供方`,"dash.noProviders":`尚未配置提供方。请运行 {cmd}。`,"dash.col.name":`名称`,"dash.col.adapter":`适配器`,"dash.col.baseUrl":`Base URL`,"dash.col.model":`模型`,"dash.modelsNoResults":`没有符合搜索的模型。`,"dash.availableModels":`可用模型`,"dash.noModels":`未找到模型。请检查提供方 API 密钥。`,"dash.cannotConnect":`无法连接到代理。它在运行吗?`,"dash.runStart":`运行 {cmd} 以启动代理。`,"dash.stop":`停止代理`,"dash.stopConfirm":`停止代理并恢复原生 Codex 配置?`,"dash.stopFailed":`无法停止代理 (HTTP {status})。`,"dash.stopping":`正在停止…`,"dash.codexAutoStart":`随 Codex 启动 opencodex`,"dash.codexAutoStartHint":`允许已安装的 launcher shim 运行 ocx ensure。此设置不会安装重启保护;请在启动安全中检查实际状态。`,"dash.searchModel":`搜索附属模型`,"dash.searchModelHint":`用于非 OpenAI 路由模型的 web_search 的模型。需要 ChatGPT 登录。`,"dash.searchReasoning":`搜索推理强度`,"dash.visionModel":`视觉附属模型`,"dash.visionModelHint":`为纯文本路由模型描述图像的模型。需要 ChatGPT 登录。`,"dash.webSearchSidecar":`网页搜索附属服务`,"dash.webSearchSidecarHint":`选择路由模型进行网页搜索时使用的后端和模型。`,"dash.visionSidecar":`视觉附属服务`,"dash.visionSidecarHint":`选择纯文本路由模型描述图像时使用的后端和模型。`,"dash.shadowCallIntercept":`影子调用拦截`,"dash.shadowCallInterceptHint":`拦截 Codex 应用的后台辅助调用({models}:标题生成、提交消息)并重定向到所选模型。effort 固定为 low。`,"dash.shadowCallWarning":`⚠ 启用后,所有对 {models} 的请求都将被替换为所选模型。`,"dash.shadowCallOriginal":`原始`,"dash.shadowCallModel":`替代模型`,"dash.shadowCallTooltip":`Codex 应用会在后台调用辅助模型来生成线程标题、提交消息以及进行技能编排。该模型随客户端版本变化,因此 opencodex 会同时拦截这些模型:{models}。启用此选项可将这些调用重定向到您选择的模型。`,"models.shadowCallIntercept":`影子调用拦截`,"models.shadowCallInterceptHint":`拦截 Codex 应用的后台辅助调用({models})并重定向到所选模型。`,"dash.sidecarBackend":`后端`,"dash.sidecarModel":`模型`,"dash.backendAuto":`自动`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`附属设置已保存。将在下一个请求时生效。`,"dash.sidecarSaveFailed":`保存附属设置失败。`,"dash.injectionLabel":`子代理委托`,"dash.injectionHint":`选择 Codex 把子任务交给谁来做的模型。这个选择用在哪里,由下面两个开关决定。`,"dash.syncCodexSubagentDefaults":`同时保存为 Codex 默认值`,"dash.syncCodexSubagentDefaultsHint":`打开后,上面选的模型会写进 Codex 自己的配置,新任务一开始也用它。关闭则只在这里记住。下次同步或重启后生效,你手写的 [agents] 设置不会被改动。`,"dash.multiAgentGuidance":`告诉 Codex 怎么分工`,"dash.multiAgentGuidanceHint":`给 Codex 附上一张短便条,说明怎么把活分给子代理。v2 会告诉它可用的模型和优先模型;v1 只在推理强度为 max 或 ultra 时才起作用。关闭则不附任何便条。`,"dash.injectionNone":`无`,"dash.injectionEffortLabel":`推理强度`,"dash.injectionEffortNone":`模型默认`,"dash.effortCapLabel":`V2 ultra 推理强度限制`,"dash.subagentEffortCapLabel":`V2 子代理推理强度限制`,"dash.effortCapHelp":`限制 V2 ultra 模式轮次的推理强度。设置后,来自 ultra 模式的 max 请求将被限制到所选级别。子代理限制仅适用于衍生的子代理。只会降低强度,不会提高。如果模型不支持所选级别,将自动降至最近的支持级别。`,"dash.effortCapNone":`无上限`,"dash.maintenance":`维护`,"dash.maintenanceHint":`刷新 Codex 模型目录,或安装新的 opencodex 版本。`,"dash.syncModels":`同步模型`,"dash.syncing":`同步中…`,"dash.syncOk":`同步完成。已追加 {count} 个模型。`,"dash.syncStaleHint":`如果 Codex 仍显示旧列表,请重启长期运行的 app-server({cmd})。`,"dash.syncFailed":`同步失败:{error}`,"dash.projectConfigTitle":`项目 Codex 配置绕过了 OpenCodex`,"dash.projectConfigHint":`这些仓库级设置会覆盖 OpenCodex 代理(例如直接走 OpenCode Go)。请移除它们,以便该项目使用 ~/.codex/config.toml 的代理路由。`,"dash.checkUpdate":`检查更新`,"dash.updateTitle":`更新 opencodex`,"dash.updateDesc":`检查所选 npm 频道的最新版本,然后选择安装后是否重启代理。`,"dash.updateChannel":`频道`,"dash.updateChecking":`正在检查更新…`,"dash.updateInstalled":`已安装`,"dash.updateLatest":`最新`,"dash.updateAvailable":`有可用更新`,"dash.updateCurrent":`已是最新`,"dash.updateCommand":`命令`,"dash.updateSource":`当前是源码检出。请在终端运行显示的命令进行更新。`,"dash.updateUnavailable":`无法从 npm 读取最新版本。请稍后重试。`,"dash.updateRetry":`重试`,"dash.updateRecheck":`重新检查`,"dash.updateCannotAuto":`无法一键更新({reason})。`,"dash.updateReason.source_checkout":`源码检出`,"dash.updateReason.latest_unavailable":`无法连接 npm 注册表`,"dash.updateReason.already_latest":`已是最新版本`,"dash.updateReason.unknown":`无法更新`,"dash.updateRestart":`更新后重启`,"dash.updateRestartHint":`推荐开启。代理重启前,当前 GUI 仍运行旧代码。`,"dash.runUpdate":`更新`,"dash.updateReconnecting":`正在等待重启后的代理…`,"dash.updateStatus.running":`正在更新 opencodex。`,"dash.updateStatus.restarting":`更新已安装。正在重启代理。`,"dash.updateStatus.succeeded":`更新完成。`,"dash.updateStatus.failed":`更新失败。`,"prov.subtitle":`配置 opencodex 路由到 Codex 的上游提供方。使用账户登录、添加提供方,或编辑原始配置。`,"prov.add":`添加提供方`,"prov.editJson":`编辑 JSON`,"prov.accountLogin":`账户登录`,"prov.noOauth":`没有可用的 OAuth 提供方。`,"prov.loggedIn":`已登录`,"prov.notLoggedIn":`未登录`,"prov.logout":`退出登录`,"prov.login":`登录`,"prov.loginWith":`使用 {provider} 登录`,"prov.waitingBrowser":`等待浏览器…`,"prov.didntOpen":`没有打开?点击这里`,"prov.copyLink":`复制链接`,"prov.linkCopied":`已复制`,"prov.linkCopyUnavailable":`剪贴板不可用`,"prov.deviceCode":`设备验证码`,"prov.copyCode":`复制验证码`,"prov.codeCopied":`验证码已复制`,"prov.editAlias":`编辑别名`,"prov.aliasPrompt":`显示名称(留空以清除)`,"prov.aliasSaved":`别名已保存`,"prov.aliasSaveFailed":`无法保存别名`,"prov.accountId":`ID`,"prov.pasteRedirect":`粘贴重定向 URL 或授权码`,"prov.pasteRedirectHint":`如果浏览器显示 localhost 错误,请复制地址栏中的完整 URL 并粘贴到此处(或粘贴授权码)。`,"prov.pasteSubmit":`提交`,"prov.pasteSubmitting":`提交中…`,"prov.pasteOk":`已提交代码 — 正在完成登录…`,"prov.pasteFail":`无法提交代码:{error}`,"prov.port":`端口`,"prov.default":`默认`,"prov.loadingConfig":`加载中…`,"prov.saved":`已保存!重启代理以生效。`,"prov.loadConfigFail":`加载配置失败`,"prov.invalidJson":`无效的 JSON`,"prov.saveFailed":`保存失败`,"prov.loginFailStart":`{provider} 登录启动失败`,"prov.loginError":`{provider} 登录错误:{error}`,"prov.loginRequestFail":`{provider} 登录请求失败`,"prov.loginCancelled":`{provider} 登录已取消`,"prov.loginTimeout":`{provider} 登录超时 — 浏览器已关闭或未完成。请重试。`,"prov.loginOk":`已登录到 {provider}。运行 {cmd}(或实时生效)以列出其模型。`,"oauthTos.highTitle":`{provider}:订阅 OAuth 风险`,"oauthTos.elevatedTitle":`{provider}:非官方 OAuth 桥接`,"oauthTos.anthropicBody":`通过 OpenCodex 等第三方代理直接复用 Claude 订阅 OAuth 令牌,并非 Anthropic 支持的集成方式,可能导致访问受限。可使用 Claude 订阅的受支持 Agent SDK 集成属于另一种方式。`,"oauthTos.highBody":`OpenCodex 通过第三方 OAuth 路径连接 {provider}。如果该用法不受支持,访问可能会被限制或暂停。`,"oauthTos.elevatedBody":`OpenCodex 通过非官方 OAuth 路径连接 {provider}。请尽量使用官方客户端;异常或自动化流量可能被视为滥用,访问可能会被限制或暂停。`,"oauthTos.saferPath":`更安全的做法:改为在 OpenCodex 中配置 API 密钥。`,"oauthTos.acknowledge":`我了解风险,仍要继续使用 OAuth。`,"oauthTos.continue":`继续使用 OAuth`,"prov.logoutOk":`已退出 {provider}。`,"prov.logoutFail":`无法退出 {provider}。账户状态保持不变。`,"prov.removed":`已移除 "{name}"。`,"prov.removedDefault":`已移除 "{name}"。默认提供方现为 "{defaultProvider}"。`,"prov.removeFail":`移除 "{name}" 失败。`,"prov.removeLastProvider":`如果没有其他已启用的提供方可以成为默认,则无法移除此提供方。`,"prov.removeHasDependentCombos":`请先移除或更新依赖它的组合:{combos}。`,"prov.setDefault":`设为默认`,"prov.setDefaultSuccess":`"{name}" 已设为默认提供方。`,"prov.setDefaultFail":`无法将 "{name}" 设为默认提供方。`,"prov.defaultDisabled":`请先启用此提供方,再将其设为默认。`,"prov.updateFail":`无法更新此提供方。`,"prov.networkError":`网络错误。请确认代理正在运行后重试。`,"prov.added":`已添加 "{name}"。现已生效 — 运行 {cmd}(或重启)以在 Codex 选择器中列出其模型。`,"prov.removeConfirm":`移除提供方 "{name}"?其模型将从 Codex 选择器中消失。`,"prov.hasApiKey":`已配置 API 密钥`,"prov.hasHeaders":`已配置自定义请求头`,"prov.accounts":`账户({n})`,"prov.accountsAria":`展开/收起 {name} 账户`,"prov.accountActive":`使用中`,"prov.accountReauth":`需重新登录`,"prov.reauthenticate":`重新认证`,"prov.reauthAccountMissing":`登录后未找到所选账号`,"prov.reauthIdentityMismatch":`登录账号与所选账号不匹配`,"prov.accountAdd":`添加账户`,"prov.accountNoLabel":`账户 {id}`,"prov.accountSwitchTitle":`使用此账户`,"prov.accountSwitched":`已切换到 {email}。`,"prov.accountSwitchFail":`切换账户失败`,"prov.accountRemoved":`已移除 {email}。`,"prov.accountRemoveFail":`无法移除 {email}。账户保持不变。`,"prov.accountRemoveAria":`移除 {email}`,"prov.accountRemoveConfirm":`移除账户 {email}?其登录将从此代理中删除。`,"prov.keyAdd":`添加 API 密钥`,"prov.keyAdded":`已为 {name} 添加 API 密钥。`,"prov.keyAddFail":`添加 API 密钥失败`,"prov.keyPlaceholder":`粘贴 API 密钥`,"prov.keySwitchTitle":`使用此密钥`,"prov.keySwitched":`已切换到密钥 {key}。`,"prov.keySwitchFail":`切换密钥失败`,"prov.keyRemoved":`已移除密钥 {key}。`,"prov.keyRemoveAria":`移除密钥 {key}`,"prov.keyRemoveConfirm":`移除 API 密钥 {key}?它将从此代理的配置中删除。`,"prov.activeBadge":`已启用`,"prov.disabledBadge":`已禁用`,"prov.defaultBadge":`默认`,"prov.enable":`启用`,"prov.disable":`禁用`,"prov.enabled":`已启用 "{name}"。其模型可再次出现在 Codex 中。`,"prov.disabled":`已禁用 "{name}"。设置会保留,但模型会被隐藏。`,"prov.enableFail":`启用 "{name}" 失败。`,"prov.disableFail":`禁用 "{name}" 失败。`,"prov.enableAria":`启用提供方 {name}`,"prov.disableAria":`禁用提供方 {name}`,"prov.defaultCannotDisable":`默认提供方不能被禁用`,"prov.openaiAccountMode":`Codex 账户模式`,"prov.openaiModePool":`账户池`,"prov.openaiModeDirect":`直连`,"prov.openaiPoolDesc":`默认模式。根据会话关联、额度、冷却时间和故障转移,在主登录与已添加账户之间轮换。`,"prov.openaiDirectDesc":`仅使用当前主 Codex 登录。不会读取或轮换已存储的账户池账号。`,"prov.openaiModeSaved":`OpenAI 账户模式已更改为 {mode}。`,"prov.openaiModeSaveFailed":`无法更改 OpenAI 账户模式。`,"prov.openaiApiDesc":`仅使用 OpenAI API 密钥,不使用 Codex 账户凭据。`,"prov.manageCodexAccounts":`管理 Codex 账户`,"prov.openaiApiMissing":`需要 API 密钥`,"prov.openaiApiSetup":`设置 API 密钥`,"models.subtitle":`开关 Codex 可见的模型 — 原生 GPT passthrough 与已路由模型按提供方分组(点击标题可折叠)。隐藏的模型不会出现在目录和模型选择器中,但仍可按精确 id 直接调用。更改在下一个 Codex 回合生效 — opencodex 会使 Codex 的 5 分钟模型缓存失效,因此无需重启。`,"models.nativeGroupLabel":`OpenAI 原生`,"models.nativeHint":`Passthrough 模型使用在提供方页面选择的账户池或直连选项。关闭后会从 Codex 选择器中隐藏(目录条目保留,重新开启即可完整恢复)。`,"models.active":`{active}/{total} 可见`,"models.workspace.providers":`提供方`,"models.workspace.allProviders":`所有提供方`,"models.workspace.mainAria":`模型详情`,"models.combosEmpty":`尚未配置组合`,"models.combosSetup":`设置`,"models.combosAdd":`添加组合`,"models.combosActive":`{count} 个已启用`,"models.allOn":`全部开启`,"models.allOff":`全部关闭`,"models.cap350k":`限制 350k`,"models.capApplied":`上下文限制已应用 — 将在下一个 Codex 回合生效。`,"models.capSaveFailed":`保存上下文限制失败`,"models.contextCapped":`350k 限制`,"models.contextCapLabel":`上下文限制`,"models.v2Label":`子代理`,"models.shadowCallOriginal":`⚠ {models} →`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`所有模型 → v1 界面`,"models.v2ModeDesc_default":`上游默认值 (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`所有模型 → v2 界面`,"models.v2Help":`控制所有模型的多代理界面。
28
-
29
- v1: 经典单线程代理。所有模型使用 v1 协作界面。
30
- base: 上游默认值 — sol/terra 使用 v2,luna 使用 v1,其余跟随 codex 功能标志。
31
- v2: 多线程代理(spawn_agent)。所有模型使用 v2 协作界面。
32
-
33
- 更改在新会话中生效。`,"models.v2DocsLink":`v1 / v2 是什么?`,"dash.multiAgent":`子代理`,"models.v2Conflict":`[agents] max_threads 仍存在 — codex 将拒绝启动,请从 config.toml 移除`,"models.v2Applied":`子代理模式已更新 — 新会话生效(重启 Codex 应用以刷新选择器)`,"models.v2ThreadsLabel":`最大线程`,"models.v2ThreadsDefault":`默认 (4)`,"models.v2ThreadsApplied":`线程上限已更新 — 新会话生效`,"models.v2ThreadsInvalid":`线程上限必须为 >= 1 的整数`,"models.v2ThreadsApply":`应用`,"models.capValue":`限制 {value}`,"models.contextCappedValue":`{value} 限制`,"models.setAll":`全部设置`,"models.setAllHint":`将 {value} 上下文上限应用到所有已路由的提供方。原生提供方不受影响。`,"models.collapseAll":`全部折叠`,"models.expandAll":`全部展开`,"models.orderHint":`选择器顺序:Subagents 中的选择(按所选顺序)→ 其余已路由模型(依次按提供方、模型 ID 字母排序)→ 原生模型。可见性开关仅用于筛选,不会改变此顺序。`,"models.custom":`自定义…`,"models.customApply":`应用`,"models.customPlaceholder":`令牌 (例如 420000)`,"models.customAdd":`添加自定义模型`,"models.customAddTitle":`添加自定义模型 — {provider}`,"models.customEditTitle":`编辑自定义模型 — {provider}`,"models.customAdded":`已添加自定义模型`,"models.customUpdated":`已更新自定义模型`,"models.customDeleted":`已删除自定义模型`,"models.customSaveFailed":`保存自定义模型失败`,"models.customSaving":`正在保存…`,"models.customAddBtn":`添加`,"models.customEditBtn":`更新`,"models.customEdit":`编辑`,"models.customDelete":`删除`,"models.customDeleteConfirm":`要删除模型 {name} 吗?`,"models.customBadge":`自定义`,"models.customSummary":`{count} 个自定义模型`,"models.customFieldModelId":`模型 ID(端点标识)`,"models.customFieldModelIdPlaceholder":`例如 qwen4-max-preview`,"models.customFieldDisplayName":`显示名称(可选)`,"models.customFieldDisplayNamePlaceholder":`例如 Qwen 4 Max Preview`,"models.customFieldContext":`上下文窗口`,"models.customFieldModalities":`输入模态`,"models.tipProvider":`提供方`,"models.tipContext":`上下文`,"models.tipModalities":`模态`,"models.tipStatus":`状态`,"models.tipActive":`已启用`,"models.tipDisabled":`已禁用`,"models.applied":`已应用 — 将在下一个 Codex 回合生效。`,"models.saveFailed":`保存失败`,"models.networkError":`网络错误 — 代理在运行吗?`,"models.loadFail":`加载模型失败 — 代理在运行吗?`,"models.noRouted":`没有已路由的模型`,"models.noRoutedHint":`请先登录提供方或添加一个。`,"models.emptyDiscovery":`未发现任何模型。请检查提供方端点,或添加静态/自定义模型。`,"models.emptyDiscoveryDisabled":`实时模型发现已关闭,且尚未配置静态模型。`,"models.discoveryFailedBadge":`发现失败`,"models.discoveryFailedHttp":`模型发现失败(HTTP {status})。`,"models.discoveryFailedBlocked":`模型发现被目标策略阻止。`,"models.discoveryFailedInvalidResponse":`模型发现返回了无效响应。`,"models.discoveryFailedNetwork":`由于网络错误,模型发现失败。`,"models.discoveryFailedProvider":`提供方报告了模型发现错误。`,"models.discoveryFailedGeneric":`模型发现失败。`,"models.openProviderSettings":`打开提供方设置`,"models.loading":`加载中…`,"models.search":`搜索模型…`,"models.showMore":`再显示 {n} 个`,"models.allowlistLabel":`仅所选`,"models.allowlistHint":`仅勾选的模型进入目录(留空 = 全部)。适用于暴露成千上万模型的提供商。`,"models.selectedCount":`已选 {n} 个`,"sub.subtitle":`Codex 的 {cmd} 仅将优先级最高的前 5 个模型作为覆盖项公开。在此最多选择 5 个 — 原生 gpt 或已路由模型 — opencodex 会设置它们的目录优先级,使其正好排在前面。其他模型仍可按确切名称调用;此设置仅控制显示项。`,"sub.featured":`精选`,"sub.orderHint":`此处所选并显示的顺序决定 Codex 模型选择器顶部第 1–5 位,以及 {cmd} 的默认模型候选。`,"sub.noneSelected":`未选择 — 请从下方列表选择。`,"sub.models":`模型`,"sub.search":`搜索模型(原生 gpt + 已路由)…`,"sub.noModels":`没有模型 — 请先登录提供方或添加一个。`,"sub.saved":`已保存 {n} 个模型。启动新的 Codex 会话(或运行 {cmd})以将它们作为 spawn_agent 覆盖项查看。`,"sub.saveFailed":`保存失败`,"sub.networkError":`网络错误 — 代理在运行吗?`,"sub.loadFail":`加载模型失败 — 代理在运行吗?`,"sub.loading":`加载中…`,"sub.moveUp":`上移 {m}`,"sub.moveDown":`下移 {m}`,"sub.removeAria":`移除 {m}`,"sub.workspace.addToFeatured":`将 {m} 添加到精选`,"sub.workspace.allModels":`所有模型`,"sub.workspace.featuredFull":`精选列表已满(最多 5 个)`,"sub.workspace.mainAria":`子代理模型详情`,"sub.workspace.notFeatured":`未设为精选`,"sub.workspace.priority":`优先级`,"sub.workspace.removeFromFeatured":`将 {m} 从精选中移除`,"sub.workspace.selectModel":`选择模型`,"sub.workspace.selectModelDesc":`从列表中选择一个模型以查看详情,并将其设为 spawn_agent 的精选模型。`,"sub.workspace.selector":`公开选择器`,"logs.title":`请求日志`,"logs.tabLogs":`日志`,"logs.tabDebug":`调试`,"logs.subtitle":`经过本地 opencodex 代理的最近请求,最新在前。`,"logs.autoRefresh":`自动刷新`,"logs.noRequests":`暂无请求。`,"logs.loadError":`无法加载请求日志。`,"logs.filter.surface.label":`界面`,"logs.filter.surface.all":`全部`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.filter.surface.grok":`Grok`,"logs.filter.conversation.label":`会话`,"logs.filter.conversation.placeholder":`粘贴会话 ID`,"logs.filter.conversation.clear":`清除`,"logs.filter.conversation.apply":`筛选日志`,"logs.conversation.totals":`{requests} 次请求 · {tokens} tokens · {cost}`,"logs.conversation.scope":`合计仅覆盖当前已加载的 Logs 环形缓冲。`,"logs.conversation.excluded":`(~$ 已排除 {unpriced} 条无定价、{unmetered} 条无计量)`,"logs.detail.conversation":`会话`,"logs.badge.claude":`Claude`,"logs.badge.grok":`Grok`,"logs.col.time":`时间`,"logs.col.request":`请求`,"logs.col.model":`模型`,"logs.col.effort":`推理强度`,"logs.col.provider":`提供方`,"logs.col.status":`状态`,"logs.col.tokens":`Token 数`,"logs.col.tokPerSec":`tok/s`,"logs.col.estimatedCost":`~$`,"logs.metric.tokPerSecTitle":`按完整请求耗时计算的每秒输出 token`,"logs.metric.estimatedCostTitle":`按 API 标价估算,并非实际扣费;价格无法匹配时不显示`,"usage.cost.total":`API 标价折算(当前范围)`,"usage.cost.disclaimer":`这不是账单或扣费凭证。实际可能计入订阅用量或消耗服务商额度。`,"usage.cost.unpricedNote":`已排除 {count} 个无法计费的请求`,"logs.detail.section.basic":`基本信息`,"logs.detail.section.performance":`性能`,"logs.detail.section.cost":`API 标价折算`,"logs.detail.section.attempts":`Combo 尝试`,"logs.detail.section.usage":`原始 usage`,"logs.detail.ttft":`TTFT`,"logs.detail.costTotal":`标价折算`,"logs.detail.totalTokens":`Token 总数`,"logs.detail.matchedKey":`匹配的 jawcode 键`,"logs.detail.priceSource":`价格来源`,"logs.detail.unavailableReason":`不可用原因`,"logs.detail.copyRequestId":`复制请求 ID`,"logs.detail.copied":`已复制`,"logs.detail.source.jawcode":`jawcode 目录`,"logs.detail.source.expected":`Expected 价格覆盖`,"logs.detail.verification.verified":`已验证`,"logs.detail.verification.derived":`由基础模型推导`,"logs.detail.attempt.target":`提供方 / 模型`,"logs.detail.attempt.reason":`结果 / 原因`,"logs.detail.attempt.completed":`已完成`,"logs.detail.attempt.e2eNote":`顶层 tok/s 为端到端值;每次尝试使用各自耗时。`,"logs.detail.reason.usage_missing":`未上报 usage。`,"logs.detail.reason.usage_unsupported":`该提供方不支持上报 usage。`,"logs.detail.reason.output_missing":`未上报正数输出 token。`,"logs.detail.reason.invalid_duration":`请求耗时无效。`,"logs.detail.reason.price_unmatched":`未找到匹配的 jawcode 价格。`,"logs.detail.reason.invalid_cache_breakdown":`缓存 token 明细与输入 token 总数冲突。`,"logs.detail.reason.invalid_usage":`Usage 包含无效的 token 值。`,"logs.detail.reason.combo_attempt_unavailable":`至少一次 Combo 尝试无法计价。`,"logs.detail.estimate.usage_estimated":`提供方 usage 为估算值。`,"logs.detail.estimate.cache_detail_missing":`缺少缓存明细;输入费用按上限估算。`,"logs.detail.estimate.expected_price_overlay":`使用了已验证的 Expected 标价。`,"logs.col.error":`错误`,"logs.col.upstreamReason":`上游原因`,"logs.col.duration":`耗时`,"logs.tokens.reported":`已上报`,"logs.tokens.unreported":`未上报`,"logs.tokens.unsupported":`不支持`,"logs.tokens.estimated":`估算`,"logs.tokens.input":`输入`,"logs.tokens.output":`输出`,"logs.tokens.cacheRead":`缓存命中 (c)`,"logs.tokens.cacheWrite":`缓存写入 (w)`,"logs.tokens.reasoning":`推理`,"logs.tokens.noCache":`无缓存数据`,"logs.tokens.contextTotal":`活动上下文`,"logs.tokens.noCacheNote":`该提供商不报告缓存 token 数`,"logs.tokens.noCacheCursor":`Cursor 未报告缓存明细`,"logs.tokens.noCacheCursorNote":`Cursor 不提供缓存读写 token 数;这表示未知,并不代表已确认缓存未命中`,"logs.tokens.estimatedNote":`估算值(提供商不报告精确用量)`,"logs.details":`查看详情`,"logs.detailTitle":`请求详情`,"logs.detailRaw":`原始日志`,"debug.title":`调试`,"debug.subtitle":`可选的 provider transport 与 usage 提取诊断。请求错误和 502 在“日志”标签页显示。`,"debug.debug":`Provider debug`,"debug.usage":`Usage 提取`,"debug.injection":`注入日志`,"debug.claude":`Claude 入站`,"debug.claudeInbound.title":`Claude 入站请求`,"debug.claudeInbound.sub":`显示 Claude Code/Desktop 实际发送的内容(thinking、effort、metadata)— 不保存提示词原文。`,"debug.claudeInbound.empty":`尚未捕获任何请求。开启后从 Claude 发送一条消息试试。`,"debug.claudeInbound.time":`时间`,"debug.claudeInbound.endpoint":`端点`,"debug.claudeInbound.model":`模型`,"debug.claudeInbound.none":`无`,"debug.reset":`清除运行时覆盖`,"debug.refresh":`刷新`,"debug.follow":`跟随滚动`,"debug.streamProvider":`Provider`,"debug.streamUsage":`Usage`,"debug.streamInjection":`Injection`,"debug.loading":`正在加载调试设置…`,"debug.loadFailed":`无法加载调试设置。`,"debug.emptyTitle":`调试日志已关闭`,"debug.empty":`请在上方卡片中开启 Provider debug 或 Usage extraction。通过代理发送请求后,诊断行会显示在这里。`,"debug.noLinesTitle":`等待诊断行`,"debug.noLines.provider":`提供商调试已开启,但仅记录传输异常(丢弃或格式错误的帧,以及 Cursor dial/retry 事件)。通过 Anthropic 等提供商的正常请求可能不会产生任何行。`,"debug.noLines.usage":`用量提取已开启但尚未捕获任何内容。请通过 Codex 发送请求,随后会显示在此处。`,"debug.noLines.injection":`注入日志已开启但尚未捕获任何内容。它记录协作和子代理回合中的多代理指导注入与 effort-cap 决策。`,"usage.title":`用量`,"usage.subtitle":`代理本地的 Token 用量统计。缺失的用量不会显示为零。`,"usage.loading":`正在加载用量数据…`,"usage.empty":`尚无用量记录。通过代理发送请求后将在此显示。`,"usage.loadError":`无法加载用量数据。`,"usage.range.all":`全部`,"usage.range.available":`可用历史`,"usage.historyTruncated":`由于未加载较早的使用记录,合计仅涵盖可用历史。`,"usage.range.30d":`30 天`,"usage.range.7d":`7 天`,"usage.card.requests":`请求数`,"usage.card.measured":`已计量`,"usage.card.reported":`已上报`,"usage.card.totalTokens":`Token 总数`,"usage.card.cachedTokens":`缓存命中 Token`,"usage.card.cachedTokensHint":`从提供商缓存读取的提示 Token(命中)。缓存写入在下方单独显示。`,"usage.card.cacheWriteTokens":`缓存写入`,"usage.card.coverage":`覆盖率`,"usage.card.activeDays":`活跃天数`,"usage.section.heatmap":`每日活动`,"usage.section.overview":`概览`,"usage.section.models":`模型`,"usage.section.providers":`提供方`,"usage.section.coverage":`覆盖率明细`,"usage.workspace.report":`用量报告`,"usage.workspace.sections":`用量分区`,"usage.coverage.measured":`已计量`,"usage.coverage.reported":`提供方上报`,"usage.coverage.estimated":`估算`,"usage.coverage.note":`已计量包含提供方上报和估算的 Token 数。未上报 / 不支持请求仅做计数,不会被算作 0 Token。`,"usage.search.models":`搜索模型…`,"usage.col.requests":`请求数`,"usage.col.measured":`已计量`,"usage.col.reported":`已上报`,"usage.col.tokens":`Token 数`,"usage.col.share":`占比`,"usage.heatmap.less":`少`,"usage.heatmap.more":`多`,"modal.addNamed":`添加:{label}`,"modal.add":`添加提供方`,"modal.search":`搜索提供方…`,"modal.logInWith":`使用 {label} 登录`,"modal.waitingBrowser":`等待浏览器…`,"modal.providerName":`提供方名称`,"modal.adapter":`适配器`,"modal.baseUrl":`Base URL`,"modal.endpoint":`端点`,"modal.endpoint.tokenPlan":`Token 套餐`,"modal.endpoint.payAsYouGo":`按量付费`,"modal.endpoint.custom":`自定义`,"modal.defaultModel":`默认模型(可选)`,"modal.allowPrivateNetwork":`允许本地/私有网络`,"modal.allowPrivateNetworkHint":`仅为有意自托管的提供商启用。元数据端点仍被阻止。`,"modal.nameRequired":`提供方名称为必填项`,"modal.baseUrlRequired":`Base URL 为必填项`,"modal.networkError":`网络错误 — 代理在运行吗?`,"modal.loginFailStart":`登录启动失败`,"modal.waitingLogin":`等待浏览器登录…`,"modal.loggingIn":`登录中…`,"modal.loginTimeout":`登录超时 — 请重试。`,"nav.api":`API`,"nav.clients":`客户端`,"nav.codexAuth":`Codex 认证`,"nav.openMenu":`打开菜单`,"nav.closeMenu":`关闭菜单`,"codexAuth.mainAccount":`主账号`,"codexAuth.codexApp":`Codex App`,"codexAuth.appLogin":`应用登录`,"codexAuth.accountPool":`账号池`,"codexAuth.accountModeTitle":`OpenAI 账户模式`,"codexAuth.accountModePool":`账户池模式`,"codexAuth.accountModePoolDesc":`主登录与符合条件的已添加账户会在此轮换。`,"codexAuth.accountModeDirect":`直连模式`,"codexAuth.accountModeDirectDesc":`请求仅使用主登录;已添加账户会继续存储,供账户池模式使用。`,"codexAuth.openaiMissing":`未配置内置 OpenAI 提供方。`,"codexAuth.openaiDisabled":`内置 OpenAI 提供方已禁用。`,"codexAuth.openaiUnavailableDesc":`你的 OpenAI 账号仍然可用。启用提供方后即可路由 Codex 请求。`,"codexAuth.enableOpenai":`启用 OpenAI`,"codexAuth.enablingOpenai":`正在启用...`,"codexAuth.enableOpenaiFailed":`无法启用 OpenAI 提供方。`,"codexAuth.openaiPresetLoadFailed":`无法加载 OpenAI 提供方预设。`,"codexAuth.openaiPresetUnavailable":`OpenAI 提供方预设不可用。`,"codexAuth.openProviders":`打开提供商`,"codexAuth.add":`添加`,"codexAuth.refreshQuota":`刷新额度`,"codexAuth.refreshingQuota":`刷新中...`,"codexAuth.quotaRefreshed":`额度已刷新`,"codexAuth.quotaRefreshFailed":`额度刷新失败`,"codexAuth.pauseExhausted":`暂停已达上限账号`,"codexAuth.pausingExhausted":`正在检查额度...`,"codexAuth.pauseExhaustedSucceeded":`已暂停 {count} 个达到上限的账号`,"codexAuth.pauseExhaustedNone":`没有确认达到 100% 用量的账号。`,"codexAuth.pauseExhaustedFailed":`无法检查并暂停已达上限账号。`,"codexAuth.noPool":`尚未添加池账号。`,"codexAuth.pause":`暂停`,"codexAuth.resume":`恢复`,"codexAuth.paused":`已暂停`,"codexAuth.pauseSucceeded":`已暂停 {email}`,"codexAuth.resumeSucceeded":`{email} 已重新加入账号池`,"codexAuth.pauseFailed":`无法暂停 {email},未做任何更改。`,"codexAuth.resumeFailed":`无法恢复 {email},未做任何更改。`,"codexAuth.pausedHint":`恢复前不会参与自动切换、重试、冷却恢复或手动选择。`,"codexAuth.fiveHour":`5 小时`,"codexAuth.weekly":`每周`,"codexAuth.monthly":`30天`,"codexAuth.resets":`重置`,"codexAuth.today":`今天`,"codexAuth.current":`当前`,"codexAuth.nextSession":`已选择`,"codexAuth.poolPrepared":`已为账户池准备`,"codexAuth.preparePoolTitle":`为账户池模式准备此账号?`,"codexAuth.preparePoolDesc":`直连请求仍使用主登录。启用账户池模式后,此账号会成为预先选择的池账号。`,"codexAuth.prepareForPool":`为账户池准备`,"codexAuth.poolPreparedToast":`已为账户池模式准备 {email}`,"codexAuth.switchTitle":`切换活跃账号?`,"codexAuth.switchDesc":`从现有和新 Codex 会话的下一次请求开始生效。进行中的请求保留原账号。`,"codexAuth.cacheWarning":`账号变化后 OpenCodex 会重放对话上下文,但提供商侧的提示缓存可能需要重新预热。`,"codexAuth.setAsNext":`选择账号`,"codexAuth.cancel":`取消`,"codexAuth.switchBack":`切换回主账号?`,"codexAuth.switchBackDesc":`现有和新 Codex 会话的下一次请求将使用应用登录账号。`,"codexAuth.autoSwitch":`基于用量的主动切换`,"codexAuth.autoSwitchQuotaDesc":`配额:使用率达到或超过 {threshold}% 时,包括已绑定任务在内的下一次请求可能转到用量更低的合格账号;Go/Free 仅使用 30 天窗口。`,"codexAuth.autoSwitchQuotaOffDesc":`基于用量的主动切换已关闭。新建/未绑定任务分配和故障恢复仍然生效。`,"codexAuth.autoSwitchRoundRobinDesc":`轮询分配不使用此阈值,并会继续轮换新建/未绑定任务。`,"codexAuth.autoSwitchFillFirstDesc":`填满优先:{threshold}% 是新建/未绑定任务的耗尽点;健康的已绑定任务继续使用原账号。`,"codexAuth.autoSwitchFillFirstOffDesc":`填满优先没有新建/未绑定任务的用量耗尽点;冷却、重新认证和故障恢复仍可能改变路由。`,"codexAuth.failureRecoveryNote":`故障恢复是独立机制:输出前的 429/402 拒绝、冷却、重新认证、排除或已配置的瞬时故障转移可能选择另一个合格账号。`,"codexAuth.autoSwitchThreshold":`用量阈值`,"codexAuth.autoSwitchThresholdAria":`用量阈值(百分比)`,"codexAuth.autoSwitchThresholdInc":`提高用量阈值`,"codexAuth.autoSwitchThresholdDec":`降低用量阈值`,"codexAuth.autoSwitchLoadFailed":`无法加载基于用量的切换设置。`,"codexAuth.autoSwitchThresholdInvalid":`请输入 1 到 100 之间的整数`,"codexAuth.autoSwitchUpdated":`基于用量的主动切换设置已更新`,"codexAuth.autoSwitchUpdateFailed":`无法确认基于用量的切换更新。当前显示最后一次确认的值。`,"anthropicPool.title":`Claude 账户池(实验性)`,"anthropicPool.enabledDesc":`遇到 429 时冷却该账户并故障转移。新会话优先使用 5 小时用量低于 {threshold}% 的账户。`,"anthropicPool.disabledDesc":`仅使用当前活跃的 Claude 账户。仅在接受实验性路由时启用。`,"anthropicPool.experimentalWarning":`实验性功能,尚未充分验证。看起来像自动多账户轮换的行为可能导致 Anthropic 限制账户。同一组织可能共享配额——对这些账户做池化没有帮助。除非了解风险,否则请保持关闭。`,"anthropicPool.needTwoAccounts":`启用账户池前请至少添加两个 Claude OAuth 账户。`,"anthropicPool.threshold":`新会话用量阈值`,"anthropicPool.thresholdAria":`新会话用量阈值(百分比)`,"anthropicPool.thresholdHelp":`0 表示禁用基于配额的选择(仅亲和性 + 活跃账户)。默认 80。`,"anthropicPool.thresholdInvalid":`请输入 0 到 100 之间的整数`,"anthropicPool.loadFailed":`无法加载 Claude 账户池设置。`,"anthropicPool.saveFailed":`无法保存 Claude 账户池设置。`,"anthropicPool.on":`开`,"anthropicPool.off":`关`,"accountPool.strategy":`轮换策略`,"accountPool.strategyDesc":`OpenCodex 如何为新建/未绑定任务分配账号。`,"accountPool.strategyQuota":`配额`,"accountPool.strategyRoundRobin":`轮询`,"accountPool.strategyFillFirst":`填满优先`,"accountPool.strategyHintQuota":`配额策略在超过用量阈值后,也可以在现有任务的下一次请求中重新绑定账号。`,"accountPool.strategyHintRoundRobin":`轮询只轮换没有有效绑定的任务;用量阈值不会改变正常轮换。`,"accountPool.strategyHintFillFirst":`填满优先把阈值用作未绑定任务的耗尽点;健康的已绑定任务保持亲和性。`,"accountPool.unboundDefinition":`新建/未绑定任务是当前没有账号绑定的请求;已有的可见任务在代理或亲和性重置后也可能变为未绑定。`,"accountPool.stickyLimit":`轮换前的新建/未绑定任务分配数`,"accountPool.stickyLimitAria":`轮换前的新建/未绑定任务分配数`,"accountPool.stickyLimitInc":`提高粘性上限`,"accountPool.stickyLimitDec":`降低粘性上限`,"accountPool.stickyLimitHelp":`在推进到下一个账号之前,为所选账号分配这么多次新建/未绑定任务;计数在任务绑定时增加,而不是在上游成功后增加。`,"accountPool.stickyLimitInvalid":`请输入 1 到 100 之间的整数`,"accountPool.strategyLoadFailed":`无法加载轮换策略。`,"accountPool.strategyUpdateFailed":`无法保存轮换策略。`,"codexAuth.switched":`下一次请求将使用 {email}`,"codexAuth.loadFailed":`无法加载 Codex 账号设置。`,"codexAuth.switchFailed":`无法切换账户。之前的选择保持不变。`,"codexAuth.removeConfirm":`删除 {id}?`,"codexAuth.removeFailed":`无法移除账户。未进行任何更改。`,"codexAuth.addTitle":`添加 Codex 账号`,"codexAuth.addIdLabel":`账号 ID(标识符)`,"codexAuth.addJsonLabel":`auth.json 内容`,"codexAuth.addHelp":`从另一台机器的 ~/.codex/auth.json 复制,或使用 codex-auth export。`,"codexAuth.importBtn":`导入`,"codexAuth.importInvalidJson":`无效的 JSON`,"codexAuth.importMissingTokens":`JSON 中缺少 access_token 或 refresh_token`,"codexAuth.importMissingId":`请输入账号 ID`,"codexAuth.accountAdded":`账号已添加到池中`,"codexAuth.addPickDesc":`使用另一个 ChatGPT 账号登录以添加到池中。`,"codexAuth.oauthLogin":`OAuth 登录`,"codexAuth.oauthDesc":`在浏览器中打开 ChatGPT 登录`,"codexAuth.importAuthJson":`导入 auth.json`,"codexAuth.importAuthJsonDesc":`从另一个 Codex 安装或 codex-auth 导出`,"codexAuth.back":`返回`,"codexAuth.oauthAlreadyInProgress":`登录已在进行中。请在浏览器中完成。`,"codexAuth.oauthWaiting":`等待浏览器中完成 ChatGPT 登录...`,"codexAuth.oauthSubmittingCode":`正在提交代码…`,"codexAuth.oauthCodeSubmitted":`代码已提交——正在等待登录完成…`,"codexAuth.oauthStatusRetrying":`检查登录状态时发生网络或代理错误——正在重试…`,"codexAuth.oauthCancelled":`登录已取消。`,"codexAuth.loginFailed":`登录失败`,"codexAuth.needsReauth":`重新登录`,"codexAuth.reauthenticate":`Re-authenticate`,"codexAuth.tokenExpired":`令牌已过期 — 请重新认证此账号`,"codexAuth.mainTokenExpired":`令牌已过期 — 请通过 Codex 应用登录重新登录`,"codexAuth.emailCollision":`此账号与您的主 Codex 登录相同。请使用其他账号。`,"codexAuth.resetCreditsTitle":`重置额度`,"codexAuth.resetCreditsAvailable":`您有 {count} 个可用重置额度。`,"codexAuth.resetCreditsDesc":`每个额度可立即重置您当前的小时和每周使用限制。`,"codexAuth.noResetCredits":`没有可用的重置额度。`,"codexAuth.earnCreditsHint":`额度每月自动发放,也可通过推荐计划获得。`,"codexAuth.creditsExpireNote":`额度在获得后 30 天过期。`,"codexAuth.useOneCredit":`使用 1 个额度`,"codexAuth.confirmResetTitle":`使用重置额度?`,"codexAuth.confirmResetDesc":`这将立即重置您当前的使用限制。剩余额度:{count} 个。`,"codexAuth.irreversible":`此操作不可撤销。`,"codexAuth.useCredit":`使用额度`,"codexAuth.redeeming":`重置中...`,"codexAuth.resetSuccess":`使用限制已重置!剩余额度:{remaining} 个。`,"codexAuth.resetSuccessGeneric":`使用限制已重置!`,"codexAuth.resetAlreadyRedeemed":`该额度已兑换过,额度未变。`,"codexAuth.resetNothingToReset":`当前没有需要重置的使用窗口。`,"codexAuth.resetNoCredit":`没有可用的重置额度。`,"codexAuth.resetError":`重置额度使用失败,请重试。`,"codexAuth.fifoNote":`最早获得的额度优先使用。`,"codexAuth.confirmWhichCredit":`将使用 {date} 获得的额度。`,"codexAuth.creditNext":`即将使用`,"codexAuth.creditLabel":`额度 #{n}`,"codexAuth.creditNextBadge":`NEXT`,"codexAuth.creditGranted":`获得 {date}`,"codexAuth.creditExpires":`过期 {date}(剩余 {days} 天)`,"api.title":`API 访问`,"api.subtitle":`用生成的 API 密钥从外部应用访问 opencodex 代理。认证使用 {authHeader} 请求头;各端点接受哪些请求头见下表。`,"api.endpointNote":`请将基础 URL 用于 OpenAI 兼容客户端。Responses 与 Chat Completions 在 /v1 下提供。`,"api.baseUrl":`基础 URL`,"api.responsesEndpoint":`Responses API`,"api.chatCompletionsEndpoint":`Chat Completions API`,"api.messagesEndpoint":`Messages API`,"api.modelsEndpoint":`Models API`,"api.endpointsTitle":`网关端点`,"api.authBaseUrlNote":`客户端应使用基础 URL,然后选择下面的协议端点。`,"api.authTitle":`身份验证`,"api.authLoopback":`回环绑定(127.0.0.1 或 ::1)会跳过身份验证。远程绑定需要生成的 ocx_ 密钥或 OPENCODEX_API_AUTH_TOKEN。`,"api.modelsTitle":`外部模型目录`,"api.modelsCount":`{count} 个可调用`,"api.modelsSearch":`搜索模型`,"api.modelsSubtitle":`请使用这些精确的模型 ID 搭配 /v1/models 和你选择的入站协议。`,"api.modelsLoading":`正在加载模型…`,"api.modelsEmpty":`还没有可供外部调用的模型。`,"api.modelsNoMatch":`没有与“{query}”匹配的模型。`,"api.modelsLoadFailed":`无法加载外部模型目录。`,"api.colModel":`模型`,"api.colSource":`来源`,"api.colProtocols":`协议`,"api.copyModelId":`复制 ID`,"api.modelCopied":`已复制`,"api.testModel":`测试`,"api.testingModel":`测试中…`,"api.testSucceeded":`成功`,"api.testFailed":`失败`,"api.protocolResponses":`Responses`,"api.protocolChatCompletions":`Chat Completions`,"api.protocolMessages":`Messages`,"api.sourceNative":`ChatGPT 池`,"api.sourceCombo":`组合路由`,"api.sourceCustom":`自定义`,"api.usageResponsesTitle":`Responses 示例`,"api.usageChatTitle":`Chat Completions 示例`,"api.usageMessagesTitle":`Messages 示例`,"api.newKeyTitle":`已创建新密钥`,"api.newKeyNote":`请立即复制此密钥,它不会再次显示。`,"api.copy":`复制`,"api.copied":`已复制`,"api.dismiss":`关闭`,"api.generateTitle":`生成密钥`,"api.keyNamePlaceholder":`密钥名称(可选)`,"api.generate":`生成`,"api.generating":`创建中…`,"api.activeKeys":`活跃密钥({count})`,"api.activeKeysLoading":`有效密钥`,"api.noKeys":`还没有 API 密钥。请在上方生成一个。`,"api.workspace.sections":`API 分区`,"api.section.keys":`密钥`,"api.section.connect":`连接`,"api.section.endpoints":`端点`,"api.section.models":`模型`,"api.section.examples":`示例`,"api.workspace.details":`API 密钥详情`,"api.workspace.keyDetails":`密钥详情`,"api.workspace.keyPrefix":`密钥前缀`,"api.workspace.deleteKey":`删除密钥`,"api.workspace.deleteConfirm":`确定要删除此密钥吗?此操作无法撤销。`,"api.workspace.usageExamples":`用法示例`,"api.copyUrlHint":`点击复制 URL`,"api.urlCopied":`已复制 URL`,"api.copyExampleHint":`点击复制示例`,"api.exampleCopied":`已复制示例`,"api.colName":`名称`,"api.colKey":`密钥`,"api.colCreated":`创建时间`,"api.confirm":`确认`,"api.deleteAria":`删除 API 密钥`,"api.usageSampleInput":`你好,世界!`,"api.clientConfig.title":`客户端配置`,"api.clientConfig.rowsLabel":`连接客户端`,"api.clientConfig.details":`详情`,"api.clientConfig.detailsAria":`{client} 配置详情`,"api.clientConfig.copyAria":`复制 {client} 配置 JSON`,"api.clientConfig.downloadAria":`下载 {client} 配置`,"api.clientConfig.rowMeta":`{destination} · {count} 个模型`,"api.clientConfig.rowError":`无法生成 {client} 配置。`,"api.clientConfig.copiedAnnounceClient":`已将 {client} 配置 JSON 复制到剪贴板。`,"api.clientConfig.clientOpencode":`OpenCode`,"api.clientConfig.clientPi":`Pi`,"api.clientConfig.copy":`复制 JSON`,"api.clientConfig.download":`下载`,"api.clientConfig.loading":`正在生成客户端配置…`,"api.clientConfig.jsonLabel":`{client} 配置 JSON`,"api.clientConfig.destination":`目标文件`,"api.clientConfig.envHint":`启动前设置密钥`,"api.clientConfig.mergeWarning":`请合并到目标文件中。直接替换会丢失你已有的其他提供商和 MCP 配置。`,"api.clientConfig.modelCount":`已导出 {count} 个模型`,"api.clientConfig.missingLimits":`{total} 个模型中有 {count} 个没有上下文上限,客户端将使用自己的默认值。`,"api.clientConfig.noKeyYet":`{env} 目前还没有对应的密钥。离开回环地址使用前,请先在上方生成密钥。`,"api.clientConfig.loadFailed":`无法读取模型列表,因此没有生成客户端配置。`,"api.clientConfig.copiedAnnounce":`客户端配置 JSON 已复制到剪贴板。`,"api.clientConfig.copyFailed":`无法复制客户端配置 JSON。`,"api.clientConfig.downloadedAnnounce":`已下载 {filename}。目前还没有任何改动,请自行将其合并到 {destination}。`,"api.clientConfig.whereDisclosure":`该文件应放在哪里`,"api.clientConfig.whereBody":`上面的路径是全局配置位置。工作目录中的项目级配置文件优先级更高;密钥由配置中指定的环境变量读取,不会写入该文件。`,"api.keysLoadFailed":`无法加载 API 密钥。`,"api.createFailed":`无法创建 API 密钥。`,"api.deleteFailed":`无法删除 API 密钥。`,"api.auth.endpoint":`端点`,"api.auth.required":`必需`,"api.auth.accepted":`可用`,"api.auth.rejected":`不接受`,"api.auth.testProtocol":`测试 {protocol}`,"api.auth.testNeedsFreshKey":`要运行带认证的测试,请先生成密钥,并让一次性显示的值保留在屏幕上。`,"api.key.name":`密钥名称`,"api.key.rename":`重命名`,"api.key.saveName":`保存名称`,"api.key.renaming":`保存中…`,"api.key.renameFailed":`无法重命名密钥,已保留你输入的内容。`,"api.key.deleting":`删除中…`,"api.key.copyFailed":`无法复制密钥。关闭此面板前请手动选中并复制。`,"api.attribution.title":`按密钥统计的用量`,"api.attribution.requests7d":`最近 7 天请求数`,"api.attribution.totalRequests":`已归属请求总数`,"api.attribution.totalRequestsAvailable":`可用历史中的请求`,"api.attribution.sinceAvailable":`可用归属记录起始时间`,"api.attribution.lastUsed":`最近使用`,"api.attribution.since":`统计起始`,"api.attribution.neverUsed":`统计开始后未使用`,"api.attribution.unavailable":`暂无用量`,"api.attribution.unavailableDetail":`尚未归属任何用量。统计开始之前的请求无法追溯归属。`,"api.attribution.ambiguous":`两个密钥共用同一个 ID,无法判断用量属于哪一个。请在配置文件中为每个密钥设置唯一 ID。`,"api.attribution.railAmbiguous":`ID 重复`,"nav.claude":`Claude`,"claude.subtitle":`在 Claude Code 中使用 GPT、Gemini 等其他模型。`,"claude.enabledLabel":`Claude 连接`,"claude.enabledHint":`关闭后 Claude Code 无法使用此代理。`,"claude.authMode":`认证模式`,"claude.authModeHint":`Subscription 需要 Claude 账户,Proxy 无需 Anthropic 账户即可使用`,"claude.authModeSubscription":`Subscription(Claude 账户)`,"claude.authModeProxy":`Proxy(无需账户)`,"claude.authModeAuto":`自动(检测 Claude 认证)`,"claude.effectiveMode.label":`下次启动生效`,"claude.effectiveMode.manual":`手动:{mode}`,"claude.effectiveMode.autoPresent":`自动:订阅 — 已通过 {source} 找到 Claude 认证`,"claude.effectiveMode.autoAbsent":`自动:代理模式 — 未找到 Claude 认证`,"claude.effectiveMode.autoUnknown":`自动:订阅 — 无法确认认证`,"claude.effectiveMode.admissionKey":`此代理的 API 密钥仍会发送。`,"claude.authSource.claude-json-oauth":`Claude 账户`,"claude.authSource.claude-credentials-file":`凭据文件`,"claude.authSource.macos-keychain":`macOS 钥匙串`,"claude.authSource.exported-env":`环境变量`,"claude.authSource.unknown":`检测到的凭据`,"claude.systemEnv":`自动连接`,"claude.systemEnvDesc":`开启后,在任意终端运行 claude 会自动通过代理。`,"claude.systemEnvUnsupported":`自动连接仅在 macOS 上可用。在此系统上,请使用 {cmd} 启动 Claude。`,"claude.systemEnvWarn":`⚠ 需要完全退出并重新打开终端应用才能生效。不推荐使用。`,"claude.fastMode":`Fast Mode (OpenAI)`,"claude.fastModeDesc":`控制 OpenAI 模型的推理速度。ON = 优先级(更快)。OFF = 默认速度。Auto = 透传客户端设置。`,"claude.fastAuto":`Auto`,"claude.fastOn":`ON`,"claude.fastOff":`OFF`,"claude.autoContext":`自动利用大上下文`,"claude.autoContextDesc":`决定 1M 标记的范围。开:所有超过 20 万 token 的模型(GPT 系列等)都有大上下文条目;关:仅真正的 1M 模型有。`,"claude.autoContextInert":`配置文件中存在旧式上下文大小值(maxContextTokens),此功能暂不生效。删除该值即可恢复。`,"claude.autoCompactWindow":`自动摘要触发点`,"claude.autoCompactDefault":`350k(默认)`,"claude.autoCompactWindowDesc":`对话达到该点时自动摘要旧内容。不会超过各模型自身上限,因此 200k 模型不受影响。`,"claude.autoCompactWindowWarn":`修改该值可能导致 GPT 模型异常——若超过模型真实上限,会在摘要触发前报错。`,"claude.injectAgents":`自动注册子代理`,"claude.injectAgentsDesc":`将“子代理”页选中的模型(以及当前默认模型)注册为 Claude Code 可派遣的代理(ocx-*)。从下一个会话开始生效。`,"claude.webSearchSidecar":`网页搜索附属服务覆盖`,"claude.webSearchSidecarHint":`仅对 Claude Code 请求覆盖主网页搜索附属服务设置。`,"claude.visionSidecar":`视觉附属服务覆盖`,"claude.visionSidecarHint":`仅对 Claude Code 请求覆盖主视觉附属服务设置。`,"claude.useMainSetting":`使用主设置`,"claude.sidecarModelPlaceholder":`主设置中的模型`,"claude.quickstart":`开始使用`,"claude.quickstartHint":`{cmd} 通过代理打开 Claude Code。你的 claude.ai 登录保持不变。`,"claude.manualEnv":`手动配置(高级)`,"claude.smallFastModel":`后台辅助模型`,"claude.smallFastModelHint":`Claude Code 用于对话摘要、主题识别等后台工作的模型。子代理的 haiku 别名也使用它。留空 = Claude 默认(Haiku)。`,"claude.smallFastModelAccurateHint":`Claude Code 用于聊天摘要、主题识别等后台工作的模型。子代理的 haiku 别名也使用此模型。`,"claude.smallFastModelUnsetOption":`让 Claude Code 选择(原生模型)`,"claude.smallFastModelNativeWarning":`留空时,OpenCodex 不会设置辅助模型覆盖项。Claude Code 可能使用其原生 Sonnet 模型,并可能产生原生提供方费用。`,"claude.slotUnset":`使用 Claude 默认值`,"claude.modelMap":`模型拦截`,"claude.modelMapHint":`拦截对特定模型的请求并重定向到你指定的模型。默认为空——添加规则后才生效。`,"claude.mapFrom":`原始模型(如 claude-sonnet-4-5)`,"claude.mapTo":`替换为(如 gemini/gemini-3-pro)`,"claude.addMapping":`添加规则`,"claude.removeMapping":`删除规则`,"claude.aliases":`可用模型`,"claude.aliasesHint":`Claude Code 的 /model 菜单中显示的模型列表。`,"claude.aliasProviderOther":`其他`,"claude.loading":`加载中…`,"claude.loadFail":`加载 Claude 设置失败`,"claude.saved":`已保存。`,"claude.saveFailed":`保存失败`,"claude.networkError":`网络错误 — 代理是否在运行?`,"claude.toggleAria":`切换 Claude 连接`,"claude.none":`无`,"common.close":`关闭`,"common.ok":`确定`,"app.logoAria":`opencodex 徽标`,"app.claudeOn":`Claude 开`,"app.claudeOff":`Claude 关`,"usage.dayMon":`一`,"usage.dayWed":`三`,"usage.dayFri":`五`,"usage.heatmap.tooltipTokens":`{tokens} 令牌`,"usage.heatmap.tooltipRequests":`{requests} 请求`,"nav.storage":`存储`,"storage.title":`存储`,"storage.subtitle":`查看 CODEX_HOME 占用。清理不会动到活动会话。`,"storage.loading":`正在扫描存储…`,"storage.empty":`CODEX_HOME 为空或不存在——没有可显示的内容。`,"storage.error":`存储扫描失败。请检查 CODEX_HOME 是否指向有效目录。`,"storage.refresh":`重新扫描`,"storage.rescanned":`扫描完成。`,"storage.card.total":`总大小`,"storage.card.files":`文件数`,"storage.card.home":`CODEX_HOME`,"storage.snapshot.lastScan":`上次扫描`,"storage.snapshot.scanning":`扫描中…`,"storage.snapshot.unavailable":`尚无扫描。`,"storage.cleanupCard.title":`释放空间`,"storage.cleanupCard.tabs":`清理选项`,"storage.cleanupCard.tab.policy":`策略`,"storage.cleanupCard.tab.quarantine":`隔离区`,"storage.cleanup.noArchives":`没有可清理的归档会话。`,"storage.section.buckets":`分类`,"storage.section.largest":`最大文件`,"storage.workspace.overview":`概览`,"storage.workspace.selectBucket":`从列表中选择一个存储桶以查看明细。`,"storage.col.bucket":`分类`,"storage.col.size":`大小`,"storage.col.files":`文件`,"storage.col.oldest":`最旧`,"storage.col.newest":`最新`,"storage.col.rows":`数据库行数`,"storage.rows.unknown":`未知(已锁定)`,"storage.bucket.sessions":`活动会话`,"storage.bucket.archived_sessions":`已归档会话`,"storage.bucket.logs_db":`日志数据库`,"storage.bucket.state_db":`状态数据库`,"storage.bucket.attachments":`附件`,"storage.bucket.deletion_manifests":`删除清单`,"storage.bucket.other":`其他`,"storage.cleanup.title":`归档清理`,"storage.cleanup.help":`按百分比移除最旧的归档会话。不会触碰活动会话。默认隔离——文件移至 CODEX_HOME/.trash。`,"storage.cleanup.slider":`最旧归档百分比`,"storage.cleanup.percent":`{percent}%`,"storage.cleanup.preset":`{percent}`,"storage.cleanup.preview":`预览`,"storage.cleanup.confirmTitle":`确认归档清理`,"storage.cleanup.confirmBody":`将处理 {count} 个归档文件(约 {size}),即最旧的 {percent}%。`,"storage.cleanup.moreFiles":`…以及另外 {n} 个`,"storage.cleanup.permanent":`永久删除(跳过隔离)`,"storage.cleanup.permanentWarn":`永久删除无法撤销。`,"storage.cleanup.quarantineNote":`文件会移到 CODEX_HOME 下的 .trash。可在「隔离区」标签页恢复。`,"storage.cleanup.cancel":`取消`,"storage.cleanup.confirmQuarantine":`隔离`,"storage.cleanup.confirmPermanent":`永久删除`,"storage.cleanup.doneQuarantine":`已隔离 {count} 个文件({size})。`,"storage.cleanup.donePermanent":`已永久删除 {count} 个文件({size})。`,"storage.cleanup.previewFailed":`预览失败。`,"storage.cleanup.cleanupFailed":`清理失败。`,"storage.cleanup.err.codex_busy":`Codex 正在使用 state.sqlite — 请退出 Codex 后重试。`,"storage.cleanup.err.stale_preview":`预览后归档文件已变化 — 请重新预览。`,"storage.cleanup.err.restore_pending_overlap":`所选归档与未完成的隔离区恢复重叠 — 请先完成或重试恢复。`,"storage.cleanup.err.referenced_history":`所选归档仍被 fork 或分页历史引用。`,"storage.cleanup.err.invalid_digest":`预览摘要缺失或无效。`,"storage.cleanup.err.invalid_mode":`模式必须是 quarantine 或 permanent。`,"storage.cleanup.err.fs_failed":`文件系统清理失败。部分更改可能已生效 — 请检查 CODEX_HOME/.trash 及显示的恢复路径。`,"storage.cleanup.err.fs_failed_trash":`文件系统清理失败。部分更改可能已生效 — 请在 {trashDir} 和 manifest.json 中查找可恢复文件。`,"storage.cleanup.err.db_reconcile_failed":`无法更新 Codex 状态数据库。`,"storage.cleanup.err.cleanup_failed":`清理失败。`,"storage.trash.title":`隔离区`,"storage.trash.help":`已移至 CODEX_HOME/.trash 的归档会话。恢复会把 JSONL 与线程行写回。`,"storage.trash.empty":`没有隔离条目。`,"storage.trash.loading":`正在加载隔离区…`,"storage.trash.col.when":`隔离时间`,"storage.trash.col.files":`文件`,"storage.trash.col.size":`大小`,"storage.trash.col.mode":`模式`,"storage.trash.col.id":`条目`,"storage.trash.restore":`恢复`,"storage.trash.confirmTitle":`恢复隔离条目?`,"storage.trash.confirmBody":`将 {count} 个文件(约 {size})从 {id} 恢复到归档会话。`,"storage.trash.cancel":`取消`,"storage.trash.confirmRestore":`恢复`,"storage.trash.done":`已恢复 {count} 个文件({size})。`,"storage.trash.restoreFailed":`恢复失败。`,"storage.trash.listFailed":`无法列出隔离条目。`,"storage.trash.mode.quarantine":`隔离`,"storage.trash.mode.permanent":`永久(未完成)`,"storage.trash.err.codex_busy":`Codex 正在使用 state.sqlite — 请退出 Codex 后重试。`,"storage.trash.err.invalid_trash":`隔离条目 ID 缺失或无效。`,"storage.trash.err.missing_trash":`未找到隔离条目。`,"storage.trash.err.dest_exists":`恢复目标已存在 — 请删除或重命名归档文件后重试。`,"storage.trash.err.fs_failed":`文件系统恢复失败。部分文件可能已恢复 — 请检查 archived_sessions 与 .trash。`,"storage.trash.err.storage_mutation_busy":`另一项存储清理或恢复正在进行 — 请稍后再试。`,"storage.trash.err.db_reconcile_failed":`无法恢复 Codex 状态数据库行。`,"storage.trash.err.restore_failed":`恢复失败。`,"storage.trash.err.restore_worker_timeout":`恢复耗时过长(超过 10 分钟)已停止。`,"storage.trash.err.restore_worker_aborted":`关闭过程中恢复已取消。`,"storage.trash.err.restore_worker_failed":`恢复 worker 崩溃或意外失败。`,"storage.policy.title":`自动清理策略`,"storage.policy.help":`当归档大小超过阈值时可选批量清理。默认关闭——不会自动启用。`,"storage.policy.loading":`正在加载策略…`,"storage.policy.loadFailed":`无法加载清理策略。`,"storage.policy.saveFailed":`无法保存清理策略。`,"storage.policy.runFailed":`策略运行失败。`,"storage.policy.alreadyRunning":`清理策略已在运行中。`,"storage.policy.invalid":`策略值无效。`,"storage.policy.enabled":`启用自动清理`,"storage.policy.enabledHint":`默认关闭。启用后仅按所选计划(或立即运行)执行。`,"storage.policy.threshold":`当归档大小超过(GiB)`,"storage.policy.trigger":`触发条件`,"storage.policy.target":`清理目标`,"storage.policy.targetPercent":`删除最旧归档(%)`,"storage.policy.targetReduce":`将归档缩小至(GiB)`,"storage.policy.thresholdInc":`提高阈值`,"storage.policy.thresholdDec":`降低阈值`,"storage.policy.percentInc":`提高百分比`,"storage.policy.percentDec":`降低百分比`,"storage.policy.reduceInc":`提高缩减目标`,"storage.policy.reduceDec":`降低缩减目标`,"storage.policy.schedule":`计划`,"storage.policy.schedule.manual":`仅手动`,"storage.policy.schedule.startup":`代理启动时`,"storage.policy.schedule.daily":`每天`,"storage.policy.schedule.weekly":`每周`,"storage.policy.mode":`删除模式`,"storage.policy.mode.quarantine":`隔离(默认)`,"storage.policy.mode.permanent":`永久删除`,"storage.policy.permanentWarn":`永久模式无法撤销。不确定时请使用隔离。`,"storage.policy.lastRun":`上次运行`,"storage.policy.lastRunDetail":`已移除 {count} · 释放 {size}`,"storage.policy.nextRun":`下次运行`,"storage.policy.never":`从未`,"storage.policy.save":`保存`,"storage.policy.runNow":`立即运行`,"storage.policy.running":`运行中…`,"storage.policy.saved":`策略已保存。`,"storage.policy.skippedDisabled":`策略已禁用 — 请先启用。`,"storage.policy.skippedUnder":`归档大小低于阈值 — 无需操作。`,"storage.policy.skippedEmpty":`没有匹配目标的归档候选项。`,"storage.policy.doneQuarantine":`策略已隔离 {count} 个文件({size})。`,"storage.policy.donePermanent":`策略已永久删除 {count} 个文件({size})。`,"modal.back":`返回`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`自定义提供方`,"modal.failedStatus":`失败 ({status})`,"modal.loginError":`登录错误:{error}`,"modal.badge.codexLogin":`Codex 登录`,"modal.badge.local":`本地`,"modal.badge.apiKey":`API 密钥`,"modal.badge.direct":`Direct`,"modal.badge.pool":`账户池`,"modal.badge.free":`免费`,"modal.invalidPreset":`此内置提供方预设不完整。请重启代理后重试。`,"modal.freeTierTitle":`免费层级`,"modal.freeTierDefault":`无需 API 密钥,开箱即用。`,"modal.tab.accounts":`账户`,"modal.tab.free":`免费`,"modal.tab.paid":`付费`,"modal.accountsHint":`在此登录 ChatGPT/Codex、OAuth 与 API 密钥账户。OpenAI 为内置提供商 — 请登录,无需再次添加。`,"modal.accountsCodexAuthLink":`Codex 认证`,"modal.notListed":`没有你要的提供商?添加自定义`,"modal.catalogLoading":`正在加载目录…`,"modal.accountLogin":`登录`,"modal.accountLogout":`退出登录`,"modal.accountAdd":`添加账户`,"modal.accountManage":`管理`,"modal.accountCodexPool":`ChatGPT 账户池`,"modal.accountLoggedIn":`已登录`,"modal.accountLoggedOut":`未登录`,"quota.fiveHourLimit":`5 小时限额`,"quota.weeklyLimit":`每周限额`,"quota.monthlyLimit":`30 天限额`,"quota.monthlyCredits":`月度额度`,"quota.requestWindow":`请求窗口`,"quota.grokBuild":`GrokBuild`,"quota.cursorFirstParty":`官方模型`,"quota.cursorApiUsage":`API 用量`,"quota.totalSubscriptionCredits":`订阅总额度`,"quota.usedPercent":`已用 {pct}%`,"quota.limitReached":`已达上限`,"quota.resetsToday":`今天 {time} 重置`,"quota.resetsTomorrow":`明天 {time} 重置`,"quota.resetsAt":`{when} 重置`,"quota.resetsRelativeMinutes":`{n} 分钟后重置`,"quota.resetsRelativeHours":`{n} 小时后重置`,"pws.status.ready":`就绪`,"pws.status.needsSetup":`需要设置`,"pws.status.needsAttention":`需要关注`,"pws.auth.chatgptPassthrough":`ChatGPT 直通`,"pws.auth.noKey":`无需密钥`,"pws.freeTitle":`免费定价(可能仍需密钥)`,"pws.localTitle":`本地运行时`,"pws.modelCountOne":`1 个模型`,"pws.modelCount":`{count} 个模型`,"pws.rail.suffixDefault":` · 默认`,"pws.rail.suffixLocal":` · 本地`,"pws.rail.suffixFree":` · 免费`,"pws.rail.selectAria":`选择 {name} — {status}{suffix}`,"pws.searchPlaceholder":`搜索提供商…`,"pws.filterAria":`筛选提供商`,"pws.providerFiltersAria":`提供商筛选`,"pws.filters":`筛选`,"pws.filterStatus":`状态`,"pws.pricing":`定价`,"pws.paid":`付费`,"pws.filterType":`类型`,"pws.type.cloud":`云端`,"pws.type.local":`本地`,"pws.type.selfHosted":`自托管`,"pws.type.login":`登录`,"pws.sort":`排序`,"pws.sortProvidersAria":`排序提供商`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`免费优先`,"pws.sort.paidFree":`付费优先`,"pws.sort.accountsFirst":`账户优先`,"pws.resetAll":`全部重置`,"pws.providerList":`提供商列表`,"pws.providersAria":`提供商`,"pws.groupReady":`就绪 ({count})`,"pws.groupNeedsSetup":`需要设置 ({count})`,"pws.groupDisabled":`已禁用 ({count})`,"pws.noSearchResults":`没有匹配搜索的提供商。`,"pws.noMatchFilters":`没有匹配筛选的提供商。`,"pws.noProvidersConfigured":`尚未配置提供商。`,"pws.workspaceMainAria":`提供商详情`,"pws.detailComingSoon":`详情视图即将推出 — 请在经典视图中管理。`,"pws.selectPrompt":`从列表中选择一个提供商。`,"pws.connectFirst":`连接你的第一个提供商`,"pws.empty.browseFree":`浏览免费提供商`,"pws.empty.browseFreeDesc":`无需订阅即可开始`,"pws.empty.connectAccount":`连接账户`,"pws.empty.connectAccountDesc":`使用 ChatGPT 或提供商登录`,"pws.empty.addEndpoint":`添加端点`,"pws.empty.addEndpointDesc":`自定义 base URL 和 API 密钥`,"pws.tab.overview":`概览`,"pws.tab.models":`模型`,"pws.tab.usage":`用量`,"pws.tab.accounts":`账户`,"pws.tab.settings":`设置`,"pws.connection":`连接`,"pws.status.connected":`已连接`,"pws.attentionTitle":`需要关注`,"pws.attention.reauth":`当前账号需要重新认证`,"pws.attention.reauthForward":`当前 Codex 账号需要重新认证 — 请到“账号”中处理`,"pws.attention.missingCredentials":`缺少凭证`,"pws.cell.auth":`认证`,"pws.cell.note":`备注`,"pws.cell.defaultModel":`默认模型`,"pws.statsAria":`提供商统计`,"pws.statsTitle":`统计`,"pws.stats.totalRequests":`请求数(30 天)`,"pws.stats.totalTokens":`令牌(30 天)`,"pws.stats.quotaUpdated":`配额更新`,"pws.stats.quotaTracked":`在用量标签查看限额。`,"pws.stats.source":`来源`,"pws.usageLast30d":`用量(最近 30 天)`,"pws.estimatedCost":`预估费用`,"pws.costDisclaimer":`基于 API 公示价格的预估值,非实际计费金额。`,"pws.modelBreakdown":`模型用量明细`,"pws.col.model":`模型`,"pws.col.cost":`预估费用`,"pws.col.tokens":`Token`,"pws.col.requests":`请求`,"pws.col.share":`占比`,"pws.tokenInput":`输入`,"pws.tokenOutput":`输出`,"pws.metricRequests":`请求`,"pws.metricTokens":`令牌`,"pws.usageUnavailable":`尚无用量记录。`,"pws.rateLimits":`速率限制`,"pws.quotaUnavailable":`此提供商暂无配额数据。`,"pws.accountQuotaUnavailable":`速率限制数据暂时不可用;若有上次已知值则继续显示。`,"pws.accountPlan":`账户套餐`,"pws.accountPlanOnly":`{plan} — 此账户没有月度额度池(Grok CLI OAuth 不暴露网页端任务次数配额)。`,"pws.selected":`已选择`,"pws.copyModelId":`复制 ID`,"pws.modelCopied":`已复制!`,"pws.modelsAvailable":`{count} 个可用`,"pws.modelSearchPlaceholder":`筛选模型…`,"pws.modelsLoading":`正在加载模型…`,"pws.modelsLoadFailed":`无法加载模型。`,"pws.modelsNeedsReauth":`需要重新登录后才能获取实时模型列表。当前显示已配置的模型。`,"pws.modelsConfiguredFallback":`显示已配置的模型(实时发现不可用)。`,"pws.modelsTruncated":`显示 {total} 个模型中的前 {shown} 个。使用筛选以缩小列表。`,"pws.retry":`重试`,"pws.noModels":`未发现此提供商的模型。`,"pws.noModelMatch":`没有匹配筛选的模型。`,"pws.adapterBaseRequired":`适配器和基本 URL 为必填项。`,"pws.addAccount":`添加账户`,"pws.addKey":`添加 API 密钥`,"pws.apiKeys":`API 密钥`,"pws.authMode":`认证方式`,"pws.availableAccounts":`可用账户`,"pws.accountOrdinal":`账户 {count}`,"pws.accountsLoading":`正在加载账户…`,"pws.accountsLoadFailed":`无法加载账户。`,"pws.retryAccounts":`重试`,"pws.noAccounts":`尚未连接任何账户。`,"pws.accountSwitching":`切换中…`,"pws.accountCurrent":`当前账户`,"pws.defaultModelNone":`无(使用提供商默认值)`,"pws.discardSettings":`放弃`,"pws.jsonEditorDesc":`直接编辑提供商 JSON 配置。更改将立即保存。`,"pws.jsonEditorTitle":`JSON 编辑器 — {name}`,"pws.jsonRestore":`恢复`,"pws.jsonSave":`保存`,"pws.loggedInTitle":`已登录`,"pws.notLoggedInTitle":`未登录`,"pws.note":`备注`,"pws.allowPrivateNetwork":`允许本地/私有网络`,"pws.liveModels":`从提供方发现模型`,"pws.liveModelsDesc":`获取提供方的实时模型目录。关闭后仅使用已配置的静态模型。`,"pws.optionalPlaceholder":`可选`,"pws.providerId":`提供商 ID`,"pws.reauth":`需要重新认证`,"pws.reauthenticate":`重新认证`,"pws.copyDoctor":`复制 ocx doctor`,"pws.doctorCopied":`已复制`,"pws.healthCooldownHint":`请等到冷却结束。暂时不要探测此账户。`,"pws.doctorCopyUnavailable":`剪贴板不可用`,"pws.healthLabel.rateLimited":`已限速`,"pws.healthLabel.quotaLimited":`配额受限`,"pws.healthLabel.reauthRequired":`需要重新认证`,"pws.healthLabel.refreshFailed":`刷新失败`,"pws.healthLabel.metadataMismatch":`元数据不匹配`,"pws.healthLabel.credentialConflict":`凭证冲突`,"pws.healthSummary.rateLimited":`{provider} {account}:限速至 {until}。在此之前将暂停该账户的路由。`,"pws.healthSummary.quotaLimited":`{provider} {account}:配额限制至 {until}。在此之前将暂停该账户的路由。`,"pws.healthSummary.reauthRequired":`{provider} {account}:需要重新认证。`,"pws.healthSummary.credentialConflict":`{provider} {account}:凭证冲突。`,"pws.healthSummary.metadataMismatch":`{provider} {account}:元数据不匹配。`,"pws.healthSummary.staleCredentials":`{provider} {account}:凭证不完整。`,"pws.removeConfirm":`移除`,"pws.removeConfirmBody":`移除提供商「{name}」?此操作无法撤消。`,"pws.removeDefaultConfirmBody":`移除默认提供方「{name}」?「{defaultProvider}」将成为默认提供方。此操作无法撤消。`,"pws.removeConfirmTitle":`移除提供商`,"pws.saveSettings":`保存`,"pws.saving":`保存中…`,"pws.settingsSaved":`设置已保存。`,"pws.settingsUnsavedBar":`有未保存的更改。`,"pws.unsavedLeaveBody":`有未保存的更改。离开前保存吗?`,"pws.unsavedLeaveTitle":`未保存的更改`,"pws.attentionRequired":`需要关注`,"pws.attentionAria":`{name}:{reason}`,"pws.missingCredentials":`缺少凭证`,"pws.editJsonDesc":`以 JSON 编辑原始代理配置`,"pws.updatesUnavailable":`提供商更新不可用。`,"pws.dashboard.title":`提供商概览`,"pws.dashboard.subtitle":`在一个地方管理所有模型提供商。`,"pws.dashboard.rateLimits":`速率限制`,"pws.dashboard.recentlyUsed":`最近使用`,"pws.dashboard.requests":`{count} 个请求`,"pws.dashboard.checkedAgo":`{time} 前检查`,"pws.dashboard.noQuota":`无配额数据`,"pws.dashboard.noUsage":`暂无使用数据`,"pws.dashboard.noRateLimits":`暂无速率限制数据`,"pws.allProviders":`提供商概览`,"pws.enabledLabel":`已启用`,"pws.testConnection":`测试连接`,"pws.testing":`测试中…`,"pws.connectionOk":`连接成功`,"pws.connectionFailed":`连接失败`,"pws.connectionNotApplicable":`不适用 — 此提供方使用静态模型目录。`,"pws.editSettings":`编辑设置`,"pws.viewUsage":`查看详细用量`,"pws.allSystemsOk":`所有系统正常运行`,"pws.apiKeyConfigured":`API 密钥已配置`,"pws.addApiKey":`添加 API 密钥`,"pws.loggedInAs":`已登录为 {email}`,"pws.notLoggedIn":`未登录`,"pws.passthrough":`Codex 透传`,"pws.notes":`备注`,"pws.notePlaceholder":`添加关于此提供商的备注...`,"pws.noteSaved":`备注已保存`,"pws.authSummary":`认证`,"time.justNow":`刚刚`,"time.notChecked":`未检查`,"time.minutesAgo":`{n} 分钟前`,"time.hoursAgo":`{n} 小时前`,"time.daysAgo":`{n} 天前`,"modal.noMatch":`无匹配。`,"modal.oauthDefaultNote":`使用账户登录 — 无需 API 密钥。`,"modal.oauthComingSoon":`{label} 的 OAuth 登录将在下次更新提供。请先使用 API 密钥。`,"modal.oauthComingSoonShort":`此提供方的 OAuth 登录将在下次更新提供 — 请先使用 API 密钥。`,"modal.useApiKeyInstead":`改用 API 密钥`,"modal.setupGuide":`设置指南`,"modal.setupStep1Prefix":`前往`,"modal.setupDashboardLink":`{label} 控制台`,"modal.setupStep1Suffix":`并复制 API 密钥`,"modal.setupStep2":`粘贴到下方的 API 密钥字段`,"modal.setupStep3":`点击添加提供方 — 模型会自动发现`,"modal.namePlaceholder":`例如 openrouter`,"modal.duplicateWarn":`提供方 "{name}" 已存在,将被覆盖。`,"modal.forwardHintPrefix":`无需密钥 — 代理会转发你的`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`凭据到此提供方。`,"modal.localHint":`不会存储 API 密钥。这会为 Codex 添加 Cursor 的公开模型目录,但在审计完成前,实时 Cursor 传输与原生文件/Shell 执行仍保持禁用。`,"modal.getApiKey":`获取 {label} API 密钥`,"modal.apiKey":`API 密钥`,"modal.apiKeyTransport":`API 密钥请求头`,"modal.apiKeyTransportNative":`x-api-key(Anthropic 原生)`,"modal.apiKeyTransportBearer":`Authorization: Bearer`,"modal.apiKeyPlaceholder":`sk-…(或 $ENV_VAR)`,"modal.defaultModelPlaceholder":`例如 gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.baseUrlPlaceholderError":`Base URL 包含未解析的 {占位符},请替换为实际值。`,"modal.baseUrlPlaceholderHint":`请在添加前将 Base URL 中的 {占位符} 替换为你的实际 Account ID。`,"modal.adding":`正在添加…`,"modal.useOauthLogin":`← 使用 OAuth 登录`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team…`,"codexAuth.resetCreditsAria":`{count} 个重置额度`,"claude.pageTitle":`Claude Code`,"claude.workspace.settings":`设置`,"cws.loading":`正在加载组合…`,"cws.loadFailed":`无法加载组合。`,"cws.saveFailed":`无法保存组合。`,"cws.removeFailed":`无法删除组合。`,"cws.saved":`组合已保存。`,"cws.created":`已创建 {model}。`,"cws.removed":`已删除 combo/{id}。`,"cws.renamed":`已将 {from} 重命名为 {to}。`,"cws.add":`添加组合`,"cws.addTitle":`添加组合`,"cws.addSubtitle":`创建跨提供方的虚拟模型,并指定客户端实际请求的模型名称。`,"cws.create":`创建组合`,"cws.railAria":`组合列表`,"cws.searchPlaceholder":`搜索组合或目标…`,"cws.noSearchResults":`没有匹配的组合。`,"cws.group.failover":`故障转移`,"cws.group.roundRobin":`轮询`,"cws.targetCount":`{count} 个目标`,"cws.targetCountOne":`1 个目标`,"cws.overviewTitle":`组合`,"cws.overviewBlurb":`可在提供方/模型目标间故障转移,或采用确定性平滑加权轮询的虚拟模型。`,"cws.count.total":`总计`,"cws.count.failover":`故障转移`,"cws.count.roundRobin":`轮询`,"cws.howTitle":`工作原理`,"cws.howBody":`在 Codex 中请求组合的公开模型名称;未设置时默认使用 combo/<id>。OpenCodex 仅在可重试的上游错误时切换目标。若没有可用目标,请求会直接失败,不会回退到全局默认提供方。`,"cws.attentionTitle":`需要关注`,"cws.attention.empty":`未配置目标`,"cws.attention.few":`只有一个目标 — 故障转移无处可跳`,"cws.attention.catalogOmitted":`未出现在模型目录中 — 成员能力不完整或不兼容(缺少上下文窗口/元数据,或模态交集为空)。按别名路由仍可用`,"cws.emptyTitle":`创建第一个组合`,"cws.empty.createDesc":`命名虚拟模型并串联两个或多个后端。`,"cws.backToAll":`返回全部组合`,"cws.allCombos":`全部组合`,"cws.copyModel":`复制 ID`,"cws.copied":`已复制`,"cws.tab.config":`配置`,"cws.tab.about":`关于`,"cws.strategy":`策略`,"cws.strategy.failover":`故障转移`,"cws.strategy.roundRobin":`轮询`,"cws.strategy.failoverHint":`按顺序尝试目标。若出现可重试错误(限流、故障、订阅门控),则跳到下一个。`,"cws.strategy.roundRobinHint":`按权重确定性地分配流量。将所选目标保留一批成功请求后,再推进到下一个目标。`,"cws.field.id":`组合 ID`,"cws.field.idHint":`客户端将请求 {model}`,"cws.field.idInternalHint":`组合的内部 ID,创建后仍可修改。`,"cws.field.idHintEdit":`修改 ID 即重命名组合。客户端将请求 {model}。`,"cws.field.alias":`公开模型名称`,"cws.field.aliasPlaceholder":`deepseek-v4-flash 或 vendor/model`,"cws.field.aliasHint":`可选。可填无前缀裸名称、自定义前缀(如 vendor/model),或留空使用 combo/<id>。`,"cws.field.stickyLimit":`轮换前的粘性成功次数`,"cws.field.stickyLimitHint":`加权选择器推进前,将所选目标保留这么多次成功请求。`,"cws.field.defaultEffort":`默认推理级别`,"cws.field.defaultEffortNone":`无(使用目标默认)`,"cws.field.defaultEffortHint":`仅在客户端未指定推理级别时使用。选项为所选目标已公布努力级别的交集。`,"cws.field.defaultEffortUnsupported":`该级别不在目标的公共阶梯中 — 请求时会被忽略或就近映射。`,"cws.field.defaultEffortUnsupportedOption":`不在交集中`,"cws.targets":`目标`,"cws.targets.failoverHint":`顺序很重要 — 第一个为主。`,"cws.targets.roundRobinHint":`权重控制确定性的相对选择;顺序用于打破轮换环中的平局。`,"cws.target.provider":`提供方`,"cws.target.model":`模型`,"cws.target.weight":`权重`,"cws.target.pickProvider":`选择提供方…`,"cws.target.pickProviderFirst":`请先选择提供方…`,"cws.target.pickModel":`选择模型…`,"cws.target.noModels":`该提供方没有模型`,"cws.target.modelPlaceholder":`模型 ID`,"cws.target.add":`添加目标`,"cws.target.drag":`拖动以重新排序`,"cws.target.moveUp":`上移`,"cws.target.moveDown":`下移`,"cws.aboutTitle":`运行时`,"cws.aboutBody":`失败目标会短暂冷却并遵循 Retry-After。无效请求与上下文错误不会切换。每个目标按自身能力调整推理级别;所有目标耗尽时直接失败。日志与用量会保留有序的实际尝试及每次尝试的用量。`,"cws.removeConfirmTitle":`删除 {model}?`,"cws.removeConfirmDesc":`从配置与 Codex 目录移除该虚拟模型,不会删除任何提供方。`,"cws.unsavedTitle":`未保存的更改`,"cws.unsavedDesc":`丢弃对此组合的编辑并继续?`,"cws.keepEditing":`继续编辑`,"cws.err.missingId":`需要组合 ID。`,"cws.err.invalidId":`ID 须以字母或数字开头,仅含字母、数字、点、下划线或连字符(最多 64)。`,"cws.err.duplicateId":`已存在相同 ID 的组合。`,"cws.err.invalidAlias":`别名仅可包含字母、数字、点、下划线或连字符,最多一个“/”分段。`,"cws.err.aliasReservedNamespace":`别名不得使用保留的“combo/”命名空间。`,"cws.err.aliasNativeFamily":`不允许使用 OpenAI 原生家族裸别名(gpt-*、o1-*、o3-*、o4-*、codex-*)。`,"cws.err.duplicateAlias":`另一个组合已使用该别名。`,"cws.err.noTargets":`至少添加一个目标。`,"cws.err.incompleteTarget":`每个目标都需要提供方和模型。`,"cws.target.disabled":`{name}(已禁用)`,"cws.err.reservedNamespace":`创建组合前,请先重命名名为 combo 的实体提供方。`,"cws.err.providerCollision":`组合 ID 与已配置的提供方名称冲突。`,"cws.err.unknownProvider":`每个目标都必须使用已配置的提供方。`,"cws.err.duplicateTarget":`同一提供方/模型目标只能出现一次。`,"cws.err.invalidStickyLimit":`粘性成功次数必须是 1 到 100 的整数。`,"cws.err.invalidWeight":`每个轮询权重必须是 1 到 10000 的整数。`,"cws.err.noEnabledTarget":`至少一个目标必须使用已启用的提供方。`,"claude.tabsLabel":`Claude 客户端`,"claude.tabCode":`Code`,"claude.tabDesktop":`Desktop`,"claudeDesktop.title":`Claude Desktop`,"claudeDesktop.subtitle":`将每个 Claude 模型系列路由到端口 {port} 上的可用模型。`,"claudeDesktop.importJson":`导入 JSON`,"claudeDesktop.exportJson":`导出 JSON`,"claudeDesktop.loading":`正在加载 Claude Desktop 配置…`,"claudeDesktop.loadFail":`无法加载 Claude Desktop 配置。`,"claudeDesktop.retry":`重试`,"claudeDesktop.saveFailed":`无法保存 Claude Desktop 配置。`,"claudeDesktop.applyFailed":`配置已保存,但无法应用。`,"claudeDesktop.updateFailed":`Claude Desktop 更新失败。`,"claudeDesktop.savedApplied":`配置已保存并应用到 Claude Desktop。`,"claudeDesktop.savedAppliedAnnounce":`Claude Desktop 配置已保存并应用。`,"claudeDesktop.saved":`配置已保存。`,"claudeDesktop.savedAnnounce":`Claude Desktop 配置已保存。`,"claudeDesktop.exported":`配置已导出为 JSON。`,"claudeDesktop.importExpected":`需要版本 1 的 Claude Desktop 配置。`,"claudeDesktop.importReady":`JSON 已导入。请检查草稿,然后保存并应用。`,"claudeDesktop.importedAnnounce":`配置 JSON 已导入。可检查尚未保存的更改。`,"claudeDesktop.importInvalid":`所选文件不是有效配置。`,"claudeDesktop.importFailed":`导入失败。{error}`,"claudeDesktop.moved":`已将 {route} 移动到 {family}。`,"claudeDesktop.unsaved":`有未保存的更改`,"claudeDesktop.upToDate":`配置已是最新`,"claudeDesktop.saving":`正在保存…`,"claudeDesktop.applying":`正在应用…`,"claudeDesktop.saveApply":`保存并应用`,"claudeDesktop.emptyTitle":`没有可用模型`,"claudeDesktop.emptyHint":`请添加或启用提供商,然后返回分配 Claude Desktop 路由。`,"claudeDesktop.assignmentsLabel":`Claude 模型系列分配`,"claudeDesktop.family.opus":`Opus`,"claudeDesktop.family.fable":`Fable`,"claudeDesktop.family.sonnet":`Sonnet`,"claudeDesktop.family.haiku":`Haiku`,"claudeDesktop.modelCountOne":`{count} 个模型`,"claudeDesktop.modelCountMany":`{count} 个模型`,"claudeDesktop.chooseDefault":`选择默认模型`,"claudeDesktop.temporaryDefault":`临时默认模型`,"claudeDesktop.laneEmpty":`将模型拖到这里,或使用移动控件。`,"claudeDesktop.laneNoMatch":`该系列中没有与搜索匹配的模型。`,"nav.grok":`Grok`,"grok.title":`Grok Build`,"grok.subtitle":`xAI 账号额度与 Grok Build 模型配置。`,"grok.loading":`正在加载 Grok 状态…`,"grok.loadFail":`无法读取 Grok 配置。`,"grok.notConfiguredTitle":`Grok Build 尚未接入`,"grok.notConfiguredHint":`安装 Grok 后重启代理,opencodex 会把托管块写入:`,"grok.endpoint":`端点`,"grok.colModel":`模型`,"grok.colAlias":`Grok 别名`,"grok.colContext":`上下文`,"grok.groupNative":`原生模型`,"grok.groupRouted":`路由模型`,"grok.enabledCount":`已注册 {on}/{total}`,"grok.saved":`选择已保存。`,"grok.savedApplied":`选择已保存并写入 Grok 配置。`,"grok.saveFailed":`无法保存 Grok 选择。`,"grok.applyFailed":`选择已保存,但无法更新 Grok 配置。`,"grok.applySkipped":`选择已保存,Grok 配置未更改。`,"grok.saveApply":`保存并应用`,"grok.saving":`保存中…`,"grok.applying":`应用中…`,"grok.unsaved":`未保存的更改`,"grok.upToDate":`选择已是最新`,"grok.toggleModel":`将 {id} 注册到 Grok`,"claudeDesktop.available":`可用`,"claudeDesktop.defaultBadge":`默认`,"claudeDesktop.supports1m":`1M`,"claudeDesktop.unavailable":`不可用`,"claudeDesktop.contextM":`{n}M 上下文`,"claudeDesktop.contextK":`{n}k 上下文`,"claudeDesktop.contextUnknown":`上下文未知`,"claudeDesktop.alias":`别名`,"claudeDesktop.useAsDefault":`设为 {family} 默认模型`,"claudeDesktop.moveTo":`移动到`,"claudeDesktop.move":`移动`,"claudeDesktop.status.applied":`已应用到 Desktop`,"claudeDesktop.status.stale":`配置已更改 — 需重新应用`,"claudeDesktop.status.notApplied":`未应用`,"claudeDesktop.status.notActiveProfile":`Desktop 正在使用其他配置 — 请重新应用`,"claudeDesktop.health.lastRequest":`最后请求`,"claudeDesktop.health.stats":`{count} 请求 / {errors} 错误`,"claudeDesktop.effort.supported":`effort`,"claudeDesktop.effort.displayOnly":`effort (仅显示)`,"nav.cloud":`云同步`,"cloud.subtitle":`通过 Microsoft OneDrive 备份/恢复 ~/.opencodex(设备码 OAuth 登录)。`,"cloud.statusTitle":`状态`,"cloud.statusHint":`本机设备标识与最近一次 OneDrive 推送/拉取。`,"cloud.loggedIn":`Microsoft 账号`,"cloud.notLoggedIn":`未登录`,"cloud.account":`账号`,"cloud.device":`本机`,"cloud.remote":`云端目录`,"cloud.lastSync":`上次同步`,"cloud.never":`从未`,"cloud.remoteManifest":`云端快照`,"cloud.hasVault":`含加密保险库`,"cloud.remoteError":`云端检查`,"cloud.clientIdTitle":`Azure 应用 client ID`,"cloud.clientIdHint":`在 Azure AD 创建公共客户端应用。浏览器登录要求:身份验证 → 添加平台「移动和桌面应用程序」,重定向 URI 必须与下方显示的地址完全一致。另加 Graph 委托权限 offline_access、User.Read、Files.ReadWrite。`,"cloud.clientIdSaved":`Client ID 已保存。`,"cloud.clientIdSecretSaved":`Client ID 与 client secret 已保存。`,"cloud.clientSecret":`Client secret(可选)`,"cloud.clientSecretPlaceholder":`仅当 Azure 要求 client_secret 时填写`,"cloud.clientSecretSet":`已保存 secret(留空再保存可清除;输入新值可覆盖)`,"cloud.clientSecretHint":`推荐:Azure → 身份验证 → 允许公共客户端流 = 是,则无需 secret。若是 Web 应用,到「证书和密码」新建客户端密码,粘贴到这里后点保存。`,"cloud.azurePortal":`Azure 应用注册`,"cloud.azureSteps":`允许公共客户端流=是(推荐)或填 secret · 重定向 URI 与下方一致 · Graph 权限`,"cloud.redirectUriTitle":`请把这个地址原样登记到 Azure`,"cloud.redirectUriHint":`身份验证 → 添加平台 → 移动和桌面应用程序 → 自定义重定向 URI(必须完全一致,含端口):`,"cloud.redirectUriWhere":`不要填 #cloud、不要用 10100、不要改成 https。保存后等约 1 分钟再登录。`,"cloud.loginTitle":`登录 Microsoft`,"cloud.loginHint":`先确保 Azure 已登记上方的重定向 URI,再点浏览器登录。`,"cloud.login":`使用 Microsoft 登录`,"cloud.loginDevice":`设备码登录(高级)`,"cloud.logout":`退出登录`,"cloud.loginOk":`已登录为 {account}`,"cloud.loginFailed":`Microsoft 登录失败`,"cloud.logoutOk":`已退出 OneDrive。`,"cloud.browserLoginTitle":`浏览器登录`,"cloud.browserLoginHint":`在打开的标签页完成 Microsoft 登录,然后回到此页。`,"cloud.openAuthPage":`打开登录页`,"cloud.redirectUri":`本机回调`,"cloud.deviceCodeTitle":`设备码`,"cloud.deviceCodeHint":`打开链接,输入下面的代码并批准访问:`,"cloud.waitingAuth":`等待 Microsoft 授权…`,"cloud.transferTitle":`推送 / 拉取`,"cloud.transferHint":`推送会把配置上传到 OneDrive;拉取会用云端快照覆盖本机 ~/.opencodex。`,"cloud.passphrase":`保险库口令`,"cloud.passphrasePlaceholder":`至少 8 位(用于加密 oauth 令牌)`,"cloud.passphraseShort":`启用保险库时口令至少 8 个字符。`,"cloud.includeVault":`包含加密令牌保险库(oauth.json / auth.json)`,"cloud.includeUsage":`包含 usage / logs 数据库(体积更大)`,"cloud.push":`推送到 OneDrive`,"cloud.pull":`从 OneDrive 拉取`,"cloud.pushOk":`已推送:{files}`,"cloud.pullOk":`已拉取:{files}`,"cloud.pullConfirm":`拉取将用 OneDrive 上的内容覆盖本机 OpenCodex 配置与认证文件。继续?`,"cloud.securityNote":`明文配置保存在 OneDrive/OpenCodex/sync/。只有设置了口令时,OAuth 令牌才会进入 AES-256-GCM 保险库。请勿分享 client secret 或保险库口令。`,"dash.injectionManage":`打开设置`,"sub.settings":`设置`,"sub.sections":`子代理分区`,"sub.delegation.model":`优先调用的模型`,"sub.delegation.modelHint":`Codex 分派工作时最先调用的模型。上面的推荐是可调用的名单,这里选的是其中第一顺位。`,"dash.syncModelsHint":`按已连接的提供商重写 Codex 的模型目录。`,"dash.syncRun":`立即同步`,"nav.pi":`Pi`,"pi.title":`Pi`,"pi.subtitle":`管理 Pi 的模型、设置、插件包与扩展。models.json 仅写入 opencodex 提供商区块。`,"pi.loading":`正在加载 Pi 状态…`,"pi.loadFail":`无法读取 Pi 状态。`,"pi.actionOk":`完成。`,"pi.actionFail":`操作失败。`,"pi.applySkipped":`Pi 应用已跳过(策略限制或未安装)。`,"pi.statusTitle":`安装状态`,"pi.binary":`pi 可执行文件`,"pi.agentDir":`Agent 目录`,"pi.modelsFile":`models.json`,"pi.missing":`未找到`,"pi.modelsTitle":`模型(providers.opencodex)`,"pi.modelsHint":`Apply 只会根据当前目录写入 providers.opencodex,其它 provider 保持不动。`,"pi.apply":`应用模型`,"pi.applying":`正在应用…`,"pi.applied":`已应用 Pi 模型。`,"pi.remove":`移除 opencodex 区块`,"pi.removing":`正在移除…`,"pi.removed":`已移除 Pi 的 opencodex 提供商。`,"pi.modelsNotPresentTitle":`models.json 中还没有 opencodex`,"pi.modelsNotPresentHint":`点击「应用模型」,把当前目录注册为 providers.opencodex。`,"pi.endpoint":`端点`,"pi.modelCount":`已注册 {count} 个模型`,"pi.moreModels":`…还有 {n} 个`,"pi.settingsTitle":`设置`,"pi.settingsHint":`仅编辑 ~/.pi/agent/settings.json 的常用字段;未知键会保留。`,"pi.saveSettings":`保存设置`,"pi.savingSettings":`正在保存…`,"pi.settingsSaved":`Pi 设置已保存。`,"pi.defaultProvider":`默认提供商`,"pi.defaultModel":`默认模型`,"pi.thinking":`思考级别`,"pi.theme":`主题`,"pi.projectTrust":`项目信任默认值`,"pi.hideThinking":`隐藏思考块`,"pi.quietStartup":`安静启动`,"pi.unset":`(未设置)`,"pi.otherKeys":`另有 {count} 个键未改动`,"pi.packagesTitle":`插件包`,"pi.packagesHint":"安装会在本机执行 `pi install`。插件拥有完整系统权限,安装前请审查来源。","pi.install":`安装`,"pi.installing":`正在安装…`,"pi.packageInstalled":`插件安装完成。`,"pi.packageRemoved":`插件已移除。`,"pi.removePackage":`移除`,"pi.noPackages":`settings.json 中没有插件包。`,"pi.extensionsTitle":`扩展`,"pi.extensionsHint":`自动发现 ~/.pi/agent/extensions,以及 settings 中配置的路径。此处不支持编辑扩展源码。`,"pi.noExtensions":`未找到扩展。`,"pi.cliHint":`CLI:ocx pi status | apply | settings | packages · 启动:ocx pi`,"grok.modelsSection":`Grok Build 模型`,"grok.modelsSectionSub":`选择要出现在 Grok Build 中的 opencodex 模型,然后保存并应用。`,"grok.account.sectionAria":`xAI 账号与额度`,"grok.account.title":`xAI 账号额度`,"grok.account.subtitle":`与 Codex 认证同级:当前 Grok 账号、套餐与用量条,无需再进 Providers。`,"grok.account.refreshQuota":`刷新额度`,"grok.account.refreshing":`刷新中…`,"grok.account.addAccount":`添加账号`,"grok.account.login":`使用 xAI 登录`,"grok.account.loggingIn":`等待登录…`,"grok.account.cancelLogin":`取消登录`,"grok.account.loading":`正在加载账号…`,"grok.account.empty":`还没有 xAI 账号。登录后即可在此查看套餐与额度条。`,"grok.account.loadFail":`无法加载 xAI 账号。`,"grok.account.loginFail":`无法启动 xAI 登录。`,"grok.account.loginOk":`xAI 登录成功。`,"grok.account.loginCancelled":`已取消 xAI 登录。`,"grok.account.select":`选择账号`,"grok.account.switched":`已切换活跃 xAI 账号。`,"grok.account.switchFail":`无法切换 xAI 账号。`,"grok.account.removeConfirm":`从 opencodex 移除此 xAI 账号?`,"grok.account.removeFail":`无法移除账号。`,"grok.account.removed":`账号已移除。`,"grok.account.unnamed":`xAI 账号`,"clients.title":`客户端`,"clients.subtitle":`查看本机各 coding agent 磁盘上实际使用的 Base URL / 模型——在 CC Switch、ocx 注入与启动器叠加时一眼分清走哪条链路。`,"clients.refresh":`刷新`,"clients.loading":`正在加载客户端状态…`,"clients.loadFail":`无法读取客户端状态。`,"clients.proxyTitle":`代理`,"clients.proxyRunning":`代理运行中`,"clients.proxyStopped":`未检测到代理`,"clients.generatedAt":`检测于 {time}`,"clients.readOnlyHint":`只读。本页不会改写客户端配置,也不会显示 API key。`,"clients.tableTitle":`有效客户端路由`,"clients.col.client":`客户端`,"clients.col.verdict":`判定`,"clients.col.baseUrl":`Base URL`,"clients.col.model":`模型`,"clients.col.launcher":`启动器`,"clients.col.switcher":`切换器配置`,"clients.col.details":`详情`,"clients.col.configPaths":`配置路径`,"clients.col.notes":`备注`,"clients.verdict.ocx":`经 ocx`,"clients.verdict.direct":`直连`,"clients.verdict.mixed":`混合`,"clients.verdict.missing":`缺失`,"clients.verdict.unknown":`未知`,"clients.manage":`管理`,"clients.noNotes":`无备注`,"clients.exportHint":`需要生成配置模板?请打开 API 页的导出面板。`},ru:{"nav.dashboard":`Дашборд`,"nav.startup":`Безопасность запуска`,"nav.providers":`Провайдеры`,"nav.models":`Модели`,"nav.combos":`Комбо`,"nav.subagents":`Подагенты`,"nav.logs":`Логи и отладка`,"nav.usage":`Использование`,"common.github":`GitHub`,"sidebar.star":`Поставить звезду на GitHub`,"sidebar.starred":`Звезда на GitHub поставлена`,"sidebar.starUnauthenticated":`Открыть GitHub, чтобы поставить звезду (gh CLI не выполнил вход)`,"sidebar.starFailed":`Не удалось поставить звезду через gh. Открываем GitHub.`,"sidebar.updateAvailable":`Доступно обновление: {version}`,"sidebar.checkUpdate":`Проверить обновления`,"common.save":`Сохранить`,"common.saving":`Сохранение…`,"common.cancel":`Отмена`,"common.discard":`Отбросить`,"common.close":`Закрыть`,"common.ok":`ОК`,"common.remove":`Удалить`,"common.loading":`Загрузка…`,"common.retry":`Повторить`,"app.logoAria":`Логотип opencodex`,"app.claudeOn":`Claude ВКЛ`,"app.claudeOff":`Claude ВЫКЛ`,"theme.label":`Тема`,"theme.light":`Светлая`,"theme.dark":`Тёмная`,"theme.system":`Системная`,"lang.label":`Язык`,"provider.name.volcengine":`Volcengine Ark`,"provider.name.volcengineCodingPlan":`Volcengine Ark — тариф Coding`,"provider.name.volcengineAgentPlan":`Volcengine Ark — тариф Agent`,"errorBoundary.title":`Не удалось загрузить страницу`,"errorBoundary.message":`При отображении этого раздела произошла ошибка. Перезагрузите его, чтобы повторить попытку.`,"errorBoundary.details":`Ошибка`,"errorBoundary.reload":`Перезагрузить`,"startup.title":`Безопасность запуска`,"startup.subtitle":`Проверьте, сможет ли Codex подключиться к opencodex после перезагрузки, прежде чем локальный прокси вызовет бесконечное переподключение.`,"startup.refresh":`Обновить`,"startup.backToDashboard":`Назад к панели`,"startup.loading":`Проверка защиты запуска…`,"startup.error":`Не удалось прочитать состояние защиты запуска.`,"startup.staleData":`Последняя проверка не удалась. Значения ниже устарели и не подтверждают защиту.`,"startup.status.native":`Нативная маршрутизация`,"startup.status.protected":`Перезапуск защищён`,"startup.status.atRisk":`Требуется действие`,"startup.summary.native":`Codex не зависит от локального прокси`,"startup.summary.protected":`opencodex будет доступен после перезагрузки`,"startup.summary.atRisk":`После перезагрузки Codex может потерять доступ к моделям`,"startup.riskDetail":`Codex направлен на локальный прокси, но постоянная служба или исправный launcher shim не запустят его снова.`,"startup.riskDetailCustomLocal":`Codex направлен на пользовательский локальный шлюз. opencodex не может управлять или проверять его перезапуск.`,"startup.riskDetailWindowsShim":`Launcher shim защищает поддерживаемые CLI-скрипты, но Codex Desktop и прямой запуск codex.exe в Windows могут обходить его.`,"startup.safeDetail":`Маршрутизация и механизм запуска согласованы. После перезагрузки ручной запуск ocx start не требуется.`,"startup.routing":`Маршрутизация Codex`,"startup.routing.proxy":`Локальный прокси`,"startup.routing.native":`Нативный OpenAI`,"startup.routing.customLocal":`Пользовательский локальный шлюз`,"startup.routing.customRemote":`Пользовательский удалённый шлюз`,"startup.routing.unknown":`Неизвестная или недопустимая маршрутизация`,"startup.restartProtection":`Защита перезапуска`,"startup.preference":`Запуск по требованию`,"startup.enabled":`Включён`,"startup.disabled":`Выключен`,"startup.protection.service":`Фоновая служба`,"startup.protection.shim":`Launcher shim`,"startup.protection.none":`Не установлен`,"startup.details":`Сведения о защите`,"startup.service":`Фоновая служба`,"startup.serviceHint":`Запускается при входе и перезапускает прокси после сбоя.`,"startup.installed":`Установлена`,"startup.notInstalled":`Не установлена`,"startup.unsupported":`Не поддерживается`,"startup.shim":`Codex launcher shim`,"startup.shimHint":`Запускает ocx ensure при запуске поддерживаемого скриптового лаунчера Codex.`,"startup.healthy":`Исправен`,"startup.cliOnly":`Только CLI`,"startup.stale":`Устарел`,"startup.viable":`Готов`,"startup.unhealthy":`Установлен, но неисправен`,"startup.conflict":`Конфликт служб`,"startup.installedDisabled":`Установлен, но отключён`,"startup.install":`Установить`,"startup.installing":`Установка…`,"startup.repair":`Исправить`,"startup.repairing":`Исправление…`,"startup.serviceInstalled":`Фоновая служба успешно установлена.`,"startup.serviceRepaired":`Фоновая служба успешно исправлена.`,"startup.shimInstalled":`Launcher shim Codex успешно установлен.`,"startup.shimRepaired":`Launcher shim Codex успешно исправлен.`,"startup.installFailed":`Не удалось установить:`,"startup.tray.title":`Системный трей Windows`,"startup.tray.hint":`Запускает значок при входе для управления запуском, остановкой, перезапуском, панелью и состоянием прокси.`,"startup.tray.login":`Запускать трей при входе в Windows`,"startup.tray.notProtection":`Трей — это контроллер, а не защита перезапуска. Для автоматического восстановления по-прежнему нужна исправная фоновая служба.`,"startup.tray.running":`Работает`,"startup.tray.stopped":`Установлен, скрыт`,"startup.tray.stale":`Требуется ремонт`,"startup.tray.notInstalled":`Не установлен`,"startup.tray.loading":`Проверка…`,"startup.tray.unavailable":`Статус недоступен`,"startup.tray.install":`Установить и показать трей`,"startup.tray.start":`Показать значок`,"startup.tray.stop":`Закрыть значок`,"startup.tray.uninstall":`Удалить трей входа`,"startup.tray.error":`Действие Windows tray завершилось ошибкой. Подробности: ocx tray status.`,"startup.recovery":`Варианты исправления`,"startup.recoveryHint":`Используйте установку в один клик выше или скопируйте команду для ручного восстановления. Для Codex Desktop и Windows рекомендуется фоновая служба.`,"startup.command.service":`Рекомендуется: постоянная фоновая служба`,"startup.command.shim":`Альтернатива: CLI launcher shim`,"startup.command.native":`Безопасный режим: восстановить нативную маршрутизацию Codex`,"startup.copy":`Копировать`,"startup.copied":`Скопировано`,"startup.recommended":`Рекомендуемое исправление: {cmd}`,"startup.navRisk":`Защита запуска требует внимания`,"startup.codexRuntime.clampHidden":`Некоторые уровни рассуждений скрыты, потому что OpenCodex использует Codex {version}.`,"startup.codexRuntime.clampHiddenWithEfforts":`Некоторые уровни рассуждений скрыты, потому что OpenCodex использует Codex {version} (удалены: {efforts}).`,"startup.codexRuntime.olderBinary":`OpenCodex использует более старый бинарник Codex ({version}). Доступна более новая установка.`,"dash.subtitle":`Актуальное состояние локального прокси opencodex, его провайдеров и моделей, маршрутизируемых в Codex.`,"dash.workspace.overview":`Обзор`,"dash.workspace.sections":`Разделы`,"dash.status":`Статус`,"dash.online":`В сети`,"dash.offline":`Не в сети`,"dash.version":`Версия`,"dash.versionLocal":`Локальная версия`,"dash.versionRemote":`npm latest`,"dash.installSource":`из исходников`,"dash.installNpm":`npm global`,"dash.installBun":`bun global`,"dash.installUnknown":`установка неизвестна`,"dash.uptime":`Время работы`,"dash.providers":`Провайдеры`,"dash.tokens30d":`Токены (30 дн.)`,"dash.coverage":`{pct} покрытия`,"dash.mem.title":`Наблюдение за памятью`,"dash.mem.hint":`Диагностика среды выполнения только для чтения. Наблюдаемая память — max(RSS, external, ArrayBuffers), чтобы trimming рабочего набора Windows не скрывал удержанную память.`,"dash.mem.rss":`Резидентная память (RSS)`,"dash.mem.jsHeap":`Куча JS занято`,"dash.mem.jsHeapArena":`арена {total}`,"dash.mem.pressure":`Относительно порога`,"dash.mem.pressureOf":`{pct}% от порога`,"dash.mem.pressureUnknown":`Порог не сообщён`,"dash.mem.jscHeap":`Куча JSC`,"dash.mem.external":`External`,"dash.mem.arrayBuffers":`ArrayBuffers`,"dash.mem.observed":`Наблюдаемая`,"dash.mem.runtime":`Счётчики среды`,"dash.mem.growth":`Изменение наблюдаемой / час`,"dash.mem.perHour":`/ч`,"dash.mem.store":`Хранилище продолжений`,"dash.mem.storeHint":`Кэш прокси previous_response_id. Рост общего числа байт при растущей куче указывает на удержание диалогов, а не на аллокатор среды.`,"dash.mem.storeEntries":`Записи`,"dash.mem.storeTotal":`Всего`,"dash.mem.storeLargest":`Наибольшая`,"dash.mem.storeOldest":`Старейшая`,"dash.mem.threshold":`Порог предупреждения`,"dash.mem.lastWarn":`Последнее предупреждение`,"dash.mem.never":`Никогда`,"dash.mem.details":`Подробности`,"dash.mem.unavailable":`Диагностика памяти недоступна (старая версия прокси).`,"dash.mem.inFlight":`Активные запросы`,"dash.mem.restart":`Дождаться и перезапустить`,"dash.mem.restartConfirm":`Дождаться завершения {count} активных запросов, затем перезапустить (до {seconds} с; оставшиеся при таймауте прервутся).`,"dash.mem.draining":`Ожидание {count} запрос(ов)… перезапуск после завершения`,"dash.mem.reconnecting":`Прокси перезапускается… ожидание подключения`,"dash.mem.restartFailed":`Не удалось дождаться и перезапустить. Проверьте, что прокси запущен.`,"dash.mem.restartNoSupervisor":`Защита перезапуска не обнаружена. После перезапуска прокси может остаться выключенным, пока вы не запустите его снова.`,"dash.activeProviders":`Активные провайдеры`,"dash.noProviders":`Провайдеры не настроены. Выполните {cmd}.`,"dash.col.name":`Название`,"dash.col.adapter":`Адаптер`,"dash.col.baseUrl":`Базовый URL`,"dash.col.model":`Модель`,"dash.modelsNoResults":`Нет моделей, соответствующих поиску.`,"dash.availableModels":`Доступные модели`,"dash.noModels":`Модели не найдены. Проверьте API-ключи провайдеров.`,"dash.cannotConnect":`Не удаётся подключиться к прокси. Он запущен?`,"dash.runStart":`Выполните {cmd}, чтобы запустить прокси.`,"dash.stop":`Остановить прокси`,"dash.stopConfirm":`Остановить прокси и восстановить нативный Codex?`,"dash.stopFailed":`Не удалось остановить прокси (HTTP {status}).`,"dash.stopping":`Остановка…`,"dash.codexAutoStart":`Запускать opencodex вместе с Codex`,"dash.codexAutoStartHint":`Разрешает установленному launcher shim выполнять ocx ensure. Эта настройка не устанавливает защиту перезапуска; проверьте фактическое состояние в разделе безопасности запуска.`,"dash.searchModel":`Модель сайдкара поиска`,"dash.searchModelHint":`Модель, используемая для web_search на маршрутизируемых моделях, отличных от OpenAI. Требуется вход в аккаунт ChatGPT.`,"dash.searchReasoning":`Уровень рассуждений для поиска`,"dash.visionModel":`Модель сайдкара для изображений`,"dash.visionModelHint":`Модель, которая описывает изображения для маршрутизируемых моделей, работающих только с текстом. Требуется вход в аккаунт ChatGPT.`,"dash.webSearchSidecar":`Сайдкар веб-поиска`,"dash.webSearchSidecarHint":`Выберите бэкенд и модель, используемые для веб-поиска на маршрутизируемых моделях.`,"dash.visionSidecar":`Сайдкар для изображений`,"dash.visionSidecarHint":`Выберите бэкенд и модель, которые описывают изображения для маршрутизируемых моделей, работающих только с текстом.`,"dash.shadowCallIntercept":`Перехват теневых вызовов`,"dash.shadowCallInterceptHint":`Перехватывает фоновые служебные вызовы Codex App ({models}: генерация заголовков, сообщений коммитов) и перенаправляет их на выбранную вами модель. Уровень рассуждений жёстко задан как low.`,"dash.shadowCallWarning":`⚠ Когда функция включена, ВСЕ запросы к {models} будут заменены выбранной моделью.`,"dash.shadowCallOriginal":`Оригинал`,"dash.shadowCallModel":`Модель-замена`,"dash.shadowCallTooltip":`Codex App в фоновом режиме вызывает служебную модель для генерации заголовков тредов, сообщений коммитов и оркестрации навыков. Эта модель менялась между версиями клиента, поэтому opencodex перехватывает весь набор: {models}. Включите функцию, чтобы перенаправлять такие вызовы на выбранную вами модель.`,"models.shadowCallIntercept":`Перехват теневых вызовов`,"models.shadowCallInterceptHint":`Перехватывает фоновые служебные вызовы Codex App ({models}: заголовки, сообщения коммитов) и перенаправляет их на выбранную вами модель.`,"dash.sidecarBackend":`Бэкенд`,"dash.sidecarModel":`Модель`,"dash.backendAuto":`Авто`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`Настройки сайдкара сохранены. Вступят в силу со следующего запроса.`,"dash.sidecarSaveFailed":`Не удалось сохранить настройки сайдкара.`,"dash.injectionLabel":`Делегирование подагентам`,"dash.injectionHint":`Выберите модель, которой Codex будет передавать работу подагентов. Где применяется этот выбор, решают два переключателя ниже.`,"dash.syncCodexSubagentDefaults":`Сохранить и как значение по умолчанию в Codex`,"dash.syncCodexSubagentDefaultsHint":`Если включено, выбранная выше модель записывается в собственную конфигурацию Codex, и новые задачи тоже начинаются с неё. Если выключено, выбор запоминается только здесь. Применится при следующей синхронизации или перезапуске, а ваши настройки [agents] останутся нетронутыми.`,"dash.multiAgentGuidance":`Подсказывать, как делить работу`,"dash.multiAgentGuidanceHint":`Отправляет Codex короткую записку о том, как передавать работу подагентам. На v2 она называет доступные модели и предпочтительную; на v1 работает только при усилии рассуждения max или ultra. Если выключено, записка не добавляется.`,"dash.injectionNone":`Нет`,"dash.injectionEffortLabel":`Уровень рассуждений`,"dash.injectionEffortNone":`По умолчанию для модели`,"dash.effortCapLabel":`Лимит рассуждений V2 ultra`,"dash.subagentEffortCapLabel":`Лимит рассуждений подагентов V2`,"dash.effortCapHelp":`Ограничивает уровень рассуждений для ходов V2 в режиме ultra. Когда лимит задан, входящие запросы с максимальным уровнем рассуждений (из режима ultra) снижаются до выбранного уровня. Лимит для подагентов действует только на порождённые дочерние агенты. Лимиты только понижают уровень рассуждений и никогда не повышают его. Если модель не поддерживает заданный лимитом уровень, он снижается до ближайшего поддерживаемого.`,"dash.effortCapNone":`Без лимита`,"dash.maintenance":`Обслуживание`,"dash.maintenanceHint":`Обновите каталог моделей Codex или установите более новую версию opencodex.`,"dash.syncModels":`Синхронизировать модели`,"dash.syncing":`Синхронизация…`,"dash.syncOk":`Синхронизация завершена. Добавлено моделей: {count}.`,"dash.syncStaleHint":`Если Codex всё ещё показывает старый список, перезапустите долгоживущий app-server ({cmd}).`,"dash.syncFailed":`Ошибка синхронизации: {error}`,"dash.projectConfigTitle":`Конфигурация Codex в проекте обходит OpenCodex`,"dash.projectConfigHint":`Эти локальные настройки репозитория переопределяют прокси OpenCodex (например, направляют запросы напрямую в OpenCode Go). Удалите их, чтобы в этом проекте действовала маршрутизация из ~/.codex/config.toml.`,"dash.checkUpdate":`Проверить обновления`,"dash.updateTitle":`Обновление opencodex`,"dash.updateDesc":`Проверьте npm для выбранного канала, затем решите, перезапускать ли прокси после установки.`,"dash.updateChannel":`Канал`,"dash.updateChecking":`Проверка обновлений…`,"dash.updateInstalled":`Установлена`,"dash.updateLatest":`Последняя`,"dash.updateAvailable":`Доступно обновление`,"dash.updateCurrent":`Актуальная версия`,"dash.updateCommand":`Команда`,"dash.updateSource":`Это рабочая копия из исходного кода. Обновите её в терминале с помощью показанной команды.`,"dash.updateUnavailable":`Не удалось получить сведения о последней версии из npm. Попробуйте позже.`,"dash.updateRetry":`Повторить`,"dash.updateRecheck":`Проверить снова`,"dash.updateCannotAuto":`Обновление в один клик недоступно ({reason}).`,"dash.updateReason.source_checkout":`установка из исходного кода`,"dash.updateReason.latest_unavailable":`реестр npm недоступен`,"dash.updateReason.already_latest":`уже установлена последняя версия`,"dash.updateReason.unknown":`обновление недоступно`,"dash.updateRestart":`Перезапустить после обновления`,"dash.updateRestartHint":`Рекомендуется. Текущий GUI продолжает работать на старом коде, пока прокси не перезапустится.`,"dash.runUpdate":`Обновить`,"dash.updateReconnecting":`Ожидание перезапущенного прокси…`,"dash.updateStatus.running":`Обновление opencodex.`,"dash.updateStatus.restarting":`Обновление установлено. Перезапуск прокси.`,"dash.updateStatus.succeeded":`Обновление завершено.`,"dash.updateStatus.failed":`Обновление не удалось.`,"prov.subtitle":`Настройте вышестоящих провайдеров, которых opencodex маршрутизирует в Codex. Войдите в аккаунт, добавьте провайдера или отредактируйте конфигурацию вручную.`,"prov.add":`Добавить провайдера`,"prov.editJson":`Редактировать JSON`,"prov.accountLogin":`Вход в аккаунт`,"prov.noOauth":`Нет доступных OAuth-провайдеров.`,"prov.loggedIn":`вход выполнен`,"prov.notLoggedIn":`вход не выполнен`,"prov.logout":`Выйти`,"prov.login":`Войти`,"prov.loginWith":`Войти через {provider}`,"prov.waitingBrowser":`Ожидание браузера…`,"prov.didntOpen":`Не открылось? Нажмите здесь`,"prov.copyLink":`Копировать ссылку`,"prov.linkCopied":`Скопировано`,"prov.linkCopyUnavailable":`Буфер обмена недоступен`,"prov.deviceCode":`Код устройства`,"prov.copyCode":`Копировать код`,"prov.codeCopied":`Код скопирован`,"prov.editAlias":`Изменить псевдоним`,"prov.aliasPrompt":`Отображаемое имя (оставьте пустым для удаления)`,"prov.aliasSaved":`Псевдоним сохранен`,"prov.aliasSaveFailed":`Не удалось сохранить псевдоним`,"prov.accountId":`ID`,"prov.pasteRedirect":`Вставьте URL перенаправления или код`,"prov.pasteRedirectHint":`Если браузер показывает ошибку localhost, скопируйте полный URL из его адресной строки и вставьте сюда (или вставьте код авторизации).`,"prov.pasteSubmit":`Отправить`,"prov.pasteSubmitting":`Отправка…`,"prov.pasteOk":`Код отправлен — завершаем вход…`,"prov.pasteFail":`Не удалось отправить код: {error}`,"prov.port":`Порт`,"prov.default":`По умолчанию`,"prov.loadingConfig":`Загрузка…`,"prov.saved":`Сохранено! Перезапустите прокси, чтобы применить изменения.`,"prov.loadConfigFail":`Не удалось загрузить конфигурацию`,"prov.invalidJson":`Некорректный JSON`,"prov.saveFailed":`Не удалось сохранить`,"prov.loginFailStart":`Не удалось начать вход в {provider}`,"prov.loginError":`Ошибка входа в {provider}: {error}`,"prov.loginRequestFail":`Не удалось выполнить запрос на вход в {provider}`,"prov.loginCancelled":`Вход в {provider} отменён`,"prov.loginTimeout":`Время ожидания входа в {provider} истекло — браузер был закрыт или вход не был завершён. Попробуйте ещё раз.`,"prov.loginOk":`Выполнен вход в {provider}. Выполните {cmd} (или изменения применятся на лету), чтобы его модели появились в списке.`,"oauthTos.highTitle":`{provider}: риск OAuth по подписке`,"oauthTos.elevatedTitle":`{provider}: неофициальный OAuth-мост`,"oauthTos.anthropicBody":`Прямое повторное использование OAuth-токенов подписки Claude через сторонний прокси, такой как OpenCodex, не является поддерживаемой интеграцией Anthropic и может привести к ограничению доступа. Поддерживаемые интеграции Agent SDK, использующие подписки Claude, — это отдельный механизм.`,"oauthTos.highBody":`OpenCodex подключает {provider} через сторонний механизм OAuth. Неподдерживаемое использование может привести к ограничению или приостановке доступа.`,"oauthTos.elevatedBody":`OpenCodex подключает {provider} через неофициальный механизм OAuth. По возможности используйте официальный клиент; нетипичный или автоматизированный трафик может быть расценён как злоупотребление, и доступ может быть ограничен или приостановлен.`,"oauthTos.saferPath":`Более безопасный вариант: вместо этого настройте API-ключ в OpenCodex.`,"oauthTos.acknowledge":`Я понимаю риск и всё равно хочу продолжить с OAuth.`,"oauthTos.continue":`Продолжить с OAuth`,"prov.logoutOk":`Выполнен выход из {provider}.`,"prov.logoutFail":`Не удалось выйти из {provider}. Состояние аккаунта не изменилось.`,"prov.removed":`Провайдер "{name}" удалён.`,"prov.removedDefault":`Провайдер "{name}" удалён. Провайдером по умолчанию теперь является "{defaultProvider}".`,"prov.removeFail":`Не удалось удалить "{name}".`,"prov.removeLastProvider":`Нельзя удалить этого провайдера, если ни один другой включённый провайдер не может стать провайдером по умолчанию.`,"prov.removeHasDependentCombos":`Сначала удалите или обновите зависимые комбо: {combos}.`,"prov.setDefault":`Сделать основным`,"prov.setDefaultSuccess":`"{name}" теперь провайдер по умолчанию.`,"prov.setDefaultFail":`Не удалось сделать "{name}" провайдером по умолчанию.`,"prov.defaultDisabled":`Сначала включите этого провайдера, затем сделайте его основным.`,"prov.updateFail":`Не удалось обновить этого провайдера.`,"prov.networkError":`Ошибка сети. Проверьте, что прокси запущен, и повторите попытку.`,"prov.added":`Провайдер "{name}" добавлен. Уже активен — выполните {cmd} (или перезапустите), чтобы его модели появились в селекторе моделей Codex.`,"prov.removeConfirm":`Удалить провайдера "{name}"? Его модели исчезнут из селектора моделей Codex.`,"prov.hasApiKey":`API-ключ настроен`,"prov.hasHeaders":`настроены пользовательские заголовки`,"prov.accounts":`Аккаунты ({n})`,"prov.accountsAria":`Показать или скрыть аккаунты {name}`,"prov.accountActive":`Активен`,"prov.accountReauth":`Повторный вход`,"prov.reauthenticate":`Переавторизоваться`,"prov.reauthAccountMissing":`Выбранный аккаунт не найден после входа`,"prov.reauthIdentityMismatch":`Аккаунт, в который выполнен вход, не совпадает с выбранным`,"prov.accountAdd":`Добавить аккаунт`,"prov.accountNoLabel":`аккаунт {id}`,"prov.accountSwitchTitle":`Использовать этот аккаунт`,"prov.accountSwitched":`Переключено на {email}.`,"prov.accountSwitchFail":`Не удалось переключить аккаунт`,"prov.accountRemoved":`Аккаунт {email} удалён.`,"prov.accountRemoveFail":`Не удалось удалить {email}. Аккаунт не изменён.`,"prov.accountRemoveAria":`Удалить {email}`,"prov.accountRemoveConfirm":`Удалить аккаунт {email}? Данные его входа будут удалены из этого прокси.`,"prov.keyAdd":`Добавить API-ключ`,"prov.keyAdded":`API-ключ добавлен для {name}.`,"prov.keyAddFail":`Не удалось добавить API-ключ`,"prov.keyPlaceholder":`Вставьте API-ключ`,"prov.keySwitchTitle":`Использовать этот ключ`,"prov.keySwitched":`Переключено на ключ {key}.`,"prov.keySwitchFail":`Не удалось переключить ключ`,"prov.keyRemoved":`Ключ {key} удалён.`,"prov.keyRemoveAria":`Удалить ключ {key}`,"prov.keyRemoveConfirm":`Удалить API-ключ {key}? Он будет удалён из конфигурации этого прокси.`,"prov.activeBadge":`Активен`,"prov.disabledBadge":`Отключён`,"prov.defaultBadge":`По умолчанию`,"prov.enable":`Включить`,"prov.disable":`Отключить`,"prov.enabled":`Провайдер "{name}" включён. Его модели снова могут появляться в Codex.`,"prov.disabled":`Провайдер "{name}" отключён. Настройки сохранены, но его модели скрыты.`,"prov.enableFail":`Не удалось включить "{name}".`,"prov.disableFail":`Не удалось отключить "{name}".`,"prov.enableAria":`Включить провайдера {name}`,"prov.disableAria":`Отключить провайдера {name}`,"prov.defaultCannotDisable":`Провайдера по умолчанию нельзя отключить`,"prov.openaiAccountMode":`Режим аккаунта Codex`,"prov.openaiModePool":`Пул`,"prov.openaiModeDirect":`Прямой`,"prov.openaiPoolDesc":`По умолчанию. Ротация основного входа и добавленных аккаунтов с учётом привязки, квот, периодов ожидания и отказоустойчивого переключения (failover).`,"prov.openaiDirectDesc":`Используется только текущий/основной вход Codex. Сохранённые аккаунты пула не читаются и не ротируются.`,"prov.openaiModeSaved":`Режим аккаунта OpenAI изменён на {mode}.`,"prov.openaiModeSaveFailed":`Не удалось изменить режим аккаунта OpenAI.`,"prov.openaiApiDesc":`Используется API-ключ OpenAI; учётные данные аккаунта Codex никогда не используются.`,"prov.manageCodexAccounts":`Управление аккаунтами Codex`,"prov.openaiApiMissing":`Требуется API-ключ`,"prov.openaiApiSetup":`Настроить API-ключ`,"models.subtitle":`Управляйте тем, какие модели видит Codex — нативные GPT (сквозной проброс) и модели маршрутизируемых провайдеров, сгруппированные по провайдеру (нажмите на заголовок, чтобы свернуть группу). Скрытые модели исчезают из каталога и селектора, но остаются вызываемыми по точному id. Изменения применяются на следующем ходе Codex — opencodex сбрасывает 5-минутный кэш моделей Codex, поэтому перезапуск не требуется.`,"models.nativeGroupLabel":`Нативные OpenAI`,"models.nativeHint":`Модели сквозного проброса используют режим аккаунта (пул или прямое подключение), выбранный на странице «Провайдеры». Отключение модели скрывает её из селектора Codex (запись в каталоге сохраняется, поэтому при повторном включении она восстанавливается в точности).`,"models.active":`{active}/{total} видимо`,"models.workspace.providers":`Провайдеры`,"models.workspace.allProviders":`Все провайдеры`,"models.workspace.mainAria":`Сведения о моделях`,"models.combosEmpty":`Комбо ещё не настроены`,"models.combosSetup":`Настроить`,"models.combosAdd":`Добавить комбо`,"models.combosActive":`Активно: {count}`,"models.allOn":`Все вкл.`,"models.allOff":`Все выкл.`,"models.cap350k":`Лимит 350k`,"models.capApplied":`Лимит контекста применён — вступит в силу на следующем ходе Codex.`,"models.capSaveFailed":`Не удалось сохранить лимит контекста`,"models.contextCapped":`Лимит 350k`,"models.contextCapLabel":`Лимит контекста`,"models.v2Label":`Подагент`,"models.shadowCallOriginal":`⚠ {models} →`,"models.v2DocsLink":`Что такое v1 / v2?`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`Все модели → поверхность v1`,"models.v2ModeDesc_default":`Вышестоящие значения по умолчанию (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`Все модели → поверхность v2`,"models.v2Help":`Управляет мультиагентной поверхностью для всех моделей.
34
-
35
- v1: Классический однопоточный агент. Каждая модель использует поверхность взаимодействия v1.
36
- base: Вышестоящие значения по умолчанию — sol/terra используют v2, luna использует v1, остальные следуют функциональному флагу codex.
37
- v2: Многопоточный агент со spawn_agent. Каждая модель использует поверхность взаимодействия v2.
38
-
39
- Изменения применяются к новым сессиям.`,"dash.multiAgent":`Подагент`,"models.v2Conflict":`Задан [agents] max_threads — codex откажется запускаться; удалите его из config.toml`,"models.v2Applied":`Режим подагента обновлён — применяется к новым сессиям (перезапустите приложение Codex, чтобы обновить селектор моделей)`,"models.v2ThreadsLabel":`Макс. потоков`,"models.v2ThreadsDefault":`по умолчанию (4)`,"models.v2ThreadsApplied":`Лимит потоков обновлён — применяется к новым сессиям`,"models.v2ThreadsInvalid":`Лимит потоков должен быть целым числом >= 1`,"models.v2ThreadsApply":`Применить`,"models.capValue":`Лимит {value}`,"models.contextCappedValue":`Лимит {value}`,"models.setAll":`Применить ко всем`,"models.setAllHint":`Применяет лимит контекста {value} ко всем маршрутизируемым провайдерам. Нативные провайдеры не затрагиваются.`,"models.collapseAll":`Свернуть все`,"models.expandAll":`Развернуть все`,"models.orderHint":`Порядок в селекторе: модели, выбранные на странице «Подагенты» (в заданном порядке) → остальные маршрутизируемые модели по алфавиту — сначала по провайдеру, затем по ID модели → нативные модели. Переключатели видимости лишь фильтруют модели и не меняют этот порядок.`,"models.custom":`Другое…`,"models.customApply":`Применить`,"models.customPlaceholder":`Токены (напр. 420000)`,"models.customAdd":`Добавить пользовательскую модель`,"models.customAddTitle":`Добавить пользовательскую модель — {provider}`,"models.customEditTitle":`Изменить пользовательскую модель — {provider}`,"models.customAdded":`Пользовательская модель добавлена`,"models.customUpdated":`Пользовательская модель обновлена`,"models.customDeleted":`Пользовательская модель удалена`,"models.customSaveFailed":`Не удалось сохранить пользовательскую модель`,"models.customSaving":`Сохранение…`,"models.customAddBtn":`Добавить`,"models.customEditBtn":`Обновить`,"models.customEdit":`Изменить`,"models.customDelete":`Удалить`,"models.customDeleteConfirm":`Удалить модель {name}?`,"models.customBadge":`Пользовательская`,"models.customSummary":`Пользовательских: {count}`,"models.customFieldModelId":`ID модели (slug эндпоинта)`,"models.customFieldModelIdPlaceholder":`например, qwen4-max-preview`,"models.customFieldDisplayName":`Отображаемое имя (необязательно)`,"models.customFieldDisplayNamePlaceholder":`например, Qwen 4 Max Preview`,"models.customFieldContext":`Контекстное окно`,"models.customFieldModalities":`Входные модальности`,"models.tipProvider":`Провайдер`,"models.tipContext":`Контекст`,"models.tipModalities":`Модальности`,"models.tipStatus":`Статус`,"models.tipActive":`Активна`,"models.tipDisabled":`Отключена`,"models.applied":`Применено — вступит в силу на следующем ходе Codex.`,"models.saveFailed":`Не удалось сохранить`,"models.networkError":`Ошибка сети — запущен ли прокси?`,"models.loadFail":`Не удалось загрузить модели — запущен ли прокси?`,"models.noRouted":`Нет маршрутизируемых моделей`,"models.noRoutedHint":`Сначала войдите в провайдера или добавьте нового.`,"models.emptyDiscovery":`Модели не обнаружены. Проверьте адрес провайдера или добавьте статическую/пользовательскую модель.`,"models.emptyDiscoveryDisabled":`Автообнаружение моделей выключено, статические модели не настроены.`,"models.discoveryFailedBadge":`Ошибка обнаружения`,"models.discoveryFailedHttp":`Не удалось обнаружить модели (HTTP {status}).`,"models.discoveryFailedBlocked":`Обнаружение моделей заблокировано политикой назначения.`,"models.discoveryFailedInvalidResponse":`Обнаружение моделей вернуло недопустимый ответ.`,"models.discoveryFailedNetwork":`Обнаружение моделей не удалось из-за сетевой ошибки.`,"models.discoveryFailedProvider":`Провайдер сообщил об ошибке обнаружения моделей.`,"models.discoveryFailedGeneric":`Не удалось обнаружить модели.`,"models.openProviderSettings":`Открыть настройки провайдера`,"models.loading":`Загрузка…`,"models.search":`Поиск моделей…`,"models.showMore":`Показать ещё {n}`,"models.allowlistLabel":`Только выбранные`,"models.allowlistHint":`В каталог попадают только отмеченные модели (пусто = все). Полезно для провайдеров, предоставляющих тысячи моделей.`,"models.selectedCount":`Выбрано: {n}`,"sub.subtitle":`{cmd} в Codex объявляет как переопределения только первые 5 моделей (по приоритету). Выберите здесь до 5 моделей — нативные gpt или маршрутизируемые — и opencodex задаст им приоритет в каталоге так, чтобы именно они шли первыми. Любую другую модель по-прежнему можно вызвать по её точному имени; эта настройка управляет только тем, что отображается.`,"sub.featured":`Избранные`,"sub.orderHint":`Показанный здесь порядок задаёт позиции 1–5 в верхней части селектора моделей Codex и кандидатов в модели по умолчанию для {cmd}.`,"sub.noneSelected":`Ничего не выбрано — выберите из списка ниже.`,"sub.models":`Модели`,"sub.search":`Поиск моделей (нативные gpt + маршрутизируемые)…`,"sub.noModels":`Нет моделей — сначала войдите в провайдера или добавьте нового.`,"sub.saved":`Сохранено {n} моделей. Начните новую сессию Codex (или выполните {cmd}), чтобы увидеть их как переопределения spawn_agent.`,"sub.saveFailed":`Не удалось сохранить`,"sub.networkError":`Ошибка сети — запущен ли прокси?`,"sub.loadFail":`Не удалось загрузить модели — запущен ли прокси?`,"sub.loading":`Загрузка…`,"sub.moveUp":`Переместить {m} вверх`,"sub.moveDown":`Переместить {m} вниз`,"sub.removeAria":`Убрать {m}`,"sub.workspace.addToFeatured":`Добавить {m} в избранные`,"sub.workspace.allModels":`Все модели`,"sub.workspace.featuredFull":`Список избранных заполнен (макс. 5)`,"sub.workspace.mainAria":`Сведения о модели субагента`,"sub.workspace.notFeatured":`Не в избранных`,"sub.workspace.priority":`Приоритет`,"sub.workspace.removeFromFeatured":`Убрать {m} из избранных`,"sub.workspace.selectModel":`Выберите модель`,"sub.workspace.selectModelDesc":`Выберите модель из списка, чтобы увидеть детали и добавить её в избранные для spawn_agent.`,"sub.workspace.selector":`Публичный селектор`,"logs.title":`Журнал запросов`,"logs.tabLogs":`Логи`,"logs.tabDebug":`Отладка`,"logs.subtitle":`Недавние запросы через локальный прокси opencodex, новые сверху.`,"logs.autoRefresh":`Автообновление`,"logs.noRequests":`Запросов пока нет.`,"logs.loadError":`Не удалось загрузить журнал запросов.`,"logs.filter.surface.label":`Источник`,"logs.filter.surface.all":`Все`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.filter.surface.grok":`Grok`,"logs.filter.conversation.label":`Диалог`,"logs.filter.conversation.placeholder":`Вставьте ID диалога`,"logs.filter.conversation.clear":`Сбросить`,"logs.filter.conversation.apply":`Фильтровать логи`,"logs.conversation.totals":`{requests} запросов · {tokens} токенов · {cost}`,"logs.conversation.scope":`Итоги только по загруженному кольцу Logs.`,"logs.conversation.excluded":`(из ~$ исключены {unpriced} без цены, {unmetered} без учёта)`,"logs.detail.conversation":`Диалог`,"logs.badge.claude":`Claude`,"logs.badge.grok":`Grok`,"logs.col.time":`Время`,"logs.col.request":`Запрос`,"logs.col.model":`Модель`,"logs.col.effort":`Уровень`,"logs.col.provider":`Провайдер`,"logs.col.status":`Статус`,"logs.col.tokens":`Токены`,"logs.col.tokPerSec":`tok/s`,"logs.col.estimatedCost":`~$`,"logs.metric.tokPerSecTitle":`Выходные токены в секунду за полную длительность запроса`,"logs.metric.estimatedCostTitle":`Эквивалент стоимости по прайс-листу API, а не фактическое списание; если цену не удалось сопоставить, значение недоступно`,"usage.cost.total":`Эквивалент стоимости по прайс-листу API (за этот период)`,"usage.cost.disclaimer":`Не является счётом. Расходы могут покрываться подпиской или кредитами провайдера.`,"usage.cost.unpricedNote":`Исключено {count} запросов (нет цены или данных использования)`,"logs.detail.section.basic":`Основная информация`,"logs.detail.section.performance":`Производительность`,"logs.detail.section.cost":`Эквивалент стоимости по прайс-листу API`,"logs.detail.section.attempts":`Попытки комбо`,"logs.detail.section.usage":`Сырые данные использования`,"logs.detail.ttft":`TTFT`,"logs.detail.costTotal":`Эквивалент по прайс-листу`,"logs.detail.totalTokens":`Всего токенов`,"logs.detail.matchedKey":`Совпавший ключ jawcode`,"logs.detail.priceSource":`Источник цены`,"logs.detail.unavailableReason":`Причина недоступности`,"logs.detail.copyRequestId":`Копировать ID запроса`,"logs.detail.copied":`Скопировано`,"logs.detail.source.jawcode":`каталог jawcode`,"logs.detail.source.expected":`Оверлей ожидаемых цен`,"logs.detail.verification.verified":`Подтверждено`,"logs.detail.verification.derived":`Выведено из базовой модели`,"logs.detail.attempt.target":`Провайдер / модель`,"logs.detail.attempt.reason":`Результат / причина`,"logs.detail.attempt.completed":`Завершено`,"logs.detail.attempt.e2eNote":`Общий tok/s — сквозной показатель; для каждой попытки используется её собственная длительность.`,"logs.detail.reason.usage_missing":`Данные об использовании не были сообщены.`,"logs.detail.reason.usage_unsupported":`Этот провайдер не сообщает данные об использовании.`,"logs.detail.reason.output_missing":`Положительное число выходных токенов не было сообщено.`,"logs.detail.reason.invalid_duration":`Длительность запроса некорректна.`,"logs.detail.reason.price_unmatched":`Подходящая цена в каталоге jawcode не найдена.`,"logs.detail.reason.invalid_cache_breakdown":`Детализация кэш-токенов противоречит общему числу входных токенов.`,"logs.detail.reason.invalid_usage":`В данных использования есть некорректное значение токенов.`,"logs.detail.reason.combo_attempt_unavailable":`Не удалось рассчитать стоимость как минимум одной попытки комбо.`,"logs.detail.estimate.usage_estimated":`Данные об использовании от провайдера — оценочные.`,"logs.detail.estimate.cache_detail_missing":`Детализация кэша недоступна; входные токены оценены по верхней границе.`,"logs.detail.estimate.expected_price_overlay":`Использована подтверждённая ожидаемая цена из прайс-листа.`,"logs.col.error":`Ошибка`,"logs.col.upstreamReason":`Причина от провайдера`,"logs.col.duration":`Длительность`,"logs.tokens.reported":`сообщено`,"logs.tokens.unreported":`не сообщено`,"logs.tokens.unsupported":`не поддерживается`,"logs.tokens.estimated":`оценка`,"logs.tokens.input":`вход`,"logs.tokens.output":`выход`,"logs.tokens.cacheRead":`чтение кэша (c)`,"logs.tokens.cacheWrite":`запись кэша (w)`,"logs.tokens.reasoning":`рассуждения`,"logs.tokens.noCache":`нет данных кэша`,"logs.tokens.contextTotal":`активный контекст`,"logs.tokens.noCacheNote":`этот провайдер не сообщает данные о кэш-токенах`,"logs.tokens.noCacheCursor":`детализация кэша Cursor не сообщается`,"logs.tokens.noCacheCursorNote":`Cursor не передает число токенов чтения/записи кэша; это неизвестно, а не подтвержденный промах кэша`,"logs.tokens.estimatedNote":`оценка (провайдер не сообщает точные данные использования)`,"logs.details":`Детали`,"logs.detailTitle":`Детали запроса`,"logs.detailRaw":`Сырая запись лога`,"debug.title":`Отладка`,"debug.subtitle":`Включаемая по желанию диагностика транспорта провайдеров и извлечения данных использования. Ошибки запросов и 502 остаются на вкладке «Логи».`,"debug.debug":`Отладка провайдера`,"debug.usage":`Извлечение данных использования`,"debug.injection":`Лог инъекций`,"debug.claude":`Входящие Claude`,"debug.claudeInbound.title":`Входящие запросы Claude`,"debug.claudeInbound.sub":`Что фактически отправляет Claude Code/Desktop (thinking, effort, метаданные) — текст промптов не сохраняется.`,"debug.claudeInbound.empty":`Запросы пока не зафиксированы. Отправьте сообщение из Claude, пока эта опция включена.`,"debug.claudeInbound.time":`Время`,"debug.claudeInbound.endpoint":`Конечная точка`,"debug.claudeInbound.model":`Модель`,"debug.claudeInbound.none":`нет`,"debug.reset":`Сбросить временные переопределения`,"debug.refresh":`Обновить`,"debug.follow":`Следить`,"debug.streamProvider":`Провайдер`,"debug.streamUsage":`Использование`,"debug.streamInjection":`Инъекции`,"debug.loading":`Загрузка настроек отладки…`,"debug.loadFailed":`Не удалось загрузить настройки отладки.`,"debug.emptyTitle":`Отладочное логирование выключено`,"debug.empty":`Включите «Отладка провайдера» или «Извлечение данных использования» в карточке выше. Строки появятся здесь после отправки запроса через прокси.`,"debug.noLinesTitle":`Ожидание строк`,"debug.noLines.provider":`Отладка провайдера включена, но записываются только аномалии транспорта (потерянные или повреждённые фреймы, а также события подключения и повторов Cursor). Успешный запрос через провайдера вроде Anthropic может не дать ни одной строки.`,"debug.noLines.usage":`Извлечение данных использования включено, но пока ничего не зафиксировано. Отправьте чат или запрос через Codex — и записи появятся здесь.`,"debug.noLines.injection":`Лог инъекций включён, но пока ничего не зафиксировано. Он записывает инъекции мультиагентных инструкций и решения об ограничении уровня рассуждений на ходах совместной работы (collab) и подагентов.`,"usage.title":`Использование`,"usage.subtitle":`Локальный учёт токенов вашего прокси. Отсутствующие данные никогда не показываются как ноль.`,"usage.loading":`Загрузка данных об использовании…`,"usage.empty":`Данных об использовании пока нет. Отправьте запрос через прокси, чтобы увидеть здесь активность.`,"usage.loadError":`Не удалось загрузить данные об использовании.`,"usage.range.all":`Все`,"usage.range.available":`Доступная история`,"usage.historyTruncated":`Итоги охватывают только доступную историю, поскольку старые данные не загружены.`,"usage.range.30d":`30 дн.`,"usage.range.7d":`7 дн.`,"usage.card.requests":`Запросы`,"usage.card.measured":`Измерено`,"usage.card.reported":`Сообщено`,"usage.card.totalTokens":`Всего токенов`,"usage.card.cachedTokens":`Чтения из кэша`,"usage.card.cachedTokensHint":`Токены промпта, отданные из кэша провайдера (чтения). Записи в кэш показаны ниже, если они есть.`,"usage.card.cacheWriteTokens":`записи в кэш`,"usage.card.coverage":`Покрытие`,"usage.card.activeDays":`Активные дни`,"usage.section.heatmap":`Активность по дням`,"usage.section.overview":`Обзор`,"usage.section.models":`Модели`,"usage.section.providers":`Провайдеры`,"usage.section.coverage":`Детализация покрытия`,"usage.workspace.report":`Отчёт об использовании`,"usage.workspace.sections":`Разделы использования`,"usage.coverage.measured":`Измерено`,"usage.coverage.reported":`Сообщено провайдером`,"usage.coverage.estimated":`Оценено`,"usage.coverage.note":`Измеренные записи включают количество токенов, сообщённое провайдером, и оценочные значения. Запросы без отчёта и неподдерживаемые запросы учитываются, но никогда не показываются как ноль токенов.`,"usage.search.models":`Поиск моделей…`,"usage.col.requests":`Запросы`,"usage.col.measured":`Измерено`,"usage.col.reported":`Сообщено`,"usage.col.tokens":`Токены`,"usage.col.share":`Доля`,"usage.heatmap.less":`Меньше`,"usage.heatmap.more":`Больше`,"usage.dayMon":`Пн`,"usage.dayWed":`Ср`,"usage.dayFri":`Пт`,"usage.heatmap.tooltipTokens":`{tokens} токенов`,"usage.heatmap.tooltipRequests":`{requests} запросов`,"nav.storage":`Хранилище`,"storage.title":`Хранилище`,"storage.subtitle":`Смотрите, что занимает CODEX_HOME. Очистка не затрагивает активные сессии.`,"storage.loading":`Сканирование хранилища…`,"storage.empty":`CODEX_HOME пуст или отсутствует — показывать нечего.`,"storage.error":`Не удалось просканировать хранилище. Убедитесь, что CODEX_HOME указывает на корректный каталог.`,"storage.refresh":`Пересканировать`,"storage.rescanned":`Сканирование завершено.`,"storage.card.total":`Общий размер`,"storage.card.files":`Файлы`,"storage.card.home":`CODEX_HOME`,"storage.snapshot.lastScan":`Последний скан`,"storage.snapshot.scanning":`Сканирование…`,"storage.snapshot.unavailable":`Сканирования ещё не было.`,"storage.cleanupCard.title":`Освободить место`,"storage.cleanupCard.tabs":`Параметры очистки`,"storage.cleanupCard.tab.policy":`Политика`,"storage.cleanupCard.tab.quarantine":`Карантин`,"storage.cleanup.noArchives":`Нет архивных сессий для очистки.`,"storage.section.buckets":`Категории`,"storage.section.largest":`Крупнейшие файлы`,"storage.workspace.overview":`Обзор`,"storage.workspace.selectBucket":`Выберите сегмент в списке, чтобы увидеть разбивку.`,"storage.col.bucket":`Категория`,"storage.col.size":`Размер`,"storage.col.files":`Файлы`,"storage.col.oldest":`Старейший`,"storage.col.newest":`Новейший`,"storage.col.rows":`Строки БД`,"storage.rows.unknown":`неизвестно (заблокировано)`,"storage.bucket.sessions":`Активные сессии`,"storage.bucket.archived_sessions":`Архивные сессии`,"storage.bucket.logs_db":`База данных логов`,"storage.bucket.state_db":`База данных состояния`,"storage.bucket.attachments":`Вложения`,"storage.bucket.deletion_manifests":`Манифесты удаления`,"storage.bucket.other":`Прочее`,"storage.cleanup.title":`Очистка архива`,"storage.cleanup.help":`Удаляет самые старые архивные сессии по проценту. Активные сессии не затрагиваются. По умолчанию — карантин: файлы перемещаются в CODEX_HOME/.trash.`,"storage.cleanup.slider":`Доля самых старых архивов`,"storage.cleanup.percent":`{percent}%`,"storage.cleanup.preset":`{percent}`,"storage.cleanup.preview":`Предпросмотр`,"storage.cleanup.confirmTitle":`Подтвердить очистку архива`,"storage.cleanup.confirmBody":`Будет обработано {count} архивных файл(ов) (~{size}), самые старые {percent}%.`,"storage.cleanup.moreFiles":`…и ещё {n}`,"storage.cleanup.permanent":`Удалить навсегда (без карантина)`,"storage.cleanup.permanentWarn":`Безвозвратное удаление нельзя отменить.`,"storage.cleanup.quarantineNote":`Файлы перемещаются в .trash под CODEX_HOME. Восстановить можно на вкладке «Карантин».`,"storage.cleanup.cancel":`Отмена`,"storage.cleanup.confirmQuarantine":`В карантин`,"storage.cleanup.confirmPermanent":`Удалить навсегда`,"storage.cleanup.doneQuarantine":`В карантин: {count} файл(ов) ({size}).`,"storage.cleanup.donePermanent":`Удалено навсегда: {count} файл(ов) ({size}).`,"storage.cleanup.previewFailed":`Не удалось выполнить предпросмотр.`,"storage.cleanup.cleanupFailed":`Не удалось выполнить очистку.`,"storage.cleanup.err.codex_busy":`Codex использует state.sqlite — закройте Codex и повторите попытку.`,"storage.cleanup.err.stale_preview":`Архивы изменились после предпросмотра — выполните предпросмотр снова.`,"storage.cleanup.err.restore_pending_overlap":`Выбранные архивы пересекаются с незавершённым восстановлением из корзины — завершите или повторите восстановление.`,"storage.cleanup.err.referenced_history":`Выбранные архивы всё ещё ссылаются из forked или paginated history.`,"storage.cleanup.err.invalid_digest":`Digest предпросмотра отсутствует или недействителен.`,"storage.cleanup.err.invalid_mode":`Режим должен быть quarantine или permanent.`,"storage.cleanup.err.fs_failed":`Ошибка файловой очистки. Часть изменений могла уже примениться — проверьте CODEX_HOME/.trash и указанный путь восстановления.`,"storage.cleanup.err.fs_failed_trash":`Ошибка файловой очистки. Часть изменений могла уже примениться — проверьте {trashDir} и manifest.json на восстанавливаемые файлы.`,"storage.cleanup.err.db_reconcile_failed":`Не удалось обновить базу состояния Codex.`,"storage.cleanup.err.cleanup_failed":`Не удалось выполнить очистку.`,"storage.trash.title":`Карантин`,"storage.trash.help":`Архивные сессии в CODEX_HOME/.trash. Восстановление возвращает JSONL и строки потоков.`,"storage.trash.empty":`Нет записей в карантине.`,"storage.trash.loading":`Загрузка карантина…`,"storage.trash.col.when":`В карантине с`,"storage.trash.col.files":`Файлы`,"storage.trash.col.size":`Размер`,"storage.trash.col.mode":`Режим`,"storage.trash.col.id":`Запись`,"storage.trash.restore":`Восстановить`,"storage.trash.confirmTitle":`Восстановить запись карантина?`,"storage.trash.confirmBody":`Вернуть {count} файл(ов) (~{size}) из {id} в архивные сессии.`,"storage.trash.cancel":`Отмена`,"storage.trash.confirmRestore":`Восстановить`,"storage.trash.done":`Восстановлено {count} файл(ов) ({size}).`,"storage.trash.restoreFailed":`Не удалось восстановить.`,"storage.trash.listFailed":`Не удалось получить список карантина.`,"storage.trash.mode.quarantine":`карантин`,"storage.trash.mode.permanent":`permanent (незавершён)`,"storage.trash.err.codex_busy":`Codex использует state.sqlite — закройте Codex и повторите попытку.`,"storage.trash.err.invalid_trash":`Идентификатор записи корзины отсутствует или недействителен.`,"storage.trash.err.missing_trash":`Запись корзины не найдена.`,"storage.trash.err.dest_exists":`Цель восстановления уже существует — удалите или переименуйте архивный файл и повторите.`,"storage.trash.err.fs_failed":`Ошибка восстановления файлов. Часть файлов могла уже восстановиться — проверьте archived_sessions и .trash.`,"storage.trash.err.storage_mutation_busy":`Выполняется другая очистка или восстановление — повторите позже.`,"storage.trash.err.db_reconcile_failed":`Не удалось восстановить строки базы состояния Codex.`,"storage.trash.err.restore_failed":`Не удалось восстановить.`,"storage.trash.err.restore_worker_timeout":`Восстановление заняло слишком много времени (более 10 минут) и было остановлено.`,"storage.trash.err.restore_worker_aborted":`Восстановление отменено при завершении работы.`,"storage.trash.err.restore_worker_failed":`Worker восстановления завершился с ошибкой или аварийно.`,"storage.policy.title":`Политика автоочистки`,"storage.policy.help":`Необязательная пакетная очистка, когда архивные сессии превышают порог. По умолчанию выкл. — никогда не включается сама.`,"storage.policy.loading":`Загрузка политики…`,"storage.policy.loadFailed":`Не удалось загрузить политику очистки.`,"storage.policy.saveFailed":`Не удалось сохранить политику очистки.`,"storage.policy.runFailed":`Не удалось выполнить политику.`,"storage.policy.alreadyRunning":`Выполнение политики очистки уже выполняется.`,"storage.policy.invalid":`Недопустимые значения политики.`,"storage.policy.enabled":`Включить автоочистку`,"storage.policy.enabledHint":`По умолчанию выкл. При включении работает только по выбранному расписанию (или «Запустить сейчас»).`,"storage.policy.threshold":`Когда размер архива больше (ГиБ)`,"storage.policy.trigger":`Триггер`,"storage.policy.target":`Цель очистки`,"storage.policy.targetPercent":`Удалить самые старые архивы (%)`,"storage.policy.targetReduce":`Уменьшить архив до (ГиБ)`,"storage.policy.thresholdInc":`Увеличить порог`,"storage.policy.thresholdDec":`Уменьшить порог`,"storage.policy.percentInc":`Увеличить процент`,"storage.policy.percentDec":`Уменьшить процент`,"storage.policy.reduceInc":`Увеличить целевой размер`,"storage.policy.reduceDec":`Уменьшить целевой размер`,"storage.policy.schedule":`Расписание`,"storage.policy.schedule.manual":`Только вручную`,"storage.policy.schedule.startup":`При запуске прокси`,"storage.policy.schedule.daily":`Ежедневно`,"storage.policy.schedule.weekly":`Еженедельно`,"storage.policy.mode":`Режим удаления`,"storage.policy.mode.quarantine":`Карантин (по умолчанию)`,"storage.policy.mode.permanent":`Удалить навсегда`,"storage.policy.permanentWarn":`Постоянный режим нельзя отменить. Предпочитайте карантин, если не уверены.`,"storage.policy.lastRun":`Последний запуск`,"storage.policy.lastRunDetail":`Удалено {count} · освобождено {size}`,"storage.policy.nextRun":`Следующий запуск`,"storage.policy.never":`Никогда`,"storage.policy.save":`Сохранить`,"storage.policy.runNow":`Запустить сейчас`,"storage.policy.running":`Выполняется…`,"storage.policy.saved":`Политика сохранена.`,"storage.policy.skippedDisabled":`Политика отключена — сначала включите её.`,"storage.policy.skippedUnder":`Размер архива ниже порога — делать нечего.`,"storage.policy.skippedEmpty":`Нет архивных кандидатов под цель.`,"storage.policy.doneQuarantine":`Политика отправила в карантин {count} файл(ов) ({size}).`,"storage.policy.donePermanent":`Политика навсегда удалила {count} файл(ов) ({size}).`,"modal.addNamed":`Добавить: {label}`,"modal.add":`Добавить провайдера`,"modal.search":`Поиск провайдеров…`,"modal.logInWith":`Войти через {label}`,"modal.waitingBrowser":`Ожидание браузера…`,"modal.providerName":`Название провайдера`,"modal.adapter":`Адаптер`,"modal.baseUrl":`Базовый URL`,"modal.endpoint":`Конечная точка`,"modal.endpoint.tokenPlan":`Пакет токенов`,"modal.endpoint.payAsYouGo":`Оплата по факту`,"modal.endpoint.custom":`Своя`,"modal.defaultModel":`Модель по умолчанию (необязательно)`,"modal.allowPrivateNetwork":`Разрешить локальную/частную сеть`,"modal.allowPrivateNetworkHint":`Включайте только для провайдеров, намеренно развёрнутых у себя. Конечные точки метаданных остаются заблокированными.`,"modal.nameRequired":`Укажите название провайдера`,"modal.baseUrlRequired":`Укажите базовый URL`,"modal.networkError":`Ошибка сети — запущен ли прокси?`,"modal.loginFailStart":`Не удалось начать вход`,"modal.waitingLogin":`Ожидание входа в браузере…`,"modal.loggingIn":`Выполняется вход…`,"modal.loginTimeout":`Время входа истекло — попробуйте ещё раз.`,"modal.back":`Назад`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`Свой провайдер`,"modal.failedStatus":`Ошибка ({status})`,"modal.loginError":`Ошибка входа: {error}`,"modal.badge.codexLogin":`Вход через Codex`,"modal.badge.local":`Локальный`,"modal.badge.apiKey":`API-ключ`,"modal.badge.direct":`Прямой`,"modal.badge.pool":`Пул`,"modal.badge.free":`Бесплатно`,"modal.invalidPreset":`Этот встроенный пресет провайдера неполный. Перезапустите прокси и попробуйте ещё раз.`,"modal.freeTierTitle":`Бесплатный тариф`,"modal.freeTierDefault":`API-ключ не нужен. Работает из коробки.`,"modal.tab.accounts":`Аккаунты`,"modal.tab.free":`Бесплатные`,"modal.tab.paid":`Платные`,"modal.accountsHint":`Здесь можно войти в аккаунты ChatGPT/Codex и OAuth-провайдеров, а также в аккаунты с API-ключами. Провайдер OpenAI уже встроен — просто войдите, а не добавляйте его заново.`,"modal.accountsCodexAuthLink":`Аутентификация Codex`,"modal.notListed":`Нет нужного провайдера? Добавьте свой`,"modal.catalogLoading":`Загрузка каталога…`,"modal.accountLogin":`Войти`,"modal.accountLogout":`Выйти`,"modal.accountAdd":`Добавить аккаунт`,"modal.accountManage":`Управление`,"modal.accountCodexPool":`Пул аккаунтов ChatGPT`,"modal.accountLoggedIn":`Вход выполнен`,"modal.accountLoggedOut":`Вход не выполнен`,"quota.fiveHourLimit":`5-часовой лимит`,"quota.weeklyLimit":`Недельный лимит`,"quota.monthlyLimit":`30-дневный лимит`,"quota.monthlyCredits":`Месячный лимит`,"quota.requestWindow":`Окно запросов`,"quota.grokBuild":`GrokBuild`,"quota.cursorFirstParty":`Собственные модели`,"quota.cursorApiUsage":`Использование API`,"quota.totalSubscriptionCredits":`Всего кредитов подписки`,"quota.usedPercent":`Использовано {pct}%`,"quota.limitReached":`Лимит исчерпан`,"quota.resetsToday":`Сброс сегодня в {time}`,"quota.resetsTomorrow":`Сброс завтра в {time}`,"quota.resetsAt":`Сброс: {when}`,"quota.resetsRelativeMinutes":`Сброс через {n} мин`,"quota.resetsRelativeHours":`Сброс через {n} ч`,"pws.status.ready":`Готов`,"pws.status.needsSetup":`Требуется настройка`,"pws.status.needsAttention":`Требует внимания`,"pws.auth.chatgptPassthrough":`Сквозной режим ChatGPT`,"pws.auth.noKey":`Ключ не нужен`,"pws.freeTitle":`Бесплатный тариф (ключ всё же может потребоваться)`,"pws.localTitle":`Локальная среда выполнения`,"pws.modelCountOne":`1 модель`,"pws.modelCount":`{count} моделей`,"pws.rail.suffixDefault":` · по умолчанию`,"pws.rail.suffixLocal":` · локальный`,"pws.rail.suffixFree":` · бесплатный`,"pws.rail.selectAria":`Выбрать {name} — {status}{suffix}`,"pws.searchPlaceholder":`Поиск провайдеров…`,"pws.filterAria":`Фильтр провайдеров`,"pws.providerFiltersAria":`Фильтры провайдеров`,"pws.filters":`Фильтры`,"pws.filterStatus":`Статус`,"pws.pricing":`Тариф`,"pws.paid":`Платные`,"pws.filterType":`Тип`,"pws.type.cloud":`Облачные`,"pws.type.local":`Локальные`,"pws.type.selfHosted":`Свой хостинг`,"pws.type.login":`Вход`,"pws.sort":`Сортировка`,"pws.sortProvidersAria":`Сортировка провайдеров`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`Сначала бесплатные`,"pws.sort.paidFree":`Сначала платные`,"pws.sort.accountsFirst":`Сначала с аккаунтами`,"pws.resetAll":`Сбросить всё`,"pws.providerList":`Список провайдеров`,"pws.providersAria":`Провайдеры`,"pws.groupReady":`Готовы ({count})`,"pws.groupNeedsSetup":`Требуется настройка ({count})`,"pws.groupDisabled":`Отключены ({count})`,"pws.noSearchResults":`По вашему запросу провайдеры не найдены.`,"pws.noMatchFilters":`Нет провайдеров, соответствующих фильтрам.`,"pws.noProvidersConfigured":`Провайдеры не настроены.`,"pws.workspaceMainAria":`Сведения о провайдере`,"pws.detailComingSoon":`Подробный вид скоро появится — для управления этим провайдером используйте классический вид.`,"pws.selectPrompt":`Выберите провайдера из списка.`,"pws.connectFirst":`Подключите первого провайдера`,"pws.empty.browseFree":`Посмотреть бесплатных провайдеров`,"pws.empty.browseFreeDesc":`Начните без подписки`,"pws.empty.connectAccount":`Подключить аккаунт`,"pws.empty.connectAccountDesc":`Войдите через ChatGPT или аккаунт провайдера`,"pws.empty.addEndpoint":`Добавить конечную точку`,"pws.empty.addEndpointDesc":`Свой базовый URL и API-ключ`,"pws.tab.overview":`Обзор`,"pws.tab.models":`Модели`,"pws.tab.usage":`Использование`,"pws.tab.accounts":`Аккаунты`,"pws.tab.settings":`Настройки`,"pws.connection":`Подключение`,"pws.status.connected":`Подключено`,"pws.attentionTitle":`Требует внимания`,"pws.attention.reauth":`Активному аккаунту требуется повторная аутентификация`,"pws.attention.reauthForward":`Активному аккаунту Codex требуется повторная аутентификация — откройте вкладку «Аккаунты», чтобы исправить`,"pws.attention.missingCredentials":`Отсутствуют учётные данные`,"pws.cell.auth":`Аутентификация`,"pws.cell.note":`Заметка`,"pws.cell.defaultModel":`Модель по умолчанию`,"pws.statsAria":`Статистика провайдера`,"pws.statsTitle":`Статистика`,"pws.stats.totalRequests":`Запросы (30 дн.)`,"pws.stats.totalTokens":`Токены (30 дн.)`,"pws.stats.quotaUpdated":`Квота обновлена`,"pws.stats.quotaTracked":`Лимиты запросов отслеживаются на вкладке «Использование».`,"pws.stats.source":`Источник`,"pws.usageLast30d":`Использование (последние 30 дней)`,"pws.estimatedCost":`Ориентировочная стоимость`,"pws.costDisclaimer":`Оценка на основе публичных цен API, не фактический счёт.`,"pws.modelBreakdown":`Разбивка по моделям`,"pws.col.model":`Модель`,"pws.col.cost":`Ориент. стоимость`,"pws.col.tokens":`Токены`,"pws.col.requests":`Запр.`,"pws.col.share":`Доля`,"pws.tokenInput":`Вход`,"pws.tokenOutput":`Выход`,"pws.metricRequests":`запросов`,"pws.metricTokens":`токенов`,"pws.usageUnavailable":`Использование пока не зафиксировано.`,"pws.rateLimits":`Лимиты запросов`,"pws.quotaUnavailable":`Нет данных о квоте для этого провайдера.`,"pws.accountQuotaUnavailable":`Данные о лимитах временно недоступны; при наличии показываются последние известные значения.`,"pws.accountPlan":`План аккаунта`,"pws.accountPlanOnly":`{plan} — нет месячного пула кредитов (Grok CLI OAuth не отдаёт веб-квоты задач).`,"pws.selected":`Выбрана`,"pws.copyModelId":`Копировать ID`,"pws.modelCopied":`Скопировано!`,"pws.modelsAvailable":`Доступно: {count}`,"pws.modelSearchPlaceholder":`Фильтр моделей…`,"pws.modelsLoading":`Загрузка моделей…`,"pws.modelsLoadFailed":`Не удалось загрузить модели.`,"pws.modelsNeedsReauth":`Для автоматического обнаружения моделей необходимо повторно войти в аккаунт. Пока отображаются настроенные модели.`,"pws.modelsConfiguredFallback":`Отображаются настроенные модели (автоматическое обнаружение недоступно).`,"pws.modelsTruncated":`Показаны первые {shown} моделей из {total}. Примените фильтр, чтобы сузить список.`,"pws.retry":`Повторить`,"pws.noModels":`Для этого провайдера модели не обнаружены.`,"pws.noModelMatch":`Нет моделей, соответствующих фильтру.`,"pws.adapterBaseRequired":`Укажите адаптер и базовый URL.`,"pws.addAccount":`Добавить аккаунт`,"pws.addKey":`Добавить API-ключ`,"pws.apiKeys":`API-ключи`,"pws.authMode":`Режим аутентификации`,"pws.availableAccounts":`Доступные аккаунты`,"pws.accountOrdinal":`Аккаунт {count}`,"pws.accountsLoading":`Загрузка аккаунтов…`,"pws.accountsLoadFailed":`Не удалось загрузить аккаунты.`,"pws.retryAccounts":`Повторить`,"pws.noAccounts":`Аккаунты пока не подключены.`,"pws.accountSwitching":`Переключение…`,"pws.accountCurrent":`Текущий аккаунт`,"pws.defaultModelNone":`Нет (использовать значение провайдера)`,"pws.discardSettings":`Не сохранять`,"pws.jsonEditorDesc":`Редактируйте исходную JSON-конфигурацию провайдера. Изменения сохраняются сразу.`,"pws.jsonEditorTitle":`Редактор JSON — {name}`,"pws.jsonRestore":`Восстановить`,"pws.jsonSave":`Сохранить`,"pws.loggedInTitle":`Вход выполнен`,"pws.notLoggedInTitle":`Вход не выполнен`,"pws.note":`Заметка`,"pws.allowPrivateNetwork":`Разрешить локальную/частную сеть`,"pws.liveModels":`Обнаруживать модели провайдера`,"pws.liveModelsDesc":`Загружать актуальный каталог моделей провайдера. Выключите, чтобы использовать только настроенные статические модели.`,"pws.optionalPlaceholder":`Необязательно`,"pws.providerId":`ID провайдера`,"pws.reauth":`Нужна переавторизация`,"pws.reauthenticate":`Переавторизоваться`,"pws.copyDoctor":`Скопировать ocx doctor`,"pws.doctorCopied":`Скопировано`,"pws.healthCooldownHint":`Дождитесь окончания паузы. Пока не проверяйте эту учётную запись.`,"pws.doctorCopyUnavailable":`Буфер обмена недоступен`,"pws.healthLabel.rateLimited":`Ограничение частоты`,"pws.healthLabel.quotaLimited":`Ограничение квоты`,"pws.healthLabel.reauthRequired":`Требуется повторная аутентификация`,"pws.healthLabel.refreshFailed":`Ошибка обновления`,"pws.healthLabel.metadataMismatch":`Несоответствие метаданных`,"pws.healthLabel.credentialConflict":`Конфликт учётных данных`,"pws.healthSummary.rateLimited":`{provider} {account}: ограничение частоты до {until}. Маршрутизация этой учётной записи приостановлена до этого времени.`,"pws.healthSummary.quotaLimited":`{provider} {account}: квота ограничена до {until}. Маршрутизация этой учётной записи приостановлена до этого времени.`,"pws.healthSummary.reauthRequired":`{provider} {account}: требуется повторная аутентификация.`,"pws.healthSummary.credentialConflict":`{provider} {account}: конфликт учётных данных.`,"pws.healthSummary.metadataMismatch":`{provider} {account}: несоответствие метаданных.`,"pws.healthSummary.staleCredentials":`{provider} {account}: неполные учётные данные.`,"pws.removeConfirm":`Удалить`,"pws.removeConfirmBody":`Удалить провайдера "{name}"? Это действие нельзя отменить.`,"pws.removeDefaultConfirmBody":`Удалить провайдера по умолчанию "{name}"? "{defaultProvider}" станет провайдером по умолчанию. Это действие нельзя отменить.`,"pws.removeConfirmTitle":`Удалить провайдера`,"pws.saveSettings":`Сохранить`,"pws.saving":`Сохранение…`,"pws.settingsSaved":`Настройки сохранены.`,"pws.settingsUnsavedBar":`Есть несохранённые изменения.`,"pws.unsavedLeaveBody":`Есть несохранённые изменения. Сохранить их перед переходом?`,"pws.unsavedLeaveTitle":`Несохранённые изменения`,"pws.attentionRequired":`Требуется внимание`,"pws.attentionAria":`{name}: {reason}`,"pws.missingCredentials":`Отсутствуют учётные данные`,"pws.editJsonDesc":`Редактировать конфигурацию прокси в формате JSON`,"pws.updatesUnavailable":`Обновление провайдера недоступно.`,"pws.dashboard.title":`Обзор провайдеров`,"pws.dashboard.subtitle":`Управляйте всеми провайдерами моделей в одном месте.`,"pws.dashboard.rateLimits":`Лимиты запросов`,"pws.dashboard.recentlyUsed":`Недавно использованные`,"pws.dashboard.requests":`{count} запросов`,"pws.dashboard.checkedAgo":`Проверено {time}`,"pws.dashboard.noQuota":`Нет данных о квоте`,"pws.dashboard.noUsage":`Данных об использовании пока нет`,"pws.dashboard.noRateLimits":`Данных о лимитах пока нет`,"pws.allProviders":`Обзор провайдеров`,"pws.enabledLabel":`Включён`,"pws.testConnection":`Проверить подключение`,"pws.testing":`Проверка…`,"pws.connectionOk":`Подключение успешно`,"pws.connectionFailed":`Ошибка подключения`,"pws.connectionNotApplicable":`Не применимо — этот провайдер использует статический каталог моделей.`,"pws.editSettings":`Изменить настройки`,"pws.viewUsage":`Подробнее об использовании`,"pws.allSystemsOk":`Все системы работают штатно`,"pws.apiKeyConfigured":`API-ключ настроен`,"pws.addApiKey":`Добавить API-ключ`,"pws.loggedInAs":`Выполнен вход как {email}`,"pws.notLoggedIn":`Вход не выполнен`,"pws.passthrough":`Сквозной режим Codex`,"pws.notes":`Заметки`,"pws.notePlaceholder":`Добавьте заметку об этом провайдере...`,"pws.noteSaved":`Заметка сохранена`,"pws.authSummary":`Аутентификация`,"time.justNow":`Только что`,"time.notChecked":`Не проверялось`,"time.minutesAgo":`{n} мин назад`,"time.hoursAgo":`{n} ч назад`,"time.daysAgo":`{n} дн. назад`,"modal.noMatch":`Ничего не найдено.`,"modal.oauthDefaultNote":`Войдите со своим аккаунтом — API-ключ не нужен.`,"modal.oauthComingSoon":`Вход через OAuth для {label} появится в следующем обновлении. Пока используйте API-ключ.`,"modal.oauthComingSoonShort":`Вход через OAuth для этого провайдера появится в следующем обновлении — пока используйте API-ключ.`,"modal.useApiKeyInstead":`Использовать API-ключ`,"modal.setupGuide":`Инструкция по настройке`,"modal.setupStep1Prefix":`Откройте`,"modal.setupDashboardLink":`панель управления {label}`,"modal.setupStep1Suffix":`и скопируйте свой API-ключ`,"modal.setupStep2":`Вставьте его в поле «API-ключ» ниже`,"modal.setupStep3":`Нажмите «Добавить провайдера» — модели будут обнаружены автоматически`,"modal.namePlaceholder":`напр. openrouter`,"modal.duplicateWarn":`Провайдер "{name}" уже существует и будет перезаписан.`,"modal.forwardHintPrefix":`Ключ не нужен — прокси передаёт ваши учётные данные`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`этому провайдеру.`,"modal.localHint":`API-ключ не сохраняется. Будет добавлен статический публичный каталог моделей Cursor для Codex, но живой транспорт Cursor и нативное выполнение файловых и shell-операций остаются отключёнными до прохождения аудита.`,"modal.getApiKey":`Получить API-ключ {label}`,"modal.apiKey":`API-ключ`,"modal.apiKeyTransport":`Заголовок API-ключа`,"modal.apiKeyTransportNative":`x-api-key (нативный Anthropic)`,"modal.apiKeyTransportBearer":`Authorization: Bearer`,"modal.apiKeyPlaceholder":`sk-… (или $ENV_VAR)`,"modal.defaultModelPlaceholder":`напр. gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.baseUrlPlaceholderError":`Базовый URL содержит незаменённый {placeholder}. Замените его реальным значением.`,"modal.baseUrlPlaceholderHint":`Перед добавлением замените {placeholder} в базовом URL на реальный ID аккаунта.`,"modal.adding":`Добавление…`,"modal.useOauthLogin":`← Войти через OAuth`,"nav.codexAuth":`Аутентификация Codex`,"nav.api":`API`,"nav.openMenu":`Открыть меню`,"nav.closeMenu":`Закрыть меню`,"codexAuth.mainAccount":`Основной аккаунт`,"codexAuth.codexApp":`Codex App`,"codexAuth.appLogin":`Вход через приложение`,"codexAuth.accountPool":`Пул аккаунтов`,"codexAuth.accountModeTitle":`Режим аккаунта OpenAI`,"codexAuth.accountModePool":`Режим пула`,"codexAuth.accountModePoolDesc":`Основной вход и подходящие добавленные аккаунты работают здесь в ротации.`,"codexAuth.accountModeDirect":`Прямой режим`,"codexAuth.accountModeDirectDesc":`Запросы используют только основной вход; добавленные аккаунты сохраняются для режима пула.`,"codexAuth.openaiMissing":`Встроенный провайдер OpenAI не настроен.`,"codexAuth.openaiDisabled":`Встроенный провайдер OpenAI отключён.`,"codexAuth.openaiUnavailableDesc":`Ваши аккаунты OpenAI по-прежнему доступны. Включите провайдера для маршрутизации запросов Codex.`,"codexAuth.enableOpenai":`Включить OpenAI`,"codexAuth.enablingOpenai":`Включение...`,"codexAuth.enableOpenaiFailed":`Не удалось включить провайдер OpenAI.`,"codexAuth.openaiPresetLoadFailed":`Не удалось загрузить пресет провайдера OpenAI.`,"codexAuth.openaiPresetUnavailable":`Пресет провайдера OpenAI недоступен.`,"codexAuth.openProviders":`Открыть провайдеров`,"codexAuth.add":`Добавить`,"codexAuth.refreshQuota":`Обновить квоты`,"codexAuth.refreshingQuota":`Обновление...`,"codexAuth.quotaRefreshed":`Квоты обновлены`,"codexAuth.quotaRefreshFailed":`Не удалось обновить квоты`,"codexAuth.pauseExhausted":`Приостановить исчерпанные`,"codexAuth.pausingExhausted":`Проверка квот...`,"codexAuth.pauseExhaustedSucceeded":`Приостановлено аккаунтов на лимите: {count}`,"codexAuth.pauseExhaustedNone":`Нет аккаунтов с подтверждённым использованием 100%.`,"codexAuth.pauseExhaustedFailed":`Не удалось проверить и приостановить исчерпанные аккаунты.`,"codexAuth.noPool":`В пул ещё не добавлено ни одного аккаунта.`,"codexAuth.pause":`Приостановить`,"codexAuth.resume":`Возобновить`,"codexAuth.paused":`ПРИОСТАНОВЛЕН`,"codexAuth.pauseSucceeded":`Аккаунт {email} приостановлен`,"codexAuth.resumeSucceeded":`Аккаунт {email} снова доступен в пуле`,"codexAuth.pauseFailed":`Не удалось приостановить {email}. Изменений нет.`,"codexAuth.resumeFailed":`Не удалось возобновить {email}. Изменений нет.`,"codexAuth.pausedHint":`До возобновления исключён из автоматического переключения, повторов, восстановления после задержки и ручного выбора.`,"codexAuth.fiveHour":`5 ч`,"codexAuth.weekly":`Неделя`,"codexAuth.monthly":`30 дн.`,"codexAuth.resets":`сброс`,"codexAuth.today":`сегодня`,"codexAuth.current":`ТЕКУЩИЙ`,"codexAuth.nextSession":`ВЫБРАН`,"codexAuth.poolPrepared":`ГОТОВ ДЛЯ ПУЛА`,"codexAuth.preparePoolTitle":`Подготовить этот аккаунт для режима пула?`,"codexAuth.preparePoolDesc":`Прямые запросы продолжат использовать основной вход. Когда режим пула будет включён, этот аккаунт станет подготовленным выбором пула.`,"codexAuth.prepareForPool":`Подготовить для пула`,"codexAuth.poolPreparedToast":`{email} подготовлен для режима пула`,"codexAuth.switchTitle":`Сменить активный аккаунт?`,"codexAuth.switchDesc":`Изменение применяется к следующему запросу существующих и новых сессий Codex. Выполняющиеся запросы сохраняют прежний аккаунт.`,"codexAuth.cacheWarning":`После любой смены аккаунта OpenCodex воспроизводит контекст разговора, но кэш промптов на стороне провайдера может быть холодным.`,"codexAuth.setAsNext":`Выбрать аккаунт`,"codexAuth.cancel":`Отмена`,"codexAuth.switchBack":`Вернуться на основной аккаунт?`,"codexAuth.switchBackDesc":`Следующий запрос существующих и новых сессий Codex будет использовать аккаунт входа через приложение.`,"codexAuth.autoSwitch":`Проактивное переключение по использованию`,"codexAuth.autoSwitchQuotaDesc":`Квота: при использовании {threshold}% или выше следующий запрос может перейти на подходящий аккаунт с меньшим использованием, включая уже привязанную задачу; Go/Free используют только 30 дней.`,"codexAuth.autoSwitchQuotaOffDesc":`Проактивное переключение по использованию выключено. Назначение новых/непривязанных задач и восстановление после сбоев остаются активными.`,"codexAuth.autoSwitchRoundRobinDesc":`Round-robin не использует этот порог и продолжает ротировать новые/непривязанные задачи.`,"codexAuth.autoSwitchFillFirstDesc":`Fill-first: {threshold}% — порог исчерпания для новых/непривязанных задач; здоровые привязанные задачи сохраняют аккаунт.`,"codexAuth.autoSwitchFillFirstOffDesc":`У fill-first нет порога использования для новых/непривязанных задач; cooldown, повторная аутентификация и восстановление после сбоев всё ещё могут менять маршрутизацию.`,"codexAuth.failureRecoveryNote":`Восстановление после сбоев выполняется отдельно: отказ 429/402 до вывода, cooldown, повторная аутентификация, исключение или настроенный failover могут выбрать другой подходящий аккаунт.`,"codexAuth.autoSwitchThreshold":`Порог использования`,"codexAuth.autoSwitchThresholdAria":`Порог использования в процентах`,"codexAuth.autoSwitchThresholdInc":`Увеличить порог использования`,"codexAuth.autoSwitchThresholdDec":`Уменьшить порог использования`,"codexAuth.autoSwitchLoadFailed":`Не удалось загрузить настройку переключения по использованию.`,"codexAuth.autoSwitchThresholdInvalid":`Введите целое число от 1 до 100`,"codexAuth.autoSwitchUpdated":`Проактивное переключение по использованию обновлено`,"codexAuth.autoSwitchUpdateFailed":`Не удалось подтвердить обновление переключения по использованию. Показано последнее подтверждённое значение.`,"anthropicPool.title":`Пул аккаунтов Claude (экспериментально)`,"anthropicPool.enabledDesc":`При 429 аккаунт охлаждается и выполняется переключение. Новые сессии предпочитают использование ниже {threshold}% (полоса 5 часов).`,"anthropicPool.disabledDesc":`Используется только активный аккаунт Claude. Включайте только если принимаете экспериментальную маршрутизацию.`,"anthropicPool.experimentalWarning":`Экспериментально и недостаточно проверено. Anthropic может ограничить аккаунты, похожие на автоматическую ротацию. Одна организация может делить квоту — пул таких аккаунтов не поможет. Оставляйте выключенным, если не понимаете риск.`,"anthropicPool.needTwoAccounts":`Перед включением пула добавьте минимум два OAuth-аккаунта Claude.`,"anthropicPool.threshold":`Порог использования для новых сессий`,"anthropicPool.thresholdAria":`Порог использования для новых сессий в процентах`,"anthropicPool.thresholdHelp":`0 отключает выбор по квоте (только аффинити + активный аккаунт). По умолчанию 80.`,"anthropicPool.thresholdInvalid":`Введите целое число от 0 до 100`,"anthropicPool.loadFailed":`Не удалось загрузить настройки пула Claude.`,"anthropicPool.saveFailed":`Не удалось сохранить настройки пула Claude.`,"anthropicPool.on":`Вкл`,"anthropicPool.off":`Выкл`,"accountPool.strategy":`Стратегия ротации`,"accountPool.strategyDesc":`Как OpenCodex назначает аккаунт новой/непривязанной задаче.`,"accountPool.strategyQuota":`Квота`,"accountPool.strategyRoundRobin":`Round-robin`,"accountPool.strategyFillFirst":`Fill-first`,"accountPool.strategyHintQuota":`Quota может перепривязать существующую задачу при следующем запросе после превышения порога использования.`,"accountPool.strategyHintRoundRobin":`Round-robin ротирует только задачи без действующей привязки; порог использования не меняет обычную ротацию.`,"accountPool.strategyHintFillFirst":`Fill-first использует порог как точку исчерпания для непривязанных задач; здоровые привязанные задачи сохраняют affinity.`,"accountPool.unboundDefinition":`Новая/непривязанная задача — запрос без текущей привязки к аккаунту; видимая существующая задача может стать непривязанной после сброса прокси или affinity.`,"accountPool.stickyLimit":`Назначений новых/непривязанных задач до ротации`,"accountPool.stickyLimitAria":`Назначений новых/непривязанных задач до ротации`,"accountPool.stickyLimitInc":`Увеличить sticky-лимит`,"accountPool.stickyLimitDec":`Уменьшить sticky-лимит`,"accountPool.stickyLimitHelp":`Назначить выбранному аккаунту столько новых/непривязанных задач перед переходом дальше; счётчик растёт при привязке задачи, а не после успеха upstream.`,"accountPool.stickyLimitInvalid":`Введите целое число от 1 до 100`,"accountPool.strategyLoadFailed":`Не удалось загрузить стратегию ротации.`,"accountPool.strategyUpdateFailed":`Не удалось сохранить стратегию ротации.`,"codexAuth.switched":`{email} выбран для следующего запроса`,"codexAuth.loadFailed":`Не удалось загрузить настройки аккаунтов Codex.`,"codexAuth.switchFailed":`Не удалось переключить аккаунт. Ваш предыдущий выбор не изменён.`,"codexAuth.removeConfirm":`Удалить {id}?`,"codexAuth.removeFailed":`Не удалось удалить аккаунт. Ничего не изменено.`,"codexAuth.addTitle":`Добавить аккаунт Codex`,"codexAuth.addIdLabel":`ID аккаунта (slug)`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team...`,"codexAuth.resetCreditsAria":`Кредитов сброса: {count}`,"codexAuth.addJsonLabel":`Содержимое auth.json`,"codexAuth.addHelp":`Скопируйте из ~/.codex/auth.json на другой машине или используйте codex-auth export.`,"codexAuth.importBtn":`Импортировать`,"codexAuth.importInvalidJson":`Некорректный JSON`,"codexAuth.importMissingTokens":`В JSON отсутствует access_token или refresh_token`,"codexAuth.importMissingId":`Укажите ID аккаунта`,"codexAuth.accountAdded":`Аккаунт добавлен в пул`,"codexAuth.addPickDesc":`Войдите в другой аккаунт ChatGPT, чтобы добавить его в пул.`,"codexAuth.oauthLogin":`Вход через OAuth`,"codexAuth.oauthDesc":`Открывает вход ChatGPT в браузере`,"codexAuth.importAuthJson":`Импорт auth.json`,"codexAuth.importAuthJsonDesc":`Из другой установки Codex или через codex-auth export`,"codexAuth.back":`Назад`,"codexAuth.oauthAlreadyInProgress":`Вход уже выполняется. Завершите его в браузере.`,"codexAuth.oauthWaiting":`Ожидание завершения входа ChatGPT в браузере...`,"codexAuth.oauthSubmittingCode":`Отправка кода…`,"codexAuth.oauthCodeSubmitted":`Код отправлен — ждём завершения входа…`,"codexAuth.oauthStatusRetrying":`При проверке статуса входа возникла сетевая ошибка или ошибка прокси — повторяем…`,"codexAuth.oauthCancelled":`Вход отменён.`,"codexAuth.loginFailed":`Не удалось войти`,"codexAuth.needsReauth":`Повторный вход`,"codexAuth.reauthenticate":`Переавторизоваться`,"codexAuth.tokenExpired":`Токен истёк — переавторизуйте этот аккаунт`,"codexAuth.mainTokenExpired":`Токен истёк — повторите вход через приложение Codex`,"codexAuth.emailCollision":`Этот аккаунт совпадает с вашим основным входом Codex. Используйте другой аккаунт.`,"codexAuth.resetCreditsTitle":`Кредиты сброса`,"codexAuth.resetCreditsAvailable":`У вас доступно кредитов сброса: {count}.`,"codexAuth.resetCreditsDesc":`Каждый кредит мгновенно сбрасывает ваши текущие часовые и недельные лимиты использования.`,"codexAuth.noResetCredits":`У вас нет кредитов сброса.`,"codexAuth.earnCreditsHint":`Кредиты начисляются ежемесячно и по реферальной программе.`,"codexAuth.creditsExpireNote":`Кредиты истекают через 30 дней после начисления.`,"codexAuth.useOneCredit":`Использовать 1 кредит`,"codexAuth.confirmResetTitle":`Использовать кредит сброса?`,"codexAuth.confirmResetDesc":`Текущие лимиты запросов будут мгновенно сброшены. У вас осталось кредитов: {count}.`,"codexAuth.irreversible":`Это действие нельзя отменить.`,"codexAuth.useCredit":`Использовать кредит`,"codexAuth.redeeming":`Сброс...`,"codexAuth.resetSuccess":`Лимиты запросов сброшены! Осталось кредитов: {remaining}.`,"codexAuth.resetSuccessGeneric":`Лимиты запросов сброшены!`,"codexAuth.resetAlreadyRedeemed":`Этот кредит уже был использован. Количество кредитов не изменилось.`,"codexAuth.resetNothingToReset":`Сейчас ни одно окно лимитов не требует сброса.`,"codexAuth.resetNoCredit":`Нет доступных кредитов сброса.`,"codexAuth.resetError":`Не удалось использовать кредит сброса. Попробуйте ещё раз.`,"codexAuth.fifoNote":`Первым используется самый старый кредит.`,"codexAuth.confirmWhichCredit":`Будет использован кредит от {date}.`,"codexAuth.creditNext":`Следующий к использованию`,"codexAuth.creditLabel":`Кредит №{n}`,"codexAuth.creditNextBadge":`СЛЕД.`,"codexAuth.creditGranted":`Начислен {date}`,"codexAuth.creditExpires":`Истекает {date} (осталось {days} дн.)`,"api.title":`Доступ по API`,"api.subtitle":`Сгенерированные API-ключи дают внешним приложениям доступ к прокси opencodex. Аутентификация — через заголовок {authHeader}; какие заголовки принимает каждый эндпоинт, смотрите в таблице ниже.`,"api.endpointNote":`Используйте базовый URL с OpenAI-совместимыми клиентами. Responses и Chat Completions доступны под /v1.`,"api.baseUrl":`Базовый URL`,"api.responsesEndpoint":`Responses API`,"api.chatCompletionsEndpoint":`Chat Completions API`,"api.messagesEndpoint":`Messages API`,"api.modelsEndpoint":`Models API`,"api.endpointsTitle":`Конечные точки`,"api.authTitle":`Аутентификация`,"api.authBaseUrlNote":`Настройте клиентов с базовым URL, затем выберите нужный протокольный endpoint ниже.`,"api.authLoopback":`Loopback-привязки (127.0.0.1 или ::1) обходят аутентификацию. Для удалённых привязок нужен сгенерированный ocx_-ключ или OPENCODEX_API_AUTH_TOKEN.`,"api.modelsTitle":`Каталог внешних моделей`,"api.modelsCount":`{count} доступно`,"api.modelsSearch":`Поиск моделей`,"api.modelsSubtitle":`Используйте эти точные ID моделей с /v1/models и выбранным входящим протоколом.`,"api.modelsLoading":`Загрузка моделей…`,"api.modelsLoadFailed":`Не удалось загрузить каталог внешних моделей.`,"api.modelsEmpty":`Пока нет внешне доступных моделей.`,"api.modelsNoMatch":`Нет моделей, соответствующих «{query}».`,"api.colModel":`Модель`,"api.colSource":`Источник`,"api.colProtocols":`Протоколы`,"api.copyModelId":`Копировать ID`,"api.modelCopied":`Скопировано`,"api.testModel":`Тест`,"api.testingModel":`Тестирование…`,"api.testSucceeded":`OK`,"api.testFailed":`Ошибка`,"api.protocolResponses":`Responses`,"api.protocolChatCompletions":`Chat Completions`,"api.protocolMessages":`Messages`,"api.sourceNative":`Пул ChatGPT`,"api.sourceCombo":`Combo-маршрут`,"api.sourceCustom":`Пользовательская`,"api.usageResponsesTitle":`Пример Responses`,"api.usageChatTitle":`Пример Chat Completions`,"api.usageMessagesTitle":`Пример Messages`,"api.newKeyTitle":`Создан новый ключ`,"api.newKeyNote":`Скопируйте ключ сейчас — он больше не будет показан.`,"api.copy":`Копировать`,"api.copied":`Скопировано`,"api.dismiss":`Закрыть`,"api.generateTitle":`Сгенерировать ключ`,"api.keyNamePlaceholder":`Имя ключа (необязательно)`,"api.generate":`Сгенерировать`,"api.generating":`Создание…`,"api.activeKeys":`Активные ключи ({count})`,"api.activeKeysLoading":`Активные ключи`,"api.noKeys":`API-ключей пока нет. Сгенерируйте ключ выше.`,"api.workspace.sections":`Разделы API`,"api.section.keys":`Ключи`,"api.section.connect":`Подключение`,"api.section.endpoints":`Эндпоинты`,"api.section.models":`Модели`,"api.section.examples":`Примеры`,"api.workspace.details":`Сведения об API-ключе`,"api.workspace.keyDetails":`Сведения о ключе`,"api.workspace.keyPrefix":`Префикс ключа`,"api.workspace.deleteKey":`Удалить ключ`,"api.workspace.deleteConfirm":`Удалить этот ключ? Это действие нельзя отменить.`,"api.workspace.usageExamples":`Примеры использования`,"api.copyUrlHint":`Нажмите, чтобы скопировать URL`,"api.urlCopied":`URL скопирован`,"api.copyExampleHint":`Нажмите, чтобы скопировать пример`,"api.exampleCopied":`Пример скопирован`,"api.colName":`Имя`,"api.colKey":`Ключ`,"api.colCreated":`Создан`,"api.confirm":`Подтвердить`,"api.deleteAria":`Удалить API-ключ`,"api.usageSampleInput":`Привет, мир!`,"api.clientConfig.title":`Конфигурация клиента`,"api.clientConfig.rowsLabel":`Подключение клиента`,"api.clientConfig.details":`Подробнее`,"api.clientConfig.detailsAria":`Подробности конфигурации {client}`,"api.clientConfig.copyAria":`Скопировать JSON конфигурации {client}`,"api.clientConfig.downloadAria":`Скачать конфигурацию {client}`,"api.clientConfig.rowMeta":`{destination} · моделей: {count}`,"api.clientConfig.rowError":`Не удалось собрать конфигурацию {client}.`,"api.clientConfig.copiedAnnounceClient":`JSON конфигурации {client} скопирован в буфер обмена.`,"api.clientConfig.clientOpencode":`OpenCode`,"api.clientConfig.clientPi":`Pi`,"api.clientConfig.copy":`Копировать JSON`,"api.clientConfig.download":`Скачать`,"api.clientConfig.loading":`Формируется конфигурация клиента…`,"api.clientConfig.jsonLabel":`JSON конфигурации {client}`,"api.clientConfig.destination":`Целевой файл`,"api.clientConfig.envHint":`Задайте ключ перед запуском`,"api.clientConfig.mergeWarning":`Объедините это с целевым файлом. Замена удалит ваши другие провайдеры и настройки MCP.`,"api.clientConfig.modelCount":`Экспортировано моделей: {count}`,"api.clientConfig.missingLimits":`У {count} из {total} моделей нет лимита контекста; клиент применит свои значения по умолчанию.`,"api.clientConfig.noKeyYet":`Для {env} пока нет ключа. Создайте ключ выше, прежде чем использовать конфигурацию вне loopback.`,"api.clientConfig.loadFailed":`Не удалось прочитать список моделей, поэтому конфигурация клиента не создана.`,"api.clientConfig.copiedAnnounce":`JSON конфигурации клиента скопирован в буфер обмена.`,"api.clientConfig.copyFailed":`Не удалось скопировать JSON конфигурации клиента.`,"api.clientConfig.downloadedAnnounce":`Файл {filename} скачан. Пока ничего не изменилось — объедините его с {destination} самостоятельно.`,"api.clientConfig.whereDisclosure":`Куда положить этот файл`,"api.clientConfig.whereBody":`Путь выше — глобальное расположение. Файл конфигурации проекта в рабочем каталоге имеет приоритет, а ключ читается из переменной окружения, указанной в конфигурации, и никогда не хранится в этом файле.`,"api.keysLoadFailed":`Не удалось загрузить API-ключи.`,"api.createFailed":`Не удалось создать API-ключ.`,"api.deleteFailed":`Не удалось удалить API-ключ.`,"api.auth.endpoint":`Эндпоинт`,"api.auth.required":`Обязателен`,"api.auth.accepted":`Принимается`,"api.auth.rejected":`Не принимается`,"api.auth.testProtocol":`Проверить {protocol}`,"api.auth.testNeedsFreshKey":`Чтобы выполнить проверку с аутентификацией, создайте ключ и оставьте его одноразовое значение на экране.`,"api.key.name":`Имя ключа`,"api.key.rename":`Переименовать`,"api.key.saveName":`Сохранить имя`,"api.key.renaming":`Сохранение…`,"api.key.renameFailed":`Не удалось переименовать ключ. Введённое имя сохранено.`,"api.key.deleting":`Удаление…`,"api.key.copyFailed":`Не удалось скопировать ключ. Выделите и скопируйте его вручную, прежде чем закрыть панель.`,"api.attribution.title":`Использование по ключам`,"api.attribution.requests7d":`Запросы за 7 дней`,"api.attribution.totalRequests":`Всего учтённых запросов`,"api.attribution.totalRequestsAvailable":`Запросы в доступной истории`,"api.attribution.sinceAvailable":`Доступная атрибуция с`,"api.attribution.lastUsed":`Последнее использование`,"api.attribution.since":`Учёт ведётся с`,"api.attribution.neverUsed":`Не использовался с начала учёта`,"api.attribution.unavailable":`Нет данных`,"api.attribution.unavailableDetail":`Использование ещё не учтено. Запросы до начала учёта нельзя отнести к ключам задним числом.`,"api.attribution.ambiguous":`Два ключа используют один и тот же ID, поэтому нельзя определить, чьё это использование. Задайте каждому ключу уникальный ID в файле конфигурации.`,"api.attribution.railAmbiguous":`дубль ID`,"nav.claude":`Claude`,"claude.subtitle":`Используйте GPT, Gemini и другие модели внутри Claude Code.`,"claude.pageTitle":`Claude Code`,"claude.workspace.settings":`Настройки`,"claude.enabledLabel":`Подключение Claude`,"claude.enabledHint":`Если выключено, Claude Code не сможет использовать этот прокси.`,"claude.authMode":`Режим аутентификации`,"claude.authModeHint":`«Подписка» требует аккаунт Claude, «Прокси» работает без аккаунта Anthropic`,"claude.authModeSubscription":`Подписка (аккаунт Claude)`,"claude.authModeProxy":`Прокси (аккаунт не нужен)`,"claude.authModeAuto":`Авто (определять вход в Claude)`,"claude.effectiveMode.label":`Применится при следующем запуске`,"claude.effectiveMode.manual":`Вручную: {mode}`,"claude.effectiveMode.autoPresent":`Авто: подписка — вход в Claude найден через {source}`,"claude.effectiveMode.autoAbsent":`Авто: режим прокси — вход в Claude не найден`,"claude.effectiveMode.autoUnknown":`Авто: подписка — не удалось проверить вход`,"claude.effectiveMode.admissionKey":`API-ключ этого прокси всё равно отправляется.`,"claude.authSource.claude-json-oauth":`аккаунт Claude`,"claude.authSource.claude-credentials-file":`файл учётных данных`,"claude.authSource.macos-keychain":`связку ключей macOS`,"claude.authSource.exported-env":`переменную окружения`,"claude.authSource.unknown":`обнаруженные учётные данные`,"claude.systemEnv":`Автоподключение`,"claude.systemEnvDesc":`Если включено, запуск claude в любом терминале автоматически идёт через прокси.`,"claude.systemEnvUnsupported":`Автоподключение доступно только в macOS. В этой системе запускайте Claude с помощью {cmd}.`,"claude.systemEnvWarn":`⚠ Чтобы изменение вступило в силу, необходимо полностью закрыть и заново запустить приложение терминала. Не рекомендуется.`,"claude.fastMode":`Быстрый режим (OpenAI)`,"claude.fastModeDesc":`Управляет service_tier для моделей OpenAI. ВКЛ = priority (быстрее). ВЫКЛ = default. Авто = сквозная передача (решает клиент).`,"claude.fastAuto":`Авто`,"claude.fastOn":`ВКЛ`,"claude.fastOff":`ВЫКЛ`,"claude.autoContext":`Автоматически использовать большой контекст`,"claude.autoContextDesc":`Определяет, как широко применяется пометка 1M. ВКЛ: строку с большим контекстом получает каждая модель с окном больше 200k токенов (модели GPT и т. п.). ВЫКЛ: её получают только модели с настоящим контекстом 1M.`,"claude.autoContextInert":`Неактивно, поскольку в файле конфигурации задано устаревшее значение размера контекста (maxContextTokens). Удалите его там, чтобы снова включить эту настройку.`,"claude.autoCompactWindow":`Порог автосуммаризации`,"claude.autoCompactDefault":`350k (по умолчанию)`,"claude.autoCompactWindowDesc":`Когда чат достигает этого порога, старые сообщения суммаризируются. Порог никогда не превышает собственный лимит модели, поэтому модели с контекстом 200k не затрагиваются.`,"claude.autoCompactWindowWarn":`Изменение этого значения может сломать модели GPT — если задать порог выше реального лимита модели, чаты будут выдавать ошибку ещё до срабатывания суммаризации.`,"claude.injectAgents":`Авторегистрация подагентов`,"claude.injectAgentsDesc":`Регистрирует модели, выбранные на вкладке «Подагенты» (плюс текущую модель по умолчанию), как доступных для вызова агентов Claude Code (ocx-*). Применяется со следующей сессии.`,"claude.webSearchSidecar":`Переопределение сайдкара веб-поиска`,"claude.webSearchSidecarHint":`Переопределяет основной сайдкар веб-поиска для запросов Claude Code.`,"claude.visionSidecar":`Переопределение сайдкара для изображений`,"claude.visionSidecarHint":`Переопределяет основной сайдкар для изображений в запросах Claude Code.`,"claude.useMainSetting":`Использовать основную настройку`,"claude.sidecarModelPlaceholder":`Модель из основной настройки`,"claude.quickstart":`Начало работы`,"claude.quickstartHint":`{cmd} запускает Claude Code через прокси. Ваш вход в claude.ai остаётся активным.`,"claude.manualEnv":`Ручная настройка (для продвинутых)`,"claude.smallFastModel":`Фоновая вспомогательная модель`,"claude.smallFastModelHint":`Модель, которую Claude Code использует для фоновых задач вроде суммаризации чатов и определения тем. Её также использует алиас подагента haiku. Пусто = значение Claude по умолчанию (Haiku).`,"claude.smallFastModelAccurateHint":`Модель, которую Claude Code использует для фоновых задач, например суммаризации чатов и определения тем. Её также использует алиас подагента haiku.`,"claude.smallFastModelUnsetOption":`Разрешить Claude Code выбрать нативную модель`,"claude.smallFastModelNativeWarning":`Если модель не выбрана, OpenCodex не задаёт переопределения вспомогательной модели. Claude Code может использовать нативную модель Sonnet, что может привести к расходам у вашего нативного провайдера.`,"claude.slotUnset":`Модель Claude по умолчанию`,"claude.modelMap":`Перехват моделей`,"claude.modelMapHint":`Перехватывает запросы к определённой модели и перенаправляет их на выбранную вами. По умолчанию список пуст — пока вы не добавите правило, ничего не происходит.`,"claude.mapFrom":`Исходная модель (напр. claude-sonnet-4-5)`,"claude.mapTo":`Заменить на (напр. gemini/gemini-3-pro)`,"claude.addMapping":`Добавить правило`,"claude.removeMapping":`Удалить правило`,"claude.aliases":`Доступные модели`,"claude.aliasesHint":`Модели, которые появляются в меню /model в Claude Code.`,"claude.aliasProviderOther":`Другое`,"claude.loading":`Загрузка…`,"claude.loadFail":`Не удалось загрузить настройки Claude`,"claude.saved":`Сохранено.`,"claude.saveFailed":`Не удалось сохранить`,"claude.networkError":`Ошибка сети — запущен ли прокси?`,"claude.toggleAria":`Переключить подключение Claude`,"claude.none":`Нет`,"claude.tabsLabel":`Клиент Claude`,"claude.tabCode":`Code`,"claude.tabDesktop":`Desktop`,"claudeDesktop.title":`Claude Desktop`,"claudeDesktop.subtitle":`Маршрутизируйте каждое семейство моделей Claude через доступную модель на порту {port}.`,"claudeDesktop.importJson":`Импорт JSON`,"claudeDesktop.exportJson":`Экспорт JSON`,"claudeDesktop.loading":`Загрузка профиля Claude Desktop…`,"claudeDesktop.loadFail":`Не удалось загрузить профиль Claude Desktop.`,"claudeDesktop.retry":`Повторить`,"claudeDesktop.saveFailed":`Не удалось сохранить профиль Claude Desktop.`,"claudeDesktop.applyFailed":`Профиль сохранён, но применить его не удалось.`,"claudeDesktop.updateFailed":`Не удалось обновить Claude Desktop.`,"claudeDesktop.savedApplied":`Профиль сохранён и применён к Claude Desktop.`,"claudeDesktop.savedAppliedAnnounce":`Профиль Claude Desktop сохранён и применён.`,"claudeDesktop.saved":`Профиль сохранён.`,"claudeDesktop.savedAnnounce":`Профиль Claude Desktop сохранён.`,"claudeDesktop.exported":`Профиль экспортирован в JSON.`,"claudeDesktop.importExpected":`Ожидается профиль Claude Desktop версии 1.`,"claudeDesktop.importReady":`JSON импортирован. Проверьте черновик, затем сохраните и примените.`,"claudeDesktop.importedAnnounce":`JSON профиля импортирован. Несохранённые изменения готовы к проверке.`,"claudeDesktop.importInvalid":`Выбранный файл не является допустимым профилем.`,"claudeDesktop.importFailed":`Импорт не удался. {error}`,"claudeDesktop.moved":`{route} перемещён в {family}.`,"claudeDesktop.unsaved":`Несохранённые изменения`,"claudeDesktop.upToDate":`Профиль актуален`,"claudeDesktop.saving":`Сохранение…`,"claudeDesktop.applying":`Применение…`,"claudeDesktop.saveApply":`Сохранить и применить`,"claudeDesktop.emptyTitle":`Нет доступных моделей`,"claudeDesktop.emptyHint":`Добавьте или включите провайдера, затем вернитесь для назначения маршрутов Claude Desktop.`,"claudeDesktop.assignmentsLabel":`Назначения семейств моделей Claude`,"claudeDesktop.family.opus":`Opus`,"claudeDesktop.family.fable":`Fable`,"claudeDesktop.family.sonnet":`Sonnet`,"claudeDesktop.family.haiku":`Haiku`,"claudeDesktop.modelCountOne":`{count} модель`,"claudeDesktop.modelCountMany":`{count} моделей`,"claudeDesktop.chooseDefault":`Выберите модель по умолчанию`,"claudeDesktop.temporaryDefault":`Временная модель по умолчанию`,"claudeDesktop.laneEmpty":`Перетащите модель сюда или используйте её элемент «Переместить».`,"claudeDesktop.laneNoMatch":`В этом семействе нет моделей, соответствующих запросу.`,"nav.grok":`Grok`,"grok.title":`Grok Build`,"grok.subtitle":`Модели, зарегистрированные opencodex в вашей конфигурации Grok.`,"grok.loading":`Загрузка состояния Grok…`,"grok.loadFail":`Не удалось прочитать конфигурацию Grok.`,"grok.notConfiguredTitle":`Grok Build не подключён`,"grok.notConfiguredHint":`Установите Grok и перезапустите прокси — opencodex запишет управляемый блок в:`,"grok.endpoint":`Точка входа`,"grok.colModel":`Модель`,"grok.colAlias":`Псевдоним Grok`,"grok.colContext":`Контекст`,"grok.groupNative":`Нативные модели`,"grok.groupRouted":`Маршрутизируемые модели`,"grok.enabledCount":`Зарегистрировано {on} из {total}`,"grok.saved":`Выбор сохранён.`,"grok.savedApplied":`Выбор сохранён и записан в конфиг Grok.`,"grok.saveFailed":`Не удалось сохранить выбор Grok.`,"grok.applyFailed":`Выбор сохранён, но конфиг Grok обновить не удалось.`,"grok.applySkipped":`Выбор сохранён. Конфиг Grok не изменён.`,"grok.saveApply":`Сохранить и применить`,"grok.saving":`Сохранение…`,"grok.applying":`Применение…`,"grok.unsaved":`Несохранённые изменения`,"grok.upToDate":`Выбор актуален`,"grok.toggleModel":`Зарегистрировать {id} в Grok`,"claudeDesktop.available":`Доступно`,"claudeDesktop.defaultBadge":`По умолчанию`,"claudeDesktop.supports1m":`1M`,"claudeDesktop.unavailable":`Недоступно`,"claudeDesktop.contextM":`Контекст {n}M`,"claudeDesktop.contextK":`Контекст {n}k`,"claudeDesktop.contextUnknown":`контекст неизвестен`,"claudeDesktop.alias":`Псевдоним`,"claudeDesktop.useAsDefault":`Сделать по умолчанию для {family}`,"claudeDesktop.moveTo":`Переместить в`,"claudeDesktop.move":`Переместить`,"claudeDesktop.status.applied":`Применено к Desktop`,"claudeDesktop.status.stale":`Конфигурация устарела — примените заново`,"claudeDesktop.status.notApplied":`Не применено`,"claudeDesktop.status.notActiveProfile":`Desktop использует другой профиль — примените заново`,"claudeDesktop.health.lastRequest":`Последний запрос`,"claudeDesktop.health.stats":`{count} запр. / {errors} ошиб.`,"claudeDesktop.effort.supported":`effort`,"claudeDesktop.effort.displayOnly":`effort (только отображение)`,"cws.loading":`Загрузка комбо…`,"cws.loadFailed":`Не удалось загрузить комбо.`,"cws.saveFailed":`Не удалось сохранить комбо.`,"cws.removeFailed":`Не удалось удалить комбо.`,"cws.saved":`Комбо сохранено.`,"cws.created":`Создано: {model}.`,"cws.removed":`Удалено: combo/{id}.`,"cws.renamed":`Переименовано: {from} → {to}.`,"cws.add":`Добавить комбо`,"cws.addTitle":`Добавить комбо`,"cws.addSubtitle":`Создайте виртуальную модель для нескольких провайдеров и выберите точное имя, которое будут запрашивать клиенты.`,"cws.create":`Создать комбо`,"cws.railAria":`Список комбо`,"cws.searchPlaceholder":`Поиск комбо или целей…`,"cws.noSearchResults":`Нет комбо, соответствующих запросу.`,"cws.group.failover":`Failover`,"cws.group.roundRobin":`Round-robin`,"cws.targetCount":`{count} целей`,"cws.targetCountOne":`1 цель`,"cws.overviewTitle":`Комбо`,"cws.overviewBlurb":`Виртуальные модели, которые при сбоях переключаются между целями провайдер/модель (отказоустойчивое переключение, failover) или используют детерминированный плавный взвешенный циклический перебор (round-robin).`,"cws.count.total":`Всего`,"cws.count.failover":`Failover`,"cws.count.roundRobin":`Round-robin`,"cws.howTitle":`Как это работает`,"cws.howBody":`Запросите у Codex публичное имя модели комбо. Если оно не задано, используется combo/<id>. OpenCodex выбирает цель и переключается на следующую только при сбоях вышестоящего провайдера, допускающих повтор. Если доступных целей не осталось, запрос завершается ошибкой, а не переходит на глобальный провайдер по умолчанию.`,"cws.attentionTitle":`Требует внимания`,"cws.attention.empty":`Цели не настроены`,"cws.attention.few":`Только одна цель — failover некуда переключаться`,"cws.attention.catalogOmitted":`Отсутствует в каталоге моделей — возможности участников неполны или несовместимы (нет context window / метаданных, или пустое пересечение modalities). Маршрутизация по alias всё ещё работает`,"cws.emptyTitle":`Создайте первое комбо`,"cws.empty.createDesc":`Задайте имя виртуальной модели и объедините в цепочку два и более бэкенда.`,"cws.backToAll":`Назад ко всем комбо`,"cws.allCombos":`Все комбо`,"cws.copyModel":`Копировать id`,"cws.copied":`Скопировано`,"cws.tab.config":`Конфигурация`,"cws.tab.about":`О комбо`,"cws.strategy":`Стратегия`,"cws.strategy.failover":`Failover`,"cws.strategy.roundRobin":`Round-robin`,"cws.strategy.failoverHint":`Цели перебираются по порядку. Если первая завершается ошибкой, допускающей повтор (лимит запросов, сбой, ограничение подписки), происходит переключение на следующую.`,"cws.strategy.roundRobinHint":`Детерминированное распределение трафика по весам. Выбранная цель удерживается на серию успешных запросов, затем селектор переходит к следующей.`,"cws.field.id":`Id комбо`,"cws.field.idHint":`Клиенты будут запрашивать {model}`,"cws.field.idInternalHint":`Внутренний id комбо. Его можно изменить после создания.`,"cws.field.idHintEdit":`При переименовании комбо будет перенесено на новый id. Клиенты запрашивают {model}.`,"cws.field.alias":`Публичное имя модели`,"cws.field.aliasPlaceholder":`deepseek-v4-flash или vendor/model`,"cws.field.aliasHint":`Необязательно. Используйте имя без префикса, собственный префикс вроде vendor/model или оставьте поле пустым для combo/<id>.`,"cws.field.stickyLimit":`Успешных запросов до ротации`,"cws.field.stickyLimitHint":`Выбранная цель удерживается на указанное число успешных запросов, прежде чем взвешенный селектор перейдёт к следующей.`,"cws.field.defaultEffort":`Рассуждения по умолчанию`,"cws.field.defaultEffortNone":`Нет (по умолчанию для цели)`,"cws.field.defaultEffortHint":`Используется, только если клиент не указал уровень рассуждений. Варианты — пересечение заявленных уровней выбранных целей.`,"cws.field.defaultEffortUnsupported":`Этот уровень не входит в общую лестницу целей — при запросе он будет проигнорирован или снижен.`,"cws.field.defaultEffortUnsupportedOption":`нет в пересечении`,"cws.targets":`Цели`,"cws.targets.failoverHint":`Порядок важен — первая цель основная.`,"cws.targets.roundRobinHint":`Веса задают детерминированный относительный выбор; при равных весах порядок определяет очерёдность в кольце ротации.`,"cws.target.provider":`Провайдер`,"cws.target.model":`Модель`,"cws.target.weight":`Вес`,"cws.target.pickProvider":`Выберите провайдера…`,"cws.target.pickProviderFirst":`Сначала выберите провайдера…`,"cws.target.pickModel":`Выберите модель…`,"cws.target.noModels":`Нет моделей для этого провайдера`,"cws.target.modelPlaceholder":`id модели`,"cws.target.add":`Добавить цель`,"cws.target.drag":`Перетащите, чтобы изменить порядок`,"cws.target.moveUp":`Переместить вверх`,"cws.target.moveDown":`Переместить вниз`,"cws.aboutTitle":`Поведение во время работы`,"cws.aboutBody":`После сбоя цель на короткое время выводится из ротации с учётом заголовка Retry-After. При ошибках валидации или превышения контекста переключение не выполняется. Каждая цель адаптирует уровень рассуждений к своим возможностям; полностью исчерпанное комбо завершает запрос ошибкой. Разделы «Логи» и «Использование» сохраняют упорядоченные физические попытки и расход по каждой попытке.`,"cws.removeConfirmTitle":`Удалить {model}?`,"cws.removeConfirmDesc":`Виртуальная модель будет удалена из конфигурации и каталога Codex. Провайдеры при этом не удаляются.`,"cws.unsavedTitle":`Несохранённые изменения`,"cws.unsavedDesc":`Отбросить изменения этого комбо и продолжить?`,"cws.keepEditing":`Продолжить редактирование`,"cws.err.missingId":`Необходимо указать id комбо.`,"cws.err.invalidId":`Id должен начинаться с буквы или цифры и содержать только буквы, цифры, точки, подчёркивания и дефисы (не более 64 символов).`,"cws.err.duplicateId":`Комбо с таким id уже существует.`,"cws.err.invalidAlias":`Алиас должен содержать только буквы, цифры, точки, подчёркивания и дефисы, максимум с одним сегментом "/".`,"cws.err.aliasReservedNamespace":`Алиас не должен использовать зарезервированное пространство имён "combo/".`,"cws.err.aliasNativeFamily":`Алиасы без префикса из нативного семейства OpenAI (gpt-*, o1-*, o3-*, o4-*, codex-*) недопустимы.`,"cws.err.duplicateAlias":`Другое комбо уже использует этот алиас.`,"cws.err.noTargets":`Добавьте хотя бы одну цель.`,"cws.err.incompleteTarget":`Для каждой цели нужно указать провайдера и модель.`,"cws.target.disabled":`{name} (отключён)`,"cws.err.reservedNamespace":`Прежде чем создавать комбо, необходимо переименовать физического провайдера с именем «combo».`,"cws.err.providerCollision":`Id комбо конфликтует с именем настроенного провайдера.`,"cws.err.unknownProvider":`Каждая цель должна использовать настроенного провайдера.`,"cws.err.duplicateTarget":`Одна и та же цель провайдер/модель может встречаться только один раз.`,"cws.err.invalidStickyLimit":`Число успешных запросов до ротации должно быть целым от 1 до 100.`,"cws.err.invalidWeight":`Каждый вес round-robin должен быть целым числом от 1 до 10000.`,"cws.err.noEnabledTarget":`Хотя бы одна цель должна использовать включённого провайдера.`,"nav.cloud":`Cloud Sync`,"cloud.subtitle":`Backup and restore ~/.opencodex to your Microsoft OneDrive (OAuth device login).`,"cloud.statusTitle":`Status`,"cloud.statusHint":`Local device id and last OneDrive push/pull.`,"cloud.loggedIn":`Microsoft account`,"cloud.notLoggedIn":`Not signed in`,"cloud.account":`Account`,"cloud.device":`This device`,"cloud.remote":`Remote folder`,"cloud.lastSync":`Last sync`,"cloud.never":`Never`,"cloud.remoteManifest":`Cloud snapshot`,"cloud.hasVault":`encrypted vault`,"cloud.remoteError":`Cloud check`,"cloud.clientIdTitle":`Azure app client ID`,"cloud.clientIdHint":`Create a public client app in Azure AD once, enable “Allow public client flows”, add delegated scopes Files.ReadWrite and offline_access, then paste the Application (client) ID here.`,"cloud.clientIdSaved":`Client ID saved.`,"cloud.azurePortal":`Azure app registrations`,"cloud.azureSteps":`Public client · device code · Files.ReadWrite + offline_access`,"cloud.loginTitle":`Sign in to Microsoft`,"cloud.login":`Sign in with Microsoft`,"cloud.logout":`Sign out`,"cloud.loginOk":`Signed in as {account}`,"cloud.loginFailed":`Microsoft sign-in failed`,"cloud.logoutOk":`Signed out of OneDrive.`,"cloud.deviceCodeTitle":`Device code`,"cloud.deviceCodeHint":`Open the link, enter this code, then approve access:`,"cloud.waitingAuth":`Waiting for Microsoft approval…`,"cloud.transferTitle":`Push / pull`,"cloud.transferHint":`Push uploads config to OneDrive. Pull overwrites this machine’s ~/.opencodex from the cloud snapshot.`,"cloud.passphrase":`Vault passphrase`,"cloud.passphrasePlaceholder":`Min 8 characters (encrypts oauth tokens)`,"cloud.passphraseShort":`Passphrase must be at least 8 characters when the vault is enabled.`,"cloud.includeVault":`Include encrypted token vault (oauth.json / auth.json)`,"cloud.includeUsage":`Include usage / logs DBs (larger)`,"cloud.push":`Push to OneDrive`,"cloud.pull":`Pull from OneDrive`,"cloud.pushOk":`Pushed: {files}`,"cloud.pullOk":`Pulled: {files}`,"cloud.pullConfirm":`Pull will overwrite local OpenCodex config and auth files from OneDrive. Continue?`,"cloud.securityNote":`Plain config is stored under OneDrive/OpenCodex/sync/. OAuth tokens only go into the AES-256-GCM vault when you set a passphrase. Never share your client secret or vault passphrase.`,"cloud.loginHint":`Browser login (recommended): Azure platform “Mobile and desktop” + redirect URI http://localhost. Device code needs Allow public client flows = Yes.`,"cloud.loginDevice":`Device code (advanced)`,"cloud.browserLoginTitle":`Browser sign-in`,"cloud.browserLoginHint":`Complete Microsoft sign-in in the opened tab, then return here.`,"cloud.openAuthPage":`Open sign-in page`,"cloud.redirectUri":`Loopback redirect`,"cloud.redirectUriTitle":`Register this exact redirect URI in Azure`,"cloud.redirectUriHint":`Authentication → Add a platform → Mobile and desktop applications → custom redirect URI (must match exactly, including port):`,"cloud.redirectUriWhere":`Do not use #cloud, port 10100, or https. Save, wait ~1 minute, then sign in.`,"cloud.clientIdSecretSaved":`Client ID and client secret saved.`,"cloud.clientSecret":`Client secret (optional)`,"cloud.clientSecretPlaceholder":`Only if Azure requires client_secret`,"cloud.clientSecretSet":`Secret saved (leave empty and save to clear; type a new value to replace)`,"cloud.clientSecretHint":`Preferred: Authentication → Allow public client flows = Yes (no secret). For Web apps, create a client secret under Certificates & secrets, paste here, then Save.`,"dash.injectionManage":`Открыть настройки`,"sub.settings":`Настройки`,"sub.sections":`Разделы подагентов`,"sub.delegation.model":`Модель, которую вызывать первой`,"sub.delegation.modelHint":`Модель, к которой Codex обращается первой, когда передаёт работу. Список выше — кого он вообще может вызвать, а здесь выбирается первый в очереди.`,"dash.syncModelsHint":`Перезаписывает каталог моделей Codex по подключённым провайдерам.`,"dash.syncRun":`Синхронизировать`,"nav.pi":`Pi`,"pi.title":`Pi`,"pi.subtitle":`Manage Pi models, settings, packages, and extensions. Only the opencodex provider block is written to models.json.`,"pi.loading":`Loading Pi status…`,"pi.loadFail":`Could not read Pi status.`,"pi.actionOk":`Done.`,"pi.actionFail":`Action failed.`,"pi.applySkipped":`Pi apply was skipped (policy or missing install).`,"pi.statusTitle":`Install status`,"pi.binary":`pi binary`,"pi.agentDir":`Agent directory`,"pi.modelsFile":`models.json`,"pi.missing":`not found`,"pi.modelsTitle":`Models (providers.opencodex)`,"pi.modelsHint":`Apply writes only providers.opencodex from the live catalog. Your other providers stay untouched.`,"pi.apply":`Apply models`,"pi.applying":`Applying…`,"pi.applied":`Pi models applied.`,"pi.remove":`Remove opencodex block`,"pi.removing":`Removing…`,"pi.removed":`Pi opencodex provider removed.`,"pi.modelsNotPresentTitle":`opencodex not in models.json yet`,"pi.modelsNotPresentHint":`Click Apply to register the current catalog as providers.opencodex.`,"pi.endpoint":`Endpoint`,"pi.modelCount":`{count} models registered`,"pi.moreModels":`…and {n} more`,"pi.settingsTitle":`Settings`,"pi.settingsHint":`Curated subset of ~/.pi/agent/settings.json. Unknown keys are preserved.`,"pi.saveSettings":`Save settings`,"pi.savingSettings":`Saving…`,"pi.settingsSaved":`Pi settings saved.`,"pi.defaultProvider":`Default provider`,"pi.defaultModel":`Default model`,"pi.thinking":`Thinking level`,"pi.theme":`Theme`,"pi.projectTrust":`Project trust default`,"pi.hideThinking":`Hide thinking blocks`,"pi.quietStartup":`Quiet startup`,"pi.unset":`(unset)`,"pi.otherKeys":`{count} other keys left untouched`,"pi.packagesTitle":`Packages`,"pi.packagesHint":"Install runs `pi install` on the server machine. Packages execute with full system access — review sources before installing.","pi.install":`Install`,"pi.installing":`Installing…`,"pi.packageInstalled":`Package install finished.`,"pi.packageRemoved":`Package removed.`,"pi.removePackage":`Remove`,"pi.noPackages":`No packages in settings.json.`,"pi.extensionsTitle":`Extensions`,"pi.extensionsHint":`Auto-discovered under ~/.pi/agent/extensions plus paths listed in settings. Source editing is not available here.`,"pi.noExtensions":`No extensions found.`,"pi.cliHint":`CLI: ocx pi status | apply | settings | packages · launch with ocx pi`,"grok.modelsSection":`Grok Build models`,"grok.modelsSectionSub":`Choose which opencodex models appear in Grok Build, then save and apply.`,"grok.account.sectionAria":`xAI account and quota`,"grok.account.title":`xAI account quota`,"grok.account.subtitle":`Same depth as Codex Auth: active Grok account, plan, and usage bars. No need to open Providers.`,"grok.account.refreshQuota":`Refresh quota`,"grok.account.refreshing":`Refreshing…`,"grok.account.addAccount":`Add account`,"grok.account.login":`Log in with xAI`,"grok.account.loggingIn":`Waiting for login…`,"grok.account.cancelLogin":`Cancel login`,"grok.account.loading":`Loading accounts…`,"grok.account.empty":`No xAI account yet. Log in to see plan and quota bars here.`,"grok.account.loadFail":`Could not load xAI accounts.`,"grok.account.loginFail":`xAI login failed to start.`,"grok.account.loginOk":`xAI login succeeded.`,"grok.account.loginCancelled":`xAI login cancelled.`,"grok.account.select":`Select account`,"grok.account.switched":`Active xAI account updated.`,"grok.account.switchFail":`Could not switch xAI account.`,"grok.account.removeConfirm":`Remove this xAI account from opencodex?`,"grok.account.removeFail":`Could not remove account.`,"grok.account.removed":`Account removed.`,"grok.account.unnamed":`xAI account`,"nav.clients":`Clients`,"clients.title":`Clients`,"clients.subtitle":`See which base URL and model each coding agent is actually using on disk — useful when CC Switch, ocx inject, and launchers stack.`,"clients.refresh":`Refresh`,"clients.loadFail":`Could not read client status.`,"clients.proxyTitle":`Proxy`,"clients.proxyRunning":`Proxy running`,"clients.proxyStopped":`Proxy not detected`,"clients.generatedAt":`Checked {time}`,"clients.readOnlyHint":`Read-only. This page never rewrites client configs or shows API keys.`,"clients.tableTitle":`Effective client routing`,"clients.col.client":`Client`,"clients.col.verdict":`Verdict`,"clients.col.baseUrl":`Base URL`,"clients.col.model":`Model`,"clients.col.launcher":`Launcher`,"clients.col.switcher":`Switcher profile`,"clients.col.details":`Details`,"clients.col.configPaths":`Config paths`,"clients.col.notes":`Notes`,"clients.verdict.ocx":`via ocx`,"clients.verdict.direct":`direct`,"clients.verdict.mixed":`mixed`,"clients.verdict.missing":`missing`,"clients.verdict.unknown":`unknown`,"clients.manage":`Manage`,"clients.noNotes":`No notes`,"clients.exportHint":`Need a generated config template instead? Open the API page export panel.`,"clients.loading":`Loading client status…`},ja:{"nav.dashboard":`ダッシュボード`,"nav.startup":`起動安全性`,"nav.providers":`プロバイダー`,"nav.models":`モデル`,"nav.combos":`コンボ`,"nav.subagents":`サブエージェント`,"nav.logs":`ログ & デバッグ`,"nav.usage":`使用量`,"common.github":`GitHub`,"sidebar.star":`GitHub でスターを付ける`,"sidebar.starred":`GitHub でスター済み`,"sidebar.starUnauthenticated":`GitHub を開いてスターを付ける (gh CLI が未ログイン)`,"sidebar.starFailed":`gh でスターを付けられませんでした。代わりに GitHub を開きます。`,"sidebar.updateAvailable":`更新あり: {version}`,"sidebar.checkUpdate":`更新を確認`,"common.save":`保存`,"common.saving":`保存中…`,"common.cancel":`キャンセル`,"common.discard":`破棄`,"common.close":`閉じる`,"common.ok":`OK`,"common.remove":`削除`,"common.loading":`読み込み中…`,"common.retry":`再試行`,"app.logoAria":`opencodex ロゴ`,"app.claudeOn":`Claude オン`,"app.claudeOff":`Claude オフ`,"theme.label":`テーマ`,"theme.light":`ライト`,"theme.dark":`ダーク`,"theme.system":`システム`,"lang.label":`言語`,"provider.name.volcengine":`Volcengine Ark`,"provider.name.volcengineCodingPlan":`Volcengine Ark コーディングプラン`,"provider.name.volcengineAgentPlan":`Volcengine Ark エージェントプラン`,"errorBoundary.title":`ページを読み込めませんでした`,"errorBoundary.message":`このセクションの表示中にエラーが発生しました。再読み込みしてもう一度お試しください。`,"errorBoundary.details":`エラー`,"errorBoundary.reload":`再読み込み`,"startup.title":`起動安全性`,"startup.subtitle":`再起動後にローカルプロキシへの接続が再接続ループになる前に、Codex が opencodex へ到達できるか確認します。`,"startup.refresh":`更新`,"startup.backToDashboard":`ダッシュボードに戻る`,"startup.loading":`起動保護を確認中…`,"startup.error":`起動保護を読み取れませんでした。`,"startup.staleData":`最新の確認に失敗しました。以下は古い値であり、保護の証明にはなりません。`,"startup.status.native":`ネイティブルーティング`,"startup.status.protected":`再起動保護済み`,"startup.status.atRisk":`対応が必要`,"startup.summary.native":`Codex はローカルプロキシに依存していません`,"startup.summary.protected":`再起動後も opencodex を利用できます`,"startup.summary.atRisk":`再起動後に Codex がモデルへ接続できなくなる可能性があります`,"startup.riskDetail":`Codex はローカルプロキシを参照していますが、再起動する永続サービスまたは正常な launcher shim がありません。`,"startup.riskDetailCustomLocal":`Codex はカスタムローカルゲートウェイを参照しています。opencodex はその再起動ライフサイクルを管理・検証できません。`,"startup.riskDetailWindowsShim":`Launcher shim は対応する CLI スクリプトのみを保護し、Windows の Codex Desktop と codex.exe の直接起動はこれを迂回できます。`,"startup.safeDetail":`現在のルーティングと起動方式は整合しています。再起動後に ocx start を手動実行する必要はありません。`,"startup.routing":`Codex ルーティング`,"startup.routing.proxy":`ローカルプロキシ`,"startup.routing.native":`OpenAI ネイティブ`,"startup.routing.customLocal":`カスタムローカルゲートウェイ`,"startup.routing.customRemote":`カスタム遠隔ゲートウェイ`,"startup.routing.unknown":`不明または無効なルーティング`,"startup.restartProtection":`再起動保護`,"startup.preference":`オンデマンド起動`,"startup.enabled":`有効`,"startup.disabled":`無効`,"startup.protection.service":`バックグラウンドサービス`,"startup.protection.shim":`Launcher shim`,"startup.protection.none":`未インストール`,"startup.details":`保護の詳細`,"startup.service":`バックグラウンドサービス`,"startup.serviceHint":`ログイン時に起動し、クラッシュ後にプロキシを再起動します。`,"startup.installed":`インストール済み`,"startup.notInstalled":`未インストール`,"startup.unsupported":`未対応`,"startup.shim":`Codex launcher shim`,"startup.shimHint":`対応する Codex スクリプトランチャーの起動時に ocx ensure を実行します。`,"startup.healthy":`正常`,"startup.cliOnly":`CLI のみ`,"startup.stale":`要更新`,"startup.viable":`利用可能`,"startup.unhealthy":`インストール済み・異常`,"startup.conflict":`サービス競合`,"startup.installedDisabled":`インストール済み・無効`,"startup.install":`インストール`,"startup.installing":`インストール中…`,"startup.repair":`修復`,"startup.repairing":`修復中…`,"startup.serviceInstalled":`バックグラウンドサービスをインストールしました。`,"startup.serviceRepaired":`バックグラウンドサービスを修復しました。`,"startup.shimInstalled":`Codex ランチャー shim をインストールしました。`,"startup.shimRepaired":`Codex ランチャー shim を修復しました。`,"startup.installFailed":`インストールに失敗しました:`,"startup.tray.title":`Windows システムトレイ`,"startup.tray.hint":`ログイン時にトレイを起動し、プロキシの開始・停止・再起動・ダッシュボード・状態をクリックで操作します。`,"startup.tray.login":`Windows ログイン時にトレイを開始`,"startup.tray.notProtection":`トレイは操作画面であり再起動保護ではありません。無人復旧には正常なバックグラウンドサービスが必要です。`,"startup.tray.running":`実行中`,"startup.tray.stopped":`インストール済み・非表示`,"startup.tray.stale":`修復が必要`,"startup.tray.notInstalled":`未インストール`,"startup.tray.loading":`確認中…`,"startup.tray.unavailable":`状態を確認できません`,"startup.tray.install":`トレイをインストールして表示`,"startup.tray.start":`トレイアイコンを表示`,"startup.tray.stop":`トレイアイコンを終了`,"startup.tray.uninstall":`ログイントレイを削除`,"startup.tray.error":`Windows トレイ操作に失敗しました。ocx tray status で詳細を確認してください。`,"startup.recovery":`修復方法`,"startup.recoveryHint":`上のワンクリックインストールを使うか、手動修復用のコマンドをコピーできます。Codex Desktop と Windows 実行ファイルにはバックグラウンドサービスを推奨します。`,"startup.command.service":`推奨: 永続バックグラウンドサービス`,"startup.command.shim":`代替: CLI launcher shim`,"startup.command.native":`安全策: Codex ネイティブルーティングを復元`,"startup.copy":`コピー`,"startup.copied":`コピー済み`,"startup.recommended":`推奨修復: {cmd}`,"startup.navRisk":`起動保護に対応が必要です`,"startup.codexRuntime.clampHidden":`OpenCodex が Codex {version} を使用したため、一部の reasoning effort オプションが非表示になりました。`,"startup.codexRuntime.clampHiddenWithEfforts":`OpenCodex が Codex {version} を使用したため、一部の reasoning effort オプションが非表示になりました(削除: {efforts})。`,"startup.codexRuntime.olderBinary":`OpenCodex は古い Codex バイナリ({version})を使用しています。より新しいインストールが利用可能です。`,"dash.subtitle":`ローカル opencodex プロキシ、そのプロバイダー、Codex にルーティングされるモデルのライブ状態です。`,"dash.workspace.overview":`概要`,"dash.workspace.sections":`セクション`,"dash.status":`状態`,"dash.online":`オンライン`,"dash.offline":`オフライン`,"dash.version":`バージョン`,"dash.versionLocal":`ローカル版`,"dash.versionRemote":`npm 最新`,"dash.installSource":`ソース実行`,"dash.installNpm":`npm グローバル`,"dash.installBun":`bun グローバル`,"dash.installUnknown":`インストール不明`,"dash.uptime":`稼働時間`,"dash.providers":`プロバイダー`,"dash.tokens30d":`トークン (30日)`,"dash.coverage":`{pct} カバレッジ`,"dash.mem.title":`メモリ可観測性`,"dash.mem.hint":`読み取り専用のランタイム診断。観測メモリは max(RSS, external, ArrayBuffers) で、Windows の working set trimming がコミット済み保持を隠さないようにします。`,"dash.mem.rss":`常駐メモリ (RSS)`,"dash.mem.jsHeap":`JS ヒープ使用量`,"dash.mem.jsHeapArena":`アリーナ {total}`,"dash.mem.pressure":`警告しきい値に対して`,"dash.mem.pressureOf":`しきい値の {pct}%`,"dash.mem.pressureUnknown":`しきい値の情報なし`,"dash.mem.jscHeap":`JSC ヒープ`,"dash.mem.external":`External`,"dash.mem.arrayBuffers":`ArrayBuffers`,"dash.mem.observed":`観測値`,"dash.mem.runtime":`ランタイムカウンター`,"dash.mem.growth":`1時間あたりの観測変化`,"dash.mem.perHour":`/時間`,"dash.mem.store":`継続ストア`,"dash.mem.storeHint":`プロキシの previous_response_id キャッシュ。ヒープ増加中に合計バイトが増える場合、ランタイムアロケータではなく会話保持を示します。`,"dash.mem.storeEntries":`エントリ`,"dash.mem.storeTotal":`合計`,"dash.mem.storeLargest":`最大`,"dash.mem.storeOldest":`最古`,"dash.mem.threshold":`警告しきい値`,"dash.mem.lastWarn":`最終警告`,"dash.mem.never":`なし`,"dash.mem.details":`詳細`,"dash.mem.unavailable":`メモリ診断は利用できません(旧バージョンのプロキシ)。`,"dash.mem.inFlight":`処理中のリクエスト`,"dash.mem.restart":`完了後に再起動`,"dash.mem.restartConfirm":`処理中のリクエスト {count} 件の完了を待ってから再起動します(最大 {seconds} 秒。タイムアウト時は残りを打ち切ります)。`,"dash.mem.draining":`リクエスト {count} 件の完了を待機中… 完了後に再起動`,"dash.mem.reconnecting":`プロキシを再起動中… 再接続を待機`,"dash.mem.restartFailed":`完了後の再起動に失敗しました。プロキシが起動しているか確認してください。`,"dash.mem.restartNoSupervisor":`再起動保護がありません。再起動後、プロキシが自動で戻らない可能性があります。`,"dash.activeProviders":`アクティブなプロバイダー`,"dash.noProviders":`プロバイダーが設定されていません。{cmd} を実行してください。`,"dash.col.name":`名前`,"dash.col.adapter":`アダプター`,"dash.col.baseUrl":`ベース URL`,"dash.col.model":`モデル`,"dash.modelsNoResults":`検索に一致するモデルはありません。`,"dash.availableModels":`利用可能なモデル`,"dash.noModels":`モデルが見つかりません。プロバイダーの API キーを確認してください。`,"dash.cannotConnect":`プロキシに接続できません。起動していますか?`,"dash.runStart":`{cmd} を実行してプロキシを起動してください。`,"dash.stop":`プロキシを停止`,"dash.stopConfirm":`プロキシを停止してネイティブの Codex に戻しますか?`,"dash.stopFailed":`プロキシを停止できませんでした (HTTP {status})。`,"dash.stopping":`停止中…`,"dash.codexAutoStart":`Codex と一緒に opencodex を起動`,"dash.codexAutoStartHint":`インストール済み launcher shim に ocx ensure の実行を許可します。この設定だけでは再起動保護はインストールされません。起動安全性で実際の状態を確認してください。`,"dash.searchModel":`検索サイドカーモデル`,"dash.searchModelHint":`非 OpenAI ルーティングモデルで web_search に使うモデル。ChatGPT ログインが必要です。`,"dash.searchReasoning":`検索の推論負荷`,"dash.visionModel":`ビジョンサイドカーモデル`,"dash.visionModelHint":`テキスト専用ルーティングモデルで画像を説明するために使うモデル。ChatGPT ログインが必要です。`,"dash.webSearchSidecar":`ウェブ検索サイドカー`,"dash.webSearchSidecarHint":`ルーティングモデルでウェブ検索に使うバックエンドとモデルを選択します。`,"dash.visionSidecar":`ビジョンサイドカー`,"dash.visionSidecarHint":`テキスト専用ルーティングモデルで画像を説明するために使うバックエンドとモデルを選択します。`,"dash.shadowCallIntercept":`シャドウコール傍受`,"dash.shadowCallInterceptHint":`Codex App のバックグラウンドヘルパー呼び出し({models}: タイトル生成、コミットメッセージ)を傍受し、選択したモデルにリダイレクトします。負荷は low に固定されます。`,"dash.shadowCallWarning":`⚠ オンにすると、{models} へのリクエストがすべて選択したモデルに置き換えられます。`,"dash.shadowCallOriginal":`元のモデル`,"dash.shadowCallModel":`差し替えモデル`,"dash.shadowCallTooltip":`Codex App はスレッドタイトル生成、コミットメッセージ生成、スキルオーケストレーションをバックグラウンドで呼び出します。使われるモデルはクライアントのバージョンによって変わるため、opencodex は {models} をまとめて傍受します。これをオンにすると、それらの呼び出しを選択したモデルにリダイレクトします。`,"models.shadowCallIntercept":`シャドウコール傍受`,"models.shadowCallInterceptHint":`Codex App のバックグラウンドヘルパー呼び出し({models}: タイトル、コミットメッセージ)を傍受し、選択したモデルにリダイレクトします。`,"dash.sidecarBackend":`バックエンド`,"dash.sidecarModel":`モデル`,"dash.backendAuto":`自動`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`サイドカー設定を保存しました。次回リクエスト時に適用されます。`,"dash.sidecarSaveFailed":`サイドカー設定の保存に失敗しました。`,"dash.injectionLabel":`サブエージェント委任`,"dash.injectionHint":`Codex がサブエージェントに作業を渡すときのモデルを選びます。この選択をどこに適用するかは下の 2 つのスイッチが決めます。`,"dash.syncCodexSubagentDefaults":`Codex の既定値としても保存`,"dash.syncCodexSubagentDefaultsHint":`オンにすると、上で選んだモデルが Codex 自身の設定にも保存され、新しいタスクも最初からそのモデルを使います。オフならここだけで記憶します。反映は次回の同期または再起動時で、自分で書いた [agents] 設定はそのまま残ります。`,"dash.multiAgentGuidance":`作業の分け方を伝える`,"dash.multiAgentGuidanceHint":`「作業はこう分けて任せる」という短いメモを Codex に送ります。v2 では使えるモデルと優先モデルを伝え、v1 では推論強度が max か ultra のときだけ働きます。オフならメモは付きません。`,"dash.injectionNone":`なし`,"dash.injectionEffortLabel":`推論負荷`,"dash.injectionEffortNone":`モデル既定`,"dash.effortCapLabel":`V2 ultra 推論上限`,"dash.subagentEffortCapLabel":`V2 サブエージェント推論上限`,"dash.effortCapHelp":`V2 ultra モードのターンの推論負荷を制限します。設定すると、(ultra モードからの)最大負荷リクエストは選択したレベルに制限されます。サブエージェント上限は生成された子エージェントにのみ適用されます。上限は負荷を下げるだけで上げることはありません。モデルが制限レベルをサポートしない場合、最も近いサポートレベルに切り下げられます。`,"dash.effortCapNone":`上限なし`,"dash.maintenance":`メンテナンス`,"dash.maintenanceHint":`Codex のモデルカタログを更新するか、より新しい opencodex リリースをインストールします。`,"dash.syncModels":`モデルを同期`,"dash.syncing":`同期中…`,"dash.syncOk":`同期完了。{count} 個のモデルを追加しました。`,"dash.syncStaleHint":`Codex がまだ古いリストを表示する場合、長時間稼働の app-server を再起動してください({cmd})。`,"dash.syncFailed":`同期失敗: {error}`,"dash.projectConfigTitle":`プロジェクトの Codex 設定が OpenCodex をバイパスします`,"dash.projectConfigHint":`これらのリポジローカル設定は OpenCodex プロキシを上書きします(例: OpenCode Go に直接ルーティング)。~/.codex/config.toml のルーティングがそのプロジェクトで適用されるように削除してください。`,"dash.checkUpdate":`更新を確認`,"dash.updateTitle":`opencodex を更新`,"dash.updateDesc":`選択したチャンネルの npm を確認し、インストール後にプロキシを再起動するか選択します。`,"dash.updateChannel":`チャンネル`,"dash.updateChecking":`更新を確認中…`,"dash.updateInstalled":`インストール済み`,"dash.updateLatest":`最新`,"dash.updateAvailable":`更新があります`,"dash.updateCurrent":`最新です`,"dash.updateCommand":`コマンド`,"dash.updateSource":`これはソースチェックアウトです。表示されたコマンドでターミナルから更新してください。`,"dash.updateUnavailable":`npm から最新バージョンを読み取れませんでした。後でもう一度お試しください。`,"dash.updateRetry":`再試行`,"dash.updateRecheck":`再確認`,"dash.updateCannotAuto":`ワンクリック更新は利用できません({reason})。`,"dash.updateReason.source_checkout":`ソースチェックアウト`,"dash.updateReason.latest_unavailable":`npm レジストリに到達できません`,"dash.updateReason.already_latest":`最新です`,"dash.updateReason.unknown":`更新は利用できません`,"dash.updateRestart":`更新後に再起動`,"dash.updateRestartHint":`推奨。プロキシが再起動されるまで現在の GUI は古いコードを実行し続けます。`,"dash.runUpdate":`更新`,"dash.updateReconnecting":`再起動したプロキシを待機中…`,"dash.updateStatus.running":`opencodex を更新しています。`,"dash.updateStatus.restarting":`更新をインストールしました。プロキシを再起動中。`,"dash.updateStatus.succeeded":`更新が完了しました。`,"dash.updateStatus.failed":`更新に失敗しました。`,"prov.subtitle":`opencodex が Codex にルーティングする上流プロバイダーを設定します。アカウントでログインするか、プロバイダーを追加、または生の設定を編集します。`,"prov.add":`プロバイダーを追加`,"prov.editJson":`JSON を編集`,"prov.accountLogin":`アカウントログイン`,"prov.noOauth":`利用可能な OAuth プロバイダーがありません。`,"prov.loggedIn":`ログイン済み`,"prov.notLoggedIn":`未ログイン`,"prov.logout":`ログアウト`,"prov.login":`ログイン`,"prov.loginWith":`{provider} でログイン`,"prov.waitingBrowser":`ブラウザを待機中…`,"prov.didntOpen":`開きませんか? ここをクリック`,"prov.copyLink":`リンクをコピー`,"prov.linkCopied":`コピーしました`,"prov.linkCopyUnavailable":`クリップボードを使用できません`,"prov.deviceCode":`デバイスコード`,"prov.copyCode":`コードをコピー`,"prov.codeCopied":`コードをコピーしました`,"prov.pasteRedirect":`リダイレクト URL またはコードを貼り付け`,"prov.pasteRedirectHint":`ブラウザに localhost エラーが表示された場合、アドレスバーから URL 全体をコピーしてここに貼り付けてください(または認可コードを貼り付け)。`,"prov.pasteSubmit":`送信`,"prov.pasteSubmitting":`送信中…`,"prov.pasteOk":`コードを送信しました — ログインを完了しています…`,"prov.pasteFail":`コードを送信できませんでした: {error}`,"prov.port":`ポート`,"prov.default":`デフォルト`,"prov.loadingConfig":`読み込み中…`,"prov.saved":`保存しました! 適用にはプロキシを再起動してください。`,"prov.loadConfigFail":`設定の読み込みに失敗しました`,"prov.invalidJson":`無効な JSON です`,"prov.saveFailed":`保存に失敗しました`,"prov.loginFailStart":`{provider} ログインを開始できませんでした`,"prov.loginError":`{provider} ログインエラー: {error}`,"prov.loginRequestFail":`{provider} ログインリクエストに失敗しました`,"prov.loginCancelled":`{provider} ログインはキャンセルされました`,"prov.loginTimeout":`{provider} ログインがタイムアウトしました — ブラウザが閉じたか完了しませんでした。もう一度お試しください。`,"prov.loginOk":`{provider} にログインしました。{cmd} を実行(またはライブで適用)してモデルを一覧表示します。`,"oauthTos.highTitle":`{provider}: サブスクリプション OAuth リスク`,"oauthTos.elevatedTitle":`{provider}: 非公式 OAuth ブリッジ`,"oauthTos.anthropicBody":`OpenCodex のような第三者プロキシ経由で Claude サブスクリプションの OAuth トークンを直接再利用することは、Anthropic がサポートする統合ではなく、アクセス制限につながる可能性があります。Claude サブスクリプションを使用するサポートされた Agent SDK 統合は別物です。`,"oauthTos.highBody":`OpenCodex は第三者 OAuth パス経由で {provider} に接続します。サポート外の利用はアクセス制限や停止につながる可能性があります。`,"oauthTos.elevatedBody":`OpenCodex は非公式 OAuth パス経由で {provider} に接続します。可能な場合は公式クライアントを使用してください。異常または自動化されたトラフィックは悪用とみなされ、アクセスが制限または停止される可能性があります。`,"oauthTos.saferPath":`より安全な選択肢: 代わりに OpenCodex で API キーを設定してください。`,"oauthTos.acknowledge":`リスクを理解した上で、OAuth を続行します。`,"oauthTos.continue":`OAuth で続行`,"prov.logoutOk":`{provider} からログアウトしました。`,"prov.logoutFail":`{provider} からログアウトできませんでした。アカウント状態は変更されていません。`,"prov.removed":`"{name}" を削除しました。`,"prov.removedDefault":`"{name}" を削除しました。既定のプロバイダーは "{defaultProvider}" になりました。`,"prov.removeFail":`"{name}" の削除に失敗しました。`,"prov.removeLastProvider":`このプロバイダーは、他に有効なプロバイダーを既定にできない場合は削除できません。`,"prov.removeHasDependentCombos":`先に依存するコンボを削除または更新してください: {combos}。`,"prov.setDefault":`既定に設定`,"prov.setDefaultSuccess":`"{name}" を既定のプロバイダーに設定しました。`,"prov.setDefaultFail":`"{name}" を既定のプロバイダーに設定できませんでした。`,"prov.defaultDisabled":`既定に設定する前に、このプロバイダーを有効にしてください。`,"prov.updateFail":`このプロバイダーを更新できませんでした。`,"prov.networkError":`ネットワークエラーです。プロキシが実行中であることを確認して、もう一度試してください。`,"prov.added":`"{name}" を追加しました。即時反映 — {cmd} を実行(または再起動)して Codex のピッカーにモデルを一覧表示します。`,"prov.removeConfirm":`プロバイダー "{name}" を削除しますか? そのモデルは Codex のピッカーから消えます。`,"prov.hasApiKey":`API キー設定済み`,"prov.hasHeaders":`カスタムヘッダー設定済み`,"prov.accounts":`アカウント ({n})`,"prov.accountsAria":`{name} のアカウントを切り替え`,"prov.accountActive":`アクティブ`,"prov.accountReauth":`再ログイン`,"prov.reauthenticate":`再認証`,"prov.reauthAccountMissing":`ログイン後に選択されたアカウントが見つかりませんでした`,"prov.reauthIdentityMismatch":`サインインしたアカウントが選択したアカウントと一致しませんでした`,"prov.accountAdd":`アカウントを追加`,"prov.accountNoLabel":`アカウント {id}`,"prov.accountSwitchTitle":`このアカウントを使用`,"prov.accountSwitched":`{email} に切り替えました。`,"prov.accountSwitchFail":`アカウントの切り替えに失敗しました`,"prov.accountRemoved":`{email} を削除しました。`,"prov.accountRemoveFail":`{email} を削除できませんでした。アカウントは変更されていません。`,"prov.accountRemoveAria":`{email} を削除`,"prov.accountRemoveConfirm":`アカウント {email} を削除しますか? そのログインはこのプロキシから削除されます。`,"prov.keyAdd":`API キーを追加`,"prov.keyAdded":`{name} に API キーを追加しました。`,"prov.keyAddFail":`API キーの追加に失敗しました`,"prov.keyPlaceholder":`API キーを貼り付け`,"prov.keySwitchTitle":`このキーを使用`,"prov.keySwitched":`キー {key} に切り替えました。`,"prov.keySwitchFail":`キーの切り替えに失敗しました`,"prov.keyRemoved":`キー {key} を削除しました。`,"prov.keyRemoveAria":`キー {key} を削除`,"prov.keyRemoveConfirm":`API キー {key} を削除しますか? このプロキシの設定から削除されます。`,"prov.activeBadge":`アクティブ`,"prov.disabledBadge":`無効`,"prov.defaultBadge":`デフォルト`,"prov.enable":`有効化`,"prov.disable":`無効化`,"prov.enabled":`"{name}" を有効にしました。そのモデルは再び Codex に表示できます。`,"prov.disabled":`"{name}" を無効にしました。設定は保持されますが、モデルは非表示になります。`,"prov.enableFail":`"{name}" の有効化に失敗しました。`,"prov.disableFail":`"{name}" の無効化に失敗しました。`,"prov.enableAria":`プロバイダー {name} を有効化`,"prov.disableAria":`プロバイダー {name} を無効化`,"prov.defaultCannotDisable":`デフォルトプロバイダーは無効化できません`,"prov.openaiAccountMode":`Codex アカウントモード`,"prov.openaiModePool":`プール`,"prov.openaiModeDirect":`ダイレクト`,"prov.openaiPoolDesc":`デフォルト。アフィニティ、クォータ、クールダウン、フェイルオーバーを使ってメインログインと追加アカウントをローテーションします。`,"prov.openaiDirectDesc":`現在/メインの Codex ログインのみを使用します。保存されたプールアカウントは読み込まれずローテーションもされません。`,"prov.openaiModeSaved":`OpenAI アカウントモードを {mode} に変更しました。`,"prov.openaiModeSaveFailed":`OpenAI アカウントモードを変更できませんでした。`,"prov.openaiApiDesc":`OpenAI API キーを使用し、Codex アカウントの資格情報は使用しません。`,"prov.manageCodexAccounts":`Codex アカウントを管理`,"prov.openaiApiMissing":`API キーが必要です`,"prov.openaiApiSetup":`API キーを設定`,"models.subtitle":`Codex に表示するモデルを切り替えます — ネイティブ GPT パススルーとルーティングプロバイダー、プロバイダー別(ヘッダーをクリックで折りたたみ)。非表示モデルはカタログとピッカーから外れますが、正確な id での直接呼び出しは可能です。変更は次回の Codex ターンで適用 — opencodex は Codex の 5 分間モデルキャッシュを無効化するので再起動は不要です。`,"models.nativeGroupLabel":`OpenAI ネイティブ`,"models.nativeHint":`パススルーモデルはプロバイダーで選択したプールまたはダイレクトアカウントオプションを使用します。一つオフにすると Codex ピッカーから隠します(カタログエントリは保持されるので、再有効化で正確に復元されます)。`,"models.active":`{active}/{total} 表示中`,"models.workspace.providers":`プロバイダー`,"models.workspace.allProviders":`すべてのプロバイダー`,"models.workspace.mainAria":`モデルの詳細`,"models.combosEmpty":`まだコンボが設定されていません`,"models.combosSetup":`セットアップ`,"models.combosAdd":`コンボを追加`,"models.combosActive":`{count} アクティブ`,"models.allOn":`すべてオン`,"models.allOff":`すべてオフ`,"models.cap350k":`350k 上限`,"models.capApplied":`コンテキスト上限を適用しました — 次回の Codex ターンで有効になります。`,"models.capSaveFailed":`コンテキスト上限の保存に失敗しました`,"models.contextCapped":`350k 上限`,"models.contextCapLabel":`コンテキスト上限`,"models.v2Label":`サブエージェント`,"models.shadowCallOriginal":`⚠ {models} →`,"models.v2DocsLink":`v1 / v2 とは?`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`ベース`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`すべてのモデル → v1 サーフェス`,"models.v2ModeDesc_default":`上流のデフォルト(sol/terra=v2、luna=v1)`,"models.v2ModeDesc_v2":`すべてのモデル → v2 サーフェス`,"models.v2Help":`すべてのモデルのマルチエージェントサーフェスを制御します。
40
-
41
- v1: クラシックな単一スレッドエージェント。すべてのモデルが v1 コラボサーフェスを使います。
42
- ベース: 上流のデフォルト — sol/terra は v2、luna は v1、それ以外は codex のフィーチャーフラグに従います。
43
- v2: spawn_agent を備えたマルチスレッドエージェント。すべてのモデルが v2 コラボサーフェスを使います。
44
-
45
- 変更は新規セッションに適用されます。`,"dash.multiAgent":`サブエージェント`,"models.v2Conflict":`[agents] max_threads が設定されています — codex は起動を拒否します; config.toml から削除してください`,"models.v2Applied":`サブエージェントモードを更新しました — 新規セッションに適用(ピッカーを更新するには Codex アプリを再起動)`,"models.v2ThreadsLabel":`最大スレッド数`,"models.v2ThreadsDefault":`デフォルト (4)`,"models.v2ThreadsApplied":`スレッド上限を更新しました — 新規セッションに適用`,"models.v2ThreadsInvalid":`スレッド上限は 1 以上の整数にしてください`,"models.v2ThreadsApply":`適用`,"models.capValue":`上限 {value}`,"models.contextCappedValue":`{value} 上限`,"models.setAll":`すべて設定`,"models.setAllHint":`{value} のコンテキスト上限をすべてのルーティング済みプロバイダーに適用します。ネイティブプロバイダーには影響しません。`,"models.collapseAll":`すべて折りたたむ`,"models.expandAll":`すべて展開`,"models.orderHint":`ピッカーの順序: サブエージェントの選択(選択順) → 残りのルーティングモデルはプロバイダー別、次にモデル ID 別のアルファベット順 → ネイティブモデル。表示切り替えはモデルをフィルタするだけで、この順序は変更しません。`,"models.custom":`カスタム…`,"models.customApply":`適用`,"models.customPlaceholder":`トークン (例: 420000)`,"models.applied":`適用しました — 次回の Codex ターンで有効になります。`,"models.saveFailed":`保存に失敗しました`,"models.networkError":`ネットワークエラー — プロキシは起動していますか?`,"models.loadFail":`モデルの読み込みに失敗しました — プロキシは起動していますか?`,"models.noRouted":`ルーティングモデルがありません`,"models.noRoutedHint":`まずプロバイダーにログインするか追加してください。`,"models.emptyDiscovery":`モデルが見つかりませんでした。プロバイダーのエンドポイントを確認するか、静的/カスタムモデルを追加してください。`,"models.emptyDiscoveryDisabled":`ライブモデル検出がオフで、静的モデルも設定されていません。`,"models.discoveryFailedBadge":`検出に失敗`,"models.discoveryFailedHttp":`モデル検出に失敗しました(HTTP {status})。`,"models.discoveryFailedBlocked":`モデル検出は宛先ポリシーによりブロックされました。`,"models.discoveryFailedInvalidResponse":`モデル検出が無効な応答を返しました。`,"models.discoveryFailedNetwork":`ネットワークエラーによりモデル検出に失敗しました。`,"models.discoveryFailedProvider":`プロバイダーがモデル検出エラーを報告しました。`,"models.discoveryFailedGeneric":`モデル検出に失敗しました。`,"models.openProviderSettings":`プロバイダー設定を開く`,"models.loading":`読み込み中…`,"models.search":`モデルを検索…`,"models.showMore":`さらに {n} 件表示`,"models.allowlistLabel":`選択のみ`,"models.allowlistHint":`チェックしたモデルのみカタログに送信します(空 = すべて)。数千のモデルを公開するプロバイダーで有用です。`,"models.selectedCount":`{n} 件選択`,"sub.subtitle":`Codex の {cmd} は最初の 5 モデル(優先度順)のみをオーバーライドとして通知します。ここで最大 5 つを選んでください — ネイティブ gpt またはルーティング — opencodex がカタログ優先度を設定し、これらが先頭に来るようにします。他のモデルも正確な名前で呼び出し可能です; これは表示のみを制御します。`,"sub.featured":`おすすめ`,"sub.orderHint":`ここでの表示順が Codex モデルピッカーの上位 1〜5 番目の位置と {cmd} のデフォルトモデル候補を決定します。`,"sub.noneSelected":`未選択 — 以下のリストから選んでください。`,"sub.models":`モデル`,"sub.search":`モデルを検索(ネイティブ gpt + ルーティング)…`,"sub.noModels":`モデルがありません — まずプロバイダーにログインするか追加してください。`,"sub.saved":`{n} 件のモデルを保存しました。新規 Codex セッションを開始(または {cmd} を実行)して spawn_agent オーバーライドとして確認してください。`,"sub.saveFailed":`保存に失敗しました`,"sub.networkError":`ネットワークエラー — プロキシは起動していますか?`,"sub.loadFail":`モデルの読み込みに失敗しました — プロキシは起動していますか?`,"sub.loading":`読み込み中…`,"sub.moveUp":`{m} を上へ移動`,"sub.moveDown":`{m} を下へ移動`,"sub.removeAria":`{m} を削除`,"sub.workspace.addToFeatured":`{m} をおすすめに追加`,"sub.workspace.allModels":`すべてのモデル`,"sub.workspace.featuredFull":`おすすめリストがいっぱいです(最大 5)`,"sub.workspace.mainAria":`サブエージェントのモデル詳細`,"sub.workspace.notFeatured":`おすすめ未設定`,"sub.workspace.priority":`優先度`,"sub.workspace.removeFromFeatured":`{m} をおすすめから削除`,"sub.workspace.selectModel":`モデルを選択`,"sub.workspace.selectModelDesc":`一覧からモデルを選んで詳細を確認し、spawn_agent のおすすめに設定します。`,"sub.workspace.selector":`公開セレクター`,"logs.title":`リクエストログ`,"logs.tabLogs":`ログ`,"logs.tabDebug":`デバッグ`,"logs.subtitle":`ローカル opencodex プロキシを経由した最近のリクエスト(新しい順)。`,"logs.autoRefresh":`自動更新`,"logs.noRequests":`まだリクエストがありません。`,"logs.loadError":`リクエストログを読み込めませんでした。`,"logs.filter.surface.label":`サーフェス`,"logs.filter.surface.all":`すべて`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.filter.surface.grok":`Grok`,"logs.filter.conversation.label":`会話`,"logs.filter.conversation.placeholder":`会話 ID を貼り付け`,"logs.filter.conversation.clear":`クリア`,"logs.filter.conversation.apply":`ログを絞り込み`,"logs.conversation.totals":`{requests} 件 · {tokens} トークン · {cost}`,"logs.conversation.scope":`合計は現在読み込まれている Logs リングのみです。`,"logs.conversation.excluded":`(~$ から価格なし {unpriced} / 未計測 {unmetered} を除外)`,"logs.detail.conversation":`会話`,"logs.badge.claude":`Claude`,"logs.badge.grok":`Grok`,"logs.col.time":`時刻`,"logs.col.request":`リクエスト`,"logs.col.model":`モデル`,"logs.col.effort":`負荷`,"logs.col.provider":`プロバイダー`,"logs.col.status":`状態`,"logs.col.tokens":`トークン`,"logs.col.tokPerSec":`tok/s`,"logs.col.estimatedCost":`~$`,"logs.metric.tokPerSecTitle":`リクエスト全体の所要時間あたりの出力トークン数`,"logs.metric.estimatedCostTitle":`API 定価相当額(実際の請求ではありません); 未対応の価格は利用できません`,"usage.cost.total":`API 定価相当額(この期間)`,"usage.cost.disclaimer":`請求明細ではありません。サブスクリプション利用量やプロバイダークレジットが代わりに適用される場合があります。`,"usage.cost.unpricedNote":`{count} 件のリクエストを除外(価格または使用量なし)`,"logs.detail.section.basic":`基本情報`,"logs.detail.section.performance":`パフォーマンス`,"logs.detail.section.cost":`API 定価相当額`,"logs.detail.section.attempts":`コンボの試行`,"logs.detail.section.usage":`生の使用量`,"logs.detail.ttft":`TTFT`,"logs.detail.costTotal":`定価相当額`,"logs.detail.totalTokens":`合計トークン`,"logs.detail.matchedKey":`一致した jawcode キー`,"logs.detail.priceSource":`価格ソース`,"logs.detail.unavailableReason":`利用不可の理由`,"logs.detail.copyRequestId":`リクエスト ID をコピー`,"logs.detail.copied":`コピーしました`,"logs.detail.source.jawcode":`jawcode カタログ`,"logs.detail.source.expected":`予想価格オーバーレイ`,"logs.detail.verification.verified":`検証済み`,"logs.detail.verification.derived":`ベースモデルから派生`,"logs.detail.attempt.target":`プロバイダー / モデル`,"logs.detail.attempt.reason":`結果 / 理由`,"logs.detail.attempt.completed":`完了`,"logs.detail.attempt.e2eNote":`トップレベルの tok/s はエンドツーエンドです; 各試行は自身の所要時間を使います。`,"logs.detail.reason.usage_missing":`使用量が報告されませんでした。`,"logs.detail.reason.usage_unsupported":`このプロバイダーは使用量を報告しません。`,"logs.detail.reason.output_missing":`正の出力トークン数が報告されませんでした。`,"logs.detail.reason.invalid_duration":`リクエストの所要時間が有効ではありません。`,"logs.detail.reason.price_unmatched":`一致する jawcode 価格が見つかりませんでした。`,"logs.detail.reason.invalid_cache_breakdown":`キャッシュトークンの詳細が合計入力トークンと矛盾しています。`,"logs.detail.reason.invalid_usage":`使用量に無効なトークン値が含まれています。`,"logs.detail.reason.combo_attempt_unavailable":`少なくとも 1 つのコンボ試行に価格を設定できませんでした。`,"logs.detail.estimate.usage_estimated":`プロバイダーの使用量は推定です。`,"logs.detail.estimate.cache_detail_missing":`キャッシュの詳細が利用できませんでした; 入力は上限の推定です。`,"logs.detail.estimate.expected_price_overlay":`検証済みの予想定価が使用されました。`,"logs.col.error":`エラー`,"logs.col.upstreamReason":`上流の理由`,"logs.col.duration":`所要時間`,"logs.tokens.reported":`報告済み`,"logs.tokens.unreported":`未報告`,"logs.tokens.unsupported":`非対応`,"logs.tokens.estimated":`推定`,"logs.tokens.input":`入力`,"logs.tokens.output":`出力`,"logs.tokens.cacheRead":`キャッシュ読み取り (c)`,"logs.tokens.cacheWrite":`キャッシュ書き込み (w)`,"logs.tokens.reasoning":`推論`,"logs.tokens.noCache":`キャッシュデータなし`,"logs.tokens.contextTotal":`アクティブコンテキスト`,"logs.tokens.noCacheNote":`このプロバイダーはキャッシュトークンを報告しません`,"logs.tokens.noCacheCursor":`Cursor のキャッシュ詳細は未報告`,"logs.tokens.noCacheCursorNote":`Cursor はキャッシュ read/write トークン数を公開しません。これは不明という意味で、キャッシュミスの確定ではありません`,"logs.tokens.estimatedNote":`推定(プロバイダーは正確な使用量を報告しません)`,"logs.details":`詳細`,"logs.detailTitle":`リクエストの詳細`,"logs.detailRaw":`生のログエントリ`,"debug.title":`デバッグ`,"debug.subtitle":`オプトインのプロバイダートランスポートおよび使用量抽出診断です。リクエストエラーと 502 はログタブに残ります。`,"debug.debug":`プロバイダーデバッグ`,"debug.usage":`使用量抽出`,"debug.injection":`インジェクションログ`,"debug.claude":`Claude インバウンド`,"debug.claudeInbound.title":`Claude インバウンドリクエスト`,"debug.claudeInbound.sub":`Claude Code/Desktop が実際に送信する内容(thinking、effort、metadata) — プロンプトテキストは保存されません。`,"debug.claudeInbound.empty":`まだキャプチャされたリクエストはありません。これがオンの状態で Claude からメッセージを送信してください。`,"debug.claudeInbound.time":`時刻`,"debug.claudeInbound.endpoint":`エンドポイント`,"debug.claudeInbound.model":`モデル`,"debug.claudeInbound.none":`なし`,"debug.reset":`ランタイムオーバーライドをクリア`,"debug.refresh":`更新`,"debug.follow":`追従`,"debug.streamProvider":`プロバイダー`,"debug.streamUsage":`使用量`,"debug.streamInjection":`インジェクション`,"debug.loading":`デバッグ設定を読み込み中…`,"debug.loadFailed":`デバッグ設定を読み込めませんでした。`,"debug.emptyTitle":`デバッグログはオフです`,"debug.empty":`上のカードでプロバイダーデバッグまたは使用量抽出をオンにしてください。プロキシ経由でリクエストを送信すると、ここに行が表示されます。`,"debug.noLinesTitle":`行を待機中`,"debug.noLines.provider":`プロバイダーデバッグはオンですが、トランスポートの異常(欠落または不正なフレーム、Cursor のダイヤル/再試行イベント)のみを記録します。Anthropic のようなプロバイダーでの正常なリクエストは行を生成しないことがあります。`,"debug.noLines.usage":`使用量抽出はオンですが、まだ何もキャプチャされていません。Codex 経由でチャット/リクエストを送信するとここに表示されます。`,"debug.noLines.injection":`インジェクションログはオンですが、まだ何もキャプチャされていません。コラボおよびサブエージェントのターンでのマルチエージェントガイダンスインジェクションと負荷上限の決定を記録します。`,"usage.title":`使用量`,"usage.subtitle":`プロキシからのローカルトークン会計です。欠損した使用量はゼロとして表示されることはありません。`,"usage.loading":`使用量データを読み込み中…`,"usage.empty":`まだ使用量が記録されていません。プロキシ経由でリクエストを送信するとここにアクティビティが表示されます。`,"usage.loadError":`使用量データを読み込めませんでした。`,"usage.range.all":`すべて`,"usage.range.available":`利用可能な履歴`,"usage.historyTruncated":`古い利用履歴が読み込まれていないため、合計は利用可能な履歴のみを対象とします。`,"usage.range.30d":`30日`,"usage.range.7d":`7日`,"usage.card.requests":`リクエスト`,"usage.card.measured":`計測`,"usage.card.reported":`報告`,"usage.card.totalTokens":`合計トークン`,"usage.card.cachedTokens":`キャッシュ読み取り`,"usage.card.cachedTokensHint":`プロバイダーキャッシュから提供されたプロンプトトークン(読み取り)。キャッシュ書き込みは存在する場合、下に表示されます。`,"usage.card.cacheWriteTokens":`キャッシュ書き込み`,"usage.card.coverage":`カバレッジ`,"usage.card.activeDays":`アクティブ日数`,"usage.section.heatmap":`日のアクティビティ`,"usage.section.overview":`概要`,"usage.section.models":`モデル`,"usage.section.providers":`プロバイダー`,"usage.section.coverage":`カバレッジ内訳`,"usage.workspace.report":`使用量レポート`,"usage.workspace.sections":`使用量セクション`,"usage.coverage.measured":`計測`,"usage.coverage.reported":`プロバイダー報告`,"usage.coverage.estimated":`推定`,"usage.coverage.note":`計測エントリにはプロバイダー報告および推定のトークン数が含まれます。未報告および非対応のリクエストは追跡されますが、ゼロトークンに水増しされることはありません。`,"usage.search.models":`モデルを検索…`,"usage.col.requests":`リクエスト`,"usage.col.measured":`計測`,"usage.col.reported":`報告`,"usage.col.tokens":`トークン`,"usage.col.share":`割合`,"usage.heatmap.less":`少ない`,"usage.heatmap.more":`多い`,"usage.dayMon":`月`,"usage.dayWed":`水`,"usage.dayFri":`金`,"usage.heatmap.tooltipTokens":`{tokens} トークン`,"usage.heatmap.tooltipRequests":`{requests} リクエスト`,"nav.storage":`ストレージ`,"storage.title":`ストレージ`,"storage.subtitle":`CODEX_HOME の使用状況を確認。クリーンアップはアクティブセッションに触れません。`,"storage.loading":`ストレージをスキャン中…`,"storage.empty":`CODEX_HOME が空か存在しません — 報告するものはありません。`,"storage.error":`ストレージのスキャンに失敗しました。CODEX_HOME が有効なディレクトリを指しているか確認してください。`,"storage.refresh":`再スキャン`,"storage.rescanned":`スキャンが完了しました。`,"storage.card.total":`合計サイズ`,"storage.card.files":`ファイル`,"storage.card.home":`CODEX_HOME`,"storage.snapshot.lastScan":`最終スキャン`,"storage.snapshot.scanning":`スキャン中…`,"storage.snapshot.unavailable":`まだスキャンがありません。`,"storage.cleanupCard.title":`容量を空ける`,"storage.cleanupCard.tabs":`クリーンアップオプション`,"storage.cleanupCard.tab.policy":`ポリシー`,"storage.cleanupCard.tab.quarantine":`隔離`,"storage.cleanup.noArchives":`クリーンアップ対象のアーカイブセッションはありません。`,"storage.section.buckets":`バケット`,"storage.section.largest":`最大ファイル`,"storage.workspace.overview":`概要`,"storage.workspace.selectBucket":`一覧からバケットを選ぶと内訳が表示されます。`,"storage.col.bucket":`バケット`,"storage.col.size":`サイズ`,"storage.col.files":`ファイル`,"storage.col.oldest":`最古`,"storage.col.newest":`最新`,"storage.col.rows":`DB 行`,"storage.rows.unknown":`不明(ロック中)`,"storage.bucket.sessions":`アクティブセッション`,"storage.bucket.archived_sessions":`アーカイブ済みセッション`,"storage.bucket.logs_db":`ログデータベース`,"storage.bucket.state_db":`状態データベース`,"storage.bucket.attachments":`添付`,"storage.bucket.deletion_manifests":`削除マニフェスト`,"storage.bucket.other":`その他`,"storage.cleanup.title":`アーカイブのクリーンアップ`,"storage.cleanup.help":`古いアーカイブセッションを割合で削除します。アクティブセッションには触れません。既定は隔離で、ファイルは CODEX_HOME/.trash へ移動します。`,"storage.cleanup.slider":`古いアーカイブの割合`,"storage.cleanup.percent":`{percent}%`,"storage.cleanup.preset":`{percent}`,"storage.cleanup.preview":`プレビュー`,"storage.cleanup.confirmTitle":`アーカイブクリーンアップの確認`,"storage.cleanup.confirmBody":`アーカイブ {count} 件(約 {size})、古い {percent}% を処理します。`,"storage.cleanup.moreFiles":`…ほか {n} 件`,"storage.cleanup.permanent":`完全に削除する(隔離しない)`,"storage.cleanup.permanentWarn":`完全削除は元に戻せません。`,"storage.cleanup.quarantineNote":`ファイルは CODEX_HOME 下の .trash へ移動します。隔離タブから復元できます。`,"storage.cleanup.cancel":`キャンセル`,"storage.cleanup.confirmQuarantine":`隔離する`,"storage.cleanup.confirmPermanent":`完全に削除`,"storage.cleanup.doneQuarantine":`{count} 件を隔離しました({size})。`,"storage.cleanup.donePermanent":`{count} 件を完全削除しました({size})。`,"storage.cleanup.previewFailed":`プレビューに失敗しました。`,"storage.cleanup.cleanupFailed":`クリーンアップに失敗しました。`,"storage.cleanup.err.codex_busy":`Codex が state.sqlite を使用中です — Codex を終了して再試行してください。`,"storage.cleanup.err.stale_preview":`プレビュー以降にアーカイブが変わりました — プレビューをやり直してください。`,"storage.cleanup.err.restore_pending_overlap":`選択したアーカイブは未完了の隔離復元と重なっています — 復元を完了するか再試行してください。`,"storage.cleanup.err.referenced_history":`選択したアーカイブはフォークまたはページング履歴から参照されています。`,"storage.cleanup.err.invalid_digest":`プレビューのダイジェストが無い、または無効です。`,"storage.cleanup.err.invalid_mode":`モードは quarantine または permanent である必要があります。`,"storage.cleanup.err.fs_failed":`ファイルシステムのクリーンアップに失敗しました。一部の変更は既に適用されている可能性があります — CODEX_HOME/.trash と表示されたリカバリパスを確認してください。`,"storage.cleanup.err.fs_failed_trash":`ファイルシステムのクリーンアップに失敗しました。一部の変更は既に適用されている可能性があります — {trashDir} と manifest.json で復旧可能なファイルを確認してください。`,"storage.cleanup.err.db_reconcile_failed":`Codex の状態データベースを更新できませんでした。`,"storage.cleanup.err.cleanup_failed":`クリーンアップに失敗しました。`,"storage.trash.title":`隔離`,"storage.trash.help":`CODEX_HOME/.trash へ移したアーカイブセッションです。復元すると JSONL とスレッド行が戻ります。`,"storage.trash.empty":`隔離エントリはありません。`,"storage.trash.loading":`隔離を読み込み中…`,"storage.trash.col.when":`隔離日時`,"storage.trash.col.files":`ファイル`,"storage.trash.col.size":`サイズ`,"storage.trash.col.mode":`モード`,"storage.trash.col.id":`エントリ`,"storage.trash.restore":`復元`,"storage.trash.confirmTitle":`隔離エントリを復元しますか?`,"storage.trash.confirmBody":`{id} から {count} 件(約 {size})をアーカイブセッションへ戻します。`,"storage.trash.cancel":`キャンセル`,"storage.trash.confirmRestore":`復元`,"storage.trash.done":`{count} 件を復元しました({size})。`,"storage.trash.restoreFailed":`復元に失敗しました。`,"storage.trash.listFailed":`隔離一覧を取得できませんでした。`,"storage.trash.mode.quarantine":`隔離`,"storage.trash.mode.permanent":`完全削除(未完了)`,"storage.trash.err.codex_busy":`Codex が state.sqlite を使用中です — Codex を終了して再試行してください。`,"storage.trash.err.invalid_trash":`隔離エントリ ID が無い、または無効です。`,"storage.trash.err.missing_trash":`隔離エントリが見つかりません。`,"storage.trash.err.dest_exists":`復元先が既に存在します — アーカイブファイルを削除または改名して再試行してください。`,"storage.trash.err.fs_failed":`ファイルシステムの復元に失敗しました。一部は既に復元されている可能性があります — archived_sessions と .trash を確認してください。`,"storage.trash.err.storage_mutation_busy":`別のストレージクリーンアップまたは復元が進行中です — しばらくして再試行してください。`,"storage.trash.err.db_reconcile_failed":`Codex の状態データベース行を復元できませんでした。`,"storage.trash.err.restore_failed":`復元に失敗しました。`,"storage.trash.err.restore_worker_timeout":`復元が長時間(10 分超)かかったため停止しました。`,"storage.trash.err.restore_worker_aborted":`シャットダウン中に復元がキャンセルされました。`,"storage.trash.err.restore_worker_failed":`復元ワーカーがクラッシュまたは予期しないエラーで失敗しました。`,"storage.policy.title":`自動クリーンアップ方針`,"storage.policy.help":`アーカイブがしきい値を超えたときの任意の一括クリーンアップ。既定はオフ — 自動では有効になりません。`,"storage.policy.loading":`方針を読み込み中…`,"storage.policy.loadFailed":`クリーンアップ方針を読み込めませんでした。`,"storage.policy.saveFailed":`クリーンアップ方針を保存できませんでした。`,"storage.policy.runFailed":`方針の実行に失敗しました。`,"storage.policy.alreadyRunning":`クリーンアップ方針の実行が既に進行中です。`,"storage.policy.invalid":`方針の値が無効です。`,"storage.policy.enabled":`自動クリーンアップを有効化`,"storage.policy.enabledHint":`既定はオフです。有効にすると選択したスケジュール(または今すぐ実行)でのみ動きます。`,"storage.policy.threshold":`アーカイブサイズが超えたら(GiB)`,"storage.policy.trigger":`トリガー`,"storage.policy.target":`クリーンアップ目標`,"storage.policy.targetPercent":`古いアーカイブを削除(%)`,"storage.policy.targetReduce":`アーカイブを次のサイズまで縮小(GiB)`,"storage.policy.thresholdInc":`しきい値を上げる`,"storage.policy.thresholdDec":`しきい値を下げる`,"storage.policy.percentInc":`パーセントを上げる`,"storage.policy.percentDec":`パーセントを下げる`,"storage.policy.reduceInc":`削減目標を上げる`,"storage.policy.reduceDec":`削減目標を下げる`,"storage.policy.schedule":`スケジュール`,"storage.policy.schedule.manual":`手動のみ`,"storage.policy.schedule.startup":`プロキシ起動時`,"storage.policy.schedule.daily":`毎日`,"storage.policy.schedule.weekly":`毎週`,"storage.policy.mode":`削除モード`,"storage.policy.mode.quarantine":`隔離(既定)`,"storage.policy.mode.permanent":`完全削除`,"storage.policy.permanentWarn":`完全削除モードは元に戻せません。確信がなければ隔離を使ってください。`,"storage.policy.lastRun":`前回の実行`,"storage.policy.lastRunDetail":`{count} 件削除 · {size} 解放`,"storage.policy.nextRun":`次回の実行`,"storage.policy.never":`なし`,"storage.policy.save":`保存`,"storage.policy.runNow":`今すぐ実行`,"storage.policy.running":`実行中…`,"storage.policy.saved":`方針を保存しました。`,"storage.policy.skippedDisabled":`方針が無効です — 先に有効化してください。`,"storage.policy.skippedUnder":`アーカイブサイズがしきい値未満です — 作業はありません。`,"storage.policy.skippedEmpty":`目標に合うアーカイブ候補がありません。`,"storage.policy.doneQuarantine":`方針が {count} 件を隔離しました({size})。`,"storage.policy.donePermanent":`方針が {count} 件を完全削除しました({size})。`,"modal.addNamed":`追加: {label}`,"modal.add":`プロバイダーを追加`,"modal.search":`プロバイダーを検索…`,"modal.logInWith":`{label} でログイン`,"modal.waitingBrowser":`ブラウザを待機中…`,"modal.providerName":`プロバイダー名`,"modal.adapter":`アダプター`,"modal.baseUrl":`ベース URL`,"modal.endpoint":`エンドポイント`,"modal.endpoint.tokenPlan":`トークンプラン`,"modal.endpoint.payAsYouGo":`従量課金`,"modal.endpoint.custom":`カスタム`,"modal.defaultModel":`デフォルトモデル(任意)`,"modal.allowPrivateNetwork":`ローカル/プライベートネットワークを許可`,"modal.allowPrivateNetworkHint":`意図的にセルフホストしたプロバイダーに対してのみ有効化してください。メタデータエンドポイントはブロックされたままです。`,"modal.nameRequired":`プロバイダー名は必須です`,"modal.baseUrlRequired":`ベース URL は必須です`,"modal.networkError":`ネットワークエラー — プロキシは起動していますか?`,"modal.loginFailStart":`ログインを開始できませんでした`,"modal.waitingLogin":`ブラウザログインを待機中…`,"modal.loggingIn":`ログイン中…`,"modal.loginTimeout":`ログインがタイムアウトしました — もう一度お試しください。`,"modal.back":`戻る`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`カスタムプロバイダー`,"modal.failedStatus":`失敗 ({status})`,"modal.loginError":`ログインエラー: {error}`,"modal.badge.codexLogin":`Codex ログイン`,"modal.badge.local":`ローカル`,"modal.badge.apiKey":`API キー`,"modal.badge.direct":`ダイレクト`,"modal.badge.pool":`プール`,"modal.badge.free":`無料`,"modal.invalidPreset":`この組み込みプロバイダープリセットは不完全です。プロキシを再起動してもう一度お試しください。`,"modal.freeTierTitle":`無料枠`,"modal.freeTierDefault":`API キー不要です。そのまま利用できます。`,"modal.tab.accounts":`アカウント`,"modal.tab.free":`無料`,"modal.tab.paid":`有料`,"modal.accountsHint":`ChatGPT/Codex、OAuth プロバイダー、API キーアカウントにここからサインインします。OpenAI は組み込み済み — 再度追加せずログインしてください。`,"modal.accountsCodexAuthLink":`Codex 認証`,"modal.notListed":`プロバイダーが載っていませんか? カスタムを追加`,"modal.catalogLoading":`カタログを読み込み中…`,"modal.accountLogin":`ログイン`,"modal.accountLogout":`ログアウト`,"modal.accountAdd":`アカウントを追加`,"modal.accountManage":`管理`,"modal.accountCodexPool":`ChatGPT アカウントプール`,"modal.accountLoggedIn":`ログイン済み`,"modal.accountLoggedOut":`未ログイン`,"quota.fiveHourLimit":`5 時間上限`,"quota.weeklyLimit":`週間上限`,"quota.monthlyLimit":`30 日上限`,"quota.monthlyCredits":`月次クレジット`,"quota.requestWindow":`リクエスト枠`,"quota.grokBuild":`GrokBuild`,"quota.cursorFirstParty":`ファーストパーティモデル`,"quota.cursorApiUsage":`API 使用量`,"quota.totalSubscriptionCredits":`サブスクリプションクレジット合計`,"quota.usedPercent":`{pct}% 使用`,"quota.limitReached":`上限に達しました`,"quota.resetsToday":`今日 {time} にリセット`,"quota.resetsTomorrow":`明日 {time} にリセット`,"quota.resetsAt":`{when} にリセット`,"quota.resetsRelativeMinutes":`{n} 分後にリセット`,"quota.resetsRelativeHours":`{n} 時間後にリセット`,"pws.status.ready":`準備完了`,"pws.status.needsSetup":`セットアップが必要`,"pws.status.needsAttention":`要対応`,"pws.auth.chatgptPassthrough":`ChatGPT パススルー`,"pws.auth.noKey":`キー不要`,"pws.freeTitle":`無料料金(キーが必要な場合もあります)`,"pws.localTitle":`ローカルランタイム`,"pws.modelCountOne":`1 モデル`,"pws.modelCount":`{count} モデル`,"pws.rail.suffixDefault":` · デフォルト`,"pws.rail.suffixLocal":` · ローカル`,"pws.rail.suffixFree":` · 無料`,"pws.rail.selectAria":`{name} を選択 — {status}{suffix}`,"pws.searchPlaceholder":`プロバイダーを検索…`,"pws.filterAria":`プロバイダーを絞り込み`,"pws.providerFiltersAria":`プロバイダーフィルタ`,"pws.filters":`フィルタ`,"pws.filterStatus":`状態`,"pws.pricing":`料金`,"pws.paid":`有料`,"pws.filterType":`タイプ`,"pws.type.cloud":`クラウド`,"pws.type.local":`ローカル`,"pws.type.selfHosted":`セルフホスト`,"pws.type.login":`ログイン`,"pws.sort":`並べ替え`,"pws.sortProvidersAria":`プロバイダーを並べ替え`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`無料優先`,"pws.sort.paidFree":`有料優先`,"pws.sort.accountsFirst":`アカウント優先`,"pws.resetAll":`すべてリセット`,"pws.providerList":`プロバイダー一覧`,"pws.providersAria":`プロバイダー`,"pws.groupReady":`準備完了 ({count})`,"pws.groupNeedsSetup":`セットアップが必要 ({count})`,"pws.groupDisabled":`無効 ({count})`,"pws.noSearchResults":`検索に一致するプロバイダーがありません。`,"pws.noMatchFilters":`フィルタに一致するプロバイダーがありません。`,"pws.noProvidersConfigured":`プロバイダーが設定されていません。`,"pws.workspaceMainAria":`プロバイダーの詳細`,"pws.detailComingSoon":`詳細ビューは近日対応 — このプロバイダーの管理にはクラシックビューを使用してください。`,"pws.selectPrompt":`リストからプロバイダーを選択してください。`,"pws.connectFirst":`最初のプロバイダーを接続`,"pws.empty.browseFree":`無料プロバイダーを見る`,"pws.empty.browseFreeDesc":`サブスクリプションなしで始める`,"pws.empty.connectAccount":`アカウントを接続`,"pws.empty.connectAccountDesc":`ChatGPT やプロバイダーのログインを使用`,"pws.empty.addEndpoint":`エンドポイントを追加`,"pws.empty.addEndpointDesc":`カスタムベース URL と API キー`,"pws.tab.overview":`概要`,"pws.tab.models":`モデル`,"pws.tab.usage":`使用量`,"pws.tab.accounts":`アカウント`,"pws.tab.settings":`設定`,"pws.connection":`接続`,"pws.status.connected":`接続済み`,"pws.attentionTitle":`要対応`,"pws.attention.reauth":`アクティブアカウントの再認証が必要です`,"pws.attention.reauthForward":`アクティブな Codex アカウントの再認証が必要です — アカウントタブを開いて修正してください`,"pws.attention.missingCredentials":`資格情報が不足しています`,"pws.cell.auth":`認証`,"pws.cell.note":`メモ`,"pws.cell.defaultModel":`デフォルトモデル`,"pws.statsAria":`プロバイダー統計`,"pws.statsTitle":`統計`,"pws.stats.totalRequests":`リクエスト (30日)`,"pws.stats.totalTokens":`トークン (30日)`,"pws.stats.quotaUpdated":`クォータを更新しました`,"pws.stats.quotaTracked":`レート制限は使用量タブで追跡されます。`,"pws.stats.source":`ソース`,"pws.usageLast30d":`使用量 (過去30日)`,"pws.metricRequests":`リクエスト`,"pws.metricTokens":`トークン`,"pws.usageUnavailable":`まだ使用量が記録されていません。`,"pws.rateLimits":`レート制限`,"pws.quotaUnavailable":`このプロバイダーのクォータデータがありません。`,"pws.accountQuotaUnavailable":`レート制限データを一時的に取得できません。前回の値がある場合はそれを表示します。`,"pws.accountPlan":`アカウントプラン`,"pws.accountPlanOnly":`{plan} — 月次クレジット枠なし(Grok CLI OAuth は Web のタスク回数枠を公開しません)。`,"pws.selected":`選択中`,"pws.copyModelId":`ID をコピー`,"pws.modelCopied":`コピーしました!`,"pws.modelsAvailable":`{count} 件利用可能`,"pws.modelSearchPlaceholder":`モデルを絞り込み…`,"pws.modelsLoading":`モデルを読み込み中…`,"pws.modelsLoadFailed":`モデルを読み込めませんでした。`,"pws.modelsNeedsReauth":`ライブモデル検出が動作するには再ログインが必要です。今は設定済みモデルを表示しています。`,"pws.modelsConfiguredFallback":`設定済みモデルを表示中(ライブ検出は利用不可)。`,"pws.modelsTruncated":`最初の {shown} / {total} モデルを表示中。リストを絞り込んでください。`,"pws.retry":`再試行`,"pws.noModels":`このプロバイダーで検出されたモデルはありません。`,"pws.noModelMatch":`フィルタに一致するモデルがありません。`,"pws.adapterBaseRequired":`アダプターとベース URL は必須です。`,"pws.addAccount":`アカウントを追加`,"pws.addKey":`API キーを追加`,"pws.apiKeys":`API キー`,"pws.authMode":`認証モード`,"pws.availableAccounts":`利用可能なアカウント`,"pws.accountOrdinal":`アカウント {count}`,"pws.accountsLoading":`アカウントを読み込み中…`,"pws.accountsLoadFailed":`アカウントを読み込めませんでした。`,"pws.retryAccounts":`再試行`,"pws.noAccounts":`まだアカウントが接続されていません。`,"pws.accountSwitching":`切り替え中…`,"pws.accountCurrent":`現在のアカウント`,"pws.defaultModelNone":`なし(プロバイダーのデフォルトを使用)`,"pws.discardSettings":`破棄`,"pws.jsonEditorDesc":`生のプロバイダー JSON 設定を編集します。変更はすぐに保存されます。`,"pws.jsonEditorTitle":`JSON エディタ — {name}`,"pws.jsonRestore":`復元`,"pws.jsonSave":`保存`,"pws.loggedInTitle":`ログイン済み`,"pws.notLoggedInTitle":`未ログイン`,"pws.note":`メモ`,"pws.allowPrivateNetwork":`ローカル/プライベートネットワークを許可`,"pws.liveModels":`プロバイダーからモデルを検出`,"pws.liveModelsDesc":`プロバイダーのライブモデルカタログを取得します。オフにすると設定済みの静的モデルのみを使用します。`,"pws.optionalPlaceholder":`任意`,"pws.providerId":`プロバイダー ID`,"pws.reauth":`再認証が必要`,"pws.reauthenticate":`再認証`,"pws.copyDoctor":`ocx doctor をコピー`,"pws.doctorCopied":`コピー済み`,"pws.healthCooldownHint":`クールダウンが終わるまで待ってください。まだこのアカウントをプローブしないでください。`,"pws.doctorCopyUnavailable":`クリップボードを利用できません`,"pws.healthLabel.rateLimited":`レート制限中`,"pws.healthLabel.quotaLimited":`クォータ制限中`,"pws.healthLabel.reauthRequired":`再認証が必要です`,"pws.healthLabel.refreshFailed":`更新に失敗しました`,"pws.healthLabel.metadataMismatch":`メタデータの不一致`,"pws.healthLabel.credentialConflict":`資格情報の競合`,"pws.healthSummary.rateLimited":`{provider} {account}: {until} までレート制限中です。それまでこのアカウントのルーティングは停止します。`,"pws.healthSummary.quotaLimited":`{provider} {account}: {until} までクォータ制限中です。それまでこのアカウントのルーティングは停止します。`,"pws.healthSummary.reauthRequired":`{provider} {account}: 再認証が必要です。`,"pws.healthSummary.credentialConflict":`{provider} {account}: 資格情報の競合があります。`,"pws.healthSummary.metadataMismatch":`{provider} {account}: メタデータが一致しません。`,"pws.healthSummary.staleCredentials":`{provider} {account}: 資格情報が不完全です。`,"pws.removeConfirm":`削除`,"pws.removeConfirmBody":`プロバイダー "{name}" を削除しますか? これは元に戻せません。`,"pws.removeDefaultConfirmBody":`既定のプロバイダー "{name}" を削除しますか? "{defaultProvider}" が既定のプロバイダーになります。この操作は元に戻せません。`,"pws.removeConfirmTitle":`プロバイダーを削除`,"pws.saveSettings":`保存`,"pws.saving":`保存中…`,"pws.settingsSaved":`設定を保存しました。`,"pws.settingsUnsavedBar":`未保存の変更があります。`,"pws.unsavedLeaveBody":`未保存の変更があります。保存してから移動しますか?`,"pws.unsavedLeaveTitle":`未保存の変更`,"pws.attentionRequired":`要対応`,"pws.attentionAria":`{name}: {reason}`,"pws.missingCredentials":`資格情報が不足しています`,"pws.editJsonDesc":`生のプロキシ設定を JSON として編集`,"pws.updatesUnavailable":`プロバイダーの更新は利用できません。`,"pws.dashboard.title":`プロバイダー概要`,"pws.dashboard.subtitle":`すべてのモデルプロバイダーを一か所で管理します。`,"pws.dashboard.rateLimits":`レート制限`,"pws.dashboard.recentlyUsed":`最近の使用`,"pws.dashboard.requests":`{count} リクエスト`,"pws.dashboard.checkedAgo":`{time} に確認`,"pws.dashboard.noQuota":`クォータデータなし`,"pws.dashboard.noUsage":`まだ使用量データはありません`,"pws.dashboard.noRateLimits":`まだレート制限データはありません`,"pws.allProviders":`プロバイダー概要`,"pws.enabledLabel":`有効`,"pws.testConnection":`接続テスト`,"pws.testing":`テスト中…`,"pws.connectionOk":`接続 OK`,"pws.connectionFailed":`接続失敗`,"pws.connectionNotApplicable":`対象外 — このプロバイダーは静的モデルカタログを使用します。`,"pws.editSettings":`設定を編集`,"pws.viewUsage":`詳細な使用量を表示`,"pws.allSystemsOk":`すべてのシステムが稼働中`,"pws.apiKeyConfigured":`API キー設定済み`,"pws.addApiKey":`API キーを追加`,"pws.loggedInAs":`{email} としてログイン中`,"pws.notLoggedIn":`未ログイン`,"pws.passthrough":`Codex パススルー`,"pws.notes":`メモ`,"pws.notePlaceholder":`このプロバイダーについてのメモを追加...`,"pws.noteSaved":`メモを保存しました`,"pws.authSummary":`認証`,"time.justNow":`たった今`,"time.notChecked":`未確認`,"time.minutesAgo":`{n}分前`,"time.hoursAgo":`{n}時間前`,"time.daysAgo":`{n}日前`,"modal.noMatch":`一致なし。`,"modal.oauthDefaultNote":`アカウントでログイン — API キー不要です。`,"modal.oauthComingSoon":`{label} の OAuth ログインは次回の更新で対応予定です。今は API キーをお使いください。`,"modal.oauthComingSoonShort":`このプロバイダーの OAuth ログインは次回の更新で対応予定です — 今は API キーをお使いください。`,"modal.useApiKeyInstead":`代わりに API キーを使用`,"modal.setupGuide":`セットアップガイド`,"modal.setupStep1Prefix":`にアクセスし`,"modal.setupDashboardLink":`{label} ダッシュボード`,"modal.setupStep1Suffix":`から API キーをコピー`,"modal.setupStep2":`下の API キー欄に貼り付け`,"modal.setupStep3":`プロバイダーを追加をクリック — モデルは自動検出されます`,"modal.namePlaceholder":`例: openrouter`,"modal.duplicateWarn":`プロバイダー "{name}" は既存で、上書きされます。`,"modal.forwardHintPrefix":`キー不要 — プロキシはあなたの`,"modal.forwardCredentials":`codex ログイン`,"modal.forwardHintSuffix":`資格情報をこのプロバイダーに転送します。`,"modal.localHint":`API キーは保存されません。Cursor の静的な公開モデルカタログを Codex に追加しますが、ライブの Cursor トランスポートとネイティブのファイル/シェル実行は監査されるまで無効のままです。`,"modal.getApiKey":`{label} の API キーを取得`,"modal.apiKey":`API キー`,"modal.apiKeyTransport":`API キーヘッダー`,"modal.apiKeyTransportNative":`x-api-key (Anthropic 標準)`,"modal.apiKeyTransportBearer":`Authorization: Bearer`,"modal.apiKeyPlaceholder":`sk-… (または $ENV_VAR)`,"modal.defaultModelPlaceholder":`例: gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.baseUrlPlaceholderError":`ベース URL に未解決の {placeholder} が含まれています。実際の値に置き換えてください。`,"modal.baseUrlPlaceholderHint":`プロバイダーを追加する前に、ベース URL の {placeholder} を実際の Account ID に置き換えてください。`,"modal.adding":`追加中…`,"modal.useOauthLogin":`← OAuth ログインを使用`,"nav.codexAuth":`Codex 認証`,"nav.api":`API`,"nav.openMenu":`メニューを開く`,"nav.closeMenu":`メニューを閉じる`,"codexAuth.mainAccount":`メインアカウント`,"codexAuth.codexApp":`Codex App`,"codexAuth.appLogin":`アプリログイン`,"codexAuth.accountPool":`アカウントプール`,"codexAuth.accountModeTitle":`OpenAI アカウントモード`,"codexAuth.accountModePool":`プールモード`,"codexAuth.accountModePoolDesc":`メインログインと対象の追加アカウントがここでローテーションします。`,"codexAuth.accountModeDirect":`ダイレクトモード`,"codexAuth.accountModeDirectDesc":`リクエストはメインログインのみを使用します; 追加アカウントはプールモード用に保持されます。`,"codexAuth.openaiMissing":`組み込みの OpenAI プロバイダーが設定されていません。`,"codexAuth.openaiDisabled":`組み込みの OpenAI プロバイダーが無効です。`,"codexAuth.openaiUnavailableDesc":`OpenAI アカウントは引き続き利用できます。Codex リクエストをルーティングするにはプロバイダーを有効にしてください。`,"codexAuth.enableOpenai":`OpenAI を有効にする`,"codexAuth.enablingOpenai":`有効化中...`,"codexAuth.enableOpenaiFailed":`OpenAI プロバイダーを有効にできませんでした。`,"codexAuth.openaiPresetLoadFailed":`OpenAI プロバイダーのプリセットを読み込めませんでした。`,"codexAuth.openaiPresetUnavailable":`OpenAI プロバイダーのプリセットを利用できません。`,"codexAuth.openProviders":`プロバイダーを開く`,"codexAuth.add":`追加`,"codexAuth.refreshQuota":`クォータを更新`,"codexAuth.refreshingQuota":`更新中...`,"codexAuth.quotaRefreshed":`クォータを更新しました`,"codexAuth.quotaRefreshFailed":`クォータの更新に失敗しました`,"codexAuth.pauseExhausted":`上限到達を一括停止`,"codexAuth.pausingExhausted":`クォータを確認中...`,"codexAuth.pauseExhaustedSucceeded":`上限に達したアカウントを停止しました: {count}`,"codexAuth.pauseExhaustedNone":`使用率 100% が確認されたアカウントはありません。`,"codexAuth.pauseExhaustedFailed":`上限到達アカウントの確認と停止に失敗しました。`,"codexAuth.noPool":`まだプールアカウントは追加されていません。`,"codexAuth.pause":`一時停止`,"codexAuth.resume":`再開`,"codexAuth.paused":`一時停止中`,"codexAuth.pauseSucceeded":`{email} を一時停止しました`,"codexAuth.resumeSucceeded":`{email} をアカウントプールに戻しました`,"codexAuth.pauseFailed":`{email} を一時停止できませんでした。変更はありません。`,"codexAuth.resumeFailed":`{email} を再開できませんでした。変更はありません。`,"codexAuth.pausedHint":`再開するまで、自動切り替え、再試行、クールダウン復旧、手動選択の対象外です。`,"codexAuth.fiveHour":`5時間`,"codexAuth.weekly":`週`,"codexAuth.monthly":`30日`,"codexAuth.resets":`リセット`,"codexAuth.today":`今日`,"codexAuth.current":`現在`,"codexAuth.nextSession":`選択済み`,"codexAuth.poolPrepared":`プール準備済み`,"codexAuth.preparePoolTitle":`このアカウントをプールモード用に準備しますか?`,"codexAuth.preparePoolDesc":`ダイレクトリクエストはメインログインを使い続けます。このアカウントはプールモードが有効化された際の準備済みプール選択になります。`,"codexAuth.prepareForPool":`プール用に準備`,"codexAuth.poolPreparedToast":`{email} はプールモード用に準備されました`,"codexAuth.switchTitle":`アクティブアカウントを切り替えますか?`,"codexAuth.switchDesc":`既存および新規 Codex セッションの次のリクエストから適用されます。処理中のリクエストは現在のアカウントを維持します。`,"codexAuth.cacheWarning":`アカウントが変わっても OpenCodex は会話コンテキストを再生しますが、プロバイダー側のプロンプトキャッシュは再ウォームアップが必要な場合があります。`,"codexAuth.setAsNext":`アカウントを選択`,"codexAuth.cancel":`キャンセル`,"codexAuth.switchBack":`メインに戻しますか?`,"codexAuth.switchBackDesc":`既存および新規 Codex セッションの次のリクエストからアプリログインアカウントを使用します。`,"codexAuth.autoSwitch":`使用量ベースのプロアクティブ切り替え`,"codexAuth.autoSwitchQuotaDesc":`クォータ: 使用率が {threshold}% 以上になると、既に紐付いたタスクを含む次のリクエストが、使用率の低い適格アカウントへ移る場合があります。Go/Free は 30 日枠のみを使用します。`,"codexAuth.autoSwitchQuotaOffDesc":`使用量ベースのプロアクティブ切り替えはオフです。新規/未紐付けタスクの割り当てと障害回復は引き続き適用されます。`,"codexAuth.autoSwitchRoundRobinDesc":`ラウンドロビン割り当てはこのしきい値を使用せず、新規/未紐付けタスクを引き続きローテーションします。`,"codexAuth.autoSwitchFillFirstDesc":`フィルファースト: {threshold}% は新規/未紐付けタスクの使い切り基準です。正常な紐付け済みタスクはアカウントを維持します。`,"codexAuth.autoSwitchFillFirstOffDesc":`フィルファーストには新規/未紐付けタスクの使用量基準がありません。クールダウン、再認証、障害回復では引き続きルーティングが変わる場合があります。`,"codexAuth.failureRecoveryNote":`障害回復は別です。出力前の 429/402 拒否、クールダウン、再認証、除外、または設定済みの一時障害フェイルオーバーにより、別の適格アカウントが選ばれる場合があります。`,"codexAuth.autoSwitchThreshold":`使用量しきい値`,"codexAuth.autoSwitchThresholdAria":`使用量しきい値(パーセント)`,"codexAuth.autoSwitchThresholdInc":`使用量しきい値を上げる`,"codexAuth.autoSwitchThresholdDec":`使用量しきい値を下げる`,"codexAuth.autoSwitchLoadFailed":`使用量ベースの切り替え設定を読み込めませんでした。`,"codexAuth.autoSwitchThresholdInvalid":`1 から 100 までの整数を入力してください`,"codexAuth.autoSwitchUpdated":`使用量ベースのプロアクティブ切り替え設定を更新しました`,"codexAuth.autoSwitchUpdateFailed":`使用量ベースの切り替え更新を確認できませんでした。最後に確認された値を表示しています。`,"anthropicPool.title":`Claude アカウントプール(実験的)`,"anthropicPool.enabledDesc":`429 時にアカウントをクールダウンしてフェイルオーバーします。新規セッションは 5 時間使用率が {threshold}% 未満のアカウントを優先します。`,"anthropicPool.disabledDesc":`アクティブな Claude アカウントのみを使用します。実験的ルーティングを受け入れる場合のみ有効にしてください。`,"anthropicPool.experimentalWarning":`実験的で十分に検証されていません。自動的な複数アカウント回転に見える行為は Anthropic により制限される可能性があります。同一組織はクォータを共有することがあり、その場合プールしても効果がありません。リスクを理解していない場合はオフのままにしてください。`,"anthropicPool.needTwoAccounts":`プールを有効にする前に、Claude OAuth アカウントを 2 つ以上追加してください。`,"anthropicPool.threshold":`新規セッションの使用率しきい値`,"anthropicPool.thresholdAria":`新規セッションの使用率しきい値(パーセント)`,"anthropicPool.thresholdHelp":`0 はクォータに基づく選択を無効にします(アフィニティ + アクティブアカウントのみ)。デフォルト 80。`,"anthropicPool.thresholdInvalid":`0 から 100 までの整数を入力してください`,"anthropicPool.loadFailed":`Claude プール設定を読み込めませんでした。`,"anthropicPool.saveFailed":`Claude プール設定を保存できませんでした。`,"anthropicPool.on":`オン`,"anthropicPool.off":`オフ`,"accountPool.strategy":`ローテーション戦略`,"accountPool.strategyDesc":`OpenCodex が新規/未紐付けタスクへアカウントを割り当てる方法です。`,"accountPool.strategyQuota":`クォータ`,"accountPool.strategyRoundRobin":`ラウンドロビン`,"accountPool.strategyFillFirst":`フィルファースト`,"accountPool.strategyHintQuota":`クォータ戦略は使用量しきい値を超えると、既存タスクの次のリクエストも別アカウントへ再紐付けできます。`,"accountPool.strategyHintRoundRobin":`ラウンドロビンは有効な紐付けがないタスクだけをローテーションし、使用量しきい値は通常のローテーションを変えません。`,"accountPool.strategyHintFillFirst":`フィルファーストはしきい値を未紐付けタスクの使い切り基準として使用し、正常な紐付け済みタスクは親和性を維持します。`,"accountPool.unboundDefinition":`新規/未紐付けタスクとは、現在のアカウント紐付けがないリクエストです。既存の表示中タスクも、プロキシまたは親和性のリセット後は未紐付けになる場合があります。`,"accountPool.stickyLimit":`ローテーション前の新規/未紐付け割り当て数`,"accountPool.stickyLimitAria":`ローテーション前の新規/未紐付け割り当て数`,"accountPool.stickyLimitInc":`スティッキー上限を上げる`,"accountPool.stickyLimitDec":`スティッキー上限を下げる`,"accountPool.stickyLimitHelp":`次へ進む前に、この回数の新規/未紐付けタスクを選択アカウントへ割り当てます。カウンターは上流の成功後ではなく、タスクを紐付けた時点で増えます。`,"accountPool.stickyLimitInvalid":`1 から 100 までの整数を入力してください`,"accountPool.strategyLoadFailed":`ローテーション戦略を読み込めませんでした。`,"accountPool.strategyUpdateFailed":`ローテーション戦略を保存できませんでした。`,"codexAuth.switched":`次のリクエストでは {email} を使用します`,"codexAuth.loadFailed":`Codex アカウント設定を読み込めませんでした。`,"codexAuth.switchFailed":`アカウントを切り替えられませんでした。以前の選択はそのままです。`,"codexAuth.removeConfirm":`{id} を削除しますか?`,"codexAuth.removeFailed":`アカウントを削除できませんでした。何も変更されていません。`,"codexAuth.addTitle":`Codex アカウントを追加`,"codexAuth.addIdLabel":`アカウント ID (スラッグ)`,"codexAuth.addIdPlaceholder":`codex-work、codex-alt、team...`,"codexAuth.resetCreditsAria":`{count} 個のリセットクレジット`,"codexAuth.addJsonLabel":`auth.json の内容`,"codexAuth.addHelp":`別のマシンの ~/.codex/auth.json からコピー、または codex-auth export を使用。`,"codexAuth.importBtn":`インポート`,"codexAuth.importInvalidJson":`無効な JSON です`,"codexAuth.importMissingTokens":`JSON に access_token または refresh_token がありません`,"codexAuth.importMissingId":`アカウント ID は必須です`,"codexAuth.accountAdded":`アカウントをプールに追加しました`,"codexAuth.addPickDesc":`別の ChatGPT アカウントでログインしてプールに追加します。`,"codexAuth.oauthLogin":`OAuth ログイン`,"codexAuth.oauthDesc":`ブラウザで ChatGPT ログインを開きます`,"codexAuth.importAuthJson":`auth.json をインポート`,"codexAuth.importAuthJsonDesc":`別の Codex インストールまたは codex-auth export から`,"codexAuth.back":`戻る`,"codexAuth.oauthAlreadyInProgress":`ログインは既に進行中です。ブラウザで完了してください。`,"codexAuth.oauthWaiting":`ブラウザで ChatGPT ログインが完了するのを待機中...`,"codexAuth.oauthSubmittingCode":`コードを送信中…`,"codexAuth.oauthCodeSubmitted":`コードを送信しました — ログイン完了を待っています…`,"codexAuth.oauthStatusRetrying":`ログイン状態の確認中にネットワークまたはプロキシ エラーが発生しました — 再試行中…`,"codexAuth.oauthCancelled":`ログインはキャンセルされました。`,"codexAuth.loginFailed":`ログインに失敗しました`,"codexAuth.needsReauth":`再ログイン`,"codexAuth.reauthenticate":`再認証`,"codexAuth.tokenExpired":`トークンが期限切れ — このアカウントを再認証してください`,"codexAuth.mainTokenExpired":`トークンが期限切れ — Codex アプリログインから再度サインインしてください`,"codexAuth.emailCollision":`このアカウントはメインの Codex ログインと一致します。別のアカウントを使用してください。`,"codexAuth.resetCreditsTitle":`リセットクレジット`,"codexAuth.resetCreditsAvailable":`{count} 個のリセットクレジットが利用可能です。`,"codexAuth.resetCreditsDesc":`各クレジットは現在の時間別・週間使用量上限を即座にリセットします。`,"codexAuth.noResetCredits":`リセットクレジットはありません。`,"codexAuth.earnCreditsHint":`クレジットは毎月および紹介プログラム経由で獲得できます。`,"codexAuth.creditsExpireNote":`クレジットは獲得から 30 日で失効します。`,"codexAuth.useOneCredit":`1 クレジットを使用`,"codexAuth.confirmResetTitle":`リセットクレジットを使用しますか?`,"codexAuth.confirmResetDesc":`現在のレート制限を即座にリセットします。残り {count} クレジットです。`,"codexAuth.irreversible":`この操作は元に戻せません。`,"codexAuth.useCredit":`クレジットを使用`,"codexAuth.redeeming":`リセット中...`,"codexAuth.resetSuccess":`レート制限をリセットしました! 残り {remaining} クレジット。`,"codexAuth.resetSuccessGeneric":`レート制限をリセットしました!`,"codexAuth.resetAlreadyRedeemed":`このクレジットは既に引き換え済みです。クレジットは変わりません。`,"codexAuth.resetNothingToReset":`今リセットが必要なレート制限枠はありません。`,"codexAuth.resetNoCredit":`利用可能なリセットクレジットはありません。`,"codexAuth.resetError":`リセットクレジットの引き換えに失敗しました。もう一度お試しください。`,"codexAuth.fifoNote":`最も古いクレジットが先に使用されます。`,"codexAuth.confirmWhichCredit":`{date} のクレジットが使用されます。`,"codexAuth.creditNext":`次に使用`,"codexAuth.creditLabel":`クレジット #{n}`,"codexAuth.creditNextBadge":`次`,"codexAuth.creditGranted":`付与 {date}`,"codexAuth.creditExpires":`失効 {date} (残り {days}日)`,"api.title":`API アクセス`,"api.subtitle":`生成した API キーで外部アプリから opencodex プロキシに接続します。認証は {authHeader} ヘッダーで行い、エンドポイントごとに受け付けるヘッダーは下の表のとおりです。`,"api.endpointNote":`ベース URL を OpenAI 互換クライアントで使ってください。Responses と Chat Completions は /v1 配下で公開されます。`,"api.endpointsTitle":`エンドポイント`,"api.baseUrl":`ベース URL`,"api.responsesEndpoint":`Responses API`,"api.chatCompletionsEndpoint":`Chat Completions API`,"api.messagesEndpoint":`Messages API`,"api.modelsEndpoint":`Models API`,"api.authTitle":`認証`,"api.authBaseUrlNote":`クライアントにはベース URL を設定し、下のプロトコル別エンドポイントを選んでください。`,"api.authLoopback":`ループバック (127.0.0.1 または ::1) は認証を省略します。リモートでは生成した ocx_ キーまたは OPENCODEX_API_AUTH_TOKEN が必要です。`,"api.modelsTitle":`外部モデルカタログ`,"api.modelsCount":`{count} 件が利用可能`,"api.modelsSearch":`モデルを検索`,"api.modelsSubtitle":`これらの ID を /v1/models と選択したプロトコルで使用してください。`,"api.modelsLoading":`モデルを読み込み中…`,"api.modelsLoadFailed":`外部モデルカタログを読み込めませんでした。`,"api.modelsEmpty":`外部から呼び出せるモデルはまだありません。`,"api.modelsNoMatch":`「{query}」に一致するモデルはありません。`,"api.colModel":`モデル`,"api.colSource":`ソース`,"api.colProtocols":`プロトコル`,"api.copyModelId":`ID をコピー`,"api.modelCopied":`コピーしました`,"api.testModel":`テスト`,"api.testingModel":`テスト中…`,"api.testSucceeded":`OK`,"api.testFailed":`失敗`,"api.protocolResponses":`Responses`,"api.protocolChatCompletions":`Chat Completions`,"api.protocolMessages":`Messages`,"api.sourceNative":`ChatGPT プール`,"api.sourceCombo":`コンボ`,"api.sourceCustom":`カスタム`,"api.usageResponsesTitle":`Responses の例`,"api.usageChatTitle":`Chat Completions の例`,"api.usageMessagesTitle":`Messages の例`,"api.newKeyTitle":`新しいキーを作成しました`,"api.newKeyNote":`今すぐこのキーをコピーしてください — 再表示されません。`,"api.copy":`コピー`,"api.copied":`コピーしました`,"api.dismiss":`閉じる`,"api.generateTitle":`キーを生成`,"api.keyNamePlaceholder":`キー名(任意)`,"api.generate":`生成`,"api.generating":`作成中…`,"api.activeKeys":`アクティブなキー ({count})`,"api.activeKeysLoading":`有効なキー`,"api.noKeys":`まだ API キーがありません。上で生成してください。`,"api.workspace.sections":`API セクション`,"api.section.keys":`キー`,"api.section.connect":`接続`,"api.section.endpoints":`エンドポイント`,"api.section.models":`モデル`,"api.section.examples":`例`,"api.workspace.details":`APIキーの詳細`,"api.workspace.keyDetails":`キーの詳細`,"api.workspace.keyPrefix":`キーのプレフィックス`,"api.workspace.deleteKey":`キーを削除`,"api.workspace.deleteConfirm":`このキーを削除しますか?この操作は元に戻せません。`,"api.workspace.usageExamples":`使用例`,"api.copyUrlHint":`クリックして URL をコピー`,"api.urlCopied":`URL をコピーしました`,"api.copyExampleHint":`クリックして例をコピー`,"api.exampleCopied":`例をコピーしました`,"api.colName":`名前`,"api.colKey":`キー`,"api.colCreated":`作成日`,"api.confirm":`確認`,"api.deleteAria":`API キーを削除`,"api.usageSampleInput":`こんにちは、世界!`,"api.clientConfig.title":`クライアント設定`,"api.clientConfig.rowsLabel":`クライアントを接続`,"api.clientConfig.details":`詳細`,"api.clientConfig.detailsAria":`{client} 設定の詳細`,"api.clientConfig.copyAria":`{client} 設定 JSON をコピー`,"api.clientConfig.downloadAria":`{client} 設定をダウンロード`,"api.clientConfig.rowMeta":`{destination} · モデル {count} 件`,"api.clientConfig.rowError":`{client} の設定を生成できませんでした。`,"api.clientConfig.copiedAnnounceClient":`{client} の設定 JSON をクリップボードにコピーしました。`,"api.clientConfig.clientOpencode":`OpenCode`,"api.clientConfig.clientPi":`Pi`,"api.clientConfig.copy":`JSON をコピー`,"api.clientConfig.download":`ダウンロード`,"api.clientConfig.loading":`クライアント設定を生成中…`,"api.clientConfig.jsonLabel":`{client} 設定 JSON`,"api.clientConfig.destination":`配置先ファイル`,"api.clientConfig.envHint":`起動前にキーを設定`,"api.clientConfig.mergeWarning":`配置先ファイルにマージしてください。置き換えると既存のプロバイダーや MCP 設定が失われます。`,"api.clientConfig.modelCount":`{count} 件のモデルを書き出しました`,"api.clientConfig.missingLimits":`{total} 件中 {count} 件のモデルにコンテキスト上限がないため、クライアント側の既定値が使われます。`,"api.clientConfig.noKeyYet":`{env} に対応するキーがまだありません。ループバック外で使う前に上でキーを発行してください。`,"api.clientConfig.loadFailed":`モデル一覧を読み取れなかったため、クライアント設定を生成できませんでした。`,"api.clientConfig.copiedAnnounce":`クライアント設定 JSON をクリップボードにコピーしました。`,"api.clientConfig.copyFailed":`クライアント設定 JSON をコピーできませんでした。`,"api.clientConfig.downloadedAnnounce":`{filename} をダウンロードしました。まだ何も変わっていません。{destination} に自分でマージしてください。`,"api.clientConfig.whereDisclosure":`このファイルの置き場所`,"api.clientConfig.whereBody":`上のパスはグローバル設定の場所です。作業ディレクトリのプロジェクト設定ファイルが優先され、キーは設定に書かれた環境変数から読み込まれ、このファイルには保存されません。`,"api.keysLoadFailed":`APIキーを読み込めませんでした。`,"api.createFailed":`APIキーを作成できませんでした。`,"api.deleteFailed":`APIキーを削除できませんでした。`,"api.auth.endpoint":`エンドポイント`,"api.auth.required":`必須`,"api.auth.accepted":`利用可`,"api.auth.rejected":`不可`,"api.auth.testProtocol":`{protocol} をテスト`,"api.auth.testNeedsFreshKey":`認証付きテストを実行するには、キーを新しく作成し、一度だけ表示される値を画面に残したままにしてください。`,"api.key.name":`キー名`,"api.key.rename":`名前を変更`,"api.key.saveName":`名前を保存`,"api.key.renaming":`保存中…`,"api.key.renameFailed":`名前を変更できませんでした。入力内容はそのまま残しています。`,"api.key.deleting":`削除中…`,"api.key.copyFailed":`キーをコピーできませんでした。このパネルを閉じる前に手動で選択してコピーしてください。`,"api.attribution.title":`キー別の使用状況`,"api.attribution.requests7d":`直近 7 日のリクエスト`,"api.attribution.totalRequests":`集計済みリクエスト総数`,"api.attribution.totalRequestsAvailable":`利用可能な履歴のリクエスト`,"api.attribution.sinceAvailable":`利用可能な集計開始日`,"api.attribution.lastUsed":`最終使用`,"api.attribution.since":`集計開始`,"api.attribution.neverUsed":`集計開始以降は未使用`,"api.attribution.unavailable":`使用状況なし`,"api.attribution.unavailableDetail":`まだ集計された使用状況がありません。集計開始前のリクエストは遡って割り当てられません。`,"api.attribution.ambiguous":`2 つのキーが同じ ID を共有しているため、どちらの使用状況か判別できません。設定ファイルでキーごとに一意の ID を指定してください。`,"api.attribution.railAmbiguous":`ID 重複`,"nav.claude":`Claude`,"claude.subtitle":`Claude Code 内で GPT、Gemini などのモデルを使用します。`,"claude.pageTitle":`Claude Code`,"claude.workspace.settings":`設定`,"claude.enabledLabel":`Claude 接続`,"claude.enabledHint":`オフにすると Claude Code はこのプロキシを使用できません。`,"claude.authMode":`認証モード`,"claude.authModeHint":`サブスクリプションは Claude アカウントが必要、プロキシは Anthropic アカウント不要で動作します`,"claude.authModeSubscription":`サブスクリプション(Claude アカウント)`,"claude.authModeProxy":`プロキシ(アカウント不要)`,"claude.authModeAuto":`自動 (Claude 認証を検出)`,"claude.effectiveMode.label":`次回起動時に適用`,"claude.effectiveMode.manual":`手動: {mode}`,"claude.effectiveMode.autoPresent":`自動: サブスクリプション — {source} で Claude 認証を検出`,"claude.effectiveMode.autoAbsent":`自動: プロキシモード — Claude 認証が見つかりません`,"claude.effectiveMode.autoUnknown":`自動: サブスクリプション — 認証を確認できませんでした`,"claude.effectiveMode.admissionKey":`このプロキシの API キーは引き続き送信されます。`,"claude.authSource.claude-json-oauth":`Claude アカウント`,"claude.authSource.claude-credentials-file":`認証情報ファイル`,"claude.authSource.macos-keychain":`macOS キーチェーン`,"claude.authSource.exported-env":`環境変数`,"claude.authSource.unknown":`検出された認証情報`,"claude.systemEnv":`自動接続`,"claude.systemEnvDesc":`オンにすると、任意のターミナルで claude を実行すると自動的にプロキシ経由になります。`,"claude.systemEnvUnsupported":`自動接続は macOS でのみ利用できます。このシステムでは {cmd} で Claude を起動してください。`,"claude.systemEnvWarn":`⚠ これを有効化するにはターミナルアプリを完全に終了して再起動する必要があります。推奨されません。`,"claude.fastMode":`高速モード(OpenAI)`,"claude.fastModeDesc":`OpenAI モデルの service_tier を制御します。オン = 優先(高速)。オフ = デフォルト。自動 = パススルー(クライアントが決定)。`,"claude.fastAuto":`自動`,"claude.fastOn":`オン`,"claude.fastOff":`オフ`,"claude.autoContext":`大きなコンテキストを自動で使用`,"claude.autoContextDesc":`1M マーキングがどこまで及ぶかを制御します。オン: 200k トークンを超えるすべてのモデル(GPT モデルなど)に大型コンテキスト行を付けます。オフ: 真の 1M モデルのみに付けます。`,"claude.autoContextInert":`設定ファイルにレガシーのコンテキストサイズ値(maxContextTokens)が存在するため無効です。再び有効化するにはそれを削除してください。`,"claude.autoCompactWindow":`自動要約ポイント`,"claude.autoCompactDefault":`350k(デフォルト)`,"claude.autoCompactWindowDesc":`チャットがこのポイントに達すると古いメッセージが要約されます。各モデル自身の上限を超えることはないので、200k モデルは影響を受けません。`,"claude.autoCompactWindowWarn":`これを変更すると GPT モデルが壊れる可能性があります — モデルの実際の上限より高く設定すると、要約が働く前にチャットがエラーになります。`,"claude.injectAgents":`サブエージェントを自動登録`,"claude.injectAgentsDesc":`サブエージェントタブで選んだモデル(と現在のデフォルトモデル)をディスパッチ可能な Claude Code エージェント(ocx-*)として登録します。次回セッションから適用されます。`,"claude.webSearchSidecar":`ウェブ検索サイドカーの上書き`,"claude.webSearchSidecarHint":`Claude Code リクエストのメインウェブ検索サイドカーを上書きします。`,"claude.visionSidecar":`ビジョンサイドカーの上書き`,"claude.visionSidecarHint":`Claude Code リクエストのメインビジョンサイドカーを上書きします。`,"claude.useMainSetting":`メイン設定を使用`,"claude.sidecarModelPlaceholder":`メイン設定のモデル`,"claude.quickstart":`はじめる`,"claude.quickstartHint":`{cmd} はプロキシ経由で Claude Code を開きます。あなたの claude.ai ログインはそのまま有効です。`,"claude.manualEnv":`手動セットアップ(高度)`,"claude.smallFastModel":`バックグラウンドヘルパーモデル`,"claude.smallFastModelHint":`チャットの要約やトピック検出のようなバックグラウンド作業に Claude Code が使うモデルです。haiku サブエージェントエイリアスもこれを使います。空 = Claude デフォルト(Haiku)。`,"claude.smallFastModelAccurateHint":`チャットの要約やトピック検出など、Claude Code がバックグラウンド処理に使うモデルです。サブエージェントの haiku エイリアスもこのモデルを使います。`,"claude.smallFastModelUnsetOption":`Claude Code に選択させる(ネイティブモデル)`,"claude.smallFastModelNativeWarning":`未設定の場合、OpenCodex はヘルパーモデルの上書きを設定しません。Claude Code がネイティブの Sonnet モデルを使用し、ネイティブプロバイダーで料金が発生する可能性があります。`,"claude.slotUnset":`Claude デフォルトを使用`,"claude.modelMap":`モデルの傍受`,"claude.modelMapHint":`特定モデルへのリクエストを傍受し、選んだモデルに再ルーティングします。デフォルトは空 — ルールを追加するまで何も起きません。`,"claude.mapFrom":`元のモデル(例: claude-sonnet-4-5)`,"claude.mapTo":`差し替え先(例: gemini/gemini-3-pro)`,"claude.addMapping":`ルールを追加`,"claude.removeMapping":`ルールを削除`,"claude.aliases":`利用可能なモデル`,"claude.aliasesHint":`Claude Code の /model メニューに表示されるモデル。`,"claude.aliasProviderOther":`その他`,"claude.loading":`読み込み中…`,"claude.loadFail":`Claude 設定の読み込みに失敗しました`,"claude.saved":`保存しました。`,"claude.saveFailed":`保存に失敗しました`,"claude.networkError":`ネットワークエラー — プロキシは起動していますか?`,"claude.toggleAria":`Claude 接続を切り替え`,"claude.none":`なし`,"claude.tabsLabel":`Claude クライアント`,"claude.tabCode":`Code`,"claude.tabDesktop":`Desktop`,"claudeDesktop.title":`Claude Desktop`,"claudeDesktop.subtitle":`各 Claude モデルファミリーをポート {port} の利用可能なモデルへルーティングします。`,"claudeDesktop.importJson":`JSON をインポート`,"claudeDesktop.exportJson":`JSON をエクスポート`,"claudeDesktop.loading":`Claude Desktop プロファイルを読み込み中…`,"claudeDesktop.loadFail":`Claude Desktop プロファイルの読み込みに失敗しました。`,"claudeDesktop.retry":`再試行`,"claudeDesktop.saveFailed":`Claude Desktop プロファイルの保存に失敗しました。`,"claudeDesktop.applyFailed":`プロファイルは保存されましたが、適用できませんでした。`,"claudeDesktop.updateFailed":`Claude Desktop の更新に失敗しました。`,"claudeDesktop.savedApplied":`プロファイルを保存し、Claude Desktop に適用しました。`,"claudeDesktop.savedAppliedAnnounce":`Claude Desktop プロファイルを保存して適用しました。`,"claudeDesktop.saved":`プロファイルを保存しました。`,"claudeDesktop.savedAnnounce":`Claude Desktop プロファイルを保存しました。`,"claudeDesktop.exported":`プロファイルを JSON としてエクスポートしました。`,"claudeDesktop.importExpected":`バージョン 1 の Claude Desktop プロファイルが必要です。`,"claudeDesktop.importReady":`JSON をインポートしました。ドラフトを確認して保存・適用してください。`,"claudeDesktop.importedAnnounce":`プロファイル JSON をインポートしました。未保存の変更を確認できます。`,"claudeDesktop.importInvalid":`選択されたファイルは有効なプロファイルではありません。`,"claudeDesktop.importFailed":`インポートに失敗しました。{error}`,"claudeDesktop.moved":`{route} を {family} に移動しました。`,"claudeDesktop.unsaved":`未保存の変更`,"claudeDesktop.upToDate":`プロファイルは最新です`,"claudeDesktop.saving":`保存中…`,"claudeDesktop.applying":`適用中…`,"claudeDesktop.saveApply":`保存して適用`,"claudeDesktop.emptyTitle":`利用可能なモデルがありません`,"claudeDesktop.emptyHint":`プロバイダーを追加または有効化してから、Claude Desktop ルートを割り当ててください。`,"claudeDesktop.assignmentsLabel":`Claude モデルファミリーの割り当て`,"claudeDesktop.family.opus":`Opus`,"claudeDesktop.family.fable":`Fable`,"claudeDesktop.family.sonnet":`Sonnet`,"claudeDesktop.family.haiku":`Haiku`,"claudeDesktop.modelCountOne":`{count} モデル`,"claudeDesktop.modelCountMany":`{count} モデル`,"claudeDesktop.chooseDefault":`デフォルトを選択`,"claudeDesktop.temporaryDefault":`一時的なデフォルト`,"claudeDesktop.laneEmpty":`ここにモデルをドロップするか、移動コントロールを使用してください。`,"claudeDesktop.laneNoMatch":`検索に一致するモデルはこのファミリーにありません。`,"nav.grok":`Grok`,"grok.title":`Grok Build`,"grok.subtitle":`opencodex が Grok 設定に登録したモデルです。`,"grok.loading":`Grok の状態を読み込み中…`,"grok.loadFail":`Grok 設定を読み取れませんでした。`,"grok.notConfiguredTitle":`Grok Build が未設定です`,"grok.notConfiguredHint":`Grok をインストールしてプロキシを再起動すると、opencodex が管理ブロックを次の場所に書き込みます:`,"grok.endpoint":`エンドポイント`,"grok.colModel":`モデル`,"grok.colAlias":`Grok エイリアス`,"grok.colContext":`コンテキスト`,"grok.groupNative":`ネイティブモデル`,"grok.groupRouted":`ルーティングモデル`,"grok.enabledCount":`{total} 件中 {on} 件を登録`,"grok.saved":`選択を保存しました。`,"grok.savedApplied":`選択を保存し、Grok 設定に反映しました。`,"grok.saveFailed":`Grok の選択を保存できませんでした。`,"grok.applyFailed":`選択は保存しましたが、Grok 設定を更新できませんでした。`,"grok.applySkipped":`選択は保存しましたが、Grok 設定は変更されませんでした。`,"grok.saveApply":`保存して適用`,"grok.saving":`保存中…`,"grok.applying":`適用中…`,"grok.unsaved":`未保存の変更`,"grok.upToDate":`選択は最新です`,"grok.toggleModel":`{id} を Grok に登録`,"claudeDesktop.available":`利用可能`,"claudeDesktop.defaultBadge":`既定`,"claudeDesktop.supports1m":`1M`,"claudeDesktop.unavailable":`利用不可`,"claudeDesktop.contextM":`{n}M コンテキスト`,"claudeDesktop.contextK":`{n}k コンテキスト`,"claudeDesktop.contextUnknown":`コンテキスト不明`,"claudeDesktop.alias":`エイリアス`,"claudeDesktop.useAsDefault":`{family} のデフォルトに設定`,"claudeDesktop.moveTo":`移動先`,"claudeDesktop.move":`移動`,"claudeDesktop.status.applied":`Desktop に適用済み`,"claudeDesktop.status.stale":`設定が古くなっています — 再適用してください`,"claudeDesktop.status.notApplied":`未適用`,"claudeDesktop.status.notActiveProfile":`Desktop は別のプロファイルを使用中 — 再適用してください`,"claudeDesktop.health.lastRequest":`最終リクエスト`,"claudeDesktop.health.stats":`{count} リクエスト / {errors} エラー`,"claudeDesktop.effort.supported":`effort`,"claudeDesktop.effort.displayOnly":`effort (表示のみ)`,"cws.loading":`コンボを読み込み中…`,"cws.loadFailed":`コンボを読み込めませんでした。`,"cws.saveFailed":`コンボを保存できませんでした。`,"cws.removeFailed":`コンボを削除できませんでした。`,"cws.saved":`コンボを保存しました。`,"cws.created":`{model} を作成しました。`,"cws.removed":`combo/{id} を削除しました。`,"cws.add":`コンボを追加`,"cws.addTitle":`コンボを追加`,"cws.addSubtitle":`プロバイダー全体にファンアウトする仮想モデルを作成します。クライアントは combo/<id> をリクエストします。`,"cws.create":`コンボを作成`,"cws.railAria":`コンボ一覧`,"cws.searchPlaceholder":`コンボやターゲットを検索…`,"cws.noSearchResults":`検索に一致するコンボがありません。`,"cws.group.failover":`フェイルオーバー`,"cws.group.roundRobin":`ラウンドロビン`,"cws.targetCount":`{count} ターゲット`,"cws.targetCountOne":`1 ターゲット`,"cws.overviewTitle":`コンボ`,"cws.overviewBlurb":`プロバイダー/モデルターゲット間でフェイルオーバーする、または決定論的で滑らかな重み付きラウンドロビンを使う仮想モデル。`,"cws.count.total":`合計`,"cws.count.failover":`フェイルオーバー`,"cws.count.roundRobin":`ラウンドロビン`,"cws.howTitle":`仕組み`,"cws.howBody":`Codex に combo/<id> を要求します。OpenCodex はターゲットを選び、再試行可能な上流の失敗時のみホップします。利用可能なターゲットが残っていない場合、グローバルなデフォルトプロバイダーを使わずにフェイルクローズします。`,"cws.attentionTitle":`要対応`,"cws.attention.empty":`ターゲットが設定されていません`,"cws.attention.few":`ターゲットが 1 つだけ — フェイルオーバーのホップ先がありません`,"cws.attention.catalogOmitted":`モデルカタログにありません — メンバー能力が不完全または非互換です(context window / メタデータ不足、または modality 交差が空)。エイリアス指定のルーティングは動作します`,"cws.emptyTitle":`最初のコンボを作成`,"cws.empty.createDesc":`仮想モデルに名前を付け、2 つ以上のバックエンドをつなぎます。`,"cws.backToAll":`すべてのコンボに戻る`,"cws.allCombos":`すべてのコンボ`,"cws.copyModel":`ID をコピー`,"cws.copied":`コピーしました`,"cws.renamed":`{from} を {to} に変更しました。`,"cws.tab.config":`設定`,"cws.tab.about":`概要`,"cws.strategy":`ストラテジー`,"cws.strategy.failover":`フェイルオーバー`,"cws.strategy.roundRobin":`ラウンドロビン`,"cws.strategy.failoverHint":`ターゲットを順に試します。最初が再試行可能なエラー(レート制限、障害、サブスクリプションゲート)で失敗した場合、次へホップします。`,"cws.strategy.roundRobinHint":`重みで決定論的にトラフィックを分散します。選んだターゲットを成功リクエストのバッチ分保持し、次へ進みます。`,"cws.field.id":`コンボ ID`,"cws.field.idHint":`クライアントは {model} をリクエストします`,"cws.field.idInternalHint":`コンボの内部 ID。作成後も変更できます。`,"cws.field.idHintEdit":`ID を変更するとコンボの名前が変更されます。クライアントは {model} をリクエストします。`,"cws.field.alias":`公開モデル名`,"cws.field.aliasPlaceholder":`deepseek-v4-flash または vendor/model`,"cws.field.aliasHint":`任意。プレフィックスなしの名前、vendor/model のようなカスタムプレフィックスを指定するか、空欄のままにすると combo/<id> を使用します。`,"cws.field.stickyLimit":`ローテーション前の固定成功数`,"cws.field.stickyLimitHint":`重み付きセレクタが進む前に、選んだターゲットをこの回数の成功リクエスト分保持します。`,"cws.field.defaultEffort":`デフォルトの推論`,"cws.field.defaultEffortNone":`なし(ターゲットのデフォルト)`,"cws.field.defaultEffortHint":`クライアントが推論負荷を省略した場合のみ使用されます。選択肢は選択ターゲットが広告する負荷の交差です。`,"cws.field.defaultEffortUnsupported":`この負荷はターゲット共通の階段にありません — リクエスト時に無視またはスナップされます。`,"cws.field.defaultEffortUnsupportedOption":`交差に含まれない`,"cws.targets":`ターゲット`,"cws.targets.failoverHint":`順序が重要 — 最初がプライマリです。`,"cws.targets.roundRobinHint":`重みが決定論的な相対選択を制御し、順序がローテーションリングの同点を解消します。`,"cws.target.provider":`プロバイダー`,"cws.target.model":`モデル`,"cws.target.weight":`重み`,"cws.target.pickProvider":`プロバイダーを選択…`,"cws.target.pickProviderFirst":`最初にプロバイダーを選択…`,"cws.target.pickModel":`モデルを選択…`,"cws.target.noModels":`このプロバイダーにモデルはありません`,"cws.target.modelPlaceholder":`モデル ID`,"cws.target.add":`ターゲットを追加`,"cws.target.drag":`ドラッグで並べ替え`,"cws.target.moveUp":`上へ移動`,"cws.target.moveDown":`下へ移動`,"cws.aboutTitle":`ランタイム`,"cws.aboutBody":`失敗したターゲットは Retry-After を尊重して短時間クールダウンします。無効またはコンテキストエラーはホップしません。各ターゲットは自身の能力に推論負荷を適応させます; 枯渇したコンボはフェイルクローズします。ログと使用量は順序付きの物理試行と試行ごとの使用量を保持します。`,"cws.removeConfirmTitle":`{model} を削除しますか?`,"cws.removeConfirmDesc":`これで仮想モデルが設定と Codex カタログから削除されます。プロバイダーは削除されません。`,"cws.unsavedTitle":`未保存の変更`,"cws.unsavedDesc":`このコンボへの編集を破棄して続行しますか?`,"cws.keepEditing":`編集を続ける`,"cws.err.missingId":`コンボ ID は必須です。`,"cws.err.invalidId":`ID は英字または数字で始まり、英数字、ドット、アンダースコア、ハイフンのみ使用できます(最大 64)。`,"cws.err.duplicateId":`この ID のコンボはすでに存在します。`,"cws.err.invalidAlias":`エイリアスには英字、数字、ドット、アンダースコア、ハイフンを使用でき、スラッシュ区切りは 1 つまでです。`,"cws.err.aliasReservedNamespace":`エイリアスに予約済みの "combo/" 名前空間は使用できません。`,"cws.err.aliasNativeFamily":`OpenAI ネイティブファミリー(gpt-*、o1-*、o3-*、o4-*、codex-*)のプレフィックスなしエイリアスは使用できません。`,"cws.err.duplicateAlias":`別のコンボがすでにこのエイリアスを使用しています。`,"cws.err.noTargets":`少なくとも 1 つのターゲットを追加してください。`,"cws.err.incompleteTarget":`各ターゲットにはプロバイダーとモデルが必要です。`,"cws.target.disabled":`{name}(無効)`,"cws.err.reservedNamespace":`combo という物理プロバイダーは、コンボ作成前に名前を変更する必要があります。`,"cws.err.providerCollision":`コンボ ID が設定されたプロバイダー名と衝突しています。`,"cws.err.unknownProvider":`各ターゲットは設定済みプロバイダーを使用する必要があります。`,"cws.err.duplicateTarget":`同じプロバイダー/モデルターゲットは一度しか使用できません。`,"cws.err.invalidStickyLimit":`固定成功数は 1 から 100 の整数にしてください。`,"cws.err.invalidWeight":`各ラウンドロビン重みは 1 から 10000 の整数にしてください。`,"cws.err.noEnabledTarget":`少なくとも 1 つのターゲットは有効なプロバイダーを使用する必要があります。`,"prov.editAlias":`Edit alias`,"prov.aliasPrompt":`Display name (leave empty to clear)`,"prov.aliasSaved":`Alias saved`,"prov.aliasSaveFailed":`Could not save alias`,"prov.accountId":`ID`,"models.customAdd":`Add custom model`,"models.customAddTitle":`Add custom model — {provider}`,"models.customEditTitle":`Edit custom model — {provider}`,"models.customAdded":`Custom model added`,"models.customUpdated":`Custom model updated`,"models.customDeleted":`Custom model deleted`,"models.customSaveFailed":`Failed to save custom model`,"models.customSaving":`Saving…`,"models.customAddBtn":`Add`,"models.customEditBtn":`Update`,"models.customEdit":`Edit`,"models.customDelete":`Delete`,"models.customDeleteConfirm":`Delete the {name} model?`,"models.customBadge":`Custom`,"models.customSummary":`{count} custom`,"models.customFieldModelId":`Model ID (endpoint slug)`,"models.customFieldModelIdPlaceholder":`e.g. qwen4-max-preview`,"models.customFieldDisplayName":`Display name (optional)`,"models.customFieldDisplayNamePlaceholder":`e.g. Qwen 4 Max Preview`,"models.customFieldContext":`Context window`,"models.customFieldModalities":`Input modalities`,"models.tipProvider":`Provider`,"models.tipContext":`Context`,"models.tipModalities":`Modalities`,"models.tipStatus":`Status`,"models.tipActive":`Active`,"models.tipDisabled":`Disabled`,"pws.estimatedCost":`Estimated cost`,"pws.costDisclaimer":`API list-price estimate, not an actual charge.`,"pws.modelBreakdown":`Model breakdown`,"pws.col.model":`Model`,"pws.col.cost":`Est. cost`,"pws.col.tokens":`Tokens`,"pws.col.requests":`Req.`,"pws.col.share":`Share`,"pws.tokenInput":`Input`,"pws.tokenOutput":`Output`,"nav.cloud":`Cloud Sync`,"cloud.subtitle":`Backup and restore ~/.opencodex to your Microsoft OneDrive (OAuth device login).`,"cloud.statusTitle":`Status`,"cloud.statusHint":`Local device id and last OneDrive push/pull.`,"cloud.loggedIn":`Microsoft account`,"cloud.notLoggedIn":`Not signed in`,"cloud.account":`Account`,"cloud.device":`This device`,"cloud.remote":`Remote folder`,"cloud.lastSync":`Last sync`,"cloud.never":`Never`,"cloud.remoteManifest":`Cloud snapshot`,"cloud.hasVault":`encrypted vault`,"cloud.remoteError":`Cloud check`,"cloud.clientIdTitle":`Azure app client ID`,"cloud.clientIdHint":`Create a public client app in Azure AD once, enable “Allow public client flows”, add delegated scopes Files.ReadWrite and offline_access, then paste the Application (client) ID here.`,"cloud.clientIdSaved":`Client ID saved.`,"cloud.azurePortal":`Azure app registrations`,"cloud.azureSteps":`Public client · device code · Files.ReadWrite + offline_access`,"cloud.loginTitle":`Sign in to Microsoft`,"cloud.login":`Sign in with Microsoft`,"cloud.logout":`Sign out`,"cloud.loginOk":`Signed in as {account}`,"cloud.loginFailed":`Microsoft sign-in failed`,"cloud.logoutOk":`Signed out of OneDrive.`,"cloud.deviceCodeTitle":`Device code`,"cloud.deviceCodeHint":`Open the link, enter this code, then approve access:`,"cloud.waitingAuth":`Waiting for Microsoft approval…`,"cloud.transferTitle":`Push / pull`,"cloud.transferHint":`Push uploads config to OneDrive. Pull overwrites this machine’s ~/.opencodex from the cloud snapshot.`,"cloud.passphrase":`Vault passphrase`,"cloud.passphrasePlaceholder":`Min 8 characters (encrypts oauth tokens)`,"cloud.passphraseShort":`Passphrase must be at least 8 characters when the vault is enabled.`,"cloud.includeVault":`Include encrypted token vault (oauth.json / auth.json)`,"cloud.includeUsage":`Include usage / logs DBs (larger)`,"cloud.push":`Push to OneDrive`,"cloud.pull":`Pull from OneDrive`,"cloud.pushOk":`Pushed: {files}`,"cloud.pullOk":`Pulled: {files}`,"cloud.pullConfirm":`Pull will overwrite local OpenCodex config and auth files from OneDrive. Continue?`,"cloud.securityNote":`Plain config is stored under OneDrive/OpenCodex/sync/. OAuth tokens only go into the AES-256-GCM vault when you set a passphrase. Never share your client secret or vault passphrase.`,"cloud.loginHint":`Browser login (recommended): Azure platform “Mobile and desktop” + redirect URI http://localhost. Device code needs Allow public client flows = Yes.`,"cloud.loginDevice":`Device code (advanced)`,"cloud.browserLoginTitle":`Browser sign-in`,"cloud.browserLoginHint":`Complete Microsoft sign-in in the opened tab, then return here.`,"cloud.openAuthPage":`Open sign-in page`,"cloud.redirectUri":`Loopback redirect`,"cloud.redirectUriTitle":`Register this exact redirect URI in Azure`,"cloud.redirectUriHint":`Authentication → Add a platform → Mobile and desktop applications → custom redirect URI (must match exactly, including port):`,"cloud.redirectUriWhere":`Do not use #cloud, port 10100, or https. Save, wait ~1 minute, then sign in.`,"cloud.clientIdSecretSaved":`Client ID and client secret saved.`,"cloud.clientSecret":`Client secret (optional)`,"cloud.clientSecretPlaceholder":`Only if Azure requires client_secret`,"cloud.clientSecretSet":`Secret saved (leave empty and save to clear; type a new value to replace)`,"cloud.clientSecretHint":`Preferred: Authentication → Allow public client flows = Yes (no secret). For Web apps, create a client secret under Certificates & secrets, paste here, then Save.`,"dash.injectionManage":`設定を開く`,"sub.settings":`設定`,"sub.sections":`サブエージェントのセクション`,"sub.delegation.model":`最初に呼ぶモデル`,"sub.delegation.modelHint":`Codex が作業を任せるとき、最初に呼ぶモデルです。上のおすすめが呼べる候補で、ここで選んだものがその中の第一候補になります。`,"dash.syncModelsHint":`接続済みのプロバイダーをもとに Codex のモデルカタログを書き直します。`,"dash.syncRun":`今すぐ同期`,"nav.pi":`Pi`,"pi.title":`Pi`,"pi.subtitle":`Manage Pi models, settings, packages, and extensions. Only the opencodex provider block is written to models.json.`,"pi.loading":`Loading Pi status…`,"pi.loadFail":`Could not read Pi status.`,"pi.actionOk":`Done.`,"pi.actionFail":`Action failed.`,"pi.applySkipped":`Pi apply was skipped (policy or missing install).`,"pi.statusTitle":`Install status`,"pi.binary":`pi binary`,"pi.agentDir":`Agent directory`,"pi.modelsFile":`models.json`,"pi.missing":`not found`,"pi.modelsTitle":`Models (providers.opencodex)`,"pi.modelsHint":`Apply writes only providers.opencodex from the live catalog. Your other providers stay untouched.`,"pi.apply":`Apply models`,"pi.applying":`Applying…`,"pi.applied":`Pi models applied.`,"pi.remove":`Remove opencodex block`,"pi.removing":`Removing…`,"pi.removed":`Pi opencodex provider removed.`,"pi.modelsNotPresentTitle":`opencodex not in models.json yet`,"pi.modelsNotPresentHint":`Click Apply to register the current catalog as providers.opencodex.`,"pi.endpoint":`Endpoint`,"pi.modelCount":`{count} models registered`,"pi.moreModels":`…and {n} more`,"pi.settingsTitle":`Settings`,"pi.settingsHint":`Curated subset of ~/.pi/agent/settings.json. Unknown keys are preserved.`,"pi.saveSettings":`Save settings`,"pi.savingSettings":`Saving…`,"pi.settingsSaved":`Pi settings saved.`,"pi.defaultProvider":`Default provider`,"pi.defaultModel":`Default model`,"pi.thinking":`Thinking level`,"pi.theme":`Theme`,"pi.projectTrust":`Project trust default`,"pi.hideThinking":`Hide thinking blocks`,"pi.quietStartup":`Quiet startup`,"pi.unset":`(unset)`,"pi.otherKeys":`{count} other keys left untouched`,"pi.packagesTitle":`Packages`,"pi.packagesHint":"Install runs `pi install` on the server machine. Packages execute with full system access — review sources before installing.","pi.install":`Install`,"pi.installing":`Installing…`,"pi.packageInstalled":`Package install finished.`,"pi.packageRemoved":`Package removed.`,"pi.removePackage":`Remove`,"pi.noPackages":`No packages in settings.json.`,"pi.extensionsTitle":`Extensions`,"pi.extensionsHint":`Auto-discovered under ~/.pi/agent/extensions plus paths listed in settings. Source editing is not available here.`,"pi.noExtensions":`No extensions found.`,"pi.cliHint":`CLI: ocx pi status | apply | settings | packages · launch with ocx pi`,"grok.modelsSection":`Grok Build models`,"grok.modelsSectionSub":`Choose which opencodex models appear in Grok Build, then save and apply.`,"grok.account.sectionAria":`xAI account and quota`,"grok.account.title":`xAI account quota`,"grok.account.subtitle":`Same depth as Codex Auth: active Grok account, plan, and usage bars. No need to open Providers.`,"grok.account.refreshQuota":`Refresh quota`,"grok.account.refreshing":`Refreshing…`,"grok.account.addAccount":`Add account`,"grok.account.login":`Log in with xAI`,"grok.account.loggingIn":`Waiting for login…`,"grok.account.cancelLogin":`Cancel login`,"grok.account.loading":`Loading accounts…`,"grok.account.empty":`No xAI account yet. Log in to see plan and quota bars here.`,"grok.account.loadFail":`Could not load xAI accounts.`,"grok.account.loginFail":`xAI login failed to start.`,"grok.account.loginOk":`xAI login succeeded.`,"grok.account.loginCancelled":`xAI login cancelled.`,"grok.account.select":`Select account`,"grok.account.switched":`Active xAI account updated.`,"grok.account.switchFail":`Could not switch xAI account.`,"grok.account.removeConfirm":`Remove this xAI account from opencodex?`,"grok.account.removeFail":`Could not remove account.`,"grok.account.removed":`Account removed.`,"grok.account.unnamed":`xAI account`,"nav.clients":`Clients`,"clients.title":`Clients`,"clients.subtitle":`See which base URL and model each coding agent is actually using on disk — useful when CC Switch, ocx inject, and launchers stack.`,"clients.refresh":`Refresh`,"clients.loadFail":`Could not read client status.`,"clients.proxyTitle":`Proxy`,"clients.proxyRunning":`Proxy running`,"clients.proxyStopped":`Proxy not detected`,"clients.generatedAt":`Checked {time}`,"clients.readOnlyHint":`Read-only. This page never rewrites client configs or shows API keys.`,"clients.tableTitle":`Effective client routing`,"clients.col.client":`Client`,"clients.col.verdict":`Verdict`,"clients.col.baseUrl":`Base URL`,"clients.col.model":`Model`,"clients.col.launcher":`Launcher`,"clients.col.switcher":`Switcher profile`,"clients.col.details":`Details`,"clients.col.configPaths":`Config paths`,"clients.col.notes":`Notes`,"clients.verdict.ocx":`via ocx`,"clients.verdict.direct":`direct`,"clients.verdict.mixed":`mixed`,"clients.verdict.missing":`missing`,"clients.verdict.unknown":`unknown`,"clients.manage":`Manage`,"clients.noNotes":`No notes`,"clients.exportHint":`Need a generated config template instead? Open the API page export panel.`,"clients.loading":`Loading client status…`}},Pe=[{code:`en`,name:`English`,htmlLang:`en`},{code:`de`,name:`Deutsch`,htmlLang:`de`},{code:`ko`,name:`한국어`,htmlLang:`ko`},{code:`zh`,name:`中文`,htmlLang:`zh-CN`},{code:`ru`,name:`Русский`,htmlLang:`ru`},{code:`ja`,name:`日本語`,htmlLang:`ja`}],Fe=`ocx-lang`;function Ie(){try{let e=localStorage.getItem(Fe);if(e===`en`||e===`de`||e===`ko`||e===`zh`||e===`ru`||e===`ja`)return e}catch{}let e=typeof navigator<`u`?navigator.language.toLowerCase():`en`;return e.startsWith(`de`)?`de`:e.startsWith(`ko`)?`ko`:e.startsWith(`zh`)?`zh`:e.startsWith(`ru`)?`ru`:e.startsWith(`ja`)?`ja`:`en`}var Le=(0,_.createContext)(null);function Re(e,t){if(!t)return e;let n=e;for(let e of Object.keys(t))n=n.split(`{${e}}`).join(String(t[e]));return n}function ze(){let e=(0,_.useContext)(Le);if(!e)throw Error(`useI18n must be used within LanguageProvider`);return e}function Y(){return ze().t}function Be({children:e}){let[t,n]=(0,_.useState)(Ie);(0,_.useEffect)(()=>{let e=Pe.find(e=>e.code===t)??Pe[0];document.documentElement.lang=e.htmlLang;try{localStorage.setItem(`ocx-lang`,t)}catch{}},[t]);let r=(0,_.useCallback)((e,n)=>Re(Ne[t][e]??Me[e]??e,n),[t]),i=(0,_.useMemo)(()=>({locale:t,setLocale:n,t:r}),[t,r]);return(0,z.jsx)(Le.Provider,{value:i,children:e})}function Ve({k:e,cmd:t,vars:n}){let{t:r}=ze(),[i,a=``]=r(e,n).split(`{cmd}`);return(0,z.jsxs)(z.Fragment,{children:[i,(0,z.jsx)(`code`,{className:`chip`,children:t}),a]})}function He(e){return e.replace(/^#\/?/,``)}function Ue(e,t=window){let n=He(e);if(He(t.location.hash)===n)return;let r=`${t.location.pathname}${t.location.search}#${n}`;t.history.replaceState(t.history.state,``,r)}function We(e,t=window){let n=He(e);He(t.location.hash)!==n&&(t.location.hash=n)}var Ge=m(),Ke=4,qe=8,Je=8,Ye=280,Xe=120,Ze=160,Qe=12;function $e(){return typeof window<`u`?window.innerHeight:800}function et(){return typeof window<`u`?window.innerWidth:1024}function tt(e,{align:t=`left`,placement:n=`below`,menuHeight:r=Ye}={}){let i=Math.min(Math.max(r,Xe),Ye),a=$e(),o=et();if(n===`right`){let t=a-e.top-Je,n=e.top-Je,r=i+qe>t&&n>t,s=Math.max(Je,Math.min(e.right+Qe,o-Ze-Je));return r?{position:`fixed`,left:s,bottom:a-e.top+qe,minWidth:Ze,maxHeight:Math.max(Xe,Math.min(Ye,e.top-Je-Ke))}:{position:`fixed`,top:e.top,left:s,minWidth:Ze,maxHeight:Math.max(Xe,Math.min(Ye,a-e.top-Je))}}let s=Math.max(e.width,0),c=a-e.bottom-Je,l=e.top-Je;if(i+Ke>c&&l>c){let n={position:`fixed`,bottom:a-e.top+qe,minWidth:s,maxHeight:Math.max(0,Math.min(Ye,l-Ke))};return t===`right`?n.right=o-e.right:n.left=Math.max(Je,Math.min(e.left,o-Je-s)),n}let u={position:`fixed`,top:e.bottom+Ke,minWidth:s,maxHeight:Math.max(0,Math.min(Ye,c-Ke))};return t===`right`?u.right=o-e.right:u.left=Math.max(Je,Math.min(e.left,o-Je-s)),u}function nt({on:e,onClick:t,disabled:n,label:r}){return(0,z.jsx)(`button`,{type:`button`,className:`switch${e?` on`:``}`,onClick:t,disabled:n,"aria-pressed":e,"aria-label":r??(e?`enabled`:`disabled`),children:(0,z.jsx)(`span`,{className:`knob`})})}function X({tone:e,children:t}){return(0,z.jsxs)(`div`,{className:`notice ${e===`ok`?`notice-ok`:`notice-err`}`,role:`status`,children:[e===`ok`?(0,z.jsx)(ie,{}):(0,z.jsx)(J,{}),(0,z.jsx)(`span`,{children:t})]})}function rt({value:e,options:t,onChange:n,disabled:r,label:i,id:a,style:o,align:s,placement:c,dropdownStyle:l,portal:u=!0}){let d=(0,_.useId)(),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(),y=(0,_.useRef)(null),b=(0,_.useRef)(null),x=(0,_.useRef)(null),S=(0,_.useCallback)(e=>`${d}-${e}`,[d]),C=t.find(t=>t.value===e),w=t.length===0?0:Math.max(0,t.findIndex(t=>t.value===e)),T=!f||t.length===0?w:Math.min(m??w,t.length-1),E=(0,_.useCallback)((e=!1)=>{p(!1),h(null),e&&b.current?.focus()},[]),D=(0,_.useCallback)(e=>{r||t.length===0||(h(Math.max(0,Math.min(t.length-1,e))),p(!0))},[r,t.length]),O=(0,_.useCallback)(e=>{if(!u)return;let t=b.current;t&&v(tt(t.getBoundingClientRect(),{align:s,placement:c,menuHeight:e}))},[s,c,u]);(0,_.useEffect)(()=>{if(!f)return;let e=e=>{let t=e.target;y.current?.contains(t)||x.current?.contains(t)||E()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[E,f]),(0,_.useLayoutEffect)(()=>{if(!f||!u)return;O();let e=()=>O(x.current?.offsetHeight);return window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[f,t.length,u,O]),(0,_.useLayoutEffect)(()=>{if(!f||!u||!x.current||!b.current)return;let e=x.current.offsetHeight;if(!e)return;let t=tt(b.current.getBoundingClientRect(),{align:s,placement:c,menuHeight:e});v(e=>e?.top===t.top&&e?.bottom===t.bottom&&e?.maxHeight===t.maxHeight?e:t)},[s,f,t.length,c,u]),(0,_.useLayoutEffect)(()=>{!f||!x.current||x.current.querySelector(`[id="${S(T)}"]`)?.scrollIntoView({block:`nearest`})},[T,f,S]);let k=e=>{let r=t[e];r&&(n(r.value),E(!0))},A=e=>{if(!r)switch(e.key){case`ArrowDown`:e.preventDefault(),D(f?Math.min(t.length-1,T+1):w);break;case`ArrowUp`:e.preventDefault(),D(f?Math.max(0,T-1):w);break;case`Home`:e.preventDefault(),D(0);break;case`End`:e.preventDefault(),D(t.length-1);break;case`Enter`:case` `:e.preventDefault(),f?k(T):D(w);break;case`Escape`:f&&(e.preventDefault(),E(!0));break;case`Tab`:if(f){let e=t[T];e&&n(e.value),p(!1)}break;default:break}},j=f&&t[T]?S(T):void 0,M=f?(0,z.jsx)(`div`,{ref:x,id:d,className:`select-dropdown${u?` select-dropdown-portal`:``}${!u&&s===`right`?` select-dropdown-right`:``}${!u&&c===`right`?` select-dropdown-beside`:``}`,role:`listbox`,"aria-label":i,style:u?{...g,zIndex:60,...l}:l,children:t.map((t,n)=>(0,z.jsx)(`button`,{id:S(n),type:`button`,role:`option`,tabIndex:-1,"aria-selected":t.value===e,className:`select-option${t.value===e?` active`:``}${n===T?` select-option-active`:``}`,onMouseEnter:()=>h(n),onClick:()=>k(n),children:t.label},t.value))}):null;return(0,z.jsxs)(`div`,{ref:y,className:`custom-select`,style:{position:`relative`,display:`inline-block`,...o},children:[(0,z.jsxs)(`button`,{ref:b,id:a,type:`button`,role:`combobox`,className:`select-trigger`,onClick:()=>{r||(f?E():D(w))},onKeyDown:A,disabled:r,"aria-haspopup":`listbox`,"aria-expanded":f,"aria-controls":f?d:void 0,"aria-activedescendant":j,"aria-label":i,children:[(0,z.jsx)(`span`,{children:C?.label??e}),(0,z.jsx)(he,{style:{width:12,height:12,color:`var(--muted)`,transform:f?`rotate(90deg)`:`none`,transition:`transform .12s`}})]}),u?M&&(0,Ge.createPortal)(M,document.body):M]})}function it({icon:e,title:t,children:n,className:r,style:i}){return(0,z.jsxs)(`div`,{className:r?`empty ${r}`:`empty`,style:i,children:[e,(0,z.jsx)(`div`,{className:`title`,children:t}),n&&(0,z.jsx)(`div`,{className:`text-control`,children:n})]})}function at({content:e,children:t,side:n=`top`,maxWidth:r=280}){let[i,a]=(0,_.useState)(!1),o=(0,_.useId)(),s=(0,_.useRef)(null),c=()=>{s.current!==null&&window.clearTimeout(s.current),s.current=window.setTimeout(()=>a(!0),150)},l=()=>{s.current!==null&&(window.clearTimeout(s.current),s.current=null),a(!1)};return(0,_.useEffect)(()=>()=>{s.current!==null&&window.clearTimeout(s.current)},[]),(0,z.jsxs)(`button`,{type:`button`,className:`ocx-tooltip`,onMouseEnter:c,onMouseLeave:l,onFocus:c,onBlur:l,onKeyDown:e=>{e.key===`Escape`&&l()},"aria-describedby":i?o:void 0,style:{display:`inline`,border:0,background:`transparent`,padding:0,margin:0,color:`inherit`,font:`inherit`,cursor:`inherit`},children:[t,i&&(0,z.jsx)(`span`,{id:o,className:`ocx-tooltip-bubble ocx-tooltip-bubble--${n}`,role:`tooltip`,style:{maxWidth:r},children:e})]})}async function ot(e){if(e.status!==204){if(typeof e.text==`function`){let t=await e.text();return t.trim()?JSON.parse(t):void 0}return await e.json()}}function st(e,t){return typeof e.error==`string`&&e.error?e.error:typeof e.message==`string`&&e.message?e.message:t}async function ct(e,t=`HTTP ${e.status}`){if(!e.ok){let n=t;try{n=st(await e.json(),t)}catch{}throw Error(n)}return ot(e)}async function lt(e){if(!e.ok)return null;try{return await ot(e)}catch{return null}}var ut=`dashboard/update`;function dt(){let e=window.location.hash.replace(/^#\/?/,``);return e===`dashboard/providers`?`providers`:e===`dashboard/models`?`models`:`overview`}function ft(){return window.location.hash.replace(/^#\/?/,``)===ut}function pt(e){return e===`overview`?`dashboard`:`dashboard/${e}`}async function mt(e,t){let n=await ct(e,t);if(n===void 0)throw Error(t??`empty response`);return n}var ht=[`low`,`medium`,`high`,`xhigh`];function gt(e){return e?.includes(`-preview.`)?`preview`:`latest`}function _t(e,t){switch(e){case`source_checkout`:return t(`dash.updateReason.source_checkout`);case`latest_unavailable`:return t(`dash.updateReason.latest_unavailable`);case`already_latest`:return t(`dash.updateReason.already_latest`);default:return t(`dash.updateReason.unknown`)}}function vt(e,t){switch(e){case`running`:return t(`dash.updateStatus.running`);case`restarting`:return t(`dash.updateStatus.restarting`);case`succeeded`:return t(`dash.updateStatus.succeeded`);case`failed`:return t(`dash.updateStatus.failed`)}}function yt(e,t){let n={...e};return t?.model!==void 0&&(n.model=t.model),t?.backend===null?delete n.backend:t?.backend!==void 0&&(n.backend=t.backend),n}function bt(e){let t=[];for(let n of e)(n.provider===`openai`||n.provider===`anthropic`)&&t.push({value:n.id,label:`${n.provider}/${n.id}`});return t}function xt(e,t){return e.find(e=>e.id===t)?.provider===`anthropic`?`anthropic`:`openai`}var St=!1;typeof window<`u`&&typeof window.addEventListener==`function`&&(window.addEventListener(`keydown`,()=>{St=!0},{capture:!0,passive:!0}),window.addEventListener(`pointerdown`,()=>{St=!1},{capture:!0,passive:!0}));function Ct(e){if(e){if(St){e.focus({preventScroll:!0});return}try{e.focus({preventScroll:!0,focusVisible:!1})}catch{e.focus({preventScroll:!0})}}}function wt(e,t){let n=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let r=n.current;if(r){if(e){r.open||r.showModal();return}r.open&&r.close(),Ct(t.current)}},[e,t]),(0,_.useEffect)(()=>()=>{let e=n.current;e?.open&&e.close(),Ct(t.current)},[t]),n}var Tt=[`gpt-5.4-mini`,`gpt-5.6-luna`];function Et(e){let t=Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>e.trim()):[];return t.length>0?t:Tt}function Dt(e){return Et(e).join(`, `)}function Ot(e){return Et(e).map(e=>e.replace(/^gpt-/,``)).join(`, `)}function kt(e){let{t,updateOpen:n,closeUpdateDialog:r,updateDialogRef:i,updateChannel:a,changeUpdateChannel:o,updateLoading:s,updateError:c,updateCheck:l,fetchUpdateCheck:u,updateRestart:d,setUpdateRestart:f,runUpdate:p,maHelpOpen:m,setMaHelpOpen:h,maHelpDialogRef:g,effortCapHelpOpen:_,setEffortCapHelpOpen:v,effortCapHelpDialogRef:y,shadowCallHelpOpen:b,setShadowCallHelpOpen:x,shadowCallHelpDialogRef:S,shadowCall:C}=e;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`dialog`,{ref:i,id:`dashboard-update-dialog`,className:`modal-overlay`,style:{display:n?`flex`:`none`,border:`none`,margin:0,maxWidth:`none`,maxHeight:`none`,width:`100%`,height:`100%`},"aria-labelledby":`update-title`,onCancel:e=>{e.preventDefault(),r()},children:(0,z.jsxs)(`div`,{className:`modal-card`,children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{id:`update-title`,children:t(`dash.updateTitle`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:r,"aria-label":t(`common.cancel`),children:(0,z.jsx)(ae,{})})]}),(0,z.jsx)(`div`,{className:`modal-desc`,children:t(`dash.updateDesc`)}),(0,z.jsxs)(`div`,{className:`update-row`,children:[(0,z.jsx)(`label`,{className:`field-label`,htmlFor:`update-channel`,children:t(`dash.updateChannel`)}),(0,z.jsx)(rt,{value:a,options:[{value:`latest`,label:`latest`},{value:`preview`,label:`preview`}],onChange:e=>o(e),disabled:s,label:t(`dash.updateChannel`),portal:!1})]}),s&&(0,z.jsx)(it,{className:`update-empty`,icon:(0,z.jsx)(`span`,{className:`spin`}),title:t(`dash.updateChecking`)}),c&&(0,z.jsxs)(`div`,{className:`notice notice-err`,role:`status`,children:[(0,z.jsx)(J,{}),(0,z.jsx)(`span`,{children:c})]}),l&&!s&&(0,z.jsxs)(`div`,{className:`update-box`,children:[(0,z.jsxs)(`div`,{className:`spread`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`muted text-label`,children:t(`dash.versionLocal`)}),(0,z.jsx)(`div`,{className:`mono`,children:l.currentVersion}),(0,z.jsx)(`div`,{className:`muted text-label`,style:{marginTop:4},children:l.installer===`source`?t(`dash.installSource`):l.installer===`bun`?t(`dash.installBun`):t(`dash.installNpm`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`muted text-label`,children:t(`dash.versionRemote`)}),(0,z.jsx)(`div`,{className:`mono`,children:l.latestVersion??`—`})]}),(0,z.jsx)(`span`,{className:`badge ${l.updateAvailable?`badge-green`:`badge-muted`}`,children:l.updateAvailable?t(`dash.updateAvailable`):t(`dash.updateCurrent`)})]}),(0,z.jsxs)(`div`,{className:`muted update-command`,children:[t(`dash.updateCommand`),` `,(0,z.jsx)(`code`,{className:`chip`,children:l.command})]}),l.reason===`source_checkout`&&(0,z.jsxs)(`div`,{className:`notice-warn`,role:`status`,children:[(0,z.jsx)(J,{}),` `,t(`dash.updateSource`)]}),l.reason===`latest_unavailable`&&(0,z.jsxs)(`div`,{className:`notice-warn`,role:`status`,children:[(0,z.jsx)(J,{}),` `,t(`dash.updateUnavailable`),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:s,onClick:()=>{u(a,!0)},style:{marginLeft:12},children:[(0,z.jsx)(q,{}),` `,t(`dash.updateRetry`)]})]}),!l.canUpdate&&l.reason!==`latest_unavailable`&&l.reason!==`source_checkout`&&(0,z.jsxs)(`div`,{className:`update-recheck`,children:[(0,z.jsx)(`span`,{className:`muted update-recheck-reason`,children:t(`dash.updateCannotAuto`,{reason:_t(l.reason,t)})}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:s,onClick:()=>{u(a,!0)},children:[(0,z.jsx)(q,{}),` `,t(s?`dash.updateChecking`:`dash.updateRecheck`)]})]}),l.canUpdate&&(0,z.jsxs)(`div`,{className:`spread update-restart`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`dash.updateRestart`)}),(0,z.jsx)(`div`,{className:`muted text-label`,children:t(`dash.updateRestartHint`)})]}),(0,z.jsx)(`button`,{type:`button`,className:`switch ${d?`on`:``}`,onClick:()=>f(e=>!e),"aria-label":t(`dash.updateRestart`),"aria-pressed":d,children:(0,z.jsx)(`span`,{className:`knob`})})]})]}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:r,children:t(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:p,disabled:!l?.canUpdate||s,children:t(`dash.runUpdate`)})]})]})}),(0,z.jsxs)(`dialog`,{ref:g,id:`multi-agent-help-dialog`,className:`modal-overlay`,style:{display:m?`flex`:`none`,border:`none`,margin:0,maxWidth:`none`,maxHeight:`none`,width:`100%`,height:`100%`},"aria-labelledby":`multi-agent-help-title`,onCancel:e=>{e.preventDefault(),h(!1)},children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":t(`common.close`),tabIndex:-1,onClick:()=>h(!1)}),(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{id:`multi-agent-help-title`,children:t(`dash.multiAgent`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:()=>h(!1),"aria-label":t(`common.close`),children:(0,z.jsx)(ae,{})})]}),(0,z.jsx)(`div`,{className:`modal-desc leading-relaxed`,style:{whiteSpace:`pre-line`},children:t(`models.v2Help`)}),(0,z.jsx)(`div`,{style:{marginTop:12},children:(0,z.jsx)(`a`,{className:`text-control`,href:`https://opencodex.me/guides/sub-agent-surface/`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:t(`models.v2DocsLink`)})}),(0,z.jsx)(`div`,{className:`modal-actions`,children:(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>h(!1),children:t(`common.ok`)})})]})]}),(0,z.jsxs)(`dialog`,{ref:y,id:`effort-cap-help-dialog`,className:`modal-overlay`,style:{display:_?`flex`:`none`,border:`none`,margin:0,maxWidth:`none`,maxHeight:`none`,width:`100%`,height:`100%`},"aria-labelledby":`effort-cap-help-title`,onCancel:e=>{e.preventDefault(),v(!1)},children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":t(`common.close`),tabIndex:-1,onClick:()=>v(!1)}),(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{id:`effort-cap-help-title`,children:t(`dash.effortCapLabel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:()=>v(!1),"aria-label":t(`common.close`),children:(0,z.jsx)(ae,{})})]}),(0,z.jsx)(`div`,{className:`modal-desc leading-relaxed`,style:{whiteSpace:`pre-line`},children:t(`dash.effortCapHelp`)}),(0,z.jsx)(`div`,{className:`modal-actions`,children:(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>v(!1),children:t(`common.ok`)})})]})]}),(0,z.jsxs)(`dialog`,{ref:S,id:`shadow-call-help-dialog`,className:`modal-overlay`,style:{display:b?`flex`:`none`,border:`none`,margin:0,maxWidth:`none`,maxHeight:`none`,width:`100%`,height:`100%`},"aria-labelledby":`shadow-call-help-title`,onCancel:e=>{e.preventDefault(),x(!1)},children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":t(`common.close`),tabIndex:-1,onClick:()=>x(!1)}),(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{id:`shadow-call-help-title`,children:t(`dash.shadowCallIntercept`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:()=>x(!1),"aria-label":t(`common.close`),children:(0,z.jsx)(ae,{})})]}),(0,z.jsx)(`div`,{className:`modal-desc leading-relaxed`,style:{whiteSpace:`pre-line`},children:t(`dash.shadowCallTooltip`,{models:Dt(C?.sourceModels)})}),(0,z.jsx)(`div`,{className:`modal-actions`,children:(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>x(!1),children:t(`common.ok`)})})]})]})]})}function At({t:e,models:t,modelsLoading:n,modelQuery:r,setModelQuery:i,filteredGroups:a,expandedProviders:o,setExpandedProviders:s}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`h-section`,children:[e(`dash.availableModels`),` `,(0,z.jsx)(`span`,{className:`count`,children:t.length}),n&&(0,z.jsx)(`span`,{className:`spin`,style:{marginLeft:4}})]}),t.length===0&&!n?(0,z.jsx)(it,{title:e(`dash.noModels`)}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`pws-search-wrap`,children:[(0,z.jsx)(de,{className:`pws-search-icon`,width:14,height:14,"aria-hidden":`true`}),(0,z.jsx)(`input`,{type:`search`,className:`input pws-search-input`,placeholder:e(`models.search`),value:r,onChange:e=>i(e.target.value),"aria-label":e(`models.search`)})]}),a.length===0?(0,z.jsx)(`p`,{className:`muted text-control`,style:{margin:`4px 0`},children:e(`dash.modelsNoResults`)}):(0,z.jsx)(`div`,{className:`dash-model-acc`,children:a.map(([e,t])=>{let n=r.trim().toLowerCase()!==``||o.has(e);return(0,z.jsxs)(`div`,{className:`dash-model-group`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`dash-model-head`,onClick:()=>s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),"aria-expanded":n,children:[(0,z.jsx)(he,{width:12,height:12,style:{transform:n?`rotate(90deg)`:`none`,transition:`transform .12s`,color:`var(--muted)`},"aria-hidden":`true`}),(0,z.jsx)(`span`,{className:`font-semibold`,children:e}),(0,z.jsx)(`span`,{className:`count`,children:t.length})]}),n&&(0,z.jsx)(`div`,{className:`dash-model-chips`,children:t.map(e=>(0,z.jsx)(`code`,{className:`dash-model-chip`,children:e.id},`${e.provider}/${e.id}`))})]},e)})})]})]})}var jt={ko:[{v:0x2386f26fc10000,s:`경`},{v:0xe8d4a51000,s:`조`},{v:1e8,s:`억`},{v:1e4,s:`만`}],zh:[{v:0x2386f26fc10000,s:`京`},{v:0xe8d4a51000,s:`兆`},{v:1e8,s:`亿`},{v:1e4,s:`万`}]};function Mt(e){return e.replace(/\.0+$/,``).replace(/(\.\d*?)0+$/,`$1`)}function Nt(e,t){let n=jt[t];if(n){for(let t of n)if(e>=t.v)return`${Mt((e/t.v).toFixed(1))}${t.s}`;return String(e)}return e<1e4?String(e):e<1e6?`${Mt((e/1e3).toFixed(1))}K`:e<1e9?`${Mt((e/1e6).toFixed(1))}M`:e<0xe8d4a51000?`${Mt((e/1e9).toFixed(1))}B`:`${Mt((e/0xe8d4a51000).toFixed(1))}T`}var Pt={en:{day:`d`,hour:`h`,minute:`m`,second:`s`},de:{day:`T`,hour:`Std`,minute:`Min`,second:`Sek`},ko:{day:`일`,hour:`시간`,minute:`분`,second:`초`},zh:{day:`天`,hour:`小时`,minute:`分钟`,second:`秒`},ru:{day:`д`,hour:`ч`,minute:`мин`,second:`с`},ja:{day:`日`,hour:`時間`,minute:`分`,second:`秒`}};function Ft(e,t){let n=Math.max(0,Math.floor(e)),r=Pt[t]??Pt.en;if(n<300)return`${n}${r.second}`;let i=Math.floor(n/60);if(i<60)return`${i}${r.minute}`;let a=Math.floor(i/60);if(a<24){let e=i%60;return e>0?`${a}${r.hour} ${e}${r.minute}`:`${a}${r.hour}`}let o=Math.floor(a/24),s=a%24;return s>0?`${o}${r.day} ${s}${r.hour}`:`${o}${r.day}`}function It(e,t){return t(e===`source`?`dash.installSource`:e===`bun`?`dash.installBun`:e===`npm`?`dash.installNpm`:`dash.installUnknown`)}function Lt({locale:e,health:t,providers:n,usage30d:r,usageLoading:i,healthLoading:a,startupHealth:o,projectConfigWarnings:s,maMode:c,maBusy:l,maHelpTriggerRef:u,maHelpOpen:d,setMaHelpOpen:f,switchMaMode:p,updateCheck:m}){let h=Y(),g=t?.status===`ok`,_=m?.currentVersion??t?.version??`—`,v=m?.latestVersion??`—`,y=!!m?.updateAvailable,b=It(m?.installer,h);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`dash-overview-head`,children:[(0,z.jsxs)(`div`,{className:`stat-row`,children:[(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsxs)(`div`,{className:`label`,style:{display:`flex`,alignItems:`center`,gap:6},children:[h(`dash.multiAgent`),(0,z.jsx)(`button`,{ref:u,type:`button`,className:`btn btn-ghost btn-sm`,style:{width:24,height:24,minWidth:24,flex:`0 0 24px`,padding:0,borderRadius:`var(--radius-pill)`,color:`var(--muted)`},onClick:()=>f(!0),"aria-label":h(`dash.multiAgent`),"aria-haspopup":`dialog`,"aria-controls":`multi-agent-help-dialog`,"aria-expanded":d,children:(0,z.jsx)(ue,{width:14,height:14,"aria-hidden":`true`})})]}),(0,z.jsx)(`div`,{className:`value`,style:{display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":h(`dash.multiAgent`),style:{display:`inline-flex`,borderRadius:`var(--radius-pill)`,background:`var(--surface-soft, var(--raised))`,padding:3,gap:2},children:[`v1`,`default`,`v2`].map(e=>(0,z.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":c===e,className:`btn btn-sm text-caption${c===e?` btn-primary`:` btn-ghost`}`,style:{borderRadius:`var(--radius-pill)`,minWidth:36,padding:`5px 10px`,border:`none`,background:c===e?void 0:`transparent`,color:c===e?void 0:`var(--muted)`},disabled:l,onClick:()=>void p(e),children:h(`models.v2Mode_${e}`)},e))})})]}),(0,z.jsxs)(`div`,{className:`stat`,"aria-busy":a||void 0,children:[(0,z.jsx)(`div`,{className:`label`,children:h(`dash.status`)}),(0,z.jsxs)(`div`,{className:`value`,style:{display:`flex`,alignItems:`center`,gap:9,color:g?`var(--green)`:`var(--red)`},children:[(0,z.jsx)(`span`,{className:`dot ${g?`dot-green`:`dot-red`}`}),h(g?`dash.online`:`dash.offline`)]})]}),(0,z.jsxs)(`div`,{className:`stat`,"aria-busy":a||void 0,children:[(0,z.jsx)(`div`,{className:`label`,children:h(`dash.versionLocal`)}),(0,z.jsx)(`div`,{className:`value mono`,title:b,children:_}),(0,z.jsx)(`div`,{className:`muted text-label dash-stat-coverage`,children:b})]}),(0,z.jsxs)(`div`,{className:`stat`,"aria-busy":a||void 0,children:[(0,z.jsx)(`div`,{className:`label`,children:h(`dash.versionRemote`)}),(0,z.jsx)(`div`,{className:`value mono`,style:y?{color:`var(--amber, var(--orange, #d97706))`}:void 0,children:v}),(0,z.jsx)(`div`,{className:`muted text-label dash-stat-coverage`,children:m?h(y?`dash.updateAvailable`:`dash.updateCurrent`):`\xA0`})]}),(0,z.jsxs)(`div`,{className:`stat`,"aria-busy":a||void 0,children:[(0,z.jsx)(`div`,{className:`label`,children:h(`dash.uptime`)}),(0,z.jsx)(`div`,{className:`value mono`,children:t?Ft(t.uptime,e):`—`})]}),(0,z.jsxs)(`div`,{className:`stat`,"aria-busy":a||void 0,children:[(0,z.jsx)(`div`,{className:`label`,children:h(`dash.providers`)}),(0,z.jsx)(`div`,{className:`value`,children:n.length})]}),(0,z.jsxs)(`div`,{className:`stat`,"aria-busy":i||void 0,children:[(0,z.jsx)(`div`,{className:`label`,children:h(`dash.tokens30d`)}),(0,z.jsx)(`div`,{className:`value mono`,children:r&&r.summary.requests>0?Nt(r.summary.totalTokens,e):`—`}),(0,z.jsx)(`div`,{className:`muted text-label dash-stat-coverage`,children:r&&r.summary.requests>0?h(`dash.coverage`).replace(`{pct}`,`${Math.round(r.summary.coverageRatio*100)}%`):`\xA0`})]})]}),(0,z.jsx)(`div`,{className:`startup-health-slot`,"aria-live":`polite`,children:o?(0,z.jsxs)(`a`,{className:`startup-health-bar`,href:`#startup`,children:[(0,z.jsx)(`span`,{className:`dot ${o===`error`?`dot-red`:o===`at-risk`?`dot-amber`:`dot-green`}`,"aria-hidden":`true`}),(0,z.jsx)(`span`,{className:`startup-health-bar__summary`,children:h(o===`error`?`startup.error`:o===`at-risk`?`startup.summary.atRisk`:o===`protected`?`startup.summary.protected`:`startup.summary.native`)})]}):(0,z.jsxs)(`div`,{className:`startup-health-bar startup-health-bar--pending`,"aria-hidden":`true`,children:[(0,z.jsx)(`span`,{className:`dot dot-amber`}),(0,z.jsx)(`span`,{className:`startup-health-bar__summary`,children:`\xA0`})]})})]}),s.length>0&&(0,z.jsxs)(`div`,{className:`notice notice-err maintenance-notice`,role:`alert`,children:[(0,z.jsx)(J,{}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:h(`dash.projectConfigTitle`)}),(0,z.jsx)(`div`,{className:`muted text-control`,style:{marginTop:4},children:h(`dash.projectConfigHint`)}),(0,z.jsx)(`ul`,{className:`text-control`,style:{margin:`10px 0 0`,paddingLeft:18},children:s.map(e=>(0,z.jsxs)(`li`,{style:{marginBottom:8},children:[(0,z.jsx)(`code`,{children:e.path}),` — `,e.issues.join(`, `),(0,z.jsx)(`div`,{className:`muted`,style:{marginTop:2},children:e.bypass})]},e.path))})]})]})]})}function Rt(e){let t=new AbortController;if(typeof AbortSignal<`u`&&typeof AbortSignal.any==`function`&&typeof AbortSignal.timeout==`function`)return{controller:t,signal:AbortSignal.any([t.signal,AbortSignal.timeout(e)]),clear:()=>void 0};let n=setTimeout(()=>t.abort(),e);return{controller:t,signal:t.signal,clear:()=>clearTimeout(n)}}var zt=new Map;function Bt(e,t){let n=`${e}:${t}`,r=zt.get(n);return r||(r=new Intl.NumberFormat(e,{minimumFractionDigits:t,maximumFractionDigits:t}),zt.set(n,r)),r}var Vt=new Map;function Ht(e){let t=Vt.get(e);return t||(t=new Intl.NumberFormat(e),Vt.set(e,t)),t}function Ut(e,t){if(!Number.isFinite(e)||e<=0)return`0 B`;let n=[`B`,`KiB`,`MiB`,`GiB`,`TiB`],r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1),i=e/1024**r;return`${Bt(t,r===0?0:1).format(i)} ${n[r]}`}function Wt(e,t){return!Number.isFinite(e)||e<0?`—`:Ft(e/1e3,t)}function Gt(e){return typeof e.observedBytes==`number`?e.observedBytes:Math.max(e.rss,e.external??0,e.arrayBuffers??0)}function Kt(e){if(e.observedMetric)return e.observedMetric;if(e.watchdog?.observedMetric)return e.watchdog.observedMetric;let t=[{metric:`rss`,bytes:e.rss},{metric:`external`,bytes:e.external??0},{metric:`arrayBuffers`,bytes:e.arrayBuffers??0}];return t.reduce((e,t)=>t.bytes>e.bytes?t:e,t[0]).metric}function qt(e){if(e.length<2)return null;let t=e[0],n=e[e.length-1],r=n.at-t.at;return r<=0?null:(Gt(n)-Gt(t))/r*36e5}function Jt({label:e,value:t,sub:n,tone:r}){return(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`label`,children:e}),(0,z.jsx)(`div`,{className:`value mono${r?` value--${r}`:``}`,children:t}),n&&(0,z.jsx)(`div`,{className:`stat-sub mono`,children:n})]})}function Yt({observedBytes:e,thresholdBytes:t,metric:n,locale:r,t:i}){let a=e!==null&&t!==null&&t>0?e/t:null,o=a===null?`unknown`:a>=1?`over`:a>=.75?`warn`:`ok`,s=a===null?null:Math.round(a*100);return(0,z.jsxs)(`div`,{className:`mem-pressure mem-pressure--${o}`,children:[(0,z.jsxs)(`div`,{className:`mem-pressure-head`,children:[(0,z.jsxs)(`span`,{className:`mem-pressure-label`,children:[i(`dash.mem.pressure`),n?(0,z.jsx)(`span`,{className:`mem-pressure-metric mono`,children:n}):null]}),(0,z.jsxs)(`span`,{className:`mem-pressure-figure mono`,children:[e===null?`—`:Ut(e,r),t!==null&&(0,z.jsxs)(`span`,{className:`mem-pressure-limit`,children:[` / `,Ut(t,r)]})]})]}),(0,z.jsx)(`div`,{className:`mem-pressure-track`,role:`presentation`,children:(0,z.jsx)(`span`,{className:`mem-pressure-fill`,style:{"--mem-scale":String(a===null?0:Math.min(1,Math.max(.01,a)))}})}),(0,z.jsx)(`div`,{className:`mem-pressure-foot`,children:s===null?i(`dash.mem.pressureUnknown`):i(`dash.mem.pressureOf`,{pct:s})})]})}var Xt=60,Zt=1500,Qt=12e4;function $t({apiBase:e}){let{locale:t,t:n}=ze(),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(`idle`),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null);(0,_.useEffect)(()=>{let t=!1;return(async()=>{try{let n=await fetch(`${e}/api/startup-health`);if(!n.ok||t)return;let r=await n.json();t||f(r.protection===`none`)}catch{}})(),()=>{t=!0}},[e]),(0,_.useEffect)(()=>{let t=!1,n=!1,r=null,a=async()=>{if(n)return;n=!0;let a=Rt(1e4);r=a;try{let n=await fetch(`${e}/api/system/memory`,{signal:a.signal});if(!n.ok)throw Error(`memory unavailable`);let r=await n.json();if(t)return;i(r),o(!1),m(typeof r.activeTurnCount==`number`),r.isDraining&&s===`idle`&&c(`draining`),(s===`draining`||s===`reconnecting`)&&h!=null&&typeof r.pid==`number`&&r.pid!==h&&!r.isDraining&&(c(`idle`),g(null),u(null))}catch{if(t)return;s===`draining`||s===`reconnecting`?c(`reconnecting`):o(!0)}finally{a.clear(),r===a&&(r=null),n=!1}};a();let l=setInterval(()=>void a(),5e3);return()=>{t=!0,r?.controller.abort(),r?.clear(),clearInterval(l)}},[e,s,h]),(0,_.useEffect)(()=>{if(s!==`reconnecting`)return;let t=!1,r=!1,i=null,a=Date.now(),o=()=>{if(r||t)return;r=!0;let o=Rt(5e3);i=o,fetch(`${e}/healthz`,{cache:`no-store`,signal:o.signal}).then(async e=>{if(t)return;if(!e.ok){Date.now()-a>=Qt&&(c(`error`),u(n(`dash.mem.restartFailed`)));return}let r=h==null;if(h!=null)try{let t=await e.json();r=typeof t.pid==`number`&&t.pid!==h}catch{r=!0}if(!t){if(r){c(`idle`),g(null),u(null);return}Date.now()-a>=Qt&&(c(`error`),u(n(`dash.mem.restartFailed`)))}}).catch(()=>{t||Date.now()-a>=Qt&&(c(`error`),u(n(`dash.mem.restartFailed`)))}).finally(()=>{o.clear(),i===o&&(i=null),r=!1})};o();let l=setInterval(o,Zt);return()=>{t=!0,i?.controller.abort(),i?.clear(),clearInterval(l)}},[e,s,h,n]);let v=()=>{let t=[n(`dash.mem.restartConfirm`,{count:r?.activeTurnCount??0,seconds:Xt})];d&&t.push(n(`dash.mem.restartNoSupervisor`)),window.confirm(t.join(`
46
-
47
- `))&&(async()=>{u(null),g(typeof r?.pid==`number`?r.pid:null),c(`draining`);try{if(!(await fetch(`${e}/api/system/restart`,{method:`POST`})).ok)throw Error(`restart_failed`)}catch{c(`error`),g(null),u(n(`dash.mem.restartFailed`))}})()};if(a&&!r&&s===`idle`)return(0,z.jsxs)(`div`,{className:`panel`,style:{marginBottom:24},children:[(0,z.jsxs)(`div`,{className:`font-semibold`,style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,z.jsx)(ne,{width:16,height:16,"aria-hidden":`true`}),n(`dash.mem.title`)]}),(0,z.jsx)(`div`,{className:`muted text-control`,style:{marginTop:8},children:n(`dash.mem.unavailable`)})]});let y=r?.watchdog?qt(r.watchdog.samples):null,b=r?r.observedBytes??r.watchdog?.observedBytes??Gt(r):null,x=r?Kt(r):null,S=(()=>{let e=r?.watchdog?.warnThresholdBytes;if(y===null||y<=0||b===null||!e)return;let t=e-b;if(t<=0)return`danger`;let n=t/y;if(n<=1)return`danger`;if(n<=8)return`warn`})(),C=r?.responseState,w=r?.activeTurnCount,T=s===`draining`||s===`reconnecting`;return(0,z.jsxs)(`div`,{className:`panel`,style:{marginBottom:24},children:[(0,z.jsxs)(`div`,{className:`mem-head`,children:[(0,z.jsxs)(`div`,{className:`font-semibold mem-head-title`,children:[(0,z.jsx)(ne,{width:16,height:16,"aria-hidden":`true`}),n(`dash.mem.title`)]}),p&&(0,z.jsxs)(`div`,{className:`mem-head-actions`,children:[(0,z.jsxs)(`span`,{className:`mem-inflight`,children:[(0,z.jsx)(`span`,{className:`mem-inflight-label`,children:n(`dash.mem.inFlight`)}),(0,z.jsx)(`span`,{className:`mem-inflight-value mono`,children:typeof w==`number`?Ht(t).format(w):`—`})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:T,onClick:v,children:n(`dash.mem.restart`)})]})]}),(0,z.jsx)(Yt,{observedBytes:b,thresholdBytes:r?.watchdog?.warnThresholdBytes??null,metric:x,locale:t,t:n}),(0,z.jsxs)(`div`,{className:`stat-row mem-stats`,children:[(0,z.jsx)(Jt,{label:n(`dash.mem.rss`),value:r?Ut(r.rss,t):`—`}),(0,z.jsx)(Jt,{label:n(`dash.mem.jsHeap`),value:r?Ut(r.heapUsed,t):`—`,sub:r?n(`dash.mem.jsHeapArena`,{total:Ut(r.heapTotal,t)}):void 0}),(0,z.jsx)(Jt,{label:n(`dash.mem.jscHeap`),value:r?.jscHeap?Ut(r.jscHeap.heapSize,t):`—`}),(0,z.jsx)(Jt,{label:n(`dash.mem.growth`),value:y===null?`—`:`${y>=0?`+`:`−`}${Ut(Math.abs(y),t)}${n(`dash.mem.perHour`)}`,tone:S})]}),(0,z.jsxs)(`details`,{style:{marginTop:10},children:[(0,z.jsx)(`summary`,{className:`muted text-label`,style:{cursor:`pointer`,padding:`2px 2px`},children:n(`dash.mem.details`)}),(0,z.jsx)(`div`,{className:`muted text-control`,style:{margin:`8px 0 0`},children:n(`dash.mem.hint`)}),(0,z.jsx)(`div`,{className:`muted text-label`,style:{margin:`14px 0 6px`},children:n(`dash.mem.runtime`)}),(0,z.jsxs)(`div`,{className:`stat-row`,children:[(0,z.jsx)(Jt,{label:n(`dash.mem.observed`),value:b===null?`—`:`${Ut(b,t)} (${x})`}),(0,z.jsx)(Jt,{label:n(`dash.mem.external`),value:r?.external===void 0?`—`:Ut(r.external,t)}),(0,z.jsx)(Jt,{label:n(`dash.mem.arrayBuffers`),value:r?.arrayBuffers===void 0?`—`:Ut(r.arrayBuffers,t)})]}),(0,z.jsx)(`div`,{className:`muted text-label`,style:{margin:`14px 0 6px`},children:n(`dash.mem.store`)}),(0,z.jsx)(`div`,{className:`muted text-control`,style:{marginBottom:10},children:n(`dash.mem.storeHint`)}),(0,z.jsxs)(`div`,{className:`stat-row`,children:[(0,z.jsx)(Jt,{label:n(`dash.mem.storeEntries`),value:C?Ht(t).format(C.count):`—`}),(0,z.jsx)(Jt,{label:n(`dash.mem.storeTotal`),value:C?Ut(C.totalBytes,t):`—`}),(0,z.jsx)(Jt,{label:n(`dash.mem.storeLargest`),value:C?Ut(C.largestBytes,t):`—`}),(0,z.jsx)(Jt,{label:n(`dash.mem.storeOldest`),value:C?C.count===0?`—`:Wt(C.oldestAgeMs,t):`—`})]}),r?.watchdog&&(0,z.jsxs)(`div`,{className:`stat-row`,style:{marginTop:16},children:[(0,z.jsx)(Jt,{label:n(`dash.mem.threshold`),value:Ut(r.watchdog.warnThresholdBytes,t)}),(0,z.jsx)(Jt,{label:n(`dash.mem.lastWarn`),value:r.watchdog.lastWarnAt?new Date(r.watchdog.lastWarnAt).toLocaleString(t):n(`dash.mem.never`)})]})]}),p&&(0,z.jsxs)(`div`,{className:`mem-status`,"aria-live":`polite`,children:[s===`draining`&&(0,z.jsx)(`span`,{className:`muted text-control`,children:n(`dash.mem.draining`,{count:typeof w==`number`?w:0})}),s===`reconnecting`&&(0,z.jsx)(`span`,{className:`muted text-control`,children:n(`dash.mem.reconnecting`)}),s===`error`&&l&&(0,z.jsx)(`span`,{className:`text-control`,style:{color:`var(--danger, #c44)`},children:l}),d&&s===`idle`&&(0,z.jsx)(`span`,{className:`muted text-control`,children:n(`dash.mem.restartNoSupervisor`)})]})]})}function en({apiBase:e,d:t}){let{t:n,maMode:r,maModeResolved:i,effortCapHelpTriggerRef:a,effortCapHelpOpen:o,setEffortCapHelpOpen:s,effortCap:c,subagentEffortCap:l,effortCapSaving:u,setEffortCap:d,setSubagentEffortCap:f,setEffortCapSaving:p}=t;return!i||r===`v1`?null:(0,z.jsx)(`div`,{className:`panel`,children:(0,z.jsxs)(`div`,{className:`injection-head`,children:[(0,z.jsxs)(`span`,{className:`injection-label`,style:{display:`inline-flex`,alignItems:`center`,gap:6},children:[n(`dash.effortCapLabel`),(0,z.jsx)(`button`,{ref:a,type:`button`,className:`btn btn-ghost btn-sm`,style:{width:22,height:22,minWidth:22,padding:0,borderRadius:`var(--radius-pill)`,color:`var(--muted)`},onClick:()=>s(e=>!e),"aria-label":n(`dash.effortCapLabel`),"aria-expanded":o,"aria-haspopup":`dialog`,"aria-controls":`effort-cap-help-dialog`,children:(0,z.jsx)(ue,{width:13,height:13,"aria-hidden":`true`})})]}),(0,z.jsx)(rt,{value:c,options:[{value:``,label:n(`dash.effortCapNone`)},...ht.map(e=>({value:e,label:e}))],onChange:async t=>{if(!u){p(!0);try{let n=await mt(await fetch(`${e}/api/effort-caps`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({effortCap:t||null})}));d(n.effortCap??``),f(n.subagentEffortCap??``)}catch{}finally{p(!1)}}},disabled:u,label:n(`dash.effortCapLabel`)}),(0,z.jsx)(rt,{value:l,options:[{value:``,label:n(`dash.effortCapNone`)},...ht.map(e=>({value:e,label:e}))],onChange:async t=>{if(!u){p(!0);try{let n=await mt(await fetch(`${e}/api/effort-caps`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({subagentEffortCap:t||null})}));d(n.effortCap??``),f(n.subagentEffortCap??``)}catch{}finally{p(!1)}}},disabled:u,label:n(`dash.subagentEffortCapLabel`)})]})})}function tn({d:e}){let{t,injectionModel:n,injectionEffort:r,injectionEfforts:i,injectionAvailable:a,injectionSaving:o,saveInjection:s}=e;return(0,z.jsxs)(`div`,{className:`panel dash-delegation-summary`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`dash.injectionLabel`)}),(0,z.jsxs)(`div`,{className:`dash-delegation-controls`,children:[(0,z.jsx)(rt,{value:n,options:[{value:``,label:t(`dash.injectionNone`)},...a.map(e=>({value:e.namespaced,label:`${e.provider} / ${e.model}`}))],onChange:e=>{s({model:e||null,effort:r||null})},disabled:o,label:t(`dash.injectionLabel`)}),n&&i.length>0&&(0,z.jsx)(rt,{value:r,options:[{value:``,label:t(`dash.injectionEffortNone`)},...i.map(e=>({value:e,label:e}))],onChange:e=>{s({model:n||null,effort:e||null})},disabled:o,label:t(`dash.injectionEffortLabel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>We(`#subagents`),children:t(`dash.injectionManage`)})]})]})}function nn({d:e}){let{t,runSync:n,syncing:r,updateTriggerRef:i,openUpdateDialog:a,updateLoading:o,updateOpen:s,syncResult:c,syncError:l,updateJob:u,reconnecting:d}=e;return(0,z.jsxs)(`div`,{className:`panel maintenance-panel`,children:[(0,z.jsxs)(`div`,{className:`dash-sync-summary`,children:[(0,z.jsxs)(`div`,{className:`dash-sync-copy`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`dash.syncModels`)}),(0,z.jsx)(`div`,{className:`muted text-control dash-sync-hint`,children:t(`dash.syncModelsHint`)})]}),(0,z.jsxs)(`div`,{className:`maintenance-actions`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:n,disabled:r,children:[(0,z.jsx)(q,{}),` `,t(r?`dash.syncing`:`dash.syncRun`)]}),(0,z.jsx)(`button`,{ref:i,type:`button`,className:`maintenance-update-anchor`,onClick:a,disabled:o,"aria-haspopup":`dialog`,"aria-controls":`dashboard-update-dialog`,"aria-expanded":s,"aria-label":t(`dash.checkUpdate`),tabIndex:-1})]})]}),c&&(0,z.jsxs)(`div`,{className:`notice ${c.nativeSubagentDefaultsWarning?`notice-warn`:`notice-ok`} maintenance-notice`,role:`status`,children:[c.nativeSubagentDefaultsWarning?(0,z.jsx)(J,{}):(0,z.jsx)(q,{}),(0,z.jsxs)(`span`,{children:[t(`dash.syncOk`,{count:c.added}),c.warning?` ${c.warning}`:``,c.nativeSubagentDefaultsWarning?` ${c.nativeSubagentDefaultsWarning}`:``,c.staleAppServerHint?(0,z.jsxs)(z.Fragment,{children:[` `,(0,z.jsx)(Ve,{k:`dash.syncStaleHint`,cmd:`ocx sync --restart-codex`})]}):null]})]}),l&&(0,z.jsxs)(`div`,{className:`notice notice-err maintenance-notice`,role:`status`,children:[(0,z.jsx)(J,{}),(0,z.jsx)(`span`,{children:t(`dash.syncFailed`,{error:l})})]}),u&&(0,z.jsxs)(`div`,{className:`notice ${u.status===`failed`?`notice-err`:`notice-ok`} maintenance-notice`,role:`status`,children:[u.status===`failed`?(0,z.jsx)(J,{}):(0,z.jsx)(q,{}),(0,z.jsxs)(`span`,{children:[vt(u.status,t),u.latestVersion?` ${u.currentVersion} -> ${u.latestVersion}.`:``,d?` ${t(`dash.updateReconnecting`)}`:``,u.error?` ${u.error}`:``]})]})]})}function rn({d:e}){let{t,settings:n,settingsSaving:r,toggleCodexAutoStart:i,sidecar:a,sidecarSaving:o,sidecarModels:s,models:c,saveSidecar:l,shadowCall:u,shadowCallSaving:d,shadowCallHelpTriggerRef:f,shadowCallHelpOpen:p,setShadowCallHelpOpen:m,saveShadowCall:h}=e;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`panel`,children:(0,z.jsxs)(`div`,{className:`spread`,children:[(0,z.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`dash.codexAutoStart`)}),(0,z.jsx)(`div`,{className:`muted setting-hint`,children:t(`dash.codexAutoStartHint`)})]}),(0,z.jsx)(`button`,{type:`button`,className:`switch ${n?.codexAutoStart??!0?`on`:``}`,onClick:i,disabled:!n||r,"aria-label":t(`dash.codexAutoStart`),"aria-pressed":n?.codexAutoStart??!0,children:(0,z.jsx)(`span`,{className:`knob`})})]})}),(0,z.jsxs)(`div`,{className:`dash-sidecar-grid`,children:[(0,z.jsxs)(`div`,{className:`panel dash-sidecar-card`,"aria-busy":!a||void 0,children:[(0,z.jsxs)(`div`,{className:`dash-sidecar-card__row`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`dash.webSearchSidecar`)}),(0,z.jsx)(rt,{value:a?.webSearch.model??`gpt-5.6-luna`,options:s,onChange:e=>{l({webSearch:{model:e,backend:xt(c,e)}})},disabled:!a||o,label:t(`dash.sidecarModel`)})]}),(0,z.jsx)(`div`,{className:`muted setting-hint`,children:t(`dash.webSearchSidecarHint`)})]}),(0,z.jsxs)(`div`,{className:`panel dash-sidecar-card`,"aria-busy":!a||void 0,children:[(0,z.jsxs)(`div`,{className:`dash-sidecar-card__row`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`dash.visionSidecar`)}),(0,z.jsx)(rt,{value:a?.vision.model??`gpt-5.6-luna`,options:s,onChange:e=>{l({vision:{model:e,backend:xt(c,e)}})},disabled:!a||o,label:t(`dash.sidecarModel`)})]}),(0,z.jsx)(`div`,{className:`muted setting-hint`,children:t(`dash.visionSidecarHint`)})]})]}),(0,z.jsx)(`div`,{className:`panel`,"aria-busy":!u||void 0,children:(0,z.jsxs)(`div`,{className:`spread`,style:{alignItems:`center`},children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,z.jsx)(`span`,{className:`font-semibold`,children:t(`dash.shadowCallIntercept`)}),(0,z.jsx)(`button`,{ref:f,type:`button`,className:`btn btn-ghost btn-sm`,style:{width:22,height:22,minWidth:22,padding:0,borderRadius:`var(--radius-pill)`,color:`var(--muted)`},onClick:()=>m(e=>!e),"aria-label":t(`dash.shadowCallIntercept`),"aria-expanded":p,"aria-haspopup":`dialog`,"aria-controls":`shadow-call-help-dialog`,children:(0,z.jsx)(ue,{width:13,height:13,"aria-hidden":`true`})}),(0,z.jsx)(`code`,{className:`muted text-caption`,children:`⚠ ${Ot(u?.sourceModels)}`})]}),(0,z.jsxs)(`div`,{className:`setting-controls`,style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,z.jsx)(`button`,{type:`button`,className:`switch ${u?.enabled?`on`:``}`,onClick:()=>h({enabled:!u?.enabled}),disabled:!u||d,"aria-label":t(`dash.shadowCallIntercept`),"aria-pressed":u?.enabled??!1,children:(0,z.jsx)(`span`,{className:`knob`})}),(0,z.jsx)(rt,{value:u?.model??``,options:[{value:``,label:`—`},...c.map(e=>({value:e.id,label:`${e.provider}/${e.id}`}))],onChange:e=>{h({model:e})},disabled:!u||d||!u?.enabled,label:t(`dash.shadowCallModel`),align:`right`})]})]})})]})}function an(e){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(en,{apiBase:e.apiBase,d:e}),(0,z.jsxs)(`div`,{className:`dash-overview-tools`,children:[(0,z.jsx)(tn,{apiBase:e.apiBase,d:e}),(0,z.jsx)(nn,{d:e})]}),(0,z.jsx)(rn,{d:e}),(0,z.jsx)($t,{apiBase:e.apiBase})]})}function on(e){return(0,z.jsxs)(`div`,{className:`dash-overview-stack`,children:[(0,z.jsx)(Lt,{...e}),(0,z.jsx)(an,{...e})]})}function sn({t:e,providers:t}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`h-section`,children:[e(`dash.activeProviders`),` `,(0,z.jsx)(`span`,{className:`count`,children:t.length})]}),t.length===0?(0,z.jsx)(it,{title:(0,z.jsx)(Ve,{k:`dash.noProviders`,cmd:`ocx init`})}):(0,z.jsx)(`div`,{className:`tbl-wrap`,children:(0,z.jsxs)(`table`,{className:`tbl`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:e(`dash.col.name`)}),(0,z.jsx)(`th`,{children:e(`dash.col.adapter`)}),(0,z.jsx)(`th`,{children:e(`dash.col.baseUrl`)}),(0,z.jsx)(`th`,{children:e(`dash.col.model`)})]})}),(0,z.jsx)(`tbody`,{children:t.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`font-semibold`,children:e.name}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`span`,{className:`chip`,children:e.adapter})}),(0,z.jsx)(`td`,{className:`muted mono text-label`,children:e.baseUrl}),(0,z.jsx)(`td`,{className:`muted`,children:e.defaultModel??`—`})]},e.name))})]})})]})}function Z(e){try{let t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}function Q(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch{}}function cn(e){return e.routingKind===`custom-local`?`startup.riskDetailCustomLocal`:e.shimCoverage===`cli-only`?`startup.riskDetailWindowsShim`:`startup.riskDetail`}function ln(e,t){return!t.mutationInFlight&&e.request===t.request&&e.mutation===t.mutation}function un(e,t){return{request:++e.current,mutation:t.current}}var dn=2e3;function fn(e){let t=e.status;return t===`native`||t===`protected`||t===`at-risk`?t:null}function pn(e){return e?e.stale&&e.status!==`error`:!1}function mn(e,t){return!t||e!==null&&e!==`error`?e:t.status}var hn=3e4;function gn(e){return{multiAgentGuidanceEnabled:e.multiAgentGuidanceEnabled!==!1,syncCodexSubagentDefaults:e.syncCodexSubagentDefaults===!0,injectionModel:e.model??``,injectionEffort:e.effort??``}}function _n(e,t){return t.aborted?!0:e instanceof Error&&e.name===`AbortError`}async function vn(e,t){try{let n=await fetch(`${e}/api/startup-health`,{signal:t});if(!n.ok)throw Error(`startup health unavailable`);let r=await n.json(),i=fn(r);if(!i)throw Error(`invalid startup health response`);return{status:i,stale:r.diagnosticStale===!0}}catch(e){if(_n(e,t))throw e;return{status:`error`,stale:!1}}}async function yn(e,t){try{return(await lt(await fetch(`${e}/api/diagnostics/project-config`,{signal:t})))?.grouped??[]}catch{return[]}}async function bn(e,t){return mt(await fetch(`${e}/api/models`,{signal:t}))}async function xn(e,t){return mt(await fetch(`${e}/api/usage?range=30d`,{signal:t}))}async function Sn(e,t,n){let{request:r,mutation:i}=un(n.shadowCallRequestEpochRef,n.shadowCallMutationEpochRef),[a,o]=await Promise.all([fetch(`${e}/api/sidecar-settings`,{signal:t}),fetch(`${e}/api/shadow-call-settings`,{signal:t})]),s=await mt(a),c;try{if(o.ok){let e=await o.json();ln({request:r,mutation:i},{request:n.shadowCallRequestEpochRef.current,mutation:n.shadowCallMutationEpochRef.current,mutationInFlight:n.shadowCallMutationInFlightRef.current})&&(c=e)}else ln({request:r,mutation:i},{request:n.shadowCallRequestEpochRef.current,mutation:n.shadowCallMutationEpochRef.current,mutationInFlight:n.shadowCallMutationInFlightRef.current})&&(c=null)}catch{ln({request:r,mutation:i},{request:n.shadowCallRequestEpochRef.current,mutation:n.shadowCallMutationEpochRef.current,mutationInFlight:n.shadowCallMutationInFlightRef.current})&&(c=null)}return{sidecar:s,shadowCall:c}}async function Cn(e,t,n){let{request:r,mutation:i}=un(n.settingsRequestEpochRef,n.settingsMutationEpochRef),a=await mt(await fetch(`${e}/api/settings`,{signal:t})),o,s;return ln({request:r,mutation:i},{request:n.settingsRequestEpochRef.current,mutation:n.settingsMutationEpochRef.current,mutationInFlight:n.settingsMutationInFlightRef.current})&&(o=a,s=a.startupHealth),{settings:o,startupHealthSeed:s}}async function wn(e,t){try{let n=await fetch(`${e}/api/v2`,{signal:t});if(!n.ok)return{maMode:`default`};let r=await n.json();return r.multiAgentMode===`v1`||r.multiAgentMode===`v2`?{maMode:r.multiAgentMode}:{maMode:`default`}}catch(e){if(_n(e,t))throw e;return{maMode:`default`}}}async function Tn(e,t){try{let[n,r]=await Promise.all([fetch(`${e}/healthz`,{signal:t}),fetch(`${e}/api/providers`,{signal:t})]);return{health:await mt(n),providers:await mt(r),error:!1}}catch{return{health:null,providers:[],error:!0}}}async function En(e,t){let[n,r]=await Promise.all([fetch(`${e}/api/injection-model`,{signal:t}).catch(()=>null),fetch(`${e}/api/effort-caps`,{signal:t}).catch(()=>null)]),i;try{if(n?.ok){let e=await n.json();i={...gn(e),injectionEfforts:e.efforts??[],injectionAvailable:e.available??[]}}}catch{}let a;try{if(r?.ok){let e=await r.json();a={effortCap:e.effortCap??``,subagentEffortCap:e.subagentEffortCap??``}}}catch{}return{injection:i,effortCaps:a}}var Dn=`ocx.dash.controls.v1:`,On=`ocx.dash.overview.v1:`,kn=`ocx.dash.usage30d.v1:`,An=`ocx.dash.startup.v1:`,jn=`ocx.dash.maMode.v1:`;function Mn(e){return`${Dn}${e}`}function Nn(e){let{locale:t,t:n}=ze(),[r,i]=(0,_.useState)(dt),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(new Set),l=(0,_.useMemo)(()=>Z(Mn(e)),[e]),u=(0,_.useMemo)(()=>Z(`${On}${e}`),[e]),d=(0,_.useMemo)(()=>Z(`${kn}${e}`),[e]),f=(0,_.useMemo)(()=>{let t=Z(`${An}${e}`);return t===`error`?null:t},[e]),p=(0,_.useMemo)(()=>Z(`${jn}${e}`),[e]),[m,h]=(0,_.useState)(()=>u?.health??null),[g,v]=(0,_.useState)(()=>f),[y,b]=(0,_.useState)(()=>u?.providers??[]),[x,S]=(0,_.useState)([]),[C,w]=(0,_.useState)(()=>l?.settings??null),[T,E]=(0,_.useState)(()=>l?.sidecar??null),[D,O]=(0,_.useState)(()=>l?.shadowCall??null),[k,A]=(0,_.useState)(()=>d),[j,M]=(0,_.useState)(!1),[N,P]=(0,_.useState)(!1),[F,L]=(0,_.useState)(!1),[R,z]=(0,_.useState)(!1),[B,V]=(0,_.useState)(!1),[H,U]=(0,_.useState)(()=>p??`default`),[W,ee]=(0,_.useState)(!1),[G,te]=(0,_.useState)(!1),[ne,K]=(0,_.useState)(!1),[re,ie]=(0,_.useState)(!1),[ae,oe]=(0,_.useState)(``),[q,se]=(0,_.useState)(``),[ce,le]=(0,_.useState)([]),[J,ue]=(0,_.useState)([]),[de,fe]=(0,_.useState)(!1),[pe,me]=(0,_.useState)(!0),[he,ge]=(0,_.useState)(!1),[_e,ve]=(0,_.useState)(``),[ye,be]=(0,_.useState)(``),[xe,Se]=(0,_.useState)(!1),[Ce,we]=(0,_.useState)(null),[Te,Ee]=(0,_.useState)(null),[De,Oe]=(0,_.useState)([]),[ke,Ae]=(0,_.useState)(!1),[je,Me]=(0,_.useState)(`latest`),[Ne,Pe]=(0,_.useState)(!0),[Fe,Ie]=(0,_.useState)(!1),Le=(0,_.useRef)(0),Re=(0,_.useRef)(null),Y=(0,_.useRef)(0),Be=(0,_.useRef)(0),Ve=(0,_.useRef)(0),He=(0,_.useRef)(!1),We=(0,_.useRef)(0),Ge=(0,_.useRef)(0),Ke=(0,_.useRef)(!1),[qe,Je]=(0,_.useState)(null),[Ye,Xe]=(0,_.useState)(null),[Ze,Qe]=(0,_.useState)(null),[$e,et]=(0,_.useState)(!1),[tt,nt]=(0,_.useState)(!1),X=(0,_.useRef)(null),rt=(0,_.useRef)(null),it=(0,_.useRef)(null),at=(0,_.useRef)(null),ot=wt(ne,X),st=wt(ke,rt),ct=wt(G,it),lt=wt(re,at);(0,_.useEffect)(()=>{let e=()=>i(dt());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,_.useEffect)(()=>()=>{Y.current+=1,Re.current!==null&&(window.clearTimeout(Re.current),Re.current=null)},[]),(0,_.useEffect)(()=>{if(!m?.version)return;let t=gt(m.version),n=!1;return(async()=>{try{let r=await mt(await fetch(`${e}/api/update/check?tag=${t}`),`update check failed`);if(n)return;Je(e=>ke&&Fe?e:r)}catch{}})(),()=>{n=!0}},[e,m?.version]);let ut=(0,_.useRef)(f),pt=(0,_.useRef)(0),ht=(0,_.useRef)({settingsRequestEpochRef:Be,settingsMutationEpochRef:Ve,settingsMutationInFlightRef:He,shadowCallRequestEpochRef:We,shadowCallMutationEpochRef:Ge,shadowCallMutationInFlightRef:Ke}).current,_t=I(`dashboard-startup-health:${e}`,[e],t=>vn(e,t),{pollMs:3e4}),vt=pn(_t.data),xt=_t.refresh;(0,_.useEffect)(()=>{if(!vt)return;let e=window.setTimeout(()=>{xt()},dn);return()=>window.clearTimeout(e)},[vt,xt]);let St=I(`dashboard-overview:${e}`,[e],t=>Tn(e,t),{pollMs:5e3}),Ct=m!==null||St.data!==void 0,Tt=I(`dashboard-ma-mode:${e}`,[e],t=>wn(e,t),{pollMs:5e3}),Et=I(`dashboard-sidecars:${e}`,[e],async t=>{let n=pt.current;return{...await Sn(e,t,ht),startupHealthGeneration:n}},{pollMs:5e3}),Dt=I(`dashboard-settings:${e}`,[e],async t=>{let n=pt.current;return{...await Cn(e,t,ht),startupHealthGeneration:n}},{pollMs:5e3}),Ot=I(`dashboard-multi-agent:${e}`,[e],t=>En(e,t),{pollMs:5e3,enabled:Ct}),kt=I(`dashboard-usage:${e}`,[e],t=>xn(e,t),{pollMs:6e4,enabled:Ct}),At=I(`dashboard-diagnostics:${e}`,[e],t=>yn(e,t),{pollMs:hn,enabled:Ct}),jt=I(`dashboard-models:${e}`,[e,tt],t=>bn(e,t),{enabled:Ct&&!tt});(0,_.useEffect)(()=>{if(_t.data!==void 0){let t=_t.data;pt.current+=1,v(t.status),ut.current=t.status,t.status!==`error`&&!t.stale&&Q(`${An}${e}`,t.status)}},[_t.data,e]),(0,_.useEffect)(()=>{let t=St.data;t&&(t.health&&(h(t.health),b(t.providers),Q(`${On}${e}`,{health:t.health,providers:t.providers})),nt(t.error))},[St.data,e]),(0,_.useEffect)(()=>{Tt.data!==void 0&&(U(Tt.data.maMode),Q(`${jn}${e}`,Tt.data.maMode))},[Tt.data,e]);let Mt=Tt.data!==void 0||p!==null;(0,_.useEffect)(()=>{let e=Ot.data;e&&(e.injection&&(me(e.injection.multiAgentGuidanceEnabled),ge(e.injection.syncCodexSubagentDefaults),oe(e.injection.injectionModel),se(e.injection.injectionEffort),le(e.injection.injectionEfforts),ue(e.injection.injectionAvailable)),e.effortCaps&&(ve(e.effortCaps.effortCap),be(e.effortCaps.subagentEffortCap)))},[Ot.data]),(0,_.useEffect)(()=>{let t=Et.data;if(!t)return;E(t.sidecar),t.shadowCall!==void 0&&O(t.shadowCall);let n=Z(Mn(e))??{};Q(Mn(e),{...n,sidecar:t.sidecar,...t.shadowCall===void 0?{}:{shadowCall:t.shadowCall}})},[Et.data,e]),(0,_.useEffect)(()=>{let t=Dt.data;if(t){if(t.settings!==void 0&&w(t.settings),t.startupHealthSeed!==void 0&&t.startupHealthGeneration===pt.current){let n=mn(ut.current,t.startupHealthSeed);v(n),ut.current=n,n&&Q(`${An}${e}`,n)}if(t.settings!==void 0){let n=Z(Mn(e))??{};Q(Mn(e),{...n,settings:t.settings})}}},[Dt.data,e]),(0,_.useEffect)(()=>{kt.data!==void 0&&(A(kt.data),Q(`${kn}${e}`,kt.data))},[kt.data,e]),(0,_.useEffect)(()=>{At.data&&Oe(At.data)},[At.data]),(0,_.useEffect)(()=>{jt.data&&S(jt.data),L(jt.loading)},[jt.data,jt.loading]),(0,_.useEffect)(()=>()=>{Be.current+=1,We.current+=1},[]);let Nt=I(Ze?.id&&Ze.restart?`update-job:${e}:${Ze.id}`:`update-job:idle:${e}`,[e,Ze?.id,Ze?.restart,Ze?.latestVersion],async t=>{if(!Ze?.id||!Ze.restart)return{reconnecting:!1};let n=Ze.latestVersion;try{let r=await mt(await fetch(`${e}/api/update/status?jobId=${encodeURIComponent(Ze.id)}`,{signal:t}));if(r.job){if(r.job.status===`failed`)return{job:r.job,reconnecting:!1};if(n)try{if((await mt(await fetch(`${e}/healthz`,{cache:`no-store`,signal:t}))).version===n)return{job:r.job,reconnecting:!1,reload:!0}}catch{return{job:r.job,reconnecting:!0}}return{job:r.job,reconnecting:!1}}}catch{return{reconnecting:!0}}return{reconnecting:!1}},{pollMs:1500,enabled:!!(Ze?.id&&Ze.restart),pauseWhenHidden:!1});(0,_.useEffect)(()=>{let e=Nt.data;e&&(`job`in e&&e.job&&Qe(e.job),et(e.reconnecting),`reload`in e&&e.reload&&window.location.reload())},[Nt.data]);let Pt=(0,_.useMemo)(()=>{let e={};for(let t of x)(e[t.provider]??=[]).push(t);return Object.entries(e).sort(([e],[t])=>e.localeCompare(t))},[x]),Ft=(0,_.useMemo)(()=>{let e=a.trim().toLowerCase();if(!e)return Pt;let t=[];for(let[n,r]of Pt){let i=r.filter(t=>t.id.toLowerCase().includes(e)||n.toLowerCase().includes(e));i.length>0&&t.push([n,i])}return t},[Pt,a]),It=(0,_.useMemo)(()=>{let e=bt(x);for(let t of[T?.webSearch.model,T?.vision.model])t&&!e.some(e=>e.value===t)&&e.unshift({value:t,label:t});return e},[x,T]),Lt=async t=>{if(!T||j)return;let n=T,r={webSearch:yt(T.webSearch,t.webSearch),vision:yt(T.vision,t.vision)};M(!0),E(r);try{let n=await mt(await fetch(`${e}/api/sidecar-settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),`save failed`);E({webSearch:n.webSearch,vision:n.vision});let r=Z(Mn(e))??{};Q(Mn(e),{...r,sidecar:{webSearch:n.webSearch,vision:n.vision}})}catch{E(n)}finally{M(!1)}};async function Rt(t){if(!D||N)return;let n=D,r={...D,...t};P(!0),Ke.current=!0,O(r);try{if(!(await fetch(`${e}/api/shadow-call-settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).ok)throw Error(`shadow-call save failed`);Ge.current+=1}catch{O(n)}finally{Ke.current=!1,P(!1)}}let zt=async t=>{if(!(W||H===t)){ee(!0);try{(await fetch(`${e}/api/v2`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({multiAgentMode:t})})).ok&&(U(t),Q(`${jn}${e}`,t))}catch{}finally{ee(!1)}}},Bt=async t=>{if(!de){fe(!0);try{if(!(await fetch(`${e}/api/injection-model`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).ok)throw Error(`injection save failed`);let n=await mt(await fetch(`${e}/api/injection-model`)),r=gn(n);me(r.multiAgentGuidanceEnabled),ge(r.syncCodexSubagentDefaults),oe(r.injectionModel),se(r.injectionEffort),Array.isArray(n.efforts)&&le(n.efforts),Array.isArray(n.available)&&ue(n.available)}catch{}finally{fe(!1)}}},Vt=async()=>{if(!C||R)return;let t=!C.codexAutoStart;z(!0),He.current=!0,w({...C,codexAutoStart:t});try{let n=await mt(await fetch(`${e}/api/settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({codexAutoStart:t})}),`save failed`);Ve.current+=1,w(e=>e&&{...e,codexAutoStart:n.codexAutoStart,startupHealth:n.startupHealth??e.startupHealth})}catch{w(e=>e&&{...e,codexAutoStart:!t}),nt(!0)}finally{He.current=!1,z(!1)}},Ht=async()=>{if(!B){V(!0),we(null),Ee(null);try{let t=await mt(await fetch(`${e}/api/sync`,{method:`POST`}),`sync failed`);we(t),t.projectConfigGrouped&&Oe(t.projectConfigGrouped)}catch(e){Ee(e instanceof Error?e.message:String(e))}finally{V(!1)}}},Ut=async(t,n=!1)=>{n&&(Le.current=0),Re.current!==null&&(window.clearTimeout(Re.current),Re.current=null);let r=++Y.current;Ie(!0),Xe(null),Je(null);try{let n=await mt(await fetch(`${e}/api/update/check?tag=${t}`),`update check failed`);if(r!==Y.current)return;if(Je(n),n.reason===`latest_unavailable`&&Le.current<2){let e=++Le.current;Re.current=window.setTimeout(()=>{r===Y.current&&(Re.current=null,Ut(t))},800*e);return}n.reason!==`latest_unavailable`&&(Le.current=0),Ie(!1)}catch(e){if(r!==Y.current)return;Xe(e instanceof Error?e.message:String(e)),Ie(!1)}},Wt=()=>{Y.current+=1,Re.current!==null&&(window.clearTimeout(Re.current),Re.current=null),Ie(!1),Ae(!1)},Gt=()=>{let e=gt(m?.version);Me(e),Pe(!0),Ae(!0),Ut(e,!0)},Kt=e=>{Me(e),Ut(e,!0)},qt=(0,_.useRef)(Gt);return(0,_.useEffect)(()=>{qt.current=Gt}),(0,_.useEffect)(()=>{let e=()=>{ft()&&(Ue(`dashboard`),qt.current())},t=ft()?window.setTimeout(e,0):null;return window.addEventListener(`hashchange`,e),()=>{t!==null&&window.clearTimeout(t),window.removeEventListener(`hashchange`,e)}},[]),{apiBase:e,locale:t,t:n,selectedSection:r,setSelectedSection:i,modelQuery:a,setModelQuery:o,expandedProviders:s,setExpandedProviders:c,health:m,startupHealth:g,providers:y,models:x,settings:C,sidecar:T,shadowCall:D,usage30d:k,usageLoading:kt.loading&&!k,healthLoading:St.loading&&!m,sidecarSaving:j,shadowCallSaving:N,modelsLoading:F,settingsSaving:R,syncing:B,maMode:H,maModeResolved:Mt,maBusy:W,setMaHelpOpen:te,maHelpOpen:G,effortCapHelpOpen:ne,setEffortCapHelpOpen:K,shadowCallHelpOpen:re,setShadowCallHelpOpen:ie,injectionModel:ae,injectionEffort:q,injectionEfforts:ce,injectionAvailable:J,injectionSaving:de,multiAgentGuidanceEnabled:pe,syncCodexSubagentDefaults:he,saveInjection:Bt,effortCap:_e,subagentEffortCap:ye,effortCapSaving:xe,setEffortCap:ve,setSubagentEffortCap:be,setEffortCapSaving:Se,syncResult:Ce,syncError:Te,projectConfigWarnings:De,updateOpen:ke,updateChannel:je,setUpdateRestart:Pe,updateRestart:Ne,updateLoading:Fe,updateCheck:qe,updateError:Ye,updateJob:Ze,reconnecting:$e,error:tt,effortCapHelpTriggerRef:X,updateTriggerRef:rt,maHelpTriggerRef:it,shadowCallHelpTriggerRef:at,effortCapHelpDialogRef:ot,updateDialogRef:st,maHelpDialogRef:ct,shadowCallHelpDialogRef:lt,filteredGroups:Ft,sidecarModels:It,saveSidecar:Lt,saveShadowCall:Rt,switchMaMode:zt,toggleCodexAutoStart:Vt,runSync:Ht,fetchUpdateCheck:Ut,closeUpdateDialog:Wt,openUpdateDialog:Gt,changeUpdateChannel:Kt,runUpdate:async()=>{if(qe?.canUpdate){Xe(null);try{let t=await mt(await fetch(`${e}/api/update/run`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({tag:je,restart:Ne})}),`update failed to start`);if(!t.job)throw Error(`update failed to start`);Qe(t.job),et(!1),Wt()}catch(e){Xe(e instanceof Error?e.message:String(e))}}}}}function Pn(e){We(pt(e))}function Fn({apiBase:e}){let t=Nn(e),{t:n,error:r,selectedSection:i,providers:a,models:o,modelsLoading:s,modelQuery:c,setModelQuery:l,filteredGroups:u,expandedProviders:d,setExpandedProviders:f}=t;if(r)return(0,z.jsx)(it,{style:{marginTop:40},icon:(0,z.jsx)(J,{}),title:(0,z.jsx)(`span`,{style:{color:`var(--red)`},children:n(`dash.cannotConnect`)}),children:(0,z.jsx)(Ve,{k:`dash.runStart`,cmd:`ocx start`})});let p=(0,z.jsx)(on,{...t}),m=(0,z.jsx)(sn,{t:n,providers:a}),h=(0,z.jsx)(At,{t:n,models:o,modelsLoading:s,modelQuery:c,setModelQuery:l,filteredGroups:u,expandedProviders:d,setExpandedProviders:f}),g=(0,z.jsx)(kt,{...t}),_=[{id:`overview`,label:n(`dash.workspace.overview`),body:p},{id:`providers`,label:n(`dash.activeProviders`),body:m},{id:`models`,label:n(`dash.availableModels`),body:h}],v=_.find(e=>e.id===i)??_[0],y=Pn,b=e=>{let t=_.findIndex(e=>e.id===i),n=-1;if(e.key===`ArrowRight`?n=(t+1)%_.length:e.key===`ArrowLeft`?n=(t-1+_.length)%_.length:e.key===`Home`?n=0:e.key===`End`&&(n=_.length-1),n<0)return;e.preventDefault();let r=_[n];y(r.id),document.getElementById(`dashboard-tab-${r.id}`)?.focus()};return(0,z.jsxs)(`div`,{className:`dashboard-workspace-shell`,children:[(0,z.jsx)(`div`,{className:`page-head`,children:(0,z.jsx)(`h2`,{children:n(`nav.dashboard`)})}),(0,z.jsx)(`p`,{className:`page-sub`,children:n(`dash.subtitle`)}),(0,z.jsx)(`div`,{className:`page-tabs`,role:`tablist`,"aria-label":n(`dash.workspace.sections`),children:_.map(e=>(0,z.jsx)(`button`,{type:`button`,role:`tab`,id:`dashboard-tab-${e.id}`,"aria-selected":i===e.id,"aria-controls":`dashboard-panel-${e.id}`,tabIndex:i===e.id?0:-1,className:`page-tab${i===e.id?` page-tab--active`:``}`,onClick:()=>y(e.id),onKeyDown:b,children:e.label},e.id))}),(0,z.jsx)(`section`,{className:`dashboard-workspace-main`,role:`tabpanel`,id:`dashboard-panel-${v.id}`,"aria-labelledby":`dashboard-tab-${v.id}`,tabIndex:0,children:v.body}),g]})}var In=`https://chatgpt.com/backend-api/codex`,Ln=`openai`;function Rn(e){try{let t=new URL(e.trim());if(t.username||t.password||t.search||t.hash)return;let n=t.pathname.replace(/\/+$/,``);return`${t.origin}${n}`}catch{return}}function zn(e){try{let t=new URL(e).hostname.replace(/^\[|\]$/g,``).toLowerCase();return t===`localhost`||t===`127.0.0.1`||t===`::1`}catch{return!1}}function Bn(e){return e.keyOptional===!0||e.authMode===`oauth`||e.authMode===`forward`||e.authMode===`local`||zn(e.baseUrl)||e.hasApiKey===!0}function Vn(e){return e.adapter===`openai-responses`&&e.authMode===`forward`&&Rn(e.baseUrl)===In}function Hn(e,t){return e===Ln&&Vn(t)}function Un(e){return e.freeTier===!0||e.keyOptional===!0||e.authMode===`local`||zn(e.baseUrl)}function Wn(e,t){return Hn(e,t)?`accounts`:Un(t)?`free`:`paid`}function Gn(e,t){let n=[...e],r=(e,t)=>e.name.localeCompare(t.name,void 0,{sensitivity:`base`}),i=e=>e.tier??Wn(e.name,e);switch(t){case`az`:return n.sort(r);case`za`:return n.sort((e,t)=>r(t,e));case`free-paid`:return n.sort((e,t)=>(i(e)===`free`?0:1)-(i(t)===`free`?0:1)||r(e,t));case`paid-free`:return n.sort((e,t)=>(i(e)===`free`)-+(i(t)===`free`)||r(e,t));case`accounts-first`:return n.sort((e,t)=>{let n=e=>{let t=i(e);return t===`accounts`?0:t===`free`?1:2};return n(e)-n(t)||r(e,t)});default:return n}}function Kn(e){let t=[],n=[],r=[];for(let[i,a]of Object.entries(e)){if(a.disabled){r.push({name:i,...a});continue}Bn(a)?t.push({name:i,...a,tier:Wn(i,a)}):n.push({name:i,...a})}return{ready:t,needsSetup:n,disabled:r}}function qn(e,t){let n=new Set(Object.entries(t).filter(([,e])=>e).map(([e])=>e));if(n.size===0)return e;let r=e=>e.map(e=>n.has(e.name)?{...e,activeNeedsReauth:!0}:e);return{ready:r(e.ready),needsSetup:r(e.needsSetup),disabled:e.disabled}}function Jn(e){return e.disabled?`disabled`:`activeNeedsReauth`in e&&e.activeNeedsReauth?`needs-setup`:Bn(e)?`ready`:`needs-setup`}function Yn(e){let t=e.openai,n=e.chatgpt;if(!t||!n||!Hn(`openai`,t)||!Vn(n))return e;let r={...e};return delete r.chatgpt,r}function Xn(e){return e.authMode===`local`||zn(e.baseUrl)}var Zn=[`ollama`,`vllm`,`lm-studio`,`lmstudio`,`litellm`,`localai`];function Qn(e){let t=(e.authMode??``).toLowerCase();if(t===`oauth`||t===`forward`)return`login`;if(Xn(e))return`local`;let n=`${e.name??``} ${e.adapter} ${e.baseUrl}`.toLowerCase();return Zn.some(e=>n.includes(e))?`selfHosted`:`cloud`}function $n(e){if(!e||typeof e!=`object`)return{};let t=e.available;if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]=r.filter(e=>typeof e==`string`));return n}function er(e){if(!e||typeof e!=`object`)return{};let t=e.liveModelCounts;if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))typeof r!=`number`||!Number.isFinite(r)||r<0||(n[e]=Math.floor(r));return n}function tr(e){if(!e||typeof e!=`object`)return{};let t=e.selected;if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]=r.filter(e=>typeof e==`string`));return n}function nr(e){let t={};for(let[n,r]of Object.entries($n(e)))t[n]=r.length;return t}function rr(e){return Object.entries(e).filter(e=>typeof e[1].requests==`number`&&e[1].requests>0).map(([e,t])=>({name:e,...t,requests:t.requests})).sort((e,t)=>t.requests-e.requests||e.name.localeCompare(t.name))}var ir={justNow:`Just now`,notChecked:`Not checked`,minutesAgo:e=>`${e}m ago`,hoursAgo:e=>`${e}h ago`,daysAgo:e=>`${e}d ago`};function ar(e,t,n){let r=typeof t==`object`&&t?t:ir,i=typeof t==`number`?t:n??Date.now();if(e===void 0||!Number.isFinite(e))return r.notChecked;let a=Math.max(0,i-e),o=Math.floor(a/6e4);if(o<1)return r.justNow;if(o<60)return r.minutesAgo(o);let s=Math.floor(o/60);return s<24?r.hoursAgo(s):r.daysAgo(Math.floor(s/24))}function or(e){return{justNow:e(`time.justNow`),notChecked:e(`time.notChecked`),minutesAgo:t=>e(`time.minutesAgo`,{n:t}),hoursAgo:t=>e(`time.hoursAgo`,{n:t}),daysAgo:t=>e(`time.daysAgo`,{n:t})}}function sr(e,t){let n=[];for(let r of e.ready)r.activeNeedsReauth&&n.push({name:r.name,reason:t[r.name]??`Active account needs re-authentication`});for(let r of e.needsSetup){let e=r.activeNeedsReauth?t[r.name]??`Active account needs re-authentication`:t[r.name]??`Missing credentials`;n.push({name:r.name,reason:e})}for(let r of e.disabled){let e=t[r.name];e&&n.push({name:r.name,reason:e})}return n}function cr(e){return e===`Active account needs re-authentication`?`reauth`:e===`Missing credentials`?`missing`:`custom`}function lr(e,t=`en`){if(e===void 0)return`—`;if(t.toLowerCase().slice(0,2)===`de`){let t=e=>e.replace(/\.0+$/,``).replace(`.`,`,`);return e>=1e9?`${t((e/1e9).toFixed(2))} Mrd.`:e>=1e6?`${t((e/1e6).toFixed(1))} Mio.`:e>=1e3?`${t((e/1e3).toFixed(1))} Tsd.`:String(e)}return e>=1e9?`${(e/1e9).toFixed(2).replace(/\.?0+$/,``)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function ur(e,t=`en`){return lr(e,t)}function dr(e,t=`en`){return e==null||!Number.isFinite(e)||e<0?`—`:`~$${new Intl.NumberFormat(t,{minimumFractionDigits:4,maximumFractionDigits:4}).format(e)}`}var fr={anthropic:`claude-color.svg`,"anthropic-apikey":`claude-color.svg`,"azure-openai":`openai.svg`,chatgpt:`openai.svg`,"cloudflare-ai-gateway":`cloudflare-ai-gateway-color.svg`,"cloudflare-workers-ai":`cloudflare-ai-gateway-color.svg`,cursor:`cursor-color.svg`,deepseek:`deepseek-color.svg`,firepass:`firepass-color.svg`,fireworks:`fireworks-color.svg`,github:`github-copilot-color.svg`,"github-copilot":`copilot-color.svg`,"gitlab-duo":`gitlab-duo-color.svg`,google:`gemini-color.svg`,"google-antigravity":`antigravity-color.svg`,"google-vertex":`gemini-color.svg`,groq:`groq-color.svg`,huggingface:`huggingface-color.svg`,kimi:`kimi-color.svg`,"kimi-code":`kimi-color.svg`,kiro:`kiro-color.svg`,"lm-studio":`lm-studio-color.svg`,mistral:`mistral-color.svg`,moonshot:`moonshot-color.svg`,nvidia:`nvidia-color.svg`,ollama:`ollama-color.svg`,"ollama-cloud":`ollama-color.svg`,openai:`openai.svg`,"openai-apikey":`openai.svg`,"opencode-free":`opencode.svg`,"opencode-go":`opencode.svg`,"opencode-zen":`opencode.svg`,openrouter:`openrouter-color.svg`,qianfan:`qianfan-color.svg`,alibaba:`alibaba-color.svg`,"alibaba-token-plan":`alibaba-color.svg`,"alibaba-token-plan-intl":`alibaba-color.svg`,"qwen-cloud":`qwen-portal-color.svg`,"vercel-ai-gateway":`vercel-ai-gateway-color.svg`,vllm:`vllm-color.svg`,xai:`grok-color.svg`,"mimo-free":`xiaomi-color.svg`,xiaomi:`xiaomi-color.svg`},pr={anthropic:`Anthropic Claude`,"anthropic-apikey":`Anthropic Claude`,chatgpt:`ChatGPT`,openai:`OpenAI (Codex login)`,"openai-apikey":`OpenAI API`,"azure-openai":`Azure OpenAI`,"cloudflare-ai-gateway":`Cloudflare AI Gateway`,"cloudflare-workers-ai":`Cloudflare Workers AI`,nvidia:`NVIDIA NIM`,ollama:`Ollama`,"ollama-cloud":`Ollama Cloud`,xai:`xAI Grok`,"mimo-free":`MiMo Free`,xiaomi:`Xiaomi`,cursor:`Cursor`,deepseek:`DeepSeek`,github:`GitHub`,"github-copilot":`GitHub Copilot`,"gitlab-duo":`GitLab Duo`,openrouter:`OpenRouter`,"opencode-go":`OpenCode Go`,"opencode-free":`OpenCode Free`,"opencode-zen":`OpenCode Zen`,mistral:`Mistral`,groq:`Groq`,alibaba:`Alibaba Coding Plan`,"alibaba-token-plan":`Alibaba Token Plan`,"alibaba-token-plan-intl":`Alibaba Token Plan (Intl)`,kimi:`Kimi`,"kimi-code":`Kimi`,moonshot:`Moonshot`,google:`Google`,"google-vertex":`Google Vertex`,"lm-studio":`LM Studio`,huggingface:`Hugging Face`,"qwen-cloud":`Qwen Cloud`,siliconflow:`SiliconFlow`,"tencent-coding-plan":`Tencent Cloud Coding Plan`,"vercel-ai-gateway":`Vercel AI Gateway`,vllm:`vLLM`,litellm:`LiteLLM`},mr={volcengine:`provider.name.volcengine`,"volcengine-coding-plan":`provider.name.volcengineCodingPlan`,"volcengine-agent-plan":`provider.name.volcengineAgentPlan`},hr=new Set([...Object.keys(pr),...Object.keys(mr)]);function gr(e){return fr[e.toLowerCase()]}function _r(e,t){let n=gr(e);return n?`/provider-icons/${n}`:void 0}function vr(e,t){let n=e.toLowerCase(),r=mr[n];return r?t(r):pr[n]?pr[n]:e===n&&/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)?e.split(`-`).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(` `):e}function yr(e){return hr.has(e.toLowerCase())}function br(e,t){let n=Jn(e);return n===`disabled`?t(`prov.disabledBadge`):n===`ready`?t(`pws.status.ready`):`activeNeedsReauth`in e&&e.activeNeedsReauth?t(`pws.status.needsAttention`):t(`pws.status.needsSetup`)}function xr(e,t){switch(e.authMode){case`oauth`:return t(`modal.badge.oauth`);case`forward`:return t(`pws.auth.chatgptPassthrough`);case`local`:return t(`modal.badge.local`);case`key`:return t(`modal.badge.apiKey`);default:return e.authMode??(e.keyOptional?t(`pws.auth.noKey`):t(`modal.badge.apiKey`))}}function Sr(e){let t=Jn(e);return t===`disabled`?`providers-workspace-rail-status providers-workspace-rail-status--inactive`:t===`ready`?`providers-workspace-rail-status providers-workspace-rail-status--active`:`providers-workspace-rail-status providers-workspace-rail-status--warning`}function Cr({name:e,adapter:t,baseUrl:n,cls:r}){let i=_r(e,{adapter:t,baseUrl:n});return(0,z.jsx)(`span`,{className:r,children:i?(0,z.jsx)(`img`,{src:i,alt:``,"aria-hidden":`true`}):(0,z.jsx)(H,{"aria-hidden":`true`})})}function wr({item:e,selected:t,tabbable:n,modelCount:r,isDefault:i,showConfigId:a,onClick:o,onFocus:s}){let c=Y(),l=Un(e),u=Xn(e),d=br(e,c),f=vr(e.name,c),p=a?`${f} (${e.name})`:f,m=`${i?c(`pws.rail.suffixDefault`):``}${u?c(`pws.rail.suffixLocal`):l?c(`pws.rail.suffixFree`):``}`,h=r!==void 0&&r>0?r===1?c(`pws.modelCountOne`):c(`pws.modelCount`,{count:r}):``,g=[a?e.name:``,h].filter(Boolean).join(` · `);return(0,z.jsxs)(`button`,{type:`button`,className:`providers-workspace-rail-row${t?` providers-workspace-rail-row--selected`:``}`,onClick:o,role:`option`,"aria-selected":t,tabIndex:n?0:-1,"aria-label":c(`pws.rail.selectAria`,{name:p,status:d,suffix:m}),title:p,onFocus:s,children:[(0,z.jsx)(Cr,{name:e.name,adapter:e.adapter,baseUrl:e.baseUrl,cls:`providers-workspace-rail-icon`}),(0,z.jsxs)(`span`,{className:`providers-workspace-rail-copy`,children:[(0,z.jsxs)(`span`,{className:`providers-workspace-rail-primary`,children:[(0,z.jsx)(`span`,{className:`providers-workspace-rail-name-label`,title:f,children:f}),u?(0,z.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--local`,title:c(`pws.localTitle`),children:c(`modal.badge.local`)}):l?(0,z.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--free`,title:c(`pws.freeTitle`),children:c(`modal.badge.free`)}):null]}),(0,z.jsx)(`span`,{className:`providers-workspace-rail-secondary`,title:g||void 0,children:g||`\xA0`})]}),(0,z.jsxs)(`span`,{className:`providers-workspace-rail-trail`,children:[i&&(0,z.jsx)(`span`,{className:`pwi-default-star`,title:c(`prov.defaultBadge`),"aria-label":c(`prov.defaultBadge`),children:(0,z.jsx)(Ae,{width:17,height:17,"aria-hidden":`true`})}),(0,z.jsx)(`span`,{className:Sr(e),title:d,"aria-hidden":`true`})]})]})}function Tr(e){let t=e?.quota;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t,r=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,i=Array.isArray(n.customWindows)?n.customWindows.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return typeof t.label!=`string`||r(t.percent)===void 0?[]:[{label:t.label,percent:t.percent,...r(t.resetAt)===void 0?{}:{resetAt:t.resetAt}}]}):[],a={...r(n.fiveHourPercent)===void 0?{}:{fiveHourPercent:n.fiveHourPercent},...r(n.fiveHourResetAt)===void 0?{}:{fiveHourResetAt:n.fiveHourResetAt},...r(n.weeklyPercent)===void 0?{}:{weeklyPercent:n.weeklyPercent},...r(n.weeklyResetAt)===void 0?{}:{weeklyResetAt:n.weeklyResetAt},...r(n.monthlyPercent)===void 0?{}:{monthlyPercent:n.monthlyPercent},...r(n.monthlyResetAt)===void 0?{}:{monthlyResetAt:n.monthlyResetAt},...i.length>0?{customWindows:i}:{},updatedAt:r(n.updatedAt)??e?.updatedAt??Date.now()};return a.fiveHourPercent!==void 0||a.weeklyPercent!==void 0||a.monthlyPercent!==void 0||(a.customWindows?.length??0)>0?a:null}function Er(e){if(!e?.trim())return``;let[t,n]=e.split(`:`,2);return n?`${t} · ${n.replace(/-/g,` `)}`:e}function Dr(e,t,n,r,i,a){let o=r&&r.length>0?r:t?[t]:[],s=[...new Set([...a?e:o,...i])],c=n.trim().toLowerCase();return c?s.filter(e=>e.toLowerCase().includes(c)):s}function Or(e){let t=e?.trim().toLowerCase();return!t||t.includes(`grok`)||t.includes(`supergrok`)?!1:t===`go`||t===`free`}function kr(e,t){return!e||!Or(t)?e:{...e.monthlyPercent===void 0?{}:{monthlyPercent:e.monthlyPercent},...e.monthlyResetAt===void 0?{}:{monthlyResetAt:e.monthlyResetAt},...e.resetCredits===void 0?{}:{resetCredits:e.resetCredits},updatedAt:e.updatedAt}}function Ar(e){return e===`5h`?0:e===`First-party models`?2:e===`API usage`?3:5}function jr(e,t){switch(e){case`First-party models`:return t(`quota.cursorFirstParty`);case`API usage`:return t(`quota.cursorApiUsage`);case`Total subscription credits`:return t(`quota.totalSubscriptionCredits`);case`Monthly credits`:return t(`quota.monthlyCredits`);case`Request window`:return t(`quota.requestWindow`);case`GrokBuild`:return t(`quota.grokBuild`);default:return e}}function Mr(e,t,n){let r=kr(e,t);if(!r)return[];let i=[];if(typeof r.fiveHourPercent==`number`&&i.push({rank:0,row:{label:n(`codexAuth.fiveHour`),limitLabel:n(`quota.fiveHourLimit`),percent:r.fiveHourPercent,resetAt:r.fiveHourResetAt}}),typeof r.weeklyPercent==`number`&&i.push({rank:1,row:{label:n(`codexAuth.weekly`),limitLabel:n(`quota.weeklyLimit`),percent:r.weeklyPercent,resetAt:r.weeklyResetAt}}),typeof r.monthlyPercent==`number`){let e=typeof t==`string`&&/^(Grok|SuperGrok|Free)/i.test(t);i.push({rank:4,row:{label:n(e?`quota.monthlyCredits`:`codexAuth.monthly`),limitLabel:n(e?`quota.monthlyCredits`:`quota.monthlyLimit`),percent:r.monthlyPercent,resetAt:r.monthlyResetAt}})}for(let e of r.customWindows??[]){let t=jr(e.label,n);i.push({rank:Ar(e.label),row:{label:t,limitLabel:t,percent:e.percent,resetAt:e.resetAt}})}return i.sort((e,t)=>e.rank-t.rank).map(e=>e.row)}function Nr(e){if(!e)return-1;let t=[e.fiveHourPercent,e.weeklyPercent,e.monthlyPercent].filter(e=>typeof e==`number`);for(let n of e.customWindows??[])typeof n.percent==`number`&&t.push(n.percent);return t.length?Math.max(...t):-1}function Pr(e){switch(e){case`en`:return`en-GB`;case`de`:return`de-DE`;case`ko`:return`ko-KR`;case`zh`:return`zh-CN`;case`ru`:return`ru-RU`;case`ja`:return`ja-JP`;default:return e}}function Fr(e){return e>=99.5}function Ir(e,t){return t>0&&e>=t}function Lr(e,t){return Ir(e,t)||Fr(e)?`bar-warn`:`bar-green`}function Rr(e){let t=Math.max(0,Math.min(100,e));return t<=0?0:Math.max(4,Math.round(t))}function zr(e){return{"--bar-scale":String(Rr(e)/100)}}function Br({quota:e,plan:t,threshold:n,t:r,className:i,layout:a=`compact`,pending:o=!1}){let{locale:s}=ze(),c=Mr(e,t,r);return c.length===0?o?a===`stacked`?(0,z.jsxs)(`div`,{className:`quota-stacked quota-stacked--pending${i?` ${i}`:``}`,"aria-busy":`true`,role:`status`,children:[Array.from({length:2},(e,t)=>(0,z.jsxs)(`div`,{className:`quota-stacked-row quota-stacked-row--skeleton`,"aria-hidden":`true`,children:[(0,z.jsxs)(`div`,{className:`quota-stacked-head`,children:[(0,z.jsx)(`span`,{className:`quota-skel quota-skel--label`,style:{width:72}}),(0,z.jsx)(`span`,{className:`quota-skel quota-skel--time`,style:{width:64}})]}),(0,z.jsxs)(`div`,{className:`quota-stacked-bar-row`,children:[(0,z.jsx)(`span`,{className:`quota-skel quota-skel--bar`,style:{height:6,flex:1}}),(0,z.jsx)(`span`,{className:`quota-skel quota-skel--val`,style:{width:36}})]})]},t)),(0,z.jsx)(`span`,{className:`sr-only`,children:r(`common.loading`)})]}):(0,z.jsxs)(`div`,{className:`codex-account-quota-slot quota-compact quota-compact--pending${i?` ${i}`:``}`,"aria-busy":`true`,role:`status`,children:[Array.from({length:2},(e,t)=>(0,z.jsxs)(`div`,{className:`quota-row quota-row--skeleton`,"aria-hidden":`true`,children:[(0,z.jsx)(`span`,{className:`quota-skel quota-skel--label`}),(0,z.jsx)(`span`,{className:`quota-skel quota-skel--reset`}),(0,z.jsx)(`span`,{className:`quota-skel quota-skel--day`}),(0,z.jsx)(`span`,{className:`quota-skel quota-skel--time`}),(0,z.jsx)(`span`,{className:`quota-skel quota-skel--bar`}),(0,z.jsx)(`span`,{className:`quota-skel quota-skel--val`})]},t)),(0,z.jsx)(`span`,{className:`sr-only`,children:r(`common.loading`)})]}):null:a===`stacked`?(0,z.jsx)(`div`,{className:`quota-stacked${i?` ${i}`:``}`,children:c.map(e=>(0,z.jsx)(Hr,{row:e,threshold:n,t:r,locale:s},e.limitLabel))}):(0,z.jsx)(`div`,{className:`codex-account-quota-slot quota-compact${i?` ${i}`:``}`,children:c.map(e=>(0,z.jsx)(Vr,{label:e.label,percent:e.percent,resetAt:e.resetAt,threshold:n,t:r,locale:s},e.label))})}function Vr({label:e,percent:t,resetAt:n,threshold:r,t:i,locale:a}){let o=Fr(t),s=Ir(t,r),c=Lr(t,r),l=Ur(n,i,a);return(0,z.jsxs)(`div`,{className:`quota-row${s?` quota-row--warn`:``}${o?` quota-row--exhausted`:``}`,children:[(0,z.jsx)(`span`,{className:`quota-label`,children:e}),(0,z.jsx)(`span`,{className:`quota-reset-label`,children:i(`codexAuth.resets`)}),(0,z.jsx)(`span`,{className:`quota-reset-day`,children:l.day}),(0,z.jsx)(`span`,{className:`quota-reset-time`,children:l.time}),(0,z.jsx)(`div`,{className:`bar`,children:(0,z.jsx)(`div`,{className:`bar-fill ${c}`,style:zr(t)})}),(0,z.jsxs)(`span`,{className:`quota-val${s?` quota-val--warn`:``}`,title:o?i(`quota.limitReached`):void 0,children:[s&&(0,z.jsx)(J,{width:12,height:12,"aria-hidden":`true`}),Math.round(t),`%`,o?` · ${i(`quota.limitReached`)}`:``]})]})}function Hr({row:e,threshold:t,t:n,locale:r}){let i=Fr(e.percent),a=Ir(e.percent,t),o=Lr(e.percent,t),s=Wr(e.resetAt,n,r);return(0,z.jsxs)(`div`,{className:`quota-stacked-row${a?` quota-stacked-row--warn`:``}${i?` quota-stacked-row--exhausted`:``}`,children:[(0,z.jsxs)(`div`,{className:`quota-stacked-head`,children:[(0,z.jsx)(`span`,{className:`quota-stacked-limit`,children:e.limitLabel}),(0,z.jsx)(`span`,{className:`quota-stacked-reset muted`,children:s})]}),(0,z.jsxs)(`div`,{className:`quota-stacked-bar-row`,children:[(0,z.jsx)(`div`,{className:`bar quota-stacked-bar`,children:(0,z.jsx)(`div`,{className:`bar-fill ${o}`,style:zr(e.percent)})}),(0,z.jsx)(`span`,{className:`quota-stacked-used${a?` quota-stacked-used--warn`:``}`,children:n(`quota.usedPercent`,{pct:Math.round(e.percent)})})]}),i&&(0,z.jsxs)(`div`,{className:`quota-stacked-limit-reached`,role:`status`,children:[(0,z.jsx)(J,{width:12,height:12,"aria-hidden":`true`}),n(`quota.limitReached`)]})]})}function Ur(e,t,n){if(typeof e!=`number`||!Number.isFinite(e))return{day:``,time:``};let r=e<1e10?e*1e3:e,i=new Date(r),a=new Date,o=Pr(n),s=new Intl.DateTimeFormat(o,{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(i);return i.getFullYear()===a.getFullYear()&&i.getMonth()===a.getMonth()&&i.getDate()===a.getDate()?{day:t(`codexAuth.today`),time:s}:{day:new Intl.DateTimeFormat(o,{day:`numeric`,month:`short`}).format(i),time:s}}function Wr(e,t,n=`en`,r=Date.now()){if(typeof e!=`number`||!Number.isFinite(e))return``;let i=e<1e10?e*1e3:e,a=new Date(i),o=Pr(n),s=new Intl.DateTimeFormat(o,{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(a),c=new Date(r),l=new Date(c.getFullYear(),c.getMonth(),c.getDate()).getTime(),u=new Date(a.getFullYear(),a.getMonth(),a.getDate()).getTime(),d=Math.round((u-l)/864e5);if(d===1)return t(`quota.resetsTomorrow`,{time:s});let f=a.getFullYear()!==c.getFullYear(),p=new Intl.DateTimeFormat(o,{day:`numeric`,month:`short`,...f?{year:`numeric`}:{}}).format(a);if(i<=r)return t(`quota.resetsAt`,{date:p,time:s,when:`${p}, ${s}`});let m=Math.round((i-r)/6e4);if(m<60)return t(`quota.resetsRelativeMinutes`,{n:Math.max(1,m)});let h=Math.round(m/60);return h<12&&d===0?t(`quota.resetsRelativeHours`,{n:Math.max(1,h)}):d===0?t(`quota.resetsToday`,{time:s}):t(`quota.resetsAt`,{date:p,time:s,when:`${p}, ${s}`})}function Gr({sections:e,quotaReports:t,usageTotals:n,usageLoading:r=!1,quotasLoading:i=!1,onSelectProvider:a,onEditConfig:o}){let s=Y(),{locale:c}=ze(),l=or(s),u=(0,_.useMemo)(()=>[...e.ready,...e.needsSetup,...e.disabled],[e]),d=(0,_.useMemo)(()=>new Set(u.map(e=>e.name)),[u]),f=(0,_.useMemo)(()=>sr(e,{}),[e]),p=f.length,m=(0,_.useMemo)(()=>e.ready.filter(e=>e.activeNeedsReauth).length,[e]),h=e.ready.length-m,g=e.needsSetup.length+m,v=(0,_.useMemo)(()=>{let e=[];for(let n of u){let r=t[n.name],i=r?Tr(r):null;r&&i&&e.push({item:n,report:r,urgency:Nr(i)})}return e.sort((e,t)=>t.urgency-e.urgency||e.item.name.localeCompare(t.item.name))},[u,t]),y=(0,_.useMemo)(()=>{let e={};for(let[t,r]of Object.entries(n))d.has(t)&&(e[t]=r);return rr(e).slice(0,4)},[n,d]),b=e=>{let t=cr(e);return t===`reauth`?s(`pws.attention.reauth`):t===`missing`?s(`pws.attention.missingCredentials`):e};return(0,z.jsxs)(`div`,{className:`pws-dashboard`,children:[(0,z.jsxs)(`div`,{className:`pws-dashboard-header`,children:[(0,z.jsxs)(`div`,{className:`pws-dashboard-header-text`,children:[(0,z.jsx)(`h2`,{className:`pws-dashboard-title`,children:s(`pws.dashboard.title`)}),(0,z.jsx)(`p`,{className:`muted pws-dashboard-subtitle`,children:s(`pws.dashboard.subtitle`)})]}),o&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:o,children:s(`prov.editJson`)})]}),(0,z.jsxs)(`div`,{className:`pws-dashboard-summary`,children:[(0,z.jsx)(Kr,{count:h,label:s(`pws.status.ready`),tone:`ok`}),(0,z.jsx)(Kr,{count:g,label:s(m>0?`pws.status.needsAttention`:`pws.status.needsSetup`),tone:`warn`}),(0,z.jsx)(Kr,{count:e.disabled.length,label:s(`prov.disabledBadge`),tone:`muted`})]}),p>0&&(0,z.jsxs)(`section`,{className:`pws-dashboard-section pws-dashboard-attention`,"aria-label":s(`pws.attentionTitle`),children:[(0,z.jsxs)(`h3`,{className:`pws-dashboard-section-title`,children:[(0,z.jsx)(J,{style:{width:14,height:14},"aria-hidden":`true`}),s(`pws.attentionTitle`)]}),(0,z.jsx)(`div`,{className:`pws-dashboard-rows`,children:f.map(e=>(0,z.jsxs)(`button`,{type:`button`,className:`pws-dashboard-row pws-dashboard-row--attention`,onClick:()=>a(e.name),children:[(0,z.jsx)(Cr,{name:e.name,adapter:``,baseUrl:``,cls:`pws-dashboard-row-icon`}),(0,z.jsxs)(`div`,{className:`pws-dashboard-row-info`,children:[(0,z.jsx)(`span`,{className:`pws-dashboard-row-name`,children:vr(e.name,s)}),(0,z.jsx)(`span`,{className:`pws-dashboard-row-meta muted`,children:b(e.reason)})]}),(0,z.jsx)(he,{className:`pws-dashboard-row-chevron`,"aria-hidden":`true`})]},`${e.name}:${e.reason}`))})]}),(0,z.jsxs)(`div`,{className:`pws-dashboard-columns`,children:[(0,z.jsxs)(`section`,{className:`pws-dashboard-section pws-dashboard-section--rate-limits`,"aria-label":s(`pws.dashboard.rateLimits`),"aria-busy":i||void 0,children:[(0,z.jsx)(`h3`,{className:`pws-dashboard-section-title`,children:s(`pws.dashboard.rateLimits`)}),v.length>0?(0,z.jsx)(`div`,{className:`pws-dashboard-rows`,children:v.map(({item:e,report:t})=>(0,z.jsxs)(`button`,{type:`button`,className:`pws-dashboard-row`,onClick:()=>a(e.name),children:[(0,z.jsx)(Cr,{name:e.name,adapter:e.adapter,baseUrl:e.baseUrl,cls:`pws-dashboard-row-icon`}),(0,z.jsxs)(`div`,{className:`pws-dashboard-row-info`,children:[(0,z.jsx)(`span`,{className:`pws-dashboard-row-name`,children:vr(e.name,s)}),(0,z.jsx)(`span`,{className:`pws-dashboard-row-meta muted`,children:s(`pws.dashboard.checkedAgo`,{time:ar(t.updatedAt,l)})})]}),(0,z.jsx)(he,{className:`pws-dashboard-row-chevron`,"aria-hidden":`true`}),(0,z.jsx)(`div`,{className:`pws-dashboard-row-bars`,children:(0,z.jsx)(Br,{quota:Tr(t),threshold:80,t:s,layout:`stacked`,pending:i&&!t.quota})})]},e.name))}):i?(0,z.jsx)(`div`,{className:`pws-dashboard-rows pws-dashboard-rows--pending`,"aria-hidden":`true`,children:Array.from({length:3},(e,t)=>(0,z.jsxs)(`div`,{className:`pws-dashboard-row pws-dashboard-row--skeleton`,children:[(0,z.jsx)(`span`,{className:`pws-dashboard-row-icon pws-skel`}),(0,z.jsxs)(`div`,{className:`pws-dashboard-row-info`,children:[(0,z.jsx)(`span`,{className:`pws-skel pws-skel--name`}),(0,z.jsx)(`span`,{className:`pws-skel pws-skel--meta`})]}),(0,z.jsx)(`div`,{className:`pws-dashboard-row-bars`,children:(0,z.jsx)(Br,{quota:null,threshold:80,t:s,layout:`stacked`,pending:!0})})]},t))}):(0,z.jsx)(`p`,{className:`muted pws-dashboard-empty`,children:s(`pws.dashboard.noRateLimits`)})]}),(0,z.jsxs)(`section`,{className:`pws-dashboard-section pws-dashboard-section--recent`,"aria-label":s(`pws.dashboard.recentlyUsed`),"aria-busy":r||void 0,children:[(0,z.jsx)(`h3`,{className:`pws-dashboard-section-title`,children:s(`pws.dashboard.recentlyUsed`)}),y.length>0?(0,z.jsx)(`div`,{className:`pws-dashboard-rows`,children:y.map(e=>(0,z.jsxs)(`button`,{type:`button`,className:`pws-dashboard-row`,onClick:()=>a(e.name),children:[(0,z.jsx)(Cr,{name:e.name,adapter:``,baseUrl:``,cls:`pws-dashboard-row-icon`}),(0,z.jsx)(`span`,{className:`pws-dashboard-row-name`,children:vr(e.name,s)}),(0,z.jsx)(`span`,{className:`pws-dashboard-row-count muted`,children:s(`pws.dashboard.requests`,{count:lr(e.requests,c)})}),(0,z.jsx)(he,{className:`pws-dashboard-row-chevron`,"aria-hidden":`true`})]},e.name))}):r?(0,z.jsx)(`div`,{className:`pws-dashboard-rows pws-dashboard-rows--pending`,"aria-hidden":`true`,children:Array.from({length:3},(e,t)=>(0,z.jsxs)(`div`,{className:`pws-dashboard-row pws-dashboard-row--skeleton`,children:[(0,z.jsx)(`span`,{className:`pws-dashboard-row-icon pws-skel`}),(0,z.jsx)(`span`,{className:`pws-skel pws-skel--name`}),(0,z.jsx)(`span`,{className:`pws-skel pws-skel--count`})]},t))}):(0,z.jsx)(`p`,{className:`muted pws-dashboard-empty`,children:s(`pws.dashboard.noUsage`)})]})]})]})}function Kr({count:e,label:t,tone:n}){return(0,z.jsxs)(`div`,{className:`pws-dashboard-card pws-dashboard-card--${n}`,children:[(0,z.jsx)(`span`,{className:`pws-dashboard-card-count`,children:e}),(0,z.jsx)(`span`,{className:`pws-dashboard-card-label`,children:t})]})}function qr({editor:e,providerName:t,saving:n,onSave:r,message:i}){let a=Y(),o=(0,_.useRef)(null);return(0,_.useEffect)(()=>{e.open&&o.current?.focus()},[e.open]),e.open?(0,z.jsxs)(`div`,{className:`pwi-json-panel`,children:[(0,z.jsxs)(`div`,{className:`pwi-json-panel-header`,children:[(0,z.jsx)(`span`,{className:`pwi-json-panel-title`,children:a(`pws.jsonEditorTitle`,{name:t})}),(0,z.jsxs)(`div`,{className:`pwi-json-panel-actions`,children:[e.onRestore&&e.isDirty&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:e.onRestore,children:a(`pws.jsonRestore`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:e.onClose,children:a(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:r,disabled:n||!e.isDirty,children:a(n?`pws.saving`:`pws.jsonSave`)})]})]}),(0,z.jsx)(`p`,{className:`pwi-json-panel-desc muted`,children:a(`pws.jsonEditorDesc`)}),(0,z.jsx)(`textarea`,{ref:o,className:`input pwi-json-textarea`,value:e.draft,onChange:t=>e.onDraftChange(t.target.value),spellCheck:!1,rows:20,"aria-label":a(`pws.jsonEditorDesc`)}),i&&(0,z.jsx)(`div`,{className:i.ok?`pwi-settings-msg pwi-settings-msg--ok`:`pwi-settings-msg pwi-settings-msg--err`,children:i.text})]}):null}var Jr=[{id:`az`,labelKey:`pws.sort.az`},{id:`za`,labelKey:`pws.sort.za`},{id:`free-paid`,labelKey:`pws.sort.freePaid`},{id:`paid-free`,labelKey:`pws.sort.paidFree`},{id:`accounts-first`,labelKey:`pws.sort.accountsFirst`}];function Yr({providers:e,apiBase:t,defaultProvider:n,selectedName:r,onSelect:i,onRemoveProvider:a,onAddProvider:o,onEditConfig:s,jsonEditor:c,jsonSaving:l=!1,modelsRefreshToken:u=0,activeAccountNeedsReauth:d,quotaRefreshEpoch:f=0,quotaForceRefresh:p=!1,detail:m}){let h=Y(),[g,v]=(0,_.useState)(``),[y,b]=(0,_.useState)({ready:!0,needsSetup:!0,disabled:!0}),[x,S]=(0,_.useState)({free:!0,paid:!0}),[C,w]=(0,_.useState)({cloud:!0,local:!0,selfHosted:!0,login:!0}),[T,E]=(0,_.useState)(`az`),[D,O]=(0,_.useState)(!1),[k,A]=(0,_.useState)(null),[j,M]=(0,_.useState)({}),[N,P]=(0,_.useState)({}),[F,I]=(0,_.useState)({}),[L,R]=(0,_.useState)({}),[B,V]=(0,_.useState)(!1),[H,U]=(0,_.useState)(!1),W=`ocx.providers.quotas.v1:${t}`,ee=`ocx.providers.usage.v1:${t}`,[G,te]=(0,_.useState)(()=>Z(ee)?.totals??{}),[ne,K]=(0,_.useState)(()=>Z(ee)?.models??{}),[re,ie]=(0,_.useState)(()=>Z(W)??{}),[ae,oe]=(0,_.useState)(()=>!Z(ee)),[q,se]=(0,_.useState)(()=>!Z(W)),[ce,J]=(0,_.useState)(0),ue=(0,_.useRef)(null),fe=(0,_.useMemo)(()=>qn(Kn(Yn(e)),d??{}),[e,d]),pe=(0,_.useCallback)(()=>{J(e=>e+1)},[]);(0,_.useEffect)(()=>{let e=!1,n=window.setTimeout(()=>{V(!0),(async()=>{try{let n=await ct(await fetch(`${t}/api/selected-models`));if(e)return;M(nr(n)),P($n(n)),I(er(n)),R(tr(n)),U(!1)}catch{if(e)return;U(!0)}finally{e||V(!1)}})()},0);return()=>{e=!0,window.clearTimeout(n)}},[t,u,ce]),(0,_.useEffect)(()=>{let e=!1,n=window.setTimeout(()=>{Z(ee)||oe(!0),fetch(`${t}/api/usage?range=30d`).then(e=>lt(e)).then(t=>{if(e||!t)return;let n={};for(let e of t.providers??[])n[e.provider]={requests:e.requests,totalTokens:e.totalTokens};te(n);let r={};for(let e of t.models??[]){let t=e.provider;r[t]||(r[t]=[]),r[t].push({model:e.model,...e.resolvedModel?{resolvedModel:e.resolvedModel}:{},requests:e.requests,totalTokens:e.totalTokens,inputTokens:e.inputTokens,outputTokens:e.outputTokens,shareRatio:e.shareRatio,...e.estimatedCostUsd===void 0?{}:{estimatedCostUsd:e.estimatedCostUsd}})}K(r),Q(ee,{totals:n,models:r})}).catch(()=>{}).finally(()=>{e||oe(!1)})},0);return()=>{e=!0,window.clearTimeout(n)}},[t,ee]),(0,_.useEffect)(()=>{let e=!1,n=window.setTimeout(()=>{Z(W)||se(!0),fetch(`${t}/api/provider-quotas${p?`?refresh=1`:``}`).then(e=>lt(e)).then(t=>{e||!t||ie(e=>{let n={...e};for(let e of t.reports??[])e?.provider&&(n[e.provider]={label:e.label,source:e.source,updatedAt:typeof e.updatedAt==`number`?e.updatedAt:Date.now(),quota:e.quota});return Q(W,n),n})}).catch(()=>{}).finally(()=>{e||se(!1)})},0);return()=>{e=!0,window.clearTimeout(n)}},[t,f,p,W]),(0,_.useEffect)(()=>{if(!D)return;let e=e=>{ue.current&&!ue.current.contains(e.target)&&O(!1)},t=e=>{e.key===`Escape`&&O(!1)};return document.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}},[D]);let me=(0,_.useMemo)(()=>[...fe.ready,...fe.needsSetup,...fe.disabled],[fe]),he=(0,_.useMemo)(()=>me.filter(Un).length,[me]),ge=me.length-he,_e=(0,_.useMemo)(()=>{let e={cloud:0,local:0,selfHosted:0,login:0};for(let t of me)e[Qn(t)]+=1;return e},[me]),ve=(0,_.useMemo)(()=>{let e=g.trim().toLowerCase(),t=t=>Gn(t.filter(t=>{if(e&&!t.name.toLowerCase().includes(e)&&!t.adapter.toLowerCase().includes(e))return!1;let n=Un(t);return!(n&&!x.free||!n&&!x.paid||!C[Qn(t)])}),T);return{ready:y.ready?t(fe.ready):[],needsSetup:y.needsSetup?t(fe.needsSetup):[],disabled:y.disabled?t(fe.disabled):[]}},[fe,g,y,x,C,T]),ye=!y.ready||!y.needsSetup||!y.disabled||!x.free||!x.paid||!C.cloud||!C.local||!C.selfHosted||!C.login||T!==`az`,be=()=>{b({ready:!0,needsSetup:!0,disabled:!0}),S({free:!0,paid:!0}),w({cloud:!0,local:!0,selfHosted:!0,login:!0}),E(`az`)},xe=(0,_.useMemo)(()=>r?me.find(e=>e.name===r)??null:null,[r,me]),Se=(0,_.useMemo)(()=>{let e=new Map;for(let t of me){let n=vr(t.name,h);e.set(n,(e.get(n)??0)+1)}let t=new Set;for(let[n,r]of e.entries())r>1&&t.add(n);return t},[me,h]);if(me.length===0)return(0,z.jsx)(Xr,{onAddProvider:o});let Ce=[{key:`ready`,label:h(`pws.status.ready`),count:fe.ready.length},{key:`needsSetup`,label:h(`pws.status.needsSetup`),count:fe.needsSetup.length},{key:`disabled`,label:h(`prov.disabledBadge`),count:fe.disabled.length}],we=[{id:`ready`,label:h(`pws.status.ready`),count:ve.ready.length,ariaLabel:h(`pws.groupReady`,{count:ve.ready.length}),items:ve.ready},{id:`needs-setup`,label:h(`pws.status.needsSetup`),count:ve.needsSetup.length,ariaLabel:h(`pws.groupNeedsSetup`,{count:ve.needsSetup.length}),items:ve.needsSetup},{id:`disabled`,label:h(`prov.disabledBadge`),count:ve.disabled.length,ariaLabel:h(`pws.groupDisabled`,{count:ve.disabled.length}),items:ve.disabled}],Te=we.flatMap(e=>e.items.map(e=>e.name)),Ee=k&&Te.includes(k)?k:r&&Te.includes(r)?r:Te[0]??null;return(0,z.jsx)(`div`,{className:`pws-shell-container`,children:(0,z.jsxs)(`div`,{className:`pws-root`,children:[(0,z.jsxs)(`aside`,{className:`pws-rail`,"aria-label":h(`pws.providerList`),children:[(0,z.jsxs)(`div`,{className:`pws-search-row`,children:[(0,z.jsxs)(`div`,{className:`pws-search-wrap`,children:[(0,z.jsx)(de,{className:`pws-search-icon`,width:14,height:14,"aria-hidden":`true`}),(0,z.jsx)(`input`,{type:`search`,className:`input pws-search-input`,placeholder:h(`pws.searchPlaceholder`),value:g,onChange:e=>v(e.target.value),"aria-label":h(`pws.searchPlaceholder`)})]}),(0,z.jsxs)(`div`,{className:`pws-filter-wrap`,ref:ue,children:[(0,z.jsxs)(`button`,{type:`button`,className:`pws-filter-btn${ye||D?` pws-filter-btn--active`:``}`,onClick:()=>O(e=>!e),"aria-label":h(`pws.filterAria`),"aria-expanded":D,"aria-controls":`pws-provider-filters`,children:[(0,z.jsx)(je,{width:18,height:18,"aria-hidden":`true`}),ye&&(0,z.jsx)(`span`,{className:`pws-filter-dot`,"aria-hidden":`true`})]}),D&&(0,z.jsxs)(`div`,{id:`pws-provider-filters`,className:`pws-filter-menu`,role:`group`,"aria-label":h(`pws.providerFiltersAria`),children:[(0,z.jsx)(`div`,{className:`pws-filter-title`,children:h(`pws.filters`)}),(0,z.jsx)(`div`,{className:`pws-filter-head`,children:h(`pws.filterStatus`)}),Ce.map(({key:e,label:t,count:n})=>(0,z.jsxs)(`label`,{className:`pws-filter-option`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:y[e],onChange:()=>b(t=>({...t,[e]:!t[e]}))}),(0,z.jsx)(`span`,{className:`pws-filter-label`,children:t}),(0,z.jsx)(`span`,{className:`pws-filter-count`,children:n})]},e)),(0,z.jsx)(`div`,{className:`pws-filter-head`,children:h(`pws.pricing`)}),(0,z.jsxs)(`label`,{className:`pws-filter-option`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:x.free,onChange:()=>S(e=>({...e,free:!e.free}))}),(0,z.jsx)(`span`,{className:`pws-filter-label`,children:h(`modal.badge.free`)}),(0,z.jsx)(`span`,{className:`pws-filter-count`,children:he})]}),(0,z.jsxs)(`label`,{className:`pws-filter-option`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:x.paid,onChange:()=>S(e=>({...e,paid:!e.paid}))}),(0,z.jsx)(`span`,{className:`pws-filter-label`,children:h(`pws.paid`)}),(0,z.jsx)(`span`,{className:`pws-filter-count`,children:ge})]}),(0,z.jsx)(`div`,{className:`pws-filter-head`,children:h(`pws.filterType`)}),[{key:`cloud`,label:h(`pws.type.cloud`),count:_e.cloud},{key:`local`,label:h(`pws.type.local`),count:_e.local},{key:`selfHosted`,label:h(`pws.type.selfHosted`),count:_e.selfHosted},{key:`login`,label:h(`pws.type.login`),count:_e.login}].map(({key:e,label:t,count:n})=>(0,z.jsxs)(`label`,{className:`pws-filter-option`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:C[e],onChange:()=>w(t=>({...t,[e]:!t[e]}))}),(0,z.jsx)(`span`,{className:`pws-filter-label`,children:t}),(0,z.jsx)(`span`,{className:`pws-filter-count`,children:n})]},e)),(0,z.jsx)(`div`,{className:`pws-filter-head`,children:h(`pws.sort`)}),(0,z.jsx)(`div`,{className:`pws-sort-grid`,role:`group`,"aria-label":h(`pws.sortProvidersAria`),children:Jr.map(e=>(0,z.jsx)(`button`,{type:`button`,className:`pws-sort-btn${T===e.id?` pws-sort-btn--active`:``}`,onClick:()=>E(e.id),"aria-pressed":T===e.id,children:h(e.labelKey)},e.id))}),(0,z.jsx)(`div`,{className:`pws-filter-footer`,children:(0,z.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:be,disabled:!ye,children:h(`pws.resetAll`)})})]})]})]}),(0,z.jsxs)(`div`,{className:`pws-rail-list`,role:`listbox`,"aria-label":h(`pws.providersAria`),onKeyDown:e=>{let t=Array.from(e.currentTarget.querySelectorAll(`[role="option"]`));if(t.length===0)return;let n=document.activeElement,r=t.findIndex(e=>e===n||e.contains(n));if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let n=e.key===`ArrowDown`?1:-1;t[r<0?n>0?0:t.length-1:(r+n+t.length)%t.length]?.focus();return}if(e.key===`Home`){e.preventDefault(),t[0]?.focus();return}e.key===`End`&&(e.preventDefault(),t[t.length-1]?.focus())},children:[Object.values(ve).every(e=>e.length===0)&&(0,z.jsx)(`span`,{className:`muted pws-rail-empty`,role:`status`,children:h(g?`pws.noSearchResults`:ye?`pws.noMatchFilters`:`pws.noProvidersConfigured`)}),we.map(({id:e,label:t,count:o,ariaLabel:s,items:c})=>c.length===0?null:(0,z.jsxs)(`div`,{className:`pws-rail-group`,role:`group`,"aria-label":s,children:[(0,z.jsxs)(`div`,{className:`pws-rail-group-head`,"aria-hidden":`true`,children:[(0,z.jsx)(`span`,{className:`pws-rail-group-label`,children:t}),(0,z.jsx)(`span`,{className:`pws-rail-group-count`,children:o})]}),c.map(e=>(0,z.jsxs)(`div`,{className:`pws-rail-row-wrap`,children:[(0,z.jsx)(wr,{item:e,selected:r===e.name,tabbable:Ee===e.name,modelCount:j[e.name],isDefault:n===e.name,showConfigId:Se.has(vr(e.name,h)),onClick:()=>i(e.name),onFocus:()=>A(e.name)}),a&&(0,z.jsx)(`button`,{type:`button`,className:`pws-rail-row-remove`,tabIndex:-1,"aria-hidden":`true`,onClick:t=>{t.stopPropagation(),a(e.name)},title:h(`pws.removeConfirmTitle`),children:(0,z.jsx)(le,{width:14,height:14})})]},e.name))]},e))]})]}),(0,z.jsx)(`main`,{className:`pws-main`,"aria-label":h(`pws.workspaceMainAria`),children:c?.open?(0,z.jsx)(qr,{editor:c,providerName:h(`nav.providers`),saving:l,onSave:()=>{c.onSave()}}):xe?m?.(xe,{usageTotals:G[xe.name],modelUsage:ne[xe.name],quotaReport:re[xe.name],availableModels:N[xe.name]??[],hasLiveModels:(F[xe.name]??0)>0,selectedModels:L[xe.name]??[],modelsLoading:B,modelsLoadFailed:H,onRetryModels:pe})??(0,z.jsxs)(`div`,{className:`pws-detail-placeholder`,children:[(0,z.jsx)(`h3`,{children:vr(xe.name,h)}),(0,z.jsx)(`p`,{className:`muted`,children:h(`pws.detailComingSoon`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>i(null),children:h(`modal.back`)})]}):(0,z.jsx)(Gr,{sections:fe,quotaReports:re,usageTotals:G,usageLoading:ae,quotasLoading:q,onSelectProvider:e=>i(e),onEditConfig:s})})]})})}function Xr({onAddProvider:e}){let t=Y();return(0,z.jsx)(`div`,{className:`pws-empty-root`,children:(0,z.jsxs)(`div`,{className:`pws-empty-hero`,children:[(0,z.jsx)(`div`,{"aria-hidden":`true`,children:(0,z.jsx)(U,{style:{width:64,height:64}})}),(0,z.jsx)(`h2`,{children:t(`pws.connectFirst`)}),(0,z.jsxs)(`div`,{className:`pws-empty-tiles`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`pws-empty-tile`,onClick:()=>e({tier:`free`}),children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,children:(0,z.jsx)(Ee,{width:18,height:18})}),(0,z.jsx)(`span`,{className:`pws-empty-tile-label`,children:t(`pws.empty.browseFree`)}),(0,z.jsx)(`span`,{className:`pws-empty-tile-desc muted`,children:t(`pws.empty.browseFreeDesc`)})]}),(0,z.jsxs)(`button`,{type:`button`,className:`pws-empty-tile`,onClick:()=>e({tier:`accounts`}),children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,children:(0,z.jsx)(be,{width:18,height:18})}),(0,z.jsx)(`span`,{className:`pws-empty-tile-label`,children:t(`pws.empty.connectAccount`)}),(0,z.jsx)(`span`,{className:`pws-empty-tile-desc muted`,children:t(`pws.empty.connectAccountDesc`)})]}),(0,z.jsxs)(`button`,{type:`button`,className:`pws-empty-tile`,onClick:()=>e({custom:!0}),children:[(0,z.jsx)(`span`,{"aria-hidden":`true`,children:(0,z.jsx)(ye,{width:18,height:18})}),(0,z.jsx)(`span`,{className:`pws-empty-tile-label`,children:t(`pws.empty.addEndpoint`)}),(0,z.jsx)(`span`,{className:`pws-empty-tile-desc muted`,children:t(`pws.empty.addEndpointDesc`)})]})]})]})})}function Zr(e){if(Hn(e.name,e))return`codex-accounts`;let t=(e.authMode??``).toLowerCase();if(t===`forward`||t===`local`||Xn(e))return null;if(t===`oauth`)return`oauth-accounts`;let n=e.hasApiKey===!0;return!(t===`key`||n||t===``)||e.keyOptional===!0&&!n?null:`api-keys`}function Qr(e,t,n){let r=t.alias?.trim();if(r)return r;let i=t.email?.trim();if(i)return i;let a=e.findIndex(e=>e.id===t.id);return n(`pws.accountOrdinal`,{count:String(a>=0?a+1:1)})}function $r({item:e,usageTotals:t,quotaReport:n,oauthEmail:r,apiBase:i,connectionIdentity:a,onEditSettings:o,onViewUsage:s,onUpdateProvider:c,onReauthenticate:l,onCancelLogin:u,reauthBusy:d=!1,accountPanel:f}){let p=Y(),{locale:m}=ze(),h=or(p),g=Jn(e),v=!!e.activeNeedsReauth,y=p(g===`ready`?`pws.status.connected`:g===`needs-setup`?v?`pws.status.needsAttention`:`pws.status.needsSetup`:`prov.disabledBadge`),b=t?.requests,x=t?.totalTokens,S=Tr(n),C=JSON.stringify([i??null,e.name,e.adapter,e.baseUrl,e.authMode??null,e.apiKeyTransport??null,e.liveModels??null,e.disabled===!0,e.hasApiKey===!0,e.hasHeaders===!0,e.allowPrivateNetwork===!0,e.keyOptional===!0,e.activeNeedsReauth===!0,a??null]),[w,T]=(0,_.useState)(null),E=(0,_.useRef)(null),D=w?.key===C&&w.testing,O=w?.key===C?w.result:null;(0,_.useEffect)(()=>()=>{E.current?.key===C&&(E.current.controller.abort(),E.current=null)},[C]);let k=(0,_.useCallback)(async()=>{if(!i)return;E.current?.controller.abort();let t=new AbortController;E.current={key:C,controller:t},T({key:C,testing:!0,result:null});try{let n=await ct(await fetch(`${i}/api/providers/test?name=${encodeURIComponent(e.name)}`,{method:`POST`,signal:t.signal}),p(`pws.connectionFailed`));if(!n)throw Error(p(`pws.connectionFailed`));t.signal.aborted||T({key:C,testing:!1,result:n})}catch(e){t.signal.aborted||T({key:C,testing:!1,result:{applicable:!0,ok:!1,error:e instanceof Error?e.message:p(`pws.connectionFailed`)}})}finally{E.current?.controller===t&&(E.current=null)}},[i,C,e.name,p]),A=O?.applicable===!1?`not-applicable`:O?.ok===!0?`ok`:`failed`,j=O?.applicable===!1?p(`pws.connectionNotApplicable`):O?.ok===!0?O.message||p(`pws.connectionOk`):O?.error||p(`pws.connectionFailed`);return(0,z.jsxs)(`div`,{className:`pws-overview-layout`,children:[(0,z.jsxs)(`div`,{className:`pws-overview-main`,children:[(0,z.jsxs)(`section`,{className:`pws-section`,"aria-label":p(`pws.connection`),children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:p(`pws.connection`)}),(0,z.jsxs)(`dl`,{className:`pws-kv`,children:[(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:p(`dash.status`)}),(0,z.jsxs)(`dd`,{className:g===`ready`?`pws-status-ok`:`pws-status-warn`,children:[g===`ready`?(0,z.jsx)(ie,{style:{width:13,height:13},"aria-hidden":`true`}):(0,z.jsx)(J,{style:{width:13,height:13},"aria-hidden":`true`}),y]})]}),(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:p(`modal.baseUrl`)}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(`code`,{children:e.baseUrl?.trim()?e.baseUrl:`—`})})]}),(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:p(`pws.cell.auth`)}),(0,z.jsx)(`dd`,{children:r?`${xr(e,p)} · ${r}`:xr(e,p)})]}),(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:p(`modal.defaultModel`)}),(0,z.jsx)(`dd`,{children:e.defaultModel??(0,z.jsx)(`span`,{className:`muted`,children:`—`})})]}),e.note&&(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:p(`pws.cell.note`)}),(0,z.jsx)(`dd`,{className:`muted`,children:e.note})]})]}),i&&(0,z.jsxs)(`div`,{className:`row`,style:{marginTop:12,alignItems:`center`},children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:D,onClick:()=>void k(),children:p(D?`pws.testing`:`pws.testConnection`)}),O&&(0,z.jsx)(`span`,{role:`status`,className:A===`ok`?`pws-status-ok`:A===`failed`?`pws-status-warn`:`muted`,"data-connection-test-state":A,children:j})]}),o&&(0,z.jsx)(`button`,{type:`button`,className:`link-btn pws-edit-settings-link`,onClick:o,children:p(`pws.editSettings`)})]}),f?(0,z.jsx)(`section`,{className:`pws-section`,"aria-label":p(`pws.availableAccounts`),children:f}):(0,z.jsxs)(`section`,{className:`pws-section`,"aria-label":p(`pws.authSummary`),children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:p(`pws.authSummary`)}),v?(0,z.jsxs)(`div`,{className:`pws-auth-summary pws-auth-summary--warn`,role:`status`,children:[(0,z.jsx)(J,{style:{width:14,height:14},"aria-hidden":`true`}),(0,z.jsxs)(`div`,{className:`pws-auth-summary-body`,children:[(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`strong`,{children:p(`pws.status.needsAttention`)}),` — `,e.authMode===`forward`?p(`pws.attention.reauthForward`):p(`pws.attention.reauth`)]}),l&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:d,onClick:()=>l(),children:p(d?`prov.waitingBrowser`:`pws.reauthenticate`)}),d&&u&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>u(),children:p(`common.cancel`)})]})]}):(0,z.jsxs)(`div`,{className:`pws-auth-summary`,children:[(0,z.jsx)(`span`,{className:`pws-auth-dot`}),(0,z.jsx)(`span`,{children:e.authMode===`forward`?p(`pws.passthrough`):e.authMode===`oauth`?r?p(`pws.loggedInAs`,{email:r}):p(`pws.notLoggedIn`):e.hasApiKey?p(`pws.apiKeyConfigured`):xr(e,p)})]})]})]}),(0,z.jsxs)(`aside`,{className:`pws-overview-sidebar`,children:[(0,z.jsxs)(`section`,{className:`pws-section`,"aria-label":p(`pws.statsAria`),children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:p(`pws.statsTitle`)}),(0,z.jsxs)(`dl`,{className:`pws-kv`,children:[typeof b==`number`&&(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:p(`pws.stats.totalRequests`)}),(0,z.jsx)(`dd`,{className:`pws-kv-mono`,children:lr(b,m)})]}),typeof x==`number`&&(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:p(`pws.stats.totalTokens`)}),(0,z.jsx)(`dd`,{className:`pws-kv-mono`,children:ur(x,m)})]}),n&&(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:p(`pws.stats.quotaUpdated`)}),(0,z.jsx)(`dd`,{className:`pws-kv-mono`,title:n.source?Er(n.source):void 0,children:ar(n.updatedAt,h)})]}),typeof b!=`number`&&typeof x!=`number`&&!n&&(0,z.jsx)(`div`,{className:`muted`,children:p(`pws.usageUnavailable`)})]}),s&&(0,z.jsxs)(`button`,{type:`button`,className:`link-btn pws-view-usage-link`,onClick:s,children:[p(`pws.viewUsage`),` →`]}),S&&(0,z.jsx)(`div`,{className:`muted pws-stats-note`,children:p(`pws.stats.quotaTracked`)})]}),(0,z.jsx)(ei,{item:e,onUpdateProvider:c})]})]})}function ei({item:e,onUpdateProvider:t}){let n=Y(),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(``),d=(0,_.useRef)(null);(0,_.useEffect)(()=>{r&&d.current?.focus()},[r]);let f=(0,_.useCallback)(async()=>{if(s||!t)return;let r=a.trim();if(r===(e.note??``)){i(!1),u(``);return}c(!0);try{let a=await t(e.name,{note:r||void 0});if(!a.ok){u(a.error||n(`prov.saveFailed`));return}u(``),i(!1)}finally{c(!1)}},[a,e.name,e.note,t,s,n]);return r?(0,z.jsxs)(`section`,{className:`pws-section pws-notes-section`,"aria-label":n(`pws.notes`),children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:n(`pws.notes`)}),(0,z.jsx)(`textarea`,{ref:d,className:`pws-notes-textarea`,value:a,onChange:e=>o(e.target.value),onBlur:()=>void f(),onKeyDown:t=>{t.key===`Escape`&&(o(e.note??``),u(``),i(!1))},placeholder:n(`pws.notePlaceholder`),rows:3,disabled:s}),l?(0,z.jsx)(`p`,{className:`pws-inline-error`,role:`alert`,children:l}):null]}):(0,z.jsxs)(`section`,{className:`pws-section pws-notes-section`,"aria-label":n(`pws.notes`),children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:n(`pws.notes`)}),(0,z.jsx)(`button`,{type:`button`,className:`pws-notes-display`,onClick:()=>{t&&(o(e.note??``),u(``),i(!0))},disabled:!t,children:e.note||(0,z.jsx)(`span`,{className:`muted`,children:n(`pws.notePlaceholder`)})})]})}function ti(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ni(e){if(!Array.isArray(e)||e.some(e=>typeof e!=`string`))throw Error(`invalid model list`);return[...new Set(e)]}function ri(e){if(!ti(e))throw Error(`invalid selected models response`);let t=e.selected;if(!ti(t))throw Error(`invalid selected models response`);return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,ni(t)]))}async function ii(e,t=fetch){let n=await t(`${e}/api/selected-models`);if(!n.ok)throw Error(`selected models HTTP ${n.status}`);return ri(await n.json())}function ai(e,t,n,r=!1){if(r)return!0;let i=e[t];return!i||i.length===0||i.includes(n)}function oi(e,t,n,r,i){return ai(e,t,n,r)&&!i}async function si(e,t,n,r,i,a=fetch){return a(`${e}/api/model-visibility`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scope:t,provider:n,targets:r,enabled:i})})}function ci(e,t){return e===t}function li(e,t){switch(t.reason){case`http`:return e(`models.discoveryFailedHttp`,{status:t.httpStatus});case`blocked`:return e(`models.discoveryFailedBlocked`);case`invalid_response`:return e(`models.discoveryFailedInvalidResponse`);case`network`:return e(`models.discoveryFailedNetwork`);case`provider`:return e(`models.discoveryFailedProvider`);default:return e(`models.discoveryFailedGeneric`)}}var ui=Array.from({length:18},(e,t)=>1e5+t*5e4),di=new Set(ui),fi=`custom`,pi=[4,8,16,32,64,128,256,500,1e3],mi=new Set(pi),hi=`ocx-models-collapsed:v2`,gi=`ocx-models-combos-open:v1`;function _i(e){return!Number.isFinite(e)||e<=0?String(e):e%1e3==0?`${e/1e3}k`:e.toLocaleString()}function vi(e){let t=new Set;for(let n of e)n.disabled&&t.add(n.namespaced);return t}function yi(e,t,n){let r=[];for(let i of e){let e=t.has(i.id)||t.has(i.namespaced);oi(n,i.provider,i.id,i.native===!0,e)&&r.push({value:i.namespaced,label:i.namespaced})}return r}function bi(e=localStorage){try{let t=e.getItem(hi);if(t===null)return null;let n=JSON.parse(t);return Array.isArray(n)?new Set(n.filter(e=>typeof e==`string`)):null}catch{return null}}function xi(e,t=localStorage){try{t.setItem(hi,JSON.stringify([...e]))}catch{}}function Si(e=localStorage){try{return(e.getItem(`ocx-models-combos-open:v1`)??e.getItem(`ocx-models-combos-open`))===`1`}catch{return!1}}function Ci(e,t=localStorage){try{t.setItem(gi,e?`1`:`0`)}catch{}}var wi=[{value:`100000`,label:`100k`},{value:`128000`,label:`128k`},{value:`200000`,label:`200k`},{value:`256000`,label:`256k`},{value:`272000`,label:`272k`},{value:`352000`,label:`352k`},{value:`500000`,label:`500k`},{value:`1000000`,label:`1M`}];function Ti(e,t){if(!Array.isArray(e))throw Error(`Invalid custom model list`);return e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let n=e;if(n.provider!==t||typeof n.modelId!=`string`||!n.modelId.trim())return[];let r=Array.isArray(n.inputModalities)?n.inputModalities.filter(e=>typeof e==`string`):void 0;return[{id:typeof n.id==`string`&&n.id?n.id:`local-${n.modelId}`,modelId:n.modelId.trim(),...typeof n.displayName==`string`&&n.displayName.trim()?{displayName:n.displayName.trim()}:{},...typeof n.contextWindow==`number`&&n.contextWindow>0?{contextWindow:Math.floor(n.contextWindow)}:{},...r&&r.length>0?{inputModalities:r}:{}}]})}function Ei(e){let t=Number(e.replace(/[_,\s]/g,``));return Number.isFinite(t)&&t>0?Math.floor(t):void 0}function Di({item:e,apiBase:t,availableModels:n,hasLiveModels:r,selectedModels:i,modelsLoading:a=!1,modelsLoadFailed:o=!1,needsReauth:s=!1,onRetryModels:c,onOpenAccounts:l}){let u=Y(),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)([]),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(0),[S,C]=(0,_.useState)(``),[w,T]=(0,_.useState)(``),[E,D]=(0,_.useState)(!1),[O,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(`add`),[M,N]=(0,_.useState)(``),[P,F]=(0,_.useState)(``),[I,L]=(0,_.useState)(``),[R,B]=(0,_.useState)(``),[V,H]=(0,_.useState)(!1),[U,W]=(0,_.useState)([`text`]),[ee,G]=(0,_.useState)(``),[te,ne]=(0,_.useState)(null),K=(0,_.useRef)(null),re=(0,_.useMemo)(()=>new Set(i),[i]),ie=(0,_.useMemo)(()=>e.models??[],[e.models]),ae=(0,_.useMemo)(()=>p.map(e=>e.modelId),[p]),oe=(0,_.useMemo)(()=>new Map(p.map(e=>[e.modelId,e])),[p]),q=(0,_.useMemo)(()=>Dr(n,e.defaultModel,d,ie,ae,r),[n,e.defaultModel,d,ie,ae,r]);(0,_.useEffect)(()=>{let n=!0;return(async()=>{try{let r=await fetch(`${t}/api/custom-models`);if(!r.ok)throw Error();let i=await r.json();if(!n)return;m(Ti(i,e.name)),y(!1),C(``),g(!0)}catch{if(!n)return;m([]),g(!1),y(!0),C(u(`models.networkError`))}})(),()=>{n=!1}},[t,e.name,u,b]);let se=()=>{g(!1),y(!1),C(``),x(e=>e+1)};(0,_.useEffect)(()=>()=>{K.current!=null&&window.clearTimeout(K.current)},[]);let ce=async e=>{try{await navigator.clipboard.writeText(e),ne(e),K.current!=null&&window.clearTimeout(K.current),K.current=window.setTimeout(()=>{ne(t=>t===e?null:t),K.current=null},1200)}catch{}},le=()=>{j(`add`),N(``),F(``),L(``),B(``),H(!1),W([`text`]),G(``),T(``),k(!0)},J=e=>{j(`edit`),N(e.id),F(e.modelId),L(e.displayName??``),B(e.contextWindow?String(e.contextWindow):``),H(!!(e.contextWindow&&!wi.some(t=>t.value===String(e.contextWindow)))),W(e.inputModalities?.length?[...e.inputModalities]:[`text`]),G(``),T(``),k(!0)},ue=P.trim(),de=A===`edit`?p.find(e=>e.id===M)?.modelId:void 0,fe=ue?ue.includes(`/`)?!0:de&&ue===de?!1:!!(p.some(e=>e.modelId===ue&&e.id!==M)||n.includes(ue)||ie.includes(ue)||e.defaultModel===ue):!1,pe=!h||!ue||fe||A===`edit`&&!M,me=async()=>{if(pe||E)return;D(!0),G(``),C(``),T(``);let n=I.trim(),r=Ei(R),i=U.length>0?U:void 0;try{if(A===`add`){let a=await fetch(`${t}/api/custom-models`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e.name,modelId:ue,...n?{displayName:n}:{},...r?{contextWindow:r}:{},...i?{inputModalities:i}:{}})});if(!a.ok){G(u(`models.customSaveFailed`));return}let o=await a.json().catch(()=>null),s=o&&typeof o==`object`?Ti([{...o,provider:e.name}],e.name)[0]:void 0;m(e=>e.some(e=>e.modelId===ue)?e:[...e,s??{id:`local-${ue}`,modelId:ue,...n?{displayName:n}:{},...r?{contextWindow:r}:{},...i?{inputModalities:i}:{}}]),k(!1),T(u(`models.customAdded`)),c?.()}else{let a=await fetch(`${t}/api/custom-models/${encodeURIComponent(M)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({modelId:ue,displayName:n,contextWindow:r??null,inputModalities:U})});if(!a.ok){G(u(`models.customSaveFailed`));return}let o=await a.json().catch(()=>null),s=o&&typeof o==`object`?Ti([{...o,provider:e.name}],e.name)[0]:void 0;m(e=>e.map(e=>e.id===M?s??{id:e.id,modelId:ue,...n?{displayName:n}:{},...r?{contextWindow:r}:{},...i?{inputModalities:i}:{}}:e)),k(!1),T(u(`models.customUpdated`)),c?.()}}catch{G(u(`models.networkError`))}finally{D(!1)}},he=async e=>{if(window.confirm(u(`models.customDeleteConfirm`,{name:e.displayName??e.modelId}))){C(``),T(``);try{if(!(await fetch(`${t}/api/custom-models/${encodeURIComponent(e.id)}`,{method:`DELETE`})).ok){C(u(`models.customSaveFailed`));return}m(t=>t.filter(t=>t.id!==e.id)),T(u(`models.customDeleted`)),c?.()}catch{C(u(`models.networkError`))}}},ge=n.length===0&&ie.length===0&&ae.length===0&&!e.defaultModel,_e=n.length===0&&ie.length>0,ve=q.length>300,ye=ve?q.slice(0,300):q;return(0,z.jsxs)(`div`,{className:`pws-section`,children:[(0,z.jsxs)(`div`,{className:`pws-section-head`,children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:u(`pws.tab.models`)}),(0,z.jsxs)(`div`,{className:`row`,style:{gap:8,alignItems:`center`},children:[q.length>0&&(0,z.jsx)(`span`,{className:`muted`,children:u(`pws.modelsAvailable`,{count:q.length})}),p.length>0&&(0,z.jsx)(`span`,{className:`muted text-label`,children:u(`models.customSummary`,{count:p.length})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:le,disabled:!h||E,"aria-label":u(`models.customAdd`),"aria-haspopup":`dialog`,children:u(`models.customAddBtn`)})]})]}),s&&(0,z.jsxs)(`div`,{className:`pws-inline-error`,role:`status`,children:[(0,z.jsx)(`span`,{children:u(`pws.modelsNeedsReauth`)}),l&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:l,children:u(`pws.tab.accounts`)})]}),_e&&!s&&(0,z.jsx)(`p`,{className:`muted text-label`,style:{marginBottom:10},children:u(`pws.modelsConfiguredFallback`)}),w&&(0,z.jsx)(`p`,{className:`muted text-label`,role:`status`,children:w}),S&&(0,z.jsxs)(`p`,{className:`pws-inline-error`,role:`alert`,children:[S,v&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:se,style:{marginLeft:8},children:u(`common.retry`)})]}),!ge&&(0,z.jsx)(`input`,{type:`search`,className:`input pws-model-search`,placeholder:u(`pws.modelSearchPlaceholder`),value:d,onChange:e=>f(e.target.value),"aria-label":u(`pws.modelSearchPlaceholder`)}),a&&ge?(0,z.jsx)(`p`,{className:`muted`,role:`status`,children:u(`pws.modelsLoading`)}):o&&ge?(0,z.jsxs)(`div`,{role:`alert`,className:`pws-inline-error`,children:[(0,z.jsx)(`span`,{children:u(`pws.modelsLoadFailed`)}),c&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:c,children:u(`pws.retry`)})]}):ge?(0,z.jsx)(`p`,{className:`muted`,children:u(`pws.noModels`)}):q.length===0?(0,z.jsx)(`p`,{className:`muted`,role:`status`,children:u(`pws.noModelMatch`)}):(0,z.jsx)(`ul`,{className:`pws-model-list`,children:ye.map(t=>{let n=t===e.defaultModel,r=re.has(t),i=oe.get(t),a=te===t;return(0,z.jsxs)(`li`,{className:`pws-model-chip`,children:[(0,z.jsx)(`button`,{type:`button`,className:`pws-model-chip-main`,onClick:()=>{ce(t)},title:i?.displayName?`${t} (${i.displayName})`:t,"aria-label":u(a?`pws.modelCopied`:`pws.copyModelId`),children:(0,z.jsx)(`span`,{className:`pws-model-id`,children:t})}),i?(0,z.jsx)(`span`,{className:`badge badge-muted pws-model-flag`,children:u(`models.customBadge`)}):null,n?(0,z.jsx)(`span`,{className:`badge badge-muted pws-model-flag`,children:u(`prov.defaultBadge`)}):null,r?(0,z.jsx)(`span`,{className:`badge badge-accent pws-model-flag`,children:u(`pws.selected`)}):null,i&&(0,z.jsxs)(`span`,{className:`pws-model-chip-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,onClick:()=>J(i),disabled:E||!h,children:u(`models.customEdit`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,style:{color:`var(--red)`},onClick:()=>{he(i)},disabled:E||!h,children:u(`models.customDelete`)})]})]},t)})}),ve&&(0,z.jsx)(`p`,{className:`muted text-label`,style:{marginTop:10},children:u(`pws.modelsTruncated`,{shown:`300`,total:String(q.length)})}),O&&(0,z.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":u(A===`add`?`models.customAdd`:`models.customEdit`),onClick:()=>{E||k(!1)},onKeyDown:e=>{e.key===`Escape`&&!E&&k(!1)},children:(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{children:u(A===`add`?`models.customAddTitle`:`models.customEditTitle`,{provider:e.name})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>k(!1),disabled:E,"aria-label":u(`common.close`),children:`×`})]}),ee&&(0,z.jsx)(X,{tone:`err`,children:ee}),(0,z.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,z.jsxs)(`label`,{className:`text-label`,style:{display:`flex`,flexDirection:`column`,gap:4},children:[u(`models.customFieldModelId`),(0,z.jsx)(`input`,{className:`input`,value:P,onChange:e=>F(e.target.value),disabled:E,placeholder:u(`models.customFieldModelIdPlaceholder`),"aria-label":u(`models.customAdd`),autoFocus:!0})]}),(0,z.jsxs)(`label`,{className:`text-label`,style:{display:`flex`,flexDirection:`column`,gap:4},children:[u(`models.customFieldDisplayName`),(0,z.jsx)(`input`,{className:`input`,value:I,onChange:e=>L(e.target.value),disabled:E,placeholder:u(`models.customFieldDisplayNamePlaceholder`)})]}),(0,z.jsxs)(`label`,{className:`text-label`,style:{display:`flex`,flexDirection:`column`,gap:4},children:[u(`models.customFieldContext`),(0,z.jsxs)(`div`,{className:`row`,style:{gap:6},children:[(0,z.jsx)(rt,{value:V?`custom`:R,options:[{value:``,label:`—`},...wi.map(e=>({value:e.value,label:e.label})),{value:`custom`,label:u(`models.custom`)}],onChange:e=>{if(e===`custom`){H(!0);return}H(!1),B(e)},disabled:E,label:u(`models.customFieldContext`)}),V&&(0,z.jsx)(`input`,{className:`input`,style:{width:120},inputMode:`numeric`,value:R,onChange:e=>B(e.target.value),disabled:E,placeholder:u(`models.customPlaceholder`),"aria-label":u(`models.customFieldContext`)})]})]}),(0,z.jsxs)(`div`,{className:`text-label`,style:{display:`flex`,flexDirection:`column`,gap:4},children:[u(`models.customFieldModalities`),(0,z.jsx)(`div`,{className:`row`,style:{gap:8},children:[`text`,`image`,`audio`].map(e=>(0,z.jsxs)(`label`,{className:`row`,style:{gap:4,cursor:`pointer`},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:U.includes(e),onChange:t=>{W(n=>t.target.checked?[...n,e]:n.filter(t=>t!==e))},disabled:E}),(0,z.jsx)(`span`,{className:`text-control`,children:e})]},e))})]})]}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>k(!1),disabled:E,children:u(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:E||pe,onClick:()=>{me()},children:u(E?`models.customSaving`:A===`add`?`models.customAddBtn`:`models.customEditBtn`)})]})]})})]})}function Oi({item:e,usageTotals:t,quotaReport:n,modelUsage:r}){let i=Y(),{locale:a}=ze(),o=or(i),s=t?.requests!==void 0,c=Tr(n),[l,u]=(0,_.useState)(null),d=(0,_.useMemo)(()=>r?.length?r.toSorted((e,t)=>t.totalTokens-e.totalTokens):[],[r]),f=(0,_.useMemo)(()=>{if(!d.length)return;let e=0,t=!1;for(let n of d)n.estimatedCostUsd!==void 0&&(e+=n.estimatedCostUsd,t=!0);return t?e:void 0},[d]);return(0,z.jsxs)(`div`,{className:`pws-section`,children:[(0,z.jsxs)(`div`,{className:`pws-usage-block`,children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:i(`pws.usageLast30d`)}),s?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`pws-usage-metrics pws-usage-metrics-3`,role:`group`,"aria-label":i(`pws.usageLast30d`),children:[(0,z.jsxs)(`div`,{className:`pws-usage-metric`,children:[(0,z.jsx)(`span`,{className:`pws-usage-metric-value mono`,children:dr(f,a)}),(0,z.jsx)(`span`,{className:`muted pws-usage-metric-label`,children:i(`pws.estimatedCost`)})]}),(0,z.jsxs)(`div`,{className:`pws-usage-metric`,children:[(0,z.jsx)(`span`,{className:`pws-usage-metric-value`,children:lr(t?.requests,a)}),(0,z.jsx)(`span`,{className:`muted pws-usage-metric-label`,children:i(`pws.metricRequests`)})]}),(0,z.jsxs)(`div`,{className:`pws-usage-metric`,children:[(0,z.jsx)(`span`,{className:`pws-usage-metric-value`,children:ur(t?.totalTokens,a)}),(0,z.jsx)(`span`,{className:`muted pws-usage-metric-label`,children:i(`pws.metricTokens`)})]})]}),(0,z.jsx)(`p`,{className:`muted pws-cost-disclaimer`,children:i(`pws.costDisclaimer`)})]}):(0,z.jsx)(`p`,{className:`muted`,children:i(`pws.usageUnavailable`)})]}),d.length>0&&(0,z.jsxs)(`div`,{className:`pws-usage-block`,children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:i(`pws.modelBreakdown`)}),(0,z.jsx)(`div`,{className:`tbl-wrap`,children:(0,z.jsxs)(`table`,{className:`pws-model-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:i(`pws.col.model`)}),(0,z.jsx)(`th`,{className:`num`,children:i(`pws.col.cost`)}),(0,z.jsx)(`th`,{className:`num`,children:i(`pws.col.tokens`)}),(0,z.jsx)(`th`,{className:`num`,children:i(`pws.col.requests`)}),(0,z.jsx)(`th`,{children:i(`pws.col.share`)})]})}),(0,z.jsx)(`tbody`,{children:d.map(e=>{let t=e.model,n=l===t;return(0,z.jsxs)(_.Fragment,{children:[(0,z.jsxs)(`tr`,{className:`pws-model-row`,children:[(0,z.jsx)(`td`,{className:`mono`,children:(0,z.jsx)(`button`,{type:`button`,className:`pws-model-expand`,"aria-expanded":n,onClick:()=>u(n?null:t),children:e.model})}),(0,z.jsx)(`td`,{className:`num mono`,children:dr(e.estimatedCostUsd,a)}),(0,z.jsx)(`td`,{className:`num mono`,children:ur(e.totalTokens,a)}),(0,z.jsx)(`td`,{className:`num`,children:e.requests}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`div`,{className:`pws-share-bar`,children:(0,z.jsx)(`div`,{className:`pws-share-bar-fill`,style:{width:`${Math.round(e.shareRatio*100)}%`}})})})]}),n&&(0,z.jsx)(`tr`,{className:`pws-model-detail`,children:(0,z.jsx)(`td`,{colSpan:5,children:(0,z.jsxs)(`div`,{className:`pws-model-detail-grid`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`muted`,children:i(`pws.tokenInput`)}),(0,z.jsxs)(`span`,{className:`mono`,children:[` `,ur(e.inputTokens,a)]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`muted`,children:i(`pws.tokenOutput`)}),(0,z.jsxs)(`span`,{className:`mono`,children:[` `,ur(e.outputTokens,a)]})]})]})})})]},t)})})]})})]}),(0,z.jsxs)(`div`,{className:`pws-usage-block`,children:[(0,z.jsx)(`h3`,{className:`pws-section-title`,children:i(`pws.rateLimits`)}),c?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Br,{quota:c,plan:null,threshold:80,t:i,layout:`stacked`}),(0,z.jsxs)(`dl`,{className:`pws-kv pws-usage-meta`,children:[n?.source?.trim()&&(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:i(`pws.stats.source`)}),(0,z.jsx)(`dd`,{children:Er(n.source)})]}),(0,z.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,z.jsx)(`dt`,{children:i(`pws.stats.quotaUpdated`)}),(0,z.jsx)(`dd`,{children:ar(n?.updatedAt,o)})]})]})]}):(0,z.jsx)(`p`,{className:`muted`,children:i(`pws.quotaUnavailable`)})]})]})}function ki(e){if(!e)return null;let t=e.trim();return t?t.length<=4?`account-…`:`account-…${t.slice(-4)}`:null}function Ai(e){return ki(e)??`account-…`}function ji(e){return e===`healthy`?`ok`:e===`cooldown`?`muted`:e===`reauth_required`||e===`warning`?`warn`:`muted`}function Mi(e){let t=ji(e);return t===`ok`?`badge badge-green`:t===`warn`?`badge badge-amber`:`badge badge-muted`}function Ni(e){return e===`reauth_required`}function Pi(e){return!!e?.needsReauth||Ni(e?.health?.status)}function Fi(e){return e===`cooldown`}function Ii(e){return e===`warning`||e===`reauth_required`}function Li(e){if(!e||e.status===`healthy`)return null;if(e.status===`cooldown`)return e.reason===`rate_limit`?`pws.healthLabel.rateLimited`:`pws.healthLabel.quotaLimited`;if(e.status===`reauth_required`)return e.reason===`refresh_failed`?`pws.healthLabel.refreshFailed`:`pws.healthLabel.reauthRequired`;switch(e.reason){case`refresh_conflict`:return`pws.healthLabel.credentialConflict`;case`metadata_mismatch`:return`pws.healthLabel.metadataMismatch`;case`stale_credentials`:return`pws.healthLabel.refreshFailed`;default:return`pws.healthLabel.reauthRequired`}}function Ri(e,t){let n=Li(t);return n?e(n):null}function zi(e,t,n,r){if(!r||r.status===`healthy`)return null;let i=n===`__main__`?e(`codexAuth.mainAccount`):Ai(n);if(r.status===`cooldown`){let n=r.until?new Date(r.until).toLocaleString():``;return e(r.reason===`rate_limit`?`pws.healthSummary.rateLimited`:`pws.healthSummary.quotaLimited`,{provider:t,account:i,until:n})}return r.status===`reauth_required`?e(`pws.healthSummary.reauthRequired`,{provider:t,account:i}):r.reason===`refresh_conflict`?e(`pws.healthSummary.credentialConflict`,{provider:t,account:i}):r.reason===`metadata_mismatch`?e(`pws.healthSummary.metadataMismatch`,{provider:t,account:i}):e(`pws.healthSummary.staleCredentials`,{provider:t,account:i})}async function Bi(e){let t=navigator.clipboard?.writeText?.bind(navigator.clipboard);if(t)try{return await t(e),!0}catch{}return Vi(e)}function Vi(e){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.setAttribute(`aria-hidden`,`true`),t.style.position=`fixed`,t.style.top=`0`,t.style.opacity=`0`,document.body.appendChild(t);try{return t.select(),document.execCommand(`copy`)}catch{return!1}finally{t.remove()}}function Hi(e,t){return e(t?t===`copied`?`pws.doctorCopied`:`pws.doctorCopyUnavailable`:`pws.copyDoctor`)}var Ui=e=>({step:e?`oauth-waiting`:`pick`,id:``,error:``,authUrl:``,manualCode:``,manualCodeState:`idle`,statusNotice:``,statusTone:`ok`,flowId:null});function Wi(e,t){switch(t.type){case`set-step`:return{...e,step:t.step};case`set-id`:return{...e,id:t.id};case`set-error`:return{...e,error:t.error};case`set-auth-url`:return{...e,authUrl:t.authUrl};case`set-manual-code`:return{...e,manualCode:t.manualCode};case`set-manual-code-state`:return{...e,manualCodeState:t.manualCodeState};case`set-status-notice`:return{...e,statusNotice:t.statusNotice,statusTone:t.statusTone??e.statusTone};case`set-flow-id`:return{...e,flowId:t.flowId};case`clear-manual-code`:return{...e,manualCode:``,manualCodeState:`idle`,statusNotice:``,statusTone:`ok`};case`reset-oauth-start`:return{...e,error:``,statusNotice:``,statusTone:`ok`,flowId:null};case`oauth-code-submitted`:return{...e,error:``,manualCode:``,manualCodeState:`waiting`,statusTone:`ok`,statusNotice:``};default:return e}}function Gi({id:e,error:t,onIdChange:n,onStartOAuth:r,onClose:i}){let a=Y();return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`h3`,{style:{marginBottom:4},children:a(`codexAuth.addTitle`)}),(0,z.jsx)(`p`,{className:`modal-desc`,children:a(`codexAuth.addPickDesc`)}),(0,z.jsx)(`label`,{className:`field-label`,htmlFor:`codex-account-id-input`,children:a(`codexAuth.addIdLabel`)}),(0,z.jsx)(`input`,{id:`codex-account-id-input`,className:`input`,placeholder:a(`codexAuth.addIdPlaceholder`),value:e,onChange:e=>n(e.target.value),style:{marginBottom:12}}),(0,z.jsx)(`button`,{type:`button`,className:`list-row`,onClick:r,style:{marginBottom:8},children:(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,z.jsx)(Ee,{width:20}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`title`,children:a(`codexAuth.oauthLogin`)}),(0,z.jsx)(`div`,{className:`sub`,children:a(`codexAuth.oauthDesc`)})]})]})}),t&&(0,z.jsx)(`div`,{className:`notice notice-err`,style:{marginTop:8},children:t}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:i,style:{width:`100%`},children:a(`codexAuth.cancel`)})]})}var Ki=2500;function qi(){let[e,t]=(0,_.useState)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(0),i=(0,_.useCallback)(()=>{n.current&&=(clearTimeout(n.current),null)},[]);return(0,_.useEffect)(()=>i,[i]),{outcomeFor:(0,_.useCallback)(t=>e&&Object.is(e.scope,t)?e.outcome:null,[e]),copy:(0,_.useCallback)((e,a)=>{let o=++r.current;Bi(e).then(e=>{r.current===o&&(i(),t({scope:a,outcome:e?`copied`:`unavailable`}),n.current=setTimeout(()=>{n.current=null,r.current===o&&t(null)},Ki))})},[i])}}function Ji({url:e}){let t=Y(),{outcomeFor:n,copy:r}=qi();if(!e)return null;let i=n(e),a=t(i===`copied`?`prov.linkCopied`:i===`unavailable`?`prov.linkCopyUnavailable`:`prov.copyLink`);return(0,z.jsxs)(`div`,{className:`login-url-block`,children:[(0,z.jsx)(`code`,{className:`login-url-block-text`,children:e}),(0,z.jsxs)(`div`,{className:`login-url-block-actions`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>r(e,e),children:[(0,z.jsx)(Se,{style:{width:13,height:13},"aria-hidden":`true`}),(0,z.jsx)(`span`,{"aria-live":`polite`,children:a})]}),(0,z.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`login-url-block-open`,children:[(0,z.jsx)(ve,{style:{width:13,height:13},"aria-hidden":`true`}),` `,t(`prov.didntOpen`)]})]})]})}function Yi({reauthAccountId:e,authUrl:t,manualCode:n,manualCodeBusy:r,manualCodeWaiting:i,statusNotice:a,statusTone:o,flowId:s,error:c,onManualCodeChange:l,onSubmitManualCode:u,onClose:d}){let f=Y();return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`h3`,{style:{marginBottom:4},children:f(e?`codexAuth.reauthenticate`:`codexAuth.oauthLogin`)}),(0,z.jsx)(`p`,{className:`modal-desc`,children:f(`codexAuth.oauthWaiting`)}),(0,z.jsx)(Ji,{url:t}),(0,z.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:12},children:[(0,z.jsx)(`div`,{className:`muted text-label`,children:f(`prov.pasteRedirectHint`)}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,z.jsx)(`input`,{type:`text`,autoComplete:`off`,spellCheck:!1,value:n,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),u())},placeholder:f(`prov.pasteRedirect`),"aria-label":f(`prov.pasteRedirect`),disabled:r||i,className:`input text-label`,style:{flex:1}}),(0,z.jsx)(`button`,{className:`btn btn-ghost`,type:`button`,disabled:r||i||!n.trim()||!s,onClick:u,children:f(r?`codexAuth.oauthSubmittingCode`:`prov.pasteSubmit`)})]})]}),a&&(0,z.jsx)(`div`,{className:o===`warn`?`notice-warn`:`notice notice-ok`,role:`status`,"aria-live":`polite`,style:{marginTop:12},children:a}),c&&(0,z.jsx)(`div`,{className:`notice notice-err`,style:{marginTop:12},children:c}),(0,z.jsx)(`div`,{style:{textAlign:`center`,padding:`24px 0`},children:(0,z.jsx)(`span`,{className:`spin`,style:{width:24,height:24}})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:d,style:{width:`100%`},children:f(`codexAuth.cancel`)})]})}function Xi({apiBase:e,reauthAccountId:t,ui:n,dispatch:r,t:i}){let a=(0,_.useRef)(!0),o=(0,_.useRef)(0),s=(0,_.useRef)(!1),c=(0,_.useRef)(null),l=(0,_.useRef)(null),u=(0,_.useRef)(null),d=(0,_.useRef)(null),f=(0,_.useRef)(n.manualCodeState),p=(0,_.useRef)(null),m=(0,_.useRef)(null),h=(0,_.useRef)(()=>{}),g=(0,_.useRef)(()=>{}),v=n.manualCodeState===`submitting`,y=n.manualCodeState===`waiting`;(0,_.useEffect)(()=>{f.current=n.manualCodeState},[n.manualCodeState]),(0,_.useEffect)(()=>{d.current=n.flowId},[n.flowId]);let b=(0,_.useCallback)(()=>{c.current&&=(clearInterval(c.current),null),l.current&&=(clearTimeout(l.current),null),u.current?.abort(),u.current=null,s.current=!1},[]),x=(0,_.useCallback)(()=>{r({type:`clear-manual-code`}),o.current=0},[r]),S=(0,_.useCallback)(async()=>{x();let t=d.current;d.current=null,r({type:`set-flow-id`,flowId:null}),r({type:`set-auth-url`,authUrl:``}),b(),p.current?.abort(),p.current=null,t&&await fetch(`${e}/api/codex-auth/login/cancel`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({flowId:t})}).catch(()=>{})},[e,x,r,b]);(0,_.useEffect)(()=>(a.current=!0,()=>{x(),a.current=!1,m.current=null,p.current?.abort(),p.current=null;let t=d.current;d.current=null,r({type:`set-flow-id`,flowId:null}),b(),t&&fetch(`${e}/api/codex-auth/login/cancel`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({flowId:t})}).catch(()=>{})}),[e,x,r,b]);let C=(0,_.useCallback)((e,t)=>{h.current=e,g.current=t},[]),w=(0,_.useCallback)(()=>{n.step===`oauth-waiting`&&S(),g.current()},[n.step,S]),T=(0,_.useCallback)(async n=>{x(),d.current=null,r({type:`set-flow-id`,flowId:null});let m=new AbortController;p.current?.abort(),p.current=m,r({type:`reset-oauth-start`}),o.current=0;try{let p=t??n?.trim()??``,_=()=>fetch(`${e}/api/codex-auth/login`,{signal:m.signal,method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t?{id:t,reauth:!0}:p?{id:p}:{})}),v=await _();if(!a.current)return;if(v.status===409){if(await fetch(`${e}/api/codex-auth/login/cancel`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`}),!a.current||m.signal.aborted)return;if(v=await _(),v.status===409){r({type:`set-error`,error:i(`codexAuth.oauthAlreadyInProgress`)});return}}let y=await ct(v,i(`modal.networkError`));if(!a.current||!y)return;if(y.url){d.current=y.flowId??null,r({type:`set-flow-id`,flowId:y.flowId??null}),r({type:`set-auth-url`,authUrl:y.url}),r({type:`set-step`,step:`oauth-waiting`}),b();let n=y.flowId??``,m=t?`&reauth=1`:``,_=n?`${e}/api/codex-auth/login-status?flowId=${encodeURIComponent(n)}${p?`&accountId=${encodeURIComponent(p)}`:``}${m}`:`${e}/api/codex-auth/login-status`,v=new AbortController;u.current=v,c.current=setInterval(async()=>{if(s.current||v.signal.aborted)return;s.current=!0;let e=AbortSignal.any([v.signal,AbortSignal.timeout(1e4)]);try{let n=await lt(await fetch(_,{signal:e}));if(!a.current||v.signal.aborted)return;if(!n){o.current+=1,o.current>=3&&r({type:`set-status-notice`,statusNotice:i(`codexAuth.oauthStatusRetrying`),statusTone:`warn`});return}if(o.current=0,f.current===`waiting`?r({type:`set-status-notice`,statusNotice:i(`codexAuth.oauthCodeSubmitted`),statusTone:`ok`}):r({type:`set-status-notice`,statusNotice:``,statusTone:`ok`}),n.status===`done`){if(b(),x(),d.current=null,r({type:`set-flow-id`,flowId:null}),!a.current)return;h.current(),g.current()}else(n.status===`error`||n.status===`expired`)&&(b(),x(),d.current=null,r({type:`set-flow-id`,flowId:null}),a.current&&(t||r({type:`set-step`,step:`pick`}),r({type:`set-error`,error:n.error??i(`codexAuth.loginFailed`)})))}catch(e){if(!a.current||v.signal.aborted||e instanceof Error&&e.name===`AbortError`)return;o.current+=1,o.current>=3&&r({type:`set-status-notice`,statusNotice:i(`codexAuth.oauthStatusRetrying`),statusTone:`warn`})}finally{s.current=!1}},2e3),l.current=setTimeout(()=>{c.current&&(x(),S(),a.current&&(t||r({type:`set-step`,step:`pick`}),r({type:`set-error`,error:i(`modal.loginTimeout`)})))},3e5)}y.error&&!y.url&&r({type:`set-error`,error:y.error})}catch(e){a.current&&!(e instanceof Error&&e.name===`AbortError`)&&r({type:`set-error`,error:e instanceof Error?e.message:String(e)})}},[e,S,x,r,t,b,i]);return(0,_.useEffect)(()=>{if(!t){m.current=null;return}m.current!==t&&(m.current=t,T())},[t,T]),{manualCodeBusy:v,manualCodeWaiting:y,bindCallbacks:C,closeModal:w,startOAuth:T,submitManualCode:(0,_.useCallback)(async()=>{let t=d.current,s=n.manualCode.trim();if(!(!t||!s||v||y)){r({type:`set-manual-code-state`,manualCodeState:`submitting`}),r({type:`set-status-notice`,statusNotice:``,statusTone:`ok`});try{let n=await fetch(`${e}/api/codex-auth/login/code`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({flowId:t,input:s})});if(!a.current)return;if(!n.ok){r({type:`set-error`,error:i(`prov.pasteFail`,{error:(await n.json().catch(()=>({}))).error??n.statusText})}),r({type:`set-manual-code-state`,manualCodeState:`idle`});return}r({type:`oauth-code-submitted`}),r({type:`set-status-notice`,statusNotice:i(`codexAuth.oauthCodeSubmitted`),statusTone:`ok`}),o.current=0}catch{a.current&&(r({type:`set-error`,error:i(`modal.networkError`)}),r({type:`set-manual-code-state`,manualCodeState:`idle`}))}}},[e,r,v,y,i,n.manualCode])}}function Zi({apiBase:e,onClose:t,onAdded:n,reauthAccountId:r}){let i=Y(),[a,o]=(0,_.useReducer)(Wi,r,Ui),s=(0,_.useRef)(null),c=(0,_.useRef)(null),{manualCodeBusy:l,manualCodeWaiting:u,bindCallbacks:d,closeModal:f,startOAuth:p,submitManualCode:m}=Xi({apiBase:e,reauthAccountId:r,ui:a,dispatch:o,t:i});(0,_.useEffect)(()=>{d(n,t)},[d,n,t]),(0,_.useEffect)(()=>{s.current=document.activeElement;let e=c.current;e&&!e.open&&e.showModal();let t=e?.querySelector(`input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])`);return t&&t.focus(),()=>{s.current?.focus()}},[]);let h=(0,_.useCallback)(e=>{e.preventDefault(),f()},[f]);return(0,z.jsx)(`dialog`,{ref:c,"aria-label":i(r?`codexAuth.reauthenticate`:`codexAuth.addTitle`),className:`modal-overlay`,onCancel:h,children:(0,z.jsxs)(`div`,{className:`modal-card`,style:{maxWidth:440},children:[a.step===`pick`&&(0,z.jsx)(Gi,{id:a.id,error:a.error,onIdChange:e=>o({type:`set-id`,id:e}),onStartOAuth:()=>{p(a.id)},onClose:f}),a.step===`oauth-waiting`&&(0,z.jsx)(Yi,{reauthAccountId:r,authUrl:a.authUrl,manualCode:a.manualCode,manualCodeBusy:l,manualCodeWaiting:u,statusNotice:a.statusNotice,statusTone:a.statusTone,flowId:a.flowId,error:a.error,onManualCodeChange:e=>o({type:`set-manual-code`,manualCode:e}),onSubmitManualCode:()=>{m()},onClose:f})]})})}var Qi=1e4;function $i(e){return typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=100?e:80}function ea(e){let t=e.trim();if(!/^\d+$/.test(t))return null;let n=Number(t);return n>=1&&n<=100?n:null}function ta(e,t){return e>0?0:Number.isInteger(t)&&t>=1&&t<=100?t:80}function na(e,t,n,r){return n===r?e||t?`defer`:`apply`:`ignore`}function ra(e){return e&&typeof e==`object`&&e&&`autoSwitchThreshold`in e?e.autoSwitchThreshold:e}function ia(e,t,n){if(e<=0){let t=ta(e,n);return{threshold:t,lastEnabled:t}}return{threshold:0,lastEnabled:ea(t)??ta(0,n)}}async function aa(e,t,n=(e,t)=>fetch(e,t),r=Qi){if(!Number.isInteger(t)||t<0||t>100)return!1;try{return(await n(`${e}/api/codex-auth/auto-switch`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({threshold:t}),signal:AbortSignal.timeout(r)})).ok}catch{return!1}}var oa=3e4,sa=new Map;function ca(e,t=!0){let n=sa.get(e),[r,i]=(0,_.useState)(()=>n?.accounts??[]),[a,o]=(0,_.useState)(()=>n?.activeId??null),[s,c]=(0,_.useState)(()=>n==null?`loading`:`ready`),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(0),[v,y]=(0,_.useState)(()=>n!=null),[b,x]=(0,_.useState)(0),S=(0,_.useRef)(new Set),C=(0,_.useRef)(null),w=(0,_.useRef)(0),T=(0,_.useRef)(null),E=(0,_.useRef)(new Set),D=(0,_.useRef)(null),O=(0,_.useRef)(null),k=(0,_.useRef)(!!n?.accounts.length),A=(0,_.useRef)(n!=null),j=(0,_.useRef)(null),M=(0,_.useCallback)(e=>(E.current.add(e),()=>{E.current.delete(e)}),[]),N=(0,_.useCallback)(()=>ra(D.current?.value),[]),P=(0,_.useCallback)(()=>D.current?.value,[]),F=(0,_.useCallback)(async(t=!1)=>{let n=++w.current;g(e=>e+1);try{let r=[...E.current],a=new Map;for(let e of r)a.set(e,e.beginActiveRead());!t&&!A.current&&c(`loading`);let s=null,l,u=(async()=>{try{let r=await fetch(`${e}/api/codex-auth/accounts${t?`?refresh=1`:``}`);if(!r.ok)throw Error(`account load failed`);let a=await r.json();return w.current===n&&(s=a.accounts??[],i(s),k.current=s.length>0,A.current=!0,c(`ready`)),!0}catch{return!1}})(),d=(async()=>{try{let t=await fetch(`${e}/api/codex-auth/active`);if(!t.ok)throw Error(`active account load failed`);let i=await t.json();if(w.current===n){let e=i.activeCodexAccountId??null,t=T.current;t&&e!==t.id||(T.current=null,l=e,o(e)),D.current={value:i};for(let e of r)e.acceptActiveRead(i,a.get(e))}return!0}catch{if(w.current===n)for(let e of r)e.rejectActiveRead();return!1}})(),[f,p]=await Promise.all([u,d]);if(w.current!==n)return!1;if(f){c(`ready`),A.current=!0;let t=sa.get(e);return sa.set(e,{accounts:s??t?.accounts??[],activeId:l===void 0?t?.activeId??null:l}),p}return A.current||c(`error`),!1}finally{g(e=>Math.max(0,e-1)),y(!0)}},[e]);(0,_.useEffect)(()=>{t&&C.current!==e&&(C.current=e,Promise.resolve().then(()=>{F()}))},[e,t,F]);let I=r.some(e=>e.hasCredential&&!e.quota);(0,_.useEffect)(()=>{if(!t||!I||b>0)return;let e=[350,900,2e3].map(e=>window.setTimeout(()=>{F(!1)},e));return()=>{for(let t of e)window.clearTimeout(t)}},[t,I,b,F]),(0,_.useEffect)(()=>{if(!t||b>0)return;let e=window.setInterval(()=>{F()},oa);return()=>window.clearInterval(e)},[t,F,b]);let L=(0,_.useCallback)(()=>{let e={};return S.current.add(e),x(S.current.size),e},[]),R=(0,_.useCallback)(e=>{S.current.delete(e)&&x(S.current.size)},[]),z=(0,_.useCallback)(async t=>{if(O.current)return{ok:!1,reason:`busy`};O.current=t??`__main__`,u(t??`__main__`);try{let n=await fetch(`${e}/api/codex-auth/active`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({accountId:t})});if(!n.ok)throw Error(`account switch failed`);let r=(await n.json().catch(()=>({}))).activeCodexAccountId??t;return T.current={id:r??null},o(r??null),F(),{ok:!0,activeId:r??null}}catch{return{ok:!1,reason:`request`}}finally{O.current=null,u(null)}},[e,F]),B=(0,_.useCallback)(async(t,n)=>{try{return(await fetch(`${e}/api/codex-auth/accounts/alias`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:t,alias:n.trim()})})).ok?(await F(),{ok:!0}):{ok:!1,reason:`request`}}catch{return{ok:!1,reason:`request`}}},[e,F]),V=(0,_.useCallback)(async(t,n)=>{if(j.current)return{ok:!1,reason:`busy`};j.current={accountId:t},f(t);try{let r=await fetch(`${e}/api/codex-auth/accounts/pause`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:t,paused:n})});if(!r.ok)return{ok:!1,reason:`request`};let a=await r.json().catch(()=>({})),s=a&&typeof a==`object`?a:{};if(i(e=>e.map(e=>e.id===t||t===`__main__`&&e.isMain?{...e,paused:n}:e)),Object.prototype.hasOwnProperty.call(s,`activeCodexAccountId`)){let e=s.activeCodexAccountId??null;T.current={id:e},o(e)}return F(),{ok:!0}}catch{return{ok:!1,reason:`request`}}finally{j.current=null,f(null)}},[e,F]),H=(0,_.useCallback)(async()=>{if(j.current)return{ok:!1,reason:`busy`};j.current=`bulk`,m(!0);try{let t=await fetch(`${e}/api/codex-auth/accounts/pause-exhausted`,{method:`PUT`});if(!t.ok)return{ok:!1,reason:`request`};let n=await t.json().catch(()=>({})),r=n&&typeof n==`object`?n:{},a=new Set(r.pausedAccountIds??[]);if(i(e=>e.map(e=>a.has(e.id)||a.has(`__main__`)&&e.isMain?{...e,paused:!0}:e)),Object.prototype.hasOwnProperty.call(r,`activeCodexAccountId`)){let e=r.activeCodexAccountId??null;T.current={id:e},o(e)}return F(),{ok:!0,pausedCount:r.pausedCount??a.size}}catch{return{ok:!1,reason:`request`}}finally{j.current=null,m(!1)}},[e,F]),U=(0,_.useCallback)(async t=>{try{return(await fetch(`${e}/api/codex-auth/accounts?id=${encodeURIComponent(t)}`,{method:`DELETE`})).ok?(await F(),{ok:!0}):{ok:!1,reason:`request`}}catch{return{ok:!1,reason:`request`}}},[e,F]),W=(0,_.useCallback)(async()=>await F()?{ok:!0}:{ok:!1,reason:`reload`},[F]),ee=a&&a!==`__main__`?r.find(e=>e.id===a):null,G=r.find(e=>e.isMain),te=ee??G,ne=!te?.paused&&Pi(te);return{accounts:r,activeId:a,loadState:s,refreshing:h>0,initialLoading:!v,switchingId:l,pauseUpdatingId:d,pausingExhausted:p,activeNeedsReauth:ne,load:F,switchAccount:z,setAccountPaused:V,pauseExhaustedAccounts:H,saveAlias:B,removeAccount:U,syncAfterAccountAdded:W,pauseRefresh:L,resumeRefresh:R,subscribeLoadObserver:M,readLastThreshold:N,readLastActive:P}}function la(e,t,n,r,i=1){let a=e.trim(),o=a===``?NaN:Number(a),s=Math.min(r,Math.max(n,(Number.isFinite(o)?o:n)+t));return String(i<1?Math.round(s*10)/10:Math.round(s))}function ua({disabled:e=!1,onIncrement:t,onDecrement:n,incrementLabel:r,decrementLabel:i}){return(0,z.jsxs)(`div`,{className:`ocx-stepper`,role:`group`,children:[(0,z.jsx)(`button`,{type:`button`,className:`ocx-stepper__btn`,disabled:e,"aria-label":r,onMouseDown:e=>e.preventDefault(),onClick:t,children:(0,z.jsx)(fe,{width:10,height:10,"aria-hidden":`true`})}),(0,z.jsx)(`button`,{type:`button`,className:`ocx-stepper__btn`,disabled:e,"aria-label":i,onMouseDown:e=>e.preventDefault(),onClick:n,children:(0,z.jsx)(pe,{width:10,height:10,"aria-hidden":`true`})})]})}var da={quota:{on:`codexAuth.autoSwitchQuotaDesc`,off:`codexAuth.autoSwitchQuotaOffDesc`},"round-robin":{on:`codexAuth.autoSwitchRoundRobinDesc`,off:`codexAuth.autoSwitchRoundRobinDesc`},"fill-first":{on:`codexAuth.autoSwitchFillFirstDesc`,off:`codexAuth.autoSwitchFillFirstOffDesc`}};function fa({threshold:e,draft:t,strategy:n=`quota`,hydrated:r=!0,saving:i,loadError:a,feedback:o,onDraftChange:s,onEditingChange:c,onCommit:l,onCancel:u,onToggle:d,onRetry:f}){let p=Y(),m=(0,_.useRef)(!1),h=e>0,g=da[n][h?`on`:`off`],v=i||!r,y=i?p(`common.saving`):o?.message??``,b=i?`pending`:o?.tone,x=y?`codex-auto-switch-desc codex-auto-switch-feedback`:`codex-auto-switch-desc`;return(0,z.jsxs)(`div`,{className:`card card-row codex-auto-switch-card`,style:{marginTop:16},"aria-busy":i||!r&&!a||void 0,children:[(0,z.jsxs)(`div`,{className:`codex-auto-switch-copy`,children:[(0,z.jsx)(`strong`,{children:p(`codexAuth.autoSwitch`)}),(0,z.jsx)(`div`,{id:`codex-auto-switch-desc`,className:`card-sub`,role:a?`alert`:void 0,children:a?p(`codexAuth.autoSwitchLoadFailed`):p(g,{threshold:e})}),(0,z.jsx)(`div`,{className:`card-sub`,children:p(`codexAuth.failureRecoveryNote`)}),(0,z.jsx)(`div`,{className:`card-sub`,children:p(`codexAuth.cacheWarning`)})]}),(0,z.jsxs)(`div`,{className:`codex-auto-switch-controls`,onBlur:e=>{if(!e.currentTarget.contains(e.relatedTarget)){if(c(!1),m.current){m.current=!1;return}h&&!v&&l()}},children:[a&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:f,children:p(`pws.retryAccounts`)}),h&&(0,z.jsxs)(`label`,{className:`codex-auto-switch-threshold`,children:[(0,z.jsx)(`span`,{className:`field-label`,children:p(`codexAuth.autoSwitchThreshold`)}),(0,z.jsxs)(`span`,{className:`codex-auto-switch-input-wrap`,children:[(0,z.jsx)(`input`,{className:`input mono codex-auto-switch-input`,type:`number`,min:1,max:100,step:1,inputMode:`numeric`,value:t,readOnly:v,"aria-disabled":v,"aria-label":p(`codexAuth.autoSwitchThresholdAria`),"aria-describedby":x,onChange:e=>s(e.target.value),onFocus:()=>{v||c(!0)},onKeyDown:e=>{e.nativeEvent.isComposing||v||(e.key===`Enter`?(e.preventDefault(),l()):e.key===`Escape`&&(e.preventDefault(),u()))}}),(0,z.jsx)(`span`,{className:`codex-auto-switch-unit`,"aria-hidden":`true`,children:`%`}),(0,z.jsx)(ua,{disabled:v,incrementLabel:p(`codexAuth.autoSwitchThresholdInc`),decrementLabel:p(`codexAuth.autoSwitchThresholdDec`),onIncrement:()=>{c(!0),s(la(t,1,1,100))},onDecrement:()=>{c(!0),s(la(t,-1,1,100))}})]})]}),(0,z.jsx)(`span`,{className:`codex-auto-switch-toggle-slot`,children:(0,z.jsx)(`button`,{type:`button`,className:`toggle ${h?`on`:``}`,onPointerDownCapture:()=>{m.current=!0},onPointerUp:()=>{m.current=!1},onPointerCancel:()=>{m.current=!1},onClick:()=>{m.current=!1,d()},disabled:v,"aria-pressed":h,"aria-label":p(`codexAuth.autoSwitch`),"aria-describedby":x,title:p(`codexAuth.autoSwitch`),children:(0,z.jsx)(`span`,{className:`toggle-knob`})})})]}),y&&(0,z.jsx)(`div`,{id:`codex-auto-switch-feedback`,className:`codex-auto-switch-feedback${b===`err`?` is-error`:``}`,role:b===`err`?`alert`:`status`,"aria-atomic":`true`,children:y})]})}var pa=[`quota`,`round-robin`,`fill-first`],ma=`quota`,ha=new Set(pa);function ga(e){return typeof e==`string`&&ha.has(e)?e:ma}function _a(e){return typeof e==`number`&&Number.isInteger(e)&&e>=1&&e<=100?e:1}function va(e){let t=e.trim();if(!/^\d+$/.test(t))return null;let n=Number(t);return n>=1&&n<=100?n:null}async function ya(e,t,n=(e,t)=>fetch(e,t)){if(t.strategy===void 0&&t.stickyLimit===void 0)return{ok:!1};try{let r=await n(`${e}/api/codex-auth/pool-strategy`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...t.strategy===void 0?{}:{strategy:t.strategy},...t.stickyLimit===void 0?{}:{stickyLimit:t.stickyLimit}})});if(!r.ok)return{ok:!1};let i=await r.json();return{ok:!0,strategy:ga(i.accountPoolStrategy??t.strategy),stickyLimit:_a(i.accountPoolStickyLimit??t.stickyLimit)}}catch{return{ok:!1}}}var ba={quota:`accountPool.strategyQuota`,"round-robin":`accountPool.strategyRoundRobin`,"fill-first":`accountPool.strategyFillFirst`},xa={quota:`accountPool.strategyHintQuota`,"round-robin":`accountPool.strategyHintRoundRobin`,"fill-first":`accountPool.strategyHintFillFirst`};function Sa({strategy:e,stickyDraft:t,disabled:n=!1,strategySelectId:r=`account-pool-strategy`,stickyInputId:i=`account-pool-sticky-limit`,onStrategyChange:a,onStickyDraftChange:o,onStickyCommit:s}){let c=Y(),l=pa.map(e=>({value:e,label:c(ba[e])}));return(0,z.jsxs)(`div`,{className:`account-pool-strategy-controls`,children:[(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`div`,{className:`setting-label`,children:[(0,z.jsx)(`span`,{className:`title`,id:`${r}-label`,children:c(`accountPool.strategy`)}),(0,z.jsx)(`span`,{className:`desc`,children:c(`accountPool.strategyDesc`)}),(0,z.jsx)(`span`,{className:`desc`,children:c(xa[e])}),(0,z.jsx)(`span`,{className:`desc`,children:c(`accountPool.unboundDefinition`)})]}),(0,z.jsx)(`div`,{className:`setting-controls`,children:(0,z.jsx)(rt,{id:r,value:e,options:l,disabled:n,label:c(`accountPool.strategy`),onChange:e=>a(e)})})]}),e===`round-robin`&&(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`label`,{className:`setting-label`,htmlFor:i,children:[(0,z.jsx)(`span`,{className:`title`,children:c(`accountPool.stickyLimit`)}),(0,z.jsx)(`span`,{className:`desc`,children:c(`accountPool.stickyLimitHelp`)})]}),(0,z.jsx)(`div`,{className:`setting-controls`,children:(0,z.jsxs)(`span`,{className:`codex-auto-switch-input-wrap`,children:[(0,z.jsx)(`input`,{id:i,className:`input mono codex-auto-switch-input`,type:`number`,min:1,max:100,step:1,inputMode:`numeric`,value:t,disabled:n,"aria-label":c(`accountPool.stickyLimitAria`),onChange:e=>o(e.target.value),onBlur:()=>s(),onKeyDown:e=>{e.nativeEvent.isComposing||n||e.key===`Enter`&&(e.preventDefault(),s())}}),(0,z.jsx)(ua,{disabled:n,incrementLabel:c(`accountPool.stickyLimitInc`),decrementLabel:c(`accountPool.stickyLimitDec`),onIncrement:()=>{let e=la(t,1,1,100);o(e),s(e)},onDecrement:()=>{let e=la(t,-1,1,100);o(e),s(e)}})]})})]})]})}function Ca(e){if(!e||typeof e!=`object`)return null;let t=e;return!(`accountPoolStrategy`in t)&&!(`accountPoolStickyLimit`in t)?null:{strategy:ga(t.accountPoolStrategy),stickyLimit:_a(t.accountPoolStickyLimit)}}function wa({apiBase:e,subscribeLoadObserver:t,readLastActive:n,onStrategyResolved:r}){let i=Y(),[a,o]=(0,_.useState)(ma),[s,c]=(0,_.useState)(1),[l,u]=(0,_.useState)(`1`),[d,f]=(0,_.useState)(!1),p=(0,_.useRef)(!1),[m,h]=(0,_.useState)(!1),g=(0,_.useRef)(!1),v=(0,_.useRef)(!1),y=(0,_.useRef)(0),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(null),w=(0,_.useCallback)(e=>{let t=ga(e.accountPoolStrategy),n=_a(e.accountPoolStickyLimit);o(t),r?.(t),c(n),u(String(n)),p.current=!0,f(!0),x(!1),C(null)},[r]),T=(0,_.useCallback)(e=>{let t=Ca(e);t&&w({accountPoolStrategy:t.strategy,accountPoolStickyLimit:t.stickyLimit})},[w]),E=(0,_.useCallback)(async()=>{try{let t=await fetch(`${e}/api/codex-auth/active`);if(!t.ok)throw Error(`load`);let n=await t.json();if(g.current){v.current=!0;return}w(n)}catch{g.current||x(!0)}},[e,w]),D=(0,_.useCallback)(()=>{v.current&&(v.current=!1,queueMicrotask(()=>{if(g.current){v.current=!0;return}E()}))},[E]);(0,_.useEffect)(()=>{if(!t)return;let e=t({beginActiveRead:()=>y.current,acceptActiveRead:(e,t)=>{if(t===y.current){if(g.current){v.current=!0;return}T(e)}},rejectActiveRead:()=>{p.current||x(!0)}});return!g.current&&n&&T(n()),e},[t,T,n]),(0,_.useEffect)(()=>{!n||t||g.current||T(n())},[n,T,t]),(0,_.useEffect)(()=>{t||E()},[E,t]);let O=(0,_.useCallback)(async t=>{if(g.current)return;let n=a,l=s;t.strategy!==void 0&&(o(t.strategy),r?.(t.strategy)),t.stickyLimit!==void 0&&(c(t.stickyLimit),u(String(t.stickyLimit))),g.current=!0,h(!0),C(null),y.current+=1;let d=await ya(e,t);y.current+=1,d.ok?(o(d.strategy),r?.(d.strategy),c(d.stickyLimit),u(String(d.stickyLimit)),p.current=!0,f(!0)):(C(i(`accountPool.strategyUpdateFailed`)),o(n),r?.(n),c(l),u(String(l))),g.current=!1,h(!1),D()},[e,r,D,s,a,i]),k=m||b||!d;return(0,z.jsxs)(`div`,{className:`card account-pool-strategy-card`,"aria-busy":m||!d&&!b,children:[b&&(0,z.jsx)(`div`,{className:`card-sub`,role:`alert`,children:i(`accountPool.strategyLoadFailed`)}),b&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm account-pool-strategy-card__retry`,onClick:()=>{E()},children:i(`common.retry`)}),!b&&(0,z.jsx)(Sa,{strategy:a,stickyDraft:l,disabled:k,strategySelectId:`codex-pool-strategy`,stickyInputId:`codex-pool-sticky-limit`,onStrategyChange:e=>{k||e===a||O({strategy:e})},onStickyDraftChange:u,onStickyCommit:e=>{if(k)return;let t=va(e??l);if(t===null){u(String(s)),C(i(`accountPool.stickyLimitInvalid`));return}if(t===s){u(String(t));return}O({stickyLimit:t})}}),S&&(0,z.jsx)(`div`,{role:`alert`,className:`card-sub account-pool-strategy-card__error`,children:S})]})}function Ta(e,t){let[n,r]=(0,_.useState)(80),[i,a]=(0,_.useState)(`80`),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(null),m=(0,_.useRef)(80),h=(0,_.useRef)(!1),g=(0,_.useRef)(80),v=(0,_.useRef)(!1),y=(0,_.useRef)(!1),b=(0,_.useRef)(!1),x=(0,_.useRef)(0),S=(0,_.useRef)(null),C=(0,_.useRef)(null),w=(0,_.useCallback)(e=>{m.current=e,h.current=!0,s(!0),r(e),e>0&&(g.current=e),a(String(e>0?e:g.current))},[]),T=(0,_.useCallback)(e=>{if(v.current||y.current){S.current=e;return}S.current=null,w(e)},[w]),E=(0,_.useCallback)(()=>{let e=S.current;return e===null?!1:(S.current=null,w(e),!0)},[w]),D=(0,_.useCallback)(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null),p(null)},[]),O=(0,_.useCallback)((e,t)=>{C.current!==null&&window.clearTimeout(C.current),p({tone:t?`err`:`ok`,message:e}),C.current=window.setTimeout(()=>{p(null),C.current=null},5e3)},[]);(0,_.useEffect)(()=>()=>{C.current!==null&&window.clearTimeout(C.current)},[]);let k=(0,_.useCallback)(()=>(h.current||l(!1),x.current),[]),A=(0,_.useCallback)((e,t)=>{l(!1);let n=ra(e),r=na(v.current,y.current,t,x.current);r===`defer`?S.current=$i(n):r===`apply`&&T($i(n))},[T]),j=(0,_.useCallback)(e=>{h.current||v.current||y.current||(l(!1),w($i(ra(e))))},[w]),M=(0,_.useCallback)(()=>{h.current||l(!0)},[]),N=(0,_.useCallback)(async(n,r,i=!0)=>{if(y.current)return!1;y.current=!0,v.current=!1,D(),d(!0),x.current+=1;try{let a=await aa(e,n);return x.current+=1,a?(S.current=null,w(n),i&&O(t.updated,!1)):(E()||w(r),O(t.updateFailed,!0)),a}finally{y.current=!1,d(!1)}},[e,w,D,t.updateFailed,t.updated,E,O]),P=(0,_.useCallback)(()=>{v.current=!1;let e=m.current;E()||a(String(e>0?e:g.current)),O(t.invalid,!0)},[t.invalid,E,O]),F=(0,_.useCallback)(()=>{v.current=!1,b.current=!0,D();let e=m.current;E()||a(String(e>0?e:g.current))},[D,E]),I=(0,_.useCallback)(async()=>{if(b.current)return b.current=!1,!0;if(!h.current||y.current)return!1;let e=m.current;v.current=!1;let t=ea(i);return t===null?(P(),!1):t===e?(E()||a(String(t)),!0):N(t,e)},[i,E,P,N]),L=(0,_.useCallback)(async()=>{if(!h.current||y.current)return!1;let e=m.current;v.current=!1;let t=ia(e,i,g.current),n=await N(t.threshold,e);return n?(g.current=t.lastEnabled,t.threshold===0&&a(String(t.lastEnabled)),n):!1},[i,N]);return{threshold:n,draft:i,hydrated:o,saving:u,loadError:c,feedback:f,beginServerRead:k,acceptServerRead:A,hydrateServerValue:j,rejectServerRead:M,setDraft:(0,_.useCallback)(e=>{h.current&&(v.current=!0,b.current=!1,D(),a(e))},[D]),setEditing:(0,_.useCallback)(e=>{v.current=e},[]),commit:I,cancel:F,toggle:L,retry:(0,_.useCallback)(()=>{l(!1),D()},[D])}}var Ea=new Map;function Da(e,t){return`${e??``}\0${JSON.stringify(t)}`}function Oa(e,t){let n=Da(e,t??{}),r=Ea.get(n);return r||(r=new Intl.NumberFormat(e,t),Ea.set(n,r)),r}var ka={month:`short`,day:`numeric`,year:`numeric`},Aa={month:`short`,day:`numeric`,year:`numeric`,hour:`2-digit`,minute:`2-digit`},ja=new Map;function Ma(e,t){let n=Da(e,t),r=ja.get(n);return r||(r=new Intl.DateTimeFormat(e,t),ja.set(n,r)),r}function Na(e,t){let n=new Date(e);return Number.isNaN(n.getTime())?`—`:Ma(t,ka).format(n)}function Pa(e,t){let n=new Date(e);return Number.isNaN(n.getTime())?`—`:Ma(t,Aa).format(n)}function Fa(e,t){return!Number.isFinite(e)||e<0?`—`:`~${Oa(t,{style:`currency`,currency:`USD`,minimumFractionDigits:4,maximumFractionDigits:4}).format(e)}`}function Ia(e,t){return Na(e,t)}function La(e,t){return Pa(e,t)}function Ra(e){return Math.max(0,Math.ceil((new Date(e).getTime()-Date.now())/864e5))}function za({index:e,grantedAt:t,expiresAt:n,isNext:r,locale:i,t:a}){let o=Ra(n),s=o<=7;return(0,z.jsxs)(`div`,{className:`credit-item${r?` credit-next`:``}`,children:[(0,z.jsxs)(`div`,{className:`credit-item-head`,children:[(0,z.jsx)(xe,{width:13}),(0,z.jsx)(`span`,{className:`credit-item-label`,children:r?a(`codexAuth.creditNext`):a(`codexAuth.creditLabel`,{n:String(e+1)})}),r&&(0,z.jsx)(`span`,{className:`badge badge-amber text-micro`,style:{padding:`1px 6px`},children:a(`codexAuth.creditNextBadge`)})]}),(0,z.jsxs)(`div`,{className:`credit-item-dates`,children:[(0,z.jsx)(`span`,{children:a(`codexAuth.creditGranted`,{date:Ia(t,i)})}),(0,z.jsx)(`span`,{className:s?`credit-urgent`:``,children:a(`codexAuth.creditExpires`,{date:La(n,i),days:String(o)})})]})]})}function Ba({account:e,onClick:t,t:n}){let r=e.quota?.resetCredits;return e.quota==null?(0,z.jsxs)(`span`,{className:`badge badge-muted codex-ticket-badge-slot`,"aria-hidden":`true`,children:[(0,z.jsx)(xe,{width:12}),`0`]}):r===void 0?null:(0,z.jsxs)(`button`,{type:`button`,className:`badge ${typeof r==`number`&&r>0?`badge-amber`:`badge-muted`} badge-clickable`,onClick:e=>{e.stopPropagation(),t()},"aria-label":n(`codexAuth.resetCreditsAria`,{count:String(r)}),children:[(0,z.jsx)(xe,{width:12}),r]})}function Va({t:e,paused:t,saving:n}){let r=e(`codexAuth.pause`),i=e(`codexAuth.resume`),a=e(`common.saving`),o=n?a:t?i:r;return(0,z.jsx)(`span`,{className:`codex-auth-pause-label`,style:{minWidth:`${Math.max(r.length,i.length,a.length)}ch`},children:o})}function Ha({pool:e,activeId:t,accountModeState:n,switchActionLabel:r,threshold:i,onOpenReset:a,onSwitch:o,onTogglePause:s,pauseUpdatingId:c,pauseBusy:l,onReauth:u,onEditAlias:d,onRemove:f,onCopyDoctor:p,doctorCopyOutcomeFor:m}){let h=Y(),g=e=>!e.paused&&t===e.id;return(0,z.jsx)(z.Fragment,{children:e.map(e=>{let t=e.health?.status,_=!!e.needsReauth||Ni(t),v=Fi(t),y=Ri(h,e.health),b=zi(h,`codex`,e.id,e.health);return(0,z.jsxs)(`div`,{className:`card ${g(e)?`card-active`:``}`,style:{marginBottom:8},children:[(0,z.jsxs)(`div`,{className:`card-head`,children:[(0,z.jsx)(`span`,{className:`dot ${_?`dot-amber`:g(e)?`dot-blue`:`dot-muted`}`}),(0,z.jsx)(`strong`,{children:e.alias??e.email}),(0,z.jsxs)(`span`,{className:`card-badges`,children:[e.plan&&(0,z.jsx)(`span`,{className:`badge badge-green`,children:e.plan}),e.paused&&(0,z.jsx)(`span`,{className:`badge badge-muted`,title:h(`codexAuth.pausedHint`),children:h(`codexAuth.paused`)}),(0,z.jsx)(Ba,{t:h,account:e,onClick:()=>a(e)}),y&&(0,z.jsx)(`span`,{className:Mi(t),children:y}),_&&!y&&(0,z.jsx)(`span`,{className:`badge badge-amber`,children:h(`codexAuth.needsReauth`)}),g(e)&&!_&&!v&&(0,z.jsx)(`span`,{className:`badge badge-primary`,children:h(n===`direct`?`codexAuth.poolPrepared`:`codexAuth.nextSession`)})]}),!e.paused&&!g(e)&&!_&&!v&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm codex-account-switch`,onClick:()=>o(e),children:r}),_&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>u(e.id),children:h(`codexAuth.reauthenticate`)}),p&&Ii(t)&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm codex-auth-action-btn`,onClick:()=>p(e.id),children:(0,z.jsx)(`span`,{"aria-live":`polite`,children:Hi(h,m?.(e.id))})}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-ghost codex-auth-action-btn`,onClick:()=>s(e),disabled:l,title:e.paused?h(`codexAuth.pausedHint`):void 0,"aria-label":e.paused?`${h(`codexAuth.resume`)}. ${h(`codexAuth.pausedHint`)}`:h(`codexAuth.pause`),children:[e.paused?(0,z.jsx)(ce,{width:14}):(0,z.jsx)(se,{width:14}),(0,z.jsx)(Va,{t:h,paused:e.paused,saving:c===e.id})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void d(e),children:h(`prov.editAlias`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn-icon btn-icon-danger card-right`,"aria-label":`${h(`common.remove`)} — ${e.email}`,title:`${h(`common.remove`)} — ${e.email}`,onClick:t=>{t.stopPropagation(),f(e.id)},children:(0,z.jsx)(ae,{width:14})})]}),(0,z.jsxs)(`div`,{className:`card-sub`,children:[e.email,e.plan?` · ${e.plan}`:``,` · `,h(`prov.accountId`),`: `,Ai(e.id)]}),b&&(0,z.jsx)(`div`,{className:`card-sub faint`,children:b}),v&&(0,z.jsx)(`div`,{className:`card-sub faint`,children:h(`pws.healthCooldownHint`)}),_?(0,z.jsx)(`div`,{className:`card-sub faint`,children:h(`codexAuth.tokenExpired`)}):!v&&(0,z.jsx)(Br,{quota:e.quota,plan:e.plan,threshold:i,t:h,pending:e.quota==null})]},e.id)})})}function Ua({onReauth:e}){let t=Y();return(0,z.jsxs)(`div`,{className:`notice-warn`,style:{marginBottom:12,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,flexWrap:`wrap`},children:[(0,z.jsxs)(`span`,{children:[(0,z.jsx)(J,{width:14}),` `,t(`codexAuth.tokenExpired`)]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:e,children:t(`codexAuth.reauthenticate`)})]})}function Wa({confirm:e,mainEmail:t,accountModeState:n,switchingId:r,onCancel:i,onConfirm:a}){let o=Y(),s=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=s.current;e&&!e.open&&e.showModal()},[]),(0,z.jsxs)(`dialog`,{ref:s,className:`modal-overlay`,"aria-labelledby":`codex-switch-title`,onCancel:(0,_.useCallback)(e=>{e.preventDefault(),i()},[i]),children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":o(`common.close`),tabIndex:-1,onClick:i}),(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),role:`document`,children:[(0,z.jsx)(`h3`,{id:`codex-switch-title`,children:n===`direct`?o(`codexAuth.preparePoolTitle`):e.id===`__main__`?o(`codexAuth.switchBack`):o(`codexAuth.switchTitle`)}),(0,z.jsx)(`p`,{className:`modal-desc`,children:n===`direct`?o(`codexAuth.preparePoolDesc`):e.id===`__main__`?o(`codexAuth.switchBackDesc`):o(`codexAuth.switchDesc`)}),(0,z.jsxs)(`div`,{className:`card`,style:{margin:`12px 0`},children:[(0,z.jsx)(`strong`,{children:e.id===`__main__`?t||o(`codexAuth.codexApp`):e.email}),e.plan&&(0,z.jsx)(`span`,{className:`badge badge-green`,style:{marginLeft:8},children:e.plan})]}),e.id!==`__main__`&&(0,z.jsxs)(`div`,{className:`notice-warn`,children:[(0,z.jsx)(J,{width:14}),` `,o(`codexAuth.cacheWarning`)]}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:i,children:o(`codexAuth.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:!!r,onClick:a,children:o(r?`pws.accountSwitching`:n===`direct`?`codexAuth.prepareForPool`:`codexAuth.setAsNext`)})]})]})]})}function Ga({resetPopup:e,resetConfirm:t,creditDetails:n,creditDetailsLoading:r,redeeming:i,onClose:a,onShowConfirm:o,onCancelConfirm:s,onRedeem:c}){let{locale:l,t:u}=ze(),d=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=d.current;e&&!e.open&&e.showModal()},[]),(0,z.jsxs)(`dialog`,{ref:d,className:`modal-overlay`,"aria-labelledby":`codex-reset-title`,onCancel:(0,_.useCallback)(e=>{e.preventDefault(),a()},[a]),children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":u(`common.close`),tabIndex:-1,onClick:a}),(0,z.jsx)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),role:`document`,children:t?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{style:{textAlign:`center`,padding:`12px 0`},children:[(0,z.jsx)(`div`,{className:`confirm-icon`,children:(0,z.jsx)(J,{width:22})}),(0,z.jsx)(`h3`,{id:`codex-reset-title`,children:u(`codexAuth.confirmResetTitle`)}),(0,z.jsx)(`p`,{className:`modal-desc`,children:u(`codexAuth.confirmResetDesc`,{count:String(e.quota?.resetCredits??0)})}),n&&n[0]&&(0,z.jsx)(`p`,{className:`faint text-label`,children:u(`codexAuth.confirmWhichCredit`,{date:Ia(n[0].granted_at,l)})}),(0,z.jsx)(`p`,{className:`faint text-label`,children:u(`codexAuth.irreversible`)})]}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:s,children:u(`codexAuth.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:c,disabled:i,children:u(i?`codexAuth.redeeming`:`codexAuth.useCredit`)})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`h3`,{id:`codex-reset-title`,children:[(0,z.jsx)(xe,{width:16}),` `,u(`codexAuth.resetCreditsTitle`)]}),(0,z.jsxs)(`div`,{className:`card-sub`,children:[e.email,e.plan?` · ${e.plan}`:``]}),(0,z.jsx)(`div`,{style:{margin:`16px 0`},children:(e.quota?.resetCredits??0)>0?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{style:{marginBottom:12},children:u(`codexAuth.resetCreditsAvailable`,{count:String(e.quota?.resetCredits??0)})}),r&&(0,z.jsx)(`p`,{className:`faint text-label`,children:u(`common.loading`)}),n&&n.length>0&&(0,z.jsx)(`div`,{className:`credit-list`,children:n.map((e,t)=>(0,z.jsx)(za,{index:t,grantedAt:e.granted_at,expiresAt:e.expires_at,isNext:t===0,locale:l,t:u},`${e.granted_at}:${e.expires_at}`))}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,style:{marginTop:12,width:`100%`},onClick:o,disabled:i,children:u(`codexAuth.useOneCredit`)}),(0,z.jsx)(`p`,{className:`card-sub text-caption`,style:{marginTop:8,textAlign:`center`},children:u(`codexAuth.fifoNote`)})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`faint`,children:u(`codexAuth.noResetCredits`)}),(0,z.jsx)(`p`,{className:`modal-desc`,children:u(`codexAuth.earnCreditsHint`)})]})})]})})]})}function Ka({t:e,main:t,isMainActive:n,accountModeState:r,threshold:i,switchActionLabel:a,onSwitch:o,onTogglePause:s,pauseUpdatingId:c,pauseBusy:l,onOpenReset:u,onCopyDoctor:d,doctorCopyOutcomeFor:f}){let p=e(`codexAuth.codexApp`),m=t?.id??`__main__`,h={id:`__main__`,email:t?.email||p,plan:t?.plan,isMain:!0,paused:t?.paused??!1,hasCredential:!0,quota:t?.quota??null},g=!!t?.needsReauth||Ni(t?.health?.status),_=Fi(t?.health?.status),v=Ri(e,t?.health),y=t?zi(e,`codex`,m,t.health):null;return(0,z.jsxs)(`div`,{className:`card ${n?`card-active`:``}`,style:{marginBottom:12},children:[(0,z.jsxs)(`div`,{className:`card-head`,children:[(0,z.jsx)(`span`,{className:`dot ${g?`dot-amber`:`dot-green`}`}),(0,z.jsx)(`strong`,{children:e(`codexAuth.mainAccount`)}),(0,z.jsxs)(`span`,{className:`card-badges`,children:[t&&(0,z.jsx)(Ba,{t:e,account:{...t,id:`__main__`},onClick:()=>u({...t,id:`__main__`})}),t?.paused&&(0,z.jsx)(`span`,{className:`badge badge-muted`,title:e(`codexAuth.pausedHint`),children:e(`codexAuth.paused`)}),v&&(0,z.jsx)(`span`,{className:Mi(t?.health?.status),children:v}),g&&!v&&(0,z.jsx)(`span`,{className:`badge badge-amber`,children:e(`codexAuth.needsReauth`)}),!t?.paused&&(0,z.jsx)(`span`,{className:`badge ${n?`badge-primary`:`badge-muted`}`,children:e(n?r===`direct`?`codexAuth.poolPrepared`:`codexAuth.nextSession`:`codexAuth.current`)})]}),!t?.paused&&!n&&!g&&!_&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm codex-account-switch`,onClick:()=>o(h),children:a}),d&&Ii(t?.health?.status)&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm codex-auth-action-btn`,onClick:()=>d(m),children:(0,z.jsx)(`span`,{"aria-live":`polite`,children:Hi(e,f?.(m))})}),t&&(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-ghost codex-auth-action-btn`,onClick:()=>s(h),disabled:l,title:t.paused?e(`codexAuth.pausedHint`):void 0,"aria-label":t.paused?`${e(`codexAuth.resume`)}. ${e(`codexAuth.pausedHint`)}`:e(`codexAuth.pause`),children:[t.paused?(0,z.jsx)(ce,{width:14}):(0,z.jsx)(se,{width:14}),(0,z.jsx)(Va,{t:e,paused:!!t.paused,saving:c===`__main__`})]}),(0,z.jsxs)(`span`,{className:`card-right`,children:[(0,z.jsx)(be,{width:14}),` `,e(`codexAuth.appLogin`)]})]}),(0,z.jsxs)(`div`,{className:`card-sub`,children:[t?.email||e(`codexAuth.appLogin`),t?.plan?` · ${t.plan}`:``]}),y&&(0,z.jsx)(`div`,{className:`card-sub faint`,children:y}),_&&(0,z.jsx)(`div`,{className:`card-sub faint`,children:e(`pws.healthCooldownHint`)}),g?(0,z.jsx)(`div`,{className:`card-sub faint`,children:e(`codexAuth.mainTokenExpired`)}):!_&&(0,z.jsx)(Br,{quota:t?.quota??null,plan:t?.plan,threshold:i,t:e,pending:t!=null&&t.quota==null})]})}function qa({t:e,embedded:t,refreshingQuota:n,pausingExhausted:r,pauseBusy:i,actionFeedback:a,actionFeedbackTone:o,onRefresh:s,onPauseExhausted:c}){return(0,z.jsxs)(`div`,{className:t?`row`:`page-head codex-auth-page-head`,style:t?{justifyContent:`flex-end`,marginBottom:8}:void 0,children:[!t&&(0,z.jsx)(`h2`,{className:`page-title`,children:e(`nav.codexAuth`)}),(0,z.jsxs)(`div`,{className:t?`row`:`codex-auth-page-head__actions`,children:[(0,z.jsx)(`span`,{className:`codex-auth-page-head__feedback${o===`ok`?` is-ok`:``}${o===`err`?` is-err`:``}`,role:`status`,"aria-live":`polite`,children:a??``}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-ghost codex-auth-action-btn`,onClick:c,disabled:n||r||!!i,children:[(0,z.jsx)(se,{width:14}),` `,e(r?`codexAuth.pausingExhausted`:`codexAuth.pauseExhausted`)]}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-ghost codex-auth-action-btn`,onClick:s,disabled:n||r||!!i,children:[(0,z.jsx)(q,{width:14}),` `,e(n?`codexAuth.refreshingQuota`:`codexAuth.refreshQuota`)]})]})]})}function Ja({t:e,loadState:t,accountsCount:n,onRetry:r}){return t===`loading`&&n===0?(0,z.jsxs)(`div`,{className:`codex-auth-load-skeleton`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,children:[(0,z.jsxs)(`div`,{className:`card codex-auth-load-skeleton__main`,style:{marginBottom:12},"aria-hidden":`true`,children:[(0,z.jsxs)(`div`,{className:`card-head`,children:[(0,z.jsx)(`span`,{className:`dot dot-muted`}),(0,z.jsx)(`strong`,{children:e(`codexAuth.mainAccount`)}),(0,z.jsxs)(`span`,{className:`card-badges`,children:[(0,z.jsxs)(`span`,{className:`badge badge-muted codex-ticket-badge-slot`,"aria-hidden":`true`,children:[(0,z.jsx)(xe,{width:12}),`0`]}),(0,z.jsx)(`span`,{className:`badge badge-primary`,children:e(`codexAuth.nextSession`)})]}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,tabIndex:-1,disabled:!0,children:[(0,z.jsx)(se,{width:14}),` `,e(`codexAuth.pause`)]}),(0,z.jsxs)(`span`,{className:`card-right`,children:[(0,z.jsx)(be,{width:14}),` `,e(`codexAuth.appLogin`)]})]}),(0,z.jsxs)(`div`,{className:`card-sub`,children:[(0,z.jsx)(`span`,{className:`codex-auth-load-skeleton__strut`,children:e(`codexAuth.appLogin`)}),(0,z.jsx)(`span`,{className:`codex-auth-load-skeleton__line codex-auth-load-skeleton__line--sub`})]}),(0,z.jsx)(Br,{quota:null,threshold:0,t:e,pending:!0})]}),(0,z.jsxs)(`div`,{className:`section-sep`,"aria-hidden":`true`,children:[(0,z.jsx)(`span`,{className:`section-label`,children:e(`codexAuth.accountPool`)}),(0,z.jsx)(`div`,{className:`sep-line`}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,tabIndex:-1,disabled:!0,children:[(0,z.jsx)(oe,{width:14}),` `,e(`codexAuth.add`)]})]}),(0,z.jsx)(`div`,{className:`empty codex-auth-pool-empty codex-auth-load-skeleton__empty`,"aria-hidden":`true`,children:(0,z.jsx)(`div`,{className:`title`,children:e(`codexAuth.noPool`)})}),(0,z.jsx)(`span`,{className:`sr-only`,children:e(`pws.accountsLoading`)})]}):t===`error`?(0,z.jsxs)(`div`,{className:`pwi-auth-state pwi-auth-state--error`,role:`alert`,children:[(0,z.jsx)(`span`,{children:e(`codexAuth.loadFailed`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:r,children:e(`pws.retryAccounts`)})]}):null}function Ya(e,t){return t===void 0?e(`codexAuth.resetSuccessGeneric`):e(`codexAuth.resetSuccess`,{remaining:String(t)})}async function Xa(e,t,n,r){try{let i=await lt(await fetch(`${e}/api/codex-auth/reset-credits/consume`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({accountId:t})}));return i?i.code===`reset`||i.code===`already_redeemed`?(await r(!0),{ok:!0,close:!0,toast:Ya(n,typeof i.remaining==`number`&&Number.isFinite(i.remaining)?Math.max(0,i.remaining):void 0)}):{ok:!1,close:!0,toast:n(i.code===`nothing_to_reset`?`codexAuth.resetNothingToReset`:i.code===`no_credit`?`codexAuth.resetNoCredit`:`codexAuth.resetError`)}:{ok:!1,toast:n(`codexAuth.resetError`)}}catch{return{ok:!1,toast:n(`codexAuth.resetError`)}}}var Za=`ocx doctor`;function Qa({apiBase:e,accountModeState:t=null,banner:n=null,embedded:r=!1,onActiveNeedsReauthChange:i,controller:a}){let o=Y(),s=Ta(e,{updated:o(`codexAuth.autoSwitchUpdated`),updateFailed:o(`codexAuth.autoSwitchUpdateFailed`),invalid:o(`codexAuth.autoSwitchThresholdInvalid`)}),[c,l]=(0,_.useState)(null),{beginServerRead:u,acceptServerRead:d,rejectServerRead:f,hydrateServerValue:p}=s,m=ca(e,!a),h=a??m,{accounts:g,activeId:v,loadState:y,switchingId:b,pauseUpdatingId:x,pausingExhausted:S,load:C}=h,[w,T]=(0,_.useState)(null),[E,D]=(0,_.useState)(!1),[O,k]=(0,_.useState)(null),[A,j]=(0,_.useState)(null),[M,N]=(0,_.useState)(null),P=(0,_.useRef)(null),[F,I]=(0,_.useState)(!1),[L,R]=(0,_.useState)(null),[B,V]=(0,_.useState)(!1),[H,U]=(0,_.useState)(!1),[W,ee]=(0,_.useState)(null),[G,te]=(0,_.useState)(!1),ne=qi(),K=(0,_.useCallback)((e,t=!1)=>{P.current&&clearTimeout(P.current),j(e),N(t?`err`:`ok`),P.current=setTimeout(()=>{j(null),N(null),P.current=null},5e3)},[]);(0,_.useEffect)(()=>()=>{P.current&&clearTimeout(P.current)},[]);let re=(0,_.useCallback)(e=>{ne.copy(Za,e)},[ne]),{subscribeLoadObserver:ie,readLastThreshold:ae}=h;(0,_.useEffect)(()=>ie({beginActiveRead:u,acceptActiveRead:d,rejectActiveRead:f}),[ie,u,d,f]),(0,_.useEffect)(()=>{let e=ae();e!==void 0&&p(e)},[ae,p]),(0,_.useEffect)(()=>{if(!E)return;let e=h.pauseRefresh();return()=>h.resumeRefresh(e)},[h,E]);let q=v&&v!==`__main__`?g.find(e=>e.id===v):null,se=!q?.paused&&Pi(q);(0,_.useEffect)(()=>{i?.(se)},[se,i]);let ce=(0,_.useCallback)(e=>{k(e),D(!0)},[]),le=(0,_.useCallback)(()=>{D(!1),k(null)},[]),J=(0,_.useCallback)(()=>{h.syncAfterAccountAdded(),K(o(`codexAuth.accountAdded`)),le()},[le,h,K,o]),ue=async e=>{let n=await h.switchAccount(e);if(!n.ok){if(n.reason===`busy`)return;K(o(`codexAuth.switchFailed`),!0);return}T(null);let r=n.activeId,i=r&&r!==`__main__`?g.find(e=>e.id===r)?.email??o(`pws.accountOrdinal`,{count:`1`}):o(`codexAuth.mainAccount`);K(o(t===`direct`?`codexAuth.poolPreparedToast`:`codexAuth.switched`,{email:i}))},de=async e=>{let t=window.prompt(o(`prov.aliasPrompt`),e.alias??``);if(t===null)return;let n=await h.saveAlias(e.id,t);K(o(n.ok?`prov.aliasSaved`:`prov.aliasSaveFailed`),!n.ok)},fe=async e=>{let t=!e.paused,n=await h.setAccountPaused(e.id,t);!n.ok&&n.reason===`busy`||(T(t=>t?.id===e.id?null:t),K(o(n.ok?t?`codexAuth.pauseSucceeded`:`codexAuth.resumeSucceeded`:t?`codexAuth.pauseFailed`:`codexAuth.resumeFailed`,{email:e.alias??e.email}),!n.ok))},pe=async e=>{let t=g.find(t=>t.id===e)?.email??o(`pws.accountOrdinal`,{count:`1`});window.confirm(o(`codexAuth.removeConfirm`,{id:t}))&&((await h.removeAccount(e)).ok||K(o(`codexAuth.removeFailed`),!0))},me=async()=>{I(!0);try{let e=await C(!0);K(o(e?`codexAuth.quotaRefreshed`:`codexAuth.quotaRefreshFailed`),!e)}finally{I(!1)}},he=async()=>{let e=await h.pauseExhaustedAccounts();!e.ok&&e.reason===`busy`||K(e.ok?e.pausedCount>0?o(`codexAuth.pauseExhaustedSucceeded`,{count:String(e.pausedCount)}):o(`codexAuth.pauseExhaustedNone`):o(`codexAuth.pauseExhaustedFailed`),!e.ok)},ge=async t=>{R(t),V(!1),ee(null),te(!0);try{let n=await lt(await fetch(`${e}/api/codex-auth/reset-credits?accountId=${encodeURIComponent(t.id)}`));n&&ee((n.credits??[]).sort((e,t)=>new Date(e.granted_at).getTime()-new Date(t.granted_at).getTime()))}catch{}finally{te(!1)}},_e=async t=>{U(!0);try{let n=await Xa(e,t,o,C);n.close&&(R(null),V(!1)),n.toast&&K(n.toast,!n.ok)}finally{U(!1)}},ve=g.find(e=>e.isMain),ye=g.filter(e=>!e.isMain),be=!ve?.paused&&(!v||v===`__main__`),xe=o(t===`direct`?`codexAuth.prepareForPool`:`codexAuth.setAsNext`),Se=x!==null||S,Ce=s.threshold??0;return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(qa,{t:o,embedded:r,refreshingQuota:F,actionFeedback:A,actionFeedbackTone:M,pausingExhausted:S,pauseBusy:Se,onRefresh:()=>{me()},onPauseExhausted:()=>{he()}}),n,(0,z.jsx)(Ja,{t:o,loadState:y,accountsCount:g.length,onRetry:()=>{C()}}),!(y===`loading`&&g.length===0)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ka,{t:o,main:ve,isMainActive:be,accountModeState:t,threshold:Ce,switchActionLabel:xe,onSwitch:T,onTogglePause:fe,pauseUpdatingId:x,pauseBusy:Se,onOpenReset:ge,onCopyDoctor:re,doctorCopyOutcomeFor:ne.outcomeFor}),(0,z.jsxs)(`div`,{className:`section-sep`,children:[(0,z.jsx)(`span`,{className:`section-label`,children:o(`codexAuth.accountPool`)}),(0,z.jsx)(`div`,{className:`sep-line`}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,onClick:()=>D(!0),children:[(0,z.jsx)(oe,{width:14}),` `,o(`codexAuth.add`)]})]}),se&&q&&(0,z.jsx)(Ua,{onReauth:()=>ce(q.id)}),ye.length===0&&(0,z.jsx)(it,{title:o(`codexAuth.noPool`)}),(0,z.jsx)(Ha,{pool:ye,activeId:v,accountModeState:t,switchActionLabel:xe,threshold:Ce,onOpenReset:ge,onSwitch:T,onTogglePause:fe,pauseUpdatingId:x,pauseBusy:Se,onReauth:ce,onEditAlias:de,onRemove:pe,onCopyDoctor:re,doctorCopyOutcomeFor:ne.outcomeFor})]}),c!==null&&(0,z.jsx)(fa,{threshold:s.threshold,draft:s.draft,strategy:c,hydrated:s.hydrated,saving:s.saving,loadError:s.loadError,feedback:s.feedback,onDraftChange:s.setDraft,onEditingChange:s.setEditing,onCommit:s.commit,onCancel:s.cancel,onToggle:s.toggle,onRetry:()=>{s.retry(),C()}}),(0,z.jsx)(wa,{apiBase:e,subscribeLoadObserver:h.subscribeLoadObserver,readLastActive:h.readLastActive,onStrategyResolved:l}),w&&(0,z.jsx)(Wa,{confirm:w,mainEmail:ve?.email,accountModeState:t,switchingId:b,onCancel:()=>T(null),onConfirm:()=>{ue(w.id===`__main__`?`__main__`:w.id)}}),L&&(0,z.jsx)(Ga,{resetPopup:L,resetConfirm:B,creditDetails:W,creditDetailsLoading:G,redeeming:H,onClose:()=>{R(null),V(!1),ee(null)},onShowConfirm:()=>V(!0),onCancelConfirm:()=>V(!1),onRedeem:()=>{_e(L.id)}}),E&&(0,z.jsx)(Zi,{apiBase:e,reauthAccountId:O??void 0,onClose:le,onAdded:J})]})}function $a({apiBase:e,accountCount:t}){let n=Y(),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(`80`),[s,c]=(0,_.useState)(`1`),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let t=!1,n=new AbortController;return Promise.resolve().then(()=>fetch(`${e}/api/oauth/accounts/pool?provider=anthropic`,{signal:n.signal})).then(e=>{if(!e.ok)throw Error(`load`);return e.json()}).then(e=>{if(t)return;let n=typeof e.autoSwitchThreshold==`number`?e.autoSwitchThreshold:80,r=_a(e.stickyLimit);i({enabled:e.enabled===!0,threshold:n,strategy:ga(e.strategy),stickyLimit:r}),o(String(n)),c(String(r)),m(!1)}).catch(()=>{t||n.signal.aborted||m(!0)}),()=>{t=!0,n.abort()}},[e]);let h=(0,_.useCallback)(async t=>{let a=r;i({enabled:t.enabled,threshold:t.threshold,strategy:t.strategy,stickyLimit:t.stickyLimit}),u(!0),f(null);try{let n=await fetch(`${e}/api/oauth/accounts/pool`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({provider:`anthropic`,enabled:t.enabled,autoSwitchThreshold:t.threshold,strategy:t.strategy,stickyLimit:t.stickyLimit})});if(!n.ok)throw Error(`save`);let r=await n.json().catch(()=>null),a=ga(r?.strategy??t.strategy),s=_a(r?.stickyLimit??t.stickyLimit);i({enabled:t.enabled,threshold:t.threshold,strategy:a,stickyLimit:s}),o(String(t.threshold)),c(String(s))}catch{f(n(`anthropicPool.saveFailed`)),a&&(i(a),o(String(a.threshold)),c(String(a.stickyLimit)))}finally{u(!1)}},[e,r,n]),g=r?.enabled===!0,v=r?.threshold??80,y=r?.strategy??`quota`,b=r?.stickyLimit??1,x=r===null&&!p,S=x||l||p||!g&&t<2;return(0,z.jsxs)(`div`,{className:`card`,style:{marginTop:12},"aria-busy":x||l,children:[(0,z.jsxs)(`div`,{className:`card-row`,style:{alignItems:`flex-start`,gap:12},children:[(0,z.jsxs)(`div`,{style:{flex:1},children:[(0,z.jsx)(`strong`,{children:n(`anthropicPool.title`)}),(0,z.jsx)(`div`,{className:`card-sub`,style:{marginTop:4},children:p?n(`anthropicPool.loadFailed`):x?n(`common.loading`):g?n(`anthropicPool.enabledDesc`,{threshold:v}):n(`anthropicPool.disabledDesc`)})]}),(0,z.jsxs)(`label`,{className:`toggle`,style:{display:`inline-flex`,alignItems:`center`,gap:8},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:g,disabled:S,onChange:e=>{let t=e.target.checked;h({enabled:t,threshold:v,strategy:y,stickyLimit:b})}}),(0,z.jsx)(`span`,{children:n(g?`anthropicPool.on`:`anthropicPool.off`)})]})]}),(0,z.jsx)(`div`,{role:`alert`,className:`card-sub`,style:{marginTop:10,padding:`8px 10px`,border:`1px solid var(--border, #c9a227)`,borderRadius:6,background:`color-mix(in srgb, var(--warn, #c9a227) 12%, transparent)`},children:n(`anthropicPool.experimentalWarning`)}),t<2&&(0,z.jsx)(`div`,{className:`card-sub`,style:{marginTop:8},children:n(`anthropicPool.needTwoAccounts`)}),g&&r&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`label`,{className:`field`,style:{display:`block`,marginTop:12},children:[(0,z.jsx)(`span`,{className:`field-label`,children:n(`anthropicPool.threshold`)}),(0,z.jsx)(`input`,{className:`input mono`,type:`number`,min:0,max:100,step:1,value:a,disabled:l,"aria-label":n(`anthropicPool.thresholdAria`),onChange:e=>o(e.target.value),onBlur:()=>{let e=Number(a);if(!Number.isInteger(e)||e<0||e>100){o(String(v)),f(n(`anthropicPool.thresholdInvalid`));return}e!==v&&h({enabled:!0,threshold:e,strategy:y,stickyLimit:b})}}),(0,z.jsx)(`div`,{className:`card-sub`,style:{marginTop:4},children:n(`anthropicPool.thresholdHelp`)})]}),(0,z.jsx)(Sa,{strategy:y,stickyDraft:s,disabled:l,strategySelectId:`anthropic-pool-strategy`,stickyInputId:`anthropic-pool-sticky-limit`,onStrategyChange:e=>{e!==y&&h({enabled:!0,threshold:v,strategy:e,stickyLimit:b})},onStickyDraftChange:c,onStickyCommit:e=>{let t=va(e??s);if(t===null){c(String(b)),f(n(`accountPool.stickyLimitInvalid`));return}if(t===b){c(String(t));return}h({enabled:!0,threshold:v,strategy:y,stickyLimit:t})}})]}),d&&(0,z.jsx)(`div`,{role:`alert`,className:`card-sub`,style:{marginTop:8,color:`var(--danger, #c44)`},children:d})]})}var $=`ocx doctor`,eo=4e3,to=[],no=[];function ro({item:e,apiBase:t,oauth:n,accounts:r=to,keys:i=no,accountLoadState:a=`ready`,switchingAccountId:o=null,busy:s=!1,loginHint:c,authHandlers:l,onCodexActiveNeedsReauthChange:u,codexController:d}){let f=Y(),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!1),S=qi(),C=qi();(0,_.useEffect)(()=>{if(r.length===0){x(!1);return}if(!r.some(e=>e.quota==null&&!e.quotaUnavailable)){x(!1);return}x(!0);let e=window.setTimeout(()=>x(!1),eo);return()=>window.clearTimeout(e)},[r]);let w=Zr({...e,hasApiKey:e.hasApiKey||i.length>0}),T=w===`oauth-accounts`,E=w===`api-keys`;if(w===`codex-accounts`)return(0,z.jsxs)(`section`,{className:`pwi-section pwi-auth-section`,"aria-label":f(`pws.availableAccounts`),children:[(0,z.jsx)(`h3`,{className:`pwi-section-title`,children:f(`pws.availableAccounts`)}),(0,z.jsx)(`div`,{className:`pwi-auth-body`,children:(0,z.jsx)(Qa,{apiBase:t,embedded:!0,controller:d,onActiveNeedsReauthChange:u})})]});if(!w||!l)return null;let D=c?.provider===e.name?c:null,O=D?.deviceCode??``,k=S.outcomeFor(O),A=f(k===`copied`?`prov.codeCopied`:k===`unavailable`?`prov.linkCopyUnavailable`:`prov.copyCode`),j=r.length>0||n?.loggedIn===!0,M=r.find(e=>e.active&&e.needsReauth),N=!!M,P=async()=>{let t=h.trim();if(t){y(!0);try{await l.onAddApiKey(e.name,t)&&(g(``),m(!1))}finally{y(!1)}}};return(0,z.jsxs)(`section`,{className:`pwi-section pwi-auth-section`,"aria-label":f(T?`pws.availableAccounts`:`pws.apiKeys`),children:[(0,z.jsx)(`h3`,{className:`pwi-section-title`,children:f(T?`pws.availableAccounts`:`pws.apiKeys`)}),(0,z.jsxs)(`div`,{className:`pwi-auth-body`,children:[T&&(0,z.jsxs)(z.Fragment,{children:[e.name===`anthropic`&&(0,z.jsx)($a,{apiBase:t,accountCount:r.length}),(0,z.jsxs)(`div`,{className:`pwi-auth-status-row`,children:[(0,z.jsx)(`span`,{className:`pwi-auth-dot ${N?`pwi-auth-dot--warn`:j?`pwi-auth-dot--ok`:`pwi-auth-dot--off`}`,"aria-hidden":`true`}),(0,z.jsx)(`span`,{className:`pwi-auth-status-text`,children:j?r.length>0?f(`pws.loggedInTitle`):n?.email??f(`pws.loggedInTitle`):n?.error||f(`pws.notLoggedInTitle`)}),(0,z.jsxs)(`span`,{className:`pwi-auth-actions`,children:[M&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:s,onClick:()=>void l.onReauth(e.name,M.id),children:f(`pws.reauthenticate`)}),j?(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void l.onLogout(e.name),children:f(`prov.logout`)}):(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:s,onClick:()=>void l.onLogin(e.name,!1),children:[s?(0,z.jsx)(`span`,{className:`pwi-spin-inline`,"aria-hidden":`true`}):(0,z.jsx)(be,{style:{width:13,height:13},"aria-hidden":`true`}),f(s?`prov.waitingBrowser`:`prov.login`)]})]})]}),s&&D&&(0,z.jsxs)(`div`,{className:`pwi-auth-wait`,children:[(0,z.jsx)(`span`,{className:`pwi-spin-inline`,"aria-hidden":`true`}),(0,z.jsxs)(`div`,{className:`pwi-auth-wait-copy`,children:[(0,z.jsx)(`div`,{className:`pwi-auth-wait-title`,children:f(`prov.waitingBrowser`)}),D.deviceCode&&(0,z.jsxs)(`div`,{className:`pwi-device-code-wrap`,children:[(0,z.jsx)(`span`,{children:f(`prov.deviceCode`)}),(0,z.jsx)(`code`,{className:`pwi-device-code`,children:D.deviceCode}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>S.copy(O,O),children:(0,z.jsx)(`span`,{"aria-live":`polite`,children:A})})]}),(0,z.jsx)(Ji,{url:D.url??``}),l.onCancelLogin&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void l.onCancelLogin?.(e.name),children:f(`common.cancel`)})]})]}),a===`loading`&&r.length===0&&(0,z.jsxs)(`div`,{className:`pwi-auth-state`,role:`status`,children:[(0,z.jsx)(`span`,{className:`pwi-spin-inline`,"aria-hidden":`true`}),f(`pws.accountsLoading`)]}),a===`error`&&(0,z.jsxs)(`div`,{className:`pwi-auth-state pwi-auth-state--error`,role:`alert`,children:[(0,z.jsx)(`span`,{children:f(`pws.accountsLoadFailed`)}),l.onRetryAccounts&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void l.onRetryAccounts?.(e.name),children:f(`pws.retryAccounts`)})]}),r.length>0&&(0,z.jsx)(`ul`,{className:`pwi-auth-list`,children:r.map(t=>{let n=Qr(r,t,f),i=o===t.id,a=t.health?.status,c=!!t.needsReauth||Ni(a),u=Ii(a),d=Fi(a),p=Ai(t.id),m=Ri(f,t.health),h=zi(f,e.name,t.id,t.health);return(0,z.jsxs)(`li`,{className:`pwi-auth-acct${t.active?` pwi-auth-acct--active`:``}`,children:[(0,z.jsxs)(`div`,{className:`pwi-auth-row${t.active?` pwi-auth-row--active`:``}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`pwi-auth-row-main`,onClick:()=>{!t.active&&!c&&!d&&!o&&l.onSwitchAccount(e.name,t)},"aria-current":t.active?`true`:void 0,"aria-label":`${n}${t.active?` — ${f(`pws.accountCurrent`)}`:``}`,disabled:!!(c||d||o&&!i),children:[(0,z.jsx)(`span`,{className:`pwi-auth-dot ${c?`pwi-auth-dot--warn`:t.active?`pwi-auth-dot--ok`:`pwi-auth-dot--off`}`,"aria-hidden":`true`}),(0,z.jsxs)(`span`,{className:`pwi-auth-row-copy`,children:[(0,z.jsx)(`span`,{className:`pwi-auth-row-label`,children:n}),(0,z.jsx)(`span`,{className:`pwi-auth-row-secondary`,children:[t.email,`${f(`prov.accountId`)}: ${p}`].filter(Boolean).join(` · `)}),h&&(0,z.jsx)(`span`,{className:`pwi-auth-row-secondary faint`,children:h}),d&&(0,z.jsx)(`span`,{className:`pwi-auth-row-secondary faint`,children:f(`pws.healthCooldownHint`)})]}),t.plan&&(0,z.jsx)(`span`,{className:`badge badge-green`,title:f(`pws.accountPlan`),children:t.plan}),m&&(0,z.jsx)(`span`,{className:Mi(a),children:m}),c&&!m&&(0,z.jsx)(`span`,{className:`badge badge-amber`,children:f(`pws.reauth`)}),t.active&&(0,z.jsx)(`span`,{className:`badge badge-primary`,children:f(`prov.accountActive`)}),i&&(0,z.jsx)(`span`,{className:`badge badge-muted`,children:f(`pws.accountSwitching`)})]}),c&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:s||!!o,onClick:()=>void l.onReauth(e.name,t.id),children:f(`pws.reauthenticate`)}),u&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm codex-auth-action-btn`,onClick:()=>{C.copy($,t.id)},children:(0,z.jsx)(`span`,{"aria-live":`polite`,children:Hi(f,C.outcomeFor(t.id))})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void l.onEditAlias(e.name,`oauth`,t.id,t.alias),children:f(`prov.editAlias`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm pwi-auth-row-remove`,"aria-label":`${f(`common.remove`)} — ${n}`,title:`${f(`common.remove`)} — ${n}`,disabled:!!o,onClick:()=>void l.onRemoveAccount(e.name,t),children:(0,z.jsx)(le,{style:{width:13,height:13},"aria-hidden":`true`})})]}),(t.quota!=null||t.quotaUnavailable||t.plan||b&&t.quota==null)&&(0,z.jsx)(`div`,{className:`pwi-auth-acct-quota`,children:t.quotaUnavailable?(0,z.jsx)(`p`,{className:`muted pwi-auth-acct-quota-stale`,children:f(`pws.accountQuotaUnavailable`)}):t.quota==null?t.plan?(0,z.jsx)(`p`,{className:`muted pwi-auth-acct-quota-stale`,children:f(`pws.accountPlanOnly`,{plan:t.plan})}):(0,z.jsx)(Br,{quota:null,plan:null,threshold:80,t:f,layout:`stacked`,pending:!0}):(0,z.jsx)(Br,{quota:t.quota,plan:t.plan??null,threshold:80,t:f,layout:`stacked`})})]},t.id)})}),a===`ready`&&j&&r.length===0&&(0,z.jsx)(`div`,{className:`pwi-auth-state pwi-auth-state--empty`,children:f(`pws.noAccounts`)}),j&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{marginTop:8},onClick:()=>void l.onLogin(e.name,!0),disabled:s||!!o,children:f(`pws.addAccount`)})]}),E&&(0,z.jsxs)(z.Fragment,{children:[i.length>0&&(0,z.jsx)(`ul`,{className:`pwi-auth-list`,children:i.map(t=>(0,z.jsxs)(`li`,{className:`pwi-auth-row${t.active?` pwi-auth-row--active`:``}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`pwi-auth-row-main`,onClick:()=>void l.onSwitchApiKey(e.name,t),disabled:t.active,children:[(0,z.jsx)(`span`,{className:`pwi-auth-dot ${t.active?`pwi-auth-dot--ok`:`pwi-auth-dot--off`}`,"aria-hidden":`true`}),(0,z.jsxs)(`span`,{className:`pwi-auth-row-copy`,children:[(0,z.jsx)(`span`,{className:`pwi-auth-row-label`,children:t.label??t.masked}),t.label&&(0,z.jsxs)(`code`,{className:`pwi-auth-row-secondary`,children:[t.masked,` · `,f(`prov.accountId`),`: `,t.id]})]}),t.active&&(0,z.jsx)(`span`,{className:`badge badge-primary`,children:f(`prov.accountActive`)})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void l.onEditAlias(e.name,`api-key`,t.id,t.label),children:f(`prov.editAlias`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm pwi-auth-row-remove`,"aria-label":`${f(`common.remove`)} — ${t.label??t.masked}`,title:`${f(`common.remove`)} — ${t.label??t.masked}`,onClick:()=>void l.onRemoveApiKey(e.name,t),children:(0,z.jsx)(le,{style:{width:13,height:13},"aria-hidden":`true`})})]},t.id))}),p?(0,z.jsxs)(`div`,{className:`pwi-auth-add-key`,children:[(0,z.jsx)(`input`,{className:`input`,type:`password`,value:h,onChange:e=>g(e.target.value),placeholder:f(`modal.apiKeyPlaceholder`),autoComplete:`off`,disabled:v}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>void P(),disabled:v||!h.trim(),children:f(v?`pws.saving`:`pws.addKey`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>{m(!1),g(``)},children:f(`common.cancel`)})]}):(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{marginTop:8},onClick:()=>m(!0),children:f(`pws.addKey`)})]})]})]})}function io(e,t,n){let r=e?.find(e=>e.id===t);if(!r)return n;if(r.baseUrl)return r.baseUrl;let i=new Set((e??[]).map(e=>e.baseUrl?.trim().replace(/\/+$/,``)).filter(e=>!!e)),a=n.trim().replace(/\/+$/,``);return i.has(a)?``:n}function ao(e,t){if(!e?.length)return`custom`;let n=t.trim().replace(/\/+$/,``);for(let t of e)if(t.baseUrl&&t.baseUrl.trim().replace(/\/+$/,``)===n)return t.id;return e.some(e=>e.id===`custom`)?`custom`:e[0].id}function oo(e,t,n){let r=e?.find(e=>e.id===t);return r?.baseUrl?r.baseUrl.trim():n.trim()}var so=[`openai-responses`,`openai-chat`,`anthropic`,`google`,`azure-openai`,`cursor`],co=[];function lo({item:e,availableModels:t=co,apiBase:n,onUpdateProvider:r,onDirtyChange:i,onRegisterSave:a}){let o=Y(),s=String(e.authMode??(e.keyOptional?`local`:`key`)),[c,l]=(0,_.useState)(e.adapter),[u,d]=(0,_.useState)(e.baseUrl),[f,p]=(0,_.useState)(e.defaultModel??``),[m,h]=(0,_.useState)(s),[g,v]=(0,_.useState)(e.apiKeyTransport??`x-api-key`),[y,b]=(0,_.useState)(e.note??``),[x,S]=(0,_.useState)(e.allowPrivateNetwork??!1),[C,w]=(0,_.useState)(e.liveModels!==!1),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(),[j,M]=(0,_.useState)(n?`loading`:`idle`),[N,P]=(0,_.useState)(()=>`custom`);(0,_.useEffect)(()=>{l(e.adapter),d(e.baseUrl),p(e.defaultModel??``),h(String(e.authMode??(e.keyOptional?`local`:`key`))),v(e.apiKeyTransport??`x-api-key`),b(e.note??``),S(e.allowPrivateNetwork??!1),w(e.liveModels!==!1),O(null),queueMicrotask(()=>P(ao(k,e.baseUrl)))},[e.adapter,e.baseUrl,e.defaultModel,e.authMode,e.apiKeyTransport,e.keyOptional,e.note,e.allowPrivateNetwork,e.liveModels,k]),(0,_.useEffect)(()=>{if(!n)return;let t=!1,r=e.name,i=e.baseUrl;return fetch(`${n}/api/provider-presets`).then(e=>lt(e)).then(e=>{if(t)return;if(!e){A(void 0),M(`error`);return}let n=(e.providers??[]).find(e=>e.id===r)?.baseUrlChoices;A(n),M(`ready`),P(ao(n,i))}).catch(()=>{t||(A(void 0),M(`error`))}),()=>{t=!0}},[n,e.name]);let F=c.trim()!==e.adapter||u.trim()!==e.baseUrl||f.trim()!==(e.defaultModel??``)||m!==String(e.authMode??(e.keyOptional?`local`:`key`))||c.trim()===`anthropic`&&m===`key`&&g!==(e.apiKeyTransport??`x-api-key`)||y.trim()!==(e.note??``)||x!==(e.allowPrivateNetwork??!1)||C!==(e.liveModels!==!1);(0,_.useEffect)(()=>(i?.(F),()=>i?.(!1)),[F,i]);let I=(0,_.useMemo)(()=>{let n=new Set(t);return f.trim()&&n.add(f.trim()),e.defaultModel&&n.add(e.defaultModel),[...n].sort((e,t)=>e.localeCompare(t))},[t,f,e.defaultModel]),L=(0,_.useMemo)(()=>{let e=[...so];return c&&!e.includes(c)&&e.unshift(c),e},[c]),R=yr(e.name),B=j===`ready`&&!!(k&&k.length>0),V=c.trim()===`anthropic`&&m===`key`,H=R&&j!==`error`,U=async()=>{if(!r)return O({ok:!1,text:o(`pws.updatesUnavailable`)}),!1;let t=B?oo(k,N,u):u.trim();if(!c.trim()||!t)return O({ok:!1,text:o(`pws.adapterBaseRequired`)}),!1;E(!0),O(null);try{let n={adapter:c.trim(),baseUrl:t,defaultModel:f.trim(),authMode:m,note:y.trim(),allowPrivateNetwork:x};C!==(e.liveModels!==!1)&&(n.liveModels=C),V?n.apiKeyTransport=g:e.apiKeyTransport!==void 0&&(n.apiKeyTransport=``);let i=await r(e.name,n);return O(i.ok?{ok:!0,text:o(`pws.settingsSaved`)}:{ok:!1,text:i.error||o(`prov.saveFailed`)}),i.ok}finally{E(!1)}},W=(0,_.useRef)(U);(0,_.useEffect)(()=>{W.current=U}),(0,_.useEffect)(()=>{if(a)return a(()=>W.current()),()=>a(null)},[a]);let ee=()=>{l(e.adapter),d(e.baseUrl),p(e.defaultModel??``),h(s),v(e.apiKeyTransport??`x-api-key`),b(e.note??``),S(e.allowPrivateNetwork??!1),w(e.liveModels!==!1),O(null),P(ao(k,e.baseUrl))},G=(e,t)=>{switch(e){case`token-plan`:return o(`modal.endpoint.tokenPlan`);case`payg`:return o(`modal.endpoint.payAsYouGo`);case`custom`:return o(`modal.endpoint.custom`);default:return t}};return(0,z.jsxs)(`div`,{className:`pwi-settings-form`,children:[(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsxs)(`span`,{className:`pwi-settings-label`,children:[(0,z.jsx)(be,{style:{width:12,height:12}}),` `,o(`pws.providerId`)]}),(0,z.jsx)(`input`,{className:`input`,value:e.name,readOnly:!0,disabled:!0})]}),(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`modal.adapter`)}),R?(0,z.jsx)(`input`,{className:`input`,value:c,readOnly:!0,disabled:!0}):(0,z.jsx)(`select`,{className:`input`,value:c,onChange:e=>l(e.target.value),children:L.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))})]}),B?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`modal.endpoint`)}),(0,z.jsx)(`select`,{className:`input`,value:N,onChange:e=>{let t=e.target.value;P(t),d(io(k,t,u))},children:k.map(e=>(0,z.jsx)(`option`,{value:e.id,children:G(e.id,e.label)},e.id))})]}),N===`custom`&&(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`modal.baseUrl`)}),(0,z.jsx)(`input`,{className:`input`,value:u,onChange:e=>d(e.target.value),placeholder:o(`modal.baseUrlPlaceholder`)})]})]}):(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`modal.baseUrl`)}),(0,z.jsx)(`input`,{className:`input`,value:u,onChange:e=>d(e.target.value),readOnly:H,disabled:H})]}),(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`pws.cell.defaultModel`)}),I.length>0?(0,z.jsxs)(`select`,{className:`input`,value:f,onChange:e=>p(e.target.value),children:[(0,z.jsx)(`option`,{value:``,children:o(`pws.defaultModelNone`)}),I.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))]}):(0,z.jsx)(`input`,{className:`input`,value:f,onChange:e=>p(e.target.value),placeholder:o(`pws.optionalPlaceholder`)})]}),(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`pws.authMode`)}),R?(0,z.jsx)(`input`,{className:`input`,value:xr(e,o),readOnly:!0,disabled:!0}):(0,z.jsxs)(`select`,{className:`input`,value:m,onChange:e=>h(e.target.value),children:[(0,z.jsx)(`option`,{value:`key`,children:o(`modal.badge.apiKey`)}),(0,z.jsx)(`option`,{value:`forward`,children:o(`pws.auth.chatgptPassthrough`)}),(0,z.jsx)(`option`,{value:`oauth`,children:o(`modal.badge.oauth`)}),(0,z.jsx)(`option`,{value:`local`,children:o(`modal.badge.local`)})]})]}),V&&(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`modal.apiKeyTransport`)}),(0,z.jsxs)(`select`,{className:`input`,value:g,onChange:e=>v(e.target.value),children:[(0,z.jsx)(`option`,{value:`x-api-key`,children:o(`modal.apiKeyTransportNative`)}),(0,z.jsx)(`option`,{value:`bearer`,children:o(`modal.apiKeyTransportBearer`)})]})]}),(0,z.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`pws.note`)}),(0,z.jsx)(`textarea`,{className:`input pwi-settings-textarea`,value:y,onChange:e=>b(e.target.value),rows:2})]}),(0,z.jsxs)(`label`,{className:`pwi-settings-field`,style:{flexDirection:`row`,alignItems:`center`,gap:8},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>S(e.target.checked)}),(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`pws.allowPrivateNetwork`)})]}),(0,z.jsxs)(`label`,{className:`pwi-settings-field`,style:{flexDirection:`row`,alignItems:`flex-start`,gap:8},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:C,onChange:e=>w(e.target.checked)}),(0,z.jsxs)(`span`,{children:[(0,z.jsx)(`span`,{className:`pwi-settings-label`,children:o(`pws.liveModels`)}),(0,z.jsx)(`span`,{className:`muted text-label`,style:{display:`block`,marginTop:2},children:o(`pws.liveModelsDesc`)})]})]}),F&&(0,z.jsxs)(`div`,{className:`pwi-settings-sticky-bar`,children:[(0,z.jsx)(`span`,{className:`muted`,children:o(`pws.settingsUnsavedBar`)}),(0,z.jsxs)(`div`,{className:`pwi-settings-sticky-bar-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:ee,disabled:T,children:o(`pws.discardSettings`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>void U(),disabled:T,children:o(T?`pws.saving`:`pws.saveSettings`)})]})]}),D&&(0,z.jsx)(`div`,{className:D.ok?`pwi-settings-msg pwi-settings-msg--ok`:`pwi-settings-msg pwi-settings-msg--err`,children:D.text})]})}function uo({providerName:e,defaultProviderName:t,onConfirm:n,onCancel:r}){let i=Y();return(0,z.jsx)(`div`,{className:`dialog-backdrop`,onClick:r,children:(0,z.jsxs)(`div`,{className:`dialog`,role:`alertdialog`,"aria-label":i(`pws.removeConfirmTitle`),onClick:e=>e.stopPropagation(),children:[(0,z.jsx)(`h3`,{children:i(`pws.removeConfirmTitle`)}),(0,z.jsx)(`p`,{children:t?i(`pws.removeDefaultConfirmBody`,{name:e,defaultProvider:t}):i(`pws.removeConfirmBody`,{name:e})}),(0,z.jsxs)(`div`,{className:`dialog-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:r,children:i(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-danger`,onClick:n,children:i(`pws.removeConfirm`)})]})]})})}function fo({onSave:e,onDiscard:t,onCancel:n,saving:r=!1}){let i=Y();return(0,z.jsx)(`div`,{className:`dialog-backdrop`,onClick:n,children:(0,z.jsxs)(`div`,{className:`dialog`,role:`alertdialog`,"aria-label":i(`pws.unsavedLeaveTitle`),onClick:e=>e.stopPropagation(),children:[(0,z.jsx)(`h3`,{children:i(`pws.unsavedLeaveTitle`)}),(0,z.jsx)(`p`,{children:i(`pws.unsavedLeaveBody`)}),(0,z.jsxs)(`div`,{className:`dialog-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:n,children:i(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:t,children:i(`pws.discardSettings`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:e,disabled:r,children:i(r?`pws.saving`:`pws.saveSettings`)})]})]})})}function po({item:e,usageTotals:t,modelUsage:n,quotaReport:r,availableModels:i,hasLiveModels:a,selectedModels:o,modelsLoading:s,modelsLoadFailed:c,onRetryModels:l,oauthEmail:u,onDeselect:d,apiBase:f,oauth:p,accounts:m,accountLoadState:h,switchingAccountId:g,keys:v,busyProvider:y,loginHint:b,authHandlers:x,onCodexActiveNeedsReauthChange:S,codexController:C,onUpdateProvider:w,isDefault:T,onRemoveProvider:E,onSetDisabled:D,onSetDefault:O}){let k=Y(),[A,j]=(0,_.useState)(`overview`),[M,N]=(0,_.useState)(!1),[P,F]=(0,_.useState)(null),[I,L]=(0,_.useState)(!1),R=(0,_.useRef)(null),B=(0,_.useCallback)(e=>{R.current=e},[]),V=e.disabled===!0,H=(0,_.useMemo)(()=>Un(e),[e]),U=(0,_.useMemo)(()=>Xn(e),[e]),W=(0,_.useMemo)(()=>Zr(e),[e]),ee=JSON.stringify([C?.activeId??``,m?.find(e=>e.active)?.id??``,v?.find(e=>e.active)?.id??``,p?.loggedIn===void 0?``:String(p.loggedIn),p?.needsReauth===void 0?``:String(p.needsReauth),u??``]),G=(0,_.useMemo)(()=>[{id:`overview`,label:k(`pws.tab.overview`)},{id:`models`,label:k(`pws.tab.models`)},{id:`usage`,label:k(`pws.tab.usage`)},...W?[{id:`accounts`,label:k(W===`api-keys`?`pws.apiKeys`:`pws.tab.accounts`)}]:[],{id:`settings`,label:k(`pws.tab.settings`)}],[W,k]),te=(0,_.useCallback)(e=>{if(M&&A===`settings`&&e!==`settings`){F(e);return}j(e)},[A,M]),ne=(0,_.useCallback)(()=>{if(M&&A===`settings`){F(`deselect`);return}d()},[M,A,d]),K=(0,_.useCallback)((e,t)=>{let n;if(e.key===`ArrowRight`)n=(t+1)%G.length;else if(e.key===`ArrowLeft`)n=(t-1+G.length)%G.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=G.length-1;else return;e.preventDefault(),te(G[n].id),e.currentTarget.parentElement?.querySelectorAll(`[role="tab"]`)[n]?.focus()},[te,G]),re=`pws-tab-${A}`,ie=`pws-panel-${A}`;return(0,z.jsxs)(`div`,{className:`pws-detail`,children:[(0,z.jsx)(`div`,{className:`pws-detail-head`,children:(0,z.jsxs)(`button`,{type:`button`,className:`pws-detail-back-link`,onClick:ne,children:[(0,z.jsx)(he,{className:`pws-detail-back-chevron`,"aria-hidden":`true`}),k(`pws.allProviders`)]})}),(0,z.jsxs)(`div`,{className:`pws-detail-head-main`,children:[(0,z.jsx)(Cr,{name:e.name,adapter:e.adapter,baseUrl:e.baseUrl,cls:`pws-detail-icon`}),(0,z.jsx)(`div`,{className:`pws-detail-title-wrap`,children:(0,z.jsxs)(`h2`,{className:`pws-detail-title`,children:[vr(e.name,k),U&&(0,z.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--local`,children:k(`modal.badge.local`)}),!U&&H&&(0,z.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--free`,children:k(`modal.badge.free`)})]})}),(0,z.jsxs)(`div`,{className:`pws-detail-actions`,children:[!T&&!V&&O&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>O(e.name),children:k(`prov.setDefault`)}),E&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm btn-icon-only`,onClick:()=>E(e.name),"aria-label":k(`pws.removeConfirmTitle`),title:k(`pws.removeConfirmTitle`),children:(0,z.jsx)(le,{style:{width:15,height:15},"aria-hidden":`true`})}),D&&(0,z.jsxs)(`div`,{className:`pws-detail-toggle`,children:[(0,z.jsx)(`span`,{className:`pws-detail-toggle-label`,children:k(`pws.enabledLabel`)}),(0,z.jsx)(nt,{on:!V,onClick:()=>D(e.name,!V),disabled:T,label:k(`pws.enabledLabel`)})]})]})]}),(0,z.jsx)(`div`,{className:`pws-detail-tabs`,role:`tablist`,children:G.map((e,t)=>(0,z.jsx)(`button`,{type:`button`,role:`tab`,id:`pws-tab-${e.id}`,"aria-controls":`pws-panel-${e.id}`,"aria-selected":A===e.id,tabIndex:A===e.id?0:-1,className:`pws-detail-tab${A===e.id?` pws-detail-tab--active`:``}`,onClick:()=>te(e.id),onKeyDown:e=>K(e,t),children:e.label},e.id))}),(0,z.jsxs)(`div`,{className:`pws-detail-panel`,role:`tabpanel`,id:ie,"aria-labelledby":re,tabIndex:0,children:[A===`overview`&&(0,z.jsx)($r,{accountPanel:W?(0,z.jsx)(ro,{item:e,apiBase:f,oauth:p,accounts:m,keys:v,accountLoadState:h,switchingAccountId:g,busy:y===e.name,loginHint:b,authHandlers:x,onCodexActiveNeedsReauthChange:S,codexController:C}):void 0,item:e,apiBase:f,connectionIdentity:ee,usageTotals:t,quotaReport:r,oauthEmail:u,onEditSettings:()=>te(`settings`),onViewUsage:()=>te(`usage`),onUpdateProvider:w,reauthBusy:y===e.name,onCancelLogin:x?.onCancelLogin?()=>void x.onCancelLogin?.(e.name):void 0,onReauthenticate:e.activeNeedsReauth?()=>{if(e.authMode===`oauth`){let t=m??[],n=t.find(e=>e.active&&e.needsReauth)??t.find(e=>e.needsReauth);x?.onReauth(e.name,n?.id);return}te(`accounts`)}:void 0}),A===`models`&&(0,z.jsx)(Di,{item:e,apiBase:f,availableModels:i,hasLiveModels:a,selectedModels:o,modelsLoading:s,modelsLoadFailed:c,needsReauth:(m??[]).some(e=>e.active&&e.needsReauth)||p?.needsReauth===!0,onRetryModels:l,onOpenAccounts:W?()=>te(`accounts`):void 0},e.name),A===`usage`&&(0,z.jsx)(Oi,{item:e,usageTotals:t,quotaReport:r,modelUsage:n}),A===`accounts`&&(0,z.jsx)(ro,{item:e,apiBase:f,oauth:p,accounts:m,keys:v,accountLoadState:h,switchingAccountId:g,busy:y===e.name,loginHint:b,authHandlers:x,onCodexActiveNeedsReauthChange:S,codexController:C}),A===`settings`&&(0,z.jsx)(lo,{item:e,apiBase:f,availableModels:i,onUpdateProvider:w,onDirtyChange:N,onRegisterSave:B},e.name)]}),P&&(0,z.jsx)(fo,{saving:I,onCancel:()=>{I||F(null)},onDiscard:()=>{if(I)return;let e=P;F(null),N(!1),e===`deselect`?d():j(e)},onSave:()=>{(async()=>{if(!I){L(!0);try{if(!(await R.current?.()??!1))return;let e=P;F(null),N(!1),e===`deselect`?d():e&&j(e)}finally{L(!1)}}})()}})]})}var mo=`https://chatgpt.com/backend-api/codex`;function ho(e){try{let t=new URL(e.trim());if(t.username||t.password||t.search||t.hash)return;let n=t.pathname.replace(/\/+$/,``);return`${t.origin}${n}`}catch{return}}function go(e){return[`openai`,...Object.entries(e).filter(([,e])=>e.authMode===`forward`).map(([e])=>e).filter(e=>e!==`openai`).sort((e,t)=>e.localeCompare(t))]}function _o(e){return e?e.adapter!==`openai-responses`||e.authMode!==`forward`||typeof e.baseUrl!=`string`||ho(e.baseUrl)!==mo?`invalid`:e.disabled===!0?`disabled`:`ready`:`absent`}function vo(e){return e.id===`openai`}function yo(e){return e.id===`openai`?e.codexAccountMode===`direct`?`prov.openaiDirectDesc`:`prov.openaiPoolDesc`:null}function bo(e){let t={adapter:e.adapter.trim(),baseUrl:e.baseUrl.trim()};return e.responsesPath?.trim()&&(t.responsesPath=e.responsesPath.trim()),(e.authMode===`key`||e.authMode===`forward`)&&(t.authMode=e.authMode),e.authMode===`key`&&e.apiKey.trim()&&(t.apiKey=e.apiKey.trim()),e.adapter.trim()===`anthropic`&&e.authMode===`key`&&e.apiKeyTransport===`bearer`&&(t.apiKeyTransport=`bearer`),e.defaultModel.trim()&&(t.defaultModel=e.defaultModel.trim()),e.allowPrivateNetwork&&(t.allowPrivateNetwork=!0),t}function xo(e,t){return vo(e)?So(e):{name:t.name.trim(),provider:bo(t)}}function So(e){if(!e.provider)throw Error(`Missing canonical provider seed for ${e.id}`);return{name:e.id,provider:structuredClone(e.provider)}}var Co=class extends Error{i18nKey;constructor(e){super(e),this.name=`OpenAiEnableError`,this.i18nKey=e}};async function wo(e,t,n=fetch){if(t===`disabled`){if((await n(`${e}/api/providers?name=openai`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({disabled:!1})})).ok)return;throw new Co(`codexAuth.enableOpenaiFailed`)}let r=await n(`${e}/api/provider-presets`);if(!r.ok)throw new Co(`codexAuth.openaiPresetLoadFailed`);let i=(await r.json()).providers?.find(e=>e.id===`openai`);if(!i?.provider)throw new Co(`codexAuth.openaiPresetUnavailable`);if(!(await n(`${e}/api/providers`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(So(i))})).ok)throw new Co(`codexAuth.enableOpenaiFailed`)}var To=new Set([`anthropic`,`google-antigravity`]),Eo=new Set([`github-copilot`,`cursor`]);function Do(e){let t=e.trim().toLowerCase();return To.has(t)?`high`:Eo.has(t)?`elevated`:null}function Oo(e){switch(e){case`high`:return`oauthTos.highTitle`;case`elevated`:return`oauthTos.elevatedTitle`;default:return e}}function ko(e){switch(e){case`high`:return`oauthTos.highBody`;case`elevated`:return`oauthTos.elevatedBody`;default:return e}}function Ao(e,t=!1){let n={};for(let[t,r]of Object.entries(e))Pi(r.accounts.find(e=>e.active)??r.accounts.find(e=>e.id===r.activeAccountId))&&(n[t]=!0);return t&&(n.openai=!0),n}function jo(e){let{apiBase:t,t:n,config:r,aliveRef:i,notify:a,fetchConfig:o,fetchOauth:s,fetchProviderQuotas:c,codexActiveNeedsReauth:l}=e,[u,d]=(0,_.useState)({}),[f,p]=(0,_.useState)({}),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)({}),[y,b]=(0,_.useState)({}),[x,S]=(0,_.useState)(null),[C,w]=(0,_.useState)(``),T=(0,_.useRef)({}),E=(0,_.useRef)(null),D=(0,_.useRef)(null),O=(0,_.useRef)(null),k=(0,_.useCallback)(async e=>{let n=[...new Set(e)];return p(e=>{let t={...e};for(let e of n)t[e]=`loading`;return t}),(await Promise.all(n.map(async e=>{let n=(T.current[e]??0)+1;T.current[e]=n;try{let r=await fetch(`${t}/api/oauth/accounts?provider=${encodeURIComponent(e)}`);if(!r.ok)throw Error(String(r.status));let a=await r.json();return!i.current||T.current[e]!==n?!0:(d(t=>({...t,[e]:{activeAccountId:a.activeAccountId??null,accounts:a.accounts??[]}})),p(t=>({...t,[e]:`ready`})),(async()=>{try{let r=await fetch(`${t}/api/oauth/accounts?provider=${encodeURIComponent(e)}&quota=1`);if(!r.ok)return;let o=await r.json();if(!i.current||T.current[e]!==n)return;d(t=>({...t,[e]:{activeAccountId:o.activeAccountId??a.activeAccountId??null,accounts:o.accounts??a.accounts??[]}}))}catch{}})(),!0)}catch{return!i.current||T.current[e]!==n?!0:(p(t=>({...t,[e]:`error`})),!1)}}))).every(Boolean)},[i,t]),A=(0,_.useCallback)(async e=>{let n=await Promise.all(e.map(async e=>[e,(await fetch(`${t}/api/providers/keys?name=${encodeURIComponent(e)}`).then(async e=>{if(!e.ok)throw Error(String(e.status));return e.json()}).catch(()=>null))?.keys??[]]));b(Object.fromEntries(n))},[t]),j=async(e,r)=>{if(r.active||r.needsReauth||O.current)return;let o={provider:e,accountId:r.id};O.current=o,h(o);let l=Qr(u[e]?.accounts??[r],r,n);try{if(!(await fetch(`${t}/api/oauth/accounts/active`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,accountId:r.id})})).ok){a(n(`prov.accountSwitchFail`),!1);return}let i=await k([e]);if(await Promise.all([s(),c(!0)]),!i){a(n(`pws.accountsLoadFailed`),!1);return}a(n(`prov.accountSwitched`,{email:l}),!0)}catch{a(n(`prov.accountSwitchFail`),!1)}finally{O.current?.provider===o.provider&&O.current.accountId===o.accountId&&(O.current=null,i.current&&h(null))}},M=async(e,r)=>{if(r.active)return;let i=await fetch(`${t}/api/providers/keys/active`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:e,id:r.id})});i.ok?(a(n(`prov.keySwitched`,{key:r.label??r.masked}),!0),A(Object.keys(y)),c(!0)):a((await i.json().catch(()=>({}))).error||n(`prov.keySwitchFail`),!1)},N=async(e,r)=>{window.confirm(n(`prov.keyRemoveConfirm`,{key:r.label??r.masked}))&&(await fetch(`${t}/api/providers/keys?name=${encodeURIComponent(e)}&id=${encodeURIComponent(r.id)}`,{method:`DELETE`})).ok&&(a(n(`prov.keyRemoved`,{key:r.label??r.masked}),!0),A(Object.keys(y)),o(),c(!0))},P=async(e,r)=>{let i=r.trim();if(!i)return!1;try{let r=await fetch(`${t}/api/providers/keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:e,key:i})});return r.ok?(a(n(`prov.keyAdded`,{name:e}),!0),S(null),await Promise.all([A(Object.keys(y).includes(e)?Object.keys(y):[...Object.keys(y),e]),o(),c(!0)]),!0):(a((await r.json().catch(()=>({}))).error||n(`prov.keyAddFail`),!1),!1)}catch{return a(n(`prov.keyAddFail`),!1),!1}},F=async e=>{await P(e,C)&&w(``)},I=async(e,r,i,o)=>{let s=window.prompt(n(`prov.aliasPrompt`),o??``);if(s===null)return;let c=s.trim(),l=await fetch(r===`oauth`?`${t}/api/oauth/accounts/alias`:`${t}/api/providers/keys/alias`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r===`oauth`?{provider:e,accountId:i,alias:c}:{name:e,id:i,alias:c})});if(!l.ok){a((await l.json().catch(()=>({}))).error||n(`prov.aliasSaveFailed`),!1);return}r===`oauth`?await k([e]):await A(Object.keys(y).includes(e)?Object.keys(y):[...Object.keys(y),e]),a(n(`prov.aliasSaved`),!0)},L=async(e,r)=>{let i=Qr(u[e]?.accounts??[r],r,n);if(window.confirm(n(`prov.accountRemoveConfirm`,{email:i})))try{if(!(await fetch(`${t}/api/oauth/accounts?provider=${encodeURIComponent(e)}&id=${encodeURIComponent(r.id)}`,{method:`DELETE`})).ok){a(n(`prov.accountRemoveFail`,{email:i}),!1);return}a(n(`prov.accountRemoved`,{email:i}),!0),await k([e]),await Promise.all([s(),c(!0)])}catch{a(n(`prov.accountRemoveFail`,{email:i}),!1)}},R=(0,_.useMemo)(()=>r?Object.entries(r.providers).filter(([,e])=>e.authMode===`oauth`).map(([e])=>e):[],[r]);(0,_.useEffect)(()=>{if(R.length===0)return;let e=R.join(`,`);E.current!==e&&(E.current=e,Promise.resolve().then(()=>{k(R)}))},[k,R]);let z=(0,_.useMemo)(()=>r?Object.entries(r.providers).filter(([,e])=>e.hasApiKey&&e.authMode!==`oauth`&&e.authMode!==`forward`).map(([e])=>e):[],[r]);return(0,_.useEffect)(()=>{if(z.length===0)return;let e=z.join(`,`);D.current!==e&&(D.current=e,Promise.resolve().then(()=>{A(z)}))},[A,z]),{accountSets:u,accountLoadStates:f,switchingAccount:m,openAccounts:g,keyPools:y,addingKeyFor:x,newKeyValue:C,setAccountSets:d,setAccountLoadStates:p,setSwitchingAccount:h,setOpenAccounts:v,setKeyPools:b,setAddingKeyFor:S,setNewKeyValue:w,fetchAccountSets:k,fetchKeyPools:A,switchAccount:j,switchApiKey:M,removeApiKey:N,addApiKeyValue:P,addApiKey:F,editCredentialAlias:I,removeAccount:L,oauthCardProviders:R,keyCardProviders:z,activeAccountNeedsReauth:(0,_.useMemo)(()=>Ao(u,l),[u,l])}}function Mo(e){let{apiBase:t,config:n,notify:r,fetchConfig:i,fetchProviderQuotas:a,onSaved:o,t:s}=e,[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1),x=(0,_.useRef)(!1);(0,_.useEffect)(()=>{n&&!x.current&&d(JSON.stringify(n,null,2))},[n]);let S=(0,_.useCallback)(async()=>{v(!0);try{let e=JSON.parse(u),n=await fetch(`${t}/api/config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});return n.ok?(r(s(`prov.saved`),!0),l(!1),p(!1),x.current=!1,b(!1),h(JSON.stringify(e,null,2)),i(),a(!0),o(),!0):(r((await n.json().catch(()=>({}))).error||s(`prov.saveFailed`),!1),!1)}catch{return r(s(`prov.invalidJson`),!1),!1}finally{v(!1)}},[t,u,i,a,r,o,s]),C=(0,_.useCallback)(()=>{let e=n?JSON.stringify(n,null,2):u;h(e),d(e),b(!1),p(!0),x.current=!0},[n,u]),w=(0,_.useCallback)(()=>{b(!1),p(!1),x.current=!1;let e=n?JSON.stringify(n,null,2):m;h(e),d(e)},[n,m]);return{editing:c,setEditing:l,draft:u,setDraft:d,jsonEditorOpen:f,jsonBaseline:m,jsonSaving:g,jsonLeaveOpen:y,jsonEditorOpenRef:x,saveConfig:S,openJsonEditor:C,discardJsonEditor:w,requestCloseJsonEditor:(0,_.useCallback)(()=>{if(f&&u!==m){b(!0);return}w()},[w,u,m,f]),restoreJsonEditor:(0,_.useCallback)(()=>{d(m)},[m]),jsonIsDirty:f&&u!==m,setJsonLeaveOpen:b}}var No={xai:`xAI (Grok)`,anthropic:`Anthropic (Claude)`,kimi:`Kimi (Moonshot)`,"google-antigravity":`Google Antigravity`,"github-copilot":`GitHub Copilot`,cursor:`Cursor`},Po=e=>No[e]??e;function Fo({apiBase:e,t,aliveRef:n,oauthLoginGenerationRef:r,accountSets:i,setBusy:a,setStatus:o,setLoginInfo:s,setOauthStatus:c,notify:l,fetchConfig:u,fetchOauth:d,fetchAccountSets:f,fetchProviderQuotas:p,bumpModelsRefresh:m}){return{cancelLoginOAuth:(0,_.useCallback)(async i=>{let o=(r.current.get(i)??0)+1;r.current.set(i,o);try{await fetch(`${e}/api/oauth/login/cancel`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:i})})}catch{}n.current&&(r.current.get(i)===o&&(a(e=>e===i?null:e),s(e=>e?.provider===i?null:e)),l(t(`prov.loginCancelled`,{provider:Po(i)}),!1))},[n,e,l,r,a,s,t]),loginOAuth:async(d,h=!1,g)=>{let _=(r.current.get(d)??0)+1;r.current.set(d,_);let v=_,y=g?.trim()||void 0;a(d),o(``),s(null);try{let a=await fetch(`${e}/api/oauth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:d,...h||y?{addAccount:!0}:{},...y?{accountId:y,reauth:!0}:{}})});if(r.current.get(d)!==v||!n.current)return;if(!a.ok){l((await a.json().catch(()=>({}))).error||t(`prov.loginFailStart`,{provider:Po(d)}),!1);return}let o=await a.json();(o.url||o.instructions||o.deviceCode)&&s({provider:d,url:o.url,instructions:o.instructions,deviceCode:o.deviceCode});let g=i[d]?.accounts.length??0,_=!1;for(let a=0;a<150&&n.current&&r.current.get(d)===v;a++){if(await new Promise(e=>setTimeout(e,2e3)),r.current.get(d)!==v||!n.current)return;let a=await fetch(`${e}/api/oauth/status?provider=${d}`).catch(()=>null),o=a?await lt(a)??null:null;if(o){if(o.error){c(e=>({...e,[d]:o})),l(/cancel/i.test(o.error)?t(`prov.loginCancelled`,{provider:Po(d)}):t(`prov.loginError`,{provider:Po(d),error:o.error}),!1),s(null),_=!0;break}if(h||y?(o.accounts?.length??0)>g||o.done===!0:o.loggedIn||o.done===!0){c(e=>({...e,[d]:o}));let e=y?o.accounts?.find(e=>e.id===y):o.accounts?.find(e=>e.active)??o.accounts?.find(e=>e.id===o.activeAccountId);if(y&&!e){l(t(`prov.loginError`,{provider:Po(d),error:t(`prov.reauthAccountMissing`)}),!1),s(null),_=!0;break}if(e?.needsReauth){l(t(`prov.loginError`,{provider:Po(d),error:t(`prov.reauthIdentityMismatch`)}),!1),s(null),_=!0;break}l(t(`prov.loginOk`,{provider:Po(d),cmd:`ocx sync`}),!0),s(null),u();let n=Object.keys(i);f(new Set(n).has(d)?n:[...n,d]),p(!0),m(),_=!0;break}}}!_&&r.current.get(d)===v&&n.current&&(await fetch(`${e}/api/oauth/login/cancel`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:d})}).catch(()=>{}),l(t(`prov.loginTimeout`,{provider:Po(d)}),!1),s(null))}catch{r.current.get(d)===v&&l(t(`prov.loginRequestFail`,{provider:Po(d)}),!1)}finally{n.current&&r.current.get(d)===v&&a(null)}},logoutOAuth:async n=>{try{if(!(await fetch(`${e}/api/oauth/logout?provider=${encodeURIComponent(n)}`,{method:`POST`})).ok){l(t(`prov.logoutFail`,{provider:Po(n)}),!1);return}await Promise.all([f([n]),d(),u(),p(!0)]),m(),l(t(`prov.logoutOk`,{provider:Po(n)}),!0)}catch{l(t(`prov.logoutFail`,{provider:Po(n)}),!1)}}}}async function Io(e,t){try{let t=await e.json();if(typeof t.error==`string`&&t.error.trim())return t.error.trim()}catch{}return t}function Lo(e,t,n){switch(e.code){case`last_provider`:return t(`prov.removeLastProvider`);case`provider_has_dependent_combos`:return t(`prov.removeHasDependentCombos`,{combos:(Array.isArray(e.combos)?e.combos.filter(e=>typeof e==`string`).join(`, `):``)||`—`});case`default_provider_disabled`:return t(`prov.defaultDisabled`);default:return typeof e.error==`string`&&e.error.trim()?e.error.trim():n}}function Ro({apiBase:e,t,removeBusyRef:n,workspaceSelected:r,setWorkspaceSelected:i,setRemoveConfirmName:a,notify:o,fetchConfig:s,fetchOauth:c,fetchProviderQuotas:l}){let u=(0,_.useCallback)(async e=>{a(e)},[a]),d=(0,_.useCallback)(async u=>{let d=u;if(!d||n.current)return;n.current=!0,a(null);let f=t(`prov.removeFail`,{name:d});try{let n=await fetch(`${e}/api/providers?name=${encodeURIComponent(d)}`,{method:`DELETE`});if(n.ok){let e=await n.json().catch(()=>({})),a=typeof e.defaultProvider==`string`?e.defaultProvider:null;o(a?t(`prov.removedDefault`,{name:d,defaultProvider:a}):t(`prov.removed`,{name:d}),!0),r===d&&i(null),s(),c(),l(!0)}else o(Lo(await n.json().catch(()=>({})),t,f),!1)}catch{o(f,!1)}finally{n.current=!1}},[e,s,c,l,o,n,a,i,t,r]),f=(0,_.useCallback)(async(n,r)=>{let i=await fetch(`${e}/api/providers?name=${encodeURIComponent(n)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({disabled:r})});if(!i.ok){o(await Io(i,t(r?`prov.disableFail`:`prov.enableFail`,{name:n})),!1);return}o(t(r?`prov.disabled`:`prov.enabled`,{name:n}),!0),s(),c(),l(!0)},[e,s,c,l,o,t]),p=(0,_.useCallback)(async(n,r)=>{try{let i=await fetch(`${e}/api/providers?name=${encodeURIComponent(n)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)});return i.ok?(await s(),{ok:!0}):{ok:!1,error:await Io(i,t(`prov.updateFail`))}}catch{return{ok:!1,error:t(`prov.networkError`)}}},[e,s,t]);return{removeProvider:u,confirmRemoveProvider:d,setProviderDisabled:f,setDefaultProvider:(0,_.useCallback)(async n=>{try{let r=await fetch(`${e}/api/providers?name=${encodeURIComponent(n)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({setDefault:!0})});return r.ok?(o(t(`prov.setDefaultSuccess`,{name:n}),!0),await s(),!0):(o(Lo(await r.json().catch(()=>({})),t,t(`prov.setDefaultFail`,{name:n})),!1),!1)}catch{return o(t(`prov.setDefaultFail`,{name:n}),!1),!1}},[e,s,o,t]),updateProvider:p}}function zo({apiBase:e,t,setConfig:n,setOauthProviders:r,setOauthStatus:i,notify:a,invalidateProviderQuotas:o,configCacheKey:s}){return{fetchConfig:(0,_.useCallback)(async()=>{try{let t=await ct(await fetch(`${e}/api/config`));n(t??null),s&&t&&Q(s,t)}catch{a(t(`prov.loadConfigFail`),!1)}},[e,s,a,n,t]),fetchOauth:(0,_.useCallback)(async()=>{try{let t=(await ct(await fetch(`${e}/api/oauth/providers`)))?.providers??[];r(t);let n=await Promise.all(t.map(async t=>{let n=await fetch(`${e}/api/oauth/status?provider=${encodeURIComponent(t)}`).catch(()=>null);return[t,n?await lt(n)??{loggedIn:!1}:{loggedIn:!1}]}));i(Object.fromEntries(n))}catch{}},[e,r,i]),fetchProviderQuotas:(0,_.useCallback)(async(e=!1)=>{o(e)},[o])}}function Bo({providerId:e,providerLabel:t,onCancel:n,onContinue:r}){let i=Y(),a=(0,_.useId)(),o=(0,_.useId)(),s=(0,_.useRef)(null),c=(0,_.useRef)(!1),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1),p=Do(e);(0,_.useEffect)(()=>{let e=s.current;e&&!e.open&&e.showModal()},[]);let m=(0,_.useCallback)(e=>{e.preventDefault(),n()},[n]);if(!p)return null;let h=e.trim().toLowerCase(),g=h===`anthropic`?`oauthTos.anthropicBody`:ko(p),v=h===`anthropic`||h===`google-antigravity`;return(0,z.jsxs)(`dialog`,{ref:s,"aria-labelledby":a,"aria-describedby":o,className:`modal-overlay`,onCancel:m,children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":i(`common.close`),tabIndex:-1,onClick:n}),(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),style:{maxWidth:460},children:[(0,z.jsx)(`h3`,{id:a,children:i(Oo(p),{provider:t})}),(0,z.jsxs)(`div`,{id:o,className:`notice-warn`,style:{marginTop:12,display:`flex`,gap:8,alignItems:`flex-start`},children:[(0,z.jsx)(J,{width:16,height:16,style:{flexShrink:0,marginTop:2},"aria-hidden":`true`}),(0,z.jsx)(`p`,{className:`modal-desc`,style:{margin:0},children:i(g,{provider:t})})]}),v&&(0,z.jsx)(`p`,{className:`muted text-label`,style:{marginTop:12},children:i(`oauthTos.saferPath`)}),(0,z.jsxs)(`label`,{className:`oauth-tos-ack`,style:{display:`flex`,gap:8,alignItems:`flex-start`,marginTop:14},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.target.checked),style:{marginTop:3},"aria-required":`true`}),(0,z.jsx)(`span`,{className:`text-label`,children:i(`oauthTos.acknowledge`)})]}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:n,children:i(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:!l||d,onClick:()=>{!l||c.current||(c.current=!0,f(!0),r())},children:i(`oauthTos.continue`)})]})]})]})}function Vo(e){return{adapter:e.adapter,baseUrl:e.baseUrl,authMode:e.auth,freeTier:!!e.freeTier,keyOptional:!!e.keyOptional}}function Ho(e){return Wn(e.id,Vo(e))}function Uo(e){let t={accounts:[],free:[],paid:[]};for(let n of e)t[Ho(n)].push(n);return t}function Wo(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>e.label.toLowerCase().includes(n)||e.id.toLowerCase().includes(n)):e}var Go={},Ko=[],qo={};function Jo({presets:e,usageRank:t=Go,presetsLoading:n=!1,initialTier:r=`free`,onSelectPreset:i,onSelectCustom:a,accountRows:o=Ko,accountStatus:s=qo,busyProvider:c=null,onLogin:l,onCancelLogin:u,onLogout:d}){let f=Y(),[p,m]=(0,_.useState)(r),[h,g]=(0,_.useState)(``),v=(0,_.useMemo)(()=>e.filter(e=>e.id!==`custom`),[e]),y=(0,_.useMemo)(()=>{let e=Object.keys(t).length>0;return v.toSorted((n,r)=>{if(e){let e=t[n.id]??0,i=t[r.id]??0;if(i!==e)return i-e}return n.label.localeCompare(r.label,void 0,{sensitivity:`base`})||n.id.localeCompare(r.id)})},[v,t]),b=(0,_.useMemo)(()=>Uo(y),[y])[p],x=(0,_.useMemo)(()=>Wo(b,h),[b,h]),S=e=>{let t=e.codexAccountMode===`direct`?(0,z.jsx)(`span`,{className:`badge badge-green`,children:f(`modal.badge.direct`)}):e.codexAccountMode===`pool`?(0,z.jsx)(`span`,{className:`badge badge-accent`,children:f(`modal.badge.pool`)}):e.auth===`oauth`?(0,z.jsx)(`span`,{className:`badge badge-accent`,children:f(`modal.badge.oauth`)}):e.auth===`forward`?(0,z.jsx)(`span`,{className:`badge badge-green`,children:f(`modal.badge.codexLogin`)}):e.auth===`local`?(0,z.jsx)(`span`,{className:`badge badge-amber`,children:f(`modal.badge.local`)}):e.keyOptional?null:(0,z.jsx)(`span`,{className:`badge badge-muted`,children:f(`modal.badge.apiKey`)});return(0,z.jsxs)(z.Fragment,{children:[(e.freeTier||e.keyOptional)&&e.auth===`key`?(0,z.jsx)(`span`,{className:`badge badge-green`,children:f(`modal.badge.free`)}):null,t]})};return(0,z.jsxs)(`div`,{className:`provider-catalog`,children:[(0,z.jsx)(`div`,{className:`provider-catalog-tabs`,role:`tablist`,children:[`accounts`,`free`,`paid`].map(e=>(0,z.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":p===e,className:`provider-catalog-tab${p===e?` active`:``}`,onClick:()=>{m(e),g(``)},children:f(e===`accounts`?`modal.tab.accounts`:e===`free`?`modal.tab.free`:`modal.tab.paid`)},e))}),p===`accounts`&&(0,z.jsx)(`div`,{className:`provider-catalog-accounts-hint muted text-label`,children:f(`modal.accountsHint`)}),(0,z.jsx)(`input`,{className:`input provider-catalog-search`,value:h,onChange:e=>g(e.target.value),placeholder:f(`modal.search`)}),(0,z.jsxs)(`div`,{className:`provider-catalog-rows`,children:[n&&x.length===0&&(0,z.jsx)(`div`,{className:`muted text-control provider-catalog-empty`,children:f(`modal.catalogLoading`)}),p!==`accounts`&&x.map(e=>(0,z.jsxs)(`button`,{type:`button`,className:`list-row`,onClick:()=>i(e),children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`title`,children:e.label}),(0,z.jsxs)(`div`,{className:`sub`,children:[(0,z.jsx)(`code`,{className:`chip`,children:e.adapter}),e.note?` · ${e.note}`:``]})]}),(0,z.jsx)(`div`,{className:`provider-catalog-badges`,children:S(e)})]},e.id)),p!==`accounts`&&!n&&x.length===0&&(0,z.jsx)(`div`,{className:`muted text-control provider-catalog-empty`,children:f(`modal.noMatch`)}),p===`accounts`&&o.map(e=>{let t=s[e.id],n=c===e.id,r=!!t?.loggedIn,i=r?t?.email??e.statusLabel??f(`modal.accountLoggedIn`):t?.error??e.statusLabel??f(`modal.accountLoggedOut`);return(0,z.jsxs)(`div`,{className:`list-row provider-catalog-account-row`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`title`,children:e.label}),(0,z.jsx)(`div`,{className:`sub`,children:i})]}),(0,z.jsx)(`div`,{className:`provider-catalog-badges`,children:e.kind===`key`?null:e.kind===`codex`?(0,z.jsxs)(z.Fragment,{children:[r&&(0,z.jsx)(`a`,{className:`btn btn-ghost`,href:e.href??`#codex-auth`,children:f(`modal.accountManage`)}),l&&(0,z.jsx)(`button`,{type:`button`,className:r?`btn btn-ghost`:`btn btn-primary`,disabled:n,onClick:()=>{n||l(e.id)},children:f(n?`codexAuth.enablingOpenai`:r?`modal.accountAdd`:`modal.accountLogin`)})]}):r?d&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>d(e.id),children:f(`modal.accountLogout`)}):n?u&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>u(e.id),children:f(`common.cancel`)}):l&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>l(e.id),children:f(`modal.accountLogin`)})})]},e.id)}),p===`accounts`&&o.length===0&&!n&&(0,z.jsx)(`div`,{className:`muted text-control provider-catalog-empty`,children:f(`modal.noMatch`)})]}),(0,z.jsxs)(`div`,{className:`provider-catalog-footer`,children:[(0,z.jsx)(`div`,{style:{flex:1}}),p!==`accounts`&&(0,z.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:a,children:f(`modal.notListed`)})]})]})}function Yo({preset:e,oauthSupported:t,oauthBusy:n,oauthMsg:r,oauthMsgTone:i,oauthUrl:a,manualCode:o,manualCodeBusy:s,manualCodeMsg:c,manualCodeOk:l,onRequestLogin:u,onUseApiKeyInstead:d,onManualCodeChange:f,onSubmitManualCode:p,onBack:m}){let h=Y();return(0,z.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:14},children:[(0,z.jsx)(`div`,{className:`muted text-control`,children:e.note??h(`modal.oauthDefaultNote`)}),t.includes(e.oauthProvider??``)?(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>u(e.oauthProvider),disabled:n,style:{width:`100%`,padding:`12px 16px`},children:[(0,z.jsx)(be,{}),n?h(`modal.waitingBrowser`):h(`modal.logInWith`,{label:e.label})]}):(0,z.jsx)(`div`,{className:`text-control`,style:{color:`var(--amber)`,background:`var(--amber-soft)`,border:`1px solid var(--amber)`,borderRadius:`var(--radius-sm)`,padding:`10px 12px`},children:h(`modal.oauthComingSoon`,{label:e.label})}),r&&(0,z.jsx)(`div`,{className:`text-label`,style:{color:i===`warn`?`var(--amber)`:`var(--accent-hover)`},children:r}),n&&(0,z.jsx)(Ji,{url:a}),n&&(0,z.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,z.jsx)(`div`,{className:`muted text-label`,children:h(`prov.pasteRedirectHint`)}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,z.jsx)(`input`,{type:`text`,autoComplete:`off`,spellCheck:!1,value:o,onChange:e=>f(e.target.value),onKeyDown:t=>{t.key===`Enter`&&e.oauthProvider&&(t.preventDefault(),p(e.oauthProvider))},placeholder:h(`prov.pasteRedirect`),"aria-label":h(`prov.pasteRedirect`),disabled:s,className:`input text-label`,style:{flex:1}}),(0,z.jsx)(`button`,{className:`btn btn-ghost`,type:`button`,disabled:s||!o.trim()||!e.oauthProvider,onClick:()=>e.oauthProvider&&p(e.oauthProvider),children:h(s?`prov.pasteSubmitting`:`prov.pasteSubmit`)})]}),c&&(0,z.jsx)(`div`,{className:`text-label`,style:{color:l?`var(--accent-hover)`:`var(--amber)`},children:c})]}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,marginTop:2},children:[(0,z.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:d,children:h(`modal.useApiKeyInstead`)}),(0,z.jsx)(`div`,{style:{flex:1}}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:m,children:h(`modal.back`)})]})]})}function Xo({label:e,children:t}){return(0,z.jsxs)(`label`,{style:{display:`block`},children:[(0,z.jsx)(`span`,{className:`field-label`,children:e}),t]})}function Zo({preset:e,form:t,endpointChoice:n,error:r,saving:i,dup:a,isCustom:o,isLocal:s,isReservedForward:c,presetDescription:l,onFormChange:u,onEndpointChoiceChange:d,onSubmit:f,onUseOauthLogin:p,onBack:m}){let h=Y();return(0,z.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:[!c&&!o&&!s&&!e.keyOptional&&e.note&&(0,z.jsxs)(`details`,{className:`setup-guide`,children:[(0,z.jsx)(`summary`,{children:h(`modal.setupGuide`)}),(0,z.jsxs)(`ol`,{className:`text-label leading-relaxed`,style:{margin:`8px 0 0`,paddingLeft:18,color:`var(--muted)`},children:[(0,z.jsxs)(`li`,{children:[h(`modal.setupStep1Prefix`),` `,(0,z.jsx)(`a`,{href:e.dashboardUrl,target:`_blank`,rel:`noreferrer`,children:h(`modal.setupDashboardLink`,{label:e.label})}),` `,h(`modal.setupStep1Suffix`)]}),(0,z.jsx)(`li`,{children:h(`modal.setupStep2`)}),(0,z.jsx)(`li`,{children:h(`modal.setupStep3`)})]}),e.note&&(0,z.jsx)(`div`,{className:`text-label`,style:{color:`var(--muted)`,marginTop:6,fontStyle:`italic`},children:e.note}),/\{[^}]*\}/.test(t.baseUrl)&&(0,z.jsx)(`div`,{className:`text-label`,style:{color:`var(--amber)`,marginTop:6},children:h(`modal.baseUrlPlaceholderHint`)})]}),(0,z.jsx)(Xo,{label:h(`modal.providerName`),children:(0,z.jsx)(`input`,{className:`input`,value:t.name,readOnly:c,onChange:e=>u({...t,name:e.target.value}),placeholder:h(`modal.namePlaceholder`)})}),a&&(0,z.jsx)(`div`,{className:`text-label`,style:{color:`var(--amber)`},children:h(`modal.duplicateWarn`,{name:t.name.trim()})}),!c&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Xo,{label:h(`modal.adapter`),children:(0,z.jsx)(`select`,{className:`input`,value:t.adapter,onChange:e=>u({...t,adapter:e.target.value}),children:[`openai-responses`,`openai-chat`,`anthropic`,`google`,`azure-openai`,`cursor`].map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))})}),e.baseUrlChoices&&e.baseUrlChoices.length>0?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Xo,{label:h(`modal.endpoint`),children:(0,z.jsx)(`select`,{className:`input`,value:n,onChange:n=>{let r=n.target.value;d(r),u({...t,baseUrl:io(e.baseUrlChoices,r,t.baseUrl)})},children:e.baseUrlChoices.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.id===`token-plan`?h(`modal.endpoint.tokenPlan`):e.id===`payg`?h(`modal.endpoint.payAsYouGo`):e.id===`custom`?h(`modal.endpoint.custom`):e.label},e.id))})}),n===`custom`&&(0,z.jsx)(Xo,{label:h(`modal.baseUrl`),children:(0,z.jsx)(`input`,{className:`input`,value:t.baseUrl,onChange:e=>u({...t,baseUrl:e.target.value}),placeholder:h(`modal.baseUrlPlaceholder`)})})]}):(0,z.jsx)(Xo,{label:h(`modal.baseUrl`),children:(0,z.jsx)(`input`,{className:`input`,value:t.baseUrl,onChange:e=>u({...t,baseUrl:e.target.value}),placeholder:h(`modal.baseUrlPlaceholder`)})}),!c&&(0,z.jsxs)(`label`,{className:`modal-field`,style:{flexDirection:`row`,alignItems:`center`,gap:8},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:t?.allowPrivateNetwork??!1,onChange:e=>u({...t,allowPrivateNetwork:e.target.checked})}),(0,z.jsx)(`span`,{className:`muted text-control`,children:h(`modal.allowPrivateNetwork`)})]}),!c&&(t?.allowPrivateNetwork??!1)&&(0,z.jsx)(`p`,{className:`muted text-hint`,children:h(`modal.allowPrivateNetworkHint`)})]}),t.authMode===`forward`?(0,z.jsx)(`div`,{className:`text-label`,style:{color:`var(--green)`,background:`var(--green-soft)`,border:`1px solid var(--green)`,borderRadius:`var(--radius-sm)`,padding:`8px 10px`},children:l(e)}):t.authMode===`local`?(0,z.jsx)(`div`,{className:`text-label leading-relaxed`,style:{color:`var(--amber)`,background:`var(--amber-soft)`,border:`1px solid var(--amber)`,borderRadius:`var(--radius-sm)`,padding:`8px 10px`},children:h(`modal.localHint`)}):e.keyOptional?(0,z.jsxs)(`div`,{className:`text-label leading-relaxed`,style:{color:`var(--green)`,background:`var(--green-soft)`,border:`1px solid var(--green)`,borderRadius:`var(--radius-sm)`,padding:`10px 12px`},children:[(0,z.jsx)(`strong`,{children:h(`modal.freeTierTitle`)}),` — `,e.note??h(`modal.freeTierDefault`)]}):(0,z.jsxs)(z.Fragment,{children:[e.dashboardUrl&&(0,z.jsxs)(`a`,{className:`text-label`,href:e.dashboardUrl,target:`_blank`,rel:`noreferrer`,style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,z.jsx)(ye,{style:{width:14,height:14}}),h(`modal.getApiKey`,{label:e.label}),(0,z.jsx)(ve,{style:{width:13,height:13}})]}),(0,z.jsx)(Xo,{label:h(`modal.apiKey`),children:(0,z.jsx)(`input`,{className:`input`,type:`password`,value:t.apiKey,onChange:e=>u({...t,apiKey:e.target.value}),placeholder:h(`modal.apiKeyPlaceholder`)})}),t.adapter===`anthropic`&&t.authMode===`key`&&(0,z.jsx)(Xo,{label:h(`modal.apiKeyTransport`),children:(0,z.jsxs)(`select`,{className:`input`,value:t.apiKeyTransport??`x-api-key`,onChange:e=>u({...t,apiKeyTransport:e.target.value===`bearer`?`bearer`:void 0}),children:[(0,z.jsx)(`option`,{value:`x-api-key`,children:h(`modal.apiKeyTransportNative`)}),(0,z.jsx)(`option`,{value:`bearer`,children:h(`modal.apiKeyTransportBearer`)})]})})]}),!c&&(0,z.jsx)(Xo,{label:h(`modal.defaultModel`),children:(0,z.jsx)(`input`,{className:`input`,value:t.defaultModel,onChange:e=>u({...t,defaultModel:e.target.value}),placeholder:h(`modal.defaultModelPlaceholder`)})}),r&&(0,z.jsx)(`div`,{className:`text-control`,role:`alert`,style:{color:`var(--red)`},children:r}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:4,alignItems:`center`},children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:f,disabled:i,children:h(i?`modal.adding`:`modal.add`)}),e.auth===`oauth`&&(0,z.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:p,children:h(`modal.useOauthLogin`)}),(0,z.jsx)(`div`,{style:{flex:1}}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:m,children:h(`modal.back`)})]})]})}var Qo=2e3;function $o({apiBase:e,t,aliveRef:n,onAdded:r}){return{loginOAuth:(0,_.useCallback)(async(i,a)=>{let{setOauthBusy:o,setOauthMsg:s,setOauthMsgTone:c,setOauthUrl:l,setManualCode:u,setManualCodeMsg:d,setManualCodeOk:f}=a;o(!0),s(``),c(`ok`),l(``,i),u(``),d(``),f(!0);try{let a=await fetch(`${e}/api/oauth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:i})});if(!n.current)return;if(!a.ok){let e=await a.json().catch(()=>({}));c(`warn`),s(e.error===`unknown oauth provider`?t(`modal.oauthComingSoonShort`):e.error||t(`modal.loginFailStart`));return}let o=await a.json();o.url?(l(o.url,i),s(t(`modal.waitingLogin`))):s(o.instructions||t(`modal.loggingIn`));for(let a=0;a<100;a++){if(await new Promise(e=>setTimeout(e,Qo)),!n.current)return;let a=await fetch(`${e}/api/oauth/status?provider=${i}`).catch(()=>null),o=a?await lt(a):null;if(!n.current)return;if(o?.error){c(`warn`),s(t(`modal.loginError`,{error:o.error}));return}if(o?.loggedIn){r(i);return}}c(`warn`),s(t(`modal.loginTimeout`))}catch{n.current&&(c(`warn`),s(t(`modal.networkError`)))}finally{n.current&&o(!1)}},[n,e,r,t]),submitManualCode:(0,_.useCallback)(async(r,i,a,o)=>{let s=i.trim();if(!s||a)return;let{setManualCodeBusy:c,setManualCode:l,setManualCodeOk:u,setManualCodeMsg:d}=o;c(!0),d(``);try{let i=await fetch(`${e}/api/oauth/login/code`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:r,input:s})});if(!n.current)return;if(!i.ok){let e=await i.json().catch(()=>({}));u(!1),d(t(`prov.pasteFail`,{error:e.error||i.statusText}));return}l(``),u(!0),d(t(`prov.pasteOk`))}catch{n.current&&(u(!1),d(t(`modal.networkError`)))}finally{n.current&&c(!1)}},[n,e,t])}}function es(e,t){return{preset:e?{id:`custom`,label:t,adapter:`openai-chat`,baseUrl:``,auth:`key`}:null,form:e?{name:``,adapter:`openai-chat`,baseUrl:``,authMode:`key`,apiKey:``,apiKeyTransport:void 0,defaultModel:``,allowPrivateNetwork:!1}:null,saving:!1,error:``,oauthBusy:!1,oauthMsg:``,oauthMsgTone:`ok`,oauthUrl:``,oauthUrlProvider:null,manualCode:``,manualCodeBusy:!1,manualCodeMsg:``,manualCodeOk:!0,endpointChoice:`custom`,oauthTosPending:null}}function ts(e,t){switch(t.type){case`choose-preset`:return{...e,preset:t.preset,form:t.form,endpointChoice:t.endpointChoice,error:``,oauthMsg:``,oauthMsgTone:`ok`,oauthUrl:``,oauthUrlProvider:null,oauthBusy:!1,manualCode:``,manualCodeMsg:``,manualCodeOk:!0};case`back`:return{...e,preset:null,form:null,endpointChoice:`custom`,error:``,oauthMsg:``,oauthMsgTone:`ok`,oauthUrl:``,oauthUrlProvider:null,oauthBusy:!1,manualCode:``,manualCodeMsg:``,manualCodeOk:!0};case`set-form`:return{...e,form:t.form};case`set-endpoint-choice`:return{...e,endpointChoice:t.choice};case`set-saving`:return{...e,saving:t.saving};case`set-error`:return{...e,error:t.error};case`set-oauth-busy`:return{...e,oauthBusy:t.busy};case`set-oauth-msg`:return{...e,oauthMsg:t.msg,oauthMsgTone:t.tone??e.oauthMsgTone};case`set-oauth-tone`:return{...e,oauthMsgTone:t.tone};case`set-oauth-url`:return e.preset?.oauthProvider===t.providerId?{...e,oauthUrl:t.url,oauthUrlProvider:t.providerId}:e;case`set-manual-code`:return{...e,manualCode:t.code};case`set-manual-code-busy`:return{...e,manualCodeBusy:t.busy};case`set-manual-code-msg`:return{...e,manualCodeMsg:t.msg,manualCodeOk:t.ok??e.manualCodeOk};case`set-oauth-tos-pending`:return{...e,oauthTosPending:t.providerId};case`use-oauth-login`:return{...e,form:t.form,error:``,oauthUrl:``,oauthUrlProvider:null};case`use-api-key-instead`:return{...e,form:t.form,oauthMsg:``,oauthMsgTone:`ok`,oauthUrl:``,oauthUrlProvider:null,oauthBusy:!1,manualCode:``,manualCodeMsg:``};default:return e}}function ns({apiBase:e,existingNames:t,onClose:n,onAdded:r,initialTier:i,initialCustom:a=!1,accountRows:o,accountStatus:s,accountBusy:c,onAccountLogin:l,onAccountCancelLogin:u,onAccountLogout:d,onOpen:f}){let p=Y(),m=(0,_.useMemo)(()=>[{id:`custom`,label:p(`modal.customProvider`),adapter:`openai-chat`,baseUrl:``,auth:`key`}],[p]),[h,g]=(0,_.useReducer)(ts,a,e=>es(e,p(`modal.customProvider`))),v=(0,_.useRef)(!0),y=(0,_.useRef)(null),b=(0,_.useRef)(null),x=I(`add-provider-oauth:${e}`,[e],async t=>{let n=await fetch(`${e}/api/oauth/providers`,{signal:t});return n.ok?(await n.json()).providers??[]:[]}),S=I(`add-provider-presets:${e}`,[e],async t=>{let n=await fetch(`${e}/api/provider-presets`,{signal:t});if(!n.ok)throw Error(String(n.status));let r=await n.json();return Array.isArray(r.providers)&&r.providers.length>0?r.providers:null}),C=I(`add-provider-usage:${e}`,[e],async t=>{let n=await fetch(`${e}/api/usage?range=30d`,{signal:t});if(!n.ok)return{};let r=await n.json(),i={};for(let e of r.providers??[])i[e.provider]=e.requests;return i}),w=x.data??[],T=S.data??m,E=S.loading,D=C.data??{},{preset:O,form:k,saving:A,error:j,oauthBusy:M,oauthMsg:N,oauthMsgTone:P,oauthUrl:F,oauthUrlProvider:L,manualCode:R,manualCodeBusy:B,manualCodeMsg:V,manualCodeOk:H,endpointChoice:U,oauthTosPending:W}=h;(0,_.useEffect)(()=>{v.current=!0,y.current=document.activeElement,f?.();let e=b.current;if(e){let t=e.querySelector(`input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])`);t&&t.focus()}return()=>{v.current=!1,y.current?.focus()}},[]),(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&!W&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,W]);let ee=e=>{let t=yo(e);return t?p(t):e.note},G=e=>{let t=ao(e.baseUrlChoices,e.baseUrl);g({type:`choose-preset`,preset:e,endpointChoice:t,form:{name:e.id===`custom`?``:e.id,adapter:e.adapter,baseUrl:e.baseUrlChoices?.length?io(e.baseUrlChoices,t,e.baseUrl):e.baseUrl,responsesPath:e.responsesPath,authMode:e.auth,apiKey:``,apiKeyTransport:void 0,defaultModel:e.defaultModel??``,allowPrivateNetwork:!1}})},te=async()=>{if(!k)return;let t=O?vo(O):!1,n=O?.baseUrlChoices?.length?oo(O.baseUrlChoices,U,k.baseUrl):k.baseUrl.trim();if(!t&&!k.name.trim()){g({type:`set-error`,error:p(`modal.nameRequired`)});return}if(!t&&!n){g({type:`set-error`,error:p(`modal.baseUrlRequired`)});return}if(!t&&/\{[^}]*\}/.test(n)){g({type:`set-error`,error:p(`modal.baseUrlPlaceholderError`)});return}let i={...k,baseUrl:n},a;try{a=xo(O??{id:`custom`},i)}catch{g({type:`set-error`,error:p(`modal.invalidPreset`)});return}g({type:`set-saving`,saving:!0}),g({type:`set-error`,error:``});try{let t=await fetch(`${e}/api/providers`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)});if(!t.ok){g({type:`set-error`,error:(await t.json().catch(()=>({}))).error||p(`modal.failedStatus`,{status:t.status})});return}r(a.name)}catch{g({type:`set-error`,error:p(`modal.networkError`)})}finally{g({type:`set-saving`,saving:!1})}},{loginOAuth:ne,submitManualCode:K}=$o({apiBase:e,t:p,aliveRef:v,onAdded:r}),re={setOauthBusy:e=>g({type:`set-oauth-busy`,busy:e}),setOauthMsg:e=>g({type:`set-oauth-msg`,msg:e}),setOauthMsgTone:e=>g({type:`set-oauth-tone`,tone:e}),setOauthUrl:(e,t)=>g({type:`set-oauth-url`,url:e,providerId:t}),setManualCode:e=>g({type:`set-manual-code`,code:e}),setManualCodeMsg:e=>g({type:`set-manual-code-msg`,msg:e}),setManualCodeOk:e=>g({type:`set-manual-code-msg`,msg:V,ok:e})},ie=k?t.includes(k.name.trim())&&k.name.trim()!==``:!1,oe=e=>{if(!M){if(Do(e)){g({type:`set-oauth-tos-pending`,providerId:e});return}ne(e,re)}},q=e=>{K(e,R,B,{setManualCodeBusy:e=>g({type:`set-manual-code-busy`,busy:e}),setManualCode:e=>g({type:`set-manual-code`,code:e}),setManualCodeOk:e=>g({type:`set-manual-code-msg`,msg:V,ok:e}),setManualCodeMsg:e=>g({type:`set-manual-code-msg`,msg:e})})},se=O?.id===`custom`,ce=k?.authMode===`local`,le=O?vo(O):!1;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":p(`modal.add`),className:`modal-overlay`,onClick:n,children:(0,z.jsxs)(`div`,{ref:b,className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{children:O?p(`modal.addNamed`,{label:O.label}):p(`modal.add`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,"aria-label":p(`common.close`),onClick:n,children:(0,z.jsx)(ae,{})})]}),O?k&&(O.auth===`oauth`&&k.authMode===`oauth`?(0,z.jsx)(Yo,{preset:O,oauthSupported:w,oauthBusy:M,oauthMsg:N,oauthMsgTone:P,oauthUrl:L===O.oauthProvider?F:``,manualCode:R,manualCodeBusy:B,manualCodeMsg:V,manualCodeOk:H,onRequestLogin:oe,onUseApiKeyInstead:()=>{g({type:`use-api-key-instead`,form:{...k,authMode:`key`}})},onManualCodeChange:e=>g({type:`set-manual-code`,code:e}),onSubmitManualCode:e=>{q(e)},onBack:()=>g({type:`back`})}):(0,z.jsx)(Zo,{preset:O,form:k,endpointChoice:U,error:j,saving:A,dup:ie,isCustom:se,isLocal:ce,isReservedForward:le,presetDescription:ee,onFormChange:e=>g({type:`set-form`,form:e}),onEndpointChoiceChange:e=>g({type:`set-endpoint-choice`,choice:e}),onSubmit:()=>{te()},onUseOauthLogin:()=>g({type:`use-oauth-login`,form:{...k,authMode:`oauth`}}),onBack:()=>g({type:`back`})})):(0,z.jsx)(Jo,{presets:T,usageRank:D,presetsLoading:E,initialTier:i,onSelectPreset:e=>G(e),onSelectCustom:()=>G(m[0]),accountRows:o,accountStatus:s,busyProvider:c,onLogin:l,onCancelLogin:u,onLogout:d})]})}),W&&(0,z.jsx)(Bo,{providerId:W,providerLabel:O?.label??W,onCancel:()=>g({type:`set-oauth-tos-pending`,providerId:null}),onContinue:()=>{let e=W;e&&(g({type:`set-oauth-tos-pending`,providerId:null}),ne(e,re))}},W)]})}function rs({apiBase:e,config:t,adding:n,addIntent:r,busy:i,addModalAccountRows:a,accountLoginStatus:o,removeConfirmName:s,removeDefaultProvider:c,codexLoginOpen:l,jsonLeaveOpen:u,jsonSaving:d,oauthTosPending:f,onCloseAdd:p,onAdded:m,onAccountLogin:h,onAccountCancelLogin:g,onAccountLogout:_,onOpenAdd:v,onCloseCodexLogin:y,onCodexAdded:b,onCancelRemove:x,onConfirmRemove:S,onCancelJsonLeave:C,onDiscardJson:w,onSaveJson:T,onCancelOauthTos:E,onContinueOauthTos:D}){return(0,z.jsxs)(z.Fragment,{children:[n&&(0,z.jsx)(ns,{apiBase:e,existingNames:Object.keys(t.providers),initialTier:r?.tier,initialCustom:r?.custom,onClose:p,onAdded:m,accountRows:a,accountStatus:o,accountBusy:i,onAccountLogin:h,onAccountCancelLogin:g,onAccountLogout:_,onOpen:v}),l&&(0,z.jsx)(Zi,{apiBase:e,onClose:y,onAdded:b}),s&&(0,z.jsx)(uo,{providerName:s,defaultProviderName:c,onCancel:x,onConfirm:S}),u&&C&&w&&T&&(0,z.jsx)(fo,{saving:d??!1,onCancel:C,onDiscard:w,onSave:T}),f&&(0,z.jsx)(Bo,{providerId:f.provider,providerLabel:Po(f.provider),onCancel:E,onContinue:D},`${f.provider}:${f.addAccount?`add`:`login`}`)]})}function is(e,t,n){return[...go(e.providers).map(e=>({id:e,label:vr(e,n),kind:`codex`,href:`#codex-auth`})),...t.toSorted((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:Po(e),kind:`oauth`}))]}function as(e,t){let n={...t},r=t.openai;if(r)for(let[t,i]of Object.entries(e.providers))i.authMode===`forward`&&(n[t]=r);return n}function os({apiBase:e}){let t=Y(),n=`ocx.providers.config.v1:${e}`,[r,i]=(0,_.useState)(()=>Z(n)),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)({}),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(null),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(null),[w,T]=(0,_.useState)(null),[E,D]=(0,_.useState)(!1),[O,k]=(0,_.useState)(0),[A,j]=(0,_.useState)(null),M=(0,_.useRef)(!0),N=(0,_.useRef)(null),P=(0,_.useRef)(!1),F=(0,_.useRef)(new Map),L=(0,_.useCallback)((e,t=!0)=>{c(e),u(t)},[]);(0,_.useEffect)(()=>(M.current=!0,()=>{M.current=!1}),[]),I(`add-provider-presets:${e}`,[e],async t=>{let n=await fetch(`${e}/api/provider-presets`,{signal:t});if(!n.ok)throw Error(String(n.status));let r=await n.json();return Array.isArray(r.providers)&&r.providers.length>0?r.providers:null}),I(`add-provider-usage:${e}`,[e],async t=>{let n=await fetch(`${e}/api/usage?range=30d`,{signal:t});if(!n.ok)return{};let r=await n.json(),i={};for(let e of r.providers??[])i[e.provider]=e.requests;return i});let[R,B]=(0,_.useState)({epoch:0,force:!1}),{fetchConfig:V,fetchOauth:H,fetchProviderQuotas:U}=zo({apiBase:e,t,setConfig:i,setOauthProviders:f,setOauthStatus:m,notify:L,invalidateProviderQuotas:(0,_.useCallback)((e=!1)=>{B(t=>({epoch:t.epoch+1,force:e}))},[]),configCacheKey:n}),W=ca(e),ee=W.activeNeedsReauth,G=(0,_.useMemo)(()=>{let e=W.accounts;if(e.length===0&&W.loadState===`loading`)return p;let t=e.find(e=>e.isMain)??e[0],n=!!t&&!!t.email&&t.email!==`Codex App login`,r=e.some(e=>!e.isMain&&(e.hasCredential||e.email)),i=n||r,a=n?t?.email:e.find(e=>!e.isMain&&e.email)?.email??void 0;return{...p,openai:{loggedIn:i,...a?{email:a}:{},...ee?{needsReauth:!0}:{}}}},[p,W.accounts,W.loadState,ee]),{accountSets:te,accountLoadStates:ne,switchingAccount:K,keyPools:re,fetchAccountSets:ie,switchAccount:ae,switchApiKey:q,removeApiKey:se,addApiKeyValue:ce,editCredentialAlias:le,removeAccount:J,activeAccountNeedsReauth:ue}=jo({apiBase:e,t,config:r,oauthStatus:G,aliveRef:M,notify:L,fetchConfig:V,fetchOauth:H,fetchProviderQuotas:U,codexActiveNeedsReauth:ee}),{draft:de,setDraft:fe,jsonEditorOpen:pe,jsonSaving:me,jsonLeaveOpen:he,saveConfig:ge,openJsonEditor:_e,discardJsonEditor:ve,requestCloseJsonEditor:ye,restoreJsonEditor:be,jsonIsDirty:xe,setJsonLeaveOpen:Se}=Mo({apiBase:e,config:r,notify:L,fetchConfig:V,fetchProviderQuotas:U,onSaved:()=>k(e=>e+1),t});(0,_.useEffect)(()=>{N.current!==e&&(N.current=e,Promise.resolve().then(()=>{V(),H()}))},[e,V,H]);let Ce=()=>k(e=>e+1),{cancelLoginOAuth:we,loginOAuth:Te,logoutOAuth:Ee}=Fo({apiBase:e,t,aliveRef:M,oauthLoginGenerationRef:F,accountSets:te,setBusy:g,setStatus:c,setLoginInfo:y,setOauthStatus:m,notify:L,fetchConfig:V,fetchOauth:H,fetchAccountSets:ie,fetchProviderQuotas:U,bumpModelsRefresh:Ce}),{removeProvider:De,confirmRemoveProvider:Oe,setProviderDisabled:ke,setDefaultProvider:Ae,updateProvider:je}=Ro({apiBase:e,t,removeBusyRef:P,workspaceSelected:b,setWorkspaceSelected:x,setRemoveConfirmName:T,notify:L,fetchConfig:V,fetchOauth:H,fetchProviderQuotas:U}),Me=(e,t=!1)=>{if(h!==e){if(Do(e)){j({provider:e,addAccount:t});return}Te(e,t)}};if(!r)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`page-head`,children:(0,z.jsx)(`h2`,{children:t(`nav.providers`)})}),s?(0,z.jsx)(X,{tone:`err`,children:s}):(0,z.jsxs)(`div`,{className:`providers-workspace providers-workspace--boot`,"aria-busy":`true`,children:[(0,z.jsx)(`div`,{className:`providers-workspace-rail providers-workspace-rail--boot`,"aria-hidden":`true`}),(0,z.jsx)(`div`,{className:`providers-workspace-main`,children:(0,z.jsxs)(`p`,{className:`muted`,children:[(0,z.jsx)(`span`,{className:`spin`,"aria-hidden":`true`}),` `,t(`prov.loadingConfig`)]})})]})]});let Ne=is(r,d,t),Pe=as(r,G),Fe=e=>r.providers[e]?.authMode===`forward`;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`page-head`,children:[(0,z.jsx)(`h2`,{children:t(`nav.providers`)}),(0,z.jsx)(`div`,{className:`row`,children:(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>o(!0),children:[(0,z.jsx)(oe,{}),t(`prov.add`)]})})]}),s&&(0,z.jsx)(X,{tone:l?`ok`:`err`,children:s}),(0,z.jsx)(Yr,{onRemoveProvider:De,providers:r.providers,apiBase:e,defaultProvider:r.defaultProvider,selectedName:b,onSelect:x,onAddProvider:e=>{C(e??null),o(!0)},onEditConfig:_e,jsonEditor:{open:pe,draft:de,isDirty:xe,onDraftChange:fe,onSave:()=>ge(),onClose:ye,onRestore:be},jsonSaving:me,modelsRefreshToken:O,activeAccountNeedsReauth:ue,quotaRefreshEpoch:R.epoch,quotaForceRefresh:R.force,detail:(t,n)=>{let i=Pe[t.name]??p[t.name];return(0,z.jsx)(po,{item:t,usageTotals:n.usageTotals,modelUsage:n.modelUsage,quotaReport:n.quotaReport,availableModels:n.availableModels,hasLiveModels:n.hasLiveModels,selectedModels:n.selectedModels,modelsLoading:n.modelsLoading,modelsLoadFailed:n.modelsLoadFailed,onRetryModels:n.onRetryModels,oauthEmail:i?.email,onDeselect:()=>x(null),apiBase:e,oauth:i,accounts:te[t.name]?.accounts??[],keys:re[t.name]??[],accountLoadState:ne[t.name]??(t.authMode===`oauth`?`idle`:`ready`),switchingAccountId:K?.provider===t.name?K.accountId:null,busyProvider:h,loginHint:v,authHandlers:{onLogin:Me,onCancelLogin:we,onLogout:Ee,onReauth:(e,t)=>Te(e,!0,t),onSwitchAccount:ae,onRemoveAccount:J,onRetryAccounts:async e=>{await ie([e])},onAddApiKey:ce,onSwitchApiKey:q,onRemoveApiKey:se,onEditAlias:le},isDefault:t.name===r.defaultProvider,onRemoveProvider:De,onSetDisabled:ke,onSetDefault:e=>{Ae(e)},onUpdateProvider:je,codexController:W},t.name)}}),(0,z.jsx)(rs,{apiBase:e,config:r,adding:a,addIntent:S,busy:h,addModalAccountRows:Ne,accountLoginStatus:Pe,removeConfirmName:w,removeDefaultProvider:w===r.defaultProvider?Object.entries(r.providers).find(([e,t])=>e!==w&&t.disabled!==!0)?.[0]??null:null,codexLoginOpen:E,jsonLeaveOpen:he,jsonSaving:me,oauthTosPending:A,onCloseAdd:()=>{h&&we(h),o(!1),C(null)},onAdded:e=>{o(!1),C(null),L(t(`prov.added`,{name:e,cmd:`ocx sync`}),!0),V(),H(),U(!0),Ce()},onAccountLogin:async n=>{if(n===`openai`){if(h===`openai`)return;let n=r.providers.openai,i=_o(n);if(i===`invalid`){L(t(`codexAuth.openaiMissing`),!1);return}if(i===`absent`||i===`disabled`){g(`openai`);try{await wo(e,i),await V()}catch(e){e instanceof Co?L(t(e.i18nKey),!1):L(e instanceof Error?e.message:t(`prov.saveFailed`),!1);return}finally{M.current&&g(e=>e===`openai`?null:e)}}D(!0);return}if(Fe(n)){D(!0);return}(r.providers[n]?.authMode===`oauth`||d.includes(n))&&Me(n)},onAccountCancelLogin:e=>{we(e)},onAccountLogout:e=>{Ee(e)},onOpenAdd:H,onCloseCodexLogin:()=>D(!1),onCodexAdded:()=>{D(!1),L(t(`prov.loginOk`,{provider:vr(`openai`,t),cmd:`ocx sync`}),!0),V(),H(),U(!0),Ce()},onCancelRemove:()=>T(null),onConfirmRemove:()=>{Oe(w)},onCancelJsonLeave:()=>{me||Se(!1)},onDiscardJson:ve,onSaveJson:()=>{ge()},onCancelOauthTos:()=>j(null),onContinueOauthTos:()=>{let e=A;e&&(j(null),Te(e.provider,e.addAccount))}})]})}var ss={"gpt-5.6-sol":Ce,"gpt-5.6-terra":Ee,"gpt-5.6-luna":we},cs={width:14,height:14,flexShrink:0,verticalAlign:`text-bottom`};function ls(e){return e.slice(e.lastIndexOf(`/`)+1)}function us(e){return ss[e]??ss[ls(e)]??null}function ds(e){let t=us(e);return t?(0,_.createElement)(`span`,{className:`model-label`},(0,_.createElement)(t,{style:cs,"aria-hidden":!0}),e):e}var fs=[`low`,`medium`,`high`,`xhigh`,`max`,`ultra`];function ps(e,t){let n=e.filter(e=>e.provider.trim()&&e.model.trim());if(n.length===0)return[...fs];let r=new Set(fs),i=null;for(let e of n){let n=`${e.provider.trim()}/${e.model.trim()}`,a=t.get(n),o=a===void 0?[]:a.filter(e=>r.has(e));if(i===null)i=o;else{let e=new Set(o);i=i.filter(t=>e.has(t))}}let a=new Set(i??[]);return fs.filter(e=>a.has(e))}var ms=0;function hs(e={}){return{provider:e.provider??``,model:e.model??``,...e.weight===void 0?{}:{weight:e.weight},clientKey:e.clientKey??`ct-${++ms}`}}var gs=/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/,_s=/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}(\/[a-zA-Z0-9][a-zA-Z0-9._-]{0,63})?$/,vs=/^(?:gpt-|o1-|o3-|o4-|codex-)/;function ys(e){return gs.test(e.trim())}function bs(e){return`combo/${e.trim()}`}function xs(e,t){return(typeof t==`string`?t.trim():``)||bs(e)}function Ss(e){return typeof e==`string`&&e.trim()?e.trim():null}function Cs(e){return e===`round-robin`?`round-robin`:`failover`}function ws(e){return typeof e==`number`&&Number.isInteger(e)&&e>=1&&e<=100?e:1}function Ts(e){return typeof e==`string`&&fs.includes(e)?e:null}function Es(e){return typeof e==`number`&&Number.isInteger(e)&&e>=1&&e<=1e4?e:void 0}function Ds(e){if(!e||typeof e!=`object`)return[];let t=e.combos;if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!e||typeof e!=`object`)continue;let t=e,r=typeof t.id==`string`?t.id.trim():``;if(!r)continue;let i=Array.isArray(t.targets)?t.targets:[],a=[];for(let e of i){if(!e||typeof e!=`object`)continue;let t=e,n=typeof t.provider==`string`?t.provider.trim():``,r=typeof t.model==`string`?t.model.trim():``;if(!n||!r)continue;let i=Es(t.weight);a.push(hs(i===void 0?{provider:n,model:r}:{provider:n,model:r,weight:i}))}n.push({id:r,model:typeof t.model==`string`&&t.model.trim()?t.model.trim():xs(r,Ss(t.alias)),alias:Ss(t.alias),strategy:Cs(t.strategy),stickyLimit:ws(t.stickyLimit),defaultEffort:Ts(t.defaultEffort),targets:a})}return n.sort((e,t)=>e.id.localeCompare(t.id,void 0,{sensitivity:`base`}))}function Os(e){let t=[],n=[];for(let r of e)r.strategy===`round-robin`?n.push(r):t.push(r);return{failover:t,roundRobin:n}}function ks(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>e.id.toLowerCase().includes(n)||e.model.toLowerCase().includes(n)?!0:e.targets.some(e=>e.provider.toLowerCase().includes(n)||e.model.toLowerCase().includes(n))):e}function As(e,t={}){let n=[],r=t.cataloguedComboIds;for(let t of e)t.targets.length===0?n.push({id:t.id,model:t.model,reason:`empty-targets`}):t.targets.length<2&&n.push({id:t.id,model:t.model,reason:`few-targets`}),r&&t.targets.length>0&&!r.has(t.id)&&n.push({id:t.id,model:t.model,reason:`catalog-omitted`});return n}function js(e,t){return e.id!==t.id||e.alias!==t.alias||e.strategy!==t.strategy||e.stickyLimit!==t.stickyLimit||e.defaultEffort!==t.defaultEffort||e.targets.length!==t.targets.length?!1:e.targets.every((e,n)=>{let r=t.targets[n];return e.provider===r.provider&&e.model===r.model&&(e.weight??1)===(r.weight??1)})}function Ms(e,t={}){return{id:e.id.trim(),...t.renameFrom?{renameFrom:t.renameFrom}:{},combo:{targets:e.targets.map(t=>e.strategy===`round-robin`?{provider:t.provider.trim(),model:t.model.trim(),weight:t.weight??1}:{provider:t.provider.trim(),model:t.model.trim()}),strategy:e.strategy,defaultEffort:e.defaultEffort,...e.strategy===`round-robin`?{stickyLimit:e.stickyLimit}:{},...e.alias&&e.alias.trim()?{alias:e.alias.trim()}:{}}}}function Ns(e,t){let n=e.id.trim();if(!n)return`missingId`;if(!ys(n))return`invalidId`;if(t.existingIds.includes(n))return`duplicateId`;if(Object.hasOwn(t.providers,`combo`))return`reservedNamespace`;if(Object.hasOwn(t.providers,n))return`providerCollision`;let r=e.alias?.trim()??``;if(r){if(!_s.test(r))return`invalidAlias`;if(r===`combo`||r.startsWith(`combo/`))return`aliasReservedNamespace`;if(!r.includes(`/`)&&vs.test(r))return`aliasNativeFamily`;if((t.existingAliases??[]).includes(r))return`duplicateAlias`}if(e.targets.length<1)return`noTargets`;for(let n of e.targets){if(!n.provider.trim()||!n.model.trim())return`incompleteTarget`;if(!Object.hasOwn(t.providers,n.provider.trim()))return`unknownProvider`}let i=new Set;for(let t of e.targets){let e=`${t.provider.trim()}/${t.model.trim()}`;if(i.has(e))return`duplicateTarget`;i.add(e)}if(e.strategy===`round-robin`){if(!Number.isInteger(e.stickyLimit)||e.stickyLimit<1||e.stickyLimit>100)return`invalidStickyLimit`;for(let t of e.targets){let e=t.weight??1;if(!Number.isInteger(e)||e<1||e>1e4)return`invalidWeight`}}return e.targets.some(e=>t.providers[e.provider.trim()]?.disabled!==!0)?null:`noEnabledTarget`}function Ps(e=``){return{id:e,model:e?bs(e):`combo/`,alias:null,strategy:`failover`,stickyLimit:1,defaultEffort:null,targets:[hs()]}}function Fs(e,t,n){if(!n)return{kind:`disabled`,data:void 0,error:void 0,showSkeleton:!1,refreshing:!1,showError:!1};let r=e.data!==void 0,i=!e.lastAttemptOk&&e.error!==void 0;return e.refreshing?r?{kind:`loading-with-stale-data`,data:e.data,error:e.error,showSkeleton:!1,refreshing:!0,showError:i}:{kind:i?`retrying-cold`:`cold`,data:void 0,error:i?e.error:void 0,showSkeleton:!0,refreshing:!0,showError:!1}:i?r?{kind:`failed-with-stale`,data:e.data,error:e.error,showSkeleton:!1,refreshing:!1,showError:!0}:{kind:`failed-cold`,data:void 0,error:e.error,showSkeleton:!1,refreshing:!1,showError:!0}:r?{kind:t(e.data)?`ready-empty`:`ready-populated`,data:e.data,error:void 0,showSkeleton:!1,refreshing:!1,showError:!1}:{kind:`cold`,data:void 0,error:void 0,showSkeleton:!0,refreshing:!1,showError:!1}}function Is(e,t,n,r){let{isEmpty:i,...a}=r,o=I(e,t,n,a);return{...o,state:Fs(o,i,r.enabled!==!1)}}function Ls({className:e,style:t}){return(0,z.jsx)(`span`,{"aria-hidden":`true`,className:e?`data-surface-skeleton__block ${e}`:`data-surface-skeleton__block`,style:t})}function Rs({label:e,rows:t=3,className:n}){let r=Math.max(1,Math.floor(t));return(0,z.jsxs)(`div`,{className:n?`data-surface-skeleton ${n}`:`data-surface-skeleton`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-busy":`true`,children:[(0,z.jsx)(`span`,{className:`sr-only`,children:e}),Array.from({length:r},(e,t)=>(0,z.jsx)(`div`,{className:`data-surface-skeleton__row`,"aria-hidden":`true`,children:(0,z.jsx)(Ls,{})},t))]})}function zs({children:e,busy:t=!0,live:n=!0,className:r}){return(0,z.jsxs)(`div`,{className:r?`data-surface-status ${r}`:`data-surface-status`,role:n?`status`:void 0,"aria-live":n?`polite`:void 0,"aria-atomic":n?`true`:void 0,"aria-busy":t||void 0,children:[t&&(0,z.jsx)(`span`,{className:`spin`,"aria-hidden":`true`}),(0,z.jsx)(`span`,{children:e})]})}function Bs(e,t){let n=new Map;for(let t of e){let e=n.get(t.provider);e?e.push(t):n.set(t.provider,[t])}let r=new Map(t.map(e=>[e.name,e]));for(let e of t){if(e.disabled===!0){n.delete(e.name);continue}e.authMode!==`forward`&&(n.has(e.name)||n.set(e.name,[]))}return[...n.entries()].map(([e,t])=>{let n=r.get(e);return{provider:e,rows:t,native:t.length>0&&t.every(e=>e.native===!0),liveModels:n?.liveModels!==!1,configuredModels:n?.models??[],discovery:n?.discovery}}).sort((e,t)=>e.native===t.native?e.provider.localeCompare(t.provider):e.native?-1:1)}function Vs({liveModels:e,discovery:t,showFailureBadge:n=!0}){let r=Y(),i=e&&t?.status===`failed`?t:void 0;return(0,z.jsxs)(`div`,{className:`row muted text-label leading-body`,role:`status`,style:{alignItems:`flex-start`,gap:8,padding:`6px 0`},children:[(0,z.jsx)(ue,{width:15,height:15,"aria-hidden":`true`,style:{flexShrink:0,marginTop:2}}),(0,z.jsxs)(`span`,{children:[i&&n&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`badge badge-amber`,children:r(`models.discoveryFailedBadge`)}),` `]}),i?`${li(r,i)} `:`${r(e?`models.emptyDiscovery`:`models.emptyDiscoveryDisabled`)} `,(0,z.jsx)(`a`,{href:`#providers`,children:r(`models.openProviderSettings`)})]})]})}function Hs(e){return Array.isArray(e)?Ds({combos:e}):null}function Us({apiBase:e}){let t=Y(),n=`ocx.models.catalog.v1:${e}`,r=(0,_.useMemo)(()=>Z(n),[n]),[i,a]=(0,_.useState)(()=>r?.models??[]),[o,s]=(0,_.useState)(()=>r?.providers??[]),[c,l]=(0,_.useState)(()=>new Set(r?.disabled??[])),[u,d]=(0,_.useState)(()=>r?.selectedModels??null),[f,p]=(0,_.useState)({}),[m,h]=(0,_.useState)({}),[g,v]=(0,_.useState)(()=>r?.contextCaps??{}),[y,b]=(0,_.useState)(()=>r?.contextCapValue??35e4),[x,S]=(0,_.useState)(``),[C,w]=(0,_.useState)(!1),T=bi(),[E,D]=(0,_.useState)(()=>T??new Set),O=(0,_.useRef)(T===null),[k,A]=(0,_.useState)(``),[j,M]=(0,_.useState)(!1),[N,P]=(0,_.useState)(!1),F=(0,_.useRef)(!1),I=(0,_.useRef)(0),R=(0,_.useRef)(!1),[B,V]=(0,_.useState)(null),[H,W]=(0,_.useState)(!1),[ee,G]=(0,_.useState)(``),te=(0,_.useRef)(!1),[ne,K]=(0,_.useState)(``),[re,ie]=(0,_.useState)(!1),[ae,oe]=(0,_.useState)(!1),[q,se]=(0,_.useState)(!1),[ce,le]=(0,_.useState)(`add`),[J,de]=(0,_.useState)(``),[fe,pe]=(0,_.useState)(``),[me,ge]=(0,_.useState)(``),[_e,ve]=(0,_.useState)(``),[ye,be]=(0,_.useState)(``),[xe,Se]=(0,_.useState)(!1),[Ce,we]=(0,_.useState)([`text`]),[Te,Ee]=(0,_.useState)(!1),[De,ke]=(0,_.useState)(``),[Ae,je]=(0,_.useState)(null),Me=(0,_.useRef)(null),[Ne,Pe]=(0,_.useState)(null),[Fe,Ie]=(0,_.useState)(!1),Le=`ocx.models.combos.v1:${e}`,Re=(0,_.useMemo)(()=>{let t=Hs(Z(Le));return t===null?Hs(Z(`ocx.combos.workspace.v1:${e}`)?.combos):t},[e,Le]),ze=Is(`models-combos:${e}`,[e],async t=>{let n=Ds(await ct(await fetch(`${e}/api/combos`,{signal:t})));return Q(Le,n),n},{isEmpty:()=>!1,initialData:Re??void 0}),Be=ze.state,Ve=Be.data??Re,He=Be.showError,[Ue,We]=(0,_.useState)(Si),[Ge,Ke]=(0,_.useState)(null),qe=()=>{let e=!Ue;Ci(e),We(e)};(0,_.useEffect)(()=>()=>{Me.current&&clearTimeout(Me.current)},[]);let Je=(0,_.useMemo)(()=>yi(i,c,u??{}),[i,c,u]),Ye=(0,_.useCallback)(async()=>{try{let t=await lt(await fetch(`${e}/api/shadow-call-settings`));t&&Pe(t)}catch{}},[e]),Xe=(0,_.useCallback)(async()=>{if(!te.current)try{let t=await fetch(`${e}/api/v2`);if(!(t.headers.get(`content-type`)??``).includes(`application/json`)){V(null);return}let n=await lt(t);if(!n||typeof n.enabled!=`boolean`){V(null);return}V({enabled:n.enabled,agentsMaxThreadsConflict:n.agentsMaxThreadsConflict===!0,maxConcurrentThreadsPerSession:typeof n.maxConcurrentThreadsPerSession==`number`?n.maxConcurrentThreadsPerSession:null,multiAgentMode:n.multiAgentMode===`v1`||n.multiAgentMode===`v2`?n.multiAgentMode:`default`})}catch{V(null)}},[e]),Ze=(0,_.useCallback)(async t=>{let[r,i,a,o]=await Promise.all([fetch(`${e}/api/models`),fetch(`${e}/api/provider-context-caps`),fetch(`${e}/api/providers`),ii(e)]),[s,c,l]=await Promise.all([ct(r),ct(i),ct(a)]);if(s===void 0||c===void 0||l===void 0)throw Error(`models payload missing`);if(t.aborted)throw Error(`models request aborted`);let u=vi(s),d=typeof c.value==`number`&&Number.isFinite(c.value)&&c.value>0?c.value:typeof c.cap==`number`&&Number.isFinite(c.cap)&&c.cap>0?c.cap:void 0,f=d===void 0?35e4:d,p={models:s,providers:l,selectedModels:o,disabled:[...u],contextCaps:c.caps??{},contextCapValue:f};return Q(n,p),p},[e,n]),Qe=(0,_.useCallback)(e=>{let t=Bs(e.models,e.providers);Ke(e=>e!==null&&!t.some(t=>t.provider===e)?null:e),a(e.models),s(e.providers),l(new Set(e.disabled)),d(e.selectedModels),b(e.contextCapValue),v(e.contextCaps)},[]),$e=Is(n,[e],async e=>{let t=await Ze(e);if(e.aborted)throw Error(`models request aborted`);return Qe(t),t},{isEmpty:()=>!1,pollMs:1e4,initialData:r??void 0}),et=$e.state,tt=(0,_.useCallback)(async(e=!1)=>{if(R.current&&!e)return!1;R.current=!0;let t=++I.current;try{let e=await Ze(new AbortController().signal);return ci(t,I.current)?(Qe(e),L(n,e),!0):!1}catch{return!1}finally{ci(t,I.current)&&(R.current=!1)}},[Qe,n,Ze]);(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{Ye(),Xe()},0),t=window.setInterval(()=>{te.current||Xe()},1e4);return()=>{window.clearTimeout(e),window.clearInterval(t)}},[Ye,Xe]);let ot=(0,_.useMemo)(()=>Bs(i,o),[i,o]);(0,_.useEffect)(()=>{if(!O.current||ot.length===0)return;O.current=!1;let e=new Set(ot.map(e=>e.provider));D(e),xi(e)},[ot]);let st=(0,_.useMemo)(()=>u?i.filter(e=>oi(u,e.provider,e.id,e.native===!0,c.has(e.namespaced))).length:0,[c,i,u]),ut=async(n,r,i,a)=>{++I.current,P(!0),F.current=!0,A(``);let o=null;try{(await si(e,n,r,i,a)).ok||(o=`models.saveFailed`)}catch{o=`models.networkError`}finally{let e=await tt(!0);o?(M(!1),A(t(o))):e&&(M(!0),A(t(`models.applied`))),P(!1),F.current=!1}},dt=async n=>{P(!0),F.current=!0,A(``);let r=g[n]!==y;try{let i=await fetch(`${e}/api/provider-context-caps`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:n,enabled:r})});try{v((await ct(i,t(`models.capSaveFailed`)))?.caps??{}),M(!0),A(t(`models.capApplied`)),await tt(!0)}catch(e){M(!1),A(e instanceof Error?e.message:t(`models.capSaveFailed`))}}catch{M(!1),A(t(`models.networkError`))}finally{P(!1),F.current=!1}},ft=e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),xi(n),n})},pt=e=>{D(()=>{let t=e?new Set(ot.map(e=>e.provider)):new Set;return xi(t),t})},mt=async n=>{P(!0),F.current=!0,A(``);try{let r=await fetch(`${e}/api/provider-context-caps`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});try{let e=await ct(r,t(`models.capSaveFailed`));typeof e?.value==`number`&&Number.isFinite(e.value)&&e.value>0&&b(e.value),v(e?.caps??{}),M(!0),A(t(`models.capApplied`)),await tt(!0)}catch(e){M(!1),A(e instanceof Error?e.message:t(`models.capSaveFailed`))}}catch{M(!1),A(t(`models.networkError`))}finally{P(!1),F.current=!1}},ht=e=>{!Number.isFinite(e)||e<=0||mt({value:Math.floor(e)})},gt=e=>{if(e===`custom`){w(!0),S(String(y));return}w(!1);let t=Number(e);Number.isFinite(t)&&t>0&&t!==y&&ht(t)},_t=()=>{let e=Number(x.replace(/[_,\s]/g,``));if(!Number.isFinite(e)||e<=0){M(!1),A(t(`models.capSaveFailed`));return}w(!1),ht(e)},vt=(0,_.useMemo)(()=>{let e=ot.filter(e=>!e.native&&e.rows.length>0);return e.length>0&&e.every(e=>g[e.provider]===y)},[ot,g,y]),yt=()=>{mt({setAll:!vt})},bt=async t=>{if(!(!Ne||Fe)){Ie(!0),Pe({...Ne,...t});try{await fetch(`${e}/api/shadow-call-settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})}finally{Ie(!1)}}},xt=async n=>{if(!(!B||te.current)&&B.multiAgentMode!==n){W(!0),te.current=!0,G(``),A(``);try{let r=await fetch(`${e}/api/v2`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({multiAgentMode:n})});try{let e=await ct(r,t(`models.saveFailed`));Xe(),M(!0),A(t(`models.v2Applied`)),G((e?.warnings??[]).join(` `))}catch(e){M(!1),A(e instanceof Error?e.message:t(`models.saveFailed`))}}catch{M(!1),A(t(`models.networkError`))}finally{W(!1),te.current=!1}}},St=async n=>{if(!(!B||te.current)){if(!Number.isInteger(n)||n<1){M(!1),A(t(`models.v2ThreadsInvalid`));return}if(B.maxConcurrentThreadsPerSession!==n){W(!0),te.current=!0,G(``),A(``);try{let r=await fetch(`${e}/api/v2`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({maxConcurrentThreadsPerSession:n})});try{let e=await ct(r,t(`models.saveFailed`));if(!e||typeof e.enabled!=`boolean`){M(!1),A(t(`models.saveFailed`));return}V({enabled:e.enabled,agentsMaxThreadsConflict:e.agentsMaxThreadsConflict===!0,maxConcurrentThreadsPerSession:typeof e.maxConcurrentThreadsPerSession==`number`?e.maxConcurrentThreadsPerSession:null,multiAgentMode:e.multiAgentMode===`v1`||e.multiAgentMode===`v2`?e.multiAgentMode:`default`}),M(!0),A(t(`models.v2ThreadsApplied`)),ie(!1)}catch(e){M(!1),A(e instanceof Error?e.message:t(`models.saveFailed`))}}catch{M(!1),A(t(`models.networkError`))}finally{W(!1),te.current=!1}}}},Ct=e=>{if(e===`custom`){ie(!0),K(String(B?.maxConcurrentThreadsPerSession??``));return}ie(!1),St(Number(e))},wt=(e,t)=>{Me.current&&clearTimeout(Me.current),Me.current=setTimeout(()=>{je({namespaced:e,rect:t.getBoundingClientRect()})},300)},Tt=(e,t)=>{Me.current&&clearTimeout(Me.current),je({namespaced:e,rect:t.getBoundingClientRect()})},Et=()=>{Me.current&&clearTimeout(Me.current),Me.current=setTimeout(()=>je(null),120)},kt=()=>{Me.current&&clearTimeout(Me.current)},At=async(n,r,i,a,o)=>{Ee(!0),ke(``);try{let s=await fetch(`${e}/api/custom-models`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:n,modelId:r,displayName:i,contextWindow:a,inputModalities:o})});try{await ct(s,t(`models.customSaveFailed`)),se(!1),M(!0),A(t(`models.customAdded`)),await tt(!0)}catch(e){ke(e instanceof Error?e.message:t(`models.customSaveFailed`))}}catch{ke(t(`models.networkError`))}finally{Ee(!1)}},jt=async(n,r)=>{Ee(!0),ke(``);try{let i=await fetch(`${e}/api/custom-models/${encodeURIComponent(n)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)});try{await ct(i,t(`models.customSaveFailed`)),se(!1),M(!0),A(t(`models.customUpdated`)),await tt(!0)}catch(e){ke(e instanceof Error?e.message:t(`models.customSaveFailed`))}}catch{ke(t(`models.networkError`))}finally{Ee(!1)}},Mt=async n=>{try{(await fetch(`${e}/api/custom-models/${encodeURIComponent(n)}`,{method:`DELETE`})).ok?(M(!0),A(t(`models.customDeleted`)),await tt(!0)):(M(!1),A(t(`models.customSaveFailed`)))}catch{M(!1),A(t(`models.networkError`))}},Nt=et.data??r;if(et.showSkeleton&&!Nt)return(0,z.jsx)(Rs,{label:t(`models.loading`),rows:5});if(et.kind===`failed-cold`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(X,{tone:`err`,children:et.error instanceof Error?et.error.message:t(`models.loadFail`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>$e.refresh(),children:t(`common.retry`)})]});let Pt=u??{},Ft=e=>{let{provider:n,rows:r,native:i,liveModels:a,discovery:o}=e,s=E.has(n),l=e=>oi(Pt,n,e.id,e.native===!0,c.has(e.namespaced)),u=r.filter(l).length,d=g[n]===y,_=i,v=a&&o?.status===`failed`?o:void 0,b=(f[n]??``).trim().toLowerCase(),x=b?r.filter(e=>e.id.toLowerCase().includes(b)):r,S=x.toSorted((e,t)=>Number(!l(e))-Number(!l(t))),C=m[n]??60,w=S.slice(0,C),T=x.length-w.length,D=r.length>0,O=!D||r.every(l),k=!D||r.every(e=>!l(e)),A=e=>{D&&ut(`provider`,n,r.map(e=>({id:e.id,native:e.native===!0})),e)};return(0,z.jsxs)(`div`,{className:`card models-provider-card`,children:[(0,z.jsxs)(`div`,{className:`row group-head models-provider-head${s?``:` open`}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`row models-provider-toggle`,onClick:()=>ft(n),"aria-expanded":!s,style:{flex:1,border:0,background:`transparent`,padding:0,color:`inherit`,cursor:`pointer`,textAlign:`left`},children:[(0,z.jsx)(he,{style:{width:14,height:14,color:`var(--muted)`,transform:s?`none`:`rotate(90deg)`,transition:`transform .12s`}}),(0,z.jsx)(`span`,{className:`text-body font-semibold`,children:n}),_&&(0,z.jsx)(`span`,{className:`models-chip muted mono text-caption`,children:t(`models.nativeGroupLabel`)}),v&&(0,z.jsx)(`span`,{className:`badge badge-amber`,role:`status`,title:li(t,v),children:t(`models.discoveryFailedBadge`)}),(0,z.jsx)(`span`,{className:`muted mono text-label`,children:t(`models.active`,{active:u,total:r.length})})]}),(0,z.jsxs)(`div`,{className:`row models-provider-actions`,children:[!_&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,onClick:e=>{e.stopPropagation(),le(`add`),de(n),pe(``),ge(``),ve(``),be(``),Se(!1),we([`text`]),ke(``),se(!0)},"aria-label":t(`models.customAdd`),"aria-haspopup":`dialog`,children:`+`}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,disabled:N||O,onClick:()=>A(!0),children:t(`models.allOn`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,disabled:N||k,onClick:()=>A(!1),children:t(`models.allOff`)}),!_&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(nt,{on:d,onClick:()=>dt(n),disabled:N,label:t(`models.capValue`,{value:_i(y)})}),(0,z.jsx)(`span`,{className:`muted mono text-label`,children:t(`models.capValue`,{value:_i(y)})})]})]})]}),!s&&(0,z.jsxs)(`div`,{className:`models-provider-body`,children:[_&&(0,z.jsx)(`p`,{className:`muted text-label models-provider-hint`,children:t(`models.nativeHint`)}),r.length===0&&(0,z.jsx)(Vs,{liveModels:a,discovery:o,showFailureBadge:!1}),r.length>60/2&&(0,z.jsx)(`input`,{className:`input`,placeholder:t(`models.search`),value:f[n]??``,onChange:e=>p(t=>({...t,[n]:e.target.value})),"aria-label":t(`models.search`)}),w.map(e=>{let r=!l(e);return(0,z.jsxs)(`div`,{className:`model-row-wrap`,onMouseEnter:t=>wt(e.namespaced,t.currentTarget),onMouseLeave:Et,onFocus:t=>Tt(e.namespaced,t.currentTarget),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||je(null)},children:[(0,z.jsxs)(`div`,{className:`row models-model-row`,children:[(0,z.jsx)(nt,{on:!r,onClick:()=>void ut(`models`,n,[{id:e.id,native:e.native===!0}],r),disabled:N,label:e.native?e.id:e.namespaced}),(0,z.jsx)(`code`,{className:`mono text-control`,style:{color:r?`var(--faint)`:`var(--text)`,textDecoration:r?`line-through`:`none`},children:e.native?ds(e.id):e.namespaced}),e.custom&&(0,z.jsx)(`span`,{className:`models-chip muted mono text-caption`,children:t(`models.customBadge`)}),e.contextCapped&&(0,z.jsx)(`span`,{className:`models-chip muted mono text-caption`,children:t(`models.contextCappedValue`,{value:_i(e.contextCap??y)})})]}),Ae?.namespaced===e.namespaced&&(()=>{let n=Ae.rect,i=n.bottom+4,a=i+360>window.innerHeight;return(0,z.jsxs)(`div`,{className:`model-tip${e.custom?` has-actions`:``}${a?` flip-up`:``}`,role:`tooltip`,style:{position:`fixed`,left:n.left+24,...a?{bottom:window.innerHeight-n.top+4}:{top:i}},onMouseEnter:kt,onMouseLeave:Et,children:[(0,z.jsx)(`div`,{className:`model-tip-id`,children:e.native?e.id:e.namespaced}),e.displayName&&(0,z.jsx)(`div`,{className:`model-tip-display`,children:e.displayName}),e.custom&&(0,z.jsx)(`span`,{className:`models-chip models-chip--tip muted mono text-caption`,children:t(`models.customBadge`)}),(0,z.jsxs)(`div`,{className:`model-tip-grid`,children:[(0,z.jsx)(`span`,{className:`model-tip-key`,children:t(`models.tipProvider`)}),(0,z.jsx)(`span`,{className:`model-tip-val`,children:e.provider}),(e.contextWindow||e.contextCap)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`model-tip-key`,children:t(`models.tipContext`)}),(0,z.jsx)(`span`,{className:`model-tip-val`,children:_i(e.contextWindow??e.contextCap??0)})]}),e.inputModalities&&e.inputModalities.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`model-tip-key`,children:t(`models.tipModalities`)}),(0,z.jsx)(`span`,{className:`model-tip-val`,children:e.inputModalities.join(`, `)})]}),(0,z.jsx)(`span`,{className:`model-tip-key`,children:t(`models.tipStatus`)}),(0,z.jsx)(`span`,{className:`model-tip-val`,children:t(r?`models.tipDisabled`:`models.tipActive`)})]}),e.custom&&e.customId&&(0,z.jsxs)(`div`,{className:`model-tip-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,onClick:()=>{le(`edit`),de(e.provider),pe(e.customId),ge(e.id),ve(e.displayName??``),be(e.contextWindow?String(e.contextWindow):``),Se(!1),we(e.inputModalities??[`text`]),ke(``),se(!0),je(null)},children:t(`models.customEdit`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,style:{color:`var(--red)`},onClick:()=>{window.confirm(t(`models.customDeleteConfirm`,{name:e.displayName??e.id}))&&Mt(e.customId),je(null)},children:t(`models.customDelete`)})]})]})})()]},e.namespaced)}),T>0&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>h(e=>({...e,[n]:C+60})),className:`btn btn-ghost btn-sm models-show-more`,children:t(`models.showMore`,{n:T})})]})]},n)},It=Ge?ot.filter(e=>e.provider===Ge):ot,Lt=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`models-control-top-row`,children:[(0,z.jsxs)(`div`,{className:`models-shadow-row row muted text-control`,"aria-busy":!Ne||void 0,children:[(0,z.jsxs)(`span`,{className:`models-shadow-label`,children:[t(`models.shadowCallIntercept`),` `,(0,z.jsx)(at,{content:t(`models.shadowCallInterceptHint`,{models:Dt(Ne?.sourceModels)}),side:`top`,maxWidth:320,children:(0,z.jsx)(`span`,{style:{cursor:`help`},"aria-label":t(`models.shadowCallInterceptHint`,{models:Dt(Ne?.sourceModels)}),children:`ⓘ`})})]}),(0,z.jsx)(`code`,{className:`text-caption models-shadow-warning`,style:{opacity:.6},children:t(`models.shadowCallOriginal`,{models:Ot(Ne?.sourceModels)})}),(0,z.jsx)(nt,{on:Ne?.enabled??!1,onClick:()=>void bt({enabled:!Ne?.enabled}),disabled:!Ne||Fe,label:t(`models.shadowCallIntercept`)}),(0,z.jsx)(`div`,{className:`models-shadow-model-slot`,children:(0,z.jsx)(rt,{value:Ne?.model??``,options:[{value:``,label:`—`},...Je],onChange:e=>{Pe(t=>t&&{...t,model:e}),bt({model:e})},disabled:!Ne||Fe||!Ne.enabled,label:t(`models.shadowCallIntercept`)})})]}),B&&(0,z.jsxs)(`div`,{className:`models-v2-mode-row row`,children:[(0,z.jsx)(`span`,{className:`muted text-control`,children:t(`models.v2Label`)}),(0,z.jsx)(`div`,{className:`segmented models-segmented`,role:`radiogroup`,"aria-label":t(`models.v2Label`),children:[`v1`,`default`,`v2`].map(e=>(0,z.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":(B.multiAgentMode??`default`)===e,className:`btn btn-sm${(B.multiAgentMode??`default`)===e?` btn-primary`:` btn-ghost`}`,style:{background:(B.multiAgentMode??`default`)===e?void 0:`transparent`,color:(B.multiAgentMode??`default`)===e?void 0:`var(--muted)`},disabled:H,onClick:()=>void xt(e),children:t(`models.v2Mode_${e}`)},e))}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{width:24,height:24,minWidth:24,flex:`0 0 24px`,padding:0,borderRadius:`var(--radius-pill)`,color:`var(--muted)`},onClick:()=>oe(!0),"aria-label":t(`models.v2Label`),"aria-haspopup":`dialog`,children:(0,z.jsx)(ue,{width:14,height:14,"aria-hidden":`true`})})]})]}),B&&(B.enabled||B.agentsMaxThreadsConflict||ee)&&(0,z.jsxs)(`div`,{className:`models-v2-detail-row row`,children:[B.enabled&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`muted text-control`,children:t(`models.v2ThreadsLabel`)}),(0,z.jsx)(rt,{value:re?`custom`:B.maxConcurrentThreadsPerSession!==null&&B.maxConcurrentThreadsPerSession!==void 0?mi.has(B.maxConcurrentThreadsPerSession)?String(B.maxConcurrentThreadsPerSession):`custom`:``,options:[...B.maxConcurrentThreadsPerSession===null||B.maxConcurrentThreadsPerSession===void 0?[{value:``,label:t(`models.v2ThreadsDefault`)}]:[],...B.maxConcurrentThreadsPerSession!==null&&B.maxConcurrentThreadsPerSession!==void 0&&!mi.has(B.maxConcurrentThreadsPerSession)&&!re?[{value:`custom`,label:String(B.maxConcurrentThreadsPerSession)}]:[],...pi.map(e=>({value:String(e),label:String(e)})),{value:`custom`,label:t(`models.custom`)}],onChange:e=>Ct(e),disabled:H,label:t(`models.v2ThreadsLabel`)}),re&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`input`,{className:`input`,style:{width:100},inputMode:`numeric`,value:ne,onChange:e=>K(e.target.value),onKeyDown:e=>{e.key===`Enter`&&St(Number(ne.replace(/[_,\s]/g,``)))},disabled:H,"aria-label":t(`models.v2ThreadsLabel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,disabled:H,onClick:()=>{St(Number(ne.replace(/[_,\s]/g,``)))},children:t(`models.v2ThreadsApply`)})]})]}),B.enabled&&B.agentsMaxThreadsConflict&&(0,z.jsx)(`span`,{className:`mono text-label`,style:{color:`var(--err, #e5484d)`},children:t(`models.v2Conflict`)}),ee&&(0,z.jsx)(`span`,{className:`muted text-label`,children:ee})]}),(0,z.jsxs)(`div`,{className:`row models-cap-row`,children:[(0,z.jsx)(`span`,{className:`muted text-control`,children:t(`models.contextCapLabel`)}),(0,z.jsx)(rt,{value:C?fi:di.has(y)?String(y):fi,options:[...!di.has(y)&&!C?[{value:String(y),label:_i(y)}]:[],...ui.map(e=>({value:String(e),label:_i(e)})),{value:fi,label:t(`models.custom`)}],onChange:e=>gt(e),disabled:N,label:t(`models.contextCapLabel`)}),C&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`input`,{className:`input`,style:{width:160},inputMode:`numeric`,placeholder:t(`models.customPlaceholder`),value:x,onChange:e=>S(e.target.value),onKeyDown:e=>{e.key===`Enter`&&_t()},disabled:N,"aria-label":t(`models.customPlaceholder`)}),(0,z.jsx)(`button`,{type:`button`,onClick:_t,disabled:N,className:`btn btn-ghost btn-sm`,children:t(`models.customApply`)})]}),(0,z.jsx)(nt,{on:vt,onClick:yt,disabled:N,label:t(`models.setAll`)}),(0,z.jsx)(`span`,{className:`muted text-label leading-body`,children:t(`models.setAllHint`,{value:_i(y)})})]}),(()=>{let e=i.filter(e=>e.custom).length;return e===0?null:(0,z.jsx)(`div`,{className:`row muted text-label models-custom-summary`,children:(0,z.jsx)(`span`,{className:`models-chip mono text-caption`,children:t(`models.customSummary`,{count:e})})})})(),(0,z.jsxs)(`div`,{className:`row muted text-label leading-body models-order-hint`,children:[(0,z.jsx)(ue,{width:15,height:15,"aria-hidden":`true`}),(0,z.jsx)(`span`,{children:t(`models.orderHint`)})]})]}),Rt=(0,z.jsxs)(z.Fragment,{children:[Ve===null&&!He&&(0,z.jsx)(`div`,{className:`card models-combos-card`,"aria-busy":`true`,children:(0,z.jsxs)(`div`,{className:`row models-combos-empty-head`,children:[(0,z.jsxs)(`div`,{className:`row models-field-row`,style:{minWidth:0},children:[(0,z.jsx)(Oe,{width:14,height:14,"aria-hidden":`true`,style:{flexShrink:0}}),(0,z.jsx)(`strong`,{children:t(`nav.combos`)}),(0,z.jsx)(`span`,{className:`muted text-label`,children:t(`common.loading`)})]}),(0,z.jsx)(`a`,{className:`btn btn-sm`,href:`#combos`,style:{flexShrink:0,visibility:`hidden`},tabIndex:-1,"aria-hidden":`true`,children:t(`models.combosSetup`)})]})}),Ve===null&&He&&(0,z.jsx)(`div`,{className:`card models-combos-card`,children:(0,z.jsxs)(`div`,{className:`row models-combos-empty-head`,children:[(0,z.jsxs)(`div`,{className:`row models-field-row`,style:{minWidth:0},children:[(0,z.jsx)(Oe,{width:14,height:14,"aria-hidden":`true`,style:{flexShrink:0}}),(0,z.jsx)(`strong`,{children:t(`nav.combos`)}),(0,z.jsx)(`span`,{className:`muted text-label`,role:`alert`,children:t(`models.loadFail`)})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,style:{flexShrink:0},onClick:()=>ze.refresh(),children:t(`common.retry`)})]})}),Ve!==null&&Ve.length===0&&(0,z.jsx)(`div`,{className:`card models-combos-card`,children:(0,z.jsxs)(`div`,{className:`row models-combos-empty-head`,children:[(0,z.jsxs)(`div`,{className:`row models-field-row`,style:{minWidth:0},children:[(0,z.jsx)(Oe,{width:14,height:14,"aria-hidden":`true`,style:{flexShrink:0}}),(0,z.jsx)(`strong`,{children:t(`nav.combos`)}),He?(0,z.jsx)(`span`,{className:`muted text-label`,role:`alert`,children:t(`models.loadFail`)}):(0,z.jsx)(`span`,{className:`muted text-label`,children:t(`models.combosEmpty`)})]}),He?(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,style:{flexShrink:0},onClick:()=>ze.refresh(),children:t(`common.retry`)}):(0,z.jsx)(`a`,{className:`btn btn-sm`,href:`#combos`,style:{flexShrink:0},children:t(`models.combosSetup`)})]})}),Ve!==null&&Ve.length>0&&(0,z.jsxs)(`div`,{className:`card models-combos-card`,children:[(0,z.jsxs)(`div`,{className:`row group-head models-field-row${Ue?` open`:``}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`row models-field-row`,"aria-expanded":Ue,onClick:qe,style:{flex:1,background:`none`,border:`none`,padding:0,cursor:`pointer`,font:`inherit`,color:`inherit`,textAlign:`left`,minWidth:0},children:[(0,z.jsx)(he,{style:{width:14,height:14,color:`var(--muted)`,flexShrink:0,transform:Ue?`rotate(90deg)`:`none`,transition:`transform .12s`}}),(0,z.jsx)(Oe,{width:14,height:14,"aria-hidden":`true`,style:{flexShrink:0}}),(0,z.jsx)(`strong`,{children:t(`nav.combos`)}),(0,z.jsx)(`span`,{className:`muted mono text-label`,children:t(`models.combosActive`,{count:Ve.length})}),He&&(0,z.jsx)(`span`,{className:`muted text-label`,role:`alert`,children:t(`models.loadFail`)})]}),He?(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,style:{flexShrink:0},onClick:()=>ze.refresh(),children:t(`common.retry`)}):(0,z.jsx)(`a`,{className:`btn btn-sm btn-ghost`,href:`#combos`,style:{flexShrink:0},children:t(`models.combosSetup`)})]}),Ue&&(0,z.jsxs)(`div`,{children:[Ve.map(e=>(0,z.jsxs)(`div`,{className:`row models-combo-row`,children:[(0,z.jsx)(`span`,{className:`mono leading-ui`,children:e.model}),(0,z.jsxs)(`span`,{className:`muted text-label`,children:[e.strategy,` · `,e.targets.length]})]},e.id)),(0,z.jsxs)(`a`,{className:`row muted models-combos-add`,href:`#combos`,children:[`+ `,t(`models.combosAdd`)]})]})]})]}),zt=(0,z.jsxs)(`div`,{className:`row models-collapse-controls`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,onClick:()=>pt(!0),disabled:N,children:[(0,z.jsx)(he,{width:12,height:12,"aria-hidden":`true`}),` `,t(`models.collapseAll`)]}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,onClick:()=>pt(!1),disabled:N,children:[(0,z.jsx)(he,{width:12,height:12,"aria-hidden":`true`,style:{transform:`rotate(90deg)`}}),` `,t(`models.expandAll`)]})]}),Bt=(0,z.jsx)(z.Fragment,{children:ot.length===0&&(0,z.jsx)(it,{icon:(0,z.jsx)(U,{}),title:t(`models.noRouted`),children:t(`models.noRoutedHint`)})}),Vt=(0,z.jsxs)(z.Fragment,{children:[ae&&(0,z.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":t(`models.v2Label`),onClick:()=>oe(!1),onKeyDown:e=>{e.key===`Escape`&&oe(!1)},children:(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{children:t(`models.v2Label`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>oe(!1),"aria-label":t(`common.close`),children:`×`})]}),(0,z.jsx)(`div`,{className:`modal-desc leading-relaxed`,style:{whiteSpace:`pre-line`},children:t(`models.v2Help`)}),(0,z.jsx)(`div`,{className:`models-help-link`,children:(0,z.jsx)(`a`,{className:`text-control`,href:`https://opencodex.me/guides/sub-agent-surface/`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:t(`models.v2DocsLink`)})}),(0,z.jsx)(`div`,{className:`modal-actions`,children:(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>oe(!1),children:t(`common.ok`)})})]})}),q&&(0,z.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":t(`models.customAdd`),onClick:()=>{Te||se(!1)},onKeyDown:e=>{e.key===`Escape`&&!Te&&se(!1)},children:(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{children:t(ce===`add`?`models.customAddTitle`:`models.customEditTitle`,{provider:J})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>se(!1),disabled:Te,"aria-label":t(`common.close`),children:`×`})]}),De&&(0,z.jsx)(X,{tone:`err`,children:De}),(0,z.jsxs)(`div`,{className:`models-field-stack`,children:[(0,z.jsxs)(`label`,{className:`text-label models-field`,children:[t(`models.customFieldModelId`),(0,z.jsx)(`input`,{className:`input`,value:me,onChange:e=>ge(e.target.value),disabled:Te,placeholder:t(`models.customFieldModelIdPlaceholder`),autoFocus:!0})]}),(0,z.jsxs)(`label`,{className:`text-label models-field`,children:[t(`models.customFieldDisplayName`),(0,z.jsx)(`input`,{className:`input`,value:_e,onChange:e=>ve(e.target.value),disabled:Te,placeholder:t(`models.customFieldDisplayNamePlaceholder`)})]}),(0,z.jsxs)(`label`,{className:`text-label models-field`,children:[t(`models.customFieldContext`),(0,z.jsxs)(`div`,{className:`row models-field-row`,children:[(0,z.jsx)(rt,{value:xe?`custom`:ye,options:[{value:``,label:`—`},{value:`100000`,label:`100k`},{value:`128000`,label:`128k`},{value:`200000`,label:`200k`},{value:`256000`,label:`256k`},{value:`352000`,label:`352k`},{value:`500000`,label:`500k`},{value:`1000000`,label:`1M`},{value:`custom`,label:t(`models.custom`)}],onChange:e=>{if(e===`custom`){Se(!0);return}Se(!1),be(e)},disabled:Te,label:t(`models.customFieldContext`)}),xe&&(0,z.jsx)(`input`,{className:`input`,style:{width:120},inputMode:`numeric`,value:ye,onChange:e=>be(e.target.value),disabled:Te,placeholder:t(`models.customPlaceholder`),"aria-label":t(`models.customFieldContext`)})]})]}),(0,z.jsxs)(`div`,{className:`text-label models-field`,children:[t(`models.customFieldModalities`),(0,z.jsx)(`div`,{className:`row models-field-row`,children:[`text`,`image`,`audio`].map(e=>(0,z.jsxs)(`label`,{className:`row models-modality-option`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:Ce.includes(e),onChange:t=>{we(n=>t.target.checked?[...n,e]:n.filter(t=>t!==e))},disabled:Te}),(0,z.jsx)(`span`,{className:`text-control`,children:e})]},e))})]})]}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>se(!1),disabled:Te,children:t(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:Te||!me.trim(),onClick:()=>{let e=me.trim(),t=_e.trim(),n=ye?Number(ye.replace(/[_,\s]/g,``)):void 0,r=n&&n>0?Math.floor(n):void 0;ce===`add`?At(J,e,t||void 0,r,Ce.length>0?Ce:void 0):jt(fe,{modelId:e,displayName:t,contextWindow:r??null,inputModalities:Ce})},children:t(Te?`models.customSaving`:ce===`add`?`models.customAddBtn`:`models.customEditBtn`)})]})]})})]});return(0,z.jsxs)(`div`,{className:`models-workspace-shell`,children:[(0,z.jsxs)(`div`,{className:`page-head`,children:[(0,z.jsx)(`h2`,{children:t(`nav.models`)}),(0,z.jsx)(`div`,{className:`row`,children:(0,z.jsx)(`span`,{className:`muted mono text-label`,children:t(`models.active`,{active:st,total:i.length})})})]}),(0,z.jsx)(`p`,{className:`page-sub`,children:t(`models.subtitle`)}),k&&(0,z.jsx)(X,{tone:j?`ok`:`err`,children:k}),et.showError&&(0,z.jsx)(X,{tone:`err`,children:t(`models.loadFail`)}),(0,z.jsxs)(`div`,{className:`models-workspace-root`,"aria-busy":et.refreshing||void 0,children:[(0,z.jsxs)(`aside`,{className:`models-workspace-rail`,"aria-label":t(`nav.models`),children:[(0,z.jsxs)(`div`,{className:`models-workspace-rail-header`,children:[(0,z.jsx)(`span`,{className:`models-workspace-rail-title`,children:t(`models.workspace.providers`)}),(0,z.jsx)(`span`,{className:`models-workspace-rail-count`,children:ot.length})]}),(0,z.jsxs)(`div`,{className:`models-workspace-rail-list`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`models-workspace-rail-row${Ge===null?` models-workspace-rail-row--selected`:``}`,onClick:()=>Ke(null),"aria-current":Ge===null?`true`:void 0,children:[(0,z.jsx)(`span`,{className:`models-workspace-rail-name`,children:t(`models.workspace.allProviders`)}),(0,z.jsx)(`span`,{className:`models-workspace-rail-meta`,children:t(`models.active`,{active:st,total:i.length})})]}),ot.map(e=>{let{provider:n,rows:r}=e,i=r.filter(e=>oi(Pt,n,e.id,e.native===!0,c.has(e.namespaced))).length;return(0,z.jsxs)(`button`,{type:`button`,className:`models-workspace-rail-row${Ge===n?` models-workspace-rail-row--selected`:``}`,onClick:()=>Ke(n),"aria-current":Ge===n?`true`:void 0,children:[(0,z.jsx)(`span`,{className:`models-workspace-rail-name`,children:n}),(0,z.jsx)(`span`,{className:`models-workspace-rail-meta`,children:t(`models.active`,{active:i,total:r.length})})]},n)})]})]}),(0,z.jsxs)(`section`,{className:`models-workspace-main`,"aria-label":t(`models.workspace.mainAria`),children:[Lt,Rt,zt,(0,z.jsx)(`div`,{className:`models-provider-list`,children:It.map(e=>Ft(e))}),ot.length===0&&Bt]})]}),Vt]})}function Ws(e){return e.filter(e=>!e.disabled&&!e.hiddenFromPicker).sort((e,t)=>e.name.localeCompare(t.name))}function Gs(e,t,n){if(e===``)return;let r=Number(e);if(Number.isFinite(r))return Math.min(n,Math.max(t,r))}function Ks(e){if(!e)return!1;let t=e.name.toLowerCase();if(t!==`openai`&&t!==`chatgpt`||(e.authMode??``).toLowerCase()!==`forward`||(e.adapter??``).toLowerCase()!==`openai-responses`)return!1;let n=(e.baseUrl??``).replace(/\/+$/,``);return!n||n.includes(`chatgpt.com/backend-api/codex`)}function qs(e,t,n){let r=new Set([t]),i=n.find(e=>e.name===t);(t.toLowerCase()===`chatgpt`||Ks(i))&&r.add(`openai`);let a=[],o=new Set;for(let t of e)!r.has(t.provider)||!t.id||o.has(t.id)||(o.add(t.id),a.push(t.id));return a.toSorted((e,t)=>e.localeCompare(t))}function Js({value:e,onChange:t,disabled:n}){let r=Y();return(0,z.jsx)(`div`,{className:`cwi-strategy-seg`,role:`radiogroup`,"aria-label":r(`cws.strategy`),children:[[`failover`,`cws.strategy.failover`],[`round-robin`,`cws.strategy.roundRobin`]].map(([i,a])=>(0,z.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===i,className:`btn btn-sm${e===i?` btn-primary`:` btn-ghost`}`,disabled:n,onClick:()=>t(i),children:r(a)},i))})}function Ys({id:e,value:t,onChange:n,disabled:r,allowedEfforts:i}){let a=Y(),o=i??fs,s=t!==null&&!o.includes(t);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`select`,{id:e,className:`input`,value:t??``,disabled:r,"aria-label":a(`cws.field.defaultEffort`),onChange:e=>n(e.target.value===``?null:e.target.value),children:[(0,z.jsx)(`option`,{value:``,children:a(`cws.field.defaultEffortNone`)}),s&&t?(0,z.jsxs)(`option`,{value:t,children:[t,` (`,a(`cws.field.defaultEffortUnsupportedOption`),`)`]}):null,o.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))]}),s?(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`,color:`var(--danger, #b42318)`},children:a(`cws.field.defaultEffortUnsupported`)}):null]})}function Xs({targets:e,strategy:t,providers:n,models:r,onChange:i}){let a=Y(),o=Ws(n),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null),d=(t,n)=>{i(e.map((e,r)=>r===t?{...e,...n}:e))},f=(t,n)=>{if(t===n||t<0||n<0||t>=e.length||n>=e.length)return;let r=[...e],[a]=r.splice(t,1);r.splice(n,0,a),i(r)};return(0,z.jsxs)(`div`,{className:`cwi-target-list`,children:[e.map((p,m)=>{let h=n.find(e=>e.name===p.provider),g=h&&!o.some(e=>e.name===p.provider)?[...o,h]:o,_=qs(r,p.provider,n),v=p.model&&!_.includes(p.model)?[p.model,..._]:_,y=!p.provider;return(0,z.jsxs)(`div`,{className:[`cwi-target-row`,t===`failover`?`cwi-target-row--failover`:``,s===m?`cwi-target-row--dragging`:``,l===m&&s!==null&&s!==m?`cwi-target-row--drop`:``].filter(Boolean).join(` `),onDragOver:e=>{s!==null&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`,l!==m&&u(m))},onDrop:e=>{e.preventDefault(),s!==null&&f(s,m),c(null),u(null)},onDragEnd:()=>{c(null),u(null)},children:[(0,z.jsx)(`button`,{type:`button`,className:`cwi-target-grip`,draggable:!0,"aria-label":a(`cws.target.drag`),title:a(`cws.target.drag`),onDragStart:e=>{c(m),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(m))},children:(0,z.jsx)(ke,{width:14,height:14,"aria-hidden":`true`})}),(0,z.jsxs)(`div`,{className:`cwi-target-reorder`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:m===0,"aria-label":a(`cws.target.moveUp`),onClick:()=>f(m,m-1),children:(0,z.jsx)(fe,{width:14,height:14,"aria-hidden":`true`})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:m===e.length-1,"aria-label":a(`cws.target.moveDown`),onClick:()=>f(m,m+1),children:(0,z.jsx)(pe,{width:14,height:14,"aria-hidden":`true`})})]}),(0,z.jsxs)(`select`,{className:`input`,value:p.provider,"aria-label":a(`cws.target.provider`),onChange:e=>{let t=e.target.value;d(m,{provider:t,model:qs(r,t,n)[0]??``})},children:[(0,z.jsx)(`option`,{value:``,children:a(`cws.target.pickProvider`)}),g.map(e=>(0,z.jsx)(`option`,{value:e.name,children:e.disabled?a(`cws.target.disabled`,{name:e.name}):e.name},e.name))]}),(0,z.jsxs)(`select`,{className:`input`,value:p.model,disabled:y,"aria-label":a(`cws.target.model`),onChange:e=>d(m,{model:e.target.value}),children:[(0,z.jsx)(`option`,{value:``,children:y?a(`cws.target.pickProviderFirst`):v.length===0?a(`cws.target.noModels`):a(`cws.target.pickModel`)}),v.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))]}),t===`round-robin`&&(0,z.jsx)(`input`,{className:`input mono`,type:`number`,min:1,max:1e4,value:p.weight??1,"aria-label":a(`cws.target.weight`),onChange:e=>{let t=Gs(e.target.value,1,1e4);t!==void 0&&d(m,{weight:t})}}),(0,z.jsx)(`div`,{className:`cwi-target-actions`,children:(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:e.length<=1,onClick:()=>i(e.filter((e,t)=>t!==m)),"aria-label":a(`common.remove`),children:(0,z.jsx)(le,{width:14,height:14})})})]},p.clientKey??`${p.provider}:${p.model}`)}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{alignSelf:`flex-start`},onClick:()=>i([...e,hs()]),children:[(0,z.jsx)(oe,{width:14,height:14}),` `,a(`cws.target.add`)]})]})}function Zs({existingIds:e,existingAliases:t,providerMap:n,providers:r,models:i,onClose:a,onSubmit:o}){let s=Y(),c=(0,_.useRef)(null),[l,u]=(0,_.useState)(()=>Ps()),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(``),h=(0,_.useMemo)(()=>{let e=new Map;for(let t of i)e.set(`${t.provider}/${t.id}`,t.reasoningEfforts);return e},[i]),g=(0,_.useMemo)(()=>ps(l.targets,h),[l.targets,h]);(0,_.useEffect)(()=>{let e=c.current;e&&!e.open&&e.showModal()},[]);let v=(0,_.useCallback)(()=>{d||a()},[d,a]),y=(0,_.useCallback)(e=>{e.preventDefault(),v()},[v]),b=async()=>{let r=Ns(l,{existingIds:e,existingAliases:t,isCreate:!0,providers:n});if(r){m(s(`cws.err.${r}`));return}f(!0),m(``);let i=l.id.trim(),a=l.alias?.trim()||null;try{let e=await o({...l,id:i,alias:a,model:xs(i,a)});if(!e.ok){m(e.error||s(`cws.saveFailed`));return}}finally{f(!1)}};return(0,z.jsxs)(`dialog`,{ref:c,className:`modal-overlay`,"aria-labelledby":`cwi-add-title`,onCancel:y,children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":s(`common.close`),tabIndex:-1,onClick:v}),(0,z.jsxs)(`div`,{className:`modal-card`,style:{width:`min(560px, 94vw)`},onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`row`,style:{justifyContent:`space-between`,marginBottom:8},children:[(0,z.jsx)(`h3`,{id:`cwi-add-title`,style:{margin:0},children:s(`cws.addTitle`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:v,disabled:d,"aria-label":s(`common.close`),children:(0,z.jsx)(ae,{width:16,height:16})})]}),(0,z.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:s(`cws.addSubtitle`)}),p&&(0,z.jsx)(X,{tone:`err`,children:p}),(0,z.jsxs)(`div`,{className:`cwi-modal-form`,children:[(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`label`,{htmlFor:`cwi-new-id`,children:s(`cws.field.id`)}),(0,z.jsx)(`input`,{id:`cwi-new-id`,className:`input mono`,value:l.id,disabled:d,onChange:e=>u(t=>({...t,id:e.target.value,model:xs(e.target.value,t.alias)}))}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:s(`cws.field.idInternalHint`)})]}),(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`label`,{htmlFor:`cwi-new-alias`,children:s(`cws.field.alias`)}),(0,z.jsx)(`input`,{id:`cwi-new-alias`,className:`input mono`,value:l.alias??``,placeholder:s(`cws.field.aliasPlaceholder`),disabled:d,onChange:e=>u(t=>({...t,alias:e.target.value.trim()?e.target.value:null,model:xs(t.id,e.target.value)}))}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:s(`cws.field.aliasHint`)}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:s(`cws.field.idHint`,{model:l.id.trim()?xs(l.id,l.alias):`…`})})]}),(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`span`,{className:`field-label`,children:s(`cws.strategy`)}),(0,z.jsx)(Js,{value:l.strategy,disabled:d,onChange:e=>u(t=>({...t,strategy:e}))}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`6px 0 0`},children:l.strategy===`failover`?s(`cws.strategy.failoverHint`):s(`cws.strategy.roundRobinHint`)})]}),(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`label`,{htmlFor:`cwi-new-effort`,children:s(`cws.field.defaultEffort`)}),(0,z.jsx)(Ys,{id:`cwi-new-effort`,value:l.defaultEffort,disabled:d,allowedEfforts:g,onChange:e=>u(t=>({...t,defaultEffort:e}))}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:s(`cws.field.defaultEffortHint`)})]}),l.strategy===`round-robin`&&(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`label`,{htmlFor:`cwi-new-sticky`,children:s(`cws.field.stickyLimit`)}),(0,z.jsx)(`input`,{id:`cwi-new-sticky`,className:`input mono`,type:`number`,min:1,max:100,value:l.stickyLimit,disabled:d,onChange:e=>{let t=Gs(e.target.value,1,100);t!==void 0&&u(e=>({...e,stickyLimit:t}))}}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:s(`cws.field.stickyLimitHint`)})]}),(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`span`,{className:`field-label`,children:s(`cws.targets`)}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`0 0 8px`},children:l.strategy===`failover`?s(`cws.targets.failoverHint`):s(`cws.targets.roundRobinHint`)}),(0,z.jsx)(Xs,{targets:l.targets,strategy:l.strategy,providers:r,models:i,onChange:e=>u(t=>({...t,targets:e}))})]})]}),(0,z.jsxs)(`div`,{className:`cwi-modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:v,disabled:d,children:s(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>{b()},disabled:d,children:s(d?`common.saving`:`cws.create`)})]})]})]})}function Qs({baseline:e,isCreate:t=!1,otherIds:n,otherAliases:r,providerMap:i,providers:a,models:o,onBack:s,onSaved:c,onRequestRemove:l,onSave:u,onDirtyChange:d}){let f=Y(),[p,m]=(0,_.useState)(`config`),[h,g]=(0,_.useState)(e),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(!1),w=!js(h,e),T=`${e.id}:${e.alias??``}:${e.strategy}:${e.stickyLimit}:${e.defaultEffort}:${e.targets.map(e=>`${e.provider}/${e.model}:${e.weight??1}`).join(`,`)}`,E=(0,_.useMemo)(()=>{let e=new Map;for(let t of o)e.set(`${t.provider}/${t.id}`,t.reasoningEfforts);return e},[o]),D=(0,_.useMemo)(()=>ps(h.targets,E),[h.targets,E]),O=(0,_.useCallback)(t=>{let n=t(h);g(n),d(!js(n,e))},[h,e,d]);(0,_.useEffect)(()=>{let t=window.setTimeout(()=>{g(e),x(null),m(`config`),d(!1)},0);return()=>window.clearTimeout(t)},[T]);let k=async()=>{try{await navigator.clipboard.writeText(e.model),C(!0),window.setTimeout(()=>C(!1),1200)}catch{}},A=async()=>{let a=Ns(h,{existingIds:n,existingAliases:r,isCreate:t,providers:i});if(a){x({ok:!1,text:f(`cws.err.${a}`)});return}y(!0);let o=h.id.trim(),s=h.alias?.trim()||null,l={...h,id:o,alias:s,model:xs(o,s)},d=!t&&o!==e.id?e.id:void 0;try{let e=await u(l,t,d);if(!e.ok){x({ok:!1,text:e.error||f(`cws.saveFailed`)});return}x({ok:!0,text:t?f(`cws.created`,{model:l.model}):f(`cws.saved`)}),c(l)}finally{y(!1)}},j=t?h.id.trim()?xs(h.id,h.alias):f(`cws.addTitle`):e.model;return(0,z.jsxs)(`div`,{className:`combos-workspace-detail`,children:[(0,z.jsxs)(`div`,{className:`combos-workspace-detail-head`,children:[s&&(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm pwi-back-overview`,onClick:s,"aria-label":f(`cws.backToAll`),children:[(0,z.jsx)(he,{style:{width:14,height:14,transform:`rotate(180deg)`},"aria-hidden":`true`}),f(`cws.allCombos`)]}),(0,z.jsx)(`h2`,{className:`combos-workspace-detail-title`,children:j}),!t&&(0,z.jsx)(`button`,{type:`button`,className:`chip cwi-copy-chip`,onClick:()=>{k()},title:f(`cws.copyModel`),children:f(S?`cws.copied`:`cws.copyModel`)}),(0,z.jsxs)(`div`,{className:`combos-workspace-detail-actions`,children:[!t&&l&&(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:l,children:[(0,z.jsx)(le,{width:14,height:14}),` `,f(`common.remove`)]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:!t&&!w||v,onClick:()=>{A()},children:f(v?`common.saving`:t?`cws.create`:`common.save`)})]})]}),b&&(0,z.jsx)(X,{tone:b.ok?`ok`:`err`,children:b.text}),(0,z.jsxs)(`div`,{className:`combos-workspace-tabs`,role:`tablist`,children:[(0,z.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":p===`config`,className:`combos-workspace-tab${p===`config`?` combos-workspace-tab--active`:``}`,onClick:()=>m(`config`),children:f(`cws.tab.config`)}),(0,z.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":p===`about`,className:`combos-workspace-tab${p===`about`?` combos-workspace-tab--active`:``}`,onClick:()=>m(`about`),children:f(`cws.tab.about`)})]}),(0,z.jsx)(`div`,{className:`combos-workspace-tab-content`,role:`tabpanel`,children:p===`config`?(0,z.jsxs)(`div`,{className:`cwi-form-grid`,children:[(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`label`,{htmlFor:`cwi-edit-id`,children:f(`cws.field.id`)}),(0,z.jsx)(`input`,{id:`cwi-edit-id`,className:`input mono`,value:h.id,disabled:v,onChange:e=>O(t=>({...t,id:e.target.value,model:xs(e.target.value,t.alias)}))}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:t?f(`cws.field.idInternalHint`):f(`cws.field.idHintEdit`,{model:xs(h.id,h.alias)})})]}),(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`label`,{htmlFor:`cwi-edit-alias`,children:f(`cws.field.alias`)}),(0,z.jsx)(`input`,{id:`cwi-edit-alias`,className:`input mono`,value:h.alias??``,placeholder:bs(h.id.trim()||`…`),disabled:v,onChange:e=>O(t=>({...t,alias:e.target.value.trim()?e.target.value:null,model:xs(t.id,e.target.value)}))}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:f(`cws.field.aliasHint`)})]}),(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`span`,{className:`field-label`,children:f(`cws.strategy`)}),(0,z.jsx)(Js,{value:h.strategy,disabled:v,onChange:e=>O(t=>({...t,strategy:e}))}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`6px 0 0`},children:h.strategy===`failover`?f(`cws.strategy.failoverHint`):f(`cws.strategy.roundRobinHint`)})]}),(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`label`,{htmlFor:`cwi-effort`,children:f(`cws.field.defaultEffort`)}),(0,z.jsx)(Ys,{id:`cwi-effort`,value:h.defaultEffort,disabled:v,allowedEfforts:D,onChange:e=>O(t=>({...t,defaultEffort:e}))}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:f(`cws.field.defaultEffortHint`)})]}),h.strategy===`round-robin`&&(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`label`,{htmlFor:`cwi-sticky`,children:f(`cws.field.stickyLimit`)}),(0,z.jsx)(`input`,{id:`cwi-sticky`,className:`input mono`,type:`number`,min:1,max:100,value:h.stickyLimit,disabled:v,onChange:e=>{let t=Gs(e.target.value,1,100);t!==void 0&&O(e=>({...e,stickyLimit:t}))}})]}),(0,z.jsxs)(`div`,{className:`cwi-field`,children:[(0,z.jsx)(`span`,{className:`field-label`,children:f(`cws.targets`)}),(0,z.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`0 0 8px`},children:h.strategy===`failover`?f(`cws.targets.failoverHint`):f(`cws.targets.roundRobinHint`)}),(0,z.jsx)(Xs,{targets:h.targets,strategy:h.strategy,providers:a,models:o,onChange:e=>O(t=>({...t,targets:e}))})]})]}):(0,z.jsxs)(`section`,{className:`pwi-section`,children:[(0,z.jsx)(`h3`,{className:`pwi-section-title`,children:f(`cws.aboutTitle`)}),(0,z.jsx)(`p`,{className:`muted`,style:{margin:0},children:f(`cws.aboutBody`)})]})})]})}function $s({model:e,onCancel:t,onConfirm:n}){let r=Y(),i=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=i.current;e&&!e.open&&e.showModal()},[]),(0,z.jsxs)(`dialog`,{ref:i,className:`modal-overlay`,"aria-labelledby":`cwi-remove-title`,onCancel:(0,_.useCallback)(e=>{e.preventDefault(),t()},[t]),children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":r(`common.close`),tabIndex:-1,onClick:t}),(0,z.jsxs)(`div`,{className:`modal-card pwi-remove-confirm-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsx)(`h3`,{id:`cwi-remove-title`,className:`pwi-remove-confirm-title`,children:r(`cws.removeConfirmTitle`,{model:e})}),(0,z.jsx)(`p`,{className:`muted pwi-remove-confirm-desc`,children:r(`cws.removeConfirmDesc`)}),(0,z.jsxs)(`div`,{className:`pwi-remove-confirm-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:t,children:r(`common.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn pwi-remove-confirm-danger`,onClick:n,children:r(`common.remove`)})]})]})]})}function ec({onKeep:e,onDiscard:t}){let n=Y(),r=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=r.current;e&&!e.open&&e.showModal()},[]),(0,z.jsxs)(`dialog`,{ref:r,className:`modal-overlay`,"aria-labelledby":`cwi-unsaved-title`,onCancel:(0,_.useCallback)(t=>{t.preventDefault(),e()},[e]),children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":n(`common.close`),tabIndex:-1,onClick:e}),(0,z.jsxs)(`div`,{className:`modal-card pwi-json-unsaved-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsx)(`h3`,{id:`cwi-unsaved-title`,className:`pwi-json-unsaved-title`,children:n(`cws.unsavedTitle`)}),(0,z.jsx)(`p`,{className:`muted pwi-json-unsaved-desc`,children:n(`cws.unsavedDesc`)}),(0,z.jsxs)(`div`,{className:`pwi-json-unsaved-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,"data-testid":`cwi-unsaved-keep`,onClick:e,children:n(`cws.keepEditing`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-danger`,"data-testid":`cwi-unsaved-discard`,onClick:t,children:n(`common.discard`)})]})]})]})}function tc(e,t){return t(e===`empty-targets`?`cws.attention.empty`:e===`catalog-omitted`?`cws.attention.catalogOmitted`:`cws.attention.few`)}function nc({combos:e,cataloguedComboIds:t,onSelect:n,onAdd:r}){let i=Y(),a=Os(e),o=As(e,{cataloguedComboIds:t});return(0,z.jsxs)(`div`,{className:`combos-workspace-overview`,children:[(0,z.jsxs)(`div`,{className:`combos-workspace-overview-head`,children:[(0,z.jsx)(`h2`,{className:`combos-workspace-overview-title`,children:i(`cws.overviewTitle`)}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:r,children:[(0,z.jsx)(oe,{width:14,height:14}),` `,i(`cws.add`)]})]}),(0,z.jsx)(`p`,{className:`muted`,style:{marginTop:0,maxWidth:`62ch`},children:i(`cws.overviewBlurb`)}),(0,z.jsxs)(`div`,{className:`cwi-count-strip`,children:[(0,z.jsxs)(`div`,{className:`cwi-count-pill`,children:[(0,z.jsx)(`strong`,{children:e.length}),(0,z.jsx)(`span`,{children:i(`cws.count.total`)})]}),(0,z.jsxs)(`div`,{className:`cwi-count-pill`,children:[(0,z.jsx)(`strong`,{children:a.failover.length}),(0,z.jsx)(`span`,{children:i(`cws.count.failover`)})]}),(0,z.jsxs)(`div`,{className:`cwi-count-pill`,children:[(0,z.jsx)(`strong`,{children:a.roundRobin.length}),(0,z.jsx)(`span`,{children:i(`cws.count.roundRobin`)})]})]}),(0,z.jsxs)(`section`,{className:`pwi-section`,"aria-label":i(`cws.howTitle`),children:[(0,z.jsx)(`h3`,{className:`pwi-section-title`,children:i(`cws.howTitle`)}),(0,z.jsx)(`p`,{className:`muted`,style:{margin:0},children:i(`cws.howBody`)})]}),o.length>0&&(0,z.jsxs)(`section`,{className:`pwi-section`,"aria-label":i(`cws.attentionTitle`),children:[(0,z.jsx)(`h3`,{className:`pwi-section-title`,children:i(`cws.attentionTitle`)}),(0,z.jsx)(`div`,{className:`cwi-attention-list`,children:o.map(e=>(0,z.jsxs)(`button`,{type:`button`,className:`cwi-attention-row`,onClick:()=>n(e.id),children:[(0,z.jsx)(J,{width:14,height:14,"aria-hidden":`true`}),(0,z.jsx)(`code`,{className:`chip`,children:e.model}),(0,z.jsx)(`span`,{className:`muted`,children:tc(e.reason,i)}),(0,z.jsx)(he,{width:14,height:14,style:{marginLeft:`auto`},"aria-hidden":`true`})]},`${e.id}:${e.reason}`))})]})]})}function rc({combos:e,providers:t,models:n,cataloguedComboIds:r,loading:i,onRefresh:a,onSave:o,onRemove:s,onAdd:c,adding:l,onCloseAdd:u,onCreated:d}){let f=Y(),p=(0,_.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,{disabled:e.disabled}])),[t]),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(void 0),[x,S]=(0,_.useState)(null),[C,w]=(0,_.useState)(null),T=(0,_.useMemo)(()=>Ps(),[]),E=(0,_.useMemo)(()=>ks(e,m),[e,m]),D=(0,_.useMemo)(()=>Os(E),[E]),O=(0,_.useMemo)(()=>e.flatMap(e=>e.alias?[e.alias]:[]),[e]),k=g&&e.some(e=>e.id===g)?g:null,A=e.find(e=>e.id===k)??null,j=A&&C?.id===A.id?C:A,[M,N]=(0,_.useState)(!1),P=[],F=[];if(j)for(let t of e)t.id!==j.id&&(P.push(t.id),t.alias&&F.push(t.alias));let I=(0,_.useCallback)(e=>{if(e!==k){if(!M){v(e),w(null);return}b(e)}},[k,M]),L=()=>{y!==void 0&&(v(y),w(null),N(!1),b(void 0))},R=()=>b(void 0),B=y!==void 0&&M,V=!i&&e.length===0;return(0,z.jsxs)(`div`,{className:`combos-workspace-root`,children:[(0,z.jsxs)(`aside`,{className:`combos-workspace-rail`,"aria-label":f(`cws.railAria`),children:[(0,z.jsxs)(`div`,{className:`combos-workspace-rail-header`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`combos-workspace-rail-title`,children:f(`nav.combos`)}),(0,z.jsx)(`div`,{className:`combos-workspace-rail-count`,children:e.length})]}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>{if(V){document.getElementById(`cwi-edit-id`)?.focus();return}c()},"aria-label":f(`cws.add`),children:[(0,z.jsx)(oe,{width:14,height:14}),` `,f(`cws.add`)]})]}),(0,z.jsx)(`div`,{className:`cwi-search-row`,children:(0,z.jsxs)(`div`,{className:`cwi-search-wrap`,children:[(0,z.jsx)(de,{className:`cwi-search-icon`,"aria-hidden":`true`}),(0,z.jsx)(`input`,{className:`input cwi-search-input`,value:m,onChange:e=>h(e.target.value),placeholder:f(`cws.searchPlaceholder`),"aria-label":f(`cws.searchPlaceholder`)})]})}),(0,z.jsx)(`div`,{className:`combos-workspace-rail-list`,children:E.length===0&&e.length>0?(0,z.jsx)(`p`,{className:`muted`,style:{padding:`16px`},children:f(`cws.noSearchResults`)}):(0,z.jsx)(z.Fragment,{children:[[`failover`,D.failover,`cws.group.failover`],[`round-robin`,D.roundRobin,`cws.group.roundRobin`]].map(([e,t,n])=>t.length>0?(0,z.jsxs)(`div`,{className:`combos-workspace-rail-group`,children:[(0,z.jsxs)(`div`,{className:`combos-workspace-rail-group-head`,children:[(0,z.jsx)(`span`,{className:`pwi-dot`,"aria-hidden":`true`}),f(n),(0,z.jsx)(`span`,{className:`combos-workspace-rail-count`,children:t.length})]}),t.map(e=>(0,z.jsxs)(`button`,{type:`button`,className:`combos-workspace-rail-row${k===e.id?` combos-workspace-rail-row--selected`:``}`,onClick:()=>I(e.id),"aria-current":k===e.id?`true`:void 0,children:[(0,z.jsx)(`span`,{className:`combos-workspace-rail-icon`,"aria-hidden":`true`,children:(0,z.jsx)(Oe,{width:16,height:16})}),(0,z.jsx)(`span`,{className:`combos-workspace-rail-name`,children:e.model}),(0,z.jsx)(`span`,{className:`combos-workspace-rail-meta`,children:e.targets.length===1?f(`cws.targetCountOne`):f(`cws.targetCount`,{count:e.targets.length})}),(0,z.jsx)(he,{className:`combos-workspace-rail-chevron`,"aria-hidden":`true`})]},e.id))]},e):null)})})]}),(0,z.jsx)(`div`,{className:`combos-workspace-main`,children:j?(0,z.jsx)(Qs,{baseline:j,otherIds:P,otherAliases:F,providerMap:p,providers:t,models:n,onBack:()=>I(null),onSaved:e=>{N(!1),e.id===j.id?w(e):(v(e.id),w(null)),a()},onRequestRemove:()=>S(j.id),onSave:o,onDirtyChange:N},j.id):V?(0,z.jsx)(Qs,{baseline:T,isCreate:!0,otherIds:[],otherAliases:[],providerMap:p,providers:t,models:n,onSaved:e=>{N(!1),v(e.id),w(e),d(e.id)},onSave:o,onDirtyChange:N},`first-combo`):(0,z.jsx)(nc,{combos:e,cataloguedComboIds:r,onSelect:e=>I(e),onAdd:c})}),l&&!V&&(0,z.jsx)(Zs,{existingIds:e.map(e=>e.id),existingAliases:O,providerMap:p,providers:t,models:n,onClose:u,onSubmit:async e=>{let t=await o(e,!0);return t.ok&&(u(),d(e.id),v(e.id),w(null)),t}}),x&&(0,z.jsx)($s,{model:e.find(e=>e.id===x)?.model??bs(x),onCancel:()=>S(null),onConfirm:()=>{(async()=>{let e=await s(x);S(null),e.ok&&(k===x&&(v(null),w(null)),a())})()}}),B&&(0,z.jsx)(ec,{onKeep:R,onDiscard:L})]})}function ic(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e.error;return typeof t==`string`&&t.trim()?t:void 0}function ac(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&e.success===!0}function oc(e){return Z(e)}function sc({apiBase:e}){let t=Y(),n=`ocx.combos.workspace.v1:${e}`,r=oc(n),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),u=(e,t)=>{a(e),s(t)};(0,_.useEffect)(()=>{if(!i||!o)return;let e=window.setTimeout(()=>{a(``),s(!1)},5e3);return()=>window.clearTimeout(e)},[i,o]);let d=(0,_.useCallback)(async()=>{let[t,r,i]=await Promise.all([fetch(`${e}/api/combos`),fetch(`${e}/api/config`),fetch(`${e}/api/models`)]);if(!t.ok||!r.ok||!i.ok)throw Error(`combo workspace load failed`);let a=await t.json(),o=await r.json(),s=await i.json(),c=Array.isArray(s)?s:Array.isArray(s?.models)?s.models:[],l=Ds(a),u=o.providers??{},d=Yn(u),f=Object.entries(u).map(([e,t])=>({name:e,disabled:!!t.disabled,hiddenFromPicker:!Object.hasOwn(d,e),authMode:t.authMode,adapter:t.adapter,baseUrl:t.baseUrl})),p=[],m=new Set;for(let e of c){if(!e||typeof e!=`object`)continue;let t=e;if(typeof t.provider!=`string`||typeof t.id!=`string`)continue;let n=t.provider.trim(),r=t.id.trim();if(!n||!r)continue;if(n===`combo`){m.add(r);continue}if(t.disabled===!0)continue;let i=Array.isArray(t.reasoningEfforts)?t.reasoningEfforts.filter(e=>typeof e==`string`):void 0;p.push({provider:n,id:r,namespaced:typeof t.namespaced==`string`?t.namespaced:void 0,...i?{reasoningEfforts:i}:{}})}for(let[e,t]of Object.entries(u)){let n=typeof t.defaultModel==`string`?t.defaultModel.trim():``;!n||t.disabled||p.some(t=>t.provider===e&&t.id===n)||p.push({provider:e,id:n,namespaced:`${e}/${n}`})}let h={combos:l,providers:f,models:p,cataloguedComboIds:[...m]};return Q(n,h),h},[e,n]),f=Is(n,[e],d,{isEmpty:()=>!1}),{state:p}=f,m=p.data??r,h=m?.combos??[],g=m?.providers??[],v=m?.models??[],y=new Set(m?.cataloguedComboIds??[]);return p.showSkeleton&&!m?(0,z.jsx)(Rs,{label:t(`cws.loading`),rows:5}):p.kind===`failed-cold`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(X,{tone:`err`,children:p.error instanceof Error?p.error.message:t(`cws.loadFailed`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>f.refresh(),children:t(`common.retry`)})]}):(0,z.jsxs)(`div`,{className:`combos-workspace-shell`,children:[i&&(0,z.jsx)(`div`,{className:`combos-workspace-shell-banner`,children:(0,z.jsx)(X,{tone:o?`ok`:`err`,children:i})}),p.showError&&(0,z.jsx)(`div`,{className:`combos-workspace-shell-banner`,children:(0,z.jsx)(X,{tone:`err`,children:t(`cws.loadFailed`)})}),p.refreshing&&(0,z.jsx)(zs,{live:!p.showError,children:t(`cws.loading`)}),(0,z.jsx)(`div`,{className:`combos-workspace-shell-body`,children:(0,z.jsx)(rc,{combos:h,providers:g,models:v,cataloguedComboIds:y,loading:!1,onRefresh:()=>f.refresh(),onSave:async(n,r,i)=>{try{let a=await fetch(`${e}/api/combos`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(Ms(n,i?{renameFrom:i}:{}))}),o=a.ok?await a.json():await a.json().catch(()=>null),s=ic(o);if(!a.ok||s||!ac(o)){let e=s||t(`cws.saveFailed`);return u(e,!1),{ok:!1,error:e}}return f.refresh(),u(i?t(`cws.renamed`,{from:bs(i),to:n.model}):r?t(`cws.created`,{model:n.model}):t(`cws.saved`),!0),{ok:!0}}catch{let e=t(`cws.saveFailed`);return u(e,!1),{ok:!1,error:e}}},onRemove:async n=>{try{let r=await fetch(`${e}/api/combos?id=${encodeURIComponent(n)}`,{method:`DELETE`}),i=r.ok?await r.json():await r.json().catch(()=>null),a=ic(i);if(!r.ok||a||!ac(i)){let e=a||t(`cws.removeFailed`);return u(e,!1),{ok:!1,error:e}}return f.refresh(),u(t(`cws.removed`,{id:n}),!0),{ok:!0}}catch{let e=t(`cws.removeFailed`);return u(e,!1),{ok:!1,error:e}}},onAdd:()=>l(!0),adding:c,onCloseAdd:()=>l(!1),onCreated:()=>f.refresh()})})]})}var cc=`section`;function lc(e,t){return[e,cc,t].join(`-`)}function uc(e){return[e,cc,``].join(`-`)}var dc=1200;function fc({scope:e,items:t,ariaLabel:n}){let[r,i]=(0,_.useState)(t[0]?.id??``),a=(0,_.useRef)(null),o=(0,_.useRef)(null),s=(0,_.useCallback)(()=>{a.current=null,o.current!==null&&(clearTimeout(o.current),o.current=null)},[]),c=(0,_.useCallback)(()=>{s();let n=null,r=1/0;for(let i of t){let t=document.getElementById(lc(e,i.id));if(!t)continue;let a=Math.abs(t.getBoundingClientRect().top-72);a<r&&(r=a,n=i.id)}n&&i(n)},[s,t,e]);(0,_.useEffect)(()=>()=>s(),[s]),(0,_.useEffect)(()=>{if(typeof IntersectionObserver>`u`)return;let n=t.map(t=>document.getElementById(lc(e,t.id))).filter(e=>e!==null);if(n.length===0)return;let r=new IntersectionObserver(t=>{let n=a.current;if(n){let r=document.getElementById(lc(e,n));t.some(e=>e.isIntersecting&&e.target===r)&&(s(),i(n));return}let r=t.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top)[0];if(!r)return;let o=r.target.id.slice(uc(e).length);i(e=>e===o?e:o)},{rootMargin:`-72px 0px -60% 0px`,threshold:0});for(let e of n)r.observe(e);return()=>r.disconnect()},[s,t,e]);let l=t=>{let n=document.getElementById(lc(e,t));n&&(a.current=t,o.current!==null&&clearTimeout(o.current),o.current=setTimeout(c,dc),i(t),n.scrollIntoView({behavior:`smooth`,block:`start`}))};return(0,z.jsx)(`div`,{className:`page-tabs section-tabs`,role:`tablist`,"aria-label":n,children:t.map(t=>(0,z.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":r===t.id,"aria-controls":lc(e,t.id),tabIndex:r===t.id?0:-1,className:`page-tab${r===t.id?` page-tab--active`:``}`,onClick:()=>l(t.id),children:[t.label,t.meta?(0,z.jsx)(`span`,{className:`section-tab-meta`,children:t.meta}):null]},t.id))})}function pc({model:e,effort:t,efforts:n,available:r,guidanceEnabled:i,syncCodexDefaults:a,saving:o,onSave:s}){let c=Y();return(0,z.jsxs)(`div`,{className:`swi-delegation`,children:[(0,z.jsxs)(`div`,{className:`swi-delegation-row`,children:[(0,z.jsxs)(`div`,{className:`setting-copy`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:c(`sub.delegation.model`)}),(0,z.jsx)(`div`,{className:`muted setting-hint`,children:c(`sub.delegation.modelHint`)})]}),(0,z.jsxs)(`div`,{className:`swi-delegation-controls`,children:[(0,z.jsx)(rt,{value:e,options:[{value:``,label:c(`dash.injectionNone`)},...r.map(e=>({value:e.namespaced,label:`${e.provider} / ${e.model}`}))],onChange:e=>s({model:e||null,effort:t||null}),disabled:o,label:c(`dash.injectionLabel`)}),e&&n.length>0&&(0,z.jsx)(rt,{value:t,options:[{value:``,label:c(`dash.injectionEffortNone`)},...n.map(e=>({value:e,label:e}))],onChange:t=>s({model:e||null,effort:t||null}),disabled:o,label:c(`dash.injectionEffortLabel`)})]})]}),(0,z.jsxs)(`div`,{className:`swi-delegation-row`,children:[(0,z.jsxs)(`div`,{className:`setting-copy`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:c(`dash.syncCodexSubagentDefaults`)}),(0,z.jsx)(`div`,{className:`muted setting-hint`,children:c(`dash.syncCodexSubagentDefaultsHint`)})]}),(0,z.jsx)(`button`,{type:`button`,className:`switch ${a?`on`:``}`,onClick:()=>s({syncCodexSubagentDefaults:!a}),disabled:o||!e,"aria-label":c(`dash.syncCodexSubagentDefaults`),"aria-pressed":a,children:(0,z.jsx)(`span`,{className:`knob`})})]}),(0,z.jsxs)(`div`,{className:`swi-delegation-row`,children:[(0,z.jsxs)(`div`,{className:`setting-copy`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:c(`dash.multiAgentGuidance`)}),(0,z.jsx)(`div`,{className:`muted setting-hint`,children:c(`dash.multiAgentGuidanceHint`)})]}),(0,z.jsx)(`button`,{type:`button`,className:`switch ${i?`on`:``}`,onClick:()=>s({multiAgentGuidanceEnabled:!i}),disabled:o,"aria-label":c(`dash.multiAgentGuidance`),"aria-pressed":i,children:(0,z.jsx)(`span`,{className:`knob`})})]})]})}function mc({available:e,chosen:t,busy:n=!1,onToggle:r,onMove:i,onSave:a,delegation:o}){let s=Y(),[c,l]=(0,_.useState)(``),u=(0,_.useMemo)(()=>new Set(t),[t]),d=t.length>=5,f=(0,_.useMemo)(()=>{let t=c.trim().toLowerCase();return e.filter(e=>!t||e.toLowerCase().includes(t))},[e,c]);return(0,z.jsxs)(`div`,{className:`subagents-workspace-shell`,children:[(0,z.jsx)(fc,{scope:`subagents`,items:(0,_.useMemo)(()=>[{id:`featured`,label:s(`sub.featured`),meta:`${t.length}/5`},{id:`models`,label:s(`sub.models`),meta:String(f.length)},{id:`settings`,label:s(`sub.settings`)}],[s,t.length,f.length]),ariaLabel:s(`sub.sections`)}),(0,z.jsxs)(`div`,{className:`subagents-workspace-root`,children:[(0,z.jsxs)(`section`,{id:lc(`subagents`,`featured`),className:`subagents-workspace-section`,"aria-label":s(`sub.featured`),children:[(0,z.jsxs)(`div`,{className:`swi-featured-head`,children:[(0,z.jsx)(`h2`,{className:`swi-featured-title`,children:s(`sub.featured`)}),(0,z.jsxs)(`span`,{className:`swi-featured-count`,children:[t.length,`/`,5]})]}),(0,z.jsxs)(`p`,{className:`swi-featured-hint`,children:[(0,z.jsx)(ue,{width:15,height:15,"aria-hidden":`true`}),(0,z.jsx)(`span`,{children:(0,z.jsx)(Ve,{k:`sub.orderHint`,cmd:`spawn_agent`})})]}),t.length===0?(0,z.jsx)(`div`,{className:`swi-featured-empty`,children:s(`sub.noneSelected`)}):(0,z.jsx)(`div`,{className:`swi-featured-list`,children:t.map((e,a)=>(0,z.jsxs)(`div`,{className:`swi-featured-row`,children:[(0,z.jsx)(`span`,{className:`swi-featured-pos`,children:a+1}),(0,z.jsx)(`span`,{className:`swi-featured-name`,children:ds(e)}),(0,z.jsxs)(`span`,{className:`swi-featured-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon btn-sm`,onClick:()=>i(a,-1),disabled:n||a===0,"aria-label":s(`sub.moveUp`,{m:e}),children:(0,z.jsx)(fe,{})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon btn-sm`,onClick:()=>i(a,1),disabled:n||a===t.length-1,"aria-label":s(`sub.moveDown`,{m:e}),children:(0,z.jsx)(pe,{})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon btn-sm`,onClick:()=>r(e),disabled:n,"aria-label":s(`sub.removeAria`,{m:e}),style:{color:`var(--red)`},children:(0,z.jsx)(ae,{})})]})]},e))}),(0,z.jsx)(`div`,{className:`swi-save-row`,children:(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:a,disabled:n,children:s(`common.save`)})})]}),(0,z.jsxs)(`section`,{id:lc(`subagents`,`models`),className:`subagents-workspace-section`,"aria-label":s(`sub.models`),children:[(0,z.jsxs)(`div`,{className:`swi-featured-head`,children:[(0,z.jsx)(`h2`,{className:`swi-featured-title`,children:s(`sub.models`)}),(0,z.jsx)(`span`,{className:`swi-featured-count`,children:f.length})]}),(0,z.jsxs)(`div`,{className:`swi-picker-box`,children:[(0,z.jsx)(`div`,{className:`subagents-workspace-rail-search`,children:(0,z.jsx)(`input`,{className:`input`,value:c,onChange:e=>l(e.target.value),placeholder:s(`sub.search`),"aria-label":s(`sub.search`)})}),(0,z.jsx)(`div`,{className:`subagents-workspace-rail-list`,children:f.length===0?(0,z.jsx)(`span`,{className:`subagents-workspace-rail-empty`,children:s(`sub.noModels`)}):f.map(e=>{let i=u.has(e),a=i?t.indexOf(e)+1:null,o=!i&&(d||n);return(0,z.jsxs)(`div`,{className:`subagents-workspace-rail-row${i?` subagents-workspace-rail-row--selected`:``}`,children:[(0,z.jsxs)(`span`,{className:`subagents-workspace-rail-row-main`,children:[(0,z.jsx)(`span`,{className:`swi-rail-priority`,children:a??``}),(0,z.jsx)(W,{className:`swi-rail-icon`,"aria-hidden":`true`}),(0,z.jsx)(`span`,{className:`subagents-workspace-rail-name`,children:ds(e)})]}),(0,z.jsx)(`button`,{type:`button`,className:`subagents-workspace-rail-toggle${i?` subagents-workspace-rail-toggle--on`:``}${o?` subagents-workspace-rail-toggle--disabled`:``}`,onClick:()=>{o||r(e)},disabled:o,"aria-pressed":i,"aria-label":s(i?`sub.workspace.removeFromFeatured`:`sub.workspace.addToFeatured`,{m:e}),title:i?s(`sub.workspace.removeFromFeatured`,{m:e}):d?s(`sub.workspace.featuredFull`):s(`sub.workspace.addToFeatured`,{m:e}),children:i?(0,z.jsx)(ie,{style:{width:14,height:14}}):(0,z.jsx)(oe,{style:{width:14,height:14}})})]},e)})})]})]}),(0,z.jsxs)(`section`,{id:lc(`subagents`,`settings`),className:`subagents-workspace-section`,"aria-label":s(`sub.settings`),children:[(0,z.jsx)(`div`,{className:`swi-featured-head`,children:(0,z.jsx)(`h2`,{className:`swi-featured-title`,children:s(`sub.settings`)})}),(0,z.jsx)(pc,{model:o.model,effort:o.effort,efforts:o.efforts,available:o.available,guidanceEnabled:o.guidanceEnabled,syncCodexDefaults:o.syncCodexDefaults,saving:o.saving,onSave:o.onSave})]})]})]})}function hc(e){let[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)(!0),[h,g]=(0,_.useState)(!1),v=(0,_.useCallback)(e=>{let t=gn(e);m(t.multiAgentGuidanceEnabled),g(t.syncCodexSubagentDefaults),o(t.injectionModel),c(t.injectionEffort),Array.isArray(e.efforts)&&u(e.efforts),Array.isArray(e.available)&&f(e.available)},[]);return(0,_.useEffect)(()=>{let t=!1;return(async()=>{try{let n=await mt(await fetch(`${e}/api/injection-model`));if(t)return;v(n)}catch{}finally{t||n(!0)}})(),()=>{t=!0}},[e,v]),{loaded:t,saving:r,model:a,effort:s,efforts:l,available:d,guidanceEnabled:p,syncCodexDefaults:h,save:(0,_.useCallback)(async t=>{if(!r){i(!0);try{if(!(await fetch(`${e}/api/injection-model`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).ok)throw Error(`injection save failed`);v(await mt(await fetch(`${e}/api/injection-model`)))}catch{}finally{i(!1)}}},[e,v,r])}}function gc(e){return Z(e)}function _c({apiBase:e}){let t=Y(),n=`ocx.subagents.v1:${e}`,r=gc(n),[i,a]=(0,_.useState)(()=>r?.chosen??[]),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),f=(0,_.useRef)(!1),p=hc(e),m=(0,_.useCallback)(async()=>{let r=await ct(await fetch(`${e}/api/subagent-models`),t(`sub.loadFail`));if(!r)throw Error(t(`sub.loadFail`));let i=r.available??[],o=new Set(i),s={available:i,chosen:(r.chosen??[]).filter(e=>o.has(e))};return a(s.chosen),Q(n,s),s},[e,n,t]),h=Is(n,[e],m,{isEmpty:()=>!1,initialData:r??void 0}),{state:g}=h,v=h.refresh,y=g.data??r,b=y?.available??[],x=e=>{u||(s(``),a(t=>t.includes(e)?t.filter(t=>t!==e):t.length>=5?t:[...t,e]))},S=(e,t)=>{u||a(n=>{let r=[...n],i=e+t;return i<0||i>=r.length?n:([r[e],r[i]]=[r[i],r[e]],r)})},C=async()=>{if(!(u||f.current)){f.current=!0,d(!0),s(``);try{let r=await ct(await fetch(`${e}/api/subagent-models`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({models:i})}),t(`sub.saveFailed`)),o=r?.applied??i;r?.applied&&a(r.applied),Q(n,{available:b,chosen:o}),l(!0),s(t(`sub.saved`,{n:o.length,cmd:`ocx sync`}))}catch(e){l(!1),s(e instanceof Error&&e.message?e.message:t(`sub.networkError`))}finally{f.current=!1,d(!1)}}};return g.showSkeleton&&!y?(0,z.jsx)(Rs,{label:t(`sub.loading`),rows:4}):g.kind===`failed-cold`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(X,{tone:`err`,children:g.error instanceof Error?g.error.message:t(`sub.loadFail`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>v(),children:t(`common.retry`)})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`page-head`,children:(0,z.jsx)(`h2`,{children:t(`nav.subagents`)})}),o&&(0,z.jsx)(X,{tone:c?`ok`:`err`,children:o}),g.showError&&(0,z.jsx)(X,{tone:`err`,children:t(`sub.loadFail`)}),(0,z.jsx)(mc,{available:b,chosen:i,busy:u,onToggle:x,onMove:S,onSave:()=>{C()},delegation:{model:p.model,effort:p.effort,efforts:p.efforts,available:p.available,guidanceEnabled:p.guidanceEnabled,syncCodexDefaults:p.syncCodexDefaults,saving:p.saving,onSave:e=>{p.save(e)}}})]})}function vc(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function yc(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function bc(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var xc=(e,t)=>Math.abs(e-t)<1.01,Sc=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Cc,wc=()=>{if(Cc!==void 0)return Cc;if(typeof navigator>`u`)return Cc=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Cc=!0;let e=navigator.maxTouchPoints;return Cc=navigator.platform===`MacIntel`&&e!==void 0&&e>0},Tc=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Ec=e=>e,Dc=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},Oc=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(Tc(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(Tc(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},kc={passive:!0},Ac=typeof window>`u`?!0:`onscrollend`in window,jc=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&Ac,o=0,s=a?null:Sc(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,kc),a&&r.addEventListener(`scrollend`,u,kc),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},Mc=(e,t)=>jc(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),Nc=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Pc=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},Fc=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ec,rangeExtractor:Dc,onChange:()=>{},measureElement:Nc,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=e.start+t;n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=yc(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!wc()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,kc),e.addEventListener(`touchend`,n,kc),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(wc()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=yc(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=yc(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{let c=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=this.options.gap,a=e*2,o=this._flatMeasurements;if(!o||o.length<a){let e=new Float64Array(a);o&&l>0&&e.set(o.subarray(0,l*2)),o=e,this._flatMeasurements=o}let s;if(l===0)s=t+n;else{let e=l-1;s=o[e*2]+o[e*2+1]+i}for(let t=l;t<e;t++){let e=r(t),n=c.get(e),a=typeof n==`number`?n:this.options.estimateSize(t);o[t*2]=s,o[t*2+1]=a,s+=a+i}let u=vc(e,o,r);return this.measurementsCache=u,u}let u=this.measurementsCache.slice(0,l),d=Array(a).fill(void 0);for(let e=0;e<l;e++){let t=u[e];t&&(d[t.lane]=e)}for(let i=l;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,l,f=o===`estimate`||c.has(e);if(a!==void 0&&this.options.lanes>1){s=a;let e=d[s],r=e===void 0?void 0:u[e];l=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?u[i-1]:this.getFurthestMeasurement(u,i);l=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&f&&this.laneAssignments.set(i,s)}let p=c.get(e),m=typeof p==`number`?p:this.options.estimateSize(i),h=l+m;u[i]={index:i,start:l,size:m,end:h,key:e,lane:s},d[s]=i}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=yc(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=Rc(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=yc(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=t-(this.itemSizeCache.get(i)??n);if(o!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,c=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?r<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(i)||this.scrollDirection!==`backward`):this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},o,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):c&&this.applyScrollAdjustment(o),this.notify(!1)}},this.getVirtualItems=yc(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return bc(t[Ic(0,t.length-1,r?e=>n[e*2]:e=>bc(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){e!==0&&(wc()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&xc(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},Ic=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function Lc(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function Rc(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=Lc(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=Ic(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var zc=typeof document<`u`?_.useLayoutEffect:_.useEffect;function Bc({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=_.useReducer(e=>e+1,0)[1],a=_.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}let r=!!e.options.horizontal,i=t.mode===`transform`,o=r?`left`:`top`,s=e.options.scrollMargin,c=e.getVirtualItems();for(let n of c){let a=n.start-s,c=e.elementsCache.get(n.key);c&&t.lastPositions.get(c)!==a&&(t.lastPositions.set(c,a),i?c.style.transform=r?`translate3d(${a}px, 0, 0)`:`translate3d(0, ${a}px, 0)`:c.style[o]=`${a}px`)}},s={...r,onChange:(t,n)=>{var s;let c=a.current,l=!0;if(c.enabled){o(t);let e=t.range,n=c.prevRange;l=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,l&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}l&&(e&&n?(0,Ge.flushSync)(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[c]=_.useState(()=>{let e=new Fc(s);return Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return c.setOptions(s),zc(()=>c._didMount(),[]),zc(()=>c._willUpdate()),zc(()=>{o(c)}),c}function Vc(e){return Bc({observeElementRect:Oc,observeElementOffset:Mc,scrollToFn:Pc,...e})}var Hc=32;function Uc(e){return[...new Uint8Array(e)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Wc(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}async function Gc(e){let t=e.trim();if(t&&!Wc(t)&&!(t.length>4096))return Uc(await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(t))).slice(0,Hc)}function Kc(e,t,n){if(!e)return!1;let r=t.trim();return r?e===r?!0:n!==void 0&&e===n:!1}var qc={400:{en:{label:`Bad request`,description:`The proxy could not understand the request. Check the model, message shape, headers, and JSON body before retrying.`},ko:{label:`잘못된 요청`,description:`프록시가 요청을 이해할 수 없습니다. 재시도 전에 모델, 메시지 형식, 헤더, JSON 본문을 확인해야 합니다.`},zh:{label:`错误请求`,description:`代理无法理解该请求。重试前请检查模型、消息结构、标头和 JSON 正文。`},de:{label:`Ungültige Anfrage`,description:`Der Proxy konnte die Anfrage nicht verstehen. Prüfe Modell, Nachrichtenformat, Header und JSON-Body vor einem erneuten Versuch.`},ru:{label:`Некорректный запрос`,description:`Прокси не смог интерпретировать запрос. Перед повторной попыткой проверьте модель, формат сообщений, заголовки и тело JSON.`},ja:{label:`不正なリクエスト`,description:`プロキシがリクエストを解釈できませんでした。再試行前にモデル、メッセージ形式、ヘッダー、JSON 本文を確認してください。`}},401:{en:{label:`Unauthorized`,description:`Credentials are missing, expired, or invalid. Re-login or refresh the account/provider credentials used by opencodex.`},ko:{label:`인증 필요`,description:`자격 증명이 없거나 만료되었거나 유효하지 않습니다. opencodex에서 사용하는 계정 또는 제공자 자격 증명을 다시 로그인하거나 갱신해야 합니다.`},zh:{label:`未授权`,description:`凭据缺失、已过期或无效。请重新登录,或刷新 opencodex 使用的账号/提供商凭据。`},de:{label:`Nicht autorisiert`,description:`Anmeldedaten fehlen, sind abgelaufen oder ungültig. Melde dich erneut an oder aktualisiere die von opencodex genutzten Konto-/Anbieter-Zugangsdaten.`},ru:{label:`Не авторизован`,description:`Учётные данные отсутствуют, истекли или недействительны. Войдите заново или обновите учётные данные аккаунта или провайдера, которые использует opencodex.`},ja:{label:`認証が必要`,description:`認証情報が不在・期限切れ・無効です。opencodex が使用するアカウントまたはプロバイダー認証情報を再ログインまたは更新してください。`}},402:{en:{label:`Payment required`,description:`The upstream provider rejected the request because billing, credits, or plan access is not available. Add credits, update billing, or switch provider.`},ko:{label:`결제 필요`,description:`청구, 크레딧, 플랜 접근 권한 문제로 업스트림 제공자가 요청을 거부했습니다. 크레딧 추가, 결제 정보 갱신, 제공자 전환이 필요합니다.`},zh:{label:`需要付款`,description:`上游提供商因账单、额度或套餐权限不可用而拒绝了请求。请充值、更新账单信息或切换提供商。`},de:{label:`Zahlung erforderlich`,description:`Der Upstream-Anbieter hat die Anfrage abgelehnt, weil Abrechnung, Guthaben oder Planzugriff nicht verfügbar ist. Guthaben aufladen, Abrechnung aktualisieren oder Anbieter wechseln.`},ru:{label:`Требуется оплата`,description:`Вышестоящий провайдер отклонил запрос из-за проблем с оплатой, кредитами или доступом по тарифному плану. Пополните баланс, обновите платёжные данные или переключитесь на другого провайдера.`},ja:{label:`支払いが必要`,description:`課金、クレジット、プランアクセスが利用できないため上流プロバイダーがリクエストを拒否しました。クレジット追加、支払い情報更新、プロバイダー切替が必要です。`}},403:{en:{label:`Forbidden`,description:`The account is authenticated but not allowed to use this model or operation. Often a plan/subscription gate (e.g. Ollama Cloud Pro), org policy, or model permission — not necessarily a bad API key.`},ko:{label:`권한 없음`,description:`계정 인증은 되었지만 이 모델 또는 작업을 사용할 권한이 없습니다. 플랜/구독 제한(예: Ollama Cloud Pro), 조직 정책, 모델 권한 문제인 경우가 많으며 API 키가 잘못된 것은 아닐 수 있습니다.`},zh:{label:`禁止访问`,description:`账号已认证,但无权使用此模型或操作。常见原因是套餐/订阅限制(例如 Ollama Cloud Pro)、组织策略或模型权限——不一定是 API 密钥无效。`},de:{label:`Verboten`,description:`Das Konto ist authentifiziert, darf dieses Modell oder diese Operation aber nicht nutzen. Oft Plan-/Abo-Sperre (z. B. Ollama Cloud Pro), Organisationsrichtlinie oder Modellrecht — nicht zwingend ein ungültiger API-Key.`},ru:{label:`Доступ запрещён`,description:`Аккаунт аутентифицирован, но не имеет права использовать эту модель или операцию. Часто причина — ограничение тарифа или подписки (например, Ollama Cloud Pro), политика организации или права доступа к модели, а не обязательно неверный API-ключ.`},ja:{label:`アクセス禁止`,description:`アカウントは認証済みですがこのモデルや操作の使用が許可されていません。多くはプラン/サブスクリプション制限(例: Ollama Cloud Pro)、組織ポリシー、モデル権限であり、API キーが不正とは限りません。`}},404:{en:{label:`Not found`,description:`The requested route, model, account, or upstream resource was not found. Verify the model name and opencodex provider configuration.`},ko:{label:`찾을 수 없음`,description:`요청한 경로, 모델, 계정 또는 업스트림 리소스를 찾을 수 없습니다. 모델 이름과 opencodex 제공자 설정을 확인해야 합니다.`},zh:{label:`未找到`,description:`找不到请求的路由、模型、账号或上游资源。请确认模型名称和 opencodex 提供商配置。`},de:{label:`Nicht gefunden`,description:`Die angeforderte Route, das Modell, das Konto oder die Upstream-Ressource wurde nicht gefunden. Prüfe Modellname und opencodex-Anbieterkonfiguration.`},ru:{label:`Не найдено`,description:`Запрошенный маршрут, модель, аккаунт или вышестоящий ресурс не найден. Проверьте имя модели и конфигурацию провайдера в opencodex.`},ja:{label:`見つかりません`,description:`要求されたルート、モデル、アカウント、上流リソースが見つかりませんでした。モデル名と opencodex プロバイダー設定を確認してください。`}},408:{en:{label:`Request timeout`,description:`The request took too long before the proxy or upstream provider could complete it. Retry with a smaller request or a different provider.`},ko:{label:`요청 시간 초과`,description:`프록시 또는 업스트림 제공자가 요청을 완료하기 전에 시간이 초과되었습니다. 더 작은 요청으로 재시도하거나 다른 제공자로 전환해야 합니다.`},zh:{label:`请求超时`,description:`代理或上游提供商未能在限定时间内完成请求。请缩小请求后重试,或切换提供商。`},de:{label:`Anfrage-Timeout`,description:`Die Anfrage dauerte zu lange, bevor Proxy oder Upstream-Anbieter sie abschließen konnten. Mit kleinerer Anfrage oder anderem Anbieter erneut versuchen.`},ru:{label:`Тайм-аут запроса`,description:`Обработка запроса заняла слишком много времени, и прокси или вышестоящий провайдер не успел её завершить. Повторите попытку с меньшим запросом или через другого провайдера.`},ja:{label:`リクエストタイムアウト`,description:`プロキシまたは上流プロバイダーがリクエストを完了する前に時間切れになりました。より小さいリクエストで再試行するか、別のプロバイダーに切り替えてください。`}},409:{en:{label:`Conflict`,description:`The request conflicts with the current account, session, or provider state. Refresh the session or retry after the active operation finishes.`},ko:{label:`상태 충돌`,description:`요청이 현재 계정, 세션 또는 제공자 상태와 충돌합니다. 세션을 갱신하거나 진행 중인 작업이 끝난 뒤 재시도해야 합니다.`},zh:{label:`状态冲突`,description:`请求与当前账号、会话或提供商状态冲突。请刷新会话,或等待当前操作完成后重试。`},de:{label:`Konflikt`,description:`Die Anfrage kollidiert mit dem aktuellen Konto-, Sitzungs- oder Anbieterstatus. Sitzung aktualisieren oder nach Abschluss der laufenden Operation erneut versuchen.`},ru:{label:`Конфликт`,description:`Запрос конфликтует с текущим состоянием аккаунта, сессии или провайдера. Обновите сессию или повторите попытку после завершения текущей операции.`},ja:{label:`状態の衝突`,description:`リクエストが現在のアカウント、セッション、プロバイダー状態と衝突しています。セッションを更新するか、進行中の操作が終わった後に再試行してください。`}},413:{en:{label:`Request too large`,description:`The prompt, attachments, or generated payload exceeds a proxy or upstream limit. Reduce tokens, file size, or conversation history.`},ko:{label:`요청 과대`,description:`프롬프트, 첨부 파일 또는 생성 페이로드가 프록시나 업스트림 한도를 초과했습니다. 토큰, 파일 크기, 대화 기록을 줄여야 합니다.`},zh:{label:`请求过大`,description:`提示、附件或生成的负载超过了代理或上游限制。请减少 token、文件大小或对话历史。`},de:{label:`Anfrage zu groß`,description:`Prompt, Anhänge oder generierte Nutzlast überschreiten ein Proxy- oder Upstream-Limit. Tokens, Dateigröße oder Verlauf reduzieren.`},ru:{label:`Слишком большой запрос`,description:`Промпт, вложения или сформированная полезная нагрузка превышают лимит прокси или вышестоящего провайдера. Сократите количество токенов, размер файлов или историю диалога.`},ja:{label:`リクエストが大きすぎます`,description:`プロンプト、添付ファイル、生成ペイロードがプロキシまたは上流の制限を超えました。トークン、ファイルサイズ、会話履歴を減らしてください。`}},422:{en:{label:`Invalid content`,description:`The provider accepted the request format but rejected its contents. Check model options, tool definitions, message roles, and unsupported fields.`},ko:{label:`내용 검증 실패`,description:`제공자가 요청 형식은 받았지만 내용을 거부했습니다. 모델 옵션, 도구 정의, 메시지 역할, 지원되지 않는 필드를 확인해야 합니다.`},zh:{label:`内容无效`,description:`提供商接受了请求格式,但拒绝了其中的内容。请检查模型选项、工具定义、消息角色和不支持的字段。`},de:{label:`Ungültiger Inhalt`,description:`Der Anbieter akzeptierte das Anfrageformat, lehnte den Inhalt aber ab. Prüfe Modelloptionen, Tool-Definitionen, Nachrichtenrollen und nicht unterstützte Felder.`},ru:{label:`Недопустимое содержимое`,description:`Провайдер принял формат запроса, но отклонил его содержимое. Проверьте параметры модели, определения инструментов, роли сообщений и неподдерживаемые поля.`},ja:{label:`内容の検証失敗`,description:`プロバイダーはリクエスト形式を受け付けましたが内容を拒否しました。モデルオプション、ツール定義、メッセージロール、未サポートのフィールドを確認してください。`}},424:{en:{label:`Provider dependency failed`,description:`A required upstream dependency failed while opencodex was routing the request. Retry later or switch to another configured provider.`},ko:{label:`제공자 의존성 실패`,description:`opencodex가 요청을 라우팅하는 동안 필요한 업스트림 의존성이 실패했습니다. 나중에 재시도하거나 다른 설정된 제공자로 전환해야 합니다.`},zh:{label:`提供商依赖失败`,description:`opencodex 路由请求时,必需的上游依赖失败。请稍后重试,或切换到另一个已配置的提供商。`},de:{label:`Anbieter-Abhängigkeit fehlgeschlagen`,description:`Eine erforderliche Upstream-Abhängigkeit ist fehlgeschlagen, während opencodex die Anfrage geroutet hat. Später erneut versuchen oder zu einem anderen Anbieter wechseln.`},ru:{label:`Сбой зависимости провайдера`,description:`Необходимая вышестоящая зависимость дала сбой, пока opencodex маршрутизировал запрос. Повторите попытку позже или переключитесь на другого настроенного провайдера.`},ja:{label:`プロバイダー依存の失敗`,description:`opencodex がリクエストをルーティング中に必要な上流依存が失敗しました。後で再試行するか、別の設定済みプロバイダーに切り替えてください。`}},429:{en:{label:`Rate limited`,description:`The upstream provider rate or quota limit has been reached. Wait for the quota window to reset or switch account/provider.`},ko:{label:`한도 초과`,description:`업스트림 제공자의 속도 또는 할당량 한도에 도달했습니다. 한도 창이 초기화될 때까지 기다리거나 계정/제공자를 전환해야 합니다.`},zh:{label:`限流`,description:`已达到上游提供商的速率或额度限制。请等待额度窗口重置,或切换账号/提供商。`},de:{label:`Ratenlimit erreicht`,description:`Das Raten- oder Kontingentlimit des Upstream-Anbieters ist erreicht. Auf Reset des Kontingentfensters warten oder Konto/Anbieter wechseln.`},ru:{label:`Превышен лимит запросов`,description:`Достигнут лимит скорости или квота вышестоящего провайдера. Дождитесь сброса окна квоты или переключитесь на другой аккаунт или провайдера.`},ja:{label:`レート制限`,description:`上流プロバイダーのレートまたはクォータ制限に達しました。クォータウィンドウがリセットされるまで待つか、アカウント/プロバイダーを切り替えてください。`}},499:{en:{label:`Client closed request`,description:`The client disconnected or canceled the request before opencodex finished routing it. Retry if the cancellation was accidental.`},ko:{label:`클라이언트 취소`,description:`opencodex가 라우팅을 끝내기 전에 클라이언트 연결이 끊기거나 요청이 취소되었습니다. 의도한 취소가 아니면 다시 시도해야 합니다.`},zh:{label:`客户端已取消`,description:`opencodex 完成路由前,客户端已断开连接或取消请求。如果不是有意取消,请重试。`},de:{label:`Client hat Anfrage geschlossen`,description:`Der Client hat die Verbindung getrennt oder die Anfrage abgebrochen, bevor opencodex das Routing abgeschlossen hat. Bei versehentlichem Abbruch erneut versuchen.`},ru:{label:`Запрос закрыт клиентом`,description:`Клиент отключился или отменил запрос до того, как opencodex завершил его маршрутизацию. Если отмена была случайной, повторите попытку.`},ja:{label:`クライアントがリクエストをクローズ`,description:`opencodex がルーティングを終える前にクライアントが切断またはキャンセルしました。意図しないキャンセルなら再試行してください。`}},500:{en:{label:`Proxy error`,description:`opencodex hit an internal error while handling the request. Retry once, then check proxy logs if it repeats.`},ko:{label:`프록시 오류`,description:`opencodex가 요청을 처리하는 동안 내부 오류가 발생했습니다. 한 번 재시도하고 반복되면 프록시 로그를 확인해야 합니다.`},zh:{label:`代理错误`,description:`opencodex 处理请求时发生内部错误。请先重试一次;如果重复出现,请检查代理日志。`},de:{label:`Proxy-Fehler`,description:`opencodex ist bei der Anfragebearbeitung auf einen internen Fehler gestoßen. Einmal erneut versuchen, bei Wiederholung Proxy-Logs prüfen.`},ru:{label:`Ошибка прокси`,description:`В opencodex произошла внутренняя ошибка при обработке запроса. Повторите попытку один раз; если ошибка повторяется, проверьте логи прокси.`},ja:{label:`プロキシエラー`,description:`opencodex がリクエスト処理中に内部エラーに遭遇しました。1 回再試行し、繰り返す場合はプロキシログを確認してください。`}},502:{en:{label:`Bad upstream response`,description:`The upstream provider returned an invalid or failed response through the proxy. Retry or route the request to another provider.`},ko:{label:`업스트림 응답 오류`,description:`업스트림 제공자가 프록시를 통해 유효하지 않거나 실패한 응답을 반환했습니다. 재시도하거나 다른 제공자로 라우팅해야 합니다.`},zh:{label:`上游响应错误`,description:`上游提供商通过代理返回了无效或失败的响应。请重试,或将请求路由到其他提供商。`},de:{label:`Ungültige Upstream-Antwort`,description:`Der Upstream-Anbieter lieferte über den Proxy eine ungültige oder fehlgeschlagene Antwort. Erneut versuchen oder zu einem anderen Anbieter routen.`},ru:{label:`Некорректный ответ провайдера`,description:`Вышестоящий провайдер вернул через прокси недействительный или ошибочный ответ. Повторите попытку или направьте запрос другому провайдеру.`},ja:{label:`上流レスポンス不良`,description:`上流プロバイダーがプロキシ経由で無効または失敗したレスポンスを返しました。再試行するか、リクエストを別のプロバイダーにルーティングしてください。`}},503:{en:{label:`Provider unavailable`,description:`The proxy or upstream provider is temporarily unavailable or overloaded. Wait briefly, then retry or switch provider.`},ko:{label:`제공자 사용 불가`,description:`프록시 또는 업스트림 제공자가 일시적으로 사용할 수 없거나 과부하 상태입니다. 잠시 기다린 뒤 재시도하거나 제공자를 전환해야 합니다.`},zh:{label:`提供商不可用`,description:`代理或上游提供商暂时不可用或过载。请稍后重试,或切换提供商。`},de:{label:`Anbieter nicht verfügbar`,description:`Proxy oder Upstream-Anbieter ist vorübergehend nicht verfügbar oder überlastet. Kurz warten, dann erneut versuchen oder Anbieter wechseln.`},ru:{label:`Провайдер недоступен`,description:`Прокси или вышестоящий провайдер временно недоступен или перегружен. Немного подождите, затем повторите попытку или смените провайдера.`},ja:{label:`プロバイダー利用不可`,description:`プロキシまたは上流プロバイダーが一時的に利用不可または過負荷です。少し待ってから再試行するか、プロバイダーを切り替えてください。`}},504:{en:{label:`Upstream timeout`,description:`The upstream provider did not respond before the proxy timeout. Retry with a smaller request or choose a faster provider.`},ko:{label:`업스트림 시간 초과`,description:`프록시 시간 제한 전에 업스트림 제공자가 응답하지 않았습니다. 더 작은 요청으로 재시도하거나 더 빠른 제공자를 선택해야 합니다.`},zh:{label:`上游超时`,description:`上游提供商未在代理超时前响应。请缩小请求后重试,或选择响应更快的提供商。`},de:{label:`Upstream-Timeout`,description:`Der Upstream-Anbieter antwortete nicht vor dem Proxy-Timeout. Mit kleinerer Anfrage erneut versuchen oder schnelleren Anbieter wählen.`},ru:{label:`Тайм-аут вышестоящего провайдера`,description:`Вышестоящий провайдер не ответил до истечения тайм-аута прокси. Повторите попытку с меньшим запросом или выберите более быстрого провайдера.`},ja:{label:`上流タイムアウト`,description:`上流プロバイダーがプロキシタイムアウト前に応答しませんでした。より小さいリクエストで再試行するか、より速いプロバイダーを選んでください。`}},529:{en:{label:`Provider overloaded`,description:`The upstream provider is overloaded or capacity-limited. Wait and retry, or switch to another account/provider.`},ko:{label:`제공자 과부하`,description:`업스트림 제공자가 과부하 상태이거나 처리 용량이 제한되었습니다. 기다렸다가 재시도하거나 다른 계정/제공자로 전환해야 합니다.`},zh:{label:`提供商过载`,description:`上游提供商过载或容量受限。请等待后重试,或切换到其他账号/提供商。`},de:{label:`Anbieter überlastet`,description:`Der Upstream-Anbieter ist überlastet oder kapazitätsbegrenzt. Warten und erneut versuchen oder anderes Konto/Anbieter nutzen.`},ru:{label:`Провайдер перегружен`,description:`Вышестоящий провайдер перегружен или ограничен по мощности. Подождите и повторите попытку либо переключитесь на другой аккаунт или провайдера.`},ja:{label:`プロバイダー過負荷`,description:`上流プロバイダーが過負荷または容量制限されています。待ってから再試行するか、別のアカウント/プロバイダーに切り替えてください。`}}},Jc={client:{en:{label:`Request error`,description:`The proxy or upstream provider rejected the request. Check the request shape, credentials, model name, and provider configuration.`},ko:{label:`요청 오류`,description:`프록시 또는 업스트림 제공자가 요청을 거부했습니다. 요청 형식, 자격 증명, 모델 이름, 제공자 설정을 확인해야 합니다.`},zh:{label:`请求错误`,description:`代理或上游提供商拒绝了该请求。请检查请求结构、凭据、模型名称和提供商配置。`},de:{label:`Anfragefehler`,description:`Der Proxy oder Upstream-Anbieter hat die Anfrage abgelehnt. Prüfe Anfrageformat, Anmeldedaten, Modellname und Anbieterkonfiguration.`},ru:{label:`Ошибка запроса`,description:`Прокси или вышестоящий провайдер отклонил запрос. Проверьте структуру запроса, учётные данные, имя модели и конфигурацию провайдера.`},ja:{label:`リクエストエラー`,description:`プロキシまたは上流プロバイダーがリクエストを拒否しました。リクエスト形式、認証情報、モデル名、プロバイダー設定を確認してください。`}},server:{en:{label:`Server or upstream error`,description:`opencodex or an upstream provider failed while processing the request. Retry later or route the request to another provider.`},ko:{label:`서버 또는 업스트림 오류`,description:`opencodex 또는 업스트림 제공자가 요청 처리 중 실패했습니다. 나중에 재시도하거나 다른 제공자로 라우팅해야 합니다.`},zh:{label:`服务器或上游错误`,description:`opencodex 或上游提供商处理请求时失败。请稍后重试,或将请求路由到其他提供商。`},de:{label:`Server- oder Upstream-Fehler`,description:`opencodex oder ein Upstream-Anbieter ist bei der Anfragebearbeitung fehlgeschlagen. Später erneut versuchen oder zu einem anderen Anbieter routen.`},ru:{label:`Ошибка сервера или провайдера`,description:`opencodex или вышестоящий провайдер завершил обработку запроса с ошибкой. Повторите попытку позже или направьте запрос другому провайдеру.`},ja:{label:`サーバーまたは上流エラー`,description:`opencodex または上流プロバイダーがリクエスト処理中に失敗しました。後で再試行するか、リクエストを別のプロバイダーにルーティングしてください。`}}};function Yc(e){return e===`de`||e===`ko`||e===`zh`||e===`ru`||e===`ja`?e:`en`}function Xc(e,t){if(e<400)return null;let n=Yc(t);return(qc[Math.trunc(e)]??(e<500?Jc.client:Jc.server))[n]}var Zc=[`provider`,`usage`,`injection`];function Qc(e){return e>0?`[${new Date(e).toLocaleTimeString()}] `:``}function $c(e){return new Date(e).toLocaleTimeString()}function el(e,t){return t===`provider`?!!e?.enabled:t===`usage`?!!e?.usage:!!e?.injection}function tl(e,t){return t===`debug`?e.enabled:t===`usage`?e.usage:t===`injection`?e.injection:e.claude}function nl({entries:e}){let{t}=ze();return(0,z.jsxs)(`div`,{className:`card`,style:{marginBottom:16,padding:`12px 14px`},children:[(0,z.jsx)(`div`,{className:`font-semibold`,style:{marginBottom:4},children:t(`debug.claudeInbound.title`)}),(0,z.jsx)(`div`,{className:`muted text-control`,style:{marginBottom:10},children:t(`debug.claudeInbound.sub`)}),e.length===0?(0,z.jsx)(`div`,{className:`muted text-control`,children:t(`debug.claudeInbound.empty`)}):(0,z.jsx)(`div`,{style:{overflowX:`auto`},children:(0,z.jsxs)(`table`,{className:`table text-label`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:t(`debug.claudeInbound.time`)}),(0,z.jsx)(`th`,{children:t(`debug.claudeInbound.endpoint`)}),(0,z.jsx)(`th`,{children:t(`debug.claudeInbound.model`)}),(0,z.jsx)(`th`,{children:`thinking`}),(0,z.jsx)(`th`,{children:`effort`}),(0,z.jsx)(`th`,{children:`beta`}),(0,z.jsx)(`th`,{children:`metadata`}),(0,z.jsx)(`th`,{children:`system`})]})}),(0,z.jsx)(`tbody`,{children:e.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`muted mono`,children:$c(e.at)}),(0,z.jsx)(`td`,{className:`mono`,children:e.endpoint}),(0,z.jsxs)(`td`,{className:`mono`,title:e.resolvedModel,children:[e.model,e.resolvedModel&&e.resolvedModel!==e.model&&(0,z.jsxs)(`span`,{className:`muted`,children:[` → `,e.resolvedModel]})]}),(0,z.jsxs)(`td`,{className:`mono`,children:[e.thinkingType??`-`,e.thinkingBudgetTokens!==void 0&&(0,z.jsxs)(`span`,{className:`muted`,children:[` (`,e.thinkingBudgetTokens,`)`]})]}),(0,z.jsx)(`td`,{className:`mono`,children:e.outputConfigEffort??`-`}),(0,z.jsx)(`td`,{className:`mono`,title:e.anthropicBeta,style:{maxWidth:160,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.anthropicBeta??`-`}),(0,z.jsx)(`td`,{className:`mono`,title:e.metadataKeys?.join(`, `),children:e.hasMetadataUserId?`user_id ${e.userIdTag??``}`:t(`debug.claudeInbound.none`)}),(0,z.jsx)(`td`,{className:`mono`,children:e.hasSystem?e.systemTag??`yes`:t(`debug.claudeInbound.none`)})]},e.id))})]})})]})}function rl({debug:e,stream:t,streamEnabled:n,entries:r,scrollContainerRef:i,lineVirtualizer:a}){let{t:o}=ze();return e?n?r.length===0?(0,z.jsxs)(`div`,{className:`empty`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,style:{marginBottom:6},children:o(`debug.noLinesTitle`)}),(0,z.jsx)(`div`,{className:`muted text-control`,style:{maxWidth:560,marginInline:`auto`},children:o(`debug.noLines.${t}`)})]}):(0,z.jsx)(`div`,{ref:i,className:`log-detail-json`,style:{maxHeight:`calc(100vh - 280px)`,overflow:`auto`},children:(0,z.jsx)(`div`,{style:{position:`relative`,height:a.getTotalSize(),width:`100%`},children:a.getVirtualItems().map(e=>(0,z.jsx)(`div`,{ref:a.measureElement,"data-index":e.index,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:`${Qc(r[e.index].at)}${r[e.index].line}`},e.key))})}):(0,z.jsxs)(`div`,{className:`empty`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,style:{marginBottom:6},children:o(`debug.emptyTitle`)}),(0,z.jsx)(`div`,{className:`muted text-control`,style:{maxWidth:560,marginInline:`auto`},children:o(`debug.empty`)})]}):null}function il({debug:e,debugBusy:t,stream:n,onSetFlag:r,onReset:i,onStreamChange:a}){let{t:o}=ze();return(0,z.jsxs)(`div`,{className:`card`,style:{marginBottom:16,padding:`12px 14px`},children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,flexWrap:`wrap`},children:[(0,z.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:16},children:[`debug`,`usage`,`injection`,`claude`].map(n=>{let i=tl(e,n);return(0,z.jsxs)(`div`,{style:{display:`inline-flex`,alignItems:`center`,gap:10,minWidth:220},children:[(0,z.jsx)(nt,{on:i,disabled:t,label:o(`debug.${n}`),onClick:()=>r(n,!i)}),(0,z.jsx)(`span`,{className:`text-control`,children:o(`debug.${n}`)})]},n)})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:t,onClick:i,children:o(`debug.reset`)})]}),(e.enabled||e.usage||e.injection)&&(0,z.jsxs)(`div`,{style:{display:`inline-flex`,gap:6,marginTop:12},children:[e.enabled&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm${n===`provider`?` btn-primary`:` btn-ghost`}`,onClick:()=>a(`provider`),children:o(`debug.streamProvider`)}),e.usage&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm${n===`usage`?` btn-primary`:` btn-ghost`}`,onClick:()=>a(`usage`),children:o(`debug.streamUsage`)}),e.injection&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm${n===`injection`?` btn-primary`:` btn-ghost`}`,onClick:()=>a(`injection`),children:o(`debug.streamInjection`)})]})]})}function al({embedded:e,refreshing:t,streamEnabled:n,follow:r,onRefresh:i,onFollowChange:a}){let{t:o}=ze();return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:e?`row`:`page-head`,style:e?{justifyContent:`flex-end`,marginBottom:4}:void 0,children:[!e&&(0,z.jsx)(`h2`,{children:o(`debug.title`)}),(0,z.jsxs)(`div`,{style:{display:`inline-flex`,alignItems:`center`,gap:12},children:[(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:t||!n,onClick:i,children:[(0,z.jsx)(q,{}),` `,o(`debug.refresh`)]}),(0,z.jsxs)(`label`,{className:`muted text-control`,style:{cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>a(e.target.checked)}),o(`debug.follow`)]})]})]}),(0,z.jsx)(`p`,{className:`page-sub`,children:o(`debug.subtitle`)})]})}function ol(e){return`debug-settings:${e}`}function sl({apiBase:e,embedded:t,active:n=!0}){let{t:r}=ze(),i=`ocx.debug.settings.v1:${e}`,a=Z(i),o=ol(e),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(`provider`),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)(!0),[h,g]=(0,_.useState)(!1),v=(0,_.useRef)(0),y=(0,_.useRef)(0),b=(0,_.useRef)(0),x=(0,_.useRef)(null),S=(0,_.useRef)(null),C=(0,_.useRef)(null),w=Is(o,[e],async t=>{let n=await fetch(`${e}/api/debug`,{signal:t});if(!n.ok)throw Error(String(n.status));let r=await n.json();return Q(i,r),r},{pollMs:2e3,enabled:n,isEmpty:()=>!1,initialData:a??void 0}),T=w.state,E=w.data??a??null,D=I(`debug-claude-inbound:${e}`,[e,E?.claude],async t=>{let n=await fetch(`${e}/api/claude/inbound-debug`,{signal:t});if(!n.ok)return[];let r=await n.json();return Array.isArray(r.entries)?r.entries:[]},{pollMs:2e3,enabled:n&&!!E?.claude}).data??[],O=Vc({count:d.length,getScrollElement:()=>S.current,estimateSize:()=>20,overscan:30,getItemKey:e=>d[e].seq}),k=(0,_.useCallback)(e=>el(E,e),[E]);(0,_.useEffect)(()=>{if(!E||k(l))return;let e=Zc.find(k);if(!e)return;let t=window.setTimeout(()=>u(e),0);return()=>window.clearTimeout(t)},[E,l,k]);let A=k(l),j=l===`provider`?`${e}/api/debug/logs`:l===`usage`?`${e}/api/debug/usage-logs`:`${e}/api/debug/injection-logs`,M=(0,_.useCallback)(async(e,t)=>{let n=++b.current;if(!A){n===b.current&&(f([]),v.current=0);return}g(!0);try{let r=new URLSearchParams({limit:`500`});!e&&v.current>0&&r.set(`after`,String(v.current));let i=await fetch(`${j}?${r}`,{signal:t});if(!i.ok||t?.aborted||n!==b.current)return;let a=await i.json();if(t?.aborted||n!==b.current||a.length===0)return;f(t=>(e?a:[...t,...a]).slice(-2e3)),v.current=a[a.length-1].seq}catch{}finally{n===b.current&&g(!1)}},[j,A]);(0,_.useEffect)(()=>{if(!n)return;let t=`${e}:${l}:${A}`,r=C.current!==t;if(C.current=t,!r&&d.length>0)return;v.current=0;let i=new AbortController,a=window.setTimeout(()=>{r&&f([]),M(!0,i.signal)},0);return()=>{window.clearTimeout(a),b.current+=1,i.abort()}},[n,e,l,A]);let N=(0,_.useEffectEvent)(e=>{M(e)});(0,_.useEffect)(()=>{if(!n||!p||!A)return;let e=setInterval(()=>N(!1),1e3);return()=>clearInterval(e)},[n,p,A]),(0,_.useEffect)(()=>{p&&d.length>0&&O.scrollToIndex(d.length-1,{align:`end`})},[d,p,O]);let P=async t=>{let n=++y.current;c(!0);let r=async()=>{try{let r=await fetch(`${e}/api/debug`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)});if(!r.ok)return;let a=await r.json();if(n!==y.current)return;Q(i,a),L(o,a)}catch{}},a=(x.current??Promise.resolve()).then(r,r);x.current=a.then(()=>void 0,()=>void 0);try{await a}finally{n===y.current&&c(!1)}},F=async(e,t)=>{await P({[e]:t})},R=async()=>{await P({reset:!0})};return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(al,{embedded:t,refreshing:h,streamEnabled:A,follow:p,onRefresh:()=>void M(!0),onFollowChange:m}),!E&&T.showError?(0,z.jsxs)(`div`,{className:`notice notice-err`,role:`alert`,children:[(0,z.jsx)(`span`,{children:r(`debug.loadFailed`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>w.refresh(),children:r(`common.retry`)})]}):T.showSkeleton&&!E?(0,z.jsx)(Rs,{label:r(`debug.loading`),rows:3}):E?(0,z.jsx)(il,{debug:E,debugBusy:s,stream:l,onSetFlag:(e,t)=>{F(e,t)},onReset:()=>{R()},onStreamChange:u}):null,E&&T.showError&&(0,z.jsx)(X,{tone:`err`,children:r(`debug.loadFailed`)}),E?.claude&&(0,z.jsx)(nl,{entries:D}),(0,z.jsx)(rl,{debug:!!E,stream:l,streamEnabled:A,entries:d,scrollContainerRef:S,lineVirtualizer:O})]})}function cl(){return window.location.hash.replace(/^#\/?/,``)===`logs/debug`?`debug`:`logs`}function ll(e){window.location.hash=e===`debug`?`logs/debug`:`logs`}function ul(e){e.key===`ArrowLeft`||e.key===`Home`?(e.preventDefault(),ll(`logs`),document.getElementById(`logs-tab-logs`)?.focus()):(e.key===`ArrowRight`||e.key===`End`)&&(e.preventDefault(),ll(`debug`),document.getElementById(`logs-tab-debug`)?.focus())}function dl(e){return e.requestedSpeedLabel||void 0}function fl(e,t){return t===`all`?!0:t===`claude`?e.surface===`claude`||e.surface===`claude-desktop`:t===`grok`?e.surface===`grok`:e.surface===void 0}function pl(e){return`ocx.logs.list.v1:${e}`}function ml(e){if(!Array.isArray(e))return null;for(let t of e)if(!t||typeof t!=`object`||typeof t.timestamp!=`number`||typeof t.model!=`string`||typeof t.provider!=`string`||typeof t.status!=`number`||typeof t.durationMs!=`number`)return null;return e}function hl(e){return e===`cursor`||e.startsWith(`cursor-`)}function gl(e,t){if(!e.usage)return;let n=yl(e),r=[`${t(`logs.tokens.input`)}=${e.usage.inputTokens}`,`${t(`logs.tokens.output`)}=${e.usage.outputTokens}`];return n.read!==void 0&&r.push(`${t(`logs.tokens.cacheRead`)}=${n.read}`),n.write!==void 0&&r.push(`${t(`logs.tokens.cacheWrite`)}=${n.write}`),typeof e.usage.contextTotalTokens==`number`&&r.push(`${t(`logs.tokens.contextTotal`)}=${e.usage.contextTotalTokens}`),typeof e.usage.reasoningOutputTokens==`number`&&r.push(`${t(`logs.tokens.reasoning`)}=${e.usage.reasoningOutputTokens}`),e.usageStatus===`estimated`&&r.push(t(`logs.tokens.estimatedNote`)),e.usageStatus===`estimated`&&n.read===void 0&&n.write===void 0&&r.push(t(hl(e.provider)?`logs.tokens.noCacheCursorNote`:`logs.tokens.noCacheNote`)),r.join(` · `)}function _l(e){if(!e.usage)return typeof e.totalTokens==`number`?e.totalTokens:void 0;let t=e.usage.inputTokens+e.usage.outputTokens,n=e.usage.totalTokens??e.totalTokens;return typeof n==`number`?Math.max(n,t):t}function vl(e){let t=_l(e),n=e.usage?.contextTotalTokens;return typeof n==`number`?Math.max(t??0,n)||void 0:t}function yl(e){let t=e.usage;if(!t)return{};let n=typeof t.cacheCreationInputTokens==`number`?t.cacheCreationInputTokens:void 0;return{read:typeof t.cacheReadInputTokens==`number`?t.cacheReadInputTokens:typeof t.cachedInputTokens==`number`&&n!==void 0?Math.max(0,t.cachedInputTokens-n):t.cachedInputTokens,write:n}}function bl(e){let t=e.requestedEffort?.replace(/\s*->\s*/g,` → `),n=e.effectiveEffort;return t?!n||t===n||t.split(` → `).at(-1)===n?t:`${t} → ${n}`:n??`-`}function xl(e){if(!(!e.reasoningWireField||e.reasoningWireValue===void 0))return`${e.reasoningWireField}=${e.reasoningWireValue}`}function Sl(e,t){if(!e||e.kind===`unavailable`||!Number.isFinite(e.value)||e.value<=0)return`—`;let n=e.value>=100?0:1,r=new Intl.NumberFormat(t,{minimumFractionDigits:n,maximumFractionDigits:n}).format(e.value);return`${e.estimated?`~`:``}${r}`}function Cl(e,t){if(!e||e.kind===`unavailable`||!Number.isFinite(e.estimate.cost.total)||e.estimate.cost.total<0)return`—`;let n=e.estimate.cost.total;return`~$${new Intl.NumberFormat(t,{minimumFractionDigits:4,maximumFractionDigits:4}).format(n)}`}function wl(e,t){return!Number.isFinite(e)||e<0?`—`:`~$${new Intl.NumberFormat(t,{minimumFractionDigits:4,maximumFractionDigits:4}).format(e)}`}var Tl=3,El={usage_missing:`logs.detail.reason.usage_missing`,usage_unsupported:`logs.detail.reason.usage_unsupported`,output_missing:`logs.detail.reason.output_missing`,invalid_duration:`logs.detail.reason.invalid_duration`,price_unmatched:`logs.detail.reason.price_unmatched`,invalid_cache_breakdown:`logs.detail.reason.invalid_cache_breakdown`,invalid_usage:`logs.detail.reason.invalid_usage`,combo_attempt_unavailable:`logs.detail.reason.combo_attempt_unavailable`},Dl={usage_estimated:`logs.detail.estimate.usage_estimated`,cache_detail_missing:`logs.detail.estimate.cache_detail_missing`,expected_price_overlay:`logs.detail.estimate.expected_price_overlay`};function Ol(e){return El[e]}function kl(e){return Dl[e]}function Al(e){return e===`verified`?`logs.detail.verification.verified`:`logs.detail.verification.derived`}function jl(e){return e>=200&&e<300?`var(--green)`:e>=400?`var(--red)`:`var(--amber)`}function Ml(e,t,n){let r=n?{timeZone:n}:void 0;try{return{date:new Date(e).toLocaleDateString(t,r),time:new Date(e).toLocaleTimeString(t,r)}}catch{return{date:new Date(e).toLocaleDateString(t),time:new Date(e).toLocaleTimeString(t)}}}function Nl(e,t,n){let{date:r,time:i}=Ml(e,t,n);return`${r} ${i}`}function Pl(e){return[`model=${e.model}`,e.resolvedModel?`resolved=${e.resolvedModel}`:void 0,e.requestedServiceTier?`requestedTier=${e.requestedServiceTier}`:void 0,e.configuredServiceTier?`configuredTier=${e.configuredServiceTier}`:void 0,e.responseServiceTier?`responseTier=${e.responseServiceTier}`:void 0,e.modelSupportsServiceTier===void 0?void 0:`supportsTier=${e.modelSupportsServiceTier}`].filter(Boolean).join(` · `)}function Fl(e){let t=0,n=0,r=0,i=0;for(let a of e){let e=_l(a);if(e!==void 0&&(t+=e),a.usageStatus===`unsupported`){i+=1;continue}let o=a.displayMetrics?.cost,s=o?.kind===`value`?o.estimate.cost.total:void 0;if(s!==void 0&&Number.isFinite(s)&&s>=0){n+=s;continue}r+=1}return{requests:e.length,totalTokens:t,estimatedCostUsd:n,unpricedRequests:r,unmeteredRequests:i}}function Il({apiBase:e}){let{t,locale:n}=ze(),r=pl(e),i=ml(Z(r)),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(`all`),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(),h=(0,_.useRef)(null),g=Pe.find(e=>e.code===n)?.htmlLang,[v,y]=(0,_.useState)();(0,_.useEffect)(()=>{let t=new AbortController,n=!1;return fetch(`${e}/api/settings`,{signal:t.signal}).then(e=>e.ok?e.json():null).then(e=>{n||!e||typeof e.timeZone==`string`&&e.timeZone.trim()&&y(e.timeZone.trim())}).catch(()=>{}),()=>{n=!0,t.abort()}},[e]);let[b,x]=(0,_.useState)(cl),[S,C]=(0,_.useState)(()=>cl()===`debug`);(0,_.useEffect)(()=>{let e=()=>x(cl());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,_.useEffect)(()=>{b===`debug`&&C(!0)},[b]);let w=ll,T=(0,_.useCallback)(async t=>{let n=await fetch(`${e}/api/logs?limit=2000`,{signal:t});if(!n.ok)throw Error(`${n.status} ${n.statusText}`.trim());let i=await n.json(),a=Array.isArray(i)?i:i.logs??[];return Q(r,a),a},[e,r]),E=Is(r,[e],T,{isEmpty:e=>e.length===0,enabled:b===`logs`,pollMs:a?2e3:void 0,initialData:i??void 0}),D=E.state,O=D.data??i??[],k=E.refresh,A=!E.refreshing&&D.showError,j=!E.refreshing&&!D.showError&&D.data!==void 0,[M,N]=(0,_.useState)({error:null,count:0});j&&M.count!==0?N({error:null,count:0}):A&&M.error!==D.error&&N(e=>({error:D.error,count:e.count+1}));let P=M.count>=Tl||!a&&A,F=s?Xc(s.status,n):null,I=d.trim();(0,_.useEffect)(()=>{let e=!1;if(!I){m(void 0);return}return Gc(I).then(t=>{e||m(t)}),()=>{e=!0}},[I]);let L=O.filter(e=>fl(e,l)&&(!I||Kc(e.conversationId,I,p))),R=I?Fl(L):null,B=Vc({count:L.length,getScrollElement:()=>h.current,estimateSize:()=>44,overscan:15}),V=B.getVirtualItems(),H=V.length>0?V[0].start:0,U=V.length>0?B.getTotalSize()-V[V.length-1].end:0;return(0,z.jsxs)(`div`,{className:`logs-page`,children:[(0,z.jsxs)(`div`,{className:`page-head`,children:[(0,z.jsx)(`h2`,{children:t(`nav.logs`)}),b===`logs`&&(0,z.jsxs)(`label`,{className:`muted text-control logs-auto-refresh`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked)}),t(`logs.autoRefresh`)]})]}),(0,z.jsxs)(`div`,{className:`page-tabs`,role:`tablist`,"aria-label":t(`nav.logs`),children:[(0,z.jsx)(`button`,{type:`button`,role:`tab`,id:`logs-tab-logs`,"aria-selected":b===`logs`,"aria-controls":`logs-panel-logs`,tabIndex:b===`logs`?0:-1,className:`page-tab${b===`logs`?` page-tab--active`:``}`,onClick:()=>w(`logs`),onKeyDown:ul,children:t(`logs.tabLogs`)}),(0,z.jsx)(`button`,{type:`button`,role:`tab`,id:`logs-tab-debug`,"aria-selected":b===`debug`,"aria-controls":`logs-panel-debug`,tabIndex:b===`debug`?0:-1,className:`page-tab${b===`debug`?` page-tab--active`:``}`,onClick:()=>w(`debug`),onKeyDown:ul,children:t(`logs.tabDebug`)})]}),S&&(0,z.jsx)(`div`,{role:`tabpanel`,id:`logs-panel-debug`,"aria-labelledby":`logs-tab-debug`,hidden:b!==`debug`,children:(0,z.jsx)(sl,{apiBase:e,embedded:!0,active:b===`debug`})}),(0,z.jsxs)(`div`,{role:`tabpanel`,id:`logs-panel-logs`,"aria-labelledby":`logs-tab-logs`,hidden:b!==`logs`,children:[(0,z.jsx)(`p`,{className:`page-sub`,children:t(`logs.subtitle`)}),(0,z.jsxs)(`div`,{className:`logs-toolbar`,children:[(0,z.jsx)(`span`,{className:`muted text-control`,children:t(`logs.filter.surface.label`)}),(0,z.jsx)(`div`,{className:`segmented logs-segmented`,role:`radiogroup`,"aria-label":t(`logs.filter.surface.label`),children:[`all`,`claude`,`codex`,`grok`].map(e=>(0,z.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":l===e,className:`btn btn-sm${l===e?` btn-primary`:` btn-ghost`}`,style:{background:l===e?void 0:`transparent`,color:l===e?void 0:`var(--muted)`},onClick:()=>u(e),children:t(`logs.filter.surface.${e}`)},e))}),(0,z.jsxs)(`label`,{className:`muted text-control logs-filter-field`,children:[t(`logs.filter.conversation.label`),(0,z.jsx)(`input`,{type:`search`,className:`input mono`,value:d,onChange:e=>f(e.target.value),placeholder:t(`logs.filter.conversation.placeholder`),"aria-label":t(`logs.filter.conversation.label`)})]}),I&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>f(``),children:t(`logs.filter.conversation.clear`)})]}),R&&(0,z.jsx)(`div`,{className:`logs-conversation-totals`,children:(0,z.jsxs)(X,{tone:`ok`,children:[t(`logs.conversation.totals`,{requests:R.requests,tokens:Nt(R.totalTokens,g??n),cost:wl(R.estimatedCostUsd,g)}),` `,(0,z.jsxs)(`span`,{className:`muted`,children:[t(`logs.conversation.scope`),R.unpricedRequests+R.unmeteredRequests>0?` ${t(`logs.conversation.excluded`,{unpriced:R.unpricedRequests,unmetered:R.unmeteredRequests})}`:``]})]})}),D.kind===`failed-cold`&&(0,z.jsxs)(X,{tone:`err`,children:[D.error instanceof Error?`${t(`logs.loadError`)} ${D.error.message}`:t(`logs.loadError`),` `,(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>k({forceLoading:!0}),disabled:D.refreshing,children:t(`common.retry`)})]}),P&&O.length>0&&(0,z.jsxs)(X,{tone:`err`,children:[t(`logs.loadError`),` `,(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>k({forceLoading:!0}),disabled:E.refreshing,children:t(`common.retry`)})]}),D.kind===`failed-cold`?null:D.showSkeleton&&O.length===0?(0,z.jsx)(Rs,{label:t(`common.loading`),rows:6}):L.length===0?(0,z.jsx)(it,{title:t(`logs.noRequests`)}):(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(`div`,{ref:h,className:`tbl-wrap logs-table-wrap`,children:(0,z.jsxs)(`table`,{className:`tbl logs-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:t(`logs.col.time`)}),(0,z.jsx)(`th`,{className:`num log-col-tokens`,children:t(`logs.col.tokens`)}),(0,z.jsx)(`th`,{className:`num log-col-rate`,title:t(`logs.metric.tokPerSecTitle`),children:t(`logs.col.tokPerSec`)}),(0,z.jsx)(`th`,{className:`num log-col-cost`,title:t(`logs.metric.estimatedCostTitle`),children:t(`logs.col.estimatedCost`)}),(0,z.jsx)(`th`,{className:`log-col-model`,children:t(`logs.col.model`)}),(0,z.jsx)(`th`,{children:t(`logs.col.effort`)}),(0,z.jsx)(`th`,{children:t(`logs.col.provider`)}),(0,z.jsx)(`th`,{children:t(`logs.col.status`)}),(0,z.jsx)(`th`,{children:t(`logs.col.request`)}),(0,z.jsx)(`th`,{className:`num log-col-duration`,children:t(`logs.col.duration`)})]})}),(0,z.jsxs)(`tbody`,{children:[H>0&&(0,z.jsx)(`tr`,{children:(0,z.jsx)(`td`,{colSpan:10,className:`logs-virtual-spacer`,style:{height:H}})}),V.map(e=>{let r=L[L.length-1-e.index],i=xl(r),a=Ml(r.timestamp,g,v);return(0,z.jsxs)(`tr`,{"data-index":e.index,ref:B.measureElement,children:[(0,z.jsx)(`td`,{className:`muted mono log-col-time`,children:(0,z.jsxs)(`span`,{className:`logs-stack-start`,children:[(0,z.jsx)(`span`,{children:a.date}),(0,z.jsx)(`span`,{children:a.time})]})}),(0,z.jsx)(`td`,{className:`num mono log-col-tokens`,title:gl(r,t),children:(()=>{let e=vl(r),{read:i,write:a}=yl(r);return e===void 0?(0,z.jsx)(`span`,{className:`muted`,children:t(`logs.tokens.${r.usageStatus??`unreported`}`)}):(0,z.jsxs)(`span`,{className:`logs-stack-end`,children:[(0,z.jsxs)(`span`,{children:[r.usageStatus===`estimated`?`~`:``,Nt(e,n)]}),i!==void 0&&i>0&&(0,z.jsxs)(`span`,{className:`muted text-caption leading-tight`,children:[`c `,Nt(i,n)]}),a!==void 0&&a>0&&(0,z.jsxs)(`span`,{className:`muted text-caption leading-tight`,children:[`w `,Nt(a,n)]}),r.usageStatus===`estimated`&&i===void 0&&a===void 0&&(0,z.jsx)(`span`,{className:`muted text-caption leading-tight`,children:t(hl(r.provider)?`logs.tokens.noCacheCursor`:`logs.tokens.noCache`)})]})})()}),(0,z.jsx)(`td`,{className:`num mono log-col-rate`,children:Sl(r.displayMetrics?.tokPerSecond,g)}),(0,z.jsx)(`td`,{className:`num mono log-col-cost`,children:Cl(r.displayMetrics?.cost,g)}),(0,z.jsx)(`td`,{className:`mono log-col-model`,title:Pl(r),children:(0,z.jsxs)(`span`,{className:`logs-model-cell`,children:[(0,z.jsx)(`span`,{children:ds(r.resolvedModel??r.model)}),(r.surface===`claude`||r.surface===`claude-desktop`)&&(0,z.jsx)(`span`,{className:`badge badge-accent`,children:t(`logs.badge.claude`)}),r.surface===`grok`&&(0,z.jsx)(`span`,{className:`badge badge-accent`,children:t(`logs.badge.grok`)}),dl(r)&&(0,z.jsx)(`span`,{className:`badge badge-amber`,children:dl(r)})]})}),(0,z.jsx)(`td`,{className:`mono log-reasoning-cell`,title:i,children:(0,z.jsxs)(`span`,{className:`logs-stack-start`,children:[(0,z.jsx)(`span`,{children:bl(r)}),i&&(0,z.jsx)(`span`,{className:`muted text-caption leading-tight`,children:i})]})}),(0,z.jsx)(`td`,{className:`muted`,children:r.provider}),(0,z.jsx)(`td`,{children:(0,z.jsxs)(`span`,{className:`log-status-cell`,children:[(0,z.jsx)(`span`,{className:`mono font-semibold`,style:{color:jl(r.status)},children:r.status}),(0,z.jsx)(`button`,{type:`button`,className:`log-detail-btn`,onClick:()=>c(r),"aria-label":`${t(`logs.details`)}: ${r.requestId??r.status}`,children:t(`logs.details`)})]})}),(0,z.jsx)(`td`,{className:`muted mono`,children:(0,z.jsx)(`span`,{className:`log-reqid`,title:r.requestId,children:r.requestId??`-`})}),(0,z.jsxs)(`td`,{className:`num log-col-duration`,children:[r.durationMs,`ms`]})]},r.requestId??`${r.timestamp}-${e.index}`)}),U>0&&(0,z.jsx)(`tr`,{children:(0,z.jsx)(`td`,{colSpan:10,className:`logs-virtual-spacer`,style:{height:U}})})]})]})})}),s&&(0,z.jsx)(Rl,{detail:s,detailInfo:F,localeCode:n,localeTag:g,serverTimeZone:v,t,onClose:()=>c(null),onFilterConversation:e=>{f(e),c(null)}})]})]})}function Ll(e){let t=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let n=t.current;n&&(e&&!n.open?n.showModal():!e&&n.open&&n.close())},[e]),t}function Rl({detail:e,detailInfo:t,localeCode:n,localeTag:r,serverTimeZone:i,t:a,onClose:o,onFilterConversation:s}){let c=Ll(!0),[l,u]=(0,_.useState)(!1),d=yl(e),f=e.displayMetrics?.cost,p=xl(e),m=async()=>{if(e.requestId)try{await navigator.clipboard.writeText(e.requestId),u(!0),window.setTimeout(()=>u(!1),1200)}catch{}};return(0,z.jsx)(`dialog`,{ref:c,className:`modal-overlay`,"aria-labelledby":`log-detail-title`,onCancel:e=>{e.preventDefault(),o()},children:(0,z.jsxs)(`div`,{className:`modal-card log-detail-card`,children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsxs)(`h3`,{id:`log-detail-title`,children:[(0,z.jsx)(`span`,{className:`mono`,style:{color:jl(e.status)},children:e.status}),t&&(0,z.jsx)(`span`,{className:`logs-detail-info`,children:t.label})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:o,"aria-label":a(`common.cancel`),children:(0,z.jsx)(ae,{})})]}),t&&(0,z.jsx)(`p`,{className:`modal-desc`,children:t.description}),(0,z.jsxs)(`section`,{className:`log-detail-section`,"aria-labelledby":`log-detail-basic`,children:[(0,z.jsx)(`h4`,{id:`log-detail-basic`,className:`log-detail-section-title`,children:a(`logs.detail.section.basic`)}),(0,z.jsxs)(`div`,{className:`log-detail-grid`,children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.time`)}),(0,z.jsx)(`span`,{className:`mono`,children:Nl(e.timestamp,r,i)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.request`)}),(0,z.jsxs)(`span`,{className:`log-detail-request-row`,children:[(0,z.jsx)(`span`,{className:`mono log-detail-break`,children:e.requestId??`—`}),e.requestId&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void m(),children:a(l?`logs.detail.copied`:`logs.detail.copyRequestId`)})]}),e.conversationId&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.detail.conversation`)}),(0,z.jsxs)(`span`,{className:`log-detail-request-row`,children:[(0,z.jsx)(`span`,{className:`mono log-detail-break`,children:e.conversationId}),s&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>s(e.conversationId),children:a(`logs.filter.conversation.apply`)})]})]}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.model`)}),(0,z.jsx)(`span`,{className:`mono`,children:ds(e.resolvedModel??e.model)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.provider`)}),(0,z.jsx)(`span`,{children:e.provider}),(e.requestedEffort||e.effectiveEffort)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.effort`)}),(0,z.jsxs)(`span`,{className:`mono`,children:[bl(e),p?` (${p})`:``]})]}),e.errorCode&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.error`)}),(0,z.jsx)(`span`,{className:`mono`,children:e.errorCode})]}),e.upstreamError&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.upstreamReason`)}),(0,z.jsx)(`span`,{className:`mono log-detail-break`,children:e.upstreamError})]})]})]}),(0,z.jsxs)(`section`,{className:`log-detail-section`,"aria-labelledby":`log-detail-performance`,children:[(0,z.jsx)(`h4`,{id:`log-detail-performance`,className:`log-detail-section-title`,children:a(`logs.detail.section.performance`)}),(0,z.jsxs)(`div`,{className:`log-detail-grid`,children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.duration`)}),(0,z.jsxs)(`span`,{className:`mono`,children:[e.durationMs,`ms`]}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.col.tokPerSec`)}),(0,z.jsx)(`span`,{className:`mono`,children:Sl(e.displayMetrics?.tokPerSecond,r)}),e.firstOutputMs!==void 0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.detail.ttft`)}),(0,z.jsxs)(`span`,{className:`mono`,children:[e.firstOutputMs,`ms`]})]})]}),e.displayMetrics?.tokPerSecond.kind===`unavailable`&&(0,z.jsx)(`p`,{className:`log-detail-notes-line muted`,children:a(Ol(e.displayMetrics.tokPerSecond.reason))})]}),(0,z.jsxs)(`section`,{className:`log-detail-section`,"aria-labelledby":`log-detail-cost`,children:[(0,z.jsx)(`h4`,{id:`log-detail-cost`,className:`log-detail-section-title`,children:a(`logs.detail.section.cost`)}),(0,z.jsx)(`p`,{className:`log-detail-notes-line muted`,children:a(`usage.cost.disclaimer`)}),f?.kind===`value`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`log-detail-grid`,children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.detail.costTotal`)}),(0,z.jsx)(`span`,{className:`mono`,children:wl(f.estimate.cost.total,r)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.input`)}),(0,z.jsx)(`span`,{className:`mono`,children:wl(f.estimate.cost.input,r)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.cacheRead`)}),(0,z.jsx)(`span`,{className:`mono`,children:wl(f.estimate.cost.cacheRead,r)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.cacheWrite`)}),(0,z.jsx)(`span`,{className:`mono`,children:wl(f.estimate.cost.cacheWrite,r)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.output`)}),(0,z.jsx)(`span`,{className:`mono`,children:wl(f.estimate.cost.output,r)}),f.estimate.price&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.detail.matchedKey`)}),(0,z.jsxs)(`span`,{className:`mono log-detail-break`,children:[f.estimate.price.jawcodeProvider??f.estimate.price.provider,`/`,f.estimate.price.modelId]}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.detail.priceSource`)}),(0,z.jsxs)(`span`,{children:[a(`logs.detail.source.${f.estimate.price.source}`),` · `,a(Al(f.estimate.price.status))]})]})]}),f.estimateReasons.length>0&&(0,z.jsx)(`ul`,{className:`log-detail-notes`,children:f.estimateReasons.map(e=>(0,z.jsx)(`li`,{children:a(kl(e))},e))})]}):(0,z.jsxs)(`div`,{className:`log-detail-grid`,children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.detail.costTotal`)}),(0,z.jsx)(`span`,{className:`mono`,children:`—`}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.detail.unavailableReason`)}),(0,z.jsx)(`span`,{children:f?.kind===`unavailable`?a(Ol(f.reason)):a(`logs.detail.reason.usage_missing`)})]})]}),e.attempts?.length?(0,z.jsxs)(`section`,{className:`log-detail-section`,"aria-labelledby":`log-detail-attempts`,children:[(0,z.jsx)(`h4`,{id:`log-detail-attempts`,className:`log-detail-section-title`,children:a(`logs.detail.section.attempts`)}),(0,z.jsx)(`p`,{className:`log-detail-notes-line muted`,children:a(`logs.detail.attempt.e2eNote`)}),(0,z.jsx)(`div`,{className:`log-detail-attempts-wrap`,children:(0,z.jsxs)(`table`,{className:`tbl log-detail-attempts`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{className:`num`,children:`#`}),(0,z.jsx)(`th`,{children:a(`logs.detail.attempt.target`)}),(0,z.jsx)(`th`,{className:`num`,children:a(`logs.col.duration`)}),(0,z.jsx)(`th`,{className:`num`,children:a(`logs.col.tokPerSec`)}),(0,z.jsx)(`th`,{className:`num`,children:a(`logs.col.estimatedCost`)}),(0,z.jsx)(`th`,{children:a(`logs.detail.attempt.reason`)})]})}),(0,z.jsx)(`tbody`,{children:e.attempts.toSorted((e,t)=>e.ordinal-t.ordinal).map(e=>{let t=e.displayMetrics?.cost,n=xl(e),i=t?.kind===`value`?t.estimate.price:void 0,o=e.errorCode??(e.recoveryKinds.length?e.recoveryKinds.join(`, `):void 0)??(t?.kind===`unavailable`?a(Ol(t.reason)):a(`logs.detail.attempt.completed`));return(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`num mono`,children:e.ordinal}),(0,z.jsxs)(`td`,{children:[(0,z.jsx)(`span`,{children:e.provider}),(0,z.jsx)(`br`,{}),(0,z.jsx)(`span`,{className:`mono muted log-detail-break`,children:e.model}),(e.requestedEffort||e.effectiveEffort)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`br`,{}),(0,z.jsxs)(`span`,{className:`mono muted text-caption log-detail-break`,children:[bl(e),n?` (${n})`:``]})]}),i&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`br`,{}),(0,z.jsxs)(`span`,{className:`muted text-caption log-detail-break`,children:[i.jawcodeProvider??i.provider,`/`,i.modelId,` · `,a(`logs.detail.source.${i.source}`),` · `,a(Al(i.status))]})]})]}),(0,z.jsxs)(`td`,{className:`num mono`,children:[e.durationMs,`ms`]}),(0,z.jsx)(`td`,{className:`num mono`,children:Sl(e.displayMetrics?.tokPerSecond,r)}),(0,z.jsx)(`td`,{className:`num mono`,children:Cl(t,r)}),(0,z.jsx)(`td`,{className:`log-detail-break`,children:o})]},`${e.ordinal}-${e.provider}-${e.model}`)})})]})})]}):null,(0,z.jsxs)(`section`,{className:`log-detail-section`,"aria-labelledby":`log-detail-usage`,children:[(0,z.jsx)(`h4`,{id:`log-detail-usage`,className:`log-detail-section-title`,children:a(`logs.detail.section.usage`)}),(0,z.jsxs)(`div`,{className:`log-detail-grid`,children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.input`)}),(0,z.jsx)(`span`,{className:`mono`,children:e.usage?Nt(e.usage.inputTokens,n):`—`}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.output`)}),(0,z.jsx)(`span`,{className:`mono`,children:e.usage?Nt(e.usage.outputTokens,n):`—`}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.cacheRead`)}),(0,z.jsx)(`span`,{className:`mono`,children:d.read===void 0?`—`:Nt(d.read,n)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.cacheWrite`)}),(0,z.jsx)(`span`,{className:`mono`,children:d.write===void 0?`—`:Nt(d.write,n)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.reasoning`)}),(0,z.jsx)(`span`,{className:`mono`,children:e.usage?.reasoningOutputTokens===void 0?`—`:Nt(e.usage.reasoningOutputTokens,n)}),(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.detail.totalTokens`)}),(0,z.jsx)(`span`,{className:`mono`,children:vl(e)===void 0?`—`:Nt(vl(e),n)}),e.usage?.contextTotalTokens!==void 0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`muted`,children:a(`logs.tokens.contextTotal`)}),(0,z.jsx)(`span`,{className:`mono`,children:Nt(e.usage.contextTotalTokens,n)})]})]}),e.usageStatus===`estimated`&&(0,z.jsx)(`p`,{className:`log-detail-notes-line muted`,children:a(`logs.tokens.estimatedNote`)})]}),(0,z.jsxs)(`details`,{className:`log-detail-raw`,children:[(0,z.jsx)(`summary`,{children:a(`logs.detailRaw`)}),(0,z.jsx)(`pre`,{className:`log-detail-json`,children:JSON.stringify(e,null,2)})]})]})})}function zl(e){return`${Math.round(e*100)}%`}function Bl(e,t){let n=`${t}/${e}`,r=0;for(let e=0;e<n.length;e++)r=r*31+n.charCodeAt(e)>>>0;return`hsl(${r%360} 55% 55%)`}function Vl(e){let t=new Map(e.map(e=>[e.date,e])),n=[],r=new Date;r.setHours(0,0,0,0),r.setDate(r.getDate()-6);for(let e=0;e<7;e++){let e=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,`0`)}-${String(r.getDate()).padStart(2,`0`)}`,i=t.get(e);n.push({date:e,requests:i?.requests??0,measuredRequests:i?.measuredRequests??0,reportedRequests:i?.reportedRequests??0,totalTokens:i?.totalTokens??0,models:i?.models??[]}),r.setDate(r.getDate()+1)}return n}function Hl(e){let t=e.filter(e=>e>0).sort((e,t)=>e-t);if(t.length===0)return[0,0,0,0];let n=e=>t[Math.min(t.length-1,Math.floor(e*t.length))];return[n(.25),n(.5),n(.75),n(.95)]}function Ul(e,t){return e<=0?0:e<=t[0]?1:e<=t[1]?2:e<=t[2]?3:4}function Wl(e){let t=Hl(e.map(e=>e.totalTokens)),n=new Map(e.map(e=>[e.date,e])),r=new Date;r.setHours(0,0,0,0);let i=new Date(r);i.setDate(i.getDate()-364),i.setDate(i.getDate()-i.getDay());let a=[],o=[],s=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],c=-4,l=-1,u=[],d=new Date(i);for(;d<=r;){let e=`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,`0`)}-${String(d.getDate()).padStart(2,`0`)}`,r=d.getMonth();d.getDay()===0&&r!==l&&a.length-c>=4&&(o.push({label:s[r],col:a.length}),c=a.length,l=r);let i=n.get(e);u.push({date:e,requests:i?.requests??0,totalTokens:i?.totalTokens??0,level:i?Ul(i.totalTokens,t):0,dayOfWeek:d.getDay()}),d.getDay()===6&&(a.push(u),u=[]),d.setDate(d.getDate()+1)}if(u.length>0){for(;u.length<7;)u.push({date:``,requests:0,totalTokens:0,level:0,dayOfWeek:u.length});a.push(u)}return{weeks:a,months:o,buckets:t}}function Gl({surface:e,range:t,onSurface:n,onRange:r,t:i}){return(0,z.jsxs)(`div`,{className:`usage-filters`,children:[(0,z.jsx)(`div`,{className:`usage-segmented`,role:`group`,"aria-label":i(`logs.filter.surface.label`),children:[`all`,`codex`,`claude`,`grok`].map(t=>{let r=i(`logs.filter.surface.${t}`);return(0,z.jsxs)(`button`,{type:`button`,className:`usage-segmented-btn usage-source-btn${e===t?` active`:``}`,"aria-label":r,"aria-pressed":e===t,onClick:()=>n(t),children:[t===`codex`&&(0,z.jsx)(`img`,{className:`usage-source-mark`,src:`/provider-icons/openai.svg`,alt:``,"aria-hidden":`true`}),t===`claude`&&(0,z.jsx)(`img`,{className:`usage-source-mark`,src:`/provider-icons/claude.svg`,alt:``,"aria-hidden":`true`}),t===`grok`&&(0,z.jsx)(`img`,{className:`usage-source-mark`,src:`/provider-icons/grok.svg`,alt:``,"aria-hidden":`true`}),(0,z.jsx)(`span`,{className:t===`all`?`usage-source-label`:`usage-source-label usage-source-label-collapsible`,children:r})]},t)})}),(0,z.jsx)(`div`,{className:`usage-segmented`,role:`group`,"aria-label":i(`usage.title`),children:[`all`,`30d`,`7d`].map(e=>{let n=i(e===`all`?`usage.range.available`:`usage.range.${e}`);return(0,z.jsx)(`button`,{type:`button`,className:`usage-segmented-btn${t===e?` active`:``}`,"aria-label":n,"aria-pressed":t===e,onClick:()=>r(e),children:n},e)})})]})}function Kl({summary:e,activeDays:t,locale:n,t:r}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`usage-cards usage-cards-3x2`,role:`group`,"aria-label":r(`usage.title`),children:[(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:r(`usage.card.requests`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:e.requests})]}),(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:r(`usage.card.measured`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:e.measuredRequests})]}),(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:r(`usage.card.totalTokens`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:Nt(e.totalTokens,n)})]}),(0,z.jsxs)(`div`,{className:`stat`,title:r(`usage.card.cachedTokensHint`),children:[(0,z.jsx)(`div`,{className:`muted`,children:r(`usage.card.cachedTokens`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:Nt(e.cacheReadInputTokens??e.cachedInputTokens,n)}),(e.cacheCreationInputTokens??0)>0&&(0,z.jsxs)(`div`,{className:`muted text-caption`,children:[r(`usage.card.cacheWriteTokens`),`: `,Nt(e.cacheCreationInputTokens??0,n)]})]}),(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:r(`usage.card.coverage`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:zl(e.coverageRatio)})]}),(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:r(`usage.card.activeDays`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:t})]})]}),e.estimatedCostUsd!==void 0&&(0,z.jsxs)(`div`,{className:`usage-cost-row`,role:`note`,children:[(0,z.jsx)(`span`,{className:`muted`,children:r(`usage.cost.total`)}),(0,z.jsx)(`span`,{className:`stat-value mono usage-cost-value`,children:Fa(e.estimatedCostUsd,n)}),(0,z.jsx)(`span`,{className:`muted text-caption`,children:r(`usage.cost.disclaimer`)}),(e.unpricedRequests??0)+(e.unmeteredRequests??0)>0&&(0,z.jsx)(`span`,{className:`muted text-caption`,children:r(`usage.cost.unpricedNote`).replace(`{count}`,String((e.unpricedRequests??0)+(e.unmeteredRequests??0)))})]})]})}function ql({weekBars:e,locale:t,t:n}){let[r,i]=(0,_.useState)(null),a=Math.max(1,...e.map(e=>e.totalTokens));return(0,z.jsx)(`div`,{className:`daybars`,role:`img`,"aria-label":n(`usage.section.heatmap`),children:e.map(e=>{let n=Math.round(e.totalTokens/a*100),o=e.date.slice(5);return(0,z.jsxs)(`div`,{className:`daybar`,onMouseEnter:()=>i(e.date),onMouseLeave:()=>i(t=>t===e.date?null:t),children:[(0,z.jsx)(`div`,{className:`daybar-track`,children:(0,z.jsxs)(`div`,{className:`daybar-stack`,style:{"--daybar-scale":String(Math.max(0,Math.min(1,n/100)))},children:[e.models.map(e=>(0,z.jsx)(`div`,{className:`daybar-seg`,style:{flexGrow:e.totalTokens,background:Bl(e.model,e.provider)}},`${e.provider}/${e.model}`)),e.models.length===0&&e.totalTokens>0&&(0,z.jsx)(`div`,{className:`daybar-seg`,style:{flexGrow:1,background:`var(--green)`}})]})}),r===e.date&&e.totalTokens>0&&(0,z.jsxs)(`div`,{className:`daybar-tip`,role:`tooltip`,children:[(0,z.jsx)(`div`,{className:`daybar-tip-date`,children:e.date}),e.models.slice(0,8).map(e=>(0,z.jsxs)(`div`,{className:`daybar-tip-row`,children:[(0,z.jsx)(`span`,{className:`daybar-tip-swatch`,style:{background:Bl(e.model,e.provider)}}),(0,z.jsx)(`span`,{className:`daybar-tip-name`,children:ds(e.model)}),(0,z.jsx)(`span`,{className:`daybar-tip-val`,children:Nt(e.totalTokens,t)})]},`${e.provider}/${e.model}`))]}),(0,z.jsx)(`span`,{className:`daybar-count`,children:Nt(e.totalTokens,t)}),(0,z.jsx)(`span`,{className:`daybar-label muted`,children:o})]},e.date)})})}function Jl({range:e,heatmap:t,weekBars:n,locale:r,t:i}){let a=(0,_.useRef)(null),[o,s]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{e.scrollLeft=e.scrollWidth};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,e]),(0,z.jsxs)(`section`,{className:`panel`,style:{marginTop:16},"aria-labelledby":`usage-heatmap-title`,children:[(0,z.jsx)(`h3`,{id:`usage-heatmap-title`,className:`panel-title`,children:i(`usage.section.heatmap`)}),e===`7d`?(0,z.jsx)(ql,{weekBars:n,locale:r,t:i}):(0,z.jsxs)(`div`,{className:`heatmap`,ref:a,role:`img`,"aria-labelledby":`usage-heatmap-title`,children:[(0,z.jsxs)(`div`,{className:`heatmap-months`,style:{gridTemplateColumns:`28px repeat(${t.weeks.length}, calc(var(--hm-cell) + var(--hm-gap)))`},children:[(0,z.jsx)(`span`,{className:`heatmap-day-spacer`}),t.months.map(e=>(0,z.jsx)(`span`,{className:`heatmap-month`,style:{gridColumn:e.col+2},children:e.label},`${e.label}-${e.col}`))]}),(0,z.jsxs)(`div`,{className:`heatmap-body`,children:[(0,z.jsxs)(`div`,{className:`heatmap-days`,children:[(0,z.jsx)(`span`,{}),(0,z.jsx)(`span`,{children:i(`usage.dayMon`)}),(0,z.jsx)(`span`,{}),(0,z.jsx)(`span`,{children:i(`usage.dayWed`)}),(0,z.jsx)(`span`,{}),(0,z.jsx)(`span`,{children:i(`usage.dayFri`)}),(0,z.jsx)(`span`,{})]}),(0,z.jsx)(`div`,{className:`heatmap-grid`,style:{gridTemplateColumns:`repeat(${t.weeks.length}, var(--hm-cell))`},children:t.weeks.map((e,t)=>(0,z.jsx)(`div`,{className:`heatmap-week`,children:e.map((e,n)=>(0,z.jsx)(`div`,{className:`heatmap-cell heatmap-cell-${e.level}`,onMouseEnter:r=>{if(!e.date)return;let i=r.currentTarget.getBoundingClientRect();s({weekIndex:t,dayIndex:n,x:i.left+i.width/2,y:i.top})},onMouseLeave:()=>s(e=>e?.weekIndex===t&&e.dayIndex===n?null:e)},e.date||`pad-${t}-${n}`))},e[0]?.date||`week-${t}`))})]}),o&&(()=>{let e=t.weeks[o.weekIndex]?.[o.dayIndex];return e?.date?(0,z.jsxs)(`div`,{className:`heatmap-tip`,role:`tooltip`,style:{left:o.x,top:o.y},children:[(0,z.jsx)(`div`,{className:`heatmap-tip-date`,children:e.date}),(0,z.jsx)(`div`,{className:`heatmap-tip-val`,children:i(`usage.heatmap.tooltipTokens`,{tokens:Nt(e.totalTokens,r)})}),(0,z.jsx)(`div`,{className:`heatmap-tip-req muted`,children:i(`usage.heatmap.tooltipRequests`,{requests:e.requests})})]}):null})(),(0,z.jsxs)(`div`,{className:`heatmap-legend muted`,children:[(0,z.jsx)(`span`,{children:i(`usage.heatmap.less`)}),[0,1,2,3,4].map(e=>(0,z.jsx)(`span`,{className:`heatmap-cell heatmap-cell-${e}`},e)),(0,z.jsx)(`span`,{children:i(`usage.heatmap.more`)})]})]})]})}function Yl({title:e,titleId:t,children:n}){return(0,z.jsxs)(`section`,{className:`usw-section`,"aria-labelledby":t,children:[(0,z.jsx)(`h3`,{id:t,className:`h-section`,children:e}),n]})}function Xl({models:e,modelQuery:t,onModelQuery:n,locale:r,t:i,workspace:a=!1}){let o=i(`usage.search.models`),s=i(`usage.section.models`),c=`usage-models-title`,l=(0,z.jsx)(`input`,{className:`input`,"aria-label":o,placeholder:o,value:t,onChange:e=>n(e.target.value)}),u=(0,z.jsx)(`div`,{className:`tbl-wrap`,children:(0,z.jsxs)(`table`,{className:`tbl`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:i(`logs.col.model`)}),(0,z.jsx)(`th`,{children:i(`logs.col.provider`)}),(0,z.jsx)(`th`,{className:`num`,children:i(`usage.col.requests`)}),(0,z.jsx)(`th`,{className:`num`,children:i(`usage.col.measured`)}),(0,z.jsx)(`th`,{className:`num`,children:i(`usage.col.tokens`)}),(0,z.jsx)(`th`,{children:i(`usage.col.share`)})]})}),(0,z.jsx)(`tbody`,{children:e.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`mono`,children:ds(e.model)}),(0,z.jsx)(`td`,{className:`muted`,children:e.provider}),(0,z.jsx)(`td`,{className:`num`,children:e.requests}),(0,z.jsx)(`td`,{className:`num`,children:e.measuredRequests}),(0,z.jsx)(`td`,{className:`num mono`,children:Nt(e.totalTokens,r)}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`div`,{className:`usage-bar`,children:(0,z.jsx)(`div`,{className:`usage-bar-fill`,style:{width:`${Math.round(e.shareRatio*100)}%`}})})})]},`${e.provider}/${e.model}`))})]})});return a?(0,z.jsxs)(Yl,{title:s,titleId:c,children:[(0,z.jsx)(`div`,{className:`usw-section-toolbar`,children:l}),u]}):(0,z.jsxs)(`section`,{className:`panel`,style:{marginTop:16},"aria-labelledby":c,children:[(0,z.jsxs)(`div`,{className:`panel-head`,children:[(0,z.jsx)(`h3`,{id:c,className:`panel-title`,children:s}),l]}),u]})}function Zl({providers:e,locale:t,t:n,workspace:r=!1}){let i=n(`usage.section.providers`),a=`usage-providers-title`,o=(0,z.jsx)(`div`,{className:`tbl-wrap`,children:(0,z.jsxs)(`table`,{className:`tbl`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:n(`logs.col.provider`)}),(0,z.jsx)(`th`,{className:`num`,children:n(`usage.col.requests`)}),(0,z.jsx)(`th`,{className:`num`,children:n(`usage.col.measured`)}),(0,z.jsx)(`th`,{className:`num`,children:n(`usage.col.tokens`)}),(0,z.jsx)(`th`,{children:n(`usage.col.share`)})]})}),(0,z.jsx)(`tbody`,{children:e.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`mono`,children:e.provider}),(0,z.jsx)(`td`,{className:`num`,children:e.requests}),(0,z.jsx)(`td`,{className:`num`,children:e.measuredRequests}),(0,z.jsx)(`td`,{className:`num mono`,children:Nt(e.totalTokens,t)}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`div`,{className:`usage-bar`,children:(0,z.jsx)(`div`,{className:`usage-bar-fill`,style:{width:`${Math.round(e.shareRatio*100)}%`}})})})]},e.provider))})]})});return r?(0,z.jsx)(Yl,{title:i,titleId:a,children:o}):(0,z.jsxs)(`section`,{className:`panel`,style:{marginTop:16},"aria-labelledby":a,children:[(0,z.jsx)(`h3`,{id:a,className:`panel-title`,children:i}),o]})}function Ql({summary:e,t,workspace:n=!1}){let r=t(`usage.section.coverage`),i=`usage-coverage-title`,a=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`usage-cards usage-cards-3x2`,children:[(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:t(`usage.coverage.measured`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:e.measuredRequests})]}),(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:t(`usage.coverage.reported`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:e.reportedRequests})]}),(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:t(`usage.coverage.estimated`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:e.estimatedRequests})]}),(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:t(`logs.tokens.unreported`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:e.unreportedRequests})]}),(0,z.jsxs)(`div`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`muted`,children:t(`logs.tokens.unsupported`)}),(0,z.jsx)(`div`,{className:`stat-value`,children:e.unsupportedRequests})]})]}),(0,z.jsx)(`p`,{className:`muted text-control`,style:{marginTop:12},children:t(`usage.coverage.note`)})]});return n?(0,z.jsx)(Yl,{title:r,titleId:i,children:a}):(0,z.jsxs)(`section`,{className:`panel`,style:{marginTop:16},"aria-labelledby":i,children:[(0,z.jsx)(`h3`,{id:i,className:`panel-title`,children:r}),a]})}function $l({data:e,heatmap:t,weekBars:n,activeDays:r,filteredModels:i,modelQuery:a,onModelQuery:o,sortedProviders:s,range:c,locale:l,t:u}){let d=!!e&&e.summary.requests===0,f=[{id:`overview`,label:u(`usage.section.overview`),meta:e?`${e.summary.requests}`:`—`,body:e?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Kl,{summary:e.summary,activeDays:r,locale:l,t:u}),(0,z.jsx)(Jl,{range:c,heatmap:t,weekBars:n,locale:l,t:u})]}):null},{id:`models`,label:u(`usage.section.models`),meta:e?`${e.models.length}`:`—`,body:e?(0,z.jsx)(Xl,{models:i,modelQuery:a,onModelQuery:o,locale:l,t:u,workspace:!0}):null},{id:`providers`,label:u(`usage.section.providers`),meta:e?`${e.providers.length}`:`—`,body:e?(0,z.jsx)(Zl,{providers:s,locale:l,t:u,workspace:!0}):null},{id:`coverage`,label:u(`usage.section.coverage`),meta:e?zl(e.summary.coverageRatio):`—`,body:e?(0,z.jsx)(Ql,{summary:e.summary,t:u,workspace:!0}):null}];return(0,z.jsx)(`div`,{className:`usage-workspace-shell`,children:(0,z.jsxs)(`div`,{className:`usage-workspace-root`,children:[(0,z.jsx)(fc,{scope:`usage`,ariaLabel:u(`usage.workspace.sections`),items:f.map(e=>({id:e.id,label:e.label,meta:e.meta}))}),(0,z.jsx)(`section`,{className:`usage-workspace-main`,"aria-label":u(`usage.workspace.report`),children:d?(0,z.jsx)(it,{title:u(`usage.empty`)}):f.map(e=>(0,z.jsx)(`div`,{id:lc(`usage`,e.id),className:`usw-body usw-section-block`,children:e.body},e.id))})]})})}var eu=new Map;function tu(e,t,n){return`ocx.usage.v1:${e}:${t}:${n}`}function nu(e,t,n){let r=tu(e,t,n);return eu.get(r)??Z(r)}function ru(e,t,n,r){let i=tu(e,t,n);eu.set(i,r),Q(i,r)}function iu({apiBase:e}){let{t,locale:n}=ze(),[r,i]=(0,_.useState)(`30d`),[a,o]=(0,_.useState)(`all`),[s,c]=(0,_.useState)(``),l=(0,_.useCallback)(async t=>{let n=await fetch(`${e}/api/usage?range=${r}&surface=${a}`,{signal:t});if(!n.ok)throw Error(`${n.status} ${n.statusText}`.trim());let i=await n.json();return ru(e,r,a,i),i},[e,r,a]),u=tu(e,r,a),d=nu(e,r,a),f=Is(u,[e,r,a],l,{isEmpty:()=>!1,initialData:d??void 0}),{state:p}=f,m=p.data??d??null,h=(0,_.useMemo)(()=>Wl(m?.days??[]),[m?.days]),g=(0,_.useMemo)(()=>Vl(m?.days??[]),[m?.days]),v=(0,_.useMemo)(()=>(m?.days??[]).filter(e=>e.requests>0).length,[m?.days]),y=(0,_.useMemo)(()=>{let e=s.trim().toLowerCase(),t=(m?.models??[]).toSorted((e,t)=>t.totalTokens-e.totalTokens);return e?t.filter(t=>t.model.toLowerCase().includes(e)||t.provider.toLowerCase().includes(e)||(t.resolvedModel??``).toLowerCase().includes(e)).slice(0,100):t.slice(0,100)},[m?.models,s]),b=(0,_.useMemo)(()=>(m?.providers??[]).toSorted((e,t)=>t.totalTokens-e.totalTokens),[m?.providers]);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`page-head usage-head`,children:[(0,z.jsx)(`h2`,{id:`usage-page-title`,children:t(`usage.title`)}),(0,z.jsx)(Gl,{surface:a,range:r,onSurface:o,onRange:i,t})]}),(0,z.jsx)(`p`,{className:`page-sub`,children:t(`usage.subtitle`)}),p.showSkeleton&&!m?(0,z.jsx)(Rs,{label:t(`usage.loading`),rows:5}):p.kind===`failed-cold`?(0,z.jsxs)(X,{tone:`err`,children:[p.error instanceof Error?`${t(`usage.loadError`)} ${p.error.message}`:t(`usage.loadError`),` `,(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>f.refresh(),children:t(`common.retry`)})]}):(0,z.jsxs)(z.Fragment,{children:[p.showError&&(0,z.jsx)(X,{tone:`err`,children:t(`usage.loadError`)}),m?.historyTruncated&&(0,z.jsx)(X,{tone:`ok`,children:t(`usage.historyTruncated`)}),(0,z.jsx)($l,{data:m,heatmap:h,weekBars:g,activeDays:v,filteredModels:y,modelQuery:s,onModelQuery:c,sortedProviders:b,range:r,locale:n,t})]})]})}function au(e,t){if(e<1024)return`${e} B`;let n=[`KB`,`MB`,`GB`,`TB`],r=e,i=-1;do r/=1024,i++;while(r>=1024&&i<n.length-1);return`${r.toLocaleString(t,{maximumFractionDigits:1})} ${n[i]}`}var ou={sessions:`storage.bucket.sessions`,archived_sessions:`storage.bucket.archived_sessions`,logs_db:`storage.bucket.logs_db`,state_db:`storage.bucket.state_db`,attachments:`storage.bucket.attachments`,deletion_manifests:`storage.bucket.deletion_manifests`,other:`storage.bucket.other`};function su(e,t){let n=ou[e.key];return n?t(n):e.label}function cu(e,t){return e===void 0?`—`:new Date(e).toLocaleDateString(t)}function lu(e,t,n){return e.rows===void 0?`—`:e.rows===null?n(`storage.rows.unknown`):e.rows.toLocaleString(t)}function uu({report:e,locale:t}){let n=Y(),[r,i]=(0,_.useState)(null),a=(0,_.useMemo)(()=>e.buckets.toSorted((e,t)=>t.bytes-e.bytes),[e.buckets]),o=a.find(e=>e.key===r)??null,s=(0,_.useMemo)(()=>{let t=[];for(let n of e.buckets)for(let e of n.largest??[])t.push({...e,bucketKey:n.key});return t.sort((e,t)=>t.bytes-e.bytes).slice(0,10)},[e.buckets]),c=(0,_.useMemo)(()=>new Map(e.buckets.map(e=>[e.key,e])),[e.buckets]);return(0,z.jsxs)(`div`,{className:`storage-workspace-root`,children:[(0,z.jsxs)(`aside`,{className:`storage-workspace-rail`,"aria-label":n(`storage.section.buckets`),children:[(0,z.jsxs)(`div`,{className:`storage-workspace-rail-header`,children:[(0,z.jsx)(`span`,{className:`storage-workspace-rail-title`,children:n(`storage.section.buckets`)}),(0,z.jsx)(`span`,{className:`storage-workspace-rail-count`,children:a.length})]}),(0,z.jsx)(`div`,{className:`storage-workspace-rail-list`,children:a.length===0?(0,z.jsx)(`span`,{className:`storage-workspace-rail-empty`,children:n(`storage.empty`)}):a.map(e=>(0,z.jsxs)(`button`,{type:`button`,className:`storage-workspace-rail-row${r===e.key?` storage-workspace-rail-row--selected`:``}`,onClick:()=>i(t=>t===e.key?null:e.key),"aria-current":r===e.key?`true`:void 0,children:[(0,z.jsxs)(`span`,{className:`storage-workspace-rail-primary`,children:[(0,z.jsx)(`span`,{className:`storage-workspace-rail-name`,children:su(e,n)}),(0,z.jsx)(`span`,{className:`storage-workspace-rail-size`,children:au(e.bytes,t)})]}),(0,z.jsxs)(`span`,{className:`storage-workspace-rail-meta`,children:[e.fileCount.toLocaleString(t),` `,n(`storage.col.files`).toLowerCase()]})]},e.key))})]}),(0,z.jsx)(`section`,{className:`storage-workspace-main`,"aria-label":o?su(o,n):n(`storage.section.largest`),children:o?(0,z.jsxs)(`div`,{className:`stw-detail`,children:[(0,z.jsx)(`div`,{className:`stw-detail-toolbar`,children:(0,z.jsxs)(`button`,{type:`button`,className:`stw-detail-back`,onClick:()=>i(null),children:[(0,z.jsx)(he,{className:`stw-detail-back-chevron`,"aria-hidden":`true`}),n(`modal.back`)]})}),(0,z.jsxs)(`div`,{className:`stw-detail-body`,children:[(0,z.jsx)(`h2`,{className:`stw-detail-title`,children:su(o,n)}),(0,z.jsxs)(`dl`,{className:`stw-kv`,children:[(0,z.jsxs)(`div`,{className:`stw-kv-row`,children:[(0,z.jsx)(`dt`,{children:n(`storage.col.size`)}),(0,z.jsx)(`dd`,{className:`stw-kv-mono`,children:au(o.bytes,t)})]}),(0,z.jsxs)(`div`,{className:`stw-kv-row`,children:[(0,z.jsx)(`dt`,{children:n(`storage.col.files`)}),(0,z.jsx)(`dd`,{className:`stw-kv-mono`,children:o.fileCount.toLocaleString(t)})]}),(0,z.jsxs)(`div`,{className:`stw-kv-row`,children:[(0,z.jsx)(`dt`,{children:n(`storage.col.oldest`)}),(0,z.jsx)(`dd`,{children:cu(o.oldest,t)})]}),(0,z.jsxs)(`div`,{className:`stw-kv-row`,children:[(0,z.jsx)(`dt`,{children:n(`storage.col.newest`)}),(0,z.jsx)(`dd`,{children:cu(o.newest,t)})]}),(0,z.jsxs)(`div`,{className:`stw-kv-row`,children:[(0,z.jsx)(`dt`,{children:n(`storage.col.rows`)}),(0,z.jsx)(`dd`,{className:`stw-kv-mono`,children:lu(o,t,n)})]})]}),(o.largest?.length??0)>0&&(0,z.jsxs)(`div`,{className:`stw-section`,children:[(0,z.jsx)(`h3`,{className:`stw-section-title`,children:n(`storage.section.largest`)}),o.largest.map(e=>(0,z.jsxs)(`div`,{className:`stw-file-row`,children:[(0,z.jsx)(`span`,{className:`stw-file-path`,title:e.path,children:e.path}),(0,z.jsx)(`span`,{className:`stw-file-size`,children:au(e.bytes,t)})]},e.path))]})]})]}):(0,z.jsxs)(`div`,{className:`stw-overview`,children:[(0,z.jsxs)(`div`,{className:`stw-summary`,children:[(0,z.jsxs)(`div`,{className:`stw-summary-card`,children:[(0,z.jsx)(`div`,{className:`stw-summary-label`,children:n(`storage.card.total`)}),(0,z.jsx)(`div`,{className:`stw-summary-value`,children:au(e.total.bytes,t)})]}),(0,z.jsxs)(`div`,{className:`stw-summary-card`,children:[(0,z.jsx)(`div`,{className:`stw-summary-label`,children:n(`storage.card.files`)}),(0,z.jsx)(`div`,{className:`stw-summary-value`,children:e.total.fileCount.toLocaleString(t)})]}),(0,z.jsxs)(`div`,{className:`stw-summary-card`,children:[(0,z.jsx)(`div`,{className:`stw-summary-label`,children:n(`storage.card.home`)}),(0,z.jsx)(`div`,{className:`stw-summary-value mono stw-home-path`,title:e.codexHome,children:e.codexHome})]})]}),s.length>0?(0,z.jsxs)(`div`,{className:`stw-section`,children:[(0,z.jsx)(`h3`,{className:`stw-section-title`,children:n(`storage.section.largest`)}),s.map(e=>{let r=c.get(e.bucketKey);return(0,z.jsxs)(`div`,{className:`stw-file-row`,children:[(0,z.jsx)(`span`,{className:`stw-file-path`,title:e.path,children:e.path}),r&&(0,z.jsx)(`span`,{className:`stw-file-bucket`,children:su(r,n)}),(0,z.jsx)(`span`,{className:`stw-file-size`,children:au(e.bytes,t)})]},`${e.bucketKey}:${e.path}`)})]}):(0,z.jsxs)(`p`,{className:`stw-hint`,children:[(0,z.jsx)(K,{style:{width:14,height:14,verticalAlign:`text-bottom`,marginRight:6},"aria-hidden":`true`}),n(`storage.workspace.selectBucket`)]})]})})]})}var du=1024**3,fu=[10,25,50],pu=(e,t)=>{if(!(e instanceof Error))return t;let n=e.message;return n===`Failed to fetch`||n.includes(`NetworkError`)||n.includes(`network error`)||n.includes(`JSON`)||n.includes(`Unexpected end of`)?t:n||t};function mu({apiBase:e,locale:t,t:n,onDone:r}){let[i,a]=(0,_.useState)(25),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(null),y=(0,_.useRef)(null),b=(0,_.useRef)(null),x=(0,_.useRef)(!1),S=(0,_.useCallback)((e=!1)=>{l(!1),d(!1),e&&s(null)},[]);(0,_.useEffect)(()=>{x.current=f},[f]),(0,_.useEffect)(()=>{if(!c)return;b.current=document.activeElement,y.current?.focus();let e=e=>{e.key===`Escape`&&!x.current&&S()};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e),b.current?.focus()}},[c,S]);let C=(e,t,r)=>{switch(e){case`codex_busy`:return n(`storage.cleanup.err.codex_busy`);case`stale_preview`:return n(`storage.cleanup.err.stale_preview`);case`restore_pending_overlap`:return n(`storage.cleanup.err.restore_pending_overlap`);case`referenced_history`:return n(`storage.cleanup.err.referenced_history`);case`invalid_digest`:return n(`storage.cleanup.err.invalid_digest`);case`invalid_mode`:return n(`storage.cleanup.err.invalid_mode`);case`fs_failed`:return r?n(`storage.cleanup.err.fs_failed_trash`,{trashDir:r}):n(`storage.cleanup.err.fs_failed`);case`db_reconcile_failed`:return n(`storage.cleanup.err.db_reconcile_failed`);case`cleanup_failed`:return n(`storage.cleanup.err.cleanup_failed`);default:return t??n(`storage.cleanup.cleanupFailed`)}},w=e=>n(`storage.cleanup.preset`,{percent:new Intl.NumberFormat(t,{style:`percent`,maximumFractionDigits:0}).format(e/100)}),T=async()=>{p(!0),v(null),h(null);try{let t=await fetch(`${e}/api/storage/cleanup/preview`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({percent:i})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(C(e.error,n(`storage.cleanup.previewFailed`)))}s(await t.json()),l(!0)}catch(e){v(pu(e,n(`storage.cleanup.previewFailed`)))}finally{p(!1)}},E=async()=>{if(o){p(!0),v(null);try{let i=await fetch(`${e}/api/storage/cleanup`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({percent:o.percent,mode:u?`permanent`:`quarantine`,digest:o.digest})});if(!i.ok){let e=await i.json().catch(()=>({}));throw e.error===`stale_preview`&&S(!0),Error(C(e.error,e.message,e.trashDir))}let a=await i.json();if(!a.ok)throw a.error===`stale_preview`&&S(!0),Error(C(a.error,a.message,a.trashDir));S(!0),h(n(u?`storage.cleanup.donePermanent`:`storage.cleanup.doneQuarantine`,{count:String(a.count),size:au(a.bytes,t)})),r()}catch(e){v(pu(e,n(`storage.cleanup.cleanupFailed`)))}finally{p(!1)}}};return(0,z.jsxs)(`section`,{className:`storage-cleanup-pane`,children:[(0,z.jsx)(`p`,{className:`muted storage-manual-panel__help`,children:n(`storage.cleanup.help`)}),(0,z.jsxs)(`div`,{className:`storage-manual-panel__controls`,children:[(0,z.jsxs)(`label`,{className:`storage-manual-panel__slider`,children:[(0,z.jsx)(`span`,{className:`muted mono`,style:{minWidth:`3.5rem`,fontVariantNumeric:`tabular-nums`},children:n(`storage.cleanup.percent`,{percent:String(i)})}),(0,z.jsx)(`input`,{type:`range`,min:1,max:100,value:i,onChange:e=>a(Number(e.target.value)),disabled:f,style:{flex:1,minWidth:0},"aria-label":n(`storage.cleanup.slider`)})]}),(0,z.jsx)(`div`,{className:`storage-manual-panel__presets`,children:fu.map(e=>(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm${i===e?` active`:``}`,disabled:f,onClick:()=>a(e),children:w(e)},e))}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,disabled:f,onClick:()=>void T(),children:n(`storage.cleanup.preview`)})]}),m&&(0,z.jsx)(`p`,{className:`muted storage-manual-panel__status`,children:m}),g&&!c&&(0,z.jsx)(`p`,{className:`storage-manual-panel__status`,style:{color:`var(--red)`},children:g}),c&&o&&(0,z.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`storage-cleanup-confirm-title`,onClick:()=>!f&&S(),children:(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsx)(`h3`,{id:`storage-cleanup-confirm-title`,children:n(`storage.cleanup.confirmTitle`)}),(0,z.jsx)(`p`,{children:n(`storage.cleanup.confirmBody`,{count:String(o.count),size:au(o.bytes,t),percent:String(o.percent)})}),o.candidates.length>0&&(0,z.jsxs)(`ul`,{className:`mono muted`,style:{maxHeight:160,overflow:`auto`,fontSize:`var(--text-caption)`},children:[o.candidates.slice(0,8).map(e=>(0,z.jsx)(`li`,{children:e.relPath},e.relPath)),o.count>8&&(0,z.jsx)(`li`,{children:n(`storage.cleanup.moreFiles`,{n:String(Math.max(0,o.count-8))})})]}),(0,z.jsxs)(`label`,{style:{display:`flex`,gap:8,alignItems:`center`,marginTop:12},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:u,disabled:f,onChange:e=>d(e.target.checked)}),(0,z.jsx)(`span`,{children:n(`storage.cleanup.permanent`)})]}),(0,z.jsx)(`p`,{className:`muted`,style:{marginTop:8,fontSize:`var(--text-caption)`},children:n(u?`storage.cleanup.permanentWarn`:`storage.cleanup.quarantineNote`)}),g&&(0,z.jsx)(`p`,{style:{marginTop:12,color:`var(--red)`},children:g}),(0,z.jsxs)(`div`,{className:`dialog-actions`,style:{marginTop:16},children:[(0,z.jsx)(`button`,{ref:y,type:`button`,className:`btn btn-ghost`,disabled:f,onClick:()=>S(),children:n(`storage.cleanup.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:u?`btn btn-danger`:`btn`,disabled:f||o.count===0,onClick:()=>void E(),children:n(u?`storage.cleanup.confirmPermanent`:`storage.cleanup.confirmQuarantine`)})]})]})})]})}function hu({apiBase:e,locale:t,t:n,onDone:r,reloadToken:i,onEntriesChange:a}){let[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(null),m=(0,_.useRef)(null),h=(0,_.useRef)(null),g=(0,_.useRef)(!1);(0,_.useEffect)(()=>{g.current=o},[o]);let v=(0,_.useCallback)(()=>l(null),[]);(0,_.useEffect)(()=>{if(!c)return;h.current=document.activeElement,m.current?.focus();let e=e=>{e.key===`Escape`&&!g.current&&v()};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e),h.current?.focus()}},[c,v]);let y=(0,_.useCallback)(async t=>{let r=await fetch(`${e}/api/storage/trash`,{signal:t});if(!r.ok)throw Error(n(`storage.trash.listFailed`));let i=await r.json(),o=Array.isArray(i.entries)?i.entries:[];return a?.(o),o},[e,a,n]),b=Is(`storage-trash:${e}`,[e,i],y,{isEmpty:e=>e.length===0}).state,x=b.data??[],S=(e,t)=>{switch(e){case`codex_busy`:return n(`storage.trash.err.codex_busy`);case`invalid_trash`:return n(`storage.trash.err.invalid_trash`);case`missing_trash`:return n(`storage.trash.err.missing_trash`);case`dest_exists`:return n(`storage.trash.err.dest_exists`);case`fs_failed`:return n(`storage.trash.err.fs_failed`);case`db_reconcile_failed`:return n(`storage.trash.err.db_reconcile_failed`);case`storage_mutation_busy`:return n(`storage.trash.err.storage_mutation_busy`);case`restore_failed`:return n(`storage.trash.err.restore_failed`);case`restore_worker_timeout`:return n(`storage.trash.err.restore_worker_timeout`);case`restore_worker_aborted`:return n(`storage.trash.err.restore_worker_aborted`);case`restore_worker_failed`:return t??n(`storage.trash.err.restore_worker_failed`);default:return t??n(`storage.trash.restoreFailed`)}},C=async()=>{if(c){s(!0),p(null);try{let i=await fetch(`${e}/api/storage/trash/restore`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:c.id})});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(S(e.error,e.message))}let a=await i.json();if(!a.ok)throw Error(S(a.error,a.message));v(),d(n(`storage.trash.done`,{count:String(a.count),size:au(a.bytes,t)})),r()}catch(e){p(pu(e,n(`storage.trash.restoreFailed`)))}finally{s(!1)}}},w=e=>{let n=e.quarantinedAt??Number(e.epoch.split(`-`)[0]);return!Number.isFinite(n)||n<=0?`—`:new Date(n).toLocaleString(t)},T=e=>e===`permanent`?n(`storage.trash.mode.permanent`):e===`quarantine`?n(`storage.trash.mode.quarantine`):`—`;return(0,z.jsxs)(`section`,{className:`storage-cleanup-pane storage-quarantine-pane`,children:[(0,z.jsx)(`p`,{className:`muted storage-manual-panel__help`,children:n(`storage.trash.help`)}),u&&(0,z.jsx)(`p`,{className:`muted storage-manual-panel__status`,children:u}),f&&!c&&(0,z.jsx)(`p`,{className:`storage-manual-panel__status`,style:{color:`var(--red)`},role:`alert`,children:f}),b.showError&&!c&&(0,z.jsx)(`p`,{className:`storage-manual-panel__status`,style:{color:`var(--red)`},role:`alert`,children:b.error instanceof Error?b.error.message:n(`storage.trash.listFailed`)}),b.refreshing&&!b.showSkeleton&&(0,z.jsx)(zs,{live:!b.showError,children:n(`storage.trash.loading`)}),b.showSkeleton?(0,z.jsx)(Rs,{label:n(`storage.trash.loading`),rows:2}):x.length===0?(0,z.jsx)(`p`,{className:`muted storage-manual-panel__status`,children:n(`storage.trash.empty`)}):(0,z.jsx)(`div`,{className:`tbl-wrap storage-manual-panel__table`,children:(0,z.jsxs)(`table`,{className:`tbl`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:n(`storage.trash.col.when`)}),(0,z.jsx)(`th`,{className:`num`,children:n(`storage.trash.col.files`)}),(0,z.jsx)(`th`,{className:`num`,children:n(`storage.trash.col.size`)}),(0,z.jsx)(`th`,{children:n(`storage.trash.col.mode`)}),(0,z.jsx)(`th`,{children:n(`storage.trash.col.id`)}),(0,z.jsx)(`th`,{})]})}),(0,z.jsx)(`tbody`,{children:x.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`muted`,children:w(e)}),(0,z.jsx)(`td`,{className:`num`,children:e.fileCount}),(0,z.jsx)(`td`,{className:`num mono`,children:au(e.bytes,t)}),(0,z.jsx)(`td`,{className:`muted`,children:T(e.mode)}),(0,z.jsx)(`td`,{className:`mono`,style:{fontSize:`var(--text-caption)`},children:e.id}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,disabled:o,onClick:()=>{p(null),l(e)},children:n(`storage.trash.restore`)})})]},e.id))})]})}),c&&(0,z.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`storage-trash-confirm-title`,onClick:()=>!o&&v(),children:(0,z.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,z.jsx)(`h3`,{id:`storage-trash-confirm-title`,children:n(`storage.trash.confirmTitle`)}),(0,z.jsx)(`p`,{children:n(`storage.trash.confirmBody`,{count:String(c.fileCount),size:au(c.bytes,t),id:c.id})}),f&&(0,z.jsx)(`p`,{style:{marginTop:12,color:`var(--red)`},children:f}),(0,z.jsxs)(`div`,{className:`dialog-actions`,style:{marginTop:16},children:[(0,z.jsx)(`button`,{ref:m,type:`button`,className:`btn btn-ghost`,disabled:o,onClick:()=>v(),children:n(`storage.trash.cancel`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn`,disabled:o,onClick:()=>void C(),children:n(`storage.trash.confirmRestore`)})]})]})})]})}function gu(e){let{job:t,...n}=e;return n}function _u(e){let t=String(Math.max(0,Math.round(e.trigger.archivedBytesOver/du*100)/100));return e.target.reduceToBytes===void 0?{policy:gu(e),thresholdGb:t,targetMode:`percent`,percent:String(Math.min(100,Math.max(1,Math.floor(e.target.removeOldestPercent??25)))),reduceGb:`4`}:{policy:gu(e),thresholdGb:t,targetMode:`reduce`,percent:`25`,reduceGb:String(Math.max(0,Math.round(e.target.reduceToBytes/du*100)/100))}}async function vu(e){await new Promise(t=>window.setTimeout(t,e))}function yu({apiBase:e,locale:t,t:n,onDone:r}){let i=`ocx.storage.cleanup-policy.v1:${e}`,a=Z(i),o=(0,_.useRef)(!!a),[s,c]=(0,_.useState)(()=>a?.policy??null),[l,u]=(0,_.useState)(()=>!a),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(null),[b,x]=(0,_.useState)(()=>a?.targetMode??`percent`),[S,C]=(0,_.useState)(()=>a?.percent??`25`),[w,T]=(0,_.useState)(()=>a?.reduceGb??`4`),[E,D]=(0,_.useState)(()=>a?.thresholdGb??`5`),O=(0,_.useRef)(null),k=(0,_.useRef)(!1),A=(0,_.useRef)(!1),j=(0,_.useRef)(0),M=(0,_.useCallback)(e=>{let t=_u(e);c(t.policy),D(t.thresholdGb),x(t.targetMode),C(t.percent),T(t.reduceGb),o.current=!0,Q(i,t),k.current=!1},[i]),N=(0,_.useCallback)(()=>{k.current=!0},[]),P=(0,_.useCallback)(e=>{A.current=e},[]),F=(0,_.useCallback)(async t=>{let r=++j.current;o.current||u(!0),y(null);try{let n=await fetch(`${e}/api/storage/cleanup-policy`,{signal:t});if(!n.ok)throw Error(`load_failed`);let i=await n.json();if(t?.aborted||r!==j.current||k.current||A.current)return;M(i)}catch{if(t?.aborted||r!==j.current)return;o.current||(c(null),y(n(`storage.policy.loadFailed`)))}finally{!t?.aborted&&r===j.current&&u(!1)}},[e,M,n]);(0,_.useEffect)(()=>{let e=new AbortController,t=window.setTimeout(()=>{F(e.signal)},0);return()=>{window.clearTimeout(t),j.current+=1,e.abort()}},[F]),(0,_.useEffect)(()=>()=>{O.current?.abort(),O.current=null},[]);let I=()=>{if(!s)return null;let e=E.trim();if(e===``)return null;let t=Number(e);if(!Number.isFinite(t)||t<0)return null;let n;if(b===`reduce`){let e=w.trim();if(e===``)return null;let t=Number(e);if(!Number.isFinite(t)||t<0)return null;n={reduceToBytes:Math.floor(t*du)}}else{let e=Number(S);if(!Number.isFinite(e)||e<1||e>100)return null;n={removeOldestPercent:Math.min(100,Math.max(1,Math.floor(e)))}}return{enabled:s.enabled,trigger:{archivedBytesOver:Math.floor(t*du)},target:n,schedule:s.schedule,mode:s.mode}},L=async t=>{let r=I();if(!r){y(n(`storage.policy.invalid`));return}let i={...r,...t};f(!0),y(null),g(null);try{let t=await fetch(`${e}/api/storage/cleanup-policy`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(i)});if(!t.ok){y(n(`storage.policy.saveFailed`));return}let r=await t.json();if(!r.policy){y(n(`storage.policy.saveFailed`));return}M(r.policy),g(n(`storage.policy.saved`))}catch{y(n(`storage.policy.saveFailed`))}finally{f(!1)}},R=async()=>{O.current?.abort();let i=new AbortController;O.current=i;let{signal:a}=i;m(!0),y(null),g(null);try{let i=I();if(!i){y(n(`storage.policy.invalid`));return}let o=await fetch(`${e}/api/storage/cleanup-policy`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(i),signal:a});if(a.aborted)return;if(!o.ok){y(n(`storage.policy.saveFailed`));return}let s=await o.json();if(a.aborted)return;if(!s.policy){y(n(`storage.policy.saveFailed`));return}M(s.policy);let c=await fetch(`${e}/api/storage/cleanup-policy/run`,{method:`POST`,signal:a});if(a.aborted)return;if(c.status===409){let e=await c.json().catch(()=>({}));if(a.aborted)return;e.policy&&M(e.policy),y(n(`storage.policy.alreadyRunning`));return}if(!c.ok){let e=await c.json().catch(()=>({}));if(a.aborted)return;if(e.policy&&M(e.policy),e.error===`already_running`){y(n(`storage.policy.alreadyRunning`));return}y(n(`storage.policy.runFailed`));return}let l=await c.json();if(a.aborted)return;if(l.policy&&M(l.policy),l.error===`already_running`){y(n(`storage.policy.alreadyRunning`));return}if(!l.started||!l.job?.startedAt){y(n(`storage.policy.runFailed`));return}let u=l.job.startedAt,d=Date.now()+12e4,f,p;for(;Date.now()<d;){if(a.aborted||(await vu(250),a.aborted))return;let t=await fetch(`${e}/api/storage/cleanup-policy`,{signal:a});if(a.aborted)return;if(!t.ok)continue;let n=await t.json();if(a.aborted)return;p=gu(n),M(n);let r=n.job;if(r&&r.status!==`running`){if(r.startedAt===u&&r.lastOutcome){f=r.lastOutcome;break}if(r.finishedAt&&r.finishedAt>=u&&r.lastOutcome){f=r.lastOutcome;break}}}if(a.aborted)return;if(p&&M(p),!f){y(n(`storage.policy.runFailed`));return}f.skipped===`disabled`?g(n(`storage.policy.skippedDisabled`)):f.skipped===`under_threshold`?g(n(`storage.policy.skippedUnder`)):f.skipped===`nothing_selected`?g(n(`storage.policy.skippedEmpty`)):f.deferred===`codex_busy`||f.error===`codex_busy`?y(n(`storage.cleanup.err.codex_busy`)):f.ok?(g(f.mode===`permanent`?n(`storage.policy.donePermanent`,{count:String(f.removed??0),size:au(f.freedBytes??0,t)}):n(`storage.policy.doneQuarantine`,{count:String(f.removed??0),size:au(f.freedBytes??0,t)})),r()):y(n(`storage.policy.runFailed`))}catch(e){if(a.aborted||e instanceof DOMException&&e.name===`AbortError`)return;y(n(`storage.policy.runFailed`))}finally{O.current===i&&(O.current=null),a.aborted||m(!1)}},B=e=>e===void 0?n(`storage.policy.never`):new Date(e).toLocaleString(t);return l&&!s?(0,z.jsx)(`section`,{className:`storage-cleanup-pane`,children:(0,z.jsx)(`p`,{className:`muted storage-policy-help`,children:n(`storage.policy.loading`)})}):s?(0,z.jsxs)(`section`,{className:`storage-cleanup-pane`,children:[(0,z.jsx)(`p`,{className:`muted storage-policy-help`,children:n(`storage.policy.help`)}),(0,z.jsx)(`div`,{className:`storage-policy-enable`,children:(0,z.jsxs)(`div`,{className:`storage-policy-enable-row`,children:[(0,z.jsx)(`button`,{type:`button`,className:`toggle${s.enabled?` on`:``}`,disabled:d||p,"aria-pressed":s.enabled,"aria-label":n(`storage.policy.enabled`),title:n(`storage.policy.enabledHint`),onClick:()=>void L({enabled:!s.enabled}),children:(0,z.jsx)(`span`,{className:`toggle-knob`})}),(0,z.jsx)(`span`,{children:n(`storage.policy.enabled`)})]})}),(0,z.jsxs)(`div`,{className:`storage-policy-fields`,children:[(0,z.jsxs)(`div`,{className:`field storage-policy-trigger`,children:[(0,z.jsx)(`label`,{className:`field-label`,htmlFor:`storage-policy-threshold`,children:n(`storage.policy.trigger`)}),(0,z.jsxs)(`div`,{className:`storage-policy-trigger-row`,children:[(0,z.jsx)(`span`,{className:`storage-policy-trigger-hint`,children:n(`storage.policy.threshold`)}),(0,z.jsxs)(`span`,{className:`codex-auto-switch-input-wrap`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(P(!1),L())},children:[(0,z.jsx)(`input`,{id:`storage-policy-threshold`,className:`input mono codex-auto-switch-input`,type:`number`,min:0,step:.1,inputMode:`decimal`,value:E,disabled:d||p,"aria-label":n(`storage.policy.threshold`),onFocus:()=>P(!0),onChange:e=>{N(),D(e.target.value)},onKeyDown:e=>{e.nativeEvent.isComposing||d||p||e.key===`Enter`&&(e.preventDefault(),L())}}),(0,z.jsx)(`span`,{className:`codex-auto-switch-unit`,"aria-hidden":`true`,children:`GiB`}),(0,z.jsx)(ua,{disabled:d||p,incrementLabel:n(`storage.policy.thresholdInc`),decrementLabel:n(`storage.policy.thresholdDec`),onIncrement:()=>{N(),D(la(E,.1,0,1e4,.1))},onDecrement:()=>{N(),D(la(E,-.1,0,1e4,.1))}})]})]})]}),(0,z.jsxs)(`fieldset`,{className:`field storage-policy-target`,children:[(0,z.jsx)(`legend`,{className:`field-label`,children:n(`storage.policy.target`)}),(0,z.jsxs)(`label`,{className:`storage-policy-target-row`,children:[(0,z.jsx)(`input`,{type:`radio`,name:`storage-policy-target`,checked:b===`percent`,disabled:d||p,onChange:()=>{N(),x(`percent`)}}),(0,z.jsx)(`span`,{className:`storage-policy-target-label`,children:n(`storage.policy.targetPercent`)}),b===`percent`&&(0,z.jsxs)(`span`,{className:`codex-auto-switch-input-wrap`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(P(!1),L())},children:[(0,z.jsx)(`input`,{id:`storage-policy-percent`,className:`input mono codex-auto-switch-input`,type:`number`,min:1,max:100,step:1,inputMode:`numeric`,value:S,disabled:d||p,"aria-label":n(`storage.policy.targetPercent`),onFocus:()=>P(!0),onChange:e=>{N(),C(e.target.value)},onKeyDown:e=>{e.nativeEvent.isComposing||d||p||e.key===`Enter`&&(e.preventDefault(),L())}}),(0,z.jsx)(`span`,{className:`codex-auto-switch-unit`,"aria-hidden":`true`,children:`%`}),(0,z.jsx)(ua,{disabled:d||p,incrementLabel:n(`storage.policy.percentInc`),decrementLabel:n(`storage.policy.percentDec`),onIncrement:()=>{N(),C(la(S,1,1,100))},onDecrement:()=>{N(),C(la(S,-1,1,100))}})]})]}),(0,z.jsxs)(`label`,{className:`storage-policy-target-row`,children:[(0,z.jsx)(`input`,{type:`radio`,name:`storage-policy-target`,checked:b===`reduce`,disabled:d||p,onChange:()=>{N(),x(`reduce`)}}),(0,z.jsx)(`span`,{className:`storage-policy-target-label`,children:n(`storage.policy.targetReduce`)}),b===`reduce`&&(0,z.jsxs)(`span`,{className:`codex-auto-switch-input-wrap`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(P(!1),L())},children:[(0,z.jsx)(`input`,{id:`storage-policy-reduce`,className:`input mono codex-auto-switch-input`,type:`number`,min:0,step:.1,inputMode:`decimal`,value:w,disabled:d||p,"aria-label":n(`storage.policy.targetReduce`),onFocus:()=>P(!0),onChange:e=>{N(),T(e.target.value)},onKeyDown:e=>{e.nativeEvent.isComposing||d||p||e.key===`Enter`&&(e.preventDefault(),L())}}),(0,z.jsx)(`span`,{className:`codex-auto-switch-unit`,"aria-hidden":`true`,children:`GiB`}),(0,z.jsx)(ua,{disabled:d||p,incrementLabel:n(`storage.policy.reduceInc`),decrementLabel:n(`storage.policy.reduceDec`),onIncrement:()=>{N(),T(la(w,.1,0,1e4,.1))},onDecrement:()=>{N(),T(la(w,-.1,0,1e4,.1))}})]})]})]}),(0,z.jsxs)(`div`,{className:`storage-policy-selects`,children:[(0,z.jsxs)(`label`,{className:`field`,htmlFor:`storage-policy-schedule`,children:[(0,z.jsx)(`span`,{className:`field-label`,children:n(`storage.policy.schedule`)}),(0,z.jsxs)(`select`,{id:`storage-policy-schedule`,className:`input`,value:s.schedule,disabled:d||p,onChange:e=>{let t=e.target.value;L({schedule:t})},children:[(0,z.jsx)(`option`,{value:`manual`,children:n(`storage.policy.schedule.manual`)}),(0,z.jsx)(`option`,{value:`startup`,children:n(`storage.policy.schedule.startup`)}),(0,z.jsx)(`option`,{value:`daily`,children:n(`storage.policy.schedule.daily`)}),(0,z.jsx)(`option`,{value:`weekly`,children:n(`storage.policy.schedule.weekly`)})]})]}),(0,z.jsxs)(`label`,{className:`field`,htmlFor:`storage-policy-mode`,children:[(0,z.jsx)(`span`,{className:`field-label`,children:n(`storage.policy.mode`)}),(0,z.jsxs)(`select`,{id:`storage-policy-mode`,className:`input`,value:s.mode,disabled:d||p,onChange:e=>{let t=e.target.value;L({mode:t})},children:[(0,z.jsx)(`option`,{value:`quarantine`,children:n(`storage.policy.mode.quarantine`)}),(0,z.jsx)(`option`,{value:`permanent`,children:n(`storage.policy.mode.permanent`)})]})]})]}),s.mode===`permanent`&&(0,z.jsx)(`p`,{className:`err storage-policy-warn`,role:`status`,children:n(`storage.policy.permanentWarn`)})]}),(0,z.jsxs)(`div`,{className:`storage-policy-meta`,children:[(0,z.jsxs)(`div`,{className:`storage-policy-meta-item`,children:[(0,z.jsx)(`span`,{className:`muted`,children:n(`storage.policy.lastRun`)}),(0,z.jsxs)(`span`,{className:`storage-policy-meta-value`,children:[B(s.lastRun?.at),s.lastRun?` · ${n(`storage.policy.lastRunDetail`,{count:String(s.lastRun.removed),size:au(s.lastRun.freedBytes,t)})}`:``]})]}),(0,z.jsxs)(`div`,{className:`storage-policy-meta-item`,children:[(0,z.jsx)(`span`,{className:`muted`,children:n(`storage.policy.nextRun`)}),(0,z.jsx)(`span`,{className:`storage-policy-meta-value`,children:B(s.nextRun)})]})]}),(0,z.jsxs)(`div`,{className:`storage-policy-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:d||p,onClick:()=>void L(),children:n(`storage.policy.save`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,disabled:d||p,onClick:()=>void R(),children:n(p?`storage.policy.running`:`storage.policy.runNow`)}),(0,z.jsx)(`span`,{className:`storage-policy-actions__status${v?` is-error`:``}`,role:v?`alert`:`status`,"aria-live":`polite`,children:v??h??``})]})]}):(0,z.jsx)(`section`,{className:`storage-cleanup-pane`,children:v&&(0,z.jsx)(`p`,{className:`err`,role:`alert`,children:v})})}function bu({apiBase:e,locale:t,t:n,archivedCount:r,showQuarantine:i,trashReloadToken:a,onDone:o,onTrashEntriesChange:s}){let[c,l]=(0,_.useState)(`policy`),u=(0,_.useRef)(null),d=(0,_.useRef)(null),f=[{id:`policy`,label:n(`storage.cleanupCard.tab.policy`),ref:u},{id:`quarantine`,label:n(`storage.cleanupCard.tab.quarantine`),ref:d}],p=e=>{l(e),window.requestAnimationFrame(()=>(e===`policy`?u:d).current?.focus())},m=e=>{e.key===`ArrowLeft`||e.key===`ArrowRight`?(e.preventDefault(),p(c===`policy`?`quarantine`:`policy`)):e.key===`Home`?(e.preventDefault(),p(`policy`)):e.key===`End`&&(e.preventDefault(),p(`quarantine`))};return(0,z.jsxs)(`section`,{className:`panel storage-cleanup-card`,"aria-labelledby":`storage-cleanup-card-title`,children:[(0,z.jsx)(`div`,{className:`page-tabs storage-cleanup-card__tabs`,role:`tablist`,"aria-label":n(`storage.cleanupCard.tabs`),children:f.map(({id:e,label:t,ref:n})=>(0,z.jsx)(`button`,{type:`button`,role:`tab`,ref:n,id:`storage-cleanup-tab-${e}`,"aria-selected":c===e,"aria-controls":`storage-cleanup-panel-${e}`,tabIndex:c===e?0:-1,className:`page-tab${c===e?` page-tab--active`:``}`,onKeyDown:m,onClick:()=>p(e),children:t},e))}),(0,z.jsx)(`h3`,{id:`storage-cleanup-card-title`,className:`panel-title`,children:n(`storage.cleanupCard.title`)}),(0,z.jsxs)(`div`,{className:`storage-cleanup-card__stack`,children:[(0,z.jsxs)(`div`,{id:`storage-cleanup-panel-policy`,role:`tabpanel`,"aria-labelledby":`storage-cleanup-tab-policy`,className:`storage-cleanup-card__body storage-cleanup-policy-split`,"data-active":c===`policy`?`true`:`false`,"aria-hidden":c!==`policy`,...c===`policy`?{}:{inert:!0},children:[(0,z.jsx)(yu,{apiBase:e,locale:t,t:n,onDone:o}),(0,z.jsxs)(`aside`,{className:`storage-cleanup-manual`,"aria-labelledby":`storage-cleanup-manual-title`,children:[(0,z.jsx)(`h4`,{id:`storage-cleanup-manual-title`,className:`storage-cleanup-manual__title`,children:n(`storage.cleanup.title`)}),r>0?(0,z.jsx)(mu,{apiBase:e,locale:t,t:n,onDone:o}):(0,z.jsx)(`p`,{className:`muted storage-manual-panel__status`,children:n(`storage.cleanup.noArchives`)})]})]}),(0,z.jsx)(`div`,{id:`storage-cleanup-panel-quarantine`,role:`tabpanel`,"aria-labelledby":`storage-cleanup-tab-quarantine`,className:`storage-cleanup-card__body`,"data-active":c===`quarantine`?`true`:`false`,"aria-hidden":c!==`quarantine`,...c===`quarantine`?{}:{inert:!0},children:i?(0,z.jsx)(hu,{apiBase:e,locale:t,t:n,onDone:o,reloadToken:a,onEntriesChange:s}):(0,z.jsx)(`p`,{className:`muted storage-manual-panel__status`,children:n(`storage.trash.empty`)})})]})]})}function xu({apiBase:e}){let{t,locale:n}=ze(),r=`ocx.storage.report.v1:${e}`,i=Z(r),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(0),l=(0,_.useRef)(!1),[u,d]=(0,_.useState)({apiBase:e,settled:!1,hasEntries:!1}),f=(0,_.useCallback)(async n=>{try{let i=await fetch(`${e}/api/storage`,{signal:n});if(!i.ok)throw Error(t(`storage.error`));let a=await i.json();return Q(r,a),l.current&&(l.current=!1,o(t(`storage.rescanned`))),a}catch(e){throw l.current&&(l.current=!1,o(t(`storage.error`))),n.aborted?e:Error(t(`storage.error`),{cause:e})}},[e,r,t]),p=Is(`storage-report:${e}`,[e],f,{isEmpty:e=>e.total.fileCount===0&&e.error===void 0}),m=p.state,h=m.data??i,g=m.refreshing||m.showSkeleton&&!h,v=p.refresh,y=(0,_.useCallback)(()=>{o(null),l.current=!0,v(),c(e=>e+1)},[v]),b=(0,_.useCallback)(t=>{d({apiBase:e,settled:!0,hasEntries:t.length>0})},[e]),x=u.apiBase===e&&u.settled,S=u.apiBase===e&&u.hasEntries,C=h?.error!==void 0,w=!g&&!m.showError&&!C&&h.total.fileCount===0&&x&&!S,T=h?.buckets.find(e=>e.key===`archived_sessions`)?.fileCount??0,E=!!h&&!C,D=E&&(h.total.fileCount>0||!x||S);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`page-head`,children:[(0,z.jsx)(`h2`,{id:`storage-page-title`,children:t(`storage.title`)}),(0,z.jsxs)(`div`,{className:`storage-page-head-actions`,children:[(0,z.jsx)(`span`,{className:`storage-page-head-feedback`,role:`status`,"aria-live":`polite`,children:a??``}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:g,onClick:()=>void y(),children:[(0,z.jsx)(q,{}),` `,t(`storage.refresh`)]})]})]}),(0,z.jsx)(`p`,{className:`page-sub`,children:t(`storage.subtitle`)}),h&&h.error===void 0&&(0,z.jsxs)(`p`,{className:`storage-page-meta`,children:[(0,z.jsx)(`code`,{className:`mono storage-page-meta__home`,title:h.codexHome,children:h.codexHome}),(0,z.jsx)(`span`,{className:`storage-page-meta__sep`,"aria-hidden":`true`,children:`·`}),(0,z.jsxs)(`span`,{children:[t(`storage.snapshot.lastScan`),`:`,` `,new Date(h.generatedAt).toLocaleString(n)]})]}),m.showSkeleton&&!h?(0,z.jsx)(Rs,{label:t(`storage.loading`),rows:5}):m.kind===`failed-cold`&&!h?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`alert alert-err`,role:`alert`,children:m.error instanceof Error?m.error.message:t(`storage.error`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>v(),children:t(`common.retry`)})]}):C?(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(`div`,{className:`alert alert-err`,role:`alert`,children:t(`storage.error`)})}):(0,z.jsxs)(z.Fragment,{children:[m.showError&&(0,z.jsx)(`div`,{className:`alert alert-err`,role:`alert`,children:t(`storage.error`)}),w?(0,z.jsx)(it,{title:t(`storage.empty`)}):h&&h.total.fileCount>0&&(0,z.jsx)(uu,{report:h,locale:n})]}),h&&h.error===void 0&&m.refreshing&&!m.showSkeleton&&(0,z.jsx)(zs,{live:!m.showError,children:t(`storage.loading`)}),E&&(0,z.jsx)(bu,{apiBase:e,locale:n,t,archivedCount:T,showQuarantine:D,trashReloadToken:s,onDone:()=>void y(),onTrashEntriesChange:b})]})}function Su({apiBase:e}){let t=Y(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!0),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(``),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(!0),[C,w]=(0,_.useState)(null),T=(0,_.useRef)(null),E=(0,_.useCallback)(async()=>{s(null);try{let t=await fetch(`${e}/api/cloud-sync/status`),n=await t.json();if(!t.ok)throw Error(n.error||`HTTP ${t.status}`);r(n),n.clientId&&!f&&p(n.clientId),b(n.includeUsage)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}},[e,f]);(0,_.useEffect)(()=>{E()},[E]),(0,_.useEffect)(()=>()=>{T.current!==null&&window.clearInterval(T.current)},[]);let D=async()=>{let n=f.trim();if(n){d(!0),s(null),l(null);try{let r={clientId:n};m.trim().length>0&&(r.clientSecret=m.trim());let i=await fetch(`${e}/api/cloud-sync/client-id`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)}),a=await i.json();if(!i.ok)throw Error(a.error||`HTTP ${i.status}`);h(``),l(a.hasClientSecret?t(`cloud.clientIdSecretSaved`):t(`cloud.clientIdSaved`)),await E()}catch(e){s(e instanceof Error?e.message:String(e))}finally{d(!1)}}},O=()=>{T.current!==null&&(window.clearInterval(T.current),T.current=null)},k=async(n=`browser`)=>{d(!0),s(null),l(null),O();try{let r=await fetch(`${e}/api/cloud-sync/login/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({clientId:f.trim()||void 0,mode:n})}),i=await r.json();if(!r.ok)throw Error(i.error||`HTTP ${r.status}`);w({...i,mode:i.mode||n});let a=i.authUrl||i.verificationUriComplete||i.verificationUri;a&&window.open(a,`_blank`,`noopener,noreferrer`);let o=Math.max(2,i.interval??2)*1e3;T.current=window.setInterval(()=>{(async()=>{try{let n=await(await fetch(`${e}/api/cloud-sync/login/poll`,{method:`POST`})).json();if(n.pending)return;O(),n.ok?(w(null),l(t(`cloud.loginOk`,{account:n.account||`—`})),await E()):(s(n.error||t(`cloud.loginFailed`)),w(null))}catch(e){O(),s(e instanceof Error?e.message:String(e)),w(null)}})()},o)}catch(e){s(e instanceof Error?e.message:String(e))}finally{d(!1)}},A=async()=>{d(!0),s(null);try{await fetch(`${e}/api/cloud-sync/logout`,{method:`POST`}),l(t(`cloud.logoutOk`)),await E()}catch(e){s(e instanceof Error?e.message:String(e))}finally{d(!1)}},j=async()=>{if(x&&g.trim().length<8){s(t(`cloud.passphraseShort`));return}d(!0),s(null),l(null);try{let n=await fetch(`${e}/api/cloud-sync/push`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({passphrase:x?g:void 0,includeUsage:y,noVault:!x})}),r=await n.json();if(!n.ok)throw Error(r.error||`HTTP ${n.status}`);l(t(`cloud.pushOk`,{files:(r.files??[]).join(`, `)})),await E()}catch(e){s(e instanceof Error?e.message:String(e))}finally{d(!1)}},M=async()=>{if(window.confirm(t(`cloud.pullConfirm`))){if(n?.remoteManifest?.hasVault&&g.trim().length<8){s(t(`cloud.passphraseShort`));return}d(!0),s(null),l(null);try{let n=await fetch(`${e}/api/cloud-sync/pull`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({yes:!0,passphrase:g.trim()||void 0,includeUsage:y})}),r=await n.json();if(!n.ok)throw Error(r.error||`HTTP ${n.status}`);l(t(`cloud.pullOk`,{files:(r.files??[]).join(`, `)})),await E()}catch(e){s(e instanceof Error?e.message:String(e))}finally{d(!1)}}};return i&&!n?(0,z.jsx)(`div`,{className:`page-head`,children:(0,z.jsx)(`p`,{className:`muted`,children:t(`common.loading`)})}):(0,z.jsxs)(`div`,{className:`cloud-sync-page`,children:[(0,z.jsx)(`div`,{className:`page-head`,children:(0,z.jsx)(`h2`,{children:t(`nav.cloud`)})}),(0,z.jsx)(`p`,{className:`page-sub`,children:t(`cloud.subtitle`)}),o&&(0,z.jsxs)(`div`,{className:`notice notice-err`,role:`alert`,style:{marginBottom:16},children:[(0,z.jsx)(J,{}),(0,z.jsx)(`span`,{children:o})]}),c&&(0,z.jsxs)(`div`,{className:`notice notice-ok`,role:`status`,style:{marginBottom:16},children:[(0,z.jsx)(ie,{}),(0,z.jsx)(`span`,{children:c})]}),(0,z.jsxs)(`div`,{className:`panel`,style:{marginBottom:16},children:[(0,z.jsxs)(`div`,{className:`spread`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`cloud.statusTitle`)}),(0,z.jsx)(`div`,{className:`muted text-control`,style:{marginTop:4},children:t(`cloud.statusHint`)})]}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>void E(),disabled:u,children:[(0,z.jsx)(q,{}),` `,t(`common.retry`)]})]}),(0,z.jsxs)(`dl`,{className:`kv-list`,style:{marginTop:14},children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:t(`cloud.loggedIn`)}),(0,z.jsx)(`dd`,{children:n?.loggedIn?t(`common.ok`):t(`cloud.notLoggedIn`)})]}),n?.account&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:t(`cloud.account`)}),(0,z.jsx)(`dd`,{className:`mono`,children:n.account})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:t(`cloud.device`)}),(0,z.jsxs)(`dd`,{className:`mono`,children:[n?.deviceName,` (`,n?.deviceId,`)`]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:t(`cloud.remote`)}),(0,z.jsx)(`dd`,{className:`mono`,children:n?.remoteRoot})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:t(`cloud.lastSync`)}),(0,z.jsx)(`dd`,{children:n?.lastSyncAt?`${n.lastSyncAt} (${n.lastSyncDirection??`—`})`:t(`cloud.never`)})]}),n?.remoteManifest&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:t(`cloud.remoteManifest`)}),(0,z.jsxs)(`dd`,{className:`mono`,children:[n.remoteManifest.updatedAt??`—`,` · `,n.remoteManifest.deviceName??`—`,n.remoteManifest.hasVault?` · ${t(`cloud.hasVault`)}`:``]})]}),n?.remoteError&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:t(`cloud.remoteError`)}),(0,z.jsx)(`dd`,{className:`muted`,children:n.remoteError})]})]})]}),(0,z.jsxs)(`div`,{className:`panel`,style:{marginBottom:16},children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`cloud.clientIdTitle`)}),(0,z.jsx)(`p`,{className:`muted text-control`,style:{marginTop:6},children:t(`cloud.clientIdHint`)}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:12,flexWrap:`wrap`},children:[(0,z.jsx)(`input`,{className:`input`,style:{flex:`1 1 280px`,minWidth:200},value:f,onChange:e=>p(e.target.value),placeholder:`xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`,autoComplete:`off`,disabled:u}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>void D(),disabled:u||!f.trim(),children:t(`common.save`)})]}),(0,z.jsxs)(`label`,{className:`field`,style:{display:`block`,marginTop:12},children:[(0,z.jsx)(`span`,{className:`muted text-label`,children:t(`cloud.clientSecret`)}),(0,z.jsx)(`input`,{className:`input`,type:`password`,style:{marginTop:6,width:`100%`,maxWidth:420},value:m,onChange:e=>h(e.target.value),placeholder:n?.hasClientSecret?t(`cloud.clientSecretSet`):t(`cloud.clientSecretPlaceholder`),autoComplete:`new-password`,disabled:u}),(0,z.jsx)(`span`,{className:`muted text-label`,style:{display:`block`,marginTop:6},children:t(`cloud.clientSecretHint`)})]}),(0,z.jsx)(`div`,{className:`notice notice-ok`,style:{marginTop:14},role:`note`,children:(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`cloud.redirectUriTitle`)}),(0,z.jsx)(`p`,{className:`muted text-control`,style:{margin:`6px 0 8px`},children:t(`cloud.redirectUriHint`)}),(0,z.jsx)(`code`,{className:`mono`,style:{fontSize:`1rem`,userSelect:`all`},children:n?.azureRedirectUri||`http://localhost:18765`}),(0,z.jsx)(`p`,{className:`muted text-label`,style:{marginTop:8},children:t(`cloud.redirectUriWhere`)})]})}),(0,z.jsxs)(`p`,{className:`muted text-label`,style:{marginTop:10},children:[(0,z.jsxs)(`a`,{href:`https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade`,target:`_blank`,rel:`noreferrer`,children:[t(`cloud.azurePortal`),` `,(0,z.jsx)(ve,{style:{width:12,height:12,verticalAlign:`middle`}})]}),` · `,t(`cloud.azureSteps`)]})]}),(0,z.jsxs)(`div`,{className:`panel`,style:{marginBottom:16},children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`cloud.loginTitle`)}),(0,z.jsx)(`p`,{className:`muted text-control`,style:{marginTop:6},children:t(`cloud.loginHint`)}),(0,z.jsx)(`div`,{style:{display:`flex`,gap:8,marginTop:12,flexWrap:`wrap`},children:n?.loggedIn?(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>void A(),disabled:u,children:t(`cloud.logout`)}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>void k(`browser`),disabled:u,children:[(0,z.jsx)(be,{style:{width:14,height:14}}),` `,t(`cloud.login`)]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>void k(`device`),disabled:u,children:t(`cloud.loginDevice`)})]})}),C&&(0,z.jsx)(`div`,{className:`notice notice-ok`,style:{marginTop:14},role:`status`,children:(0,z.jsxs)(`div`,{children:[C.mode===`device`&&C.userCode?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`cloud.deviceCodeTitle`)}),(0,z.jsxs)(`p`,{style:{margin:`8px 0 0`},children:[t(`cloud.deviceCodeHint`),` `,(0,z.jsx)(`a`,{href:C.verificationUriComplete||C.verificationUri,target:`_blank`,rel:`noreferrer`,children:C.verificationUri})]}),(0,z.jsx)(`p`,{className:`mono`,style:{fontSize:`1.4rem`,letterSpacing:`0.12em`,margin:`10px 0 0`},children:C.userCode})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`cloud.browserLoginTitle`)}),(0,z.jsxs)(`p`,{style:{margin:`8px 0 0`},children:[t(`cloud.browserLoginHint`),` `,(0,z.jsx)(`a`,{href:C.authUrl||C.verificationUriComplete||C.verificationUri,target:`_blank`,rel:`noreferrer`,children:t(`cloud.openAuthPage`)})]}),C.redirectUri&&(0,z.jsxs)(`p`,{className:`muted text-label mono`,style:{marginTop:8},children:[t(`cloud.redirectUri`),`: `,C.redirectUri]})]}),(0,z.jsx)(`p`,{className:`muted text-label`,style:{marginTop:8},children:t(`cloud.waitingAuth`)})]})})]}),(0,z.jsxs)(`div`,{className:`panel`,children:[(0,z.jsx)(`div`,{className:`font-semibold`,children:t(`cloud.transferTitle`)}),(0,z.jsx)(`p`,{className:`muted text-control`,style:{marginTop:6},children:t(`cloud.transferHint`)}),(0,z.jsxs)(`label`,{className:`field`,style:{display:`block`,marginTop:14},children:[(0,z.jsx)(`span`,{className:`muted text-label`,children:t(`cloud.passphrase`)}),(0,z.jsx)(`input`,{className:`input`,type:`password`,value:g,onChange:e=>v(e.target.value),placeholder:t(`cloud.passphrasePlaceholder`),autoComplete:`new-password`,disabled:u,style:{marginTop:6,width:`100%`,maxWidth:420}})]}),(0,z.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,marginTop:12},children:[(0,z.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>S(e.target.checked),disabled:u}),(0,z.jsx)(`span`,{children:t(`cloud.includeVault`)})]}),(0,z.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>b(e.target.checked),disabled:u}),(0,z.jsx)(`span`,{children:t(`cloud.includeUsage`)})]})]}),(0,z.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:16,flexWrap:`wrap`},children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>void j(),disabled:u||!n?.loggedIn,children:t(`cloud.push`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>void M(),disabled:u||!n?.loggedIn,children:t(`cloud.pull`)})]}),(0,z.jsx)(`p`,{className:`muted text-label`,style:{marginTop:12},children:t(`cloud.securityNote`)})]})]})}function Cu(e){if(!e||typeof e!=`object`)return`absent`;let t=e.providers;if(!t||typeof t!=`object`||Array.isArray(t)||!Object.hasOwn(t,`openai`))return`absent`;let n=t.openai;if(!n||typeof n!=`object`||Array.isArray(n))return`absent`;let r=n;return r.disabled===!0?`disabled`:r.codexAccountMode===`direct`?`direct`:r.codexAccountMode===void 0||r.codexAccountMode===`pool`?`pool`:`absent`}function wu({state:e,busy:t,onEnable:n}){let r=Y();return(0,z.jsxs)(`div`,{className:`panel openai-account-mode-banner`,style:{marginBottom:16},children:[(0,z.jsxs)(`div`,{className:`row`,children:[(0,z.jsx)(`strong`,{children:r(`codexAuth.accountModeTitle`)}),e===null?(0,z.jsx)(`span`,{className:`badge badge-accent openai-account-mode-banner__badge-slot openai-account-mode-banner__badge-slot--pending`,"aria-hidden":`true`,children:r(`codexAuth.accountModePool`)}):e===`pool`?(0,z.jsx)(`span`,{className:`badge badge-accent openai-account-mode-banner__badge-slot`,children:r(`codexAuth.accountModePool`)}):e===`direct`?(0,z.jsx)(`span`,{className:`badge badge-green openai-account-mode-banner__badge-slot`,children:r(`codexAuth.accountModeDirect`)}):null]}),e===null&&(0,z.jsx)(`p`,{className:`card-sub openai-account-mode-banner__desc openai-account-mode-banner__desc--pending`,"aria-hidden":`true`,children:`\xA0`}),e===`pool`&&(0,z.jsx)(`p`,{className:`card-sub openai-account-mode-banner__desc`,children:r(`codexAuth.accountModePoolDesc`)}),e===`direct`&&(0,z.jsxs)(`p`,{className:`card-sub openai-account-mode-banner__desc`,children:[r(`codexAuth.accountModeDirectDesc`),` `,(0,z.jsx)(`a`,{href:`#providers`,children:r(`codexAuth.openProviders`)})]}),(e===`absent`||e===`disabled`)&&(0,z.jsxs)(`div`,{className:`row`,style:{alignItems:`center`,marginTop:8},children:[(0,z.jsx)(`p`,{className:`card-sub`,style:{flex:1,margin:0},children:r(`codexAuth.openaiUnavailableDesc`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:t,onClick:n,children:r(t?`codexAuth.enablingOpenai`:`codexAuth.enableOpenai`)})]}),e===`invalid`&&(0,z.jsxs)(`p`,{className:`card-sub openai-account-mode-banner__desc`,children:[r(`codexAuth.openaiMissing`),` `,(0,z.jsx)(`a`,{href:`#providers`,children:r(`codexAuth.openProviders`)})]})]})}function Tu(e){if(!e||typeof e!=`object`)return;let t=e.providers;if(!t||typeof t!=`object`||Array.isArray(t)||!Object.hasOwn(t,`openai`))return;let n=t.openai;if(!(!n||typeof n!=`object`||Array.isArray(n)))return n}function Eu({apiBase:e}){let t=Y(),n=`ocx.codex-auth.config.v1:${e}`,r=Z(n),[i,a]=(0,_.useState)(()=>r?.bannerState??null),[o,s]=(0,_.useState)(()=>r?.accountModeState??null),c=(0,_.useRef)(null),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(``),p=(0,_.useCallback)(async()=>{try{let t=await fetch(`${e}/api/config`);if(!t.ok)throw Error(String(t.status));let r=await t.json(),i=_o(Tu(r));if(i===`absent`||i===`disabled`||i===`invalid`){a(i);let e=i===`disabled`?`disabled`:`absent`;s(e),Q(n,{bannerState:i,accountModeState:e});return}let o=Cu(r);a(o),s(o),Q(n,{bannerState:o,accountModeState:o})}catch{}},[e,n]);(0,_.useEffect)(()=>{c.current!==e&&(c.current=e,Promise.resolve().then(()=>{p()}));let t=window.setInterval(()=>{p()},3e4);return()=>{window.clearInterval(t)}},[e,p]);let m=async()=>{u(!0),f(``);try{if(i!==`absent`&&i!==`disabled`)return;await wo(e,i),await p()}catch(e){e instanceof Co?f(t(e.i18nKey)):f(e instanceof Error?e.message:t(`prov.saveFailed`))}finally{u(!1)}};return(0,z.jsx)(Qa,{apiBase:e,accountModeState:o,banner:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(wu,{state:i,busy:l,onEnable:()=>{m()}}),d&&(0,z.jsx)(`div`,{className:`notice notice-err`,role:`alert`,children:d})]})})}function Du(e){return e?[`responses`,`chat`,`messages`]:[`responses`,`chat`]}function Ou(e){let t=e.id.indexOf(`/`),n=typeof e.owned_by==`string`&&e.owned_by.trim()?e.owned_by.trim():void 0,r=t>0?e.id.slice(0,t):n??`openai`,i=t<0&&r===`openai`,a=r!==`openai`&&r!==`combo`;return{id:e.id,displayName:e.id,provider:r,native:i,custom:a}}function ku(e){return e.id}function Au(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.ambiguous===!0?!0:!(typeof t.requests7d!=`number`||!Number.isFinite(t.requests7d)||typeof t.totalRequests!=`number`||!Number.isFinite(t.totalRequests)||t.lastUsedAt!==void 0&&(typeof t.lastUsedAt!=`string`||Number.isNaN(new Date(t.lastUsedAt).getTime())))}var ju=new Set([`required`,`accepted`,`rejected`]);function Mu(e){return Array.isArray(e)&&e.length>0&&e.every(e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.endpoint==`string`&&ju.has(t.bearer)&&ju.has(t.dedicated)&&ju.has(t.xApiKey)})}var Nu={baseUrl:`http://127.0.0.1:10100/v1`,responses:`http://127.0.0.1:10100/v1/responses`,chatCompletions:`http://127.0.0.1:10100/v1/chat/completions`,messages:`http://127.0.0.1:10100/v1/messages`,models:`http://127.0.0.1:10100/v1/models`};function Pu(e){let t=e||Nu.responses,n=t.match(/^(.*)\/v1\/responses\/?$/),r=n?`${n[1]}/v1`:t.replace(/\/responses\/?$/,``);return{baseUrl:r,responses:t,chatCompletions:`${r}/chat/completions`,messages:`${r}/messages`,models:`${r}/models`}}function Fu(e,t){let n=new Date(e);return!e||Number.isNaN(n.getTime())?`—`:n.toLocaleDateString(t)}function Iu({url:e}){return(0,z.jsx)(Lu,{text:e,hintKey:`api.copyUrlHint`,copiedKey:`api.urlCopied`,className:`api-endpoint-url-btn`,children:(0,z.jsx)(`code`,{className:`api-code api-code-inline api-endpoint-url`,children:e})})}function Lu({text:e,hintKey:t,copiedKey:n,className:r,children:i}){let{t:a}=ze(),o=(0,_.useId)(),s=(0,_.useRef)(null),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(null),m=(0,_.useRef)(null),h=c||u;(0,_.useEffect)(()=>()=>{m.current!==null&&window.clearTimeout(m.current)},[]),(0,_.useLayoutEffect)(()=>{if(!h)return;let e=()=>{let e=s.current;if(!e)return;let t=e.getBoundingClientRect();p({top:Math.max(8,t.top-8),left:t.left+t.width/2})};return e(),window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[h]);let g=()=>l(!0),v=()=>l(!1),y=async()=>{try{await navigator.clipboard.writeText(e),d(!0),m.current!==null&&window.clearTimeout(m.current),m.current=window.setTimeout(()=>d(!1),1500)}catch{d(!1)}},b=h&&f?(0,Ge.createPortal)((0,z.jsx)(`span`,{id:o,className:`ocx-tooltip-bubble api-copy-tip-fixed`,role:`tooltip`,style:{top:f.top,left:f.left},children:a(u?n:t)}),document.body):null;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{type:`button`,ref:s,className:`ocx-tooltip ${r}`,onMouseEnter:g,onMouseLeave:v,onFocus:g,onBlur:v,onClick:e=>{if(typeof window<`u`&&window.getSelection()?.toString())return;let t=e.target;if(t instanceof HTMLElement&&t!==e.currentTarget){let n=t.getBoundingClientRect();if(t.scrollHeight>t.clientHeight+1&&e.clientX>=n.right-16||t.scrollWidth>t.clientWidth+1&&e.clientY>=n.bottom-16)return}y()},onKeyDown:e=>{e.key===`Escape`&&v()},"aria-label":a(t),"aria-describedby":h?o:void 0,children:i}),b]})}function Ru({text:e}){return(0,z.jsx)(Lu,{text:e,hintKey:`api.copyExampleHint`,copiedKey:`api.exampleCopied`,className:`api-example-copy-btn`,children:(0,z.jsx)(`code`,{className:`api-code api-example-pre`,children:e})})}function zu(e,t){return t(e===`required`?`api.auth.required`:e===`accepted`?`api.auth.accepted`:`api.auth.rejected`)}function Bu({endpoints:e,claudeCodeEnabled:t,authMatrix:n}){let{t:r}=ze();return(0,z.jsxs)(`div`,{className:`panel api-panel`,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:r(`api.endpointsTitle`)}),(0,z.jsxs)(`div`,{className:`api-endpoints`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`muted small`,children:r(`api.baseUrl`)}),(0,z.jsx)(Iu,{url:e.baseUrl})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`muted small`,children:r(`api.responsesEndpoint`)}),(0,z.jsx)(Iu,{url:e.responses})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`muted small`,children:r(`api.chatCompletionsEndpoint`)}),(0,z.jsx)(Iu,{url:e.chatCompletions})]}),t&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`muted small`,children:r(`api.messagesEndpoint`)}),(0,z.jsx)(Iu,{url:e.messages})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`muted small`,children:r(`api.modelsEndpoint`)}),(0,z.jsx)(Iu,{url:e.models})]})]}),(0,z.jsx)(`p`,{className:`muted small`,children:r(`api.endpointNote`)}),(0,z.jsxs)(`div`,{className:`api-auth-matrix-block`,children:[(0,z.jsx)(`h4`,{className:`api-auth-matrix-title`,children:r(`api.authTitle`)}),(0,z.jsx)(`div`,{className:`api-auth-matrix-scroll`,children:(0,z.jsxs)(`table`,{className:`api-auth-matrix`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:r(`api.auth.endpoint`)}),(0,z.jsx)(`th`,{children:(0,z.jsx)(`code`,{children:`Authorization: Bearer`})}),(0,z.jsx)(`th`,{children:(0,z.jsx)(`code`,{children:`x-opencodex-api-key`})}),(0,z.jsx)(`th`,{children:(0,z.jsx)(`code`,{children:`x-api-key`})})]})}),(0,z.jsx)(`tbody`,{children:n.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{children:(0,z.jsx)(`code`,{children:e.endpoint})}),(0,z.jsx)(`td`,{children:zu(e.bearer,r)}),(0,z.jsx)(`td`,{children:zu(e.dedicated,r)}),(0,z.jsx)(`td`,{children:zu(e.xApiKey,r)})]},e.endpoint))})]})}),(0,z.jsx)(`p`,{className:`muted small`,children:r(`api.authLoopback`)}),(0,z.jsx)(`p`,{className:`muted small`,children:r(`api.authBaseUrlNote`)})]})]})}function Vu({keys:e,keysLoading:t=!1,keysLoadFailed:n,newName:r,creating:i,newKey:a,copied:o,confirmDelete:s,localeTag:c,showKeyList:l=!0,onNewNameChange:u,onCreate:d,onDismissNewKey:f,onCopyKey:p,onConfirmDelete:m,onCancelDelete:h,onDelete:g}){let{t:_}=ze();return(0,z.jsxs)(z.Fragment,{children:[a&&(0,z.jsxs)(`div`,{className:`panel api-panel panel-accent api-newkey-panel`,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:_(`api.newKeyTitle`)}),(0,z.jsx)(`p`,{className:`muted small`,children:_(`api.newKeyNote`)}),(0,z.jsxs)(`div`,{className:`api-form-row`,children:[(0,z.jsx)(`code`,{className:`api-code`,style:{flex:1,wordBreak:`break-all`},children:a}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,onClick:p,children:o?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ie,{}),` `,_(`api.copied`)]}):_(`api.copy`)})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,style:{alignSelf:`flex-start`},onClick:f,children:_(`api.dismiss`)})]}),(0,z.jsxs)(`div`,{className:`panel api-panel api-generate-panel`,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:_(`api.generateTitle`)}),(0,z.jsxs)(`div`,{className:`api-form-row`,children:[(0,z.jsx)(`input`,{id:`api-key-name`,type:`text`,placeholder:_(`api.keyNamePlaceholder`),"aria-label":_(`api.keyNamePlaceholder`),value:r,maxLength:64,onChange:e=>u(e.target.value),className:`input`}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-primary`,onClick:d,disabled:i,children:[(0,z.jsx)(oe,{}),` `,_(i?`api.generating`:`api.generate`)]})]})]}),l&&(0,z.jsxs)(`div`,{className:`panel api-panel`,style:{marginTop:`1rem`},"aria-busy":t,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:t?_(`api.activeKeysLoading`):_(`api.activeKeys`,{count:e.length})}),t?(0,z.jsx)(`div`,{className:`api-active-keys-skeleton`,role:`status`,"aria-label":_(`common.loading`)}):e.length>0?(0,z.jsx)(`div`,{className:`tbl-wrap`,children:(0,z.jsxs)(`table`,{className:`tbl`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:_(`api.colName`)}),(0,z.jsx)(`th`,{children:_(`api.colKey`)}),(0,z.jsx)(`th`,{children:_(`api.colCreated`)}),(0,z.jsx)(`th`,{})]})}),(0,z.jsx)(`tbody`,{children:e.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{children:e.name}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`code`,{children:e.prefix})}),(0,z.jsx)(`td`,{children:Fu(e.createdAt,c)}),(0,z.jsx)(`td`,{children:s===e.id?(0,z.jsxs)(`span`,{className:`api-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-danger`,onClick:()=>g(e.id),children:_(`api.confirm`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,onClick:h,children:_(`common.cancel`)})]}):(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,"aria-label":_(`api.deleteAria`),onClick:()=>m(e.id),children:(0,z.jsx)(ae,{})})})]},e.id))})]})}):n?(0,z.jsx)(`p`,{className:`muted`,children:_(`api.keysLoadFailed`)}):(0,z.jsx)(`p`,{className:`muted`,children:_(`api.noKeys`)})]})]})}function Hu({filteredModels:e,modelsLoading:t,modelsRefreshing:n=!1,modelsLoadFailed:r,modelCount:i,hasModelData:a,modelQuery:o,copiedModelId:s,modelTests:c,claudeCodeEnabled:l,onModelQueryChange:u,onCopyModelId:d,onTestModel:f,onRetryModels:p,canTestModels:m,sourceLabel:h,protocolLabel:g}){let{t:_}=ze();return(0,z.jsxs)(`div`,{className:`panel api-panel api-models-panel`,children:[(0,z.jsxs)(`div`,{className:`api-panel-head`,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:_(`api.modelsTitle`)}),(0,z.jsx)(`span`,{className:`muted mono text-label`,children:_(`api.modelsCount`,{count:e.length})})]}),(0,z.jsx)(`p`,{className:`muted small`,children:_(`api.modelsSubtitle`)}),(0,z.jsx)(`input`,{type:`search`,className:`input`,value:o,onChange:e=>u(e.target.value),placeholder:_(`api.modelsSearch`),"aria-label":_(`api.modelsSearch`)}),r&&(0,z.jsxs)(`div`,{className:`api-models-error`,children:[(0,z.jsx)(`p`,{className:`muted small`,role:`alert`,children:_(`api.modelsLoadFailed`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:p,children:_(`common.retry`)})]}),n&&!t&&(0,z.jsx)(`p`,{className:`muted small`,"aria-live":`polite`,children:_(`api.modelsLoading`)}),t?(0,z.jsx)(Rs,{label:_(`api.modelsLoading`),rows:3}):a?e.length===0?(0,z.jsx)(`p`,{className:`muted small api-models-empty`,children:i===0?_(`api.modelsEmpty`):_(`api.modelsNoMatch`,{query:o.trim()})}):(0,z.jsx)(`div`,{className:`api-models-scroll`,children:(0,z.jsxs)(`table`,{className:`tbl`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:_(`api.colModel`)}),(0,z.jsx)(`th`,{children:_(`api.colSource`)}),(0,z.jsx)(`th`,{children:_(`api.colProtocols`)})]})}),(0,z.jsx)(`tbody`,{children:e.map(e=>{let t=ku(e),n=Du(l);return(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{children:(0,z.jsxs)(`div`,{className:`api-model-cell`,children:[(0,z.jsx)(`code`,{children:t}),e.displayName!==e.id&&(0,z.jsx)(`span`,{className:`muted small`,children:e.displayName})]})}),(0,z.jsx)(`td`,{children:h(e)}),(0,z.jsx)(`td`,{children:(0,z.jsxs)(`div`,{className:`api-model-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,onClick:()=>{d(t)},children:_(s===t?`api.modelCopied`:`api.copyModelId`)}),n.map(n=>{let r=c[t]?.[n],i=r?.state??`idle`;return(0,z.jsxs)(`span`,{className:`api-model-test-chip`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,disabled:i===`testing`||!m,title:m?void 0:_(`api.auth.testNeedsFreshKey`),onClick:()=>{f(e,n)},children:_(`api.auth.testProtocol`,{protocol:g(n)})}),i!==`idle`&&(0,z.jsx)(`span`,{className:`api-test-note api-test-note--${i}`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:i===`testing`?_(`api.testingModel`):i===`ok`?_(`api.testSucceeded`):r?.detail??_(`api.testFailed`)})]},n)})]})})]},t)})})]})}):null]})}function Uu({endpoints:e,claudeCodeEnabled:t}){let{t:n}=ze(),r=JSON.stringify(n(`api.usageSampleInput`)),i=`curl ${e.chatCompletions} \\
48
- -H "x-opencodex-api-key: ocx_YOUR_KEY_HERE" \\
49
- -H "Content-Type: application/json" \\
50
- -d '{
51
- "model": "gpt-5.4",
52
- "messages": [{"role": "user", "content": ${r}}]
53
- }'`,a=`curl ${e.responses} \\
54
- -H "x-opencodex-api-key: ocx_YOUR_KEY_HERE" \\
55
- -H "Content-Type: application/json" \\
56
- -d '{
57
- "model": "gpt-5.4",
58
- "input": ${r}
59
- }'`,o=`curl ${e.messages} \\
60
- -H "x-opencodex-api-key: ocx_YOUR_KEY_HERE" \\
61
- -H "Content-Type: application/json" \\
62
- -d '{
63
- "model": "claude-sonnet-4-6",
64
- "max_tokens": 64,
65
- "messages": [{"role": "user", "content": ${r}}]
66
- }'`;return(0,z.jsxs)(`section`,{className:`panel api-panel awi-usage-panel`,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:n(`api.workspace.usageExamples`)}),(0,z.jsxs)(`div`,{className:`awi-usage-panel-body`,children:[(0,z.jsxs)(`div`,{className:`awi-usage-example`,children:[(0,z.jsx)(`h4`,{className:`awi-usage-example-title`,children:n(`api.usageChatTitle`)}),(0,z.jsx)(Ru,{text:i})]}),(0,z.jsxs)(`div`,{className:`awi-usage-example`,children:[(0,z.jsx)(`h4`,{className:`awi-usage-example-title`,children:n(`api.usageResponsesTitle`)}),(0,z.jsx)(Ru,{text:a})]}),t&&(0,z.jsxs)(`div`,{className:`awi-usage-example`,children:[(0,z.jsx)(`h4`,{className:`awi-usage-example-title`,children:n(`api.usageMessagesTitle`)}),(0,z.jsx)(Ru,{text:o})]})]})]})}var Wu=[`opencode`,`pi`],Gu={opencode:`api.clientConfig.clientOpencode`,pi:`api.clientConfig.clientPi`},Ku={opencode:`/provider-icons/opencode.svg`,pi:`/provider-icons/pi.svg`};function qu({client:e,apiBase:t,onOpenDetails:n,onCopy:r,onDownload:i}){let a=Y(),[o,s]=(0,_.useState)(0),c=[t,e,String(o)].join(`|`),[l,u]=(0,_.useState)(null);(0,_.useEffect)(()=>{let n=new AbortController,r=!1;return(async()=>{try{let i=await fetch(`${t}/api/client-config?client=${encodeURIComponent(e)}`,{signal:n.signal});if(!i.ok)throw Error(String(i.status));let a=await i.json();if(r)return;u({key:c,data:a,failed:!1})}catch{if(r)return;u({key:c,data:null,failed:!0})}})(),()=>{r=!0,n.abort()}},[t,e,c]);let d=l!==null&&l.key===c?l:null,f=d?.data??null,p=d?.failed??!1,m=d===null,h=a(Gu[e]),g=Ku[e],v=f?`${JSON.stringify(f.config,null,2)}\n`:``,y=(0,_.useCallback)(t=>{f&&n(e,f,v,t.currentTarget)},[e,f,v,n]);return(0,z.jsxs)(`li`,{className:`awi-clientconfig-row`,children:[(0,z.jsx)(`span`,{className:`awi-clientconfig-mark`,"aria-hidden":`true`,children:g?(0,z.jsx)(`img`,{src:g,alt:``,width:20,height:20}):(0,z.jsx)(`span`,{className:`awi-clientconfig-monogram`,children:h.slice(0,1)})}),(0,z.jsxs)(`span`,{className:`awi-clientconfig-identity`,children:[(0,z.jsx)(`span`,{className:`awi-clientconfig-name`,children:h}),(0,z.jsx)(`span`,{className:`muted text-label awi-clientconfig-meta`,children:m?a(`api.clientConfig.loading`):p||!f?(0,z.jsx)(`span`,{role:`alert`,children:a(`api.clientConfig.rowError`,{client:h})}):a(`api.clientConfig.rowMeta`,{destination:f.destination,count:f.modelCount})})]}),(0,z.jsx)(`span`,{className:`awi-clientconfig-row-actions`,children:p&&!m?(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>s(e=>e+1),children:a(`common.retry`)}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"aria-label":a(`api.clientConfig.copyAria`,{client:h}),disabled:!f,onClick:()=>{f&&r(e,v)},children:a(`api.clientConfig.copy`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,"aria-label":a(`api.clientConfig.downloadAria`,{client:h}),disabled:!f,onClick:()=>{f&&i(e,f,v)},children:a(`api.clientConfig.download`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,"aria-label":a(`api.clientConfig.detailsAria`,{client:h}),disabled:!f,onClick:y,children:a(`api.clientConfig.details`)})]})})]})}function Ju({client:e,envelope:t,json:n,hasKeys:r,onClose:i,onCopy:a,onDownload:o}){let s=Y(),c=(0,_.useRef)(null),l=`awi-clientconfig-dialog-${e}`;return(0,_.useEffect)(()=>{let e=c.current;return e&&!e.open&&e.showModal(),()=>{e?.open&&e.close()}},[]),(0,z.jsxs)(`dialog`,{ref:c,className:`modal-overlay`,"aria-labelledby":l,onCancel:(0,_.useCallback)(e=>{e.preventDefault(),i()},[i]),children:[(0,z.jsx)(`button`,{type:`button`,className:`modal-backdrop-dismiss`,"aria-label":s(`common.close`),tabIndex:-1,onClick:i}),(0,z.jsxs)(`div`,{className:`modal-card awi-clientconfig-dialog`,onClick:e=>e.stopPropagation(),role:`document`,children:[(0,z.jsxs)(`div`,{className:`modal-head`,children:[(0,z.jsx)(`h3`,{id:l,children:s(Gu[e])}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:i,children:s(`common.close`)})]}),(0,z.jsx)(`pre`,{className:`api-code api-example-pre awi-clientconfig-json`,tabIndex:0,role:`group`,"aria-label":s(`api.clientConfig.jsonLabel`,{client:s(Gu[e])}),children:n}),(0,z.jsx)(`p`,{className:`muted small awi-clientconfig-count`,children:s(`api.clientConfig.modelCount`,{count:t.modelCount})}),t.modelsWithoutLimits>0&&(0,z.jsx)(`p`,{className:`muted small awi-clientconfig-degraded`,children:s(`api.clientConfig.missingLimits`,{count:t.modelsWithoutLimits,total:t.modelCount})}),!r&&(0,z.jsx)(`p`,{className:`muted small awi-clientconfig-nokey`,children:s(`api.clientConfig.noKeyYet`,{env:t.apiKeyEnv})}),(0,z.jsxs)(`div`,{className:`awi-clientconfig-line`,children:[(0,z.jsx)(`span`,{className:`muted text-label`,children:s(`api.clientConfig.destination`)}),(0,z.jsx)(Ru,{text:t.destination})]}),(0,z.jsxs)(`div`,{className:`awi-clientconfig-line`,children:[(0,z.jsx)(`span`,{className:`muted text-label`,children:s(`api.clientConfig.envHint`)}),(0,z.jsx)(Ru,{text:t.exportHint})]}),(0,z.jsx)(`p`,{className:`muted small awi-clientconfig-merge`,children:s(`api.clientConfig.mergeWarning`)}),(0,z.jsx)(`p`,{className:`muted text-label awi-clientconfig-where-title`,children:s(`api.clientConfig.whereDisclosure`)}),(0,z.jsx)(`p`,{className:`muted small`,children:s(`api.clientConfig.whereBody`)}),(0,z.jsxs)(`div`,{className:`modal-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:a,children:s(`api.clientConfig.copy`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,onClick:o,children:s(`api.clientConfig.download`)})]})]})]})}function Yu({apiBase:e,baseUrl:t,hasKeys:n}){let r=Y(),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(``),c=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(i!==null)return;let e=c.current;e&&(c.current=null,e.isConnected&&e.focus())},[i]);let l=(0,_.useCallback)(async(e,t,n)=>{try{await navigator.clipboard.writeText(t),s(n?r(`api.clientConfig.copiedAnnounceClient`,{client:r(Gu[e])}):r(`api.clientConfig.copiedAnnounce`))}catch{s(r(`api.clientConfig.copyFailed`))}},[r]),u=(0,_.useCallback)((e,t,n)=>{let i=URL.createObjectURL(new Blob([n],{type:`application/json`})),a=document.createElement(`a`);a.href=i,a.download=t.filename,a.click(),URL.revokeObjectURL(i),s(r(`api.clientConfig.downloadedAnnounce`,{filename:t.filename,destination:t.destination}))},[r]),d=(0,_.useCallback)(()=>a(null),[]),f=(0,_.useCallback)((e,t,n,r)=>{c.current=r,a({client:e,envelope:t,json:n})},[]);return(0,z.jsxs)(`section`,{className:`panel api-panel awi-clientconfig-panel`,children:[(0,z.jsx)(`div`,{className:`api-panel-head awi-clientconfig-head`,children:(0,z.jsx)(`h3`,{className:`panel-title`,children:r(`api.clientConfig.title`)})}),(0,z.jsx)(`ul`,{className:`awi-clientconfig-rows`,"aria-label":r(`api.clientConfig.rowsLabel`),children:Wu.map(t=>(0,z.jsx)(qu,{client:t,apiBase:e,onOpenDetails:f,onCopy:(e,t)=>{l(e,t,!0)},onDownload:u},t))}),(0,z.jsxs)(`div`,{className:`awi-clientconfig-line`,children:[(0,z.jsx)(`span`,{className:`muted text-label`,children:r(`api.baseUrl`)}),(0,z.jsx)(Ru,{text:t})]}),(0,z.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:o}),i&&(0,z.jsx)(Ju,{client:i.client,envelope:i.envelope,json:i.json,hasKeys:n,onClose:d,onCopy:()=>{l(i.client,i.json,!1)},onDownload:()=>u(i.client,i.envelope,i.json)})]})}function Xu({keys:e,keysLoading:t,keysLoadFailed:n,attributionSince:r,localeTag:i,busy:a,onSelect:o}){let s=Y();return(0,z.jsxs)(`div`,{className:`panel api-panel awi-keylist-panel`,"aria-busy":t,children:[(0,z.jsx)(`div`,{className:`api-panel-head`,children:(0,z.jsx)(`h3`,{className:`panel-title`,children:t?s(`api.activeKeysLoading`):s(`api.activeKeys`,{count:e.length})})}),t?(0,z.jsx)(`div`,{className:`api-active-keys-skeleton`,role:`status`,"aria-label":s(`common.loading`)}):e.length===0?(0,z.jsx)(`p`,{className:`muted small`,children:s(n?`api.keysLoadFailed`:`api.noKeys`)}):(0,z.jsx)(`div`,{className:`tbl-wrap`,children:(0,z.jsxs)(`table`,{className:`tbl awi-keylist-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:s(`api.colName`)}),(0,z.jsx)(`th`,{children:s(`api.colKey`)}),(0,z.jsx)(`th`,{children:s(`api.attribution.requests7d`)}),(0,z.jsx)(`th`,{children:s(`api.attribution.lastUsed`)})]})}),(0,z.jsx)(`tbody`,{children:e.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{children:(0,z.jsx)(`button`,{type:`button`,className:`awi-keylist-name`,disabled:a,onClick:()=>o(e.id),children:e.name})}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`code`,{children:e.prefix})}),(0,z.jsx)(`td`,{children:r?e.usage.ambiguous?s(`api.attribution.railAmbiguous`):e.usage.requests7d.toLocaleString(i):s(`api.attribution.unavailable`)}),(0,z.jsx)(`td`,{children:!r||e.usage.ambiguous?`—`:e.usage.lastUsedAt?Fu(e.usage.lastUsedAt,i):s(`api.attribution.neverUsed`)})]},e.id))})]})})]})}function Zu({keys:e,apiBase:t,attributionSince:n,historyTruncated:r,authMatrix:i,keysLoading:a,keysLoadFailed:o,endpoints:s,claudeCodeEnabled:c,localeTag:l,newName:u,creating:d,newKey:f,copied:p,filteredModels:m,modelsLoading:h,modelsRefreshing:g=!1,modelsLoadFailed:v,modelCount:y,hasModelData:b,modelQuery:x,copiedModelId:S,modelTests:C,canTestModels:w,onNewNameChange:T,onCreate:E,onDismissNewKey:D,onCopyKey:O,onDelete:k,onRename:A,onModelQueryChange:j,onCopyModelId:M,onTestModel:N,onRetryModels:P,sourceLabel:F,protocolLabel:I}){let L=Y(),[R,B]=(0,_.useState)(null),[V,H]=(0,_.useState)(!1),[U,W]=(0,_.useState)(!1),[ee,G]=(0,_.useState)(!1),[te,ne]=(0,_.useState)(!1),[K,re]=(0,_.useState)(``),[ie,ae]=(0,_.useState)(!1),[oe,q]=(0,_.useState)(!1),[se,ce]=(0,_.useState)(!1),J=R?e.find(e=>e.id===R)??null:null,ue=ee||ie,de=(0,_.useMemo)(()=>[{id:`keys`,label:L(`api.section.keys`),meta:a?void 0:String(e.length)},{id:`connect`,label:L(`api.section.connect`)},{id:`endpoints`,label:L(`api.section.endpoints`)},{id:`models`,label:L(`api.section.models`),meta:String(y)},{id:`examples`,label:L(`api.section.examples`)}],[L,e.length,a,y]),fe=()=>{H(!1),W(!1)},pe=()=>{B(null),fe(),ne(!1),q(!1),ce(!1)};(0,_.useEffect)(()=>{if(!V)return;let e=window.setTimeout(()=>W(!0),300);return()=>window.clearTimeout(e)},[V]);let me=()=>{J&&H(!0)},ge=async()=>{if(!(!J||!U||ee)){G(!0),ce(!1);try{await k(J.id)?(fe(),B(null)):ce(!0)}finally{G(!1)}}},_e=()=>{J&&(re(J.name),q(!1),ne(!0))},ve=async()=>{if(!J||ie)return;let e=K.trim();if(!e||e===J.name){ne(!1);return}ae(!0),q(!1);try{await A(J.id,e)?ne(!1):q(!0)}finally{ae(!1)}};return(0,z.jsxs)(`div`,{className:`apikeys-workspace-shell`,children:[!J&&(0,z.jsx)(fc,{scope:`api`,items:de,ariaLabel:L(`api.workspace.sections`)}),(0,z.jsx)(`div`,{className:`apikeys-workspace-root`,children:(0,z.jsx)(`section`,{className:`apikeys-workspace-main`,"aria-label":L(`api.workspace.details`),children:J?(0,z.jsxs)(`div`,{className:`awi-detail`,children:[(0,z.jsx)(`div`,{className:`awi-detail-toolbar`,children:(0,z.jsxs)(`button`,{type:`button`,className:`awi-back`,onClick:pe,disabled:ue,children:[(0,z.jsx)(he,{className:`awi-back-chevron`,"aria-hidden":`true`}),L(`modal.back`)]})}),(0,z.jsxs)(`div`,{className:`awi-detail-body`,children:[(0,z.jsxs)(`div`,{className:`awi-detail-head`,children:[(0,z.jsx)(`h2`,{className:`awi-detail-title`,children:J.name}),(0,z.jsx)(`span`,{className:`awi-detail-actions`,children:V?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-danger btn-sm awi-confirm-delete`,onClick:()=>{ge()},disabled:!U||ee,children:[(0,z.jsx)(le,{}),` `,L(ee?`api.key.deleting`:`api.confirm`)]},`confirm-delete`),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:fe,disabled:ee,children:L(`common.cancel`)})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:_e,disabled:te,children:L(`api.key.rename`)},`rename`),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-danger btn-sm`,onClick:me,"aria-label":L(`api.deleteAria`),children:[(0,z.jsx)(le,{}),` `,L(`api.workspace.deleteKey`)]},`request-delete`)]})})]}),V&&(0,z.jsx)(`p`,{className:`muted awi-delete-hint`,children:L(`api.workspace.deleteConfirm`)}),se&&(0,z.jsx)(`p`,{className:`awi-delete-error`,role:`alert`,children:L(`api.deleteFailed`)}),te&&(0,z.jsxs)(`div`,{className:`awi-rename`,children:[(0,z.jsx)(`label`,{className:`awi-rename-label`,htmlFor:`awi-key-name`,children:L(`api.key.name`)}),(0,z.jsx)(`input`,{id:`awi-key-name`,className:`input`,type:`text`,value:K,maxLength:64,disabled:ie,onChange:e=>re(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),ve())}}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-sm`,onClick:()=>{ve()},disabled:ie,children:L(ie?`api.key.renaming`:`api.key.saveName`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>ne(!1),disabled:ie,children:L(`common.cancel`)}),oe&&(0,z.jsx)(`p`,{className:`awi-rename-error`,role:`alert`,children:L(`api.key.renameFailed`)})]}),(0,z.jsxs)(`div`,{className:`awi-section`,children:[(0,z.jsx)(`h3`,{className:`awi-section-title`,children:L(`api.workspace.keyDetails`)}),(0,z.jsxs)(`dl`,{className:`awi-kv`,children:[(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:L(`api.workspace.keyPrefix`)}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(`code`,{children:J.prefix})})]}),(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:L(`api.colCreated`)}),(0,z.jsx)(`dd`,{children:Fu(J.createdAt,l)})]})]})]}),(0,z.jsxs)(`div`,{className:`awi-section`,children:[(0,z.jsx)(`h3`,{className:`awi-section-title`,children:L(`api.attribution.title`)}),n?J.usage.ambiguous?(0,z.jsx)(`p`,{className:`muted`,children:L(`api.attribution.ambiguous`)}):(0,z.jsxs)(`dl`,{className:`awi-kv`,children:[(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:L(`api.attribution.requests7d`)}),(0,z.jsx)(`dd`,{children:J.usage.requests7d.toLocaleString(l)})]}),(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:L(r?`api.attribution.totalRequestsAvailable`:`api.attribution.totalRequests`)}),(0,z.jsx)(`dd`,{children:J.usage.totalRequests.toLocaleString(l)})]}),(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:L(`api.attribution.lastUsed`)}),(0,z.jsx)(`dd`,{children:J.usage.lastUsedAt?Fu(J.usage.lastUsedAt,l):L(`api.attribution.neverUsed`)})]}),(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:L(r?`api.attribution.sinceAvailable`:`api.attribution.since`)}),(0,z.jsx)(`dd`,{children:Fu(n,l)})]})]}):(0,z.jsx)(`p`,{className:`muted`,children:L(`api.attribution.unavailableDetail`)})]})]})]}):(0,z.jsx)(`div`,{className:`awi-overview`,children:(0,z.jsxs)(`div`,{className:`awi-overview-section`,children:[(0,z.jsxs)(`div`,{id:lc(`api`,`keys`),className:`awi-section-anchor`,children:[(0,z.jsx)(Vu,{keys:e,keysLoading:a,keysLoadFailed:o,newName:u,creating:d,newKey:f,copied:p,confirmDelete:null,localeTag:l,showKeyList:!1,onNewNameChange:T,onCreate:E,onDismissNewKey:D,onCopyKey:O,onConfirmDelete:()=>{},onCancelDelete:()=>{},onDelete:()=>{}}),(0,z.jsx)(Xu,{keys:e,keysLoading:a,keysLoadFailed:o,attributionSince:n,localeTag:l,busy:ue,onSelect:e=>{B(e),fe(),ne(!1),q(!1),ce(!1)}})]}),(0,z.jsx)(`div`,{id:lc(`api`,`connect`),className:`awi-section-anchor`,children:(0,z.jsx)(Yu,{apiBase:t,baseUrl:s.baseUrl,hasKeys:e.length>0})}),(0,z.jsx)(`div`,{id:lc(`api`,`endpoints`),className:`awi-section-anchor`,children:(0,z.jsx)(Bu,{endpoints:s,claudeCodeEnabled:c,authMatrix:i})}),(0,z.jsx)(`div`,{id:lc(`api`,`models`),className:`awi-section-anchor`,children:(0,z.jsx)(Hu,{filteredModels:m,modelsLoading:h,modelsRefreshing:g,modelsLoadFailed:v,modelCount:y,hasModelData:b,modelQuery:x,copiedModelId:S,modelTests:C,claudeCodeEnabled:c,onModelQueryChange:j,onCopyModelId:M,onTestModel:N,onRetryModels:P,canTestModels:w,sourceLabel:F,protocolLabel:I})}),(0,z.jsx)(`div`,{id:lc(`api`,`examples`),className:`awi-section-anchor`,children:(0,z.jsx)(Uu,{endpoints:s,claudeCodeEnabled:c})})]})})})})]})}var Qu=[],$u=15e3;function ed(e){let t=e.replace(/\/$/,``);if(!t)return Nu;try{return new URL(t).host?Pu(`${t}/v1/responses`):Nu}catch{return Nu}}function td(e){return!e||!Mu(e.authMatrix)||!Array.isArray(e.keys)||e.keys.some(e=>!e||!Au(e.usage))?null:e}function nd({apiBase:e}){let{t,locale:n}=ze(),r=Pe.find(e=>e.code===n)?.htmlLang,i=`ocx.apikeys.list.v2:${e}`,a=`ocx.apikeys.models.v1:${e}`,o=`api-keys:${e}`,s=`api-models:${e}`,c=td(Z(i)),l=Z(a),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)({}),[y,b]=(0,_.useState)(``),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(null),[T,E]=(0,_.useState)(!1),D=(0,_.useRef)(!1),O=(0,_.useCallback)(async n=>{let r=await lt(await fetch(`${e}/api/keys`,{signal:n}));if(!r||!Mu(r.authMatrix))throw Error(t(`api.keysLoadFailed`));let a=r.keys??[];if(a.some(e=>!Au(e.usage)))throw Error(t(`api.keysLoadFailed`));let o=a,s=Pu(r.endpoint??``),c={keys:o,endpoints:{baseUrl:r.baseUrl??s.baseUrl,responses:r.responsesEndpoint??r.endpoint??Nu.responses,chatCompletions:r.chatCompletionsEndpoint??s.chatCompletions,messages:r.messagesEndpoint??s.messages,models:r.modelsEndpoint??s.models},claudeCodeEnabled:r.claudeCodeEnabled!==!1,...r.attributionSince?{attributionSince:r.attributionSince}:{},...r.historyTruncated===!0?{historyTruncated:!0}:{},authMatrix:r.authMatrix};return Q(i,c),c},[e,i,t]),k=(0,_.useCallback)(async n=>{let r=await fetch(`${e}/v1/models`,{signal:n});if(!r.ok)throw Error(t(`api.modelsLoadFailed`));let i=await r.json(),o=Array.isArray(i)?i:typeof i==`object`&&i&&Array.isArray(i.data)?i.data:null;if(!o)throw Error(t(`api.modelsLoadFailed`));let s=o.filter(e=>typeof e==`object`&&!!e&&typeof e.id==`string`).map(e=>Ou(e)).sort((e,t)=>ku(e).localeCompare(ku(t)));return Q(a,s),s},[e,a,t]),A=Is(o,[e],O,{isEmpty:e=>e.keys.length===0,initialData:c??void 0}),j=Is(s,[e],k,{isEmpty:e=>e.length===0,initialData:l??void 0}),M=A.state,N=j.state,P=M.data??c,F=N.data??l??Qu,I=P?.keys??[],L=P?.endpoints??ed(e),R=P?.claudeCodeEnabled??!0,B=P?.attributionSince,V=P?.historyTruncated===!0,H=P?.authMatrix??[],U=A.refresh,W=j.refresh,ee=(0,_.useMemo)(()=>{let e=f.trim().toLowerCase();return e?F.filter(t=>ku(t).toLowerCase().includes(e)||t.displayName.toLowerCase().includes(e)||t.provider.toLowerCase().includes(e)):F},[f,F]),G=async n=>{if(D.current)return!1;D.current=!0,S(!0),d(null);try{let r=n??y,i=await ct(await fetch(`${e}/api/keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:r||`default`})}),t(`api.createFailed`));return typeof i?.key!=`string`||i.key.length===0?(d(t(`api.createFailed`)),!1):(w(i.key),b(``),U(),!0)}catch{return d(t(`api.createFailed`)),!1}finally{D.current=!1,S(!1)}},te=async t=>{d(null);let n=Rt($u);try{return(await fetch(`${e}/api/keys`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:t}),signal:n.signal})).ok?(U(),!0):!1}catch{return!1}finally{n.clear()}},ne=async(t,n)=>{d(null);let r=Rt($u);try{return(await fetch(`${e}/api/keys`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:t,name:n}),signal:r.signal})).ok?(U(),!0):!1}catch{return!1}finally{r.clear()}},K=async()=>{if(C){d(null);try{await navigator.clipboard.writeText(C),E(!0),window.setTimeout(()=>E(!1),2e3)}catch{E(!1),d(t(`api.key.copyFailed`))}}},re=async e=>{try{await navigator.clipboard.writeText(e),h(e),window.setTimeout(()=>h(t=>t===e?null:t),2e3)}catch{}},ie=e=>e.native?t(`api.sourceNative`):e.provider===`combo`?t(`api.sourceCombo`):e.custom?t(`api.sourceCustom`):e.provider,ae=e=>t(e===`responses`?`api.protocolResponses`:e===`messages`?`api.protocolMessages`:`api.protocolChatCompletions`),oe=(e,t)=>e===`responses`?{url:L.responses,body:{model:t,input:`ping`,max_output_tokens:1,stream:!1}}:e===`messages`?{url:L.messages,body:{model:t,max_tokens:1,messages:[{role:`user`,content:`ping`}]}}:{url:L.chatCompletions,body:{model:t,messages:[{role:`user`,content:`ping`}],max_tokens:1,stream:!1}},q=(e,t,n)=>v(r=>({...r,[e]:{...r[e],[t]:n}})),se=async(e,n)=>{if(!C)return;let r=ku(e),i=oe(n,r);q(r,n,{state:`testing`});try{let e=await fetch(i.url,{method:`POST`,headers:{"Content-Type":`application/json`,"x-opencodex-api-key":C},body:JSON.stringify(i.body)});if(!e.ok){q(r,n,{state:`error`,detail:(await e.text()).slice(0,160)||String(e.status)});return}q(r,n,{state:`ok`})}catch(e){q(r,n,{state:`error`,detail:e instanceof Error?e.message:t(`api.testFailed`)})}},ce=t(`api.subtitle`).split(`{authHeader}`);return(0,z.jsxs)(`section`,{className:`api-page`,"aria-busy":M.refreshing||N.refreshing||void 0,children:[(0,z.jsx)(`div`,{className:`page-head`,children:(0,z.jsx)(`h2`,{children:t(`api.title`)})}),(0,z.jsxs)(`p`,{className:`page-sub`,children:[ce[0],(0,z.jsx)(`code`,{children:`x-opencodex-api-key`}),ce[1]]}),u&&(0,z.jsx)(X,{tone:`err`,children:u}),M.showError&&P&&(0,z.jsx)(X,{tone:`err`,children:t(`api.keysLoadFailed`)}),M.showSkeleton&&!P?(0,z.jsx)(Rs,{label:t(`api.activeKeysLoading`),rows:4}):M.kind===`failed-cold`&&!P?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(X,{tone:`err`,children:M.error instanceof Error?M.error.message:t(`api.keysLoadFailed`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>U(),children:t(`common.retry`)})]}):(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(Zu,{keys:I,apiBase:e,attributionSince:B,historyTruncated:V,authMatrix:H,keysLoading:!1,keysLoadFailed:M.showError,endpoints:L,claudeCodeEnabled:R,localeTag:r,newName:y,creating:x,newKey:C,copied:T,filteredModels:ee,modelsLoading:N.showSkeleton&&!N.data&&!l,modelsRefreshing:N.refreshing&&N.showError&&(N.data!==void 0||l!==null),modelsLoadFailed:N.showError,modelCount:F.length,hasModelData:N.data!==void 0||l!==null,modelQuery:f,copiedModelId:m,modelTests:g,onNewNameChange:b,onCreate:()=>{G()},onDismissNewKey:()=>w(null),onCopyKey:()=>{K()},onDelete:te,onRename:ne,onModelQueryChange:p,onCopyModelId:e=>{re(e)},onTestModel:(e,t)=>{se(e,t)},onRetryModels:()=>{W({forceLoading:!0})},canTestModels:C!==null,sourceLabel:ie,protocolLabel:ae})})]})}function rd(e,t){let n=(e??[]).map(e=>({value:e,label:ds(e)}));return[{value:``,label:t},...n]}function id(e){let t=e.autoConnectSupported===!0;return{autoConnectSupported:t,systemEnv:t&&e.systemEnv===!0}}var ad=[`ANTHROPIC_MODEL`,`ANTHROPIC_DEFAULT_OPUS_MODEL`,`ANTHROPIC_DEFAULT_SONNET_MODEL`,`ANTHROPIC_DEFAULT_HAIKU_MODEL`,`ANTHROPIC_DEFAULT_FABLE_MODEL`];function od(e){let t=`http://127.0.0.1:${e.port}`,n=e.authMode===`auto`?e.markerMode??`subscription`:e.authMode,r=e.autoContext&&e.maxContextTokens===null,i=ad.filter(t=>e.effectiveModelEnv[t]).map(t=>`export ${t}=${e.effectiveModelEnv[t]}`);return[`export ANTHROPIC_BASE_URL=${t}`,...n===`proxy`?[`export ANTHROPIC_AUTH_TOKEN=opencodex-proxy`]:[`# no ANTHROPIC_AUTH_TOKEN: your claude.ai login (and connectors) stay active`],`export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1`,...n===`proxy`?['[ -z "${CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST+x}" ] && export CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1']:[],...r?[`export CLAUDE_CODE_AUTO_COMPACT_WINDOW=${e.autoCompactWindow??35e4}`]:[],...i,`claude`].join(`
67
- `)}function sd(e){return e?e.backend??`auto`:`inherit`}function cd(e,t){if(t!==`inherit`)return t===`auto`?{...e,backend:void 0}:{...e,backend:t}}function ld(e,t){return{...e,model:t}}function ud(e){if(!e)return null;let t=(e.model??``).trim();return e.backend?{backend:e.backend,model:t}:t?{backend:null,model:t}:null}function dd({label:e,checked:t,onChange:n,disabled:r=!1,describedBy:i}){return(0,z.jsxs)(`label`,{className:`toggle`,children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:t,disabled:r,"aria-label":e,"aria-describedby":i,onChange:e=>n(e.target.checked)}),(0,z.jsx)(`span`,{className:`slider`,"aria-hidden":`true`})]})}function fd({supported:e,checked:t,onChange:n}){let r=Y(),i=e?void 0:`claude-system-env-unsupported`;return(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`div`,{className:`setting-label`,children:[(0,z.jsx)(`span`,{className:`title`,children:r(`claude.systemEnv`)}),e?(0,z.jsx)(`span`,{className:`desc`,children:r(`claude.systemEnvDesc`)}):(0,z.jsx)(`span`,{className:`desc`,id:i,children:(0,z.jsx)(Ve,{k:`claude.systemEnvUnsupported`,cmd:`ocx claude`})}),e&&t&&(0,z.jsx)(`span`,{className:`desc`,style:{color:`var(--red)`},children:r(`claude.systemEnvWarn`)})]}),(0,z.jsx)(dd,{label:r(`claude.systemEnv`),checked:e&&t,disabled:!e,describedBy:i,onChange:n})]})}function pd({value:e,tierHaikuModel:t,options:n,onChange:r}){let i=Y(),a=t??e;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`muted text-label`,style:{margin:`0 0 8px`},children:i(`claude.smallFastModelAccurateHint`)}),(0,z.jsx)(rt,{value:e,options:n,onChange:r,label:i(`claude.smallFastModel`),style:{maxWidth:420}}),a===``&&(0,z.jsx)(`p`,{className:`notice-warn`,role:`status`,style:{marginTop:8},children:i(`claude.smallFastModelNativeWarning`)})]})}function md(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)try{return crypto.randomUUID()}catch{}let e=new Uint8Array(16);if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`)crypto.getRandomValues(e);else for(let t=0;t<16;t++)e[t]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function hd(e,t=`en`){if(e>=1e6){let n=e/1e6,r=n.toFixed(1).replace(/\.0$/,``);return Number.isInteger(n)||Number(r)*1e6===e?new Intl.NumberFormat(t,{notation:`compact`,compactDisplay:`short`,maximumFractionDigits:+!Number.isInteger(n)}).format(e):`${Math.round(e/1e3)}k`}return`${Math.round(e/1e3)}k`}function gd(e,t){return e&&[`claude-json-oauth`,`claude-credentials-file`,`macos-keychain`,`exported-env`].includes(e)?t(`claude.authSource.${e}`):t(`claude.authSource.unknown`)}function _d({state:e,autoCompactOptions:t,availableModels:n,onStateChange:r}){let i=Y();return(0,z.jsxs)(`div`,{className:`card`,style:{overflow:`hidden`},children:[(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`div`,{className:`setting-label`,children:[(0,z.jsx)(`span`,{className:`title`,children:i(`claude.enabledLabel`)}),(0,z.jsx)(`span`,{className:`desc`,children:i(`claude.enabledHint`)})]}),(0,z.jsx)(dd,{label:i(`claude.enabledLabel`),checked:e.enabled,onChange:t=>r({...e,enabled:t})})]}),(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`div`,{className:`setting-label`,children:[(0,z.jsx)(`span`,{className:`title`,children:i(`claude.authMode`)}),(0,z.jsx)(`span`,{className:`desc`,children:i(`claude.authModeHint`)})]}),(0,z.jsx)(`div`,{className:`setting-controls`,children:(0,z.jsx)(rt,{value:e.authMode,options:[{value:`auto`,label:i(`claude.authModeAuto`)},{value:`subscription`,label:i(`claude.authModeSubscription`)},{value:`proxy`,label:i(`claude.authModeProxy`)}],onChange:t=>r({...e,authMode:t}),label:i(`claude.authMode`),style:{minWidth:220},align:`right`,portal:!0})})]}),e.authModeOrigin&&(0,z.jsxs)(`div`,{className:`claude-effective-auth${e.authModeOrigin===`auto-unknown`?` warn`:``}`,role:`status`,children:[(0,z.jsx)(`span`,{className:`claude-effective-auth-label`,children:i(`claude.effectiveMode.label`)}),(0,z.jsxs)(`span`,{children:[e.authModeOrigin===`manual`?i(`claude.effectiveMode.manual`,{mode:e.markerMode===`proxy`?i(`claude.authModeProxy`):i(`claude.authModeSubscription`)}):e.authModeOrigin===`auto-present`?i(`claude.effectiveMode.autoPresent`,{source:gd(e.authFoundBy,i)}):e.authModeOrigin===`auto-absent`?i(`claude.effectiveMode.autoAbsent`):i(`claude.effectiveMode.autoUnknown`),e.admissionKeyActive===!0?` ${i(`claude.effectiveMode.admissionKey`)}`:``]})]}),(0,z.jsx)(fd,{supported:e.autoConnectSupported,checked:e.systemEnv,onChange:t=>r({...e,systemEnv:t})}),(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`div`,{className:`setting-label`,children:[(0,z.jsx)(`span`,{className:`title`,children:i(`claude.fastMode`)}),(0,z.jsx)(`span`,{className:`desc`,children:i(`claude.fastModeDesc`)})]}),(0,z.jsx)(`div`,{className:`setting-controls`,children:(0,z.jsx)(rt,{value:e.fastMode===null?`auto`:e.fastMode?`on`:`off`,options:[{value:`auto`,label:i(`claude.fastAuto`)},{value:`on`,label:i(`claude.fastOn`)},{value:`off`,label:i(`claude.fastOff`)}],onChange:t=>r({...e,fastMode:t===`auto`?null:t===`on`}),label:i(`claude.fastMode`),style:{minWidth:140},align:`right`,portal:!0})})]}),(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`div`,{className:`setting-label`,children:[(0,z.jsx)(`span`,{className:`title`,children:i(`claude.autoContext`)}),(0,z.jsx)(`span`,{className:`desc`,children:i(`claude.autoContextDesc`)}),e.maxContextTokens!==null&&(0,z.jsx)(`span`,{className:`desc`,style:{color:`var(--muted)`},children:i(`claude.autoContextInert`)})]}),(0,z.jsx)(dd,{label:i(`claude.autoContext`),checked:e.autoContext,onChange:t=>r({...e,autoContext:t})})]}),e.autoContext&&(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`div`,{className:`setting-label`,children:[(0,z.jsx)(`span`,{className:`title`,children:i(`claude.autoCompactWindow`)}),(0,z.jsx)(`span`,{className:`desc`,children:i(`claude.autoCompactWindowDesc`)}),e.autoCompactWindow!==null&&(0,z.jsx)(`span`,{className:`desc`,style:{color:`var(--red)`},children:i(`claude.autoCompactWindowWarn`)})]}),(0,z.jsx)(`div`,{className:`setting-controls`,children:(0,z.jsx)(rt,{value:e.autoCompactWindow===null?``:String(e.autoCompactWindow),options:t,onChange:t=>r({...e,autoCompactWindow:t===``?null:Number(t)}),label:i(`claude.autoCompactWindow`),style:{minWidth:130},align:`right`,portal:!0})})]}),(0,z.jsxs)(`div`,{className:`setting-row`,children:[(0,z.jsxs)(`div`,{className:`setting-label`,children:[(0,z.jsx)(`span`,{className:`title`,children:i(`claude.injectAgents`)}),(0,z.jsx)(`span`,{className:`desc`,children:i(`claude.injectAgentsDesc`)})]}),(0,z.jsx)(dd,{label:i(`claude.injectAgents`),checked:e.injectAgents,onChange:t=>r({...e,injectAgents:t})})]}),[`webSearchSidecar`,`visionSidecar`].map(t=>{let a=e[t],o=t===`webSearchSidecar`?`claude.webSearchSidecar`:`claude.visionSidecar`,s=t===`webSearchSidecar`?`claude.webSearchSidecarHint`:`claude.visionSidecarHint`,c=`claude-sidecar-models-${t}`;return(0,z.jsxs)(`div`,{className:`setting-row`,style:{alignItems:`flex-start`},children:[(0,z.jsxs)(`div`,{className:`setting-label setting-copy`,style:{flex:1},children:[(0,z.jsx)(`span`,{className:`title`,children:i(o)}),(0,z.jsx)(`span`,{className:`desc`,children:i(s)})]}),(0,z.jsxs)(`div`,{className:`setting-controls`,style:{display:`flex`,gap:8},children:[(0,z.jsx)(rt,{value:sd(a),options:[{value:`inherit`,label:i(`claude.useMainSetting`)},{value:`auto`,label:i(`dash.backendAuto`)},{value:`openai`,label:i(`dash.backendOpenAI`)},{value:`anthropic`,label:i(`dash.backendAnthropic`)}],onChange:n=>{r({...e,[t]:cd(a,n)})},label:i(`dash.sidecarBackend`),portal:!0}),(0,z.jsx)(`input`,{className:`input mono`,value:a?.model??``,onChange:n=>{r({...e,[t]:ld(a,n.target.value)})},placeholder:i(`claude.sidecarModelPlaceholder`),disabled:!a,list:a?c:void 0,"aria-label":i(`dash.sidecarModel`),style:{minWidth:210},autoComplete:`off`}),a&&(0,z.jsx)(`datalist`,{id:c,children:n.map(e=>(0,z.jsx)(`option`,{value:e},e))})]})]},t)})]})}function vd({manualEnv:e}){let t=Y();return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`muted text-label`,style:{margin:`0 0 8px`},children:(0,z.jsx)(Ve,{k:`claude.quickstartHint`,cmd:`ocx claude`})}),(0,z.jsx)(`pre`,{className:`mono card`,style:{padding:`10px 14px`,overflowX:`auto`,margin:0},children:`ocx claude`}),(0,z.jsxs)(`details`,{style:{margin:`10px 0 0`},children:[(0,z.jsx)(`summary`,{className:`muted text-label`,style:{cursor:`pointer`,padding:`2px 2px`},children:t(`claude.manualEnv`)}),(0,z.jsx)(`pre`,{className:`mono card text-label`,style:{padding:`10px 14px`,overflowX:`auto`,margin:`6px 0 0`},children:e})]})]})}function yd({rows:e,onRowsChange:t}){let n=Y();return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`muted text-label`,style:{margin:`0 0 8px`},children:n(`claude.modelMapHint`)}),(0,z.jsx)(`div`,{className:`stack`,style:{gap:8},children:e.map((r,i)=>(0,z.jsxs)(`div`,{className:`row`,style:{gap:8},children:[(0,z.jsx)(`input`,{className:`input mono`,value:r.from,placeholder:n(`claude.mapFrom`),"aria-label":n(`claude.mapFrom`),onChange:n=>t(e.map((e,t)=>t===i?{...e,from:n.target.value}:e)),style:{flex:1}}),(0,z.jsx)(`span`,{className:`muted`,"aria-hidden":!0,children:`→`}),(0,z.jsx)(`input`,{className:`input mono`,value:r.to,placeholder:n(`claude.mapTo`),"aria-label":n(`claude.mapTo`),onChange:n=>t(e.map((e,t)=>t===i?{...e,to:n.target.value}:e)),style:{flex:1}}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon btn-sm`,onClick:()=>t(e.filter((e,t)=>t!==i)),"aria-label":n(`claude.removeMapping`),style:{color:`var(--red)`},children:(0,z.jsx)(ae,{})})]},r.id))}),(0,z.jsx)(`div`,{style:{marginTop:8},children:(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>t([...e,{id:md(),from:``,to:``}]),children:[(0,z.jsx)(oe,{}),` `,n(`claude.addMapping`)]})})]})}var bd=`etc`;function xd(e){let t=new Map;for(let n of e){let e=/\(([^)]+)\)\s*$/.exec(n.display_name),r=e?e[1]:bd,i=t.get(r);i?i.push(n):t.set(r,[n])}return Array.from(t)}function Sd({aliases:e}){let t=Y();return(0,z.jsxs)(`div`,{className:`claude-aliases`,children:[(0,z.jsx)(`p`,{className:`muted text-label claude-aliases-hint`,children:t(`claude.aliasesHint`)}),e.length===0?(0,z.jsx)(`div`,{className:`muted text-label`,children:t(`claude.none`)}):(0,z.jsx)(`div`,{className:`claude-aliases-scroll`,children:xd(e).map(([e,n])=>(0,z.jsxs)(`div`,{className:`claude-aliases-group`,children:[(0,z.jsxs)(`div`,{className:`claude-aliases-group-label`,children:[e===bd?t(`claude.aliasProviderOther`):e,(0,z.jsx)(`span`,{className:`claude-aliases-group-count`,children:n.length})]}),(0,z.jsx)(`div`,{className:`claude-aliases-chips`,children:n.map(e=>(0,z.jsxs)(`span`,{className:`claude-aliases-chip`,children:[(0,z.jsx)(`code`,{className:`claude-aliases-chip-id`,children:e.id}),e.display_name?(0,z.jsx)(`span`,{className:`claude-aliases-chip-name`,children:e.display_name}):null]},e.id))})]},e))})]})}function Cd({apiBase:e,active:t=!0}){let n=Y(),{locale:r}=ze(),i=Pe.find(e=>e.code===r)?.htmlLang??`en`,a=`ocx.claude-code.v1:${e}`,o=`claude-code:${e}`,s=(0,_.useMemo)(()=>Z(a),[a]),[c,l]=(0,_.useState)(()=>s?.state??null),[u,d]=(0,_.useState)(()=>s?.rows??[]),[f,p]=(0,_.useState)(!!s),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(`settings`),x=(0,_.useCallback)(async t=>{let r=await ct(await fetch(`${e}/api/claude-code`,{signal:t}),n(`claude.loadFail`));if(!r)throw Error(n(`claude.loadFail`));let i={...r,authMode:r.authMode===`proxy`||r.authMode===`subscription`?r.authMode:`auto`,...id(r),fastMode:r.fastMode??null,maxContextTokens:r.maxContextTokens??null,autoContext:r.autoContext!==!1,autoCompactWindow:r.autoCompactWindow??null,injectAgents:r.injectAgents!==!1,effectiveModelEnv:r.effectiveModelEnv??{}},o=Object.entries(r.modelMap??{}).map(([e,t])=>({id:md(),from:e,to:String(t)})),s={state:i,rows:o};if(t.aborted)throw Error(`Claude Code request aborted`);return l(i),d(o),p(!0),Q(a,s),s},[e,a,n]),S=Is(o,[e],x,{isEmpty:()=>!1,enabled:t,initialData:s??void 0}),C=S.state,w=C.data??s,T=c??w?.state??null,E=f?u:w?.rows??u,D=(0,_.useMemo)(()=>rd(T?.available,n(`claude.smallFastModelUnsetOption`)),[T?.available,n]),O=(0,_.useMemo)(()=>{let e=[1e5,2e5,25e4,3e5,35e4,4e5,5e5,6e5,75e4,9e5,1e6],t=T?.autoCompactWindow??null,r=t!==null&&!e.includes(t)?[...e,t].sort((e,t)=>e-t):e;return[{value:``,label:n(`claude.autoCompactDefault`)},...r.map(e=>({value:String(e),label:hd(e,i)}))]},[T?.autoCompactWindow,n,i]),k=async()=>{if(!T)return;h(``);let t={};for(let e of E)e.from.trim()&&e.to.trim()&&(t[e.from.trim()]=e.to.trim());try{await ct(await fetch(`${e}/api/claude-code`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:T.enabled,authMode:T.authMode,systemEnv:T.systemEnv,fastMode:T.fastMode,autoContext:T.autoContext,autoCompactWindow:T.autoCompactWindow,injectAgents:T.injectAgents,smallFastModel:T.smallFastModel,modelMap:t,webSearchSidecar:ud(T.webSearchSidecar),visionSidecar:ud(T.visionSidecar)})}),n(`claude.saveFailed`)),v(!0),h(n(`claude.saved`)),S.refresh()}catch(e){v(!1),h(e instanceof Error&&e.message?e.message:n(`claude.networkError`))}};if(C.kind===`disabled`&&!w)return null;if(C.showSkeleton&&!w)return(0,z.jsx)(Rs,{label:n(`claude.loading`),rows:3});if(C.kind===`failed-cold`)return(0,z.jsxs)(`div`,{className:`claudecode-workspace-shell`,children:[(0,z.jsx)(X,{tone:`err`,children:C.error instanceof Error?C.error.message:n(`claude.loadFail`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>S.refresh(),children:n(`common.retry`)})]});if(!T)return null;let A=[{id:`settings`,label:n(`claude.workspace.settings`),body:(0,z.jsx)(_d,{state:T,autoCompactOptions:O,availableModels:T.available??[],onStateChange:l})},{id:`quickstart`,label:n(`claude.quickstart`),body:(0,z.jsx)(vd,{manualEnv:od(T)})},{id:`smallFast`,label:n(`claude.smallFastModel`),body:(0,z.jsx)(pd,{value:T.smallFastModel,tierHaikuModel:T.tierModels?.haiku,options:D,onChange:e=>l({...T,smallFastModel:e})})},{id:`modelMap`,label:n(`claude.modelMap`),meta:String(E.length),body:(0,z.jsx)(yd,{rows:E,onRowsChange:e=>{p(!0),d(e)}})},{id:`aliases`,label:n(`claude.aliases`),meta:String(T.aliases.length),body:(0,z.jsx)(Sd,{aliases:T.aliases})}],j=A.find(e=>e.id===y)??A[0],M=y===`settings`||y===`smallFast`||y===`modelMap`;return(0,z.jsxs)(`div`,{className:`claudecode-workspace-shell`,children:[m&&(0,z.jsx)(X,{tone:g?`ok`:`err`,children:m}),C.showError&&(0,z.jsx)(X,{tone:`err`,children:n(`claude.loadFail`)}),(0,z.jsxs)(`div`,{className:`claudecode-workspace-root`,children:[(0,z.jsx)(`aside`,{className:`claudecode-workspace-rail`,"aria-label":n(`claude.pageTitle`),children:(0,z.jsx)(`div`,{className:`claudecode-workspace-rail-list`,children:A.map(e=>(0,z.jsx)(`button`,{type:`button`,className:`claudecode-workspace-rail-row${y===e.id?` claudecode-workspace-rail-row--selected`:``}`,onClick:()=>b(e.id),"aria-current":y===e.id?`true`:void 0,children:(0,z.jsx)(`span`,{className:`claudecode-workspace-rail-name`,children:e.label})},e.id))})}),(0,z.jsxs)(`section`,{className:`claudecode-workspace-main`,"aria-label":j.label,children:[(0,z.jsxs)(`div`,{className:`ccw-main-head`,children:[(0,z.jsxs)(`h3`,{className:`ccw-main-title`,children:[j.label,j.meta==null?null:(0,z.jsx)(`span`,{className:`count`,children:j.meta})]}),(0,z.jsx)(`div`,{className:`claudecode-workspace-save`,"data-visible":M?`true`:`false`,children:(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:!M,tabIndex:M?0:-1,"aria-hidden":!M,onClick:()=>{k()},children:n(`common.save`)})})]}),(0,z.jsx)(`div`,{className:`ccw-body`,children:j.body})]})]})]})}function wd(e,t,n){let r=t.trim().toLowerCase(),i=(r?e.filter(e=>e.label.toLowerCase().includes(r)||e.route.toLowerCase().includes(r)):e).toSorted((e,t)=>Number(!e.available)-Number(!t.available)),a=i.slice(0,n);return{total:e.length,showSearch:e.length>4,shown:a,hidden:i.length-a.length,noMatch:e.length>0&&i.length===0}}function Td(e){return new Set(Object.keys(e))}function Ed(e,t){return t!==null&&e===t}function Dd(e){return e||(typeof localStorage>`u`?void 0:localStorage)}function Od(e){return{read(t){let n=Dd(t);if(!n)return null;try{let t=n.getItem(e);if(t===null)return null;let r=JSON.parse(t);return Array.isArray(r)?new Set(r.filter(e=>typeof e==`string`)):null}catch{return null}},write(t,n){let r=Dd(n);if(r)try{r.setItem(e,JSON.stringify([...t]))}catch{}}}}function kd(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var Ad=[`opus`,`fable`,`sonnet`,`haiku`],jd=Od(`ocx.claudeDesktop.collapsedFamilies.v2`),Md={opus:`claudeDesktop.family.opus`,fable:`claudeDesktop.family.fable`,sonnet:`claudeDesktop.family.sonnet`,haiku:`claudeDesktop.family.haiku`};function Nd(e){return{version:1,assignments:Object.fromEntries(Object.entries(e.assignments).map(([e,t])=>[e,{...t}])),defaults:{...e.defaults},...e.appliedFingerprint===void 0?{}:{appliedFingerprint:e.appliedFingerprint},...e.appliedAt===void 0?{}:{appliedAt:e.appliedAt}}}function Pd(e){let t={...e.profile.assignments};for(let n of e.models){let e=t[n.route]??n.assignment;t[n.route]={family:Ad.includes(e?.family)?e.family:`opus`,alias:typeof e?.alias==`string`?e.alias:``}}return{version:1,assignments:t,defaults:{opus:e.profile.defaults.opus??null,fable:e.profile.defaults.fable??null,sonnet:e.profile.defaults.sonnet??null,haiku:e.profile.defaults.haiku??null}}}function Fd(e,t){return e&&typeof e==`object`&&`error`in e&&typeof e.error==`string`?e.error:t}function Id(e,t){return e?e>=1048576?t(`claudeDesktop.contextM`,{n:Math.round(e/1048576)}):e>=1e6?t(`claudeDesktop.contextM`,{n:e/1e6}):t(`claudeDesktop.contextK`,{n:Math.round(e/1e3)}):null}function Ld(e){return Z(e)}function Rd(e){let t=Ld(e);return{held:t,data:t?.data??null,profile:t?.profile??null,savedProfile:t?.profile?Nd(t.profile):null,destinations:t?.data?Object.fromEntries(t.data.models.map(e=>[e.route,t.profile.assignments[e.route]?.family??`opus`])):{}}}function zd({apiBase:e,active:t=!0,onPortChange:n}){let{t:r,locale:i}=ze(),a=Pe.find(e=>e.code===i)?.htmlLang,o=`ocx.claude-desktop.v1:${e}`,s=`claude-desktop:${e}`,c=(0,_.useMemo)(()=>Rd(o),[o]),[l,u]=(0,_.useState)(()=>c.profile),[d,f]=(0,_.useState)(()=>c.savedProfile),[p,m]=(0,_.useState)(()=>c.destinations),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(``),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)({}),[w,T]=(0,_.useState)({}),[E,D]=(0,_.useState)(()=>jd.read()??new Set(Ad)),[O,k]=(0,_.useState)({}),A=(0,_.useRef)(null),j=(0,_.useCallback)(async t=>{let n=await ct(await fetch(`${e}/api/claude-desktop`,{signal:t}),r(`claudeDesktop.loadFail`));if(!n||!(`profile`in n)||!(`models`in n))throw Error(Fd(n,r(`claudeDesktop.loadFail`)));let i=Pd(n),a={data:n,profile:i};if(t.aborted)throw Error(`Claude Desktop request aborted`);if(u(i),f(Nd(i)),m(Object.fromEntries(n.models.map(e=>[e.route,i.assignments[e.route]?.family??`opus`]))),jd.read()===null){let e=Object.fromEntries(Ad.map(e=>[e,0]));for(let t of n.models)e[i.assignments[t.route]?.family??`opus`]+=1;D(Td(e))}return Q(o,a),a},[e,o,r,m,u,f]),M=Is(s,[e],j,{isEmpty:()=>!1,enabled:t,initialData:c.held??void 0}),N=M.state,P=N.data??(c.data&&c.profile?{data:c.data,profile:c.profile}:null),F=P?.data??null,I=l??P?.profile??null,L=d??P?.profile??null,R=P?Object.fromEntries(P.data.models.map(e=>[e.route,P.profile.assignments[e.route]?.family??`opus`])):{},B=Object.keys(p).length>0?p:R;(0,_.useEffect)(()=>{if(n){if(typeof F?.port==`number`){n(F.port);return}N.kind===`failed-cold`&&n(null)}},[F?.port,N.kind,n]);let V=(0,_.useMemo)(()=>I!==null&&L!==null&&JSON.stringify(I)!==JSON.stringify(L),[I,L]),H=(0,_.useMemo)(()=>{let e=Object.fromEntries(Ad.map(e=>[e,[]]));if(!F||!I)return e;for(let t of F.models)e[I.assignments[t.route]?.family??`opus`].push(t);return e},[F,I]),U=(0,_.useMemo)(()=>{let e={};for(let t of Ad){let n=H[t].filter(e=>e.available).map(e=>e.route).sort(),r=I?.defaults[t]??null;e[t]=r&&n.includes(r)?r:n[0]??null}return e},[H,I]),W=`ocx.claude-desktop.status.v1:${e}`,ee=`claude-desktop-status:${e}`,G=Z(W),te=Is(ee,[e],async t=>{let n=await lt(await fetch(`${e}/api/claude-desktop/status`,{signal:t}));if(!n)throw Error(`Claude Desktop status unavailable`);return Q(W,n),n},{isEmpty:()=>!1,pollMs:5e3,enabled:t,initialData:G??void 0}),ne=te.state,K=ne.data??G??null,re=ne.showError,ie=(e,t)=>{!I||I.assignments[e]?.family===t||(u(n=>{if(!n)return n;let r=n.assignments[e];if(!r||r.family===t)return n;let i={...n.assignments,[e]:{...r,family:t}},a={...n.defaults};return a[r.family]===e&&(a[r.family]=Object.keys(i).filter(t=>t!==e&&i[t].family===r.family).sort()[0]??null),a[t]===null&&(a[t]=e),{...n,assignments:i,defaults:a}}),m(n=>({...n,[e]:t})),y(r(`claudeDesktop.moved`,{route:e,family:r(Md[t])})))},ae=e=>{let t=kd(E,e);jd.write(t),D(t)},oe=async t=>{if(!(!I||b)){x(`save`),g(null);try{await ct(await fetch(`${e}/api/claude-desktop`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({profile:I})}),r(`claudeDesktop.saveFailed`)),f(Nd(I)),t?(x(`apply`),await ct(await fetch(`${e}/api/claude-desktop/apply`,{method:`POST`}),r(`claudeDesktop.applyFailed`)),g({tone:`ok`,text:r(`claudeDesktop.savedApplied`)}),y(r(`claudeDesktop.savedAppliedAnnounce`))):(g({tone:`ok`,text:r(`claudeDesktop.saved`)}),y(r(`claudeDesktop.savedAnnounce`))),te.refresh()}catch(e){let t=e instanceof Error?e.message:r(`claudeDesktop.updateFailed`);g({tone:`err`,text:t}),y(t)}finally{x(null)}}},q=()=>{if(!I)return;let e=URL.createObjectURL(new Blob([`${JSON.stringify(I,null,2)}\n`],{type:`application/json`})),t=document.createElement(`a`);t.href=e,t.download=`claude-desktop-profile.json`,t.click(),URL.revokeObjectURL(e),y(r(`claudeDesktop.exported`))},se=async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=JSON.parse(await t.text());if(e.version!==1||!e.assignments||!e.defaults)throw Error(r(`claudeDesktop.importExpected`));u(Pd({...F,profile:e})),g({tone:`ok`,text:r(`claudeDesktop.importReady`)}),y(r(`claudeDesktop.importedAnnounce`))}catch(e){let t=e instanceof Error?e.message:r(`claudeDesktop.importInvalid`);g({tone:`err`,text:t}),y(r(`claudeDesktop.importFailed`,{error:t}))}},ce=(e,t)=>{e.preventDefault();let n=e.dataTransfer.getData(`text/plain`);n&&ie(n,t)};return N.kind===`disabled`&&!P?null:N.showSkeleton&&!P?(0,z.jsx)(Rs,{label:r(`claudeDesktop.loading`),rows:4}):N.kind===`failed-cold`?(0,z.jsxs)(`div`,{className:`claude-desktop-error`,children:[(0,z.jsx)(X,{tone:`err`,children:N.error instanceof Error?N.error.message:r(`claudeDesktop.loadFail`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>M.refresh(),children:r(`claudeDesktop.retry`)})]}):!F||!I?null:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`claude-desktop-toolbar`,children:(0,z.jsxs)(`div`,{className:`claude-profile-tools`,children:[(0,z.jsx)(`input`,{ref:A,type:`file`,accept:`application/json,.json`,hidden:!0,onChange:e=>void se(e)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>A.current?.click(),children:r(`claudeDesktop.importJson`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:q,children:r(`claudeDesktop.exportJson`)})]})}),(0,z.jsxs)(`div`,{className:`claude-status-bar ${re&&!K?`not-applied`:K?K.activeProfile===!1?`not-applied`:K.stale?`stale`:K.applied?`applied`:`not-applied`:`pending`}`,"aria-busy":!K&&!re||void 0,children:[(0,z.jsx)(`span`,{className:`claude-status-dot`}),(0,z.jsx)(`span`,{children:re&&!K?r(`claudeDesktop.loadFail`):K?K.activeProfile===!1?r(`claudeDesktop.status.notActiveProfile`):K.stale?r(`claudeDesktop.status.stale`):K.applied?r(`claudeDesktop.status.applied`):r(`claudeDesktop.status.notApplied`):r(`claudeDesktop.loading`)}),K?.health.lastRequestAt&&(0,z.jsxs)(`span`,{className:`claude-status-health`,children:[r(`claudeDesktop.health.lastRequest`),`:`,` `,new Date(K.health.lastRequestAt).toLocaleTimeString(a)]}),K&&K.health.requestCount>0&&(0,z.jsx)(`span`,{className:`claude-status-health`,children:r(`claudeDesktop.health.stats`,{count:K.health.requestCount,errors:K.health.errorCount})})]}),(0,z.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:v}),h&&(0,z.jsx)(X,{tone:h.tone,children:h.text}),N.showError&&(0,z.jsx)(X,{tone:`err`,children:r(`claudeDesktop.loadFail`)}),re&&K&&(0,z.jsx)(X,{tone:`err`,children:r(`claudeDesktop.loadFail`)}),(0,z.jsxs)(`div`,{className:`claude-profile-bar`,children:[(0,z.jsx)(`span`,{className:`claude-dirty${V?` active`:``}`,children:r(V?`claudeDesktop.unsaved`:`claudeDesktop.upToDate`)}),(0,z.jsxs)(`div`,{className:`claude-save-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,disabled:!V||b!==null,onClick:()=>void oe(!1),children:r(b===`save`?`claudeDesktop.saving`:`common.save`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:b!==null,onClick:()=>void oe(!0),children:r(b===`apply`?`claudeDesktop.applying`:b===`save`?`claudeDesktop.saving`:`claudeDesktop.saveApply`)})]})]}),F.models.length===0&&(0,z.jsx)(it,{title:r(`claudeDesktop.emptyTitle`),children:r(`claudeDesktop.emptyHint`)}),(0,z.jsx)(`div`,{className:`ocx-group-stack`,"aria-label":r(`claudeDesktop.assignmentsLabel`),children:Ad.map(e=>{let t=H[e],n=wd(t,S[e]??``,w[e]??6),i=E.has(e),a=U[e];return(0,z.jsxs)(`section`,{className:`ocx-group${i?` collapsed`:``}`,"aria-labelledby":`claude-lane-${e}`,onDragOver:e=>e.preventDefault(),onDrop:t=>ce(t,e),children:[(0,z.jsxs)(`header`,{className:`ocx-group-head${i?``:` open`}`,children:[(0,z.jsx)(`h3`,{id:`claude-lane-${e}`,className:`ocx-group-heading`,children:(0,z.jsxs)(`button`,{type:`button`,className:`ocx-group-toggle`,"aria-expanded":!i,"aria-controls":`claude-lane-body-${e}`,onClick:()=>ae(e),children:[(0,z.jsx)(he,{className:`ocx-chevron`,width:14,height:14,"aria-hidden":`true`,style:{transform:i?`none`:`rotate(90deg)`}}),(0,z.jsx)(`span`,{className:`ocx-group-name`,children:r(Md[e])}),(0,z.jsx)(`span`,{className:`ocx-group-count`,children:r(t.length===1?`claudeDesktop.modelCountOne`:`claudeDesktop.modelCountMany`,{count:t.length})}),a&&(0,z.jsx)(`code`,{className:`claude-lane-default`,title:a,children:a})]})}),t.length>0&&I.defaults[e]===null&&(0,z.jsx)(`span`,{className:`claude-default-needed`,children:r(`claudeDesktop.chooseDefault`)}),a&&a!==I.defaults[e]&&(0,z.jsx)(`span`,{className:`claude-default-needed`,title:a,children:r(`claudeDesktop.temporaryDefault`)})]}),!i&&(0,z.jsxs)(`div`,{id:`claude-lane-body-${e}`,children:[n.showSearch&&(0,z.jsx)(`input`,{className:`input claude-lane-search`,type:`search`,placeholder:r(`models.search`),"aria-label":r(`models.search`),value:S[e]??``,onChange:t=>{let n=t.target.value;C(t=>({...t,[e]:n})),T(t=>({...t,[e]:6}))}}),(0,z.jsxs)(`div`,{className:`claude-lane-models`,children:[t.length===0?(0,z.jsx)(`div`,{className:`claude-lane-empty`,children:r(`claudeDesktop.laneEmpty`)}):n.noMatch?(0,z.jsx)(`div`,{className:`claude-lane-empty`,children:r(`claudeDesktop.laneNoMatch`)}):n.shown.map(t=>{let n=I.assignments[t.route],i=Id(t.contextWindow,r),a=B[t.route]??`opus`,o=O[t.route]??Ed(t.route,U[e]);return(0,z.jsxs)(`article`,{className:`claude-model-card${o?` open`:``}`,draggable:t.available,onDragStart:e=>{e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t.route)},children:[(0,z.jsxs)(`button`,{type:`button`,className:`claude-model-summary`,"aria-expanded":o,"aria-controls":`claude-model-body-${t.route}`,onClick:()=>k(e=>({...e,[t.route]:!o})),children:[(0,z.jsx)(he,{className:`ocx-chevron`,width:12,height:12,"aria-hidden":`true`,style:{transform:o?`rotate(90deg)`:`none`}}),(0,z.jsxs)(`span`,{className:`claude-model-names`,children:[(0,z.jsx)(`strong`,{title:t.label,children:t.label}),(0,z.jsx)(`code`,{title:t.route,children:t.route})]}),i&&(0,z.jsx)(`span`,{className:`claude-model-context`,children:i}),!i&&(0,z.jsx)(`span`,{className:`claude-model-context claude-model-context-unknown`,children:r(`claudeDesktop.contextUnknown`)}),t.supports1m===!0&&(0,z.jsx)(`span`,{className:`claude-1m-chip`,children:r(`claudeDesktop.supports1m`)}),t.effortSupported===!1&&(0,z.jsx)(`span`,{className:`claude-effort-badge off`,children:r(`claudeDesktop.effort.displayOnly`)}),t.effortSupported===!0&&(0,z.jsx)(`span`,{className:`claude-effort-badge on`,children:r(`claudeDesktop.effort.supported`)}),I.defaults[e]===t.route&&(0,z.jsx)(`span`,{className:`claude-row-default`,children:r(`claudeDesktop.defaultBadge`)}),(0,z.jsx)(`span`,{className:`badge ${t.available?`badge-green`:`badge-muted`}`,children:t.available?r(`claudeDesktop.available`):r(`claudeDesktop.unavailable`)})]}),o&&(0,z.jsxs)(`div`,{className:`claude-model-body`,id:`claude-model-body-${t.route}`,children:[U[e]===t.route&&I.defaults[e]!==t.route&&(0,z.jsx)(`span`,{className:`claude-effective-default`,children:r(`claudeDesktop.temporaryDefault`)}),(0,z.jsxs)(`div`,{className:`claude-field`,children:[(0,z.jsx)(`span`,{children:r(`claudeDesktop.alias`)}),(0,z.jsx)(`code`,{className:`claude-alias`,title:n.alias,children:n.alias})]}),(0,z.jsxs)(`label`,{className:`claude-default-radio`,children:[(0,z.jsx)(`input`,{type:`radio`,name:`default-${e}`,checked:I.defaults[e]===t.route,disabled:!t.available,onChange:()=>u(n=>n&&{...n,defaults:{...n.defaults,[e]:t.route}})}),r(`claudeDesktop.useAsDefault`,{family:r(Md[e])})]}),(0,z.jsxs)(`div`,{className:`claude-move-row`,children:[(0,z.jsx)(`label`,{htmlFor:`move-${t.route}`,children:r(`claudeDesktop.moveTo`)}),(0,z.jsx)(`select`,{id:`move-${t.route}`,className:`input`,value:a,disabled:!t.available,onChange:e=>m(n=>({...n,[t.route]:e.target.value})),children:Ad.map(e=>(0,z.jsx)(`option`,{value:e,children:r(Md[e])},e))}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:!t.available||a===e,onClick:()=>ie(t.route,a),children:r(`claudeDesktop.move`)})]})]})]},t.route)}),n.hidden>0&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm claude-lane-more`,onClick:()=>T(t=>({...t,[e]:(t[e]??6)+6})),children:r(`models.showMore`,{n:n.hidden})})]})]})]},e)})})]})}function Bd(e){let t=Z(`ocx.claude-desktop.v1:${e}`);return typeof t?.data?.port==`number`?t.data.port:null}function Vd({apiBase:e}){let[t,n]=(0,_.useState)(`code`),r=Y(),i=(0,_.useRef)(null),a=(0,_.useRef)(null),o=Bd(e),[s,c]=(0,_.useState)(null),l=s?.base===e?s.port:o,u=s?.base===e,d=(0,_.useCallback)(t=>{c(n=>n?.base===e&&n.port===t?n:{base:e,port:t})},[e]),f=e=>{n(e),window.requestAnimationFrame(()=>{(e===`code`?i:a).current?.focus({preventScroll:!0})})},p=e=>{e.key===`ArrowLeft`||e.key===`ArrowRight`?(e.preventDefault(),f(t===`code`?`desktop`:`code`)):e.key===`Home`?(e.preventDefault(),f(`code`)):e.key===`End`&&(e.preventDefault(),f(`desktop`))};return(0,z.jsxs)(`section`,{className:`claude-page`,children:[(0,z.jsxs)(`div`,{className:`claude-page-intro`,children:[(0,z.jsx)(`div`,{className:`page-head`,children:(0,z.jsx)(`h2`,{children:r(t===`code`?`claude.pageTitle`:`claudeDesktop.title`)})}),t===`code`?(0,z.jsx)(`p`,{className:`page-sub`,children:r(`claude.subtitle`)}):(0,z.jsx)(`p`,{className:`page-sub`,children:l==null?r(u?`claudeDesktop.loadFail`:`claudeDesktop.loading`):r(`claudeDesktop.subtitle`,{port:l})})]}),(0,z.jsxs)(`div`,{className:`claude-tabs`,role:`tablist`,"aria-label":r(`claude.tabsLabel`),children:[(0,z.jsx)(`button`,{type:`button`,role:`tab`,ref:i,"aria-selected":t===`code`,"aria-controls":`claude-code-panel`,id:`claude-code-tab`,className:t===`code`?`active`:``,tabIndex:t===`code`?0:-1,onKeyDown:p,onClick:()=>f(`code`),children:r(`claude.tabCode`)}),(0,z.jsx)(`button`,{type:`button`,role:`tab`,ref:a,"aria-selected":t===`desktop`,"aria-controls":`claude-desktop-panel`,id:`claude-desktop-tab`,className:t===`desktop`?`active`:``,tabIndex:t===`desktop`?0:-1,onKeyDown:p,onClick:()=>f(`desktop`),children:r(`claude.tabDesktop`)})]}),(0,z.jsx)(`div`,{id:`claude-code-panel`,role:`tabpanel`,"aria-labelledby":`claude-code-tab`,hidden:t!==`code`,children:(0,z.jsx)(Cd,{apiBase:e,active:t===`code`},e)}),(0,z.jsx)(`div`,{id:`claude-desktop-panel`,role:`tabpanel`,"aria-labelledby":`claude-desktop-tab`,hidden:t!==`desktop`,children:(0,z.jsx)(zd,{apiBase:e,active:t===`desktop`,onPortChange:d},e)})]})}var Hd={ocx:`badge badge-green`,direct:`badge badge-muted`,mixed:`badge badge-amber`,missing:`badge badge-muted`,unknown:`badge badge-accent`},Ud={ocx:`clients.verdict.ocx`,direct:`clients.verdict.direct`,mixed:`clients.verdict.mixed`,missing:`clients.verdict.missing`,unknown:`clients.verdict.unknown`},Wd={claude:`claude`,codex:`codex-auth`,pi:`pi`,grok:`grok`};function Gd(e){return e}function Kd({apiBase:e}){let t=Y(),n=`ocx.clients.status.v1:${e}`,r=Z(n),[i,a]=(0,_.useState)(()=>new Set),o=(0,_.useCallback)(async()=>{let r=await ct(await fetch(`${e}/api/clients/status`),t(`clients.loadFail`));if(!r||!Array.isArray(r.clients))throw Error(t(`clients.loadFail`));return Q(n,r),r},[e,n,t]),s=Is(`clients-status:${e}`,[e],o,{isEmpty:()=>!1,initialData:r??void 0}),{state:c}=s,l=c.data??r,u=e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},d=(0,_.useMemo)(()=>{if(!l?.generatedAt)return null;try{return new Date(l.generatedAt).toLocaleString()}catch{return null}},[l?.generatedAt]),f=c.error instanceof Error?c.error.message:typeof c.error==`string`?c.error:t(`clients.loadFail`);return(0,z.jsxs)(`div`,{className:`page clients-page`,children:[(0,z.jsxs)(`div`,{className:`page-head`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{children:t(`clients.title`)}),(0,z.jsx)(`p`,{className:`page-sub`,children:t(`clients.subtitle`)})]}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>void s.refresh(),disabled:c.refreshing,"aria-label":t(`clients.refresh`),title:t(`clients.refresh`),children:[(0,z.jsx)(q,{}),` `,t(`clients.refresh`)]})]}),c.showSkeleton&&(0,z.jsx)(Rs,{label:t(`clients.loading`),rows:4}),c.showError&&!l&&(0,z.jsxs)(X,{tone:`err`,children:[f,(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:()=>void s.refresh(),children:t(`common.retry`)})]}),l&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`section`,{className:`card clients-proxy-card`,"aria-label":t(`clients.proxyTitle`),children:[(0,z.jsxs)(`div`,{className:`clients-proxy-row`,children:[(0,z.jsx)(`span`,{className:l.proxy.running?`badge badge-green`:`badge badge-amber`,children:l.proxy.running?t(`clients.proxyRunning`):t(`clients.proxyStopped`)}),(0,z.jsx)(`code`,{className:`clients-mono`,children:l.proxy.baseUrl}),d&&(0,z.jsx)(`span`,{className:`clients-meta`,children:t(`clients.generatedAt`,{time:d})})]}),(0,z.jsx)(`p`,{className:`clients-hint`,children:t(`clients.readOnlyHint`)})]}),(0,z.jsxs)(`section`,{className:`card clients-table-card`,"aria-label":t(`clients.tableTitle`),children:[(0,z.jsx)(`div`,{className:`clients-table-wrap`,children:(0,z.jsxs)(`table`,{className:`clients-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{scope:`col`,children:t(`clients.col.client`)}),(0,z.jsx)(`th`,{scope:`col`,children:t(`clients.col.verdict`)}),(0,z.jsx)(`th`,{scope:`col`,children:t(`clients.col.baseUrl`)}),(0,z.jsx)(`th`,{scope:`col`,children:t(`clients.col.model`)}),(0,z.jsx)(`th`,{scope:`col`,children:t(`clients.col.launcher`)}),(0,z.jsx)(`th`,{scope:`col`,children:t(`clients.col.switcher`)}),(0,z.jsx)(`th`,{scope:`col`,children:(0,z.jsx)(`span`,{className:`sr-only`,children:t(`clients.col.details`)})})]})}),(0,z.jsx)(`tbody`,{children:l.clients.map(e=>{let n=i.has(e.id),r=Wd[e.id];return(0,z.jsxs)(`tr`,{className:n?`clients-row open`:`clients-row`,children:[(0,z.jsx)(`td`,{children:(0,z.jsxs)(`button`,{type:`button`,className:`clients-expand`,onClick:()=>u(e.id),"aria-expanded":n,children:[(0,z.jsx)(he,{width:12,height:12,"aria-hidden":`true`,style:{transform:n?`rotate(90deg)`:`none`,transition:`transform .12s`}}),(0,z.jsx)(`strong`,{children:e.label})]})}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`span`,{className:Hd[e.verdict],children:t(Ud[e.verdict])})}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`code`,{className:`clients-mono`,children:e.baseUrl??`—`})}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`code`,{className:`clients-mono`,children:e.model??`—`})}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`span`,{className:`clients-muted`,children:e.launcher??`—`})}),(0,z.jsx)(`td`,{children:(0,z.jsx)(`span`,{className:`clients-muted`,children:e.switcher?.name?`${e.switcher.name} (${e.switcher.appType})`:`—`})}),(0,z.jsx)(`td`,{children:r&&(0,z.jsx)(`a`,{className:`clients-manage`,href:`#${r}`,children:t(`clients.manage`)})})]},e.id)})})]})}),l.clients.map(e=>i.has(e.id)?(0,z.jsxs)(`div`,{className:`clients-detail`,id:`clients-detail-${e.id}`,children:[(0,z.jsx)(`h3`,{children:e.label}),(0,z.jsxs)(`dl`,{className:`clients-dl`,children:[(0,z.jsx)(`dt`,{children:t(`clients.col.configPaths`)}),(0,z.jsx)(`dd`,{children:e.configPaths.length===0?(0,z.jsx)(`span`,{className:`clients-muted`,children:`—`}):(0,z.jsx)(`ul`,{className:`clients-paths`,children:e.configPaths.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsx)(`code`,{className:`clients-mono`,children:Gd(e)})},e))})}),(0,z.jsx)(`dt`,{children:t(`clients.col.notes`)}),(0,z.jsx)(`dd`,{children:e.notes.length===0?(0,z.jsx)(`span`,{className:`clients-muted`,children:t(`clients.noNotes`)}):(0,z.jsx)(`ul`,{className:`clients-notes`,children:e.notes.map((t,n)=>(0,z.jsx)(`li`,{children:t},`${e.id}-note-${n}`))})})]})]},`detail-${e.id}`):null)]}),(0,z.jsxs)(`p`,{className:`clients-footer-hint`,children:[t(`clients.exportHint`),` `,(0,z.jsx)(`a`,{href:`#api`,children:t(`nav.api`)})]})]})]})}function qd(e,t,n,r){let i=e.filter(e=>r===`native`===e.native).map(e=>({...e,alias:t.get(e.id)??null,enabled:!n.has(e.id)})).toSorted((e,t)=>Number(!e.enabled)-Number(!t.enabled));return{rows:i,total:i.length,enabled:i.filter(e=>e.enabled).length}}var Jd=`xai`;function Yd(e,t){return e.alias?.trim()||e.email?.trim()||Ai(e.id)||t(`grok.account.unnamed`)}function Xd({apiBase:e}){let t=Y(),n=(0,_.useRef)(!0),r=(0,_.useRef)(0),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(!0),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(null),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(null),[x,S]=(0,_.useState)(null);(0,_.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]);let C=(0,_.useCallback)(async r=>{let i=r?.refresh===!0;r?.soft?d(!0):l(!0),v(null);try{let t=await fetch(`${e}/api/oauth/accounts?provider=${Jd}`);if(!t.ok)throw Error(String(t.status));let r=await t.json();if(!n.current)return;s(r.activeAccountId??null),a(r.accounts??[]),l(!1);let o=await fetch(`${e}/api/oauth/accounts?provider=${Jd}${i?`&quota=1&refresh=1`:`&quota=1`}`);if(!n.current)return;if(o.ok){let e=await o.json();s(e.activeAccountId??r.activeAccountId??null),a(e.accounts??r.accounts??[])}}catch(e){if(!n.current)return;v(e instanceof Error?e.message:t(`grok.account.loadFail`))}finally{n.current&&(l(!1),d(!1))}},[e,t]);(0,_.useEffect)(()=>{C()},[C]);let w=async(a=!1,o)=>{let s=++r.current;p(!0),b(null),S(null);try{let c={provider:Jd};(a||o)&&(c.addAccount=!0),o&&(c.accountId=o,c.reauth=!0);let l=await fetch(`${e}/api/oauth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(c)});if(r.current!==s||!n.current)return;if(!l.ok){b({tone:`err`,text:(await l.json().catch(()=>({}))).error||t(`grok.account.loginFail`)});return}let u=await l.json();(u.url||u.instructions||u.deviceCode)&&S(u);let d=i.length;for(let i=0;i<150&&n.current&&r.current===s;i++){if(await new Promise(e=>setTimeout(e,2e3)),r.current!==s||!n.current)return;let i=await fetch(`${e}/api/oauth/status?provider=${Jd}`).catch(()=>null),c=i?await lt(i):null;if(c){if(c.error){b({tone:`err`,text:c.error}),S(null);break}if(a||o?(c.accounts?.length??0)>d||c.done===!0:c.loggedIn===!0||c.done===!0){b({tone:`ok`,text:t(`grok.account.loginOk`)}),S(null),await C({refresh:!0,soft:!0});break}}}}catch(e){n.current&&b({tone:`err`,text:e instanceof Error?e.message:t(`grok.account.loginFail`)})}finally{n.current&&r.current===s&&p(!1)}},T=async()=>{r.current+=1,p(!1),S(null);try{await fetch(`${e}/api/oauth/login/cancel`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:Jd})})}catch{}b({tone:`err`,text:t(`grok.account.loginCancelled`)})},E=async r=>{h(r),b(null);try{let n=await fetch(`${e}/api/oauth/accounts/active`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:Jd,accountId:r})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error||t(`grok.account.switchFail`))}b({tone:`ok`,text:t(`grok.account.switched`)}),await C({refresh:!0,soft:!0})}catch(e){b({tone:`err`,text:e instanceof Error?e.message:t(`grok.account.switchFail`)})}finally{n.current&&h(null)}},D=async r=>{if(window.confirm(t(`grok.account.removeConfirm`))){p(!0),b(null);try{let n=await fetch(`${e}/api/oauth/accounts?provider=${encodeURIComponent(Jd)}&id=${encodeURIComponent(r)}`,{method:`DELETE`});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error||t(`grok.account.removeFail`))}b({tone:`ok`,text:t(`grok.account.removed`)}),await C({soft:!0})}catch(e){b({tone:`err`,text:e instanceof Error?e.message:t(`grok.account.removeFail`)})}finally{n.current&&p(!1)}}},O=i.length>0;return(0,z.jsxs)(`section`,{className:`panel grok-account-panel`,"aria-label":t(`grok.account.sectionAria`),children:[(0,z.jsxs)(`div`,{className:`row`,style:{justifyContent:`space-between`,alignItems:`flex-start`,gap:12,flexWrap:`wrap`},children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h3`,{className:`panel-title`,style:{margin:0},children:t(`grok.account.title`)}),(0,z.jsx)(`p`,{className:`card-sub`,style:{margin:`6px 0 0`},children:t(`grok.account.subtitle`)})]}),(0,z.jsxs)(`div`,{className:`row`,style:{gap:8,flexWrap:`wrap`},children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:c||u||f,onClick:()=>void C({refresh:!0,soft:!0}),children:t(u?`grok.account.refreshing`:`grok.account.refreshQuota`)}),O?(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:f||m!==null,onClick:()=>void w(!0),children:t(`grok.account.addAccount`)}):(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:f,onClick:()=>void w(!1),children:t(f?`grok.account.loggingIn`:`grok.account.login`)})]})]}),y&&(0,z.jsx)(`div`,{style:{marginTop:10},children:(0,z.jsx)(X,{tone:y.tone,children:y.text})}),g&&(0,z.jsx)(`div`,{style:{marginTop:10},children:(0,z.jsx)(X,{tone:`err`,children:g})}),x&&(0,z.jsxs)(`div`,{style:{marginTop:12},children:[x.url&&(0,z.jsx)(Ji,{url:x.url}),x.instructions&&!x.url&&(0,z.jsx)(`p`,{className:`muted small`,children:x.instructions}),x.deviceCode&&(0,z.jsx)(`p`,{className:`muted small`,children:(0,z.jsx)(`code`,{children:x.deviceCode})}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{marginTop:8},onClick:()=>void T(),children:t(`grok.account.cancelLogin`)})]}),c&&i.length===0?(0,z.jsx)(`p`,{className:`muted small`,style:{marginTop:14},children:t(`grok.account.loading`)}):O?(0,z.jsx)(`ul`,{className:`pwi-auth-list`,style:{marginTop:14},children:i.map(e=>{let n=e.active||e.id===o,r=Yd(e,t),i=!!e.needsReauth||Ni(e.health?.status),a=Fi(e.health?.status),s=Ri(t,e.health),c=zi(t,Jd,e.id,e.health),l=m===e.id;return(0,z.jsxs)(`li`,{className:`pwi-auth-acct${n?` pwi-auth-acct--active`:``}`,children:[(0,z.jsxs)(`div`,{className:`pwi-auth-row${n?` pwi-auth-row--active`:``}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`pwi-auth-row-main`,onClick:()=>{!n&&!i&&!a&&!m&&E(e.id)},"aria-current":n?`true`:void 0,disabled:!!(i||a||m&&!l||f),children:[(0,z.jsx)(`span`,{className:`pwi-auth-dot ${i?`pwi-auth-dot--warn`:n?`pwi-auth-dot--ok`:`pwi-auth-dot--off`}`,"aria-hidden":`true`}),(0,z.jsxs)(`span`,{className:`pwi-auth-row-copy`,children:[(0,z.jsx)(`span`,{className:`pwi-auth-row-label`,children:r}),(0,z.jsx)(`span`,{className:`pwi-auth-row-secondary`,children:[e.email,e.plan,`${t(`prov.accountId`)}: ${Ai(e.id)}`].filter(Boolean).join(` · `)}),c&&(0,z.jsx)(`span`,{className:`pwi-auth-row-secondary faint`,children:c}),a&&(0,z.jsx)(`span`,{className:`pwi-auth-row-secondary faint`,children:t(`pws.healthCooldownHint`)})]}),e.plan&&(0,z.jsx)(`span`,{className:`badge badge-green`,children:e.plan}),s&&(0,z.jsx)(`span`,{className:Mi(e.health?.status),children:s}),i&&!s&&(0,z.jsx)(`span`,{className:`badge badge-amber`,children:t(`pws.reauth`)}),n&&(0,z.jsx)(`span`,{className:`badge badge-primary`,children:t(`prov.accountActive`)}),l&&(0,z.jsx)(`span`,{className:`badge badge-muted`,children:t(`pws.accountSwitching`)})]}),i&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:f||m!==null,onClick:()=>void w(!0,e.id),children:t(`pws.reauthenticate`)}),!n&&!i&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:f||m!==null,onClick:()=>void E(e.id),children:t(`grok.account.select`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:f||m!==null,onClick:()=>void D(e.id),children:t(`common.remove`)})]}),(0,z.jsx)(`div`,{className:`pwi-auth-acct-quota`,children:e.quotaUnavailable?(0,z.jsx)(`p`,{className:`muted pwi-auth-acct-quota-stale`,children:t(`pws.accountQuotaUnavailable`)}):e.quota==null?e.plan?(0,z.jsx)(`p`,{className:`muted pwi-auth-acct-quota-stale`,children:t(`pws.accountPlanOnly`,{plan:e.plan})}):(0,z.jsx)(Br,{quota:null,plan:null,threshold:80,t,layout:`stacked`,pending:!0}):(0,z.jsx)(Br,{quota:e.quota,plan:e.plan??null,threshold:80,t,layout:`stacked`})})]},e.id)})}):(0,z.jsx)(`p`,{className:`muted small`,style:{marginTop:14},children:t(`grok.account.empty`)})]})}var Zd=Od(`ocx.grok.collapsedGroups.v2`),Qd=[{id:`native`,tkey:`grok.groupNative`},{id:`routed`,tkey:`grok.groupRouted`}],$d=new Set(Qd.map(e=>e.id));function ef(e,t){return e?e>=1048576?t(`claudeDesktop.contextM`,{n:Math.round(e/1048576)}):e>=1e6?t(`claudeDesktop.contextM`,{n:e/1e6}):t(`claudeDesktop.contextK`,{n:Math.round(e/1e3)}):`—`}function tf({apiBase:e}){let t=Y(),n=`ocx.grok.status.v1:${e}`,r=Z(n),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(()=>Zd.read()??new Set($d)),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null),[f,p]=(0,_.useState)(``),m=(0,_.useCallback)(async()=>{let r=await ct(await fetch(`${e}/api/grok`),t(`grok.loadFail`));if(!r)throw Error(t(`grok.loadFail`));let i={...r,candidates:r.candidates??[],excluded:r.excluded??[]};return Q(n,i),i},[e,n,t]),h=`grok-status:${e}`,g=Is(h,[e],m,{isEmpty:()=>!1,initialData:r??void 0}),{state:v}=g,y=g.refresh,b=v.data??r,x=(0,_.useMemo)(()=>new Set(b?.excluded??[]),[b]),S=i??x,C=(0,_.useMemo)(()=>i!==null&&(i.size!==x.size||[...i].some(e=>!x.has(e))),[i,x]),w=(0,_.useMemo)(()=>new Map((b?.models??[]).map(e=>[e.id,e.alias])),[b]),T=e=>{let t=kd(o,e);Zd.write(t),s(t)},E=e=>{let t=e?new Set(Qd.map(e=>e.id)):new Set;Zd.write(t),s(t)},D=(e,t)=>{a(n=>{let r=new Set(n??x);return t?r.delete(e):r.add(e),r})},O=async r=>{if(!c){l(`save`),d(null);try{await ct(await fetch(`${e}/api/grok/selection`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({excluded:[...S]})}),t(`grok.saveFailed`));let i=[...S];if(b&&L(h,{...b,excluded:i}),a(null),r){l(`apply`);let n=await fetch(`${e}/api/grok/apply`,{method:`POST`});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.message??e.error??t(`grok.applyFailed`))}let r=await n.json().catch(()=>({}));r.skippedReason?(d({tone:`err`,text:r.message??t(`grok.applySkipped`)}),p(r.message??t(`grok.applySkipped`))):(d({tone:`ok`,text:t(`grok.savedApplied`)}),p(t(`grok.savedApplied`))),await y()}else d({tone:`ok`,text:t(`grok.saved`)}),p(t(`grok.saved`)),b&&Q(n,{...b,excluded:i})}catch(e){let n=e instanceof Error?e.message:t(`grok.saveFailed`);d({tone:`err`,text:n}),p(n)}finally{l(null)}}};return v.showSkeleton&&!b?(0,z.jsx)(`section`,{className:`grok-page`,children:(0,z.jsx)(Rs,{label:t(`grok.loading`),rows:4})}):v.kind===`failed-cold`?(0,z.jsxs)(`section`,{className:`grok-page`,children:[(0,z.jsx)(`div`,{className:`alert alert-err`,role:`alert`,children:v.error instanceof Error?v.error.message:t(`grok.loadFail`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>y(),children:t(`common.retry`)})]}):(0,z.jsxs)(`section`,{className:`grok-page`,"aria-busy":v.refreshing||void 0,children:[(0,z.jsx)(`h2`,{className:`page-title`,children:t(`grok.title`)}),(0,z.jsx)(`p`,{className:`page-sub`,children:t(`grok.subtitle`)}),(0,z.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:f}),u&&(0,z.jsx)(X,{tone:u.tone,children:u.text}),v.showError&&(0,z.jsx)(X,{tone:`err`,children:t(`grok.loadFail`)}),(0,z.jsx)(`div`,{style:{marginBottom:20},children:(0,z.jsx)(Xd,{apiBase:e})}),(0,z.jsx)(`h3`,{className:`panel-title`,style:{margin:`8px 0 4px`},children:t(`grok.modelsSection`)}),(0,z.jsx)(`p`,{className:`page-sub`,style:{marginTop:0},children:t(`grok.modelsSectionSub`)}),b&&b.candidates.length>0&&(0,z.jsxs)(`div`,{className:`claude-profile-bar`,children:[(0,z.jsx)(`span`,{className:`claude-dirty${C?` active`:``}`,children:t(C?`grok.unsaved`:`grok.upToDate`)}),(0,z.jsxs)(`div`,{className:`claude-save-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,disabled:!C||c!==null,onClick:()=>void O(!1),children:t(c===`save`?`grok.saving`:`common.save`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:!C||c!==null,onClick:()=>void O(!0),children:t(c===`apply`?`grok.applying`:c===`save`?`grok.saving`:`grok.saveApply`)})]})]}),b?.present?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`grok-endpoint`,children:[(0,z.jsx)(`span`,{children:t(`grok.endpoint`)}),(0,z.jsx)(`code`,{children:b.baseUrl??`—`})]}),(0,z.jsx)(`p`,{className:`page-sub`,children:(0,z.jsx)(`code`,{children:b.configPath})})]}):(0,z.jsxs)(it,{title:t(`grok.notConfiguredTitle`),children:[t(`grok.notConfiguredHint`),(0,z.jsx)(`br`,{}),(0,z.jsx)(`code`,{children:b?.configPath})]}),b&&b.candidates.length>0&&(0,z.jsxs)(`div`,{className:`ocx-group-stack`,children:[(0,z.jsxs)(`div`,{className:`row`,style:{gap:6,margin:`2px 0 10px`},children:[(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,onClick:()=>E(!0),disabled:c!==null,children:[(0,z.jsx)(he,{width:12,height:12,"aria-hidden":`true`}),` `,t(`models.collapseAll`)]}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,onClick:()=>E(!1),disabled:c!==null,children:[(0,z.jsx)(he,{width:12,height:12,"aria-hidden":`true`,style:{transform:`rotate(90deg)`}}),` `,t(`models.expandAll`)]})]}),Qd.map(e=>{let n=qd(b.candidates,w,S,e.id);if(n.total===0)return null;let r=o.has(e.id);return(0,z.jsxs)(`section`,{className:`ocx-group${r?` collapsed`:``}`,"aria-labelledby":`grok-group-${e.id}`,children:[(0,z.jsx)(`header`,{className:`ocx-group-head${r?``:` open`}`,children:(0,z.jsx)(`h3`,{id:`grok-group-${e.id}`,className:`ocx-group-heading`,children:(0,z.jsxs)(`button`,{type:`button`,className:`ocx-group-toggle`,"aria-expanded":!r,"aria-controls":`grok-group-body-${e.id}`,onClick:()=>T(e.id),children:[(0,z.jsx)(he,{className:`ocx-chevron`,width:14,height:14,"aria-hidden":`true`,style:{transform:r?`none`:`rotate(90deg)`}}),(0,z.jsx)(`span`,{className:`ocx-group-name`,children:t(e.tkey)}),(0,z.jsx)(`span`,{className:`ocx-group-count`,children:t(`grok.enabledCount`,{on:n.enabled,total:n.total})})]})})}),!r&&(0,z.jsx)(`div`,{id:`grok-group-body-${e.id}`,className:`grok-model-list`,children:n.rows.map(e=>(0,z.jsxs)(`div`,{className:`grok-model-row`,children:[(0,z.jsx)(nt,{on:e.enabled,onClick:()=>D(e.id,!e.enabled),disabled:c!==null,label:t(`grok.toggleModel`,{id:e.id})}),(0,z.jsxs)(`span`,{className:`grok-model-names`,children:[(0,z.jsx)(`strong`,{title:e.id,children:e.id}),(0,z.jsx)(`code`,{title:e.alias??void 0,children:e.alias??`—`})]}),(0,z.jsx)(`span`,{className:`claude-model-context`,children:ef(e.contextWindow,t)})]},e.id))})]},e.id)})]})]})}var nf=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],rf=[`ask`,`always`,`never`];function af({apiBase:e}){let t=Y(),n=`ocx.pi.status.v1:${e}`,r=Z(n),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(null),m=(0,_.useCallback)(async()=>{let r=await ct(await fetch(`${e}/api/pi`),t(`pi.loadFail`));if(!r)throw Error(t(`pi.loadFail`));return Q(n,r),p(e=>{if(e)return e;let t=r.settings?.settings??{};return{defaultProvider:t.defaultProvider??``,defaultModel:t.defaultModel??``,defaultThinkingLevel:t.defaultThinkingLevel??``,theme:t.theme??``,defaultProjectTrust:t.defaultProjectTrust??``,hideThinkingBlock:t.hideThinkingBlock??!1,quietStartup:t.quietStartup??!1}}),r},[e,n,t]),h=Is(`pi-status:${e}`,[e],m,{isEmpty:()=>!1,initialData:r??void 0}),{state:g}=h,v=h.refresh,y=g.data??r,b=async(n,r,o,c=`pi.actionOk`)=>{if(!i){a(n),s(null);try{let n=await fetch(`${e}${r}`,o),i=await n.json().catch(()=>({}));if(!n.ok||i.ok===!1)throw Error(i.message??i.error??t(`pi.actionFail`));let a=i.skippedReason?i.message??t(`pi.applySkipped`):i.message??t(c);s({tone:i.skippedReason?`err`:`ok`,text:a}),l(a),p(null),await v()}catch(e){let n=e instanceof Error?e.message:t(`pi.actionFail`);s({tone:`err`,text:n}),l(n)}finally{a(null)}}},x=async()=>{if(!f||i)return;let e={defaultProvider:f.defaultProvider.trim()||null,defaultModel:f.defaultModel.trim()||null,defaultThinkingLevel:f.defaultThinkingLevel.trim()||null,theme:f.theme.trim()||null,defaultProjectTrust:f.defaultProjectTrust.trim()||null,hideThinkingBlock:f.hideThinkingBlock,quietStartup:f.quietStartup};await b(`settings`,`/api/pi/settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)},`pi.settingsSaved`)};if(g.showSkeleton&&!y)return(0,z.jsx)(`section`,{className:`pi-page`,children:(0,z.jsx)(Rs,{label:t(`pi.loading`),rows:5})});if(g.kind===`failed-cold`)return(0,z.jsxs)(`section`,{className:`pi-page`,children:[(0,z.jsx)(`div`,{className:`alert alert-err`,role:`alert`,children:g.error instanceof Error?g.error.message:t(`pi.loadFail`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>v(),children:t(`common.retry`)})]});let S=f;return(0,z.jsxs)(`section`,{className:`pi-page`,"aria-busy":g.refreshing||void 0,children:[(0,z.jsx)(`h2`,{className:`page-title`,children:t(`pi.title`)}),(0,z.jsx)(`p`,{className:`page-sub`,children:t(`pi.subtitle`)}),(0,z.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:c}),o&&(0,z.jsx)(X,{tone:o.tone,children:o.text}),g.showError&&(0,z.jsx)(X,{tone:`err`,children:t(`pi.loadFail`)}),y?.hint&&(0,z.jsx)(X,{tone:`err`,children:y.hint}),(0,z.jsxs)(`div`,{className:`panel`,style:{marginTop:12},children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:t(`pi.statusTitle`)}),(0,z.jsxs)(`dl`,{className:`awi-kv`,children:[(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:t(`pi.binary`)}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(`code`,{children:y?.piBinary??t(`pi.missing`)})})]}),(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:t(`pi.agentDir`)}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(`code`,{children:y?.agentDir??`—`})})]}),(0,z.jsxs)(`div`,{className:`awi-kv-row`,children:[(0,z.jsx)(`dt`,{children:t(`pi.modelsFile`)}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(`code`,{children:y?.modelsPath??`—`})})]})]})]}),(0,z.jsxs)(`div`,{className:`panel`,style:{marginTop:16},children:[(0,z.jsxs)(`div`,{className:`row`,style:{justifyContent:`space-between`,alignItems:`center`,gap:8},children:[(0,z.jsx)(`h3`,{className:`panel-title`,style:{margin:0},children:t(`pi.modelsTitle`)}),(0,z.jsxs)(`div`,{className:`row`,style:{gap:8},children:[(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:i!==null||!y?.agentDirPresent,onClick:()=>void b(`apply`,`/api/pi/apply`,{method:`POST`},`pi.applied`),children:t(i===`apply`?`pi.applying`:`pi.apply`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:i!==null||!y?.models.present,onClick:()=>void b(`remove`,`/api/pi/remove`,{method:`POST`},`pi.removed`),children:t(i===`remove`?`pi.removing`:`pi.remove`)})]})]}),(0,z.jsx)(`p`,{className:`muted small`,style:{marginTop:8},children:t(`pi.modelsHint`)}),y?.models.present?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`grok-endpoint`,style:{marginTop:8},children:[(0,z.jsx)(`span`,{children:t(`pi.endpoint`)}),(0,z.jsx)(`code`,{children:y.models.baseUrl??`—`})]}),(0,z.jsx)(`p`,{className:`muted small`,children:t(`pi.modelCount`,{count:y.models.modelCount})}),y.models.models.length>0&&(0,z.jsxs)(`ul`,{className:`muted small`,style:{maxHeight:180,overflow:`auto`,margin:`8px 0 0`,paddingLeft:18},children:[y.models.models.slice(0,40).map(e=>(0,z.jsxs)(`li`,{children:[(0,z.jsx)(`code`,{children:e.id}),e.name&&e.name!==e.id?` — ${e.name}`:``]},e.id)),y.models.models.length>40&&(0,z.jsx)(`li`,{children:t(`pi.moreModels`,{n:y.models.models.length-40})})]})]}):(0,z.jsx)(it,{title:t(`pi.modelsNotPresentTitle`),children:t(`pi.modelsNotPresentHint`)})]}),(0,z.jsxs)(`div`,{className:`panel`,style:{marginTop:16},children:[(0,z.jsxs)(`div`,{className:`row`,style:{justifyContent:`space-between`,alignItems:`center`,gap:8},children:[(0,z.jsx)(`h3`,{className:`panel-title`,style:{margin:0},children:t(`pi.settingsTitle`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:i!==null||!S||!y?.agentDirPresent,onClick:()=>void x(),children:t(i===`settings`?`pi.savingSettings`:`pi.saveSettings`)})]}),(0,z.jsx)(`p`,{className:`muted small`,style:{marginTop:8},children:t(`pi.settingsHint`)}),S&&(0,z.jsxs)(`div`,{className:`form-grid`,style:{marginTop:12,display:`grid`,gap:10,gridTemplateColumns:`repeat(auto-fill, minmax(220px, 1fr))`},children:[(0,z.jsxs)(`label`,{className:`field`,children:[(0,z.jsx)(`span`,{className:`text-label`,children:t(`pi.defaultProvider`)}),(0,z.jsx)(`input`,{className:`input`,value:S.defaultProvider,onChange:e=>p({...S,defaultProvider:e.target.value}),placeholder:`opencodex`})]}),(0,z.jsxs)(`label`,{className:`field`,children:[(0,z.jsx)(`span`,{className:`text-label`,children:t(`pi.defaultModel`)}),(0,z.jsx)(`input`,{className:`input`,value:S.defaultModel,onChange:e=>p({...S,defaultModel:e.target.value}),placeholder:`provider/model`})]}),(0,z.jsxs)(`label`,{className:`field`,children:[(0,z.jsx)(`span`,{className:`text-label`,children:t(`pi.thinking`)}),(0,z.jsxs)(`select`,{className:`input`,value:S.defaultThinkingLevel,onChange:e=>p({...S,defaultThinkingLevel:e.target.value}),children:[(0,z.jsx)(`option`,{value:``,children:t(`pi.unset`)}),nf.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))]})]}),(0,z.jsxs)(`label`,{className:`field`,children:[(0,z.jsx)(`span`,{className:`text-label`,children:t(`pi.theme`)}),(0,z.jsx)(`input`,{className:`input`,value:S.theme,onChange:e=>p({...S,theme:e.target.value}),placeholder:`dark`})]}),(0,z.jsxs)(`label`,{className:`field`,children:[(0,z.jsx)(`span`,{className:`text-label`,children:t(`pi.projectTrust`)}),(0,z.jsxs)(`select`,{className:`input`,value:S.defaultProjectTrust,onChange:e=>p({...S,defaultProjectTrust:e.target.value}),children:[(0,z.jsx)(`option`,{value:``,children:t(`pi.unset`)}),rf.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))]})]}),(0,z.jsxs)(`div`,{className:`field`,style:{display:`flex`,flexDirection:`column`,gap:8,justifyContent:`center`},children:[(0,z.jsxs)(`label`,{className:`row`,style:{gap:8,alignItems:`center`},children:[(0,z.jsx)(nt,{on:S.hideThinkingBlock,onClick:()=>p({...S,hideThinkingBlock:!S.hideThinkingBlock}),label:t(`pi.hideThinking`)}),(0,z.jsx)(`span`,{children:t(`pi.hideThinking`)})]}),(0,z.jsxs)(`label`,{className:`row`,style:{gap:8,alignItems:`center`},children:[(0,z.jsx)(nt,{on:S.quietStartup,onClick:()=>p({...S,quietStartup:!S.quietStartup}),label:t(`pi.quietStartup`)}),(0,z.jsx)(`span`,{children:t(`pi.quietStartup`)})]})]})]}),y?.settings.otherKeyCount?(0,z.jsx)(`p`,{className:`muted small`,style:{marginTop:8},children:t(`pi.otherKeys`,{count:y.settings.otherKeyCount})}):null,(0,z.jsx)(`p`,{className:`muted small`,children:(0,z.jsx)(`code`,{children:y?.settingsPath})})]}),(0,z.jsxs)(`div`,{className:`panel`,style:{marginTop:16},children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:t(`pi.packagesTitle`)}),(0,z.jsx)(`p`,{className:`muted small`,children:t(`pi.packagesHint`)}),(0,z.jsxs)(`div`,{className:`row`,style:{gap:8,marginTop:10,flexWrap:`wrap`},children:[(0,z.jsx)(`input`,{className:`input`,style:{flex:`1 1 220px`},value:u,onChange:e=>d(e.target.value),placeholder:`npm:@scope/pkg or git:github.com/user/repo`,disabled:i!==null||!y?.piBinary}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:i!==null||!u.trim()||!y?.piBinary,onClick:()=>{let e=u.trim();b(`install`,`/api/pi/packages/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({source:e})},`pi.packageInstalled`).then(()=>d(``))},children:t(i===`install`?`pi.installing`:`pi.install`)})]}),(y?.packages.packages.length??0)===0?(0,z.jsx)(`p`,{className:`muted small`,style:{marginTop:10},children:t(`pi.noPackages`)}):(0,z.jsx)(`ul`,{style:{marginTop:12,paddingLeft:0,listStyle:`none`},children:y.packages.packages.map(e=>(0,z.jsxs)(`li`,{className:`row`,style:{justifyContent:`space-between`,gap:8,marginBottom:6},children:[(0,z.jsx)(`code`,{style:{wordBreak:`break-all`},children:e.source}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:i!==null||!y?.piBinary,onClick:()=>void b(`pkg-remove`,`/api/pi/packages/remove`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({source:e.source})},`pi.packageRemoved`),children:t(`pi.removePackage`)})]},e.source))}),y?.packages.listOutput&&(0,z.jsx)(`pre`,{className:`api-example-pre`,style:{marginTop:10,maxHeight:140,overflow:`auto`},children:y.packages.listOutput})]}),(0,z.jsxs)(`div`,{className:`panel`,style:{marginTop:16},children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:t(`pi.extensionsTitle`)}),(0,z.jsx)(`p`,{className:`muted small`,children:t(`pi.extensionsHint`)}),(0,z.jsx)(`p`,{className:`muted small`,children:(0,z.jsx)(`code`,{children:y?.extensions.autoDir})}),(y?.extensions.entries.length??0)===0?(0,z.jsx)(`p`,{className:`muted small`,children:t(`pi.noExtensions`)}):(0,z.jsx)(`ul`,{style:{marginTop:8,paddingLeft:18},children:y.extensions.entries.map(e=>(0,z.jsxs)(`li`,{children:[(0,z.jsx)(`code`,{children:e.name}),` `,(0,z.jsxs)(`span`,{className:`muted small`,children:[`(`,e.origin,` · `,e.kind,`)`]})]},`${e.origin}:${e.path}`))})]}),(0,z.jsx)(`p`,{className:`muted small`,style:{marginTop:16},children:t(`pi.cliHint`)})]})}function of(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.supported==`boolean`&&typeof t.installed==`boolean`&&typeof t.running==`boolean`&&typeof t.stale==`boolean`&&typeof t.summary==`string`}var sf={native:`startup.status.native`,protected:`startup.status.protected`,"at-risk":`startup.status.atRisk`},cf={native:`startup.summary.native`,protected:`startup.summary.protected`,"at-risk":`startup.summary.atRisk`},lf={service:`startup.protection.service`,shim:`startup.protection.shim`,none:`startup.protection.none`};function uf({ok:e,yes:t,no:n}){return(0,z.jsx)(`span`,{className:`badge ${e?`badge-green`:`badge-amber`}`,children:e?t:n})}function df({failed:e,data:t}){let{t:n}=ze(),r=e?`startup-hero--risk`:t.status===`protected`?`startup-hero--safe`:t.status===`at-risk`?`startup-hero--risk`:`startup-hero--native`,i=e||t.status===`at-risk`?J:ie,a=t.routingKind===`opencodex-local`?`startup.routing.proxy`:t.routingKind===`custom-local`?`startup.routing.customLocal`:t.routingKind===`custom-remote`?`startup.routing.customRemote`:t.routingKind===`unknown`?`startup.routing.unknown`:`startup.routing.native`;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`section`,{className:`panel startup-hero ${r}`,"aria-live":`polite`,children:[(0,z.jsx)(`div`,{className:`startup-hero-icon`,children:(0,z.jsx)(i,{})}),(0,z.jsxs)(`div`,{className:`startup-hero-copy`,children:[(0,z.jsx)(`span`,{className:`badge ${e||t.status===`at-risk`?`badge-amber`:`badge-green`}`,children:n(e?`startup.status.atRisk`:sf[t.status])}),(0,z.jsx)(`h3`,{children:n(e?`startup.error`:cf[t.status])}),(0,z.jsx)(`p`,{children:e?n(`startup.staleData`):t.status===`at-risk`?n(cn(t)):n(`startup.safeDetail`)})]})]}),(0,z.jsxs)(`div`,{className:`startup-state-grid`,children:[(0,z.jsxs)(`section`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`label`,children:n(`startup.routing`)}),(0,z.jsx)(`div`,{className:`value`,children:n(a)})]}),(0,z.jsxs)(`section`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`label`,children:n(`startup.restartProtection`)}),(0,z.jsx)(`div`,{className:`value`,children:n(lf[t.protection])})]}),(0,z.jsxs)(`section`,{className:`stat`,children:[(0,z.jsx)(`div`,{className:`label`,children:n(`startup.preference`)}),(0,z.jsx)(`div`,{className:`value`,children:n(t.autostartEnabled?`startup.enabled`:`startup.disabled`)})]})]})]})}function ff({data:e,failed:t,loading:n=!1,installBusy:r,installResult:i,onInstall:a}){let{t:o}=ze(),s=e.serviceSupported&&e.serviceInstalled&&e.serviceStale&&!e.serviceConflict,c=e.shimInstalled&&!e.shimHealthy,l=r!==null||t||n;return(0,z.jsxs)(`section`,{className:`panel startup-details`,children:[(0,z.jsxs)(`div`,{className:`panel-head`,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:o(`startup.details`)}),(0,z.jsx)(`span`,{className:`muted mono`,children:e.platform})]}),(0,z.jsxs)(`div`,{className:`startup-detail-row`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:o(`startup.service`)}),(0,z.jsx)(`span`,{children:o(`startup.serviceHint`)})]}),(0,z.jsxs)(`div`,{className:`startup-detail-actions`,children:[(0,z.jsx)(uf,{ok:e.serviceViable,yes:o(`startup.viable`),no:o(e.serviceConflict?`startup.conflict`:e.serviceStale?`startup.stale`:e.serviceInstalled?`startup.unhealthy`:e.serviceSupported?`startup.notInstalled`:`startup.unsupported`)}),e.serviceSupported&&!e.serviceInstalled&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"aria-label":`${o(`startup.service`)} - ${o(`startup.install`)}`,disabled:l,onClick:()=>a(`install-service`),children:o(r===`install-service`?`startup.installing`:`startup.install`)}),s&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"aria-label":`${o(`startup.service`)} - ${o(`startup.repair`)}`,disabled:l,onClick:()=>a(`install-service`,{repair:!0}),children:o(r===`install-service`?`startup.repairing`:`startup.repair`)})]})]}),(0,z.jsxs)(`div`,{className:`startup-detail-row`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:o(`startup.shim`)}),(0,z.jsx)(`span`,{children:o(`startup.shimHint`)})]}),(0,z.jsxs)(`div`,{className:`startup-detail-actions`,children:[(0,z.jsx)(uf,{ok:e.shimHealthy&&e.autostartEnabled,yes:o(e.shimCoverage===`cli-only`?`startup.cliOnly`:`startup.healthy`),no:o(e.shimInstalled?e.shimHealthy&&!e.autostartEnabled?`startup.installedDisabled`:`startup.stale`:`startup.notInstalled`)}),!e.shimInstalled&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"aria-label":`${o(`startup.shim`)} - ${o(`startup.install`)}`,disabled:l,onClick:()=>a(`install-shim`),children:o(r===`install-shim`?`startup.installing`:`startup.install`)}),c&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"aria-label":`${o(`startup.shim`)} - ${o(`startup.repair`)}`,disabled:l,onClick:()=>a(`install-shim`,{repair:!0}),children:o(r===`install-shim`?`startup.repairing`:`startup.repair`)})]})]}),i&&(0,z.jsx)(`div`,{className:`notice ${i.kind===`success`?`notice-ok`:`notice-warn`} startup-action-notice`,role:`status`,"aria-live":`polite`,children:i.kind===`success`?i.action===`install-service`?o(i.repair?`startup.serviceRepaired`:`startup.serviceInstalled`):o(i.repair?`startup.shimRepaired`:`startup.shimInstalled`):`${o(`startup.installFailed`)} ${i.detail??``}`})]})}function pf({tray:e,trayLoading:t,trayError:n,trayBusy:r,onTrayAction:i}){let{t:a}=ze();return(0,z.jsxs)(`section`,{className:`panel startup-actions`,children:[(0,z.jsxs)(`div`,{className:`panel-head`,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:a(`startup.tray.title`)}),(0,z.jsx)(_e,{})]}),(0,z.jsx)(`p`,{className:`muted`,children:a(`startup.tray.hint`)}),(0,z.jsxs)(`div`,{className:`startup-detail-row`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:a(`startup.tray.login`)}),(0,z.jsx)(`span`,{children:a(`startup.tray.notProtection`)})]}),t||n||!e?(0,z.jsx)(`span`,{className:`badge badge-amber`,children:a(t?`startup.tray.loading`:`startup.tray.unavailable`)}):(0,z.jsx)(uf,{ok:e.running&&!e.stale,yes:a(`startup.tray.running`),no:a(e.stale?`startup.tray.stale`:e.installed?`startup.tray.stopped`:`startup.tray.notInstalled`)})]}),(0,z.jsxs)(`div`,{className:`startup-tray-buttons`,children:[!t&&!n&&e&&!e.installed&&!e.stale&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:r,onClick:()=>i(`install`),children:a(`startup.tray.install`)}),!t&&!n&&e?.installed&&!e.stale&&!e.running&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,disabled:r,onClick:()=>i(`start`),children:a(`startup.tray.start`)}),!t&&!n&&e?.running&&!e.stale&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,disabled:r,onClick:()=>i(`stop`),children:a(`startup.tray.stop`)}),!t&&!n&&e&&(e.installed||e.stale)&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-danger`,disabled:r,onClick:()=>{window.confirm(a(`startup.tray.uninstall`))&&i(`uninstall`)},children:a(`startup.tray.uninstall`)})]}),(n||e?.stale)&&(0,z.jsx)(`div`,{className:`notice notice-warn startup-tray-error`,role:`alert`,children:a(`startup.tray.error`)})]})}function mf({data:e,copied:t,onCopy:n}){let{t:r}=ze();return(0,z.jsxs)(`section`,{className:`panel startup-actions`,children:[(0,z.jsxs)(`div`,{className:`panel-head`,children:[(0,z.jsx)(`h3`,{className:`panel-title`,children:r(`startup.recovery`)}),(0,z.jsx)(te,{})]}),(0,z.jsx)(`p`,{className:`muted`,children:r(`startup.recoveryHint`)}),(0,z.jsxs)(`div`,{className:`startup-command-list`,children:[e.serviceSupported&&(0,z.jsxs)(`div`,{className:`startup-command-row`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:r(`startup.command.service`)}),(0,z.jsx)(`code`,{children:e.commands.installService})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>n(e.commands.installService),children:t===e.commands.installService?r(`startup.copied`):r(`startup.copy`)})]}),(0,z.jsxs)(`div`,{className:`startup-command-row`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:r(`startup.command.shim`)}),(0,z.jsx)(`code`,{children:e.commands.installShim})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>n(e.commands.installShim),children:t===e.commands.installShim?r(`startup.copied`):r(`startup.copy`)})]}),(0,z.jsxs)(`div`,{className:`startup-command-row`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:r(`startup.command.native`)}),(0,z.jsx)(`code`,{children:e.commands.restoreNative})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>n(e.commands.restoreNative),children:t===e.commands.restoreNative?r(`startup.copied`):r(`startup.copy`)})]})]}),e.status===`at-risk`&&(0,z.jsxs)(`div`,{className:`notice notice-warn startup-action-notice`,role:`alert`,children:[(0,z.jsx)(_e,{}),` `,r(`startup.recommended`,{cmd:e.recommendedCommand??e.commands.installService})]})]})}var hf=`ocx.startup.page.v1:`;function gf(e,t){let n=t===`win32`?`; `:` && `;return e.join(n)}function _f(e,t,n){if(!e)return{warning:null,fix:null};let r=!!e.catalogClamp?.active,i=!!e.newerAvailable,a=(r?e.catalogClamp?.runtimeVersion:e.version)??e.version??`unknown`,o=(e.catalogClamp?.removedEfforts??[]).join(`, `),s=gf([`ocx doctor --fix-codex-runtime`,`ocx sync`],n);return r?{warning:o?t(`startup.codexRuntime.clampHiddenWithEfforts`,{version:a,efforts:o}):t(`startup.codexRuntime.clampHidden`,{version:a}),fix:i?s:`ocx sync`}:i?{warning:t(`startup.codexRuntime.olderBinary`,{version:a}),fix:s}:{warning:null,fix:null}}function vf({apiBase:e}){let{t}=ze(),n=`${hf}${e}`,r=(0,_.useMemo)(()=>Z(n),[n]),i=`startup-page:${e}`,[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(()=>r?.tray??null),[l,u]=(0,_.useState)(()=>!r?.data),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(null),[b,x]=(0,_.useState)(()=>r?.warning??null),[S,C]=(0,_.useState)(()=>r?.fix??null),[w,T]=(0,_.useState)(()=>!r?.data),E=(0,_.useRef)(!!r?.data),D=(0,_.useCallback)(async r=>{let i=E.current;i||(u(!0),T(!0));try{let i=fetch(`${e}/api/settings`,{signal:r}).then(async e=>e.ok?await e.json():null).catch(()=>null),a=await fetch(`${e}/api/startup-health`,{signal:r});if(!a.ok)throw Error(`fetch failed`);let o=await a.json();E.current=!0;let s=Z(n);Q(n,{data:o,warning:s?.warning??null,fix:s?.fix??null,tray:s?.tray??null});let l=o.platform===`win32`?fetch(`${e}/api/windows-tray`,{signal:r}).then(async e=>{if(!e.ok)throw Error(`tray status failed`);let t=await e.json();if(!of(t))throw Error(`invalid tray status`);return{tray:t,error:!1}}).catch(()=>({tray:null,error:!0})):Promise.resolve({tray:null,error:!1});return Promise.all([i,l]).then(([e,i])=>{if(r.aborted)return;let a=o.platform===`win32`?i.tray:null;if(o.platform===`win32`?(c(a),m(i.error)):(c(null),m(!1)),u(!1),T(!1),e){let r=_f(e.codexRuntime,t,o.platform);x(r.warning),C(r.fix),Q(n,{data:o,warning:r.warning,fix:r.fix,tray:a});return}let s=Z(n);Q(n,{data:o,warning:s?.warning??null,fix:s?.fix??null,tray:a})}),o}catch(e){throw r.aborted?e:(i||(c(null),m(!0),x(null),C(null)),T(!1),u(!1),e)}},[e,n,t]),O=Is(i,[e],D,{isEmpty:()=>!1,initialData:r?.data??void 0}),k=O.state,A=O.refresh,j=k.data??r?.data??null,M=k.refreshing,N=!!j?.diagnosticStale||k.showError;(0,_.useEffect)(()=>{if(!j?.diagnosticStale)return;let e=window.setTimeout(A,2e3);return()=>window.clearTimeout(e)},[j,A]);let P=async e=>{try{await navigator.clipboard.writeText(e),o(e),window.setTimeout(()=>o(t=>t===e?null:t),1600)}catch{o(null)}},F=async t=>{f(!0),m(!1);try{let n=await fetch(`${e}/api/windows-tray`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:t})});if(!n.ok)throw Error(`tray action failed`);let r=await n.json();if(!of(r.status))throw Error(`invalid tray action status`);c(r.status),m(!1)}catch{c(null),m(!0)}finally{f(!1)}},I=async(t,n)=>{g(t),y(null);try{let r=await fetch(`${e}/api/startup-action`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:t,repair:n?.repair===!0})});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(typeof e?.error==`string`?e.error:`installation failed`)}y({kind:`success`,action:t,repair:n?.repair===!0}),A()}catch(e){y({kind:`error`,action:t,repair:n?.repair===!0,detail:e instanceof Error?e.message:String(e)})}finally{g(null)}};return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`page-head`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{children:t(`startup.title`)}),(0,z.jsx)(`p`,{className:`page-sub startup-page-sub`,children:t(`startup.subtitle`)})]}),(0,z.jsxs)(`div`,{className:`startup-page-head-actions`,children:[(0,z.jsx)(`a`,{className:`btn btn-ghost btn-sm`,href:`#dashboard`,children:t(`startup.backToDashboard`)}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>A(),disabled:M,children:[(0,z.jsx)(q,{}),` `,t(`startup.refresh`)]})]})]}),k.showSkeleton&&!j?(0,z.jsx)(Rs,{label:t(`startup.loading`),rows:5}):k.kind===`failed-cold`?(0,z.jsxs)(`div`,{className:`startup-page-notice`,children:[(0,z.jsx)(X,{tone:`err`,children:k.error instanceof Error?k.error.message:t(`startup.error`)}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>A(),children:t(`common.retry`)})]}):j?(0,z.jsxs)(z.Fragment,{children:[k.showError&&(0,z.jsx)(X,{tone:`err`,children:t(`startup.error`)}),N&&(0,z.jsx)(`div`,{className:`notice notice-warn startup-page-notice`,role:`alert`,children:t(`startup.staleData`)}),(w||b)&&(0,z.jsx)(`div`,{className:`startup-runtime-notice-slot${w&&!b?` startup-runtime-notice-slot--pending`:``}`,"aria-hidden":w&&!b?!0:void 0,children:b&&(0,z.jsxs)(`div`,{className:`notice notice-warn startup-page-notice startup-runtime-notice`,role:`status`,children:[(0,z.jsx)(`p`,{className:`startup-runtime-notice__text`,children:b}),S&&(0,z.jsxs)(`div`,{className:`startup-runtime-notice__fix`,children:[(0,z.jsx)(`code`,{children:S}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void P(S),children:t(a===S?`startup.copied`:`startup.copy`)})]})]})}),(0,z.jsx)(df,{failed:N,data:j}),(0,z.jsx)(ff,{data:j,failed:N,loading:M,installBusy:h,installResult:v,onInstall:(e,t)=>{I(e,t)}}),j.platform===`win32`&&(0,z.jsx)(pf,{tray:s,trayLoading:l,trayError:p,trayBusy:d,onTrayAction:e=>{F(e)}}),(0,z.jsx)(mf,{data:j,copied:a,onCopy:e=>{P(e)}})]}):null]})}var yf=class extends _.Component{state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:Error(String(e))}}reload=()=>{this.setState({error:null})};render(){return this.state.error?(0,z.jsxs)(`section`,{className:`card`,role:`alert`,style:{maxWidth:720,padding:`var(--space-6)`},children:[(0,z.jsxs)(`h2`,{style:{margin:`0 0 var(--space-2)`,fontSize:`var(--text-title)`},children:[this.props.pageName,`: `,this.props.title]}),(0,z.jsx)(`p`,{className:`muted`,style:{margin:`0 0 var(--space-4)`},children:this.props.message}),(0,z.jsxs)(`p`,{style:{margin:`0 0 var(--space-5)`,overflowWrap:`anywhere`},children:[(0,z.jsxs)(`strong`,{children:[this.props.detailsLabel,`:`]}),` `,this.state.error.message]}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:this.reload,children:this.props.reloadLabel})]}):this.props.children}},bf=5*6e4,xf=10*6e4,Sf=`https://github.com/lidge-jun/opencodex`;async function Cf(e,t){let n=await fetch(e,{signal:t});return n.ok?await n.json():null}function wf({apiBase:e,onOpenUpdate:t}){let n=Y(),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(null),s=I(`sidebar-star:${e}`,[e],t=>Cf(`${e}/api/github/star`,t),{pollMs:bf}),c=I(`sidebar-update-badge:${e}`,[e],t=>Cf(`${e}/api/update/badge`,t),{pollMs:xf}),l=s.data?.state??null,u=a!==null&&a.basedOn===l?a.state:l??`not-starred`,d=s.data?.url??Sf,f=u===`starred`,p=c.data,m=p?.updateAvailable===!0,h=p?.latestVersion??null,g=()=>window.open(d,`_blank`,`noopener,noreferrer`),v=async()=>{if(!(f||r)){if(u===`unauthenticated`){g();return}i(!0);try{let t=await fetch(`${e}/api/github/star`,{method:`POST`}),n=t.ok?await t.json():null;if(n?.ok===!0){o({state:`starred`,basedOn:l});return}n?.state&&o({state:n.state,basedOn:l}),g()}catch{g()}finally{i(!1),s.refresh()}}},y=n(f?`sidebar.starred`:u===`unauthenticated`?`sidebar.starUnauthenticated`:`sidebar.star`),b=m&&h?n(`sidebar.updateAvailable`,{version:h}):n(`sidebar.checkUpdate`);return(0,z.jsxs)(`div`,{className:`sidebar-github-row`,children:[(0,z.jsxs)(`a`,{className:`sidebar-link sidebar-github-link`,href:d,target:`_blank`,rel:`noreferrer`,children:[(0,z.jsx)(ge,{}),` `,n(`common.github`)]}),(0,z.jsxs)(`div`,{className:`sidebar-github-actions`,children:[(0,z.jsx)(`button`,{type:`button`,className:`sidebar-orb${f?` sidebar-orb--starred`:``}`,onClick:()=>{v()},disabled:r||f,"aria-label":y,"aria-pressed":f,title:y,children:(0,z.jsx)(Ae,{"aria-hidden":`true`,...f?{fill:`currentColor`}:{}})}),(0,z.jsxs)(`button`,{type:`button`,className:`sidebar-orb${m?` sidebar-orb--update`:``}`,onClick:t,"aria-label":b,title:b,children:[(0,z.jsx)(me,{"aria-hidden":`true`}),m&&(0,z.jsx)(`span`,{className:`sidebar-orb-dot`,"aria-hidden":`true`})]})]})]})}var Tf=!1,Ef=null,Df=null,Of=!1,kf=`/`;function Af(e){try{let t=e instanceof Request?e.url:String(e),n=new URL(t,window.location.href);return n.origin===window.location.origin?n.pathname.startsWith(`/api/`):!1}catch{return!1}}var jf=`opencodex-api-token`,Mf=null,Nf=null,Pf=null;function Ff(){return Mf}function If(e){Mf=e}function Lf(){Mf=null,Nf=null,Pf=null}function Rf(e){let t=document.querySelector(`meta[name="${e}"]`),n=t?.content.trim()||null;return t?.remove(),n}function zf(){Vf(Rf(`opencodex-session-token`),Rf(`opencodex-session-csrf`),Rf(`opencodex-session-origin`))}function Bf(e){e!=null&&Ff()===e&&Lf()}function Vf(e,t,n){return!e?.startsWith(`ocx_session_`)||!t||n!==window.location.origin?!1:(Mf=e,Nf=t,Pf=n,!0)}function Hf(e,t){for(let n of e.match(/<meta\b[^>]*>/gi)??[])if(n.match(/\bname="([^"]+)"/i)?.[1]===t)return n.match(/\bcontent="([^"]*)"/i)?.[1]?.trim()||null;return null}async function Uf(){if(!Df)return null;try{let e=await Df(kf,{cache:`no-store`});if(!e.ok)return null;let t=await e.text();return Vf(Hf(t,`opencodex-session-token`),Hf(t,`opencodex-session-csrf`),Hf(t,`opencodex-session-origin`))?Ff():null}catch{return null}}function Wf(){try{sessionStorage.removeItem(jf)}catch{}}function Gf(e,t,n){let r=new Headers(t?.headers??(e instanceof Request?e.headers:void 0));if(r.set(`X-OpenCodex-API-Key`,n),Pf&&Nf&&n.startsWith(`ocx_session_`)){r.set(`X-OpenCodex-GUI-Origin`,Pf);let n=(t?.method??(e instanceof Request?e.method:`GET`)).toUpperCase();n!==`GET`&&n!==`HEAD`&&r.set(`X-OpenCodex-CSRF-Token`,Nf)}return e instanceof Request?[new Request(e,{headers:r}),t?{...t,headers:r}:void 0]:[e,{...t,headers:r}]}async function Kf(e){return Of?null:Ef||(Ef=(async()=>{if(Of)return null;let t=Ff();if(t&&t!==e)return t;let n=await Uf();if(n)return n;let r=window.prompt(`OpenCodex admin token (OPENCODEX_ADMIN_AUTH_TOKEN)`)?.trim()||null;return r?(If(r),r):(Of=!0,null)})().finally(()=>{Ef=null}),Ef)}function qf(){if(Tf)return;Tf=!0,Wf(),zf();let e=window.fetch.bind(window);Df=e,window.fetch=async(t,n)=>{if(!Af(t))return e(t,n);let r=Ff(),[i,a]=r?Gf(t,n,r):[t,n],o=await e(i,a);if(o.status!==401)return o;let s=Ff();if(s&&s!==r){let[r,i]=Gf(t,n,s),a=await e(r,i);if(a.status!==401)return a;Bf(s)}else Bf(r);let c=await Kf(r);if(!c)return o;let[l,u]=Gf(t,n,c),d=await e(l,u);return d.status===401&&Bf(c),d}}var Jf=new Set([`dashboard`,`startup`,`providers`,`models`,`combos`,`subagents`,`logs`,`usage`,`storage`,`cloud`,`codex-auth`,`api`,`clients`,`claude`,`grok`,`pi`]);function Yf(e){let t=He(e??(typeof window<`u`?window.location.hash:``)).split(`/`)[0];return t===`debug`?`logs`:Jf.has(t)?t:`dashboard`}var Xf=[`dashboard/providers`,`dashboard/models`];function Zf(e,t){return e===t||t===`logs`&&e===`logs/debug`||t===`dashboard`&&(e===`dashboard/update`||Xf.includes(e))}function Qf(e){let t=Yf(e);return e===`debug`||e.startsWith(`debug/`)?{page:`logs`,replaceTo:`logs/debug`}:e===`providers/workspace`?{page:`providers`,replaceTo:`providers`}:Zf(e,t)?{page:t,replaceTo:null}:{page:t,replaceTo:t}}var $f=[`ocx-global-view`,`ocx-view`,`ocx-providers-view`,`ocx-subagents-view`,`ocx-storage-view`,`ocx-codexauth-view`,`ocx-apikeys-view`,`ocx-claudecode-view`,`ocx-usage-view`,`ocx-logs-view`,`ocx-models-view`,`ocx-dashboard-view`];function ep(){try{for(let e of $f)localStorage.removeItem(e)}catch{}}function tp(){let[e,t]=(0,_.useState)(Yf);(0,_.useEffect)(()=>{ep()},[]);let n=(0,_.useCallback)(e=>{let n=Qf(e);n.replaceTo&&Ue(n.replaceTo),t(n.page)},[]);return(0,_.useEffect)(()=>{let e=()=>{n(He(window.location.hash))};return window.addEventListener(`hashchange`,e),window.addEventListener(`popstate`,e),()=>{window.removeEventListener(`hashchange`,e),window.removeEventListener(`popstate`,e)}},[n]),(0,_.useEffect)(()=>{let t=He(window.location.hash);if(t===`debug`||t.startsWith(`debug/`)){Ue(`logs/debug`);return}if(t===`providers/workspace`){Ue(`providers`);return}Zf(t,e)||Ue(e)},[e]),{page:e,setPageState:t,navigateToPage:(e,n)=>{We(n?`${e}/${n}`:e),t(e)}}}var np=15e3;function rp(e,t,n){return typeof e?.message==`string`&&e.message.trim()?e.message:typeof e?.error==`string`&&e.error.trim()?e.error:n(t)}function ip(e){return(e instanceof DOMException||e instanceof Error)&&e.name===`AbortError`}async function ap(e,t={}){let{fetchFn:n=fetch,timeoutMs:r=np,formatFailure:i=e=>`Failed to stop proxy (HTTP ${e}).`}=t,a;try{a=await n(`${e}/api/stop`,{method:`POST`,signal:AbortSignal.timeout(r)})}catch(e){return ip(e),{accepted:!0}}let o=await a.json().catch(()=>null);return!a.ok||o?.success===!1?{accepted:!1,message:rp(o,a.status,i)}:{accepted:!0}}qf();var op={dashboard:`nav.dashboard`,startup:`nav.startup`,providers:`nav.providers`,models:`nav.models`,combos:`nav.combos`,subagents:`nav.subagents`,logs:`nav.logs`,usage:`nav.usage`,storage:`nav.storage`,cloud:`nav.cloud`,"codex-auth":`nav.codexAuth`,api:`nav.api`,clients:`nav.clients`,claude:`nav.claude`,grok:`nav.grok`,pi:`nav.pi`},sp=``,cp=`ocx-theme`,lp=[{id:`dashboard`,tkey:`nav.dashboard`,Icon:V},{id:`codex-auth`,tkey:`nav.codexAuth`,Icon:ye},{id:`providers`,tkey:`nav.providers`,Icon:H},{id:`models`,tkey:`nav.models`,Icon:U},{id:`subagents`,tkey:`nav.subagents`,Icon:W},{id:`logs`,tkey:`nav.logs`,Icon:ee},{id:`usage`,tkey:`nav.usage`,Icon:ne},{id:`storage`,tkey:`nav.storage`,Icon:K},{id:`cloud`,tkey:`nav.cloud`,Icon:re},{id:`api`,tkey:`nav.api`,Icon:Ee},{id:`clients`,tkey:`nav.clients`,Icon:Te},{id:`claude`,tkey:`nav.claude`,Icon:De},{id:`grok`,tkey:`nav.grok`,Icon:U},{id:`pi`,tkey:`nav.pi`,Icon:W}],up={light:Ce,dark:we,system:Te},dp={light:`theme.light`,dark:`theme.dark`,system:`theme.system`};function fp(e){if(!e||typeof e!=`object`||!(`version`in e))return null;let t=e.version;return typeof t==`string`&&t.length>0?t:null}function pp(){let e=localStorage.getItem(cp);return e===`light`||e===`dark`?e:`system`}function mp(){let{page:e,navigateToPage:t}=tp(),[n,r]=(0,_.useState)(pp),{locale:i,setLocale:a}=ze(),o=Y(),[s,c]=(0,_.useState)(!1),l=(0,_.useRef)(null),u=(0,_.useRef)(null),d=(0,_.useRef)(!1);(0,_.useEffect)(()=>{let e=()=>c(!1);return window.addEventListener(`hashchange`,e),window.addEventListener(`popstate`,e),()=>{window.removeEventListener(`hashchange`,e),window.removeEventListener(`popstate`,e)}},[]),(0,_.useEffect)(()=>{let e=document.documentElement;n===`system`?(e.removeAttribute(`data-theme`),localStorage.removeItem(cp)):(e.setAttribute(`data-theme`,n),localStorage.setItem(cp,n))},[n]);let f=I(`app-healthz:${sp}`,[],async e=>{let t=await fetch(`${sp}/healthz`,{signal:e});return t.ok?fp(await t.json()):null},{pollMs:3e4}),p=()=>r(e=>e===`light`?`dark`:e===`dark`?`system`:`light`),m=up[n],h=f.data??`2.11.0`,[g,v]=(0,_.useState)(!1),y=(0,_.useCallback)(async e=>{let t=await lt(await fetch(`${sp}/api/claude-code`,{signal:e}));return t&&typeof t.enabled==`boolean`?t.enabled:null},[]),b=I(`app-claude-code:${sp}`,[],y).data??null,x=(0,_.useRef)(!1),[S,C]=(0,_.useState)(!1);(0,_.useEffect)(()=>{if(!s)return;let e=e=>{e.key===`Escape`&&c(!1)};window.addEventListener(`keydown`,e);let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{window.removeEventListener(`keydown`,e),document.body.style.overflow=t}},[s]),(0,_.useEffect)(()=>{if(s){d.current=!0;let e=setTimeout(()=>u.current?.focus(),200);return()=>clearTimeout(e)}d.current&&(d.current=!1,l.current?.focus())},[s]),(0,_.useEffect)(()=>{let e=window.matchMedia(`(min-width: 761px)`),t=()=>{e.matches&&c(!1)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let w=async()=>{if(b===null||x.current)return;x.current=!0,C(!0);let e=!b;L(`app-claude-code:${sp}`,e);try{(await fetch(`${sp}/api/claude-code`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e})})).ok||L(`app-claude-code:${sp}`,!e)}catch{L(`app-claude-code:${sp}`,!e)}finally{x.current=!1,C(!1)}},T=async()=>{if(!confirm(o(`dash.stopConfirm`)))return;v(!0);let e=await ap(sp,{formatFailure:e=>o(`dash.stopFailed`,{status:String(e)})});e.accepted||(v(!1),alert(e.message))},E=(0,z.jsxs)(`div`,{className:`brand`,children:[(0,z.jsx)(`span`,{className:`brand-logo`,role:`img`,"aria-label":o(`app.logoAria`)}),(0,z.jsx)(`span`,{className:`name`,children:`opencodex`}),(0,z.jsxs)(`span`,{className:`ver`,children:[`v`,h]})]});return(0,z.jsxs)(`div`,{className:`app`,children:[(0,z.jsxs)(`header`,{className:`mobile-topbar`,inert:s,children:[(0,z.jsx)(`button`,{ref:l,type:`button`,className:`menu-toggle`,onClick:()=>c(e=>!e),"aria-expanded":s,"aria-controls":`app-sidebar`,"aria-label":o(s?`nav.closeMenu`:`nav.openMenu`),title:o(s?`nav.closeMenu`:`nav.openMenu`),children:(0,z.jsx)(G,{})}),E,(0,z.jsx)(`button`,{type:`button`,className:`theme-toggle stop-toggle`,onClick:T,disabled:g,"aria-label":o(`dash.stop`),title:o(`dash.stop`),children:(0,z.jsx)(_e,{})})]}),s&&(0,z.jsx)(`div`,{className:`drawer-scrim`,onClick:()=>c(!1),"aria-hidden":`true`}),(0,z.jsxs)(`aside`,{id:`app-sidebar`,className:`sidebar${s?` open`:``}`,ref:u,tabIndex:-1,children:[(0,z.jsxs)(`div`,{className:`drawer-head`,children:[E,(0,z.jsx)(`button`,{type:`button`,className:`menu-toggle drawer-close`,onClick:()=>c(!1),"aria-label":o(`nav.closeMenu`),title:o(`nav.closeMenu`),children:(0,z.jsx)(ae,{})})]}),(0,z.jsx)(`nav`,{children:lp.map(({id:n,tkey:r,Icon:i})=>(0,z.jsxs)(`div`,{className:`nav-entry${n===`claude`?` nav-entry-claude${e===n?` active`:``}`:``}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`nav-item${e===n?` active`:``}`,"data-page":n,onClick:()=>{t(n),c(!1)},"aria-current":e===n?`page`:void 0,children:[(0,z.jsx)(i,{}),` `,o(r)]}),n===`claude`&&b!==null&&(0,z.jsx)(nt,{on:b,onClick:()=>void w(),disabled:S,label:o(`claude.toggleAria`)})]},n))}),(0,z.jsxs)(`div`,{className:`sidebar-foot`,children:[(0,z.jsxs)(`div`,{className:`lang-toggle`,children:[(0,z.jsx)(Ee,{"aria-hidden":!0}),(0,z.jsx)(rt,{value:i,options:Pe.map(e=>({value:e.code,label:e.name})),onChange:e=>a(e),label:o(`lang.label`),placement:`right`,portal:!1,style:{flex:1,minWidth:0,width:`100%`}})]}),(0,z.jsxs)(`button`,{type:`button`,className:`theme-toggle`,onClick:p,"aria-label":`${o(`theme.label`)}: ${o(dp[n])}`,title:`${o(`theme.label`)}: ${o(dp[n])}`,children:[(0,z.jsx)(m,{}),` `,(0,z.jsx)(`span`,{className:`mode`,children:o(dp[n])})]}),(0,z.jsxs)(`button`,{type:`button`,className:`theme-toggle stop-toggle`,onClick:T,disabled:g,"aria-label":o(`dash.stop`),title:o(`dash.stop`),children:[(0,z.jsx)(_e,{}),` `,(0,z.jsx)(`span`,{className:`mode`,children:o(g?`dash.stopping`:`dash.stop`)})]}),(0,z.jsx)(wf,{apiBase:sp,onOpenUpdate:()=>{c(!1),t(`dashboard`,`update`)}})]})]}),(0,z.jsx)(`main`,{className:`main`,inert:s,children:(0,z.jsx)(`div`,{className:`main-inner${e===`combos`?` main-inner--combos`:``}`,children:(0,z.jsxs)(yf,{pageName:o(op[e]),title:o(`errorBoundary.title`),message:o(`errorBoundary.message`),detailsLabel:o(`errorBoundary.details`),reloadLabel:o(`errorBoundary.reload`),children:[e===`dashboard`&&(0,z.jsx)(Fn,{apiBase:sp}),e===`startup`&&(0,z.jsx)(vf,{apiBase:sp}),e===`providers`&&(0,z.jsx)(os,{apiBase:sp}),e===`models`&&(0,z.jsx)(Us,{apiBase:sp}),e===`combos`&&(0,z.jsx)(sc,{apiBase:sp},sp),e===`subagents`&&(0,z.jsx)(_c,{apiBase:sp},sp),e===`logs`&&(0,z.jsx)(Il,{apiBase:sp}),e===`usage`&&(0,z.jsx)(iu,{apiBase:sp}),e===`storage`&&(0,z.jsx)(xu,{apiBase:sp}),e===`cloud`&&(0,z.jsx)(Su,{apiBase:sp}),e===`codex-auth`&&(0,z.jsx)(Eu,{apiBase:sp}),e===`api`&&(0,z.jsx)(nd,{apiBase:sp}),e===`clients`&&(0,z.jsx)(Kd,{apiBase:sp}),e===`claude`&&(0,z.jsx)(Vd,{apiBase:sp}),e===`grok`&&(0,z.jsx)(tf,{apiBase:sp}),e===`pi`&&(0,z.jsx)(af,{apiBase:sp})]},e)})})]})}g.createRoot(document.getElementById(`root`)).render((0,z.jsx)(_.StrictMode,{children:(0,z.jsx)(Be,{children:(0,z.jsx)(mp,{})})}));