codex-linux 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/.claude/settings.local.json +10 -0
  2. package/.eslintrc.json +27 -0
  3. package/.github/workflows/ci.yml +156 -0
  4. package/.huskyrc +7 -0
  5. package/.lintstagedrc +13 -0
  6. package/.prettierrc +12 -0
  7. package/CLAUDE.md +163 -0
  8. package/DESIGN_SUPERIOR.md +73 -0
  9. package/Dockerfile +64 -0
  10. package/INSTALLATION.md +152 -0
  11. package/LICENSE +21 -0
  12. package/README.md +245 -0
  13. package/assets/skills/code-review/instructions.md +102 -0
  14. package/assets/skills/code-review/skill.yaml +15 -0
  15. package/assets/skills/refactoring/instructions.md +149 -0
  16. package/assets/skills/refactoring/skill.yaml +15 -0
  17. package/assets/skills/testing/skill.yaml +15 -0
  18. package/commitlint.config.js +23 -0
  19. package/dist/main/DatabaseManager.js +763 -0
  20. package/dist/main/DatabaseManager.js.map +1 -0
  21. package/dist/main/SettingsManager.js +61 -0
  22. package/dist/main/SettingsManager.js.map +1 -0
  23. package/dist/main/agents/AgentOrchestrator.js +787 -0
  24. package/dist/main/agents/AgentOrchestrator.js.map +1 -0
  25. package/dist/main/agents/AgentSDK.js +219 -0
  26. package/dist/main/agents/AgentSDK.js.map +1 -0
  27. package/dist/main/agents/AgentTools.js +348 -0
  28. package/dist/main/agents/AgentTools.js.map +1 -0
  29. package/dist/main/agents/CodeIndex.js +233 -0
  30. package/dist/main/agents/CodeIndex.js.map +1 -0
  31. package/dist/main/agents/EmbeddingService.js +80 -0
  32. package/dist/main/agents/EmbeddingService.js.map +1 -0
  33. package/dist/main/agents/NativeToolCalling.js +206 -0
  34. package/dist/main/agents/NativeToolCalling.js.map +1 -0
  35. package/dist/main/api/APIServer.js +278 -0
  36. package/dist/main/api/APIServer.js.map +1 -0
  37. package/dist/main/api/RateLimiter.js +138 -0
  38. package/dist/main/api/RateLimiter.js.map +1 -0
  39. package/dist/main/api/WebSocketManager.js +300 -0
  40. package/dist/main/api/WebSocketManager.js.map +1 -0
  41. package/dist/main/assistant/ContextOptimizer.js +192 -0
  42. package/dist/main/assistant/ContextOptimizer.js.map +1 -0
  43. package/dist/main/assistant/PredictedOutputManager.js +172 -0
  44. package/dist/main/assistant/PredictedOutputManager.js.map +1 -0
  45. package/dist/main/assistant/PromptCacheManager.js +193 -0
  46. package/dist/main/assistant/PromptCacheManager.js.map +1 -0
  47. package/dist/main/assistant/PromptOptimizer.js +626 -0
  48. package/dist/main/assistant/PromptOptimizer.js.map +1 -0
  49. package/dist/main/assistant/SmartCodeAssistant.js +224 -0
  50. package/dist/main/assistant/SmartCodeAssistant.js.map +1 -0
  51. package/dist/main/auth/SessionManager.js +300 -0
  52. package/dist/main/auth/SessionManager.js.map +1 -0
  53. package/dist/main/automations/AdvancedWebhookSystem.js +212 -0
  54. package/dist/main/automations/AdvancedWebhookSystem.js.map +1 -0
  55. package/dist/main/automations/AutomationScheduler.js +269 -0
  56. package/dist/main/automations/AutomationScheduler.js.map +1 -0
  57. package/dist/main/automations/BatchProcessingSystem.js +159 -0
  58. package/dist/main/automations/BatchProcessingSystem.js.map +1 -0
  59. package/dist/main/automations/BrowserAutomationManager.js +195 -0
  60. package/dist/main/automations/BrowserAutomationManager.js.map +1 -0
  61. package/dist/main/automations/GitHubActionsManager.js +129 -0
  62. package/dist/main/automations/GitHubActionsManager.js.map +1 -0
  63. package/dist/main/automations/GitLabCIManager.js +122 -0
  64. package/dist/main/automations/GitLabCIManager.js.map +1 -0
  65. package/dist/main/automations/PriorityQueueManager.js +240 -0
  66. package/dist/main/automations/PriorityQueueManager.js.map +1 -0
  67. package/dist/main/background/BackgroundModeManager.js +117 -0
  68. package/dist/main/background/BackgroundModeManager.js.map +1 -0
  69. package/dist/main/backup/BackupManager.js +254 -0
  70. package/dist/main/backup/BackupManager.js.map +1 -0
  71. package/dist/main/backup/MigrationManager.js +114 -0
  72. package/dist/main/backup/MigrationManager.js.map +1 -0
  73. package/dist/main/commands/SlashCommandManager.js +399 -0
  74. package/dist/main/commands/SlashCommandManager.js.map +1 -0
  75. package/dist/main/config/ClaudeMdParser.js +519 -0
  76. package/dist/main/config/ClaudeMdParser.js.map +1 -0
  77. package/dist/main/config/CustomizationManager.js +381 -0
  78. package/dist/main/config/CustomizationManager.js.map +1 -0
  79. package/dist/main/config/LaunchConfigManager.js +211 -0
  80. package/dist/main/config/LaunchConfigManager.js.map +1 -0
  81. package/dist/main/config/SettingsManager.js +166 -0
  82. package/dist/main/config/SettingsManager.js.map +1 -0
  83. package/dist/main/connectors/ConnectorManager.js +151 -0
  84. package/dist/main/connectors/ConnectorManager.js.map +1 -0
  85. package/dist/main/connectors/DatabaseConnector.js +222 -0
  86. package/dist/main/connectors/DatabaseConnector.js.map +1 -0
  87. package/dist/main/cowork/CoworkManager.js +324 -0
  88. package/dist/main/cowork/CoworkManager.js.map +1 -0
  89. package/dist/main/evals/AgentEvalFramework.js +538 -0
  90. package/dist/main/evals/AgentEvalFramework.js.map +1 -0
  91. package/dist/main/evals/GraderManager.js +285 -0
  92. package/dist/main/evals/GraderManager.js.map +1 -0
  93. package/dist/main/git/GitWorktreeManager.js +214 -0
  94. package/dist/main/git/GitWorktreeManager.js.map +1 -0
  95. package/dist/main/github/GitHubPRMonitor.js +244 -0
  96. package/dist/main/github/GitHubPRMonitor.js.map +1 -0
  97. package/dist/main/ide/ContinueInManager.js +181 -0
  98. package/dist/main/ide/ContinueInManager.js.map +1 -0
  99. package/dist/main/ide/IDEIntegration.js +277 -0
  100. package/dist/main/ide/IDEIntegration.js.map +1 -0
  101. package/dist/main/integrations/LinearManager.js +252 -0
  102. package/dist/main/integrations/LinearManager.js.map +1 -0
  103. package/dist/main/integrations/SlackBotManager.js +247 -0
  104. package/dist/main/integrations/SlackBotManager.js.map +1 -0
  105. package/dist/main/lsp/LSPManager.js +394 -0
  106. package/dist/main/lsp/LSPManager.js.map +1 -0
  107. package/dist/main/main.js +1087 -0
  108. package/dist/main/main.js.map +1 -0
  109. package/dist/main/mcp/MCPConfigurationManager.js +281 -0
  110. package/dist/main/mcp/MCPConfigurationManager.js.map +1 -0
  111. package/dist/main/mcp/MCPManager.js +710 -0
  112. package/dist/main/mcp/MCPManager.js.map +1 -0
  113. package/dist/main/mcp/MCPRegistry.js +272 -0
  114. package/dist/main/mcp/MCPRegistry.js.map +1 -0
  115. package/dist/main/monitoring/ErrorRecoveryManager.js +268 -0
  116. package/dist/main/monitoring/ErrorRecoveryManager.js.map +1 -0
  117. package/dist/main/monitoring/ErrorTracker.js +57 -0
  118. package/dist/main/monitoring/ErrorTracker.js.map +1 -0
  119. package/dist/main/monitoring/MetricsCollector.js +155 -0
  120. package/dist/main/monitoring/MetricsCollector.js.map +1 -0
  121. package/dist/main/monitoring/TraceGradingSystem.js +148 -0
  122. package/dist/main/monitoring/TraceGradingSystem.js.map +1 -0
  123. package/dist/main/notifications/NotificationManager.js +67 -0
  124. package/dist/main/notifications/NotificationManager.js.map +1 -0
  125. package/dist/main/pair/AIPairProgramming.js +200 -0
  126. package/dist/main/pair/AIPairProgramming.js.map +1 -0
  127. package/dist/main/plugins/PluginManager.js +222 -0
  128. package/dist/main/plugins/PluginManager.js.map +1 -0
  129. package/dist/main/plugins/PluginMarketplace.js +237 -0
  130. package/dist/main/plugins/PluginMarketplace.js.map +1 -0
  131. package/dist/main/preload.js +189 -0
  132. package/dist/main/preload.js.map +1 -0
  133. package/dist/main/preview/PreviewSessionManager.js +170 -0
  134. package/dist/main/preview/PreviewSessionManager.js.map +1 -0
  135. package/dist/main/providers/AIProviderManager.js +327 -0
  136. package/dist/main/providers/AIProviderManager.js.map +1 -0
  137. package/dist/main/providers/FineTuningManager.js +276 -0
  138. package/dist/main/providers/FineTuningManager.js.map +1 -0
  139. package/dist/main/providers/FreeModelsProvider.js +1104 -0
  140. package/dist/main/providers/FreeModelsProvider.js.map +1 -0
  141. package/dist/main/realtime/RealtimeManager.js +116 -0
  142. package/dist/main/realtime/RealtimeManager.js.map +1 -0
  143. package/dist/main/remote/CloudEnvironmentManager.js +232 -0
  144. package/dist/main/remote/CloudEnvironmentManager.js.map +1 -0
  145. package/dist/main/remote/RemoteSessionManager.js +255 -0
  146. package/dist/main/remote/RemoteSessionManager.js.map +1 -0
  147. package/dist/main/search/DeepResearchManager.js +335 -0
  148. package/dist/main/search/DeepResearchManager.js.map +1 -0
  149. package/dist/main/search/WebSearchIntegration.js +147 -0
  150. package/dist/main/search/WebSearchIntegration.js.map +1 -0
  151. package/dist/main/security/AdminConsoleManager.js +223 -0
  152. package/dist/main/security/AdminConsoleManager.js.map +1 -0
  153. package/dist/main/security/AuditLogger.js +136 -0
  154. package/dist/main/security/AuditLogger.js.map +1 -0
  155. package/dist/main/security/PermissionManager.js +144 -0
  156. package/dist/main/security/PermissionManager.js.map +1 -0
  157. package/dist/main/security/SSOManager.js +173 -0
  158. package/dist/main/security/SSOManager.js.map +1 -0
  159. package/dist/main/security/SecurityManager.js +152 -0
  160. package/dist/main/security/SecurityManager.js.map +1 -0
  161. package/dist/main/skills/SkillsManager.js +223 -0
  162. package/dist/main/skills/SkillsManager.js.map +1 -0
  163. package/dist/main/ssh/SSHManager.js +65 -0
  164. package/dist/main/ssh/SSHManager.js.map +1 -0
  165. package/dist/main/streaming/StreamingManager.js +225 -0
  166. package/dist/main/streaming/StreamingManager.js.map +1 -0
  167. package/dist/main/sync/CloudSyncManager.js +422 -0
  168. package/dist/main/sync/CloudSyncManager.js.map +1 -0
  169. package/dist/main/types.js +28 -0
  170. package/dist/main/types.js.map +1 -0
  171. package/dist/main/verification/AutoVerifyManager.js +235 -0
  172. package/dist/main/verification/AutoVerifyManager.js.map +1 -0
  173. package/dist/main/vision/ComputerUseManager.js +376 -0
  174. package/dist/main/vision/ComputerUseManager.js.map +1 -0
  175. package/dist/main/vision/ImageVideoGenerationManager.js +401 -0
  176. package/dist/main/vision/ImageVideoGenerationManager.js.map +1 -0
  177. package/dist/main/vision/VisionManager.js +172 -0
  178. package/dist/main/vision/VisionManager.js.map +1 -0
  179. package/dist/renderer/assets/main-DJlZQBCA.js +304 -0
  180. package/dist/renderer/assets/main-N33ZXEr8.css +1 -0
  181. package/dist/renderer/index.html +21 -0
  182. package/dist/renderer/manifest.json +42 -0
  183. package/dist/renderer/sw.ts +109 -0
  184. package/dist/shared/types.js +35 -0
  185. package/dist/shared/types.js.map +1 -0
  186. package/docker-compose.yml +65 -0
  187. package/docs/API.md +307 -0
  188. package/docs/USER_GUIDE.md +476 -0
  189. package/examples/plugins/sample-plugin/package.json +41 -0
  190. package/examples/plugins/sample-plugin/src/index.ts +75 -0
  191. package/index.html +20 -0
  192. package/jest.config.js +39 -0
  193. package/package.json +180 -0
  194. package/packages/cli/package.json +29 -0
  195. package/packages/cli/src/commands/agents.ts +199 -0
  196. package/packages/cli/src/commands/tasks.ts +61 -0
  197. package/packages/cli/src/index.ts +91 -0
  198. package/packages/cli/src/utils/api.ts +45 -0
  199. package/packages/cli/src/utils/config.ts +61 -0
  200. package/packages/npm-installer/bin/codex-linux +126 -0
  201. package/packages/npm-installer/lib/download.js +273 -0
  202. package/packages/npm-installer/package.json +42 -0
  203. package/packages/vscode-extension/package.json +167 -0
  204. package/packages/vscode-extension/src/api.ts +68 -0
  205. package/packages/vscode-extension/src/extension.ts +161 -0
  206. package/packages/vscode-extension/src/panels/chatPanel.ts +265 -0
  207. package/packages/vscode-extension/src/panels/createAgentPanel.ts +227 -0
  208. package/packages/vscode-extension/src/providers/agentsProvider.ts +80 -0
  209. package/postcss.config.js +6 -0
  210. package/public/manifest.json +42 -0
  211. package/public/sw.ts +109 -0
  212. package/scripts/install-dev.sh +103 -0
  213. package/scripts/install.sh +275 -0
  214. package/src/main/DatabaseManager.ts +950 -0
  215. package/src/main/SettingsManager.ts +63 -0
  216. package/src/main/agents/AgentOrchestrator.ts +930 -0
  217. package/src/main/agents/AgentSDK.ts +269 -0
  218. package/src/main/agents/AgentTools.ts +380 -0
  219. package/src/main/agents/CodeIndex.ts +240 -0
  220. package/src/main/agents/EmbeddingService.ts +88 -0
  221. package/src/main/agents/NativeToolCalling.ts +245 -0
  222. package/src/main/api/APIServer.ts +316 -0
  223. package/src/main/api/RateLimiter.ts +165 -0
  224. package/src/main/api/WebSocketManager.ts +398 -0
  225. package/src/main/assistant/ContextOptimizer.ts +214 -0
  226. package/src/main/assistant/PredictedOutputManager.ts +265 -0
  227. package/src/main/assistant/PromptCacheManager.ts +280 -0
  228. package/src/main/assistant/PromptOptimizer.ts +746 -0
  229. package/src/main/assistant/SmartCodeAssistant.ts +234 -0
  230. package/src/main/auth/SessionManager.ts +415 -0
  231. package/src/main/automations/AdvancedWebhookSystem.ts +281 -0
  232. package/src/main/automations/AutomationScheduler.ts +272 -0
  233. package/src/main/automations/BatchProcessingSystem.ts +207 -0
  234. package/src/main/automations/BrowserAutomationManager.ts +203 -0
  235. package/src/main/automations/GitHubActionsManager.ts +151 -0
  236. package/src/main/automations/GitLabCIManager.ts +206 -0
  237. package/src/main/automations/PriorityQueueManager.ts +328 -0
  238. package/src/main/background/BackgroundModeManager.ts +130 -0
  239. package/src/main/backup/BackupManager.ts +287 -0
  240. package/src/main/backup/MigrationManager.ts +132 -0
  241. package/src/main/commands/SlashCommandManager.ts +407 -0
  242. package/src/main/config/ClaudeMdParser.ts +539 -0
  243. package/src/main/config/CustomizationManager.ts +493 -0
  244. package/src/main/config/LaunchConfigManager.ts +212 -0
  245. package/src/main/config/SettingsManager.ts +163 -0
  246. package/src/main/connectors/ConnectorManager.ts +175 -0
  247. package/src/main/connectors/DatabaseConnector.ts +212 -0
  248. package/src/main/cowork/CoworkManager.ts +431 -0
  249. package/src/main/evals/AgentEvalFramework.ts +665 -0
  250. package/src/main/evals/GraderManager.ts +417 -0
  251. package/src/main/git/GitWorktreeManager.ts +211 -0
  252. package/src/main/github/GitHubPRMonitor.ts +317 -0
  253. package/src/main/ide/ContinueInManager.ts +180 -0
  254. package/src/main/ide/IDEIntegration.ts +288 -0
  255. package/src/main/integrations/LinearManager.ts +327 -0
  256. package/src/main/integrations/SlackBotManager.ts +312 -0
  257. package/src/main/lsp/LSPManager.ts +445 -0
  258. package/src/main/main.ts +1221 -0
  259. package/src/main/mcp/MCPConfigurationManager.ts +281 -0
  260. package/src/main/mcp/MCPManager.ts +799 -0
  261. package/src/main/mcp/MCPRegistry.ts +273 -0
  262. package/src/main/monitoring/ErrorRecoveryManager.ts +359 -0
  263. package/src/main/monitoring/ErrorTracker.ts +60 -0
  264. package/src/main/monitoring/MetricsCollector.ts +196 -0
  265. package/src/main/monitoring/TraceGradingSystem.ts +196 -0
  266. package/src/main/notifications/NotificationManager.ts +96 -0
  267. package/src/main/pair/AIPairProgramming.ts +290 -0
  268. package/src/main/plugins/PluginManager.ts +266 -0
  269. package/src/main/plugins/PluginMarketplace.ts +318 -0
  270. package/src/main/preload.ts +215 -0
  271. package/src/main/preview/PreviewSessionManager.ts +186 -0
  272. package/src/main/providers/AIProviderManager.ts +394 -0
  273. package/src/main/providers/FineTuningManager.ts +390 -0
  274. package/src/main/providers/FreeModelsProvider.ts +1156 -0
  275. package/src/main/realtime/RealtimeManager.ts +147 -0
  276. package/src/main/remote/CloudEnvironmentManager.ts +253 -0
  277. package/src/main/remote/RemoteSessionManager.ts +323 -0
  278. package/src/main/search/DeepResearchManager.ts +458 -0
  279. package/src/main/search/WebSearchIntegration.ts +203 -0
  280. package/src/main/security/AdminConsoleManager.ts +244 -0
  281. package/src/main/security/AuditLogger.ts +143 -0
  282. package/src/main/security/PermissionManager.ts +184 -0
  283. package/src/main/security/SSOManager.ts +241 -0
  284. package/src/main/security/SecurityManager.ts +139 -0
  285. package/src/main/skills/SkillsManager.ts +218 -0
  286. package/src/main/ssh/SSHManager.ts +86 -0
  287. package/src/main/streaming/StreamingManager.ts +306 -0
  288. package/src/main/sync/CloudSyncManager.ts +532 -0
  289. package/src/main/verification/AutoVerifyManager.ts +285 -0
  290. package/src/main/vision/ComputerUseManager.ts +475 -0
  291. package/src/main/vision/ImageVideoGenerationManager.ts +526 -0
  292. package/src/main/vision/VisionManager.ts +186 -0
  293. package/src/renderer/App.tsx +314 -0
  294. package/src/renderer/components/AdvancedSettingsPanel.tsx +225 -0
  295. package/src/renderer/components/AgentPanel.tsx +760 -0
  296. package/src/renderer/components/AppPreview.tsx +220 -0
  297. package/src/renderer/components/AuditTrailPanel.tsx +148 -0
  298. package/src/renderer/components/AutomationPanel.tsx +220 -0
  299. package/src/renderer/components/ChatInterface.tsx +595 -0
  300. package/src/renderer/components/ChatTab.tsx +296 -0
  301. package/src/renderer/components/CodeEditor.tsx +257 -0
  302. package/src/renderer/components/CodeReviewPanel.tsx +256 -0
  303. package/src/renderer/components/CodeWorkspace.tsx +192 -0
  304. package/src/renderer/components/CodebaseDashboard.tsx +295 -0
  305. package/src/renderer/components/ComputerUsePanel.tsx +262 -0
  306. package/src/renderer/components/ConnectorsPanel.tsx +471 -0
  307. package/src/renderer/components/ContextMenu.tsx +155 -0
  308. package/src/renderer/components/ContextUsageDisplay.tsx +248 -0
  309. package/src/renderer/components/CoworkPanel.tsx +415 -0
  310. package/src/renderer/components/DiffViewer.tsx +452 -0
  311. package/src/renderer/components/ErrorBoundary.tsx +273 -0
  312. package/src/renderer/components/ExtendedThinkingToggle.tsx +244 -0
  313. package/src/renderer/components/FileAttachments.tsx +247 -0
  314. package/src/renderer/components/FileExplorer.tsx +242 -0
  315. package/src/renderer/components/FileExplorerPanel.tsx +302 -0
  316. package/src/renderer/components/GitPanel.tsx +154 -0
  317. package/src/renderer/components/Header.tsx +113 -0
  318. package/src/renderer/components/MCPPanel.tsx +326 -0
  319. package/src/renderer/components/MentionAutocomplete.tsx +239 -0
  320. package/src/renderer/components/PermissionPanel.tsx +159 -0
  321. package/src/renderer/components/PermissionSelector.tsx +203 -0
  322. package/src/renderer/components/PluginMarketplace.tsx +325 -0
  323. package/src/renderer/components/PromptOptimizerPanel.tsx +399 -0
  324. package/src/renderer/components/SearchPanel.tsx +173 -0
  325. package/src/renderer/components/SearchReplace.tsx +284 -0
  326. package/src/renderer/components/SessionSidebar.tsx +367 -0
  327. package/src/renderer/components/SettingsPanel.tsx +426 -0
  328. package/src/renderer/components/Sidebar.tsx +100 -0
  329. package/src/renderer/components/SkillsPanel.tsx +245 -0
  330. package/src/renderer/components/SplitPane.tsx +173 -0
  331. package/src/renderer/components/Terminal.tsx +190 -0
  332. package/src/renderer/components/VoiceCommand.tsx +129 -0
  333. package/src/renderer/components/WorktreePanel.tsx +163 -0
  334. package/src/renderer/components/ui/AriaComponents.tsx +193 -0
  335. package/src/renderer/components/ui/Button.tsx +68 -0
  336. package/src/renderer/components/ui/Card.tsx +102 -0
  337. package/src/renderer/components/ui/Input.tsx +44 -0
  338. package/src/renderer/components/ui/Skeleton.tsx +55 -0
  339. package/src/renderer/components/ui/VirtualList.tsx +196 -0
  340. package/src/renderer/i18n/I18nProvider.tsx +101 -0
  341. package/src/renderer/i18n/de.ts +161 -0
  342. package/src/renderer/i18n/en.ts +163 -0
  343. package/src/renderer/i18n/es.ts +161 -0
  344. package/src/renderer/i18n/fr.ts +161 -0
  345. package/src/renderer/i18n/index.ts +44 -0
  346. package/src/renderer/index.css +129 -0
  347. package/src/renderer/lib/accessibility.tsx +287 -0
  348. package/src/renderer/lib/hooks.ts +304 -0
  349. package/src/renderer/lib/utils.ts +6 -0
  350. package/src/renderer/main.tsx +25 -0
  351. package/src/renderer/styles/minimalist.css +539 -0
  352. package/src/renderer/sw.ts +180 -0
  353. package/src/renderer/types.d.ts +138 -0
  354. package/src/shared/types.ts +813 -0
  355. package/supabase/schema.sql +234 -0
  356. package/tailwind.config.js +78 -0
  357. package/tests/e2e/package.json +15 -0
  358. package/tests/e2e/playwright.config.ts +31 -0
  359. package/tests/e2e/specs/app.spec.ts +194 -0
  360. package/tests/setup.ts +99 -0
  361. package/tests/unit/AgentOrchestrator.test.ts +274 -0
  362. package/tests/unit/DatabaseManager.test.ts +262 -0
  363. package/tests/unit/GitWorktreeManager.test.ts +150 -0
  364. package/tests/unit/SecurityManager.test.ts +110 -0
  365. package/tsconfig.main.json +22 -0
  366. package/tsconfig.renderer.json +27 -0
  367. package/vite.config.ts +28 -0
