@zaip-ai/cli 0.1.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (795) hide show
  1. package/README.md +17 -9
  2. package/dist/commands/init.d.ts.map +1 -1
  3. package/dist/commands/init.js +5 -0
  4. package/dist/commands/init.js.map +1 -1
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +57 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/services/adapters.d.ts +17 -0
  10. package/dist/services/adapters.d.ts.map +1 -0
  11. package/dist/services/adapters.js +790 -0
  12. package/dist/services/adapters.js.map +1 -0
  13. package/dist/services/adapters.test.d.ts +2 -0
  14. package/dist/services/adapters.test.d.ts.map +1 -0
  15. package/dist/services/adapters.test.js +25 -0
  16. package/dist/services/adapters.test.js.map +1 -0
  17. package/dist/services/agent-adapters.d.ts +41 -0
  18. package/dist/services/agent-adapters.d.ts.map +1 -0
  19. package/dist/services/agent-adapters.js +122 -0
  20. package/dist/services/agent-adapters.js.map +1 -0
  21. package/dist/services/agent-adapters.test.d.ts +2 -0
  22. package/dist/services/agent-adapters.test.d.ts.map +1 -0
  23. package/dist/services/agent-adapters.test.js +40 -0
  24. package/dist/services/agent-adapters.test.js.map +1 -0
  25. package/dist/services/codex-rules.d.ts +3 -0
  26. package/dist/services/codex-rules.d.ts.map +1 -0
  27. package/dist/services/codex-rules.js +114 -0
  28. package/dist/services/codex-rules.js.map +1 -0
  29. package/dist/services/doctor.d.ts +12 -0
  30. package/dist/services/doctor.d.ts.map +1 -0
  31. package/dist/services/doctor.js +207 -0
  32. package/dist/services/doctor.js.map +1 -0
  33. package/dist/services/global-codex-config.d.ts +15 -0
  34. package/dist/services/global-codex-config.d.ts.map +1 -0
  35. package/dist/services/global-codex-config.js +48 -0
  36. package/dist/services/global-codex-config.js.map +1 -0
  37. package/dist/services/global-codex-config.test.d.ts +2 -0
  38. package/dist/services/global-codex-config.test.d.ts.map +1 -0
  39. package/dist/services/global-codex-config.test.js +102 -0
  40. package/dist/services/global-codex-config.test.js.map +1 -0
  41. package/dist/services/install-agents-template.d.ts.map +1 -1
  42. package/dist/services/install-agents-template.js +174 -79
  43. package/dist/services/install-agents-template.js.map +1 -1
  44. package/dist/services/logger.d.ts.map +1 -1
  45. package/dist/services/logger.js +13 -3
  46. package/dist/services/logger.js.map +1 -1
  47. package/dist/services/logger.test.d.ts +2 -0
  48. package/dist/services/logger.test.d.ts.map +1 -0
  49. package/dist/services/logger.test.js +32 -0
  50. package/dist/services/logger.test.js.map +1 -0
  51. package/dist/services/runtime-template.test.d.ts +2 -0
  52. package/dist/services/runtime-template.test.d.ts.map +1 -0
  53. package/dist/services/runtime-template.test.js +199 -0
  54. package/dist/services/runtime-template.test.js.map +1 -0
  55. package/dist/services/template-manifest.d.ts +6 -2
  56. package/dist/services/template-manifest.d.ts.map +1 -1
  57. package/dist/services/template-manifest.js +93 -10
  58. package/dist/services/template-manifest.js.map +1 -1
  59. package/dist/services/transactional-files.d.ts +11 -0
  60. package/dist/services/transactional-files.d.ts.map +1 -0
  61. package/dist/services/transactional-files.js +114 -0
  62. package/dist/services/transactional-files.js.map +1 -0
  63. package/dist/types.d.ts +13 -0
  64. package/dist/types.d.ts.map +1 -1
  65. package/dist/version.d.ts +2 -0
  66. package/dist/version.d.ts.map +1 -0
  67. package/dist/version.js +6 -0
  68. package/dist/version.js.map +1 -0
  69. package/package.json +4 -2
  70. package/templates/.agents/config/agents/catalog.yaml +246 -0
  71. package/templates/.agents/config/framework.lock.yaml +1 -1
  72. package/templates/.agents/config/project.yaml +8 -0
  73. package/templates/.agents/config/src/icon_zaip.png +0 -0
  74. package/templates/.agents/dashboard/.zaip-managed.json +46 -0
  75. package/templates/.agents/dashboard/README.md +91 -0
  76. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-BOLwg8VW.js +1009 -0
  77. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-_yxs47Hd.css +1 -0
  78. package/templates/.agents/dashboard/apps/frontend/dist/assets/logo_novo_azul-BBx5pA2B.png +0 -0
  79. package/templates/.agents/dashboard/apps/frontend/dist/icon_zaip.png +0 -0
  80. package/templates/.agents/dashboard/apps/frontend/dist/index.html +15 -0
  81. package/templates/.agents/dashboard/apps/frontend/dist/logo_novo_azul.png +0 -0
  82. package/templates/.agents/dashboard/packages/local-runtime/server.mjs +179 -0
  83. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +726 -0
  84. package/templates/.agents/dashboard/zaip-dashboard.exe +0 -0
  85. package/templates/.agents/design/DESIGN.md +180 -0
  86. package/templates/.agents/design/README.md +47 -0
  87. package/templates/.agents/design/apps/catalog/.storybook/main.ts +15 -0
  88. package/templates/.agents/design/apps/catalog/.storybook/preview.ts +21 -0
  89. package/templates/.agents/design/apps/catalog/dist/assets/index-B4pfFtvJ.css +1 -0
  90. package/templates/.agents/design/apps/catalog/dist/assets/index-Bvwc3Bgw.js +9 -0
  91. package/templates/.agents/design/apps/catalog/dist/index.html +14 -0
  92. package/templates/.agents/design/apps/catalog/dist/logo_novo_azul.png +0 -0
  93. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Color-6AOWCN3U-D8qyAXo4.js +1 -0
  94. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-DkBtOSHX.js +1 -0
  95. package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-BttERyCr.js +1 -0
  96. package/templates/.agents/design/apps/catalog/dist/storybook/assets/DocsRenderer-JROSPFPF-LmiVo77Q.js +46 -0
  97. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Primitives-HZpQ6PjX.js +1 -0
  98. package/templates/.agents/design/apps/catalog/dist/storybook/assets/WithTooltip-7X4HQR7L-CTMWAwDe.js +9 -0
  99. package/templates/.agents/design/apps/catalog/dist/storybook/assets/axe-Bk3eEgJf.js +20 -0
  100. package/templates/.agents/design/apps/catalog/dist/storybook/assets/chunk-242VQQM5-DB2JSNUA.js +1 -0
  101. package/templates/.agents/design/apps/catalog/dist/storybook/assets/chunk-DRQKCCAG-DUhJxxRU.js +1 -0
  102. package/templates/.agents/design/apps/catalog/dist/storybook/assets/chunk-QQBDHPVZ-nYh9QWsm.js +1 -0
  103. package/templates/.agents/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-9RCn9-l7.js +18 -0
  104. package/templates/.agents/design/apps/catalog/dist/storybook/assets/components-BX1OfYUi.js +243 -0
  105. package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Bu6KfEwW.js +1 -0
  106. package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-B4pfFtvJ.css +1 -0
  107. package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-LMhZM1ce.js +1154 -0
  108. package/templates/.agents/design/apps/catalog/dist/storybook/assets/jsx-runtime-f3rHp9ZU.js +1 -0
  109. package/templates/.agents/design/apps/catalog/dist/storybook/assets/matchers-JIUQ3HVY-9iRExWZO.js +28 -0
  110. package/templates/.agents/design/apps/catalog/dist/storybook/assets/preload-helper-BdFrVu1K.js +1 -0
  111. package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-18-jAz3avmR.js +9 -0
  112. package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DvDPBd6Q.js +1 -0
  113. package/templates/.agents/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-DV8X2acD.js +6 -0
  114. package/templates/.agents/design/apps/catalog/dist/storybook/assets/theming-CHbHkcNi.js +39 -0
  115. package/templates/.agents/design/apps/catalog/dist/storybook/favicon-wrapper.svg +46 -0
  116. package/templates/.agents/design/apps/catalog/dist/storybook/favicon.svg +1 -0
  117. package/templates/.agents/design/apps/catalog/dist/storybook/iframe.html +710 -0
  118. package/templates/.agents/design/apps/catalog/dist/storybook/index.html +152 -0
  119. package/templates/.agents/design/apps/catalog/dist/storybook/index.json +1 -0
  120. package/templates/.agents/design/apps/catalog/dist/storybook/logo_novo_azul.png +0 -0
  121. package/templates/.agents/design/apps/catalog/dist/storybook/nunito-sans-bold-italic.woff2 +0 -0
  122. package/templates/.agents/design/apps/catalog/dist/storybook/nunito-sans-bold.woff2 +0 -0
  123. package/templates/.agents/design/apps/catalog/dist/storybook/nunito-sans-italic.woff2 +0 -0
  124. package/templates/.agents/design/apps/catalog/dist/storybook/nunito-sans-regular.woff2 +0 -0
  125. package/templates/.agents/design/apps/catalog/dist/storybook/sb-addons/a11y-2/manager-bundle.js +57 -0
  126. package/templates/.agents/design/apps/catalog/dist/storybook/sb-addons/docs-1/manager-bundle.js +18 -0
  127. package/templates/.agents/design/apps/catalog/dist/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +632 -0
  128. package/templates/.agents/design/apps/catalog/dist/storybook/sb-common-assets/favicon-wrapper.svg +46 -0
  129. package/templates/.agents/design/apps/catalog/dist/storybook/sb-common-assets/favicon.svg +1 -0
  130. package/templates/.agents/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  131. package/templates/.agents/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  132. package/templates/.agents/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  133. package/templates/.agents/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  134. package/templates/.agents/design/apps/catalog/dist/storybook/sb-manager/globals-runtime.js +78957 -0
  135. package/templates/.agents/design/apps/catalog/dist/storybook/sb-manager/globals.js +24 -0
  136. package/templates/.agents/design/apps/catalog/dist/storybook/sb-manager/manager-stores.js +23 -0
  137. package/templates/.agents/design/apps/catalog/dist/storybook/sb-manager/runtime.js +28253 -0
  138. package/templates/.agents/design/apps/catalog/dist/storybook/vite-inject-mocker-entry.js +2 -0
  139. package/templates/.agents/design/apps/catalog/index.html +13 -0
  140. package/templates/.agents/design/apps/catalog/package.json +32 -0
  141. package/templates/.agents/design/apps/catalog/public/logo_novo_azul.png +0 -0
  142. package/templates/.agents/design/apps/catalog/src/App.tsx +29 -0
  143. package/templates/.agents/design/apps/catalog/src/components/CatalogShell.tsx +78 -0
  144. package/templates/.agents/design/apps/catalog/src/components/Primitives.tsx +137 -0
  145. package/templates/.agents/design/apps/catalog/src/design-contract.test.ts +33 -0
  146. package/templates/.agents/design/apps/catalog/src/main.tsx +13 -0
  147. package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +83 -0
  148. package/templates/.agents/design/apps/catalog/src/pages/DesignSystemPage.tsx +185 -0
  149. package/templates/.agents/design/apps/catalog/src/stories/Components.stories.tsx +12 -0
  150. package/templates/.agents/design/apps/catalog/src/stories/DesignSystem.stories.tsx +12 -0
  151. package/templates/.agents/design/apps/catalog/src/styles/catalog.css +315 -0
  152. package/templates/.agents/design/apps/catalog/src/styles/components.css +228 -0
  153. package/templates/.agents/design/apps/catalog/src/styles/design-system.css +137 -0
  154. package/templates/.agents/design/apps/catalog/src/styles.css +85 -0
  155. package/templates/.agents/design/apps/catalog/tsconfig.json +16 -0
  156. package/templates/.agents/design/apps/catalog/vite.config.ts +10 -0
  157. package/templates/.agents/design/apps/catalog/vitest.config.ts +5 -0
  158. package/templates/.agents/design/packages/local-runtime/package.json +9 -0
  159. package/templates/.agents/design/packages/local-runtime/runtime.mjs +238 -0
  160. package/templates/.agents/design/packages/local-runtime/runtime.test.mjs +66 -0
  161. package/templates/.agents/design/packages/local-runtime/start-design.mjs +46 -0
  162. package/templates/.agents/design/packages/windows-launcher/Program.cs +110 -0
  163. package/templates/.agents/design/packages/windows-launcher/build-design-launcher.ps1 +107 -0
  164. package/templates/.agents/design/tokens.json +52 -0
  165. package/templates/.agents/design/zaip-design.exe +0 -0
  166. package/templates/.agents/requirements/autonomous-assurance.md +63 -0
  167. package/templates/.agents/requirements/context-engine.md +27 -3
  168. package/templates/.agents/requirements/cost-observability.md +22 -3
  169. package/templates/.agents/requirements/design-system.md +48 -0
  170. package/templates/.agents/requirements/execution-engine.md +33 -8
  171. package/templates/.agents/requirements/kanban-dashboard.md +13 -4
  172. package/templates/.agents/requirements/model-orchestration.md +58 -0
  173. package/templates/.agents/requirements/public-distribution.md +40 -0
  174. package/templates/.agents/requirements/software-architecture.md +57 -0
  175. package/templates/.agents/requirements/work-lifecycle.md +61 -6
  176. package/templates/.agents/rules/project/.gitkeep +0 -0
  177. package/templates/.agents/rules/zaip/architecture.md +28 -0
  178. package/templates/.agents/rules/zaip/context.md +22 -0
  179. package/templates/.agents/rules/zaip/core.md +24 -0
  180. package/templates/.agents/rules/zaip/evolution.md +22 -0
  181. package/templates/.agents/rules/zaip/model-orchestration.md +48 -0
  182. package/templates/.agents/rules/zaip/workflow.md +35 -0
  183. package/templates/.agents/skills/zaip-skill-adapt-stack/SKILL.md +1 -1
  184. package/templates/.agents/skills/zaip-skill-adapt-stack/agents/openai.yaml +3 -3
  185. package/templates/.agents/skills/zaip-skill-adapters/SKILL.md +9 -6
  186. package/templates/.agents/skills/zaip-skill-adapters/agents/openai.yaml +2 -2
  187. package/templates/.agents/skills/zaip-skill-api-to-mcp/SKILL.md +19 -0
  188. package/templates/.agents/skills/zaip-skill-api-to-mcp/agents/openai.yaml +4 -0
  189. package/templates/.agents/skills/zaip-skill-api-to-mcp/assets/adapter.example.yaml +26 -0
  190. package/templates/.agents/skills/zaip-skill-api-to-mcp/references/security-contract.md +10 -0
  191. package/templates/.agents/skills/zaip-skill-api-to-mcp/references/server-layout.md +19 -0
  192. package/templates/.agents/skills/zaip-skill-api-to-mcp/scripts/inspect-openapi.mjs +60 -0
  193. package/templates/.agents/skills/zaip-skill-api-to-mcp/scripts/scaffold-local-mcp.mjs +47 -0
  194. package/templates/.agents/skills/zaip-skill-author-skills/SKILL.md +21 -0
  195. package/templates/.agents/skills/zaip-skill-author-skills/agents/openai.yaml +4 -0
  196. package/templates/.agents/skills/zaip-skill-change/SKILL.md +20 -0
  197. package/templates/.agents/skills/zaip-skill-change/agents/openai.yaml +4 -0
  198. package/templates/.agents/skills/zaip-skill-config/SKILL.md +22 -0
  199. package/templates/.agents/skills/zaip-skill-config/agents/openai.yaml +4 -0
  200. package/templates/.agents/skills/zaip-skill-context/SKILL.md +10 -6
  201. package/templates/.agents/skills/zaip-skill-context/agents/openai.yaml +2 -2
  202. package/templates/.agents/skills/zaip-skill-cqrs/SKILL.md +2 -2
  203. package/templates/.agents/skills/zaip-skill-cqrs/agents/openai.yaml +3 -3
  204. package/templates/.agents/skills/zaip-skill-decisions/SKILL.md +7 -5
  205. package/templates/.agents/skills/zaip-skill-decisions/agents/openai.yaml +2 -2
  206. package/templates/.agents/skills/zaip-skill-enforce-architecture/SKILL.md +8 -5
  207. package/templates/.agents/skills/zaip-skill-enforce-architecture/agents/openai.yaml +3 -3
  208. package/templates/.agents/skills/zaip-skill-eval/SKILL.md +7 -5
  209. package/templates/.agents/skills/zaip-skill-eval/agents/openai.yaml +3 -3
  210. package/templates/.agents/skills/zaip-skill-execution/SKILL.md +36 -0
  211. package/templates/.agents/skills/zaip-skill-execution/agents/openai.yaml +6 -0
  212. package/templates/.agents/skills/zaip-skill-execution/references/prepared-plan.md +31 -0
  213. package/templates/.agents/skills/zaip-skill-frontend-launcher/SKILL.md +29 -0
  214. package/templates/.agents/skills/zaip-skill-frontend-launcher/agents/openai.yaml +4 -0
  215. package/templates/.agents/skills/zaip-skill-frontend-launcher/references/launcher-contract.md +36 -0
  216. package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +49 -58
  217. package/templates/.agents/skills/zaip-skill-github-deploy/agents/openai.yaml +3 -3
  218. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs +256 -0
  219. package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +1 -1
  220. package/templates/.agents/skills/zaip-skill-move-prd/SKILL.md +37 -0
  221. package/templates/.agents/skills/zaip-skill-move-prd/agents/openai.yaml +4 -0
  222. package/templates/.agents/skills/zaip-skill-move-spec/SKILL.md +38 -0
  223. package/templates/.agents/skills/zaip-skill-move-spec/agents/openai.yaml +4 -0
  224. package/templates/.agents/skills/zaip-skill-navigate-work/SKILL.md +9 -6
  225. package/templates/.agents/skills/zaip-skill-navigate-work/agents/openai.yaml +3 -3
  226. package/templates/.agents/skills/zaip-skill-observability/SKILL.md +24 -0
  227. package/templates/.agents/skills/zaip-skill-observability/agents/openai.yaml +4 -0
  228. package/templates/.agents/skills/zaip-skill-openai-docs/SKILL.md +17 -0
  229. package/templates/.agents/skills/zaip-skill-openai-docs/agents/openai.yaml +4 -0
  230. package/templates/.agents/skills/zaip-skill-openai-docs/references/routing.md +11 -0
  231. package/templates/.agents/skills/zaip-skill-prd/SKILL.md +37 -6
  232. package/templates/.agents/skills/zaip-skill-prd/agents/openai.yaml +2 -2
  233. package/templates/.agents/skills/zaip-skill-preview/SKILL.md +16 -0
  234. package/templates/.agents/skills/zaip-skill-preview/agents/openai.yaml +4 -0
  235. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/SKILL.md +39 -0
  236. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/agents/openai.yaml +4 -0
  237. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/inspect-local-sqlite.py +52 -0
  238. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/normalize-run-agents.mjs +63 -0
  239. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +698 -0
  240. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +361 -0
  241. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +187 -0
  242. package/templates/.agents/skills/zaip-skill-requirements/SKILL.md +10 -6
  243. package/templates/.agents/skills/zaip-skill-requirements/agents/openai.yaml +2 -2
  244. package/templates/.agents/skills/zaip-skill-review/SKILL.md +18 -0
  245. package/templates/.agents/skills/zaip-skill-review/agents/openai.yaml +4 -0
  246. package/templates/.agents/skills/zaip-skill-rules/SKILL.md +19 -0
  247. package/templates/.agents/skills/zaip-skill-rules/agents/openai.yaml +4 -0
  248. package/templates/.agents/skills/zaip-skill-security/SKILL.md +30 -0
  249. package/templates/.agents/skills/zaip-skill-security/agents/openai.yaml +4 -0
  250. package/templates/.agents/skills/zaip-skill-setup/SKILL.md +19 -6
  251. package/templates/.agents/skills/zaip-skill-setup/agents/openai.yaml +2 -2
  252. package/templates/.agents/skills/zaip-skill-spec/SKILL.md +39 -6
  253. package/templates/.agents/skills/zaip-skill-spec/agents/openai.yaml +2 -2
  254. package/templates/.agents/skills/zaip-skill-task/SKILL.md +36 -8
  255. package/templates/.agents/skills/zaip-skill-task/agents/openai.yaml +2 -2
  256. package/templates/.agents/skills/zaip-skill-text-encoding/SKILL.md +3 -3
  257. package/templates/.agents/skills/zaip-skill-tool-setup/SKILL.md +22 -0
  258. package/templates/.agents/skills/zaip-skill-tool-setup/agents/openai.yaml +4 -0
  259. package/templates/.agents/skills/zaip-skill-tool-setup/references/codex-config.md +24 -0
  260. package/templates/.agents/skills/zaip-skill-tool-setup/references/secrets.md +8 -0
  261. package/templates/.agents/skills/zaip-skill-tool-setup/scripts/configure-local-mcp.mjs +52 -0
  262. package/templates/.agents/skills/zaip-skill-tool-setup/scripts/inspect-tool.mjs +35 -0
  263. package/templates/.agents/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +26 -0
  264. package/templates/.agents/tools/README.md +9 -0
  265. package/templates/.agents/tools/api/asaas/README.md +22 -0
  266. package/templates/.agents/tools/api/asaas/manifest.yaml +20 -0
  267. package/templates/.agents/tools/api/github/README.md +22 -0
  268. package/templates/.agents/tools/api/github/manifest.yaml +20 -0
  269. package/templates/.agents/tools/api/google-ads/README.md +23 -0
  270. package/templates/.agents/tools/api/google-ads/manifest.yaml +21 -0
  271. package/templates/.agents/tools/api/google-analytics/README.md +22 -0
  272. package/templates/.agents/tools/api/google-analytics/manifest.yaml +20 -0
  273. package/templates/.agents/tools/api/google-search-console/README.md +21 -0
  274. package/templates/.agents/tools/api/google-search-console/manifest.yaml +19 -0
  275. package/templates/.agents/tools/api/google-tag-manager/README.md +22 -0
  276. package/templates/.agents/tools/api/google-tag-manager/manifest.yaml +20 -0
  277. package/templates/.agents/tools/api/hubspot/README.md +22 -0
  278. package/templates/.agents/tools/api/hubspot/manifest.yaml +20 -0
  279. package/templates/.agents/tools/api/instagram-graph/README.md +23 -0
  280. package/templates/.agents/tools/api/instagram-graph/manifest.yaml +21 -0
  281. package/templates/.agents/tools/api/kommo-crm/README.md +23 -0
  282. package/templates/.agents/tools/api/kommo-crm/manifest.yaml +21 -0
  283. package/templates/.agents/tools/api/linkedin-ads/README.md +23 -0
  284. package/templates/.agents/tools/api/linkedin-ads/manifest.yaml +21 -0
  285. package/templates/.agents/tools/api/meta-ads/README.md +23 -0
  286. package/templates/.agents/tools/api/meta-ads/manifest.yaml +21 -0
  287. package/templates/.agents/tools/api/openai/README.md +22 -0
  288. package/templates/.agents/tools/api/openai/manifest.yaml +20 -0
  289. package/templates/.agents/tools/api/shopify/README.md +23 -0
  290. package/templates/.agents/tools/api/shopify/manifest.yaml +21 -0
  291. package/templates/.agents/tools/api/slack/README.md +22 -0
  292. package/templates/.agents/tools/api/slack/manifest.yaml +20 -0
  293. package/templates/.agents/tools/api/stripe/README.md +22 -0
  294. package/templates/.agents/tools/api/stripe/manifest.yaml +20 -0
  295. package/templates/.agents/tools/api/tiktok-ads/README.md +23 -0
  296. package/templates/.agents/tools/api/tiktok-ads/manifest.yaml +21 -0
  297. package/templates/.agents/tools/api/youtube-analytics/README.md +22 -0
  298. package/templates/.agents/tools/api/youtube-analytics/manifest.yaml +20 -0
  299. package/templates/.agents/tools/catalog.yaml +358 -0
  300. package/templates/.agents/tools/mcp/development/browser/README.md +20 -0
  301. package/templates/.agents/tools/mcp/development/browser/manifest.yaml +24 -0
  302. package/templates/.agents/tools/mcp/development/filesystem/README.md +20 -0
  303. package/templates/.agents/tools/mcp/development/filesystem/manifest.yaml +24 -0
  304. package/templates/.agents/tools/mcp/development/git/README.md +20 -0
  305. package/templates/.agents/tools/mcp/development/git/manifest.yaml +24 -0
  306. package/templates/.agents/tools/mcp/development/github/README.md +20 -0
  307. package/templates/.agents/tools/mcp/development/github/manifest.yaml +25 -0
  308. package/templates/.agents/tools/mcp/development/gitlab/README.md +20 -0
  309. package/templates/.agents/tools/mcp/development/gitlab/manifest.yaml +25 -0
  310. package/templates/.agents/tools/mcp/development/jira/README.md +21 -0
  311. package/templates/.agents/tools/mcp/development/jira/manifest.yaml +26 -0
  312. package/templates/.agents/tools/mcp/development/linear/README.md +20 -0
  313. package/templates/.agents/tools/mcp/development/linear/manifest.yaml +25 -0
  314. package/templates/.agents/tools/mcp/development/notion/README.md +20 -0
  315. package/templates/.agents/tools/mcp/development/notion/manifest.yaml +25 -0
  316. package/templates/.agents/tools/mcp/development/openai-docs/README.md +15 -0
  317. package/templates/.agents/tools/mcp/development/openai-docs/manifest.yaml +21 -0
  318. package/templates/.agents/tools/mcp/development/postgresql/README.md +20 -0
  319. package/templates/.agents/tools/mcp/development/postgresql/manifest.yaml +25 -0
  320. package/templates/.agents/tools/mcp/development/slack/README.md +20 -0
  321. package/templates/.agents/tools/mcp/development/slack/manifest.yaml +25 -0
  322. package/templates/.agents/tools/mcp/development/sqlite/README.md +20 -0
  323. package/templates/.agents/tools/mcp/development/sqlite/manifest.yaml +25 -0
  324. package/templates/.agents/tools/mcp/infra/aws/README.md +21 -0
  325. package/templates/.agents/tools/mcp/infra/aws/manifest.yaml +26 -0
  326. package/templates/.agents/tools/mcp/infra/azure/README.md +20 -0
  327. package/templates/.agents/tools/mcp/infra/azure/manifest.yaml +25 -0
  328. package/templates/.agents/tools/mcp/infra/cloudflare/README.md +21 -0
  329. package/templates/.agents/tools/mcp/infra/cloudflare/manifest.yaml +26 -0
  330. package/templates/.agents/tools/mcp/infra/docker/README.md +20 -0
  331. package/templates/.agents/tools/mcp/infra/docker/manifest.yaml +24 -0
  332. package/templates/.agents/tools/mcp/infra/gcp/README.md +21 -0
  333. package/templates/.agents/tools/mcp/infra/gcp/manifest.yaml +26 -0
  334. package/templates/.agents/tools/mcp/infra/hostinger/README.md +20 -0
  335. package/templates/.agents/tools/mcp/infra/hostinger/manifest.yaml +25 -0
  336. package/templates/.agents/tools/mcp/infra/kubernetes/README.md +20 -0
  337. package/templates/.agents/tools/mcp/infra/kubernetes/manifest.yaml +25 -0
  338. package/templates/.agents/tools/mcp/infra/terraform/README.md +20 -0
  339. package/templates/.agents/tools/mcp/infra/terraform/manifest.yaml +24 -0
  340. package/templates/.agents/tools/mcp/marketing/google-ads/README.md +21 -0
  341. package/templates/.agents/tools/mcp/marketing/google-ads/manifest.yaml +26 -0
  342. package/templates/.agents/tools/mcp/marketing/google-analytics/README.md +20 -0
  343. package/templates/.agents/tools/mcp/marketing/google-analytics/manifest.yaml +25 -0
  344. package/templates/.agents/tools/mcp/marketing/google-search-console/README.md +19 -0
  345. package/templates/.agents/tools/mcp/marketing/google-search-console/manifest.yaml +24 -0
  346. package/templates/.agents/tools/mcp/marketing/google-tag-manager/README.md +21 -0
  347. package/templates/.agents/tools/mcp/marketing/google-tag-manager/manifest.yaml +26 -0
  348. package/templates/.agents/tools/mcp/marketing/hubspot/README.md +20 -0
  349. package/templates/.agents/tools/mcp/marketing/hubspot/manifest.yaml +25 -0
  350. package/templates/.agents/tools/mcp/marketing/instagram-insights/README.md +21 -0
  351. package/templates/.agents/tools/mcp/marketing/instagram-insights/manifest.yaml +26 -0
  352. package/templates/.agents/tools/mcp/marketing/linkedin-ads/README.md +21 -0
  353. package/templates/.agents/tools/mcp/marketing/linkedin-ads/manifest.yaml +26 -0
  354. package/templates/.agents/tools/mcp/marketing/mailchimp/README.md +21 -0
  355. package/templates/.agents/tools/mcp/marketing/mailchimp/manifest.yaml +26 -0
  356. package/templates/.agents/tools/mcp/marketing/meta-ads/README.md +21 -0
  357. package/templates/.agents/tools/mcp/marketing/meta-ads/manifest.yaml +26 -0
  358. package/templates/.agents/tools/mcp/marketing/semrush/README.md +20 -0
  359. package/templates/.agents/tools/mcp/marketing/semrush/manifest.yaml +25 -0
  360. package/templates/.agents/tools/mcp/marketing/tiktok-ads/README.md +21 -0
  361. package/templates/.agents/tools/mcp/marketing/tiktok-ads/manifest.yaml +26 -0
  362. package/templates/.agents/tools/mcp/marketing/youtube-analytics/README.md +21 -0
  363. package/templates/.agents/tools/mcp/marketing/youtube-analytics/manifest.yaml +26 -0
  364. package/templates/.agents/tools/mcp/observability/cloudwatch/README.md +21 -0
  365. package/templates/.agents/tools/mcp/observability/cloudwatch/manifest.yaml +26 -0
  366. package/templates/.agents/tools/mcp/observability/datadog/README.md +21 -0
  367. package/templates/.agents/tools/mcp/observability/datadog/manifest.yaml +26 -0
  368. package/templates/.agents/tools/mcp/observability/elasticsearch/README.md +21 -0
  369. package/templates/.agents/tools/mcp/observability/elasticsearch/manifest.yaml +26 -0
  370. package/templates/.agents/tools/mcp/observability/grafana/README.md +21 -0
  371. package/templates/.agents/tools/mcp/observability/grafana/manifest.yaml +26 -0
  372. package/templates/.agents/tools/mcp/observability/kibana/README.md +21 -0
  373. package/templates/.agents/tools/mcp/observability/kibana/manifest.yaml +26 -0
  374. package/templates/.agents/tools/mcp/observability/loki/README.md +19 -0
  375. package/templates/.agents/tools/mcp/observability/loki/manifest.yaml +24 -0
  376. package/templates/.agents/tools/mcp/observability/new-relic/README.md +21 -0
  377. package/templates/.agents/tools/mcp/observability/new-relic/manifest.yaml +26 -0
  378. package/templates/.agents/tools/mcp/observability/opentelemetry/README.md +20 -0
  379. package/templates/.agents/tools/mcp/observability/opentelemetry/manifest.yaml +25 -0
  380. package/templates/.agents/tools/mcp/observability/prometheus/README.md +19 -0
  381. package/templates/.agents/tools/mcp/observability/prometheus/manifest.yaml +24 -0
  382. package/templates/.agents/tools/mcp/observability/sentry/README.md +21 -0
  383. package/templates/.agents/tools/mcp/observability/sentry/manifest.yaml +26 -0
  384. package/templates/.agents/tools/policies/approval-rules.yaml +8 -0
  385. package/templates/.agents/tools/policies/financial-limits.yaml +6 -0
  386. package/templates/.agents/tools/policies/permissions.yaml +8 -0
  387. package/templates/.agents/tools/policies/secret-handling.md +7 -0
  388. package/templates/.agents/tools/profiles/business.yaml +8 -0
  389. package/templates/.agents/tools/profiles/default.yaml +8 -0
  390. package/templates/.agents/tools/profiles/development.yaml +13 -0
  391. package/templates/.agents/tools/profiles/infrastructure.yaml +8 -0
  392. package/templates/.agents/tools/profiles/marketing.yaml +9 -0
  393. package/templates/.agents/tools/profiles/observability.yaml +8 -0
  394. package/templates/.agents/tools/runtime/README.md +3 -0
  395. package/templates/.agents/tools/runtime/api-mcp-runtime.mjs +217 -0
  396. package/templates/.agents/tools/runtime/api-mcp-runtime.test.mjs +56 -0
  397. package/templates/.agents/tools/runtime/fixtures/definition.json +17 -0
  398. package/templates/.agents/tools/runtime/runner.mjs +16 -0
  399. package/templates/.agents/tools/runtime/stdio.test.mjs +32 -0
  400. package/templates/.agents/tools/state.example.yaml +8 -0
  401. package/templates/.agents/zaip-aios/INDEX.md +26 -0
  402. package/templates/.agents/zaip-aios/README.md +13 -0
  403. package/templates/.agents/zaip-aios/VERSION +1 -0
  404. package/templates/.agents/zaip-aios/guides/01-primeiros-passos.md +10 -0
  405. package/templates/.agents/zaip-aios/guides/02-requirements.md +12 -0
  406. package/templates/.agents/zaip-aios/guides/03-tasks.md +12 -0
  407. package/templates/.agents/zaip-aios/guides/04-specs.md +16 -0
  408. package/templates/.agents/zaip-aios/guides/05-prds.md +13 -0
  409. package/templates/.agents/zaip-aios/guides/06-execucao.md +13 -0
  410. package/templates/.agents/zaip-aios/guides/07-revisao-e-validacao.md +8 -0
  411. package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +10 -0
  412. package/templates/.agents/zaip-aios/guides/09-agentes-e-squads.md +8 -0
  413. package/templates/.agents/zaip-aios/guides/10-seguranca.md +206 -0
  414. package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +10 -0
  415. package/templates/.agents/zaip-aios/guides/12-instalacao-e-upgrade.md +10 -0
  416. package/templates/.agents/zaip-aios/guides/13-boas-praticas.md +12 -0
  417. package/templates/.agents/zaip-aios/guides/14-troubleshooting.md +12 -0
  418. package/templates/.agents/zaip-aios/guides/15-tools-e-codex.md +25 -0
  419. package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +47 -0
  420. package/templates/.zaip-aios/LICENSE +1 -0
  421. package/templates/.zaip-aios/THIRD_PARTY_NOTICES.md +10 -0
  422. package/templates/.zaip-aios/VERSION +1 -0
  423. package/templates/.zaip-aios/bin/zaip.mjs +1285 -0
  424. package/templates/.zaip-aios/checksums.sha256 +369 -0
  425. package/templates/.zaip-aios/dashboard/.zaip-managed.json +46 -0
  426. package/templates/.zaip-aios/dashboard/README.md +91 -0
  427. package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/index-BOLwg8VW.js +1009 -0
  428. package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/index-_yxs47Hd.css +1 -0
  429. package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/logo_novo_azul-BBx5pA2B.png +0 -0
  430. package/templates/.zaip-aios/dashboard/apps/frontend/dist/icon_zaip.png +0 -0
  431. package/templates/.zaip-aios/dashboard/apps/frontend/dist/index.html +15 -0
  432. package/templates/.zaip-aios/dashboard/apps/frontend/dist/logo_novo_azul.png +0 -0
  433. package/templates/.zaip-aios/dashboard/packages/local-runtime/server.mjs +179 -0
  434. package/templates/.zaip-aios/dashboard/packages/local-runtime/start-dashboard.mjs +726 -0
  435. package/templates/.zaip-aios/dashboard/zaip-dashboard.exe +0 -0
  436. package/templates/.zaip-aios/design/.zaip-managed.json +330 -0
  437. package/templates/.zaip-aios/design/DESIGN.md +180 -0
  438. package/templates/.zaip-aios/design/README.md +47 -0
  439. package/templates/.zaip-aios/design/apps/catalog/.storybook/main.ts +15 -0
  440. package/templates/.zaip-aios/design/apps/catalog/.storybook/preview.ts +21 -0
  441. package/templates/.zaip-aios/design/apps/catalog/dist/assets/index-B4pfFtvJ.css +1 -0
  442. package/templates/.zaip-aios/design/apps/catalog/dist/assets/index-Bvwc3Bgw.js +9 -0
  443. package/templates/.zaip-aios/design/apps/catalog/dist/index.html +14 -0
  444. package/templates/.zaip-aios/design/apps/catalog/dist/logo_novo_azul.png +0 -0
  445. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Color-6AOWCN3U-D8qyAXo4.js +1 -0
  446. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Components.stories-DkBtOSHX.js +1 -0
  447. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-BttERyCr.js +1 -0
  448. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/DocsRenderer-JROSPFPF-LmiVo77Q.js +46 -0
  449. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Primitives-HZpQ6PjX.js +1 -0
  450. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/WithTooltip-7X4HQR7L-CTMWAwDe.js +9 -0
  451. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/axe-Bk3eEgJf.js +20 -0
  452. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-242VQQM5-DB2JSNUA.js +1 -0
  453. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-DRQKCCAG-DUhJxxRU.js +1 -0
  454. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-QQBDHPVZ-nYh9QWsm.js +1 -0
  455. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-9RCn9-l7.js +18 -0
  456. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/components-BX1OfYUi.js +243 -0
  457. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Bu6KfEwW.js +1 -0
  458. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/iframe-B4pfFtvJ.css +1 -0
  459. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/iframe-LMhZM1ce.js +1154 -0
  460. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/jsx-runtime-f3rHp9ZU.js +1 -0
  461. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/matchers-JIUQ3HVY-9iRExWZO.js +28 -0
  462. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/preload-helper-BdFrVu1K.js +1 -0
  463. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/react-18-jAz3avmR.js +9 -0
  464. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/react-DvDPBd6Q.js +1 -0
  465. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-DV8X2acD.js +6 -0
  466. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/theming-CHbHkcNi.js +39 -0
  467. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/favicon-wrapper.svg +46 -0
  468. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/favicon.svg +1 -0
  469. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/iframe.html +710 -0
  470. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/index.html +152 -0
  471. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/index.json +1 -0
  472. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/logo_novo_azul.png +0 -0
  473. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-bold-italic.woff2 +0 -0
  474. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-bold.woff2 +0 -0
  475. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-italic.woff2 +0 -0
  476. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-regular.woff2 +0 -0
  477. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/a11y-2/manager-bundle.js +57 -0
  478. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/docs-1/manager-bundle.js +18 -0
  479. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +632 -0
  480. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/favicon-wrapper.svg +46 -0
  481. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/favicon.svg +1 -0
  482. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  483. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  484. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  485. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  486. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/globals-runtime.js +78957 -0
  487. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/globals.js +24 -0
  488. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/manager-stores.js +23 -0
  489. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/runtime.js +28253 -0
  490. package/templates/.zaip-aios/design/apps/catalog/dist/storybook/vite-inject-mocker-entry.js +2 -0
  491. package/templates/.zaip-aios/design/apps/catalog/index.html +13 -0
  492. package/templates/.zaip-aios/design/apps/catalog/package.json +32 -0
  493. package/templates/.zaip-aios/design/apps/catalog/public/logo_novo_azul.png +0 -0
  494. package/templates/.zaip-aios/design/apps/catalog/src/App.tsx +29 -0
  495. package/templates/.zaip-aios/design/apps/catalog/src/components/CatalogShell.tsx +78 -0
  496. package/templates/.zaip-aios/design/apps/catalog/src/components/Primitives.tsx +137 -0
  497. package/templates/.zaip-aios/design/apps/catalog/src/design-contract.test.ts +33 -0
  498. package/templates/.zaip-aios/design/apps/catalog/src/main.tsx +13 -0
  499. package/templates/.zaip-aios/design/apps/catalog/src/pages/ComponentsPage.tsx +83 -0
  500. package/templates/.zaip-aios/design/apps/catalog/src/pages/DesignSystemPage.tsx +185 -0
  501. package/templates/.zaip-aios/design/apps/catalog/src/stories/Components.stories.tsx +12 -0
  502. package/templates/.zaip-aios/design/apps/catalog/src/stories/DesignSystem.stories.tsx +12 -0
  503. package/templates/.zaip-aios/design/apps/catalog/src/styles/catalog.css +315 -0
  504. package/templates/.zaip-aios/design/apps/catalog/src/styles/components.css +228 -0
  505. package/templates/.zaip-aios/design/apps/catalog/src/styles/design-system.css +137 -0
  506. package/templates/.zaip-aios/design/apps/catalog/src/styles.css +85 -0
  507. package/templates/.zaip-aios/design/apps/catalog/tsconfig.json +16 -0
  508. package/templates/.zaip-aios/design/apps/catalog/vite.config.ts +10 -0
  509. package/templates/.zaip-aios/design/apps/catalog/vitest.config.ts +5 -0
  510. package/templates/.zaip-aios/design/packages/local-runtime/package.json +9 -0
  511. package/templates/.zaip-aios/design/packages/local-runtime/runtime.mjs +238 -0
  512. package/templates/.zaip-aios/design/packages/local-runtime/runtime.test.mjs +66 -0
  513. package/templates/.zaip-aios/design/packages/local-runtime/start-design.mjs +46 -0
  514. package/templates/.zaip-aios/design/packages/windows-launcher/Program.cs +110 -0
  515. package/templates/.zaip-aios/design/packages/windows-launcher/build-design-launcher.ps1 +107 -0
  516. package/templates/.zaip-aios/design/tokens.json +52 -0
  517. package/templates/.zaip-aios/design/zaip-design.exe +0 -0
  518. package/templates/.zaip-aios/manifest.json +376 -0
  519. package/templates/.zaip-aios/migrations/001-layout-v1.json +5 -0
  520. package/templates/.zaip-aios/migrations/002-layout-v2.json +6 -0
  521. package/templates/.zaip-aios/pricing/fx/2026/07/12/usd-brl.json +9 -0
  522. package/templates/.zaip-aios/pricing/models.json +172 -0
  523. package/templates/.zaip-aios/profiles/clients.json +506 -0
  524. package/templates/.zaip-aios/profiles/fixtures/architecture/negative/modules/orders/application/queries/list.query.ts +5 -0
  525. package/templates/.zaip-aios/profiles/fixtures/architecture/negative/modules/orders/domain/order.ts +3 -0
  526. package/templates/.zaip-aios/profiles/fixtures/architecture/positive/modules/orders/application/queries/list.query.ts +5 -0
  527. package/templates/.zaip-aios/profiles/typescript-hono-kysely.json +41 -0
  528. package/templates/.zaip-aios/sbom.cdx.json +3440 -0
  529. package/templates/.zaip-aios/schemas/contracts.schema.json +243 -0
  530. package/templates/.zaip-aios/templates/config/agents/catalog.yaml +246 -0
  531. package/templates/.zaip-aios/templates/requirements/.gitkeep +0 -0
  532. package/templates/.zaip-aios/templates/requirements/autonomous-assurance.md +63 -0
  533. package/templates/.zaip-aios/templates/requirements/context-engine.md +44 -0
  534. package/templates/.zaip-aios/templates/requirements/cost-observability.md +39 -0
  535. package/templates/.zaip-aios/templates/requirements/design-system.md +48 -0
  536. package/templates/.zaip-aios/templates/requirements/execution-engine.md +60 -0
  537. package/templates/.zaip-aios/templates/requirements/kanban-dashboard.md +30 -0
  538. package/templates/.zaip-aios/templates/requirements/model-orchestration.md +58 -0
  539. package/templates/.zaip-aios/templates/requirements/public-distribution.md +40 -0
  540. package/templates/.zaip-aios/templates/requirements/software-architecture.md +57 -0
  541. package/templates/.zaip-aios/templates/requirements/work-lifecycle.md +82 -0
  542. package/templates/.zaip-aios/templates/rules/project/.gitkeep +0 -0
  543. package/templates/.zaip-aios/templates/rules/zaip/architecture.md +28 -0
  544. package/templates/.zaip-aios/templates/rules/zaip/context.md +22 -0
  545. package/templates/.zaip-aios/templates/rules/zaip/core.md +24 -0
  546. package/templates/.zaip-aios/templates/rules/zaip/evolution.md +22 -0
  547. package/templates/.zaip-aios/templates/rules/zaip/model-orchestration.md +48 -0
  548. package/templates/.zaip-aios/templates/rules/zaip/security.md +20 -0
  549. package/templates/.zaip-aios/templates/rules/zaip/workflow.md +35 -0
  550. package/templates/.zaip-aios/templates/skills/.gitkeep +0 -0
  551. package/templates/.zaip-aios/templates/skills/zaip-skill-adapt-stack/SKILL.md +11 -0
  552. package/templates/.zaip-aios/templates/skills/zaip-skill-adapt-stack/agents/openai.yaml +4 -0
  553. package/templates/.zaip-aios/templates/skills/zaip-skill-adapters/SKILL.md +15 -0
  554. package/templates/.zaip-aios/templates/skills/zaip-skill-adapters/agents/openai.yaml +4 -0
  555. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/SKILL.md +19 -0
  556. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/agents/openai.yaml +4 -0
  557. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/assets/adapter.example.yaml +26 -0
  558. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/references/security-contract.md +10 -0
  559. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/references/server-layout.md +19 -0
  560. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/scripts/inspect-openapi.mjs +60 -0
  561. package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/scripts/scaffold-local-mcp.mjs +47 -0
  562. package/templates/.zaip-aios/templates/skills/zaip-skill-author-skills/SKILL.md +21 -0
  563. package/templates/.zaip-aios/templates/skills/zaip-skill-author-skills/agents/openai.yaml +4 -0
  564. package/templates/.zaip-aios/templates/skills/zaip-skill-change/SKILL.md +20 -0
  565. package/templates/.zaip-aios/templates/skills/zaip-skill-change/agents/openai.yaml +4 -0
  566. package/templates/.zaip-aios/templates/skills/zaip-skill-config/SKILL.md +22 -0
  567. package/templates/.zaip-aios/templates/skills/zaip-skill-config/agents/openai.yaml +4 -0
  568. package/templates/.zaip-aios/templates/skills/zaip-skill-context/SKILL.md +16 -0
  569. package/templates/.zaip-aios/templates/skills/zaip-skill-context/agents/openai.yaml +4 -0
  570. package/templates/.zaip-aios/templates/skills/zaip-skill-cqrs/SKILL.md +11 -0
  571. package/templates/.zaip-aios/templates/skills/zaip-skill-cqrs/agents/openai.yaml +4 -0
  572. package/templates/.zaip-aios/templates/skills/zaip-skill-decisions/SKILL.md +14 -0
  573. package/templates/.zaip-aios/templates/skills/zaip-skill-decisions/agents/openai.yaml +4 -0
  574. package/templates/.zaip-aios/templates/skills/zaip-skill-enforce-architecture/SKILL.md +14 -0
  575. package/templates/.zaip-aios/templates/skills/zaip-skill-enforce-architecture/agents/openai.yaml +4 -0
  576. package/templates/.zaip-aios/templates/skills/zaip-skill-eval/SKILL.md +14 -0
  577. package/templates/.zaip-aios/templates/skills/zaip-skill-eval/agents/openai.yaml +4 -0
  578. package/templates/.zaip-aios/templates/skills/zaip-skill-execution/SKILL.md +36 -0
  579. package/templates/.zaip-aios/templates/skills/zaip-skill-execution/agents/openai.yaml +6 -0
  580. package/templates/.zaip-aios/templates/skills/zaip-skill-execution/references/prepared-plan.md +31 -0
  581. package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/SKILL.md +29 -0
  582. package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/agents/openai.yaml +4 -0
  583. package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/references/launcher-contract.md +36 -0
  584. package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/SKILL.md +75 -0
  585. package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/agents/openai.yaml +6 -0
  586. package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/scripts/preflight.mjs +256 -0
  587. package/templates/.zaip-aios/templates/skills/zaip-skill-github-setup/SKILL.md +80 -0
  588. package/templates/.zaip-aios/templates/skills/zaip-skill-github-setup/agents/openai.yaml +4 -0
  589. package/templates/.zaip-aios/templates/skills/zaip-skill-move-prd/SKILL.md +37 -0
  590. package/templates/.zaip-aios/templates/skills/zaip-skill-move-prd/agents/openai.yaml +4 -0
  591. package/templates/.zaip-aios/templates/skills/zaip-skill-move-spec/SKILL.md +38 -0
  592. package/templates/.zaip-aios/templates/skills/zaip-skill-move-spec/agents/openai.yaml +4 -0
  593. package/templates/.zaip-aios/templates/skills/zaip-skill-navigate-work/SKILL.md +16 -0
  594. package/templates/.zaip-aios/templates/skills/zaip-skill-navigate-work/agents/openai.yaml +4 -0
  595. package/templates/.zaip-aios/templates/skills/zaip-skill-observability/SKILL.md +24 -0
  596. package/templates/.zaip-aios/templates/skills/zaip-skill-observability/agents/openai.yaml +4 -0
  597. package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/SKILL.md +17 -0
  598. package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/agents/openai.yaml +4 -0
  599. package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/references/routing.md +11 -0
  600. package/templates/.zaip-aios/templates/skills/zaip-skill-prd/SKILL.md +44 -0
  601. package/templates/.zaip-aios/templates/skills/zaip-skill-prd/agents/openai.yaml +4 -0
  602. package/templates/.zaip-aios/templates/skills/zaip-skill-preview/SKILL.md +16 -0
  603. package/templates/.zaip-aios/templates/skills/zaip-skill-preview/agents/openai.yaml +4 -0
  604. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/SKILL.md +39 -0
  605. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/agents/openai.yaml +4 -0
  606. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/inspect-local-sqlite.py +52 -0
  607. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/normalize-run-agents.mjs +63 -0
  608. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +698 -0
  609. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +361 -0
  610. package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +187 -0
  611. package/templates/.zaip-aios/templates/skills/zaip-skill-requirements/SKILL.md +16 -0
  612. package/templates/.zaip-aios/templates/skills/zaip-skill-requirements/agents/openai.yaml +4 -0
  613. package/templates/.zaip-aios/templates/skills/zaip-skill-review/SKILL.md +18 -0
  614. package/templates/.zaip-aios/templates/skills/zaip-skill-review/agents/openai.yaml +4 -0
  615. package/templates/.zaip-aios/templates/skills/zaip-skill-rules/SKILL.md +19 -0
  616. package/templates/.zaip-aios/templates/skills/zaip-skill-rules/agents/openai.yaml +4 -0
  617. package/templates/.zaip-aios/templates/skills/zaip-skill-security/SKILL.md +30 -0
  618. package/templates/.zaip-aios/templates/skills/zaip-skill-security/agents/openai.yaml +4 -0
  619. package/templates/.zaip-aios/templates/skills/zaip-skill-setup/SKILL.md +25 -0
  620. package/templates/.zaip-aios/templates/skills/zaip-skill-setup/agents/openai.yaml +4 -0
  621. package/templates/.zaip-aios/templates/skills/zaip-skill-spec/SKILL.md +45 -0
  622. package/templates/.zaip-aios/templates/skills/zaip-skill-spec/agents/openai.yaml +4 -0
  623. package/templates/.zaip-aios/templates/skills/zaip-skill-task/SKILL.md +41 -0
  624. package/templates/.zaip-aios/templates/skills/zaip-skill-task/agents/openai.yaml +4 -0
  625. package/templates/.zaip-aios/templates/skills/zaip-skill-text-encoding/SKILL.md +27 -0
  626. package/templates/.zaip-aios/templates/skills/zaip-skill-text-encoding/agents/openai.yaml +6 -0
  627. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/SKILL.md +22 -0
  628. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/agents/openai.yaml +4 -0
  629. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/references/codex-config.md +24 -0
  630. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/references/secrets.md +8 -0
  631. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/configure-local-mcp.mjs +52 -0
  632. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/inspect-tool.mjs +35 -0
  633. package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +26 -0
  634. package/templates/.zaip-aios/templates/tools/README.md +9 -0
  635. package/templates/.zaip-aios/templates/tools/api/asaas/README.md +22 -0
  636. package/templates/.zaip-aios/templates/tools/api/asaas/manifest.yaml +20 -0
  637. package/templates/.zaip-aios/templates/tools/api/github/README.md +22 -0
  638. package/templates/.zaip-aios/templates/tools/api/github/manifest.yaml +20 -0
  639. package/templates/.zaip-aios/templates/tools/api/google-ads/README.md +23 -0
  640. package/templates/.zaip-aios/templates/tools/api/google-ads/manifest.yaml +21 -0
  641. package/templates/.zaip-aios/templates/tools/api/google-analytics/README.md +22 -0
  642. package/templates/.zaip-aios/templates/tools/api/google-analytics/manifest.yaml +20 -0
  643. package/templates/.zaip-aios/templates/tools/api/google-search-console/README.md +21 -0
  644. package/templates/.zaip-aios/templates/tools/api/google-search-console/manifest.yaml +19 -0
  645. package/templates/.zaip-aios/templates/tools/api/google-tag-manager/README.md +22 -0
  646. package/templates/.zaip-aios/templates/tools/api/google-tag-manager/manifest.yaml +20 -0
  647. package/templates/.zaip-aios/templates/tools/api/hubspot/README.md +22 -0
  648. package/templates/.zaip-aios/templates/tools/api/hubspot/manifest.yaml +20 -0
  649. package/templates/.zaip-aios/templates/tools/api/instagram-graph/README.md +23 -0
  650. package/templates/.zaip-aios/templates/tools/api/instagram-graph/manifest.yaml +21 -0
  651. package/templates/.zaip-aios/templates/tools/api/kommo-crm/README.md +23 -0
  652. package/templates/.zaip-aios/templates/tools/api/kommo-crm/manifest.yaml +21 -0
  653. package/templates/.zaip-aios/templates/tools/api/linkedin-ads/README.md +23 -0
  654. package/templates/.zaip-aios/templates/tools/api/linkedin-ads/manifest.yaml +21 -0
  655. package/templates/.zaip-aios/templates/tools/api/meta-ads/README.md +23 -0
  656. package/templates/.zaip-aios/templates/tools/api/meta-ads/manifest.yaml +21 -0
  657. package/templates/.zaip-aios/templates/tools/api/openai/README.md +22 -0
  658. package/templates/.zaip-aios/templates/tools/api/openai/manifest.yaml +20 -0
  659. package/templates/.zaip-aios/templates/tools/api/shopify/README.md +23 -0
  660. package/templates/.zaip-aios/templates/tools/api/shopify/manifest.yaml +21 -0
  661. package/templates/.zaip-aios/templates/tools/api/slack/README.md +22 -0
  662. package/templates/.zaip-aios/templates/tools/api/slack/manifest.yaml +20 -0
  663. package/templates/.zaip-aios/templates/tools/api/stripe/README.md +22 -0
  664. package/templates/.zaip-aios/templates/tools/api/stripe/manifest.yaml +20 -0
  665. package/templates/.zaip-aios/templates/tools/api/tiktok-ads/README.md +23 -0
  666. package/templates/.zaip-aios/templates/tools/api/tiktok-ads/manifest.yaml +21 -0
  667. package/templates/.zaip-aios/templates/tools/api/youtube-analytics/README.md +22 -0
  668. package/templates/.zaip-aios/templates/tools/api/youtube-analytics/manifest.yaml +20 -0
  669. package/templates/.zaip-aios/templates/tools/catalog.yaml +358 -0
  670. package/templates/.zaip-aios/templates/tools/mcp/development/browser/README.md +20 -0
  671. package/templates/.zaip-aios/templates/tools/mcp/development/browser/manifest.yaml +24 -0
  672. package/templates/.zaip-aios/templates/tools/mcp/development/filesystem/README.md +20 -0
  673. package/templates/.zaip-aios/templates/tools/mcp/development/filesystem/manifest.yaml +24 -0
  674. package/templates/.zaip-aios/templates/tools/mcp/development/git/README.md +20 -0
  675. package/templates/.zaip-aios/templates/tools/mcp/development/git/manifest.yaml +24 -0
  676. package/templates/.zaip-aios/templates/tools/mcp/development/github/README.md +20 -0
  677. package/templates/.zaip-aios/templates/tools/mcp/development/github/manifest.yaml +25 -0
  678. package/templates/.zaip-aios/templates/tools/mcp/development/gitlab/README.md +20 -0
  679. package/templates/.zaip-aios/templates/tools/mcp/development/gitlab/manifest.yaml +25 -0
  680. package/templates/.zaip-aios/templates/tools/mcp/development/jira/README.md +21 -0
  681. package/templates/.zaip-aios/templates/tools/mcp/development/jira/manifest.yaml +26 -0
  682. package/templates/.zaip-aios/templates/tools/mcp/development/linear/README.md +20 -0
  683. package/templates/.zaip-aios/templates/tools/mcp/development/linear/manifest.yaml +25 -0
  684. package/templates/.zaip-aios/templates/tools/mcp/development/notion/README.md +20 -0
  685. package/templates/.zaip-aios/templates/tools/mcp/development/notion/manifest.yaml +25 -0
  686. package/templates/.zaip-aios/templates/tools/mcp/development/openai-docs/README.md +15 -0
  687. package/templates/.zaip-aios/templates/tools/mcp/development/openai-docs/manifest.yaml +21 -0
  688. package/templates/.zaip-aios/templates/tools/mcp/development/postgresql/README.md +20 -0
  689. package/templates/.zaip-aios/templates/tools/mcp/development/postgresql/manifest.yaml +25 -0
  690. package/templates/.zaip-aios/templates/tools/mcp/development/slack/README.md +20 -0
  691. package/templates/.zaip-aios/templates/tools/mcp/development/slack/manifest.yaml +25 -0
  692. package/templates/.zaip-aios/templates/tools/mcp/development/sqlite/README.md +20 -0
  693. package/templates/.zaip-aios/templates/tools/mcp/development/sqlite/manifest.yaml +25 -0
  694. package/templates/.zaip-aios/templates/tools/mcp/infra/aws/README.md +21 -0
  695. package/templates/.zaip-aios/templates/tools/mcp/infra/aws/manifest.yaml +26 -0
  696. package/templates/.zaip-aios/templates/tools/mcp/infra/azure/README.md +20 -0
  697. package/templates/.zaip-aios/templates/tools/mcp/infra/azure/manifest.yaml +25 -0
  698. package/templates/.zaip-aios/templates/tools/mcp/infra/cloudflare/README.md +21 -0
  699. package/templates/.zaip-aios/templates/tools/mcp/infra/cloudflare/manifest.yaml +26 -0
  700. package/templates/.zaip-aios/templates/tools/mcp/infra/docker/README.md +20 -0
  701. package/templates/.zaip-aios/templates/tools/mcp/infra/docker/manifest.yaml +24 -0
  702. package/templates/.zaip-aios/templates/tools/mcp/infra/gcp/README.md +21 -0
  703. package/templates/.zaip-aios/templates/tools/mcp/infra/gcp/manifest.yaml +26 -0
  704. package/templates/.zaip-aios/templates/tools/mcp/infra/hostinger/README.md +20 -0
  705. package/templates/.zaip-aios/templates/tools/mcp/infra/hostinger/manifest.yaml +25 -0
  706. package/templates/.zaip-aios/templates/tools/mcp/infra/kubernetes/README.md +20 -0
  707. package/templates/.zaip-aios/templates/tools/mcp/infra/kubernetes/manifest.yaml +25 -0
  708. package/templates/.zaip-aios/templates/tools/mcp/infra/terraform/README.md +20 -0
  709. package/templates/.zaip-aios/templates/tools/mcp/infra/terraform/manifest.yaml +24 -0
  710. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-ads/README.md +21 -0
  711. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-ads/manifest.yaml +26 -0
  712. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-analytics/README.md +20 -0
  713. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-analytics/manifest.yaml +25 -0
  714. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-search-console/README.md +19 -0
  715. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-search-console/manifest.yaml +24 -0
  716. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-tag-manager/README.md +21 -0
  717. package/templates/.zaip-aios/templates/tools/mcp/marketing/google-tag-manager/manifest.yaml +26 -0
  718. package/templates/.zaip-aios/templates/tools/mcp/marketing/hubspot/README.md +20 -0
  719. package/templates/.zaip-aios/templates/tools/mcp/marketing/hubspot/manifest.yaml +25 -0
  720. package/templates/.zaip-aios/templates/tools/mcp/marketing/instagram-insights/README.md +21 -0
  721. package/templates/.zaip-aios/templates/tools/mcp/marketing/instagram-insights/manifest.yaml +26 -0
  722. package/templates/.zaip-aios/templates/tools/mcp/marketing/linkedin-ads/README.md +21 -0
  723. package/templates/.zaip-aios/templates/tools/mcp/marketing/linkedin-ads/manifest.yaml +26 -0
  724. package/templates/.zaip-aios/templates/tools/mcp/marketing/mailchimp/README.md +21 -0
  725. package/templates/.zaip-aios/templates/tools/mcp/marketing/mailchimp/manifest.yaml +26 -0
  726. package/templates/.zaip-aios/templates/tools/mcp/marketing/meta-ads/README.md +21 -0
  727. package/templates/.zaip-aios/templates/tools/mcp/marketing/meta-ads/manifest.yaml +26 -0
  728. package/templates/.zaip-aios/templates/tools/mcp/marketing/semrush/README.md +20 -0
  729. package/templates/.zaip-aios/templates/tools/mcp/marketing/semrush/manifest.yaml +25 -0
  730. package/templates/.zaip-aios/templates/tools/mcp/marketing/tiktok-ads/README.md +21 -0
  731. package/templates/.zaip-aios/templates/tools/mcp/marketing/tiktok-ads/manifest.yaml +26 -0
  732. package/templates/.zaip-aios/templates/tools/mcp/marketing/youtube-analytics/README.md +21 -0
  733. package/templates/.zaip-aios/templates/tools/mcp/marketing/youtube-analytics/manifest.yaml +26 -0
  734. package/templates/.zaip-aios/templates/tools/mcp/observability/cloudwatch/README.md +21 -0
  735. package/templates/.zaip-aios/templates/tools/mcp/observability/cloudwatch/manifest.yaml +26 -0
  736. package/templates/.zaip-aios/templates/tools/mcp/observability/datadog/README.md +21 -0
  737. package/templates/.zaip-aios/templates/tools/mcp/observability/datadog/manifest.yaml +26 -0
  738. package/templates/.zaip-aios/templates/tools/mcp/observability/elasticsearch/README.md +21 -0
  739. package/templates/.zaip-aios/templates/tools/mcp/observability/elasticsearch/manifest.yaml +26 -0
  740. package/templates/.zaip-aios/templates/tools/mcp/observability/grafana/README.md +21 -0
  741. package/templates/.zaip-aios/templates/tools/mcp/observability/grafana/manifest.yaml +26 -0
  742. package/templates/.zaip-aios/templates/tools/mcp/observability/kibana/README.md +21 -0
  743. package/templates/.zaip-aios/templates/tools/mcp/observability/kibana/manifest.yaml +26 -0
  744. package/templates/.zaip-aios/templates/tools/mcp/observability/loki/README.md +19 -0
  745. package/templates/.zaip-aios/templates/tools/mcp/observability/loki/manifest.yaml +24 -0
  746. package/templates/.zaip-aios/templates/tools/mcp/observability/new-relic/README.md +21 -0
  747. package/templates/.zaip-aios/templates/tools/mcp/observability/new-relic/manifest.yaml +26 -0
  748. package/templates/.zaip-aios/templates/tools/mcp/observability/opentelemetry/README.md +20 -0
  749. package/templates/.zaip-aios/templates/tools/mcp/observability/opentelemetry/manifest.yaml +25 -0
  750. package/templates/.zaip-aios/templates/tools/mcp/observability/prometheus/README.md +19 -0
  751. package/templates/.zaip-aios/templates/tools/mcp/observability/prometheus/manifest.yaml +24 -0
  752. package/templates/.zaip-aios/templates/tools/mcp/observability/sentry/README.md +21 -0
  753. package/templates/.zaip-aios/templates/tools/mcp/observability/sentry/manifest.yaml +26 -0
  754. package/templates/.zaip-aios/templates/tools/policies/approval-rules.yaml +8 -0
  755. package/templates/.zaip-aios/templates/tools/policies/financial-limits.yaml +6 -0
  756. package/templates/.zaip-aios/templates/tools/policies/permissions.yaml +8 -0
  757. package/templates/.zaip-aios/templates/tools/policies/secret-handling.md +7 -0
  758. package/templates/.zaip-aios/templates/tools/profiles/business.yaml +8 -0
  759. package/templates/.zaip-aios/templates/tools/profiles/default.yaml +8 -0
  760. package/templates/.zaip-aios/templates/tools/profiles/development.yaml +13 -0
  761. package/templates/.zaip-aios/templates/tools/profiles/infrastructure.yaml +8 -0
  762. package/templates/.zaip-aios/templates/tools/profiles/marketing.yaml +9 -0
  763. package/templates/.zaip-aios/templates/tools/profiles/observability.yaml +8 -0
  764. package/templates/.zaip-aios/templates/tools/runtime/README.md +3 -0
  765. package/templates/.zaip-aios/templates/tools/runtime/api-mcp-runtime.mjs +217 -0
  766. package/templates/.zaip-aios/templates/tools/runtime/api-mcp-runtime.test.mjs +56 -0
  767. package/templates/.zaip-aios/templates/tools/runtime/fixtures/definition.json +17 -0
  768. package/templates/.zaip-aios/templates/tools/runtime/runner.mjs +16 -0
  769. package/templates/.zaip-aios/templates/tools/runtime/stdio.test.mjs +32 -0
  770. package/templates/.zaip-aios/templates/tools/state.example.yaml +8 -0
  771. package/templates/.zaip-aios/templates/zaip-aios/INDEX.md +26 -0
  772. package/templates/.zaip-aios/templates/zaip-aios/README.md +13 -0
  773. package/templates/.zaip-aios/templates/zaip-aios/VERSION +1 -0
  774. package/templates/.zaip-aios/templates/zaip-aios/guides/01-primeiros-passos.md +10 -0
  775. package/templates/.zaip-aios/templates/zaip-aios/guides/02-requirements.md +12 -0
  776. package/templates/.zaip-aios/templates/zaip-aios/guides/03-tasks.md +12 -0
  777. package/templates/.zaip-aios/templates/zaip-aios/guides/04-specs.md +16 -0
  778. package/templates/.zaip-aios/templates/zaip-aios/guides/05-prds.md +13 -0
  779. package/templates/.zaip-aios/templates/zaip-aios/guides/06-execucao.md +13 -0
  780. package/templates/.zaip-aios/templates/zaip-aios/guides/07-revisao-e-validacao.md +8 -0
  781. package/templates/.zaip-aios/templates/zaip-aios/guides/08-contexto-e-tokens.md +10 -0
  782. package/templates/.zaip-aios/templates/zaip-aios/guides/09-agentes-e-squads.md +8 -0
  783. package/templates/.zaip-aios/templates/zaip-aios/guides/10-seguranca.md +206 -0
  784. package/templates/.zaip-aios/templates/zaip-aios/guides/11-observabilidade-e-custos.md +10 -0
  785. package/templates/.zaip-aios/templates/zaip-aios/guides/12-instalacao-e-upgrade.md +10 -0
  786. package/templates/.zaip-aios/templates/zaip-aios/guides/13-boas-praticas.md +12 -0
  787. package/templates/.zaip-aios/templates/zaip-aios/guides/14-troubleshooting.md +12 -0
  788. package/templates/.zaip-aios/templates/zaip-aios/guides/15-tools-e-codex.md +25 -0
  789. package/templates/.zaip-aios/templates/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +47 -0
  790. package/templates/template-manifest.json +3210 -69
  791. package/templates/.agents/rules/architecture.md +0 -21
  792. package/templates/.agents/rules/context.md +0 -18
  793. package/templates/.agents/rules/core.md +0 -16
  794. package/templates/.agents/rules/workflow.md +0 -21
  795. /package/templates/.agents/rules/{security.md → zaip/security.md} +0 -0
@@ -0,0 +1,1009 @@
1
+ var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(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 t=e((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 ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function k(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 re(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,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(O,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+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+ne(a,u),c+=re(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+ne(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(k(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 A(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function j(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 M=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)},N={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=N,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=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:j}},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,M)}catch(e){M(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`})),n=e(((e,n)=>{n.exports=t()})),r=e((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,D());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){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&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,O=te.port2;te.port1.onmessage=ee,D=function(){O.postMessage(null)}}else D=function(){_(ee,0)};function ne(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,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),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}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(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 i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(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=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.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,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,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=l(t.as,t.crossOrigin);a.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??a.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=l(n,t.crossOrigin);a.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=l(t.as,t.crossOrigin);a.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 a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),o=e(((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=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(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 u(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 d(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 f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(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`),ee=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),te=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function A(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?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 te: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 ee:return t=e.displayName||null,t===null?A(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return A(e(t))}catch{}}return null}var j=Array.isArray,M=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},P=[],ae=-1;function F(e){return{current:e}}function I(e){0>ae||(e.current=P[ae],P[ae]=null,ae--)}function L(e,t){ae++,P[ae]=e.current,e.current=t}var oe=F(null),se=F(null),ce=F(null),le=F(null);function ue(e,t){switch(L(ce,t),L(se,e),L(oe,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}}I(oe),L(oe,e)}function de(){I(oe),I(se),I(ce)}function fe(e){e.memoizedState!==null&&L(le,e);var t=oe.current,n=Hd(t,e.type);t!==n&&(L(se,e),L(oe,n))}function pe(e){se.current===e&&(I(oe),I(se)),le.current===e&&(I(le),Qf._currentValue=ie)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!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{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,R=4194304;function We(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 Ge(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=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(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 Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(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 Je(){var e=R;return R<<=1,!(R&62914560)&&(R=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(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-Re(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&&Qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function $e(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function et(e,t){var n=t&-t;return n=n&42?1:tt(n),(n&(e.suspendedLanes|t))===0?n:0}function tt(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 nt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function rt(){var e=N.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function it(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var at=Math.random().toString(36).slice(2),ot=`__reactFiber$`+at,st=`__reactProps$`+at,ct=`__reactContainer$`+at,lt=`__reactEvents$`+at,ut=`__reactListeners$`+at,dt=`__reactHandles$`+at,ft=`__reactResources$`+at,pt=`__reactMarker$`+at;function mt(e){delete e[ot],delete e[st],delete e[lt],delete e[ut],delete e[dt]}function ht(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ot])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function gt(e){if(e=e[ot]||e[ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _t(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function vt(e){var t=e[ft];return t||=e[ft]={hoistableStyles:new Map,hoistableScripts:new Map},t}function yt(e){e[pt]=!0}var bt=new Set,xt={};function St(e,t){Ct(e,t),Ct(e+`Capture`,t)}function Ct(e,t){for(xt[e]=t,e=0;e<t.length;e++)bt.add(t[e])}var wt=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]*$`),Tt={},Et={};function Dt(e){return xe.call(Et,e)?!0:xe.call(Tt,e)?!1:wt.test(e)?Et[e]=!0:(Tt[e]=!0,!1)}function Ot(e,t,n){if(Dt(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 kt(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 At(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 jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Mt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Nt(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 Pt(e){if(!e._valueTracker){var t=Mt(e)?`checked`:`value`;e._valueTracker=Nt(e,t,``+e[t])}}function Ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Mt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function It(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 Lt=/[\n"\\]/g;function Rt(e){return e.replace(Lt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function zt(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=``+jt(t)):e.value!==``+jt(t)&&(e.value=``+jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Vt(e,o,jt(n)):Vt(e,o,jt(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=``+jt(s):e.removeAttribute(`name`)}function Bt(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)){Pt(e);return}n=n==null?``:``+jt(n),t=t==null?n:``+jt(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),Pt(e)}function Vt(e,t,n){t===`number`&&It(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ht(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=``+jt(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 Ut(e,t,n){if(t!=null&&(t=``+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+jt(n)}function Wt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(s(92));if(j(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}n??=``,t=n}n=jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Pt(e)}function Gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kt=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 qt(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||Kt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Jt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(s(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 i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&qt(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&qt(e,a,t[a])}function Yt(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 Xt=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 Qt(e){return Zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function $t(){}var en=null;function tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,rn=null;function an(e){var t=gt(e);if(t&&(e=t.stateNode)){var n=e[st]||null;a:switch(e=t.stateNode,t.type){case`input`:if(zt(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="`+Rt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[st]||null;if(!i)throw Error(s(90));zt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ft(r)}break a;case`textarea`:Ut(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ht(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(nn!==null||rn!==null)&&(bu(),nn&&(t=nn,e=rn,rn=nn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[st]||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(s(231,t,typeof n));return n}var ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.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 mn=i.slice(e,1<r?1-r:void 0)}function gn(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 _n(){return!0}function vn(){return!1}function yn(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)?_n:vn,this.isPropagationStopped=vn,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=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=h({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=h({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,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!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(h({},Dn,{dataTransfer:0})),An=yn(h({},Sn,{relatedTarget:0})),jn=yn(h({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(h({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(h({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={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`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(h({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(h({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(h({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(h({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(h({},Dn,{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})),Wn=yn(h({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!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 Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={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 ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){nn?rn?rn.push(r):rn=[r]:nn=r,t=Ed(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){yd(e,0)}function lr(e){if(Ft(_t(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(ln){var fr;if(ln){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){or&&(or.detachEvent(`onpropertychange`,gr),sr=or=null)}function gr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,tn(e)),sn(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),or=t,sr=n,or.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(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(!xe.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(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=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=It(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=It(e.document)}return t}function Or(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 kr=ln&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==It(r)||(r=Ar,`selectionStart`in r&&Or(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}),Mr&&Cr(Mr,r)||(Mr=r,r=Ed(jr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};ln&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),Kr=zr(`transitionend`),qr=new Map,Jr=`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(` `);Jr.push(`scrollEnd`);function Yr(e,t){qr.set(e,t),St(t,[e])}var Xr=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)},Zr=[],Qr=0,$r=0;function ei(){for(var e=Qr,t=$r=Qr=0;t<e;){var n=Zr[t];Zr[t++]=null;var r=Zr[t];Zr[t++]=null;var i=Zr[t];Zr[t++]=null;var a=Zr[t];if(Zr[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&&ii(n,i,a)}}function ti(e,t,n,r){Zr[Qr++]=e,Zr[Qr++]=t,Zr[Qr++]=n,Zr[Qr++]=r,$r|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ni(e,t,n,r){return ti(e,t,n,r),ai(e)}function ri(e,t){return ti(e,null,null,t),ai(e)}function ii(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-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ai(e){if(50<du)throw du=0,fu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oi={};function si(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 ci(e,t,n,r){return new si(e,t,n,r)}function li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ui(e,t){var n=e.alternate;return n===null?(n=ci(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 di(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 fi(e,t,n,r,i,a){var o=0;if(r=e,typeof e==`function`)li(e)&&(o=1);else if(typeof e==`string`)o=Uf(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case te:return e=ci(31,n,t,i),e.elementType=te,e.lanes=a,e;case y:return pi(n.children,i,a,t);case b:o=8,i|=24;break;case x:return e=ci(12,n,t,i|2),e.elementType=x,e.lanes=a,e;case T:return e=ci(13,n,t,i),e.elementType=T,e.lanes=a,e;case E:return e=ci(19,n,t,i),e.elementType=E,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:o=10;break a;case S:o=9;break a;case w:o=11;break a;case ee:o=14;break a;case D:o=16,r=null;break a}o=29,n=Error(s(130,e===null?`null`:typeof e,``)),r=null}return t=ci(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function pi(e,t,n,r){return e=ci(7,e,r,t),e.lanes=n,e}function z(e,t,n){return e=ci(6,e,null,t),e.lanes=n,e}function mi(e){var t=ci(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=ci(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var vi=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,B=``;function Ei(e,t){vi[yi++]=xi,vi[yi++]=bi,bi=e,xi=t}function Di(e,t,n){Si[Ci++]=Ti,Si[Ci++]=B,Si[Ci++]=wi,wi=e;var r=Ti;e=B;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Re(t)+i|n<<i|r,B=a+e}else Ti=1<<a|n<<i|r,B=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===bi;)bi=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,B=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function Ai(e,t){Si[Ci++]=Ti,Si[Ci++]=B,Si[Ci++]=wi,Ti=t.id,B=t.overflow,wi=e}var ji=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(s(519));function Ii(e){throw Hi(_i(Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ot]=e,t[st]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Wt(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||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:ji=ji.return}}function zi(e){if(e!==ji)return!1;if(!V)return Ri(e),V=!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&&Mi&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));Mi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));Mi=uf(e)}else t===27?(t=Mi,Zd(e.type)?(e=lf,lf=null,Mi=e):Mi=t):Mi=ji?cf(e.stateNode.nextSibling):null;return!0}function Bi(){Mi=ji=null,V=!1}function Vi(){var e=Ni;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=F(null),Wi=null,Gi=null;function Ki(e,t,n){L(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,I(Ui)}function Ji(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 Yi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Ji(a.return,n,e),r||(o=null);break a}a=c.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(s(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ji(o,n,e),o=null}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function Xi(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(s(387));if(o=o.memoizedProps,o!==null){var c=i.type;Sr(i.pendingProps.value,o.value)||(e===null?e=[c]:e.push(c))}}else if(i===le.current){if(o=i.alternate,o===null)throw Error(s(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(s(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=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()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=dd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(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 ha=M.S;M.S=function(e,t){eu=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=F(null);function _a(){var e=ga.current;return e===null?Rl.pooledCache:e}function va(e,t){t===null?L(ga,ga.current):L(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(s(460)),xa=Error(s(474)),Sa=Error(s(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($t,$t),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then($t,$t);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(s(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,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(s(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(s(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===g?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(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 i(e,t){return e=ui(e,t),e.index=0,e.sibling=null,e}function a(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 o(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=z(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===D&&Ea(a)===t.type)?(t=i(t,n.props),Na(t,n),t.return=e,t):(t=fi(n.type,n.key,n.props,null,e.mode,r),Na(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=hi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=pi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=z(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=fi(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case v:return t=hi(t,e.mode,n),t.return=e,t;case D:return t=Ea(t),f(e,t,n)}if(j(t)||k(t))return t=pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===C)return f(e,ea(e,t),n);Pa(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 D:return n=Ea(n),p(e,t,n,r)}if(j(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===C)return p(e,t,ea(e,n),r);Pa(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 D:return r=Ea(r),m(e,t,n,r,i)}if(j(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ma(r),i);if(r.$$typeof===C)return m(e,t,n,ea(t,r),i);Pa(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=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),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),V&&Ei(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return V&&Ei(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),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),V&&Ei(i,h),l}function g(i,o,c,l){if(c==null)throw Error(s(151));for(var u=null,d=null,h=o,g=o=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),V&&Ei(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return V&&Ei(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),V&&Ei(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&Ea(l)===r.type){n(e,r.sibling),c=i(r,a.props),Na(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=pi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=fi(a.type,a.key,a.props,null,e.mode,c),Na(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=hi(a,e.mode,c),c.return=e,e=c}return o(e);case D:return a=Ea(a),b(e,r,a,c)}if(j(a))return h(e,r,a,c);if(k(a)){if(l=k(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Ma(a),c);if(a.$$typeof===C)return b(e,r,ea(e,a),c);Pa(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=z(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=b(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ai(e),ii(e,null,n),t}return ti(e,r,t,n),ai(e)}function Ua(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,$e(e,n)}}function Wa(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 Ga=!1;function Ka(){if(Ga){var e=da;if(e!==null)throw e}}function qa(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!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?(Y&f)===f:(r&f)===f){f!==0&&f===ua&&(Ga=!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:Ra=!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),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ja(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function Ya(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ja(n[e],t)}var Xa=F(null),H=F(0);function Za(e,t){e=Ul,L(H,e),L(Xa,t),Ul=e|t.baseLanes}function Qa(){L(H,Ul),L(Xa,Xa.current)}function $a(){Ul=H.current,I(Xa),I(H)}var eo=F(null),to=null;function no(e){var t=e.alternate;L(U,U.current&1),L(eo,e),to===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){L(U,U.current),L(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(L(U,U.current),L(eo,e),to===null&&(to=e)):ao(e)}function ao(){L(U,U.current),L(eo,eo.current)}function oo(e){I(eo),to===e&&(to=null),I(U)}var U=F(0);function so(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 co=0,W=null,G=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function K(){throw Error(s(321))}function vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function yo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Is:Ls,po=!1,a=n(r,i),po=!1,fo&&(a=xo(t,n,r,i)),bo(e),a}function bo(e){M.H=Fs;var t=G!==null&&G.next!==null;if(co=0,lo=G=W=null,uo=!1,ho=0,go=null,t)throw Error(s(300));e===null||ec||(e=e.dependencies,e!==null&&Zi(e)&&(ec=!0))}function xo(e,t,n,r){W=e;var i=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=i)throw Error(s(301));if(i+=1,lo=G=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}M.H=Rs,a=t(n,r)}while(fo);return a}function So(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?ko(t):t,e=e.useState()[0],(G===null?null:G.memoizedState)!==e&&(W.flags|=1024),t}function Co(){var e=mo!==0;return mo=0,e}function wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function To(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,lo=G=W=null,fo=!1,ho=mo=0,go=null}function Eo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?W.memoizedState=lo=e:lo=lo.next=e,lo}function Do(){if(G===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=G.next;var t=lo===null?W.memoizedState:lo.next;if(t!==null)lo=t,G=e;else{if(e===null)throw W.alternate===null?Error(s(467)):Error(s(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},lo===null?W.memoizedState=lo=e:lo=lo.next=e}return lo}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ko(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Ta(go,e,t),t=W,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Is:Ls),e}function Ao(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ko(e);if(e.$$typeof===C)return $i(e)}throw Error(s(438,String(e)))}function jo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.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=Oo(),W.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]=O;return t.index++,n}function Mo(e,t){return typeof t==`function`?t(e):t}function No(e){return Po(Do(),G,e)}function Po(e,t,n){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=o=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Y&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===ua&&(d=!0);else if((co&p)===p){u=u.next,p===ua&&(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,o=a):l=l.next=f,W.lanes|=p,Gl|=p;f=u.action,po&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,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,o=a):l=l.next=p,W.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=a:l.next=c,!Sr(a,e.memoizedState)&&(ec=!0,d&&(n=da,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Fo(e){var t=Do(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Sr(a,t.memoizedState)||(ec=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Io(e,t,n){var r=W,i=Do(),a=V;if(a){if(n===void 0)throw Error(s(407));n=n()}else n=t();var o=!Sr((G||i).memoizedState,n);if(o&&(i.memoizedState=n,ec=!0),i=i.queue,ss(zo.bind(null,r,i,e),[e]),i.getSnapshot!==t||o||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,i,n,t),null),Rl===null)throw Error(s(349));a||co&127||Lo(r,t,n)}return n}function Lo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=Oo(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Bo(t)&&Vo(e)}function zo(e,t,n){return n(function(){Bo(t)&&Vo(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Vo(e){var t=ri(e,2);t!==null&&hu(t,e,2)}function Ho(e){var t=Eo();if(typeof e==`function`){var n=e;if(e=n(),po){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:e},t}function Uo(e,t,n,r){return e.baseState=n,Po(e,G,typeof r==`function`?r:Mo)}function Wo(e,t,n,r,i){if(Ms(e))throw Error(s(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};M.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,Go(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Go(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),Ko(e,t,s)}catch(n){Jo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),Ko(e,t,a)}catch(n){Jo(e,t,n)}}function Ko(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){qo(e,t,n)},function(n){return Jo(e,t,n)}):qo(e,t,n)}function qo(e,t,n){t.status=`fulfilled`,t.value=n,Yo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Go(e,n)))}function Jo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Yo(t),t=t.next;while(t!==r)}e.action=null}function Yo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xo(e,t){return t}function Zo(e,t){if(V){var n=Rl.formState;if(n!==null){a:{var r=W;if(V){if(Mi){b:{for(var i=Mi,a=Pi;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){Mi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=Eo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:t},n.queue=r,n=ks.bind(null,W,r),r.dispatch=n,r=Ho(!1),a=js.bind(null,W,!1,r.queue),r=Eo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Wo.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Qo(e){return $o(Do(),G,e)}function $o(e,t,n){if(t=Po(e,t,Xo)[0],e=No(Mo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ko(t)}catch(e){throw e===ba?Sa:e}else r=t;t=Do();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,ns(9,{destroy:void 0},es.bind(null,i,n),null)),[r,a,e]}function es(e,t){e.action=t}function ts(e){var t=Do(),n=G;if(n!==null)return $o(t,n,e);Do(),t=t.memoizedState,n=Do();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=Oo(),W.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 rs(){return Do().memoizedState}function is(e,t,n,r){var i=Eo();W.flags|=e,i.memoizedState=ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function as(e,t,n,r){var i=Do();r=r===void 0?null:r;var a=i.memoizedState.inst;G!==null&&r!==null&&vo(r,G.memoizedState.deps)?i.memoizedState=ns(t,a,n,r):(W.flags|=e,i.memoizedState=ns(1|t,a,n,r))}function os(e,t){is(8390656,8,e,t)}function ss(e,t){as(2048,8,e,t)}function cs(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=Oo(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Do().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(q&2)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return as(4,2,e,t)}function ds(e,t){return as(4,4,e,t)}function fs(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 ps(e,t,n){n=n==null?null:n.concat([e]),as(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&vo(t,r[1]))return r[0];if(r=e(),po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||co&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),W.lanes|=e,Gl|=e,n)}function vs(e,t,n,r){return Sr(n,t)?n:Xa.current===null?!(co&42)||co&1073741824&&!(Y&261930)?(ec=!0,e.memoizedState=n):(e=mu(),W.lanes|=e,Gl|=e,t):(e=_s(e,n,r),Sr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,js(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,ma(c,r),pu(e)):As(e,t,r,pu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Ss(e).queue;ys(e,i,t,ie,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},pu())}function ws(){return $i(Qf)}function Ts(){return Do().memoizedState}function Es(){return Do().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Va(n);var r=Ha(t,e,n);r!==null&&(hu(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=ni(e,t,n,r),n!==null&&(hu(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,pu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(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,Sr(s,o))return ti(e,t,i,0),Rl===null&&ei(),!1}catch{}if(n=ni(e,t,i,r),n!==null)return hu(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(s(479))}else t=ni(e,n,r,2),t!==null&&hu(t,e,2)}function Ms(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ns(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Fs={readContext:$i,use:Ao,useCallback:K,useContext:K,useEffect:K,useImperativeHandle:K,useLayoutEffect:K,useInsertionEffect:K,useMemo:K,useReducer:K,useRef:K,useState:K,useDebugValue:K,useDeferredValue:K,useTransition:K,useSyncExternalStore:K,useId:K,useHostTransitionStatus:K,useFormState:K,useActionState:K,useOptimistic:K,useMemoCache:K,useCacheRefresh:K};Fs.useEffectEvent=K;var Is={readContext:$i,use:Ao,useCallback:function(e,t){return Eo().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:os,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),is(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var n=Eo();t=t===void 0?null:t;var r=e();if(po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Eo();if(n!==void 0){var i=n(t);if(po){Le(!0);try{n(t)}finally{Le(!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=Os.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Eo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=ks.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Eo(),e,t)},useTransition:function(){var e=Ho(!1);return e=ys.bind(null,W,e.queue,!0,!1),Eo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,i=Eo();if(V){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Rl===null)throw Error(s(349));Y&127||Lo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,os(zo.bind(null,r,a,e),[e]),r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,a,n,t),null),n},useId:function(){var e=Eo(),t=Rl.identifierPrefix;if(V){var n=B,r=Ti;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=Eo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:jo,useCacheRefresh:function(){return Eo().memoizedState=Ds.bind(null,W)},useEffectEvent:function(e){var t=Eo(),n={impl:e};return t.memoizedState=n,function(){if(q&2)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:$i,use:Ao,useCallback:hs,useContext:$i,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:No,useRef:rs,useState:function(){return No(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Do(),G.memoizedState,e,t)},useTransition:function(){var e=No(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){return Uo(Do(),G,e,t)},useMemoCache:jo,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:$i,use:Ao,useCallback:hs,useContext:$i,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Fo,useRef:rs,useState:function(){return Fo(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Do();return G===null?_s(n,e,t):vs(n,G.memoizedState,e,t)},useTransition:function(){var e=Fo(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){var n=Do();return G===null?(n.baseState=e,[e,n.queue.dispatch]):Uo(n,G,e,t)},useMemoCache:jo,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(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 Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(hu(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(hu(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(hu(t,e,n),Ua(t,e,n))}};function Vs(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?!Cr(n,r)||!Cr(i,a):!0}function Hs(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&&Bs.enqueueReplaceState(t,t.state,null)}function Us(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 Ws(e){Xr(e)}function Gs(e){console.error(e)}function Ks(e){Xr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(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 Ys(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=Va(e),e.tag=3,e}function Zs(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(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,i,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===Ca?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)),Gu(e,r,i)),!1}throw Error(s(435,n.tag))}return Gu(e,r,i),Du(),!1}if(V)return t=eo.current,t===null?(r!==Fi&&(t=Error(s(423),{cause:r}),Hi(_i(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=_i(r,n),i=Ys(e.stateNode,r,i),Wa(e,i),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Fi&&(e=Error(s(422),{cause:r}),Hi(_i(e,n)))),!1;var a=Error(s(520),{cause:r});if(a=_i(a,n),Xl===null?Xl=[a]:Xl.push(a),Wl!==4&&(Wl=2),t===null)return!0;r=_i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Ys(n.stateNode,r,e),Wa(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(ru===null||!ru.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Xs(i),Zs(i,e,n,r),Wa(n,i),!1}n=n.return}while(n!==null);return!1}var $s=Error(s(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function nc(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 Qi(t),r=yo(e,t,n,o,a,i),s=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(V&&s&&Oi(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!li(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=fi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Dc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return Ec(e,t,i)}return t.flags|=1,e=ui(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Dc(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Ec(e,t,i)}return fc(e,t,n,r,i)}function ac(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 sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),Qa(),ao(t)):(va(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),Qa(),io(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return Ia(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if(ro(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:B},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return cc(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(ro(t),i)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(ec||Xi(e,t,n,!1),i=(n&e.childLanes)!==0,ec||i){if(r=Rl,r!==null&&(o=et(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,ri(e,o),hu(r,e,o),$s;Du(),t=lc(e,t,n)}else e=a.treeContext,Mi=cf(o.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=cc(t,r),t.flags|=4096;return t}return e=ui(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(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(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return Qi(t),n=yo(e,t,n,r,void 0,i),r=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(V&&r&&Oi(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=xo(t,r,n,i),bo(e),r=Co(),e!==null&&!ec?(wo(e,t,a),Ec(e,t,a)):(V&&r&&Oi(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=oi,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(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&&Bs.enqueueReplaceState(a,a.state,null),qa(t,r,a,i),Ka(),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=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=oi,typeof u==`object`&&u&&(o=$i(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)&&Hs(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,qa(t,r,a,i),Ka(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Ra||Vs(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,Ba(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=oi,typeof l==`object`&&l&&(c=$i(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)&&Hs(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,qa(t,r,a,i),Ka();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Ra||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(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,dc(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=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ec(e,t,i),e}function hc(e,t,n,r){return Bi(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:ya()}}function vc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function yc(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(U.current&2)!=0),o&&(i=!0,t.flags&=-129),o=(t.flags&32)!=0,t.flags&=-33,e===null){if(V){if(i?no(t):ao(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:B},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(ao(t),i=t.mode,c=xc({mode:`hidden`,children:c},i),r=pi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,o,n),t.memoizedState=gc,oc(null,r)):(no(t),bc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(no(t),t.flags&=-257,t=Sc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,i=t.mode,r=xc({mode:`visible`,children:r.children},i),c=pi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,o,n),t.memoizedState=gc,t=oc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),of(c)){if(o=c.nextSibling&&c.nextSibling.dataset,o)var u=o.dgst;o=u,r=Error(s(419)),r.stack=``,r.digest=o,Hi({value:r,source:null,stack:null}),t=Sc(e,t,n)}else if(ec||Xi(e,t,n,!1),o=(n&e.childLanes)!==0,ec||o){if(o=Rl,o!==null&&(r=et(o,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ri(e,r),hu(o,e,r),$s;af(c)||Du(),t=Sc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=cf(c.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=bc(t,r.children),t.flags|=4096);return t}return i?(ao(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=ui(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=pi(c,i,n,null),c.flags|=2):c=ui(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=_c(n):(i=c.cachePool,i===null?i=ya():(l=aa._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=vc(e,o,n),t.memoizedState=gc,oc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=ui(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function bc(e,t){return t=xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function xc(e,t){return e=ci(22,e,null,t),e.lanes=0,e}function Sc(e,t,n){return Ia(t,e.child,null,n),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function wc(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 Tc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=U.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(U,o),tc(e,t,r,n),r=V?xi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cc(e,n,t);else if(e.tag===19)Cc(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&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wc(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&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wc(t,!0,n,null,a,r);break;case`together`:wc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Xi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=ui(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ui(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Zi(e))):!0}function Oc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=Ec(e,t,n),e===null?null:e.sibling):yc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Tc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(U,U.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return Ec(e,t,n)}function kc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Dc(e,n)&&!(t.flags&128))return ec=!1,Oc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,V&&t.flags&1048576&&Di(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)li(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=nc(null,t,e,r,n);break a}else if(i===ee){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=A(e)||e,Error(s(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Us(r,t.pendingProps),mc(e,t,r,i,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Ba(e,t),qa(t,r,null,n);var o=t.memoizedState;if(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0),Ka(),r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==i){i=_i(Error(s(424)),t),Hi(i),t=hc(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(Mi=cf(e.firstChild),ji=t,V=!0,Ni=null,Pi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===i){t=Ec(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Bd(ce.current).createElement(n),r[ot]=t,r[st]=e,Pd(r,n,e),yt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&V&&(r=t.stateNode=ff(t.type,t.pendingProps,ce.current),ji=t,Pi=!0,i=Mi,Zd(t.type)?(lf=i,Mi=cf(r.firstChild)):Mi=i),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((i=r=Mi)&&(r=tf(r,t.type,t.pendingProps,Pi),r===null?i=!1:(t.stateNode=r,ji=t,Mi=cf(r.firstChild),Pi=!1,i=!0)),i||Ii(t)),fe(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,r=a.children,Ud(i,a)?r=null:o!==null&&Ud(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=yo(e,t,So,null,null,n),Qf._currentValue=i),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=nf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Ii(t)),null;case 13:return yc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Qi(t),i=$i(i),r=r(i),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return Tc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(i=_a(),i===null&&(i=Rl,a=oa(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},za(t),Ki(t,aa,i)):((e.lanes&n)!==0&&(Ba(e,t),qa(t,null,null,n),Ka()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,Ki(t,aa,r),r!==i.cache&&Yi(t,[aa],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ki(t,aa,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Ac(e){e.flags|=4}function jc(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(wu())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function Mc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Da=Ca,xa}function Nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Je(),e.lanes|=t,Yl|=t)}function Pc(e,t){if(!V)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 Fc(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 Ic(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fc(t),null;case 1:return Fc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?Ac(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),Fc(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Ac(t),a===null?(Fc(t),jc(t,i,null,r,n)):(Fc(t),Mc(t,a))):a?a===e.memoizedState?(Fc(t),t.flags&=-16777217):(Ac(t),Fc(t),Mc(t,a)):(e=e.memoizedProps,e!==r&&Ac(t),Fc(t),jc(t,i,e,r,n)),null;case 27:if(pe(t),n=ce.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Fc(t),null}e=oe.current,zi(t)?Li(t,e):(e=ff(i,r,n),t.stateNode=e,Ac(t))}return Fc(t),null;case 5:if(pe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Fc(t),null}if(a=oe.current,zi(t))Li(t,a);else{var o=Bd(ce.current);switch(a){case 1:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=o.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[ot]=t,a[st]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=ce.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ji,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ii(t,!0)}else e=Bd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[ot]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(s(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=zi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[ot]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),i=!1}else i=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return de(),e===null&&Sd(t.stateNode.containerInfo),Fc(t),null;case 10:return qi(t.type),Fc(t),null;case 19:if(I(U),r=t.memoizedState,r===null)return Fc(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Pc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=so(e),a!==null){for(t.flags|=128,Pc(r,!1),e=a.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)di(n,e),n=n.sibling;return L(U,U.current&1|2),V&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>tu&&(t.flags|=128,i=!0,Pc(r,!1),t.lanes=4194304)}else{if(!i)if(e=so(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!V)return Fc(t),null}else 2*Ee()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=U.current,L(U,i?n&1|2:n&1),V&&Ei(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(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&&I(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),Fc(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Lc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(s(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(U),null;case 4:return de(),null;case 10:return qi(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&I(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Rc(e,t){switch(ki(t),t.tag){case 3:qi(aa),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:I(U);break;case 10:qi(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&I(ga);break;case 24:qi(aa)}}function zc(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){Z(t,t.return,e)}}function Bc(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){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ya(t,n)}catch(t){Z(e,e.return,t)}}}function Hc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Uc(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){Z(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(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){Z(e,t,n)}else n.current=null}function Gc(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){Z(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[st]=t}catch(t){Z(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(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 Yc(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=$t));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(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(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(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[ot]=e,t[st]=n}catch(t){Z(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,nl=null;function rl(e,t){if(e=e.containerInfo,Rd=sp,e=Dr(e),Or(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 i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(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,nl=t;nl!==null;)if(t=nl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,nl=e;else for(;nl!==null;){switch(t=nl,a=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++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=Us(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,nl=e;break}nl=t.return}}function il(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:yl(e,n),r&4&&zc(5,n);break;case 1:if(yl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Vc(n),r&512&&Uc(n,n.return);break;case 3:if(yl(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{Ya(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Zc(n);case 26:case 5:yl(e,n),t===null&&r&4&&Gc(n),r&512&&Uc(n,n.return);break;case 12:yl(e,n);break;case 31:yl(e,n),r&4&&ul(e,n);break;case 13:yl(e,n),r&4&&dl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Qc,!r){t=t!==null&&t.memoizedState!==null||$c,i=Qc;var a=$c;Qc=r,($c=t)&&!a?xl(e,n,(n.subtreeFlags&8772)!=0):yl(e,n),Qc=i,$c=a}break;case 30:break;default:yl(e,n)}}function al(e){var t=e.alternate;t!==null&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mt(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 ol=null,sl=!1;function cl(e,t,n){for(n=n.child;n!==null;)ll(e,t,n),n=n.sibling}function ll(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:$c||Wc(n,t),cl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$c||Wc(n,t);var r=ol,i=sl;Zd(n.type)&&(ol=n.stateNode,sl=!1),cl(e,t,n),pf(n.stateNode),ol=r,sl=i;break;case 5:$c||Wc(n,t);case 6:if(r=ol,i=sl,ol=null,cl(e,t,n),ol=r,sl=i,ol!==null)if(sl)try{(ol.nodeType===9?ol.body:ol.nodeName===`HTML`?ol.ownerDocument.body:ol).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{ol.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:ol!==null&&(sl?(e=ol,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(ol,n.stateNode));break;case 4:r=ol,i=sl,ol=n.stateNode.containerInfo,sl=!0,cl(e,t,n),ol=r,sl=i;break;case 0:case 11:case 14:case 15:Bc(2,n,t),$c||Bc(4,n,t),cl(e,t,n);break;case 1:$c||(Wc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Hc(n,t,r)),cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:$c=(r=$c)||n.memoizedState!==null,cl(e,t,n),$c=r;break;default:cl(e,t,n)}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function dl(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){Z(t,t.return,e)}}function fl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tl),t;default:throw Error(s(435,e.tag))}}function pl(e,t){var n=fl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function ml(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,o=t,c=o;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){ol=c.stateNode,sl=!1;break a}break;case 5:ol=c.stateNode,sl=!1;break a;case 3:case 4:ol=c.stateNode.containerInfo,sl=!0;break a}c=c.return}if(ol===null)throw Error(s(160));ll(a,o,i),ol=null,sl=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gl(t,e),t=t.sibling}var hl=null;function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ml(t,e),_l(e),r&4&&(Bc(3,e,e.return),zc(3,e),Bc(5,e,e.return));break;case 1:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&64&&Qc&&(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 i=hl;if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),r&4){var a=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,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[pt]||a[ot]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),Pd(a,r,n),a[ot]=e,yt(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;c<o.length;c++)if(a=o[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;case`meta`:if(o=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<o.length;c++)if(a=o[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;default:throw Error(s(468,r))}a[ot]=e,yt(a),r=a}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&Kc(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),n!==null&&r&4&&Kc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ml(t,e),_l(e),r&512&&($c||n===null||Wc(n,n.return)),e.flags&32){i=e.stateNode;try{Gt(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Kc(e,i,n===null?i:n.memoizedProps)),r&1024&&(el=!0);break;case 6:if(ml(t,e),_l(e),r&4){if(e.stateNode===null)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=hl,hl=gf(t.containerInfo),ml(t,e),hl=i,_l(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}el&&(el=!1,vl(e));break;case 4:r=hl,hl=gf(e.stateNode.containerInfo),ml(t,e),_l(e),hl=r;break;case 12:ml(t,e),_l(e);break;case 31:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 13:ml(t,e),_l(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Qc,d=$c;if(Qc=u||i,$c=d||l,ml(t,e),$c=d,Qc=u,_l(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Qc||$c||bl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.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){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(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,pl(e,n))));break;case 19:ml(t,e),_l(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,pl(e,r)));break;case 30:break;case 21:break;default:ml(t,e),_l(e)}}function _l(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(qc(r)){n=r;break}r=r.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var i=n.stateNode;Xc(e,Jc(e),i);break;case 5:var a=n.stateNode;n.flags&32&&(Gt(a,``),n.flags&=-33),Xc(e,Jc(e),a);break;case 3:case 4:var o=n.stateNode.containerInfo;Yc(e,Jc(e),o);break;default:throw Error(s(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function yl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)il(e,t.alternate,t),t=t.sibling}function bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bc(4,t,t.return),bl(t);break;case 1:Wc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Hc(t,t.return,n),bl(t);break;case 27:pf(t.stateNode);case 26:case 5:Wc(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}e=e.sibling}}function xl(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:xl(i,a,n),zc(4,a);break;case 1:if(xl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(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++)Ja(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Vc(a),Uc(a,a.return);break;case 27:Zc(a);case 26:case 5:xl(i,a,n),n&&r===null&&o&4&&Gc(a),Uc(a,a.return);break;case 12:xl(i,a,n);break;case 31:xl(i,a,n),n&&o&4&&ul(i,a);break;case 13:xl(i,a,n),n&&o&4&&dl(i,a);break;case 22:a.memoizedState===null&&xl(i,a,n),Uc(a,a.return);break;case 30:break;default:xl(i,a,n)}t=t.sibling}}function Sl(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&&sa(n))}function Cl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function wl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tl(e,t,n,r),t=t.sibling}function Tl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,n,r),i&2048&&zc(9,t);break;case 1:wl(e,t,n,r);break;case 3:wl(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&&sa(e)));break;case 12:if(i&2048){wl(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){Z(t,t.return,e)}}else wl(e,t,n,r);break;case 31:wl(e,t,n,r);break;case 13:wl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?wl(e,t,n,r):(a._visibility|=2,El(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?wl(e,t,n,r):Dl(e,t),i&2048&&Sl(o,t);break;case 24:wl(e,t,n,r),i&2048&&Cl(t.alternate,t);break;default:wl(e,t,n,r)}}function El(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:El(a,o,s,c,i),zc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,El(a,o,s,c,i)):u._visibility&2?El(a,o,s,c,i):Dl(a,o),i&&l&2048&&Sl(o.alternate,o);break;case 24:El(a,o,s,c,i),i&&l&2048&&Cl(o.alternate,o);break;default:El(a,o,s,c,i)}t=t.sibling}}function Dl(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:Dl(n,r),i&2048&&Sl(r.alternate,r);break;case 24:Dl(n,r),i&2048&&Cl(r.alternate,r);break;default:Dl(n,r)}t=t.sibling}}var Ol=8192;function kl(e,t,n){if(e.subtreeFlags&Ol)for(e=e.child;e!==null;)Al(e,t,n),e=e.sibling}function Al(e,t,n){switch(e.tag){case 26:kl(e,t,n),e.flags&Ol&&e.memoizedState!==null&&Gf(n,hl,e.memoizedState,e.memoizedProps);break;case 5:kl(e,t,n);break;case 3:case 4:var r=hl;hl=gf(e.stateNode.containerInfo),kl(e,t,n),hl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ol,Ol=16777216,kl(e,t,n),Ol=r):kl(e,t,n));break;default:kl(e,t,n)}}function jl(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 Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nl(e),e=e.sibling}function Nl(e){switch(e.tag){case 0:case 11:case 15:Ml(e),e.flags&2048&&Bc(9,e,e.return);break;case 3:Ml(e);break;case 12:Ml(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Pl(e)):Ml(e);break;default:Ml(e)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Fl(r,e)}jl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bc(8,t,t.return),Pl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Pl(t));break;default:Pl(t)}e=e.sibling}}function Fl(e,t){for(;nl!==null;){var n=nl;switch(n.tag){case 0:case 11:case 15:Bc(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:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nl=r;else a:for(n=e;nl!==null;){r=nl;var i=r.sibling,a=r.return;if(al(r),r===n){nl=null;break a}if(i!==null){i.return=a,nl=i;break a}nl=a}}}var Il={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},Ll=typeof WeakMap==`function`?WeakMap:Map,q=0,Rl=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return q&2&&Y!==0?Y&-Y:M.T===null?rt():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||V){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),Jl=e}else Jl=536870912;return e=eo.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===Rl&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),Xe(e,n),(!(q&2)||e!==Rl)&&(e===Rl&&(!(q&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(q&6)throw Error(s(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ke(e,t),i=r?Au(e,t):Ou(e,t,!0),a=r;do{if(i===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!vu(n)){i=Ou(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=e.pendingLanes&-536870913,o=o===0?o&536870912?536870912:0:o;if(o!==0){t=o;a:{var c=e;i=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,o).flags|=256),o=Ou(c,o,!1),o!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=a,Kl|=a,i=4;break a}a=Zl,Zl=i,a!==null&&(Zl===null?Zl=a:Zl.push.apply(Zl,a))}i=o}if(a=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(i=$l+300-Ee(),10<i)){if(yu(r,t,Jl,!Bl),Ge(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,a,`Throttled`,-0,0),i);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,a,null,-0,0)}}break}while(1);rd(e)}function _u(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:$t},Al(t,a,d);var m=(a&62914560)===a?$l-Ee():(a&4194048)===a?eu-Ee():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(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(!Sr(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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Qe(e,n,t)}function bu(){return q&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Gi=Wi=null,To(e),Aa=null,ja=0,e=J;for(;e!==null;)Rc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),Rl=e,J=n=ui(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Ke(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,ei(),n}function Cu(e,t){W=null,M.H=Fs,t===ba||t===Sa?(t=Oa(),X=3):t===xa?(t=Oa(),X=4):X=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,qs(e,_i(t,e.current)))}function wu(){var e=eo.current;return e===null?!0:(Y&4194048)===Y?to===null:(Y&62914560)===Y||Y&536870912?e===to:!1}function Tu(){var e=M.H;return M.H=Fs,e===null?Fs:e}function Eu(){var e=M.A;return M.A=Il,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&eo.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||Rl===null||yu(Rl,Y,Jl,!1)}function Ou(e,t,n){var r=q;q|=2;var i=Tu(),a=Eu();(Rl!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,q=r,M.H=i,M.A=a,J===null&&(Rl=null,Y=0,ei()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=q;q|=2;var r=Tu(),i=Eu();Rl!==e||Y!==t?(nu=null,tu=Ee()+500,Su(e,t)):Vl=Ke(e,t);a:do try{if(X!==0&&J!==null){t=J;var a=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,a,1);break;case 2:case 9:if(wa(a)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||Rl!==e||(X=7),rd(e)},a.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:wa(a)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,a,7));break;case 5:var o=null;switch(J.tag){case 26:o=J.memoizedState;case 5:case 27:var c=J;if(o?Wf(o):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,a,5);break;case 6:X=0,zl=null,Pu(e,t,a,6);break;case 8:xu(),Wl=6;break a;default:throw Error(s(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Gi=Wi=null,M.H=r,M.A=i,q=n,J===null?(Rl=null,Y=0,ei(),Wl):0}function ju(){for(;J!==null&&!we();)Mu(J)}function Mu(e){var t=kc(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:To(t);default:Rc(n,t),t=J=di(t,Ul),t=kc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Gi=Wi=null,To(t),Aa=null,ja=0;var i=t.return;try{if(Qs(e,i,t,n,Y)){Wl=1,qs(e,_i(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,qs(e,_i(n,e.current)),J=null;return}t.flags&32768?(V||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Ic(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Lc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,i,a,o,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(q&6)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(a=t.lanes|t.childLanes,a|=$r,Ze(e,n,a,o,c,l),e===Rl&&(J=Rl=null,Y=0),ou=t,au=e,su=n,cu=a,lu=i,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Ae,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=M.T,M.T=null,i=N.p,N.p=2,o=q,q|=4;try{rl(e,t,n)}finally{q=o,N.p=i,M.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=q;q|=4;try{gl(t,e);var a=zd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(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 _=Tr(s,h),v=Tr(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{q=i,N.p=r,M.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=q;q|=4;try{il(e,t.alternate,t)}finally{q=i,N.p=r,M.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Te();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),nt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.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{M.T=t,N.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=nt(su),r=M.T,i=N.p;try{N.p=32>n?32:n,M.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,q&6)throw Error(s(331));var c=q;if(q|=4,Nl(a.current),Tl(a,a.current,o,n),q=c,id(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,a)}catch{}return!0}finally{N.p=i,M.T=r,Vu(e,t)}}function Wu(e,t,n){t=_i(n,t),t=Ys(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Xe(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=_i(n,e),n=Xs(2),r=Ha(t,n,2),r!==null&&(Zs(n,r,t,e),Xe(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;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)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ee()-$l?!(q&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Je()),e=ri(e,t),e!==null&&(Xe(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Se(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;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-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Ge(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ee(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Y,n=Ge(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ke(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),nt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=cd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Ge(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){q&6?Se(Oe,ad):od()})}function dd(){if(nd===0){var e=ua;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Qt(``+e)}function pd(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 md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[st]||null).action),o=r.submitter;o&&(t=(t=o[st]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Jr.length;hd++){var gd=Jr[hd];Yr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Yr(Br,`onAnimationEnd`),Yr(Vr,`onAnimationIteration`),Yr(Hr,`onAnimationStart`),Yr(`dblclick`,`onDoubleClick`),Yr(`focusin`,`onFocus`),Yr(`focusout`,`onBlur`),Yr(Ur,`onTransitionRun`),Yr(Wr,`onTransitionStart`),Yr(Gr,`onTransitionCancel`),Yr(Kr,`onTransitionEnd`),Ct(`onMouseEnter`,[`mouseout`,`mouseover`]),Ct(`onMouseLeave`,[`mouseout`,`mouseover`]),Ct(`onPointerEnter`,[`pointerout`,`pointerover`]),Ct(`onPointerLeave`,[`pointerout`,`pointerover`]),St(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),St(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),St(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),St(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(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){Xr(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){Xr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[lt];n===void 0&&(n=t[lt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,bt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(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,!un||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 wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=ht(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}sn(function(){var r=a,i=tn(n),o=[];a:{var s=qr.get(e);if(s!==void 0){var c=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:c=zn;break;case`focusin`:u=`focus`,c=An;break;case`focusout`:u=`blur`,c=An;break;case`beforeblur`:case`afterblur`:c=An;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`:c=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Vn;break;case Br:case Vr:case Hr:c=jn;break;case Kr:c=Hn;break;case`scroll`:case`scrollend`:c=Cn;break;case`wheel`:c=Un;break;case`copy`:case`cut`:case`paste`:c=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Bn;break;case`toggle`:case`beforetoggle`:c=Wn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;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=cn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==en&&(u=n.relatedTarget||n.fromElement)&&(ht(u)||u[ct]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?ht(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:_t(c),h=u==null?s:_t(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,ht(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=Dd,p=c,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;c!==null&&Od(o,s,c,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(s=r?_t(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=ur;else if(ir(s))if(dr)v=br;else{v=vr;var y=_r}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&Yt(r.elementType)&&(v=ur):v=yr;if(v&&=v(e,r)){ar(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Vt(s,`number`,s.value)}switch(y=r?_t(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(o,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(o,n,i)}var b;if(Kn)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 er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=Ed(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(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=cn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=cn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(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=cn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9
+ `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Gt(e,``+r);break;case`className`:kt(e,`class`,r);break;case`tabIndex`:kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:kt(e,n,r);break;case`style`:Jt(e,r,a);break;case`data`:if(t!==`object`){kt(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=Qt(``+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 a==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(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=Qt(``+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`:Q(`beforetoggle`,e),Q(`toggle`,e),Ot(e,`popover`,r);break;case`xlinkActuate`:At(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:At(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:At(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:At(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ot(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=Xt.get(n)||n,Ot(e,n,r))}}function Nd(e,t,n,r,i,a){switch(n){case`style`:Jt(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Gt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!xt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[st]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ot(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`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:$(e,t,a,o,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=a=o=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:o=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(s(137,t));break;default:$(e,t,r,d,n,null)}}Bt(e,a,c,l,u,o,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=o=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:o=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=a,n=o,e.multiple=!!r,t==null?n!=null&&Ht(e,!!r,n,!0):Ht(e,!!r,t,!1);return;case`textarea`:for(o in Q(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(o)&&(c=n[o],c!=null))switch(o){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(s(91));break;default:$(e,t,o,c,n,null)}Wt(e,r,i,a);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:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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(s(137,t));default:$(e,t,u,r,n,null)}return;default:if(Yt(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&&$(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 i=null,a=null,o=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)||$(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`:a=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:o=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(s(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}zt(e,o,c,l,u,d,a,i);return;case`select`:for(a in m=o=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||$(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:o=a;default:a!==l&&$(e,t,i,a,r,l)}t=c,n=o,r=m,p==null?!!r!=!!n&&(t==null?Ht(e,!!n,n?[]:``,!1):Ht(e,!!n,t,!0)):Ht(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(s(91));break;default:i!==a&&$(e,t,o,i,r,a)}Ut(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:$(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:$(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)&&$(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(s(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(Yt(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)&&$(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||$(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[pt]||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),mt(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[pt])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(s(452));return e;case`head`:if(e=t.head,!e)throw Error(s(453));return e;case`body`:if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mt(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=N.d;N.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=bu();return e||t}function yf(e){var t=gt(e);t!==null&&t.tag===5&&t.type===`form`?Cs(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=Rt(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),yt(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="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(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),yt(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="`+Rt(r)+`"][href="`+Rt(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),yt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=vt(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`);yt(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=vt(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`),yt(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=vt(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`),yt(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 i=(i=ce.current)?gf(i):null;if(!i)throw Error(s(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=vt(i).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 a=vt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.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),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(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=vt(i).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(s(444,e))}}function Af(e){return`href="`+Rt(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),yt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Rt(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~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,yt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),yt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,yt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),yt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(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[pt]||a[ot]||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,yt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),yt(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:ie,_currentValue2:ie,_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=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(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=ci(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function tp(e){return e?(e=oi,e):oi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(hu(n,e,t),Ua(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=ri(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=tt(t);var n=ri(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,up(e,t,n,r)}finally{N.p=a,M.T=i}}function lp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,up(e,t,n,r)}finally{N.p=a,M.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(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=gt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}rd(a),!(q&6)&&(tu=Ee()+500,id(0,!1))}}break;case 31:case 13:s=ri(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=tn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ht(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(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(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me: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=gt(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=ht(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,it(e.priority,function(){op(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,it(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);en=r,n.target.dispatchEvent(r),en=null}else return t=gt(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=gt(n);a!==null&&(e.splice(t,3),t-=3,xs(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[st]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[st]||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(s(409));var n=t.current;np(n,pu(),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),bu(),t[ct]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=rt();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=r.version;if(Lp!==`19.2.7`)throw Error(s(527,Lp,`19.2.7`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(s(188)):(e=Object.keys(e).join(`,`),Error(s(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Fe=zp.inject(Rp),Ie=zp}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(s(299));var n=!1,r=``,i=Ws,a=Gs,o=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,a,o,Pp),e[ct]=t.current,Sd(e),new Fp(t)}})),c=e(((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=s()})),l=n(),u=c(),d=e((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})),f=e(((e,t)=>{t.exports=d()}))(),p=new URL(`/assets/logo_novo_azul-BBx5pA2B.png`,``+import.meta.url).href;function m({filters:e,filtersActive:t=!1,lastUpdatedAt:n,loading:r,locale:i,onLocaleChange:a,onRefresh:o,repositoryName:s,settings:c,title:u}){let[d,m]=(0,l.useState)(!1),[g,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(!1),T=i===`pt-BR`?{filters:`Filtros`,language:`Idioma`,refresh:`Atualizar`,refreshing:`Atualizando…`,settings:`Configurações`,updated:`Atualizado`,waiting:`Aguardando atualização`}:{filters:`Filters`,language:`Language`,refresh:`Refresh`,refreshing:`Refreshing…`,settings:`Settings`,updated:`Updated`,waiting:`Waiting for refresh`},E=n===null?T.waiting:`${T.updated} ${new Intl.DateTimeFormat(i,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(n))}`,ee=e=>{a(e),S(!1)},D=s?.includes(`/`)?`https://github.com/${s}`:null;return(0,f.jsxs)(`nav`,{"aria-label":`${s?`${u} ${s}`:u} menu`,className:`dashboard-header`,children:[(0,f.jsxs)(`div`,{className:`dashboard-header-brand`,children:[(0,f.jsxs)(`strong`,{children:[(0,f.jsx)(`span`,{children:u}),s?D?(0,f.jsxs)(`a`,{"aria-label":`Abrir ${s} no GitHub`,className:`dashboard-header-repository`,href:D,rel:`noreferrer`,target:`_blank`,children:[(0,f.jsx)(v,{}),(0,f.jsx)(`span`,{children:s})]}):(0,f.jsxs)(`span`,{className:`dashboard-header-repository`,children:[(0,f.jsx)(v,{}),(0,f.jsx)(`span`,{children:s})]}):null]}),(0,f.jsx)(`small`,{children:E})]}),(0,f.jsx)(`img`,{alt:`ZAIP`,className:`dashboard-header-logo`,src:p}),(0,f.jsxs)(`div`,{className:`dashboard-header-actions`,children:[(0,f.jsx)(`button`,{"aria-label":T.refresh,className:`dashboard-header-icon dashboard-header-refresh`,disabled:r,onClick:o,type:`button`,children:(0,f.jsx)(_,{})}),(0,f.jsxs)(`div`,{className:`dashboard-header-anchor dashboard-header-filter-action`,children:[(0,f.jsxs)(`button`,{className:`dashboard-header-button${d||t?` is-active`:``}`,onClick:()=>{m(e=>!e),S(!1),w(!1)},type:`button`,children:[(0,f.jsx)(y,{}),` `,T.filters]}),d?(0,f.jsx)(`div`,{className:`dashboard-header-popup dashboard-header-filter-popup`,children:e}):null]}),(0,f.jsxs)(`div`,{className:`dashboard-header-anchor dashboard-header-locale-action`,children:[(0,f.jsxs)(`button`,{className:`dashboard-header-button${g?` is-active`:``}`,onClick:()=>{S(e=>!e),m(!1),w(!1)},type:`button`,children:[(0,f.jsx)(h,{locale:i}),i===`pt-BR`?`PT-BR`:`EN-US`,(0,f.jsx)(b,{})]}),g?(0,f.jsxs)(`div`,{className:`dashboard-header-popup dashboard-header-locale-popup`,children:[(0,f.jsxs)(`button`,{onClick:()=>ee(`pt-BR`),type:`button`,children:[(0,f.jsx)(h,{locale:`pt-BR`}),` Português do Brasil`,i===`pt-BR`?(0,f.jsx)(`span`,{children:`✓`}):null]}),(0,f.jsxs)(`button`,{onClick:()=>ee(`en-US`),type:`button`,children:[(0,f.jsx)(h,{locale:`en-US`}),` English`,i===`en-US`?(0,f.jsx)(`span`,{children:`✓`}):null]})]}):null]}),c===void 0?null:(0,f.jsxs)(`div`,{className:`dashboard-header-anchor dashboard-header-settings-action`,children:[(0,f.jsx)(`button`,{"aria-label":T.settings,className:`dashboard-header-icon${C?` is-active`:``}`,onClick:()=>{w(e=>!e),m(!1),S(!1)},type:`button`,children:(0,f.jsx)(x,{})}),C?(0,f.jsxs)(`div`,{className:`dashboard-header-popup dashboard-header-settings-popup`,children:[(0,f.jsxs)(`div`,{className:`dashboard-header-mobile-settings`,children:[(0,f.jsx)(`small`,{children:E}),(0,f.jsxs)(`button`,{disabled:r,onClick:o,type:`button`,children:[(0,f.jsx)(_,{}),` `,r?T.refreshing:T.refresh]}),(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:T.language}),(0,f.jsxs)(`select`,{onChange:e=>a(e.target.value),value:i,children:[(0,f.jsx)(`option`,{value:`pt-BR`,children:`Português do Brasil`}),(0,f.jsx)(`option`,{value:`en-US`,children:`English`})]})]}),(0,f.jsxs)(`div`,{className:`dashboard-header-mobile-filters`,children:[(0,f.jsx)(`strong`,{children:T.filters}),e]})]}),(0,f.jsx)(`div`,{className:`dashboard-header-settings-content`,children:c})]}):null]})]})]})}function h({locale:e}){return e===`pt-BR`?(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`dashboard-header-flag`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`rect`,{fill:`#18864b`,height:`24`,rx:`5`,width:`24`}),(0,f.jsx)(`path`,{d:`m12 3.8 8.2 8.2L12 20.2 3.8 12 12 3.8Z`,fill:`#f6d64a`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,fill:`#1b4f9c`,r:`4.2`}),(0,f.jsx)(`path`,{d:`M8.8 11.2c1.9-1 4.5-1 6.4 0`,fill:`none`,stroke:`#fff`,strokeWidth:`.8`})]}):(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`dashboard-header-flag`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`rect`,{fill:`#fff`,height:`24`,rx:`5`,width:`24`}),(0,f.jsx)(`path`,{d:`M0 3h24v3H0Zm0 6h24v3H0Zm0 6h24v3H0Z`,fill:`#bd3d44`}),(0,f.jsx)(`path`,{d:`M0 0h11v11H0Z`,fill:`#192f6b`})]})}function g({children:e,className:t=``}){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,className:`dashboard-header-svg ${t}`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,children:e})}function _(){return(0,f.jsxs)(g,{children:[(0,f.jsx)(`path`,{d:`M21 12a9 9 0 0 1-15.2 6.5L3 16`}),(0,f.jsx)(`path`,{d:`M3 21v-5h5`}),(0,f.jsx)(`path`,{d:`M3 12a9 9 0 0 1 15.2-6.5L21 8`}),(0,f.jsx)(`path`,{d:`M21 3v5h-5`})]})}function v(){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,className:`dashboard-header-github`,viewBox:`0 0 24 24`,children:(0,f.jsx)(`path`,{d:`M12 2C6.48 2 2 6.58 2 12.23c0 4.52 2.87 8.35 6.84 9.71.5.1.68-.22.68-.49 0-.24-.01-1.05-.02-1.9-2.78.62-3.37-1.2-3.37-1.2-.45-1.18-1.11-1.49-1.11-1.49-.91-.64.07-.63.07-.63 1 .07 1.53 1.06 1.53 1.06.9 1.57 2.34 1.12 2.91.86.09-.66.35-1.12.64-1.37-2.22-.26-4.56-1.14-4.56-5.06 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.3.1-2.71 0 0 .84-.28 2.75 1.05A9.32 9.32 0 0 1 12 6.97c.85 0 1.7.12 2.5.34 1.91-1.33 2.75-1.05 2.75-1.05.55 1.41.2 2.45.1 2.71.64.72 1.03 1.63 1.03 2.75 0 3.93-2.34 4.79-4.57 5.05.36.32.68.94.68 1.9 0 1.38-.01 2.49-.01 2.83 0 .27.18.59.69.49A10.25 10.25 0 0 0 22 12.23C22 6.58 17.52 2 12 2Z`,fill:`currentColor`})})}function y(){return(0,f.jsx)(g,{children:(0,f.jsx)(`path`,{d:`M3 6h18M7 12h10m-7 6h4`})})}function b(){return(0,f.jsx)(g,{className:`dashboard-header-chevron`,children:(0,f.jsx)(`path`,{d:`m6 9 6 6 6-6`})})}function x(){return(0,f.jsxs)(g,{children:[(0,f.jsx)(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.09a2 2 0 0 1 1 1.74v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}var S=o();function C({rows:e,columns:t,rowKey:n,onRowClick:r,defaultSort:i=null,sortable:a=!1,showColumnInfo:o=!1,scrollLabel:s,locale:c=`pt-BR`,emptyMessage:u=c===`pt-BR`?`Nenhum dado disponível.`:`No data available.`}){let[d,p]=(0,l.useState)(i),[m,h]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(m===null)return;let e=()=>h(null);return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[m]);let g=(0,l.useMemo)(()=>t.filter(e=>!e.hidden),[t]),_=(0,l.useMemo)(()=>{if(d===null)return e;let n=t.find(e=>e.key===d.key);return n?[...e].sort((e,t)=>{let r=E(n.sortValue?.(e)??T(n.render(e)),n.sortValue?.(t)??T(n.render(t)));return d.direction===`asc`?r:-r}):e},[t,e,d]);return e.length===0?(0,f.jsx)(`p`,{className:`ui-empty`,children:u}):(0,f.jsxs)(`div`,{"aria-label":s,className:`ui-table-wrap`,role:s?`region`:void 0,tabIndex:s?0:void 0,children:[(0,f.jsxs)(`table`,{className:`ui-table`,children:[(0,f.jsx)(`thead`,{children:(0,f.jsx)(`tr`,{children:g.map(e=>(0,f.jsx)(`th`,{"aria-sort":d?.key===e.key?d.direction===`asc`?`ascending`:`descending`:`none`,className:e.align===`right`?`is-number`:void 0,children:e.label&&(a||o)?(0,f.jsxs)(`span`,{className:`ui-table-heading`,children:[(0,f.jsx)(`span`,{className:`ui-table-label`,children:e.label}),a?(0,f.jsx)(`button`,{"aria-label":c===`pt-BR`?`Ordenar por ${e.label}`:`Sort by ${e.label}`,className:`ui-table-sort`,onClick:()=>p(t=>({key:e.key,direction:t?.key===e.key&&t.direction===`asc`?`desc`:`asc`})),type:`button`,children:(0,f.jsx)(`span`,{"aria-hidden":`true`,className:`ui-table-sort-indicator`,children:d?.key===e.key?d.direction===`asc`?`↑`:`↓`:`↕`})}):null,o?(0,f.jsx)(`button`,{"aria-label":c===`pt-BR`?`Informação sobre ${e.label}`:`Information about ${e.label}`,className:`ui-table-info`,onBlur:()=>h(null),onFocus:t=>w(t.currentTarget,e.description??ee(e.label,c),h),onMouseEnter:t=>w(t.currentTarget,e.description??ee(e.label,c),h),onMouseLeave:()=>h(null),type:`button`,children:`i`}):null]}):e.label},e.key))})}),(0,f.jsx)(`tbody`,{children:_.map(e=>(0,f.jsx)(`tr`,{className:r===void 0?void 0:`ui-table-row-action`,onClick:r===void 0?void 0:()=>r(e),onKeyDown:r===void 0?void 0:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r(e))},tabIndex:r===void 0?void 0:0,children:g.map(t=>(0,f.jsx)(`td`,{className:t.align===`right`?`is-number`:void 0,children:t.render(e)},t.key))},n(e)))}),g.some(e=>e.footer!==void 0)?(0,f.jsx)(`tfoot`,{children:(0,f.jsx)(`tr`,{children:g.map(e=>(0,f.jsx)(`td`,{className:e.align===`right`?`is-number`:void 0,children:e.footer},e.key))})}):null]}),m&&typeof document<`u`?(0,S.createPortal)((0,f.jsx)(`div`,{className:`ui-table-tooltip`,role:`tooltip`,style:{bottom:m.bottom,left:m.left,top:m.top},children:m.text}),document.body):null]})}function w(e,t,n){let r=e.getBoundingClientRect();n({text:t,left:Math.min(Math.max(r.left+r.width/2,176),window.innerWidth-176),...window.innerHeight-r.bottom<260?{bottom:window.innerHeight-r.top+9}:{top:r.bottom+9}})}function T(e){return typeof e==`number`||typeof e==`string`?e:Array.isArray(e)?e.map(T).filter(Boolean).join(` `):e&&typeof e==`object`&&`props`in e?T(e.props?.children??null):null}function E(e,t){return e===null?t===null?0:1:t===null?-1:typeof e==`number`&&typeof t==`number`?e-t:new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}).compare(String(e),String(t))}function ee(e,t){let n=e.toLocaleLowerCase(t);return t===`pt-BR`?`Mostra ${n} para cada linha. Clique no título para ordenar em ordem crescente ou decrescente.`:`Shows ${n} for each row. Click the column title to sort in ascending or descending order.`}function D(e,t=`pt-BR`){return e===null?`0`:e>=36e5?`${new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e/36e5)} h`:e>=6e4?`${Math.round(e/6e4)} min`:`${Math.round(e/1e3)} ${t===`pt-BR`?`seg`:`sec`}`}function te(e,t=`pt-BR`){return e===null?`0`:e<36e5?D(e,t):`${new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e/36e5)} h`}function O(e,t=`pt-BR`,n=1){if(e===null)return`0`;let r=[{threshold:0x38d7ea4c68000,suffix:`Q`},{threshold:0xe8d4a51000,suffix:`T`},{threshold:1e9,suffix:`B`},{threshold:1e6,suffix:`M`},{threshold:1e3,suffix:`mil`}].find(({threshold:t})=>Math.abs(e)>=t);return r?`${new Intl.NumberFormat(t,{maximumFractionDigits:n}).format(e/r.threshold)} ${r.suffix}`:new Intl.NumberFormat(t,{notation:`compact`,maximumFractionDigits:n}).format(e)}function ne(e,t=`pt-BR`,n){return e===null?`0`:new Intl.NumberFormat(t,{maximumFractionDigits:n}).format(e)}function k(e,t,n=`pt-BR`){return e===null?`0`:new Intl.NumberFormat(n,{style:`currency`,currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function re(e,t=`pt-BR`){return e===null?t===`pt-BR`?`indisponível`:`unavailable`:new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(e))}function A(e,t=`pt-BR`){return new Intl.NumberFormat(t,{style:`percent`,maximumFractionDigits:1}).format(e)}function j({ariaLabel:e,metrics:t}){return(0,f.jsx)(`section`,{"aria-label":e,className:`period-average-summary`,children:(0,f.jsx)(`div`,{className:`period-average-grid`,children:t.map(e=>(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{children:e.label}),(0,f.jsx)(`strong`,{children:e.value})]},e.label))})})}function M({details:e,locale:t,onClose:n}){let r=se(t),i=e.kind===`change`||e.kind===`decision`?e.row.title:e.row.id;return(0,S.createPortal)((0,f.jsx)(`dialog`,{className:`operations-status-dialog-backdrop`,onMouseDown:e=>e.currentTarget===e.target&&n(),open:!0,children:(0,f.jsxs)(`section`,{"aria-label":`${r.details} ${oe(e.kind,t)}`,"aria-modal":`true`,className:`operations-status-dialog operations-entity-details`,role:`dialog`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:oe(e.kind,t)}),(0,f.jsx)(`h2`,{children:i}),(0,f.jsx)(`p`,{children:e.row.id})]}),(0,f.jsx)(`button`,{"aria-label":t===`pt-BR`?`Fechar`:`Close`,onClick:n,type:`button`,children:`×`})]}),(0,f.jsxs)(`div`,{className:`operations-entity-details-scroll`,children:[e.kind===`change`?(0,f.jsx)(N,{locale:t,row:e.row}):null,e.kind===`decision`?(0,f.jsx)(ie,{locale:t,row:e.row}):null,e.kind===`execution`?(0,f.jsx)(P,{locale:t,row:e.row}):null,e.kind===`run`?(0,f.jsx)(ae,{locale:t,row:e.row}):null]})]})}),document.body)}function N({row:e,locale:t}){let n=se(t);return(0,f.jsx)(F,{items:[[n.status,e.status],[n.risk,e.risk],[n.origin,I(e.source)],[n.created,re(e.created_at,t)],[n.tasks,String(e.task_ids.length)],[n.requirements,L(e.requirement_ids)],[n.acceptanceCriteria,L(e.acceptance_ids)],[n.result,e.result??`—`],[n.file,e.artifact_path]]})}function ie({row:e,locale:t}){let n=se(t);return(0,f.jsx)(F,{items:[[n.origin,e.origin],[n.scopeType,e.scope_type],[n.scope,e.scope_id],[n.created,re(e.created_at,t)],[n.file,e.artifact_path]]})}function P({row:e,locale:t}){let n=se(t);return(0,f.jsx)(F,{items:[[n.status,e.status],[n.workStatus,e.work_status],[n.origin,I(e.origin)],[n.created,re(e.created_at,t)],[n.tasksInDag,String(e.dag.nodes.length)],[t===`pt-BR`?`Chamadas do agente orquestrador`:`Orchestrator agent calls`,String(e.orchestrator_run_count)],[t===`pt-BR`?`Chamadas de subagentes`:`Subagent calls`,String(e.subagent_run_count)],[t===`pt-BR`?`Tasks finalizadas`:`Finalized Tasks`,`${e.finalized_task_count}/${e.task_count} (${e.finalizer_run_count} ${t===`pt-BR`?`chamadas finalizadoras`:`finalizer calls`})`],[n.topologicalOrder,L(e.dag.topological_order)],[n.dependencies,e.dag.nodes.map(e=>`${e.task_id}: ${L(e.depends_on)}`).join(`
10
+ `)||`—`],[n.result,e.result??`—`],[n.file,e.artifact_path]]})}function ae({row:e,locale:t}){let n=se(t);return(0,f.jsx)(F,{items:[[n.status,e.status],[n.phase,e.phase],[n.entrypoint,e.entrypoint],[n.type,e.work_type],[t===`pt-BR`?`Tipo da chamada`:`Call type`,e.run_kind===`run`?`Run`:`Sub-Run`],[t===`pt-BR`?`Propósito`:`Purpose`,e.run_purpose],[t===`pt-BR`?`Exige finalizador`:`Requires finalizer`,e.requires_finalizer?`sim`:`não`],[t===`pt-BR`?`Run pai`:`Parent Run`,e.parent_run_id??`—`],[n.client,e.client],[n.agent,e.agent_name],[n.provider,e.provider??`—`],[t===`pt-BR`?`Modelo planejado`:`Planned model`,e.model],[t===`pt-BR`?`Effort planejado`:`Planned effort`,e.reasoning_effort??`—`],[t===`pt-BR`?`Modelo efetivo`:`Effective model`,e.effective_config_mixed?t===`pt-BR`?`Misto`:`Mixed`:e.effective_model??`—`],[t===`pt-BR`?`Effort efetivo`:`Effective effort`,e.effective_config_mixed?t===`pt-BR`?`Misto`:`Mixed`:e.effective_reasoning_effort??`—`],[`Task`,e.task_id??`—`],[`SPEC`,e.spec_id??`—`],[`PRD`,e.prd_id??`—`],[`Change`,e.change_id??`—`],[`Execution`,e.execution_id??`—`],[n.start,re(e.started_at,t)],[n.end,re(e.finished_at,t)],[n.duration,D(e.duration_ms,t)],[`Tokens`,O(e.usage.total.tokens.total,t)],[n.costBrl,k(e.usage.total.cost.brl,`BRL`,t)],[n.costUsd,k(e.usage.total.cost.usd,`USD`,t)],[n.file,e.artifact_path]]})}function F({items:e}){return(0,f.jsx)(`dl`,{className:`operations-entity-detail-grid`,children:e.map(([e,t])=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`dt`,{children:e}),(0,f.jsx)(`dd`,{children:t})]},e))})}function I(e){return e.type===`task`?`Task: ${e.task_id}`:e.type===`spec`?`SPEC: ${e.spec_id}`:e.type===`interaction`?`Conversation: ${e.conversation_id}`:`PRD: ${e.prd_id}${`spec_id`in e&&e.spec_id?` · SPEC: ${e.spec_id}`:``}`}function L(e){return e.length===0?`—`:e.join(`, `)}function oe(e,t){return(t===`pt-BR`?{change:`Mudança`,decision:`Decisão`,execution:`Execução`,run:`Run`}:{change:`Change`,decision:`Decision`,execution:`Execution`,run:`Run`})[e]}function se(e){return e===`pt-BR`?{details:`Detalhes de`,status:`Status`,risk:`Risco`,origin:`Origem`,created:`Criada`,tasks:`Tasks`,requirements:`Requisitos`,acceptanceCriteria:`Critérios de aceite`,result:`Resultado`,file:`Arquivo`,scopeType:`Tipo de escopo`,scope:`Escopo`,workStatus:`Status do trabalho`,tasksInDag:`Tasks na DAG`,topologicalOrder:`Ordem topológica`,dependencies:`Dependências`,phase:`Fase`,entrypoint:`Entrada`,type:`Tipo`,client:`Cliente`,agent:`Agente`,provider:`Provider`,model:`Modelo`,start:`Início`,end:`Fim`,duration:`Duração`,costBrl:`Custo BRL`,costUsd:`Custo USD`}:{details:`Details for`,status:`Status`,risk:`Risk`,origin:`Origin`,created:`Created`,tasks:`Tasks`,requirements:`Requirements`,acceptanceCriteria:`Acceptance criteria`,result:`Result`,file:`File`,scopeType:`Scope type`,scope:`Scope`,workStatus:`Work status`,tasksInDag:`Tasks in DAG`,topologicalOrder:`Topological order`,dependencies:`Dependencies`,phase:`Phase`,entrypoint:`Entrypoint`,type:`Type`,client:`Client`,agent:`Agent`,provider:`Provider`,model:`Model`,start:`Start`,end:`End`,duration:`Duration`,costBrl:`Cost BRL`,costUsd:`Cost USD`}}function ce(e){let t=new Map;for(let n of e)n.task_id===null&&t.set(n.conversation_id,[...t.get(n.conversation_id)??[],n]);return[...t.entries()].map(([e,t])=>{let n=[...t].sort((e,t)=>t.started_at.localeCompare(e.started_at))[0],r=t.map(e=>e.duration_ms).filter(e=>e!==null);return{id:e,latest_started_at:n.started_at,run_count:t.length,status:n.status,duration_ms:r.length===0?null:r.reduce((e,t)=>e+t,0),models:[...new Set(t.map(e=>e.effective_model??e.model).filter(le))].sort()}}).sort((e,t)=>t.latest_started_at.localeCompare(e.latest_started_at))}function le(e){return e!==null&&e.trim()!==``&&e.toLowerCase()!==`unknown`}function ue(e,t){return e.map((e,n)=>({row:e,index:n,timestamp:Date.parse(t(e)??``)})).sort((e,t)=>{let n=Number.isFinite(e.timestamp)?e.timestamp:-1/0;return(Number.isFinite(t.timestamp)?t.timestamp:-1/0)-n||e.index-t.index}).map(({row:e})=>e)}function de({rows:e,locale:t}){let[n,r]=(0,l.useState)(null);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(C,{columns:[{key:`created`,label:`Criada`,render:e=>re(e.created_at)},{key:`title`,label:`Change`,render:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:e.title}),(0,f.jsx)(`small`,{children:e.id})]})},{key:`status`,label:`Status`,render:e=>(0,f.jsx)(be,{status:e.status})},{key:`risk`,label:`Risco`,render:e=>(0,f.jsx)(xe,{risk:e.risk})},{key:`tasks`,label:`Tasks`,render:e=>e.task_ids.length,align:`right`},{key:`path`,label:`Arquivo`,render:e=>e.artifact_path}],locale:t,rowKey:e=>e.id,onRowClick:r,rows:ue(e,e=>e.created_at),showColumnInfo:!0,sortable:!0}),n?(0,f.jsx)(M,{details:{kind:`change`,row:n},locale:t,onClose:()=>r(null)}):null]})}function fe({rows:e,locale:t}){let[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)(`all`),o=ue(e.filter(e=>i===`all`||e.kind===i),e=>e.created_at);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`operations-execution-table`,children:[(0,f.jsx)(`div`,{className:`operations-toolbar operations-run-kind-toolbar`,children:(0,f.jsx)(`nav`,{"aria-label":t===`pt-BR`?`Tipo de execução`:`Execution type`,children:[`all`,`interaction`,`delivery`].map(e=>(0,f.jsx)(`button`,{className:i===e?`is-active`:void 0,onClick:()=>a(e),type:`button`,children:pe(e,t)},e))})}),(0,f.jsx)(C,{columns:[{key:`created`,label:`Data de criação`,render:e=>re(e.created_at)},{key:`id`,label:t===`pt-BR`?`Execução`:`Execution`,render:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:pe(e.kind??`delivery`,t)}),(0,f.jsx)(`small`,{children:e.id})]})},{key:`status`,label:`Status`,render:e=>(0,f.jsx)(be,{status:e.status})},{key:`origin`,label:`Origem`,render:e=>(0,f.jsx)(Se,{entrypoint:e.origin.type===`interaction`?`conversation`:e.origin.type})},{key:`duration`,label:t===`pt-BR`?`Tempo de execução`:`Execution time`,render:e=>D(e.duration_ms),align:`right`},{key:`runs`,label:t===`pt-BR`?`Chamadas do agente orquestrador`:`Orchestrator agent calls`,render:e=>me(e.orchestrator_run_count),align:`right`},{key:`subruns`,label:t===`pt-BR`?`Chamadas de subagentes`:`Subagent calls`,render:e=>me(e.subagent_run_count),align:`right`},{key:`finalizers`,label:t===`pt-BR`?`Finalizadores`:`Finalizers`,render:e=>`${me(e.finalized_task_count)}/${me(e.task_count)}`,align:`right`},{key:`tasks`,label:t===`pt-BR`?`Tarefas`:`Tasks`,render:e=>me(e.task_count),align:`right`},{key:`specs`,label:`SPEC`,render:e=>me(e.spec_count),align:`right`},{key:`prds`,label:`PRD`,render:e=>me(e.prd_count),align:`right`}],locale:t,rowKey:e=>e.id,onRowClick:r,rows:o,showColumnInfo:!0,sortable:!0})]}),n?(0,f.jsx)(M,{details:{kind:`execution`,row:n},locale:t,onClose:()=>r(null)}):null]})}function pe(e,t){return t===`pt-BR`?e===`all`?`Todas`:e===`interaction`?`Interações`:`Execuções de entrega`:e===`all`?`All`:e===`interaction`?`Interactions`:`Delivery executions`}function me(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0}function he(e){return e.agent.toLowerCase()===`codex`?`codex`:e.agent_name||e.agent}function ge({rows:e,locale:t}){let[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)(`all`),o=ue(e.filter(e=>i===`all`||e.run_kind===i),e=>e.started_at);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`operations-toolbar operations-run-kind-toolbar`,children:(0,f.jsx)(`nav`,{"aria-label":t===`pt-BR`?`Tipo de chamada de agente`:`Agent call type`,children:[`all`,`run`,`subrun`].map(e=>(0,f.jsx)(`button`,{className:i===e?`is-active`:void 0,onClick:()=>a(e),type:`button`,children:e===`all`?t===`pt-BR`?`Todas`:`All`:e===`run`?t===`pt-BR`?`Chamadas do agente orquestrador`:`Orchestrator agent calls`:t===`pt-BR`?`Chamadas de subagentes`:`Subagent calls`},e))})}),(0,f.jsx)(C,{columns:[{key:`created`,label:`Data de criação`,render:e=>re(e.started_at)},{key:`id`,label:`Run`,render:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:e.id}),(0,f.jsx)(`small`,{children:e.parent_run_id??e.task_id??e.conversation_id})]})},{key:`kind`,label:t===`pt-BR`?`Tipo`:`Type`,render:e=>e.run_kind===`run`?`Run`:`Sub-Run`},{key:`agent`,label:t===`pt-BR`?`Agente`:`Agent`,render:e=>(0,f.jsx)(`strong`,{children:he(e)})},{key:`status`,label:`Status`,render:e=>(0,f.jsx)(be,{status:e.status})},{key:`origin`,label:t===`pt-BR`?`Origem`:`Origin`,render:e=>(0,f.jsx)(Se,{entrypoint:e.entrypoint})},{key:`phase`,label:t===`pt-BR`?`Propósito`:`Purpose`,render:e=>_e(e.run_purpose,t)},{key:`duration`,label:`Duração`,render:e=>D(e.duration_ms)}],locale:t,rowKey:e=>e.id,onRowClick:r,rows:o,showColumnInfo:!0,sortable:!0}),n?(0,f.jsx)(M,{details:{kind:`run`,row:n},locale:t,onClose:()=>r(null)}):null]})}function _e(e,t){return t===`pt-BR`?{intake:`Entrada`,orchestration:`Orquestração`,execution:`Execução`,review:`Revisão`,audit:`Auditoria`,finalization:`Finalização`}[e]:e}function ve({rows:e,locale:t}){let n=ce(e);return(0,f.jsx)(C,{columns:[{key:`created`,label:t===`pt-BR`?`Data e hora`:`Date and time`,render:e=>re(e.latest_started_at)},{key:`conversation`,label:t===`pt-BR`?`Conversa`:`Conversation`,render:e=>(0,f.jsx)(`strong`,{children:e.id})},{key:`status`,label:`Status`,render:e=>(0,f.jsx)(be,{status:e.status})},{key:`runs`,label:`Runs`,render:e=>e.run_count,align:`right`},{key:`duration`,label:t===`pt-BR`?`Duração`:`Duration`,render:e=>D(e.duration_ms)},{key:`models`,label:t===`pt-BR`?`Modelos`:`Models`,render:e=>e.models.length>0?e.models.join(`, `):`—`}],locale:t,rowKey:e=>e.id,rows:n,showColumnInfo:!0,sortable:!0})}function ye({rows:e,locale:t}){let[n,r]=(0,l.useState)(null);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(C,{columns:[{key:`date`,label:`Data de criação`,render:e=>re(e.created_at)},{key:`title`,label:`Decisão`,render:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:e.title}),(0,f.jsx)(`small`,{children:e.id})]})},{key:`origin`,label:`Origem`,render:e=>(0,f.jsx)(Ce,{origin:e.origin})},{key:`stage`,label:`Fase`,render:e=>(0,f.jsx)(we,{scopeType:e.scope_type})},{key:`scope`,label:`Escopo`,render:e=>`${e.scope_type}: ${e.scope_id}`}],locale:t,rowKey:e=>e.id,onRowClick:r,rows:ue(e,e=>e.created_at),showColumnInfo:!0,sortable:!0}),n?(0,f.jsx)(M,{details:{kind:`decision`,row:n},locale:t,onClose:()=>r(null)}):null]})}function be({status:e}){return(0,f.jsx)(`span`,{className:`operations-table-status is-${e}`,children:e})}function xe({risk:e}){return(0,f.jsx)(`span`,{className:`operations-table-risk is-${e}`,children:e})}function Se({entrypoint:e}){let t=e===`prd`?`PRD`:e===`spec`?`SPEC`:e===`task`?`Tarefa`:`Conversa`;return(0,f.jsx)(`span`,{className:`operations-table-entry is-${e}`,children:t})}function Ce({origin:e}){return(0,f.jsx)(`span`,{className:`operations-table-decision-origin is-${e}`,children:e})}function we({scopeType:e}){let t=e===`change`?`planning`:`execution`;return(0,f.jsx)(`span`,{className:`operations-table-stage is-${t}`,children:t===`planning`?`Planejamento`:`Execução`})}var Te=1e3,Ee=60*Te,De=60*Ee,Oe=24*De,ke=7*Oe,Ae=30*Oe,je=6*De,Me=new Set([`completed`,`blocked`,`failed`,`cancelled`]);function Ne(e,t,n,r=Date.now()){if(e===null||Me.has(t))return null;let i=Date.parse(e);if(!Number.isFinite(i))return null;let a=Math.max(0,r-i),o=t===`executing`||t===`verifying`;return{label:Pe(a,o,n),alert:o&&a>je}}function Pe(e,t,n){let r=n===`pt-BR`?`Há`:`Ago`,i=Fe(e,t,n);return n===`pt-BR`?`${r} ${i}`:`${i} ${r}`}function Fe(e,t,n){let r=Math.max(1,Math.round(e/Te));if(r<60)return`${r} seg`;let i=Math.round(e/Ee);if(i<60)return`${i} min`;let a=Math.round(e/De);if(a<24)return`${a} h`;let o=Math.round(e/Oe);if(t||o<7)return`${o} d`;let s=Math.round(e/ke);if(s<4)return n===`pt-BR`?`${s} sem`:`${s} w`;let c=Math.max(1,Math.round(e/Ae));return n===`pt-BR`?c===1?`1 mês`:`${c} meses`:`${c} mo`}function Ie(e,t){return Le(e,t,t===`pt-BR`?`Criada`:`Created`)}function Le(e,t,n){let r=new Date(e);return Number.isNaN(r.getTime())?``:`${n} · ${new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`medium`}).format(r)}`}function Re(e,t=`pt-BR`){return e>=36e5?`${Math.round(e/36e5)} h`:e>=6e4?`${Math.round(e/6e4)} min`:`${Math.round(e/1e3)} ${t===`pt-BR`?`seg`:`sec`}`}function ze(e){return`${Math.round(e/36e5)} h`}var Be=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ve=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),He={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Ue=(0,l.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,l.createElement)(`svg`,{ref:c,...He,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ve(`lucide`,i),...s},[...o.map(([e,t])=>(0,l.createElement)(e,t)),...Array.isArray(a)?a:[a]])),R=(e,t)=>{let n=(0,l.forwardRef)(({className:n,...r},i)=>(0,l.createElement)(Ue,{ref:i,iconNode:t,className:Ve(`lucide-${Be(e)}`,n),...r}));return n.displayName=`${e}`,n},We=R(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Ge=R(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Ke=R(`BadgeCheck`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),qe=R(`Boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Je=R(`CalendarDays`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M16 18h.01`,key:`kzsmim`}]]),Ye=R(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Xe=R(`CircleDot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Ze=R(`CircleGauge`,[[`path`,{d:`M15.6 2.7a10 10 0 1 0 5.7 5.7`,key:`1e0p6d`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M13.4 10.6 19 5`,key:`1kr7tw`}]]),Qe=R(`ClipboardList`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),$e=R(`Clock3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16.5 12`,key:`1aq6pp`}]]),et=R(`Coins`,[[`circle`,{cx:`8`,cy:`8`,r:`6`,key:`3yglwk`}],[`path`,{d:`M18.09 10.37A6 6 0 1 1 10.34 18`,key:`t5s6rm`}],[`path`,{d:`M7 6h1v4`,key:`1obek4`}],[`path`,{d:`m16.71 13.88.7.71-2.82 2.82`,key:`1rbuyh`}]]),tt=R(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),nt=R(`FileCheck2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m3 15 2 2 4-4`,key:`1lhrkk`}]]),rt=R(`FileCode2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m5 12-3 3 3 3`,key:`oke12k`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),it=R(`FileStack`,[[`path`,{d:`M21 7h-3a2 2 0 0 1-2-2V2`,key:`9rb54x`}],[`path`,{d:`M21 6v6.5c0 .8-.7 1.5-1.5 1.5h-7c-.8 0-1.5-.7-1.5-1.5v-9c0-.8.7-1.5 1.5-1.5H17Z`,key:`1059l0`}],[`path`,{d:`M7 8v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H15`,key:`16874u`}],[`path`,{d:`M3 12v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H11`,key:`k2ox98`}]]),at=R(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ot=R(`Gavel`,[[`path`,{d:`m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8`,key:`15492f`}],[`path`,{d:`m16 16 6-6`,key:`vzrcl6`}],[`path`,{d:`m8 8 6-6`,key:`18bi4p`}],[`path`,{d:`m9 7 8 8`,key:`5jnvq1`}],[`path`,{d:`m21 11-8-8`,key:`z4y7zo`}]]),st=R(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),ct=R(`Layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),lt=R(`LayoutGrid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ut=R(`Link2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),dt=R(`ListChecks`,[[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),ft=R(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),pt=R(`Route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),mt=R(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ht=R(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),gt=R(`Workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),_t=R(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),vt=R(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);function yt(e,t){return e.filter(e=>e.kind===`spec`&&e.parent_id===t)}function bt(e,t,n){let r=new Map(t.map(e=>[e.id,e]));return e.task_ids.map(e=>({id:e,task:r.get(e)??null,usage:n.get(e)}))}var xt={durationMs:null,tokens:null,costBrl:null};function St(e){return{durationMs:e.duration_ms,tokens:e.usage.total.coverage.tokens>0?e.usage.total.tokens.total:null,costBrl:e.usage.total.coverage.brl>0?e.usage.total.cost.brl:null}}function Ct({locale:e,usage:t}){return(0,f.jsx)(`dl`,{className:`operations-macro-usage-strip`,children:[{icon:(0,f.jsx)($e,{size:17}),label:e===`pt-BR`?`Tempo total`:`Total time`,value:t.durationMs===null?`—`:Re(t.durationMs,e)},{icon:(0,f.jsx)(vt,{size:17}),label:`Tokens`,value:O(t.tokens,e)},{icon:(0,f.jsx)(et,{size:17}),label:e===`pt-BR`?`Custo`:`Cost`,value:k(t.costBrl,`BRL`,e)}].map(e=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),(0,f.jsx)(`dt`,{children:e.label}),(0,f.jsx)(`dd`,{children:e.value})]},e.label))})}function wt({locale:e,usage:t}){let n=[t.durationMs===null?`—`:Re(t.durationMs,e),O(t.tokens,e),k(t.costBrl,`BRL`,e)];return(0,f.jsx)(`dl`,{className:`operations-macro-mini-usage`,children:(e===`pt-BR`?[`Tempo`,`Tokens`,`Custo`]:[`Time`,`Tokens`,`Cost`]).map((e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`dt`,{children:e}),(0,f.jsx)(`dd`,{children:n[t]})]},e))})}var Tt={"en-US":{draft:`Definition (PRD + Requirements)`,planned:`Planned (SPEC + Changes)`,executing:`Executing (Tasks)`,verifying:`Verifying (Tests + Review)`,completed:`Completed`,blocked:`Blocked`,failed:`Failed`,cancelled:`Cancelled`},"pt-BR":{draft:`Definição (PRD + Requisitos)`,planned:`Planejamento (SPEC + Mudanças)`,executing:`Execução (Tarefas)`,verifying:`Verificação (Testes + Revisão)`,completed:`Concluído`,blocked:`Bloqueado`,failed:`Falhado`,cancelled:`Cancelado`}};function Et(e,t){return Tt[t][e]}function Dt(e,t){return t===`en-US`?e===`lite`?`Lite`:e===`standard`?`Standard`:`Critical`:e===`lite`?`Leve`:e===`standard`?`Padrão`:`Crítico`}var Ot=[`task`,`spec`,`prd`];function kt(e,t){return t.find(t=>t.id===e.change_id)?.source.type??(e.spec_id===null?`task`:`spec`)}function At(e){return e===`task`?`Task-first`:e===`spec`?`SPEC`:`PRD`}function jt(e,t,n){return t===``||kt(e,n)===t}function Mt(){let[e,t]=(0,l.useState)(()=>Date.now());return(0,l.useEffect)(()=>{let e=window.setInterval(()=>t(Date.now()),1e3);return()=>window.clearInterval(e)},[]),e}function Nt(e){let[t,n]=(0,l.useState)(30),r=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let i=r.current;if(i===null||t>=e)return;let a=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&n(t=>Math.min(e,t+30))},{rootMargin:`320px 0px`});return a.observe(i),()=>a.disconnect()},[e,t]),{hasMore:t<e,sentinelRef:r,visibleCount:Math.min(t,e)}}function Pt(e){let t=new Map;for(let n of e){if(n.task_id===null||n.execution_id===null)continue;let e=t.get(n.task_id)??{durationMs:null,tokens:null,costBrl:null};t.set(n.task_id,{durationMs:Ft(e.durationMs,n.duration_ms),tokens:Ft(e.tokens,n.usage.total.tokens.total),costBrl:Ft(e.costBrl,n.usage.total.cost.brl)})}return t}function Ft(e,t){return e===null&&t===null?null:(e??0)+(t??0)}function It(e){return e.status===`planned`&&e.spec_id===null&&e.attempt_count===0&&e.started_at===null&&e.execution_started===!1}var Lt=[`definition`,`planning`,`ready`,`executing`,`verifying`,`completed`,`blocked`,`cancelled`,`failed`];function Rt(e,t){return t===`task`?e.kind===`task`:t===`standalone-task`?e.kind===`task`&&e.row.spec_id===null:t===`all`?e.kind===`prd`?!0:e.kind===`spec`?e.row.parent_id===null:e.row.spec_id===null:e.kind===t}function zt(e,t,n){let r=e.kind===`prd`?t.filter(t=>t.parent_id===e.id):[],i=new Set(r.map(e=>e.id)),a=new Set(e.task_ids);if(e.kind===`spec`)for(let t of n)t.spec_id===e.id&&a.add(t.id);else{for(let e of r)for(let t of e.task_ids)a.add(t);for(let e of n)e.spec_id!==null&&i.has(e.spec_id)&&a.add(e.id)}let o=n.filter(e=>a.has(e.id));return{completedSpecs:r.filter(Vt).length,totalSpecs:r.length,completedTasks:o.filter(e=>e.status===`completed`).length,totalTasks:o.length}}function Bt(e,t){let n=`Tasks ${t.completedTasks}/${t.totalTasks}`;return e===`prd`?`SPECs ${t.completedSpecs}/${t.totalSpecs} · ${n}`:n}function Vt(e){return e.lifecycle_status===`delivered`||e.work_status===`completed`}function Ht(e,t){return{"pt-BR":{definition:`Definição (PRD + Requisitos)`,planning:`Planejamento (SPEC + Change)`,ready:`Pronto para Executar`,executing:`Execução`,verifying:`Verificação`,completed:`Concluído`,blocked:`Bloqueado`,cancelled:`Cancelado`,failed:`Falhado`},"en-US":{definition:`Definition (PRDs)`,planning:`Planning`,ready:`Ready to Execute`,executing:`Executing`,verifying:`Verifying`,completed:`Completed`,blocked:`Blocked`,cancelled:`Cancelled`,failed:`Failed`}}[t][e]}function Ut(e){return e.status===`completed`?`completed`:e.status===`cancelled`?`cancelled`:e.status===`failed`?`failed`:e.status===`blocked`?`blocked`:e.is_active===!0||e.status===`executing`?`executing`:e.status===`verifying`?`verifying`:(e.attempt_count??0)>0||e.started_at!=null||e.execution_started===!0?`executing`:It(e)?`ready`:null}function Wt(e,t){if(e.lifecycle_status===`cancelled`||e.work_status===`cancelled`)return`cancelled`;if(e.work_status===`failed`)return`failed`;if(e.work_status===`blocked`)return`blocked`;if(e.lifecycle_status===`delivered`||e.work_status===`completed`)return`completed`;if(e.is_active||t.some(t=>e.task_ids.includes(t.id)&&t.is_active))return`executing`;if(e.lifecycle_status===`verifying`||e.work_status===`verifying`)return`verifying`;if(e.work_status===`executing`){let n=t.filter(t=>e.task_ids.includes(t.id));return n.some(e=>e.status===`verifying`)&&n.every(e=>e.status===`verifying`||e.status===`completed`)?`verifying`:`executing`}return e.lifecycle_status===`active`?`executing`:e.lifecycle_status===`ready`?`ready`:e.kind===`prd`&&e.lifecycle_status===`draft`?`definition`:`planning`}function Gt({label:e,locale:t,onClose:n,onOpenDocument:r,onOpenTrace:i,row:a,runs:o,specs:s,tasks:c}){let u=(0,l.useRef)(null),d=(0,l.useRef)(null),[p,m]=(0,l.useState)(e===`SPEC`?a:null),h=(0,l.useMemo)(()=>yt(s,a.id),[a.id,s]),g=(0,l.useMemo)(()=>Pt(o),[o]);(0,l.useEffect)(()=>{let e=u.current;if(e!==null)return e.open||e.showModal(),()=>{e.open&&e.close()}},[]);let _=e=>{d.current?.scrollTo({top:0}),m(e)},v=e===`PRD`&&p===null,y=p??a,b=bt(y,c,g);return(0,f.jsx)(`dialog`,{className:`operations-status-dialog-backdrop operations-macro-dialog-backdrop`,onCancel:e=>{e.preventDefault(),n()},onMouseDown:e=>{e.currentTarget===e.target&&n()},ref:u,children:(0,f.jsxs)(`section`,{"aria-label":`${t===`pt-BR`?`Detalhes do`:`Details for`} ${e}`,"aria-modal":`true`,className:`operations-macro-planning-dialog`,"data-kind":v?`prd`:`spec`,role:`dialog`,children:[(0,f.jsxs)(`header`,{className:`operations-macro-dialog-header`,children:[(0,f.jsxs)(`div`,{className:`operations-macro-heading`,children:[(0,f.jsx)(`span`,{className:`operations-macro-heading-icon`,"aria-hidden":`true`,children:v?(0,f.jsx)(ct,{size:23}):(0,f.jsx)(rt,{size:23})}),(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{className:`operations-macro-kicker`,children:[(0,f.jsx)(`span`,{children:v?`PRD`:`SPEC`}),(0,f.jsx)(`i`,{}),(0,f.jsx)(`span`,{children:Ht(Wt(y,c),t)})]}),(0,f.jsx)(`h2`,{children:y.title}),(0,f.jsx)(`p`,{title:y.id,children:y.id})]})]}),v&&r?(0,f.jsxs)(`button`,{className:`operations-macro-document-open`,onClick:()=>{n(),r(a.id)},type:`button`,children:[(0,f.jsx)(at,{"aria-hidden":`true`,size:16}),t===`pt-BR`?`Ler PRD completo`:`Read full PRD`]}):null,(0,f.jsx)(`button`,{"aria-label":t===`pt-BR`?`Fechar`:`Close`,className:`operations-macro-close`,onClick:n,type:`button`,children:(0,f.jsx)(_t,{"aria-hidden":`true`,size:20})})]}),(0,f.jsxs)(`div`,{className:`operations-macro-dialog-scroll`,ref:d,children:[e===`PRD`&&p!==null?(0,f.jsxs)(`button`,{className:`operations-macro-back`,onClick:()=>_(null),type:`button`,children:[(0,f.jsx)(We,{"aria-hidden":`true`,size:16}),(0,f.jsxs)(`span`,{children:[t===`pt-BR`?`Voltar ao PRD`:`Back to PRD`,(0,f.jsx)(`small`,{children:a.title})]})]}):null,(0,f.jsx)(Ct,{locale:t,usage:St(y)}),(0,f.jsx)(Kt,{locale:t,row:y}),v?(0,f.jsx)(Jt,{locale:t,onSelectSpec:_,specs:h,tasks:c}):(0,f.jsx)(Yt,{locale:t,onOpenTrace:i,row:y,tasks:b,...e===`PRD`?{parentPrd:a}:{}})]})]})})}function Kt({locale:e,row:t}){return(0,f.jsx)(`dl`,{className:`operations-macro-overview-cards`,children:[{icon:(0,f.jsx)(dt,{size:17}),label:`Tasks`,value:t.task_count},{icon:(0,f.jsx)(pt,{size:17}),label:`Runs`,value:t.run_count},{icon:(0,f.jsx)(st,{size:17}),label:e===`pt-BR`?`Execuções`:`Executions`,value:t.execution_count},{icon:(0,f.jsx)(Xe,{size:17}),label:e===`pt-BR`?`Estado`:`State`,value:qt(t.lifecycle_status,e)}].map(e=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),(0,f.jsx)(`dt`,{children:e.label}),(0,f.jsx)(`dd`,{children:e.value})]},e.label))})}function qt(e,t){return{"pt-BR":{draft:`Rascunho`,planned:`Planejado`,ready:`Pronto`,active:`Ativo`,executing:`Em execução`,verifying:`Em verificação`,delivered:`Entregue`,completed:`Concluído`,blocked:`Bloqueado`,failed:`Falhado`,cancelled:`Cancelado`},"en-US":{draft:`Draft`,planned:`Planned`,ready:`Ready`,active:`Active`,executing:`Executing`,verifying:`Verifying`,delivered:`Delivered`,completed:`Completed`,blocked:`Blocked`,failed:`Failed`,cancelled:`Cancelled`}}[t][e]??e}function Jt({locale:e,onSelectSpec:t,specs:n,tasks:r}){return(0,f.jsxs)(`section`,{className:`operations-macro-section operations-prd-specs`,children:[(0,f.jsx)(Xt,{count:n.length,description:e===`pt-BR`?`Selecione uma SPEC para ver suas Tasks e abrir a rastreabilidade completa.`:`Select a SPEC to see its Tasks and open the complete trace.`,icon:(0,f.jsx)(qe,{size:19}),title:e===`pt-BR`?`SPECs deste PRD`:`SPECs in this PRD`}),n.length>0?(0,f.jsx)(`div`,{className:`operations-prd-spec-grid`,children:n.map((n,i)=>(0,f.jsxs)(`button`,{onClick:()=>t(n),type:`button`,children:[(0,f.jsx)(`span`,{className:`operations-prd-spec-index`,children:String(i+1).padStart(2,`0`)}),(0,f.jsxs)(`div`,{className:`operations-prd-spec-copy`,children:[(0,f.jsx)(`span`,{children:Ht(Wt(n,r),e)}),(0,f.jsx)(`strong`,{children:n.title}),(0,f.jsx)(`code`,{title:n.id,children:n.id})]}),(0,f.jsx)(wt,{locale:e,usage:St(n)}),(0,f.jsxs)(`span`,{className:`operations-prd-spec-action`,children:[(0,f.jsxs)(`small`,{children:[n.task_count,` Tasks`]}),(0,f.jsx)(Ge,{"aria-hidden":`true`,size:18})]})]},n.id))}):(0,f.jsx)(Zt,{text:e===`pt-BR`?`Este PRD ainda não possui SPEC vinculada.`:`This PRD does not have a linked SPEC yet.`})]})}function Yt({locale:e,onOpenTrace:t,parentPrd:n,row:r,tasks:i}){return(0,f.jsxs)(f.Fragment,{children:[n?(0,f.jsxs)(`div`,{className:`operations-spec-parent`,children:[(0,f.jsx)(ct,{"aria-hidden":`true`,size:16}),(0,f.jsx)(`span`,{children:e===`pt-BR`?`Parte do PRD`:`Part of PRD`}),(0,f.jsx)(`strong`,{children:n.title})]}):null,(0,f.jsxs)(`section`,{className:`operations-macro-section operations-spec-tasks`,children:[(0,f.jsx)(Xt,{count:i.length,description:e===`pt-BR`?`Cada Task mantém sua telemetria e leva ao Trace completo do ciclo.`:`Each Task preserves its telemetry and opens the full lifecycle trace.`,icon:(0,f.jsx)(pt,{size:19}),title:e===`pt-BR`?`Fluxo de Tasks`:`Task flow`}),i.length>0?(0,f.jsx)(`div`,{className:`operations-spec-task-list`,children:i.map(({id:n,task:r,usage:i},a)=>(0,f.jsxs)(`button`,{onClick:()=>t(n),type:`button`,children:[(0,f.jsxs)(`span`,{className:`operations-spec-task-sequence`,children:[(0,f.jsx)(`i`,{}),String(a+1).padStart(2,`0`)]}),(0,f.jsxs)(`div`,{className:`operations-spec-task-copy`,children:[(0,f.jsx)(`span`,{children:r?Et(r.status,e):`Task`}),(0,f.jsx)(`strong`,{children:r?.title??n}),(0,f.jsx)(`code`,{title:n,children:n})]}),(0,f.jsx)(wt,{locale:e,usage:i??xt}),(0,f.jsxs)(`span`,{className:`operations-spec-task-action`,children:[e===`pt-BR`?`Abrir Trace`:`Open Trace`,(0,f.jsx)(Ge,{"aria-hidden":`true`,size:17})]})]},n))}):(0,f.jsx)(Zt,{text:e===`pt-BR`?`Esta SPEC ainda não possui Task materializada.`:`This SPEC does not have a materialized Task yet.`})]}),(0,f.jsxs)(`div`,{className:`operations-macro-document`,children:[(0,f.jsx)(at,{"aria-hidden":`true`,size:17}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:e===`pt-BR`?`Documento registrado`:`Registered document`}),(0,f.jsx)(`code`,{title:r.artifact_path,children:r.artifact_path})]})]})]})}function Xt({count:e,description:t,icon:n,title:r}){return(0,f.jsxs)(`header`,{className:`operations-macro-section-heading`,children:[(0,f.jsx)(`span`,{"aria-hidden":`true`,children:n}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h3`,{children:r}),(0,f.jsx)(`p`,{children:t})]}),(0,f.jsx)(`strong`,{children:e})]})}function Zt({text:e}){return(0,f.jsxs)(`div`,{className:`operations-macro-empty`,children:[(0,f.jsx)(rt,{"aria-hidden":`true`,size:21}),(0,f.jsx)(`p`,{children:e})]})}function Qt(e,t=new Date){let n=e.reduce((e,t)=>Math.min(e,Date.parse(t.created_at)),1/0),r=Number.isFinite(n)?new Date(n):t;return r.setDate(r.getDate()-1),{start:cn(r),end:cn(t)}}function $t(e,t=new Date){let n=rn(t),r=rn(t);if(e===`yesterday`)return r=an(n,-1),nn(r,r);if(e===`this-week`)return nn(an(n,-sn(n)),n);if(e===`last-week`){let e=an(n,-sn(n));return nn(an(e,-7),an(e,-1))}return e===`this-month`?nn(new Date(n.getFullYear(),n.getMonth(),1,12),n):e===`last-month`?nn(new Date(n.getFullYear(),n.getMonth()-1,1,12),new Date(n.getFullYear(),n.getMonth(),0,12)):e===`last-3-months`?nn(on(n,-3),n):e===`last-6-months`?nn(on(n,-6),n):e===`this-year`?nn(new Date(n.getFullYear(),0,1,12),n):e===`last-year`?nn(new Date(n.getFullYear()-1,0,1,12),new Date(n.getFullYear()-1,11,31,12)):nn(n,n)}function en(e,t){return tn(e,t)}function tn(e,t){if(e==null)return!1;let n=new Date(e);if(Number.isNaN(n.getTime()))return!1;let r=cn(n);return r>=t.start&&r<=t.end}function nn(e,t){return{start:cn(e),end:cn(t)}}function rn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),12)}function an(e,t){let n=new Date(e);return n.setDate(n.getDate()+t),n}function on(e,t){let n=e.getDate(),r=new Date(e.getFullYear(),e.getMonth()+t,1,12),i=new Date(r.getFullYear(),r.getMonth()+1,0,12).getDate();return r.setDate(Math.min(n,i)),r}function sn(e){return(e.getDay()+6)%7}function cn(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}var ln={"pt-BR":{all:`Todo o Período`,custom:`Personalizado`,today:`Hoje`,yesterday:`Ontem`,"this-week":`Esta Semana`,"last-week":`Semana Passada`,"this-month":`Este Mês`,"last-month":`Mês Passado`,"last-3-months":`Últimos 3 meses`,"last-6-months":`Últimos 6 meses`,"this-year":`Este Ano`,"last-year":`Último ano`},"en-US":{all:`All Time`,custom:`Custom`,today:`Today`,yesterday:`Yesterday`,"this-week":`This Week`,"last-week":`Last Week`,"this-month":`This Month`,"last-month":`Last Month`,"last-3-months":`Last 3 months`,"last-6-months":`Last 6 months`,"this-year":`This Year`,"last-year":`Last year`}},un=Object.keys(ln[`pt-BR`]);function dn({ariaLabelSuffix:e=``,dateRange:t,defaultDateRange:n,locale:r,onDateRangeChange:i,onPresetChange:a,preset:o}){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`label`,{className:`operations-toolbar-field operations-date-field`,children:[(0,f.jsx)(`span`,{children:r===`pt-BR`?`Data inicial`:`Start date`}),(0,f.jsx)(`input`,{"aria-label":`${r===`pt-BR`?`Data inicial`:`Start date`}${e}`,onInput:e=>{let n=e.currentTarget.value;i({start:n,end:n>t.end?n:t.end})},type:`date`,value:t.start})]}),(0,f.jsxs)(`label`,{className:`operations-toolbar-field operations-date-field`,children:[(0,f.jsx)(`span`,{children:r===`pt-BR`?`Data final`:`End date`}),(0,f.jsx)(`input`,{"aria-label":`${r===`pt-BR`?`Data final`:`End date`}${e}`,onInput:e=>{let n=e.currentTarget.value;i({start:n<t.start?n:t.start,end:n})},type:`date`,value:t.end})]}),(0,f.jsxs)(`label`,{className:`operations-toolbar-field operations-period-field`,children:[(0,f.jsx)(`span`,{children:r===`pt-BR`?`Período`:`Period`}),(0,f.jsx)(`select`,{"aria-label":`${r===`pt-BR`?`Período`:`Period`}${e}`,onChange:e=>{let r=e.target.value;if(r===`all`){a(r,n);return}if(r===`custom`){a(r,t);return}a(r,$t(r))},value:o,children:un.map(e=>(0,f.jsx)(`option`,{value:e,children:ln[r][e]},e))})]})]})}var fn={definition:`#a78bfa`,planning:`#3f6fbd`,ready:`#38bdf8`,executing:`#fbbf24`,verifying:`#f87171`,completed:`#34d399`,blocked:`#64748b`,cancelled:`#64748b`,failed:`#64748b`},pn={lite:`#60a5fa`,standard:`#fbbf24`,critical:`#f87171`},mn={empty:`#60a5fa`,structured:`#fbbf24`,rework:`#f87171`};function hn(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)/t.length}function gn(e){let t=null;for(let n of e){if(n.created_at===null)continue;let e=Date.parse(n.created_at);Number.isNaN(e)||(t===null||e>t.timestamp)&&(t={value:n.created_at,timestamp:e})}return t?.value??null}function _n(e,t,n){let r=new Map(e.map(e=>[e.id,{id:e.id,title:e.title,durationMs:null,tokens:null,costBrl:null,runCount:0}]));for(let e of t){if(e.phase!==`execution`||e.parent_run_id!==null||e.task_id===null)continue;let t=r.get(e.task_id);if(t===void 0)continue;t.runCount+=1,e.duration_ms!==null&&(t.durationMs=(t.durationMs??0)+e.duration_ms),e.usage.total.tokens.total!==null&&(t.tokens=(t.tokens??0)+e.usage.total.tokens.total);let i=n?n(e.id):e.usage.total.cost.brl;i!==null&&(t.costBrl=(t.costBrl??0)+i)}return[...r.values()]}function vn(e,t,n){return e.map(e=>{let r=new Set(e.run_ids),i=t.filter(t=>t.phase===`execution`&&(r.has(t.id)||(e.kind===`spec`?t.spec_id===e.id:t.prd_id===e.id)));return{id:e.id,title:e.title,durationMs:xn(i.map(e=>e.duration_ms)),tokens:xn(i.map(e=>e.usage.total.tokens.total)),costBrl:xn(i.map(e=>n?n(e.id):e.usage.total.cost.brl)),runCount:i.length}})}function yn(e,t){let n=t===`pt-BR`;return[{key:`empty`,label:n?`Sem tarefas`:`Without tasks`,color:mn.empty,count:e.filter(e=>e.task_count===0).length},{key:`structured`,label:n?`Com tarefas`:`With tasks`,color:mn.structured,count:e.filter(e=>e.task_count>0&&e.rework_run_count===0).length},{key:`rework`,label:n?`Com retrabalho`:`With rework`,color:mn.rework,count:e.filter(e=>e.rework_run_count>0).length}]}function bn(e,t){let n=e.reduce((e,t)=>e+(t.durationMs??0),0),r=t.reduce((e,t)=>e+(t.durationMs??0),0);return{durationMs:n,durationShare:r===0?0:n/r,runCount:e.reduce((e,t)=>e+t.runCount,0),tokens:xn(e.map(e=>e.tokens)),costBrl:xn(e.map(e=>e.costBrl))}}function xn(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)}function Sn({label:e,value:t,hint:n,featured:r=!1,onSelect:i}){let a=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(`strong`,{children:t}),(0,f.jsx)(`small`,{children:n})]});return i===void 0?(0,f.jsx)(`article`,{className:`operations-kpi${r?` is-featured`:``}`,children:a}):(0,f.jsx)(`button`,{"aria-pressed":r,className:`operations-kpi is-selectable${r?` is-featured`:``}`,onClick:i,type:`button`,children:a})}function Cn(e){let t=e===`pt-BR`;return{overview:t?`Visão geral`:`Overview`,tasks:t?`Tarefas`:`Tasks`,completedTasks:t?`concluídas`:`completed`,completedSpecs:t?`concluídas`:`completed`,completedPrds:t?`concluídos`:`completed`,totalExecutionTime:t?`Tempo total de execução`:`Total execution time`,totalRuns:t?`runs totais`:`total runs`,cost:t?`Custo`:`Cost`,showTerminal:t?`Mostrar canceladas, bloqueadas e falhadas`:`Show cancelled, blocked, and failed`,hideTerminal:t?`Esconder canceladas, bloqueadas e falhadas`:`Hide cancelled, blocked, and failed`,statusHint:t?`Distribuição atual do fluxo`:`Current workflow distribution`,averageTime:t?`Tempo médio`:`Average time`,averageTokens:t?`Tokens médios`:`Average tokens`,averageCost:t?`Custo médio`:`Average cost`,topHint:t?`Maiores durações acumuladas`:`Longest accumulated durations`,accumulatedTime:t?`Tempo acumulado`:`Accumulated time`,associatedRuns:t?`runs associadas`:`associated runs`,concentration:t?`Concentração`:`Concentration`,totalMeasuredTime:t?`do tempo total medido`:`of total measured time`,topFiveCost:t?`Custo do Top 5`:`Top 5 cost`,tokensUnavailable:t?`Tokens indisponíveis`:`Tokens unavailable`}}function wn(e){let t=new Set;for(let n of e){let e=new Date(n.started_at);Number.isNaN(e.getTime())||t.add(`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`)}return t.size}function Tn(e,t,n,r){if(e<=0||t<=0||n<=0)return r===`pt-BR`?`Médias de execução indisponíveis`:`Execution averages unavailable`;let i=Re(e/t,r),a=ze(e/n),o=r===`pt-BR`?`${n} dias`:`${n} ${n===1?`day`:`days`}`;return r===`pt-BR`?`${i} / tarefa (${a} / dia) (${o})`:`${i} / task (${a} / day) (${o})`}function En(e,t){let n=t===`pt-BR`;if(e===`tasks`)return{statusTitle:n?`Status das tarefas`:`Task status`,classificationTitle:n?`Classificação de Tarefa`:`Task classification`,classificationHint:n?`Mix por criticidade`:`Criticality mix`,averageTitle:n?`Média por tarefa`:`Average per task`,averageHint:n?`Runs agregadas`:`Runs aggregated per task`,latestLabel:n?`Última tarefa criada`:`Latest task created`,topTitle:n?`Top 5 tarefas`:`Top 5 tasks`,shortPlural:`tasks`,emptyTop:n?`Nenhuma tarefa com duração registrada.`:`No task has a recorded duration.`};let r=e===`specs`,i=r?`SPEC`:`PRD`,a=r?`SPECs`:`PRDs`;return{statusTitle:n?`Status das ${a}`:`${i} status`,classificationTitle:n?`Classificação de ${i}`:`${i} classification`,classificationHint:n?`Estrutura da entrega`:`Delivery structure`,averageTitle:n?`Média por ${i}`:`Average per ${i}`,averageHint:n?`Runs agregadas por ${i}`:`Runs aggregated per ${i}`,latestLabel:n?`Última ${i} criada`:`Latest ${i} created`,topTitle:`Top 5 ${a}`,shortPlural:a,emptyTop:n?`Nenhuma ${i} com duração registrada.`:`No ${i} has a recorded duration.`}}var Dn=new Set([`cancelled`,`failed`]);function On(e,t){return new Intl.NumberFormat(t,{style:`currency`,currency:`BRL`,maximumFractionDigits:0}).format(e)}function kn({data:e,locale:t,onOpenTask:n,prds:r=e.prds,runs:i=e.runs,specs:a=e.specs,tasks:o=e.tasks,resolveRunCostBrl:s}){let[c,u]=(0,l.useState)(`tasks`),[d,p]=(0,l.useState)(null),[m,h]=(0,l.useState)(null),g=o.filter(e=>e.status===`completed`).length,_=a.filter(e=>e.work_status===`completed`).length,v=r.filter(e=>e.work_status===`completed`).length,y=o.length===0?0:g/o.length,b=a.length===0?0:_/a.length,x=r.length===0?0:v/r.length,S=En(c,t),C=Cn(t),w=c===`specs`?a:r,T=c===`tasks`?o.length:w.length,E=c===`tasks`?_n(o,i,s):vn(w,i,s),ee=hn(E.map(e=>e.durationMs)),te=Mn(o,t),ne=Nn(w,o,t),j=c===`tasks`?te:ne,M=j.reduce((e,t)=>e+t.count,0),N=Object.entries(pn).map(([e,n])=>({key:e,label:Dt(e,t),color:n,count:o.filter(t=>t.risk===e).length})),ie=c===`tasks`?N:yn(w,t),P=i.filter(e=>e.phase===`execution`),ae=P.reduce((e,t)=>e+(t.duration_ms??0),0),F=wn(P),I=i.reduce((e,t)=>e+(t.usage.total.tokens.total??0),0),L=i.reduce((e,t)=>e+(s?s(t.id)??0:t.usage.total.cost.brl??0),0),oe=ae>0?L*36e5/ae:null,se=o.length>0?L/o.length:null,ce=o.length>0?I/o.length:null,le=ae>0?I*36e5/ae:null,ue=hn(E.map(e=>e.tokens)),de=hn(E.map(e=>e.costBrl)),fe=gn(c===`tasks`?o:w),pe=[[C.averageTime,ee===null?`—`:D(ee,t)],[C.averageTokens,O(ue,t)],[C.averageCost,k(de,`BRL`,t)]],me=E.filter(e=>e.durationMs!==null).sort((e,t)=>(t.durationMs??0)-(e.durationMs??0)).slice(0,5),he=Math.max(1,...me.map(e=>e.durationMs??0)),ge=bn(me,E),_e=e=>{u(e),p(null),h(null)};return(0,f.jsxs)(`section`,{"aria-label":C.overview,className:`operations-overview`,children:[(0,f.jsxs)(`div`,{className:`operations-kpi-grid`,children:[(0,f.jsx)(Sn,{featured:c===`tasks`,hint:`${g} ${C.completedTasks} (${A(y,t)})`,label:C.tasks,onSelect:()=>_e(`tasks`),value:String(o.length)}),(0,f.jsx)(Sn,{featured:c===`specs`,hint:`${_} ${C.completedSpecs} (${A(b,t)})`,label:`SPECs`,onSelect:()=>_e(`specs`),value:String(a.length)}),(0,f.jsx)(Sn,{featured:c===`prds`,hint:`${v} ${C.completedPrds} (${A(x,t)})`,label:`PRDs`,onSelect:()=>_e(`prds`),value:String(r.length)}),(0,f.jsx)(Sn,{hint:Tn(ae,o.length,F,t),label:C.totalExecutionTime,value:ae===0?`—`:ze(ae)}),(0,f.jsx)(Sn,{hint:ce===null||le===null?t===`pt-BR`?`Tokens por tarefa e por hora indisponíveis`:`Tokens per task and hour unavailable`:t===`pt-BR`?`${O(ce,t)} / tarefa (${O(le,t,0)} / hora)`:`${O(ce,t)} / task (${O(le,t,0)} / hour)`,label:t===`pt-BR`?`Tokens gastos`:`Spent tokens`,value:O(I,t)}),(0,f.jsx)(Sn,{hint:oe===null||se===null?t===`pt-BR`?`Custo por tarefa e por hora indisponível`:`Cost per task and hour unavailable`:t===`pt-BR`?`${On(se,t)} / tarefa (${On(oe,t)} / hora)`:`${On(se,t)} / task (${On(oe,t)} / hour)`,label:t===`pt-BR`?`Custo Estimado`:`Estimated cost`,value:On(L,t)})]}),(0,f.jsxs)(`div`,{className:`operations-chart-grid`,children:[(0,f.jsxs)(`article`,{className:`operations-panel operations-panel-wide`,children:[(0,f.jsx)(jn,{hint:C.statusHint,title:S.statusTitle}),(0,f.jsx)(`div`,{"aria-hidden":`true`,className:`operations-stacked-bar`,children:j.map(e=>(0,f.jsx)(`i`,{style:{background:e.color,flexGrow:e.count,display:e.count===0?`none`:void 0}},e.key))}),(0,f.jsx)(`div`,{className:`operations-legend-grid`,children:j.map(e=>{let n=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`i`,{style:{background:e.color}}),(0,f.jsx)(`span`,{children:e.label}),(0,f.jsxs)(`span`,{className:`operations-legend-value`,children:[(0,f.jsx)(`strong`,{children:e.count}),(0,f.jsx)(`small`,{children:A(M===0?0:e.count/M,t)})]})]});return c===`tasks`?(0,f.jsx)(`button`,{"aria-label":`${e.label}: ${e.count}, ${A(M===0?0:e.count/M,t)}`,className:`operations-legend-row operations-status-filter`,onClick:()=>p(e.key),type:`button`,children:n},e.key):(0,f.jsx)(`div`,{className:`operations-legend-row`,children:n},e.key)})})]}),(0,f.jsxs)(`article`,{className:`operations-panel operations-panel-risk`,children:[(0,f.jsx)(jn,{hint:S.classificationHint,title:S.classificationTitle}),(0,f.jsxs)(`div`,{className:`operations-donut-wrap`,children:[(0,f.jsx)(`div`,{"aria-hidden":`true`,className:`operations-donut`,style:{background:Pn(ie,Math.max(T,1))}}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:T}),(0,f.jsx)(`span`,{children:S.shortPlural})]})]}),(0,f.jsx)(`div`,{className:`operations-legend-grid`,children:ie.map(e=>{let n=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`i`,{style:{background:e.color}}),(0,f.jsx)(`span`,{children:e.label}),(0,f.jsxs)(`span`,{className:`operations-legend-value`,children:[(0,f.jsx)(`strong`,{children:e.count}),(0,f.jsx)(`small`,{children:A(T===0?0:e.count/T,t)})]})]});return c===`tasks`?(0,f.jsx)(`button`,{"aria-label":`${e.label}: ${e.count}, ${A(T===0?0:e.count/T,t)}`,className:`operations-legend-row operations-status-filter`,onClick:()=>h(e.key),type:`button`,children:n},e.key):(0,f.jsx)(`div`,{className:`operations-legend-row`,children:n},e.key)})})]}),(0,f.jsxs)(`article`,{className:`operations-panel operations-panel-type${t===`en-US`?` is-en-us`:``}`,children:[(0,f.jsx)(jn,{hint:S.averageHint,title:S.averageTitle}),(0,f.jsx)(`div`,{className:`operations-type-summary`,children:pe.map(([e,t])=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(`strong`,{children:t})]},e))}),(0,f.jsxs)(`footer`,{className:`operations-latest-task-created`,children:[(0,f.jsx)(`span`,{children:S.latestLabel}),(0,f.jsx)(`strong`,{children:fe===null?`—`:re(fe,t)})]})]}),(0,f.jsxs)(`article`,{className:`operations-panel`,children:[(0,f.jsx)(jn,{hint:C.topHint,title:S.topTitle}),me.length>0?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`operations-run-bars`,children:me.map((e,r)=>(0,f.jsxs)(`button`,{"aria-label":t===`pt-BR`?`Abrir detalhes da tarefa ${e.title}`:`Open details for task ${e.title}`,className:`operations-run-bar`,disabled:c!==`tasks`,onClick:()=>void n(e.id),title:`${e.title}: ${D(e.durationMs,t)}`,type:`button`,children:[(0,f.jsx)(`strong`,{children:e.durationMs==null?`—`:D(e.durationMs,t)}),(0,f.jsx)(`i`,{style:{height:`${Math.max(8,(e.durationMs??0)/he*100)}%`}}),(0,f.jsx)(`span`,{children:`#${r+1} ${e.id.slice(-4)}`})]},e.id))}),(0,f.jsxs)(`div`,{className:`operations-top-task-metrics`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:C.accumulatedTime}),(0,f.jsx)(`strong`,{children:D(ge.durationMs,t)}),(0,f.jsx)(`small`,{children:`${ge.runCount} ${C.associatedRuns}`})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:C.concentration}),(0,f.jsx)(`strong`,{children:A(ge.durationShare,t)}),(0,f.jsx)(`small`,{children:C.totalMeasuredTime})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:C.topFiveCost}),(0,f.jsx)(`strong`,{children:k(ge.costBrl,`BRL`,t)}),(0,f.jsx)(`small`,{children:ge.tokens===null?C.tokensUnavailable:`${O(ge.tokens,t)} tokens`})]})]})]}):(0,f.jsx)(`p`,{className:`operations-empty`,children:S.emptyTop})]})]}),d===null?null:(0,f.jsx)(An,{eyebrow:t===`pt-BR`?`Status das tarefas`:`Task status`,label:Ht(d,t),locale:t,onClose:()=>p(null),onOpenTask:e=>{p(null),n(e)},tasks:o.filter(e=>Ut(e)===d)}),m===null?null:(0,f.jsx)(An,{eyebrow:t===`pt-BR`?`Risco das tarefas`:`Task risk`,label:Dt(m,t),locale:t,onClose:()=>h(null),onOpenTask:e=>{h(null),n(e)},tasks:o.filter(e=>e.risk===m)})]})}function An({eyebrow:e,label:t,locale:n,onClose:r,onOpenTask:i,tasks:a}){let o=n===`pt-BR`?a.length===1?`tarefa`:`tarefas`:a.length===1?`task`:`tasks`;return(0,f.jsx)(`dialog`,{className:`operations-status-dialog-backdrop`,onMouseDown:e=>{e.currentTarget===e.target&&r()},open:!0,children:(0,f.jsxs)(`section`,{"aria-label":`${t} — ${a.length} ${o}`,"aria-modal":`true`,className:`operations-status-dialog`,role:`dialog`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(`h2`,{children:t}),(0,f.jsxs)(`p`,{children:[a.length,` `,o]})]}),(0,f.jsx)(`button`,{"aria-label":n===`pt-BR`?`Fechar`:`Close`,onClick:r,type:`button`,children:`×`})]}),(0,f.jsxs)(`div`,{className:`operations-status-task-list`,children:[a.map(e=>(0,f.jsxs)(`button`,{onClick:()=>i(e.id),type:`button`,children:[(0,f.jsxs)(`span`,{className:`operations-status-task-main`,children:[(0,f.jsx)(`strong`,{children:e.title}),(0,f.jsx)(`small`,{children:e.id})]}),(0,f.jsx)(`span`,{className:`operations-risk is-${e.risk}`,children:Dt(e.risk,n)}),(0,f.jsxs)(`span`,{className:`operations-status-task-action`,children:[n===`pt-BR`?`Ver detalhes`:`View details`,` →`]})]},e.id)),a.length===0?(0,f.jsx)(`p`,{className:`operations-empty`,children:n===`pt-BR`?`Nenhuma tarefa neste status.`:`No tasks in this status.`}):null]})]})})}function jn({title:e,hint:t,action:n}){return(0,f.jsxs)(`header`,{className:`operations-panel-header`,children:[(0,f.jsxs)(`div`,{className:`operations-panel-header-title`,children:[(0,f.jsx)(`h2`,{children:e}),n]}),(0,f.jsx)(`small`,{children:t})]})}function Mn(e,t){return Lt.filter(e=>!Dn.has(e)).map(n=>({key:n,label:Ht(n,t),color:fn[n],count:e.filter(e=>Ut(e)===n).length}))}function Nn(e,t,n){return Lt.filter(e=>!Dn.has(e)).map(r=>({key:r,label:Ht(r,n),color:fn[r],count:e.filter(e=>Wt(e,t)===r).length}))}function Pn(e,t){let n=0,r=e.map(e=>{let r=n+e.count/t*100,i=`${e.color} ${n}% ${r}%`;return n=r,i});return n===0?`rgba(36, 52, 72, 0.86)`:`conic-gradient(${r.join(`, `)})`}function Fn(e,t,n){let r=new Map,i=new Map,a=In(e.runs,t),o=e=>{let t=r.get(e);if(t!==void 0)return t;let n={key:e,prds:0,specs:0,tasks:0,runs:0,tests:0,evidences:0,durationMs:null,tokens:null,costBrl:null};return r.set(e,n),i.set(e,new Set),n},s=e=>{let n=Hn(e,t);return n===null?null:o(n)};for(let t of e.prds){let e=s(t.created_at);e!==null&&(e.prds+=1)}for(let t of e.specs){let e=s(t.created_at);e!==null&&(e.specs+=1)}for(let t of e.tasks){let e=s(t.created_at);if(e===null)continue;e.tasks+=1,e.tests+=t.test_count??0;let n=i.get(e.key);for(let e of t.result?.evidence_ids??[])n?.add(e)}for(let t of e.runs){let e=s(t.started_at);e!==null&&(e.runs+=1,e.tokens=zn(e.tokens,t.usage.total.tokens.total),e.costBrl=zn(e.costBrl,n===void 0?t.usage.total.cost.brl:n(t.id)))}for(let[e,t]of i){let n=r.get(e);n!==void 0&&(n.evidences=t.size)}for(let[e,t]of a)o(e).durationMs=t;return[...r.values()].sort((e,t)=>t.key.localeCompare(e.key))}function In(e,t){let n=new Map;for(let r of e){if(r.phase!==void 0&&r.phase!==`execution`&&r.phase!==`conversation`||r.parent_run_id!==void 0&&r.parent_run_id!==null||r.duration_ms===null||r.duration_ms<=0)continue;let e=Hn(r.started_at,t);e!==null&&n.set(e,(n.get(e)??0)+r.duration_ms)}return n}function Ln(e){let t={prds:0,specs:0,tasks:0,runs:0,tests:0,evidences:0,durationMs:null,tokens:null,costBrl:null};for(let n of e)t.prds+=n.prds,t.specs+=n.specs,t.tasks+=n.tasks,t.runs+=n.runs,t.tests+=n.tests,t.evidences+=n.evidences,t.durationMs=zn(t.durationMs,n.durationMs),t.tokens=zn(t.tokens,n.tokens),t.costBrl=zn(t.costBrl,n.costBrl);return t}function Rn(e){let t=e.length;return{tasks:t===0?null:e.reduce((e,t)=>e+t.tasks,0)/t,specs:t===0?null:e.reduce((e,t)=>e+t.specs,0)/t,prds:t===0?null:e.reduce((e,t)=>e+t.prds,0)/t,durationMs:Vn(e.map(e=>e.durationMs),t),tokens:Bn(e.map(e=>e.tokens)),costBrl:Bn(e.map(e=>e.costBrl))}}function zn(e,t){return t===null?e:(e??0)+t}function Bn(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)/t.length}function Vn(e,t){return t===0?null:e.reduce((e,t)=>e+(t??0),0)/t}function Hn(e,t){if(e===null)return null;let n=new Date(e);if(Number.isNaN(n.getTime()))return null;let r=String(n.getFullYear());if(t===`year`)return r;let i=String(n.getMonth()+1).padStart(2,`0`);return t===`month`?`${r}-${i}`:`${r}-${i}-${String(n.getDate()).padStart(2,`0`)}`}function Un({data:e,granularity:t,locale:n,resolveRunCostBrl:r}){let i=Fn(e,t,r),a=Ln(i),o=Rn(i),s=n===`pt-BR`?`Total geral`:`Grand total`;return(0,f.jsxs)(`div`,{className:`operations-period-summary`,children:[(0,f.jsx)(j,{ariaLabel:Wn(t,n),metrics:[{label:Gn(n===`pt-BR`?`Tarefas`:`Tasks`,t,n),value:ne(o.tasks,n,1)},{label:Gn(`SPECs`,t,n),value:ne(o.specs,n,1)},{label:Gn(`PRDs`,t,n),value:ne(o.prds,n,1)},{label:Gn(n===`pt-BR`?`Tempo`:`Time`,t,n),value:te(o.durationMs,n)},{label:Gn(`Tokens`,t,n),value:O(o.tokens,n)},{label:Gn(n===`pt-BR`?`Custo`:`Cost`,t,n),value:k(o.costBrl,`BRL`,n)}]}),(0,f.jsx)(C,{columns:[{key:`period`,label:qn(t,n),render:e=>(0,f.jsx)(`strong`,{children:Jn(e.key,t,n)}),footer:s,sortValue:e=>e.key},Kn(`prds`,`PRDs`,a.prds),Kn(`specs`,`SPECs`,a.specs),Kn(`tasks`,`Tasks`,a.tasks),Kn(`runs`,`Runs`,a.runs),Kn(`tests`,n===`pt-BR`?`Testes`:`Tests`,a.tests),Kn(`evidences`,n===`pt-BR`?`Evidências`:`Evidence`,a.evidences),{key:`duration`,label:n===`pt-BR`?`Tempo`:`Time`,align:`right`,render:e=>D(e.durationMs),footer:D(a.durationMs),sortValue:e=>e.durationMs},{key:`tokens`,label:`Tokens`,align:`right`,render:e=>O(e.tokens),footer:O(a.tokens),sortValue:e=>e.tokens},{key:`cost`,label:n===`pt-BR`?`Custos`:`Costs`,align:`right`,render:e=>k(e.costBrl,`BRL`),footer:k(a.costBrl,`BRL`),sortValue:e=>e.costBrl}],emptyMessage:n===`pt-BR`?`Nenhum dado disponível para o período selecionado.`:`No data available for the selected period.`,defaultSort:{key:`period`,direction:`desc`},locale:n,rowKey:e=>e.key,rows:i,sortable:!0,showColumnInfo:!0})]})}function Wn(e,t){return t===`en-US`?e===`day`?`Daily averages`:e===`month`?`Monthly averages`:`Annual averages`:e===`day`?`Médias por dia`:e===`month`?`Médias por mês`:`Médias por ano`}function Gn(e,t,n){return n===`en-US`?`${e} ${t===`day`?`Daily average`:t===`month`?`Monthly average`:`Annual average`}`:`${e} ${t===`day`?`Médio por dia`:t===`month`?`Médio por mês`:`Médio por ano`}`}function Kn(e,t,n){return{key:e,label:t,align:`right`,render:t=>t[e],footer:n,sortValue:t=>t[e]}}function qn(e,t){return t===`en-US`?e===`day`?`Day`:e===`month`?`Month`:`Year`:e===`day`?`Dia`:e===`month`?`Mês`:`Ano`}function Jn(e,t,n){if(t===`month`||t===`year`)return e;let r=new Date(`${e}T12:00:00`);return new Intl.DateTimeFormat(n,{...t===`day`?{day:`2-digit`}:{},month:t===`day`?`2-digit`:`long`,year:`numeric`}).format(r)}function Yn({allSpecs:e,allTasks:t,changes:n,locale:r,onOpenPrdDocument:i,onOpenTask:a,prds:o,runs:s,specs:c,tasks:u}){let d=Mt(),[p,m]=(0,l.useState)(`task`),[h,g]=(0,l.useState)(null),[_,v]=(0,l.useState)(null),[y,b]=(0,l.useState)(``),x=(0,l.useMemo)(()=>Pt(s),[s]),S=(0,l.useMemo)(()=>nr([...o.map(e=>({kind:`prd`,row:e})),...c.map(e=>({kind:`spec`,row:e})),...u.map(e=>({kind:`task`,row:e}))].filter(e=>Rt(e,p))),[o,c,u,p]),C=(0,l.useMemo)(()=>new Map([...o,...c].map(n=>[n.id,zt(n,e,t)])),[e,t,o,c]),w=h===null?[]:S.filter(e=>tr(e,t)===h),T=e=>{g(null),e.kind===`task`?a(e.row.id):v(e.row)};return(0,f.jsxs)(`section`,{className:`operations-unified-work`,children:[(0,f.jsx)(Xn,{locale:r,onChange:m,value:p}),(0,f.jsx)(`section`,{"aria-label":r===`pt-BR`?`Kanban de trabalho`:`Work Kanban`,className:`operations-board operations-work-board`,children:Lt.map(e=>(0,f.jsx)(Zn,{changes:n,items:S.filter(n=>tr(n,t)===e),locale:r,nowMs:d,onOpenColumn:()=>{b(``),g(e)},onOpenItem:T,progressByMacro:C,stage:e,totalsByTask:x},e))}),h?(0,f.jsx)(er,{items:w,locale:r,onClose:()=>g(null),onOpenItem:T,onQueryChange:b,query:y,stage:h}):null,_?(0,f.jsx)(Gt,{label:_.kind===`prd`?`PRD`:`SPEC`,locale:r,onClose:()=>v(null),onOpenDocument:i,onOpenTrace:e=>{v(null),a(e)},row:_,runs:s,specs:e,tasks:t}):null]})}function Xn({locale:e,onChange:t,value:n}){let r=e===`pt-BR`?{task:`Todas as Tarefas`,all:`Visão Unificada Geral`,prd:`PRDs`,spec:`SPECs`,"standalone-task":`Tarefas Avulsas`}:{task:`All Tasks`,all:`Unified Overview`,prd:`PRDs`,spec:`SPECs`,"standalone-task":`Standalone Tasks`};return(0,f.jsx)(`nav`,{"aria-label":e===`pt-BR`?`Filtrar tipo de trabalho`:`Filter work type`,className:`operations-work-type-filters`,children:[`task`,`all`,`prd`,`spec`,`standalone-task`].map(e=>(0,f.jsx)(`button`,{className:n===e?`is-active`:void 0,onClick:()=>t(e),type:`button`,children:r[e]},e))})}function Zn({changes:e,items:t,locale:n,nowMs:r,onOpenColumn:i,onOpenItem:a,progressByMacro:o,stage:s,totalsByTask:c}){let{hasMore:l,sentinelRef:u,visibleCount:d}=Nt(t.length);return(0,f.jsxs)(`article`,{className:`operations-column is-${s}`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsx)(`button`,{className:`operations-column-trigger`,onClick:i,type:`button`,children:Ht(s,n)}),(0,f.jsx)(`button`,{"aria-label":`${t.length} — ${Ht(s,n)}`,className:`operations-column-count`,onClick:i,type:`button`,children:t.length})]}),(0,f.jsxs)(`div`,{className:`operations-column-body`,children:[t.slice(0,d).map(t=>(0,f.jsx)(Qn,{changes:e,item:t,locale:n,nowMs:r,onOpen:()=>a(t),progress:o.get(t.row.id),stage:s,totalsByTask:c},t.row.id)),t.length===0?(0,f.jsx)(`p`,{className:`operations-empty`,children:n===`pt-BR`?`Sem itens`:`No items`}):null,l?(0,f.jsxs)(`div`,{className:`operations-infinite-sentinel`,ref:u,children:[d,` de `,t.length,` · carregando mais…`]}):null]})]})}function Qn({changes:e,item:t,locale:n,nowMs:r,onOpen:i,progress:a,stage:o,totalsByTask:s}){let c=Ne(t.row.created_at,rr(o),n,r),l=t.kind===`task`?t.row:null,u=t.kind===`task`?null:t.row,d=l?kt(l,e):t.kind,p=d===`task`?`Tarefa Avulsa`:t.kind.toUpperCase(),m=l?s.get(l.id):null,h=u?[u.duration_ms,u.usage.total.tokens.total,u.usage.total.cost.brl]:[m?.durationMs??null,m?.tokens??null,m?.costBrl??null];return(0,f.jsxs)(`button`,{className:`operations-task-card operations-work-card is-kind-${d}`,onClick:i,type:`button`,children:[(0,f.jsx)(`span`,{className:`operations-work-kind is-${t.kind}`,children:p}),l?(0,f.jsx)(`span`,{className:`operations-risk is-${l.risk}`,children:Dt(l.risk,n)}):null,(0,f.jsx)(`strong`,{title:t.row.title,children:t.row.title}),(0,f.jsx)(`small`,{title:t.row.id,children:t.row.id}),t.row.created_at?(0,f.jsx)(`small`,{className:`operations-card-created`,children:Ie(t.row.created_at,n)}):null,c?(0,f.jsx)(`span`,{className:`operations-elapsed-badge${c.alert?` is-alert`:``}`,children:c.label}):null,l?(0,f.jsx)(`span`,{className:`operations-task-origin-badge is-${d}`,children:At(d)}):null,u?(0,f.jsx)(`span`,{className:`operations-work-card-counts`,children:Bt(u.kind,a??{completedSpecs:0,totalSpecs:0,completedTasks:0,totalTasks:0})}):null,(0,f.jsx)(`dl`,{className:`operations-task-usage operations-macro-usage`,children:[[n===`pt-BR`?`Tempo`:`Time`,h[0]==null?`—`:Re(h[0])],[`Tokens`,h[1]==null?`—`:O(h[1])],[n===`pt-BR`?`Custo`:`Cost`,h[2]==null?`—`:k(h[2],`BRL`)]].map(([e,t])=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`dt`,{children:e}),(0,f.jsx)(`dd`,{children:t})]},e))})]})}function $n(e,t){let n=t.trim().toLocaleLowerCase();return n?e.filter(e=>[e.row.id,e.row.title,e.kind].some(e=>e.toLocaleLowerCase().includes(n))):[...e]}function er({items:e,locale:t,onClose:n,onOpenItem:r,onQueryChange:i,query:a,stage:o}){let s=$n(e,a);return(0,S.createPortal)((0,f.jsx)(`dialog`,{className:`operations-status-dialog-backdrop`,onMouseDown:e=>e.currentTarget===e.target&&n(),open:!0,children:(0,f.jsxs)(`section`,{"aria-label":Ht(o,t),"aria-modal":`true`,className:`operations-status-dialog`,role:`dialog`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:t===`pt-BR`?`Coluna de trabalho`:`Work column`}),(0,f.jsx)(`h2`,{children:Ht(o,t)}),(0,f.jsxs)(`p`,{children:[e.length,` itens`]})]}),(0,f.jsx)(`button`,{"aria-label":t===`pt-BR`?`Fechar`:`Close`,onClick:n,type:`button`,children:`×`})]}),(0,f.jsxs)(`label`,{className:`operations-status-dialog-search`,children:[(0,f.jsx)(`span`,{children:t===`pt-BR`?`Buscar itens`:`Search items`}),(0,f.jsx)(`input`,{autoFocus:!0,onChange:e=>i(e.target.value),placeholder:t===`pt-BR`?`Título, ID ou tipo`:`Title, ID, or type`,type:`search`,value:a})]}),(0,f.jsxs)(`div`,{className:`operations-status-task-list`,children:[s.map(e=>(0,f.jsxs)(`button`,{onClick:()=>r(e),type:`button`,children:[(0,f.jsxs)(`span`,{className:`operations-status-task-main`,children:[(0,f.jsx)(`strong`,{children:e.row.title}),(0,f.jsx)(`small`,{children:e.row.id})]}),(0,f.jsx)(`span`,{className:`operations-work-kind is-${e.kind}`,children:e.kind===`task`?`TASK`:e.kind.toUpperCase()}),(0,f.jsxs)(`span`,{className:`operations-status-task-action`,children:[t===`pt-BR`?`Ver detalhes`:`View details`,` →`]})]},`${e.kind}:${e.row.id}`)),s.length===0?(0,f.jsx)(`p`,{className:`operations-empty`,children:t===`pt-BR`?`Nenhum item encontrado nesta coluna.`:`No items found in this column.`}):null]})]})}),document.body)}function tr(e,t){return e.kind===`task`?Ut(e.row):Wt(e.row,t)}function nr(e){return e.sort((e,t)=>(t.row.created_at??``).localeCompare(e.row.created_at??``)||t.row.id.localeCompare(e.row.id))}function rr(e){return e===`definition`?`draft`:e===`planning`||e===`ready`?`planned`:e===`blocked`?`blocked`:e}function ir({allSpecs:e,allTasks:t,changes:n,locale:r,onOpenPrdDocument:i,onOpenTask:a,prds:o,runs:s,specs:c,tasks:u}){let[d,p]=(0,l.useState)(`task`),[m,h]=(0,l.useState)(null),g=(0,l.useMemo)(()=>ar({allSpecs:e,allTasks:t,changes:n,items:[...o.map(e=>({kind:`prd`,row:e})),...c.map(e=>({kind:`spec`,row:e})),...u.map(e=>({kind:`task`,row:e}))].filter(e=>Rt(e,d)),runs:s}),[e,t,n,o,s,c,u,d]);return(0,f.jsxs)(`section`,{className:`operations-unified-work operations-work-list`,children:[(0,f.jsx)(Xn,{locale:r,onChange:p,value:d}),(0,f.jsx)(`div`,{className:`operations-work-list-table`,children:(0,f.jsx)(C,{columns:[{key:`item`,label:r===`pt-BR`?`Item de trabalho`:`Work item`,render:({item:e,originLabel:t})=>(0,f.jsxs)(`span`,{className:`operations-work-list-identity`,children:[(0,f.jsx)(`span`,{className:`operations-work-kind is-${e.kind}`,children:t}),(0,f.jsx)(`strong`,{children:e.row.title}),(0,f.jsx)(`small`,{children:e.row.id})]}),sortValue:({item:e})=>e.row.title},{key:`status`,label:`Status`,render:({stage:e})=>(0,f.jsx)(`span`,{className:`operations-status is-${e}`,children:Ht(e,r)}),sortValue:({stage:e})=>e},{key:`risk`,label:r===`pt-BR`?`Risco`:`Risk`,render:({risk:e})=>e?(0,f.jsx)(`span`,{className:`operations-risk is-${e}`,children:Dt(e,r)}):`—`,sortValue:({risk:e})=>e},{key:`progress`,label:r===`pt-BR`?`Progresso`:`Progress`,render:({progress:e})=>e,sortValue:({item:e})=>e.kind===`task`?e.row.progress:e.row.quality.task_completion_rate},{key:`runs`,label:`Runs`,description:r===`pt-BR`?`Chamadas do agente orquestrador relacionadas ao item.`:`Orchestrator agent calls related to the item.`,render:({runCount:e})=>e,sortValue:({runCount:e})=>e,align:`right`},{key:`subruns`,label:`Sub-runs`,description:r===`pt-BR`?`Chamadas de subagentes relacionadas ao item.`:`Subagent calls related to the item.`,render:({subrunCount:e})=>e,sortValue:({subrunCount:e})=>e,align:`right`},{key:`executions`,label:r===`pt-BR`?`Execuções`:`Executions`,render:({executionCount:e})=>e,sortValue:({executionCount:e})=>e,align:`right`},{key:`tasks`,label:r===`pt-BR`?`Tarefas`:`Tasks`,render:({taskCount:e})=>e,sortValue:({taskCount:e})=>e,align:`right`},{key:`duration`,label:r===`pt-BR`?`Tempo`:`Time`,render:({durationMs:e})=>e===null?`—`:Re(e),sortValue:({durationMs:e})=>e,align:`right`},{key:`tokens`,label:`Tokens`,render:({tokens:e})=>e===null?`—`:O(e),sortValue:({tokens:e})=>e,align:`right`},{key:`cost`,label:r===`pt-BR`?`Custo`:`Cost`,render:({costBrl:e})=>e===null?`—`:k(e,`BRL`),sortValue:({costBrl:e})=>e,align:`right`}],defaultSort:{key:`item`,direction:`asc`},emptyMessage:r===`pt-BR`?`Nenhum item de trabalho encontrado.`:`No work items found.`,locale:r,onRowClick:({item:e})=>{e.kind===`task`?a(e.row.id):h(e.row)},rowKey:({item:e})=>`${e.kind}:${e.row.id}`,rows:g,scrollLabel:r===`pt-BR`?`Tabela de itens de trabalho com rolagem horizontal para acessar todas as colunas.`:`Work items table with horizontal scrolling to access all columns.`,showColumnInfo:!0,sortable:!0})}),m?(0,f.jsx)(Gt,{label:m.kind===`prd`?`PRD`:`SPEC`,locale:r,onClose:()=>h(null),onOpenDocument:i,onOpenTrace:e=>{h(null),a(e)},row:m,runs:s,specs:e,tasks:t}):null]})}function ar({allSpecs:e,allTasks:t,changes:n,items:r,runs:i}){let a=Pt(i);return r.map(r=>{let o=r.kind===`task`?r.row:null,s=r.kind===`task`?null:r.row,c=i.filter(e=>o?e.task_id===o.id:s!==null&&(s.run_ids.includes(e.id)||e.prd_id===s.id||e.spec_id===s.id||e.task_id!==null&&s.task_ids.includes(e.task_id))),l=o?a.get(o.id):null,u=s?zt(s,e,t):null;return{item:r,stage:o?Ut(o)??`planning`:Wt(s,t),originLabel:o?At(kt(o,n)):r.kind.toUpperCase(),risk:o?.risk??null,progress:o?`${Math.round(o.progress)}%`:Bt(s.kind,u),runCount:c.filter(e=>e.run_kind===`run`).length,subrunCount:c.filter(e=>e.run_kind===`subrun`).length,executionCount:o?new Set(c.flatMap(e=>e.execution_id?[e.execution_id]:[])).size:s.execution_count,taskCount:o?1:u.totalTasks,durationMs:o?l?.durationMs??null:s.duration_ms,tokens:o?l?.tokens??null:s.usage.total.tokens.total,costBrl:o?l?.costBrl??null:s.usage.total.cost.brl}})}var or={"pt-BR":{"work-kanban":`Trabalho (Kanban)`,"work-list":`Trabalho (Lista)`,changes:`Mudanças`,executions:`Execuções`,runs:`Chamadas de agentes`,conversations:`Conversas`,decisions:`Decisões`,daily:`Diário`,monthly:`Mensal`,yearly:`Anual`},"en-US":{"work-kanban":`Work (Kanban)`,"work-list":`Work (List)`,changes:`Changes`,executions:`Executions`,runs:`Agent calls`,conversations:`Conversations`,decisions:`Decisions`,daily:`Daily`,monthly:`Monthly`,yearly:`Annual`}};function sr(e,t){let n=e.trim().toLocaleLowerCase();return n.length===0||t.some(e=>e?.toLocaleLowerCase().includes(n))}function cr({alternateContent:e,capabilityNavigation:t,data:n,dashboardTitle:r=`Dashboard Zaip AIOS`,loading:i,locale:a,onLocaleChange:o,onOpenPrdDocument:s,onOpenTask:c,onRefresh:u,repositoryName:d,settings:p,resolveRunCostBrl:h}){let[g,_]=(0,l.useState)(`work-kanban`),[v,y]=(0,l.useState)(``),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)(``),[E,ee]=(0,l.useState)(``),[D,te]=(0,l.useState)(``),[O,ne]=(0,l.useState)(!1),k=(0,l.useRef)(null),re=(0,l.useRef)(null),A=(0,l.useMemo)(()=>Qt(n.tasks),[n.tasks]),[j,M]=(0,l.useState)(A),[N,ie]=(0,l.useState)(`all`),P=(0,l.useCallback)(()=>{ne(!0),k.current!==null&&window.clearTimeout(k.current),k.current=window.setTimeout(()=>ne(!1),220)},[]);(0,l.useEffect)(()=>()=>{k.current!==null&&window.clearTimeout(k.current)},[]);let ae=typeof e==`function`?e({query:v,dateRange:j}):e,F=()=>{P(),y(``),T(``),ee(``),te(``),M(A),ie(`all`)},I=e=>{P(),_(e),T(``),ee(``),te(``)},L=ur(n,g),oe=![`decisions`,`daily`,`monthly`,`yearly`].includes(g),se=g===`work-kanban`||g===`work-list`||g===`changes`,ce=g===`work-kanban`||g===`work-list`,le=n.tasks.filter(e=>(!w||Ut(e)===w)&&(!E||e.risk===E)&&jt(e,D,n.changes)&&en(e.created_at,j)&&sr(v,[e.id,e.title,e.short_name,e.objective,e.change_id,e.spec_id])),ue=n.prds.filter(e=>(!w||Wt(e,n.tasks)===w)&&!E&&!D&&tn(e.created_at,j)&&sr(v,[e.id,e.title,e.parent_id])),pe=n.specs.filter(e=>(!w||Wt(e,n.tasks)===w)&&!E&&!D&&tn(e.created_at,j)&&sr(v,[e.id,e.title,e.parent_id])),me=n.changes.filter(e=>(!w||e.status===w)&&(!E||e.risk===E)&&tn(e.created_at,j)&&sr(v,[e.id,e.title,e.source.type,e.artifact_path])),he=n.executions.filter(e=>(!w||e.status===w)&&tn(e.created_at,j)&&sr(v,[e.id,e.status,e.work_status,e.origin.type,e.artifact_path])),_e=n.runs.filter(e=>(!w||e.status===w)&&tn(e.started_at,j)&&sr(v,[e.id,e.task_id,e.spec_id,e.prd_id,e.change_id,e.execution_id,e.conversation_id,e.phase,e.agent,e.agent_name,e.model,e.effective_model])),be=_e.filter(e=>e.phase===`conversation`),xe=n.decisions.filter(e=>tn(e.created_at,j)&&sr(v,[e.id,e.title,e.scope_id,e.scope_type,e.artifact_path])),Se=new Set(le.map(e=>e.id)),Ce=n.runs.filter(e=>tn(e.started_at,j)&&(e.task_id===null||Se.has(e.task_id))&&sr(v,[e.id,e.task_id,e.agent,e.agent_name,e.model,e.effective_model])),we=i||O;return(0,f.jsxs)(`main`,{className:`operations-page`,children:[(0,f.jsx)(m,{filters:(0,f.jsxs)(`div`,{className:`operations-global-filters`,"data-loading":we||void 0,children:[(0,f.jsxs)(`div`,{className:`operations-filter-heading`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:a===`pt-BR`?`Filtrar dashboard`:`Filter dashboard`}),(0,f.jsx)(`small`,{children:a===`pt-BR`?`Os resultados são atualizados automaticamente`:`Results update automatically`})]}),we?(0,f.jsxs)(`span`,{className:`operations-filter-status`,role:`status`,children:[(0,f.jsx)(`i`,{}),` `,a===`pt-BR`?`Atualizando dados`:`Updating data`]}):null]}),(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:a===`pt-BR`?`Tipo`:`Type`}),(0,f.jsx)(`select`,{onChange:e=>I(e.target.value),value:g,children:Object.keys(or[a]).map(e=>(0,f.jsx)(`option`,{value:e,children:or[a][e]},e))})]}),oe?(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:`Status`}),(0,f.jsxs)(`select`,{onChange:e=>{P(),T(e.target.value)},value:w,children:[(0,f.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todos`:`All`}),L.map(e=>(0,f.jsx)(`option`,{value:e,children:dr(e,a)},e))]})]}):null,se?(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:a===`pt-BR`?`Risco`:`Risk`}),(0,f.jsxs)(`select`,{onChange:e=>{P(),ee(e.target.value)},value:E,children:[(0,f.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todos`:`All`}),(0,f.jsx)(`option`,{value:`lite`,children:Dt(`lite`,a)}),(0,f.jsx)(`option`,{value:`standard`,children:Dt(`standard`,a)}),(0,f.jsx)(`option`,{value:`critical`,children:Dt(`critical`,a)})]})]}):null,ce?(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:a===`pt-BR`?`Origem da tarefa`:`Task origin`}),(0,f.jsxs)(`select`,{onChange:e=>{P(),te(e.target.value)},value:D,children:[(0,f.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todas`:`All`}),Ot.map(e=>(0,f.jsx)(`option`,{value:e,children:At(e)},e))]})]}):null,(0,f.jsx)(dn,{ariaLabelSuffix:a===`pt-BR`?` nos filtros`:` in filters`,dateRange:j,defaultDateRange:A,locale:a,onDateRangeChange:e=>{P(),M(e),ie(`custom`)},onPresetChange:(e,t)=>{P(),ie(e),M(t)},preset:N}),(0,f.jsxs)(`button`,{className:`operations-clear-filters`,onClick:F,type:`button`,children:[(0,f.jsx)(gr,{}),a===`pt-BR`?`Limpar filtros`:`Clear filters`]})]}),filtersActive:!!(v||w||E||D||j.start!==A.start||j.end!==A.end),lastUpdatedAt:n.summary.source_latest_at,loading:we,locale:a,onLocaleChange:o,onRefresh:u,...d===void 0?{}:{repositoryName:d},settings:p,title:r}),(0,f.jsx)(`h1`,{className:`operations-sr-only`,children:`Operações`}),(0,f.jsxs)(`header`,{className:`operations-hero`,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(`small`,{className:`operations-last-updated`,children:n.summary.source_latest_at===null?a===`pt-BR`?`Aguardando atualização`:`Waiting for refresh`:`${a===`pt-BR`?`Atualizado`:`Updated`} ${new Intl.DateTimeFormat(a,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(n.summary.source_latest_at))}`})}),(0,f.jsxs)(`div`,{className:`operations-actions`,children:[(0,f.jsx)(`button`,{"aria-label":a===`pt-BR`?`Atualizar`:`Refresh`,className:`operations-nav-icon`,disabled:i,onClick:u,type:`button`,children:(0,f.jsx)(pr,{})}),(0,f.jsxs)(`div`,{className:`operations-nav-popup-anchor`,children:[(0,f.jsxs)(`button`,{className:`operations-nav-button${b?` is-active`:``}`,onClick:()=>{x(e=>!e),C(!1)},type:`button`,children:[(0,f.jsx)(mr,{}),` `,a===`pt-BR`?`Filtros`:`Filters`]}),b?(0,f.jsxs)(`div`,{className:`operations-nav-popup operations-filter-popup`,children:[(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:a===`pt-BR`?`Busca`:`Search`}),(0,f.jsx)(`input`,{onChange:e=>y(e.target.value),placeholder:a===`pt-BR`?`ID ou nome de ${or[a][g]}`:`${or[a][g]} ID or name`,value:v})]}),g===`work-kanban`||g===`work-list`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:`Status`}),(0,f.jsxs)(`select`,{onChange:e=>T(e.target.value),value:w,children:[(0,f.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todos`:`All`}),Lt.map(e=>(0,f.jsx)(`option`,{value:e,children:Ht(e,a)},e))]})]}),(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:a===`pt-BR`?`Risco`:`Risk`}),(0,f.jsxs)(`select`,{onChange:e=>ee(e.target.value),value:E,children:[(0,f.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todos`:`All`}),(0,f.jsx)(`option`,{value:`lite`,children:Dt(`lite`,a)}),(0,f.jsx)(`option`,{value:`standard`,children:Dt(`standard`,a)}),(0,f.jsx)(`option`,{value:`critical`,children:Dt(`critical`,a)})]})]}),(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:a===`pt-BR`?`Origem da tarefa`:`Task origin`}),(0,f.jsxs)(`select`,{onChange:e=>te(e.target.value),value:D,children:[(0,f.jsx)(`option`,{value:``,children:a===`pt-BR`?`Todas`:`All`}),Ot.map(e=>(0,f.jsx)(`option`,{value:e,children:At(e)},e))]})]})]}):null,(0,f.jsx)(`button`,{onClick:F,type:`button`,children:a===`pt-BR`?`Limpar filtros`:`Clear filters`})]}):null]}),(0,f.jsxs)(`div`,{className:`operations-nav-popup-anchor`,children:[(0,f.jsxs)(`button`,{className:`operations-nav-button${S?` is-active`:``}`,onClick:()=>{C(e=>!e),x(!1)},type:`button`,children:[(0,f.jsx)(fr,{locale:a}),a===`pt-BR`?`PT-BR`:`EN-US`,(0,f.jsx)(hr,{})]}),S?(0,f.jsxs)(`div`,{className:`operations-nav-popup operations-locale-popup`,children:[(0,f.jsxs)(`button`,{onClick:()=>{o(`pt-BR`),C(!1)},type:`button`,children:[(0,f.jsx)(fr,{locale:`pt-BR`}),` Português do Brasil`,a===`pt-BR`?(0,f.jsx)(`span`,{children:`✓`}):null]}),(0,f.jsxs)(`button`,{onClick:()=>{o(`en-US`),C(!1)},type:`button`,children:[(0,f.jsx)(fr,{locale:`en-US`}),` English`,a===`en-US`?(0,f.jsx)(`span`,{children:`✓`}):null]})]}):null]})]})]}),we?(0,f.jsx)(`div`,{"aria-hidden":`true`,className:`operations-loading-line`}):null,(0,f.jsxs)(`div`,{"aria-busy":we,className:we?`operations-filtered is-loading`:`operations-filtered`,children:[(0,f.jsx)(kn,{data:n,locale:a,onOpenTask:c,prds:ue,runs:Ce,resolveRunCostBrl:h,specs:pe,tasks:le}),(0,f.jsxs)(`section`,{className:`dashboard-global-controls`,children:[t,(0,f.jsxs)(`div`,{className:`operations-toolbar-filters dashboard-global-filters`,children:[(0,f.jsxs)(`label`,{className:`operations-toolbar-field operations-search-field`,children:[(0,f.jsx)(`span`,{children:a===`pt-BR`?`Busca`:`Search`}),(0,f.jsxs)(`div`,{className:`operations-search-control`,children:[(0,f.jsx)(`input`,{"aria-label":a===`pt-BR`?`Busca`:`Search`,onChange:e=>{P(),y(e.target.value)},placeholder:a===`pt-BR`?`Buscar por nome ou ID`:`Search by name or ID`,ref:re,value:v}),v?(0,f.jsx)(`button`,{"aria-label":a===`pt-BR`?`Limpar busca`:`Clear search`,className:`operations-search-clear`,onClick:()=>{P(),y(``),re.current?.focus()},type:`button`,children:(0,f.jsx)(_r,{})}):null]})]}),(0,f.jsx)(dn,{dateRange:j,defaultDateRange:A,locale:a,onDateRangeChange:e=>{P(),M(e),ie(`custom`)},onPresetChange:(e,t)=>{P(),ie(e),M(t)},preset:N})]})]}),ae??(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`section`,{className:`operations-toolbar`,children:(0,f.jsx)(`nav`,{"aria-label":`Entidades do ciclo de trabalho`,children:[`work-kanban`,`work-list`,`executions`,`runs`,`decisions`,`changes`,`conversations`,`daily`,`monthly`,`yearly`].map(e=>(0,f.jsx)(`button`,{className:g===e?`is-active`:void 0,onClick:()=>I(e),type:`button`,children:or[a][e]},e))})}),(0,f.jsxs)(`section`,{className:`operations-content`,children:[g===`work-kanban`?(0,f.jsx)(Yn,{allSpecs:n.specs,allTasks:n.tasks,changes:n.changes,locale:a,onOpenPrdDocument:s,onOpenTask:c,prds:ue,runs:n.runs,specs:pe,tasks:le}):null,g===`work-list`?(0,f.jsx)(ir,{allSpecs:n.specs,allTasks:n.tasks,changes:n.changes,locale:a,onOpenPrdDocument:s,onOpenTask:c,prds:ue,runs:n.runs,specs:pe,tasks:le}):null,g===`changes`?(0,f.jsx)(de,{locale:a,rows:me}):null,g===`executions`?(0,f.jsx)(fe,{locale:a,rows:he}):null,g===`runs`?(0,f.jsx)(ge,{locale:a,rows:_e}):null,g===`conversations`?(0,f.jsx)(ve,{locale:a,rows:be}):null,g===`decisions`?(0,f.jsx)(ye,{locale:a,rows:xe}):null,g===`daily`||g===`monthly`||g===`yearly`?(0,f.jsx)(Un,{data:{prds:ue,runs:_e,specs:pe,tasks:le},granularity:g===`daily`?`day`:g===`monthly`?`month`:`year`,locale:a,resolveRunCostBrl:h}):null]})]})]})]})}var lr=[`draft`,`planned`,`executing`,`verifying`,`completed`,`blocked`,`failed`,`cancelled`];function ur(e,t){if(t===`work-kanban`||t===`work-list`)return[...Lt];let n=t===`changes`?e.changes.map(e=>e.status):t===`executions`?e.executions.map(e=>e.status):t===`runs`?e.runs.map(e=>e.status):t===`conversations`?e.runs.filter(e=>e.phase===`conversation`).map(e=>e.status):[];return[...new Set(n)].sort()}function dr(e,t){if(Lt.includes(e))return Ht(e,t);let n=lr.find(t=>t===e);return n===void 0?e:Et(n,t)}function fr({locale:e}){return e===`pt-BR`?(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`operations-locale-flag`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`rect`,{fill:`#18864b`,height:`24`,rx:`5`,width:`24`}),(0,f.jsx)(`path`,{d:`m12 3.8 8.2 8.2L12 20.2 3.8 12 12 3.8Z`,fill:`#f6d64a`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,fill:`#1b4f9c`,r:`4.2`}),(0,f.jsx)(`path`,{d:`M8.8 11.2c1.9-1 4.5-1 6.4 0`,fill:`none`,stroke:`#fff`,strokeWidth:`.8`})]}):(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`operations-locale-flag`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`rect`,{fill:`#fff`,height:`24`,rx:`5`,width:`24`}),(0,f.jsx)(`path`,{d:`M0 3h24v3H0Zm0 6h24v3H0Zm0 6h24v3H0Z`,fill:`#bd3d44`}),(0,f.jsx)(`path`,{d:`M0 0h11v11H0Z`,fill:`#192f6b`})]})}function pr(){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,className:`operations-nav-svg`,fill:`none`,viewBox:`0 0 24 24`,children:(0,f.jsx)(`path`,{d:`M20 11a8.1 8.1 0 1 0 2 5.3M20 4v7h-7`})})}function mr(){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,className:`operations-nav-svg`,fill:`none`,viewBox:`0 0 24 24`,children:(0,f.jsx)(`path`,{d:`M4 6h16M7 12h10m-7 6h4`})})}function hr(){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,className:`operations-nav-svg operations-locale-chevron`,fill:`none`,viewBox:`0 0 24 24`,children:(0,f.jsx)(`path`,{d:`m6 9 6 6 6-6`})})}function gr(){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,className:`operations-reset-icon`,fill:`none`,viewBox:`0 0 24 24`,children:(0,f.jsx)(`path`,{d:`M3 12a9 9 0 1 0 3-6.7M3 4v6h6`})})}function _r(){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,fill:`none`,viewBox:`0 0 20 20`,children:(0,f.jsx)(`path`,{d:`m6 6 8 8M14 6l-8 8`})})}function vr({detail:e,locale:t,onClose:n}){let r=t===`pt-BR`;return(0,S.createPortal)((0,f.jsx)(`div`,{className:`operations-prd-document-backdrop`,onMouseDown:e=>{e.currentTarget===e.target&&n()},children:(0,f.jsxs)(`section`,{"aria-label":r?`PRD completo`:`Full PRD`,"aria-modal":`true`,className:`operations-prd-document-dialog`,role:`dialog`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`span`,{children:[(0,f.jsx)(at,{"aria-hidden":`true`,size:16}),` PRD`]}),(0,f.jsx)(`h2`,{children:e.title}),(0,f.jsx)(`p`,{children:e.id})]}),(0,f.jsx)(`button`,{"aria-label":r?`Fechar`:`Close`,onClick:n,type:`button`,children:(0,f.jsx)(_t,{"aria-hidden":`true`,size:20})})]}),(0,f.jsx)(`div`,{className:`operations-prd-document-scroll`,children:(0,f.jsx)(yr,{content:e.body})}),(0,f.jsx)(`footer`,{children:e.artifact_path})]})}),document.body)}function yr({content:e}){return(0,f.jsx)(`article`,{className:`operations-prd-markdown`,children:br(e).map((e,t)=>{let n=`${e.kind}-${t}`;return e.kind===`heading`?(0,f.jsx)(`h${e.level}`,{children:Cr(e.content)},n):e.kind===`paragraph`?(0,f.jsx)(`p`,{children:Cr(e.content)},n):e.kind===`list`?(0,f.jsx)(e.ordered?`ol`:`ul`,{children:e.items.map((e,t)=>(0,f.jsx)(`li`,{children:Cr(e)},t))},n):e.kind===`quote`?(0,f.jsx)(`blockquote`,{children:Cr(e.content)},n):e.kind===`code`?(0,f.jsx)(`pre`,{children:(0,f.jsx)(`code`,{"data-language":e.language??void 0,children:e.content})},n):e.kind===`table`?(0,f.jsx)(`div`,{className:`operations-prd-markdown-table`,children:(0,f.jsxs)(`table`,{children:[(0,f.jsx)(`thead`,{children:(0,f.jsx)(`tr`,{children:e.headers.map((e,t)=>(0,f.jsx)(`th`,{children:Cr(e)},t))})}),(0,f.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,f.jsx)(`tr`,{children:e.map((e,t)=>(0,f.jsx)(`td`,{children:Cr(e)},t))},t))})]})},n):(0,f.jsx)(`hr`,{},n)})})}function br(e){let t=e.replace(/\r\n/g,`
11
+ `).split(`
12
+ `),n=[],r=[],i=()=>{let e=r.join(` `).trim();e&&n.push({kind:`paragraph`,content:e}),r=[]};for(let e=0;e<t.length;e+=1){let a=t[e]??``,o=a.match(/^(#{1,3})\s+(.+)$/);if(o){i(),n.push({kind:`heading`,level:(o[1]??`#`).length,content:o[2]??``});continue}if(/^\s*(```|~~~)/.test(a)){i();let r=a.trim().slice(0,3),o=[],s=a.trim().slice(3).trim()||null;for(;++e<t.length&&!(t[e]??``).trim().startsWith(r);)o.push(t[e]??``);n.push({kind:`code`,content:o.join(`
13
+ `),language:s});continue}if(a.includes(`|`)&&e+1<t.length&&xr(t[e+1]??``)){i();let r=Sr(a),o=[];for(e+=2;e<t.length&&(t[e]??``).includes(`|`);)o.push(Sr(t[e]??``)),e+=1;--e,n.push({kind:`table`,headers:r,rows:o});continue}let s=a.match(/^\s*(?:([-*+])|(\d+)\.)\s+(.+)$/);if(s){i();let r=!!s[2],a=[s[3]??``];for(;e+1<t.length;){let n=(t[e+1]??``).match(/^\s*(?:([-*+])|(\d+)\.)\s+(.+)$/);if(!n||!!n[2]!==r)break;a.push(n[3]??``),e+=1}n.push({kind:`list`,ordered:r,items:a});continue}if(/^\s*>\s?/.test(a)){i(),n.push({kind:`quote`,content:a.replace(/^\s*>\s?/,``)});continue}if(/^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/.test(a)){i(),n.push({kind:`rule`});continue}if(!a.trim()){i();continue}r.push(a.trim())}return i(),n}function xr(e){return Sr(e).every(e=>/^:?-{3,}:?$/.test(e.replace(/\s/g,``)))}function Sr(e){return e.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim())}function Cr(e){return e.split(/(\*\*[^*]+\*\*|`[^`]+`|\*[^*]+\*|\[[^\]]+\]\([^\s)]+\))/g).map((e,t)=>{if(e.startsWith(`**`)&&e.endsWith(`**`))return(0,f.jsx)(`strong`,{children:e.slice(2,-2)},t);if(e.startsWith("`")&&e.endsWith("`"))return(0,f.jsx)(`code`,{children:e.slice(1,-1)},t);if(e.startsWith(`*`)&&e.endsWith(`*`))return(0,f.jsx)(`em`,{children:e.slice(1,-1)},t);let n=e.match(/^\[([^\]]+)\]\(([^\s)]+)\)$/);return n?(0,f.jsx)(`a`,{href:n[2],rel:`noreferrer`,target:`_blank`,children:n[1]},t):(0,f.jsx)(l.Fragment,{children:e},t)})}function wr(e,t){let n=new Map(e.map(e=>[e.key,e]));for(let e of t??[])n.has(e)||n.set(e,Tr(e));return[...n.values()].sort((e,t)=>t.latest_started_at.localeCompare(e.latest_started_at)||e.label.localeCompare(t.label))}function Tr(e){return{key:e,label:e,latest_started_at:``,run_count:0,task_count:0,prd_count:0,spec_count:0,evidence_count:0,test_count:0,event_count:0,total_tokens:null,estimated_usd:null,estimated_brl:null,duration_ms:null,coverage:{events:0,tokens:0,usd:0,brl:0}}}function Er(e){let t=e?.trim().toLowerCase();return!t||t===`unknown`||t===`codex`?`openai`:t}var Dr={events:0,tokens:0,usd:0,brl:0};function Or(e,t){let n=new Map;for(let e of t)e.task_id!==null&&n.set(e.task_id,[...n.get(e.task_id)??[],e]);return e.filter(e=>n.has(e.id)).map(e=>kr(e,n.get(e.id)??[])).sort((e,t)=>t.latest_started_at.localeCompare(e.latest_started_at))}function kr(e,t){return{key:e.id,label:e.title,latest_started_at:e.created_at,run_count:t.length,task_count:1,prd_count:0,spec_count:0,evidence_count:0,test_count:e.test_count??0,event_count:t.reduce((e,t)=>e+t.event_count,0),total_tokens:Ar(t.map(e=>e.total_tokens)),estimated_usd:Ar(t.map(e=>e.estimated_usd)),estimated_brl:Ar(t.map(e=>e.estimated_brl)),duration_ms:Ar(t.map(e=>e.duration_ms)),coverage:t.reduce((e,t)=>({events:e.events+t.coverage.events,tokens:e.tokens+t.coverage.tokens,usd:e.usd+t.coverage.usd,brl:e.brl+t.coverage.brl}),Dr)}}function Ar(e){return e.length===0||e.some(e=>e===null)?null:e.reduce((e,t)=>e+t,0)}var jr=[`#00b0f0`,`#5ea7ff`,`#a78bfa`,`#f5c451`,`#fb7185`,`#94a3b8`];function Mr({rows:e,daily:t,models:n,currency:r,locale:i}){let a=Nr(i),o=[[a.input,Br(e.map(e=>e.input_tokens))],[a.cache,Br(e.map(e=>e.cached_input_tokens))],[a.output,Br(e.map(e=>e.output_tokens))],[a.reasoning,Br(e.map(e=>e.reasoning_tokens))]],s=Ir(n,r),c=Math.max(1,...s.map(e=>Fr(e,r)??0)),l=Lr(t,r),u=Math.max(1,...l.map(e=>e.value)),d=l.map((e,t)=>({...e,x:t/(l.length-1)*100,y:82-e.value/u*58})),p=d.map(e=>`${e.x},${e.y}`).join(` `);return(0,f.jsxs)(`section`,{className:`cost-chart-grid`,"aria-label":a.analyticsView,children:[(0,f.jsxs)(`article`,{className:`cost-chart cost-chart-trend`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`small`,{children:a.trend}),(0,f.jsx)(`h2`,{children:a.dailyCost})]}),(0,f.jsx)(`strong`,{children:a.sevenDays})]}),(0,f.jsxs)(`div`,{className:`cost-trend-plot`,children:[(0,f.jsxs)(`svg`,{className:`cost-line-chart`,role:`img`,viewBox:`0 0 100 100`,preserveAspectRatio:`none`,children:[(0,f.jsx)(`title`,{children:a.dailyCostChart}),(0,f.jsx)(`defs`,{children:(0,f.jsxs)(`linearGradient`,{id:`cost-area`,x1:`0`,x2:`0`,y1:`0`,y2:`1`,children:[(0,f.jsx)(`stop`,{stopColor:`#00b0f0`,stopOpacity:`.34`}),(0,f.jsx)(`stop`,{offset:`1`,stopColor:`#00b0f0`,stopOpacity:`0`})]})}),(0,f.jsx)(`polygon`,{fill:`url(#cost-area)`,points:`0,100 ${p} 100,100`}),(0,f.jsx)(`polyline`,{fill:`none`,points:p,stroke:`#00b0f0`,strokeWidth:`2`,vectorEffect:`non-scaling-stroke`})]}),d.map((e,t)=>(0,f.jsx)(`span`,{className:`cost-trend-value${t===0?` is-first`:t===d.length-1?` is-last`:``}`,style:{left:`${e.x}%`,top:`${e.y}%`},children:k(e.value,r,i)},e.key))]}),(0,f.jsx)(`div`,{className:`cost-trend-days`,children:d.map(e=>(0,f.jsx)(`span`,{children:zr(e.date,i)},e.key))})]}),(0,f.jsxs)(`article`,{className:`cost-chart cost-chart-model`,children:[(0,f.jsx)(`header`,{children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`small`,{children:a.distribution}),(0,f.jsx)(`h2`,{children:a.costByModel})]})}),(0,f.jsx)(`div`,{className:`cost-bar-list`,children:s.slice(0,6).map((e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:e.label}),(0,f.jsx)(`i`,{children:(0,f.jsx)(`b`,{style:{width:`${(Fr(e,r)??0)/c*100}%`,background:jr[t]}})}),(0,f.jsx)(`strong`,{children:k(Fr(e,r),r,i)})]},e.key))})]}),(0,f.jsxs)(`article`,{className:`cost-chart`,children:[(0,f.jsx)(`header`,{children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`small`,{children:a.composition}),(0,f.jsx)(`h2`,{children:a.tokenMix})]})}),(0,f.jsx)(`div`,{className:`token-mix`,children:o.map(([e,t],n)=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`i`,{style:{background:jr[n]}}),(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(`strong`,{children:O(t,i)})]},e))})]}),(0,f.jsxs)(`article`,{className:`cost-chart cost-chart-phases`,children:[(0,f.jsx)(`header`,{children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`small`,{children:a.phases}),(0,f.jsx)(`h2`,{children:a.totalsByPhase})]})}),(0,f.jsx)(`div`,{className:`phase-strip`,children:[`conversation`,`planning`,`execution`].map((t,n)=>{let a=e.filter(e=>e.phase===t),o=Br(a.map(e=>e.duration_ms)),s=Br(a.map(e=>e.total_tokens)),c=Br(a.map(e=>r===`BRL`?e.estimated_brl:e.estimated_usd));return(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{className:`phase-name`,children:[(0,f.jsx)(`i`,{style:{background:jr[n]}}),(0,f.jsx)(`span`,{children:Pr(t,i)})]}),(0,f.jsxs)(`dl`,{className:`phase-metrics`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`dt`,{children:i===`pt-BR`?`Tempo`:`Time`}),(0,f.jsx)(`dd`,{children:D(o,i)})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`dt`,{children:`Tokens`}),(0,f.jsx)(`dd`,{children:O(s,i)})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`dt`,{children:i===`pt-BR`?`Custo`:`Cost`}),(0,f.jsx)(`dd`,{children:k(c,r,i)})]})]})]},t)})})]})]})}function Nr(e){return e===`pt-BR`?{analyticsView:`Visão analítica`,trend:`TENDÊNCIA`,dailyCost:`Custo diário`,sevenDays:`7 dias`,dailyCostChart:`Custo diário dos últimos 7 dias`,distribution:`DISTRIBUIÇÃO`,costByModel:`Custo por modelo`,composition:`COMPOSIÇÃO`,tokenMix:`Mix de tokens`,phases:`FASES`,totalsByPhase:`Totais por fase`,input:`Entrada`,cache:`Cache`,output:`Saída`,reasoning:`Raciocínio`}:{analyticsView:`Analytics overview`,trend:`TREND`,dailyCost:`Daily cost`,sevenDays:`7 days`,dailyCostChart:`Daily cost for the last 7 days`,distribution:`DISTRIBUTION`,costByModel:`Cost by model`,composition:`COMPOSITION`,tokenMix:`Token mix`,phases:`PHASES`,totalsByPhase:`Totals by phase`,input:`Input`,cache:`Cache`,output:`Output`,reasoning:`Reasoning`}}function Pr(e,t){return t===`en-US`?e===`conversation`?`Conversation`:e===`planning`?`Planning`:`Execution`:e===`conversation`?`Conversa`:e===`planning`?`Planejamento`:`Execução`}function Fr(e,t){return t===`BRL`?e.estimated_brl:e.estimated_usd}function Ir(e,t){return e.filter(e=>Fr(e,t)!==null)}function Lr(e,t,n=new Date){let r=new Map(e.map(e=>[e.key,Fr(e,t)??0]));return Array.from({length:7},(e,t)=>{let i=new Date(n.getFullYear(),n.getMonth(),n.getDate()-(6-t)),a=Rr(i);return{date:i,key:a,value:r.get(a)??0}})}function Rr(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function zr(e,t){return new Intl.DateTimeFormat(t,{weekday:`short`,day:`2-digit`,month:`2-digit`}).format(e).replace(`.`,``)}function Br(e){let t=e.filter(e=>e!==null);return t.length?t.reduce((e,t)=>e+t,0):null}var Vr={query:``,provider:``,phase:``,origin:``,workType:``,agent:``,model:``,status:``,priority:``,risk:``};function Hr({available:e,hideQuery:t=!1,locale:n,value:r,onChange:i}){let a=(e,t)=>i({...r,[e]:t}),o=n===`en-US`?{search:`Search costs`,placeholder:`Run, task, model…`,agent:`Agent`,model:`Model`,priority:`Priority`,risk:`Risk`,phase:`Phase`,origin:`Origin`,work:`Work`,all:`All`,clear:`Clear`}:{search:`Buscar custos`,placeholder:`Run, task, modelo…`,agent:`Agente`,model:`Modelo`,priority:`Prioridade`,risk:`Risco`,phase:`Fase`,origin:`Entrada`,work:`Trabalho`,all:`Todos`,clear:`Limpar`};return(0,f.jsxs)(`section`,{className:`cost-filters`,children:[t?null:(0,f.jsx)(`input`,{"aria-label":o.search,onChange:e=>a(`query`,e.target.value),placeholder:o.placeholder,value:r.query}),(0,f.jsx)(Ur,{allLabel:o.all,label:`Provider`,onChange:e=>a(`provider`,e),options:e.providers,value:r.provider}),(0,f.jsx)(Ur,{allLabel:o.all,label:o.agent,onChange:e=>a(`agent`,e),options:e.agents,value:r.agent}),(0,f.jsx)(Ur,{allLabel:o.all,label:o.model,onChange:e=>a(`model`,e),options:e.models,value:r.model}),(0,f.jsx)(Ur,{label:`Status`,allLabel:o.all,onChange:e=>a(`status`,e),options:e.statuses,value:r.status}),(0,f.jsx)(Ur,{allLabel:o.all,label:o.priority,onChange:e=>a(`priority`,e),options:e.priorities,value:r.priority}),(0,f.jsx)(Ur,{allLabel:o.all,label:o.risk,onChange:e=>a(`risk`,e),options:e.risks,value:r.risk}),(0,f.jsx)(Ur,{allLabel:o.all,label:o.phase,onChange:e=>a(`phase`,e),options:e.phases,value:r.phase}),(0,f.jsx)(Ur,{allLabel:o.all,label:o.origin,onChange:e=>a(`origin`,e),options:e.origins,value:r.origin}),(0,f.jsx)(Ur,{allLabel:o.all,label:o.work,onChange:e=>a(`workType`,e),options:e.work_types,value:r.workType}),(0,f.jsx)(`button`,{onClick:()=>i(Vr),type:`button`,children:o.clear})]})}function Ur({allLabel:e=`Todos`,label:t,value:n,options:r,onChange:i}){return(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:t}),(0,f.jsxs)(`select`,{onChange:e=>i(e.target.value),value:n,children:[(0,f.jsx)(`option`,{value:``,children:e}),r.map(e=>(0,f.jsx)(`option`,{value:e,children:e},e))]})]})}function Wr(e,t,n){let r=new Map(e.map(e=>[e.key,{...e}])),i=new Map,a=e=>{let t=Jr(e,n);if(t===null)return null;let i=r.get(t);if(i!==void 0)return i;let a={key:t,label:t,latest_started_at:Yr(t,n),run_count:0,task_count:0,event_count:0,total_tokens:null,estimated_usd:null,estimated_brl:null,duration_ms:null,coverage:{events:0,tokens:0,usd:0,brl:0},prd_count:0,spec_count:0,evidence_count:0,test_count:0};return r.set(t,a),a};for(let e of t.prds){let t=a(e.created_at);t!==null&&(t.prd_count+=1)}for(let e of t.specs){let t=a(e.created_at);t!==null&&(t.spec_count+=1)}for(let e of t.tasks){let t=a(e.created_at);if(t===null)continue;t.test_count+=e.test_count??0;let n=i.get(t.key)??new Set;for(let t of e.result?.evidence_ids??[])n.add(t);i.set(t.key,n)}for(let[e,t]of i){let n=r.get(e);n!==void 0&&(n.evidence_count=t.size)}return[...r.values()].sort((e,t)=>t.key.localeCompare(e.key))}function Gr(e,t){let n=e.length;return{tasks:n===0?null:e.reduce((e,t)=>e+t.task_count,0)/n,specs:n===0?null:e.reduce((e,t)=>e+t.spec_count,0)/n,prds:n===0?null:e.reduce((e,t)=>e+t.prd_count,0)/n,durationMs:qr(e.map(e=>e.duration_ms),n),tokens:Kr(e.map(e=>e.total_tokens)),cost:Kr(e.map(e=>t===`BRL`?e.estimated_brl:e.estimated_usd))}}function Kr(e){let t=e.filter(e=>e!==null);return t.length===0?null:t.reduce((e,t)=>e+t,0)/t.length}function qr(e,t){return t===0?null:e.reduce((e,t)=>e+(t??0),0)/t}function Jr(e,t){return e===null||!/^\d{4}-\d{2}-\d{2}/.test(e)?null:t===`annual`?e.slice(0,4):t===`monthly`?e.slice(0,7):e.slice(0,10)}function Yr(e,t){return t===`annual`?`${e}-01-01T00:00:00.000Z`:t===`monthly`?`${e}-01T00:00:00.000Z`:`${e}T00:00:00.000Z`}function Xr({currency:e,locale:t,period:n,rows:r}){let i=Gr(r,e);return(0,f.jsx)(j,{ariaLabel:Zr(n,t),metrics:[{label:Qr(t===`pt-BR`?`Tarefas`:`Tasks`,n,t),value:ne(i.tasks,t,1)},{label:Qr(`SPECs`,n,t),value:ne(i.specs,t,1)},{label:Qr(`PRDs`,n,t),value:ne(i.prds,t,1)},{label:Qr(t===`pt-BR`?`Tempo`:`Time`,n,t),value:te(i.durationMs,t)},{label:Qr(`Tokens`,n,t),value:O(i.tokens,t)},{label:Qr(t===`pt-BR`?`Custo`:`Cost`,n,t),value:k(i.cost,e,t)}]})}function Zr(e,t){return t===`en-US`?e===`daily`?`Daily averages`:e===`monthly`?`Monthly averages`:`Annual averages`:e===`daily`?`Médias por dia`:e===`monthly`?`Médias por mês`:`Médias por ano`}function Qr(e,t,n){return n===`en-US`?`${e} ${t===`daily`?`Daily average`:t===`monthly`?`Monthly average`:`Annual average`}`:`${e} ${t===`daily`?`Médio por dia`:t===`monthly`?`Médio por mês`:`Médio por ano`}`}function $r({overview:e,currency:t,locale:n}){let r=n===`pt-BR`,i=t===`BRL`?e.estimated_brl:e.estimated_usd;return(0,f.jsx)(`section`,{"aria-label":`Resumo de custos`,className:`cost-summary`,children:[[r?`Custo estimado`:`Estimated cost`,k(i,t,n),r?`Período atual · custo observado`:`Current period · observed cost`],[`Tokens`,O(e.total_tokens,n),r?`${e.coverage.tokens}/${e.event_count} eventos · ${O(e.known_tokens_per_cycle,n)} tokens/ciclo`:`${e.coverage.tokens}/${e.event_count} events · ${O(e.known_tokens_per_cycle,n)} tokens/cycle`],[r?`BRL registrado`:`Recorded BRL`,k(e.recorded_brl,`BRL`,n),r?`Histórico fixado no registro`:`Historical value fixed when recorded`],[r?`Tarefas`:`Tasks`,String(e.task_count),r?`${e.task_count} no período`:`${e.task_count} in period`],[r?`Chamadas de Agentes`:`Agent Calls`,String(e.run_count),r?`${e.event_count} segmentos de uso · top 10 = ${ei(e.top_10_token_share,n)}`:`${e.event_count} usage segments · top 10 = ${ei(e.top_10_token_share,n)}`]].map(([e,t,n])=>(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(`strong`,{children:t}),(0,f.jsx)(`small`,{children:n})]},e))})}function ei(e,t){return e===null?`—`:new Intl.NumberFormat(t,{style:`percent`,maximumFractionDigits:1}).format(e)}function ti({rows:e,locale:t}){let n=new Map;for(let r of e){let e=ri(r.model,t);e===null||!ii(r)||n.set(e,[...n.get(e)??[],r])}let r=[...n].map(([e,n])=>{let r=e=>n.reduce((t,n)=>{let r=n[e];return typeof r==`number`?(t??0)+r:t},null),i=r(`input_tokens`),a=r(`cached_input_tokens`),o=r(`output_tokens`),s=r(`input_cost_usd`),c=r(`cached_input_cost_usd`),l=r(`output_cost_usd`),u=r(`reasoning_cost_usd`),d=r(`estimated_usd`),f=r(`estimated_brl`),p=B(n.map(wi));return{model:e,runs:n.length,durationMs:ni(n),input:i,cached:a,output:o,reasoning:r(`reasoning_tokens`),total:r(`total_tokens`),inputUsd:s,cacheUsd:c,outputUsd:l,reasoningUsd:u,contextUpliftUsd:p,speedUpliftUsd:r(`speed_uplift_usd`),estimatedUsd:d,estimatedBrl:f,scenario:Ei(n,t)}}).sort((e,t)=>e.model.localeCompare(t.model));return(0,f.jsx)(C,{columns:[{key:`model`,label:`Modelo`,render:e=>e.model,sortValue:e=>e.model,footer:`Total`,description:Ti(t,`Modelo efetivamente identificado nas chamadas de agentes agregadas nesta linha. Runs sem modelo identificável são agrupadas como Indefinido.`,`Model identified in the agent calls aggregated in this row. Runs without an identifiable model are grouped as Undefined.`)},{key:`scenario`,hidden:!0,label:t===`pt-BR`?`Velocidade`:`Speed`,render:e=>e.scenario,sortValue:e=>e.scenario,description:Ti(t,`Velocidade observada nas chamadas de agentes. Misto indica que o grupo contém mais de um cenário de velocidade.`,`Speed observed in agent calls. Mixed indicates that the group contains more than one speed scenario.`)},{key:`runs`,label:t===`pt-BR`?`Chamadas de Agentes`:`Agent Calls`,render:e=>e.runs,sortValue:e=>e.runs,align:`right`,footer:r.reduce((e,t)=>e+t.runs,0)},{key:`durationMs`,label:t===`pt-BR`?`Tempo de processamento`:`Processing time`,render:e=>D(e.durationMs),sortValue:e=>e.durationMs,description:Ti(t,`Soma do tempo observado nas Runs raiz de orquestração atribuídas a este modelo. Intake e Sub-Runs são excluídos para evitar sobreposição.`,`Sum of the observed time for root orchestration Runs attributed to this model. Intake and Sub-Runs are excluded to avoid overlap.`),align:`right`,footer:D(B(r.map(e=>e.durationMs)))},{key:`input`,label:t===`pt-BR`?`Tokens de entrada`:`Input tokens`,render:e=>si(e.input,t),sortValue:e=>e.input,align:`right`,footer:si(B(r.map(e=>e.input)),t)},{key:`cache`,label:t===`pt-BR`?`Tokens em cache`:`Cached tokens`,render:e=>si(e.cached,t),sortValue:e=>e.cached,description:Ti(t,`Parcela dos tokens de entrada atendida pelo cache. Ela está contida em Tokens de entrada e não deve ser somada novamente ao total de tokens.`,`Share of input tokens served from cache. It is included in Input tokens and must not be added to the token total again.`),align:`right`,footer:si(B(r.map(e=>e.cached)),t)},{key:`output`,label:t===`pt-BR`?`Tokens de saída`:`Output tokens`,render:e=>si(e.output,t),sortValue:e=>e.output,align:`right`,footer:si(B(r.map(e=>e.output)),t)},{key:`reasoning`,label:t===`pt-BR`?`Tokens de raciocínio`:`Reasoning tokens`,render:e=>si(e.reasoning,t),sortValue:e=>e.reasoning,description:Ti(t,`Tokens internos de raciocínio reportados pelo provedor. São parte da saída e aparecem separados para auditoria, sem duplicar o total de tokens.`,`Internal reasoning tokens reported by the provider. They are part of the output and are shown separately for auditing without duplicating the token total.`),align:`right`,footer:si(B(r.map(e=>e.reasoning)),t)},{key:`total`,label:t===`pt-BR`?`Total de tokens`:`Total tokens`,render:e=>si(e.total,t),sortValue:e=>e.total,description:Ti(t,`Total auditável calculado como tokens de entrada mais tokens de saída. Cache e raciocínio são subconjuntos e não são adicionados novamente.`,`Auditable total calculated as input tokens plus output tokens. Cache and reasoning are subsets and are not added again.`),align:`right`,footer:si(B(r.map(e=>e.total)),t)},{key:`inputUsd`,label:t===`pt-BR`?`Custo entrada (USD)`:`Input cost (USD)`,render:e=>z(e.inputUsd,t),sortValue:e=>e.inputUsd,align:`right`,footer:z(B(r.map(e=>e.inputUsd)),t)},{key:`cacheUsd`,label:t===`pt-BR`?`Custo cache (USD)`:`Cache cost (USD)`,render:e=>z(e.cacheUsd,t),sortValue:e=>e.cacheUsd,align:`right`,footer:z(B(r.map(e=>e.cacheUsd)),t)},{key:`outputUsd`,label:t===`pt-BR`?`Custo saída (USD)`:`Output cost (USD)`,render:e=>z(e.outputUsd,t),sortValue:e=>e.outputUsd,align:`right`,footer:z(B(r.map(e=>e.outputUsd)),t)},{key:`reasoningUsd`,label:t===`pt-BR`?`Custo raciocínio (USD)`:`Reasoning cost (USD)`,render:e=>z(e.reasoningUsd,t),sortValue:e=>e.reasoningUsd,align:`right`,footer:z(B(r.map(e=>e.reasoningUsd)),t)},{key:`contextUpliftUsd`,label:t===`pt-BR`?`Acréscimo contexto incluído (USD)`:`Included context uplift (USD)`,render:e=>z(e.contextUpliftUsd,t),sortValue:e=>e.contextUpliftUsd,description:Ti(t,`Parcela adicional causada pelos multiplicadores de contexto. Ela já está incluída nos custos e no Total (USD); não deve ser somada novamente. O cálculo usa os segmentos de uso internos de cada Agent Run, sem criar uma visão separada de Calls; multiplicadores 1× / 1× resultam em US$ 0,00.`,`Additional amount caused by context multipliers. It is already included in costs and Total (USD) and must not be added again. The calculation uses each Agent Run's internal usage segments without creating a separate Calls view; 1× / 1× multipliers result in US$0.00.`),align:`right`,footer:z(B(r.map(e=>e.contextUpliftUsd)),t)},{key:`speedUpliftUsd`,label:t===`pt-BR`?`Acréscimo velocidade incluído (USD)`:`Included speed uplift (USD)`,render:e=>z(e.speedUpliftUsd,t),sortValue:e=>e.speedUpliftUsd,description:Ti(t,`Diferença entre o custo efetivo Priority/Fast e o custo Standard equivalente. Já está incluída nos custos efetivos e no Total (USD); é separada apenas como referência.`,`Difference between the effective Priority/Fast cost and the equivalent Standard cost. It is already included in effective costs and Total (USD) and is separated only for reference.`),align:`right`,footer:z(B(r.map(e=>e.speedUpliftUsd)),t)},{key:`estimatedUsd`,label:t===`pt-BR`?`Custo Final no Período`:`Period final cost`,render:e=>z(e.estimatedUsd,t),sortValue:e=>e.estimatedUsd,description:Ti(t,`Custo efetivo total em USD, incluindo tarifas de contexto e velocidade quando aplicáveis.`,`Total effective cost in USD, including context and speed rates when applicable.`),align:`right`,footer:z(B(r.map(e=>e.estimatedUsd)),t)},{key:`estimatedBrl`,label:t===`pt-BR`?`Custo Final atual`:`Current final cost`,render:e=>k(e.estimatedBrl,`BRL`,t),sortValue:e=>e.estimatedBrl,description:Ti(t,`Conversão do Total (USD) pela cotação atual configurada no projeto.`,`Conversion of Total (USD) using the current exchange rate configured for the project.`),align:`right`,footer:k(B(r.map(e=>e.estimatedBrl)),`BRL`,t)}],locale:t,rowKey:e=>e.model,rows:r,showColumnInfo:!0,sortable:!0})}function ni(e){return B(e.filter(ai).map(e=>e.duration_ms))}function ri(e,t){if(Si(e))return e;let n=e.trim().toLowerCase();return n.length===0||n===`unknown`?t===`pt-BR`?`Indefinido`:`Undefined`:null}function ii(e){return Ci(e)||ai(e)&&e.duration_ms!==null}function ai(e){return e.run_kind===`run`&&e.run_purpose===`orchestration`}function oi(){return(0,f.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1.5`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1.5`})]})}function si(e,t){return e===null||e<=0?`-`:new Intl.NumberFormat(t,{maximumFractionDigits:0}).format(e)}function ci(e,t,n){return e===`BRL`?t:n}function li(e){return e.prd_id===null?e.spec_id===null?{label:`Tarefa avulsa`,tone:`task`}:{label:`SPEC`,tone:`spec`}:{label:`PRD`,tone:`prd`}}function ui({rows:e,onOpenRun:t,currency:n,locale:r,compact:i=!1}){let a=t=>B(e.map(e=>e[t])),o=t=>!i||di(e,t);return(0,f.jsx)(C,{columns:[{key:`startedAt`,label:r===`pt-BR`?`Data e hora`:`Date and time`,render:e=>vi(e.started_at,r),footer:`Total`},{key:`run`,label:`Run`,render:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:e.run_id}),(0,f.jsx)(`small`,{children:e.task_title})]})},{key:`origin`,label:r===`pt-BR`?`Origem`:`Origin`,render:e=>{let t=li(e);return(0,f.jsx)(`span`,{className:`cost-run-origin cost-run-origin-${t.tone}`,children:t.label})}},{key:`duration`,label:r===`pt-BR`?`Tempo de execução`:`Execution time`,render:e=>e.duration_ms===null||e.duration_ms<=0?`-`:D(e.duration_ms),align:`right`,footer:D(a(`duration_ms`)),hidden:!o(e=>e.duration_ms)},{key:`agent`,label:r===`pt-BR`?`Agente`:`Agent`,render:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:e.agent_name}),(0,f.jsx)(`small`,{children:`${e.run_kind===`run`?`Run`:`Sub-Run`} · ${e.run_purpose}`})]})},{key:`model`,label:`Modelo`,render:e=>{let t=xi(e);return t.detail===`-`?(0,f.jsx)(`strong`,{children:t.primary}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:t.primary}),(0,f.jsx)(`small`,{children:t.detail})]})}},{key:`effort`,label:r===`pt-BR`?`Esforço`:`Effort`,render:e=>_i(e.effective_reasoning_effort,`effort`,r),hidden:!o(e=>e.effective_reasoning_effort)},{key:`speed`,label:r===`pt-BR`?`Velocidade`:`Speed`,render:e=>_i(e.service_tier,`speed`,r),hidden:!o(e=>e.service_tier)},{key:`inputTokens`,label:r===`pt-BR`?`Tokens entrada`:`Input tokens`,render:e=>si(e.input_tokens,r),align:`right`,footer:si(a(`input_tokens`),r),hidden:!o(e=>e.input_tokens)},{key:`cachedInputTokens`,label:r===`pt-BR`?`Tokens cache`:`Cached tokens`,render:e=>si(e.cached_input_tokens,r),align:`right`,footer:si(a(`cached_input_tokens`),r),hidden:!o(e=>e.cached_input_tokens)},{key:`uncachedInputTokens`,label:r===`pt-BR`?`Entrada sem cache`:`Uncached input`,render:e=>si(e.uncached_input_tokens,r),align:`right`,footer:si(a(`uncached_input_tokens`),r),hidden:!o(e=>e.uncached_input_tokens)},{key:`outputTokens`,label:r===`pt-BR`?`Tokens saída`:`Output tokens`,render:e=>si(e.output_tokens,r),align:`right`,footer:si(a(`output_tokens`),r),hidden:!o(e=>e.output_tokens)},{key:`reasoningTokens`,label:r===`pt-BR`?`Tokens raciocínio`:`Reasoning tokens`,render:e=>si(e.reasoning_tokens,r),align:`right`,footer:si(a(`reasoning_tokens`),r),hidden:!o(e=>e.reasoning_tokens)},{key:`visibleOutputTokens`,label:r===`pt-BR`?`Saída visível`:`Visible output`,render:e=>si(e.visible_output_tokens,r),align:`right`,footer:si(a(`visible_output_tokens`),r),hidden:!o(e=>e.visible_output_tokens)},{key:`totalTokens`,label:`Total tokens`,render:e=>si(e.input_tokens!==null&&e.output_tokens!==null?e.input_tokens+e.output_tokens:e.total_tokens,r),align:`right`,footer:si(a(`total_tokens`),r),hidden:!o(e=>e.total_tokens)},{key:`inputRate`,label:`USD/M entrada`,render:e=>fi(e.input_rate_usd_per_million,r),align:`right`,hidden:!o(e=>e.input_rate_usd_per_million)},{key:`cacheRate`,label:`USD/M cache`,render:e=>fi(e.cached_input_rate_usd_per_million,r),align:`right`,hidden:!o(e=>e.cached_input_rate_usd_per_million)},{key:`outputRate`,label:`USD/M saída`,render:e=>fi(e.output_rate_usd_per_million,r),align:`right`,hidden:!o(e=>e.output_rate_usd_per_million)},{key:`reasoningRate`,label:`USD/M raciocínio`,render:e=>fi(e.reasoning_rate_usd_per_million,r),align:`right`,hidden:!o(e=>e.reasoning_rate_usd_per_million)},{key:`contextMultiplier`,label:`Mult. contexto E/S`,description:Ti(r,`Multiplicadores aplicados aos segmentos de uso desta Agent Run quando o limite de contexto do modelo é ultrapassado. O total da Run agrega os segmentos sem expor cada Call.`,`Multipliers applied to this Agent Run's usage segments when the model context limit is exceeded. The Run total aggregates those segments without exposing each Call.`),render:e=>gi(e.context_input_multiplier,e.context_output_multiplier),align:`right`,hidden:!o(e=>e.context_input_multiplier)},{key:`speedMultiplier`,label:r===`pt-BR`?`Cenário velocidade API`:`API speed scenario`,description:Ti(r,`Cenário de preço efetivo observado nesta Agent Run. Priority/Fast pode elevar as tarifas em relação ao cenário Standard.`,`Effective pricing scenario observed in this Agent Run. Priority/Fast may increase rates compared with the Standard scenario.`),render:e=>hi(e.service_tier,r),align:`right`,hidden:!o(e=>e.service_tier)},{key:`inputCost`,label:`USD entrada`,render:e=>z(e.input_cost_usd,r),align:`right`,footer:z(a(`input_cost_usd`),r),hidden:!o(e=>e.input_cost_usd)},{key:`cacheCost`,label:`USD cache`,render:e=>z(e.cached_input_cost_usd,r),align:`right`,footer:z(a(`cached_input_cost_usd`),r),hidden:!o(e=>e.cached_input_cost_usd)},{key:`outputCost`,label:`USD saída`,render:e=>z(e.output_cost_usd,r),align:`right`,footer:z(a(`output_cost_usd`),r),hidden:!o(e=>e.output_cost_usd)},{key:`reasoningCost`,label:`USD raciocínio`,render:e=>z(e.reasoning_cost_usd,r),align:`right`,footer:z(a(`reasoning_cost_usd`),r),hidden:!o(e=>e.reasoning_cost_usd)},{key:`standardCost`,label:`USD padrão`,render:e=>z(e.standard_cost_usd,r),align:`right`,footer:z(a(`standard_cost_usd`),r),hidden:!o(e=>e.standard_cost_usd)},{key:`speedUplift`,label:`USD acréscimo rápido`,description:Ti(r,`Parcela adicional causada pela velocidade Priority/Fast. Este valor já está incluído no custo efetivo e no total; é exibido separadamente apenas para auditoria.`,`Additional amount caused by Priority/Fast speed. This value is already included in the effective cost and total; it is shown separately for auditing only.`),render:e=>z(e.speed_uplift_usd,r),align:`right`,footer:z(a(`speed_uplift_usd`),r),hidden:!o(e=>e.speed_uplift_usd)},{key:`finalUsd`,label:r===`pt-BR`?`USD estimado API`:`Estimated API USD`,render:e=>z(e.estimated_usd,r),align:`right`,footer:z(a(`estimated_usd`),r),hidden:!o(e=>e.estimated_usd)},{key:`fxRate`,label:r===`pt-BR`?`Cotação atual`:`Current exchange rate`,render:e=>pi(e.fx_rate,r),align:`right`,hidden:!o(e=>e.fx_rate)},{key:`recordedFxRate`,label:r===`pt-BR`?`Cotação no período`:`Period exchange rate`,render:e=>pi(e.recorded_fx_rate,r),align:`right`,hidden:!o(e=>e.recorded_fx_rate)},{key:`recordedBrl`,label:r===`pt-BR`?`Custo Final no Período`:`Period final cost`,render:e=>k(e.recorded_brl,`BRL`,r),align:`right`,footer:k(a(`recorded_brl`),`BRL`,r),hidden:!o(e=>e.recorded_brl)},{key:`cost`,label:r===`pt-BR`?`Custo Final atual`:`Current final cost`,render:e=>{let t=n===`BRL`?e.estimated_brl:e.estimated_usd;return t===null||t<=0?`-`:k(t,n,r)},sortValue:e=>ci(n,e.estimated_brl,e.estimated_usd),align:`right`,footer:k(a(n===`BRL`?`estimated_brl`:`estimated_usd`),n,r),hidden:!o(e=>n===`BRL`?e.estimated_brl:e.estimated_usd)},{key:`trace`,label:``,render:e=>(0,f.jsx)(`button`,{"aria-label":`Abrir detalhes da Run`,className:`cost-row-action`,onClick:n=>{n.stopPropagation(),t(e.run_id)},type:`button`,children:(0,f.jsx)(oi,{})})}],locale:r,rowKey:e=>e.run_id,onRowClick:e=>t(e.run_id),rows:e,showColumnInfo:!0,sortable:!0})}function di(e,t){return e.some(e=>{let n=t(e);return n!==null&&n!==0&&n!==``})}function fi(e,t){return e===null?`-`:new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function pi(e,t){return e===null?`-`:`R$ ${fi(e,t)}`}function z(e,t){return e===null?`-`:new Intl.NumberFormat(t,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function mi(e){return e===null?`-`:`${e.toLocaleString(`en-US`,{maximumFractionDigits:3})}×`}function hi(e,t){return e===`fast`?t===`pt-BR`?`Priority (derivado de Fast)`:`Priority (derived from Fast)`:e===`priority`?`Priority (API)`:e==="default"?`Standard (API)`:`-`}function gi(e,t){return e===null||t===null?`-`:`${mi(e)} / ${mi(t)}`}function _i(e,t,n){return e===null?`-`:n===`pt-BR`?{low:`Leve`,medium:`Médio`,high:`Alto`,xhigh:`Extra alto`,max:`Ultra`,default:`Padrão`,priority:`Rápido`}[e]??e:e}function vi(e,t){return!e||Number.isNaN(Date.parse(e))?`—`:new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(e))}function yi(e,t,n){if(t===`annual`)return e.slice(0,4);if(t===`monthly`)return e.slice(0,7);let r=new Date(`${e}T12:00:00.000Z`);return Number.isNaN(r.getTime())?e:new Intl.DateTimeFormat(n,{dateStyle:`short`,timeZone:`UTC`}).format(r)}function bi({rows:e,currency:t,locale:n,onOpenTrace:r,period:i,showDateTime:a=!0,dateHeading:o,labelHeading:s}){let c={runs:e.reduce((e,t)=>e+t.run_count,0),tasks:e.reduce((e,t)=>e+t.task_count,0),prds:e.reduce((e,t)=>e+t.prd_count,0),specs:e.reduce((e,t)=>e+t.spec_count,0),evidences:e.reduce((e,t)=>e+t.evidence_count,0),tests:e.reduce((e,t)=>e+t.test_count,0),duration:B(e.map(e=>e.duration_ms)),tokens:B(e.map(e=>e.total_tokens)),usd:B(e.map(e=>e.estimated_usd)),brl:B(e.map(e=>e.estimated_brl))};return(0,f.jsx)(C,{columns:[{key:`latestStartedAt`,label:o??(n===`pt-BR`?`Data e hora`:`Date and time`),render:e=>vi(e.latest_started_at,n),hidden:!a,footer:a?`Total`:void 0},{key:`label`,label:i===void 0?s??(n===`pt-BR`?`Grupo`:`Group`):n===`pt-BR`?`Período`:`Period`,render:e=>i===void 0?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:e.label}),e.key===e.label?null:(0,f.jsx)(`small`,{children:e.key})]}):(0,f.jsx)(`strong`,{children:yi(e.key,i,n)}),sortValue:e=>e.key,footer:a?void 0:`Total`},{key:`runs`,label:`Runs`,render:e=>e.run_count,align:`right`,footer:c.runs},{key:`tasks`,label:`Tasks`,render:e=>e.task_count,align:`right`,footer:c.tasks},...i===void 0?[]:[{key:`prds`,label:`PRDs`,render:e=>e.prd_count,align:`right`,footer:c.prds},{key:`specs`,label:`SPECs`,render:e=>e.spec_count,align:`right`,footer:c.specs},{key:`evidences`,label:n===`pt-BR`?`Evidências`:`Evidence`,render:e=>e.evidence_count,align:`right`,footer:c.evidences},{key:`tests`,label:`Tests`,render:e=>e.test_count,align:`right`,footer:c.tests}],{key:`duration`,label:`Tempo`,render:e=>D(e.duration_ms),align:`right`,footer:D(c.duration)},{key:`tokens`,label:`Tokens`,render:e=>O(e.total_tokens,n),align:`right`,footer:O(c.tokens,n)},{key:`cost`,label:n===`pt-BR`?`Custo`:`Cost`,render:e=>k(t===`BRL`?e.estimated_brl:e.estimated_usd,t,n),sortValue:e=>ci(t,e.estimated_brl,e.estimated_usd),align:`right`,footer:k(t===`BRL`?c.brl:c.usd,t,n)},...r?[{key:`trace`,label:``,render:e=>(0,f.jsx)(`button`,{"aria-label":`Abrir detalhes`,className:`cost-row-action`,onClick:t=>{t.stopPropagation(),r(e.key)},type:`button`,children:(0,f.jsx)(oi,{})})}]:[]],defaultSort:i===void 0?null:{key:`label`,direction:`desc`},locale:n,rowKey:e=>e.key,onRowClick:r===void 0?void 0:e=>r(e.key),rows:e,showColumnInfo:!0,sortable:!0})}function xi(e){return{primary:e.model,detail:e.provider===null||e.provider===`unknown`?`-`:e.provider}}function Si(e){let t=e.trim().toLowerCase();return t.length>0&&![`unknown`,`manual`,`gpt-5`].includes(t)}function Ci(e){return[e.input_tokens,e.cached_input_tokens,e.output_tokens,e.reasoning_tokens,e.total_tokens,e.estimated_usd,e.estimated_brl].some(e=>e!==null&&e>0)}function wi(e){let t=e.context_input_multiplier,n=e.context_output_multiplier;if(t===null||n===null)return null;if(t===1&&n===1)return 0;let r=(e,t)=>{if(t===1)return 0;if(t<=0||e.some(e=>e===null))return null;let n=e.reduce((e,t)=>e+(t??0),0);return n-n/t},i=r([e.input_cost_usd,e.cached_input_cost_usd],t),a=r([e.output_cost_usd,e.reasoning_cost_usd],n);return i===null||a===null?null:i+a}function Ti(e,t,n){return e===`pt-BR`?t:n}function B(e){let t=e.filter(e=>typeof e==`number`);return t.length===0?null:t.reduce((e,t)=>e+t,0)}function Ei(e,t){return new Set(e.map(e=>e.service_tier??`unknown`)).size===1?hi(e[0]?.service_tier??null,t):t===`pt-BR`?`Misto`:`Mixed`}var Di={"pt-BR":{back:`Voltar - Dashboard`,title:`ZAIP Cost Monitor`,subtitle:`Visão Git-native de Custos, Tokens e Tempo de cada Tarefa, SPEC ou PRD.`,refresh:`Atualizar`,refreshing:`Atualizando…`,filters:`Filtros`,settings:`Configurações`,language:`Idioma`,currency:`Moeda`,kicker:`ZAIP-AIOS • COST MONITOR`,heading:`Custos e tokens`,intro:`Telemetria derivada localmente, atribuída por run, tarefa, fase e origem.`,period:`Período`,allTime:`Todo o período`,last7:`Últimos 7 dias`,last30:`Últimos 30 dias`,last90:`Últimos 90 dias`,thisMonth:`Este mês`,observed:`cobertura observada`,noData:`Sem dados no filtro atual.`,tabs:{overview:`Visão geral`,models:`Modelos LLM`,agentCalls:`Chamadas de agentes`,executions:`Execuções`,conversations:`Conversas`,tasks:`Tarefas`,prds:`PRD`,specs:`SPEC`,providers:`Providers`,agents:`Zaip Agentes`,daily:`Diário`,monthly:`Mensal`,annual:`Anual`}},"en-US":{back:`Back - Dashboard`,title:`ZAIP Cost Monitor`,subtitle:`Git-native view of Costs, Tokens and Time for each Task, SPEC, or PRD.`,refresh:`Refresh`,refreshing:`Refreshing…`,filters:`Filters`,settings:`Settings`,language:`Language`,currency:`Currency`,kicker:`ZAIP-AIOS • COST MONITOR`,heading:`Costs and tokens`,intro:`Locally derived telemetry attributed by run, task, phase, and origin.`,period:`Period`,allTime:`All time`,last7:`Last 7 days`,last30:`Last 30 days`,last90:`Last 90 days`,thisMonth:`This month`,observed:`observed coverage`,noData:`No data for the current filter.`,tabs:{overview:`Overview`,models:`Models`,agentCalls:`Agent Calls`,executions:`Executions`,conversations:`Conversations`,tasks:`Tasks`,prds:`PRDs`,specs:`SPECs`,providers:`Providers`,agents:`Agents`,daily:`Daily`,monthly:`Monthly`,annual:`Annual`}}};function Oi(e){return e===`pt-BR`?`BRL`:`USD`}function ki({rows:e,currency:t,details:n,locale:r,onOpenTrace:i}){let[a,o]=(0,l.useState)(null),s=e=>o(e),c=e.reduce((e,t)=>e+t.task_count,0),u=e.reduce((e,t)=>e+t.run_count,0),d=e.reduce((e,t)=>e+(t.usage.total.tokens.total??0),0),p=e.reduce((e,n)=>e+(t===`BRL`?n.usage.total.cost.brl??0:n.usage.total.cost.usd??0),0);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(C,{columns:[{key:`createdAt`,label:r===`pt-BR`?`Data e hora`:`Date and time`,render:e=>e.created_at?vi(e.created_at,r):`—`,footer:`Total`},{key:`entity`,label:`Entidade`,render:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`strong`,{children:e.title}),(0,f.jsx)(`small`,{children:e.id})]})},{key:`status`,label:`Status`,render:e=>e.work_status},{key:`tasks`,label:`Tasks`,render:e=>e.task_count,align:`right`,footer:c},{key:`runs`,label:`Runs`,render:e=>e.run_count,align:`right`,footer:u},{key:`tokens`,label:`Tokens`,render:e=>O(e.usage.total.tokens.total,r),align:`right`,footer:O(d,r)},{key:`cost`,label:`Custo`,render:e=>k(t===`BRL`?e.usage.total.cost.brl:e.usage.total.cost.usd,t,r),sortValue:e=>ci(t,e.usage.total.cost.brl,e.usage.total.cost.usd),align:`right`,footer:k(p,t,r)},{key:`rework`,label:`Retrabalho`,render:e=>A(e.quality.rework_rate),align:`right`},{key:`actions`,label:``,render:e=>(0,f.jsx)(`button`,{"aria-label":`${r===`pt-BR`?`Abrir detalhes do`:`Open details for`} ${e.kind.toUpperCase()}`,className:`cost-row-action`,onClick:t=>{t.stopPropagation(),s(e)},type:`button`,children:(0,f.jsx)(Ai,{})})}],locale:r,rowKey:e=>e.id,onRowClick:s,rows:e,showColumnInfo:!0,sortable:!0}),a?(0,f.jsx)(Gt,{label:a.kind===`prd`?`PRD`:`SPEC`,locale:r,onClose:()=>o(null),onOpenTrace:e=>{o(null),i(e)},row:a,runs:n?.runs??[],specs:n?.specs??e.filter(e=>e.kind===`spec`),tasks:n?.tasks??[]}):null]})}function Ai(){return(0,f.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1.5`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1.5`})]})}var ji=new URL(`/assets/logo_novo_azul-BBx5pA2B.png`,``+import.meta.url).href,Mi=`executions`,V=[`overview`,`executions`,`agentCalls`,`agents`,`models`,`providers`,`tasks`,`specs`,`prds`,`conversations`,`daily`,`monthly`,`annual`];function Ni(e,t){return e.find(e=>e.id===t)??null}function Pi({locale:e}){return e===`pt-BR`?(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`cost-locale-flag`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`rect`,{fill:`#18864b`,height:`24`,rx:`5`,width:`24`}),(0,f.jsx)(`path`,{d:`m12 3.8 8.2 8.2L12 20.2 3.8 12 12 3.8Z`,fill:`#f6d64a`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,fill:`#1b4f9c`,r:`4.2`}),(0,f.jsx)(`path`,{d:`M8.8 11.2c1.9-1 4.5-1 6.4 0`,fill:`none`,stroke:`#fff`,strokeWidth:`.8`})]}):(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`cost-locale-flag`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`rect`,{fill:`#fff`,height:`24`,rx:`5`,width:`24`}),(0,f.jsx)(`path`,{d:`M0 3h24v3H0Zm0 6h24v3H0Zm0 6h24v3H0Zm0 6h24v3H0Z`,fill:`#bd3d44`}),(0,f.jsx)(`path`,{d:`M0 0h11v11H0Z`,fill:`#192f6b`}),(0,f.jsx)(`path`,{d:`m2.3 2.1.5 1 .9.1-.7.7.2 1-.9-.5-.9.5.2-1-.7-.7.9-.1.5-1Zm4 0 .5 1 .9.1-.7.7.2 1-.9-.5-.9.5.2-1-.7-.7.9-.1.5-1Z`,fill:`#fff`})]})}function Fi(){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,className:`cost-locale-chevron`,fill:`none`,viewBox:`0 0 24 24`,children:(0,f.jsx)(`path`,{d:`m6 9 6 6 6-6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`})})}function Ii(){return(0,f.jsx)(`svg`,{"aria-hidden":`true`,className:`cost-filter-icon`,fill:`none`,viewBox:`0 0 24 24`,children:(0,f.jsx)(`path`,{d:`M3 6h18M7 12h10m-7 6h4`})})}function Li(){return(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`cost-settings-icon`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.09a2 2 0 0 1 1 1.74v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z`}),(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}function Ri({capabilityNavigation:e,data:t,dashboardTitle:n=`Dashboard Zaip AIOS`,embedded:r=!1,globalFilters:i,lastUpdatedAt:a,locale:o,loading:s,onLocaleChange:c,onOpenTrace:u,onRefresh:d,operations:p,repositoryName:h,currency:g,onCurrencyChange:_}){let[v,y]=(0,l.useState)(Mi),[b,x]=(0,l.useState)(`all`),[S,C]=(0,l.useState)(Vr),[w,T]=(0,l.useState)(`BRL`),E=g??w,ee=e=>{T(e),_?.(e)},[D,te]=(0,l.useState)(`month`),[O,ne]=(0,l.useState)(!1),[k,re]=(0,l.useState)(!1),[A,j]=(0,l.useState)(!1),[N,ie]=(0,l.useState)(null),P=Di[o],ae=a===null?o===`pt-BR`?`Aguardando atualização`:`Waiting for refresh`:`${o===`pt-BR`?`Atualizado`:`Updated`} ${new Intl.DateTimeFormat(o,{dateStyle:`short`,timeStyle:`medium`}).format(new Date(a))}`,F=(0,l.useMemo)(()=>{let e=r?null:Vi(t.runs,D);return t.runs.filter(t=>zi(t,S)&&Bi(t,i)&&(!e||Date.parse(t.started_at)>=e)).sort((e,t)=>t.started_at.localeCompare(e.started_at))},[t.runs,r,S,i,D]),I=(0,l.useMemo)(()=>{let e={prds:t.prds.filter(e=>Wi(e,i)),specs:t.specs.filter(e=>Wi(e,i)),tasks:(p?.tasks??[]).filter(e=>Wi(e,i))};return{conversations:Ui(F.filter(e=>e.phase===`conversation`),e=>e.conversation_id??e.task_title??e.run_id),tasks:Or(e.tasks,F),providers:Ui(F,e=>Er(e.provider)),agents:wr(Ui(F,e=>e.agent_name),t.configured_agents),models:Ui(F,e=>e.model),daily:Wr(Ui(F,e=>e.started_at.slice(0,10)),e,`daily`),monthly:Wr(Ui(F,e=>e.started_at.slice(0,7)),e,`monthly`),annual:Wr(Ui(F,e=>e.started_at.slice(0,4)),e,`annual`)}},[t.configured_agents,t.prds,t.specs,i,p?.tasks,F]),L=Hi(F,t.overview),oe=e=>{c(e),ee(Oi(e))},se=e=>{let t=Ni(p?.runs??[],e);t&&ie(t)};return(0,f.jsxs)(r?`section`:`main`,{className:r?`cost-page cost-page-embedded`:`cost-page`,children:[r?null:(0,f.jsx)(m,{filters:(0,f.jsx)(Hr,{available:t.filters_available,hideQuery:r,locale:o,onChange:C,value:S}),filtersActive:Object.values(S).some(Boolean),lastUpdatedAt:a,loading:s,locale:o,onLocaleChange:oe,onRefresh:d,settings:(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:P.currency}),(0,f.jsxs)(`select`,{onChange:e=>ee(e.target.value),value:E,children:[(0,f.jsx)(`option`,{value:`BRL`,children:`BRL · R$`}),(0,f.jsx)(`option`,{value:`USD`,children:`USD · $`})]})]}),...h===void 0?{}:{repositoryName:h},title:n}),r?null:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`nav`,{"aria-label":`Navegação do Cost Monitor`,className:`cost-monitor-nav`,children:[(0,f.jsxs)(`div`,{className:`cost-monitor-brand`,children:[(0,f.jsx)(`strong`,{className:`cost-monitor-title`,children:P.title}),(0,f.jsx)(`small`,{className:`cost-last-updated`,children:ae})]}),(0,f.jsx)(`img`,{alt:`ZAIP`,className:`cost-monitor-logo`,src:ji}),(0,f.jsxs)(`div`,{className:`cost-nav-actions`,children:[(0,f.jsx)(`button`,{"aria-label":P.refresh,className:`cost-nav-icon cost-refresh-action`,disabled:s,onClick:d,type:`button`,children:`↻`}),(0,f.jsxs)(`div`,{className:`cost-nav-popup-anchor cost-filter-action`,children:[(0,f.jsxs)(`button`,{className:O?`cost-nav-button is-active`:`cost-nav-button`,onClick:()=>{ne(e=>!e),re(!1),j(!1)},type:`button`,children:[(0,f.jsx)(Ii,{}),` `,P.filters]}),O?(0,f.jsx)(`div`,{className:`cost-nav-popup cost-nav-filter-popup`,children:(0,f.jsx)(Hr,{available:t.filters_available,hideQuery:r,locale:o,onChange:C,value:S})}):null]}),(0,f.jsxs)(`div`,{className:`cost-nav-popup-anchor cost-locale-action`,children:[(0,f.jsxs)(`button`,{className:k?`cost-nav-button is-active`:`cost-nav-button`,onClick:()=>{re(e=>!e),ne(!1),j(!1)},type:`button`,children:[(0,f.jsx)(Pi,{locale:o}),o===`pt-BR`?`PT-BR`:`EN-US`,(0,f.jsx)(Fi,{})]}),k?(0,f.jsxs)(`div`,{className:`cost-nav-popup cost-nav-locale-popup`,children:[(0,f.jsxs)(`button`,{onClick:()=>oe(`pt-BR`),type:`button`,children:[(0,f.jsx)(Pi,{locale:`pt-BR`}),` Português do Brasil`,` `,o===`pt-BR`?`✓`:``]}),(0,f.jsxs)(`button`,{onClick:()=>oe(`en-US`),type:`button`,children:[(0,f.jsx)(Pi,{locale:`en-US`}),` English `,o===`en-US`?`✓`:``]})]}):null]}),(0,f.jsxs)(`div`,{className:`cost-nav-popup-anchor cost-settings-action`,children:[(0,f.jsx)(`button`,{"aria-label":P.settings,className:A?`cost-nav-icon is-active`:`cost-nav-icon`,onClick:()=>{j(e=>!e),ne(!1),re(!1)},type:`button`,children:(0,f.jsx)(Li,{})}),A?(0,f.jsxs)(`div`,{className:`cost-nav-popup cost-nav-settings-popup`,children:[(0,f.jsxs)(`div`,{className:`cost-mobile-settings`,children:[(0,f.jsx)(`small`,{className:`cost-mobile-updated`,children:ae}),(0,f.jsxs)(`button`,{disabled:s,onClick:d,type:`button`,children:[`↻`,` `,s?o===`pt-BR`?`Atualizando…`:`Refreshing…`:P.refresh]}),(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:o===`pt-BR`?`Idioma`:`Language`}),(0,f.jsxs)(`select`,{onChange:e=>oe(e.target.value),value:o,children:[(0,f.jsx)(`option`,{value:`pt-BR`,children:`Português do Brasil`}),(0,f.jsx)(`option`,{value:`en-US`,children:`English`})]})]}),(0,f.jsxs)(`div`,{className:`cost-mobile-filters`,children:[(0,f.jsx)(`strong`,{children:P.filters}),(0,f.jsx)(Hr,{available:t.filters_available,hideQuery:r,locale:o,onChange:C,value:S})]})]}),(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:P.currency}),(0,f.jsxs)(`select`,{onChange:e=>ee(e.target.value),value:E,children:[(0,f.jsx)(`option`,{value:`BRL`,children:`BRL · R$`}),(0,f.jsx)(`option`,{value:`USD`,children:`USD · $`})]})]})]}):null]})]})]}),(0,f.jsxs)(`header`,{className:`cost-hero`,children:[(0,f.jsx)(`p`,{className:`cost-hero-description`,children:P.subtitle}),(0,f.jsxs)(`label`,{className:`cost-period`,children:[(0,f.jsx)(`span`,{children:P.period}),(0,f.jsxs)(`select`,{onChange:e=>te(e.target.value),value:D,children:[(0,f.jsx)(`option`,{value:`all`,children:P.allTime}),(0,f.jsx)(`option`,{value:`7`,children:P.last7}),(0,f.jsx)(`option`,{value:`30`,children:P.last30}),(0,f.jsx)(`option`,{value:`90`,children:P.last90}),(0,f.jsx)(`option`,{value:`month`,children:P.thisMonth})]})]})]})]}),r?null:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)($r,{currency:E,locale:o,overview:L}),(0,f.jsxs)(`div`,{className:`cost-coverage-note`,children:[(0,f.jsx)(`span`,{children:`.agents/projections/runtime`}),(0,f.jsxs)(`strong`,{children:[L.coverage.tokens,`/`,L.event_count,` eventos com tokens ·`,` `,L.coverage.brl,`/`,L.event_count,` com custo`]})]}),e]}),(0,f.jsx)(`nav`,{"aria-label":`Visões de custo`,className:`cost-tabs`,children:V.map(e=>(0,f.jsx)(`button`,{className:v===e?`is-active`:void 0,onClick:()=>y(e),type:`button`,children:P.tabs[e]},e))}),(0,f.jsxs)(`section`,{className:`cost-content cost-content-${v} ${v===`overview`?`cost-content-overview`:``}`,children:[v===`overview`?(0,f.jsx)(Mr,{currency:E,daily:I.daily,locale:o,models:I.models,rows:F}):null,v===`agentCalls`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`nav`,{"aria-label":o===`pt-BR`?`Tipo de chamada de agente`:`Agent call type`,className:`cost-run-kind-toolbar`,children:[`all`,`run`,`subrun`].map(e=>(0,f.jsx)(`button`,{"aria-pressed":b===e,className:b===e?`is-active`:void 0,onClick:()=>x(e),type:`button`,children:e===`all`?o===`pt-BR`?`Todos`:`All`:e===`run`?o===`pt-BR`?`Chamadas do agente orquestrador`:`Orchestrator agent calls`:o===`pt-BR`?`Chamadas de subagentes`:`Subagent calls`},e))}),(0,f.jsx)(ui,{currency:E,locale:o,onOpenRun:se,rows:b===`all`?F:F.filter(e=>e.run_kind===b)})]}):null,v===`executions`?(0,f.jsx)(fe,{locale:o,rows:p?.executions??[]}):null,v===`conversations`?(0,f.jsx)(bi,{currency:E,labelHeading:o===`pt-BR`?`Conversa`:`Conversation`,locale:o,rows:I.conversations}):null,v===`tasks`?(0,f.jsx)(bi,{currency:E,dateHeading:o===`pt-BR`?`Criada em`:`Created at`,labelHeading:o===`pt-BR`?`Tarefa`:`Task`,locale:o,onOpenTrace:u,rows:I.tasks}):null,v===`prds`?(0,f.jsx)(ki,{currency:E,locale:o,onOpenTrace:u,rows:t.prds,...p?{details:p}:{}}):null,v===`specs`?(0,f.jsx)(ki,{currency:E,locale:o,onOpenTrace:u,rows:t.specs,...p?{details:p}:{}}):null,v===`models`?(0,f.jsx)(ti,{locale:o,rows:F}):null,[`providers`,`agents`].map(e=>v===e?(0,f.jsx)(bi,{currency:E,labelHeading:e===`agents`?o===`pt-BR`?`Modelo LLM`:`LLM model`:`Provider`,locale:o,rows:I[e]},e):null),v===`daily`||v===`monthly`||v===`annual`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Xr,{currency:E,locale:o,period:v,rows:I[v]}),(0,f.jsx)(bi,{currency:E,locale:o,period:v,rows:I[v],showDateTime:!1})]}):null]}),N?(0,f.jsx)(M,{details:{kind:`run`,row:N},locale:o,onClose:()=>ie(null)}):null]})}function zi(e,t){let n=t.query.trim().toLowerCase();return(!n||[e.run_id,e.task_title,e.model,e.requested_model,e.agent,e.agent_name].some(e=>e.toLowerCase().includes(n)))&&(!t.provider||Er(e.provider)===t.provider)&&(!t.agent||e.agent_name===t.agent)&&(!t.model||e.model===t.model)&&(!t.status||e.task_status===t.status)&&(!t.priority||e.priority===t.priority)&&(!t.risk||e.risk===t.risk)&&(!t.phase||e.phase===t.phase)&&(!t.origin||e.origin===t.origin)&&(!t.workType||e.work_type===t.workType)}function Bi(e,t){if(!t)return!0;let n=t.query.trim().toLocaleLowerCase(),r=e.started_at.slice(0,10);return r>=t.dateRange.start&&r<=t.dateRange.end&&(!n||[e.run_id,e.task_id,e.task_title,e.provider,e.agent,e.agent_name,e.model,e.requested_model,e.phase].some(e=>e?.toLocaleLowerCase().includes(n)))}function Vi(e,t){if(t===`all`||e.length===0)return null;let n=Math.max(...e.map(e=>Date.parse(e.started_at)));if(t===`month`){let e=new Date(n);return new Date(e.getFullYear(),e.getMonth(),1).getTime()}return n-Number(t)*864e5}function Hi(e,t){if(e.length===0)return{...t,run_count:0,task_count:0,event_count:0,total_tokens:null,estimated_usd:null,estimated_brl:null,recorded_usd:null,recorded_brl:null,average_run_cost_usd:null,average_run_cost_brl:null,average_run_duration_ms:null,known_tokens_per_cycle:null,top_10_token_share:null,coverage:{events:0,tokens:0,usd:0,brl:0}};let n=e.reduce((e,t)=>({events:e.events+t.coverage.events,tokens:e.tokens+t.coverage.tokens,usd:e.usd+t.coverage.usd,brl:e.brl+t.coverage.brl}),{events:0,tokens:0,usd:0,brl:0}),r=e.filter(e=>e.total_tokens!==null),i=r.reduce((e,t)=>e+(t.total_tokens??0),0),a=r.reduce((e,t)=>e+t.event_count,0),o=[...r].sort((e,t)=>(t.total_tokens??0)-(e.total_tokens??0)).slice(0,10).reduce((e,t)=>e+(t.total_tokens??0),0);return{task_count:new Set(e.flatMap(e=>e.task_id?[e.task_id]:[])).size,run_count:e.length,event_count:e.reduce((e,t)=>e+t.event_count,0),total_tokens:Gi(e.map(e=>e.total_tokens)),estimated_usd:Gi(e.map(e=>e.estimated_usd)),estimated_brl:Gi(e.map(e=>e.estimated_brl)),recorded_usd:Gi(e.map(e=>e.recorded_usd)),recorded_brl:Gi(e.map(e=>e.recorded_brl)),average_run_cost_usd:Ki(e.map(e=>e.estimated_usd)),average_run_cost_brl:Ki(e.map(e=>e.estimated_brl)),average_run_duration_ms:Ki(e.map(e=>e.duration_ms)),known_tokens_per_cycle:a===0?null:i/a,top_10_token_share:i===0?null:o/i,coverage:n}}function Ui(e,t,n=t){let r=new Map;for(let n of e)r.set(t(n),[...r.get(t(n))??[],n]);return[...r].map(([e,t])=>({key:e,label:n(t[0]),latest_started_at:t.reduce((e,t)=>t.started_at>e?t.started_at:e,t[0]?.started_at??``),run_count:t.length,task_count:new Set(t.flatMap(e=>e.task_id?[e.task_id]:[])).size,prd_count:0,spec_count:0,evidence_count:0,test_count:0,event_count:t.reduce((e,t)=>e+t.event_count,0),total_tokens:Gi(t.map(e=>e.total_tokens)),estimated_usd:Gi(t.map(e=>e.estimated_usd)),estimated_brl:Gi(t.map(e=>e.estimated_brl)),duration_ms:Gi(t.filter(e=>e.phase===`execution`&&(e.parent_run_id===void 0||e.parent_run_id===null)).map(e=>e.duration_ms)),coverage:t.reduce((e,t)=>({events:e.events+t.coverage.events,tokens:e.tokens+t.coverage.tokens,usd:e.usd+t.coverage.usd,brl:e.brl+t.coverage.brl}),{events:0,tokens:0,usd:0,brl:0})})).sort((e,t)=>t.latest_started_at.localeCompare(e.latest_started_at))}function Wi(e,t){if(t===void 0)return!0;let n=t.query.trim().toLowerCase();if(n&&![e.id??``,e.title??``].some(e=>e.toLowerCase().includes(n))||e.created_at===null)return!1;let r=e.created_at.slice(0,10);return r>=t.dateRange.start&&r<=t.dateRange.end}function Gi(e){let t=e.filter(e=>e!==null);return t.length?t.reduce((e,t)=>e+t,0):null}function Ki(e){let t=e.filter(e=>e!==null);return t.length?t.reduce((e,t)=>e+t,0)/t.length:null}function qi({ariaLabel:e,closeLabel:t,document:n,onClose:r}){return(0,f.jsxs)(`section`,{"aria-label":e,"aria-modal":`true`,className:`trace-document`,role:`dialog`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`small`,{children:n.path}),(0,f.jsx)(`h2`,{children:n.title})]}),(0,f.jsx)(`button`,{"aria-label":t,className:`trace-close-button`,onClick:r,type:`button`,children:(0,f.jsx)(_t,{"aria-hidden":`true`,size:20,strokeWidth:2})})]}),(0,f.jsx)(`pre`,{children:n.content})]})}function Ji({stage:e,stageRecord:t,documents:n,stageCopy:r,stageArtifacts:i,copy:a,onBack:o,onOpenDocument:s,onStageChange:c}){let l=[`definition`,`planning`,`execution`,`decisions`,`verification`,`evidence`],u=l.indexOf(e),d=l[u-1],p=l[u+1],m=n.filter(e=>e.kind===`evidence`).length,h=new Set(n.map(e=>e.kind)).size,g=new Map;for(let e of n)g.set(e.kind,[...g.get(e.kind)??[],e]);let _=t?.last_recorded_at??a.pending;return(0,f.jsxs)(`section`,{className:`trace-stage-detail`,children:[(0,f.jsx)(`header`,{children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`p`,{children:r[e].label}),(0,f.jsx)(`h3`,{children:i[e]}),(0,f.jsx)(`small`,{children:_})]})}),(0,f.jsxs)(`div`,{className:`trace-stage-metrics`,children:[(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{children:a.documents}),(0,f.jsx)(`strong`,{children:n.length})]}),(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{children:a.types}),(0,f.jsx)(`strong`,{children:h})]}),(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{children:a.evidenceMetric}),(0,f.jsx)(`strong`,{children:m})]})]}),(0,f.jsx)(`div`,{className:`trace-stage-documents`,children:n.length===0?(0,f.jsx)(`p`,{className:`trace-stage-empty`,children:a.empty}):[...g].map(([e,t])=>(0,f.jsxs)(`section`,{className:`trace-document-group`,children:[(0,f.jsxs)(`h4`,{children:[e,` `,(0,f.jsx)(`small`,{children:t.length})]}),t.map(e=>(0,f.jsxs)(`button`,{onClick:()=>s(e),type:`button`,children:[(0,f.jsx)(`strong`,{children:e.title}),(0,f.jsx)(`small`,{children:e.path})]},e.id))]},e))}),(0,f.jsxs)(`nav`,{"aria-label":a.navigation,className:`trace-stage-navigation`,children:[(0,f.jsxs)(`button`,{className:`trace-navigation-action trace-navigation-previous`,disabled:u===0,onClick:()=>c(l[u-1]),type:`button`,children:[(0,f.jsx)(We,{"aria-hidden":`true`,size:18,strokeWidth:1.9}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`small`,{children:a.previous}),(0,f.jsx)(`strong`,{children:d?r[d].label.split(` (`)[0]:`—`})]})]}),(0,f.jsxs)(`div`,{className:`trace-navigation-center`,children:[(0,f.jsx)(`div`,{"aria-hidden":`true`,className:`trace-navigation-progress`,children:l.map((t,n)=>(0,f.jsx)(`span`,{"data-active":t===e,"data-passed":n<u},t))}),(0,f.jsxs)(`small`,{children:[u+1,` `,a.of,` `,l.length]}),(0,f.jsxs)(`button`,{className:`trace-all-stages-button`,onClick:o,type:`button`,children:[(0,f.jsx)(lt,{"aria-hidden":`true`,size:15,strokeWidth:1.9}),a.back]})]}),(0,f.jsxs)(`button`,{className:`trace-navigation-action trace-navigation-next`,disabled:u===l.length-1,onClick:()=>c(l[u+1]),type:`button`,children:[(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`small`,{children:a.next}),(0,f.jsx)(`strong`,{children:p?r[p].label.split(` (`)[0]:`—`})]}),(0,f.jsx)(Ge,{"aria-hidden":`true`,size:18,strokeWidth:1.9})]})]})]})}function Yi({ariaLabel:e,children:t,closeLabel:n,onClose:r}){return(0,l.useEffect)(()=>{let e=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]),(0,f.jsxs)(`div`,{className:`trace-stage-dialog-backdrop`,role:`presentation`,children:[(0,f.jsx)(`button`,{"aria-label":n,className:`trace-stage-dialog-backdrop-dismiss`,onClick:r,type:`button`}),(0,f.jsxs)(`section`,{"aria-label":e,"aria-modal":`true`,className:`trace-stage-dialog`,role:`dialog`,children:[(0,f.jsx)(`button`,{"aria-label":n,className:`trace-stage-dialog-close`,onClick:r,type:`button`,children:(0,f.jsx)(_t,{"aria-hidden":`true`,size:22})}),t]})]})}var Xi=[`definition`,`planning`,`execution`,`decisions`,`verification`,`evidence`],Zi=[`task`,`change`,`spec`,`prd`],Qi=[`coverage`,`documents`,`evidence`,`links`],$i={"pt-BR":{lite:`Leve`,standard:`Padrão`,critical:`Crítico`},"en-US":{lite:`Lite`,standard:`Standard`,critical:`Critical`}},ea={definition:Qe,planning:st,execution:mt,decisions:ot,verification:ht,evidence:nt},ta={definition:`PRD · Requisitos`,planning:`SPEC · Change`,execution:`Tarefas · DAG · Runs · arquivos`,decisions:`Decisões do planejamento e da execução`,verification:`Testes · revisões · evals · checks`,evidence:`Evidências · resultados · rastreabilidade`},na={definition:`PRD · Requirements`,planning:`SPEC · Change`,execution:`Tasks · DAG · Runs · files`,decisions:`Planning and execution decisions`,verification:`Tests · reviews · evals · checks`,evidence:`Evidence · results · traceability`};function ra(e,t){return[{label:`Task`,value:e.task_id,onOpen:void 0},{label:`Change`,value:e.change_id,onOpen:t.onOpenChange},{label:`SPEC`,value:e.spec_id,onOpen:t.onOpenSpec},{label:`PRD`,value:e.prd_id,onOpen:t.onOpenPrd}]}var ia={definition:{label:`Definição (PRD + Requisitos)`,description:`Objetivo, contexto e critérios que definem o trabalho.`},planning:{label:`Planejamento (SPEC + Change)`,description:`Escopo, solução e mudanças previstas antes da execução.`},execution:{label:`Execução (Tarefas ou DAG)`,description:`Tarefas, dependências da DAG, Runs e arquivos produzidos.`},decisions:{label:`Decisões (Plano e Execução)`,description:`Decisões humanas e da IA tomadas no planejamento e na execução.`},verification:{label:`Verificação (Testes + Revisões)`,description:`Testes, revisões, evals e checks comparam o resultado aos Critérios de Aceite.`},evidence:{label:`Evidências (Resultados + Rastreabilidade)`,description:`Provas reproduzíveis vinculadas às Tasks, Changes, Runs e Critérios de Aceite.`}},aa={definition:{label:`Definition (PRD + Requirements)`,description:`Objective, context, and criteria that define the work.`},planning:{label:`Planning (SPEC + Change)`,description:`Scope, solution, and changes planned before execution.`},execution:{label:`Execution (Tasks or DAG)`,description:`Tasks, DAG dependencies, Runs, and produced files.`},decisions:{label:`Decisions (Plan and Execution)`,description:`Human and AI decisions made during planning and execution.`},verification:{label:`Verification (Tests + Reviews)`,description:`Tests, reviews, evals, and checks compare results with acceptance criteria.`},evidence:{label:`Evidence (Results + Traceability)`,description:`Reproducible proof linked to Tasks, Changes, Runs, and acceptance criteria.`}},oa={"pt-BR":{aria:`Rastreabilidade da task`,coverage:`etapas rastreadas`,evidence:`evidências`,close:`Fechar`,empty:`Nenhum documento relacionado.`,closeDocument:`Fechar documento`,back:`Voltar às etapas`,previous:`Anterior`,next:`Próxima`,documents:`Documentos`,types:`Tipos`,evidenceMetric:`Evidências`,taskFirst:`Task-first`,specDriven:`Spec-driven`,copyId:`Copiar ID`,copied:`ID copiado`,unlinked:`Não vinculado`,recorded:`Registrada em`,pending:`Pendente`,missingTimestamp:`Sem data/hora`,tests:`testes registrados`,time:`Tempo`,tokens:`Tokens`,cost:`Custo`,measuredRuns:`Runs medidas`,items:`itens`,navigation:`Navegação entre etapas`,of:`de`,stageDetails:`Detalhes da etapa`,document:`Documento`},"en-US":{aria:`Task traceability`,coverage:`tracked stages`,evidence:`evidence items`,close:`Close`,empty:`No related document.`,closeDocument:`Close document`,back:`Back to stages`,previous:`Previous`,next:`Next`,documents:`Documents`,types:`Types`,evidenceMetric:`Evidence`,taskFirst:`Task-first`,specDriven:`Spec-driven`,copyId:`Copy ID`,copied:`ID copied`,unlinked:`Not linked`,recorded:`Recorded at`,pending:`Pending`,missingTimestamp:`Missing date/time`,tests:`recorded tests`,time:`Time`,tokens:`Tokens`,cost:`Cost`,measuredRuns:`measured Runs`,items:`items`,navigation:`Stage navigation`,of:`of`,stageDetails:`Stage details`,document:`Document`}};function sa({taskId:e,locale:t=`pt-BR`}){let n=t===`pt-BR`;return(0,f.jsx)(`div`,{className:`trace-backdrop`,children:(0,f.jsxs)(`section`,{"aria-busy":`true`,"aria-label":n?`Carregando rastreabilidade`:`Loading traceability`,"aria-live":`polite`,className:`trace-panel trace-loading-panel`,role:`dialog`,children:[(0,f.jsxs)(`header`,{className:`trace-panel-header`,children:[(0,f.jsxs)(`div`,{className:`trace-heading`,children:[(0,f.jsx)(`span`,{className:`trace-heading-icon trace-loading-icon`,"aria-hidden":`true`,children:(0,f.jsx)(ft,{size:22,strokeWidth:1.8})}),(0,f.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,f.jsx)(`h2`,{children:n?`Carregando rastreabilidade`:`Loading traceability`}),(0,f.jsx)(`p`,{children:e})]})]}),(0,f.jsxs)(`span`,{className:`trace-loading-status`,children:[(0,f.jsx)(ft,{"aria-hidden":`true`,size:15,strokeWidth:2}),n?`Preparando trace`:`Preparing trace`]})]}),(0,f.jsx)(`div`,{className:`trace-loading-identifiers`,"aria-hidden":`true`,children:Zi.map(e=>(0,f.jsx)(`span`,{},e))}),(0,f.jsx)(`div`,{className:`trace-loading-metrics`,"aria-hidden":`true`,children:Qi.map(e=>(0,f.jsx)(`span`,{},e))}),(0,f.jsx)(`div`,{className:`trace-loading-stages`,"aria-hidden":`true`,children:Xi.map(e=>(0,f.jsx)(`span`,{},e))})]})})}function ca({trace:e,locale:t=`pt-BR`,onClose:n,onOpenChange:r,onOpenPrd:i,onOpenSpec:a,embedded:o=!1}){let[s,c]=(0,l.useState)(null),[u,d]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),h=oa[t],g=t===`en-US`?aa:ia,_=t===`en-US`?na:ta,v=(0,l.useMemo)(()=>new Map(Xi.map(t=>[t,e.documents.filter(e=>e.stage===t)])),[e.documents]),y=(0,l.useMemo)(()=>new Map(e.stages.map(e=>[e.stage,e])),[e.stages]),b=Math.round(e.coverage.stages_with_timestamps/e.coverage.total_stages*100),x=[e.task_id,e.change_id,e.spec_id,e.prd_id].filter(Boolean).length,S=ra(e,{onOpenChange:r,onOpenPrd:i,onOpenSpec:a}),C=da(e.task_created_at,t),w=fa(e.task_created_at,t),T=async()=>{try{await navigator.clipboard.writeText(e.task_id),m(!0),window.setTimeout(()=>m(!1),2e3)}catch{m(!1)}};return(0,f.jsxs)(`div`,{className:o?`trace-embedded`:`trace-backdrop`,children:[(0,f.jsxs)(`section`,{"aria-label":h.aria,"aria-modal":o?void 0:`true`,className:`trace-panel`,role:`dialog`,children:[(0,f.jsxs)(`header`,{className:`trace-panel-header`,children:[(0,f.jsxs)(`div`,{className:`trace-heading`,children:[(0,f.jsx)(`span`,{className:`trace-heading-icon`,"aria-hidden":`true`,children:(0,f.jsx)(pt,{size:22,strokeWidth:1.8})}),(0,f.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,f.jsx)(`div`,{className:`trace-heading-title`,children:(0,f.jsxs)(`h2`,{children:[(0,f.jsx)(`span`,{className:`trace-title-prefix`,children:`Trace:`}),` `,e.task_title||e.task_id]})}),(0,f.jsx)(`p`,{children:t===`pt-BR`?`Visão completa do ciclo de desenvolvimento`:`Complete development lifecycle view`})]})]}),(0,f.jsxs)(`div`,{className:`trace-header-actions`,children:[(0,f.jsx)(la,{copy:h,locale:t,usage:e.usage}),o?null:(0,f.jsx)(`button`,{className:`trace-close-button`,"aria-label":h.close,onClick:n,type:`button`,children:(0,f.jsx)(_t,{"aria-hidden":`true`,size:20,strokeWidth:2})})]})]}),(0,f.jsxs)(`section`,{className:`trace-task-summary`,"aria-label":t===`pt-BR`?`Resumo da tarefa`:`Task summary`,children:[(0,f.jsxs)(`article`,{children:[(0,f.jsx)(Je,{"aria-hidden":`true`,size:17,strokeWidth:1.8}),(0,f.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,f.jsx)(`span`,{children:t===`pt-BR`?`Criada em`:`Created at`}),(0,f.jsx)(`strong`,{children:C})]})]}),(0,f.jsxs)(`article`,{children:[(0,f.jsx)($e,{"aria-hidden":`true`,size:17,strokeWidth:1.8}),(0,f.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,f.jsx)(`span`,{children:t===`pt-BR`?`Desde a criação`:`Since creation`}),(0,f.jsx)(`strong`,{children:w})]})]}),(0,f.jsxs)(`article`,{className:`trace-task-progress`,children:[(0,f.jsx)(Ze,{"aria-hidden":`true`,size:17,strokeWidth:1.8}),(0,f.jsxs)(`div`,{className:`trace-task-summary-content trace-task-progress-content`,children:[(0,f.jsx)(`span`,{children:t===`pt-BR`?`Progresso`:`Progress`}),(0,f.jsxs)(`strong`,{children:[e.task_progress,`%`]}),(0,f.jsx)(`progress`,{max:100,value:e.task_progress})]})]}),(0,f.jsxs)(`article`,{className:`trace-task-classification`,children:[(0,f.jsx)(Ke,{"aria-hidden":`true`,size:17,strokeWidth:1.8}),(0,f.jsxs)(`div`,{className:`trace-task-summary-content`,children:[(0,f.jsx)(`span`,{children:t===`pt-BR`?`Classificação`:`Classification`}),(0,f.jsxs)(`div`,{className:`trace-task-badges`,children:[(0,f.jsxs)(`span`,{className:`trace-mode-badge`,children:[(0,f.jsx)(gt,{"aria-hidden":`true`,size:12,strokeWidth:2}),e.spec_id===null?h.taskFirst:h.specDriven]}),e.task_risk?(0,f.jsxs)(`span`,{className:`trace-risk-badge`,"data-risk":e.task_risk,children:[(0,f.jsx)(ht,{"aria-hidden":`true`,size:12,strokeWidth:2}),$i[t][e.task_risk]]}):null]})]})]})]}),(0,f.jsx)(`section`,{className:`trace-overview trace-lineage`,"aria-label":t===`pt-BR`?`Identificadores vinculados`:`Linked identifiers`,children:S.map(({label:e,value:n,onOpen:r})=>{let i=n!==null&&r!==void 0,a=e===`Task`&&n!==null,o=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`trace-identifier-content`,children:[(0,f.jsxs)(`span`,{children:[(0,f.jsx)(ut,{"aria-hidden":`true`,size:11,strokeWidth:2}),e]}),(0,f.jsx)(`strong`,{title:n??h.unlinked,children:n??h.unlinked})]}),a?(0,f.jsx)(`button`,{"aria-label":p?t===`pt-BR`?`ID da tarefa copiado`:`Task ID copied`:t===`pt-BR`?`Copiar ID da tarefa`:`Copy task ID`,className:`trace-identifier-copy`,onClick:()=>void T(),title:p?t===`pt-BR`?`Copiado`:`Copied`:void 0,type:`button`,children:p?(0,f.jsx)(Ye,{"aria-hidden":`true`,size:15}):(0,f.jsx)(tt,{"aria-hidden":`true`,size:15})}):null,i?(0,f.jsx)(Ge,{"aria-hidden":`true`,size:15,strokeWidth:1.9}):null]});return(0,f.jsx)(`article`,{"data-empty":n===null,"data-linked":n!==null,"data-navigable":i,children:i?(0,f.jsx)(`button`,{"aria-label":`${t===`pt-BR`?`Abrir`:`Open`} ${e}: ${n}`,className:`trace-identifier-navigation`,onClick:()=>r(n),type:`button`,children:o}):(0,f.jsx)(`div`,{className:`trace-identifier-static`,children:o})},e)})}),(0,f.jsxs)(`section`,{className:`trace-metrics`,"aria-label":t===`pt-BR`?`Resumo da rastreabilidade`:`Traceability summary`,children:[(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{className:`trace-metric-icon`,children:(0,f.jsx)(pt,{"aria-hidden":`true`,size:18})}),(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`strong`,{children:[b,`%`]}),(0,f.jsx)(`span`,{children:h.coverage})]}),(0,f.jsxs)(`small`,{children:[e.coverage.stages_with_timestamps,` `,h.of,` `,e.coverage.total_stages]})]}),(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{className:`trace-metric-icon`,children:(0,f.jsx)(it,{"aria-hidden":`true`,size:18})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:e.documents.length}),(0,f.jsx)(`span`,{children:h.documents})]}),(0,f.jsx)(`small`,{children:t===`pt-BR`?`no ciclo completo`:`in the full lifecycle`})]}),(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{className:`trace-metric-icon`,children:(0,f.jsx)(Ke,{"aria-hidden":`true`,size:18})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:e.coverage.evidence_count}),(0,f.jsx)(`span`,{children:h.evidenceMetric})]}),(0,f.jsxs)(`small`,{children:[e.coverage.test_count,` `,h.tests]})]}),(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{className:`trace-metric-icon`,children:(0,f.jsx)(ut,{"aria-hidden":`true`,size:18})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:x}),(0,f.jsx)(`span`,{children:t===`pt-BR`?`Vínculos`:`Links`})]}),(0,f.jsx)(`small`,{children:`Task · Change · SPEC · PRD`})]})]}),(0,f.jsx)(`div`,{className:`trace-stage-menu`,children:Xi.map((e,n)=>{let r=ea[e],i=(v.get(e)??[]).length;return(0,f.jsxs)(`button`,{className:`trace-stage-menu-button`,"data-stage":e,onClick:()=>d(e),type:`button`,children:[(0,f.jsx)(`span`,{className:`trace-stage-number`,children:String(n+1).padStart(2,`0`)}),(0,f.jsx)(r,{className:`trace-stage-icon`,"aria-hidden":`true`,size:22,strokeWidth:1.8}),(0,f.jsx)(`strong`,{children:g[e].label}),(0,f.jsx)(`em`,{children:g[e].description}),(0,f.jsxs)(`span`,{className:`trace-stage-action`,children:[(0,f.jsxs)(`small`,{children:[(0,f.jsx)(qe,{"aria-hidden":`true`,size:13}),` `,i,` `,h.items]}),(0,f.jsxs)(`span`,{children:[t===`pt-BR`?`Ver etapa`:`View stage`,(0,f.jsx)(Ge,{"aria-hidden":`true`,size:13,strokeWidth:2})]})]})]},e)})})]}),u?(0,f.jsx)(Yi,{ariaLabel:h.stageDetails,closeLabel:t===`pt-BR`?`Fechar detalhes da etapa`:`Close stage details`,onClose:()=>d(null),children:(0,f.jsx)(Ji,{copy:h,documents:v.get(u)??[],locale:t,onBack:()=>d(null),onOpenDocument:c,onStageChange:d,stage:u,stageArtifacts:_,stageRecord:y.get(u),stageCopy:g})}):null,s?(0,f.jsx)(qi,{ariaLabel:`${h.document} ${s.title}`,closeLabel:h.closeDocument,document:s,onClose:()=>c(null)}):null]})}function la({usage:e,locale:t,copy:n}){let r=[{label:n.time,metric:e.duration_ms,value:ua(e.duration_ms.value,t)},{label:n.tokens,metric:e.total_tokens,value:e.total_tokens.value===null?`—`:O(e.total_tokens.value,t)},{label:n.cost,metric:e.cost,value:e.cost.value===null||e.cost.currency===null?`—`:k(e.cost.value,e.cost.currency,t)}];return(0,f.jsx)(`section`,{"aria-label":t===`pt-BR`?`Uso agregado da Task`:`Aggregated Task usage`,children:(0,f.jsx)(`dl`,{className:`trace-usage-strip`,children:r.map(({label:t,metric:r,value:i})=>{let a=Math.round(r.coverage_ratio*100),o=`${r.known_runs}/${e.run_count} ${n.measuredRuns} · ${a}%`;return(0,f.jsxs)(`div`,{title:o,children:[(0,f.jsxs)(`dt`,{children:[t,(0,f.jsx)(`span`,{"aria-hidden":`true`,className:`trace-usage-coverage`,"data-complete":r.unknown_runs===0}),(0,f.jsx)(`span`,{className:`trace-usage-sr-only`,children:o})]}),(0,f.jsx)(`dd`,{children:i})]},t)})})})}function ua(e,t){return e===null?`—`:D(e,t)}function da(e,t){if(e===null)return`—`;let n=new Date(e);return Number.isNaN(n.getTime())?`—`:new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`short`}).format(n)}function fa(e,t){if(e===null)return`—`;let n=Date.parse(e);if(!Number.isFinite(n))return`—`;let r=Math.max(0,Date.now()-n),i=Math.max(1,Math.round(r/6e4)),a;if(i<60)a=`${i}m`;else{let e=Math.round(i/60);if(e<24)a=`${e}h`;else{let n=Math.round(e/24);if(n<7)a=`${n}d`;else{let e=Math.round(n/7);a=t===`pt-BR`?`${e}sem`:`${e}w`}}}return t===`pt-BR`?`Há ${a}`:`${a} ago`}var pa={"pt-BR":{label:`Áreas do dashboard`,operations:`Operação`,operationsHint:`Lifecycle e trabalho em andamento`,costs:`Monitor de Custos`,costsHint:`Tempo, tokens e custo`,traceability:`Rastreabilidade`,traceabilityHint:`Ciclo completo em 6 etapas`},"en-US":{label:`Dashboard areas`,operations:`Operations`,operationsHint:`Lifecycle and work in progress`,costs:`Cost Monitor`,costsHint:`Time, tokens, and cost`,traceability:`Traceability`,traceabilityHint:`Complete 6-stage lifecycle`}};function ma({activeView:e,locale:t,onChange:n}){let r=pa[t],i=e=>{n(e),window.requestAnimationFrame(()=>{document.querySelector(`.dashboard-global-controls`)?.scrollIntoView({behavior:`smooth`,block:`start`})})};return(0,f.jsxs)(`nav`,{"aria-label":r.label,className:`dashboard-capability-nav`,children:[(0,f.jsxs)(`button`,{"aria-current":e===`operations`?`page`:void 0,className:e===`operations`?`is-active`:void 0,onClick:()=>i(`operations`),type:`button`,children:[(0,f.jsx)(ha,{}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:r.operations}),(0,f.jsx)(`small`,{children:r.operationsHint})]})]}),(0,f.jsxs)(`button`,{"aria-current":e===`cost-monitor`?`page`:void 0,className:e===`cost-monitor`?`is-active`:void 0,onClick:()=>i(`cost-monitor`),type:`button`,children:[(0,f.jsx)(ga,{}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:r.costs}),(0,f.jsx)(`small`,{children:r.costsHint})]})]}),(0,f.jsxs)(`button`,{"aria-current":e===`traceability`?`page`:void 0,className:e===`traceability`?`is-active`:void 0,onClick:()=>i(`traceability`),type:`button`,children:[(0,f.jsx)(_a,{}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:r.traceability}),(0,f.jsx)(`small`,{children:r.traceabilityHint})]})]})]})}function ha(){return(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`lucide lucide-square-kanban`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`rect`,{height:`18`,rx:`2`,width:`18`,x:`3`,y:`3`}),(0,f.jsx)(`path`,{d:`M8 7v7`}),(0,f.jsx)(`path`,{d:`M12 7v4`}),(0,f.jsx)(`path`,{d:`M16 7v9`})]})}function ga(){return(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`lucide lucide-circle-dollar-sign`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,f.jsx)(`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`}),(0,f.jsx)(`path`,{d:`M12 18V6`})]})}function _a(){return(0,f.jsxs)(`svg`,{"aria-hidden":`true`,className:`lucide lucide-route`,viewBox:`0 0 24 24`,children:[(0,f.jsx)(`circle`,{cx:`6`,cy:`19`,r:`3`}),(0,f.jsx)(`path`,{d:`M9 19h6.5a3.5 3.5 0 0 0 0-7h-7a3.5 3.5 0 0 1 0-7H18`}),(0,f.jsx)(`circle`,{cx:`18`,cy:`5`,r:`3`})]})}var va=`# Primeiros passos
14
+
15
+ 1. Leia \`.agents/config/project.yaml\` e \`.agents/rules/zaip/core.md\`.
16
+ 2. Consulte \`.agents/projections/runtime/\` para descobrir o estado atual.
17
+ 3. Classifique a entrada: Conversation, Task avulsa, SPEC ou PRD. Pergunta/análise read-only é Conversation e não cria Task.
18
+ 4. Carregue somente Rules, Requirements e skills aplicaveis.
19
+ 5. Defina aceite verificavel antes de editar.
20
+ 6. Antes de escrita persistente, inicie Task, Change, Execution e Run raiz do orquestrador; execute Sub-Runs, teste e registre evidencias no ciclo de vida ativo.
21
+
22
+ Evite varrer \`.agents/records/\`: abra um record apenas quando possuir seu ID.
23
+ `,ya=`# Requirements
24
+
25
+ Use Requirement para uma obrigacao duravel e testavel.
26
+
27
+ 1. Descreva resultado e limite, nao a implementacao preferida.
28
+ 2. Crie criterios de aceite observaveis.
29
+ 3. Registre riscos, dependencias e casos negativos.
30
+ 4. Relacione cada criterio a teste ou evidencia.
31
+ 5. Versione mudancas sem apagar a intencao anterior.
32
+ 6. Promova somente depois de validar consistencia e rastreabilidade.
33
+
34
+ Um bom criterio responde inequivocamente: passou ou falhou?
35
+ `,ba=`# Tasks
36
+
37
+ Use Task para uma entrega pequena, independente e com um resultado claro.
38
+
39
+ 1. Pedido avulso explícito de ação entra diretamente em Execução; somente preparação sem autorização de executar pode parar em Pronto para Executar.
40
+ 2. Declare objetivo, escopo e fora de escopo.
41
+ 3. Vincule Requirements aplicaveis.
42
+ 4. Liste arquivos ou componentes provaveis, sem congelar a solucao.
43
+ 5. Defina verificacoes proporcionais ao risco.
44
+ 6. Use uma Run raiz do orquestrador por tentativa, finalize os Sub-Runs de trabalho e execute o finalizador como ultimo filho.
45
+ 7. Antes de a Run terminar, mova a Task para completed, blocked, failed ou cancelled; nunca deixe executing/verifying.
46
+ 8. Retome blocked com \`task resume\`; trate failed com \`task rework\` na mesma Task. Completed/cancelled sao imutaveis.
47
+ `,xa=`# SPECs
48
+
49
+ Use SPEC quando a entrega exige varias Tasks ou uma ordem de dependencia.
50
+
51
+ 1. Transforme o resultado desejado em capacidades verificaveis.
52
+ 2. Consulte \`stack.profile\` e \`stack.overrides\` em \`.agents/config/project.yaml\` e resolva \`.zaip-aios/profiles/<stack.profile>.json\` como stack padrao do projeto.
53
+ 3. Registre \`stack_profile\`, \`stack_overrides\`, \`stack_description\` curta e componentes com linguagem, runtime, frameworks, versoes exatas e fontes verificaveis no workspace.
54
+ 4. Divida em Tasks pequenas, cada uma com aceite proprio.
55
+ 5. Modele dependencias como DAG; evite sequencias artificiais.
56
+ 6. Identifique caminhos criticos, riscos e rollback.
57
+ 7. Mapeie cada Requirement para Tasks e evidencias.
58
+ 8. Valide a SPEC antes de iniciar execucao; bloqueie stack ausente, divergente ou sem versoes exatas e fontes existentes.
59
+ 9. Ao iniciar a primeira Task, mantenha a SPEC em Execucao entre todas as Runs filhas; resultado terminal de uma Task nao terminaliza a SPEC.
60
+ 10. Depois de todas as Tasks concluidas, rode verificacao e Evidence parentais antes de deliver.
61
+
62
+ Uma SPEC planeja a entrega; nao autoriza mudancas externas por si so.
63
+ `,Sa=`# PRDs
64
+
65
+ Use PRD para uma iniciativa de produto com multiplas capacidades ou SPECs.
66
+
67
+ 1. Registre problema, publico, resultado e metricas.
68
+ 2. Delimite escopo, restricoes e nao objetivos.
69
+ 3. Mantenha o PRD agnostico de linguagem, framework, banco, infraestrutura e fornecedor; tecnologia imposta externamente entra como restricao de negocio, nao como desenho da solucao.
70
+ 4. Especifique requisitos funcionais e nao funcionais.
71
+ 5. Converta capacidades em SPECs independentes, onde a stack tecnica sera resolvida.
72
+ 6. Relacione riscos, rollout, observabilidade e rollback.
73
+ 7. Monte a DAG e confirme que todo aceite possui evidencia planejada.
74
+ 8. Mantenha PRD e SPECs selecionadas em Execucao enquanto restar trabalho; Runs filhas fecham Tasks, nao o macro.
75
+ 9. Conclua somente depois das Tasks, integracao, outcomes e gates parentais.
76
+ `,Ca=`# Execucao
77
+
78
+ 1. Confirme Task, Change, Execution, aceite e Run raiz do orquestrador.
79
+ 2. Antes da primeira mutacao persistente, confirme Task executing e Run raiz ativa no turno atual.
80
+ 3. Inspecione o diff e preserve alteracoes alheias.
81
+ 4. Use Sub-Runs para cada subagente; a Run raiz aguarda todos os descendentes ativos.
82
+ 5. Implemente o menor incremento coerente e rode verificacoes focadas.
83
+ 6. Registre decisoes consequenciais, evidencias e desvios.
84
+ 7. Depois dos demais descendentes, execute \`zaip-agent-execution-finalizer\` como ultimo Sub-Run da Execution. Nenhum filho novo pode iniciar depois dele.
85
+ 8. Finalize a Run raiz com status tecnico e resultado terminal da Task separados.
86
+ 9. Execute os gates finais e documente rollback.
87
+
88
+ Nao marque conclusao por esforco: conclua pelo resultado verificavel. Gate insuficiente ou finalizador ausente usa blocked; erro tecnico impeditivo usa failed; cancelamento exige pedido explicito.
89
+ `,wa=`# Revisao e validacao
90
+
91
+ 1. Revise Requirements e criterios de aceite.
92
+ 2. Examine diff, limites arquiteturais e caminhos de erro.
93
+ 3. Rode testes focados e depois gates completos aplicaveis.
94
+ 4. Verifique seguranca, compatibilidade, documentacao e rollback.
95
+ 5. Classifique achados por impacto e cite evidencia concreta.
96
+ 6. Registre o resultado sem alterar implementacao em uma revisao read-only.
97
+ `,Ta=`# Contexto e tokens
98
+
99
+ 1. Comece por \`project.yaml\`, \`core.md\` e projections de runtime.
100
+ 2. Carregue somente a Rule, Requirement ou skill acionada.
101
+ 3. Prefira indices, resumos e busca direcionada a arquivos completos.
102
+ 4. Abra records apenas por lifecycle ID conhecido.
103
+ 5. Resuma fatos estaveis; preserve texto literal apenas quando normativo.
104
+ 6. Remova do contexto resultados superados e detalhes nao acionaveis.
105
+
106
+ Para tools, leia \`catalog.yaml\`, escolha um ID e abra somente seu manifesto.
107
+ `,Ea=`# Agentes e squads
108
+
109
+ 1. Delegue apenas subtarefas concretas e independentes.
110
+ 2. Dê a cada agente objetivo, limites, entradas e formato de saida.
111
+ 3. Evite dois agentes editando os mesmos arquivos.
112
+ 4. Centralize decisoes arquiteturais e integracao no agente responsavel.
113
+ 5. Exija evidencias, nao apenas declaracoes de conclusao.
114
+ 6. Use paralelismo somente quando reduzir caminho critico sem aumentar conflito.
115
+ `,Da=`# Segurança dos perfis Codex ZAIP-AIOS
116
+
117
+ ## Visão geral
118
+
119
+ O ZAIP-AIOS oferece dois perfis atuais:
120
+
121
+ | Perfil | Filesystem nativo | Rede de comandos | Uso recomendado |
122
+ | --- | --- | --- | --- |
123
+ | \`zaip-aios-security\` | Escrita na raiz física do repositório, incluindo \`.git\`, \`.agents\`, \`.codex\` e demais arquivos ocultos | Limitada a \`github.com\` | Trabalho normal e princípio de menor privilégio, incluindo deploy GitHub autorizado |
124
+ | \`zaip-aios-full-access\` | Escrita em \`C:\\\` inteiro no Windows, quando as permissões do sistema permitirem | Completa, todos os domínios | Correção de configuração, diagnóstico ou operação que realmente exija acesso fora do workspace |
125
+
126
+ A permissão nativa determina o que o processo tecnicamente consegue alcançar. Ela não
127
+ substitui autorização do usuário, regras do repositório, hooks, skills ou controles do
128
+ sistema operacional.
129
+
130
+ ## \`zaip-aios-security\`
131
+
132
+ ### Acesso concedido
133
+
134
+ O perfil restrito concede:
135
+
136
+ - leitura dos caminhos mínimos necessários para executar ferramentas;
137
+ - escrita em \`~/.ssh\` para reparar a configuração e a identidade SSH local;
138
+ - escrita na raiz física absoluta deste repositório;
139
+ - escrita em todos os descendentes do workspace, incluindo \`.git\`, \`.agents\`, \`.codex\` e demais arquivos ocultos;
140
+ - rede de comandos limitada a \`github.com\` para operações Git/SSH autorizadas.
141
+
142
+ Exemplo da definição efetiva:
143
+
144
+ \`\`\`toml
145
+ default_permissions = "zaip-aios-security"
146
+
147
+ [permissions.zaip-aios-security]
148
+ description = "ZAIP workspace-only development with editable project control trees and GitHub-only command network access."
149
+
150
+ [permissions.zaip-aios-security.filesystem]
151
+ ":minimal" = "read"
152
+ "~/.ssh" = "write"
153
+
154
+ [permissions.zaip-aios-security.filesystem."C:\\\\caminho\\\\absoluto\\\\do\\\\workspace"]
155
+ "." = "write"
156
+ ".git" = "write"
157
+ ".agents" = "write"
158
+ ".codex" = "write"
159
+
160
+ [permissions.zaip-aios-security.network]
161
+ enabled = true
162
+ mode = "limited"
163
+
164
+ [permissions.zaip-aios-security.network.domains]
165
+ "github.com" = "allow"
166
+ \`\`\`
167
+
168
+ A tabela usa a raiz física em vez de \`extends = ":workspace"\` ou \`:workspace_roots\`.
169
+ No sandbox elevado do Windows, esses dois modos aplicam negações especiais a \`.agents\` e
170
+ \`.codex\`; uma regra \`write\` mais específica pode não reabri-las por causa da precedência das
171
+ ACLs \`DENY\`. As entradas explícitas acima materializam o conjunto correto de capabilities,
172
+ mantêm a escrita limitada ao repositório — inclusive em \`.git\` — e não concedem escrita ao restante de \`C:\\\`, ao perfil do
173
+ usuário, a outros repositórios ou ao sistema operacional.
174
+
175
+ ### Segurança adicional
176
+
177
+ \`zaip-aios-security\` possui a proteção mais forte porque os limites principais são aplicados
178
+ pelo sandbox nativo:
179
+
180
+ - uma tentativa de escrita fora do workspace é negada mesmo que uma instrução ou ferramenta
181
+ peça essa operação;
182
+ - comandos alcançam apenas \`github.com\`; outros destinos permanecem negados;
183
+ - \`~/.ssh\` pode ser alterado por fluxos Git ou de configuração explicitamente autorizados;
184
+ - o impacto máximo de uma edição comum fica contido no repositório;
185
+ - todas as camadas ZAIP descritas abaixo continuam ativas.
186
+
187
+ Esse perfil deve ser o padrão para desenvolvimento, revisão, testes, manutenção normal e deploy GitHub autorizado quando a escrita na identidade SSH local for necessária. A escrita em \`~/.ssh\` e o egress para \`github.com\` ampliam o impacto potencial; nunca altere chaves, credenciais ou remotos sem autorização explícita.
188
+
189
+ ## \`zaip-aios-full-access\`
190
+
191
+ ### Acesso concedido
192
+
193
+ No Windows, o perfil de acesso completo concede escrita em \`C:\\\` inteiro e rede completa:
194
+
195
+ \`\`\`toml
196
+ default_permissions = "zaip-aios-full-access"
197
+
198
+ [permissions.zaip-aios-full-access.filesystem]
199
+ ":root" = "write"
200
+
201
+ [permissions.zaip-aios-full-access.network]
202
+ enabled = true
203
+ mode = "full"
204
+
205
+ [permissions.zaip-aios-full-access.network.domains]
206
+ "*" = "allow"
207
+ \`\`\`
208
+
209
+ A configuração pode representar a raiz como \`:root\` ou \`C:\\\\\`. Neste ambiente, isso
210
+ inclui tecnicamente:
211
+
212
+ - o workspace e todos os seus arquivos;
213
+ - \`.agents\`, \`.codex\` e \`.git\`;
214
+ - outros repositórios em \`C:\\\`;
215
+ - o perfil do usuário e seus arquivos;
216
+ - diretórios de aplicações e do sistema;
217
+ - qualquer destino de rede alcançável pelo host.
218
+
219
+ O acesso continua sujeito às ACLs do Windows, políticas corporativas, arquivos em uso e
220
+ privilégios da conta. O perfil não transforma o processo em administrador nem garante
221
+ alteração de todo arquivo.
222
+
223
+ ### Riscos residuais
224
+
225
+ \`zaip-aios-full-access\` continua sendo um perfil de maior risco. Um comando incorreto,
226
+ conteúdo malicioso, dependência comprometida ou erro de escopo pode tentar:
227
+
228
+ - alterar ou excluir arquivos fora do projeto;
229
+ - modificar outros repositórios;
230
+ - acessar dados do usuário;
231
+ - executar operações destrutivas no sistema;
232
+ - enviar dados pela rede;
233
+ - ampliar o impacto de uma falha de supply chain.
234
+
235
+ Ele deve ser ativado somente quando o perfil restrito não consegue executar uma operação
236
+ legítima e explicitamente autorizada. Após a correção, volte para \`zaip-aios-security\`.
237
+
238
+ ## Camadas que reduzem o risco do full access
239
+
240
+ O acesso completo é mitigado por defesa em profundidade, mas nenhuma camada torna
241
+ \`zaip-aios-full-access\` equivalente ao perfil restrito:
242
+
243
+ 1. **Autorização explícita do usuário:** mudanças externas, destrutivas, publicação, deploy,
244
+ gasto e mutações remotas exigem pedido explícito no turno atual.
245
+ 2. **Escopo do repositório:** \`AGENTS.md\`, Rules e skills limitam o trabalho ao objetivo e
246
+ proíbem inferir autoridade adicional a partir do acesso técnico.
247
+ 3. **Hook \`PreToolUse\`:** valida comandos e patches antes da execução; bloqueia escapes do
248
+ repositório, referências diretas a segredos, elevação, persistência de sistema, firewall,
249
+ antivírus, serviços, Git destrutivo, banco destrutivo e clientes remotos não autorizados.
250
+ 4. **Regras \`forbidden\`:** arquivos em \`.codex/rules/\` negam classes perigosas de comandos
251
+ mesmo quando o sandbox permitiria executá-las.
252
+ 5. **Política GitHub delimitada:** deploy e push seguem preflight, branch e remoto explícitos;
253
+ force-push, exclusão remota e publicação não solicitada permanecem proibidos.
254
+ 6. **Proteção de segredos:** tokens, chaves privadas, credenciais e valores de ambiente não
255
+ podem ser impressos, copiados, registrados em Runs nem incluídos em commits.
256
+ 7. **Lifecycle e telemetria sanitizada:** Runs registram atribuição, uso e resultado sem
257
+ autorizar ações nem persistir segredos.
258
+ 8. **Subagentes com menor privilégio:** agentes de revisão e auditoria permanecem read-only;
259
+ builders e integradores recebem escopos limitados.
260
+ 9. **Controles do sistema operacional:** ACLs, conta Windows, arquivos em uso e políticas do
261
+ host continuam sendo a última barreira técnica.
262
+
263
+ Essas camadas reduzem probabilidade e impacto, mas podem conter bugs ou lacunas. Os limites
264
+ nativos de \`zaip-aios-security\` oferecem proteção adicional ao negar escrita fora do workspace
265
+ e egress para destinos diferentes de \`github.com\` antes que a operação alcance o sistema ou a rede.
266
+
267
+ ## Escolha do perfil
268
+
269
+ Use \`zaip-aios-security\` quando:
270
+
271
+ - todo o trabalho deve permanecer neste workspace;
272
+ - \`.agents\` e \`.codex\` precisam ser editáveis;
273
+ - comandos precisam, no máximo, alcançar \`github.com\` para operações Git/SSH autorizadas;
274
+ - menor privilégio é desejado.
275
+
276
+ Use \`zaip-aios-full-access\` apenas quando:
277
+
278
+ - for necessário corrigir a própria configuração de permissões;
279
+ - uma operação autorizada precisar de um caminho fora do workspace;
280
+ - o bloqueio do perfil restrito tiver sido diagnosticado e não houver alternativa limitada.
281
+
282
+ Não use full access apenas para evitar investigar uma negação.
283
+
284
+ ## Validação obrigatória
285
+
286
+ Após alterar qualquer perfil:
287
+
288
+ 1. Confirme que \`default_permissions\` seleciona exatamente o perfil desejado.
289
+ 2. Confirme que não existe \`sandbox_mode\` em outra configuração carregada.
290
+ 3. Reinicie completamente o Codex.
291
+ 4. Com \`zaip-aios-security\`, valide escrita no workspace, em \`.agents\` e em \`.codex\`.
292
+ 5. Quando uma operação Git estiver autorizada, confirme que \`.git\` aceita a alteração de índice necessária, sem ampliar o acesso fora do repositório.
293
+ 6. Confirme que escrita fora do workspace é negada sem criar arquivo externo.
294
+ 7. Confirme que Git/SSH alcança \`github.com\` somente após autorização de deploy e que outros destinos continuam negados.
295
+ 8. Execute uma captura ZAIP e confirme \`run.started\`, \`usage.recorded\` e \`run.finished\`.
296
+ 9. Com full access, confirme a seleção do perfil sem realizar probes destrutivos ou gravar em
297
+ caminhos externos apenas para demonstrar alcance.
298
+
299
+ O sandbox e as ACLs são materializados na inicialização; o teste funcional precisa ocorrer
300
+ em uma nova sessão.
301
+
302
+ Se uma versão anterior com \`:workspace\` ou \`:workspace_roots\` já tiver sido executada e o
303
+ reinício continuar negando \`.agents\`/\`.codex\`, feche todas as sessões Codex, faça backup de
304
+ \`~/.codex/cap_sid\`, mova somente o arquivo ativo para fora desse caminho e reinicie o Codex.
305
+ O runtime criará novos capability SIDs; os \`DENY\` antigos ficarão inertes por não pertencerem
306
+ ao novo token. Não edite ACLs manualmente e preserve o backup para rollback.
307
+
308
+ ## Arquivos da política
309
+
310
+ | Arquivo | Papel |
311
+ | --- | --- |
312
+ | \`~/.codex/config.toml\` | seleção e definição efetiva dos perfis |
313
+ | \`.codex/config.toml\` | projeção versionada dos perfis e hooks |
314
+ | \`.codex/zaip-aios-security.config.toml\` | configuração dedicada do perfil restrito |
315
+ | \`.codex/zaip-aios-full-access.config.toml\` | configuração dedicada do perfil completo |
316
+ | \`.agents/skills/zaip-skill-security/SKILL.md\` | avaliação dos riscos e controles |
317
+ | \`.agents/skills/zaip-skill-setup/SKILL.md\` | instalação, correção e validação dos perfis |
318
+ | \`.codex/hooks/zaip-pre-tool-use.mjs\` | guarda adicional de comandos |
319
+ | \`.codex/rules/\` | decisões determinísticas de comandos permitidos e proibidos |
320
+ | este guia | contrato operacional e comparação dos perfis |
321
+ `,Oa="# Observabilidade e custos\n\n1. Selecione o Run pelo ID.\n2. Verifique duracao, tokens, custo, retries e retrabalho.\n3. Compare aceite planejado com evidencia produzida.\n4. Identifique gates lentos, contexto excessivo e chamadas repetidas.\n5. Agregue tendencias sem expor prompts ou segredos sensiveis.\n6. Converta achados recorrentes em Rule, Requirement ou melhoria de skill.\n\nRun e o envelope da chamada do `zaip-agent-orchestrator`; `parent_run_id` nulo identifica esse nivel. Sub-Run e a chamada de qualquer subagente e possui `parent_run_id`. Ambas fixam modelo e effort e agregam Calls, segmentos de uso, tokens e custo. Calls nao possuem tela ou lifecycle proprio. Operacao e Monitor de Custos apresentam “Chamadas do agente orquestrador” e “Chamadas de subagentes”; a Execution soma as duas categorias, finalizadores e Calls sem dupla contagem. Cada segmento de uso possui uma chave de origem e so pode ser atribuido uma vez; uma correcao de duplicidade registra supersessao e preserva o evento historico. Inspecione `run_purpose`, pai e `agent_name`; agentes do catalogo usam `zaip-agent-*`. Diferencie status tecnico da chamada de agente e resultado terminal da Task. Reconcilie lifecycle globalmente apenas por comando humano explicito ou pelo popup confirmado; isso nao ocorre em cada turno nem ao abrir o dashboard.\n",ka=`# Instalacao e upgrade
322
+
323
+ 1. Verifique versao atual e estado limpo ou conscientemente preservado.
324
+ 2. Execute doctor/integrity antes da mudanca.
325
+ 3. Faça dry-run da instalacao, migracao ou upgrade.
326
+ 4. Revise arquivos gerenciados, publicos e preservados.
327
+ 5. Aplique, valide adapters e rode gates.
328
+ 6. Teste rollback e confirme a versao final.
329
+
330
+ \`framework.lock.yaml\` e relevante neste fluxo; nao o carregue no trabalho comum.
331
+ `,Aa=`# Boas praticas
332
+
333
+ - Comece pelo resultado e aceite, nao pela ferramenta.
334
+ - Mantenha dominio independente de infraestrutura.
335
+ - Faça mudancas pequenas, reversiveis e rastreaveis.
336
+ - Valide cedo com testes deterministas e focados.
337
+ - Prefira configuracao explicita a convencoes ocultas.
338
+ - Leia contexto sob demanda e preserve o budget de tokens.
339
+ - Trate documentacao, observabilidade e rollback como parte da entrega.
340
+ - Nunca termine a Run raiz sem o Sub-Run finalizador ou com Task em executing/verifying.
341
+ - Nao terminalize SPEC/PRD por causa do resultado isolado de uma Task filha.
342
+ - Prefira reconciliacao manual sob demanda; hooks de escrita fazem checagem local sem varredura global.
343
+ `,ja=`# Troubleshooting
344
+
345
+ 1. Reproduza o problema com o menor comando possivel.
346
+ 2. Leia a mensagem completa e identifique o primeiro erro causal.
347
+ 3. Rode doctor, validadores focados e \`git diff --check\`.
348
+ 4. Confira versoes, paths, encoding, variaveis e arquivos gerenciados.
349
+ 5. Compare com projections de runtime, sem varrer records.
350
+ 6. Corrija a causa, repita a reproducao e depois os gates completos.
351
+
352
+ Se uma Task estiver presa em executing/verifying, use o popup Reconciliar. O reparo aceita \`task_complete\` exato, marca Run orfa apos dez minutos como failed e usa blocked quando faltam gates; nunca infere cancelamento. Nao habilite reconciliacao automatica por turno ou na abertura do dashboard.
353
+
354
+ Se o problema for de instalacao ou integridade, consulte \`framework.lock.yaml\`.
355
+ `,Ma="# Tools e setup do Codex\n\n1. Peça ao agente para listar ou ativar uma tool; ele usa `$zaip-skill-tool-setup`.\n2. A skill lê somente catálogo e manifesto aplicável.\n3. MCP confiável é registrado desabilitado em `.codex/config.toml` e validado antes da ativação.\n4. API sem MCP confiável aciona `$zaip-skill-api-to-mcp` para gerar um adaptador seguro.\n5. Secrets nunca são coladas no chat; nomes ficam em `.agents/.env.example` e valores em armazenamento local ignorado.\n6. Alterações de configuração devem ser reversíveis e preservar preferências existentes.\n\nAtive por padrão apenas integrações públicas, read-only e sem autenticação, como documentação oficial. Browser/Playwright deve ser opt-in do perfil de desenvolvimento, pois inicia processos e amplia a superfície operacional.\n\n## MCP local gerado de API\n\n1. Modele um `adapter.yaml` a partir de documentação oficial; use o exemplo da skill API-to-MCP.\n2. Execute `scaffold-local-mcp.mjs` para gerar `definition.json`, `server.mjs` e `cli.mjs`.\n3. Rode `node .agents/tools/servers/<id>/cli.mjs doctor`.\n4. Faça chamadas read-only com `cli.mjs call <tool> '<json>'`.\n5. Gere um preview do Codex com `configure-local-mcp.mjs <id>`.\n6. Revise e aplique com `--write`; use `--enable` somente quando o doctor estiver pronto.\n\nO servidor usa STDIO, não abre porta e não exige deploy. Escritas ficam bloqueadas sem aprovação e `ZAIP_ALLOW_MCP_WRITES=1`.\n\n## Documentacao OpenAI\n\nO perfil default habilita `openaiDeveloperDocs` em `.codex/config.toml`, sem credencial e em modo read-only. Perguntas sobre OpenAI API, modelos, SDKs, Codex ou MCP devem acionar `$zaip-skill-openai-docs`, pesquisar o MCP oficial e citar a pagina consultada.\n",Na=`# Lifecycle e reconciliacao
356
+
357
+ ## Entradas
358
+
359
+ - Conversation: pergunta, feedback ou analise read-only; cria Run intake e nenhuma Task.
360
+ - Task avulsa: resultado independente. Pedido de acao entra em Execucao antes da primeira escrita; pedido apenas de preparacao pode parar em Pronto para Executar.
361
+ - SPEC: planejamento tecnico de multiplas Tasks; draft fica em Planejamento.
362
+ - PRD: definicao de produto; draft fica em Definicao.
363
+
364
+ ## Colunas
365
+
366
+ | Coluna | Entidades |
367
+ |---|---|
368
+ | Definicao | somente PRD draft |
369
+ | Planejamento | somente SPEC draft |
370
+ | Pronto para Executar | PRD/SPEC ready e Task avulsa nao iniciada |
371
+ | Execucao | Task executing e SPEC/PRD active |
372
+ | Verificacao | Task verifying ou macro nos gates parentais |
373
+ | Finais | completed/delivered, blocked, failed ou cancelled |
374
+
375
+ ## Execution, Runs, Sub-Runs e Calls
376
+
377
+ - Execution coordena a DAG de uma ou mais Tasks.
378
+ - Run e a chamada raiz do \`zaip-agent-orchestrator\`; possui \`parent_run_id\` nulo.
379
+ - Sub-Run e cada chamada de subagente; possui \`parent_run_id\` e compartilha o mesmo ledger \`RUN-*\`.
380
+ - Novas gravacoes usam somente \`run_role: intake|orchestrator|subagent\`; \`owner|contributor\` sao valores historicos aceitos apenas na leitura e normalizados imediatamente.
381
+ - \`run_purpose\` distingue \`orchestration\`, \`execution\`, \`review\`, \`audit\` e \`finalization\`.
382
+ - cada Run/Sub-Run fixa agente, modelo e effort; mudanca deliberada abre outra chamada de agente.
383
+ - Calls e ferramentas sao eventos internos; quantidade, tokens e custo ficam agregados na Run/Sub-Run, sem tela propria.
384
+
385
+ O ultimo filho de qualquer Execution e sempre o \`zaip-agent-execution-finalizer\`. Ele aguarda todos os outros descendentes, cria uma barreira contra filhos posteriores e retorna uma decisao terminal restrita para a CLI aplicar. Toda Execution exige antes ao menos um executor elegivel pelas capacidades do catalogo. Status tecnico da chamada de agente e resultado do trabalho sao independentes.
386
+
387
+ \`blocked\` e retomavel com \`task resume\`; \`failed\` exige \`task rework\` na mesma Task e nova tentativa. \`completed\` e \`cancelled\` sao imutaveis. Interromper geracao bloqueia; cancelar a Task explicitamente cancela.
388
+
389
+ ## SPEC e PRD
390
+
391
+ Ao iniciar a primeira Task filha, os pais ficam active/Execucao e permanecem assim entre Runs. Task bloqueada ou falhada nao bloqueia automaticamente o pai. Depois que todas as Tasks concluem, SPEC/PRD entram em verificacao parental; apenas gates de integracao, Acceptance Criteria, outcomes e Evidence entregam o macro.
392
+
393
+ ## Reconciliacao
394
+
395
+ O popup Reconciliar chama \`run reconcile --open\` somente depois da confirmacao humana. Nao existe varredura ao abrir o dashboard, por turno ou por intervalo.
396
+
397
+ O reparo e idempotente: \`task_complete\` local exato permite tentar conclusao; gate insuficiente usa blocked; Run sem invocacao ativa por dez minutos usa failed; cancelled nunca e inferido. Projecoes exibem o status persistido e nao revivem Task terminal por atividade local obsoleta.
398
+
399
+ ## Mutacoes
400
+
401
+ Codigo, documentacao e configuracao exigem Task materializada e Run raiz ativa antes da escrita. Sao isentos deploy/publicacao Git sem mudanca de produto, records/projections/telemetria ZAIP, metadados \`.git\`, caches, builds, testes e temporarios descartaveis. O hook pre-write faz checagem local do turno, sem tokens e sem reconciliacao global.
402
+ `,Pa=`# ZAIP-AIOS
403
+
404
+ ZAIP-AIOS é o sistema operacional de engenharia autônoma de software para o Codex. Instalado como uma camada de aplicação Git-native dentro do repositório, ele transforma uma solicitação em trabalho estruturado de ponta a ponta: define requisitos, prepara o plano, coordena múltiplos agentes, aplica regras rígidas de arquitetura limpa e CQRS, executa testes e revisão de código e só considera o resultado concluído quando existem evidências verificáveis.
405
+
406
+ O fluxo pode começar por uma **Task**, por um **PRD** (*Product Requirements Document*, ou Documento de Requisitos do Produto) ou por uma **SPEC**, a especificação técnica desenvolvida segundo o conceito de **Spec-Driven Development (SDD)**. O PRD explica o problema, o resultado esperado, o contexto e os critérios do produto; a SPEC transforma essa intenção em escopo técnico, solução, Critérios de Aceite, Changes e uma DAG de Tasks executáveis.
407
+
408
+ O ZAIP-AIOS não exige serviço em VPS, runtime concorrente ou roteamento obrigatório de modelos por API. O Codex permanece como host de execução; o ZAIP-AIOS acrescenta método, memória operacional, governança, rastreabilidade e observabilidade ao que acontece no projeto. O dashboard oferece Trabalho (Kanban) e Trabalho (Lista) para acompanhar Tasks, SPECs e PRDs, além do status, das dependências, dos bloqueios e do progresso do trabalho que múltiplos agentes executam de forma autônoma.
409
+
410
+ O desenvolvimento pode utilizar os tokens incluídos na conta ChatGPT/Codex, sem exigir consumo direto de API. O dashboard acompanha tokens, tempo e custo por tarefa e calcula o custo equivalente estimado de quanto o mesmo consumo representaria se fosse cobrado pelos preços de API. Essa comparação ajuda a prever custos antes de adotar uma execução via API e a dimensionar o benefício econômico aparente do plano em relação ao preço público da API — uma estimativa comparativa, não uma medição oficial de subsídio ou cobrança da OpenAI.
411
+
412
+ ## Tese central
413
+
414
+ | Tipo | Nome | Responsabilidade |
415
+ | --- | --- | --- |
416
+ | **Modelo de IA (AI Model)** | **GPT-5.6** | Modelo de referência do ZAIP-AIOS e atual família flagship da OpenAI para trabalhos complexos. A documentação oficial o posiciona como uma nova referência de qualidade e eficiência, com forte capacidade de raciocínio, programação, uso de ferramentas, coordenação multiagente e continuidade em tarefas longas. O ZAIP-AIOS o adota como um dos modelos mais capazes do mercado, mas mantém a configuração aberta para que cada projeto possa comparar, testar ou substituir o modelo quando outro atender melhor ao seu contexto. |
417
+ | **Ferramenta (AI Harness)** | **Codex no Windows** | Harness oficial que conecta o modelo ao repositório, terminal, ferramentas, subagentes, worktrees, sandbox, approvals, skills, hooks, navegador e continuidade de execução. A tese do ZAIP-AIOS é que o harness oficial possui uma vantagem estrutural: modelo, treinamento, instruções, ferramentas e orquestração podem evoluir em conjunto à medida que surgem novas práticas de agentes. Soluções open source continuam úteis para experimentação e compatibilidade, mas não controlam essa integração ponta a ponta; por isso, o Codex é o caminho preferencial para obter a melhor aderência ao GPT-5.6. |
418
+ | **Metodologia (AI Coding)** | **ZAIP-AIOS** | OS Git-native de engenharia autônoma de software com múltiplos agentes de IA. Aplica Clean Architecture, modularização, organização de pastas e código, CQRS e Spec-Driven Development; transforma PRDs e SPECs em Tasks, DAGs e Changes executáveis; registra Decisions, Executions e Runs; automatiza testes, reviews e coleta de evidências; acompanha tokens, custo equivalente estimado de API, tempo de processamento, métricas e performance; e mantém rastreabilidade e auditoria de cada decisão, evidência e mudança efetivamente realizada no código. |
419
+
420
+ Essa separação é intencional: o GPT-5.6 fornece a inteligência, o Codex fornece o harness oficial de execução e o ZAIP-AIOS fornece a metodologia, a governança e a memória verificável do desenvolvimento. O ZAIP-AIOS define **o que deve ser feito, como o trabalho deve ser organizado, quais regras arquiteturais devem ser respeitadas e quais provas permitem declará-lo concluído**. A experiência de referência é otimizada para GPT-5.6 e Codex, enquanto modelos e hosts alternativos continuam disponíveis para comparação e compatibilidade por meio de artefatos portáveis, sem reduzir o caminho oficial ao menor denominador comum.
421
+
422
+ ## Da conversa ao trabalho executável
423
+
424
+ O framework ZAIP-AIOS transforma linguagem natural em engenharia estruturada. O usuário pode enviar uma mensagem curta, manter uma conversa de refinamento ou fornecer a transcrição de um áudio longo explicando contexto, restrições e resultado desejado. O framework avalia complexidade, dependências, amplitude e risco para propor a entrada adequada: uma Task para trabalho direto, uma SPEC para uma entrega técnica com múltiplas Tasks ou um PRD para uma iniciativa de produto composta por uma ou mais SPECs. A criticidade \`leve\`, \`padrão\` ou \`crítica\` determina a profundidade de planejamento, revisão, segurança e evidência exigida; nenhum artefato fica fechado à revisão humana.
425
+
426
+ Isso permite sair de uma conversa livre sem cair em *vibe coding*: perguntas e análises read-only permanecem Conversations sem Task; pedidos de ação tornam-se trabalho executável. Antes da mutação, a intenção é convertida em requisitos, critérios de aceite, escopo, dependências e write scopes, e uma Task com Run raiz de orquestração entra em Execução. Consulte [Lifecycle de Conversations, Tasks, SPECs e PRDs](docs/WORK-LIFECYCLE.md).
427
+
428
+ ## Método ZAIP em seis etapas
429
+
430
+ | Etapa | Artefatos | O que acontece |
431
+ | --- | --- | --- |
432
+ | **1. Definição** | PRD + Requirements | Registra objetivo, contexto, público, restrições, resultado esperado e Critérios de Aceite que definem o trabalho. |
433
+ | **2. Planejamento** | SPEC + Changes | Descreve escopo, solução, arquitetura, riscos e mudanças previstas antes da execução, seguindo SDD. |
434
+ | **3. Execução** | Tasks + DAG + Executions + Runs | Coordena Tasks, dependências, agentes e arquivos produzidos; registra cada tentativa e seu consumo observável. |
435
+ | **4. Decisões** | Decisions (Human + AI / Planning + Execution) | Preserva decisões humanas e da IA tomadas durante planejamento, execução, revisão e reparo, com contexto e consequências. |
436
+ | **5. Verificação** | Tests + Reviews + Evals + Checks | Executa os mecanismos de qualidade e compara o resultado observado com os requisitos e Critérios de Aceite. |
437
+ | **6. Evidências** | Evidence + Results + Traceability | Coleta, registra e relaciona as provas produzidas pela verificação às Tasks, Changes, Runs e aos Critérios de Aceite; o trabalho só é concluído quando as evidências são suficientes e reproduzíveis. |
438
+
439
+ O método mantém intenção e execução separadas. PRD e SPEC explicam o que se pretende entregar; Change, Task, Execution e Run registram como o trabalho foi realizado; Decisions explicam por que caminhos relevantes foram escolhidos; a Verificação executa testes, reviews, evals e checks; e Evidence preserva os resultados observados e sua relação com os Critérios de Aceite. Assim, “concluído” é um estado demonstrado por diff, resultado e evidência reproduzível, não apenas declarado por um agente.
440
+
441
+ ## Cadeia completa de execução
442
+
443
+ | Conceito | Responsabilidade |
444
+ | --- | --- |
445
+ | **Rule** | Regra durável de comportamento, arquitetura, segurança, contexto ou qualidade que o Codex deve seguir. |
446
+ | **Requirement** | Obrigação verificável do produto, acompanhada de Critérios de Aceite. |
447
+ | **PRD** | Documento de Requisitos do Produto que governa uma iniciativa e organiza uma ou mais SPECs. |
448
+ | **SPEC** | Especificação técnica SDD que detalha solução, escopo, riscos, Changes, Tasks e DAG. |
449
+ | **Change** | Narrativa viva de uma mudança planejada e executada: decisões, arquivos afetados, desvios, testes, evidências, rollout, rollback e resultado. |
450
+ | **Task** | Menor unidade executável, com objetivo, risco, prioridade, dependências, write scopes e critérios de aceite. |
451
+ | **DAG** | Grafo acíclico que ordena dependências, identifica paralelismo seguro e impede execução fora da sequência necessária. |
452
+ | **Execution** | Uma unidade idempotente por turno: \`interaction\` registra conversa sem Task artificial; \`delivery\` materializa e coordena trabalho, Changes e DAG quando aplicável. |
453
+ | **Run / Sub-Run** | Run de captura ou do agente orquestrador possui \`parent_run_id: null\`; Sub-Run é cada chamada de subagente relacionada por \`parent_run_id\`. Novos registros usam \`run_role: intake|orchestrator|subagent\`; cada chamada fixa modelo e effort e agrega suas Calls internas. |
454
+ | **Decision** | Decisão humana ou da IA com contexto, alternativa escolhida, motivo, consequências e possibilidade de rollback. |
455
+ | **Evidence** | Prova associada à Task e aos Critérios de Aceite: teste, diff, review, check, relatório ou resultado reproduzível. |
456
+ | **Eval** | Avaliação determinística ou orientada por rubrica que mede qualidade, regressão, aderência e performance. |
457
+
458
+ ## Três formas de executar
459
+
460
+ 1. **Task-first:** executa uma única Task independente para mudanças diretas e bem delimitadas.
461
+ 2. **SPEC:** executa um conjunto de Tasks relacionadas, coordenadas por uma DAG e governadas pela mesma especificação técnica.
462
+ 3. **PRD:** executa uma iniciativa completa, selecionando uma ou mais SPECs, cada uma com suas Changes, Tasks e dependências.
463
+
464
+ Em todos os casos, cada turno observável resolve para uma Execution. \`prepare\` valida e congela o plano antes da mutação; \`execute\` reutiliza a Execution \`delivery\` para materializar Change e Task; cada Execution usa uma Run raiz do orquestrador, ao menos um Sub-Run executor elegível e o \`zaip-agent-execution-finalizer\` obrigatório por último. SPEC/PRD permanecem ativos entre Runs filhas e só são entregues por gates parentais.
465
+
466
+ A profundidade de prova é adaptativa: Task standalone \`lite\` usa exatamente uma validação e uma Evidence; \`standard\` usa duas ou três de cada; \`critical\` usa três ou mais e controles independentes. Entregas de SPEC e PRD acrescentam matriz parental, pelo menos três validações e três Evidences, integração real e revisão independente. O runtime manual continua padrão; a autonomia por Codex ou Claude é opt-in, isolada em worktrees e limitada por write scopes, commits, budgets e gates tipados. Consulte [Assurance adaptativa e autonomia opt-in](docs/ASSURANCE-E-AUTONOMIA.md).
467
+
468
+ ## Dashboard operacional
469
+
470
+ O dashboard local projeta os registros Git-native e não mantém uma verdade paralela. A leitura é reconstruível; a única reparação de lifecycle é o comando canônico disparado após confirmação no popup Reconciliar. Ele nunca roda ao abrir o dashboard ou em intervalo automático.
471
+
472
+ ### \`zaip-dashboard-operations\`
473
+
474
+ É a visão operacional com Trabalho (Kanban) e Trabalho (Lista). Ambas preservam os filtros Todas as Tarefas, Visão Unificada Geral, PRDs, SPECs e Tarefas Avulsas. A lista torna comparáveis status, origem, risco, Runs, Sub-Runs, tempo, tokens, custo e cobertura; o Kanban mantém a leitura por estágio. O usuário pode navegar pelos três níveis de execução, identificar bloqueios e abrir os detalhes rastreáveis de cada item.
475
+
476
+ ### \`zaip-cost-monitor\`
477
+
478
+ Consolida tokens, tempo e custo por Run, Task, SPEC e PRD e permite analisar fases de conversa, planejamento e execução, além de trabalho novo e rework. Quando o Codex consome tokens ou franquia da conta em vez de cobrar uma API, o módulo calcula — quando há medição e pricing compatível — o **custo equivalente estimado de API** em USD e BRL. Essa estimativa serve para gestão e comparação; ela nunca é apresentada como cobrança real. As projeções preservam agregações por dia, mês e ano, médias, concentração de consumo e cobertura; valores não observados continuam \`unknown\`, nunca viram zero artificialmente.
479
+
480
+ ### \`zaip-traceability\`
481
+
482
+ Correlaciona PRD, Requirements, SPEC, Change, Task, Execution, Runs, Decisions, testes, reviews, evals e Evidence em um grafo lógico de rastreabilidade. A visão detalha as seis etapas do método e mostra quais documentos e provas sustentam cada resultado. Cada registro recebe identificador, data e hora quando faz parte do lifecycle ou da telemetria; as evidências permanecem vinculadas e a cronologia também é preservada pelo Git. Isso permite auditoria, retomada, análise de rework e comparação entre intenção e execução. Projeções podem ser reconstruídas e otimizadas; uma futura compactação do histórico canônico deve preservar IDs, relações, métricas e evidências.
483
+
484
+ ## Princípios de engenharia autônoma
485
+
486
+ - **Clean Architecture:** domínio, aplicação, adapters e infraestrutura permanecem separados; regras de negócio não dependem de frameworks ou detalhes externos, as dependências apontam para as camadas internas e composition roots conectam implementações concretas nas bordas.
487
+ - **CQRS:** commands e queries seguem fluxos explícitos e independentes; comandos alteram estado por casos de uso e ports apropriados, enquanto consultas não produzem efeitos colaterais e retornam read models adequados à leitura.
488
+ - **Modularização e organização do código:** pastas, arquivos, módulos e componentes são estruturados por domínio e responsabilidade, com fronteiras explícitas, alta coesão e baixo acoplamento para facilitar navegação, manutenção, testes e evolução do software.
489
+ - **Autonomia dentro de limites:** subagentes trabalham com DAG, write scopes, sandbox, approvals, budgets, regras de segurança e gates proporcionais ao risco.
490
+ - **Contexto progressivo:** cada agente recebe apenas Rules, Requirements, skills e evidências relevantes para seu papel, reduzindo ruído, custo e perda de contexto.
491
+ - **Conclusão baseada em prova:** testes, review, evals, checks e Evidence precisam cobrir os Critérios de Aceite antes da entrega.
492
+ - **Histórico recuperável:** decisões, mudanças, tentativas, falhas, retries, reparos e rollback permanecem vinculados, permitindo pausar, retomar e auditar o trabalho.
493
+ - **Observabilidade honesta:** tokens, custo, tempo, cobertura e performance são medidos por escopo; ausência de telemetria permanece explícita em vez de gerar precisão fictícia.
494
+
495
+ Toda mensagem do usuário cria uma Execution e uma Run de captura. Perguntas, feedbacks e análises read-only usam Execution \`interaction\`, sem Task ou Change artificial. Pedido avulso direto materializa e inicia a mesma Execution \`delivery\`, Task, Change e Run raiz de orquestração antes da primeira mutação; somente preparação explicitamente solicitada pode parar em Pronto para Executar. PRD \`draft\` ocupa Definição e SPEC \`draft\` ocupa Planejamento; Tasks nunca ocupam essas colunas.
496
+
497
+ ## Instalação em um comando
498
+
499
+ Com Node.js 22 ou mais recente e Git disponíveis, abra o terminal na raiz do repositório que receberá o ZAIP-AIOS e execute:
500
+
501
+ \`\`\`bash
502
+ npx @zaip-ai/cli@latest init
503
+ \`\`\`
504
+
505
+ O sufixo \`@latest\` instala a release pública atual sem fixar o README a uma versão específica. O CLI encontra a raiz Git mesmo quando o comando é iniciado em uma subpasta, valida o template antes de escrever e interrompe a instalação se detectar conflito com arquivo pertencente ao usuário. O mesmo comando pode ser executado novamente para receber arquivos novos e atualizar adapters gerenciados sem apagar o histórico do projeto.
506
+
507
+ Cada release do CLI leva seu próprio template verificado. A árvore documentada abaixo representa o estado atual deste repositório-fonte; uma funcionalidade recém-integrada passa a chegar pelo mesmo comando assim que a release correspondente é publicada.
508
+
509
+ O instalador cria [\`.agents\`](.agents/) com regras, requisitos, skills, documentação operacional, catálogo de ferramentas, dashboard, design system e estado Git-native do lifecycle. Ele também instala os adapters \`AGENTS.md\` e \`CLAUDE.md\`, a skill de descoberta em \`.codex/skills/zaip-aios/SKILL.md\` e \`.claude/skills/zaip-aios/SKILL.md\`, a configuração de projeto \`.codex/config.toml\` e as configurações equivalentes do Claude. Esses arquivos apontam cada cliente para a mesma fonte canônica, preservando o Codex como experiência principal sem acoplar PRDs, SPECs, Tasks e evidências a um único host.
510
+
511
+ Depois da instalação, use o [índice operacional](.agents/zaip-aios/INDEX.md) para abrir somente o guia necessário sobre primeiros passos, execução, revisão, custos, ferramentas, diagnóstico ou atualização.
512
+
513
+ ### Codex, documentação oficial e navegador
514
+
515
+ O arquivo \`.codex/config.toml\` é uma configuração de projeto carregada pelo Codex somente quando o repositório é confiável. Na configuração atual do ZAIP-AIOS, ele orienta a descoberta de \`AGENTS.md\` e habilita o MCP oficial e read-only da documentação OpenAI, permitindo que o agente consulte informações atuais sobre Codex, modelos, APIs, SDKs e MCP sem depender apenas da memória do modelo. O instalador também disponibiliza a skill ZAIP de descoberta, enquanto o próprio Codex fornece recursos estáveis como shell, subagentes, apps, hooks e busca web conforme a superfície, a conta e as políticas do ambiente.
516
+
517
+ O navegador integrado não é ativado silenciosamente pelo CLI nem por \`.codex/config.toml\`. No app Codex/ChatGPT para desktop, o plugin Browser permite abrir páginas e aplicações locais, clicar, digitar, inspecionar o estado renderizado, capturar screenshots e verificar visualmente uma implementação, sempre sujeito às permissões de sites e às confirmações de ações sensíveis. O navegador integrado não está disponível no Codex CLI nem na extensão de IDE. Para automação por Playwright ou outro MCP de navegador, \`.agents/tools\` inclui um manifesto opt-in desabilitado por padrão; a implementação precisa ser escolhida, auditada e validada antes da ativação.
518
+
519
+ ## Estrutura atual de \`.agents\`
520
+
521
+ \`\`\`text
522
+ .agents/
523
+ ├── config/
524
+ │ ├── project.yaml
525
+ │ ├── framework.lock.yaml
526
+ │ ├── agents/catalog.yaml
527
+ │ └── profiles/clients.yaml
528
+ ├── dashboard/
529
+ │ ├── zaip-dashboard.exe
530
+ │ ├── apps/frontend/
531
+ │ ├── modules/{operations,cost-monitor,traceability}/
532
+ │ ├── packages/
533
+ │ └── tests/e2e/
534
+ ├── design/
535
+ │ ├── DESIGN.md
536
+ │ ├── tokens.json
537
+ │ ├── zaip-design.exe
538
+ │ ├── apps/catalog/
539
+ │ └── packages/
540
+ ├── projections/
541
+ │ └── runtime/ # read models locais e reconstruíveis
542
+ ├── records/
543
+ │ ├── prds/<ano>/<mês>/
544
+ │ ├── specs/<ano>/<mês>/
545
+ │ ├── changes/<ano>/<mês>/
546
+ │ ├── tasks/<ano>/<mês>/
547
+ │ ├── executions/<ano>/<mês>/
548
+ │ └── runs/<ano>/<mês>/
549
+ ├── rules/
550
+ │ ├── zaip/{core,workflow,architecture,security,context,evolution}.md
551
+ │ └── project/ # Rules personalizadas deste projeto
552
+ ├── requirements/
553
+ ├── skills/
554
+ ├── tools/
555
+ │ ├── catalog.yaml
556
+ │ ├── {mcp,api}/
557
+ │ ├── policies/
558
+ │ ├── profiles/
559
+ │ ├── runtime/
560
+ │ └── servers/
561
+ ├── zaip-aios/
562
+ │ ├── INDEX.md
563
+ │ └── guides/
564
+ ├── local/ # estado local ignorado pelo Git
565
+ ├── .env.example
566
+ └── .gitignore
567
+ \`\`\`
568
+
569
+ | Caminho | Responsabilidade |
570
+ | --- | --- |
571
+ | \`config/\` | Configuração do projeto, perfis de clientes e agentes, maturidade de capacidades e lock de integridade dos arquivos gerenciados. |
572
+ | \`dashboard/\` | Dashboard operacional local com Kanban, custos, tempo, tokens e grafo de rastreabilidade; lê projeções e registros sem criar uma verdade paralela. |
573
+ | \`design/\` | Design system do ZAIP, tokens visuais, catálogo de componentes e launcher local de inspeção. |
574
+ | \`projections/\` | Read models descartáveis e reconstruíveis usados para descoberta rápida, agregações e dashboard sem varrer todo o histórico canônico. |
575
+ | \`records/\` | Fonte canônica Git-native de PRDs, SPECs, Changes, Tasks, Executions e Runs, organizada por identificador e período. |
576
+ | \`requirements/\` | Requisitos duráveis e Critérios de Aceite de lifecycle, execução, custos, contexto, dashboard, arquitetura e design system. |
577
+ | \`rules/\` | Regras obrigatórias do framework em \`rules/zaip\` e regras particulares do projeto em \`rules/project\`. |
578
+ | \`skills/\` | Workflows reutilizáveis que transformam conversas em Requirements, Tasks, SPECs e PRDs e orientam execução, revisão, segurança, custos, contexto e ferramentas. |
579
+ | \`tools/\` | Catálogo de MCPs e APIs, políticas de aprovação e segredos, perfis de ativação, doctors e servidores locais gerados de maneira auditável. |
580
+ | \`zaip-aios/\` | Handbook operacional com índice de baixo custo de contexto e guias de instalação, execução, revisão, agentes, custos, segurança e integração com Codex. |
581
+ | \`local/\` | Estado específico da máquina, como diagnóstico de ferramentas, mantido fora do Git; segredos nunca devem ser gravados nos registros. |
582
+
583
+ \`framework.lock.yaml\` é a referência mecânica dos arquivos administrados pela distribuição, enquanto \`project.yaml\` descreve o projeto consumidor. Rules em \`rules/zaip\` pertencem ao framework e podem ser atualizadas pelo setup. Rules em \`rules/project\` pertencem ao projeto consumidor e não devem ser sobrescritas por uma atualização. O agente começa por \`rules/zaip/core.md\`, usa \`projections/runtime\` para descoberta e só abre um registro histórico em \`records\` quando já possui seu ID explícito.
584
+
585
+ O código canônico do dashboard vive em \`.agents/dashboard\`, separado das aplicações do produto. Ele possui somente \`apps/frontend\`; o servidor loopback read-only é uma implementação técnica em \`packages/local-runtime\`, e não um \`apps/backend\`. Os módulos \`operations\`, \`cost-monitor\` e \`traceability\` concentram as projeções reutilizáveis. \`zaip-dashboard.exe\` permanece diretamente em \`.agents/dashboard\` e também é instalado pelo CLI oficial.
586
+
587
+ ## Arquitetura das aplicações
588
+
589
+ Quando essas superfícies existirem, use a estrutura canônica:
590
+
591
+ \`\`\`text
592
+ apps/
593
+ ├── frontend/ # UI do produto e composition root do cliente
594
+ ├── backend/ # APIs, workers e composition roots de servidor
595
+ └── site/ # landing page e site público, implantável separadamente
596
+ modules/<area>/ # capacidades de negócio e seus contratos públicos
597
+ packages/<library>/ # bibliotecas técnicas reutilizáveis
598
+ tests/e2e/ # fluxos que atravessam aplicações
599
+ \`\`\`
600
+
601
+ A direção de dependência é \`apps -> modules -> packages\`. Essas pastas descrevem aplicações do produto consumidor, não o dashboard ZAIP. \`apps/site\` nunca importa o dashboard, não lê \`.agents\` e não depende de implementação privada do backend. Pastas de superfícies ausentes não precisam ser criadas vazias. Testes unitários ficam junto do código; jornadas cross-app ficam em \`tests/e2e\`.
602
+
603
+ Arquivos-fonte com 401–800 linhas geram warning e arquivos com 801 ou mais linhas geram erro. O gate ignora código gerado, distribuição, vendor, dados e lockfiles. Exceções temporárias cobrem somente legado não-dashboard, têm limite congelado, responsável, motivo e validade.
604
+
605
+ ## Fluxos
606
+
607
+ \`\`\`text
608
+ Conversation: Execution interaction + Run intake/orquestrador -> executor elegível -> execution-finalizer -> resposta, sem Task
609
+ Task direta: capture -> Execution delivery + Task + Change -> Run do orquestrador -> Sub-Runs -> execution-finalizer -> status final
610
+ Task preparada: Task -> Pronto para Executar -> execute -> Run do orquestrador -> Sub-Runs -> execution-finalizer -> status final
611
+ SPEC: SPEC draft/Planejamento -> ready -> active + Tasks/Executions/Runs/Sub-Runs -> Verificação parental -> delivered
612
+ PRD: PRD draft/Definição -> SPEC(s) -> ready -> active + Tasks/Executions/Runs/Sub-Runs -> Verificação parental -> delivered
613
+ \`\`\`
614
+
615
+ O prepare automático de uma Task só atende o caso sem dependências. Para uma DAG manual, gere e valide o plano completo com \`zaip plan build --draft DRAFT.json --output PLAN.json\` e \`zaip plan validate --plan PLAN.json\`, então use \`zaip task prepare TASK-ID --plan PLAN.json\`. PRD exige ao menos uma SPEC para prepare, execute e deliver; sua entrega considera apenas as SPECs selecionadas no PreparedPlan.
616
+
617
+ Refinamento não é um comando CLI: edite o Markdown Git-native somente em \`draft\`, incrementando \`revision\` e \`updated_at\`. Depois de prepare, uma mudança semântica exige voltar explicitamente a um draft pela política suportada ou criar um novo draft.
618
+
619
+ Use \`zaip run list\` para navegação paginada e \`zaip run aggregate\` para custos/tokens no escopo filtrado. Gates estruturais incluem \`zaip architecture validate\`, \`zaip modules validate\`, \`zaip profile validate\` e, quando aplicável, \`zaip cqrs validate\`.
620
+
621
+ Finalize primeiro todos os Sub-Runs de trabalho, depois o Sub-Run \`finalization\` do \`zaip-agent-execution-finalizer\` e por último a Run raiz com status técnico e resultado da Task separados: \`zaip run finish RUN-ID --status completed --task-outcome completed|blocked|failed|cancelled\`, seguido de \`zaip run closure RUN-ID\`. O reparo global \`zaip run reconcile --open\` é manual e, no dashboard, só ocorre após confirmação no popup.
622
+
623
+ O dashboard, o Kanban e o Cost Monitor são projeções do estado Git-native. Tokens, custos e indicadores de tempo e performance são associados aos Runs e ao lifecycle, com análise por Task, SPEC e PRD. Conversation, Planning e Execution permanecem separados; totais, estimativas e cobertura nunca convertem dados indisponíveis em zero.
624
+
625
+ ## Desenvolvimento do framework
626
+
627
+ Esta seção é destinada a mantenedores e contribuidores que alteram o código-fonte do próprio ZAIP-AIOS. Quem apenas instalou o framework dentro de outro repositório não precisa executar esta rotina para usar o Codex, criar Tasks, SPECs ou PRDs, acompanhar o dashboard ou executar o lifecycle normalmente.
628
+
629
+ ### Repositório-fonte e projeto consumidor
630
+
631
+ - **Repositório-fonte:** contém a implementação oficial do ZAIP-AIOS, seus pacotes, dashboard, Rules, Requirements, skills, ferramentas e artefatos de distribuição. Mudanças intencionais nesses componentes precisam passar pelos gates de integridade, qualidade, testes e build.
632
+ - **Projeto consumidor:** recebe uma versão publicada do framework dentro de \`.agents\`. O arquivo \`framework.lock.yaml\` é atualizado somente pelos fluxos transacionais de instalação ou upgrade do CLI; o projeto consumidor não executa \`sync:framework-lock\` para aceitar alterações locais.
633
+
634
+ Configurações e regras que pertencem ao projeto consumidor devem permanecer nas áreas próprias do projeto, como \`.agents/config/project.yaml\` e \`.agents/rules/project\`. Arquivos administrados pela distribuição não devem ser modificados e depois incorporados ao lock apenas para silenciar uma divergência.
635
+
636
+ ### Integridade dos arquivos gerenciados
637
+
638
+ O \`framework.lock.yaml\` é um manifesto mecânico de integridade, não um lock de dependências como \`pnpm-lock.yaml\`. Ele registra os caminhos e hashes SHA-256 dos arquivos que pertencem à distribuição do ZAIP-AIOS, permitindo detectar alteração acidental, arquivo ausente ou conteúdo diferente do release esperado. Ele não armazena segredos, telemetria ou histórico de execução.
639
+
640
+ Quando um mantenedor altera intencionalmente Rules, Requirements, skills ou outro arquivo gerenciado no repositório-fonte, deve revisar a mudança e então regenerar os hashes:
641
+
642
+ \`\`\`bash
643
+ pnpm sync:framework-lock
644
+ pnpm validate:framework-lock
645
+ \`\`\`
646
+
647
+ \`sync:framework-lock\` grava o novo conjunto de caminhos e hashes no lock. \`validate:framework-lock\` é somente leitura: recalcula o estado esperado e falha se houver drift. O sync não deve ser usado automaticamente para esconder uma divergência; primeiro é necessário confirmar que a mudança pertence de fato ao framework e deve fazer parte da próxima distribuição.
648
+
649
+ ### Gates locais de qualidade
650
+
651
+ | Comando | O que verifica |
652
+ | --- | --- |
653
+ | \`pnpm validate:framework-lock\` | Confirma que todos os arquivos gerenciados correspondem aos caminhos e hashes registrados no lock. |
654
+ | \`pnpm validate:skills\` | Valida estrutura, nomes, frontmatter, interfaces, links, recursos e invariantes de segurança das skills. |
655
+ | \`pnpm test:encoding\` | Detecta UTF-8 inválido, caracteres corrompidos, *mojibake* e outros problemas de codificação textual. |
656
+ | \`pnpm validate:source-size\` | Mede arquivos de código, aplica limites e exceções temporárias e sinaliza componentes que precisam ser divididos em módulos mais coesos. |
657
+ | \`pnpm lint\` | Verifica formatação, consistência e regras estáticas do código. |
658
+ | \`pnpm typecheck\` | Executa a validação de tipos TypeScript nos pacotes do workspace. |
659
+ | \`pnpm test\` | Executa os testes automatizados dos pacotes por meio do workspace. |
660
+ | \`pnpm build\` | Compila e empacota os componentes, além de normalizar os textos gerados. |
661
+
662
+ Uma validação local típica, depois de atualizar o lock quando necessário, é:
663
+
664
+ \`\`\`bash
665
+ pnpm validate:framework-lock
666
+ pnpm validate:skills
667
+ pnpm test:encoding
668
+ pnpm validate:source-size
669
+ pnpm lint
670
+ pnpm typecheck
671
+ pnpm test
672
+ pnpm build
673
+ \`\`\`
674
+
675
+ Antes de integrar uma mudança relevante ou preparar um release, \`pnpm verify\` executa a pipeline completa do repositório, incluindo gates adicionais de ferramentas, contratos, geração, workspace, paridade de runtime e testes de release. Essa pipeline apenas valida o lock; se um arquivo gerenciado tiver sido alterado intencionalmente, o sync deve acontecer antes.
676
+
677
+ A arquitetura detalhada está em [ZAIP-AIOS_DOCUMENTACAO_ARQUITETURA.md](plan-create-zaip-aios/ZAIP-AIOS_DOCUMENTACAO_ARQUITETURA.md).
678
+
679
+ ## Segurança com perfil personalizado
680
+
681
+ O ZAIP-AIOS gera \`.codex/config.toml\` com os perfis \`zaip-aios-security\` e
682
+ \`zaip-aios-full-access\`. No Windows, o perfil restrito declara escrita na raiz física absoluta
683
+ do repositório, inclusive \`.git\`, \`.agents\` e \`.codex\`, permite a identidade SSH usada pelo
684
+ repositório e limita a rede de comandos a \`github.com\`. O perfil usa \`approval_policy = "never"\`;
685
+ a autorização explícita para deploy continua sendo aplicada pelas instruções, Rules, hooks e
686
+ skills. Ele não usa \`:workspace\` ou \`:workspace_roots\`, evitando ampliar os workspace roots.
687
+ Regras, instruções e gates
688
+ adicionam camadas que bloqueiam ações perigosas sem pedir confirmação:
689
+
690
+ - carregamento da política somente em repositório confiável;
691
+ - boundary nativa de filesystem baseada nos workspace roots;
692
+ - rede de comandos limitada a \`github.com\` no perfil restrito;
693
+ - negação de Git destrutivo, force push, mutação de OS, ACL, persistência, elevação e banco destrutivo;
694
+ - regras Codex \`forbidden\`, instruções e skills como defesa em profundidade, sem prompts;
695
+ - deploy GitHub delimitado por comandos, preflight, identidade SSH escopada e pedido explícito;
696
+ - apps, MCPs e ferramentas externas read-only ou desabilitados por padrão;
697
+ - Tasks, Changes, Executions, Runs, write scopes, threat model, rollback, testes negativos e review independente;
698
+ - adapters gerados com hash, framework lock e gates de regressão.
699
+
700
+ O hook de segurança \`PreToolUse\` e os hooks de lifecycle de subagentes permanecem ativos
701
+ como defesa em profundidade e para atribuição/telemetria.
702
+
703
+ Essas camadas reduzem o risco, mas não equivalem a um sandbox do sistema operacional.
704
+ Binários permitidos, plugins, apps, MCPs, Browser e Computer Use mantêm superfícies
705
+ próprias; para isolamento forte, use conta/VM dedicada ou controles externos de rede e
706
+ filesystem.
707
+
708
+ O modelo de ameaça, a matriz allow/deny, todas as camadas, limitações, operação segura,
709
+ rollout, rollback e comandos de verificação estão documentados no
710
+ [guia completo de segurança dos perfis ZAIP-AIOS](.agents/zaip-aios/guides/10-seguranca.md).
711
+ `,Fa=`# ZAIP-AIOS
712
+
713
+ ZAIP-AIOS is a Git-native operating system for autonomous software engineering with Codex. It turns a request into structured, traceable work by defining requirements, preparing a plan, coordinating execution, running tests and reviews, and only considering a result complete when verifiable evidence exists.
714
+
715
+ ## From conversation to executable work
716
+
717
+ Work can start with a **Task**, a **PRD** (Product Requirements Document), or a **SPEC**. A PRD describes the problem, expected outcome, product context, and acceptance criteria. A SPEC turns that intent into a technical scope, solution, acceptance criteria, Changes, and a DAG of executable Tasks.
718
+
719
+ ZAIP-AIOS does not require a VPS, a competing runtime, or mandatory API model routing. Codex remains the execution host while ZAIP-AIOS adds method, operational memory, governance, traceability, and observability to the repository.
720
+
721
+ ## Six-stage method
722
+
723
+ 1. **Definition** — capture PRDs, Requirements, and acceptance criteria.
724
+ 2. **Planning** — prepare SPECs, Changes, dependencies, and rollback.
725
+ 3. **Ready to execute** — confirm that scoped work is actionable.
726
+ 4. **Execution** — implement Tasks and record Runs.
727
+ 5. **Verification** — run tests, review the diff, and collect evidence.
728
+ 6. **Completion** — close the lifecycle only after acceptance is satisfied.
729
+
730
+ Small, independent frontend changes may use a task-first lite flow and begin directly in execution without definition or planning evidence.
731
+
732
+ ## Operational dashboard
733
+
734
+ The dashboard provides three complementary views:
735
+
736
+ - **Operations** follows PRDs, SPECs, Tasks, Changes, Executions, Runs, and conversations.
737
+ - **Cost Monitor** aggregates time, tokens, models, providers, and estimated cost.
738
+ - **Traceability** connects each delivered result to its requirements, changes, runs, tests, and evidence.
739
+
740
+ ## Engineering principles
741
+
742
+ - Start from an observable outcome and explicit acceptance criteria.
743
+ - Keep domain logic independent from infrastructure and vendors.
744
+ - Prefer small, reversible, traceable changes.
745
+ - Load only the context required for the active work.
746
+ - Preserve unrelated changes in a dirty worktree.
747
+ - Treat tests, evidence, observability, and rollback as part of delivery.
748
+ - Never infer external authorization from technical capability.
749
+
750
+ ## Installation and development
751
+
752
+ Use the repository setup command documented for the current release, then run the doctor and integrity checks. The framework source lives in this repository; generated public and consumer artifacts are validated for release parity.
753
+
754
+ The main local quality gates cover type checking, focused tests, architecture boundaries, generated text, framework integrity, and release parity. Use focused checks while implementing and the applicable final gates before completion.
755
+
756
+ ## Repository structure
757
+
758
+ - \`.agents/config/\` — project-owned configuration.
759
+ - \`.agents/rules/\` — operational and architectural rules.
760
+ - \`.agents/requirements/\` — durable Requirements and acceptance criteria.
761
+ - \`.agents/skills/\` — reusable workflows.
762
+ - \`.agents/records/\` — lifecycle records addressed by explicit ID.
763
+ - \`.agents/projections/runtime/\` — indexes and current-state summaries.
764
+ - \`.agents/dashboard/\` — dashboard applications and modules.
765
+ - \`.zaip-aios/\` — distributable runtime and CLI.
766
+
767
+ Read runtime projections for discovery. Open lifecycle records only when you already have their ID.`,Ia={"01-primeiros-passos.md":`# Getting started
768
+
769
+ 1. Read \`.agents/config/project.yaml\` and \`.agents/rules/zaip/core.md\`.
770
+ 2. Consult \`.agents/projections/runtime/\` to discover the current state.
771
+ 3. Classify the work as a Task, SPEC, or PRD.
772
+ 4. Load only the applicable Rules, Requirements, and skills.
773
+ 5. Define verifiable acceptance before editing.
774
+ 6. Execute, test, and record evidence in the active lifecycle.
775
+
776
+ Do not scan \`.agents/records/\`; open a record only when you have its ID.`,"02-requirements.md":`# Requirements
777
+
778
+ Use a Requirement for a durable, testable obligation.
779
+
780
+ 1. Describe the outcome and boundary, not the preferred implementation.
781
+ 2. Create observable acceptance criteria.
782
+ 3. Record risks, dependencies, and negative cases.
783
+ 4. Connect every criterion to a test or evidence.
784
+ 5. Version changes without erasing the previous intent.
785
+ 6. Promote only after consistency and traceability are validated.
786
+
787
+ A good criterion answers unambiguously: did it pass or fail?`,"03-tasks.md":`# Tasks
788
+
789
+ Use a Task for a small, independent delivery with a clear result.
790
+
791
+ 1. State the objective, scope, and out-of-scope items.
792
+ 2. Link applicable Requirements.
793
+ 3. List likely files or components without freezing the solution.
794
+ 4. Define checks proportional to risk.
795
+ 5. Execute in the associated Run and attach evidence.
796
+ 6. Close only when acceptance is satisfied or a blocker is proven.`,"04-specs.md":`# SPECs
797
+
798
+ Use a SPEC when delivery requires multiple Tasks or dependency ordering.
799
+
800
+ 1. Turn the desired result into verifiable capabilities.
801
+ 2. Resolve the project stack from \`stack.profile\` and \`stack.overrides\`.
802
+ 3. Record the stack profile, overrides, concise description, exact versions, and workspace-verifiable sources.
803
+ 4. Split delivery into small Tasks with their own acceptance.
804
+ 5. Model dependencies as a DAG and avoid artificial sequences.
805
+ 6. Identify critical paths, risks, and rollback.
806
+ 7. Map every Requirement to Tasks and evidence.
807
+ 8. Validate the SPEC before execution and block missing or inconsistent stack data.
808
+
809
+ A SPEC plans delivery; it does not authorize external changes by itself.`,"05-prds.md":`# PRDs
810
+
811
+ Use a PRD for a product initiative with multiple capabilities or SPECs.
812
+
813
+ 1. Record the problem, audience, outcome, and metrics.
814
+ 2. Define scope, constraints, and non-goals.
815
+ 3. Keep the PRD independent of language, framework, database, infrastructure, and vendor.
816
+ 4. Specify functional and non-functional requirements.
817
+ 5. Convert capabilities into independent SPECs where the technical stack is resolved.
818
+ 6. Cover risks, rollout, observability, and rollback.
819
+ 7. Build the DAG and confirm that every acceptance criterion has planned evidence.`,"06-execucao.md":`# Execution
820
+
821
+ 1. Confirm the lifecycle ID and governing acceptance criteria.
822
+ 2. Inspect the diff and preserve unrelated changes.
823
+ 3. Implement the smallest coherent increment.
824
+ 4. Run focused checks after each increment.
825
+ 5. Record consequential decisions, evidence, and deviations.
826
+ 6. Run final gates and document rollback.
827
+
828
+ Do not mark work complete because effort was spent; complete it because the outcome is verifiable.`,"07-revisao-e-validacao.md":`# Review and validation
829
+
830
+ 1. Review Requirements and acceptance criteria.
831
+ 2. Examine the diff, architecture boundaries, and error paths.
832
+ 3. Run focused tests, then all applicable gates.
833
+ 4. Verify security, compatibility, documentation, and rollback.
834
+ 5. Rank findings by impact and cite concrete evidence.
835
+ 6. Record the result without changing the implementation during a read-only review.`,"08-contexto-e-tokens.md":`# Context and tokens
836
+
837
+ 1. Start with \`project.yaml\`, \`core.md\`, and runtime projections.
838
+ 2. Load only the triggered Rule, Requirement, or skill.
839
+ 3. Prefer indexes, summaries, and targeted search over full files.
840
+ 4. Open records only by a known lifecycle ID.
841
+ 5. Summarize stable facts and preserve literal text only when normative.
842
+ 6. Remove superseded results and non-actionable detail from context.
843
+
844
+ For tools, read \`catalog.yaml\`, choose an ID, and open only its manifest.`,"09-agentes-e-squads.md":`# Agents and squads
845
+
846
+ 1. Delegate only concrete, independent subtasks.
847
+ 2. Give each agent an objective, boundaries, inputs, and output format.
848
+ 3. Avoid two agents editing the same files.
849
+ 4. Centralize architecture decisions and integration in the responsible agent.
850
+ 5. Require evidence, not only completion claims.
851
+ 6. Use parallelism only when it shortens the critical path without increasing conflict.`,"10-seguranca.md":`# Security with danger-full-access
852
+
853
+ The security profile treats unrestricted filesystem access as a technical capability, never as blanket authorization. User intent, repository scope, lifecycle write scopes, and explicit approval remain the governing boundaries.
854
+
855
+ ## Trust model
856
+
857
+ The user controls global opt-in and trusted projects. Repository instructions may narrow authority but cannot silently expand it. Missing or ambiguous authorization fails closed for destructive, external, credential-related, or irreversible operations.
858
+
859
+ ## Security layers
860
+
861
+ 1. **Global opt-in and trusted project** — unrestricted execution is enabled only by explicit user configuration in a trusted workspace.
862
+ 2. **No-prompt is not authorization** — suppressing approval prompts does not grant new scope.
863
+ 3. **Fail-closed hooks** — pre-tool controls reject operations that cannot be classified safely.
864
+ 4. **Filesystem boundary** — writes remain inside authorized workspace roots and lifecycle scopes.
865
+ 5. **Secrets protection** — credentials, tokens, environment files, and private keys are not exposed or committed.
866
+ 6. **Inline execution controls** — evasive shell composition and hidden payload execution are blocked.
867
+ 7. **Allowlisted egress** — external access is limited to required, trusted destinations.
868
+ 8. **Destructive operations** — recursive deletion, destructive Git commands, and irreversible mutations require explicit authority.
869
+ 9. **Codex forbidden rules** — known dangerous command patterns are denied before execution.
870
+ 10. **Bounded GitHub deployment** — setup never implies push, and deployment is limited to the requested repository and branch.
871
+ 11. **Apps, MCPs, and external tools** — integrations follow least privilege, read-only defaults, and explicit activation.
872
+ 12. **Lifecycle and traceability** — Tasks, Changes, Executions, Runs, write scopes, tests, and evidence make mutations auditable.
873
+ 13. **Autonomous runtime opt-in** — autonomous execution requires explicit project configuration and isolated worktrees.
874
+ 14. **Integrity and regression tests** — managed files, adapters, configuration, and security rules are validated continuously.
875
+
876
+ ## Residual limits
877
+
878
+ No policy can eliminate risk from compromised dependencies, trusted binaries, operating-system vulnerabilities, or a user intentionally authorizing a dangerous operation. Least privilege, backups, reviewable diffs, isolated credentials, and reversible rollout remain necessary.
879
+
880
+ ## Safe operation
881
+
882
+ - Inspect the target and resolved path before recursive file operations.
883
+ - Keep credentials outside tracked files.
884
+ - Prefer focused, reversible commands.
885
+ - Review diffs before commit or deployment.
886
+ - Run doctor, integrity, and security checks after configuration changes.
887
+ - Stop when required authority or a safe rollback path is missing.
888
+
889
+ ## Rollout and rollback
890
+
891
+ Roll out security changes in stages, validate on representative repositories, and preserve the previous known-good configuration. Rollback means restoring the prior managed policy, rebuilding adapters, rerunning integrity checks, and confirming that the workspace remains within its intended trust boundary.`,"11-observabilidade-e-custos.md":`# Observability and costs
892
+
893
+ 1. Select the Run by ID.
894
+ 2. Check duration, tokens, cost, retries, and rework.
895
+ 3. Compare planned acceptance with produced evidence.
896
+ 4. Identify slow gates, excessive context, and repeated calls.
897
+ 5. Aggregate trends without exposing sensitive prompts or secrets.
898
+ 6. Turn recurring findings into a Rule, Requirement, or skill improvement.`,"12-instalacao-e-upgrade.md":`# Installation and upgrade
899
+
900
+ 1. Check the current version and whether local changes are clean or intentionally preserved.
901
+ 2. Run doctor and integrity checks before changing anything.
902
+ 3. Run a dry-run of installation, migration, or upgrade.
903
+ 4. Review managed, public, and preserved files.
904
+ 5. Apply the change, validate adapters, and run gates.
905
+ 6. Test rollback and confirm the final version.
906
+
907
+ \`framework.lock.yaml\` is relevant to this flow; do not load it during ordinary work.`,"13-boas-praticas.md":`# Best practices
908
+
909
+ - Start from the outcome and acceptance criteria, not the tool.
910
+ - Keep the domain independent from infrastructure.
911
+ - Make changes small, reversible, and traceable.
912
+ - Validate early with deterministic, focused tests.
913
+ - Prefer explicit configuration over hidden conventions.
914
+ - Load context on demand and preserve the token budget.
915
+ - Treat documentation, observability, and rollback as part of delivery.`,"14-troubleshooting.md":`# Troubleshooting
916
+
917
+ 1. Reproduce the problem with the smallest possible command.
918
+ 2. Read the complete message and identify the first causal error.
919
+ 3. Run doctor, focused validators, and \`git diff --check\`.
920
+ 4. Check versions, paths, encoding, variables, and managed files.
921
+ 5. Compare against runtime projections without scanning records.
922
+ 6. Fix the cause, repeat the reproduction, and then run the full applicable gates.
923
+
924
+ For installation or integrity problems, consult \`framework.lock.yaml\`.`,"15-tools-e-codex.md":`# Tools and Codex setup
925
+
926
+ 1. Ask the agent to list or activate a tool; it uses the tool-setup skill.
927
+ 2. The skill reads only the applicable catalog and manifest.
928
+ 3. A trusted MCP is registered disabled and validated before activation.
929
+ 4. An API without a trusted MCP uses the API-to-MCP workflow to generate a secure adapter.
930
+ 5. Secrets are never pasted into chat; names belong in \`.agents/.env.example\` and values in ignored local storage.
931
+ 6. Configuration changes must be reversible and preserve existing preferences.
932
+
933
+ Enable public, read-only, unauthenticated integrations by default, such as official documentation. Browser automation must be an explicit development-profile choice because it starts processes and expands the operational surface.
934
+
935
+ ## Local MCP generated from an API
936
+
937
+ Model an \`adapter.yaml\` from official documentation, scaffold the local MCP, run its doctor, test read-only calls, generate a Codex preview, and apply only after review. The generated server uses STDIO, does not open a port, and blocks writes without explicit approval.
938
+
939
+ ## OpenAI documentation
940
+
941
+ The default profile enables official OpenAI developer documentation without credentials and in read-only mode. Questions about OpenAI APIs, models, SDKs, Codex, or MCP should use the OpenAI docs skill and cite the consulted page.`};function La(e,t,n){let r=Object.entries(n).map(([t,n])=>{let r=t.split(`/`).at(-1)??t,i=e===`en-US`?Ia[r]??n:n;return{id:t,title:Ra(i,r),content:i}}).sort((t,n)=>t.title.localeCompare(n.title,e));return[{id:`readme`,title:`README · ZAIP-AIOS`,content:e===`en-US`?Fa:t},...r]}function Ra(e,t){return e.match(/^#\s+(.+)$/m)?.[1]?.trim()??t.replace(/\.md$/i,``)}var za={"pt-BR":{eyebrow:`CONFIGURAÇÃO DO PROJETO`,title:`Preços e cotação`,description:`Valores em USD por 1 milhão de tokens. Ao salvar, o dashboard recalcula todos os valores com o catálogo vigente.`,back:`Voltar ao dashboard`,fxTitle:`Cotação utilizada no dashboard`,fxDescription:`Ao salvar, todos os valores em BRL são recalculados. Os valores em USD e a telemetria de tokens permanecem inalterados.`,fxLabel:`Cotação USD/BRL`,fxAriaLabel:`Cotação USD BRL`,catalog:`Catálogo de modelos`,pricesPerMillion:`Preços em USD por 1 milhão de tokens`,models:`modelos`,model:`Modelo`,provider:`Provider`,input:`Entrada (USD/1M)`,cache:`Cache (USD/1M)`,output:`Saída (USD/1M)`,reasoning:`Raciocínio (USD/1M)`,priorityInput:`Priority entrada (USD/1M)`,priorityCache:`Priority cache (USD/1M)`,priorityOutput:`Priority saída (USD/1M)`,priorityReasoning:`Priority raciocínio (USD/1M)`,contextLimit:`Limite contexto`,inputMultiplier:`Mult. entrada`,outputMultiplier:`Mult. saída`,noAliases:`sem aliases`,removeModel:`Remover modelo`,addModel:`Adicionar modelo`,cancel:`Cancelar`,saving:`Salvando…`,save:`Salvar e recalcular`,newModel:`novo-modelo`,manualOverride:`Substituição manual pelo dashboard`,editedNote:`Editado no dashboard`},"en-US":{eyebrow:`PROJECT SETTINGS`,title:`Pricing and exchange rate`,description:`Prices in USD per 1 million tokens. When saved, the dashboard recalculates all values using the current catalog.`,back:`Back to dashboard`,fxTitle:`Exchange rate used by the dashboard`,fxDescription:`When saved, all BRL values are recalculated. USD values and token telemetry remain unchanged.`,fxLabel:`USD/BRL exchange rate`,fxAriaLabel:`USD BRL exchange rate`,catalog:`Model catalog`,pricesPerMillion:`Prices in USD per 1 million tokens`,models:`models`,model:`Model`,provider:`Provider`,input:`Input (USD/1M)`,cache:`Cache (USD/1M)`,output:`Output (USD/1M)`,reasoning:`Reasoning (USD/1M)`,priorityInput:`Priority input (USD/1M)`,priorityCache:`Priority cache (USD/1M)`,priorityOutput:`Priority output (USD/1M)`,priorityReasoning:`Priority reasoning (USD/1M)`,contextLimit:`Context limit`,inputMultiplier:`Input multiplier`,outputMultiplier:`Output multiplier`,noAliases:`no aliases`,removeModel:`Remove model`,addModel:`Add model`,cancel:`Cancel`,saving:`Saving…`,save:`Save and recalculate`,newModel:`new-model`,manualOverride:`Dashboard manual override`,editedNote:`Edited in dashboard`}},Ba=Object.assign({"../../../../zaip-aios/guides/01-primeiros-passos.md":va,"../../../../zaip-aios/guides/02-requirements.md":ya,"../../../../zaip-aios/guides/03-tasks.md":ba,"../../../../zaip-aios/guides/04-specs.md":xa,"../../../../zaip-aios/guides/05-prds.md":Sa,"../../../../zaip-aios/guides/06-execucao.md":Ca,"../../../../zaip-aios/guides/07-revisao-e-validacao.md":wa,"../../../../zaip-aios/guides/08-contexto-e-tokens.md":Ta,"../../../../zaip-aios/guides/09-agentes-e-squads.md":Ea,"../../../../zaip-aios/guides/10-seguranca.md":Da,"../../../../zaip-aios/guides/11-observabilidade-e-custos.md":Oa,"../../../../zaip-aios/guides/12-instalacao-e-upgrade.md":ka,"../../../../zaip-aios/guides/13-boas-praticas.md":Aa,"../../../../zaip-aios/guides/14-troubleshooting.md":ja,"../../../../zaip-aios/guides/15-tools-e-codex.md":Ma,"../../../../zaip-aios/guides/16-lifecycle-e-reconciliacao.md":Na});function Va({locale:e,onClose:t}){let n=(0,l.useMemo)(()=>La(e,Pa,Ba),[e]),r=n.filter(e=>e.id!==`readme`),[i,a]=(0,l.useState)(`readme`),[o,s]=(0,l.useState)(`rendered`),c=n.find(e=>e.id===i)??n[0];return(0,f.jsx)(`div`,{className:`dashboard-help-backdrop`,children:(0,f.jsxs)(`section`,{"aria-label":e===`pt-BR`?`Ajuda do ZAIP-AIOS`:`ZAIP-AIOS help`,"aria-modal":`true`,className:`dashboard-help`,role:`dialog`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:e===`pt-BR`?`Documentação local`:`Local documentation`}),(0,f.jsx)(`h2`,{children:e===`pt-BR`?`Ajuda e guides do framework`:`Framework help and guides`})]}),(0,f.jsx)(`button`,{"aria-label":e===`pt-BR`?`Fechar ajuda`:`Close help`,onClick:t,type:`button`,children:`×`})]}),(0,f.jsxs)(`div`,{className:`dashboard-help-layout`,children:[(0,f.jsxs)(`nav`,{"aria-label":e===`pt-BR`?`Documentos de ajuda`:`Help documents`,children:[(0,f.jsx)(`strong`,{children:e===`pt-BR`?`Visão geral`:`Overview`}),(0,f.jsx)(`button`,{className:i===`readme`?`is-active`:void 0,onClick:()=>a(`readme`),type:`button`,children:`README · ZAIP-AIOS`}),(0,f.jsx)(`strong`,{children:e===`pt-BR`?`Aprofundar no framework`:`Framework guides`}),r.map(e=>(0,f.jsx)(`button`,{className:i===e.id?`is-active`:void 0,onClick:()=>a(e.id),type:`button`,children:e.title},e.id))]}),(0,f.jsxs)(`article`,{children:[(0,f.jsxs)(`div`,{className:`dashboard-help-document-header`,children:[(0,f.jsx)(`h3`,{children:c?.title}),(0,f.jsxs)(`fieldset`,{"aria-label":e===`pt-BR`?`Visualização do documento`:`Document view`,children:[(0,f.jsx)(`button`,{"aria-pressed":o===`rendered`,className:o===`rendered`?`is-active`:void 0,onClick:()=>s(`rendered`),type:`button`,children:e===`pt-BR`?`Renderizado`:`Rendered`}),(0,f.jsx)(`button`,{"aria-pressed":o===`source`,className:o===`source`?`is-active`:void 0,onClick:()=>s(`source`),type:`button`,children:`Markdown`})]})]}),(0,f.jsx)(`div`,{className:`dashboard-help-sections`,children:Ya(c?.content??``,e).map(e=>(0,f.jsxs)(`section`,{children:[(0,f.jsx)(`h4`,{children:e.title}),o===`rendered`?(0,f.jsx)(Ha,{content:e.content}):(0,f.jsx)(`pre`,{children:e.content})]},e.title))})]})]})]})})}function Ha({content:e}){return Ja(Ua(e),qa).map(({key:e,value:t})=>t.kind===`table`?(0,f.jsx)(`div`,{className:`dashboard-help-table-scroll`,children:(0,f.jsxs)(`table`,{children:[(0,f.jsx)(`thead`,{children:(0,f.jsx)(`tr`,{children:Ja(t.headers,e=>e).map(({key:e,value:t})=>(0,f.jsx)(`th`,{children:Ka(t)},e))})}),(0,f.jsx)(`tbody`,{children:Ja(t.rows,e=>e.join(``)).map(({key:e,value:t})=>(0,f.jsx)(`tr`,{children:Ja(t,e=>e).map(({key:e,value:t})=>(0,f.jsx)(`td`,{children:Ka(t)},e))},e))})]})},e):(0,f.jsx)(`pre`,{children:t.content},e))}function Ua(e){let t=e.split(`
942
+ `),n=[],r=[],i=()=>{let e=r.join(`
943
+ `).trim();e&&n.push({kind:`text`,content:e}),r=[]};for(let e=0;e<t.length;e+=1){let a=t[e],o=t[e+1];if(a?.includes(`|`)&&o&&Wa(o)){i();let r=Ga(a),o=[];for(e+=2;e<t.length&&t[e]?.includes(`|`);)o.push(Ga(t[e]??``)),e+=1;--e,n.push({kind:`table`,headers:r,rows:o});continue}r.push(a??``)}return i(),n}function Wa(e){return Ga(e).every(e=>/^:?-{3,}:?$/.test(e.replace(/\s/g,``)))}function Ga(e){return e.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim())}function Ka(e){return Ja(e.split(/(\*\*[^*]+\*\*)/g),e=>e).map(({key:e,value:t})=>t.startsWith(`**`)&&t.endsWith(`**`)?(0,f.jsx)(`strong`,{children:t.slice(2,-2)},e):(0,f.jsx)(l.Fragment,{children:t},e))}function qa(e){return e.kind===`text`?`text:${e.content}`:`table:${e.headers.join(``)}:${e.rows.map(e=>e.join(``)).join(``)}`}function Ja(e,t){let n=new Map;return e.map(e=>{let r=t(e),i=(n.get(r)??0)+1;return n.set(r,i),{key:`${r}#${i}`,value:e}})}function Ya(e,t){return e.split(/\n(?=##?\s)/).filter(Boolean).map((e,n)=>{let r=e.trim().split(`
944
+ `),i=r[0]?.match(/^#{1,2}\s+(.+)$/)?.[1];return{title:i??(n===0?t===`pt-BR`?`Introdução`:`Introduction`:t===`pt-BR`?`Seção ${n+1}`:`Section ${n+1}`),content:i?r.slice(1).join(`
945
+ `).trim():r.join(`
946
+ `).trim()}})}var Xa;function H(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Za=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Qa=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Xa=globalThis).__zod_globalConfig??(Xa.__zod_globalConfig={});var $a=globalThis.__zod_globalConfig;function eo(e){return e&&Object.assign($a,e),$a}function to(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function no(e,t){return typeof t==`bigint`?t.toString():t}function ro(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function io(e){return e==null}function ao(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var oo=Symbol(`evaluating`);function U(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==oo)return r===void 0&&(r=oo,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function so(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function co(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function W(e){return JSON.stringify(e)}function G(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var lo=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function uo(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var fo=ro(()=>{if($a.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function po(e){if(uo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(uo(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function mo(e){return po(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ho=new Set([`string`,`number`,`symbol`]);function go(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function _o(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function K(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function vo(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function yo(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return _o(e,co(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return so(this,`shape`,e),e},checks:[]}))}function bo(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return _o(e,co(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return so(this,`shape`,r),r},checks:[]}))}function xo(e,t){if(!po(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return _o(e,co(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return so(this,`shape`,n),n}}))}function So(e,t){if(!po(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return _o(e,co(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return so(this,`shape`,n),n}}))}function Co(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return _o(e,co(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return so(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function wo(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return _o(t,co(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return so(this,`shape`,i),i},checks:[]}))}function To(e,t,n){return _o(t,co(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return so(this,`shape`,i),i}}))}function Eo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Do(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Oo(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ko(e){return typeof e==`string`?e:e?.message}function Ao(e,t,n){let r=e.message?e.message:ko(e.inst?._zod.def?.error?.(e))??ko(t?.error?.(e))??ko(n.customError?.(e))??ko(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function jo(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Mo(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var No=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,no,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Po=H(`$ZodError`,No),Fo=H(`$ZodError`,No,{Parent:Error});function Io(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Lo(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Ro=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Za;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Ao(e,a,eo())));throw lo(t,i?.callee),t}return o.value},zo=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Ao(e,a,eo())));throw lo(t,i?.callee),t}return o.value},Bo=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Za;return a.issues.length?{success:!1,error:new(e??Po)(a.issues.map(e=>Ao(e,i,eo())))}:{success:!0,data:a.value}},Vo=Bo(Fo),Ho=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Ao(e,i,eo())))}:{success:!0,data:a.value}},Uo=Ho(Fo),Wo=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ro(e)(t,n,i)},Go=e=>(t,n,r)=>Ro(e)(t,n,r),Ko=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return zo(e)(t,n,i)},qo=e=>async(t,n,r)=>zo(e)(t,n,r),Jo=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Bo(e)(t,n,i)},Yo=e=>(t,n,r)=>Bo(e)(t,n,r),Xo=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ho(e)(t,n,i)},Zo=e=>async(t,n,r)=>Ho(e)(t,n,r),Qo=/^[cC][0-9a-z]{6,}$/,$o=/^[0-9a-z]+$/,es=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ts=/^[0-9a-vA-V]{20}$/,ns=/^[A-Za-z0-9]{27}$/,rs=/^[a-zA-Z0-9_-]{21}$/,is=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,as=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,os=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ss=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cs=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function ls(){return new RegExp(cs,`u`)}var us=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ds=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,fs=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ps=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ms=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hs=/^[A-Za-z0-9_-]*$/,gs=/^https?$/,_s=/^\+[1-9]\d{6,14}$/,vs=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,ys=RegExp(`^${vs}$`);function bs(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function xs(e){return RegExp(`^${bs(e)}$`)}function Ss(e){let t=bs({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${vs}T(?:${r})$`)}var Cs=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ws=/^[^A-Z]*$/,Ts=/^[^a-z]*$/,Es=H(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ds=H(`$ZodCheckMaxLength`,(e,t)=>{var n;Es.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!io(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=jo(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Os=H(`$ZodCheckMinLength`,(e,t)=>{var n;Es.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!io(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=jo(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ks=H(`$ZodCheckLengthEquals`,(e,t)=>{var n;Es.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!io(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=jo(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),As=H(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Es.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),js=H(`$ZodCheckRegex`,(e,t)=>{As.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ms=H(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ws,As.init(e,t)}),Ns=H(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Ts,As.init(e,t)}),Ps=H(`$ZodCheckIncludes`,(e,t)=>{Es.init(e,t);let n=go(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Fs=H(`$ZodCheckStartsWith`,(e,t)=>{Es.init(e,t);let n=RegExp(`^${go(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Is=H(`$ZodCheckEndsWith`,(e,t)=>{Es.init(e,t);let n=RegExp(`.*${go(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ls=H(`$ZodCheckOverwrite`,(e,t)=>{Es.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Rs=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
947
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
948
+ `))}},zs={major:4,minor:4,patch:3},Bs=H(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=zs;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Eo(e),i;for(let a of t){if(a._zod.def.when){if(Do(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Za;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Eo(e,t))});else{if(e.issues.length===t)continue;r||=Eo(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Eo(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Za;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Za;return o.then(e=>t(e,r,a))}return t(o,r,a)}}U(e,`~standard`,()=>({validate:t=>{try{let n=Vo(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Uo(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Vs=H(`$ZodString`,(e,t)=>{Bs.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Cs(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Hs=H(`$ZodStringFormat`,(e,t)=>{As.init(e,t),Vs.init(e,t)}),Us=H(`$ZodGUID`,(e,t)=>{t.pattern??=as,Hs.init(e,t)}),Ws=H(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=os(e)}else t.pattern??=os();Hs.init(e,t)}),Gs=H(`$ZodEmail`,(e,t)=>{t.pattern??=ss,Hs.init(e,t)}),Ks=H(`$ZodURL`,(e,t)=>{Hs.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===gs.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),qs=H(`$ZodEmoji`,(e,t)=>{t.pattern??=ls(),Hs.init(e,t)}),Js=H(`$ZodNanoID`,(e,t)=>{t.pattern??=rs,Hs.init(e,t)}),Ys=H(`$ZodCUID`,(e,t)=>{t.pattern??=Qo,Hs.init(e,t)}),Xs=H(`$ZodCUID2`,(e,t)=>{t.pattern??=$o,Hs.init(e,t)}),Zs=H(`$ZodULID`,(e,t)=>{t.pattern??=es,Hs.init(e,t)}),Qs=H(`$ZodXID`,(e,t)=>{t.pattern??=ts,Hs.init(e,t)}),$s=H(`$ZodKSUID`,(e,t)=>{t.pattern??=ns,Hs.init(e,t)}),ec=H(`$ZodISODateTime`,(e,t)=>{t.pattern??=Ss(t),Hs.init(e,t)}),tc=H(`$ZodISODate`,(e,t)=>{t.pattern??=ys,Hs.init(e,t)}),nc=H(`$ZodISOTime`,(e,t)=>{t.pattern??=xs(t),Hs.init(e,t)}),rc=H(`$ZodISODuration`,(e,t)=>{t.pattern??=is,Hs.init(e,t)}),ic=H(`$ZodIPv4`,(e,t)=>{t.pattern??=us,Hs.init(e,t),e._zod.bag.format=`ipv4`}),ac=H(`$ZodIPv6`,(e,t)=>{t.pattern??=ds,Hs.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),oc=H(`$ZodCIDRv4`,(e,t)=>{t.pattern??=fs,Hs.init(e,t)}),sc=H(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ps,Hs.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function cc(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var lc=H(`$ZodBase64`,(e,t)=>{t.pattern??=ms,Hs.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{cc(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function uc(e){if(!hs.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return cc(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var dc=H(`$ZodBase64URL`,(e,t)=>{t.pattern??=hs,Hs.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{uc(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),fc=H(`$ZodE164`,(e,t)=>{t.pattern??=_s,Hs.init(e,t)});function pc(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var mc=H(`$ZodJWT`,(e,t)=>{Hs.init(e,t),e._zod.check=n=>{pc(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),hc=H(`$ZodUnknown`,(e,t)=>{Bs.init(e,t),e._zod.parse=e=>e}),gc=H(`$ZodNever`,(e,t)=>{Bs.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function _c(e,t,n){e.issues.length&&t.issues.push(...Oo(n,e.issues)),t.value[n]=e.value}var vc=H(`$ZodArray`,(e,t)=>{Bs.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>_c(t,n,e))):_c(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function yc(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Oo(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function bc(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=vo(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function xc(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>yc(e,n,i,t,u,d))):yc(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Sc=H(`$ZodObject`,(e,t)=>{if(Bs.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=ro(()=>bc(t));U(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=uo,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>yc(n,t,e,s,r,i))):yc(a,t,e,s,r,i)}return i?xc(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Cc=H(`$ZodObjectJIT`,(e,t)=>{Sc.init(e,t);let n=e._zod.parse,r=ro(()=>bc(t)),i=e=>{let t=new Rs([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=W(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=W(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
949
+ if (${n}.issues.length) {
950
+ if (${o} in input) {
951
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
952
+ ...iss,
953
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
954
+ })));
955
+ }
956
+ }
957
+
958
+ if (${n}.value === undefined) {
959
+ if (${o} in input) {
960
+ newResult[${o}] = undefined;
961
+ }
962
+ } else {
963
+ newResult[${o}] = ${n}.value;
964
+ }
965
+
966
+ `):c?t.write(`
967
+ if (${n}.issues.length) {
968
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
969
+ ...iss,
970
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
971
+ })));
972
+ }
973
+
974
+ if (${n}.value === undefined) {
975
+ if (${o} in input) {
976
+ newResult[${o}] = undefined;
977
+ }
978
+ } else {
979
+ newResult[${o}] = ${n}.value;
980
+ }
981
+
982
+ `):t.write(`
983
+ const ${n}_present = ${o} in input;
984
+ if (${n}.issues.length) {
985
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
986
+ ...iss,
987
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
988
+ })));
989
+ }
990
+ if (!${n}_present && !${n}.issues.length) {
991
+ payload.issues.push({
992
+ code: "invalid_type",
993
+ expected: "nonoptional",
994
+ input: undefined,
995
+ path: [${o}]
996
+ });
997
+ }
998
+
999
+ if (${n}_present) {
1000
+ if (${n}.value === undefined) {
1001
+ newResult[${o}] = undefined;
1002
+ } else {
1003
+ newResult[${o}] = ${n}.value;
1004
+ }
1005
+ }
1006
+
1007
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=uo,s=!$a.jitless,c=s&&fo.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?xc([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function wc(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Eo(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ao(e,r,eo())))}),t)}var Tc=H(`$ZodUnion`,(e,t)=>{Bs.init(e,t),U(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),U(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),U(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),U(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ao(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>wc(t,r,e,i)):wc(o,r,e,i)}}),Ec=H(`$ZodIntersection`,(e,t)=>{Bs.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Oc(e,t,n)):Oc(e,i,a)}});function Dc(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(po(e)&&po(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Dc(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Dc(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Oc(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Eo(e))return e;let o=Dc(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var kc=H(`$ZodEnum`,(e,t)=>{Bs.init(e,t);let n=to(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ho.has(typeof e)).map(e=>typeof e==`string`?go(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Ac=H(`$ZodTransform`,(e,t)=>{Bs.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Qa(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Za;return n.value=i,n.fallback=!0,n}});function jc(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Mc=H(`$ZodOptional`,(e,t)=>{Bs.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,U(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),U(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ao(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>jc(e,r)):jc(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Nc=H(`$ZodExactOptional`,(e,t)=>{Mc.init(e,t),U(e._zod,`values`,()=>t.innerType._zod.values),U(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Pc=H(`$ZodNullable`,(e,t)=>{Bs.init(e,t),U(e._zod,`optin`,()=>t.innerType._zod.optin),U(e._zod,`optout`,()=>t.innerType._zod.optout),U(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ao(e.source)}|null)$`):void 0}),U(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Fc=H(`$ZodDefault`,(e,t)=>{Bs.init(e,t),e._zod.optin=`optional`,U(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Ic(e,t)):Ic(r,t)}});function Ic(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Lc=H(`$ZodPrefault`,(e,t)=>{Bs.init(e,t),e._zod.optin=`optional`,U(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Rc=H(`$ZodNonOptional`,(e,t)=>{Bs.init(e,t),U(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>zc(t,e)):zc(i,e)}});function zc(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Bc=H(`$ZodCatch`,(e,t)=>{Bs.init(e,t),e._zod.optin=`optional`,U(e._zod,`optout`,()=>t.innerType._zod.optout),U(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ao(e,n,eo()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ao(e,n,eo()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Vc=H(`$ZodPipe`,(e,t)=>{Bs.init(e,t),U(e._zod,`values`,()=>t.in._zod.values),U(e._zod,`optin`,()=>t.in._zod.optin),U(e._zod,`optout`,()=>t.out._zod.optout),U(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Hc(e,t.in,n)):Hc(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Hc(e,t.out,n)):Hc(r,t.out,n)}});function Hc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Uc=H(`$ZodReadonly`,(e,t)=>{Bs.init(e,t),U(e._zod,`propValues`,()=>t.innerType._zod.propValues),U(e._zod,`values`,()=>t.innerType._zod.values),U(e._zod,`optin`,()=>t.innerType?._zod?.optin),U(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Wc):Wc(r)}});function Wc(e){return e.value=Object.freeze(e.value),e}var Gc=H(`$ZodCustom`,(e,t)=>{Es.init(e,t),Bs.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Kc(t,n,r,e));Kc(i,n,r,e)}});function Kc(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Mo(e))}}var qc,Jc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Yc(){return new Jc}(qc=globalThis).__zod_globalRegistry??(qc.__zod_globalRegistry=Yc());var Xc=globalThis.__zod_globalRegistry;function Zc(e,t){return new e({type:`string`,...K(t)})}function Qc(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...K(t)})}function $c(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...K(t)})}function el(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...K(t)})}function tl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...K(t)})}function nl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...K(t)})}function rl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...K(t)})}function il(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...K(t)})}function al(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...K(t)})}function ol(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...K(t)})}function sl(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...K(t)})}function cl(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...K(t)})}function ll(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...K(t)})}function ul(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...K(t)})}function dl(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...K(t)})}function fl(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...K(t)})}function pl(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...K(t)})}function ml(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...K(t)})}function hl(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...K(t)})}function gl(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...K(t)})}function _l(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...K(t)})}function vl(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...K(t)})}function yl(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...K(t)})}function bl(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...K(t)})}function xl(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...K(t)})}function Sl(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...K(t)})}function Cl(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...K(t)})}function wl(e){return new e({type:`unknown`})}function Tl(e,t){return new e({type:`never`,...K(t)})}function El(e,t){return new Ds({check:`max_length`,...K(t),maximum:e})}function Dl(e,t){return new Os({check:`min_length`,...K(t),minimum:e})}function Ol(e,t){return new ks({check:`length_equals`,...K(t),length:e})}function kl(e,t){return new js({check:`string_format`,format:`regex`,...K(t),pattern:e})}function Al(e){return new Ms({check:`string_format`,format:`lowercase`,...K(e)})}function jl(e){return new Ns({check:`string_format`,format:`uppercase`,...K(e)})}function Ml(e,t){return new Ps({check:`string_format`,format:`includes`,...K(t),includes:e})}function Nl(e,t){return new Fs({check:`string_format`,format:`starts_with`,...K(t),prefix:e})}function Pl(e,t){return new Is({check:`string_format`,format:`ends_with`,...K(t),suffix:e})}function Fl(e){return new Ls({check:`overwrite`,tx:e})}function Il(e){return Fl(t=>t.normalize(e))}function Ll(){return Fl(e=>e.trim())}function q(){return Fl(e=>e.toLowerCase())}function Rl(){return Fl(e=>e.toUpperCase())}function J(){return Fl(e=>G(e))}function Y(e,t,n){return new e({type:`array`,element:t,...K(n)})}function X(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...K(n)})}function zl(e,t){let n=Bl(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Mo(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Mo(r))}},e(t.value,t)),t);return n}function Bl(e,t){let n=new Es({check:`custom`,...K(t)});return n._zod.check=e,n}function Vl(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Xc,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Hl(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Hl(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&Gl(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ul(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
1008
+
1009
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Wl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ql(t,`input`,e.processors),output:ql(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Gl(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Gl(r.element,n);if(r.type===`set`)return Gl(r.valueType,n);if(r.type===`lazy`)return Gl(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return Gl(r.innerType,n);if(r.type===`intersection`)return Gl(r.left,n)||Gl(r.right,n);if(r.type===`record`||r.type===`map`)return Gl(r.keyType,n)||Gl(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Gl(r.in,n)||Gl(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Gl(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Gl(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Gl(e,n))return!0;return!!(r.rest&&Gl(r.rest,n))}return!1}var Kl=(e,t={})=>n=>{let r=Vl({...n,processors:t});return Hl(e,r),Ul(r,e),Wl(r,e)},ql=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Vl({...i??{},target:a,io:t,processors:n});return Hl(e,o),Ul(o,e),Wl(o,e)},Jl={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Yl=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Jl[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Xl=(e,t,n,r)=>{n.not={}},Zl=(e,t,n,r)=>{let i=e._zod.def,a=to(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ql=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},$l=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},eu=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Hl(a.element,t,{...r,path:[...r.path,`items`]})},tu=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Hl(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Hl(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},nu=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Hl(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ru=(e,t,n,r)=>{let i=e._zod.def,a=Hl(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Hl(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},iu=(e,t,n,r)=>{let i=e._zod.def,a=Hl(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},au=(e,t,n,r)=>{let i=e._zod.def;Hl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ou=(e,t,n,r)=>{let i=e._zod.def;Hl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},su=(e,t,n,r)=>{let i=e._zod.def;Hl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},cu=(e,t,n,r)=>{let i=e._zod.def;Hl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},lu=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Hl(o,t,r);let s=t.seen.get(e);s.ref=o},uu=(e,t,n,r)=>{let i=e._zod.def;Hl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},du=(e,t,n,r)=>{let i=e._zod.def;Hl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},fu=H(`ZodISODateTime`,(e,t)=>{ec.init(e,t),zu.init(e,t)});function pu(e){return bl(fu,e)}var mu=H(`ZodISODate`,(e,t)=>{tc.init(e,t),zu.init(e,t)});function hu(e){return xl(mu,e)}var gu=H(`ZodISOTime`,(e,t)=>{nc.init(e,t),zu.init(e,t)});function _u(e){return Sl(gu,e)}var vu=H(`ZodISODuration`,(e,t)=>{rc.init(e,t),zu.init(e,t)});function yu(e){return Cl(vu,e)}var bu=H(`ZodError`,(e,t)=>{Po.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Lo(e,t)},flatten:{value:t=>Io(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,no,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,no,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),xu=Ro(bu),Su=zo(bu),Cu=Bo(bu),wu=Ho(bu),Tu=Wo(bu),Eu=Go(bu),Du=Ko(bu),Ou=qo(bu),ku=Jo(bu),Au=Yo(bu),ju=Xo(bu),Mu=Zo(bu),Nu=new WeakMap;function Pu(e,t,n){let r=Object.getPrototypeOf(e),i=Nu.get(r);if(i||(i=new Set,Nu.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var Fu=H(`ZodType`,(e,t)=>(Bs.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ql(e,`input`),output:ql(e,`output`)}}),e.toJSONSchema=Kl(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>xu(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Cu(e,t,n),e.parseAsync=async(t,n)=>Su(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>wu(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Tu(e,t,n),e.decode=(t,n)=>Eu(e,t,n),e.encodeAsync=async(t,n)=>Du(e,t,n),e.decodeAsync=async(t,n)=>Ou(e,t,n),e.safeEncode=(t,n)=>ku(e,t,n),e.safeDecode=(t,n)=>Au(e,t,n),e.safeEncodeAsync=async(t,n)=>ju(e,t,n),e.safeDecodeAsync=async(t,n)=>Mu(e,t,n),Pu(e,`ZodType`,{check(...e){let t=this.def;return this.clone(co(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return _o(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ld(e,t))},superRefine(e,t){return this.check(Rd(e,t))},overwrite(e){return this.check(Fl(e))},optional(){return bd(this)},exactOptional(){return Sd(this)},nullable(){return wd(this)},nullish(){return bd(wd(this))},nonoptional(e){return Ad(this,e)},array(){return ld(this)},or(e){return pd([this,e])},and(e){return hd(this,e)},transform(e){return Nd(this,yd(e))},default(e){return Ed(this,e)},prefault(e){return Od(this,e)},catch(e){return Md(this,e)},pipe(e){return Nd(this,e)},readonly(){return Fd(this)},describe(e){let t=this.clone();return Xc.add(t,{description:e}),t},meta(...e){if(e.length===0)return Xc.get(this);let t=this.clone();return Xc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Xc.get(e)?.description},configurable:!0}),e)),Iu=H(`_ZodString`,(e,t)=>{Vs.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yl(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Pu(e,`_ZodString`,{regex(...e){return this.check(kl(...e))},includes(...e){return this.check(Ml(...e))},startsWith(...e){return this.check(Nl(...e))},endsWith(...e){return this.check(Pl(...e))},min(...e){return this.check(Dl(...e))},max(...e){return this.check(El(...e))},length(...e){return this.check(Ol(...e))},nonempty(...e){return this.check(Dl(1,...e))},lowercase(e){return this.check(Al(e))},uppercase(e){return this.check(jl(e))},trim(){return this.check(Ll())},normalize(...e){return this.check(Il(...e))},toLowerCase(){return this.check(q())},toUpperCase(){return this.check(Rl())},slugify(){return this.check(J())}})}),Lu=H(`ZodString`,(e,t)=>{Vs.init(e,t),Iu.init(e,t),e.email=t=>e.check(Qc(Bu,t)),e.url=t=>e.check(il(Uu,t)),e.jwt=t=>e.check(yl(rd,t)),e.emoji=t=>e.check(al(Wu,t)),e.guid=t=>e.check($c(Vu,t)),e.uuid=t=>e.check(el(Hu,t)),e.uuidv4=t=>e.check(tl(Hu,t)),e.uuidv6=t=>e.check(nl(Hu,t)),e.uuidv7=t=>e.check(rl(Hu,t)),e.nanoid=t=>e.check(ol(Z,t)),e.guid=t=>e.check($c(Vu,t)),e.cuid=t=>e.check(sl(Gu,t)),e.cuid2=t=>e.check(cl(Ku,t)),e.ulid=t=>e.check(ll(qu,t)),e.base64=t=>e.check(gl(ed,t)),e.base64url=t=>e.check(_l(td,t)),e.xid=t=>e.check(ul(Ju,t)),e.ksuid=t=>e.check(dl(Yu,t)),e.ipv4=t=>e.check(fl(Xu,t)),e.ipv6=t=>e.check(pl(Zu,t)),e.cidrv4=t=>e.check(ml(Qu,t)),e.cidrv6=t=>e.check(hl($u,t)),e.e164=t=>e.check(vl(nd,t)),e.datetime=t=>e.check(pu(t)),e.date=t=>e.check(hu(t)),e.time=t=>e.check(_u(t)),e.duration=t=>e.check(yu(t))});function Ru(e){return Zc(Lu,e)}var zu=H(`ZodStringFormat`,(e,t)=>{Hs.init(e,t),Iu.init(e,t)}),Bu=H(`ZodEmail`,(e,t)=>{Gs.init(e,t),zu.init(e,t)}),Vu=H(`ZodGUID`,(e,t)=>{Us.init(e,t),zu.init(e,t)}),Hu=H(`ZodUUID`,(e,t)=>{Ws.init(e,t),zu.init(e,t)}),Uu=H(`ZodURL`,(e,t)=>{Ks.init(e,t),zu.init(e,t)}),Wu=H(`ZodEmoji`,(e,t)=>{qs.init(e,t),zu.init(e,t)}),Z=H(`ZodNanoID`,(e,t)=>{Js.init(e,t),zu.init(e,t)}),Gu=H(`ZodCUID`,(e,t)=>{Ys.init(e,t),zu.init(e,t)}),Ku=H(`ZodCUID2`,(e,t)=>{Xs.init(e,t),zu.init(e,t)}),qu=H(`ZodULID`,(e,t)=>{Zs.init(e,t),zu.init(e,t)}),Ju=H(`ZodXID`,(e,t)=>{Qs.init(e,t),zu.init(e,t)}),Yu=H(`ZodKSUID`,(e,t)=>{$s.init(e,t),zu.init(e,t)}),Xu=H(`ZodIPv4`,(e,t)=>{ic.init(e,t),zu.init(e,t)}),Zu=H(`ZodIPv6`,(e,t)=>{ac.init(e,t),zu.init(e,t)}),Qu=H(`ZodCIDRv4`,(e,t)=>{oc.init(e,t),zu.init(e,t)}),$u=H(`ZodCIDRv6`,(e,t)=>{sc.init(e,t),zu.init(e,t)}),ed=H(`ZodBase64`,(e,t)=>{lc.init(e,t),zu.init(e,t)}),td=H(`ZodBase64URL`,(e,t)=>{dc.init(e,t),zu.init(e,t)}),nd=H(`ZodE164`,(e,t)=>{fc.init(e,t),zu.init(e,t)}),rd=H(`ZodJWT`,(e,t)=>{mc.init(e,t),zu.init(e,t)}),id=H(`ZodUnknown`,(e,t)=>{hc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function ad(){return wl(id)}var od=H(`ZodNever`,(e,t)=>{gc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xl(e,t,n,r)});function sd(e){return Tl(od,e)}var cd=H(`ZodArray`,(e,t)=>{vc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eu(e,t,n,r),e.element=t.element,Pu(e,`ZodArray`,{min(e,t){return this.check(Dl(e,t))},nonempty(e){return this.check(Dl(1,e))},max(e,t){return this.check(El(e,t))},length(e,t){return this.check(Ol(e,t))},unwrap(){return this.element}})});function ld(e,t){return Y(cd,e,t)}var ud=H(`ZodObject`,(e,t)=>{Cc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tu(e,t,n,r),U(e,`shape`,()=>t.shape),Pu(e,`ZodObject`,{keyof(){return _d(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:ad()})},loose(){return this.clone({...this._zod.def,catchall:ad()})},strict(){return this.clone({...this._zod.def,catchall:sd()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return xo(this,e)},safeExtend(e){return So(this,e)},merge(e){return Co(this,e)},pick(e){return yo(this,e)},omit(e){return bo(this,e)},partial(...e){return wo(Q,this,e[0])},required(...e){return To(kd,this,e[0])}})});function dd(e,t){return new ud({type:`object`,shape:e??{},...K(t)})}var fd=H(`ZodUnion`,(e,t)=>{Tc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nu(e,t,n,r),e.options=t.options});function pd(e,t){return new fd({type:`union`,options:e,...K(t)})}var md=H(`ZodIntersection`,(e,t)=>{Ec.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ru(e,t,n,r)});function hd(e,t){return new md({type:`intersection`,left:e,right:t})}var gd=H(`ZodEnum`,(e,t)=>{kc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zl(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new gd({...t,checks:[],...K(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new gd({...t,checks:[],...K(r),entries:i})}});function _d(e,t){return new gd({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...K(t)})}var vd=H(`ZodTransform`,(e,t)=>{Ac.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$l(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Qa(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Mo(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Mo(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function yd(e){return new vd({type:`transform`,transform:e})}var Q=H(`ZodOptional`,(e,t)=>{Mc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>du(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bd(e){return new Q({type:`optional`,innerType:e})}var xd=H(`ZodExactOptional`,(e,t)=>{Nc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>du(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Sd(e){return new xd({type:`optional`,innerType:e})}var Cd=H(`ZodNullable`,(e,t)=>{Pc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wd(e){return new Cd({type:`nullable`,innerType:e})}var Td=H(`ZodDefault`,(e,t)=>{Fc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ou(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ed(e,t){return new Td({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():mo(t)}})}var Dd=H(`ZodPrefault`,(e,t)=>{Lc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>su(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Od(e,t){return new Dd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():mo(t)}})}var kd=H(`ZodNonOptional`,(e,t)=>{Rc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>au(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ad(e,t){return new kd({type:`nonoptional`,innerType:e,...K(t)})}var jd=H(`ZodCatch`,(e,t)=>{Bc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Md(e,t){return new jd({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var $=H(`ZodPipe`,(e,t)=>{Vc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lu(e,t,n,r),e.in=t.in,e.out=t.out});function Nd(e,t){return new $({type:`pipe`,in:e,out:t})}var Pd=H(`ZodReadonly`,(e,t)=>{Uc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fd(e){return new Pd({type:`readonly`,innerType:e})}var Id=H(`ZodCustom`,(e,t)=>{Gc.init(e,t),Fu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ql(e,t,n,r)});function Ld(e,t={}){return X(Id,e,t)}function Rd(e,t){return zl(e,t)}var zd={health:`/api/v2/health`,snapshot:`/api/v2/snapshot`,reconcileOpenWork:`/api/v2/reconcile-open-work`,operations:`/api/v2/operations`,costMonitor:`/api/v2/cost-monitor`,prd:e=>`/api/v2/prds/${encodeURIComponent(e)}`,task:e=>`/api/v2/tasks/${encodeURIComponent(e)}`,taskTrace:e=>`/api/v2/tasks/${encodeURIComponent(e)}/trace`};dd({from:Ru().datetime({offset:!0}).nullable(),to:Ru().datetime({offset:!0}).nullable()}).strict();var Bd=class{token;constructor(e){this.token=e}operations(){return this.get(zd.operations)}costMonitor(e=`BRL`){return this.get(`${zd.costMonitor}?currency=${e}`)}snapshot(e=`BRL`){return this.get(`${zd.snapshot}?currency=${e}`)}reconcileOpenWork(e=`BRL`){return this.post(`${zd.reconcileOpenWork}?currency=${e}`)}task(e){return this.get(zd.task(e))}prd(e){return this.get(zd.prd(e))}taskTrace(e){return this.get(zd.taskTrace(e))}pricing(){return this.get(`/api/v2/pricing`)}async savePricing(e){let t=await fetch(`/api/v2/pricing`,{method:`PUT`,headers:{"content-type":`application/json`,"x-zaip-session":this.token},body:JSON.stringify(e)});if(!t.ok)throw Error(`Pricing update failed with HTTP ${t.status}`);return await t.json()}fxRate(){return this.get(`/api/v2/fx-rate`)}async saveFxRate(e){let t=await fetch(`/api/v2/fx-rate`,{method:`PUT`,headers:{"content-type":`application/json`,"x-zaip-session":this.token},body:JSON.stringify({rate:e})});if(!t.ok)throw Error(`FX update failed with HTTP ${t.status}`);return await t.json()}async get(e){let t=await fetch(e,{cache:`no-store`,headers:{"x-zaip-session":this.token}});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.error??`Dashboard API failed with HTTP ${t.status}`)}return await t.json()}async post(e){let t=await fetch(e,{method:`POST`,headers:{"x-zaip-session":this.token}});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.error??`Dashboard API failed with HTTP ${t.status}`)}return await t.json()}};function Vd({catalog:e,fxRate:t,locale:n,onClose:r,onSave:i,onSaveFxRate:a}){let o=za[n],[s,c]=(0,l.useState)(e),[u,d]=(0,l.useState)(t?.rate??0),[p,m]=(0,l.useState)(!1),h=(e,t)=>c(n=>({...n,models:n.models.map((n,r)=>r===e?{...n,...t}:n)})),g=e=>Math.max(0,Number(e)||0);return(0,f.jsx)(`main`,{className:`pricing-backdrop`,children:(0,f.jsxs)(`section`,{"aria-labelledby":`pricing-page-title`,className:`pricing-dialog`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`small`,{children:o.eyebrow}),(0,f.jsx)(`h1`,{id:`pricing-page-title`,children:o.title}),(0,f.jsx)(`p`,{children:o.description})]}),(0,f.jsxs)(`button`,{className:`pricing-back-button`,onClick:r,type:`button`,children:[(0,f.jsx)(`span`,{"aria-hidden":`true`,children:`←`}),` `,o.back]})]}),(0,f.jsxs)(`div`,{className:`pricing-fx-settings`,children:[(0,f.jsxs)(`div`,{className:`pricing-fx-copy`,children:[(0,f.jsx)(`strong`,{children:o.fxTitle}),(0,f.jsx)(`p`,{children:o.fxDescription})]}),(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:o.fxLabel}),(0,f.jsxs)(`div`,{className:`pricing-fx-input`,children:[(0,f.jsx)(`span`,{children:`R$`}),(0,f.jsx)(`input`,{"aria-label":o.fxAriaLabel,min:`0.0001`,onChange:e=>d(Math.max(1e-4,Number(e.target.value)||0)),step:`0.0001`,type:`number`,value:u})]})]})]}),(0,f.jsxs)(`div`,{className:`pricing-table-heading`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:o.catalog}),(0,f.jsx)(`p`,{children:o.pricesPerMillion})]}),(0,f.jsxs)(`span`,{children:[s.models.length,` `,o.models]})]}),(0,f.jsx)(`div`,{className:`pricing-table-wrap`,children:(0,f.jsxs)(`table`,{children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`th`,{children:o.model}),(0,f.jsx)(`th`,{children:o.provider}),(0,f.jsx)(`th`,{children:o.input}),(0,f.jsx)(`th`,{children:o.cache}),(0,f.jsx)(`th`,{children:o.output}),(0,f.jsx)(`th`,{children:o.reasoning}),(0,f.jsx)(`th`,{children:o.priorityInput}),(0,f.jsx)(`th`,{children:o.priorityCache}),(0,f.jsx)(`th`,{children:o.priorityOutput}),(0,f.jsx)(`th`,{children:o.priorityReasoning}),(0,f.jsx)(`th`,{children:o.contextLimit}),(0,f.jsx)(`th`,{children:o.inputMultiplier}),(0,f.jsx)(`th`,{children:o.outputMultiplier}),(0,f.jsx)(`th`,{})]})}),(0,f.jsx)(`tbody`,{children:s.models.map((e,t)=>(0,f.jsxs)(`tr`,{children:[(0,f.jsxs)(`td`,{children:[(0,f.jsx)(`input`,{"aria-label":o.model,onChange:e=>h(t,{id:e.target.value}),value:e.id}),(0,f.jsx)(`small`,{children:e.aliases.join(`, `)||o.noAliases})]}),(0,f.jsx)(`td`,{children:(0,f.jsxs)(`select`,{onChange:e=>h(t,{provider:e.target.value}),value:e.provider,children:[(0,f.jsx)(`option`,{value:`openai`,children:`OpenAI`}),(0,f.jsx)(`option`,{value:`anthropic`,children:`Anthropic`})]})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`input`,{min:`0`,onChange:e=>h(t,{input_per_million_usd:g(e.target.value)}),step:`0.001`,type:`number`,value:e.input_per_million_usd})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`input`,{min:`0`,onChange:e=>h(t,{cached_input_per_million_usd:g(e.target.value)}),step:`0.001`,type:`number`,value:e.cached_input_per_million_usd??0})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`input`,{min:`0`,onChange:e=>h(t,{output_per_million_usd:g(e.target.value)}),step:`0.001`,type:`number`,value:e.output_per_million_usd})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`input`,{min:`0`,onChange:e=>h(t,{reasoning_per_million_usd:g(e.target.value)}),step:`0.001`,type:`number`,value:e.reasoning_per_million_usd??0})}),[`priority_input_per_million_usd`,`priority_cached_input_per_million_usd`,`priority_output_per_million_usd`,`priority_reasoning_per_million_usd`].map(n=>(0,f.jsx)(`td`,{children:(0,f.jsx)(`input`,{min:`0`,onChange:e=>h(t,{[n]:g(e.target.value)}),step:`0.001`,type:`number`,value:e[n]??0})},n)),(0,f.jsx)(`td`,{children:(0,f.jsx)(`input`,{min:`0`,onChange:e=>h(t,{long_context_threshold_tokens:g(e.target.value)||null}),step:`1`,type:`number`,value:e.long_context_threshold_tokens??0})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`input`,{min:`0.001`,onChange:e=>h(t,{long_context_input_multiplier:Math.max(.001,Number(e.target.value)||1)}),step:`0.1`,type:`number`,value:e.long_context_input_multiplier})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`input`,{min:`0.001`,onChange:e=>h(t,{long_context_output_multiplier:Math.max(.001,Number(e.target.value)||1)}),step:`0.1`,type:`number`,value:e.long_context_output_multiplier})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`button`,{"aria-label":o.removeModel,onClick:()=>c(e=>({...e,models:e.models.filter((e,n)=>n!==t)})),type:`button`,children:`×`})})]},e.id))})]})}),(0,f.jsxs)(`footer`,{children:[(0,f.jsxs)(`button`,{onClick:()=>c(e=>({...e,models:[...e.models,Hd(n)]})),type:`button`,children:[`+ `,o.addModel]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`button`,{onClick:r,type:`button`,children:o.cancel}),(0,f.jsx)(`button`,{disabled:p,onClick:async()=>{m(!0);try{await i(s),await a(u),r()}finally{m(!1)}},type:`button`,children:p?o.saving:o.save})]})]})]})})}function Hd(e=`pt-BR`){let t=za[e];return{id:t.newModel,provider:`openai`,aliases:[],input_per_million_usd:0,cached_input_per_million_usd:0,output_per_million_usd:0,reasoning_per_million_usd:0,priority_input_per_million_usd:null,priority_cached_input_per_million_usd:null,priority_output_per_million_usd:null,priority_reasoning_per_million_usd:null,reasoning_billed_separately:!1,long_context_threshold_tokens:null,long_context_input_multiplier:1,long_context_output_multiplier:1,source_label:t.manualOverride,source_url:`https://developers.openai.com/api/docs/pricing`,notes:[t.editedNote]}}function Ud({locale:e,loadingTaskId:t,onSelectTask:n,onOpenChange:r,onOpenPrd:i,onOpenSpec:a,selectedTaskId:o,tasks:s,trace:c}){let l=[...s].sort((e,t)=>Date.parse(t.created_at)-Date.parse(e.created_at));return(0,f.jsxs)(`section`,{className:`traceability-workspace`,children:[(0,f.jsxs)(`header`,{children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{children:e===`pt-BR`?`Task selecionada`:`Selected task`}),(0,f.jsx)(`select`,{"aria-label":e===`pt-BR`?`Selecionar task por nome`:`Select task by name`,onChange:e=>n(e.target.value),value:o,children:l.map(e=>(0,f.jsx)(`option`,{value:e.id,children:e.title},e.id))})]}),(0,f.jsx)(`small`,{children:e===`pt-BR`?`Selecione pelo nome para visualizar o ciclo completo sem precisar do ID.`:`Select by name to inspect the complete lifecycle without knowing the ID.`})]}),t?(0,f.jsx)(`div`,{"aria-live":`polite`,className:`traceability-workspace-loading`,children:e===`pt-BR`?`Carregando as 6 etapas…`:`Loading all 6 stages…`}):c?(0,f.jsx)(ca,{embedded:!0,locale:e,onClose:()=>void 0,onOpenChange:r,onOpenPrd:i,onOpenSpec:a,trace:c}):(0,f.jsx)(`p`,{children:e===`pt-BR`?`Nenhuma task disponível.`:`No task available.`})]})}var Wd=`/zaip-cost-monitor`,Gd=`/setup-pricing`,Kd=`zaip-dashboard-session-token`,qd=`zaip-dashboard-locale`,Jd=`zaip-dashboard-currency`;function Yd(){return window.localStorage.getItem(qd)===`en-US`?`en-US`:`pt-BR`}function Xd(e){return e.replace(/\/+$/,``)===Wd?`cost-monitor`:`operations`}function Zd({locale:e}){let t=e===`pt-BR`?[`Definição`,`Planejamento`,`Pronto para Executar`,`Execução`,`Verificação`]:[`Definition`,`Planning`,`Ready to Execute`,`Execution`,`Verification`];return(0,f.jsxs)(`main`,{"aria-busy":`true`,"aria-label":e===`pt-BR`?`Preparando dashboard`:`Preparing dashboard`,className:`app-skeleton`,children:[(0,f.jsxs)(`header`,{className:`app-skeleton-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-short`}),(0,f.jsx)(`h1`,{children:`Dashboard Zaip AIOS`})]}),(0,f.jsxs)(`div`,{className:`app-skeleton-actions`,children:[(0,f.jsx)(`span`,{}),(0,f.jsx)(`span`,{}),(0,f.jsx)(`span`,{})]})]}),(0,f.jsx)(`section`,{className:`app-skeleton-kpis`,"aria-hidden":`true`,children:Array.from({length:4},(e,t)=>(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-short`}),(0,f.jsx)(`span`,{className:`app-skeleton-value`}),(0,f.jsx)(`span`,{className:`app-skeleton-line`})]},t))}),(0,f.jsxs)(`section`,{className:`app-skeleton-panels`,"aria-hidden":`true`,children:[(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-medium`}),(0,f.jsx)(`div`,{className:`app-skeleton-chart`})]}),(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-medium`}),(0,f.jsx)(`div`,{className:`app-skeleton-chart app-skeleton-chart-small`})]})]}),(0,f.jsx)(`section`,{className:`app-skeleton-board`,"aria-hidden":`true`,children:t.map((e,t)=>(0,f.jsxs)(`article`,{children:[(0,f.jsx)(`h2`,{children:e}),Array.from({length:t%2==0?2:1},(e,t)=>(0,f.jsxs)(`div`,{className:`app-skeleton-card`,children:[(0,f.jsx)(`span`,{className:`app-skeleton-line`}),(0,f.jsx)(`span`,{className:`app-skeleton-line app-skeleton-line-medium`}),(0,f.jsx)(`span`,{className:`app-skeleton-pill`})]},t))]},e))})]})}function Qd(){let e=(0,l.useMemo)(()=>{let e=new URL(window.location.href),t=e.searchParams.get(`token`)??window.localStorage.getItem(Kd)??window.sessionStorage.getItem(Kd)??``;return t&&(window.localStorage.setItem(Kd,t),window.sessionStorage.setItem(Kd,t)),e.searchParams.has(`token`)&&(e.searchParams.delete(`token`),window.history.replaceState(null,``,`${e.pathname}${e.search}${e.hash}`)),t},[]),t=(0,l.useMemo)(()=>new Bd(e),[e]),[n,r]=(0,l.useState)(()=>Xd(window.location.pathname)),[i,a]=(0,l.useState)(null),[o,s]=(0,l.useState)(null),[c,u]=(0,l.useState)(null),[d,p]=(0,l.useState)(null),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(``),[b,x]=(0,l.useState)(Yd),[S,C]=(0,l.useState)(()=>window.localStorage.getItem(Jd)===`USD`?`USD`:`BRL`),[w,T]=(0,l.useState)(!1),[E,ee]=(0,l.useState)(null),[D,te]=(0,l.useState)(null),[O,ne]=(0,l.useState)(window.location.pathname),[k,re]=(0,l.useState)(!0),[A,j]=(0,l.useState)(null),[N,ie]=(0,l.useState)(null),[P,ae]=(0,l.useState)(null),[F,I]=(0,l.useState)({title:`Dashboard Zaip AIOS`,repositoryName:``}),L=(0,l.useCallback)(async(e=!0,n=!1)=>{e&&re(!0),ie(null);try{let e=n?await t.reconcileOpenWork(S):await t.snapshot(S);a(e.operations),s(e.costs),e.dashboard&&I({title:e.dashboard.title,repositoryName:e.dashboard.repository_name}),ae(e.projection.source_latest_at)}catch(e){ie(e instanceof Error?e.message:String(e))}finally{e&&re(!1)}},[t,S]),oe=async e=>{j(e?`reconciling`:`refreshing`),await L(!1,e),j(null)};(0,l.useEffect)(()=>{L();let e=window.setInterval(()=>void L(!1),5e3);return()=>window.clearInterval(e)},[L]),(0,l.useEffect)(()=>{window.localStorage.setItem(qd,b)},[b]),(0,l.useEffect)(()=>{window.localStorage.setItem(Jd,S)},[S]),(0,l.useEffect)(()=>{[`/`,Gd].includes(window.location.pathname)||(window.history.replaceState(null,``,`/${window.location.search}${window.location.hash}`),ne(`/`))},[]),(0,l.useEffect)(()=>{let e=()=>ne(window.location.pathname);return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,l.useEffect)(()=>{O!==Gd||E!==null||Promise.all([t.pricing(),t.fxRate()]).then(([e,t])=>{ee(e),te(t)}).catch(e=>ie(String(e)))},[t,O,E]);let se=e=>{window.history.pushState(null,``,e),ne(e),window.scrollTo({left:0,top:0})};async function ce(e){ie(null),u(null),_(e),await new Promise(e=>window.requestAnimationFrame(()=>e()));try{let n=await t.taskTrace(e),r=i?.tasks.find(t=>t.id===e);return u({...n,task_title:r?.title||n.task_title||e,task_risk:r?.risk||n.task_risk||null,task_created_at:r?.created_at||n.task_created_at||null,task_progress:r?.progress??n.task_progress??0}),!0}catch(e){return ie(e instanceof Error?e.message:String(e)),!1}finally{_(t=>t===e?null:t)}}function le(e){let t=i?.changes.find(t=>t.id===e);t!==void 0&&(u(null),h({kind:`change`,row:t}))}function ue(e,t){let n=(e===`PRD`?i?.prds:i?.specs)?.find(e=>e.id===t);n!==void 0&&(u(null),h({kind:`macro`,label:e,row:n}))}async function de(e){ie(null);try{p(await t.prd(e))}catch(e){ie(e instanceof Error?e.message:String(e))}}let fe=(0,f.jsx)(ma,{activeView:n,locale:b,onChange:e=>{if(r(e),window.scrollTo({left:0,top:0}),e===`traceability`){let e=i?.tasks.filter(e=>e.status===`completed`).toSorted((e,t)=>Date.parse(t.finished_at??t.updated_at)-Date.parse(e.finished_at??e.updated_at))[0];e&&(y(e.id),ce(e.id));return}u(null),_(null)}}),pe=(0,l.useMemo)(()=>new Map((o?.runs??[]).map(e=>[e.run_id,e.estimated_brl])),[o]);return O===Gd?E===null?(0,f.jsxs)(`main`,{className:`app-state`,children:[(0,f.jsx)(`p`,{children:b===`pt-BR`?`Configuração do projeto`:`Project settings`}),(0,f.jsx)(`h1`,{children:b===`pt-BR`?`Carregando catálogo de preços…`:`Loading pricing catalog…`}),(0,f.jsx)(`button`,{onClick:()=>se(`/`),type:`button`,children:b===`pt-BR`?`Voltar ao dashboard`:`Back to dashboard`})]}):(0,f.jsx)(Vd,{catalog:E,fxRate:D,locale:b,onClose:()=>se(`/`),onSave:async e=>{ee(await t.savePricing(e)),await L()},onSaveFxRate:async e=>{te(await t.saveFxRate(e)),await L()}}):N&&i===null?(0,f.jsxs)(`main`,{className:`app-state`,children:[(0,f.jsx)(`p`,{children:`Dashboard local indisponível`}),(0,f.jsx)(`h1`,{children:`Não foi possível ler o workspace V2.`}),(0,f.jsx)(`pre`,{children:N}),(0,f.jsx)(`button`,{onClick:()=>void L(),type:`button`,children:`Tentar novamente`})]}):i===null||o===null?(0,f.jsx)(Zd,{locale:b}):(0,f.jsxs)(f.Fragment,{children:[N?(0,f.jsxs)(`div`,{className:`app-warning`,role:`status`,children:[N,(0,f.jsx)(`button`,{onClick:()=>ie(null),type:`button`,children:`×`})]}):null,(0,f.jsx)(cr,{alternateContent:n===`cost-monitor`?e=>(0,f.jsx)(Ri,{currency:S,data:o,embedded:!0,globalFilters:e,lastUpdatedAt:P,locale:b,loading:k,onLocaleChange:x,onCurrencyChange:C,onOpenTrace:e=>void ce(e),onRefresh:()=>j(`choose`),operations:i}):n===`traceability`?()=>(0,f.jsx)(Ud,{loadingTaskId:g,locale:b,onSelectTask:e=>{y(e),ce(e)},onOpenChange:le,onOpenPrd:e=>ue(`PRD`,e),onOpenSpec:e=>ue(`SPEC`,e),selectedTaskId:v,tasks:i.tasks,trace:c}):void 0,capabilityNavigation:fe,data:i,dashboardTitle:F.title,repositoryName:F.repositoryName,loading:k,locale:b,resolveRunCostBrl:e=>pe.get(e)??null,onLocaleChange:x,onOpenPrdDocument:e=>void de(e),onOpenTask:ce,onRefresh:()=>j(`choose`),settings:(0,f.jsxs)(`div`,{className:`dashboard-global-settings`,children:[(0,f.jsxs)(`label`,{children:[(0,f.jsx)(`span`,{children:b===`pt-BR`?`Moeda`:`Currency`}),(0,f.jsxs)(`select`,{"aria-label":b===`pt-BR`?`Moeda`:`Currency`,onChange:e=>C(e.target.value),value:S,children:[(0,f.jsx)(`option`,{value:`BRL`,children:`BRL · Real brasileiro`}),(0,f.jsx)(`option`,{value:`USD`,children:`USD · US Dollar`})]})]}),(0,f.jsx)(`button`,{className:`dashboard-help-open`,onClick:()=>T(!0),type:`button`,children:b===`pt-BR`?`Abrir ajuda e guides`:`Open help and guides`}),(0,f.jsx)(`button`,{className:`dashboard-help-open`,onClick:()=>se(Gd),type:`button`,children:b===`pt-BR`?`Configurar preços e câmbio`:`Configure pricing and FX`})]})}),n===`traceability`?null:g?(0,f.jsx)(sa,{locale:b,taskId:g}):c?(0,f.jsx)(ca,{locale:b,onClose:()=>u(null),onOpenChange:le,onOpenPrd:e=>ue(`PRD`,e),onOpenSpec:e=>ue(`SPEC`,e),trace:c}):null,m?.kind===`change`?(0,f.jsx)(M,{details:{kind:`change`,row:m.row},locale:b,onClose:()=>h(null)}):null,m?.kind===`macro`?(0,f.jsx)(Gt,{label:m.label,locale:b,onClose:()=>h(null),onOpenDocument:e=>void de(e),onOpenTrace:e=>{h(null),ce(e)},row:m.row,runs:i.runs,specs:i.specs,tasks:i.tasks}):null,d?(0,f.jsx)(vr,{detail:d,locale:b,onClose:()=>p(null)}):null,w?(0,f.jsx)(Va,{locale:b,onClose:()=>T(!1)}):null,A===`choose`?(0,f.jsx)(`div`,{className:`app-refresh-dialog-backdrop`,children:(0,f.jsxs)(`section`,{"aria-label":`Atualizar dashboard`,"aria-modal":`true`,className:`app-refresh-dialog`,role:`dialog`,children:[(0,f.jsx)(`h2`,{children:b===`pt-BR`?`Atualizar dashboard`:`Refresh dashboard`}),(0,f.jsx)(`p`,{children:b===`pt-BR`?`Escolha uma atualização rápida ou reconcilie os itens que ainda estão em aberto.`:`Choose a quick refresh or reconcile work items that are still open.`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`button`,{onClick:()=>void oe(!1),type:`button`,children:b===`pt-BR`?`Apenas atualizar dados`:`Refresh data only`}),(0,f.jsx)(`button`,{onClick:()=>void oe(!0),type:`button`,children:b===`pt-BR`?`Reconciliar itens abertos`:`Reconcile open work`})]}),(0,f.jsx)(`button`,{className:`app-refresh-cancel`,onClick:()=>j(null),type:`button`,children:b===`pt-BR`?`Cancelar`:`Cancel`})]})}):null,A===`refreshing`||A===`reconciling`?(0,f.jsxs)(`section`,{"aria-live":`polite`,className:`app-refresh-status`,role:`status`,children:[(0,f.jsx)(`i`,{}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:A===`reconciling`?b===`pt-BR`?`Reconciliando itens em aberto…`:`Reconciling open work…`:b===`pt-BR`?`Atualizando dados…`:`Refreshing data…`}),(0,f.jsx)(`span`,{children:b===`pt-BR`?`Você pode continuar usando o dashboard.`:`You can keep using the dashboard.`})]})]}):null]})}var $d=document.getElementById(`root`);if(!$d)throw Error(`Elemento #root não encontrado`);(0,u.createRoot)($d).render((0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(Qd,{})}));