@agimon-ai/doompi-web 0.0.1-alpha.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 (344) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +196 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  4. package/dist/bin/serve.cjs +3 -0
  5. package/dist/bin/serve.cjs.map +1 -0
  6. package/dist/bin/serve.d.cts +1 -0
  7. package/dist/bin/serve.d.mts +1 -0
  8. package/dist/bin/serve.mjs +3 -0
  9. package/dist/bin/serve.mjs.map +1 -0
  10. package/dist/bundler.cjs +1 -0
  11. package/dist/bundler.d.cts +2 -0
  12. package/dist/bundler.d.mts +2 -0
  13. package/dist/bundler.mjs +1 -0
  14. package/dist/index.cjs +1 -0
  15. package/dist/index.d.cts +7 -0
  16. package/dist/index.d.mts +7 -0
  17. package/dist/index.mjs +1 -0
  18. package/dist/src/adapters/authRoutes.cjs +2 -0
  19. package/dist/src/adapters/authRoutes.cjs.map +1 -0
  20. package/dist/src/adapters/authRoutes.mjs +2 -0
  21. package/dist/src/adapters/authRoutes.mjs.map +1 -0
  22. package/dist/src/adapters/bundledServer.cjs +2 -0
  23. package/dist/src/adapters/bundledServer.cjs.map +1 -0
  24. package/dist/src/adapters/bundledServer.mjs +2 -0
  25. package/dist/src/adapters/bundledServer.mjs.map +1 -0
  26. package/dist/src/adapters/directoryListing.cjs +2 -0
  27. package/dist/src/adapters/directoryListing.cjs.map +1 -0
  28. package/dist/src/adapters/directoryListing.mjs +2 -0
  29. package/dist/src/adapters/directoryListing.mjs.map +1 -0
  30. package/dist/src/adapters/directorySearch.cjs +3 -0
  31. package/dist/src/adapters/directorySearch.cjs.map +1 -0
  32. package/dist/src/adapters/directorySearch.mjs +3 -0
  33. package/dist/src/adapters/directorySearch.mjs.map +1 -0
  34. package/dist/src/adapters/gitStatus.cjs +2 -0
  35. package/dist/src/adapters/gitStatus.cjs.map +1 -0
  36. package/dist/src/adapters/gitStatus.mjs +2 -0
  37. package/dist/src/adapters/gitStatus.mjs.map +1 -0
  38. package/dist/src/adapters/httpServer.cjs +2 -0
  39. package/dist/src/adapters/httpServer.cjs.map +1 -0
  40. package/dist/src/adapters/httpServer.d.cts +14 -0
  41. package/dist/src/adapters/httpServer.d.cts.map +1 -0
  42. package/dist/src/adapters/httpServer.d.mts +14 -0
  43. package/dist/src/adapters/httpServer.d.mts.map +1 -0
  44. package/dist/src/adapters/httpServer.mjs +2 -0
  45. package/dist/src/adapters/httpServer.mjs.map +1 -0
  46. package/dist/src/adapters/hubProbe.cjs +2 -0
  47. package/dist/src/adapters/hubProbe.cjs.map +1 -0
  48. package/dist/src/adapters/hubProbe.mjs +2 -0
  49. package/dist/src/adapters/hubProbe.mjs.map +1 -0
  50. package/dist/src/adapters/packageApiProxy.cjs +2 -0
  51. package/dist/src/adapters/packageApiProxy.cjs.map +1 -0
  52. package/dist/src/adapters/packageApiProxy.mjs +2 -0
  53. package/dist/src/adapters/packageApiProxy.mjs.map +1 -0
  54. package/dist/src/adapters/piHubService.cjs +2 -0
  55. package/dist/src/adapters/piHubService.cjs.map +1 -0
  56. package/dist/src/adapters/piHubService.mjs +2 -0
  57. package/dist/src/adapters/piHubService.mjs.map +1 -0
  58. package/dist/src/adapters/piWebSocketListener.cjs +2 -0
  59. package/dist/src/adapters/piWebSocketListener.cjs.map +1 -0
  60. package/dist/src/adapters/piWebSocketListener.mjs +2 -0
  61. package/dist/src/adapters/piWebSocketListener.mjs.map +1 -0
  62. package/dist/src/adapters/providerAuth.cjs +2 -0
  63. package/dist/src/adapters/providerAuth.cjs.map +1 -0
  64. package/dist/src/adapters/providerAuth.mjs +2 -0
  65. package/dist/src/adapters/providerAuth.mjs.map +1 -0
  66. package/dist/src/adapters/registryWatcher.cjs +2 -0
  67. package/dist/src/adapters/registryWatcher.cjs.map +1 -0
  68. package/dist/src/adapters/registryWatcher.mjs +2 -0
  69. package/dist/src/adapters/registryWatcher.mjs.map +1 -0
  70. package/dist/src/adapters/serverSpawner.cjs +2 -0
  71. package/dist/src/adapters/serverSpawner.cjs.map +1 -0
  72. package/dist/src/adapters/serverSpawner.mjs +2 -0
  73. package/dist/src/adapters/serverSpawner.mjs.map +1 -0
  74. package/dist/src/adapters/sessionFiles.cjs +3 -0
  75. package/dist/src/adapters/sessionFiles.cjs.map +1 -0
  76. package/dist/src/adapters/sessionFiles.mjs +3 -0
  77. package/dist/src/adapters/sessionFiles.mjs.map +1 -0
  78. package/dist/src/adapters/sessionHub.cjs +2 -0
  79. package/dist/src/adapters/sessionHub.cjs.map +1 -0
  80. package/dist/src/adapters/sessionHub.mjs +2 -0
  81. package/dist/src/adapters/sessionHub.mjs.map +1 -0
  82. package/dist/src/adapters/sessionSocketClient.cjs +2 -0
  83. package/dist/src/adapters/sessionSocketClient.cjs.map +1 -0
  84. package/dist/src/adapters/sessionSocketClient.mjs +2 -0
  85. package/dist/src/adapters/sessionSocketClient.mjs.map +1 -0
  86. package/dist/src/adapters/syncGuard.cjs +2 -0
  87. package/dist/src/adapters/syncGuard.cjs.map +1 -0
  88. package/dist/src/adapters/syncGuard.mjs +2 -0
  89. package/dist/src/adapters/syncGuard.mjs.map +1 -0
  90. package/dist/src/adapters/threadJournals.cjs +2 -0
  91. package/dist/src/adapters/threadJournals.cjs.map +1 -0
  92. package/dist/src/adapters/threadJournals.mjs +2 -0
  93. package/dist/src/adapters/threadJournals.mjs.map +1 -0
  94. package/dist/src/adapters/webBundler.cjs +2 -0
  95. package/dist/src/adapters/webBundler.cjs.map +1 -0
  96. package/dist/src/adapters/webBundler.d.cts +28 -0
  97. package/dist/src/adapters/webBundler.d.cts.map +1 -0
  98. package/dist/src/adapters/webBundler.d.mts +28 -0
  99. package/dist/src/adapters/webBundler.d.mts.map +1 -0
  100. package/dist/src/adapters/webBundler.mjs +2 -0
  101. package/dist/src/adapters/webBundler.mjs.map +1 -0
  102. package/dist/src/adapters/webHubPluginLoader.cjs +2 -0
  103. package/dist/src/adapters/webHubPluginLoader.cjs.map +1 -0
  104. package/dist/src/adapters/webHubPluginLoader.mjs +2 -0
  105. package/dist/src/adapters/webHubPluginLoader.mjs.map +1 -0
  106. package/dist/src/adapters/webHubPlugins.generated.cjs +2 -0
  107. package/dist/src/adapters/webHubPlugins.generated.cjs.map +1 -0
  108. package/dist/src/adapters/webHubPlugins.generated.mjs +2 -0
  109. package/dist/src/adapters/webHubPlugins.generated.mjs.map +1 -0
  110. package/dist/src/adapters/webPluginGenerate.cjs +4 -0
  111. package/dist/src/adapters/webPluginGenerate.cjs.map +1 -0
  112. package/dist/src/adapters/webPluginGenerate.mjs +4 -0
  113. package/dist/src/adapters/webPluginGenerate.mjs.map +1 -0
  114. package/dist/src/adapters/webPluginScan.cjs +2 -0
  115. package/dist/src/adapters/webPluginScan.cjs.map +1 -0
  116. package/dist/src/adapters/webPluginScan.mjs +2 -0
  117. package/dist/src/adapters/webPluginScan.mjs.map +1 -0
  118. package/dist/src/adapters/webPluginVite.cjs +2 -0
  119. package/dist/src/adapters/webPluginVite.cjs.map +1 -0
  120. package/dist/src/adapters/webPluginVite.mjs +2 -0
  121. package/dist/src/adapters/webPluginVite.mjs.map +1 -0
  122. package/dist/src/services/directoryMatch.cjs +2 -0
  123. package/dist/src/services/directoryMatch.cjs.map +1 -0
  124. package/dist/src/services/directoryMatch.mjs +2 -0
  125. package/dist/src/services/directoryMatch.mjs.map +1 -0
  126. package/dist/src/services/fileMatch.cjs +2 -0
  127. package/dist/src/services/fileMatch.cjs.map +1 -0
  128. package/dist/src/services/fileMatch.mjs +2 -0
  129. package/dist/src/services/fileMatch.mjs.map +1 -0
  130. package/dist/src/services/fileMedia.cjs +2 -0
  131. package/dist/src/services/fileMedia.cjs.map +1 -0
  132. package/dist/src/services/fileMedia.mjs +2 -0
  133. package/dist/src/services/fileMedia.mjs.map +1 -0
  134. package/dist/src/services/frameRing.cjs +2 -0
  135. package/dist/src/services/frameRing.cjs.map +1 -0
  136. package/dist/src/services/frameRing.mjs +2 -0
  137. package/dist/src/services/frameRing.mjs.map +1 -0
  138. package/dist/src/services/journalTail.cjs +3 -0
  139. package/dist/src/services/journalTail.cjs.map +1 -0
  140. package/dist/src/services/journalTail.mjs +3 -0
  141. package/dist/src/services/journalTail.mjs.map +1 -0
  142. package/dist/src/services/loginFlow.cjs +2 -0
  143. package/dist/src/services/loginFlow.cjs.map +1 -0
  144. package/dist/src/services/loginFlow.mjs +2 -0
  145. package/dist/src/services/loginFlow.mjs.map +1 -0
  146. package/dist/src/services/registryStore.cjs +2 -0
  147. package/dist/src/services/registryStore.cjs.map +1 -0
  148. package/dist/src/services/registryStore.mjs +2 -0
  149. package/dist/src/services/registryStore.mjs.map +1 -0
  150. package/dist/src/services/retryPolicy.cjs +2 -0
  151. package/dist/src/services/retryPolicy.cjs.map +1 -0
  152. package/dist/src/services/retryPolicy.mjs +2 -0
  153. package/dist/src/services/retryPolicy.mjs.map +1 -0
  154. package/dist/src/services/serveOptions.cjs +2 -0
  155. package/dist/src/services/serveOptions.cjs.map +1 -0
  156. package/dist/src/services/serveOptions.d.cts +21 -0
  157. package/dist/src/services/serveOptions.d.cts.map +1 -0
  158. package/dist/src/services/serveOptions.d.mts +21 -0
  159. package/dist/src/services/serveOptions.d.mts.map +1 -0
  160. package/dist/src/services/serveOptions.mjs +2 -0
  161. package/dist/src/services/serveOptions.mjs.map +1 -0
  162. package/dist/src/services/sessionFraming.cjs +4 -0
  163. package/dist/src/services/sessionFraming.cjs.map +1 -0
  164. package/dist/src/services/sessionFraming.mjs +4 -0
  165. package/dist/src/services/sessionFraming.mjs.map +1 -0
  166. package/dist/src/services/sessionPresence.cjs +2 -0
  167. package/dist/src/services/sessionPresence.cjs.map +1 -0
  168. package/dist/src/services/sessionPresence.mjs +2 -0
  169. package/dist/src/services/sessionPresence.mjs.map +1 -0
  170. package/dist/src/services/staticAssets.cjs +2 -0
  171. package/dist/src/services/staticAssets.cjs.map +1 -0
  172. package/dist/src/services/staticAssets.mjs +2 -0
  173. package/dist/src/services/staticAssets.mjs.map +1 -0
  174. package/dist/src/services/webDevRoots.cjs +2 -0
  175. package/dist/src/services/webDevRoots.cjs.map +1 -0
  176. package/dist/src/services/webDevRoots.mjs +2 -0
  177. package/dist/src/services/webDevRoots.mjs.map +1 -0
  178. package/dist/src/services/webPluginManifest.cjs +2 -0
  179. package/dist/src/services/webPluginManifest.cjs.map +1 -0
  180. package/dist/src/services/webPluginManifest.mjs +2 -0
  181. package/dist/src/services/webPluginManifest.mjs.map +1 -0
  182. package/dist/src/types/auth.cjs +2 -0
  183. package/dist/src/types/auth.cjs.map +1 -0
  184. package/dist/src/types/auth.d.cts +94 -0
  185. package/dist/src/types/auth.d.cts.map +1 -0
  186. package/dist/src/types/auth.d.mts +94 -0
  187. package/dist/src/types/auth.d.mts.map +1 -0
  188. package/dist/src/types/auth.mjs +2 -0
  189. package/dist/src/types/auth.mjs.map +1 -0
  190. package/dist/src/types/bridge.d.cts +31 -0
  191. package/dist/src/types/bridge.d.cts.map +1 -0
  192. package/dist/src/types/bridge.d.mts +31 -0
  193. package/dist/src/types/bridge.d.mts.map +1 -0
  194. package/dist/src/types/hub.cjs +2 -0
  195. package/dist/src/types/hub.cjs.map +1 -0
  196. package/dist/src/types/hub.d.cts +58 -0
  197. package/dist/src/types/hub.d.cts.map +1 -0
  198. package/dist/src/types/hub.d.mts +58 -0
  199. package/dist/src/types/hub.d.mts.map +1 -0
  200. package/dist/src/types/hub.mjs +2 -0
  201. package/dist/src/types/hub.mjs.map +1 -0
  202. package/dist/src/types/media.cjs +2 -0
  203. package/dist/src/types/media.cjs.map +1 -0
  204. package/dist/src/types/media.mjs +2 -0
  205. package/dist/src/types/media.mjs.map +1 -0
  206. package/dist/src/types/registry.cjs +1 -0
  207. package/dist/src/types/registry.d.cts +2 -0
  208. package/dist/src/types/registry.d.mts +2 -0
  209. package/dist/src/types/registry.mjs +1 -0
  210. package/dist/src/types/session.cjs +2 -0
  211. package/dist/src/types/session.cjs.map +1 -0
  212. package/dist/src/types/session.d.cts +24 -0
  213. package/dist/src/types/session.d.cts.map +1 -0
  214. package/dist/src/types/session.d.mts +24 -0
  215. package/dist/src/types/session.d.mts.map +1 -0
  216. package/dist/src/types/session.mjs +2 -0
  217. package/dist/src/types/session.mjs.map +1 -0
  218. package/dist/web/apple-touch-icon.png +0 -0
  219. package/dist/web/assets/index-Cg52ngKv.css +2 -0
  220. package/dist/web/assets/index-DQO7NTIP.js +90 -0
  221. package/dist/web/assets/index-DQO7NTIP.js.map +1 -0
  222. package/dist/web/favicon-16.png +0 -0
  223. package/dist/web/favicon-32.png +0 -0
  224. package/dist/web/favicon.ico +0 -0
  225. package/dist/web/favicon.svg +16 -0
  226. package/dist/web/icon-512.png +0 -0
  227. package/dist/web/index.html +17 -0
  228. package/llms.txt +8 -0
  229. package/package.json +106 -0
  230. package/src/adapters/authRoutes.ts +95 -0
  231. package/src/adapters/bundledServer.ts +64 -0
  232. package/src/adapters/directoryListing.ts +127 -0
  233. package/src/adapters/directorySearch.ts +124 -0
  234. package/src/adapters/gitStatus.ts +27 -0
  235. package/src/adapters/httpServer.ts +556 -0
  236. package/src/adapters/hubProbe.ts +27 -0
  237. package/src/adapters/packageApiProxy.ts +60 -0
  238. package/src/adapters/piHubService.ts +129 -0
  239. package/src/adapters/piWebSocketListener.ts +98 -0
  240. package/src/adapters/providerAuth.ts +181 -0
  241. package/src/adapters/registryWatcher.ts +112 -0
  242. package/src/adapters/serverSpawner.ts +181 -0
  243. package/src/adapters/sessionFiles.ts +99 -0
  244. package/src/adapters/sessionHub.ts +567 -0
  245. package/src/adapters/sessionSocketClient.ts +105 -0
  246. package/src/adapters/syncGuard.ts +119 -0
  247. package/src/adapters/threadJournals.ts +184 -0
  248. package/src/adapters/webBundler.ts +83 -0
  249. package/src/adapters/webHubPluginLoader.ts +67 -0
  250. package/src/adapters/webHubPlugins.generated.ts +4 -0
  251. package/src/adapters/webPluginGenerate.ts +172 -0
  252. package/src/adapters/webPluginScan.ts +62 -0
  253. package/src/adapters/webPluginVite.ts +51 -0
  254. package/src/bin/serve.ts +64 -0
  255. package/src/exports/bundler.ts +1 -0
  256. package/src/exports/index.ts +9 -0
  257. package/src/services/directoryMatch.ts +71 -0
  258. package/src/services/fileMatch.ts +37 -0
  259. package/src/services/fileMedia.ts +27 -0
  260. package/src/services/frameRing.ts +33 -0
  261. package/src/services/journalTail.ts +47 -0
  262. package/src/services/loginFlow.ts +144 -0
  263. package/src/services/registryStore.ts +83 -0
  264. package/src/services/retryPolicy.ts +15 -0
  265. package/src/services/serveOptions.ts +63 -0
  266. package/src/services/sessionFraming.ts +32 -0
  267. package/src/services/sessionPresence.ts +131 -0
  268. package/src/services/staticAssets.ts +37 -0
  269. package/src/services/webDevRoots.ts +36 -0
  270. package/src/services/webPluginManifest.ts +149 -0
  271. package/src/types/auth.ts +118 -0
  272. package/src/types/bridge.ts +41 -0
  273. package/src/types/hub.ts +290 -0
  274. package/src/types/media.ts +38 -0
  275. package/src/types/registry.ts +2 -0
  276. package/src/types/session.ts +36 -0
  277. package/src/web/app/Providers.tsx +46 -0
  278. package/src/web/app/protocolRuntime.ts +106 -0
  279. package/src/web/app/sessionRuntime.ts +189 -0
  280. package/src/web/app/webPlugins.generated.ts +4 -0
  281. package/src/web/components/MascotMark.tsx +46 -0
  282. package/src/web/components/PluginSurface.tsx +10 -0
  283. package/src/web/components/ToolRendererBoundary.tsx +32 -0
  284. package/src/web/features/activity/ActivityDock.tsx +125 -0
  285. package/src/web/features/connection/RefusedCard.tsx +63 -0
  286. package/src/web/features/dialogs/DialogOverlay.tsx +176 -0
  287. package/src/web/features/leader/CommandPalette.tsx +386 -0
  288. package/src/web/features/selection/SelectionBar.tsx +529 -0
  289. package/src/web/features/session/Composer.tsx +368 -0
  290. package/src/web/features/session/MentionPreviews.tsx +58 -0
  291. package/src/web/features/session/ThreadView.tsx +35 -0
  292. package/src/web/features/session/Timeline.tsx +382 -0
  293. package/src/web/features/session/ToolCard.tsx +79 -0
  294. package/src/web/features/sessions/NewSessionDialog.tsx +222 -0
  295. package/src/web/features/sessions/SessionRail.tsx +411 -0
  296. package/src/web/features/settings/AppearanceSettings.tsx +88 -0
  297. package/src/web/features/settings/LoginFlowDialog.tsx +221 -0
  298. package/src/web/features/settings/PluginSettings.tsx +92 -0
  299. package/src/web/features/settings/ProviderSettings.tsx +238 -0
  300. package/src/web/features/settings/SettingsMenu.tsx +32 -0
  301. package/src/web/features/status/TopBar.tsx +208 -0
  302. package/src/web/index.html +16 -0
  303. package/src/web/lib/authApi.ts +90 -0
  304. package/src/web/lib/commands.ts +61 -0
  305. package/src/web/lib/composition.ts +225 -0
  306. package/src/web/lib/fileMentions.ts +32 -0
  307. package/src/web/lib/hubApi.ts +86 -0
  308. package/src/web/lib/leaderTree.ts +159 -0
  309. package/src/web/lib/piTransport.ts +61 -0
  310. package/src/web/lib/pluginRegistry.ts +488 -0
  311. package/src/web/lib/pluginSlotProps.ts +50 -0
  312. package/src/web/lib/promptFocus.ts +25 -0
  313. package/src/web/lib/protocolTimeline.ts +73 -0
  314. package/src/web/lib/sessionModel.ts +673 -0
  315. package/src/web/lib/sessionSummary.ts +58 -0
  316. package/src/web/lib/settingsSections.ts +21 -0
  317. package/src/web/lib/statusLine.ts +90 -0
  318. package/src/web/lib/threadRenderer.ts +25 -0
  319. package/src/web/lib/toolMessageProps.ts +21 -0
  320. package/src/web/lib/transport.ts +30 -0
  321. package/src/web/lib/wsClient.ts +73 -0
  322. package/src/web/main.tsx +17 -0
  323. package/src/web/public/apple-touch-icon.png +0 -0
  324. package/src/web/public/favicon-16.png +0 -0
  325. package/src/web/public/favicon-32.png +0 -0
  326. package/src/web/public/favicon.ico +0 -0
  327. package/src/web/public/favicon.svg +16 -0
  328. package/src/web/public/icon-512.png +0 -0
  329. package/src/web/routes/CockpitPage.tsx +98 -0
  330. package/src/web/routes/SettingsPage.tsx +60 -0
  331. package/src/web/routes/routeTree.tsx +49 -0
  332. package/src/web/stores/menuStore.ts +78 -0
  333. package/src/web/stores/paletteStore.ts +25 -0
  334. package/src/web/stores/sessionStore.ts +303 -0
  335. package/src/web/stores/sessionsStore.ts +155 -0
  336. package/src/web/stores/themeStore.ts +52 -0
  337. package/src/web/stores/threadStore.ts +68 -0
  338. package/src/web/stores/transientTabsStore.ts +63 -0
  339. package/src/web/stores/uiStore.ts +28 -0
  340. package/src/web/stores/useOpenTab.ts +19 -0
  341. package/src/web/stores/usePluginSlotProps.ts +22 -0
  342. package/src/web/styles/app.css +15 -0
  343. package/src/web/styles/webPluginSources.generated.css +1 -0
  344. package/src/web/vite-env.d.ts +1 -0
@@ -0,0 +1,90 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+re(a,u),c+=ae(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+re(a,u++),c+=ae(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ae(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function oe(e,t,n){if(e==null)return e;var r=[],i=0;return ae(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function se(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var O=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},k={map:oe,forEach:function(e,t,n){oe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oe(e,function(){t++}),t},toArray:function(e){return oe(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=k,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:se}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,O)}catch(e){O(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=ee,D=function(){ne.postMessage(null)}}else D=function(){_(ee,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),te=Symbol.for(`react.activity`),ne=Symbol.for(`react.memo_cache_sentinel`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var ae=Symbol.for(`react.client.reference`);function oe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case te:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?oe(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var se=Array.isArray,O=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function pe(e,t){ue++,le[ue]=e.current,e.current=t}var me=de(null),he=de(null),ge=de(null),_e=de(null);function ve(e,t){switch(pe(ge,t),pe(he,e),pe(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?rf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=rf(t),e=af(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(me),pe(me,e)}function ye(){fe(me),fe(he),fe(ge)}function be(e){e.memoizedState!==null&&pe(_e,e);var t=me.current,n=af(t,e.type);t!==n&&(pe(he,e),pe(me,n))}function xe(e){he.current===e&&(fe(me),fe(he)),_e.current===e&&(fe(_e),pp._currentValue=ce)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+Se+e+Ce}var Te=!1;function Ee(e,t){if(!e||Te)return``;Te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,je=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,Pe=t.unstable_now,Fe=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,Le=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Be=t.unstable_IdlePriority,Ve=t.log,He=t.unstable_setDisableYieldValue,Ue=null,We=null;function Ge(e){if(typeof Ve==`function`&&He(e),We&&typeof We.setStrictMode==`function`)try{We.setStrictMode(Ue,e)}catch{}}var Ke=Math.clz32?Math.clz32:Ye,qe=Math.log,Je=Math.LN2;function Ye(e){return e>>>=0,e===0?32:31-(qe(e)/Je|0)|0}var Xe=256,Ze=262144,Qe=4194304;function $e(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function et(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=$e(n))):i=$e(o):i=$e(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=$e(n))):i=$e(o)):i=$e(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function tt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function nt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rt(){var e=Qe;return Qe<<=1,!(Qe&62914560)&&(Qe=4194304),e}function it(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function at(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ot(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ke(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&st(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function st(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ke(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ct(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ke(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function lt(e,t){var n=t&-t;return n=n&42?1:ut(n),(n&(e.suspendedLanes|t))===0?n:0}function ut(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function dt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ft(){var e=k.p;return e===0?(e=window.event,e===void 0?32:kp(e.type)):e}function pt(e,t){var n=k.p;try{return k.p=e,t()}finally{k.p=n}}var mt=Math.random().toString(36).slice(2),ht=`__reactFiber$`+mt,gt=`__reactProps$`+mt,_t=`__reactContainer$`+mt,A=`__reactEvents$`+mt,vt=`__reactListeners$`+mt,yt=`__reactHandles$`+mt,bt=`__reactResources$`+mt,xt=`__reactMarker$`+mt;function St(e){delete e[ht],delete e[gt],delete e[A],delete e[vt],delete e[yt]}function Ct(e){var t=e[ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_t]||n[ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Df(e);e!==null;){if(n=e[ht])return n;e=Df(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[ht]||e[_t]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Tt(e){var t=e[bt];return t||=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Et(e){e[xt]=!0}var Dt=new Set,Ot={};function kt(e,t){At(e,t),At(e+`Capture`,t)}function At(e,t){for(Ot[e]=t,e=0;e<t.length;e++)Dt.add(t[e])}var jt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Mt={},Nt={};function Pt(e){return ke.call(Nt,e)?!0:ke.call(Mt,e)?!1:jt.test(e)?Nt[e]=!0:(Mt[e]=!0,!1)}function Ft(e,t,n){if(Pt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function It(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Lt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Rt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Bt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vt(e){if(!e._valueTracker){var t=zt(e)?`checked`:`value`;e._valueTracker=Bt(e,t,``+e[t])}}function Ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function M(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ut=/[\n"\\]/g;function Wt(e){return e.replace(Ut,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Gt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Rt(t)):e.value!==``+Rt(t)&&(e.value=``+Rt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):qt(e,o,Rt(n)):qt(e,o,Rt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Rt(s):e.removeAttribute(`name`)}function Kt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Vt(e);return}n=n==null?``:``+Rt(n),t=t==null?n:``+Rt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Vt(e)}function qt(e,t,n){t===`number`&&M(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Jt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Rt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Yt(e,t,n){if(t!=null&&(t=``+Rt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Rt(n)}function Xt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(se(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Rt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Vt(e)}function Zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function $t(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function en(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&$t(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&$t(e,o,t[o])}function tn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var nn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),rn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function an(e){return rn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function on(){}var sn=null;function cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ln=null,un=null;function dn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[gt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Gt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Wt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[gt]||null;if(!a)throw Error(i(90));Gt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ht(r)}break a;case`textarea`:Yt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Jt(e,!!n.multiple,t,!1)}}}var fn=!1;function pn(e,t,n){if(fn)return e(t,n);fn=!0;try{return e(t)}finally{if(fn=!1,(ln!==null||un!==null)&&(Pu(),ln&&(t=ln,e=un,un=ln=null,dn(t),e)))for(t=0;t<e.length;t++)dn(e[t])}}function N(e,t){var n=e.stateNode;if(n===null)return null;var r=n[gt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var mn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),hn=!1;if(mn)try{var gn={};Object.defineProperty(gn,"passive",{get:function(){hn=!0}}),window.addEventListener(`test`,gn,gn),window.removeEventListener(`test`,gn,gn)}catch{hn=!1}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return yn=i.slice(e,1<r?1-r:void 0)}function xn(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 Sn(){return!0}function Cn(){return!1}function wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Sn:Cn,this.isPropagationStopped=Cn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Sn)},persist:function(){},isPersistent:Sn}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},En=wn(Tn),Dn=m({},Tn,{view:0,detail:0}),On=wn(Dn),kn,An,jn,Mn=m({},Dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:P,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!==jn&&(jn&&e.type===`mousemove`?(kn=e.screenX-jn.screenX,An=e.screenY-jn.screenY):An=kn=0,jn=e),kn)},movementY:function(e){return`movementY`in e?e.movementY:An}}),Nn=wn(Mn),Pn=wn(m({},Mn,{dataTransfer:0})),Fn=wn(m({},Dn,{relatedTarget:0})),In=wn(m({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0})),Ln=wn(m({},Tn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Rn=wn(m({},Tn,{data:0})),zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Bn={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`},Vn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Hn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vn[e])?!!t[e]:!1}function P(){return Hn}var Un=wn(m({},Dn,{key:function(e){if(e.key){var t=zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=xn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Bn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:P,charCode:function(e){return e.type===`keypress`?xn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?xn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Wn=wn(m({},Mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Gn=wn(m({},Dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:P})),Kn=wn(m({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),qn=wn(m({},Mn,{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})),Jn=wn(m({},Tn,{newState:0,oldState:0})),Yn=[9,13,27,32],Xn=mn&&`CompositionEvent`in window,Zn=null;mn&&`documentMode`in document&&(Zn=document.documentMode);var Qn=mn&&`TextEvent`in window&&!Zn,$n=mn&&(!Xn||Zn&&8<Zn&&11>=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=bn(),yn=vn=_n=null,ir=!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 $n&&t.locale!==`ko`?null:t.data;default:return null}}var sr={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 cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!sr[e.type]:t===`textarea`}function lr(e,t,n,r){ln?un?un.push(r):un=[r]:ln=r,t=Hd(t,`onChange`),0<t.length&&(n=new En(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ur=null,dr=null;function fr(e){Pd(e,0)}function pr(e){if(Ht(j(e)))return e}function mr(e,t){if(e===`change`)return t}var hr=!1;if(mn){var gr;if(mn){var _r=`oninput`in document;if(!_r){var vr=document.createElement(`div`);vr.setAttribute(`oninput`,`return;`),_r=typeof vr.oninput==`function`}gr=_r}else gr=!1;hr=gr&&(!document.documentMode||9<document.documentMode)}function yr(){ur&&(ur.detachEvent(`onpropertychange`,br),dr=ur=null)}function br(e){if(e.propertyName===`value`&&pr(dr)){var t=[];lr(t,dr,e,cn(e)),pn(fr,t)}}function xr(e,t,n){e===`focusin`?(yr(),ur=t,dr=n,ur.attachEvent(`onpropertychange`,br)):e===`focusout`&&yr()}function Sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return pr(dr)}function Cr(e,t){if(e===`click`)return pr(t)}function wr(e,t){if(e===`input`||e===`change`)return pr(t)}function Tr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Er=typeof Object.is==`function`?Object.is:Tr;function Dr(e,t){if(Er(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ke.call(t,i)||!Er(e[i],t[i]))return!1}return!0}function Or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var n=Or(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=M(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=M(e.document)}return t}function Mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Nr=mn&&`documentMode`in document&&11>=document.documentMode,Pr=null,Fr=null,Ir=null,Lr=!1;function Rr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lr||Pr==null||Pr!==M(r)||(r=Pr,`selectionStart`in r&&Mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ir&&Dr(Ir,r)||(Ir=r,r=Hd(Fr,`onSelect`),0<r.length&&(t=new En(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Pr)))}function zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Br={animationend:zr(`Animation`,`AnimationEnd`),animationiteration:zr(`Animation`,`AnimationIteration`),animationstart:zr(`Animation`,`AnimationStart`),transitionrun:zr(`Transition`,`TransitionRun`),transitionstart:zr(`Transition`,`TransitionStart`),transitioncancel:zr(`Transition`,`TransitionCancel`),transitionend:zr(`Transition`,`TransitionEnd`)},Vr={},Hr={};mn&&(Hr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Br.animationend.animation,delete Br.animationiteration.animation,delete Br.animationstart.animation),`TransitionEvent`in window||delete Br.transitionend.transition);function Ur(e){if(Vr[e])return Vr[e];if(!Br[e])return e;var t=Br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hr)return Vr[e]=t[n];return e}var Wr=Ur(`animationend`),Gr=Ur(`animationiteration`),Kr=Ur(`animationstart`),qr=Ur(`transitionrun`),Jr=Ur(`transitionstart`),Yr=Ur(`transitioncancel`),Xr=Ur(`transitionend`),Zr=new Map,Qr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Qr.push(`scrollEnd`);function $r(e,t){Zr.set(e,t),kt(t,[e])}var ei=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ti=[],ni=0,ri=0;function ii(){for(var e=ni,t=ri=ni=0;t<e;){var n=ti[t];ti[t++]=null;var r=ti[t];ti[t++]=null;var i=ti[t];ti[t++]=null;var a=ti[t];if(ti[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ci(n,i,a)}}function ai(e,t,n,r){ti[ni++]=e,ti[ni++]=t,ti[ni++]=n,ti[ni++]=r,ri|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function oi(e,t,n,r){return ai(e,t,n,r),li(e)}function si(e,t){return ai(e,null,null,t),li(e)}function ci(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ke(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function li(e){if(50<Tu)throw Tu=0,Eu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ui={};function di(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fi(e,t,n,r){return new di(e,t,n,r)}function pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mi(e,t){var n=e.alternate;return n===null?(n=fi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function hi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function gi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)pi(e)&&(s=1);else if(typeof e==`string`)s=ip(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case te:return e=fi(31,n,t,a),e.elementType=te,e.lanes=o,e;case y:return _i(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=fi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=fi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=fi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case ee:s=14;break a;case D:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=fi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function _i(e,t,n,r){return e=fi(7,e,r,t),e.lanes=n,e}function vi(e,t,n){return e=fi(6,e,null,t),e.lanes=n,e}function yi(e){var t=fi(18,null,null,0);return t.stateNode=e,t}function bi(e,t,n){return t=fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xi=new WeakMap;function Si(e,t){if(typeof e==`object`&&e){var n=xi.get(e);return n===void 0?(t={value:e,source:t,stack:Oe(t)},xi.set(e,t),t):n}return{value:e,source:t,stack:Oe(t)}}var Ci=[],wi=0,Ti=null,Ei=0,Di=[],Oi=0,ki=null,Ai=1,ji=``;function Mi(e,t){Ci[wi++]=Ei,Ci[wi++]=Ti,Ti=e,Ei=t}function Ni(e,t,n){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,ki=e;var r=Ai;e=ji;var i=32-Ke(r)-1;r&=~(1<<i),n+=1;var a=32-Ke(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ai=1<<32-Ke(t)+i|n<<i|r,ji=a+e}else Ai=1<<a|n<<i|r,ji=e}function Pi(e){e.return!==null&&(Mi(e,1),Ni(e,1,0))}function Fi(e){for(;e===Ti;)Ti=Ci[--wi],Ci[wi]=null,Ei=Ci[--wi],Ci[wi]=null;for(;e===ki;)ki=Di[--Oi],Di[Oi]=null,ji=Di[--Oi],Di[Oi]=null,Ai=Di[--Oi],Di[Oi]=null}function Ii(e,t){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,Ai=t.id,ji=t.overflow,ki=e}var Li=null,Ri=null,zi=!1,Bi=null,Vi=!1,Hi=Error(i(519));function Ui(e){throw Yi(Si(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Hi}function Wi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ht]=e,t[gt]=r,n){case`dialog`:Fd(`cancel`,t),Fd(`close`,t);break;case`iframe`:case`object`:case`embed`:Fd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Md.length;n++)Fd(Md[n],t);break;case`source`:Fd(`error`,t);break;case`img`:case`image`:case`link`:Fd(`error`,t),Fd(`load`,t);break;case`details`:Fd(`toggle`,t);break;case`input`:Fd(`invalid`,t),Kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Fd(`invalid`,t);break;case`textarea`:Fd(`invalid`,t),Xt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Jd(t.textContent,n)?(r.popover!=null&&(Fd(`beforetoggle`,t),Fd(`toggle`,t)),r.onScroll!=null&&Fd(`scroll`,t),r.onScrollEnd!=null&&Fd(`scrollend`,t),r.onClick!=null&&(t.onclick=on),t=!0):t=!1,t||Ui(e,!0)}function Gi(e){for(Li=e.return;Li;)switch(Li.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:Li=Li.return}}function Ki(e){if(e!==Li)return!1;if(!zi)return Gi(e),zi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||of(e.type,e.memoizedProps)),n=!n),n&&Ri&&Ui(e),Gi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ri=Ef(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ri=Ef(e)}else t===27?(t=Ri,mf(e.type)?(e=Tf,Tf=null,Ri=e):Ri=t):Ri=Li?wf(e.stateNode.nextSibling):null;return!0}function qi(){Ri=Li=null,zi=!1}function Ji(){var e=Bi;return e!==null&&(du===null?du=e:du.push.apply(du,e),Bi=null),e}function Yi(e){Bi===null?Bi=[e]:Bi.push(e)}var Xi=de(null),Zi=null,Qi=null;function $i(e,t,n){pe(Xi,t._currentValue),t._currentValue=n}function ea(e){e._currentValue=Xi.current,fe(Xi)}function ta(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function na(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ta(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ta(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ra(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Er(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[pp]:e.push(pp))}a=a.return}e!==null&&na(t,e,n,r),t.flags|=262144}function ia(e){for(e=e.firstContext;e!==null;){if(!Er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){Zi=e,Qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function oa(e){return ca(Zi,e)}function sa(e,t){return Zi===null&&aa(e),ca(e,t)}function ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Qi===null){if(e===null)throw Error(i(308));Qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qi=Qi.next=t;return n}var la=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ua=t.unstable_scheduleCallback,da=t.unstable_NormalPriority,fa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pa(){return{controller:new la,data:new Map,refCount:0}}function ma(e){e.refCount--,e.refCount===0&&ua(da,function(){e.controller.abort()})}var ha=null,ga=0,_a=0,va=null;function ya(e,t){if(ha===null){var n=ha=[];ga=0,_a=Ed(),va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ga++,t.then(ba,ba),t}function ba(){if(--ga===0&&ha!==null){va!==null&&(va.status=`fulfilled`);var e=ha;ha=null,_a=0,va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Sa=O.S;O.S=function(e,t){mu=Pe(),typeof t==`object`&&t&&typeof t.then==`function`&&ya(e,t),Sa!==null&&Sa(e,t)};var Ca=de(null);function wa(){var e=Ca.current;return e===null?Yl.pooledCache:e}function Ta(e,t){t===null?pe(Ca,Ca.current):pe(Ca,t.pool)}function Ea(){var e=wa();return e===null?null:{parent:fa._currentValue,pool:e}}var Da=Error(i(460)),Oa=Error(i(474)),ka=Error(i(542)),Aa={then:function(){}};function ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ma(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(on,on),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ia(e),e;default:if(typeof t.status==`string`)t.then(on,on);else{if(e=Yl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ia(e),e}throw Pa=t,Da}}function Na(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Pa=e,Da):e}}var Pa=null;function Fa(){if(Pa===null)throw Error(i(459));var e=Pa;return Pa=null,e}function Ia(e){if(e===Da||e===ka)throw Error(i(483))}var La=null,Ra=0;function za(e){var t=Ra;return Ra+=1,La===null&&(La=[]),Ma(La,e,t)}function Ba(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Va(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ha(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=mi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=vi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===D&&Na(i)===t.type)?(t=a(t,n.props),Ba(t,n),t.return=e,t):(t=gi(n.type,n.key,n.props,null,e.mode,r),Ba(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=bi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=_i(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=gi(t.type,t.key,t.props,null,e.mode,n),Ba(n,t),n.return=e,n;case v:return t=bi(t,e.mode,n),t.return=e,t;case D:return t=Na(t),f(e,t,n)}if(se(t)||ie(t))return t=_i(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,za(t),n);if(t.$$typeof===C)return f(e,sa(e,t),n);Va(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case D:return n=Na(n),p(e,t,n,r)}if(se(n)||ie(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,za(n),r);if(n.$$typeof===C)return p(e,t,sa(e,n),r);Va(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=Na(r),m(e,t,n,r,i)}if(se(r)||ie(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,za(r),i);if(r.$$typeof===C)return m(e,t,n,sa(t,r),i);Va(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),zi&&Mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return zi&&Mi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),zi&&Mi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),zi&&Mi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return zi&&Mi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),zi&&Mi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&Na(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ba(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=_i(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=gi(o.type,o.key,o.props,null,e.mode,c),Ba(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=bi(o,e.mode,c),c.return=e,e=c}return s(e);case D:return o=Na(o),b(e,r,o,c)}if(se(o))return h(e,r,o,c);if(ie(o)){if(l=ie(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,za(o),c);if(o.$$typeof===C)return b(e,r,sa(e,o),c);Va(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ra=0;var i=b(e,t,n,r);return La=null,i}catch(t){if(t===Da||t===ka)throw t;var a=fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ua=Ha(!0),Wa=Ha(!1),Ga=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Jl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=li(e),ci(e,null,n),t}return ai(e,r,t,n),li(e)}function Xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}function Za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qa=!1;function $a(){if(Qa){var e=va;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ga=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Zl&f)===f:(r&f)===f){f!==0&&f===_a&&(Qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ga=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),au|=o,e.lanes=o,e.memoizedState=d}}function to(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)to(n[e],t)}var ro=de(null),io=de(0);function ao(e,t){e=ru,pe(io,e),pe(ro,t),ru=e|t.baseLanes}function oo(){pe(io,ru),pe(ro,ro.current)}function so(){ru=io.current,fe(ro),fe(io)}var co=de(null),lo=null;function uo(e){var t=e.alternate;pe(go,go.current&1),pe(co,e),lo===null&&(t===null||ro.current!==null||t.memoizedState!==null)&&(lo=e)}function fo(e){pe(go,go.current),pe(co,e),lo===null&&(lo=e)}function po(e){e.tag===22?(pe(go,go.current),pe(co,e),lo===null&&(lo=e)):mo(e)}function mo(){pe(go,go.current),pe(co,co.current)}function ho(e){fe(co),lo===e&&(lo=null),fe(go)}var go=de(0);function _o(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||xf(n)||Sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vo=0,F=null,yo=null,bo=null,xo=!1,So=!1,Co=!1,wo=0,To=0,Eo=null,Do=0;function Oo(){throw Error(i(321))}function ko(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function Ao(e,t,n,r,i,a){return vo=a,F=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?qs:Js,Co=!1,a=n(r,i),Co=!1,So&&(a=Mo(t,n,r,i)),jo(e),a}function jo(e){O.H=Ks;var t=yo!==null&&yo.next!==null;if(vo=0,bo=yo=F=null,xo=!1,To=0,Eo=null,t)throw Error(i(300));e===null||dc||(e=e.dependencies,e!==null&&ia(e)&&(dc=!0))}function Mo(e,t,n,r){F=e;var a=0;do{if(So&&(Eo=null),To=0,So=!1,25<=a)throw Error(i(301));if(a+=1,bo=yo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}O.H=Ys,o=t(n,r)}while(So);return o}function No(){var e=O.H,t=e.useState()[0];return t=typeof t.then==`function`?Bo(t):t,e=e.useState()[0],(yo===null?null:yo.memoizedState)!==e&&(F.flags|=1024),t}function Po(){var e=wo!==0;return wo=0,e}function Fo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Io(e){if(xo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xo=!1}vo=0,bo=yo=F=null,So=!1,To=wo=0,Eo=null}function Lo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bo===null?F.memoizedState=bo=e:bo=bo.next=e,bo}function Ro(){if(yo===null){var e=F.alternate;e=e===null?null:e.memoizedState}else e=yo.next;var t=bo===null?F.memoizedState:bo.next;if(t!==null)bo=t,yo=e;else{if(e===null)throw F.alternate===null?Error(i(467)):Error(i(310));yo=e,e={memoizedState:yo.memoizedState,baseState:yo.baseState,baseQueue:yo.baseQueue,queue:yo.queue,next:null},bo===null?F.memoizedState=bo=e:bo=bo.next=e}return bo}function zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bo(e){var t=To;return To+=1,Eo===null&&(Eo=[]),e=Ma(Eo,e,t),t=F,(bo===null?t.memoizedState:bo.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?qs:Js),e}function Vo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Bo(e);if(e.$$typeof===C)return oa(e)}throw Error(i(438,String(e)))}function Ho(e){var t=null,n=F.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=F.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=zo(),F.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ne;return t.index++,n}function Uo(e,t){return typeof t==`function`?t(e):t}function Wo(e){return Go(Ro(),yo,e)}function Go(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(vo&f)===f:(Zl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===_a&&(d=!0);else if((vo&p)===p){u=u.next,p===_a&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,F.lanes|=p,au|=p;f=u.action,Co&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,F.lanes|=f,au|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Er(o,e.memoizedState)&&(dc=!0,d&&(n=va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ko(e){var t=Ro(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Er(o,t.memoizedState)||(dc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function qo(e,t,n){var r=F,a=Ro(),o=zi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Er((yo||a).memoizedState,n);if(s&&(a.memoizedState=n,dc=!0),a=a.queue,vs(Xo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||bo!==null&&bo.memoizedState.tag&1){if(r.flags|=2048,ps(9,{destroy:void 0},Yo.bind(null,r,a,n,t),null),Yl===null)throw Error(i(349));o||vo&127||Jo(r,t,n)}return n}function Jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=F.updateQueue,t===null?(t=zo(),F.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yo(e,t,n,r){t.value=n,t.getSnapshot=r,Zo(t)&&Qo(e)}function Xo(e,t,n){return n(function(){Zo(t)&&Qo(e)})}function Zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function Qo(e){var t=si(e,2);t!==null&&ku(t,e,2)}function $o(e){var t=Lo();if(typeof e==`function`){var n=e;if(e=n(),Co){Ge(!0);try{n()}finally{Ge(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:e},t}function es(e,t,n,r){return e.baseState=n,Go(e,yo,typeof r==`function`?r:Uo)}function ts(e,t,n,r,a){if(Us(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};O.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ns(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ns(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=O.T,o={};O.T=o;try{var s=n(i,r),c=O.S;c!==null&&c(o,s),rs(e,t,s)}catch(n){as(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),O.T=a}}else try{a=n(i,r),rs(e,t,a)}catch(n){as(e,t,n)}}function rs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){is(e,t,n)},function(n){return as(e,t,n)}):is(e,t,n)}function is(e,t,n){t.status=`fulfilled`,t.value=n,os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ns(e,n)))}function as(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,os(t),t=t.next;while(t!==r)}e.action=null}function os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ss(e,t){return t}function cs(e,t){if(zi){var n=Yl.formState;if(n!==null){a:{var r=F;if(zi){if(Ri){b:{for(var i=Ri,a=Vi;i.nodeType!==8;){if(!a){i=null;break b}if(i=wf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ri=wf(i.nextSibling),r=i.data===`F!`;break a}}Ui(r)}r=!1}r&&(t=n[0])}}return n=Lo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:t},n.queue=r,n=Bs.bind(null,F,r),r.dispatch=n,r=$o(!1),a=Hs.bind(null,F,!1,r.queue),r=Lo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ts.bind(null,F,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ls(e){return us(Ro(),yo,e)}function us(e,t,n){if(t=Go(e,t,ss)[0],e=Wo(Uo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Bo(t)}catch(e){throw e===Da?ka:e}else r=t;t=Ro();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(F.flags|=2048,ps(9,{destroy:void 0},ds.bind(null,i,n),null)),[r,a,e]}function ds(e,t){e.action=t}function fs(e){var t=Ro(),n=yo;if(n!==null)return us(t,n,e);Ro(),t=t.memoizedState,n=Ro();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ps(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=F.updateQueue,t===null&&(t=zo(),F.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ms(){return Ro().memoizedState}function hs(e,t,n,r){var i=Lo();F.flags|=e,i.memoizedState=ps(1|t,{destroy:void 0},n,r===void 0?null:r)}function gs(e,t,n,r){var i=Ro();r=r===void 0?null:r;var a=i.memoizedState.inst;yo!==null&&r!==null&&ko(r,yo.memoizedState.deps)?i.memoizedState=ps(t,a,n,r):(F.flags|=e,i.memoizedState=ps(1|t,a,n,r))}function _s(e,t){hs(8390656,8,e,t)}function vs(e,t){gs(2048,8,e,t)}function ys(e){F.flags|=4;var t=F.updateQueue;if(t===null)t=zo(),F.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function bs(e){var t=Ro().memoizedState;return ys({ref:t,nextImpl:e}),function(){if(Jl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function xs(e,t){return gs(4,2,e,t)}function Ss(e,t){return gs(4,4,e,t)}function Cs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ws(e,t,n){n=n==null?null:n.concat([e]),gs(4,4,Cs.bind(null,t,e),n)}function Ts(){}function Es(e,t){var n=Ro();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ko(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ds(e,t){var n=Ro();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ko(t,r[1]))return r[0];if(r=e(),Co){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r}function Os(e,t,n){return n===void 0||vo&1073741824&&!(Zl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ou(),F.lanes|=e,au|=e,n)}function ks(e,t,n,r){return Er(n,t)?n:ro.current===null?!(vo&42)||vo&1073741824&&!(Zl&261930)?(dc=!0,e.memoizedState=n):(e=Ou(),F.lanes|=e,au|=e,t):(e=Os(e,n,r),Er(e,t)||(dc=!0),e)}function As(e,t,n,r,i){var a=k.p;k.p=a!==0&&8>a?a:8;var o=O.T,s={};O.T=s,Hs(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Vs(e,t,xa(c,r),Du(e)):Vs(e,t,r,Du(e))}catch(n){Vs(e,t,{then:function(){},status:`rejected`,reason:n},Du())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function js(){}function Ms(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ns(e).queue;As(e,a,t,ce,n===null?js:function(){return Ps(e),n(r)})}function Ns(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ps(e){var t=Ns(e);t.next===null&&(t=e.alternate.memoizedState),Vs(e,t.next.queue,{},Du())}function Fs(){return oa(pp)}function Is(){return Ro().memoizedState}function Ls(){return Ro().memoizedState}function Rs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Du();e=Ja(n);var r=Ya(t,e,n);r!==null&&(ku(r,t,n),Xa(r,t,n)),t={cache:pa()},e.payload=t;return}t=t.return}}function zs(e,t,n){var r=Du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Us(e)?Ws(t,n):(n=oi(e,t,n,r),n!==null&&(ku(n,e,r),Gs(n,t,r)))}function Bs(e,t,n){Vs(e,t,n,Du())}function Vs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Us(e))Ws(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Er(s,o))return ai(e,t,i,0),Yl===null&&ii(),!1}catch{}if(n=oi(e,t,i,r),n!==null)return ku(n,e,r),Gs(n,t,r),!0}return!1}function Hs(e,t,n,r){if(r={lane:2,revertLane:Ed(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Us(e)){if(t)throw Error(i(479))}else t=oi(e,n,r,2),t!==null&&ku(t,e,2)}function Us(e){var t=e.alternate;return e===F||t!==null&&t===F}function Ws(e,t){So=xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}var Ks={readContext:oa,use:Vo,useCallback:Oo,useContext:Oo,useEffect:Oo,useImperativeHandle:Oo,useLayoutEffect:Oo,useInsertionEffect:Oo,useMemo:Oo,useReducer:Oo,useRef:Oo,useState:Oo,useDebugValue:Oo,useDeferredValue:Oo,useTransition:Oo,useSyncExternalStore:Oo,useId:Oo,useHostTransitionStatus:Oo,useFormState:Oo,useActionState:Oo,useOptimistic:Oo,useMemoCache:Oo,useCacheRefresh:Oo};Ks.useEffectEvent=Oo;var qs={readContext:oa,use:Vo,useCallback:function(e,t){return Lo().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:_s,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),hs(4194308,4,Cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hs(4194308,4,e,t)},useInsertionEffect:function(e,t){hs(4,2,e,t)},useMemo:function(e,t){var n=Lo();t=t===void 0?null:t;var r=e();if(Co){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Lo();if(n!==void 0){var i=n(t);if(Co){Ge(!0);try{n(t)}finally{Ge(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=zs.bind(null,F,e),[r.memoizedState,e]},useRef:function(e){var t=Lo();return e={current:e},t.memoizedState=e},useState:function(e){e=$o(e);var t=e.queue,n=Bs.bind(null,F,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ts,useDeferredValue:function(e,t){return Os(Lo(),e,t)},useTransition:function(){var e=$o(!1);return e=As.bind(null,F,e.queue,!0,!1),Lo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=F,a=Lo();if(zi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yl===null)throw Error(i(349));Zl&127||Jo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,_s(Xo.bind(null,r,o,e),[e]),r.flags|=2048,ps(9,{destroy:void 0},Yo.bind(null,r,o,n,t),null),n},useId:function(){var e=Lo(),t=Yl.identifierPrefix;if(zi){var n=ji,r=Ai;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=wo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Do++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Fs,useFormState:cs,useActionState:cs,useOptimistic:function(e){var t=Lo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Hs.bind(null,F,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ho,useCacheRefresh:function(){return Lo().memoizedState=Rs.bind(null,F)},useEffectEvent:function(e){var t=Lo(),n={impl:e};return t.memoizedState=n,function(){if(Jl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Js={readContext:oa,use:Vo,useCallback:Es,useContext:oa,useEffect:vs,useImperativeHandle:ws,useInsertionEffect:xs,useLayoutEffect:Ss,useMemo:Ds,useReducer:Wo,useRef:ms,useState:function(){return Wo(Uo)},useDebugValue:Ts,useDeferredValue:function(e,t){return ks(Ro(),yo.memoizedState,e,t)},useTransition:function(){var e=Wo(Uo)[0],t=Ro().memoizedState;return[typeof e==`boolean`?e:Bo(e),t]},useSyncExternalStore:qo,useId:Is,useHostTransitionStatus:Fs,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){return es(Ro(),yo,e,t)},useMemoCache:Ho,useCacheRefresh:Ls};Js.useEffectEvent=bs;var Ys={readContext:oa,use:Vo,useCallback:Es,useContext:oa,useEffect:vs,useImperativeHandle:ws,useInsertionEffect:xs,useLayoutEffect:Ss,useMemo:Ds,useReducer:Ko,useRef:ms,useState:function(){return Ko(Uo)},useDebugValue:Ts,useDeferredValue:function(e,t){var n=Ro();return yo===null?Os(n,e,t):ks(n,yo.memoizedState,e,t)},useTransition:function(){var e=Ko(Uo)[0],t=Ro().memoizedState;return[typeof e==`boolean`?e:Bo(e),t]},useSyncExternalStore:qo,useId:Is,useHostTransitionStatus:Fs,useFormState:fs,useActionState:fs,useOptimistic:function(e,t){var n=Ro();return yo===null?(n.baseState=e,[e,n.queue.dispatch]):es(n,yo,e,t)},useMemoCache:Ho,useCacheRefresh:Ls};Ys.useEffectEvent=bs;function Xs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Du(),i=Ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(ku(t,e,r),Xa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Du(),i=Ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(ku(t,e,r),Xa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Du(),r=Ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ya(e,r,n),t!==null&&(ku(t,e,n),Xa(t,e,n))}};function Qs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Dr(n,r)||!Dr(i,a):!0}function $s(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&&Zs.enqueueReplaceState(t,t.state,null)}function ec(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function tc(e){ei(e)}function nc(e){console.error(e)}function rc(e){ei(e)}function ic(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ac(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function oc(e,t,n){return n=Ja(n),n.tag=3,n.payload={element:null},n.callback=function(){ic(e,t)},n}function sc(e){return e=Ja(e),e.tag=3,e}function cc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ac(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ac(t,n,r),typeof i!=`function`&&(_u===null?_u=new Set([this]):_u.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function lc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ra(t,n,a,!0),n=co.current,n!==null){switch(n.tag){case 31:case 13:return lo===null?Vu():n.alternate===null&&iu===0&&(iu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Aa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),od(e,r,a)),!1;case 22:return n.flags|=65536,r===Aa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),od(e,r,a)),!1}throw Error(i(435,n.tag))}return od(e,r,a),Vu(),!1}if(zi)return t=co.current,t===null?(r!==Hi&&(t=Error(i(423),{cause:r}),Yi(Si(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Si(r,n),a=oc(e.stateNode,r,a),Za(e,a),iu!==4&&(iu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Hi&&(e=Error(i(422),{cause:r}),Yi(Si(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Si(o,n),uu===null?uu=[o]:uu.push(o),iu!==4&&(iu=2),t===null)return!0;r=Si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=oc(n.stateNode,r,e),Za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(_u===null||!_u.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=sc(a),cc(a,e,n,r),Za(n,a),!1}n=n.return}while(n!==null);return!1}var uc=Error(i(461)),dc=!1;function fc(e,t,n,r){t.child=e===null?Wa(t,null,n,r):Ua(t,e.child,n,r)}function pc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return aa(t),r=Ao(e,t,n,o,a,i),s=Po(),e!==null&&!dc?(Fo(e,t,i),Lc(e,t,i)):(zi&&s&&Pi(t),t.flags|=1,fc(e,t,r,i),t.child)}function mc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,hc(e,t,a,r,i)):(e=gi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Rc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Dr:n,n(o,r)&&e.ref===t.ref)return Lc(e,t,i)}return t.flags|=1,e=mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function hc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref){if(dc=!1,t.pendingProps=r=a,Rc(e,i))e.flags&131072&&(dc=!0);else return t.lanes=e.lanes,Lc(e,t,i)}}return Cc(e,t,n,r,i)}function gc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return vc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ta(t,a===null?null:a.cachePool),a===null?oo():ao(t,a),po(t);else return r=t.lanes=536870912,vc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ta(t,null),oo(),mo(t)):(Ta(t,a.cachePool),ao(t,a),mo(t),t.memoizedState=null);return fc(e,t,i,n),t.child}function _c(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vc(e,t,n,r,i){var a=wa();return a=a===null?null:{parent:fa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ta(t,null),oo(),po(t),e!==null&&ra(e,t,r,!0),t.childLanes=i,null}function yc(e,t){return t=Mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bc(e,t,n){return Ua(t,e.child,null,n),e=yc(t,t.pendingProps),e.flags|=2,ho(t),t.memoizedState=null,e}function xc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(zi){if(r.mode===`hidden`)return e=yc(t,r),t.lanes=536870912,_c(null,e);if(fo(t),(e=Ri)?(e=bf(e,Vi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=yi(e),n.return=t,t.child=n,Li=t,Ri=null)):e=null,e===null)throw Ui(t);return t.lanes=536870912,null}return yc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(fo(t),a){if(t.flags&256)t.flags&=-257,t=bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(dc||ra(e,t,n,!1),a=(n&e.childLanes)!==0,dc||a){if(r=Yl,r!==null&&(s=lt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,si(e,s),ku(r,e,s),uc;Vu(),t=bc(e,t,n)}else e=o.treeContext,Ri=wf(s.nextSibling),Li=t,zi=!0,Bi=null,Vi=!1,e!==null&&Ii(t,e),t=yc(t,r),t.flags|=4096;return t}return e=mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Sc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Cc(e,t,n,r,i){return aa(t),n=Ao(e,t,n,r,void 0,i),r=Po(),e!==null&&!dc?(Fo(e,t,i),Lc(e,t,i)):(zi&&r&&Pi(t),t.flags|=1,fc(e,t,n,i),t.child)}function wc(e,t,n,r,i,a){return aa(t),t.updateQueue=null,n=Mo(t,r,n,i),jo(e),r=Po(),e!==null&&!dc?(Fo(e,t,a),Lc(e,t,a)):(zi&&r&&Pi(t),t.flags|=1,fc(e,t,n,a),t.child)}function Tc(e,t,n,r,i){if(aa(t),t.stateNode===null){var a=ui,o=n.contextType;typeof o==`object`&&o&&(a=oa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ka(t),o=n.contextType,a.context=typeof o==`object`&&o?oa(o):ui,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Xs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Zs.enqueueReplaceState(a,a.state,null),eo(t,r,a,i),$a(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=ec(n,s);a.props=c;var l=a.context,u=n.contextType;o=ui,typeof u==`object`&&u&&(o=oa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&$s(t,a,r,o),Ga=!1;var f=t.memoizedState;a.state=f,eo(t,r,a,i),$a(),l=t.memoizedState,s||f!==l||Ga?(typeof d==`function`&&(Xs(t,n,d,r),l=t.memoizedState),(c=Ga||Qs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,qa(e,t),o=t.memoizedProps,u=ec(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ui,typeof l==`object`&&l&&(c=oa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&$s(t,a,r,c),Ga=!1,f=t.memoizedState,a.state=f,eo(t,r,a,i),$a();var p=t.memoizedState;o!==d||f!==p||Ga||e!==null&&e.dependencies!==null&&ia(e.dependencies)?(typeof s==`function`&&(Xs(t,n,s,r),p=t.memoizedState),(u=Ga||Qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ia(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Sc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ua(t,e.child,null,i),t.child=Ua(t,null,n,i)):fc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Lc(e,t,i),e}function Ec(e,t,n,r){return qi(),t.flags|=256,fc(e,t,n,r),t.child}var Dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(e){return{baseLanes:e,cachePool:Ea()}}function kc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cu),e}function Ac(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(go.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(zi){if(a?uo(t):mo(t),(e=Ri)?(e=bf(e,Vi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=yi(e),n.return=t,t.child=n,Li=t,Ri=null)):e=null,e===null)throw Ui(t);return Sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(mo(t),a=t.mode,c=Mc({mode:`hidden`,children:c},a),r=_i(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Oc(n),r.childLanes=kc(e,s,n),t.memoizedState=Dc,_c(null,r)):(uo(t),jc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(uo(t),t.flags&=-257,t=Nc(e,t,n)):t.memoizedState===null?(mo(t),c=r.fallback,a=t.mode,r=Mc({mode:`visible`,children:r.children},a),c=_i(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ua(t,e.child,null,n),r=t.child,r.memoizedState=Oc(n),r.childLanes=kc(e,s,n),t.memoizedState=Dc,t=_c(null,r)):(mo(t),t.child=e.child,t.flags|=128,t=null);else if(uo(t),Sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Yi({value:r,source:null,stack:null}),t=Nc(e,t,n)}else if(dc||ra(e,t,n,!1),s=(n&e.childLanes)!==0,dc||s){if(s=Yl,s!==null&&(r=lt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,si(e,r),ku(s,e,r),uc;xf(c)||Vu(),t=Nc(e,t,n)}else xf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ri=wf(c.nextSibling),Li=t,zi=!0,Bi=null,Vi=!1,e!==null&&Ii(t,e),t=jc(t,r.children),t.flags|=4096);return t}return a?(mo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=mi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=_i(c,a,n,null),c.flags|=2):c=mi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,_c(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Oc(n):(a=c.cachePool,a===null?a=Ea():(l=fa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=kc(e,s,n),t.memoizedState=Dc,_c(e.child,r)):(uo(t),n=e.child,e=n.sibling,n=mi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function jc(e,t){return t=Mc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Mc(e,t){return e=fi(22,e,null,t),e.lanes=0,e}function Nc(e,t,n){return Ua(t,e.child,null,n),e=jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ta(e.return,t,n)}function Fc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ic(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=go.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,pe(go,o),fc(e,t,r,n),r=zi?Ei:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pc(e,n,t);else if(e.tag===19)Pc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&_o(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&_o(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fc(t,!0,n,null,a,r);break;case`together`:Fc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Lc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),au|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ra(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Rc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ia(e)))}function zc(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),$i(t,fa,e.memoizedState.cache),qi();break;case 27:case 5:be(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:$i(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(uo(t),e=Lc(e,t,n),e===null?null:e.sibling):Ac(e,t,n):(uo(t),t.flags|=128,null);uo(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(ra(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ic(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),pe(go,go.current),r)break;return null;case 22:return t.lanes=0,gc(e,t,n,t.pendingProps);case 24:$i(t,fa,e.memoizedState.cache)}return Lc(e,t,n)}function Bc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)dc=!0;else{if(!Rc(e,n)&&!(t.flags&128))return dc=!1,zc(e,t,n);dc=!!(e.flags&131072)}}else dc=!1,zi&&t.flags&1048576&&Ni(t,Ei,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Na(t.elementType),t.type=e,typeof e==`function`)pi(e)?(r=ec(e,r),t.tag=1,t=Tc(null,t,e,r,n)):(t.tag=0,t=Cc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=pc(null,t,e,r,n);break a}if(a===ee){t.tag=14,t=mc(null,t,e,r,n);break a}}throw t=oe(e)||e,Error(i(306,t,``))}}return t;case 0:return Cc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=ec(r,t.pendingProps),Tc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,qa(e,t),eo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,$i(t,fa,r),r!==o.cache&&na(t,[fa],n,!0),$a(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Ec(e,t,r,n);break a}if(r!==a){a=Si(Error(i(424)),t),Yi(a),t=Ec(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ri=wf(e.firstChild),Li=t,zi=!0,Bi=null,Vi=!0,n=Wa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(qi(),r===a){t=Lc(e,t,n);break a}fc(e,t,r,n)}t=t.child}return t;case 26:return Sc(e,t),e===null?(n=Wf(t.type,null,t.pendingProps,null))?t.memoizedState=n:zi||(n=t.type,e=t.pendingProps,r=nf(ge.current).createElement(n),r[ht]=t,r[gt]=e,Xd(r,n,e),Et(r),t.stateNode=r):t.memoizedState=Wf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&zi&&(r=t.stateNode=Of(t.type,t.pendingProps,ge.current),Li=t,Vi=!0,a=Ri,mf(t.type)?(Tf=a,Ri=wf(r.firstChild)):Ri=a),fc(e,t,t.pendingProps.children,n),Sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&zi&&((a=r=Ri)&&(r=vf(r,t.type,t.pendingProps,Vi),r===null?a=!1:(t.stateNode=r,Li=t,Ri=wf(r.firstChild),Vi=!1,a=!0)),a||Ui(t)),be(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,of(a,o)?r=null:s!==null&&of(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Ao(e,t,No,null,null,n),pp._currentValue=a),Sc(e,t),fc(e,t,r,n),t.child;case 6:return e===null&&zi&&((e=n=Ri)&&(n=yf(n,t.pendingProps,Vi),n===null?e=!1:(t.stateNode=n,Li=t,Ri=null,e=!0)),e||Ui(t)),null;case 13:return Ac(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ua(t,null,r,n):fc(e,t,r,n),t.child;case 11:return pc(e,t,t.type,t.pendingProps,n);case 7:return fc(e,t,t.pendingProps,n),t.child;case 8:return fc(e,t,t.pendingProps.children,n),t.child;case 12:return fc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,$i(t,t.type,r.value),fc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,aa(t),a=oa(a),r=r(a),t.flags|=1,fc(e,t,r,n),t.child;case 14:return mc(e,t,t.type,t.pendingProps,n);case 15:return hc(e,t,t.type,t.pendingProps,n);case 19:return Ic(e,t,n);case 31:return xc(e,t,n);case 22:return gc(e,t,n,t.pendingProps);case 24:return aa(t),r=oa(fa),e===null?(a=wa(),a===null&&(a=Yl,o=pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ka(t),$i(t,fa,a)):((e.lanes&n)!==0&&(qa(e,t),eo(t,null,null,n),$a()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,$i(t,fa,r),r!==a.cache&&na(t,[fa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),$i(t,fa,r))),fc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Vc(e){e.flags|=4}function Hc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Ru())e.flags|=8192;else throw Pa=Aa,Oa}}else e.flags&=-16777217}function Uc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ap(t)){if(Ru())e.flags|=8192;else throw Pa=Aa,Oa}}function Wc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:rt(),e.lanes|=t,lu|=t)}function Gc(e,t){if(!zi)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 Kc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qc(e,t,n){var r=t.pendingProps;switch(Fi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kc(t),null;case 1:return Kc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ea(fa),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ki(t)?Vc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ji())),Kc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Vc(t),o===null?(Kc(t),Hc(t,a,null,r,n)):(Kc(t),Uc(t,o))):o?o===e.memoizedState?(Kc(t),t.flags&=-16777217):(Vc(t),Kc(t),Uc(t,o)):(e=e.memoizedProps,e!==r&&Vc(t),Kc(t),Hc(t,a,e,r,n)),null;case 27:if(xe(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Kc(t),null}e=me.current,Ki(t)?Wi(t,e):(e=Of(a,r,n),t.stateNode=e,Vc(t))}return Kc(t),null;case 5:if(xe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Kc(t),null}if(o=me.current,Ki(t))Wi(t,o);else{var s=nf(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ht]=t,o[gt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Xd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Vc(t)}}return Kc(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,Ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Li,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ht]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Jd(e.nodeValue,n)),e||Ui(t,!0)}else e=nf(e).createTextNode(r),e[ht]=t,t.stateNode=e}return Kc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ki(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ht]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kc(t),e=!1}else n=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(i(558))}return Kc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ht]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kc(t),a=!1}else a=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Wc(t,t.updateQueue),Kc(t),null);case 4:return ye(),e===null&&Rd(t.stateNode.containerInfo),Kc(t),null;case 10:return ea(t.type),Kc(t),null;case 19:if(fe(go),r=t.memoizedState,r===null)return Kc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Gc(r,!1);else{if(iu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=_o(e),o!==null){for(t.flags|=128,Gc(r,!1),e=o.updateQueue,t.updateQueue=e,Wc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)hi(n,e),n=n.sibling;return pe(go,go.current&1|2),zi&&Mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>hu&&(t.flags|=128,a=!0,Gc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=_o(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Wc(t,e),Gc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!zi)return Kc(t),null}else 2*Pe()-r.renderingStartTime>hu&&n!==536870912&&(t.flags|=128,a=!0,Gc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Kc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,n=go.current,pe(go,a?n&1|2:n&1),zi&&Mi(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Kc(t),t.subtreeFlags&6&&(t.flags|=8192)):Kc(t),n=t.updateQueue,n!==null&&Wc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&fe(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ea(fa),Kc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Jc(e,t){switch(Fi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(fa),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(ho(t),t.alternate===null)throw Error(i(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(go),null;case 4:return ye(),null;case 10:return ea(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&fe(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(fa),null;case 25:return null;default:return null}}function Yc(e,t){switch(Fi(t),t.tag){case 3:ea(fa),ye();break;case 26:case 27:case 5:xe(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:fe(go);break;case 10:ea(t.type);break;case 22:case 23:ho(t),so(),e!==null&&fe(Ca);break;case 24:ea(fa)}}function Xc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ad(t,t.return,e)}}function Zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ad(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ad(t,t.return,e)}}function Qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){ad(e,e.return,t)}}}function $c(e,t,n){n.props=ec(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ad(e,t,n)}}function el(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ad(e,t,n)}}function tl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ad(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ad(e,t,n)}else n.current=null}}function nl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ad(e,e.return,t)}}function rl(e,t,n){try{var r=e.stateNode;Zd(r,e.type,n,t),r[gt]=t}catch(t){ad(e,e.return,t)}}function il(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&mf(e.type)||e.tag===4}function al(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||il(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&mf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=on));else if(r!==4&&(r===27&&mf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&mf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function cl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Xd(t,r,n),t[ht]=e,t[gt]=n}catch(t){ad(e,e.return,t)}}var ll=!1,ul=!1,dl=!1,fl=typeof WeakSet==`function`?WeakSet:Set,pl=null;function ml(e,t){if(e=e.containerInfo,ef=Sp,e=jr(e),Mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(tf={focusedElem:e,selectionRange:n},Sp=!1,pl=t;pl!==null;)if(t=pl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,pl=e;else for(;pl!==null;){switch(t=pl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=ec(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){ad(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)_f(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:_f(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,pl=e;break}pl=t.return}}function hl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:kl(e,n),r&4&&Xc(5,n);break;case 1:if(kl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ad(n,n.return,e)}else{var i=ec(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ad(n,n.return,e)}}}r&64&&Qc(n),r&512&&el(n,n.return);break;case 3:if(kl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{no(e,t)}catch(e){ad(n,n.return,e)}}break;case 27:t===null&&r&4&&cl(n);case 26:case 5:kl(e,n),t===null&&r&4&&nl(n),r&512&&el(n,n.return);break;case 12:kl(e,n);break;case 31:kl(e,n),r&4&&bl(e,n);break;case 13:kl(e,n),r&4&&xl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ld.bind(null,n),Cf(e,n))));break;case 22:if(r=n.memoizedState!==null||ll,!r){t=t!==null&&t.memoizedState!==null||ul,i=ll;var a=ul;ll=r,(ul=t)&&!a?jl(e,n,!!(n.subtreeFlags&8772)):kl(e,n),ll=i,ul=a}break;case 30:break;default:kl(e,n)}}function gl(e){var t=e.alternate;t!==null&&(e.alternate=null,gl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var I=null,_l=!1;function vl(e,t,n){for(n=n.child;n!==null;)yl(e,t,n),n=n.sibling}function yl(e,t,n){if(We&&typeof We.onCommitFiberUnmount==`function`)try{We.onCommitFiberUnmount(Ue,n)}catch{}switch(n.tag){case 26:ul||tl(n,t),vl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ul||tl(n,t);var r=I,i=_l;mf(n.type)&&(I=n.stateNode,_l=!1),vl(e,t,n),kf(n.stateNode),I=r,_l=i;break;case 5:ul||tl(n,t);case 6:if(r=I,i=_l,I=null,vl(e,t,n),I=r,_l=i,I!==null){if(_l)try{(I.nodeType===9?I.body:I.nodeName===`HTML`?I.ownerDocument.body:I).removeChild(n.stateNode)}catch(e){ad(n,t,e)}else try{I.removeChild(n.stateNode)}catch(e){ad(n,t,e)}}break;case 18:I!==null&&(_l?(e=I,hf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kp(e)):hf(I,n.stateNode));break;case 4:r=I,i=_l,I=n.stateNode.containerInfo,_l=!0,vl(e,t,n),I=r,_l=i;break;case 0:case 11:case 14:case 15:Zc(2,n,t),ul||Zc(4,n,t),vl(e,t,n);break;case 1:ul||(tl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&$c(n,t,r)),vl(e,t,n);break;case 21:vl(e,t,n);break;case 22:ul=(r=ul)||n.memoizedState!==null,vl(e,t,n),ul=r;break;default:vl(e,t,n)}}function bl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kp(e)}catch(e){ad(t,t.return,e)}}}function xl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kp(e)}catch(e){ad(t,t.return,e)}}function Sl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new fl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new fl),t;default:throw Error(i(435,e.tag))}}function Cl(e,t){var n=Sl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ud.bind(null,e,t);t.then(r,r)}})}function wl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(mf(c.type)){I=c.stateNode,_l=!1;break a}break;case 5:I=c.stateNode,_l=!1;break a;case 3:case 4:I=c.stateNode.containerInfo,_l=!0;break a}c=c.return}if(I===null)throw Error(i(160));yl(o,s,a),I=null,_l=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)El(t,e),t=t.sibling}var Tl=null;function El(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wl(t,e),Dl(e),r&4&&(Zc(3,e,e.return),Xc(3,e),Zc(5,e,e.return));break;case 1:wl(t,e),Dl(e),r&512&&(ul||n===null||tl(n,n.return)),r&64&&ll&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Tl;if(wl(t,e),Dl(e),r&512&&(ul||n===null||tl(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[xt]||o[ht]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Xd(o,r,n),o[ht]=e,Et(o),r=o;break a;case`link`:var s=np(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Xd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=np(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Xd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ht]=e,Et(o),r=o}e.stateNode=r}else rp(a,e.type,e.stateNode)}else e.stateNode=Zf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&rl(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?rp(a,e.type,e.stateNode):Zf(a,r,e.memoizedProps))}break;case 27:wl(t,e),Dl(e),r&512&&(ul||n===null||tl(n,n.return)),n!==null&&r&4&&rl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(wl(t,e),Dl(e),r&512&&(ul||n===null||tl(n,n.return)),e.flags&32){a=e.stateNode;try{Zt(a,``)}catch(t){ad(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,rl(e,a,n===null?a:n.memoizedProps)),r&1024&&(dl=!0);break;case 6:if(wl(t,e),Dl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){ad(e,e.return,t)}}break;case 3:if(tp=null,a=Tl,Tl=Mf(t.containerInfo),wl(t,e),Tl=a,Dl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kp(t.containerInfo)}catch(t){ad(e,e.return,t)}dl&&(dl=!1,Ol(e));break;case 4:r=Tl,Tl=Mf(e.stateNode.containerInfo),wl(t,e),Dl(e),Tl=r;break;case 12:wl(t,e),Dl(e);break;case 31:wl(t,e),Dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 13:wl(t,e),Dl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(pu=Pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ll,d=ul;if(ll=u||a,ul=d||l,wl(t,e),ul=d,ll=u,Dl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ll||ul||Al(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){ad(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){ad(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?gf(m,!0):gf(l.stateNode,!1)}catch(e){ad(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Cl(e,n))));break;case 19:wl(t,e),Dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 30:break;case 21:break;default:wl(t,e),Dl(e)}}function Dl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(il(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;sl(e,al(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Zt(o,``),n.flags&=-33),sl(e,al(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;ol(e,al(e),s);break;default:throw Error(i(161))}}catch(t){ad(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ol(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ol(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function kl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hl(e,t.alternate,t),t=t.sibling}function Al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Zc(4,t,t.return),Al(t);break;case 1:tl(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&$c(t,t.return,n),Al(t);break;case 27:kf(t.stateNode);case 26:case 5:tl(t,t.return),Al(t);break;case 22:t.memoizedState===null&&Al(t);break;case 30:Al(t);break;default:Al(t)}e=e.sibling}}function jl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:jl(i,a,n),Xc(4,a);break;case 1:if(jl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ad(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)to(c[i],s)}catch(e){ad(r,r.return,e)}}n&&o&64&&Qc(a),el(a,a.return);break;case 27:cl(a);case 26:case 5:jl(i,a,n),n&&r===null&&o&4&&nl(a),el(a,a.return);break;case 12:jl(i,a,n);break;case 31:jl(i,a,n),n&&o&4&&bl(i,a);break;case 13:jl(i,a,n),n&&o&4&&xl(i,a);break;case 22:a.memoizedState===null&&jl(i,a,n),el(a,a.return);break;case 30:break;default:jl(i,a,n)}t=t.sibling}}function Ml(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ma(n))}function Nl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e))}function Pl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fl(e,t,n,r),t=t.sibling}function Fl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Pl(e,t,n,r),i&2048&&Xc(9,t);break;case 1:Pl(e,t,n,r);break;case 3:Pl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e)));break;case 12:if(i&2048){Pl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){ad(t,t.return,e)}}else Pl(e,t,n,r);break;case 31:Pl(e,t,n,r);break;case 13:Pl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Pl(e,t,n,r):(a._visibility|=2,Il(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Pl(e,t,n,r):Ll(e,t),i&2048&&Ml(o,t);break;case 24:Pl(e,t,n,r),i&2048&&Nl(t.alternate,t);break;default:Pl(e,t,n,r)}}function Il(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Il(a,o,s,c,i),Xc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Il(a,o,s,c,i)):u._visibility&2?Il(a,o,s,c,i):Ll(a,o),i&&l&2048&&Ml(o.alternate,o);break;case 24:Il(a,o,s,c,i),i&&l&2048&&Nl(o.alternate,o);break;default:Il(a,o,s,c,i)}t=t.sibling}}function Ll(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ll(n,r),i&2048&&Ml(r.alternate,r);break;case 24:Ll(n,r),i&2048&&Nl(r.alternate,r);break;default:Ll(n,r)}t=t.sibling}}var Rl=8192;function zl(e,t,n){if(e.subtreeFlags&Rl)for(e=e.child;e!==null;)Bl(e,t,n),e=e.sibling}function Bl(e,t,n){switch(e.tag){case 26:zl(e,t,n),e.flags&Rl&&e.memoizedState!==null&&op(n,Tl,e.memoizedState,e.memoizedProps);break;case 5:zl(e,t,n);break;case 3:case 4:var r=Tl;Tl=Mf(e.stateNode.containerInfo),zl(e,t,n),Tl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Rl,Rl=16777216,zl(e,t,n),Rl=r):zl(e,t,n));break;default:zl(e,t,n)}}function Vl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];pl=r,Gl(r,e)}Vl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ul(e),e=e.sibling}function Ul(e){switch(e.tag){case 0:case 11:case 15:Hl(e),e.flags&2048&&Zc(9,e,e.return);break;case 3:Hl(e);break;case 12:Hl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wl(e)):Hl(e);break;default:Hl(e)}}function Wl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];pl=r,Gl(r,e)}Vl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Zc(8,t,t.return),Wl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wl(t));break;default:Wl(t)}e=e.sibling}}function Gl(e,t){for(;pl!==null;){var n=pl;switch(n.tag){case 0:case 11:case 15:Zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,pl=r;else a:for(n=e;pl!==null;){r=pl;var i=r.sibling,a=r.return;if(gl(r),r===n){pl=null;break a}if(i!==null){i.return=a,pl=i;break a}pl=a}}}var Kl={getCacheForType:function(e){var t=oa(fa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return oa(fa).controller.signal}},ql=typeof WeakMap==`function`?WeakMap:Map,Jl=0,Yl=null,Xl=null,Zl=0,Ql=0,$l=null,eu=!1,tu=!1,nu=!1,ru=0,iu=0,au=0,ou=0,su=0,cu=0,lu=0,uu=null,du=null,fu=!1,pu=0,mu=0,hu=1/0,gu=null,_u=null,vu=0,yu=null,bu=null,xu=0,Su=0,Cu=null,wu=null,Tu=0,Eu=null;function Du(){return Jl&2&&Zl!==0?Zl&-Zl:O.T===null?ft():Ed()}function Ou(){if(cu===0){if(!(Zl&536870912)||zi){var e=Ze;Ze<<=1,!(Ze&3932160)&&(Ze=262144),cu=e}else cu=536870912}return e=co.current,e!==null&&(e.flags|=32),cu}function ku(e,t,n){(e===Yl&&(Ql===2||Ql===9)||e.cancelPendingCommit!==null)&&(Iu(e,0),Nu(e,Zl,cu,!1)),at(e,n),(!(Jl&2)||e!==Yl)&&(e===Yl&&(!(Jl&2)&&(ou|=n),iu===4&&Nu(e,Zl,cu,!1)),vd(e))}function Au(e,t,n){if(Jl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||tt(e,t),a=r?Wu(e,t):Hu(e,t,!0),o=r;do{if(a===0){tu&&!r&&Nu(e,t,0,!1);break}if(n=e.current.alternate,o&&!Mu(n)){a=Hu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=uu;var l=c.current.memoizedState.isDehydrated;if(l&&(Iu(c,s).flags|=256),s=Hu(c,s,!1),s!==2){if(nu&&!l){c.errorRecoveryDisabledLanes|=o,ou|=o,a=4;break a}o=du,du=a,o!==null&&(du===null?du=o:du.push.apply(du,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Iu(e,0),Nu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Nu(r,t,cu,!eu);break a;case 2:du=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pu+300-Pe(),10<a)){if(Nu(r,t,cu,!eu),et(r,0,!0)!==0)break a;xu=t,r.timeoutHandle=lf(ju.bind(null,r,n,du,gu,fu,t,cu,ou,lu,eu,o,`Throttled`,-0,0),a);break a}ju(r,n,du,gu,fu,t,cu,ou,lu,eu,o,null,-0,0)}break}while(1);vd(e)}function ju(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:on},Bl(t,a,d);var m=(a&62914560)===a?pu-Pe():(a&4194048)===a?mu-Pe():0;if(m=cp(d,m),m!==null){xu=a,e.cancelPendingCommit=m(Zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Nu(e,a,o,!l);return}}Zu(e,t,a,n,r,i,o,s,c)}function Mu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Er(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nu(e,t,n,r){t&=~su,t&=~ou,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ke(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&st(e,n,t)}function Pu(){return Jl&6?!0:(yd(0,!1),!1)}function Fu(){if(Xl!==null){if(Ql===0)var e=Xl.return;else e=Xl,Qi=Zi=null,Io(e),La=null,Ra=0,e=Xl;for(;e!==null;)Yc(e.alternate,e),e=e.return;Xl=null}}function Iu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,uf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xu=0,Fu(),Yl=e,Xl=n=mi(e.current,null),Zl=t,Ql=0,$l=null,eu=!1,tu=tt(e,t),nu=!1,lu=cu=su=ou=au=iu=0,du=uu=null,fu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ke(r),a=1<<i;t|=e[i],r&=~a}return ru=t,ii(),n}function Lu(e,t){F=null,O.H=Ks,t===Da||t===ka?(t=Fa(),Ql=3):t===Oa?(t=Fa(),Ql=4):Ql=t===uc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$l=t,Xl===null&&(iu=1,ic(e,Si(t,e.current)))}function Ru(){var e=co.current;return e===null?!0:(Zl&4194048)===Zl?lo===null:(Zl&62914560)===Zl||Zl&536870912?e===lo:!1}function zu(){var e=O.H;return O.H=Ks,e===null?Ks:e}function Bu(){var e=O.A;return O.A=Kl,e}function Vu(){iu=4,eu||(Zl&4194048)!==Zl&&co.current!==null||(tu=!0),!(au&134217727)&&!(ou&134217727)||Yl===null||Nu(Yl,Zl,cu,!1)}function Hu(e,t,n){var r=Jl;Jl|=2;var i=zu(),a=Bu();(Yl!==e||Zl!==t)&&(gu=null,Iu(e,t)),t=!1;var o=iu;a:do try{if(Ql!==0&&Xl!==null){var s=Xl,c=$l;switch(Ql){case 8:Fu(),o=6;break a;case 3:case 2:case 9:case 6:co.current===null&&(t=!0);var l=Ql;if(Ql=0,$l=null,Ju(e,s,c,l),n&&tu){o=0;break a}break;default:l=Ql,Ql=0,$l=null,Ju(e,s,c,l)}}Uu(),o=iu;break}catch(t){Lu(e,t)}while(1);return t&&e.shellSuspendCounter++,Qi=Zi=null,Jl=r,O.H=i,O.A=a,Xl===null&&(Yl=null,Zl=0,ii()),o}function Uu(){for(;Xl!==null;)Ku(Xl)}function Wu(e,t){var n=Jl;Jl|=2;var r=zu(),a=Bu();Yl!==e||Zl!==t?(gu=null,hu=Pe()+500,Iu(e,t)):tu=tt(e,t);a:do try{if(Ql!==0&&Xl!==null){t=Xl;var o=$l;b:switch(Ql){case 1:Ql=0,$l=null,Ju(e,t,o,1);break;case 2:case 9:if(ja(o)){Ql=0,$l=null,qu(t);break}t=function(){Ql!==2&&Ql!==9||Yl!==e||(Ql=7),vd(e)},o.then(t,t);break a;case 3:Ql=7;break a;case 4:Ql=5;break a;case 7:ja(o)?(Ql=0,$l=null,qu(t)):(Ql=0,$l=null,Ju(e,t,o,7));break;case 5:var s=null;switch(Xl.tag){case 26:s=Xl.memoizedState;case 5:case 27:var c=Xl;if(s?ap(s):c.stateNode.complete){Ql=0,$l=null;var l=c.sibling;if(l!==null)Xl=l;else{var u=c.return;u===null?Xl=null:(Xl=u,Yu(u))}break b}}Ql=0,$l=null,Ju(e,t,o,5);break;case 6:Ql=0,$l=null,Ju(e,t,o,6);break;case 8:Fu(),iu=6;break a;default:throw Error(i(462))}}Gu();break}catch(t){Lu(e,t)}while(1);return Qi=Zi=null,O.H=r,O.A=a,Jl=n,Xl===null?(Yl=null,Zl=0,ii(),iu):0}function Gu(){for(;Xl!==null&&!Me();)Ku(Xl)}function Ku(e){var t=Bc(e.alternate,e,ru);e.memoizedProps=e.pendingProps,t===null?Yu(e):Xl=t}function qu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wc(n,t,t.pendingProps,t.type,void 0,Zl);break;case 11:t=wc(n,t,t.pendingProps,t.type.render,t.ref,Zl);break;case 5:Io(t);default:Yc(n,t),t=Xl=hi(t,ru),t=Bc(n,t,ru)}e.memoizedProps=e.pendingProps,t===null?Yu(e):Xl=t}function Ju(e,t,n,r){Qi=Zi=null,Io(t),La=null,Ra=0;var i=t.return;try{if(lc(e,i,t,n,Zl)){iu=1,ic(e,Si(n,e.current)),Xl=null;return}}catch(t){if(i!==null)throw Xl=i,t;iu=1,ic(e,Si(n,e.current)),Xl=null;return}t.flags&32768?(zi||r===1?e=!0:tu||Zl&536870912?e=!1:(eu=e=!0,(r===2||r===9||r===3||r===6)&&(r=co.current,r!==null&&r.tag===13&&(r.flags|=16384))),Xu(t,e)):Yu(t)}function Yu(e){var t=e;do{if(t.flags&32768){Xu(t,eu);return}e=t.return;var n=qc(t.alternate,t,ru);if(n!==null){Xl=n;return}if(t=t.sibling,t!==null){Xl=t;return}Xl=t=e}while(t!==null);iu===0&&(iu=5)}function Xu(e,t){do{var n=Jc(e.alternate,e);if(n!==null){n.flags&=32767,Xl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Xl=e;return}Xl=e=n}while(e!==null);iu=6,Xl=null}function Zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do nd();while(vu!==0);if(Jl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ri,ot(e,n,o,s,c,l),e===Yl&&(Xl=Yl=null,Zl=0),bu=t,yu=e,xu=n,Su=o,Cu=a,wu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,dd(Re,function(){return rd(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=O.T,O.T=null,a=k.p,k.p=2,s=Jl,Jl|=4;try{ml(e,t,n)}finally{Jl=s,k.p=a,O.T=r}}vu=1,Qu(),$u(),ed()}}function Qu(){if(vu===1){vu=0;var e=yu,t=bu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=Jl;Jl|=4;try{El(t,e);var a=tf,o=jr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ar(s.ownerDocument.documentElement,s)){if(c!==null&&Mr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=kr(s,h),v=kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Sp=!!ef,tf=ef=null}finally{Jl=i,k.p=r,O.T=n}}e.current=t,vu=2}}function $u(){if(vu===2){vu=0;var e=yu,t=bu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=Jl;Jl|=4;try{hl(e,t.alternate,t)}finally{Jl=i,k.p=r,O.T=n}}vu=3}}function ed(){if(vu===4||vu===3){vu=0,Ne();var e=yu,t=bu,n=xu,r=wu;t.subtreeFlags&10256||t.flags&10256?vu=5:(vu=0,bu=yu=null,td(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(_u=null),dt(n),t=t.stateNode,We&&typeof We.onCommitFiberRoot==`function`)try{We.onCommitFiberRoot(Ue,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=O.T,i=k.p,k.p=2,O.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{O.T=t,k.p=i}}xu&3&&nd(),vd(e),i=e.pendingLanes,n&261930&&i&42?e===Eu?Tu++:(Tu=0,Eu=e):Tu=0,yd(0,!1)}}function td(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function nd(){return Qu(),$u(),ed(),rd()}function rd(){if(vu!==5)return!1;var e=yu,t=Su;Su=0;var n=dt(xu),r=O.T,a=k.p;try{k.p=32>n?32:n,O.T=null,n=Cu,Cu=null;var o=yu,s=xu;if(vu=0,bu=yu=null,xu=0,Jl&6)throw Error(i(331));var c=Jl;if(Jl|=4,Ul(o.current),Fl(o,o.current,s,n),Jl=c,yd(0,!1),We&&typeof We.onPostCommitFiberRoot==`function`)try{We.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{k.p=a,O.T=r,td(e,t)}}function id(e,t,n){t=Si(n,t),t=oc(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(at(e,2),vd(e))}function ad(e,t,n){if(e.tag===3)id(e,e,n);else for(;t!==null;){if(t.tag===3){id(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_u===null||!_u.has(r))){e=Si(n,e),n=sc(2),r=Ya(t,n,2),r!==null&&(cc(n,r,t,e),at(r,2),vd(r));break}}t=t.return}}function od(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ql;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(nu=!0,i.add(n),e=sd.bind(null,e,t,n),t.then(e,e))}function sd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yl===e&&(Zl&n)===n&&(iu===4||iu===3&&(Zl&62914560)===Zl&&300>Pe()-pu?!(Jl&2)&&Iu(e,0):su|=n,lu===Zl&&(lu=0)),vd(e)}function cd(e,t){t===0&&(t=rt()),e=si(e,t),e!==null&&(at(e,t),vd(e))}function ld(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cd(e,n)}function ud(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),cd(e,n)}function dd(e,t){return Ae(e,t)}var fd=null,pd=null,md=!1,hd=!1,gd=!1,_d=0;function vd(e){e!==pd&&e.next===null&&(pd===null?fd=pd=e:pd=pd.next=e),hd=!0,md||(md=!0,Td())}function yd(e,t){if(!gd&&hd){gd=!0;do for(var n=!1,r=fd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ke(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,wd(r,a))}else a=Zl,a=et(r,r===Yl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||tt(r,a)||(n=!0,wd(r,a))}r=r.next}while(n);gd=!1}}function bd(){xd()}function xd(){hd=md=!1;var e=0;_d!==0&&cf()&&(e=_d);for(var t=Pe(),n=null,r=fd;r!==null;){var i=r.next,a=Sd(r,t);a===0?(r.next=null,n===null?fd=i:n.next=i,i===null&&(pd=n)):(n=r,(e!==0||a&3)&&(hd=!0)),r=i}vu!==0&&vu!==5||yd(e,!1),_d!==0&&(_d=0)}function Sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ke(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=nt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Yl,n=Zl,n=et(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ql===2||Ql===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&je(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||tt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&je(r),dt(n)){case 2:case 8:n=Le;break;case 32:n=Re;break;case 268435456:n=Be;break;default:n=Re}return r=Cd.bind(null,e),n=Ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&je(r),e.callbackPriority=2,e.callbackNode=null,2}function Cd(e,t){if(vu!==0&&vu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(nd()&&e.callbackNode!==n)return null;var r=Zl;return r=et(e,e===Yl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Au(e,r,t),Sd(e,Pe()),e.callbackNode!=null&&e.callbackNode===n?Cd.bind(null,e):null)}function wd(e,t){if(nd())return null;Au(e,t,!0)}function Td(){ff(function(){Jl&6?Ae(Ie,bd):xd()})}function Ed(){if(_d===0){var e=_a;e===0&&(e=Xe,Xe<<=1,!(Xe&261888)&&(Xe=256)),_d=e}return _d}function Dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:an(``+e)}function Od(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function kd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Dd((i[gt]||null).action),o=r.submitter;o&&(t=(t=o[gt]||null)?Dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new En(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(_d!==0){var e=o?Od(i,o):new FormData(i);Ms(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Od(i,o):new FormData(i),Ms(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Ad=0;Ad<Qr.length;Ad++){var jd=Qr[Ad];$r(jd.toLowerCase(),`on`+(jd[0].toUpperCase()+jd.slice(1)))}$r(Wr,`onAnimationEnd`),$r(Gr,`onAnimationIteration`),$r(Kr,`onAnimationStart`),$r(`dblclick`,`onDoubleClick`),$r(`focusin`,`onFocus`),$r(`focusout`,`onBlur`),$r(qr,`onTransitionRun`),$r(Jr,`onTransitionStart`),$r(Yr,`onTransitionCancel`),$r(Xr,`onTransitionEnd`),At(`onMouseEnter`,[`mouseout`,`mouseover`]),At(`onMouseLeave`,[`mouseout`,`mouseover`]),At(`onPointerEnter`,[`pointerout`,`pointerover`]),At(`onPointerLeave`,[`pointerout`,`pointerover`]),kt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),kt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),kt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),kt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Md=`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(` `),Nd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Md));function Pd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ei(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ei(e)}i.currentTarget=null,a=c}}}}function Fd(e,t){var n=t[A];n===void 0&&(n=t[A]=new Set);var r=e+`__bubble`;n.has(r)||(zd(t,e,2,!1),n.add(r))}function Id(e,t,n){var r=0;t&&(r|=4),zd(n,e,r,t)}var Ld=`_reactListening`+Math.random().toString(36).slice(2);function Rd(e){if(!e[Ld]){e[Ld]=!0,Dt.forEach(function(t){t!==`selectionchange`&&(Nd.has(t)||Id(t,!1,e),Id(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ld]||(t[Ld]=!0,Id(`selectionchange`,!1,t))}}function zd(e,t,n,r){switch(kp(t)){case 2:var i=Cp;break;case 8:i=wp;break;default:i=Tp}n=i.bind(null,t,n,e),i=void 0,!hn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Bd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}pn(function(){var r=a,i=cn(n),s=[];a:{var c=Zr.get(e);if(c!==void 0){var l=En,u=e;switch(e){case`keypress`:if(xn(n)===0)break a;case`keydown`:case`keyup`:l=Un;break;case`focusin`:u=`focus`,l=Fn;break;case`focusout`:u=`blur`,l=Fn;break;case`beforeblur`:case`afterblur`:l=Fn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Nn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Pn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Gn;break;case Wr:case Gr:case Kr:l=In;break;case Xr:l=Kn;break;case`scroll`:case`scrollend`:l=On;break;case`wheel`:l=qn;break;case`copy`:case`cut`:case`paste`:l=Ln;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Wn;break;case`toggle`:case`beforetoggle`:l=Jn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=N(m,p),g!=null&&d.push(Vd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==sn&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[_t]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Nn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Wn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:j(l),h=u==null?c:j(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ud,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Wd(s,c,l,d,!1),u!==null&&f!==null&&Wd(s,f,u,d,!0)}}a:{if(c=r?j(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=mr;else if(cr(c)){if(hr)v=wr;else{v=Sr;var y=xr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&tn(r.elementType)&&(v=mr):v=Cr;if(v&&=v(e,r)){lr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&qt(c,`number`,c.value)}switch(y=r?j(r):window,e){case`focusin`:(cr(y)||y.contentEditable===`true`)&&(Pr=y,Fr=r,Ir=null);break;case`focusout`:Ir=Fr=Pr=null;break;case`mousedown`:Lr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Lr=!1,Rr(s,n,i);break;case`selectionchange`:if(Nr)break;case`keydown`:case`keyup`:Rr(s,n,i)}var b;if(Xn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ir?nr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&($n&&n.locale!==`ko`&&(ir||x!==`onCompositionStart`?x===`onCompositionEnd`&&ir&&(b=bn()):(_n=i,vn=`value`in _n?_n.value:_n.textContent,ir=!0)),y=Hd(r,x),0<y.length&&(x=new Rn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=rr(n),b!==null&&(x.data=b)))),(b=Qn?ar(e,n):or(e,n))&&(x=Hd(r,`onBeforeInput`),0<x.length&&(y=new Rn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),kd(s,e,r,n,i)}Pd(s,t)})}function Vd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=N(e,n),i!=null&&r.unshift(Vd(e,i,a)),i=N(e,t),i!=null&&r.push(Vd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ud(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=N(n,a),l!=null&&o.unshift(Vd(n,l,c))):i||(l=N(n,a),l!=null&&o.push(Vd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Gd=/\r\n?/g,Kd=/\u0000|\uFFFD/g;function qd(e){return(typeof e==`string`?e:``+e).replace(Gd,`
9
+ `).replace(Kd,``)}function Jd(e,t){return t=qd(t),qd(e)===t}function L(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Zt(e,``+r);break;case`className`:It(e,`class`,r);break;case`tabIndex`:It(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:It(e,n,r);break;case`style`:en(e,r,o);break;case`data`:if(t!==`object`){It(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&L(e,t,`name`,a.name,a,null),L(e,t,`formEncType`,a.formEncType,a,null),L(e,t,`formMethod`,a.formMethod,a,null),L(e,t,`formTarget`,a.formTarget,a,null)):(L(e,t,`encType`,a.encType,a,null),L(e,t,`method`,a.method,a,null),L(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=on);break;case`onScroll`:r!=null&&Fd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Fd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=an(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Fd(`beforetoggle`,e),Fd(`toggle`,e),Ft(e,`popover`,r);break;case`xlinkActuate`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ft(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=nn.get(n)||n,Ft(e,n,r))}}function Yd(e,t,n,r,a,o){switch(n){case`style`:en(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Zt(e,``+r);break;case`onScroll`:r!=null&&Fd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Fd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=on);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ot.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[gt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ft(e,n,r)}}}function Xd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Fd(`error`,e),Fd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:L(e,t,o,s,n,null)}}a&&L(e,t,`srcSet`,n.srcSet,n,null),r&&L(e,t,`src`,n.src,n,null);return;case`input`:Fd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:L(e,t,r,d,n,null)}}Kt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Fd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:L(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Jt(e,!!r,n,!0):Jt(e,!!r,t,!1);return;case`textarea`:for(s in Fd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:L(e,t,s,c,n,null)}Xt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:L(e,t,l,r,n,null)}return;case`dialog`:Fd(`beforetoggle`,e),Fd(`toggle`,e),Fd(`cancel`,e),Fd(`close`,e);break;case`iframe`:case`object`:Fd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Md.length;r++)Fd(Md[r],e);break;case`image`:Fd(`error`,e),Fd(`load`,e);break;case`details`:Fd(`toggle`,e);break;case`embed`:case`source`:case`link`:Fd(`error`,e),Fd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:L(e,t,u,r,n,null)}return;default:if(tn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Yd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&L(e,t,c,r,n,null))}function Zd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||L(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&L(e,t,p,m,r,f)}}Gt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||L(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&L(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Jt(e,!!n,n?[]:``,!1):Jt(e,!!n,t,!0)):Jt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:L(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&L(e,t,s,a,r,o)}Yt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:L(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:L(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&L(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:L(e,t,u,p,r,m)}return;default:if(tn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Yd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Yd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&L(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||L(e,t,f,p,r,m)}function Qd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function $d(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Qd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Qd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var ef=null,tf=null;function nf(e){return e.nodeType===9?e:e.ownerDocument}function rf(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function af(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function of(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var sf=null;function cf(){var e=window.event;return e&&e.type===`popstate`?e!==sf&&(sf=e,!0):(sf=null,!1)}var lf=typeof setTimeout==`function`?setTimeout:void 0,uf=typeof clearTimeout==`function`?clearTimeout:void 0,df=typeof Promise==`function`?Promise:void 0,ff=typeof queueMicrotask==`function`?queueMicrotask:df===void 0?lf:function(e){return df.resolve(null).then(e).catch(pf)};function pf(e){setTimeout(function(){throw e})}function mf(e){return e===`head`}function hf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Kp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)kf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,kf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[xt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&kf(e.ownerDocument.body)}n=i}while(n);Kp(t)}function gf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function _f(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:_f(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function vf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[xt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=wf(e.nextSibling),e===null)break}return null}function yf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=wf(e.nextSibling),e===null))return null;return e}function bf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=wf(e.nextSibling),e===null))return null;return e}function xf(e){return e.data===`$?`||e.data===`$~`}function Sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function Cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function wf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Tf=null;function Ef(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return wf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Of(e,t,n){switch(t=nf(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function kf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var Af=new Map,jf=new Set;function Mf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Nf=k.d;k.d={f:Pf,r:Ff,D:R,C:Rf,L:zf,m:Bf,X:Hf,S:Vf,M:Uf};function Pf(){var e=Nf.f(),t=Pu();return e||t}function Ff(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?Ps(t):Nf.r(e)}var If=typeof document>`u`?null:document;function Lf(e,t,n){var r=If;if(r&&typeof t==`string`&&t){var i=Wt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),jf.has(i)||(jf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Xd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function R(e){Nf.D(e),Lf(`dns-prefetch`,e,null)}function Rf(e,t){Nf.C(e,t),Lf(`preconnect`,e,t)}function zf(e,t,n){Nf.L(e,t,n);var r=If;if(r&&e&&t){var i=`link[rel="preload"][as="`+Wt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Wt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Wt(n.imageSizes)+`"]`)):i+=`[href="`+Wt(e)+`"]`;var a=i;switch(t){case`style`:a=Gf(e);break;case`script`:a=Yf(e)}Af.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Af.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Kf(a))||t===`script`&&r.querySelector(Xf(a))||(t=r.createElement(`link`),Xd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Bf(e,t){Nf.m(e,t);var n=If;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Wt(r)+`"][href="`+Wt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Yf(e)}if(!Af.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Af.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Xf(a)))return}r=n.createElement(`link`),Xd(r,`link`,e),Et(r),n.head.appendChild(r)}}}function Vf(e,t,n){Nf.S(e,t,n);var r=If;if(r&&e){var i=Tt(r).hoistableStyles,a=Gf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Kf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Af.get(a))&&$f(e,n);var c=o=r.createElement(`link`);Et(c),Xd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Hf(e,t){Nf.X(e,t);var n=If;if(n&&e){var r=Tt(n).hoistableScripts,i=Yf(e),a=r.get(i);a||(a=n.querySelector(Xf(i)),a||(e=m({src:e,async:!0},t),(t=Af.get(i))&&ep(e,t),a=n.createElement(`script`),Et(a),Xd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t){Nf.M(e,t);var n=If;if(n&&e){var r=Tt(n).hoistableScripts,i=Yf(e),a=r.get(i);a||(a=n.querySelector(Xf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Af.get(i))&&ep(e,t),a=n.createElement(`script`),Et(a),Xd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Wf(e,t,n,r){var a=(a=ge.current)?Mf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Gf(n.href),n=Tt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Gf(n.href);var o=Tt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Kf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Af.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Af.set(e,n),o||Jf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Yf(n),n=Tt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Gf(e){return`href="`+Wt(e)+`"`}function Kf(e){return`link[rel="stylesheet"][`+e+`]`}function qf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Jf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Xd(t,`link`,n),Et(t),e.head.appendChild(t))}function Yf(e){return`[src="`+Wt(e)+`"]`}function Xf(e){return`script[async]`+e}function Zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Wt(n.href)+`"]`);if(r)return t.instance=r,Et(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Et(r),Xd(r,`style`,a),Qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Gf(n.href);var o=e.querySelector(Kf(a));if(o)return t.state.loading|=4,t.instance=o,Et(o),o;r=qf(n),(a=Af.get(a))&&$f(r,a),o=(e.ownerDocument||e).createElement(`link`),Et(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Xd(o,`link`,r),t.state.loading|=4,Qf(o,n.precedence,e),t.instance=o;case`script`:return o=Yf(n.src),(a=e.querySelector(Xf(o)))?(t.instance=a,Et(a),a):(r=n,(a=Af.get(o))&&(r=m({},n),ep(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Et(a),Xd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Qf(r,n.precedence,e));return t.instance}function Qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function $f(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function ep(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var tp=null;function np(e,t,n){if(tp===null){var r=new Map,i=tp=new Map;i.set(n,r)}else i=tp,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[xt]||a[ht]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function rp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ip(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ap(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function op(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Gf(r.href),a=t.querySelector(Kf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=lp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Et(a);return}a=t.ownerDocument||t,r=qf(r),(i=Af.get(i))&&$f(r,i),a=a.createElement(`link`),Et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Xd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=lp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var sp=0;function cp(e,t){return e.stylesheets&&e.count===0&&dp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&dp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&sp===0&&(sp=62500*$d());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&dp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>sp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function lp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var up=null;function dp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,up=new Map,t.forEach(fp,e),up=null,lp.call(e))}function fp(e,t){if(!(t.state.loading&4)){var n=up.get(e);if(n)var r=n.get(null);else{n=new Map,up.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=lp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var pp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function mp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=it(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=it(0),this.hiddenUpdates=it(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function hp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new mp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=fi(3,null,null,t),e.current=a,a.stateNode=e,t=pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ka(a),e}function gp(e){return e?(e=ui,e):ui}function _p(e,t,n,r,i,a){i=gp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ya(e,r,t),n!==null&&(ku(n,e,t),Xa(n,e,t))}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yp(e,t){vp(e,t),(e=e.alternate)&&vp(e,t)}function bp(e){if(e.tag===13||e.tag===31){var t=si(e,67108864);t!==null&&ku(t,e,67108864),yp(e,67108864)}}function xp(e){if(e.tag===13||e.tag===31){var t=Du();t=ut(t);var n=si(e,t);n!==null&&ku(n,e,t),yp(e,t)}}var Sp=!0;function Cp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=2,Tp(e,t,n,r)}finally{k.p=a,O.T=i}}function wp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=8,Tp(e,t,n,r)}finally{k.p=a,O.T=i}}function Tp(e,t,n,r){if(Sp){var i=Ep(r);if(i===null)Bd(e,t,r,Dp,n),z(e,r);else if(zp(i,e,t,n,r))r.stopPropagation();else if(z(e,r),t&4&&-1<Lp.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=$e(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ke(o);s.entanglements[1]|=c,o&=~c}vd(a),!(Jl&6)&&(hu=Pe()+500,yd(0,!1))}}break;case 31:case 13:s=si(a,2),s!==null&&ku(s,a,2),Pu(),yp(a,2)}if(a=Ep(r),a===null&&Bd(e,t,r,Dp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Bd(e,t,r,null,n)}}function Ep(e){return e=cn(e),Op(e)}var Dp=null;function Op(e){if(Dp=null,e=Ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dp=e,null}function kp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Fe()){case Ie:return 2;case Le:return 8;case Re:case ze:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Ap=!1,jp=null,Mp=null,Np=null,Pp=new Map,Fp=new Map,Ip=[],Lp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function z(e,t){switch(e){case`focusin`:case`focusout`:jp=null;break;case`dragenter`:case`dragleave`:Mp=null;break;case`mouseover`:case`mouseout`:Np=null;break;case`pointerover`:case`pointerout`:Pp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Fp.delete(t.pointerId)}}function Rp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wt(t),t!==null&&bp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function zp(e,t,n,r,i){switch(t){case`focusin`:return jp=Rp(jp,e,t,n,r,i),!0;case`dragenter`:return Mp=Rp(Mp,e,t,n,r,i),!0;case`mouseover`:return Np=Rp(Np,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Pp.set(a,Rp(Pp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Fp.set(a,Rp(Fp.get(a)||null,e,t,n,r,i)),!0}return!1}function B(e){var t=Ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,pt(e.priority,function(){xp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,pt(e.priority,function(){xp(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 Bp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ep(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);sn=r,n.target.dispatchEvent(r),sn=null}else return t=wt(n),t!==null&&bp(t),e.blockedOn=n,!1;t.shift()}return!0}function Vp(e,t,n){Bp(e)&&n.delete(t)}function Hp(){Ap=!1,jp!==null&&Bp(jp)&&(jp=null),Mp!==null&&Bp(Mp)&&(Mp=null),Np!==null&&Bp(Np)&&(Np=null),Pp.forEach(Vp),Fp.forEach(Vp)}function Up(e,n){e.blockedOn===n&&(e.blockedOn=null,Ap||(Ap=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hp)))}var Wp=null;function Gp(e){Wp!==e&&(Wp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wp===e&&(Wp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Op(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,Ms(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kp(e){function t(t){return Up(t,e)}jp!==null&&Up(jp,e),Mp!==null&&Up(Mp,e),Np!==null&&Up(Np,e),Pp.forEach(t),Fp.forEach(t);for(var n=0;n<Ip.length;n++){var r=Ip[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ip.length&&(n=Ip[0],n.blockedOn===null);)B(n),n.blockedOn===null&&Ip.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[gt]||null;if(typeof a==`function`)o||Gp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[gt]||null)s=o.formAction;else if(Op(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gp(n)}}}function qp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Jp(e){this._internalRoot=e}Yp.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;_p(n,Du(),e,t,null,null)},Yp.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_p(e.current,2,null,e,null,null),Pu(),t[_t]=null}};function Yp(e){this._internalRoot=e}Yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ft();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ip.length&&t!==0&&t<Ip[n].priority;n++);Ip.splice(n,0,e),n===0&&B(e)}};var Xp=n.version;if(Xp!==`19.2.8`)throw Error(i(527,Xp,`19.2.8`));k.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:O,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qp.isDisabled&&Qp.supportsFiber)try{Ue=Qp.inject(Zp),We=Qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=tc,s=nc,c=rc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=hp(e,1,!1,null,null,n,r,null,o,s,c,qp),e[_t]=t.current,Rd(e),new Jp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),y=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),b=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),x=e=>{let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)},S={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`},C=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},w=l(d(),1),T=(0,w.createContext)({}),E=()=>(0,w.useContext)(T),ee=(0,w.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=E()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,w.createElement)(`svg`,{ref:c,...S,width:t??l??S.width,height:t??l??S.height,stroke:e??f,strokeWidth:m,className:v(`lucide`,p,i),...!a&&!C(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),D=(e,t)=>{let n=(0,w.forwardRef)(({className:n,...r},i)=>(0,w.createElement)(ee,{ref:i,iconNode:t,className:v(`lucide-${y(x(e))}`,`lucide-${e}`,n),...r}));return n.displayName=x(e),n},te=D(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),ne=D(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),re=D(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ie=D(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),ae=D(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),oe=D(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),se=D(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),O=D(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),k=D(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ce=D(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),le=D(`refresh-cw`,[[`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`}]]),ue=D(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),de=D(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),fe=D(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),pe=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),me=_();function he(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=he(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ge(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=he(e))&&(r&&(r+=` `),r+=t);return r}var _e=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ve=(e,t)=>({classGroupId:e,validator:t}),ye=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),be=`-`,xe=[],Se=`arbitrary..`,Ce=e=>{let t=Ee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Te(e);let n=e.split(be);return we(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?_e(i,t):t:i||xe}return n[e]||xe}}},we=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=we(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(be):e.slice(t).join(be),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Te=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Se+r:void 0})(),Ee=e=>{let{theme:t,classGroups:n}=e;return De(n,t)},De=(e,t)=>{let n=ye();for(let r in e){let i=e[r];Oe(i,n,r,t)}return n},Oe=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ke(i,t,n,r)}},ke=(e,t,n,r)=>{if(typeof e==`string`){Ae(e,t,n);return}if(typeof e==`function`){je(e,t,n,r);return}Me(e,t,n,r)},Ae=(e,t,n)=>{let r=e===``?t:Ne(t,e);r.classGroupId=n},je=(e,t,n,r)=>{if(Pe(e)){Oe(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ve(n,e))},Me=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Oe(o,Ne(t,a),n,r)}},Ne=(e,t)=>{let n=e,r=t.split(be),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ye(),n.nextPart.set(t,i)),n=i}return n},Pe=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Fe=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ie=`!`,Le=`:`,Re=[],ze=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Be=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Le){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ie)?(c=s.slice(0,-1),l=!0):s.startsWith(Ie)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ze(t,l,c,u)};if(t){let e=t+Le,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ze(Re,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ve=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},He=e=>({cache:Fe(e.cacheSize),parseClassName:Be(e),sortModifiers:Ve(e),postfixLookupClassGroupIds:Ue(e),...Ce(e)}),Ue=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},We=/\s+/,Ge=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(We),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Ie:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Ke=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=qe(n))&&(i&&(i+=` `),i+=r);return i},qe=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=qe(e[r]))&&(n&&(n+=` `),n+=t);return n},Je=(e,...t)=>{let n,r,i,a,o=o=>(n=He(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ge(e,n);return i(e,a),a};return a=o,(...e)=>a(Ke(...e))},Ye=[],Xe=e=>{let t=t=>t[e]||Ye;return t.isThemeGetter=!0,t},Ze=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$e=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,et=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tt=/\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$/,nt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,it=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,at=e=>$e.test(e),ot=e=>!!e&&!Number.isNaN(Number(e)),st=e=>!!e&&Number.isInteger(Number(e)),ct=e=>e.endsWith(`%`)&&ot(e.slice(0,-1)),lt=e=>et.test(e),ut=()=>!0,dt=e=>tt.test(e)&&!nt.test(e),ft=()=>!1,pt=e=>rt.test(e),mt=e=>it.test(e),ht=e=>!A(e)&&!j(e),gt=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),_t=e=>Mt(e,It,ft),A=e=>Ze.test(e),vt=e=>Mt(e,Lt,dt),yt=e=>Mt(e,Rt,ot),bt=e=>Mt(e,Bt,ut),xt=e=>Mt(e,zt,ft),St=e=>Mt(e,Pt,ft),Ct=e=>Mt(e,Ft,mt),wt=e=>Mt(e,Vt,pt),j=e=>Qe.test(e),Tt=e=>Nt(e,Lt),Et=e=>Nt(e,zt),Dt=e=>Nt(e,Pt),Ot=e=>Nt(e,It),kt=e=>Nt(e,Ft),At=e=>Nt(e,Vt,!0),jt=e=>Nt(e,Bt,!0),Mt=(e,t,n)=>{let r=Ze.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Nt=(e,t,n=!1)=>{let r=Qe.exec(e);return r?r[1]?t(r[1]):n:!1},Pt=e=>e===`position`||e===`percentage`,Ft=e=>e===`image`||e===`url`,It=e=>e===`length`||e===`size`||e===`bg-size`,Lt=e=>e===`length`,Rt=e=>e===`number`,zt=e=>e===`family-name`,Bt=e=>e===`number`||e===`weight`,Vt=e=>e===`shadow`,Ht=Je(()=>{let e=Xe(`color`),t=Xe(`font`),n=Xe(`text`),r=Xe(`font-weight`),i=Xe(`tracking`),a=Xe(`leading`),o=Xe(`breakpoint`),s=Xe(`container`),c=Xe(`spacing`),l=Xe(`radius`),u=Xe(`shadow`),d=Xe(`inset-shadow`),f=Xe(`text-shadow`),p=Xe(`drop-shadow`),m=Xe(`blur`),h=Xe(`perspective`),g=Xe(`aspect`),_=Xe(`ease`),v=Xe(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),j,A],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[j,A,c],T=()=>[at,`full`,`auto`,...w()],E=()=>[st,`none`,`subgrid`,j,A],ee=()=>[`auto`,{span:[`full`,st,j,A]},st,j,A],D=()=>[st,`auto`,j,A],te=()=>[`auto`,`min`,`max`,`fr`,j,A],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...w()],ae=()=>[at,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],oe=()=>[at,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],se=()=>[at,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],O=()=>[e,j,A],k=()=>[...b(),Dt,St,{position:[j,A]}],ce=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],le=()=>[`auto`,`cover`,`contain`,Ot,_t,{size:[j,A]}],ue=()=>[ct,Tt,vt],de=()=>[``,`none`,`full`,l,j,A],fe=()=>[``,ot,Tt,vt],pe=()=>[`solid`,`dashed`,`dotted`,`double`],me=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],he=()=>[ot,ct,Dt,St],ge=()=>[``,`none`,m,j,A],_e=()=>[`none`,ot,j,A],ve=()=>[`none`,ot,j,A],ye=()=>[ot,j,A],be=()=>[at,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[lt],breakpoint:[lt],color:[ut],container:[lt],"drop-shadow":[lt],ease:[`in`,`out`,`in-out`],font:[ht],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[lt],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[lt],shadow:[lt],spacing:[`px`,ot],text:[lt],"text-shadow":[lt],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,at,A,j,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,j,A]}],"container-named":[gt],columns:[{columns:[ot,A,j,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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`],sr:[`sr-only`,`not-sr-only`],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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[st,`auto`,j,A]}],basis:[{basis:[at,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ot,at,`auto`,`initial`,`none`,A]}],grow:[{grow:[``,ot,j,A]}],shrink:[{shrink:[``,ot,j,A]}],order:[{order:[st,`first`,`last`,`none`,j,A]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ae()}],"inline-size":[{inline:[`auto`,...oe()]}],"min-inline-size":[{"min-inline":[`auto`,...oe()]}],"max-inline-size":[{"max-inline":[`none`,...oe()]}],"block-size":[{block:[`auto`,...se()]}],"min-block-size":[{"min-block":[`auto`,...se()]}],"max-block-size":[{"max-block":[`none`,...se()]}],w:[{w:[s,`screen`,...ae()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ae()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ae()]}],h:[{h:[`screen`,`lh`,...ae()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ae()]}],"max-h":[{"max-h":[`screen`,`lh`,...ae()]}],"font-size":[{text:[`base`,n,Tt,vt]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,jt,bt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ct,A]}],"font-family":[{font:[Et,xt,t]}],"font-features":[{"font-features":[A]}],"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:[i,j,A]}],"line-clamp":[{"line-clamp":[ot,`none`,j,yt]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,j,A]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,j,A]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...pe(),`wavy`]}],"text-decoration-thickness":[{decoration:[ot,`from-font`,`auto`,j,vt]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ot,`auto`,j,A]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[st,j,A]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,j,A]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,j,A]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:le()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},st,j,A],radial:[``,j,A],conic:[st,j,A]},kt,Ct]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...pe(),`hidden`,`none`]}],"divide-style":[{divide:[...pe(),`hidden`,`none`]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...pe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ot,j,A]}],"outline-w":[{outline:[``,ot,Tt,vt]}],"outline-color":[{outline:O()}],shadow:[{shadow:[``,`none`,u,At,wt]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":[`none`,d,At,wt]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:fe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ot,vt]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":[`none`,f,At,wt]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ot,j,A]}],"mix-blend":[{"mix-blend":[...me(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ot]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[j,A]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ot]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,j,A]}],filter:[{filter:[``,`none`,j,A]}],blur:[{blur:ge()}],brightness:[{brightness:[ot,j,A]}],contrast:[{contrast:[ot,j,A]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,At,wt]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:[``,ot,j,A]}],"hue-rotate":[{"hue-rotate":[ot,j,A]}],invert:[{invert:[``,ot,j,A]}],saturate:[{saturate:[ot,j,A]}],sepia:[{sepia:[``,ot,j,A]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,j,A]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[ot,j,A]}],"backdrop-contrast":[{"backdrop-contrast":[ot,j,A]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ot,j,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ot,j,A]}],"backdrop-invert":[{"backdrop-invert":[``,ot,j,A]}],"backdrop-opacity":[{"backdrop-opacity":[ot,j,A]}],"backdrop-saturate":[{"backdrop-saturate":[ot,j,A]}],"backdrop-sepia":[{"backdrop-sepia":[``,ot,j,A]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,j,A]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ot,`initial`,j,A]}],ease:[{ease:[`linear`,`initial`,_,j,A]}],delay:[{delay:[ot,j,A]}],animate:[{animate:[`none`,v,j,A]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,j,A]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":[`scale-3d`],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[j,A,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":[`translate-none`],zoom:[{zoom:[st,j,A]}],accent:[{accent:O()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],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`,j,A]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,j,A]}],fill:[{fill:[`none`,...O()]}],"stroke-w":[{stroke:[ot,Tt,vt,yt]}],stroke:[{stroke:[`none`,...O()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`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-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`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`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function M(...e){return Ht(ge(e))}var Ut=Object.defineProperty,Wt=(e,t)=>Ut(e,`name`,{value:t,configurable:!0});function Gt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Wt(Gt,`setRef`);function Kt(...e){return t=>{let n=!1,r=e.map(e=>{let r=Gt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Gt(e[t],null)}}}}Wt(Kt,`composeRefs`);function qt(...e){return w.useCallback(Kt(...e),e)}Wt(qt,`useComposedRefs`);var Jt=Object.defineProperty,Yt=(e,t)=>Jt(e,`name`,{value:t,configurable:!0});function Xt(e){let t=w.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];on(r)&&typeof un==`function`&&(r=un(r._payload)),w.Children.forEach(r,e=>{if(rn(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;on(n)&&typeof un==`function`&&(n=un(n._payload)),a=en(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=w.cloneElement(a,void 0,s):!o&&w.Children.count(r)===1&&w.isValidElement(r)&&(a=r);let c=a?nn(a):void 0,l=qt(n,c);if(!a){if(r||r===0)throw Error(o?ln(e):cn(e));return r}let u=tn(i,a.props??{});return a.type!==w.Fragment&&(u.ref=n?l:c),w.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Yt(Xt,`createSlot`);var Zt=Xt(`Slot`),Qt=Symbol.for(`radix.slottable`);function $t(e){let t=Yt(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Qt,t}Yt($t,`createSlottable`);var en=Yt((e,t)=>{if(`child`in e.props){let t=e.props.child;return w.isValidElement(t)?w.cloneElement(t,void 0,e.props.children(t.props.children)):null}return w.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function tn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Yt(tn,`mergeProps`);function nn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Yt(nn,`getElementRef`);function rn(e){return w.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Qt}Yt(rn,`isSlottable`);var an=Symbol.for(`react.lazy`);function on(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===an&&`_payload`in e&&sn(e._payload)}Yt(on,`isLazyComponent`);function sn(e){return typeof e==`object`&&!!e&&`then`in e}Yt(sn,`isPromiseLike`);var cn=Yt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),ln=Yt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),un=w.use,dn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),fn=o(((e,t)=>{t.exports=dn()})),pn=l(h(),1),N=fn(),mn=Object.defineProperty,hn=(e,t)=>mn(e,`name`,{value:t,configurable:!0}),gn=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Xt(`Primitive.${t}`),r=w.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,N.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _n(e,t){e&&pn.flushSync(()=>e.dispatchEvent(t))}hn(_n,`dispatchDiscreteCustomEvent`);var vn=Object.defineProperty,yn=(e,t)=>vn(e,`name`,{value:t,configurable:!0}),bn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),xn=w.forwardRef(yn(function(e,t){return(0,N.jsx)(gn.span,{...e,ref:t,style:{...bn,...e.style}})},`VisuallyHidden`)),Sn=Object.defineProperty,Cn=(e,t)=>Sn(e,`name`,{value:t,configurable:!0});function wn(e,t){let n=w.createContext(t);n.displayName=e+`Context`;let r=Cn(e=>{let{children:t,...r}=e,i=w.useMemo(()=>r,Object.values(r));return(0,N.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=w.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Cn(i,`useContext`),[r,i]}Cn(wn,`createContext`);function Tn(e,t=[]){let n=[];function r(t,r){let i=w.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Cn(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=w.useMemo(()=>o,Object.values(o));return(0,N.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=w.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Cn(s,`useContext`),[o,s]}Cn(r,`createContext`);let i=Cn(()=>{let t=n.map(e=>w.createContext(e));return Cn(function(n){let r=n?.[e]||t;return w.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,En(i,...t)]}Cn(Tn,`createContextScope`);function En(...e){let t=e[0];if(e.length===1)return t;let n=Cn(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Cn(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Cn(En,`composeContextScopes`);var Dn=Object.defineProperty,On=(e,t)=>Dn(e,`name`,{value:t,configurable:!0});function kn(e){let t=e+`CollectionProvider`,[n,r]=Tn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=On(e=>{let{scope:t,children:n}=e,r=w.useRef(null),a=w.useRef(new Map).current;return(0,N.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Xt(s),l=w.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=qt(t,a(s,n).collectionRef);return(0,N.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Xt(u),p=w.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=w.useRef(null),s=qt(t,o),c=a(u,n);return w.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,N.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return w.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return On(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}On(kn,`createCollection`);var An=new WeakMap,jn=class e extends Map{static{On(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],An.set(this,!0)}set(e,t){return An.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=Pn(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Mn(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Mn(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Mn(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Mn(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Nn(e,t);return n===-1?void 0:e[n]}On(Mn,`at`);function Nn(e,t){let n=e.length,r=Pn(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}On(Nn,`toSafeIndex`);function Pn(e){return e!==e||e===0?0:Math.trunc(e)}On(Pn,`toSafeInteger`);function Fn(e){let t=e+`CollectionProvider`,[n,r]=Tn(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new jn,setItemMap:On(()=>void 0,`setItemMap`)}),o=On(({state:e,...t})=>e?(0,N.jsx)(c,{...t,state:e}):(0,N.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=On(e=>{let t=h();return(0,N.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=On(e=>{let{scope:t,children:n,state:r}=e,a=w.useRef(null),[o,s]=w.useState(null),c=qt(a,s),[l,u]=r;return w.useEffect(()=>{if(!o)return;let e=zn(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,N.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=Xt(l),d=w.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=qt(t,a(l,n).collectionRef);return(0,N.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=Xt(f),m=w.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=w.useRef(null),[s,c]=w.useState(null),l=qt(t,o,c),{setItemMap:u}=a(f,n),d=w.useRef(i);In(d.current,i)||(d.current=i);let m=d.current;return w.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Rn):(t.set(s,{...e,element:s}),t.toSorted(Rn)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new jn(e)))}},[s,m,u]),(0,N.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return w.useState(new jn)}On(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return On(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}On(Fn,`createCollection`);function In(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}On(In,`shallowEqual`);function Ln(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}On(Ln,`isElementPreceding`);function Rn(e,t){return!e[1].element||!t[1].element?0:Ln(e[1].element,t[1].element)?-1:1}On(Rn,`sortByDocumentPosition`);function zn(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}On(zn,`getChildListObserver`);var Bn=Object.defineProperty,Vn=(e,t)=>Bn(e,`name`,{value:t,configurable:!0}),Hn=!!(typeof window<`u`&&window.document&&window.document.createElement);function P(e,t,{checkForDefaultPrevented:n=!0}={}){return Vn(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Vn(P,`composeEventHandlers`);function Un(e){if(!Hn)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Vn(Un,`getOwnerWindow`);function Wn(e){if(!Hn)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Vn(Wn,`getOwnerDocument`);function Gn(e,t=!1){let{activeElement:n}=Wn(e);if(!n?.nodeName)return null;if(Kn(n)&&n.contentDocument)return Gn(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Wn(n).getElementById(e);if(t)return t}}return n}Vn(Gn,`getActiveElement`);function Kn(e){return e.tagName===`IFRAME`}Vn(Kn,`isFrame`);var qn=globalThis?.document?w.useLayoutEffect:()=>{},Jn=Object.defineProperty,Yn=(e,t)=>Jn(e,`name`,{value:t,configurable:!0}),Xn=w.useEffectEvent,Zn=w.useInsertionEffect;function Qn(e){if(typeof Xn==`function`)return Xn(e);let t=w.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Zn==`function`?Zn(()=>{t.current=e}):qn(()=>{t.current=e}),w.useMemo(()=>((...e)=>t.current?.(...e)),[])}Yn(Qn,`useEffectEvent`);var $n=Object.defineProperty,er=(e,t)=>$n(e,`name`,{value:t,configurable:!0}),tr=w.useInsertionEffect||qn;function nr({prop:e,defaultProp:t,onChange:n=er(()=>{},`onChange`),caller:r}){let[i,a,o]=rr({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,w.useCallback(t=>{if(s){let n=ir(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}er(nr,`useControllableState`);function rr({defaultProp:e,onChange:t}){let[n,r]=w.useState(e),i=w.useRef(n),a=w.useRef(t);return tr(()=>{a.current=t},[t]),w.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}er(rr,`useUncontrolledState`);function ir(e){return typeof e==`function`}er(ir,`isFunction`);var ar=Symbol(`RADIX:SYNC_STATE`);function or(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Qn(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=w.useReducer((t,n)=>{if(n.type===ar)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=w.useRef(p);w.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=w.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return w.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:ar,state:i})},[i,d.state,c]),[h,f]}er(or,`useControllableStateReducer`);var sr=Object.defineProperty,cr=(e,t)=>sr(e,`name`,{value:t,configurable:!0});function lr(e,t){return w.useReducer((e,n)=>t[e][n]??e,e)}cr(lr,`useStateMachine`);var ur=cr(e=>{let{present:t,children:n}=e,r=dr(t),i=typeof n==`function`?n({present:r.isPresent}):w.Children.only(n),a=pr(r.ref,hr(i));return typeof n==`function`||r.isPresent?w.cloneElement(i,{ref:a}):null},`Presence`);function dr(e){let[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),a=w.useRef(`none`),o=w.useRef(void 0),[s,c]=lr(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return w.useEffect(()=>{s===`mounted`?(a.current=o.current??mr(r.current),o.current=void 0):a.current=`none`},[s]),qn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=mr(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),qn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=cr(a=>{let o=mr(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=cr(e=>{e.target===t&&(a.current=mr(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:w.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=mr(t)}else r.current=null;n(e)},[])}}cr(dr,`usePresence`);function fr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}cr(fr,`setRef`);function pr(...e){let t=w.useRef(e);return t.current=e,w.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=fr(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():fr(n[e],null)}}},[])}cr(pr,`useStableComposedRefs`);function mr(e){return e?.animationName||`none`}cr(mr,`getAnimationName`);function hr(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}cr(hr,`getElementRef`);var gr=Object.defineProperty,_r=(e,t)=>gr(e,`name`,{value:t,configurable:!0}),vr=w.useId||(()=>void 0),yr=0;function br(e){let[t,n]=w.useState(vr());return qn(()=>{e||n(e=>e??String(yr++))},[e]),e||(t?`radix-${t}`:``)}_r(br,`useId`);var xr=Object.defineProperty,Sr=(e,t)=>xr(e,`name`,{value:t,configurable:!0}),Cr=w.createContext(void 0);function wr(e){let t=w.useContext(Cr);return e||t||`ltr`}Sr(wr,`useDirection`);var Tr=Object.defineProperty,Er=(e,t)=>Tr(e,`name`,{value:t,configurable:!0});function Dr(e){let t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>((...e)=>t.current?.(...e)),[])}Er(Dr,`useCallbackRef`);var Or=Object.defineProperty,kr=(e,t)=>Or(e,`name`,{value:t,configurable:!0}),Ar=`dismissableLayer.update`,jr=`dismissableLayer.pointerDownOutside`,Mr=`dismissableLayer.focusOutside`,Nr,Pr=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Fr=w.forwardRef(kr(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=w.useContext(Pr),[d,f]=w.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=w.useState({}),h=qt(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=w.useRef(!1),C=Rr(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),T=zr(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,ee=Dr(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return w.useEffect(()=>{if(E)return p.addEventListener(`keydown`,ee,{capture:!0}),()=>p.removeEventListener(`keydown`,ee,{capture:!0})},[p,E,ee]),w.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Nr=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Br(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Nr))}},[d,p,n,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Br())},[d,u]),w.useEffect(()=>{let e=kr(()=>m({}),`handleUpdate`);return document.addEventListener(Ar,e),()=>document.removeEventListener(Ar,e)},[]),(0,N.jsx)(gn.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:P(e.onFocusCapture,T.onFocusCapture),onBlurCapture:P(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function Ir(){let e=w.useContext(Pr),[t,n]=w.useState(null);return w.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}kr(Ir,`useDismissableLayerSurface`);var Lr=kr(()=>!0,`IS_TRUE`);function Rr(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Lr}=t,s=Dr(e),c=w.useRef(!1),l=w.useRef(!1),u=w.useRef(new Map),d=w.useRef(()=>{});return w.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}kr(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}kr(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}kr(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}kr(p,`handleInteractionBubble`);let m=kr(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Vr(jr,s,p,{discrete:!0})};if(kr(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:kr(()=>c.current=!0,`onPointerDownCapture`)}}kr(Rr,`usePointerDownOutside`);function zr(e,t=globalThis?.document){let n=Dr(e),r=w.useRef(!1);return w.useEffect(()=>{let e=kr(e=>{e.target&&!r.current&&Vr(Mr,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:kr(()=>r.current=!0,`onFocusCapture`),onBlurCapture:kr(()=>r.current=!1,`onBlurCapture`)}}kr(zr,`useFocusOutside`);function Br(){let e=new CustomEvent(Ar);document.dispatchEvent(e)}kr(Br,`dispatchUpdate`);function Vr(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_n(i,a):i.dispatchEvent(a)}kr(Vr,`handleAndDispatchCustomEvent`);var Hr=Object.defineProperty,Ur=(e,t)=>Hr(e,`name`,{value:t,configurable:!0}),Wr=`focusScope.autoFocusOnMount`,Gr=`focusScope.autoFocusOnUnmount`,Kr={bubbles:!1,cancelable:!0},qr=w.forwardRef(Ur(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=w.useState(null),l=Dr(i),u=Dr(a),d=w.useRef(null),f=qt(t,c),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:ei(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||ei(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ei(s)};Ur(e,`handleFocusIn`),Ur(t,`handleFocusOut`),Ur(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),w.useEffect(()=>{if(s){ti.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Wr,Kr);s.addEventListener(Wr,l),s.dispatchEvent(t),t.defaultPrevented||(Jr(ii(Xr(s)),{select:!0}),document.activeElement===e&&ei(s))}return()=>{s.removeEventListener(Wr,l),setTimeout(()=>{let t=new CustomEvent(Gr,Kr);s.addEventListener(Gr,u),s.dispatchEvent(t),t.defaultPrevented||ei(e??document.body,{select:!0}),s.removeEventListener(Gr,u),ti.remove(p)},0)}}},[s,l,u,p]);let m=w.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Yr(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&ei(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&ei(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,N.jsx)(gn.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Jr(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(ei(r,{select:t}),document.activeElement!==n)return}Ur(Jr,`focusFirst`);function Yr(e){let t=Xr(e);return[Zr(t,e),Zr(t.reverse(),e)]}Ur(Yr,`getTabbableEdges`);function Xr(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Ur(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Ur(Xr,`getTabbableCandidates`);function Zr(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Qr(r,{upTo:t})))return r}Ur(Zr,`findVisible`);function Qr(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Ur(Qr,`isHidden`);function $r(e){return e instanceof HTMLInputElement&&`select`in e}Ur($r,`isSelectableInput`);function ei(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$r(e)&&t&&e.select()}}Ur(ei,`focus`);var ti=ni();function ni(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ri(e,t),e.unshift(t)},remove(t){e=ri(e,t),e[0]?.resume()}}}Ur(ni,`createFocusScopesStack`);function ri(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Ur(ri,`arrayRemove`);function ii(e){return e.filter(e=>e.tagName!==`A`)}Ur(ii,`removeLinks`);var ai=Object.defineProperty,oi=w.forwardRef(((e,t)=>ai(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=w.useState(!1);qn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?pn.createPortal((0,N.jsx)(gn.div,{...r,ref:t}),o):null},`Portal`)),si=Object.defineProperty,ci=(e,t)=>si(e,`name`,{value:t,configurable:!0}),li=0,ui=null;function di(e){return fi(),e.children}ci(di,`FocusGuards`);function fi(){w.useEffect(()=>{ui||={start:pi(),end:pi()};let{start:e,end:t}=ui;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),li++,()=>{li===1&&(ui?.start.remove(),ui?.end.remove(),ui=null),li=Math.max(0,li-1)}},[])}ci(fi,`useFocusGuards`);function pi(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}ci(pi,`createFocusGuard`);var mi=function(){return mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mi.apply(this,arguments)};function hi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function gi(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var _i=`right-scroll-bar-position`,vi=`width-before-scroll-bar`,yi=`with-scroll-bars-hidden`,bi=`--removed-body-scroll-bar-size`;function xi(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Si(e,t){var n=(0,w.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Ci=typeof window<`u`?w.useLayoutEffect:w.useEffect,wi=new WeakMap;function Ti(e,t){var n=Si(t||null,function(t){return e.forEach(function(e){return xi(e,t)})});return Ci(function(){var t=wi.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||xi(e,null)}),i.forEach(function(e){r.has(e)||xi(e,a)})}wi.set(n,e)},[e]),n}function Ei(e){return e}function Di(e,t){t===void 0&&(t=Ei);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Oi(e){e===void 0&&(e={});var t=Di(null);return t.options=mi({async:!0,ssr:!1},e),t}var ki=function(e){var t=e.sideCar,n=hi(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return w.createElement(r,mi({},n))};ki.isSideCarExport=!0;function Ai(e,t){return e.useMedium(t),ki}var ji=Oi(),Mi=function(){},Ni=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:Mi,onWheelCapture:Mi,onTouchMoveCapture:Mi}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=hi(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Ti([n,t]),C=mi(mi({},b),i);return w.createElement(w.Fragment,null,u&&w.createElement(x,{sideCar:ji,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?w.cloneElement(w.Children.only(s),mi(mi({},C),{ref:S})):w.createElement(v,mi({},C,{className:c,ref:S}),s))});Ni.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ni.classNames={fullWidth:vi,zeroRight:_i};var Pi=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Fi(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Pi();return t&&e.setAttribute(`nonce`,t),e}function Ii(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Li(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ri=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fi())&&(Ii(t,n),Li(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zi=function(){var e=Ri();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bi=function(){var e=zi();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Vi={left:0,top:0,right:0,gap:0},Hi=function(e){return parseInt(e||``,10)||0},Ui=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Hi(n),Hi(r),Hi(i)]},Wi=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Vi;var t=Ui(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gi=Bi(),Ki=`data-scroll-locked`,qi=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
10
+ .${yi} {
11
+ overflow: hidden ${r};
12
+ padding-right: ${s}px ${r};
13
+ }
14
+ body[${Ki}] {
15
+ overflow: hidden ${r};
16
+ overscroll-behavior: contain;
17
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
18
+ padding-left: ${i}px;
19
+ padding-top: ${a}px;
20
+ padding-right: ${o}px;
21
+ margin-left:0;
22
+ margin-top:0;
23
+ margin-right: ${s}px ${r};
24
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
25
+ }
26
+
27
+ .${_i} {
28
+ right: ${s}px ${r};
29
+ }
30
+
31
+ .${vi} {
32
+ margin-right: ${s}px ${r};
33
+ }
34
+
35
+ .${_i} .${_i} {
36
+ right: 0 ${r};
37
+ }
38
+
39
+ .${vi} .${vi} {
40
+ margin-right: 0 ${r};
41
+ }
42
+
43
+ body[${Ki}] {
44
+ ${bi}: ${s}px;
45
+ }
46
+ `},Ji=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Yi=function(){w.useEffect(function(){return document.body.setAttribute(Ki,(Ji()+1).toString()),function(){var e=Ji()-1;e<=0?document.body.removeAttribute(Ki):document.body.setAttribute(Ki,e.toString())}},[])},Xi=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Yi();var a=w.useMemo(function(){return Wi(i)},[i]);return w.createElement(Gi,{styles:qi(a,!t,i,n?``:`!important`)})},Zi=!1;if(typeof window<`u`)try{var Qi=Object.defineProperty({},"passive",{get:function(){return Zi=!0,!0}});window.addEventListener(`test`,Qi,Qi),window.removeEventListener(`test`,Qi,Qi)}catch{Zi=!1}var $i=Zi?{passive:!1}:!1,ea=function(e){return e.tagName===`TEXTAREA`},ta=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ea(e)&&n[t]===`visible`)},na=function(e){return ta(e,`overflowY`)},ra=function(e){return ta(e,`overflowX`)},ia=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),sa(e,r)){var i=ca(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},aa=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},oa=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},sa=function(e,t){return e===`v`?na(t):ra(t)},ca=function(e,t){return e===`v`?aa(t):oa(t)},la=function(e,t){return e===`h`&&t===`rtl`?-1:1},ua=function(e,t,n,r,i){var a=la(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ca(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&sa(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},da=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fa=function(e){return[e.deltaX,e.deltaY]},pa=function(e){return e&&`current`in e?e.current:e},ma=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ha=function(e){return`
47
+ .block-interactivity-${e} {pointer-events: none;}
48
+ .allow-interactivity-${e} {pointer-events: all;}
49
+ `},ga=0,_a=[];function va(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(ga++)[0],a=w.useState(Bi)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=gi([e.lockRef.current],(e.shards||[]).map(pa),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=da(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ia(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ia(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ua(h,t,e,h===`h`?s:c,!0)},[]),c=w.useCallback(function(e){var n=e;if(!(!_a.length||_a[_a.length-1]!==a)){var r=`deltaY`in n?fa(n):da(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ma(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(pa).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=w.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ya(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=w.useCallback(function(e){n.current=da(e),r.current=void 0},[]),d=w.useCallback(function(t){l(t.type,fa(t),t.target,s(t,e.lockRef.current))},[]),f=w.useCallback(function(t){l(t.type,da(t),t.target,s(t,e.lockRef.current))},[]);w.useEffect(function(){return _a.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,$i),document.addEventListener(`touchmove`,c,$i),document.addEventListener(`touchstart`,u,$i),function(){_a=_a.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,$i),document.removeEventListener(`touchmove`,c,$i),document.removeEventListener(`touchstart`,u,$i)}},[]);var p=e.removeScrollBar,m=e.inert;return w.createElement(w.Fragment,null,m?w.createElement(a,{styles:ha(i)}):null,p?w.createElement(Xi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ya(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ba=Ai(ji,va),xa=w.forwardRef(function(e,t){return w.createElement(Ni,mi({},e,{ref:t,sideCar:ba}))});xa.classNames=Ni.classNames;var Sa=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ca=new WeakMap,wa=new WeakMap,Ta={},Ea=0,Da=function(e){return e&&(e.host||Da(e.parentNode))},Oa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Da(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},ka=function(e,t,n,r){var i=Oa(t,Array.isArray(e)?e:[e]);Ta[n]||(Ta[n]=new WeakMap);var a=Ta[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ca.get(e)||0)+1,l=(a.get(e)||0)+1;Ca.set(e,c),a.set(e,l),o.push(e),c===1&&i&&wa.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ea++,function(){o.forEach(function(e){var t=Ca.get(e)-1,i=a.get(e)-1;Ca.set(e,t),a.set(e,i),t||(wa.has(e)||e.removeAttribute(r),wa.delete(e)),i||e.removeAttribute(n)}),Ea--,Ea||(Ca=new WeakMap,Ca=new WeakMap,wa=new WeakMap,Ta={})}},Aa=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Sa(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),ka(r,i,n,`aria-hidden`)):function(){return null}},ja=Object.defineProperty,Ma=(e,t)=>ja(e,`name`,{value:t,configurable:!0}),Na=`Dialog`,[Pa,Fa]=Tn(Na),[Ia,La]=Pa(Na),Ra=Ma(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),c=w.useRef(null),[l,u]=nr({prop:r,defaultProp:i??!1,onChange:a,caller:Na}),[d,f]=w.useState(0),[p,m]=w.useState(0);return(0,N.jsx)(Ia,{scope:t,triggerRef:s,contentRef:c,contentId:br(),titleId:br(),descriptionId:br(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),za=`DialogPortal`,[Ba,Va]=Pa(za,{forceMount:void 0}),Ha=Ma(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=La(za,t);return(0,N.jsx)(Ba,{scope:t,forceMount:n,children:w.Children.map(r,e=>(0,N.jsx)(ur,{present:n||a.open,children:(0,N.jsx)(oi,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Ua=`DialogOverlay`,Wa=w.forwardRef(Ma(function(e,t){let n=Va(Ua,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=La(Ua,e.__scopeDialog);return a.modal?(0,N.jsx)(ur,{present:r||a.open,children:(0,N.jsx)(Ka,{...i,ref:t})}):null},`DialogOverlay`)),Ga=Xt(`DialogOverlay.RemoveScroll`),Ka=w.forwardRef(Ma(function(e,t){let{__scopeDialog:n,...r}=e,i=La(Ua,n),a=qt(t,Ir());return(0,N.jsx)(xa,{as:Ga,allowPinchZoom:!0,shards:[i.contentRef],children:(0,N.jsx)(gn.div,{"data-state":io(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),qa=`DialogContent`,Ja=w.forwardRef(Ma(function(e,t){let n=Va(qa,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=La(qa,e.__scopeDialog);return(0,N.jsx)(ur,{present:r||a.open,children:a.modal?(0,N.jsx)(Ya,{...i,ref:t}):(0,N.jsx)(Xa,{...i,ref:t})})},`DialogContent`)),Ya=w.forwardRef(Ma(function(e,t){let n=La(qa,e.__scopeDialog),r=w.useRef(null),i=qt(t,n.contentRef,r);return w.useEffect(()=>{let e=r.current;if(e)return Aa(e)},[]),(0,N.jsx)(Za,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:P(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:P(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Xa=w.forwardRef(Ma(function(e,t){let n=La(qa,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return(0,N.jsx)(Za,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Za=w.forwardRef(Ma(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=La(qa,n);return fi(),(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(qr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,N.jsx)(Fr,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":io(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Qa=`DialogTitle`,$a=w.forwardRef(Ma(function(e,t){let{__scopeDialog:n,...r}=e,i=La(Qa,n),{setTitleCount:a}=i;return qn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,N.jsx)(gn.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),eo=`DialogDescription`,to=w.forwardRef(Ma(function(e,t){let{__scopeDialog:n,...r}=e,i=La(eo,n),{setDescriptionCount:a}=i;return qn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,N.jsx)(gn.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),no=`DialogClose`,ro=w.forwardRef(Ma(function(e,t){let{__scopeDialog:n,...r}=e,i=La(no,n);return(0,N.jsx)(gn.button,{type:`button`,...r,ref:t,onClick:P(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function io(e){return e?`open`:`closed`}Ma(io,`getState`);var ao=Object.defineProperty,oo=(e,t)=>ao(e,`name`,{value:t,configurable:!0});function so(e){let[t,n]=w.useState(void 0);return qn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}oo(so,`useSize`);var co=[`top`,`right`,`bottom`,`left`],lo=Math.min,uo=Math.max,fo=Math.round,po=Math.floor,mo=e=>({x:e,y:e}),ho={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function go(e,t,n){return uo(e,lo(t,n))}function _o(e,t){return typeof e==`function`?e(t):e}function vo(e){return e.split(`-`)[0]}function F(e){return e.split(`-`)[1]}function yo(e){return e===`x`?`y`:`x`}function bo(e){return e===`y`?`height`:`width`}function xo(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function So(e){return yo(xo(e))}function Co(e,t,n){n===void 0&&(n=!1);let r=F(e),i=So(e),a=bo(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Mo(o)),[o,Mo(o)]}function wo(e){let t=Mo(e);return[To(e),t,To(t)]}function To(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Eo=[`left`,`right`],Do=[`right`,`left`],Oo=[`top`,`bottom`],ko=[`bottom`,`top`];function Ao(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Do:Eo:t?Eo:Do;case`left`:case`right`:return t?Oo:ko;default:return[]}}function jo(e,t,n,r){let i=F(e),a=Ao(vo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(To)))),a}function Mo(e){let t=vo(e);return ho[t]+e.slice(t.length)}function No(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Po(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:No(e)}function Fo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Io(e,t,n){let{reference:r,floating:i}=e,a=xo(t),o=So(t),s=bo(o),c=vo(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=F(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Lo(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=_o(t,e),p=Po(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Fo(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Fo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ro=50,zo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Lo},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Io(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ro&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Io(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Bo=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=_o(e,t)||{};if(l==null)return{};let d=Po(u),f={x:n,y:r},p=So(i),m=bo(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=lo(d[_],T),ee=lo(d[v],T),D=C-h[m]-ee,te=C/2-h[m]/2+w,ne=go(E,te,D),re=!c.arrow&&F(i)!=null&&te!==ne&&a.reference[m]/2-(te<E?E:ee)-h[m]/2<0,ie=re?te<E?te-E:te-D:0;return{[p]:f[p]+ie,data:{[p]:ne,centerOffset:te-ne-ie,...re&&{alignmentOffset:ie}},reset:re}}}),Vo=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=_o(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=vo(r),_=xo(o),v=vo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Mo(o)]:wo(o)),x=p!==`none`;!d&&x&&b.push(...jo(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Co(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===xo(t)||T.every(e=>xo(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=xo(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ho(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uo(e){return co.some(t=>e[t]>=0)}var Wo=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=_o(e,t);switch(i){case`referenceHidden`:{let e=Ho(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Uo(e)}}}case`escaped`:{let e=Ho(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Uo(e)}}}default:return{}}}}},Go=new Set([`left`,`top`]);async function Ko(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=vo(n),s=F(n),c=xo(n)===`y`,l=Go.has(o)?-1:1,u=a&&c?-1:1,d=_o(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var qo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ko(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Jo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=_o(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=xo(i),p=yo(f),m=u[p],h=u[f],g=(e,t)=>go(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Yo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=_o(e,t),u={x:n,y:r},d=xo(i),f=yo(d),p=u[f],m=u[d],h=_o(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Go.has(vo(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Xo=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=_o(e,t),c=await i.detectOverflow(t,s),l=vo(n),u=F(n),d=xo(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=lo(p-c[m],g),y=lo(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*uo(c.left,c.right):S=p-2*uo(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Zo(){return typeof window<`u`}function Qo(e){return ts(e)?(e.nodeName||``).toLowerCase():`#document`}function $o(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function es(e){return((ts(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ts(e){return Zo()?e instanceof Node||e instanceof $o(e).Node:!1}function ns(e){return Zo()?e instanceof Element||e instanceof $o(e).Element:!1}function rs(e){return Zo()?e instanceof HTMLElement||e instanceof $o(e).HTMLElement:!1}function is(e){return!Zo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof $o(e).ShadowRoot}function as(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=gs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function os(e){return/^(table|td|th)$/.test(Qo(e))}function ss(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var cs=/transform|translate|scale|rotate|perspective|filter/,ls=/paint|layout|strict|content/,us=e=>!!e&&e!==`none`,ds;function fs(e){let t=ns(e)?gs(e):e;return us(t.transform)||us(t.translate)||us(t.scale)||us(t.rotate)||us(t.perspective)||!ms()&&(us(t.backdropFilter)||us(t.filter))||cs.test(t.willChange||``)||ls.test(t.contain||``)}function ps(e){let t=vs(e);for(;rs(t)&&!hs(t);){if(fs(t))return t;if(ss(t))return null;t=vs(t)}return null}function ms(){return ds??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ds}function hs(e){return/^(html|body|#document)$/.test(Qo(e))}function gs(e){return $o(e).getComputedStyle(e)}function _s(e){return ns(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vs(e){if(Qo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||is(e)&&e.host||es(e);return is(t)?t.host:t}function ys(e){let t=vs(e);return hs(t)?(e.ownerDocument||e).body:rs(t)&&as(t)?t:ys(t)}function bs(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ys(e),i=r===e.ownerDocument?.body,a=$o(r);if(i){let e=xs(a);return t.concat(a,a.visualViewport||[],as(r)?r:[],e&&n?bs(e):[])}return t.concat(r,bs(r,[],n))}function xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ss(e){let t=gs(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=rs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=fo(n)!==a||fo(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Cs(e){return ns(e)?e:e.contextElement}function ws(e){let t=Cs(e);if(!rs(t))return mo(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ss(t),o=(a?fo(n.width):n.width)/r,s=(a?fo(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ts=mo(0);function Es(e){let t=$o(e);return!ms()||!t.visualViewport?Ts:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ds(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===$o(e)}function Os(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Cs(e),o=mo(1);t&&(r?ns(r)&&(o=ws(r)):o=ws(e));let s=Ds(a,n,r)?Es(a):mo(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=$o(a),t=ns(r)?$o(r):r,n=e,i=xs(n);for(;i&&t!==n;){let e=ws(i),t=i.getBoundingClientRect(),r=gs(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=$o(i),i=xs(n)}}return Fo({width:u,height:d,x:c,y:l})}function ks(e,t){let n=_s(e).scrollLeft;return t?t.left+n:Os(es(e)).left+n}function As(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ks(e,n),y:n.top+t.scrollTop}}function js(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=es(r),s=t?ss(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=mo(1),u=mo(0),d=rs(r);if((d||!a)&&((Qo(r)!==`body`||as(o))&&(c=_s(r)),d)){let e=Os(r);l=ws(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?As(o,c):mo(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ms(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ns(e){let t=_s(e),n=e.ownerDocument.body,r=uo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=uo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ks(e),o=-t.scrollTop;return gs(n).direction===`rtl`&&(a+=uo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ps=25;function Fs(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=$o(e),a=es(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ms()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(ks(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ps&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Is(e,t){let n=Os(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ws(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ls(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Fs(e,n,t);else if(t===`document`)r=Ns(es(e));else if(ns(t))r=Is(t,n);else{let n=Es(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fo(r)}function Rs(e,t){let n=t.get(e);if(n)return n;let r=bs(e,[],!1).filter(e=>ns(e)&&Qo(e)!==`body`),i=null,a=gs(e).position===`fixed`,o=a?vs(e):e;for(;ns(o)&&!hs(o);){let e=gs(o),t=fs(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=vs(o)}return t.set(e,r),r}function zs(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ss(t)?[]:Rs(t,this._c):[].concat(n),r],o=Ls(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ls(t,a[e],i);s=uo(n.top,s),c=lo(n.right,c),l=lo(n.bottom,l),u=uo(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Bs(e){let{width:t,height:n}=Ss(e);return{width:t,height:n}}function Vs(e,t,n){let r=rs(t),i=es(t),a=n===`fixed`,o=Os(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=mo(0);if((r||!a)&&((Qo(t)!==`body`||as(i))&&(s=_s(t)),r)){let e=Os(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=ks(i));let l=i&&!r&&!a?As(i,s):mo(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Hs(e){return gs(e).position===`static`}function Us(e,t){if(!rs(e)||gs(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return es(e)===n&&(n=n.ownerDocument.body),n}function Ws(e,t){let n=$o(e);if(ss(e))return n;if(!rs(e)){let t=vs(e);for(;t&&!hs(t);){if(ns(t)&&!Hs(t))return t;t=vs(t)}return n}let r=Us(e,t);for(;r&&os(r)&&Hs(r);)r=Us(r,t);return r&&hs(r)&&Hs(r)&&!fs(r)?n:r||ps(e)||n}var Gs=async function(e){let t=this.getOffsetParent||Ws,n=this.getDimensions,r=await n(e.floating);return{reference:Vs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ks(e){return gs(e).direction===`rtl`}var qs={convertOffsetParentRelativeRectToViewportRelativeRect:js,getDocumentElement:es,getClippingRect:zs,getOffsetParent:Ws,getElementRects:Gs,getClientRects:Ms,getDimensions:Bs,getScale:ws,isElement:ns,isRTL:Ks};function Js(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ys(e,t,n){let r=null,i,a=es(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=po(d),h=po(a.clientWidth-(u+f)),g=po(a.clientHeight-(d+p)),_=po(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:uo(0,lo(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Js(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=$o(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Xs(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Cs(e),u=i||a?[...l?bs(l):[],...t?bs(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ys(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Os(e):null;c&&g();function g(){let t=Os(e);h&&!Js(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Zs=qo,Qs=Jo,$s=Vo,ec=Xo,tc=Wo,nc=Bo,rc=Yo,ic=(e,t,n)=>{let r=new Map,i=n??{},a={...qs,...i.platform,_c:r};return zo(e,t,{...i,platform:a})},ac=typeof document<`u`?w.useLayoutEffect:function(){};function oc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!oc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!oc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function sc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cc(e,t){let n=sc(e);return Math.round(t*n)/n}function lc(e){let t=w.useRef(e);return ac(()=>{t.current=e}),t}function uc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=w.useState(r);oc(f,r)||p(r);let[m,h]=w.useState(null),[g,_]=w.useState(null),v=w.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=w.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=w.useRef(null),C=w.useRef(null),T=w.useRef(u),E=c!=null,ee=lc(c),D=lc(i),te=lc(l),ne=w.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),ic(S.current,C.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};re.current&&!oc(T.current,t)&&(T.current=t,pn.flushSync(()=>{d(t)}))})},[f,t,n,D,te]);ac(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let re=w.useRef(!1);ac(()=>(re.current=!0,()=>{re.current=!1}),[]),ac(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,ne);ne()}},[b,x,ne,ee,E]);let ie=w.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ae=w.useMemo(()=>({reference:b,floating:x}),[b,x]),oe=w.useMemo(()=>{let e={position:n,left:0,top:0};if(!ae.floating)return e;let t=cc(ae.floating,u.x),r=cc(ae.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...sc(ae.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ae.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:ne,refs:ie,elements:ae,floatingStyles:oe}),[u,ne,ie,ae,oe])}var dc=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:nc({element:r.current,padding:i}).fn(n):r?nc({element:r,padding:i}).fn(n):{}}}},fc=(e,t)=>{let n=Zs(e);return{name:n.name,fn:n.fn,options:[e,t]}},pc=(e,t)=>{let n=Qs(e);return{name:n.name,fn:n.fn,options:[e,t]}},mc=(e,t)=>({fn:rc(e).fn,options:[e,t]}),hc=(e,t)=>{let n=$s(e);return{name:n.name,fn:n.fn,options:[e,t]}},gc=(e,t)=>{let n=ec(e);return{name:n.name,fn:n.fn,options:[e,t]}},_c=(e,t)=>{let n=tc(e);return{name:n.name,fn:n.fn,options:[e,t]}},vc=(e,t)=>{let n=dc(e);return{name:n.name,fn:n.fn,options:[e,t]}},yc=Object.defineProperty,bc=(e,t)=>yc(e,`name`,{value:t,configurable:!0}),xc=`Popper`,[Sc,Cc]=Tn(xc),[wc,Tc]=Sc(xc),Ec=bc(e=>{let{__scopePopper:t,children:n}=e,[r,i]=w.useState(null),[a,o]=w.useState(void 0);return(0,N.jsx)(wc,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Dc=`PopperAnchor`,Oc=w.forwardRef(bc(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Tc(Dc,n),o=w.useRef(null),s=a.onAnchorChange,c=qt(t,w.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=w.useRef(null);w.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Fc(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,N.jsx)(gn.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),kc=`PopperContent`,[Ac,jc]=Sc(kc),Mc=w.forwardRef(bc(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Tc(kc,n),[_,v]=w.useState(null),y=qt(t,v),[b,x]=w.useState(null),S=so(b),C=S?.width??0,T=S?.height??0,E=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],te=D.length>0,ne={padding:ee,boundary:D.filter(Nc),altBoundary:te},{refs:re,floatingStyles:ie,placement:ae,isPositioned:oe,middlewareData:se}=uc({strategy:`fixed`,placement:E,whileElementsMounted:bc((...e)=>Xs(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[fc({mainAxis:i+T,alignmentAxis:o}),c&&pc({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?mc():void 0,...ne}),c&&hc({...ne}),gc({...ne,apply:bc(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&vc({element:b,padding:s}),Pc({arrowWidth:C,arrowHeight:T}),f&&_c({strategy:`referenceHidden`,...ne,boundary:te?ne.boundary:void 0})]}),O=g.setPlacementState;qn(()=>(O(ae),()=>{O(void 0)}),[ae,O]);let[k,ce]=Fc(ae),le=Dr(m);qn(()=>{oe&&le?.()},[oe,le]);let ue=se.arrow?.x,de=se.arrow?.y,fe=se.arrow?.centerOffset!==0,[pe,me]=w.useState();return qn(()=>{_&&me(window.getComputedStyle(_).zIndex)},[_]),(0,N.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:oe?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:pe,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(` `),...se.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,N.jsx)(Ac,{scope:n,placedSide:k,placedAlign:ce,onArrowChange:x,arrowX:ue,arrowY:de,shouldHideArrow:fe,children:(0,N.jsx)(gn.div,{"data-side":k,"data-align":ce,...h,ref:y,style:{...h.style,animation:oe?h.style?.animation:`none`}})})})},`PopperContent`));function Nc(e){return e!==null}bc(Nc,`isNotNull`);var Pc=bc(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Fc(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Fc(e){let[t,n=`center`]=e.split(`-`);return[t,n]}bc(Fc,`getSideAndAlignFromPlacement`);var Ic=Ec,Lc=Oc,Rc=Mc,zc=Object.defineProperty,Bc=(e,t)=>zc(e,`name`,{value:t,configurable:!0}),Vc=!1;function Hc(){let[e,t]=w.useState(Vc);return w.useEffect(()=>{Vc||(Vc=!0,t(!0))},[]),e}Bc(Hc,`useIsHydrated`);var Uc=w.useSyncExternalStore;function Wc(){return()=>{}}Bc(Wc,`subscribe`);function Gc(){return Uc(Wc,()=>!0,()=>!1)}Bc(Gc,`useIsHydratedModern`);var Kc=typeof Uc==`function`?Gc:Hc,qc=Object.defineProperty,Jc=(e,t)=>qc(e,`name`,{value:t,configurable:!0}),Yc=`rovingFocusGroup.onEntryFocus`,Xc={bubbles:!1,cancelable:!0},Zc=`RovingFocusGroup`,[Qc,$c,el]=kn(Zc),[tl,nl]=Tn(Zc,[el]),[rl,il]=tl(Zc),al=w.forwardRef(Jc(function(e,t){return(0,N.jsx)(Qc.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,N.jsx)(Qc.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,N.jsx)(ol,{...e,ref:t})})})},`RovingFocusGroup`)),ol=w.forwardRef(Jc(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=w.useRef(null),p=qt(t,f),m=wr(a),[h,g]=nr({prop:o,defaultProp:s??null,onChange:c,caller:Zc}),[_,v]=w.useState(!1),y=Dr(l),b=$c(n),x=w.useRef(!1),[S,C]=w.useState(0);return w.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Yc,y),()=>e.removeEventListener(Yc,y)},[y]),(0,N.jsx)(rl,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:w.useCallback(e=>g(e),[g]),onItemShiftTab:w.useCallback(()=>v(!0),[]),onFocusableItemAdd:w.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:w.useCallback(()=>C(e=>e-1),[]),children:(0,N.jsx)(gn.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:P(e.onMouseDown,()=>{x.current=!0}),onFocus:P(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Yc,Xc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);fl([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:P(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),sl=`RovingFocusGroupItem`,cl=w.forwardRef(Jc(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=br(),l=a||c,u=il(sl,n),d=u.currentTabStopId===l,f=$c(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Kc();return qn(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),w.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,N.jsx)(Qc.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,N.jsx)(gn.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:P(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:P(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:P(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=dl(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?pl(n,r+1):n.slice(r+1)}setTimeout(()=>fl(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),ll={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function ul(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Jc(ul,`getDirectionAwareKey`);function dl(e,t,n){let r=ul(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return ll[r]}Jc(dl,`getFocusIntent`);function fl(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Jc(fl,`focusFirst`);function pl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Jc(pl,`wrapArray`);var ml=al,hl=cl,gl=Object.defineProperty,I=(e,t)=>gl(e,`name`,{value:t,configurable:!0}),_l=[`Enter`,` `],vl=[`ArrowDown`,`PageUp`,`Home`],yl=[`ArrowUp`,`PageDown`,`End`],bl=[...vl,...yl];[..._l],[..._l];var xl=`Menu`,[Sl,Cl,wl]=kn(xl),[Tl,El]=Tn(xl,[wl,Cc,nl]),Dl=Cc(),Ol=nl(),[kl,Al]=Tl(xl),[jl,Ml]=Tl(xl),Nl=I(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Dl(t),[c,l]=w.useState(null),u=w.useRef(!1),d=Dr(a),f=wr(i);return w.useEffect(()=>{let e=I(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=I(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),w.useEffect(()=>{if(!n)return;let e=I(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,N.jsx)(Ic,{...s,children:(0,N.jsx)(kl,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,N.jsx)(jl,{scope:t,onClose:w.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Pl=w.forwardRef(I(function(e,t){let{__scopeMenu:n,...r}=e,i=Dl(n);return(0,N.jsx)(Lc,{...i,...r,ref:t})},`MenuAnchor`)),Fl=`MenuPortal`,[Il,Ll]=Tl(Fl,{forceMount:void 0}),Rl=I(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Al(Fl,t);return(0,N.jsx)(Il,{scope:t,forceMount:n,children:(0,N.jsx)(ur,{present:n||a.open,children:(0,N.jsx)(oi,{asChild:!0,container:i,children:r})})})},`MenuPortal`),zl=`MenuContent`,[Bl,Vl]=Tl(zl),Hl=w.forwardRef(I(function(e,t){let n=Ll(zl,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Al(zl,e.__scopeMenu),o=Ml(zl,e.__scopeMenu);return(0,N.jsx)(Sl.Provider,{scope:e.__scopeMenu,children:(0,N.jsx)(ur,{present:r||a.open,children:(0,N.jsx)(Sl.Slot,{scope:e.__scopeMenu,children:o.modal?(0,N.jsx)(Ul,{...i,ref:t}):(0,N.jsx)(Wl,{...i,ref:t})})})})},`MenuContent`)),Ul=w.forwardRef(I(function(e,t){let n=Al(zl,e.__scopeMenu),r=w.useRef(null),i=qt(t,r);return w.useEffect(()=>{let e=r.current;if(e)return Aa(e)},[]),(0,N.jsx)(Kl,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:P(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Wl=w.forwardRef(I(function(e,t){let n=Al(zl,e.__scopeMenu);return(0,N.jsx)(Kl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Gl=Xt(`MenuContent.ScrollLock`),Kl=w.forwardRef(I(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Al(zl,n),_=Ml(zl,n),v=Dl(n),y=Ol(n),b=Cl(n),[x,S]=w.useState(null),C=w.useRef(null),T=qt(t,C,g.onContentChange),E=w.useRef(0),ee=w.useRef(``),D=w.useRef(0),te=w.useRef(null),ne=w.useRef(`right`),re=w.useRef(0),ie=m?xa:w.Fragment,ae=m?{as:Gl,allowPinchZoom:!0}:void 0,oe=I(e=>{let t=ee.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=cu(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;I((function e(t){ee.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);w.useEffect(()=>()=>window.clearTimeout(E.current),[]),fi();let se=w.useCallback(e=>ne.current===te.current?.side&&uu(e,te.current?.area),[]);return(0,N.jsx)(Bl,{scope:n,searchRef:ee,onItemEnter:w.useCallback(e=>{se(e)&&e.preventDefault()},[se]),onItemLeave:w.useCallback(e=>{se(e)||(C.current?.focus(),S(null))},[se]),onTriggerLeave:w.useCallback(e=>{se(e)&&e.preventDefault()},[se]),pointerGraceTimerRef:D,onPointerGraceIntentChange:w.useCallback(e=>{te.current=e},[]),children:(0,N.jsx)(ie,{...ae,children:(0,N.jsx)(qr,{asChild:!0,trapped:i,onMountAutoFocus:P(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,N.jsx)(Fr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,N.jsx)(ml,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:P(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,N.jsx)(Rc,{role:`menu`,"aria-orientation":`vertical`,"data-state":ru(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:P(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&oe(e.key));let i=C.current;if(e.target!==i||!bl.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);yl.includes(e.key)&&a.reverse(),ou(a)}),onBlur:P(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),ee.current=``)}),onPointerMove:P(e.onPointerMove,du(e=>{let t=e.target,n=re.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>re.current?`right`:`left`;ne.current=t,re.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),ql=`MenuItem`,Jl=`menu.itemSelect`,Yl=w.forwardRef(I(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=w.useRef(null),o=Ml(ql,e.__scopeMenu),s=Vl(ql,e.__scopeMenu),c=qt(t,a),l=w.useRef(!1),u=I(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Jl,{bubbles:!0,cancelable:!0});e.addEventListener(Jl,e=>r?.(e),{once:!0}),_n(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,N.jsx)(Xl,{...i,ref:c,disabled:n,onClick:P(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:P(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:P(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&_l.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Xl=w.forwardRef(I(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Vl(ql,n),s=Ol(n),c=w.useRef(null),l=qt(t,c),[u,d]=w.useState(!1),[f,p]=w.useState(``);return w.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,N.jsx)(Sl.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,N.jsx)(hl,{asChild:!0,...s,focusable:!r,children:(0,N.jsx)(gn.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:P(e.onPointerMove,du(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:P(e.onPointerLeave,du(e=>o.onItemLeave(e))),onFocus:P(e.onFocus,()=>d(!0)),onBlur:P(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[Zl,Ql]=Tl(`MenuRadioGroup`,{value:void 0,onValueChange:I(()=>{},`onValueChange`)}),[$l,eu]=Tl(`MenuItemIndicator`,{checked:!1}),[tu,nu]=Tl(`MenuSub`);function ru(e){return e?`open`:`closed`}I(ru,`getOpenState`);function iu(e){return e===`indeterminate`}I(iu,`isIndeterminate`);function au(e){return iu(e)?`indeterminate`:e?`checked`:`unchecked`}I(au,`getCheckedState`);function ou(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}I(ou,`focusFirst`);function su(e,t){return e.map((n,r)=>e[(t+r)%e.length])}I(su,`wrapArray`);function cu(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=su(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}I(cu,`getNextMatch`);function lu(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}I(lu,`isPointInPolygon`);function uu(e,t){return t?lu({x:e.clientX,y:e.clientY},t):!1}I(uu,`isPointerInGraceArea`);function du(e){return t=>t.pointerType===`mouse`?e(t):void 0}I(du,`whenMouse`);var fu=Nl,pu=Pl,mu=Rl,hu=Hl,gu=Yl,_u=Object.defineProperty,vu=(e,t)=>_u(e,`name`,{value:t,configurable:!0}),yu=`DropdownMenu`,[bu,xu]=Tn(yu,[El]),Su=El(),[Cu,wu]=bu(yu),Tu=vu(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Su(t),l=w.useRef(null),[u,d]=nr({prop:i,defaultProp:a??!1,onChange:o,caller:yu});return(0,N.jsx)(Cu,{scope:t,triggerId:br(),triggerRef:l,contentId:br(),open:u,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,N.jsx)(fu,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Eu=`DropdownMenuTrigger`,Du=w.forwardRef(vu(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=wu(Eu,n),o=Su(n),s=qt(t,a.triggerRef);return(0,N.jsx)(pu,{asChild:!0,...o,children:(0,N.jsx)(gn.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:P(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:P(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Ou=vu(e=>{let{__scopeDropdownMenu:t,...n}=e,r=Su(t);return(0,N.jsx)(mu,{...r,...n})},`DropdownMenuPortal`),ku=`DropdownMenuContent`,Au=w.forwardRef(vu(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wu(ku,n),a=Su(n),o=w.useRef(!1);return(0,N.jsx)(hu,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:P(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:P(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),ju=w.forwardRef(vu(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Su(n);return(0,N.jsx)(gu,{...i,...r,ref:t})},`DropdownMenuItem`)),Mu=Tu,Nu=Du,Pu=Ou,Fu=Au,Iu=ju,Lu=Object.defineProperty,Ru=(e,t)=>Lu(e,`name`,{value:t,configurable:!0}),zu=`Popover`,[Bu,Vu]=Tn(zu,[Cc]),Hu=Cc(),[Uu,Wu]=Bu(zu),Gu=Ru(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Hu(t),c=w.useRef(null),[l,u]=w.useState(!1),[d,f]=nr({prop:r,defaultProp:i??!1,onChange:a,caller:zu});return(0,N.jsx)(Ic,{...s,children:(0,N.jsx)(Uu,{scope:t,contentId:br(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:w.useCallback(()=>u(!0),[]),onCustomAnchorRemove:w.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),Ku=`PopoverAnchor`,qu=w.forwardRef(Ru(function(e,t){let{__scopePopover:n,...r}=e,i=Wu(Ku,n),a=Hu(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return w.useEffect(()=>(o(),()=>s()),[o,s]),(0,N.jsx)(Lc,{...a,...r,ref:t})},`PopoverAnchor`)),Ju=`PopoverTrigger`,Yu=w.forwardRef(Ru(function(e,t){let{__scopePopover:n,...r}=e,i=Wu(Ju,n),a=Hu(n),o=qt(t,i.triggerRef),s=(0,N.jsx)(gn.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":od(i.open),...r,ref:o,onClick:P(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,N.jsx)(Lc,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Xu=`PopoverPortal`,[Zu,Qu]=Bu(Xu,{forceMount:void 0}),$u=Ru(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Wu(Xu,t);return(0,N.jsx)(Zu,{scope:t,forceMount:n,children:(0,N.jsx)(ur,{present:n||a.open,children:(0,N.jsx)(oi,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),ed=`PopoverContent`,td=w.forwardRef(Ru(function(e,t){let n=Qu(ed,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Wu(ed,e.__scopePopover);return(0,N.jsx)(ur,{present:r||a.open,children:a.modal?(0,N.jsx)(rd,{...i,ref:t}):(0,N.jsx)(id,{...i,ref:t})})},`PopoverContent`)),nd=Xt(`PopoverContent.RemoveScroll`),rd=w.forwardRef(Ru(function(e,t){let n=Wu(ed,e.__scopePopover),r=w.useRef(null),i=qt(t,r),a=w.useRef(!1);return w.useEffect(()=>{let e=r.current;if(e)return Aa(e)},[]),(0,N.jsx)(xa,{as:nd,allowPinchZoom:!0,children:(0,N.jsx)(ad,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),id=w.forwardRef(Ru(function(e,t){let n=Wu(ed,e.__scopePopover),r=w.useRef(!1),i=w.useRef(!1);return(0,N.jsx)(ad,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),ad=w.forwardRef(Ru(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Wu(ed,n),p=Hu(n);return fi(),(0,N.jsx)(qr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,N.jsx)(Fr,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,N.jsx)(Rc,{"data-state":od(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function od(e){return e?`open`:`closed`}Ru(od,`getState`);var sd=Gu,cd=qu,ld=Yu,ud=$u,dd=td,fd=Object.defineProperty,pd=(e,t)=>fd(e,`name`,{value:t,configurable:!0}),md=`Radio`,[hd,gd]=Tn(md),[_d,vd]=hd(md);function yd(e){let{__scopeRadio:t,checked:n=!1,children:r,disabled:i,form:a,name:o,onCheck:s,required:c,value:l=`on`,internal_do_not_use_render:u}=e,[d,f]=w.useState(null),[p,m]=w.useState(null),h=w.useRef(!1),[g,_]=w.useReducer(e=>e+1,0),v={checked:n,disabled:i,required:c,name:o,form:a,value:l,control:d,setControl:f,hasConsumerStoppedPropagationRef:h,userInteractionCount:g,onUserInteraction:_,isFormControl:!d||!!a||!!d.closest(`form`),bubbleInput:p,setBubbleInput:m,onCheck:pd(()=>s?.(),`onCheck`)};return(0,N.jsx)(_d,{scope:t,...v,children:wd(u)?u(v):r})}pd(yd,`RadioProvider`);var bd=`RadioTrigger`,xd=w.forwardRef(pd(function({__scopeRadio:e,onClick:t,...n},r){let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,hasConsumerStoppedPropagationRef:l,onUserInteraction:u,isFormControl:d,bubbleInput:f}=vd(bd,e),p=qt(r,s);return(0,N.jsx)(gn.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":Td(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:p,onClick:P(t,e=>{i||(u(),c()),f&&d&&(l.current=e.isPropagationStopped(),l.current||e.stopPropagation())})})},`RadioTrigger`)),Sd=`RadioBubbleInput`,Cd=w.forwardRef(pd(function({__scopeRadio:e,onClick:t,...n},r){let{control:i,checked:a,required:o,disabled:s,name:c,value:l,form:u,bubbleInput:d,setBubbleInput:f,hasConsumerStoppedPropagationRef:p,userInteractionCount:m}=vd(Sd,e),h=qt(r,f),g=so(i),_=w.useRef(!1),v=w.useRef(a),y=w.useRef(m);w.useEffect(()=>{let e=d;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=m!==y.current;y.current=m;let i=v.current!==a;v.current=a;let o=!(r&&p.current);if(i&&n){_.current=!r;let t=new Event(`click`,{bubbles:o});n.call(e,a),e.dispatchEvent(t),_.current=!1}},[d,a,p,m]);let b=w.useRef(a);return(0,N.jsx)(gn.input,{type:`radio`,"aria-hidden":!0,defaultChecked:b.current,required:o,disabled:s,name:c,value:l,form:u,...n,tabIndex:-1,ref:h,onClick:P(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`RadioBubbleInput`));function wd(e){return typeof e==`function`}pd(wd,`isFunction`);function Td(e){return e?`checked`:`unchecked`}pd(Td,`getState`);var Ed=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Dd=`RadioGroup`,[Od,kd]=Tn(Dd,[nl,gd]),Ad=nl(),jd=gd(),[Md,Nd]=Od(Dd),Pd=w.forwardRef(pd(function(e,t){let{__scopeRadioGroup:n,name:r,form:i,defaultValue:a,value:o,required:s=!1,disabled:c=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...p}=e,m=Ad(n),h=wr(u),[g,_]=nr({prop:o,defaultProp:a??null,onChange:f,caller:Dd}),[v,y]=w.useState(null),b=qt(t,y),x=w.useRef(g);return w.useEffect(()=>{let e=i?v?.ownerDocument.getElementById(i):v?.closest(`form`);if(e instanceof HTMLFormElement){let t=pd(()=>_(x.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[v,i,_]),(0,N.jsx)(Md,{scope:n,name:r,form:i,required:s,disabled:c,value:g,onValueChange:_,children:(0,N.jsx)(ml,{asChild:!0,...m,orientation:l,dir:h,loop:d,children:(0,N.jsx)(gn.div,{role:`radiogroup`,"aria-required":s,"aria-orientation":l,"data-disabled":c?``:void 0,dir:h,...p,ref:b})})})},`RadioGroup`)),Fd=`RadioGroupItemProvider`,Id=`RadioGroupItemTrigger`;function Ld(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=Nd(Fd,t),s=jd(t),c=o.disabled||r;return(0,N.jsx)(yd,{...s,checked:o.value===n,disabled:c,required:o.required,name:o.name,form:o.form,value:n,onCheck:()=>o.onValueChange(n),internal_do_not_use_render:a,children:i})}pd(Ld,`RadioGroupItemProvider`);var Rd=w.forwardRef(pd(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=Ad(n),a=jd(n),{checked:o,disabled:s}=vd(Id,a.__scopeRadio),c=w.useRef(null),l=qt(t,c),u=w.useRef(!1);return w.useEffect(()=>{let e=pd(e=>{Ed.includes(e.key)&&(u.current=!0)},`handleKeyDown`),t=pd(()=>u.current=!1,`handleKeyUp`);return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,N.jsx)(hl,{asChild:!0,...i,focusable:!s,active:o,children:(0,N.jsx)(xd,{...a,...r,ref:l,onKeyDown:P(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:P(r.onFocus,()=>{u.current&&c.current?.click()})})})},`RadioGroupItemTrigger`)),zd=w.forwardRef(pd(function(e,t){let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,N.jsx)(Ld,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Rd,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,N.jsx)(Bd,{__scopeRadioGroup:n})]})})},`RadioGroupItem`)),Bd=w.forwardRef(pd(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=jd(n);return(0,N.jsx)(Cd,{...i,...r,ref:t})},`RadioGroupItemBubbleInput`)),Vd=Object.defineProperty,Hd=(e,t)=>Vd(e,`name`,{value:t,configurable:!0}),Ud=`horizontal`,Wd=[`horizontal`,`vertical`],Gd=w.forwardRef(Hd(function(e,t){let{decorative:n,orientation:r=Ud,...i}=e,a=Kd(r)?r:Ud,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,N.jsx)(gn.div,{"data-orientation":a,...o,...i,ref:t})},`Separator`));function Kd(e){return Wd.includes(e)}Hd(Kd,`isValidOrientation`);var qd=Gd,Jd=Object.defineProperty,L=(e,t)=>Jd(e,`name`,{value:t,configurable:!0}),[Yd,Xd]=Tn(`Tooltip`,[Cc]),Zd=Cc(),Qd=`TooltipProvider`,$d=700,ef=`tooltip.open`,[tf,nf]=Yd(Qd),rf=L(e=>{let{__scopeTooltip:t,delayDuration:n=$d,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=w.useRef(!0),s=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,N.jsx)(tf,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:w.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:w.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:w.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),af=`Tooltip`,[of,sf]=Yd(af),cf=L(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=nf(af,e.__scopeTooltip),l=Zd(t),[u,d]=w.useState(null),[f,p]=w.useState(void 0),m=br(),h=w.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=w.useRef(!1),[y,b]=nr({prop:r,defaultProp:i??!1,onChange:L(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(ef))):c.onClose(),a?.(e)},`onChange`),caller:af}),x=w.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=w.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=w.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),T=w.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);w.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let E=f??m;return(0,N.jsx)(Ic,{...l,children:(0,N.jsx)(of,{scope:t,contentId:E,setContentId:p,open:y,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:w.useCallback(()=>{c.isOpenDelayedRef.current?T():S()},[c.isOpenDelayedRef,T,S]),onTriggerLeave:w.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:n})})},`Tooltip`),lf=`TooltipTrigger`,uf=w.forwardRef(L(function(e,t){let{__scopeTooltip:n,...r}=e,i=sf(lf,n),a=nf(lf,n),o=Zd(n),s=qt(t,w.useRef(null),i.onTriggerChange),c=w.useRef(!1),l=w.useRef(!1),u=w.useCallback(()=>c.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,N.jsx)(Lc,{asChild:!0,...o,children:(0,N.jsx)(gn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:P(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:P(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:P(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:P(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:P(e.onBlur,i.onClose),onClick:P(e.onClick,i.onClose)})})},`TooltipTrigger`)),df=`TooltipPortal`,[ff,pf]=Yd(df,{forceMount:void 0}),mf=L(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=sf(df,t);return(0,N.jsx)(ff,{scope:t,forceMount:n,children:(0,N.jsx)(ur,{present:n||a.open,children:(0,N.jsx)(oi,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),hf=`TooltipContent`,gf=w.forwardRef(L(function(e,t){let n=pf(hf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=sf(hf,e.__scopeTooltip);return(0,N.jsx)(ur,{present:r||o.open,children:o.disableHoverableContent?(0,N.jsx)(yf,{side:i,...a,ref:t}):(0,N.jsx)(_f,{side:i,...a,ref:t})})},`TooltipContent`)),_f=w.forwardRef(L(function(e,t){let n=sf(hf,e.__scopeTooltip),r=nf(hf,e.__scopeTooltip),i=w.useRef(null),a=qt(t,i),[o,s]=w.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=w.useCallback(()=>{s(null),d(!1)},[d]),p=w.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=xf(r,bf(r,n.getBoundingClientRect())),a=Sf(t.getBoundingClientRect()),o=wf([...i,...a]);s(o),d(!0)},[d]);return w.useEffect(()=>()=>f(),[f]),w.useEffect(()=>{if(c&&u){let e=L(e=>p(e,u),`handleTriggerLeave`),t=L(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),w.useEffect(()=>{if(o){let e=L(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Cf(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,N.jsx)(yf,{...e,ref:a})},`TooltipContentHoverable`)),vf=$t(`TooltipContent`),yf=w.forwardRef(L(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=sf(hf,n),u=Zd(n),{onClose:d}=l;w.useEffect(()=>(document.addEventListener(ef,d),()=>document.removeEventListener(ef,d)),[d]),w.useEffect(()=>{if(l.trigger){let e=L(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return qn(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,N.jsx)(Fr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,N.jsxs)(Rc,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,N.jsx)(vf,{children:r}),i?(0,N.jsx)(xn,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function bf(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}L(bf,`getExitSideFromRect`);function xf(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}L(xf,`getPaddedExitPoints`);function Sf(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}L(Sf,`getPointsFromRect`);function Cf(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}L(Cf,`isPointInPolygon`);function wf(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Tf(t)}L(wf,`getHull`);function Tf(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}L(Tf,`getHullPresorted`);var Ef=rf,Df=cf,Of=uf,kf=mf,Af=gf,jf=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Mf=ge,Nf=(e,t)=>n=>{if(t?.variants==null)return Mf(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=jf(t)||jf(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Mf(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Pf=Nf(`inline-flex items-center gap-1.5 whitespace-nowrap rounded border font-mono`,{variants:{tone:{neutral:`border-doom-border text-doom-dim`,blue:`border-doom-blue/40 text-doom-blue`,green:`border-doom-green/40 text-doom-green`,yellow:`border-doom-yellow/40 text-doom-yellow`,red:`border-doom-red/40 text-doom-red`,magenta:`border-doom-magenta/40 text-doom-magenta`,violet:`border-doom-violet/40 text-doom-violet`,cyan:`border-doom-cyan/40 text-doom-cyan`,orange:`border-doom-orange/40 text-doom-orange`,teal:`border-doom-teal/40 text-doom-teal`},size:{xs:`px-1.5 py-0.5 text-[8px] font-bold`,sm:`px-2 py-0.5 text-[10px]`,md:`px-2.5 py-1 text-[11px]`,lg:`px-3 py-1.5 text-[12px]`}},defaultVariants:{tone:`neutral`,size:`sm`}});function Ff({className:e,tone:t,size:n,asChild:r=!1,...i}){let a=r?Zt:`span`;return(0,N.jsx)(a,{"data-slot":`badge`,className:M(Pf({tone:t,size:n}),e),...i})}function If({className:e,label:t,...n}){let r=(0,N.jsx)(k,{"data-slot":`spinner`,"aria-hidden":!0,className:M(`h-3 w-3 animate-spin`,e),...n});return t===void 0?r:(0,N.jsxs)(`span`,{"data-slot":`spinner-status`,role:`status`,className:`inline-flex items-center`,children:[r,(0,N.jsx)(`span`,{className:`sr-only`,children:t})]})}var Lf=Nf(`inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-mono transition-[color,background-color,border-color,filter] outline-none focus-visible:ring-2 focus-visible:ring-doom-blue/50 disabled:pointer-events-none disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{primary:`bg-doom-blue font-bold text-doom-rail hover:brightness-110`,outline:`border border-doom-border text-doom-dim hover:border-doom-blue/50 hover:text-doom-hi`,ghost:`text-doom-dim hover:bg-doom-panel hover:text-doom-hi`,subtle:`bg-doom-panel text-doom-dim hover:bg-doom-deep hover:text-doom-hi`,danger:`bg-doom-red font-bold text-doom-rail hover:brightness-110`,"danger-outline":`border border-doom-edge-red bg-doom-tint-red font-bold text-doom-red hover:brightness-110`,success:`bg-doom-green font-bold text-doom-rail hover:brightness-110`,link:`text-doom-blue hover:underline`},size:{xs:`h-5 rounded px-1.5 text-[9px]`,sm:`h-6 px-2.5 text-[10px]`,md:`h-7 px-3 text-[11px]`,lg:`h-8 px-3.5 text-[12px]`,icon:`h-5 w-5 rounded p-0`,"icon-md":`h-7 w-7 p-0`,card:`h-auto w-full flex-col items-stretch justify-start gap-1 px-[11px] py-2.5 text-left whitespace-normal`}},defaultVariants:{variant:`outline`,size:`md`}});function R({className:e,variant:t,size:n,asChild:r=!1,loading:i=!1,loadingLabel:a,disabled:o,type:s,children:c,...l}){let u=r?Zt:`button`,d=!r&&i;return(0,N.jsx)(u,{"data-slot":`button`,type:r?void 0:s??`button`,"aria-busy":d?!0:void 0,disabled:r?void 0:o??d,className:M(Lf({variant:t,size:n}),e),...l,children:r?c:(0,N.jsxs)(N.Fragment,{children:[d?(0,N.jsx)(If,{label:a}):null,c]})})}function Rf(e){return(0,N.jsx)(Ra,{"data-slot":`dialog`,...e})}function zf(e){return(0,N.jsx)(Ha,{"data-slot":`dialog-portal`,...e})}function Bf({className:e,...t}){return(0,N.jsx)(Wa,{"data-slot":`dialog-overlay`,className:M(`fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade`,e),...t})}var Vf={sm:`w-[360px]`,md:`w-[480px]`,lg:`w-[620px]`};function Hf({className:e,children:t,width:n=`md`,...r}){return(0,N.jsxs)(zf,{children:[(0,N.jsx)(Bf,{}),(0,N.jsx)(Ja,{"data-slot":`dialog-content`,className:M(`fixed top-1/2 left-1/2 z-50 flex max-h-[85vh] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop`,Vf[n],e),...r,children:t})]})}function Uf({className:e,dismissible:t=!1,closeLabel:n=`close`,children:r,...i}){return(0,N.jsxs)(`div`,{"data-slot":`dialog-header`,className:M(`flex items-center justify-between gap-3 border-b border-doom-border px-4 py-3`,e),...i,children:[r,t?(0,N.jsx)(ro,{asChild:!0,children:(0,N.jsx)(R,{variant:`ghost`,size:`icon`,"aria-label":n,className:`text-doom-faint hover:text-doom-hi`,children:(0,N.jsx)(pe,{className:`h-3 w-3`})})}):null]})}function Wf({className:e,...t}){return(0,N.jsx)($a,{"data-slot":`dialog-title`,className:M(`text-[12px] font-bold tracking-wide text-doom-hi`,e),...t})}function Gf({className:e,...t}){return(0,N.jsx)(to,{"data-slot":`dialog-description`,className:M(`text-[11px] leading-relaxed text-doom-dim`,e),...t})}function Kf({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`dialog-body`,className:M(`flex min-h-0 flex-col gap-3 overflow-y-auto px-4 py-4`,e),...t})}var qf=Nf(`flex shrink-0 items-center gap-2`,{variants:{variant:{plain:`justify-end`,bar:`min-h-[34px] justify-between border-t border-doom-border-soft bg-doom-deep px-4`}},defaultVariants:{variant:`plain`}});function Jf({className:e,variant:t,...n}){return(0,N.jsx)(`div`,{"data-slot":`dialog-footer`,className:M(qf({variant:t}),e),...n})}var Yf=Nf(`inline-block shrink-0 rounded-full`,{variants:{tone:{neutral:`bg-doom-faint`,muted:`bg-doom-faint/40`,blue:`bg-doom-blue`,green:`bg-doom-green`,yellow:`bg-doom-yellow`,red:`bg-doom-red`,magenta:`bg-doom-magenta`,violet:`bg-doom-violet`,cyan:`bg-doom-cyan`,orange:`bg-doom-orange`,teal:`bg-doom-teal`},size:{xs:`h-1 w-1`,sm:`h-1.5 w-1.5`,md:`h-2 w-2`,lg:`h-2.5 w-2.5`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{tone:`neutral`,size:`sm`,pulse:!1}});function Xf({className:e,tone:t,size:n,pulse:r,...i}){return(0,N.jsx)(`span`,{"data-slot":`dot`,"aria-hidden":!0,className:M(Yf({tone:t,size:n,pulse:r}),e),...i})}function Zf(e){return(0,N.jsx)(Mu,{"data-slot":`dropdown-menu`,...e})}function Qf(e){return(0,N.jsx)(Nu,{"data-slot":`dropdown-menu-trigger`,...e})}var $f=`z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-doom-border bg-doom-panel py-1 font-mono shadow-xl outline-none data-[state=open]:animate-doom-rise`;function ep({className:e,align:t=`end`,sideOffset:n=4,...r}){return(0,N.jsx)(Pu,{children:(0,N.jsx)(Fu,{"data-slot":`dropdown-menu-content`,align:t,sideOffset:n,className:M($f,e),...r})})}var tp=Nf(`flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-[11px] outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-doom-deep`,{variants:{variant:{default:`text-doom-hi`,destructive:`text-doom-red`},indented:{true:`pl-7`,false:``}},defaultVariants:{variant:`default`,indented:!1}});function np({className:e,variant:t,indented:n,...r}){return(0,N.jsx)(Iu,{"data-slot":`dropdown-menu-item`,"data-variant":t??`default`,className:M(tp({variant:t,indented:n}),e),...r})}var rp=Nf(`min-w-0 font-mono text-doom-hi outline-none placeholder:text-doom-faint disabled:opacity-50 aria-invalid:border-doom-edge-red aria-invalid:text-doom-red`,{variants:{variant:{default:`rounded border border-doom-border bg-doom-deep transition-colors focus:border-doom-blue/60`,bare:`border-0 bg-transparent`},size:{xs:`px-1.5 py-0.5 text-[10px]`,sm:`px-2 py-1 text-[11px]`,md:`px-2.5 py-1.5 text-[12px]`,lg:`px-3 py-2 text-[13px]`}},compoundVariants:[{variant:`bare`,class:`p-0`}],defaultVariants:{variant:`default`,size:`md`}});function ip({className:e,type:t,variant:n,size:r,...i}){return(0,N.jsx)(`input`,{type:t??`text`,"data-slot":`input`,spellCheck:!1,className:M(rp({variant:n,size:r}),e),...i})}function ap(e,t){let{options:n,cursor:r,onCursorChange:i,onSelect:a}=t,o=n.length;if(o===0)return;if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation(),i((r+(e.key===`ArrowDown`?1:-1)+o)%o);return}if(e.key===`Enter`){let t=n[r];if(t===void 0)return;e.preventDefault(),e.stopPropagation(),a(t);return}let s=Number.parseInt(e.key,10)-1,c=Number.isInteger(s)&&s<9?n[s]:void 0;c!==void 0&&(e.preventDefault(),e.stopPropagation(),a(c))}function op(e){return e>9?`up/down move · enter select · 1-9 jump`:`1-9 select · enter confirm`}function sp(e){return e<9?String(e+1):`·`}var cp=Nf(`flex min-h-0 flex-1 flex-col overflow-y-auto`,{variants:{density:{compact:`gap-0.5 p-1.5`,comfortable:`gap-1.5`}},defaultVariants:{density:`comfortable`}}),lp=Nf(`flex shrink-0 cursor-pointer items-center text-left outline-none`,{variants:{density:{compact:`gap-2.5 rounded-[5px] px-2 py-[7px]`,comfortable:`min-h-[42px] gap-3 rounded-md border px-[11px] py-2 text-[12px] text-doom-text transition-colors`},active:{true:``,false:``}},compoundVariants:[{density:`compact`,active:!0,class:`bg-doom-tint-blue`},{density:`comfortable`,active:!0,class:`border-doom-edge-blue bg-doom-tint-blue`},{density:`comfortable`,active:!1,class:`border-doom-border-soft`}],defaultVariants:{density:`comfortable`,active:!1}}),up=Nf(`flex shrink-0 items-center justify-center rounded-full font-bold`,{variants:{density:{compact:`h-[15px] w-[15px] border border-doom-border text-[8px] text-doom-faint`,comfortable:`h-[18px] w-[18px] bg-doom-deep text-[10px] text-doom-dim`}},defaultVariants:{density:`comfortable`}});function dp({className:e,density:t,active:n,marker:r,children:i,...a}){return(0,N.jsxs)(`button`,{type:`button`,role:`option`,"data-slot":`option-row`,"aria-selected":n??!1,"data-cursor":n??!1,className:M(lp({density:t,active:n}),e),...a,children:[r===void 0?null:(0,N.jsx)(`span`,{className:up({density:t}),children:r}),i]})}function fp({className:e,density:t,...n}){return(0,N.jsx)(`span`,{"data-slot":`option-label`,className:M(`min-w-0 flex-1`,t===`compact`?`truncate text-[12px] text-doom-text`:`break-words`,e),...n})}function pp({className:e,options:t,cursor:n,onCursorChange:r,onSelect:i,testIdPrefix:a,density:o=`comfortable`,...s}){let c=(0,w.useRef)(null);return(0,w.useEffect)(()=>{c.current?.children[n]?.scrollIntoView({block:`nearest`})},[n]),(0,N.jsx)(`div`,{ref:c,role:`listbox`,"aria-label":`options`,"data-slot":`option-list`,"data-testid":`${a}s`,className:M(cp({density:o}),e),...s,children:t.map((e,t)=>(0,N.jsx)(dp,{density:o,active:t===n,marker:sp(t),"data-testid":`${a}-${String(t)}`,title:e,onMouseEnter:()=>r(t),onClick:()=>i(e),children:(0,N.jsx)(fp,{density:o,children:e})},e))})}function mp({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`command-header`,className:M(`flex shrink-0 items-center gap-2 border-b border-doom-border px-3 py-2.5`,e),...t})}function hp({className:e,...t}){return(0,N.jsx)(ip,{"data-slot":`command-input`,variant:`bare`,autoFocus:!0,autoComplete:`off`,className:M(`flex-1`,e),...t})}function gp({className:e,...t}){return(0,N.jsx)(`div`,{role:`listbox`,"data-slot":`command-list`,className:M(`flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-1.5`,e),...t})}function _p({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`command-group-label`,className:M(`px-2 pt-2 pb-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase`,e),...t})}function vp({density:e=`compact`,...t}){return(0,N.jsx)(dp,{"data-slot":`command-item`,density:e,...t})}function yp(e){return(0,N.jsx)(fp,{"data-slot":`command-item-label`,density:`compact`,...e})}function bp({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`command-empty`,className:M(`px-2 py-6 text-center text-[11px] text-doom-faint`,e),...t})}function xp({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`command-footer`,className:M(`flex min-h-[30px] shrink-0 items-center justify-between gap-3 border-t border-doom-border-soft bg-doom-deep px-3 text-[9px] text-doom-faint`,e),...t})}function Sp({title:e,description:t,children:n,className:r,asChild:i=!1,...a}){let o=i?Zt:`div`;return(0,N.jsx)(o,{"data-slot":`empty-state`,className:M(`flex flex-1 items-center justify-center`,r),...a,children:(0,N.jsxs)(`div`,{className:`flex w-[520px] max-w-full flex-col items-center gap-3 text-center`,children:[(0,N.jsx)(`span`,{className:`text-[14px] font-bold text-doom-hi`,children:e}),t?(0,N.jsx)(`span`,{className:`text-[11px] leading-relaxed text-doom-dim`,children:t}):null,n]})})}function Cp({className:e,...t}){return(0,N.jsx)(`kbd`,{"data-slot":`kbd`,className:M(`inline-flex items-center rounded bg-doom-deep px-1.5 py-0.5 font-mono text-[8px] font-bold text-doom-faint`,e),...t})}function wp(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Tp=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ep=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dp={};function Op(e,t){return((t||Dp).jsx?Ep:Tp).test(e)}var kp=/[ \t\n\f\r]/g;function Ap(e){return typeof e==`object`?e.type===`text`&&jp(e.value):jp(e)}function jp(e){return e.replace(kp,``)===``}var Mp=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Mp.prototype.normal={},Mp.prototype.property={},Mp.prototype.space=void 0;function Np(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Mp(n,r,t)}function Pp(e){return e.toLowerCase()}var Fp=class{constructor(e,t){this.attribute=t,this.property=e}};Fp.prototype.attribute=``,Fp.prototype.booleanish=!1,Fp.prototype.boolean=!1,Fp.prototype.commaOrSpaceSeparated=!1,Fp.prototype.commaSeparated=!1,Fp.prototype.defined=!1,Fp.prototype.mustUseProperty=!1,Fp.prototype.number=!1,Fp.prototype.overloadedBoolean=!1,Fp.prototype.property=``,Fp.prototype.spaceSeparated=!1,Fp.prototype.space=void 0;var Ip=s({boolean:()=>z,booleanish:()=>Rp,commaOrSpaceSeparated:()=>Hp,commaSeparated:()=>Vp,number:()=>B,overloadedBoolean:()=>zp,spaceSeparated:()=>Bp}),Lp=0,z=Up(),Rp=Up(),zp=Up(),B=Up(),Bp=Up(),Vp=Up(),Hp=Up();function Up(){return 2**++Lp}var Wp=Object.keys(Ip),Gp=class extends Fp{constructor(e,t,n,r){let i=-1;if(super(e,t),Kp(this,`space`,r),typeof n==`number`)for(;++i<Wp.length;){let e=Wp[i];Kp(this,Wp[i],(n&Ip[e])===Ip[e])}}};Gp.prototype.defined=!0;function Kp(e,t,n){n&&(e[t]=n)}function qp(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Gp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Pp(r)]=r,n[Pp(a.attribute)]=r}return new Mp(t,n,e.space)}var Jp=qp({properties:{ariaActiveDescendant:null,ariaAtomic:Rp,ariaAutoComplete:null,ariaBusy:Rp,ariaChecked:Rp,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:Bp,ariaCurrent:null,ariaDescribedBy:Bp,ariaDetails:null,ariaDisabled:Rp,ariaDropEffect:Bp,ariaErrorMessage:null,ariaExpanded:Rp,ariaFlowTo:Bp,ariaGrabbed:Rp,ariaHasPopup:null,ariaHidden:Rp,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Bp,ariaLevel:B,ariaLive:null,ariaModal:Rp,ariaMultiLine:Rp,ariaMultiSelectable:Rp,ariaOrientation:null,ariaOwns:Bp,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:Rp,ariaReadOnly:Rp,ariaRelevant:null,ariaRequired:Rp,ariaRoleDescription:Bp,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:Rp,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Yp(e,t){return t in e?e[t]:t}function Xp(e,t){return Yp(e,t.toLowerCase())}var Zp=qp({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Vp,acceptCharset:Bp,accessKey:Bp,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alpha:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:Bp,autoFocus:z,autoPlay:z,blocking:Bp,capture:null,charSet:null,checked:z,cite:null,className:Bp,closedBy:null,colorSpace:null,cols:B,colSpan:B,command:null,commandFor:null,content:null,contentEditable:Rp,controls:z,controlsList:Bp,coords:B|Vp,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:zp,draggable:Rp,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:Bp,height:B,hidden:zp,high:B,href:null,hrefLang:null,htmlFor:Bp,httpEquiv:Bp,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:Bp,itemRef:Bp,itemScope:z,itemType:Bp,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:z,optimum:B,pattern:null,ping:Bp,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:Bp,required:z,reversed:z,rows:B,rowSpan:B,sandbox:Bp,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootCustomElementRegistry:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shadowRootSerializable:z,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:Rp,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:Rp,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Bp,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:Rp,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:z,disablePictureInPicture:z,disableRemotePlayback:z,exportParts:Vp,part:Bp,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:Xp}),Qp=qp({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Hp,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:Bp,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Vp,g2:Vp,glyphName:Vp,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:Hp,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Bp,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hp,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hp,rev:Hp,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hp,requiredFeatures:Hp,requiredFonts:Hp,requiredFormats:Hp,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:Hp,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hp,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hp,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Yp}),$p=qp({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),em=qp({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Xp}),tm=qp({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),nm={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},rm=/[A-Z]/g,im=/-[a-z]/g,am=/^data[-\w.:]+$/i;function om(e,t){let n=Pp(t),r=t,i=Fp;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&am.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(im,cm);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!im.test(e)){let n=e.replace(rm,sm);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Gp}return new i(r,t)}function sm(e){return`-`+e.toLowerCase()}function cm(e){return e.charAt(1).toUpperCase()}var lm=Np([Jp,Zp,$p,em,tm],`html`),um=Np([Jp,Qp,$p,em,tm],`svg`);function dm(e){return e.join(` `).trim()}var fm=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
50
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),pm=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(fm());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),mm=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),hm=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(pm()),r=mm();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),gm=vm(`end`),_m=vm(`start`);function vm(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function ym(e){let t=_m(e),n=gm(e);if(t&&n)return{start:t,end:n}}function bm(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Sm(e.position):`start`in e||`end`in e?Sm(e):`line`in e||`column`in e?xm(e):``}function xm(e){return Cm(e&&e.line)+`:`+Cm(e&&e.column)}function Sm(e){return xm(e&&e.start)+`-`+xm(e&&e.end)}function Cm(e){return e&&typeof e==`number`?e:1}var wm=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=bm(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};wm.prototype.file=``,wm.prototype.name=``,wm.prototype.reason=``,wm.prototype.message=``,wm.prototype.stack=``,wm.prototype.column=void 0,wm.prototype.line=void 0,wm.prototype.ancestors=void 0,wm.prototype.cause=void 0,wm.prototype.fatal=void 0,wm.prototype.place=void 0,wm.prototype.ruleId=void 0,wm.prototype.source=void 0;var Tm=l(hm(),1),Em={}.hasOwnProperty,Dm=new Map,Om=/[A-Z]/g,km=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Am=new Set([`td`,`th`]),jm=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Mm(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Um(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Hm(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?um:lm,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nm(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nm(e,t,n){if(t.type===`element`)return Pm(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Fm(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Lm(e,t,n);if(t.type===`mdxjsEsm`)return Im(e,t);if(t.type===`root`)return Rm(e,t,n);if(t.type===`text`)return zm(e,t)}function Pm(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=um,e.schema=i),e.ancestors.push(t);let a=Ym(e,t.tagName,!1),o=Wm(e,t),s=Km(e,t);return km.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ap(e)})),Bm(e,o,a,t),Vm(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Fm(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Xm(e,t.position)}function Im(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xm(e,t.position)}function Lm(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=um,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ym(e,t.name,!0),o=Gm(e,t),s=Km(e,t);return Bm(e,o,a,t),Vm(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Rm(e,t,n){let r={};return Vm(r,Km(e,t)),e.create(t,e.Fragment,r,n)}function zm(e,t){return t.value}function Bm(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vm(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Hm(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Um(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_m(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Wm(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Em.call(t.properties,i)){let a=qm(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Am.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Gm(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Xm(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Xm(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Km(e,t){let n=[],r=-1,i=e.passKeys?new Map:Dm;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Nm(e,a,o);s!==void 0&&n.push(s)}return n}function qm(e,t,n){let r=om(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?wp(n):dm(n)),r.property===`style`){let t=typeof n==`object`?n:Jm(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Zm(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?nm[r.property]||r.property:r.attribute,n]}}function Jm(e,t){try{return(0,Tm.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new wm("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=jm+`#cannot-parse-style-attribute`,r}}function Ym(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Op(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Op(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Em.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xm(e)}function Xm(e,t){let n=new wm("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=jm+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Zm(e){let t={},n;for(n in e)Em.call(e,n)&&(t[Qm(n)]=e[n]);return t}function Qm(e){let t=e.replace(Om,$m);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function $m(e){return`-`+e.toLowerCase()}var eh={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},th={};function nh(e,t){let n=t||th;return rh(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function rh(e,t,n){if(ah(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return ih(e.children,t,n)}return Array.isArray(e)?ih(e,t,n):``}function ih(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rh(e[i],t,n);return r.join(``)}function ah(e){return!!(e&&typeof e==`object`)}var oh=document.createElement(`i`);function sh(e){let t=`&`+e+`;`;oh.innerHTML=t;let n=oh.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function ch(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function lh(e,t){return e.length>0?(ch(e,e.length,0,t),e):t}var uh={}.hasOwnProperty;function dh(e){let t={},n=-1;for(;++n<e.length;)fh(t,e[n]);return t}function fh(e,t){let n;for(n in t){let r=(uh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){uh.call(r,a)||(r[a]=[]);let e=i[a];ph(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ph(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ch(e,0,0,r)}function mh(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function hh(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var gh=Dh(/[A-Za-z]/),_h=Dh(/[\dA-Za-z]/),vh=Dh(/[#-'*+\--9=?A-Z^-~]/);function yh(e){return e!==null&&(e<32||e===127)}var bh=Dh(/\d/),xh=Dh(/[\dA-Fa-f]/),Sh=Dh(/[!-/:-@[-`{-~]/);function V(e){return e!==null&&e<-2}function Ch(e){return e!==null&&(e<0||e===32)}function wh(e){return e===-2||e===-1||e===32}var Th=Dh(/\p{P}|\p{S}/u),Eh=Dh(/\s/);function Dh(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Oh(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&_h(e.charCodeAt(n+1))&&_h(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function kh(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return wh(r)?(e.enter(n),s(r)):t(r)}function s(r){return wh(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Ah={tokenize:jh};function jh(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),kh(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return V(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Mh={tokenize:Ph},Nh={tokenize:Fh};function Ph(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return ch(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Nh,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Nh,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return V(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;ch(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Fh(e,t,n){return kh(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ih(e){if(e===null||Ch(e)||Eh(e))return 1;if(Th(e))return 2}function Lh(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Rh={name:`attention`,resolveAll:zh,tokenize:Bh};function zh(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Vh(d,-c),Vh(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=lh(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=lh(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=lh(l,Lh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=lh(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=lh(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,ch(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Bh(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ih(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Ih(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Vh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Hh={name:`autolink`,tokenize:Uh};function Uh(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return gh(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||_h(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||_h(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||yh(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):vh(t)?(e.consume(t),l):n(t)}function u(e){return _h(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||_h(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Wh={partial:!0,tokenize:Gh};function Gh(e,t,n){return r;function r(t){return wh(t)?kh(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||V(e)?t(e):n(e)}}var Kh={continuation:{tokenize:Jh},exit:Yh,name:`blockQuote`,tokenize:qh};function qh(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return wh(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Jh(e,t,n){let r=this;return i;function i(t){return wh(t)?kh(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Kh,t,n)(r)}}function Yh(e){e.exit(`blockQuote`)}var Xh={name:`characterEscape`,tokenize:Zh};function Zh(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Sh(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Qh={name:`characterReference`,tokenize:$h};function $h(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=_h,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=xh,u):(e.enter(`characterReferenceValue`),a=7,o=bh,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===_h&&!sh(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var eg={partial:!0,tokenize:rg},tg={concrete:!0,name:`codeFenced`,tokenize:ng};function ng(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),wh(t)?kh(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||V(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(eg,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):wh(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),kh(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||V(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&wh(t)?kh(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||V(t)?e.check(eg,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||V(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),wh(t)?kh(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),wh(t)?kh(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||V(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function rg(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var ig={name:`codeIndented`,tokenize:og},ag={partial:!0,tokenize:sg};function og(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),kh(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):V(t)?e.attempt(ag,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||V(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function sg(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):kh(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):V(e)?i(e):n(e)}}var cg={name:`codeText`,previous:ug,resolve:lg,tokenize:dg};function lg(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ug(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function dg(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||V(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var fg=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&pg(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),pg(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pg(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);pg(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);pg(this.left,t.reverse())}}}};function pg(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function mg(e){let t={},n=-1,r,i,a,o,s,c,l,u=new fg(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,hg(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ch(e,0,1/0,u.slice(0)),!l}function hg(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var gg={resolve:vg,tokenize:yg},_g={partial:!0,tokenize:bg};function vg(e){return mg(e),e}function yg(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):V(t)?e.check(_g,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function bg(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kh(e,a,`linePrefix`)}function a(i){if(i===null||V(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function xg(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||yh(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||V(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ch(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||yh(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Sg(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):V(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||V(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!wh(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Cg(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kh(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||V(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function wg(e,t){let n;return r;function r(i){return V(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):wh(i)?kh(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Tg={name:`definition`,tokenize:Dg},Eg={partial:!0,tokenize:Og};function Dg(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Sg.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=hh(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ch(t)?wg(e,l)(t):l(t)}function l(t){return xg(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Eg,d,d)(t)}function d(t){return wh(t)?kh(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||V(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Og(e,t,n){return r;function r(t){return Ch(t)?wg(e,i)(t):n(t)}function i(t){return Cg(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return wh(t)?kh(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||V(e)?t(e):n(e)}}var kg={name:`hardBreakEscape`,tokenize:Ag};function Ag(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return V(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var jg={name:`headingAtx`,resolve:Mg,tokenize:Ng};function Mg(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},ch(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ng(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ch(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||V(n)?(e.exit(`atxHeading`),t(n)):wh(n)?kh(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ch(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Pg=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Fg=[`pre`,`script`,`style`,`textarea`],Ig={concrete:!0,name:`htmlFlow`,resolveTo:zg,tokenize:Bg},Lg={partial:!0,tokenize:Hg},Rg={partial:!0,tokenize:Vg};function zg(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Bg(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:O):gh(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):gh(a)?(e.consume(a),i=4,r.interrupt?t:O):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:O):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return gh(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ch(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Fg.includes(l)?(i=1,r.interrupt?t(s):D(s)):Pg.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||_h(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return wh(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||gh(t)?(e.consume(t),b):wh(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||_h(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):wh(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):wh(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||V(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ch(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||wh(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||V(t)?D(t):wh(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),ae):t===62&&i===4?(e.consume(t),k):t===63&&i===3?(e.consume(t),O):t===93&&i===5?(e.consume(t),se):V(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Lg,ce,te)(t)):t===null||V(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(Rg,ne,ce)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||V(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),O):D(t)}function ae(t){return t===47?(e.consume(t),o=``,oe):D(t)}function oe(t){if(t===62){let n=o.toLowerCase();return Fg.includes(n)?(e.consume(t),k):D(t)}return gh(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),oe):D(t)}function se(t){return t===93?(e.consume(t),O):D(t)}function O(t){return t===62?(e.consume(t),k):t===45&&i===2?(e.consume(t),O):D(t)}function k(t){return t===null||V(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),k)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function Vg(e,t,n){let r=this;return i;function i(t){return V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Hg(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Wh,t,n)}}var Ug={name:`htmlText`,tokenize:Wg};function Wg(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):gh(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):gh(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):V(t)?(o=d,ae(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):V(t)?(o=h,ae(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):V(t)?(o=v,ae(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):V(t)?(o=y,ae(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return gh(t)?(e.consume(t),S):n(t)}function S(t){return t===45||_h(t)?(e.consume(t),S):C(t)}function C(t){return V(t)?(o=C,ae(t)):wh(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||_h(t)?(e.consume(t),w):t===47||t===62||Ch(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||gh(t)?(e.consume(t),E):V(t)?(o=T,ae(t)):wh(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||_h(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):V(t)?(o=ee,ae(t)):wh(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):V(t)?(o=D,ae(t)):wh(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):V(t)?(o=te,ae(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ch(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||Ch(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ae(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return wh(t)?kh(e,se,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):se(t)}function se(t){return e.enter(`htmlTextData`),o(t)}}var Gg={name:`labelEnd`,resolveAll:Yg,resolveTo:Xg,tokenize:Zg},Kg={tokenize:Qg},qg={tokenize:$g},Jg={tokenize:e_};function Yg(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ch(e,0,e.length,n),e}function Xg(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=lh(s,e.slice(a+1,a+r+3)),s=lh(s,[[`enter`,u,t]]),s=lh(s,Lh(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=lh(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=lh(s,e.slice(o+1)),s=lh(s,[[`exit`,c,t]]),ch(e,a,e.length,s),e}function Zg(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(hh(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Kg,u,o?u:d)(t):t===91?e.attempt(qg,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Jg,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Qg(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Ch(t)?wg(e,a)(t):a(t)}function a(t){return t===41?u(t):xg(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Ch(t)?wg(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Cg(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Ch(t)?wg(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $g(e,t,n){let r=this;return i;function i(t){return Sg.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(hh(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function e_(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var t_={name:`labelStartImage`,resolveAll:Gg.resolveAll,tokenize:n_};function n_(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var r_={name:`labelStartLink`,resolveAll:Gg.resolveAll,tokenize:i_};function i_(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var a_={name:`lineEnding`,tokenize:o_};function o_(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),kh(e,t,`linePrefix`)}}var s_={name:`thematicBreak`,tokenize:c_};function c_(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||V(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),wh(t)?kh(e,s,`whitespace`)(t):s(t))}}var l_={continuation:{tokenize:p_},exit:h_,name:`list`,tokenize:f_},u_={partial:!0,tokenize:g_},d_={partial:!0,tokenize:m_};function f_(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:bh(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(s_,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return bh(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Wh,r.interrupt?n:u,e.attempt(u_,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return wh(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function p_(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Wh,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kh(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!wh(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(d_,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,kh(e,e.attempt(l_,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function m_(e,t,n){let r=this;return kh(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function h_(e){e.exit(this.containerState.type)}function g_(e,t,n){let r=this;return kh(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!wh(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var __={name:`setextUnderline`,resolveTo:v_,tokenize:y_};function v_(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function y_(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),wh(t)?kh(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||V(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var b_={tokenize:x_};function x_(e){let t=this,n=e.attempt(Wh,r,e.attempt(this.parser.constructs.flowInitial,i,kh(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gg,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var S_={resolveAll:E_()},C_=T_(`string`),w_=T_(`text`);function T_(e){return{resolveAll:E_(e===`text`?D_:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function E_(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function D_(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var O_=s({attentionMarkers:()=>I_,contentInitial:()=>A_,disable:()=>L_,document:()=>k_,flow:()=>M_,flowInitial:()=>j_,insideSpan:()=>F_,string:()=>N_,text:()=>P_}),k_={42:l_,43:l_,45:l_,48:l_,49:l_,50:l_,51:l_,52:l_,53:l_,54:l_,55:l_,56:l_,57:l_,62:Kh},A_={91:Tg},j_={[-2]:ig,[-1]:ig,32:ig},M_={35:jg,42:s_,45:[__,s_],60:Ig,61:__,95:s_,96:tg,126:tg},N_={38:Qh,92:Xh},P_={[-5]:a_,[-4]:a_,[-3]:a_,33:t_,38:Qh,42:Rh,60:[Hh,Ug],91:r_,92:[kg,Xh],93:Gg,95:Rh,96:cg},F_={null:[Rh,S_]},I_={null:[42,95]},L_={null:[]};function R_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=lh(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Lh(a,l.events,l),l.events):[]}function f(e,t){return B_(p(e),t)}function p(e){return z_(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){V(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ch(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function z_(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function B_(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
51
+ `;break;case-3:o=`\r
52
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function V_(e){let t={constructs:dh([O_,...(e||{}).extensions||[]]),content:n(Ah),defined:[],document:n(Mh),flow:n(b_),lazy:{},string:n(C_),text:n(w_)};return t;function n(e){return n;function n(n){return R_(t,e,n)}}}function H_(e){for(;!mg(e););return e}var U_=/[\0\t\n\r]/g;function W_(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(U_.lastIndex=u,c=U_.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var G_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function K_(e){return e.replace(G_,q_)}function q_(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return mh(n.slice(t?2:1),t?16:10)}return sh(n)||e}var J_={}.hasOwnProperty;function Y_(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),X_(n)(H_(V_(n).document().write(W_()(e,t,!0))))}function X_(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Te),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(xe),blockQuote:a(ge),characterEscape:T,characterReference:T,codeFenced:a(_e),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(_e,o),codeText:a(ve,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ye),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(be),hardBreakEscape:a(Se),hardBreakTrailing:a(Se),htmlFlow:a(Ce,o),htmlFlowData:T,htmlText:a(Ce,o),htmlTextData:T,image:a(we),label:o,link:a(Te),listItem:a(De),listItemValue:f,listOrdered:a(Ee,d),listUnordered:a(Ee),paragraph:a(Oe),reference:le,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(xe),strong:a(ke),thematicBreak:a(je)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:he,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:fe,characterReference:pe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(ae),label:se,labelText:oe,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ue,resourceDestinationString:O,resourceTitleString:k,resource:ce,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Q_(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];J_.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ev).call(a,void 0,e[0])}for(r.position={start:Z_(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Z_(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Z_(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ev).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+bm({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Z_(e.end)}function u(){return nh(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hh(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ae(),n.position={start:Z_(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Z_(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Z_(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=K_(t),n.identifier=hh(t).toLowerCase()}function se(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function O(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ce(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function ue(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function de(e){this.data.characterReferenceType=e.type}function fe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=mh(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=sh(t);let i=this.stack[this.stack.length-1];i.value+=r}function pe(e){let t=this.stack.pop();t.position.end=Z_(e.end)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function he(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ge(){return{type:`blockquote`,children:[]}}function _e(){return{type:`code`,lang:null,meta:null,value:``}}function ve(){return{type:`inlineCode`,value:``}}function ye(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function be(){return{type:`emphasis`,children:[]}}function xe(){return{type:`heading`,depth:0,children:[]}}function Se(){return{type:`break`}}function Ce(){return{type:`html`,value:``}}function we(){return{type:`image`,title:null,url:``,alt:null}}function Te(){return{type:`link`,title:null,url:``,children:[]}}function Ee(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function De(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Oe(){return{type:`paragraph`,children:[]}}function ke(){return{type:`strong`,children:[]}}function Ae(){return{type:`text`,value:``}}function je(){return{type:`thematicBreak`}}}function Z_(e){return{line:e.line,column:e.column,offset:e.offset}}function Q_(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Q_(e,r):$_(e,r)}}function $_(e,t){let n;for(n in t)if(J_.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ev(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+bm({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bm({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+bm({start:t.start,end:t.end})+`) is still open`)}function tv(e){let t=this;t.parser=n;function n(n){return Y_(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function nv(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function rv(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
53
+ `}]}function iv(e,t){let n=t.value?t.value+`
54
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function av(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ov(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sv(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Oh(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function cv(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lv(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uv(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function dv(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uv(e,t);let i={src:Oh(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fv(e,t){let n={src:Oh(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function pv(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mv(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uv(e,t);let i={href:Oh(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hv(e,t){let n={href:Oh(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gv(e,t,n){let r=e.all(t),i=n?_v(n):vv(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
55
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
56
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function _v(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=vv(n[r])}return t}function vv(e){return e.spread??e.children.length>1}function yv(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function bv(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xv(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Sv(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cv(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=_m(t.children[1]),o=gm(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function wv(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Tv(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ev=9,Dv=32;function Ov(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(kv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(kv(t.slice(i),i>0,!1)),a.join(``)}function kv(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ev||t===Dv;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ev||t===Dv;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Av(e,t){let n={type:`text`,value:Ov(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jv(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Mv={blockquote:nv,break:rv,code:iv,delete:av,emphasis:ov,footnoteReference:sv,heading:cv,html:lv,imageReference:dv,image:fv,inlineCode:pv,linkReference:mv,link:hv,listItem:gv,list:yv,paragraph:bv,root:xv,strong:Sv,table:Cv,tableCell:Tv,tableRow:wv,text:Av,thematicBreak:jv,toml:Nv,yaml:Nv,definition:Nv,footnoteDefinition:Nv};function Nv(){}var Pv=typeof self==`object`?self:globalThis,Fv=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Pv[e](t)},Iv=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Pv[e]==`function`?Fv(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(Fv(a,o),i)};return r},Lv=e=>Iv(new Map,e)(0),Rv=``,{toString:zv}={},{keys:Bv}=Object,Vv=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=zv.call(e).slice(8,-1);switch(n){case`Array`:return[1,Rv];case`Object`:return[2,Rv];case`Date`:return[3,Rv];case`RegExp`:return[4,Rv];case`Map`:return[5,Rv];case`Set`:return[6,Rv];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Hv=([e,t])=>e===0&&(t===`function`||t===`symbol`),Uv=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Vv(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Bv(r))(e||!Hv(Vv(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?Rv:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Hv(Vv(n))||Hv(Vv(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Hv(Vv(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Wv=(e,{json:t,lossy:n}={})=>{let r=[];return Uv(!(t||n),!!t,new Map,r)(e),r},Gv=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Lv(Wv(e,t)):structuredClone(e):(e,t)=>Lv(Wv(e,t));function Kv(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function qv(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Jv(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Kv,r=e.options.footnoteBackLabel||qv,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Oh(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Gv(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
57
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
58
+ `}]}}var Yv=(function(e){if(e==null)return ey;if(typeof e==`function`)return $v(e);if(typeof e==`object`)return Array.isArray(e)?Xv(e):Zv(e);if(typeof e==`string`)return Qv(e);throw Error(`Expected function, string, or object as test`)});function Xv(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Yv(e[n]);return $v(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Zv(e){let t=e;return $v(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Qv(e){return $v(t);function t(t){return t&&t.type===e}}function $v(e){return t;function t(t,n,r){return!!(ty(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ey(){return!0}function ty(e){return typeof e==`object`&&!!e&&`type`in e}function ny(e){return e}var ry=[];function iy(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Yv(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+ny(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=ry,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=ay(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function ay(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ry:[e]}function oy(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),iy(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var sy={}.hasOwnProperty,cy={};function ly(e,t){let n=t||cy,r=new Map,i=new Map,a={all:s,applyData:dy,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Mv,...n.handlers},one:o,options:n,patch:uy,wrap:py};return oy(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(sy.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Gv(n);return r.children=a.all(e),r}return Gv(e)}return(a.options.unknownHandler||fy)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=my(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=my(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function uy(e,t){e.position&&(t.position=ym(e))}function dy(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Gv(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function fy(e,t){let n=t.data||{},r=`value`in t&&!(sy.call(n,`hProperties`)||sy.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function py(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
59
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
60
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
61
+ `}),n}function my(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function hy(e,t){let n=ly(e,t),r=n.one(e,void 0),i=Jv(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
62
+ `},i)),a}function gy(e,t){return e&&`run`in e?async function(n,r){let i=hy(n,{file:r,...t});await e.run(i,r)}:function(n,r){return hy(n,{file:r,...e||t})}}function _y(e){if(e)throw e}var vy=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function yy(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function by(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?xy(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function xy(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Sy={basename:Cy,dirname:wy,extname:Ty,join:Ey,sep:`/`};function Cy(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);ky(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function wy(e){if(ky(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Ty(e){ky(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Ey(...e){let t=-1,n;for(;++t<e.length;)ky(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Dy(n)}function Dy(e){ky(e);let t=e.codePointAt(0)===47,n=Oy(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Oy(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function ky(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Ay={cwd:jy};function jy(){return`/`}function My(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ny(e){if(typeof e==`string`)e=new URL(e);else if(!My(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Py(e)}function Py(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Fy=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Iy=class{constructor(e){let t;t=e?My(e)?{path:e}:typeof e==`string`||By(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Ay.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Fy.length;){let e=Fy[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Fy.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Sy.basename(this.path):void 0}set basename(e){Ry(e,`basename`),Ly(e,`basename`),this.path=Sy.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Sy.dirname(this.path):void 0}set dirname(e){zy(this.basename,`dirname`),this.path=Sy.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Sy.extname(this.path):void 0}set extname(e){if(Ly(e,`extname`),zy(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Sy.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){My(e)&&(e=Ny(e)),Ry(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Sy.basename(this.path,this.extname):void 0}set stem(e){Ry(e,`stem`),Ly(e,`stem`),this.path=Sy.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new wm(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Ly(e,t){if(e&&e.includes(Sy.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Sy.sep+"`")}function Ry(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function zy(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function By(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Vy=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Hy=l(vy(),1),Uy={}.hasOwnProperty,Wy=new class e extends Vy{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=by()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Hy.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(qy(`data`,this.frozen),this.namespace[e]=t,this):Uy.call(this.namespace,e)&&this.namespace[e]||void 0:e?(qy(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Xy(e),n=this.parser||this.Parser;return Gy(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Gy(`process`,this.parser||this.Parser),Ky(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Xy(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Qy(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Gy(`processSync`,this.parser||this.Parser),Ky(`processSync`,this.compiler||this.Compiler),this.process(e,r),Yy(`processSync`,`process`,t),n;function r(e,r){t=!0,_y(e),n=r}}run(e,t,n){Jy(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Xy(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Yy(`runSync`,`run`,n),r;function i(e,t){_y(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Xy(t),r=this.compiler||this.Compiler;return Ky(`stringify`,r),Jy(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(qy(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Hy.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];yy(o)&&yy(r)&&(r=(0,Hy.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Gy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Ky(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function qy(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Jy(e){if(!yy(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Yy(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xy(e){return Zy(e)?e:new Iy(e)}function Zy(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Qy(e){return typeof e==`string`||$y(e)}function $y(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var eb=[],tb={allowDangerousHtml:!0},nb=/^(https?|ircs?|mailto|xmpp)$/i,rb=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function ib(e){let t=ab(e),n=ob(e);return sb(t.runSync(t.parse(n),n),e)}function ab(e){let t=e.rehypePlugins||eb,n=e.remarkPlugins||eb,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...tb}:tb;return Wy().use(tv).use(n).use(gy,r).use(t)}function ob(e){let t=e.children||``,n=new Iy;return typeof t==`string`?n.value=t:``+t,n}function sb(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||cb;for(let e of rb)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return oy(e,l),Mm(e,{Fragment:N.Fragment,components:i,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in eh)if(Object.hasOwn(eh,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eh[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function cb(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||nb.test(e.slice(0,t))?e:``}function lb(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ub(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function db(e,t,n){let r=Yv((n||{}).ignore||[]),i=fb(t),a=-1;for(;++a<i.length;)iy(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function fb(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([pb(e[0]),mb(e[1])])}return t}function pb(e){return typeof e==`string`?new RegExp(ub(e),`g`):e}function mb(e){return typeof e==`function`?e:function(){return e}}var hb=`phrasing`,gb=[`autolink`,`link`,`image`,`label`];function _b(){return{transforms:[Tb],enter:{literalAutolink:yb,literalAutolinkEmail:bb,literalAutolinkHttp:bb,literalAutolinkWww:bb},exit:{literalAutolink:wb,literalAutolinkEmail:Cb,literalAutolinkHttp:xb,literalAutolinkWww:Sb}}}function vb(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:hb,notInConstruct:gb},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:hb,notInConstruct:gb},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:hb,notInConstruct:gb}]}}function yb(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function bb(e){this.config.enter.autolinkProtocol.call(this,e)}function xb(e){this.config.exit.autolinkProtocol.call(this,e)}function Sb(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Cb(e){this.config.exit.autolinkEmail.call(this,e)}function wb(e){this.exit(e)}function Tb(e){db(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Eb],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Db]],{ignore:[`link`,`linkReference`]})}function Eb(e,t,n,r,i){let a=``;if(!Ab(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Ob(n)))return!1;let o=kb(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Db(e,t,n,r){return!Ab(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Ob(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function kb(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=lb(e,`(`),a=lb(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Ab(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Eh(n)||Th(n))&&(!t||n!==47)}Bb.peek=zb;function jb(){this.buffer()}function Mb(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Nb(){this.buffer()}function Pb(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Fb(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ib(e){this.exit(e)}function Lb(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Rb(e){this.exit(e)}function zb(){return`[`}function Bb(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Vb(){return{enter:{gfmFootnoteCallString:jb,gfmFootnoteCall:Mb,gfmFootnoteDefinitionLabelString:Nb,gfmFootnoteDefinition:Pb},exit:{gfmFootnoteCallString:Fb,gfmFootnoteCall:Ib,gfmFootnoteDefinitionLabelString:Lb,gfmFootnoteDefinition:Rb}}}function Hb(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Bb},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
63
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Wb:Ub))),s(),o}}function Ub(e,t,n){return t===0?e:Wb(e,t,n)}function Wb(e,t,n){return(n?``:` `)+e}var Gb=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Xb.peek=Zb;function Kb(){return{canContainEols:[`delete`],enter:{strikethrough:Jb},exit:{strikethrough:Yb}}}function qb(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Gb}],handlers:{delete:Xb}}}function Jb(e){this.enter({type:`delete`,children:[]},e)}function Yb(e){this.exit(e)}function Xb(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Zb(){return`~`}function Qb(e){return e.length}function $b(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Qb,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=ex(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=tx(r[d]);else{let e=tx(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
64
+ `)}function ex(e){return e==null?``:String(e)}function tx(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function nx(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),rx);return i(),o}function rx(e,t,n){return`>`+(n?``:` `)+e}function ix(e,t){return ax(e,t.inConstruct,!0)&&!ax(e,t.notInConstruct,!1)}function ax(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ox(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
65
+ `&&ix(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
66
+ `}function sx(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function cx(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function lx(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ux(e,t,n,r){let i=lx(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(cx(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,dx);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(sx(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
67
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
68
+ `),a&&(u+=s.move(a+`
69
+ `)),u+=s.move(c),l(),u}function dx(e,t,n){return(n?``:` `)+e}function fx(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function px(e,t,n,r){let i=fx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
70
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function mx(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function hx(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function gx(e,t,n){let r=Ih(e),i=Ih(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}_x.peek=vx;function _x(e,t,n,r){let i=mx(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=gx(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=hx(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=gx(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+hx(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function vx(e,t,n){return n.options.emphasis||`*`}function yx(e,t){let n=!1;return oy(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&nh(e)&&(t.options.setext||n))}function bx(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(yx(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
71
+ `,after:`
72
+ `});return r(),t(),o+`
73
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
74
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
75
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=hx(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}xx.peek=Sx;function xx(e){return e.value||``}function Sx(){return`<`}Cx.peek=wx;function Cx(e,t,n,r){let i=fx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function wx(){return`!`}Tx.peek=Ex;function Tx(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ex(){return`!`}Dx.peek=Ox;function Dx(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Ox(){return"`"}function kx(e,t){let n=nh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ax.peek=jx;function Ax(e,t,n,r){let i=fx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(kx(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function jx(e,t,n){return kx(e,n)?`<`:`[`}Mx.peek=Nx;function Mx(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Nx(){return`[`}function Px(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Fx(e){let t=Px(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Ix(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Lx(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Rx(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Ix(n):Px(n),s=e.ordered?o===`.`?`)`:`.`:Fx(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Lx(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function zx(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Bx(e,t,n,r){let i=zx(n),a=n.bulletCurrent||Px(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Vx(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Hx=Yv([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Ux(e,t,n,r){return(e.children.some(function(e){return Hx(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Wx(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gx.peek=Kx;function Gx(e,t,n,r){let i=Wx(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=gx(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=hx(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=gx(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+hx(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Kx(e,t,n){return n.options.strong||`*`}function qx(e,t,n,r){return n.safe(e.value,r)}function Jx(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Yx(e,t,n){let r=(Lx(n)+(n.options.ruleSpaces?` `:``)).repeat(Jx(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Xx={blockquote:nx,break:ox,code:ux,definition:px,emphasis:_x,hardBreak:ox,heading:bx,html:xx,image:Cx,imageReference:Tx,inlineCode:Dx,link:Ax,linkReference:Mx,list:Rx,listItem:Bx,paragraph:Vx,root:Ux,strong:Gx,text:qx,thematicBreak:Yx};function Zx(){return{enter:{table:Qx,tableData:nS,tableHeader:nS,tableRow:eS},exit:{codeText:rS,table:$x,tableData:tS,tableHeader:tS,tableRow:tS}}}function Qx(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function $x(e){this.exit(e),this.data.inTable=void 0}function eS(e){this.enter({type:`tableRow`,children:[]},e)}function tS(e){this.exit(e)}function nS(e){this.enter({type:`tableCell`,children:[]},e)}function rS(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,iS));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function iS(e,t){return t===`|`?t:e}function aS(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
76
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
77
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return $b(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Xx.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function oS(){return{exit:{taskListCheckValueChecked:cS,taskListCheckValueUnchecked:cS,paragraph:lS}}}function sS(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:uS}}}function cS(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function lS(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function uS(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Xx.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function dS(){return[_b(),Vb(),Kb(),Zx(),oS()]}function fS(e){return{extensions:[vb(),Hb(e),qb(),aS(e),sS()]}}var pS={tokenize:DS,partial:!0},mS={tokenize:OS,partial:!0},hS={tokenize:kS,partial:!0},gS={tokenize:AS,partial:!0},_S={tokenize:jS,partial:!0},vS={name:`wwwAutolink`,tokenize:TS,previous:MS},yS={name:`protocolAutolink`,tokenize:ES,previous:NS},bS={name:`emailAutolink`,tokenize:wS,previous:PS},xS={};function SS(){return{text:xS}}for(var CS=48;CS<123;)xS[CS]=bS,CS++,CS===58?CS=65:CS===91&&(CS=97);xS[43]=bS,xS[45]=bS,xS[46]=bS,xS[95]=bS,xS[72]=[bS,yS],xS[104]=[bS,yS],xS[87]=[bS,vS],xS[119]=[bS,vS];function wS(e,t,n){let r=this,i,a;return o;function o(t){return!FS(t)||!PS.call(r,r.previous)||IS(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return FS(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(_S,u,l)(t):t===45||t===95||_h(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&gh(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function TS(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!MS.call(r,r.previous)||IS(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(pS,e.attempt(mS,e.attempt(hS,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function ES(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&NS.call(r,r.previous)&&!IS(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(gh(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||yh(t)||Ch(t)||Eh(t)||Th(t)?n(t):e.attempt(mS,e.attempt(hS,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function DS(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function OS(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(gS,c,s)(t):t===null||Ch(t)||Eh(t)||t!==45&&Th(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function kS(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(gS,t,a)(o):o===null||Ch(o)||Eh(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function AS(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ch(o)||Eh(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Ch(e)||Eh(e)?t(e):r(e)}function a(e){return gh(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):gh(t)?(e.consume(t),o):n(t)}}function jS(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return _h(e)?n(e):t(e)}}function MS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ch(e)}function NS(e){return!gh(e)}function PS(e){return!(e===47||FS(e))}function FS(e){return e===43||e===45||e===46||e===95||_h(e)}function IS(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var LS={tokenize:GS,partial:!0};function RS(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:HS,continuation:{tokenize:US},exit:WS}},text:{91:{name:`gfmFootnoteCall`,tokenize:VS},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:zS,resolveTo:BS}}}}function zS(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=hh(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function BS(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function VS(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Ch(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(hh(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ch(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function HS(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Ch(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=hh(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ch(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),kh(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function US(e,t,n){return e.check(Wh,t,e.attempt(LS,t,n))}function WS(e){e.exit(`gfmFootnoteDefinition`)}function GS(e,t,n){let r=this;return kh(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function KS(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ch(o,o.length,0,Lh(s,e.slice(r+1,n),t)),ch(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ch(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Ih(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ih(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var qS=class{constructor(){this.map=[]}add(e,t,n){JS(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function JS(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function YS(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function XS(){return{flow:{null:{name:`table`,tokenize:ZS,resolveAll:QS}}}}function ZS(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):V(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):wh(t)?kh(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Ch(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,wh(t)?kh(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return wh(t)?kh(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||V(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return wh(t)?kh(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||V(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||V(n)?(e.exit(`tableRow`),t(n)):wh(n)?kh(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Ch(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function QS(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new qS;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(eC(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=$S(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=$S(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=$S(f,t,o,i,n,d)):(o[0]=o[1],d=$S(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&eC(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=YS(t.events,n))}return e}function $S(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},tC(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=tC(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=tC(t.events,n[2]),a=tC(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},tC(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function eC(e,t,n,r,i){let a=[],o=tC(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function tC(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var nC={name:`tasklistCheck`,tokenize:iC};function rC(){return{text:{91:nC}}}function iC(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Ch(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return V(r)?t(r):wh(r)?e.check({tokenize:aC},t,n)(r):n(r)}}function aC(e,t,n){return kh(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function oC(e){return dh([SS(),RS(),KS(e),XS(),rC()])}var sC={};function cC(e){let t=this,n=e||sC,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(oC(n)),a.push(dS()),o.push(fS(n))}var lC=[cC];function uC({className:e,children:t,...n}){return(0,N.jsx)(`code`,{...n,className:`${e??``} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`,children:t})}var dC={p:({children:e})=>(0,N.jsx)(`p`,{className:`whitespace-pre-wrap break-words`,children:e}),strong:({children:e})=>(0,N.jsx)(`strong`,{className:`font-bold text-doom-hi`,children:e}),em:({children:e})=>(0,N.jsx)(`em`,{className:`italic`,children:e}),del:({children:e})=>(0,N.jsx)(`del`,{className:`text-doom-dim line-through`,children:e}),a:({href:e,children:t})=>(0,N.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-doom-blue underline decoration-doom-blue/50`,children:t}),code:uC,pre:({children:e})=>(0,N.jsx)(`pre`,{className:`overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed`,children:e}),ul:({children:e})=>(0,N.jsx)(`ul`,{className:`list-disc pl-5`,children:e}),ol:({children:e})=>(0,N.jsx)(`ol`,{className:`list-decimal pl-5`,children:e}),li:({children:e})=>(0,N.jsx)(`li`,{className:`whitespace-pre-wrap break-words`,children:e}),h1:({children:e})=>(0,N.jsx)(`h1`,{className:`text-[15px] font-bold text-doom-hi`,children:e}),h2:({children:e})=>(0,N.jsx)(`h2`,{className:`text-[14px] font-bold text-doom-hi`,children:e}),h3:({children:e})=>(0,N.jsx)(`h3`,{className:`text-[13px] font-bold text-doom-hi`,children:e}),h4:({children:e})=>(0,N.jsx)(`h4`,{className:`text-[13px] font-bold text-doom-text`,children:e}),blockquote:({children:e})=>(0,N.jsx)(`blockquote`,{className:`border-l-2 border-doom-border pl-3 text-doom-dim`,children:e}),hr:()=>(0,N.jsx)(`hr`,{className:`border-doom-border-soft`}),table:({children:e})=>(0,N.jsx)(`div`,{className:`overflow-x-auto`,children:(0,N.jsx)(`table`,{className:`border-collapse text-[12px]`,children:e})}),th:({children:e})=>(0,N.jsx)(`th`,{className:`border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi`,children:e}),td:({children:e})=>(0,N.jsx)(`td`,{className:`border border-doom-border px-2 py-1 align-top`,children:e}),img:({src:e,alt:t})=>(0,N.jsx)(`img`,{src:e,alt:t??``,className:`max-h-[480px] max-w-full rounded border border-doom-border`})};function fC({text:e}){return(0,N.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:(0,N.jsx)(ib,{remarkPlugins:lC,components:dC,children:e})})}var pC=Nf(`inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-[3px] font-mono font-bold uppercase`,{variants:{tone:{neutral:`bg-doom-panel text-doom-faint`,running:`bg-doom-tint-yellow text-doom-yellow`,ok:`bg-doom-tint-green text-doom-green`,error:`bg-doom-tint-red text-doom-red`,info:`bg-doom-tint-blue text-doom-blue`,accent:`bg-doom-tint-magenta text-doom-magenta`},size:{xs:`px-1.5 py-0.5 text-[8px]`,sm:`px-[7px] py-[3px] text-[9px]`,md:`h-[21px] px-2 text-[10px] normal-case`,lg:`h-6 px-2.5 text-[11px] normal-case`}},defaultVariants:{tone:`neutral`,size:`sm`}}),mC={neutral:`border-doom-border`,running:`border-doom-edge-yellow`,ok:`border-doom-edge-green`,error:`border-doom-edge-red`,info:`border-doom-edge-blue`,accent:`border-doom-edge-magenta`};function hC({className:e,tone:t,size:n,asChild:r=!1,...i}){let a=r?Zt:`span`;return(0,N.jsx)(a,{"data-slot":`status-badge`,className:M(pC({tone:t,size:n}),e),...i})}var gC=(0,w.createContext)({tone:`neutral`,expandable:!1,expanded:!1,toggle:()=>void 0});function _C(){return(0,w.useContext)(gC)}var vC=Nf(`overflow-hidden rounded-md border bg-doom-panel transition-colors`,{variants:{tone:mC},defaultVariants:{tone:`neutral`}});function yC({className:e,tone:t,expandable:n=!1,defaultExpanded:r=!1,expanded:i,onExpandedChange:a,children:o,...s}){let[c,l]=(0,w.useState)(r),u=i??c,d={tone:t??`neutral`,expandable:n,expanded:u,toggle:()=>{let e=!u;i===void 0&&l(e),a?.(e)}};return(0,N.jsx)(gC.Provider,{value:d,children:(0,N.jsx)(`div`,{"data-slot":`message-item`,"data-expanded":u,className:M(vC({tone:t}),e),...s,children:typeof o==`function`?o(d):o})})}var bC={neutral:``,running:`RUNNING`,ok:`OK`,error:`ERROR`,info:`INFO`,accent:`NOTE`};function xC({className:e,title:t,badge:n,children:r,...i}){let{tone:a,expandable:o,expanded:s,toggle:c}=_C(),l=n===void 0?bC[a]:n;return(0,N.jsxs)(`div`,{"data-slot":`message-item-header`,className:M(`flex min-h-8 items-center gap-2 px-[11px] text-[11px] text-doom-dim`,e),...i,children:[(0,N.jsx)(`span`,{className:`shrink-0 font-bold text-doom-hi`,children:t}),(0,N.jsx)(`div`,{"data-slot":`message-item-summary`,className:`flex min-w-0 flex-1 items-center gap-2`,children:r}),l!==null&&l!==``?(0,N.jsx)(hC,{tone:a,"data-testid":`tool-status`,children:l}):null,o?(0,N.jsx)(R,{variant:`ghost`,size:`icon`,"data-testid":`tool-expand`,"aria-expanded":s,"aria-label":s?`collapse`:`expand`,onClick:c,className:`text-doom-faint hover:text-doom-blue`,children:(0,N.jsx)(s?ie:re,{className:`h-3 w-3`})}):null]})}function SC({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`message-item-body`,className:M(`border-t border-doom-border-soft bg-doom-deep px-3 py-2 text-[11px] text-doom-dim`,e),...t})}var CC={neutral:`…`,running:`◐`,ok:`✓`,error:`✗`,info:`●`,accent:`●`},wC=Nf(`shrink-0`,{variants:{tone:{neutral:`text-doom-faint`,running:`text-doom-yellow`,ok:`text-doom-green`,error:`text-doom-red`,info:`text-doom-blue`,accent:`text-doom-magenta`}},defaultVariants:{tone:`neutral`}});function TC({className:e,tone:t,glyph:n,expands:r=!1,children:i,...a}){let{toggle:o}=_C(),s=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`span`,{className:wC({tone:t}),children:n??CC[t??`neutral`]}),(0,N.jsx)(`span`,{children:i})]});return r?(0,N.jsx)(`button`,{type:`button`,"data-slot":`message-item-status`,"data-testid":`tool-more`,onClick:o,className:M(`flex cursor-pointer items-center gap-1.5 text-doom-faint hover:text-doom-blue`,e),children:s}):(0,N.jsx)(`span`,{"data-slot":`message-item-status`,className:M(`flex items-center gap-1.5 text-doom-faint`,e),...a,children:s})}function EC({className:e,asChild:t=!1,...n}){let r=t?Zt:`div`;return(0,N.jsx)(r,{"data-slot":`panel`,className:M(`overflow-hidden rounded-md border border-doom-border bg-doom-panel`,e),...n})}function DC(e){return(0,N.jsx)(sd,{"data-slot":`popover`,...e})}function OC(e){return(0,N.jsx)(ld,{"data-slot":`popover-trigger`,...e})}function kC(e){return(0,N.jsx)(cd,{"data-slot":`popover-anchor`,...e})}function AC({className:e,align:t=`start`,sideOffset:n=6,...r}){return(0,N.jsx)(ud,{children:(0,N.jsx)(dd,{"data-slot":`popover-content`,align:t,sideOffset:n,className:M(`z-50 flex flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-rise`,e),...r})})}function jC({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`popover-header`,className:M(`flex h-[34px] shrink-0 items-center justify-between gap-3 border-b border-doom-border-soft bg-doom-deep px-3`,e),...t})}function MC({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`popover-footer`,className:M(`flex min-h-[30px] shrink-0 items-center justify-between gap-3 border-t border-doom-border-soft bg-doom-deep px-3 text-[9px] text-doom-faint`,e),...t})}function NC({className:e,...t}){return(0,N.jsx)(Pd,{"data-slot":`radio-group`,className:M(`flex flex-col gap-2`,e),...t})}function PC({className:e,...t}){return(0,N.jsx)(zd,{"data-slot":`radio-group-card`,className:M(`cursor-pointer rounded-md border border-doom-border bg-doom-panel p-2 text-left outline-none transition-colors hover:border-doom-blue/50 focus-visible:ring-2 focus-visible:ring-doom-blue/50 data-[state=checked]:border-doom-blue data-[state=checked]:bg-doom-tint-blue`,e),...t})}function FC({className:e,...t}){return(0,N.jsx)(`span`,{"data-slot":`section-label`,className:M(`font-mono text-[9px] font-bold tracking-[0.18em] text-doom-faint uppercase`,e),...t})}function IC({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,N.jsx)(qd,{"data-slot":`separator`,orientation:t,decorative:n,className:M(`shrink-0 bg-doom-border-soft`,t===`vertical`?`h-full w-px`:`h-px w-full`,e),...r})}function LC({className:e,...t}){return(0,N.jsx)(`span`,{"data-slot":`stream-cursor`,"aria-hidden":!0,className:M(`ml-0.5 inline-block h-3.5 w-2 translate-y-0.5 animate-doom-blink bg-doom-blue`,e),...t})}var RC=Nf(`flex cursor-pointer items-center gap-1.5 rounded px-2 py-1 text-[10px] transition-colors outline-none`,{variants:{active:{true:`bg-doom-tint-blue font-bold text-doom-blue`,false:`text-doom-dim hover:bg-doom-panel hover:text-doom-hi`}},defaultVariants:{active:!1}}),zC=Nf(`flex h-[15px] min-w-[15px] items-center justify-center rounded-full px-1 text-[8px] font-bold`,{variants:{active:{true:`bg-doom-blue text-doom-rail`,false:`bg-doom-panel text-doom-dim`}},defaultVariants:{active:!1}});function BC({className:e,active:t,asChild:n=!1,...r}){let i=n?Zt:`a`;return(0,N.jsx)(i,{"data-slot":`nav-tab`,"data-active":t??!1,className:M(RC({active:t}),e),...r})}function VC({className:e,active:t,...n}){return(0,N.jsx)(`span`,{"data-slot":`nav-tab-badge`,className:M(zC({active:t}),e),...n})}function HC({className:e,variant:t,size:n,...r}){return(0,N.jsx)(`textarea`,{"data-slot":`textarea`,className:M(`resize-none`,rp({variant:t,size:n}),e),...r})}function UC(e,t,n){return n||e.length<=t?{shown:[...e],hidden:0}:{shown:e.slice(0,t),hidden:e.length-t}}var WC=[`blue`,`green`,`yellow`,`red`,`magenta`,`violet`,`cyan`,`orange`,`teal`];[...WC],[...WC];function GC({delayDuration:e=300,...t}){return(0,N.jsx)(Ef,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function KC(e){return(0,N.jsx)(Df,{"data-slot":`tooltip`,...e})}function qC(e){return(0,N.jsx)(Of,{"data-slot":`tooltip-trigger`,...e})}function JC({className:e,sideOffset:t=4,children:n,...r}){return(0,N.jsx)(kf,{children:(0,N.jsx)(Af,{"data-slot":`tooltip-content`,sideOffset:t,className:M(`z-50 rounded border border-doom-border bg-doom-deep px-2 py-1 font-mono text-[10px] text-doom-text shadow-lg data-[state=delayed-open]:animate-doom-fade`,e),...r,children:n})})}var YC=w.useLayoutEffect;function XC(e,t,n){w.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function ZC(e){let t=w.useRef(null);return w.useImperativeHandle(e,()=>t.current,[]),t}function QC(e){return e[e.length-1]}function $C(e,t){return typeof e==`function`?e(t):e}var ew=Object.prototype.hasOwnProperty,tw=Object.prototype.propertyIsEnumerable;function nw(e){for(let t in e)if(ew.call(e,t))return!0;return!1}var rw=()=>Object.create(null),iw=(e,t)=>aw(e,t,rw);function aw(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=lw(e)&&lw(i);if(!a&&!(sw(e)&&sw(i)))return i;let o=a?e:ow(e);if(!o)return i;let s=a?i:ow(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:ew.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=aw(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function ow(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!tw.call(e,r))return!1;t.push(r)}return t}function sw(e){if(!cw(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!cw(n)||!n.hasOwnProperty(`isPrototypeOf`))}function cw(e){return Object.prototype.toString.call(e)===`[object Object]`}function lw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function uw(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!uw(e[r],t[r],n))return!1;return!0}if(sw(e)&&sw(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!uw(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!uw(e[o],t[o],n)))return!1;return i===a}return!1}var dw=/[\x00-\x1f\x7f"<>`{}]/g;function fw(e){return e.replace(dw,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function pw(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return fw(t)}var mw=[`http:`,`https:`,`mailto:`,`tel:`];function hw(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function gw(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=pw(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=pw(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function _w(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function vw(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yw(){throw Error(`Invariant failed`)}function bw(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var xw=4,Sw=5;function Cw(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function ww(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=Cw(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=Ew(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=Dw(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=Ew(r);e.kind=Sw,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=Ew(r);e.kind=xw,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)ww(e,t,r,c,i,a,o,s)}function Tw(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ew(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Dw(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Ow(e,t){let n=Ew(`/`),r=new Uint16Array(6),i=[];for(let t of e)ww(!1,r,t,1,n,0,i);for(let e of i)e.sort(Tw);t.masksTree=n,t.flatCache=bw(1e3)}function kw(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Pw(e,t.masksTree);return t.flatCache.set(e,r),r}function Aw(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Ew(`/`),ww(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Pw(r,o,n)}function jw(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Pw(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Iw(a.route)),t.matchCache.set(r,a),a}function Mw(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function Nw(e,t=!1,n){let r=Ew(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;ww(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&yw(),o[e.id]=e,c!==0&&e.path){let t=Mw(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(Tw);return{processedTree:{segmentTree:r,singleCache:bw(1e3),matchCache:bw(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function Pw(e,t,n=!1){let r=e.split(`/`),i=Rw(e,r,t,n);if(!i)return null;let[a]=Fw(e,r,i);return{route:i.node.route,rawParams:a}}function Fw(e,t,n){let r=Lw(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===xw)break;if(u.kind===Sw){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function Iw(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Lw(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Rw(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!QC(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Hw(l,n))continue;if(i.parse){if(!Vw(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==xw&&Hw(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===xw||i.kind===2)&&Hw(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Vw(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Bw(f,o))return n;Hw(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(_||!(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)))){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+zw(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+zw(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+zw(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+zw(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function zw(e,t){return 2**(e-t-1)}function Bw(e,t){return e===2**(t-1)-1}function Vw(e,t,n){let r,i;try{[r,i]=Fw(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Hw(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===xw)>(e.node.kind===xw)||t.node.kind===xw==(e.node.kind===xw)&&t.node.depth>e.node.depth)))}function Uw(e){return Ww(e.filter(e=>e!==void 0).join(`/`))}function Ww(e){return e.replace(/\/{2,}/g,`/`)}function Gw(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Kw(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function qw(e){return Kw(Gw(e))}function Jw(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Yw(e,t,n){return Jw(e,n)===Jw(t,n)}function Xw({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=Ww(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=Ww(e)),o=e.split(`/`);o.length>1&&QC(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(QC(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Ww(s):s)||`/`;return a&&r&&r.set(a,c),c}function Zw(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Qw(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>eT(e,n)).join(`/`):eT(r,n):r}function $w({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=Cw(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Qw(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Qw(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Qw(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function eT(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function tT(e){return e?.isNotFound===!0}function nT(){try{return sessionStorage}catch{return}}var rT=`tsr-scroll-restoration-v1_3`,iT=nT();function aT(){try{return JSON.parse(iT?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function oT(){try{iT?.setItem(rT,JSON.stringify(sT))}catch{}}var sT=aT(),cT=`data-scroll-restoration-id`,lT=e=>e.state.__TSR_key||e.href;function uT(e){let t=e.getAttribute(cT);if(t)return`[${cT}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var dT=!1,fT=`window`;function pT(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function mT(e){let t=new Set;for(let n of e){if(n===fT)continue;let e=pT(n);e&&t.add(e)}return t}function hT(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||lT,a=new Set,o=e=>{let t=sT[e]||={};for(let e of a)e===document?t[fT]={scrollX,scrollY}:e.isConnected&&(t[uT(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,dT=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{dT||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),oT()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=sT[d];if(e){let t=sT[u];for(let n in e){if(n===fT){if(s)continue}else{let e=pT(n);if(!e||s&&o&&(l??=mT(o),l.has(e)))continue}t||=sT[u]={},t[n]??=e[n]}}}dT=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=mT(o));let t=e&&i&&c,s=r.restoring?sT[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===fT){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=pT(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{dT=!1}}))}function gT(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function _T(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function vT(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=_T(r):Array.isArray(t)?t.push(_T(r)):n[e]=[t,_T(r)]}return n}var yT=/^(?:\s|["[{\d-]|fa|nu|tr)/,bT=ST(JSON.parse),xT=CT(JSON.stringify,JSON.parse);function ST(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=vT(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function CT(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!yT.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=gT(e,r);return t?`?${t}`:``}}var wT=`__root__`;function TT(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ET(e){return e instanceof Response&&!!e.options}function DT(e){return{input:({url:t})=>{for(let n of e)t=kT(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=AT(e[n],t);return t}}}function OT(e){let t=qw(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Uw([`/`,t,e.pathname]),e)}}function kT(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function AT(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function jT(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{vw(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var MT=`__TSR_index`,NT=`popstate`,PT=`beforeunload`;function FT(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=zT(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[MT];i=IT(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[MT];i=IT(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[MT]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function IT(e,t){t||={};let n=BT();return{...t,key:n,__TSR_key:n,[MT]:e}}function LT(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>zT(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=BT();t.history.replaceState({[MT]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=zT(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[MT]-l.state[MT],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=FT({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(PT,x,{capture:!0}),t.removeEventListener(NT,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(PT,x,{capture:!0}),t.addEventListener(NT,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function RT(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function zT(e,t){let n=RT(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=BT();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[MT]:0,key:a,__TSR_key:a}}}function BT(){return(Math.random()+1).toString(36).substring(7)}function VT(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function HT(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function UT({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function WT(e,t,n,r){for(let i of t){if(r&&e._tx!==r)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r&&e._tx!==r)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var GT=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Zw(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:LT()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=bw(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=jT(this.latestLocation,e),hT(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=qw(a);t&&t!==`/`&&e.push(OT({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:DT(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Nw(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&Ow(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:gw(e).path,external:!1,searchStr:o,search:iw(t?.search,i),hash:gw(r.slice(1)).path,state:aw(t?.state,a)}}let o=new URL(i,this.origin),s=kT(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:gw(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:iw(t?.search,c),hash:gw(s.hash.slice(1)).path,state:aw(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Xw({base:e,to:t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=jw(Kw(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{if(t.href){let e=zT(t.href,{});t={...t,to:kT(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=r[2],o=r[3],s=this.resolvePathWithBase(i,t.to?`${t.to}`:`.`),c=ZT(t.params,o),l=this.routesByPath[Kw(s)],u;if(l)u=this.getRouteBranch(l);else if(s.includes(`$`))u=[];else{let[e,t,n]=this.getMatchedRoutes(s);u=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(u=[...u,this.options.notFoundRoute])}if(u.length&&nw(c))for(let e of u){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){c===o&&(c=Object.assign(Object.create(null),c));try{Object.assign(c,t(c))}catch{}}}let d=e.leaveParams?s:gw($w({path:s,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,f=a;if(e._includeValidateSearch&&this.options.search?.strict){let e={};u.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,JT(t.options.validateSearch,{...e,...f}))}catch{}}),f=e}f=YT(f,t,u,e._includeValidateSearch),f=iw(a,f);let p=this.options.stringifySearch(f),m=t.hash===!0?n.hash:t.hash?$C(t.hash,n.hash):void 0,h=m?`#${m}`:``,g=t.state===!0?n.state:t.state?$C(t.state,n.state):{};t.state&&(g=aw(n.state,g));let _=`${d}${p}${h}`,v,y,b=!1;if(this.rewrite){let e=new URL(_,this.origin),t=AT(this.rewrite,e);v=e.href.replace(e.origin,``),t.origin===this.origin?y=t.pathname+t.search+t.hash:(y=t.href,b=!0)}else v=_w(_),y=v;return{publicHref:y,href:v,pathname:d,search:f,searchStr:p,state:g,hash:m??``,external:b,unmaskOnReload:t.unmaskOnReload}},n=t(e);if(e.mask)n.maskedLocation=t({from:e.from,...e.mask});else if(this.options.routeMasks){let r=kw(n.pathname,this.processedTree);if(r){let i=Object.assign(Object.create(null),r.rawParams),{from:a,params:o,...s}=r.route,c=ZT(o,i);n.maskedLocation=t({from:e.from,...s,params:c})}}return n},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=Kw(this.latestLocation.href)===Kw(n.href)&&uw(UT(n.state),UT(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(hw(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await HE(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(HT(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&VT(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href){let t=this.buildLocation(e.options).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&hw(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=tE,this.preloadRoute=e=>UE(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Aw(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!uw(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?uw(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??xT,parseSearch:e.parseSearch??bT,protocolAllowlist:e.protocolAllowlist??mw}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=Iw(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:Kw(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?XT(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=JT(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof KT||(r=new KT(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let{interpolatedPath:g,usedParams:_}=$w({path:i.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),v=i.id+g+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(_,d);let x;if(!b)try{QT(i,d)}catch(e){if(x=tT(e)||ET(e)?e:new qT(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:iw(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=VT(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:g,updatedAt:Date.now(),search:y?iw(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?aw(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?iw(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=QC(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=QC(a),c={...e.search};for(let e of a)try{Object.assign(c,JT(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=Object.assign(Object.create(null),o);for(let t of a)try{QT(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}},KT=class extends Error{},qT=class extends Error{};function JT(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new KT(`Async validation not supported`);if(n.issues)throw new KT(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function YT(e,t,n,r){let i=[];for(let e of n){let t=e.options;`search`in t?t.search?.middlewares&&i.push(...t.search.middlewares):(t.preSearchFilters||t.postSearchFilters)&&i.push(({search:e,next:n})=>{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;r&&n&&i.push(({search:e,next:t,meta:r})=>{let i=t(e);try{let e=JT(n,i);if(r&&e)for(let t in e)t in i||(r.defaulted||=new Map).set(t,e[t]);return{...i,...e}}catch{}return i})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=$C(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function XT(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return wT}function ZT(e,t){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return t;let n=Object.assign(Object.create(null),t);return Object.assign(n,$C(e,n))}function QT(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function $T(e,t){return e.options[t]?.preload?.()}function eE(e,t){let n=$T(e,`component`),r=$T(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function tE(e,t,n){let r=()=>t===!1?void 0:t?$T(e,t):eE(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function nE(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var rE=0,iE=1,aE=2,oE=3,sE=[4];function cE(e){return typeof e[0]==`number`}function lE(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).finally(()=>t.removeEventListener(`abort`,i))})}function uE(e,t){return e.routesById[t.routeId]}function dE(e,t,n){return ET(e)?[oE,e]:tT(e)?(e.routeId||=n,[aE,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[iE,e]):[rE,e]}function fE(e,t){let n=dE(t,!0,e.id);if(n[0]!==iE)return n;try{e.options.onError?.(n[1])}catch(t){n=dE(t,!0,e.id)}return n}function pE(e,t,n,r,i){return i[0].signal.aborted?sE:kE(e,t,n,fE(n,r),i)}async function mE(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=uE(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return gE(e,r),[i,pE(e,t,u,a,n)]}if(c.aborted)return[i,sE];let p=r.paramsError??r.searchError;if(p!==void 0)return gE(e,r),[i,pE(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{yE(e,r,`beforeLoad`,n[0]);let a=await lE(m({...f,search:r.search,context:r.context,...e.options.additionalContext}),c);if(c.aborted)return[i,sE];let o=kE(e,t,u,dE(a,!1,u.id),n);if(o[0]!==rE)return gE(e,r),[i,o];r.context={...r.context,...a}}catch(a){return gE(e,r),[i,pE(e,t,u,a,n)]}finally{r.status=h,yE(e,r,!1,n[0])}}i()}function hE(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function gE(e,t){let n=t._flight;t._flight=void 0,hE(e,t,n)?.abort()}function _E(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=hE(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function vE(e){for(let t of e){let e=t._flight;e&&e[2]++}}function yE(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function bE(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function xE(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return sE;if(!i)return[rE,void 0];let l=n._flight;yE(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(bE(e,t,n,r,s,a,!!o[3]))).then(e=>dE(e,!1,r.id),e=>dE(e,!0,r.id)).then(t=>(t[0]!==rE&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===iE&&l[2]?fE(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],kE(e,t,r,await lE(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return gE(e,n),sE}finally{yE(e,n,!1,s)}}function SE(e,t,n){t[0]!==oE&&(e.status=`success`,e.error=void 0,t[0]===rE?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function CE(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&gE(e,r)}function wE(e,t){return t[0]===iE||t[0]===aE?{...e,status:t[0]===iE?`error`:`notFound`,error:t[1],_flight:void 0}:e}function TE(e,t,n,r,i,a,o){let s=t[1][n],c=uE(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(bE(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=sE)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,gE(e,s),p=pE(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!!(m&&f&&s.status===`success`&&!l&&!a[4]&&((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,hE(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=(p?Promise.resolve(p):x?xE(e,t,s,c,g,i,a):Promise.resolve([rE,s.loaderData])).then(t=>(x&&(SE(s,t,l),t[0]===rE&&(m&&!a[0].signal.aborted&&CE(e,s,u),n>=o&&(s.status=`pending`))),t)),T=lE(Promise.resolve().then(()=>tE(c,void 0,C)),a[0].signal).then(()=>void 0,r=>t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound))?void 0:[n,pE(e,t,c,r,a)]).then(e=>w.then(t=>(x&&!e&&t[0]===rE&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.()),e)));if(r.push([n,w,T]),!y)return w.then(e=>wE(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ee=xE(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,SE(E,e,!1),e));return(t[2]??=[]).push([n,ee,T,E]),ee.then(e=>wE(E,e))}async function EE(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=uE(e,t[n]);try{let e=tE(i,!1);e&&await lE(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function DE(e,t){t[2]&&=(_E(e,t[2].map(e=>e[3])),void 0)}async function OE(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=oE)throw[a,t];!i&&t[0]!==rE&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===oE)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function kE(e,t,n,r,i,a){for(;r[0]===oE;){let o=r[1],s=o.options;if(s.reloadDocument?i[3]:i[1]>=20)return r;try{return s.href&&s.reloadDocument?(e.resolveRedirect(o),r):[oE,o,e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0})]}catch(e){r=a?[iE,e]:fE(n,e),a=!0}}return r}async function AE(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===aE?EE(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=oE)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==rE&&t[0]<oE&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=oE){let n=s[1];if(n[0]!==oE||n[1].options.reloadDocument||n[2])return DE(e,t),n;c=!0,s=[0,[iE,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===iE?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=uE(e,u);try{await lE(i?Promise.resolve().then(()=>tE(m,l===iE?`errorComponent`:`notFoundComponent`)):Promise.all([tE(m),tE(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return DE(e,t),sE}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),DE(e,t),_E(e,o),p()):u.status=`success`}return t}async function jE(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=uE(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await lE(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function ME(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await EE(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||i._notFound||e.preload||a?.id!==e.id||a.status!==`success`||a._notFound)break;l++}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=TE(e,i,t,u,f,r,l)},m=await mE(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===aE){let t=await EE(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=oE&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=AE(e,i,u,r[0],OE(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=OE(i[2],void 0,void 0,h.then(e=>cE(e)?0:nE(n).length,()=>0))),o=await h}catch(t){if(DE(e,i),t===a&&a.aborted)return sE;throw t}return cE(o)?o:jE(e,o,a,r[6]===n.length?r[6]:0)}function NE(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=uE(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>NE(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function PE(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function FE(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!nE(t[3]).some(e=>e.id===n[1]))return;let i;try{await lE(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function IE(e,t){e._committed=t,e.stores.setMatches(t)}function LE(e,t,n,r){let i=e._committed,a=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=nE(n).length,s=new Map;{let t=Date.now();for(let r of[...i,...a.values()]){if(r.status!==`success`||n.some((e,t)=>e.id===r.id&&(t<o||e.status===`success`)))continue;let i=uE(e,r);!i.options.loader||t-r.updatedAt>=(r.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||s.set(r.id,a.get(r.id)===r?r:{...r,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=s,IE(e,n),_E(e,[...a.values(),...i],[...n,...s.values()]),WT(e,i,n,t)}async function RE(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;n=e._tx}}function zE(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:i.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function BE(e,t,n,r,i){let a=n.map(e=>({...e}));vE(a);for(let t of r)gE(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await AE(e,o,r,t[0],i)}catch(t){throw _E(e,a),t}if(cE(s)){_E(e,a),s[0]===oE&&e._tx===t&&e._committed===n&&await zE(e,t,s);return}if(await jE(e,s,t[0].signal),e._tx!==t||e._committed!==n){_E(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),gE(e,n))}IE(e,a),_E(e,n,a)}async function VE(e,t,n,r,i,a){let o=await ME(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(cE(o)){let n=o[0]===oE&&e._tx===t;if((!n||o[1].options.reloadDocument)&&PE(e,t),_E(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){PE(e,t);return}await zE(e,t,o);return}let s=o[1];if(e._tx===t&&await FE(e,t),e._tx!==t){PE(e,t),_E(e,s),DE(e,o);return}let c=t[2],l=HT(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await FE(e,t),e._tx!==t){PE(e,t),_E(e,s),DE(e,o);return}let n=await e.startTransition(()=>{PE(e,t),LE(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){DE(e,o);return}u?.length&&BE(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function HE(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=HT(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await RE(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});vE(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){_E(e,m),await RE(e,n);return}e._preflight=void 0;let g,_=()=>VE(e,y,f,()=>NE(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_).then(),y=[p,s,a,m,Date.now(),v];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&yE(e,t,!1)}n[0].abort(),_E(e,n[3],y[3],!0)}if(e._tx!==y){_E(e,y[3]),y[3]=[],g?.(),await RE(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&NE(e,y),g?.(_()),await v,await RE(e,y)}async function UE(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),vE(a),o=(e._preloads??=new Map).set(i,a),s=await ME(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),_E(e,a)),i.abort()}if(!cE(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){tT(e)||console.error(e);return}}}var WE=`Error preloading route! ☝️`,GE=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=wT:this.parentRoute||yw();let r=n?wT:t?.path;r&&r!==`/`&&(r=Gw(r));let i=t?.id||r,a=n?wT:Uw([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Uw([`/`,a]));let o=a===`__root__`?`/`:Uw([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=Kw(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>TT({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},KE=class extends GE{constructor(e){super(e)}},qE=class extends w.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?w.createElement(this.props.errorComponent??JE,{error:e,reset:this.reset}):this.props.children}};function JE({error:e}){let[t,n]=w.useState(!1);return(0,N.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,N.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,N.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,N.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,N.jsx)(`div`,{children:(0,N.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,N.jsx)(`code`,{children:e.message}):null})}):null]})}function YE({children:e,fallback:t=null}){return(0,N.jsx)(w.Fragment,{children:XE()?e:t})}function XE(){return w.useSyncExternalStore(ZE,()=>!0,()=>!1)}function ZE(){return()=>{}}var QE=w.createContext(null);function $E(e){return w.useContext(QE)}var eD=w.createContext(void 0),tD=w.createContext(void 0);function nD({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function rD(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var iD=[],aD=0,{link:oD,unlink:sD,propagate:cD,checkDirty:lD,shallowPropagate:uD}=nD({update(e){return e._update()},notify(e){iD[fD++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,gD(e))}}),dD=0,fD=0,pD,mD=0;function hD(e){try{++mD,e()}finally{--mD||_D()}}function gD(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=sD(n,e)}function _D(){if(!(mD>0)){for(;dD<fD;){let e=iD[dD];iD[dD++]=void 0,e.notify()}dD=0,fD=0}}function vD(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return pD!==void 0&&oD(i,pD,aD),i._snapshot},subscribe(e){let t=rD(e),n={current:!1},r=yD(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=pD,o=t?.compare??Object.is;if(n)pD=i,++aD,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{pD=a,n&&(i.flags&=-5),gD(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&lD(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&uD(e)}}else e&32&&(i.flags=e&-33);return pD!==void 0&&oD(i,pD,aD),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(cD(e),uD(e),_D())}},i}function yD(e){let t=()=>{let t=pD;pD=n,++aD,n.depsTail=void 0,n.flags=6;try{return e()}finally{pD=t,n.flags&=-5,gD(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&lD(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,gD(this)}};return t(),n}var bD=class{constructor(e,t){this.atom=vD(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(rD(e))}},xD=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),SD=o(((e,t)=>{t.exports=xD()})),CD=o((e=>{var t=d(),n=SD();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),wD=o(((e,t)=>{t.exports=CD()}))();function TD(e,t){return e===t}function ED(e,t=e=>e,n){let r=n?.compare??TD,i=(0,w.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,w.useCallback)(()=>e.get(),[e]);return(0,wD.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var DD=(e,t=e=>e,n)=>ED(e,t,{compare:n}),OD={};function kD(e,t){let n=w.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=aw(n.current,i):i}}function AD(e){let t=$E(),n=w.useContext(e.from?tD:eD),r=e.from??n,i=t.stores.getMatchStore(r),a=kD(e,t),o=DD(i,e=>e?a(e):OD);if(o!==OD)return o;(e.shouldThrow??!0)&&yw()}function jD(e){return AD({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function MD(e){let{select:t,...n}=e;return AD({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function ND(e){return AD({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function PD(e){return AD({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function FD(e){let t=$E();return w.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function ID(e){return AD({...e,select:t=>e.select?e.select(t.context):t.context})}function LD(e){let t=w.useRef(e);return uw(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function RD(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function zD(e,t,n){if(e?.external)return hw(e.href,n)?void 0:e.href;if(!XD(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),hw(t,n)?void 0:t}catch{}}function BD(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!Yw(e.pathname,t.pathname,r))return!1}else{let n=Jw(e.pathname,r),i=Jw(t.pathname,r);if(!(n.startsWith(i)&&(n.length===i.length||n[i.length]===`/`)))return!1}return(n?.includeSearch??!0)&&!uw(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function VD(e,t){let n=$E(),r=ZC(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:C,onMouseEnter:T,onMouseLeave:E,onTouchStart:ee,ignoreBlocker:D,params:te,search:ne,hash:re,state:ie,mask:ae,reloadDocument:oe,unsafeRelative:se,from:O,_fromLocation:k,...ce}=e,le=XE(),ue=LD(e.search),de=LD(e.params),fe=LD(o),pe=w.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,ue,de,e.state,e.mask,e.unsafeRelative]),me=w.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...pe}),r=YD(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,v),i=zD(r,s,n.protocolAllowlist);return[r?.href,i,BD(e,t,fe,n.basepath,le,i!==void 0)]},[fe,v,le,pe,n,s]),[he,ge,_e]=DD(n.stores.location,me,RD),ve=_e?$C(i,{})??UD:HD,ye=_e?HD:$C(a,{})??HD,be=[b,ve.className,ye.className].filter(Boolean).join(` `),xe=(y||ve.style||ye.style)&&{...y,...ve.style,...ye.style},Se=w.useRef(!1),Ce=e.reloadDocument||ge||v?!1:c??n.options.defaultPreload,we=l??n.options.defaultPreloadDelay??0,Te=w.useCallback(()=>{n.preloadRoute(pe).catch(e=>{console.warn(e),console.warn(WE)})},[n,pe]),Ee=w.useCallback(e=>{if(!e){qD(r);return}if(!(e.isIntersecting??Ce===`intent`)){e.isIntersecting===!1&&qD(r);return}if(!we){Te();return}KD.has(r)||KD.set(r,setTimeout(()=>{KD.delete(r),Te()},we))},[Te,r,Ce,we]);XC(r,Ee,Ce!==`viewport`),w.useEffect(()=>{Se.current||Ce===`render`&&(Te(),Se.current=!0)},[Te,Ce]);let De=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!v&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...pe,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:D}))};if(ge)return{...ce,ref:r,href:ge,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...C&&{onFocus:C},...T&&{onMouseEnter:T},...E&&{onMouseLeave:E},...ee&&{onTouchStart:ee}};let Oe=()=>{Ce===`intent`&&Te()},ke=()=>{Ce===`intent`&&qD(r)};return{...ce,...ve,...ye,href:he,ref:r,onClick:JD([x,De]),onBlur:JD([S,ke]),onFocus:JD([C,Ee]),onMouseEnter:JD([T,Ee]),onMouseLeave:JD([E,ke]),onTouchStart:JD([ee,Oe]),disabled:!!v,target:_,...xe&&{style:xe},...be&&{className:be},...v&&WD,..._e&&GD}}var HD={},UD={className:`active`},WD={role:`link`,"aria-disabled":!0},GD={"data-status":`active`,"aria-current":`page`},KD=new WeakMap,qD=e=>{clearTimeout(KD.get(e)),KD.delete(e)},JD=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function YD(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function XD(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var ZD=w.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=VD(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return w.createElement(`a`,t,o)}return w.createElement(n,a,o)}),QD=class extends GE{constructor(e){super(e),this.useMatch=e=>AD({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>ID({...e,from:this.id}),this.useSearch=e=>PD({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>ND({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>MD({...e,from:this.id}),this.useLoaderData=e=>jD({...e,from:this.id}),this.useNavigate=()=>FD({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,N.jsx)(ZD,{ref:t,from:this.fullPath,...e}))}};function $D(e){return new QD(e)}var eO=class extends KE{constructor(e){super(e),this.useMatch=e=>AD({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>ID({...e,from:this.id}),this.useSearch=e=>PD({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>ND({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>MD({...e,from:this.id}),this.useLoaderData=e=>jD({...e,from:this.id}),this.useNavigate=()=>FD({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,N.jsx)(ZD,{ref:t,from:this.fullPath,...e}))}};function tO(e){return new eO(e)}function nO(e){let t=$E(),n=`not-found-${DD(t.stores.location,e=>e.pathname)}-${DD(t.stores.status,e=>e)}`;return(0,N.jsx)(qE,{getResetKey:()=>n,onCatch:(t,n)=>{if(tT(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(tT(t))return e.fallback?.(t);throw t},children:e.children})}function rO(){return(0,N.jsx)(`p`,{children:`Not Found`})}function iO(e){return(0,N.jsx)(N.Fragment,{children:e.children})}function aO(e,t,n){return t.options.notFoundComponent?(0,N.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,N.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,N.jsx)(rO,{})}function oO(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,N.jsx)(n,{}):null}var sO=(e,t)=>e[0]===t[0]&&e[1]===t[1],cO=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,lO=w.memo(function({routeId:e}){let t=$E();return(0,N.jsx)(uO,{router:t,match:DD(t.stores.getMatchStore(e),e=>e)})});function uO({router:e,match:t}){let n=e.routesById[t.routeId],r=oO(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=cO(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?w.Suspense:iO,l=i?qE:iO,u=o?nO:iO;return(0,N.jsxs)(n.isRoot?n.options.shellComponent??iO:iO,{children:[(0,N.jsx)(eD.Provider,{value:t.routeId,children:(0,N.jsx)(c,{fallback:r,children:(0,N.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(tT(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,N.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return w.createElement(o,e)},children:s?(0,N.jsx)(YE,{fallback:r,children:(0,N.jsx)(dO,{match:t})}):(0,N.jsx)(dO,{match:t})})})})}),null]})}var dO=w.memo(function({match:e}){let t=$E(),n=e.routeId,r=t.routesById[n],i=w.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=w.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,N.jsx)(e,{},i):(0,N.jsx)(fO,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!cO(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return oO(t,r)}if(e.status===`notFound`)return aO(t,r,e.error);if(e.status===`error`)throw e.error;return a}),fO=w.memo(function(){let e=$E(),t=w.useContext(eD),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=DD(a,e=>[!!e._notFound,e.error],sO),i=DD(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return aO(e,e.routesById[t],r);if(!i)return null;let a=(0,N.jsx)(lO,{routeId:i});return t===`__root__`?(0,N.jsx)(w.Suspense,{fallback:oO(e),children:a}):a});function pO(e,t){let n=e[1];e.length=0,n?.(t)}function mO({t:e}){let t=$E(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{pO(n,!1),n.push(i,a),e(t),w.startTransition(r)}),YC(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Kw(r.publicHref)!==Kw(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...HT(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function hO(){let e=$E(),t=e.routesById[wT],n=oO(e,t),r=e.ssr?iO:w.Suspense,i=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(mO,{t:w.useState()[1]}),(0,N.jsx)(r,{fallback:n,children:(0,N.jsx)(gO,{})})]});return e.options.InnerWrap?(0,N.jsx)(e.options.InnerWrap,{children:i}):i}function gO(){let e=$E(),t=e._rendered,n=DD(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;YC(()=>{t[0]===n&&pO(t,!0)},[t,n]);let a=i?(0,N.jsx)(lO,{routeId:i}):null;return(0,N.jsx)(eD.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,N.jsx)(qE,{getResetKey:()=>r,onCatch:void 0,children:a})})}var _O=e=>({createMutableStore:vD,createReadonlyStore:vD,batch:hD}),vO=e=>new yO(e),yO=class extends GT{constructor(e){super(e,_O)}};function bO({router:e,children:t,...n}){nw(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,N.jsx)(QE.Provider,{value:e,children:t});return e.options.Wrap?(0,N.jsx)(e.options.Wrap,{children:r}):r}function xO({router:e,...t}){return(0,N.jsx)(bO,{router:e,...t,children:(0,N.jsx)(hO,{})})}function SO(e){return{type:`prompt`,message:e}}function CO(e){return{type:`steer`,message:e}}function wO(e){return{type:`follow_up`,message:e}}function TO(){return{type:`abort`}}function EO(){return{type:`get_state`}}function DO(){return{type:`get_session_stats`}}function OO(){return{type:`get_commands`}}function kO(){return{type:`get_available_models`}}function AO(){return{type:`get_available_thinking_levels`}}function jO(e,t){return{type:`set_model`,provider:e,modelId:t}}function MO(e){return{type:`set_thinking_level`,level:e}}function NO(e){return{type:`set_session_name`,name:e}}function PO(e,t){return{type:`extension_ui_response`,id:e,value:t}}function FO(e,t){return{type:`extension_ui_response`,id:e,confirmed:t}}function IO(e){return{type:`extension_ui_response`,id:e,cancelled:!0}}var LO=`/api/sessions`,RO=`/api/directories`,zO=`sessions_snapshot`,BO=`session_upsert`,VO=`session_removed`,HO=`session_backlog`,UO=`session_frame`,WO=`extension_ui_answered`,GO=`hub_resynced`,KO=`subscribe`,qO=`unsubscribe`,JO=`session_command`,YO=`subscribe_thread`,XO=`unsubscribe_thread`,ZO=`thread_backlog`,QO=`thread_frame`,$O=`history_request`,ek=`history_page`;function tk(e,t){return{type:JO,sessionId:e,frame:t}}function nk(e){return{type:KO,sessionId:e}}function rk(e){return{type:qO,sessionId:e}}function ik(e,t){return{type:YO,sessionId:e,threadId:t}}function ak(e,t){return{type:XO,sessionId:e,threadId:t}}var ok={entries:[],statuses:{},widgets:[],streaming:!1,settled:!1,stats:null,agent:null,commands:[],models:[],thinkingLevels:[],dialog:null,minorModes:null,toolsThisRun:0,restoredIds:[],pendingUserEntries:[],nextId:1};function sk(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ck(e,t=``){return typeof e==`string`?e:t}function lk(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function uk(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>sk(e)&&e.type===`text`?ck(e.text):``).filter(Boolean).join(``):``}function dk(e){if(!sk(e))return``;for(let t of[`command`,`file_path`,`filePath`,`path`,`pattern`,`query`,`url`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n}let t=Object.keys(e);return t.length>0?t.join(`, `):``}function fk(e,t){return{...e,entries:[...e.entries,t],nextId:e.nextId+1}}function pk(e,t,n){return{...e,entries:e.entries.map(e=>e.id===t?n:e)}}function mk(e){let t=e.entries[e.entries.length-1];if(t&&t.kind===`assistant`&&t.streaming)return{state:e,entry:t};let n={kind:`assistant`,id:`a${e.nextId}`,text:``,thinking:``,streaming:!0};return{state:fk(e,n),entry:n}}function hk(e,t){let n=ck(t.type);if(n!==`text_delta`&&n!==`thinking_delta`&&n!==`text_start`&&n!==`thinking_start`)return e;let r=mk(e),i=ck(t.delta);if(!i)return r.state;let a=n===`thinking_delta`?{...r.entry,thinking:r.entry.thinking+i}:{...r.entry,text:r.entry.text+i};return pk(r.state,r.entry.id,a)}function gk(e,t){let n=e.entries.findLastIndex(e=>e.kind===`assistant`&&e.streaming);if(n===-1)return e;let r=e.entries[n],i=sk(t)?uk(t.content):``,a={...r,text:i.length>r.text.length?i:r.text,streaming:!1},o=[...e.entries];return o[n]=a,{...e,entries:o}}function _k(e,t){let n={kind:`tool`,id:`t${e.nextId}`,toolCallId:ck(t.toolCallId),name:ck(t.toolName,`tool`),args:sk(t.args)?t.args:{},argSummary:dk(t.args),result:null,output:``,isError:!1,running:!0},r=fk(gk(e,void 0),n);return{...r,toolsThisRun:r.toolsThisRun+1}}function vk(e){return sk(e)?{content:Array.isArray(e.content)?e.content:[],details:e.details}:null}function yk(e,t,n){let r=e.entries.findLastIndex(e=>e.kind===`tool`&&e.toolCallId===t);if(r===-1)return e;let i=[...e.entries];return i[r]={...i[r],...n},{...e,entries:i}}var bk=new Set([`set_model`,`set_thinking_level`]);function xk(e){if(!(!sk(e)||typeof e.id!=`string`||typeof e.provider!=`string`))return{provider:e.provider,id:e.id,name:ck(e.name,e.id),reasoning:e.reasoning===!0}}function Sk(e,t){let n=ck(t.command);if(t.success===!1&&bk.has(n))return fk(e,{kind:`notice`,id:`n${e.nextId}`,text:ck(t.error,`The agent refused ${n}.`),tone:`error`});let r=t.data;if(!sk(r))return e;if(n===`get_state`){let t=sk(r.model)?ck(r.model.id??r.model.name,`unknown`):`unknown`,n=sk(r.model)?ck(r.model.provider):``;return{...e,agent:{model:t,provider:n,thinkingLevel:ck(r.thinkingLevel,`unknown`),sessionId:ck(r.sessionId),sessionName:ck(r.sessionName),messageCount:lk(r.messageCount)??0,isStreaming:r.isStreaming===!0}}}if(n===`get_available_models`){let t=Array.isArray(r.models)?r.models.map(xk).filter(e=>e!==void 0):[];return{...e,models:t}}if(n===`get_available_thinking_levels`){let t=Array.isArray(r.levels)?r.levels.filter(e=>typeof e==`string`):[];return{...e,thinkingLevels:t}}if(n===`set_model`&&e.agent){let t=xk(r);return t?{...e,agent:{...e.agent,model:t.id,provider:t.provider}}:e}if(n===`get_session_stats`){let t=sk(r.tokens)?lk(r.tokens.total):null,n=sk(r.contextUsage)?r.contextUsage:void 0;return{...e,stats:{cost:lk(r.cost)??0,totalTokens:t??0,contextPercent:n?lk(n.percent):null,contextTokens:n?lk(n.tokens):null,contextWindow:n?lk(n.contextWindow):null}}}if(n===`get_commands`){let t=(Array.isArray(r.commands)?r.commands:[]).filter(sk).map(e=>({name:ck(e.name),description:ck(e.description)})).filter(e=>e.name.length>0);return{...e,commands:t}}return e}function Ck(e,t){let n=ck(t.statusKey);if(!n)return e;let r=typeof t.statusText==`string`?t.statusText:``;return e.statuses[n]===r?e:{...e,statuses:{...e.statuses,[n]:r}}}function wk(e,t){let n=ck(t.widgetKey);return!n||e.widgets.includes(n)?e:{...e,widgets:[...e.widgets,n]}}function Tk(e,t){let n=ck(t.method);if(n===`setStatus`)return Ck(e,t);if(n===`setWidget`)return wk(e,t);if(n!==`select`&&n!==`confirm`&&n!==`input`&&n!==`editor`)return e;let r=Array.isArray(t.options)?t.options.map(e=>ck(e)).filter(Boolean):[];return{...e,dialog:{id:ck(t.id),method:n,title:ck(t.title,`The agent needs an answer`),message:ck(t.message),options:r,placeholder:ck(t.placeholder),prefill:ck(t.prefill)}}}function Ek(e){return e.map(e=>e.type===`thinking`?ck(e.thinking):``).filter(Boolean).join(``)}function Dk(e,t,n){return{...e,pendingUserEntries:[...e.pendingUserEntries,{id:t,text:n}]}}function Ok(e,t){let n=e.pendingUserEntries.findIndex(e=>e.text===t);if(n===-1)return;let{id:r}=e.pendingUserEntries[n],i=e.pendingUserEntries.filter((e,t)=>t!==n),a=e.entries.map(e=>e.id===r&&e.kind===`queued`?{kind:`user`,id:e.id,text:e.text}:e);return{...e,entries:a,pendingUserEntries:i}}function kk(e,t){let n=ck(t.role),r=Array.isArray(t.content)?t.content.filter(sk):[];if(n===`user`){let t=uk(r);return t?Ok(e,t)??fk(e,{kind:`user`,id:`u${e.nextId}`,text:t}):e}if(n===`assistant`){let t=uk(r),n=Ek(r),i=t||n?fk(e,{kind:`assistant`,id:`a${e.nextId}`,text:t,thinking:n,streaming:!1}):e;for(let e of r)e.type===`toolCall`&&(i=fk(i,{kind:`tool`,id:`t${i.nextId}`,toolCallId:ck(e.id),name:ck(e.name,`tool`),args:sk(e.arguments)?e.arguments:{},argSummary:dk(e.arguments),result:null,output:``,isError:!1,running:!0}));return i}return n===`toolResult`?yk(e,ck(t.toolCallId),{result:{content:r,details:t.details},output:uk(r),isError:t.isError===!0,running:!1}):e}function Ak(e,t){if(t.type!==`message`||!sk(t.message))return e;let n=ck(t.id);if(n===``||e.restoredIds.includes(n))return e;let r=kk(e,t.message);return{...r,restoredIds:[...r.restoredIds,n]}}function jk(e,t,n){let r=t.reduce((e,t)=>Nk(e,t),ok),i=new Set(e.restoredIds),a=r.restoredIds.filter(e=>!i.has(e));if(a.length===0)return e;let o=`h${n}-`,s=r.entries.filter(e=>e.kind!==`notice`).map(e=>({...e,id:`${o}${e.id}`}));return{...e,entries:[...s,...e.entries],restoredIds:[...a,...e.restoredIds]}}var Mk=new Set([`message_update`,`message_end`,`tool_execution_start`,`tool_execution_update`,`tool_execution_end`]);function Nk(e,t,n={}){let r=ck(t.type);if(n.transcriptFromProtocol&&Mk.has(r))return r===`tool_execution_start`?{...e,toolsThisRun:e.toolsThisRun+1}:e;switch(r){case`replay`:return sk(t.frame)?Nk(e,t.frame,n):e;case`agent_start`:return{...e,streaming:!0,settled:!1,toolsThisRun:0};case`message_update`:return sk(t.assistantMessageEvent)?hk(e,t.assistantMessageEvent):e;case`message_end`:return gk(e,t.message);case`tool_execution_start`:return _k(e,t);case`tool_execution_update`:return yk(e,ck(t.toolCallId),{result:vk(t.partialResult),output:uk(sk(t.partialResult)?t.partialResult.content:void 0)});case`tool_execution_end`:return yk(e,ck(t.toolCallId),{result:vk(t.result),output:uk(sk(t.result)?t.result.content:void 0),isError:t.isError===!0,running:!1});case`agent_settled`:{let t=n.transcriptFromProtocol?e:gk(e,void 0);return{...fk(t,{kind:`settled`,id:`s${t.nextId}`,tools:t.toolsThisRun}),streaming:!1,settled:!0}}case`extension_ui_request`:if(t.method===`notify`){let n=ck(t.message,``);return n===``?e:fk(e,{kind:`notice`,id:`n${e.nextId}`,text:n,tone:t.notifyType===`error`?`error`:`info`})}return Tk(e,t);case WO:return e.dialog&&e.dialog.id===ck(t.id)?{...e,dialog:null}:e;case`entry_appended`:{let r=sk(t.entry)?t.entry:void 0;if(!r)return e;if(r.type===`custom`&&r.customType===`doom-minor-modes`){let t=sk(r.data)?r.data:void 0;return!t||!Array.isArray(t.modes)?e:{...e,minorModes:t}}return n.transcriptFromProtocol?e:Ak(e,r)}case`response`:return Sk(e,t);case`error`:case`extension_error`:return fk(e,{kind:`notice`,id:`n${e.nextId}`,text:ck(t.message??t.error,`The agent reported an error.`),tone:`error`});default:return e}}function Pk(e,t){let n=`u${e.nextId}`;return Dk(fk(e,{kind:`user`,id:n,text:t}),n,t)}function Fk(e,t){let n=`q${e.nextId}`;return Dk(fk(e,{kind:`queued`,id:n,text:t}),n,t)}function Ik(e){return{...e,dialog:null}}var Lk;function Rk(e){Lk=e}function zk(){Lk=void 0}function Bk(e,t){Lk?.(tk(e,t))}function Vk(e){Lk?.(e)}var Hk=new bD({order:[],byId:{},activeId:null,hydrated:!1});function Uk(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wk(e){if(!(!Uk(e)||typeof e.id!=`string`||e.id===``))return e}function Gk(e){return Object.keys(e).sort((t,n)=>{let r=e[t].summary,i=e[n].summary;return r.createdAt.localeCompare(i.createdAt)||r.id.localeCompare(i.id)})}function Kk(e,t){let n=e?.attach===`refused`&&t.attach===`connecting`;return{summary:t,attach:n?`refused`:t.attach,reason:n?e.reason:t.attachReason??``,replayed:e?.replayed??0,dropped:e?.dropped??0}}function qk(e){if(!Array.isArray(e.sessions))return;let t=e.sessions.map(Wk).filter(e=>!!e);Hk.setState(e=>{let n={};for(let r of t)n[r.id]=Kk(e.byId[r.id],r);return{...e,byId:n,order:Gk(n),hydrated:!0}})}function Jk(e){let t=Wk(e.session);t&&Hk.setState(e=>{let n={...e.byId,[t.id]:Kk(e.byId[t.id],t)};return{...e,byId:n,order:Gk(n)}})}function Yk(e){let t=e.sessionId;typeof t==`string`&&Hk.setState(e=>{if(!(t in e.byId))return e;let n={...e.byId};return delete n[t],{...e,byId:n,order:Gk(n)}})}function Xk(e,t,n){Hk.setState(r=>{let i=r.byId[e];return i?{...r,byId:{...r.byId,[e]:{...i,replayed:t,dropped:n}}}:r})}function Zk(){Hk.setState(e=>{let t={};for(let[n,r]of Object.entries(e.byId))t[n]={...r,attach:`offline`,reason:`The cockpit lost its bridge.`};return{...e,byId:t}})}var Qk=15e3;function $k(e,t=Qk){return e in Hk.state.byId?Promise.resolve(!0):new Promise(n=>{let r=e=>{clearTimeout(a),i.unsubscribe(),n(e)},i=Hk.subscribe(()=>{e in Hk.state.byId&&r(!0)}),a=setTimeout(()=>r(!1),t)})}function eA(){return DD(Hk,e=>e.activeId===null?null:e.byId[e.activeId]??null)}function tA(e){Hk.setState(t=>t.activeId===e?t:{...t,activeId:e})}function nA(){return Hk.state.activeId}var rA=new Map,iA=new bD(ok);function aA(e){if(e===null)return iA;let t=rA.get(e);if(t)return t;let n=new bD(ok);return rA.set(e,n),n}function oA(e){return DD(aA(DD(Hk,e=>e.activeId)),e)}function sA(e,t){aA(e).setState(e=>Nk(e,t,{transcriptFromProtocol:!0}))}function cA(e,t){aA(e).setState(e=>Nk(e,t))}var lA=new Map,uA=new bD({}),dA={cursor:null,hasMore:!0,loading:!1,pages:0};function fA(e){return lA.get(e)??dA}function pA(e,t){lA.set(e,t),uA.setState(n=>({...n,[e]:t}))}function mA(e){return DD(uA,t=>e!==null&&(t[e]??dA).hasMore)}function hA(e){if(e===null)return;let t=fA(e);t.loading||!t.hasMore||(pA(e,{...t,loading:!0}),Vk({type:$O,sessionId:e,...t.cursor===null?{}:{before:t.cursor}}))}function gA(e,t,n){let r=fA(e).pages+1;aA(e).setState(e=>jk(e,t,r)),pA(e,{cursor:n.cursor,hasMore:n.hasMore,loading:!1,pages:r})}function _A(e,t){pA(e,{...dA,cursor:t})}function vA(e,t){let n=new Set([`user`,`assistant`,`tool`]),r=new Map,i=null;for(let t of e){if(n.has(t.kind)){i=t.id;continue}let e=r.get(i)??[];e.push(t),r.set(i,e)}let a=[...r.get(null)??[]],o=new Set([null]);for(let e of t)a.push(e,...r.get(e.id)??[]),o.add(e.id);for(let[e,t]of r)o.has(e)||a.push(...t);return a}function yA(e,t,n){aA(e).setState(e=>({...e,entries:vA(e.entries,t),streaming:n,settled:!n,pendingUserId:null,pendingUserText:``}))}function bA(e){aA(e).setState(()=>ok),lA.delete(e),uA.setState(t=>{let{[e]:n,...r}=t;return r})}function xA(e){rA.delete(e)}function SA(e){Bk(e,EO()),Bk(e,DO()),Bk(e,OO())}function CA(e=nA()){e!==null&&(Bk(e,kO()),Bk(e,AO()))}function wA(e,t,n=nA()){n!==null&&(Bk(n,jO(e,t)),Bk(n,EO()),Bk(n,AO()))}function TA(e,t=nA()){t!==null&&(Bk(t,MO(e)),Bk(t,EO()))}function EA(e,t=nA()){let n=e.trim();if(!n||t===null)return;let r=aA(t),i=r.state.streaming;r.setState(e=>Pk(e,n)),Bk(t,i?CO(n):SO(n))}function DA(e,t=nA()){let n=e.trim();!n||t===null||(aA(t).setState(e=>Fk(e,n)),Bk(t,wO(n)))}function OA(e,t=nA()){let n=e.trim();!n||t===null||(Bk(t,NO(n)),Bk(t,EO()))}function kA(e=nA()){e!==null&&Bk(e,TO())}function AA(e,t=nA()){if(t===null)return;let n=e.startsWith(`/`)?e:`/${e}`;aA(t).setState(e=>Pk(e,n)),Bk(t,SO(n))}function jA(e,t,n=nA()){n!==null&&(Bk(n,PO(e,t)),aA(n).setState(Ik))}function MA(e,t,n=nA()){n!==null&&(Bk(n,FO(e,t)),aA(n).setState(Ik))}function NA(e,t=nA()){t!==null&&(Bk(t,IO(e)),aA(t).setState(Ik))}var PA=`thread:`,FA=new Map;function IA(e,t){return`${PA}${e}:${t}`}function LA(e,t){let n=IA(e,t),r=FA.get(n);if(r!==void 0){r.refs+=1;return}FA.set(n,{sessionId:e,threadId:t,refs:1}),Vk(ik(e,t))}function RA(e,t){let n=IA(e,t),r=FA.get(n);r!==void 0&&(--r.refs,!(r.refs>0)&&(FA.delete(n),Vk(ak(e,t))))}function zA(){for(let e of FA.values())Vk(ik(e.sessionId,e.threadId))}function BA(e){for(let[t,n]of FA)n.sessionId===e&&(FA.delete(t),xA(t))}var VA={avif:{kind:`image`,contentType:`image/avif`},bmp:{kind:`image`,contentType:`image/bmp`},gif:{kind:`image`,contentType:`image/gif`},jpeg:{kind:`image`,contentType:`image/jpeg`},jpg:{kind:`image`,contentType:`image/jpeg`},png:{kind:`image`,contentType:`image/png`},svg:{kind:`image`,contentType:`image/svg+xml`},webp:{kind:`image`,contentType:`image/webp`},m4v:{kind:`video`,contentType:`video/mp4`},mov:{kind:`video`,contentType:`video/quicktime`},mp4:{kind:`video`,contentType:`video/mp4`},webm:{kind:`video`,contentType:`video/webm`},pdf:{kind:`pdf`,contentType:`application/pdf`}};function HA(e,t){return`/api/sessions/${encodeURIComponent(e)}/file?path=${encodeURIComponent(t)}`}var UA=/(?:^|\s)@([^\s@]+)/gu,WA=/[.,;:!?)\]]+$/u;function GA(e){let t=e.lastIndexOf(`.`);return t<0?`file`:VA[e.slice(t+1).toLowerCase()]?.kind??`file`}function KA(e){let t=new Set,n=[];for(let r of e.matchAll(UA)){let e=r[1].replace(WA,``);!e||t.has(e)||(t.add(e),n.push({path:e,kind:GA(e)}))}return n}function qA({mention:e,url:t}){return e.kind===`image`?(0,N.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,children:(0,N.jsx)(`img`,{src:t,alt:e.path,className:`max-h-[360px] max-w-full rounded border border-doom-border`})}):e.kind===`video`?(0,N.jsx)(`video`,{src:t,controls:!0,preload:`metadata`,className:`max-h-[360px] max-w-full rounded border border-doom-border`}):e.kind===`pdf`?(0,N.jsx)(`iframe`,{src:t,title:e.path,className:`h-[480px] w-full rounded border border-doom-border bg-doom-deep`}):(0,N.jsx)(Ff,{asChild:!0,size:`md`,className:`self-start bg-doom-panel text-doom-text hover:border-doom-blue/50`,children:(0,N.jsxs)(`a`,{href:t,children:[(0,N.jsx)(se,{className:`h-3 w-3 shrink-0 text-doom-faint`}),e.path]})})}function JA({sessionId:e,mentions:t}){return t.length===0?null:(0,N.jsx)(`div`,{"data-testid":`mention-previews`,className:`flex flex-col gap-2`,children:t.map(t=>(0,N.jsx)(`div`,{"data-testid":`mention-preview`,"data-kind":t.kind,"data-path":t.path,children:(0,N.jsx)(qA,{mention:t,url:HA(e,t.path)})},t.path))})}var YA=class extends w.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error(`web plugin tool renderer for '${this.props.toolName}' threw; showing the host item instead`,e)}render(){return this.props.children(this.state.failed)}},XA=`leader`;function ZA(e,t){let n=e;for(let[e,r]of t.path.entries()){let i=e===t.path.length-1,a=n.children.get(r.key);a?!a.detail&&r.detail&&(a.detail=r.detail):(a={key:r.key,label:r.label,detail:r.detail??``,children:new Map},n.children.set(r.key,a)),i?(a.children.clear(),a.binding=t,a.label=r.label,a.detail=r.detail??``):a.binding&&delete a.binding,n=a}}function QA(e){let t=[];e.binding&&t.push(e.binding);for(let n of e.children.values())t.push(...QA(n));return t}function $A(e){let t=[],n={key:``,label:XA,detail:``,children:new Map},r=new Map;for(let i of e){let e=n,a=[];for(let[n,o]of i.path.entries()){a.push(o.key);let s=a.join(` `),c=n===i.path.length-1,l=e.children.get(o.key);if(l){if(c)for(let e of QA(l))e!==i&&t.push({kind:`leaf-override`,path:s,winner:i,loser:e});else{l.binding&&l.binding!==i&&t.push({kind:`leaf-override`,path:s,winner:i,loser:l.binding});let e=r.get(l);e!==void 0&&e!==i&&l.label!==o.label&&t.push({kind:`group-label`,path:s,winner:e,loser:i})}}else l={key:o.key,label:o.label,detail:``,children:new Map},e.children.set(o.key,l),r.set(l,i);c?(l.children.clear(),l.binding=i,l.label=o.label,r.set(l,i)):l.binding&&delete l.binding,e=l}}return t}function ej(e){let t=[...e.children.values()].sort((e,t)=>e.key.localeCompare(t.key)).map(e=>({key:e.key,label:e.label,detail:e.detail,children:[]}));return{key:e.key,label:e.label,detail:e.detail,...e.binding?{binding:e.binding}:{},children:t}}function tj(e,t){let n={key:``,label:XA,detail:``,children:new Map};for(let t of e)ZA(n,t);let r=n;for(let e of t){let t=r.children.get(e);if(!t||t.binding)return;r=t}let i=[...r.children.values()].sort((e,t)=>e.key.localeCompare(t.key)).map(ej);return{label:r.label,options:i}}var nj={overlay:`overlay`,rail:`rail`,selectionBar:`selection-bar`,activity:`activity`},rj=`.`,ij=1e3,aj=new Set(Object.values(nj));function oj(e){return`${nj.activity}${rj}${e}`}function sj(){return{plugins:[],tabs:[],channels:new Map,commands:[],leaderBindings:[],selectionAxes:[],minorModes:[],activityGroups:[],toolRenderers:new Map,toolMatchers:[],slots:new Map,fills:new Map,diagnostics:[]}}var H=sj(),cj=!1,lj=/^[a-z0-9]$/,uj=4;function dj(e,t){if(t.path.length===0||t.path.length>uj)throw Error(`Web plugin '${e}' leader binding '${t.id}' needs 1 to ${uj} path segments.`);for(let n of t.path){if(!lj.test(n.key))throw Error(`Web plugin '${e}' leader binding '${t.id}' key '${n.key}' must be one lowercase letter or digit.`);if(n.label.trim()===``)throw Error(`Web plugin '${e}' leader binding '${t.id}' has an unlabeled segment.`)}}function fj(e,t,n,r){let i=e.get(n);if(i===r)throw Error(`Web plugin '${r}' declares ${t.replace(`-`,` `)} '${n}' twice.`);return i===void 0?(e.set(n,r),!0):(H.diagnostics.push({pluginId:r,kind:`duplicate-${t}`,message:`Web plugin '${r}' ${t.replace(`-`,` `)} '${n}' is already provided by '${i}'; keeping the first.`}),!1)}function pj(e,t){return{slot:e,id:t.id,component:t.component}}function mj(e,t,n){let r=`${e}${rj}`;if(!n.slot.startsWith(r)||n.slot.length===r.length)throw Error(`Web plugin '${e}' declares slot '${n.slot}', which must be named '${r}<name>'.`);if(t.has(n.slot))throw Error(`Web plugin '${e}' declares slot '${n.slot}' twice.`);t.add(n.slot)}function hj(e,t,n){if(n.id===``)throw Error(`Web plugin '${e}' has a fill into '${n.slot}' with an empty id.`);if(n.component===void 0&&n.data===void 0)throw Error(`Web plugin '${e}' fill '${n.id}' into '${n.slot}' has neither a component nor data.`);let r=`${n.slot} ${n.id}`;if(t.has(r))throw Error(`Web plugin '${e}' fills '${n.slot}' with id '${n.id}' twice.`);t.add(r)}var gj=(e,t)=>e.order-t.order||e.pluginId.localeCompare(t.pluginId)||e.id.localeCompare(t.id),_j=(e,t)=>(e.order??ij)-(t.order??ij)||e.name.localeCompare(t.name);function vj(e,t){let n=H.slots.get(t.slot);if(n===void 0){H.diagnostics.push({pluginId:e,kind:`orphan-fill`,message:`Web plugin '${e}' fills slot '${t.slot}', which no installed plugin declares; nothing is placed.`});return}let r=t.data;if(r!==void 0&&n.parse!==void 0){let i=n.parse(r);if(i===null){H.diagnostics.push({pluginId:e,kind:`rejected-fill`,message:`Web plugin '${e}' fill '${t.id}' into '${t.slot}' was rejected by the slot's parse gate.`});return}r=i}let i={slot:t.slot,pluginId:e,id:t.id,order:t.order??ij,...r===void 0?{}:{data:r},...t.component===void 0?{}:{component:t.component}},a=H.fills.get(t.slot);a===void 0?H.fills.set(t.slot,[i]):a.push(i)}function yj(e){let t=new Map(e.map(e=>[e.binding,e.pluginId]));for(let n of $A(e.map(e=>e.binding))){let e=t.get(n.winner)??``,r=t.get(n.loser)??``;if(e===r)throw Error(`Web plugin '${e}' binds Leader Space '${n.path}' twice ('${n.loser.id}' and '${n.winner.id}').`);n.kind===`leaf-override`?H.diagnostics.push({pluginId:r,kind:`leader-leaf-override`,message:`Web plugin '${r}' Leader Space leaf '${n.path}' ('${n.loser.id}') is taken over by '${e}' ('${n.winner.id}').`}):H.diagnostics.push({pluginId:r,kind:`leader-group-label`,message:`Web plugin '${r}' words Leader Space group '${n.path}' differently from '${e}', which named it first; keeping the first label.`})}}function bj(e){if(cj)throw Error(`Web plugins are already installed.`);let t={plugin:new Map,tab:new Map,channel:new Map,tool:new Map,"activity-group":new Map,"minor-mode":new Map,"selection-axis":new Map,"palette-command":new Map},n=[],r=[],i=[],a=[];for(let o of e){if(aj.has(o.id))throw Error(`Web plugin id '${o.id}' is reserved for a host slot.`);if(t.plugin.has(o.id)){H.diagnostics.push({pluginId:o.id,kind:`duplicate-plugin`,message:`Web plugin id '${o.id}' is declared twice; keeping the first definition.`});continue}t.plugin.set(o.id,o.id),H.plugins.push(o);for(let e of o.tabs??[])fj(t.tab,`tab`,e.id,o.id)&&H.tabs.push(e);for(let e of o.channels??[])fj(t.channel,`channel`,e.channel,o.id)&&H.channels.set(e.channel,e);for(let e of o.paletteCommands??[])fj(t[`palette-command`],`palette-command`,e.id,o.id)&&H.commands.push(e);for(let e of o.leaderBindings??[])dj(o.id,e),i.push({pluginId:o.id,binding:e});for(let e of o.selectionAxes??[])fj(t[`selection-axis`],`selection-axis`,e.name,o.id)&&H.selectionAxes.push(e);for(let e of o.minorModes??[])fj(t[`minor-mode`],`minor-mode`,e.name,o.id)&&H.minorModes.push(e);for(let e of o.activityGroups??[])fj(t[`activity-group`],`activity-group`,e.name,o.id)&&H.activityGroups.push(e);for(let e of o.toolRenderers??[]){for(let n of e.tools)fj(t.tool,`tool`,n,o.id)&&H.toolRenderers.set(n,e);e.matches!==void 0&&H.toolMatchers.push(e)}let e=new Set;for(let t of o.slots??[])mj(o.id,e,t),a.push(t);let s=new Set;for(let e of o.fills??[])hj(o.id,s,e),n.push({pluginId:o.id,fill:e});for(let e of o.overlays??[])n.push({pluginId:o.id,fill:pj(nj.overlay,e)});for(let e of o.railSections??[])n.push({pluginId:o.id,fill:pj(nj.rail,e)});for(let e of o.selectionBarItems??[])n.push({pluginId:o.id,fill:pj(nj.selectionBar,e)});for(let e of o.activitySections??[])r.push({pluginId:o.id,section:e})}for(let e of Object.values(nj))H.slots.set(e,{slot:e});for(let e of H.activityGroups)H.slots.set(oj(e.name),{slot:oj(e.name)});for(let e of a)H.slots.set(e.slot,e);for(let{pluginId:e,section:t}of r){let r=oj(t.id);n.push({pluginId:e,fill:pj(H.slots.has(r)?r:nj.activity,t)})}for(let{pluginId:e,fill:t}of n)vj(e,t);for(let e of H.fills.values())e.sort(gj);yj(i),H.leaderBindings.push(...i.map(e=>e.binding)),H.selectionAxes.sort(_j),H.minorModes.sort(_j),H.activityGroups.sort(_j),cj=!0}function xj(){return H.diagnostics}function Sj(){return H.plugins}function Cj(){return H.tabs}function wj(e){return H.fills.get(e)??[]}function Tj(){return H.commands}function Ej(){return H.leaderBindings}function Dj(){return H.selectionAxes}function Oj(){return H.minorModes}function kj(){return H.activityGroups}function Aj(e,t={}){return H.toolRenderers.get(e)??H.toolMatchers.find(n=>n.matches?.(e,t))}function jj(e){if(typeof e.type!=`string`||typeof e.sessionId!=`string`)return!1;let t=H.channels.get(e.type);if(t===void 0)return!1;let n=t.parse(e.payload);return n!==null&&t.apply(e.sessionId,n),!0}function Mj(e){for(let t of H.channels.values())t.drop(e)}function Nj(e){let t=[];for(let n of H.plugins){let r=n.start?.(e);r&&t.push(r)}return()=>{for(let e of t.reverse())e()}}function Pj(e,t,n){return{...e,toolCallId:t.toolCallId,toolName:t.name,args:t.args,statuses:n,result:t.result,output:t.output,running:t.running,isError:t.isError}}var Fj;function Ij(e){Fj=e}function Lj(e,t){return Fj?.(e,t)??null}function Rj(e,t,n,r){let i={sessionId:e,openTab:t,openTransientTab:r.open,closeTransientTab:r.close,sendSessionFrame:Bk,statuses:n,renderThread(t){return e===null?null:Lj(e,t)},renderSlot(e){return wj(e).flatMap(e=>e.component===void 0?[]:[(0,w.createElement)(e.component,{...i,key:`${e.pluginId}:${e.id}`})])},slotData(e){return wj(e.slot).flatMap(e=>e.data===void 0?[]:[{pluginId:e.pluginId,id:e.id,order:e.order,data:e.data}])}};return i}var zj=[],Bj=new bD({});function Vj(e,t){return(t===null?void 0:e[t])??zj}function Hj(e,t,n){if(t!==void 0&&n!==void 0)return Vj(e,t).find(e=>e.id===n)}function Uj(e,t){Bj.setState(n=>{let r=n[e]??[];return r.some(e=>e.id===t.id)?n:{...n,[e]:[...r,t]}})}function Wj(e,t){Bj.setState(n=>{let r=n[e];return r===void 0||!r.some(e=>e.id===t)?n:{...n,[e]:r.filter(e=>e.id!==t)}})}function Gj(e){Bj.setState(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})}function Kj(e){return DD(Bj,t=>Vj(t,e))}function qj(){let e=DD(Hk,e=>e.activeId),t=FD();return n=>{e!==null&&t(n===null?{to:`/session/$sessionId`,params:{sessionId:e}}:{to:`/session/$sessionId/$tabId`,params:{sessionId:e,tabId:n}})}}function Jj(e){let t=DD(aA(e),e=>e.statuses),n=qj();return Rj(e,n,t,{open(t){e!==null&&(Uj(e,t),n(t.id))},close(t){e!==null&&Wj(e,t)}})}var Yj=12;function Xj(e){return e.running?`running`:e.isError?`error`:`ok`}function Zj({entry:e}){let t=e.output.length>0?e.output.split(`
78
+ `):[];return(0,N.jsx)(yC,{tone:Xj(e),expandable:t.length>Yj,children:({expanded:n})=>{let{shown:r,hidden:i}=UC(t,Yj,n);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(xC,{title:e.name,children:(0,N.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.argSummary})}),r.length>0?(0,N.jsxs)(SC,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`pre`,{"data-testid":`tool-output`,className:`whitespace-pre-wrap break-words`,children:r.join(`
79
+ `)}),i>0?(0,N.jsxs)(TC,{expands:!0,children:[`show `,i,` more line(s)`]}):null]}):null]})}})}function Qj({entry:e,sessionId:t}){let n=oA(e=>e.statuses),r=Jj(t),i=Aj(e.name,n),a=Xj(e),o=Pj(r,e,n);return(0,N.jsx)(YA,{toolName:e.name,children:t=>(0,N.jsx)(`div`,{"data-testid":`entry-tool`,"data-tool-name":e.name,"data-tool-state":a,"data-tool-renderer":t?`failed`:i?`plugin`:`host`,children:i&&!t?(0,N.jsx)(i.message,{...o}):(0,N.jsx)(Zj,{entry:e})})},e.toolCallId)}var $j=[`review the working tree and summarise the diff`,`run the affected nx targets and report failures`,`explain how the session socket handshake works`],eM=200,tM=400,nM=40,rM=.32,iM=2;function aM({label:e,tone:t,trailing:n=!1}){return(0,N.jsx)(`span`,{className:`shrink-0 text-[10px] font-bold ${n?`text-left`:`w-11 pt-0.5 text-right`} ${t}`,children:e})}var oM=(0,w.memo)(function({entry:e,sessionId:t}){if(e.kind===`user`)return(0,N.jsxs)(`div`,{"data-testid":`entry-user`,className:`flex items-center gap-3 pl-10`,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2 rounded-md border border-doom-border-soft bg-doom-deep px-3.5 py-2.5 text-[13px] text-doom-hi`,children:[(0,N.jsx)(fC,{text:e.text}),t?(0,N.jsx)(JA,{sessionId:t,mentions:KA(e.text)}):null]}),(0,N.jsx)(aM,{label:`you`,tone:`text-doom-cyan`,trailing:!0})]});if(e.kind===`assistant`)return(0,N.jsxs)(`div`,{"data-testid":`entry-assistant`,"data-streaming":e.streaming,className:`flex gap-3`,children:[(0,N.jsx)(aM,{label:`pi`,tone:`text-doom-magenta`}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[e.thinking?(0,N.jsx)(`div`,{"data-testid":`entry-thinking`,className:`text-[11px] text-doom-violet/80 [&_strong]:text-doom-violet [&_p]:whitespace-pre-wrap`,children:(0,N.jsx)(fC,{text:e.thinking})}):null,(0,N.jsxs)(`div`,{className:`text-[13px] text-doom-text`,children:[(0,N.jsx)(fC,{text:e.text}),e.streaming?(0,N.jsx)(LC,{}):null]})]})]});if(e.kind===`tool`)return(0,N.jsxs)(`div`,{className:`flex gap-3`,children:[(0,N.jsx)(aM,{label:`tool`,tone:`text-doom-faint`}),(0,N.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,N.jsx)(Qj,{entry:e,sessionId:t})})]});if(e.kind===`settled`)return(0,N.jsxs)(`div`,{"data-testid":`entry-settled`,className:`flex items-center gap-3 pl-14`,children:[(0,N.jsx)(IC,{className:`flex-1`}),(0,N.jsxs)(`span`,{className:`text-[10px] text-doom-faint`,children:[`agent settled`,e.tools>0?` · ${e.tools} tool${e.tools===1?``:`s`}`:``]}),(0,N.jsx)(IC,{className:`flex-1`})]});if(e.kind===`queued`)return(0,N.jsx)(`div`,{"data-testid":`entry-queued`,className:`flex pl-[58px]`,children:(0,N.jsxs)(Ff,{size:`md`,className:`self-start bg-doom-panel text-[10px]`,children:[(0,N.jsx)(le,{className:`h-3 w-3 shrink-0 text-doom-cyan`}),`queued follow-up: "`,e.text,`"`]})});let n=e.tone===`error`;return(0,N.jsxs)(`div`,{"data-testid":`entry-notice`,"data-tone":e.tone,className:`flex gap-3`,children:[(0,N.jsx)(aM,{label:n?`!`:`·`,tone:n?`text-doom-red`:`text-doom-faint`}),(0,N.jsx)(`p`,{className:`min-w-0 flex-1 break-words text-[12px] ${n?`text-doom-red`:`text-doom-dim`}`,children:e.text})]})});function sM({store:e,sessionId:t,empty:n,testId:r=`timeline`}){let i=DD(e,e=>e.entries),a=(0,w.useRef)(null),o=(0,w.useRef)(0),s=(0,w.useRef)(!0),c=(0,w.useRef)(null),l=(0,w.useRef)(!1),[u,d]=(0,w.useState)(!1),f=mA(t),p=(0,w.useRef)(null),m=(0,w.useRef)(null),h=(e,t)=>e.scrollTop+e.clientHeight>=t-eM,g=()=>{c.current!==null&&cancelAnimationFrame(c.current),c.current=null,l.current=!1},_=()=>{if(!a.current||c.current!==null)return;l.current=!0;let e=()=>{let t=a.current;if(!t||!s.current){c.current=null,l.current=!1;return}let n=Math.max(0,t.scrollHeight-t.clientHeight),r=n-t.scrollTop;if(Math.abs(r)<=1){t.scrollTop=n,c.current=null,l.current=!1,d(!1);return}let i=Math.max(iM,Math.abs(r)*rM);t.scrollTop+=Math.sign(r)*Math.min(Math.abs(r),i),c.current=requestAnimationFrame(e)};c.current=requestAnimationFrame(e)};return(0,w.useLayoutEffect)(()=>(g(),o.current=0,m.current=null,p.current=null,s.current=!0,d(!1),g),[e]),(0,w.useLayoutEffect)(()=>{let e=a.current;if(!e)return;let t=p.current,n=i.length>0&&m.current!==null&&i[0]?.id!==m.current;if(m.current=i[0]?.id??null,t!==null&&n){p.current=null;let n=e.scrollHeight-t.height;if(n>0){e.scrollTop=t.top+n,o.current=e.scrollHeight;return}}if(o.current===0){e.scrollTop=e.scrollHeight,o.current=e.scrollHeight,s.current=!0,d(!1);return}let r=l.current||h(e,o.current);if(o.current=e.scrollHeight,r){s.current=!0,d(!1),_();return}d(!0)},[i]),i.length===0?(0,N.jsx)(N.Fragment,{children:n}):(0,N.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,N.jsx)(`div`,{ref:a,onScroll:()=>{let e=a.current;if(!e)return;let n=h(e,e.scrollHeight);l.current||(s.current=n),n&&d(!1),e.scrollTop<=tM&&f&&(p.current={height:e.scrollHeight,top:e.scrollTop},hA(t))},onWheel:()=>{g(),s.current=!1},onPointerDown:()=>{g()},"data-testid":r,className:`flex flex-1 flex-col gap-[18px] overflow-y-auto px-[26px] py-[22px]`,children:i.map((e,n)=>(0,N.jsx)(`div`,{className:n<i.length-nM?`[contain-intrinsic-size:auto_64px] [content-visibility:auto]`:void 0,children:(0,N.jsx)(oM,{entry:e,sessionId:t})},e.id))}),u?(0,N.jsxs)(R,{variant:`subtle`,size:`sm`,"data-testid":`timeline-jump`,onClick:()=>{s.current=!0,d(!1),_()},className:`absolute bottom-3 left-1/2 -translate-x-1/2 border border-doom-border shadow-lg animate-doom-rise`,children:[(0,N.jsx)(re,{className:`h-3 w-3`}),`new activity below`]}):null]})}function cM(){let e=DD(Hk,e=>e.activeId);return(0,N.jsx)(sM,{store:aA(e),sessionId:e,empty:(0,N.jsx)(Sp,{"data-testid":`timeline`,title:`no messages yet`,description:`this session is attached and waiting. anything you send goes straight to the supervised agent.`,children:(0,N.jsx)(`div`,{"data-testid":`timeline-empty`,className:`mt-2 flex w-full flex-col gap-1.5`,children:$j.map((e,t)=>(0,N.jsxs)(R,{variant:`outline`,size:`lg`,"data-testid":`suggestion-${t}`,onClick:()=>EA(e),className:`h-auto justify-between bg-doom-panel px-3 py-2 text-left font-normal text-doom-text`,children:[(0,N.jsx)(`span`,{className:`flex-1 truncate`,children:e}),(0,N.jsx)(oe,{className:`h-3 w-3 shrink-0 text-doom-faint`})]},e))})})})}var lM=`thread-timeline`;function uM({sessionId:e,threadId:t}){return(0,w.useEffect)(()=>(LA(e,t),()=>RA(e,t)),[e,t]),(0,N.jsx)(sM,{store:aA(IA(e,t)),sessionId:e,testId:lM,empty:(0,N.jsx)(Sp,{"data-testid":`thread-empty`,title:`no messages yet`,description:`the agent's journal shows here as soon as it starts writing.`})})}function dM({slot:e,sessionId:t}){return(0,N.jsx)(N.Fragment,{children:Jj(t).renderSlot(e)})}var fM={profile:``,majorMode:``,domains:[],pending:!1},pM=/\u001B\[([0-9;]*)m/gu;function mM(e){let t=[],n=null,r=0;pM.lastIndex=0;for(let i=pM.exec(e);i!==null;i=pM.exec(e)){let a=e.slice(r,i.index);a&&t.push({text:a,rgb:n});let o=i[1].split(`;`).map(e=>Number.parseInt(e,10));o[0]===38&&o[1]===2?n=[o[2],o[3],o[4]]:(o[0]===39||o[0]===0||Number.isNaN(o[0]))&&(n=null),r=i.index+i[0].length}let i=e.slice(r);return i&&t.push({text:i,rgb:n}),t}function hM(e){return e.replace(pM,``)}var gM=[236,190,123],_M=[81,175,239];function vM(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}function yM(e){let t=mM(e),n=hM(e).trim();if(!n)return fM;let r=/\*([^*]+)\*/u.exec(n),i=/\[([^\]]+)\]/u.exec(n),a=(i?n.slice(n.indexOf(i[0])+i[0].length):``).replace(/^:/u,``).split(`,`).map(e=>e.trim()).filter(Boolean),o=t.find(e=>e.text.includes(`[`)),s=o?.rgb!==void 0&&o?.rgb!==null&&vM(o.rgb,gM)<vM(o.rgb,_M);return{profile:r?r[1]:``,majorMode:i?i[1]:``,domains:a,pending:s}}var bM=`,`,xM=[{name:`profile`,command:`profile`,statusKey:`doom-profile`,emptyLabel:`no profile`,order:10},{name:`domains`,command:`domains`,statusKey:`doom-domain`,emptyLabel:`no domains`,multi:!0,order:20}];function SM(e){let t=Dj();return(t.length>0?t:xM).flatMap(t=>{let n=e[t.statusKey];if(n===void 0)return[];let r=t.multi===!0,i=(r?hM(n).split(bM):[hM(n)]).map(e=>e.trim()).filter(Boolean);return[{name:t.name,command:t.command,values:i,emptyLabel:t.emptyLabel,multi:r}]})}var CM=[{name:`help`,keys:`h e`},{name:`plan`,keys:`p e`,statusKey:`plan-mode`},{name:`loop`,keys:`l l`,statusKey:`doom-loop`},{name:`goal`,keys:`g e`,statusKey:`goal`},{name:`workflow`,keys:`w e`,widgetKey:`workflow-mcp-progress`},{name:`voice`,modeId:`voice-auto`,keys:`v e`,statusKey:`doom-voice`}];function wM(e,t){let n=new Set([t.id.toLowerCase(),t.id.toLowerCase().split(`.`)[0],t.label.toLowerCase()]);return e.find(e=>n.has(e.name.toLowerCase()))}function TM(e,t){let n=t.modes.map(t=>{let n=wM(e,t),r=t.activation===`active`||t.activation===`deactivating`,i=t.actions.length>0&&t.actions.every(e=>!e.enabled),a=i?t.actions.find(e=>e.disabledReason)?.disabledReason??``:``;return{name:n?.name??t.label.toLowerCase(),id:t.id,keys:n?.keys??``,availability:i&&!r?`unavailable`:r?`on`:`off`,detail:t.detail??(t.activation===`activating`?`activating`:``),unavailableReason:a}}),r=new Set(n.map(e=>e.name));for(let t of e)r.has(t.name)||n.push({name:t.name,id:t.modeId??t.name,keys:t.keys,availability:`unavailable`,detail:``,unavailableReason:`No package in this session registers this mode.`});return n}function EM(e,t,n=null){let r=Oj(),i=r.length>0?r:CM;return n?TM(i,n):i.map(n=>{if(n.statusKey!==void 0){let t=e[n.statusKey];if(t===void 0)return{name:n.name,id:n.modeId??n.name,keys:n.keys,availability:`unavailable`,detail:``,unavailableReason:`This session has not reported the mode.`};let r=hM(t).trim();return{name:n.name,id:n.modeId??n.name,keys:n.keys,availability:r?`on`:`off`,detail:r,unavailableReason:``}}return n.widgetKey!==void 0&&t.includes(n.widgetKey)?{name:n.name,id:n.modeId??n.name,keys:n.keys,availability:`off`,detail:``,unavailableReason:``}:{name:n.name,id:n.name,keys:n.keys,availability:`unavailable`,detail:``,unavailableReason:`This session has not reported the mode.`}})}function DM(e,t){let n=[];for(let r of kj()){let i=r.tab===void 0?{}:{tab:r.tab};if(r.statusKey!==void 0&&e[r.statusKey]!==void 0){let t=hM(e[r.statusKey]??``).trim();n.push({name:r.name,keys:r.keys,summary:t,active:t.length>0,...i});continue}r.widgetKeys!==void 0&&r.widgetKeys.some(e=>t.includes(e))&&n.push({name:r.name,keys:r.keys,summary:``,active:!1,...i})}return n}function OM({onClose:e}){let t=DD(Hk,e=>e.activeId),n=oA(e=>e.statuses),r=oA(e=>e.widgets),i=Jj(t),a=DM(n,r),o=a.filter(e=>e.active).length;return(0,N.jsxs)(`aside`,{"data-testid":`activity-dock`,className:`flex w-[300px] shrink-0 flex-col overflow-hidden border-l border-doom-border bg-doom-rail`,children:[(0,N.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center justify-between border-b border-doom-border px-4`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(FC,{className:`text-doom-hi`,children:`activity`}),o>0?(0,N.jsxs)(hC,{tone:`running`,size:`xs`,"data-testid":`activity-busy`,className:`normal-case`,children:[o,` running`]}):null]}),(0,N.jsx)(R,{variant:`ghost`,size:`xs`,"data-testid":`activity-close`,onClick:e,className:`text-[10px]`,children:`hide`})]}),(0,N.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[a.length===0?(0,N.jsx)(Sp,{"data-testid":`activity-empty`,className:`px-4 py-5`,title:`nothing supervised yet`,description:`a package's group appears here once its extension reports in.`}):(0,N.jsx)(`div`,{className:`flex flex-col`,children:a.map(e=>(0,N.jsxs)(`div`,{"data-testid":`activity-${e.name}`,"data-active":e.active,className:`flex flex-col gap-2 border-b border-doom-border-soft px-3 py-3`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2 px-1`,children:[(0,N.jsx)(`span`,{"aria-hidden":!0,"data-active":e.active,className:`text-[11px] font-bold ${e.active?`animate-pulse text-doom-yellow`:`text-doom-faint`}`,children:`#`}),(0,N.jsx)(`span`,{className:`flex-1 text-[11px] font-bold text-doom-text`,children:e.name}),e.tab===void 0?(0,N.jsx)(Cp,{"data-testid":`activity-keys-${e.name}`,className:`bg-doom-panel`,children:e.keys}):(0,N.jsx)(R,{variant:`subtle`,size:`xs`,"data-testid":`activity-open-${e.name}`,title:`open the ${e.tab} tab`,onClick:()=>i.openTab(e.tab??null),className:`h-auto px-1.5 py-0.5 text-[8px] font-bold text-doom-violet hover:text-doom-magenta`,children:e.keys})]}),wj(oj(e.name)).length>0?i.renderSlot(oj(e.name)):(0,N.jsx)(`p`,{"data-testid":`activity-summary-${e.name}`,className:`px-1 text-[10px] ${e.active?`text-doom-yellow`:`text-doom-faint`}`,children:e.summary||`idle`})]},e.name))}),(0,N.jsx)(dM,{slot:nj.activity,sessionId:t})]}),(0,N.jsx)(`div`,{className:`border-t border-doom-border px-4 py-3`,children:(0,N.jsx)(`span`,{className:`text-[9px] leading-relaxed text-doom-faint`,children:`each group is rendered by the package that owns it; the session's summary line stands in until that package publishes per-run detail`})})]})}var kM=6e4,AM=36e5;function jM(e){if(e<kM)return`<1m`;if(e<AM)return`${Math.floor(e/kM)}m`;let t=Math.floor(e/AM),n=Math.floor(e%AM/kM);return`${t}h ${String(n).padStart(2,`0`)}m`}function MM(e,t){if(e.attach===`refused`)return`another cockpit holds this session`;if(e.awaitingInput)return`waiting for your input`;if(e.phase!==`idle`){let n=Date.parse(e.phaseSince);return`running · ${jM(Number.isFinite(n)?Math.max(0,t-n):0)}`}return!e.everPrompted&&e.lastSettledAt===void 0?`fresh session · nothing sent yet`:`done · waiting for you`}function NM(e){let t=0;for(let n of e)n!==`idle`&&(t+=1);return t}function PM(e){let t=/^\/(?:Users|home)\/[^/]+/u.exec(e);return t?`~${e.slice(t[0].length)}`:e}function FM({label:e,value:t}){return(0,N.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,N.jsx)(`span`,{className:`shrink-0 text-[10px] text-doom-faint`,children:e}),(0,N.jsx)(`span`,{className:`truncate text-[10px] text-doom-text`,children:t})]})}function IM(){let e=eA();return e===null||e.attach!==`refused`?null:(0,N.jsx)(Rf,{open:!0,children:(0,N.jsxs)(Hf,{width:`lg`,"data-testid":`refused-card`,"aria-describedby":void 0,className:`w-[520px] border-doom-red/50`,onEscapeKeyDown:e=>e.preventDefault(),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,N.jsxs)(Uf,{className:`border-doom-red/40 bg-doom-red/10`,children:[(0,N.jsx)(Wf,{"data-testid":`refused-title`,className:`text-doom-red`,children:`session already attached`}),(0,N.jsx)(If,{className:`text-doom-red/70`})]}),(0,N.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 py-4`,children:[(0,N.jsx)(`p`,{className:`text-[12px] leading-relaxed text-doom-text`,children:`doompi-server holds one client at a time so two views cannot fight over the same agent. Another cockpit is attached to this socket right now.`}),(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded border border-doom-border bg-doom-deep px-3 py-2.5`,children:[(0,N.jsx)(FM,{label:`reason`,value:e.reason||`attach_error`}),(0,N.jsx)(FM,{label:`socket`,value:e.summary.socketPath}),(0,N.jsx)(FM,{label:`cwd`,value:PM(e.summary.cwd)}),(0,N.jsx)(FM,{label:`retry`,value:`automatic, with backoff`})]}),(0,N.jsx)(`p`,{"data-testid":`refused-hint`,className:`text-[10px] text-doom-faint`,children:`close the other cockpit and this one takes over on the next attempt.`})]})]})})}var LM=null;function RM(e){return LM=e,()=>{LM===e&&(LM=null)}}function zM(){LM===null||LM.disabled||LM.focus()}var BM=1e4,VM=new bD({pending:null,at:0,claimed:null}),HM;function UM(e){VM.setState(t=>({...t,pending:e,at:Date.now()})),HM!==void 0&&clearTimeout(HM),HM=setTimeout(WM,BM)}function WM(){HM!==void 0&&clearTimeout(HM),HM=void 0,VM.setState(e=>e.pending===null?e:{...e,pending:null,at:0})}function GM(e){let{pending:t,at:n}=VM.state;return t===null||e-n>BM?null:t}function KM(e,t=Date.now()){let n=GM(t),r=n===null?null:{dialogId:e,menu:n};return WM(),VM.setState(e=>({...e,claimed:r})),r}function qM(){let e=oA(e=>e.dialog),t=DD(VM,e=>e.claimed),[n,r]=(0,w.useState)(``),[i,a]=(0,w.useState)(0);return(0,w.useEffect)(()=>{r(e?.prefill??``),a(0)},[e?.id,e?.prefill]),!e||e.method===`select`&&t!==null&&t.dialogId===e.id?null:(0,N.jsx)(Rf,{open:!0,onOpenChange:t=>{t||NA(e.id)},children:(0,N.jsxs)(Hf,{width:`lg`,"data-testid":`dialog`,"data-dialog-method":e.method,"aria-describedby":void 0,onKeyDown:t=>{e.method===`select`&&ap(t,{options:e.options,cursor:i,onCursorChange:a,onSelect:t=>jA(e.id,t)})},onCloseAutoFocus:e=>{e.preventDefault(),zM()},className:`rounded-[10px] border-doom-edge-magenta`,children:[(0,N.jsxs)(Uf,{className:`h-[42px] border-doom-edge-magenta bg-doom-tint-magenta py-0`,children:[(0,N.jsxs)(Wf,{"data-testid":`dialog-title`,className:`flex items-center gap-2 text-doom-magenta`,children:[(0,N.jsx)(de,{className:`h-[13px] w-[13px] shrink-0`}),e.title]}),(0,N.jsxs)(`span`,{className:`text-[9px] text-doom-faint`,children:[`extension · `,e.method]})]}),(0,N.jsxs)(Kf,{children:[e.message&&e.method===`select`?(0,N.jsx)(EC,{"data-testid":`dialog-command`,className:`bg-doom-deep px-3 py-2.5`,children:(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(`span`,{className:`text-[12px] text-doom-green`,children:`$`}),(0,N.jsx)(`pre`,{"data-testid":`dialog-message`,className:`min-w-0 flex-1 whitespace-pre-wrap break-words text-[12px] leading-relaxed text-doom-hi`,children:e.message})]})}):e.message?(0,N.jsx)(`p`,{"data-testid":`dialog-message`,className:`text-[12px] leading-relaxed text-doom-text`,children:e.message}):null,e.method===`select`?(0,N.jsx)(pp,{options:e.options,cursor:i,onCursorChange:a,testIdPrefix:`dialog-option`,onSelect:t=>jA(e.id,t)}):null,e.method===`input`||e.method===`editor`?(0,N.jsx)(HC,{"data-testid":`dialog-input`,value:n,autoFocus:!0,rows:e.method===`editor`?5:1,placeholder:e.placeholder,onChange:e=>r(e.target.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&e.method===`input`&&(t.preventDefault(),jA(e.id,n))}}):null]}),(0,N.jsxs)(Jf,{variant:`bar`,className:`h-[34px]`,children:[(0,N.jsxs)(`span`,{"data-testid":`dialog-hints`,className:`flex items-center gap-1.5 text-[10px] text-doom-faint`,children:[e.method===`select`?op(e.options.length):`enter confirm`,` · `,(0,N.jsx)(Cp,{children:`esc`}),` `,`cancels and tells the agent`]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(R,{variant:`outline`,size:`sm`,"data-testid":`dialog-cancel`,onClick:()=>NA(e.id),children:`cancel`}),e.method===`confirm`?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(R,{variant:`danger-outline`,size:`sm`,"data-testid":`dialog-deny`,onClick:()=>MA(e.id,!1),children:`no`}),(0,N.jsx)(R,{variant:`success`,size:`sm`,"data-testid":`dialog-confirm`,onClick:()=>MA(e.id,!0),children:`yes`})]}):null,e.method===`input`||e.method===`editor`?(0,N.jsx)(R,{variant:`primary`,size:`sm`,"data-testid":`dialog-submit`,onClick:()=>jA(e.id,n),children:`submit`}):null]})]})]})})}var JM=new bD({open:!1,path:``});function YM(){JM.setState(()=>({open:!0,path:``}))}function XM(){JM.setState(()=>({open:!1,path:``}))}function ZM(){JM.setState(e=>({open:!e.open,path:``}))}function QM(e){JM.setState(t=>({...t,path:e}))}var $M=`SPC`,eN=`/`,tN=/^[a-z0-9]$/;function nN(e){return[$M,...e].join(` `)}function rN(){let e=oA(e=>e.commands),{open:t,path:n}=DD(JM),r=DD(Hk,e=>e.activeId),i=qj(),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(0),l=(0,w.useRef)(null),u=(0,w.useRef)(null);(0,w.useEffect)(()=>{let e=e=>{(e.key===`k`||e.key===` `)&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),ZM())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,w.useEffect)(()=>{t&&(o(``),c(0))},[t]);let d=(0,w.useMemo)(()=>n.split(``),[n]),f=Ej(),p=(0,w.useMemo)(()=>tj(f,d)??tj(f,[]),[f,d]),m=p?.options??[],h=a.trim().toLowerCase(),g=h.length>0,_=(0,w.useMemo)(()=>g?e.filter(e=>e.name.toLowerCase().includes(h)):[],[e,h,g]),v=d.length===0&&!g?Tj():[],y=g?_.length:m.length,b=Math.min(s,Math.max(y-1,0)),x=g?void 0:m[b],S=g?_[b]:void 0,C=e=>{if(XM(),`command`in e){AA(e.command);return}e.run({sessionId:r,openTab:i,sendSessionFrame:Bk})},T=(e,t=d)=>{if(e.binding){C(e.binding);return}QM([...t,e.key].join(``)),c(0)},E=()=>{if(d.length===0){XM();return}QM(d.slice(0,-1).join(``)),c(0)},ee=e=>{XM(),AA(e)},D=e=>{let t=Tj().find(t=>t.id===e);t&&(XM(),t.run({sessionId:r,openTab:i,sendSessionFrame:Bk}))};return(0,N.jsx)(Rf,{open:t,onOpenChange:e=>{e||XM()},children:(0,N.jsxs)(Hf,{ref:l,width:`lg`,"data-testid":`palette`,"data-path":n,"aria-describedby":void 0,onKeyDown:e=>{if(e.target===u.current)return;if(e.key===`Backspace`){e.preventDefault(),E();return}if(e.key===`ArrowDown`){e.preventDefault(),c(Math.min(b+1,Math.max(y-1,0)));return}if(e.key===`ArrowUp`){e.preventDefault(),c(Math.max(b-1,0));return}if(e.key===`Enter`){e.preventDefault(),x&&T(x);return}if(e.key===eN){e.preventDefault(),u.current?.focus();return}if(e.ctrlKey||e.metaKey||e.altKey)return;let t=e.key.toLowerCase();if(!tN.test(t))return;let n=m.find(e=>e.key===t);n&&(e.preventDefault(),T(n))},onOpenAutoFocus:e=>{e.preventDefault(),l.current?.focus()},onCloseAutoFocus:e=>{e.preventDefault(),zM()},onEscapeKeyDown:e=>{g&&document.activeElement===u.current&&(e.preventDefault(),o(``),c(0),l.current?.focus())},className:`top-[12vh] w-[720px] max-w-[92vw] translate-y-0`,children:[(0,N.jsx)(Wf,{className:`sr-only`,children:`Leader Space`}),(0,N.jsxs)(mp,{className:`gap-3 px-4 py-3`,children:[(0,N.jsx)(hC,{tone:`accent`,size:`xs`,className:`tracking-widest`,children:$M}),(0,N.jsx)(`span`,{"data-testid":`palette-path`,className:`text-[12px] font-bold text-doom-hi`,children:d.length===0?`Leader Space`:`${d.join(` `)} · ${p?.label??``}`}),(0,N.jsx)(hp,{ref:u,"data-testid":`palette-filter`,value:a,autoFocus:!1,placeholder:`/ search commands…`,onChange:e=>{o(e.target.value),c(0)},onKeyDown:e=>{if(e.key===`ArrowDown`){e.preventDefault(),c(Math.min(b+1,Math.max(y-1,0)));return}if(e.key===`ArrowUp`){e.preventDefault(),c(Math.max(b-1,0));return}e.key===`Enter`&&S&&(e.preventDefault(),ee(S.name))},className:`text-right`}),(0,N.jsx)(`span`,{"data-testid":`palette-count`,className:`text-[10px] text-doom-faint`,children:y})]}),(0,N.jsxs)(`div`,{className:`flex min-h-[260px]`,children:[(0,N.jsxs)(gp,{"data-testid":`palette-keys`,className:`w-[280px] shrink-0 gap-0 border-r border-doom-border p-1`,children:[g?_.length===0?(0,N.jsx)(bp,{"data-testid":`palette-no-match`,children:`no command matches`}):_.map((e,t)=>(0,N.jsxs)(vp,{"data-testid":`palette-sub-${e.name}`,active:t===b,onMouseEnter:()=>c(t),onClick:()=>ee(e.name),className:M(`w-full gap-2.5 px-3 py-1.5`,t===b&&`bg-doom-magenta/10`),children:[(0,N.jsxs)(`span`,{className:`text-[11px] font-bold text-doom-blue`,children:[`/`,e.name]}),(0,N.jsx)(yp,{className:`text-[10px] text-doom-faint`,children:e.description})]},e.name)):m.length===0?(0,N.jsx)(bp,{"data-testid":`palette-empty`,children:d.length===0?`no package in this bundle registered leader keys · / searches the session’s commands`:`nothing bound under this key`}):m.map((e,t)=>(0,N.jsxs)(vp,{"data-testid":`palette-item-${t}`,"data-key":e.key,active:t===b,onMouseEnter:()=>c(t),onClick:()=>T(e),className:M(`w-full gap-2.5 px-3 py-1.5`,t===b&&`bg-doom-magenta/10`),children:[(0,N.jsx)(Cp,{className:M(`w-5 text-center`,t===b?`bg-doom-magenta/25 text-doom-magenta`:`bg-doom-deep text-doom-dim`),children:e.key}),(0,N.jsx)(yp,{className:`text-[11px] text-doom-text`,children:e.label}),e.binding?null:(0,N.jsxs)(`span`,{className:`text-[9px] text-doom-faint`,children:[e.children.length,` `,e.children.length===1?`key`:`keys`]})]},e.key)),v.length>0?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(_p,{children:`plugins`}),v.map(e=>(0,N.jsxs)(vp,{"data-testid":`palette-plugin-${e.id}`,onClick:()=>D(e.id),className:`w-full gap-2.5 px-3 py-1.5 hover:bg-doom-magenta/10`,children:[(0,N.jsx)(yp,{className:`text-[11px] text-doom-text`,children:e.title}),e.description?(0,N.jsx)(`span`,{className:`truncate text-[9px] text-doom-faint`,children:e.description}):null]},e.id))]}):null]}),(0,N.jsxs)(`div`,{"data-testid":`palette-detail`,className:`flex min-w-0 flex-1 flex-col gap-2 px-4 py-3`,children:[S?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`span`,{className:`text-[12px] font-bold text-doom-blue`,children:[`/`,S.name]}),(0,N.jsx)(`span`,{className:`text-[11px] text-doom-faint`,children:S.description})]}):null,x?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`text-[12px] font-bold text-doom-magenta`,children:nN([...d,x.key])}),(0,N.jsx)(`span`,{className:`text-[12px] text-doom-hi`,children:x.label})]}),x.detail?(0,N.jsx)(`span`,{className:`text-[10px] text-doom-faint`,children:x.detail}):null,x.binding?(0,N.jsx)(`span`,{"data-testid":`palette-target`,className:`text-[11px] font-bold text-doom-blue`,children:`command`in x.binding?`/${x.binding.command}`:`in the cockpit`}):(0,N.jsx)(`div`,{className:`flex flex-col gap-1`,children:x.children.map(e=>(0,N.jsxs)(dp,{"data-testid":`palette-child-${e.key}`,onClick:()=>T(e,[...d,x.key]),className:`min-h-0 gap-3 border-doom-border-soft bg-doom-deep px-3 py-1.5 hover:border-doom-blue/50`,children:[(0,N.jsx)(`span`,{className:`w-5 text-center text-[10px] font-bold text-doom-magenta`,children:e.key}),(0,N.jsx)(`span`,{className:`text-[11px] font-bold text-doom-hi`,children:e.label}),(0,N.jsx)(fp,{className:`truncate text-[10px] text-doom-faint`,children:e.detail})]},e.key))})]}):null]})]}),(0,N.jsxs)(xp,{className:`px-4 py-2.5`,children:[(0,N.jsx)(`span`,{className:`flex items-center gap-1.5 text-[10px] text-doom-faint`,children:g?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Cp,{children:`↑↓`}),` move · `,(0,N.jsx)(Cp,{children:`enter`}),` run · `,(0,N.jsx)(Cp,{children:`esc`}),` back to keys`]}):(0,N.jsxs)(N.Fragment,{children:[`keys walk · `,(0,N.jsx)(Cp,{children:`⌫`}),` up · `,(0,N.jsx)(Cp,{children:`enter`}),` select · `,(0,N.jsx)(Cp,{children:`/`}),` search · `,(0,N.jsx)(Cp,{children:`esc`}),` close`]})}),(0,N.jsxs)(`span`,{className:`text-[10px] text-doom-dim`,children:[f.length,` keys · `,e.length,` commands`]})]})]})})}var iN={profile:`text-doom-green`,domains:`text-doom-violet`},aN={mode:`MAJOR MODE`,profile:`PROFILE`,domains:`DOMAINS`,minor:`MINOR MODES`},oN={mode:{border:`border-doom-edge-blue`,title:`text-doom-blue`},profile:{border:`border-doom-edge-green`,title:`text-doom-green`},domains:{border:`border-doom-edge-violet`,title:`text-doom-violet`},minor:{border:`border-doom-edge-magenta`,title:`text-doom-magenta`}},sN={border:`border-doom-border`,title:`text-doom-hi`},cN={on:`text-doom-hi`,off:`text-doom-dim`,unavailable:`text-doom-faint/60`};function lN({menu:e,dialog:t}){let n=oN[e]??sN,[r,i]=(0,w.useState)(0);return(0,N.jsxs)(AC,{side:`top`,align:`start`,"data-testid":`dialog`,"data-dialog-method":t.method,"data-dialog-menu":e,onCloseAutoFocus:e=>{e.preventDefault(),zM()},onKeyDown:e=>ap(e,{options:t.options,cursor:r,onCursorChange:i,onSelect:e=>jA(t.id,e)}),className:`w-[420px] ${n.border}`,children:[(0,N.jsxs)(jC,{children:[(0,N.jsx)(`span`,{"data-testid":`dialog-title`,className:`text-[10px] font-bold tracking-wide ${n.title}`,children:aN[e]??e.toUpperCase()}),(0,N.jsx)(`span`,{className:`truncate text-[9px] text-doom-faint`,children:t.title})]}),(0,N.jsx)(`div`,{className:`flex max-h-[320px] min-h-0 flex-col`,children:(0,N.jsx)(pp,{options:t.options,cursor:r,onCursorChange:i,density:`compact`,testIdPrefix:`dialog-option`,onSelect:e=>jA(t.id,e)})}),(0,N.jsxs)(MC,{children:[(0,N.jsxs)(`span`,{"data-testid":`dialog-hints`,className:`flex items-center gap-1.5`,children:[op(t.options.length),` · `,(0,N.jsx)(Cp,{children:`esc`}),` closes`]}),(0,N.jsx)(R,{variant:`ghost`,size:`xs`,"data-testid":`dialog-cancel`,onClick:()=>NA(t.id),children:`cancel`})]})]})}function uN({name:e,command:t,pending:n,claimedDialog:r,children:i,className:a}){let o=r!==null;return(0,N.jsxs)(DC,{open:o,onOpenChange:e=>{!e&&r&&NA(r.id)},children:[(0,N.jsx)(kC,{asChild:!0,children:(0,N.jsxs)(R,{"data-testid":`axis-${e}`,"data-pending":n,"aria-haspopup":`menu`,"aria-expanded":o,title:n?`asking the session for ${e}…`:`change ${e}`,onClick:()=>{UM(e),AA(t)},className:a,children:[i,n?(0,N.jsx)(If,{className:`h-[10px] w-[10px]`}):(0,N.jsx)(re,{className:`h-[10px] w-[10px]`})]})}),r?(0,N.jsx)(lN,{menu:e,dialog:r}):null]})}function dN({modes:e,onClose:t}){let n=e.filter(e=>e.availability===`on`).length;return(0,N.jsxs)(AC,{side:`top`,align:`start`,"data-testid":`minor-popup`,className:`w-[430px] border-doom-edge-magenta`,children:[(0,N.jsxs)(jC,{children:[(0,N.jsx)(FC,{className:`tracking-wide text-doom-magenta`,children:`minor modes`}),(0,N.jsxs)(`span`,{className:`text-[9px] text-doom-faint`,children:[n,` on`]})]}),(0,N.jsx)(`div`,{role:`listbox`,"aria-label":`minor modes`,className:`flex max-h-[320px] flex-col gap-0.5 overflow-y-auto p-1.5`,children:e.map(e=>(0,N.jsxs)(dp,{density:`compact`,active:e.availability===`on`,"data-testid":`minor-${e.name}`,"data-availability":e.availability,disabled:e.availability===`unavailable`,title:e.availability===`unavailable`?e.unavailableReason:`drive ${e.name}`,onClick:()=>{UM(`minor`),AA(`/minor ${e.id}`),t()},className:M(`w-full gap-2.5 py-1.5 transition-colors hover:bg-doom-deep focus-visible:bg-doom-deep disabled:cursor-not-allowed`,e.availability===`on`&&`bg-doom-tint-magenta hover:brightness-125`),children:[(0,N.jsx)(Cp,{className:`w-8 justify-center ${e.availability===`on`?`bg-doom-magenta/25 text-doom-magenta`:``}`,children:e.keys}),(0,N.jsx)(fp,{density:`compact`,className:cN[e.availability],children:e.name}),e.detail?(0,N.jsx)(`span`,{"data-testid":`minor-detail-${e.name}`,className:`truncate text-[9px] text-doom-magenta`,children:e.detail}):null,e.availability===`unavailable`&&e.unavailableReason?(0,N.jsx)(`span`,{"data-testid":`minor-reason-${e.name}`,className:`min-w-0 flex-1 truncate text-right text-[9px] text-doom-faint/70`,children:e.unavailableReason}):null,e.availability===`unavailable`?(0,N.jsx)(`span`,{className:`shrink-0 text-[8px] text-doom-faint/60`,children:`n/a`}):(0,N.jsx)(Xf,{tone:e.availability===`on`?`magenta`:`muted`})]},e.name))}),(0,N.jsx)(MC,{children:(0,N.jsx)(`span`,{children:`click drives a mode · one with several opt-ins asks · esc closes`})})]})}function fN({agent:e,models:t,levels:n,onClose:r}){let[i,a]=(0,w.useState)(``);(0,w.useEffect)(()=>{CA()},[]);let o=i.trim().toLowerCase(),s=o?t.filter(e=>`${e.provider} ${e.id} ${e.name}`.toLowerCase().includes(o)):t;return(0,N.jsxs)(AC,{side:`top`,align:`end`,"data-testid":`model-popup`,className:`w-[400px] border-doom-edge-yellow`,children:[(0,N.jsxs)(jC,{children:[(0,N.jsx)(FC,{className:`tracking-wide text-doom-yellow`,children:`model`}),(0,N.jsx)(`span`,{className:`truncate text-[9px] text-doom-faint`,children:e?`${e.provider}/${e.model}`:``})]}),(0,N.jsx)(`div`,{className:`border-b border-doom-border-soft p-1.5`,children:(0,N.jsx)(ip,{"data-testid":`model-filter`,value:i,autoFocus:!0,placeholder:`filter models…`,onChange:e=>a(e.target.value),className:`w-full px-2 py-1 text-[11px]`})}),(0,N.jsxs)(`div`,{role:`listbox`,"aria-label":`models`,className:`flex max-h-[260px] flex-col gap-0.5 overflow-y-auto p-1.5`,children:[t.length===0?(0,N.jsxs)(`span`,{className:`flex items-center gap-2 px-2 py-1.5 text-[10px] text-doom-faint`,children:[(0,N.jsx)(If,{label:`asking the session for its models`}),`asking the session for its models…`]}):s.length===0?(0,N.jsx)(Sp,{className:`py-4`,title:`no model matches`}):null,s.map(t=>{let n=e?.model===t.id&&e.provider===t.provider;return(0,N.jsxs)(dp,{density:`compact`,active:n,"data-testid":`model-${t.provider}-${t.id}`,"data-current":n,onClick:()=>{wA(t.provider,t.id),r()},className:M(`w-full gap-2.5 py-1.5 transition-colors hover:bg-doom-deep focus-visible:bg-doom-deep`,n&&`bg-doom-tint-yellow hover:brightness-125`),children:[(0,N.jsx)(`span`,{className:`w-20 shrink-0 truncate text-[9px] text-doom-faint`,children:t.provider}),(0,N.jsx)(fp,{density:`compact`,className:n?`text-doom-yellow`:`text-doom-hi`,children:t.id}),t.reasoning?(0,N.jsx)(`span`,{className:`text-[8px] text-doom-faint`,children:`thinks`}):null,(0,N.jsx)(Xf,{tone:n?`yellow`:`muted`})]},`${t.provider}/${t.id}`)})]}),(0,N.jsxs)(MC,{className:`flex-wrap justify-start gap-1 py-1.5`,children:[(0,N.jsx)(FC,{className:`mr-1 tracking-wide`,children:`thinking`}),n.length===0?(0,N.jsx)(`span`,{className:`text-[9px] text-doom-faint`,children:`…`}):null,n.map(t=>{let n=e?.thinkingLevel===t;return(0,N.jsx)(R,{variant:`ghost`,size:`xs`,"data-testid":`thinking-${t}`,"data-current":n,onClick:()=>{TA(t),r()},className:M(`text-[10px]`,n&&`bg-doom-yellow/25 font-bold text-doom-yellow hover:bg-doom-yellow/25`),children:t},t)})]})]})}function pN(){let e=DD(Hk,e=>e.activeId),t=oA(e=>e.statuses[`doom-major-mode`]??``),n=oA(e=>e.statuses),r=oA(e=>e.widgets),i=oA(e=>e.minorModes),a=oA(e=>e.agent),o=oA(e=>e.stats),s=oA(e=>e.models),c=oA(e=>e.thinkingLevels),l=oA(e=>e.dialog),u=DD(VM,e=>e.pending),d=DD(VM,e=>e.claimed),[f,p]=(0,w.useState)(!1),[m,h]=(0,w.useState)(!1),g=yM(t),_=SM(n),v=EM(n,r,i),y=v.filter(e=>e.availability===`on`),b=e=>l!==null&&d!==null&&d.dialogId===l.id&&d.menu===e?l:null,x=b(`minor`),S=M(Lf({variant:`primary`,size:`sm`}),`h-[21px] rounded-[3px] px-2 text-doom-rail`,g.pending&&`bg-doom-yellow`),C=M(Lf({variant:`outline`,size:`sm`}),`h-[21px] min-w-0 rounded-[3px] px-2`);return(0,N.jsxs)(`footer`,{"data-testid":`selection-bar`,"data-pending":g.pending,className:`relative flex h-[34px] shrink-0 items-center gap-2 border-t border-doom-border bg-doom-rail px-3.5`,children:[(0,N.jsx)(uN,{name:`mode`,command:`mode`,pending:u===`mode`,claimedDialog:b(`mode`),className:S,children:(0,N.jsx)(`span`,{"data-testid":`selection-mode`,className:`text-[10px] font-bold tracking-[0.08em]`,children:(g.majorMode||`mode`).toUpperCase()})}),_.map(e=>(0,N.jsx)(uN,{name:e.name,command:e.command,pending:u===e.name,claimedDialog:b(e.name),className:C,children:(0,N.jsx)(`span`,{"data-testid":`selection-${e.name}`,className:`truncate text-[10px] ${e.multi?``:`font-bold`} ${e.values.length>0?iN[e.name]??`text-doom-hi`:`text-doom-faint`}`,children:e.values.length===0?e.emptyLabel:e.multi?e.values.join(`, `):`*${e.values[0]}*`})},e.name)),(0,N.jsxs)(DC,{open:f||x!==null,onOpenChange:e=>{if(e){p(!0);return}x&&NA(x.id),p(!1)},children:[(0,N.jsx)(OC,{asChild:!0,children:(0,N.jsxs)(R,{"data-testid":`axis-minor`,title:`minor modes`,variant:y.length>0?`subtle`:`outline`,size:`sm`,className:M(`h-[21px] rounded-[3px] px-2`,y.length>0?`bg-doom-tint-magenta text-doom-magenta hover:bg-doom-tint-magenta hover:brightness-125`:`text-doom-faint`),children:[(0,N.jsx)(`span`,{"data-testid":`minor-summary`,className:`text-[10px] font-bold`,children:y[0]?.name??`minor`}),y.length>1?(0,N.jsxs)(`span`,{className:`text-[9px]`,children:[`+`,y.length-1]}):null,(0,N.jsx)(re,{className:`h-[10px] w-[10px]`})]})}),x?(0,N.jsx)(lN,{menu:`minor`,dialog:x}):f?(0,N.jsx)(dN,{modes:v,onClose:()=>p(!1)}):null]}),(0,N.jsx)(dM,{slot:nj.selectionBar,sessionId:e}),(0,N.jsx)(`div`,{className:`min-w-0 flex-1`}),(0,N.jsxs)(DC,{open:m,onOpenChange:h,children:[(0,N.jsx)(OC,{asChild:!0,children:(0,N.jsxs)(R,{"data-testid":`axis-model`,title:`model and thinking level`,className:C,children:[(0,N.jsx)(`span`,{"data-testid":`agent-model`,className:`text-[10px] text-doom-hi`,children:a?.model??`—`}),(0,N.jsx)(`span`,{"data-testid":`agent-thinking`,className:`text-[10px] text-doom-yellow`,children:a?.thinkingLevel??``}),(0,N.jsx)(re,{className:`h-[10px] w-[10px] text-doom-faint`})]})}),m?(0,N.jsx)(fN,{agent:a,models:s,levels:c,onClose:()=>h(!1)}):null]}),(0,N.jsx)(`span`,{"data-testid":`top-context`,title:o?.contextTokens!=null&&o.contextWindow!=null?`${o.contextTokens.toLocaleString()} of ${o.contextWindow.toLocaleString()} tokens`:`context usage, once the session reports it`,className:`text-[10px] text-doom-dim`,children:o?.contextPercent==null?`ctx —`:`ctx ${Math.round(o.contextPercent)}%`}),(0,N.jsx)(`span`,{"data-testid":`top-cost`,title:o?`${o.totalTokens.toLocaleString()} tokens this session`:``,className:`text-[10px] text-doom-dim`,children:o?`$${o.cost.toFixed(2)}`:``})]})}function mN(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function hN(e){let t;try{t=await fetch(LO,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch{return{error:`The cockpit hub is unreachable.`}}let n;try{n=await t.json()}catch{n=void 0}return t.ok&&mN(n)&&typeof n.sessionId==`string`?{sessionId:n.sessionId}:{error:mN(n)&&typeof n.error==`string`?n.error:`The hub answered ${t.status}.`}}async function gN(e){let t;try{t=await fetch(`${LO}/${encodeURIComponent(e)}`,{method:`DELETE`})}catch{return{error:`The cockpit hub is unreachable.`}}if(t.ok)return{ok:!0};let n;try{n=await t.json()}catch{n=void 0}return{error:mN(n)&&typeof n.error==`string`?n.error:`The hub answered ${t.status}.`}}async function _N(e,t){try{let n=await fetch(`/api/sessions/${encodeURIComponent(e)}/files?q=${encodeURIComponent(t)}`);if(!n.ok)return[];let r=await n.json();return Array.isArray(r.files)?r.files.filter(e=>typeof e==`string`):[]}catch{return[]}}async function vN(e){try{let t=await fetch(`${RO}?q=${encodeURIComponent(e)}`);if(!t.ok)return[];let n=await t.json();return Array.isArray(n.directories)?n.directories.filter(e=>typeof e==`string`):[]}catch{return[]}}var yN=192,bN=8,xN=150;function SN(e){let t=e.items[e.selected];return t!==void 0&&t.insert.trimEnd()===`${e.kind===`command`?`/`:`@`}${e.query}`}function CN(e,t){let n=e.slice(0,t),r=Math.max(n.lastIndexOf(` `),n.lastIndexOf(`
80
+ `))+1,i=n.slice(r);return i.startsWith(`/`)&&r===0?{kind:`command`,start:r,query:i.slice(1)}:i.startsWith(`@`)&&i.length<=64?{kind:`file`,start:r,query:i.slice(1)}:null}function wN(){let e=eA(),t=oA(e=>e.streaming),n=oA(e=>e.commands),[r,i]=(0,w.useState)(``),[a,o]=(0,w.useState)(0),[s,c]=(0,w.useState)(null),[l,u]=(0,w.useState)(null),d=(0,w.useRef)(null),f=(0,w.useRef)(null),p=(0,w.useRef)(void 0),m=e?.attach===`attached`,h=e?.summary.pendingMessageCount??0;(0,w.useEffect)(()=>RM(d.current),[]);let g=(0,w.useCallback)(()=>{let e=d.current;e&&(e.style.height=`auto`,e.style.height=`${String(Math.min(e.scrollHeight,yN))}px`)},[]);(0,w.useEffect)(()=>g(),[r,g]);let _=(0,w.useCallback)(()=>{p.current&&clearTimeout(p.current),u(null)},[]),v=(0,w.useCallback)(()=>{let e=CN(r,a);c(e?.start??null),_()},[r,a,_]);(0,w.useEffect)(()=>{let e=CN(r,a);if(!e||!m||s===e.start){_();return}if(e.kind===`command`){let t=n.filter(t=>t.name.toLowerCase().startsWith(e.query.toLowerCase())).slice(0,bN).map(e=>({insert:`/${e.name} `,label:`/${e.name}`,detail:e.description}));u(t.length>0?{kind:`command`,tokenStart:e.start,query:e.query,items:t,selected:0}:null);return}return p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{let t=nA();t!==null&&_N(t,e.query).then(t=>{let n=d.current;if(!n||CN(n.value,n.selectionStart)?.query!==e.query)return;let r=t.slice(0,bN).map(e=>({insert:`@${e} `,label:`@${e}`}));u(r.length>0?{kind:`file`,tokenStart:e.start,query:e.query,items:r,selected:0}:null)})},xN),()=>{p.current&&clearTimeout(p.current)}},[r,a,n,m,s,_]),(0,w.useEffect)(()=>{if(!l)return;let e=e=>{f.current&&e.target instanceof Node&&!f.current.contains(e.target)&&_()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[l,_]);let y=(e,t)=>{let n=e.items[t];if(!n)return;let s=r.slice(0,e.tokenStart)+n.insert+r.slice(a);i(s);let l=e.tokenStart+n.insert.length;o(l),c(e.tokenStart),requestAnimationFrame(()=>{d.current?.focus(),d.current?.setSelectionRange(l,l)})},b=()=>{!r.trim()||!m||(EA(r),i(``),o(0),c(null),_())},x=()=>{!r.trim()||!m||(DA(r),i(``),o(0),c(null),_())},S=m?t?`steer the run without stopping it…`:`ask anything · / for commands · @ for files…`:`waiting for the session…`;return(0,N.jsx)(`div`,{className:`shrink-0 border-t border-doom-border bg-doom-rail px-5 pt-3 pb-2.5`,children:(0,N.jsx)(DC,{open:l!==null,onOpenChange:e=>{e||v()},children:(0,N.jsx)(kC,{asChild:!0,children:(0,N.jsxs)(`div`,{ref:f,className:`relative rounded-lg border bg-doom-deep transition-colors focus-within:border-doom-blue/60 ${t?`border-doom-edge-yellow`:`border-doom-border`}`,children:[l?(0,N.jsxs)(AC,{side:`top`,align:`start`,sideOffset:8,"data-testid":`composer-completion`,onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),onInteractOutside:e=>{f.current?.contains(e.target)===!0&&e.preventDefault()},className:`w-[420px] max-w-[85vw] rounded-md p-0 shadow-xl`,children:[l.items.map((e,t)=>(0,N.jsxs)(dp,{density:`compact`,active:t===l.selected,"data-testid":`composer-completion-item-${String(t)}`,onMouseEnter:()=>u({...l,selected:t}),onMouseDown:e=>{e.preventDefault(),y(l,t)},className:`w-full items-baseline gap-2.5 rounded-none px-3 py-1.5`,children:[(0,N.jsx)(`span`,{className:`shrink-0 text-[12px] font-bold text-doom-blue`,children:e.label}),e.detail?(0,N.jsx)(fp,{density:`compact`,className:`text-[10px] text-doom-dim`,children:e.detail}):null]},e.label)),(0,N.jsx)(MC,{className:`py-1`,children:(0,N.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,N.jsx)(Cp,{children:`tab`}),` or `,(0,N.jsx)(Cp,{children:`enter`}),` completes · `,(0,N.jsx)(Cp,{children:`esc`}),` closes`]})})]}):null,(0,N.jsxs)(`div`,{className:`flex items-start gap-2.5 px-3.5 pt-3`,children:[(0,N.jsx)(`span`,{className:`mt-[3px] shrink-0 select-none text-[13px] leading-none text-doom-green`,children:`>`}),(0,N.jsx)(HC,{variant:`bare`,ref:d,"data-testid":`composer-input`,value:r,disabled:!m,onChange:e=>{i(e.target.value),o(e.target.selectionStart),c(null)},onClick:e=>o(e.currentTarget.selectionStart),onKeyUp:e=>o(e.currentTarget.selectionStart),onKeyDown:e=>{if(e.key===` `&&r===``){e.preventDefault(),YM();return}if(l){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1,n=l.items.length;u({...l,selected:(l.selected+t+n)%n});return}if(e.key===`Tab`){e.preventDefault(),y(l,l.selected);return}if(e.key===`Enter`&&!SN(l)){e.preventDefault(),y(l,l.selected);return}if(e.key===`Escape`){e.preventDefault(),v();return}}e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),b()),e.key===`Escape`&&t&&(e.preventDefault(),kA())},rows:1,placeholder:S,className:`min-h-[20px] flex-1 text-[13px] leading-relaxed`})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2 px-3.5 pt-2 pb-2.5`,children:[(0,N.jsx)(`span`,{"data-testid":`composer-hint`,className:`text-[10px] text-doom-faint`,children:t?`enter steers the run · esc aborts`:`enter sends · shift+enter for a new line · space opens leader`}),h>0?(0,N.jsxs)(Ff,{size:`xs`,"data-testid":`composer-queued`,className:`rounded-full border-transparent bg-doom-panel py-0.5 text-[9px] text-doom-dim`,children:[h,` queued`]}):null,(0,N.jsx)(`span`,{className:`min-w-0 flex-1`}),t?(0,N.jsxs)(R,{variant:`danger-outline`,size:`md`,"data-testid":`composer-abort`,onClick:()=>kA(),children:[(0,N.jsx)(fe,{className:`h-2 w-2 fill-current`}),`abort`]}):null,(0,N.jsx)(R,{variant:`outline`,size:`md`,"data-testid":`composer-queue`,onClick:x,disabled:!m||!r.trim(),title:`deliver after the current run settles`,children:`queue`}),(0,N.jsx)(R,{variant:`primary`,size:`md`,"data-testid":`composer-send`,onClick:b,disabled:!m||!r.trim(),className:`px-3.5`,children:t?`steer`:`send`})]})]})})})})}var TN=`3 2.5 26 25`,EN=26/25;function DN({size:e=24,className:t}){return(0,N.jsxs)(`svg`,{viewBox:TN,height:e,width:e*EN,className:t,"aria-hidden":`true`,focusable:`false`,children:[(0,N.jsxs)(`g`,{className:`fill-doom-yellow`,children:[(0,N.jsx)(`path`,{d:`M7 10Q6.2 4.2 9.3 3q1.1 3.3 2.8 6.6Z`}),(0,N.jsx)(`path`,{d:`M25 10q.8-5.8-2.3-7-1.1 3.3-2.8 6.6Z`})]}),(0,N.jsxs)(`g`,{className:`fill-doom-magenta`,children:[(0,N.jsx)(`rect`,{x:`3.2`,y:`8.6`,width:`25.6`,height:`7.6`,rx:`3.4`}),(0,N.jsx)(`rect`,{x:`6.9`,y:`14`,width:`5.5`,height:`13`,rx:`2.5`}),(0,N.jsx)(`rect`,{x:`19.6`,y:`14`,width:`5.5`,height:`13`,rx:`2.5`})]}),(0,N.jsxs)(`g`,{className:`fill-doom-deep`,children:[(0,N.jsx)(`circle`,{cx:`10.9`,cy:`12.3`,r:`1.9`}),(0,N.jsx)(`circle`,{cx:`21.1`,cy:`12.3`,r:`1.9`})]})]})}var ON=[{id:`providers`,label:`providers`,detail:`sign in to the model providers Pi can use`},{id:`appearance`,label:`appearance`,detail:`pick the theme the cockpit renders with`},{id:`plugins`,label:`plugins`,detail:`the web plugins this bundle carries and what their install resolved`}],kN=ON[0].id;function AN(e){return ON.find(t=>t.id===e)}var jN=`/`,MN=120,NN=-1,PN=/\/+$/;function FN({onClose:e}){let t=FD(),n=DD(Hk,e=>e.byId),r=DD(Hk,e=>e.activeId),[i,a]=(0,w.useState)(()=>r===null?``:n[r]?.summary.cwd??``),[o,s]=(0,w.useState)(``),[c,l]=(0,w.useState)(``),[u,d]=(0,w.useState)(!1),[f,p]=(0,w.useState)([]),[m,h]=(0,w.useState)(NN),g=(0,w.useRef)(null),_=[...new Set(Object.values(n).map(e=>e.summary.cwd))].slice(0,4);(0,w.useEffect)(()=>{let e=i.trim();if(e===``){p([]);return}let t=!1,n=setTimeout(async()=>{let n=await vN(e);t||(p(n.filter(t=>t!==e)),h(NN))},MN);return()=>{t=!0,clearTimeout(n)}},[i]);let v=e=>{a(`${e}${jN}`),g.current?.focus()},y=async()=>{let n=i.trim().replace(PN,``)||jN;if(u||!i.trim())return;d(!0),l(``);let r=await hN({cwd:n,name:o.trim()||void 0});if(`sessionId`in r){if(await $k(r.sessionId)){e(),await t({to:`/session/$sessionId`,params:{sessionId:r.sessionId}});return}l(`The session was created but has not appeared yet; it will show up in the rail.`),d(!1);return}l(r.error),d(!1)};return(0,N.jsx)(Rf,{open:!0,onOpenChange:t=>{t||e()},children:(0,N.jsxs)(Hf,{width:`md`,"data-testid":`new-session-dialog`,"aria-describedby":void 0,className:`w-[440px]`,children:[(0,N.jsx)(Uf,{children:(0,N.jsx)(Wf,{children:`new session`})}),(0,N.jsxs)(Kf,{children:[(0,N.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,N.jsxs)(`span`,{className:`text-[10px] text-doom-faint`,children:[`working directory `,(0,N.jsx)(`span`,{className:`text-doom-faint/70`,children:`(type a folder name or paste a path)`})]}),(0,N.jsx)(ip,{ref:g,"data-testid":`new-session-cwd`,value:i,autoFocus:!0,onChange:e=>a(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`&&f.length>0){e.preventDefault(),h(e=>(e+1)%f.length);return}if(e.key===`ArrowUp`&&f.length>0){e.preventDefault(),h(e=>e<=0?f.length-1:e-1);return}if(e.key===`Enter`){let e=m===NN?void 0:f[m];e===void 0?y():v(e)}},placeholder:`agirepo, or /absolute/path/to/project`})]}),f.length>0?(0,N.jsx)(`div`,{role:`listbox`,"aria-label":`matching directories`,"data-testid":`new-session-suggestions`,className:`max-h-40 overflow-y-auto rounded border border-doom-border bg-doom-deep p-1`,children:f.map((e,t)=>(0,N.jsx)(dp,{density:`compact`,active:t===m,"data-testid":`new-session-suggestion`,"data-highlighted":t===m,title:e,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>h(t),onClick:()=>v(e),className:`w-full px-2.5 py-1 text-[11px]`,children:e},e))}):null,_.length>0?(0,N.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:_.map(e=>(0,N.jsx)(R,{variant:`outline`,size:`xs`,"data-testid":`new-session-recent`,onClick:()=>a(e),className:`font-normal`,children:e},e))}):null,(0,N.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`span`,{className:`text-[10px] text-doom-faint`,children:`name (optional)`}),(0,N.jsx)(ip,{"data-testid":`new-session-name`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&y()},placeholder:`untitled`})]}),c?(0,N.jsx)(`pre`,{"data-testid":`new-session-error`,className:`max-h-28 overflow-y-auto rounded border border-doom-edge-red bg-doom-tint-red/40 px-2.5 py-2 text-[10px] leading-relaxed whitespace-pre-wrap break-words text-doom-red`,children:c}):null,(0,N.jsxs)(Jf,{children:[(0,N.jsx)(R,{variant:`outline`,"data-testid":`new-session-cancel`,onClick:e,children:`cancel`}),(0,N.jsx)(R,{variant:`primary`,"data-testid":`new-session-create`,onClick:()=>void y(),disabled:u||!i.trim(),children:u?`creating…`:`create`})]})]})]})})}var IN=3e4;function LN({sessionId:e,name:t,open:n,onConfirm:r,onCancel:i}){return(0,N.jsx)(Rf,{open:n,onOpenChange:e=>{e||i()},children:(0,N.jsxs)(Hf,{width:`sm`,"data-testid":`session-stop-dialog-${e}`,"aria-describedby":void 0,children:[(0,N.jsx)(Uf,{children:(0,N.jsx)(Wf,{children:`remove session`})}),(0,N.jsxs)(Kf,{children:[(0,N.jsxs)(Gf,{children:[`this stops `,(0,N.jsx)(`span`,{className:`font-bold text-doom-hi`,children:t||`untitled`}),` and removes it from the rail. anything it is running ends now.`]}),(0,N.jsxs)(Jf,{children:[(0,N.jsx)(R,{variant:`outline`,size:`md`,"data-testid":`session-stop-cancel-${e}`,autoFocus:!0,onClick:i,children:`cancel`}),(0,N.jsx)(R,{variant:`danger`,size:`md`,"data-testid":`session-stop-confirm-${e}`,onClick:r,children:`remove`})]})]})]})})}function RN({meta:e,ordinal:t,active:n,now:r}){let i=FD(),a=e.summary,[o,s]=(0,w.useState)(`view`),[c,l]=(0,w.useState)(``),[u,d]=(0,w.useState)(``),f=(0,w.useRef)(o);f.current=o;let p=MM({attach:e.attach,phase:a.phase,phaseSince:a.phaseSince,awaitingInput:a.awaitingInput,everPrompted:a.everPrompted,lastSettledAt:a.lastSettledAt},r),m=()=>{l(a.name),d(``),s(`rename`)},h=()=>{let e=c.trim();e&&e!==a.name&&OA(e,a.id),s(`view`)},g=async()=>{s(`view`);let e=await gN(a.id);`error`in e&&d(e.error)},_=n?`bg-doom-selected hover:bg-doom-selected`:`hover:bg-doom-panel`,v=o===`menu`,y=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`span`,{"data-testid":`session-status`,className:`text-[11px] leading-snug ${n?`line-clamp-2 text-doom-on-selected/85`:`truncate text-doom-dim`}`,children:p}),a.git?(0,N.jsxs)(`span`,{"data-testid":`session-branch`,className:`flex items-center gap-[7px] pt-0.5 text-[10px] ${n?`text-doom-on-selected/85`:`text-doom-faint`}`,children:[(0,N.jsx)(O,{className:`h-[10px] w-[10px] shrink-0 ${n?`text-doom-on-selected/70`:`text-doom-faint`}`}),a.git.branch,a.git.dirty?`*`:``]}):null,(0,N.jsx)(`span`,{className:`truncate text-[10px] ${n?`text-doom-on-selected/70`:`text-doom-faint`}`,children:PM(a.cwd)}),u?(0,N.jsx)(`span`,{"data-testid":`session-error`,className:`line-clamp-3 text-[10px] break-words text-doom-red`,children:u}):null]});return(0,N.jsxs)(`div`,{className:`group relative`,"data-testid":`session-card-${a.id}`,"data-active":n,children:[o===`rename`?(0,N.jsxs)(`div`,{className:M(Lf({variant:`ghost`,size:`card`}),_,`cursor-default`),children:[(0,N.jsx)(ip,{"data-testid":`session-name-input-${a.id}`,value:c,autoFocus:!0,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Enter`&&h(),e.key===`Escape`&&s(`view`)},onBlur:()=>s(`view`),className:`border-doom-blue/60 px-1.5 py-0.5 text-[13px] font-bold`}),y]}):(0,N.jsxs)(R,{variant:`ghost`,size:`card`,"data-testid":`session-open-${a.id}`,onClick:()=>void i({to:`/session/$sessionId`,params:{sessionId:a.id}}),className:_,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-bold ${n?`text-doom-on-selected`:`text-doom-hi`}`,children:a.name||`untitled`}),t<=9?(0,N.jsx)(`span`,{title:`press ${String(t)} to focus`,className:`flex h-[17px] w-[17px] shrink-0 items-center justify-center rounded-full text-[9px] font-bold transition-opacity group-focus-within:opacity-0 group-hover:opacity-0 ${n?`bg-doom-on-selected/20 text-doom-on-selected`:`bg-doom-tint-magenta text-doom-magenta`}`,children:t}):null]}),y]}),o===`view`||v?(0,N.jsx)(`div`,{className:`absolute top-2 right-2 transition-opacity ${v?`opacity-100`:`opacity-0 group-focus-within:opacity-100 group-hover:opacity-100`}`,children:(0,N.jsxs)(Zf,{open:v,onOpenChange:e=>s(t=>e?`menu`:t===`menu`?`view`:t),children:[(0,N.jsx)(Qf,{asChild:!0,children:(0,N.jsx)(R,{variant:`ghost`,size:`icon`,"data-testid":`session-menu-${a.id}`,title:`session actions`,className:n?`text-doom-on-selected/80 hover:bg-doom-on-selected/20 hover:text-doom-on-selected data-[state=open]:bg-doom-on-selected/20 data-[state=open]:text-doom-on-selected`:`text-doom-faint hover:bg-doom-deep hover:text-doom-hi data-[state=open]:bg-doom-deep data-[state=open]:text-doom-hi`,children:(0,N.jsx)(ae,{className:`h-3 w-3`})})}),(0,N.jsxs)(ep,{"data-testid":`session-menu-list-${a.id}`,onCloseAutoFocus:e=>{f.current!==`view`&&e.preventDefault()},children:[(0,N.jsx)(np,{"data-testid":`session-rename-${a.id}`,onSelect:m,children:`edit`}),(0,N.jsx)(np,{variant:`destructive`,"data-testid":`session-stop-${a.id}`,onSelect:()=>s(`confirm`),children:`remove`})]})]})}):null,(0,N.jsx)(LN,{sessionId:a.id,name:a.name,open:o===`confirm`,onConfirm:()=>void g(),onCancel:()=>s(`view`)})]})}function zN(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName===`INPUT`||e.tagName===`TEXTAREA`:!1}function BN(e){return e instanceof Element&&e.closest(`[role="dialog"], [role="menu"], [role="alertdialog"]`)!==null}function VN(){let e=FD(),t=DD(Hk,e=>e.order),n=DD(Hk,e=>e.byId),r=DD(Hk,e=>e.activeId),i=DD(aA(r),e=>e.dialog!==null),[a,o]=(0,w.useState)(!1),[s,c]=(0,w.useState)(()=>Date.now());(0,w.useEffect)(()=>{let e=setInterval(()=>c(Date.now()),IN);return()=>clearInterval(e)},[]),(0,w.useEffect)(()=>{let n=n=>{if(n.ctrlKey&&!n.metaKey&&!n.altKey&&n.key===`t`){n.preventDefault(),o(!0);return}if(n.ctrlKey||n.metaKey||n.altKey||n.defaultPrevented||zN(n.target)||BN(n.target)||JM.state.open||i)return;let r=Number.parseInt(n.key,10);if(!Number.isInteger(r)||r<1||r>9)return;let a=t[r-1];a!==void 0&&(n.preventDefault(),e({to:`/session/$sessionId`,params:{sessionId:a}}))};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[t,i,e]);let l=NM(t.map(e=>n[e].summary.phase));return(0,N.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,N.jsx)(`div`,{className:`flex items-center gap-[9px] border-b border-doom-border px-4 pt-4 pb-3.5`,children:(0,N.jsxs)(`span`,{className:`flex items-center gap-[3px]`,"aria-label":`DoomPi`,children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,className:`text-[15px] font-bold tracking-[0.16em] text-doom-hi`,children:`DOOM`}),(0,N.jsx)(DN,{size:22})]})}),(0,N.jsxs)(`div`,{className:`flex items-center justify-between px-4 pt-3.5 pb-2`,children:[(0,N.jsx)(FC,{children:`sessions`}),(0,N.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,N.jsxs)(`span`,{"data-testid":`sessions-running-rail`,className:`text-[9px] text-doom-faint`,children:[l,` running`]}),(0,N.jsx)(R,{variant:`ghost`,size:`icon`,"data-testid":`new-session-open`,title:`new session`,"aria-label":`new session`,onClick:()=>o(!0),className:`text-doom-faint hover:text-doom-hi`,children:(0,N.jsx)(ce,{className:`h-3 w-3`})})]})]}),(0,N.jsx)(`div`,{className:`flex flex-col gap-1 px-2.5`,children:t.map((e,t)=>(0,N.jsx)(RN,{meta:n[e],ordinal:t+1,active:e===r,now:s},e))}),t.length===0?(0,N.jsx)(`div`,{className:`px-2.5 pt-2`,children:(0,N.jsxs)(R,{variant:`outline`,size:`lg`,"data-testid":`new-session-empty`,onClick:()=>o(!0),className:`w-full justify-start px-[11px] text-[11px]`,children:[(0,N.jsx)(ce,{className:`h-3 w-3`}),`new session`]})}):null,(0,N.jsx)(dM,{slot:nj.rail,sessionId:r}),(0,N.jsx)(`div`,{className:`flex-1`}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2.5 border-t border-doom-border px-4 py-3`,children:[(0,N.jsxs)(KC,{children:[(0,N.jsx)(qC,{asChild:!0,children:(0,N.jsx)(R,{asChild:!0,variant:`ghost`,size:`icon`,className:`text-doom-faint`,children:(0,N.jsx)(ZD,{to:`/settings/$section`,params:{section:kN},"data-testid":`settings-open`,"aria-label":`settings`,children:(0,N.jsx)(ue,{className:`h-3 w-3`})})})}),(0,N.jsx)(JC,{side:`top`,children:`settings`})]}),(0,N.jsx)(`span`,{className:`text-[9px] text-doom-faint`,children:`ctrl+k commands · ctrl+t new session`})]}),a?(0,N.jsx)(FN,{onClose:()=>o(!1)}):null]})}function HN(e,t){return e===`attached`&&t?{text:`running`,tone:`running`,dot:`yellow`,pulse:!0}:e===`attached`?{text:`attached`,tone:`ok`,dot:`green`,pulse:!1}:e===`connecting`||e===`detached`?{text:e,tone:`running`,dot:`yellow`,pulse:e===`connecting`}:{text:e,tone:`error`,dot:`red`,pulse:!1}}function UN({tab:e,sessionId:t,active:n}){let r=(e.useBadge??WN)(t);return(0,N.jsx)(BC,{asChild:!0,active:n,children:(0,N.jsxs)(ZD,{to:`/session/$sessionId/$tabId`,params:{sessionId:t,tabId:e.id},"data-testid":`tab-${e.id}`,className:`shrink-0`,children:[e.label,r>0?(0,N.jsx)(VC,{active:n,"data-testid":`tab-${e.id}-count`,children:r}):null]})})}function WN(){return 0}function GN({tab:e,sessionId:t,active:n}){return(0,N.jsxs)(`span`,{"data-testid":`tab-${e.id}-chip`,className:`flex shrink-0 items-center gap-0.5`,children:[(0,N.jsx)(BC,{asChild:!0,active:n,children:(0,N.jsx)(ZD,{to:`/session/$sessionId/$tabId`,params:{sessionId:t,tabId:e.id},"data-testid":`tab-${e.id}`,title:e.label,className:`block min-w-0 max-w-[160px] truncate`,children:e.label})}),(0,N.jsx)(R,{variant:`ghost`,size:`icon`,"data-testid":`tab-${e.id}-close`,title:`close this tab`,onClick:()=>Wj(t,e.id),className:`h-5 w-5 shrink-0`,children:(0,N.jsx)(pe,{className:`h-2.5 w-2.5`})})]})}function KN({view:e=`conversation`}){let t=eA(),n=oA(e=>e),r=DD(Hk,e=>NM(e.order.map(t=>e.byId[t].summary.phase))),i=DD(Hk,e=>e.activeId),a=Kj(i),o=HN(t?.attach??`offline`,n.streaming||t!==null&&t.summary.phase!==`idle`),s=t?.summary.name||n.agent?.sessionName||`untitled`,[c,l]=(0,w.useState)(!1),[u,d]=(0,w.useState)(``),f=()=>{let e=u.trim();e&&e!==s&&OA(e,i),l(!1)};return(0,N.jsxs)(`header`,{"data-testid":`top-bar`,className:`flex h-12 shrink-0 items-center justify-between gap-3 border-b border-doom-border px-5`,children:[(0,N.jsxs)(`div`,{"data-testid":`session-switcher`,className:`flex min-w-0 items-center gap-2.5`,children:[c&&i!==null?(0,N.jsx)(ip,{"data-testid":`session-title-input`,value:u,autoFocus:!0,"aria-label":`session name`,onChange:e=>d(e.target.value),onKeyDown:e=>{e.key===`Enter`&&f(),e.key===`Escape`&&l(!1)},onBlur:f,className:`h-6 w-44 shrink-0 border-doom-blue/60 px-1.5 text-[13px] font-bold`}):(0,N.jsx)(R,{variant:`ghost`,"data-testid":`session-title`,title:i===null?void 0:`rename this session`,disabled:i===null,onClick:()=>{d(s),l(!0)},className:`h-6 shrink-0 px-1 text-[13px] font-bold text-doom-hi`,children:s}),t?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`span`,{className:`text-[12px] text-doom-faint`,children:`·`}),(0,N.jsx)(`span`,{"data-testid":`top-cwd`,className:`truncate text-[11px] text-doom-dim`,children:PM(t.summary.cwd)})]}):null,i===null?null:(0,N.jsxs)(`div`,{className:`ml-1.5 flex min-w-0 items-center gap-1.5 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:[(0,N.jsx)(BC,{asChild:!0,active:e===`conversation`,children:(0,N.jsx)(ZD,{to:`/session/$sessionId`,params:{sessionId:i},"data-testid":`tab-conversation`,className:`shrink-0`,children:`conversation`})}),Cj().map(t=>(0,N.jsx)(UN,{tab:t,sessionId:i,active:e===t.id},t.id)),a.map(t=>(0,N.jsx)(GN,{tab:t,sessionId:i,active:e===t.id},t.id))]})]}),(0,N.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[t&&t.dropped>0?(0,N.jsxs)(`span`,{"data-testid":`dropped-count`,title:`frames the hub's ring lost before this page subscribed`,className:`text-[10px] text-doom-yellow`,children:[t.dropped,` dropped`]}):null,(0,N.jsxs)(hC,{size:`md`,tone:o.tone,"data-testid":`connection-status`,className:`font-normal`,children:[(0,N.jsx)(Xf,{tone:o.dot,pulse:o.pulse}),o.text]}),(0,N.jsxs)(hC,{size:`md`,tone:`running`,"data-testid":`sessions-running`,className:`font-normal`,children:[(0,N.jsx)(te,{className:`h-[10px] w-[10px]`}),r,` running`]})]})]})}var qN=`doompi.web.dock`;function JN(){try{return window.localStorage.getItem(qN)!==`closed`}catch{return!0}}var YN=new bD({dockOpen:JN()});function XN(e){YN.setState(t=>t.dockOpen===e?t:{...t,dockOpen:e});try{window.localStorage.setItem(qN,e?`open`:`closed`)}catch{}}function ZN(){let e=DD(YN,e=>e.dockOpen),{sessionId:t,tabId:n}=ND({strict:!1}),r=FD(),i=Jj(t??null),a=DD(Hk,e=>e.order),o=DD(Hk,e=>e.hydrated),s=DD(Bj,e=>Hj(e,t,n)),c=(n===void 0?void 0:Cj().find(e=>e.id===n))??s;return(0,w.useEffect)(()=>{tA(t??null)},[t]),(0,w.useEffect)(()=>{if(!o)return;if(t!==void 0&&a.includes(t)){n!==void 0&&c===void 0&&r({to:`/session/$sessionId`,params:{sessionId:t},replace:!0});return}let e=a[0];e===void 0?t!==void 0&&r({to:`/`,replace:!0}):r({to:`/session/$sessionId`,params:{sessionId:e},replace:!0})},[o,t,n,c,a,r]),(0,N.jsxs)(`div`,{"data-testid":`cockpit`,className:`relative flex h-full overflow-hidden`,children:[(0,N.jsx)(`aside`,{className:`flex w-[300px] shrink-0 flex-col overflow-y-auto border-r border-doom-border bg-doom-rail`,children:(0,N.jsx)(VN,{})}),(0,N.jsxs)(`main`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,N.jsx)(KN,{view:c?.id??`conversation`}),c?(0,N.jsx)(c.panel,{...i}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(cM,{}),(0,N.jsx)(wN,{}),(0,N.jsx)(pN,{})]})]}),e?(0,N.jsx)(OM,{onClose:()=>XN(!1)}):(0,N.jsx)(R,{variant:`ghost`,"data-testid":`activity-show`,title:`show the activity dock`,onClick:()=>XN(!0),className:`h-auto shrink-0 rounded-none border-l border-doom-border bg-doom-rail px-2 py-3 text-[9px] tracking-widest text-doom-dim hover:bg-doom-rail`,style:{writingMode:`vertical-rl`},children:`ACTIVITY`}),(0,N.jsx)(qM,{}),(0,N.jsx)(IM,{}),(0,N.jsx)(rN,{}),(0,N.jsx)(dM,{slot:nj.overlay,sessionId:t??null})]})}var QN=[`bg`,`rail`,`panel`,`deep`,`border`,`border-soft`,`hi`,`text`,`dim`,`faint`,`blue`,`green`,`yellow`,`red`,`magenta`,`violet`,`cyan`,`orange`,`teal`,`selected`],$N=[`blue`,`green`,`yellow`,`red`,`magenta`,`violet`,`cyan`,`orange`,`teal`],eP=[`tint-blue`,`tint-green`,`tint-yellow`,`tint-red`,`tint-magenta`,`tint-violet`,`tint-cyan`,`tint-orange`,`tint-teal`,`edge-blue`,`edge-green`,`edge-yellow`,`edge-red`,`edge-magenta`,`edge-violet`,`edge-cyan`,`edge-orange`,`edge-teal`,`on-selected`,`font-mono`];[...QN,...eP];function tP(e){return`--doom-${e}`}var nP=`'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace`;function rP(e){if(e===`font-mono`)return nP;if(e===`on-selected`)return`color-mix(in srgb, var(--doom-selected) 12%, white)`;let[t,n]=e.split(`-`);return t===`tint`?`color-mix(in srgb, var(--doom-${n}) 16%, var(--doom-panel))`:`color-mix(in srgb, var(--doom-${n}) 40%, var(--doom-border))`}function iP(){let e=[];for(let t of $N)e.push(`tint-${t}`);for(let t of $N)e.push(`edge-${t}`);return e.push(`on-selected`,`font-mono`),e}function aP(e,t){let n=e.tokens[t];return n===void 0?rP(t):n}var oP=`data-theme`;function sP(e){let t={};for(let n of QN)t[tP(n)]=e.tokens[n];for(let n of iP())t[tP(n)]=aP(e,n);return t}function cP(e,t){for(let[n,r]of Object.entries(sP(e)))t.style.setProperty(n,r);t.style.colorScheme=e.scheme,t.setAttribute(oP,e.name)}var lP=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,uP=/^(?:#[0-9a-f]{3,8}|(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\((?:[^()]|\([^()]*\))*\)|[a-z]+)$/i;function dP(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function fP(e){if(!dP(e))return null;let{name:t,label:n,scheme:r,tokens:i}=e;if(typeof t!=`string`||!lP.test(t)||typeof n!=`string`||n.trim()===``||r!==`dark`&&r!==`light`||!dP(i))return null;let a={};for(let e of QN){let t=i[e];if(typeof t!=`string`||!uP.test(t.trim()))return null;a[e]=t.trim()}for(let e of eP){let t=i[e];if(t!==void 0){if(typeof t!=`string`||t.trim()===``)return null;a[e]=t.trim()}}return{name:t,label:n,scheme:r,tokens:a}}var pP={name:`doom-nord-dark`,label:`Doom Nord (dark)`,scheme:`dark`,tokens:{bg:`#2e3440`,rail:`#272c36`,panel:`#2b313d`,deep:`#232831`,border:`#434c5e`,"border-soft":`#353c4a`,hi:`#eceff4`,text:`#d8dee9`,dim:`#9aa4b8`,faint:`#616e88`,blue:`#81a1c1`,green:`#a3be8c`,yellow:`#ebcb8b`,red:`#bf616a`,magenta:`#b48ead`,violet:`#a3a7d6`,cyan:`#88c0d0`,orange:`#d08770`,teal:`#8fbcbb`,selected:`#4c6a92`}},mP={name:`doom-one-dark`,label:`Doom One (dark)`,scheme:`dark`,tokens:{bg:`#282c34`,rail:`#21242b`,panel:`#23272e`,deep:`#1c1f24`,border:`#3f444a`,"border-soft":`#2a2e35`,hi:`#dfdfdf`,text:`#bbc2cf`,dim:`#9ca0a4`,faint:`#5b6268`,blue:`#51afef`,green:`#98be65`,yellow:`#ecbe7b`,red:`#ff6c6b`,magenta:`#c678dd`,violet:`#a9a1e1`,cyan:`#46d9ff`,orange:`#da8548`,teal:`#4db5bd`,selected:`#2257a0`,"tint-blue":`#21313f`,"tint-green":`#262e1e`,"tint-yellow":`#312a1c`,"tint-red":`#332428`,"tint-magenta":`#2e2136`,"tint-violet":`#2d253f`,"edge-blue":`#2f4a68`,"edge-green":`#35452e`,"edge-yellow":`#574427`,"edge-red":`#6b3a3a`,"edge-magenta":`#4a3358`,"edge-violet":`#3b3558`}},hP={name:`doom-one-light`,label:`Doom One (light)`,scheme:`light`,tokens:{bg:`#fafafa`,rail:`#f0f0f0`,panel:`#f4f4f5`,deep:`#e7e7e8`,border:`#d4d4d8`,"border-soft":`#e4e4e7`,hi:`#1c1f24`,text:`#383a42`,dim:`#6b6f78`,faint:`#9ca0a4`,blue:`#4078f2`,green:`#50a14f`,yellow:`#986801`,red:`#e45649`,magenta:`#a626a4`,violet:`#7c5bcf`,cyan:`#0184bc`,orange:`#da8548`,teal:`#2f9c9c`,selected:`#4078f2`}};function gP(e,t){let n=fP(e);if(n===null)throw Error(`The shipped theme ${t} is malformed.`);return n}var _P=[gP(mP,`doom-one-dark.json`),gP(hP,`doom-one-light.json`),gP(pP,`doom-nord-dark.json`)],vP=_P[0];function yP(e){return _P.find(t=>t.name===e)}var bP=`doompi.web.theme`;function xP(e){try{let t=e?.getItem(`doompi.web.theme`)??null;return t===null||t===``?null:t}catch{return null}}function SP(e,t){try{t===null?e?.removeItem(bP):e?.setItem(bP,t)}catch{}}var CP=new bD({name:vP.name});function wP(){return _P}function TP(){try{return window.localStorage}catch{return}}function EP(){let e=xP(TP()),t=(e===null?void 0:yP(e))??vP;e!==null&&t.name!==e&&SP(TP(),null),cP(t,document.documentElement),CP.setState(()=>({name:t.name}))}function DP(e){let t=yP(e);t!==void 0&&(cP(t,document.documentElement),SP(TP(),e),CP.setState(()=>({name:e})))}var OP=[`blue`,`green`,`yellow`,`red`,`magenta`,`cyan`];function kP({theme:e}){let{tokens:t}=e;return(0,N.jsxs)(`div`,{"aria-hidden":!0,className:`flex h-[74px] w-full overflow-hidden rounded border`,style:{backgroundColor:t.bg,borderColor:t.border},children:[(0,N.jsxs)(`div`,{className:`flex w-[34%] flex-col gap-1 p-1.5`,style:{backgroundColor:t.rail},children:[(0,N.jsx)(`span`,{className:`h-[7px] w-full rounded-sm`,style:{backgroundColor:t.selected}}),(0,N.jsx)(`span`,{className:`h-[7px] w-3/4 rounded-sm`,style:{backgroundColor:t.panel}}),(0,N.jsx)(`span`,{className:`h-[7px] w-3/4 rounded-sm`,style:{backgroundColor:t.panel}})]}),(0,N.jsxs)(`div`,{className:`flex flex-1 flex-col justify-between p-1.5`,children:[(0,N.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`span`,{className:`h-[5px] w-2/3 rounded-sm`,style:{backgroundColor:t.text}}),(0,N.jsx)(`span`,{className:`h-[5px] w-1/2 rounded-sm`,style:{backgroundColor:t.dim}})]}),(0,N.jsx)(`div`,{className:`flex gap-1`,children:OP.map(e=>(0,N.jsx)(`span`,{className:`h-2 w-2 rounded-full`,style:{backgroundColor:t[e]}},e))})]})]})}function AP(){let e=DD(CP,e=>e.name);return(0,N.jsxs)(`div`,{"data-testid":`appearance-settings`,className:`flex max-w-[780px] flex-col gap-4`,children:[(0,N.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h2`,{className:`text-[13px] font-bold text-doom-hi`,children:`appearance`}),(0,N.jsx)(`p`,{className:`text-[11px] leading-relaxed text-doom-dim`,children:`pick the theme the cockpit renders with. the choice is remembered in this browser; every colour on the page, including the plugins' tabs, follows it.`})]}),(0,N.jsx)(NC,{"aria-label":`theme`,"data-testid":`theme-list`,className:`grid grid-cols-3 gap-3`,value:e,onValueChange:DP,children:wP().map(t=>{let n=t.name===e;return(0,N.jsxs)(PC,{value:t.name,"data-testid":`theme-${t.name}`,"data-selected":n,className:`flex flex-col gap-2 p-2.5`,children:[(0,N.jsx)(kP,{theme:t}),(0,N.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`flex-1 text-[12px] font-bold ${n?`text-doom-blue`:`text-doom-hi`}`,children:t.label}),(0,N.jsx)(`span`,{className:`text-[9px] text-doom-faint`,children:t.scheme}),n?(0,N.jsx)(ne,{className:`h-3 w-3 text-doom-blue`}):null]})]},t.name)})}),(0,N.jsx)(`p`,{className:`text-[10px] leading-relaxed text-doom-faint`,children:`a theme is a JSON config of twenty palette tokens; see @agimon-ai/doompi-web-components for the contract.`})]})}function jP(e){let t=[],n=(e,n)=>{n!==void 0&&n.length>0&&t.push(`${String(n.length)} ${e}`)};return n(`tabs`,e.tabs),n(`channels`,e.channels),n(`tool renderers`,e.toolRenderers),n(`activity groups`,e.activityGroups),n(`activity sections`,e.activitySections),n(`minor modes`,e.minorModes),n(`selection axes`,e.selectionAxes),n(`leader bindings`,e.leaderBindings),n(`slots`,e.slots),n(`fills`,e.fills),t}function MP(){let e=Sj(),t=xj();return(0,N.jsxs)(`div`,{"data-testid":`settings-plugins`,className:`flex max-w-[640px] flex-col gap-5`,children:[(0,N.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(FC,{children:`installed`}),(0,N.jsx)(`p`,{className:`text-[11px] leading-relaxed text-doom-faint`,children:`the web plugins compiled into this bundle; doompi sync rebuilds it from the packages installed in the composition.`}),e.length===0?(0,N.jsx)(`p`,{"data-testid":`settings-plugins-empty`,className:`text-[11px] text-doom-dim`,children:`no web plugins in this bundle. run doompi sync to bundle the installed packages.`}):(0,N.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.map(e=>(0,N.jsx)(EC,{asChild:!0,className:`flex items-baseline gap-3 bg-transparent px-3 py-2`,children:(0,N.jsxs)(`li`,{"data-testid":`settings-plugin-${e.id}`,children:[(0,N.jsx)(`span`,{className:`text-[12px] font-bold text-doom-hi`,children:e.id}),(0,N.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[10px] text-doom-faint`,children:jP(e).join(` · `)||`no contributions`})]})},e.id))})]}),(0,N.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(FC,{children:`install diagnostics`}),(0,N.jsx)(`p`,{className:`text-[11px] leading-relaxed text-doom-faint`,children:`plugins are independent, so when two want the same tab, tool, group, or key the install keeps one and records the other here rather than failing the page.`}),t.length===0?(0,N.jsx)(`p`,{"data-testid":`settings-plugin-diagnostics-empty`,className:`text-[11px] text-doom-dim`,children:`nothing to resolve: no two plugins wanted the same name.`}):(0,N.jsx)(`ul`,{className:`flex flex-col gap-1`,children:t.map((e,t)=>(0,N.jsx)(EC,{asChild:!0,className:`flex flex-col gap-0.5 bg-transparent px-3 py-2`,children:(0,N.jsxs)(`li`,{"data-testid":`settings-plugin-diagnostic-${e.pluginId}`,"data-kind":e.kind,children:[(0,N.jsxs)(`span`,{className:`text-[10px] font-bold text-doom-yellow`,children:[e.pluginId,` · `,e.kind]}),(0,N.jsx)(`span`,{className:`text-[10px] leading-snug text-doom-dim`,children:e.message})]})},`${e.pluginId}:${e.kind}:${String(t)}`))})]})]})}var NP=`/api/auth/providers`,PP=`/api/auth/logins`,FP=`The cockpit hub is unreachable.`,IP={"Content-Type":`application/json`};function LP(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function RP(e,t,n){let r;try{r=await fetch(e,t)}catch{return{error:FP}}let i;try{i=await r.json()}catch{i=void 0}if(r.ok&&LP(i)){let e=n(i);if(e!==void 0)return e}return{error:LP(i)&&typeof i.error==`string`?i.error:`The hub answered ${r.status}.`}}var zP=e=>LP(e.flow)?{flow:e.flow}:void 0;function BP(){return RP(NP,void 0,e=>Array.isArray(e.providers)?{providers:e.providers}:void 0)}function VP(e,t){return RP(PP,{method:`POST`,headers:IP,body:JSON.stringify({providerId:e,type:t})},zP)}function HP(e){return RP(`${PP}/${encodeURIComponent(e)}`,void 0,zP)}function UP(e,t,n){return RP(`${PP}/${encodeURIComponent(e)}/answer`,{method:`POST`,headers:IP,body:JSON.stringify({promptId:t,value:n})},zP)}function WP(e){return RP(`${PP}/${encodeURIComponent(e)}`,{method:`DELETE`},zP)}function GP(e){return RP(`${NP}/${encodeURIComponent(e)}`,{method:`DELETE`},()=>({ok:!0}))}var KP={api_key:`api key`,oauth:`oauth`},qP=`inline break-all decoration-doom-blue/40 hover:decoration-doom-blue`;function JP({event:e}){return e.type===`auth_url`?(0,N.jsxs)(`div`,{className:`flex flex-col gap-1 text-[11px] text-doom-text`,children:[(0,N.jsx)(`span`,{children:`open this link to authorize:`}),(0,N.jsx)(R,{asChild:!0,variant:`link`,size:`xs`,className:qP,children:(0,N.jsx)(`a`,{"data-testid":`login-flow-auth-url`,href:e.url,target:`_blank`,rel:`noreferrer`,children:e.url})}),e.instructions?(0,N.jsx)(`span`,{className:`text-doom-dim`,children:e.instructions}):null]}):e.type===`device_code`?(0,N.jsx)(`div`,{className:`flex flex-col gap-1 text-[11px] text-doom-text`,children:(0,N.jsxs)(`span`,{children:[`enter code`,` `,(0,N.jsx)(`span`,{"data-testid":`login-flow-device-code`,className:`font-bold text-doom-hi`,children:e.userCode}),` `,`at`,` `,(0,N.jsx)(`a`,{href:e.verificationUri,target:`_blank`,rel:`noreferrer`,className:qP,children:e.verificationUri})]})}):e.type===`info`?(0,N.jsxs)(`div`,{className:`flex flex-col gap-1 text-[11px] text-doom-text`,children:[(0,N.jsx)(`span`,{children:e.message}),e.links?.map(e=>(0,N.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:qP,children:e.label??e.url},e.url))]}):(0,N.jsx)(`span`,{className:`text-[11px] text-doom-dim`,children:e.message})}function YP({prompt:e,value:t,onChange:n,onSubmit:r,onSelect:i}){return e.type===`select`?(0,N.jsxs)(`div`,{"data-testid":`login-prompt`,"data-prompt-type":e.type,className:`flex flex-col gap-2`,children:[(0,N.jsx)(`span`,{className:`text-[11px] text-doom-text`,children:e.message}),(0,N.jsx)(`div`,{className:`flex flex-col gap-1`,children:(e.options??[]).map(e=>(0,N.jsxs)(R,{variant:`outline`,"data-testid":`login-prompt-option-${e.id}`,onClick:()=>i(e.id),className:`h-auto flex-col items-start gap-0.5 px-2.5 py-1.5 text-left whitespace-normal focus-visible:border-doom-blue/50 focus-visible:ring-0`,children:[(0,N.jsx)(`span`,{className:`text-[11px] text-doom-hi`,children:e.label}),e.description?(0,N.jsx)(`span`,{className:`text-[10px] text-doom-faint`,children:e.description}):null]},e.id))})]}):(0,N.jsxs)(`label`,{"data-testid":`login-prompt`,"data-prompt-type":e.type,className:`flex flex-col gap-1`,children:[(0,N.jsx)(`span`,{className:`text-[11px] text-doom-text`,children:e.message}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(ip,{"data-testid":`login-prompt-input`,type:e.type===`secret`?`password`:`text`,value:t,autoFocus:!0,autoComplete:`off`,placeholder:e.placeholder,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&r()},className:`flex-1`}),(0,N.jsx)(R,{variant:`primary`,"data-testid":`login-prompt-submit`,disabled:t.trim()===``,onClick:r,children:`continue`})]})]})}function XP({flow:e,onAnswer:t,onCancel:n,onClose:r}){let[i,a]=(0,w.useState)(``),o=e.prompt,s=o?.id,c=e.status===`running`;(0,w.useEffect)(()=>{a(``)},[s]);let l=()=>{!o||i.trim()===``||t(o.id,i)},u;return e.status===`succeeded`?u={text:`authenticated with ${e.providerName}.`,className:`text-doom-green`}:e.status===`failed`?u={text:e.error??`sign-in failed.`,className:`text-doom-red`}:e.status===`cancelled`&&(u={text:`sign-in cancelled.`,className:`text-doom-dim`}),(0,N.jsx)(Rf,{open:!0,onOpenChange:e=>{e||(c?n():r())},children:(0,N.jsxs)(Hf,{width:`md`,"data-testid":`login-flow`,"data-status":e.status,"aria-describedby":void 0,children:[(0,N.jsxs)(Uf,{children:[(0,N.jsxs)(Wf,{children:[`sign in to `,e.providerName]}),(0,N.jsx)(`span`,{className:`text-[10px] text-doom-faint`,children:KP[e.type]})]}),(0,N.jsxs)(Kf,{children:[e.events.length>0?(0,N.jsx)(`ol`,{"data-testid":`login-flow-events`,className:`flex flex-col gap-2`,children:e.events.map((e,t)=>(0,N.jsx)(`li`,{children:(0,N.jsx)(JP,{event:e})},t))}):null,c&&o?(0,N.jsx)(YP,{prompt:o,value:i,onChange:a,onSubmit:l,onSelect:e=>t(o.id,e)}):null,c&&!o?(0,N.jsxs)(`p`,{"data-testid":`login-flow-waiting`,className:`flex items-center gap-2 text-[11px] text-doom-dim`,children:[(0,N.jsx)(If,{}),e.events.length===0?`starting…`:`waiting for ${e.providerName}…`]}):null,u?(0,N.jsx)(`p`,{"data-testid":`login-flow-result`,className:`text-[11px] ${u.className}`,children:u.text}):null,(0,N.jsx)(Jf,{children:c?(0,N.jsx)(R,{variant:`outline`,"data-testid":`login-flow-cancel`,onClick:n,children:`cancel`}):(0,N.jsx)(R,{variant:`outline`,"data-testid":`login-flow-close`,autoFocus:!0,onClick:r,children:`close`})})]})]})})}var ZP=500,QP=`stored`;function $P(e){if(!e.authenticated)return`not authenticated`;let{type:t,source:n}=e.authenticated,r=n===QP?`stored`:n;return`authenticated · ${KP[t]}${r?` · ${r}`:``}`}function eF({provider:e,busy:t,onLogin:n,onLogout:r}){let i=e.authenticated!==void 0;return(0,N.jsx)(EC,{asChild:!0,className:`flex items-center gap-3 px-3.5 py-2.5 transition-colors hover:border-doom-blue/30`,children:(0,N.jsxs)(`li`,{"data-testid":`provider-${e.id}`,"data-authenticated":i,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,N.jsx)(`span`,{className:`truncate text-[12px] font-bold text-doom-hi`,children:e.name}),(0,N.jsx)(`span`,{className:`truncate text-[10px] text-doom-faint`,children:e.id})]}),(0,N.jsxs)(Ff,{tone:i?`green`:`neutral`,"data-testid":`provider-status-${e.id}`,children:[(0,N.jsx)(Xf,{tone:i?`green`:`neutral`}),$P(e)]}),e.methods.map(r=>(0,N.jsxs)(R,{variant:`outline`,size:`sm`,"data-testid":`provider-login-${r.type}-${e.id}`,title:r.label,disabled:t,onClick:()=>n(r.type),children:[`sign in · `,KP[r.type]]},r.type)),e.authenticated?.source===QP?(0,N.jsx)(R,{variant:`outline`,size:`sm`,"data-testid":`provider-logout-${e.id}`,disabled:t,onClick:r,className:`hover:border-doom-red/50 hover:text-doom-red`,children:`sign out`}):null,e.methods.length===0?(0,N.jsx)(`span`,{className:`text-[10px] text-doom-faint`,children:`ambient credentials only`}):null]})})}function tF(){let[e,t]=(0,w.useState)(null),[n,r]=(0,w.useState)(``),[i,a]=(0,w.useState)(null),[o,s]=(0,w.useState)(null),[c,l]=(0,w.useState)(``),u=(0,w.useCallback)(async()=>{let e=await BP();`providers`in e?(t(e.providers),r(``)):r(e.error)},[]);(0,w.useEffect)(()=>{u()},[u]);let d=i?.id,f=i?.status===`running`;(0,w.useEffect)(()=>{if(d===void 0||!f)return;let e=!1,t,n=async()=>{let r=await HP(d);if(!e){if(`error`in r){a(e=>e&&e.id===d?{...e,status:`failed`,error:r.error}:e);return}if(a(r.flow),r.flow.status!==`running`){u();return}t=setTimeout(()=>void n(),ZP)}};return t=setTimeout(()=>void n(),ZP),()=>{e=!0,t!==void 0&&clearTimeout(t)}},[d,f,u]);let p=async(e,t)=>{s(e);let n=await VP(e,t);s(null),`flow`in n?a(n.flow):r(n.error)},m=async(e,t)=>{if(!i)return;let n=await UP(i.id,e,t);`flow`in n?a(n.flow):r(n.error)},h=async()=>{if(!i)return;let e=await WP(i.id);a(`flow`in e?e.flow:null),u()},g=async e=>{s(e);let t=await GP(e);`error`in t?r(t.error):await u(),s(null)},_=c.trim().toLowerCase(),v=(e??[]).filter(e=>`${e.name} ${e.id}`.toLowerCase().includes(_)).sort((e,t)=>Number(t.authenticated!==void 0)-Number(e.authenticated!==void 0)),y=(e??[]).filter(e=>e.authenticated!==void 0).length;return(0,N.jsxs)(`div`,{"data-testid":`provider-settings`,className:`flex max-w-[780px] flex-col gap-4`,children:[(0,N.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h2`,{className:`text-[13px] font-bold text-doom-hi`,children:`providers`}),(0,N.jsx)(`p`,{className:`text-[11px] leading-relaxed text-doom-dim`,children:`sign in to the model providers Pi can use. credentials land in Pi's auth.json on this machine, so every session shares them.`})]}),n?(0,N.jsx)(`p`,{"data-testid":`provider-settings-error`,className:`text-[11px] leading-relaxed text-doom-red`,children:n}):null,e===null&&!n?(0,N.jsxs)(`p`,{className:`flex items-center gap-2 text-[11px] text-doom-faint`,children:[(0,N.jsx)(If,{label:`reading providers`}),`reading providers…`]}):null,e?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,N.jsx)(ip,{"data-testid":`provider-filter`,value:c,placeholder:`filter providers…`,onChange:e=>l(e.target.value),className:`flex-1`}),(0,N.jsxs)(`span`,{className:`shrink-0 text-[10px] text-doom-faint`,children:[y,` of `,e.length,` signed in`]})]}),(0,N.jsxs)(`ul`,{"data-testid":`provider-list`,className:`flex flex-col gap-1.5`,children:[v.map(e=>(0,N.jsx)(eF,{provider:e,busy:o===e.id,onLogin:t=>void p(e.id,t),onLogout:()=>void g(e.id)},e.id)),v.length===0?(0,N.jsx)(Sp,{asChild:!0,"data-testid":`provider-no-match`,className:`py-6`,title:`no provider matches`,description:`nothing here answers to “${c.trim()}”.`,children:(0,N.jsx)(`li`,{})}):null]})]}):null,i?(0,N.jsx)(XP,{flow:i,onAnswer:(e,t)=>void m(e,t),onCancel:()=>void h(),onClose:()=>a(null)}):null]})}function nF({active:e}){return(0,N.jsx)(`nav`,{"data-testid":`settings-menu`,className:`flex w-[220px] shrink-0 flex-col gap-0.5 border-r border-doom-border px-2.5 py-3`,children:ON.map(t=>{let n=t.id===e;return(0,N.jsxs)(ZD,{to:`/settings/$section`,params:{section:t.id},"data-testid":`settings-section-${t.id}`,"data-active":n,className:`flex flex-col gap-0.5 rounded-md px-[11px] py-2 transition-colors ${n?`bg-doom-tint-blue`:`hover:bg-doom-panel`}`,children:[(0,N.jsx)(`span`,{className:`text-[12px] font-bold ${n?`text-doom-blue`:`text-doom-hi`}`,children:t.label}),(0,N.jsx)(`span`,{className:`text-[10px] leading-snug text-doom-faint`,children:t.detail})]},t.id)})})}function rF(){let{section:e}=ND({strict:!1}),t=FD(),n=DD(Hk,e=>e.activeId),r=AN(e);return(0,w.useEffect)(()=>{r||t({to:`/settings/$section`,params:{section:kN},replace:!0})},[r,t]),(0,N.jsxs)(`div`,{"data-testid":`settings`,className:`relative flex h-full overflow-hidden`,children:[(0,N.jsx)(`aside`,{className:`flex w-[300px] shrink-0 flex-col overflow-y-auto border-r border-doom-border bg-doom-rail`,children:(0,N.jsx)(VN,{})}),(0,N.jsxs)(`main`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,N.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center justify-between border-b border-doom-border px-5`,children:[(0,N.jsx)(`span`,{className:`text-[13px] font-bold text-doom-hi`,children:`settings`}),(0,N.jsx)(R,{asChild:!0,variant:`ghost`,size:`sm`,children:n===null?(0,N.jsx)(ZD,{to:`/`,"data-testid":`settings-close`,children:`back`}):(0,N.jsx)(ZD,{to:`/session/$sessionId`,params:{sessionId:n},"data-testid":`settings-close`,children:`back to session`})})]}),(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,N.jsx)(nF,{active:r?.id}),(0,N.jsxs)(`section`,{"data-testid":`settings-content`,className:`min-w-0 flex-1 overflow-y-auto px-6 py-5`,children:[r?.id===`providers`?(0,N.jsx)(tF,{}):null,r?.id===`appearance`?(0,N.jsx)(AP,{}):null,r?.id===`plugins`?(0,N.jsx)(MP,{}):null]})]})]})]})}var iF=tO({component:()=>(0,N.jsx)(fO,{})}),aF=$D({getParentRoute:()=>iF,path:`/`,component:ZN}),oF=$D({getParentRoute:()=>iF,path:`/session/$sessionId`,component:ZN}),sF=$D({getParentRoute:()=>iF,path:`/session/$sessionId/$tabId`,component:ZN}),cF=$D({getParentRoute:()=>iF,path:`/settings`,component:rF}),lF=$D({getParentRoute:()=>iF,path:`/settings/$section`,component:rF}),uF=iF.addChildren([aF,oF,sF,cF,lF]),dF=4294967296,fF=4294967295,pF=512,mF=class extends Error{constructor(e){super(e),this.name=`CborError`}},hF=new TextEncoder,gF=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});function _F(e,t,n){if(!Number.isSafeInteger(t)||t<0||t>n)throw RangeError(`${e} must be an integer between 0 and ${n}`);return t}function vF(e){return{maxByteLength:_F(`maxByteLength`,e?.maxByteLength??16777216,fF),maxContainerLength:_F(`maxContainerLength`,e?.maxContainerLength??1e6,fF),maxDepth:_F(`maxDepth`,e?.maxDepth??64,pF)}}var yF=class{bytes;offset=0;options;constructor(e,t){this.bytes=e,this.options=t}decode(){let e=this.readItem(0);if(this.offset!==this.bytes.byteLength)throw new mF(`CBOR payload contains trailing data`);return e}readItem(e){if(e>this.options.maxDepth)throw new mF(`CBOR nesting depth exceeds configured limit of ${this.options.maxDepth}`);let t=this.readByte(),n=t>>>5,r=t&31;switch(n){case 0:return this.readArgument(r);case 1:{let e=-1-this.readArgument(r);if(!Number.isSafeInteger(e))throw new mF(`Decoded CBOR integer is outside the safe range`);return e}case 2:{let e=this.readLength(r,`byte string`,this.options.maxByteLength);return new Uint8Array(this.readBytes(e))}case 3:{let e=this.readLength(r,`text string`,this.options.maxByteLength),t=this.readBytes(e);try{return gF.decode(t)}catch{throw new mF(`CBOR text string contains invalid UTF-8`)}}case 4:{let t=this.readLength(r,`array`,this.options.maxContainerLength),n=[];for(let r=0;r<t;r++)n.push(this.readItem(e+1));return n}case 5:{let t=this.readLength(r,`map`,this.options.maxContainerLength),n={},i=new Set;for(let r=0;r<t;r++){let t=this.readItem(e+1);if(typeof t!=`string`)throw new mF(`CBOR map keys must be strings`);if(i.has(t))throw new mF(`CBOR map contains a duplicate key`);i.add(t),Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:this.readItem(e+1),writable:!0})}return n}case 6:throw new mF(`CBOR tags are not supported`);case 7:return this.readSimple(r);default:throw new mF(`Malformed CBOR major type`)}}readSimple(e){switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 27:{let e=this.readBytes(8),t=new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(0,!1);if(!Number.isFinite(t))throw new mF(`Decoded CBOR number must be finite`);if(Number.isInteger(t)&&!Number.isSafeInteger(t))throw new mF(`Decoded CBOR integer is outside the safe range`);return t}case 31:throw new mF(`CBOR break marker is not supported`);default:throw new mF(`Unsupported CBOR simple value or floating-point width`)}}readLength(e,t,n){if(e===31)throw new mF(`Indefinite-length CBOR ${t}s are not supported`);let r=this.readArgument(e);if(r>n)throw new mF(`CBOR ${t} length exceeds configured limit of ${n}`);return r}readArgument(e){if(e<24)return e;switch(e){case 24:return this.readByte();case 25:{let e=this.readBytes(2);return e[0]*256+e[1]}case 26:{let e=this.readBytes(4);return e[0]*16777216+e[1]*65536+e[2]*256+e[3]}case 27:{let e=this.readArgument(26),t=this.readArgument(26);if(e>2097151)throw new mF(`Decoded CBOR integer or length is outside the safe range`);return e*dF+t}case 31:throw new mF(`Indefinite-length CBOR items are not supported`);default:throw new mF(`Malformed CBOR additional information`)}}readByte(){if(this.offset>=this.bytes.byteLength)throw new mF(`Truncated CBOR payload`);let e=this.bytes[this.offset];return this.offset++,e}readBytes(e){if(e>this.bytes.byteLength-this.offset)throw new mF(`Truncated CBOR payload`);let t=this.bytes.subarray(this.offset,this.offset+e);return this.offset+=e,t}};function bF(e,t){if(!(e instanceof Uint8Array))throw TypeError(`CBOR input must be a Uint8Array`);let n=vF(t);if(e.byteLength>n.maxByteLength)throw new mF(`CBOR byte length exceeds configured limit of ${n.maxByteLength}`);return new yF(e,n).decode()}var xF=class{buffer;offset=0;maxByteLength;constructor(e){this.maxByteLength=e,this.buffer=new Uint8Array(Math.min(256,e))}writeByte(e){this.ensureCapacity(1),this.buffer[this.offset]=e,this.offset++}writeBytes(e){this.ensureCapacity(e.byteLength),this.buffer.set(e,this.offset),this.offset+=e.byteLength}writeUint16(e){this.ensureCapacity(2),this.buffer[this.offset]=e>>>8,this.buffer[this.offset+1]=e,this.offset+=2}writeUint32(e){this.ensureCapacity(4),this.buffer[this.offset]=e>>>24,this.buffer[this.offset+1]=e>>>16,this.buffer[this.offset+2]=e>>>8,this.buffer[this.offset+3]=e,this.offset+=4}writeUint64(e){let t=Math.floor(e/dF),n=e-t*dF;this.writeUint32(t),this.writeUint32(n)}writeFloat64(e){this.ensureCapacity(9),this.buffer[this.offset]=251,new DataView(this.buffer.buffer).setFloat64(this.offset+1,e,!1),this.offset+=9}finish(){return this.buffer.slice(0,this.offset)}ensureCapacity(e){let t=this.offset+e;if(t>this.maxByteLength)throw new mF(`CBOR byte length exceeds configured limit of ${this.maxByteLength}`);if(t<=this.buffer.byteLength)return;let n=Math.max(1,this.buffer.byteLength);for(;n<t;)n=Math.min(this.maxByteLength,Math.max(t,n*2));let r=new Uint8Array(n);r.set(this.buffer),this.buffer=r}};function SF(e,t,n){let r=t<<5;n<24?e.writeByte(r|n):n<=255?(e.writeByte(r|24),e.writeByte(n)):n<=65535?(e.writeByte(r|25),e.writeUint16(n)):n<=4294967295?(e.writeByte(r|26),e.writeUint32(n)):(e.writeByte(r|27),e.writeUint64(n))}function CF(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function wF(e,t,n){let r=hF.encode(t);if(r.byteLength>n.maxByteLength)throw new mF(`CBOR text string length exceeds configured limit of ${n.maxByteLength}`);if(gF.decode(r)!==t)throw new mF(`CBOR text strings must contain valid Unicode scalar values`);SF(e,3,r.byteLength),e.writeBytes(r)}function TF(e,t,n,r,i){if(r>n.maxDepth)throw new mF(`CBOR nesting depth exceeds configured limit of ${n.maxDepth}`);if(t===null){e.writeByte(246);return}if(typeof t==`boolean`){e.writeByte(t?245:244);return}if(typeof t==`number`){if(!Number.isFinite(t))throw new mF(`CBOR numbers must be finite`);if(Number.isInteger(t)&&!Object.is(t,-0)){if(!Number.isSafeInteger(t))throw new mF(`CBOR integers must be safe JavaScript integers`);t>=0?SF(e,0,t):SF(e,1,-1-t)}else e.writeFloat64(t);return}if(typeof t==`string`){wF(e,t,n);return}if(t instanceof Uint8Array){if(t.byteLength>n.maxByteLength)throw new mF(`CBOR byte string length exceeds configured limit of ${n.maxByteLength}`);SF(e,2,t.byteLength),e.writeBytes(t);return}if(Array.isArray(t)){if(i.has(t))throw new mF(`CBOR values must not contain cycles`);if(t.length>n.maxContainerLength)throw new mF(`CBOR array length exceeds configured limit of ${n.maxContainerLength}`);i.add(t);try{SF(e,4,t.length);for(let a=0;a<t.length;a++){if(!Object.hasOwn(t,a)||t[a]===void 0)throw new mF(`CBOR arrays must not contain holes or undefined values`);TF(e,t[a],n,r+1,i)}}finally{i.delete(t)}return}if(CF(t)){if(i.has(t))throw new mF(`CBOR values must not contain cycles`);for(let e of Object.getOwnPropertySymbols(t))if(Object.prototype.propertyIsEnumerable.call(t,e))throw new mF(`CBOR map keys must be strings`);let a=[];for(let e of Object.keys(t)){let n=t[e];n!==void 0&&a.push([e,n])}if(a.length>n.maxContainerLength)throw new mF(`CBOR map length exceeds configured limit of ${n.maxContainerLength}`);i.add(t);try{SF(e,5,a.length);for(let[t,o]of a)wF(e,t,n),TF(e,o,n,r+1,i)}finally{i.delete(t)}return}throw new mF(`Unsupported CBOR value type: ${typeof t}`)}function EF(e,t){let n=vF(t),r=new xF(n.maxByteLength);return TF(r,e,n,0,new Set),r.finish()}function DF(e,t){return t[e.length]?.(...e)??(()=>{throw Error(`Invalid Arguments`)})()}function OF(e,t,n){return e>=t&&e<=n}function kF(e){return e===8205}function AF(e){return OF(e,55296,56319)}function jF(e){return OF(e,127462,127487)}function MF(e){return OF(e,65024,65039)}function NF(e){return OF(e,768,879)||OF(e,6832,6911)||OF(e,7616,7679)||OF(e,65056,65071)}function PF(e){return e>65535?2:1}function FF(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(NF(n)||MF(n))t+=PF(n);else break}return t}function IF(e,t){let n=e.codePointAt(t),r=t+PF(n);for(r=FF(e,r);r<e.length-1&&e[r]===`‍`;){let t=e.codePointAt(r+1);r+=1+PF(t),r=FF(e,r)}return jF(n)&&r<e.length&&jF(e.codePointAt(r))&&(r+=PF(e.codePointAt(r))),r}function LF(e){return AF(e)||NF(e)||MF(e)||kF(e)}function RF(e,t){if(t===0)return!0;let n=0,r=0;for(;r<e.length;)if(r=IF(e,r),n++,n>=t)return!0;return!1}function zF(e,t){let n=0,r=0;for(;r<e.length;)if(r=IF(e,r),n++,n>t)return!1;return!0}function BF(e,t){if(t===0)return!0;let n=0;for(;n<e.length;){if(LF(e.charCodeAt(n)))return RF(e,t);if(n++,n>=t)return!0}return!1}function VF(e,t){let n=0;for(;n<e.length;){if(LF(e.charCodeAt(n)))return zF(e,t);if(n++,n>t)return!1}return!0}function HF(e){return Array.isArray(e)}function UF(e){return U(typeof e,`bigint`)}function WF(e){return U(typeof e,`boolean`)}function GF(e){if(eI(e)||!KF(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function KF(e){return U(typeof e,`function`)}function qF(e){return Number.isInteger(e)}function JF(e){return U(e,null)}function YF(e){return Number.isFinite(e)}function XF(e){return ZF(e)&&!HF(e)}function ZF(e){return U(typeof e,`object`)&&!JF(e)}function QF(e){return U(typeof e,`string`)}function $F(e){return U(typeof e,`symbol`)}function eI(e){return U(e,void 0)}function U(e,t){return e===t}function tI(e,t){return e>t}function nI(e,t){return e<t}function rI(e,t){return e<=t}function iI(e,t){return e>=t}function aI(e,t){if(UF(e)||UF(t))return BigInt(e)%BigInt(t)===0n;if(!YF(e)||qF(e)&&1/t%1==0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t),Math.abs(n+t))<1e-10}function oI(e){if(!ZF(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return!JF(t)&&U(typeof t.constructor,`function`)&&!(U(t.constructor,globalThis.Object)||U(t.constructor.name,`Object`))}function sI(e){return UF(e)||WF(e)||JF(e)||YF(e)||QF(e)||eI(e)}function cI(e,t){return VF(e,t)}function lI(e,t){return BF(e,t)}function uI(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function dI(e,t,n){return U(e.length,0)?n():t(e[0],e.slice(1))}function fI(e){return U(e,`__proto__`)||U(e,`constructor`)||U(e,`prototype`)}function W(e,t){return fI(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function pI(e){return Object.entries(e)}function G(e){return Object.getOwnPropertyNames(e)}function mI(e){return Object.getOwnPropertySymbols(e)}function hI(e){return Object.values(e)}function gI(e,t){if(!ZF(t))return!1;let n=G(e);return U(n.length,G(t).length)&&n.every(n=>vI(e[n],t[n]))}function _I(e,t){return HF(t)&&U(e.length,t.length)&&e.every((n,r)=>vI(e[r],t[r]))}function vI(e,t){return HF(e)?_I(e,t):ZF(e)?gI(e,t):U(e,t)}function yI(e){return e instanceof Boolean}function bI(e){return e instanceof Number}function xI(e){return e instanceof String}function SI(e){return globalThis.ArrayBuffer.isView(e)}function CI(e){return e instanceof globalThis.RegExp}function wI(e){return e instanceof globalThis.Date}function TI(e){return e instanceof globalThis.Set}function EI(e){return e instanceof globalThis.Map}function DI(e){return W(e,`~refine`)&&HF(e[`~refine`])&&uI(e[`~refine`],0,e=>ZF(e)&&W(e,`check`)&&W(e,`error`)&&KF(e.check)&&KF(e.error))}function OI(e){return ZF(e)&&!HF(e)}function kI(e){return WF(e)}function AI(e){return OI(e)||kI(e)}function jI(e){return W(e,`additionalItems`)&&AI(e.additionalItems)}function MI(e){return W(e,`additionalProperties`)&&AI(e.additionalProperties)}function NI(e){return W(e,`allOf`)&&HF(e.allOf)&&e.allOf.every(e=>AI(e))}function PI(e){return W(e,`$anchor`)&&QF(e.$anchor)}function FI(e){return W(e,`anyOf`)&&HF(e.anyOf)&&e.anyOf.every(e=>AI(e))}function II(e){return W(e,`const`)}function LI(e){return W(e,`contains`)&&AI(e.contains)}function RI(e){return W(e,`dependencies`)&&ZF(e.dependencies)&&Object.values(e.dependencies).every(e=>AI(e)||HF(e)&&e.every(e=>QF(e)))}function zI(e){return W(e,`dependentRequired`)&&ZF(e.dependentRequired)&&Object.values(e.dependentRequired).every(e=>HF(e)&&e.every(e=>QF(e)))}function BI(e){return W(e,`dependentSchemas`)&&ZF(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(e=>AI(e))}function VI(e){return W(e,`$dynamicAnchor`)&&QF(e.$dynamicAnchor)}function HI(e){return W(e,`$dynamicRef`)&&QF(e.$dynamicRef)}function UI(e){return W(e,`else`)&&AI(e.else)}function WI(e){return W(e,`enum`)&&HF(e.enum)}function GI(e){return W(e,`exclusiveMaximum`)&&(YF(e.exclusiveMaximum)||UF(e.exclusiveMaximum))}function KI(e){return W(e,`exclusiveMinimum`)&&(YF(e.exclusiveMinimum)||UF(e.exclusiveMinimum))}function qI(e){return W(e,`format`)&&QF(e.format)}function JI(e){return W(e,`$id`)&&QF(e.$id)}function YI(e){return W(e,`if`)&&AI(e.if)}function XI(e){return W(e,`items`)&&(AI(e.items)||HF(e.items)&&e.items.every(e=>AI(e)))}function ZI(e){return XI(e)&&HF(e.items)}function QI(e){return W(e,`maximum`)&&(YF(e.maximum)||UF(e.maximum))}function $I(e){return W(e,`maxContains`)&&YF(e.maxContains)}function eL(e){return W(e,`maxItems`)&&YF(e.maxItems)}function tL(e){return W(e,`maxLength`)&&YF(e.maxLength)}function nL(e){return W(e,`maxProperties`)&&YF(e.maxProperties)}function rL(e){return W(e,`minimum`)&&(YF(e.minimum)||UF(e.minimum))}function iL(e){return W(e,`minContains`)&&YF(e.minContains)}function aL(e){return W(e,`minItems`)&&YF(e.minItems)}function oL(e){return W(e,`minLength`)&&YF(e.minLength)}function sL(e){return W(e,`minProperties`)&&YF(e.minProperties)}function cL(e){return W(e,`multipleOf`)&&(YF(e.multipleOf)||UF(e.multipleOf))}function lL(e){return W(e,`not`)&&AI(e.not)}function uL(e){return W(e,`oneOf`)&&HF(e.oneOf)&&e.oneOf.every(e=>AI(e))}function dL(e){return W(e,`pattern`)&&(QF(e.pattern)||e.pattern instanceof RegExp)}function fL(e){return W(e,`patternProperties`)&&ZF(e.patternProperties)&&Object.values(e.patternProperties).every(e=>AI(e))}function pL(e){return W(e,`prefixItems`)&&HF(e.prefixItems)&&e.prefixItems.every(e=>AI(e))}function mL(e){return W(e,`properties`)&&ZF(e.properties)&&Object.values(e.properties).every(e=>AI(e))}function hL(e){return W(e,`propertyNames`)&&(ZF(e.propertyNames)||AI(e.propertyNames))}function gL(e){return W(e,`$recursiveAnchor`)&&WF(e.$recursiveAnchor)}function _L(e){return gL(e)&&U(e.$recursiveAnchor,!0)}function vL(e){return W(e,`$recursiveRef`)&&QF(e.$recursiveRef)}function yL(e){return W(e,`$ref`)&&QF(e.$ref)}function bL(e){return W(e,`required`)&&HF(e.required)&&e.required.every(e=>QF(e))}function xL(e){return W(e,`then`)&&AI(e.then)}function SL(e){return W(e,`type`)&&(QF(e.type)||HF(e.type)&&e.type.every(e=>QF(e)))}function CL(e){return W(e,`uniqueItems`)&&WF(e.uniqueItems)}function wL(e){return W(e,`unevaluatedItems`)&&AI(e.unevaluatedItems)}function TL(e){return W(e,`unevaluatedProperties`)&&AI(e.unevaluatedProperties)}var EL=class{constructor(){let e=new Set,t=new Set;this.stack=[{indices:e,keys:t}]}Push(){let e=new Set,t=new Set;return this.stack.push({indices:e,keys:t}),!0}Pop(){return this.stack.pop(),!0}AddIndex(e){return this.GetIndices().add(e),!0}AddKey(e){return this.GetKeys().add(e),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(e){for(let t of e)t.GetIndices().forEach(e=>this.GetIndices().add(e)),t.GetKeys().forEach(e=>this.GetKeys().add(e));return!0}};function DL(){throw Error(`Unreachable`)}function OL(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function kL(e){return typeof e==`number`}var AL;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(AL||={});var jL=BigInt(`14695981039346656037`),[ML,NL]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],PL=Array.from({length:256}).map((e,t)=>BigInt(t)),FL=new Float64Array(1),IL=new DataView(FL.buffer),LL=new Uint8Array(FL.buffer);function RL(e){jL^=PL[e],jL=jL*ML%NL}function zL(e){RL(AL.Array);for(let t of e)eR(t)}function BL(e){RL(AL.BigInt),IL.setBigInt64(0,e);for(let e of LL)RL(e)}function VL(e){RL(AL.Boolean),RL(+!!e)}function HL(e){RL(AL.Constructor),eR(e.toString())}function UL(e){RL(AL.Date),eR(e.getTime())}function WL(e){RL(AL.Function),eR(e.toString())}function GL(e){RL(AL.Null)}function KL(e){RL(AL.Number),IL.setFloat64(0,e,!0);for(let e of LL)RL(e)}function qL(e){RL(AL.Object);for(let t of OL(e).sort())eR(t),eR(e[t])}function JL(e){RL(AL.RegExp),XL(e.toString())}var YL=new TextEncoder;function XL(e){RL(AL.String);for(let t of YL.encode(e))RL(t)}function ZL(e){RL(AL.Symbol),eR(e.toString())}function QL(e){RL(AL.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)RL(t[e])}function $L(e){return RL(AL.Undefined)}function eR(e){return SI(e)?QL(e):wI(e)?UL(e):CI(e)?JL(e):yI(e)?VL(e.valueOf()):xI(e)?XL(e.valueOf()):bI(e)?KL(e.valueOf()):kL(e)?KL(e):HF(e)?zL(e):WF(e)?VL(e):UF(e)?BL(e):GF(e)?HL(e):JF(e)?GL(e):ZF(e)?qL(e):QF(e)?XL(e):$F(e)?ZL(e):eI(e)?$L(e):KF(e)?WL(e):DL()}function tR(e){return jL=BigInt(`14695981039346656037`),eR(e),jL}function nR(e){return tR(e).toString(16).padStart(16,`0`)}function rR(e,t,n,r){return uI(n[`~refine`],0,(e,t)=>e.check(r))}function iR(e){return XI(e)&&HF(e.items)}function aR(e,t,n,r){return!iR(n)||r.every((r,i)=>nI(i,n.items.length)||jB(e,t,n.additionalItems,r)&&t.AddIndex(i))}function oR(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}$`}function sR(e){let t=[];return fL(e)&&t.push(...G(e.patternProperties)),mL(e)&&t.push(...G(e.properties).map(oR)),U(t.length,0)?`(?!)`:`(${t.join(`|`)})`}function cR(e,t,n,r){let i=new RegExp(sR(n));return uI(G(r),0,(a,o)=>i.test(a)||jB(e,t,n.additionalProperties,r[a])&&t.AddKey(a))}function lR(e,t,n,r){let i=n.allOf.reduce((t,n)=>{let i=new EL;return MB(e,i,n,r)?[...t,i]:t},[]);return U(i.length,n.allOf.length)&&t.Merge(i)}function uR(e,t,n,r){let i=n.anyOf.reduce((t,n)=>{let i=new EL;return MB(e,i,n,r)?[...t,i]:t},[]);return tI(i.length,0)&&t.Merge(i)}function dR(e,t,n,r){return n}function fR(e,t,n,r){return sI(n.const)?U(r,n.const):vI(r,n.const)}function pR(e){return!(iL(e)&&U(e.minContains,0))}function mR(e,t,n,r){return!pR(n)||!U(r.length,0)&&r.some(r=>MB(e,t,n.contains,r))}function hR(e,t,n,r){let i=U(G(r).length,0),a=uI(pI(n.dependencies),0,([n,i])=>!W(r,n)||(HF(i)?i.every(e=>W(r,e)):MB(e,t,i,r)));return i||a}function gR(e,t,n,r){let i=U(G(r).length,0),a=uI(pI(n.dependentRequired),0,([e,t])=>!W(r,e)||t.every(e=>W(r,e)));return i||a}function _R(e,t,n,r){let i=U(G(r).length,0),a=uI(pI(n.dependentSchemas),0,([n,i])=>!W(r,n)||MB(e,t,i,r));return i||a}function vR(e,t,n,r){let i=e.DynamicRef(n)??!1;return AI(i)&&MB(e,t,i,r)}function yR(e,t,n,r){return n.enum.some(e=>sI(e)?U(r,e):vI(r,e))}function bR(e,t,n,r){return nI(r,n.exclusiveMaximum)}function xR(e,t,n,r){return tI(r,n.exclusiveMinimum)}var SR=[0,31,28,31,30,31,30,31,31,30,31,30,31],CR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function wR(e){return e%4==0&&(e%100!=0||e%400==0)}function TR(e){let t=CR.exec(e);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&wR(n)?29:SR[r])}var ER=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function DR(e,t=!0){let n=ER.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4]===`-`?-1:1,s=+(n[5]||0),c=+(n[6]||0);if(s>23||c>59||t&&!n[4]&&e.toLowerCase().indexOf(`z`)===-1)return!1;if(r<=23&&i<=59&&a<60)return!0;let l=i-c*o,u=r-s*o-+(l<0);return(u===23||u===-1)&&(l===59||l===-1)&&a<61}function OR(e,t=!0){let n=e.split(/T/i);return n.length===2&&TR(n[0])&&DR(n[1],t)}var kR=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function AR(e){return kR.test(e)}var jR=/^(?!.*\.\.)[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i;function MR(e){return jR.test(e)}var NR=36,PR=1,FR=26,IR=38,LR=700,RR=72,zR=128;function BR(e,t,n){e=n?Math.floor(e/LR):e>>1,e+=Math.floor(e/t);let r=0;for(;e>455;)e=Math.floor(e/35),r+=NR;return r+Math.floor(36*e/(e+IR))}function VR(e){let t=[],n=zR,r=0,i=RR,a=e.lastIndexOf(`-`);if(a>0)for(let n=0;n<a;n++){let r=e.charCodeAt(n);if(r>=128)throw Error(`Invalid punycode: non-basic before delimiter`);t.push(r)}let o=a<0?0:a+1;for(;o<e.length;){let a=r,s=1,c=NR;for(;;){if(o>=e.length)throw Error(`Invalid punycode: unexpected end of input`);let t=e.charCodeAt(o++),n;if(t>=97&&t<=122)n=t-97;else if(t>=48&&t<=57)n=t-48+26;else if(t>=65&&t<=90)DL();else throw Error(`Invalid punycode: bad digit character`);r+=n*s;let a=c<=i?PR:c>=i+FR?FR:c-i;if(n<a)break;s*=NR-a,c+=NR}let l=t.length+1;i=BR(r-a,l,a===0),n+=Math.floor(r/l),r%=l,t.splice(r,0,n),r++}return globalThis.String.fromCodePoint(...t)}function HR(e){return/\p{Mn}/u.test(String.fromCodePoint(e))}function UR(e){return/\p{Mc}/u.test(String.fromCodePoint(e))}function WR(e){return/\p{Me}/u.test(String.fromCodePoint(e))}function GR(e){return HR(e)||UR(e)||WR(e)}var KR=new Set([1600,2042,12334,12335,12337,12338,12339,12340,12341,12347]),qR=new Set([2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,6980,7082,7083,43456,69702,69759,69817,69939,69940,70080,70197,70477,70722,70850,71103,71231,71350,72767,73028,73029]);function JR(e){return/\p{Script=Greek}/u.test(String.fromCodePoint(e))}function YR(e){return/\p{Script=Hebrew}/u.test(String.fromCodePoint(e))}function XR(e){return/\p{Script=Hiragana}/u.test(String.fromCodePoint(e))}function ZR(e){return/\p{Script=Katakana}/u.test(String.fromCodePoint(e))}function QR(e){return/\p{Script=Han}/u.test(String.fromCodePoint(e))}function $R(e){return e>=1632&&e<=1641}function ez(e){return e>=1776&&e<=1785}function tz(e){return qR.has(e)}function nz(e){if(e.length===0)return DL();let t=[...e].map(e=>e.codePointAt(0)),n=t.length;if(t[0]===45||t[n-1]===45||n>=4&&t[2]===45&&t[3]===45||GR(t[0]))return!1;let r=!1,i=!1,a=!1;for(let e=0;e<n;e++){let n=t[e];if(KR.has(n))return!1;(XR(n)||ZR(n)||QR(n))&&(r=!0),$R(n)&&(i=!0),ez(n)&&(a=!0);let o=t[e-1],s=t[e+1];switch(n){case 183:if(o!==108||s!==108)return!1;break;case 885:if(s===void 0||!JR(s))return!1;break;case 1523:case 1524:if(o===void 0||!YR(o))return!1;break;case 8204:if(o===void 0||o<128&&!tz(o))return!1;break;case 8205:if(o===void 0||!tz(o))return!1}}return!(e.includes(`・`)&&!r||i&&a)}function rz(e){if(e.charCodeAt(0)===45||e.charCodeAt(e.length-1)===45||e.length>=4&&e.charCodeAt(2)===45&&e.charCodeAt(3)===45)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||n===45))return!1}return!0}function iz(e){return e.toLowerCase().startsWith(`xn--`)}function az(e){try{let t=e.slice(4).toLowerCase();if(t.lastIndexOf(`-`)===0)return!1;let n=VR(t);return n?nz(n):!1}catch{return!1}}function oz(e){return e.length===0||e.length>63?!1:iz(e)?az(e):nz(e)}function sz(e){return e.length===0||e.length>63?!1:iz(e)?az(e):rz(e)}function cz(e){if(e.length===0||e.length>253||e.charCodeAt(e.length-1)===46)return!1;for(let t of e.split(`.`))if(!sz(t))return!1;return!0}var lz=/^(?!.*\.\.)[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+(?:\.[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+)*@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?)*$/iu;function uz(e){return lz.test(e)}function dz(e){if(e.length===0||e.includes(` `))return!1;let t=e.normalize(`NFC`).replace(/[\u002E\u3002\uFF0E\uFF61]/g,`.`);if(t.length>253)return!1;for(let e of t.split(`.`))if(!oz(e))return!1;return!0}function fz(e,t,n){let r=0,i=0,a=0,o=0;for(let s=t;s<n;s++){let t=e.charCodeAt(s);if(t===46){if(a===0||i>255||o===48&&a>1)return!1;r++,i=0,a=0,o=0}else if(t>=48&&t<=57)a===0&&(o=t),i=i*10+(t-48),a++;else return!1}return r===3&&a>0&&i<=255&&!(o===48&&a>1)}function pz(e){return fz(e,0,e.length)}function mz(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hz(e){let t=e.length;if(t===0)return!1;let n=0,r=!1,i=0;if(e.charCodeAt(0)===58&&e.charCodeAt(1)===58){if(t===2)return!0;r=!0,i=2}for(;i<t;){let a=0,o=i;for(;i<t&&mz(e.charCodeAt(i));)i++,a++;if(a===0)return!1;let s=e.charCodeAt(i);if(s===46){if(!fz(e,o,t))return!1;n+=2,i=t;break}if(a>4)return!1;if(n++,i===t)break;if(s!==58)return!1;if(i++,e.charCodeAt(i)===58){if(r||e.charCodeAt(i+1)===58)return!1;if(r=!0,i++,i===t)break}}return r?n<=7:n===8}function gz(e){try{return new URL(e,`http://example.com`),!0}catch{return!1}}function _z(e){if(e.includes(` `)||e.includes(`\\`)||/[\x00-\x1F\x7F]/.test(e)||/%(?![0-9a-fA-F]{2})/.test(e))return!1;if(e===``)return!0;let t=e.indexOf(`:`);return t>0&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e.substring(0,t))?gz(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:gz(e)}function vz(e){try{return new URL(e),!0}catch{return!1}}var yz=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function bz(e){return yz.test(e)}var xz=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function Sz(e){return xz.test(e)}function Cz(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var wz=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function Tz(e){return wz.test(e)}var Ez=/^(?!.*[^\x00-\x7F])(?!.*\\)(?:(?:[a-z][a-z0-9+\-.]*:)?(?:\/\/[^\s[\]{}<>^`|]*)?|[^\s[\]{}<>^`|]*)(?:\?[^\s[\]{}<>^`|]*)?(?:#[^\s[\]{}<>^`|]*)?$/i;function Dz(e){return Ez.test(e)}var Oz=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;function kz(e){return Oz.test(e)}function Az(e){return e>=97&&e<=122||e>=65&&e<=90}function jz(e){return Az(e)||e>=48&&e<=57}function Mz(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Nz(e){return jz(e)||e===43||e===45||e===46}function Pz(e){return jz(e)||e===45||e===46||e===95||e===126}function Fz(e){return e===33||e===36||e===38||e===39||e===40||e===41||e===42||e===43||e===44||e===59||e===61}function Iz(e){return Pz(e)||Fz(e)||e===58||e===64}function Lz(e){let t=e.length;if(t===0||!Az(e.charCodeAt(0)))return!1;let n=1;for(;n<t;){let t=e.charCodeAt(n);if(t===58)break;if(!Nz(t))return!1;n++}if(e.charCodeAt(n)!==58)return!1;if(n++,e.charCodeAt(n)===47&&e.charCodeAt(n+1)===47){n+=2;let r=n,i=-1;for(let r=n;r<t;r++){let t=e.charCodeAt(r);if(t===64){i=r;break}if(t===47||t===63||t===35)break}if(i!==-1){for(let t=r;t<i;t++){let n=e.charCodeAt(t);if(n===91||n===93)return!1;if(n===37){if(t+2>=i||!Mz(e.charCodeAt(t+1))||!Mz(e.charCodeAt(t+2)))return!1;t+=2}else if(!Pz(n)&&!Fz(n)&&n!==58)return!1}n=i+1}if(e.charCodeAt(n)===91){for(n++;n<t&&e.charCodeAt(n)!==93;)n++;if(e.charCodeAt(n)!==93)return!1;n++}else for(;n<t;){let t=e.charCodeAt(n);if(t===47||t===63||t===35||t===58)break;if(t<128&&!Pz(t)&&!Fz(t))return!1;n++}if(e.charCodeAt(n)===58)for(n++;n<t;){let t=e.charCodeAt(n);if(t===47||t===63||t===35)break;if(t<48||t>57)return!1;n++}}for(;n<t;){let r=e.charCodeAt(n);if(r===37){if(n+2>=t||!Mz(e.charCodeAt(n+1))||!Mz(e.charCodeAt(n+2)))return!1;n+=2}else if(r>127)return!1;else if(!(Iz(r)||r===47||r===63||r===35))return!1;n++}return!0}var Rz=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;function zz(e){return Rz.test(e)}var Bz=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Vz(e){return Bz.test(e)}var Hz=new Map;function Uz(){Hz.clear()}function Wz(e,t){return Hz.get(e)?.(t)??!0}function Gz(){Uz(),Hz.set(`date-time`,OR),Hz.set(`date`,TR),Hz.set(`duration`,AR),Hz.set(`email`,MR),Hz.set(`hostname`,cz),Hz.set(`idn-email`,uz),Hz.set(`idn-hostname`,dz),Hz.set(`ipv4`,pz),Hz.set(`ipv6`,hz),Hz.set(`iri-reference`,_z),Hz.set(`iri`,vz),Hz.set(`json-pointer-uri-fragment`,bz),Hz.set(`json-pointer`,Sz),Hz.set(`regex`,Cz),Hz.set(`relative-json-pointer`,Tz),Hz.set(`time`,DR),Hz.set(`uri-reference`,Dz),Hz.set(`uri-template`,kz),Hz.set(`uri`,Lz),Hz.set(`url`,zz),Hz.set(`uuid`,Vz)}Gz();function Kz(e,t,n,r){return Wz(n.format,r)}function qz(e,t,n,r){let i=!xL(n)||n.then,a=!UI(n)||n.else;return MB(e,t,n.if,r)?MB(e,t,i,r):MB(e,t,a,r)}function Jz(e,t,n,r){return uI(n.items,0,(n,i)=>rI(r.length,i)||jB(e,t,n,r[i])&&t.AddIndex(i))}function Yz(e,t,n,r){return uI(r,pL(n)?n.prefixItems.length:0,(r,i)=>jB(e,t,n.items,r)&&t.AddIndex(i))}function Xz(e,t,n,r){return ZI(n)?Jz(e,t,n,r):Yz(e,t,n,r)}function Zz(e){return LI(e)}function Qz(e,t,n,r){return!Zz(n)||rI(r.reduce((r,i)=>MB(e,t,n.contains,i)?++r:r,0),n.maxContains)}function $z(e,t,n,r){return rI(r,n.maximum)}function eB(e,t,n,r){return rI(r.length,n.maxItems)}function tB(e,t,n,r){return cI(r,n.maxLength)}function nB(e,t,n,r){return rI(G(r).length,n.maxProperties)}function rB(e){return LI(e)}function iB(e,t,n,r){return!rB(n)||iI(r.reduce((r,i)=>MB(e,t,n.contains,i)?++r:r,0),n.minContains)}function aB(e,t,n,r){return iI(r,n.minimum)}function oB(e,t,n,r){return iI(r.length,n.minItems)}function sB(e,t,n,r){return lI(r,n.minLength)}function cB(e,t,n,r){return iI(G(r).length,n.minProperties)}function lB(e,t,n,r){return aI(r,n.multipleOf)}function uB(e,t,n,r){let i=new EL;return!MB(e,i,n.not,r)&&t.Merge([i])}function dB(e,t,n,r){let i=n.oneOf.reduce((t,n)=>{let i=new EL;return MB(e,i,n,r)?[...t,i]:t},[]);return U(i.length,1)&&t.Merge(i)}function fB(e,t,n,r){return(QF(n.pattern)?new RegExp(n.pattern,`u`):n.pattern).test(r)}function pB(e,t,n,r){return uI(pI(n.patternProperties),0,([n,i])=>{let a=new RegExp(n,`u`);return uI(pI(r),0,([n,r])=>!a.test(n)||jB(e,t,i,r)&&t.AddKey(n))})}function mB(e,t,n,r){return U(r.length,0)||uI(n.prefixItems,0,(n,i)=>rI(r.length,i)||jB(e,t,n,r[i])&&t.AddIndex(i))}var hB={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function gB(){return hB}function _B(e,t){return e.includes(t)||gB().exactOptionalPropertyTypes}function vB(e,t){return eI(e[t])}function yB(e,t,n,r){let i=bL(n)?n.required:[];return uI(pI(n.properties),0,([n,a])=>{let o=!W(r,n)||jB(e,t,a,r[n])&&t.AddKey(n);return _B(i,n)?o:vB(r,n)||o})}function bB(e,t,n,r){return uI(G(r),0,(r,i)=>MB(e,t,n.propertyNames,r))}function xB(e,t,n,r){let i=e.RecursiveRef(n)??!1;return AI(i)&&MB(e,t,i,r)}function SB(e,t,n,r){let i=e.Ref(n)??!1,a=new EL,o=AI(i)&&MB(e,a,i,r);return o&&t.Merge([a]),o}function CB(e,t,n,r){return uI(n.required,0,e=>W(r,e))}function wB(e,t,n,r,i){return U(n,`object`)?XF(i):U(n,`array`)?HF(i):U(n,`boolean`)?WF(i):U(n,`integer`)?qF(i):U(n,`number`)?YF(i):U(n,`null`)?JF(i):U(n,`string`)?QF(i):U(n,`bigint`)?UF(i):U(n,`constructor`)?GF(i):U(n,`function`)?KF(i):U(n,`symbol`)?$F(i):U(n,`undefined`)?eI(i):!U(n,`void`)||eI(i)}function TB(e,t,n,r,i){return n.some(n=>wB(e,t,n,r,i))}function EB(e,t,n,r){return HF(n.type)?TB(e,t,n.type,n,r):wB(e,t,n.type,n,r)}function DB(e,t,n,r){let i=t.GetIndices();return uI(r,0,(r,a)=>(i.has(a)||MB(e,t,n.unevaluatedItems,r))&&t.AddIndex(a))}function OB(e,t,n,r){let i=t.GetKeys();return uI(pI(r),0,([r,a])=>i.has(r)||MB(e,t,n.unevaluatedProperties,a)&&t.AddKey(r))}function kB(e){return!U(e.uniqueItems,!1)}function AB(e,t,n,r){if(!kB(n))return!0;let i=new Set(r.map(nR)).size,a=r.length;return U(i,a)}function jB(e,t,n,r){return t.Push()&&MB(e,t,n,r)&&t.Pop()}function MB(e,t,n,r){e.Push(n);let i=kI(n)?dR(e,t,n,r):(!SL(n)||EB(e,t,n,r))&&(!(ZF(r)&&!HF(r))||(!bL(n)||CB(e,t,n,r))&&(!MI(n)||cR(e,t,n,r))&&(!RI(n)||hR(e,t,n,r))&&(!zI(n)||gR(e,t,n,r))&&(!BI(n)||_R(e,t,n,r))&&(!fL(n)||pB(e,t,n,r))&&(!mL(n)||yB(e,t,n,r))&&(!hL(n)||bB(e,t,n,r))&&(!sL(n)||cB(e,t,n,r))&&(!nL(n)||nB(e,t,n,r)))&&(!HF(r)||(!jI(n)||aR(e,t,n,r))&&(!LI(n)||mR(e,t,n,r))&&(!XI(n)||Xz(e,t,n,r))&&(!$I(n)||Qz(e,t,n,r))&&(!eL(n)||eB(e,t,n,r))&&(!iL(n)||iB(e,t,n,r))&&(!aL(n)||oB(e,t,n,r))&&(!pL(n)||mB(e,t,n,r))&&(!CL(n)||AB(e,t,n,r)))&&(!QF(r)||(!tL(n)||tB(e,t,n,r))&&(!oL(n)||sB(e,t,n,r))&&(!qI(n)||Kz(e,t,n,r))&&(!dL(n)||fB(e,t,n,r)))&&(!(YF(r)||UF(r))||(!GI(n)||bR(e,t,n,r))&&(!KI(n)||xR(e,t,n,r))&&(!QI(n)||$z(e,t,n,r))&&(!rL(n)||aB(e,t,n,r))&&(!cL(n)||lB(e,t,n,r)))&&(!yL(n)||SB(e,t,n,r))&&(!vL(n)||xB(e,t,n,r))&&(!HI(n)||vR(e,t,n,r))&&(!II(n)||fR(e,t,n,r))&&(!WI(n)||yR(e,t,n,r))&&(!YI(n)||qz(e,t,n,r))&&(!lL(n)||uB(e,t,n,r))&&(!NI(n)||lR(e,t,n,r))&&(!FI(n)||uR(e,t,n,r))&&(!uL(n)||dB(e,t,n,r))&&(!wL(n)||!HF(r)||DB(e,t,n,r))&&(!TL(n)||!ZF(r)||OB(e,t,n,r))&&(!DI(n)||rR(e,t,n,r));return e.Pop(n),i}function NB(e,t){return ZF(t)&&!fI(e)?t[e]:void 0}function PB(e,t){return e.reduce((e,t)=>NB(t,e),t)}function FB(e){if(U(e.length,0))return[];let t=e.split(`/`).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`));return t.length>0&&t[0]===``?t.slice(1):t}function IB(e,t){return PB(FB(t),e)}function LB(e,t,n){if(e.$id===n.hash)return e;let r=new URL(e.$id,t.href),i=new URL(n.href,t.href);if(U(r.pathname,i.pathname))return n.hash.startsWith(`#`)?BB(e,t,n):e}function RB(e,t,n){let r=new URL(`#${e.$anchor}`,t.href),i=new URL(n.href,t.href);return U(r.href,i.href)?e:void 0}function zB(e,t,n){let r=new URL(`#${e.$dynamicAnchor}`,t.href),i=new URL(n.href,t.href);return U(r.href,i.href)?e:void 0}function BB(e,t,n){if(n.href.endsWith(`#`))return e;if(!n.hash.startsWith(`#`))return;let r=decodeURIComponent(n.hash.slice(1));if(r.startsWith(`/`))return IB(e,r)}function VB(e,t,n){if(JI(e)){let r=LB(e,t,n);if(!eI(r))return r}if(PI(e)){let r=RB(e,t,n);if(!eI(r))return r}if(VI(e)){let r=zB(e,t,n);if(!eI(r))return r}return BB(e,t,n)}function HB(e,t,n){return e.reduce((e,r)=>{let i=WB(r,t,n);return eI(i)?e:i},void 0)}function UB(e,t,n){return G(e).reduce((r,i)=>{let a=WB(e[i],t,n);return eI(a)?r:a},void 0)}function WB(e,t,n){let r=OI(e)&&JI(e)?new URL(e.$id,t.href):t;if(OI(e)){let t=VB(e,r,n);if(!eI(t))return t}if(HF(e))return HB(e,r,n);if(ZF(e))return UB(e,r,n)}function GB(e,t){let n=new URL(`http://unknown/`),r=JI(e)?new URL(e.$id,n.href):n;return WB(e,r,new URL(t,r.href))}function KB(e,t,n,r){let i=n.$dynamicRef.startsWith(`#`)?GB(t,n.$dynamicRef):GB(e,n.$dynamicRef);if(!eI(i))return!OI(i)||!VI(i)||new URL(n.$dynamicRef,`http://unknown/`).hash.startsWith(`#/`)?i:r.find(e=>e.$dynamicAnchor===i.$dynamicAnchor)??i}var qB=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},JB,YB,XB,ZB,QB,$B=class{constructor(e,t){JB.add(this),this.context=e,this.schema=t,this.ids=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[]}BaseURL(){return this.ids.reduce((e,t)=>new URL(t.$id,e),new URL(`http://unknown`))}Base(){return this.ids[this.ids.length-1]??this.schema}Push(e){OI(e)&&(JI(e)&&(this.ids.push(e),qB(this,JB,`m`,YB).call(this,e)),PI(e)&&this.anchors.push(e),_L(e)&&this.recursiveAnchors.push(e),VI(e)&&this.dynamicAnchors.push(e))}Pop(e){OI(e)&&(JI(e)&&(this.ids.pop(),qB(this,JB,`m`,XB).call(this,e)),PI(e)&&this.anchors.pop(),_L(e)&&this.recursiveAnchors.pop(),VI(e)&&this.dynamicAnchors.pop())}Ref(e){return qB(this,JB,`m`,ZB).call(this,e)??qB(this,JB,`m`,QB).call(this,e)}RecursiveRef(e){return _L(this.Base())?GB(this.recursiveAnchors[0],e.$recursiveRef):GB(this.Base(),e.$recursiveRef)}DynamicRef(e){let t=this.schema;return KB(t,this.Base(),e,this.dynamicAnchors)}};JB=new WeakSet,YB=function e(t,n=!0){if(!OI(t))return;let r=t;if(!(!n&&JI(r))){!n&&VI(r)&&this.dynamicAnchors.push(r);for(let t of G(r))qB(this,JB,`m`,e).call(this,r[t],!1)}},XB=function e(t,n=!0){if(!OI(t))return;let r=t;if(!(!n&&JI(r))){!n&&VI(r)&&this.dynamicAnchors.pop();for(let t of G(r))qB(this,JB,`m`,e).call(this,r[t],!1)}},ZB=function(e){return W(this.context,e.$ref)?this.context[e.$ref]:void 0},QB=function(e){let t=this.schema;return e.$ref.startsWith(`#`)?GB(this.Base(),e.$ref):GB(t,e.$ref)};function eV(...e){let[t,n,r]=DF(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return MB(new $B(t,n),new EL,n,r)}function tV(...e){let[t,n,r]=DF(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return eV(t,n,r)}var nV={assign:0,create:0,clone:0,discard:0,update:0};function rV(e,t){return nV.assign+=1,{...e,...t}}function iV(e){return e}function aV(e){return W(e,`~kind`)||W(e,`~unsafe`)}function oV(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){if(fI(e))continue;let r=n[e];W(r,`value`)&&Object.defineProperty(t,e,{...r,value:mV(r.value)})}return t}function sV(e){let t={};for(let n of G(e))fI(n)||(t[n]=mV(e[n]));for(let n of mI(e))t[n]=mV(e[n]);return t}function cV(e){return oI(e)?iV(e):aV(e)?oV(e):sV(e)}function lV(e){return e.map(e=>mV(e))}function uV(e){return e.slice()}function dV(e){return new RegExp(e.source,e.flags)}function fV(e){return new Map(mV([...e.entries()]))}function pV(e){return new Set(mV([...e.values()]))}function mV(e){return SI(e)?uV(e):CI(e)?dV(e):EI(e)?fV(e):TI(e)?pV(e):HF(e)?lV(e):ZF(e)?cV(e):e}function hV(e){return nV.clone+=1,mV(e)}function gV(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function _V(e,t){return{...e,...t}}function vV(e,t,n={}){nV.create+=1;let r=gB(),i=_V(t,n),a=r.enumerableKind?_V(i,e):gV(i,e);return r.immutableTypes?Object.freeze(a):a}function yV(e,t){nV.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(hV(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function K(e,t,n){nV.update+=1;let r=gB(),i=hV(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function bV(e,t){return ZF(e)&&W(e,`~kind`)&&U(e[`~kind`],t)}function xV(e){return ZF(e)}function SV(e,t,n){return vV({"~kind":`Deferred`},{type:`deferred`,action:e,parameters:t,options:n},{})}function CV(e){return bV(e,`Deferred`)}function wV(e){return K(e,{"~readonly":!0},{})}function TV(e,t){return K(wV(e),{},t)}function EV(e,t,n,r){return TV(Z(e,t,n),r)}function DV(e){return K(e,{"~optional":!0},{})}function OV(e,t){return K(DV(e),{},t)}function kV(e,t,n,r){return OV(Z(e,t,n),r)}function AV(e,t){return vV({"~kind":`Array`},{type:`array`,items:e},t)}function jV(e){return bV(e,`Array`)}function MV(e){return yV(e,[`~kind`,`type`,`items`])}function NV(e,t,n={}){return vV({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function PV(e){return bV(e,`Constructor`)}function FV(e){return yV(e,[`~kind`,`type`,`parameters`,`instanceType`])}function IV(e,t,n={}){return vV({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function LV(e){return bV(e,`Function`)}function RV(e){return yV(e,[`~kind`,`type`,`parameters`,`returnType`])}function zV(e,t){return vV({"~kind":`Ref`},{$ref:e},t)}function BV(e){return bV(e,`Ref`)}function VV(e,t){return vV({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function HV(e){return bV(e,`Generic`)}function UV(e){return vV({"~kind":`Any`},{},e)}function WV(e){return bV(e,`Any`)}var GV=`(?!)`;function KV(e){return vV({"~kind":`Never`},{not:{}},e)}function qV(e){return bV(e,`Never`)}function JV(e,t={}){return SV(`AddOptional`,[e],t)}function YV(e,t={}){return OV(e,t)}function XV(e){return YV(e)}function ZV(e){return xV(e)&&W(e,`~optional`)}function QV(e){return G(e).filter(t=>!ZV(e[t]))}function $V(e){return G(e)}function eH(e){return hI(e)}function tH(e,t={}){let n=QV(e);return vV({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function nH(e){return bV(e,`Object`)}function rH(e){return yV(e,[`~kind`,`type`,`properties`,`required`])}function iH(e){return vV({"~kind":`Unknown`},{},e)}function aH(e){return bV(e,`Unknown`)}function oH(e,t,n){return vV({"~kind":`Cyclic`},{$defs:G(e).reduce((t,n)=>({...t,[n]:K(e[n],{},{$id:n})}),{}),$ref:t},n)}function sH(e){return bV(e,`Cyclic`)}function cH(e){return K(e,{"~unsafe":null},{})}function lH(e){return XF(e)&&W(e,`~unsafe`)&&JF(e[`~unsafe`])}function uH(...e){let[t,n]=DF(e,{2:(e,t)=>[e,t,t],1:e=>[e,iH(),iH()]});return vV({"~kind":`Infer`},{type:`infer`,name:t,extends:n},{})}function dH(e){return bV(e,`Infer`)}function fH(e,t,n,r={}){return vV({"~kind":`Dependent`},{if:e,then:t,else:n},r)}function pH(e){return bV(e,`Dependent`)}function mH(e){return yV(e,[`~kind`,`if`,`then`,`else`])}function hH(e){return XF(e)}function gH(e){return G(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function _H(e){return QF(e)||YF(e)}function vH(e,t){return vV({"~kind":`Enum`},{enum:hH(e)?gH(e):e},t)}function yH(e){return bV(e,`Enum`)}function bH(e,t={}){return vV({"~kind":`Intersect`},{allOf:e},t)}function xH(e){return bV(e,`Intersect`)}function SH(e){return yV(e,[`~kind`,`allOf`])}var CH=class{constructor(e,t){this.type=e,this.decode=t}Encode(e){let t=this.type,n={decode:OH(t)?e=>this.decode(t[`~codec`].decode(e)):this.decode,encode:OH(t)?n=>t[`~codec`].encode(e(n)):e};return K(this.type,{"~codec":n},{})}},wH=class{constructor(e){this.type=e}Decode(e){return new CH(this.type,e)}};function TH(e){return new wH(e)}function EH(e,t){return TH(e).Decode(t).Encode(()=>{throw Error(`Encode not implemented`)})}function DH(e,t){return TH(e).Decode(()=>{throw Error(`Decode not implemented`)}).Encode(t)}function OH(e){return xV(e)&&W(e,`~codec`)&&ZF(e[`~codec`])&&W(e[`~codec`],`encode`)&&W(e[`~codec`],`decode`)}function kH(e){return f3(e)}function AH(e){return xV(e)&&W(e,`~immutable`)}function jH(e,t={}){return SV(`AddReadonly`,[e],t)}function MH(e,t={}){return TV(e,t)}function NH(e){return MH(e)}function PH(e){return xV(e)&&W(e,`~readonly`)}function FH(e,t){return K(e,{"~refine":RH(e)?[...e[`~refine`],t]:[t]},{})}function IH(...e){let[t,n,r]=DF(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,()=>`Refine Error`]});return FH(t,{check:n,error:r})}function LH(e){return XF(e)&&W(e,`check`)&&W(e,`error`)&&KF(e.check)&&KF(e.error)}function RH(e){return xV(e)&&W(e,`~refine`)&&HF(e[`~refine`])&&uI(e[`~refine`],0,e=>LH(e))}var zH=`-?(?:0|[1-9][0-9]*)n`;function BH(e){return vV({"~kind":`BigInt`},{type:`bigint`},e)}function VH(e){return bV(e,`BigInt`)}function HH(e){return vV({"~kind":`Boolean`},{type:`boolean`},e)}function UH(e){return bV(e,`Boolean`)}function WH(e){return vV({"~kind":`Identifier`},{name:e})}function GH(e){return bV(e,`Identifier`)}var KH=`-?(?:0|[1-9][0-9]*)`;function qH(e){return vV({"~kind":`Integer`},{type:`integer`},e)}function JH(e){return bV(e,`Integer`)}var YH=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function XH(e){return UF(e)?`bigint`:WF(e)?`boolean`:YF(e)?`number`:QF(e)?`string`:(()=>{throw new YH(e)})()}function ZH(e,t){return vV({"~kind":`Literal`},{type:XH(e),const:e},t)}function QH(e){return UF(e)||WF(e)||YF(e)||QF(e)}function $H(e){return tU(e)&&YF(e.const)}function eU(e){return tU(e)&&QF(e.const)}function tU(e){return bV(e,`Literal`)}function nU(e){return vV({"~kind":`Null`},{type:`null`},e)}function rU(e){return bV(e,`Null`)}var iU=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function aU(e){return vV({"~kind":`Number`},{type:`number`},e)}function oU(e){return bV(e,`Number`)}function sU(e){return vV({"~kind":`Symbol`},{type:`symbol`},e)}function cU(e){return bV(e,`Symbol`)}function lU(...e){let[t,n,r]=DF(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,t],1:e=>[e,iH(),iH()]});return vV({"~kind":`Parameter`},{name:t,extends:n,equals:r},{})}function uU(e){return bV(e,`Parameter`)}function dU(e){return vV({"~kind":`String`},{type:`string`},e)}function fU(e){return bV(e,`String`)}function pU(e,t={}){return vV({"~kind":`Union`},{anyOf:e},t)}function mU(e){return bV(e,`Union`)}function hU(e){return yV(e,[`~kind`,`anyOf`])}function gU(e){let t=FX(e);return U(t.length,2)?t[0]:[]}function _U(e){return!0}function vU(e){return dI(e,(e,t)=>bU(e)?vU(t):!1,()=>!0)}function yU(e){return!U(e.length,0)&&vU(e)}function bU(e){return mU(e)?yU(e.anyOf):tU(e)?_U(e.const):!1}function xU(e){return yU(e)}function SU(e){return vV({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function CU(e,t,n=[]){return dI(e,(e,r)=>CU(r,t,[...n,`${e}${t}`]),()=>n)}function wU(e,t){return U(e.length,0)?[`${t}`]:CU(e,t)}function TU(e,t,n=[]){return dI(t,(t,r)=>TU(e,r,[...n,...EU(e,t)]),()=>n)}function EU(e,t){return mU(t)?TU(e,t.anyOf):tU(t)?wU(e,t.const):DL()}function DU(e,t){return dI(t,(t,n)=>DU(EU(e,t),n),()=>e)}function OU(e){return e.map(e=>ZH(e))}function kU(e){return pU(OU(DU([],e)))}function AU(e){return U(e.length,0)?DL():U(e.length,1)&&tU(e[0])?e[0]:kU(e)}function jU(e){let t=gU(e);return U(t.length,0)?dU():xU(t)?AU(t):SU(e)}function MU(e){let t=jU(e);return bZ(t)?dU():t}function NU(e,t){return vV({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function PU(e){return NU(BW,e)}function FU(e){return tH({true:e,false:e})}function IU(e,t={}){let[n,r,i]=[e,e.length,!1];return vV({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function LU(e){return bV(e,`Tuple`)}function RU(e){return yV(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function zU(e){return yV(e,[`~readonly`])}function BU(e,t){return K(zU(e),{},t)}function VU(e,t,n,r){return BU(Z(e,t,n),r)}function HU(e,t={}){return SV(`RemoveReadonly`,[e],t)}function UU(e,t={}){return BU(e,t)}function WU(e){return yV(e,[`~optional`])}function GU(e,t){return K(WU(e),{},t)}function KU(e,t,n,r){return GU(Z(e,t,n),r)}function qU(e,t={}){return SV(`RemoveOptional`,[e],t)}function JU(e,t={}){return GU(e,t)}function YU(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function XU(e){return tH(YU(e.items))}function ZU(e,t){return PH(e)?!!PH(t):!1}function QU(e,t){return ZV(e)?!!ZV(t):!1}function $U(e,t){let n=ZU(e,t),r=QU(e,t),i=UU(JU(gW([e,t])));return n&&r?MH(YV(i)):n&&!r?MH(i):!n&&r?YV(i):i}function eW(e,t,n){return n in e?n in t?$U(e[n],t[n]):e[n]:n in t?t[n]:KV()}function tW(e,t){return[...new Set([...G(t),...G(e)])].reduce((n,r)=>({...n,[r]:eW(e,t,r)}),{})}function nW(e){return nH(e)?e.properties:LU(e)?YU(e.items):DL()}function rW(e,t){return tH(tW(nW(e),nW(t)))}function iW(e,t){let n=k$(e,t);return U(n,`left-inside`)?e:U(n,`right-inside`)||U(n,`equal`)?t:KV()}function aW(e){return nH(e)||LU(e)}function oW(e,t){let n=mU(e),r=mU(t);return n||r}function sW(e,t){let n=yW(e),r=yW(t),i=oW(n,r),a=aW(n),o=aW(r);return i?gW([n,r]):a&&o?rW(n,r):a&&!o?n:!a&&o?r:iW(n,r)}function cW(e,t,n=[]){return dI(t,(t,r)=>cW(e,r,[...n,sW(e,t)]),()=>U(n.length,0)?[e]:n)}function lW(e,t,n=[]){return dI(e,(e,r)=>lW(r,t,[...n,...uW([e],t)]),()=>n)}function uW(e,t=[]){return dI(e,(e,n)=>mU(e)?uW(n,lW(e.anyOf,t)):uW(n,cW(e,t)),()=>t)}function dW(e,t){return DZ(w$({},e,t))?[]:[e]}function fW(e,t){return e.reduce((e,n)=>[...e,...dW(n,t)],[])}function pW(e,t){let n=yW(e);return vW(fW(mU(n)?n.anyOf:[n],t))}function mW(e,t,n){return vW([bH([e,t]),pW(n,e)])}function hW(e){return vW(e.map(e=>ZH(e)))}function gW(e){return bW(P$(uW(e)))}function _W(e){return yW(MU(e))}function vW(e){return bW(P$(e))}function yW(e){return pH(e)?mW(e.if,e.then,e.else):yH(e)?hW(e.enum):xH(e)?gW(e.allOf):bZ(e)?_W(e.pattern):mU(e)?vW(e.anyOf):e}function bW(e){return U(e.length,1)?e[0]:U(e.length,0)?KV():pU(e)}function xW(e,t){return FW(hW(e),t)}function SW(e,t){return NU(RW,t)}function CW(e,t){return FW(gW(e),t)}function wW(e,t){return QF(e)||YF(e)?tH({[e]:t}):U(e,!1)?tH({false:t}):U(e,!0)?tH({true:t}):tH({})}function TW(e,t){return NU(zW,t)}function EW(e,t){return W(e,`pattern`)&&(QF(e.pattern)||e.pattern instanceof RegExp)?NU(e.pattern.toString(),t):NU(BW,t)}function DW(e,t){return xU(gU(e))?FW(_W(e),t):NU(e,t)}function OW(e){return mU(e)?kW(e.anyOf):[e]}function kW(e){return e.reduce((e,t)=>[...e,...OW(t)],[])}function AW(e){return e.some(e=>fU(e)||oU(e)||JH(e))}function jW(e,t){return U(AW(e),!0)?NU(BW,t):void 0}function MW(e,t){return e.reduce((e,n)=>tU(n)&&(QF(n.const)||YF(n.const))?{...e,[n.const]:t}:e,{})}function NW(e,t){return tH(MW(e,t))}function PW(e,t){let n=kW(e),r=jW(n,t);return xV(r)?r:NW(n,t)}function FW(e,t){return WV(e)?PU(t):UH(e)?FU(t):yH(e)?xW(e.enum,t):JH(e)?SW(e,t):xH(e)?CW(e.allOf,t):tU(e)?wW(e.const,t):oU(e)?TW(e,t):mU(e)?PW(e.anyOf,t):fU(e)?EW(e,t):bZ(e)?DW(e.pattern,t):tH({})}function IW(e,t,n){return e3([e])?K(FW(e,t),{},n):VW(e,t,n)}function LW(e,t,n,r,i){return IW(Z(e,t,n),Z(e,t,r),i)}var RW=`^${KH}$`,zW=`^${iU}$`,BW=`^.*$`;function VW(e,t,n={}){return SV(`Record`,[e,t],n)}function HW(e,t,n={}){return IW(e,t,n)}function UW(e,t){return NU(e,t)}function WW(e){return U(e,BW)?dU():U(e,RW)?qH():U(e,zW)?aU():jU(e)}function GW(e){return G(e.patternProperties)[0]}function KW(e){return WW(GW(e))}function qW(e){return e.patternProperties[GW(e)]}function JW(e){return bV(e,`Record`)}function YW(e){return vV({"~kind":`Rest`},{type:`rest`,items:e},{})}function XW(e){return bV(e,`Rest`)}function ZW(e){return vV({"~kind":`This`},{$ref:`#`},e)}function QW(e){return bV(e,`This`)}function $W(e){return vV({"~kind":`Undefined`},{type:`undefined`},e)}function eG(e){return bV(e,`Undefined`)}function tG(e){return vV({"~kind":`Void`},{type:`void`},e)}function nG(e){return bV(e,`Void`)}function rG(e,t){return U(e,`Array`)?AV(t[0]):U(e,`Capitalize`)?y1(t[0]):U(e,`ConstructorParameters`)?W1(t[0]):U(e,`Evaluate`)?p3(t[0]):U(e,`Exclude`)?Y1(t[0],t[1]):U(e,`Extract`)?$1(t[0],t[1]):U(e,`Index`)?c0(t[0],t[1]):U(e,`InstanceType`)?r2(t[0]):U(e,`Lowercase`)?x1(t[0]):U(e,`NonNullable`)?z2(t[0]):U(e,`Omit`)?W2(t[0],t[1]):U(e,`Parameters`)?Z2(t[0]):U(e,`Partial`)?n4(t[0]):U(e,`Pick`)?f4(t[0],t[1]):U(e,`Readonly`)?v4(t[0]):U(e,`KeyOf`)?c2(t[0]):U(e,`Record`)?VW(t[0],t[1]):U(e,`Required`)?R4(t[0]):U(e,`ReturnType`)?H4(t[0]):U(e,`Uncapitalize`)?C1(t[0]):U(e,`Uppercase`)?T1(t[0]):c1(zV(e),t)}function iG(){throw Error(`Unreachable`)}var aG=(e,t=[])=>e.reduce((e,t)=>HF(t)&&U(t.length,2)?[...e,t[0]]:[...e,t],[]),oG=e=>{let[t,n]=e;return aG([...t,...n])};function sG(e){return lU(e[0],e[2],e[4])}function cG(e){return lU(e[0],e[2],e[2])}function lG(e){return lU(e[0],iH(),e[2])}function uG(e){return lU(e,iH(),iH())}function dG(e){return e}function fG(e){return oG(e)}function pG(e){return e[1]}function mG(e){return oG(e)}function hG(e){return e[1]}function gG(e){return rG(e[0],e[1])}function _G(e){return null}function vG(e){return dU()}function yG(e){return aU()}function bG(e){return HH()}function xG(e){return $W()}function SG(e){return nU()}function CG(e){return qH()}function wG(e){return BH()}function TG(e){return iH()}function EG(e){return UV()}function DG(e){return tH({})}function OG(e){return KV()}function kG(e){return sU()}function AG(e){return tG()}function jG(e){return ZW()}function MG(e){return ZH(BigInt(e))}function NG(e){return ZH(U(e,`true`))}function PG(e){return ZH(parseFloat(e))}function FG(e){return ZH(e)}function IG(e){return e[1]}function LG(e){return ZH(e)}function RG(e){return U(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function zG(e){return e[1]}function BG(e){return hZ(e)}function VG(e){return U(e.length,6)?fH(e[1],e[3],e[5]):fH(e[1],e[3],iH())}function HG(e){return e.length>0}function UG(e){return e.reduce((e,t)=>U(t.length,3)?[...e,[t[1]]]:[...e,[]],[])}function WG(e){return U(e.length,6)?[e[1],e[3],e[5]]:[]}function GG(e){return HF(e)&&U(e.length,3)?e[1]:e}function KG(e){return U(e.length,2)?e[1]:[]}function qG(e,t){return t.reduce((e,t)=>{let n=t;return U(n.length,1)?c0(e,n[0]):U(n.length,0)?AV(e):iG()},e)}function JG(e,t){return U(t.length,3)?z1(e,t[0],t[1],t[2]):e}function YG(e,t){return HF(t)&&U(t.length,0)?e:q4(e,t)}function XG(e){let[t,n,r,i,a]=e;return YG(JG(t?c2(qG(n,r)):qG(n,r),i),a)}function ZG(e,t){return U(t.length,3)?(()=>{let[n,r,i]=t,a=ZG(r,i);if(U(n,`&`))return xH(a)?bH([e,...a.allOf]):bH([e,a]);if(U(n,`|`))return mU(a)?pU([e,...a.anyOf]):pU([e,a]);iG()})():e}function QG(e){return e}function $G(e){let[t,n]=e;return ZG(t,n)}function eK(e){return e}function tK(e){let[t,n]=e;return ZG(t,n)}function nK(e){return d3(e[1])}function rK(e){return e[1]}function iK(e){return VV(e[0],e[2])}function aK(e){return U(e.length,4)?uH(e[1],e[3]):U(e.length,2)?uH(e[1],iH()):iG()}function oK(e){return e}function sK(e){return`${e}`}function cK(e){return e}function lK(e){return e}function uK(e){return JH(e[3])?RW:oU(e[3])?zW:cU(e[3])||fU(e[3])?BW:iG()}function dK(e){return e}function fK(e){return e.length>0}function pK(e){return e.length>0}function mK(e){let[t,n,r,i,a]=e;return{[n]:t&&r?jH(JV(a)):t&&!r?jH(a):!t&&r?JV(a):a}}function hK(e){return e}function gK(e){return oG(e)}function _K(e){return e.reduce((e,t)=>W(t,RW)||W(t,zW)||W(t,BW)?[e[0],rV(e[1],t)]:[rV(e[0],t),e[1]],[{},{}])}function vK(e){return _K(e[1])}function yK(e){let[t,n]=e;return tH(t,U(G(n).length,0)?{}:{patternProperties:n})}function bK(e){return U(e.length,5)?jH(JV(e[4])):U(e.length,3)?e[2]:U(e.length,4)?U(e[2],`readonly`)?jH(e[3]):JV(e[3]):iG()}function xK(e){return jH(JV(e[1]))}function SK(e){return jH(e[1])}function CK(e){return JV(e[0])}function wK(e){return e}function TK(e){return U(e.length,2)?YW(e[1]):U(e.length,1)?e[0]:iG()}function EK(e){return oG(e)}function DK(e){return IU(e[1])}function OK(e){return jH(JV(e[4]))}function kK(e){return jH(e[3])}function AK(e){return JV(e[3])}function jK(e){return e[2]}function MK(e){return e}function NK(e){return U(e.length,2)?YW(e[1]):U(e.length,1)?e[0]:iG()}function PK(e){return oG(e)}function FK(e){return IV(e[1],e[4])}function IK(e){return NV(e[2],e[5])}function LK(e,t){return U(e,`remove`)?HU(t):U(e,`add`)?jH(t):t}function RK(e){return U(e.length,2)&&U(e[0],`-`)?`remove`:U(e.length,2)&&U(e[0],`+`)||U(e.length,1)?`add`:`none`}function zK(e,t){return U(e,`remove`)?qU(t):U(e,`add`)?JV(t):t}function BK(e){return U(e.length,2)&&U(e[0],`-`)?`remove`:U(e.length,2)&&U(e[0],`+`)||U(e.length,1)?`add`:`none`}function VK(e){return U(e.length,2)?[e[1]]:[]}function HK(e){return HF(e[6])&&U(e[6].length,1)?b2(WH(e[3]),e[5],e[6][0],LK(e[1],zK(e[8],e[10]))):b2(WH(e[3]),e[5],zV(e[3]),LK(e[1],zK(e[8],e[10])))}function UK(e){return zV(e)}function WK(e){return BigInt(e)}function GK(e){return parseFloat(e)}function KK(e){return U(e,`true`)}function qK(e){return e}function JK(e){return null}function YK(e){return{[e[0]]:e[2]}}function XK(e){return oG(e)}function ZK(e){return e.reduce((e,t)=>rV(e,t),{})}function QK(e){return ZK(e[1])}function $K(e){return oG(e)}function eq(e){return e[1]}function tq(e){return e}function nq(e){return BH()}function rq(e){return dU()}function iq(e){return aU()}function aq(e){return qH()}function oq(e){return KV()}function sq(e){return ZH(e)}function cq(e){return e}function lq(e){return pU(e[1])}function uq(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function dq(e){return[e[0],...e[1]]}function fq(e){return e}function pq(e){return e[1]}function mq(e){return oG(e)}function hq(e){return U(e.length,2)?e[1]:[]}function gq(e){let t=e[2],n=e[3],[r,i]=e[4],a=U(G(i).length,0)?{}:{patternProperties:i};return{[e[1]]:VV(t,ZQ(n,r,a))}}function _q(e){let t=e[2],[n,r]=e[3],i=U(G(r).length,0)?{}:{patternProperties:r};return{[e[1]]:ZQ(t,n,i)}}function vq(e){return{[e[1]]:VV(e[2],e[4])}}function yq(e){return{[e[1]]:e[3]}}function bq(e){return null}function xq(e){return e}function Sq(e){return _K(oG(e))}function Cq(e){return e[1]}function wq(e){let t=e[0],n=e[1];return h3(rV(t,n[0]))}function Tq(e){return e}function Eq(e){return U(e.length,2)}function Dq(e,t,n){return Eq(e)?t(e[0],e[1]):n()}function Oq(e,t){return U(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function kq(e,t){for(let n=0;n<e.length;n++){let r=Oq(e[n],t);if(Eq(r))return r}return[]}function Aq(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var jq=[...Aq(97,122),...Aq(65,90)],Mq=Aq(49,57),Nq=[`0`,...Mq],Pq=`//`,Fq=`/*`,Iq=`*/`;function Lq(e){let t=e.indexOf(Iq);return U(t,-1)?``:e.slice(t+2)}function Rq(e){let t=e.indexOf(`
81
+ `);return U(t,-1)?``:e.slice(t)}function zq(e){return e.replace(/^[ \t\r\f\v]+/,``)}function Bq(e){let t=zq(e);return t.startsWith(Fq)?Bq(Lq(t.slice(2))):t.startsWith(Pq)?Bq(Rq(t.slice(2))):t}function Vq(e){let t=e.trimStart();return t.startsWith(Fq)?Vq(Lq(t.slice(2))):t.startsWith(Pq)?Vq(Rq(t.slice(2))):t}function Hq(e,t){return Dq(kq([e],t),(e,t)=>[e,t],()=>[``,t])}function Uq(e,t){return e.includes(t)}function Wq(e,t,n,r=``){return Dq(kq(e,n),(n,i)=>Uq(t,n)?Wq(e,t,i,r):Wq(e,t,i,`${r}${n}`),()=>[r,n])}function Gq(e){return kq(Mq,e)}var Kq=[...Nq,`_`];function qq(e){return Wq(Kq,[`_`],e)}function Jq(e){return Dq(kq([`0`],e),(e,t)=>[e,t],()=>Dq(Gq(e),(e,t)=>Dq(qq(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[]))}function Yq(e){return Jq(Vq(e))}function Xq(e){return Hq(`-`,e)}function Zq(e){return Dq(Xq(e),(e,t)=>Dq(Yq(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Qq(e){return Zq(Vq(e))}function $q(e){return Dq(Qq(e),(e,t)=>Dq(kq([`n`],t),(t,n)=>[`${e}`,n],()=>[]),()=>[])}function eJ(e){return $q(e)}function tJ(e,t){return kq([e],t)}function q(e,t){return U(e,``)?[``,t]:e.startsWith(`
82
+ `)?tJ(e,Bq(t)):e.startsWith(` `)?tJ(e,t):tJ(e,Vq(t))}var nJ=[...jq,`_`,`$`];function rJ(e){return kq(nJ,e)}var iJ=[...nJ,...Nq];function aJ(e,t=``){return Dq(kq(iJ,e),(e,n)=>aJ(n,`${t}${e}`),()=>[t,e])}function oJ(e){return Dq(rJ(e),(e,t)=>Dq(aJ(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function sJ(e){return oJ(Vq(e))}var cJ=[...Nq,`_`];function lJ(e){return Eq(kq([`.`],e))}function uJ(e){return Dq(Wq(cJ,[`_`],e),(e,t)=>U(e,``)?[]:[e,t],()=>[])}function dJ(e){return Dq(kq([`.`],e),(e,t)=>Dq(uJ(t),(t,n)=>[`0${e}${t}`,n],()=>[]),()=>[])}function fJ(e){return Dq(Yq(e),(e,t)=>Dq(kq([`.`],t),(t,n)=>Dq(uJ(n),(n,r)=>[`${e}${t}${n}`,r],()=>[`${e}`,n]),()=>[`${e}`,t]),()=>[])}function pJ(e){return lJ(e)?dJ(e):fJ(e)}function mJ(e){return pJ(Vq(e))}function hJ(e){return Hq(`-`,e)}function gJ(e){return Dq(hJ(e),(e,t)=>Dq(mJ(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function _J(e){return gJ(Vq(e))}function vJ(e){return U(e,``)?[]:[e.slice(0,1),e.slice(1)]}function yJ(e,t){return dI(e,(e,n)=>t.startsWith(e)?!0:yJ(n,t),()=>!1)}function bJ(e,t,n=``){return Dq(vJ(t),(r,i)=>yJ(e,t)?[n,t]:bJ(e,i,`${n}${r}`),()=>[])}function xJ(e,t,n){return Dq(kq([e],n),(e,n)=>Dq(bJ([t],n),(e,n)=>Dq(kq([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function SJ(e,t,n){return Dq(kq([e],n),(e,n)=>Dq(bJ([`
83
+ `,t],n),(e,n)=>Dq(kq([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function CJ(e,t,n,r){return n?xJ(e,t,Vq(r)):SJ(e,t,Vq(r))}function wJ(e,t){return kq(e,t)}function TJ(e,t){return CJ(e,e,!1,t)}function EJ(e,t){return Dq(wJ(e,t),(e,t)=>TJ(e,`${e}${t}`),()=>[])}function DJ(e,t){return EJ(e,Vq(t))}function OJ(e,t){return Dq(bJ(e,t),(e,t)=>U(e,``)?[]:[e,t],()=>[])}var J=(e,t,n=()=>[])=>e.length===2?t(e):n(),kJ=e=>J(J(sJ(e),([e,t])=>J(q(`extends`,t),([t,n])=>J(Y(n),([n,r])=>J(q(`=`,r),([r,i])=>J(Y(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[sG(e),t]),AJ=e=>J(J(sJ(e),([e,t])=>J(q(`extends`,t),([t,n])=>J(Y(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[cG(e),t]),jJ=e=>J(J(sJ(e),([e,t])=>J(q(`=`,t),([t,n])=>J(Y(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[lG(e),t]),MJ=e=>J(sJ(e),([e,t])=>[uG(e),t]),NJ=e=>J(J(kJ(e),([e,t])=>[e,t],()=>J(AJ(e),([e,t])=>[e,t],()=>J(jJ(e),([e,t])=>[e,t],()=>J(MJ(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[dG(e),t]),PJ=(e,t=[])=>J(J(NJ(e),([e,t])=>J(q(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>PJ(n,[...t,e]),()=>[t,e]),FJ=e=>J(J(PJ(e),([e,t])=>J(J(J(NJ(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[fG(e),t]),IJ=e=>J(J(q(`<`,e),([e,t])=>J(FJ(t),([t,n])=>J(q(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[pG(e),t]),LJ=(e,t=[])=>J(J(Y(e),([e,t])=>J(q(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>LJ(n,[...t,e]),()=>[t,e]),RJ=e=>J(J(LJ(e),([e,t])=>J(J(J(Y(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[mG(e),t]),zJ=e=>J(J(q(`<`,e),([e,t])=>J(RJ(t),([t,n])=>J(q(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[hG(e),t]),BJ=e=>J(J(sJ(e),([e,t])=>J(zJ(t),([t,n])=>[[e,t],n])),([e,t])=>[gG(e),t]),VJ=e=>J(J(J(q(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[_G(e),t]),HJ=e=>J(q(`string`,e),([e,t])=>[vG(e),t]),UJ=e=>J(q(`number`,e),([e,t])=>[yG(e),t]),WJ=e=>J(q(`boolean`,e),([e,t])=>[bG(e),t]),GJ=e=>J(q(`undefined`,e),([e,t])=>[xG(e),t]),KJ=e=>J(q(`null`,e),([e,t])=>[SG(e),t]),qJ=e=>J(q(`integer`,e),([e,t])=>[CG(e),t]),JJ=e=>J(q(`bigint`,e),([e,t])=>[wG(e),t]),YJ=e=>J(q(`unknown`,e),([e,t])=>[TG(e),t]),XJ=e=>J(q(`any`,e),([e,t])=>[EG(e),t]),ZJ=e=>J(q(`object`,e),([e,t])=>[DG(e),t]),QJ=e=>J(q(`never`,e),([e,t])=>[OG(e),t]),$J=e=>J(q(`symbol`,e),([e,t])=>[kG(e),t]),eY=e=>J(q(`void`,e),([e,t])=>[AG(e),t]),tY=e=>J(q(`this`,e),([e,t])=>[jG(e),t]),nY=e=>J(J(q("${",e),([e,t])=>J(Y(t),([t,n])=>J(q(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[IG(e),t]),rY=e=>J(bJ(["${","`"],e),([e,t])=>[LG(e),t]),iY=e=>J(J(J(rY(e),([e,t])=>J(nY(t),([t,n])=>J(iY(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>J(J(rY(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J(J(rY(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[RG(e),t]),aY=e=>J(J(q("`",e),([e,t])=>J(iY(t),([t,n])=>J(q("`",n),([n,r])=>[[e,t,n],r]))),([e,t])=>[zG(e),t]),oY=e=>J(aY(e),([e,t])=>[BG(e),t]),sY=e=>J(J(J(q(`if`,e),([e,t])=>J(Y(t),([t,n])=>J(q(`then`,n),([n,r])=>J(Y(r),([r,i])=>J(q(`else`,i),([i,a])=>J(Y(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>J(J(q(`if`,e),([e,t])=>J(Y(t),([t,n])=>J(q(`then`,n),([n,r])=>J(Y(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>[])),([e,t])=>[VG(e),t]),cY=e=>J(eJ(e),([e,t])=>[MG(e),t]),lY=e=>J(J(q(`true`,e),([e,t])=>[e,t],()=>J(q(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[NG(e),t]),uY=e=>J(_J(e),([e,t])=>[PG(e),t]),dY=e=>J(DJ([`'`,`"`],e),([e,t])=>[FG(e),t]),fY=e=>J(J(J(q(`keyof`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[HG(e),t]),pY=(e,t=[])=>J(J(J(q(`[`,e),([e,t])=>J(Y(t),([t,n])=>J(q(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>J(J(q(`[`,e),([e,t])=>J(q(`]`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,n])=>pY(n,[...t,e]),()=>[t,e]),mY=e=>J(pY(e),([e,t])=>[UG(e),t]),hY=e=>J(J(J(q(`extends`,e),([e,t])=>J(Y(t),([t,n])=>J(q(`?`,n),([n,r])=>J(Y(r),([r,i])=>J(q(`:`,i),([i,a])=>J(Y(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[WG(e),t]),gY=e=>J(J(J(q(`(`,e),([e,t])=>J(Y(t),([t,n])=>J(q(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>J(HJ(e),([e,t])=>[e,t],()=>J(UJ(e),([e,t])=>[e,t],()=>J(WJ(e),([e,t])=>[e,t],()=>J(GJ(e),([e,t])=>[e,t],()=>J(KJ(e),([e,t])=>[e,t],()=>J(qJ(e),([e,t])=>[e,t],()=>J(JJ(e),([e,t])=>[e,t],()=>J(YJ(e),([e,t])=>[e,t],()=>J(XJ(e),([e,t])=>[e,t],()=>J(ZJ(e),([e,t])=>[e,t],()=>J(QJ(e),([e,t])=>[e,t],()=>J($J(e),([e,t])=>[e,t],()=>J(eY(e),([e,t])=>[e,t],()=>J(tY(e),([e,t])=>[e,t],()=>J(cY(e),([e,t])=>[e,t],()=>J(lY(e),([e,t])=>[e,t],()=>J(uY(e),([e,t])=>[e,t],()=>J(dY(e),([e,t])=>[e,t],()=>J(oY(e),([e,t])=>[e,t],()=>J(sY(e),([e,t])=>[e,t],()=>J(zY(e),([e,t])=>[e,t],()=>J(JY(e),([e,t])=>[e,t],()=>J(iX(e),([e,t])=>[e,t],()=>J(rX(e),([e,t])=>[e,t],()=>J(cX(e),([e,t])=>[e,t],()=>J(BJ(e),([e,t])=>[e,t],()=>J(lX(e),([e,t])=>[e,t],()=>[])))))))))))))))))))))))))))),([e,t])=>[GG(e),t]),_Y=e=>J(J(J(q(`with`,e),([e,t])=>J(yX(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[KG(e),t]),vY=e=>J(J(fY(e),([e,t])=>J(gY(t),([t,n])=>J(mY(n),([n,r])=>J(hY(r),([r,i])=>J(_Y(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[XG(e),t]),yY=e=>J(J(J(q(`&`,e),([e,t])=>J(vY(t),([t,n])=>J(yY(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[QG(e),t]),bY=e=>J(J(vY(e),([e,t])=>J(yY(t),([t,n])=>[[e,t],n])),([e,t])=>[$G(e),t]),xY=e=>J(J(J(q(`|`,e),([e,t])=>J(bY(t),([t,n])=>J(xY(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[eK(e),t]),SY=e=>J(J(bY(e),([e,t])=>J(xY(t),([t,n])=>[[e,t],n])),([e,t])=>[tK(e),t]),CY=e=>J(J(q(`readonly`,e),([e,t])=>J(SY(t),([t,n])=>[[e,t],n])),([e,t])=>[nK(e),t]),wY=e=>J(J(q(`|`,e),([e,t])=>J(SY(t),([t,n])=>[[e,t],n])),([e,t])=>[rK(e),t]),TY=e=>J(J(IJ(e),([e,t])=>J(q(`=`,t),([t,n])=>J(Y(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[iK(e),t]),EY=e=>J(J(J(q(`infer`,e),([e,t])=>J(sJ(t),([t,n])=>J(q(`extends`,n),([n,r])=>J(SY(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>J(J(q(`infer`,e),([e,t])=>J(sJ(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,t])=>[aK(e),t]),Y=e=>J(J(EY(e),([e,t])=>[e,t],()=>J(wY(e),([e,t])=>[e,t],()=>J(CY(e),([e,t])=>[e,t],()=>J(SY(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[oK(e),t]),DY=e=>J(_J(e),([e,t])=>[sK(e),t]),OY=e=>J(sJ(e),([e,t])=>[cK(e),t]),kY=e=>J(DJ([`'`,`"`],e),([e,t])=>[lK(e),t]),AY=e=>J(J(q(`[`,e),([e,t])=>J(sJ(t),([t,n])=>J(q(`:`,n),([n,r])=>J(J(qJ(r),([e,t])=>[e,t],()=>J(UJ(r),([e,t])=>[e,t],()=>J(HJ(r),([e,t])=>[e,t],()=>J($J(r),([e,t])=>[e,t],()=>[])))),([r,i])=>J(q(`]`,i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[uK(e),t]),jY=e=>J(J(DY(e),([e,t])=>[e,t],()=>J(OY(e),([e,t])=>[e,t],()=>J(kY(e),([e,t])=>[e,t],()=>J(AY(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[dK(e),t]),MY=e=>J(J(J(q(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[fK(e),t]),NY=e=>J(J(J(q(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[pK(e),t]),PY=e=>J(J(MY(e),([e,t])=>J(jY(t),([t,n])=>J(NY(n),([n,r])=>J(q(`:`,r),([r,i])=>J(Y(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[mK(e),t]),FY=e=>J(J(J(q(`,`,e),([e,t])=>J(q(`
84
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J(q(`;`,e),([e,t])=>J(q(`
85
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J(q(`,`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J(J(q(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J(J(q(`
86
+ `,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))))),([e,t])=>[hK(e),t]),IY=(e,t=[])=>J(J(PY(e),([e,t])=>J(FY(t),([t,n])=>[[e,t],n])),([e,n])=>IY(n,[...t,e]),()=>[t,e]),LY=e=>J(J(IY(e),([e,t])=>J(J(J(PY(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[gK(e),t]),RY=e=>J(J(q(`{`,e),([e,t])=>J(LY(t),([t,n])=>J(q(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[vK(e),t]),zY=e=>J(RY(e),([e,t])=>[yK(e),t]),BY=e=>J(J(J(sJ(e),([e,t])=>J(q(`?`,t),([t,n])=>J(q(`:`,n),([n,r])=>J(q(`readonly`,r),([r,i])=>J(Y(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[e,t],()=>J(J(sJ(e),([e,t])=>J(q(`:`,t),([t,n])=>J(q(`readonly`,n),([n,r])=>J(Y(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>J(J(sJ(e),([e,t])=>J(q(`?`,t),([t,n])=>J(q(`:`,n),([n,r])=>J(Y(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>J(J(sJ(e),([e,t])=>J(q(`:`,t),([t,n])=>J(Y(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>[])))),([e,t])=>[bK(e),t]),VY=e=>J(J(q(`readonly`,e),([e,t])=>J(Y(t),([t,n])=>J(q(`?`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[xK(e),t]),HY=e=>J(J(q(`readonly`,e),([e,t])=>J(Y(t),([t,n])=>[[e,t],n])),([e,t])=>[SK(e),t]),UY=e=>J(J(Y(e),([e,t])=>J(q(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[CK(e),t]),WY=e=>J(J(BY(e),([e,t])=>[e,t],()=>J(VY(e),([e,t])=>[e,t],()=>J(HY(e),([e,t])=>[e,t],()=>J(UY(e),([e,t])=>[e,t],()=>J(Y(e),([e,t])=>[e,t],()=>[]))))),([e,t])=>[wK(e),t]),GY=e=>J(J(J(q(`...`,e),([e,t])=>J(WY(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J(WY(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[TK(e),t]),KY=(e,t=[])=>J(J(GY(e),([e,t])=>J(q(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>KY(n,[...t,e]),()=>[t,e]),qY=e=>J(J(KY(e),([e,t])=>J(J(J(GY(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[EK(e),t]),JY=e=>J(J(q(`[`,e),([e,t])=>J(qY(t),([t,n])=>J(q(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[DK(e),t]),YY=e=>J(J(sJ(e),([e,t])=>J(q(`?`,t),([t,n])=>J(q(`:`,n),([n,r])=>J(q(`readonly`,r),([r,i])=>J(Y(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[OK(e),t]),XY=e=>J(J(sJ(e),([e,t])=>J(q(`:`,t),([t,n])=>J(q(`readonly`,n),([n,r])=>J(Y(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[kK(e),t]),ZY=e=>J(J(sJ(e),([e,t])=>J(q(`?`,t),([t,n])=>J(q(`:`,n),([n,r])=>J(Y(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[AK(e),t]),QY=e=>J(J(sJ(e),([e,t])=>J(q(`:`,t),([t,n])=>J(Y(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[jK(e),t]),$Y=e=>J(J(YY(e),([e,t])=>[e,t],()=>J(XY(e),([e,t])=>[e,t],()=>J(ZY(e),([e,t])=>[e,t],()=>J(QY(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[MK(e),t]),eX=e=>J(J(J(q(`...`,e),([e,t])=>J($Y(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J($Y(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[NK(e),t]),tX=(e,t=[])=>J(J(eX(e),([e,t])=>J(q(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>tX(n,[...t,e]),()=>[t,e]),nX=e=>J(J(tX(e),([e,t])=>J(J(J(eX(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[PK(e),t]),rX=e=>J(J(q(`(`,e),([e,t])=>J(nX(t),([t,n])=>J(q(`)`,n),([n,r])=>J(q(`=>`,r),([r,i])=>J(Y(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[FK(e),t]),iX=e=>J(J(q(`new`,e),([e,t])=>J(q(`(`,t),([t,n])=>J(nX(n),([n,r])=>J(q(`)`,r),([r,i])=>J(q(`=>`,i),([i,a])=>J(Y(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[IK(e),t]),aX=e=>J(J(J(q(`+`,e),([e,t])=>J(q(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J(q(`-`,e),([e,t])=>J(q(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J(q(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[RK(e),t]),oX=e=>J(J(J(q(`+`,e),([e,t])=>J(q(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J(q(`-`,e),([e,t])=>J(q(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J(q(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[BK(e),t]),sX=e=>J(J(J(q(`as`,e),([e,t])=>J(Y(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[VK(e),t]),cX=e=>J(J(q(`{`,e),([e,t])=>J(aX(t),([t,n])=>J(q(`[`,n),([n,r])=>J(sJ(r),([r,i])=>J(q(`in`,i),([i,a])=>J(Y(a),([a,o])=>J(sX(o),([o,s])=>J(q(`]`,s),([s,c])=>J(oX(c),([c,l])=>J(q(`:`,l),([l,u])=>J(Y(u),([u,d])=>J(VJ(d),([d,f])=>J(q(`}`,f),([f,p])=>[[e,t,n,r,i,a,o,s,c,l,u,d,f],p]))))))))))))),([e,t])=>[HK(e),t]),lX=e=>J(sJ(e),([e,t])=>[UK(e),t]),uX=e=>J(eJ(e),([e,t])=>[WK(e),t]),dX=e=>J(_J(e),([e,t])=>[GK(e),t]),fX=e=>J(J(q(`true`,e),([e,t])=>[e,t],()=>J(q(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[KK(e),t]),pX=e=>J(DJ([`"`,`'`],e),([e,t])=>[qK(e),t]),mX=e=>J(q(`null`,e),([e,t])=>[JK(e),t]),hX=e=>J(q(`undefined`,e),([e,t])=>[void 0,t]),gX=e=>J(J(jY(e),([e,t])=>J(q(`:`,t),([t,n])=>J(CX(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[YK(e),t]),_X=(e,t=[])=>J(J(gX(e),([e,t])=>J(FY(t),([t,n])=>[[e,t],n])),([e,n])=>_X(n,[...t,e]),()=>[t,e]),vX=e=>J(J(_X(e),([e,t])=>J(J(J(gX(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[XK(e),t]),yX=e=>J(J(q(`{`,e),([e,t])=>J(vX(t),([t,n])=>J(q(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[QK(e),t]),bX=(e,t=[])=>J(J(CX(e),([e,t])=>J(q(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>bX(n,[...t,e]),()=>[t,e]),xX=e=>J(J(bX(e),([e,t])=>J(J(J(CX(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[$K(e),t]),SX=e=>J(J(q(`[`,e),([e,t])=>J(xX(t),([t,n])=>J(q(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[eq(e),t]),CX=e=>J(J(uX(e),([e,t])=>[e,t],()=>J(dX(e),([e,t])=>[e,t],()=>J(fX(e),([e,t])=>[e,t],()=>J(pX(e),([e,t])=>[e,t],()=>J(mX(e),([e,t])=>[e,t],()=>J(hX(e),([e,t])=>[e,t],()=>J(yX(e),([e,t])=>[e,t],()=>J(SX(e),([e,t])=>[e,t],()=>[])))))))),([e,t])=>[tq(e),t]),wX=e=>J(q(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[nq(e),t]),TX=e=>J(q(`.*`,e),([e,t])=>[rq(e),t]),EX=e=>J(q(`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,e),([e,t])=>[iq(e),t]),DX=e=>J(q(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[aq(e),t]),OX=e=>J(q(`(?!)`,e),([e,t])=>[oq(e),t]),kX=e=>J(OJ([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[sq(e),t]),AX=e=>J(J(wX(e),([e,t])=>[e,t],()=>J(TX(e),([e,t])=>[e,t],()=>J(EX(e),([e,t])=>[e,t],()=>J(DX(e),([e,t])=>[e,t],()=>J(OX(e),([e,t])=>[e,t],()=>J(jX(e),([e,t])=>[e,t],()=>J(kX(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[cq(e),t]),jX=e=>J(J(q(`(`,e),([e,t])=>J(PX(t),([t,n])=>J(q(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[lq(e),t]),MX=e=>J(J(J(NX(e),([e,t])=>J(q(`|`,t),([t,n])=>J(MX(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>J(J(NX(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[uq(e),t]),NX=e=>J(J(AX(e),([e,t])=>J(PX(t),([t,n])=>[[e,t],n])),([e,t])=>[dq(e),t]),PX=e=>J(J(MX(e),([e,t])=>[e,t],()=>J(NX(e),([e,t])=>[e,t],()=>[])),([e,t])=>[fq(e),t]),FX=e=>J(J(q(`^`,e),([e,t])=>J(PX(t),([t,n])=>J(q(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[pq(e),t]),IX=(e,t=[])=>J(J(Y(e),([e,t])=>J(q(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>IX(n,[...t,e]),()=>[t,e]),LX=e=>J(J(IX(e),([e,t])=>J(J(J(Y(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[mq(e),t]),RX=e=>J(J(J(q(`extends`,e),([e,t])=>J(LX(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[hq(e),t]),zX=e=>J(J(q(`interface`,e),([e,t])=>J(sJ(t),([t,n])=>J(IJ(n),([n,r])=>J(RX(r),([r,i])=>J(RY(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[gq(e),t]),BX=e=>J(J(q(`interface`,e),([e,t])=>J(sJ(t),([t,n])=>J(RX(n),([n,r])=>J(RY(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[_q(e),t]),VX=e=>J(J(q(`type`,e),([e,t])=>J(sJ(t),([t,n])=>J(IJ(n),([n,r])=>J(q(`=`,r),([r,i])=>J(Y(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[vq(e),t]),HX=e=>J(J(q(`type`,e),([e,t])=>J(sJ(t),([t,n])=>J(q(`=`,n),([n,r])=>J(Y(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[yq(e),t]),UX=e=>J(J(J(q(`export`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[bq(e),t]),WX=e=>J(J(J(q(`;`,e),([e,t])=>J(q(`
87
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>J(J(q(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J(J(q(`
88
+ `,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[xq(e),t]),GX=(e,t=[])=>J(J(qX(e),([e,t])=>J(WX(t),([t,n])=>[[e,t],n])),([e,n])=>GX(n,[...t,e]),()=>[t,e]),KX=e=>J(J(GX(e),([e,t])=>J(J(J(qX(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>J([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Sq(e),t]),qX=e=>J(J(UX(e),([e,t])=>J(J(zX(t),([e,t])=>[e,t],()=>J(BX(t),([e,t])=>[e,t],()=>J(VX(t),([e,t])=>[e,t],()=>J(HX(t),([e,t])=>[e,t],()=>[])))),([t,n])=>J(VJ(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Cq(e),t]),JX=e=>J(J(qX(e),([e,t])=>J(KX(t),([t,n])=>[[e,t],n])),([e,t])=>[wq(e),t]),YX=e=>J(J(JX(e),([e,t])=>[e,t],()=>J(TY(e),([e,t])=>[e,t],()=>J(Y(e),([e,t])=>[e,t],()=>[]))),([e,t])=>[Tq(e),t]);function XX(e){let t=aY(`\`${e}\``);return U(t.length,2)?t[0]:DL()}function ZX(e){return e.join(`|`)}function QX(e){return e.slice(1,e.length-1)}function $X(e,t,n){return uZ(t,`${n}${e}`)}function eZ(e,t){return uZ(e,`${t}${zH}`)}function tZ(e,t){return uZ(e,`${t}${KH}`)}function nZ(e,t){return uZ(e,`${t}${iU}`)}function rZ(e,t){return lZ(pU([ZH(`false`),ZH(`true`)]),e,t)}function iZ(e,t){return uZ(e,`${t}.*`)}function aZ(e,t,n){return uZ(t,`${n}${QX(e)}`)}function oZ(e,t,n){return lZ(pZ(e,{}),t,n)}function sZ(e,t,n){return lZ(hW(e),t,n)}function cZ(e,t,n,r=[]){return dI(e,(e,i)=>cZ(i,t,n,[...r,lZ(e,[],``)]),()=>uZ(t,`${n}(${ZX(r)})`))}function lZ(e,t,n){return yH(e)?sZ(e.enum,t,n):JH(e)?tZ(t,n):tU(e)?$X(e.const,t,n):VH(e)?eZ(t,n):UH(e)?rZ(t,n):oU(e)?nZ(t,n):fU(e)?iZ(t,n):bZ(e)?aZ(e.pattern,t,n):gZ(e)?oZ(e.parameters[0],t,n):mU(e)?cZ(e.anyOf,t,n):GV}function uZ(e,t){return dI(e,(e,n)=>lZ(e,n,t),()=>t)}function dZ(e){return`^${uZ(e,``)}$`}function fZ(e){return SU(dZ(e))}function pZ(e,t){return e3(e)?K(fZ(e),{},t):hZ(e,t)}function mZ(e,t,n,r){return pZ(r3(e,t,n),r)}function hZ(e,t={}){return SV(`TemplateLiteral`,[e],t)}function gZ(e){return xV(e)&&W(e,`action`)&&U(e.action,`TemplateLiteral`)}function _Z(e){return pZ(e,{})}function vZ(e){return _Z(XX(e))}function yZ(e,t={}){return K(QF(e)?vZ(e):_Z(e),{},t)}function bZ(e){return bV(e,`TemplateLiteral`)}var xZ=s({ExtendsFalse:()=>TZ,ExtendsTrue:()=>X,ExtendsUnion:()=>SZ,IsExtendsFalse:()=>EZ,IsExtendsTrue:()=>wZ,IsExtendsTrueLike:()=>DZ,IsExtendsUnion:()=>CZ,Match:()=>OZ});function SZ(e){return vV({"~kind":`ExtendsUnion`},{inferred:e})}function CZ(e){return ZF(e)&&W(e,`~kind`)&&W(e,`inferred`)&&U(e[`~kind`],`ExtendsUnion`)&&ZF(e.inferred)}function X(e){return vV({"~kind":`ExtendsTrue`},{inferred:e})}function wZ(e){return ZF(e)&&W(e,`~kind`)&&W(e,`inferred`)&&U(e[`~kind`],`ExtendsTrue`)&&ZF(e.inferred)}function TZ(){return vV({"~kind":`ExtendsFalse`},{})}function EZ(e){return ZF(e)&&W(e,`~kind`)&&U(e[`~kind`],`ExtendsFalse`)}function DZ(e){return CZ(e)||wZ(e)}function OZ(e,t,n){return DZ(e)?t(e.inferred):n()}function kZ(e,t,n,r){return OZ(qQ(e,n,r),r=>X(rV(rV(e,r),{[t]:n})),()=>TZ())}function AZ(e,t){return X(e)}function jZ(e,t,n,r,i){return OZ(qQ(e,t,n),e=>OZ(qQ(e,t,r),e=>X(e),()=>TZ()),()=>OZ(qQ(e,t,i),e=>X(e),()=>TZ()))}function MZ(e,t,n){return qQ(e,t,hW(n))}function NZ(e,t,n){return dI(n,(n,r)=>OZ(qQ(e,t,n),e=>NZ(e,t,r),()=>TZ()),()=>X(e))}function PZ(e,t,n){return qQ(e,t,_W(n))}function FZ(e,t,n){return dI(n,(n,r)=>OZ(qQ(e,t,n),e=>X(e),()=>FZ(e,t,r)),()=>TZ())}function IZ(e,t,n){return WV(n)?AZ(e,t):pH(n)?jZ(e,t,n.if,n.then,n.else):yH(n)?MZ(e,t,n.enum):dH(n)?kZ(e,n.name,t,n.extends):xH(n)?NZ(e,t,n.allOf):bZ(n)?PZ(e,t,n.pattern):mU(n)?FZ(e,t,n.anyOf):aH(n)?X(e):TZ()}function LZ(e,t,n){return dH(n)?IZ(e,t,n):WV(n)||aH(n)?X(e):SZ(e)}function RZ(e,t){let n=AH(e),r=AH(t);return n&&r||!n&&r?!0:!(n&&!r)}function zZ(e,t,n,r){return jV(r)?RZ(t,r)?qQ(e,n,r.items):TZ():IZ(e,t,r)}function BZ(e,t,n){return VH(n)?X(e):IZ(e,t,n)}function VZ(e,t,n){return UH(n)?X(e):IZ(e,t,n)}function HZ(e,t,n,r,i){let a=dH(r)?t:r,o=dH(r)?r:t,s=ZV(t),c=ZV(r);return!s&&c?TZ():OZ(qQ(e,a,o),e=>GZ(e,n,i),()=>TZ())}function UZ(e,t,n,r){return dI(r,(r,i)=>HZ(e,t,n,r,i),()=>ZV(t)?X(e):TZ())}function WZ(e,t,n){return dI(t,(t,r)=>UZ(e,t,r,n),()=>X(e))}function GZ(e,t,n){return WZ(e,t,n)}function KZ(e,t,n){return nG(n)?X(e):qQ(e,t,n)}function qZ(e,t,n,r){return WV(r)||aH(r)?X(e):PV(r)?OZ(GZ(e,t,r.parameters),e=>KZ(e,n,r.instanceType),()=>TZ()):TZ()}function JZ(e,t,n,r,i){return OZ(qQ(e,t,i),()=>qQ(e,n,i),()=>qQ(e,r,i))}function YZ(e,t,n){return qQ(e,hW(t),n)}function XZ(e,t,n,r){return WV(r)||aH(r)?X(e):LV(r)?OZ(GZ(e,t,r.parameters),e=>KZ(e,n,r.returnType),()=>TZ()):TZ()}function ZZ(e,t,n){return JH(n)||oU(n)?X(e):IZ(e,t,n)}function QZ(e,t,n){return qQ(e,gW(t),n)}function $Z(e,t,n){return t===n?X(e):TZ()}function eQ(e,t,n){return tU(n)?$Z(e,t,n.const):VH(n)?X(e):IZ(e,ZH(t),n)}function tQ(e,t,n){return tU(n)?$Z(e,t,n.const):UH(n)?X(e):IZ(e,ZH(t),n)}function nQ(e,t,n){return tU(n)?$Z(e,t,n.const):oU(n)?X(e):IZ(e,ZH(t),n)}function rQ(e,t,n){return tU(n)?$Z(e,t,n.const):fU(n)?X(e):IZ(e,ZH(t),n)}function iQ(e,t,n){return UF(t.const)?eQ(e,t.const,n):WF(t.const)?tQ(e,t.const,n):YF(t.const)?nQ(e,t.const,n):QF(t.const)?rQ(e,t.const,n):DL()}function aQ(e,t,n){return dH(n)?IZ(e,t,n):X(e)}function oQ(e,t,n){return rU(n)?X(e):IZ(e,t,n)}function sQ(e,t,n){return oU(n)?X(e):IZ(e,t,n)}function cQ(e,t,n){return ZV(t)?ZV(n)?X(e):TZ():X(e)}function lQ(e,t,n){return dH(n)&&qV(n.extends)?TZ():OZ(qQ(e,t,n),e=>cQ(e,t,n),()=>TZ())}function uQ(e,t){return e.reduce((e,n)=>n in t&&DZ(t[n])?{...e,...t[n].inferred}:DL(),{})}function dQ(e,t,n){let r={};for(let i of G(n))r[i]=i in t?lQ({},t[i],n[i]):ZV(n[i])?dH(n[i])?X(rV(e,{[n[i].name]:n[i].extends})):X(e):TZ();let i=hI(r).every(e=>DZ(e)),a=i?uQ(G(r),r):{};return i?X(a):TZ()}function fQ(e,t,n){let r=dQ(e,t,n);return DZ(r)?X(rV(e,r.inferred)):TZ()}function pQ(e,t,n){return fQ(e,t,n)}function mQ(e,t){return G(t).reduce((n,r)=>({...n,[r]:W(e,r)?mU(n[r])?pU([...n[r].anyOf,t[r]]):pU([e[r],t[r]]):t[r]}),e)}function hQ(e,t,n,r){return dI(t,(t,i)=>OZ(qQ({},e[t],n),t=>hQ(e,i,n,mQ(r,t)),()=>TZ()),()=>X(r))}function gQ(e,t,n,r){return hQ(t,G(t),r,e)}function _Q(e,t,n){return JW(n)?gQ(e,t,GW(n),qW(n)):nH(n)?pQ(e,t,n.properties):IZ(e,tH(t),n)}function vQ(e,t){return U(G(t).length,0)?X(e):TZ()}function yQ(e,t,n,r,i){return qQ(e,n,i)}function bQ(e,t,n,r){return JW(r)?yQ(e,WW(t),n,WW(GW(r)),qW(r)):nH(r)?vQ(e,r.properties):WV(r)||aH(r)?X(e):TZ()}function xQ(e,t,n){return fU(n)?X(e):IZ(e,t,n)}function SQ(e,t,n){return cU(n)?X(e):IZ(e,t,n)}function CQ(e,t,n){return qQ(e,_W(t),n)}function wQ(e,t){return vV({"~kind":`Inferrable`},{name:e,type:t},{})}function TQ(e){return ZF(e)&&W(e,`~kind`)&&W(e,`name`)&&W(e,`type`)&&U(e[`~kind`],`Inferrable`)&&QF(e.name)&&ZF(e.type)}function EQ(e){return XW(e)?dH(e.items)?jV(e.items.extends)?wQ(e.items.name,e.items.extends.items):aH(e.items.extends)?wQ(e.items.name,e.items.extends):void 0:DL():void 0}function DQ(e){return dH(e)?wQ(e.name,e.extends):void 0}function OQ(e,t,n=[]){return dI(e,(e,r)=>OZ(qQ({},e,t),()=>OQ(r,t,[...n,e]),()=>void 0),()=>n)}function kQ(e,t,n,r){let i=OQ(n,r);return HF(i)?X(rV(e,{[t]:IU(i)})):TZ()}function AQ(e,t,n,r){let i=OQ(n,r);return HF(i)?X(rV(e,{[t]:pU(i)})):TZ()}function jQ(e){return[...e].reverse()}function MQ(e,t){return t?jQ(e):e}function NQ(e){let t=e.length>0?e[0]:void 0;return xV(xV(t)?EQ(t):void 0)}function PQ(e,t,n,r,i,a){return OZ(qQ(e,n,i),e=>LQ(e,t,r,a),()=>TZ())}function FQ(e,t,n,r,i){let a=EQ(r);return TQ(a)?kQ(e,a.name,MQ(n,t),a.type):dI(n,(n,a)=>PQ(e,t,n,a,r,i),()=>TZ())}function IQ(e,t,n,r){return dI(r,(r,i)=>FQ(e,t,n,r,i),()=>U(n.length,0)?X(e):TZ())}function LQ(e,t,n,r){return IQ(e,t,n,r)}function RQ(e,t,n){let r=n3(e,$4([],[]),n),i=NQ(r);return LQ(e,i,MQ(t,i),MQ(r,i))}function zQ(e,t,n){let r=DQ(n);return TQ(r)?AQ(e,r.name,t,r.type):dI(t,(t,r)=>OZ(qQ(e,t,n),e=>zQ(e,r,n),()=>TZ()),()=>X(e))}function BQ(e,t,n){let r=n3(e,$4([],[]),t);return LU(n)?RQ(e,r,n.items):jV(n)?zQ(e,r,n.items):IZ(e,IU(r),n)}function VQ(e,t,n){return nG(n)||eG(n)?X(e):IZ(e,t,n)}function HQ(e,t,n){return dI(n,(n,r)=>OZ(qQ(e,t,n),e=>X(e),()=>HQ(e,t,r)),()=>TZ())}function UQ(e,t,n){return dI(t,(t,r)=>OZ(HQ(e,t,n),e=>UQ(e,r,n),()=>TZ()),()=>X(e))}function WQ(e,t,n){let r=DQ(n);return TQ(r)?AQ(e,r.name,t,r.type):mU(n)?UQ(e,t,n.anyOf):UQ(e,t,[n])}function GQ(e,t,n){return dH(n)?IZ(e,t,n):WV(n)||aH(n)?X(e):TZ()}function KQ(e,t,n){return nG(n)?X(e):IZ(e,t,n)}function qQ(e,t,n){return WV(t)?LZ(e,t,n):jV(t)?zZ(e,t,t.items,n):VH(t)?BZ(e,t,n):UH(t)?VZ(e,t,n):PV(t)?qZ(e,t.parameters,t.instanceType,n):pH(t)?JZ(e,t.if,t.then,t.else,n):yH(t)?YZ(e,t.enum,n):LV(t)?XZ(e,t.parameters,t.returnType,n):JH(t)?ZZ(e,t,n):xH(t)?QZ(e,t.allOf,n):tU(t)?iQ(e,t,n):qV(t)?aQ(e,t,n):rU(t)?oQ(e,t,n):oU(t)?sQ(e,t,n):nH(t)?_Q(e,t.properties,n):JW(t)?bQ(e,GW(t),qW(t),n):fU(t)?xQ(e,t,n):cU(t)?SQ(e,t,n):bZ(t)?CQ(e,t.pattern,n):LU(t)?BQ(e,t.items,n):eG(t)?VQ(e,t,n):mU(t)?WQ(e,t.anyOf,n):aH(t)?GQ(e,t,n):nG(t)?KQ(e,t,n):TZ()}function JQ(e,t){return gW([...e,tH(t)])}function YQ(e,t,n){return e3(e)?K(JQ(e,t),{},n):ZQ(e,t,n)}function XQ(e,t,n,r,i){return YQ(r3(e,t,n),t3(e,t,r),i)}function ZQ(e,t,n={}){return SV(`Interface`,[e,t],n)}function QQ(e){return xV(e)&&W(e,`action`)&&U(e.action,`Interface`)}function $Q(e,t,n={}){return YQ(e,t,n)}function e$(e,t,n){return e.includes(n)?!0:r$([...e,n],t,t[n])}function t$(e,t,n){return n$(e,t,eH(n))}function n$(e,t,n){return dI(n,(n,r)=>r$(e,t,n)?!0:n$(e,t,r),()=>!1)}function r$(e,t,n){return BV(n)?e$(e,t,n.$ref):jV(n)?r$(e,t,n.items):PV(n)?n$(e,t,[...n.parameters,n.instanceType]):LV(n)?n$(e,t,[...n.parameters,n.returnType]):QQ(n)?t$(e,t,n.parameters[1]):xH(n)?n$(e,t,n.allOf):nH(n)?t$(e,t,n.properties):mU(n)?n$(e,t,n.anyOf):LU(n)?n$(e,t,n.items):JW(n)?r$(e,t,qW(n)):!1}function i$(e,t,n){return r$(e,t,n)}function a$(e,t){return t.reduce((t,n)=>i$([n],e,e[n])?[...t,n]:t,[])}function o$(e){return a$(e,$V(e))}function s$(e,t,n){return n.includes(t)?n:t in e?u$(e,e[t],[...n,t]):DL()}function c$(e,t,n){return l$(e,eH(t),n)}function l$(e,t,n){return t.reduce((t,n)=>u$(e,n,t),n)}function u$(e,t,n){return BV(t)?s$(e,t.$ref,n):jV(t)?u$(e,t.items,n):PV(t)?l$(e,[...t.parameters,t.instanceType],n):LV(t)?l$(e,[...t.parameters,t.returnType],n):QQ(t)?c$(e,t.parameters[1],n):xH(t)?l$(e,t.allOf,n):nH(t)?c$(e,t.properties,n):mU(t)?l$(e,t.anyOf,n):LU(t)?l$(e,t.items,n):JW(t)?u$(e,qW(t),n):n}function d$(e,t,n){return u$(e,n,[t])}function f$(e){return UV()}function p$(e){return G(e).reduce((t,n)=>({...t,[n]:h$(e[n])}),{})}function m$(e){return e.reduce((e,t)=>[...e,h$(t)],[])}function h$(e){return BV(e)?f$(e.$ref):jV(e)?AV(h$(e.items),MV(e)):PV(e)?NV(m$(e.parameters),h$(e.instanceType)):LV(e)?IV(m$(e.parameters),h$(e.returnType)):xH(e)?bH(m$(e.allOf)):nH(e)?tH(p$(e.properties)):JW(e)?HW(KW(e),h$(qW(e))):mU(e)?pU(m$(e.anyOf)):LU(e)?IU(m$(e.items)):e}function g$(e,t){return t in e?h$(e[t]):iH()}function _$(e){return g$(e.$defs,e.$ref)}function v$(e,t,n){let r=r3(e,$4([],[]),t),i=t3({},$4([],[]),n);return gW([...r,tH(i)])}function y$(e,t){return G(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=QQ(r)?v$(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function b$(e,t,n){return oH(y$(e,d$(e,t,n)),t)}function x$(e,t){return t in e?BV(e[t])?x$(e,e[t].$ref):e[t]:KV()}function S$(e,t){return x$(e,t)}function C$(e){return sH(e)?_$(e):lH(e)?iH():e}function w$(e,t,n){return qQ(e,C$(t),C$(n))}var T$=`equal`,E$=`disjoint`,D$=`left-inside`,O$=`right-inside`;function k$(e,t){let n=[aH(e)?TZ():w$({},e,t),aH(e)?X({}):w$({},t,e)];return DZ(n[0])&&DZ(n[1])?T$:DZ(n[0])&&EZ(n[1])?D$:EZ(n[0])&&DZ(n[1])?O$:E$}function A$(e,t){return t.filter(t=>k$(e,t)!==`right-inside`)}function j$(e,t){return U(t.some(t=>{let n=k$(e,t);return U(n,`left-inside`)||U(n,`equal`)}),!1)}function M$(e,t){let n=yW(e);return WV(n)?[n]:j$(n,t)?[...A$(n,t),n]:t}function N$(e){return e.reduce((e,t)=>nH(t)?[...e,t]:qV(t)?e:M$(t,e),[])}function P$(e){return kW(N$(e))}function F$(e,t){return K(yW(e),{},t)}function I$(e,t,n,r){return F$(Z(e,t,n),r)}function L$(e,t=[]){return CV(e)&&U(e.action,`Conditional`)?BV(e.parameters[0])?L$(e.parameters[2],L$(e.parameters[3],[...t,e.parameters[0].$ref])):L$(e.parameters[2],L$(e.parameters[3],t)):CV(e)&&U(e.action,`Mapped`)&&CV(e.parameters[1])&&U(e.parameters[1].action,`KeyOf`)&&BV(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function R$(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function z$(e,t,n=[]){return dI(e,(e,r)=>dI(t,(t,i)=>z$(r,i,[...n,[t,e]]),()=>n),()=>n)}function B$(e){return mU(e)?[...e.anyOf]:[e]}function V$(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function H$(e,t){return t.reduce((t,n)=>[...t,...V$(e,n)],[])}function U$(e){return e.reduce((e,t)=>U(t[0],!0)?H$(e,B$(t[1])):H$(e,[t[1]]),[[]])}function W$(e,t,n){let r=z$(t,R$(e,L$(n)));return CV(n)&&U(n.action,`Conditional`)||CV(n)&&U(n.action,`Mapped`)?U$(r):[t]}function G$(){return[`(not-resolvable)`,KV()]}function K$(){return[`(not-generic)`,KV()]}function q$(e,t,n){return[e,VV(t,n)]}function J$(e,t,n){return t in e?Y$(e,t,e[t],n):G$()}function Y$(e,t,n,r){return HV(n)?q$(t,n.parameters,n.expression):BV(n)?J$(e,n.$ref,r):K$()}function X$(e,t,n){return Y$(e,`(anonymous)`,t,n)}function Z$(e,t,n){if(dH(t)||u1(t)||DZ(w$({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function Q$(e,t,n,r,i){let a=Z(e,t,i);return Z$(n,a,r),rV(e,{[n]:a})}function $$(e,t,n,r,i){let a=Z(e,t,n.extends),o=Z(e,t,n.equals);return dI(i,(i,o)=>e1(Q$(e,t,n.name,a,i),t,r,o),()=>e1(Q$(e,t,n.name,a,o),t,r,[]))}function e1(e,t,n,r){return dI(n,(n,i)=>$$(e,t,n,i,r),()=>e)}function t1(e,t,n,r){return e1(e,t,n,r)}function n1(e){return tI(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function r1(e,t){return U(n1(e),t)}function i1(e,t,n,r,i,a){let o=t1(e,t,r,a),s=Z(o,$4([...t.callstack,n.$ref],t.visited),i);return Z(o,$4([],[]),s)}function a1(e,t,n,r,i,a){return a.reduce((a,o)=>[...a,i1(e,t,n,r,i,o)],[])}function o1(e,t,n,r,i,a){let o=a1(e,t,n,r,i,W$(r,a,i));return U(o.length,1)?o[0]:vW(o)}function s1(e,t,n,r){let i=r3(e,t,r),a=X$(e,n,r),o=a[0],s=a[1];return HV(s)?r1(t,o)?c1(zV(o),i):o1(e,t,zV(o),s.parameters,s.expression,i):c1(n,i)}function c1(e,t){return vV({"~kind":`Call`},{type:`call`,target:e,arguments:t},{})}function l1(e,t){return s1({},$4([],[]),e,t)}function u1(e){return bV(e,`Call`)}function d1(e){return yV(e,[`~immutable`])}function f1(e,t){return K(d1(e),{},t)}function p1(e,t,n,r){return f1(Z(e,t,n),r)}function m1(e,t){return e(t)}function h1(e,t){return QF(t)?ZH(m1(e,t)):ZH(t)}function g1(e,t){return v1(e,_W(t))}function _1(e,t){return pU(t.map(t=>v1(e,t)))}function v1(e,t){return tU(t)?h1(e,t.const):bZ(t)?g1(e,t.pattern):mU(t)?_1(e,t.anyOf):t}function y1(e,t={}){return SV(`Capitalize`,[e],t)}function b1(e,t={}){return j1(e,t)}function x1(e,t={}){return SV(`Lowercase`,[e],t)}function S1(e,t={}){return M1(e,t)}function C1(e,t={}){return SV(`Uncapitalize`,[e],t)}function w1(e,t={}){return N1(e,t)}function T1(e,t={}){return SV(`Uppercase`,[e],t)}function E1(e,t={}){return P1(e,t)}var D1=e=>e[0].toUpperCase()+e.slice(1),O1=e=>e.toLowerCase(),k1=e=>e[0].toLowerCase()+e.slice(1),A1=e=>e.toUpperCase();function j1(e,t){return e3([e])?K(v1(D1,e),{},t):y1(e,t)}function M1(e,t){return e3([e])?K(v1(O1,e),{},t):x1(e,t)}function N1(e,t){return e3([e])?K(v1(k1,e),{},t):C1(e,t)}function P1(e,t){return e3([e])?K(v1(A1,e),{},t):T1(e,t)}function F1(e,t,n,r){return j1(Z(e,t,n),r)}function I1(e,t,n,r){return M1(Z(e,t,n),r)}function L1(e,t,n,r){return N1(Z(e,t,n),r)}function R1(e,t,n,r){return P1(Z(e,t,n),r)}function z1(e,t,n,r,i={}){return SV(`Conditional`,[e,t,n,r],i)}function B1(e,t,n,r,i={}){return H1({},$4([],[]),e,t,n,r,i)}function V1(e,t,n,r,i,a){let o=w$(e,n,r);return CZ(o)?pU([Z(o.inferred,t,i),Z(e,t,a)]):wZ(o)?Z(o.inferred,t,i):Z(e,t,a)}function H1(e,t,n,r,i,a,o){return e3([n,r])?K(V1(e,t,n,r,i,a),{},o):z1(n,r,i,a,o)}function U1(e,t,n,r,i,a,o){return H1(e,t,Z(e,t,n),Z(e,t,r),i,a,o)}function W1(e,t={}){return SV(`ConstructorParameters`,[e],t)}function G1(e,t={}){return q1(e,t)}function K1(e){let t=PV(e)?e.parameters:[];return IU(n3({},$4([],[]),t))}function q1(e,t){return e3([e])?K(K1(e),{},t):W1(e,t)}function J1(e,t,n,r){return q1(Z(e,t,n),r)}function Y1(e,t,n={}){return SV(`Exclude`,[e,t],n)}function X1(e,t,n={}){return Z1(e,t,n)}function Z1(e,t,n){return e3([e,t])?K(pW(e,t),{},n):Y1(e,t,n)}function Q1(e,t,n,r,i){return Z1(Z(e,t,n),Z(e,t,r),i)}function $1(e,t,n={}){return SV(`Extract`,[e,t],n)}function e0(e,t,n={}){return i0(e,t,n)}function t0(e,t){return DZ(w$({},e,t))?[e]:[]}function n0(e,t){return e.reduce((e,n)=>[...e,...t0(n,t)],[])}function r0(e,t){let n=yW(e);return vW(n0(mU(n)?n.anyOf:[n],t))}function i0(e,t,n){return e3([e,t])?K(r0(e,t),{},n):$1(e,t,n)}function a0(e,t,n,r,i){return i0(Z(e,t,n),Z(e,t,r),i)}function o0(e){return e.reduce((e,t)=>QH(t)?[...e,ZH(t)]:e,[])}function s0(e){return pU(o0(e))}function c0(e,t,n={}){return SV(`Index`,[e,t],n)}function l0(e,t,n={}){return t2(e,HF(t)?s0(t):t,n)}function u0(e,t){return y0(S$(e,t))}function d0(e,t,n){return y0(mW(e,t,n))}function f0(e,t){let n=G(e).filter(e=>!W(t,e)),r=G(t).filter(t=>!W(e,t)),i=G(e).filter(e=>W(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:gW([e[r],t[r]])}),{});return rV(rV(a,o),s)}function p0(e){return e.reduce((e,t)=>f0(e,y0(t)),{})}function m0(e){return e}function h0(e){return y0(XU(IU(e)))}function g0(e,t){return G(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:vW([e[r],t[r]])}),{})}function _0(e,t){return dI(e,(e,n)=>_0(n,g0(t,y0(e))),()=>t)}function v0(e){return dI(e,(e,t)=>_0(t,y0(e)),()=>DL())}function y0(e){return sH(e)?u0(e.$defs,e.$ref):pH(e)?d0(e.if,e.then,e.else):xH(e)?p0(e.allOf):mU(e)?v0(e.anyOf):LU(e)?h0(e.items):nH(e)?m0(e.properties):{}}function b0(e){return tH(y0(e))}var x0=RegExp(`^(?:0|[1-9][0-9]*)$`);function S0(e){let t=`${e}`;return x0.test(t)?parseInt(t):e}function C0(e){return ZH(S0(e))}function w0(e){return e.map(e=>T0(e))}function T0(e){return xH(e)?bH(w0(e.allOf)):mU(e)?pU(w0(e.anyOf)):tU(e)?C0(e.const):e}function E0(e,t){return DZ(w$({},T0(t),aU()))?e:tU(t)&&U(t.const,`length`)?aU():KV()}function D0(e,t){return P0(S$(e,t))}function O0(e,t,n){return P0(mW(e,t,n))}function k0(e){return P0(hW(e))}function A0(e){return P0(gW(e))}function j0(e){return[`${e}`]}function M0(e){return P0(_W(e))}function N0(e){return e.reduce((e,t)=>[...e,...P0(t)],[])}function P0(e){return sH(e)?D0(e.$defs,e.$ref):pH(e)?O0(e.if,e.then,e.else):yH(e)?k0(e.enum):xH(e)?A0(e.allOf):tU(e)?j0(e.const):bZ(e)?M0(e.pattern):mU(e)?N0(e.anyOf):[]}function F0(e){return P0(e)}function I0(e,t){return t.map(t=>L0(e,t))}function L0(e,t){return jV(t)?AV(L0(e,t.items)):PV(t)?NV(I0(e,t.parameters),L0(e,t.instanceType)):LV(t)?IV(I0(e,t.parameters),L0(e,t.returnType)):LU(t)?IU(I0(e,t.items)):mU(t)?pU(I0(e,t.anyOf)):xH(t)?bH(I0(e,t.allOf)):QW(t)?tH(e):t}function R0(e,t){return L0(e,t)}function z0(e,t){return R0(e,t in e?e[t]:KV())}function B0(e,t){return t.reduce((t,n)=>[...t,z0(e,n)],[])}function V0(e,t){return vW(B0(e,F0(t)))}var H0=new RegExp(RW);function U0(e){return e.filter(e=>H0.test(e))}function W0(e){return vW(B0(e,U0($V(e))))}function G0(e,t){return oU(t)?W0(e):V0(e,t)}function K0(e){return ZH(S0(e))}function q0(e){return e.map(e=>J0(e))}function J0(e){return xH(e)?bH(q0(e.allOf)):mU(e)?pU(q0(e.anyOf)):tU(e)?K0(e.const):e}function Y0(e,t){return e.reduceRight((e,n,r)=>DZ(w$({},ZH(r),t))?[n,...e]:e,[])}function X0(e,t){return bW(Y0(e,J0(t)))}function Z0(e){return bW(e)}function Q0(e,t){return tU(t)&&U(t.const,`length`)?ZH(e.length):oU(t)||JH(t)?Z0(e):X0(e,t)}function $0(e,t){return jV(e)?E0(e.items,t):nH(e)?G0(e.properties,t):LU(e)?Q0(e.items,t):KV()}function e2(e){return sH(e)||pH(e)||xH(e)||mU(e)?b0(e):e}function t2(e,t,n){return e3([e,t])?K($0(e2(e),t),{},n):c0(e,t,n)}function n2(e,t,n,r,i){return t2(Z(e,t,n),Z(e,t,r),i)}function r2(e,t={}){return SV(`InstanceType`,[e],t)}function i2(e,t={}){return o2(e,t)}function a2(e){return PV(e)?e.instanceType:KV()}function o2(e,t){return e3([e])?K(a2(e),{},t):r2(e,t)}function s2(e,t,n,r={}){return o2(Z(e,t,n),r)}function c2(e,t={}){return SV(`KeyOf`,[e],t)}function l2(e,t={}){return v2(e,t)}function u2(){return pU([aU(),dU(),sU()])}function d2(e){return aU()}function f2(e){return e.reduce((e,t)=>QH(t)?[...e,ZH(S0(t))]:DL(),[])}function p2(e){return bW(f2(G(e)))}function m2(e){return KW(e)}function h2(e){return bW(e.map((e,t)=>ZH(t)))}function g2(e){return WV(e)?u2():jV(e)?d2(e.items):nH(e)?p2(e.properties):JW(e)?m2(e):LU(e)?h2(e.items):KV()}function _2(e){return sH(e)||pH(e)||xH(e)||mU(e)?b0(e):e}function v2(e,t){return e3([e])?K(g2(_2(e)),{},t):c2(e,t)}function y2(e,t,n,r){return v2(Z(e,t,n),r)}function b2(e,t,n,r,i={}){return SV(`Mapped`,[e,t,n,r],i)}function x2(e,t,n,r,i={}){return N2({},$4([],[]),e,t,n,r,i)}function S2(e){return E2(_W(e))}function C2(e){return e.reduce((e,t)=>[...e,...E2(t)],[])}function w2(e){return E2(hW(e))}function T2(e){return YF(e)?[ZH(`${e}`)]:[ZH(e)]}function E2(e){return yH(e)?w2(e.enum):tU(e)?T2(e.const):bZ(e)?S2(e.pattern):mU(e)?C2(e.anyOf):[e]}function D2(e){return E2(e)}function O2(e){return bZ(e)?_W(e.pattern):e}function k2(e,t,n,r,i,a){let o=rV(e,{[n.name]:r}),s=O2(Z(o,t,i)),c=Z(o,t,a);return $H(s)||eU(s)?{[s.const]:c}:{}}function A2(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,k2(e,t,n,o,i,a)],[])}function j2(e){return e.reduce((e,t)=>[...e,tH(t)],[])}function M2(e,t,n,r,i,a){return gW(j2(A2(e,t,n,D2(r),i,a)))}function N2(e,t,n,r,i,a,o){return e3([r])?K(M2(e,t,n,r,i,a),{},o):b2(n,r,i,a,o)}function P2(e,t,n,r,i,a,o){return N2(e,t,n,Z(e,t,r),i,a,o)}function F2(e,t,n){let r=rV(e,t);return G(t).filter(e=>n.includes(e)).reduce((e,n)=>({...e,[n]:b$(r,n,t[n])}),{})}function I2(e,t,n){let r=rV(e,t);return G(t).filter(e=>!n.includes(e)).reduce((e,n)=>({...e,[n]:Z(r,$4([],[]),t[n])}),{})}function L2(e,t,n){let r=o$(t),i=F2(e,t,r),a=I2(e,t,r);return K({...i,...a},{},n)}function R2(e,t,n,r){return L2(e,n,r)}function z2(e,t={}){return SV(`NonNullable`,[e],t)}function B2(e,t={}){return H2(e,t)}function V2(e){return Z1(e,pU([nU(),$W()]),{})}function H2(e,t){return e3([e])?K(V2(e),{},t):z2(e,t)}function U2(e,t,n,r){return H2(Z(e,t,n),r)}function W2(e,t,n={}){return SV(`Omit`,[e,t],n)}function G2(e,t,n={}){return Y2(e,HF(t)?s0(t):t,n)}function K2(e){let t=b0(e);return nH(t)?t.properties:DL()}function q2(e,t){return G(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function J2(e,t){return tH(q2(K2(e),F0(t)))}function Y2(e,t,n){return e3([e,t])?K(J2(e,t),{},n):W2(e,t,n)}function X2(e,t,n,r,i){return Y2(Z(e,t,n),Z(e,t,r),i)}function Z2(e,t={}){return SV(`Parameters`,[e],t)}function Q2(e,t={}){return e4(e,t)}function $2(e){let t=LV(e)?e.parameters:[];return IU(n3({},$4([],[]),t))}function e4(e,t){return e3([e])?K($2(e),{},t):Z2(e,t)}function t4(e,t,n,r){return e4(Z(e,t,n),r)}function n4(e,t={}){return SV(`Partial`,[e],t)}function r4(e,t={}){return u4(e,t)}function i4(e,t){let n=l4(S$(e,t));return oH(rV(e,{[t]:n}),t)}function a4(e,t,n){return l4(mW(e,t,n))}function o4(e){return l4(gW(e))}function s4(e){return pU(e.map(e=>l4(e)))}function c4(e){return tH(G(e).reduce((t,n)=>({...t,[n]:YV(e[n])}),{}))}function l4(e){return sH(e)?i4(e.$defs,e.$ref):pH(e)?a4(e.if,e.then,e.else):xH(e)?o4(e.allOf):mU(e)?s4(e.anyOf):nH(e)?c4(e.properties):tH({})}function u4(e,t){return e3([e])?K(l4(e),{},t):n4(e,t)}function d4(e,t,n,r){return u4(Z(e,t,n),r)}function f4(e,t,n={}){return SV(`Pick`,[e,t],n)}function p4(e,t,n={}){return g4(e,HF(t)?s0(t):t,n)}function m4(e,t){return G(e).reduce((n,r)=>t.includes(r)?rV(n,{[r]:e[r]}):n,{})}function h4(e,t){return tH(m4(K2(e),F0(t)))}function g4(e,t,n){return e3([e,t])?K(h4(e,t),{},n):f4(e,t,n)}function _4(e,t,n,r,i){return g4(Z(e,t,n),Z(e,t,r),i)}function v4(e,t={}){return SV(`ReadonlyObject`,[e],t)}function y4(e,t={}){return k4(e,t)}var b4=y4;function x4(e){return f3(AV(e))}function S4(e,t){let n=O4(S$(e,t));return oH(rV(e,{[t]:n}),t)}function C4(e,t,n){return O4(mW(e,t,n))}function w4(e){return O4(gW(e))}function T4(e){return tH(G(e).reduce((t,n)=>({...t,[n]:MH(e[n])}),{}))}function E4(e){return f3(IU(e))}function D4(e){return pU(e.map(e=>O4(e)))}function O4(e){return jV(e)?x4(e.items):sH(e)?S4(e.$defs,e.$ref):pH(e)?C4(e.if,e.then,e.else):xH(e)?w4(e.allOf):nH(e)?T4(e.properties):LU(e)?E4(e.items):mU(e)?D4(e.anyOf):e}function k4(e,t){return e3([e])?K(O4(e),{},t):v4(e)}function A4(e,t,n,r){return k4(Z(e,t,n),r)}function j4(e,t,n,r){return t.visited.includes(r)?n:r in e?Z(e,$4(t.callstack,[...t.visited,r]),e[r]):n}function M4(e,t){let n=L4(S$(e,t));return oH(rV(e,{[t]:n}),t)}function N4(e,t,n){return L4(mW(e,t,n))}function P4(e){return L4(gW(e))}function F4(e){return pU(e.map(e=>L4(e)))}function I4(e){return tH(G(e).reduce((t,n)=>({...t,[n]:JU(e[n])}),{}))}function L4(e){return sH(e)?M4(e.$defs,e.$ref):pH(e)?N4(e.if,e.then,e.else):xH(e)?P4(e.allOf):mU(e)?F4(e.anyOf):nH(e)?I4(e.properties):tH({})}function R4(e,t={}){return SV(`Required`,[e],t)}function z4(e,t={}){return B4(e,t)}function B4(e,t){return e3([e])?K(L4(e),{},t):R4(e,t)}function V4(e,t,n,r){return B4(Z(e,t,n),r)}function H4(e,t={}){return SV(`ReturnType`,[e],t)}function U4(e,t={}){return G4(e,t)}function W4(e){return LV(e)?e.returnType:KV()}function G4(e,t){return e3([e])?K(W4(e),{},t):H4(e,t)}function K4(e,t,n,r={}){return G4(Z(e,t,n),r)}function q4(e,t){return SV(`With`,[e,t],{})}function J4(e,t){return Y4(e,t)}function Y4(e,t){return e3([e])?K(e,{},t):q4(e,t)}function X4(e,t,n,r){return Y4(Z(e,t,n),r)}function Z4(e){return XW(e)?LU(e.items)?Q4(e.items.items):dH(e.items)||BV(e.items)?[e]:[KV()]:[e]}function Q4(e){return e.reduce((e,t)=>[...e,...Z4(t)],[])}function $4(e,t){return{callstack:e,visited:t}}function e3(e){return dI(e,(e,t)=>!BV(e)&&e3(t),()=>!0)}function t3(e,t,n){return G(n).reduce((r,i)=>({...r,[i]:Z(e,t,n[i])}),{})}function n3(e,t,n){return Q4(r3(e,t,n))}function r3(e,t,n){return n.map(n=>Z(e,t,n))}function i3(e,t){let n=ZV(e)?OV(t,{}):t,r=PH(e)?TV(n,{}):n;return AH(e)?l3(r,{}):r}function a3(e,t,n,r,i){return U(n,`AddImmutable`)?u3(e,t,r[0],i):U(n,`RemoveImmutable`)?p1(e,t,r[0],i):U(n,`AddReadonly`)?EV(e,t,r[0],i):U(n,`RemoveReadonly`)?VU(e,t,r[0],i):U(n,`AddOptional`)?kV(e,t,r[0],i):U(n,`RemoveOptional`)?KU(e,t,r[0],i):U(n,`Capitalize`)?F1(e,t,r[0],i):U(n,`Conditional`)?U1(e,t,r[0],r[1],r[2],r[3],i):U(n,`ConstructorParameters`)?J1(e,t,r[0],i):U(n,`Evaluate`)?I$(e,t,r[0],i):U(n,`Exclude`)?Q1(e,t,r[0],r[1],i):U(n,`Extract`)?a0(e,t,r[0],r[1],i):U(n,`Index`)?n2(e,t,r[0],r[1],i):U(n,`InstanceType`)?s2(e,t,r[0],i):U(n,`Interface`)?XQ(e,t,r[0],r[1],i):U(n,`KeyOf`)?y2(e,t,r[0],i):U(n,`Lowercase`)?I1(e,t,r[0],i):U(n,`Mapped`)?P2(e,t,r[0],r[1],r[2],r[3],i):U(n,`Module`)?R2(e,t,r[0],i):U(n,`NonNullable`)?U2(e,t,r[0],i):U(n,`Pick`)?_4(e,t,r[0],r[1],i):U(n,`Parameters`)?t4(e,t,r[0],i):U(n,`Partial`)?d4(e,t,r[0],i):U(n,`Omit`)?X2(e,t,r[0],r[1],i):U(n,`ReadonlyObject`)?A4(e,t,r[0],i):U(n,`Record`)?LW(e,t,r[0],r[1],i):U(n,`Required`)?V4(e,t,r[0],i):U(n,`ReturnType`)?K4(e,t,r[0],i):U(n,`TemplateLiteral`)?mZ(e,t,r[0],i):U(n,`Uncapitalize`)?L1(e,t,r[0],i):U(n,`Uppercase`)?R1(e,t,r[0],i):U(n,`With`)?X4(e,t,r[0],r[1]):SV(n,r,i)}function o3(e,t,n){return i3(n,BV(n)?j4(e,t,n,n.$ref):jV(n)?AV(Z(e,t,n.items),MV(n)):u1(n)?s1(e,t,n.target,n.arguments):PV(n)?NV(r3(e,t,n.parameters),Z(e,t,n.instanceType),FV(n)):LV(n)?IV(r3(e,t,n.parameters),Z(e,t,n.returnType),RV(n)):pH(n)?fH(Z(e,t,n.if),Z(e,t,n.then),Z(e,t,n.else),mH(n)):xH(n)?bH(r3(e,t,n.allOf),SH(n)):nH(n)?tH(t3(e,t,n.properties),rH(n)):JW(n)?UW(GW(n),Z(e,t,qW(n))):XW(n)?YW(Z(e,t,n.items)):LU(n)?IU(n3(e,t,n.items),RU(n)):mU(n)?pU(r3(e,t,n.anyOf),hU(n)):n)}function Z(e,t,n){return CV(n)?a3(e,t,n.action,n.parameters,n.options):o3(e,t,n)}function s3(e,t){return Z(e,$4([],[]),t)}function c3(e){return K(e,{"~immutable":!0},{})}function l3(e,t){return K(c3(e),{},t)}function u3(e,t,n,r){return l3(Z(e,t,n),r)}function d3(e,t={}){return SV(`AddImmutable`,[e],t)}function f3(e,t={}){return l3(e,t)}function p3(e,t={}){return SV(`Evaluate`,[e],t)}function m3(e,t={}){return F$(e,t)}function h3(e,t={}){return SV(`Module`,[e],t)}function g3(e,t={}){return R2({},$4([],[]),e,t)}function _3(...e){let[t,n,r]=DF(e,{2:(e,t)=>QF(e)?[{},e,t]:[e,t,{}],3:(e,t,n)=>[e,t,n],1:e=>[{},e,{}]}),i=YX(n);return K(HF(i)&&U(i.length,2)?Z(t,$4([],[]),i[0]):KV(),{},r)}BigInt(2**53-1),BigInt(-(2**53-1)),pU([tH({type:ZH(`insert`),path:dU(),value:iH()}),Object({type:ZH(`update`),path:dU(),value:iH()}),tH({type:ZH(`delete`),path:dU()})]);var v3=4,y3=4294967295,b3=65536,x3=class extends Error{constructor(e){super(e),this.name=`FrameError`}};function S3(e){let t=e?.maxFrameLength??16777216;if(!Number.isSafeInteger(t)||t<0||t>y3)throw RangeError(`maxFrameLength must be an integer between 0 and ${y3}`);return t}function C3(e){if(!(e instanceof Uint8Array))throw TypeError(`Frame payload must be a Uint8Array`);if(e.byteLength>y3)throw RangeError(`Frame payload exceeds the unsigned 32-bit length limit`);let t=new Uint8Array(v3+e.byteLength),n=e.byteLength;return t[0]=n>>>24,t[1]=n>>>16,t[2]=n>>>8,t[3]=n,t.set(e,v3),t}function w3(e,t){if(!(e instanceof Uint8Array))throw TypeError(`Frame must be a Uint8Array`);if(e.byteLength<v3)throw new x3(`Frame does not contain a complete length prefix`);let n=e[0]*16777216+e[1]*65536+e[2]*256+e[3],r=S3(t);if(n>r)throw new x3(`Frame length ${n} exceeds configured limit of ${r}`);if(e.byteLength!==v3+n)throw new x3(`Frame must contain exactly one complete payload`)}var T3=class{header=new Uint8Array(v3);headerLength=0;maxFrameLength;payloadBlocks=[];currentPayloadBlock;currentPayloadBlockLength=0;expectedPayloadLength;payloadLength=0;state=`open`;constructor(e){this.maxFrameLength=S3(e)}push(e){if(this.state===`ended`)throw new x3(`Frame decoder has ended`);if(this.state===`failed`)throw new x3(`Frame decoder has failed`);if(!(e instanceof Uint8Array))throw TypeError(`Frame chunk must be a Uint8Array`);let t=[],n=0;for(;n<e.byteLength;){if(this.expectedPayloadLength===void 0){let r=Math.min(v3-this.headerLength,e.byteLength-n);if(this.header.set(e.subarray(n,n+r),this.headerLength),this.headerLength+=r,n+=r,this.headerLength<v3)continue;let i=this.header[0]*16777216+this.header[1]*65536+this.header[2]*256+this.header[3];if(this.headerLength=0,i>this.maxFrameLength&&this.fail(`Frame length ${i} exceeds configured limit of ${this.maxFrameLength}`),i===0){t.push(new Uint8Array);continue}this.expectedPayloadLength=i,this.payloadBlocks=[],this.currentPayloadBlock=void 0,this.currentPayloadBlockLength=0,this.payloadLength=0}let r=this.expectedPayloadLength;if(r!==void 0){for(;n<e.byteLength&&this.payloadLength<r;){let t=this.currentPayloadBlock;(!t||this.currentPayloadBlockLength===t.byteLength)&&(t=new Uint8Array(Math.min(b3,r-this.payloadLength)),this.payloadBlocks.push(t),this.currentPayloadBlock=t,this.currentPayloadBlockLength=0);let i=Math.min(t.byteLength-this.currentPayloadBlockLength,e.byteLength-n);t.set(e.subarray(n,n+i),this.currentPayloadBlockLength),this.currentPayloadBlockLength+=i,this.payloadLength+=i,n+=i}if(this.payloadLength===r){if(this.payloadBlocks.length===1)t.push(this.payloadBlocks[0]);else{let e=new Uint8Array(r),n=0;for(let t of this.payloadBlocks)e.set(t,n),n+=t.byteLength;t.push(e)}this.payloadBlocks=[],this.currentPayloadBlock=void 0,this.currentPayloadBlockLength=0,this.expectedPayloadLength=void 0,this.payloadLength=0}}}return t}end(){if(this.state===`ended`)throw new x3(`Frame decoder has ended`);if(this.state===`failed`)throw new x3(`Frame decoder has failed`);(this.headerLength!==0||this.expectedPayloadLength!==void 0)&&this.fail(`Truncated frame at end of stream`),this.state=`ended`}fail(e){throw this.state=`failed`,this.headerLength=0,this.payloadBlocks=[],this.currentPayloadBlock=void 0,this.currentPayloadBlockLength=0,this.expectedPayloadLength=void 0,this.payloadLength=0,new x3(e)}},Q=s({Any:()=>UV,Array:()=>AV,BigInt:()=>BH,Boolean:()=>HH,Call:()=>l1,Capitalize:()=>b1,Codec:()=>TH,Conditional:()=>B1,Constructor:()=>NV,ConstructorParameters:()=>G1,Cyclic:()=>oH,Decode:()=>EH,DecodeBuilder:()=>wH,Dependent:()=>fH,Encode:()=>DH,EncodeBuilder:()=>CH,Enum:()=>vH,Evaluate:()=>m3,Exclude:()=>X1,Extends:()=>w$,ExtendsResult:()=>xZ,Extract:()=>e0,Function:()=>IV,Generic:()=>VV,Identifier:()=>WH,Immutable:()=>kH,Index:()=>l0,Infer:()=>uH,InstanceType:()=>i2,Instantiate:()=>s3,Integer:()=>qH,Interface:()=>$Q,Intersect:()=>bH,IsAny:()=>WV,IsArray:()=>jV,IsBigInt:()=>VH,IsBoolean:()=>UH,IsCall:()=>u1,IsCodec:()=>OH,IsConstructor:()=>PV,IsCyclic:()=>sH,IsDependent:()=>pH,IsEnum:()=>yH,IsEnumValue:()=>_H,IsFunction:()=>LV,IsGeneric:()=>HV,IsIdentifier:()=>GH,IsImmutable:()=>AH,IsInfer:()=>dH,IsInteger:()=>JH,IsIntersect:()=>xH,IsKind:()=>bV,IsLiteral:()=>tU,IsNever:()=>qV,IsNull:()=>rU,IsNumber:()=>oU,IsObject:()=>nH,IsOptional:()=>ZV,IsParameter:()=>uU,IsReadonly:()=>PH,IsRecord:()=>JW,IsRef:()=>BV,IsRefine:()=>RH,IsRest:()=>XW,IsSchema:()=>xV,IsString:()=>fU,IsSymbol:()=>cU,IsTemplateLiteral:()=>bZ,IsThis:()=>QW,IsTuple:()=>LU,IsUndefined:()=>eG,IsUnion:()=>mU,IsUnknown:()=>aH,IsUnsafe:()=>lH,IsVoid:()=>nG,KeyOf:()=>l2,Literal:()=>ZH,Lowercase:()=>S1,Mapped:()=>x2,Module:()=>g3,Never:()=>KV,NonNullable:()=>B2,Null:()=>nU,Number:()=>aU,Object:()=>tH,Omit:()=>G2,Optional:()=>XV,Parameter:()=>lU,Parameters:()=>Q2,Partial:()=>r4,Pick:()=>p4,Readonly:()=>NH,ReadonlyObject:()=>y4,ReadonlyType:()=>b4,Record:()=>HW,RecordKey:()=>KW,RecordPattern:()=>GW,RecordValue:()=>qW,Ref:()=>zV,Refine:()=>IH,Required:()=>z4,Rest:()=>YW,ReturnType:()=>U4,Script:()=>_3,String:()=>dU,Symbol:()=>sU,TemplateLiteral:()=>yZ,This:()=>ZW,Tuple:()=>IU,Uncapitalize:()=>w1,Undefined:()=>$W,Union:()=>pU,Unknown:()=>iH,Unsafe:()=>cH,Uppercase:()=>E1,Void:()=>tG,With:()=>J4}),E3=Q.String({minLength:1}),D3=Q.Integer({minimum:0}),$=e=>Q.Object(e,{additionalProperties:!1}),O3=Q.Cyclic({JsonValue:Q.Union([Q.Null(),Q.Boolean(),Q.Number(),Q.String(),Q.Array(Q.Ref(`JsonValue`)),Q.Record(Q.String(),Q.Ref(`JsonValue`))])},`JsonValue`),k3=Q.Unsafe(O3),A3=Q.Union([Q.Literal(`off`),Q.Literal(`minimal`),Q.Literal(`low`),Q.Literal(`medium`),Q.Literal(`high`),Q.Literal(`xhigh`),Q.Literal(`max`)]),j3=Q.Union([Q.Literal(`idle`),Q.Literal(`turn`),Q.Literal(`compaction`),Q.Literal(`branch_summary`),Q.Literal(`retry`)]),M3=$({provider:E3,id:E3}),N3=$({input:Q.Number({minimum:0}),output:Q.Number({minimum:0}),cacheRead:Q.Number({minimum:0}),cacheWrite:Q.Number({minimum:0})}),P3=$({provider:E3,id:E3,name:Q.String({minLength:1}),api:E3,reasoning:Q.Boolean(),input:Q.Array(Q.Union([Q.Literal(`text`),Q.Literal(`image`)])),contextWindow:Q.Integer({minimum:1}),maxTokens:Q.Integer({minimum:1}),cost:N3,supportedThinkingLevels:Q.Array(A3,{minItems:1}),authenticated:Q.Boolean()}),F3=$({type:Q.Literal(`text`),text:Q.String()}),I3=$({type:Q.Literal(`thinking`),thinking:Q.String(),redacted:Q.Optional(Q.Boolean())}),L3=$({type:Q.Literal(`image`),data:Q.String(),mimeType:Q.String({minLength:1})}),R3=$({type:Q.Literal(`toolCall`),toolCallId:E3,toolName:E3,input:k3}),z3=Q.Union([F3,L3]),B3=Q.Union([F3,I3,R3]),V3=Q.Union([F3,L3]),H3=$({input:Q.Integer({minimum:0}),output:Q.Integer({minimum:0}),cacheRead:Q.Integer({minimum:0}),cacheWrite:Q.Integer({minimum:0}),reasoning:Q.Optional(Q.Integer({minimum:0})),totalTokens:Q.Integer({minimum:0}),cost:$({input:Q.Number({minimum:0}),output:Q.Number({minimum:0}),cacheRead:Q.Number({minimum:0}),cacheWrite:Q.Number({minimum:0}),total:Q.Number({minimum:0})})}),U3=$({id:E3,role:Q.Literal(`user`),content:Q.Array(z3),timestamp:D3}),W3={id:E3,role:Q.Literal(`assistant`),content:Q.Array(B3),model:M3,responseModel:Q.Optional(Q.String({minLength:1})),usage:Q.Optional(H3),timestamp:D3},G3=$({...W3,status:Q.Literal(`streaming`)}),K3=$({...W3,status:Q.Literal(`complete`),stopReason:Q.Union([Q.Literal(`stop`),Q.Literal(`length`),Q.Literal(`toolUse`)])}),q3=$({...W3,status:Q.Literal(`error`),stopReason:Q.Literal(`error`),errorMessage:Q.Optional(Q.String({minLength:1}))}),J3=$({...W3,status:Q.Literal(`aborted`),stopReason:Q.Literal(`aborted`),errorMessage:Q.Optional(Q.String())}),Y3=Q.Union([G3,K3,q3,J3]),X3={id:E3,role:Q.Literal(`tool`),toolCallId:E3,toolName:E3,input:k3,content:Q.Array(V3),details:Q.Optional(k3),usage:Q.Optional(H3),timestamp:D3},Z3=$({...X3,status:Q.Literal(`running`),isError:Q.Literal(!1)}),Q3=$({...X3,status:Q.Literal(`complete`),isError:Q.Literal(!1)}),$3=$({...X3,status:Q.Literal(`error`),isError:Q.Literal(!0)}),e6=Q.Union([Z3,Q3,$3]),t6=Q.Union([U3,Y3,e6]),n6=Q.Union([$({type:Q.Literal(`item_started`),item:t6}),$({type:Q.Literal(`assistant_delta`),messageId:E3,contentIndex:Q.Integer({minimum:0}),kind:Q.Union([Q.Literal(`text`),Q.Literal(`thinking`),Q.Literal(`toolCall`)]),delta:Q.String()}),$({type:Q.Literal(`item_updated`),item:Q.Union([Y3,e6])}),$({type:Q.Literal(`item_finished`),item:Q.Union([K3,q3,J3,Q3,$3])})]),r6=$({id:E3,createdAt:D3,updatedAt:Q.Optional(D3),parentSessionId:Q.Optional(E3),sessionName:Q.Optional(Q.String()),cwd:Q.Optional(Q.String({minLength:1}))}),i6=$({id:E3,name:Q.Optional(Q.String()),cwd:Q.String({minLength:1}),createdAt:D3,updatedAt:D3,phase:j3,model:M3,thinkingLevel:A3,attached:Q.Boolean(),locked:Q.Boolean(),revision:Q.Integer({minimum:0}),transcript:Q.Array(t6),queuedSteer:Q.Array(U3),queuedSteerCount:Q.Integer({minimum:0})}),a6=$({serverId:E3,protocolVersion:Q.Literal(1),revision:Q.Integer({minimum:0}),sessions:Q.Array(r6),models:Q.Array(P3)}),o6=$({code:Q.Union([Q.Literal(`version`),Q.Literal(`busy`),Q.Literal(`session_locked`),Q.Literal(`not_found`),Q.Literal(`invalid_request`),Q.Literal(`not_implemented`),Q.Literal(`internal_error`)]),message:Q.String(),details:Q.Optional(k3)}),s6={sessionId:E3,text:Q.String()},c6=$({command:Q.Literal(`list`)}),l6=$({command:Q.Literal(`create`),cwd:Q.Optional(Q.String({minLength:1})),name:Q.Optional(Q.String()),model:Q.Optional(M3),thinkingLevel:Q.Optional(A3)}),u6=$({command:Q.Literal(`attach`),sessionId:E3}),d6=$({command:Q.Literal(`detach`),sessionId:E3}),f6=$({command:Q.Literal(`prompt`),...s6}),p6=$({command:Q.Literal(`steer`),...s6}),m6=$({command:Q.Literal(`abort`),sessionId:E3}),h6=$({command:Q.Literal(`set_model`),sessionId:E3,model:M3}),g6=$({command:Q.Literal(`set_thinking`),sessionId:E3,thinkingLevel:A3}),_6=Q.Union([c6,l6,u6,d6,f6,p6,m6,h6,g6]),v6=$({command:Q.Literal(`create`),session:i6}),y6=$({command:Q.Literal(`attach`),session:i6}),b6=$({command:Q.Literal(`prompt`),session:i6}),x6=$({command:Q.Literal(`steer`),session:i6}),S6=$({command:Q.Literal(`abort`),session:i6}),C6=$({command:Q.Literal(`set_model`),session:i6}),w6=$({command:Q.Literal(`set_thinking`),session:i6}),T6=$({command:Q.Literal(`list`),sessions:Q.Array(r6)}),E6=$({command:Q.Literal(`detach`),sessionId:E3}),D6=Q.Union([T6,v6,y6,E6,b6,x6,S6,C6,w6]),O6=$({type:Q.Literal(`hello`),version:Q.Integer({minimum:0})}),k6=$({type:Q.Literal(`request`),id:E3,request:_6}),A6=Q.Union([O6,k6]),j6=Q.Union([$({type:Q.Literal(`server_snapshot`),snapshot:a6}),$({type:Q.Literal(`session_snapshot`),snapshot:i6}),$({type:Q.Literal(`session_progress`),sessionId:E3,progress:n6}),$({type:Q.Literal(`session_removed`),sessionId:E3})]),M6=$({type:Q.Literal(`hello`),version:Q.Literal(1),connectionId:E3,snapshot:a6}),N6=$({type:Q.Literal(`hello_error`),error:o6}),P6=Q.Union([$({type:Q.Literal(`response`),id:E3,ok:Q.Literal(!0),result:D6}),$({type:Q.Literal(`response`),id:E3,ok:Q.Literal(!1),error:o6})]),F6=$({type:Q.Literal(`event`),event:j6}),I6=Q.Union([M6,N6,P6,F6]),L6=class extends Error{constructor(e,t){super(e),this.name=`ProtocolValidationError`}};function R6(e,t=!1,n=new Set){if(e===void 0)return t;if(e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`)return!0;if(typeof e!=`object`||n.has(e))return!1;n.add(e);try{return Array.isArray(e)?e.every(e=>R6(e,!1,n)):Object.getPrototypeOf(e)===Object.prototype&&Object.values(e).every(e=>R6(e,!0,n))}finally{n.delete(e)}}function z6(e){if(!R6(e)||!tV(A6,e))throw new L6(`Invalid client protocol message`);return e}function B6(e){if(!R6(e)||!tV(I6,e))throw new L6(`Invalid server protocol message`);return e}function V6(e){return e instanceof Error?e.message.length<=500?e.message:`${e.message.slice(0,497)}...`:`Unknown codec error`}function H6(e,t,n,r){let i=t(e);try{let e=r?.maxFrameLength??16777216,t=C3(EF(i,{maxByteLength:e}));return w3(t,{maxFrameLength:e}),t}catch(e){throw e instanceof L6?e:new L6(`Unable to encode ${n} protocol message: ${V6(e)}`)}}function U6(e,t){return H6(e,z6,`client`,t)}var W6=class{failed=!1;frames;kind;maxFrameLength;parse;constructor(e,t,n){this.frames=new T3(n),this.kind=e,this.maxFrameLength=n?.maxFrameLength??16777216,this.parse=t}push(e){if(this.failed)throw new L6(`${this.kind} message decoder has failed`);try{let t=[];for(let n of this.frames.push(e))t.push(this.parse(bF(n,{maxByteLength:this.maxFrameLength})));return t}catch(e){throw this.failed=!0,e instanceof L6?e:new L6(`Invalid ${this.kind} protocol frame: ${V6(e)}`)}}end(){if(this.failed)throw new L6(`${this.kind} message decoder has failed`);try{this.frames.end()}catch(e){throw this.failed=!0,new L6(`Invalid ${this.kind} protocol framing: ${V6(e)}`)}}},G6=class{decoder;constructor(e){this.decoder=new W6(`server`,B6,e)}push(e){return this.decoder.push(e)}end(){this.decoder.end()}},K6=class extends Error{code;details;constructor(e){super(e.message),this.name=`PiServerError`,this.code=e.code,this.details=e.details}},q6=class extends Error{constructor(e=`Pi client is disconnected`){super(e),this.name=`PiDisconnectedError`}},J6=class extends Error{constructor(){super(`Pi client is disposed`),this.name=`PiClientDisposedError`}},Y6=class extends Error{sessionId;constructor(e,t){super(t),this.name=`PiSessionOwnershipError`,this.sessionId=e}},X6=class extends Error{sessionId;constructor(e){super(`Session ${e} is not attached`),this.name=`PiSessionDetachedError`,this.sessionId=e}};function Z6(e){return e instanceof Error?e:Error(String(e))}function Q6(e){let t=Z6(e);return t instanceof q6?t:new q6(t.message)}function $6(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var e8=4294967295,t8=class{#e;#t;#n={state:`disconnected`};#r=0;constructor(e){if(this.#e=e,this.#t=e.maxFrameLength??16777216,!Number.isSafeInteger(this.#t)||this.#t<=0||this.#t>e8)throw TypeError(`PiClient maxFrameLength must be an integer between 1 and ${e8}`)}get state(){return this.#n.state}get maxFrameLength(){return this.#t}connect(){if(this.#n.state!==`disconnected`)return Promise.reject(new q6(`PiClient is already ${this.#n.state}`));let e=++this.#r,t=$6();return this.#n={state:`connecting`,id:e,decoder:new G6({maxFrameLength:this.#t}),handshake:t},this.#e.onStateChange({state:`connecting`}),this.#i(e,{onData:t=>this.#a(e,t),onClose:()=>{this.#u(e)&&this.#s()},onError:t=>{this.#u(e)&&this.#c(Q6(t))}}),t.promise}disconnect(e=`Client disconnected`){this.#n.state!==`disconnected`&&this.#c(typeof e==`string`?new q6(e):e)}fail(e){this.#c(e)}send(e){let t=this.#n;if(t.state!==`connected`)throw new q6;let n;try{n=t.transport.send(e)}catch(e){this.#c(Q6(e));return}n.catch(e=>{let n=this.#n;n.state!==`disconnected`&&n.transport===t.transport&&this.#c(Q6(e))})}async#i(e,t){let n;try{n=await this.#e.transportFactory(t)}catch(t){this.#u(e)&&this.#l(Q6(t));return}let r=this.#n;if(r.state!==`connecting`||r.id!==e){n.close();return}this.#n={...r,transport:n};try{await n.send(U6({type:`hello`,version:1},{maxFrameLength:this.#t}))}catch(t){this.#u(e)&&this.#c(Q6(t))}}#a(e,t){let n=this.#n;if(n.state===`disconnected`||n.id!==e)return;if(n.state===`connecting`&&!n.transport){this.#c(new L6(`Received server data before the client hello was sent`));return}let r;try{r=n.decoder.push(t)}catch(e){this.#c(Z6(e));return}for(let e of r){if(this.#n.state===`disconnected`)return;this.#o(e)}}#o(e){let t=this.#n;if(t.state===`connecting`){if(e.type===`hello_error`){this.#c(new K6(e.error));return}if(e.type!==`hello`){this.#c(new L6(`Expected server hello as first message`));return}if(!t.transport){this.#c(new L6(`Received server hello before the client hello was sent`));return}let n={state:`connected`,id:t.id,decoder:t.decoder,transport:t.transport,handshake:t.handshake};this.#n=n;try{this.#e.onHandshake(e.snapshot)}catch(e){this.#n===n&&this.#c(Z6(e));return}if(this.#n!==n||(this.#e.onStateChange({state:`connected`}),this.#n!==n))return;this.#n={...n,handshake:void 0},t.handshake.resolve(e.snapshot);return}if(t.state===`connected`){if(e.type===`hello`||e.type===`hello_error`){this.#c(new L6(`Unexpected handshake message`));return}this.#e.onMessage(e)}}#s(){let e=this.#n;if(e.state===`disconnected`)return;let t=new q6(`Byte transport closed`);try{e.decoder.end()}catch(e){t=Z6(e)}this.#l(t)}#c(e){let t=this.#n,n=t.state===`disconnected`?void 0:t.transport;this.#l(e),n?.close()}#l(e){let t=this.#n;t.state!==`disconnected`&&(this.#n={state:`disconnected`},t.handshake?.reject(e),this.#e.onStateChange({state:`disconnected`,error:e}))}#u(e){return this.#n.state!==`disconnected`&&this.#n.id===e}},n8=class{id;#e;constructor(e,t){this.id=e,this.#e=t}get attached(){return this.#e.isAttached()}get active(){return this.attached}get snapshot(){return this.#e.getSnapshot()}subscribe(e){return this.#e.subscribe(e)}onEvent(e){return this.#e.onEvent(e)}async detach(){await this.#e.detach()}dispose(){return this.#e.dispose()}[Symbol.asyncDispose](){return this.dispose()}async prompt(e){return(await this.#t({command:`prompt`,sessionId:this.id,text:e})).session}async steer(e){return(await this.#t({command:`steer`,sessionId:this.id,text:e})).session}async abort(){return(await this.#t({command:`abort`,sessionId:this.id})).session}async setModel(e){return(await this.#t({command:`set_model`,sessionId:this.id,model:e})).session}async setThinking(e){return(await this.#t({command:`set_thinking`,sessionId:this.id,thinkingLevel:e})).session}#t(e){return this.#e.request(e)}},r8=class{#e=new Map;#t=new Set;#n=new Set;#r=new Set;#i=new Map;#a=new Map;#o;#s;constructor(e){this.#o=e}get snapshot(){return this.#s}reset(){this.#s=void 0,this.#e.clear(),this.#t.clear()}clearAttachments(){this.#t.clear()}dispose(){this.reset(),this.#n.clear(),this.#r.clear(),this.#i.clear(),this.#a.clear()}getSessionSnapshot(e){return this.#e.get(e)}isSessionAttached(e){return this.#t.has(e)}forgetSessionSnapshot(e){let t=this.#e.get(e);return this.#e.delete(e),t}restoreSessionSnapshot(e){this.#e.has(e.id)||this.#e.set(e.id,e)}subscribe(e){return this.#n.add(e),()=>this.#n.delete(e)}onEvent(e){return this.#r.add(e),()=>this.#r.delete(e)}subscribeSession(e,t){return i8(this.#i,e,t)}onSessionEvent(e,t){return i8(this.#a,e,t)}applyResult(e){if(e.command!==`list`){if(e.command===`detach`){this.#t.delete(e.sessionId);let t=this.#e.get(e.sessionId);t&&this.#c({...t,attached:!1},!0);return}this.#c(e.session)}}applyEvent(e){e.type===`server_snapshot`&&this.applyServerSnapshot(e.snapshot),e.type===`session_snapshot`&&this.#c(e.snapshot),e.type===`session_removed`&&(this.#e.delete(e.sessionId),this.#t.delete(e.sessionId)),this.#l(this.#r,e);let t=a8(e);t&&this.#l(this.#a.get(t),e)}applyServerSnapshot(e){this.#s&&e.revision<this.#s.revision||(this.#s=e,this.#l(this.#n,e))}#c(e,t=!1){let n=this.#e.get(e.id);!t&&n&&e.revision<n.revision||(this.#e.set(e.id,e),e.attached?this.#t.add(e.id):this.#t.delete(e.id),this.#l(this.#i.get(e.id),e))}#l(e,t){for(let n of e??[])try{n(t)}catch(e){this.#u(e)}}#u(e){if(this.#o)try{this.#o(Z6(e))}catch{}}};function i8(e,t,n){let r=e.get(t);return r||(r=new Set,e.set(t,r)),r.add(n),()=>{r.delete(n),r.size===0&&e.delete(t)}}function a8(e){if(e.type===`session_snapshot`)return e.snapshot.id;if(e.type===`session_progress`||e.type===`session_removed`)return e.sessionId}var o8=class e{#e;#t;#n;#r=new Map;#i=new Map;#a=new Map;#o=new Map;#s=new Map;#c=new Map;#l=new Set;#u=new Map;#d=new Set;#f=0;#p=!1;#m;constructor(e){this.#e=e,this.#n=new r8(e.onListenerError),this.#t=new t8({transportFactory:e.transportFactory,maxFrameLength:e.maxFrameLength,onHandshake:e=>this.#n.applyServerSnapshot(e),onMessage:e=>this.#v(e),onStateChange:e=>this.#y(e)})}get disposed(){return this.#p}get connectionState(){return this.#t.state}get connected(){return this.#t.state===`connected`}get snapshot(){return this.#n.snapshot}static async connect(t){let n=new e(t);try{return await n.connect(),n}catch(e){throw await n.dispose(),e}}connect(){return this.#p?Promise.reject(new J6):(this.#t.state===`disconnected`&&this.#n.reset(),this.#t.connect())}reconnect(){return this.connect()}disconnect(e=`Client disconnected`){this.#t.disconnect(e)}subscribe(e){return this.#S(),this.#n.subscribe(e)}onEvent(e){return this.#S(),this.#n.onEvent(e)}onConnectionStateChange(e){return this.#S(),this.#d.add(e),()=>this.#d.delete(e)}async listSessions(){return(await this.#g({command:`list`})).sessions}async createSession(e={}){let t=await this.#g({command:`create`,...e}),n=this.#w(t.session.id,`exclusive`);return this.#_(t.session.id,n)}async attachSession(e){return this.acquireSession(e,{mode:`shared`})}async acquireSession(e,t){this.#S();let n=this.#w(e,t.mode);try{let t=this.#c.get(e);if(t&&await t.catch(()=>{}),this.#l.has(e)&&await this.#C(e)||!this.#n.isSessionAttached(e)){let t=this.#s.get(e);t||(t=this.#h(e),this.#s.set(e,t));try{await t}finally{this.#s.get(e)===t&&this.#s.delete(e)}}return this.#_(e,n)}catch(t){throw this.#T(e,n),t}}async#h(e){let t=this.#n.forgetSessionSnapshot(e);try{await this.#g({command:`attach`,sessionId:e})}catch(e){throw t&&this.#n.restoreSessionSnapshot(t),e}}#g(e){if(this.#p)return Promise.reject(new J6);if(!this.connected)return Promise.reject(new q6);let t=`request-${++this.#f}`,{promise:n,resolve:r,reject:i}=$6();this.#r.set(t,{command:e,resolve:r,reject:i});let a;try{a=U6({type:`request`,id:t,request:e},{maxFrameLength:this.#t.maxFrameLength})}catch(e){return this.#b(t)?.reject(Z6(e)),n}return this.#t.send(a),n}#_(e,t){let n=this.#o.get(e)??0;this.#o.set(e,n);let r=`active`,i,a=()=>{(r===`active`||r===`releasing`)&&this.#o.get(e)!==n&&(r=`invalidated`)},o=()=>(a(),r===`active`&&this.#n.isSessionAttached(e)),s=()=>{if(this.#S(),!this.connected)throw new q6;if(!o())throw new X6(e)},c=n=>(a(),r===`released`||r===`invalidated`?Promise.resolve():i||(s(),r=`releasing`,i=(async()=>{if((this.#i.get(e)??0)<=1){let n=this.#g({command:`detach`,sessionId:e}).then(()=>void 0);this.#c.set(e,n);try{await n,this.#T(e,t)}finally{this.#c.get(e)===n&&this.#c.delete(e)}}else this.#T(e,t);r=`released`})().catch(o=>{if(a(),r!==`invalidated`)throw n?(this.#T(e,t),this.#l.add(e),r=`released`):(r=`active`,i=void 0),o}),i));return new n8(e,{isAttached:o,getSnapshot:()=>o()?this.#n.getSessionSnapshot(e):void 0,subscribe:t=>(s(),this.#n.subscribeSession(e,e=>{o()&&t(e)})),onEvent:t=>(s(),this.#n.onSessionEvent(e,e=>{(o()||e.type===`session_removed`)&&t(e)})),detach:()=>c(!1),dispose:()=>c(!0),request:e=>(s(),this.#g(e))})}#v(e){if(e.type===`event`){e.event.type===`session_removed`&&this.#E(e.event.sessionId),this.#n.applyEvent(e.event);return}let t=this.#b(e.id);if(!t){this.#t.fail(new L6(`Response has no matching request`));return}if(!e.ok){t.reject(new K6(e.error));return}if(e.result.command!==t.command.command){let n=new L6(`Response command ${e.result.command} does not match ${t.command.command}`);t.reject(n),this.#t.fail(n);return}this.#n.applyResult(e.result),t.resolve(e.result)}#y(e){e.state===`disconnected`&&(this.#n.clearAttachments(),this.#D(),this.#x(e.error??new q6)),this.#O(e)}#b(e){let t=this.#r.get(e);return t&&this.#r.delete(e),t}#x(e){let t=[...this.#r.values()];this.#r.clear();for(let n of t)n.reject(e)}dispose(){if(this.#m)return this.#m;this.#p=!0,this.#m=Promise.resolve();let e=new J6;return this.#x(e),this.#t.disconnect(e),this.#n.dispose(),this.#D(),this.#d.clear(),this.#m}[Symbol.asyncDispose](){return this.dispose()}#S(){if(this.#p)throw new J6}async#C(e){if(!this.#l.has(e))return!1;let t=this.#u.get(e);return t||(t=this.#g({command:`detach`,sessionId:e}).then(()=>void 0).then(()=>{this.#l.delete(e)}).finally(()=>{this.#u.delete(e)}),this.#u.set(e,t)),await t,!0}#w(e,t){let n=this.#i.get(e)??0;if(t===`exclusive`&&n>0)throw new Y6(e,`Session ${e} already has an active lease`);if(t===`shared`&&this.#a.has(e))throw new Y6(e,`Session ${e} has an exclusive lease`);let r={mode:t};return this.#i.set(e,n+1),t===`exclusive`&&this.#a.set(e,r),r}#T(e,t){let n=this.#i.get(e)??0;n<=1?this.#i.delete(e):this.#i.set(e,n-1),this.#a.get(e)===t&&this.#a.delete(e)}#E(e){this.#i.delete(e),this.#a.delete(e),this.#l.delete(e),this.#o.set(e,(this.#o.get(e)??0)+1)}#D(){for(let e of this.#i.keys())this.#E(e);this.#l.clear()}#O(e){for(let t of this.#d)try{t(e)}catch(e){this.#k(e)}}#k(e){if(this.#e.onListenerError)try{this.#e.onListenerError(Z6(e))}catch{}}};function s8(e){return e===null||typeof e==`boolean`||typeof e==`string`?!0:typeof e==`number`?Number.isFinite(e):Array.isArray(e)?e.every(s8):typeof e!=`object`||Object.getPrototypeOf(e)!==Object.prototype?!1:Object.values(e).every(s8)}function c8(e){try{let t=JSON.parse(e);if(s8(t))return t}catch{}return e}function l8(e){return{snapshot:structuredClone(e),progressItems:new Map,progressOrder:[],toolCallBuffers:new Map}}function u8(e,t){return e.snapshot.id===t.id&&t.revision<e.snapshot.revision?e:l8(t)}function d8(e,t){if(t.type===`item_started`||t.type===`item_updated`)return p8(e,t.item);if(t.type===`item_finished`){let n=new Map(e.toolCallBuffers);for(let e of n.keys())e.startsWith(`${t.item.id}:`)&&n.delete(e);return p8({...e,toolCallBuffers:n},t.item)}let n=e.progressItems.get(t.messageId)??e.snapshot.transcript.find(({id:e})=>e===t.messageId);if(!n||n.role!==`assistant`)return e;let r=e.toolCallBuffers,i=n.content.map((n,i)=>{if(i!==t.contentIndex)return structuredClone(n);if(t.kind===`text`&&n.type===`text`)return{...n,text:n.text+t.delta};if(t.kind===`thinking`&&n.type===`thinking`)return{...n,thinking:n.thinking+t.delta};if(t.kind===`toolCall`&&n.type===`toolCall`){let i=`${t.messageId}:${t.contentIndex}`,a=(e.toolCallBuffers.get(i)??(typeof n.input==`string`?n.input:``))+t.delta;return r=new Map(e.toolCallBuffers).set(i,a),{...n,input:c8(a)}}return structuredClone(n)});return p8({...e,toolCallBuffers:r},{...n,content:i})}function f8(e){let t=e.snapshot.transcript.map(t=>e.progressItems.get(t.id)??t),n=new Set(t.map(e=>e.id));for(let r of e.progressOrder){if(n.has(r))continue;let i=e.progressItems.get(r);i&&(t.push(i),n.add(r))}for(let r of e.snapshot.queuedSteer)n.has(r.id)||(t.push(r),n.add(r.id));return t}function p8(e,t){let n=new Map(e.progressItems),r=n.has(t.id)?e.progressOrder:[...e.progressOrder,t.id];return n.set(t.id,structuredClone(t)),{...e,progressItems:n,progressOrder:r}}var m8=class extends Error{constructor(){super(`Remote session is disposed`),this.name=`RemoteSessionDisposedError`}};async function h8(e){let t=(await Promise.allSettled(e)).flatMap(e=>e.status===`rejected`&&!(e.reason instanceof m8)?[e.reason]:[]);if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t,`Failed to dispose remote session`)}var g8=class e{#e;#t;#n={status:`unbound`};#r;#i;#a;#o;#s=new Set;#c=new Set;#l=new Set;#u;#d=()=>{};#f=new Promise(e=>{this.#d=e});constructor(e,t={}){this.#e=e,this.#t=t.onListenerError}get id(){return this.#r?.id}get state(){return{lifecycle:this.#n,snapshot:this.#i?.snapshot,transcript:this.#i?f8(this.#i):[]}}get snapshot(){return this.#i?.snapshot}get phase(){return this.snapshot?.phase}get operation(){return this.#n.status===`busy`?this.#n.operation:void 0}get models(){return this.#e.snapshot?.models??[]}get sessions(){return this.#e.snapshot?.sessions??[]}get connectionState(){return this.#e.connectionState}get disposed(){return this.#n.status===`disposed`}subscribe(e){return this.#E(),this.#s.add(e),this.#x(e,this.state),()=>this.#s.delete(e)}onConnectionStateChange(e){return this.#E(),this.#e.onConnectionStateChange(e)}static async open(t,n,r={}){let i=new e(t,r);try{return await i.open(n),i}catch(e){throw await i.dispose(),e}}async open(e){(this.#r?.id!==e||this.#n.status!==`ready`)&&await this.#p(`open`,()=>this.#e.acquireSession(e,{mode:`exclusive`}))}static async create(t,n,r={}){let i=new e(t,r);try{return await i.create(n),i}catch(e){throw await i.dispose(),e}}async create(e){await this.#p(`create`,()=>this.#e.createSession(e))}async submit(e){let t=e.trim();if(!t)return;this.#T();let n=this.#w();if(this.phase!==`idle`&&this.phase!==`turn`)throw Error(`Session cannot accept input during ${this.phase??`unknown`} phase`);await this.#_(`submit`,()=>(this.phase===`idle`?n.prompt(t):n.steer(t)).then(()=>void 0))}async abort(){let e=this.#n.status===`busy`&&this.#n.operation===`submit`;e?this.#E():this.#T();let t=this.#w();this.phase===`idle`&&!e||await this.#_(`abort`,()=>t.abort().then(()=>void 0),e)}async setModel(e){await this.#g(`setModel`,`change model`,()=>this.#w().setModel(e).then(()=>void 0))}async setThinking(e){await this.#g(`setThinking`,`change thinking level`,()=>this.#w().setThinking(e).then(()=>void 0))}async reconnect(){this.#T();let e=this.#w().id;await this.#_(`reconnect`,()=>this.#m(async()=>{await this.#e.reconnect();let t=await this.#e.acquireSession(e,{mode:`exclusive`});await this.#D(t),this.#v(t)}))}dispose(){if(this.#u)return this.#u;let e=this.#r;this.#n={status:`disposed`},this.#d(),this.#C(),this.#r=void 0,this.#i=void 0;let t=[...this.#c];return e&&t.push(e.dispose()),this.#u=h8(t),this.#b(),this.#s.clear(),this.#u}[Symbol.asyncDispose](){return this.dispose()}async#p(e,t){if(this.#T(),this.#r&&this.phase!==`idle`)throw Error(`Cannot ${e} a session while session is ${this.phase??`unavailable`}`);await this.#_(e,()=>this.#m(()=>this.#h(e,t)))}async#m(e){let t=e();this.#c.add(t);try{await t}finally{this.#c.delete(t)}}async#h(e,t){let n=this.#r,r=await t();await this.#D(r);let i=r.snapshot;if(!i)throw await this.#O(r),Error(`Session ${r.id} did not provide a snapshot`);if(n&&n.id!==r.id&&n.attached&&this.phase!==`idle`)throw await this.#O(r),Error(`Cannot ${e} a session while session is ${this.phase??`unavailable`}`);if(n&&n.id!==r.id&&n.attached)try{await n.detach()}catch(e){try{await this.#O(r)}catch(t){throw AggregateError([e,t],`Failed to replace remote session attachment`)}throw e}await this.#D(r),this.#v(r,i)}async#g(e,t,n){if(this.#T(),this.#w(),this.phase!==`idle`)throw Error(`Cannot ${t} while session is ${this.phase??`unavailable`}`);await this.#_(e,n)}async#_(e,t,n=!1){n?this.#E():this.#T();let r=this.#n,i={status:`busy`,operation:e};this.#n=i,this.#l.add(i),this.#b();let a=t();try{await Promise.race([a,this.#f.then(()=>{throw Error(`Remote session is disposed`)})])}finally{this.#l.delete(i),!this.disposed&&this.#n===i&&(this.#n=n&&this.#l.has(r)?r:this.#r?{status:`ready`}:{status:`unbound`},this.#b())}}#v(e,t){let n=t??e.snapshot;if(!n)throw Error(`Session ${e.id} did not provide a snapshot`);this.#C(),this.#r=e,this.#i=l8(n),this.#a=e.subscribe(e=>{this.#i&&(this.#i=u8(this.#i,e),this.#b())}),this.#o=e.onEvent(e=>this.#y(e))}#y(e){if(e.type===`session_removed`){this.#C(),this.#r=void 0,this.#i=void 0,this.#n.status!==`busy`&&(this.#n={status:`unbound`}),this.#b();return}e.type!==`session_progress`||!this.#i||(this.#i=d8(this.#i,e.progress),this.#b())}#b(){let e=this.state;for(let t of this.#s)this.#x(t,e)}#x(e,t){try{e(t)}catch(e){this.#S(e)}}#S(e){if(this.#t)try{this.#t(e instanceof Error?e:Error(String(e)))}catch{}}#C(){this.#a?.(),this.#o?.(),this.#a=void 0,this.#o=void 0}#w(){if(!this.#r)throw Error(`No remote session is attached`);return this.#r}#T(){if(this.#E(),this.#n.status===`busy`)throw Error(`Remote session is busy with ${this.#n.operation}`)}#E(){if(this.disposed)throw Error(`Remote session is disposed`)}async#D(e){if(this.disposed)throw await this.#O(e),new m8}async#O(e){await e.dispose()}},_8=`/api/pi`,v8=`https:`,y8=`wss:`,b8=`ws:`;function x8(e){return`${e.protocol===v8?y8:b8}//${e.host}${_8}`}function S8(e){return async t=>{let n=new WebSocket(e);return n.binaryType=`arraybuffer`,await new Promise((e,t)=>{let r=()=>{n.removeEventListener(`error`,i),e()},i=()=>{n.removeEventListener(`open`,r),t(Error(`The cockpit protocol socket failed to open`))};n.addEventListener(`open`,r,{once:!0}),n.addEventListener(`error`,i,{once:!0})}),n.addEventListener(`message`,e=>{let n=e.data;typeof n!=`string`&&(n instanceof ArrayBuffer?t.onData(new Uint8Array(n)):n.arrayBuffer().then(e=>t.onData(new Uint8Array(e))))}),n.addEventListener(`close`,()=>t.onClose()),n.addEventListener(`error`,()=>t.onError(Error(`The cockpit protocol socket failed`))),{async send(e){n.send(e.slice().buffer)},close(){n.close()}}}}function C8(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function w8(e){let t=e.content.filter(e=>e.type===`text`).map(e=>e.text).join(``);return{kind:`user`,id:e.id,text:t}}function T8(e){let t=``,n=``;for(let r of e.content)r.type===`text`?t+=r.text:r.type===`thinking`&&(n+=r.thinking);return{kind:`assistant`,id:e.id,text:t,thinking:n,streaming:e.status===`streaming`}}function E8(e){let t=e.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
89
+ `),n=e.content.length>0||e.details!==void 0?{content:[...e.content],details:e.details}:null;return{kind:`tool`,id:e.id,toolCallId:e.toolCallId,name:e.toolName,args:C8(e.input)?e.input:{},argSummary:dk(e.input),result:n,output:t,isError:e.isError,running:e.status===`running`}}function D8(e){return e.map(e=>e.role===`user`?w8(e):e.role===`assistant`?T8(e):E8(e))}var O8=700;function k8(e=window.location){let t=new o8({transportFactory:S8(x8(e))}),n,r,i=null,a,o=!1,s=0,c=async()=>{r?.(),r=void 0;let e=n;n=void 0,await e?.dispose().catch(()=>void 0)},l=(e,t)=>{let n=t.state;n.snapshot&&yA(e,D8(n.transcript),n.snapshot.phase!==`idle`)},u=async e=>{let i=++s;await c();try{let a=await g8.open(t,e);if(o||i!==s){await a.dispose().catch(()=>void 0);return}n=a,r=a.subscribe(()=>l(e,a)),l(e,a)}catch{}},d=async()=>{if(!o)try{await t.connect(),i!==null&&await u(i)}catch{o||(a=setTimeout(()=>void d(),O8))}};t.onConnectionStateChange(e=>{o||e.state!==`disconnected`||(a=setTimeout(()=>void f(),O8))});let f=async()=>{if(!o)try{await t.reconnect(),i!==null&&await u(i)}catch{o||(a=setTimeout(()=>void f(),O8))}};return d(),{focus(e){e!==i&&(i=e,e===null?c():u(e))},stop(){o=!0,a&&clearTimeout(a),c().then(()=>t.dispose().catch(()=>void 0))}}}var A8=700;function j8(e){return`${e.protocol===`https:`?`wss:`:`ws:`}//${e.host}/api/session`}function M8(e,t){let n,r,i=!1,a=()=>{if(i)return;let o=new WebSocket(e);n=o,o.addEventListener(`open`,()=>t.onOpen()),o.addEventListener(`message`,e=>{if(typeof e.data!=`string`)return;let n;try{n=JSON.parse(e.data)}catch{return}typeof n==`object`&&n&&!Array.isArray(n)&&t.onFrame(n)}),o.addEventListener(`close`,()=>{t.onClose(),!i&&(r=setTimeout(a,A8))}),o.addEventListener(`error`,()=>o.close())};return a(),{send(e){n?.readyState===WebSocket.OPEN&&n.send(JSON.stringify(e))},close(){i=!0,r&&clearTimeout(r),n?.close()}}}function N8(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function P8(e){for(let t of e){if(t.type!==`entry_appended`)continue;let e=t.entry;if(N8(e)&&typeof e.id==`string`)return e.id}return null}function F8(){let e=null,t=k8(),n=(n=!1)=>{let{activeId:r,byId:i}=Hk.state,a=r!==null&&r in i?r:null;t.focus(a),!(!n&&a===e)&&(e!==null&&e!==a&&Vk(rk(e)),e=a,a!==null&&Vk(nk(a)))},r=M8(j8(window.location),{onFrame(t){switch(t.type){case GO:window.location.reload();return;case zO:qk(t),n(!0),zA();return;case BO:Jk(t),n();return;case VO:if(typeof t.sessionId!=`string`)return;Yk(t),xA(t.sessionId),Mj(t.sessionId),BA(t.sessionId),Gj(t.sessionId),e===t.sessionId&&(e=null);return;case HO:{if(typeof t.sessionId!=`string`||!Array.isArray(t.frames))return;let e=t.sessionId,n=t.frames.filter(N8),r=typeof t.dropped==`number`?t.dropped:0;Xk(e,n.length,r),bA(e);for(let t of n)sA(e,t);_A(e,P8(n)),SA(e);return}case ek:if(typeof t.sessionId!=`string`||!Array.isArray(t.frames))return;gA(t.sessionId,t.frames.filter(N8),{cursor:typeof t.cursor==`string`?t.cursor:null,hasMore:t.hasMore===!0});return;case UO:if(typeof t.sessionId!=`string`||!N8(t.frame))return;sA(t.sessionId,t.frame),t.frame.type===`extension_ui_request`&&t.frame.method===`select`&&KM(typeof t.frame.id==`string`?t.frame.id:``),t.frame.type===`agent_settled`&&(WM(),SA(t.sessionId));return;case ZO:{if(typeof t.sessionId!=`string`||typeof t.threadId!=`string`||!Array.isArray(t.frames))return;let e=IA(t.sessionId,t.threadId);bA(e);for(let n of t.frames.filter(N8))cA(e,n);return}case QO:if(typeof t.sessionId!=`string`||typeof t.threadId!=`string`||!N8(t.frame))return;cA(IA(t.sessionId,t.threadId),t.frame);return;default:jj(t);return}},onOpen(){},onClose(){e=null,Zk()}});Rk(e=>r.send(e));let i=Hk.subscribe(()=>n());return()=>{i.unsubscribe(),t.stop(),zk(),r.close()}}bj([]);for(let e of xj())console.warn(`web plugin '${e.pluginId}' ${e.kind}: ${e.message}`);Ij((e,t)=>(0,N.jsx)(uM,{sessionId:e,threadId:t}));var I8=vO({routeTree:uF});function L8(){return(0,w.useEffect)(()=>{let e=F8(),t=Nj({sendSessionFrame:Bk,sendHubFrame:Vk});return()=>{t(),e()}},[]),(0,N.jsx)(GC,{children:(0,N.jsx)(xO,{router:I8})})}var R8=document.getElementById(`root`);if(!R8)throw Error(`The cockpit needs a #root element.`);EP(),(0,me.createRoot)(R8).render((0,N.jsx)(w.StrictMode,{children:(0,N.jsx)(L8,{})}));
90
+ //# sourceMappingURL=index-DQO7NTIP.js.map