@@ -0,0 +1,304 @@
1
+ function zf(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(r,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function _f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uu={exports:{}},to={},Bu={exports:{}},Q={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ur=Symbol.for("react.element"),Ff=Symbol.for("react.portal"),Df=Symbol.for("react.fragment"),Wf=Symbol.for("react.strict_mode"),$f=Symbol.for("react.profiler"),Uf=Symbol.for("react.provider"),Bf=Symbol.for("react.context"),Vf=Symbol.for("react.forward_ref"),Hf=Symbol.for("react.suspense"),Qf=Symbol.for("react.memo"),Gf=Symbol.for("react.lazy"),oa=Symbol.iterator;function Yf(e){return e===null||typeof e!="object"?null:(e=oa&&e[oa]||e["@@iterator"],typeof e=="function"?e:null)}var Vu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Hu=Object.assign,Qu={};function Wn(e,t,n){this.props=e,this.context=t,this.refs=Qu,this.updater=n||Vu}Wn.prototype.isReactComponent={};Wn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};Wn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gu(){}Gu.prototype=Wn.prototype;function ri(e,t,n){this.props=e,this.context=t,this.refs=Qu,this.updater=n||Vu}var li=ri.prototype=new Gu;li.constructor=ri;Hu(li,Wn.prototype);li.isPureReactComponent=!0;var sa=Array.isArray,Yu=Object.prototype.hasOwnProperty,oi={current:null},Ku={key:!0,ref:!0,__self:!0,__source:!0};function qu(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Yu.call(t,r)&&!Ku.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var u=Array(a),f=0;f<a;f++)u[f]=arguments[f+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)l[r]===void 0&&(l[r]=a[r]);return{$$typeof:Ur,type:e,key:o,ref:i,props:l,_owner:oi.current}}function Kf(e,t){return{$$typeof:Ur,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function si(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ur}function qf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ia=/\/+/g;function No(e,t){return typeof e=="object"&&e!==null&&e.key!=null?qf(""+e.key):t.toString(36)}function pl(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ur:case Ff:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+No(i,0):r,sa(l)?(n="",e!=null&&(n=e.replace(ia,"$&/")+"/"),pl(l,t,n,"",function(f){return f})):l!=null&&(si(l)&&(l=Kf(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(ia,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",sa(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+No(o,a);i+=pl(o,t,n,u,l)}else if(u=Yf(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+No(o,a++),i+=pl(o,t,n,u,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Kr(e,t,n){if(e==null)return e;var r=[],l=0;return pl(e,r,"","",function(o){return t.call(n,o,l++)}),r}function Xf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ee={current:null},hl={transition:null},Zf={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:hl,ReactCurrentOwner:oi};function Xu(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:Kr,forEach:function(e,t,n){Kr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Kr(e,function(){t++}),t},toArray:function(e){return Kr(e,function(t){return t})||[]},only:function(e){if(!si(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Q.Component=Wn;Q.Fragment=Df;Q.Profiler=$f;Q.PureComponent=ri;Q.StrictMode=Wf;Q.Suspense=Hf;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zf;Q.act=Xu;Q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Hu({},e.props),l=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=oi.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Yu.call(t,u)&&!Ku.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var f=0;f<u;f++)a[f]=arguments[f+2];r.children=a}return{$$typeof:Ur,type:e.type,key:l,ref:o,props:r,_owner:i}};Q.createContext=function(e){return e={$$typeof:Bf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Uf,_context:e},e.Consumer=e};Q.createElement=qu;Q.createFactory=function(e){var t=qu.bind(null,e);return t.type=e,t};Q.createRef=function(){return{current:null}};Q.forwardRef=function(e){return{$$typeof:Vf,render:e}};Q.isValidElement=si;Q.lazy=function(e){return{$$typeof:Gf,_payload:{_status:-1,_result:e},_init:Xf}};Q.memo=function(e,t){return{$$typeof:Qf,type:e,compare:t===void 0?null:t}};Q.startTransition=function(e){var t=hl.transition;hl.transition={};try{e()}finally{hl.transition=t}};Q.unstable_act=Xu;Q.useCallback=function(e,t){return Ee.current.useCallback(e,t)};Q.useContext=function(e){return Ee.current.useContext(e)};Q.useDebugValue=function(){};Q.useDeferredValue=function(e){return Ee.current.useDeferredValue(e)};Q.useEffect=function(e,t){return Ee.current.useEffect(e,t)};Q.useId=function(){return Ee.current.useId()};Q.useImperativeHandle=function(e,t,n){return Ee.current.useImperativeHandle(e,t,n)};Q.useInsertionEffect=function(e,t){return Ee.current.useInsertionEffect(e,t)};Q.useLayoutEffect=function(e,t){return Ee.current.useLayoutEffect(e,t)};Q.useMemo=function(e,t){return Ee.current.useMemo(e,t)};Q.useReducer=function(e,t,n){return Ee.current.useReducer(e,t,n)};Q.useRef=function(e){return Ee.current.useRef(e)};Q.useState=function(e){return Ee.current.useState(e)};Q.useSyncExternalStore=function(e,t,n){return Ee.current.useSyncExternalStore(e,t,n)};Q.useTransition=function(){return Ee.current.useTransition()};Q.version="18.3.1";Bu.exports=Q;var x=Bu.exports;const mt=_f(x),Jf=zf({__proto__:null,default:mt},[x]);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var em=x,tm=Symbol.for("react.element"),nm=Symbol.for("react.fragment"),rm=Object.prototype.hasOwnProperty,lm=em.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,om={key:!0,ref:!0,__self:!0,__source:!0};function Zu(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)rm.call(t,r)&&!om.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:tm,type:e,key:o,ref:i,props:l,_owner:lm.current}}to.Fragment=nm;to.jsx=Zu;to.jsxs=Zu;Uu.exports=to;var s=Uu.exports,rs={},Ju={exports:{}},De={},ec={exports:{}},tc={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(C,W){var U=C.length;C.push(W);e:for(;0<U;){var _=U-1>>>1,B=C[_];if(0<l(B,W))C[_]=W,C[U]=B,U=_;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var W=C[0],U=C.pop();if(U!==W){C[0]=U;e:for(var _=0,B=C.length,ue=B>>>1;_<ue;){var we=2*(_+1)-1,j=C[we],D=we+1,G=C[D];if(0>l(j,U))D<B&&0>l(G,j)?(C[_]=G,C[D]=U,_=D):(C[_]=j,C[we]=U,_=we);else if(D<B&&0>l(G,U))C[_]=G,C[D]=U,_=D;else break e}}return W}function l(C,W){var U=C.sortIndex-W.sortIndex;return U!==0?U:C.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],f=[],p=1,h=null,m=3,k=!1,w=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(C){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=C)r(f),W.sortIndex=W.expirationTime,t(u,W);else break;W=n(f)}}function v(C){if(y=!1,g(C),!w)if(n(u)!==null)w=!0,F(b);else{var W=n(f);W!==null&&K(v,W.startTime-C)}}function b(C,W){w=!1,y&&(y=!1,d(T),T=-1),k=!0;var U=m;try{for(g(W),h=n(u);h!==null&&(!(h.expirationTime>W)||C&&!O());){var _=h.callback;if(typeof _=="function"){h.callback=null,m=h.priorityLevel;var B=_(h.expirationTime<=W);W=e.unstable_now(),typeof B=="function"?h.callback=B:h===n(u)&&r(u),g(W)}else r(u);h=n(u)}if(h!==null)var ue=!0;else{var we=n(f);we!==null&&K(v,we.startTime-W),ue=!1}return ue}finally{h=null,m=U,k=!1}}var N=!1,E=null,T=-1,$=5,M=-1;function O(){return!(e.unstable_now()-M<$)}function L(){if(E!==null){var C=e.unstable_now();M=C;var W=!0;try{W=E(!0,C)}finally{W?I():(N=!1,E=null)}}else N=!1}var I;if(typeof c=="function")I=function(){c(L)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,A=z.port2;z.port1.onmessage=L,I=function(){A.postMessage(null)}}else I=function(){S(L,0)};function F(C){E=C,N||(N=!0,I())}function K(C,W){T=S(function(){C(e.unstable_now())},W)}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(C){C.callback=null},e.unstable_continueExecution=function(){w||k||(w=!0,F(b))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(C){switch(m){case 1:case 2:case 3:var W=3;break;default:W=m}var U=m;m=W;try{return C()}finally{m=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,W){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var U=m;m=C;try{return W()}finally{m=U}},e.unstable_scheduleCallback=function(C,W,U){var _=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?_+U:_):U=_,C){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=U+B,C={id:p++,callback:W,priorityLevel:C,startTime:U,expirationTime:B,sortIndex:-1},U>_?(C.sortIndex=U,t(f,C),n(u)===null&&C===n(f)&&(y?(d(T),T=-1):y=!0,K(v,U-_))):(C.sortIndex=B,t(u,C),w||k||(w=!0,F(b))),C},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(C){var W=m;return function(){var U=m;m=W;try{return C.apply(this,arguments)}finally{m=U}}}})(tc);ec.exports=tc;var sm=ec.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var im=x,Fe=sm;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var nc=new Set,kr={};function an(e,t){Ln(e,t),Ln(e+"Capture",t)}function Ln(e,t){for(kr[e]=t,e=0;e<t.length;e++)nc.add(t[e])}var ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ls=Object.prototype.hasOwnProperty,am=/^[: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]*$/,aa={},ua={};function um(e){return ls.call(ua,e)?!0:ls.call(aa,e)?!1:am.test(e)?ua[e]=!0:(aa[e]=!0,!1)}function cm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function dm(e,t,n,r){if(t===null||typeof t>"u"||cm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pe(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ye[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ye[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ye[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ye[e]=new Pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ye[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ye[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ye[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ye[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ye[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ii=/[\-:]([a-z])/g;function ai(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ii,ai);ye[t]=new Pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ii,ai);ye[t]=new Pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ii,ai);ye[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ye[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ye.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ye[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ui(e,t,n,r){var l=ye.hasOwnProperty(t)?ye[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(dm(t,n,l,r)&&(n=null),r||l===null?um(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var yt=im.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,qr=Symbol.for("react.element"),fn=Symbol.for("react.portal"),mn=Symbol.for("react.fragment"),ci=Symbol.for("react.strict_mode"),os=Symbol.for("react.profiler"),rc=Symbol.for("react.provider"),lc=Symbol.for("react.context"),di=Symbol.for("react.forward_ref"),ss=Symbol.for("react.suspense"),is=Symbol.for("react.suspense_list"),fi=Symbol.for("react.memo"),St=Symbol.for("react.lazy"),oc=Symbol.for("react.offscreen"),ca=Symbol.iterator;function Qn(e){return e===null||typeof e!="object"?null:(e=ca&&e[ca]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Object.assign,So;function lr(e){if(So===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);So=t&&t[1]||""}return`
34
+ `+So+e}var Co=!1;function Eo(e,t){if(!e||Co)return"";Co=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var l=f.stack.split(`
35
+ `),o=r.stack.split(`
36
+ `),i=l.length-1,a=o.length-1;1<=i&&0<=a&&l[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(l[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||l[i]!==o[a]){var u=`
37
+ `+l[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{Co=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lr(e):""}function fm(e){switch(e.tag){case 5:return lr(e.type);case 16:return lr("Lazy");case 13:return lr("Suspense");case 19:return lr("SuspenseList");case 0:case 2:case 15:return e=Eo(e.type,!1),e;case 11:return e=Eo(e.type.render,!1),e;case 1:return e=Eo(e.type,!0),e;default:return""}}function as(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mn:return"Fragment";case fn:return"Portal";case os:return"Profiler";case ci:return"StrictMode";case ss:return"Suspense";case is:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lc:return(e.displayName||"Context")+".Consumer";case rc:return(e._context.displayName||"Context")+".Provider";case di:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fi:return t=e.displayName||null,t!==null?t:as(e.type)||"Memo";case St:t=e._payload,e=e._init;try{return as(e(t))}catch{}}return null}function mm(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return as(t);case 8:return t===ci?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $t(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pm(e){var t=sc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xr(e){e._valueTracker||(e._valueTracker=pm(e))}function ic(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ml(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function us(e,t){var n=t.checked;return ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function da(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$t(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ac(e,t){t=t.checked,t!=null&&ui(e,"checked",t,!1)}function cs(e,t){ac(e,t);var n=$t(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ds(e,t.type,n):t.hasOwnProperty("defaultValue")&&ds(e,t.type,$t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fa(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ds(e,t,n){(t!=="number"||Ml(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var or=Array.isArray;function Cn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$t(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function fs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return ie({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ma(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(P(92));if(or(n)){if(1<n.length)throw Error(P(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$t(n)}}function uc(e,t){var n=$t(t.value),r=$t(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function pa(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function cc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ms(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?cc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zr,dc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Zr=Zr||document.createElement("div"),Zr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function br(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},hm=["Webkit","ms","Moz","O"];Object.keys(cr).forEach(function(e){hm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cr[t]=cr[e]})});function fc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cr.hasOwnProperty(e)&&cr[e]?(""+t).trim():t+"px"}function mc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=fc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var gm=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ps(e,t){if(t){if(gm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function hs(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 gs=null;function mi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vs=null,En=null,Pn=null;function ha(e){if(e=Hr(e)){if(typeof vs!="function")throw Error(P(280));var t=e.stateNode;t&&(t=so(t),vs(e.stateNode,e.type,t))}}function pc(e){En?Pn?Pn.push(e):Pn=[e]:En=e}function hc(){if(En){var e=En,t=Pn;if(Pn=En=null,ha(e),t)for(e=0;e<t.length;e++)ha(t[e])}}function gc(e,t){return e(t)}function vc(){}var Po=!1;function xc(e,t,n){if(Po)return e(t,n);Po=!0;try{return gc(e,t,n)}finally{Po=!1,(En!==null||Pn!==null)&&(vc(),hc())}}function jr(e,t){var n=e.stateNode;if(n===null)return null;var r=so(n);if(r===null)return null;n=r[t];e: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 e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(P(231,t,typeof n));return n}var xs=!1;if(ht)try{var Gn={};Object.defineProperty(Gn,"passive",{get:function(){xs=!0}}),window.addEventListener("test",Gn,Gn),window.removeEventListener("test",Gn,Gn)}catch{xs=!1}function vm(e,t,n,r,l,o,i,a,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(p){this.onError(p)}}var dr=!1,Al=null,Il=!1,ys=null,xm={onError:function(e){dr=!0,Al=e}};function ym(e,t,n,r,l,o,i,a,u){dr=!1,Al=null,vm.apply(xm,arguments)}function wm(e,t,n,r,l,o,i,a,u){if(ym.apply(this,arguments),dr){if(dr){var f=Al;dr=!1,Al=null}else throw Error(P(198));Il||(Il=!0,ys=f)}}function un(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 yc(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 ga(e){if(un(e)!==e)throw Error(P(188))}function km(e){var t=e.alternate;if(!t){if(t=un(e),t===null)throw Error(P(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return ga(l),e;if(o===r)return ga(l),t;o=o.sibling}throw Error(P(188))}if(n.return!==r.return)n=l,r=o;else{for(var i=!1,a=l.child;a;){if(a===n){i=!0,n=l,r=o;break}if(a===r){i=!0,r=l,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=l;break}if(a===r){i=!0,r=o,n=l;break}a=a.sibling}if(!i)throw Error(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function wc(e){return e=km(e),e!==null?kc(e):null}function kc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kc(e);if(t!==null)return t;e=e.sibling}return null}var bc=Fe.unstable_scheduleCallback,va=Fe.unstable_cancelCallback,bm=Fe.unstable_shouldYield,jm=Fe.unstable_requestPaint,ce=Fe.unstable_now,Nm=Fe.unstable_getCurrentPriorityLevel,pi=Fe.unstable_ImmediatePriority,jc=Fe.unstable_UserBlockingPriority,Tl=Fe.unstable_NormalPriority,Sm=Fe.unstable_LowPriority,Nc=Fe.unstable_IdlePriority,no=null,st=null;function Cm(e){if(st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(no,e,void 0,(e.current.flags&128)===128)}catch{}}var Je=Math.clz32?Math.clz32:Mm,Em=Math.log,Pm=Math.LN2;function Mm(e){return e>>>=0,e===0?32:31-(Em(e)/Pm|0)|0}var Jr=64,el=4194304;function sr(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ll(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=sr(a):(o&=i,o!==0&&(r=sr(o)))}else i=n&~l,i!==0?r=sr(i):o!==0&&(r=sr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Je(t),l=1<<n,r|=e[n],t&=~l;return r}function Am(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Im(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Je(o),a=1<<i,u=l[i];u===-1?(!(a&n)||a&r)&&(l[i]=Am(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function ws(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Sc(){var e=Jr;return Jr<<=1,!(Jr&4194240)&&(Jr=64),e}function Mo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Br(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Je(t),e[t]=n}function Tm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Je(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}function hi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var X=0;function Cc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ec,gi,Pc,Mc,Ac,ks=!1,tl=[],Tt=null,Lt=null,Ot=null,Nr=new Map,Sr=new Map,Et=[],Lm="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 submit".split(" ");function xa(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Lt=null;break;case"mouseover":case"mouseout":Ot=null;break;case"pointerover":case"pointerout":Nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sr.delete(t.pointerId)}}function Yn(e,t,n,r,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[l]},t!==null&&(t=Hr(t),t!==null&&gi(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Om(e,t,n,r,l){switch(t){case"focusin":return Tt=Yn(Tt,e,t,n,r,l),!0;case"dragenter":return Lt=Yn(Lt,e,t,n,r,l),!0;case"mouseover":return Ot=Yn(Ot,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return Nr.set(o,Yn(Nr.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,Sr.set(o,Yn(Sr.get(o)||null,e,t,n,r,l)),!0}return!1}function Ic(e){var t=Kt(e.target);if(t!==null){var n=un(t);if(n!==null){if(t=n.tag,t===13){if(t=yc(n),t!==null){e.blockedOn=t,Ac(e.priority,function(){Pc(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 gl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);gs=r,n.target.dispatchEvent(r),gs=null}else return t=Hr(n),t!==null&&gi(t),e.blockedOn=n,!1;t.shift()}return!0}function ya(e,t,n){gl(e)&&n.delete(t)}function Rm(){ks=!1,Tt!==null&&gl(Tt)&&(Tt=null),Lt!==null&&gl(Lt)&&(Lt=null),Ot!==null&&gl(Ot)&&(Ot=null),Nr.forEach(ya),Sr.forEach(ya)}function Kn(e,t){e.blockedOn===t&&(e.blockedOn=null,ks||(ks=!0,Fe.unstable_scheduleCallback(Fe.unstable_NormalPriority,Rm)))}function Cr(e){function t(l){return Kn(l,e)}if(0<tl.length){Kn(tl[0],e);for(var n=1;n<tl.length;n++){var r=tl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Tt!==null&&Kn(Tt,e),Lt!==null&&Kn(Lt,e),Ot!==null&&Kn(Ot,e),Nr.forEach(t),Sr.forEach(t),n=0;n<Et.length;n++)r=Et[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Et.length&&(n=Et[0],n.blockedOn===null);)Ic(n),n.blockedOn===null&&Et.shift()}var Mn=yt.ReactCurrentBatchConfig,Ol=!0;function zm(e,t,n,r){var l=X,o=Mn.transition;Mn.transition=null;try{X=1,vi(e,t,n,r)}finally{X=l,Mn.transition=o}}function _m(e,t,n,r){var l=X,o=Mn.transition;Mn.transition=null;try{X=4,vi(e,t,n,r)}finally{X=l,Mn.transition=o}}function vi(e,t,n,r){if(Ol){var l=bs(e,t,n,r);if(l===null)Do(e,t,r,Rl,n),xa(e,r);else if(Om(l,e,t,n,r))r.stopPropagation();else if(xa(e,r),t&4&&-1<Lm.indexOf(e)){for(;l!==null;){var o=Hr(l);if(o!==null&&Ec(o),o=bs(e,t,n,r),o===null&&Do(e,t,r,Rl,n),o===l)break;l=o}l!==null&&r.stopPropagation()}else Do(e,t,r,null,n)}}var Rl=null;function bs(e,t,n,r){if(Rl=null,e=mi(r),e=Kt(e),e!==null)if(t=un(e),t===null)e=null;else if(n=t.tag,n===13){if(e=yc(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 Rl=e,null}function Tc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Nm()){case pi:return 1;case jc:return 4;case Tl:case Sm:return 16;case Nc:return 536870912;default:return 16}default:return 16}}var Mt=null,xi=null,vl=null;function Lc(){if(vl)return vl;var e,t=xi,n=t.length,r,l="value"in Mt?Mt.value:Mt.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===l[o-r];r++);return vl=l.slice(e,1<r?1-r:void 0)}function xl(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 nl(){return!0}function wa(){return!1}function We(e){function t(n,r,l,o,i){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?nl:wa,this.isPropagationStopped=wa,this}return ie(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=nl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=nl)},persist:function(){},isPersistent:nl}),t}var $n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yi=We($n),Vr=ie({},$n,{view:0,detail:0}),Fm=We(Vr),Ao,Io,qn,ro=ie({},Vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wi,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!==qn&&(qn&&e.type==="mousemove"?(Ao=e.screenX-qn.screenX,Io=e.screenY-qn.screenY):Io=Ao=0,qn=e),Ao)},movementY:function(e){return"movementY"in e?e.movementY:Io}}),ka=We(ro),Dm=ie({},ro,{dataTransfer:0}),Wm=We(Dm),$m=ie({},Vr,{relatedTarget:0}),To=We($m),Um=ie({},$n,{animationName:0,elapsedTime:0,pseudoElement:0}),Bm=We(Um),Vm=ie({},$n,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Hm=We(Vm),Qm=ie({},$n,{data:0}),ba=We(Qm),Gm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ym={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"},Km={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Km[e])?!!t[e]:!1}function wi(){return qm}var Xm=ie({},Vr,{key:function(e){if(e.key){var t=Gm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ym[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wi,charCode:function(e){return e.type==="keypress"?xl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zm=We(Xm),Jm=ie({},ro,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ja=We(Jm),ep=ie({},Vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wi}),tp=We(ep),np=ie({},$n,{propertyName:0,elapsedTime:0,pseudoElement:0}),rp=We(np),lp=ie({},ro,{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}),op=We(lp),sp=[9,13,27,32],ki=ht&&"CompositionEvent"in window,fr=null;ht&&"documentMode"in document&&(fr=document.documentMode);var ip=ht&&"TextEvent"in window&&!fr,Oc=ht&&(!ki||fr&&8<fr&&11>=fr),Na=" ",Sa=!1;function Rc(e,t){switch(e){case"keyup":return sp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pn=!1;function ap(e,t){switch(e){case"compositionend":return zc(t);case"keypress":return t.which!==32?null:(Sa=!0,Na);case"textInput":return e=t.data,e===Na&&Sa?null:e;default:return null}}function up(e,t){if(pn)return e==="compositionend"||!ki&&Rc(e,t)?(e=Lc(),vl=xi=Mt=null,pn=!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 Oc&&t.locale!=="ko"?null:t.data;default:return null}}var cp={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 Ca(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cp[e.type]:t==="textarea"}function _c(e,t,n,r){pc(r),t=zl(t,"onChange"),0<t.length&&(n=new yi("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var mr=null,Er=null;function dp(e){Yc(e,0)}function lo(e){var t=vn(e);if(ic(t))return e}function fp(e,t){if(e==="change")return t}var Fc=!1;if(ht){var Lo;if(ht){var Oo="oninput"in document;if(!Oo){var Ea=document.createElement("div");Ea.setAttribute("oninput","return;"),Oo=typeof Ea.oninput=="function"}Lo=Oo}else Lo=!1;Fc=Lo&&(!document.documentMode||9<document.documentMode)}function Pa(){mr&&(mr.detachEvent("onpropertychange",Dc),Er=mr=null)}function Dc(e){if(e.propertyName==="value"&&lo(Er)){var t=[];_c(t,Er,e,mi(e)),xc(dp,t)}}function mp(e,t,n){e==="focusin"?(Pa(),mr=t,Er=n,mr.attachEvent("onpropertychange",Dc)):e==="focusout"&&Pa()}function pp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lo(Er)}function hp(e,t){if(e==="click")return lo(t)}function gp(e,t){if(e==="input"||e==="change")return lo(t)}function vp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tt=typeof Object.is=="function"?Object.is:vp;function Pr(e,t){if(tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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 l=n[r];if(!ls.call(t,l)||!tt(e[l],t[l]))return!1}return!0}function Ma(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Aa(e,t){var n=Ma(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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ma(n)}}function Wc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $c(){for(var e=window,t=Ml();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ml(e.document)}return t}function bi(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")}function xp(e){var t=$c(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Wc(n.ownerDocument.documentElement,n)){if(r!==null&&bi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Aa(n,o);var i=Aa(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var yp=ht&&"documentMode"in document&&11>=document.documentMode,hn=null,js=null,pr=null,Ns=!1;function Ia(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ns||hn==null||hn!==Ml(r)||(r=hn,"selectionStart"in r&&bi(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}),pr&&Pr(pr,r)||(pr=r,r=zl(js,"onSelect"),0<r.length&&(t=new yi("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hn)))}function rl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var gn={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionend:rl("Transition","TransitionEnd")},Ro={},Uc={};ht&&(Uc=document.createElement("div").style,"AnimationEvent"in window||(delete gn.animationend.animation,delete gn.animationiteration.animation,delete gn.animationstart.animation),"TransitionEvent"in window||delete gn.transitionend.transition);function oo(e){if(Ro[e])return Ro[e];if(!gn[e])return e;var t=gn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Uc)return Ro[e]=t[n];return e}var Bc=oo("animationend"),Vc=oo("animationiteration"),Hc=oo("animationstart"),Qc=oo("transitionend"),Gc=new Map,Ta="abort auxClick 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(" ");function Bt(e,t){Gc.set(e,t),an(t,[e])}for(var zo=0;zo<Ta.length;zo++){var _o=Ta[zo],wp=_o.toLowerCase(),kp=_o[0].toUpperCase()+_o.slice(1);Bt(wp,"on"+kp)}Bt(Bc,"onAnimationEnd");Bt(Vc,"onAnimationIteration");Bt(Hc,"onAnimationStart");Bt("dblclick","onDoubleClick");Bt("focusin","onFocus");Bt("focusout","onBlur");Bt(Qc,"onTransitionEnd");Ln("onMouseEnter",["mouseout","mouseover"]);Ln("onMouseLeave",["mouseout","mouseover"]);Ln("onPointerEnter",["pointerout","pointerover"]);Ln("onPointerLeave",["pointerout","pointerover"]);an("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));an("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));an("onBeforeInput",["compositionend","keypress","textInput","paste"]);an("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));an("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));an("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ir="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(" "),bp=new Set("cancel close invalid load scroll toggle".split(" ").concat(ir));function La(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,wm(r,t,void 0,e),e.currentTarget=null}function Yc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],u=a.instance,f=a.currentTarget;if(a=a.listener,u!==o&&l.isPropagationStopped())break e;La(l,a,f),o=u}else for(i=0;i<r.length;i++){if(a=r[i],u=a.instance,f=a.currentTarget,a=a.listener,u!==o&&l.isPropagationStopped())break e;La(l,a,f),o=u}}}if(Il)throw e=ys,Il=!1,ys=null,e}function ne(e,t){var n=t[Ms];n===void 0&&(n=t[Ms]=new Set);var r=e+"__bubble";n.has(r)||(Kc(t,e,2,!1),n.add(r))}function Fo(e,t,n){var r=0;t&&(r|=4),Kc(n,e,r,t)}var ll="_reactListening"+Math.random().toString(36).slice(2);function Mr(e){if(!e[ll]){e[ll]=!0,nc.forEach(function(n){n!=="selectionchange"&&(bp.has(n)||Fo(n,!1,e),Fo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ll]||(t[ll]=!0,Fo("selectionchange",!1,t))}}function Kc(e,t,n,r){switch(Tc(t)){case 1:var l=zm;break;case 4:l=_m;break;default:l=vi}n=l.bind(null,t,n,e),l=void 0,!xs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Do(e,t,n,r,l){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===l||a.nodeType===8&&a.parentNode===l)break;if(i===4)for(i=r.return;i!==null;){var u=i.tag;if((u===3||u===4)&&(u=i.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;i=i.return}for(;a!==null;){if(i=Kt(a),i===null)return;if(u=i.tag,u===5||u===6){r=o=i;continue e}a=a.parentNode}}r=r.return}xc(function(){var f=o,p=mi(n),h=[];e:{var m=Gc.get(e);if(m!==void 0){var k=yi,w=e;switch(e){case"keypress":if(xl(n)===0)break e;case"keydown":case"keyup":k=Zm;break;case"focusin":w="focus",k=To;break;case"focusout":w="blur",k=To;break;case"beforeblur":case"afterblur":k=To;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":k=ka;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Wm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=tp;break;case Bc:case Vc:case Hc:k=Bm;break;case Qc:k=rp;break;case"scroll":k=Fm;break;case"wheel":k=op;break;case"copy":case"cut":case"paste":k=Hm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=ja}var y=(t&4)!==0,S=!y&&e==="scroll",d=y?m!==null?m+"Capture":null:m;y=[];for(var c=f,g;c!==null;){g=c;var v=g.stateNode;if(g.tag===5&&v!==null&&(g=v,d!==null&&(v=jr(c,d),v!=null&&y.push(Ar(c,v,g)))),S)break;c=c.return}0<y.length&&(m=new k(m,w,null,n,p),h.push({event:m,listeners:y}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",m&&n!==gs&&(w=n.relatedTarget||n.fromElement)&&(Kt(w)||w[gt]))break e;if((k||m)&&(m=p.window===p?p:(m=p.ownerDocument)?m.defaultView||m.parentWindow:window,k?(w=n.relatedTarget||n.toElement,k=f,w=w?Kt(w):null,w!==null&&(S=un(w),w!==S||w.tag!==5&&w.tag!==6)&&(w=null)):(k=null,w=f),k!==w)){if(y=ka,v="onMouseLeave",d="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(y=ja,v="onPointerLeave",d="onPointerEnter",c="pointer"),S=k==null?m:vn(k),g=w==null?m:vn(w),m=new y(v,c+"leave",k,n,p),m.target=S,m.relatedTarget=g,v=null,Kt(p)===f&&(y=new y(d,c+"enter",w,n,p),y.target=g,y.relatedTarget=S,v=y),S=v,k&&w)t:{for(y=k,d=w,c=0,g=y;g;g=cn(g))c++;for(g=0,v=d;v;v=cn(v))g++;for(;0<c-g;)y=cn(y),c--;for(;0<g-c;)d=cn(d),g--;for(;c--;){if(y===d||d!==null&&y===d.alternate)break t;y=cn(y),d=cn(d)}y=null}else y=null;k!==null&&Oa(h,m,k,y,!1),w!==null&&S!==null&&Oa(h,S,w,y,!0)}}e:{if(m=f?vn(f):window,k=m.nodeName&&m.nodeName.toLowerCase(),k==="select"||k==="input"&&m.type==="file")var b=fp;else if(Ca(m))if(Fc)b=gp;else{b=pp;var N=mp}else(k=m.nodeName)&&k.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(b=hp);if(b&&(b=b(e,f))){_c(h,b,n,p);break e}N&&N(e,m,f),e==="focusout"&&(N=m._wrapperState)&&N.controlled&&m.type==="number"&&ds(m,"number",m.value)}switch(N=f?vn(f):window,e){case"focusin":(Ca(N)||N.contentEditable==="true")&&(hn=N,js=f,pr=null);break;case"focusout":pr=js=hn=null;break;case"mousedown":Ns=!0;break;case"contextmenu":case"mouseup":case"dragend":Ns=!1,Ia(h,n,p);break;case"selectionchange":if(yp)break;case"keydown":case"keyup":Ia(h,n,p)}var E;if(ki)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else pn?Rc(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Oc&&n.locale!=="ko"&&(pn||T!=="onCompositionStart"?T==="onCompositionEnd"&&pn&&(E=Lc()):(Mt=p,xi="value"in Mt?Mt.value:Mt.textContent,pn=!0)),N=zl(f,T),0<N.length&&(T=new ba(T,e,null,n,p),h.push({event:T,listeners:N}),E?T.data=E:(E=zc(n),E!==null&&(T.data=E)))),(E=ip?ap(e,n):up(e,n))&&(f=zl(f,"onBeforeInput"),0<f.length&&(p=new ba("onBeforeInput","beforeinput",null,n,p),h.push({event:p,listeners:f}),p.data=E))}Yc(h,t)})}function Ar(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zl(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,o=l.stateNode;l.tag===5&&o!==null&&(l=o,o=jr(e,n),o!=null&&r.unshift(Ar(e,o,l)),o=jr(e,t),o!=null&&r.push(Ar(e,o,l))),e=e.return}return r}function cn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Oa(e,t,n,r,l){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,u=a.alternate,f=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&f!==null&&(a=f,l?(u=jr(n,o),u!=null&&i.unshift(Ar(n,u,a))):l||(u=jr(n,o),u!=null&&i.push(Ar(n,u,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var jp=/\r\n?/g,Np=/\u0000|\uFFFD/g;function Ra(e){return(typeof e=="string"?e:""+e).replace(jp,`
38
+ `).replace(Np,"")}function ol(e,t,n){if(t=Ra(t),Ra(e)!==t&&n)throw Error(P(425))}function _l(){}var Ss=null,Cs=null;function Es(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ps=typeof setTimeout=="function"?setTimeout:void 0,Sp=typeof clearTimeout=="function"?clearTimeout:void 0,za=typeof Promise=="function"?Promise:void 0,Cp=typeof queueMicrotask=="function"?queueMicrotask:typeof za<"u"?function(e){return za.resolve(null).then(e).catch(Ep)}:Ps;function Ep(e){setTimeout(function(){throw e})}function Wo(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Cr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Cr(t)}function Rt(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==="$?")break;if(t==="/$")return null}}return e}function _a(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Un=Math.random().toString(36).slice(2),ot="__reactFiber$"+Un,Ir="__reactProps$"+Un,gt="__reactContainer$"+Un,Ms="__reactEvents$"+Un,Pp="__reactListeners$"+Un,Mp="__reactHandles$"+Un;function Kt(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_a(e);e!==null;){if(n=e[ot])return n;e=_a(e)}return t}e=n,n=e.parentNode}return null}function Hr(e){return e=e[ot]||e[gt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function vn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function so(e){return e[Ir]||null}var As=[],xn=-1;function Vt(e){return{current:e}}function re(e){0>xn||(e.current=As[xn],As[xn]=null,xn--)}function J(e,t){xn++,As[xn]=e.current,e.current=t}var Ut={},Ne=Vt(Ut),Ie=Vt(!1),tn=Ut;function On(e,t){var n=e.type.contextTypes;if(!n)return Ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Te(e){return e=e.childContextTypes,e!=null}function Fl(){re(Ie),re(Ne)}function Fa(e,t,n){if(Ne.current!==Ut)throw Error(P(168));J(Ne,t),J(Ie,n)}function qc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(P(108,mm(e)||"Unknown",l));return ie({},n,r)}function Dl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,tn=Ne.current,J(Ne,e),J(Ie,Ie.current),!0}function Da(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=qc(e,t,tn),r.__reactInternalMemoizedMergedChildContext=e,re(Ie),re(Ne),J(Ne,e)):re(Ie),J(Ie,n)}var ct=null,io=!1,$o=!1;function Xc(e){ct===null?ct=[e]:ct.push(e)}function Ap(e){io=!0,Xc(e)}function Ht(){if(!$o&&ct!==null){$o=!0;var e=0,t=X;try{var n=ct;for(X=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ct=null,io=!1}catch(l){throw ct!==null&&(ct=ct.slice(e+1)),bc(pi,Ht),l}finally{X=t,$o=!1}}return null}var yn=[],wn=0,Wl=null,$l=0,$e=[],Ue=0,nn=null,dt=1,ft="";function Qt(e,t){yn[wn++]=$l,yn[wn++]=Wl,Wl=e,$l=t}function Zc(e,t,n){$e[Ue++]=dt,$e[Ue++]=ft,$e[Ue++]=nn,nn=e;var r=dt;e=ft;var l=32-Je(r)-1;r&=~(1<<l),n+=1;var o=32-Je(t)+l;if(30<o){var i=l-l%5;o=(r&(1<<i)-1).toString(32),r>>=i,l-=i,dt=1<<32-Je(t)+l|n<<l|r,ft=o+e}else dt=1<<o|n<<l|r,ft=e}function ji(e){e.return!==null&&(Qt(e,1),Zc(e,1,0))}function Ni(e){for(;e===Wl;)Wl=yn[--wn],yn[wn]=null,$l=yn[--wn],yn[wn]=null;for(;e===nn;)nn=$e[--Ue],$e[Ue]=null,ft=$e[--Ue],$e[Ue]=null,dt=$e[--Ue],$e[Ue]=null}var _e=null,ze=null,le=!1,Ze=null;function Jc(e,t){var n=Be(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Wa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_e=e,ze=Rt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_e=e,ze=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=nn!==null?{id:dt,overflow:ft}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Be(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_e=e,ze=null,!0):!1;default:return!1}}function Is(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ts(e){if(le){var t=ze;if(t){var n=t;if(!Wa(e,t)){if(Is(e))throw Error(P(418));t=Rt(n.nextSibling);var r=_e;t&&Wa(e,t)?Jc(r,n):(e.flags=e.flags&-4097|2,le=!1,_e=e)}}else{if(Is(e))throw Error(P(418));e.flags=e.flags&-4097|2,le=!1,_e=e}}}function $a(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_e=e}function sl(e){if(e!==_e)return!1;if(!le)return $a(e),le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Es(e.type,e.memoizedProps)),t&&(t=ze)){if(Is(e))throw ed(),Error(P(418));for(;t;)Jc(e,t),t=Rt(t.nextSibling)}if($a(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ze=Rt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ze=null}}else ze=_e?Rt(e.stateNode.nextSibling):null;return!0}function ed(){for(var e=ze;e;)e=Rt(e.nextSibling)}function Rn(){ze=_e=null,le=!1}function Si(e){Ze===null?Ze=[e]:Ze.push(e)}var Ip=yt.ReactCurrentBatchConfig;function Xn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(P(309));var r=n.stateNode}if(!r)throw Error(P(147,e));var l=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=l.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,e))}return e}function il(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ua(e){var t=e._init;return t(e._payload)}function td(e){function t(d,c){if(e){var g=d.deletions;g===null?(d.deletions=[c],d.flags|=16):g.push(c)}}function n(d,c){if(!e)return null;for(;c!==null;)t(d,c),c=c.sibling;return null}function r(d,c){for(d=new Map;c!==null;)c.key!==null?d.set(c.key,c):d.set(c.index,c),c=c.sibling;return d}function l(d,c){return d=Dt(d,c),d.index=0,d.sibling=null,d}function o(d,c,g){return d.index=g,e?(g=d.alternate,g!==null?(g=g.index,g<c?(d.flags|=2,c):g):(d.flags|=2,c)):(d.flags|=1048576,c)}function i(d){return e&&d.alternate===null&&(d.flags|=2),d}function a(d,c,g,v){return c===null||c.tag!==6?(c=Yo(g,d.mode,v),c.return=d,c):(c=l(c,g),c.return=d,c)}function u(d,c,g,v){var b=g.type;return b===mn?p(d,c,g.props.children,v,g.key):c!==null&&(c.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===St&&Ua(b)===c.type)?(v=l(c,g.props),v.ref=Xn(d,c,g),v.return=d,v):(v=Sl(g.type,g.key,g.props,null,d.mode,v),v.ref=Xn(d,c,g),v.return=d,v)}function f(d,c,g,v){return c===null||c.tag!==4||c.stateNode.containerInfo!==g.containerInfo||c.stateNode.implementation!==g.implementation?(c=Ko(g,d.mode,v),c.return=d,c):(c=l(c,g.children||[]),c.return=d,c)}function p(d,c,g,v,b){return c===null||c.tag!==7?(c=Jt(g,d.mode,v,b),c.return=d,c):(c=l(c,g),c.return=d,c)}function h(d,c,g){if(typeof c=="string"&&c!==""||typeof c=="number")return c=Yo(""+c,d.mode,g),c.return=d,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case qr:return g=Sl(c.type,c.key,c.props,null,d.mode,g),g.ref=Xn(d,null,c),g.return=d,g;case fn:return c=Ko(c,d.mode,g),c.return=d,c;case St:var v=c._init;return h(d,v(c._payload),g)}if(or(c)||Qn(c))return c=Jt(c,d.mode,g,null),c.return=d,c;il(d,c)}return null}function m(d,c,g,v){var b=c!==null?c.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return b!==null?null:a(d,c,""+g,v);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case qr:return g.key===b?u(d,c,g,v):null;case fn:return g.key===b?f(d,c,g,v):null;case St:return b=g._init,m(d,c,b(g._payload),v)}if(or(g)||Qn(g))return b!==null?null:p(d,c,g,v,null);il(d,g)}return null}function k(d,c,g,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return d=d.get(g)||null,a(c,d,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case qr:return d=d.get(v.key===null?g:v.key)||null,u(c,d,v,b);case fn:return d=d.get(v.key===null?g:v.key)||null,f(c,d,v,b);case St:var N=v._init;return k(d,c,g,N(v._payload),b)}if(or(v)||Qn(v))return d=d.get(g)||null,p(c,d,v,b,null);il(c,v)}return null}function w(d,c,g,v){for(var b=null,N=null,E=c,T=c=0,$=null;E!==null&&T<g.length;T++){E.index>T?($=E,E=null):$=E.sibling;var M=m(d,E,g[T],v);if(M===null){E===null&&(E=$);break}e&&E&&M.alternate===null&&t(d,E),c=o(M,c,T),N===null?b=M:N.sibling=M,N=M,E=$}if(T===g.length)return n(d,E),le&&Qt(d,T),b;if(E===null){for(;T<g.length;T++)E=h(d,g[T],v),E!==null&&(c=o(E,c,T),N===null?b=E:N.sibling=E,N=E);return le&&Qt(d,T),b}for(E=r(d,E);T<g.length;T++)$=k(E,d,T,g[T],v),$!==null&&(e&&$.alternate!==null&&E.delete($.key===null?T:$.key),c=o($,c,T),N===null?b=$:N.sibling=$,N=$);return e&&E.forEach(function(O){return t(d,O)}),le&&Qt(d,T),b}function y(d,c,g,v){var b=Qn(g);if(typeof b!="function")throw Error(P(150));if(g=b.call(g),g==null)throw Error(P(151));for(var N=b=null,E=c,T=c=0,$=null,M=g.next();E!==null&&!M.done;T++,M=g.next()){E.index>T?($=E,E=null):$=E.sibling;var O=m(d,E,M.value,v);if(O===null){E===null&&(E=$);break}e&&E&&O.alternate===null&&t(d,E),c=o(O,c,T),N===null?b=O:N.sibling=O,N=O,E=$}if(M.done)return n(d,E),le&&Qt(d,T),b;if(E===null){for(;!M.done;T++,M=g.next())M=h(d,M.value,v),M!==null&&(c=o(M,c,T),N===null?b=M:N.sibling=M,N=M);return le&&Qt(d,T),b}for(E=r(d,E);!M.done;T++,M=g.next())M=k(E,d,T,M.value,v),M!==null&&(e&&M.alternate!==null&&E.delete(M.key===null?T:M.key),c=o(M,c,T),N===null?b=M:N.sibling=M,N=M);return e&&E.forEach(function(L){return t(d,L)}),le&&Qt(d,T),b}function S(d,c,g,v){if(typeof g=="object"&&g!==null&&g.type===mn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case qr:e:{for(var b=g.key,N=c;N!==null;){if(N.key===b){if(b=g.type,b===mn){if(N.tag===7){n(d,N.sibling),c=l(N,g.props.children),c.return=d,d=c;break e}}else if(N.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===St&&Ua(b)===N.type){n(d,N.sibling),c=l(N,g.props),c.ref=Xn(d,N,g),c.return=d,d=c;break e}n(d,N);break}else t(d,N);N=N.sibling}g.type===mn?(c=Jt(g.props.children,d.mode,v,g.key),c.return=d,d=c):(v=Sl(g.type,g.key,g.props,null,d.mode,v),v.ref=Xn(d,c,g),v.return=d,d=v)}return i(d);case fn:e:{for(N=g.key;c!==null;){if(c.key===N)if(c.tag===4&&c.stateNode.containerInfo===g.containerInfo&&c.stateNode.implementation===g.implementation){n(d,c.sibling),c=l(c,g.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=Ko(g,d.mode,v),c.return=d,d=c}return i(d);case St:return N=g._init,S(d,c,N(g._payload),v)}if(or(g))return w(d,c,g,v);if(Qn(g))return y(d,c,g,v);il(d,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,c!==null&&c.tag===6?(n(d,c.sibling),c=l(c,g),c.return=d,d=c):(n(d,c),c=Yo(g,d.mode,v),c.return=d,d=c),i(d)):n(d,c)}return S}var zn=td(!0),nd=td(!1),Ul=Vt(null),Bl=null,kn=null,Ci=null;function Ei(){Ci=kn=Bl=null}function Pi(e){var t=Ul.current;re(Ul),e._currentValue=t}function Ls(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function An(e,t){Bl=e,Ci=kn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ae=!0),e.firstContext=null)}function He(e){var t=e._currentValue;if(Ci!==e)if(e={context:e,memoizedValue:t,next:null},kn===null){if(Bl===null)throw Error(P(308));kn=e,Bl.dependencies={lanes:0,firstContext:e}}else kn=kn.next=e;return t}var qt=null;function Mi(e){qt===null?qt=[e]:qt.push(e)}function rd(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Mi(t)):(n.next=l.next,l.next=n),t.interleaved=n,vt(e,r)}function vt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ct=!1;function Ai(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ld(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,vt(e,n)}return l=r.interleaved,l===null?(t.next=t,Mi(r)):(t.next=l.next,l.next=t),r.interleaved=t,vt(e,n)}function yl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hi(e,n)}}function Ba(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Vl(e,t,n,r){var l=e.updateQueue;Ct=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,f=u.next;u.next=null,i===null?o=f:i.next=f,i=u;var p=e.alternate;p!==null&&(p=p.updateQueue,a=p.lastBaseUpdate,a!==i&&(a===null?p.firstBaseUpdate=f:a.next=f,p.lastBaseUpdate=u))}if(o!==null){var h=l.baseState;i=0,p=f=u=null,a=o;do{var m=a.lane,k=a.eventTime;if((r&m)===m){p!==null&&(p=p.next={eventTime:k,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(m=t,k=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){h=w.call(k,h,m);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,m=typeof w=="function"?w.call(k,h,m):w,m==null)break e;h=ie({},h,m);break e;case 2:Ct=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[a]:m.push(a))}else k={eventTime:k,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},p===null?(f=p=k,u=h):p=p.next=k,i|=m;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;m=a,a=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(p===null&&(u=h),l.baseState=u,l.firstBaseUpdate=f,l.lastBaseUpdate=p,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);ln|=i,e.lanes=i,e.memoizedState=h}}function Va(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(P(191,l));l.call(r)}}}var Qr={},it=Vt(Qr),Tr=Vt(Qr),Lr=Vt(Qr);function Xt(e){if(e===Qr)throw Error(P(174));return e}function Ii(e,t){switch(J(Lr,t),J(Tr,e),J(it,Qr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ms(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ms(t,e)}re(it),J(it,t)}function _n(){re(it),re(Tr),re(Lr)}function od(e){Xt(Lr.current);var t=Xt(it.current),n=ms(t,e.type);t!==n&&(J(Tr,e),J(it,n))}function Ti(e){Tr.current===e&&(re(it),re(Tr))}var oe=Vt(0);function Hl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 Uo=[];function Li(){for(var e=0;e<Uo.length;e++)Uo[e]._workInProgressVersionPrimary=null;Uo.length=0}var wl=yt.ReactCurrentDispatcher,Bo=yt.ReactCurrentBatchConfig,rn=0,se=null,fe=null,he=null,Ql=!1,hr=!1,Or=0,Tp=0;function ke(){throw Error(P(321))}function Oi(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tt(e[n],t[n]))return!1;return!0}function Ri(e,t,n,r,l,o){if(rn=o,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,wl.current=e===null||e.memoizedState===null?zp:_p,e=n(r,l),hr){o=0;do{if(hr=!1,Or=0,25<=o)throw Error(P(301));o+=1,he=fe=null,t.updateQueue=null,wl.current=Fp,e=n(r,l)}while(hr)}if(wl.current=Gl,t=fe!==null&&fe.next!==null,rn=0,he=fe=se=null,Ql=!1,t)throw Error(P(300));return e}function zi(){var e=Or!==0;return Or=0,e}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return he===null?se.memoizedState=he=e:he=he.next=e,he}function Qe(){if(fe===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=fe.next;var t=he===null?se.memoizedState:he.next;if(t!==null)he=t,fe=e;else{if(e===null)throw Error(P(310));fe=e,e={memoizedState:fe.memoizedState,baseState:fe.baseState,baseQueue:fe.baseQueue,queue:fe.queue,next:null},he===null?se.memoizedState=he=e:he=he.next=e}return he}function Rr(e,t){return typeof t=="function"?t(e):t}function Vo(e){var t=Qe(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=fe,l=r.baseQueue,o=n.pending;if(o!==null){if(l!==null){var i=l.next;l.next=o.next,o.next=i}r.baseQueue=l=o,n.pending=null}if(l!==null){o=l.next,r=r.baseState;var a=i=null,u=null,f=o;do{var p=f.lane;if((rn&p)===p)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var h={lane:p,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(a=u=h,i=r):u=u.next=h,se.lanes|=p,ln|=p}f=f.next}while(f!==null&&f!==o);u===null?i=r:u.next=a,tt(r,t.memoizedState)||(Ae=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do o=l.lane,se.lanes|=o,ln|=o,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ho(e){var t=Qe(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do o=e(o,i.action),i=i.next;while(i!==l);tt(o,t.memoizedState)||(Ae=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function sd(){}function id(e,t){var n=se,r=Qe(),l=t(),o=!tt(r.memoizedState,l);if(o&&(r.memoizedState=l,Ae=!0),r=r.queue,_i(cd.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||he!==null&&he.memoizedState.tag&1){if(n.flags|=2048,zr(9,ud.bind(null,n,r,l,t),void 0,null),ge===null)throw Error(P(349));rn&30||ad(n,t,l)}return l}function ad(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ud(e,t,n,r){t.value=n,t.getSnapshot=r,dd(t)&&fd(e)}function cd(e,t,n){return n(function(){dd(t)&&fd(e)})}function dd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tt(e,n)}catch{return!0}}function fd(e){var t=vt(e,1);t!==null&&et(t,e,1,-1)}function Ha(e){var t=lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rr,lastRenderedState:e},t.queue=e,e=e.dispatch=Rp.bind(null,se,e),[t.memoizedState,e]}function zr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function md(){return Qe().memoizedState}function kl(e,t,n,r){var l=lt();se.flags|=e,l.memoizedState=zr(1|t,n,void 0,r===void 0?null:r)}function ao(e,t,n,r){var l=Qe();r=r===void 0?null:r;var o=void 0;if(fe!==null){var i=fe.memoizedState;if(o=i.destroy,r!==null&&Oi(r,i.deps)){l.memoizedState=zr(t,n,o,r);return}}se.flags|=e,l.memoizedState=zr(1|t,n,o,r)}function Qa(e,t){return kl(8390656,8,e,t)}function _i(e,t){return ao(2048,8,e,t)}function pd(e,t){return ao(4,2,e,t)}function hd(e,t){return ao(4,4,e,t)}function gd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vd(e,t,n){return n=n!=null?n.concat([e]):null,ao(4,4,gd.bind(null,t,e),n)}function Fi(){}function xd(e,t){var n=Qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function yd(e,t){var n=Qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wd(e,t,n){return rn&21?(tt(n,t)||(n=Sc(),se.lanes|=n,ln|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ae=!0),e.memoizedState=n)}function Lp(e,t){var n=X;X=n!==0&&4>n?n:4,e(!0);var r=Bo.transition;Bo.transition={};try{e(!1),t()}finally{X=n,Bo.transition=r}}function kd(){return Qe().memoizedState}function Op(e,t,n){var r=Ft(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bd(e))jd(t,n);else if(n=rd(e,t,n,r),n!==null){var l=Ce();et(n,e,r,l),Nd(n,t,r)}}function Rp(e,t,n){var r=Ft(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bd(e))jd(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,tt(a,i)){var u=t.interleaved;u===null?(l.next=l,Mi(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=rd(e,t,l,r),n!==null&&(l=Ce(),et(n,e,r,l),Nd(n,t,r))}}function bd(e){var t=e.alternate;return e===se||t!==null&&t===se}function jd(e,t){hr=Ql=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Nd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hi(e,n)}}var Gl={readContext:He,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useInsertionEffect:ke,useLayoutEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useMutableSource:ke,useSyncExternalStore:ke,useId:ke,unstable_isNewReconciler:!1},zp={readContext:He,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:He,useEffect:Qa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kl(4194308,4,gd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kl(4194308,4,e,t)},useInsertionEffect:function(e,t){return kl(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Op.bind(null,se,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:Ha,useDebugValue:Fi,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=Ha(!1),t=e[0];return e=Lp.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=se,l=lt();if(le){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),ge===null)throw Error(P(349));rn&30||ad(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Qa(cd.bind(null,r,o,e),[e]),r.flags|=2048,zr(9,ud.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=lt(),t=ge.identifierPrefix;if(le){var n=ft,r=dt;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Or++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Tp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_p={readContext:He,useCallback:xd,useContext:He,useEffect:_i,useImperativeHandle:vd,useInsertionEffect:pd,useLayoutEffect:hd,useMemo:yd,useReducer:Vo,useRef:md,useState:function(){return Vo(Rr)},useDebugValue:Fi,useDeferredValue:function(e){var t=Qe();return wd(t,fe.memoizedState,e)},useTransition:function(){var e=Vo(Rr)[0],t=Qe().memoizedState;return[e,t]},useMutableSource:sd,useSyncExternalStore:id,useId:kd,unstable_isNewReconciler:!1},Fp={readContext:He,useCallback:xd,useContext:He,useEffect:_i,useImperativeHandle:vd,useInsertionEffect:pd,useLayoutEffect:hd,useMemo:yd,useReducer:Ho,useRef:md,useState:function(){return Ho(Rr)},useDebugValue:Fi,useDeferredValue:function(e){var t=Qe();return fe===null?t.memoizedState=e:wd(t,fe.memoizedState,e)},useTransition:function(){var e=Ho(Rr)[0],t=Qe().memoizedState;return[e,t]},useMutableSource:sd,useSyncExternalStore:id,useId:kd,unstable_isNewReconciler:!1};function qe(e,t){if(e&&e.defaultProps){t=ie({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Os(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ie({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uo={isMounted:function(e){return(e=e._reactInternals)?un(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ce(),l=Ft(e),o=pt(r,l);o.payload=t,n!=null&&(o.callback=n),t=zt(e,o,l),t!==null&&(et(t,e,l,r),yl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ce(),l=Ft(e),o=pt(r,l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=zt(e,o,l),t!==null&&(et(t,e,l,r),yl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ce(),r=Ft(e),l=pt(n,r);l.tag=2,t!=null&&(l.callback=t),t=zt(e,l,r),t!==null&&(et(t,e,r,n),yl(t,e,r))}};function Ga(e,t,n,r,l,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!Pr(n,r)||!Pr(l,o):!0}function Sd(e,t,n){var r=!1,l=Ut,o=t.contextType;return typeof o=="object"&&o!==null?o=He(o):(l=Te(t)?tn:Ne.current,r=t.contextTypes,o=(r=r!=null)?On(e,l):Ut),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ya(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&&uo.enqueueReplaceState(t,t.state,null)}function Rs(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Ai(e);var o=t.contextType;typeof o=="object"&&o!==null?l.context=He(o):(o=Te(t)?tn:Ne.current,l.context=On(e,o)),l.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Os(e,t,o,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&uo.enqueueReplaceState(l,l.state,null),Vl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Fn(e,t){try{var n="",r=t;do n+=fm(r),r=r.return;while(r);var l=n}catch(o){l=`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}return{value:e,source:t,stack:l,digest:null}}function Qo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function zs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Dp=typeof WeakMap=="function"?WeakMap:Map;function Cd(e,t,n){n=pt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Kl||(Kl=!0,Qs=r),zs(e,t)},n}function Ed(e,t,n){n=pt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){zs(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){zs(e,t),typeof r!="function"&&(_t===null?_t=new Set([this]):_t.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Ka(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Dp;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Jp.bind(null,e,t,n),t.then(e,e))}function qa(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Xa(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pt(-1,1),t.tag=2,zt(n,t,1))),n.lanes|=1),e)}var Wp=yt.ReactCurrentOwner,Ae=!1;function Se(e,t,n,r){t.child=e===null?nd(t,null,n,r):zn(t,e.child,n,r)}function Za(e,t,n,r,l){n=n.render;var o=t.ref;return An(t,l),r=Ri(e,t,n,r,o,l),n=zi(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,xt(e,t,l)):(le&&n&&ji(t),t.flags|=1,Se(e,t,r,l),t.child)}function Ja(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Qi(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Pd(e,t,o,r,l)):(e=Sl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:Pr,n(i,r)&&e.ref===t.ref)return xt(e,t,l)}return t.flags|=1,e=Dt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Pd(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(Pr(o,r)&&e.ref===t.ref)if(Ae=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(Ae=!0);else return t.lanes=e.lanes,xt(e,t,l)}return _s(e,t,n,r,l)}function Md(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(jn,Oe),Oe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,J(jn,Oe),Oe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,J(jn,Oe),Oe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,J(jn,Oe),Oe|=r;return Se(e,t,l,n),t.child}function Ad(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _s(e,t,n,r,l){var o=Te(n)?tn:Ne.current;return o=On(t,o),An(t,l),n=Ri(e,t,n,r,o,l),r=zi(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,xt(e,t,l)):(le&&r&&ji(t),t.flags|=1,Se(e,t,n,l),t.child)}function eu(e,t,n,r,l){if(Te(n)){var o=!0;Dl(t)}else o=!1;if(An(t,l),t.stateNode===null)bl(e,t),Sd(t,n,r),Rs(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var u=i.context,f=n.contextType;typeof f=="object"&&f!==null?f=He(f):(f=Te(n)?tn:Ne.current,f=On(t,f));var p=n.getDerivedStateFromProps,h=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||u!==f)&&Ya(t,i,r,f),Ct=!1;var m=t.memoizedState;i.state=m,Vl(t,r,i,l),u=t.memoizedState,a!==r||m!==u||Ie.current||Ct?(typeof p=="function"&&(Os(t,n,p,r),u=t.memoizedState),(a=Ct||Ga(t,n,a,r,m,u,f))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=f,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,ld(e,t),a=t.memoizedProps,f=t.type===t.elementType?a:qe(t.type,a),i.props=f,h=t.pendingProps,m=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=He(u):(u=Te(n)?tn:Ne.current,u=On(t,u));var k=n.getDerivedStateFromProps;(p=typeof k=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==h||m!==u)&&Ya(t,i,r,u),Ct=!1,m=t.memoizedState,i.state=m,Vl(t,r,i,l);var w=t.memoizedState;a!==h||m!==w||Ie.current||Ct?(typeof k=="function"&&(Os(t,n,k,r),w=t.memoizedState),(f=Ct||Ga(t,n,f,r,m,w,u)||!1)?(p||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,w,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,w,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),i.props=r,i.state=w,i.context=u,r=f):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Fs(e,t,n,r,o,l)}function Fs(e,t,n,r,l,o){Ad(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&Da(t,n,!1),xt(e,t,o);r=t.stateNode,Wp.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=zn(t,e.child,null,o),t.child=zn(t,null,a,o)):Se(e,t,a,o),t.memoizedState=r.state,l&&Da(t,n,!0),t.child}function Id(e){var t=e.stateNode;t.pendingContext?Fa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Fa(e,t.context,!1),Ii(e,t.containerInfo)}function tu(e,t,n,r,l){return Rn(),Si(l),t.flags|=256,Se(e,t,n,r),t.child}var Ds={dehydrated:null,treeContext:null,retryLane:0};function Ws(e){return{baseLanes:e,cachePool:null,transitions:null}}function Td(e,t,n){var r=t.pendingProps,l=oe.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),J(oe,l&1),e===null)return Ts(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=mo(i,r,0,null),e=Jt(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ws(n),t.memoizedState=Ds,e):Di(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return $p(e,t,i,r,a,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,a=l.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Dt(l,u),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?o=Dt(a,o):(o=Jt(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Ws(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Ds,r}return o=e.child,e=o.sibling,r=Dt(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Di(e,t){return t=mo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function al(e,t,n,r){return r!==null&&Si(r),zn(t,e.child,null,n),e=Di(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $p(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Qo(Error(P(422))),al(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=mo({mode:"visible",children:r.children},l,0,null),o=Jt(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&zn(t,e.child,null,i),t.child.memoizedState=Ws(i),t.memoizedState=Ds,o);if(!(t.mode&1))return al(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(P(419)),r=Qo(o,r,void 0),al(e,t,i,r)}if(a=(i&e.childLanes)!==0,Ae||a){if(r=ge,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,vt(e,l),et(r,e,l,-1))}return Hi(),r=Qo(Error(P(421))),al(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=eh.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,ze=Rt(l.nextSibling),_e=t,le=!0,Ze=null,e!==null&&($e[Ue++]=dt,$e[Ue++]=ft,$e[Ue++]=nn,dt=e.id,ft=e.overflow,nn=t),t=Di(t,r.children),t.flags|=4096,t)}function nu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ls(e.return,t,n)}function Go(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function Ld(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Se(e,t,r.children,n),r=oe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nu(e,n,t);else if(e.tag===19)nu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(J(oe,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Hl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Go(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Hl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Go(t,!0,n,null,o);break;case"together":Go(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ln|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=Dt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Up(e,t,n){switch(t.tag){case 3:Id(t),Rn();break;case 5:od(t);break;case 1:Te(t.type)&&Dl(t);break;case 4:Ii(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;J(Ul,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(J(oe,oe.current&1),t.flags|=128,null):n&t.child.childLanes?Td(e,t,n):(J(oe,oe.current&1),e=xt(e,t,n),e!==null?e.sibling:null);J(oe,oe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ld(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),J(oe,oe.current),r)break;return null;case 22:case 23:return t.lanes=0,Md(e,t,n)}return xt(e,t,n)}var Od,$s,Rd,zd;Od=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$s=function(){};Rd=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Xt(it.current);var o=null;switch(n){case"input":l=us(e,l),r=us(e,r),o=[];break;case"select":l=ie({},l,{value:void 0}),r=ie({},r,{value:void 0}),o=[];break;case"textarea":l=fs(e,l),r=fs(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=_l)}ps(n,r);var i;n=null;for(f in l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&l[f]!=null)if(f==="style"){var a=l[f];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(kr.hasOwnProperty(f)?o||(o=[]):(o=o||[]).push(f,null));for(f in r){var u=r[f];if(a=l!=null?l[f]:void 0,r.hasOwnProperty(f)&&u!==a&&(u!=null||a!=null))if(f==="style")if(a){for(i in a)!a.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&a[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(o||(o=[]),o.push(f,n)),n=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(kr.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&ne("scroll",e),o||a===u||(o=[])):(o=o||[]).push(f,u))}n&&(o=o||[]).push("style",n);var f=o;(t.updateQueue=f)&&(t.flags|=4)}};zd=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zn(e,t){if(!le)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 be(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bp(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(t),null;case 1:return Te(t.type)&&Fl(),be(t),null;case 3:return r=t.stateNode,_n(),re(Ie),re(Ne),Li(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ze!==null&&(Ks(Ze),Ze=null))),$s(e,t),be(t),null;case 5:Ti(t);var l=Xt(Lr.current);if(n=t.type,e!==null&&t.stateNode!=null)Rd(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(P(166));return be(t),null}if(e=Xt(it.current),sl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ot]=t,r[Ir]=o,e=(t.mode&1)!==0,n){case"dialog":ne("cancel",r),ne("close",r);break;case"iframe":case"object":case"embed":ne("load",r);break;case"video":case"audio":for(l=0;l<ir.length;l++)ne(ir[l],r);break;case"source":ne("error",r);break;case"img":case"image":case"link":ne("error",r),ne("load",r);break;case"details":ne("toggle",r);break;case"input":da(r,o),ne("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ne("invalid",r);break;case"textarea":ma(r,o),ne("invalid",r)}ps(n,o),l=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&ol(r.textContent,a,e),l=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&ol(r.textContent,a,e),l=["children",""+a]):kr.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ne("scroll",r)}switch(n){case"input":Xr(r),fa(r,o,!0);break;case"textarea":Xr(r),pa(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=_l)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=cc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[ot]=t,e[Ir]=r,Od(e,t,!1,!1),t.stateNode=e;e:{switch(i=hs(n,r),n){case"dialog":ne("cancel",e),ne("close",e),l=r;break;case"iframe":case"object":case"embed":ne("load",e),l=r;break;case"video":case"audio":for(l=0;l<ir.length;l++)ne(ir[l],e);l=r;break;case"source":ne("error",e),l=r;break;case"img":case"image":case"link":ne("error",e),ne("load",e),l=r;break;case"details":ne("toggle",e),l=r;break;case"input":da(e,r),l=us(e,r),ne("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=ie({},r,{value:void 0}),ne("invalid",e);break;case"textarea":ma(e,r),l=fs(e,r),ne("invalid",e);break;default:l=r}ps(n,l),a=l;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?mc(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&dc(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&br(e,u):typeof u=="number"&&br(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(kr.hasOwnProperty(o)?u!=null&&o==="onScroll"&&ne("scroll",e):u!=null&&ui(e,o,u,i))}switch(n){case"input":Xr(e),fa(e,r,!1);break;case"textarea":Xr(e),pa(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$t(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Cn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Cn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=_l)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return be(t),null;case 6:if(e&&t.stateNode!=null)zd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(n=Xt(Lr.current),Xt(it.current),sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[ot]=t,(o=r.nodeValue!==n)&&(e=_e,e!==null))switch(e.tag){case 3:ol(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ol(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ot]=t,t.stateNode=r}return be(t),null;case 13:if(re(oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(le&&ze!==null&&t.mode&1&&!(t.flags&128))ed(),Rn(),t.flags|=98560,o=!1;else if(o=sl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(P(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(P(317));o[ot]=t}else Rn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;be(t),o=!1}else Ze!==null&&(Ks(Ze),Ze=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||oe.current&1?me===0&&(me=3):Hi())),t.updateQueue!==null&&(t.flags|=4),be(t),null);case 4:return _n(),$s(e,t),e===null&&Mr(t.stateNode.containerInfo),be(t),null;case 10:return Pi(t.type._context),be(t),null;case 17:return Te(t.type)&&Fl(),be(t),null;case 19:if(re(oe),o=t.memoizedState,o===null)return be(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)Zn(o,!1);else{if(me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Hl(e),i!==null){for(t.flags|=128,Zn(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return J(oe,oe.current&1|2),t.child}e=e.sibling}o.tail!==null&&ce()>Dn&&(t.flags|=128,r=!0,Zn(o,!1),t.lanes=4194304)}else{if(!r)if(e=Hl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!le)return be(t),null}else 2*ce()-o.renderingStartTime>Dn&&n!==1073741824&&(t.flags|=128,r=!0,Zn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ce(),t.sibling=null,n=oe.current,J(oe,r?n&1|2:n&1),t):(be(t),null);case 22:case 23:return Vi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Oe&1073741824&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Vp(e,t){switch(Ni(t),t.tag){case 1:return Te(t.type)&&Fl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _n(),re(Ie),re(Ne),Li(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ti(t),null;case 13:if(re(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Rn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(oe),null;case 4:return _n(),null;case 10:return Pi(t.type._context),null;case 22:case 23:return Vi(),null;case 24:return null;default:return null}}var ul=!1,je=!1,Hp=typeof WeakSet=="function"?WeakSet:Set,R=null;function bn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ae(e,t,r)}else n.current=null}function Us(e,t,n){try{n()}catch(r){ae(e,t,r)}}var ru=!1;function Qp(e,t){if(Ss=Ol,e=$c(),bi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,f=0,p=0,h=e,m=null;t:for(;;){for(var k;h!==n||l!==0&&h.nodeType!==3||(a=i+l),h!==o||r!==0&&h.nodeType!==3||(u=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(k=h.firstChild)!==null;)m=h,h=k;for(;;){if(h===e)break t;if(m===n&&++f===l&&(a=i),m===o&&++p===r&&(u=i),(k=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=k}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Cs={focusedElem:e,selectionRange:n},Ol=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,S=w.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?y:qe(t.type,y),S);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(v){ae(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return w=ru,ru=!1,w}function gr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Us(t,n,o)}l=l.next}while(l!==r)}}function co(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Bs(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function _d(e){var t=e.alternate;t!==null&&(e.alternate=null,_d(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ot],delete t[Ir],delete t[Ms],delete t[Pp],delete t[Mp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fd(e){return e.tag===5||e.tag===3||e.tag===4}function lu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fd(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_l));else if(r!==4&&(e=e.child,e!==null))for(Vs(e,t,n),e=e.sibling;e!==null;)Vs(e,t,n),e=e.sibling}function Hs(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&&(e=e.child,e!==null))for(Hs(e,t,n),e=e.sibling;e!==null;)Hs(e,t,n),e=e.sibling}var ve=null,Xe=!1;function wt(e,t,n){for(n=n.child;n!==null;)Dd(e,t,n),n=n.sibling}function Dd(e,t,n){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(no,n)}catch{}switch(n.tag){case 5:je||bn(n,t);case 6:var r=ve,l=Xe;ve=null,wt(e,t,n),ve=r,Xe=l,ve!==null&&(Xe?(e=ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ve.removeChild(n.stateNode));break;case 18:ve!==null&&(Xe?(e=ve,n=n.stateNode,e.nodeType===8?Wo(e.parentNode,n):e.nodeType===1&&Wo(e,n),Cr(e)):Wo(ve,n.stateNode));break;case 4:r=ve,l=Xe,ve=n.stateNode.containerInfo,Xe=!0,wt(e,t,n),ve=r,Xe=l;break;case 0:case 11:case 14:case 15:if(!je&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Us(n,t,i),l=l.next}while(l!==r)}wt(e,t,n);break;case 1:if(!je&&(bn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ae(n,t,a)}wt(e,t,n);break;case 21:wt(e,t,n);break;case 22:n.mode&1?(je=(r=je)||n.memoizedState!==null,wt(e,t,n),je=r):wt(e,t,n);break;default:wt(e,t,n)}}function ou(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hp),t.forEach(function(r){var l=th.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ke(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:ve=a.stateNode,Xe=!1;break e;case 3:ve=a.stateNode.containerInfo,Xe=!0;break e;case 4:ve=a.stateNode.containerInfo,Xe=!0;break e}a=a.return}if(ve===null)throw Error(P(160));Dd(o,i,l),ve=null,Xe=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(f){ae(l,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wd(t,e),t=t.sibling}function Wd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ke(t,e),rt(e),r&4){try{gr(3,e,e.return),co(3,e)}catch(y){ae(e,e.return,y)}try{gr(5,e,e.return)}catch(y){ae(e,e.return,y)}}break;case 1:Ke(t,e),rt(e),r&512&&n!==null&&bn(n,n.return);break;case 5:if(Ke(t,e),rt(e),r&512&&n!==null&&bn(n,n.return),e.flags&32){var l=e.stateNode;try{br(l,"")}catch(y){ae(e,e.return,y)}}if(r&4&&(l=e.stateNode,l!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&ac(l,o),hs(a,i);var f=hs(a,o);for(i=0;i<u.length;i+=2){var p=u[i],h=u[i+1];p==="style"?mc(l,h):p==="dangerouslySetInnerHTML"?dc(l,h):p==="children"?br(l,h):ui(l,p,h,f)}switch(a){case"input":cs(l,o);break;case"textarea":uc(l,o);break;case"select":var m=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!o.multiple;var k=o.value;k!=null?Cn(l,!!o.multiple,k,!1):m!==!!o.multiple&&(o.defaultValue!=null?Cn(l,!!o.multiple,o.defaultValue,!0):Cn(l,!!o.multiple,o.multiple?[]:"",!1))}l[Ir]=o}catch(y){ae(e,e.return,y)}}break;case 6:if(Ke(t,e),rt(e),r&4){if(e.stateNode===null)throw Error(P(162));l=e.stateNode,o=e.memoizedProps;try{l.nodeValue=o}catch(y){ae(e,e.return,y)}}break;case 3:if(Ke(t,e),rt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Cr(t.containerInfo)}catch(y){ae(e,e.return,y)}break;case 4:Ke(t,e),rt(e);break;case 13:Ke(t,e),rt(e),l=e.child,l.flags&8192&&(o=l.memoizedState!==null,l.stateNode.isHidden=o,!o||l.alternate!==null&&l.alternate.memoizedState!==null||(Ui=ce())),r&4&&ou(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(je=(f=je)||p,Ke(t,e),je=f):Ke(t,e),rt(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!p&&e.mode&1)for(R=e,p=e.child;p!==null;){for(h=R=p;R!==null;){switch(m=R,k=m.child,m.tag){case 0:case 11:case 14:case 15:gr(4,m,m.return);break;case 1:bn(m,m.return);var w=m.stateNode;if(typeof w.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(y){ae(r,n,y)}}break;case 5:bn(m,m.return);break;case 22:if(m.memoizedState!==null){iu(h);continue}}k!==null?(k.return=m,R=k):iu(h)}p=p.sibling}e:for(p=null,h=e;;){if(h.tag===5){if(p===null){p=h;try{l=h.stateNode,f?(o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=h.stateNode,u=h.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=fc("display",i))}catch(y){ae(e,e.return,y)}}}else if(h.tag===6){if(p===null)try{h.stateNode.nodeValue=f?"":h.memoizedProps}catch(y){ae(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;p===h&&(p=null),h=h.return}p===h&&(p=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Ke(t,e),rt(e),r&4&&ou(e);break;case 21:break;default:Ke(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fd(n)){var r=n;break e}n=n.return}throw Error(P(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(br(l,""),r.flags&=-33);var o=lu(e);Hs(e,o,l);break;case 3:case 4:var i=r.stateNode.containerInfo,a=lu(e);Vs(e,a,i);break;default:throw Error(P(161))}}catch(u){ae(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gp(e,t,n){R=e,$d(e)}function $d(e,t,n){for(var r=(e.mode&1)!==0;R!==null;){var l=R,o=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||ul;if(!i){var a=l.alternate,u=a!==null&&a.memoizedState!==null||je;a=ul;var f=je;if(ul=i,(je=u)&&!f)for(R=l;R!==null;)i=R,u=i.child,i.tag===22&&i.memoizedState!==null?au(l):u!==null?(u.return=i,R=u):au(l);for(;o!==null;)R=o,$d(o),o=o.sibling;R=l,ul=a,je=f}su(e)}else l.subtreeFlags&8772&&o!==null?(o.return=l,R=o):su(e)}}function su(e){for(;R!==null;){var t=R;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:je||co(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!je)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:qe(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Va(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Va(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var p=f.memoizedState;if(p!==null){var h=p.dehydrated;h!==null&&Cr(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}je||t.flags&512&&Bs(t)}catch(m){ae(t,t.return,m)}}if(t===e){R=null;break}if(n=t.sibling,n!==null){n.return=t.return,R=n;break}R=t.return}}function iu(e){for(;R!==null;){var t=R;if(t===e){R=null;break}var n=t.sibling;if(n!==null){n.return=t.return,R=n;break}R=t.return}}function au(e){for(;R!==null;){var t=R;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{co(4,t)}catch(u){ae(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){ae(t,l,u)}}var o=t.return;try{Bs(t)}catch(u){ae(t,o,u)}break;case 5:var i=t.return;try{Bs(t)}catch(u){ae(t,i,u)}}}catch(u){ae(t,t.return,u)}if(t===e){R=null;break}var a=t.sibling;if(a!==null){a.return=t.return,R=a;break}R=t.return}}var Yp=Math.ceil,Yl=yt.ReactCurrentDispatcher,Wi=yt.ReactCurrentOwner,Ve=yt.ReactCurrentBatchConfig,Y=0,ge=null,de=null,xe=0,Oe=0,jn=Vt(0),me=0,_r=null,ln=0,fo=0,$i=0,vr=null,Me=null,Ui=0,Dn=1/0,ut=null,Kl=!1,Qs=null,_t=null,cl=!1,At=null,ql=0,xr=0,Gs=null,jl=-1,Nl=0;function Ce(){return Y&6?ce():jl!==-1?jl:jl=ce()}function Ft(e){return e.mode&1?Y&2&&xe!==0?xe&-xe:Ip.transition!==null?(Nl===0&&(Nl=Sc()),Nl):(e=X,e!==0||(e=window.event,e=e===void 0?16:Tc(e.type)),e):1}function et(e,t,n,r){if(50<xr)throw xr=0,Gs=null,Error(P(185));Br(e,n,r),(!(Y&2)||e!==ge)&&(e===ge&&(!(Y&2)&&(fo|=n),me===4&&Pt(e,xe)),Le(e,r),n===1&&Y===0&&!(t.mode&1)&&(Dn=ce()+500,io&&Ht()))}function Le(e,t){var n=e.callbackNode;Im(e,t);var r=Ll(e,e===ge?xe:0);if(r===0)n!==null&&va(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&va(n),t===1)e.tag===0?Ap(uu.bind(null,e)):Xc(uu.bind(null,e)),Cp(function(){!(Y&6)&&Ht()}),n=null;else{switch(Cc(r)){case 1:n=pi;break;case 4:n=jc;break;case 16:n=Tl;break;case 536870912:n=Nc;break;default:n=Tl}n=Kd(n,Ud.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ud(e,t){if(jl=-1,Nl=0,Y&6)throw Error(P(327));var n=e.callbackNode;if(In()&&e.callbackNode!==n)return null;var r=Ll(e,e===ge?xe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Xl(e,r);else{t=r;var l=Y;Y|=2;var o=Vd();(ge!==e||xe!==t)&&(ut=null,Dn=ce()+500,Zt(e,t));do try{Xp();break}catch(a){Bd(e,a)}while(!0);Ei(),Yl.current=o,Y=l,de!==null?t=0:(ge=null,xe=0,t=me)}if(t!==0){if(t===2&&(l=ws(e),l!==0&&(r=l,t=Ys(e,l))),t===1)throw n=_r,Zt(e,0),Pt(e,r),Le(e,ce()),n;if(t===6)Pt(e,r);else{if(l=e.current.alternate,!(r&30)&&!Kp(l)&&(t=Xl(e,r),t===2&&(o=ws(e),o!==0&&(r=o,t=Ys(e,o))),t===1))throw n=_r,Zt(e,0),Pt(e,r),Le(e,ce()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(P(345));case 2:Gt(e,Me,ut);break;case 3:if(Pt(e,r),(r&130023424)===r&&(t=Ui+500-ce(),10<t)){if(Ll(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){Ce(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Ps(Gt.bind(null,e,Me,ut),t);break}Gt(e,Me,ut);break;case 4:if(Pt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-Je(r);o=1<<i,i=t[i],i>l&&(l=i),r&=~o}if(r=l,r=ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Yp(r/1960))-r,10<r){e.timeoutHandle=Ps(Gt.bind(null,e,Me,ut),r);break}Gt(e,Me,ut);break;case 5:Gt(e,Me,ut);break;default:throw Error(P(329))}}}return Le(e,ce()),e.callbackNode===n?Ud.bind(null,e):null}function Ys(e,t){var n=vr;return e.current.memoizedState.isDehydrated&&(Zt(e,t).flags|=256),e=Xl(e,t),e!==2&&(t=Me,Me=n,t!==null&&Ks(t)),e}function Ks(e){Me===null?Me=e:Me.push.apply(Me,e)}function Kp(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],o=l.getSnapshot;l=l.value;try{if(!tt(o(),l))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 Pt(e,t){for(t&=~$i,t&=~fo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Je(t),r=1<<n;e[n]=-1,t&=~r}}function uu(e){if(Y&6)throw Error(P(327));In();var t=Ll(e,0);if(!(t&1))return Le(e,ce()),null;var n=Xl(e,t);if(e.tag!==0&&n===2){var r=ws(e);r!==0&&(t=r,n=Ys(e,r))}if(n===1)throw n=_r,Zt(e,0),Pt(e,t),Le(e,ce()),n;if(n===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gt(e,Me,ut),Le(e,ce()),null}function Bi(e,t){var n=Y;Y|=1;try{return e(t)}finally{Y=n,Y===0&&(Dn=ce()+500,io&&Ht())}}function on(e){At!==null&&At.tag===0&&!(Y&6)&&In();var t=Y;Y|=1;var n=Ve.transition,r=X;try{if(Ve.transition=null,X=1,e)return e()}finally{X=r,Ve.transition=n,Y=t,!(Y&6)&&Ht()}}function Vi(){Oe=jn.current,re(jn)}function Zt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Sp(n)),de!==null)for(n=de.return;n!==null;){var r=n;switch(Ni(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Fl();break;case 3:_n(),re(Ie),re(Ne),Li();break;case 5:Ti(r);break;case 4:_n();break;case 13:re(oe);break;case 19:re(oe);break;case 10:Pi(r.type._context);break;case 22:case 23:Vi()}n=n.return}if(ge=e,de=e=Dt(e.current,null),xe=Oe=t,me=0,_r=null,$i=fo=ln=0,Me=vr=null,qt!==null){for(t=0;t<qt.length;t++)if(n=qt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=l,r.next=i}n.pending=r}qt=null}return e}function Bd(e,t){do{var n=de;try{if(Ei(),wl.current=Gl,Ql){for(var r=se.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Ql=!1}if(rn=0,he=fe=se=null,hr=!1,Or=0,Wi.current=null,n===null||n.return===null){me=1,_r=t,de=null;break}e:{var o=e,i=n.return,a=n,u=t;if(t=xe,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,p=a,h=p.tag;if(!(p.mode&1)&&(h===0||h===11||h===15)){var m=p.alternate;m?(p.updateQueue=m.updateQueue,p.memoizedState=m.memoizedState,p.lanes=m.lanes):(p.updateQueue=null,p.memoizedState=null)}var k=qa(i);if(k!==null){k.flags&=-257,Xa(k,i,a,o,t),k.mode&1&&Ka(o,f,t),t=k,u=f;var w=t.updateQueue;if(w===null){var y=new Set;y.add(u),t.updateQueue=y}else w.add(u);break e}else{if(!(t&1)){Ka(o,f,t),Hi();break e}u=Error(P(426))}}else if(le&&a.mode&1){var S=qa(i);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Xa(S,i,a,o,t),Si(Fn(u,a));break e}}o=u=Fn(u,a),me!==4&&(me=2),vr===null?vr=[o]:vr.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var d=Cd(o,u,t);Ba(o,d);break e;case 1:a=u;var c=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof c.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(_t===null||!_t.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=Ed(o,a,t);Ba(o,v);break e}}o=o.return}while(o!==null)}Qd(n)}catch(b){t=b,de===n&&n!==null&&(de=n=n.return);continue}break}while(!0)}function Vd(){var e=Yl.current;return Yl.current=Gl,e===null?Gl:e}function Hi(){(me===0||me===3||me===2)&&(me=4),ge===null||!(ln&268435455)&&!(fo&268435455)||Pt(ge,xe)}function Xl(e,t){var n=Y;Y|=2;var r=Vd();(ge!==e||xe!==t)&&(ut=null,Zt(e,t));do try{qp();break}catch(l){Bd(e,l)}while(!0);if(Ei(),Y=n,Yl.current=r,de!==null)throw Error(P(261));return ge=null,xe=0,me}function qp(){for(;de!==null;)Hd(de)}function Xp(){for(;de!==null&&!bm();)Hd(de)}function Hd(e){var t=Yd(e.alternate,e,Oe);e.memoizedProps=e.pendingProps,t===null?Qd(e):de=t,Wi.current=null}function Qd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Vp(n,t),n!==null){n.flags&=32767,de=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{me=6,de=null;return}}else if(n=Bp(n,t,Oe),n!==null){de=n;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);me===0&&(me=5)}function Gt(e,t,n){var r=X,l=Ve.transition;try{Ve.transition=null,X=1,Zp(e,t,n,r)}finally{Ve.transition=l,X=r}return null}function Zp(e,t,n,r){do In();while(At!==null);if(Y&6)throw Error(P(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Tm(e,o),e===ge&&(de=ge=null,xe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cl||(cl=!0,Kd(Tl,function(){return In(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Ve.transition,Ve.transition=null;var i=X;X=1;var a=Y;Y|=4,Wi.current=null,Qp(e,n),Wd(n,e),xp(Cs),Ol=!!Ss,Cs=Ss=null,e.current=n,Gp(n),jm(),Y=a,X=i,Ve.transition=o}else e.current=n;if(cl&&(cl=!1,At=e,ql=l),o=e.pendingLanes,o===0&&(_t=null),Cm(n.stateNode),Le(e,ce()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(Kl)throw Kl=!1,e=Qs,Qs=null,e;return ql&1&&e.tag!==0&&In(),o=e.pendingLanes,o&1?e===Gs?xr++:(xr=0,Gs=e):xr=0,Ht(),null}function In(){if(At!==null){var e=Cc(ql),t=Ve.transition,n=X;try{if(Ve.transition=null,X=16>e?16:e,At===null)var r=!1;else{if(e=At,At=null,ql=0,Y&6)throw Error(P(331));var l=Y;for(Y|=4,R=e.current;R!==null;){var o=R,i=o.child;if(R.flags&16){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var f=a[u];for(R=f;R!==null;){var p=R;switch(p.tag){case 0:case 11:case 15:gr(8,p,o)}var h=p.child;if(h!==null)h.return=p,R=h;else for(;R!==null;){p=R;var m=p.sibling,k=p.return;if(_d(p),p===f){R=null;break}if(m!==null){m.return=k,R=m;break}R=k}}}var w=o.alternate;if(w!==null){var y=w.child;if(y!==null){w.child=null;do{var S=y.sibling;y.sibling=null,y=S}while(y!==null)}}R=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,R=i;else e:for(;R!==null;){if(o=R,o.flags&2048)switch(o.tag){case 0:case 11:case 15:gr(9,o,o.return)}var d=o.sibling;if(d!==null){d.return=o.return,R=d;break e}R=o.return}}var c=e.current;for(R=c;R!==null;){i=R;var g=i.child;if(i.subtreeFlags&2064&&g!==null)g.return=i,R=g;else e:for(i=c;R!==null;){if(a=R,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:co(9,a)}}catch(b){ae(a,a.return,b)}if(a===i){R=null;break e}var v=a.sibling;if(v!==null){v.return=a.return,R=v;break e}R=a.return}}if(Y=l,Ht(),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(no,e)}catch{}r=!0}return r}finally{X=n,Ve.transition=t}}return!1}function cu(e,t,n){t=Fn(n,t),t=Cd(e,t,1),e=zt(e,t,1),t=Ce(),e!==null&&(Br(e,1,t),Le(e,t))}function ae(e,t,n){if(e.tag===3)cu(e,e,n);else for(;t!==null;){if(t.tag===3){cu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(_t===null||!_t.has(r))){e=Fn(n,e),e=Ed(t,e,1),t=zt(t,e,1),e=Ce(),t!==null&&(Br(t,1,e),Le(t,e));break}}t=t.return}}function Jp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ce(),e.pingedLanes|=e.suspendedLanes&n,ge===e&&(xe&n)===n&&(me===4||me===3&&(xe&130023424)===xe&&500>ce()-Ui?Zt(e,0):$i|=n),Le(e,t)}function Gd(e,t){t===0&&(e.mode&1?(t=el,el<<=1,!(el&130023424)&&(el=4194304)):t=1);var n=Ce();e=vt(e,t),e!==null&&(Br(e,t,n),Le(e,n))}function eh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gd(e,n)}function th(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),Gd(e,n)}var Yd;Yd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)Ae=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ae=!1,Up(e,t,n);Ae=!!(e.flags&131072)}else Ae=!1,le&&t.flags&1048576&&Zc(t,$l,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bl(e,t),e=t.pendingProps;var l=On(t,Ne.current);An(t,n),l=Ri(null,t,r,e,l,n);var o=zi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Te(r)?(o=!0,Dl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ai(t),l.updater=uo,t.stateNode=l,l._reactInternals=t,Rs(t,r,e,n),t=Fs(null,t,r,!0,o,n)):(t.tag=0,le&&o&&ji(t),Se(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=rh(r),e=qe(r,e),l){case 0:t=_s(null,t,r,e,n);break e;case 1:t=eu(null,t,r,e,n);break e;case 11:t=Za(null,t,r,e,n);break e;case 14:t=Ja(null,t,r,qe(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:qe(r,l),_s(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:qe(r,l),eu(e,t,r,l,n);case 3:e:{if(Id(t),e===null)throw Error(P(387));r=t.pendingProps,o=t.memoizedState,l=o.element,ld(e,t),Vl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=Fn(Error(P(423)),t),t=tu(e,t,r,n,l);break e}else if(r!==l){l=Fn(Error(P(424)),t),t=tu(e,t,r,n,l);break e}else for(ze=Rt(t.stateNode.containerInfo.firstChild),_e=t,le=!0,Ze=null,n=nd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rn(),r===l){t=xt(e,t,n);break e}Se(e,t,r,n)}t=t.child}return t;case 5:return od(t),e===null&&Ts(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Es(r,l)?i=null:o!==null&&Es(r,o)&&(t.flags|=32),Ad(e,t),Se(e,t,i,n),t.child;case 6:return e===null&&Ts(t),null;case 13:return Td(e,t,n);case 4:return Ii(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zn(t,null,r,n):Se(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:qe(r,l),Za(e,t,r,l,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,J(Ul,r._currentValue),r._currentValue=i,o!==null)if(tt(o.value,i)){if(o.children===l.children&&!Ie.current){t=xt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=pt(-1,n&-n),u.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var p=f.pending;p===null?u.next=u:(u.next=p.next,p.next=u),f.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ls(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(P(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ls(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Se(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,An(t,n),l=He(l),r=r(l),t.flags|=1,Se(e,t,r,n),t.child;case 14:return r=t.type,l=qe(r,t.pendingProps),l=qe(r.type,l),Ja(e,t,r,l,n);case 15:return Pd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:qe(r,l),bl(e,t),t.tag=1,Te(r)?(e=!0,Dl(t)):e=!1,An(t,n),Sd(t,r,l),Rs(t,r,l,n),Fs(null,t,r,!0,e,n);case 19:return Ld(e,t,n);case 22:return Md(e,t,n)}throw Error(P(156,t.tag))};function Kd(e,t){return bc(e,t)}function nh(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.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 Be(e,t,n,r){return new nh(e,t,n,r)}function Qi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rh(e){if(typeof e=="function")return Qi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===di)return 11;if(e===fi)return 14}return 2}function Dt(e,t){var n=e.alternate;return n===null?(n=Be(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&14680064,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}function Sl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Qi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case mn:return Jt(n.children,l,o,t);case ci:i=8,l|=8;break;case os:return e=Be(12,n,t,l|2),e.elementType=os,e.lanes=o,e;case ss:return e=Be(13,n,t,l),e.elementType=ss,e.lanes=o,e;case is:return e=Be(19,n,t,l),e.elementType=is,e.lanes=o,e;case oc:return mo(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rc:i=10;break e;case lc:i=9;break e;case di:i=11;break e;case fi:i=14;break e;case St:i=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=Be(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Jt(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function mo(e,t,n,r){return e=Be(22,e,r,t),e.elementType=oc,e.lanes=n,e.stateNode={isHidden:!1},e}function Yo(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function Ko(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lh(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mo(0),this.expirationTimes=Mo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Gi(e,t,n,r,l,o,i,a,u){return e=new lh(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Be(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ai(o),e}function oh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function qd(e){if(!e)return Ut;e=e._reactInternals;e:{if(un(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Te(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var n=e.type;if(Te(n))return qc(e,n,t)}return t}function Xd(e,t,n,r,l,o,i,a,u){return e=Gi(n,r,!0,e,l,o,i,a,u),e.context=qd(null),n=e.current,r=Ce(),l=Ft(n),o=pt(r,l),o.callback=t??null,zt(n,o,l),e.current.lanes=l,Br(e,l,r),Le(e,r),e}function po(e,t,n,r){var l=t.current,o=Ce(),i=Ft(l);return n=qd(n),t.context===null?t.context=n:t.pendingContext=n,t=pt(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=zt(l,t,i),e!==null&&(et(e,l,i,o),yl(e,l,i)),i}function Zl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function du(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yi(e,t){du(e,t),(e=e.alternate)&&du(e,t)}function sh(){return null}var Zd=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ki(e){this._internalRoot=e}ho.prototype.render=Ki.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));po(e,t,null,null)};ho.prototype.unmount=Ki.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;on(function(){po(null,e,null,null)}),t[gt]=null}};function ho(e){this._internalRoot=e}ho.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Et.length&&t!==0&&t<Et[n].priority;n++);Et.splice(n,0,e),n===0&&Ic(e)}};function qi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function go(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fu(){}function ih(e,t,n,r,l){if(l){if(typeof r=="function"){var o=r;r=function(){var f=Zl(i);o.call(f)}}var i=Xd(t,r,e,0,null,!1,!1,"",fu);return e._reactRootContainer=i,e[gt]=i.current,Mr(e.nodeType===8?e.parentNode:e),on(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var a=r;r=function(){var f=Zl(u);a.call(f)}}var u=Gi(e,0,!1,null,null,!1,!1,"",fu);return e._reactRootContainer=u,e[gt]=u.current,Mr(e.nodeType===8?e.parentNode:e),on(function(){po(t,u,n,r)}),u}function vo(e,t,n,r,l){var o=n._reactRootContainer;if(o){var i=o;if(typeof l=="function"){var a=l;l=function(){var u=Zl(i);a.call(u)}}po(t,i,e,l)}else i=ih(n,t,e,l,r);return Zl(i)}Ec=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=sr(t.pendingLanes);n!==0&&(hi(t,n|1),Le(t,ce()),!(Y&6)&&(Dn=ce()+500,Ht()))}break;case 13:on(function(){var r=vt(e,1);if(r!==null){var l=Ce();et(r,e,1,l)}}),Yi(e,1)}};gi=function(e){if(e.tag===13){var t=vt(e,134217728);if(t!==null){var n=Ce();et(t,e,134217728,n)}Yi(e,134217728)}};Pc=function(e){if(e.tag===13){var t=Ft(e),n=vt(e,t);if(n!==null){var r=Ce();et(n,e,t,r)}Yi(e,t)}};Mc=function(){return X};Ac=function(e,t){var n=X;try{return X=e,t()}finally{X=n}};vs=function(e,t,n){switch(t){case"input":if(cs(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=so(r);if(!l)throw Error(P(90));ic(r),cs(r,l)}}}break;case"textarea":uc(e,n);break;case"select":t=n.value,t!=null&&Cn(e,!!n.multiple,t,!1)}};gc=Bi;vc=on;var ah={usingClientEntryPoint:!1,Events:[Hr,vn,so,pc,hc,Bi]},Jn={findFiberByHostInstance:Kt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uh={bundleType:Jn.bundleType,version:Jn.version,rendererPackageName:Jn.rendererPackageName,rendererConfig:Jn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wc(e),e===null?null:e.stateNode},findFiberByHostInstance:Jn.findFiberByHostInstance||sh,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dl.isDisabled&&dl.supportsFiber)try{no=dl.inject(uh),st=dl}catch{}}De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ah;De.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qi(t))throw Error(P(200));return oh(e,t,null,n)};De.createRoot=function(e,t){if(!qi(e))throw Error(P(299));var n=!1,r="",l=Zd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Gi(e,1,!1,null,null,n,!1,r,l),e[gt]=t.current,Mr(e.nodeType===8?e.parentNode:e),new Ki(t)};De.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=wc(t),e=e===null?null:e.stateNode,e};De.flushSync=function(e){return on(e)};De.hydrate=function(e,t,n){if(!go(t))throw Error(P(200));return vo(null,e,t,!0,n)};De.hydrateRoot=function(e,t,n){if(!qi(e))throw Error(P(405));var r=n!=null&&n.hydratedSources||null,l=!1,o="",i=Zd;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Xd(t,null,e,1,n??null,l,!1,o,i),e[gt]=t.current,Mr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new ho(t)};De.render=function(e,t,n){if(!go(t))throw Error(P(200));return vo(null,e,t,!1,n)};De.unmountComponentAtNode=function(e){if(!go(e))throw Error(P(40));return e._reactRootContainer?(on(function(){vo(null,null,e,!1,function(){e._reactRootContainer=null,e[gt]=null})}),!0):!1};De.unstable_batchedUpdates=Bi;De.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!go(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return vo(e,t,n,!1,r)};De.version="18.3.1-next-f1338f8080-20240426";function Jd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jd)}catch(e){console.error(e)}}Jd(),Ju.exports=De;var ch=Ju.exports,mu=ch;rs.createRoot=mu.createRoot,rs.hydrateRoot=mu.hydrateRoot;/**
41
+ * @remix-run/router v1.23.2
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */function Fr(){return Fr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fr.apply(this,arguments)}var It;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(It||(It={}));const pu="popstate";function dh(e){e===void 0&&(e={});function t(r,l){let{pathname:o,search:i,hash:a}=r.location;return qs("",{pathname:o,search:i,hash:a},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:ef(l)}return mh(t,n,null,e)}function pe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fh(){return Math.random().toString(36).substr(2,8)}function hu(e,t){return{usr:e.state,key:e.key,idx:t}}function qs(e,t,n,r){return n===void 0&&(n=null),Fr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Bn(t):t,{state:n,key:t&&t.key||r||fh()})}function ef(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Bn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function mh(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=It.Pop,u=null,f=p();f==null&&(f=0,i.replaceState(Fr({},i.state,{idx:f}),""));function p(){return(i.state||{idx:null}).idx}function h(){a=It.Pop;let S=p(),d=S==null?null:S-f;f=S,u&&u({action:a,location:y.location,delta:d})}function m(S,d){a=It.Push;let c=qs(y.location,S,d);f=p()+1;let g=hu(c,f),v=y.createHref(c);try{i.pushState(g,"",v)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;l.location.assign(v)}o&&u&&u({action:a,location:y.location,delta:1})}function k(S,d){a=It.Replace;let c=qs(y.location,S,d);f=p();let g=hu(c,f),v=y.createHref(c);i.replaceState(g,"",v),o&&u&&u({action:a,location:y.location,delta:0})}function w(S){let d=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof S=="string"?S:ef(S);return c=c.replace(/ $/,"%20"),pe(d,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,d)}let y={get action(){return a},get location(){return e(l,i)},listen(S){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(pu,h),u=S,()=>{l.removeEventListener(pu,h),u=null}},createHref(S){return t(l,S)},createURL:w,encodeLocation(S){let d=w(S);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:m,replace:k,go(S){return i.go(S)}};return y}var gu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gu||(gu={}));function ph(e,t,n){return n===void 0&&(n="/"),hh(e,t,n)}function hh(e,t,n,r){let l=typeof t=="string"?Bn(t):t,o=rf(l.pathname||"/",n);if(o==null)return null;let i=tf(e);gh(i);let a=null;for(let u=0;a==null&&u<i.length;++u){let f=Ph(o);a=Sh(i[u],f)}return a}function tf(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let l=(o,i,a)=>{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(pe(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let f=en([r,u.relativePath]),p=n.concat(u);o.children&&o.children.length>0&&(pe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),tf(o.children,t,p,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:jh(f,o.index),routesMeta:p})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of nf(o.path))l(o,i,u)}),t}function nf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=nf(r.join("/")),a=[];return a.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...i),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function gh(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Nh(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const vh=/^:[\w-]+$/,xh=3,yh=2,wh=1,kh=10,bh=-2,vu=e=>e==="*";function jh(e,t){let n=e.split("/"),r=n.length;return n.some(vu)&&(r+=bh),t&&(r+=yh),n.filter(l=>!vu(l)).reduce((l,o)=>l+(vh.test(o)?xh:o===""?wh:kh),r)}function Nh(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Sh(e,t,n){let{routesMeta:r}=e,l={},o="/",i=[];for(let a=0;a<r.length;++a){let u=r[a],f=a===r.length-1,p=o==="/"?t:t.slice(o.length)||"/",h=Ch({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},p),m=u.route;if(!h)return null;Object.assign(l,h.params),i.push({params:l,pathname:en([o,h.pathname]),pathnameBase:Rh(en([o,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(o=en([o,h.pathnameBase]))}return i}function Ch(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Eh(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let o=l[0],i=o.replace(/(.)\/+$/,"$1"),a=l.slice(1);return{params:r.reduce((f,p,h)=>{let{paramName:m,isOptional:k}=p;if(m==="*"){let y=a[h]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const w=a[h];return k&&!w?f[m]=void 0:f[m]=(w||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:i,pattern:e}}function Eh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Xi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Ph(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xi(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function rf(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Mh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ah=e=>Mh.test(e);function Ih(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Bn(e):e,o;if(n)if(Ah(n))o=n;else{if(n.includes("//")){let i=n;n=n.replace(/\/\/+/g,"/"),Xi(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+n))}n.startsWith("/")?o=xu(n.substring(1),"/"):o=xu(n,t)}else o=t;return{pathname:o,search:zh(r),hash:_h(l)}}function xu(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function qo(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Th(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Lh(e,t){let n=Th(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Oh(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Bn(e):(l=Fr({},e),pe(!l.pathname||!l.pathname.includes("?"),qo("?","pathname","search",l)),pe(!l.pathname||!l.pathname.includes("#"),qo("#","pathname","hash",l)),pe(!l.search||!l.search.includes("#"),qo("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(i==null)a=n;else{let h=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),h-=1;l.pathname=m.join("/")}a=h>=0?t[h]:"/"}let u=Ih(l,a),f=i&&i!=="/"&&i.endsWith("/"),p=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(f||p)&&(u.pathname+="/"),u}const en=e=>e.join("/").replace(/\/\/+/g,"/"),Rh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_h=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Fh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const lf=["post","put","patch","delete"];new Set(lf);const Dh=["get",...lf];new Set(Dh);/**
50
+ * React Router v6.30.3
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */function Dr(){return Dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dr.apply(this,arguments)}const Zi=x.createContext(null),Wh=x.createContext(null),xo=x.createContext(null),yo=x.createContext(null),Vn=x.createContext({outlet:null,matches:[],isDataRoute:!1}),of=x.createContext(null);function wo(){return x.useContext(yo)!=null}function Ji(){return wo()||pe(!1),x.useContext(yo).location}function sf(e){x.useContext(xo).static||x.useLayoutEffect(e)}function $h(){let{isDataRoute:e}=x.useContext(Vn);return e?eg():Uh()}function Uh(){wo()||pe(!1);let e=x.useContext(Zi),{basename:t,future:n,navigator:r}=x.useContext(xo),{matches:l}=x.useContext(Vn),{pathname:o}=Ji(),i=JSON.stringify(Lh(l,n.v7_relativeSplatPath)),a=x.useRef(!1);return sf(()=>{a.current=!0}),x.useCallback(function(f,p){if(p===void 0&&(p={}),!a.current)return;if(typeof f=="number"){r.go(f);return}let h=Oh(f,JSON.parse(i),o,p.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:en([t,h.pathname])),(p.replace?r.replace:r.push)(h,p.state,p)},[t,r,i,o,e])}function Bh(e,t){return Vh(e,t)}function Vh(e,t,n,r){wo()||pe(!1);let{navigator:l}=x.useContext(xo),{matches:o}=x.useContext(Vn),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let f=Ji(),p;if(t){var h;let S=typeof t=="string"?Bn(t):t;u==="/"||(h=S.pathname)!=null&&h.startsWith(u)||pe(!1),p=S}else p=f;let m=p.pathname||"/",k=m;if(u!=="/"){let S=u.replace(/^\//,"").split("/");k="/"+m.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=ph(e,{pathname:k}),y=Kh(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},a,S.params),pathname:en([u,l.encodeLocation?l.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?u:en([u,l.encodeLocation?l.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n,r);return t&&y?x.createElement(yo.Provider,{value:{location:Dr({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:It.Pop}},y):y}function Hh(){let e=Jh(),t=Fh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:l},n):null,null)}const Qh=x.createElement(Hh,null);class Gh extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(Vn.Provider,{value:this.props.routeContext},x.createElement(of.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Yh(e){let{routeContext:t,match:n,children:r}=e,l=x.useContext(Zi);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Vn.Provider,{value:t},r)}function Kh(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let p=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);p>=0||pe(!1),i=i.slice(0,Math.min(i.length,p+1))}let u=!1,f=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<i.length;p++){let h=i[p];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=p),h.route.id){let{loaderData:m,errors:k}=n,w=h.route.loader&&m[h.route.id]===void 0&&(!k||k[h.route.id]===void 0);if(h.route.lazy||w){u=!0,f>=0?i=i.slice(0,f+1):i=[i[0]];break}}}return i.reduceRight((p,h,m)=>{let k,w=!1,y=null,S=null;n&&(k=a&&h.route.id?a[h.route.id]:void 0,y=h.route.errorElement||Qh,u&&(f<0&&m===0?(tg("route-fallback"),w=!0,S=null):f===m&&(w=!0,S=h.route.hydrateFallbackElement||null)));let d=t.concat(i.slice(0,m+1)),c=()=>{let g;return k?g=y:w?g=S:h.route.Component?g=x.createElement(h.route.Component,null):h.route.element?g=h.route.element:g=p,x.createElement(Yh,{match:h,routeContext:{outlet:p,matches:d,isDataRoute:n!=null},children:g})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?x.createElement(Gh,{location:n.location,revalidation:n.revalidation,component:y,error:k,children:c(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):c()},null)}var af=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(af||{}),uf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(uf||{});function qh(e){let t=x.useContext(Zi);return t||pe(!1),t}function Xh(e){let t=x.useContext(Wh);return t||pe(!1),t}function Zh(e){let t=x.useContext(Vn);return t||pe(!1),t}function cf(e){let t=Zh(),n=t.matches[t.matches.length-1];return n.route.id||pe(!1),n.route.id}function Jh(){var e;let t=x.useContext(of),n=Xh(),r=cf();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function eg(){let{router:e}=qh(af.UseNavigateStable),t=cf(uf.UseNavigateStable),n=x.useRef(!1);return sf(()=>{n.current=!0}),x.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Dr({fromRouteId:t},o)))},[e,t])}const yu={};function tg(e,t,n){yu[e]||(yu[e]=!0)}function ng(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Nt(e){pe(!1)}function rg(e){let{basename:t="/",children:n=null,location:r,navigationType:l=It.Pop,navigator:o,static:i=!1,future:a}=e;wo()&&pe(!1);let u=t.replace(/^\/*/,"/"),f=x.useMemo(()=>({basename:u,navigator:o,static:i,future:Dr({v7_relativeSplatPath:!1},a)}),[u,a,o,i]);typeof r=="string"&&(r=Bn(r));let{pathname:p="/",search:h="",hash:m="",state:k=null,key:w="default"}=r,y=x.useMemo(()=>{let S=rf(p,u);return S==null?null:{location:{pathname:S,search:h,hash:m,state:k,key:w},navigationType:l}},[u,p,h,m,k,w,l]);return y==null?null:x.createElement(xo.Provider,{value:f},x.createElement(yo.Provider,{children:n,value:y}))}function lg(e){let{children:t,location:n}=e;return Bh(Xs(t),n)}new Promise(()=>{});function Xs(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,l)=>{if(!x.isValidElement(r))return;let o=[...t,l];if(r.type===x.Fragment){n.push.apply(n,Xs(r.props.children,o));return}r.type!==Nt&&pe(!1),!r.props.index||!r.props.children||pe(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Xs(r.props.children,o)),n.push(i)}),n}/**
59
+ * React Router DOM v6.30.3
60
+ *
61
+ * Copyright (c) Remix Software Inc.
62
+ *
63
+ * This source code is licensed under the MIT license found in the
64
+ * LICENSE.md file in the root directory of this source tree.
65
+ *
66
+ * @license MIT
67
+ */const og="6";try{window.__reactRouterVersion=og}catch{}const sg="startTransition",wu=Jf[sg];function ig(e){let{basename:t,children:n,future:r,window:l}=e,o=x.useRef();o.current==null&&(o.current=dh({window:l,v5Compat:!0}));let i=o.current,[a,u]=x.useState({action:i.action,location:i.location}),{v7_startTransition:f}=r||{},p=x.useCallback(h=>{f&&wu?wu(()=>u(h)):u(h)},[u,f]);return x.useLayoutEffect(()=>i.listen(p),[i,p]),x.useEffect(()=>ng(r),[r]),x.createElement(rg,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}var ku;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ku||(ku={}));var bu;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(bu||(bu={}));/**
68
+ * @license lucide-react v0.303.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */var ag={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"};/**
73
+ * @license lucide-react v0.303.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const ug=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),V=(e,t)=>{const n=x.forwardRef(({color:r="currentColor",size:l=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:a="",children:u,...f},p)=>x.createElement("svg",{ref:p,...ag,width:l,height:l,stroke:r,strokeWidth:i?Number(o)*24/Number(l):o,className:["lucide",`lucide-${ug(e)}`,a].join(" "),...f},[...t.map(([h,m])=>x.createElement(h,m)),...Array.isArray(u)?u:[u]]));return n.displayName=`${e}`,n};/**
78
+ * @license lucide-react v0.303.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const yr=V("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
83
+ * @license lucide-react v0.303.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const cg=V("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
88
+ * @license lucide-react v0.303.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const df=V("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
93
+ * @license lucide-react v0.303.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const dg=V("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
98
+ * @license lucide-react v0.303.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const fg=V("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
103
+ * @license lucide-react v0.303.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const ea=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
108
+ * @license lucide-react v0.303.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const Zs=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
113
+ * @license lucide-react v0.303.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const mg=V("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
118
+ * @license lucide-react v0.303.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const ju=V("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"}]]);/**
123
+ * @license lucide-react v0.303.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const ff=V("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
128
+ * @license lucide-react v0.303.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const pg=V("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
133
+ * @license lucide-react v0.303.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const hg=V("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
138
+ * @license lucide-react v0.303.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const Js=V("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
143
+ * @license lucide-react v0.303.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const gg=V("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
148
+ * @license lucide-react v0.303.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const vg=V("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/**
153
+ * @license lucide-react v0.303.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const xg=V("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
158
+ * @license lucide-react v0.303.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const mf=V("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
163
+ * @license lucide-react v0.303.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const Cl=V("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"}]]);/**
168
+ * @license lucide-react v0.303.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const yg=V("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
173
+ * @license lucide-react v0.303.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const wg=V("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
178
+ * @license lucide-react v0.303.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const kg=V("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);/**
183
+ * @license lucide-react v0.303.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const bg=V("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
188
+ * @license lucide-react v0.303.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const jg=V("MessageCirclePlus",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
193
+ * @license lucide-react v0.303.0 - ISC
194
+ *
195
+ * This source code is licensed under the ISC license.
196
+ * See the LICENSE file in the root directory of this source tree.
197
+ */const pf=V("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
198
+ * @license lucide-react v0.303.0 - ISC
199
+ *
200
+ * This source code is licensed under the ISC license.
201
+ * See the LICENSE file in the root directory of this source tree.
202
+ */const Ng=V("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
203
+ * @license lucide-react v0.303.0 - ISC
204
+ *
205
+ * This source code is licensed under the ISC license.
206
+ * See the LICENSE file in the root directory of this source tree.
207
+ */const Sg=V("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
208
+ * @license lucide-react v0.303.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */const Cg=V("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/**
213
+ * @license lucide-react v0.303.0 - ISC
214
+ *
215
+ * This source code is licensed under the ISC license.
216
+ * See the LICENSE file in the root directory of this source tree.
217
+ */const Eg=V("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
218
+ * @license lucide-react v0.303.0 - ISC
219
+ *
220
+ * This source code is licensed under the ISC license.
221
+ * See the LICENSE file in the root directory of this source tree.
222
+ */const ko=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
223
+ * @license lucide-react v0.303.0 - ISC
224
+ *
225
+ * This source code is licensed under the ISC license.
226
+ * See the LICENSE file in the root directory of this source tree.
227
+ */const ta=V("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
228
+ * @license lucide-react v0.303.0 - ISC
229
+ *
230
+ * This source code is licensed under the ISC license.
231
+ * See the LICENSE file in the root directory of this source tree.
232
+ */const Pg=V("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
233
+ * @license lucide-react v0.303.0 - ISC
234
+ *
235
+ * This source code is licensed under the ISC license.
236
+ * See the LICENSE file in the root directory of this source tree.
237
+ */const ei=V("ScrollText",[["path",{d:"M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4",key:"13a6an"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M15 12h-5",key:"r7krc0"}]]);/**
238
+ * @license lucide-react v0.303.0 - ISC
239
+ *
240
+ * This source code is licensed under the ISC license.
241
+ * See the LICENSE file in the root directory of this source tree.
242
+ */const hf=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
243
+ * @license lucide-react v0.303.0 - ISC
244
+ *
245
+ * This source code is licensed under the ISC license.
246
+ * See the LICENSE file in the root directory of this source tree.
247
+ */const Mg=V("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
248
+ * @license lucide-react v0.303.0 - ISC
249
+ *
250
+ * This source code is licensed under the ISC license.
251
+ * See the LICENSE file in the root directory of this source tree.
252
+ */const na=V("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"}]]);/**
253
+ * @license lucide-react v0.303.0 - ISC
254
+ *
255
+ * This source code is licensed under the ISC license.
256
+ * See the LICENSE file in the root directory of this source tree.
257
+ */const Ag=V("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
258
+ * @license lucide-react v0.303.0 - ISC
259
+ *
260
+ * This source code is licensed under the ISC license.
261
+ * See the LICENSE file in the root directory of this source tree.
262
+ */const Ig=V("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
263
+ * @license lucide-react v0.303.0 - ISC
264
+ *
265
+ * This source code is licensed under the ISC license.
266
+ * See the LICENSE file in the root directory of this source tree.
267
+ */const Tg=V("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]);/**
268
+ * @license lucide-react v0.303.0 - ISC
269
+ *
270
+ * This source code is licensed under the ISC license.
271
+ * See the LICENSE file in the root directory of this source tree.
272
+ */const Gr=V("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
273
+ * @license lucide-react v0.303.0 - ISC
274
+ *
275
+ * This source code is licensed under the ISC license.
276
+ * See the LICENSE file in the root directory of this source tree.
277
+ */const El=V("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
278
+ * @license lucide-react v0.303.0 - ISC
279
+ *
280
+ * This source code is licensed under the ISC license.
281
+ * See the LICENSE file in the root directory of this source tree.
282
+ */const ra=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
283
+ * @license lucide-react v0.303.0 - ISC
284
+ *
285
+ * This source code is licensed under the ISC license.
286
+ * See the LICENSE file in the root directory of this source tree.
287
+ */const gf=V("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);function vf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=vf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xf(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=vf(e))&&(r&&(r+=" "),r+=t);return r}const la="-",Lg=e=>{const t=Rg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(la);return a[0]===""&&a.length!==1&&a.shift(),yf(a,t)||Og(i)},getConflictingClassGroupIds:(i,a)=>{const u=n[i]||[];return a&&r[i]?[...u,...r[i]]:u}}},yf=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),l=r?yf(e.slice(1),r):void 0;if(l)return l;if(t.validators.length===0)return;const o=e.join(la);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Nu=/^\[(.+)\]$/,Og=e=>{if(Nu.test(e)){const t=Nu.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Rg=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return _g(Object.entries(e.classGroups),n).forEach(([o,i])=>{ti(i,r,o,t)}),r},ti=(e,t,n,r)=>{e.forEach(l=>{if(typeof l=="string"){const o=l===""?t:Su(t,l);o.classGroupId=n;return}if(typeof l=="function"){if(zg(l)){ti(l(r),t,n,r);return}t.validators.push({validator:l,classGroupId:n});return}Object.entries(l).forEach(([o,i])=>{ti(i,Su(t,o),n,r)})})},Su=(e,t)=>{let n=e;return t.split(la).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},zg=e=>e.isThemeGetter,_g=(e,t)=>t?e.map(([n,r])=>{const l=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,l]}):e,Fg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const l=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return l(o,i),i},set(o,i){n.has(o)?n.set(o,i):l(o,i)}}},wf="!",Dg=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,l=t[0],o=t.length,i=a=>{const u=[];let f=0,p=0,h;for(let S=0;S<a.length;S++){let d=a[S];if(f===0){if(d===l&&(r||a.slice(S,S+o)===t)){u.push(a.slice(p,S)),p=S+o;continue}if(d==="/"){h=S;continue}}d==="["?f++:d==="]"&&f--}const m=u.length===0?a:a.substring(p),k=m.startsWith(wf),w=k?m.substring(1):m,y=h&&h>p?h-p:void 0;return{modifiers:u,hasImportantModifier:k,baseClassName:w,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:i}):i},Wg=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},$g=e=>({cache:Fg(e.cacheSize),parseClassName:Dg(e),...Lg(e)}),Ug=/\s+/,Bg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:l}=t,o=[],i=e.trim().split(Ug);let a="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:k}=n(f);let w=!!k,y=r(w?m.substring(0,k):m);if(!y){if(!w){a=f+(a.length>0?" "+a:a);continue}if(y=r(m),!y){a=f+(a.length>0?" "+a:a);continue}w=!1}const S=Wg(p).join(":"),d=h?S+wf:S,c=d+y;if(o.includes(c))continue;o.push(c);const g=l(y,w);for(let v=0;v<g.length;++v){const b=g[v];o.push(d+b)}a=f+(a.length>0?" "+a:a)}return a};function Vg(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=kf(t))&&(r&&(r+=" "),r+=n);return r}const kf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=kf(e[r]))&&(n&&(n+=" "),n+=t);return n};function Hg(e,...t){let n,r,l,o=i;function i(u){const f=t.reduce((p,h)=>h(p),e());return n=$g(f),r=n.cache.get,l=n.cache.set,o=a,a(u)}function a(u){const f=r(u);if(f)return f;const p=Bg(u,n);return l(u,p),p}return function(){return o(Vg.apply(null,arguments))}}const te=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},bf=/^\[(?:([a-z-]+):)?(.+)\]$/i,Qg=/^\d+\/\d+$/,Gg=new Set(["px","full","screen"]),Yg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,at=e=>Tn(e)||Gg.has(e)||Qg.test(e),kt=e=>Hn(e,"length",sv),Tn=e=>!!e&&!Number.isNaN(Number(e)),Xo=e=>Hn(e,"number",Tn),er=e=>!!e&&Number.isInteger(Number(e)),Jg=e=>e.endsWith("%")&&Tn(e.slice(0,-1)),H=e=>bf.test(e),bt=e=>Yg.test(e),ev=new Set(["length","size","percentage"]),tv=e=>Hn(e,ev,jf),nv=e=>Hn(e,"position",jf),rv=new Set(["image","url"]),lv=e=>Hn(e,rv,av),ov=e=>Hn(e,"",iv),tr=()=>!0,Hn=(e,t,n)=>{const r=bf.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},sv=e=>Kg.test(e)&&!qg.test(e),jf=()=>!1,iv=e=>Xg.test(e),av=e=>Zg.test(e),uv=()=>{const e=te("colors"),t=te("spacing"),n=te("blur"),r=te("brightness"),l=te("borderColor"),o=te("borderRadius"),i=te("borderSpacing"),a=te("borderWidth"),u=te("contrast"),f=te("grayscale"),p=te("hueRotate"),h=te("invert"),m=te("gap"),k=te("gradientColorStops"),w=te("gradientColorStopPositions"),y=te("inset"),S=te("margin"),d=te("opacity"),c=te("padding"),g=te("saturate"),v=te("scale"),b=te("sepia"),N=te("skew"),E=te("space"),T=te("translate"),$=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",H,t],L=()=>[H,t],I=()=>["",at,kt],z=()=>["auto",Tn,H],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",H],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>[Tn,H];return{cacheSize:500,separator:":",theme:{colors:[tr],spacing:[at,kt],blur:["none","",bt,H],brightness:_(),borderColor:[e],borderRadius:["none","","full",bt,H],borderSpacing:L(),borderWidth:I(),contrast:_(),grayscale:W(),hueRotate:_(),invert:W(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Jg,kt],inset:O(),margin:O(),opacity:_(),padding:L(),saturate:_(),scale:_(),sepia:W(),skew:_(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[bt]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),H]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",er,H]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",H]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",er,H]}],"grid-cols":[{"grid-cols":[tr]}],"col-start-end":[{col:["auto",{span:["full",er,H]},H]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[tr]}],"row-start-end":[{row:["auto",{span:[er,H]},H]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",H]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",H]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[c]}],px:[{px:[c]}],py:[{py:[c]}],ps:[{ps:[c]}],pe:[{pe:[c]}],pt:[{pt:[c]}],pr:[{pr:[c]}],pb:[{pb:[c]}],pl:[{pl:[c]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",H,t]}],"min-w":[{"min-w":[H,t,"min","max","fit"]}],"max-w":[{"max-w":[H,t,"none","full","min","max","fit","prose",{screen:[bt]},bt]}],h:[{h:[H,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[H,t,"auto","min","max","fit"]}],"font-size":[{text:["base",bt,kt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xo]}],"font-family":[{font:[tr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",H]}],"line-clamp":[{"line-clamp":["none",Tn,Xo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",at,H]}],"list-image":[{"list-image":["none",H]}],"list-style-type":[{list:["none","disc","decimal",H]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[d]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[d]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",at,kt]}],"underline-offset":[{"underline-offset":["auto",at,H]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[d]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),nv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[d]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[d]}],"divide-style":[{divide:F()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[at,H]}],"outline-w":[{outline:[at,kt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[d]}],"ring-offset-w":[{"ring-offset":[at,kt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",bt,ov]}],"shadow-color":[{shadow:[tr]}],opacity:[{opacity:[d]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",bt,H]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[h]}],saturate:[{saturate:[g]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[d]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",H]}],duration:[{duration:_()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:_()}],animate:[{animate:["none","spin","ping","pulse","bounce",H]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[v]}],"scale-x":[{"scale-x":[v]}],"scale-y":[{"scale-y":[v]}],rotate:[{rotate:[er,H]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",H]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",H]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[at,kt,Xo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},cv=Hg(uv);function Pl(...e){return cv(xf(e))}const dv=[{id:"agents",label:"Agents",icon:yr,description:"Manage AI agents"},{id:"code",label:"Code",icon:mg,description:"Code editor"},{id:"worktrees",label:"Worktrees",icon:Cl,description:"Git workspaces"},{id:"skills",label:"Skills",icon:El,description:"Reusable prompts"},{id:"automations",label:"Automations",icon:Zs,description:"Scheduled tasks"},{id:"audit",label:"Audit",icon:ei,description:"Activity log"}],fv=({activeTab:e,onTabChange:t})=>s.jsxs("aside",{className:"w-64 bg-[var(--color-bg-secondary)] border-r border-[var(--color-border)] flex flex-col","data-testid":"sidebar",children:[s.jsx("div",{className:"p-6 border-b border-[var(--color-border)]",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 bg-neutral-900 rounded-lg flex items-center justify-center",children:s.jsx(yr,{className:"w-5 h-5 text-white"})}),s.jsxs("div",{children:[s.jsx("span",{className:"font-semibold text-lg tracking-tight",children:"Codex"}),s.jsx("span",{className:"text-xs text-neutral-400 block",children:"Linux"})]})]})}),s.jsx("nav",{className:"flex-1 p-3 space-y-1 overflow-y-auto","data-testid":"sidebar-nav",children:dv.map(n=>{const r=n.icon,l=e===n.id;return s.jsxs("button",{onClick:()=>t(n.id),className:Pl("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200 group",l?"bg-neutral-900 text-white shadow-sm":"text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900"),"data-testid":`nav-${n.id}`,children:[s.jsx(r,{className:Pl("w-4 h-4 transition-transform duration-200",l?"":"group-hover:scale-110")}),s.jsxs("div",{className:"flex-1 text-left",children:[s.jsx("span",{className:"block",children:n.label}),!l&&s.jsx("span",{className:"text-xs text-neutral-400 font-normal opacity-0 group-hover:opacity-100 transition-opacity",children:n.description})]}),l&&s.jsx(ea,{className:"w-4 h-4 opacity-50"})]},n.id)})}),s.jsx("div",{className:"p-3 border-t border-[var(--color-border)]",children:s.jsxs("button",{onClick:()=>t("settings"),className:Pl("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200",e==="settings"?"bg-neutral-900 text-white":"text-neutral-600 hover:bg-neutral-100 hover:text-neutral-900"),"data-testid":"nav-settings",children:[s.jsx(na,{className:"w-4 h-4"}),s.jsx("span",{children:"Settings"})]})})]}),mv=({activeTab:e,agents:t,onSettingsClick:n})=>{const r=t.filter(f=>f.status==="running").length,l=()=>{switch(e){case"agents":return"Agents";case"worktrees":return"Worktrees";case"skills":return"Skills";case"automations":return"Automations";case"settings":return"Settings";default:return"Codex"}},o=()=>{switch(e){case"agents":return"Manage your AI coding agents";case"worktrees":return"Isolated Git workspaces";case"skills":return"Reusable AI capabilities";case"automations":return"Scheduled tasks and workflows";case"settings":return"Configure your preferences";default:return""}},i=()=>{window.electronAPI.window.minimize()},a=()=>{window.electronAPI.window.maximize()},u=()=>{window.electronAPI.window.close()};return s.jsxs("header",{className:"h-16 border-b border-[var(--color-border)] bg-[var(--color-bg-elevated)] flex items-center justify-between px-6","data-testid":"app-header",children:[s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold tracking-tight text-[var(--color-text-primary)]","data-testid":"page-title",children:l()}),s.jsx("p",{className:"text-xs text-[var(--color-text-tertiary)]",children:o()})]}),e==="agents"&&r>0&&s.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-green-50 text-green-700 rounded-full text-xs font-medium","data-testid":"running-agents-badge",children:[s.jsxs("span",{className:"relative flex h-2 w-2",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-green-500"})]}),r," running"]}),s.jsxs("div",{className:"relative hidden md:block",children:[s.jsx(hf,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-neutral-400"}),s.jsx("input",{type:"text",placeholder:"Search...",className:"pl-9 pr-4 py-2 bg-neutral-100 border-0 rounded-lg text-sm w-64 focus:ring-2 focus:ring-neutral-200 transition-all","data-testid":"search-input"})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:i,className:"p-2 hover:bg-neutral-100 rounded-lg text-neutral-500 hover:text-neutral-900 transition-colors","data-testid":"window-minimize",children:s.jsx(Ng,{className:"w-4 h-4"})}),s.jsx("button",{onClick:a,className:"p-2 hover:bg-neutral-100 rounded-lg text-neutral-500 hover:text-neutral-900 transition-colors","data-testid":"window-maximize",children:s.jsx(Ig,{className:"w-4 h-4"})}),s.jsx("button",{onClick:u,className:"p-2 hover:bg-red-50 hover:text-red-600 rounded-lg text-neutral-500 transition-colors","data-testid":"window-close",children:s.jsx(ra,{className:"w-4 h-4"})})]})]})};var Nn=(e=>(e.PENDING="pending",e.APPROVED="approved",e.REJECTED="rejected",e.APPLIED="applied",e))(Nn||{});const pv=({changes:e,onApprove:t,onReject:n,onApply:r,onAddLineComment:l,onDeleteLineComment:o,initialComments:i={}})=>{var L;const[a,u]=x.useState(0),[f,p]=x.useState("unified"),[h,m]=x.useState(null),[k,w]=x.useState(""),[y,S]=x.useState(i),d=x.useRef(null),c=e[a],g=I=>{const z=[],A=I.split(`
288
+ `);let F=0,K=0;for(const C of A)if(C.startsWith("@@")){const W=C.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);W&&(F=parseInt(W[1])-1,K=parseInt(W[2])-1),z.push({type:"header",content:C})}else C.startsWith("+")?(K++,z.push({type:"addition",content:C.slice(1),newLineNum:K})):C.startsWith("-")?(F++,z.push({type:"deletion",content:C.slice(1),oldLineNum:F})):C.startsWith(" ")?(F++,K++,z.push({type:"context",content:C.slice(1),oldLineNum:F,newLineNum:K})):(C.startsWith("diff")||C.startsWith("index")||C.startsWith("---")||C.startsWith("+++"))&&z.push({type:"header",content:C});return z},v=I=>{const z=(I.match(/^\+/gm)||[]).length,A=(I.match(/^-/gm)||[]).length;return{additions:z,deletions:A}},b=I=>{m(I===h?null:I),I!==h&&setTimeout(()=>{var z;return(z=d.current)==null?void 0:z.focus()},100)},N=I=>{if(!k.trim()||!c)return;const z={id:`comment-${Date.now()}`,lineNumber:I,content:k.trim(),author:"You",createdAt:new Date},A=c.id;S(F=>({...F,[A]:[...F[A]||[],z]})),l==null||l(A,I,k.trim()),w(""),m(null)},E=I=>{if(!c)return;const z=c.id;S(A=>{var F;return{...A,[z]:((F=A[z])==null?void 0:F.filter(K=>K.id!==I))||[]}}),o==null||o(I)},T=I=>{var z;return c?((z=y[c.id])==null?void 0:z.filter(A=>A.lineNumber===I))||[]:[]};if(!c)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground p-8",children:[s.jsx(kg,{className:"w-16 h-16 mb-4 opacity-30"}),s.jsx("h3",{className:"text-lg font-medium",children:"No Changes to Review"}),s.jsx("p",{className:"text-sm mt-2",children:"All changes have been reviewed"})]});const $=v(c.diff),M=g(c.diff),O=((L=y[c.id])==null?void 0:L.length)||0;return s.jsxs("div",{className:"flex flex-col h-full bg-card",children:[s.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between bg-background/50",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Js,{className:"w-5 h-5 text-muted-foreground"}),s.jsx("span",{className:"font-medium truncate max-w-md",children:c.filePath})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsxs("span",{className:"text-green-500",children:["+",$.additions]}),s.jsxs("span",{className:"text-red-500",children:["-",$.deletions]})]}),O>0&&s.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:[s.jsx(pf,{className:"w-3 h-3"}),O]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-sm text-muted-foreground",children:[a+1," of ",e.length]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>u(Math.max(0,a-1)),disabled:a===0,className:"p-1.5 hover:bg-muted rounded-md disabled:opacity-50",children:s.jsx(fg,{className:"w-4 h-4"})}),s.jsx("button",{onClick:()=>u(Math.min(e.length-1,a+1)),disabled:a===e.length-1,className:"p-1.5 hover:bg-muted rounded-md disabled:opacity-50",children:s.jsx(ea,{className:"w-4 h-4"})})]})]})]}),s.jsxs("div",{className:"px-4 py-2 border-b border-border flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>p("unified"),className:`px-3 py-1 text-sm rounded-md transition-colors ${f==="unified"?"bg-primary text-primary-foreground":"hover:bg-muted"}`,children:"Unified"}),s.jsx("button",{onClick:()=>p("split"),className:`px-3 py-1 text-sm rounded-md transition-colors ${f==="split"?"bg-primary text-primary-foreground":"hover:bg-muted"}`,children:"Split"})]}),s.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${c.status===Nn.PENDING?"bg-yellow-500/10 text-yellow-500":c.status===Nn.APPROVED?"bg-green-500/10 text-green-500":c.status===Nn.REJECTED?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:c.status})]}),s.jsx("div",{className:"flex-1 overflow-auto bg-background",children:f==="unified"?s.jsx("div",{className:"font-mono text-sm",children:M.map((I,z)=>{const A=I.newLineNum||I.oldLineNum||z,F=T(A),K=h===z;return s.jsxs("div",{children:[s.jsxs("div",{onClick:()=>I.type!=="header"&&b(z),className:`flex px-4 py-0.5 group cursor-pointer transition-colors ${I.type==="addition"?"bg-green-500/10 hover:bg-green-500/20":I.type==="deletion"?"bg-red-500/10 hover:bg-red-500/20":I.type==="header"?"bg-muted/50 text-muted-foreground":"hover:bg-muted/50"} ${K?"ring-2 ring-primary ring-inset":""}`,children:[s.jsxs("div",{className:"flex gap-2 w-20 flex-shrink-0 text-muted-foreground select-none",children:[s.jsx("span",{className:"w-8 text-right",children:I.oldLineNum||""}),s.jsx("span",{className:"w-8 text-right",children:I.newLineNum||""})]}),s.jsx("span",{className:`w-6 flex-shrink-0 select-none ${I.type==="addition"?"text-green-500":I.type==="deletion"?"text-red-500":"text-muted-foreground"}`,children:I.type==="addition"?"+":I.type==="deletion"?"-":" "}),s.jsx("span",{className:`flex-1 ${I.type==="addition"?"text-green-700 dark:text-green-300":I.type==="deletion"?"text-red-700 dark:text-red-300":""}`,children:I.content||" "}),I.type!=="header"&&s.jsx("button",{onClick:C=>{C.stopPropagation(),b(z)},className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-muted rounded transition-opacity",title:"Add comment",children:s.jsx(jg,{className:"w-3.5 h-3.5 text-muted-foreground"})})]}),F.length>0&&s.jsx("div",{className:"bg-muted/30 border-l-2 border-primary ml-4 mr-4 my-1 rounded-r",children:F.map(C=>s.jsxs("div",{className:"p-3 border-b border-border last:border-b-0",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx("span",{className:"font-medium text-foreground",children:C.author}),s.jsx("span",{children:"•"}),s.jsx("span",{children:new Date(C.createdAt).toLocaleString()})]}),s.jsx("button",{onClick:()=>E(C.id),className:"p-1 hover:bg-muted rounded opacity-0 hover:opacity-100 transition-opacity",title:"Delete comment",children:s.jsx(Gr,{className:"w-3 h-3 text-muted-foreground"})})]}),s.jsx("p",{className:"text-sm mt-1",children:C.content})]},C.id))}),K&&I.type!=="header"&&s.jsxs("div",{className:"px-4 py-2 bg-primary/5 border-l-2 border-primary ml-4 mr-4 my-1 rounded-r",children:[s.jsx("textarea",{ref:d,value:k,onChange:C=>w(C.target.value),placeholder:"Add a comment on this line...",className:"w-full px-3 py-2 bg-background border border-input rounded-md text-sm resize-none",rows:2,onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),N(A)),C.key==="Escape"&&(m(null),w(""))}}),s.jsxs("div",{className:"flex items-center justify-end gap-2 mt-2",children:[s.jsx("button",{onClick:()=>{m(null),w("")},className:"px-3 py-1 text-xs text-muted-foreground hover:text-foreground",children:"Cancel"}),s.jsxs("button",{onClick:()=>N(A),disabled:!k.trim(),className:"flex items-center gap-1 px-3 py-1 bg-primary text-primary-foreground rounded-md text-xs hover:bg-primary/90 disabled:opacity-50",children:[s.jsx(Mg,{className:"w-3 h-3"}),"Comment"]})]})]})]},z)})}):s.jsxs("div",{className:"grid grid-cols-2 gap-0 font-mono text-sm",children:[s.jsxs("div",{className:"border-r border-border",children:[s.jsx("div",{className:"px-2 py-1 bg-muted text-xs text-muted-foreground sticky top-0",children:"Before"}),M.map((I,z)=>s.jsxs("div",{className:`flex px-2 py-0.5 ${I.type==="deletion"?"bg-red-500/10 text-red-700 dark:text-red-300":""} ${I.type==="header"?"text-muted-foreground text-xs":""}`,children:[s.jsx("span",{className:"w-8 text-right text-muted-foreground select-none mr-2",children:I.oldLineNum||""}),s.jsx("span",{children:I.content||" "})]},`old-${z}`))]}),s.jsxs("div",{children:[s.jsx("div",{className:"px-2 py-1 bg-muted text-xs text-muted-foreground sticky top-0",children:"After"}),M.map((I,z)=>s.jsxs("div",{className:`flex px-2 py-0.5 ${I.type==="addition"?"bg-green-500/10 text-green-700 dark:text-green-300":""} ${I.type==="header"?"text-muted-foreground text-xs":""}`,children:[s.jsx("span",{className:"w-8 text-right text-muted-foreground select-none mr-2",children:I.newLineNum||""}),s.jsx("span",{children:I.content||" "})]},`new-${z}`))]})]})}),s.jsx("div",{className:"px-4 py-3 border-t border-border flex items-center justify-between bg-background/50",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:()=>n(c.id),className:"flex items-center gap-2 px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded-md transition-colors",children:[s.jsx(ra,{className:"w-4 h-4"}),"Reject"]}),s.jsxs("button",{onClick:()=>{t(c.id),a<e.length-1&&u(a+1)},className:"flex items-center gap-2 px-4 py-2 text-sm bg-green-500/10 text-green-500 hover:bg-green-500/20 rounded-md transition-colors",children:[s.jsx(df,{className:"w-4 h-4"}),"Approve"]}),c.status===Nn.APPROVED&&s.jsxs("button",{onClick:()=>r(c.id),className:"flex items-center gap-2 px-4 py-2 text-sm bg-primary text-primary-foreground hover:bg-primary/90 rounded-md transition-colors",children:[s.jsx(yg,{className:"w-4 h-4"}),"Apply"]})]})})]})},hv=({agents:e,providers:t,skills:n,onCreateAgent:r,onDeleteAgent:l})=>{var ue,we;const[o,i]=x.useState(!1),[a,u]=x.useState(null),[f,p]=x.useState([]),[h,m]=x.useState(!1),[k,w]=x.useState([]),[y,S]=x.useState([]),[d,c]=x.useState(!1),[g,v]=x.useState({}),[b,N]=x.useState({}),[E,T]=x.useState("task"),[$,M]=x.useState(""),[O,L]=x.useState({name:"",projectPath:"",providerId:((ue=t[0])==null?void 0:ue.id)||"",model:"",skills:[]}),I=x.useMemo(()=>a?f.filter(j=>j.agentId===a.id):[],[f,a]),z=async j=>{m(!0);try{const D=await window.electronAPI.changes.list(j);p(D)}catch(D){console.error("Failed to load code changes:",D)}finally{m(!1)}},A=async j=>{try{const D=await window.electronAPI.queue.list(j);w(D)}catch(D){console.error("Failed to load queue:",D)}},F=async j=>{try{const D=await window.electronAPI.queue.history(j,20);S(D)}catch(D){console.error("Failed to load queue history:",D)}};x.useEffect(()=>{a&&(z(a.id),A(a.id),F(a.id))},[a==null?void 0:a.id]),x.useEffect(()=>{const j=(ee,Z)=>{v(Ge=>({...Ge,[Z.agentId]:!0}))},D=async(ee,Z)=>{const Ge=b[Z.agentId];if(Ge){try{await window.electronAPI.queue.complete(Z.agentId,Ge.id,"completed"),await A(Z.agentId)}catch(Ye){console.error("Failed to complete queued item:",Ye)}N(Ye=>({...Ye,[Z.agentId]:null}))}v(Ye=>({...Ye,[Z.agentId]:!1}))},G=async(ee,Z)=>{const Ge=b[Z.agentId];if(Ge){try{await window.electronAPI.queue.complete(Z.agentId,Ge.id,"failed",Z.error?String(Z.error):void 0),await A(Z.agentId)}catch(Ye){console.error("Failed to fail queued item:",Ye)}N(Ye=>({...Ye,[Z.agentId]:null}))}v(Ye=>({...Ye,[Z.agentId]:!1}))};return window.electronAPI.on("agent:taskStarted",j),window.electronAPI.on("agent:taskCompleted",D),window.electronAPI.on("agent:taskFailed",G),()=>{window.electronAPI.removeListener("agent:taskStarted",j),window.electronAPI.removeListener("agent:taskCompleted",D),window.electronAPI.removeListener("agent:taskFailed",G)}},[b]),x.useEffect(()=>{if(!a)return;const j=a.id;g[j]||b[j]||!k.some(ee=>(ee.status||"pending")==="pending")||(v(ee=>({...ee,[j]:!0})),(async()=>{try{const ee=await window.electronAPI.queue.claimNext(j);if(!ee){v(Z=>({...Z,[j]:!1}));return}N(Z=>({...Z,[j]:ee})),await A(j),ee.type==="message"?(await window.electronAPI.agent.sendMessage(j,ee.content),await window.electronAPI.queue.complete(j,ee.id,"completed"),N(Z=>({...Z,[j]:null})),await A(j),v(Z=>({...Z,[j]:!1}))):await window.electronAPI.agent.executeTask(j,ee.content)}catch(ee){console.error("Failed to dispatch queued item:",ee);const Z=b[j];if(Z){try{await window.electronAPI.queue.complete(j,Z.id,"failed",ee instanceof Error?ee.message:String(ee))}catch{}N(Ge=>({...Ge,[j]:null}))}v(Ge=>({...Ge,[j]:!1})),await A(j),await window.electronAPI.notification.show({title:"Queue dispatch failed",body:ee instanceof Error?ee.message:String(ee)})}})())},[k,g,b,a==null?void 0:a.id]),x.useEffect(()=>{const j=(D,G)=>{a&&G.agentId===a.id&&z(a.id)};return window.electronAPI.on("changes:created",j),()=>{window.electronAPI.removeListener("changes:created",j)}},[a==null?void 0:a.id]);const K=async()=>{var j;try{await r(O),i(!1),L({name:"",projectPath:"",providerId:((j=t[0])==null?void 0:j.id)||"",model:"",skills:[]})}catch(D){console.error("Failed to create agent:",D)}},C=async(j,D)=>{try{await window.electronAPI.agent.sendMessage(j,D)}catch(G){console.error("Failed to send message:",G)}},W=async j=>{if(a)try{await window.electronAPI.changes.approve(j),await z(a.id),await window.electronAPI.notification.show({title:"Change approved",body:"The change is approved and ready to apply."})}catch(D){console.error("Failed to approve change:",D),await window.electronAPI.notification.show({title:"Approve failed",body:D instanceof Error?D.message:String(D)})}},U=async(j,D)=>{if(a)try{const G=typeof D=="string"?D:window.prompt("Rejection comment (optional):")??void 0;await window.electronAPI.changes.reject(j,G),await z(a.id),await window.electronAPI.notification.show({title:"Change rejected",body:"The change was rejected."})}catch(G){console.error("Failed to reject change:",G),await window.electronAPI.notification.show({title:"Reject failed",body:G instanceof Error?G.message:String(G)})}},_=async j=>{if(a)try{await window.electronAPI.changes.apply(j),await z(a.id),await window.electronAPI.notification.show({title:"Change applied",body:"The change was written to the worktree."})}catch(D){console.error("Failed to apply change:",D),await window.electronAPI.notification.show({title:"Apply failed",body:D instanceof Error?D.message:String(D)})}},B=j=>{switch(j){case"running":return s.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"});case"paused":return s.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"});case"error":return s.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"});default:return s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full"})}};return s.jsxs("div",{className:"h-full flex",children:[s.jsxs("div",{className:"w-80 border-r border-border bg-card flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[s.jsx("h2",{className:"font-semibold",children:"Active Agents"}),s.jsx("button",{onClick:()=>i(!0),className:"p-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90",children:s.jsx(ko,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"flex-1 overflow-auto p-2 space-y-2",children:[e.map(j=>s.jsxs("div",{onClick:()=>u(j),className:`p-3 rounded-lg cursor-pointer transition-colors ${(a==null?void 0:a.id)===j.id?"bg-primary/10 border border-primary/30":"hover:bg-muted border border-transparent"}`,children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yr,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("span",{className:"font-medium text-sm",children:j.name})]}),B(j.status)]}),s.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:[s.jsx("div",{className:"truncate",children:j.projectPath}),s.jsx("div",{className:"mt-1",children:j.model})]})]},j.id)),e.length===0&&s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(yr,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),s.jsx("p",{className:"text-sm",children:"No agents yet"}),s.jsx("p",{className:"text-xs mt-1",children:"Create your first agent to get started"})]})]})]}),s.jsx("div",{className:"flex-1 flex flex-col",children:a?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:a.name}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.projectPath," • ",a.model]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:()=>C(a.id,"Hello!"),className:"px-3 py-1.5 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90",children:[s.jsx(pf,{className:"w-4 h-4 inline mr-1"}),"Chat"]}),s.jsx("button",{onClick:()=>l(a.id),className:"p-2 text-destructive hover:bg-destructive/10 rounded-md",children:s.jsx(Gr,{className:"w-4 h-4"})})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"bg-card border border-border rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium",children:"Queue"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Stack work while the agent is busy"})]}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[k.length," queued",g[a.id]?" • running":""]})]}),s.jsxs("div",{className:"mt-3 flex gap-2",children:[s.jsxs("select",{value:E,onChange:j=>T(j.target.value),className:"px-2 py-2 bg-background border border-input rounded-md text-sm",children:[s.jsx("option",{value:"task",children:"Task"}),s.jsx("option",{value:"message",children:"Message"})]}),s.jsx("input",{value:$,onChange:j=>M(j.target.value),placeholder:E==="task"?"Describe the task...":"Type a message...",className:"flex-1 px-3 py-2 bg-background border border-input rounded-md text-sm"}),s.jsx("button",{onClick:()=>{if(!$.trim()||!a)return;const j=a.id;(async()=>{try{await window.electronAPI.queue.enqueue(j,E,$.trim()),M(""),await A(j)}catch(D){await window.electronAPI.notification.show({title:"Enqueue failed",body:D instanceof Error?D.message:String(D)})}})()},className:"px-3 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 text-sm",children:"Add"})]}),s.jsxs("div",{className:"mt-3 space-y-2 max-h-40 overflow-auto",children:[k.map((j,D)=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded-md",children:[s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-background border border-border",children:j.type}),s.jsx("span",{className:"text-sm flex-1 truncate",children:j.content}),s.jsx("button",{onClick:()=>{const G=a.id;(async()=>(await window.electronAPI.queue.delete(G,j.id),await A(G)))()},className:"text-xs text-destructive hover:underline",children:"Remove"}),s.jsx("button",{disabled:D===0,onClick:()=>{const G=a.id;(async()=>(await window.electronAPI.queue.moveUp(G,j.id),await A(G)))()},className:"text-xs text-muted-foreground disabled:opacity-50",children:"Up"})]},j.id)),k.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground",children:"No queued items"})]}),s.jsxs("div",{className:"mt-3",children:[s.jsxs("button",{onClick:()=>c(!d),className:"text-xs text-muted-foreground hover:text-foreground",children:[d?"Hide":"Show"," history (",y.length,")"]}),d&&s.jsxs("div",{className:"mt-2 space-y-1 max-h-32 overflow-auto",children:[y.map(j=>s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted/50 rounded-md text-xs",children:[s.jsx("span",{className:`px-1.5 py-0.5 rounded-full ${j.status==="completed"?"bg-green-500/10 text-green-500":"bg-red-500/10 text-red-500"}`,children:j.status}),s.jsx("span",{className:"text-muted-foreground",children:j.type}),s.jsx("span",{className:"flex-1 truncate",children:j.content}),j.error&&s.jsx("span",{className:"text-red-500 truncate",title:j.error,children:"⚠️"})]},j.id)),y.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground",children:"No completed items yet"})]})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium mb-2",children:"Status"}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${a.status==="running"?"bg-green-500/10 text-green-500":a.status==="paused"?"bg-yellow-500/10 text-yellow-500":a.status==="error"?"bg-red-500/10 text-red-500":"bg-gray-500/10 text-gray-500"}`,children:a.status})})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium mb-2",children:"Skills"}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.skills.map(j=>{const D=n.find(G=>G.id===j);return s.jsx("span",{className:"px-2 py-1 bg-muted rounded-md text-xs",children:(D==null?void 0:D.name)||j},j)}),a.skills.length===0&&s.jsx("span",{className:"text-sm text-muted-foreground",children:"No skills applied"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium mb-2",children:"Recent Tasks"}),s.jsxs("div",{className:"space-y-2",children:[a.tasks.slice(-5).map(j=>s.jsxs("div",{className:"p-3 bg-muted rounded-md",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium",children:j.description}),s.jsx("span",{className:`text-xs ${j.status==="completed"?"text-green-500":j.status==="failed"?"text-red-500":j.status==="running"?"text-blue-500":"text-muted-foreground"}`,children:j.status})]}),j.status==="running"&&s.jsx("div",{className:"mt-2 h-1 bg-muted-foreground/20 rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${j.progress}%`}})})]},j.id)),a.tasks.length===0&&s.jsx("span",{className:"text-sm text-muted-foreground",children:"No tasks yet"})]})]})]}),s.jsxs("div",{className:"bg-card border border-border rounded-lg overflow-hidden min-h-[420px]",children:[s.jsxs("div",{className:"p-3 border-b border-border flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium",children:"Changes"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Review and apply changes generated by the agent"})]}),s.jsx("button",{onClick:async()=>{if(a)try{const D=(await window.electronAPI.checkpoints.list(a.id)).find(ee=>!ee.restoredAt),G=D==null?void 0:D.filePath;await window.electronAPI.checkpoints.restoreLast(a.id),await z(a.id),await window.electronAPI.notification.show({title:"Checkpoint restored",body:G?`Rolled back: ${G}`:"Last applied change was rolled back."})}catch(j){await window.electronAPI.notification.show({title:"Rollback failed",body:j instanceof Error?j.message:String(j)})}},className:"px-3 py-1.5 text-xs bg-muted hover:bg-muted/80 rounded-md",children:"Undo last apply"}),h&&s.jsx("span",{className:"text-xs text-muted-foreground",children:"Loading..."})]}),s.jsx("div",{className:"h-[520px]",children:s.jsx(pv,{changes:I.filter(j=>j.status!==Nn.APPLIED),onApprove:W,onReject:U,onApply:_})})]})]})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:s.jsxs("div",{className:"text-center",children:[s.jsx(yr,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),s.jsx("p",{children:"Select an agent to view details"})]})})}),o&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 w-[500px] max-w-[90vw]",children:[s.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Create New Agent"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Name"}),s.jsx("input",{type:"text",value:O.name,onChange:j=>L({...O,name:j.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",placeholder:"My Coding Agent"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Project Path"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:O.projectPath,onChange:j=>L({...O,projectPath:j.target.value}),className:"flex-1 px-3 py-2 bg-background border border-input rounded-md",placeholder:"/path/to/project"}),s.jsx("button",{onClick:async()=>{const j=await window.electronAPI.dialog.selectFolder();j&&L({...O,projectPath:j})},className:"px-3 py-2 bg-muted rounded-md hover:bg-muted/80",children:"Browse"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Provider"}),s.jsx("select",{value:O.providerId,onChange:j=>{var G;const D=t.find(ee=>ee.id===j.target.value);L({...O,providerId:j.target.value,model:((G=D==null?void 0:D.models[0])==null?void 0:G.id)||""})},className:"w-full px-3 py-2 bg-background border border-input rounded-md",children:t.map(j=>s.jsx("option",{value:j.id,children:j.name},j.id))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Model"}),s.jsx("select",{value:O.model,onChange:j=>L({...O,model:j.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",children:(we=t.find(j=>j.id===O.providerId))==null?void 0:we.models.map(j=>s.jsx("option",{value:j.id,children:j.name},j.id))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Skills"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(j=>s.jsx("button",{onClick:()=>{const D=O.skills.includes(j.id)?O.skills.filter(G=>G!==j.id):[...O.skills,j.id];L({...O,skills:D})},className:`px-3 py-1.5 rounded-md text-sm transition-colors ${O.skills.includes(j.id)?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:j.name},j.id))})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[s.jsx("button",{onClick:()=>i(!1),className:"px-4 py-2 text-muted-foreground hover:text-foreground",children:"Cancel"}),s.jsx("button",{onClick:K,disabled:!O.name||!O.projectPath,className:"px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 disabled:opacity-50",children:"Create Agent"})]})]})})]})},gv=({worktrees:e,onCreateWorktree:t})=>{const[n,r]=x.useState(!1),[l,o]=x.useState({repoPath:"",name:""}),i=async()=>{try{await t(l.repoPath,l.name),r(!1),o({repoPath:"",name:""})}catch(a){console.error("Failed to create worktree:",a)}};return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Worktrees"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Isolated workspaces for agents"})]}),s.jsxs("button",{onClick:()=>r(!0),className:"flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90",children:[s.jsx(ko,{className:"w-4 h-4"}),"New Worktree"]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.map(a=>{var u;return s.jsxs("div",{className:"p-4 bg-card border border-border rounded-lg",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Cl,{className:"w-5 h-5 text-muted-foreground"}),s.jsx("span",{className:"font-medium",children:a.name})]}),a.isMain&&s.jsx("span",{className:"px-2 py-0.5 bg-primary/10 text-primary text-xs rounded-full",children:"Main"})]}),s.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(mf,{className:"w-4 h-4"}),s.jsx("span",{className:"truncate",children:a.path})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Cl,{className:"w-4 h-4"}),s.jsx("span",{children:a.branch})]}),s.jsx("div",{className:"text-xs font-mono truncate",children:(u=a.commit)==null?void 0:u.slice(0,8)})]}),!a.isMain&&s.jsxs("div",{className:"flex gap-2 mt-4 pt-4 border-t border-border",children:[s.jsxs("button",{className:"flex-1 px-3 py-1.5 text-sm bg-muted rounded-md hover:bg-muted/80",children:[s.jsx(wg,{className:"w-4 h-4 inline mr-1"}),"Merge"]}),s.jsx("button",{className:"p-1.5 text-destructive hover:bg-destructive/10 rounded-md",children:s.jsx(Gr,{className:"w-4 h-4"})})]})]},a.name)}),e.length===0&&s.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-muted-foreground",children:[s.jsx(Cl,{className:"w-16 h-16 mb-4 opacity-30"}),s.jsx("p",{className:"text-lg font-medium",children:"No worktrees yet"}),s.jsx("p",{className:"text-sm",children:"Create a worktree to isolate agent changes"})]})]})}),n&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 w-[500px]",children:[s.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Create New Worktree"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Repository Path"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:l.repoPath,onChange:a=>o({...l,repoPath:a.target.value}),className:"flex-1 px-3 py-2 bg-background border border-input rounded-md",placeholder:"/path/to/repo"}),s.jsx("button",{onClick:async()=>{const a=await window.electronAPI.dialog.selectFolder();a&&o({...l,repoPath:a})},className:"px-3 py-2 bg-muted rounded-md",children:"Browse"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Worktree Name"}),s.jsx("input",{type:"text",value:l.name,onChange:a=>o({...l,name:a.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",placeholder:"feature-branch"})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[s.jsx("button",{onClick:()=>r(!1),className:"px-4 py-2 text-muted-foreground",children:"Cancel"}),s.jsx("button",{onClick:i,disabled:!l.repoPath||!l.name,className:"px-4 py-2 bg-primary text-primary-foreground rounded-md disabled:opacity-50",children:"Create Worktree"})]})]})})]})},vv=({skills:e,onCreateSkill:t})=>{const[n,r]=x.useState(!1),[l,o]=x.useState(null),[i,a]=x.useState(""),[u,f]=x.useState({name:"",description:"",content:""}),p=e.filter(m=>m.name.toLowerCase().includes(i.toLowerCase())||m.description.toLowerCase().includes(i.toLowerCase())||m.tags.some(k=>k.toLowerCase().includes(i.toLowerCase()))),h=async()=>{try{await t(u),r(!1),f({name:"",description:"",content:""})}catch(m){console.error("Failed to create skill:",m)}};return s.jsxs("div",{className:"h-full flex",children:[s.jsxs("div",{className:"w-80 border-r border-border bg-card flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-border",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"font-semibold",children:"Skills Library"}),s.jsx("button",{onClick:()=>r(!0),className:"p-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90",children:s.jsx(ko,{className:"w-4 h-4"})})]}),s.jsx("input",{type:"text",placeholder:"Search skills...",value:i,onChange:m=>a(m.target.value),className:"w-full px-3 py-2 bg-background border border-input rounded-md text-sm"})]}),s.jsxs("div",{className:"flex-1 overflow-auto p-2 space-y-2",children:[p.map(m=>s.jsxs("div",{onClick:()=>o(m),className:`p-3 rounded-lg cursor-pointer transition-colors ${(l==null?void 0:l.id)===m.id?"bg-primary/10 border border-primary/30":"hover:bg-muted border border-transparent"}`,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(El,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("span",{className:"font-medium text-sm",children:m.name})]}),s.jsx("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-2",children:m.description}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:m.tags.slice(0,3).map(k=>s.jsx("span",{className:"px-1.5 py-0.5 bg-muted rounded text-xs",children:k},k))})]},m.id)),p.length===0&&s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(El,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),s.jsx("p",{className:"text-sm",children:"No skills found"})]})]})]}),s.jsx("div",{className:"flex-1 flex flex-col",children:l?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"p-4 border-b border-border flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:l.name}),s.jsx("p",{className:"text-sm text-muted-foreground",children:l.description}),s.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:l.tags.map(m=>s.jsxs("span",{className:"px-2 py-0.5 bg-muted rounded-full text-xs",children:[s.jsx(Tg,{className:"w-3 h-3 inline mr-1"}),m]},m))})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{className:"p-2 hover:bg-muted rounded-md",children:s.jsx(Cg,{className:"w-4 h-4"})}),s.jsx("button",{className:"p-2 text-destructive hover:bg-destructive/10 rounded-md",children:s.jsx(Gr,{className:"w-4 h-4"})})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium mb-2",children:"Files"}),s.jsx("div",{className:"space-y-2",children:l.files.map(m=>s.jsxs("div",{className:"p-3 bg-muted rounded-md",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(gg,{className:"w-4 h-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:m.path}),s.jsx("span",{className:"text-xs text-muted-foreground uppercase",children:m.type})]}),s.jsx("pre",{className:"text-xs bg-background p-2 rounded overflow-x-auto",children:s.jsxs("code",{children:[m.content.slice(0,500),m.content.length>500?"...":""]})})]},m.path))})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium mb-2",children:"Configuration"}),s.jsx("div",{className:"bg-muted p-3 rounded-md text-sm",children:s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Entry Point:"}),s.jsx("span",{className:"ml-2",children:l.config.entryPoint})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Version:"}),s.jsx("span",{className:"ml-2",children:l.version})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Author:"}),s.jsx("span",{className:"ml-2",children:l.author})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Dependencies:"}),s.jsx("span",{className:"ml-2",children:l.config.dependencies.length||"None"})]})]})})]})]})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:s.jsxs("div",{className:"text-center",children:[s.jsx(El,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),s.jsx("p",{children:"Select a skill to view details"})]})})}),n&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 w-[600px]",children:[s.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Create New Skill"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Name"}),s.jsx("input",{type:"text",value:u.name,onChange:m=>f({...u,name:m.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",placeholder:"My Custom Skill"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description"}),s.jsx("textarea",{value:u.description,onChange:m=>f({...u,description:m.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md h-20 resize-none",placeholder:"What does this skill do?"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Content"}),s.jsx("textarea",{value:u.content,onChange:m=>f({...u,content:m.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md h-40 resize-none font-mono text-sm",placeholder:"Enter skill instructions..."})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[s.jsx("button",{onClick:()=>r(!1),className:"px-4 py-2 text-muted-foreground",children:"Cancel"}),s.jsx("button",{onClick:h,disabled:!u.name||!u.content,className:"px-4 py-2 bg-primary text-primary-foreground rounded-md disabled:opacity-50",children:"Create Skill"})]})]})})]})},xv=({automations:e,agents:t,skills:n,onCreateAutomation:r})=>{const[l,o]=x.useState(!1),[i,a]=x.useState({name:"",description:"",triggerType:"schedule",triggerConfig:{cron:"0 9 * * *"},actions:[]}),u=async()=>{try{await r(i),o(!1),a({name:"",description:"",triggerType:"schedule",triggerConfig:{cron:"0 9 * * *"},actions:[]})}catch(p){console.error("Failed to create automation:",p)}},f=async(p,h)=>{try{await window.electronAPI.automation.toggle(p,h)}catch(m){console.error("Failed to toggle automation:",m)}};return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Automations"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Schedule and automate agent tasks"})]}),s.jsxs("button",{onClick:()=>o(!0),className:"flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90",children:[s.jsx(ko,{className:"w-4 h-4"}),"New Automation"]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.map(p=>s.jsxs("div",{className:"p-4 bg-card border border-border rounded-lg",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Zs,{className:"w-5 h-5 text-muted-foreground"}),s.jsx("span",{className:"font-medium",children:p.name})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>f(p.id,!p.enabled),className:`p-1.5 rounded-md ${p.enabled?"text-green-500 hover:bg-green-500/10":"text-muted-foreground hover:bg-muted"}`,children:p.enabled?s.jsx(Sg,{className:"w-4 h-4"}):s.jsx(Eg,{className:"w-4 h-4"})}),s.jsx("button",{className:"p-1.5 text-destructive hover:bg-destructive/10 rounded-md",children:s.jsx(Gr,{className:"w-4 h-4"})})]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:p.description}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(cg,{className:"w-3 h-3"}),s.jsx("span",{className:"capitalize",children:p.trigger.type})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(gf,{className:"w-3 h-3"}),s.jsxs("span",{children:[p.actions.length," actions"]})]}),p.runCount>0&&s.jsxs("div",{children:["Run ",p.runCount," times"]})]}),p.enabled&&s.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs text-green-500",children:[s.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"Active"]})]},p.id)),e.length===0&&s.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-muted-foreground",children:[s.jsx(Zs,{className:"w-16 h-16 mb-4 opacity-30"}),s.jsx("p",{className:"text-lg font-medium",children:"No automations yet"}),s.jsx("p",{className:"text-sm",children:"Create an automation to schedule agent tasks"})]})]})}),l&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 w-[600px]",children:[s.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Create New Automation"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Name"}),s.jsx("input",{type:"text",value:i.name,onChange:p=>a({...i,name:p.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",placeholder:"Daily Code Review"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description"}),s.jsx("textarea",{value:i.description,onChange:p=>a({...i,description:p.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md h-20 resize-none",placeholder:"What does this automation do?"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Trigger Type"}),s.jsxs("select",{value:i.triggerType,onChange:p=>a({...i,triggerType:p.target.value,triggerConfig:p.target.value==="schedule"?{cron:"0 9 * * *"}:{}}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",children:[s.jsx("option",{value:"schedule",children:"Schedule (Cron)"}),s.jsx("option",{value:"event",children:"Event"}),s.jsx("option",{value:"webhook",children:"Webhook"}),s.jsx("option",{value:"manual",children:"Manual Only"})]})]}),i.triggerType==="schedule"&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Cron Expression"}),s.jsx("input",{type:"text",value:i.triggerConfig.cron,onChange:p=>a({...i,triggerConfig:{cron:p.target.value}}),className:"w-full px-3 py-2 bg-background border border-input rounded-md font-mono",placeholder:"0 9 * * *"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Example: 0 9 * * * (every day at 9 AM)"})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[s.jsx("button",{onClick:()=>o(!1),className:"px-4 py-2 text-muted-foreground",children:"Cancel"}),s.jsx("button",{onClick:u,disabled:!i.name,className:"px-4 py-2 bg-primary text-primary-foreground rounded-md disabled:opacity-50",children:"Create Automation"})]})]})})]})},yv=({settings:e,providers:t,onSettingsChange:n})=>{const[r,l]=x.useState(e),[o,i]=x.useState({}),[a,u]=x.useState("general"),[f,p]=x.useState(r.defaultModel),h=async()=>{for(const[d,c]of Object.entries(r))await window.electronAPI.settings.set(d,c);n(r)},m=async(d,c)=>{try{await window.electronAPI.providers.configure(d,{apiKey:c});const g=await window.electronAPI.providers.test(d);alert(g?"Connection successful!":"Connection failed. Please check your API key.")}catch(g){console.error("Failed to configure provider:",g),alert("Failed to configure provider")}},k=(d,c)=>{p(d),l({...r,defaultModel:d,defaultProvider:c})},w=[{id:"general",label:"General"},{id:"providers",label:"AI Providers"},{id:"appearance",label:"Appearance"},{id:"shortcuts",label:"Shortcuts"}],y=t.find(d=>d.isFree),S=t.filter(d=>!d.isFree);return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-border",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(na,{className:"w-5 h-5"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Settings"})]}),s.jsx("div",{className:"flex gap-2",children:w.map(d=>s.jsx("button",{onClick:()=>u(d.id),className:`px-4 py-2 rounded-md text-sm font-medium transition-colors ${a===d.id?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,children:d.label},d.id))})]}),s.jsxs("div",{className:"flex-1 overflow-auto p-6",children:[a==="general"&&s.jsxs("div",{className:"max-w-2xl space-y-6",children:[s.jsxs("section",{children:[s.jsx("h3",{className:"text-lg font-medium mb-4",children:"General Settings"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium",children:"Auto Save"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Automatically save changes"})]}),s.jsx("input",{type:"checkbox",checked:r.autoSave,onChange:d=>l({...r,autoSave:d.target.checked}),className:"w-5 h-5"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium",children:"Max Parallel Agents"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Maximum number of agents running simultaneously"})]}),s.jsx("input",{type:"number",value:r.maxParallelAgents,onChange:d=>l({...r,maxParallelAgents:parseInt(d.target.value)}),className:"w-20 px-3 py-2 bg-background border border-input rounded-md",min:1,max:10})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium",children:"Show Notifications"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Display desktop notifications for agent events"})]}),s.jsx("input",{type:"checkbox",checked:r.showNotifications,onChange:d=>l({...r,showNotifications:d.target.checked}),className:"w-5 h-5"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium",children:"Confirm Destructive Actions"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Show confirmation dialogs before deleting agents or worktrees"})]}),s.jsx("input",{type:"checkbox",checked:r.confirmDestructiveActions,onChange:d=>l({...r,confirmDestructiveActions:d.target.checked}),className:"w-5 h-5"})]})]})]}),s.jsxs("section",{children:[s.jsx("h3",{className:"text-lg font-medium mb-4",children:"Git Configuration"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium mb-1",children:"Author Name"}),s.jsx("input",{type:"text",value:r.gitAuthorName,onChange:d=>l({...r,gitAuthorName:d.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",placeholder:"Your Name"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium mb-1",children:"Author Email"}),s.jsx("input",{type:"email",value:r.gitAuthorEmail,onChange:d=>l({...r,gitAuthorEmail:d.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",placeholder:"your@email.com"})]})]})]})]}),a==="providers"&&s.jsxs("div",{className:"max-w-4xl space-y-6",children:[y&&s.jsxs("section",{className:"p-4 border-2 border-green-500/30 bg-green-500/5 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(Ag,{className:"w-5 h-5 text-green-500"}),s.jsx("h3",{className:"text-lg font-medium",children:"Free AI Models"}),s.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-green-500/20 text-green-500 rounded-full",children:"No API Key Required"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Start using AI immediately with free models from OpenRouter, Groq, Google AI Studio, and Cerebras. No API key required for OpenRouter free tier - just select a model and start chatting!"}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium mb-2",children:"Select Model"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2 max-h-96 overflow-y-auto",children:y.models.sort((d,c)=>{const g=["openrouter","groq","google","cerebras"],v=d.backend||"openrouter",b=c.backend||"openrouter";return g.indexOf(v)-g.indexOf(b)}).map(d=>s.jsxs("button",{onClick:()=>k(d.id,y.id),className:`p-3 text-left rounded-lg border transition-all ${f===d.id?"border-green-500 bg-green-500/10":"border-border hover:border-green-500/50 hover:bg-muted"}`,children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium text-sm truncate",children:d.name}),f===d.id&&s.jsx(df,{className:"w-4 h-4 text-green-500 flex-shrink-0"})]}),s.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[s.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-blue-500/20 text-blue-400",children:d.backend||"openrouter"}),d.supportsVision&&s.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-purple-500/20 text-purple-400",children:"vision"}),d.contextWindow>=1e5&&s.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-orange-500/20 text-orange-400",children:d.contextWindow>=1e6?"1M ctx":`${d.contextWindow/1e3}k ctx`})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 truncate",children:d.description})]},d.id))})]}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[s.jsx("strong",{children:"Tip:"})," OpenRouter models work without an API key. For Groq, Google AI Studio, or Cerebras models, you may need to add your free API key below."]})]}),s.jsxs("section",{children:[s.jsx("h3",{className:"text-lg font-medium mb-4",children:"Premium Providers"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Add your API keys for premium models with higher limits and advanced features."}),s.jsx("div",{className:"space-y-4",children:S.map(d=>s.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium",children:d.name}),s.jsx("p",{className:"text-sm text-muted-foreground",children:d.description})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"radio",name:"activeProvider",checked:r.defaultProvider===d.id,onChange:()=>l({...r,defaultProvider:d.id}),className:"w-4 h-4"}),s.jsx("span",{className:"text-sm",children:"Default"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"API Key"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx("input",{type:o[d.id]?"text":"password",defaultValue:d.config.apiKey,placeholder:`Enter ${d.name} API key`,className:"w-full px-3 py-2 bg-background border border-input rounded-md pr-10",onBlur:c=>m(d.id,c.target.value)}),s.jsx("button",{onClick:()=>i({...o,[d.id]:!o[d.id]}),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:o[d.id]?s.jsx(pg,{className:"w-4 h-4"}):s.jsx(hg,{className:"w-4 h-4"})})]}),s.jsx("button",{onClick:()=>m(d.id,d.config.apiKey||""),className:"px-3 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90",children:"Test"})]})]}),d.models.length>0&&s.jsxs("div",{className:"mt-3",children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Available Models"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:d.models.map(c=>s.jsx("span",{className:"px-2 py-1 bg-background rounded text-xs",children:c.name},c.id))})]})]},d.id))})]}),s.jsxs("section",{className:"p-4 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(gf,{className:"w-4 h-4 text-blue-400"}),s.jsx("h4",{className:"font-medium text-blue-400",children:"Get Free API Keys"})]}),s.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"OpenRouter:"})," ",s.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"openrouter.ai"})," - No key needed for free models"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Ollama:"})," ",s.jsx("a",{href:"https://ollama.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"ollama.com"})," - Local models, no API key needed"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"NVIDIA NIM:"})," ",s.jsx("a",{href:"https://build.nvidia.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"build.nvidia.com"})," - Kimi K2.5, DeepSeek R1, Llama (40 req/min free)"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Groq:"})," ",s.jsx("a",{href:"https://console.groq.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"console.groq.com"})," - Fast inference, generous free tier"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Google AI Studio:"})," ",s.jsx("a",{href:"https://aistudio.google.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"aistudio.google.com"})," - Gemini models free tier"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Cerebras:"})," ",s.jsx("a",{href:"https://cloud.cerebras.ai",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"cloud.cerebras.ai"})," - Ultra-fast inference"]})]})]})]}),a==="appearance"&&s.jsx("div",{className:"max-w-2xl space-y-6",children:s.jsxs("section",{children:[s.jsx("h3",{className:"text-lg font-medium mb-4",children:"Appearance"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium mb-1",children:"Theme"}),s.jsxs("select",{value:r.theme,onChange:d=>l({...r,theme:d.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md",children:[s.jsx("option",{value:"light",children:"Light"}),s.jsx("option",{value:"dark",children:"Dark"}),s.jsx("option",{value:"system",children:"System"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium mb-1",children:"Font Size"}),s.jsx("input",{type:"range",value:r.fontSize,onChange:d=>l({...r,fontSize:parseInt(d.target.value)}),className:"w-full",min:10,max:20}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[r.fontSize,"px"]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block font-medium mb-1",children:"Font Family"}),s.jsx("input",{type:"text",value:r.fontFamily,onChange:d=>l({...r,fontFamily:d.target.value}),className:"w-full px-3 py-2 bg-background border border-input rounded-md"})]})]})]})}),a==="shortcuts"&&s.jsx("div",{className:"max-w-2xl",children:s.jsxs("section",{children:[s.jsx("h3",{className:"text-lg font-medium mb-4",children:"Keyboard Shortcuts"}),s.jsx("div",{className:"space-y-3",children:Object.entries(r.shortcuts).map(([d,c])=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[s.jsx("span",{className:"text-sm capitalize",children:d.replace(/:/g," ")}),s.jsx("input",{type:"text",value:c,onChange:g=>l({...r,shortcuts:{...r.shortcuts,[d]:g.target.value}}),className:"px-3 py-1 bg-background border border-input rounded-md text-sm font-mono w-32"})]},d))})]})})]}),s.jsx("div",{className:"p-4 border-t border-border flex justify-end",children:s.jsxs("button",{onClick:h,className:"flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90",children:[s.jsx(Pg,{className:"w-4 h-4"}),"Save Settings"]})})]})},wv=({rootPath:e,onFileSelect:t,selectedFile:n,fileFilter:r})=>{var S;const[l,o]=x.useState(null),[i,a]=x.useState(""),[u,f]=x.useState(!1),p=x.useCallback(async d=>{try{const c=await window.electronAPI.fs.readdir(d,{withFileTypes:!0}),g=[];for(const v of c){if(v.name.startsWith(".")&&v.name!==".git"||v.name==="node_modules"||v.name==="dist"||v.name==="build")continue;const b=`${d}/${v.name}`,N={name:v.name,path:b,type:v.isDirectory()?"directory":"file"};v.isDirectory()&&(N.children=[]),g.push(N)}return g.sort((v,b)=>v.type===b.type?v.name.localeCompare(b.name):v.type==="directory"?-1:1)}catch(c){return console.error("Failed to load directory:",c),[]}},[]),h=x.useCallback(async()=>{f(!0);const d={name:e.split("/").pop()||"root",path:e,type:"directory",expanded:!0,children:await p(e)};o(d),f(!1)},[e,p]);x.useEffect(()=>{h()},[h]);const m=async(d,c)=>{if(d.type!=="directory"){t(d.path);return}const g=(v,b)=>b.length===0?{...v,expanded:!v.expanded,children:v.expanded?v.children:void 0}:v.children?{...v,children:v.children.map(N=>N.name===b[0]?g(N,b.slice(1)):N)}:v;if(!d.children||d.children.length===0){const v=await p(d.path),b=(N,E)=>E.length===0?{...N,expanded:!0,children:v}:N.children?{...N,children:N.children.map(T=>T.name===E[0]?b(T,E.slice(1)):T)}:N;o(N=>N?b(N,[...c,d.name]):null)}else o(v=>v?g(v,[...c,d.name]):null)},k=(d,c)=>c?d.reduce((g,v)=>{const b=v.name.toLowerCase().includes(c.toLowerCase());if(v.type==="directory"&&v.children){const N=k(v.children,c);(b||N.length>0)&&g.push({...v,children:N,expanded:!0})}else b&&g.push(v);return g},[]):d,w=(d,c=0,g=[])=>{const v=n===d.path,b=c*16+8;return s.jsxs("div",{children:[s.jsxs("div",{onClick:()=>m(d,g),className:`flex items-center gap-1 py-1 px-2 cursor-pointer hover:bg-muted transition-colors ${v?"bg-primary/10 text-primary":""}`,style:{paddingLeft:`${b}px`},children:[d.type==="directory"&&s.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:d.expanded?s.jsx(dg,{className:"w-3 h-3 text-muted-foreground"}):s.jsx(ea,{className:"w-3 h-3 text-muted-foreground"})}),d.type==="directory"?s.jsx(mf,{className:`w-4 h-4 ${v?"text-primary":"text-blue-500"}`}):s.jsx(vg,{className:`w-4 h-4 ${v?"text-primary":"text-muted-foreground"}`}),s.jsx("span",{className:"text-sm truncate",children:d.name})]}),d.type==="directory"&&d.expanded&&d.children&&s.jsx("div",{children:d.children.map(N=>w(N,c+1,[...g,d.name]))})]},d.path)},y=l&&i?{...l,children:k(l.children||[],i)}:l;return s.jsxs("div",{className:"flex flex-col h-full bg-card border-r border-border",children:[s.jsxs("div",{className:"p-3 border-b border-border",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"font-medium text-sm",children:"Explorer"}),s.jsx("button",{onClick:h,className:"p-1.5 hover:bg-muted rounded-md",title:"Refresh",children:s.jsx(ta,{className:`w-4 h-4 ${u?"animate-spin":""}`})})]}),s.jsxs("div",{className:"relative",children:[s.jsx(hf,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground"}),s.jsx("input",{type:"text",value:i,onChange:d=>a(d.target.value),placeholder:"Search files...",className:"w-full pl-8 pr-3 py-1.5 bg-background border border-input rounded-md text-sm"})]})]}),s.jsx("div",{className:"flex-1 overflow-auto py-2",children:y?w(y):s.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:u?"Loading...":"No files"})}),s.jsxs("div",{className:"px-3 py-2 border-t border-border text-xs text-muted-foreground",children:[((S=l==null?void 0:l.children)==null?void 0:S.length)||0," items"]})]})};function Cu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kv(e){if(Array.isArray(e))return e}function bv(e,t,n){return(t=Mv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jv(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,l,o,i,a=[],u=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(p){f=!0,l=p}finally{try{if(!u&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(f)throw l}}return a}}function Nv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
289
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Pu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Eu(Object(n),!0).forEach(function(r){bv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sv(e,t){if(e==null)return{};var n,r,l=Cv(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}function Cv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ev(e,t){return kv(e)||jv(e,t)||Av(e,t)||Nv()}function Pv(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mv(e){var t=Pv(e,"string");return typeof t=="symbol"?t:t+""}function Av(e,t){if(e){if(typeof e=="string")return Cu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cu(e,t):void 0}}function Iv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function Au(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mu(Object(n),!0).forEach(function(r){Iv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(l,o){return o(l)},r)}}function ar(e){return function t(){for(var n=this,r=arguments.length,l=new Array(r),o=0;o<r;o++)l[o]=arguments[o];return l.length>=e.length?e.apply(this,l):function(){for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return t.apply(n,[].concat(l,a))}}}function Jl(e){return{}.toString.call(e).includes("Object")}function Lv(e){return!Object.keys(e).length}function Wr(e){return typeof e=="function"}function Ov(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Rv(e,t){return Jl(t)||Wt("changeType"),Object.keys(t).some(function(n){return!Ov(e,n)})&&Wt("changeField"),t}function zv(e){Wr(e)||Wt("selectorType")}function _v(e){Wr(e)||Jl(e)||Wt("handlerType"),Jl(e)&&Object.values(e).some(function(t){return!Wr(t)})&&Wt("handlersType")}function Fv(e){e||Wt("initialIsRequired"),Jl(e)||Wt("initialType"),Lv(e)&&Wt("initialContent")}function Dv(e,t){throw new Error(e[t]||e.default)}var Wv={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Wt=ar(Dv)(Wv),fl={changes:Rv,selector:zv,handler:_v,initial:Fv};function $v(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};fl.initial(e),fl.handler(t);var n={current:e},r=ar(Vv)(n,t),l=ar(Bv)(n),o=ar(fl.changes)(e),i=ar(Uv)(n);function a(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(p){return p};return fl.selector(f),f(n.current)}function u(f){Tv(r,l,o,i)(f)}return[a,u]}function Uv(e,t){return Wr(t)?t(e.current):t}function Bv(e,t){return e.current=Au(Au({},e.current),t),t}function Vv(e,t,n){return Wr(t)?t(e.current):Object.keys(n).forEach(function(r){var l;return(l=t[r])===null||l===void 0?void 0:l.call(t,e.current[r])}),n}var Hv={create:$v},Qv={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Gv(e){return function t(){for(var n=this,r=arguments.length,l=new Array(r),o=0;o<r;o++)l[o]=arguments[o];return l.length>=e.length?e.apply(this,l):function(){for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return t.apply(n,[].concat(l,a))}}}function Yv(e){return{}.toString.call(e).includes("Object")}function Kv(e){return e||Iu("configIsRequired"),Yv(e)||Iu("configType"),e.urls?(qv(),{paths:{vs:e.urls.monacoBase}}):e}function qv(){console.warn(Nf.deprecation)}function Xv(e,t){throw new Error(e[t]||e.default)}var Nf={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
290
+ You are using deprecated way of configuration.
291
+
292
+ Instead of using
293
+ monaco.config({ urls: { monacoBase: '...' } })
294
+ use
295
+ monaco.config({ paths: { vs: '...' } })
296
+
297
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
298
+ `},Iu=Gv(Xv)(Nf),Zv={config:Kv},Jv=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(l){return n.reduceRight(function(o,i){return i(o)},l)}};function Sf(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Sf(e[n],t[n]))}),Pu(Pu({},e),t)}var ex={type:"cancelation",msg:"operation is manually canceled"};function Zo(e){var t=!1,n=new Promise(function(r,l){e.then(function(o){return t?l(ex):r(o)}),e.catch(l)});return n.cancel=function(){return t=!0},n}var tx=["monaco"],nx=Hv.create({config:Qv,isInitialized:!1,resolve:null,reject:null,monaco:null}),Cf=Ev(nx,2),Yr=Cf[0],bo=Cf[1];function rx(e){var t=Zv.config(e),n=t.monaco,r=Sv(t,tx);bo(function(l){return{config:Sf(l.config,r),monaco:n}})}function lx(){var e=Yr(function(t){var n=t.monaco,r=t.isInitialized,l=t.resolve;return{monaco:n,isInitialized:r,resolve:l}});if(!e.isInitialized){if(bo({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Zo(Jo);if(window.monaco&&window.monaco.editor)return Ef(window.monaco),e.resolve(window.monaco),Zo(Jo);Jv(ox,ix)(ax)}return Zo(Jo)}function ox(e){return document.body.appendChild(e)}function sx(e){var t=document.createElement("script");return e&&(t.src=e),t}function ix(e){var t=Yr(function(r){var l=r.config,o=r.reject;return{config:l,reject:o}}),n=sx("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function ax(){var e=Yr(function(n){var r=n.config,l=n.resolve,o=n.reject;return{config:r,resolve:l,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var r=n.m||n;Ef(r),e.resolve(r)},function(n){e.reject(n)})}function Ef(e){Yr().monaco||bo({monaco:e})}function ux(){return Yr(function(e){var t=e.monaco;return t})}var Jo=new Promise(function(e,t){return bo({resolve:e,reject:t})}),Pf={config:rx,init:lx,__getMonacoInstance:ux},cx={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},es=cx,dx={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},fx=dx;function mx({children:e}){return mt.createElement("div",{style:fx.container},e)}var px=mx,hx=px;function gx({width:e,height:t,isEditorReady:n,loading:r,_ref:l,className:o,wrapperProps:i}){return mt.createElement("section",{style:{...es.wrapper,width:e,height:t},...i},!n&&mt.createElement(hx,null,r),mt.createElement("div",{ref:l,style:{...es.fullWidth,...!n&&es.hide},className:o}))}var vx=gx,Mf=x.memo(vx);function xx(e){x.useEffect(e,[])}var Af=xx;function yx(e,t,n=!0){let r=x.useRef(!0);x.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Re=yx;function wr(){}function Sn(e,t,n,r){return wx(e,r)||kx(e,t,n,r)}function wx(e,t){return e.editor.getModel(If(e,t))}function kx(e,t,n,r){return e.editor.createModel(t,n,r?If(e,r):void 0)}function If(e,t){return e.Uri.parse(t)}function bx({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:l,originalModelPath:o,modifiedModelPath:i,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:u=!1,theme:f="light",loading:p="Loading...",options:h={},height:m="100%",width:k="100%",className:w,wrapperProps:y={},beforeMount:S=wr,onMount:d=wr}){let[c,g]=x.useState(!1),[v,b]=x.useState(!0),N=x.useRef(null),E=x.useRef(null),T=x.useRef(null),$=x.useRef(d),M=x.useRef(S),O=x.useRef(!1);Af(()=>{let A=Pf.init();return A.then(F=>(E.current=F)&&b(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>N.current?z():A.cancel()}),Re(()=>{if(N.current&&E.current){let A=N.current.getOriginalEditor(),F=Sn(E.current,e||"",r||n||"text",o||"");F!==A.getModel()&&A.setModel(F)}},[o],c),Re(()=>{if(N.current&&E.current){let A=N.current.getModifiedEditor(),F=Sn(E.current,t||"",l||n||"text",i||"");F!==A.getModel()&&A.setModel(F)}},[i],c),Re(()=>{let A=N.current.getModifiedEditor();A.getOption(E.current.editor.EditorOption.readOnly)?A.setValue(t||""):t!==A.getValue()&&(A.executeEdits("",[{range:A.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),A.pushUndoStop())},[t],c),Re(()=>{var A,F;(F=(A=N.current)==null?void 0:A.getModel())==null||F.original.setValue(e||"")},[e],c),Re(()=>{let{original:A,modified:F}=N.current.getModel();E.current.editor.setModelLanguage(A,r||n||"text"),E.current.editor.setModelLanguage(F,l||n||"text")},[n,r,l],c),Re(()=>{var A;(A=E.current)==null||A.editor.setTheme(f)},[f],c),Re(()=>{var A;(A=N.current)==null||A.updateOptions(h)},[h],c);let L=x.useCallback(()=>{var K;if(!E.current)return;M.current(E.current);let A=Sn(E.current,e||"",r||n||"text",o||""),F=Sn(E.current,t||"",l||n||"text",i||"");(K=N.current)==null||K.setModel({original:A,modified:F})},[n,t,l,e,r,o,i]),I=x.useCallback(()=>{var A;!O.current&&T.current&&(N.current=E.current.editor.createDiffEditor(T.current,{automaticLayout:!0,...h}),L(),(A=E.current)==null||A.editor.setTheme(f),g(!0),O.current=!0)},[h,f,L]);x.useEffect(()=>{c&&$.current(N.current,E.current)},[c]),x.useEffect(()=>{!v&&!c&&I()},[v,c,I]);function z(){var F,K,C,W;let A=(F=N.current)==null?void 0:F.getModel();a||((K=A==null?void 0:A.original)==null||K.dispose()),u||((C=A==null?void 0:A.modified)==null||C.dispose()),(W=N.current)==null||W.dispose()}return mt.createElement(Mf,{width:k,height:m,isEditorReady:c,loading:p,_ref:T,className:w,wrapperProps:y})}var jx=bx,Nx=x.memo(jx);function Sx(e){let t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}var Cx=Sx,ml=new Map;function Ex({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:l,path:o,theme:i="light",line:a,loading:u="Loading...",options:f={},overrideServices:p={},saveViewState:h=!0,keepCurrentModel:m=!1,width:k="100%",height:w="100%",className:y,wrapperProps:S={},beforeMount:d=wr,onMount:c=wr,onChange:g,onValidate:v=wr}){let[b,N]=x.useState(!1),[E,T]=x.useState(!0),$=x.useRef(null),M=x.useRef(null),O=x.useRef(null),L=x.useRef(c),I=x.useRef(d),z=x.useRef(),A=x.useRef(r),F=Cx(o),K=x.useRef(!1),C=x.useRef(!1);Af(()=>{let _=Pf.init();return _.then(B=>($.current=B)&&T(!1)).catch(B=>(B==null?void 0:B.type)!=="cancelation"&&console.error("Monaco initialization: error:",B)),()=>M.current?U():_.cancel()}),Re(()=>{var B,ue,we,j;let _=Sn($.current,e||r||"",t||l||"",o||n||"");_!==((B=M.current)==null?void 0:B.getModel())&&(h&&ml.set(F,(ue=M.current)==null?void 0:ue.saveViewState()),(we=M.current)==null||we.setModel(_),h&&((j=M.current)==null||j.restoreViewState(ml.get(o))))},[o],b),Re(()=>{var _;(_=M.current)==null||_.updateOptions(f)},[f],b),Re(()=>{!M.current||r===void 0||(M.current.getOption($.current.editor.EditorOption.readOnly)?M.current.setValue(r):r!==M.current.getValue()&&(C.current=!0,M.current.executeEdits("",[{range:M.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),M.current.pushUndoStop(),C.current=!1))},[r],b),Re(()=>{var B,ue;let _=(B=M.current)==null?void 0:B.getModel();_&&l&&((ue=$.current)==null||ue.editor.setModelLanguage(_,l))},[l],b),Re(()=>{var _;a!==void 0&&((_=M.current)==null||_.revealLine(a))},[a],b),Re(()=>{var _;(_=$.current)==null||_.editor.setTheme(i)},[i],b);let W=x.useCallback(()=>{var _;if(!(!O.current||!$.current)&&!K.current){I.current($.current);let B=o||n,ue=Sn($.current,r||e||"",t||l||"",B||"");M.current=(_=$.current)==null?void 0:_.editor.create(O.current,{model:ue,automaticLayout:!0,...f},p),h&&M.current.restoreViewState(ml.get(B)),$.current.editor.setTheme(i),a!==void 0&&M.current.revealLine(a),N(!0),K.current=!0}},[e,t,n,r,l,o,f,p,h,i,a]);x.useEffect(()=>{b&&L.current(M.current,$.current)},[b]),x.useEffect(()=>{!E&&!b&&W()},[E,b,W]),A.current=r,x.useEffect(()=>{var _,B;b&&g&&((_=z.current)==null||_.dispose(),z.current=(B=M.current)==null?void 0:B.onDidChangeModelContent(ue=>{C.current||g(M.current.getValue(),ue)}))},[b,g]),x.useEffect(()=>{if(b){let _=$.current.editor.onDidChangeMarkers(B=>{var we;let ue=(we=M.current.getModel())==null?void 0:we.uri;if(ue&&B.find(j=>j.path===ue.path)){let j=$.current.editor.getModelMarkers({resource:ue});v==null||v(j)}});return()=>{_==null||_.dispose()}}return()=>{}},[b,v]);function U(){var _,B;(_=z.current)==null||_.dispose(),m?h&&ml.set(o,M.current.saveViewState()):(B=M.current.getModel())==null||B.dispose(),M.current.dispose()}return mt.createElement(Mf,{width:k,height:w,isEditorReady:b,loading:u,_ref:O,className:y,wrapperProps:S})}var Px=Ex,Mx=x.memo(Px),Ax=Mx;const Tu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Lu=xf,Ix=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Lu(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:o}=t,i=Object.keys(l).map(f=>{const p=n==null?void 0:n[f],h=o==null?void 0:o[f];if(p===null)return null;const m=Tu(p)||Tu(h);return l[f][m]}),a=n&&Object.entries(n).reduce((f,p)=>{let[h,m]=p;return m===void 0||(f[h]=m),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:h,className:m,...k}=p;return Object.entries(k).every(w=>{let[y,S]=w;return Array.isArray(S)?S.includes({...o,...a}[y]):{...o,...a}[y]===S})?[...f,h,m]:f},[]);return Lu(e,i,u,n==null?void 0:n.class,n==null?void 0:n.className)},Tx=Ix("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-neutral-900 text-white hover:bg-neutral-800 active:scale-[0.98]",secondary:"bg-neutral-100 text-neutral-900 hover:bg-neutral-200 active:scale-[0.98]",outline:"border border-neutral-200 bg-transparent hover:bg-neutral-50 hover:border-neutral-300",ghost:"hover:bg-neutral-100 hover:text-neutral-900",link:"text-neutral-900 underline-offset-4 hover:underline",subtle:"bg-neutral-50 text-neutral-700 hover:bg-neutral-100",danger:"bg-red-50 text-red-600 hover:bg-red-100"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"h-12 px-6",icon:"h-10 w-10","icon-sm":"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),ur=mt.forwardRef(({className:e,variant:t,size:n,loading:r,children:l,disabled:o,ariaLabel:i,ariaDescribedBy:a,ariaExpanded:u,ariaPressed:f,...p},h)=>s.jsxs("button",{className:Pl(Tx({variant:t,size:n,className:e})),ref:h,disabled:o||r,"aria-label":i,"aria-describedby":a,"aria-expanded":u,"aria-pressed":f,...p,children:[r&&s.jsx(bg,{className:"mr-2 h-4 w-4 animate-spin","aria-hidden":"true"}),l]}));ur.displayName="Button";const Lx=({value:e,language:t="javascript",theme:n="vs-dark",readOnly:r=!1,onChange:l,onSave:o,showLineNumbers:i=!0,wordWrap:a="on",fontSize:u=14,minimap:f=!0,lineNumbers:p="on",originalValue:h,diffEditor:m=!1,height:k="100%",dataTestid:w="code-editor"})=>{const y=x.useRef(null),S=x.useRef(null),d=x.useCallback((b,N)=>{y.current=b,S.current=N,N.languages.registerCompletionItemProvider(t,{provideCompletionItems:(E,T)=>{const $=E.getWordUntilPosition(T),M={startLineNumber:T.lineNumber,endLineNumber:T.lineNumber,startColumn:$.startColumn,endColumn:$.endColumn};return{suggestions:[{label:"console.log",kind:N.languages.CompletionItemKind.Function,insertText:"console.log(${1:message})",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"const",kind:N.languages.CompletionItemKind.Keyword,insertText:"const ${1:name} = ${2:value}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"function",kind:N.languages.CompletionItemKind.Function,insertText:"function ${1:name}(${2:params}) {\n ${3:// body}\n}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"async",kind:N.languages.CompletionItemKind.Keyword,insertText:"async function ${1:name}(${2:params}) {\n ${3:// body}\n}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"class",kind:N.languages.CompletionItemKind.Class,insertText:`class \${1:Name} {
299
+ constructor(\${2:params}) {
300
+ \${3:// init}
301
+ }
302
+ }`,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"interface",kind:N.languages.CompletionItemKind.Interface,insertText:"interface ${1:Name} {\n ${2:property}: ${3:type}\n}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"import",kind:N.languages.CompletionItemKind.Module,insertText:"import { ${1:module} } from '${2:path}'",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"export",kind:N.languages.CompletionItemKind.Module,insertText:"export ${1:default} ${2:statement}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M}]}}}),b.addCommand(N.KeyMod.CtrlCmd|N.KeyCode.KeyS,()=>{o&&b.getValue()&&o(b.getValue())}),b.focus()},[t,o]),c=x.useCallback(()=>{navigator.clipboard.writeText(e)},[e]),g=x.useCallback(()=>{const b=new Blob([e],{type:"text/plain"}),N=URL.createObjectURL(b),E=document.createElement("a");E.href=N,E.download=`code.${t==="typescript"?"ts":t==="javascript"?"js":t==="python"?"py":"txt"}`,E.click(),URL.revokeObjectURL(N)},[e,t]),v=x.useCallback(()=>{var b;y.current&&((b=y.current.getAction("editor.action.formatDocument"))==null||b.run())},[]);return m&&h!==void 0?s.jsxs("div",{className:"flex flex-col h-full border border-border rounded-lg overflow-hidden","data-testid":w,children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-muted/50 border-b border-border",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("span",{children:"Diff Editor"}),s.jsx("span",{className:"px-2 py-0.5 bg-secondary rounded text-xs",children:t})]}),s.jsx("div",{className:"flex items-center gap-1",children:s.jsx(ur,{variant:"ghost",size:"sm",onClick:c,children:s.jsx(ju,{className:"w-4 h-4"})})})]}),s.jsx("div",{className:"flex-1",children:s.jsx(Nx,{height:"100%",language:t,theme:n,original:h,modified:e,options:{readOnly:r,renderSideBySide:!0,fontSize:u,minimap:{enabled:f},lineNumbers:"on",wordWrap:a,scrollBeyondLastLine:!1,automaticLayout:!0}})})]}):s.jsxs("div",{className:"flex flex-col h-full border border-border rounded-lg overflow-hidden","data-testid":w,children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-muted/50 border-b border-border",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("span",{children:t==="typescript"?"TypeScript":t==="javascript"?"JavaScript":t}),s.jsxs("span",{className:"px-2 py-0.5 bg-secondary rounded text-xs",children:[e.split(`
303
+ `).length," lines"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(ur,{variant:"ghost",size:"sm",onClick:v,title:"Format code",children:s.jsx(na,{className:"w-4 h-4"})}),s.jsx(ur,{variant:"ghost",size:"sm",onClick:c,title:"Copy to clipboard",children:s.jsx(ju,{className:"w-4 h-4"})}),s.jsx(ur,{variant:"ghost",size:"sm",onClick:g,title:"Download file",children:s.jsx(ff,{className:"w-4 h-4"})})]})]}),s.jsx("div",{className:"flex-1",style:{height:k},children:s.jsx(Ax,{height:"100%",language:t,value:e,theme:n,onChange:l,onMount:d,options:{readOnly:r,fontSize:u,minimap:{enabled:f},lineNumbers:i?p:"off",wordWrap:a,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,insertSpaces:!0,folding:!0,foldingHighlight:!0,showFoldingControls:"always",bracketPairColorization:{enabled:!0},padding:{top:8,bottom:8},smoothScrolling:!0,cursorBlinking:"smooth",cursorSmoothCaretAnimation:"on",renderLineHighlight:"all",renderWhitespace:"selection",guides:{bracketPairs:!0,indentation:!0}},loading:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(ta,{className:"w-6 h-6 animate-spin text-muted-foreground"})})})})]})},Ox=({children:e,direction:t="horizontal",defaultSplit:n=50,minSize:r=200})=>{const[l,o]=x.useState(n),[i,a]=x.useState(!1),u=x.useCallback(()=>{a(!0)},[]),f=x.useCallback(()=>{a(!1)},[]),p=x.useCallback(m=>{if(!i)return;const w=m.currentTarget.getBoundingClientRect();let y;t==="horizontal"?y=(m.clientX-w.left)/w.width*100:y=(m.clientY-w.top)/w.height*100;const S=r/(t==="horizontal"?w.width:w.height)*100;y=Math.max(S,Math.min(100-S,y)),o(y)},[i,t,r]),h=t==="horizontal";return s.jsxs("div",{className:`flex ${h?"flex-row":"flex-col"} w-full h-full`,onMouseMove:p,onMouseUp:f,onMouseLeave:f,children:[s.jsx("div",{className:"overflow-hidden",style:{[h?"width":"height"]:`${l}%`,[h?"height":"width"]:"100%"},children:e[0]}),s.jsx("div",{className:`${h?"w-1 cursor-col-resize":"h-1 cursor-row-resize"} bg-border hover:bg-primary transition-colors flex-shrink-0`,onMouseDown:u,style:{userSelect:"none"},children:s.jsx("div",{className:`${h?"w-full h-8":"h-full w-8"} mx-auto my-auto flex items-center justify-center`,children:s.jsx("div",{className:`${h?"w-0.5 h-4":"w-4 h-0.5"} bg-muted-foreground/30 rounded-full`})})}),s.jsx("div",{className:"overflow-hidden flex-1",style:{[h?"width":"height"]:`${100-l}%`},children:e[1]})]})},Rx=({rootPath:e="/"})=>{const[t,n]=x.useState(null),[r,l]=x.useState(""),[o,i]=x.useState("plaintext"),[a,u]=x.useState(!1),[f,p]=x.useState([]),[h,m]=x.useState(null),k=c=>{var b;const g=(b=c.split(".").pop())==null?void 0:b.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",html:"html",htm:"html",css:"css",scss:"scss",less:"less",md:"markdown",mdx:"markdown",py:"python",rs:"rust",go:"go",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",sql:"sql",yaml:"yaml",yml:"yaml",xml:"xml",sh:"shell",bash:"shell",zsh:"shell",dockerfile:"dockerfile",toml:"ini",ini:"ini"}[g||""]||"plaintext"},w=x.useCallback(async c=>{if(f.includes(c)){m(c);return}u(!0);try{const g=await window.electronAPI.fs.readFile(c);l(g),n(c),i(k(c)),p(v=>[...v,c]),m(c)}catch(g){console.error("Failed to read file:",g)}finally{u(!1)}},[f]),y=(c,g)=>{g==null||g.stopPropagation();const v=f.filter(b=>b!==c);p(v),h===c&&m(v[v.length-1]||null)},S=x.useCallback(async c=>{if(h)try{await window.electronAPI.fs.writeFile(h,c),l(c)}catch(g){console.error("Failed to save file:",g)}},[h]),d=c=>c.split("/").pop()||c;return s.jsxs("div",{className:"flex flex-col h-full",children:[f.length>0&&s.jsx("div",{className:"flex items-center bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] overflow-x-auto",children:f.map(c=>s.jsxs("div",{onClick:()=>m(c),className:`flex items-center gap-2 px-3 py-2 text-sm cursor-pointer border-r border-[var(--color-border)] min-w-0 ${h===c?"bg-[var(--color-bg-primary)] text-[var(--color-text-primary)]":"text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-tertiary)]"}`,children:[s.jsx(Js,{className:"w-4 h-4 flex-shrink-0"}),s.jsx("span",{className:"truncate max-w-32",children:d(c)}),s.jsx("button",{onClick:g=>y(c,g),className:"ml-1 p-0.5 hover:bg-[var(--color-bg-tertiary)] rounded",children:s.jsx(ra,{className:"w-3 h-3"})})]},c))}),s.jsx("div",{className:"flex-1 flex overflow-hidden",children:s.jsxs(Ox,{direction:"horizontal",defaultRatio:.2,minSize:150,maxSize:400,children:[s.jsx("div",{className:"h-full overflow-hidden",children:s.jsx(wv,{rootPath:e,onFileSelect:w,selectedFile:t||void 0})}),s.jsx("div",{className:"h-full overflow-hidden bg-[var(--color-bg-primary)]",children:h?s.jsx(Lx,{value:r,language:o,onChange:c=>l(c||""),onSave:S,height:"100%",dataTestid:"code-workspace-editor"}):s.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Js,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),s.jsx("p",{children:"Select a file to edit"}),s.jsx("p",{className:"text-sm mt-2",children:"Or use the file explorer to browse"})]})})})]})}),s.jsxs("div",{className:"flex items-center justify-between px-3 py-1 bg-[var(--color-bg-secondary)] border-t border-[var(--color-border)] text-xs text-[var(--color-text-secondary)]",children:[s.jsx("div",{className:"flex items-center gap-4",children:h&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:d(h)}),s.jsx("span",{children:o}),s.jsxs("span",{children:[r.split(`
304
+ `).length," lines"]})]})}),s.jsx("div",{children:a&&s.jsx("span",{className:"text-[var(--color-accent)]",children:"Loading..."})})]})]})};function nt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function sn(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Tf=6048e5,zx=864e5;let _x={};function jo(){return _x}function $r(e,t){var a,u,f,p;const n=jo(),r=(t==null?void 0:t.weekStartsOn)??((u=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((p=(f=n.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,l=nt(e),o=l.getDay(),i=(o<r?7:0)+o-r;return l.setDate(l.getDate()-i),l.setHours(0,0,0,0),l}function eo(e){return $r(e,{weekStartsOn:1})}function Lf(e){const t=nt(e),n=t.getFullYear(),r=sn(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const l=eo(r),o=sn(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=eo(o);return t.getTime()>=l.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Ou(e){const t=nt(e);return t.setHours(0,0,0,0),t}function Ru(e){const t=nt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Fx(e,t){const n=Ou(e),r=Ou(t),l=+n-Ru(n),o=+r-Ru(r);return Math.round((l-o)/zx)}function Dx(e){const t=Lf(e),n=sn(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),eo(n)}function Wx(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $x(e){if(!Wx(e)&&typeof e!="number")return!1;const t=nt(e);return!isNaN(Number(t))}function Ux(e){const t=nt(e),n=sn(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Bx={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Vx=(e,t,n)=>{let r;const l=Bx[e];return typeof l=="string"?r=l:t===1?r=l.one:r=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ts(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Hx={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qx={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Yx={date:ts({formats:Hx,defaultWidth:"full"}),time:ts({formats:Qx,defaultWidth:"full"}),dateTime:ts({formats:Gx,defaultWidth:"full"})},Kx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qx=(e,t,n,r)=>Kx[e];function nr(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let l;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;l=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;l=e.values[a]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return l[o]}}const Xx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jx={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ey={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ty={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ny={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ry=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ly={ordinalNumber:ry,era:nr({values:Xx,defaultWidth:"wide"}),quarter:nr({values:Zx,defaultWidth:"wide",argumentCallback:e=>e-1}),month:nr({values:Jx,defaultWidth:"wide"}),day:nr({values:ey,defaultWidth:"wide"}),dayPeriod:nr({values:ty,defaultWidth:"wide",formattingValues:ny,defaultFormattingWidth:"wide"})};function rr(e){return(t,n={})=>{const r=n.width,l=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(l);if(!o)return null;const i=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(a)?sy(a,h=>h.test(i)):oy(a,h=>h.test(i));let f;f=e.valueCallback?e.valueCallback(u):u,f=n.valueCallback?n.valueCallback(f):f;const p=t.slice(i.length);return{value:f,rest:p}}}function oy(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function sy(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function iy(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const l=r[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(l.length);return{value:i,rest:a}}}const ay=/^(\d+)(th|st|nd|rd)?/i,uy=/\d+/i,cy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},dy={any:[/^b/i,/^(a|c)/i]},fy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},my={any:[/1/i,/2/i,/3/i,/4/i]},py={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hy={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gy={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},vy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xy={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yy={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},wy={ordinalNumber:iy({matchPattern:ay,parsePattern:uy,valueCallback:e=>parseInt(e,10)}),era:rr({matchPatterns:cy,defaultMatchWidth:"wide",parsePatterns:dy,defaultParseWidth:"any"}),quarter:rr({matchPatterns:fy,defaultMatchWidth:"wide",parsePatterns:my,defaultParseWidth:"any",valueCallback:e=>e+1}),month:rr({matchPatterns:py,defaultMatchWidth:"wide",parsePatterns:hy,defaultParseWidth:"any"}),day:rr({matchPatterns:gy,defaultMatchWidth:"wide",parsePatterns:vy,defaultParseWidth:"any"}),dayPeriod:rr({matchPatterns:xy,defaultMatchWidth:"any",parsePatterns:yy,defaultParseWidth:"any"})},ky={code:"en-US",formatDistance:Vx,formatLong:Yx,formatRelative:qx,localize:ly,match:wy,options:{weekStartsOn:0,firstWeekContainsDate:1}};function by(e){const t=nt(e);return Fx(t,Ux(t))+1}function jy(e){const t=nt(e),n=+eo(t)-+Dx(t);return Math.round(n/Tf)+1}function Of(e,t){var p,h,m,k;const n=nt(e),r=n.getFullYear(),l=jo(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??l.firstWeekContainsDate??((k=(m=l.locale)==null?void 0:m.options)==null?void 0:k.firstWeekContainsDate)??1,i=sn(e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const a=$r(i,t),u=sn(e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const f=$r(u,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function Ny(e,t){var a,u,f,p;const n=jo(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(f=n.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,l=Of(e,t),o=sn(e,0);return o.setFullYear(l,0,r),o.setHours(0,0,0,0),$r(o,t)}function Sy(e,t){const n=nt(e),r=+$r(n,t)-+Ny(n,t);return Math.round(r/Tf)+1}function q(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const jt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return q(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):q(n+1,2)},d(e,t){return q(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return q(e.getHours()%12||12,t.length)},H(e,t){return q(e.getHours(),t.length)},m(e,t){return q(e.getMinutes(),t.length)},s(e,t){return q(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),l=Math.trunc(r*Math.pow(10,n-3));return q(l,t.length)}},dn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zu={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),l=r>0?r:1-r;return n.ordinalNumber(l,{unit:"year"})}return jt.y(e,t)},Y:function(e,t,n,r){const l=Of(e,r),o=l>0?l:1-l;if(t==="YY"){const i=o%100;return q(i,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):q(o,t.length)},R:function(e,t){const n=Lf(e);return q(n,t.length)},u:function(e,t){const n=e.getFullYear();return q(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return q(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return q(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return jt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return q(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const l=Sy(e,r);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):q(l,t.length)},I:function(e,t,n){const r=jy(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):q(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):jt.d(e,t)},D:function(e,t,n){const r=by(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):q(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const l=e.getDay(),o=(l-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return q(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const l=e.getDay(),o=(l-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return q(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),l=r===0?7:r;switch(t){case"i":return String(l);case"ii":return q(l,t.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const l=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let l;switch(r===12?l=dn.noon:r===0?l=dn.midnight:l=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let l;switch(r>=17?l=dn.evening:r>=12?l=dn.afternoon:r>=4?l=dn.morning:l=dn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return jt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):jt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):q(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):q(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):jt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):jt.s(e,t)},S:function(e,t){return jt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Fu(r);case"XXXX":case"XX":return Yt(r);case"XXXXX":case"XXX":default:return Yt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Fu(r);case"xxxx":case"xx":return Yt(r);case"xxxxx":case"xxx":default:return Yt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_u(r,":");case"OOOO":default:return"GMT"+Yt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_u(r,":");case"zzzz":default:return"GMT"+Yt(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return q(r,t.length)},T:function(e,t,n){const r=e.getTime();return q(r,t.length)}};function _u(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),l=Math.trunc(r/60),o=r%60;return o===0?n+String(l):n+String(l)+t+q(o,2)}function Fu(e,t){return e%60===0?(e>0?"-":"+")+q(Math.abs(e)/60,2):Yt(e,t)}function Yt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),l=q(Math.trunc(r/60),2),o=q(r%60,2);return n+l+t+o}const Du=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Rf=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Cy=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],l=n[2];if(!l)return Du(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Du(r,t)).replace("{{time}}",Rf(l,t))},Ey={p:Rf,P:Cy},Py=/^D+$/,My=/^Y+$/,Ay=["D","DD","YY","YYYY"];function Iy(e){return Py.test(e)}function Ty(e){return My.test(e)}function Ly(e,t,n){const r=Oy(e,t,n);if(console.warn(r),Ay.includes(e))throw new RangeError(r)}function Oy(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ry=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zy=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_y=/^'([^]*?)'?$/,Fy=/''/g,Dy=/[a-zA-Z]/;function Wy(e,t,n){var p,h,m,k;const r=jo(),l=r.locale??ky,o=r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=r.weekStartsOn??((k=(m=r.locale)==null?void 0:m.options)==null?void 0:k.weekStartsOn)??0,a=nt(e);if(!$x(a))throw new RangeError("Invalid time value");let u=t.match(zy).map(w=>{const y=w[0];if(y==="p"||y==="P"){const S=Ey[y];return S(w,l.formatLong)}return w}).join("").match(Ry).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const y=w[0];if(y==="'")return{isToken:!1,value:$y(w)};if(zu[y])return{isToken:!0,value:w};if(y.match(Dy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:w}});l.localize.preprocessor&&(u=l.localize.preprocessor(a,u));const f={firstWeekContainsDate:o,weekStartsOn:i,locale:l};return u.map(w=>{if(!w.isToken)return w.value;const y=w.value;(Ty(y)||Iy(y))&&Ly(y,t,String(e));const S=zu[y[0]];return S(a,y,l.localize,f)}).join("")}function $y(e){const t=e.match(_y);return t?t[1].replace(Fy,"'"):e}const Uy=()=>{const[e,t]=x.useState([]),[n,r]=x.useState(!1),[l,o]=x.useState(""),[i,a]=x.useState(null),u=async()=>{r(!0);try{const m=await window.electronAPI.audit.recent(100);t(m)}catch(m){console.error("Failed to load audit events:",m)}finally{r(!1)}};x.useEffect(()=>{u()},[]);const f=l?e.filter(m=>m.action.toLowerCase().includes(l.toLowerCase())):e,p=async()=>{var m,k;try{const w=await((k=(m=window.electronAPI.dialog).selectFile)==null?void 0:k.call(m,[{name:"JSON",extensions:["json"]}]));w&&(await window.electronAPI.audit.export(w),await window.electronAPI.notification.show({title:"Audit log exported",body:`Exported to ${w}`}))}catch(w){console.error("Export failed:",w)}},h=m=>m.includes("created")?"bg-green-500/10 text-green-500":m.includes("deleted")?"bg-red-500/10 text-red-500":m.includes("applied")||m.includes("restored")?"bg-blue-500/10 text-blue-500":m.includes("failed")?"bg-orange-500/10 text-orange-500":"bg-gray-500/10 text-gray-500";return s.jsxs("div",{className:"h-full flex flex-col bg-card",children:[s.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between bg-background/50",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ei,{className:"w-5 h-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Audit Trail"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Session activity log"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:u,disabled:n,className:"p-2 hover:bg-muted rounded-md disabled:opacity-50",title:"Refresh",children:s.jsx(ta,{className:`w-4 h-4 ${n?"animate-spin":""}`})}),s.jsx("button",{onClick:p,className:"p-2 hover:bg-muted rounded-md",title:"Export logs",children:s.jsx(ff,{className:"w-4 h-4"})})]})]}),s.jsx("div",{className:"p-3 border-b border-border",children:s.jsxs("div",{className:"relative",children:[s.jsx(xg,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),s.jsx("input",{type:"text",value:l,onChange:m=>o(m.target.value),placeholder:"Filter by action...",className:"w-full pl-9 pr-3 py-2 bg-background border border-input rounded-md text-sm"})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-2",children:f.length===0?s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(ei,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),s.jsx("p",{className:"text-sm",children:"No audit events"})]}):f.map(m=>s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[s.jsxs("button",{onClick:()=>a(i===m.id?null:m.id),className:"w-full px-3 py-2 flex items-center gap-3 hover:bg-muted/50 transition-colors text-left",children:[s.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${h(m.action)}`,children:m.action}),s.jsx("span",{className:"text-xs text-muted-foreground flex-1",children:Wy(new Date(m.timestamp),"MMM d, HH:mm:ss")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i===m.id?"−":"+"})]}),i===m.id&&s.jsx("div",{className:"px-3 py-2 bg-muted/30 border-t border-border",children:s.jsx("pre",{className:"text-xs font-mono text-muted-foreground overflow-x-auto",children:JSON.stringify(m.details,null,2)})})]},m.id))}),s.jsxs("div",{className:"px-4 py-2 border-t border-border text-xs text-muted-foreground",children:["Showing ",f.length," of ",e.length," events"]})]})},By={app:{name:"Codex Linux",loading:"Loading Codex...",offline:"You are offline",online:"Back online"},sidebar:{agents:"Agents",worktrees:"Worktrees",skills:"Skills",automations:"Automations",settings:"Settings"},agents:{title:"Agents",description:"Manage your AI coding agents",create:"New Agent",delete:"Delete Agent",start:"Start",stop:"Stop",running:"running",idle:"idle",error:"error",name:"Agent Name",model:"Model",skills:"Skills",worktree:"Worktree",status:"Status",lastActivity:"Last Activity",noAgents:"No agents yet",createFirst:"Create your first agent to get started"},worktrees:{title:"Worktrees",description:"Isolated Git workspaces",create:"New Worktree",delete:"Delete Worktree",name:"Worktree Name",branch:"Branch",path:"Path",noWorktrees:"No worktrees yet"},skills:{title:"Skills",description:"Reusable AI capabilities",create:"New Skill",delete:"Delete Skill",name:"Skill Name",description_label:"Description",instructions:"Instructions",tags:"Tags",noSkills:"No skills yet",builtIn:"Built-in",custom:"Custom"},automations:{title:"Automations",description:"Scheduled tasks and workflows",create:"New Automation",delete:"Delete Automation",run:"Run Now",pause:"Pause",resume:"Resume",name:"Automation Name",schedule:"Schedule",command:"Command",trigger:"Trigger",lastRun:"Last Run",nextRun:"Next Run",noAutomations:"No automations yet",cron:"Cron Expression",manual:"Manual",interval:"Interval"},settings:{title:"Settings",description:"Configure your preferences",general:"General",appearance:"Appearance",api:"API Keys",security:"Security",language:"Language",theme:"Theme",dark:"Dark",light:"Light",system:"System",openai:"OpenAI API Key",anthropic:"Anthropic API Key",github:"GitHub Token",database:"Database",backup:"Backup",restore:"Restore",export:"Export",import:"Import",clear:"Clear Data",save:"Save",cancel:"Cancel",reset:"Reset to Defaults"},chat:{placeholder:"Type your message...",send:"Send",thinking:"Thinking...",error:"Error sending message",copy:"Copy",edit:"Edit",delete:"Delete",regenerate:"Regenerate"},terminal:{title:"Terminal",newTab:"New Tab",closeTab:"Close Tab",clear:"Clear",copy:"Copy",paste:"Paste"},fileExplorer:{title:"Files",openFile:"Open File",newFile:"New File",newFolder:"New Folder",rename:"Rename",delete:"Delete",refresh:"Refresh"},common:{save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",create:"Create",close:"Close",confirm:"Confirm",search:"Search",loading:"Loading...",error:"Error",success:"Success",warning:"Warning",info:"Info",yes:"Yes",no:"No",ok:"OK",back:"Back",next:"Next",previous:"Previous",refresh:"Refresh",export:"Export",import:"Import"},errors:{generic:"An error occurred",network:"Network error",notFound:"Not found",unauthorized:"Unauthorized",forbidden:"Forbidden",validation:"Validation error",serverError:"Server error"}},Vy={app:{name:"Codex Linux",loading:"Chargement de Codex...",offline:"Vous êtes hors ligne",online:"De retour en ligne"},sidebar:{agents:"Agents",worktrees:"Arborescences",skills:"Compétences",automations:"Automatisations",settings:"Paramètres"},agents:{title:"Agents",description:"Gérez vos agents de codage IA",create:"Nouvel Agent",delete:"Supprimer Agent",start:"Démarrer",stop:"Arrêter",running:"en cours",idle:"inactif",error:"erreur",name:"Nom de l'agent",model:"Modèle",skills:"Compétences",worktree:"Arborescence",status:"Statut",lastActivity:"Dernière activité",noAgents:"Aucun agent",createFirst:"Créez votre premier agent pour commencer"},worktrees:{title:"Arborescences",description:"Espaces de travail Git isolés",create:"Nouvelle Arborescence",delete:"Supprimer Arborescence",name:"Nom de l'arborescence",branch:"Branche",path:"Chemin",noWorktrees:"Aucune arborescence"},skills:{title:"Compétences",description:"Capacités IA réutilisables",create:"Nouvelle Compétence",delete:"Supprimer Compétence",name:"Nom de la compétence",description_label:"Description",instructions:"Instructions",tags:"Tags",noSkills:"Aucune compétence",builtIn:"Intégré",custom:"Personnalisé"},automations:{title:"Automatisations",description:"Tâches et flux de travail planifiés",create:"Nouvelle Automatisation",delete:"Supprimer Automatisation",run:"Exécuter",pause:"Pause",resume:"Reprendre",name:"Nom de l'automatisation",schedule:"Planification",command:"Commande",trigger:"Déclencheur",lastRun:"Dernière exécution",nextRun:"Prochaine exécution",noAutomations:"Aucune automatisation",cron:"Expression Cron",manual:"Manuel",interval:"Intervalle"},settings:{title:"Paramètres",description:"Configurez vos préférences",general:"Général",appearance:"Apparence",api:"Clés API",security:"Sécurité",language:"Langue",theme:"Thème",dark:"Sombre",light:"Clair",system:"Système",openai:"Clé API OpenAI",anthropic:"Clé API Anthropic",github:"Token GitHub",database:"Base de données",backup:"Sauvegarde",restore:"Restaurer",export:"Exporter",import:"Importer",clear:"Effacer les données",save:"Enregistrer",cancel:"Annuler",reset:"Réinitialiser"},chat:{placeholder:"Tapez votre message...",send:"Envoyer",thinking:"Réflexion...",error:"Erreur d'envoi du message",copy:"Copier",edit:"Modifier",delete:"Supprimer",regenerate:"Régénérer"},terminal:{title:"Terminal",newTab:"Nouvel onglet",closeTab:"Fermer l'onglet",clear:"Effacer",copy:"Copier",paste:"Coller"},fileExplorer:{title:"Fichiers",openFile:"Ouvrir le fichier",newFile:"Nouveau fichier",newFolder:"Nouveau dossier",rename:"Renommer",delete:"Supprimer",refresh:"Actualiser"},common:{save:"Enregistrer",cancel:"Annuler",delete:"Supprimer",edit:"Modifier",create:"Créer",close:"Fermer",confirm:"Confirmer",search:"Rechercher",loading:"Chargement...",error:"Erreur",success:"Succès",warning:"Avertissement",info:"Info",yes:"Oui",no:"Non",ok:"OK",back:"Retour",next:"Suivant",previous:"Précédent",refresh:"Actualiser",export:"Exporter",import:"Importer"},errors:{generic:"Une erreur est survenue",network:"Erreur réseau",notFound:"Non trouvé",unauthorized:"Non autorisé",forbidden:"Interdit",validation:"Erreur de validation",serverError:"Erreur serveur"}},Hy={app:{name:"Codex Linux",loading:"Cargando Codex...",offline:"Estás desconectado",online:"De nuevo en línea"},sidebar:{agents:"Agentes",worktrees:"Árboles de trabajo",skills:"Habilidades",automations:"Automatizaciones",settings:"Configuración"},agents:{title:"Agentes",description:"Gestiona tus agentes de codificación IA",create:"Nuevo Agente",delete:"Eliminar Agente",start:"Iniciar",stop:"Detener",running:"ejecutando",idle:"inactivo",error:"error",name:"Nombre del agente",model:"Modelo",skills:"Habilidades",worktree:"Árbol de trabajo",status:"Estado",lastActivity:"Última actividad",noAgents:"Sin agentes",createFirst:"Crea tu primer agente para comenzar"},worktrees:{title:"Árboles de trabajo",description:"Espacios de trabajo Git aislados",create:"Nuevo Árbol",delete:"Eliminar Árbol",name:"Nombre del árbol",branch:"Rama",path:"Ruta",noWorktrees:"Sin árboles de trabajo"},skills:{title:"Habilidades",description:"Capacidades IA reutilizables",create:"Nueva Habilidad",delete:"Eliminar Habilidad",name:"Nombre de habilidad",description_label:"Descripción",instructions:"Instrucciones",tags:"Etiquetas",noSkills:"Sin habilidades",builtIn:"Integrado",custom:"Personalizado"},automations:{title:"Automatizaciones",description:"Tareas y flujos de trabajo programados",create:"Nueva Automatización",delete:"Eliminar Automatización",run:"Ejecutar",pause:"Pausar",resume:"Reanudar",name:"Nombre de automatización",schedule:"Programación",command:"Comando",trigger:"Disparador",lastRun:"Última ejecución",nextRun:"Próxima ejecución",noAutomations:"Sin automatizaciones",cron:"Expresión Cron",manual:"Manual",interval:"Intervalo"},settings:{title:"Configuración",description:"Configura tus preferencias",general:"General",appearance:"Apariencia",api:"Claves API",security:"Seguridad",language:"Idioma",theme:"Tema",dark:"Oscuro",light:"Claro",system:"Sistema",openai:"Clave API OpenAI",anthropic:"Clave API Anthropic",github:"Token GitHub",database:"Base de datos",backup:"Copia de seguridad",restore:"Restaurar",export:"Exportar",import:"Importar",clear:"Borrar datos",save:"Guardar",cancel:"Cancelar",reset:"Restablecer"},chat:{placeholder:"Escribe tu mensaje...",send:"Enviar",thinking:"Pensando...",error:"Error al enviar mensaje",copy:"Copiar",edit:"Editar",delete:"Eliminar",regenerate:"Regenerar"},terminal:{title:"Terminal",newTab:"Nueva pestaña",closeTab:"Cerrar pestaña",clear:"Limpiar",copy:"Copiar",paste:"Pegar"},fileExplorer:{title:"Archivos",openFile:"Abrir archivo",newFile:"Nuevo archivo",newFolder:"Nueva carpeta",rename:"Renombrar",delete:"Eliminar",refresh:"Actualizar"},common:{save:"Guardar",cancel:"Cancelar",delete:"Eliminar",edit:"Editar",create:"Crear",close:"Cerrar",confirm:"Confirmar",search:"Buscar",loading:"Cargando...",error:"Error",success:"Éxito",warning:"Advertencia",info:"Info",yes:"Sí",no:"No",ok:"OK",back:"Atrás",next:"Siguiente",previous:"Anterior",refresh:"Actualizar",export:"Exportar",import:"Importar"},errors:{generic:"Ha ocurrido un error",network:"Error de red",notFound:"No encontrado",unauthorized:"No autorizado",forbidden:"Prohibido",validation:"Error de validación",serverError:"Error del servidor"}},Qy={app:{name:"Codex Linux",loading:"Codex wird geladen...",offline:"Sie sind offline",online:"Wieder online"},sidebar:{agents:"Agenten",worktrees:"Arbeitsbäume",skills:"Fähigkeiten",automations:"Automatisierungen",settings:"Einstellungen"},agents:{title:"Agenten",description:"Verwalten Sie Ihre KI-Codierungsagenten",create:"Neuer Agent",delete:"Agent löschen",start:"Starten",stop:"Stoppen",running:"läuft",idle:"inaktiv",error:"Fehler",name:"Agentenname",model:"Modell",skills:"Fähigkeiten",worktree:"Arbeitsbaum",status:"Status",lastActivity:"Letzte Aktivität",noAgents:"Keine Agenten",createFirst:"Erstellen Sie Ihren ersten Agenten"},worktrees:{title:"Arbeitsbäume",description:"Isolierte Git-Arbeitsbereiche",create:"Neuer Arbeitsbaum",delete:"Arbeitsbaum löschen",name:"Arbeitsbaumname",branch:"Branch",path:"Pfad",noWorktrees:"Keine Arbeitsbäume"},skills:{title:"Fähigkeiten",description:"Wiederverwendbare KI-Fähigkeiten",create:"Neue Fähigkeit",delete:"Fähigkeit löschen",name:"Fähigkeitsname",description_label:"Beschreibung",instructions:"Anweisungen",tags:"Tags",noSkills:"Keine Fähigkeiten",builtIn:"Eingebaut",custom:"Benutzerdefiniert"},automations:{title:"Automatisierungen",description:"Geplante Aufgaben und Workflows",create:"Neue Automatisierung",delete:"Automatisierung löschen",run:"Jetzt ausführen",pause:"Pausieren",resume:"Fortsetzen",name:"Automatisierungsname",schedule:"Zeitplan",command:"Befehl",trigger:"Auslöser",lastRun:"Letzte Ausführung",nextRun:"Nächste Ausführung",noAutomations:"Keine Automatisierungen",cron:"Cron-Ausdruck",manual:"Manuell",interval:"Intervall"},settings:{title:"Einstellungen",description:"Konfigurieren Sie Ihre Präferenzen",general:"Allgemein",appearance:"Erscheinungsbild",api:"API-Schlüssel",security:"Sicherheit",language:"Sprache",theme:"Thema",dark:"Dunkel",light:"Hell",system:"System",openai:"OpenAI API-Schlüssel",anthropic:"Anthropic API-Schlüssel",github:"GitHub-Token",database:"Datenbank",backup:"Sicherung",restore:"Wiederherstellen",export:"Exportieren",import:"Importieren",clear:"Daten löschen",save:"Speichern",cancel:"Abbrechen",reset:"Zurücksetzen"},chat:{placeholder:"Nachricht eingeben...",send:"Senden",thinking:"Denke nach...",error:"Fehler beim Senden",copy:"Kopieren",edit:"Bearbeiten",delete:"Löschen",regenerate:"Neu generieren"},terminal:{title:"Terminal",newTab:"Neuer Tab",closeTab:"Tab schließen",clear:"Löschen",copy:"Kopieren",paste:"Einfügen"},fileExplorer:{title:"Dateien",openFile:"Datei öffnen",newFile:"Neue Datei",newFolder:"Neuer Ordner",rename:"Umbenennen",delete:"Löschen",refresh:"Aktualisieren"},common:{save:"Speichern",cancel:"Abbrechen",delete:"Löschen",edit:"Bearbeiten",create:"Erstellen",close:"Schließen",confirm:"Bestätigen",search:"Suchen",loading:"Laden...",error:"Fehler",success:"Erfolg",warning:"Warnung",info:"Info",yes:"Ja",no:"Nein",ok:"OK",back:"Zurück",next:"Weiter",previous:"Zurück",refresh:"Aktualisieren",export:"Exportieren",import:"Importieren"},errors:{generic:"Ein Fehler ist aufgetreten",network:"Netzwerkfehler",notFound:"Nicht gefunden",unauthorized:"Nicht autorisiert",forbidden:"Verboten",validation:"Validierungsfehler",serverError:"Serverfehler"}},Wu={en:By,fr:Vy,es:Hy,de:Qy},Gy={en:"English",fr:"Français",es:"Español",de:"Deutsch"},ni="en";function $u(e){return Wu[e]||Wu[ni]}function Yy(){if(typeof navigator>"u")return ni;const e=navigator.language.split("-")[0];return["en","fr","es","de"].includes(e)?e:ni}const Ky=["ar","he","fa","ur"];function ns(e){return Ky.includes(e)}const qy=x.createContext(void 0);function Xy({children:e,initialLanguage:t}){const[n,r]=x.useState(()=>{if(t)return t;const u=localStorage.getItem("codex-language");return u&&["en","fr","es","de"].includes(u)?u:Yy()}),[l,o]=x.useState(()=>$u(n));x.useEffect(()=>{const u=$u(n);o(u),localStorage.setItem("codex-language",n),document.documentElement.lang=n,document.documentElement.setAttribute("data-lang",n),document.documentElement.dir=ns(n)?"rtl":"ltr"},[n]);const i=x.useCallback(u=>{r(u)},[]),a=ns(n)?"rtl":"ltr";return s.jsx(qy.Provider,{value:{language:n,t:l,setLanguage:i,availableLanguages:Gy,isRTL:ns(n),dir:a},children:s.jsx("div",{dir:a,children:e})})}function Zy(){const e=$h(),t=Ji(),[n,r]=x.useState([]),[l,o]=x.useState([]),[i,a]=x.useState([]),[u,f]=x.useState([]),[p,h]=x.useState([]),[m,k]=x.useState(null),[w,y]=x.useState("agents"),[S,d]=x.useState(!0),[c,g]=x.useState({});x.useEffect(()=>{const O=t.pathname;if(O==="/"||O.startsWith("/agents")){y("agents");return}if(O.startsWith("/code")){y("code");return}if(O.startsWith("/worktrees")){y("worktrees");return}if(O.startsWith("/skills")){y("skills");return}if(O.startsWith("/automations")){y("automations");return}if(O.startsWith("/settings")){y("settings");return}y("agents")},[t.pathname]);const v=O=>{switch(y(O),O){case"agents":e("/");break;case"code":e("/code");break;case"worktrees":e("/worktrees");break;case"skills":e("/skills");break;case"automations":e("/automations");break;case"settings":e("/settings");break;default:e("/")}};x.useEffect(()=>{b();const O=({agentId:z,chunk:A})=>{g(F=>({...F,[z]:(F[z]||"")+A}))},L=({agentId:z})=>{r(A=>A.map(F=>F.id===z&&c[z]?{...F,messages:[...F.messages,{id:Date.now().toString(),role:"assistant",content:c[z],timestamp:new Date}]}:F)),g(A=>{const F={...A};return delete F[z],F})},I=({agentId:z,error:A})=>{console.error(`Stream error for agent ${z}:`,A),g(F=>{const K={...F};return delete K[z],K})};return window.electronAPI.on("agent:streamChunk",O),window.electronAPI.on("agent:streamEnd",L),window.electronAPI.on("agent:streamError",I),()=>{window.electronAPI.removeListener("agent:streamChunk",O),window.electronAPI.removeListener("agent:streamEnd",L),window.electronAPI.removeListener("agent:streamError",I)}},[]);const b=async()=>{try{const[O,L,I,z,A]=await Promise.all([window.electronAPI.agent.list(),window.electronAPI.skills.list(),window.electronAPI.automation.list(),window.electronAPI.providers.list(),window.electronAPI.settings.getAll()]);r(O),a(L),f(I),h(z),k(A)}catch(O){console.error("Failed to load initial data:",O)}finally{d(!1)}},N=async O=>{try{const L=await window.electronAPI.agent.create(O);return r(I=>[...I,L]),L}catch(L){throw console.error("Failed to create agent:",L),L}},E=async O=>{try{await window.electronAPI.agent.delete(O),r(L=>L.filter(I=>I.id!==O))}catch(L){console.error("Failed to delete agent:",L)}},T=async(O,L)=>{try{const I=await window.electronAPI.worktree.create(O,L);return o(z=>[...z,I]),I}catch(I){throw console.error("Failed to create worktree:",I),I}},$=async O=>{try{const L=await window.electronAPI.skills.create(O);return a(I=>[...I,L]),L}catch(L){throw console.error("Failed to create skill:",L),L}},M=async O=>{try{const L=await window.electronAPI.automation.create(O);return f(I=>[...I,L]),L}catch(L){throw console.error("Failed to create automation:",L),L}};return S?s.jsx("div",{className:"flex items-center justify-center h-screen bg-[var(--color-bg-primary)]","data-testid":"app-loading",children:s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx("div",{className:"relative",children:s.jsx("div",{className:"w-12 h-12 rounded-full border-2 border-neutral-200 border-t-neutral-800 animate-spin"})}),s.jsx("p",{className:"text-sm text-neutral-500 animate-pulse",children:"Loading Codex..."})]})}):s.jsx(Xy,{children:s.jsxs("div",{className:"flex h-screen bg-[var(--color-bg-primary)] text-[var(--color-text-primary)] overflow-hidden selection:bg-neutral-900 selection:text-white","data-testid":"app-container",children:[s.jsx(fv,{activeTab:w,onTabChange:v}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[s.jsx(mv,{activeTab:w,agents:n,onSettingsClick:()=>v("settings")}),s.jsx("main",{className:"flex-1 overflow-hidden animate-fadeIn","data-testid":"main-content",children:s.jsxs(lg,{children:[s.jsx(Nt,{path:"/",element:s.jsx(hv,{agents:n,providers:p,skills:i,onCreateAgent:N,onDeleteAgent:E})}),s.jsx(Nt,{path:"/code",element:s.jsx(Rx,{rootPath:"/"})}),s.jsx(Nt,{path:"/worktrees",element:s.jsx(gv,{worktrees:l,onCreateWorktree:T})}),s.jsx(Nt,{path:"/skills",element:s.jsx(vv,{skills:i,onCreateSkill:$})}),s.jsx(Nt,{path:"/automations",element:s.jsx(xv,{automations:u,agents:n,skills:i,onCreateAutomation:M})}),s.jsx(Nt,{path:"/audit",element:s.jsx(Uy,{})}),s.jsx(Nt,{path:"/settings",element:s.jsx(yv,{settings:m,providers:p,onSettingsChange:k})})]})})]})]})})}"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").then(e=>{console.log("SW registered:",e)}).catch(e=>{console.log("SW registration failed:",e)})});rs.createRoot(document.getElementById("root")).render(s.jsx(mt.StrictMode,{children:s.jsx(ig,{children:s.jsx(Zy,{})})}));