windows-development-sandbox 1.10.0 → 1.11.4

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 (383) hide show
  1. package/README.md +64 -17
  2. package/config.example.json +5 -1
  3. package/dist/app/features/accounts/accounts.def.d.ts +122 -0
  4. package/dist/app/features/accounts/accounts.def.js +243 -0
  5. package/dist/app/features/accounts/accounts.run.d.ts +51 -0
  6. package/dist/app/features/accounts/accounts.run.js +125 -0
  7. package/dist/app/features/accounts/index.d.ts +2 -0
  8. package/dist/app/features/accounts/index.js +3 -0
  9. package/dist/app/features/agents/agent-entry.d.ts +17 -0
  10. package/dist/app/features/agents/agent-entry.js +50 -0
  11. package/dist/app/features/agents/agents.def.d.ts +65 -0
  12. package/dist/app/features/agents/agents.def.js +142 -0
  13. package/dist/app/features/agents/agents.run.d.ts +31 -0
  14. package/dist/app/features/agents/agents.run.js +189 -0
  15. package/dist/app/features/agents/index.d.ts +3 -0
  16. package/dist/app/features/agents/index.js +4 -0
  17. package/dist/app/features/apps/apps-rows.d.ts +31 -0
  18. package/dist/app/features/apps/apps-rows.js +73 -0
  19. package/dist/app/features/apps/apps.def.d.ts +181 -0
  20. package/dist/app/features/apps/apps.def.js +264 -0
  21. package/dist/app/features/apps/apps.run.d.ts +58 -0
  22. package/dist/app/features/apps/apps.run.js +76 -0
  23. package/dist/app/features/apps/index.d.ts +3 -0
  24. package/dist/app/features/apps/index.js +4 -0
  25. package/dist/app/features/data/data.def.d.ts +154 -0
  26. package/dist/app/features/data/data.def.js +194 -0
  27. package/dist/app/features/data/data.run.d.ts +46 -0
  28. package/dist/app/features/data/data.run.js +141 -0
  29. package/dist/app/features/data/index.d.ts +2 -0
  30. package/dist/app/features/data/index.js +3 -0
  31. package/dist/app/features/defs.d.ts +959 -4
  32. package/dist/app/features/defs.js +151 -10
  33. package/dist/app/features/engine/engine.def.d.ts +228 -0
  34. package/dist/app/features/engine/engine.def.js +194 -0
  35. package/dist/app/features/engine/engine.run.d.ts +72 -0
  36. package/dist/app/features/engine/engine.run.js +77 -0
  37. package/dist/app/features/engine/index.d.ts +2 -0
  38. package/dist/app/features/engine/index.js +4 -0
  39. package/dist/app/features/files/files.def.d.ts +51 -0
  40. package/dist/app/features/files/files.def.js +38 -0
  41. package/dist/app/features/files/files.run.d.ts +20 -0
  42. package/dist/app/features/files/files.run.js +59 -0
  43. package/dist/app/features/files/index.d.ts +2 -0
  44. package/dist/app/features/files/index.js +3 -0
  45. package/dist/app/features/github/github.def.d.ts +80 -0
  46. package/dist/app/features/github/github.def.js +142 -0
  47. package/dist/app/features/github/github.run.d.ts +36 -0
  48. package/dist/app/features/github/github.run.js +59 -0
  49. package/dist/app/features/github/index.d.ts +2 -0
  50. package/dist/app/features/github/index.js +3 -0
  51. package/dist/app/features/health/health.def.d.ts +275 -0
  52. package/dist/app/features/health/health.def.js +297 -0
  53. package/dist/app/features/health/health.run.d.ts +125 -0
  54. package/dist/app/features/health/health.run.js +204 -0
  55. package/dist/app/features/health/index.d.ts +2 -0
  56. package/dist/app/features/health/index.js +3 -0
  57. package/dist/app/features/logs/index.d.ts +2 -0
  58. package/dist/app/features/logs/index.js +3 -0
  59. package/dist/app/features/logs/logs.def.d.ts +78 -0
  60. package/dist/app/features/logs/logs.def.js +115 -0
  61. package/dist/app/features/logs/logs.run.d.ts +20 -0
  62. package/dist/app/features/logs/logs.run.js +42 -0
  63. package/dist/app/features/projects/index.d.ts +2 -0
  64. package/dist/app/features/projects/index.js +3 -0
  65. package/dist/app/features/projects/projects.def.d.ts +101 -0
  66. package/dist/app/features/projects/projects.def.js +208 -0
  67. package/dist/app/features/projects/projects.run.d.ts +56 -0
  68. package/dist/app/features/projects/projects.run.js +155 -0
  69. package/dist/app/features/sandbox/sandbox.def.js +11 -5
  70. package/dist/app/features/sessions/sessions.def.js +3 -0
  71. package/dist/app/features/settings/categories.def.js +3 -2
  72. package/dist/{cli/menu/settings/share.d.ts → app/features/settings/settings-share.d.ts} +1 -1
  73. package/dist/{cli/menu/settings/share.js → app/features/settings/settings-share.js} +3 -2
  74. package/dist/app/features/settings/settings.def.d.ts +22 -5
  75. package/dist/app/features/settings/settings.def.js +81 -6
  76. package/dist/app/features/settings/settings.run.d.ts +17 -0
  77. package/dist/app/features/settings/settings.run.js +89 -4
  78. package/dist/app/features/storage/index.d.ts +2 -0
  79. package/dist/app/features/storage/index.js +3 -0
  80. package/dist/app/features/storage/storage.def.d.ts +133 -0
  81. package/dist/app/features/storage/storage.def.js +220 -0
  82. package/dist/app/features/storage/storage.run.d.ts +62 -0
  83. package/dist/app/features/storage/storage.run.js +370 -0
  84. package/dist/app/features/updates/index.d.ts +3 -0
  85. package/dist/app/features/updates/index.js +4 -0
  86. package/dist/app/features/updates/update-lines.d.ts +13 -0
  87. package/dist/app/features/updates/update-lines.js +61 -0
  88. package/dist/app/features/updates/updates.def.d.ts +89 -0
  89. package/dist/app/features/updates/updates.def.js +224 -0
  90. package/dist/app/features/updates/updates.run.d.ts +48 -0
  91. package/dist/app/features/updates/updates.run.js +154 -0
  92. package/dist/app/features/vpn/index.d.ts +2 -0
  93. package/dist/app/features/vpn/index.js +3 -0
  94. package/dist/app/features/vpn/vpn.def.d.ts +112 -0
  95. package/dist/app/features/vpn/vpn.def.js +174 -0
  96. package/dist/app/features/vpn/vpn.run.d.ts +37 -0
  97. package/dist/app/features/vpn/vpn.run.js +54 -0
  98. package/dist/app/features/web/index.d.ts +2 -0
  99. package/dist/app/features/web/index.js +3 -0
  100. package/dist/app/features/web/web.def.d.ts +33 -0
  101. package/dist/app/features/web/web.def.js +90 -0
  102. package/dist/app/features/web/web.run.d.ts +24 -0
  103. package/dist/app/features/web/web.run.js +93 -0
  104. package/dist/app/kernel/define.d.ts +10 -1
  105. package/dist/app/kernel/io.d.ts +34 -0
  106. package/dist/app/kernel/io.js +9 -0
  107. package/dist/app/kernel/rpc.d.ts +17 -0
  108. package/dist/app/kernel/text.d.ts +2 -0
  109. package/dist/app/kernel/text.js +7 -0
  110. package/dist/app/kernel/view.d.ts +24 -1
  111. package/dist/app/kernel/view.js +1 -1
  112. package/dist/app/registry.js +74 -1
  113. package/dist/cli/args.js +1 -1
  114. package/dist/cli/commands/context.d.ts +7 -0
  115. package/dist/cli/commands/context.js +29 -2
  116. package/dist/cli/commands/engine.js +5 -58
  117. package/dist/cli/commands/github.d.ts +2 -0
  118. package/dist/cli/commands/github.js +11 -0
  119. package/dist/cli/commands/index.d.ts +3 -5
  120. package/dist/cli/commands/index.js +3 -5
  121. package/dist/cli/commands/launch/launch.js +21 -4
  122. package/dist/cli/commands/launch/running.js +4 -1
  123. package/dist/cli/commands/maintenance/config.js +1 -6
  124. package/dist/cli/commands/maintenance/index.d.ts +0 -1
  125. package/dist/cli/commands/maintenance/index.js +1 -2
  126. package/dist/cli/commands/maintenance/logs.js +27 -32
  127. package/dist/cli/commands/maintenance/migrate.d.ts +0 -8
  128. package/dist/cli/commands/maintenance/migrate.js +2 -44
  129. package/dist/cli/commands/maintenance/update.d.ts +0 -19
  130. package/dist/cli/commands/maintenance/update.js +1 -99
  131. package/dist/cli/commands/projects/index.d.ts +0 -1
  132. package/dist/cli/commands/projects/index.js +0 -1
  133. package/dist/cli/commands/registry.d.ts +1 -1
  134. package/dist/cli/commands/registry.js +29 -11
  135. package/dist/cli/commands/repair/checks/data.js +1 -1
  136. package/dist/cli/commands/repair/checks/hcs.js +28 -1
  137. package/dist/cli/commands/repair/checks/sandbox.js +1 -1
  138. package/dist/cli/commands/repair/health-run.d.ts +30 -0
  139. package/dist/cli/commands/repair/health-run.js +32 -0
  140. package/dist/cli/commands/repair/printer.d.ts +2 -2
  141. package/dist/cli/commands/repair/printer.js +2 -11
  142. package/dist/cli/commands/repair/run.d.ts +1 -21
  143. package/dist/cli/commands/repair/run.js +13 -70
  144. package/dist/cli/commands/storage/index.d.ts +0 -1
  145. package/dist/cli/commands/storage/index.js +0 -1
  146. package/dist/cli/commands/storage/offer.js +6 -2
  147. package/dist/cli/commands/vpn.d.ts +1 -3
  148. package/dist/cli/commands/vpn.js +8 -89
  149. package/dist/cli/commands/web.d.ts +2 -1
  150. package/dist/cli/commands/web.js +14 -78
  151. package/dist/cli/index.js +3 -2
  152. package/dist/cli/manifest.d.ts +16 -153
  153. package/dist/cli/manifest.js +20 -50
  154. package/dist/cli/menu/command-form.js +1 -2
  155. package/dist/cli/menu/io-menu.d.ts +2 -2
  156. package/dist/cli/menu/io-menu.js +6 -4
  157. package/dist/cli/menu/menu.js +1 -1
  158. package/dist/cli/menu/pages/accounts-page.d.ts +5 -17
  159. package/dist/cli/menu/pages/accounts-page.js +28 -170
  160. package/dist/cli/menu/pages/agents-page.d.ts +17 -18
  161. package/dist/cli/menu/pages/agents-page.js +67 -124
  162. package/dist/cli/menu/pages/apps-page.d.ts +15 -8
  163. package/dist/cli/menu/pages/apps-page.js +121 -29
  164. package/dist/cli/menu/pages/list-page.js +10 -1
  165. package/dist/cli/menu/pages/maintenance-page.d.ts +51 -52
  166. package/dist/cli/menu/pages/maintenance-page.js +246 -427
  167. package/dist/cli/menu/pages/sandbox-page.d.ts +3 -5
  168. package/dist/cli/menu/pages/sandbox-page.js +34 -112
  169. package/dist/cli/menu/pages/settings-page.d.ts +21 -3
  170. package/dist/cli/menu/pages/settings-page.js +89 -17
  171. package/dist/cli/menu/render-view.js +2 -1
  172. package/dist/cli/menu/settings/index.d.ts +0 -1
  173. package/dist/cli/menu/settings/index.js +3 -3
  174. package/dist/cli/menu/views.js +28 -0
  175. package/dist/cli/operations/handler.js +7 -3
  176. package/dist/cli/operations/input.d.ts +1 -1
  177. package/dist/cli/operations/input.js +29 -5
  178. package/dist/cli/operations/io-cli.js +9 -1
  179. package/dist/cli/operations/spec.js +8 -2
  180. package/dist/cli/output/render-view.js +2 -0
  181. package/dist/cli/{commands/data/collect.js → services/data-collect.js} +2 -2
  182. package/dist/cli/{commands/data/remove.js → services/data-remove.js} +2 -2
  183. package/dist/cli/services/data-service.d.ts +1 -1
  184. package/dist/cli/services/data-service.js +2 -2
  185. package/dist/cli/services/databases-service.d.ts +5 -0
  186. package/dist/cli/services/databases-service.js +15 -0
  187. package/dist/cli/services/health-service.d.ts +8 -4
  188. package/dist/cli/services/health-service.js +10 -8
  189. package/dist/cli/services/index.d.ts +4 -1
  190. package/dist/cli/services/index.js +4 -1
  191. package/dist/cli/services/logs-service.d.ts +7 -0
  192. package/dist/cli/services/logs-service.js +13 -0
  193. package/dist/cli/services/storage-service.d.ts +19 -0
  194. package/dist/cli/services/storage-service.js +71 -0
  195. package/dist/cli/services/vpn-service.d.ts +6 -4
  196. package/dist/cli/services/vpn-service.js +5 -11
  197. package/dist/cli/services/web-service.d.ts +4 -3
  198. package/dist/cli/services/web-service.js +12 -32
  199. package/dist/core/config/defaults.js +2 -1
  200. package/dist/core/schema/config.d.ts +5 -0
  201. package/dist/core/schema/config.js +2 -0
  202. package/dist/core/schema/github.d.ts +4 -0
  203. package/dist/core/schema/github.js +7 -0
  204. package/dist/core/schema/index.d.ts +1 -0
  205. package/dist/core/schema/index.js +1 -0
  206. package/dist/core/schema/profile.d.ts +1 -0
  207. package/dist/core/schema/profile.js +3 -0
  208. package/dist/core/schema/sandbox.js +3 -3
  209. package/dist/core/schema/toolchains.js +2 -2
  210. package/dist/core/types.d.ts +6 -3
  211. package/dist/guest/boot/boot.js +8 -0
  212. package/dist/guest/daemon/daemon.js +1 -1
  213. package/dist/guest/daemon/sessions.d.ts +3 -2
  214. package/dist/guest/daemon/sessions.js +38 -7
  215. package/dist/guest/governor/core.d.ts +44 -0
  216. package/dist/guest/governor/core.js +124 -0
  217. package/dist/guest/governor/decide.d.ts +46 -18
  218. package/dist/guest/governor/decide.js +136 -82
  219. package/dist/guest/governor/governor.d.ts +2 -38
  220. package/dist/guest/governor/governor.js +33 -113
  221. package/dist/guest/governor/index.d.ts +1 -0
  222. package/dist/guest/governor/index.js +1 -0
  223. package/dist/guest/network/firewall.d.ts +2 -0
  224. package/dist/guest/network/firewall.js +3 -3
  225. package/dist/guest/sessions/viewer.js +5 -1
  226. package/dist/guest/setup/github-token.d.ts +7 -0
  227. package/dist/guest/setup/github-token.js +65 -0
  228. package/dist/guest/toolchains/languages/node.js +11 -1
  229. package/dist/guest/toolchains/native/rust-extras.js +2 -2
  230. package/dist/guest/toolchains/tools/cli.d.ts +8 -0
  231. package/dist/guest/toolchains/tools/cli.js +35 -2
  232. package/dist/guest/vpn/openvpn.d.ts +5 -0
  233. package/dist/guest/vpn/openvpn.js +14 -1
  234. package/dist/guest/vpn/vpn.js +55 -16
  235. package/dist/guest/vpn/wireguard.js +2 -0
  236. package/dist/host/channel/attach.d.ts +1 -0
  237. package/dist/host/channel/attach.js +1 -0
  238. package/dist/host/channel/channel.d.ts +1 -1
  239. package/dist/host/channel/channel.js +2 -2
  240. package/dist/host/engines/hcs/check.d.ts +1 -0
  241. package/dist/host/engines/hcs/check.js +1 -1
  242. package/dist/host/engines/hcs/engine.d.ts +1 -1
  243. package/dist/host/engines/hcs/engine.js +6 -4
  244. package/dist/host/engines/hcs/helper.d.ts +11 -0
  245. package/dist/host/engines/hcs/helper.js +31 -2
  246. package/dist/host/engines/hcs/leftovers.d.ts +42 -0
  247. package/dist/host/engines/hcs/leftovers.js +101 -0
  248. package/dist/host/engines/index.d.ts +1 -0
  249. package/dist/host/engines/index.js +1 -0
  250. package/dist/host/github/deliver.d.ts +13 -0
  251. package/dist/host/github/deliver.js +51 -0
  252. package/dist/host/github/index.d.ts +2 -0
  253. package/dist/host/github/index.js +3 -0
  254. package/dist/host/github/token.d.ts +21 -0
  255. package/dist/host/github/token.js +74 -0
  256. package/dist/host/launch/generate.js +11 -5
  257. package/dist/host/launch/index.d.ts +1 -1
  258. package/dist/host/launch/index.js +1 -1
  259. package/dist/host/launch/session-file.js +1 -2
  260. package/dist/host/launch/wsb-file.d.ts +11 -7
  261. package/dist/host/launch/wsb-file.js +30 -12
  262. package/dist/host/life/host-memory.d.ts +18 -0
  263. package/dist/host/life/host-memory.js +66 -0
  264. package/dist/host/life/watchdog.d.ts +9 -0
  265. package/dist/host/life/watchdog.js +17 -1
  266. package/dist/host/sandbox/tasklist.d.ts +6 -0
  267. package/dist/host/sandbox/tasklist.js +37 -0
  268. package/dist/host/secrets/launch-secrets.d.ts +2 -1
  269. package/dist/host/secrets/launch-secrets.js +4 -2
  270. package/dist/host/vpn/status.js +13 -3
  271. package/dist/host/web/backend.d.ts +1 -3
  272. package/dist/host/web/index.d.ts +2 -1
  273. package/dist/host/web/index.js +2 -1
  274. package/dist/host/web/live.d.ts +23 -0
  275. package/dist/host/web/live.js +107 -0
  276. package/dist/host/web/rpc.d.ts +6 -1
  277. package/dist/host/web/rpc.js +23 -31
  278. package/dist/host/web/runner.d.ts +4 -0
  279. package/dist/host/web/runner.js +12 -1
  280. package/dist/host/web/server.d.ts +30 -2
  281. package/dist/host/web/server.js +87 -29
  282. package/dist/host/web/state.d.ts +1 -0
  283. package/dist/host/web/state.js +2 -0
  284. package/dist/runtime/agent.js +30 -6
  285. package/dist/runtime/daemon.js +337 -177
  286. package/dist/runtime/db.js +30 -6
  287. package/dist/runtime/main.js +389 -77
  288. package/dist/runtime/netproxy.js +30 -6
  289. package/dist/runtime/view.js +495 -146
  290. package/dist/selftest/app.test.js +632 -12
  291. package/dist/selftest/channel.test.js +18 -1
  292. package/dist/selftest/cli.test.js +1 -1
  293. package/dist/selftest/config.test.js +1 -1
  294. package/dist/selftest/contained.test.js +1 -1
  295. package/dist/selftest/data.test.js +1 -2
  296. package/dist/selftest/engine.test.js +3 -1
  297. package/dist/selftest/github.test.d.ts +2 -0
  298. package/dist/selftest/github.test.js +243 -0
  299. package/dist/selftest/hcs.test.js +105 -8
  300. package/dist/selftest/health.test.js +71 -0
  301. package/dist/selftest/heavy-load.test.js +132 -72
  302. package/dist/selftest/index.js +4 -0
  303. package/dist/selftest/layout.test.js +8 -0
  304. package/dist/selftest/live-terminal.test.js +74 -0
  305. package/dist/selftest/menu-screens.js +171 -56
  306. package/dist/selftest/menu.test.js +54 -37
  307. package/dist/selftest/migrate.test.js +14 -12
  308. package/dist/selftest/powershell-variables.test.d.ts +2 -0
  309. package/dist/selftest/powershell-variables.test.js +61 -0
  310. package/dist/selftest/support/engine-golden.js +1 -0
  311. package/dist/selftest/support/fixtures.d.ts +4 -0
  312. package/dist/selftest/support/web-preview.d.ts +1 -0
  313. package/dist/selftest/support/web-preview.js +856 -0
  314. package/dist/selftest/update-service.test.js +15 -8
  315. package/dist/selftest/vpn.test.js +86 -2
  316. package/dist/selftest/web.test.js +58 -11
  317. package/dist/shared/channel/run-dir.d.ts +2 -0
  318. package/dist/shared/channel/run-dir.js +3 -0
  319. package/dist/shared/channel/schema.d.ts +7 -0
  320. package/dist/shared/channel/schema.js +9 -1
  321. package/dist/shared/channel/secrets.d.ts +1 -0
  322. package/dist/shared/channel/secrets.js +3 -0
  323. package/dist/shared/github/index.d.ts +1 -0
  324. package/dist/shared/github/index.js +2 -0
  325. package/dist/shared/github/token.d.ts +29 -0
  326. package/dist/shared/github/token.js +89 -0
  327. package/dist/shared/memory/policy.d.ts +33 -12
  328. package/dist/shared/memory/policy.js +50 -19
  329. package/dist/shared/pty/ctrl-c.d.ts +18 -0
  330. package/dist/shared/pty/ctrl-c.js +36 -0
  331. package/dist/shared/pty/index.d.ts +1 -0
  332. package/dist/shared/pty/index.js +1 -0
  333. package/dist/shared/pty/terminal.d.ts +2 -0
  334. package/dist/shared/pty/terminal.js +21 -2
  335. package/dist/shared/vpn/kill-switch.d.ts +13 -2
  336. package/dist/shared/vpn/kill-switch.js +88 -8
  337. package/dist/shared/web/protocol.d.ts +0 -4
  338. package/dist/sync/watcher.d.ts +2 -0
  339. package/dist/sync/watcher.js +8 -3
  340. package/dist/web/index.html +2 -2
  341. package/dist/web/{main-T5DMCHYV.css → main-MU5XWZMS.css} +1 -1
  342. package/dist/web/main-SLQNJRXD.js +219 -0
  343. package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
  344. package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
  345. package/native/csharp/HostTools/MemoryStatus.cs +58 -2
  346. package/native/csharp/HostTools/Program.cs +7 -1
  347. package/package.json +10 -3
  348. package/sandbox/csharp/MemGov.cs +240 -38
  349. package/sandbox/csharp/PtyHost.cs +104 -15
  350. package/sandbox/csharp/SandboxTools/CpuCap.cs +50 -1
  351. package/sandbox/csharp/SandboxTools/Program.cs +1 -1
  352. package/sandbox/scripts/repair-wmi-services.ps1 +26 -0
  353. package/schemas/config.schema.json +19 -5
  354. package/schemas/sandbox-config.schema.json +7 -3
  355. package/dist/cli/commands/accounts.d.ts +0 -2
  356. package/dist/cli/commands/accounts.js +0 -96
  357. package/dist/cli/commands/data/clean.d.ts +0 -3
  358. package/dist/cli/commands/data/clean.js +0 -60
  359. package/dist/cli/commands/data/index.d.ts +0 -4
  360. package/dist/cli/commands/data/index.js +0 -62
  361. package/dist/cli/commands/maintenance/clean.d.ts +0 -2
  362. package/dist/cli/commands/maintenance/clean.js +0 -24
  363. package/dist/cli/commands/maintenance/config-share.d.ts +0 -12
  364. package/dist/cli/commands/maintenance/config-share.js +0 -80
  365. package/dist/cli/commands/projects/projects.d.ts +0 -2
  366. package/dist/cli/commands/projects/projects.js +0 -162
  367. package/dist/cli/commands/storage/contained.d.ts +0 -3
  368. package/dist/cli/commands/storage/contained.js +0 -179
  369. package/dist/cli/commands/storage/storage.d.ts +0 -8
  370. package/dist/cli/commands/storage/storage.js +0 -179
  371. package/dist/cli/menu/add-agent.d.ts +0 -47
  372. package/dist/cli/menu/add-agent.js +0 -168
  373. package/dist/cli/menu/apps.d.ts +0 -69
  374. package/dist/cli/menu/apps.js +0 -214
  375. package/dist/cli/menu/data-folder.d.ts +0 -18
  376. package/dist/cli/menu/data-folder.js +0 -99
  377. package/dist/cli/menu/share-settings.d.ts +0 -21
  378. package/dist/cli/menu/share-settings.js +0 -112
  379. package/dist/cli/menu/vpn-login.d.ts +0 -16
  380. package/dist/cli/menu/vpn-login.js +0 -74
  381. package/dist/web/main-NRRS5O6Z.js +0 -157
  382. /package/dist/cli/{commands/data/collect.d.ts → services/data-collect.d.ts} +0 -0
  383. /package/dist/cli/{commands/data/remove.d.ts → services/data-remove.d.ts} +0 -0
@@ -0,0 +1,219 @@
1
+ var Bte=Object.create;var Yb=Object.defineProperty;var jte=Object.getOwnPropertyDescriptor;var Ute=Object.getOwnPropertyNames;var Vte=Object.getPrototypeOf,Hte=Object.prototype.hasOwnProperty;var UN=e=>{throw TypeError(e)};var Wte=(e,t,r)=>t in e?Yb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ma=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},gs=(e,t)=>{for(var r in t)Yb(e,r,{get:t[r],enumerable:!0})},Zte=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ute(t))!Hte.call(e,o)&&o!==r&&Yb(e,o,{get:()=>t[o],enumerable:!(n=jte(t,o))||n.enumerable});return e};var y=(e,t,r)=>(r=e!=null?Bte(Vte(e)):{},Zte(t||!e||!e.__esModule?Yb(r,"default",{value:e,enumerable:!0}):r,e));var Et=(e,t,r)=>Wte(e,typeof t!="symbol"?t+"":t,r),UC=(e,t,r)=>t.has(e)||UN("Cannot "+r);var L=(e,t,r)=>(UC(e,t,"read from private field"),r?r.call(e):t.get(e)),Pe=(e,t,r)=>t.has(e)?UN("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(UC(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),tt=(e,t,r)=>(UC(e,t,"access private method"),r);var kh=(e,t,r,n)=>({set _(o){fe(e,t,o,r)},get _(){return L(e,t,n)}});var tF=ma(it=>{"use strict";var Ch=Symbol.for("react.element"),Gte=Symbol.for("react.portal"),qte=Symbol.for("react.fragment"),Kte=Symbol.for("react.strict_mode"),Xte=Symbol.for("react.profiler"),Qte=Symbol.for("react.provider"),Yte=Symbol.for("react.context"),Jte=Symbol.for("react.forward_ref"),ere=Symbol.for("react.suspense"),tre=Symbol.for("react.memo"),rre=Symbol.for("react.lazy"),HN=Symbol.iterator;function ore(e){return e===null||typeof e!="object"?null:(e=HN&&e[HN]||e["@@iterator"],typeof e=="function"?e:null)}var GN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qN=Object.assign,KN={};function lf(e,t,r){this.props=e,this.context=t,this.refs=KN,this.updater=r||GN}lf.prototype.isReactComponent={};lf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};lf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function XN(){}XN.prototype=lf.prototype;function HC(e,t,r){this.props=e,this.context=t,this.refs=KN,this.updater=r||GN}var WC=HC.prototype=new XN;WC.constructor=HC;qN(WC,lf.prototype);WC.isPureReactComponent=!0;var WN=Array.isArray,QN=Object.prototype.hasOwnProperty,ZC={current:null},YN={key:!0,ref:!0,__self:!0,__source:!0};function JN(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)QN.call(t,n)&&!YN.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:Ch,type:e,key:i,ref:a,props:o,_owner:ZC.current}}function nre(e,t){return{$$typeof:Ch,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function GC(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ch}function ire(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ZN=/\/+/g;function VC(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ire(""+e.key):t.toString(36)}function ty(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ch:case Gte:a=!0}}if(a)return a=e,o=o(a),e=n===""?"."+VC(a,0):n,WN(o)?(r="",e!=null&&(r=e.replace(ZN,"$&/")+"/"),ty(o,t,r,"",function(c){return c})):o!=null&&(GC(o)&&(o=nre(o,r+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(ZN,"$&/")+"/")+e)),t.push(o)),1;if(a=0,n=n===""?".":n+":",WN(e))for(var s=0;s<e.length;s++){i=e[s];var l=n+VC(i,s);a+=ty(i,t,r,l,o)}else if(l=ore(e),typeof l=="function")for(e=l.call(e),s=0;!(i=e.next()).done;)i=i.value,l=n+VC(i,s++),a+=ty(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function ey(e,t,r){if(e==null)return e;var n=[],o=0;return ty(e,n,"","",function(i){return t.call(r,i,o++)}),n}function are(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lo={current:null},ry={transition:null},sre={ReactCurrentDispatcher:Lo,ReactCurrentBatchConfig:ry,ReactCurrentOwner:ZC};function eF(){throw Error("act(...) is not supported in production builds of React.")}it.Children={map:ey,forEach:function(e,t,r){ey(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ey(e,function(){t++}),t},toArray:function(e){return ey(e,function(t){return t})||[]},only:function(e){if(!GC(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};it.Component=lf;it.Fragment=qte;it.Profiler=Xte;it.PureComponent=HC;it.StrictMode=Kte;it.Suspense=ere;it.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sre;it.act=eF;it.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=qN({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=ZC.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)QN.call(t,l)&&!YN.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:Ch,type:e.type,key:o,ref:i,props:n,_owner:a}};it.createContext=function(e){return e={$$typeof:Yte,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Qte,_context:e},e.Consumer=e};it.createElement=JN;it.createFactory=function(e){var t=JN.bind(null,e);return t.type=e,t};it.createRef=function(){return{current:null}};it.forwardRef=function(e){return{$$typeof:Jte,render:e}};it.isValidElement=GC;it.lazy=function(e){return{$$typeof:rre,_payload:{_status:-1,_result:e},_init:are}};it.memo=function(e,t){return{$$typeof:tre,type:e,compare:t===void 0?null:t}};it.startTransition=function(e){var t=ry.transition;ry.transition={};try{e()}finally{ry.transition=t}};it.unstable_act=eF;it.useCallback=function(e,t){return Lo.current.useCallback(e,t)};it.useContext=function(e){return Lo.current.useContext(e)};it.useDebugValue=function(){};it.useDeferredValue=function(e){return Lo.current.useDeferredValue(e)};it.useEffect=function(e,t){return Lo.current.useEffect(e,t)};it.useId=function(){return Lo.current.useId()};it.useImperativeHandle=function(e,t,r){return Lo.current.useImperativeHandle(e,t,r)};it.useInsertionEffect=function(e,t){return Lo.current.useInsertionEffect(e,t)};it.useLayoutEffect=function(e,t){return Lo.current.useLayoutEffect(e,t)};it.useMemo=function(e,t){return Lo.current.useMemo(e,t)};it.useReducer=function(e,t,r){return Lo.current.useReducer(e,t,r)};it.useRef=function(e){return Lo.current.useRef(e)};it.useState=function(e){return Lo.current.useState(e)};it.useSyncExternalStore=function(e,t,r){return Lo.current.useSyncExternalStore(e,t,r)};it.useTransition=function(){return Lo.current.useTransition()};it.version="18.3.1"});var R=ma((b1e,rF)=>{"use strict";rF.exports=tF()});var kF=ma(cy=>{"use strict";var Ere=R(),Tre=Symbol.for("react.element"),$re=Symbol.for("react.fragment"),Are=Object.prototype.hasOwnProperty,Ore=Ere.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zre={key:!0,ref:!0,__self:!0,__source:!0};function SF(e,t,r){var n,o={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)Are.call(t,n)&&!zre.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:Tre,type:e,key:i,ref:a,props:o,_owner:Ore.current}}cy.Fragment=$re;cy.jsx=SF;cy.jsxs=SF});var O=ma((Nke,CF)=>{"use strict";CF.exports=kF()});var yM=ma(Ot=>{"use strict";function B2(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<Ty(o,t))e[n]=t,e[r]=o,r=n;else break e}}function Bi(e){return e.length===0?null:e[0]}function Ay(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var a=2*(n+1)-1,s=e[a],l=a+1,c=e[l];if(0>Ty(s,r))l<o&&0>Ty(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[a]=r,n=a);else if(l<o&&0>Ty(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function Ty(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(uM=performance,Ot.unstable_now=function(){return uM.now()}):(F2=Date,fM=F2.now(),Ot.unstable_now=function(){return F2.now()-fM});var uM,F2,fM,ba=[],Rl=[],koe=1,ti=null,wo=3,Oy=!1,vd=!1,Gh=!1,hM=typeof setTimeout=="function"?setTimeout:null,gM=typeof clearTimeout=="function"?clearTimeout:null,mM=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j2(e){for(var t=Bi(Rl);t!==null;){if(t.callback===null)Ay(Rl);else if(t.startTime<=e)Ay(Rl),t.sortIndex=t.expirationTime,B2(ba,t);else break;t=Bi(Rl)}}function U2(e){if(Gh=!1,j2(e),!vd)if(Bi(ba)!==null)vd=!0,H2(V2);else{var t=Bi(Rl);t!==null&&W2(U2,t.startTime-e)}}function V2(e,t){vd=!1,Gh&&(Gh=!1,gM(qh),qh=-1),Oy=!0;var r=wo;try{for(j2(t),ti=Bi(ba);ti!==null&&(!(ti.expirationTime>t)||e&&!bM());){var n=ti.callback;if(typeof n=="function"){ti.callback=null,wo=ti.priorityLevel;var o=n(ti.expirationTime<=t);t=Ot.unstable_now(),typeof o=="function"?ti.callback=o:ti===Bi(ba)&&Ay(ba),j2(t)}else Ay(ba);ti=Bi(ba)}if(ti!==null)var i=!0;else{var a=Bi(Rl);a!==null&&W2(U2,a.startTime-t),i=!1}return i}finally{ti=null,wo=r,Oy=!1}}var zy=!1,$y=null,qh=-1,vM=5,xM=-1;function bM(){return!(Ot.unstable_now()-xM<vM)}function L2(){if($y!==null){var e=Ot.unstable_now();xM=e;var t=!0;try{t=$y(!0,e)}finally{t?Zh():(zy=!1,$y=null)}}else zy=!1}var Zh;typeof mM=="function"?Zh=function(){mM(L2)}:typeof MessageChannel<"u"?(M2=new MessageChannel,pM=M2.port2,M2.port1.onmessage=L2,Zh=function(){pM.postMessage(null)}):Zh=function(){hM(L2,0)};var M2,pM;function H2(e){$y=e,zy||(zy=!0,Zh())}function W2(e,t){qh=hM(function(){e(Ot.unstable_now())},t)}Ot.unstable_IdlePriority=5;Ot.unstable_ImmediatePriority=1;Ot.unstable_LowPriority=4;Ot.unstable_NormalPriority=3;Ot.unstable_Profiling=null;Ot.unstable_UserBlockingPriority=2;Ot.unstable_cancelCallback=function(e){e.callback=null};Ot.unstable_continueExecution=function(){vd||Oy||(vd=!0,H2(V2))};Ot.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"):vM=0<e?Math.floor(1e3/e):5};Ot.unstable_getCurrentPriorityLevel=function(){return wo};Ot.unstable_getFirstCallbackNode=function(){return Bi(ba)};Ot.unstable_next=function(e){switch(wo){case 1:case 2:case 3:var t=3;break;default:t=wo}var r=wo;wo=t;try{return e()}finally{wo=r}};Ot.unstable_pauseExecution=function(){};Ot.unstable_requestPaint=function(){};Ot.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=wo;wo=e;try{return t()}finally{wo=r}};Ot.unstable_scheduleCallback=function(e,t,r){var n=Ot.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:koe++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,B2(Rl,e),Bi(ba)===null&&e===Bi(Rl)&&(Gh?(gM(qh),qh=-1):Gh=!0,W2(U2,r-n))):(e.sortIndex=o,B2(ba,e),vd||Oy||(vd=!0,H2(V2))),e};Ot.unstable_shouldYield=bM;Ot.unstable_wrapCallback=function(e){var t=wo;return function(){var r=wo;wo=t;try{return e.apply(this,arguments)}finally{wo=r}}}});var IM=ma((fRe,_M)=>{"use strict";_M.exports=yM()});var C8=ma(Un=>{"use strict";var Coe=R(),Bn=IM();function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var RB=new Set,gg={};function Ed(e,t){Wf(e,t),Wf(e+"Capture",t)}function Wf(e,t){for(gg[e]=t,e=0;e<t.length;e++)RB.add(t[e])}var Ps=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pP=Object.prototype.hasOwnProperty,Poe=/^[: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]*$/,wM={},SM={};function Doe(e){return pP.call(SM,e)?!0:pP.call(wM,e)?!1:Poe.test(e)?SM[e]=!0:(wM[e]=!0,!1)}function Roe(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Eoe(e,t,r,n){if(t===null||typeof t>"u"||Roe(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Uo(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var co={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){co[e]=new Uo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];co[t]=new Uo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){co[e]=new Uo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){co[e]=new Uo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){co[e]=new Uo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){co[e]=new Uo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){co[e]=new Uo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){co[e]=new Uo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){co[e]=new Uo(e,5,!1,e.toLowerCase(),null,!1,!1)});var a4=/[\-:]([a-z])/g;function s4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(a4,s4);co[t]=new Uo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(a4,s4);co[t]=new Uo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(a4,s4);co[t]=new Uo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){co[e]=new Uo(e,1,!1,e.toLowerCase(),null,!1,!1)});co.xlinkHref=new Uo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){co[e]=new Uo(e,1,!1,e.toLowerCase(),null,!0,!0)});function l4(e,t,r,n){var o=co.hasOwnProperty(t)?co[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Eoe(t,r,o,n)&&(r=null),n||o===null?Doe(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ts=Coe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ny=Symbol.for("react.element"),Pf=Symbol.for("react.portal"),Df=Symbol.for("react.fragment"),c4=Symbol.for("react.strict_mode"),hP=Symbol.for("react.profiler"),EB=Symbol.for("react.provider"),TB=Symbol.for("react.context"),d4=Symbol.for("react.forward_ref"),gP=Symbol.for("react.suspense"),vP=Symbol.for("react.suspense_list"),u4=Symbol.for("react.memo"),Tl=Symbol.for("react.lazy"),$B=Symbol.for("react.offscreen"),kM=Symbol.iterator;function Kh(e){return e===null||typeof e!="object"?null:(e=kM&&e[kM]||e["@@iterator"],typeof e=="function"?e:null)}var lr=Object.assign,Z2;function og(e){if(Z2===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Z2=t&&t[1]||""}return`
2
+ `+Z2+e}var G2=!1;function q2(e,t){if(!e||G2)return"";G2=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var o=c.stack.split(`
3
+ `),i=n.stack.split(`
4
+ `),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(a!==1||s!==1)do if(a--,s--,0>s||o[a]!==i[s]){var l=`
5
+ `+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{G2=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?og(e):""}function Toe(e){switch(e.tag){case 5:return og(e.type);case 16:return og("Lazy");case 13:return og("Suspense");case 19:return og("SuspenseList");case 0:case 2:case 15:return e=q2(e.type,!1),e;case 11:return e=q2(e.type.render,!1),e;case 1:return e=q2(e.type,!0),e;default:return""}}function xP(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Df:return"Fragment";case Pf:return"Portal";case hP:return"Profiler";case c4:return"StrictMode";case gP:return"Suspense";case vP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case TB:return(e.displayName||"Context")+".Consumer";case EB:return(e._context.displayName||"Context")+".Provider";case d4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case u4:return t=e.displayName||null,t!==null?t:xP(e.type)||"Memo";case Tl:t=e._payload,e=e._init;try{return xP(e(t))}catch{}}return null}function $oe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xP(t);case 8:return t===c4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Wl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function AB(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Aoe(e){var t=AB(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fy(e){e._valueTracker||(e._valueTracker=Aoe(e))}function OB(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=AB(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function u_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bP(e,t){var r=t.checked;return lr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function CM(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Wl(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zB(e,t){t=t.checked,t!=null&&l4(e,"checked",t,!1)}function yP(e,t){zB(e,t);var r=Wl(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?_P(e,t.type,r):t.hasOwnProperty("defaultValue")&&_P(e,t.type,Wl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function PM(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function _P(e,t,r){(t!=="number"||u_(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ng=Array.isArray;function Mf(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Wl(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function IP(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return lr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function DM(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ie(92));if(ng(r)){if(1<r.length)throw Error(ie(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Wl(r)}}function NB(e,t){var r=Wl(t.value),n=Wl(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function RM(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function FB(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function wP(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?FB(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ly,LB=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ly=Ly||document.createElement("div"),Ly.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ly.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function vg(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var sg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ooe=["Webkit","ms","Moz","O"];Object.keys(sg).forEach(function(e){Ooe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sg[t]=sg[e]})});function MB(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||sg.hasOwnProperty(e)&&sg[e]?(""+t).trim():t+"px"}function BB(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=MB(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var zoe=lr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function SP(e,t){if(t){if(zoe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function kP(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var CP=null;function f4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var PP=null,Bf=null,jf=null;function EM(e){if(e=zg(e)){if(typeof PP!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=M_(t),PP(e.stateNode,e.type,t))}}function jB(e){Bf?jf?jf.push(e):jf=[e]:Bf=e}function UB(){if(Bf){var e=Bf,t=jf;if(jf=Bf=null,EM(e),t)for(e=0;e<t.length;e++)EM(t[e])}}function VB(e,t){return e(t)}function HB(){}var K2=!1;function WB(e,t,r){if(K2)return e(t,r);K2=!0;try{return VB(e,t,r)}finally{K2=!1,(Bf!==null||jf!==null)&&(HB(),UB())}}function xg(e,t){var r=e.stateNode;if(r===null)return null;var n=M_(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(ie(231,t,typeof r));return r}var DP=!1;if(Ps)try{kf={},Object.defineProperty(kf,"passive",{get:function(){DP=!0}}),window.addEventListener("test",kf,kf),window.removeEventListener("test",kf,kf)}catch{DP=!1}var kf;function Noe(e,t,r,n,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var lg=!1,f_=null,m_=!1,RP=null,Foe={onError:function(e){lg=!0,f_=e}};function Loe(e,t,r,n,o,i,a,s,l){lg=!1,f_=null,Noe.apply(Foe,arguments)}function Moe(e,t,r,n,o,i,a,s,l){if(Loe.apply(this,arguments),lg){if(lg){var c=f_;lg=!1,f_=null}else throw Error(ie(198));m_||(m_=!0,RP=c)}}function Td(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ZB(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 TM(e){if(Td(e)!==e)throw Error(ie(188))}function Boe(e){var t=e.alternate;if(!t){if(t=Td(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return TM(o),e;if(i===n)return TM(o),t;i=i.sibling}throw Error(ie(188))}if(r.return!==n.return)r=o,n=i;else{for(var a=!1,s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a)throw Error(ie(189))}}if(r.alternate!==n)throw Error(ie(190))}if(r.tag!==3)throw Error(ie(188));return r.stateNode.current===r?e:t}function GB(e){return e=Boe(e),e!==null?qB(e):null}function qB(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=qB(e);if(t!==null)return t;e=e.sibling}return null}var KB=Bn.unstable_scheduleCallback,$M=Bn.unstable_cancelCallback,joe=Bn.unstable_shouldYield,Uoe=Bn.unstable_requestPaint,_r=Bn.unstable_now,Voe=Bn.unstable_getCurrentPriorityLevel,m4=Bn.unstable_ImmediatePriority,XB=Bn.unstable_UserBlockingPriority,p_=Bn.unstable_NormalPriority,Hoe=Bn.unstable_LowPriority,QB=Bn.unstable_IdlePriority,z_=null,wa=null;function Woe(e){if(wa&&typeof wa.onCommitFiberRoot=="function")try{wa.onCommitFiberRoot(z_,e,void 0,(e.current.flags&128)===128)}catch{}}var Wi=Math.clz32?Math.clz32:qoe,Zoe=Math.log,Goe=Math.LN2;function qoe(e){return e>>>=0,e===0?32:31-(Zoe(e)/Goe|0)|0}var My=64,By=4194304;function ig(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function h_(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=ig(s):(i&=a,i!==0&&(n=ig(i)))}else a=r&~o,a!==0?n=ig(a):i!==0&&(n=ig(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Wi(t),o=1<<r,n|=e[r],t&=~o;return n}function Koe(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xoe(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Wi(i),s=1<<a,l=o[a];l===-1?((s&r)===0||(s&n)!==0)&&(o[a]=Koe(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}function EP(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function YB(){var e=My;return My<<=1,(My&4194240)===0&&(My=64),e}function X2(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ag(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wi(t),e[t]=r}function Qoe(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Wi(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function p4(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Wi(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var St=0;function JB(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var e7,h4,t7,r7,o7,TP=!1,jy=[],Fl=null,Ll=null,Ml=null,bg=new Map,yg=new Map,Al=[],Yoe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function AM(e,t){switch(e){case"focusin":case"focusout":Fl=null;break;case"dragenter":case"dragleave":Ll=null;break;case"mouseover":case"mouseout":Ml=null;break;case"pointerover":case"pointerout":bg.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yg.delete(t.pointerId)}}function Xh(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=zg(t),t!==null&&h4(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Joe(e,t,r,n,o){switch(t){case"focusin":return Fl=Xh(Fl,e,t,r,n,o),!0;case"dragenter":return Ll=Xh(Ll,e,t,r,n,o),!0;case"mouseover":return Ml=Xh(Ml,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return bg.set(i,Xh(bg.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,yg.set(i,Xh(yg.get(i)||null,e,t,r,n,o)),!0}return!1}function n7(e){var t=yd(e.target);if(t!==null){var r=Td(t);if(r!==null){if(t=r.tag,t===13){if(t=ZB(r),t!==null){e.blockedOn=t,o7(e.priority,function(){t7(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function t_(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=$P(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);CP=n,r.target.dispatchEvent(n),CP=null}else return t=zg(r),t!==null&&h4(t),e.blockedOn=r,!1;t.shift()}return!0}function OM(e,t,r){t_(e)&&r.delete(t)}function ene(){TP=!1,Fl!==null&&t_(Fl)&&(Fl=null),Ll!==null&&t_(Ll)&&(Ll=null),Ml!==null&&t_(Ml)&&(Ml=null),bg.forEach(OM),yg.forEach(OM)}function Qh(e,t){e.blockedOn===t&&(e.blockedOn=null,TP||(TP=!0,Bn.unstable_scheduleCallback(Bn.unstable_NormalPriority,ene)))}function _g(e){function t(o){return Qh(o,e)}if(0<jy.length){Qh(jy[0],e);for(var r=1;r<jy.length;r++){var n=jy[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Fl!==null&&Qh(Fl,e),Ll!==null&&Qh(Ll,e),Ml!==null&&Qh(Ml,e),bg.forEach(t),yg.forEach(t),r=0;r<Al.length;r++)n=Al[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Al.length&&(r=Al[0],r.blockedOn===null);)n7(r),r.blockedOn===null&&Al.shift()}var Uf=Ts.ReactCurrentBatchConfig,g_=!0;function tne(e,t,r,n){var o=St,i=Uf.transition;Uf.transition=null;try{St=1,g4(e,t,r,n)}finally{St=o,Uf.transition=i}}function rne(e,t,r,n){var o=St,i=Uf.transition;Uf.transition=null;try{St=4,g4(e,t,r,n)}finally{St=o,Uf.transition=i}}function g4(e,t,r,n){if(g_){var o=$P(e,t,r,n);if(o===null)oP(e,t,n,v_,r),AM(e,n);else if(Joe(o,e,t,r,n))n.stopPropagation();else if(AM(e,n),t&4&&-1<Yoe.indexOf(e)){for(;o!==null;){var i=zg(o);if(i!==null&&e7(i),i=$P(e,t,r,n),i===null&&oP(e,t,n,v_,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else oP(e,t,n,null,r)}}var v_=null;function $P(e,t,r,n){if(v_=null,e=f4(n),e=yd(e),e!==null)if(t=Td(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ZB(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return v_=e,null}function i7(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Voe()){case m4:return 1;case XB:return 4;case p_:case Hoe:return 16;case QB:return 536870912;default:return 16}default:return 16}}var zl=null,v4=null,r_=null;function a7(){if(r_)return r_;var e,t=v4,r=t.length,n,o="value"in zl?zl.value:zl.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===o[i-n];n++);return r_=o.slice(e,1<n?1-n:void 0)}function o_(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 Uy(){return!0}function zM(){return!1}function jn(e){function t(r,n,o,i,a){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Uy:zM,this.isPropagationStopped=zM,this}return lr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Uy)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Uy)},persist:function(){},isPersistent:Uy}),t}var Yf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},x4=jn(Yf),Og=lr({},Yf,{view:0,detail:0}),one=jn(Og),Q2,Y2,Yh,N_=lr({},Og,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:b4,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!==Yh&&(Yh&&e.type==="mousemove"?(Q2=e.screenX-Yh.screenX,Y2=e.screenY-Yh.screenY):Y2=Q2=0,Yh=e),Q2)},movementY:function(e){return"movementY"in e?e.movementY:Y2}}),NM=jn(N_),nne=lr({},N_,{dataTransfer:0}),ine=jn(nne),ane=lr({},Og,{relatedTarget:0}),J2=jn(ane),sne=lr({},Yf,{animationName:0,elapsedTime:0,pseudoElement:0}),lne=jn(sne),cne=lr({},Yf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dne=jn(cne),une=lr({},Yf,{data:0}),FM=jn(une),fne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mne={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"},pne={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hne(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pne[e])?!!t[e]:!1}function b4(){return hne}var gne=lr({},Og,{key:function(e){if(e.key){var t=fne[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=o_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mne[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:b4,charCode:function(e){return e.type==="keypress"?o_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?o_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vne=jn(gne),xne=lr({},N_,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),LM=jn(xne),bne=lr({},Og,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:b4}),yne=jn(bne),_ne=lr({},Yf,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ine=jn(_ne),wne=lr({},N_,{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}),Sne=jn(wne),kne=[9,13,27,32],y4=Ps&&"CompositionEvent"in window,cg=null;Ps&&"documentMode"in document&&(cg=document.documentMode);var Cne=Ps&&"TextEvent"in window&&!cg,s7=Ps&&(!y4||cg&&8<cg&&11>=cg),MM=" ",BM=!1;function l7(e,t){switch(e){case"keyup":return kne.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rf=!1;function Pne(e,t){switch(e){case"compositionend":return c7(t);case"keypress":return t.which!==32?null:(BM=!0,MM);case"textInput":return e=t.data,e===MM&&BM?null:e;default:return null}}function Dne(e,t){if(Rf)return e==="compositionend"||!y4&&l7(e,t)?(e=a7(),r_=v4=zl=null,Rf=!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 s7&&t.locale!=="ko"?null:t.data;default:return null}}var Rne={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 jM(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rne[e.type]:t==="textarea"}function d7(e,t,r,n){jB(n),t=x_(t,"onChange"),0<t.length&&(r=new x4("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var dg=null,Ig=null;function Ene(e){_7(e,0)}function F_(e){var t=$f(e);if(OB(t))return e}function Tne(e,t){if(e==="change")return t}var u7=!1;Ps&&(Ps?(Hy="oninput"in document,Hy||(eP=document.createElement("div"),eP.setAttribute("oninput","return;"),Hy=typeof eP.oninput=="function"),Vy=Hy):Vy=!1,u7=Vy&&(!document.documentMode||9<document.documentMode));var Vy,Hy,eP;function UM(){dg&&(dg.detachEvent("onpropertychange",f7),Ig=dg=null)}function f7(e){if(e.propertyName==="value"&&F_(Ig)){var t=[];d7(t,Ig,e,f4(e)),WB(Ene,t)}}function $ne(e,t,r){e==="focusin"?(UM(),dg=t,Ig=r,dg.attachEvent("onpropertychange",f7)):e==="focusout"&&UM()}function Ane(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return F_(Ig)}function One(e,t){if(e==="click")return F_(t)}function zne(e,t){if(e==="input"||e==="change")return F_(t)}function Nne(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gi=typeof Object.is=="function"?Object.is:Nne;function wg(e,t){if(Gi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!pP.call(t,o)||!Gi(e[o],t[o]))return!1}return!0}function VM(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function HM(e,t){var r=VM(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=VM(r)}}function m7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?m7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function p7(){for(var e=window,t=u_();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=u_(e.document)}return t}function _4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Fne(e){var t=p7(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&m7(r.ownerDocument.documentElement,r)){if(n!==null&&_4(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=HM(r,i);var a=HM(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Lne=Ps&&"documentMode"in document&&11>=document.documentMode,Ef=null,AP=null,ug=null,OP=!1;function WM(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;OP||Ef==null||Ef!==u_(n)||(n=Ef,"selectionStart"in n&&_4(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ug&&wg(ug,n)||(ug=n,n=x_(AP,"onSelect"),0<n.length&&(t=new x4("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ef)))}function Wy(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Tf={animationend:Wy("Animation","AnimationEnd"),animationiteration:Wy("Animation","AnimationIteration"),animationstart:Wy("Animation","AnimationStart"),transitionend:Wy("Transition","TransitionEnd")},tP={},h7={};Ps&&(h7=document.createElement("div").style,"AnimationEvent"in window||(delete Tf.animationend.animation,delete Tf.animationiteration.animation,delete Tf.animationstart.animation),"TransitionEvent"in window||delete Tf.transitionend.transition);function L_(e){if(tP[e])return tP[e];if(!Tf[e])return e;var t=Tf[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in h7)return tP[e]=t[r];return e}var g7=L_("animationend"),v7=L_("animationiteration"),x7=L_("animationstart"),b7=L_("transitionend"),y7=new Map,ZM="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Gl(e,t){y7.set(e,t),Ed(t,[e])}for(Zy=0;Zy<ZM.length;Zy++)Gy=ZM[Zy],GM=Gy.toLowerCase(),qM=Gy[0].toUpperCase()+Gy.slice(1),Gl(GM,"on"+qM);var Gy,GM,qM,Zy;Gl(g7,"onAnimationEnd");Gl(v7,"onAnimationIteration");Gl(x7,"onAnimationStart");Gl("dblclick","onDoubleClick");Gl("focusin","onFocus");Gl("focusout","onBlur");Gl(b7,"onTransitionEnd");Wf("onMouseEnter",["mouseout","mouseover"]);Wf("onMouseLeave",["mouseout","mouseover"]);Wf("onPointerEnter",["pointerout","pointerover"]);Wf("onPointerLeave",["pointerout","pointerover"]);Ed("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ed("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ed("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ed("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ed("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ed("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ag="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(" "),Mne=new Set("cancel close invalid load scroll toggle".split(" ").concat(ag));function KM(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Moe(n,t,void 0,e),e.currentTarget=null}function _7(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;KM(o,s,c),i=l}else for(a=0;a<n.length;a++){if(s=n[a],l=s.instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;KM(o,s,c),i=l}}}if(m_)throw e=RP,m_=!1,RP=null,e}function Ht(e,t){var r=t[MP];r===void 0&&(r=t[MP]=new Set);var n=e+"__bubble";r.has(n)||(I7(t,e,2,!1),r.add(n))}function rP(e,t,r){var n=0;t&&(n|=4),I7(r,e,n,t)}var qy="_reactListening"+Math.random().toString(36).slice(2);function Sg(e){if(!e[qy]){e[qy]=!0,RB.forEach(function(r){r!=="selectionchange"&&(Mne.has(r)||rP(r,!1,e),rP(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qy]||(t[qy]=!0,rP("selectionchange",!1,t))}}function I7(e,t,r,n){switch(i7(t)){case 1:var o=tne;break;case 4:o=rne;break;default:o=g4}r=o.bind(null,t,r,e),o=void 0,!DP||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function oP(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;a=a.return}for(;s!==null;){if(a=yd(s),a===null)return;if(l=a.tag,l===5||l===6){n=i=a;continue e}s=s.parentNode}}n=n.return}WB(function(){var c=i,d=f4(r),u=[];e:{var f=y7.get(e);if(f!==void 0){var m=x4,p=e;switch(e){case"keypress":if(o_(r)===0)break e;case"keydown":case"keyup":m=vne;break;case"focusin":p="focus",m=J2;break;case"focusout":p="blur",m=J2;break;case"beforeblur":case"afterblur":m=J2;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=NM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=ine;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=yne;break;case g7:case v7:case x7:m=lne;break;case b7:m=Ine;break;case"scroll":m=one;break;case"wheel":m=Sne;break;case"copy":case"cut":case"paste":m=dne;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=LM}var h=(t&4)!==0,b=!h&&e==="scroll",v=h?f!==null?f+"Capture":null:f;h=[];for(var x=c,_;x!==null;){_=x;var I=_.stateNode;if(_.tag===5&&I!==null&&(_=I,v!==null&&(I=xg(x,v),I!=null&&h.push(kg(x,I,_)))),b)break;x=x.return}0<h.length&&(f=new m(f,p,null,r,d),u.push({event:f,listeners:h}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&r!==CP&&(p=r.relatedTarget||r.fromElement)&&(yd(p)||p[Ds]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(p=r.relatedTarget||r.toElement,m=c,p=p?yd(p):null,p!==null&&(b=Td(p),p!==b||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=c),m!==p)){if(h=NM,I="onMouseLeave",v="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(h=LM,I="onPointerLeave",v="onPointerEnter",x="pointer"),b=m==null?f:$f(m),_=p==null?f:$f(p),f=new h(I,x+"leave",m,r,d),f.target=b,f.relatedTarget=_,I=null,yd(d)===c&&(h=new h(v,x+"enter",p,r,d),h.target=_,h.relatedTarget=b,I=h),b=I,m&&p)t:{for(h=m,v=p,x=0,_=h;_;_=Cf(_))x++;for(_=0,I=v;I;I=Cf(I))_++;for(;0<x-_;)h=Cf(h),x--;for(;0<_-x;)v=Cf(v),_--;for(;x--;){if(h===v||v!==null&&h===v.alternate)break t;h=Cf(h),v=Cf(v)}h=null}else h=null;m!==null&&XM(u,f,m,h,!1),p!==null&&b!==null&&XM(u,b,p,h,!0)}}e:{if(f=c?$f(c):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var S=Tne;else if(jM(f))if(u7)S=zne;else{S=Ane;var w=$ne}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=One);if(S&&(S=S(e,c))){d7(u,S,r,d);break e}w&&w(e,f,c),e==="focusout"&&(w=f._wrapperState)&&w.controlled&&f.type==="number"&&_P(f,"number",f.value)}switch(w=c?$f(c):window,e){case"focusin":(jM(w)||w.contentEditable==="true")&&(Ef=w,AP=c,ug=null);break;case"focusout":ug=AP=Ef=null;break;case"mousedown":OP=!0;break;case"contextmenu":case"mouseup":case"dragend":OP=!1,WM(u,r,d);break;case"selectionchange":if(Lne)break;case"keydown":case"keyup":WM(u,r,d)}var P;if(y4)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Rf?l7(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(s7&&r.locale!=="ko"&&(Rf||E!=="onCompositionStart"?E==="onCompositionEnd"&&Rf&&(P=a7()):(zl=d,v4="value"in zl?zl.value:zl.textContent,Rf=!0)),w=x_(c,E),0<w.length&&(E=new FM(E,e,null,r,d),u.push({event:E,listeners:w}),P?E.data=P:(P=c7(r),P!==null&&(E.data=P)))),(P=Cne?Pne(e,r):Dne(e,r))&&(c=x_(c,"onBeforeInput"),0<c.length&&(d=new FM("onBeforeInput","beforeinput",null,r,d),u.push({event:d,listeners:c}),d.data=P))}_7(u,t)})}function kg(e,t,r){return{instance:e,listener:t,currentTarget:r}}function x_(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=xg(e,r),i!=null&&n.unshift(kg(e,i,o)),i=xg(e,t),i!=null&&n.push(kg(e,i,o))),e=e.return}return n}function Cf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function XM(e,t,r,n,o){for(var i=t._reactName,a=[];r!==null&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,o?(l=xg(r,i),l!=null&&a.unshift(kg(r,l,s))):o||(l=xg(r,i),l!=null&&a.push(kg(r,l,s)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Bne=/\r\n?/g,jne=/\u0000|\uFFFD/g;function QM(e){return(typeof e=="string"?e:""+e).replace(Bne,`
6
+ `).replace(jne,"")}function Ky(e,t,r){if(t=QM(t),QM(e)!==t&&r)throw Error(ie(425))}function b_(){}var zP=null,NP=null;function FP(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var LP=typeof setTimeout=="function"?setTimeout:void 0,Une=typeof clearTimeout=="function"?clearTimeout:void 0,YM=typeof Promise=="function"?Promise:void 0,Vne=typeof queueMicrotask=="function"?queueMicrotask:typeof YM<"u"?function(e){return YM.resolve(null).then(e).catch(Hne)}:LP;function Hne(e){setTimeout(function(){throw e})}function nP(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),_g(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);_g(t)}function Bl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function JM(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Jf=Math.random().toString(36).slice(2),Ia="__reactFiber$"+Jf,Cg="__reactProps$"+Jf,Ds="__reactContainer$"+Jf,MP="__reactEvents$"+Jf,Wne="__reactListeners$"+Jf,Zne="__reactHandles$"+Jf;function yd(e){var t=e[Ia];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ds]||r[Ia]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=JM(e);e!==null;){if(r=e[Ia])return r;e=JM(e)}return t}e=r,r=e.parentNode}return null}function zg(e){return e=e[Ia]||e[Ds],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function $f(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function M_(e){return e[Cg]||null}var BP=[],Af=-1;function ql(e){return{current:e}}function Wt(e){0>Af||(e.current=BP[Af],BP[Af]=null,Af--)}function zt(e,t){Af++,BP[Af]=e.current,e.current=t}var Zl={},Po=ql(Zl),gn=ql(!1),kd=Zl;function Zf(e,t){var r=e.type.contextTypes;if(!r)return Zl;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function vn(e){return e=e.childContextTypes,e!=null}function y_(){Wt(gn),Wt(Po)}function eB(e,t,r){if(Po.current!==Zl)throw Error(ie(168));zt(Po,t),zt(gn,r)}function w7(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(ie(108,$oe(e)||"Unknown",o));return lr({},r,n)}function __(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zl,kd=Po.current,zt(Po,e),zt(gn,gn.current),!0}function tB(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=w7(e,t,kd),n.__reactInternalMemoizedMergedChildContext=e,Wt(gn),Wt(Po),zt(Po,e)):Wt(gn),zt(gn,r)}var ws=null,B_=!1,iP=!1;function S7(e){ws===null?ws=[e]:ws.push(e)}function Gne(e){B_=!0,S7(e)}function Kl(){if(!iP&&ws!==null){iP=!0;var e=0,t=St;try{var r=ws;for(St=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ws=null,B_=!1}catch(o){throw ws!==null&&(ws=ws.slice(e+1)),KB(m4,Kl),o}finally{St=t,iP=!1}}return null}var Of=[],zf=0,I_=null,w_=0,ri=[],oi=0,Cd=null,Ss=1,ks="";function xd(e,t){Of[zf++]=w_,Of[zf++]=I_,I_=e,w_=t}function k7(e,t,r){ri[oi++]=Ss,ri[oi++]=ks,ri[oi++]=Cd,Cd=e;var n=Ss;e=ks;var o=32-Wi(n)-1;n&=~(1<<o),r+=1;var i=32-Wi(t)+o;if(30<i){var a=o-o%5;i=(n&(1<<a)-1).toString(32),n>>=a,o-=a,Ss=1<<32-Wi(t)+o|r<<o|n,ks=i+e}else Ss=1<<i|r<<o|n,ks=e}function I4(e){e.return!==null&&(xd(e,1),k7(e,1,0))}function w4(e){for(;e===I_;)I_=Of[--zf],Of[zf]=null,w_=Of[--zf],Of[zf]=null;for(;e===Cd;)Cd=ri[--oi],ri[oi]=null,ks=ri[--oi],ri[oi]=null,Ss=ri[--oi],ri[oi]=null}var Mn=null,Ln=null,Qt=!1,Hi=null;function C7(e,t){var r=ni(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function rB(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Mn=e,Ln=Bl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mn=e,Ln=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Cd!==null?{id:Ss,overflow:ks}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ni(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Mn=e,Ln=null,!0):!1;default:return!1}}function jP(e){return(e.mode&1)!==0&&(e.flags&128)===0}function UP(e){if(Qt){var t=Ln;if(t){var r=t;if(!rB(e,t)){if(jP(e))throw Error(ie(418));t=Bl(r.nextSibling);var n=Mn;t&&rB(e,t)?C7(n,r):(e.flags=e.flags&-4097|2,Qt=!1,Mn=e)}}else{if(jP(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Qt=!1,Mn=e}}}function oB(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function Xy(e){if(e!==Mn)return!1;if(!Qt)return oB(e),Qt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!FP(e.type,e.memoizedProps)),t&&(t=Ln)){if(jP(e))throw P7(),Error(ie(418));for(;t;)C7(e,t),t=Bl(t.nextSibling)}if(oB(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ln=Bl(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ln=null}}else Ln=Mn?Bl(e.stateNode.nextSibling):null;return!0}function P7(){for(var e=Ln;e;)e=Bl(e.nextSibling)}function Gf(){Ln=Mn=null,Qt=!1}function S4(e){Hi===null?Hi=[e]:Hi.push(e)}var qne=Ts.ReactCurrentBatchConfig;function Jh(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ie(309));var n=r.stateNode}if(!n)throw Error(ie(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var s=o.refs;a===null?delete s[i]:s[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(ie(284));if(!r._owner)throw Error(ie(290,e))}return e}function Qy(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function nB(e){var t=e._init;return t(e._payload)}function D7(e){function t(v,x){if(e){var _=v.deletions;_===null?(v.deletions=[x],v.flags|=16):_.push(x)}}function r(v,x){if(!e)return null;for(;x!==null;)t(v,x),x=x.sibling;return null}function n(v,x){for(v=new Map;x!==null;)x.key!==null?v.set(x.key,x):v.set(x.index,x),x=x.sibling;return v}function o(v,x){return v=Hl(v,x),v.index=0,v.sibling=null,v}function i(v,x,_){return v.index=_,e?(_=v.alternate,_!==null?(_=_.index,_<x?(v.flags|=2,x):_):(v.flags|=2,x)):(v.flags|=1048576,x)}function a(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,x,_,I){return x===null||x.tag!==6?(x=fP(_,v.mode,I),x.return=v,x):(x=o(x,_),x.return=v,x)}function l(v,x,_,I){var S=_.type;return S===Df?d(v,x,_.props.children,I,_.key):x!==null&&(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Tl&&nB(S)===x.type)?(I=o(x,_.props),I.ref=Jh(v,x,_),I.return=v,I):(I=d_(_.type,_.key,_.props,null,v.mode,I),I.ref=Jh(v,x,_),I.return=v,I)}function c(v,x,_,I){return x===null||x.tag!==4||x.stateNode.containerInfo!==_.containerInfo||x.stateNode.implementation!==_.implementation?(x=mP(_,v.mode,I),x.return=v,x):(x=o(x,_.children||[]),x.return=v,x)}function d(v,x,_,I,S){return x===null||x.tag!==7?(x=Sd(_,v.mode,I,S),x.return=v,x):(x=o(x,_),x.return=v,x)}function u(v,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return x=fP(""+x,v.mode,_),x.return=v,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ny:return _=d_(x.type,x.key,x.props,null,v.mode,_),_.ref=Jh(v,null,x),_.return=v,_;case Pf:return x=mP(x,v.mode,_),x.return=v,x;case Tl:var I=x._init;return u(v,I(x._payload),_)}if(ng(x)||Kh(x))return x=Sd(x,v.mode,_,null),x.return=v,x;Qy(v,x)}return null}function f(v,x,_,I){var S=x!==null?x.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return S!==null?null:s(v,x,""+_,I);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ny:return _.key===S?l(v,x,_,I):null;case Pf:return _.key===S?c(v,x,_,I):null;case Tl:return S=_._init,f(v,x,S(_._payload),I)}if(ng(_)||Kh(_))return S!==null?null:d(v,x,_,I,null);Qy(v,_)}return null}function m(v,x,_,I,S){if(typeof I=="string"&&I!==""||typeof I=="number")return v=v.get(_)||null,s(x,v,""+I,S);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Ny:return v=v.get(I.key===null?_:I.key)||null,l(x,v,I,S);case Pf:return v=v.get(I.key===null?_:I.key)||null,c(x,v,I,S);case Tl:var w=I._init;return m(v,x,_,w(I._payload),S)}if(ng(I)||Kh(I))return v=v.get(_)||null,d(x,v,I,S,null);Qy(x,I)}return null}function p(v,x,_,I){for(var S=null,w=null,P=x,E=x=0,B=null;P!==null&&E<_.length;E++){P.index>E?(B=P,P=null):B=P.sibling;var H=f(v,P,_[E],I);if(H===null){P===null&&(P=B);break}e&&P&&H.alternate===null&&t(v,P),x=i(H,x,E),w===null?S=H:w.sibling=H,w=H,P=B}if(E===_.length)return r(v,P),Qt&&xd(v,E),S;if(P===null){for(;E<_.length;E++)P=u(v,_[E],I),P!==null&&(x=i(P,x,E),w===null?S=P:w.sibling=P,w=P);return Qt&&xd(v,E),S}for(P=n(v,P);E<_.length;E++)B=m(P,v,E,_[E],I),B!==null&&(e&&B.alternate!==null&&P.delete(B.key===null?E:B.key),x=i(B,x,E),w===null?S=B:w.sibling=B,w=B);return e&&P.forEach(function(Z){return t(v,Z)}),Qt&&xd(v,E),S}function h(v,x,_,I){var S=Kh(_);if(typeof S!="function")throw Error(ie(150));if(_=S.call(_),_==null)throw Error(ie(151));for(var w=S=null,P=x,E=x=0,B=null,H=_.next();P!==null&&!H.done;E++,H=_.next()){P.index>E?(B=P,P=null):B=P.sibling;var Z=f(v,P,H.value,I);if(Z===null){P===null&&(P=B);break}e&&P&&Z.alternate===null&&t(v,P),x=i(Z,x,E),w===null?S=Z:w.sibling=Z,w=Z,P=B}if(H.done)return r(v,P),Qt&&xd(v,E),S;if(P===null){for(;!H.done;E++,H=_.next())H=u(v,H.value,I),H!==null&&(x=i(H,x,E),w===null?S=H:w.sibling=H,w=H);return Qt&&xd(v,E),S}for(P=n(v,P);!H.done;E++,H=_.next())H=m(P,v,E,H.value,I),H!==null&&(e&&H.alternate!==null&&P.delete(H.key===null?E:H.key),x=i(H,x,E),w===null?S=H:w.sibling=H,w=H);return e&&P.forEach(function(K){return t(v,K)}),Qt&&xd(v,E),S}function b(v,x,_,I){if(typeof _=="object"&&_!==null&&_.type===Df&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Ny:e:{for(var S=_.key,w=x;w!==null;){if(w.key===S){if(S=_.type,S===Df){if(w.tag===7){r(v,w.sibling),x=o(w,_.props.children),x.return=v,v=x;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Tl&&nB(S)===w.type){r(v,w.sibling),x=o(w,_.props),x.ref=Jh(v,w,_),x.return=v,v=x;break e}r(v,w);break}else t(v,w);w=w.sibling}_.type===Df?(x=Sd(_.props.children,v.mode,I,_.key),x.return=v,v=x):(I=d_(_.type,_.key,_.props,null,v.mode,I),I.ref=Jh(v,x,_),I.return=v,v=I)}return a(v);case Pf:e:{for(w=_.key;x!==null;){if(x.key===w)if(x.tag===4&&x.stateNode.containerInfo===_.containerInfo&&x.stateNode.implementation===_.implementation){r(v,x.sibling),x=o(x,_.children||[]),x.return=v,v=x;break e}else{r(v,x);break}else t(v,x);x=x.sibling}x=mP(_,v.mode,I),x.return=v,v=x}return a(v);case Tl:return w=_._init,b(v,x,w(_._payload),I)}if(ng(_))return p(v,x,_,I);if(Kh(_))return h(v,x,_,I);Qy(v,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,x!==null&&x.tag===6?(r(v,x.sibling),x=o(x,_),x.return=v,v=x):(r(v,x),x=fP(_,v.mode,I),x.return=v,v=x),a(v)):r(v,x)}return b}var qf=D7(!0),R7=D7(!1),S_=ql(null),k_=null,Nf=null,k4=null;function C4(){k4=Nf=k_=null}function P4(e){var t=S_.current;Wt(S_),e._currentValue=t}function VP(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Vf(e,t){k_=e,k4=Nf=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(hn=!0),e.firstContext=null)}function ai(e){var t=e._currentValue;if(k4!==e)if(e={context:e,memoizedValue:t,next:null},Nf===null){if(k_===null)throw Error(ie(308));Nf=e,k_.dependencies={lanes:0,firstContext:e}}else Nf=Nf.next=e;return t}var _d=null;function D4(e){_d===null?_d=[e]:_d.push(e)}function E7(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,D4(t)):(r.next=o.next,o.next=r),t.interleaved=r,Rs(e,n)}function Rs(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var $l=!1;function R4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function T7(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Cs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jl(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ft&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,Rs(e,r)}return o=n.interleaved,o===null?(t.next=t,D4(n)):(t.next=o.next,o.next=t),n.interleaved=t,Rs(e,r)}function n_(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,p4(e,r)}}function iB(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function C_(e,t,r,n){var o=e.updateQueue;$l=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(i!==null){var u=o.baseState;a=0,d=c=l=null,s=i;do{var f=s.lane,m=s.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,h=s;switch(f=t,m=r,h.tag){case 1:if(p=h.payload,typeof p=="function"){u=p.call(m,u,f);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=h.payload,f=typeof p=="function"?p.call(m,u,f):p,f==null)break e;u=lr({},u,f);break e;case 2:$l=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else m={eventTime:m,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=m,l=u):d=d.next=m,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(d===null&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Dd|=a,e.lanes=a,e.memoizedState=u}}function aB(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(ie(191,o));o.call(n)}}}var Ng={},Sa=ql(Ng),Pg=ql(Ng),Dg=ql(Ng);function Id(e){if(e===Ng)throw Error(ie(174));return e}function E4(e,t){switch(zt(Dg,t),zt(Pg,e),zt(Sa,Ng),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:wP(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=wP(t,e)}Wt(Sa),zt(Sa,t)}function Kf(){Wt(Sa),Wt(Pg),Wt(Dg)}function $7(e){Id(Dg.current);var t=Id(Sa.current),r=wP(t,e.type);t!==r&&(zt(Pg,e),zt(Sa,r))}function T4(e){Pg.current===e&&(Wt(Sa),Wt(Pg))}var ar=ql(0);function P_(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)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 aP=[];function $4(){for(var e=0;e<aP.length;e++)aP[e]._workInProgressVersionPrimary=null;aP.length=0}var i_=Ts.ReactCurrentDispatcher,sP=Ts.ReactCurrentBatchConfig,Pd=0,sr=null,Tr=null,Wr=null,D_=!1,fg=!1,Rg=0,Kne=0;function So(){throw Error(ie(321))}function A4(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Gi(e[r],t[r]))return!1;return!0}function O4(e,t,r,n,o,i){if(Pd=i,sr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,i_.current=e===null||e.memoizedState===null?Jne:eie,e=r(n,o),fg){i=0;do{if(fg=!1,Rg=0,25<=i)throw Error(ie(301));i+=1,Wr=Tr=null,t.updateQueue=null,i_.current=tie,e=r(n,o)}while(fg)}if(i_.current=R_,t=Tr!==null&&Tr.next!==null,Pd=0,Wr=Tr=sr=null,D_=!1,t)throw Error(ie(300));return e}function z4(){var e=Rg!==0;return Rg=0,e}function _a(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wr===null?sr.memoizedState=Wr=e:Wr=Wr.next=e,Wr}function si(){if(Tr===null){var e=sr.alternate;e=e!==null?e.memoizedState:null}else e=Tr.next;var t=Wr===null?sr.memoizedState:Wr.next;if(t!==null)Wr=t,Tr=e;else{if(e===null)throw Error(ie(310));Tr=e,e={memoizedState:Tr.memoizedState,baseState:Tr.baseState,baseQueue:Tr.baseQueue,queue:Tr.queue,next:null},Wr===null?sr.memoizedState=Wr=e:Wr=Wr.next=e}return Wr}function Eg(e,t){return typeof t=="function"?t(e):t}function lP(e){var t=si(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=Tr,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var s=a=null,l=null,c=i;do{var d=c.lane;if((Pd&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=u,a=n):l=l.next=u,sr.lanes|=d,Dd|=d}c=c.next}while(c!==null&&c!==i);l===null?a=n:l.next=s,Gi(n,t.memoizedState)||(hn=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,sr.lanes|=i,Dd|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function cP(e){var t=si(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);Gi(i,t.memoizedState)||(hn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function A7(){}function O7(e,t){var r=sr,n=si(),o=t(),i=!Gi(n.memoizedState,o);if(i&&(n.memoizedState=o,hn=!0),n=n.queue,N4(F7.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Wr!==null&&Wr.memoizedState.tag&1){if(r.flags|=2048,Tg(9,N7.bind(null,r,n,o,t),void 0,null),Zr===null)throw Error(ie(349));(Pd&30)!==0||z7(r,t,o)}return o}function z7(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=sr.updateQueue,t===null?(t={lastEffect:null,stores:null},sr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function N7(e,t,r,n){t.value=r,t.getSnapshot=n,L7(t)&&M7(e)}function F7(e,t,r){return r(function(){L7(t)&&M7(e)})}function L7(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Gi(e,r)}catch{return!0}}function M7(e){var t=Rs(e,1);t!==null&&Zi(t,e,1,-1)}function sB(e){var t=_a();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Eg,lastRenderedState:e},t.queue=e,e=e.dispatch=Yne.bind(null,sr,e),[t.memoizedState,e]}function Tg(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=sr.updateQueue,t===null?(t={lastEffect:null,stores:null},sr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function B7(){return si().memoizedState}function a_(e,t,r,n){var o=_a();sr.flags|=e,o.memoizedState=Tg(1|t,r,void 0,n===void 0?null:n)}function j_(e,t,r,n){var o=si();n=n===void 0?null:n;var i=void 0;if(Tr!==null){var a=Tr.memoizedState;if(i=a.destroy,n!==null&&A4(n,a.deps)){o.memoizedState=Tg(t,r,i,n);return}}sr.flags|=e,o.memoizedState=Tg(1|t,r,i,n)}function lB(e,t){return a_(8390656,8,e,t)}function N4(e,t){return j_(2048,8,e,t)}function j7(e,t){return j_(4,2,e,t)}function U7(e,t){return j_(4,4,e,t)}function V7(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function H7(e,t,r){return r=r!=null?r.concat([e]):null,j_(4,4,V7.bind(null,t,e),r)}function F4(){}function W7(e,t){var r=si();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&A4(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Z7(e,t){var r=si();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&A4(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function G7(e,t,r){return(Pd&21)===0?(e.baseState&&(e.baseState=!1,hn=!0),e.memoizedState=r):(Gi(r,t)||(r=YB(),sr.lanes|=r,Dd|=r,e.baseState=!0),t)}function Xne(e,t){var r=St;St=r!==0&&4>r?r:4,e(!0);var n=sP.transition;sP.transition={};try{e(!1),t()}finally{St=r,sP.transition=n}}function q7(){return si().memoizedState}function Qne(e,t,r){var n=Vl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},K7(e))X7(t,r);else if(r=E7(e,t,r,n),r!==null){var o=jo();Zi(r,e,n,o),Q7(r,t,n)}}function Yne(e,t,r){var n=Vl(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(K7(e))X7(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Gi(s,a)){var l=t.interleaved;l===null?(o.next=o,D4(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=E7(e,t,o,n),r!==null&&(o=jo(),Zi(r,e,n,o),Q7(r,t,n))}}function K7(e){var t=e.alternate;return e===sr||t!==null&&t===sr}function X7(e,t){fg=D_=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Q7(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,p4(e,r)}}var R_={readContext:ai,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useInsertionEffect:So,useLayoutEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useMutableSource:So,useSyncExternalStore:So,useId:So,unstable_isNewReconciler:!1},Jne={readContext:ai,useCallback:function(e,t){return _a().memoizedState=[e,t===void 0?null:t],e},useContext:ai,useEffect:lB,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,a_(4194308,4,V7.bind(null,t,e),r)},useLayoutEffect:function(e,t){return a_(4194308,4,e,t)},useInsertionEffect:function(e,t){return a_(4,2,e,t)},useMemo:function(e,t){var r=_a();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=_a();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Qne.bind(null,sr,e),[n.memoizedState,e]},useRef:function(e){var t=_a();return e={current:e},t.memoizedState=e},useState:sB,useDebugValue:F4,useDeferredValue:function(e){return _a().memoizedState=e},useTransition:function(){var e=sB(!1),t=e[0];return e=Xne.bind(null,e[1]),_a().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=sr,o=_a();if(Qt){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),Zr===null)throw Error(ie(349));(Pd&30)!==0||z7(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,lB(F7.bind(null,n,i,e),[e]),n.flags|=2048,Tg(9,N7.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=_a(),t=Zr.identifierPrefix;if(Qt){var r=ks,n=Ss;r=(n&~(1<<32-Wi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Rg++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Kne++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},eie={readContext:ai,useCallback:W7,useContext:ai,useEffect:N4,useImperativeHandle:H7,useInsertionEffect:j7,useLayoutEffect:U7,useMemo:Z7,useReducer:lP,useRef:B7,useState:function(){return lP(Eg)},useDebugValue:F4,useDeferredValue:function(e){var t=si();return G7(t,Tr.memoizedState,e)},useTransition:function(){var e=lP(Eg)[0],t=si().memoizedState;return[e,t]},useMutableSource:A7,useSyncExternalStore:O7,useId:q7,unstable_isNewReconciler:!1},tie={readContext:ai,useCallback:W7,useContext:ai,useEffect:N4,useImperativeHandle:H7,useInsertionEffect:j7,useLayoutEffect:U7,useMemo:Z7,useReducer:cP,useRef:B7,useState:function(){return cP(Eg)},useDebugValue:F4,useDeferredValue:function(e){var t=si();return Tr===null?t.memoizedState=e:G7(t,Tr.memoizedState,e)},useTransition:function(){var e=cP(Eg)[0],t=si().memoizedState;return[e,t]},useMutableSource:A7,useSyncExternalStore:O7,useId:q7,unstable_isNewReconciler:!1};function Ui(e,t){if(e&&e.defaultProps){t=lr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function HP(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:lr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var U_={isMounted:function(e){return(e=e._reactInternals)?Td(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=jo(),o=Vl(e),i=Cs(n,o);i.payload=t,r!=null&&(i.callback=r),t=jl(e,i,o),t!==null&&(Zi(t,e,o,n),n_(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=jo(),o=Vl(e),i=Cs(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=jl(e,i,o),t!==null&&(Zi(t,e,o,n),n_(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=jo(),n=Vl(e),o=Cs(r,n);o.tag=2,t!=null&&(o.callback=t),t=jl(e,o,n),t!==null&&(Zi(t,e,n,r),n_(t,e,n))}};function cB(e,t,r,n,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!wg(r,n)||!wg(o,i):!0}function Y7(e,t,r){var n=!1,o=Zl,i=t.contextType;return typeof i=="object"&&i!==null?i=ai(i):(o=vn(t)?kd:Po.current,n=t.contextTypes,i=(n=n!=null)?Zf(e,o):Zl),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=U_,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function dB(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&U_.enqueueReplaceState(t,t.state,null)}function WP(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},R4(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ai(i):(i=vn(t)?kd:Po.current,o.context=Zf(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(HP(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&U_.enqueueReplaceState(o,o.state,null),C_(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Xf(e,t){try{var r="",n=t;do r+=Toe(n),n=n.return;while(n);var o=r}catch(i){o=`
7
+ Error generating stack: `+i.message+`
8
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function dP(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ZP(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var rie=typeof WeakMap=="function"?WeakMap:Map;function J7(e,t,r){r=Cs(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){T_||(T_=!0,r4=n),ZP(e,t)},r}function e8(e,t,r){r=Cs(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){ZP(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){ZP(e,t),typeof n!="function"&&(Ul===null?Ul=new Set([this]):Ul.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function uB(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new rie;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=gie.bind(null,e,t,r),t.then(e,e))}function fB(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function mB(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Cs(-1,1),t.tag=2,jl(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var oie=Ts.ReactCurrentOwner,hn=!1;function Bo(e,t,r,n){t.child=e===null?R7(t,null,r,n):qf(t,e.child,r,n)}function pB(e,t,r,n,o){r=r.render;var i=t.ref;return Vf(t,o),n=O4(e,t,r,n,i,o),r=z4(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Es(e,t,o)):(Qt&&r&&I4(t),t.flags|=1,Bo(e,t,n,o),t.child)}function hB(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!W4(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,t8(e,t,i,n,o)):(e=d_(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:wg,r(a,n)&&e.ref===t.ref)return Es(e,t,o)}return t.flags|=1,e=Hl(i,n),e.ref=t.ref,e.return=t,t.child=e}function t8(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(wg(i,n)&&e.ref===t.ref)if(hn=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(hn=!0);else return t.lanes=e.lanes,Es(e,t,o)}return GP(e,t,r,n,o)}function r8(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},zt(Lf,Fn),Fn|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,zt(Lf,Fn),Fn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,zt(Lf,Fn),Fn|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,zt(Lf,Fn),Fn|=n;return Bo(e,t,o,r),t.child}function o8(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function GP(e,t,r,n,o){var i=vn(r)?kd:Po.current;return i=Zf(t,i),Vf(t,o),r=O4(e,t,r,n,i,o),n=z4(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Es(e,t,o)):(Qt&&n&&I4(t),t.flags|=1,Bo(e,t,r,o),t.child)}function gB(e,t,r,n,o){if(vn(r)){var i=!0;__(t)}else i=!1;if(Vf(t,o),t.stateNode===null)s_(e,t),Y7(t,r,n),WP(t,r,n,o),n=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=r.contextType;typeof c=="object"&&c!==null?c=ai(c):(c=vn(r)?kd:Po.current,c=Zf(t,c));var d=r.getDerivedStateFromProps,u=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";u||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||l!==c)&&dB(t,a,n,c),$l=!1;var f=t.memoizedState;a.state=f,C_(t,n,a,o),l=t.memoizedState,s!==n||f!==l||gn.current||$l?(typeof d=="function"&&(HP(t,r,d,n),l=t.memoizedState),(s=$l||cB(t,r,s,n,f,l,c))?(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=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,T7(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Ui(t.type,s),a.props=c,u=t.pendingProps,f=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=ai(l):(l=vn(r)?kd:Po.current,l=Zf(t,l));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==u||f!==l)&&dB(t,a,n,l),$l=!1,f=t.memoizedState,a.state=f,C_(t,n,a,o);var p=t.memoizedState;s!==u||f!==p||gn.current||$l?(typeof m=="function"&&(HP(t,r,m,n),p=t.memoizedState),(c=$l||cB(t,r,c,n,f,p,l)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,p,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,p,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=l,n=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return qP(e,t,r,n,i,o)}function qP(e,t,r,n,o,i){o8(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return o&&tB(t,r,!1),Es(e,t,i);n=t.stateNode,oie.current=t;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=qf(t,e.child,null,i),t.child=qf(t,null,s,i)):Bo(e,t,s,i),t.memoizedState=n.state,o&&tB(t,r,!0),t.child}function n8(e){var t=e.stateNode;t.pendingContext?eB(e,t.pendingContext,t.pendingContext!==t.context):t.context&&eB(e,t.context,!1),E4(e,t.containerInfo)}function vB(e,t,r,n,o){return Gf(),S4(o),t.flags|=256,Bo(e,t,r,n),t.child}var KP={dehydrated:null,treeContext:null,retryLane:0};function XP(e){return{baseLanes:e,cachePool:null,transitions:null}}function i8(e,t,r){var n=t.pendingProps,o=ar.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),zt(ar,o&1),e===null)return UP(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=W_(a,n,0,null),e=Sd(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=XP(r),t.memoizedState=KP,e):L4(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return nie(e,t,a,n,s,o,r);if(i){i=n.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:n.children};return(a&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Hl(o,l),n.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=Hl(s,i):(i=Sd(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?XP(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=KP,n}return i=e.child,e=i.sibling,n=Hl(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function L4(e,t){return t=W_({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Yy(e,t,r,n){return n!==null&&S4(n),qf(t,e.child,null,r),e=L4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nie(e,t,r,n,o,i,a){if(r)return t.flags&256?(t.flags&=-257,n=dP(Error(ie(422))),Yy(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=W_({mode:"visible",children:n.children},o,0,null),i=Sd(i,o,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&qf(t,e.child,null,a),t.child.memoizedState=XP(a),t.memoizedState=KP,i);if((t.mode&1)===0)return Yy(e,t,a,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var s=n.dgst;return n=s,i=Error(ie(419)),n=dP(i,n,void 0),Yy(e,t,a,n)}if(s=(a&e.childLanes)!==0,hn||s){if(n=Zr,n!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|a))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Rs(e,o),Zi(n,e,o,-1))}return H4(),n=dP(Error(ie(421))),Yy(e,t,a,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=vie.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ln=Bl(o.nextSibling),Mn=t,Qt=!0,Hi=null,e!==null&&(ri[oi++]=Ss,ri[oi++]=ks,ri[oi++]=Cd,Ss=e.id,ks=e.overflow,Cd=t),t=L4(t,n.children),t.flags|=4096,t)}function xB(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),VP(e.return,t,r)}function uP(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function a8(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(Bo(e,t,n.children,r),n=ar.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xB(e,r,t);else if(e.tag===19)xB(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(zt(ar,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&P_(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),uP(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&P_(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}uP(t,!0,r,null,i);break;case"together":uP(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function s_(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Es(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Dd|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,r=Hl(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Hl(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function iie(e,t,r){switch(t.tag){case 3:n8(t),Gf();break;case 5:$7(t);break;case 1:vn(t.type)&&__(t);break;case 4:E4(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;zt(S_,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(zt(ar,ar.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?i8(e,t,r):(zt(ar,ar.current&1),e=Es(e,t,r),e!==null?e.sibling:null);zt(ar,ar.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return a8(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),zt(ar,ar.current),n)break;return null;case 22:case 23:return t.lanes=0,r8(e,t,r)}return Es(e,t,r)}var s8,QP,l8,c8;s8=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};QP=function(){};l8=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Id(Sa.current);var i=null;switch(r){case"input":o=bP(e,o),n=bP(e,n),i=[];break;case"select":o=lr({},o,{value:void 0}),n=lr({},n,{value:void 0}),i=[];break;case"textarea":o=IP(e,o),n=IP(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=b_)}SP(r,n);var a;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(gg.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(s=o?.[c],n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(gg.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ht("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};c8=function(e,t,r,n){r!==n&&(t.flags|=4)};function eg(e,t){if(!Qt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ko(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function aie(e,t,r){var n=t.pendingProps;switch(w4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ko(t),null;case 1:return vn(t.type)&&y_(),ko(t),null;case 3:return n=t.stateNode,Kf(),Wt(gn),Wt(Po),$4(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Xy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Hi!==null&&(i4(Hi),Hi=null))),QP(e,t),ko(t),null;case 5:T4(t);var o=Id(Dg.current);if(r=t.type,e!==null&&t.stateNode!=null)l8(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ie(166));return ko(t),null}if(e=Id(Sa.current),Xy(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Ia]=t,n[Cg]=i,e=(t.mode&1)!==0,r){case"dialog":Ht("cancel",n),Ht("close",n);break;case"iframe":case"object":case"embed":Ht("load",n);break;case"video":case"audio":for(o=0;o<ag.length;o++)Ht(ag[o],n);break;case"source":Ht("error",n);break;case"img":case"image":case"link":Ht("error",n),Ht("load",n);break;case"details":Ht("toggle",n);break;case"input":CM(n,i),Ht("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ht("invalid",n);break;case"textarea":DM(n,i),Ht("invalid",n)}SP(r,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var s=i[a];a==="children"?typeof s=="string"?n.textContent!==s&&(i.suppressHydrationWarning!==!0&&Ky(n.textContent,s,e),o=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&Ky(n.textContent,s,e),o=["children",""+s]):gg.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Ht("scroll",n)}switch(r){case"input":Fy(n),PM(n,i,!0);break;case"textarea":Fy(n),RM(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=b_)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=FB(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Ia]=t,e[Cg]=n,s8(e,t,!1,!1),t.stateNode=e;e:{switch(a=kP(r,n),r){case"dialog":Ht("cancel",e),Ht("close",e),o=n;break;case"iframe":case"object":case"embed":Ht("load",e),o=n;break;case"video":case"audio":for(o=0;o<ag.length;o++)Ht(ag[o],e);o=n;break;case"source":Ht("error",e),o=n;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),o=n;break;case"details":Ht("toggle",e),o=n;break;case"input":CM(e,n),o=bP(e,n),Ht("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=lr({},n,{value:void 0}),Ht("invalid",e);break;case"textarea":DM(e,n),o=IP(e,n),Ht("invalid",e);break;default:o=n}SP(r,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?BB(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&LB(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&vg(e,l):typeof l=="number"&&vg(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(gg.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ht("scroll",e):l!=null&&l4(e,i,l,a))}switch(r){case"input":Fy(e),PM(e,n,!1);break;case"textarea":Fy(e),RM(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Wl(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Mf(e,!!n.multiple,i,!1):n.defaultValue!=null&&Mf(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=b_)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ko(t),null;case 6:if(e&&t.stateNode!=null)c8(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ie(166));if(r=Id(Dg.current),Id(Sa.current),Xy(t)){if(n=t.stateNode,r=t.memoizedProps,n[Ia]=t,(i=n.nodeValue!==r)&&(e=Mn,e!==null))switch(e.tag){case 3:Ky(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ky(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ia]=t,t.stateNode=n}return ko(t),null;case 13:if(Wt(ar),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Qt&&Ln!==null&&(t.mode&1)!==0&&(t.flags&128)===0)P7(),Gf(),t.flags|=98560,i=!1;else if(i=Xy(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(ie(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ie(317));i[Ia]=t}else Gf(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ko(t),i=!1}else Hi!==null&&(i4(Hi),Hi=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ar.current&1)!==0?$r===0&&($r=3):H4())),t.updateQueue!==null&&(t.flags|=4),ko(t),null);case 4:return Kf(),QP(e,t),e===null&&Sg(t.stateNode.containerInfo),ko(t),null;case 10:return P4(t.type._context),ko(t),null;case 17:return vn(t.type)&&y_(),ko(t),null;case 19:if(Wt(ar),i=t.memoizedState,i===null)return ko(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)eg(i,!1);else{if($r!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=P_(e),a!==null){for(t.flags|=128,eg(i,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return zt(ar,ar.current&1|2),t.child}e=e.sibling}i.tail!==null&&_r()>Qf&&(t.flags|=128,n=!0,eg(i,!1),t.lanes=4194304)}else{if(!n)if(e=P_(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),eg(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Qt)return ko(t),null}else 2*_r()-i.renderingStartTime>Qf&&r!==1073741824&&(t.flags|=128,n=!0,eg(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=_r(),t.sibling=null,r=ar.current,zt(ar,n?r&1|2:r&1),t):(ko(t),null);case 22:case 23:return V4(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(Fn&1073741824)!==0&&(ko(t),t.subtreeFlags&6&&(t.flags|=8192)):ko(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function sie(e,t){switch(w4(t),t.tag){case 1:return vn(t.type)&&y_(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kf(),Wt(gn),Wt(Po),$4(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return T4(t),null;case 13:if(Wt(ar),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));Gf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Wt(ar),null;case 4:return Kf(),null;case 10:return P4(t.type._context),null;case 22:case 23:return V4(),null;case 24:return null;default:return null}}var Jy=!1,Co=!1,lie=typeof WeakSet=="function"?WeakSet:Set,_e=null;function Ff(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){pr(e,t,n)}else r.current=null}function YP(e,t,r){try{r()}catch(n){pr(e,t,n)}}var bB=!1;function cie(e,t){if(zP=g_,e=p7(),_4(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var m;u!==r||o!==0&&u.nodeType!==3||(s=a+o),u!==i||n!==0&&u.nodeType!==3||(l=a+n),u.nodeType===3&&(a+=u.nodeValue.length),(m=u.firstChild)!==null;)f=u,u=m;for(;;){if(u===e)break t;if(f===r&&++c===o&&(s=a),f===i&&++d===n&&(l=a),(m=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=m}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(NP={focusedElem:e,selectionRange:r},g_=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var p=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var h=p.memoizedProps,b=p.memoizedState,v=t.stateNode,x=v.getSnapshotBeforeUpdate(t.elementType===t.type?h:Ui(t.type,h),b);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(I){pr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return p=bB,bB=!1,p}function mg(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&YP(t,r,i)}o=o.next}while(o!==n)}}function V_(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function JP(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function d8(e){var t=e.alternate;t!==null&&(e.alternate=null,d8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ia],delete t[Cg],delete t[MP],delete t[Wne],delete t[Zne])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function u8(e){return e.tag===5||e.tag===3||e.tag===4}function yB(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||u8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function e4(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=b_));else if(n!==4&&(e=e.child,e!==null))for(e4(e,t,r),e=e.sibling;e!==null;)e4(e,t,r),e=e.sibling}function t4(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(t4(e,t,r),e=e.sibling;e!==null;)t4(e,t,r),e=e.sibling}var so=null,Vi=!1;function El(e,t,r){for(r=r.child;r!==null;)f8(e,t,r),r=r.sibling}function f8(e,t,r){if(wa&&typeof wa.onCommitFiberUnmount=="function")try{wa.onCommitFiberUnmount(z_,r)}catch{}switch(r.tag){case 5:Co||Ff(r,t);case 6:var n=so,o=Vi;so=null,El(e,t,r),so=n,Vi=o,so!==null&&(Vi?(e=so,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):so.removeChild(r.stateNode));break;case 18:so!==null&&(Vi?(e=so,r=r.stateNode,e.nodeType===8?nP(e.parentNode,r):e.nodeType===1&&nP(e,r),_g(e)):nP(so,r.stateNode));break;case 4:n=so,o=Vi,so=r.stateNode.containerInfo,Vi=!0,El(e,t,r),so=n,Vi=o;break;case 0:case 11:case 14:case 15:if(!Co&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&YP(r,t,a),o=o.next}while(o!==n)}El(e,t,r);break;case 1:if(!Co&&(Ff(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){pr(r,t,s)}El(e,t,r);break;case 21:El(e,t,r);break;case 22:r.mode&1?(Co=(n=Co)||r.memoizedState!==null,El(e,t,r),Co=n):El(e,t,r);break;default:El(e,t,r)}}function _B(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new lie),t.forEach(function(n){var o=xie.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function ji(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:so=s.stateNode,Vi=!1;break e;case 3:so=s.stateNode.containerInfo,Vi=!0;break e;case 4:so=s.stateNode.containerInfo,Vi=!0;break e}s=s.return}if(so===null)throw Error(ie(160));f8(i,a,o),so=null,Vi=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){pr(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)m8(t,e),t=t.sibling}function m8(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ji(t,e),ya(e),n&4){try{mg(3,e,e.return),V_(3,e)}catch(h){pr(e,e.return,h)}try{mg(5,e,e.return)}catch(h){pr(e,e.return,h)}}break;case 1:ji(t,e),ya(e),n&512&&r!==null&&Ff(r,r.return);break;case 5:if(ji(t,e),ya(e),n&512&&r!==null&&Ff(r,r.return),e.flags&32){var o=e.stateNode;try{vg(o,"")}catch(h){pr(e,e.return,h)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=r!==null?r.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&zB(o,i),kP(s,a);var c=kP(s,i);for(a=0;a<l.length;a+=2){var d=l[a],u=l[a+1];d==="style"?BB(o,u):d==="dangerouslySetInnerHTML"?LB(o,u):d==="children"?vg(o,u):l4(o,d,u,c)}switch(s){case"input":yP(o,i);break;case"textarea":NB(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Mf(o,!!i.multiple,m,!1):f!==!!i.multiple&&(i.defaultValue!=null?Mf(o,!!i.multiple,i.defaultValue,!0):Mf(o,!!i.multiple,i.multiple?[]:"",!1))}o[Cg]=i}catch(h){pr(e,e.return,h)}}break;case 6:if(ji(t,e),ya(e),n&4){if(e.stateNode===null)throw Error(ie(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(h){pr(e,e.return,h)}}break;case 3:if(ji(t,e),ya(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{_g(t.containerInfo)}catch(h){pr(e,e.return,h)}break;case 4:ji(t,e),ya(e);break;case 13:ji(t,e),ya(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(j4=_r())),n&4&&_B(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Co=(c=Co)||d,ji(t,e),Co=c):ji(t,e),ya(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&(e.mode&1)!==0)for(_e=e,d=e.child;d!==null;){for(u=_e=d;_e!==null;){switch(f=_e,m=f.child,f.tag){case 0:case 11:case 14:case 15:mg(4,f,f.return);break;case 1:Ff(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(h){pr(n,r,h)}}break;case 5:Ff(f,f.return);break;case 22:if(f.memoizedState!==null){wB(u);continue}}m!==null?(m.return=f,_e=m):wB(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{o=u.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=u.stateNode,l=u.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=MB("display",a))}catch(h){pr(e,e.return,h)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(h){pr(e,e.return,h)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:ji(t,e),ya(e),n&4&&_B(e);break;case 21:break;default:ji(t,e),ya(e)}}function ya(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(u8(r)){var n=r;break e}r=r.return}throw Error(ie(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(vg(o,""),n.flags&=-33);var i=yB(e);t4(e,i,o);break;case 3:case 4:var a=n.stateNode.containerInfo,s=yB(e);e4(e,s,a);break;default:throw Error(ie(161))}}catch(l){pr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function die(e,t,r){_e=e,p8(e,t,r)}function p8(e,t,r){for(var n=(e.mode&1)!==0;_e!==null;){var o=_e,i=o.child;if(o.tag===22&&n){var a=o.memoizedState!==null||Jy;if(!a){var s=o.alternate,l=s!==null&&s.memoizedState!==null||Co;s=Jy;var c=Co;if(Jy=a,(Co=l)&&!c)for(_e=o;_e!==null;)a=_e,l=a.child,a.tag===22&&a.memoizedState!==null?SB(o):l!==null?(l.return=a,_e=l):SB(o);for(;i!==null;)_e=i,p8(i,t,r),i=i.sibling;_e=o,Jy=s,Co=c}IB(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,_e=i):IB(e,t,r)}}function IB(e){for(;_e!==null;){var t=_e;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Co||V_(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Co)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Ui(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&aB(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}aB(t,a,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&_g(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}Co||t.flags&512&&JP(t)}catch(f){pr(t,t.return,f)}}if(t===e){_e=null;break}if(r=t.sibling,r!==null){r.return=t.return,_e=r;break}_e=t.return}}function wB(e){for(;_e!==null;){var t=_e;if(t===e){_e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,_e=r;break}_e=t.return}}function SB(e){for(;_e!==null;){var t=_e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{V_(4,t)}catch(l){pr(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){pr(t,o,l)}}var i=t.return;try{JP(t)}catch(l){pr(t,i,l)}break;case 5:var a=t.return;try{JP(t)}catch(l){pr(t,a,l)}}}catch(l){pr(t,t.return,l)}if(t===e){_e=null;break}var s=t.sibling;if(s!==null){s.return=t.return,_e=s;break}_e=t.return}}var uie=Math.ceil,E_=Ts.ReactCurrentDispatcher,M4=Ts.ReactCurrentOwner,ii=Ts.ReactCurrentBatchConfig,ft=0,Zr=null,Pr=null,lo=0,Fn=0,Lf=ql(0),$r=0,$g=null,Dd=0,H_=0,B4=0,pg=null,pn=null,j4=0,Qf=1/0,Is=null,T_=!1,r4=null,Ul=null,e_=!1,Nl=null,$_=0,hg=0,o4=null,l_=-1,c_=0;function jo(){return(ft&6)!==0?_r():l_!==-1?l_:l_=_r()}function Vl(e){return(e.mode&1)===0?1:(ft&2)!==0&&lo!==0?lo&-lo:qne.transition!==null?(c_===0&&(c_=YB()),c_):(e=St,e!==0||(e=window.event,e=e===void 0?16:i7(e.type)),e)}function Zi(e,t,r,n){if(50<hg)throw hg=0,o4=null,Error(ie(185));Ag(e,r,n),((ft&2)===0||e!==Zr)&&(e===Zr&&((ft&2)===0&&(H_|=r),$r===4&&Ol(e,lo)),xn(e,n),r===1&&ft===0&&(t.mode&1)===0&&(Qf=_r()+500,B_&&Kl()))}function xn(e,t){var r=e.callbackNode;Xoe(e,t);var n=h_(e,e===Zr?lo:0);if(n===0)r!==null&&$M(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&$M(r),t===1)e.tag===0?Gne(kB.bind(null,e)):S7(kB.bind(null,e)),Vne(function(){(ft&6)===0&&Kl()}),r=null;else{switch(JB(n)){case 1:r=m4;break;case 4:r=XB;break;case 16:r=p_;break;case 536870912:r=QB;break;default:r=p_}r=I8(r,h8.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function h8(e,t){if(l_=-1,c_=0,(ft&6)!==0)throw Error(ie(327));var r=e.callbackNode;if(Hf()&&e.callbackNode!==r)return null;var n=h_(e,e===Zr?lo:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=A_(e,n);else{t=n;var o=ft;ft|=2;var i=v8();(Zr!==e||lo!==t)&&(Is=null,Qf=_r()+500,wd(e,t));do try{pie();break}catch(s){g8(e,s)}while(!0);C4(),E_.current=i,ft=o,Pr!==null?t=0:(Zr=null,lo=0,t=$r)}if(t!==0){if(t===2&&(o=EP(e),o!==0&&(n=o,t=n4(e,o))),t===1)throw r=$g,wd(e,0),Ol(e,n),xn(e,_r()),r;if(t===6)Ol(e,n);else{if(o=e.current.alternate,(n&30)===0&&!fie(o)&&(t=A_(e,n),t===2&&(i=EP(e),i!==0&&(n=i,t=n4(e,i))),t===1))throw r=$g,wd(e,0),Ol(e,n),xn(e,_r()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(ie(345));case 2:bd(e,pn,Is);break;case 3:if(Ol(e,n),(n&130023424)===n&&(t=j4+500-_r(),10<t)){if(h_(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){jo(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=LP(bd.bind(null,e,pn,Is),t);break}bd(e,pn,Is);break;case 4:if(Ol(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var a=31-Wi(n);i=1<<a,a=t[a],a>o&&(o=a),n&=~i}if(n=o,n=_r()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*uie(n/1960))-n,10<n){e.timeoutHandle=LP(bd.bind(null,e,pn,Is),n);break}bd(e,pn,Is);break;case 5:bd(e,pn,Is);break;default:throw Error(ie(329))}}}return xn(e,_r()),e.callbackNode===r?h8.bind(null,e):null}function n4(e,t){var r=pg;return e.current.memoizedState.isDehydrated&&(wd(e,t).flags|=256),e=A_(e,t),e!==2&&(t=pn,pn=r,t!==null&&i4(t)),e}function i4(e){pn===null?pn=e:pn.push.apply(pn,e)}function fie(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Gi(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Ol(e,t){for(t&=~B4,t&=~H_,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Wi(t),n=1<<r;e[r]=-1,t&=~n}}function kB(e){if((ft&6)!==0)throw Error(ie(327));Hf();var t=h_(e,0);if((t&1)===0)return xn(e,_r()),null;var r=A_(e,t);if(e.tag!==0&&r===2){var n=EP(e);n!==0&&(t=n,r=n4(e,n))}if(r===1)throw r=$g,wd(e,0),Ol(e,t),xn(e,_r()),r;if(r===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bd(e,pn,Is),xn(e,_r()),null}function U4(e,t){var r=ft;ft|=1;try{return e(t)}finally{ft=r,ft===0&&(Qf=_r()+500,B_&&Kl())}}function Rd(e){Nl!==null&&Nl.tag===0&&(ft&6)===0&&Hf();var t=ft;ft|=1;var r=ii.transition,n=St;try{if(ii.transition=null,St=1,e)return e()}finally{St=n,ii.transition=r,ft=t,(ft&6)===0&&Kl()}}function V4(){Fn=Lf.current,Wt(Lf)}function wd(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Une(r)),Pr!==null)for(r=Pr.return;r!==null;){var n=r;switch(w4(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&y_();break;case 3:Kf(),Wt(gn),Wt(Po),$4();break;case 5:T4(n);break;case 4:Kf();break;case 13:Wt(ar);break;case 19:Wt(ar);break;case 10:P4(n.type._context);break;case 22:case 23:V4()}r=r.return}if(Zr=e,Pr=e=Hl(e.current,null),lo=Fn=t,$r=0,$g=null,B4=H_=Dd=0,pn=pg=null,_d!==null){for(t=0;t<_d.length;t++)if(r=_d[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=o,n.next=a}r.pending=n}_d=null}return e}function g8(e,t){do{var r=Pr;try{if(C4(),i_.current=R_,D_){for(var n=sr.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}D_=!1}if(Pd=0,Wr=Tr=sr=null,fg=!1,Rg=0,M4.current=null,r===null||r.return===null){$r=1,$g=t,Pr=null;break}e:{var i=e,a=r.return,s=r,l=t;if(t=lo,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=s,u=d.tag;if((d.mode&1)===0&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=fB(a);if(m!==null){m.flags&=-257,mB(m,a,s,i,t),m.mode&1&&uB(i,c,t),t=m,l=c;var p=t.updateQueue;if(p===null){var h=new Set;h.add(l),t.updateQueue=h}else p.add(l);break e}else{if((t&1)===0){uB(i,c,t),H4();break e}l=Error(ie(426))}}else if(Qt&&s.mode&1){var b=fB(a);if(b!==null){(b.flags&65536)===0&&(b.flags|=256),mB(b,a,s,i,t),S4(Xf(l,s));break e}}i=l=Xf(l,s),$r!==4&&($r=2),pg===null?pg=[i]:pg.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=J7(i,l,t);iB(i,v);break e;case 1:s=l;var x=i.type,_=i.stateNode;if((i.flags&128)===0&&(typeof x.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Ul===null||!Ul.has(_)))){i.flags|=65536,t&=-t,i.lanes|=t;var I=e8(i,s,t);iB(i,I);break e}}i=i.return}while(i!==null)}b8(r)}catch(S){t=S,Pr===r&&r!==null&&(Pr=r=r.return);continue}break}while(!0)}function v8(){var e=E_.current;return E_.current=R_,e===null?R_:e}function H4(){($r===0||$r===3||$r===2)&&($r=4),Zr===null||(Dd&268435455)===0&&(H_&268435455)===0||Ol(Zr,lo)}function A_(e,t){var r=ft;ft|=2;var n=v8();(Zr!==e||lo!==t)&&(Is=null,wd(e,t));do try{mie();break}catch(o){g8(e,o)}while(!0);if(C4(),ft=r,E_.current=n,Pr!==null)throw Error(ie(261));return Zr=null,lo=0,$r}function mie(){for(;Pr!==null;)x8(Pr)}function pie(){for(;Pr!==null&&!joe();)x8(Pr)}function x8(e){var t=_8(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,t===null?b8(e):Pr=t,M4.current=null}function b8(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=aie(r,t,Fn),r!==null){Pr=r;return}}else{if(r=sie(r,t),r!==null){r.flags&=32767,Pr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{$r=6,Pr=null;return}}if(t=t.sibling,t!==null){Pr=t;return}Pr=t=e}while(t!==null);$r===0&&($r=5)}function bd(e,t,r){var n=St,o=ii.transition;try{ii.transition=null,St=1,hie(e,t,r,n)}finally{ii.transition=o,St=n}return null}function hie(e,t,r,n){do Hf();while(Nl!==null);if((ft&6)!==0)throw Error(ie(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Qoe(e,i),e===Zr&&(Pr=Zr=null,lo=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||e_||(e_=!0,I8(p_,function(){return Hf(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=ii.transition,ii.transition=null;var a=St;St=1;var s=ft;ft|=4,M4.current=null,cie(e,r),m8(r,e),Fne(NP),g_=!!zP,NP=zP=null,e.current=r,die(r,e,o),Uoe(),ft=s,St=a,ii.transition=i}else e.current=r;if(e_&&(e_=!1,Nl=e,$_=o),i=e.pendingLanes,i===0&&(Ul=null),Woe(r.stateNode,n),xn(e,_r()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(T_)throw T_=!1,e=r4,r4=null,e;return($_&1)!==0&&e.tag!==0&&Hf(),i=e.pendingLanes,(i&1)!==0?e===o4?hg++:(hg=0,o4=e):hg=0,Kl(),null}function Hf(){if(Nl!==null){var e=JB($_),t=ii.transition,r=St;try{if(ii.transition=null,St=16>e?16:e,Nl===null)var n=!1;else{if(e=Nl,Nl=null,$_=0,(ft&6)!==0)throw Error(ie(331));var o=ft;for(ft|=4,_e=e.current;_e!==null;){var i=_e,a=i.child;if((_e.flags&16)!==0){var s=i.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(_e=c;_e!==null;){var d=_e;switch(d.tag){case 0:case 11:case 15:mg(8,d,i)}var u=d.child;if(u!==null)u.return=d,_e=u;else for(;_e!==null;){d=_e;var f=d.sibling,m=d.return;if(d8(d),d===c){_e=null;break}if(f!==null){f.return=m,_e=f;break}_e=m}}}var p=i.alternate;if(p!==null){var h=p.child;if(h!==null){p.child=null;do{var b=h.sibling;h.sibling=null,h=b}while(h!==null)}}_e=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,_e=a;else e:for(;_e!==null;){if(i=_e,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:mg(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,_e=v;break e}_e=i.return}}var x=e.current;for(_e=x;_e!==null;){a=_e;var _=a.child;if((a.subtreeFlags&2064)!==0&&_!==null)_.return=a,_e=_;else e:for(a=x;_e!==null;){if(s=_e,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:V_(9,s)}}catch(S){pr(s,s.return,S)}if(s===a){_e=null;break e}var I=s.sibling;if(I!==null){I.return=s.return,_e=I;break e}_e=s.return}}if(ft=o,Kl(),wa&&typeof wa.onPostCommitFiberRoot=="function")try{wa.onPostCommitFiberRoot(z_,e)}catch{}n=!0}return n}finally{St=r,ii.transition=t}}return!1}function CB(e,t,r){t=Xf(r,t),t=J7(e,t,1),e=jl(e,t,1),t=jo(),e!==null&&(Ag(e,1,t),xn(e,t))}function pr(e,t,r){if(e.tag===3)CB(e,e,r);else for(;t!==null;){if(t.tag===3){CB(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ul===null||!Ul.has(n))){e=Xf(r,e),e=e8(t,e,1),t=jl(t,e,1),e=jo(),t!==null&&(Ag(t,1,e),xn(t,e));break}}t=t.return}}function gie(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=jo(),e.pingedLanes|=e.suspendedLanes&r,Zr===e&&(lo&r)===r&&($r===4||$r===3&&(lo&130023424)===lo&&500>_r()-j4?wd(e,0):B4|=r),xn(e,t)}function y8(e,t){t===0&&((e.mode&1)===0?t=1:(t=By,By<<=1,(By&130023424)===0&&(By=4194304)));var r=jo();e=Rs(e,t),e!==null&&(Ag(e,t,r),xn(e,r))}function vie(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),y8(e,r)}function xie(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ie(314))}n!==null&&n.delete(t),y8(e,r)}var _8;_8=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)hn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return hn=!1,iie(e,t,r);hn=(e.flags&131072)!==0}else hn=!1,Qt&&(t.flags&1048576)!==0&&k7(t,w_,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;s_(e,t),e=t.pendingProps;var o=Zf(t,Po.current);Vf(t,r),o=O4(null,t,n,e,o,r);var i=z4();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vn(n)?(i=!0,__(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,R4(t),o.updater=U_,t.stateNode=o,o._reactInternals=t,WP(t,n,e,r),t=qP(null,t,n,!0,i,r)):(t.tag=0,Qt&&i&&I4(t),Bo(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(s_(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=yie(n),e=Ui(n,e),o){case 0:t=GP(null,t,n,e,r);break e;case 1:t=gB(null,t,n,e,r);break e;case 11:t=pB(null,t,n,e,r);break e;case 14:t=hB(null,t,n,Ui(n.type,e),r);break e}throw Error(ie(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ui(n,o),GP(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ui(n,o),gB(e,t,n,o,r);case 3:e:{if(n8(t),e===null)throw Error(ie(387));n=t.pendingProps,i=t.memoizedState,o=i.element,T7(e,t),C_(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Xf(Error(ie(423)),t),t=vB(e,t,n,r,o);break e}else if(n!==o){o=Xf(Error(ie(424)),t),t=vB(e,t,n,r,o);break e}else for(Ln=Bl(t.stateNode.containerInfo.firstChild),Mn=t,Qt=!0,Hi=null,r=R7(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Gf(),n===o){t=Es(e,t,r);break e}Bo(e,t,n,r)}t=t.child}return t;case 5:return $7(t),e===null&&UP(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,FP(n,o)?a=null:i!==null&&FP(n,i)&&(t.flags|=32),o8(e,t),Bo(e,t,a,r),t.child;case 6:return e===null&&UP(t),null;case 13:return i8(e,t,r);case 4:return E4(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=qf(t,null,n,r):Bo(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ui(n,o),pB(e,t,n,o,r);case 7:return Bo(e,t,t.pendingProps,r),t.child;case 8:return Bo(e,t,t.pendingProps.children,r),t.child;case 12:return Bo(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,zt(S_,n._currentValue),n._currentValue=a,i!==null)if(Gi(i.value,a)){if(i.children===o.children&&!gn.current){t=Es(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Cs(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),VP(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ie(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),VP(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Bo(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Vf(t,r),o=ai(o),n=n(o),t.flags|=1,Bo(e,t,n,r),t.child;case 14:return n=t.type,o=Ui(n,t.pendingProps),o=Ui(n.type,o),hB(e,t,n,o,r);case 15:return t8(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ui(n,o),s_(e,t),t.tag=1,vn(n)?(e=!0,__(t)):e=!1,Vf(t,r),Y7(t,n,o),WP(t,n,o,r),qP(null,t,n,!0,e,r);case 19:return a8(e,t,r);case 22:return r8(e,t,r)}throw Error(ie(156,t.tag))};function I8(e,t){return KB(e,t)}function bie(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ni(e,t,r,n){return new bie(e,t,r,n)}function W4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yie(e){if(typeof e=="function")return W4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===d4)return 11;if(e===u4)return 14}return 2}function Hl(e,t){var r=e.alternate;return r===null?(r=ni(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function d_(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")W4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Df:return Sd(r.children,o,i,t);case c4:a=8,o|=8;break;case hP:return e=ni(12,r,t,o|2),e.elementType=hP,e.lanes=i,e;case gP:return e=ni(13,r,t,o),e.elementType=gP,e.lanes=i,e;case vP:return e=ni(19,r,t,o),e.elementType=vP,e.lanes=i,e;case $B:return W_(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case EB:a=10;break e;case TB:a=9;break e;case d4:a=11;break e;case u4:a=14;break e;case Tl:a=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=ni(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Sd(e,t,r,n){return e=ni(7,e,n,t),e.lanes=r,e}function W_(e,t,r,n){return e=ni(22,e,n,t),e.elementType=$B,e.lanes=r,e.stateNode={isHidden:!1},e}function fP(e,t,r){return e=ni(6,e,null,t),e.lanes=r,e}function mP(e,t,r){return t=ni(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _ie(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=X2(0),this.expirationTimes=X2(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=X2(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Z4(e,t,r,n,o,i,a,s,l){return e=new _ie(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ni(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},R4(i),e}function Iie(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pf,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function w8(e){if(!e)return Zl;e=e._reactInternals;e:{if(Td(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var r=e.type;if(vn(r))return w7(e,r,t)}return t}function S8(e,t,r,n,o,i,a,s,l){return e=Z4(r,n,!0,e,o,i,a,s,l),e.context=w8(null),r=e.current,n=jo(),o=Vl(r),i=Cs(n,o),i.callback=t??null,jl(r,i,o),e.current.lanes=o,Ag(e,o,n),xn(e,n),e}function Z_(e,t,r,n){var o=t.current,i=jo(),a=Vl(o);return r=w8(r),t.context===null?t.context=r:t.pendingContext=r,t=Cs(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=jl(o,t,a),e!==null&&(Zi(e,o,a,i),n_(e,o,a)),a}function O_(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function PB(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function G4(e,t){PB(e,t),(e=e.alternate)&&PB(e,t)}function wie(){return null}var k8=typeof reportError=="function"?reportError:function(e){console.error(e)};function q4(e){this._internalRoot=e}G_.prototype.render=q4.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));Z_(e,t,null,null)};G_.prototype.unmount=q4.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rd(function(){Z_(null,e,null,null)}),t[Ds]=null}};function G_(e){this._internalRoot=e}G_.prototype.unstable_scheduleHydration=function(e){if(e){var t=r7();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Al.length&&t!==0&&t<Al[r].priority;r++);Al.splice(r,0,e),r===0&&n7(e)}};function K4(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function q_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function DB(){}function Sie(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=O_(a);i.call(c)}}var a=S8(t,n,e,0,null,!1,!1,"",DB);return e._reactRootContainer=a,e[Ds]=a.current,Sg(e.nodeType===8?e.parentNode:e),Rd(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var s=n;n=function(){var c=O_(l);s.call(c)}}var l=Z4(e,0,!1,null,null,!1,!1,"",DB);return e._reactRootContainer=l,e[Ds]=l.current,Sg(e.nodeType===8?e.parentNode:e),Rd(function(){Z_(t,l,r,n)}),l}function K_(e,t,r,n,o){var i=r._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var s=o;o=function(){var l=O_(a);s.call(l)}}Z_(t,a,e,o)}else a=Sie(r,t,e,o,n);return O_(a)}e7=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ig(t.pendingLanes);r!==0&&(p4(t,r|1),xn(t,_r()),(ft&6)===0&&(Qf=_r()+500,Kl()))}break;case 13:Rd(function(){var n=Rs(e,1);if(n!==null){var o=jo();Zi(n,e,1,o)}}),G4(e,1)}};h4=function(e){if(e.tag===13){var t=Rs(e,134217728);if(t!==null){var r=jo();Zi(t,e,134217728,r)}G4(e,134217728)}};t7=function(e){if(e.tag===13){var t=Vl(e),r=Rs(e,t);if(r!==null){var n=jo();Zi(r,e,t,n)}G4(e,t)}};r7=function(){return St};o7=function(e,t){var r=St;try{return St=e,t()}finally{St=r}};PP=function(e,t,r){switch(t){case"input":if(yP(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=M_(n);if(!o)throw Error(ie(90));OB(n),yP(n,o)}}}break;case"textarea":NB(e,r);break;case"select":t=r.value,t!=null&&Mf(e,!!r.multiple,t,!1)}};VB=U4;HB=Rd;var kie={usingClientEntryPoint:!1,Events:[zg,$f,M_,jB,UB,U4]},tg={findFiberByHostInstance:yd,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Cie={bundleType:tg.bundleType,version:tg.version,rendererPackageName:tg.rendererPackageName,rendererConfig:tg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ts.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=GB(e),e===null?null:e.stateNode},findFiberByHostInstance:tg.findFiberByHostInstance||wie,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(rg=__REACT_DEVTOOLS_GLOBAL_HOOK__,!rg.isDisabled&&rg.supportsFiber))try{z_=rg.inject(Cie),wa=rg}catch{}var rg;Un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kie;Un.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!K4(t))throw Error(ie(200));return Iie(e,t,null,r)};Un.createRoot=function(e,t){if(!K4(e))throw Error(ie(299));var r=!1,n="",o=k8;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Z4(e,1,!1,null,null,r,!1,n,o),e[Ds]=t.current,Sg(e.nodeType===8?e.parentNode:e),new q4(t)};Un.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=GB(t),e=e===null?null:e.stateNode,e};Un.flushSync=function(e){return Rd(e)};Un.hydrate=function(e,t,r){if(!q_(t))throw Error(ie(200));return K_(null,e,t,!0,r)};Un.hydrateRoot=function(e,t,r){if(!K4(e))throw Error(ie(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",a=k8;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=S8(t,null,e,1,r??null,o,!1,i,a),e[Ds]=t.current,Sg(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new G_(t)};Un.render=function(e,t,r){if(!q_(t))throw Error(ie(200));return K_(null,e,t,!1,r)};Un.unmountComponentAtNode=function(e){if(!q_(e))throw Error(ie(40));return e._reactRootContainer?(Rd(function(){K_(null,null,e,!1,function(){e._reactRootContainer=null,e[Ds]=null})}),!0):!1};Un.unstable_batchedUpdates=U4;Un.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!q_(r))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return K_(e,t,r,!1,n)};Un.version="18.3.1-next-f1338f8080-20240426"});var Xl=ma((pRe,D8)=>{"use strict";function P8(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P8)}catch(e){console.error(e)}}P8(),D8.exports=C8()});var bZ=ma(YR=>{"use strict";var xZ=Xl();YR.createRoot=xZ.createRoot,YR.hydrateRoot=xZ.hydrateRoot;var zlt});var Hee=ma((iIt,Vee)=>{"use strict";Vee.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var mn=function(){return mn=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},mn.apply(this,arguments)};function Jb(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function VN(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var sy=y(R());var bo=y(R());var td="right-scroll-bar-position",rd="width-before-scroll-bar",qC="with-scroll-bars-hidden",KC="--removed-body-scroll-bar-size";function oy(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var oF=y(R());function nF(e,t){var r=(0,oF.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var ny=y(R());var lre=typeof window<"u"?ny.useLayoutEffect:ny.useEffect,iF=new WeakMap;function XC(e,t){var r=nF(t||null,function(n){return e.forEach(function(o){return oy(o,n)})});return lre(function(){var n=iF.get(r);if(n){var o=new Set(n),i=new Set(e),a=r.current;o.forEach(function(s){i.has(s)||oy(s,null)}),i.forEach(function(s){o.has(s)||oy(s,a)})}iF.set(r,e)},[e]),r}function cre(e){return e}function dre(e,t){t===void 0&&(t=cre);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),r}}}};return o}function QC(e){e===void 0&&(e={});var t=dre(null);return t.options=mn({async:!0,ssr:!1},e),t}var aF=y(R()),sF=function(e){var t=e.sideCar,r=Jb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return aF.createElement(n,mn({},r))};sF.isSideCarExport=!0;function YC(e,t){return e.useMedium(t),sF}var iy=QC();var JC=function(){},Ph=bo.forwardRef(function(e,t){var r=bo.useRef(null),n=bo.useState({onScrollCapture:JC,onWheelCapture:JC,onTouchMoveCapture:JC}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,m=e.noRelative,p=e.noIsolation,h=e.inert,b=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,_=e.gapMode,I=Jb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,w=XC([r,t]),P=mn(mn({},I),o);return bo.createElement(bo.Fragment,null,d&&bo.createElement(S,{sideCar:iy,removeScrollBar:c,shards:u,noRelative:m,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:_}),a?bo.cloneElement(bo.Children.only(s),mn(mn({},P),{ref:w})):bo.createElement(x,mn({},P,{className:l,ref:w}),s))});Ph.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ph.classNames={fullWidth:rd,zeroRight:td};var Ut=y(R());var df=y(R());var dF=y(R());var lF;var cF=function(){if(lF)return lF;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ure(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cF();return t&&e.setAttribute("nonce",t),e}function fre(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mre(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var e2=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ure())&&(fre(t,r),mre(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var t2=function(){var e=e2();return function(t,r){dF.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Dh=function(){var e=t2(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var pre={left:0,top:0,right:0,gap:0},r2=function(e){return parseInt(e||"",10)||0},hre=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[r2(r),r2(n),r2(o)]},o2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pre;var t=hre(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var gre=Dh(),cf="data-scroll-locked",vre=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
9
+ .`.concat(qC,` {
10
+ overflow: hidden `).concat(n,`;
11
+ padding-right: `).concat(s,"px ").concat(n,`;
12
+ }
13
+ body[`).concat(cf,`] {
14
+ overflow: hidden `).concat(n,`;
15
+ overscroll-behavior: contain;
16
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
17
+ padding-left: `.concat(o,`px;
18
+ padding-top: `).concat(i,`px;
19
+ padding-right: `).concat(a,`px;
20
+ margin-left:0;
21
+ margin-top:0;
22
+ margin-right: `).concat(s,"px ").concat(n,`;
23
+ `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
24
+ }
25
+
26
+ .`).concat(td,` {
27
+ right: `).concat(s,"px ").concat(n,`;
28
+ }
29
+
30
+ .`).concat(rd,` {
31
+ margin-right: `).concat(s,"px ").concat(n,`;
32
+ }
33
+
34
+ .`).concat(td," .").concat(td,` {
35
+ right: 0 `).concat(n,`;
36
+ }
37
+
38
+ .`).concat(rd," .").concat(rd,` {
39
+ margin-right: 0 `).concat(n,`;
40
+ }
41
+
42
+ body[`).concat(cf,`] {
43
+ `).concat(KC,": ").concat(s,`px;
44
+ }
45
+ `)},uF=function(){var e=parseInt(document.body.getAttribute(cf)||"0",10);return isFinite(e)?e:0},xre=function(){df.useEffect(function(){return document.body.setAttribute(cf,(uF()+1).toString()),function(){var e=uF()-1;e<=0?document.body.removeAttribute(cf):document.body.setAttribute(cf,e.toString())}},[])},n2=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;xre();var i=df.useMemo(function(){return o2(o)},[o]);return df.createElement(gre,{styles:vre(i,!t,o,r?"":"!important")})};var i2=!1;if(typeof window<"u")try{Rh=Object.defineProperty({},"passive",{get:function(){return i2=!0,!0}}),window.addEventListener("test",Rh,Rh),window.removeEventListener("test",Rh,Rh)}catch{i2=!1}var Rh,od=i2?{passive:!1}:!1;var bre=function(e){return e.tagName==="TEXTAREA"},fF=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!bre(e)&&r[t]==="visible")},yre=function(e){return fF(e,"overflowY")},_re=function(e){return fF(e,"overflowX")},a2=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=mF(e,n);if(o){var i=pF(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Ire=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},wre=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},mF=function(e,t){return e==="v"?yre(t):_re(t)},pF=function(e,t){return e==="v"?Ire(t):wre(t)},Sre=function(e,t){return e==="h"&&t==="rtl"?-1:1},hF=function(e,t,r,n,o){var i=Sre(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,d=a>0,u=0,f=0;do{if(!s)break;var m=pF(e,s),p=m[0],h=m[1],b=m[2],v=h-b-i*p;(p||v)&&mF(e,s)&&(u+=v,f+=p);var x=s.parentNode;s=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&Math.abs(u)<1||!o&&a>u)||!d&&(o&&Math.abs(f)<1||!o&&-a>f))&&(c=!0),c};var ay=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gF=function(e){return[e.deltaX,e.deltaY]},vF=function(e){return e&&"current"in e?e.current:e},kre=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cre=function(e){return`
46
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
47
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
48
+ `)},Pre=0,uf=[];function xF(e){var t=Ut.useRef([]),r=Ut.useRef([0,0]),n=Ut.useRef(),o=Ut.useState(Pre++)[0],i=Ut.useState(Dh)[0],a=Ut.useRef(e);Ut.useEffect(function(){a.current=e},[e]),Ut.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=VN([e.lockRef.current],(e.shards||[]).map(vF),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Ut.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var v=ay(h),x=r.current,_="deltaX"in h?h.deltaX:x[0]-v[0],I="deltaY"in h?h.deltaY:x[1]-v[1],S,w=h.target,P=Math.abs(_)>Math.abs(I)?"h":"v";if("touches"in h&&P==="h"&&w.type==="range")return!1;var E=window.getSelection(),B=E&&E.anchorNode,H=B?B===w||B.contains(w):!1;if(H)return!1;var Z=a2(P,w);if(!Z)return!0;if(Z?S=P:(S=P==="v"?"h":"v",Z=a2(P,w)),!Z)return!1;if(!n.current&&"changedTouches"in h&&(_||I)&&(n.current=S),!S)return!0;var K=n.current||S;return hF(K,b,h,K==="h"?_:I,!0)},[]),l=Ut.useCallback(function(h){var b=h;if(!(!uf.length||uf[uf.length-1]!==i)){var v="deltaY"in b?gF(b):ay(b),x=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&kre(S.delta,v)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var _=(a.current.shards||[]).map(vF).filter(Boolean).filter(function(S){return S.contains(b.target)}),I=_.length>0?s(b,_[0]):!a.current.noIsolation;I&&b.cancelable&&b.preventDefault()}}},[]),c=Ut.useCallback(function(h,b,v,x){var _={name:h,delta:b,target:v,should:x,shadowParent:Dre(v)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(I){return I!==_})},1)},[]),d=Ut.useCallback(function(h){r.current=ay(h),n.current=void 0},[]),u=Ut.useCallback(function(h){c(h.type,gF(h),h.target,s(h,e.lockRef.current))},[]),f=Ut.useCallback(function(h){c(h.type,ay(h),h.target,s(h,e.lockRef.current))},[]);Ut.useEffect(function(){return uf.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",l,od),document.addEventListener("touchmove",l,od),document.addEventListener("touchstart",d,od),function(){uf=uf.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,od),document.removeEventListener("touchmove",l,od),document.removeEventListener("touchstart",d,od)}},[]);var m=e.removeScrollBar,p=e.inert;return Ut.createElement(Ut.Fragment,null,p?Ut.createElement(i,{styles:Cre(o)}):null,m?Ut.createElement(n2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Dre(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bF=YC(iy,xF);var yF=sy.forwardRef(function(e,t){return sy.createElement(Ph,mn({},e,{ref:t,sideCar:bF}))});yF.classNames=Ph.classNames;var Ni=yF;function ut(e){return Object.keys(e)}function s2(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Eh(e,t){let r={...e},n=t;return s2(e)&&s2(t)&&Object.keys(t).forEach(o=>{s2(n[o])&&o in e?r[o]=Eh(r[o],n[o]):r[o]=n[o]}),r}function _F(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Rre(e){return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function wl(e){let t=Rre(e);return typeof t=="number"?t:typeof t=="string"?t.includes("calc")||t.includes("var")?t:t.includes("px")?Number(t.replace("px","")):t.includes("rem")?Number(t.replace("rem",""))*16:t.includes("em")?Number(t.replace("em",""))*16:Number(t):NaN}function l2(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function IF(e,{shouldScale:t=!1}={}){function r(n){if(n===0||n==="0")return`0${e}`;if(typeof n=="number"){let o=`${n/16}${e}`;return t?l2(o):o}if(typeof n=="string"){if(n===""||n.startsWith("calc(")||n.startsWith("clamp(")||n.includes("rgba("))return n;if(n.includes(","))return n.split(",").map(i=>r(i)).join(",");if(n.includes(" "))return n.split(" ").map(i=>r(i)).join(" ");if(n.includes(e))return t?l2(n):n;let o=n.replace("px","");if(!Number.isNaN(Number(o))){let i=`${Number(o)/16}${e}`;return t?l2(i):i}}return n}return r}var W=IF("rem",{shouldScale:!0}),nd=IF("em");function vs(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}function ly(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(n=>t.test(n))}return!1}var wF=y(R(),1);function yo(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==wF.Fragment:!1}var PF=y(O(),1),dy=y(R(),1);function Vt(e){let t=(0,dy.createContext)(null);return[({children:o,value:i})=>(0,PF.jsx)(t.Provider,{value:i,children:o}),()=>{let o=(0,dy.useContext)(t);if(o===null)throw new Error(e);return o}]}var DF=y(O(),1),uy=y(R(),1);function _o(e=null){let t=(0,uy.createContext)(e);return[({children:o,value:i})=>(0,DF.jsx)(t.Provider,{value:i,children:o}),()=>(0,uy.useContext)(t)]}function ff(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function Nre(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function Fre(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].disabled)return n}return e}function Lre(e,t,r){return ff(e,r)===ff(t,r)}function RF({parentSelector:e,siblingSelector:t,onKeyDown:r,loop:n=!0,activateOnFocus:o=!1,dir:i="rtl",orientation:a}){return s=>{r?.(s);let l=Array.from(ff(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(p=>Lre(s.currentTarget,p,e)),c=l.findIndex(p=>s.currentTarget===p),d=Fre(c,l,n),u=Nre(c,l,n),f=i==="rtl"?u:d,m=i==="rtl"?d:u;switch(s.key){case"ArrowRight":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[f].focus(),o&&l[f].click());break}case"ArrowLeft":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[m].focus(),o&&l[m].click());break}case"ArrowUp":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[u].focus(),o&&l[u].click());break}case"ArrowDown":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[d].focus(),o&&l[d].click());break}case"Home":{s.stopPropagation(),s.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();let p=l.length-1;!l[p].disabled&&l[p].focus();break}}}}var Mre={app:100,modal:200,popover:300,overlay:400,max:9999};function Pt(e){return Mre[e]}var id=()=>{};function EF(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||id:r=>{r.key==="Escape"&&(e(r),t.onTrigger?.())}}function ge(e,t="size",r=!0){if(e!==void 0)return ly(e)?r?W(e):e:`var(--${t}-${e})`}function Tt(e){return ge(e,"mantine-spacing")}function Ee(e){return e===void 0?"var(--mantine-radius-default)":ge(e,"mantine-radius")}function wt(e){return ge(e,"mantine-font-size")}function TF(e){return ge(e,"mantine-line-height",!1)}function mf(e){if(e)return ge(e,"mantine-shadow",!1)}function zn(e,t){return r=>{e?.(r),t?.(r)}}function pf(e,t){return e in t?wl(t[e]):wl(e)}function Th(e,t){let r=e.map(n=>({value:n,px:pf(n,t)}));return r.sort((n,o)=>n.px-o.px),r}function ad(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function $F(e,t,r){return r?Array.from(ff(r,t)?.querySelectorAll(e)||[]).findIndex(n=>n===r):null}var AF=y(R(),1);function OF(){let[e,t]=(0,AF.useState)(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function Sl(e,t,r){return t===void 0&&r===void 0?e:t!==void 0&&r===void 0?Math.max(e,t):Math.min(t===void 0&&r!==void 0?e:Math.max(e,t),r)}function Io(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function zF(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=Object.keys(e),{length:n}=r;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1){let i=r[o];if(!(i in t)||e[i]!==t[i]&&!(Number.isNaN(e[i])&&Number.isNaN(t[i])))return!1}return!0}var hf=y(R(),1);function Fi(e){let t=(0,hf.useRef)(e);return(0,hf.useEffect)(()=>{t.current=e}),(0,hf.useMemo)(()=>(...r)=>t.current?.(...r),[])}var sd=y(R(),1);function xs(e,t){let r=typeof t=="number"?t:t.delay,n=typeof t=="number"?!1:t.flushOnUnmount,o=Fi(e),i=(0,sd.useRef)(0),a=(0,sd.useRef)(()=>{}),s=Object.assign((0,sd.useCallback)((...l)=>{window.clearTimeout(i.current);let c=()=>{i.current!==0&&(i.current=0,o(...l))};a.current=c,s.flush=c,i.current=window.setTimeout(c,r)},[o,r]),{flush:a.current});return(0,sd.useEffect)(()=>()=>{window.clearTimeout(i.current),n&&s.flush()},[s,n]),s}var fy=y(R(),1),NF=["mousedown","touchstart"];function c2(e,t,r){let n=(0,fy.useRef)(null);return(0,fy.useEffect)(()=>{let o=i=>{let{target:a}=i??{};if(Array.isArray(r)){let s=a?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(a)&&a.tagName!=="HTML";r.every(c=>!!c&&!i.composedPath().includes(c))&&!s&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||NF).forEach(i=>document.addEventListener(i,o)),()=>{(t||NF).forEach(i=>document.removeEventListener(i,o))}},[n,e,r]),n}var gf=y(R(),1);function Bre(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function jre(e,t){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function ld(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[n,o]=(0,gf.useState)(r?t:jre(e)),i=(0,gf.useRef)(null);return(0,gf.useEffect)(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),Bre(i.current,a=>o(a.matches))},[e]),n}function $h(e,t){return ld("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}var my=y(R(),1),Mo=typeof document<"u"?my.useLayoutEffect:my.useEffect;var FF=y(R(),1);var Ah=y(R(),1);function br(e,t){let r=(0,Ah.useRef)(!1);(0,Ah.useEffect)(()=>()=>{r.current=!1},[]),(0,Ah.useEffect)(()=>{if(r.current)return e();r.current=!0},t)}function Oh({opened:e,shouldReturnFocus:t=!0}){let r=(0,FF.useRef)(null),n=()=>{r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&r.current?.focus({preventScroll:!0})};return br(()=>{let o=-1,i=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),n}var vf=y(R(),1);var Ure=/input|select|textarea|button|object/,d2="a, input, select, textarea, button, object, [tabindex]";function Vre(e){return e.style.display==="none"}function Hre(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(Vre(r))return!1;r=r.parentNode}return!0}function LF(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function py(e){let t=e.nodeName.toLowerCase(),r=!Number.isNaN(LF(e));return(Ure.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&Hre(e)}function u2(e){let t=LF(e);return(Number.isNaN(t)||t>=0)&&py(e)}function MF(e){return Array.from(e.querySelectorAll(d2)).filter(u2)}function BF(e,t){let r=MF(e);if(!r.length){t.preventDefault();return}let n=r[t.shiftKey?0:r.length-1],o=e.getRootNode(),i=n===o.activeElement||e===o.activeElement,a=o.activeElement;if(a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(i=r.filter(d=>d.getAttribute("type")==="radio"&&d.getAttribute("name")===a.getAttribute("name")).includes(n)),!i)return;t.preventDefault();let l=r[t.shiftKey?r.length-1:0];l&&l.focus()}function f2(e=!0){let t=(0,vf.useRef)(null),r=o=>{let i=o.querySelector("[data-autofocus]");if(!i){let a=Array.from(o.querySelectorAll(d2));i=a.find(u2)||a.find(py)||null,!i&&py(o)&&(i=o)}i&&i.focus({preventScroll:!0})},n=(0,vf.useCallback)(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&r(o)}),t.current=o):t.current=null)},[e]);return(0,vf.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));let o=i=>{i.key==="Tab"&&t.current&&BF(t.current,i)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),n}var jF=y(R(),1),Wre=e=>(e+1)%1e6;function m2(){let[,e]=(0,jF.useReducer)(Wre,0);return e}var HF=y(R(),1);var UF=y(R(),1),Zre=UF.default.useId||(()=>{});function VF(){let e=Zre();return e?`mantine-${e.replace(/:/g,"")}`:""}function pt(e){let t=VF(),[r,n]=(0,HF.useState)(t);return Mo(()=>{n(Io())},[]),typeof e=="string"?e:typeof window>"u"?t:r}var bs=y(R(),1);var WF=y(R(),1);function kl(e,t,r){(0,WF.useEffect)(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Gre(e,t="use-local-storage"){try{return JSON.stringify(e)}catch{throw new Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function ZF(e){try{return e&&JSON.parse(e)}catch{return e}}function GF(e){return{getItem:o=>{try{return window[e].getItem(o)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(o,i)=>{try{window[e].setItem(o,i)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:o=>{try{window[e].removeItem(o)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function qF(e,t){let r=e==="localStorage"?"mantine-local-storage":"mantine-session-storage",{getItem:n,setItem:o,removeItem:i}=GF(e);return function({key:s,defaultValue:l,getInitialValueInEffect:c=!0,sync:d=!0,deserialize:u=ZF,serialize:f=m=>Gre(m,t)}){let m=(0,bs.useCallback)(x=>{let _;try{_=typeof window>"u"||!(e in window)||window[e]===null||!!x}catch{_=!0}if(_)return l;let I=n(s);return I!==null?u(I):l},[s,l]),[p,h]=(0,bs.useState)(m(c)),b=(0,bs.useCallback)(x=>{x instanceof Function?h(_=>{let I=x(_);return o(s,f(I)),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:x(_)}})),I}):(o(s,f(x)),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:x}})),h(x))},[s]),v=(0,bs.useCallback)(()=>{i(s),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:l}}))},[]);return kl("storage",x=>{d&&x.storageArea===window[e]&&x.key===s&&h(u(x.newValue??void 0))}),kl(r,x=>{d&&x.detail.key===s&&h(x.detail.value)}),(0,bs.useEffect)(()=>{l!==void 0&&p===void 0&&b(l)},[l,p,b]),(0,bs.useEffect)(()=>{let x=m();x!==void 0&&b(x)},[s]),[p===void 0?l:p,b,v]}}function KF(e){let{getItem:t}=GF(e);return function({key:n,defaultValue:o,deserialize:i=ZF}){let a;try{a=typeof window>"u"||!(e in window)||window[e]===null}catch{a=!0}if(a)return o;let s=t(n);return s!==null?i(s):o}}function p2(e){return qF("localStorage","use-local-storage")(e)}var qre=KF("localStorage");var XF=y(R(),1);function cd(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function hy(...e){let t=new Map;return r=>{if(e.forEach(n=>{let o=cd(n,r);o&&t.set(n,o)}),t.size>0)return()=>{e.forEach(n=>{let o=t.get(n);o?o():cd(n,null)}),t.clear()}}}function He(...e){return(0,XF.useCallback)(hy(...e),e)}var QF=y(R(),1);function rt({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){let[o,i]=(0,QF.useState)(t!==void 0?t:r),a=(s,...l)=>{i(s),n?.(s,...l)};return e!==void 0?[e,n,!0]:[o,a,!1]}function ys(e,t){return ld("(prefers-reduced-motion: reduce)",e,t)}var zh=y(R(),1);function Kre(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(!zF(e[r],t[r]))return!1;return!0}function Xre(e){let t=(0,zh.useRef)([]),r=(0,zh.useRef)(0);return Kre(t.current,e)||(t.current=e,r.current+=1),[r.current]}function h2(e,t){(0,zh.useEffect)(e,Xre(t))}var JF=y(R(),1);var Qre={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"esc",Esc:"esc",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function gy(e){let t=e.replace("Key","").toLowerCase();return Qre[e]||t}function Yre(e){let t=e.toLowerCase().split("+").map(i=>i.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift"),plus:t.includes("[plus]")},n=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!n.includes(i));return{...r,key:o==="[plus]"?"+":o}}function Jre(e,t,r){let{alt:n,ctrl:o,meta:i,mod:a,shift:s,key:l}=e,{altKey:c,ctrlKey:d,metaKey:u,shiftKey:f,key:m,code:p}=t;if(n!==c)return!1;if(a){if(!d&&!u)return!1}else if(o!==d||i!==u)return!1;return s!==f?!1:!!(l&&(r?gy(p)===gy(l):gy(m??p)===gy(l)))}function YF(e,t){return r=>Jre(Yre(e),r,t)}function eoe(e,t,r=!1){return e.target instanceof HTMLElement?(r||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function Nh(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){(0,JF.useEffect)(()=>{let n=o=>{e.forEach(([i,a,s={preventDefault:!0,usePhysicalKeys:!1}])=>{YF(i,s.usePhysicalKeys)(o)&&eoe(o,t,r)&&(s.preventDefault&&o.preventDefault(),a(o))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}var Li=y(R(),1);function eL(){let e=window.document;return e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement}function toe(){let e=window.document;return typeof e.exitFullscreen=="function"?e.exitFullscreen():typeof e.msExitFullscreen=="function"?e.msExitFullscreen():typeof e.webkitExitFullscreen=="function"?e.webkitExitFullscreen():typeof e.mozCancelFullScreen=="function"?e.mozCancelFullScreen():null}function roe(e){let t=e;return t.requestFullscreen?.()||t.msRequestFullscreen?.()||t.webkitEnterFullscreen?.()||t.webkitRequestFullscreen?.()||t.mozRequestFullscreen?.()}var tL=["","webkit","moz","ms"];function rL(e,{onFullScreen:t,onError:r}){return tL.forEach(n=>{e.addEventListener(`${n}fullscreenchange`,t),e.addEventListener(`${n}fullscreenerror`,r)}),()=>{tL.forEach(n=>{e.removeEventListener(`${n}fullscreenchange`,t),e.removeEventListener(`${n}fullscreenerror`,r)})}}function g2(){let[e,t]=(0,Li.useState)(!1),r=(0,Li.useRef)(null),n=(0,Li.useCallback)(s=>{t(s.target===eL())},[t]),o=(0,Li.useCallback)(s=>{t(!1),console.error(`[@mantine/hooks] use-fullscreen: Error attempting full-screen mode method: ${s} (${s.target})`)},[t]),i=(0,Li.useCallback)(async()=>{eL()?await toe():await roe(r.current)},[]),a=(0,Li.useCallback)(s=>{s===null?r.current=window.document.documentElement:r.current=s},[]);return(0,Li.useEffect)(()=>{if(!r.current&&window.document)return r.current=window.document.documentElement,rL(r.current,{onFullScreen:n,onError:o});if(r.current)return rL(r.current,{onFullScreen:n,onError:o})},[r.current]),{ref:a,toggle:i,fullscreen:e}}var xf=y(R(),1);function v2(e=!1,t){let{onOpen:r,onClose:n}=t||{},[o,i]=(0,xf.useState)(e),a=(0,xf.useCallback)(()=>{i(c=>c||(r?.(),!0))},[r]),s=(0,xf.useCallback)(()=>{i(c=>c&&(n?.(),!1))},[n]),l=(0,xf.useCallback)(()=>{o?s():a()},[s,a,o]);return[o,{open:a,close:s,toggle:l}]}var dd=y(R(),1);function x2(e,t,r={autoInvoke:!1}){let n=(0,dd.useRef)(null),o=(0,dd.useCallback)((...a)=>{n.current||(n.current=window.setTimeout(()=>{e(a),n.current=null},t))},[t]),i=(0,dd.useCallback)(()=>{n.current&&(window.clearTimeout(n.current),n.current=null)},[]);return(0,dd.useEffect)(()=>(r.autoInvoke&&o(),i),[i,o]),{start:o,clear:i}}var vy=y(R(),1);function b2(e){let t=(0,vy.useRef)(void 0);return(0,vy.useEffect)(()=>{t.current=e},[e]),t.current}var Fh=y(R(),1);function y2(e,t,r){let n=(0,Fh.useRef)(null),o=(0,Fh.useRef)(null);return(0,Fh.useEffect)(()=>{let i=typeof r=="function"?r():r;return(i||o.current)&&(n.current=new MutationObserver(e),n.current.observe(i||o.current,t)),()=>{n.current?.disconnect()}},[e,t]),o}var xy=y(R(),1);function _2(){let[e,t]=(0,xy.useState)(!1);return(0,xy.useEffect)(()=>t(!0),[]),e}function ooe(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function I2(e){function t(n){let o=Object.keys(n).reduce((i,a)=>(i[`${e}:${a}`]=s=>n[a](s.detail),i),{});Mo(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function r(n){return(...o)=>ooe(`${e}:${String(n)}`,o[0])}return[t,r]}function by(){return typeof process<"u"&&process.env?"production":"development"}var w2=y(R(),1);function Cl(e){let t=w2.default.version;return typeof w2.default.version!="string"||t.startsWith("18.")?e?.ref:e?.props?.ref}function oL(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=oL(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function noe(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=oL(e))&&(n&&(n+=" "),n+=t);return n}var Ze=noe;var ioe={};function aoe(e){let t={};return e.forEach(r=>{Object.entries(r).forEach(([n,o])=>{t[n]?t[n]=Ze(t[n],o):t[n]=o})}),t}function Mi({theme:e,classNames:t,props:r,stylesCtx:n}){let i=(Array.isArray(t)?t:[t]).map(a=>typeof a=="function"?a(e,r,n):a||ioe);return aoe(i)}function pa({theme:e,styles:t,props:r,stylesCtx:n}){return(Array.isArray(t)?t:[t]).reduce((i,a)=>typeof a=="function"?{...i,...a(e,r,n)}:{...i,...a},{})}var D4e=y(R(),1),R4e=y(O(),1);var yy=y(R(),1),bf=(0,yy.createContext)(null);function ha(){let e=(0,yy.useContext)(bf);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function nL(){return ha().cssVariablesResolver}function iL(){return ha().classNamesPrefix}function Pl(){return ha().getStyleNonce}function aL(){return ha().withStaticClasses}function sL(){return ha().headless}function lL(){return ha().stylesTransform?.sx}function cL(){return ha().stylesTransform?.styles}function _y(){return ha().env||"default"}var oPe=y(R(),1),nPe=y(O(),1);var q2e=y(R(),1),K2e=y(O(),1);function soe(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function loe(e){let t=e.replace("#","");if(t.length===3){let a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}if(t.length===8){let a=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a}}let r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function coe(e){let[t,r,n,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:r,b:n,a:o===void 0?1:o}}function doe(e){let t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=e.match(t);if(!r)return{r:0,g:0,b:0,a:1};let n=parseInt(r[1],10),o=parseInt(r[2],10)/100,i=parseInt(r[3],10)/100,a=r[5]?parseFloat(r[5]):void 0,s=(1-Math.abs(2*i-1))*o,l=n/60,c=s*(1-Math.abs(l%2-1)),d=i-s/2,u,f,m;return l>=0&&l<1?(u=s,f=c,m=0):l>=1&&l<2?(u=c,f=s,m=0):l>=2&&l<3?(u=0,f=s,m=c):l>=3&&l<4?(u=0,f=c,m=s):l>=4&&l<5?(u=c,f=0,m=s):(u=s,f=0,m=c),{r:Math.round((u+d)*255),g:Math.round((f+d)*255),b:Math.round((m+d)*255),a:a||1}}function yf(e){return soe(e)?loe(e):e.startsWith("rgb")?coe(e):e.startsWith("hsl")?doe(e):{r:0,g:0,b:0,a:1}}function Lh(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r,g:n,b:o,a:i}=yf(e),a=1-t,s=l=>Math.round(l*a);return`rgba(${s(r)}, ${s(n)}, ${s(o)}, ${i})`}function _s(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function S2(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function uoe(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function foe(e){if(e.startsWith("oklch("))return(uoe(e)||0)/100;let{r:t,g:r,b:n}=yf(e),o=t/255,i=r/255,a=n/255,s=S2(o),l=S2(i),c=S2(a);return .2126*s+.7152*l+.0722*c}function _f(e,t=.179){return e.startsWith("var(")?!1:foe(e)>t}function yr({color:e,theme:t,colorScheme:r}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:r==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:_f(r==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:r==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:_f(r==="dark"?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:_f(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[n,o]=e.split("."),i=o?Number(o):void 0,a=n in t.colors;if(a){let s=i!==void 0?t.colors[n][i]:t.colors[n][_s(t,r||"light")];return{color:n,value:s,shade:i,isThemeColor:a,isLight:_f(s,t.luminanceThreshold),variable:o?`--mantine-color-${n}-${i}`:`--mantine-color-${n}-filled`}}return{color:e,value:e,isThemeColor:a,isLight:_f(e,t.luminanceThreshold),shade:i,variable:void 0}}function Be(e,t){let r=yr({color:e||t.primaryColor,theme:t});return r.variable?`var(${r.variable})`:e}function Mh(e,t){let r={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},n=Be(r.from,t),o=Be(r.to,t);return`linear-gradient(${r.deg}deg, ${n} 0%, ${o} 100%)`}function Jn(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){let i=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${i}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);let{r,g:n,b:o}=yf(e);return`rgba(${r}, ${n}, ${o}, ${t})`}var ud=Jn;var dL=({color:e,theme:t,variant:r,gradient:n,autoContrast:o})=>{let i=yr({color:e,theme:t}),a=typeof o=="boolean"?o:t.autoContrast;if(r==="filled"){let s=a&&i.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:s,border:`${W(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:s,border:`${W(1)} solid transparent`}:{background:e,hover:Lh(e,.1),color:s,border:`${W(1)} solid transparent`}}if(r==="light"){if(i.isThemeColor){if(i.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${W(1)} solid transparent`};let s=t.colors[i.color][i.shade];return{background:Jn(s,.1),hover:Jn(s,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${W(1)} solid transparent`}}return{background:Jn(e,.1),hover:Jn(e,.12),color:e,border:`${W(1)} solid transparent`}}if(r==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${W(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Jn(t.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${W(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:Jn(e,.05),color:e,border:`${W(1)} solid ${e}`};if(r==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${W(1)} solid transparent`};let s=t.colors[i.color][i.shade];return{background:"transparent",hover:Jn(s,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${W(1)} solid transparent`}}return{background:"transparent",hover:Jn(e,.12),color:e,border:`${W(1)} solid transparent`}}return r==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${W(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${W(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${W(1)} solid transparent`}:r==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:Lh(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${W(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Lh(t.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${W(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Lh(t.white,.01),color:e,border:`${W(1)} solid transparent`}:r==="gradient"?{background:Mh(n,t),hover:Mh(n,t),color:"var(--mantine-color-white)",border:"none"}:r==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${W(1)} solid var(--mantine-color-default-border)`}:{}};var uL={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var fL="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",Bh={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:uL,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:dL,autoContrast:!1,luminanceThreshold:.3,fontFamily:fL,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:fL,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:W(34),lineHeight:"1.3"},h2:{fontSize:W(26),lineHeight:"1.35"},h3:{fontSize:W(22),lineHeight:"1.4"},h4:{fontSize:W(18),lineHeight:"1.45"},h5:{fontSize:W(16),lineHeight:"1.5"},h6:{fontSize:W(14),lineHeight:"1.5"}}},fontSizes:{xs:W(12),sm:W(14),md:W(16),lg:W(18),xl:W(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:W(2),sm:W(4),md:W(8),lg:W(16),xl:W(32)},spacing:{xs:W(10),sm:W(12),md:W(16),lg:W(20),xl:W(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), 0 ${W(1)} ${W(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${W(10)} ${W(15)} ${W(-5)}, rgba(0, 0, 0, 0.04) 0 ${W(7)} ${W(7)} ${W(-5)}`,md:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${W(20)} ${W(25)} ${W(-5)}, rgba(0, 0, 0, 0.04) 0 ${W(10)} ${W(10)} ${W(-5)}`,lg:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${W(28)} ${W(23)} ${W(-7)}, rgba(0, 0, 0, 0.04) 0 ${W(12)} ${W(12)} ${W(-7)}`,xl:`0 ${W(1)} ${W(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${W(36)} ${W(28)} ${W(-7)}, rgba(0, 0, 0, 0.04) 0 ${W(17)} ${W(17)} ${W(-7)}`},other:{},components:{}};var Dl=y(O(),1);function k2(e){return e==="auto"||e==="dark"||e==="light"}function mL({key:e="mantine-color-scheme-value"}={}){let t;return{get:r=>{if(typeof window>"u")return r;try{let n=window.localStorage.getItem(e);return k2(n)?n:r}catch{return r}},set:r=>{try{window.localStorage.setItem(e,r)}catch(n){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",n)}},subscribe:r=>{t=n=>{n.storageArea===window.localStorage&&n.key===e&&k2(n.newValue)&&r(n.newValue)},window.addEventListener("storage",t)},unsubscribe:()=>{window.removeEventListener("storage",t)},clear:()=>{window.localStorage.removeItem(e)}}}var bL=y(O(),1);var _Pe=y(R(),1);var vL=y(O(),1),fd=y(R(),1);var fPe=y(R(),1),mPe=y(O(),1);var moe="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more \u2013 https://mantine.dev/theming/colors/#primary-color",pL="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function C2(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function hL(e){if(!(e.primaryColor in e.colors))throw new Error(moe);if(typeof e.primaryShade=="object"&&(!C2(e.primaryShade.dark)||!C2(e.primaryShade.light)))throw new Error(pL);if(typeof e.primaryShade=="number"&&!C2(e.primaryShade))throw new Error(pL)}function gL(e,t){if(!t)return hL(e),e;let r=Eh(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(r.headings.fontFamily=t.fontFamily),hL(r),r}var Iy=(0,fd.createContext)(null),xL=()=>(0,fd.useContext)(Iy)||Bh;function lt(){let e=(0,fd.useContext)(Iy);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function jh({theme:e,children:t,inherit:r=!0}){let n=xL(),o=(0,fd.useMemo)(()=>gL(r?n:Bh,e),[e,n,r]);return(0,vL.jsx)(Iy.Provider,{value:o,children:t})}jh.displayName="@mantine/core/MantineThemeProvider";function yL(){let e=lt(),t=Pl(),r=ut(e.breakpoints).reduce((n,o)=>{let i=e.breakpoints[o].includes("px"),a=wl(e.breakpoints[o]),s=i?`${a-.1}px`:nd(a-.1),l=i?`${a}px`:nd(a);return`${n}@media (max-width: ${s}) {.mantine-visible-from-${o} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${o} {display: none !important;}}`},"");return(0,bL.jsx)("style",{"data-mantine-styles":"classes",nonce:t?.(),dangerouslySetInnerHTML:{__html:r}})}var kL=y(O(),1);function wy(e){return Object.entries(e).map(([t,r])=>`${t}: ${r};`).join("")}function If(e,t){return(Array.isArray(e)?e:[e]).reduce((n,o)=>`${o}{${n}}`,t)}function _L(e,t){let r=wy(e.variables),n=r?If(t,r):"",o=wy(e.dark),i=wy(e.light),a=o?t===":host"?If(`${t}([data-mantine-color-scheme="dark"])`,o):If(`${t}[data-mantine-color-scheme="dark"]`,o):"",s=i?t===":host"?If(`${t}([data-mantine-color-scheme="light"])`,i):If(`${t}[data-mantine-color-scheme="light"]`,i):"";return`${n}${a}${s}`}var QPe=y(R(),1),YPe=y(O(),1);var VPe=y(R(),1),HPe=y(O(),1);function Nn({color:e,theme:t,autoContrast:r}){return(typeof r=="boolean"?r:t.autoContrast)&&yr({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function P2(e,t){return Nn({color:e.colors[e.primaryColor][_s(e,t)],theme:e,autoContrast:null})}var OPe=y(R(),1),zPe=y(O(),1);function Uh({theme:e,color:t,colorScheme:r,name:n=t,withColorValues:o=!0}){if(!e.colors[t])return{};if(r==="light"){let s=_s(e,"light"),l={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-filled)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${s===9?8:s+1})`,[`--mantine-color-${n}-light`]:ud(e.colors[t][s],.1),[`--mantine-color-${n}-light-hover`]:ud(e.colors[t][s],.12),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-outline-hover`]:ud(e.colors[t][s],.05)};return o?{[`--mantine-color-${n}-0`]:e.colors[t][0],[`--mantine-color-${n}-1`]:e.colors[t][1],[`--mantine-color-${n}-2`]:e.colors[t][2],[`--mantine-color-${n}-3`]:e.colors[t][3],[`--mantine-color-${n}-4`]:e.colors[t][4],[`--mantine-color-${n}-5`]:e.colors[t][5],[`--mantine-color-${n}-6`]:e.colors[t][6],[`--mantine-color-${n}-7`]:e.colors[t][7],[`--mantine-color-${n}-8`]:e.colors[t][8],[`--mantine-color-${n}-9`]:e.colors[t][9],...l}:l}let i=_s(e,"dark"),a={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-4)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${i})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${i===9?8:i+1})`,[`--mantine-color-${n}-light`]:ud(e.colors[t][Math.max(0,i-2)],.15),[`--mantine-color-${n}-light-hover`]:ud(e.colors[t][Math.max(0,i-2)],.2),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${Math.max(i-5,0)})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${Math.max(i-4,0)})`,[`--mantine-color-${n}-outline-hover`]:ud(e.colors[t][Math.max(i-4,0)],.05)};return o?{[`--mantine-color-${n}-0`]:e.colors[t][0],[`--mantine-color-${n}-1`]:e.colors[t][1],[`--mantine-color-${n}-2`]:e.colors[t][2],[`--mantine-color-${n}-3`]:e.colors[t][3],[`--mantine-color-${n}-4`]:e.colors[t][4],[`--mantine-color-${n}-5`]:e.colors[t][5],[`--mantine-color-${n}-6`]:e.colors[t][6],[`--mantine-color-${n}-7`]:e.colors[t][7],[`--mantine-color-${n}-8`]:e.colors[t][8],[`--mantine-color-${n}-9`]:e.colors[t][9],...a}:a}var LPe=y(R(),1),MPe=y(O(),1);function IL(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function wf(e,t,r){ut(t).forEach(n=>Object.assign(e,{[`--mantine-${r}-${n}`]:t[n]}))}var Sy=e=>{let t=_s(e,"light"),r=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:W(e.defaultRadius),n={variables:{"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":r,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":P2(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":P2(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};wf(n.variables,e.breakpoints,"breakpoint"),wf(n.variables,e.spacing,"spacing"),wf(n.variables,e.fontSizes,"font-size"),wf(n.variables,e.lineHeights,"line-height"),wf(n.variables,e.shadows,"shadow"),wf(n.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((i,a)=>{n.variables[`--mantine-primary-color-${a}`]=`var(--mantine-color-${e.primaryColor}-${a})`}),ut(e.colors).forEach(i=>{let a=e.colors[i];if(IL(a)){Object.assign(n.light,Uh({theme:e,name:a.name,color:a.light,colorScheme:"light",withColorValues:!0})),Object.assign(n.dark,Uh({theme:e,name:a.name,color:a.dark,colorScheme:"dark",withColorValues:!0}));return}a.forEach((s,l)=>{n.variables[`--mantine-color-${i}-${l}`]=s}),Object.assign(n.light,Uh({theme:e,color:i,colorScheme:"light",withColorValues:!1})),Object.assign(n.dark,Uh({theme:e,color:i,colorScheme:"dark",withColorValues:!1}))});let o=e.headings.sizes;return ut(o).forEach(i=>{n.variables[`--mantine-${i}-font-size`]=o[i].fontSize,n.variables[`--mantine-${i}-line-height`]=o[i].lineHeight,n.variables[`--mantine-${i}-font-weight`]=o[i].fontWeight||e.headings.fontWeight}),n};function wL({theme:e,generator:t}){let r=Sy(e),n=t?.(e);return n?Eh(r,n):r}var r4e=y(R(),1),o4e=y(O(),1);var D2=Sy(Bh);function SL(e){let t={variables:{},light:{},dark:{}};return ut(e.variables).forEach(r=>{D2.variables[r]!==e.variables[r]&&(t.variables[r]=e.variables[r])}),ut(e.light).forEach(r=>{D2.light[r]!==e.light[r]&&(t.light[r]=e.light[r])}),ut(e.dark).forEach(r=>{D2.dark[r]!==e.dark[r]&&(t.dark[r]=e.dark[r])}),t}function poe(e){return`
49
+ ${e}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
50
+ ${e}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
51
+ `}function R2({cssVariablesSelector:e,deduplicateCssVariables:t}){let r=lt(),n=Pl(),o=nL(),i=wL({theme:r,generator:o}),a=e===":root"&&t,s=a?SL(i):i,l=_L(s,e);return l?(0,kL.jsx)("style",{"data-mantine-styles":!0,nonce:n?.(),dangerouslySetInnerHTML:{__html:`${l}${a?"":poe(e)}`}}):null}R2.displayName="@mantine/CssVariables";var I4e=y(R(),1);function CL(){let e=console.error;console.error=(...t)=>{t.length>1&&typeof t[0]=="string"&&t[0].toLowerCase().includes("extra attributes from the server")&&typeof t[1]=="string"&&t[1].toLowerCase().includes("data-mantine-color-scheme")||e(...t)}}var ga=y(R(),1);function Sf(e,t){let r=typeof window<"u"&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,n=e!=="auto"?e:r?"dark":"light";t()?.setAttribute("data-mantine-color-scheme",n)}function PL({manager:e,defaultColorScheme:t,getRootElement:r,forceColorScheme:n}){let o=(0,ga.useRef)(null),[i,a]=(0,ga.useState)(()=>e.get(t)),s=n||i,l=(0,ga.useCallback)(d=>{n||(Sf(d,r),a(d),e.set(d))},[e.set,s,n]),c=(0,ga.useCallback)(()=>{a(t),Sf(t,r),e.clear()},[e.clear,t]);return(0,ga.useEffect)(()=>(e.subscribe(l),e.unsubscribe),[e.subscribe,e.unsubscribe]),Mo(()=>{Sf(e.get(t),r)},[]),(0,ga.useEffect)(()=>{if(n)return Sf(n,r),()=>{};n===void 0&&Sf(i,r),typeof window<"u"&&"matchMedia"in window&&(o.current=window.matchMedia("(prefers-color-scheme: dark)"));let d=u=>{i==="auto"&&Sf(u.matches?"dark":"light",r)};return o.current?.addEventListener("change",d),()=>o.current?.removeEventListener("change",d)},[i,n]),{colorScheme:s,setColorScheme:l,clearColorScheme:c}}function DL({respectReducedMotion:e,getRootElement:t}){Mo(()=>{e&&t()?.setAttribute("data-respect-reduced-motion","true")},[e])}CL();function ky({theme:e,children:t,getStyleNonce:r,withStaticClasses:n=!0,withGlobalClasses:o=!0,deduplicateCssVariables:i=!0,withCssVariables:a=!0,cssVariablesSelector:s=":root",classNamesPrefix:l="mantine",colorSchemeManager:c=mL(),defaultColorScheme:d="light",getRootElement:u=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:m,stylesTransform:p,env:h}){let{colorScheme:b,setColorScheme:v,clearColorScheme:x}=PL({defaultColorScheme:d,forceColorScheme:m,manager:c,getRootElement:u});return DL({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:u}),(0,Dl.jsx)(bf.Provider,{value:{colorScheme:b,setColorScheme:v,clearColorScheme:x,getRootElement:u,classNamesPrefix:l,getStyleNonce:r,cssVariablesResolver:f,cssVariablesSelector:s,withStaticClasses:n,stylesTransform:p,env:h},children:(0,Dl.jsxs)(jh,{theme:e,children:[a&&(0,Dl.jsx)(R2,{cssVariablesSelector:s,deduplicateCssVariables:i}),o&&(0,Dl.jsx)(yL,{}),t]})})}ky.displayName="@mantine/core/MantineProvider";function RL({children:e,theme:t}){return(0,Dl.jsx)(bf.Provider,{value:{colorScheme:"auto",setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:"mantine",cssVariablesSelector:":root",withStaticClasses:!1,headless:!0},children:(0,Dl.jsx)(jh,{theme:t,children:e})})}RL.displayName="@mantine/core/HeadlessMantineProvider";function Vr({classNames:e,styles:t,props:r,stylesCtx:n}){let o=lt();return{resolvedClassNames:Mi({theme:o,classNames:e,props:r,stylesCtx:n||void 0}),resolvedStyles:pa({theme:o,styles:t,props:r,stylesCtx:n||void 0})}}var hoe={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function EL({theme:e,options:t,unstyled:r}){return Ze(t?.focusable&&!r&&(e.focusClassName||hoe[e.focusRing]),t?.active&&!r&&e.activeClassName)}var _6e=y(R(),1),I6e=y(O(),1);function TL({selector:e,stylesCtx:t,options:r,props:n,theme:o}){return Mi({theme:o,classNames:r?.classNames,props:r?.props||n,stylesCtx:t})[e]}function E2({selector:e,stylesCtx:t,theme:r,classNames:n,props:o}){return Mi({theme:r,classNames:n,props:o,stylesCtx:t})[e]}function $L({rootSelector:e,selector:t,className:r}){return e===t?r:void 0}function AL({selector:e,classes:t,unstyled:r}){return r?void 0:t[e]}function OL({themeName:e,classNamesPrefix:t,selector:r,withStaticClass:n}){return n===!1?[]:e.map(o=>`${t}-${o}-${r}`)}function zL({themeName:e,theme:t,selector:r,props:n,stylesCtx:o}){return e.map(i=>Mi({theme:t,classNames:t.components[i]?.classNames,props:n,stylesCtx:o})?.[r])}function NL({options:e,classes:t,selector:r,unstyled:n}){return e?.variant&&!n?t[`${r}--${e.variant}`]:void 0}function FL({theme:e,options:t,themeName:r,selector:n,classNamesPrefix:o,classNames:i,classes:a,unstyled:s,className:l,rootSelector:c,props:d,stylesCtx:u,withStaticClasses:f,headless:m,transformedStyles:p}){return Ze(EL({theme:e,options:t,unstyled:s||m}),zL({theme:e,themeName:r,selector:n,props:d,stylesCtx:u}),NL({options:t,classes:a,selector:n,unstyled:s}),E2({selector:n,stylesCtx:u,theme:e,classNames:i,props:d}),E2({selector:n,stylesCtx:u,theme:e,classNames:p,props:d}),TL({selector:n,stylesCtx:u,options:t,props:d,theme:e}),$L({rootSelector:c,selector:n,className:l}),AL({selector:n,classes:a,unstyled:s||m}),f&&!m&&OL({themeName:r,classNamesPrefix:o,selector:n,withStaticClass:t?.withStaticClass}),t?.className)}function LL({theme:e,themeName:t,props:r,stylesCtx:n,selector:o}){return t.map(i=>pa({theme:e,styles:e.components[i]?.styles,props:r,stylesCtx:n})[o]).reduce((i,a)=>({...i,...a}),{})}function Cy({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...Cy({style:n,theme:t})}),{}):typeof e=="function"?e(t):e??{}}var a6e=y(R(),1),s6e=y(O(),1);function ML(e){return e.reduce((t,r)=>(r&&Object.keys(r).forEach(n=>{t[n]={...t[n],...vs(r[n])}}),t),{})}function BL({vars:e,varsResolver:t,theme:r,props:n,stylesCtx:o,selector:i,themeName:a,headless:s}){return ML([s?{}:t?.(r,n,o),...a.map(l=>r.components?.[l]?.vars?.(r,n,o)),e?.(r,n,o)])?.[i]}function jL({theme:e,themeName:t,selector:r,options:n,props:o,stylesCtx:i,rootSelector:a,styles:s,style:l,vars:c,varsResolver:d,headless:u,withStylesTransform:f}){return{...!f&&LL({theme:e,themeName:t,props:o,stylesCtx:i,selector:r}),...!f&&pa({theme:e,styles:s,props:o,stylesCtx:i})[r],...!f&&pa({theme:e,styles:n?.styles,props:n?.props||o,stylesCtx:i})[r],...BL({theme:e,props:o,stylesCtx:i,vars:c,varsResolver:d,selector:r,themeName:t,headless:u}),...a===r?Cy({style:l,theme:e}):null,...Cy({style:n?.style,theme:e})}}var g6e=y(R(),1),v6e=y(O(),1);function UL({props:e,stylesCtx:t,themeName:r}){let n=lt(),o=cL()?.();return{getTransformedStyles:a=>o?[...a.map(l=>o(l,{props:e,theme:n,ctx:t})),...r.map(l=>o(n.components[l]?.styles,{props:e,theme:n,ctx:t}))].filter(Boolean):[],withStylesTransform:!!o}}function q({name:e,classes:t,props:r,stylesCtx:n,className:o,style:i,rootSelector:a="root",unstyled:s,classNames:l,styles:c,vars:d,varsResolver:u}){let f=lt(),m=iL(),p=aL(),h=sL(),b=(Array.isArray(e)?e:[e]).filter(_=>_),{withStylesTransform:v,getTransformedStyles:x}=UL({props:r,stylesCtx:n,themeName:b});return(_,I)=>({className:FL({theme:f,options:I,themeName:b,selector:_,classNamesPrefix:m,classNames:l,classes:t,unstyled:s,className:o,rootSelector:a,props:r,stylesCtx:n,withStaticClasses:p,headless:h,transformedStyles:x([I?.styles,c])}),style:jL({theme:f,themeName:b,selector:_,options:I,props:r,stylesCtx:n,rootSelector:a,styles:c,style:i,vars:d,varsResolver:u,headless:h,withStylesTransform:v})})}function va(e,t){return typeof e=="boolean"?e:t.autoContrast}var xa=y(R(),1);var T6e=y(O(),1);function VL(e){let t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(n=>n.remove())}function md({keepTransitions:e}={}){let t=(0,xa.useRef)(id),r=(0,xa.useRef)(-1),n=(0,xa.useContext)(bf),o=Pl(),i=(0,xa.useRef)(o?.());if(!n)throw new Error("[@mantine/core] MantineProvider was not found in tree");let a=u=>{n.setColorScheme(u),t.current=e?()=>{}:VL(i.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},s=()=>{n.clearColorScheme(),t.current=e?()=>{}:VL(i.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},l=$h("light",{getInitialValueInEffect:!1}),c=n.colorScheme==="auto"?l:n.colorScheme,d=(0,xa.useCallback)(()=>a(c==="light"?"dark":"light"),[a,c]);return(0,xa.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(r.current)},[]),{colorScheme:n.colorScheme,setColorScheme:a,clearColorScheme:s,toggleColorScheme:d}}function pd(e,t={getInitialValueInEffect:!0}){let r=$h(e,t),{colorScheme:n}=md();return n==="auto"?r:n}var M6e=y(R(),1),B6e=y(O(),1);function z(e,t,r){let n=lt(),o=n.components[e]?.defaultProps,i=typeof o=="function"?o(n):o;return{...t,...i,...vs(r)}}var WL=y(O(),1),X6e=y(R(),1);var W6e=y(R(),1),Z6e=y(O(),1);function Py(e){return ut(e).reduce((t,r)=>e[r]!==void 0?`${t}${_F(r)}:${e[r]};`:t,"").trim()}function HL({selector:e,styles:t,media:r,container:n}){let o=t?Py(t):"",i=Array.isArray(r)?r.map(s=>`@media${s.query}{${e}{${Py(s.styles)}}}`):[],a=Array.isArray(n)?n.map(s=>`@container ${s.query}{${e}{${Py(s.styles)}}}`):[];return`${o?`${e}{${o}}`:""}${i.join("")}${a.join("")}`.trim()}function hd(e){let t=Pl();return(0,WL.jsx)("style",{"data-mantine-styles":"inline",nonce:t?.(),dangerouslySetInnerHTML:{__html:HL(e)}})}var tDe=y(R(),1),rDe=y(O(),1);function Hr(e){let{m:t,mx:r,my:n,mt:o,mb:i,ml:a,mr:s,me:l,ms:c,p:d,px:u,py:f,pt:m,pb:p,pl:h,pr:b,pe:v,ps:x,bd:_,bg:I,c:S,opacity:w,ff:P,fz:E,fw:B,lts:H,ta:Z,lh:K,fs:T,tt:k,td:$,w:C,miw:A,maw:D,h:N,mih:U,mah:G,bgsz:re,bgp:he,bgr:me,bga:Q,pos:oe,top:Ie,left:se,bottom:$e,right:Ve,inset:Je,display:at,flex:ze,hiddenFrom:Kt,visibleFrom:Xt,lightHidden:ao,darkHidden:pe,sx:ue,...Se}=e;return{styleProps:vs({m:t,mx:r,my:n,mt:o,mb:i,ml:a,mr:s,me:l,ms:c,p:d,px:u,py:f,pt:m,pb:p,pl:h,pr:b,pe:v,ps:x,bd:_,bg:I,c:S,opacity:w,ff:P,fz:E,fw:B,lts:H,ta:Z,lh:K,fs:T,tt:k,td:$,w:C,miw:A,maw:D,h:N,mih:U,mah:G,bgsz:re,bgp:he,bgr:me,bga:Q,pos:oe,top:Ie,left:se,bottom:$e,right:Ve,inset:Je,display:at,flex:ze,hiddenFrom:Kt,visibleFrom:Xt,lightHidden:ao,darkHidden:pe,sx:ue}),rest:Se}}var ZL={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};var BDe=y(R(),1),jDe=y(O(),1);var dDe=y(R(),1),uDe=y(O(),1);var aDe=y(R(),1),sDe=y(O(),1);function Vh(e,t){let r=yr({color:e,theme:t});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.variable?`var(${r.variable})`:r.color}function GL(e,t){let r=yr({color:e,theme:t});return r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:Vh(e,t)}function qL(e,t){if(typeof e=="number")return W(e);if(typeof e=="string"){let[r,n,...o]=e.split(" ").filter(a=>a.trim()!==""),i=`${W(r)}`;return n&&(i+=` ${n}`),o.length>0&&(i+=` ${Vh(o.join(" "),t)}`),i.trim()}return e}var KL={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function XL(e){return typeof e=="string"&&e in KL?KL[e]:e}var gDe=y(R(),1),vDe=y(O(),1);var goe=["h1","h2","h3","h4","h5","h6"];function QL(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&goe.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"?W(e):typeof e=="string"?W(e):e}function YL(e){return e}var voe=["h1","h2","h3","h4","h5","h6"];function JL(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&voe.includes(e)?`var(--mantine-${e}-line-height)`:e}var IDe=y(R(),1),wDe=y(O(),1);function eM(e){return typeof e=="number"?W(e):e}var CDe=y(R(),1),PDe=y(O(),1);function tM(e,t){if(typeof e=="number")return W(e);if(typeof e=="string"){let r=e.replace("-","");if(!(r in t.spacing))return W(e);let n=`--mantine-spacing-${r}`;return e.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return e}var Dy={color:Vh,textColor:GL,fontSize:QL,spacing:tM,identity:YL,size:eM,lineHeight:JL,fontFamily:XL,border:qL};function rM(e){return e.replace("(min-width: ","").replace("em)","")}function oM({media:e,...t}){let n=Object.keys(e).sort((o,i)=>Number(rM(o))-Number(rM(i))).map(o=>({query:o,styles:e[o]}));return{...t,media:n}}function xoe(e){if(typeof e!="object"||e===null)return!1;let t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function boe(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function yoe(e){return typeof e=="object"&&e!==null?ut(e).filter(t=>t!=="base"):[]}function _oe(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function nM({styleProps:e,data:t,theme:r}){return oM(ut(e).reduce((n,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return n;let i=t[o],a=Array.isArray(i.property)?i.property:[i.property],s=boe(e[o]);if(!xoe(e[o]))return a.forEach(c=>{n.inlineStyles[c]=Dy[i.type](s,r)}),n;n.hasResponsiveStyles=!0;let l=yoe(e[o]);return a.forEach(c=>{s&&(n.styles[c]=Dy[i.type](s,r)),l.forEach(d=>{let u=`(min-width: ${r.breakpoints[d]})`;n.media[u]={...n.media[u],[c]:Dy[i.type](_oe(e[o],d),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}var iM=y(R(),1);function Ry(){return`__m__-${(0,iM.useId)().replace(/:/g,"")}`}function Hh(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...Hh(n,t)}),{}):typeof e=="function"?e(t):e??{}}var gd=y(O(),1),lM=y(R(),1);function aM(e){return e.startsWith("data-")?e:`data-${e}`}function Ioe(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return n===void 0||n===""||n===!1||n===null||(t[aM(r)]=e[r]),t},{})}function T2(e){return e?typeof e=="string"?{[aM(e)]:!0}:Array.isArray(e)?[...e].reduce((t,r)=>({...t,...T2(r)}),{}):Ioe(e):null}function $2(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...$2(n,t)}),{}):typeof e=="function"?e(t):e??{}}function sM({theme:e,style:t,vars:r,styleProps:n}){let o=$2(t,e),i=$2(r,e);return{...o,...i,...n}}var cM=(0,lM.forwardRef)(({component:e,style:t,__vars:r,className:n,variant:o,mod:i,size:a,hiddenFrom:s,visibleFrom:l,lightHidden:c,darkHidden:d,renderRoot:u,__size:f,...m},p)=>{let h=lt(),b=e||"div",{styleProps:v,rest:x}=Hr(m),I=lL()?.()?.(v.sx),S=Ry(),w=nM({styleProps:v,theme:h,data:ZL}),P={ref:p,style:sM({theme:h,style:t,vars:r,styleProps:w.inlineStyles}),className:Ze(n,I,{[S]:w.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":d,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${l}`]:l}),"data-variant":o,"data-size":ly(a)?void 0:a||void 0,size:f,...T2(i),...x};return(0,gd.jsxs)(gd.Fragment,{children:[w.hasResponsiveStyles&&(0,gd.jsx)(hd,{selector:`.${S}`,styles:w.styles,media:w.media}),typeof u=="function"?u(P):(0,gd.jsx)(b,{...P})]})});cM.displayName="@mantine/core/Box";var F=cM;var A2=y(O(),1),Ey=y(R(),1);function O2(e){return e}function z2(e){let t=e;return r=>{let n=(0,Ey.forwardRef)((o,i)=>(0,A2.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n}}function M(e){let t=(0,Ey.forwardRef)(e);return t.extend=O2,t.withProps=r=>{let n=(0,Ey.forwardRef)((o,i)=>(0,A2.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}var dM=y(O(),1),N2=y(R(),1);function ot(e){let t=(0,N2.forwardRef)(e);return t.withProps=r=>{let n=(0,N2.forwardRef)((o,i)=>(0,dM.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=O2,t}var woe=y(O(),1),Wh=y(R(),1);var Soe=(0,Wh.createContext)({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function ei(){return(0,Wh.useContext)(Soe)}var Q4=y(O(),1);var xRe=y(R(),1);var em=y(R(),1),R8=y(Xl(),1);function Pie(e){if(!e||typeof e=="string")return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function X4(e){return e?.current?e.current.scrollHeight:"auto"}var Fg=typeof window<"u"&&window.requestAnimationFrame;function E8({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:n}){let o=(0,em.useRef)(null),i=0,a={height:0,overflow:"hidden"},[s,l]=(0,em.useState)(n?{}:a),c=p=>{(0,R8.flushSync)(()=>l(p))},d=p=>{c(h=>({...h,...p}))};function u(p){let h=e||Pie(p);return{transition:`height ${h}ms ${t}, opacity ${h}ms ${t}`}}br(()=>{typeof Fg=="function"&&Fg(n?()=>{d({willChange:"height",display:"block",overflow:"hidden"}),Fg(()=>{let p=X4(o);d({...u(p),height:p})})}:()=>{let p=X4(o);d({...u(p),willChange:"height",height:p}),Fg(()=>d({height:i,overflow:"hidden"}))})},[n]);let f=p=>{if(!(p.target!==o.current||p.propertyName!=="height"))if(n){let h=X4(o);h===s.height?c({}):d({height:h}),r()}else s.height===i&&(c(a),r())};function m({style:p={},refKey:h="ref",...b}={}){let v=b[h],x={"aria-hidden":!n,...b,[h]:hy(o,v),onTransitionEnd:f,style:{boxSizing:"border-box",...p,...s}};return em.default.version.startsWith("18")?n||(x.inert=""):x.inert=!n,x}return m}var Die={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},tm=M((e,t)=>{let{children:r,in:n,transitionDuration:o,transitionTimingFunction:i,style:a,onTransitionEnd:s,animateOpacity:l,...c}=z("Collapse",Die,e),d=lt(),u=ys(),m=(d.respectReducedMotion?u:!1)?0:o,p=E8({opened:n,transitionDuration:m,transitionTimingFunction:i,onTransitionEnd:s});return m===0?n?(0,Q4.jsx)(F,{...c,children:r}):null:(0,Q4.jsx)(F,{...p({style:{opacity:n||!l?1:0,transition:l?`opacity ${m}ms ${i}`:"none",...Hh(a,d)},ref:t,...c}),children:r})});tm.displayName="@mantine/core/Collapse";var di=y(O(),1),oc=y(R(),1);var ce=y(R(),1),am=y(R(),1);function Q_(){return typeof window<"u"}function Ql(e){return T8(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ca(e){var t;return(t=(T8(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function T8(e){return Q_()?e instanceof Node||e instanceof uo(e).Node:!1}function Nt(e){return Q_()?e instanceof Element||e instanceof uo(e).Element:!1}function bn(e){return Q_()?e instanceof HTMLElement||e instanceof uo(e).HTMLElement:!1}function X_(e){return!Q_()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot}function Lg(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=Vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function $8(e){return/^(table|td|th)$/.test(Ql(e))}function Mg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Rie=/transform|translate|scale|rotate|perspective|filter/,Eie=/paint|layout|strict|content/,$d=e=>!!e&&e!=="none",Y4;function Y_(e){let t=Nt(e)?Vn(e):e;return $d(t.transform)||$d(t.translate)||$d(t.scale)||$d(t.rotate)||$d(t.perspective)||!rm()&&($d(t.backdropFilter)||$d(t.filter))||Rie.test(t.willChange||"")||Eie.test(t.contain||"")}function A8(e){let t=ka(e);for(;bn(t)&&!$s(t);){if(Y_(t))return t;if(Mg(t))return null;t=ka(t)}return null}function rm(){return Y4==null&&(Y4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Y4}function $s(e){return/^(html|body|#document)$/.test(Ql(e))}function Vn(e){return uo(e).getComputedStyle(e)}function Bg(e){return Nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ka(e){if(Ql(e)==="html")return e;let t=e.assignedSlot||e.parentNode||X_(e)&&e.host||Ca(e);return X_(t)?t.host:t}function O8(e){let t=ka(e);return $s(t)?(e.ownerDocument||e).body:bn(t)&&Lg(t)?t:O8(t)}function Vo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=O8(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=uo(o);if(i){let s=J_(a);return t.concat(a,a.visualViewport||[],Lg(o)?o:[],s&&r?Vo(s):[])}else return t.concat(o,Vo(o,[],r))}function J_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function J4(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function om(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&X_(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function e6(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function t6(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function N8(e){return Tie()?!1:!z8()&&e.width===0&&e.height===0||z8()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function F8(){return/apple/i.test(navigator.vendor)}function z8(){let e=/android/i;return e.test(e6())||e.test(t6())}function L8(){return e6().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Tie(){return t6().includes("jsdom/")}function eI(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function M8(e){return"nativeEvent"in e}function B8(e){return e.matches("html,body")}function Yl(e){return e?.ownerDocument||document}function tI(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function Ad(e){return"composedPath"in e?e.composedPath()[0]:e.target}var $ie="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function j8(e){return bn(e)&&e.matches($ie)}var Hn=Math.min,yn=Math.max,Ug=Math.round,Vg=Math.floor,Pa=e=>({x:e,y:e}),Aie={left:"right",right:"left",bottom:"top",top:"bottom"};function r6(e,t,r){return yn(e,Hn(t,r))}function Da(e,t){return typeof e=="function"?e(t):e}function qi(e){return e.split("-")[0]}function Od(e){return e.split("-")[1]}function oI(e){return e==="x"?"y":"x"}function nI(e){return e==="y"?"height":"width"}function li(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function iI(e){return oI(li(e))}function H8(e,t,r){r===void 0&&(r=!1);let n=Od(e),o=iI(e),i=nI(o),a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=jg(a)),[a,jg(a)]}function W8(e){let t=jg(e);return[rI(e),t,rI(t)]}function rI(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var U8=["left","right"],V8=["right","left"],Oie=["top","bottom"],zie=["bottom","top"];function Nie(e,t,r){switch(e){case"top":case"bottom":return r?t?V8:U8:t?U8:V8;case"left":case"right":return t?Oie:zie;default:return[]}}function Z8(e,t,r,n){let o=Od(e),i=Nie(qi(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(rI)))),i}function jg(e){let t=qi(e);return Aie[t]+e.slice(t.length)}function Fie(e){var t,r,n,o;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(o=e.left)!=null?o:0}}function aI(e){return typeof e!="number"?Fie(e):{top:e,right:e,bottom:e,left:e}}function Ki(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var E9=y(Xl(),1);function G8(e,t,r){let{reference:n,floating:o}=e,i=li(t),a=iI(t),s=nI(a),l=qi(t),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2,m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-o.width,y:u};break;default:m={x:n.x,y:n.y}}let p=Od(t);return p&&(m[a]+=f*(p==="end"?1:-1)*(r&&c?-1:1)),m}async function q8(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Da(t,e),p=aI(m),b=s[f?u==="floating"?"reference":"floating":u],v=Ki(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),I=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},S=Ki(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:_,strategy:l}):x);return{top:(v.top-S.top+p.top)/I.y,bottom:(S.bottom-v.bottom+p.bottom)/I.y,left:(v.left-S.left+p.left)/I.x,right:(S.right-v.right+p.right)/I.x}}var Lie=50,K8=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=a.detectOverflow?a:{...a,detectOverflow:q8},l=await(a.isRTL==null?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=G8(c,n,l),f=n,m=0,p={};for(let h=0;h<i.length;h++){let b=i[h];if(!b)continue;let{name:v,fn:x}=b,{x:_,y:I,data:S,reset:w}=await x({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=_??d,u=I??u,p[v]={...p[v],...S},w&&m<Lie&&(m++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:d,y:u}=G8(c,f,l)),h=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}},X8=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Da(e,t)||{};if(c==null)return{};let u=aI(d),f={x:r,y:n},m=iI(o),p=nI(m),h=await a.getDimensions(c),b=m==="y",v=b?"top":"left",x=b?"bottom":"right",_=b?"clientHeight":"clientWidth",I=i.reference[p]+i.reference[m]-f[m]-i.floating[p],S=f[m]-i.reference[m],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c)),P=w?w[_]:0;(!P||!await(a.isElement==null?void 0:a.isElement(w)))&&(P=s.floating[_]||i.floating[p]);let E=I/2-S/2,B=P/2-h[p]/2-1,H=Hn(u[v],B),Z=Hn(u[x],B),K=P-h[p]-Z,T=P/2-h[p]/2+E,k=r6(H,T,K),$=!l.arrow&&Od(o)!=null&&T!==k&&i.reference[p]/2-(T<H?H:Z)-h[p]/2<0,C=$?T<H?T-H:T-K:0;return{[m]:f[m]+C,data:{[m]:k,centerOffset:T-k-C,...$&&{alignmentOffset:C}},reset:$}}});var Q8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...b}=Da(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let v=qi(o),x=li(s),_=qi(s)===s,I=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(_||!h?[jg(s)]:W8(s)),w=p!=="none";!f&&w&&S.push(...Z8(s,h,p,I));let P=[s,...S],E=await l.detectOverflow(t,b),B=[],H=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&B.push(E[v]),u){let k=H8(o,a,I);B.push(E[k[0]],E[k[1]])}if(H=[...H,{placement:o,overflows:B}],!B.every(k=>k<=0)){var Z,K;let k=(((Z=i.flip)==null?void 0:Z.index)||0)+1,$=P[k];if($&&(!(u==="alignment"?x!==li($):!1)||H.every(D=>li(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:k,overflows:H},reset:{placement:$}};let C=(K=H.filter(A=>A.overflows[0]<=0).sort((A,D)=>A.overflows[1]-D.overflows[1])[0])==null?void 0:K.placement;if(!C)switch(m){case"bestFit":{var T;let A=(T=H.filter(D=>{if(w){let N=li(D.placement);return N===x||N==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(N=>N>0).reduce((N,U)=>N+U,0)]).sort((D,N)=>D[1]-N[1])[0])==null?void 0:T[0];A&&(C=A);break}case"initialPlacement":C=s;break}if(o!==C)return{reset:{placement:C}}}return{}}}};function Y8(e){let t=Hn(...e.map(i=>i.left)),r=Hn(...e.map(i=>i.top)),n=yn(...e.map(i=>i.right)),o=yn(...e.map(i=>i.bottom));return{x:t,y:r,width:n-t,height:o-r}}function Mie(e){let t=e.slice().sort((o,i)=>o.y-i.y),r=[],n=null;for(let o=0;o<t.length;o++){let i=t[o];!n||i.y-n.y>n.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(o=>Ki(Y8(o)))}var J8=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:l,y:c}=Da(e,t),d=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(n.reference))||[]);if(!d.length)return{};let u=Mie(d),f=Ki(Y8(d)),m=aI(s);function p(){if(u.length===2&&(u[0].left>u[1].right||u[1].left>u[0].right)&&l!=null&&c!=null)return u.find(b=>l>b.left-m.left&&l<b.right+m.right&&c>b.top-m.top&&c<b.bottom+m.bottom)||f;if(u.length>=2){if(li(r)==="y"){let w=u[0],P=u[u.length-1],E=qi(r)==="top",B=w.top,H=P.bottom,Z=E?w.left:P.left,K=E?w.right:P.right;return Ki({x:Z,y:B,width:K-Z,height:H-B})}let b=qi(r)==="left",v=yn(...u.map(w=>w.right)),x=Hn(...u.map(w=>w.left)),_=u.filter(w=>b?w.left===x:w.right===v),I=_[0].top,S=_[_.length-1].bottom;return Ki({x,y:I,width:v-x,height:S-I})}return f}let h=await i.getElementRects({reference:{getBoundingClientRect:p},floating:n.floating,strategy:a});return o.reference.x!==h.reference.x||o.reference.y!==h.reference.y||o.reference.width!==h.reference.width||o.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},e9=new Set(["left","top"]);async function Bie(e,t){let{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=qi(r),s=Od(r),l=li(r)==="y",c=e9.has(a)?-1:1,d=i&&l?-1:1,u=Da(t,e),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof p=="number"&&(m=s==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var t9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:i,placement:a,middlewareData:s}=t,l=await Bie(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},r9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:x=>{let{x:_,y:I}=x;return{x:_,y:I}}},...c}=Da(e,t),d={x:r,y:n},u=await i.detectOverflow(t,c),f=li(o),m=oI(f),p=d[m],h=d[f],b=(x,_)=>r6(_+u[x==="y"?"top":"left"],_,_-u[x==="y"?"bottom":"right"]);a&&(p=b(m,p)),s&&(h=b(f,h));let v=l.fn({...t,[m]:p,[f]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[f]:s}}}}}},o9=function(e){return e===void 0&&(e={}),{options:e,fn(t){var r,n;let{x:o,y:i,placement:a,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:u=!0}=Da(e,t),f={x:o,y:i},m=li(a),p=oI(m),h=f[p],b=f[m],v=Da(c,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(r=v.mainAxis)!=null?r:0,crossAxis:(n=v.crossAxis)!=null?n:0};if(d){let S=p==="y"?"height":"width",w=s.reference[p]-s.floating[S]+x.mainAxis,P=s.reference[p]+s.reference[S]-x.mainAxis;h<w?h=w:h>P&&(h=P)}if(u){var _,I;let S=p==="y"?"width":"height",w=e9.has(qi(a)),P=s.reference[m]-s.floating[S]+(w&&((_=l.offset)==null?void 0:_[m])||0)+(w?0:x.crossAxis),E=s.reference[m]+s.reference[S]+(w?0:((I=l.offset)==null?void 0:I[m])||0)-(w?x.crossAxis:0);b<P?b=P:b>E&&(b=E)}return{[p]:h,[m]:b}}}},n9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Da(e,t),l=await o.detectOverflow(t,s),c=qi(r),d=Od(r),u=li(r)==="y",{width:f,height:m}=n.floating,p,h;c==="top"||c==="bottom"?(p=c,h=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(h=c,p=d==="end"?"top":"bottom");let b=m-l.top-l.bottom,v=f-l.left-l.right,x=Hn(m-l[p],b),_=Hn(f-l[h],v),I=t.middlewareData.shift,S=!I,w=x,P=_;I!=null&&I.enabled.x&&(P=v),I!=null&&I.enabled.y&&(w=b),S&&!d&&(u?P=f-2*yn(l.left,l.right):w=m-2*yn(l.top,l.bottom)),await a({...t,availableWidth:P,availableHeight:w});let E=await o.getDimensions(i.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function s9(e){let t=Vn(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=bn(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Ug(r)!==i||Ug(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function n6(e){return Nt(e)?e:e.contextElement}function nm(e){let t=n6(e);if(!bn(t))return Pa(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=s9(t),a=(i?Ug(r.width):r.width)/n,s=(i?Ug(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var jie=Pa(0);function l9(e){let t=uo(e);return!rm()||!t.visualViewport?jie:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uie(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===uo(e)}function zd(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),i=n6(e),a=Pa(1);t&&(n?Nt(n)&&(a=nm(n)):a=nm(e));let s=Uie(i,r,n)?l9(i):Pa(0),l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i&&n){let f=uo(i),m=Nt(n)?uo(n):n,p=f,h=J_(p);for(;h&&m!==p;){let b=nm(h),v=h.getBoundingClientRect(),x=Vn(h),_=v.left+(h.clientLeft+parseFloat(x.paddingLeft))*b.x,I=v.top+(h.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=_,c+=I,p=uo(h),h=J_(p)}}return Ki({width:d,height:u,x:l,y:c})}function sI(e,t){let r=Bg(e).scrollLeft;return t?t.left+r:zd(Ca(e)).left+r}function c9(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-sI(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Vie(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i=o==="fixed",a=Ca(n),s=t?Mg(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Pa(1),d=Pa(0),u=bn(n);if((u||!i)&&((Ql(n)!=="body"||Lg(a))&&(l=Bg(n)),u)){let m=zd(n);c=nm(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=a&&!u&&!i?c9(a,l):Pa(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function Hie(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Wie(e){let t=Bg(e),r=e.ownerDocument.body,n=yn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=yn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),i=-t.scrollLeft+sI(e),a=-t.scrollTop;return Vn(r).direction==="rtl"&&(i+=yn(e.clientWidth,r.clientWidth)-n),{width:n,height:o,x:i,y:a}}var Zie=25;function Gie(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",o=uo(e),i=Ca(e),a=o.visualViewport,s=i.clientWidth,l=i.clientHeight,c=0,d=0;if(a){let f=!rm()||t==="fixed";n?f||(c=-a.offsetLeft,d=-a.offsetTop):(s=a.width,l=a.height,f&&(c=a.offsetLeft,d=a.offsetTop))}if(sI(i)<=0){let f=i.ownerDocument,m=f.body,p=getComputedStyle(m),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-m.clientWidth-h),v=getComputedStyle(i).scrollbarGutter==="stable both-edges"?b/2:b;v<=Zie&&(s-=v)}return{width:s,height:l,x:c,y:d}}function qie(e,t){let r=zd(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=nm(e),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function i9(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Gie(e,r,t);else if(t==="document")n=Wie(Ca(e));else if(Nt(t))n=qie(t,r);else{let o=l9(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ki(n)}function Kie(e,t){let r=t.get(e);if(r)return r;let n=Vo(e,[],!1).filter(s=>Nt(s)&&Ql(s)!=="body"),o=null,i=Vn(e).position==="fixed",a=i?ka(e):e;for(;Nt(a)&&!$s(a);){let s=Vn(a),l=Y_(a),c=o?o.position:i?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&s.position==="static")?n=n.filter(u=>u!==a):o=s,a=ka(a)}return t.set(e,n),n}function Xie(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,a=[...r==="clippingAncestors"?Mg(t)?[]:Kie(t,this._c):[].concat(r),n],s=i9(t,a[0],o),l=s.top,c=s.right,d=s.bottom,u=s.left;for(let f=1;f<a.length;f++){let m=i9(t,a[f],o);l=yn(m.top,l),c=Hn(m.right,c),d=Hn(m.bottom,d),u=yn(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function Qie(e){let{width:t,height:r}=s9(e);return{width:t,height:r}}function Yie(e,t,r){let n=bn(t),o=Ca(t),i=r==="fixed",a=zd(e,!0,i,t),s={scrollLeft:0,scrollTop:0},l=Pa(0);if((n||!i)&&((Ql(t)!=="body"||Lg(o))&&(s=Bg(t)),n)){let f=zd(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&o&&(l.x=sI(o));let c=o&&!n&&!i?c9(o,s):Pa(0),d=a.left+s.scrollLeft-l.x-c.x,u=a.top+s.scrollTop-l.y-c.y;return{x:d,y:u,width:a.width,height:a.height}}function o6(e){return Vn(e).position==="static"}function a9(e,t){if(!bn(e)||Vn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ca(e)===r&&(r=r.ownerDocument.body),r}function d9(e,t){let r=uo(e);if(Mg(e))return r;if(!bn(e)){let o=ka(e);for(;o&&!$s(o);){if(Nt(o)&&!o6(o))return o;o=ka(o)}return r}let n=a9(e,t);for(;n&&$8(n)&&o6(n);)n=a9(n,t);return n&&$s(n)&&o6(n)&&!Y_(n)?r:n||A8(e)||r}var Jie=async function(e){let t=this.getOffsetParent||d9,r=this.getDimensions,n=await r(e.floating);return{reference:Yie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function eae(e){return Vn(e).direction==="rtl"}var i6={convertOffsetParentRelativeRectToViewportRelativeRect:Vie,getDocumentElement:Ca,getClippingRect:Xie,getOffsetParent:d9,getElementRects:Jie,getClientRects:Hie,getDimensions:Qie,getScale:nm,isElement:Nt,isRTL:eae};function u9(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tae(e,t,r){let n=null,o,i=Ca(e);function a(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function s(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),a();let f=e.getBoundingClientRect(),{left:m,top:p,width:h,height:b}=f;if(d||t(),!h||!b)return;let v=Vg(p),x=Vg(i.clientWidth-(m+h)),_=Vg(i.clientHeight-(p+b)),I=Vg(m),w={rootMargin:-v+"px "+-x+"px "+-_+"px "+-I+"px",threshold:yn(0,Hn(1,u))||1},P=!0;function E(B){let H=B[0].intersectionRatio;if(!u9(f,e.getBoundingClientRect()))return s();if(H!==u){if(!P)return s();H?s(!1,H):o=setTimeout(()=>{s(!1,1e-7)},1e3)}P=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}let l=uo(e),c=()=>s(r);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),a()}}function lI(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=n6(e),d=o||i?[...c?Vo(c):[],...t?Vo(t):[]]:[];d.forEach(v=>{o&&v.addEventListener("scroll",r),i&&v.addEventListener("resize",r)});let u=c&&s?tae(c,r,i):null,f=-1,m=null;a&&(m=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(t)})),r()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,h=l?zd(e):null;l&&b();function b(){let v=zd(e);h&&!u9(h,v)&&r(),h=v,p=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),u?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var f9=t9;var m9=r9,p9=Q8,h9=n9;var a6=X8,g9=J8,v9=o9,cI=(e,t,r)=>{let n=new Map,o=r??{},i={...i6,...o.platform,_c:n};return K8(e,t,{...o,platform:i})};var Dr=y(R(),1),y9=y(R(),1),_9=y(Xl(),1),rae=typeof document<"u",oae=function(){},dI=rae?y9.useLayoutEffect:oae;function uI(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!uI(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!uI(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function I9(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function x9(e,t){let r=I9(e);return Math.round(t*r)/r}function s6(e){let t=Dr.useRef(e);return dI(()=>{t.current=e}),t}function w9(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=Dr.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=Dr.useState(n);uI(f,n)||m(n);let[p,h]=Dr.useState(null),[b,v]=Dr.useState(null),x=Dr.useCallback(D=>{D!==w.current&&(w.current=D,h(D))},[]),_=Dr.useCallback(D=>{D!==P.current&&(P.current=D,v(D))},[]),I=i||p,S=a||b,w=Dr.useRef(null),P=Dr.useRef(null),E=Dr.useRef(d),B=l!=null,H=s6(l),Z=s6(o),K=s6(c),T=Dr.useCallback(()=>{if(!w.current||!P.current)return;let D={placement:t,strategy:r,middleware:f};Z.current&&(D.platform=Z.current),cI(w.current,P.current,D).then(N=>{let U={...N,isPositioned:K.current!==!1};k.current&&!uI(E.current,U)&&(E.current=U,_9.flushSync(()=>{u(U)}))})},[f,t,r,Z,K]);dI(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(D=>({...D,isPositioned:!1})))},[c]);let k=Dr.useRef(!1);dI(()=>(k.current=!0,()=>{k.current=!1}),[]),dI(()=>{if(I&&(w.current=I),S&&(P.current=S),I&&S){if(H.current)return H.current(I,S,T);T()}},[I,S,T,H,B]);let $=Dr.useMemo(()=>({reference:w,floating:P,setReference:x,setFloating:_}),[x,_]),C=Dr.useMemo(()=>({reference:I,floating:S}),[I,S]),A=Dr.useMemo(()=>{let D={position:r,left:0,top:0};if(!C.floating)return D;let N=x9(C.floating,d.x),U=x9(C.floating,d.y);return s?{...D,transform:"translate("+N+"px, "+U+"px)",...I9(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:U}},[r,s,C.floating,d.x,d.y]);return Dr.useMemo(()=>({...d,update:T,refs:$,elements:C,floatingStyles:A}),[d,T,$,C,A])}var nae=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?a6({element:n.current,padding:o}).fn(r):{}:n?a6({element:n,padding:o}).fn(r):{}}}},im=(e,t)=>{let r=f9(e);return{name:r.name,fn:r.fn,options:[e,t]}},Nd=(e,t)=>{let r=m9(e);return{name:r.name,fn:r.fn,options:[e,t]}},fI=(e,t)=>({fn:v9(e).fn,options:[e,t]}),Fd=(e,t)=>{let r=p9(e);return{name:r.name,fn:r.fn,options:[e,t]}},l6=(e,t)=>{let r=h9(e);return{name:r.name,fn:r.fn,options:[e,t]}};var Jl=(e,t)=>{let r=g9(e);return{name:r.name,fn:r.fn,options:[e,t]}},Hg=(e,t)=>{let r=nae(e);return{name:r.name,fn:r.fn,options:[e,t]}};function T9(e){return ce.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}var $9={...ce},iae=$9.useInsertionEffect,aae=iae||(e=>e());function As(e){let t=ce.useRef(()=>{});return aae(()=>{t.current=e}),ce.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var sae="ArrowUp",lae="ArrowDown",cae="ArrowLeft",dae="ArrowRight";var Ra=typeof document<"u"?am.useLayoutEffect:am.useEffect;var uae=[cae,dae],fae=[sae,lae],rEe=[...uae,...fae];var S9=!1,mae=0,k9=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+mae++;function pae(){let[e,t]=ce.useState(()=>S9?k9():void 0);return Ra(()=>{e==null&&t(k9())},[]),ce.useEffect(()=>{S9=!0},[]),e}var hae=$9.useId,A9=hae||pae;function gae(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}var vae=ce.createContext(null),xae=ce.createContext(null),m6=()=>{var e;return((e=ce.useContext(vae))==null?void 0:e.id)||null},p6=()=>ce.useContext(xae);function h6(e){return"data-floating-ui-"+e}function c6(e){let t=(0,am.useRef)(e);return Ra(()=>{t.current=e}),t}var C9=h6("safe-polygon");function mI(e,t,r){return r&&!eI(r)?0:typeof e=="number"?e:e?.[t]}function O9(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:d=!1,restMs:u=0,move:f=!0}=t,m=p6(),p=m6(),h=c6(c),b=c6(l),v=c6(r),x=ce.useRef(),_=ce.useRef(-1),I=ce.useRef(),S=ce.useRef(-1),w=ce.useRef(!0),P=ce.useRef(!1),E=ce.useRef(()=>{}),B=ce.useRef(!1),H=ce.useCallback(()=>{var A;let D=(A=o.current.openEvent)==null?void 0:A.type;return D?.includes("mouse")&&D!=="mousedown"},[o]);ce.useEffect(()=>{if(!s)return;function A(D){let{open:N}=D;N||(clearTimeout(_.current),clearTimeout(S.current),w.current=!0,B.current=!1)}return i.on("openchange",A),()=>{i.off("openchange",A)}},[s,i]),ce.useEffect(()=>{if(!s||!h.current||!r)return;function A(N){H()&&n(!1,N,"hover")}let D=Yl(a.floating).documentElement;return D.addEventListener("mouseleave",A),()=>{D.removeEventListener("mouseleave",A)}},[a.floating,r,n,s,h,H]);let Z=ce.useCallback(function(A,D,N){D===void 0&&(D=!0),N===void 0&&(N="hover");let U=mI(b.current,"close",x.current);U&&!I.current?(clearTimeout(_.current),_.current=window.setTimeout(()=>n(!1,A,N),U)):D&&(clearTimeout(_.current),n(!1,A,N))},[b,n]),K=As(()=>{E.current(),I.current=void 0}),T=As(()=>{if(P.current){let A=Yl(a.floating).body;A.style.pointerEvents="",A.removeAttribute(C9),P.current=!1}}),k=As(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);ce.useEffect(()=>{if(!s)return;function A(G){if(clearTimeout(_.current),w.current=!1,d&&!eI(x.current)||u>0&&!mI(b.current,"open"))return;let re=mI(b.current,"open",x.current);re?_.current=window.setTimeout(()=>{v.current||n(!0,G,"hover")},re):r||n(!0,G,"hover")}function D(G){if(k())return;E.current();let re=Yl(a.floating);if(clearTimeout(S.current),B.current=!1,h.current&&o.current.floatingContext){r||clearTimeout(_.current),I.current=h.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){T(),K(),k()||Z(G,!0,"safe-polygon")}});let me=I.current;re.addEventListener("mousemove",me),E.current=()=>{re.removeEventListener("mousemove",me)};return}(x.current!=="touch"||!om(a.floating,G.relatedTarget))&&Z(G)}function N(G){k()||o.current.floatingContext&&(h.current==null||h.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){T(),K(),k()||Z(G)}})(G))}if(Nt(a.domReference)){var U;let G=a.domReference;return r&&G.addEventListener("mouseleave",N),(U=a.floating)==null||U.addEventListener("mouseleave",N),f&&G.addEventListener("mousemove",A,{once:!0}),G.addEventListener("mouseenter",A),G.addEventListener("mouseleave",D),()=>{var re;r&&G.removeEventListener("mouseleave",N),(re=a.floating)==null||re.removeEventListener("mouseleave",N),f&&G.removeEventListener("mousemove",A),G.removeEventListener("mouseenter",A),G.removeEventListener("mouseleave",D)}}},[a,s,e,d,u,f,Z,K,T,n,r,v,m,b,h,o,k]),Ra(()=>{var A;if(s&&r&&(A=h.current)!=null&&A.__options.blockPointerEvents&&H()){P.current=!0;let N=a.floating;if(Nt(a.domReference)&&N){var D;let U=Yl(a.floating).body;U.setAttribute(C9,"");let G=a.domReference,re=m==null||(D=m.nodesRef.current.find(he=>he.id===p))==null||(D=D.context)==null?void 0:D.elements.floating;return re&&(re.style.pointerEvents=""),U.style.pointerEvents="none",G.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{U.style.pointerEvents="",G.style.pointerEvents="",N.style.pointerEvents=""}}}},[s,r,p,a,m,h,H]),Ra(()=>{r||(x.current=void 0,B.current=!1,K(),T())},[r,K,T]),ce.useEffect(()=>()=>{K(),clearTimeout(_.current),clearTimeout(S.current),T()},[s,a.domReference,K,T]);let $=ce.useMemo(()=>{function A(D){x.current=D.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(D){let{nativeEvent:N}=D;function U(){!w.current&&!v.current&&n(!0,N,"hover")}d&&!eI(x.current)||r||u===0||B.current&&D.movementX**2+D.movementY**2<2||(clearTimeout(S.current),x.current==="touch"?U():(B.current=!0,S.current=window.setTimeout(U,u)))}}},[d,n,r,v,u]),C=ce.useMemo(()=>({onMouseEnter(){clearTimeout(_.current)},onMouseLeave(A){k()||Z(A.nativeEvent,!1)}}),[Z,k]);return ce.useMemo(()=>s?{reference:$,floating:C}:{},[s,$,C])}var f6=()=>{},z9=ce.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:f6,setState:f6,isInstantPhase:!1}),bae=()=>ce.useContext(z9);function N9(e){let{children:t,delay:r,timeoutMs:n=0}=e,[o,i]=ce.useReducer((l,c)=>({...l,...c}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=ce.useRef(null),s=ce.useCallback(l=>{i({currentId:l})},[]);return Ra(()=>{o.currentId?a.current===null?a.current=o.currentId:o.isInstantPhase||i({isInstantPhase:!0}):(o.isInstantPhase&&i({isInstantPhase:!1}),a.current=null)},[o.currentId,o.isInstantPhase]),ce.createElement(z9.Provider,{value:ce.useMemo(()=>({...o,setState:i,setCurrentId:s}),[o,s])},t)}function F9(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:o}=e,{id:i,enabled:a=!0}=t,s=i??o,l=bae(),{currentId:c,setCurrentId:d,initialDelay:u,setState:f,timeoutMs:m}=l;return Ra(()=>{a&&c&&(f({delay:{open:1,close:mI(u,"close")}}),c!==s&&n(!1))},[a,s,n,f,c,u]),Ra(()=>{function p(){n(!1),f({delay:u,currentId:null})}if(a&&c&&!r&&c===s){if(m){let h=window.setTimeout(p,m);return()=>{clearTimeout(h)}}p()}},[a,r,f,c,s,n,u,m]),Ra(()=>{a&&(d===f6||!r||d(s))},[a,r,d,s]),l}function d6(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),r=r.concat(n);return r}var yae="data-floating-ui-focusable";var _ae={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Iae={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},P9=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e?.outsidePress)!=null?r:!0}};function L9(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:f=!1,bubbles:m,capture:p}=t,h=p6(),b=As(typeof l=="function"?l:()=>!1),v=typeof l=="function"?b:l,x=ce.useRef(!1),_=ce.useRef(!1),{escapeKey:I,outsidePress:S}=P9(m),{escapeKey:w,outsidePress:P}=P9(p),E=ce.useRef(!1),B=As($=>{var C;if(!r||!a||!s||$.key!=="Escape"||E.current)return;let A=(C=i.current.floatingContext)==null?void 0:C.nodeId,D=h?d6(h.nodesRef.current,A):[];if(!I&&($.stopPropagation(),D.length>0)){let N=!0;if(D.forEach(U=>{var G;if((G=U.context)!=null&&G.open&&!U.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}n(!1,M8($)?$.nativeEvent:$,"escape-key")}),H=As($=>{var C;let A=()=>{var D;B($),(D=Ad($))==null||D.removeEventListener("keydown",A)};(C=Ad($))==null||C.addEventListener("keydown",A)}),Z=As($=>{var C;let A=x.current;x.current=!1;let D=_.current;if(_.current=!1,c==="click"&&D||A||typeof v=="function"&&!v($))return;let N=Ad($),U="["+h6("inert")+"]",G=Yl(o.floating).querySelectorAll(U),re=Nt(N)?N:null;for(;re&&!$s(re);){let oe=ka(re);if($s(oe)||!Nt(oe))break;re=oe}if(G.length&&Nt(N)&&!B8(N)&&!om(N,o.floating)&&Array.from(G).every(oe=>!om(re,oe)))return;if(bn(N)&&k){let oe=N.clientWidth>0&&N.scrollWidth>N.clientWidth,Ie=N.clientHeight>0&&N.scrollHeight>N.clientHeight,se=Ie&&$.offsetX>N.clientWidth;if(Ie&&Vn(N).direction==="rtl"&&(se=$.offsetX<=N.offsetWidth-N.clientWidth),se||oe&&$.offsetY>N.clientHeight)return}let he=(C=i.current.floatingContext)==null?void 0:C.nodeId,me=h&&d6(h.nodesRef.current,he).some(oe=>{var Ie;return tI($,(Ie=oe.context)==null?void 0:Ie.elements.floating)});if(tI($,o.floating)||tI($,o.domReference)||me)return;let Q=h?d6(h.nodesRef.current,he):[];if(Q.length>0){let oe=!0;if(Q.forEach(Ie=>{var se;if((se=Ie.context)!=null&&se.open&&!Ie.context.dataRef.current.__outsidePressBubbles){oe=!1;return}}),!oe)return}n(!1,$,"outside-press")}),K=As($=>{var C;let A=()=>{var D;Z($),(D=Ad($))==null||D.removeEventListener(c,A)};(C=Ad($))==null||C.addEventListener(c,A)});ce.useEffect(()=>{if(!r||!a)return;i.current.__escapeKeyBubbles=I,i.current.__outsidePressBubbles=S;let $=-1;function C(G){n(!1,G,"ancestor-scroll")}function A(){window.clearTimeout($),E.current=!0}function D(){$=window.setTimeout(()=>{E.current=!1},rm()?5:0)}let N=Yl(o.floating);s&&(N.addEventListener("keydown",w?H:B,w),N.addEventListener("compositionstart",A),N.addEventListener("compositionend",D)),v&&N.addEventListener(c,P?K:Z,P);let U=[];return f&&(Nt(o.domReference)&&(U=Vo(o.domReference)),Nt(o.floating)&&(U=U.concat(Vo(o.floating))),!Nt(o.reference)&&o.reference&&o.reference.contextElement&&(U=U.concat(Vo(o.reference.contextElement)))),U=U.filter(G=>{var re;return G!==((re=N.defaultView)==null?void 0:re.visualViewport)}),U.forEach(G=>{G.addEventListener("scroll",C,{passive:!0})}),()=>{s&&(N.removeEventListener("keydown",w?H:B,w),N.removeEventListener("compositionstart",A),N.removeEventListener("compositionend",D)),v&&N.removeEventListener(c,P?K:Z,P),U.forEach(G=>{G.removeEventListener("scroll",C)}),window.clearTimeout($)}},[i,o,s,v,c,r,n,f,a,I,S,B,w,H,Z,P,K]),ce.useEffect(()=>{x.current=!1},[v,c]);let T=ce.useMemo(()=>({onKeyDown:B,[_ae[u]]:$=>{d&&n(!1,$.nativeEvent,"reference-press")}}),[B,n,d,u]),k=ce.useMemo(()=>({onKeyDown:B,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[Iae[c]]:()=>{x.current=!0}}),[B,c]);return ce.useMemo(()=>a?{reference:T,floating:k}:{},[a,T,k])}function wae(e){let{open:t=!1,onOpenChange:r,elements:n}=e,o=A9(),i=ce.useRef({}),[a]=ce.useState(()=>gae()),s=m6()!=null,[l,c]=ce.useState(n.reference),d=As((m,p,h)=>{i.current.openEvent=m?p:void 0,a.emit("openchange",{open:m,event:p,reason:h,nested:s}),r?.(m,p,h)}),u=ce.useMemo(()=>({setPositionReference:c}),[]),f=ce.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return ce.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:f,events:a,floatingId:o,refs:u}),[t,d,f,a,o,u])}function sm(e){e===void 0&&(e={});let{nodeId:t}=e,r=wae({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,a]=ce.useState(null),[s,l]=ce.useState(null),d=o?.domReference||i,u=ce.useRef(null),f=p6();Ra(()=>{d&&(u.current=d)},[d]);let m=w9({...e,elements:{...o,...s&&{reference:s}}}),p=ce.useCallback(_=>{let I=Nt(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(I),m.refs.setReference(I)},[m.refs]),h=ce.useCallback(_=>{(Nt(_)||_===null)&&(u.current=_,a(_)),(Nt(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!Nt(_))&&m.refs.setReference(_)},[m.refs]),b=ce.useMemo(()=>({...m.refs,setReference:h,setPositionReference:p,domReference:u}),[m.refs,h,p]),v=ce.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),x=ce.useMemo(()=>({...m,...n,refs:b,elements:v,nodeId:t}),[m,b,v,t,n]);return Ra(()=>{n.dataRef.current.floatingContext=x;let _=f?.nodesRef.current.find(I=>I.id===t);_&&(_.context=x)}),ce.useMemo(()=>({...m,context:x,refs:b,elements:v}),[m,b,v,x])}function M9(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=ce.useRef(!1),d=ce.useRef(),u=ce.useRef(!0);ce.useEffect(()=>{if(!s)return;let m=uo(a.domReference);function p(){!r&&bn(a.domReference)&&a.domReference===J4(Yl(a.domReference))&&(c.current=!0)}function h(){u.current=!0}return m.addEventListener("blur",p),m.addEventListener("keydown",h,!0),()=>{m.removeEventListener("blur",p),m.removeEventListener("keydown",h,!0)}},[a.domReference,r,s]),ce.useEffect(()=>{if(!s)return;function m(p){let{reason:h}=p;(h==="reference-press"||h==="escape-key")&&(c.current=!0)}return o.on("openchange",m),()=>{o.off("openchange",m)}},[o,s]),ce.useEffect(()=>()=>{clearTimeout(d.current)},[]);let f=ce.useMemo(()=>({onPointerDown(m){N8(m.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;let p=Ad(m.nativeEvent);if(l&&Nt(p))try{if(F8()&&L8())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!u.current&&!j8(p))return}n(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;let p=m.relatedTarget,h=m.nativeEvent,b=Nt(p)&&p.hasAttribute(h6("focus-guard"))&&p.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{var v;let x=J4(a.domReference?a.domReference.ownerDocument:document);!p&&x===a.domReference||om((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||om(a.domReference,x)||b||n(!1,h,"focus")})}}),[i,a.domReference,n,l]);return ce.useMemo(()=>s?{reference:f}:{},[s,f])}var D9="active",R9="selected";function u6(e,t,r){let n=new Map,o=r==="item",i=e;if(o&&e){let{[D9]:a,[R9]:s,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[yae]:""},...i,...t.map(a=>{let s=a?a[r]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,d]=l;if(!(o&&[D9,R9].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof d=="function"){var u;(u=n.get(c))==null||u.push(d),a[c]=function(){for(var f,m=arguments.length,p=new Array(m),h=0;h<m;h++)p[h]=arguments[h];return(f=n.get(c))==null?void 0:f.map(b=>b(...p)).find(b=>b!==void 0)}}}else a[c]=d}),a),{})}}function B9(e){e===void 0&&(e=[]);let t=e.map(s=>s?.reference),r=e.map(s=>s?.floating),n=e.map(s=>s?.item),o=ce.useCallback(s=>u6(s,e,"reference"),t),i=ce.useCallback(s=>u6(s,e,"floating"),r),a=ce.useCallback(s=>u6(s,e,"item"),n);return ce.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}var Sae=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function j9(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(r=Sae.get(a))!=null?r:a,l=A9(),d=m6()!=null,u=ce.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":n?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&d&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,d,n,l,a]),f=ce.useMemo(()=>{let p={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?p:{...p,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),m=ce.useCallback(p=>{let{active:h,selected:b}=p,v={role:"option",...h&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":h&&b};case"combobox":return{...v,...h&&{"aria-selected":!0}}}return{}},[o,a]);return ce.useMemo(()=>i?{reference:u,floating:f,item:m}:{},[i,u,f,m])}var g6=y(O(),1),lm=y(R(),1);var iEe=y(R(),1);var sEe=y(O(),1);var[U9,cr]=Vt("ScrollArea.Root component was not found in tree");function Os(e,t){let r=Fi(t);Mo(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var kae=(0,lm.forwardRef)((e,t)=>{let{style:r,...n}=e,o=cr(),[i,a]=(0,lm.useState)(0),[s,l]=(0,lm.useState)(0),c=!!(i&&s);return Os(o.scrollbarX,()=>{let d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),l(d)}),Os(o.scrollbarY,()=>{let d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),a(d)}),c?(0,g6.jsx)("div",{...n,ref:t,style:{...r,width:i,height:s}}):null}),V9=(0,lm.forwardRef)((e,t)=>{let r=cr(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,g6.jsx)(kae,{...e,ref:t}):null});var v6=y(O(),1),ci=y(R(),1);var Cae={scrollHideDelay:1e3,type:"hover"},x6=(0,ci.forwardRef)((e,t)=>{let r=z("ScrollAreaRoot",Cae,e),{type:n,scrollHideDelay:o,scrollbars:i,...a}=r,[s,l]=(0,ci.useState)(null),[c,d]=(0,ci.useState)(null),[u,f]=(0,ci.useState)(null),[m,p]=(0,ci.useState)(null),[h,b]=(0,ci.useState)(null),[v,x]=(0,ci.useState)(0),[_,I]=(0,ci.useState)(0),[S,w]=(0,ci.useState)(!1),[P,E]=(0,ci.useState)(!1),B=He(t,H=>l(H));return(0,v6.jsx)(U9,{value:{type:n,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:d,content:u,onContentChange:f,scrollbarX:m,onScrollbarXChange:p,scrollbarXEnabled:S,onScrollbarXEnabledChange:w,scrollbarY:h,onScrollbarYChange:b,scrollbarYEnabled:P,onScrollbarYEnabledChange:E,onCornerWidthChange:x,onCornerHeightChange:I},children:(0,v6.jsx)(F,{...a,ref:B,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${v}px`,"--sa-corner-height":i!=="xy"?"0px":`${_}px`}})})});x6.displayName="@mantine/core/ScrollAreaRoot";var Zg=y(O(),1),bI=y(R(),1);var q9=y(O(),1),xI=y(R(),1);var S6=y(O(),1),Ld=y(R(),1);function pI(e,t){let r=e/t;return Number.isNaN(r)?0:r}function ec(e){let t=pI(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function hI(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Pae(e,[t,r]){return Math.min(r,Math.max(t,e))}function b6(e,t,r="ltr"){let n=ec(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],c=Pae(e,l);return hI([0,a],[0,s])(c)}function H9(e,t,r,n="ltr"){let o=ec(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,u=n==="ltr"?[0,d]:[d*-1,0];return hI([l,c],u)(e)}var Z9=y(O(),1),tc=y(R(),1);function gI(e,t){return e>0&&e<t}function Xi(e){return e?parseInt(e,10):0}var _6=y(O(),1),Ta=y(R(),1);function Ea(e,t,{checkForDefaultPrevented:r=!0}={}){return n=>{e?.(n),(r===!1||!n.defaultPrevented)&&t?.(n)}}var OEe=y(R(),1);var NEe=y(O(),1);var[W9,y6]=Vt("ScrollAreaScrollbar was not found in tree");var vI=(0,Ta.forwardRef)((e,t)=>{let{sizes:r,hasThumb:n,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...u}=e,f=cr(),[m,p]=(0,Ta.useState)(null),h=He(t,E=>p(E)),b=(0,Ta.useRef)(null),v=(0,Ta.useRef)(""),{viewport:x}=f,_=r.content-r.viewport,I=Fi(c),S=Fi(s),w=xs(d,10),P=E=>{if(b.current){let B=E.clientX-b.current.left,H=E.clientY-b.current.top;l({x:B,y:H})}};return(0,Ta.useEffect)(()=>{let E=B=>{let H=B.target;m?.contains(H)&&I(B,_)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[x,m,_,I]),(0,Ta.useEffect)(S,[r,S]),Os(m,w),Os(f.content,w),(0,_6.jsx)(W9,{value:{scrollbar:m,hasThumb:n,onThumbChange:Fi(o),onThumbPointerUp:Fi(i),onThumbPositionChange:S,onThumbPointerDown:Fi(a)},children:(0,_6.jsx)("div",{...u,ref:h,"data-mantine-scrollbar":!0,style:{position:"absolute",...u.style},onPointerDown:Ea(e.onPointerDown,E=>{E.preventDefault(),E.button===0&&(E.target.setPointerCapture(E.pointerId),b.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",P(E))}),onPointerMove:Ea(e.onPointerMove,P),onPointerUp:Ea(e.onPointerUp,E=>{let B=E.target;B.hasPointerCapture(E.pointerId)&&(E.preventDefault(),B.releasePointerCapture(E.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=v.current,b.current=null}})})});var I6=(0,tc.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,style:o,...i}=e,a=cr(),[s,l]=(0,tc.useState)(),c=(0,tc.useRef)(null),d=He(t,c,a.onScrollbarXChange);return(0,tc.useEffect)(()=>{c.current&&l(getComputedStyle(c.current))},[c]),(0,Z9.jsx)(vI,{"data-orientation":"horizontal",...i,ref:d,sizes:r,style:{...o,"--sa-thumb-width":`${ec(r)}px`},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(a.viewport){let m=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(m),gI(m,f)&&u.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Xi(s.paddingLeft),paddingEnd:Xi(s.paddingRight)}})}})});I6.displayName="@mantine/core/ScrollAreaScrollbarX";var G9=y(O(),1),rc=y(R(),1);var w6=(0,rc.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,style:o,...i}=e,a=cr(),[s,l]=(0,rc.useState)(),c=(0,rc.useRef)(null),d=He(t,c,a.onScrollbarYChange);return(0,rc.useEffect)(()=>{c.current&&l(window.getComputedStyle(c.current))},[]),(0,G9.jsx)(vI,{...i,"data-orientation":"vertical",ref:d,sizes:r,style:{"--sa-thumb-height":`${ec(r)}px`,...o},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(a.viewport){let m=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(m),gI(m,f)&&u.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Xi(s.paddingTop),paddingEnd:Xi(s.paddingBottom)}})}})});w6.displayName="@mantine/core/ScrollAreaScrollbarY";var Md=(0,Ld.forwardRef)((e,t)=>{let{orientation:r="vertical",...n}=e,{dir:o}=ei(),i=cr(),a=(0,Ld.useRef)(null),s=(0,Ld.useRef)(0),[l,c]=(0,Ld.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=pI(l.viewport,l.content),u={...n,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>{a.current=m},onThumbPointerUp:()=>{s.current=0},onThumbPointerDown:m=>{s.current=m}},f=(m,p)=>H9(m,s.current,l,p);return r==="horizontal"?(0,S6.jsx)(I6,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let m=i.viewport.scrollLeft,p=b6(m,l,o);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=f(m,o))}}):r==="vertical"?(0,S6.jsx)(w6,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let m=i.viewport.scrollTop,p=b6(m,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=f(m))}}):null});Md.displayName="@mantine/core/ScrollAreaScrollbarVisible";var Wg=(0,xI.forwardRef)((e,t)=>{let r=cr(),{forceMount:n,...o}=e,[i,a]=(0,xI.useState)(!1),s=e.orientation==="horizontal",l=xs(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?c:d)}},10);return Os(r.viewport,l),Os(r.content,l),n||i?(0,q9.jsx)(Md,{"data-state":i?"visible":"hidden",...o,ref:t}):null});Wg.displayName="@mantine/core/ScrollAreaScrollbarAuto";var K9=y(O(),1),cm=y(R(),1);var k6=(0,cm.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=cr(),[i,a]=(0,cm.useState)(!1);return(0,cm.useEffect)(()=>{let{scrollArea:s}=o,l=0;if(s){let c=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),r||i?(0,K9.jsx)(Wg,{"data-state":i?"visible":"hidden",...n,ref:t}):null});k6.displayName="@mantine/core/ScrollAreaScrollbarHover";var X9=y(O(),1),Bd=y(R(),1);var Q9=(0,Bd.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=cr(),i=e.orientation==="horizontal",[a,s]=(0,Bd.useState)("hidden"),l=xs(()=>s("idle"),100);return(0,Bd.useEffect)(()=>{if(a==="idle"){let c=window.setTimeout(()=>s("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay]),(0,Bd.useEffect)(()=>{let{viewport:c}=o,d=i?"scrollLeft":"scrollTop";if(c){let u=c[d],f=()=>{let m=c[d];u!==m&&(s("scrolling"),l()),u=m};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,i,l]),r||a!=="hidden"?(0,X9.jsx)(Md,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Ea(e.onPointerEnter,()=>s("interacting")),onPointerLeave:Ea(e.onPointerLeave,()=>s("idle"))}):null});var yI=(0,bI.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=cr(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return(0,bI.useEffect)(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?(0,Zg.jsx)(k6,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,Zg.jsx)(Q9,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,Zg.jsx)(Wg,{...n,ref:t,forceMount:r}):o.type==="always"?(0,Zg.jsx)(Md,{...n,ref:t}):null});yI.displayName="@mantine/core/ScrollAreaScrollbar";var C6=y(O(),1),jd=y(R(),1);function Y9(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){let i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)}var J9=(0,jd.forwardRef)((e,t)=>{let{style:r,...n}=e,o=cr(),i=y6(),{onThumbPositionChange:a}=i,s=He(t,d=>i.onThumbChange(d)),l=(0,jd.useRef)(void 0),c=xs(()=>{l.current&&(l.current(),l.current=void 0)},100);return(0,jd.useEffect)(()=>{let{viewport:d}=o;if(d){let u=()=>{if(c(),!l.current){let f=Y9(d,a);l.current=f,a()}};return a(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[o.viewport,c,a]),(0,C6.jsx)("div",{"data-state":i.hasThumb?"visible":"hidden",...n,ref:s,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:Ea(e.onPointerDownCapture,d=>{let f=d.target.getBoundingClientRect(),m=d.clientX-f.left,p=d.clientY-f.top;i.onThumbPointerDown({x:m,y:p})}),onPointerUp:Ea(e.onPointerUp,i.onThumbPointerUp)})});J9.displayName="@mantine/core/ScrollAreaThumb";var _I=(0,jd.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=y6();return r||o.hasThumb?(0,C6.jsx)(J9,{ref:t,...n}):null});_I.displayName="@mantine/core/ScrollAreaThumb";var P6=y(O(),1),ej=y(R(),1);var D6=(0,ej.forwardRef)(({children:e,style:t,...r},n)=>{let o=cr(),i=He(n,o.onViewportChange);return(0,P6.jsx)(F,{...r,ref:i,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t},children:(0,P6.jsx)("div",{style:{minWidth:"100%"},ref:o.onContentChange,children:e})})});D6.displayName="@mantine/core/ScrollAreaViewport";var II={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};var tj={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},Dae=(e,{scrollbarSize:t,overscrollBehavior:r})=>({root:{"--scrollarea-scrollbar-size":W(t),"--scrollarea-over-scroll-behavior":r}}),Ar=M((e,t)=>{let r=z("ScrollArea",tj,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,scrollbarSize:l,vars:c,type:d,scrollHideDelay:u,viewportProps:f,viewportRef:m,onScrollPositionChange:p,children:h,offsetScrollbars:b,scrollbars:v,onBottomReached:x,onTopReached:_,overscrollBehavior:I,...S}=r,[w,P]=(0,oc.useState)(!1),[E,B]=(0,oc.useState)(!1),[H,Z]=(0,oc.useState)(!1),K=q({name:"ScrollArea",props:r,classes:II,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:Dae}),T=(0,oc.useRef)(null),k=T9([m,T]);return(0,oc.useEffect)(()=>{if(!T.current||b!=="present")return;let $=T.current,C=new ResizeObserver(()=>{let{scrollHeight:A,clientHeight:D,scrollWidth:N,clientWidth:U}=$;B(A>D),Z(N>U)});return C.observe($),()=>C.disconnect()},[T,b]),(0,di.jsxs)(x6,{type:d==="never"?"always":d,scrollHideDelay:u,ref:t,scrollbars:v,...K("root"),...S,children:[(0,di.jsx)(D6,{...f,...K("viewport",{style:f?.style}),ref:k,"data-offset-scrollbars":b===!0?"xy":b||void 0,"data-scrollbars":v||void 0,"data-horizontal-hidden":b==="present"&&!H?"true":void 0,"data-vertical-hidden":b==="present"&&!E?"true":void 0,onScroll:$=>{f?.onScroll?.($),p?.({x:$.currentTarget.scrollLeft,y:$.currentTarget.scrollTop});let{scrollTop:C,scrollHeight:A,clientHeight:D}=$.currentTarget;C-(A-D)>=-.6&&x?.(),C===0&&_?.()},children:h}),(v==="xy"||v==="x")&&(0,di.jsx)(yI,{...K("scrollbar"),orientation:"horizontal","data-hidden":d==="never"||b==="present"&&!H?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,di.jsx)(_I,{...K("thumb")})}),(v==="xy"||v==="y")&&(0,di.jsx)(yI,{...K("scrollbar"),orientation:"vertical","data-hidden":d==="never"||b==="present"&&!E?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,di.jsx)(_I,{...K("thumb")})}),(0,di.jsx)(V9,{...K("corner"),"data-hovered":w||void 0,"data-hidden":d==="never"||void 0})]})});Ar.displayName="@mantine/core/ScrollArea";var wI=M((e,t)=>{let{children:r,classNames:n,styles:o,scrollbarSize:i,scrollHideDelay:a,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:u,unstyled:f,variant:m,viewportProps:p,scrollbars:h,style:b,vars:v,onBottomReached:x,onTopReached:_,...I}=z("ScrollAreaAutosize",tj,e);return(0,di.jsx)(F,{...I,ref:t,style:[{display:"flex",overflow:"auto"},b],children:(0,di.jsx)(F,{style:{display:"flex",flexDirection:"column",flex:1},children:(0,di.jsx)(Ar,{classNames:n,styles:o,scrollHideDelay:a,scrollbarSize:i,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:u,unstyled:f,variant:m,viewportProps:p,vars:v,scrollbars:h,onBottomReached:x,onTopReached:_,children:r})})})});Ar.classes=II;wI.displayName="@mantine/core/ScrollAreaAutosize";wI.classes=II;Ar.Autosize=wI;var rj=y(O(),1),s$e=y(R(),1);var R6={root:"m_87cf2631"};var Rae={__staticSelector:"UnstyledButton"},xt=ot((e,t)=>{let r=z("UnstyledButton",Rae,e),{className:n,component:o="button",__staticSelector:i,unstyled:a,classNames:s,styles:l,style:c,...d}=r,u=q({name:i,props:r,classes:R6,className:n,style:c,classNames:s,styles:l,unstyled:a});return(0,rj.jsx)(F,{...u("root",{focusable:!0}),component:o,ref:t,type:o==="button"?"button":void 0,...d})});xt.classes=R6;xt.displayName="@mantine/core/UnstyledButton";var oj=y(O(),1),g$e=y(R(),1);var E6={root:"m_515a97f8"};var Eae={},SI=M((e,t)=>{let r=z("VisuallyHidden",Eae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,...c}=r,d=q({name:"VisuallyHidden",classes:E6,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s});return(0,oj.jsx)(F,{component:"span",ref:t,...d("root"),...c})});SI.classes=E6;SI.displayName="@mantine/core/VisuallyHidden";var nj=y(O(),1),k$e=y(R(),1);var T6={root:"m_1b7284a3"};var Tae={},$ae=(e,{radius:t,shadow:r})=>({root:{"--paper-radius":t===void 0?void 0:Ee(t),"--paper-shadow":mf(r)}}),Qi=ot((e,t)=>{let r=z("Paper",Tae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,withBorder:l,vars:c,radius:d,shadow:u,variant:f,mod:m,...p}=r,h=q({name:"Paper",props:r,classes:T6,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:$ae});return(0,nj.jsx)(F,{ref:t,mod:[{"data-with-border":l},m],...h("root"),variant:f,...p})});Qi.classes=T6;Qi.displayName="@mantine/core/Paper";var mm=y(O(),1),$a=y(R(),1);function kI(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){let[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var lj=y(O(),1),cj=y(R(),1);function ij(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function aj(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}var Aae={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function sj({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:i,arrowY:a,dir:s}){let[l,c="center"]=e.split("-"),d={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[Aae[l]]:n},u=-t/2;return l==="left"?{...d,...ij(c,a,r,o),right:u,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:l==="right"?{...d,...ij(c,a,r,o),left:u,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:l==="top"?{...d,...aj(c,i,r,o,s),bottom:u,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:l==="bottom"?{...d,...aj(c,i,r,o,s),top:u,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}var Gg=(0,cj.forwardRef)(({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,visible:i,arrowX:a,arrowY:s,style:l,...c},d)=>{let{dir:u}=ei();return i?(0,lj.jsx)("div",{...c,ref:d,style:{...l,...sj({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,dir:u,arrowX:a,arrowY:s})}}):null});Gg.displayName="@mantine/core/FloatingArrow";var dj=y(O(),1);var U$e=y(R(),1);var $6={root:"m_9814e45f"};var Oae={zIndex:Pt("modal")},zae=(e,{gradient:t,color:r,backgroundOpacity:n,blur:o,radius:i,zIndex:a})=>({root:{"--overlay-bg":t||(r!==void 0||n!==void 0)&&Jn(r||"#000",n??.6)||void 0,"--overlay-filter":o?`blur(${W(o)})`:void 0,"--overlay-radius":i===void 0?void 0:Ee(i),"--overlay-z-index":a?.toString()}}),dm=ot((e,t)=>{let r=z("Overlay",Oae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,fixed:c,center:d,children:u,radius:f,zIndex:m,gradient:p,blur:h,color:b,backgroundOpacity:v,mod:x,..._}=r,I=q({name:"Overlay",props:r,classes:$6,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:zae});return(0,dj.jsx)(F,{ref:t,...I("root"),mod:[{center:d,fixed:c},x],..._,children:u})});dm.classes=$6;dm.displayName="@mantine/core/Overlay";var CI=y(O(),1),PI=y(R(),1),uj=y(Xl(),1);function A6(e){let t=document.createElement("div");return t.setAttribute("data-portal","true"),typeof e.className=="string"&&t.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(t.style,e.style),typeof e.id=="string"&&t.setAttribute("id",e.id),t}function Nae({target:e,reuseTargetNode:t,...r}){if(e)return typeof e=="string"?document.querySelector(e)||A6(r):e;if(t){let n=document.querySelector("[data-mantine-shared-portal-node]");if(n)return n;let o=A6(r);return o.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(o),o}return A6(r)}var Fae={},O6=M((e,t)=>{let{children:r,target:n,reuseTargetNode:o,...i}=z("Portal",Fae,e),[a,s]=(0,PI.useState)(!1),l=(0,PI.useRef)(null);return Mo(()=>(s(!0),l.current=Nae({target:n,reuseTargetNode:o,...i}),cd(t,l.current),!n&&!o&&l.current&&document.body.appendChild(l.current),()=>{!n&&!o&&l.current&&document.body.removeChild(l.current)}),[n]),!a||!l.current?null:(0,uj.createPortal)((0,CI.jsx)(CI.Fragment,{children:r}),l.current)});O6.displayName="@mantine/core/Portal";var qg=y(O(),1),n5e=y(R(),1);var _n=M(({withinPortal:e=!0,children:t,...r},n)=>_y()==="test"||!e?(0,qg.jsx)(qg.Fragment,{children:t}):(0,qg.jsx)(O6,{ref:n,...r,children:t}));_n.displayName="@mantine/core/OptionalPortal";var um=y(O(),1),x5e=y(R(),1);var Kg=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Xg={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...Kg("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Kg("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Kg("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Kg("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Kg("top"),common:{transformOrigin:"top right"}}};var fj={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function mj({transition:e,state:t,duration:r,timingFunction:n}){let o={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in Xg?{transitionProperty:Xg[e].transitionProperty,...o,...Xg[e].common,...Xg[e][fj[t]]}:{}:{transitionProperty:e.transitionProperty,...o,...e.common,...e[fj[t]]}}var zs=y(R(),1),pj=y(Xl(),1);var p5e=y(O(),1);function hj({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:a,onExited:s,enterDelay:l,exitDelay:c}){let d=lt(),u=ys(),f=d.respectReducedMotion?u:!1,[m,p]=(0,zs.useState)(f?0:e),[h,b]=(0,zs.useState)(n?"entered":"exited"),v=(0,zs.useRef)(-1),x=(0,zs.useRef)(-1),_=(0,zs.useRef)(-1);function I(){window.clearTimeout(v.current),window.clearTimeout(x.current),cancelAnimationFrame(_.current)}let S=P=>{I();let E=P?o:i,B=P?a:s,H=f?0:P?e:t;p(H),H===0?(typeof E=="function"&&E(),typeof B=="function"&&B(),b(P?"entered":"exited")):_.current=requestAnimationFrame(()=>{pj.default.flushSync(()=>{b(P?"pre-entering":"pre-exiting")}),_.current=requestAnimationFrame(()=>{typeof E=="function"&&E(),b(P?"entering":"exiting"),v.current=window.setTimeout(()=>{typeof B=="function"&&B(),b(P?"entered":"exited")},H)})})},w=P=>{if(I(),typeof(P?l:c)!="number"){S(P);return}x.current=window.setTimeout(()=>{S(P)},P?l:c)};return br(()=>{w(n)},[n]),(0,zs.useEffect)(()=>()=>{I()},[]),{transitionDuration:m,transitionStatus:h,transitionTimingFunction:r||"ease"}}function Ho({keepMounted:e,transition:t="fade",duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:a="ease",onExit:s,onEntered:l,onEnter:c,onExited:d,enterDelay:u,exitDelay:f}){let m=_y(),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:b}=hj({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:d,enterDelay:u,exitDelay:f});return p===0||m==="test"?o?(0,um.jsx)(um.Fragment,{children:i({})}):e?i({display:"none"}):null:h==="exited"?e?i({display:"none"}):null:(0,um.jsx)(um.Fragment,{children:i(mj({transition:t,duration:p,state:h,timingFunction:b}))})}Ho.displayName="@mantine/core/Transition";var S5e=y(R(),1);var C5e=y(O(),1);var[gj,DI]=Vt("Popover component was not found in the tree");var Ud=y(O(),1);var F5e=y(R(),1);var vj=y(O(),1),xj=y(R(),1);function fm({children:e,active:t=!0,refProp:r="ref",innerRef:n}){let o=f2(t),i=He(o,n);return yo(e)?(0,xj.cloneElement)(e,{[r]:i}):e}function bj(e){return(0,vj.jsx)(SI,{tabIndex:-1,"data-autofocus":!0,...e})}fm.displayName="@mantine/core/FocusTrap";bj.displayName="@mantine/core/FocusTrapInitialFocus";fm.InitialFocus=bj;var RI={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};var Lae={},EI=M((e,t)=>{let r=z("PopoverDropdown",Lae,e),{className:n,style:o,vars:i,children:a,onKeyDownCapture:s,variant:l,classNames:c,styles:d,...u}=r,f=DI(),m=Oh({opened:f.opened,shouldReturnFocus:f.returnFocus}),p=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:"dialog",tabIndex:-1}:{},h=He(t,f.floating);return f.disabled?null:(0,Ud.jsx)(_n,{...f.portalProps,withinPortal:f.withinPortal,children:(0,Ud.jsx)(Ho,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||"fade",duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:typeof f.transitionProps?.exitDuration=="number"?f.transitionProps.exitDuration:f.transitionProps?.duration,children:b=>(0,Ud.jsx)(fm,{active:f.trapFocus&&f.opened,innerRef:h,children:(0,Ud.jsxs)(F,{...p,...u,variant:l,onKeyDownCapture:EF(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:m,onKeyDown:s}),"data-position":f.placement,"data-fixed":f.floatingStrategy==="fixed"||void 0,...f.getStyles("dropdown",{className:n,props:r,classNames:c,styles:d,style:[{...b,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width==="target"?void 0:W(f.width)},f.resolvedStyles.dropdown,d?.dropdown,o]}),children:[a,(0,Ud.jsx)(Gg,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles("arrow",{props:r,classNames:c,styles:d})})]})})})})});EI.classes=RI;EI.displayName="@mantine/core/PopoverDropdown";var yj=y(R(),1);var J5e=y(O(),1);var Mae={refProp:"ref",popupType:"dialog"},z6=M((e,t)=>{let{children:r,refProp:n,popupType:o,...i}=z("PopoverTarget",Mae,e);if(!yo(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let a=i,s=DI(),l=He(s.reference,Cl(r),t),c=s.withRoles?{"aria-haspopup":o,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{};return(0,yj.cloneElement)(r,{...a,...c,...s.targetProps,className:Ze(s.targetProps.className,a.className,r.props.className),[n]:l,...s.controlled?null:{onClick:s.onToggle}})});z6.displayName="@mantine/core/PopoverTarget";var _j=y(R(),1);var TI=y(R(),1);function $I({opened:e,floating:t,position:r,positionDependencies:n}){let[o,i]=(0,TI.useState)(0);(0,TI.useEffect)(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return lI(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),br(()=>{t.update()},n),br(()=>{i(a=>a+1)},[e])}function Bae(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function jae(e,t){let r=Bae(e.middlewares),n=[im(e.offset)];return r.shift&&n.push(Nd(typeof r.shift=="boolean"?{limiter:fI(),padding:5}:{limiter:fI(),padding:5,...r.shift})),r.flip&&n.push(typeof r.flip=="boolean"?Fd():Fd(r.flip)),r.inline&&n.push(typeof r.inline=="boolean"?Jl():Jl(r.inline)),n.push(Hg({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width==="target")&&n.push(l6({...typeof r.size=="boolean"?{}:r.size,apply({rects:o,availableWidth:i,availableHeight:a,...s}){let c=t().refs.floating.current?.style??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:o,availableWidth:i,availableHeight:a,...s}):Object.assign(c,{maxWidth:`${i}px`,maxHeight:`${a}px`})),e.width==="target"&&Object.assign(c,{width:`${o.reference.width}px`})}})),n}function Ij(e){let[t,r]=rt({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=(0,_j.useRef)(t),o=()=>{t&&!e.disabled&&r(!1)},i=()=>!e.disabled&&r(!t),a=sm({strategy:e.strategy,placement:e.position,middleware:jae(e,()=>a)});return $I({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:a}),br(()=>{e.onPositionChange?.(a.placement)},[a.placement]),br(()=>{t!==n.current&&(t?e.onOpen?.():e.onClose?.()),n.current=t},[t,e.onClose,e.onOpen]),{floating:a,controlled:typeof e.opened=="boolean",opened:t,onClose:o,onToggle:i}}var Uae={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Pt("popover"),__staticSelector:"Popover",width:"max-content"},Vae=(e,{radius:t,shadow:r})=>({dropdown:{"--popover-radius":t===void 0?void 0:Ee(t),"--popover-shadow":mf(r)}});function Gr(e){let t=z("Popover",Uae,e),{children:r,position:n,offset:o,onPositionChange:i,positionDependencies:a,opened:s,transitionProps:l,onExitTransitionEnd:c,onEnterTransitionEnd:d,width:u,middlewares:f,withArrow:m,arrowSize:p,arrowOffset:h,arrowRadius:b,arrowPosition:v,unstyled:x,classNames:_,styles:I,closeOnClickOutside:S,withinPortal:w,portalProps:P,closeOnEscape:E,clickOutsideEvents:B,trapFocus:H,onClose:Z,onDismiss:K,onOpen:T,onChange:k,zIndex:$,radius:C,shadow:A,id:D,defaultOpened:N,__staticSelector:U,withRoles:G,disabled:re,returnFocus:he,variant:me,keepMounted:Q,vars:oe,floatingStrategy:Ie,withOverlay:se,overlayProps:$e,...Ve}=t,Je=q({name:U,props:t,classes:RI,classNames:_,styles:I,unstyled:x,rootSelector:"dropdown",vars:oe,varsResolver:Vae}),{resolvedStyles:at}=Vr({classNames:_,styles:I,props:t}),ze=(0,$a.useRef)(null),[Kt,Xt]=(0,$a.useState)(null),[ao,pe]=(0,$a.useState)(null),{dir:ue}=ei(),Se=pt(D),Ae=Ij({middlewares:f,width:u,position:kI(ue,n),offset:typeof o=="number"?o+(m?p/2:0):o,arrowRef:ze,arrowOffset:h,onPositionChange:i,positionDependencies:a,opened:s,defaultOpened:N,onChange:k,onOpen:T,onClose:Z,onDismiss:K,strategy:Ie,disabled:re});c2(()=>{S&&(Ae.onClose(),K?.())},B,[Kt,ao]);let Xe=(0,$a.useCallback)(Re=>{Xt(Re),Ae.floating.refs.setReference(Re)},[Ae.floating.refs.setReference]),Fe=(0,$a.useCallback)(Re=>{pe(Re),Ae.floating.refs.setFloating(Re)},[Ae.floating.refs.setFloating]),et=(0,$a.useCallback)(()=>{l?.onExited?.(),c?.()},[l?.onExited,c]),de=(0,$a.useCallback)(()=>{l?.onEntered?.(),d?.()},[l?.onEntered,d]);return(0,mm.jsxs)(gj,{value:{returnFocus:he,disabled:re,controlled:Ae.controlled,reference:Xe,floating:Fe,x:Ae.floating.x,y:Ae.floating.y,arrowX:Ae.floating?.middlewareData?.arrow?.x,arrowY:Ae.floating?.middlewareData?.arrow?.y,opened:Ae.opened,arrowRef:ze,transitionProps:{...l,onExited:et,onEntered:de},width:u,withArrow:m,arrowSize:p,arrowOffset:h,arrowRadius:b,arrowPosition:v,placement:Ae.floating.placement,trapFocus:H,withinPortal:w,portalProps:P,zIndex:$,radius:C,shadow:A,closeOnEscape:E,onDismiss:K,onClose:Ae.onClose,onToggle:Ae.onToggle,getTargetId:()=>`${Se}-target`,getDropdownId:()=>`${Se}-dropdown`,withRoles:G,targetProps:Ve,__staticSelector:U,classNames:_,styles:I,unstyled:x,variant:me,keepMounted:Q,getStyles:Je,resolvedStyles:at,floatingStrategy:Ie},children:[r,se&&(0,mm.jsx)(Ho,{transition:"fade",mounted:Ae.opened,duration:l?.duration||250,exitDuration:l?.exitDuration||250,children:Re=>(0,mm.jsx)(_n,{withinPortal:w,children:(0,mm.jsx)(dm,{...$e,...Je("overlay",{className:$e?.className,style:[Re,$e?.style]})})})})]})}Gr.Target=z6;Gr.Dropdown=EI;Gr.displayName="@mantine/core/Popover";Gr.extend=e=>e;var Vd=y(O(),1),_Oe=y(R(),1);var M6=y(O(),1),VAe=y(R(),1);var pm=y(O(),1),wj=y(R(),1);var Wo={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};var N6=(0,wj.forwardRef)(({className:e,...t},r)=>(0,pm.jsxs)(F,{component:"span",className:Ze(Wo.barsLoader,e),...t,ref:r,children:[(0,pm.jsx)("span",{className:Wo.bar}),(0,pm.jsx)("span",{className:Wo.bar}),(0,pm.jsx)("span",{className:Wo.bar})]}));N6.displayName="@mantine/core/Bars";var hm=y(O(),1),Sj=y(R(),1);var F6=(0,Sj.forwardRef)(({className:e,...t},r)=>(0,hm.jsxs)(F,{component:"span",className:Ze(Wo.dotsLoader,e),...t,ref:r,children:[(0,hm.jsx)("span",{className:Wo.dot}),(0,hm.jsx)("span",{className:Wo.dot}),(0,hm.jsx)("span",{className:Wo.dot})]}));F6.displayName="@mantine/core/Dots";var kj=y(O(),1),Cj=y(R(),1);var L6=(0,Cj.forwardRef)(({className:e,...t},r)=>(0,kj.jsx)(F,{component:"span",className:Ze(Wo.ovalLoader,e),...t,ref:r}));L6.displayName="@mantine/core/Oval";var B6={bars:N6,oval:L6,dots:F6},Hae={loaders:B6,type:"oval"},Wae=(e,{size:t,color:r})=>({root:{"--loader-size":ge(t,"loader-size"),"--loader-color":r?Be(r,e):void 0}}),fo=M((e,t)=>{let r=z("Loader",Hae,e),{size:n,color:o,type:i,vars:a,className:s,style:l,classNames:c,styles:d,unstyled:u,loaders:f,variant:m,children:p,...h}=r,b=q({name:"Loader",props:r,classes:Wo,className:s,style:l,classNames:c,styles:d,unstyled:u,vars:a,varsResolver:Wae});return p?(0,M6.jsx)(F,{...b("root"),ref:t,...h,children:p}):(0,M6.jsx)(F,{...b("root"),ref:t,component:f[i],variant:m,size:n,...h})});fo.defaultLoaders=B6;fo.classes=Wo;fo.displayName="@mantine/core/Loader";var Dj=y(O(),1);var nOe=y(R(),1);var Ns={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};var Pj={orientation:"horizontal"},Zae=(e,{borderWidth:t})=>({group:{"--ai-border-width":W(t)}}),AI=M((e,t)=>{let r=z("ActionIconGroup",Pj,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,orientation:l,vars:c,borderWidth:d,variant:u,mod:f,...m}=z("ActionIconGroup",Pj,e),p=q({name:"ActionIconGroup",props:r,classes:Ns,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:c,varsResolver:Zae,rootSelector:"group"});return(0,Dj.jsx)(F,{...p("group"),ref:t,variant:u,mod:[{"data-orientation":l},f],role:"group",...m})});AI.classes=Ns;AI.displayName="@mantine/core/ActionIconGroup";var Ej=y(O(),1),fOe=y(R(),1);var Rj={},Gae=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:i,size:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":ge(a,"section-height"),"--section-padding-x":ge(a,"section-padding-x"),"--section-fz":wt(a),"--section-radius":t===void 0?void 0:Ee(t),"--section-bg":r||o?s.background:void 0,"--section-color":s.color,"--section-bd":r||o?s.border:void 0}}},OI=M((e,t)=>{let r=z("ActionIconGroupSection",Rj,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,variant:c,gradient:d,radius:u,autoContrast:f,...m}=z("ActionIconGroupSection",Rj,e),p=q({name:"ActionIconGroupSection",props:r,classes:Ns,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,varsResolver:Gae,rootSelector:"groupSection"});return(0,Ej.jsx)(F,{...p("groupSection"),ref:t,variant:c,...m})});OI.classes=Ns;OI.displayName="@mantine/core/ActionIconGroupSection";var qae={},Kae=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a})=>{let s=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ai-size":ge(t,"ai-size"),"--ai-radius":r===void 0?void 0:Ee(r),"--ai-bg":i||n?s.background:void 0,"--ai-hover":i||n?s.hover:void 0,"--ai-hover-color":i||n?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":i||n?s.border:void 0}}},bt=ot((e,t)=>{let r=z("ActionIcon",qae,e),{className:n,unstyled:o,variant:i,classNames:a,styles:s,style:l,loading:c,loaderProps:d,size:u,color:f,radius:m,__staticSelector:p,gradient:h,vars:b,children:v,disabled:x,"data-disabled":_,autoContrast:I,mod:S,...w}=r,P=q({name:["ActionIcon",p],props:r,className:n,style:l,classes:Ns,classNames:a,styles:s,unstyled:o,vars:b,varsResolver:Kae});return(0,Vd.jsxs)(xt,{...P("root",{active:!x&&!c&&!_}),...w,unstyled:o,variant:i,size:u,disabled:x||c,ref:t,mod:[{loading:c,disabled:x||_},S],children:[(0,Vd.jsx)(Ho,{mounted:!!c,transition:"slide-down",duration:150,children:E=>(0,Vd.jsx)(F,{component:"span",...P("loader",{style:E}),"aria-hidden":!0,children:(0,Vd.jsx)(fo,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...d})})}),(0,Vd.jsx)(F,{component:"span",mod:{loading:c},...P("icon"),children:v})]})});bt.classes=Ns;bt.displayName="@mantine/core/ActionIcon";bt.Group=AI;bt.GroupSection=OI;var j6=y(O(),1),Tj=y(R(),1),U6=(0,Tj.forwardRef)(({size:e="var(--cb-icon-size, 70%)",style:t,...r},n)=>(0,j6.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:n,...r,children:(0,j6.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));U6.displayName="@mantine/core/CloseIcon";var zI=y(O(),1);var LOe=y(R(),1);var V6={root:"m_86a44da5","root--subtle":"m_220c80f2"};var Xae={variant:"subtle"},Qae=(e,{size:t,radius:r,iconSize:n})=>({root:{"--cb-size":ge(t,"cb-size"),"--cb-radius":r===void 0?void 0:Ee(r),"--cb-icon-size":W(n)}}),ui=ot((e,t)=>{let r=z("CloseButton",Xae,e),{iconSize:n,children:o,vars:i,radius:a,className:s,classNames:l,style:c,styles:d,unstyled:u,"data-disabled":f,disabled:m,variant:p,icon:h,mod:b,__staticSelector:v,...x}=r,_=q({name:v||"CloseButton",props:r,className:s,style:c,classes:V6,classNames:l,styles:d,unstyled:u,vars:i,varsResolver:Qae});return(0,zI.jsxs)(xt,{ref:t,...x,unstyled:u,variant:p,disabled:m,mod:[{disabled:m||f},b],..._("root",{variant:p,active:!m&&!f}),children:[h||(0,zI.jsx)(U6,{}),o]})});ui.classes=V6;ui.displayName="@mantine/core/CloseButton";var Oj=y(O(),1),XOe=y(R(),1);var $j=y(R(),1);function Aj(e){return $j.Children.toArray(e).filter(Boolean)}var H6={root:"m_4081bf90"};var Yae={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Jae=(e,{grow:t,preventGrowOverflow:r,gap:n,align:o,justify:i,wrap:a},{childWidth:s})=>({root:{"--group-child-width":t&&r?s:void 0,"--group-gap":Tt(n),"--group-align":o,"--group-justify":i,"--group-wrap":a}}),De=M((e,t)=>{let r=z("Group",Yae,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,children:l,gap:c,align:d,justify:u,wrap:f,grow:m,preventGrowOverflow:p,vars:h,variant:b,__size:v,mod:x,..._}=r,I=Aj(l),S=I.length,w=Tt(c??"md"),E={childWidth:`calc(${100/S}% - (${w} - ${w} / ${S}))`},B=q({name:"Group",props:r,stylesCtx:E,className:o,style:i,classes:H6,classNames:n,styles:a,unstyled:s,vars:h,varsResolver:Jae});return(0,Oj.jsx)(F,{...B("root"),ref:t,variant:b,mod:[{grow:m},x],size:v,..._,children:I})});De.classes=H6;De.displayName="@mantine/core/Group";var Qg=y(O(),1),Lj=y(R(),1);var aze=y(R(),1);var lze=y(O(),1);var[zj,qr]=Vt("ModalBase component was not found in tree");var W6=y(R(),1);var gm=y(R(),1);function Nj({opened:e,transitionDuration:t}){let[r,n]=(0,gm.useState)(e),o=(0,gm.useRef)(-1),a=ys()?0:t;return(0,gm.useEffect)(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}function Fj({id:e,transitionProps:t,opened:r,trapFocus:n,closeOnEscape:o,onClose:i,returnFocus:a}){let s=pt(e),[l,c]=(0,W6.useState)(!1),[d,u]=(0,W6.useState)(!1),f=typeof t?.duration=="number"?t?.duration:200,m=Nj({opened:r,transitionDuration:f});return kl("keydown",p=>{p.key==="Escape"&&o&&!p.isComposing&&r&&p.target?.getAttribute("data-mantine-stop-propagation")!=="true"&&i()},{capture:!0}),Oh({opened:r,shouldReturnFocus:n&&a}),{_id:s,titleMounted:l,bodyMounted:d,shouldLockScroll:m,setTitleMounted:c,setBodyMounted:u}}var Z6=(0,Lj.forwardRef)(({keepMounted:e,opened:t,onClose:r,id:n,transitionProps:o,onExitTransitionEnd:i,onEnterTransitionEnd:a,trapFocus:s,closeOnEscape:l,returnFocus:c,closeOnClickOutside:d,withinPortal:u,portalProps:f,lockScroll:m,children:p,zIndex:h,shadow:b,padding:v,__vars:x,unstyled:_,removeScrollProps:I,...S},w)=>{let{_id:P,titleMounted:E,bodyMounted:B,shouldLockScroll:H,setTitleMounted:Z,setBodyMounted:K}=Fj({id:n,transitionProps:o,opened:t,trapFocus:s,closeOnEscape:l,onClose:r,returnFocus:c}),{key:T,...k}=I||{};return(0,Qg.jsx)(_n,{...f,withinPortal:u,children:(0,Qg.jsx)(zj,{value:{opened:t,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:i,onEnterTransitionEnd:a,transitionProps:{...o,keepMounted:e},getTitleId:()=>`${P}-title`,getBodyId:()=>`${P}-body`,titleMounted:E,bodyMounted:B,setTitleMounted:Z,setBodyMounted:K,trapFocus:s,closeOnEscape:l,zIndex:h,unstyled:_},children:(0,Qg.jsx)(Ni,{enabled:H&&m,...k,children:(0,Qg.jsx)(F,{ref:w,...S,__vars:{...x,"--mb-z-index":(h||Pt("modal")).toString(),"--mb-shadow":mf(b),"--mb-padding":Tt(v)},children:p})},T)})})});Z6.displayName="@mantine/core/ModalBase";var jj=y(O(),1),Uj=y(R(),1);var Mj=y(R(),1);function Bj(){let e=qr();return(0,Mj.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Yi={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};var G6=(0,Uj.forwardRef)(({className:e,...t},r)=>{let n=Bj(),o=qr();return(0,jj.jsx)(F,{ref:r,...t,id:n,className:Ze({[Yi.body]:!o.unstyled},e)})});G6.displayName="@mantine/core/ModalBaseBody";var Vj=y(O(),1),Hj=y(R(),1);var q6=(0,Hj.forwardRef)(({className:e,onClick:t,...r},n)=>{let o=qr();return(0,Vj.jsx)(ui,{ref:n,...r,onClick:i=>{o.onClose(),t?.(i)},className:Ze({[Yi.close]:!o.unstyled},e),unstyled:o.unstyled})});q6.displayName="@mantine/core/ModalBaseCloseButton";var Yg=y(O(),1),Wj=y(R(),1);var K6=(0,Wj.forwardRef)(({transitionProps:e,className:t,innerProps:r,onKeyDown:n,style:o,...i},a)=>{let s=qr();return(0,Yg.jsx)(Ho,{mounted:s.opened,transition:"pop",...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:l=>(0,Yg.jsx)("div",{...r,className:Ze({[Yi.inner]:!s.unstyled},r.className),children:(0,Yg.jsx)(fm,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,Yg.jsx)(Qi,{...i,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[o,l],className:Ze({[Yi.content]:!s.unstyled},t),unstyled:s.unstyled,children:i.children})})})})});K6.displayName="@mantine/core/ModalBaseContent";var Zj=y(O(),1),Gj=y(R(),1);var X6=(0,Gj.forwardRef)(({className:e,...t},r)=>{let n=qr();return(0,Zj.jsx)(F,{component:"header",ref:r,className:Ze({[Yi.header]:!n.unstyled},e),...t})});X6.displayName="@mantine/core/ModalBaseHeader";var Q6=y(O(),1),Kj=y(R(),1);var ese={duration:200,timingFunction:"ease",transition:"fade"};function qj(e){let t=qr();return{...ese,...t.transitionProps,...e}}var Y6=(0,Kj.forwardRef)(({onClick:e,transitionProps:t,style:r,visible:n,...o},i)=>{let a=qr(),s=qj(t);return(0,Q6.jsx)(Ho,{mounted:n!==void 0?n:a.opened,...s,transition:"fade",children:l=>(0,Q6.jsx)(dm,{ref:i,fixed:!0,style:[r,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:c=>{e?.(c),a.closeOnClickOutside&&a.onClose()},...o})})});Y6.displayName="@mantine/core/ModalBaseOverlay";var Yj=y(O(),1),Jj=y(R(),1);var Xj=y(R(),1);function Qj(){let e=qr();return(0,Xj.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}var J6=(0,Jj.forwardRef)(({className:e,...t},r)=>{let n=Qj(),o=qr();return(0,Yj.jsx)(F,{component:"h2",ref:r,className:Ze({[Yi.title]:!o.unstyled},e),...t,id:n})});J6.displayName="@mantine/core/ModalBaseTitle";var NI=y(O(),1);function eU({children:e}){return(0,NI.jsx)(NI.Fragment,{children:e})}var Hd=y(O(),1);var zNe=y(R(),1);var m3e=y(R(),1),p3e=y(O(),1);var[tU,rU]=_o({size:"sm"});var oU=y(O(),1),x3e=y(R(),1);var tse={},eD=M((e,t)=>{let r=z("InputClearButton",tse,e),{size:n,variant:o,vars:i,classNames:a,styles:s,...l}=r,c=rU(),{resolvedClassNames:d,resolvedStyles:u}=Vr({classNames:a,styles:s,props:r});return(0,oU.jsx)(ui,{variant:o||"transparent",ref:t,size:n||c?.size||"sm",classNames:d,styles:u,__staticSelector:"InputClearButton",...l})});eD.displayName="@mantine/core/InputClearButton";var aU=y(O(),1);var A3e=y(R(),1);var C3e=y(R(),1),P3e=y(O(),1);var[nU,fi]=_o({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Kr={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};var iU={},rse=(e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${wt(t)} - ${W(2)})`}}),vm=M((e,t)=>{let r=z("InputDescription",iU,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,__staticSelector:d,__inheritStyles:u=!0,variant:f,...m}=z("InputDescription",iU,r),p=fi(),h=q({name:["InputWrapper",d],props:r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"description",vars:l,varsResolver:rse}),b=u&&p?.getStyles||h;return(0,aU.jsx)(F,{component:"p",ref:t,variant:f,size:c,...b("description",p?.getStyles?{className:o,style:i}:void 0),...m})});vm.classes=Kr;vm.displayName="@mantine/core/InputDescription";var sU=y(O(),1);var H3e=y(R(),1);var ose={},nse=(e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${wt(t)} - ${W(2)})`}}),xm=M((e,t)=>{let r=z("InputError",ose,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,__staticSelector:d,__inheritStyles:u=!0,variant:f,...m}=r,p=q({name:["InputWrapper",d],props:r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"error",vars:l,varsResolver:nse}),h=fi(),b=u&&h?.getStyles||p;return(0,sU.jsx)(F,{component:"p",ref:t,variant:f,size:c,...b("error",h?.getStyles?{className:o,style:i}:void 0),...m})});xm.classes=Kr;xm.displayName="@mantine/core/InputError";var FI=y(O(),1),eNe=y(R(),1);var lU={labelElement:"label"},ise=(e,{size:t})=>({label:{"--input-label-size":wt(t),"--input-asterisk-color":void 0}}),bm=M((e,t)=>{let r=z("InputLabel",lU,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,labelElement:c,size:d,required:u,htmlFor:f,onMouseDown:m,children:p,__staticSelector:h,variant:b,mod:v,...x}=z("InputLabel",lU,r),_=q({name:["InputWrapper",h],props:r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"label",vars:l,varsResolver:ise}),I=fi(),S=I?.getStyles||_;return(0,FI.jsxs)(F,{...S("label",I?.getStyles?{className:o,style:i}:void 0),component:c,variant:b,size:d,ref:t,htmlFor:c==="label"?f:void 0,mod:[{required:u},v],onMouseDown:w=>{m?.(w),!w.defaultPrevented&&w.detail>1&&w.preventDefault()},...x,children:[p,u&&(0,FI.jsx)("span",{...S("required"),"aria-hidden":!0,children:" *"})]})});bm.classes=Kr;bm.displayName="@mantine/core/InputLabel";var dU=y(O(),1),dNe=y(R(),1);var cU={},LI=M((e,t)=>{let r=z("InputPlaceholder",cU,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,variant:d,error:u,mod:f,...m}=z("InputPlaceholder",cU,r),p=q({name:["InputPlaceholder",c],props:r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"placeholder"});return(0,dU.jsx)(F,{...p("placeholder"),mod:[{error:!!u},f],component:"span",variant:d,ref:t,...m})});LI.classes=Kr;LI.displayName="@mantine/core/InputPlaceholder";var ym=y(O(),1),MI=y(R(),1);function uU(e,{hasDescription:t,hasError:r}){let n=e.findIndex(l=>l==="input"),o=e.slice(0,n),i=e.slice(n+1),a=t&&o.includes("description")||r&&o.includes("error");return{offsetBottom:t&&i.includes("description")||r&&i.includes("error"),offsetTop:a}}var ase={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},sse=(e,{size:t})=>({label:{"--input-label-size":wt(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${wt(t)} - ${W(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${wt(t)} - ${W(2)})`}}),BI=M((e,t)=>{let r=z("InputWrapper",ase,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,variant:d,__staticSelector:u,inputContainer:f,inputWrapperOrder:m,label:p,error:h,description:b,labelProps:v,descriptionProps:x,errorProps:_,labelElement:I,children:S,withAsterisk:w,id:P,required:E,__stylesApiProps:B,mod:H,...Z}=r,K=q({name:["InputWrapper",u],props:B||r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:sse}),T={size:c,variant:d,__staticSelector:u},k=pt(P),$=typeof w=="boolean"?w:E,C=_?.id||`${k}-error`,A=x?.id||`${k}-description`,D=k,N=!!h&&typeof h!="boolean",U=!!b,G=`${N?C:""} ${U?A:""}`,re=G.trim().length>0?G.trim():void 0,he=v?.id||`${k}-label`,me=p&&(0,ym.jsx)(bm,{labelElement:I,id:he,htmlFor:D,required:$,...T,...v,children:p},"label"),Q=U&&(0,ym.jsx)(vm,{...x,...T,size:x?.size||T.size,id:x?.id||A,children:b},"description"),oe=(0,ym.jsx)(MI.Fragment,{children:f(S)},"input"),Ie=N&&(0,MI.createElement)(xm,{..._,...T,size:_?.size||T.size,key:"error",id:_?.id||C},h),se=m.map($e=>{switch($e){case"label":return me;case"input":return oe;case"description":return Q;case"error":return Ie;default:return null}});return(0,ym.jsx)(nU,{value:{getStyles:K,describedBy:re,inputId:D,labelId:he,...uU(m,{hasDescription:U,hasError:N})},children:(0,ym.jsx)(F,{ref:t,variant:d,size:c,mod:[{error:!!h},H],...K("root"),...Z,children:se})})});BI.classes=Kr;BI.displayName="@mantine/core/InputWrapper";var lse={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},cse=(e,t,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":ge(t.size,"input-height"),"--input-fz":wt(t.size),"--input-radius":t.radius===void 0?void 0:Ee(t.radius),"--input-left-section-width":t.leftSectionWidth!==void 0?W(t.leftSectionWidth):void 0,"--input-right-section-width":t.rightSectionWidth!==void 0?W(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?ge(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),ct=ot((e,t)=>{let r=z("Input",lse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,required:l,__staticSelector:c,__stylesApiProps:d,size:u,wrapperProps:f,error:m,disabled:p,leftSection:h,leftSectionProps:b,leftSectionWidth:v,rightSection:x,rightSectionProps:_,rightSectionWidth:I,rightSectionPointerEvents:S,leftSectionPointerEvents:w,variant:P,vars:E,pointer:B,multiline:H,radius:Z,id:K,withAria:T,withErrorStyles:k,mod:$,inputSize:C,__clearSection:A,__clearable:D,__defaultRightSection:N,...U}=r,{styleProps:G,rest:re}=Hr(U),he=fi(),me={offsetBottom:he?.offsetBottom,offsetTop:he?.offsetTop},Q=q({name:["Input",c],props:d||r,classes:Kr,className:o,style:i,classNames:n,styles:a,unstyled:s,stylesCtx:me,rootSelector:"wrapper",vars:E,varsResolver:cse}),oe=T?{required:l,disabled:p,"aria-invalid":!!m,"aria-describedby":he?.describedBy,id:he?.inputId||K}:{},Ie=x||D&&A||N;return(0,Hd.jsx)(tU,{value:{size:u||"sm"},children:(0,Hd.jsxs)(F,{...Q("wrapper"),...G,...f,mod:[{error:!!m&&k,pointer:B,disabled:p,multiline:H,"data-with-right-section":!!Ie,"data-with-left-section":!!h},$],variant:P,size:u,children:[h&&(0,Hd.jsx)("div",{...b,"data-position":"left",...Q("section",{className:b?.className,style:b?.style}),children:h}),(0,Hd.jsx)(F,{component:"input",...re,...oe,ref:t,required:l,mod:{disabled:p,error:!!m&&k},variant:P,__size:C,...Q("input")}),Ie&&(0,Hd.jsx)("div",{..._,"data-position":"right",...Q("section",{className:_?.className,style:_?.style}),children:Ie})]})})});ct.classes=Kr;ct.Wrapper=BI;ct.Label=bm;ct.Error=xm;ct.Description=vm;ct.Placeholder=LI;ct.ClearButton=eD;ct.displayName="@mantine/core/Input";var JNe=y(R(),1),eFe=y(O(),1);function fU(e,t,r){let n=z(e,t,r),{label:o,description:i,error:a,required:s,classNames:l,styles:c,className:d,unstyled:u,__staticSelector:f,__stylesApiProps:m,errorProps:p,labelProps:h,descriptionProps:b,wrapperProps:v,id:x,size:_,style:I,inputContainer:S,inputWrapperOrder:w,withAsterisk:P,variant:E,vars:B,mod:H,...Z}=n,{styleProps:K,rest:T}=Hr(Z),k={label:o,description:i,error:a,required:s,classNames:l,className:d,__staticSelector:f,__stylesApiProps:m||n,errorProps:p,labelProps:h,descriptionProps:b,unstyled:u,styles:c,size:_,style:I,inputContainer:S,inputWrapperOrder:w,withAsterisk:P,variant:E,id:x,mod:H,...v};return{...T,classNames:l,styles:c,unstyled:u,wrapperProps:{...k,...K},inputProps:{required:s,classNames:l,styles:c,unstyled:u,size:_,__staticSelector:f,__stylesApiProps:m||n,error:a,variant:E,id:x}}}var tD=y(O(),1),iFe=y(R(),1);var dse={__staticSelector:"InputBase",withAria:!0},Yt=ot((e,t)=>{let{inputProps:r,wrapperProps:n,...o}=fU("InputBase",dse,e);return(0,tD.jsx)(ct.Wrapper,{...n,children:(0,tD.jsx)(ct,{...r,...o,ref:t})})});Yt.classes={...ct.classes,...ct.Wrapper.classes};Yt.displayName="@mantine/core/InputBase";var pU=y(O(),1),hU=y(R(),1);var Aa=y(R(),1);var fFe=y(O(),1);function use(e,t){if(!t||!e)return!1;let r=t.parentNode;for(;r!=null;){if(r===e)return!0;r=r.parentNode}return!1}function mU({target:e,parent:t,ref:r,displayAfterTransitionEnd:n}){let o=(0,Aa.useRef)(-1),[i,a]=(0,Aa.useState)(!1),[s,l]=(0,Aa.useState)(typeof n=="boolean"?n:!1),c=()=>{if(!e||!t||!r.current)return;let m=e.getBoundingClientRect(),p=t.getBoundingClientRect(),h=window.getComputedStyle(e),b=window.getComputedStyle(t),v=Xi(h.borderTopWidth)+Xi(b.borderTopWidth),x=Xi(h.borderLeftWidth)+Xi(b.borderLeftWidth),_={top:m.top-p.top-v,left:m.left-p.left-x,width:m.width,height:m.height};r.current.style.transform=`translateY(${_.top}px) translateX(${_.left}px)`,r.current.style.width=`${_.width}px`,r.current.style.height=`${_.height}px`},d=()=>{window.clearTimeout(o.current),r.current&&(r.current.style.transitionDuration="0ms"),c(),o.current=window.setTimeout(()=>{r.current&&(r.current.style.transitionDuration="")},30)},u=(0,Aa.useRef)(null),f=(0,Aa.useRef)(null);return(0,Aa.useEffect)(()=>{if(c(),e)return u.current=new ResizeObserver(d),u.current.observe(e),t&&(f.current=new ResizeObserver(d),f.current.observe(t)),()=>{u.current?.disconnect(),f.current?.disconnect()}},[t,e]),(0,Aa.useEffect)(()=>{if(t){let m=p=>{use(p.target,t)&&(d(),l(!1))};return t.addEventListener("transitionend",m),()=>{t.removeEventListener("transitionend",m)}}},[t]),x2(()=>{by()!=="test"&&a(!0)},20,{autoInvoke:!0}),y2(m=>{m.forEach(p=>{p.type==="attributes"&&p.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:s}}var rD={root:"m_96b553a6"};var fse={},mse=(e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t=="number"?`${t}ms`:t}}),jI=M((e,t)=>{let r=z("FloatingIndicator",fse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,target:c,parent:d,transitionDuration:u,mod:f,displayAfterTransitionEnd:m,...p}=r,h=q({name:"FloatingIndicator",classes:rD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:mse}),b=(0,hU.useRef)(null),{initialized:v,hidden:x}=mU({target:c,parent:d,ref:b,displayAfterTransitionEnd:m}),_=He(t,b);return!c||!d?null:(0,pU.jsx)(F,{ref:_,mod:[{initialized:v,hidden:x},f],...h("root"),...p})});jI.displayName="@mantine/core/FloatingIndicator";jI.classes=rD;var oD=y(O(),1);var DFe=y(R(),1);function nD({style:e,size:t=16,...r}){return(0,oD.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:W(t),height:W(t),display:"block"},...r,children:(0,oD.jsx)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}nD.displayName="@mantine/core/AccordionChevron";var Oa=y(O(),1);var AFe=y(R(),1);var iD={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};var pse={},hse=(e,{radius:t,color:r,variant:n,autoContrast:o})=>{let i=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:n||"light",autoContrast:o});return{root:{"--alert-radius":t===void 0?void 0:Ee(t),"--alert-bg":r||n?i.background:void 0,"--alert-color":i.color,"--alert-bd":r||n?i.border:void 0}}},za=M((e,t)=>{let r=z("Alert",pse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,radius:c,color:d,title:u,children:f,id:m,icon:p,withCloseButton:h,onClose:b,closeButtonLabel:v,variant:x,autoContrast:_,...I}=r,S=q({name:"Alert",classes:iD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:hse}),w=pt(m),P=u&&`${w}-title`||void 0,E=`${w}-body`;return(0,Oa.jsx)(F,{id:w,...S("root",{variant:x}),variant:x,ref:t,...I,role:"alert","aria-describedby":E,"aria-labelledby":P,children:(0,Oa.jsxs)("div",{...S("wrapper"),children:[p&&(0,Oa.jsx)("div",{...S("icon"),children:p}),(0,Oa.jsxs)("div",{...S("body"),children:[u&&(0,Oa.jsx)("div",{...S("title"),"data-with-close-button":h||void 0,children:(0,Oa.jsx)("span",{id:P,...S("label"),children:u})}),f&&(0,Oa.jsx)("div",{id:E,...S("message"),"data-variant":x,children:f})]}),h&&(0,Oa.jsx)(ui,{...S("closeButton"),onClick:b,variant:"transparent",size:16,iconSize:16,"aria-label":v,unstyled:s})]})})});za.classes=iD;za.displayName="@mantine/core/Alert";var vU=y(O(),1);var oLe=y(R(),1);var gU=y(O(),1),HFe=y(R(),1);var aD={root:"m_b6d8b162"};function gse(e){if(e==="start")return"start";if(e==="end"||e)return"end"}var vse={inherit:!1},xse=(e,{variant:t,lineClamp:r,gradient:n,size:o,color:i})=>({root:{"--text-fz":wt(o),"--text-lh":TF(o),"--text-gradient":t==="gradient"?Mh(n,e):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":i?Be(i,e):void 0}}),ye=ot((e,t)=>{let r=z("Text",vse,e),{lineClamp:n,truncate:o,inline:i,inherit:a,gradient:s,span:l,__staticSelector:c,vars:d,className:u,style:f,classNames:m,styles:p,unstyled:h,variant:b,mod:v,size:x,..._}=r,I=q({name:["Text",c],props:r,classes:aD,className:u,style:f,classNames:m,styles:p,unstyled:h,vars:d,varsResolver:xse});return(0,gU.jsx)(F,{...I("root",{focusable:!0}),ref:t,component:l?"span":"p",variant:b,mod:[{"data-truncate":gse(o),"data-line-clamp":typeof n=="number","data-inline":i,"data-inherit":a},v],size:x,..._})});ye.classes=aD;ye.displayName="@mantine/core/Text";var sD={root:"m_849cf0da"};var bse={underline:"hover"},Jg=ot((e,t)=>{let{underline:r,className:n,unstyled:o,mod:i,...a}=z("Anchor",bse,e);return(0,vU.jsx)(ye,{component:"a",ref:t,className:Ze({[sD.root]:!o},n),...a,mod:[{underline:r},i],__staticSelector:"Anchor",unstyled:o})});Jg.classes=sD;Jg.displayName="@mantine/core/Anchor";var ev=y(O(),1),ABe=y(R(),1);var cLe=y(R(),1);var uLe=y(O(),1);var[xU,mi]=Vt("AppShell was not found in tree");var bU=y(O(),1),hLe=y(R(),1);var Zo={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};var yse={},UI=M((e,t)=>{let r=z("AppShellAside",yse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=mi();return m.disabled?null:(0,bU.jsx)(F,{component:"aside",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("aside",{className:o,classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-aside-z-index":`calc(${d??m.zIndex} + 1)`}})});UI.classes=Zo;UI.displayName="@mantine/core/AppShellAside";var yU=y(O(),1);var kLe=y(R(),1);var _se={},VI=M((e,t)=>{let r=z("AppShellFooter",_se,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=mi();return m.disabled?null:(0,yU.jsx)(F,{component:"footer",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("footer",{className:Ze({[Ni.classNames.zeroRight]:m.offsetScrollbars},o),classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-footer-z-index":(d??m.zIndex)?.toString()}})});VI.classes=Zo;VI.displayName="@mantine/core/AppShellFooter";var _U=y(O(),1);var OLe=y(R(),1);var Ise={},HI=M((e,t)=>{let r=z("AppShellHeader",Ise,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=mi();return m.disabled?null:(0,_U.jsx)(F,{component:"header",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("header",{className:Ze({[Ni.classNames.zeroRight]:m.offsetScrollbars},o),classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-header-z-index":(d??m.zIndex)?.toString()}})});HI.classes=Zo;HI.displayName="@mantine/core/AppShellHeader";var IU=y(O(),1),jLe=y(R(),1);var wse={},WI=M((e,t)=>{let r=z("AppShellMain",wse,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=mi();return(0,IU.jsx)(F,{component:"main",ref:t,...c.getStyles("main",{className:o,style:i,classNames:n,styles:a}),...l})});WI.classes=Zo;WI.displayName="@mantine/core/AppShellMain";var RU=y(O(),1),lBe=y(R(),1);var YMe=y(R(),1),JMe=y(O(),1);var eMe=y(R(),1),tMe=y(O(),1);function Na(e){return typeof e=="object"?e.base:e}function Fa(e){let t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function La(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function wU({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,aside:n,theme:o}){let i=n?.width,a="translateX(var(--app-shell-aside-width))",s="translateX(calc(var(--app-shell-aside-width) * -1))";if(n?.breakpoint&&!n?.collapsed?.mobile&&(r[n?.breakpoint]=r[n?.breakpoint]||{},r[n?.breakpoint]["--app-shell-aside-width"]="100%",r[n?.breakpoint]["--app-shell-aside-offset"]="0px"),Fa(i)){let l=W(Na(i));e["--app-shell-aside-width"]=l,e["--app-shell-aside-offset"]=l}if(La(i)&&(typeof i.base<"u"&&(e["--app-shell-aside-width"]=W(i.base),e["--app-shell-aside-offset"]=W(i.base)),ut(i).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-aside-width"]=W(i[l]),t[l]["--app-shell-aside-offset"]=W(i[l]))})),n?.collapsed?.desktop){let l=n.breakpoint;t[l]=t[l]||{},t[l]["--app-shell-aside-transform"]=a,t[l]["--app-shell-aside-transform-rtl"]=s,t[l]["--app-shell-aside-offset"]="0px !important"}if(n?.collapsed?.mobile){let l=pf(n.breakpoint,o.breakpoints)-.1;r[l]=r[l]||{},r[l]["--app-shell-aside-width"]="100%",r[l]["--app-shell-aside-offset"]="0px",r[l]["--app-shell-aside-transform"]=a,r[l]["--app-shell-aside-transform-rtl"]=s}}var dMe=y(R(),1),uMe=y(O(),1);function SU({baseStyles:e,minMediaStyles:t,footer:r}){let n=r?.height,o="translateY(var(--app-shell-footer-height))",i=r?.offset??!0;if(Fa(n)){let a=W(Na(n));e["--app-shell-footer-height"]=a,i&&(e["--app-shell-footer-offset"]=a)}La(n)&&(typeof n.base<"u"&&(e["--app-shell-footer-height"]=W(n.base),i&&(e["--app-shell-footer-offset"]=W(n.base))),ut(n).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-footer-height"]=W(n[a]),i&&(t[a]["--app-shell-footer-offset"]=W(n[a])))})),r?.collapsed&&(e["--app-shell-footer-transform"]=o,e["--app-shell-footer-offset"]="0px !important")}var bMe=y(R(),1),yMe=y(O(),1);function kU({baseStyles:e,minMediaStyles:t,header:r}){let n=r?.height,o="translateY(calc(var(--app-shell-header-height) * -1))",i=r?.offset??!0;if(Fa(n)){let a=W(Na(n));e["--app-shell-header-height"]=a,i&&(e["--app-shell-header-offset"]=a)}La(n)&&(typeof n.base<"u"&&(e["--app-shell-header-height"]=W(n.base),i&&(e["--app-shell-header-offset"]=W(n.base))),ut(n).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-header-height"]=W(n[a]),i&&(t[a]["--app-shell-header-offset"]=W(n[a])))})),r?.collapsed&&(e["--app-shell-header-transform"]=o,e["--app-shell-header-offset"]="0px !important")}var DMe=y(R(),1),RMe=y(O(),1);function CU({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,navbar:n,theme:o}){let i=n?.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",s="translateX(var(--app-shell-navbar-width))";if(n?.breakpoint&&!n?.collapsed?.mobile&&(r[n?.breakpoint]=r[n?.breakpoint]||{},r[n?.breakpoint]["--app-shell-navbar-width"]="100%",r[n?.breakpoint]["--app-shell-navbar-offset"]="0px"),Fa(i)){let l=W(Na(i));e["--app-shell-navbar-width"]=l,e["--app-shell-navbar-offset"]=l}if(La(i)&&(typeof i.base<"u"&&(e["--app-shell-navbar-width"]=W(i.base),e["--app-shell-navbar-offset"]=W(i.base)),ut(i).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-navbar-width"]=W(i[l]),t[l]["--app-shell-navbar-offset"]=W(i[l]))})),n?.collapsed?.desktop){let l=n.breakpoint;t[l]=t[l]||{},t[l]["--app-shell-navbar-transform"]=a,t[l]["--app-shell-navbar-transform-rtl"]=s,t[l]["--app-shell-navbar-offset"]="0px !important"}if(n?.collapsed?.mobile){let l=pf(n.breakpoint,o.breakpoints)-.1;r[l]=r[l]||{},r[l]["--app-shell-navbar-width"]="100%",r[l]["--app-shell-navbar-offset"]="0px",r[l]["--app-shell-navbar-transform"]=a,r[l]["--app-shell-navbar-transform-rtl"]=s}}var UMe=y(R(),1),VMe=y(O(),1);var NMe=y(R(),1),FMe=y(O(),1);function ZI(e){return Number(e)===0?"0px":Tt(e)}function PU({padding:e,baseStyles:t,minMediaStyles:r}){Fa(e)&&(t["--app-shell-padding"]=ZI(Na(e))),La(e)&&(e.base&&(t["--app-shell-padding"]=ZI(e.base)),ut(e).forEach(n=>{n!=="base"&&(r[n]=r[n]||{},r[n]["--app-shell-padding"]=ZI(e[n]))}))}function DU({navbar:e,header:t,footer:r,aside:n,padding:o,theme:i}){let a={},s={},l={};CU({baseStyles:l,minMediaStyles:a,maxMediaStyles:s,navbar:e,theme:i}),wU({baseStyles:l,minMediaStyles:a,maxMediaStyles:s,aside:n,theme:i}),kU({baseStyles:l,minMediaStyles:a,header:t}),SU({baseStyles:l,minMediaStyles:a,footer:r}),PU({baseStyles:l,minMediaStyles:a,padding:o});let c=Th(ut(a),i.breakpoints).map(f=>({query:`(min-width: ${nd(f.px)})`,styles:a[f.value]})),d=Th(ut(s),i.breakpoints).map(f=>({query:`(max-width: ${nd(f.px)})`,styles:s[f.value]})),u=[...c,...d];return{baseStyles:l,media:u}}function EU({navbar:e,header:t,aside:r,footer:n,padding:o}){let i=lt(),a=ha(),{media:s,baseStyles:l}=DU({navbar:e,header:t,footer:n,aside:r,padding:o,theme:i});return(0,RU.jsx)(hd,{media:s,styles:l,selector:a.cssVariablesSelector})}var TU=y(O(),1),hBe=y(R(),1);var Sse={},GI=M((e,t)=>{let r=z("AppShellNavbar",Sse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=mi();return m.disabled?null:(0,TU.jsx)(F,{component:"nav",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("navbar",{className:o,classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-navbar-z-index":`calc(${d??m.zIndex} + 1)`}})});GI.classes=Zo;GI.displayName="@mantine/core/AppShellNavbar";var $U=y(O(),1),wBe=y(R(),1);var kse={},qI=ot((e,t)=>{let r=z("AppShellSection",kse,e),{classNames:n,className:o,style:i,styles:a,vars:s,grow:l,mod:c,...d}=r,u=mi();return(0,$U.jsx)(F,{ref:t,mod:[{grow:l},c],...u.getStyles("section",{className:o,style:i,classNames:n,styles:a}),...d})});qI.classes=Zo;qI.displayName="@mantine/core/AppShellSection";var nc=y(R(),1);function AU({transitionDuration:e,disabled:t}){let[r,n]=(0,nc.useState)(!0),o=(0,nc.useRef)(-1),i=(0,nc.useRef)(-1);return kl("resize",()=>{n(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>(0,nc.startTransition)(()=>{n(!1)}),200)}),Mo(()=>{n(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,nc.startTransition)(()=>{n(!1)}),e||0)},[t,e]),r}var Cse={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Pt("app")},Pse=(e,{transitionDuration:t,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":r}}),Or=M((e,t)=>{let r=z("AppShell",Cse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,navbar:c,withBorder:d,padding:u,transitionDuration:f,transitionTimingFunction:m,header:p,zIndex:h,layout:b,disabled:v,aside:x,footer:_,offsetScrollbars:I=b!=="alt",mod:S,...w}=r,P=q({name:"AppShell",classes:Zo,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Pse}),E=AU({disabled:v,transitionDuration:f});return(0,ev.jsxs)(xU,{value:{getStyles:P,withBorder:d,zIndex:h,disabled:v,offsetScrollbars:I},children:[(0,ev.jsx)(EU,{navbar:c,header:p,aside:x,footer:_,padding:u}),(0,ev.jsx)(F,{ref:t,...P("root"),mod:[{resizing:E,layout:b,disabled:v},S],...w})]})});Or.classes=Zo;Or.displayName="@mantine/core/AppShell";Or.Navbar=GI;Or.Header=HI;Or.Main=WI;Or.Aside=UI;Or.Footer=VI;Or.Section=qI;function OU(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(t=>OU(t))}:e}function _m(e){return e?e.map(t=>OU(t)):[]}function Wd(e){return e.reduce((t,r)=>"group"in r?{...t,...Wd(r.items)}:(t[r.value]=r,t),{})}var lD=y(O(),1),e7e=y(R(),1);var Zt={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};var Dse={error:null},Rse=(e,{size:t,color:r})=>({chevron:{"--combobox-chevron-size":ge(t,"combobox-chevron-size"),"--combobox-chevron-color":r?Be(r,e):void 0}}),KI=M((e,t)=>{let r=z("ComboboxChevron",Dse,e),{size:n,error:o,style:i,className:a,classNames:s,styles:l,unstyled:c,vars:d,mod:u,...f}=r,m=q({name:"ComboboxChevron",classes:Zt,props:r,style:i,className:a,classNames:s,styles:l,unstyled:c,vars:d,varsResolver:Rse,rootSelector:"chevron"});return(0,lD.jsx)(F,{component:"svg",...f,...m("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},u],ref:t,children:(0,lD.jsx)("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});KI.classes=Zt;KI.displayName="@mantine/core/ComboboxChevron";var pD=y(O(),1);var d9e=y(R(),1);var d7e=y(R(),1);var f7e=y(O(),1);var[zU,Jt]=Vt("Combobox component was not found in tree");var NU=y(O(),1),FU=y(R(),1);var cD=(0,FU.forwardRef)(({size:e,onMouseDown:t,onClick:r,onClear:n,...o},i)=>(0,NU.jsx)(ct.ClearButton,{ref:i,tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:a=>{a.preventDefault(),t?.(a)},onClick:a=>{n(),r?.(a)}}));cD.displayName="@mantine/core/ComboboxClearButton";var LU=y(O(),1),x7e=y(R(),1);var Ese={},XI=M((e,t)=>{let{classNames:r,styles:n,className:o,style:i,hidden:a,...s}=z("ComboboxDropdown",Ese,e),l=Jt();return(0,LU.jsx)(Gr.Dropdown,{...s,ref:t,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:o,style:i,classNames:r,styles:n})})});XI.classes=Zt;XI.displayName="@mantine/core/ComboboxDropdown";var MU=y(O(),1);var P7e=y(R(),1);var Tse={refProp:"ref"},dD=M((e,t)=>{let{children:r,refProp:n}=z("ComboboxDropdownTarget",Tse,e);if(Jt(),!yo(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return(0,MU.jsx)(Gr.Target,{ref:t,refProp:n,children:r})});dD.displayName="@mantine/core/ComboboxDropdownTarget";var BU=y(O(),1),O7e=y(R(),1);var $se={},QI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxEmpty",$se,e),l=Jt();return(0,BU.jsx)(F,{ref:t,...l.getStyles("empty",{className:n,classNames:r,styles:i,style:o}),...s})});QI.classes=Zt;QI.displayName="@mantine/core/ComboboxEmpty";var UU=y(R(),1);var Z7e=y(O(),1);var jU=y(R(),1);function Im({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:r,withExpandedAttribute:n,targetType:o,autoComplete:i}){let a=Jt(),[s,l]=(0,jU.useState)(null),c=u=>{if(e?.(u),!a.readOnly&&t){if(u.nativeEvent.isComposing)return;if(u.nativeEvent.code==="ArrowDown"&&(u.preventDefault(),a.store.dropdownOpened?l(a.store.selectNextOption()):(a.store.openDropdown("keyboard"),l(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="ArrowUp"&&(u.preventDefault(),a.store.dropdownOpened?l(a.store.selectPreviousOption()):(a.store.openDropdown("keyboard"),l(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="Enter"||u.nativeEvent.code==="NumpadEnter"){if(u.nativeEvent.keyCode===229)return;let f=a.store.getSelectedOptionIndex();a.store.dropdownOpened&&f!==-1?(u.preventDefault(),a.store.clickSelectedOption()):o==="button"&&(u.preventDefault(),a.store.openDropdown("keyboard"))}u.key==="Escape"&&a.store.closeDropdown("keyboard"),u.nativeEvent.code==="Space"&&o==="button"&&(u.preventDefault(),a.store.toggleDropdown("keyboard"))}};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(a.store.listId&&a.store.dropdownOpened)||void 0,"aria-controls":a.store.dropdownOpened?a.store.listId:void 0,"aria-activedescendant":a.store.dropdownOpened&&s||void 0,autoComplete:i,"data-expanded":a.store.dropdownOpened||void 0,"data-mantine-stop-propagation":a.store.dropdownOpened||void 0}:{},onKeyDown:c}}var Ase={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},uD=M((e,t)=>{let{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:a,targetType:s,autoComplete:l,...c}=z("ComboboxEventsTarget",Ase,e);if(!yo(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let d=Jt(),u=Im({targetType:s,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:l});return(0,UU.cloneElement)(r,{...u,...c,[n]:He(t,d.store.targetRef,Cl(r))})});uD.displayName="@mantine/core/ComboboxEventsTarget";var VU=y(O(),1),e8e=y(R(),1);var Ose={},YI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxFooter",Ose,e),l=Jt();return(0,VU.jsx)(F,{ref:t,...l.getStyles("footer",{className:n,classNames:r,style:o,styles:i}),...s,onMouseDown:c=>{c.preventDefault()}})});YI.classes=Zt;YI.displayName="@mantine/core/ComboboxFooter";var JI=y(O(),1),l8e=y(R(),1);var zse={},e0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,children:s,label:l,...c}=z("ComboboxGroup",zse,e),d=Jt();return(0,JI.jsxs)(F,{ref:t,...d.getStyles("group",{className:n,classNames:r,style:o,styles:i}),...c,children:[l&&(0,JI.jsx)("div",{...d.getStyles("groupLabel",{classNames:r,styles:i}),children:l}),s]})});e0.classes=Zt;e0.displayName="@mantine/core/ComboboxGroup";var HU=y(O(),1),g8e=y(R(),1);var Nse={},t0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxHeader",Nse,e),l=Jt();return(0,HU.jsx)(F,{ref:t,...l.getStyles("header",{className:n,classNames:r,style:o,styles:i}),...s,onMouseDown:c=>{c.preventDefault()}})});t0.classes=Zt;t0.displayName="@mantine/core/ComboboxHeader";var WU=y(O(),1);function fD({value:e,valuesDivider:t=",",...r}){return(0,WU.jsx)("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...r})}fD.displayName="@mantine/core/ComboboxHiddenInput";var ZU=y(O(),1),GU=y(R(),1);var Fse={},r0=M((e,t)=>{let r=z("ComboboxOption",Fse,e),{classNames:n,className:o,style:i,styles:a,vars:s,onClick:l,id:c,active:d,onMouseDown:u,onMouseOver:f,disabled:m,selected:p,mod:h,...b}=r,v=Jt(),x=(0,GU.useId)(),_=c||x;return(0,ZU.jsx)(F,{...v.getStyles("option",{className:o,classNames:n,styles:a,style:i}),...b,ref:t,id:_,mod:["combobox-option",{"combobox-active":d,"combobox-disabled":m,"combobox-selected":p},h],role:"option",onClick:I=>{m?I.preventDefault():(v.onOptionSubmit?.(r.value,r),l?.(I))},onMouseDown:I=>{I.preventDefault(),u?.(I)},onMouseOver:I=>{v.resetSelectionOnOptionHover&&v.store.resetSelectedOption(),f?.(I)}})});r0.classes=Zt;r0.displayName="@mantine/core/ComboboxOption";var qU=y(O(),1),KU=y(R(),1);var Lse={},o0=M((e,t)=>{let r=z("ComboboxOptions",Lse,e),{classNames:n,className:o,style:i,styles:a,id:s,onMouseDown:l,labelledBy:c,...d}=r,u=Jt(),f=pt(s);return(0,KU.useEffect)(()=>{u.store.setListId(f)},[f]),(0,qU.jsx)(F,{ref:t,...u.getStyles("options",{className:o,style:i,classNames:n,styles:a}),...d,id:f,role:"listbox","aria-labelledby":c,onMouseDown:m=>{m.preventDefault(),l?.(m)}})});o0.classes=Zt;o0.displayName="@mantine/core/ComboboxOptions";var XU=y(O(),1);var j8e=y(R(),1);var Mse={withAriaAttributes:!0,withKeyboardNavigation:!0},n0=M((e,t)=>{let r=z("ComboboxSearch",Mse,e),{classNames:n,styles:o,unstyled:i,vars:a,withAriaAttributes:s,onKeyDown:l,withKeyboardNavigation:c,size:d,...u}=r,f=Jt(),m=f.getStyles("search"),p=Im({targetType:"input",withAriaAttributes:s,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return(0,XU.jsx)(ct,{ref:He(t,f.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},o],size:d||f.size,...p,...u,__staticSelector:"Combobox"})});n0.classes=Zt;n0.displayName="@mantine/core/ComboboxSearch";var QU=y(O(),1),YU=y(R(),1);var Bse={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},mD=M((e,t)=>{let{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:a,targetType:s,autoComplete:l,...c}=z("ComboboxTarget",Bse,e);if(!yo(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let d=Jt(),u=Im({targetType:s,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:l}),f=(0,YU.cloneElement)(r,{...u,...c});return(0,QU.jsx)(Gr.Target,{ref:He(t,d.store.targetRef),children:f})});mD.displayName="@mantine/core/ComboboxTarget";var $t=y(R(),1);function JU(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function eV(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function tV(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute("data-combobox-disabled"))return t;return-1}function ic({defaultOpened:e,opened:t,onOpenedChange:r,onDropdownClose:n,onDropdownOpen:o,loop:i=!0,scrollBehavior:a="instant"}={}){let[s,l]=rt({value:t,defaultValue:e,finalValue:!1,onChange:r}),c=(0,$t.useRef)(null),d=(0,$t.useRef)(-1),u=(0,$t.useRef)(null),f=(0,$t.useRef)(null),m=(0,$t.useRef)(-1),p=(0,$t.useRef)(-1),h=(0,$t.useRef)(-1),b=(0,$t.useCallback)((C="unknown")=>{s||(l(!0),o?.(C))},[l,o,s]),v=(0,$t.useCallback)((C="unknown")=>{s&&(l(!1),n?.(C))},[l,n,s]),x=(0,$t.useCallback)((C="unknown")=>{s?v(C):b(C)},[v,b,s]),_=(0,$t.useCallback)(()=>{let C=document.querySelector(`#${c.current} [data-combobox-selected]`);C?.removeAttribute("data-combobox-selected"),C?.removeAttribute("aria-selected")},[]),I=(0,$t.useCallback)(C=>{let D=document.getElementById(c.current)?.querySelectorAll("[data-combobox-option]");if(!D)return null;let N=C>=D.length?0:C<0?D.length-1:C;return d.current=N,D?.[N]&&!D[N].hasAttribute("data-combobox-disabled")?(_(),D[N].setAttribute("data-combobox-selected","true"),D[N].setAttribute("aria-selected","true"),D[N].scrollIntoView({block:"nearest",behavior:a}),D[N].id):null},[a,_]),S=(0,$t.useCallback)(()=>{let C=document.querySelector(`#${c.current} [data-combobox-active]`);if(C){let A=document.querySelectorAll(`#${c.current} [data-combobox-option]`),D=Array.from(A).findIndex(N=>N===C);return I(D)}return I(0)},[I]),w=(0,$t.useCallback)(()=>I(eV(d.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),i)),[I,i]),P=(0,$t.useCallback)(()=>I(JU(d.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),i)),[I,i]),E=(0,$t.useCallback)(()=>I(tV(document.querySelectorAll(`#${c.current} [data-combobox-option]`))),[I]),B=(0,$t.useCallback)((C="selected",A)=>{h.current=window.setTimeout(()=>{let D=document.querySelectorAll(`#${c.current} [data-combobox-option]`),N=Array.from(D).findIndex(U=>U.hasAttribute(`data-combobox-${C}`));d.current=N,A?.scrollIntoView&&D[N]?.scrollIntoView({block:"nearest",behavior:a})},0)},[]),H=(0,$t.useCallback)(()=>{d.current=-1,_()},[_]),Z=(0,$t.useCallback)(()=>{document.querySelectorAll(`#${c.current} [data-combobox-option]`)?.[d.current]?.click()},[]),K=(0,$t.useCallback)(C=>{c.current=C},[]),T=(0,$t.useCallback)(()=>{m.current=window.setTimeout(()=>u.current.focus(),0)},[]),k=(0,$t.useCallback)(()=>{p.current=window.setTimeout(()=>f.current.focus(),0)},[]),$=(0,$t.useCallback)(()=>d.current,[]);return(0,$t.useEffect)(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(p.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:b,closeDropdown:v,toggleDropdown:x,selectedOptionIndex:d.current,getSelectedOptionIndex:$,selectOption:I,selectFirstOption:E,selectActiveOption:S,selectNextOption:w,selectPreviousOption:P,resetSelectedOption:H,updateSelectedOptionIndex:B,listId:c.current,setListId:K,clickSelectedOption:Z,searchRef:u,focusSearchInput:T,targetRef:f,focusTarget:k}}var jse={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},Use=(e,{size:t,dropdownPadding:r})=>({options:{"--combobox-option-fz":wt(t),"--combobox-option-padding":ge(t,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:W(r),"--combobox-option-fz":wt(t),"--combobox-option-padding":ge(t,"combobox-option-padding")}});function je(e){let t=z("Combobox",jse,e),{classNames:r,styles:n,unstyled:o,children:i,store:a,vars:s,onOptionSubmit:l,onClose:c,size:d,dropdownPadding:u,resetSelectionOnOptionHover:f,__staticSelector:m,readOnly:p,...h}=t,b=ic(),v=a||b,x=q({name:m||"Combobox",classes:Zt,props:t,classNames:r,styles:n,unstyled:o,vars:s,varsResolver:Use}),_=()=>{c?.(),v.closeDropdown()};return(0,pD.jsx)(zU,{value:{getStyles:x,store:v,onOptionSubmit:l,size:d,resetSelectionOnOptionHover:f,readOnly:p},children:(0,pD.jsx)(Gr,{opened:v.dropdownOpened,...h,onChange:I=>!I&&_(),withRoles:!1,unstyled:o,children:i})})}var Vse=e=>e;je.extend=Vse;je.classes=Zt;je.displayName="@mantine/core/Combobox";je.Target=mD;je.Dropdown=XI;je.Options=o0;je.Option=r0;je.Search=n0;je.Empty=QI;je.Chevron=KI;je.Footer=YI;je.Header=t0;je.EventsTarget=uD;je.DropdownTarget=dD;je.Group=e0;je.ClearButton=cD;je.HiddenInput=fD;var Go=y(O(),1);var km=y(O(),1),m0=y(R(),1);var ac=y(O(),1),rV=y(R(),1);var hD={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};var i0=hD,Zd=(0,rV.forwardRef)(({__staticSelector:e,__stylesApiProps:t,className:r,classNames:n,styles:o,unstyled:i,children:a,label:s,description:l,id:c,disabled:d,error:u,size:f,labelPosition:m="left",bodyElement:p="div",labelElement:h="label",variant:b,style:v,vars:x,mod:_,...I},S)=>{let w=q({name:e,props:t,className:r,style:v,classes:hD,classNames:n,styles:o,unstyled:i});return(0,ac.jsx)(F,{...w("root"),ref:S,__vars:{"--label-fz":wt(f),"--label-lh":ge(f,"label-lh")},mod:[{"label-position":m},_],variant:b,size:f,...I,children:(0,ac.jsxs)(F,{component:p,htmlFor:p==="label"?c:void 0,...w("body"),children:[a,(0,ac.jsxs)("div",{...w("labelWrapper"),"data-disabled":d||void 0,children:[s&&(0,ac.jsx)(F,{component:h,htmlFor:h==="label"?c:void 0,...w("label"),"data-disabled":d||void 0,children:s}),l&&(0,ac.jsx)(ct.Description,{size:f,__inheritStyles:!1,...w("description"),children:l}),u&&typeof u!="boolean"&&(0,ac.jsx)(ct.Error,{size:f,__inheritStyles:!1,...w("error"),children:u})]})]})})});Zd.displayName="@mantine/core/InlineInput";var vD=y(O(),1);var X9e=y(R(),1);var a0=y(R(),1),oV=(0,a0.createContext)(null),nV=oV.Provider,s0=()=>(0,a0.useContext)(oV);var V9e=y(R(),1),H9e=y(O(),1);var[iV,aV]=_o();var gD={card:"m_26775b0a"};var Hse={withBorder:!0},Wse=(e,{radius:t})=>({card:{"--card-radius":Ee(t)}}),l0=M((e,t)=>{let r=z("CheckboxCard",Hse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,checked:c,mod:d,withBorder:u,value:f,onClick:m,defaultChecked:p,onChange:h,...b}=r,v=q({name:"CheckboxCard",classes:gD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Wse,rootSelector:"card"}),x=s0(),_=typeof c=="boolean"?c:x?x.value.includes(f||""):void 0,[I,S]=rt({value:_,defaultValue:p,finalValue:!1,onChange:h});return(0,vD.jsx)(iV,{value:{checked:I},children:(0,vD.jsx)(xt,{ref:t,mod:[{"with-border":u,checked:I},d],...v("card"),...b,role:"checkbox","aria-checked":I,onClick:w=>{m?.(w),x?.onChange(f||""),S(!I)}})})});l0.displayName="@mantine/core/CheckboxCard";l0.classes=gD;var c0=y(O(),1);var fje=y(R(),1);var tv=y(O(),1);var sje=y(R(),1);function wm({children:e,role:t}){let r=fi();return r?(0,tv.jsx)("div",{role:t,"aria-labelledby":r.labelId,"aria-describedby":r.describedBy,children:e}):(0,tv.jsx)(tv.Fragment,{children:e})}var Zse={},d0=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,readOnly:l,...c}=z("CheckboxGroup",Zse,e),[d,u]=rt({value:r,defaultValue:n,finalValue:[],onChange:o});return(0,c0.jsx)(nV,{value:{value:d,onChange:m=>{let p=typeof m=="string"?m:m.currentTarget.value;!l&&u(d.includes(p)?d.filter(h=>h!==p):[...d,p])},size:i},children:(0,c0.jsx)(ct.Wrapper,{size:i,ref:t,...a,...c,labelElement:"div",__staticSelector:"CheckboxGroup",children:(0,c0.jsx)(wm,{role:"group",children:s})})})});d0.classes=ct.Wrapper.classes;d0.displayName="@mantine/core/CheckboxGroup";var yD=y(O(),1),kje=y(R(),1);var Sm=y(O(),1);var _je=y(R(),1);function xD({size:e,style:t,...r}){let n=e!==void 0?{width:W(e),height:W(e),...t}:t;return(0,Sm.jsx)("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r,children:(0,Sm.jsx)("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function u0({indeterminate:e,...t}){return e?(0,Sm.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...t,children:(0,Sm.jsx)("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):(0,Sm.jsx)(xD,{...t})}var bD={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};var Gse={icon:u0},qse=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=yr({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--checkbox-size":ge(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ee(t),"--checkbox-color":i==="outline"?l:Be(r,e),"--checkbox-icon-color":o?Be(o,e):va(a,e)?Nn({color:r,theme:e,autoContrast:a}):void 0}}},f0=M((e,t)=>{let r=z("CheckboxIndicator",Gse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,icon:c,indeterminate:d,radius:u,color:f,iconColor:m,autoContrast:p,checked:h,mod:b,variant:v,disabled:x,..._}=r,I=c,S=q({name:"CheckboxIndicator",classes:bD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:qse,rootSelector:"indicator"}),w=aV(),P=typeof h=="boolean"||typeof d=="boolean"?h||d:w?.checked||!1;return(0,yD.jsx)(F,{ref:t,...S("indicator",{variant:v}),variant:v,mod:[{checked:P,disabled:x},b],..._,children:(0,yD.jsx)(I,{indeterminate:d,...S("icon")})})});f0.displayName="@mantine/core/CheckboxIndicator";f0.classes=bD;var _D={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};var Kse={labelPosition:"right",icon:u0},Xse=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=yr({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--checkbox-size":ge(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ee(t),"--checkbox-color":i==="outline"?l:Be(r,e),"--checkbox-icon-color":o?Be(o,e):va(a,e)?Nn({color:r,theme:e,autoContrast:a}):void 0}}},Fs=M((e,t)=>{let r=z("Checkbox",Kse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,label:d,id:u,size:f,radius:m,wrapperProps:p,checked:h,labelPosition:b,description:v,error:x,disabled:_,variant:I,indeterminate:S,icon:w,rootRef:P,iconColor:E,onChange:B,autoContrast:H,mod:Z,...K}=r,T=s0(),k=f||T?.size,$=w,C=q({name:"Checkbox",props:r,classes:_D,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Xse}),{styleProps:A,rest:D}=Hr(K),N=pt(u),U=T?{checked:T.value.includes(D.value),onChange:he=>{T.onChange(he),B?.(he)}}:{},G=(0,m0.useRef)(null),re=t||G;return(0,m0.useEffect)(()=>{re&&"current"in re&&re.current&&(re.current.indeterminate=S||!1)},[S,re]),(0,km.jsx)(Zd,{...C("root"),__staticSelector:"Checkbox",__stylesApiProps:r,id:N,size:k,labelPosition:b,label:d,description:v,error:x,disabled:_,classNames:n,styles:a,unstyled:s,"data-checked":U.checked||h||void 0,variant:I,ref:P,mod:Z,...A,...p,children:(0,km.jsxs)(F,{...C("inner"),mod:{"data-label-position":b},children:[(0,km.jsx)(F,{component:"input",id:N,ref:re,checked:h,disabled:_,mod:{error:!!x,indeterminate:S},...C("input",{focusable:!0,variant:I}),onChange:B,...D,...U,type:"checkbox"}),(0,km.jsx)($,{indeterminate:S,...C("icon")})]})})});Fs.classes={..._D,...i0};Fs.displayName="@mantine/core/Checkbox";Fs.Group=d0;Fs.Indicator=f0;Fs.Card=l0;function pi(e){return"group"in e}function ID({options:e,search:t,limit:r}){let n=t.trim().toLowerCase(),o=[];for(let i=0;i<e.length;i+=1){let a=e[i];if(o.length===r)return o;pi(a)&&o.push({group:a.group,items:ID({options:a.items,search:t,limit:r-o.length})}),pi(a)||a.label.toLowerCase().includes(n)&&o.push(a)}return o}function sV(e){if(e.length===0)return!0;for(let t of e)if(!("group"in t)||t.items.length>0)return!1;return!0}function wD(e,t=new Set){if(Array.isArray(e))for(let r of e)if(pi(r))wD(r.items,t);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(t.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);t.add(r.value)}}function Qse(e,t){return Array.isArray(e)?e.includes(t):e===t}function lV({data:e,withCheckIcon:t,value:r,checkIconPosition:n,unstyled:o,renderOption:i}){if(!pi(e)){let s=Qse(r,e.value),l=t&&s&&(0,Go.jsx)(xD,{className:Zt.optionsDropdownCheckIcon}),c=(0,Go.jsxs)(Go.Fragment,{children:[n==="left"&&l,(0,Go.jsx)("span",{children:e.label}),n==="right"&&l]});return(0,Go.jsx)(je.Option,{value:e.value,disabled:e.disabled,className:Ze({[Zt.optionsDropdownOption]:!o}),"data-reverse":n==="right"||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof i=="function"?i({option:e,checked:s}):c})}let a=e.items.map(s=>(0,Go.jsx)(lV,{data:s,value:r,unstyled:o,withCheckIcon:t,checkIconPosition:n,renderOption:i},s.value));return(0,Go.jsx)(je.Group,{label:e.group,children:a})}function Cm({data:e,hidden:t,hiddenWhenEmpty:r,filter:n,search:o,limit:i,maxDropdownHeight:a,withScrollArea:s=!0,filterOptions:l=!0,withCheckIcon:c=!1,value:d,checkIconPosition:u,nothingFoundMessage:f,unstyled:m,labelId:p,renderOption:h,scrollAreaProps:b,"aria-label":v}){wD(e);let _=typeof o=="string"?(n||ID)({options:e,search:l?o:"",limit:i??1/0}):e,I=sV(_),S=_.map(w=>(0,Go.jsx)(lV,{data:w,withCheckIcon:c,value:d,checkIconPosition:u,unstyled:m,renderOption:h},pi(w)?w.group:w.value));return(0,Go.jsx)(je.Dropdown,{hidden:t||r&&I,"data-composed":!0,children:(0,Go.jsxs)(je.Options,{labelledBy:p,"aria-label":v,children:[s?(0,Go.jsx)(Ar.Autosize,{mah:a??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...b,children:S}):S,I&&f&&(0,Go.jsx)(je.Empty,{children:f})]})})}var rv=y(O(),1),g0=y(R(),1);var SD=y(O(),1),kUe=y(R(),1);var p0=y(R(),1),cV=(0,p0.createContext)(null),dV=cV.Provider;function uV(){return{withinGroup:!!(0,p0.useContext)(cV)}}var Pm={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};var Yse={},Jse=(e,{spacing:t})=>({group:{"--ag-spacing":Tt(t)}}),h0=M((e,t)=>{let r=z("AvatarGroup",Yse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,spacing:c,...d}=r,u=q({name:"AvatarGroup",classes:Pm,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Jse,rootSelector:"group"});return(0,SD.jsx)(dV,{value:!0,children:(0,SD.jsx)(F,{ref:t,...u("group"),...d})})});h0.classes=Pm;h0.displayName="@mantine/core/AvatarGroup";var kD=y(O(),1);function fV(e){return(0,kD.jsx)("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,kD.jsx)("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function ele(e){let t=0;for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}var tle=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function mV(e,t=tle){let r=ele(e),n=Math.abs(r)%t.length;return t[n]}function pV(e,t=2){let r=e.split(" ");return r.length===1?e.slice(0,t).toUpperCase():r.map(n=>n[0]).slice(0,t).join("").toUpperCase()}var rle={},ole=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a,name:s,allowedInitialsColors:l})=>{let c=i==="initials"&&typeof s=="string"?mV(s,l):i,d=e.variantColorResolver({color:c||"gray",theme:e,gradient:o,variant:n||"light",autoContrast:a});return{root:{"--avatar-size":ge(t,"avatar-size"),"--avatar-radius":r===void 0?void 0:Ee(r),"--avatar-bg":c||n?d.background:void 0,"--avatar-color":c||n?d.color:void 0,"--avatar-bd":c||n?d.border:void 0}}},Gd=ot((e,t)=>{let r=z("Avatar",rle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,src:c,alt:d,radius:u,color:f,gradient:m,imageProps:p,children:h,autoContrast:b,mod:v,name:x,allowedInitialsColors:_,...I}=r,S=uV(),[w,P]=(0,g0.useState)(!c),E=q({name:"Avatar",props:r,classes:Pm,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ole});return(0,g0.useEffect)(()=>P(!c),[c]),(0,rv.jsx)(F,{...E("root"),mod:[{"within-group":S.withinGroup},v],ref:t,...I,children:w?(0,rv.jsx)("span",{...E("placeholder"),title:d,children:h||typeof x=="string"&&pV(x)||(0,rv.jsx)(fV,{})}):(0,rv.jsx)("img",{...p,...E("image"),src:c,alt:d,onError:B=>{P(!0),p?.onError?.(B)}})})});Gd.classes=Pm;Gd.displayName="@mantine/core/Avatar";Gd.Group=h0;var Dm=y(O(),1),YUe=y(R(),1);var CD={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};var nle={},ile=(e,{radius:t,color:r,gradient:n,variant:o,size:i,autoContrast:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:a});return{root:{"--badge-height":ge(i,"badge-height"),"--badge-padding-x":ge(i,"badge-padding-x"),"--badge-fz":ge(i,"badge-fz"),"--badge-radius":t===void 0?void 0:Ee(t),"--badge-bg":r||o?s.background:void 0,"--badge-color":r||o?s.color:void 0,"--badge-bd":r||o?s.border:void 0,"--badge-dot-color":o==="dot"?Be(r,e):void 0}}},In=ot((e,t)=>{let r=z("Badge",nle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,radius:c,color:d,gradient:u,leftSection:f,rightSection:m,children:p,variant:h,fullWidth:b,autoContrast:v,circle:x,mod:_,...I}=r,S=q({name:"Badge",props:r,classes:CD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ile});return(0,Dm.jsxs)(F,{variant:h,mod:[{block:b,circle:x,"with-right-section":!!m,"with-left-section":!!f},_],...S("root",{variant:h}),ref:t,...I,children:[f&&(0,Dm.jsx)("span",{...S("section"),"data-position":"left",children:f}),(0,Dm.jsx)("span",{...S("label"),children:p}),m&&(0,Dm.jsx)("span",{...S("section"),"data-position":"right",children:m})]})});In.classes=CD;In.displayName="@mantine/core/Badge";var v0=y(O(),1);var dVe=y(R(),1);var PD={root:"m_fea6bf1a",burger:"m_d4fb9cad"};var ale={},sle=(e,{color:t,size:r,lineSize:n,transitionDuration:o,transitionTimingFunction:i})=>({root:{"--burger-color":t?Be(t,e):void 0,"--burger-size":ge(r,"burger-size"),"--burger-line-size":n?W(n):void 0,"--burger-transition-duration":o===void 0?void 0:`${o}ms`,"--burger-transition-timing-function":i}}),ov=M((e,t)=>{let r=z("Burger",ale,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,opened:c,children:d,transitionDuration:u,transitionTimingFunction:f,lineSize:m,...p}=r,h=q({name:"Burger",classes:PD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:sle});return(0,v0.jsxs)(xt,{...h("root"),ref:t,...p,children:[(0,v0.jsx)(F,{mod:["reduce-motion",{opened:c}],...h("burger")}),d]})});ov.classes=PD;ov.displayName="@mantine/core/Burger";var Ma=y(O(),1);var jVe=y(R(),1);var gV=y(O(),1);var wVe=y(R(),1);var Ls={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};var hV={orientation:"horizontal"},lle=(e,{borderWidth:t})=>({group:{"--button-border-width":W(t)}}),x0=M((e,t)=>{let r=z("ButtonGroup",hV,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,orientation:l,vars:c,borderWidth:d,variant:u,mod:f,...m}=z("ButtonGroup",hV,e),p=q({name:"ButtonGroup",props:r,classes:Ls,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:c,varsResolver:lle,rootSelector:"group"});return(0,gV.jsx)(F,{...p("group"),ref:t,variant:u,mod:[{"data-orientation":l},f],role:"group",...m})});x0.classes=Ls;x0.displayName="@mantine/core/ButtonGroup";var xV=y(O(),1),TVe=y(R(),1);var vV={},cle=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:i,size:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":ge(a,"section-height"),"--section-padding-x":ge(a,"section-padding-x"),"--section-fz":a?.includes("compact")?wt(a.replace("compact-","")):wt(a),"--section-radius":t===void 0?void 0:Ee(t),"--section-bg":r||o?s.background:void 0,"--section-color":s.color,"--section-bd":r||o?s.border:void 0}}},b0=M((e,t)=>{let r=z("ButtonGroupSection",vV,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,variant:c,gradient:d,radius:u,autoContrast:f,...m}=z("ButtonGroupSection",vV,e),p=q({name:"ButtonGroupSection",props:r,classes:Ls,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,varsResolver:cle,rootSelector:"groupSection"});return(0,xV.jsx)(F,{...p("groupSection"),ref:t,variant:c,...m})});b0.classes=Ls;b0.displayName="@mantine/core/ButtonGroupSection";var dle={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${W(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},ule={},fle=(e,{radius:t,color:r,gradient:n,variant:o,size:i,justify:a,autoContrast:s})=>{let l=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:s});return{root:{"--button-justify":a,"--button-height":ge(i,"button-height"),"--button-padding-x":ge(i,"button-padding-x"),"--button-fz":i?.includes("compact")?wt(i.replace("compact-","")):wt(i),"--button-radius":t===void 0?void 0:Ee(t),"--button-bg":r||o?l.background:void 0,"--button-hover":r||o?l.hover:void 0,"--button-color":l.color,"--button-bd":r||o?l.border:void 0,"--button-hover-color":r||o?l.hoverColor:void 0}}},ht=ot((e,t)=>{let r=z("Button",ule,e),{style:n,vars:o,className:i,color:a,disabled:s,children:l,leftSection:c,rightSection:d,fullWidth:u,variant:f,radius:m,loading:p,loaderProps:h,gradient:b,classNames:v,styles:x,unstyled:_,"data-disabled":I,autoContrast:S,mod:w,...P}=r,E=q({name:"Button",props:r,classes:Ls,className:i,style:n,classNames:v,styles:x,unstyled:_,vars:o,varsResolver:fle}),B=!!c,H=!!d;return(0,Ma.jsxs)(xt,{ref:t,...E("root",{active:!s&&!p&&!I}),unstyled:_,variant:f,disabled:s||p,mod:[{disabled:s||I,loading:p,block:u,"with-left-section":B,"with-right-section":H},w],...P,children:[(0,Ma.jsx)(Ho,{mounted:!!p,transition:dle,duration:150,children:Z=>(0,Ma.jsx)(F,{component:"span",...E("loader",{style:Z}),"aria-hidden":!0,children:(0,Ma.jsx)(fo,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...h})})}),(0,Ma.jsxs)("span",{...E("inner"),children:[c&&(0,Ma.jsx)(F,{component:"span",...E("section"),mod:{position:"left"},children:c}),(0,Ma.jsx)(F,{component:"span",mod:{loading:p},...E("label"),children:l}),d&&(0,Ma.jsx)(F,{component:"span",...E("section"),mod:{position:"right"},children:d})]})]})});ht.classes=Ls;ht.displayName="@mantine/core/Button";ht.Group=x0;ht.GroupSection=b0;var DD=y(O(),1),y0=y(R(),1);var tHe=y(R(),1);var oHe=y(O(),1);var[bV,yV]=Vt("Card component was not found in tree");var _V=y(O(),1),sHe=y(R(),1);var nv={root:"m_e615b15f",section:"m_599a2148"};var mle={},iv=ot((e,t)=>{let r=z("CardSection",mle,e),{classNames:n,className:o,style:i,styles:a,vars:s,withBorder:l,inheritPadding:c,mod:d,...u}=r,f=yV();return(0,_V.jsx)(F,{ref:t,mod:[{"with-border":l,"inherit-padding":c},d],...f.getStyles("section",{className:o,style:i,styles:a,classNames:n}),...u})});iv.classes=nv;iv.displayName="@mantine/core/CardSection";var ple={},hle=(e,{padding:t})=>({root:{"--card-padding":Tt(t)}}),Rr=ot((e,t)=>{let r=z("Card",ple,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,children:c,padding:d,...u}=r,f=q({name:"Card",props:r,classes:nv,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:hle}),m=y0.Children.toArray(c),p=m.map((h,b)=>typeof h=="object"&&h&&"type"in h&&h.type===iv?(0,y0.cloneElement)(h,{"data-first-section":b===0||void 0,"data-last-section":b===m.length-1||void 0}):h);return(0,DD.jsx)(bV,{value:{getStyles:f},children:(0,DD.jsx)(Qi,{ref:t,unstyled:s,...f("root"),...u,children:p})})});Rr.classes=nv;Rr.displayName="@mantine/core/Card";Rr.Section=iv;var IV=y(O(),1),CHe=y(R(),1);var RD={root:"m_4451eb3a"};var gle={},sc=ot((e,t)=>{let r=z("Center",gle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,inline:c,mod:d,...u}=r,f=q({name:"Center",props:r,classes:RD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l});return(0,IV.jsx)(F,{ref:t,mod:[{inline:c},d],...f("root"),...u})});sc.classes=RD;sc.displayName="@mantine/core/Center";var wV=y(O(),1),zHe=y(R(),1);var ED={root:"m_b183c0a2"};var vle={},xle=(e,{color:t})=>({root:{"--code-bg":t?Be(t,e):void 0}}),av=M((e,t)=>{let r=z("Code",vle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,block:d,variant:u,mod:f,...m}=r,p=q({name:"Code",props:r,classes:ED,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:xle});return(0,wV.jsx)(F,{component:d?"pre":"code",variant:u,ref:t,mod:[{block:d},f],...p("root"),...m,dir:"ltr"})});av.classes=ED;av.displayName="@mantine/core/Code";var $D=y(O(),1),WHe=y(R(),1);var TD={root:"m_3eebeb36",label:"m_9e365f20"};var ble={orientation:"horizontal"},yle=(e,{color:t,variant:r,size:n})=>({root:{"--divider-color":t?Be(t,e):void 0,"--divider-border-style":r,"--divider-size":ge(n,"divider-size")}}),sv=M((e,t)=>{let r=z("Divider",ble,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,orientation:d,label:u,labelPosition:f,mod:m,...p}=r,h=q({name:"Divider",classes:TD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:yle});return(0,$D.jsx)(F,{ref:t,mod:[{orientation:d,"with-label":!!u},m],...h("root"),...p,role:"separator",children:u&&(0,$D.jsx)(F,{component:"span",mod:{position:f},...h("label"),children:u})})});sv.classes=TD;sv.displayName="@mantine/core/Divider";var lv=y(R(),1);function SV({open:e,close:t,openDelay:r,closeDelay:n}){let o=(0,lv.useRef)(-1),i=(0,lv.useRef)(-1),a=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},s=()=>{a(),r===0||r===void 0?e():o.current=window.setTimeout(e,r)},l=()=>{a(),n===0||n===void 0?t():i.current=window.setTimeout(t,n)};return(0,lv.useEffect)(()=>a,[]),{openDropdown:s,closeDropdown:l}}var I0=y(O(),1),xWe=y(R(),1);var kV=y(O(),1),lWe=y(R(),1);var rWe=y(R(),1),oWe=y(O(),1);function AD({color:e,theme:t,defaultShade:r}){let n=yr({color:e,theme:t});return n.isThemeColor?n.shade===void 0?`var(--mantine-color-${n.color}-${r})`:`var(${n.variable})`:e}var OD={root:"m_bcb3f3c2"};var _le={color:"yellow"},Ile=(e,{color:t})=>({root:{"--mark-bg-dark":AD({color:t,theme:e,defaultShade:5}),"--mark-bg-light":AD({color:t,theme:e,defaultShade:2})}}),_0=M((e,t)=>{let r=z("Mark",_le,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,variant:d,...u}=r,f=q({name:"Mark",props:r,className:o,style:i,classes:OD,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Ile});return(0,kV.jsx)(F,{component:"mark",ref:t,variant:d,...f("root"),...u})});_0.classes=OD;_0.displayName="@mantine/core/Mark";function CV(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}function PV(e,t){if(t==null)return[{chunk:e,highlighted:!1}];let r=Array.isArray(t)?t.map(CV):CV(t);if(!(Array.isArray(r)?r.filter(s=>s.trim().length>0).length>0:r.trim()!==""))return[{chunk:e,highlighted:!1}];let o=typeof r=="string"?r.trim():r.filter(s=>s.trim().length!==0).map(s=>s.trim()).sort((s,l)=>l.length-s.length).join("|"),i=new RegExp(`(${o})`,"gi");return e.split(i).map(s=>({chunk:s,highlighted:i.test(s)})).filter(({chunk:s})=>s)}var wle={},cv=ot((e,t)=>{let{unstyled:r,children:n,highlight:o,highlightStyles:i,color:a,...s}=z("Highlight",wle,e),l=PV(n,o);return(0,I0.jsx)(ye,{unstyled:r,ref:t,...s,__staticSelector:"Highlight",children:l.map(({chunk:c,highlighted:d},u)=>d?(0,I0.jsx)(_0,{unstyled:r,color:a,style:i,"data-highlight":c,children:c},u):(0,I0.jsx)("span",{children:c},u))})});cv.classes=ye.classes;cv.displayName="@mantine/core/Highlight";var BV=y(O(),1),jV=y(R(),1);var MV=y(O(),1);function Rm(){return Rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rm.apply(null,arguments)}function Em(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ji=y(R());var EV=y(R());var DV=y(R()),RV=DV.useLayoutEffect;var TV=function(t){var r=EV.default.useRef(t);return RV(function(){r.current=t}),r};var zD=y(R()),$V=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},AV=function(t,r){var n=zD.default.useRef();return zD.default.useCallback(function(o){t.current=o,n.current&&$V(n.current,null),n.current=r,r&&$V(r,o)},[r])};var OV={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Sle=function(t){Object.keys(OV).forEach(function(r){t.style.setProperty(r,OV[r],"important")})},zV=Sle,qo=null,NV=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function kle(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),qo||(qo=document.createElement("textarea"),qo.setAttribute("tabindex","-1"),qo.setAttribute("aria-hidden","true"),zV(qo)),qo.parentNode===null&&document.body.appendChild(qo);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(f){var m=f;qo.style[m]=a[m]}),zV(qo),qo.value=t;var l=NV(qo,e);qo.value=t,l=NV(qo,e),qo.value="x";var c=qo.scrollHeight-o,d=c*r;s==="border-box"&&(d=d+o+i),l=Math.max(d,l);var u=c*n;return s==="border-box"&&(u=u+o+i),l=Math.min(u,l),[l,c]}var FV=function(){},Cle=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Ple=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Dle=!!document.documentElement.currentStyle,Rle=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=Cle(Ple,r),o=n.boxSizing;if(o==="")return null;Dle&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},Ele=Rle;function ND(e,t,r){var n=TV(r);Ji.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var Tle=function(t,r){ND(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},$le=function(t){ND(window,"resize",t)},Ale=function(t){ND(document.fonts,"loadingdone",t)},Ole=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],zle=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?FV:a,l=t.onHeightChange,c=l===void 0?FV:l,d=Em(t,Ole),u=d.value!==void 0,f=Ji.useRef(null),m=AV(f,r),p=Ji.useRef(0),h=Ji.useRef(),b=function(){var _=f.current,I=n&&h.current?h.current:Ele(_);if(I){h.current=I;var S=kle(I,_.value||_.placeholder||"x",i,o),w=S[0],P=S[1];p.current!==w&&(p.current=w,_.style.setProperty("height",w+"px","important"),c(w,{rowHeight:P}))}},v=function(_){u||b(),s(_)};return Ji.useLayoutEffect(b),Tle(f,function(){if(!u){var x=f.current.value;requestAnimationFrame(function(){var _=f.current;_&&x!==_.value&&b()})}}),$le(b),Ale(b),Ji.createElement("textarea",Rm({},d,{onChange:v,ref:m}))},LV=Ji.forwardRef(zle);var LWe=y(R(),1);var Nle={},w0=M((e,t)=>{let{autosize:r,maxRows:n,minRows:o,__staticSelector:i,resize:a,...s}=z("Textarea",Nle,e),l=r&&by()!=="test";return(0,MV.jsx)(Yt,{component:l?LV:"textarea",ref:t,...s,__staticSelector:i||"Textarea",multiline:!0,"data-no-overflow":r&&n===void 0||void 0,__vars:{"--input-resize":a},...l?{maxRows:n,minRows:o}:{}})});w0.classes=Yt.classes;w0.displayName="@mantine/core/Textarea";function FD(e,t){if(typeof e=="string"&&e.trim().length===0)return!0;try{return t(e),!0}catch{return!1}}var Fle={serialize:JSON.stringify,deserialize:JSON.parse},dv=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,formatOnBlur:i,validationError:a,serialize:s,deserialize:l,onFocus:c,onBlur:d,readOnly:u,error:f,...m}=z("JsonInput",Fle,e),[p,h]=rt({value:r,defaultValue:n,finalValue:"",onChange:o}),[b,v]=(0,jV.useState)(FD(p,l));return(0,BV.jsx)(w0,{value:p,onChange:I=>h(I.currentTarget.value),onFocus:I=>{c?.(I),v(!0)},onBlur:I=>{typeof d=="function"&&d(I);let S=FD(I.currentTarget.value,l);i&&!u&&S&&I.currentTarget.value.trim()!==""&&h(s(l(I.currentTarget.value),null,2)),v(S)},ref:t,readOnly:u,...m,autoComplete:"off",__staticSelector:"JsonInput",error:b?f:a||!0,"data-monospace":!0})});dv.classes=Yt.classes;dv.displayName="@mantine/core/JsonInput";var MD=y(O(),1),qV=y(R(),1);var eZe=y(R(),1);var rZe=y(O(),1);var[UV,Ba]=Vt("Menu component was not found in the tree");var VV=y(O(),1),aZe=y(R(),1);var ea={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};var Lle={},S0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("MenuDivider",Lle,e),l=Ba();return(0,VV.jsx)(F,{ref:t,...l.getStyles("divider",{className:n,style:o,styles:i,classNames:r}),...s})});S0.classes=ea;S0.displayName="@mantine/core/MenuDivider";var k0=y(O(),1),HV=y(R(),1);var Mle={},C0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,onMouseEnter:s,onMouseLeave:l,onKeyDown:c,children:d,...u}=z("MenuDropdown",Mle,e),f=(0,HV.useRef)(null),m=Ba(),p=zn(c,v=>{(v.key==="ArrowUp"||v.key==="ArrowDown")&&(v.preventDefault(),f.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),h=zn(s,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.openDropdown()),b=zn(l,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.closeDropdown());return(0,k0.jsxs)(Gr.Dropdown,{...u,onMouseEnter:h,onMouseLeave:b,role:"menu","aria-orientation":"vertical",ref:He(t,f),...m.getStyles("dropdown",{className:n,style:o,styles:i,classNames:r,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:p,children:[m.withInitialFocusPlaceholder&&(0,k0.jsx)("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});C0.classes=ea;C0.displayName="@mantine/core/MenuDropdown";var Tm=y(O(),1),WV=y(R(),1);var Ble={},P0=ot((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,color:s,closeMenuOnClick:l,leftSection:c,rightSection:d,children:u,disabled:f,"data-disabled":m,...p}=z("MenuItem",Ble,e),h=Ba(),b=lt(),{dir:v}=ei(),x=(0,WV.useRef)(null),_=h.getItemIndex(x.current),I=p,S=zn(I.onMouseLeave,()=>h.setHovered(-1)),w=zn(I.onMouseEnter,()=>h.setHovered(h.getItemIndex(x.current))),P=zn(I.onClick,()=>{m||(typeof l=="boolean"?l&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),E=zn(I.onFocus,()=>h.setHovered(h.getItemIndex(x.current))),B=s?b.variantColorResolver({color:s,theme:b,variant:"light"}):void 0,H=s?yr({color:s,theme:b}):null;return(0,Tm.jsxs)(xt,{...p,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,onFocus:E,...h.getStyles("item",{className:n,style:o,styles:i,classNames:r}),ref:He(x,t),role:"menuitem",disabled:f,"data-menu-item":!0,"data-disabled":f||m||void 0,"data-hovered":h.hovered===_?!0:void 0,"data-mantine-stop-propagation":!0,onMouseEnter:w,onMouseLeave:S,onClick:P,onKeyDown:RF({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:h.loop,dir:v,orientation:"vertical",onKeyDown:I.onKeyDown}),__vars:{"--menu-item-color":H?.isThemeColor&&H?.shade===void 0?`var(--mantine-color-${H.color}-6)`:B?.color,"--menu-item-hover":B?.hover},children:[c&&(0,Tm.jsx)("div",{...h.getStyles("itemSection",{styles:i,classNames:r}),"data-position":"left",children:c}),u&&(0,Tm.jsx)("div",{...h.getStyles("itemLabel",{styles:i,classNames:r}),children:u}),d&&(0,Tm.jsx)("div",{...h.getStyles("itemSection",{styles:i,classNames:r}),"data-position":"right",children:d})]})});P0.classes=ea;P0.displayName="@mantine/core/MenuItem";var ZV=y(O(),1),NZe=y(R(),1);var jle={},D0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("MenuLabel",jle,e),l=Ba();return(0,ZV.jsx)(F,{ref:t,...l.getStyles("label",{className:n,style:o,styles:i,classNames:r}),...s})});D0.classes=ea;D0.displayName="@mantine/core/MenuLabel";var GV=y(O(),1),R0=y(R(),1);var Ule={refProp:"ref"},LD=(0,R0.forwardRef)((e,t)=>{let{children:r,refProp:n,...o}=z("MenuTarget",Ule,e);if(!yo(r))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let i=Ba(),a=r.props,s=zn(a.onClick,()=>{i.trigger==="click"?i.toggleDropdown():i.trigger==="click-hover"&&(i.setOpenedViaClick(!0),i.opened||i.openDropdown())}),l=zn(a.onMouseEnter,()=>(i.trigger==="hover"||i.trigger==="click-hover")&&i.openDropdown()),c=zn(a.onMouseLeave,()=>{(i.trigger==="hover"||i.trigger==="click-hover"&&!i.openedViaClick)&&i.closeDropdown()});return(0,GV.jsx)(Gr.Target,{refProp:n,popupType:"menu",ref:t,...o,children:(0,R0.cloneElement)(r,{onClick:s,onMouseEnter:l,onMouseLeave:c,"data-expanded":i.opened?!0:void 0})})});LD.displayName="@mantine/core/MenuTarget";var Vle={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Xr(e){let t=z("Menu",Vle,e),{children:r,onOpen:n,onClose:o,opened:i,defaultOpened:a,trapFocus:s,onChange:l,closeOnItemClick:c,loop:d,closeOnEscape:u,trigger:f,openDelay:m,closeDelay:p,classNames:h,styles:b,unstyled:v,variant:x,vars:_,menuItemTabIndex:I,keepMounted:S,withInitialFocusPlaceholder:w,...P}=t,E=q({name:"Menu",classes:ea,props:t,classNames:h,styles:b,unstyled:v}),[B,{setHovered:H,resetHovered:Z}]=OF(),[K,T]=rt({value:i,defaultValue:a,finalValue:!1,onChange:l}),[k,$]=(0,qV.useState)(!1),C=()=>{T(!1),$(!1),K&&o?.()},A=()=>{T(!0),!K&&n?.()},D=()=>{K?C():A()},{openDropdown:N,closeDropdown:U}=SV({open:A,close:C,closeDelay:p,openDelay:m}),G=me=>$F("[data-menu-item]","[data-menu-dropdown]",me),{resolvedClassNames:re,resolvedStyles:he}=Vr({classNames:h,styles:b,props:t});return br(()=>{Z()},[K]),(0,MD.jsx)(UV,{value:{getStyles:E,opened:K,toggleDropdown:D,getItemIndex:G,hovered:B,setHovered:H,openedViaClick:k,setOpenedViaClick:$,closeOnItemClick:c,closeDropdown:f==="click"?C:U,openDropdown:f==="click"?A:N,closeDropdownImmediately:C,loop:d,trigger:f,unstyled:v,menuItemTabIndex:I,withInitialFocusPlaceholder:w},children:(0,MD.jsx)(Gr,{...P,opened:K,onChange:D,defaultOpened:a,trapFocus:S?!1:s,closeOnEscape:u,__staticSelector:"Menu",classNames:re,styles:he,unstyled:v,variant:x,keepMounted:S,children:r})})}Xr.extend=e=>e;Xr.withProps=z2(Xr);Xr.classes=ea;Xr.displayName="@mantine/core/Menu";Xr.Item=P0;Xr.Label=D0;Xr.Dropdown=C0;Xr.Target=LD;Xr.Divider=S0;var Ms=y(O(),1),oH=y(R(),1);var XV=y(O(),1),_Ge=y(R(),1);var hGe=y(R(),1);var vGe=y(O(),1);var[KV,hi]=Vt("Modal component was not found in tree");var mo={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};var Hle={},uv=M((e,t)=>{let r=z("ModalBody",Hle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,XV.jsx)(G6,{ref:t,...c.getStyles("body",{classNames:n,style:i,styles:a,className:o}),...l})});uv.classes=mo;uv.displayName="@mantine/core/ModalBody";var QV=y(O(),1),RGe=y(R(),1);var Wle={},fv=M((e,t)=>{let r=z("ModalCloseButton",Wle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,QV.jsx)(q6,{ref:t,...c.getStyles("close",{classNames:n,style:i,styles:a,className:o}),...l})});fv.classes=mo;fv.displayName="@mantine/core/ModalCloseButton";var BD=y(O(),1);var LGe=y(R(),1);var Zle={},mv=M((e,t)=>{let r=z("ModalContent",Zle,e),{classNames:n,className:o,style:i,styles:a,vars:s,children:l,__hidden:c,...d}=r,u=hi(),f=u.scrollAreaComponent||eU;return(0,BD.jsx)(K6,{...u.getStyles("content",{className:o,style:i,styles:a,classNames:n}),innerProps:u.getStyles("inner",{className:o,style:i,styles:a,classNames:n}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,ref:t,...d,children:(0,BD.jsx)(f,{style:{maxHeight:u.fullScreen?"100dvh":`calc(100dvh - (${W(u.yOffset)} * 2))`},children:l})})});mv.classes=mo;mv.displayName="@mantine/core/ModalContent";var YV=y(O(),1),GGe=y(R(),1);var Gle={},pv=M((e,t)=>{let r=z("ModalHeader",Gle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,YV.jsx)(X6,{ref:t,...c.getStyles("header",{classNames:n,style:i,styles:a,className:o}),...l})});pv.classes=mo;pv.displayName="@mantine/core/ModalHeader";var JV=y(O(),1),tqe=y(R(),1);var qle={},hv=M((e,t)=>{let r=z("ModalOverlay",qle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,JV.jsx)(Y6,{ref:t,...c.getStyles("overlay",{classNames:n,style:i,styles:a,className:o}),...l})});hv.classes=mo;hv.displayName="@mantine/core/ModalOverlay";var jD=y(O(),1);var dqe=y(R(),1);var Kle={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Pt("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},Xle=(e,{radius:t,size:r,yOffset:n,xOffset:o})=>({root:{"--modal-radius":t===void 0?void 0:Ee(t),"--modal-size":ge(r,"modal-size"),"--modal-y-offset":W(n),"--modal-x-offset":W(o)}}),gv=M((e,t)=>{let r=z("ModalRoot",Kle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,yOffset:c,scrollAreaComponent:d,radius:u,fullScreen:f,centered:m,xOffset:p,__staticSelector:h,...b}=r,v=q({name:h,classes:mo,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Xle});return(0,jD.jsx)(KV,{value:{yOffset:c,scrollAreaComponent:d,getStyles:v,fullScreen:f},children:(0,jD.jsx)(Z6,{ref:t,...v("root"),"data-full-screen":f||void 0,"data-centered":m||void 0,"data-offset-scrollbars":d===Ar.Autosize||void 0,unstyled:s,...b})})});gv.classes=mo;gv.displayName="@mantine/core/ModalRoot";var eH=y(O(),1),UD=y(R(),1);var[Qle,tH]=_o();function VD({children:e}){let[t,r]=(0,UD.useState)([]),[n,o]=(0,UD.useState)(Pt("modal"));return(0,eH.jsx)(Qle,{value:{stack:t,addModal:(i,a)=>{r(s=>[...new Set([...s,i])]),o(s=>typeof a=="number"&&typeof s=="number"?Math.max(s,a):s)},removeModal:i=>r(a=>a.filter(s=>s!==i)),getZIndex:i=>`calc(${n} + ${t.indexOf(i)} + 1)`,currentId:t[t.length-1],maxZIndex:n},children:e})}VD.displayName="@mantine/core/ModalStack";var rH=y(O(),1),Cqe=y(R(),1);var Yle={},vv=M((e,t)=>{let r=z("ModalTitle",Yle,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=hi();return(0,rH.jsx)(J6,{ref:t,...c.getStyles("title",{classNames:n,style:i,styles:a,className:o}),...l})});vv.classes=mo;vv.displayName="@mantine/core/ModalTitle";var Jle={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Pt("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},po=M((e,t)=>{let{title:r,withOverlay:n,overlayProps:o,withCloseButton:i,closeButtonProps:a,children:s,radius:l,opened:c,stackId:d,zIndex:u,...f}=z("Modal",Jle,e),m=tH(),p=!!r||i,h=m&&d?{closeOnEscape:m.currentId===d,trapFocus:m.currentId===d,zIndex:m.getZIndex(d)}:{},b=n===!1?!1:d&&m?m.currentId===d:c;return(0,oH.useEffect)(()=>{m&&d&&(c?m.addModal(d,u||Pt("modal")):m.removeModal(d))},[c,d,u]),(0,Ms.jsxs)(gv,{ref:t,radius:l,opened:c,zIndex:m&&d?m.getZIndex(d):u,...f,...h,children:[n&&(0,Ms.jsx)(hv,{visible:b,transitionProps:m&&d?{duration:0}:void 0,...o}),(0,Ms.jsxs)(mv,{radius:l,__hidden:m&&d&&c?d!==m.currentId:!1,children:[p&&(0,Ms.jsxs)(pv,{children:[r&&(0,Ms.jsx)(vv,{children:r}),i&&(0,Ms.jsx)(fv,{...a})]}),(0,Ms.jsx)(uv,{children:s})]})]})});po.classes=mo;po.displayName="@mantine/core/Modal";po.Root=gv;po.Overlay=hv;po.Content=mv;po.Body=uv;po.Header=pv;po.Title=vv;po.CloseButton=fv;po.Stack=VD;var Do=y(O(),1),dH=y(R(),1);var xv=y(O(),1),gKe=y(R(),1);var qqe=y(R(),1),Kqe=y(O(),1);var[nH,$m]=_o();var Jqe=y(R(),1),eKe=y(O(),1);var[iH,aH]=_o();var HD=y(O(),1),iKe=y(R(),1);var Am={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};var ece={},tce=(e,{gap:t},{size:r})=>({group:{"--pg-gap":t!==void 0?ge(t):ge(r,"pg-gap")}}),E0=M((e,t)=>{let r=z("PillGroup",ece,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,disabled:d,...u}=r,m=$m()?.size||c||void 0,p=q({name:"PillGroup",classes:Am,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:tce,stylesCtx:{size:m},rootSelector:"group"});return(0,HD.jsx)(iH,{value:{size:m,disabled:d},children:(0,HD.jsx)(F,{ref:t,size:m,...p("group"),...u})})});E0.classes=Am;E0.displayName="@mantine/core/PillGroup";var rce={variant:"default"},oce=(e,{radius:t},{size:r})=>({root:{"--pill-fz":ge(r,"pill-fz"),"--pill-height":ge(r,"pill-height"),"--pill-radius":t===void 0?void 0:Ee(t)}}),Bs=M((e,t)=>{let r=z("Pill",rce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,variant:c,children:d,withRemoveButton:u,onRemove:f,removeButtonProps:m,radius:p,size:h,disabled:b,mod:v,...x}=r,_=aH(),I=$m(),S=h||_?.size||void 0,w=I?.variant==="filled"?"contrast":c||"default",P=q({name:"Pill",classes:Am,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:oce,stylesCtx:{size:S}});return(0,xv.jsxs)(F,{component:"span",ref:t,variant:w,size:S,...P("root",{variant:w}),mod:[{"with-remove":u&&!b,disabled:b||_?.disabled},v],...x,children:[(0,xv.jsx)("span",{...P("label"),children:d}),u&&(0,xv.jsx)(ui,{variant:"transparent",radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:s,...m,...P("remove",{className:m?.className,style:m?.style}),onMouseDown:E=>{E.preventDefault(),E.stopPropagation(),m?.onMouseDown?.(E)},onClick:E=>{E.stopPropagation(),f?.(),m?.onClick?.(E)}})]})});Bs.classes=Am;Bs.displayName="@mantine/core/Pill";Bs.Group=E0;var ZD=y(O(),1),lH=y(R(),1);var sH=y(O(),1);var TKe=y(R(),1);var WD={field:"m_45c4369d"};var nce={type:"visible"},T0=M((e,t)=>{let r=z("PillsInputField",nce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,type:c,disabled:d,id:u,pointer:f,mod:m,...p}=r,h=$m(),b=fi(),v=q({name:"PillsInputField",classes:WD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"field"}),x=d||h?.disabled;return(0,sH.jsx)(F,{component:"input",ref:He(t,h?.fieldRef),"data-type":c,disabled:x,mod:[{disabled:x,pointer:f},m],...v("field"),...p,id:b?.inputId||u,"aria-invalid":h?.hasError,"aria-describedby":b?.describedBy,type:"text",onMouseDown:_=>!f&&_.stopPropagation()})});T0.classes=WD;T0.displayName="@mantine/core/PillsInputField";var ice={},lc=M((e,t)=>{let r=z("PillsInput",ice,e),{children:n,onMouseDown:o,onClick:i,size:a,disabled:s,__staticSelector:l,error:c,variant:d,...u}=r,f=(0,lH.useRef)(null);return(0,ZD.jsx)(nH,{value:{fieldRef:f,size:a,disabled:s,hasError:!!c,variant:d},children:(0,ZD.jsx)(Yt,{size:a,error:c,variant:d,component:"div",ref:t,onMouseDown:m=>{m.preventDefault(),o?.(m),f.current?.focus()},onClick:m=>{m.preventDefault(),m.currentTarget.closest("fieldset")?.disabled||(f.current?.focus(),i?.(m))},...u,multiline:!0,disabled:s,__staticSelector:l||"PillsInput",withAria:!1,children:n})})});lc.displayName="@mantine/core/PillsInput";lc.Field=T0;var qKe=y(O(),1);var XKe=y(R(),1);function cH({data:e,value:t}){let r=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(pi(i)?o.push({group:i.group,items:i.items.filter(a=>r.indexOf(a.value.toLowerCase().trim())===-1)}):r.indexOf(i.value.toLowerCase().trim())===-1&&o.push(i),o),[])}var ace={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:","},qd=M((e,t)=>{let r=z("MultiSelect",ace,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,value:d,defaultValue:u,onChange:f,onKeyDown:m,variant:p,data:h,dropdownOpened:b,defaultDropdownOpened:v,onDropdownOpen:x,onDropdownClose:_,selectFirstOptionOnChange:I,onOptionSubmit:S,comboboxProps:w,filter:P,limit:E,withScrollArea:B,maxDropdownHeight:H,searchValue:Z,defaultSearchValue:K,onSearchChange:T,readOnly:k,disabled:$,onFocus:C,onBlur:A,radius:D,rightSection:N,rightSectionWidth:U,rightSectionPointerEvents:G,rightSectionProps:re,leftSection:he,leftSectionWidth:me,leftSectionPointerEvents:Q,leftSectionProps:oe,inputContainer:Ie,inputWrapperOrder:se,withAsterisk:$e,labelProps:Ve,descriptionProps:Je,errorProps:at,wrapperProps:ze,description:Kt,label:Xt,error:ao,maxValues:pe,searchable:ue,nothingFoundMessage:Se,withCheckIcon:Ae,checkIconPosition:Xe,hidePickedOptions:Fe,withErrorStyles:et,name:de,form:Re,id:xr,clearable:fn,clearButtonProps:No,hiddenInputProps:jt,placeholder:kr,hiddenInputValuesDivider:hs,required:of,mod:nf,renderOption:af,onRemove:Cr,onClear:yl,scrollAreaProps:_l,chevronColor:yh,..._h}=r,Ih=pt(xr),sf=_m(h),Il=Wd(sf),ir=ic({opened:b,defaultOpened:v,onDropdownOpen:x,onDropdownClose:()=>{_?.(),ir.resetSelectedOption()}}),{styleProps:NC,rest:{type:Mte,autoComplete:FC,...LC}}=Hr(_h),[st,On]=rt({value:d,defaultValue:u,finalValue:[],onChange:f}),[Yn,MC]=rt({value:Z,defaultValue:K,finalValue:"",onChange:T}),zi=ke=>{MC(ke),ir.resetSelectedOption()},ed=q({name:"MultiSelect",classes:{},props:r,classNames:n,styles:a,unstyled:s}),{resolvedClassNames:wh,resolvedStyles:Sh}=Vr({props:r,styles:a,classNames:n}),Kb=ke=>{m?.(ke),ke.key===" "&&!ue&&(ke.preventDefault(),ir.toggleDropdown()),ke.key==="Backspace"&&Yn.length===0&&st.length>0&&(Cr?.(st[st.length-1]),On(st.slice(0,st.length-1)))},BC=st.map((ke,Fo)=>(0,Do.jsx)(Bs,{withRemoveButton:!k&&!Il[ke]?.disabled,onRemove:()=>{On(st.filter(fa=>ke!==fa)),Cr?.(ke)},unstyled:s,disabled:$,...ed("pill"),children:Il[ke]?.label||ke},`${ke}-${Fo}`));(0,dH.useEffect)(()=>{I&&ir.selectFirstOption()},[I,Yn]);let Xb=(0,Do.jsx)(je.ClearButton,{...No,onClear:()=>{yl?.(),On([]),zi("")}}),jC=cH({data:sf,value:st}),Qb=fn&&st.length>0&&!$&&!k;return(0,Do.jsxs)(Do.Fragment,{children:[(0,Do.jsxs)(je,{store:ir,classNames:wh,styles:Sh,unstyled:s,size:c,readOnly:k,__staticSelector:"MultiSelect",onOptionSubmit:ke=>{S?.(ke),zi(""),ir.updateSelectedOptionIndex("selected"),st.includes(Il[ke].value)?(On(st.filter(Fo=>Fo!==Il[ke].value)),Cr?.(Il[ke].value)):st.length<pe&&On([...st,Il[ke].value])},...w,children:[(0,Do.jsx)(je.DropdownTarget,{children:(0,Do.jsx)(lc,{...NC,__staticSelector:"MultiSelect",classNames:wh,styles:Sh,unstyled:s,size:c,className:o,style:i,variant:p,disabled:$,radius:D,__defaultRightSection:(0,Do.jsx)(je.Chevron,{size:c,error:ao,unstyled:s,color:yh}),__clearSection:Xb,__clearable:Qb,rightSection:N,rightSectionPointerEvents:G||(Xb?"all":"none"),rightSectionWidth:U,rightSectionProps:re,leftSection:he,leftSectionWidth:me,leftSectionPointerEvents:Q,leftSectionProps:oe,inputContainer:Ie,inputWrapperOrder:se,withAsterisk:$e,labelProps:Ve,descriptionProps:Je,errorProps:at,wrapperProps:ze,description:Kt,label:Xt,error:ao,withErrorStyles:et,__stylesApiProps:{...r,rightSectionPointerEvents:G||(Qb?"all":"none"),multiline:!0},pointer:!ue,onClick:()=>ue?ir.openDropdown():ir.toggleDropdown(),"data-expanded":ir.dropdownOpened||void 0,id:Ih,required:of,mod:nf,children:(0,Do.jsxs)(Bs.Group,{disabled:$,unstyled:s,...ed("pillsList"),children:[BC,(0,Do.jsx)(je.EventsTarget,{autoComplete:FC,children:(0,Do.jsx)(lc.Field,{...LC,ref:t,id:Ih,placeholder:kr,type:!ue&&!kr?"hidden":"visible",...ed("inputField"),unstyled:s,onFocus:ke=>{C?.(ke),ue&&ir.openDropdown()},onBlur:ke=>{A?.(ke),ir.closeDropdown(),zi("")},onKeyDown:Kb,value:Yn,onChange:ke=>{zi(ke.currentTarget.value),ue&&ir.openDropdown(),I&&ir.selectFirstOption()},disabled:$,readOnly:k||!ue,pointer:!ue})})]})})}),(0,Do.jsx)(Cm,{data:Fe?jC:sf,hidden:k||$,filter:P,search:Yn,limit:E,hiddenWhenEmpty:!Se,withScrollArea:B,maxDropdownHeight:H,filterOptions:ue,value:st,checkIconPosition:Xe,withCheckIcon:Ae,nothingFoundMessage:Se,unstyled:s,labelId:Xt?`${Ih}-label`:void 0,"aria-label":Xt?void 0:_h["aria-label"],renderOption:af,scrollAreaProps:_l})]}),(0,Do.jsx)(je.HiddenInput,{name:de,valuesDivider:hs,value:st,form:Re,disabled:$,...jt})]})});qd.classes={...Yt.classes,...je.classes};qd.displayName="@mantine/core/MultiSelect";var wn=y(O(),1);var xXe=y(R(),1);var GD={root:"m_f0824112",description:"m_57492dcc",section:"m_690090b5",label:"m_1f6ac4c4",body:"m_f07af9d2",children:"m_e17b862f",chevron:"m_1fd8a00b"};var sce={},lce=(e,{variant:t,color:r,childrenOffset:n,autoContrast:o})=>{let i=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:t||"light",autoContrast:o});return{root:{"--nl-bg":r||t?i.background:void 0,"--nl-hover":r||t?i.hover:void 0,"--nl-color":r||t?i.color:void 0},children:{"--nl-offset":Tt(n)}}},ta=ot((e,t)=>{let r=z("NavLink",sce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,opened:c,defaultOpened:d,onChange:u,children:f,onClick:m,active:p,disabled:h,leftSection:b,rightSection:v,label:x,description:_,disableRightSectionRotation:I,noWrap:S,childrenOffset:w,onKeyDown:P,autoContrast:E,mod:B,...H}=r,Z=q({name:"NavLink",props:r,classes:GD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:lce}),[K,T]=rt({value:c,defaultValue:d,finalValue:!1,onChange:u}),k=!!f,$=C=>{m?.(C),k&&(C.preventDefault(),T(!K))};return(0,wn.jsxs)(wn.Fragment,{children:[(0,wn.jsxs)(xt,{...Z("root"),component:"a",ref:t,onClick:$,onKeyDown:C=>{P?.(C),C.nativeEvent.code==="Space"&&k&&(C.preventDefault(),T(!K))},unstyled:s,mod:[{disabled:h,active:p,expanded:K},B],...H,children:[b&&(0,wn.jsx)(F,{component:"span",...Z("section"),mod:{position:"left"},children:b}),(0,wn.jsxs)(F,{...Z("body"),mod:{"no-wrap":S},children:[(0,wn.jsx)(F,{component:"span",...Z("label"),children:x}),(0,wn.jsx)(F,{component:"span",mod:{active:p},...Z("description"),children:_})]}),(k||v!==void 0)&&(0,wn.jsx)(F,{...Z("section"),component:"span",mod:{rotate:K&&!I,position:"right"},children:k?v!==void 0?v:(0,wn.jsx)(nD,{...Z("chevron")}):v})]}),k&&(0,wn.jsx)(tm,{in:K,...Z("collapse"),children:(0,wn.jsx)("div",{...Z("children"),children:f})})]})});ta.classes=GD;ta.displayName="@mantine/core/NavLink";var js=y(O(),1),TXe=y(R(),1);var qD={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};var cce={withCloseButton:!0},dce=(e,{radius:t,color:r})=>({root:{"--notification-radius":t===void 0?void 0:Ee(t),"--notification-color":r?Be(r,e):void 0}}),Kd=M((e,t)=>{let r=z("Notification",cce,e),{className:n,color:o,radius:i,loading:a,withCloseButton:s,withBorder:l,title:c,icon:d,children:u,onClose:f,closeButtonProps:m,classNames:p,style:h,styles:b,unstyled:v,variant:x,vars:_,mod:I,loaderProps:S,role:w,...P}=r,E=q({name:"Notification",classes:qD,props:r,className:n,style:h,classNames:p,styles:b,unstyled:v,vars:_,varsResolver:dce});return(0,js.jsxs)(F,{...E("root"),mod:[{"data-with-icon":!!d||a,"data-with-border":l},I],ref:t,variant:x,role:w||"alert",...P,children:[d&&!a&&(0,js.jsx)("div",{...E("icon"),children:d}),a&&(0,js.jsx)(fo,{size:28,color:o,...S,...E("loader")}),(0,js.jsxs)("div",{...E("body"),children:[c&&(0,js.jsx)("div",{...E("title"),children:c}),(0,js.jsx)(F,{...E("description"),mod:{"data-with-title":!!c},children:u})]}),s&&(0,js.jsx)(ui,{iconSize:16,color:"gray",...m,unstyled:v,onClick:f,...E("closeButton")})]})});Kd.classes=qD;Kd.displayName="@mantine/core/Notification";var Ft=y(R());function gH(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var Om;(function(e){e.event="event",e.props="prop"})(Om||(Om={}));function cc(){}function uce(e){var t,r=void 0;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t&&n.length===t.length&&n.every(function(i,a){return i===t[a]})||(t=n,r=e.apply(void 0,n)),r}}function bv(e){return!!(e||"").match(/\d/)}function dc(e){return e==null}function fce(e){return typeof e=="number"&&isNaN(e)}function vH(e){return dc(e)||fce(e)||typeof e=="number"&&!isFinite(e)}function xH(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function mce(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function pce(e,t,r){var n=mce(r),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}function uH(e){var t=(0,Ft.useRef)(e);t.current=e;var r=(0,Ft.useRef)(function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t.current.apply(t,n)});return r.current}function XD(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var o=e.split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNegation:r,addNegation:n}}function hce(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}function bH(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function fH(e,t){return Array(t+1).join(e)}function yH(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],i=n[1];if(i=Number(i),!i)return r+o;o=o.replace(".","");var a=1+i,s=o.length;return a<0?o="0."+fH("0",Math.abs(a))+o:a>=s?o=o+fH("0",a-s):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function mH(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,o=XD(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNegation,l=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:l.toFixed(t),d=c.split("."),u=i;i&&Number(d[0])&&(u=i.split("").reverse().reduce(function(h,b,v){return h.length>v?(Number(h[0])+Number(b)).toString()+h.substring(1,h.length):b+h},d[0]));var f=bH(d[1]||"",t,r),m=s?"-":"",p=n?".":"";return""+m+u+p+f}function Xd(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var _H=uce(function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:i-n}}}),gce=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function vce(e,t,r){return Math.min(Math.max(e,t),r)}function KD(e){return Math.max(e.selectionStart,e.selectionEnd)}function xce(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function bce(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function yce(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function _ce(e,t,r,n,o,i,a){a===void 0&&(a=yce);var s=o.findIndex(function(I){return I}),l=e.slice(0,s);!t&&!r.startsWith(l)&&(t=l,r=l+r,n=n+l.length);for(var c=r.length,d=e.length,u={},f=new Array(c),m=0;m<c;m++){f[m]=-1;for(var p=0,h=d;p<h;p++){var b=a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:m,formattedValueIndex:p});if(b&&u[p]!==!0){f[m]=p,u[p]=!0;break}}}for(var v=n;v<c&&(f[v]===-1||!i(r[v]));)v++;var x=v===c||f[v]===-1?d:f[v];for(v=n-1;v>0&&f[v]===-1;)v--;var _=v===-1||f[v]===-1?0:f[v]+1;return _>x?x:n-_<x-n?_:x}function pH(e,t,r,n){var o=e.length;if(t=vce(t,0,o),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=o&&!r[t];)t++;t>o&&(t=r.lastIndexOf(!0))}return t===-1&&(t=o),t}function Ice(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(bv(e[r])||bv(e[r-1]));return t}function IH(e,t,r,n,o,i){i===void 0&&(i=cc);var a=uH(function(p,h){var b,v;return vH(p)?(v="",b=""):typeof p=="number"||h?(v=typeof p=="number"?yH(p):p,b=n(v)):(v=o(p,void 0),b=n(v)),{formattedValue:b,numAsString:v}}),s=(0,Ft.useState)(function(){return a(dc(e)?t:e,r)}),l=s[0],c=s[1],d=uH(function(p,h){p.formattedValue!==l.formattedValue&&c({formattedValue:p.formattedValue,numAsString:p.value}),i(p,h)}),u=e,f=r;dc(e)&&(u=l.numAsString,f=!0);var m=a(u,f);return(0,Ft.useMemo)(function(){c(m)},[m.formattedValue]),(0,Ft.useEffect)(function(){if(!dc(t)&&dc(e)&&l.formattedValue!==""){var p=parseFloat(l.numAsString);d({formattedValue:l.formattedValue,value:l.numAsString,floatValue:isNaN(p)?void 0:p},{event:void 0,source:Om.props})}},[]),[l,d]}function wce(e){return e.replace(/[^0-9]/g,"")}function Sce(e){return e}function kce(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,o=e.renderText,i=e.getInputRef,a=e.format;a===void 0&&(a=Sce);var s=e.removeFormatting;s===void 0&&(s=wce);var l=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,u=e.isAllowed,f=e.onChange;f===void 0&&(f=cc);var m=e.onKeyDown;m===void 0&&(m=cc);var p=e.onMouseUp;p===void 0&&(p=cc);var h=e.onFocus;h===void 0&&(h=cc);var b=e.onBlur;b===void 0&&(b=cc);var v=e.value,x=e.getCaretBoundary;x===void 0&&(x=Ice);var _=e.isValidInputCharacter;_===void 0&&(_=bv);var I=e.isCharacterSame,S=gH(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),w=IH(v,l,!!c,a,s,d),P=w[0],E=P.formattedValue,B=P.numAsString,H=w[1],Z=(0,Ft.useRef)(),K=(0,Ft.useRef)({formattedValue:E,numAsString:B}),T=function(pe,ue){K.current={formattedValue:pe.formattedValue,numAsString:pe.value},H(pe,ue)},k=(0,Ft.useState)(!1),$=k[0],C=k[1],A=(0,Ft.useRef)(null),D=(0,Ft.useRef)({setCaretTimeout:null,focusTimeout:null});(0,Ft.useEffect)(function(){return C(!0),function(){clearTimeout(D.current.setCaretTimeout),clearTimeout(D.current.focusTimeout)}},[]);var N=a,U=function(pe,ue){var Se=parseFloat(ue);return{formattedValue:pe,value:ue,floatValue:isNaN(Se)?void 0:Se}},G=function(pe,ue,Se){pe.selectionStart===0&&pe.selectionEnd===pe.value.length||(Xd(pe,ue),D.current.setCaretTimeout=setTimeout(function(){pe.value===Se&&pe.selectionStart!==ue&&Xd(pe,ue)},0))},re=function(pe,ue,Se){return pH(pe,ue,x(pe),Se)},he=function(pe,ue,Se){var Ae=x(ue),Xe=_ce(ue,E,pe,Se,Ae,_,I);return Xe=pH(ue,Xe,Ae),Xe},me=function(pe){var ue=pe.formattedValue;ue===void 0&&(ue="");var Se=pe.input,Ae=pe.source,Xe=pe.event,Fe=pe.numAsString,et;if(Se){var de=pe.inputValue||Se.value,Re=KD(Se);Se.value=ue,et=he(de,ue,Re),et!==void 0&&G(Se,et,ue)}ue!==E&&T(U(ue,Fe),{event:Xe,source:Ae})};(0,Ft.useEffect)(function(){var pe=K.current,ue=pe.formattedValue,Se=pe.numAsString;(E!==ue||B!==Se)&&T(U(E,B),{event:void 0,source:Om.props})},[E,B]);var Q=A.current?KD(A.current):void 0,oe=typeof window<"u"?Ft.useLayoutEffect:Ft.useEffect;oe(function(){var pe=A.current;if(E!==K.current.formattedValue&&pe){var ue=he(K.current.formattedValue,E,Q);pe.value=E,G(pe,ue,E)}},[E]);var Ie=function(pe,ue,Se){var Ae=ue.target,Xe=Z.current?gce(Z.current,Ae.selectionEnd):_H(E,pe),Fe=Object.assign(Object.assign({},Xe),{lastValue:E}),et=s(pe,Fe),de=N(et);if(et=s(de,void 0),u&&!u(U(de,et))){var Re=ue.target,xr=KD(Re),fn=he(pe,E,xr);return Re.value=E,G(Re,fn,E),!1}return me({formattedValue:de,numAsString:et,inputValue:pe,event:ue,source:Se,input:ue.target}),!0},se=function(pe,ue){ue===void 0&&(ue=0);var Se=pe.selectionStart,Ae=pe.selectionEnd;Z.current={selectionStart:Se,selectionEnd:Ae+ue}},$e=function(pe){var ue=pe.target,Se=ue.value,Ae=Ie(Se,pe,Om.event);Ae&&f(pe),Z.current=void 0},Ve=function(pe){var ue=pe.target,Se=pe.key,Ae=ue.selectionStart,Xe=ue.selectionEnd,Fe=ue.value;Fe===void 0&&(Fe="");var et;Se==="ArrowLeft"||Se==="Backspace"?et=Math.max(Ae-1,0):Se==="ArrowRight"?et=Math.min(Ae+1,Fe.length):Se==="Delete"&&(et=Ae);var de=0;Se==="Delete"&&Ae===Xe&&(de=1);var Re=Se==="ArrowLeft"||Se==="ArrowRight";if(et===void 0||Ae!==Xe&&!Re){m(pe),se(ue,de);return}var xr=et;if(Re){var fn=Se==="ArrowLeft"?"left":"right";xr=re(Fe,et,fn),xr!==et&&pe.preventDefault()}else Se==="Delete"&&!_(Fe[et])?xr=re(Fe,et,"right"):Se==="Backspace"&&!_(Fe[et])&&(xr=re(Fe,et,"left"));xr!==et&&G(ue,xr,Fe),m(pe),se(ue,de)},Je=function(pe){var ue=pe.target,Se=function(){var Ae=ue.selectionStart,Xe=ue.selectionEnd,Fe=ue.value;if(Fe===void 0&&(Fe=""),Ae===Xe){var et=re(Fe,Ae);et!==Ae&&G(ue,et,Fe)}};Se(),requestAnimationFrame(function(){Se()}),p(pe),se(ue)},at=function(pe){pe.persist&&pe.persist();var ue=pe.target,Se=pe.currentTarget;A.current=ue,D.current.focusTimeout=setTimeout(function(){var Ae=ue.selectionStart,Xe=ue.selectionEnd,Fe=ue.value;Fe===void 0&&(Fe="");var et=re(Fe,Ae);et!==Ae&&!(Ae===0&&Xe===Fe.length)&&G(ue,et,Fe),h(Object.assign(Object.assign({},pe),{currentTarget:Se}))},0)},ze=function(pe){A.current=null,clearTimeout(D.current.focusTimeout),clearTimeout(D.current.setCaretTimeout),b(pe)},Kt=$&&xce()?"numeric":void 0,Xt=Object.assign({inputMode:Kt},S,{type:t,value:E,onChange:$e,onKeyDown:Ve,onMouseUp:Je,onFocus:at,onBlur:ze});if(r==="text")return o?Ft.default.createElement(Ft.default.Fragment,null,o(E,S)||null):Ft.default.createElement("span",Object.assign({},S,{ref:i}),E);if(n){var ao=n;return Ft.default.createElement(ao,Object.assign({},Xt,{ref:i}))}return Ft.default.createElement("input",Object.assign({},Xt,{ref:i}))}function hH(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o="");var i=t.suffix;i===void 0&&(i="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=$0(t),c=l.thousandSeparator,d=l.decimalSeparator,u=r!==0&&e.indexOf(".")!==-1||r&&n,f=XD(e,a),m=f.beforeDecimal,p=f.afterDecimal,h=f.addNegation;return r!==void 0&&(p=bH(p,r,!!n)),c&&(m=pce(m,c,s)),o&&(m=o+m),i&&(p=p+i),h&&(m="-"+m),e=m+(u&&d||"")+p,e}function $0(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Cce(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}function Pce(e,t){return new RegExp("(^-)|[0-9]|"+xH(e),t?"g":void 0)}function Dce(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Rce(e,t,r){var n;t===void 0&&(t=bce(e));var o=r.allowNegative,i=r.prefix;i===void 0&&(i="");var a=r.suffix;a===void 0&&(a="");var s=r.decimalScale,l=t.from,c=t.to,d=c.start,u=c.end,f=$0(r),m=f.allowedDecimalSeparators,p=f.decimalSeparator,h=e[u]===p;if(bv(e)&&(e===i||e===a)&&t.lastValue==="")return e;if(u-d===1&&m.indexOf(e[d])!==-1){var b=s===0?"":p;e=e.substring(0,d)+b+e.substring(d+1,e.length)}var v=function(A,D,N){var U=!1,G=!1;i.startsWith("-")?U=!1:A.startsWith("--")?(U=!1,G=!0):a.startsWith("-")&&A.length===a.length?U=!1:A[0]==="-"&&(U=!0);var re=U?1:0;return G&&(re=2),re&&(A=A.substring(re),D-=re,N-=re),{value:A,start:D,end:N,hasNegation:U}},x=v(e,d,u),_=x.hasNegation;n=x,e=n.value,d=n.start,u=n.end;var I=v(t.lastValue,l.start,l.end),S=I.start,w=I.end,P=I.value,E=e.substring(d,u);e.length&&P.length&&(S>P.length-a.length||w<i.length)&&!(E&&a.startsWith(E))&&(e=P);var B=0;e.startsWith(i)?B+=i.length:d<i.length&&(B=d),e=e.substring(B),u-=B;var H=e.length,Z=e.length-a.length;e.endsWith(a)?H=Z:(u>Z||u>e.length-a.length)&&(H=u),e=e.substring(0,H),e=Cce(_?"-"+e:e,o),e=(e.match(Pce(p,!0))||[]).join("");var K=e.indexOf(p);e=e.replace(new RegExp(xH(p),"g"),function(A,D){return D===K?".":""});var T=XD(e,o),k=T.beforeDecimal,$=T.afterDecimal,C=T.addNegation;return c.end-c.start<l.end-l.start&&k===""&&h&&!parseFloat($)&&(e=C?"-":""),e}function Ece(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";o.fill(!1,0,Math.min(r.length+(i?1:0),e.length));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}function Tce(e){var t=$0(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;o===void 0&&(o="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
52
+ Decimal separator can't be same as thousand separator.
53
+ thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
54
+ decimalSeparator: `+n+` (default value for decimalSeparator is .)
55
+ `);return o.startsWith("-")&&i&&(console.error(`
56
+ Prefix can't start with '-' when allowNegative is true.
57
+ prefix: `+o+`
58
+ allowNegative: `+i+`
59
+ `),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function $ce(e){e=Tce(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,n=e.thousandsGroupStyle,o=e.suffix,i=e.allowNegative,a=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=cc);var l=e.onBlur;l===void 0&&(l=cc);var c=e.thousandSeparator,d=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var m=e.defaultValue,p=e.value,h=e.valueIsNumericString,b=e.onValueChange,v=gH(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=$0(e),_=x.decimalSeparator,I=x.allowedDecimalSeparators,S=function(N){return hH(N,e)},w=function(N,U){return Rce(N,U,e)},P=dc(p)?m:p,E=h??Dce(P,f,o);dc(p)?dc(m)||(E=E||typeof m=="number"):E=E||typeof p=="number";var B=function(N){return vH(N)?N:(typeof N=="number"&&(N=yH(N)),E&&typeof d=="number"?mH(N,d,!!u):N)},H=IH(B(p),B(m),!!E,S,w,b),Z=H[0],K=Z.numAsString,T=Z.formattedValue,k=H[1],$=function(N){var U=N.target,G=N.key,re=U.selectionStart,he=U.selectionEnd,me=U.value;if(me===void 0&&(me=""),(G==="Backspace"||G==="Delete")&&he<f.length&&me!=="-"){N.preventDefault();return}if(re!==he){s(N);return}G==="Backspace"&&me[0]==="-"&&re===f.length+1&&i&&Xd(U,1),d&&u&&(G==="Backspace"&&me[re-1]===_?(Xd(U,re-1),N.preventDefault()):G==="Delete"&&me[re]===_&&N.preventDefault()),I?.includes(G)&&me[re]===_&&Xd(U,re+1);var Q=c===!0?",":c;G==="Backspace"&&me[re-1]===Q&&Xd(U,re-1),G==="Delete"&&me[re]===Q&&Xd(U,re+1),s(N)},C=function(N){var U=K;if(U.match(/\d/g)||(U=""),a||(U=hce(U)),u&&d&&(U=mH(U,d,u)),U!==K){var G=hH(U,e);k({formattedValue:G,value:U,floatValue:parseFloat(U)},{event:N,source:Om.event})}l(N)},A=function(N){return N===_?!0:bv(N)},D=function(N){var U=N.currentValue,G=N.lastValue,re=N.formattedValue,he=N.currentValueIndex,me=N.formattedValueIndex,Q=U[he],oe=re[me],Ie=_H(G,U),se=Ie.to,$e=function(Ve){return w(Ve).indexOf(".")+f.length};return p===0&&u&&d&&U[se.start]===_&&$e(U)<he&&$e(re)>me?!1:he>=se.start&&he<se.end&&I&&I.includes(Q)&&oe===_?!0:Q===oe};return Object.assign(Object.assign({},v),{value:T,valueIsNumericString:!1,isValidInputCharacter:A,isCharacterSame:D,onValueChange:k,format:S,removeFormatting:w,getCaretBoundary:function(N){return Ece(N,e)},onKeyDown:$,onBlur:C})}function wH(e){var t=$ce(e);return Ft.default.createElement(kce,Object.assign({},t))}var uc=y(O(),1),zm=y(R(),1);var QD=y(O(),1);function YD({direction:e,style:t,...r}){return(0,QD.jsx)("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:e==="up"?"rotate(180deg)":void 0,...t},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:(0,QD.jsx)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var A0={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};var Ace=/^(0\.0*|-0(\.0*)?)$/,Oce=/^-?0\d+(\.\d+)?\.?$/;function eR(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function JD(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||eR(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function zce(e){return e.toString().replace(".","").length}function Nce(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&zce(t)<14&&t!==""}function SH(e,t,r){if(e===void 0)return!0;let n=t===void 0||e>=t,o=r===void 0||e<=r;return n&&o}var Fce={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},Lce=(e,{size:t})=>({controls:{"--ni-chevron-size":ge(t,"ni-chevron-size")}});function Mce(e,t,r){let n=e.toString().replace(/^0+/,""),o=parseFloat(n);return Number.isNaN(o)?n:o>Number.MAX_SAFE_INTEGER?t!==void 0?String(t):n:Sl(o,r,t)}var Qd=M((e,t)=>{let r=z("NumberInput",Fce,e),{className:n,classNames:o,styles:i,unstyled:a,vars:s,onChange:l,onValueChange:c,value:d,defaultValue:u,max:f,min:m,step:p,hideControls:h,rightSection:b,isAllowed:v,clampBehavior:x,onBlur:_,allowDecimal:I,decimalScale:S,onKeyDown:w,onKeyDownCapture:P,handlersRef:E,startValue:B,disabled:H,rightSectionPointerEvents:Z,allowNegative:K,readOnly:T,size:k,rightSectionWidth:$,stepHoldInterval:C,stepHoldDelay:A,allowLeadingZeros:D,withKeyboardEvents:N,trimLeadingZeroesOnBlur:U,...G}=r,re=q({name:"NumberInput",classes:A0,props:r,classNames:o,styles:i,unstyled:a,vars:s,varsResolver:Lce}),{resolvedClassNames:he,resolvedStyles:me}=Vr({classNames:o,styles:i,props:r}),[Q,oe]=rt({value:d,defaultValue:u,finalValue:"",onChange:l}),Ie=A!==void 0&&C!==void 0,se=(0,zm.useRef)(null),$e=(0,zm.useRef)(null),Ve=(0,zm.useRef)(0),Je=(de,Re)=>{Re.source==="event"&&oe(Nce(de.floatValue,de.value)&&!Ace.test(de.value)&&!(D&&Oce.test(de.value))?de.floatValue:de.value),c?.(de,Re)},at=de=>{let Re=String(de).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Re?Math.max(0,(Re[1]?Re[1].length:0)-(Re[2]?+Re[2]:0)):0},ze=de=>{se.current&&typeof de<"u"&&se.current.setSelectionRange(de,de)},Kt=(0,zm.useRef)(id);Kt.current=()=>{if(!JD(Q))return;let de,Re=at(Q),xr=at(p),fn=Math.max(Re,xr),No=10**fn;if(!eR(Q)&&(typeof Q!="number"||Number.isNaN(Q)))de=Sl(B,m,f);else if(f!==void 0){let kr=(Math.round(Number(Q)*No)+Math.round(p*No))/No;de=kr<=f?kr:f}else de=(Math.round(Number(Q)*No)+Math.round(p*No))/No;let jt=de.toFixed(fn);oe(parseFloat(jt)),c?.({floatValue:parseFloat(jt),formattedValue:jt,value:jt},{source:"increment"}),setTimeout(()=>ze(se.current?.value.length),0)};let Xt=(0,zm.useRef)(id);Xt.current=()=>{if(!JD(Q))return;let de,Re=m!==void 0?m:K?Number.MIN_SAFE_INTEGER:0,xr=at(Q),fn=at(p),No=Math.max(xr,fn),jt=10**No;if(!eR(Q)&&typeof Q!="number"||Number.isNaN(Q))de=Sl(B,Re,f);else{let hs=(Math.round(Number(Q)*jt)-Math.round(p*jt))/jt;de=Re!==void 0&&hs<Re?Re:hs}let kr=de.toFixed(No);oe(parseFloat(kr)),c?.({floatValue:parseFloat(kr),formattedValue:kr,value:kr},{source:"decrement"}),setTimeout(()=>ze(se.current?.value.length),0)};let ao=de=>{w?.(de),!(T||!N)&&(de.key==="ArrowUp"&&(de.preventDefault(),Kt.current()),de.key==="ArrowDown"&&(de.preventDefault(),Xt.current()))},pe=de=>{if(P?.(de),de.key==="Backspace"){let Re=se.current;Re.selectionStart===0&&Re.selectionStart===Re.selectionEnd&&(de.preventDefault(),window.setTimeout(()=>ze(0),0))}},ue=de=>{let Re=Q;x==="blur"&&typeof Re=="number"&&(Re=Sl(Re,m,f)),U&&typeof Re=="string"&&at(Re)<15&&(Re=Mce(Re,f,m)),Q!==Re&&oe(Re),_?.(de)};cd(E,{increment:Kt.current,decrement:Xt.current});let Se=de=>{de?Kt.current():Xt.current(),Ve.current+=1},Ae=de=>{if(Se(de),Ie){let Re=typeof C=="number"?C:C(Ve.current);$e.current=window.setTimeout(()=>Ae(de),Re)}},Xe=(de,Re)=>{de.preventDefault(),se.current?.focus(),Se(Re),Ie&&($e.current=window.setTimeout(()=>Ae(Re),A))},Fe=()=>{$e.current&&window.clearTimeout($e.current),$e.current=null,Ve.current=0},et=(0,uc.jsxs)("div",{...re("controls"),children:[(0,uc.jsx)(xt,{...re("control"),tabIndex:-1,"aria-hidden":!0,disabled:H||typeof Q=="number"&&f!==void 0&&Q>=f,mod:{direction:"up"},onMouseDown:de=>de.preventDefault(),onPointerDown:de=>{Xe(de,!0)},onPointerUp:Fe,onPointerLeave:Fe,children:(0,uc.jsx)(YD,{direction:"up"})}),(0,uc.jsx)(xt,{...re("control"),tabIndex:-1,"aria-hidden":!0,disabled:H||typeof Q=="number"&&m!==void 0&&Q<=m,mod:{direction:"down"},onMouseDown:de=>de.preventDefault(),onPointerDown:de=>{Xe(de,!1)},onPointerUp:Fe,onPointerLeave:Fe,children:(0,uc.jsx)(YD,{direction:"down"})})]});return(0,uc.jsx)(Yt,{component:wH,allowNegative:K,className:Ze(A0.root,n),size:k,...G,readOnly:T,disabled:H,value:Q,getInputRef:He(t,se),onValueChange:Je,rightSection:h||T||!JD(Q)?b:b||et,classNames:he,styles:me,unstyled:a,__staticSelector:"NumberInput",decimalScale:I?S:0,onKeyDown:ao,onKeyDownCapture:pe,rightSectionPointerEvents:Z??(H?"none":void 0),rightSectionWidth:$??`var(--ni-right-section-width-${k||"sm"})`,allowLeadingZeros:D,onBlur:ue,isAllowed:de=>x==="strict"?v?v(de)&&SH(de.floatValue,m,f):SH(de.floatValue,m,f):v?v(de):!0})});Qd.classes={...Yt.classes,...A0};Qd.displayName="@mantine/core/NumberInput";var Nm=y(O(),1);var dQe=y(R(),1);var tR=y(O(),1),kH=({reveal:e})=>(0,tR.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:(0,tR.jsx)("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var O0={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};var Bce={visibilityToggleIcon:kH},jce=(e,{size:t})=>({root:{"--psi-icon-size":ge(t,"psi-icon-size"),"--psi-button-size":ge(t,"psi-button-size")}}),Yd=M((e,t)=>{let r=z("PasswordInput",Bce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,required:c,error:d,leftSection:u,disabled:f,id:m,variant:p,inputContainer:h,description:b,label:v,size:x,errorProps:_,descriptionProps:I,labelProps:S,withAsterisk:w,inputWrapperOrder:P,wrapperProps:E,radius:B,rightSection:H,rightSectionWidth:Z,rightSectionPointerEvents:K,leftSectionWidth:T,visible:k,defaultVisible:$,onVisibilityChange:C,visibilityToggleIcon:A,visibilityToggleButtonProps:D,rightSectionProps:N,leftSectionProps:U,leftSectionPointerEvents:G,withErrorStyles:re,mod:he,...me}=r,Q=pt(m),[oe,Ie]=rt({value:k,defaultValue:$,finalValue:!1,onChange:C}),se=()=>Ie(!oe),$e=q({name:"PasswordInput",classes:O0,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:jce}),{resolvedClassNames:Ve,resolvedStyles:Je}=Vr({classNames:n,styles:a,props:r}),{styleProps:at,rest:ze}=Hr(me),Kt=A,Xt=_?.id||`${Q}-error`,ao=I?.id||`${Q}-description`,Se=`${!!d&&typeof d!="boolean"?Xt:""} ${!!b?ao:""}`,Ae=Se.trim().length>0?Se.trim():void 0,Xe=(0,Nm.jsx)(bt,{...$e("visibilityToggle"),disabled:f,radius:B,"aria-hidden":!D,tabIndex:-1,...D,variant:D?.variant??"subtle",color:"gray",unstyled:s,onTouchEnd:Fe=>{Fe.preventDefault(),D?.onTouchEnd?.(Fe),se()},onMouseDown:Fe=>{Fe.preventDefault(),D?.onMouseDown?.(Fe),se()},onKeyDown:Fe=>{D?.onKeyDown?.(Fe),Fe.key===" "&&(Fe.preventDefault(),se())},children:(0,Nm.jsx)(Kt,{reveal:oe})});return(0,Nm.jsx)(ct.Wrapper,{required:c,id:Q,label:v,error:d,description:b,size:x,classNames:Ve,styles:Je,__staticSelector:"PasswordInput",unstyled:s,withAsterisk:w,inputWrapperOrder:P,inputContainer:h,variant:p,labelProps:{...S,htmlFor:Q},descriptionProps:{...I,id:ao},errorProps:{..._,id:Xt},mod:he,...$e("root"),...at,...E,children:(0,Nm.jsx)(ct,{component:"div",error:d,leftSection:u,size:x,classNames:{...Ve,input:Ze(O0.input,Ve.input)},styles:Je,radius:B,disabled:f,__staticSelector:"PasswordInput",rightSectionWidth:Z,rightSection:H??Xe,variant:p,unstyled:s,leftSectionWidth:T,rightSectionPointerEvents:K||"all",rightSectionProps:N,leftSectionProps:U,leftSectionPointerEvents:G,withAria:!1,withErrorStyles:re,children:(0,Nm.jsx)("input",{required:c,"data-invalid":!!d||void 0,"data-with-left-section":!!u||void 0,...$e("innerInput"),disabled:f,id:Q,ref:t,...ze,"aria-describedby":Ae,autoComplete:ze.autoComplete||"off",type:oe?"text":"password"})})})});Yd.classes={...Yt.classes,...O0};Yd.displayName="@mantine/core/PasswordInput";var oR=y(O(),1),iYe=y(R(),1);var PH=y(O(),1),RQe=y(R(),1);var wQe=y(R(),1);var kQe=y(O(),1);var[CH,z0]=Vt("Progress.Root component was not found in tree");var Us={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd",label:"m_91e40b74"};var Uce={},N0=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ProgressLabel",Uce,e),l=z0();return(0,PH.jsx)(F,{ref:t,...l.getStyles("label",{className:n,style:o,classNames:r,styles:i}),...s})});N0.classes=Us;N0.displayName="@mantine/core/ProgressLabel";var rR=y(O(),1),FQe=y(R(),1);var Vce={},Hce=(e,{size:t,radius:r,transitionDuration:n})=>({root:{"--progress-size":ge(t,"progress-size"),"--progress-radius":r===void 0?void 0:Ee(r),"--progress-transition-duration":typeof n=="number"?`${n}ms`:void 0}}),yv=M((e,t)=>{let r=z("ProgressRoot",Vce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,autoContrast:c,transitionDuration:d,...u}=r,f=q({name:"Progress",classes:Us,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Hce});return(0,rR.jsx)(CH,{value:{getStyles:f,autoContrast:c},children:(0,rR.jsx)(F,{ref:t,...f("root"),...u})})});yv.classes=Us;yv.displayName="@mantine/core/ProgressRoot";var DH=y(O(),1),GQe=y(R(),1);var Wce={withAria:!0},_v=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,value:s,withAria:l,color:c,striped:d,animated:u,mod:f,...m}=z("ProgressSection",Wce,e),p=z0(),h=lt(),b=l?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,"aria-valuetext":`${s}%`}:{};return(0,DH.jsx)(F,{ref:t,...p.getStyles("section",{className:n,classNames:r,styles:i,style:o}),...m,...b,mod:[{striped:d||u,animated:u},f],__vars:{"--progress-section-width":`${s}%`,"--progress-section-color":Be(c,h),"--progress-label-color":va(p.autoContrast,h)?Nn({color:c,theme:h,autoContrast:p.autoContrast}):void 0}})});_v.classes=Us;_v.displayName="@mantine/core/ProgressSection";var Zce={},fc=M((e,t)=>{let r=z("Progress",Zce,e),{value:n,classNames:o,styles:i,vars:a,color:s,striped:l,animated:c,"aria-label":d,...u}=r,{resolvedClassNames:f,resolvedStyles:m}=Vr({classNames:o,styles:i,props:r});return(0,oR.jsx)(yv,{ref:t,classNames:f,styles:m,vars:a,...u,children:(0,oR.jsx)(_v,{value:n,color:s,striped:l,animated:c,"aria-label":d})})});fc.classes=Us;fc.displayName="@mantine/core/Progress";fc.Section=_v;fc.Root=yv;fc.Label=N0;var Fm=y(O(),1);var hJe=y(R(),1);var iR=y(O(),1),CYe=y(R(),1);var hYe=y(R(),1),gYe=y(O(),1);var[RH,F0]=_o();var yYe=y(R(),1),_Ye=y(O(),1);var[EH,TH]=_o();var nR={card:"m_9dc8ae12"};var Gce={withBorder:!0},qce=(e,{radius:t})=>({card:{"--card-radius":Ee(t)}}),L0=M((e,t)=>{let r=z("RadioCard",Gce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,checked:c,mod:d,withBorder:u,value:f,onClick:m,name:p,onKeyDown:h,...b}=r,v=q({name:"RadioCard",classes:nR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:qce,rootSelector:"card"}),{dir:x}=ei(),_=F0(),I=typeof c=="boolean"?c:_?.value===f||!1,S=p||_?.name,w=P=>{if(h?.(P),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(P.nativeEvent.code)){P.preventDefault();let E=Array.from(document.querySelectorAll(`[role="radio"][name="${S||"__mantine"}"]`)),B=E.findIndex(K=>K===P.target),H=B+1>=E.length?0:B+1,Z=B-1<0?E.length-1:B-1;P.nativeEvent.code==="ArrowDown"&&(E[H].focus(),E[H].click()),P.nativeEvent.code==="ArrowUp"&&(E[Z].focus(),E[Z].click()),P.nativeEvent.code==="ArrowLeft"&&(E[x==="ltr"?Z:H].focus(),E[x==="ltr"?Z:H].click()),P.nativeEvent.code==="ArrowRight"&&(E[x==="ltr"?H:Z].focus(),E[x==="ltr"?H:Z].click())}};return(0,iR.jsx)(EH,{value:{checked:I},children:(0,iR.jsx)(xt,{ref:t,mod:[{"with-border":u,checked:I},d],...v("card"),...b,role:"radio","aria-checked":I,name:S,onClick:P=>{m?.(P),_?.onChange(f||"")},onKeyDown:w})})});L0.displayName="@mantine/core/RadioCard";L0.classes=nR;var M0=y(O(),1);var MYe=y(R(),1);var Kce={},B0=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,name:l,readOnly:c,...d}=z("RadioGroup",Kce,e),u=pt(l),[f,m]=rt({value:r,defaultValue:n,finalValue:"",onChange:o});return(0,M0.jsx)(RH,{value:{value:f,onChange:h=>!c&&m(typeof h=="string"?h:h.currentTarget.value),size:i,name:u},children:(0,M0.jsx)(ct.Wrapper,{size:i,ref:t,...a,...d,labelElement:"div",__staticSelector:"RadioGroup",children:(0,M0.jsx)(wm,{role:"radiogroup",children:s})})})});B0.classes=ct.Wrapper.classes;B0.displayName="@mantine/core/RadioGroup";var aR=y(O(),1);var qYe=y(R(),1);function j0({size:e,style:t,...r}){return(0,aR.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:W(e),height:W(e),...t},"aria-hidden":!0,...r,children:(0,aR.jsx)("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var lR=y(O(),1),YYe=y(R(),1);var sR={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};var Xce={icon:j0},Qce=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=yr({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--radio-size":ge(n,"radio-size"),"--radio-radius":t===void 0?void 0:Ee(t),"--radio-color":i==="outline"?l:Be(r,e),"--radio-icon-size":ge(n,"radio-icon-size"),"--radio-icon-color":o?Be(o,e):va(a,e)?Nn({color:r,theme:e,autoContrast:a}):void 0}}},U0=M((e,t)=>{let r=z("RadioIndicator",Xce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,icon:c,radius:d,color:u,iconColor:f,autoContrast:m,checked:p,mod:h,variant:b,disabled:v,...x}=r,_=c,I=q({name:"RadioIndicator",classes:sR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Qce,rootSelector:"indicator"}),S=TH(),w=typeof p=="boolean"?p:S?.checked||!1;return(0,lR.jsx)(F,{ref:t,...I("indicator",{variant:b}),variant:b,mod:[{checked:w,disabled:v},h],...x,children:(0,lR.jsx)(_,{...I("icon")})})});U0.displayName="@mantine/core/RadioIndicator";U0.classes=sR;var cR={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};var Yce={labelPosition:"right"},Jce=(e,{size:t,radius:r,color:n,iconColor:o,variant:i,autoContrast:a})=>{let s=yr({color:n||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--radio-size":ge(t,"radio-size"),"--radio-radius":r===void 0?void 0:Ee(r),"--radio-color":i==="outline"?l:Be(n,e),"--radio-icon-color":o?Be(o,e):va(a,e)?Nn({color:n,theme:e,autoContrast:a}):void 0,"--radio-icon-size":ge(t,"radio-icon-size")}}},Vs=M((e,t)=>{let r=z("Radio",Yce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,id:c,size:d,label:u,labelPosition:f,description:m,error:p,radius:h,color:b,variant:v,disabled:x,wrapperProps:_,icon:I=j0,rootRef:S,iconColor:w,onChange:P,mod:E,...B}=r,H=q({name:"Radio",classes:cR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Jce}),Z=F0(),K=Z?.size??d,T=r.size?d:K,{styleProps:k,rest:$}=Hr(B),C=pt(c),A=Z?{checked:Z.value===$.value,name:$.name??Z.name,onChange:D=>{Z.onChange(D),P?.(D)}}:{};return(0,Fm.jsx)(Zd,{...H("root"),__staticSelector:"Radio",__stylesApiProps:r,id:C,size:T,labelPosition:f,label:u,description:m,error:p,disabled:x,classNames:n,styles:a,unstyled:s,"data-checked":A.checked||void 0,variant:v,ref:S,mod:E,...k,..._,children:(0,Fm.jsxs)(F,{...H("inner"),mod:{"label-position":f},children:[(0,Fm.jsx)(F,{...H("radio",{focusable:!0,variant:v}),onChange:P,...$,...A,component:"input",mod:{error:!!p},ref:t,id:C,disabled:x,type:"radio"}),(0,Fm.jsx)(I,{...H("icon"),"aria-hidden":!0})]})})});Vs.classes=cR;Vs.displayName="@mantine/core/Radio";Vs.Group=B0;Vs.Card=L0;Vs.Indicator=U0;var Hs=y(O(),1),G0=y(R(),1);var ede={duration:100,transition:"fade"};function $H(e,t){return{...ede,...t,...e}}var Jd=y(O(),1),OH=y(R(),1);var mc=y(R(),1);function AH({offset:e,position:t,defaultOpened:r}){let[n,o]=(0,mc.useState)(r),i=(0,mc.useRef)(null),{x:a,y:s,elements:l,refs:c,update:d,placement:u}=sm({placement:t,middleware:[Nd({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=u.includes("right")?e:t.includes("left")?e*-1:0,m=u.includes("bottom")?e:t.includes("top")?e*-1:0,p=(0,mc.useCallback)(({clientX:h,clientY:b})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:h,y:b,left:h+f,top:b+m,right:h,bottom:b}}})},[l.reference]);return(0,mc.useEffect)(()=>{if(c.floating.current){let h=i.current;h.addEventListener("mousemove",p);let b=Vo(c.floating.current);return b.forEach(v=>{v.addEventListener("scroll",d)}),()=>{h.removeEventListener("mousemove",p),b.forEach(v=>{v.removeEventListener("scroll",d)})}}},[l.reference,c.floating.current,d,p,n]),{handleMouseMove:p,x:a,y:s,opened:n,setOpened:o,boundaryRef:i,floating:c.setFloating}}var Lm={tooltip:"m_1b3c8819",arrow:"m_f898399f"};var tde={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:Pt("popover")},rde=(e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Ee(t),"--tooltip-bg":r?Be(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),V0=M((e,t)=>{let r=z("TooltipFloating",tde,e),{children:n,refProp:o,withinPortal:i,style:a,className:s,classNames:l,styles:c,unstyled:d,radius:u,color:f,label:m,offset:p,position:h,multiline:b,zIndex:v,disabled:x,defaultOpened:_,variant:I,vars:S,portalProps:w,...P}=r,E=lt(),B=q({name:"TooltipFloating",props:r,classes:Lm,className:s,style:a,classNames:l,styles:c,unstyled:d,rootSelector:"tooltip",vars:S,varsResolver:rde}),{handleMouseMove:H,x:Z,y:K,opened:T,boundaryRef:k,floating:$,setOpened:C}=AH({offset:p,position:h,defaultOpened:_});if(!yo(n))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");let A=He(k,Cl(n),t),D=n.props,N=G=>{D.onMouseEnter?.(G),H(G),C(!0)},U=G=>{D.onMouseLeave?.(G),C(!1)};return(0,Jd.jsxs)(Jd.Fragment,{children:[(0,Jd.jsx)(_n,{...w,withinPortal:i,children:(0,Jd.jsx)(F,{...P,...B("tooltip",{style:{...Hh(a,E),zIndex:v,display:!x&&T?"block":"none",top:(K&&Math.round(K))??"",left:(Z&&Math.round(Z))??""}}),variant:I,ref:$,mod:{multiline:b},children:m})}),(0,OH.cloneElement)(n,{...D,[o]:A,onMouseEnter:N,onMouseLeave:U})]})});V0.classes=Lm;V0.displayName="@mantine/core/TooltipFloating";var dR=y(O(),1);var net=y(R(),1);var H0=y(R(),1),zH=(0,H0.createContext)(!1),NH=zH.Provider,FH=()=>(0,H0.useContext)(zH);var ode={openDelay:0,closeDelay:0};function W0(e){let{openDelay:t,closeDelay:r,children:n}=z("TooltipGroup",ode,e);return(0,dR.jsx)(NH,{value:!0,children:(0,dR.jsx)(N9,{delay:{open:t,close:r},children:n})})}W0.displayName="@mantine/core/TooltipGroup";W0.extend=e=>e;var Z0=y(R(),1);function nde(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function ide(e){let t=nde(e.middlewares),r=[im(e.offset)];return t.shift&&r.push(Nd(typeof t.shift=="boolean"?{padding:8}:{padding:8,...t.shift})),t.flip&&r.push(typeof t.flip=="boolean"?Fd():Fd(t.flip)),r.push(Hg({element:e.arrowRef,padding:e.arrowOffset})),t.inline?r.push(typeof t.inline=="boolean"?Jl():Jl(t.inline)):e.inline&&r.push(Jl()),r}function LH(e){let[t,r]=(0,Z0.useState)(e.defaultOpened),o=typeof e.opened=="boolean"?e.opened:t,i=FH(),a=pt(),s=(0,Z0.useCallback)(w=>{r(w),w&&x(a)},[a]),{x:l,y:c,context:d,refs:u,update:f,placement:m,middlewareData:{arrow:{x:p,y:h}={}}}=sm({strategy:e.strategy,placement:e.position,open:o,onOpenChange:s,middleware:ide(e)}),{delay:b,currentId:v,setCurrentId:x}=F9(d,{id:a}),{getReferenceProps:_,getFloatingProps:I}=B9([O9(d,{enabled:e.events?.hover,delay:i?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),M9(d,{enabled:e.events?.focus,visibleOnly:!0}),j9(d,{role:"tooltip"}),L9(d,{enabled:typeof e.opened>"u"})]);$I({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:u,update:f}}),br(()=>{e.onPositionChange?.(m)},[m]);let S=o&&v&&v!==a;return{x:l,y:c,arrowX:p,arrowY:h,reference:u.setReference,floating:u.setFloating,getFloatingProps:I,getReferenceProps:_,isGroupPhase:S,opened:o,placement:m}}var MH={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Pt("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},ade=(e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Ee(t),"--tooltip-bg":r?Be(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),kt=M((e,t)=>{let r=z("Tooltip",MH,e),{children:n,position:o,refProp:i,label:a,openDelay:s,closeDelay:l,onPositionChange:c,opened:d,defaultOpened:u,withinPortal:f,radius:m,color:p,classNames:h,styles:b,unstyled:v,style:x,className:_,withArrow:I,arrowSize:S,arrowOffset:w,arrowRadius:P,arrowPosition:E,offset:B,transitionProps:H,multiline:Z,events:K,zIndex:T,disabled:k,positionDependencies:$,onClick:C,onMouseEnter:A,onMouseLeave:D,inline:N,variant:U,keepMounted:G,vars:re,portalProps:he,mod:me,floatingStrategy:Q,middlewares:oe,...Ie}=z("Tooltip",MH,r),{dir:se}=ei(),$e=(0,G0.useRef)(null),Ve=LH({position:kI(se,o),closeDelay:l,openDelay:s,onPositionChange:c,opened:d,defaultOpened:u,events:K,arrowRef:$e,arrowOffset:w,offset:typeof B=="number"?B+(I?S/2:0):B,positionDependencies:[...$,n],inline:N,strategy:Q,middlewares:oe}),Je=q({name:"Tooltip",props:r,classes:Lm,className:_,style:x,classNames:h,styles:b,unstyled:v,rootSelector:"tooltip",vars:re,varsResolver:ade});if(!yo(n))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");let at=He(Ve.reference,Cl(n),t),ze=$H(H,{duration:100,transition:"fade"}),Kt=n.props;return(0,Hs.jsxs)(Hs.Fragment,{children:[(0,Hs.jsx)(_n,{...he,withinPortal:f,children:(0,Hs.jsx)(Ho,{...ze,keepMounted:G,mounted:!k&&!!Ve.opened,duration:Ve.isGroupPhase?10:ze.duration,children:Xt=>(0,Hs.jsxs)(F,{...Ie,"data-fixed":Q==="fixed"||void 0,variant:U,mod:[{multiline:Z},me],...Ve.getFloatingProps({ref:Ve.floating,className:Je("tooltip").className,style:{...Je("tooltip").style,...Xt,zIndex:T,top:Ve.y??0,left:Ve.x??0}}),children:[a,(0,Hs.jsx)(Gg,{ref:$e,arrowX:Ve.arrowX,arrowY:Ve.arrowY,visible:I,position:Ve.placement,arrowSize:S,arrowOffset:w,arrowRadius:P,arrowPosition:E,...Je("arrow")})]})})}),(0,G0.cloneElement)(n,Ve.getReferenceProps({onClick:C,onMouseEnter:A,onMouseLeave:D,onMouseMove:r.onMouseMove,onPointerDown:r.onPointerDown,onPointerEnter:r.onPointerEnter,className:Ze(_,Kt.className),...Kt,[i]:at}))]})});kt.classes=Lm;kt.displayName="@mantine/core/Tooltip";kt.Floating=V0;kt.Group=W0;var Iv=y(O(),1),pc=y(R(),1);var uR={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};var sde={withItemsBorders:!0},lde=(e,{radius:t,color:r,transitionDuration:n,size:o,transitionTimingFunction:i})=>({root:{"--sc-radius":t===void 0?void 0:Ee(t),"--sc-color":r?Be(r,e):void 0,"--sc-shadow":r?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":n===void 0?void 0:`${n}ms`,"--sc-transition-timing-function":i,"--sc-padding":ge(o,"sc-padding"),"--sc-font-size":wt(o)}}),eu=M((e,t)=>{let r=z("SegmentedControl",sde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,data:c,value:d,defaultValue:u,onChange:f,size:m,name:p,disabled:h,readOnly:b,fullWidth:v,orientation:x,radius:_,color:I,transitionDuration:S,transitionTimingFunction:w,variant:P,autoContrast:E,withItemsBorders:B,mod:H,...Z}=r,K=q({name:"SegmentedControl",props:r,classes:uR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:lde}),T=lt(),k=c.map(se=>typeof se=="string"?{label:se,value:se}:se),$=_2(),[C,A]=(0,pc.useState)(Io()),[D,N]=(0,pc.useState)(null),[U,G]=(0,pc.useState)({}),re=(se,$e)=>{U[$e]=se,G(U)},[he,me]=rt({value:d,defaultValue:u,finalValue:Array.isArray(c)?k.find(se=>!se.disabled)?.value??c[0]?.value??null:null,onChange:f}),Q=pt(p),oe=k.map(se=>(0,pc.createElement)(F,{...K("control"),mod:{active:he===se.value,orientation:x},key:se.value},(0,pc.createElement)("input",{...K("input"),disabled:h||se.disabled,type:"radio",name:Q,value:se.value,id:`${Q}-${se.value}`,checked:he===se.value,onChange:()=>!b&&me(se.value),"data-focus-ring":T.focusRing,key:`${se.value}-input`}),(0,pc.createElement)(F,{component:"label",...K("label"),mod:{active:he===se.value&&!(h||se.disabled),disabled:h||se.disabled,"read-only":b},htmlFor:`${Q}-${se.value}`,ref:$e=>re($e,se.value),__vars:{"--sc-label-color":I!==void 0?Nn({color:I,theme:T,autoContrast:E}):void 0},key:`${se.value}-label`},(0,Iv.jsx)("span",{...K("innerLabel"),children:se.label})))),Ie=He(t,se=>N(se));return h2(()=>{A(Io())},[c.length]),c.length===0?null:(0,Iv.jsxs)(F,{...K("root"),variant:P,size:m,ref:Ie,mod:[{"full-width":v,orientation:x,initialized:$,"with-items-borders":B},H],...Z,role:"radiogroup","data-disabled":h,children:[typeof he=="string"&&(0,Iv.jsx)(jI,{target:U[he],parent:D,component:"span",transitionDuration:"var(--sc-transition-duration)",...K("indicator")},C),oe]})});eu.classes=uR;eu.displayName="@mantine/core/SegmentedControl";var gi=y(O(),1),tu=y(R(),1);var cde={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Ws=M((e,t)=>{let r=z("Select",cde,e),{classNames:n,styles:o,unstyled:i,vars:a,dropdownOpened:s,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:d,onFocus:u,onBlur:f,onClick:m,onChange:p,data:h,value:b,defaultValue:v,selectFirstOptionOnChange:x,onOptionSubmit:_,comboboxProps:I,readOnly:S,disabled:w,filter:P,limit:E,withScrollArea:B,maxDropdownHeight:H,size:Z,searchable:K,rightSection:T,checkIconPosition:k,withCheckIcon:$,nothingFoundMessage:C,name:A,form:D,searchValue:N,defaultSearchValue:U,onSearchChange:G,allowDeselect:re,error:he,rightSectionPointerEvents:me,id:Q,clearable:oe,clearButtonProps:Ie,hiddenInputProps:se,renderOption:$e,onClear:Ve,autoComplete:Je,scrollAreaProps:at,__defaultRightSection:ze,__clearSection:Kt,__clearable:Xt,chevronColor:ao,...pe}=r,ue=(0,tu.useMemo)(()=>_m(h),[h]),Se=(0,tu.useMemo)(()=>Wd(ue),[ue]),Ae=pt(Q),[Xe,Fe,et]=rt({value:b,defaultValue:v,finalValue:null,onChange:p}),de=typeof Xe=="string"?Se[Xe]:void 0,Re=b2(de),[xr,fn,No]=rt({value:N,defaultValue:U,finalValue:de?de.label:"",onChange:G}),jt=ic({opened:s,defaultOpened:l,onDropdownOpen:()=>{d?.(),jt.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),jt.resetSelectedOption()}}),kr=Cr=>{fn(Cr),jt.resetSelectedOption()},{resolvedClassNames:hs,resolvedStyles:of}=Vr({props:r,styles:o,classNames:n});(0,tu.useEffect)(()=>{x&&jt.selectFirstOption()},[x,xr]),(0,tu.useEffect)(()=>{b===null&&kr(""),typeof b=="string"&&de&&(Re?.value!==de.value||Re?.label!==de.label)&&kr(de.label)},[b,de]),(0,tu.useEffect)(()=>{!et&&!No&&kr(typeof Xe=="string"&&Se[Xe]?.label||"")},[h,Xe]);let nf=(0,gi.jsx)(je.ClearButton,{...Ie,onClear:()=>{Fe(null,null),kr(""),Ve?.()}}),af=oe&&!!Xe&&!w&&!S;return(0,gi.jsxs)(gi.Fragment,{children:[(0,gi.jsxs)(je,{store:jt,__staticSelector:"Select",classNames:hs,styles:of,unstyled:i,readOnly:S,onOptionSubmit:Cr=>{_?.(Cr);let yl=re&&Se[Cr].value===Xe?null:Se[Cr],_l=yl?yl.value:null;_l!==Xe&&Fe(_l,yl),!et&&kr(typeof _l=="string"&&yl?.label||""),jt.closeDropdown()},size:Z,...I,children:[(0,gi.jsx)(je.Target,{targetType:K?"input":"button",autoComplete:Je,children:(0,gi.jsx)(Yt,{id:Ae,ref:t,__defaultRightSection:(0,gi.jsx)(je.Chevron,{size:Z,error:he,unstyled:i,color:ao}),__clearSection:nf,__clearable:af,rightSection:T,rightSectionPointerEvents:me||(af?"all":"none"),...pe,size:Z,__staticSelector:"Select",disabled:w,readOnly:S||!K,value:xr,onChange:Cr=>{kr(Cr.currentTarget.value),jt.openDropdown(),x&&jt.selectFirstOption()},onFocus:Cr=>{K&&jt.openDropdown(),u?.(Cr)},onBlur:Cr=>{K&&jt.closeDropdown(),kr(Xe!=null&&Se[Xe]?.label||""),f?.(Cr)},onClick:Cr=>{K?jt.openDropdown():jt.toggleDropdown(),m?.(Cr)},classNames:hs,styles:of,unstyled:i,pointer:!K,error:he})}),(0,gi.jsx)(Cm,{data:ue,hidden:S||w,filter:P,search:xr,limit:E,hiddenWhenEmpty:!C,withScrollArea:B,maxDropdownHeight:H,filterOptions:K&&de?.label!==xr,value:Xe,checkIconPosition:k,withCheckIcon:$,nothingFoundMessage:C,unstyled:i,labelId:pe.label?`${Ae}-label`:void 0,"aria-label":pe.label?void 0:pe["aria-label"],renderOption:$e,scrollAreaProps:at})]}),(0,gi.jsx)(je.HiddenInput,{value:Xe,name:A,form:D,disabled:w,...se})]})});Ws.classes={...Yt.classes,...je.classes};Ws.displayName="@mantine/core/Select";var vi=y(O(),1),Itt=y(R(),1);var mR=y(O(),1);var mtt=y(R(),1);function BH({spacing:e,verticalSpacing:t,cols:r,selector:n}){let o=lt(),i=t===void 0?e:t,a=vs({"--sg-spacing-x":Tt(ad(e)),"--sg-spacing-y":Tt(ad(i)),"--sg-cols":ad(r)?.toString()}),s=ut(o.breakpoints).reduce((d,u)=>(d[u]||(d[u]={}),typeof e=="object"&&e[u]!==void 0&&(d[u]["--sg-spacing-x"]=Tt(e[u])),typeof i=="object"&&i[u]!==void 0&&(d[u]["--sg-spacing-y"]=Tt(i[u])),typeof r=="object"&&r[u]!==void 0&&(d[u]["--sg-cols"]=r[u]),d),{}),c=Th(ut(s),o.breakpoints).filter(d=>ut(s[d.value]).length>0).map(d=>({query:`(min-width: ${o.breakpoints[d.value]})`,styles:s[d.value]}));return(0,mR.jsx)(hd,{styles:a,media:c,selector:n})}function fR(e){return typeof e=="object"&&e!==null?ut(e):[]}function dde(e){return e.sort((t,r)=>wl(t)-wl(r))}function ude({spacing:e,verticalSpacing:t,cols:r}){let n=Array.from(new Set([...fR(e),...fR(t),...fR(r)]));return dde(n)}function jH({spacing:e,verticalSpacing:t,cols:r,selector:n}){let o=t===void 0?e:t,i=vs({"--sg-spacing-x":Tt(ad(e)),"--sg-spacing-y":Tt(ad(o)),"--sg-cols":ad(r)?.toString()}),a=ude({spacing:e,verticalSpacing:t,cols:r}),s=a.reduce((c,d)=>(c[d]||(c[d]={}),typeof e=="object"&&e[d]!==void 0&&(c[d]["--sg-spacing-x"]=Tt(e[d])),typeof o=="object"&&o[d]!==void 0&&(c[d]["--sg-spacing-y"]=Tt(o[d])),typeof r=="object"&&r[d]!==void 0&&(c[d]["--sg-cols"]=r[d]),c),{}),l=a.map(c=>({query:`simple-grid (min-width: ${c})`,styles:s[c]}));return(0,mR.jsx)(hd,{styles:i,container:l,selector:n})}var pR={container:"m_925c2d2c",root:"m_2415a157"};var fde={cols:1,spacing:"md",type:"media"},Mm=M((e,t)=>{let r=z("SimpleGrid",fde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,cols:c,verticalSpacing:d,spacing:u,type:f,...m}=r,p=q({name:"SimpleGrid",classes:pR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l}),h=Ry();return f==="container"?(0,vi.jsxs)(vi.Fragment,{children:[(0,vi.jsx)(jH,{...r,selector:`.${h}`}),(0,vi.jsx)("div",{...p("container"),children:(0,vi.jsx)(F,{ref:t,...p("root",{className:h}),...m})})]}):(0,vi.jsxs)(vi.Fragment,{children:[(0,vi.jsx)(BH,{...r,selector:`.${h}`}),(0,vi.jsx)(F,{ref:t,...p("root",{className:h}),...m})]})});Mm.classes=pR;Mm.displayName="@mantine/core/SimpleGrid";var UH=y(O(),1);var Ott=y(R(),1);var hR={root:"m_18320242","skeleton-fade":"m_299c329c"};var mde={visible:!0,animate:!0},pde=(e,{width:t,height:r,radius:n,circle:o})=>({root:{"--skeleton-height":W(r),"--skeleton-width":o?W(r):W(t),"--skeleton-radius":o?"1000px":n===void 0?void 0:Ee(n)}}),Sn=M((e,t)=>{let r=z("Skeleton",mde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,width:c,height:d,circle:u,visible:f,radius:m,animate:p,mod:h,...b}=r,v=q({name:"Skeleton",classes:hR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:pde});return(0,UH.jsx)(F,{ref:t,...v("root"),mod:[{visible:f,animate:p},h],...b})});Sn.classes=hR;Sn.displayName="@mantine/core/Skeleton";var VH=y(O(),1),Htt=y(R(),1);var gR={root:"m_6d731127"};var hde={gap:"md",align:"stretch",justify:"flex-start"},gde=(e,{gap:t,align:r,justify:n})=>({root:{"--stack-gap":Tt(t),"--stack-align":r,"--stack-justify":n}}),Ue=M((e,t)=>{let r=z("Stack",hde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,align:c,justify:d,gap:u,variant:f,...m}=r,p=q({name:"Stack",props:r,classes:gR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:gde});return(0,VH.jsx)(F,{ref:t,...p("root"),variant:f,...m})});Ue.classes=gR;Ue.displayName="@mantine/core/Stack";var ru=y(O(),1);var urt=y(R(),1);var q0=y(R(),1),HH=(0,q0.createContext)(null),WH=HH.Provider,ZH=()=>(0,q0.useContext)(HH);var K0=y(O(),1);var trt=y(R(),1);var vde={},X0=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,readOnly:l,...c}=z("SwitchGroup",vde,e),[d,u]=rt({value:r,defaultValue:n,finalValue:[],onChange:o});return(0,K0.jsx)(WH,{value:{value:d,onChange:m=>{let p=m.currentTarget.value;!l&&u(d.includes(p)?d.filter(h=>h!==p):[...d,p])},size:i},children:(0,K0.jsx)(ct.Wrapper,{size:i,ref:t,...a,...c,labelElement:"div",__staticSelector:"SwitchGroup",children:(0,K0.jsx)(wm,{role:"group",children:s})})})});X0.classes=ct.Wrapper.classes;X0.displayName="@mantine/core/SwitchGroup";var vR={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};var xde={labelPosition:"right"},bde=(e,{radius:t,color:r,size:n})=>({root:{"--switch-radius":t===void 0?void 0:Ee(t),"--switch-height":ge(n,"switch-height"),"--switch-width":ge(n,"switch-width"),"--switch-thumb-size":ge(n,"switch-thumb-size"),"--switch-label-font-size":ge(n,"switch-label-font-size"),"--switch-track-label-padding":ge(n,"switch-track-label-padding"),"--switch-color":r?Be(r,e):void 0}}),ja=M((e,t)=>{let r=z("Switch",xde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,label:d,offLabel:u,onLabel:f,id:m,size:p,radius:h,wrapperProps:b,thumbIcon:v,checked:x,defaultChecked:_,onChange:I,labelPosition:S,description:w,error:P,disabled:E,variant:B,rootRef:H,mod:Z,...K}=r,T=ZH(),k=p||T?.size,$=q({name:"Switch",props:r,classes:vR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:bde}),{styleProps:C,rest:A}=Hr(K),D=pt(m),N=T?{checked:T.value.includes(A.value),onChange:T.onChange}:{},[U,G]=rt({value:N.checked??x,defaultValue:_,finalValue:!1});return(0,ru.jsxs)(Zd,{...$("root"),__staticSelector:"Switch",__stylesApiProps:r,id:D,size:k,labelPosition:S,label:d,description:w,error:P,disabled:E,bodyElement:"label",labelElement:"span",classNames:n,styles:a,unstyled:s,"data-checked":N.checked||x||void 0,variant:B,ref:H,mod:Z,...C,...b,children:[(0,ru.jsx)("input",{...A,disabled:E,checked:U,"data-checked":N.checked||x||void 0,onChange:re=>{T?N.onChange?.(re):I?.(re),G(re.currentTarget.checked)},id:D,ref:t,type:"checkbox",role:"switch",...$("input")}),(0,ru.jsxs)(F,{"aria-hidden":"true",component:"span",mod:{error:P,"label-position":S,"without-labels":!f&&!u},...$("track"),children:[(0,ru.jsx)(F,{component:"span",mod:"reduce-motion",...$("thumb"),children:v}),(0,ru.jsx)("span",{...$("trackLabel"),children:U?f:u})]})]})});ja.classes={...vR,...i0};ja.displayName="@mantine/core/Switch";ja.Group=X0;var nw=y(O(),1);var Yrt=y(R(),1);var KH=y(O(),1),Trt=y(R(),1);var krt=y(R(),1);var Prt=y(O(),1);var[GH,qH]=Vt("Table component was not found in the tree");var hc={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function yde(e,t){if(!t)return;let r={};return t.columnBorder&&e.withColumnBorders&&(r["data-with-column-border"]=!0),t.rowBorder&&e.withRowBorders&&(r["data-with-row-border"]=!0),t.striped&&e.striped&&(r["data-striped"]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(r["data-hover"]=!0),t.captionSide&&e.captionSide&&(r["data-side"]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(r["data-sticky"]=!0),r}function ou(e,t){let r=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,n=M((o,i)=>{let a=z(r,{},o),{classNames:s,className:l,style:c,styles:d,...u}=a,f=qH();return(0,KH.jsx)(F,{component:e,ref:i,...yde(f,t),...f.getStyles(e,{className:l,classNames:s,style:c,styles:d,props:a}),...u})});return n.displayName=`@mantine/core/${r}`,n.classes=hc,n}var wv=ou("th",{columnBorder:!0}),Q0=ou("td",{columnBorder:!0}),Bm=ou("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),Y0=ou("thead",{stickyHeader:!0}),J0=ou("tbody"),ew=ou("tfoot"),tw=ou("caption",{captionSide:!0});var Ko=y(O(),1);function rw({data:e}){return(0,Ko.jsxs)(Ko.Fragment,{children:[e.caption&&(0,Ko.jsx)(tw,{children:e.caption}),e.head&&(0,Ko.jsx)(Y0,{children:(0,Ko.jsx)(Bm,{children:e.head.map((t,r)=>(0,Ko.jsx)(wv,{children:t},r))})}),e.body&&(0,Ko.jsx)(J0,{children:e.body.map((t,r)=>(0,Ko.jsx)(Bm,{children:t.map((n,o)=>(0,Ko.jsx)(Q0,{children:n},o))},r))}),e.foot&&(0,Ko.jsx)(ew,{children:(0,Ko.jsx)(Bm,{children:e.foot.map((t,r)=>(0,Ko.jsx)(wv,{children:t},r))})})]})}rw.displayName="@mantine/core/TableDataRenderer";var xR=y(O(),1);var Urt=y(R(),1);var _de={type:"scrollarea"},Ide=(e,{minWidth:t,maxHeight:r,type:n})=>({scrollContainer:{"--table-min-width":W(t),"--table-max-height":W(r),"--table-overflow":n==="native"?"auto":void 0}}),ow=M((e,t)=>{let r=z("TableScrollContainer",_de,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,children:c,minWidth:d,maxHeight:u,type:f,scrollAreaProps:m,...p}=r,h=q({name:"TableScrollContainer",classes:hc,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Ide,rootSelector:"scrollContainer"});return(0,xR.jsx)(F,{component:f==="scrollarea"?Ar:"div",...f==="scrollarea"?u?{offsetScrollbars:"xy",...m}:{offsetScrollbars:"x",...m}:{},ref:t,...h("scrollContainer"),...p,children:(0,xR.jsx)("div",{...h("scrollContainerInner"),children:c})})});ow.classes=hc;ow.displayName="@mantine/core/TableScrollContainer";var wde={withRowBorders:!0,verticalSpacing:7},Sde=(e,{layout:t,captionSide:r,horizontalSpacing:n,verticalSpacing:o,borderColor:i,stripedColor:a,highlightOnHoverColor:s,striped:l,highlightOnHover:c,stickyHeaderOffset:d,stickyHeader:u})=>({table:{"--table-layout":t,"--table-caption-side":r,"--table-horizontal-spacing":Tt(n),"--table-vertical-spacing":Tt(o),"--table-border-color":i?Be(i,e):void 0,"--table-striped-color":l&&a?Be(a,e):void 0,"--table-highlight-on-hover-color":c&&s?Be(s,e):void 0,"--table-sticky-header-offset":u?W(d):void 0}}),dr=M((e,t)=>{let r=z("Table",wde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,horizontalSpacing:c,verticalSpacing:d,captionSide:u,stripedColor:f,highlightOnHoverColor:m,striped:p,highlightOnHover:h,withColumnBorders:b,withRowBorders:v,withTableBorder:x,borderColor:_,layout:I,variant:S,data:w,children:P,stickyHeader:E,stickyHeaderOffset:B,mod:H,tabularNums:Z,...K}=r,T=q({name:"Table",props:r,className:o,style:i,classes:hc,classNames:n,styles:a,unstyled:s,rootSelector:"table",vars:l,varsResolver:Sde});return(0,nw.jsx)(GH,{value:{getStyles:T,stickyHeader:E,striped:p===!0?"odd":p||void 0,highlightOnHover:h,withColumnBorders:b,withRowBorders:v,captionSide:u||"bottom"},children:(0,nw.jsx)(F,{component:"table",variant:S,ref:t,mod:[{"data-with-table-border":x,"data-tabular-nums":Z},H],...T("table"),...K,children:P||!!w&&(0,nw.jsx)(rw,{data:w})})})});dr.classes=hc;dr.displayName="@mantine/core/Table";dr.Td=Q0;dr.Th=wv;dr.Tr=Bm;dr.Thead=Y0;dr.Tbody=J0;dr.Tfoot=ew;dr.Caption=tw;dr.ScrollContainer=ow;dr.DataRenderer=rw;var Xo=y(O(),1),iw=y(R(),1);var fot=y(O(),1);var pot=y(R(),1);function XH({data:e,value:t}){let r=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(pi(i)?o.push({group:i.group,items:i.items.filter(a=>r.indexOf(a.label.toLowerCase().trim())===-1)}):r.indexOf(i.label.toLowerCase().trim())===-1&&o.push(i),o),[])}function kde(e,t){return e?t.split(new RegExp(`[${e.join("")}]`)).map(r=>r.trim()).filter(r=>r!==""):[t]}function bR({splitChars:e,allowDuplicates:t,maxTags:r,value:n,currentTags:o}){let i=kde(e,n),a=t?[...o,...i]:[...new Set([...o,...i])];return r?a.slice(0,r):a}var Cde={maxTags:1/0,allowDuplicates:!1,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:","},gc=M((e,t)=>{let r=z("TagsInput",Cde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,value:d,defaultValue:u,onChange:f,onKeyDown:m,maxTags:p,allowDuplicates:h,onDuplicate:b,variant:v,data:x,dropdownOpened:_,defaultDropdownOpened:I,onDropdownOpen:S,onDropdownClose:w,selectFirstOptionOnChange:P,onOptionSubmit:E,comboboxProps:B,filter:H,limit:Z,withScrollArea:K,maxDropdownHeight:T,searchValue:k,defaultSearchValue:$,onSearchChange:C,readOnly:A,disabled:D,splitChars:N,onFocus:U,onBlur:G,onPaste:re,radius:he,rightSection:me,rightSectionWidth:Q,rightSectionPointerEvents:oe,rightSectionProps:Ie,leftSection:se,leftSectionWidth:$e,leftSectionPointerEvents:Ve,leftSectionProps:Je,inputContainer:at,inputWrapperOrder:ze,withAsterisk:Kt,required:Xt,labelProps:ao,descriptionProps:pe,errorProps:ue,wrapperProps:Se,description:Ae,label:Xe,error:Fe,withErrorStyles:et,name:de,form:Re,id:xr,clearable:fn,clearButtonProps:No,hiddenInputProps:jt,hiddenInputValuesDivider:kr,mod:hs,renderOption:of,onRemove:nf,onClear:af,scrollAreaProps:Cr,acceptValueOnBlur:yl,..._l}=r,yh=pt(xr),_h=_m(x),Ih=Wd(_h),sf=(0,iw.useRef)(null),Il=He(sf,t),ir=ic({opened:_,defaultOpened:I,onDropdownOpen:S,onDropdownClose:()=>{w?.(),ir.resetSelectedOption()}}),{styleProps:NC,rest:{type:Mte,autoComplete:FC,...LC}}=Hr(_l),[st,On]=rt({value:d,defaultValue:u,finalValue:[],onChange:f}),[Yn,MC]=rt({value:k,defaultValue:$,finalValue:"",onChange:C}),zi=ke=>{MC(ke),ir.resetSelectedOption()},ed=q({name:"TagsInput",classes:{},props:r,classNames:n,styles:a,unstyled:s}),{resolvedClassNames:wh,resolvedStyles:Sh}=Vr({props:r,styles:a,classNames:n}),Kb=ke=>{let Fo=st.some(fa=>fa.toLowerCase()===ke.toLowerCase());Fo&&b?.(ke),(!Fo||Fo&&h)&&st.length<p&&(E?.(ke),zi(""),ke.length>0&&On([...st,ke]))},BC=ke=>{if(m?.(ke),ke.isPropagationStopped())return;let Fo=Yn.trim(),{length:fa}=Fo;if(N.includes(ke.key)&&fa>0&&(On(bR({splitChars:N,allowDuplicates:h,maxTags:p,value:Yn,currentTags:st})),zi(""),ke.preventDefault()),ke.key==="Enter"&&fa>0&&!ke.nativeEvent.isComposing){if(ke.preventDefault(),!!document.querySelector(`#${ir.listId} [data-combobox-option][data-combobox-selected]`))return;Kb(Fo)}ke.key==="Backspace"&&fa===0&&st.length>0&&!ke.nativeEvent.isComposing&&(nf?.(st[st.length-1]),On(st.slice(0,st.length-1)))},Xb=ke=>{if(re?.(ke),ke.preventDefault(),ke.clipboardData){let Fo=ke.clipboardData.getData("text/plain");On(bR({splitChars:N,allowDuplicates:h,maxTags:p,value:`${Yn}${Fo}`,currentTags:st})),zi("")}},jC=st.map((ke,Fo)=>(0,Xo.jsx)(Bs,{withRemoveButton:!A,onRemove:()=>{let fa=st.slice();fa.splice(Fo,1),On(fa),nf?.(ke)},unstyled:s,disabled:D,...ed("pill"),children:ke},`${ke}-${Fo}`));(0,iw.useEffect)(()=>{P&&ir.selectFirstOption()},[P,st,Yn]);let Qb=(0,Xo.jsx)(je.ClearButton,{...No,onClear:()=>{On([]),zi(""),sf.current?.focus(),ir.openDropdown(),af?.()}});return(0,Xo.jsxs)(Xo.Fragment,{children:[(0,Xo.jsxs)(je,{store:ir,classNames:wh,styles:Sh,unstyled:s,size:c,readOnly:A,__staticSelector:"TagsInput",onOptionSubmit:ke=>{E?.(ke),zi(""),st.length<p&&On([...st,Ih[ke].label]),ir.resetSelectedOption()},...B,children:[(0,Xo.jsx)(je.DropdownTarget,{children:(0,Xo.jsx)(lc,{...NC,__staticSelector:"TagsInput",classNames:wh,styles:Sh,unstyled:s,size:c,className:o,style:i,variant:v,disabled:D,radius:he,rightSection:me,__clearSection:Qb,__clearable:fn&&st.length>0&&!D&&!A,rightSectionWidth:Q,rightSectionPointerEvents:oe,rightSectionProps:Ie,leftSection:se,leftSectionWidth:$e,leftSectionPointerEvents:Ve,leftSectionProps:Je,inputContainer:at,inputWrapperOrder:ze,withAsterisk:Kt,required:Xt,labelProps:ao,descriptionProps:pe,errorProps:ue,wrapperProps:Se,description:Ae,label:Xe,error:Fe,withErrorStyles:et,__stylesApiProps:{...r,multiline:!0},id:yh,mod:hs,children:(0,Xo.jsxs)(Bs.Group,{disabled:D,unstyled:s,...ed("pillsList"),children:[jC,(0,Xo.jsx)(je.EventsTarget,{autoComplete:FC,children:(0,Xo.jsx)(lc.Field,{...LC,ref:Il,...ed("inputField"),unstyled:s,onKeyDown:BC,onFocus:ke=>{U?.(ke),ir.openDropdown()},onBlur:ke=>{G?.(ke),yl&&Kb(Yn),ir.closeDropdown()},onPaste:Xb,value:Yn,onChange:ke=>zi(ke.currentTarget.value),required:Xt&&st.length===0,disabled:D,readOnly:A,id:yh})})]})})}),(0,Xo.jsx)(Cm,{data:XH({data:_h,value:st}),hidden:A||D,filter:H,search:Yn,limit:Z,hiddenWhenEmpty:!0,withScrollArea:K,maxDropdownHeight:T,unstyled:s,labelId:Xe?`${yh}-label`:void 0,"aria-label":Xe?void 0:_l["aria-label"],renderOption:of,scrollAreaProps:Cr})]}),(0,Xo.jsx)(je.HiddenInput,{name:de,form:Re,value:st,valuesDivider:kr,disabled:D,...jt})]})});gc.classes={...Yt.classes,...je.classes};gc.displayName="@mantine/core/TagsInput";var QH=y(O(),1),Not=y(R(),1);var Pde={},er=M((e,t)=>{let r=z("TextInput",Pde,e);return(0,QH.jsx)(Yt,{component:"input",ref:t,...r,__staticSelector:"TextInput"})});er.classes=Yt.classes;er.displayName="@mantine/core/TextInput";var YH=y(O(),1),Vot=y(R(),1);var yR={root:"m_7341320d"};var Dde={},Rde=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a})=>{let s=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ti-size":ge(t,"ti-size"),"--ti-radius":r===void 0?void 0:Ee(r),"--ti-bg":i||n?s.background:void 0,"--ti-color":i||n?s.color:void 0,"--ti-bd":i||n?s.border:void 0}}},nu=M((e,t)=>{let r=z("ThemeIcon",Dde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,autoContrast:c,...d}=r,u=q({name:"ThemeIcon",classes:yR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Rde});return(0,YH.jsx)(F,{ref:t,...u("root"),...d})});nu.classes=yR;nu.displayName="@mantine/core/ThemeIcon";var eW=y(O(),1),nnt=y(R(),1);var Jot=y(R(),1),ent=y(O(),1);var Ede=["h1","h2","h3","h4","h5","h6"],Tde=["xs","sm","md","lg","xl"];function JH(e,t){let r=t!==void 0?t:`h${e}`;return Ede.includes(r)?{fontSize:`var(--mantine-${r}-font-size)`,fontWeight:`var(--mantine-${r}-font-weight)`,lineHeight:`var(--mantine-${r}-line-height)`}:Tde.includes(r)?{fontSize:`var(--mantine-font-size-${r})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:W(r),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var _R={root:"m_8a5d1357"};var $de={order:1},Ade=(e,{order:t,size:r,lineClamp:n,textWrap:o})=>{let i=JH(t,r);return{root:{"--title-fw":i.fontWeight,"--title-lh":i.lineHeight,"--title-fz":i.fontSize,"--title-line-clamp":typeof n=="number"?n.toString():void 0,"--title-text-wrap":o}}},xi=M((e,t)=>{let r=z("Title",$de,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,order:l,vars:c,size:d,variant:u,lineClamp:f,textWrap:m,mod:p,...h}=r,b=q({name:"Title",props:r,classes:_R,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:Ade});return[1,2,3,4,5,6].includes(l)?(0,eW.jsx)(F,{...b("root"),component:`h${l}`,variant:u,ref:t,mod:[{order:l,"data-line-clamp":typeof f=="number"},p],size:d,...h}):null});xi.classes=_R;xi.displayName="@mantine/core/Title";var jm=y(O(),1),bi=y(R(),1);var Zs=y(O(),1);var rW=y(R(),1);var tW=y(R(),1),Sv=(0,tW.createContext)(null);Sv.displayName="@mantine/modals/ModalsContext";function oW(){let e=(0,rW.useContext)(Sv);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}function nW({id:e,cancelProps:t,confirmProps:r,labels:n={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:a,onCancel:s,onConfirm:l,children:c}){let{cancel:d,confirm:u}=n,f=oW(),m=h=>{typeof t?.onClick=="function"&&t?.onClick(h),typeof s=="function"&&s(),i&&f.closeModal(e)},p=h=>{typeof r?.onClick=="function"&&r?.onClick(h),typeof l=="function"&&l(),o&&f.closeModal(e)};return(0,Zs.jsxs)(Zs.Fragment,{children:[c&&(0,Zs.jsx)(F,{mb:"md",children:c}),(0,Zs.jsxs)(De,{mt:c?0:"md",justify:"flex-end",...a,children:[(0,Zs.jsx)(ht,{variant:"default",...t,onClick:m,children:t?.children||d}),(0,Zs.jsx)(ht,{...r,onClick:p,children:r?.children||u})]})]})}var[iW,iu]=I2("mantine-modals"),aW=e=>{let t=e.modalId||Io();return iu("openModal")({...e,modalId:t}),t},sW=e=>{let t=e.modalId||Io();return iu("openConfirmModal")({...e,modalId:t}),t},lW=e=>{let t=e.modalId||Io();return iu("openContextModal")({...e,modalId:t}),t},cW=iu("closeModal"),dW=iu("closeAllModals"),uW=e=>iu("updateModal")(e),fW=e=>iu("updateContextModal")(e),Ua={open:aW,close:cW,closeAll:dW,openConfirmModal:sW,openContextModal:lW,updateModal:uW,updateContextModal:fW};function mW(e,t){t&&e.type==="confirm"&&e.props.onCancel?.(),e.props.onClose?.()}function pW(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{let r=e.modals.find(o=>o.id===t.modalId);if(!r)return e;mW(r,t.canceled);let n=e.modals.filter(o=>o.id!==t.modalId);return{current:n[n.length-1]||e.current,modals:n}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(r=>{mW(r,t.canceled)}),{current:e.current,modals:[]}):e;case"UPDATE":{let{modalId:r,newProps:n}=t,o=e.modals.map(a=>a.id!==r?a:a.type==="content"||a.type==="confirm"?{...a,props:{...a.props,...n}}:a.type==="context"?{...a,props:{...a.props,...n,innerProps:{...a.props.innerProps,...n.innerProps}}}:a),i=e.current?.id===r&&o.find(a=>a.id===r)||e.current;return{...e,modals:o,current:i}}default:return e}}function Ode(e){if(!e)return{confirmProps:{},modalProps:{}};let{id:t,children:r,onCancel:n,onConfirm:o,closeOnConfirm:i,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:d,...u}=e;return{confirmProps:{id:t,children:r,onCancel:n,onConfirm:o,closeOnConfirm:i,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:d},modalProps:{id:t,...u}}}function IR({children:e,modalProps:t,labels:r,modals:n}){let[o,i]=(0,bi.useReducer)(pW,{modals:[],current:null}),a=(0,bi.useRef)(o);a.current=o;let s=(0,bi.useCallback)(x=>{i({type:"CLOSE_ALL",canceled:x})},[a,i]),l=(0,bi.useCallback)(({modalId:x,..._})=>{let I=x||Io();return i({type:"OPEN",modal:{id:I,type:"content",props:_}}),I},[i]),c=(0,bi.useCallback)(({modalId:x,..._})=>{let I=x||Io();return i({type:"OPEN",modal:{id:I,type:"confirm",props:_}}),I},[i]),d=(0,bi.useCallback)((x,{modalId:_,...I})=>{let S=_||Io();return i({type:"OPEN",modal:{id:S,type:"context",props:I,ctx:x}}),S},[i]),u=(0,bi.useCallback)((x,_)=>{i({type:"CLOSE",modalId:x,canceled:_})},[a,i]),f=(0,bi.useCallback)(({modalId:x,..._})=>{i({type:"UPDATE",modalId:x,newProps:_})},[i]),m=(0,bi.useCallback)(({modalId:x,..._})=>{i({type:"UPDATE",modalId:x,newProps:_})},[i]);iW({openModal:l,openConfirmModal:c,openContextModal:({modal:x,..._})=>d(x,_),closeModal:u,closeContextModal:u,closeAllModals:s,updateModal:f,updateContextModal:m});let p={modalProps:t||{},modals:o.modals,openModal:l,openConfirmModal:c,openContextModal:d,closeModal:u,closeContextModal:u,closeAll:s,updateModal:f,updateContextModal:m},h=()=>{let x=a.current.current;switch(x?.type){case"context":{let{innerProps:_,...I}=x.props,S=n[x.ctx];return{modalProps:I,content:(0,jm.jsx)(S,{innerProps:_,context:p,id:x.id})}}case"confirm":{let{modalProps:_,confirmProps:I}=Ode(x.props);return{modalProps:_,content:(0,jm.jsx)(nW,{...I,id:x.id,labels:x.props.labels||r})}}case"content":{let{children:_,...I}=x.props;return{modalProps:I,content:_}}default:return{modalProps:{},content:null}}},{modalProps:b,content:v}=h();return(0,jm.jsxs)(Sv.Provider,{value:p,children:[(0,jm.jsx)(po,{zIndex:Pt("modal")+1,...t,...b,opened:o.modals.length>0,onClose:()=>u(o.current?.id),children:v}),e]})}var hW=y(R(),1);function kv(e){let t=e,r=!1,n=new Set;return{getState(){return t},updateState(o){t=typeof o=="function"?o(t):o},setState(o){this.updateState(o),n.forEach(i=>i(t))},initialize(o){r||(t=o,r=!0)},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Cv(e){return(0,hW.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}function zde(e,t,r){let n=[],o=[],i={};for(let a of e){let s=a.position||t;i[s]=i[s]||0,i[s]+=1,i[s]<=r?o.push(a):n.push(a)}return{notifications:o,queue:n}}var gW=()=>kv({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Gs=gW(),wR=(e=Gs)=>Cv(e);function au(e,t){let r=e.getState(),n=t([...r.notifications,...r.queue]),o=zde(n,r.defaultPosition,r.limit);e.setState({notifications:o.notifications,queue:o.queue,limit:r.limit,defaultPosition:r.defaultPosition})}function vW(e,t=Gs){let r=e.id||Io();return au(t,n=>e.id&&n.some(o=>o.id===e.id)?n:[...n,{...e,id:r}]),r}function aw(e,t=Gs){return au(t,r=>r.filter(n=>n.id===e?(n.onClose?.(n),!1):!0)),e}function xW(e,t=Gs){return au(t,r=>r.map(n=>n.id===e.id?{...n,...e}:n)),e.id}function bW(e=Gs){au(e,()=>[])}function yW(e=Gs){au(e,t=>t.slice(0,e.getState().limit))}var Qo={show:vW,hide:aw,update:xW,clean:bW,cleanQueue:yW,updateState:au};var ho=y(O(),1),Tv=y(R(),1);function sw(e,t){return sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},sw(e,t)}function lw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,sw(e,t)}var Pv=y(R()),Dv=y(Xl());var SR={disabled:!1};var _W=y(R()),Um=_W.default.createContext(null);var IW=function(t){return t.scrollTop};var Rv="unmounted",su="exited",lu="entering",Hm="entered",kR="exiting",qs=(function(e){lw(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?s?(l=su,i.appearStatus=lu):l=Hm:n.unmountOnExit||n.mountOnEnter?l=Rv:l=su,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Rv?{status:su}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==lu&&a!==Hm&&(i=lu):(a===lu||a===Hm)&&(i=kR)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===lu){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Dv.default.findDOMNode(this);a&&IW(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===su&&this.setState({status:Rv})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[Dv.default.findDOMNode(this),s],c=l[0],d=l[1],u=this.getTimeouts(),f=s?u.appear:u.enter;if(!o&&!a||SR.disabled){this.safeSetState({status:Hm},function(){i.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:lu},function(){i.props.onEntering(c,d),i.onTransitionEnd(f,function(){i.safeSetState({status:Hm},function(){i.props.onEntered(c,d)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Dv.default.findDOMNode(this);if(!i||SR.disabled){this.safeSetState({status:su},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:kR},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:su},function(){o.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Dv.default.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Rv)return null;var i=this.props,a=i.children,s=i.in,l=i.mountOnEnter,c=i.unmountOnExit,d=i.appear,u=i.enter,f=i.exit,m=i.timeout,p=i.addEndListener,h=i.onEnter,b=i.onEntering,v=i.onEntered,x=i.onExit,_=i.onExiting,I=i.onExited,S=i.nodeRef,w=Em(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Pv.default.createElement(Um.Provider,{value:null},typeof a=="function"?a(o,w):Pv.default.cloneElement(Pv.default.Children.only(a),w))},t})(Pv.default.Component);qs.contextType=Um;qs.propTypes={};function Vm(){}qs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vm,onEntering:Vm,onEntered:Vm,onExit:Vm,onExiting:Vm,onExited:Vm};qs.UNMOUNTED=Rv;qs.EXITED=su;qs.ENTERING=lu;qs.ENTERED=Hm;qs.EXITING=kR;var CR=qs;function wW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Ev=y(R());var yi=y(R());function cw(e,t){var r=function(i){return t&&(0,yi.isValidElement)(i)?t(i):i},n=Object.create(null);return e&&yi.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function Nde(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(n[l])for(a=0;a<n[l].length;a++){var c=n[l][a];s[n[l][a]]=r(c)}s[l]=r(l)}for(a=0;a<o.length;a++)s[o[a]]=r(o[a]);return s}function cu(e,t,r){return r[t]!=null?r[t]:e.props[t]}function SW(e,t){return cw(e.children,function(r){return(0,yi.cloneElement)(r,{onExited:t.bind(null,r),in:!0,appear:cu(r,"appear",e),enter:cu(r,"enter",e),exit:cu(r,"exit",e)})})}function kW(e,t,r){var n=cw(e.children),o=Nde(t,n);return Object.keys(o).forEach(function(i){var a=o[i];if((0,yi.isValidElement)(a)){var s=i in t,l=i in n,c=t[i],d=(0,yi.isValidElement)(c)&&!c.props.in;l&&(!s||d)?o[i]=(0,yi.cloneElement)(a,{onExited:r.bind(null,a),in:!0,exit:cu(a,"exit",e),enter:cu(a,"enter",e)}):!l&&s&&!d?o[i]=(0,yi.cloneElement)(a,{in:!1}):l&&s&&(0,yi.isValidElement)(c)&&(o[i]=(0,yi.cloneElement)(a,{onExited:r.bind(null,a),in:c.props.in,exit:cu(a,"exit",e),enter:cu(a,"enter",e)}))}}),o}var Fde=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Lde={component:"div",childFactory:function(t){return t}},PR=(function(e){lw(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(wW(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?SW(o,s):kW(o,a,s),firstRender:!1}},r.handleExited=function(o,i){var a=cw(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=Rm({},s.children);return delete l[o.key],{children:l}}))},r.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=Em(o,["component","childFactory"]),l=this.state.contextValue,c=Fde(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?Ev.default.createElement(Um.Provider,{value:l},c):Ev.default.createElement(Um.Provider,{value:l},Ev.default.createElement(i,s,c))},t})(Ev.default.Component);PR.propTypes={};PR.defaultProps=Lde;var vc=PR;var DR=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function CW(e,t){return e.reduce((r,n)=>(r[n.position||t].push(n),r),DR.reduce((r,n)=>(r[n]=[],r),{}))}var PW={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Mde={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function DW({state:e,maxHeight:t,position:r,transitionDuration:n}){let[o,i]=r.split("-"),a=i==="center"?`${o}-center`:i,s={opacity:0,maxHeight:t,transform:PW[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:Mde[a]},c={opacity:0,maxHeight:0,transform:PW[a]};return{...s,...{entering:l,entered:l,exiting:c,exited:c}[e]}}var EW=y(O(),1),du=y(R(),1);function RW(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var RR=(0,du.forwardRef)(({data:e,onHide:t,autoClose:r,...n},o)=>{let{autoClose:i,message:a,...s}=e,l=RW(r,e.autoClose),c=(0,du.useRef)(-1),d=()=>window.clearTimeout(c.current),u=()=>{t(e.id),d()},f=()=>{typeof l=="number"&&(c.current=window.setTimeout(u,l))};return(0,du.useEffect)(()=>{e.onOpen?.(e)},[]),(0,du.useEffect)(()=>(f(),d),[l]),(0,EW.jsx)(Kd,{...n,...s,onClose:u,ref:o,onMouseEnter:d,onMouseLeave:f,children:a})});RR.displayName="@mantine/notifications/NotificationContainer";var ER={root:"m_b37d9ac7",notification:"m_5ed0edd0"};var Bde=CR,jde={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:Pt("overlay"),store:Gs,withinPortal:!0},Ude=(e,{zIndex:t,containerWidth:r})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":W(r)}}),ra=M((e,t)=>{let r=z("Notifications",jde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,position:c,autoClose:d,transitionDuration:u,containerWidth:f,notificationMaxHeight:m,limit:p,zIndex:h,store:b,portalProps:v,withinPortal:x,..._}=r,I=lt(),S=wR(b),w=m2(),P=ys(),E=(0,Tv.useRef)({}),B=(0,Tv.useRef)(0),Z=(I.respectReducedMotion?P:!1)?1:u,K=q({name:"Notifications",classes:ER,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Ude});(0,Tv.useEffect)(()=>{b?.updateState($=>({...$,limit:p||5,defaultPosition:c}))},[p,c]),br(()=>{S.notifications.length>B.current&&setTimeout(()=>w(),0),B.current=S.notifications.length},[S.notifications]);let T=CW(S.notifications,c),k=DR.reduce(($,C)=>($[C]=T[C].map(({style:A,...D})=>(0,ho.jsx)(Bde,{timeout:Z,onEnter:()=>E.current[D.id].offsetHeight,nodeRef:{current:E.current[D.id]},children:N=>(0,ho.jsx)(RR,{ref:U=>{E.current[D.id]=U},data:D,onHide:U=>aw(U,b),autoClose:d,...K("notification",{style:{...DW({state:N,position:C,transitionDuration:Z,maxHeight:m}),...A}})})},D.id)),$),{});return(0,ho.jsxs)(_n,{withinPortal:x,...v,children:[(0,ho.jsx)(F,{...K("root"),"data-position":"top-center",ref:t,..._,children:(0,ho.jsx)(vc,{children:k["top-center"]})}),(0,ho.jsx)(F,{...K("root"),"data-position":"top-left",..._,children:(0,ho.jsx)(vc,{children:k["top-left"]})}),(0,ho.jsx)(F,{...K("root",{className:Ni.classNames.fullWidth}),"data-position":"top-right",..._,children:(0,ho.jsx)(vc,{children:k["top-right"]})}),(0,ho.jsx)(F,{...K("root",{className:Ni.classNames.fullWidth}),"data-position":"bottom-right",..._,children:(0,ho.jsx)(vc,{children:k["bottom-right"]})}),(0,ho.jsx)(F,{...K("root"),"data-position":"bottom-left",..._,children:(0,ho.jsx)(vc,{children:k["bottom-left"]})}),(0,ho.jsx)(F,{...K("root"),"data-position":"bottom-center",..._,children:(0,ho.jsx)(vc,{children:k["bottom-center"]})})]})});ra.classes=ER;ra.displayName="@mantine/notifications/Notifications";ra.show=Qo.show;ra.hide=Qo.hide;ra.update=Qo.update;ra.clean=Qo.clean;ra.cleanQueue=Qo.cleanQueue;ra.updateState=Qo.updateState;var Wm=y(R(),1),TW=y(O(),1),TR=Wm.createContext(void 0),Zm=e=>{let t=Wm.useContext(TR);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$R=({client:e,children:t})=>(Wm.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,TW.jsx)(TR.Provider,{value:e,children:t}));var Vde={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xc,AR,$W,Hde=($W=class{constructor(){Pe(this,xc,Vde);Pe(this,AR,!1)}setTimeoutProvider(e){fe(this,xc,e)}setTimeout(e,t){return L(this,xc).setTimeout(e,t)}clearTimeout(e){L(this,xc).clearTimeout(e)}setInterval(e,t){return L(this,xc).setInterval(e,t)}clearInterval(e){L(this,xc).clearInterval(e)}},xc=new WeakMap,AR=new WeakMap,$W),Va=new Hde;function AW(e){setTimeout(e,0)}var zR=typeof window>"u"||"Deno"in globalThis;function Ir(){}function NW(e,t){return typeof e=="function"?e(t):e}function dw(e){return typeof e=="number"&&e>=0&&e!==1/0}function uw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function At(e,t){return typeof e=="function"?e(t):e}function fw(e,t){let{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==$v(a,t.options))return!1}else if(!bc(t.queryKey,a))return!1}if(r!=="all"){let l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function mw(e,t){let{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(uu(t.options.mutationKey)!==uu(i))return!1}else if(!bc(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function $v(e,t){return(t?.queryKeyHashFn||uu)(e)}function uu(e){return JSON.stringify(e,(t,r)=>OR(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function bc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!bc(e[n],t[n]))return!1;return!0}let r=Object.keys(t);for(let n of r)if(!bc(e[n],t[n]))return!1;return!0}return!1}var Wde=Object.prototype.hasOwnProperty;function NR(e,t,r=0){if(e===t)return e;if(r>500)return t;let n=OW(e)&&OW(t);if(!n&&!(OR(e)&&OR(t)))return t;let o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,s=n?new Array(a):{},l=0;for(let c=0;c<a;c++){let d=n?c:i[c],u=e[d],f=t[d];if(u===f){s[d]=u,(n?c<o:Wde.call(e,d))&&l++;continue}if(u===null||f===null||typeof u!="object"||typeof f!="object"){s[d]=f;continue}let m=NR(u,f,r+1);s[d]=m,m===u&&l++}return o===a&&l===o?e:s}function pw(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function OW(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function OR(e){if(!zW(e))return!1;let t=Object.getPrototypeOf(e),r=t?.constructor;if(r===void 0)return!0;if(typeof r!="function")return!1;let n=r.prototype;return!(!zW(n)||!n.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function zW(e){return Object.prototype.toString.call(e)==="[object Object]"}function FW(e){return new Promise(t=>{Va.setTimeout(t,e)})}function Av(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?NR(e,t):t}function LW(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function MW(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Gm=Symbol();function hw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Gm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gw(e,t){return typeof e=="function"?e(...t):!!e}function BW(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var Zde=()=>zR,qm=()=>Zde();var Ha=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var fu,yc,Km,jW,Gde=(jW=class extends Ha{constructor(){super();Pe(this,fu);Pe(this,yc);Pe(this,Km);fe(this,Km,t=>{if(typeof window<"u"&&window.addEventListener){let r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,yc)||this.setEventListener(L(this,Km))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,yc))==null||t.call(this),fe(this,yc,void 0))}setEventListener(t){var r;fe(this,Km,t),(r=L(this,yc))==null||r.call(this),fe(this,yc,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,fu)!==t&&(fe(this,fu,t),this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){return typeof L(this,fu)=="boolean"?L(this,fu):globalThis.document?.visibilityState!=="hidden"}},fu=new WeakMap,yc=new WeakMap,Km=new WeakMap,jW),Xm=new Gde;var UW=AW;function qde(){let e=[],t=0,r=s=>{s()},n=s=>{s()},o=UW,i=s=>{t?e.push(s):o(()=>{r(s)})},a=()=>{let s=e;e=[],s.length&&o(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{o=s}}}var Gt=qde();var Qm,_c,Ym,VW,Kde=(VW=class extends Ha{constructor(){super();Pe(this,Qm,!0);Pe(this,_c);Pe(this,Ym);fe(this,Ym,t=>{if(typeof window<"u"&&window.addEventListener){let r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,_c)||this.setEventListener(L(this,Ym))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,_c))==null||t.call(this),fe(this,_c,void 0))}setEventListener(t){var r;fe(this,Ym,t),(r=L(this,_c))==null||r.call(this),fe(this,_c,t(this.setOnline.bind(this)))}setOnline(t){L(this,Qm)!==t&&(fe(this,Qm,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,Qm)}},Qm=new WeakMap,_c=new WeakMap,Ym=new WeakMap,VW),Jm=new Kde;function Xde(e){return Math.min(1e3*2**e,3e4)}function FR(e){return(e??"online")==="online"?Jm.isOnline():!0}var vw=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function xw(e){let t=!1,r=0,n,o="pending",i,a,s=new Promise((x,_)=>{i=x,a=_});s.catch(Ir);let l=()=>o!=="pending",c=x=>{if(!l()){let _=new vw(x);h(_),e.onCancel?.(_)}},d=()=>{t=!0},u=()=>{t=!1},f=()=>Xm.isFocused()&&(e.networkMode==="always"||Jm.isOnline())&&e.canRun(),m=()=>FR(e.networkMode)&&e.canRun(),p=x=>{l()||(n?.(),o="resolved",i(x))},h=x=>{l()||(n?.(),o="rejected",a(x))},b=x=>new Promise(_=>{n=I=>{(l()||x())&&_(I)},e.onPause?.()}).then(()=>{n=void 0,l()||e.onContinue?.()}),v=()=>{if(l())return;let x,_=r===0?e.initialPromise:void 0;try{x=_??e.fn()}catch(I){x=Promise.reject(I)}Promise.resolve(x).then(p).catch(I=>{if(l())return;let S=e.retry??(qm()?0:3),w=e.retryDelay??Xde,P=typeof w=="function"?w(r,I):w,E=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,I);if(t||!E){h(I);return}r++,e.onFail?.(r,I),FW(P).then(()=>f()?void 0:b(f)).then(()=>{t?h(I):v()})})};return{promise:s,status:()=>o,cancel:c,continue:()=>(n?.(),s),cancelRetry:d,continueRetry:u,canStart:m,start:()=>(m()?v():b(m).then(v),s)}}var mu,HW,bw=(HW=class{constructor(){Pe(this,mu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dw(this.gcTime)&&fe(this,mu,Va.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qm()?1/0:3e5))}clearGcTimeout(){L(this,mu)!==void 0&&(Va.clearTimeout(L(this,mu)),fe(this,mu,void 0))}},mu=new WeakMap,HW);function ZW(e){return{onFetch:(t,r)=>{let n=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},l=0,c=async()=>{let d=!1,u=p=>{BW(p,()=>t.signal,()=>d=!0)},f=hw(t.options,t.fetchOptions),m=async(p,h,b)=>{if(d)return Promise.reject(t.signal.reason);if(h==null&&p.pages.length)return Promise.resolve(p);let x=(()=>{let w={client:t.client,queryKey:t.queryKey,pageParam:h,direction:b?"backward":"forward",meta:t.options.meta};return u(w),w})(),_=await f(x),{maxPages:I}=t.options,S=b?MW:LW;return{pages:S(p.pages,_,I),pageParams:S(p.pageParams,h,I)}};if(o&&i.length){let p=o==="backward",h=p?Qde:WW,b={pages:i,pageParams:a};s=await m(b,h(n,b),p)}else{let p=e??i.length;do{let h=l===0?a[0]??n.initialPageParam:WW(n,s);if(l>0&&h==null)break;s=await m(s,h),l++}while(l<p)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function WW(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Qde(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var ep,pu,tp,_i,hu,zr,Ov,gu,oa,Ks,KW,XW=(KW=class extends bw{constructor(t){super();Pe(this,oa);Pe(this,ep);Pe(this,pu);Pe(this,tp);Pe(this,_i);Pe(this,hu);Pe(this,zr);Pe(this,Ov);Pe(this,gu);fe(this,gu,!1),fe(this,Ov,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,hu,t.client),fe(this,_i,L(this,hu).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,pu,qW(this.options)),this.state=t.state??L(this,pu),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,ep)}get promise(){return L(this,zr)?.promise}setOptions(t){if(this.options={...L(this,Ov),...t},t?._type&&fe(this,ep,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let r=qW(this.options);r.data!==void 0&&(this.setState(GW(r.data,r.dataUpdatedAt)),fe(this,pu,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,_i).remove(this)}setData(t,r){let n=Av(this.state.data,t,this.options);return tt(this,oa,Ks).call(this,{data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(t){tt(this,oa,Ks).call(this,{type:"setState",state:t})}cancel(t){let r=L(this,zr)?.promise;return L(this,zr)?.cancel(t),r?r.then(Ir).catch(Ir):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,pu)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>At(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>At(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!uw(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),L(this,zr)?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),L(this,zr)?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,_i).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){let r=this.observers.indexOf(t);r!==-1&&(this.observers.splice(r,1),this.observers.length||(L(this,zr)&&(L(this,gu)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,zr).cancel({revert:!0}):L(this,zr).cancelRetry()),this.scheduleGc()),L(this,_i).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,oa,Ks).call(this,{type:"invalidate"})}async fetch(t,r){if(this.state.fetchStatus!=="idle"&&L(this,zr)?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(L(this,zr))return L(this,zr).continueRetry(),L(this,zr).promise}if(t&&this.setOptions(t),!this.options.queryFn){let c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}let n=new AbortController,o=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(fe(this,gu,!0),n.signal)})},i=()=>{let c=hw(this.options,r),u=(()=>{let f={client:L(this,hu),queryKey:this.queryKey,meta:this.meta};return o(f),f})();return fe(this,gu,!1),this.options.persister?this.options.persister(c,u,this):c(u)},s=(()=>{let c={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,hu),state:this.state,fetchFn:i};return o(c),c})();(L(this,ep)==="infinite"?ZW(this.options.pages):this.options.behavior)?.onFetch(s,this),fe(this,tp,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&tt(this,oa,Ks).call(this,{type:"fetch",meta:s.fetchOptions?.meta});let l=fe(this,zr,xw({initialPromise:r?.initialPromise,fn:s.fetchFn,onCancel:c=>{c instanceof vw&&c.revert&&this.setState({...L(this,tp),fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{tt(this,oa,Ks).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{tt(this,oa,Ks).call(this,{type:"pause"})},onContinue:()=>{tt(this,oa,Ks).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{let c=await l.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),L(this,_i).config.onSuccess?.(c,this),L(this,_i).config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof vw){if(c.silent)return L(this,zr).promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw tt(this,oa,Ks).call(this,{type:"error",error:c}),L(this,_i).config.onError?.(c,this),L(this,_i).config.onSettled?.(this.state.data,c,this),c}finally{L(this,zr)===l&&fe(this,zr,void 0),this.scheduleGc()}}},ep=new WeakMap,pu=new WeakMap,tp=new WeakMap,_i=new WeakMap,hu=new WeakMap,zr=new WeakMap,Ov=new WeakMap,gu=new WeakMap,oa=new WeakSet,Ks=function(t){let r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...LR(n.data,this.options),fetchMeta:t.meta??null};case"success":let o={...n,...GW(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,tp,t.manual?o:void 0),o;case"error":let i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Gt.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),L(this,_i).notify({query:this,type:"updated",action:t})})},KW);function LR(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:FR(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function GW(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qW(e){let t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Yo,dt,Nv,Jo,vu,rp,Xs,Fv,op,np,xu,bu,Ic,ip,gt,zv,MR,BR,jR,UR,VR,HR,WR,ZR,JW,qR=(JW=class extends Ha{constructor(t,r){super();Pe(this,gt);Pe(this,Yo);Pe(this,dt);Pe(this,Nv);Pe(this,Jo);Pe(this,vu);Pe(this,rp);Pe(this,Xs);Pe(this,Fv);Pe(this,op);Pe(this,np);Pe(this,xu);Pe(this,bu);Pe(this,Ic);Pe(this,ip,new Set);this.options=r,fe(this,Yo,t),fe(this,Xs,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,dt).addObserver(this),QW(L(this,dt),this.options)?tt(this,gt,zv).call(this):this.updateResult(),tt(this,gt,VR).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return GR(L(this,dt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return GR(L(this,dt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,gt,HR).call(this),tt(this,gt,WR).call(this),L(this,dt).removeObserver(this)}setOptions(t){let r=this.options,n=L(this,dt);if(this.options=L(this,Yo).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof At(this.options.enabled,L(this,dt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,gt,ZR).call(this),L(this,dt).setOptions(this.options),r._defaulted&&!pw(this.options,r)&&L(this,Yo).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,dt),observer:this});let o=this.hasListeners();o&&YW(L(this,dt),n,this.options,r)&&tt(this,gt,zv).call(this),this.updateResult(),o&&(L(this,dt)!==n||At(this.options.enabled,L(this,dt))!==At(r.enabled,L(this,dt))||At(this.options.staleTime,L(this,dt))!==At(r.staleTime,L(this,dt)))&&tt(this,gt,BR).call(this);let i=tt(this,gt,jR).call(this);o&&(L(this,dt)!==n||At(this.options.enabled,L(this,dt))!==At(r.enabled,L(this,dt))||i!==L(this,Ic))&&tt(this,gt,UR).call(this,i)}getOptimisticResult(t){let r=L(this,Yo).getQueryCache().build(L(this,Yo),t),n=this.createResult(r,t);return pw(this.getCurrentResult(),n)||(fe(this,Jo,n),fe(this,rp,this.options),fe(this,vu,L(this,dt).state)),n}getCurrentResult(){return L(this,Jo)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r?.(o),Reflect.get(n,o))})}trackProp(t){L(this,ip).add(t)}getCurrentQuery(){return L(this,dt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let r=L(this,Yo).defaultQueryOptions(t),n=L(this,Yo).getQueryCache().build(L(this,Yo),r),o=()=>{},i,a=new Promise(s=>{i=s,o=L(this,Yo).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===n.queryHash&&n.state.data!==void 0&&(o(),s(this.createResult(n,r)))})});return Promise.race([n.fetch().then(()=>{let s=this.createResult(n,r);return i?.(s),s}).finally(()=>{o()}),a])}fetch(t){return tt(this,gt,zv).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,Jo)))}createResult(t,r){let n=L(this,dt),o=this.options,i=L(this,Jo),a=L(this,vu),s=L(this,rp),l=t!==n?t.state:L(this,Nv),{state:c}=t,d={...c},u=!1,f;if(r._optimisticResults){let w=this.hasListeners(),P=!w&&QW(t,r),E=w&&YW(t,n,r,o);(P||E)&&(d={...d,...LR(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:h}=d;f=d.data;let b=!1;if(r.placeholderData!==void 0&&f===void 0&&h==="pending"){let w;i?.isPlaceholderData&&r.placeholderData===s?.placeholderData?(w=i.data,b=!0):w=typeof r.placeholderData=="function"?r.placeholderData(L(this,np)?.state.data,L(this,np)):r.placeholderData,w!==void 0&&(h="success",f=Av(i?.data,w,r),u=!0)}if(r.select&&f!==void 0&&!b)if(i&&f===a?.data&&r.select===L(this,Fv))f=L(this,op);else try{fe(this,Fv,r.select),f=r.select(f),f=Av(i?.data,f,r),fe(this,op,f),fe(this,Xs,null)}catch(w){fe(this,Xs,w)}else f===void 0&&fe(this,Xs,null);L(this,Xs)&&(m=L(this,Xs),f=L(this,op),p=Date.now(),h="error",u=!1);let v=d.fetchStatus==="fetching",x=h==="pending",_=h==="error",I=x&&v,S=f!==void 0;return{status:h,fetchStatus:d.fetchStatus,isPending:x,isSuccess:h==="success",isError:_,isInitialLoading:I,isLoading:I,data:f,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:_&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:_&&S,isStale:KR(t,r),refetch:this.refetch,isEnabled:At(r.enabled,t)!==!1}}updateResult(){let t=L(this,Jo),r=this.createResult(L(this,dt),this.options);if(fe(this,vu,L(this,dt).state),fe(this,rp,this.options),L(this,vu).data!==void 0&&fe(this,np,L(this,dt)),pw(r,t))return;fe(this,Jo,r);let o=(()=>{if(!t)return!0;let{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!L(this,ip).size)return!0;let s=new Set(a??L(this,ip));return this.options.throwOnError&&s.add("error"),Object.keys(L(this,Jo)).some(l=>{let c=l;return L(this,Jo)[c]!==t[c]&&s.has(c)})})();Gt.batch(()=>{o&&this.listeners.forEach(i=>{i(L(this,Jo))}),L(this,Yo).getQueryCache().notify({query:L(this,dt),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,gt,VR).call(this)}},Yo=new WeakMap,dt=new WeakMap,Nv=new WeakMap,Jo=new WeakMap,vu=new WeakMap,rp=new WeakMap,Xs=new WeakMap,Fv=new WeakMap,op=new WeakMap,np=new WeakMap,xu=new WeakMap,bu=new WeakMap,Ic=new WeakMap,ip=new WeakMap,gt=new WeakSet,zv=function(t){tt(this,gt,ZR).call(this);let r=L(this,dt).fetch(this.options,t);return t?.throwOnError||(r=r.catch(Ir)),r},MR=function(t){return!qm()&&At(this.options.enabled,L(this,dt))!==!1&&dw(t)},BR=function(){tt(this,gt,HR).call(this);let t=At(this.options.staleTime,L(this,dt));if(L(this,Jo).isStale||!tt(this,gt,MR).call(this,t))return;let r=uw(L(this,Jo).dataUpdatedAt,t)+1;fe(this,xu,Va.setTimeout(()=>{L(this,Jo).isStale||this.updateResult()},r))},jR=function(){return At(this.options.refetchInterval,L(this,dt))??!1},UR=function(t){tt(this,gt,WR).call(this),fe(this,Ic,t),!(L(this,Ic)===0||!tt(this,gt,MR).call(this,L(this,Ic)))&&fe(this,bu,Va.setInterval(()=>{(this.options.refetchIntervalInBackground||Xm.isFocused())&&tt(this,gt,zv).call(this)},L(this,Ic)))},VR=function(){tt(this,gt,BR).call(this),tt(this,gt,UR).call(this,tt(this,gt,jR).call(this))},HR=function(){L(this,xu)!==void 0&&(Va.clearTimeout(L(this,xu)),fe(this,xu,void 0))},WR=function(){L(this,bu)!==void 0&&(Va.clearInterval(L(this,bu)),fe(this,bu,void 0))},ZR=function(){let t=L(this,Yo).getQueryCache().build(L(this,Yo),this.options);if(t===L(this,dt))return;let r=L(this,dt);fe(this,dt,t),fe(this,Nv,t.state),this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))},JW);function Yde(e,t){return At(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&At(t.retryOnMount,e)===!1)}function QW(e,t){return Yde(e,t)||e.state.data!==void 0&&GR(e,t,t.refetchOnMount)}function GR(e,t,r){if(At(t.enabled,e)!==!1&&At(t.staleTime,e)!=="static"){let n=At(r,e);return n==="always"||n!==!1&&KR(e,t)}return!1}function YW(e,t,r,n){return(e!==t||At(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&KR(e,r)}function KR(e,t){return At(t.enabled,e)!==!1&&e.isStaleByTime(At(t.staleTime,e))}var Lv,Wa,Ro,yu,Za,wc,eZ,tZ=(eZ=class extends bw{constructor(t){super();Pe(this,Za);Pe(this,Lv);Pe(this,Wa);Pe(this,Ro);Pe(this,yu);fe(this,Lv,t.client),this.mutationId=t.mutationId,fe(this,Ro,t.mutationCache),fe(this,Wa,[]),this.state=t.state||Jde(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Wa).includes(t)||(L(this,Wa).push(t),this.clearGcTimeout(),L(this,Ro).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,Wa,L(this,Wa).filter(r=>r!==t)),this.scheduleGc(),L(this,Ro).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Wa).length||(this.state.status==="pending"?this.scheduleGc():L(this,Ro).remove(this))}continue(){return L(this,yu)?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){let r=()=>{tt(this,Za,wc).call(this,{type:"continue"})},n={client:L(this,Lv),meta:this.options.meta,mutationKey:this.options.mutationKey},o=fe(this,yu,xw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{tt(this,Za,wc).call(this,{type:"failed",failureCount:s,error:l})},onPause:()=>{tt(this,Za,wc).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Ro).canRun(this)})),i=this.state.status==="pending",a=!o.canStart();try{if(i)r();else{tt(this,Za,wc).call(this,{type:"pending",variables:t,isPaused:a}),L(this,Ro).config.onMutate&&await L(this,Ro).config.onMutate(t,this,n);let l=await this.options.onMutate?.(t,n);l!==this.state.context&&tt(this,Za,wc).call(this,{type:"pending",context:l,variables:t,isPaused:a})}let s=await o.start();return await L(this,Ro).config.onSuccess?.(s,t,this.state.context,this,n),await this.options.onSuccess?.(s,t,this.state.context,n),await L(this,Ro).config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,t,this.state.context,n),tt(this,Za,wc).call(this,{type:"success",data:s}),s}catch(s){try{await L(this,Ro).config.onError?.(s,t,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,t,this.state.context,n)}catch(l){Promise.reject(l)}try{await L(this,Ro).config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,t,this.state.context,n)}catch(l){Promise.reject(l)}throw tt(this,Za,wc).call(this,{type:"error",error:s}),s}finally{L(this,yu)===o&&fe(this,yu,void 0),L(this,Ro).runNext(this)}}},Lv=new WeakMap,Wa=new WeakMap,Ro=new WeakMap,yu=new WeakMap,Za=new WeakSet,wc=function(t){let r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Gt.batch(()=>{L(this,Wa).forEach(n=>{n.onMutationUpdate(t)}),L(this,Ro).notify({mutation:this,type:"updated",action:t})})},eZ);function Jde(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qs,na,Mv,rZ,oZ=(rZ=class extends Ha{constructor(t={}){super();Pe(this,Qs);Pe(this,na);Pe(this,Mv);this.config=t,fe(this,Qs,new Set),fe(this,na,new Map),fe(this,Mv,0)}build(t,r,n){let o=new tZ({client:t,mutationCache:this,mutationId:++kh(this,Mv)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){L(this,Qs).add(t);let r=yw(t);if(typeof r=="string"){let n=L(this,na).get(r);n?n.push(t):L(this,na).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,Qs).delete(t)){let r=yw(t);if(typeof r=="string"){let n=L(this,na).get(r);if(n)if(n.length>1){let o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&L(this,na).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){let r=yw(t);if(typeof r=="string"){let n=L(this,na).get(r)?.find(o=>o.state.status==="pending");return!n||n===t}else return!0}runNext(t){let r=yw(t);return typeof r=="string"?L(this,na).get(r)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Gt.batch(()=>{L(this,Qs).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,Qs).clear(),L(this,na).clear()})}getAll(){return Array.from(L(this,Qs))}find(t){let r={exact:!0,...t};return this.getAll().find(n=>mw(r,n))}findAll(t={}){return this.getAll().filter(r=>mw(t,r))}notify(t){Gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){let t=this.getAll().filter(r=>r.state.isPaused);return Gt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ir))))}},Qs=new WeakMap,na=new WeakMap,Mv=new WeakMap,rZ);function yw(e){return e.options.scope?.id}var Ga,nZ,iZ=(nZ=class extends Ha{constructor(t={}){super();Pe(this,Ga);this.config=t,fe(this,Ga,new Map)}build(t,r,n){let o=r.queryKey,i=r.queryHash??$v(o,r),a=this.get(i);return a||(a=new XW({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){L(this,Ga).has(t.queryHash)||(L(this,Ga).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){L(this,Ga).get(t.queryHash)===t&&(t.destroy(),L(this,Ga).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Gt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Ga).get(t)}getAll(){return[...L(this,Ga).values()]}find(t){let r={exact:!0,...t};return this.getAll().find(n=>fw(r,n))}findAll(t={}){let r=this.getAll();return Object.keys(t).length>0?r.filter(n=>fw(t,n)):r}notify(t){Gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Gt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Gt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ga=new WeakMap,nZ);var ur,Sc,kc,ap,sp,Cc,lp,cp,aZ,XR=(aZ=class{constructor(e={}){Pe(this,ur);Pe(this,Sc);Pe(this,kc);Pe(this,ap);Pe(this,sp);Pe(this,Cc);Pe(this,lp);Pe(this,cp);fe(this,ur,e.queryCache||new iZ),fe(this,Sc,e.mutationCache||new oZ),fe(this,kc,e.defaultOptions||{}),fe(this,ap,new Map),fe(this,sp,new Map),fe(this,Cc,0)}mount(){kh(this,Cc)._++,L(this,Cc)===1&&(fe(this,lp,Xm.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ur).onFocus())})),fe(this,cp,Jm.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ur).onOnline())})))}unmount(){var e,t;kh(this,Cc)._--,L(this,Cc)===0&&((e=L(this,lp))==null||e.call(this),fe(this,lp,void 0),(t=L(this,cp))==null||t.call(this),fe(this,cp,void 0))}isFetching(e){return L(this,ur).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,Sc).findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return L(this,ur).get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=L(this,ur).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(At(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,ur).findAll(e).map(({queryKey:t,state:r})=>[t,r.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),o=L(this,ur).get(n.queryHash)?.state.data,i=NW(t,o);if(i!==void 0)return L(this,ur).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Gt.batch(()=>L(this,ur).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return L(this,ur).get(t.queryHash)?.state}removeQueries(e){let t=L(this,ur);Gt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){let r=L(this,ur);return Gt.batch(()=>{let n=r.findAll(e),o=new Set(n);return n.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>o.has(i)},t)})}cancelQueries(e,t={}){let r={revert:!0,...t},n=Gt.batch(()=>L(this,ur).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Ir).catch(Ir)}invalidateQueries(e,t={}){return Gt.batch(()=>(L(this,ur).findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0},n=Gt.batch(()=>L(this,ur).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Ir)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Ir)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=L(this,ur).build(this,t),n=r.isStaleByTime(At(t.staleTime,r))?await r.fetch(t):r.state.data,o=t.select;return o?o(n):n}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=L(this,ur).build(this,t);return r.isStaleByTime(At(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ir).catch(Ir)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ir).catch(Ir)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Jm.isOnline()?L(this,Sc).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ur)}getMutationCache(){return L(this,Sc)}getDefaultOptions(){return L(this,kc)}setDefaultOptions(e){fe(this,kc,e)}setQueryDefaults(e,t){L(this,ap).set(uu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...L(this,ap).values()],r={};return t.forEach(n=>{bc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,sp).set(uu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...L(this,sp).values()],r={};return t.forEach(n=>{bc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...L(this,kc).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=$v(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Gm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...L(this,kc).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,ur).clear(),L(this,Sc).clear()}},ur=new WeakMap,Sc=new WeakMap,kc=new WeakMap,ap=new WeakMap,sp=new WeakMap,Cc=new WeakMap,lp=new WeakMap,cp=new WeakMap,aZ);var _w=y(R(),1),sZ=_w.createContext(!1),lZ=()=>_w.useContext(sZ),hlt=sZ.Provider;var Bv=y(R(),1),eue=y(O(),1);function tue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var rue=Bv.createContext(tue()),cZ=()=>Bv.useContext(rue);var dZ=y(R(),1);var uZ=(e,t,r)=>{let n=r?.state.error&&typeof e.throwOnError=="function"?gw(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||n)&&(t.isReset()||(e.retryOnMount=!1))},fZ=e=>{dZ.useEffect(()=>{e.clearReset()},[e])},mZ=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||gw(r,[e.error,n]));var pZ=e=>{if(e.suspense){let r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},hZ=(e,t)=>e?.suspense&&t.isPending,gZ=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});var Pc=y(R(),1);function vZ(e,t,r){let n=lZ(),o=cZ(),i=Zm(r),a=i.defaultQueryOptions(e),s=i.getQueryCache().get(a.queryHash),l=e.subscribed!==!1;a._optimisticResults=n?"isRestoring":l?"optimistic":void 0,pZ(a),uZ(a,o,s),fZ(o);let[c]=Pc.useState(()=>new t(i,a)),d=c.getOptimisticResult(a),u=!n&&l;if(Pc.useSyncExternalStore(Pc.useCallback(f=>{let m=u?c.subscribe(Gt.batchCalls(f)):Ir;return c.updateResult(),m},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Pc.useEffect(()=>{c.setOptions(a)},[a,c]),hZ(a,d))throw gZ(a,c,o);if(mZ({result:d,errorResetBoundary:o,throwOnError:a.throwOnError,query:s,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:c.trackResult(d)}function QR(e,t){return vZ(e,qR,t)}var Lte=y(bZ(),1);var dp=y(R(),1);var yZ={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var ne=(e,t,r,n)=>{let o=(0,dp.forwardRef)(({color:i="currentColor",size:a=24,stroke:s=2,title:l,className:c,children:d,...u},f)=>(0,dp.createElement)("svg",{ref:f,...yZ[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${t}`,c].filter(Boolean).join(" "),...e==="filled"?{fill:i}:{strokeWidth:s,stroke:i},...u},[l&&(0,dp.createElement)("title",{key:"svg-title"},l),...n.map(([m,p])=>(0,dp.createElement)(m,p)),...Array.isArray(d)?d:[d]]));return o.displayName=`${r}`,o};var oue=[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]],JR=ne("outline","adjustments","Adjustments",oue);var nue=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],jv=ne("outline","alert-triangle","AlertTriangle",nue);var iue=[["path",{d:"M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-0"}],["path",{d:"M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-1"}],["path",{d:"M14 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-2"}],["path",{d:"M14 7l6 0",key:"svg-3"}],["path",{d:"M17 4l0 6",key:"svg-4"}]],eE=ne("outline","apps","Apps",iue);var aue=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],tE=ne("outline","arrow-left","ArrowLeft",aue);var sue=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],rE=ne("outline","arrow-up","ArrowUp",sue);var lue=[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]],up=ne("outline","box","Box",lue);var cue=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],oE=ne("outline","check","Check",cue);var due=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],Uv=ne("outline","chevron-down","ChevronDown",due);var uue=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],nE=ne("outline","chevron-right","ChevronRight",uue);var fue=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],iE=ne("outline","chevron-up","ChevronUp",fue);var mue=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]],aE=ne("outline","circle-minus","CircleMinus",mue);var pue=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]],sE=ne("outline","circle-plus","CirclePlus",pue);var hue=[["path",{d:"M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],lE=ne("outline","database","Database",hue);var gue=[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]],Vv=ne("outline","device-floppy","DeviceFloppy",gue);var vue=[["path",{d:"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],cE=ne("outline","dots","Dots",vue);var xue=[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],dE=ne("outline","eye-off","EyeOff",xue);var bue=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],uE=ne("outline","eye","Eye",bue);var yue=[["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M12 10.5v1.5",key:"svg-1"}],["path",{d:"M12 16v1.5",key:"svg-2"}],["path",{d:"M15.031 12.25l-1.299 .75",key:"svg-3"}],["path",{d:"M10.268 15l-1.3 .75",key:"svg-4"}],["path",{d:"M15 15.803l-1.285 -.773",key:"svg-5"}],["path",{d:"M10.285 12.97l-1.285 -.773",key:"svg-6"}],["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-7"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-8"}]],fE=ne("outline","file-settings","FileSettings",yue);var _ue=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}]],mE=ne("outline","file","File",_ue);var Iue=[["path",{d:"M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M20 21l2 -2l-2 -2",key:"svg-1"}],["path",{d:"M17 17l-2 2l2 2",key:"svg-2"}]],Hv=ne("outline","folder-code","FolderCode",Iue);var wue=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],Wv=ne("outline","folder-open","FolderOpen",wue);var Sue=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],Zv=ne("outline","folder","Folder",Sue);var kue=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M4 13h3l3 3h4l3 -3h3",key:"svg-1"}]],pE=ne("outline","inbox","Inbox",kue);var Cue=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],Gv=ne("outline","info-circle","InfoCircle",Cue);var Pue=[["path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5",key:"svg-0"}],["path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5",key:"svg-1"}],["path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5",key:"svg-2"}],["path",{d:"M11 6l9 0",key:"svg-3"}],["path",{d:"M11 12l9 0",key:"svg-4"}],["path",{d:"M11 18l9 0",key:"svg-5"}]],hE=ne("outline","list-check","ListCheck",Pue);var Due=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],gE=ne("outline","lock","Lock",Due);var Rue=[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]],vE=ne("outline","maximize","Maximize",Rue);var Eue=[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]],xE=ne("outline","minimize","Minimize",Eue);var Tue=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],qv=ne("outline","moon","Moon",Tue);var $ue=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Kv=ne("outline","pencil","Pencil",$ue);var Aue=[["path",{d:"M7 4v16l13 -8l-13 -8",key:"svg-0"}]],bE=ne("outline","player-play","PlayerPlay",Aue);var Oue=[["path",{d:"M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10",key:"svg-0"}]],yE=ne("outline","player-stop","PlayerStop",Oue);var zue=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],fp=ne("outline","plus","Plus",zue);var Nue=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],Iw=ne("outline","refresh","Refresh",Nue);var Fue=[["path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087",key:"svg-0"}],["path",{d:"M3 4.001v5h5",key:"svg-1"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],_E=ne("outline","restore","Restore",Fue);var Lue=[["path",{d:"M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4",key:"svg-0"}],["path",{d:"M12 2v2",key:"svg-1"}],["path",{d:"M9 12v9",key:"svg-2"}],["path",{d:"M15 12v9",key:"svg-3"}],["path",{d:"M5 16l4 -2",key:"svg-4"}],["path",{d:"M15 14l4 2",key:"svg-5"}],["path",{d:"M9 18h6",key:"svg-6"}],["path",{d:"M10 8v.01",key:"svg-7"}],["path",{d:"M14 8v.01",key:"svg-8"}]],IE=ne("outline","robot","Robot",Lue);var Mue=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],kn=ne("outline","search","Search",Mue);var Bue=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],wE=ne("outline","settings","Settings",Bue);var jue=[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245",key:"svg-0"}]],SE=ne("outline","star","Star",jue);var Uue=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],kE=ne("outline","sun","Sun",Uue);var Vue=[["path",{d:"M8 9l3 3l-3 3",key:"svg-0"}],["path",{d:"M13 15l3 0",key:"svg-1"}],["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12",key:"svg-2"}]],Ys=ne("outline","terminal-2","Terminal2",Vue);var Hue=[["path",{d:"M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5",key:"svg-0"}],["path",{d:"M4 13h7",key:"svg-1"}],["path",{d:"M21 12h-6",key:"svg-2"}]],CE=ne("outline","text-decrease","TextDecrease",Hue);var Wue=[["path",{d:"M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5",key:"svg-0"}],["path",{d:"M4 13h7",key:"svg-1"}],["path",{d:"M18 9v6",key:"svg-2"}],["path",{d:"M21 12h-6",key:"svg-3"}]],PE=ne("outline","text-increase","TextIncrease",Wue);var Zue=[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]],DE=ne("outline","tool","Tool",Zue);var Gue=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],ww=ne("outline","trash","Trash",Gue);var que=[["path",{d:"M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]],RE=ne("outline","users","Users",que);var Kue=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],Xv=ne("outline","x","X",Kue);var AC=y(R(),1);var _Z="x-sandbox-web";var TE=class extends Error{constructor(r,n){super(n);Et(this,"status",r)}};async function EE(e,t,r){let n=await fetch(t,{method:e,credentials:"same-origin",headers:{[_Z]:"1",...r===void 0?{}:{"Content-Type":"application/json"}},body:r===void 0?void 0:JSON.stringify(r)}),o=await n.json().catch(()=>null);if(!n.ok){let i=o?.error;throw new TE(n.status,typeof i=="string"?i:"The server said "+n.status)}return o}var $E={login:e=>EE("POST","/api/login",{token:e}),info:()=>EE("GET","/api/info"),sessions:()=>EE("GET","/api/sessions")};var Ti=y(R(),1);var g={};gs(g,{$brand:()=>ZE,$input:()=>g5,$output:()=>h5,INVALID:()=>rn,NEVER:()=>WE,TimePrecision:()=>P5,ZodAny:()=>pO,ZodArray:()=>xO,ZodBase64:()=>b1,ZodBase64URL:()=>y1,ZodBigInt:()=>Xp,ZodBigIntFormat:()=>w1,ZodBoolean:()=>Kp,ZodCIDRv4:()=>v1,ZodCIDRv6:()=>x1,ZodCUID:()=>d1,ZodCUID2:()=>u1,ZodCatch:()=>MO,ZodCodec:()=>Wx,ZodCompileAsyncError:()=>aa,ZodCompileUnsupportedError:()=>nt,ZodCreditCard:()=>aO,ZodCustom:()=>Zx,ZodCustomStringFormat:()=>Lu,ZodDate:()=>Mx,ZodDefault:()=>AO,ZodDiscriminatedUnion:()=>yO,ZodE164:()=>_1,ZodEmail:()=>a1,ZodEmoji:()=>l1,ZodEnum:()=>Zp,ZodError:()=>fge,ZodExactOptional:()=>P1,ZodFile:()=>RO,ZodFirstPartyTypeKind:()=>JO,ZodFunction:()=>KO,ZodGUID:()=>s1,ZodIBAN:()=>sO,ZodIPv4:()=>h1,ZodIPv6:()=>g1,ZodISODate:()=>Fc,ZodISODateTime:()=>Nc,ZodISODuration:()=>Mc,ZodISOTime:()=>Lc,ZodInstanceOf:()=>YO,ZodIntersection:()=>_O,ZodIssueCode:()=>hge,ZodJWT:()=>I1,ZodKSUID:()=>p1,ZodLazy:()=>ZO,ZodLiteral:()=>DO,ZodMAC:()=>iO,ZodMap:()=>CO,ZodNaN:()=>jO,ZodNanoID:()=>c1,ZodNever:()=>gO,ZodNonOptional:()=>D1,ZodNull:()=>fO,ZodNullable:()=>$O,ZodNumber:()=>qp,ZodNumberFormat:()=>Mu,ZodObject:()=>jx,ZodOptional:()=>Vx,ZodPipe:()=>Hx,ZodPrefault:()=>zO,ZodPreprocess:()=>UO,ZodPromise:()=>qO,ZodReadonly:()=>VO,ZodRealError:()=>En,ZodRecord:()=>Wp,ZodSet:()=>PO,ZodString:()=>Gp,ZodStringFormat:()=>Ct,ZodSuccess:()=>LO,ZodSymbol:()=>dO,ZodTemplateLiteral:()=>WO,ZodTransform:()=>EO,ZodTuple:()=>wO,ZodType:()=>We,ZodULID:()=>f1,ZodURL:()=>Lx,ZodUUID:()=>Qa,ZodUndefined:()=>uO,ZodUnion:()=>Ux,ZodUnknown:()=>hO,ZodVoid:()=>vO,ZodXID:()=>m1,ZodXor:()=>bO,_ZodString:()=>i1,_default:()=>OO,_function:()=>tX,any:()=>$K,array:()=>Bx,base64:()=>fK,base64url:()=>mK,bigint:()=>PK,boolean:()=>cO,catch:()=>BO,check:()=>rX,cidrv4:()=>dK,cidrv6:()=>uK,clone:()=>yt,codec:()=>QK,coerce:()=>tz,compile:()=>y5,config:()=>hr,core:()=>ol,creditCard:()=>hK,cuid:()=>rK,cuid2:()=>oK,currencyCode:()=>_K,custom:()=>oX,date:()=>OK,decode:()=>YA,decodeAsync:()=>eO,deepPartial:()=>gX,describe:()=>nX,discriminatedUnion:()=>BK,e164:()=>pK,email:()=>Zq,emoji:()=>eK,encode:()=>QA,encodeAsync:()=>JA,endsWith:()=>Op,enum:()=>k1,exactOptional:()=>TO,file:()=>GK,flattenError:()=>sx,float32:()=>wK,float64:()=>SK,formatError:()=>lx,fromJSONSchema:()=>pX,function:()=>tX,getDiscriminatedOption:()=>V$,getErrorMap:()=>vge,globalRegistry:()=>vo,gt:()=>Ka,gte:()=>Zn,guid:()=>Gq,hash:()=>IK,hex:()=>yK,hostname:()=>bK,httpUrl:()=>Jq,iban:()=>gK,includes:()=>$p,input:()=>xX,instanceof:()=>aX,int:()=>o1,int32:()=>kK,int64:()=>DK,intersection:()=>IO,invertCodec:()=>YK,ipv4:()=>sK,ipv6:()=>cK,iso:()=>Gx,json:()=>lX,jwt:()=>vK,keyof:()=>zK,ksuid:()=>aK,lazy:()=>GO,length:()=>Au,literal:()=>ZK,locales:()=>Dx,looseObject:()=>LK,looseRecord:()=>UK,lowercase:()=>Ep,lt:()=>qa,lte:()=>Wn,mac:()=>lK,map:()=>VK,maxLength:()=>$u,maxSize:()=>$c,memoizer:()=>Cx,meta:()=>iX,mime:()=>Np,minLength:()=>rl,minSize:()=>Xa,multipleOf:()=>Tc,nan:()=>XK,nanoid:()=>tK,nativeEnum:()=>WK,negative:()=>ZS,never:()=>S1,nonnegative:()=>qS,nonoptional:()=>FO,nonpositive:()=>GS,normalize:()=>Fp,null:()=>mO,nullable:()=>Fx,nullish:()=>qK,number:()=>lO,object:()=>NK,optional:()=>Nu,output:()=>bX,overwrite:()=>sa,parse:()=>GA,parseAsync:()=>qA,partialRecord:()=>jK,pipe:()=>n1,positive:()=>WS,prefault:()=>NO,preprocess:()=>cX,prettifyError:()=>XE,promise:()=>eX,properties:()=>zp,property:()=>KS,readonly:()=>HO,record:()=>kO,refine:()=>XO,regex:()=>Rp,regexes:()=>Si,registry:()=>yS,safeDecode:()=>rO,safeDecodeAsync:()=>nO,safeEncode:()=>tO,safeEncodeAsync:()=>oO,safeParse:()=>KA,safeParseAsync:()=>XA,set:()=>HK,setErrorMap:()=>gge,size:()=>Tu,slugify:()=>jp,startsWith:()=>Ap,strictObject:()=>FK,string:()=>Nx,stringFormat:()=>xK,stringbool:()=>sX,success:()=>KK,superRefine:()=>QO,symbol:()=>EK,templateLiteral:()=>JK,toJSONSchema:()=>JS,toLowerCase:()=>Mp,toUpperCase:()=>Bp,toZod:()=>Qv,transform:()=>C1,treeifyError:()=>KE,trim:()=>Lp,tuple:()=>SO,uint32:()=>CK,uint64:()=>RK,ulid:()=>nK,undefined:()=>TK,union:()=>Qp,unknown:()=>zu,uppercase:()=>Tp,url:()=>Yq,util:()=>Y,uuid:()=>qq,uuidv4:()=>Kq,uuidv6:()=>Xq,uuidv7:()=>Qq,validate:()=>cx,validateAsync:()=>dx,void:()=>AK,withParser:()=>_S,xid:()=>iK,xor:()=>MK});var ol={};gs(ol,{$ZodAny:()=>z$,$ZodArray:()=>B$,$ZodAsyncError:()=>Dn,$ZodBase64:()=>w$,$ZodBase64URL:()=>S$,$ZodBigInt:()=>aS,$ZodBigIntFormat:()=>T$,$ZodBoolean:()=>yx,$ZodCIDRv4:()=>_$,$ZodCIDRv6:()=>I$,$ZodCUID:()=>c$,$ZodCUID2:()=>d$,$ZodCatch:()=>i5,$ZodCheck:()=>Dt,$ZodCheckBigIntFormat:()=>NT,$ZodCheckEndsWith:()=>qT,$ZodCheckGreaterThan:()=>Hw,$ZodCheckIncludes:()=>ZT,$ZodCheckLengthEquals:()=>UT,$ZodCheckLessThan:()=>Vw,$ZodCheckLowerCase:()=>HT,$ZodCheckMaxLength:()=>BT,$ZodCheckMaxSize:()=>FT,$ZodCheckMimeType:()=>QT,$ZodCheckMinLength:()=>jT,$ZodCheckMinSize:()=>LT,$ZodCheckMultipleOf:()=>OT,$ZodCheckNumberFormat:()=>zT,$ZodCheckOverwrite:()=>YT,$ZodCheckProperties:()=>XT,$ZodCheckProperty:()=>KT,$ZodCheckRegex:()=>VT,$ZodCheckSizeEquals:()=>MT,$ZodCheckStartsWith:()=>GT,$ZodCheckStringFormat:()=>Sp,$ZodCheckUpperCase:()=>WT,$ZodCodec:()=>Ix,$ZodCreditCard:()=>C$,$ZodCustom:()=>f5,$ZodCustomStringFormat:()=>R$,$ZodCyclicError:()=>mS,$ZodDate:()=>M$,$ZodDefault:()=>t5,$ZodDiscriminatedUnion:()=>H$,$ZodE164:()=>k$,$ZodEmail:()=>o$,$ZodEmoji:()=>s$,$ZodEncodeError:()=>Ec,$ZodEnum:()=>K$,$ZodError:()=>ax,$ZodExactOptional:()=>J$,$ZodFile:()=>Q$,$ZodFunction:()=>d5,$ZodGUID:()=>t$,$ZodIBAN:()=>P$,$ZodIPv4:()=>x$,$ZodIPv6:()=>b$,$ZodISODate:()=>h$,$ZodISODateTime:()=>p$,$ZodISODuration:()=>v$,$ZodISOTime:()=>g$,$ZodIntersection:()=>W$,$ZodJWT:()=>D$,$ZodKSUID:()=>m$,$ZodLazy:()=>wx,$ZodLiteral:()=>X$,$ZodMAC:()=>y$,$ZodMap:()=>G$,$ZodNaN:()=>a5,$ZodNanoID:()=>l$,$ZodNever:()=>F$,$ZodNonOptional:()=>o5,$ZodNull:()=>O$,$ZodNullable:()=>e5,$ZodNumber:()=>iS,$ZodNumberFormat:()=>E$,$ZodObject:()=>rG,$ZodObjectJIT:()=>j$,$ZodOptional:()=>lS,$ZodPipe:()=>cS,$ZodPrefault:()=>r5,$ZodPreprocess:()=>s5,$ZodPromise:()=>u5,$ZodReadonly:()=>l5,$ZodRealError:()=>Rn,$ZodRecord:()=>Z$,$ZodRegistry:()=>bS,$ZodSet:()=>q$,$ZodString:()=>Cu,$ZodStringFormat:()=>_t,$ZodSuccess:()=>n5,$ZodSymbol:()=>$$,$ZodTemplateLiteral:()=>c5,$ZodTransform:()=>Y$,$ZodTuple:()=>sS,$ZodType:()=>Me,$ZodULID:()=>u$,$ZodURL:()=>a$,$ZodUUID:()=>r$,$ZodUndefined:()=>A$,$ZodUnion:()=>_x,$ZodUnknown:()=>N$,$ZodVoid:()=>L$,$ZodXID:()=>f$,$ZodXor:()=>U$,$brand:()=>ZE,$constructor:()=>j,$input:()=>g5,$output:()=>h5,Doc:()=>ku,INVALID:()=>rn,JSONSchema:()=>Vq,JSONSchemaGenerator:()=>e1,NEVER:()=>WE,TimePrecision:()=>P5,URL_BAD_FORMAT:()=>n$,URL_UNPARSEABLE:()=>hx,ZodCompileAsyncError:()=>aa,ZodCompileUnsupportedError:()=>nt,_any:()=>H5,_array:()=>Q5,_base64:()=>jS,_base64url:()=>US,_bigint:()=>F5,_boolean:()=>z5,_catch:()=>ege,_check:()=>Pq,_cidrv4:()=>MS,_cidrv6:()=>BS,_coercedBigint:()=>L5,_coercedBoolean:()=>N5,_coercedDate:()=>K5,_coercedNumber:()=>R5,_coercedString:()=>w5,_creditCard:()=>k5,_cuid:()=>$S,_cuid2:()=>AS,_custom:()=>J5,_date:()=>q5,_decode:()=>$w,_decodeAsync:()=>Ow,_default:()=>Qhe,_discriminatedUnion:()=>Mhe,_e164:()=>VS,_email:()=>SS,_emoji:()=>ES,_encode:()=>Tw,_encodeAsync:()=>Aw,_endsWith:()=>Op,_enum:()=>Whe,_file:()=>Y5,_float32:()=>T5,_float64:()=>$5,_gt:()=>Ka,_gte:()=>Zn,_guid:()=>kS,_iban:()=>C5,_includes:()=>$p,_int:()=>E5,_int32:()=>A5,_int64:()=>M5,_intersection:()=>Bhe,_ipv4:()=>FS,_ipv6:()=>LS,_isoDate:()=>Tx,_isoDateTime:()=>Ex,_isoDuration:()=>Ax,_isoTime:()=>$x,_jwt:()=>HS,_ksuid:()=>NS,_lazy:()=>nge,_length:()=>Au,_literal:()=>Ghe,_lowercase:()=>Ep,_lt:()=>qa,_lte:()=>Wn,_mac:()=>S5,_map:()=>Vhe,_max:()=>Wn,_maxLength:()=>$u,_maxSize:()=>$c,_mime:()=>Np,_min:()=>Zn,_minLength:()=>rl,_minSize:()=>Xa,_multipleOf:()=>Tc,_nan:()=>X5,_nanoid:()=>TS,_nativeEnum:()=>Zhe,_negative:()=>ZS,_never:()=>Z5,_nonnegative:()=>qS,_nonoptional:()=>Yhe,_nonpositive:()=>GS,_normalize:()=>Fp,_null:()=>V5,_nullable:()=>Xhe,_number:()=>D5,_optional:()=>Khe,_overwrite:()=>sa,_parse:()=>bp,_parseAsync:()=>_p,_pipe:()=>tge,_positive:()=>WS,_promise:()=>ige,_properties:()=>zp,_property:()=>KS,_readonly:()=>rge,_record:()=>Uhe,_refine:()=>eA,_regex:()=>Rp,_safeDecode:()=>Nw,_safeDecodeAsync:()=>Lw,_safeEncode:()=>zw,_safeEncodeAsync:()=>Fw,_safeParse:()=>Ip,_safeParseAsync:()=>wp,_set:()=>Hhe,_size:()=>Tu,_slugify:()=>jp,_startsWith:()=>Ap,_string:()=>I5,_stringFormat:()=>Ou,_stringbool:()=>nA,_success:()=>Jhe,_superRefine:()=>tA,_symbol:()=>j5,_templateLiteral:()=>oge,_toLowerCase:()=>Mp,_toUpperCase:()=>Bp,_transform:()=>qhe,_trim:()=>Lp,_tuple:()=>jhe,_uint32:()=>O5,_uint64:()=>B5,_ulid:()=>OS,_undefined:()=>U5,_union:()=>Fhe,_unknown:()=>W5,_uppercase:()=>Tp,_url:()=>Rx,_uuid:()=>CS,_uuidv4:()=>PS,_uuidv6:()=>DS,_uuidv7:()=>RS,_void:()=>G5,_xid:()=>zS,_xor:()=>Lhe,base64Charset:()=>eS,base64urlCharset:()=>bx,canParseURL:()=>i$,clone:()=>yt,compile:()=>y5,compileFn:()=>IS,config:()=>hr,createStandardJSONSchemaMethod:()=>Up,createToJSONSchemaMethod:()=>aA,decode:()=>jfe,decodeAsync:()=>Vfe,describe:()=>rA,encode:()=>Bfe,encodeAsync:()=>Ufe,extractDefs:()=>Oc,finalize:()=>zc,flattenError:()=>sx,formatError:()=>lx,getDiscriminatedOption:()=>V$,globalConfig:()=>Qr,globalRegistry:()=>vo,handleUnrepresentable:()=>Nr,initializeContext:()=>Ac,isBackEdge:()=>hS,isRecursiveSchema:()=>pS,isValidBase64:()=>xx,isValidBase64URL:()=>tS,isValidCIDRv6:()=>Jw,isValidCreditCard:()=>rS,isValidIBAN:()=>oS,isValidIPv6:()=>vx,isValidJWT:()=>nS,locales:()=>Dx,memoizer:()=>Cx,mergeValues:()=>kp,meta:()=>oA,parse:()=>yp,parseAsync:()=>Ew,parseURLObject:()=>JZ,prettifyError:()=>XE,process:()=>It,processSchema:()=>It,regexes:()=>Si,registry:()=>yS,safeDecode:()=>Wfe,safeDecodeAsync:()=>Gfe,safeEncode:()=>Hfe,safeEncodeAsync:()=>Zfe,safeParse:()=>zfe,safeParseAsync:()=>Nfe,standardProps:()=>Kw,stripTabAndNewline:()=>gx,toDotPath:()=>$Z,toJSONSchema:()=>JS,toZod:()=>Qv,treeifyError:()=>KE,urlHostnameOk:()=>Qw,urlProtocolOk:()=>Yw,util:()=>Y,validate:()=>cx,validateAsync:()=>dx,validateURL:()=>Xw,version:()=>JT,withParser:()=>_S});var Y={};gs(Y,{BIGINT_FORMAT_RANGES:()=>rx,CONSTANT_CATCH:()=>Dw,Class:()=>zE,NUMBER_FORMAT_RANGES:()=>tx,aborted:()=>tn,allowsEval:()=>LE,assert:()=>tfe,assertEqual:()=>Que,assertIs:()=>Jue,assertNever:()=>efe,assertNotEqual:()=>Yue,assignProp:()=>go,attachSchema:()=>Pw,base64ToUint8Array:()=>CZ,base64urlToUint8Array:()=>yfe,cached:()=>gp,captureStackTrace:()=>kw,cleanEnum:()=>bfe,cleanRegex:()=>el,clone:()=>yt,cloneDef:()=>nfe,codePointLength:()=>wu,constantCatch:()=>VE,createTransparentProxy:()=>dfe,defineLazy:()=>NE,defineLazyInternal:()=>Ge,derived:()=>Sfe,esc:()=>en,escapeRegex:()=>wi,explicitlyAborted:()=>jE,extend:()=>mfe,finalizeIssue:()=>Pn,floatSafeRemainder:()=>Yv,getElementAtPath:()=>ife,getEnumValues:()=>pp,getLengthableOrigin:()=>nx,getParsedType:()=>cfe,getSizableOrigin:()=>ox,hexToUint8Array:()=>Ife,hide:()=>ix,installLazyProp:()=>Dfe,isObject:()=>Iu,isPlainObject:()=>Ii,issue:()=>xp,joinValues:()=>V,jsonStringifyReplacer:()=>hp,members:()=>UE,merge:()=>hfe,mergeDefs:()=>ia,normalizeParams:()=>ae,nullish:()=>Sw,numKeys:()=>lfe,objectClone:()=>rfe,omit:()=>ffe,optionalKeys:()=>BE,own:()=>Rc,parsedType:()=>ee,partial:()=>gfe,pick:()=>ufe,prefixIssues:()=>Cn,primitiveTypes:()=>ME,promiseAllObject:()=>afe,propertyKeyTypes:()=>ex,randomString:()=>sfe,rawShape:()=>vp,required:()=>vfe,safeExtend:()=>pfe,shallowClone:()=>Jv,slugify:()=>FE,stringifyPrimitive:()=>J,toZod:()=>Qv,uint8ArrayToBase64:()=>PZ,uint8ArrayToBase64url:()=>_fe,uint8ArrayToHex:()=>wfe,unwrapMessage:()=>mp});function Que(e){return e}function Yue(e){return e}function Qv(){return e=>e}function Jue(e){}function efe(e){throw new Error("Unexpected value in exhaustive check")}function tfe(e){}function pp(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function V(e,t="|"){return e.map(r=>J(r)).join(t)}function hp(e,t){return typeof t=="bigint"?t.toString():t}var OE=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function gp(e){return new OE(e)}function Sw(e){return e==null}function el(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Yv(e,t){let r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var IZ=Symbol("evaluating");function NE(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==IZ)return n===void 0&&(n=IZ,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function rfe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function go(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function vp(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Js(e){return vp(e._zod.def)??e._zod.def.shape}function wZ(e,t,r){Object.defineProperty(e,t,{get(){let n=r();return go(this,t,n),n},enumerable:!0,configurable:!0})}function SZ(e,t,r){t in e?go(e,t,r):e[t]=r}function _u(e,t,r,n){let o=Js(t);for(let i of r){let a=Object.getOwnPropertyDescriptor(o,i);a.enumerable&&(a.get?wZ(e,i,()=>{let s=t._zod.def.shape[i];return n?n(s,i):s}):SZ(e,i,n?n(a.value,i):a.value))}}function ofe(e,t){for(let r of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?wZ(e,r,()=>t[r]):SZ(e,r,n.value))}}function ia(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function nfe(e){return ia(e._zod.def)}function ife(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function afe(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function sfe(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function en(e){return JSON.stringify(e)}function FE(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var kw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Iu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var LE=gp(()=>{if(Qr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ii(e){if(Iu(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Iu(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Jv(e){return Ii(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function lfe(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var cfe=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ex=new Set(["string","number","symbol"]),ME=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ae(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function dfe(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function BE(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var tx={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},rx={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function ufe(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i={};return _u(i,e,Cw(e,t)),yt(e,ia(r,{shape:i,checks:[]}))}function Cw(e,t){let r=Js(e),n=[];for(let o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o)}return n}function ffe(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(Cw(e,t)),a={};return _u(a,e,Reflect.ownKeys(Js(e)).filter(s=>!i.has(s))),yt(e,ia(r,{shape:a,checks:[]}))}function mfe(e,t){if(!Ii(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=Js(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return yt(e,ia(e._zod.def,{shape:kZ(e,t)}))}function kZ(e,t){let r={};return _u(r,e,Reflect.ownKeys(Js(e))),ofe(r,t),r}function pfe(e,t){if(!Ii(t))throw new Error("Invalid input to safeExtend: expected a plain object");return yt(e,ia(e._zod.def,{shape:kZ(e,t)}))}function hfe(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};_u(r,e,Reflect.ownKeys(Js(e))),_u(r,t,Reflect.ownKeys(Js(t)));let n=ia(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return yt(e,n)}function gfe(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let s=r?new Set(Cw(t,r)):void 0,l={};return _u(l,t,Reflect.ownKeys(Js(t)),e&&((c,d)=>s&&!s.has(d)?c:new e({type:"optional",innerType:c}))),yt(t,ia(t._zod.def,{shape:l,checks:[]}))}function vfe(e,t,r){let n=r?new Set(Cw(t,r)):void 0,o={};return _u(o,t,Reflect.ownKeys(Js(t)),(i,a)=>n&&!n.has(a)?i:new e({type:"nonoptional",innerType:i})),yt(t,ia(t._zod.def,{shape:o}))}function tn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function jE(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Cn(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function mp(e){return typeof e=="string"?e:e?.message}function Pw(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function Pn(e,t,r){var n;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:mp(e.inst?._zod.def?.error?.(e))??mp(i?.(e))??mp(t?.error?.(e))??mp(r.customError?.(e))??mp(r.localeError?.(e))??"Invalid input",s={};for(let l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(s[l]=e[l]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function ox(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var xfe=/[\uD800-\uDBFF]/;function wu(e){let t=e.length;if(!xfe.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function nx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ee(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function xp(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function bfe(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function CZ(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function PZ(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function yfe(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return CZ(t+r)}function _fe(e){return PZ(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ife(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function wfe(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var zE=class{constructor(...t){}};function UE(e,t){for(let r in t){let n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):kfe(e,r,n.value)}}function Rc(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function ix(e,t,r){return Rc(e,t,r,!1)}function Sfe(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return Rc(this,r,n(this))},set(o){Rc(this,r,o)}})}return t}function kfe(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:Rc(this,t,r.bind(this))},set(n){Rc(this,t,n)}})}function Cfe(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var AE,Dc=!1,Pfe={configurable:!0,get(){Dc=!0}};function Ge(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&AE!==e._zod){AE=void 0;return}AE=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,Pfe);let o=Dc;Dc=!1;try{let i=r(this);return Dc?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),Dc=Dc||o,i}catch(i){throw delete this[t],Dc=Dc||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Dfe(e,t,r,n){let o=Cfe(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var Dw="~constantCatch";function VE(e){let t=()=>e;return t[Dw]=!0,t}var DZ,WE=Object.freeze({status:"aborted"}),HE={value:void 0,enumerable:!1},RZ="captureStackTrace"in Error?Error:null;function Rfe(e){let t=RZ;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return RZ=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function j(e,t,r,n){let o={};function i(f){this.def=f,this.constr=u,this.traits=new Set}i.prototype=o;let a=r,s=a&&new WeakSet;function l(f,m){if(f._zod){if(f._zod.traits.has(e))return}else{HE.value=new i(m);try{Object.defineProperty(f,"_zod",HE)}finally{HE.value=void 0}}if(f._zod.traits.add(e),t(f,m),s){let h=Object.getPrototypeOf(f),b=f._zod.constr.prototype,v=h;for(;v&&v!==b;)v=Object.getPrototypeOf(v);let x=v??h;s.has(x)||(s.add(x),UE(x,a))}let p=u.prototype;for(let h in p)Object.prototype.hasOwnProperty.call(p,h)&&(h in f||(f[h]=p[h].bind(f)))}let c=n?.Parent??Object;class d extends c{}Object.defineProperty(d,"name",{value:e});function u(f){let m=n?.Parent?Rfe(d):this;l(m,f);let p=m._zod.deferred;if(p){for(let b of p)b();m._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(m),m}return Object.defineProperty(u,"init",{value:l}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}var ZE=Symbol("zod_brand"),Dn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ec=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(DZ=globalThis).__zod_globalConfig??(DZ.__zod_globalConfig={});var Qr=globalThis.__zod_globalConfig;function hr(e){return e&&Object.assign(Qr,e),Qr}function Efe(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,hp,2)),e.message}function Tfe(e){this._zod.message=e}var $fe={get:Efe,set:Tfe,enumerable:!0,configurable:!0},qE={value:void 0,enumerable:!1},EZ=new WeakSet([Object.prototype,Error.prototype]),TZ=(e,t)=>{e.name="$ZodError",qE.value=t,Object.defineProperty(e,"issues",qE),qE.value=void 0,Object.defineProperty(e,"message",$fe);let r=Object.getPrototypeOf(e);EZ.has(r)||(EZ.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},ax=j("$ZodError",TZ),Rn=j("$ZodError",TZ,void 0,{Parent:Error});function Afe(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function sx(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?Afe(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function lx(e,t=r=>r.message){let r={_errors:[]},n=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let l=r,c=0;for(;c<s.length;){let d=s[c],u=c===s.length-1;if(d==="_errors"){u&&l._errors.push(t(a)),c++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let f=l[d];u&&f._errors.push(t(a)),l=f,c++}}}};return n(e),r}function KE(e,t=r=>r.message){let r={errors:[]},n=(o,i=[])=>{var a;for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>n({issues:l},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let l=[...i,...s.path];if(l.length===0){r.errors.push(t(s));continue}let c=r,d=0;for(;d<l.length;){let u=l[d],f=d===l.length-1;typeof u=="string"?(c.properties??(c.properties={}),Object.prototype.hasOwnProperty.call(c.properties,u)||Object.defineProperty(c.properties,u,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),c=c.properties[u]):(c.items??(c.items=[]),(a=c.items)[u]??(a[u]={errors:[]}),c=c.items[u]),f&&c.errors.push(t(s)),d++}}};return n(e),r}function $Z(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function XE(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${$Z(n.path)}`);return t.join(`
60
+ `)}function Rw(e,t){return{callee:t?.callee??e,Err:t?.Err}}var bp=e=>{let t=(r,n,o,i)=>{let a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new Dn;if(s.issues.length){let l=new(i?.Err??e)(s.issues.map(c=>Pn(c,a,hr())));throw kw(l,i?.callee??t),l}return s.value};return t},yp=bp(Rn),_p=e=>{let t=async(r,n,o,i)=>{let a=o?{...o,async:!0}:{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let l=new(i?.Err??e)(s.issues.map(c=>Pn(c,a,hr())));throw kw(l,i?.callee??t),l}return s.value};return t},Ew=_p(Rn),Ip=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Dn;return i.issues.length?AZ(e,i.issues,o):{success:!0,data:i.value}},zfe=Ip(Rn);function AZ(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>Pn(o,r,hr()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var wp=e=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?AZ(e,i.issues,o):{success:!0,data:i.value}},Nfe=wp(Rn),Ffe=Symbol.for("zod.compile.invalid"),Lfe=Symbol.for("zod.compile.fallback"),cx=((e,t,r)=>{let n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==Ffe)return!0;if(n.definite===!0&&r===void 0)return!1}return Mfe(e,t,r)});function Mfe(e,t,r){let n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun,i;if(o?(n[Lfe]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new Dn;return i.issues.length===0}var dx=async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Tw=e=>{let t=bp(e),r=(n,o,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,s,Rw(r,a))};return r},Bfe=Tw(Rn),$w=e=>{let t=bp(e),r=(n,o,i,a)=>t(n,o,i,Rw(r,a));return r},jfe=$w(Rn),Aw=e=>{let t=_p(e),r=async(n,o,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,s,Rw(r,a))};return r},Ufe=Aw(Rn),Ow=e=>{let t=_p(e),r=async(n,o,i,a)=>await t(n,o,i,Rw(r,a));return r},Vfe=Ow(Rn),zw=e=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Ip(e)(t,r,o)},Hfe=zw(Rn),Nw=e=>(t,r,n)=>Ip(e)(t,r,n),Wfe=Nw(Rn),Fw=e=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return wp(e)(t,r,o)},Zfe=Fw(Rn),Lw=e=>async(t,r,n)=>wp(e)(t,r,n),Gfe=Lw(Rn);var Si={};gs(Si,{anyString:()=>wT,base64:()=>pT,base64url:()=>hT,bigint:()=>kT,boolean:()=>CT,browserEmail:()=>tme,cidrv4:()=>fT,cidrv6:()=>mT,creditCard:()=>Mw,cuid:()=>YE,cuid2:()=>JE,currencyCode:()=>bT,date:()=>yT,datetime:()=>IT,domain:()=>vT,duration:()=>iT,e164:()=>xT,email:()=>sT,emoji:()=>lT,extendedDuration:()=>qfe,guid:()=>aT,hex:()=>TT,hostname:()=>gT,html5Email:()=>Yfe,httpProtocol:()=>ux,iban:()=>Bw,idnEmail:()=>eme,integer:()=>fx,ipv4:()=>cT,ipv6:()=>dT,ksuid:()=>rT,lowercase:()=>RT,mac:()=>uT,md5_base64:()=>ime,md5_base64url:()=>ame,md5_hex:()=>nme,nanoid:()=>oT,nanoidOfLength:()=>nT,null:()=>PT,number:()=>tl,rfc5322Email:()=>Jfe,sha1_base64:()=>lme,sha1_base64url:()=>cme,sha1_hex:()=>sme,sha256_base64:()=>ume,sha256_base64url:()=>fme,sha256_hex:()=>dme,sha384_base64:()=>pme,sha384_base64url:()=>hme,sha384_hex:()=>mme,sha512_base64:()=>vme,sha512_base64url:()=>xme,sha512_hex:()=>gme,string:()=>ST,time:()=>_T,ulid:()=>eT,undefined:()=>DT,unicodeEmail:()=>OZ,uppercase:()=>ET,uuid:()=>Su,uuid4:()=>Kfe,uuid6:()=>Xfe,uuid7:()=>Qfe,xid:()=>tT});var YE=/^[cC][0-9a-z]{6,}$/,JE=/^[0-9a-z]+$/,eT=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tT=/^[0-9a-vA-V]{20}$/,rT=/^[A-Za-z0-9]{27}$/,oT=/^[a-zA-Z0-9_-]{21}$/;function nT(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var iT=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qfe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,aT=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Su=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Kfe=Su(4),Xfe=Su(6),Qfe=Su(7),sT=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Yfe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Jfe=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,OZ=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,eme=OZ,tme=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rme="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function lT(){return new RegExp(rme,"u")}var cT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,dT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,uT=e=>{let t=wi(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},fT=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,mT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hT=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,gT=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,vT=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,ux=/^https?$/,xT=/^\+[1-9]\d{6,14}$/,Mw=/^\d(?:[ -]?\d){11,18}$/,bT=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Bw=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,zZ="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function ome(e){return new RegExp(`^${e}$`)}var yT=ome(zZ);function QE(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _T(e){return new RegExp(`^${QE(e)}$`)}function IT(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${QE({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${QE({precision:e.precision})}`:r;return new RegExp(`^${zZ}T(?:${n})$`)}var wT=/^[\s\S]{0,}$/,ST=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},kT=/^-?\d+n?$/,fx=/^-?\d+$/,tl=/^-?\d+(?:\.\d+)?$/,CT=/^(?:true|false)$/i,PT=/^null$/i;var DT=/^undefined$/i;var RT=/^[^A-Z]*$/,ET=/^[^a-z]*$/,TT=/^[0-9a-fA-F]*$/;function mx(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function px(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var nme=/^[0-9a-fA-F]{32}$/,ime=mx(22,"=="),ame=px(22),sme=/^[0-9a-fA-F]{40}$/,lme=mx(27,"="),cme=px(27),dme=/^[0-9a-fA-F]{64}$/,ume=mx(43,"="),fme=px(43),mme=/^[0-9a-fA-F]{96}$/,pme=mx(64,""),hme=px(64),gme=/^[0-9a-fA-F]{128}$/,vme=mx(86,"=="),xme=px(86);var Dt=j("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),$T=e=>{let t=e.value;return!Sw(t)&&t.size!==void 0},AT=e=>{let t=e.value;return!Sw(t)&&t.length!==void 0},jw={number:"number",bigint:"bigint",object:"date"},Vw=j("$ZodCheckLessThan",(e,t)=>{Dt.init(e,t);let r=jw[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:jw[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Hw=j("$ZodCheckGreaterThan",(e,t)=>{Dt.init(e,t);let r=jw[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:jw[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),OT=j("$ZodCheckMultipleOf",(e,t)=>{Dt.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):Yv(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),zT=j("$ZodCheckNumberFormat",(e,t)=>{Dt.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=tx[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),NT=j("$ZodCheckBigIntFormat",(e,t)=>{Dt.init(e,t);let[r,n]=rx[t.format];e._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),FT=j("$ZodCheckMaxSize",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=$T),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:ox(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),LT=j("$ZodCheckMinSize",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=$T),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:ox(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),MT=j("$ZodCheckSizeEquals",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=$T),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:ox(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),BT=j("$ZodCheckMaxLength",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=AT),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?wu(o):i)<=t.maximum)return;let s=nx(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),jT=j("$ZodCheckMinLength",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=AT),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?wu(o):i)>=t.minimum)return;let s=nx(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),UT=j("$ZodCheckLengthEquals",(e,t)=>{var r;Dt.init(e,t),(r=e._zod.def).when??(r.when=AT),e._zod.check=n=>{let o=n.value,i=o.length,a=typeof o=="string"&&i>=t.length&&i<=t.length*2?wu(o):i;if(a===t.length)return;let s=nx(o),l=a>t.length;n.issues.push({origin:s,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Sp=j("$ZodCheckStringFormat",(e,t)=>{var r,n;Dt.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),VT=j("$ZodCheckRegex",(e,t)=>{Sp.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),HT=j("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=RT),Sp.init(e,t)}),WT=j("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ET),Sp.init(e,t)}),ZT=j("$ZodCheckIncludes",(e,t)=>{Dt.init(e,t);let r=wi(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),GT=j("$ZodCheckStartsWith",(e,t)=>{Dt.init(e,t);let r=new RegExp(`^${wi(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),qT=j("$ZodCheckEndsWith",(e,t)=>{Dt.init(e,t);let r=new RegExp(`.*${wi(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Uw(e,t,r){e.issues.length&&t.issues.push(...Cn(r,e.issues))}var KT=j("$ZodCheckProperty",(e,t)=>{Dt.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>Uw(o,r,t.property));Uw(n,r,t.property)}}),XT=j("$ZodCheckProperties",(e,t)=>{Dt.init(e,t),ix(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let o=n.value,i;for(let[a,s]of r){let l=s._zod.run({value:o[a],issues:[]},{});l instanceof Promise?(i??(i=[]),i.push(l.then(c=>Uw(c,n,a)))):Uw(l,n,a)}if(i)return Promise.all(i).then(()=>{})}}),QT=j("$ZodCheckMimeType",(e,t)=>{Dt.init(e,t);let r=new Set(t.mime);e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),YT=j("$ZodCheckOverwrite",(e,t)=>{Dt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var ku=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
61
+ `).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),i=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
62
+ ${r.join(`
63
+ `)}
64
+ };`)(...Object.values(this.closed))}};var JT={major:4,minor:6,patch:5};var Me=j("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=JT;let n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let a of i._zod.onattach)a(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(s,l,c)=>{if(s.memo)return s;let d=tn(s),u;for(let f of l){if(f._zod.def.when){if(jE(s)||!f._zod.def.when(s))continue}else if(d)continue;let m=s.issues.length,p=f._zod.check(s);if(p instanceof Promise&&c?.async===!1)throw new Dn;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,s.issues.length!==m&&(Pw(s.issues,m,e),d||(d=tn(s,m)))});else{if(s.issues.length===m)continue;Pw(s.issues,m,e),d||(d=tn(s,m))}}return u?u.then(()=>s):s},a=(s,l,c)=>{if(tn(s))return s.aborted=!0,s;let d=i(l,o,c);if(d instanceof Promise){if(c.async===!1)throw new Dn;return d.then(u=>e._zod.parse(u,c))}return e._zod.parse(d,c)};e._zod.run=(s,l)=>{if(l.skipChecks)return e._zod.parse(s,l);if(l.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return d instanceof Promise?d.then(u=>a(u,s,l)):a(d,s,l)}let c=e._zod.parse(s,l);if(c instanceof Promise){if(l.async===!1)throw new Dn;return c.then(d=>i(d,o,l))}return i(c,o,l)}}},{get"~standard"(){return ix(this,"~standard",Kw(this))},set"~standard"(e){Rc(this,"~standard",e)}}),YZ=(e,t)=>e.issues.length?{issues:e.issues.map(r=>Pn(r,t,hr()))}:{value:e.value};async function bme(e,t){let r={async:!0};return YZ(await e._zod.run({value:t,issues:[]},r),r)}function Kw(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return YZ(n,r)}catch{}return bme(e,t)},vendor:"zod",version:1}}var Cu=j("$ZodString",(e,t)=>{Me.init(e,t),e._zod.pattern=t.pattern??wT,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),_t=j("$ZodStringFormat",(e,t)=>{Sp.init(e,t),Cu.init(e,t)}),t$=j("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=aT),_t.init(e,t)}),r$=j("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Su(n))}else t.pattern??(t.pattern=Su());_t.init(e,t)}),o$=j("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=sT),_t.init(e,t)}),n$=1,hx=2;function i$(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Xw(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?i$(e)||hx:JZ(e,t)}function JZ(e,t){if(!t.normalize&&t.protocol?.source===ux.source&&!/^https?:\/\//i.test(e))return n$;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??hx}return new URL(e)}catch{return hx}}var yme=/[\t\n\r]/g;function gx(e){return e.replace(yme,"")}function Qw(e,t){return t.lastIndex=0,t.test(e.hostname)}function Yw(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var a$=j("$ZodURL",(e,t)=>{_t.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=Xw(n,t);if(o===n$){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===hx){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(o===!0){r.value=gx(n);return}t.hostname&&!Qw(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!Yw(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:gx(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),s$=j("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=lT()),_t.init(e,t)}),l$=j("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?oT:nT(t.length)),_t.init(e,t)}),c$=j("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=YE),_t.init(e,t)}),d$=j("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=JE),_t.init(e,t)}),u$=j("$ZodULID",(e,t)=>{t.pattern??(t.pattern=eT),_t.init(e,t)}),f$=j("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tT),_t.init(e,t)}),m$=j("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=rT),_t.init(e,t)}),p$=j("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=IT(t)),_t.init(e,t)}),h$=j("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=yT),_t.init(e,t)}),g$=j("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=_T(t)),_t.init(e,t)}),v$=j("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=iT),_t.init(e,t)}),x$=j("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=cT),_t.init(e,t)}),_me=/^[0-9a-fA-F:.]+$/;function vx(e){return _me.test(e)?i$(`http://[${e}]`):!1}var b$=j("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=dT),_t.init(e,t),e._zod.check=r=>{vx(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),y$=j("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=uT(t.delimiter)),_t.init(e,t)}),_$=j("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=fT),_t.init(e,t)});function Jw(e){let t=e.split("/");if(t.length!==2)return!1;let[r,n]=t;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:vx(r)}var I$=j("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=mT),_t.init(e,t),e._zod.check=r=>{Jw(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function xx(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var eS=/^[0-9a-zA-Z+/]*={0,2}$/,w$=j("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=eS),_t.init(e,t),e._zod.check=r=>{xx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),bx=/^[A-Za-z0-9_-]*$/;function tS(e){if(!bx.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return xx(r)}var S$=j("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=bx),_t.init(e,t),e._zod.check=r=>{tS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),k$=j("$ZodE164",(e,t)=>{t.pattern??(t.pattern=xT),_t.init(e,t)}),Ime=/[- ]/g;function wme(e){let t=e.length,r=1,n=0;for(;t;){let o=e.charCodeAt(--t)-48;r^=1,n+=r?[0,2,4,6,8,1,3,5,7,9][o]:o}return n%10===0}function rS(e){return Mw.test(e)?wme(e.replace(Ime,"")):!1}var C$=j("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Mw),_t.init(e,t),e._zod.check=r=>{rS(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function Sme(e){let t=0,r=e.length;for(let n=4;n<r;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}for(let n=0;n<4;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}return t===1}function oS(e){return Bw.test(e)?Sme(e):!1}var P$=j("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Bw),_t.init(e,t),e._zod.check=r=>{oS(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function nS(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var D$=j("$ZodJWT",(e,t)=>{_t.init(e,t),e._zod.check=r=>{nS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),R$=j("$ZodCustomStringFormat",(e,t)=>{_t.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),iS=j("$ZodNumber",(e,t)=>{Me.init(e,t),e._zod.pattern=tl,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),E$=j("$ZodNumberFormat",(e,t)=>{zT.init(e,t),iS.init(e,t)}),yx=j("$ZodBoolean",(e,t)=>{Me.init(e,t),e._zod.pattern=CT,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),aS=j("$ZodBigInt",(e,t)=>{Me.init(e,t),e._zod.pattern=kT,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),T$=j("$ZodBigIntFormat",(e,t)=>{NT.init(e,t),aS.init(e,t)}),$$=j("$ZodSymbol",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r}}),A$=j("$ZodUndefined",(e,t)=>{Me.init(e,t),e._zod.pattern=DT,e._zod.values=new Set([void 0]),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r}}),O$=j("$ZodNull",(e,t)=>{Me.init(e,t),e._zod.pattern=PT,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),z$=j("$ZodAny",(e,t)=>{Me.init(e,t),e._zod.parse=r=>r}),N$=j("$ZodUnknown",(e,t)=>{Me.init(e,t),e._zod.parse=r=>r}),F$=j("$ZodNever",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),L$=j("$ZodVoid",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),M$=j("$ZodDate",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function FZ(e,t,r){e.issues.length&&t.issues.push(...Cn(r,e.issues)),t.value[r]=e.value}var B$=j("$ZodArray",(e,t)=>{Me.init(e,t);let r=Qr.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);let a=[],s=o?.abortEarly;for(let l=0;l<i.length;l++){let c=i[l],d=t.element._zod.run({value:c,issues:[]},o);if(d instanceof Promise)a.push(d.then(u=>FZ(u,n,l)));else if(FZ(d,n,l),s&&d.issues.length!==0&&tn(d))break}return a.length?Promise.all(a).then(()=>n):n}});function qw(e,t,r,n,o,i){let a=r in n,s=i==="optional";if(!(!a&&s&&o==="optional")){if(e.issues.length){if(o!==void 0&&s&&!a)return;t.issues.push(...Cn(r,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(a||o==="defaulted"&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}var kme=[];function eG(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:kme,o=n.length?[...t,...n]:t;for(let a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let i=BE(e.shape);return{...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function tG(e,t,r,n,o,i,a){let s=[],l=o.keySet,c=o.catchall._zod,d=c.def.type,u=c.optin,f=c.optout,m=0;for(let p in t){if(a&&r.issues.length!==m){if(tn(r,m))break;m=r.issues.length}if(l.has(p))continue;if(p==="__proto__"){d==="never"&&s.push(p);continue}if(d==="never"){s.push(p);continue}let h=c.run({value:t[p],issues:[]},n);h instanceof Promise?e.push(h.then(b=>qw(b,r,p,t,u,f))):qw(h,r,p,t,u,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var rG=j("$ZodObject",(e,t)=>{Me.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){let c=()=>{let d={...n};return Object.defineProperty(t,"shape",{value:d}),c.raw=d,d};c.raw=n,Object.defineProperty(t,"shape",{get:c})}let o=gp(()=>eG(t));Ge(e,"propValues",c=>{let d=c.def.shape,u={};for(let f in d){let m=d[f]._zod;if(m.values){Object.prototype.hasOwnProperty.call(u,f)||go(u,f,new Set);for(let p of m.values)u[f].add(p);m.optin!==void 0&&u[f].add(void 0)}}return u});let i=Iu,a=t.catchall,s,l=Qr.memoizer;l?.attach(e),e._zod.parse=(c,d)=>{s??(s=o.value);let u=c.value;if(!i(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),c;c.value=l?l.alloc(e,c,{},d):{};let f=[],m=s.shape,p=d?.abortEarly,h=c.issues.length;for(let b of s.allKeys){if(p&&c.issues.length!==h){if(tn(c,h))break;h=c.issues.length}if(b==="__proto__")continue;let v=m[b],x=v._zod.optin,_=v._zod.optout,I=v._zod.run({value:u[b],issues:[]},d);I instanceof Promise?f.push(I.then(S=>qw(S,c,b,u,x,_))):qw(I,c,b,u,x,_)}return a?tG(f,u,c,d,o.value,e,p===!0):f.length?Promise.all(f).then(()=>c):c}}),j$=j("$ZodObjectJIT",(e,t)=>{rG.init(e,t);let r=e._zod.parse,n=gp(()=>eG(t)),o=Qr.memoizer,i=m=>{let p=n.value,h=p.symbolKeys,b=new ku(["payload","ctx"],{shape:m,inst:e,memo:o,syms:h}),v=S=>`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`,x=(S,w)=>`
65
+ let ${S}_ab = false;
66
+ for (let i = 0; i < ${S}.issues.length; i++) {
67
+ const iss = ${S}.issues[i];
68
+ iss.path = iss.path ? [${w}, ...iss.path] : [${w}];
69
+ payload.issues.push(iss);
70
+ if (iss.continue !== true) ${S}_ab = true;
71
+ }
72
+ if (${S}_ab && ctx && ctx.abortEarly) {
73
+ payload.value = newResult;
74
+ return payload;
75
+ }`;b.write("const input = payload.value;");let _=Object.create(null),I=0;for(let S of p.allKeys)_[S]=`key_${I++}`;b.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let S of p.allKeys){if(S==="__proto__")continue;let w=_[S],P=typeof S=="symbol"?`syms[${h.indexOf(S)}]`:en(S),E=`${P} in input`,B=m[S],H=B?._zod?.optin,Z=H!==void 0,K=B?._zod?.optout==="optional";if(b.write(`const ${w} = ${v(P)};`),Z&&K){let T=H==="optional"?`${w}_present`:`${w}.value !== undefined || ${w}_present`;b.write(`
76
+ const ${w}_present = ${E};
77
+ if (!${w}.issues.length || ${w}_present) {
78
+ if (${w}.issues.length) {${x(w,P)}
79
+ }
80
+
81
+ if (${T}) {
82
+ newResult[${P}] = ${w}.value;
83
+ }
84
+ }
85
+
86
+ `)}else Z?(b.write(`
87
+ if (${w}.issues.length) {${x(w,P)}
88
+ }
89
+ `),H==="defaulted"?b.write(`newResult[${P}] = ${w}.value;`):b.write(`
90
+ if (${w}.value !== undefined || ${E}) {
91
+ newResult[${P}] = ${w}.value;
92
+ }
93
+ `)):b.write(`
94
+ const ${w}_present = ${E};
95
+ if (${w}.issues.length) {${x(w,P)}
96
+ }
97
+ if (!${w}_present && !${w}.issues.length) {
98
+ payload.issues.push({
99
+ code: "invalid_type",
100
+ expected: "nonoptional",
101
+ input: undefined,
102
+ path: [${P}]
103
+ });
104
+ if (ctx && ctx.abortEarly) {
105
+ payload.value = newResult;
106
+ return payload;
107
+ }
108
+ }
109
+
110
+ if (${w}_present) {
111
+ newResult[${P}] = ${w}.value;
112
+ }
113
+
114
+ `)}return b.write("payload.value = newResult;"),b.write("return payload;"),b.compile()},a,s=Iu,l=!Qr.jitless,d=l&&LE.value,u=t.catchall,f;e._zod.parse=(m,p)=>{f??(f=n.value);let h=m.value;return s(h)?l&&d&&p?.async===!1&&p.jitless!==!0?(a||(a=i(t.shape)),m=a(m,p),u?tG([],h,m,p,f,e,p?.abortEarly===!0):m):r(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function LZ(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!tn(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Pn(a,n,hr())))}),t)}var _x=j("$ZodUnion",(e,t)=>{Me.init(e,t),Ge(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Ge(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ge(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),Ge(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>el(i.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)a.push(l),i=!0;else{if(l.issues.length===0)return l;a.push(l)}}return i?Promise.all(a).then(s=>LZ(s,n,e,o)):LZ(a,n,e,o)}});function MZ(e,t,r,n){let o=[];for(let i=0;i<e.length;i++)e[i].issues.length===0&&o.push(i);return o.length===1?(t.value=e[o[0]].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Pn(a,n,hr())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:o}),t)}var U$=j("$ZodXor",(e,t)=>{_x.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(a.push(l),i=!0):a.push(l)}return i?Promise.all(a).then(s=>MZ(s,n,e,o)):MZ(a,n,e,o)}});function V$(e,t){let r=e._zod,n=r.bag.optionsMap;n||(n=oG(r.def),r.bag.optionsMap=n);let o=n.get(t);if(o===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return o}function oG(e){let t=new Map;for(let r of e.options){let n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,r)}return t}var H$=j("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,_x.init(e,t);let r=e._zod.parse;Ge(e,"propValues",o=>{let i={},a=0;for(let s of o.def.options){let l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(s)}"`);l[o.def.discriminator]?.has(void 0)&&a++;for(let[c,d]of Object.entries(l)){Object.prototype.hasOwnProperty.call(i,c)||go(i,c,new Set);for(let u of d)i[c].add(u)}}return!o.def.unionFallback&&a>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{let a=vp(o._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=gp(()=>oG(t));e._zod.parse=(o,i)=>{let a=o.value;if(!Iu(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=a?.[t.discriminator],l=n.value.get(s);return l&&(s!==void 0||i.direction!=="backward")?l._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(c=>n.value.get(c)!==null),input:a,path:[t.discriminator],inst:e}),o)}}),W$=j("$ZodIntersection",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>BZ(r,l,c)):BZ(r,i,a)}});function kp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ii(e)&&Ii(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let a=kp(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],a=kp(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function BZ(e,t,r){let n=new Map,o,i=new Map,a=(c,d)=>{let u;if(c.code==="unrecognized_keys"&&!c.path?.length)o??(o=c),u=c.keys;else if(c.code==="invalid_key"&&c.origin==="record"&&c.path?.length===1){let f=String(c.path[0]);i.has(f)||i.set(f,c),u=[f]}else return!1;for(let f of u)n.has(f)||n.set(f,{}),n.get(f)[d]=!0;return!0};for(let c of t.issues)a(c,"l")||e.issues.push(c);for(let c of r.issues)a(c,"r")||e.issues.push(c);let s=[...n].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length){let c=o?s.filter(d=>o.keys.includes(d)):[];c.length&&e.issues.push({...o,keys:c});for(let d of s)!c.includes(d)&&i.has(d)&&e.issues.push(i.get(d))}let l=kp(t.value,r.value);if(!l.valid){if(tn(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}var sS=j("$ZodTuple",(e,t)=>{Me.init(e,t);let r=t.items,n=Qr.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{let a=o.value;if(!Array.isArray(a))return o.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];let s=[],l=jZ(r,"optin"),c=jZ(r,"optout");if(!t.rest){if(a.length<l)return o.issues.push({code:"too_small",minimum:l,inclusive:!0,input:a,inst:e,origin:"array"}),o;a.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}let d=new Array(r.length),u=t.rest?i?.abortEarly:void 0,f=!1;for(let m=0;m<r.length;m++){let p=r[m]._zod.run({value:a[m],issues:[]},i);p instanceof Promise?s.push(p.then(h=>{d[m]=h})):(d[m]=p,u&&!f&&p.issues.length&&(f=tn(p)))}if(t.rest&&!f){let m=r.length-1,p=a.slice(r.length),h=o.issues.length;for(let b of p){if(u&&o.issues.length!==h){if(tn(o,h))break;h=o.issues.length}m++;let v=t.rest._zod.run({value:b,issues:[]},i);v instanceof Promise?s.push(v.then(x=>UZ(x,o,m))):UZ(v,o,m)}}return s.length?Promise.all(s).then(()=>VZ(d,o,r,a,c)):VZ(d,o,r,a,c)}});function jZ(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function UZ(e,t,r){e.issues.length&&t.issues.push(...Cn(r,e.issues)),t.value[r]=e.value}function VZ(e,t,r,n,o){for(let i=0;i<r.length;i++){let a=e[i],s=i<n.length;if(!s&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(a.issues.length){if(!s&&i>=o){t.value.length=i;break}t.issues.push(...Cn(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var Z$=j("$ZodRecord",(e,t)=>{Me.init(e,t);let r=Qr.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Ii(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};let l=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){if(l.add(typeof d=="number"?d.toString():d),d==="__proto__")continue;let u=t.keyType._zod.run({value:d,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Pn(p,o,hr())),input:d,path:[d],inst:e});continue}let f=u.value;if(f==="__proto__")continue;let m=t.valueType._zod.run({value:i[d],issues:[]},o);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Cn(d,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Cn(d,m.issues)),n.value[f]=m.value)}let c;for(let d in i)if(!l.has(d))if(t.mode==="loose"){if(d==="__proto__")continue;n.value[d]=i[d]}else c=c??[],c.push(d);c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let l;for(let c of Reflect.ownKeys(i)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,c))continue;let d=t.keyType._zod.run({value:c,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&tl.test(c)&&d.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?n.value[c]=i[c]:s?(l=l??[],l.push(c)):n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>Pn(p,o,hr())),input:c,path:[c],inst:e});continue}let f=d.value;if(f==="__proto__")continue;let m=t.valueType._zod.run({value:i[c],issues:[]},o);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Cn(c,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Cn(c,m.issues)),n.value[f]=m.value)}l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:l,continue:!0})}return a.length?Promise.all(a).then(()=>n):n}}),G$=j("$ZodMap",(e,t)=>{Me.init(e,t);let r=Qr.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let a=[];n.value=r?r.alloc(e,n,new Map,o):new Map;let s=o?.abortEarly,l=n.issues.length;for(let[c,d]of i){if(s&&n.issues.length!==l){if(tn(n,l))break;l=n.issues.length}let u=t.keyType._zod.run({value:c,issues:[]},o),f=t.valueType._zod.run({value:d,issues:[]},o);u instanceof Promise||f instanceof Promise?a.push(Promise.all([u,f]).then(([m,p])=>{HZ(m,p,n,c,i,e,o)})):HZ(u,f,n,c,i,e,o)}return a.length?Promise.all(a).then(()=>n):n}});function HZ(e,t,r,n,o,i,a){e.issues.length&&(ex.has(typeof n)?r.issues.push(...Cn(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(s=>Pn(s,a,hr()))})),t.issues.length&&(ex.has(typeof n)?r.issues.push(...Cn(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:t.issues.map(s=>Pn(s,a,hr()))})),r.value.set(e.value,t.value)}var q$=j("$ZodSet",(e,t)=>{Me.init(e,t);let r=Qr.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let a=[];n.value=r?r.alloc(e,n,new Set,o):new Set;let s=o?.abortEarly,l=n.issues.length;for(let c of i){if(s&&n.issues.length!==l){if(tn(n,l))break;l=n.issues.length}let d=t.valueType._zod.run({value:c,issues:[]},o);d instanceof Promise?a.push(d.then(u=>WZ(u,n))):WZ(d,n)}return a.length?Promise.all(a).then(()=>n):n}});function WZ(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var K$=j("$ZodEnum",(e,t)=>{Me.init(e,t);let r=pp(t.entries),n=new Set(r);e._zod.values=n,Ge(e,"pattern",o=>{let i=pp(o.def.entries).filter(a=>ex.has(typeof a));return new RegExp(i.length?`^(${i.map(a=>wi(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{let a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),X$=j("$ZodLiteral",(e,t)=>{Me.init(e,t);let r=new Set(t.values);e._zod.values=r,Ge(e,"pattern",n=>{let o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?wi(i):i?wi(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),Q$=j("$ZodFile",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),Y$=j("$ZodTransform",(e,t)=>{Me.init(e,t),e._zod.optin="optional",Qr.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ec(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(r.value=a,r));if(o instanceof Promise)throw new Dn;return r.value=o,r}});function ZZ(e,t){return e.value=t.issues.length?void 0:t.value,e}var lS=j("$ZodOptional",(e,t)=>{Me.init(e,t),Ge(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Ge(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),Ge(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${el(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>ZZ(r,i)):ZZ(r,o)}return t.innerType._zod.run(r,n)}}),J$=j("$ZodExactOptional",(e,t)=>{lS.init(e,t),Ge(e,"values",r=>r.def.innerType._zod.values),Ge(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),e5=j("$ZodNullable",(e,t)=>{Me.init(e,t),Ge(e,"optin",r=>r.def.innerType._zod.optin),Ge(e,"optout",r=>r.def.innerType._zod.optout),Ge(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${el(n.source)}|null)$`):void 0}),Ge(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),t5=j("$ZodDefault",(e,t)=>{Me.init(e,t),e._zod.optin="defaulted",Ge(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>GZ(i,t)):GZ(o,t)}});function GZ(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var r5=j("$ZodPrefault",(e,t)=>{Me.init(e,t),e._zod.optin="defaulted",Ge(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),o5=j("$ZodNonOptional",(e,t)=>{Me.init(e,t),Ge(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>qZ(i,e)):qZ(o,e)}});function qZ(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var n5=j("$ZodSuccess",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ec("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.issues.length===0,r)):(r.value=o.issues.length===0,r)}});function KZ(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>Pn(o,n,hr()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var i5=j("$ZodCatch",(e,t)=>{Me.init(e,t),Ge(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ge(e,"optout",r=>r.def.innerType._zod.optout),Ge(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>KZ(r,i,t,n)):KZ(r,o,t,n)}}),a5=j("$ZodNaN",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),cS=j("$ZodPipe",(e,t)=>{Me.init(e,t),Ge(e,"values",r=>r.def.in._zod.values),Ge(e,"optin",r=>r.def.in._zod.optin),Ge(e,"optout",r=>r.def.out._zod.optout),Ge(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>Ww(a,t.in,n)):Ww(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Ww(i,t.out,n)):Ww(o,t.out,n)}});function Ww(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var Ix=j("$ZodCodec",(e,t)=>{Me.init(e,t),Ge(e,"values",r=>r.def.in._zod.values),Ge(e,"optin",r=>r.def.in._zod.optin),Ge(e,"optout",r=>r.def.out._zod.optout),Ge(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>Zw(a,t,n)):Zw(i,t,n)}else{let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>Zw(a,t,n)):Zw(i,t,n)}}});function Zw(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>Gw(e,i,t.out,r)):Gw(e,o,t.out,r)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>Gw(e,i,t.in,r)):Gw(e,o,t.in,r)}}function Gw(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var s5=j("$ZodPreprocess",(e,t)=>{cS.init(e,t)}),l5=j("$ZodReadonly",(e,t)=>{Me.init(e,t),Ge(e,"propValues",r=>r.def.innerType._zod.propValues),Ge(e,"values",r=>r.def.innerType._zod.values),Ge(e,"optin",r=>r.def.innerType?._zod?.optin),Ge(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(XZ):XZ(o)}});function XZ(e){return e.memo||(e.value=Object.freeze(e.value)),e}function Cme(e){let t=e._zod.def,r=t.pattern,n=!!t.format?.includes("int"),o,i;for(let s of t.checks??[]){let l=s._zod.def;l.pattern&&(r=l.pattern),n||(n=!!l.format?.includes("int"));let c=l.minimum??l.length,d=l.maximum??l.length;c!==void 0&&(o===void 0||c>o)&&(o=c),d!==void 0&&(i===void 0||d<i)&&(i=d)}if(r)return r.source;if(o!==void 0&&i!==void 0&&o>i)return"(?!)";if(o!==void 0||i!==void 0)return ST({minimum:o,maximum:i}).source;let a=e._zod.pattern;return(n&&a===tl?fx:a)?.source}function e$(e){let t=e._zod.def,r=e._zod.pattern?.source,n=t.innerType??e._zod.innerType;if(n){let o=n._zod.pattern?.source,i=e$(n);return r&&o&&i&&i!==o?r.replace(el(o),()=>el(i)):r}if(t.options){let o=t.options.map(e$);if(o.every(Boolean))return`^(${o.map(i=>el(i)).join("|")})$`}return Cme(e)}var c5=j("$ZodTemplateLiteral",(e,t)=>{Me.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){let o=e$(n);if(!o)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);r.push(el(o))}else if(n===null||ME.has(typeof n))r.push(wi(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),d5=j("$ZodFunction",(e,t)=>(Me.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=e._def.input?yp(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?yp(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=e._def.input?await Ew(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await Ew(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new sS({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),u5=j("$ZodPromise",(e,t)=>{Me.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),wx=j("$ZodLazy",(e,t)=>{Me.init(e,t),NE(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),Ge(e,"pattern",r=>r.innerType?._zod?.pattern),Ge(e,"propValues",r=>r.innerType?._zod?.propValues),Ge(e,"optin",r=>r.innerType?._zod?.optin??void 0),Ge(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),f5=j("$ZodCustom",(e,t)=>{Dt.init(e,t),Me.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>QZ(i,r,n,e));QZ(o,r,n,e)}});function QZ(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(xp(o))}}var mS=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},p5="~memo",iG=[];function aG(e){return e!==null&&typeof e=="object"}function m5(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var sG=new WeakMap,Cp=0,fS=1,Sx=2;function kx(e,t,r){let n=sG.get(e);if(n!==void 0)return n?Sx:Cp;if(t.has(e))return Sx;t.add(e);let o=Cp,i=d=>{if(o!==Sx&&d?._zod){let u=kx(d,t,r);u>o&&(o=u)}},a=(d,u)=>{let f=Cp;for(let m of Reflect.ownKeys(d)){let p=Object.getOwnPropertyDescriptor(d,m);if(u&&!p.enumerable)continue;let h=p.get?fS:p.value?._zod?kx(p.value,t,r):Cp;h>f&&(f=h)}return f},s=d=>{d>o&&(o=d)},l=e._zod.def,c=l.type;switch(c){case"object":{let d=vp(l);s(d?a(d,!0):fS),i(l.catchall);break}case"array":i(l.element);break;case"tuple":for(let d of l.items)i(d);i(l.rest);break;case"record":case"map":i(l.keyType),i(l.valueType);break;case"set":i(l.valueType);break;case"union":for(let d of l.options)i(d);break;case"intersection":i(l.left),i(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(l.innerType);break;case"pipe":i(l.in),i(l.out);break;case"function":i(l.input),i(l.output);break;case"lazy":{let d=l._cachedInner??(r?e._zod.innerType:void 0);s(d?kx(d,t,!1):fS);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let d in l){let u=Object.getOwnPropertyDescriptor(l,d);if(!u||u.get)continue;let f=u.value;if(!(!f||typeof f!="object")){if(f._zod)i(f);else if(Array.isArray(f))for(let m of f)i(m)}}}return t.delete(e),Pme(e,o)}function Pme(e,t){return t!==fS&&sG.set(e,t===Sx),t}function pS(e){return kx(e,new Set,!0)!==Cp}function Dme(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var dS,uS=[],Rme={alloc(e,t,r){let n=dS;if(!n)return r;dS=void 0;let o={value:r,issues:null};return n.set(t.value,o),uS.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&hS(i,o.value))throw new mS;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(l,c)=>{if(r===void 0){let v=kx(e,new Set,!1);if(v===Cp)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(l,c);v===Sx||n?r=!0:n=!0}let d=l.value;if(!aG(d))return a(l,c);let u=c[p5];u||(u={buckets:new WeakMap,backEdges:void 0},c[p5]=u);let f;o===c?f=i:(f=Dme(u,e),o=c,i=f);let m=f.get(d);if(m)return l.value=m.value,m.issues?m.issues.length&&l.issues.push(...m5(m.issues)):(l.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(m.value)),l;dS=f;let p=uS.length,h=a(l,c);dS=void 0;let b=uS.length>p?uS.pop():void 0;return h instanceof Promise?h.then(v=>(b&&(b.issues=v.issues.length?m5(v.issues):iG),v)):(b&&(b.issues=h.issues.length?m5(h.issues):iG),h)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function Cx(){return Rme}function hS(e,t){let r=e[p5]?.backEdges;return r!==void 0&&aG(t)&&r.has(t)}var Dx={};gs(Dx,{ar:()=>lG,az:()=>cG,be:()=>uG,bg:()=>fG,bn:()=>mG,ca:()=>pG,ckb:()=>hG,cs:()=>gG,da:()=>vG,de:()=>xG,el:()=>bG,en:()=>gS,eo:()=>yG,es:()=>_G,fa:()=>IG,fi:()=>wG,fr:()=>SG,frCA:()=>kG,gu:()=>CG,he:()=>PG,hi:()=>DG,hr:()=>RG,hu:()=>EG,hy:()=>$G,id:()=>AG,is:()=>OG,it:()=>zG,ja:()=>NG,ka:()=>FG,kh:()=>LG,km:()=>vS,kn:()=>MG,ko:()=>BG,lt:()=>UG,mk:()=>VG,ms:()=>HG,ne:()=>WG,nl:()=>ZG,nn:()=>GG,no:()=>qG,ota:()=>KG,pl:()=>QG,ps:()=>XG,pt:()=>YG,ptBR:()=>JG,ro:()=>eq,ru:()=>rq,sk:()=>oq,sl:()=>nq,sv:()=>iq,ta:()=>aq,tg:()=>sq,th:()=>lq,tk:()=>cq,tr:()=>dq,ua:()=>uq,uk:()=>xS,ur:()=>fq,uz:()=>mq,vi:()=>pq,yo:()=>vq,zhCN:()=>hq,zhTW:()=>gq});var Eme=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${J(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${V(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function lG(){return{localeError:Eme()}}var Tme=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${J(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function cG(){return{localeError:Tme()}}function dG(e,t,r,n){let o=Math.abs(e),i=o%10,a=o%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}var $me=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${J(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=dG(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${o.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=dG(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${o.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function uG(){return{localeError:$me()}}var Ame=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${J(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function fG(){return{localeError:Ame()}}var Ome=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(o){return e[o]??null}let r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${i}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return o.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${J(o.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${V(o.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${i.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${o.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${o.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function mG(){return{localeError:Ome()}}var zme=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${J(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${V(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",a=t(o.origin);return a?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(o.origin);return a?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}};function pG(){return{localeError:zme()}}var Nme=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(o){return e[o]??null}let r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},n={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a,l=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(d=>s.endsWith(d))?"\u06CC\u06D5":"\u06D5",c=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${i} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${c?"":l}`}case"invalid_value":return o.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${J(o.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${V(o.values,"|")}`;case"too_big":{let i=t(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let i=t(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${i.prefix}"`:i.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${i.suffix}"`:i.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${i.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:i.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${i.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[i.format]??o.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${o.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${V(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${o.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function hG(){return{localeError:Nme()}}var Fme=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${J(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${V(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function gG(){return{localeError:Fme()}}var Lme=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${J(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${o.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${o.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}};function vG(){return{localeError:Lme()}}var Mme=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${J(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}};function xG(){return{localeError:Mme()}}var Bme=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(o){return e[o]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return typeof o.expected=="string"&&/^[A-Z]/.test(o.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${o.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return o.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J(o.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??o.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${o.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${o.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${o.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${o.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${o.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function bG(){return{localeError:Bme()}}var jme=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,a){return i==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):n[i]??i}return i=>{switch(i.code){case"invalid_type":{let a=o(i.expected),s=ee(i.input),l=o(s,i.input);return`Invalid input: expected ${a}, received ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${J(i.values[0])}`:`Invalid option: expected one of ${V(i.values,"|")}`;case"too_big":{let a=i.exact?"exactly ":i.inclusive?"<=":"<",s=t(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{let a=i.exact?"exactly ":i.inclusive?">=":">",s=t(i.origin);return s?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${V(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(s=>`'${s}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function gS(){return{localeError:jme()}}var Ume=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${J(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function yG(){return{localeError:Ume()}}var Vme=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${J(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${o.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${o.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}};function _G(){return{localeError:Vme()}}var Hme=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${J(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${V(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${V(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function IG(){return{localeError:Hme()}}var Wme=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${J(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${V(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function wG(){return{localeError:Wme()}}var Zme=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},n={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instance de ${o.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${J(o.values[0])} attendu`:`Option invalide : une valeur parmi ${V(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Trop grand : ${n[o.origin]??"valeur"} doit ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Trop petit : ${n[o.origin]??"valeur"} doit ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Trop petit : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${V(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function SG(){return{localeError:Zme()}}var Gme=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${J(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",a=t(o.origin);return a?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",a=t(o.origin);return a?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${V(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function kG(){return{localeError:Gme()}}var qme=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(o){return e[o]??null}let r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${i}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return o.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${J(o.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${V(o.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${i.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${o.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${o.keys.length>1?"\u0A93":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function CG(){return{localeError:qme()}}var Kme=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?e[c]:void 0,n=c=>{let d=r(c);return d?d.label:c??e.unknown.label},o=c=>`\u05D4${n(c)}`,i=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?t[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let d=c.expected,u=l[d??""]??n(d),f=ee(c.input),m=l[f]??e[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${u}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${J(c.values[0])}`;let d=c.values.map(m=>J(m));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let u=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${u}`}case"too_big":{let d=a(c.origin),u=o(c.origin??"value");if(c.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${d?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=c.inclusive?`${c.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=c.inclusive?"<=":"<",m=i(c.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.maximum.toString()}`}case"too_small":{let d=a(c.origin),u=o(c.origin??"value");if(c.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${d?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let b=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let h=c.inclusive?`${c.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=c.inclusive?">=":">",m=i(c.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.minimum.toString()}`}case"invalid_format":{let d=c;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let u=s[d.format],f=u?.label??d.format,p=(u?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${p}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${V(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function PG(){return{localeError:Kme()}}var Xme=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(o){return e[o]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${J(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${i}${o.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum} \u0939\u094B`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} \u092E\u0947\u0902 ${i}${o.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} ${i}${o.minimum} \u0939\u094B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${i.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${i.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${o.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${o.keys.length>1?"\u092F\u093E\u0901":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${o.origin} \u092E\u0947\u0902`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function DG(){return{localeError:Xme()}}var Qme=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(o){return e[o]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},n={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${J(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${o.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${o.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??o.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${o.divisor}`;case"unrecognized_keys":return`Neprepoznat${o.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${V(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[o.origin]??o.origin}`;default:return"Neispravan unos"}}};function RG(){return{localeError:Qme()}}var Yme=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${J(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function EG(){return{localeError:Yme()}}function TG(e,t,r){return Math.abs(e)===1?t:r}function Pp(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var Jme=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${J(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=TG(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pp(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pp(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=TG(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pp(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pp(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${V(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Pp(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Pp(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function $G(){return{localeError:Jme()}}var epe=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${J(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}};function AG(){return{localeError:epe()}}var tpe=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${J(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${V(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function OG(){return{localeError:tpe()}}var rpe=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${J(o.values[0])}`:`Opzione non valida: atteso uno tra ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${V(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}};function zG(){return{localeError:rpe()}}var ope=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${J(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${V(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(o.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(o.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${V(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function NG(){return{localeError:ope()}}var npe=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${V(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function FG(){return{localeError:npe()}}var ipe=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${V(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function vS(){return{localeError:ipe()}}function LG(){return vS()}var ape=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(o){return e[o]??null}let r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${J(o.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${i.prefix}"`:i.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${i.suffix}"`:i.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${i.includes}"`:i.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${i.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${o.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${o.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function MG(){return{localeError:ape()}}var spe=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"},map:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${J(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${V(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${l} ${i}${a}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${a}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${l} ${i}${a}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${V(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function BG(){return{localeError:spe()}}var Px=e=>e.charAt(0).toUpperCase()+e.slice(1);function jG(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var lpe=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,i,a,s){let l=e[o]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${J(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${V(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=n[o.origin]??o.origin,a=t(o.origin,jG(Number(o.maximum)),o.inclusive??!1,"smaller");if(a?.verb)return`${Px(i??o.origin??"reik\u0161m\u0117")} ${a.verb} ${o.maximum.toString()} ${a.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Px(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${a?.unit}`}case"too_small":{let i=n[o.origin]??o.origin,a=t(o.origin,jG(Number(o.minimum)),o.inclusive??!1,"bigger");if(a?.verb)return`${Px(i??o.origin??"reik\u0161m\u0117")} ${a.verb} ${o.minimum.toString()} ${a.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Px(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${V(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=n[o.origin]??o.origin;return`${Px(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function UG(){return{localeError:lpe()}}var cpe=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${J(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function VG(){return{localeError:cpe()}}var dpe=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${J(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Terlalu besar: dijangka ${o.origin??"nilai"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Terlalu kecil: dijangka ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${V(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}};function HG(){return{localeError:dpe()}}var upe=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(o){return e[o]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${J(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} \u092E\u093E ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} \u092E\u093E ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} ${i}${o.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${i.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${o.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${o.keys.length>1?"\u0939\u0930\u0942":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${o.origin} \u092E\u093E`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function WG(){return{localeError:upe()}}var fpe=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${J(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}};function ZG(){return{localeError:fpe()}}var mpe=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tal",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventa instanceof ${o.expected}, fekk ${s}`:`Ugyldig input: forventa ${i}, fekk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventa ${J(o.values[0])}`:`Ugyldig val: forventa eitt av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function GG(){return{localeError:mpe()}}var ppe=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${J(o.values[0])}`:`Ugyldig valg: forventet en av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function qG(){return{localeError:ppe()}}var hpe=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${J(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function KG(){return{localeError:hpe()}}var gpe=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${J(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${V(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function XG(){return{localeError:gpe()}}var vpe=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${J(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function QG(){return{localeError:vpe()}}var xpe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tuplo",articles:n.masculine},record:{name:"registo",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"ficheiro",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(a,s){let l=o[a]??{name:`valor "${a}"`,articles:n.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=i(a.expected,"indefinite"),l=ee(a.input),c=i(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${J(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${V(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=t(a.origin);return l?`Demasiado grande: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=t(a.origin);return l?`Demasiado pequeno: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Demasiado pequeno: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${V(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function YG(){return{localeError:xpe()}}var bpe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tupla",articles:n.feminine},record:{name:"registro",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"arquivo",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(a,s){let l=o[a]??{name:`valor "${a}"`,articles:n.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=i(a.expected,"indefinite"),l=ee(a.input),c=i(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${J(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${V(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=t(a.origin);return l?`Grande demais: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Grande demais: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=t(a.origin);return l?`Pequeno demais: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Pequeno demais: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${V(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function JG(){return{localeError:bpe()}}var ype=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(o){return e[o]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},n={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${J(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Prea mic: a\u0219teptat ca ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??o.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${o.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${V(o.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${o.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${o.origin}`;default:return"Intrare invalid\u0103"}}};function eq(){return{localeError:ype()}}function tq(e,t,r,n){let o=Math.abs(e),i=o%10,a=o%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}var _pe=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${J(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=tq(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=tq(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function rq(){return{localeError:_pe()}}var Ipe=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${o.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${i}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${J(o.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${i.includes}"`:i.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${V(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function oq(){return{localeError:Ipe()}}var wpe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${J(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${V(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}};function nq(){return{localeError:wpe()}}var Spe=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${J(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function iq(){return{localeError:Spe()}}var kpe=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${V(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function aq(){return{localeError:kpe()}}var Cpe=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},n={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${i} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return o.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${J(o.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${V(o.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${i}${o.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${i}${o.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${i.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:i.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${i.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:i.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${i.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:i.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${i.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${r[i.format]??o.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${o.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${o.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${V(o.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${o.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function sq(){return{localeError:Cpe()}}var Ppe=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${J(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(o.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(o.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${V(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function lq(){return{localeError:Ppe()}}var Dpe=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(o){return e[o]??null}let r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${i} \xFDerine ${s} alyndy`}case"invalid_value":return o.values.length===1?`N\xE4dogry baha: ${J(o.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`N\xE4dogry setir: "${i.prefix}" bilen ba\u015Flamaly`:i.format==="ends_with"?`N\xE4dogry setir: "${i.suffix}" bilen gutarmaly`:i.format==="includes"?`N\xE4dogry setir: "${i.includes}" saklamaly`:i.format==="regex"?`N\xE4dogry setir: ${i.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xE4dogry san: ${o.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${o.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function cq(){return{localeError:Dpe()}}var Rpe=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${J(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function dq(){return{localeError:Rpe()}}var Epe=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${J(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function xS(){return{localeError:Epe()}}function uq(){return xS()}var Tpe=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${J(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${V(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${V(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function fq(){return{localeError:Tpe()}}var $pe=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${J(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function mq(){return{localeError:$pe()}}var Ape=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${J(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${V(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function pq(){return{localeError:Ape()}}var Ope=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${J(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function hq(){return{localeError:Ope()}}var zpe=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${J(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${V(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function gq(){return{localeError:zpe()}}var Npe=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"},map:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=ee(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${J(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${a.verb} ${i}${o.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${a.verb} ${i}${o.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${V(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function vq(){return{localeError:Npe()}}var xq,h5=Symbol("ZodOutput"),g5=Symbol("ZodInput"),bS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function yS(){return new bS}(xq=globalThis).__zod_globalRegistry??(xq.__zod_globalRegistry=yS());var vo=globalThis.__zod_globalRegistry;var rn=Symbol.for("zod.compile.invalid"),bq=Symbol.for("zod.compile.fallback"),aa=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},nt=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function Lpe(e,t){try{return IS(e,{assertOnly:!0})}catch{return t}}function y5(e,t){try{let r=IS(e),n=_S(e,r);return n._zod.bag.validator=Lpe(e,r),n}catch(r){if(t?.strict)throw r;return e}}function _S(e,t){if(pS(e))throw new nt("a schema whose subtree contains a reference cycle");let r=yt(e),n=e._zod.run,o=n.__originalRun??n,i=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[bq]||s&&hS(s,a.value))return o(a,s);let l=t(a.value);return l!==rn?(a.value=l,a):(s&&(s[bq]=!0),o(a,s))};return i.__originalRun=o,r._zod.bag.fallbackRun=o,r._zod.bag.validator=t,r._zod.run=i,n.__originalRun||Mpe(r,e,t),r}function Mpe(e,t,r){let n=e,o=t;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(a,s)=>{let l=r(a);return l!==rn?{success:!0,data:l}:i(a,s)}}if(typeof o.parse=="function"){let i=o.parse;n.parse=(a,s)=>{let l=r(a);return l!==rn?l:i(a,s)}}}function IS(e,t){let r=!0;try{r=pS(e)}catch{}if(r)throw new nt("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0,definite:!0},o=new ku(["input"]),i=tr(o,n,e,"input",!t?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let a=["INVALID",...n.constants.keys()],s=[rn,...n.constants.values()],l=o.content.join(`
115
+ `),c=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
116
+ ${l}`:l:"",d=Function,u=`return (input) => {
117
+ ${l}
118
+ }`,f;try{f=new d(...a,u)(...s)}catch(m){throw new nt(`this schema (generated code failed to evaluate: ${m.message})`)}return t?.debug&&(f.code=c),f.definite=n.definite,f}function Ne(e,t){for(let[n,o]of e.constants)if(o===t)return n;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Ru(e,t){return e.definite=!1,Ne(e,t)}function Te(e){return`v${e.varCounter++}`}function Bpe(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return rn;let n=r;return n.issues.length===0?n.value:rn}function Eo(e,t,r,n,o=!0){let i=e.content.length,a=t.constants.size,s=t.constantCounter,l=t.varCounter;try{return tr(e,t,r,n,o)}catch(c){if(!(c instanceof nt)||!c.islandable)throw c;if(e.content.length=i,t.constants.size>a){let d=Array.from(t.constants.keys()).slice(a);for(let u of d)t.constants.delete(u)}return t.constantCounter=s,t.varCounter=l,jpe(e,t,r,n)}}function jpe(e,t,r,n){t.definite=!1;let o=Ne(t,r),i=Ne(t,Bpe),a=Te(t);return e.write(`const ${a} = ${i}(${o}, ${n});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var Upe=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Vpe(e,t,r,n){let o=r._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let a of o){let s=a._zod.def;if(s.when&&!Upe.has(s.check))throw new nt('check with a custom "when" condition');switch(s.check){case"greater_than":Hpe(e,t,s,i);break;case"less_than":Wpe(e,t,s,i);break;case"multiple_of":Zpe(e,t,s,i);break;case"number_format":kq(e,s,i);break;case"min_length":{let l=Pu(s.minimum,"min_length"),c=v5(e,t,i,`${i}.length >= ${l} && ${i}.length < ${s.minimum*2}`);e.write(`if (${c} < ${l}) return INVALID;`);break}case"max_length":{let l=Pu(s.maximum,"max_length"),c=v5(e,t,i,`${i}.length > ${l}`);e.write(`if (${c} > ${l}) return INVALID;`);break}case"length_equals":{let l=Pu(s.length,"length_equals"),c=v5(e,t,i,`${i}.length >= ${l} && ${i}.length <= ${s.length*2}`);e.write(`if (${c} !== ${l}) return INVALID;`);break}case"min_size":e.write(`if (${i}.size < ${Pu(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${i}.size > ${Pu(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${i}.size !== ${Pu(s.size,"size_equals")}) return INVALID;`);break;case"string_format":i=Cq(e,t,s,i);break;case"custom":i=Ype(e,t,a,i);break;case"bigint_format":Gpe(e,s,i);break;case"mime_type":qpe(e,t,s,i);break;case"property":Xpe(e,t,s,i);break;case"properties":Kpe(e,t,s,i);break;case"overwrite":{let l=Te(t);Qpe(e,t,a,i,l),i=l;break}default:throw new nt(`check type ${s.check}`)}}return i}function v5(e,t,r,n){let o=Ne(t,wu),i=Te(t);return e.write(`const ${i} = typeof ${r} === "string" && ${n} ? ${o}(${r}) : ${r}.length;`),i}function Pu(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new nt(`${t} bound of type ${typeof e}`);return`${e}`}function Sq(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new nt("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new nt("comparison check with Invalid Date bound");return Ne(e,t)}throw new nt(`comparison check bound of type ${typeof t}`)}function Hpe(e,t,r,n){let o=r.inclusive?"<":"<=";e.write(`if (${n} ${o} ${Sq(t,r.value)}) return INVALID;`)}function Wpe(e,t,r,n){let o=r.inclusive?">":">=";e.write(`if (${n} ${o} ${Sq(t,r.value)}) return INVALID;`)}function Zpe(e,t,r,n){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new nt("multiple_of check with a zero divisor");e.write(`if (${n} % ${r.value}n !== 0n) return INVALID;`)}else{let o=Ne(t,Yv);e.write(`if (${o}(${n}, ${Pu(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function kq(e,t,r){let n=t.format;switch(n){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new nt(`number format ${n}`)}}function Gpe(e,t,r){let n=t.format;if(n)switch(n){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new nt(`bigint format ${n}`)}}function qpe(e,t,r,n){let o=r.mime;if(o&&o.length>0){let i=Ne(t,new Set(o));e.write(`if (!${i}.has(${n}.type)) return INVALID;`)}}function Kpe(e,t,r,n){if(r.when)throw new nt('check with a custom "when" condition');e.write(`if (${n} == null) return INVALID;`);let o=r.shape;for(let i of Reflect.ownKeys(o)){let a=typeof i=="symbol"?Ne(t,i):en(i),s=Te(t);e.write(`const ${s} = ${n}[${a}];`),Eo(e,t,o[i],s,!1)}}function Xpe(e,t,r,n){let o=`${n}[${JSON.stringify(r.property)}]`;tr(e,t,r.schema,o)}function Qpe(e,t,r,n,o){let i=r._zod.def.tx;if(!i)throw new nt("overwrite check without a transform function");if(Eu(i))throw new aa("z.compile: async overwrite transforms are not supported");let a=Ne(t,i);e.write(`const ${o} = ${a}(${n});`)}function x5(){throw new Dn}function _5(e){this.issues.push(e)}function Ype(e,t,r,n){let o=r._zod.def;if(o.fn){if(Eu(o.fn))throw new aa("z.compile: async .refine() predicates are not supported");let i=Ru(t,o.fn),a=Ne(t,x5),s=Te(t);return e.write(`const ${s} = ${i}(${n});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),n}if(r._zod.check){if(Eu(r._zod.check))throw new aa("z.compile: async .superRefine() / check functions are not supported");let i=r._zod.check,s=Ru(t,c=>{let d={value:c,issues:[],addIssue:_5};return i(d)instanceof Promise&&x5(),d.issues.length===0?d.value:rn}),l=Te(t);return e.write(`const ${l} = ${s}(${n});`),e.write(`if (${l} === INVALID) return INVALID;`),l}throw new nt("custom check without a predicate or check function")}var Jpe=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function Cq(e,t,r,n,o=!0){let i=r.format;if(i==="base64"){let c=Ne(t,xx);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="base64url"){let c=Ne(t,tS);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="jwt"){let c=Ne(t,nS),d=Ne(t,r.alg??null);return e.write(`if (!${c}(${n}, ${d})) return INVALID;`),n}if(i==="ipv6"){let c=Ne(t,vx);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="cidrv6"){let c=Ne(t,Jw);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="credit_card"){let c=Ne(t,rS);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="iban"){let c=Ne(t,oS);return e.write(`if (!${c}(${n})) return INVALID;`),n}let a=r;if(i==="url"||i==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let c=Ne(t,Xw),d=Ne(t,r),u=Te(t),f=Te(t);if(e.write(`const ${u} = ${n}.trim();`),e.write(`const ${f} = ${c}(${u}, ${d});`),e.write(`if (typeof ${f} === "number") return INVALID;`),a.hostname!==void 0){let h=Ne(t,Qw);e.write(`if (!${h}(${f}, ${d}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let h=Ne(t,Yw);e.write(`if (!${h}(${f}, ${d}.protocol)) return INVALID;`)}if(!o)return null;let m=Te(t),p=a.normalize?`${f}.href`:`${Ne(t,gx)}(${u})`;return e.write(`const ${m} = ${p};`),m}let s=r.fn;if(s){if(Eu(s))throw new nt(`async string format ${i}`);let c=Ne(t,s);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(Jpe.has(i)&&r.pattern){let c=Ne(t,r.pattern);return e.write(`${c}.lastIndex = 0;`),e.write(`if (!${c}.test(${n})) return INVALID;`),n}let l=r.format;switch(l){case"regex":throw new nt("regex format without a pattern");case"lowercase":e.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${n}.includes(${en(r.includes)})) return INVALID;`);break;case"starts_with":{let c=r.prefix;e.write(`if (${n}.slice(0, ${c.length}) !== ${en(c)}) return INVALID;`);break}case"ends_with":{let c=r.suffix;e.write(`if (${n}.slice(-${c.length}) !== ${en(c)}) return INVALID;`);break}default:throw new nt(`string format ${l}`)}return n}function tr(e,t,r,n,o=!0){let i=r._zod.def,a=i.type;if(i.coerce)throw new nt(`coercion (z.coerce.${a}())`);let s=o||!!i.checks?.length,l;switch(a){case"string":l=ehe(e,t,r,n,s);break;case"number":l=the(e,r,n);break;case"boolean":l=rhe(e,n);break;case"bigint":l=ohe(e,r,n);break;case"symbol":l=nhe(e,n);break;case"undefined":l=ihe(e,n);break;case"null":l=ahe(e,n);break;case"any":case"unknown":l=n;break;case"never":e.write("return INVALID;"),l=n;break;case"void":l=she(e,n);break;case"nan":l=lhe(e,n);break;case"date":l=che(e,n);break;case"object":l=dhe(e,t,r,n,s);break;case"optional":l=uhe(e,t,r,n,s);break;case"nullable":l=phe(e,t,r,n,s);break;case"array":l=hhe(e,t,r,n,s);break;case"literal":l=ghe(e,t,r,n);break;case"enum":l=vhe(e,t,r,n);break;case"readonly":{let c=_q(e,t,r,n),d=Te(t);e.write(`const ${d} = Object.freeze(${c});`),l=d;break}case"success":_q(e,t,r,n),l="true";break;case"default":case"prefault":l=xhe(e,t,r,n);break;case"nonoptional":l=bhe(e,t,r,n);break;case"tuple":l=yhe(e,t,r,n);break;case"union":l=_he(e,t,r,n);break;case"intersection":l=She(e,t,r,n);break;case"record":l=khe(e,t,r,n);break;case"map":l=Phe(e,t,r,n);break;case"set":l=Dhe(e,t,r,n);break;case"file":l=Rhe(e,n);break;case"template_literal":l=Ehe(e,t,r,n);break;case"lazy":l=The(e,t,r,n);break;case"pipe":l=$he(e,t,r,n);break;case"custom":l=Ahe(e,t,r,n);break;case"transform":l=Nhe(e,t,r,n);break;case"catch":l=zhe(e,t,r,n);break;default:throw new nt(`schema type ${a}`)}return l===null?null:Vpe(e,t,r,l)}function ehe(e,t,r,n,o=!0){e.write(`if (typeof ${n} !== "string") return INVALID;`);let i=r._zod.def;return i.format===void 0?n:Cq(e,t,i,n,o)}function the(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let n=t._zod.def;return n.check==="number_format"&&n.format&&kq(e,{format:n.format},r),r}function rhe(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function ohe(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let n=t._zod.def;if(n.format)switch(n.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function nhe(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function ihe(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function ahe(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function she(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function lhe(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function che(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function dhe(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let a=i.shape,s=Object.keys(a),l=Object.getOwnPropertySymbols(a),c=l.length?[...s,...l]:s,d=x=>typeof x=="symbol"?Ne(t,x):en(x),u=x=>typeof x=="symbol"?`[${d(x)}]`:en(x),f=a;if(s.includes("__proto__"))throw new nt('object shape key "__proto__"');let m=new Map;for(let x of c){let _=f[x],I=d(x),S=Te(t);if(e.write(`const ${S} = ${n}[${I}];`),_._zod.optin!==void 0){let w=Te(t);e.write(`let ${w} = (() => {`),e.indented(P=>{let E=Eo(P,t,_,S);P.write(`return ${E};`)}),e.write("})();"),_._zod.optout==="optional"?(e.write(`if (${w} === INVALID) {`),e.indented(P=>{P.write(`if (${I} in ${n}) return INVALID;`),P.write(`${w} = undefined;`)}),e.write("}")):e.write(`if (${w} === INVALID) return INVALID;`),m.set(x,w)}else{mhe(_)&&e.write(`if (!(${I} in ${n})) return INVALID;`);let w=Eo(e,t,_,S,o);w!==null&&m.set(x,w)}}let p=i.catchall,h="none";if(p){let x=p._zod.def.type;if(x==="never"){let _=s.map(I=>`k !== ${en(I)}`).join(" && ")||"true";e.write(`for (const k in ${n}) {`),e.indented(I=>{I.write(`if (${_}) return INVALID;`)}),e.write("}")}else(x==="unknown"||x==="any")&&!p._zod.def.checks?.length?h="passthrough":h="schema"}let b=Te(t),v=c.some(x=>yq(f[x])||b5(f[x]));if(!o){if(h==="schema"){let x=s.length>0?Ne(t,new Set(s)):null;e.write(`for (const k in ${n}) {`),e.indented(_=>{_.write('if (k === "__proto__") continue;'),x&&_.write(`if (${x}.has(k)) continue;`);let I=Te(t);_.write(`const ${I} = ${n}[k];`),Eo(_,t,p,I,!1)}),e.write("}")}return null}if(v){e.write(`const ${b} = {};`);for(let x of c){let _=d(x),I=m.get(x);b5(f[x])?e.write(`if (${_} in ${n}) ${b}[${_}] = ${I};`):yq(f[x])?e.write(`if (${I} !== undefined || ${_} in ${n}) ${b}[${_}] = ${I};`):e.write(`${b}[${_}] = ${I};`)}}else{let x=c.map(_=>`${u(_)}: ${m.get(_)}`).join(", ");e.write(`const ${b} = { ${x} };`)}if(h!=="none"){let x=s.length>0?Ne(t,new Set(s)):null;e.write(`for (const k in ${n}) {`),e.indented(_=>{if(_.write('if (k === "__proto__") continue;'),x&&_.write(`if (${x}.has(k)) continue;`),h==="passthrough")_.write(`${b}[k] = ${n}[k];`);else{let I=Te(t);_.write(`const ${I} = ${n}[k];`);let S=Eo(_,t,p,I);_.write(`${b}[k] = ${S};`)}}),e.write("}")}return b}function uhe(e,t,r,n,o=!0){let i=r._zod.def;if(fhe(r))return tr(e,t,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let s=Te(t),l=Te(t);return e.write(`let ${s};`),e.write(`if (${n} === undefined) {`),e.indented(c=>{c.write(`const ${l} = (() => {`),c.indented(d=>{let u=tr(d,t,i.innerType,n);d.write(`return ${u};`)}),c.write("})();"),c.write(`if (${l} !== INVALID) ${s} = ${l};`)}),e.write("} else {"),e.indented(c=>{let d=tr(c,t,i.innerType,n);c.write(`${s} = ${d};`)}),e.write("}"),s}let a=o?Te(t):null;return a&&e.write(`let ${a};`),e.write(`if (${n} !== undefined) {`),e.indented(s=>{let l=tr(s,t,i.innerType,n,o);a&&l!==null&&s.write(`${a} = ${l};`)}),e.write("}"),a}function fhe(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function mhe(e){return e._zod.optin===void 0&&Du(e)}function Du(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Du(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Du(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Du):!0;case"intersection":return!t.left||!t.right?!0:Du(t.left)&&Du(t.right);case"pipe":return t.in?Du(t.in):!0;default:return!0}}function b5(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function yq(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&Dp(e)}function Dp(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?Dp(t.innerType):!0;case"union":return t.options?t.options.some(Dp):!0;case"intersection":return!t.left||!t.right||Dp(t.left)||Dp(t.right);case"pipe":return t.out?Dp(t.out):!0;default:return!0}}function phe(e,t,r,n,o=!0){let i=r._zod.def,a=o?Te(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${n} !== null) {`),e.indented(s=>{let l=tr(s,t,i.innerType,n,o);a&&l!==null&&s.write(`${a} = ${l};`)}),e.write("}"),a}function hhe(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (!Array.isArray(${n})) return INVALID;`);let a=o?Te(t):null,s=Te(t),l=Te(t);return a&&e.write(`const ${a} = new Array(${n}.length);`),e.write(`for (let ${s} = 0; ${s} < ${n}.length; ${s}++) {`),e.indented(c=>{c.write(`const ${l} = ${n}[${s}];`);let d=Eo(c,t,i.element,l,o);a&&d!==null&&c.write(`${a}[${s}] = ${d};`)}),e.write("}"),a}function ghe(e,t,r,n){let i=r._zod.def.values;if(i.length!==1){let s=Ne(t,new Set(i));return e.write(`if (!${s}.has(${n})) return INVALID;`),n}let a=i[0];if(typeof a=="number"&&Number.isNaN(a)){let s=Ne(t,new Set(i));return e.write(`if (!${s}.has(${n})) return INVALID;`),n}if(typeof a=="string")e.write(`if (${n} !== ${en(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${n} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${n} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${n} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${n} !== ${a}n) return INVALID;`);else throw new nt(`literal type ${typeof a}`);return n}function vhe(e,t,r,n){let o=r._zod.values;if(!o)throw new nt("enum schema without enumerated values");let i=Ne(t,o);return e.write(`if (!${i}.has(${n})) return INVALID;`),n}function _q(e,t,r,n){let o=r._zod.def;return tr(e,t,o.innerType,n)}function xhe(e,t,r,n){let o=r._zod.def,a=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!a)return tr(e,t,o.innerType,n);let l=Ne(t,a),c=Te(t);return e.write(`let ${c} = ${n};`),e.write(`if (${n} === undefined) ${c} = ${l}();`),tr(e,t,o.innerType,c)}let s=Te(t);if(a){let l=Ne(t,a),c=Ne(t,Jv);e.write(`let ${s};`),e.write(`if (${n} === undefined) {`),e.indented(d=>{d.write(`${s} = ${c}(${l}());`)}),e.write("} else {"),e.indented(d=>{let u=tr(d,t,o.innerType,n);d.write(`${s} = ${u} === undefined ? ${c}(${l}()) : ${u};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${n} !== undefined) {`),e.indented(l=>{let c=tr(l,t,o.innerType,n);l.write(`${s} = ${c};`)}),e.write("}");return s}function bhe(e,t,r,n){let o=r._zod.def,i=tr(e,t,o.innerType,n),a=Te(t);return e.write(`const ${a} = ${i};`),e.write(`if (${a} === undefined) return INVALID;`),a}function yhe(e,t,r,n){let o=r._zod.def,i=o.items,a=o.rest;e.write(`if (!Array.isArray(${n})) return INVALID;`);let s=Iq(i,"optin"),l=Iq(i,"optout");a?e.write(`if (${n}.length < ${s}) return INVALID;`):e.write(`if (${n}.length < ${s} || ${n}.length > ${i.length}) return INVALID;`);let c=Te(t);e.write(`const ${c} = [];`);for(let d=0;d<i.length;d++){let u=i[d];if(d>=l)e.write(`if (${c}.length === ${d}) {`),e.indented(f=>{f.write(`if (${d} < ${n}.length) {`),f.indented(m=>{let p=Te(t);m.write(`const ${p} = ${n}[${d}];`);let h=Eo(m,t,u,p);m.write(`${c}[${d}] = ${h};`)}),f.write("} else {"),f.indented(m=>{if(b5(u)){m.write(`${c}.length = ${d};`);return}let p=Te(t),h=Te(t);m.write(`const ${p} = undefined;`),m.write(`const ${h} = (() => {`),m.indented(b=>{let v=Eo(b,t,u,p);b.write(`return ${v};`)}),m.write("})();"),m.write(`if (${h} === INVALID || ${h} === undefined) ${c}.length = ${d};`),m.write(`else ${c}[${d}] = ${h};`)}),f.write("}")}),e.write("}");else{let f=Te(t);e.write(`const ${f} = ${n}[${d}];`);let m=Eo(e,t,u,f);e.write(`${c}[${d}] = ${m};`)}}if(a){let d=Te(t),u=Te(t);e.write(`for (let ${d} = ${i.length}; ${d} < ${n}.length; ${d}++) {`),e.indented(f=>{f.write(`const ${u} = ${n}[${d}];`);let m=Eo(f,t,a,u);f.write(`${c}[${d}] = ${m};`)}),e.write("}")}return c}function Iq(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function _he(e,t,r,n){let o=r._zod.def,i=o.options;if(o.discriminator)return Ihe(e,t,o,n);if(o.inclusive===!1)throw new nt("exclusive unions (z.xor)");if(i.length===0)return e.write("return INVALID;"),n;if(i.length===1)return tr(e,t,i[0],n);if(i.every(l=>l._zod.def.type==="literal"&&!l._zod.def.checks?.length)){let l=new Set(i.flatMap(d=>d._zod.def.values)),c=Ne(t,l);return e.write(`if (!${c}.has(${n})) return INVALID;`),n}let s=Te(t);e.write(`let ${s};`);for(let l=0;l<i.length;l++){let c=i[l];l===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(d=>{let u=tr(d,t,c,n);d.write(`return ${u};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function Ihe(e,t,r,n){if(r.unionFallback)throw new nt("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),n;let o=Te(t),i=Te(t);e.write(`const ${o} = ${n}?.[${en(r.discriminator)}];`),e.write(`let ${i};`);let a=!0,s=new Set;for(let l of r.options){let c=l._zod.propValues?.[r.discriminator];if(!c||c.size===0)throw new nt("discriminated union option without static discriminator values");for(let f of c){if(s.has(f))throw new nt(`duplicate discriminator value ${String(f)}`);s.add(f)}let d=Array.from(c,f=>whe(t,o,f)),u=a?"if":"else if";e.write(`${u} (${d.join(" || ")}) {`),e.indented(f=>{let m=tr(f,t,l,n);f.write(`${i} = ${m};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),i}function whe(e,t,r){if(typeof r=="string")return`${t} === ${en(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let n=Ne(e,r);return`${t} === ${n}`}throw new nt(`literal discriminator value ${String(r)}`)}function She(e,t,r,n){let o=r._zod.def;t.definite=!1;let i=Eo(e,t,o.left,n),a=Eo(e,t,o.right,n),s=Ne(t,kp),l=Te(t);return e.write(`const ${l} = ${s}(${i}, ${a});`),e.write(`if (!${l}.valid) return INVALID;`),`${l}.data`}function khe(e,t,r,n){let o=r._zod.def,i=Ne(t,Ii);e.write(`if (!${i}(${n})) return INVALID;`);let a=Te(t),s=Te(t),l=Te(t);e.write(`const ${a} = {};`);let c=o,d=c.partial?void 0:o.keyType._zod.values;if(d){let m=[];for(let h of d){if(!(typeof h=="string"||typeof h=="number"||typeof h=="symbol"))throw new nt(`record key value ${String(h)}`);let b=typeof h=="number"?h.toString():h;if(b==="__proto__")throw new nt('record key "__proto__"');m.push(b);let v=Ne(t,h),x=tr(e,t,o.keyType,v),_=Te(t);e.write(`const ${_} = ${n}[${Che(t,b)}];`);let I=Eo(e,t,o.valueType,_);e.write(`${a}[${x}] = ${I};`)}let p=Ne(t,new Set(m));return e.write(`for (const ${s} in ${n}) {`),e.indented(h=>{h.write(`if (${p}.has(${s})) continue;`),c.mode==="loose"?h.write(`if (${s} !== "__proto__") ${a}[${s}] = ${n}[${s}];`):h.write("return INVALID;")}),e.write("}"),a}let u=o.keyType._zod.def;if(!(u.type==="string"&&u.format===void 0&&!u.coerce&&(u.checks?.length??0)===0)){let m=o.mode==="loose",p=IS(o.keyType);p.definite===!1&&(t.definite=!1);let h=Ne(t,p),b=Ne(t,tl),v=Te(t);return wq(e,t,n,s,x=>{x.write(`let ${v} = ${h}(${s});`),x.write(`if (${v} === INVALID && typeof ${s} === "string" && ${b}.test(${s})) ${v} = ${h}(Number(${s}));`),m?x.write(`if (${v} === INVALID) { ${a}[${s}] = ${n}[${s}]; continue; }`):x.write(`if (${v} === INVALID) return INVALID;`),x.write(`if (${v} === "__proto__") continue;`);let _=Te(t);x.write(`const ${_} = ${n}[${s}];`);let I=Eo(x,t,o.valueType,_);x.write(`${a}[${v}] = ${I};`)}),a}return wq(e,t,n,s,m=>{m.write(`const ${l} = ${n}[${s}];`);let p=Eo(m,t,o.valueType,l);m.write(`${a}[${s}] = ${p};`)},"return INVALID;"),a}function wq(e,t,r,n,o,i){let a=Ne(t,Object.prototype.propertyIsEnumerable),s=Te(t),l=Te(t),c=Te(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${l} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${c} = 0; ${c} < ${l}.length; ${c}++) {`),e.indented(d=>{d.write(`const ${n} = ${l}[${c}];`),d.write(`if (${n} === "__proto__" || !${a}.call(${r}, ${n})) continue;`),o(d)}),e.write("}"),e.write(`for (let ${c} = 0; ${c} < ${s}.length; ${c}++) {`),e.indented(d=>{d.write(`const ${n} = ${s}[${c}];`),d.write(`if (!${a}.call(${r}, ${n})) continue;`),i?d.write(i):o(d)}),e.write("}")}function Che(e,t){return typeof t=="string"?en(t):Ne(e,t)}function Phe(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Map)) return INVALID;`);let i=Te(t),a=Te(t),s=Te(t);return e.write(`const ${i} = new Map();`),e.write(`for (const [${a}, ${s}] of ${n}) {`),e.indented(l=>{let c=tr(l,t,o.keyType,a),d=tr(l,t,o.valueType,s);l.write(`${i}.set(${c}, ${d});`)}),e.write("}"),i}function Dhe(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Set)) return INVALID;`);let i=Te(t),a=Te(t);return e.write(`const ${i} = new Set();`),e.write(`for (const ${a} of ${n}) {`),e.indented(s=>{let l=tr(s,t,o.valueType,a);s.write(`${i}.add(${l});`)}),e.write("}"),i}function Rhe(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function Ehe(e,t,r,n){e.write(`if (typeof ${n} !== "string") return INVALID;`);let o=r._zod.pattern;if(o){let i=Ne(t,o);e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${n})) return INVALID;`)}return n}function The(e,t,r,n){let o=r._zod.def,i=Ru(t,o.getter),a=Ne(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(l=>{l.write(`const inner = ${i}();`),l.write(`${a}.parser = function(input) {`),l.indented(c=>{c.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),c.write("return result.issues.length === 0 ? result.value : INVALID;")}),l.write("};")}),e.write("}");let s=Te(t);return e.write(`const ${s} = ${a}.parser(${n});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function $he(e,t,r,n){let o=r._zod.def,i=tr(e,t,o.in,n);if(o.transform){if(Eu(o.transform))throw new aa("z.compile: async transforms in pipes are not supported");let a=o.transform,l=Ru(t,d=>{let u={value:d,issues:[],addIssue:_5},f=a(d,u);return f instanceof Promise?rn:u.issues.length===0?f:rn}),c=Te(t);return e.write(`const ${c} = ${l}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),tr(e,t,o.out,c)}else return tr(e,t,o.out,i)}function Eu(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Ahe(e,t,r,n){let o=r._zod.def;if(o.fn){if(Eu(o.fn))throw new aa("z.compile: async custom predicates are not supported");let i=Ru(t,o.fn),a=Ne(t,x5),s=Te(t);e.write(`const ${s} = ${i}(${n});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new nt("custom schema without a predicate function");return n}function Ohe(e,t,r){let n=e._zod.run({value:r,issues:[]},{});if(n&&typeof n.then=="function")return rn;let o=n;return o.issues.length===0?o.value:t()}function zhe(e,t,r,n){let o=r._zod.def;if(!o.catchValue[Dw])throw new nt("catch with a callback (only a constant catch value compiles)",!1);let i=Te(t);e.write(`let ${i} = (() => {`),e.indented(c=>{let d=Eo(c,t,o.innerType,n);c.write(`return ${d};`)}),e.write("})();");let a=Ne(t,o.innerType),s=Ru(t,o.catchValue),l=Ne(t,Ohe);return e.write(`if (${i} === INVALID) {`),e.indented(c=>{c.write(`${i} = ${l}(${a}, ${s}, ${n});`),c.write(`if (${i} === INVALID) return INVALID;`)}),e.write("}"),i}function Nhe(e,t,r,n){let o=r._zod.def;if(o.transform){if(Eu(o.transform))throw new aa("z.compile: async transforms are not supported");let i=o.transform,s=Ru(t,c=>{let d={value:c,issues:[],addIssue:_5},u=i(c,d);return u instanceof Promise?rn:d.issues.length===0?u:rn}),l=Te(t);return e.write(`const ${l} = ${s}(${n});`),e.write(`if (${l} === INVALID) return INVALID;`),l}return n}function wS(e){return e.checks&&(e.checks=[...e.checks]),e}function I5(e,t){return new e(wS({type:"string",...ae(t)}))}function w5(e,t){return new e(wS({type:"string",coerce:!0,...ae(t)}))}function SS(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ae(t)})}function kS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ae(t)})}function CS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ae(t)})}function PS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ae(t)})}function DS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ae(t)})}function RS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ae(t)})}function Rx(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ae(t)})}function ES(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ae(t)})}function TS(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ae(t)})}function $S(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ae(t)})}function AS(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ae(t)})}function OS(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ae(t)})}function zS(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ae(t)})}function NS(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ae(t)})}function FS(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ae(t)})}function LS(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ae(t)})}function S5(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ae(t)})}function MS(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ae(t)})}function BS(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ae(t)})}function jS(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ae(t)})}function US(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ae(t)})}function VS(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ae(t)})}function k5(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...ae(t)})}function C5(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...ae(t)})}function HS(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ae(t)})}var P5={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ex(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ae(t)})}function Tx(e,t){return new e({type:"string",format:"date",check:"string_format",...ae(t)})}function $x(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ae(t)})}function Ax(e,t){return new e({type:"string",format:"duration",check:"string_format",...ae(t)})}function D5(e,t){return new e(wS({type:"number",checks:[],...ae(t)}))}function R5(e,t){return new e(wS({type:"number",coerce:!0,checks:[],...ae(t)}))}function E5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ae(t)})}function T5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ae(t)})}function $5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ae(t)})}function A5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ae(t)})}function O5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ae(t)})}function z5(e,t){return new e({type:"boolean",...ae(t)})}function N5(e,t){return new e({type:"boolean",coerce:!0,...ae(t)})}function F5(e,t){return new e({type:"bigint",...ae(t)})}function L5(e,t){return new e({type:"bigint",coerce:!0,...ae(t)})}function M5(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ae(t)})}function B5(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ae(t)})}function j5(e,t){return new e({type:"symbol",...ae(t)})}function U5(e,t){return new e({type:"undefined",...ae(t)})}function V5(e,t){return new e({type:"null",...ae(t)})}function H5(e){return new e({type:"any"})}function W5(e){return new e({type:"unknown"})}function Z5(e,t){return new e({type:"never",...ae(t)})}function G5(e,t){return new e({type:"void",...ae(t)})}function q5(e,t){return new e({type:"date",...ae(t)})}function K5(e,t){return new e({type:"date",coerce:!0,...ae(t)})}function X5(e,t){return new e({type:"nan",...ae(t)})}function qa(e,t){return new Vw({check:"less_than",...ae(t),value:e,inclusive:!1})}function Wn(e,t){return new Vw({check:"less_than",...ae(t),value:e,inclusive:!0})}function Ka(e,t){return new Hw({check:"greater_than",...ae(t),value:e,inclusive:!1})}function Zn(e,t){return new Hw({check:"greater_than",...ae(t),value:e,inclusive:!0})}function WS(e){return Ka(0,e)}function ZS(e){return qa(0,e)}function GS(e){return Wn(0,e)}function qS(e){return Zn(0,e)}function Tc(e,t){return new OT({check:"multiple_of",...ae(t),value:e})}function $c(e,t){return new FT({check:"max_size",...ae(t),maximum:e})}function Xa(e,t){return new LT({check:"min_size",...ae(t),minimum:e})}function Tu(e,t){return new MT({check:"size_equals",...ae(t),size:e})}function $u(e,t){return new BT({check:"max_length",...ae(t),maximum:e})}function rl(e,t){return new jT({check:"min_length",...ae(t),minimum:e})}function Au(e,t){return new UT({check:"length_equals",...ae(t),length:e})}function Rp(e,t){return new VT({check:"string_format",format:"regex",...ae(t),pattern:e})}function Ep(e){return new HT({check:"string_format",format:"lowercase",...ae(e)})}function Tp(e){return new WT({check:"string_format",format:"uppercase",...ae(e)})}function $p(e,t){return new ZT({check:"string_format",format:"includes",...ae(t),includes:e})}function Ap(e,t){return new GT({check:"string_format",format:"starts_with",...ae(t),prefix:e})}function Op(e,t){return new qT({check:"string_format",format:"ends_with",...ae(t),suffix:e})}function KS(e,t,r){return new KT({check:"property",property:e,schema:t,...ae(r)})}function zp(e,t){return new XT({check:"properties",shape:e,...ae(t)})}function Np(e,t){return new QT({check:"mime_type",mime:e,...ae(t)})}function sa(e){return new YT({check:"overwrite",tx:e})}function Fp(e){return sa(t=>t.normalize(e))}function Lp(){return sa(e=>e.trim())}function Mp(){return sa(e=>e.toLowerCase())}function Bp(){return sa(e=>e.toUpperCase())}function jp(){return sa(e=>FE(e))}function Q5(e,t,r){return new e({type:"array",element:t,...ae(r)})}function Fhe(e,t,r){return new e({type:"union",options:t,...ae(r)})}function Lhe(e,t,r){return new e({type:"union",options:t,inclusive:!1,...ae(r)})}function Mhe(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...ae(n)})}function Bhe(e,t,r){return new e({type:"intersection",left:t,right:r})}function jhe(e,t,r,n){let o=r instanceof Me,i=o?n:r,a=o?r:null;return new e({type:"tuple",items:t,rest:a,...ae(i)})}function Uhe(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...ae(n)})}function Vhe(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...ae(n)})}function Hhe(e,t,r){return new e({type:"set",valueType:t,...ae(r)})}function Whe(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:n,...ae(r)})}function Zhe(e,t,r){return new e({type:"enum",entries:t,...ae(r)})}function Ghe(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ae(r)})}function Y5(e,t){return new e({type:"file",...ae(t)})}function qhe(e,t){return new e({type:"transform",transform:t})}function Khe(e,t){return new e({type:"optional",innerType:t})}function Xhe(e,t){return new e({type:"nullable",innerType:t})}function Qhe(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Jv(r)}})}function Yhe(e,t,r){return new e({type:"nonoptional",innerType:t,...ae(r)})}function Jhe(e,t){return new e({type:"success",innerType:t})}function ege(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:VE(r)})}function tge(e,t,r){return new e({type:"pipe",in:t,out:r})}function rge(e,t){return new e({type:"readonly",innerType:t})}function oge(e,t,r){return new e({type:"template_literal",parts:t,...ae(r)})}function nge(e,t){return new e({type:"lazy",getter:t})}function ige(e,t){return new e({type:"promise",innerType:t})}function J5(e,t,r){let n=ae(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function eA(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ae(r)})}function tA(e,t){let r=Pq(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(xp(o,n.value,r._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(xp(i))}},e(n.value,n)),t);return r}function Pq(e,t){let r=new Dt({check:"custom",...ae(t)});return r._zod.check=e,r}function rA(e){let t=new Dt({check:"describe"});return t._zod.onattach=[r=>{let n=vo.get(r)??{};vo.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function oA(e){let t=new Dt({check:"meta"});return t._zod.onattach=[r=>{let n=vo.get(r)??{};vo.add(r,{...n,...e})}],t._zod.check=()=>{},t}function nA(e,t){let r=ae(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(m=>typeof m=="string"?m.toLowerCase():m),o=o.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(n),a=new Set(o),s=e.Codec??Ix,l=e.Boolean??yx,c=e.String??Cu,d=new c({type:"string",error:r.error}),u=new l({type:"boolean",error:r.error}),f=new s({type:"pipe",in:d,out:u,transform:((m,p)=>{let h=m;return r.case!=="sensitive"&&(h=h.toLowerCase()),i.has(h)?!0:a.has(h)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:p.value,inst:f,continue:!1}),{})}),reverseTransform:((m,p)=>m===!0?n[0]||"true":o[0]||"false"),error:r.error});return f._zod.bag.truthy=n,f._zod.bag.falsy=o,f._zod.bag.case=r.case??"insensitive",f}function Ou(e,t,r,n={}){let o=ae(n),i={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...o};return r instanceof RegExp&&(i.pattern=r),new e(i)}function Ox(e,...t){for(let r of t)for(let n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&go(e,n,r[n]);return e}function Ac(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??vo,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Nr(e,t,r,n,o){let i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function It(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let f=a.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,f,d)}let u=e._zod.parent;u&&(a.ref||(a.ref=u),It(u,t,d),t.seen.get(u).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Ox(a.schema,l),t.io==="input"&&on(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Dq(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Oc(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let l=n.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}let o=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let u=e.external.registry.get(a[0])?.id,f=e.external.uri??(p=>p);if(u)return{ref:f(u)};let m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${f("__shared")}#/${s}/${Dq(m)}`}}let l="#",c=`${l}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:l};let d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:c+Dq(d)}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:c}=o(a);s.def={...s.schema},c&&(s.defId=c);let d=s.schema;for(let u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
119
+
120
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}s.count>1&&e.reused==="ref"&&i(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Tq(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;Tq(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let a of Array.isArray(i)?i:[i]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var $q=new Set(["type","properties","required","additionalProperties"]),Rq=["oneOf","anyOf"];function Eq(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function iA(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let a in i)if(!$q.has(a))return null;t.push(i)}let r={},n=new Set;for(let i of t){for(let a in i.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;let s=[];for(let c of t){let d=c.properties?.[a]??Eq(c);d!=null&&(s.some(u=>JSON.stringify(u)===JSON.stringify(d))||s.push(d))}let l=s.length===1?s[0]:iA(s)??{allOf:s};go(r,a,l)}for(let a of i.required??[])n.add(a)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let a of t){let s=Eq(a);s&&!i.some(l=>JSON.stringify(l)===JSON.stringify(s))&&i.push(s)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function age(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of $q)if(o in e)return;let r=t.filter(o=>Rq.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=iA(t);else{let o=r[0],i=Rq.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;let a=t.filter(l=>l!==o),s=o[i].map(l=>iA([...a,l]));if(s.some(l=>!l))return;n={[i]:s}}n&&(delete e.allOf,Ox(e,n))}function zc(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,d={...c},u=l.ref;if(l.ref=null,u){n(u);let m=e.seen.get(u),p=m.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Ox(c,p),Ox(c,d),s._zod.parent===u)for(let b in c)b==="$ref"||b==="allOf"||b in d||delete c[b];if(p.$ref&&m.def)for(let b in c)b==="$ref"||b==="allOf"||b in m.def&&JSON.stringify(c[b])===JSON.stringify(m.def[b])&&delete c[b]}let f=s._zod.parent;if(f&&f!==u){n(f);let m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(let p in c)p==="$ref"||p==="allOf"||p in m.def&&JSON.stringify(c[p])===JSON.stringify(m.def[p])&&delete c[p]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())n(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())Tq(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let l of e.seen.values())for(let c of[l.schema,l.def]){let d=c?.allOf;if(!Array.isArray(d))continue;let u=s.get(d);u?u.push(c):s.set(d,[c])}for(let l of e.intersections)for(let c of s.get(l)??[])age(c)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Ox(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,go(a,l.defId,l.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Up(t,"input",e.processors),output:Up(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function on(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return on(n.element,r);if(n.type==="set")return on(n.valueType,r);if(n.type==="lazy")return on(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return on(n.innerType,r);if(n.type==="intersection")return on(n.left,r)||on(n.right,r);if(n.type==="record"||n.type==="map")return on(n.keyType,r)||on(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:on(n.in,r)||on(n.out,r);if(n.type==="object"){for(let o in n.shape)if(on(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(on(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(on(o,r))return!0;return!!(n.rest&&on(n.rest,r))}return!1}var aA=(e,t={})=>r=>{let n=Ac({...r,processors:t});return It(e,n),Oc(n,e),zc(n,e)},Up=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},a=Ac({...o??{},target:i,io:t,processors:r});return It(e,a),Oc(a,e),zc(a,e)};var Vp=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},Hp=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},Aq=(e,t)=>{Vp(e,"minimum",t),Hp(e,"maximum",t)},Fq=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Lq=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Mq=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},Bq=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},Oq=(e,t)=>Vp(e,"minimum",t.minimum),zq=(e,t)=>Hp(e,"maximum",t.maximum),Nq=e=>(t,r)=>{Bq(t,r.format);let[n,o]=e[r.format];Vp(t,"minimum",n),Hp(t,"maximum",o)},sge={greater_than:(e,t)=>Vp(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Hp(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Fq(e,t.value),number_format:Nq(tx),bigint_format:Nq(rx),min_length:Oq,max_length:zq,length_equals:(e,t)=>Aq(e,t.length),min_size:Oq,max_size:zq,size_equals:(e,t)=>Aq(e,t.size),string_format:(e,t)=>{Bq(e,t.format),t.pattern&&Lq(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Mq(e,t.mime)};function Fr(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)sge[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&Vp(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&Vp(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Hp(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Hp(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&Fq(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&Mq(t,o.mime);for(let i of o.patterns??[])Lq(t,i);return t}var lge={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},cge=new Map([[eS,pT],[bx,hT]]),jq=e=>cge.get(e)??e,cA=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c,laxFormat:d}=Fr(e);if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=lge[s]??s,o.format===""&&delete o.format,(s==="time"||d)&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){let u=[...l].map(jq);u.length===1?o.pattern=u[0].source:u.length>1&&(o.allOf=[...u.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},dA=(e,t,r,n)=>{let o=r,{minimum:i,maximum:a,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:c,isInt:d}=Fr(e);o.type=d?"integer":"number";let u=typeof c=="number"&&c>=(i??Number.NEGATIVE_INFINITY),f=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";if(u?m?(o.minimum=c,o.exclusiveMinimum=!0):o.exclusiveMinimum=c:typeof i=="number"&&(o.minimum=i),f?m?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l:typeof a=="number"&&(o.maximum=a),s){let p=new Set;for(let v of s)Number.isFinite(v)&&v!==0?p.add(Math.abs(v)):Nr(e,t,o,n,`A multipleOf divisor of ${v} cannot be represented in JSON Schema`);let[h,...b]=p;h!==void 0&&(o.multipleOf=h),b.length&&(o.allOf=[...o.allOf??[],...b.map(v=>({multipleOf:v}))])}},uA=(e,t,r,n)=>{r.type="boolean"},fA=(e,t,r,n)=>{Nr(e,t,r,n,"BigInt cannot be represented in JSON Schema")},mA=(e,t,r,n)=>{Nr(e,t,r,n,"Symbols cannot be represented in JSON Schema")},pA=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},hA=(e,t,r,n)=>{Nr(e,t,r,n,"Undefined cannot be represented in JSON Schema")},gA=(e,t,r,n)=>{Nr(e,t,r,n,"Void cannot be represented in JSON Schema")},vA=(e,t,r,n)=>{r.not={}},xA=(e,t,r,n)=>{},bA=(e,t,r,n)=>{},yA=(e,t,r,n)=>{Nr(e,t,r,n,"Date cannot be represented in JSON Schema")},_A=(e,t,r,n)=>{let o=e._zod.def,i=pp(o.entries);if(i.length===0){r.not={};return}i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},IA=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let a of o.values)if(a===void 0){if(Nr(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Nr(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},wA=(e,t,r,n)=>{Nr(e,t,r,n,"NaN cannot be represented in JSON Schema")},SA=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},kA=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:a,mime:s}=Fr(e);i!==void 0&&(o.minLength=i),a!==void 0&&(o.maxLength=a),s&&(s.length===0?o.not={}:s.length===1?o.contentMediaType=s[0]:o.anyOf=s.map(l=>({contentMediaType:l})))},CA=(e,t,r,n)=>{r.type="boolean"},PA=(e,t,r,n)=>{Nr(e,t,r,n,"Custom types cannot be represented in JSON Schema")},DA=(e,t,r,n)=>{Nr(e,t,r,n,"Function types cannot be represented in JSON Schema")},RA=(e,t,r,n)=>{Nr(e,t,r,n,"Transforms cannot be represented in JSON Schema")},EA=(e,t,r,n)=>{Nr(e,t,r,n,"Map cannot be represented in JSON Schema")},TA=(e,t,r,n)=>{Nr(e,t,r,n,"Set cannot be represented in JSON Schema")},$A=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:a,maximum:s}=Fr(e);typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=It(i.element,t,{...n,path:[...n.path,"items"]})};function zx(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?zx(t.out):t.type==="catch"?zx(t.innerType):e._zod.optin}var AA=(e,t,r,n)=>{let o=r,i=e._zod.def,a=i.shape;if(Object.getOwnPropertySymbols(a).length&&Nr(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let c in a)go(o.properties,c,It(a[c],t,{...n,path:[...n.path,"properties",c]}));let l=[];for(let c of Object.keys(a)){let d=i.shape[c];(t.io==="input"?zx(d)===void 0:d._zod.optout===void 0)&&l.push(c)}l.length>0&&(o.required=l),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=It(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},QS=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>It(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},OA=(e,t,r,n)=>{let o=e._zod.def,i=It(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=It(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l,t.intersections.push(l)},zA=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((h,b)=>It(h,t,{...n,path:[...n.path,a,b]})),c=i.rest?It(i.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,d=i.items.length;for(;d>0;){let h=i.items[d-1];if(!(t.io==="input"?zx(h)!==void 0:h._zod.optout==="optional"))break;d--}let u=i.items.length,f=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=l,f?o.items=!1:c&&(o.items=c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):t.target==="openapi-3.0"?(o.items={anyOf:l},c&&o.items.anyOf.push(c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):(o.items=l,f?o.additionalItems=!1:c&&(o.additionalItems=c),d>0&&(o.minItems=d),f&&(o.maxItems=u));let{minimum:m,maximum:p}=Fr(e);typeof m=="number"&&(o.minItems=m),typeof p=="number"&&(o.maxItems=p)};function sA(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let p=e.get(t)?.def;if(!p)return t;let h=sA(e,p,r);return h===p?t:h}for(let p of["anyOf","oneOf"]){let h=t[p];if(!Array.isArray(h))continue;let b=h.map(v=>sA(e,v,r));b.some((v,x)=>v!==h[x])&&(t={...t,[p]:b})}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(p=>p==="number"||p==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(p=>typeof p=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:u,id:f,...m}=t;return m.enum?m.enum=m.enum.map(p=>typeof p=="number"?String(p):p):typeof m.const=="number"&&(m.const=String(m.const)),o&&(m.type="string",i||(m.pattern=(n.includes("number")?tl:fx).source)),m}var lA=new WeakMap;function dge(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of lA.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let a=sA(t,i,new Set);a!==i&&r.set(i,a)}if(r.size)for(let n of e.seen.values())for(let o of[n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var NA=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let a=i.keyType,s=Fr(a).patterns;if(i.mode==="loose"&&s&&s.size>0){let d=It(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let u of s)go(o.patternProperties,jq(u).source,d)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=It(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let d=lA.get(t);d||(d=[],lA.set(t,d),t.deferred.push(()=>dge(t))),d.push(e)}o.additionalProperties=It(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let l=a._zod.values,c=t.io==="input"&&zx(i.valueType)!==void 0;if(l&&!i.partial&&!c){let d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(o.required=d.map(String))}},FA=(e,t,r,n)=>{let o=e._zod.def,i=It(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},LA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},MA=Symbol();function Uq(e,t,r,n,o){let i=!1,a=JSON.stringify(e,(s,l)=>typeof l!="bigint"?l:(i=!0,null));return i?(Nr(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),MA):JSON.parse(a)}var BA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a=Uq(o.defaultValue,e,t,r,n);a!==MA&&(r.default=a)},jA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let a=Uq(o.defaultValue,e,t,r,n);a!==MA&&(r._prefault=a)},UA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{Nr(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},VA=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?o.out:o.in:o.out;It(a,t,n);let s=t.seen.get(e);s.ref=a},HA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},WA=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},YS=(e,t,r,n)=>{let o=e._zod.def;It(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},ZA=(e,t,r,n)=>{let o=e._zod.innerType;It(o,t,n);let i=t.seen.get(e);i.ref=o},XS={string:cA,number:dA,boolean:uA,bigint:fA,symbol:mA,null:pA,undefined:hA,void:gA,never:vA,any:xA,unknown:bA,date:yA,enum:_A,literal:IA,nan:wA,template_literal:SA,file:kA,success:CA,custom:PA,function:DA,transform:RA,map:EA,set:TA,array:$A,object:AA,union:QS,intersection:OA,tuple:zA,record:NA,nullable:FA,nonoptional:LA,default:BA,prefault:jA,catch:UA,pipe:VA,readonly:HA,promise:WA,optional:YS,lazy:ZA};function JS(e,t){if("_idmap"in e){let n=e,o=Ac({...t,processors:XS}),i={};for(let l of n._idmap.entries()){let[c,d]=l;It(d,o)}let a={},s={registry:n,uri:t?.uri,defs:i};o.external=s;for(let l of n._idmap.entries()){let[c,d]=l;Oc(o,d),go(a,c,zc(o,d))}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let r=Ac({...t,processors:XS});return It(e,r),Oc(r,e),zc(r,e)}var e1=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Ac({processors:XS,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return It(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Oc(this.ctx,t);let n=zc(this.ctx,t),{"~standard":o,...i}=n;return i}};var Vq={};var Yp={};gs(Yp,{ZodAny:()=>pO,ZodArray:()=>xO,ZodBase64:()=>b1,ZodBase64URL:()=>y1,ZodBigInt:()=>Xp,ZodBigIntFormat:()=>w1,ZodBoolean:()=>Kp,ZodCIDRv4:()=>v1,ZodCIDRv6:()=>x1,ZodCUID:()=>d1,ZodCUID2:()=>u1,ZodCatch:()=>MO,ZodCodec:()=>Wx,ZodCreditCard:()=>aO,ZodCustom:()=>Zx,ZodCustomStringFormat:()=>Lu,ZodDate:()=>Mx,ZodDefault:()=>AO,ZodDiscriminatedUnion:()=>yO,ZodE164:()=>_1,ZodEmail:()=>a1,ZodEmoji:()=>l1,ZodEnum:()=>Zp,ZodExactOptional:()=>P1,ZodFile:()=>RO,ZodFunction:()=>KO,ZodGUID:()=>s1,ZodIBAN:()=>sO,ZodIPv4:()=>h1,ZodIPv6:()=>g1,ZodISODate:()=>Fc,ZodISODateTime:()=>Nc,ZodISODuration:()=>Mc,ZodISOTime:()=>Lc,ZodInstanceOf:()=>YO,ZodIntersection:()=>_O,ZodJWT:()=>I1,ZodKSUID:()=>p1,ZodLazy:()=>ZO,ZodLiteral:()=>DO,ZodMAC:()=>iO,ZodMap:()=>CO,ZodNaN:()=>jO,ZodNanoID:()=>c1,ZodNever:()=>gO,ZodNonOptional:()=>D1,ZodNull:()=>fO,ZodNullable:()=>$O,ZodNumber:()=>qp,ZodNumberFormat:()=>Mu,ZodObject:()=>jx,ZodOptional:()=>Vx,ZodPipe:()=>Hx,ZodPrefault:()=>zO,ZodPreprocess:()=>UO,ZodPromise:()=>qO,ZodReadonly:()=>VO,ZodRecord:()=>Wp,ZodSet:()=>PO,ZodString:()=>Gp,ZodStringFormat:()=>Ct,ZodSuccess:()=>LO,ZodSymbol:()=>dO,ZodTemplateLiteral:()=>WO,ZodTransform:()=>EO,ZodTuple:()=>wO,ZodType:()=>We,ZodULID:()=>f1,ZodURL:()=>Lx,ZodUUID:()=>Qa,ZodUndefined:()=>uO,ZodUnion:()=>Ux,ZodUnknown:()=>hO,ZodVoid:()=>vO,ZodXID:()=>m1,ZodXor:()=>bO,_ZodString:()=>i1,_default:()=>OO,_function:()=>tX,any:()=>$K,array:()=>Bx,base64:()=>fK,base64url:()=>mK,bigint:()=>PK,boolean:()=>cO,catch:()=>BO,check:()=>rX,cidrv4:()=>dK,cidrv6:()=>uK,codec:()=>QK,creditCard:()=>hK,cuid:()=>rK,cuid2:()=>oK,currencyCode:()=>_K,custom:()=>oX,date:()=>OK,describe:()=>nX,discriminatedUnion:()=>BK,e164:()=>pK,email:()=>Zq,emoji:()=>eK,enum:()=>k1,exactOptional:()=>TO,file:()=>GK,float32:()=>wK,float64:()=>SK,function:()=>tX,guid:()=>Gq,hash:()=>IK,hex:()=>yK,hostname:()=>bK,httpUrl:()=>Jq,iban:()=>gK,instanceof:()=>aX,int:()=>o1,int32:()=>kK,int64:()=>DK,intersection:()=>IO,invertCodec:()=>YK,ipv4:()=>sK,ipv6:()=>cK,json:()=>lX,jwt:()=>vK,keyof:()=>zK,ksuid:()=>aK,lazy:()=>GO,literal:()=>ZK,looseObject:()=>LK,looseRecord:()=>UK,mac:()=>lK,map:()=>VK,meta:()=>iX,nan:()=>XK,nanoid:()=>tK,nativeEnum:()=>WK,never:()=>S1,nonoptional:()=>FO,null:()=>mO,nullable:()=>Fx,nullish:()=>qK,number:()=>lO,object:()=>NK,optional:()=>Nu,partialRecord:()=>jK,pipe:()=>n1,prefault:()=>NO,preprocess:()=>cX,promise:()=>eX,readonly:()=>HO,record:()=>kO,refine:()=>XO,set:()=>HK,strictObject:()=>FK,string:()=>Nx,stringFormat:()=>xK,stringbool:()=>sX,success:()=>KK,superRefine:()=>QO,symbol:()=>EK,templateLiteral:()=>JK,transform:()=>C1,tuple:()=>SO,uint32:()=>CK,uint64:()=>RK,ulid:()=>nK,undefined:()=>TK,union:()=>Qp,unknown:()=>zu,url:()=>Yq,uuid:()=>qq,uuidv4:()=>Kq,uuidv6:()=>Xq,uuidv7:()=>Qq,void:()=>AK,xid:()=>iK,xor:()=>MK});var t1={};gs(t1,{endsWith:()=>Op,gt:()=>Ka,gte:()=>Zn,includes:()=>$p,length:()=>Au,lowercase:()=>Ep,lt:()=>qa,lte:()=>Wn,maxLength:()=>$u,maxSize:()=>$c,mime:()=>Np,minLength:()=>rl,minSize:()=>Xa,multipleOf:()=>Tc,negative:()=>ZS,nonnegative:()=>qS,nonpositive:()=>GS,normalize:()=>Fp,overwrite:()=>sa,positive:()=>WS,properties:()=>zp,property:()=>KS,regex:()=>Rp,size:()=>Tu,slugify:()=>jp,startsWith:()=>Ap,toLowerCase:()=>Mp,toUpperCase:()=>Bp,trim:()=>Lp,uppercase:()=>Tp});var Hq=new WeakSet([Object.prototype,Error.prototype]);function r1(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var Wq=(e,t)=>{ax.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);Hq.has(r)||(Hq.add(r),r1(r,"format",n=>o=>lx(n,o)),r1(r,"flatten",n=>o=>sx(n,o)),r1(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,hp,2)}),r1(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,hp,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},fge=j("ZodError",Wq),En=j("ZodError",Wq,void 0,{Parent:Error});var GA=bp(En),qA=_p(En),KA=Ip(En),XA=wp(En),QA=Tw(En),YA=$w(En),JA=Aw(En),eO=Ow(En),tO=zw(En),rO=Nw(En),oO=Fw(En),nO=Lw(En);function pge(){Qr.localeError||hr(gS())}function Fu(){Qr.memoizer||hr({memoizer:Cx()})}var We=j("ZodType",(e,t)=>(pge(),Me.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Y.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return yt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(XO(e,t))},superRefine(e,t){return this.check(QO(e,t))},overwrite(e){return this.check(sa(e))},optional(){return Nu(this)},exactOptional(){return TO(this)},nullable(){return Fx(this)},nullish(){return Nu(Fx(this))},nonoptional(e){return FO(this,e)},array(){return Bx(this)},or(e){return Qp([this,e])},and(e){return IO(this,e)},transform(e){return n1(this,C1(e))},default(e){return OO(this,e)},prefault(e){return NO(this,e)},catch(e){return BO(this,e)},pipe(e){return n1(this,e)},readonly(){return HO(this)},describe(e){let t=this.clone();return vo.add(t,{description:e}),t},meta(...e){if(e.length===0)return vo.get(this);let t=this.clone();return vo.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Y.hide(this,"~standard",{...Kw(this),jsonSchema:{input:Up(this,"input"),output:Up(this,"output")}})},set"~standard"(e){Y.own(this,"~standard",e)},parse:function e(t,r){return GA(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await qA(this,t,r,{callee:e})},safeParse(e,t){return KA(this,e,t)},async safeParseAsync(e,t){return XA(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Y.own(this,"spa",e)},validate(e,t){return cx(this,e,t)},validateAsync(e,t){return dx(this,e,t)},encode:function e(t,r){return QA(this,t,r,{callee:e})},decode:function e(t,r){return YA(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await JA(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await eO(this,t,r,{callee:e})},safeEncode(e,t){return tO(this,e,t)},safeDecode(e,t){return rO(this,e,t)},async safeEncodeAsync(e,t){return oO(this,e,t)},async safeDecodeAsync(e,t){return nO(this,e,t)},toJSONSchema(e){return aA(this,{})(e)},get description(){return vo.get(this)?.description},get _def(){return this._zod.def}}),i1=j("_ZodString",(e,t)=>{Cu.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>cA(e,r,n,o)},Y.derived({format:e=>Fr(e).format??null,minLength:e=>Fr(e).minimum??null,maxLength:e=>Fr(e).maximum??null},{regex(...e){return this.check(Rp(...e))},includes(...e){return this.check($p(...e))},startsWith(...e){return this.check(Ap(...e))},endsWith(...e){return this.check(Op(...e))},min(...e){return this.check(rl(...e))},max(...e){return this.check($u(...e))},length(...e){return this.check(Au(...e))},nonempty(...e){return this.check(rl(1,...e))},lowercase(e){return this.check(Ep(e))},uppercase(e){return this.check(Tp(e))},trim(){return this.check(Lp())},normalize(...e){return this.check(Fp(...e))},toLowerCase(){return this.check(Mp())},toUpperCase(){return this.check(Bp())},slugify(){return this.check(jp())}})),Gp=j("ZodString",(e,t)=>{Cu.init(e,t),i1.init(e,t)},{email(e){return this.check(SS(a1,e))},url(e){return this.check(Rx(Lx,e))},jwt(e){return this.check(HS(I1,e))},emoji(e){return this.check(ES(l1,e))},guid(e){return this.check(kS(s1,e))},uuid(e){return this.check(CS(Qa,e))},uuidv4(e){return this.check(PS(Qa,e))},uuidv6(e){return this.check(DS(Qa,e))},uuidv7(e){return this.check(RS(Qa,e))},nanoid(e){return this.check(TS(c1,e))},cuid(e){return this.check($S(d1,e))},cuid2(e){return this.check(AS(u1,e))},ulid(e){return this.check(OS(f1,e))},base64(e){return this.check(jS(b1,e))},base64url(e){return this.check(US(y1,e))},xid(e){return this.check(zS(m1,e))},ksuid(e){return this.check(NS(p1,e))},ipv4(e){return this.check(FS(h1,e))},ipv6(e){return this.check(LS(g1,e))},cidrv4(e){return this.check(MS(v1,e))},cidrv6(e){return this.check(BS(x1,e))},e164(e){return this.check(VS(_1,e))},datetime(e){return this.check(Ex(Nc,e))},date(e){return this.check(Tx(Fc,e))},time(e){return this.check($x(Lc,e))},duration(e){return this.check(Ax(Mc,e))}});function Nx(e){return I5(Gp,e)}var Ct=j("ZodStringFormat",(e,t)=>{_t.init(e,t),i1.init(e,t)}),Nc=j("ZodISODateTime",(e,t)=>{p$.init(e,t),Ct.init(e,t)}),Fc=j("ZodISODate",(e,t)=>{h$.init(e,t),Ct.init(e,t)}),Lc=j("ZodISOTime",(e,t)=>{g$.init(e,t),Ct.init(e,t)}),Mc=j("ZodISODuration",(e,t)=>{v$.init(e,t),Ct.init(e,t)}),a1=j("ZodEmail",(e,t)=>{o$.init(e,t),Ct.init(e,t)});function Zq(e){return SS(a1,e)}var s1=j("ZodGUID",(e,t)=>{t$.init(e,t),Ct.init(e,t)});function Gq(e){return kS(s1,e)}var Qa=j("ZodUUID",(e,t)=>{r$.init(e,t),Ct.init(e,t)});function qq(e){return CS(Qa,e)}function Kq(e){return PS(Qa,e)}function Xq(e){return DS(Qa,e)}function Qq(e){return RS(Qa,e)}var Lx=j("ZodURL",(e,t)=>{a$.init(e,t),Ct.init(e,t)});function Yq(e){return Rx(Lx,e)}function Jq(e){return Rx(Lx,{protocol:ux,hostname:vT,...Y.normalizeParams(e)})}var l1=j("ZodEmoji",(e,t)=>{s$.init(e,t),Ct.init(e,t)});function eK(e){return ES(l1,e)}var c1=j("ZodNanoID",(e,t)=>{l$.init(e,t),Ct.init(e,t)});function tK(e){return TS(c1,e)}var d1=j("ZodCUID",(e,t)=>{c$.init(e,t),Ct.init(e,t)});function rK(e){return $S(d1,e)}var u1=j("ZodCUID2",(e,t)=>{d$.init(e,t),Ct.init(e,t)});function oK(e){return AS(u1,e)}var f1=j("ZodULID",(e,t)=>{u$.init(e,t),Ct.init(e,t)});function nK(e){return OS(f1,e)}var m1=j("ZodXID",(e,t)=>{f$.init(e,t),Ct.init(e,t)});function iK(e){return zS(m1,e)}var p1=j("ZodKSUID",(e,t)=>{m$.init(e,t),Ct.init(e,t)});function aK(e){return NS(p1,e)}var h1=j("ZodIPv4",(e,t)=>{x$.init(e,t),Ct.init(e,t)});function sK(e){return FS(h1,e)}var iO=j("ZodMAC",(e,t)=>{y$.init(e,t),Ct.init(e,t)});function lK(e){return S5(iO,e)}var g1=j("ZodIPv6",(e,t)=>{b$.init(e,t),Ct.init(e,t)});function cK(e){return LS(g1,e)}var v1=j("ZodCIDRv4",(e,t)=>{_$.init(e,t),Ct.init(e,t)});function dK(e){return MS(v1,e)}var x1=j("ZodCIDRv6",(e,t)=>{I$.init(e,t),Ct.init(e,t)});function uK(e){return BS(x1,e)}var b1=j("ZodBase64",(e,t)=>{w$.init(e,t),Ct.init(e,t)});function fK(e){return jS(b1,e)}var y1=j("ZodBase64URL",(e,t)=>{S$.init(e,t),Ct.init(e,t)});function mK(e){return US(y1,e)}var _1=j("ZodE164",(e,t)=>{k$.init(e,t),Ct.init(e,t)});function pK(e){return VS(_1,e)}var aO=j("ZodCreditCard",(e,t)=>{C$.init(e,t),Ct.init(e,t)});function hK(e){return k5(aO,e)}var sO=j("ZodIBAN",(e,t)=>{P$.init(e,t),Ct.init(e,t)});function gK(e){return C5(sO,e)}var I1=j("ZodJWT",(e,t)=>{D$.init(e,t),Ct.init(e,t)});function vK(e){return HS(I1,e)}var Lu=j("ZodCustomStringFormat",(e,t)=>{R$.init(e,t),Ct.init(e,t)});function xK(e,t,r={}){return Ou(Lu,e,t,r)}function bK(e){return Ou(Lu,"hostname",gT,e)}function yK(e){return Ou(Lu,"hex",TT,e)}function _K(e){return Ou(Lu,"currency_code",bT,e)}function IK(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=Si[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Ou(Lu,n,o,t)}var qp=j("ZodNumber",(e,t)=>{iS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dA(e,r,n,o),e.isFinite=!0},Y.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=Fr(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=Fr(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=Fr(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>Fr(e).format??null},{gt(e,t){return this.check(Ka(e,t))},gte(e,t){return this.check(Zn(e,t))},min(e,t){return this.check(Zn(e,t))},lt(e,t){return this.check(qa(e,t))},lte(e,t){return this.check(Wn(e,t))},max(e,t){return this.check(Wn(e,t))},int(e){return this.check(o1(e))},safe(e){return this.check(o1(e))},positive(e){return this.check(Ka(0,e))},nonnegative(e){return this.check(Zn(0,e))},negative(e){return this.check(qa(0,e))},nonpositive(e){return this.check(Wn(0,e))},multipleOf(e,t){return this.check(Tc(e,t))},step(e,t){return this.check(Tc(e,t))},finite(){return this}}));function lO(e){return D5(qp,e)}var Mu=j("ZodNumberFormat",(e,t)=>{E$.init(e,t),qp.init(e,t)});function o1(e){return E5(Mu,e)}function wK(e){return T5(Mu,e)}function SK(e){return $5(Mu,e)}function kK(e){return A5(Mu,e)}function CK(e){return O5(Mu,e)}var Kp=j("ZodBoolean",(e,t)=>{yx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>uA(e,r,n,o)});function cO(e){return z5(Kp,e)}var Xp=j("ZodBigInt",(e,t)=>{aS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fA(e,r,n,o)},Y.derived({minValue:e=>Fr(e).minimum??null,maxValue:e=>Fr(e).maximum??null,format:e=>Fr(e).format??null},{gte(e,t){return this.check(Zn(e,t))},min(e,t){return this.check(Zn(e,t))},gt(e,t){return this.check(Ka(e,t))},lt(e,t){return this.check(qa(e,t))},lte(e,t){return this.check(Wn(e,t))},max(e,t){return this.check(Wn(e,t))},positive(e){return this.check(Ka(BigInt(0),e))},negative(e){return this.check(qa(BigInt(0),e))},nonpositive(e){return this.check(Wn(BigInt(0),e))},nonnegative(e){return this.check(Zn(BigInt(0),e))},multipleOf(e,t){return this.check(Tc(e,t))}}));function PK(e){return F5(Xp,e)}var w1=j("ZodBigIntFormat",(e,t)=>{T$.init(e,t),Xp.init(e,t)});function DK(e){return M5(w1,e)}function RK(e){return B5(w1,e)}var dO=j("ZodSymbol",(e,t)=>{$$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mA(e,r,n,o)});function EK(e){return j5(dO,e)}var uO=j("ZodUndefined",(e,t)=>{A$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hA(e,r,n,o)});function TK(e){return U5(uO,e)}var fO=j("ZodNull",(e,t)=>{O$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pA(e,r,n,o)});function mO(e){return V5(fO,e)}var pO=j("ZodAny",(e,t)=>{z$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xA(e,r,n,o)});function $K(){return H5(pO)}var hO=j("ZodUnknown",(e,t)=>{N$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bA(e,r,n,o)});function zu(){return W5(hO)}var gO=j("ZodNever",(e,t)=>{F$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vA(e,r,n,o)});function S1(e){return Z5(gO,e)}var vO=j("ZodVoid",(e,t)=>{L$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gA(e,r,n,o)});function AK(e){return G5(vO,e)}var Mx=j("ZodDate",(e,t)=>{M$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yA(e,r,n,o),e.min=(r,n)=>e.check(Zn(r,n)),e.max=(r,n)=>e.check(Wn(r,n))},Y.derived({minDate:e=>{let{minimum:t}=Fr(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Fr(e);return t?new Date(t):null}},{}));function OK(e){return q5(Mx,e)}var xO=j("ZodArray",(e,t)=>{Fu(),B$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$A(e,r,n,o),e.element=t.element},{min(e,t){return this.check(rl(e,t))},nonempty(e){return this.check(rl(1,e))},max(e,t){return this.check($u(e,t))},length(e,t){return this.check(Au(e,t))},unwrap(){return this.element}});function Bx(e,t){return Q5(xO,e,t)}function zK(e){let t=e._zod.def.shape;return k1(Object.keys(t))}var jx=j("ZodObject",(e,t)=>{Fu(),j$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>AA(e,r,n,o),Y.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return k1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Y.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:zu()}))},loose(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:zu()}))},strict(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:S1()}))},strip(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return Y.extend(this,e)},safeExtend(e){return Y.safeExtend(this,e)},merge(e){return Y.merge(this,e)},pick(e){return Y.pick(this,e)},omit(e){return Y.omit(this,e)},partial(...e){return Y.partial(Vx,this,e[0])},exactPartial(...e){return Y.partial(P1,this,e[0],"exactPartial")},required(...e){return Y.required(D1,this,e[0])}});function NK(e,t){let r={type:"object",shape:e??{},...Y.normalizeParams(t)};return new jx(r)}function FK(e,t){return new jx({type:"object",shape:e,catchall:S1(),...Y.normalizeParams(t)})}function LK(e,t){return new jx({type:"object",shape:e,catchall:zu(),...Y.normalizeParams(t)})}var Ux=j("ZodUnion",(e,t)=>{_x.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>QS(e,r,n,o),e.options=t.options});function Qp(e,t){return new Ux({type:"union",options:e,...Y.normalizeParams(t)})}var bO=j("ZodXor",(e,t)=>{Ux.init(e,t),U$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>QS(e,r,n,o),e.options=t.options});function MK(e,t){return new bO({type:"union",options:e,inclusive:!1,...Y.normalizeParams(t)})}var yO=j("ZodDiscriminatedUnion",(e,t)=>{Ux.init(e,t),H$.init(e,t)});function BK(e,t,r){return new yO({type:"union",options:t,discriminator:e,...Y.normalizeParams(r)})}var _O=j("ZodIntersection",(e,t)=>{W$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>OA(e,r,n,o)});function IO(e,t){return new _O({type:"intersection",left:e,right:t})}var wO=j("ZodTuple",(e,t)=>{Fu(),sS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zA(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Vx({type:"optional",innerType:t}))})}});function SO(e,t,r){let n=t instanceof Me,o=n?r:t,i=n?t:null;return new wO({type:"tuple",items:e,rest:i,...Y.normalizeParams(o)})}var Wp=j("ZodRecord",(e,t)=>{Fu(),Z$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>NA(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function kO(e,t,r){return!t||!t._zod?new Wp({type:"record",keyType:Nx(),valueType:e,...Y.normalizeParams(t)}):new Wp({type:"record",keyType:e,valueType:t,...Y.normalizeParams(r)})}function jK(e,t,r){return new Wp({type:"record",keyType:e,valueType:t,...Y.normalizeParams(r),partial:!0})}function UK(e,t,r){return new Wp({type:"record",keyType:e,valueType:t,mode:"loose",...Y.normalizeParams(r)})}var CO=j("ZodMap",(e,t)=>{Fu(),G$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>EA(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Xa(...r)),e.nonempty=r=>e.check(Xa(1,r)),e.max=(...r)=>e.check($c(...r)),e.size=(...r)=>e.check(Tu(...r))});function VK(e,t,r){return new CO({type:"map",keyType:e,valueType:t,...Y.normalizeParams(r)})}var PO=j("ZodSet",(e,t)=>{Fu(),q$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>TA(e,r,n,o),e.min=(...r)=>e.check(Xa(...r)),e.nonempty=r=>e.check(Xa(1,r)),e.max=(...r)=>e.check($c(...r)),e.size=(...r)=>e.check(Tu(...r))});function HK(e,t){return new PO({type:"set",valueType:e,...Y.normalizeParams(t)})}var Zp=j("ZodEnum",(e,t)=>{K$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(n,o,i)=>_A(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Zp({...t,checks:[],...Y.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Zp({...t,checks:[],...Y.normalizeParams(o),entries:i})}});function k1(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Zp({type:"enum",entries:r,...Y.normalizeParams(t)})}function WK(e,t){return new Zp({type:"enum",entries:e,...Y.normalizeParams(t)})}var DO=j("ZodLiteral",(e,t)=>{X$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>IA(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ZK(e,t){return new DO({type:"literal",values:Array.isArray(e)?e:[e],...Y.normalizeParams(t)})}var RO=j("ZodFile",(e,t)=>{Q$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kA(e,r,n,o),e.min=(r,n)=>e.check(Xa(r,n)),e.max=(r,n)=>e.check($c(r,n)),e.mime=(r,n)=>e.check(Np(Array.isArray(r)?r:[r],n))});function GK(e){return Y5(RO,e)}var EO=j("ZodTransform",(e,t)=>{Fu(),Y$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>RA(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ec(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Y.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Y.issue(a))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function C1(e){return new EO({type:"transform",transform:e})}var Vx=j("ZodOptional",(e,t)=>{lS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>YS(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Nu(e){return new Vx({type:"optional",innerType:e})}var P1=j("ZodExactOptional",(e,t)=>{J$.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>YS(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function TO(e){return new P1({type:"optional",innerType:e})}var $O=j("ZodNullable",(e,t)=>{e5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>FA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Fx(e){return new $O({type:"nullable",innerType:e})}function qK(e){return Nu(Fx(e))}var AO=j("ZodDefault",(e,t)=>{t5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>BA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function OO(e,t){return new AO({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}var zO=j("ZodPrefault",(e,t)=>{r5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>jA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function NO(e,t){return new zO({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}var D1=j("ZodNonOptional",(e,t)=>{o5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>LA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function FO(e,t){return new D1({type:"nonoptional",innerType:e,...Y.normalizeParams(t)})}var LO=j("ZodSuccess",(e,t)=>{n5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>CA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function KK(e){return new LO({type:"success",innerType:e})}var MO=j("ZodCatch",(e,t)=>{i5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>UA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function BO(e,t){return new MO({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Y.constantCatch(t)})}var jO=j("ZodNaN",(e,t)=>{a5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wA(e,r,n,o)});function XK(e){return X5(jO,e)}var Hx=j("ZodPipe",(e,t)=>{cS.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>VA(e,r,n,o),e.in=t.in,e.out=t.out});function n1(e,t){return new Hx({type:"pipe",in:e,out:t})}var Wx=j("ZodCodec",(e,t)=>{Hx.init(e,t),Ix.init(e,t)});function QK(e,t,r){return new Wx({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function YK(e){let t=e._zod.def;return new Wx({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var UO=j("ZodPreprocess",(e,t)=>{Hx.init(e,t),s5.init(e,t)}),VO=j("ZodReadonly",(e,t)=>{l5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>HA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function HO(e){return new VO({type:"readonly",innerType:e})}var WO=j("ZodTemplateLiteral",(e,t)=>{c5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>SA(e,r,n,o)});function JK(e,t){return new WO({type:"template_literal",parts:e,...Y.normalizeParams(t)})}var ZO=j("ZodLazy",(e,t)=>{wx.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ZA(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function GO(e){return new ZO({type:"lazy",getter:e})}var qO=j("ZodPromise",(e,t)=>{u5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>WA(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function eX(e){return new qO({type:"promise",innerType:e})}var KO=j("ZodFunction",(e,t)=>{d5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>DA(e,r,n,o)});function tX(e){return new KO({type:"function",input:Array.isArray(e?.input)?SO(e?.input):e?.input??Bx(zu()),output:e?.output??zu()})}var Zx=j("ZodCustom",(e,t)=>{f5.init(e,t),We.init(e,t),e._zod.processJSONSchema=(r,n,o)=>PA(e,r,n,o)});function rX(e){let t=new Dt({check:"custom"});return t._zod.check=e,t}function oX(e,t){return J5(Zx,e??(()=>!0),t)}function XO(e,t={}){return eA(Zx,e,t)}function QO(e,t){return tA(e,t)}var nX=rA,iX=oA,YO=j("ZodInstanceOf",(e,t)=>{Zx.init(e,t)},{properties(e,t){return this.check(zp(e,t))}});function aX(e,t={}){let r=new YO({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Y.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var sX=(...e)=>nA({Codec:Wx,Boolean:Kp,String:Gp},...e);function lX(e){let t=GO(()=>Qp([Nx(e),lO(),cO(),mO(),Bx(t),kO(Nx(),t)]));return t}function cX(e,t){return new UO({type:"pipe",in:C1(e),out:t})}var hge={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function gge(e){hr({customError:e})}function vge(){return hr().customError}var JO;JO||(JO={});var Gx={};gs(Gx,{ZodISODate:()=>Fc,ZodISODateTime:()=>Nc,ZodISODuration:()=>Mc,ZodISOTime:()=>Lc,date:()=>bge,datetime:()=>xge,duration:()=>_ge,time:()=>yge});function xge(e){return Ex(Nc,e)}function bge(e){return Tx(Fc,e)}function yge(e){return $x(Lc,e)}function _ge(e){return Ax(Mc,e)}var xe={...Yp,...t1,iso:Gx},Ige=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function wge(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function dX(e,t){return e.map((r,n)=>n<t?r:r.optional())}function Sge(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function kge(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:Sge(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function Cge(e,t){return xe.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let a of i){let s=t.keySchema.safeParse(a);s.success||n.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function ez(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return`${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let a of e){let s=ez(a,t);if(s===null)return null;i.push(s)}return`a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let a=ez(e[i],t);if(a===null)return null;o.push(`${i.length}:${i}=${a}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var Pge=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Dge=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function qx(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(qx):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>Pge.has(t)?qx(r):!Dge.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(qx))}function uX(e){return e===1?"element":"elements"}function Rge(e,t){return xe.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let i=new Map;for(let a=0;a<o.length;a++){let s=ez(o[a],new Set);if(s===null)continue;let l=i.get(s);if(l===void 0){i.set(s,a);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${l}`,input:o,path:[a],continue:!0})}}if(t.containsSchema){let i=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let l of o)if(t.containsSchema.safeParse(l).success&&++s>=a)break;s<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${uX(i)}; found ${s}`,input:o,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${uX(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function fX(e,t){if(e!==!1)return e===void 0||e===!0?xe.any():nn(e,t)}var Ege=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function mX(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return xe.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return xe.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=kge(o,t),a=nn(i,t);return t.refs.set(o,a),t.processing.delete(o),a}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return xe.null();if(o.length===0)return xe.never();if(o.length===1)return xe.literal(o[0]);if(o.every(a=>typeof a=="string"))return xe.enum(o);let i=o.map(a=>xe.literal(a));return i.length<2?i[0]:xe.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return xe.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let a={...e,type:i};return mX(a,t)});return o.length===0?xe.never():o.length===1?o[0]:xe.union(o)}if(!r)return xe.any();let n;switch(r){case"string":{let o=xe.string();if(e.format){let i=e.format;i==="email"?o=o.check(xe.email()):i==="uri"||i==="uri-reference"?o=o.check(xe.url()):i==="uuid"||i==="guid"?o=o.check(xe.uuid()):i==="date-time"?o=o.check(xe.iso.datetime({offset:!0})):i==="date"?o=o.check(xe.iso.date()):i==="time"?o=o.check(xe.regex(Ege)):i==="duration"?o=o.check(xe.iso.duration()):i==="hostname"?o=o.check(xe.hostname()):i==="ipv4"?o=o.check(xe.ipv4()):i==="ipv6"?o=o.check(xe.ipv6()):i==="mac"?o=o.check(xe.mac()):i==="cidr"?o=o.check(xe.cidrv4()):i==="cidr-v6"?o=o.check(xe.cidrv6()):i==="base64"?o=o.check(xe.base64()):i==="base64url"?o=o.check(xe.base64url()):i==="e164"?o=o.check(xe.e164()):i==="credit_card"?o=o.check(xe.creditCard()):i==="iban"?o=o.check(xe.iban()):i==="jwt"?o=o.check(xe.jwt()):i==="emoji"?o=o.check(xe.emoji()):i==="nanoid"?o=o.check(xe.nanoid()):i==="cuid"?o=o.check(xe.cuid()):i==="cuid2"?o=o.check(xe.cuid2()):i==="ulid"?o=o.check(xe.ulid()):i==="xid"?o=o.check(xe.xid()):i==="ksuid"&&(o=o.check(xe.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?xe.number().int():xe.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=xe.boolean();break}case"null":{n=xe.null();break}case"object":{let o={},i=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?nn(e.additionalProperties,t):void 0;for(let[u,f]of Object.entries(i)){let m=nn(f,t);go(o,u,a.has(u)?m:m.optional())}if(e.patternProperties){let u=e.patternProperties,f=Object.keys(u),m=[];for(let h of f){let b=nn(u[h],t),v=xe.string().regex(new RegExp(h));m.push(xe.looseRecord(v,b))}let p=[];if(Object.keys(o).length>0&&p.push(xe.object(o).passthrough()),p.push(...m),p.length===0)n=xe.object({}).passthrough();else if(p.length===1)n=p[0];else{let h=xe.intersection(p[0],p[1]);for(let b=2;b<p.length;b++)h=xe.intersection(h,p[b]);n=h}if(e.additionalProperties===!1){let h=Object.keys(o),b=f.map(x=>new RegExp(x)),v=n;n=n.check(x=>{if(!Ii(x.value))return;let _=[];for(let I of Object.keys(x.value))h.includes(I)||b.some(S=>S.test(I))||_.push(I);_.length&&x.issues.push({code:"unrecognized_keys",keys:_,input:x.value,inst:v})})}}else{let u=xe.object(o);e.additionalProperties===!1?n=u.strict():s?n=u.catchall(s):n=u.passthrough()}let l=e.propertyNames!==void 0&&e.propertyNames!==!0,c=typeof e.minProperties=="number"?e.minProperties:void 0,d=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(l||c!==void 0||d!==void 0){let u;if(l){let f=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;u=nn(f,t)}n=Cge(n,{keySchema:u,minProperties:c,maxProperties:d})}break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(u=>nn(u,t)),l=dX(s,a),c=Array.isArray(i)?void 0:fX(i,t),d=xe.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(xe.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(xe.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=typeof e.minItems=="number"?e.minItems:0,s=i.map(u=>nn(u,t)),l=dX(s,a),c=fX(e.additionalItems,t),d=xe.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(xe.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(xe.maxLength(e.maxItems)))}else if(i!==void 0){let a=nn(i,t),s=xe.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),n=s}else n=xe.array(xe.any());(e.uniqueItems===!0||e.contains!==void 0)&&(n=Rge(n,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?nn(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function nn(e,t){if(typeof e=="boolean")return e?xe.any():xe.never();let r=mX(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>nn(c,t)),l=xe.union(s);r=n?xe.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>nn(c,t)),l=xe.xor(s);r=n?xe.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:xe.any();else{let s=n?r:nn(e.allOf[0],t),l=n?0:1;for(let c=l;c<e.allOf.length;c++)s=xe.intersection(s,nn(e.allOf[c],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=xe.nullable(r)),e.readOnly===!0&&(r=xe.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(o[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(o[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!qx(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(o[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!qx(e.contains)&&(o.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(o[s]=e[s])}for(let s of Object.keys(e))Ige.has(s)||go(o,s,e[s]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function pX(e,t){if(typeof e=="boolean")return e?xe.any():xe.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=wge(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??vo};return nn(r,i)}var hX=Symbol("z.visit/resolving");function Kx(e,t){let r=typeof t=="function"?t:(a,s)=>{let l=t[a._zod.def.type];return l?l(a,s):a},n=new Map;function o(a){let s=n.get(a);if(s===hX)return new wx({type:"lazy",getter:()=>n.get(a)});if(s!==void 0)return s;n.set(a,hX);let l=i(a),c=r(l,l!==a);return n.set(a,c),c}function i(a){let s=a._zod.def,l=s.type;switch(l){case"object":{let c=s.shape,d=Object.keys(c),u=!1,f={};for(let p of d){let h=o(c[p]);h!==c[p]&&(u=!0),f[p]=h}let m=s.catchall;return s.catchall&&(m=o(s.catchall),m!==s.catchall&&(u=!0)),u?yt(a,{...s,shape:f,catchall:m}):a}case"array":{let c=o(s.element);return c===s.element?a:yt(a,{...s,element:c})}case"tuple":{let c=s.items,d=!1,u=[];for(let m of c){let p=o(m);p!==m&&(d=!0),u.push(p)}let f=s.rest;return s.rest&&(f=o(s.rest),f!==s.rest&&(d=!0)),d?yt(a,{...s,items:u,rest:f}):a}case"record":case"map":{let c=o(s.keyType),d=o(s.valueType);return c===s.keyType&&d===s.valueType?a:yt(a,{...s,keyType:c,valueType:d})}case"set":{let c=o(s.valueType);return c===s.valueType?a:yt(a,{...s,valueType:c})}case"union":{let c=s.options,d=!1,u=[];for(let f of c){let m=o(f);m!==f&&(d=!0),u.push(m)}return d?yt(a,{...s,options:u}):a}case"intersection":{let c=o(s.left),d=o(s.right);return c===s.left&&d===s.right?a:yt(a,{...s,left:c,right:d})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let c=o(s.innerType);return c===s.innerType?a:yt(a,{...s,innerType:c})}case"pipe":{let c=o(s.in),d=o(s.out);return c===s.in&&d===s.out?a:yt(a,{...s,in:c,out:d})}case"function":{let c=o(s.input),d=o(s.output);return c===s.input&&d===s.output?a:yt(a,{...s,input:c,output:d})}case"lazy":{let c=s.getter,{_cachedInner:d,...u}=s;return yt(a,{...u,getter:()=>o(c())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return o(e)}function gX(e){return Kx(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:Qp(r.options)}})}function Tge(e,t){if(!t?.length)return e;let r=e._zod.def;return yt(e,ia(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function vX(e){return Tge(e.out,e.checks)}function $ge(e){return e.in._zod.traits.has("$ZodTransform")?vX(e):e.in}function xX(e){return Kx(e,{pipe:t=>$ge(t._zod.def),default:(t,r)=>r?Nu(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function bX(e){return Kx(e,{pipe:t=>vX(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var tz={};gs(tz,{bigint:()=>Nge,boolean:()=>zge,date:()=>Fge,number:()=>Oge,string:()=>Age});function Age(e){return w5(Gp,e)}function Oge(e){return R5(qp,e)}function zge(e){return N5(Kp,e)}function Nge(e){return L5(Xp,e)}function Fge(e){return K5(Mx,e)}var Xx=class extends Error{constructor(r,n){super(r);Et(this,"fix",n);this.name="UserError"}},yX=(e,t)=>{throw new Xx(e,t)};var Lge=g.enum(["user","cancelled","invalid","bug"]),_X=g.strictObject({kind:Lge,message:g.string().max(2e3),fix:g.string().max(2e3).optional()}),Qx=class extends Error{constructor(t="Nothing changed."){super(t),this.name="Cancelled"}};function rz(e){return e.kind==="cancelled"?new Qx(e.message):new Xx(e.message,e.fix)}function IX(e){return e.issues.map(t=>(t.path.length?t.path.join(".")+": ":"")+t.message).join("; ")}function we(e){return{...e,cli:e.cli,kind:"operation"}}function Qe(e){return{...e,cli:e.cli,kind:"query"}}function mt(e){return{...e,kind:"view"}}function Mge(e,t){let r=e.input.safeParse(t??{});return r.success||yX("That does not work for "+e.title.toLowerCase()+": "+IX(r.error)),r.data}function wX(e,t){let r=e.inputs?.(t)??{};return Object.fromEntries(Object.entries(e.queries).map(([n,o])=>[n,Mge(o,r[n])]))}var Bge=new Set(["$schema"]),la=class e{constructor(t){Et(this,"schema");this.schema=t}get inner(){let t=this.schema;for(;;){let r=t._zod.def;if(["optional","default","nullable","prefault","readonly"].includes(r.type)&&r.innerType)t=r.innerType;else if(r.type==="pipe"&&r.in)t=r.in;else return t}}get type(){return this.inner._zod.def.type}get isSection(){return this.type==="object"&&!!this.inner.shape}get description(){return this.schema.description??this.inner.description}get min(){return this.inner.minValue??void 0}get max(){return this.inner.maxValue??void 0}get integer(){return!!this.inner.isInt}get secret(){let t=r=>r.meta?.();return t(this.schema)?.secret===!0||t(this.inner)?.secret===!0}get optional(){return["optional","default"].includes(this.schema._zod.def.type)}rangeText(){let t=(this.inner._zod.def.checks??[]).map(l=>l._zod.def),r=t.find(l=>l.check==="greater_than"),n=t.find(l=>l.check==="less_than"),o=r?.value,i=n?.value;if(o!==void 0&&i!==void 0&&r?.inclusive!==!1&&n?.inclusive!==!1)return o+" to "+i;let a=o===void 0?"":(r?.inclusive===!1?"more than ":"at least ")+o,s=i===void 0?"":(n?.inclusive===!1?"less than ":"at most ")+i;return[a,s].filter(Boolean).join(" and ")}children(){return Object.entries(this.inner.shape??{}).filter(([t])=>!Bge.has(t)).map(([t,r])=>[t,new e(r)])}child(t){let r=this.inner.shape?.[t];return r?new e(r):void 0}leaves(t=[]){return this.children().flatMap(([r,n])=>n.isSection?n.leaves([...t,r]):[{key:[...t,r],node:n}])}get element(){let t=this.inner._zod.def;return t.type==="array"&&t.element?new e(t.element):t.type==="record"&&t.valueType?new e(t.valueType):void 0}get options(){return(this.inner._zod.def.options??[]).map(t=>new e(t))}get choices(){let t=this.inner._zod.def;return t.type==="enum"?Object.values(t.entries??{}):t.type==="literal"?t.values??[]:[]}get editor(){let t=this.type;if(t==="boolean")return"boolean";if(t==="enum"||t==="literal")return"choice";if(t==="union")return this.options.every(n=>["literal","enum","boolean"].includes(n.type))?"choice":"union";if(t==="number"||t==="string")return t;let r=this.element;return t==="array"&&r?r.type==="string"?"string-list":r.type==="enum"?"choice-list":r.type==="object"?"object-list":"json":t==="record"&&r?["string","number","boolean"].includes(r.type)?"string-map":r.type==="object"?"object-map":"json":t==="object"?"object":"json"}get choiceValues(){return this.type!=="union"?this.choices:this.options.flatMap(t=>t.type==="boolean"?[!0,!1]:t.choices)}get openOption(){return this.options.find(t=>!["literal","enum","boolean"].includes(t.type))}initial(){let t=this.schema._zod.def;if(t.type==="default")return structuredClone(t.defaultValue);switch(this.type){case"boolean":return!1;case"number":return this.min??0;case"string":return"";case"enum":case"literal":return this.choices[0];case"union":return this.options[0]?.initial();case"array":return[];case"record":return{};case"object":return Object.fromEntries(this.children().filter(([,r])=>!["optional","default"].includes(r.schema._zod.def.type)).map(([r,n])=>[r,n.initial()]));default:return null}}check(t){let r=this.schema.safeParse(t);return r.success?!0:r.error.issues.map(n=>(n.path.length?n.path.join(".")+": ":"")+n.message).join("; ")}};function Tn(e,t=Date.now()){let r=Math.max(0,Math.round((t-new Date(e).getTime())/1e3));return Number.isNaN(r)?"":r<45?"just now":r<3600?Math.round(r/60)+" min ago":r<86400?Math.round(r/3600)+" h ago":Math.round(r/86400)+" d ago"}function Jp(e,t,r=t+"s"){return e+" "+(e===1?t:r)}var jge=new Set(["mb","gb","cpu","gpu","jdk","sdk","id","url","ui","npm","msvc","uv","api","ssh","vm","io"]),Uge={harness:"agent",harnesses:"agents"};function Yx(e){let t=["B","KB","MB","GB","TB"],r=e<=0?0:Math.min(t.length-1,Math.floor(Math.log(e)/Math.log(1024))),n=e/1024**r;return(r===0?String(e):n.toFixed(n<10?1:0))+" "+t[r]}function SX(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").split(" ").filter(Boolean).map(r=>Uge[r.toLowerCase()]??r).map((r,n)=>{let o=r.toLowerCase();return jge.has(o)?r.toUpperCase():n===0?r[0].toUpperCase()+r.slice(1):o}).join(" ")}var Vge=["boolean","enum","number","text","secret","path","list","map","object","json"],Hge=g.union([g.string(),g.number(),g.boolean()]),Bc=g.lazy(()=>g.strictObject({name:g.string(),key:g.array(g.string()),kind:g.enum(Vge),label:g.string(),help:g.string().optional(),optional:g.boolean(),default:g.unknown().optional(),choices:g.array(g.strictObject({value:Hge,label:g.string()})).optional(),open:Bc.optional(),min:g.number().optional(),max:g.number().optional(),integer:g.boolean().optional(),range:g.string().optional(),pathKind:g.enum(["dir","file"]).optional(),literals:g.array(g.string()).optional(),element:Bc.optional(),fields:g.array(Bc).optional()})),kX={"storage.root":"dir","projects.roots":"dir","projects.exclude":"dir","projects.declinedRoots":"dir","claudeProfile.hostDir":"dir","claudeProfile.globalStateFile":"file",scripts:"file"};function Wge(e){let t=e.join("."),r=e[e.length-1]??"";if(kX[t])return kX[t];if(e[0]==="mappings"&&r==="host"||r==="hostDir"||/(Dir|Folder)$/.test(r))return"dir";if(/File$/.test(r))return"file"}function Zge(e){return/"auto"/.test(e.description??"")?["auto"]:[]}function Gge(e){return e===!0?"On":e===!1?"Off":String(e)}function CX(e){return e!==void 0&&Number.isFinite(e)&&Math.abs(e)<Number.MAX_SAFE_INTEGER}function qge(e){let t=e.schema._zod.def;return t.type==="default"?t.defaultValue:void 0}function jc(e,t=[],r){let n=e instanceof la?e:new la(e),o=t[t.length-1]??"",i={name:o,key:[...t],label:r??(o?SX(o):""),...n.description?{help:n.description}:{},optional:n.optional},a=qge(n),s=l=>a===void 0?{}:{default:l?a===""?"":"***":a};switch(n.editor){case"boolean":return{...i,kind:"boolean",...s(!1)};case"choice":case"union":{let l=n.openOption;return{...i,kind:"enum",...s(!1),choices:n.choiceValues.filter(c=>["string","number","boolean"].includes(typeof c)).map(c=>({value:c,label:Gge(c)})),...l?{open:jc(l,t,i.label)}:{}}}case"number":{let l=n.rangeText();return{...i,kind:"number",...s(!1),...CX(n.min)?{min:n.min}:{},...CX(n.max)?{max:n.max}:{},...n.integer?{integer:!0}:{},...l?{range:l}:{}}}case"string":{if(n.secret)return{...i,kind:"secret",...s(!0)};let l=Wge(t);return l?{...i,kind:"path",...s(!1),pathKind:l,literals:Zge(n)}:{...i,kind:"text",...s(!1)}}case"string-list":case"choice-list":case"object-list":return{...i,kind:"list",...s(!1),element:jc(n.element,t,"Entry")};case"string-map":case"object-map":return{...i,kind:"map",...s(n.element?.secret??!1),element:Kge(n,t)};case"object":return{...i,kind:"object",...s(!1),fields:R1(n,t)};default:return{...i,kind:"json",...s(!1)}}}function Kge(e,t){return jc(e.element,[...t,"*"],"Value")}function R1(e,t=[]){return(e instanceof la?e:new la(e)).children().map(([n,o])=>jc(o,[...t,n]))}function Xge(e){if(typeof e!="object"||e===null||Array.isArray(e))return String(e);let t=e;return typeof t.host=="string"&&typeof t.guest=="string"?t.host+" \u2192 "+t.guest+(t.readOnly?" (read-only)":""):Object.values(t).filter(n=>typeof n=="string"&&n!=="").slice(0,2).join(" \xB7 ")||"{ "+Object.keys(t).join(", ")+" }"}function oz(e,t){return e.length>t?e.slice(0,Math.max(0,t-1))+"\u2026":e}function E1(e,t,r=60){if(e===void 0)return{text:"not set",tone:"muted"};if(t?.kind==="secret")return e===""?{text:"(empty)",tone:"muted"}:{text:"***"};if(e===!0)return{text:"On",tone:"ok"};if(e===!1)return{text:"Off",tone:"muted"};if(e===null)return{text:"none",tone:"muted"};if(typeof e=="string")return e===""?{text:"(empty)",tone:"muted"}:{text:oz(e,r)};if(typeof e=="number")return{text:String(e)};if(Array.isArray(e))return e.length===0?{text:"none",tone:"muted"}:{text:oz(e.length+" \xB7 "+e.map(o=>typeof o=="object"?Xge(o):String(o)).join(", "),r)};let n=Object.keys(e);return n.length?{text:oz(n.length+" \xB7 "+n.join(", "),r)}:{text:"none",tone:"muted"}}function T1(e,t){if(t===void 0||t==="")return e.optional||e.kind==="text"?void 0:"Required.";if(e.kind==="number"){let r=typeof t=="number"?t:Number(t);if(!Number.isFinite(r))return"Enter a number.";if(e.integer&&!Number.isInteger(r))return"Enter a whole number.";if(e.min!==void 0&&r<e.min||e.max!==void 0&&r>e.max)return e.range?"Use "+e.range+".":"Out of range."}if(e.kind==="enum"&&!e.open&&!e.choices?.some(r=>r.value===t))return"Choose one."}var eh=g.array(g.string()).optional(),PX=g.strictObject({value:g.string(),label:g.string(),description:g.string().optional()}),$1=g.strictObject({message:g.string(),fix:g.string()}),Qge=g.strictObject({kind:g.literal("confirm"),title:g.string(),lines:eh,yes:g.string().optional(),danger:g.boolean().optional(),typed:g.string().optional(),implied:g.boolean().optional(),skipWithYes:g.boolean().optional(),noTerminal:g.strictObject({message:g.string(),fix:g.string()}).optional()}),Yge=g.strictObject({kind:g.literal("choose"),title:g.string(),lines:eh,choices:g.array(PX).min(1),initial:g.string().optional(),noTerminal:$1.optional()}),Jge=g.strictObject({kind:g.literal("text"),title:g.string(),lines:eh,initial:g.string().optional(),allowEmpty:g.boolean().optional(),problem:g.string().optional(),noTerminal:$1.optional()}),eve=g.strictObject({kind:g.literal("secret"),title:g.string(),lines:eh,problem:g.string().optional()}),tve=g.strictObject({kind:g.literal("path"),title:g.string(),lines:eh,pathKind:g.enum(["dir","file"]),initial:g.string().optional(),literals:g.array(g.string()).optional(),problem:g.string().optional(),noTerminal:$1.optional()}),rve=g.strictObject({kind:g.literal("checklist"),title:g.string(),lines:eh,choices:g.array(PX),checked:g.array(g.string()).optional(),noTerminal:$1.optional()}),DX=g.discriminatedUnion("kind",[Qge,Yge,Jge,eve,tve,rve]),Rht={confirm:g.boolean(),choose:g.string().max(1e3).optional(),text:g.string().max(1e4).optional(),secret:g.string().max(1e4).optional(),path:g.string().max(2e3).optional(),checklist:g.array(g.string().max(1e3)).max(1e3).optional()};async function nz(e,t,r){for(let n=t;;){let o=await e(n);if(o===void 0||!r)return o;let i=r(o);if(i===!0)return o;n={...n,problem:i}}}function ove(e,t){return{progress:r=>t.progress(r),log:(r,n)=>t.log(r,n),confirm:r=>e({...r,kind:"confirm"}),choose:r=>e({...r,kind:"choose"}),text:({validate:r,...n})=>nz(e,{...n,kind:"text"},r),secret:({validate:r,...n})=>nz(e,{...n,kind:"secret"},r),path:({validate:r,...n})=>nz(e,{...n,kind:"path"},r),checklist:r=>e({...r,kind:"checklist"})}}var Eht=ove(e=>Promise.reject(new Error("A query asked a question: "+e.title)),{progress:()=>{},log:()=>{}});var Ya=g.string().regex(/^[A-Za-z0-9_-]{1,64}$/),RX=g.string().regex(/^[a-z][A-Za-z0-9]*(\.[a-z][A-Za-z0-9]*)+$/).max(80),nve=g.enum(["ok","warn","danger","muted","accent"]),ive=g.strictObject({t:g.literal("call"),id:Ya,op:RX,input:g.unknown()}),ave=g.strictObject({t:g.literal("answer"),id:Ya,value:g.unknown()}),sve=g.strictObject({t:g.literal("subscribe"),id:Ya,query:RX,input:g.unknown()}),lve=g.strictObject({t:g.literal("unsubscribe"),id:Ya}),zht=g.discriminatedUnion("t",[ive,ave,sve,lve]),EX=g.discriminatedUnion("t",[g.strictObject({t:g.literal("progress"),id:Ya,text:g.string()}),g.strictObject({t:g.literal("log"),id:Ya,text:g.string(),tone:nve.optional()}),g.strictObject({t:g.literal("ask"),id:Ya,question:DX}),g.strictObject({t:g.literal("result"),id:Ya,output:g.unknown()}),g.strictObject({t:g.literal("error"),id:Ya,error:_X}),g.strictObject({t:g.literal("data"),id:Ya,output:g.unknown()})]);function ve(e,t,r={}){return{kind:"operation",op:e.id,input:t,label:e.title,...e.danger?{danger:!0}:{},...r}}function Ja(e,t,r={}){return{kind:"link",target:e,label:t,...r}}function TX(e){return e.sections.some(t=>(t.facts?.length??0)>0||(t.items?.length??0)>0||(t.text?.length??0)>0)}var $X=g.string().regex(/^[A-Za-z0-9_.-]{1,64}$/),cve=g.object({name:g.string().describe("The agent"),ready:g.boolean().describe("Installed in the sandbox already (starts without an install)"),isDefault:g.boolean().describe("The agent that starts by default"),removable:g.boolean().describe("You added it (built-in agents cannot be removed)")}),dve=g.object({folder:g.string().describe("The folder a start works on (the current folder)"),defaultAgent:g.string().describe("The default agent"),agents:g.array(cve).describe("Every agent in your settings, built in or added")}),iz=Qe({id:"agents.list",title:"Agents",summary:"the agents you can start, and which one is the default",input:g.object({}),output:dve,surfaces:{except:{cli:"sandbox config list shows the agents (harnesses) and the default (defaultHarness)"}}}),az=we({id:"agents.start",title:"Start an agent",summary:"start an agent in a project of the running sandbox",input:g.object({agent:$X.describe("The agent to start"),project:$X.optional().describe("The project of the running sandbox (asked when there are several)")}),output:g.object({session:g.string().describe("The new session"),message:g.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox <agent> and sandbox launch start agents on the command line (they boot the sandbox and can attach the terminal)",menu:"the menu starts agents with launch, which can boot the sandbox and attach this terminal"}}}),A1=we({id:"agents.add",title:"Add an agent\u2026",summary:"add an agent by its npm or Python package, or a program on this PC",input:g.object({}),output:g.object({name:g.string().describe("The new agent"),message:g.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses adds agents on the command line"}}}),O1=we({id:"agents.makeDefault",title:"Make default",summary:"make an agent the one that starts by default",input:g.object({name:g.string().describe("The agent")}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set defaultHarness <name> does this on the command line"}}}),z1=we({id:"agents.remove",title:"Remove",summary:"take an agent you added out of your settings",input:g.object({name:g.string().describe("The agent")}),output:g.object({message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses removes agents on the command line"}}});function uve(e){return e.split(/[\\/]/).pop()??e}function fve(e,t){let r=e.removable?e.isDefault?" You added it. Make another agent the default to remove it.":" You added it.":"";return"Starts "+e.name+" in "+t+"."+(e.isDefault?" It is the default agent.":"")+r}function mve(e){return e.removable&&!e.isDefault?"x removes it.":void 0}function pve(e,t){return{id:"agent:"+e.name,label:e.name,hint:e.ready?"ready":"installs on first start",tone:e.ready?"ok":"muted",icon:e.name,badges:e.isDefault?[{text:"default",tone:"accent"}]:[],description:fve(e,t),keys:mve(e),primary:Ja({kind:"start-agent",agent:e.name},"Start "+e.name,{verb:"start"}),actions:[...e.isDefault?[]:[ve(O1,{name:e.name},{key:"d",verb:"make default",importance:1})],...e.removable&&!e.isDefault?[ve(z1,{name:e.name},{key:"x",verb:"remove",importance:1})]:[]]}}function hve(e){let t=uve(e.folder),r=[...e.agents].sort((n,o)=>Number(o.isDefault)-Number(n.isDefault));return{title:"Agents",sections:[{id:"start",title:"Start in "+t,cards:!0,items:[...r.map(n=>pve(n,t)),{id:"add",label:"Add an agent\u2026",description:"Add another agent by its npm or Python package, or a program on this PC. It is saved in your settings and appears in this list.",primary:ve(A1,{},{verb:"add"})}]}]}}var AX=mt({id:"agents",title:"Agents",summary:"The agents you can start: start one, add one, choose the default.",queries:{agents:iz},operations:[az,A1,O1,z1],build:({agents:e})=>hve(e)});var th=g.string().default("claude").describe("whose login: an agent that keeps one (default: claude)"),eb=g.string().optional().describe("account name"),gve=g.object({name:g.string().describe("The saved login"),email:g.string().nullable().describe("Its email, when the agent says"),isDefault:g.boolean().describe("New launches start with it"),isActive:g.boolean().describe("The sandbox uses it now"),savedAt:g.string().describe("When it was saved (ISO time)")}),vve=g.object({name:g.string().describe("The agent"),kept:g.boolean().describe("Its login can be saved and switched"),canSavePc:g.boolean().describe("This PC's login can be saved"),accounts:g.array(gve).describe("Its saved logins (empty when not kept)")}),xve=g.object({agent:g.string().describe("The agent asked for (the command line table shows only it)"),agents:g.array(vve).describe("Every agent, Claude first")}),sz=g.object({message:g.string().describe("What happened")});function bve(e){let t=e.agents.find(i=>i.name===e.agent)?.accounts??[];if(!t.length)return e.agent==="claude"?"No saved accounts. Sign in inside the sandbox, then: sandbox account save <name> (or --from-host to save this PC's login)":"No saved "+e.agent+" accounts. Sign in inside the sandbox, then: sandbox account save <name> --agent "+e.agent;let r=[["","NAME","EMAIL","SAVED"],...t.map(i=>[(i.isActive?"*":" ")+(i.isDefault?"D":" "),i.name,i.email??"-",i.savedAt.slice(0,16).replace("T"," ")])],n=r[0].map((i,a)=>Math.max(...r.map(s=>s[a].length)));return[...r.map(i=>i.map((a,s)=>s===i.length-1?a:a.padEnd(n[s]+2)).join("")),"","* = active in the sandbox D = default for new launches"].join(`
121
+ `)}var lz=Qe({id:"accounts.list",title:"Accounts",summary:"Claude logins: list, save, use, set the default, remove",input:g.object({agent:th}),output:xve,text:bve,cli:{name:"account",action:"list",json:!0,flags:{agent:{flag:"--agent",value:"name",choices:"harnesses",label:"Agent"}},shapeJson:e=>e.agents.find(t=>t.name===e.agent)?.accounts??[]}}),Jx=we({id:"accounts.save",title:"Save the sandbox's login",summary:"save the sandbox's (or this PC's) login under a name",input:g.object({agent:th,name:eb,fromHost:g.boolean().default(!1).describe("(save) save this PC's login instead of the sandbox's")}),output:g.object({name:g.string().describe("The saved login"),message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"account",action:"save",positional:["name"],flags:{agent:{flag:"--agent"},fromHost:{flag:"--from-host"}}}}),N1=we({id:"accounts.use",title:"Use this login",summary:"make the sandbox use a saved login (running sessions restart)",input:g.object({agent:th,name:eb,noRestart:g.boolean().default(!1).describe("(use) do not restart running sessions")}),output:g.object({lines:g.array(g.string()).describe("What happened, line by line")}),text:e=>e.lines.join(`
122
+ `),cli:{name:"account",action:"use",positional:["name"],flags:{agent:{flag:"--agent"},noRestart:{flag:"--no-restart"}}}}),F1=we({id:"accounts.default",title:"Make default",summary:"the login new launches start with",input:g.object({agent:th,name:eb}),output:sz,text:e=>e.message,cli:{name:"account",action:"default",positional:["name"],flags:{agent:{flag:"--agent"}}}}),L1=we({id:"accounts.rename",title:"Rename\u2026",summary:"give a saved login another name (it keeps working)",input:g.object({agent:th,name:eb,to:g.string().optional().describe("(rename) the new name")}),output:sz,text:e=>e.message,cli:{name:"account",action:"rename",positional:["name"],flags:{agent:{flag:"--agent"},to:{flag:"--to"}}}}),M1=we({id:"accounts.remove",title:"Remove\u2026",summary:"delete a saved login (you would sign in again)",danger:!0,input:g.object({agent:th,name:eb}),output:sz,text:e=>e.message,cli:{name:"account",action:"remove",positional:["name"],flags:{agent:{flag:"--agent"}},yes:"(remove) do not ask first"}});function yve(e){return[{id:"@save-sandbox",label:"+ Save the sandbox's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login you signed in with inside the sandbox, under a name you choose.",primary:ve(Jx,{agent:e.name,fromHost:!1},{verb:"save",label:"Save the sandbox's login"})},...e.canSavePc?[{id:"@save-pc",label:"+ Save this PC's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login of this PC, under a name you choose.",primary:ve(Jx,{agent:e.name,fromHost:!0},{verb:"save",label:"Save this PC's login"})}]:[]]}function _ve(e,t){let r=[t.isActive?"in the sandbox":"",t.isDefault?"default":""].filter(Boolean).join(" \xB7 ");return{id:e.name+":"+t.name,label:t.name,group:"Saved logins",icon:e.name,hint:r,badges:[...t.isActive?[{text:"in the sandbox",tone:"ok"}]:[],...t.isDefault?[{text:"default",tone:"accent"}]:[]],description:"Choose it to make the sandbox use this login.",details:["Agent "+e.name,"Email "+(t.email??"-"),"Saved "+t.savedAt.slice(0,16).replace("T"," ")],primary:ve(N1,{agent:e.name,name:t.name},{verb:"use"}),actions:[ve(F1,{agent:e.name,name:t.name},{key:"d",verb:"make default",importance:1}),ve(L1,{agent:e.name,name:t.name},{key:"r",verb:"rename",importance:2}),ve(M1,{agent:e.name,name:t.name},{key:"x",verb:"remove",importance:1})]}}function Ive(e){return e.kept?{id:e.name,title:e.name,summary:e.accounts.length?Jp(e.accounts.length,"saved login"):"no saved login yet",description:"Saved "+e.name+" logins.",cards:!0,items:[...yve(e),...e.accounts.map(t=>_ve(e,t))]}:{id:e.name,title:e.name,summary:"not kept between sandboxes",items:[{id:"info:"+e.name,label:"This agent's login is not kept between sandboxes",tone:"muted",description:"Sign in again in each new sandbox, or use an API key in the agent\u2019s environment."}]}}function wve(e){return{title:"Accounts",sections:e.agents.map(Ive)}}var OX=mt({id:"accounts",title:"Accounts",summary:"Logins saved on this PC, per agent. Use puts one into the sandbox; new launches start with the default.",queries:{accounts:lz},operations:[Jx,N1,F1,L1,M1],build:({accounts:e})=>wve(e)});var Sve=g.object({name:g.string(),path:g.string(),kind:g.enum(["dir","file"])}),kve=g.object({path:g.string(),parent:g.string().nullable(),entries:g.array(Sve),truncated:g.boolean(),places:g.array(g.object({label:g.string(),path:g.string()}))}),rh=Qe({id:"files.browse",title:"Browse folders",summary:"list what is in a folder of this PC, to pick a folder or a file",input:g.object({path:g.string().max(1024).optional().describe("The folder (none: only the places to start from)"),files:g.boolean().default(!1).describe("List files too, not only folders")}),output:kve,surfaces:{except:{cli:"a path is typed on the command line",menu:"the menu asks for a path as text and checks it"}}});var Cve=g.object({bytes:g.number().describe("Bytes counted"),files:g.number().describe("Files counted"),partial:g.boolean().describe("The count stopped at its limit: there is at least this much")}),Pve=g.object({root:g.string().describe("The folder your saved data is in"),exists:g.boolean().describe("It exists"),holdsData:g.boolean().describe("Something is in it"),measured:Cve.nullable().describe("Its size; null when not measured"),size:g.string().describe('Its size in words; "nothing in it yet" when empty; "not measured yet" when not counted'),defaultRoot:g.string().describe("The default folder"),defaultInUse:g.boolean().describe("The default folder is the one in use"),otherFoldersWithData:g.array(g.string()).describe("Other folders that hold data")}),cz=Qe({id:"storage.show",title:"Data folder",summary:"where your saved data lives",input:g.object({measure:g.boolean().default(!0).describe("add up its size (big folders take a moment)")}),output:Pve,text:e=>["Your saved data is in: "+e.root," "+e.size,"The default folder is: "+e.defaultRoot+(e.defaultInUse?" (in use)":""),...e.otherFoldersWithData.map(t=>"Another folder with data: "+t),"","Move it with: sandbox storage move <folder> (or switch without moving: sandbox storage use <folder>)","What takes the space: sandbox data"].join(`
123
+ `),cli:{name:"storage",action:"show",json:!0,shapeJson:e=>({root:e.root,exists:e.exists,...e.measured??{bytes:0,files:0,partial:!1},defaultRoot:e.defaultRoot,otherFoldersWithData:e.otherFoldersWithData})}}),Dve=g.object({from:g.string().describe("The old folder"),to:g.string().describe("The new folder"),copied:g.boolean().describe("It was copied (another drive)"),files:g.number().describe("Files moved"),bytes:g.number().describe("Bytes moved"),pinned:g.string().describe("What storage.root now says"),removedOld:g.boolean().describe("The old folder is gone"),notes:g.array(g.string()).describe("Extra notes"),message:g.string().describe("What happened")}),B1=we({id:"storage.move",title:"Move the data\u2026",summary:"move your saved data to another folder",input:g.object({folder:g.string().optional().describe("the folder to move to"),keepOld:g.boolean().default(!1).describe("copy instead of moving: the old folder stays (needs room for both)")}),output:Dve,text:e=>e.message,cli:{name:"storage",action:"move",positional:["folder"],flags:{keepOld:{flag:"--keep-old"}},json:!0,shapeJson:({message:e,...t})=>t}}),j1=we({id:"storage.use",title:"Use another folder\u2026",summary:"use another folder for your saved data, without moving it",input:g.object({folder:g.string().optional().describe("the folder to use")}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"use",positional:["folder"]}}),oh=we({id:"storage.change",title:"Data folder",summary:"pick another folder for your saved data, then move it there or switch to it",input:g.object({}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"the command line has storage move <folder> and storage use <folder>"}}}),Rve=g.object({setting:g.enum(["off","vhdx"]).describe("storage.contained"),maxGb:g.number().describe("storage.containedMaxGb"),available:g.boolean().describe("This PC can use it"),reasons:g.array(g.string()).describe("Why not"),fixes:g.array(g.string()).describe("What would fix it"),image:g.string().describe("The disk image file"),imageExists:g.boolean().describe("It exists"),imageBytes:g.number().nullable().describe("Its size on disk"),mountFolder:g.string().describe("Where it is mounted"),recordedMounted:g.boolean().describe("The record says it is mounted"),holders:g.number().describe("Sandboxes using it"),mountedNow:g.boolean().nullable().describe("It is mounted now (null: not checked)")}),dz=Qe({id:"storage.containedStatus",title:"Contained storage (beta)",summary:"(beta) the disk image for tools, state and logs",input:g.object({}),output:Rve,text:e=>["Contained storage (beta, untested on a real PC)"," setting: storage.contained = "+e.setting+" (limit "+e.maxGb+" GB)"," this PC: "+(e.available?"can use it":"cannot use it: "+e.reasons.join(" ")+" "+e.fixes.join(" "))," image: "+e.image+(e.imageExists?" ("+Yx(e.imageBytes??0)+" on disk)":" (not made yet)")," mount folder: "+e.mountFolder,...e.mountedNow===null?[]:[" mounted now: "+(e.mountedNow?"yes":"no")+(e.recordedMounted!==e.mountedNow?" (the record says "+(e.recordedMounted?"yes":"no")+"; sandbox doctor looks into it)":"")],"","Turn it on with: sandbox storage contained on Turn it off with: sandbox storage contained off"].join(`
124
+ `),cli:{name:"storage",action:"contained status",json:!0,shapeJson:({fixes:e,...t})=>t}}),U1=we({id:"storage.containedOn",title:"Turn contained storage on\u2026",summary:"(beta) keep tools, state and logs in a disk image",input:g.object({}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained on"}}),V1=we({id:"storage.containedOff",title:"Turn contained storage off\u2026",summary:"(beta) move tools, state and logs back into plain folders",danger:!0,input:g.object({}),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained off"}});function Eve(e,t){let r={id:"folder",title:"Data folder",description:"Where your tools, logins, history and logs are kept between sandboxes.",facts:[{id:"folder",label:"Folder",value:e.root},{id:"size",label:"Size",value:e.size},{id:"default",label:"Default folder",value:e.defaultRoot+(e.defaultInUse?" (in use)":"")},...e.otherFoldersWithData.map((o,i)=>({id:"other:"+i,label:"Other folder with data",value:o}))],actions:[ve(B1,{}),ve(j1,{})]},n={id:"contained",title:"Contained storage (beta)",description:"Beta, and not yet tested on a real PC: keeps the sandbox tools, state and logs in one disk image file.",facts:[{id:"setting",label:"Turned on",value:t.setting==="vhdx"?"yes":"no",tone:t.setting==="vhdx"?"ok":"muted"},{id:"pc",label:"This PC",value:t.available?"can use it":"cannot use it",tone:t.available?"ok":"warn",...t.available?{}:{description:[...t.reasons,...t.fixes].join(" ")}},{id:"image",label:"Image",value:t.imageExists?Yx(t.imageBytes??0)+" on disk":"not made yet",description:t.image},{id:"mount",label:"Mount folder",value:t.mountFolder},{id:"mounted",label:"Mounted now",value:t.mountedNow===null?"not checked":t.mountedNow?"yes":"no"}],actions:t.setting==="off"?[ve(U1,{})]:[ve(V1,{})]};return{title:"Storage",sections:[r,n]}}var zX=mt({id:"storage",title:"Storage",summary:"Where your saved data lives: move it, switch folders, (beta) a disk image.",queries:{storage:cz,contained:dz},operations:[oh,B1,j1,U1,V1],pickers:[rh],inputs:()=>({storage:{measure:!0}}),build:({storage:e,contained:t})=>Eve(e,t)});var H1=g.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),uz=g.string().regex(/^[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$-]+)*$/).max(200).describe("The setting, e.g. sandbox.memoryMb"),Tve=g.object({id:g.string().describe("The setting, e.g. sandbox.memoryMb"),key:g.array(g.string()),label:g.string(),category:g.string(),section:g.string().optional(),field:Bc,value:g.unknown(),set:g.boolean(),yours:g.unknown(),yoursSet:g.boolean(),inProject:g.unknown().optional(),default:g.unknown().optional(),locked:g.boolean()}),$ve=g.object({scope:H1,file:g.string().describe("The file this scope edits"),exists:g.boolean(),dataFolder:g.string().optional(),exportFile:g.string().optional().describe("Where an export goes by default (full path; your own settings only)"),categories:g.array(g.object({id:g.string(),label:g.string(),description:g.string()})),rows:g.array(Tve)}),fz=Qe({id:"settings.list",title:"Settings",summary:"every setting with its value, by category",input:g.object({scope:H1.default("user")}),output:$ve,cli:{name:"config",action:"list",json:!0}}),FX=Qe({id:"settings.get",title:"Get a setting",summary:"show one setting (secrets as ***)",input:g.object({key:uz}),output:g.object({key:g.string(),value:g.unknown()}),text:e=>typeof e.value=="string"?e.value:JSON.stringify(e.value,null,2),surfaces:{except:{menu:"Settings shows every value",web:"the Settings page shows every value"}},cli:{name:"config",action:"get",positional:["key"]}}),es=we({id:"settings.set",title:"Change a setting",summary:"change one setting (text is read like the command line: true/on, numbers, JSON)",input:g.object({scope:H1.default("user"),key:uz,value:g.unknown().describe("The new value")}),output:g.object({key:g.string(),changed:g.boolean(),message:g.string()}),text:e=>e.message,cli:{name:"config",action:"set",positional:["key","value"]}}),W1=we({id:"settings.reset",title:"Reset a setting",summary:"put one setting back to its default (in a project file: remove it)",input:g.object({scope:H1.default("user"),key:uz}),output:g.object({key:g.string(),changed:g.boolean(),message:g.string()}),text:e=>e.message,cli:{name:"config",action:"reset",positional:["key"]}}),LX=g.string().max(2e3).regex(/\.json$/i,"The file name should end in .json."),tb=we({id:"settings.export",title:"Export settings\u2026",summary:"write the settings you changed to a .json file to share (no secrets, no data folder, no paths of this PC)",input:g.object({settingsFile:LX.optional().describe("(export, import) the .json file; default sandbox-settings.json in the current folder"),withPaths:g.boolean().default(!1).describe("(export) keep folders and files of this PC in the file")}),output:g.object({file:g.string().describe("The file written (full path)"),leftOut:g.array(g.string()).describe('What was left out, one "<key> (<why>)" each'),pathsLeftOut:g.boolean().describe("A folder or file of this PC was left out (and --with-paths was not given)")}),text:e=>["Wrote "+e.file+" (only what differs from the defaults).",...e.leftOut.length?["Left out:",...e.leftOut.map(t=>" "+t)]:[],...e.pathsLeftOut?["Keep this PC's folders and files in the file with --with-paths."]:[]].join(`
125
+ `),cli:{name:"config",action:"export",positional:["settingsFile"],flags:{withPaths:{flag:"--with-paths"}}}}),rb=we({id:"settings.import",title:"Import settings\u2026",summary:"read a shared settings file, show what it would change, and apply it after one yes",input:g.object({settingsFile:LX.optional().describe("(export, import) the .json file")}),output:g.object({changed:g.number().describe("How many settings changed"),message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"config",action:"import",positional:["settingsFile"]}});function NX(e,t){return{...jc(new la(e.input).child("settingsFile"),["settingsFile"]),label:t,optional:!1}}function Ave(e,t){let r=n=>E1(n,e.field,40).text;return["Setting "+e.id,"All projects "+r(e.yours)+(e.yoursSet?" (your file)":" (built-in default)"),"This project "+(e.inProject===void 0?"not set":r(e.inProject)),...t==="user"?["Default "+r(e.default)]:[],...t==="project"&&e.locked?["A project can only make this stricter than your own setting."]:[]]}function Ove(e,t){let r=t==="project"&&!e.set?"all projects: "+E1(e.yours,e.field,40).text:E1(e.value,e.field).text,n=e.field.kind==="secret"?"":e.value;return{id:e.id,label:e.label,hint:r,...e.set?{tone:t==="project"?"accent":"ok",badges:[{text:"changed",tone:"accent"}]}:{},description:e.field.help,group:e.section,details:Ave(e,t),keywords:e.id,code:e.id,cells:{setting:e.id,value:r},primary:ve(es,{scope:t,key:e.id},{label:"Change",verb:"edit",inline:!0,fields:[{...e.field,name:"value",label:e.label}],initial:{value:n}}),actions:e.set?[ve(W1,{scope:t,key:e.id},{label:t==="project"?"Remove":"Reset to default",verb:"reset",key:"r"})]:[]}}function zve(e){return{id:"@data-folder",label:"Data folder",hint:e,cells:{setting:"storage.root",value:e},description:"Where your tools, logins, history and logs are kept between sandboxes. Move it with sandbox storage move <folder>.",primary:ve(oh,{},{label:"Data folder",verb:"change"})}}function Nve(e){let t=e.categories.map(r=>({id:r.id,title:r.label,description:r.description,columns:[{key:"setting",label:"SETTING"},{key:"value",label:"VALUE"}],columnsOn:"cli",items:[...e.rows.filter(n=>n.category===r.id).map(n=>Ove(n,e.scope)),...r.id==="general"&&e.dataFolder?[zve(e.dataFolder)]:[]]}));return{title:"Settings",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only what a project may set; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:e.scope==="user"?[ve(tb,{},{verb:"export",fields:[NX(tb,"Where to write the settings file")],initial:{settingsFile:e.exportFile},description:"Write the settings you changed to a .json file you can share with a team. Secrets, the data folder and folders or files of this PC are left out."}),ve(rb,{},{verb:"import",fields:[NX(rb,"Which settings file")],description:"Read a settings file someone shared, see what it would change, and apply it once you say yes. Secrets, the data folder and paths in it are never taken."})]:[]}}var MX=mt({id:"settings",title:"Settings",summary:"Every setting, for all projects or just this project, with its value, default and description.",queries:{settings:fz},operations:[es,W1,tb,rb,oh],pickers:[rh],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({settings:{scope:e.scope}}),build:({settings:e})=>Nve(e)});var Z1=g.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),Fve=[{id:"editors",label:"Editors & docs",description:"Code and text editors (VS Code is on by default), plus diagrams and document conversion.",members:["editors","diagrams"]},{id:"clients",label:"DB & API clients",description:"GUIs for the sandbox databases, tools to send HTTP, REST and GraphQL requests, and to inspect traffic.",members:["databases","api","network"]},{id:"tools",label:"Git & utilities",description:"Git GUIs and terminal UIs, archives, file search and comparing, process tools, and decompilers.",members:["git","utilities","reversing"]},{id:"cli",label:"Command-line & cloud",description:"Small developer tools (JSON, search, builds, media ...) and tools for clouds and Kubernetes.",members:["cli","cloud"]},{id:"play",label:"Browsers & games",description:"Browsers for testing web apps, and game engines and editors (they draw with OpenGL on the CPU).",members:["browsers","gamedev"]}];var Lve=g.object({id:g.string().describe("The app"),name:g.string().describe("Its name"),about:g.string().describe("What it is for"),group:g.string().describe("The group it is listed under (APP_GROUPS id)"),size:g.string().describe("Its download size"),cli:g.boolean().describe("A command-line tool (on PATH), not a desktop app"),mesa:g.boolean().describe("Needs OpenGL on the CPU (Mesa)"),fullGitOnly:g.boolean().describe("Only with full git access"),setting:g.string().optional().describe("The setting it stands for (VS Code, Windows Terminal)"),settingField:Bc.optional(),settingValue:g.unknown().optional(),installed:g.boolean().describe("Downloaded already into the data folder"),on:g.boolean().describe("Installed in every sandbox of this scope")}),Mve=g.object({id:g.string().describe("Its key in apps.custom"),name:g.string().describe("Its name"),from:g.string().describe('"From the latest <repo> release." or "From <url>"'),cli:g.boolean().describe("A command-line tool")}),Bve=g.object({scope:Z1,file:g.string().describe("The file this scope edits"),exists:g.boolean().describe("The file exists already"),apps:g.array(Lve).describe("The catalogue entries this scope can change"),custom:g.array(Mve).describe("Your own programs (your own scope only)"),customValue:g.unknown().optional().describe("apps.custom as saved, to edit (your own scope only)"),customField:Bc.optional().describe("The Field of apps.custom (your own scope only)")}),mz=Qe({id:"apps.list",title:"Apps",summary:"the apps catalogue: what every sandbox installs",input:g.object({scope:Z1.default("user")}),output:Bve,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),G1=we({id:"apps.toggle",title:"Install in every sandbox",summary:"turn an app of the catalogue on or off for this scope",input:g.object({scope:Z1.default("user"),id:g.string().max(100).describe("The app"),on:g.boolean().describe("Install it (true) or not (false)")}),output:g.object({message:g.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),q1=we({id:"apps.setCustom",title:"Your own programs",summary:"change your own programs (apps.custom)",input:g.object({scope:Z1.default("user"),value:g.unknown().describe("Programs of your own: a GitHub release or a download link, and the program to start.")}),output:g.object({message:g.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.custom"}}}),K1=we({id:"apps.request",title:"Request an app\u2026",summary:"open a prefilled GitHub request for an app that is not in the list",input:g.object({}),output:g.object({url:g.string().describe("The request page")}),text:e=>"Opened the request form in your browser: "+e.url,surfaces:{except:{cli:"a request is filed on GitHub; the address is in docs"}}});function jve(e){return["Download ~"+e.size+" once, kept in C:\\AgentData\\tools\\"+(e.setting?"":"apps\\")+e.id+(e.installed?" (downloaded already)":""),"Starts "+(e.cli?"from a terminal (on PATH)":"from the desktop or Start > Sandbox apps"),...e.mesa?["Graphics OpenGL on the CPU (Mesa) is added for it"]:[],...e.fullGitOnly?["Needs full git access (Settings > Projects & setup > Git): it pushes with its own git."]:[],...e.setting?["Setting "+e.setting]:[]]}function Uve(e){return{name:"on",key:["apps","install"],kind:"boolean",label:e.name,optional:!1}}function Vve(e,t){let r=e.setting&&e.settingField?ve(es,{scope:"user",key:e.setting},{label:"Change",verb:"change",inline:!0,fields:[{...e.settingField,name:"value",label:e.name}],initial:{value:e.settingValue}}):ve(G1,{scope:t,id:e.id},{label:e.on?"Turn off":"Turn on",verb:"tick",inline:!0,fields:[Uve(e)],initial:{on:e.on}});return{id:e.id,label:e.name,description:e.about,code:e.id,keywords:e.id,details:jve(e),...e.on?{tone:"ok"}:{},primary:r}}function Hve(e){return{id:"custom-"+e.id,label:e.name,description:e.from,hint:e.cli?"command line":"desktop",disabled:"Your own programs are always installed; change or remove them with Your own programs."}}function Wve(e){let t=Fve.map(n=>({id:n.id,title:n.label,description:n.description,items:e.apps.filter(o=>o.group===n.id).map(o=>Vve(o,e.scope))})).filter(n=>(n.items?.length??0)>0);e.scope==="user"&&t.push({id:"custom",title:"Your own programs",description:"Programs you added yourself, from a GitHub release or a download link.",items:e.custom.map(Hve)});let r=e.scope==="user";return{title:"Apps",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only apps from the list; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:r?[...e.customField?[ve(q1,{scope:"user"},{key:"c",verb:"your own programs",fields:[{...e.customField,name:"value",label:"Your own programs"}],initial:{value:e.customValue}})]:[],ve(K1,{},{key:"r",verb:"request an app"})]:[]}}var BX=mt({id:"apps",title:"Apps",summary:"Tick the apps every sandbox should have. Each downloads once and is kept.",queries:{apps:mz},operations:[G1,q1,K1,es],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({apps:{scope:e.scope}}),build:({apps:e})=>Wve(e)});var ki={desktop:"desktop window",gpu:"GPU",clipboard:"clipboard",audio:"audio",video:"camera",printers:"printers",liveFolderAdd:"add folders while running",attachedDisks:"attached disks",multipleInstances:"several at once",hvsocket:"Hyper-V sockets"},Zve=Object.keys(ki),Gve="see docs/design/engines.md",jX=g.enum(["windows-sandbox","hcs"]).describe("The engine"),qve=g.object({desktop:g.boolean().describe(ki.desktop),gpu:g.boolean().describe(ki.gpu),clipboard:g.boolean().describe(ki.clipboard),audio:g.boolean().describe(ki.audio),video:g.boolean().describe(ki.video),printers:g.boolean().describe(ki.printers),liveFolderAdd:g.boolean().describe(ki.liveFolderAdd),attachedDisks:g.boolean().describe(ki.attachedDisks),multipleInstances:g.boolean().describe(ki.multipleInstances),hvsocket:g.boolean().describe(ki.hvsocket)}),Kve=g.object({available:g.boolean().describe("This PC can run it"),reasons:g.array(g.string()).describe("Why not, in plain words"),fixes:g.array(g.string()).describe("The command that fixes each reason (never run for you)")}).describe("Whether this PC can run it"),UX=g.object({id:jX,inUse:g.boolean().describe("The setting sandbox.engine names it"),capabilities:qve.describe("What it can do"),check:Kve}),Xve=g.object({engine:jX.describe("The engine in use (the setting sandbox.engine)"),engines:g.array(UX).describe("Every engine")});function Qve(e){if(e.check.available){let r=[e.id+" can be used on this PC."];return e.id==="hcs"&&r.push("HCS is in alpha: starting it is not enabled yet (docs/design/engines.md)."),r.join(`
126
+ `)}let t=[e.id+" cannot be used on this PC yet:"];return e.check.reasons.forEach((r,n)=>{t.push(""," "+(n+1)+". "+r," To fix: "+(e.check.fixes[n]??Gve))}),t.push("","Nothing was changed. These commands change Windows, so they are yours to run (or not)."),t.join(`
127
+ `)}var pz=Qe({id:"engine.status",title:"Engine",summary:"the engine in use and what each engine can do on this PC",input:g.object({}),output:Xve,cli:{name:"engine",action:"show",json:!0}}),VX=Qe({id:"engine.check",title:"Check an engine",summary:"what this PC lacks for an engine, and the commands that would fix it",input:g.object({engine:g.string().default("hcs").describe("the engine to check")}),output:UX,surfaces:{except:{menu:"the Engine category shows every engine and its check with the fixes (engine.status)",web:"the Engine page shows every engine and its check with the fixes (engine.status)"}},text:Qve,cli:{name:"engine",action:"check",positional:["engine"],json:!0,exitCode:e=>e.check.available?0:1}}),Yve=g.object({id:g.string().describe("The compute system"),kind:g.string().describe("Container or VirtualMachine (the utility VM)"),state:g.string().describe("What it is doing"),since:g.string().nullable().describe("When it was created (ISO time), when HCS says")}),Jve=g.object({available:g.boolean().describe("HCS could be asked"),message:g.string().describe("What was found, or why nothing is listed"),systems:g.array(Yve).describe("Ours that are running now")}),hz=Qe({id:"engine.leftovers",title:"HCS systems left running",summary:"list the HCS compute systems this tool left running (a crashed command can leave one up)",input:g.object({}),output:Jve,cli:{name:"engine",action:"leftovers",json:!0}}),X1=we({id:"engine.clean",title:"Stop the leftover systems\u2026",summary:"stop the HCS compute systems this tool left running (frees their memory; nothing else is touched)",input:g.object({}),output:g.object({available:g.boolean().describe("HCS could be asked"),stopped:g.number().describe("How many were stopped"),failed:g.number().describe("How many could not be stopped"),message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"engine",action:"clean"}});function exe(e){return{id:"leftover:"+e.id,label:e.id,hint:e.state+(e.since?" started "+Tn(e.since):""),tone:"warn",details:["System "+e.id,"Kind "+e.kind,"State "+e.state,...e.since?["Created "+e.since]:[]]}}function txe(e){return e.systems.length?[{id:"leftovers",title:"HCS systems left running",summary:Jp(e.systems.length,"system")+" (they hold memory; a sandbox running on purpose is listed too)",items:e.systems.map(exe),actions:[ve(X1,{},{key:"x",verb:"stop them",importance:1})]}]:[]}function rxe(e){let t=Zve.map(n=>{let o=e.capabilities[n];return{id:n,label:ki[n],value:o?"yes":"no",...o?{}:{tone:"muted"}}}),r=[...e.check.reasons.map((n,o)=>({id:"reason:"+o,label:n,tone:"warn"})),...e.check.fixes.map((n,o)=>({id:"fix:"+o,label:"Fix: "+n}))];return{id:e.id,title:e.id+(e.id==="hcs"?" (alpha)":"")+(e.inUse?" (in use)":""),summary:e.check.available?"can be used on this PC":"cannot be used yet",facts:t,items:r}}function oxe(e,t){return{title:"Engine",notice:{text:"Engine in use: "+e.engine+" (setting: sandbox.engine)"},sections:[...e.engines.map(rxe),...t?txe(t):[]]}}var HX=mt({id:"engine",title:"Engine",summary:"What runs your sandbox, and what each engine can do on this PC.",queries:{engines:pz,leftovers:hz},operations:[X1],build:({engines:e,leftovers:t})=>oxe(e,t)});var ZX="sandbox doctor and sandbox repair are hand-written renderers of this run (lines redrawn in place, --json alone, repair before the settings load)",nxe=g.enum(["ok","fixed","needs-you","warn","skipped"]).describe("What the check found"),ixe=g.object({id:g.string().describe("The check"),group:g.string().describe("Its heading (This PC, Install ...)"),name:g.string().describe("What was checked"),status:nxe,detail:g.string().describe("What was found"),means:g.string().optional().describe("What it means for you"),fix:g.string().optional().describe("What to do yourself"),plan:g.string().optional().describe("What repair would change"),lines:g.array(g.string()).optional().describe("More lines (a diff, folders)"),fixable:g.boolean().describe("Repair can mend it"),timedOut:g.boolean().optional().describe("It took too long"),applied:g.object({done:g.string(),before:g.string(),after:g.string()}).optional().describe("What a fix changed"),error:g.string().optional().describe("Why a fix did not work")}),GX=g.object({total:g.number().describe("Checks that ran"),ok:g.number().describe("Checks that are fine"),fixed:g.number().describe("Problems repair fixed"),warn:g.number().describe("Warnings"),needsYou:g.number().describe("Problems you need to fix"),skipped:g.number().describe("Checks that did not run"),fixable:g.number().describe("Problems repair can still mend")}).describe("How many checks ended how"),axe=g.object({name:g.string().describe("What was looked at"),status:g.enum(["ok","warn","action"]).describe("OK, a warning, or something to do"),detail:g.string().describe("What was found")}),sxe=g.object({at:g.string().describe("When it ran (ISO time)"),mode:g.enum(["check","repair"]).describe("A check or a repair"),checks:g.array(ixe).describe("The results"),summary:GX,details:g.array(g.tuple([g.string(),g.string()])).describe("The doctor details: name and value"),setup:g.object({checks:g.array(axe),canEnable:g.boolean().describe("Windows Sandbox can be turned on from here"),error:g.string().nullable().describe("Why the setup could not be read")}).nullable().describe("What sandbox setup found"),log:g.string().nullable().describe("The repair log, if one was written")});function qX(e){return[e.ok+" ok",e.fixed&&e.fixed+" fixed",e.needsYou&&e.needsYou+" "+(e.needsYou===1?"needs":"need")+" you",e.warn&&e.warn+(e.warn===1?" warning":" warnings"),e.skipped&&e.skipped+" skipped"].filter(Boolean).join(", ")}var lxe={ok:"[ok]",fixed:"[fixed]",warn:"[!]","needs-you":"[x]",skipped:"[-]"},nh={ok:void 0,fixed:"accent",warn:"warn","needs-you":"danger",skipped:"muted"},gz=6;function cxe(e){let t={text:" "+lxe[e.status]+" "+e.name+": "+e.detail+(e.timedOut?" (took too long)":""),...nh[e.status]?{tone:nh[e.status]}:{}};if(e.status==="ok")return[t];let r=[t];e.means&&r.push({text:" What it means: "+e.means}),e.fixable&&e.plan?r.push({text:" Fix: sandbox repair will "+e.plan}):e.fix&&r.push({text:" Fix: "+e.fix});let n=e.lines??[];for(let o of n.slice(0,gz))r.push({text:" "+o});return n.length>gz&&r.push({text:" ... and "+(n.length-gz)+" more"}),r}var WX={ok:"OK",fixed:"FIXED","needs-you":"NEEDS YOU",warn:"WARNING",skipped:"SKIPPED"};function dxe(e,t){return e.length<=t?e:e.slice(0,t-1)+"\u2026"}var KX=g.object({summary:GX,changed:g.boolean().describe("Fixes were applied"),log:g.string().nullable().describe("The repair log, if one was written")}),vz=Qe({id:"health.last",title:"Health",summary:"the last check or repair of this PC and the sandbox",input:g.object({}),output:g.object({last:sxe.nullable().describe("Nothing yet: no check has run")}),surfaces:{except:{cli:"the command line prints results as it checks (sandbox doctor)"}}}),ob=we({id:"health.check",title:"Check this PC",summary:"check this PC, the install, your settings and the sandbox (changes nothing)",input:g.object({harness:g.string().optional().describe("agent to check")}),output:KX,text:e=>"Summary: "+qX(e.summary),surfaces:{except:{cli:ZX}}}),nb=we({id:"health.repair",title:"Run the checks and fix what can be fixed",summary:"find and fix problems (install, data folder, settings, stale state, half-installed tools)",input:g.object({}),output:KX,danger:!0,text:e=>"Summary: "+qX(e.summary)+(e.log?". Log: "+e.log:". No log was written (the storage folder does not exist yet)."),surfaces:{except:{cli:ZX}}}),Q1=we({id:"health.enableSandbox",title:"Turn on Windows Sandbox",summary:"turn on the Windows Sandbox feature (Windows asks for admin permission; restart to finish)",input:g.object({}),output:g.object({message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox setup asks and turns it on (hand-written: it also offers to restart Windows)",web:"Windows asks for admin permission on this PC; use the menu or sandbox setup"}}});function uxe(e){return e.checks.map((t,r)=>{let n=t.detail+(t.timedOut?" (took too long)":""),o=cxe(t).slice(1).map(a=>a.text.trim()).filter(a=>!a.startsWith("What it means: ")),i=t.means?[n,...o]:o;return{id:"repair:"+r,label:t.name,hint:WX[t.status],...nh[t.status]?{tone:nh[t.status]}:{},badges:[{text:WX[t.status],...nh[t.status]?{tone:nh[t.status]}:{}}],description:t.means??n,...i.length?{details:i}:{}}})}var fxe={ok:"OK",warn:"WARNING",action:"NEEDS YOU"};function mxe(e){let t=e.last,r=ve(ob,{},{verb:"check"}),n=ve(nb,{},{verb:"check and fix"});if(!t)return{title:"Health",sections:[{id:"doctor",title:"Doctor",cards:!0,items:[{id:"health:check",label:"Check this PC",description:"Looks at this PC: Windows features, the install, the folders and the sandbox. It takes a few seconds, so it only runs when you ask.",primary:r}]},{id:"repair",title:"Repair",cards:!0,items:[{id:"repair:run",label:"Run the checks and fix what can be fixed",description:"Checks the install, data folder, settings and sandbox, lists what it would change, and asks before it fixes anything.",primary:n}]}]};let o=!!t.setup?.canEnable,i=[{id:"status",summary:(t.mode==="repair"?"Last repair ":"Last check ")+Tn(t.at),...t.log?{notes:[{text:"Log: "+t.log,tone:"muted"}]}:{}},{id:"doctor",title:"Doctor",items:t.details.map(([a,s],l)=>({id:"doctor:"+l,label:a,hint:dxe(s,50),...s.length>50?{description:s}:{}}))},{id:"repair",title:"Repair",items:uxe(t)}];if(t.setup){let a=t.setup;i.push({id:"setup",title:"Set up this PC",items:a.error?[{id:"setup:error",label:a.error}]:a.checks.map((s,l)=>({id:"setup:"+l,label:s.name,hint:s.detail,tone:s.status==="ok"?"ok":s.status==="warn"?"warn":"danger",badges:[{text:fxe[s.status],tone:s.status==="ok"?"ok":s.status==="warn"?"warn":"danger"}]})),notes:o?[{text:"Turn Windows Sandbox on from the menu or with sandbox setup.",tone:"muted",only:"web"}]:[]})}return{title:"Health",sections:i,actions:[ve(nb,{},{key:"f",verb:"check and fix",importance:1}),ve(ob,{},{key:"l",verb:t?"check again":"check",importance:2}),...o?[ve(Q1,{},{key:"e",verb:"turn on Windows Sandbox",importance:3})]:[]]}}var XX=mt({id:"health",title:"Health",summary:"Checks this PC and your settings, repairs problems, and sets up Windows Sandbox.",queries:{last:vz},operations:[ob,nb,Q1],build:({last:e})=>mxe(e)});var QX=["tools","databases","state","logs","data","host"],pxe={tools:"Toolchains",databases:"Databases",state:"Agent state",logs:"Logs",data:"Other",host:"On this PC"},hxe=g.object({area:g.enum(QX).describe("Which kind of data it is"),name:g.string().describe("The folder as listed (tools: its name; others: area/name)"),path:g.string().describe("Its full path on this PC"),bytes:g.number().describe("Its size in bytes (links count 0)"),size:g.string().describe("Its size in words, e.g. 1.5 KB"),target:g.string().nullable().describe("What sandbox data clean calls it; null when it is kept on purpose")}),gxe=g.object({drive:g.string().describe("The drive, e.g. C:\\"),totalBytes:g.number().describe("Its size in bytes"),freeBytes:g.number().describe("Free bytes"),usedBytes:g.number().describe("Used bytes"),holdsStorage:g.boolean().describe("The sandbox keeps its files on this drive"),used:g.string().describe("Used, in words"),usedPercent:g.number().describe("Used, in percent of the size (rounded)"),free:g.string().describe("Free, in words"),total:g.string().describe("Size, in words")}),vxe=g.object({dataPath:g.string().describe("The data folder (C:\\AgentData inside the sandbox)"),storageRoot:g.string().describe("The storage folder that holds it"),totalBytes:g.number().describe("Everything listed, in bytes"),total:g.string().describe("Everything listed, in words"),storageShare:g.string().describe('"<- sandbox storage (<total> of it)": the note on the storage drive'),areaTotals:g.record(g.string(),g.string()).describe("Each area's total in words"),entries:g.array(hxe).describe("What is stored, by area, biggest first"),disks:g.array(gxe).describe("This PC's drives")}),xz=Qe({id:"data.show",title:"Stored data",summary:"show what is kept between sandboxes (tools, databases, logins, logs), or delete some of it",input:g.object({}),output:vxe,cli:{name:"data",action:"show",json:!0,shapeJson:e=>({dataPath:e.dataPath,storageRoot:e.storageRoot,totalBytes:e.totalBytes,entries:e.entries.map(({area:t,name:r,path:n,bytes:o})=>({area:t,name:r,path:n,bytes:o})),disks:e.disks.map(({drive:t,totalBytes:r,freeBytes:n,usedBytes:o,holdsStorage:i})=>({drive:t,totalBytes:r,freeBytes:n,usedBytes:o,holdsStorage:i}))})}}),YX=g.object({message:g.string().describe("What happened")}),Y1=we({id:"data.clean",title:"Delete stored data\u2026",summary:"delete chosen parts of what is kept between sandboxes",input:g.object({targets:g.array(g.string()).default([]).describe("what to clean, e.g. tools/go databases logs")}),output:YX.extend({freedBytes:g.number().describe("Bytes freed (0 when nothing was removed)")}),danger:!0,text:e=>e.message,next:e=>e.freedBytes>0?"sandbox data (see what is left)":void 0,cli:{name:"data",action:"clean",positional:["targets"]}}),JX=g.object({days:g.number().int().min(1).default(7).describe("launch folders older than this many days")}),J1=we({id:"data.prune",title:"Clean up\u2026",summary:"delete old launch folders, logs and leftovers",input:JX,output:YX.extend({removed:g.boolean().describe("Something was deleted")}),text:e=>e.message,next:e=>e.removed?"sandbox data (see what else is saved, and clean it)":void 0,cli:{name:"clean",group:"Data",flags:{days:{flag:"--days",value:"n"}},yes:"do not ask before deleting"}}),xxe=jc(new la(JX).child("days"),["days"]);function bxe(e){let t={id:"disks",title:"Disks",columns:[{key:"drive",label:"DRIVE"},{key:"used",label:"USED"},{key:"free",label:"FREE"},{key:"size",label:"SIZE"},{key:"note",label:""}],columnsOn:"cli",items:e.disks.map(i=>({id:"disk:"+i.drive,label:i.drive,hint:i.used+" used \xB7 "+i.free+" free of "+i.total,...i.holdsStorage?{description:"The sandbox keeps its files on this drive."}:{},cells:{drive:i.drive,used:i.used+" ("+i.usedPercent+"%)",free:i.free,size:i.total,note:i.holdsStorage?e.storageShare:""}})),notes:[{text:"Persistent data for the sandbox: "+e.dataPath+" (C:\\AgentData inside)"}]},r=i=>QX.indexOf(i),n=[...e.entries].sort((i,a)=>r(i.area)-r(a.area)||a.bytes-i.bytes),o={id:"kept",title:"What the sandbox keeps",summary:e.total+" in all",columns:[{key:"kind",label:"KIND"},{key:"name",label:"NAME"},{key:"size",label:"SIZE"},{key:"folder",label:"FOLDER"}],items:n.map(i=>{let a=i.target?ve(Y1,{targets:[i.target]},{label:"Delete",key:"x",verb:"delete"}):void 0;return{id:"entry:"+i.name,label:i.name,hint:i.size,cells:{kind:pxe[i.area],name:i.name,size:i.size,folder:i.path},...a?{primary:a}:{}}}),actions:[ve(J1,{},{label:"Clean up\u2026",verb:"choose what",description:"Delete caches, old sandboxes and other leftovers (the clean command, with its options).",fields:[xxe]})],notes:[...e.entries.length?[]:[{text:"Nothing stored yet. Toolchains, databases and agent logins appear here after the first start."}],...yxe(e),{text:"Free space with: sandbox data clean <target...> (e.g. tools/go, databases/postgres-18, logs, launches)",tone:"muted",only:"cli"}]};return{title:"Data",sections:[t,o]}}function yxe(e){let t=e.entries.filter(r=>!r.target).map(r=>r.name);return t.length?[{text:"Kept on this PC on purpose, not deleted here: "+t.join(", ")+"."}]:[]}var eQ=mt({id:"data",title:"Data",summary:"What the sandbox keeps between runs, and deleting parts of it.",queries:{data:xz},operations:[Y1,J1],build:({data:e})=>bxe(e)});var _xe=g.object({name:g.string().describe("The project"),host:g.string().describe("Its folder on this PC"),guest:g.string().describe("Its folder in the sandbox"),mechanism:g.string().describe("How it got into the sandbox (launch, root, boot or share)"),here:g.boolean().describe("The project of the current folder"),setup:g.object({phase:g.string(),message:g.string()}).describe("How far its setup is"),databases:g.array(g.object({database:g.string(),port:g.number(),state:g.string()})),sessions:g.array(g.object({id:g.string(),harness:g.string(),viewers:g.string(),started:g.string()})),repoGuard:g.array(g.string()).describe("Repo guard findings in its folder")}),Ixe=g.object({running:g.boolean().describe("A Windows Sandbox is running"),phase:g.string().describe("What it is doing (ready, provisioning ...)"),message:g.string().optional().describe("Its last message"),headless:g.boolean().optional().describe("Its window is hidden"),startedAt:g.number().nullable().describe("When it started (ms), if known"),daemon:g.string().describe("The sandbox helper's answer"),account:g.string().nullable().describe("The Claude login it uses"),syncWatcher:g.boolean().describe("The background history sync runs")}),wxe=g.object({shared:g.object({line:g.string().describe('"Running, started by alice (shared with you)"'),limited:g.boolean().describe("Not shared with you: nothing more is shown"),startedBy:g.string().nullable().describe("Whose it is")}).optional(),sandbox:Ixe,here:g.object({folder:g.string(),project:g.string().nullable(),guest:g.string().nullable()}),roots:g.array(g.object({host:g.string(),guest:g.string()})),projects:g.array(_xe),otherSessions:g.array(g.object({id:g.string(),harness:g.string(),cwd:g.string()})),repoGuard:g.object({guarded:g.number(),findings:g.array(g.string())})}),tQ=g.object({message:g.string().describe("What happened")});function Sxe(e){let t=/^pong \((\d+) session/.exec(e);return t?"responding, "+Jp(Number(t[1]),"session")+" running":e}function rQ(e){return e.running&&e.startedAt?Tn(e.startedAt).replace(" ago",""):null}var bz=Qe({id:"sandbox.status",title:"Sandbox status",summary:"show what the sandbox is doing",input:g.object({}),output:wxe,live:{everyMs:2500},cli:{name:"status",group:"Sessions",json:!0,shapeJson:e=>{if(e.shared?.limited)return{sandbox:{running:!0,shared:!1,startedBy:e.shared.startedBy}};let t=e.sandbox;return{sandbox:{...e.shared?.startedBy?{startedBy:e.shared.startedBy,shared:!0}:{},running:t.running,phase:t.phase,message:t.message,headless:t.headless,uptime:rQ(t),daemon:t.daemon,account:t.account,syncWatcher:t.syncWatcher},here:e.here,roots:e.roots,projects:e.projects,otherSessions:e.otherSessions,repoGuard:e.repoGuard}}}}),ek=we({id:"sandbox.showWindow",title:"Show the window",summary:"show the sandbox window",input:g.object({}),output:tQ,text:e=>e.message,cli:{name:"show",group:"Sessions"}}),tk=we({id:"sandbox.hideWindow",title:"Hide the window",summary:"hide the sandbox window (it keeps running)",input:g.object({}),output:tQ,text:e=>e.message,cli:{name:"hide",group:"Sessions"}}),rk=we({id:"sandbox.stop",title:"Stop the sandbox\u2026",summary:"shut the sandbox down (every project's sessions end)",input:g.object({}),output:g.object({stopped:g.boolean().describe("It was asked to shut down"),message:g.string()}),danger:!0,text:e=>e.message,cli:{name:"stop",group:"Agents",yes:"do not ask when other projects' sessions would end"}}),kxe={launch:"started from here",root:"in a project root",boot:"mapped at start"};function Cxe(e){return{id:"project:"+e.name,label:e.name,icon:"project",hint:e.host+" -> "+e.guest+" ("+(kxe[e.mechanism]??"wsb share")+")",marked:e.here,details:["setup: "+e.setup.phase+(e.setup.phase==="ready"?"":" - "+e.setup.message),...e.databases.length?["databases: "+e.databases.map(t=>t.database+" :"+t.port+" "+t.state).join(", ")]:[],...e.sessions.map(t=>"session "+t.id+" "+t.harness+" "+t.viewers+" "+Tn(t.started)),...e.repoGuard.map(t=>"guard: "+t)]}}function Pxe(e){let t=e.sandbox,r=e.projects.reduce((o,i)=>o+i.sessions.length,0)+e.otherSessions.length,n=(o,i,a,s={})=>({id:o,label:i,value:a,...s});return[...e.shared?.startedBy?[n("owner","Started by",e.shared.startedBy)]:[],n("state","State",t.running?t.message||t.phase:"not running",{tone:t.running?t.phase==="ready"?"ok":"warn":"muted"}),...t.running?[n("window","Window",t.headless?"hidden (sandbox show opens it)":"shown"),n("uptime","Uptime",rQ(t)??"-"),n("helper","Helper",t.daemon==="-"?"-":Sxe(t.daemon)),n("sessions","Sessions",String(r))]:[],n("account","Account",t.account??"none selected (sandbox account use)"),n("sync","Background sync",t.syncWatcher?"on":"off")]}function Dxe(e){let t=e.roots.map(n=>({id:"root:"+n.host,label:"root",icon:"folder",hint:n.host+" -> "+n.guest+" (every project in it opens without a restart)"})),r=e.projects.some(n=>n.here);return{id:"projects",title:"Projects",items:[...e.projects.map(Cxe),...t],notes:[r?{text:"* = the project of this folder",tone:"muted"}:{text:e.here.folder+" is not in this sandbox (start it here: sandbox claude)",tone:"muted"}]}}function Rxe(e){let t=e.repoGuard.findings;return{id:"guard",title:"Repo guard",summary:e.repoGuard.guarded+" folder(s) guarded; "+(t.length?t.length+" change(s) neutralised:":"nothing from the sandbox needed neutralising"),items:t.slice(-10).map((r,n)=>({id:"guard:"+n,label:r,tone:"warn"}))}}function Exe(e){let t=e.shared?{text:e.shared.line+(e.shared.limited?"":". Its window is on their desktop; use its agents here."),tone:"accent"}:void 0;if(e.shared?.limited)return{title:"Sandbox",notice:t,sections:[]};let r=e.sandbox.running,n={id:"status",title:"Status",facts:Pxe(e),actions:r?[e.sandbox.headless?ve(ek,{},{key:"w",verb:"show",importance:3}):ve(tk,{},{key:"h",verb:"hide",importance:3}),ve(rk,{},{key:"x",verb:"stop",importance:1})]:[]},o={id:"other-sessions",title:"Other sessions",items:e.otherSessions.map(i=>({id:"session:"+i.id,label:"session "+i.id,hint:i.harness+" "+i.cwd}))};return{title:"Sandbox",notice:t,sections:[n,...r?[Dxe(e)]:[],...o.items?.length?[o]:[],Rxe(e)]}}var oQ=mt({id:"sandbox",title:"Sandbox",summary:"What the sandbox is doing, its window, and stopping it.",queries:{status:bz},operations:[ek,tk,rk],build:({status:e})=>Exe(e)});var Txe=g.object({folder:g.string().describe("The project folder on this PC"),here:g.boolean().describe("The folder you are in is inside it"),known:g.boolean().describe("Started with this tool before"),root:g.string().nullable().describe("The project root it is in, if any"),excluded:g.boolean().describe("Excluded from the projects mapped at every start"),mappedAtStart:g.boolean().describe("Mapped at every start"),running:g.string().nullable().describe("Its name and how it got into the running sandbox, if it is there")}),$xe=g.object({all:g.boolean().describe("Every project is mapped at every start (except excluded ones)"),roots:g.array(g.string()).describe("Folders of projects, each opened without a restart"),exclude:g.array(g.string()).describe("Folders left out of the projects mapped at every start"),projects:g.array(Txe).describe("Every project worth listing")}),ih=g.object({message:g.string().describe("What happened")}),ok=e=>g.string().optional().describe(e+" (. = this folder; asked when left out)"),yz=Qe({id:"projects.list",title:"Projects",summary:"list your projects, roots and the all-projects setting",input:g.object({}),output:$xe,cli:{name:"projects",action:"list",json:!0}}),nk=we({id:"projects.choose",title:"Choose the projects mapped at every start\u2026",summary:"tick the projects mapped at every start; the rest are excluded",input:g.object({}),output:ih,text:e=>e.message,cli:{name:"projects",action:"choose"}}),ib=we({id:"projects.add",title:"Add a project\u2026",summary:"remember a project folder",input:g.object({projectFolder:ok("The project folder")}),output:g.object({message:g.string().describe("What happened"),next:g.string().optional().describe("What to do next, when mapping all projects is off")}),text:e=>e.next?e.message+`
128
+ `+e.next:e.message,cli:{name:"projects",action:"add",positional:["projectFolder"]}}),ik=we({id:"projects.remove",title:"Forget project",summary:"forget a project (nothing in the folder is touched)",input:g.object({projectFolder:ok("The project folder")}),output:ih,danger:!0,text:e=>e.message,cli:{name:"projects",action:"remove",positional:["projectFolder"]}}),ak=we({id:"projects.include",title:"Include",summary:"map a project at every start again",input:g.object({projectFolder:ok("The project folder")}),output:ih,text:e=>e.message,cli:{name:"projects",action:"include",positional:["projectFolder"]}}),sk=we({id:"projects.exclude",title:"Exclude",summary:"leave a project out of the projects mapped at every start",input:g.object({projectFolder:ok("The project folder")}),output:ih,text:e=>e.message,cli:{name:"projects",action:"exclude",positional:["projectFolder"]}}),lk=we({id:"projects.all",title:"Map all projects at every start",summary:"map every project at every start, or not",input:g.object({state:g.enum(["on","off"]).optional().describe("on or off (left out: say which it is)")}),output:ih,text:e=>e.message,cli:{name:"projects",action:"all",positional:["state"]}}),Bu=we({id:"projects.roots",title:"Project roots",summary:"list, add or remove project roots",input:g.object({change:g.enum(["list","add","remove"]).default("list").describe("list, add or remove"),rootFolder:g.string().optional().describe("(add, remove) the folder that holds your projects")}),output:ih,text:e=>e.message,cli:{name:"projects",action:"roots",positional:["change","rootFolder"]}}),nQ=R1(Bu.input).find(e=>e.name==="rootFolder"),Axe=R1(ib.input).find(e=>e.name==="projectFolder"),Oxe="Every project in this folder (also new ones) opens without a restart.";function iQ(e){return e.root?"root":e.excluded?"excluded":e.mappedAtStart?"mapped":"-"}function zxe(e){return{id:"project:"+e.folder,label:e.folder,marked:e.here,icon:"project",hint:e.running??(e.root?"in a root":e.excluded?"excluded":e.mappedAtStart?"mapped":"-"),description:e.here?"This is the folder you started the menu in.":void 0,details:["At start "+iQ(e),"In sandbox "+(e.running??"-")],cells:{here:e.here?"*":"",folder:e.folder,atStart:iQ(e),running:e.running??"-"},actions:[ve(ik,{projectFolder:e.folder},{key:"f",verb:"forget project",importance:1}),e.excluded?ve(ak,{projectFolder:e.folder}):ve(sk,{projectFolder:e.folder})]}}function Nxe(e){return{id:"root:"+e,label:e,hint:"root",icon:"folder",description:Oxe,keys:"f removes the root.",actions:[ve(Bu,{change:"remove",rootFolder:e},{label:"Remove the root",key:"f",verb:"remove root",importance:1})]}}function Fxe(e){let t={id:"settings",facts:[{id:"all",label:"All projects",value:e.all?"on (every project below is mapped at every start, except excluded ones)":"off"},{id:"roots",label:"Roots",value:e.roots.length?e.roots.join(", "):"none (sandbox projects roots add <folder>)"}],actions:[ve(lk,{state:e.all?"off":"on"},{label:e.all?"Stop mapping all projects":"Map all projects at every start"})],notes:[{text:"sandbox projects all on|off",tone:"muted",only:"cli"}]},r={id:"roots",title:"Project roots",items:[{id:"@add-root",label:"+ Add a project root\u2026",description:"Pick a folder that holds your projects: every project in it (also new ones) opens without a restart.",primary:ve(Bu,{change:"add"},{label:"Choose the folder\u2026",verb:"choose folder",fields:[nQ]})},...e.roots.map(Nxe)]},n={id:"projects",title:"Projects",columns:[{key:"here",label:""},{key:"folder",label:"FOLDER"},{key:"atStart",label:"AT START"},{key:"running",label:"RUNNING SANDBOX"}],columnsOn:"cli",items:e.projects.map(zxe),notes:e.projects.length===0?[{text:"No projects yet: start one with sandbox claude in its folder.",tone:"muted"}]:[{text:"* = this folder. Choose with: sandbox projects choose",tone:"muted",only:"cli"}]};return{title:"Projects",sections:[t,r,n],actions:[ve(nk,{},{label:"Choose\u2026"}),ve(ib,{},{fields:[Axe]}),ve(Bu,{change:"add"},{label:"Add a project root\u2026",key:"a",verb:"add root",importance:1,fields:[nQ]})]}}var aQ=mt({id:"projects",title:"Projects",summary:"The projects a sandbox opens without a restart: roots, your projects, all or chosen.",queries:{projects:yz},operations:[nk,ib,ik,ak,sk,lk,Bu],build:({projects:e})=>Fxe(e)});var ck="@crash",Lxe=1e3,lQ="sandbox logs is hand-written: --follow prints new lines until Ctrl+C; it reads this same query (readQuery)",Mxe=g.object({name:g.string().describe("The log file"),path:g.string().describe("Where it is on this PC"),bytes:g.number().describe("Its size in bytes"),modified:g.number().describe("When it was last written (ms)")}),Bxe=g.object({folder:g.string().describe("The folder the logs are in"),files:g.array(Mxe).describe("The log files, newest first"),crash:g.boolean().describe("A crash report exists")}),jxe=g.object({name:g.string().describe("The log shown, or @crash for the last crash report (empty: there are no logs)"),file:g.string().describe("Its full path (empty: there are no logs)"),text:g.string().describe("The text read, made safe for a terminal"),next:g.number().describe("Where to read on from next time (bytes)")}),_z=Qe({id:"logs.list",title:"Logs",summary:"list the sandbox's own logs",input:g.object({}),output:Bxe,surfaces:{except:{cli:lQ}}}),Iz=Qe({id:"logs.tail",title:"Log",summary:"the end of one log, followed as it grows",input:g.object({name:g.string().max(200).optional().describe("The log to show (default: the newest), or @crash for the last crash report"),from:g.number().int().min(0).default(0).describe("Read on from this byte (0: the end of the log)"),lines:g.number().int().min(1).max(1e3).default(120).describe("How many lines of the end to show")}),output:jxe,live:{everyMs:1e3},surfaces:{except:{cli:lQ}}}),sQ={text:"showing",tone:"accent"};function Uxe(e){let t=e.split(`
129
+ `);return t.length&&t[t.length-1]===""&&t.pop(),t.slice(-Lxe)}function Vxe(e,t){let r=t?.file?t:void 0,n=e.files.map(i=>({id:"log:"+i.name,label:i.name,hint:Yx(i.bytes)+" "+Tn(i.modified),keys:"Enter shows the end of this log in the terminal.",primary:Ja({kind:"view",view:"logs",params:{name:i.name}},"Show",{verb:"show"}),...r?.name===i.name?{badges:[sQ]}:{}}));e.crash&&n.push({id:"log:"+ck,label:"Last crash report",description:"What Windows logged, this PC and the sandbox memory when the sandbox last ended in a crash.",primary:Ja({kind:"view",view:"logs",params:{name:ck}},"Show",{verb:"show"}),...r?.name===ck?{badges:[sQ]}:{}});let o=r?[{id:"tail",title:r.name===ck?"Last crash report":r.name,summary:r.file,text:Uxe(r.text)}]:[];return{title:"Logs",sections:[{id:"files",items:n},...o],actions:[Ja({kind:"command",argv:["logs","--follow"]},"Follow the newest log",{key:"f",verb:"follow in the terminal",importance:2})],empty:{title:"No logs yet",text:"Logs appear after the first start.",cliText:"No sandbox logs yet."}}}var cQ=mt({id:"logs",title:"Logs",summary:"The sandbox's own logs: pick one to see its end as it grows.",queries:{files:_z,tail:Iz},operations:[],params:["name"],inputs:e=>({tail:e.name?{name:e.name}:{}}),build:({files:e,tail:t})=>Vxe(e,t)});var Hxe=g.object({viewers:g.number(),remote:g.number()}),Wxe=g.object({id:g.string().describe("The session"),launchId:g.string(),harness:g.string().describe("The agent"),cwd:g.string().describe("Its folder in the sandbox"),project:g.string().optional(),phase:g.enum(["starting","running","exited","failed"]).describe("What it is doing"),message:g.string(),updatedAt:g.string(),startedAt:g.string().describe("When it started"),conversation:g.string().optional(),exitCode:g.number().optional(),projectName:g.string().optional().describe("The project it runs in"),here:g.boolean().optional().describe("In the project of the current folder"),viewers:Hxe.nullable().optional(),canOpen:g.boolean()}),Zxe=g.object({sandboxRunning:g.boolean(),defaultAgent:g.string(),wide:g.boolean(),owner:g.string().optional(),sessions:g.array(Wxe)});function dQ(e){return e===void 0?"-":e===null?"unknown (older session)":e.remote+" here, "+(e.viewers-e.remote)+" in sandbox"}function Gxe(e){let t=(r,n)=>r.startedAt<n.startedAt?1:-1;return[...e.filter(r=>r.here).sort(t),...e.filter(r=>!r.here).sort(t)]}var wz=Qe({id:"sessions.list",title:"Sessions",summary:"list agent sessions and who is attached",input:g.object({wide:g.boolean().default(!1).describe("also show each session's folder")}),output:Zxe,live:{everyMs:2500},cli:{name:"sessions",group:"Sessions",json:!0,flags:{wide:{flag:"--wide",noMenu:!0}},shapeJson:e=>e.sessions.map(({canOpen:t,...r})=>r)}}),dk=we({id:"sessions.restart",title:"Restart agents",summary:"restart this project's running agents in place; they resume their conversation",input:g.object({harness:g.string().optional().describe("only this agent"),all:g.boolean().default(!1).describe("every project's sessions, not only this folder's")}),output:g.object({message:g.string().describe("The sandbox's answer")}),text:e=>e.message,cli:{name:"restart",group:"Agents",flags:{harness:{flag:"--harness",shownAs:"--agent",value:"name",choices:"harnesses"},all:{flag:"--all"}}}});function qxe(e,t){let r=e.phase+(e.exitCode!==void 0?" ("+e.exitCode+")":""),n=e.phase==="running";return{id:e.id,label:e.harness+" "+(e.projectName??"-"),hint:r+" "+Tn(e.startedAt),badges:[{text:e.phase,tone:n?"ok":e.phase==="failed"?"danger":"muted"}],group:e.here?"This folder's project":"Other sessions",marked:e.here,icon:e.harness,description:n?"Opens this session's terminal (in a terminal, Ctrl+] detaches; the session keeps running).":void 0,details:["Session "+e.id,"Folder "+e.cwd,"Attached "+dQ(e.viewers)],cells:{here:e.here?"*":"",id:e.id,agent:e.harness,project:e.projectName??"-",state:r,attached:dQ(e.viewers),...t?{folder:e.cwd}:{},started:Tn(e.startedAt)},...n&&e.canOpen?{primary:Ja({kind:"terminal",session:e.id},"Open",{verb:"attach"})}:{},...n?{}:{disabled:"This session has ended."},...n&&!e.canOpen?{disabled:"Not reachable from this PC."}:{}}}function Kxe(e){let t=Gxe(e.sessions),r=e.defaultAgent,n=Ja({kind:"start-agent",agent:r},"Start "+r,{verb:"start"}),o=t.length&&!t.some(i=>i.phase==="running"||i.phase==="starting")?[{id:"start",actions:[{...n,description:"Starts "+r+" in this folder."}]}]:[];return{title:"Sessions",...e.owner?{notice:{text:e.owner,tone:"accent"}}:{},sections:[{id:"sessions",cards:!0,columns:[{key:"here",label:""},{key:"id",label:"ID"},{key:"agent",label:"AGENT"},{key:"project",label:"PROJECT"},{key:"state",label:"STATE"},{key:"attached",label:"ATTACHED"},...e.wide?[{key:"folder",label:"FOLDER"}]:[],{key:"started",label:"STARTED"}],items:t.map(i=>qxe(i,e.wide)),notes:[...t.some(i=>i.here)?[{text:"* = the project of this folder",tone:"muted"}]:[],...e.wide?[]:[{text:"Folders: sandbox sessions --wide",tone:"muted",only:"cli"}]]},...o],actions:[...e.sandboxRunning?[{...n,label:"New session",key:"n",verb:"new session",importance:1}]:[],...t.length?[ve(dk,{all:!1},{key:"r",verb:"restart agents",importance:1})]:[],Ja({kind:"command",argv:["resume"]},"Reopen last sessions",{key:"o",verb:"reopen last sessions",importance:2})],empty:{title:e.sandboxRunning?"No sessions":"No sandbox is running",text:e.sandboxRunning?"No agent is running. Start "+r+" in this folder.":"Starting "+r+" starts the sandbox too; its session is listed here.",action:n,cliText:"No sessions. Start one with: sandbox claude"}}}var uQ=mt({id:"sessions",title:"Sessions",summary:"The agent sessions of the running sandbox: open one, restart the agents.",queries:{sessions:wz},operations:[dk],build:({sessions:e})=>Kxe(e)});var Xxe=g.enum(["nordvpn","openvpn-file","wireguard-file"]).describe("Which VPN (setting vpn.provider)"),Qxe=g.enum(["none","saved","unreadable"]).describe("Whether a login is saved and can be opened by you"),Yxe=["The VPN is an alpha: a tunnel carrying traffic is not confirmed yet (docs/vpn.md lists what still needs checking).","The agent in the sandbox can read the VPN login (a service login you can revoke) and can turn the tunnel off, because it is the administrator there.","Free VPNs see all your traffic: use one you trust."];var Jxe=g.object({enabled:g.boolean().describe("The VPN is on (setting vpn.enabled)"),provider:Xxe,protocol:g.enum(["udp","tcp"]).describe("udp or tcp (setting vpn.protocol)"),country:g.string().describe("The NordVPN country; empty = the best server anywhere"),killSwitch:g.boolean().describe("No internet when the tunnel fails (setting vpn.killSwitch)"),login:Qxe,loginSavedAt:g.string().nullable().describe("When the login was saved (the date and time, never the login)"),running:g.object({level:g.enum(["ok","warn","bad"]).describe("How the tunnel is doing"),text:g.string().describe("What the sandbox reported")}).nullable().describe("The running sandbox's tunnel, when one runs with the VPN on")}),Sz=Qe({id:"vpn.status",title:"VPN",summary:"the VPN settings, whether a login is saved, and the running tunnel",input:g.object({tunnel:g.boolean().default(!0).describe("also ask the running sandbox how its tunnel is doing (one request to api.ipify.org)")}),output:Jxe,cli:{name:"vpn",action:"status",json:!0}}),uk=we({id:"vpn.login",title:"Save the VPN login\u2026",summary:"save the VPN login (typed hidden, kept encrypted, never printed)",input:g.object({}).strict(),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"vpn",action:"login"}}),fk=we({id:"vpn.logout",title:"Delete the VPN login",summary:"delete the saved VPN login",input:g.object({}).strict(),output:g.object({deleted:g.boolean().describe("A login was saved and is gone"),message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"vpn",action:"logout"}}),ebe={nordvpn:"NordVPN","wireguard-file":"your own WireGuard .conf","openvpn-file":"your own .ovpn file"},tbe={none:"not saved",saved:"saved (encrypted)",unreadable:"cannot be read"},rbe={none:"warn",saved:"ok",unreadable:"danger"},obe={ok:"ok",warn:"warn",bad:"danger"};function nbe(e){let t=e.provider==="wireguard-file",r=e.loginSavedAt?" "+e.loginSavedAt.slice(0,10):"",n=[e.enabled?{id:"vpn",label:"VPN",value:"on",tone:"ok"}:{id:"vpn",label:"VPN",value:"off (applies from the next start)",tone:"muted"},{id:"provider",label:"Provider",value:ebe[e.provider]},{id:"protocol",label:"Protocol",value:e.protocol},{id:"country",label:"Country",value:e.country||"best available"},e.killSwitch?{id:"killSwitch",label:"Kill switch",value:"on (no internet if the tunnel fails)"}:{id:"killSwitch",label:"Kill switch",value:"off",tone:"warn"},t?{id:"login",label:"Login",value:"not needed (the keys are in your config)",tone:"muted"}:{id:"login",label:"Login",value:tbe[e.login]+r,tone:rbe[e.login]},...e.running?[{id:"running",label:"Running now",value:e.running.text,tone:obe[e.running.level]}]:[]],o=[...!t&&e.login==="none"?[{text:"Next: sandbox vpn login",tone:"muted",only:"cli"}]:[],...e.login==="unreadable"?[{text:"Only the Windows user that saved it can read it. Save it again: sandbox vpn login",tone:"muted"}]:[],...Yxe.map(l=>({text:l,tone:"warn"}))],a=[ve(es,{scope:"user",key:"vpn.enabled",value:!e.enabled},{label:e.enabled?"Turn the VPN off":"Turn the VPN on",verb:e.enabled?"turn off":"turn on",key:"o"}),...t?[]:[ve(uk,{},{key:"v",verb:"save login"}),...e.login!=="none"?[ve(fk,{},{key:"x",verb:"delete login"})]:[]]];return{title:"VPN",sections:[{id:"vpn",facts:n,notes:o,actions:a}]}}var fQ=mt({id:"vpn",title:"VPN",summary:"The sandbox's VPN: whether it is on, the saved login, and the tunnel.",queries:{status:Sz},operations:[uk,fk,es],build:({status:e})=>nbe(e)});var ibe="https://github.com/settings/personal-access-tokens/new",Ugt=["Open "+ibe+" (a fine-grained personal access token).",'Under "Repository access" choose "Only select repositories" and pick only the ones the agent should reach.',"Give only the permissions it needs, for example Contents (read and write), Pull requests (read and write) and Actions (read).","Set an expiry date, then generate the token and copy it."],abe=["The agent in the sandbox can read the token and use it for everything it allows: limit it to some repositories and permissions.",'It is handed over only with github.shareToken on and git access "full". Revoke it on GitHub whenever you like.'],sbe=g.enum(["none","saved","unreadable"]).describe("Whether a token is saved and can be opened by you"),lbe=g.object({shareToken:g.boolean().describe("Sandboxes get the token (setting github.shareToken)"),gitAccess:g.enum(["full","readonly","none"]).describe("Git access in your settings (provisioning.git.access)"),token:sbe,kind:g.enum(["fine-grained","classic"]).nullable().describe("What kind of token is saved (never the token)"),savedAt:g.string().nullable().describe("When the token was saved (the date and time, never the token)")}),kz=Qe({id:"github.status",title:"GitHub",summary:"whether sandboxes get your GitHub token, and whether one is saved (never the token)",input:g.object({}).strict(),output:lbe,cli:{name:"github",action:"status",json:!0}}),mk=we({id:"github.login",title:"Save the GitHub token\u2026",summary:"save a GitHub token for sandboxes (typed hidden, kept encrypted, never printed)",input:g.object({}).strict(),output:g.object({message:g.string().describe("What happened")}),text:e=>e.message,cli:{name:"github",action:"login"}}),pk=we({id:"github.logout",title:"Delete the GitHub token",summary:"delete the saved GitHub token",input:g.object({}).strict(),output:g.object({deleted:g.boolean().describe("A token was saved and is gone"),message:g.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"github",action:"logout"}}),cbe={none:"not saved",saved:"saved (encrypted)",unreadable:"cannot be read"},dbe={none:"warn",saved:"ok",unreadable:"danger"},ube={"fine-grained":"fine-grained",classic:"classic (reaches every repository you can: a fine-grained token is safer)"};function fbe(e){let t=e.savedAt?" "+e.savedAt.slice(0,10):"",r=[e.shareToken?{id:"share",label:"Share with sandboxes",value:"on",tone:"ok"}:{id:"share",label:"Share with sandboxes",value:"off (turn on: sandbox config set github.shareToken true)"},e.gitAccess==="full"?{id:"gitAccess",label:"Git access",value:"full"}:{id:"gitAccess",label:"Git access",value:e.gitAccess+' (the token is only handed over with "full")',tone:"warn"},{id:"token",label:"Token",value:cbe[e.token]+t,tone:dbe[e.token]},...e.kind?[{id:"kind",label:"Kind",value:ube[e.kind],...e.kind==="classic"?{tone:"warn"}:{}}]:[]],n=[...e.token==="none"?[{text:"Next: sandbox github login",tone:"muted",only:"cli"}]:[],...e.token==="unreadable"?[{text:"Only the Windows user that saved it can read it. Save it again: sandbox github login",tone:"muted"}]:[],...abe.map(a=>({text:a,tone:"muted"}))],o=[ve(mk,{},{key:"g",verb:"save token"}),...e.token!=="none"?[ve(pk,{},{key:"x",verb:"delete token"})]:[]];return{title:"GitHub",sections:[{id:"github",facts:r,notes:n,actions:o}]}}var mQ=mt({id:"github",title:"GitHub",summary:"A GitHub token for sandboxes: whether they get it, and the saved token.",queries:{status:kz},operations:[mk,pk],build:({status:e})=>fbe(e)});var mbe=g.object({version:g.string().describe("The version that failed"),reason:g.string().describe("Why it failed, in one sentence")}),pbe=g.object({managed:g.boolean().describe("Installed by the installer, so it can update itself"),version:g.string().describe("The version installed"),scope:g.enum(["user","machine"]).nullable().describe("Installed for you, or for everyone on this PC"),autoUpdate:g.boolean().describe("New versions install by themselves"),autoOffText:g.string().nullable().describe("Why automatic updates were turned off, if they were"),previous:g.string().nullable().describe("The version an update replaced (roll back goes there)"),failed:mbe.nullable().describe("The last update that failed"),npmCommand:g.string().describe("How an npm install is updated"),error:g.string().nullable().describe("Why the status could not be read"),settings:g.object({pending:g.array(g.string()).describe('Each change still to make, as "name: what it does"'),error:g.string().nullable().describe("Why your saved settings could not be read")}).describe("Changes still to make to your saved settings")}),Cz=Qe({id:"updates.status",title:"Updates",summary:"which version is installed and what your saved settings still need",input:g.object({}),output:pbe,surfaces:{except:{cli:"no command shows this page; sandbox update --check and --version cover the command line"}}}),pQ=g.object({line:g.string().describe("What happened, in one sentence")}),ts=we({id:"updates.update",title:"Update now",summary:"install the newest version, or check, go back, or switch automatic updates",input:g.object({check:g.boolean().default(!1).describe("only look whether a newer version exists"),rollback:g.boolean().default(!1).describe("go back to the version before the last update"),auto:g.enum(["on","off"]).optional().describe("install new versions by themselves (for everyone on this PC: needs an admin terminal)"),unattended:g.boolean().default(!1).describe("used by automatic updates: no questions, short output"),feed:g.string().optional().describe("take the release from this folder (a feed.json and the package) instead of GitHub")}),output:pQ.extend({latest:g.string().nullable().describe("The newer version a check found")}),danger:!0,text:e=>e.line,cli:{name:"update",group:"Health",flags:{check:{flag:"--check"},rollback:{flag:"--rollback"},auto:{flag:"--auto",value:"on|off"},unattended:{flag:"--unattended",noMenu:!0,advanced:!0},feed:{flag:"--feed",value:"folder",noMenu:!0,advanced:!0}},yes:"(--rollback) do not ask first"}}),ab=we({id:"updates.migrate",title:"Update saved settings",summary:"bring your saved settings up to date with this version",input:g.object({dryRun:g.boolean().default(!1).describe("only list what would change"),restore:g.string().optional().describe("put back the files saved before an update (a folder under <storage>\\backups)")}),output:pQ,text:e=>e.line,cli:{name:"migrate",group:"Health",flags:{dryRun:{flag:"--dry-run"},restore:{flag:"--restore",value:"backup",advanced:!0}},yes:"(--restore) do not ask first"}}),Uc=(e,t,r={})=>({id:"updates:"+e,label:t,...r});function hbe(e,t){let r=e.managed&&!e.error,n=e.scope==="machine",o=e.autoUpdate?"off":"on",i=ve(ts,{rollback:!0},{label:"Roll back",verb:"go back"}),a={id:"program",title:"This program",notes:[{text:"After an update this page still runs the version it started with; sandbox web open (or the next sandbox start) starts the new one.",tone:"muted",only:"web"}],items:e.error?[{id:"updates:error",label:e.error,tone:"danger"}]:e.managed?[Uc("version","Version",{hint:e.version,description:"Installed "+(n?"for everyone on this PC":"for you")+"."}),Uc("latest","Newest version",{hint:t??"not looked yet",tone:t?"warn":"muted",keys:t?"Enter installs it.":"Enter looks on GitHub for a newer version.",primary:t?ve(ts,{},{label:"Install "+t,verb:"install"}):ve(ts,{check:!0},{label:"Check now",verb:"look",danger:!1})}),Uc("auto","Automatic updates",{hint:e.autoUpdate?"on":"off",tone:e.autoUpdate?"ok":"muted",description:n?"For everyone: needs an admin terminal.":"A new version installs when no sandbox runs.",keys:"Enter switches them.",primary:ve(ts,{auto:o},{label:"Automatic updates "+o,verb:"switch",danger:!1}),actions:[ve(ts,{auto:o},{key:"a",label:"Automatic updates "+o,verb:"automatic on/off",danger:!1})]}),...e.autoOffText?[Uc("autooff","Automatic updates turned off",{hint:"off",tone:"warn",description:e.autoOffText})]:[],...e.previous?[Uc("previous","Previous version",{hint:e.previous,keys:"Enter goes back to it.",primary:i,actions:[{...i,key:"r",verb:"roll back"}]})]:[],...e.failed?[Uc("failed","Last failed update",{hint:e.failed.version,tone:"danger",description:"It is not tried again until a newer version is released.",details:[e.failed.reason]})]:[]]:[Uc("version","Version",{hint:e.version,description:"Installed with npm, so npm updates it: "+e.npmCommand}),Uc("npm","Update",{hint:"with npm",tone:"muted",description:"Run "+e.npmCommand+" in a terminal."})]},s=e.settings.pending,c={id:"settings",title:"Saved settings",items:e.settings.error?[{id:"settings:error",label:e.settings.error,tone:"danger"}]:s.length?s.map((d,u)=>({id:"settings:"+u,label:d.split(":")[0],hint:"to update",tone:"warn",description:"A backup is kept first.",keys:"Enter updates your saved settings.",details:[d],primary:ve(ab,{},{label:"Update saved settings",verb:"update"}),actions:[ve(ab,{},{key:"s",label:"Update saved settings",verb:"update saved settings"})]})):[{id:"settings:none",label:"Up to date",hint:"OK",tone:"ok",description:"Nothing to update."}]};return{title:"Updates",sections:[a,c],actions:r?[ve(ts,{check:!0},{key:"c",label:"Check now",verb:"check now",danger:!1}),ve(ts,{},{key:"u",label:"Update now",verb:"update now"})]:[]}}var hQ=mt({id:"updates",title:"Updates",summary:"Which version is installed, installing a newer one, and bringing your saved settings up to date.",queries:{status:Cz},operations:[ts,ab],build:({status:e})=>hbe(e,null)});var hk={except:{web:"the page is the web UI"}},gbe=g.object({running:g.boolean().describe("The web UI server answers"),port:g.number().nullable().describe("Its port on 127.0.0.1, when it runs"),address:g.string().nullable().describe("Its address (without the login token), when it runs")}),vbe=g.object({message:g.string().describe("What happened")}),Pz=Qe({id:"web.status",title:"Web UI",summary:"whether the web UI server runs, and its address",input:g.object({}),output:gbe,surfaces:hk,text:e=>e.running&&e.port?"The web UI is running at http://127.0.0.1:"+e.port+"/ (sandbox web open signs you in).":"The web UI is not running (sandbox web start).",cli:{name:"web",action:"status",json:!0}}),gk=we({id:"web.start",title:"Start the web UI",summary:"start the web UI server in the background (this PC only)",input:g.object({}),output:g.object({port:g.number().describe("Its port"),message:g.string().describe("What happened")}),surfaces:hk,text:e=>e.message,cli:{name:"web",action:"start"}}),vk=we({id:"web.open",title:"Open the web UI",summary:"start the web UI if needed and open it in your browser, signed in",input:g.object({}),output:vbe,surfaces:hk,text:e=>e.message,cli:{name:"web",action:"open"}}),xk=we({id:"web.stop",title:"Stop the web UI",summary:"stop the web UI server",input:g.object({}),output:g.object({stopped:g.boolean().describe("It was running and stopped"),message:g.string().describe("What happened")}),surfaces:hk,text:e=>e.message,cli:{name:"web",action:"stop"}});function xbe(e){let t=ve(vk,{},{key:"o",verb:"open"}),r=ve(gk,{},{key:"s",verb:"start"}),n=ve(xk,{},{key:"x",verb:"stop"});return{title:"Web UI",sections:[{id:"web",facts:[{id:"running",label:"Running",value:e.running?"yes":"no",tone:e.running?"ok":"muted"},...e.address?[{id:"address",label:"Address",value:e.address+" (this PC only)"}]:[]],actions:e.running?[t,n]:[r,t],notes:[{text:"Loopback only, behind a token. Open signs you in.",tone:"muted"}]}]}}var gQ=mt({id:"web",title:"Web UI",summary:"The web UI server on this PC: start, open, stop.",queries:{status:Pz},operations:[gk,vk,xk],build:({status:e})=>xbe(e)});var vQ=[X1,ek,tk,rk,dk,az,A1,O1,z1,es,W1,tb,rb,Jx,N1,F1,L1,M1,G1,q1,K1,nk,ib,ik,ak,sk,lk,Bu,ob,nb,Q1,Y1,J1,ts,ab,B1,j1,oh,U1,V1,gk,vk,xk,uk,fk,mk,pk],xQ=[bz,wz,iz,fz,FX,rh,lz,mz,yz,vz,xz,cz,dz,_z,Iz,Cz,pz,VX,hz,Pz,Sz,kz],bbe=[oQ,uQ,AX,MX,OX,BX,aQ,XX,eQ,zX,cQ,hQ,HX,gQ,fQ,mQ],mvt=[...vQ,...xQ];function bk(e){return vQ.find(t=>t.id===e)}function ju(e){return xQ.find(t=>t.id===e)}function Dz(e){return bbe.find(t=>t.id===e)}function Uu(e){return e.flatMap(t=>[t,...Uu(t.children??[])])}function bQ(e){return Uu(e).flatMap(t=>[...t.view?[t.view]:[],...(t.embeds??[]).map(r=>r.view)])}function yQ(e,t){return Uu(e).find(r=>r.embeds?.some(n=>n.view===t))}var nl=[{label:"Agents",view:"agents"},{label:"Sessions",view:"sessions"},{label:"Sandbox",children:[{label:"Status",view:"sandbox"},{label:"Projects",view:"projects"}]},{label:"Apps",view:"apps"},{label:"Settings",view:"settings",embeds:[{label:"VPN",view:"vpn"},{label:"GitHub",view:"github"}]},{label:"Accounts",view:"accounts"},{label:"Maintenance",children:[{label:"Updates",view:"updates"},{label:"Data",view:"data"},{label:"Storage",view:"storage"},{label:"Health",view:"health"},{label:"Logs",view:"logs"},{label:"Engine",view:"engine"},{label:"More",elsewhere:"The less common commands are in the menu (sandbox > Maintenance)."}]}];var yk=y(O(),1),_k={Agents:IE,Sessions:Ys,Sandbox:up,Apps:eE,Settings:wE,Accounts:RE,Maintenance:DE},ybe={project:Hv,folder:Zv,database:lE,session:Ys},_be={claude:"orange",codex:"dark",gemini:"blue",opencode:"gray",qwen:"violet",crush:"pink",copilot:"teal",kilo:"yellow",amp:"red",cline:"cyan",continue:"grape",kimi:"indigo",aider:"green",deepseek:"blue",reasonix:"lime"};function Vu({name:e,size:t=36}){let r=ybe[e];return r?(0,yk.jsx)(Gd,{size:t,radius:"md",color:"indigo",variant:"light",children:(0,yk.jsx)(r,{size:t*.55,stroke:1.6})}):(0,yk.jsx)(Gd,{size:t,radius:"md",color:_be[e]??"indigo",variant:"filled",fw:700,children:e.slice(0,1).toUpperCase()})}var Ik=y(R(),1),Ibe="sessions";function wbe(e,t=""){let r=/^\/s\/([A-Za-z0-9_-]{1,64})\/?$/.exec(e);if(r)return{page:"terminal",id:r[1]};let n=/^\/v\/([a-z][a-z0-9-]{0,40})\/?$/.exec(e),o=Object.fromEntries(new URLSearchParams(t));return{page:"view",view:n?n[1]:Ibe,params:o}}function To(e,t={}){let r=new URLSearchParams(t).toString();return"/v/"+e+(r?"?"+r:"")}function Yr(e){history.pushState(null,"",e),window.dispatchEvent(new PopStateEvent("popstate"))}function _Q(){let[e,t]=(0,Ik.useState)({path:location.pathname,search:location.search});return(0,Ik.useEffect)(()=>{let r=()=>t({path:location.pathname,search:location.search});return window.addEventListener("popstate",r),()=>window.removeEventListener("popstate",r)},[]),wbe(e.path,e.search)}var os=y(R(),1);var kk=y(R(),1);var rs=y(R(),1);var vt=y(O(),1),Sbe={ask:()=>Promise.resolve(void 0)};function IQ(e,t){if(!t||!/^[A-Za-z]:\\|^\\\\/.test(t))return;if(e==="dir")return t;let r=t.lastIndexOf("\\");return r>2?t.slice(0,r):t.slice(0,3)}function kbe({kind:e,initial:t,done:r}){let n=Sk(),[o,i]=(0,rs.useState)(null),[a,s]=(0,rs.useState)(IQ(e,t)??""),[l,c]=(0,rs.useState)(e==="file"?t??null:null),[d,u]=(0,rs.useState)(null),[f,m]=(0,rs.useState)(!1),p=(0,rs.useCallback)(v=>{m(!0),u(null),Cbe(n,v,e==="file").then(x=>{i(x),s(x.path),c(null),m(!1)},x=>{u(x instanceof Error?x.message:"That folder cannot be opened."),m(!1)})},[n,e]);(0,rs.useEffect)(()=>p(IQ(e,t)),[p,e,t]);let h=e==="dir"?l??o?.path??"":l??"",b=v=>{v.key==="Enter"&&(v.preventDefault(),p(a.trim()||void 0))};return(0,vt.jsxs)(Ue,{gap:"sm",children:[(0,vt.jsxs)(De,{gap:"xs",wrap:"nowrap",children:[(0,vt.jsx)(kt,{label:"Up one folder",children:(0,vt.jsx)(bt,{size:"lg",variant:"default","aria-label":"Up one folder",disabled:!o?.path,onClick:()=>p(o?.parent??void 0),children:(0,vt.jsx)(rE,{size:16})})}),(0,vt.jsx)(er,{style:{flex:1},value:a,placeholder:"Type a path and press Enter",onChange:v=>s(v.currentTarget.value),onKeyDown:b,ff:"monospace","aria-label":"Folder",rightSection:f?(0,vt.jsx)(fo,{size:14}):null})]}),d&&(0,vt.jsx)(za,{color:"red",variant:"light",p:"xs",children:d}),(0,vt.jsxs)(De,{align:"stretch",gap:"sm",wrap:"nowrap",children:[(0,vt.jsxs)(Ue,{gap:2,w:170,visibleFrom:"xs",style:{flex:"none"},children:[(0,vt.jsx)(ye,{size:"xs",fw:650,c:"dimmed",tt:"uppercase",px:6,pb:4,children:"Places"}),(o?.places??[]).map(v=>(0,vt.jsxs)("div",{className:"picker-entry",onClick:()=>p(v.path),title:v.path,children:[v.label.endsWith(":")?(0,vt.jsx)(Vv,{size:16}):(0,vt.jsx)(Hv,{size:16}),(0,vt.jsx)(ye,{size:"sm",truncate:!0,children:v.label})]},v.path))]}),(0,vt.jsxs)(Ar,{className:"picker-list",style:{flex:1},type:"auto",children:[!o?.path&&(0,vt.jsx)(ye,{size:"sm",c:"dimmed",p:"md",children:"Pick a place on the left, or type a path."}),o?.path&&o.entries.length===0&&(0,vt.jsx)(ye,{size:"sm",c:"dimmed",p:"md",children:e==="dir"?"No folders in here.":"Nothing in here."}),o?.entries.map(v=>(0,vt.jsxs)("div",{className:"picker-entry","data-selected":l===v.path,onClick:()=>c(v.path),onDoubleClick:()=>v.kind==="dir"?p(v.path):r(v.path),children:[v.kind==="dir"?(0,vt.jsx)(Zv,{size:16,color:"var(--mantine-color-yellow-6)"}):(0,vt.jsx)(mE,{size:16,color:"var(--app-muted)"}),(0,vt.jsx)(ye,{size:"sm",truncate:!0,children:v.name})]},v.path)),o?.truncated&&(0,vt.jsx)(ye,{size:"xs",c:"dimmed",p:"sm",children:"Only the first entries are shown: type the rest of the path."})]})]}),(0,vt.jsxs)(De,{justify:"space-between",wrap:"nowrap",gap:"sm",children:[(0,vt.jsx)(ye,{size:"xs",c:"dimmed",ff:"monospace",truncate:!0,style:{minWidth:0},children:h||(e==="file"?"Pick a file":"Pick a folder")}),(0,vt.jsxs)(De,{gap:"xs",wrap:"nowrap",style:{flex:"none"},children:[(0,vt.jsx)(ht,{variant:"default",onClick:()=>r(void 0),children:"Cancel"}),(0,vt.jsx)(ht,{disabled:!h,onClick:()=>r(h),children:e==="dir"?"Choose this folder":"Choose"})]})]})]})}function Cbe(e,t,r){return e.call("files.browse",{path:t,files:r},Sbe)}function wk(e,t,r){return new Promise(n=>{let o=!1,i=s=>{o||(o=!0,Ua.close(a),n(s))},a=Ua.open({title:r??(e==="dir"?"Choose a folder":"Choose a file"),size:"xl",onClose:()=>i(void 0),children:(0,vt.jsx)(kbe,{kind:e,initial:t,done:i})})})}var rr=y(O(),1);function wQ(e){return e.kind==="confirm"?!1:void 0}function Pbe({question:e,said:t,done:r}){let[n,o]=(0,kk.useState)(e.kind==="text"||e.kind==="path"?e.initial??"":""),[i,a]=(0,kk.useState)(e.kind==="choose"?e.initial??e.choices[0]?.value??"":""),[s,l]=(0,kk.useState)(e.kind==="checklist"?[...e.checked??[]]:[]),c=[...t,...e.lines??[]],d="problem"in e?e.problem:void 0,u=e.kind!=="confirm"||!e.typed||n.trim().toLowerCase()===e.typed;return(0,rr.jsx)("form",{onSubmit:m=>{m.preventDefault(),e.kind==="confirm"?r(u):e.kind==="choose"?r(i):e.kind==="checklist"?r(s):r(n===""&&e.kind==="text"&&!e.allowEmpty?void 0:n)},children:(0,rr.jsxs)(Ue,{gap:"sm",children:[c.map((m,p)=>(0,rr.jsx)(ye,{size:"sm",children:m},p)),d&&(0,rr.jsx)(za,{color:"orange",variant:"light",p:"xs",children:d}),e.kind==="confirm"&&e.typed&&(0,rr.jsx)(er,{label:'Type "'+e.typed+'" to confirm',value:n,onChange:m=>o(m.currentTarget.value),"data-autofocus":!0}),e.kind==="choose"&&(0,rr.jsx)(Vs.Group,{value:i,onChange:a,children:(0,rr.jsx)(Ue,{gap:"xs",children:e.choices.map(m=>(0,rr.jsx)(Vs,{value:m.value,label:m.label,description:m.description},m.value))})}),e.kind==="checklist"&&(0,rr.jsx)(Fs.Group,{value:s,onChange:l,children:(0,rr.jsx)(Ue,{gap:"xs",children:e.choices.map(m=>(0,rr.jsx)(Fs,{value:m.value,label:m.label,description:m.description},m.value))})}),e.kind==="text"&&(0,rr.jsx)(er,{value:n,onChange:m=>o(m.currentTarget.value),"data-autofocus":!0}),e.kind==="path"&&(0,rr.jsxs)(De,{gap:"xs",wrap:"nowrap",align:"flex-end",children:[(0,rr.jsx)(er,{style:{flex:1},ff:"monospace",value:n,onChange:m=>o(m.currentTarget.value),description:"The full path of a "+(e.pathKind==="file"?"file":"folder")+" on this PC","data-autofocus":!0}),(0,rr.jsx)(kt,{label:e.pathKind==="file"?"Choose a file":"Choose a folder",children:(0,rr.jsx)(bt,{variant:"default",size:36,"aria-label":"Browse",onClick:()=>{wk(e.pathKind,n||void 0).then(m=>m&&o(m))},children:(0,rr.jsx)(Wv,{size:18,stroke:1.6})})})]}),e.kind==="secret"&&(0,rr.jsx)(Yd,{value:n,onChange:m=>o(m.currentTarget.value),autoComplete:"new-password","data-autofocus":!0}),(0,rr.jsxs)(De,{justify:"flex-end",children:[(0,rr.jsx)(ht,{variant:"default",onClick:()=>r(wQ(e)),children:"Cancel"}),(0,rr.jsx)(ht,{type:"submit",color:e.kind==="confirm"&&e.danger?"red":void 0,disabled:!u,children:e.kind==="confirm"?e.yes??"Yes":"OK"})]})]})})}function SQ(e,t=[]){return new Promise(r=>{let n=!1,o=a=>{n||(n=!0,Ua.close(i),r(a))},i=Ua.open({title:e.title,centered:!0,onClose:()=>o(wQ(e)),children:(0,rr.jsx)(Pbe,{question:e,said:t,done:o})})})}var PQ=y(O(),1),kQ=(0,os.createContext)(null);function CQ({client:e,children:t}){return(0,PQ.jsx)(kQ.Provider,{value:e,children:t})}function Sk(){let e=(0,os.useContext)(kQ);if(!e)throw new Error("useRpc needs an RpcProvider");return e}var Dbe={ask:()=>Promise.resolve(void 0)};function il(e,t){let r=Sk(),n=Zm(),o=e.live!==void 0,i=JSON.stringify(t??{}),[a,s]=(0,os.useState)(null),l=QR({queryKey:[e.id,i],queryFn:()=>r.call(e.id,t,Dbe),enabled:!o});(0,os.useEffect)(()=>{if(o)return r.subscribe(e.id,JSON.parse(i),d=>{s(null),n.setQueryData([e.id,i],d)},s)},[r,n,e.id,i,o]);let c=a??l.error;return{data:l.data,error:c,pending:l.data===void 0&&!c}}function Ck(){let e=Sk(),t=Zm();return(0,os.useCallback)(async(r,n={},o={})=>{let i=bk(r.op),a="op-"+Date.now(),s=[],l=!1;try{let c=await e.call(r.op,{...r.input,...n},{progress:f=>{let m={id:a,title:r.label,message:f,loading:!0,autoClose:!1};l?Qo.update(m):Qo.show(m),l=!0},log:f=>s.push(f),ask:f=>SQ(f,s.splice(0))}),d=i?.text?.(c)??"Done.",u={id:a,title:o.inline?void 0:r.label,message:d,color:"green",loading:!1,autoClose:o.inline?2500:5e3};return l?Qo.update(u):Qo.show(u),{ok:!0,text:d,output:c}}catch(c){if(l&&Qo.hide(a),c instanceof Qx)return{ok:!1,cancelled:!0,message:"Cancelled."};let d=c instanceof Error?c.message:"It did not work.",u=c.fix??(s.length?s.join(" "):void 0);return o.inline||Qo.show({title:d,message:u,color:"red",autoClose:1e4}),{ok:!1,message:d,fix:u}}finally{await t.invalidateQueries()}},[e,t])}var Rbe=2,Ebe=1,DQ=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),o=Math.max(0,parseInt(r.getPropertyValue("width"))),i=window.getComputedStyle(this._terminal.element),a={top:parseInt(i.getPropertyValue("padding-top")),bottom:parseInt(i.getPropertyValue("padding-bottom")),right:parseInt(i.getPropertyValue("padding-right")),left:parseInt(i.getPropertyValue("padding-left"))},s=a.top+a.bottom,l=a.right+a.left,c=n-s,d=o-l-t;return{cols:Math.max(Rbe,Math.floor(d/e.css.cell.width)),rows:Math.max(Ebe,Math.floor(c/e.css.cell.height))}}};var Tbe=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?RQ.isErrorNoTelemetry(e)?new RQ(e.message+`
130
+
131
+ `+e.stack):new Error(e.message+`
132
+
133
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},$be=new Tbe;function Rz(e){Abe(e)||$be.onUnexpectedError(e)}var $z="Canceled";function Abe(e){return e instanceof Obe?!0:e instanceof Error&&e.name===$z&&e.message===$z}var Obe=class extends Error{constructor(){super($z),this.name=this.message}},RQ=class Az extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Az)return t;let r=new Az;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function zbe(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var Nbe=class jQ{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(jQ.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=zbe(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};Nbe.assertInvariants=!1;var Oz;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Oz||(Oz={}));function Fbe(e,t){return(r,n)=>t(e(r),e(n))}var Lbe=(e,t)=>e-t,EQ=class zz{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new zz(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new zz(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||Oz.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};EQ.empty=new EQ(e=>{});function Mbe(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var TQ,$Q,Fvt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[TQ]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[($Q=Symbol.iterator,TQ=Symbol.toStringTag,$Q)](){return this.values()}},Bbe=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function jbe(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}var Nz;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*h(...I){for(let S of I)yield*S}e.concat=h;function b(I,S,w){let P=w;for(let E of I)P=S(P,E);return P}e.reduce=b;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let E=0;E<S;E++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(Nz||(Nz={}));var Ube=!1,sh=null,Vbe=class UQ{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:UQ.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
134
+ `).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new Bbe;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
135
+ `),l)}n.sort(Fbe(l=>l.idx,Lbe));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
136
+ `)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
137
+ `)),p=Mbe([...m].map(h=>o(h)[u]),h=>h);delete p[c[u]];for(let[h,b]of Object.entries(p))d.unshift(` - stacktraces of ${b.length} other leaks continue with ${h}`);d.unshift(f)}a+=`
138
+
139
+
140
+ ==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
141
+ ${d.join(`
142
+ `)}
143
+ ============================================================
144
+
145
+ `}return n.length>t&&(a+=`
146
+
147
+
148
+ ... and ${n.length-t} more leaking disposables
149
+
150
+ `),{leaks:n,details:a}}};Vbe.idx=0;function Hbe(e){sh=e}if(Ube){let e="__is_disposable_tracked__";Hbe(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==is.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==is.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function Ok(e){return sh?.trackDisposable(e),e}function zk(e){sh?.markAsDisposed(e)}function lb(e,t){sh?.setParent(e,t)}function Wbe(e,t){if(sh)for(let r of e)sh.setParent(r,t)}function sb(e){if(Nz.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function VQ(...e){let t=lh(()=>sb(e));return Wbe(e,t),t}function lh(e){let t=Ok({dispose:jbe(()=>{zk(t),e()})});return t}var HQ=class WQ{constructor(){this._toDispose=new Set,this._isDisposed=!1,Ok(this)}dispose(){this._isDisposed||(zk(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{sb(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return lb(t,this),this._isDisposed?WQ.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),lb(t,null))}};HQ.DISABLE_DISPOSED_WARNING=!1;var Vz=HQ,is=class{constructor(){this._store=new Vz,Ok(this),lb(this._store,this)}dispose(){zk(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};is.None=Object.freeze({dispose(){}});var $k=class{constructor(){this._isDisposed=!1,Ok(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&lb(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,zk(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&lb(e,null),e}},AQ=class Fz{constructor(t){this.element=t,this.next=Fz.Undefined,this.prev=Fz.Undefined}};AQ.Undefined=new AQ(void 0);var Zbe=globalThis.performance&&typeof globalThis.performance.now=="function",Gbe=class ZQ{static create(t){return new ZQ(t)}constructor(t){this._now=Zbe&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},qbe=!1,OQ=!1,Kbe=!1,Ak;(e=>{e.None=()=>is.None;function t(T){if(Kbe){let{onDidAddListener:k}=T,$=Bz.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),$.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,$=null,C)=>{let A=!1,D;return D=T(N=>{if(!A)return D?D.dispose():A=!0,k.call($,N)},null,C),A&&D.dispose(),D}}e.once=n;function o(T,k,$){return d((C,A=null,D)=>T(N=>C.call(A,k(N)),null,D),$)}e.map=o;function i(T,k,$){return d((C,A=null,D)=>T(N=>{k(N),C.call(A,N)},null,D),$)}e.forEach=i;function a(T,k,$){return d((C,A=null,D)=>T(N=>k(N)&&C.call(A,N),null,D),$)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,$=null,C)=>{let A=VQ(...T.map(D=>D(N=>k.call($,N))));return u(A,C)}}e.any=l;function c(T,k,$,C){let A=$;return o(T,D=>(A=k(A,D),A),C)}e.reduce=c;function d(T,k){let $,C={onWillAddFirstListener(){$=T(A.fire,A)},onDidRemoveLastListener(){$?.dispose()}};k||t(C);let A=new ns(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,$=100,C=!1,A=!1,D,N){let U,G,re,he=0,me,Q={leakWarningThreshold:D,onWillAddFirstListener(){U=T(Ie=>{he++,G=k(G,Ie),C&&!re&&(oe.fire(G),G=void 0),me=()=>{let se=G;G=void 0,re=void 0,(!C||he>1)&&oe.fire(se),he=0},typeof $=="number"?(clearTimeout(re),re=setTimeout(me,$)):re===void 0&&(re=0,queueMicrotask(me))})},onWillRemoveListener(){A&&he>0&&me?.()},onDidRemoveLastListener(){me=void 0,U.dispose()}};N||t(Q);let oe=new ns(Q);return N?.add(oe),oe.event}e.debounce=f;function m(T,k=0,$){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,$)}e.accumulate=m;function p(T,k=(C,A)=>C===A,$){let C=!0,A;return a(T,D=>{let N=C||!k(D,A);return C=!1,A=D,N},$)}e.latch=p;function h(T,k,$){return[e.filter(T,k,$),e.filter(T,C=>!k(C),$)]}e.split=h;function b(T,k=!1,$=[],C){let A=$.slice(),D=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(D);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new ns({onWillAddFirstListener(){D||(D=T(G=>U.fire(G)),C&&C.add(D))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){D&&D.dispose(),D=null}});return C&&C.add(U),U.event}e.buffer=b;function v(T,k){return($,C,A)=>{let D=k(new _);return T(function(N){let U=D.evaluate(N);U!==x&&$.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push($=>(k($),$)),this}filter(k){return this.steps.push($=>k($)?$:x),this}reduce(k,$){let C=$;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=($,C)=>$===C){let $=!0,C;return this.steps.push(A=>{let D=$||!k(A,C);return $=!1,C=A,D?A:x}),this}evaluate(k){for(let $ of this.steps)if(k=$(k),k===x)break;return k}}function I(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.on(k,C),D=()=>T.removeListener(k,C),N=new ns({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromNodeEventEmitter=I;function S(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.addEventListener(k,C),D=()=>T.removeEventListener(k,C),N=new ns({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new ns;return T.then($=>{k.fire($)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function E(T,k){return T($=>k.fire($))}e.forward=E;function B(T,k,$){return k($),T(C=>k(C))}e.runAndSubscribe=B;class H{constructor(k,$){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};$||t(C),this.emitter=new ns(C),$&&$.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,$){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Z(T,k){return new H(T,k).emitter.event}e.fromObservable=Z;function K(T){return(k,$,C)=>{let A=0,D=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),D&&(D=!1,k.call($)))},handlePossibleChange(){},handleChange(){D=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof Vz?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(Ak||(Ak={}));var Lz=class Mz{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Mz._idPool++}`,Mz.all.add(this)}start(t){this._stopWatch=new Gbe,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Lz.all=new Set,Lz._idPool=0;var Xbe=Lz,zQ=-1,GQ=class qQ{constructor(t,r,n=(qQ._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new Ybe(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};GQ._idPool=1;var Qbe=GQ,Bz=class KQ{constructor(t){this.value=t}static create(){let t=new Error;return new KQ(t.stack??"")}print(){console.warn(this.value.split(`
151
+ `).slice(2).join(`
152
+ `))}},Ybe=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Jbe=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},eye=0,Dk=class{constructor(e){this.value=e,this.id=eye++}},tye=2,rye=(e,t)=>{if(e instanceof Dk)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},Rk;if(qbe){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
153
+ `)),e.length=0)},3e3),Rk=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var ns=class{constructor(e){this._size=0,this._options=e,this._leakageMon=zQ>0||this._options?.leakWarningThreshold?new Qbe(e?.onListenerError??Rz,this._options?.leakWarningThreshold??zQ):void 0,this._perfMon=this._options?._profName?new Xbe(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(OQ){let e=this._listeners;queueMicrotask(()=>{rye(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Jbe(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Rz)(c),is.None}if(this._disposed)return is.None;t&&(e=e.bind(t));let n=new Dk(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=Bz.create(),o=this._leakageMon.check(n.stack,this._size+1)),OQ&&(n.stack=i??Bz.create()),this._listeners?this._listeners instanceof Dk?(this._deliveryQueue??(this._deliveryQueue=new oye),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=lh(()=>{Rk?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof Vz?r.add(a):Array.isArray(r)&&r.push(a),Rk){let s=new Error().stack.split(`
154
+ `).slice(2,3).join(`
155
+ `).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);Rk.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*tye<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||Rz;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Dk)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},oye=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},XQ=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),NQ;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof nye?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ak.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:XQ})})(NQ||(NQ={}));var nye=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?XQ:(this._emitter||(this._emitter=new ns),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},ah="en",jz=!1,Uz=!1,Ek=!1,iye=!1,aye=!1,QQ=!1,sye=!1,lye=!1,cye=!1,dye=!1,Pk,Tk=ah,FQ=ah,uye,al,sl=globalThis,Gn;typeof sl.vscode<"u"&&typeof sl.vscode.process<"u"?Gn=sl.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Gn=process);var YQ=typeof Gn?.versions?.electron=="string",fye=YQ&&Gn?.type==="renderer";if(typeof Gn=="object"){jz=Gn.platform==="win32",Uz=Gn.platform==="darwin",Ek=Gn.platform==="linux",iye=Ek&&!!Gn.env.SNAP&&!!Gn.env.SNAP_REVISION,sye=YQ,cye=!!Gn.env.CI||!!Gn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Pk=ah,Tk=ah;let e=Gn.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Pk=t.userLocale,FQ=t.osLocale,Tk=t.resolvedLanguage||ah,uye=t.languagePack?.translationsConfigFile}catch{}aye=!0}else typeof navigator=="object"&&!fye?(al=navigator.userAgent,jz=al.indexOf("Windows")>=0,Uz=al.indexOf("Macintosh")>=0,lye=(al.indexOf("Macintosh")>=0||al.indexOf("iPad")>=0||al.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ek=al.indexOf("Linux")>=0,dye=al?.indexOf("Mobi")>=0,QQ=!0,Tk=globalThis._VSCODE_NLS_LANGUAGE||ah,Pk=navigator.language.toLowerCase(),FQ=Pk):console.error("Unable to resolve platform.");var Ez=0;Uz?Ez=1:jz?Ez=3:Ek&&(Ez=2);var mye=QQ&&typeof sl.importScripts=="function",Lvt=mye?sl.origin:void 0,as=al,Vc=Tk,LQ;(e=>{function t(){return Vc}e.value=t;function r(){return Vc.length===2?Vc==="en":Vc.length>=3?Vc[0]==="e"&&Vc[1]==="n"&&Vc[2]==="-":!1}e.isDefaultVariant=r;function n(){return Vc==="en"}e.isDefault=n})(LQ||(LQ={}));var pye=typeof sl.postMessage=="function"&&!sl.importScripts,hye=(()=>{if(pye){let e=[];sl.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=e.length;n<o;n++){let i=e[n];if(i.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),i.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),sl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),gye=!!(as&&as.indexOf("Chrome")>=0),Mvt=!!(as&&as.indexOf("Firefox")>=0),Bvt=!!(!gye&&as&&as.indexOf("Safari")>=0),jvt=!!(as&&as.indexOf("Edg/")>=0),Uvt=!!(as&&as.indexOf("Android")>=0);function JQ(e,t=0,r){let n=setTimeout(()=>{e(),r&&o.dispose()},t),o=lh(()=>{clearTimeout(n),r?.deleteAndLeak(o)});return r?.add(o),o}var vye,Tz;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Tz=(e,t)=>{hye(()=>{if(r)return;let n=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:Tz=(e,t,r)=>{let n=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},vye=e=>Tz(globalThis,e)})();var MQ;(e=>{async function t(n){let o,i=await Promise.all(n.map(a=>a.then(s=>s,s=>{o||(o=s)})));if(typeof o<"u")throw o;return i}e.settled=t;function r(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(a){i(a)}})}e.withAsyncBody=r})(MQ||(MQ={}));var BQ=class Ci{static fromArray(t){return new Ci(r=>{r.emitMany(t)})}static fromPromise(t){return new Ci(async r=>{r.emitMany(await t)})}static fromPromises(t){return new Ci(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new Ci(async r=>{await Promise.all(t.map(async n=>{for await(let o of n)r.emitOne(o)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new ns,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Ak.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new Ci(async n=>{for await(let o of t)n.emitOne(r(o))})}map(t){return Ci.map(this,t)}static filter(t,r){return new Ci(async n=>{for await(let o of t)r(o)&&n.emitOne(o)})}filter(t){return Ci.filter(this,t)}static coalesce(t){return Ci.filter(t,r=>!!r)}coalesce(){return Ci.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return Ci.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};BQ.EMPTY=BQ.fromArray([]);var xye=class extends is{constructor(e){super(),this._terminal=e,this._linesCacheTimeout=this._register(new $k),this._linesCacheDisposables=this._register(new $k),this._register(lh(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=new Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=VQ(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=JQ(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(e){return this._linesCache?.[e]}setLineInCache(e,t){this._linesCache&&(this._linesCache[e]=t)}translateBufferLineToStringWithWrap(e,t){let r=[],n=[0],o=this._terminal.buffer.active.getLine(e);for(;o;){let i=this._terminal.buffer.active.getLine(e+1),a=i?i.isWrapped:!1,s=o.translateToString(!a&&t);if(a&&i){let l=o.getCell(o.length-1);l&&l.getCode()===0&&l.getWidth()===1&&i.getCell(0)?.getWidth()===2&&(s=s.slice(0,-1))}if(r.push(s),a)n.push(n[n.length-1]+s.length);else break;e++,o=i}return[r.join(""),n]}},bye=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(e){this._cachedSearchTerm=e}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(e){this._lastSearchOptions=e}isValidSearchTerm(e){return!!(e&&e.length>0)}didOptionsChange(e){return this._lastSearchOptions?e?this._lastSearchOptions.caseSensitive!==e.caseSensitive||this._lastSearchOptions.regex!==e.regex||this._lastSearchOptions.wholeWord!==e.wholeWord:!1:!0}shouldUpdateHighlighting(e,t){return t?.decorations?this._cachedSearchTerm===void 0||e!==this._cachedSearchTerm||this.didOptionsChange(t):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},yye=class{constructor(e,t){this._terminal=e,this._lineCache=t}find(e,t,r,n){if(!e||e.length===0){this._terminal.clearSelection();return}if(r>this._terminal.cols)throw new Error(`Invalid col: ${r} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let o={startRow:t,startCol:r},i=this._findInLine(e,o,n);if(!i)for(let a=t+1;a<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=a,o.startCol=0,i=this._findInLine(e,o,n),!i);a++);return i}findNextWithSelection(e,t,r){if(!e||e.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let o=0,i=0;n&&(r===e?(o=n.end.x,i=n.end.y):(o=n.start.x,i=n.start.y)),this._lineCache.initLinesCache();let a={startRow:i,startCol:o},s=this._findInLine(e,a,t);if(!s)for(let l=i+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(a.startRow=l,a.startCol=0,s=this._findInLine(e,a,t),!s);l++);if(!s&&i!==0)for(let l=0;l<i&&(a.startRow=l,a.startCol=0,s=this._findInLine(e,a,t),!s);l++);return!s&&n&&(a.startRow=n.start.y,a.startCol=0,s=this._findInLine(e,a,t)),s}findPreviousWithSelection(e,t,r){if(!e||e.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let o=this._terminal.buffer.active.baseY+this._terminal.rows-1,i=this._terminal.cols,a=!0;this._lineCache.initLinesCache();let s={startRow:o,startCol:i},l;if(n&&(s.startRow=o=n.start.y,s.startCol=i=n.start.x,r!==e&&(l=this._findInLine(e,s,t,!1),l||(s.startRow=o=n.end.y,s.startCol=i=n.end.x))),l||(l=this._findInLine(e,s,t,a)),!l){s.startCol=Math.max(s.startCol,this._terminal.cols);for(let c=o-1;c>=0&&(s.startRow=c,l=this._findInLine(e,s,t,a),!l);c--);}if(!l&&o!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let c=this._terminal.buffer.active.baseY+this._terminal.rows-1;c>=o&&(s.startRow=c,l=this._findInLine(e,s,t,a),!l);c--);return l}_isWholeWord(e,t,r){return(e===0||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e-1]))&&(e+r.length===t.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e+r.length]))}_findInLine(e,t,r={},n=!1){let o=t.startRow,i=t.startCol;if(this._terminal.buffer.active.getLine(o)?.isWrapped){if(n){t.startCol+=this._terminal.cols;return}return t.startRow--,t.startCol+=this._terminal.cols,this._findInLine(e,t,r)}let a=this._lineCache.getLineFromCache(o);a||(a=this._lineCache.translateBufferLineToStringWithWrap(o,!0),this._lineCache.setLineInCache(o,a));let[s,l]=a,c=this._bufferColsToStringOffset(o,i),d=e,u=s;r.regex||(d=r.caseSensitive?e:e.toLowerCase(),u=r.caseSensitive?s:s.toLowerCase());let f=-1;if(r.regex){let m=RegExp(d,r.caseSensitive?"g":"gi"),p;if(n)for(;p=m.exec(u.slice(0,c));)f=m.lastIndex-p[0].length,e=p[0],m.lastIndex-=e.length-1;else p=m.exec(u.slice(c)),p&&p[0].length>0&&(f=c+(m.lastIndex-p[0].length),e=p[0])}else n?c-d.length>=0&&(f=u.lastIndexOf(d,c-d.length)):f=u.indexOf(d,c);if(f>=0){if(r.wholeWord&&!this._isWholeWord(f,u,e))return;let m=0;for(;m<l.length-1&&f>=l[m+1];)m++;let p=m;for(;p<l.length-1&&f+e.length>=l[p+1];)p++;let h=f-l[m],b=f+e.length-l[p],v=this._stringLengthToBufferSize(o+m,h),x=this._stringLengthToBufferSize(o+p,b)-v+this._terminal.cols*(p-m);return{term:e,col:v,row:o+m,size:x}}}_stringLengthToBufferSize(e,t){let r=this._terminal.buffer.active.getLine(e);if(!r)return 0;for(let n=0;n<t;n++){let o=r.getCell(n);if(!o)break;let i=o.getChars();i.length>1&&(t-=i.length-1);let a=r.getCell(n+1);a&&a.getWidth()===0&&t++}return t}_bufferColsToStringOffset(e,t){let r=e,n=0,o=this._terminal.buffer.active.getLine(r);for(;t>0&&o;){for(let i=0;i<t&&i<this._terminal.cols;i++){let a=o.getCell(i);if(!a)break;a.getWidth()&&(n+=a.getCode()===0?1:a.getChars().length)}if(r++,o=this._terminal.buffer.active.getLine(r),o&&!o.isWrapped)break;t-=this._terminal.cols}return n}},_ye=class extends is{constructor(e){super(),this._terminal=e,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(lh(()=>this.clearHighlightDecorations()))}createHighlightDecorations(e,t){this.clearHighlightDecorations();for(let r of e){let n=this._createResultDecorations(r,t,!1);if(n)for(let o of n)this._storeDecoration(o,r)}}createActiveDecoration(e,t){let r=this._createResultDecorations(e,t,!0);if(r)return{decorations:r,match:e,dispose(){sb(r)}}}clearHighlightDecorations(){sb(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(e,t){this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:t,dispose(){e.dispose()}})}_applyStyles(e,t,r){e.classList.contains("xterm-find-result-decoration")||(e.classList.add("xterm-find-result-decoration"),t&&(e.style.outline=`1px solid ${t}`)),r&&e.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(e,t,r){let n=[],o=e.col,i=e.size,a=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+e.row;for(;i>0;){let l=Math.min(this._terminal.cols-o,i);n.push([a,o,l]),o=0,i-=l,a++}let s=[];for(let l of n){let c=this._terminal.registerMarker(l[0]),d=this._terminal.registerDecoration({marker:c,x:l[1],width:l[2],backgroundColor:r?t.activeMatchBackground:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(c.line)?void 0:{color:r?t.activeMatchColorOverviewRuler:t.matchOverviewRuler,position:"center"}});if(d){let u=[];u.push(c),u.push(d.onRender(f=>this._applyStyles(f,r?t.activeMatchBorder:t.matchBorder,!1))),u.push(d.onDispose(()=>sb(u))),s.push(d)}}return s.length===0?void 0:s}},Iye=class extends is{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new ns)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(e){this._selectedDecoration=e}updateResults(e,t){this._searchResults=e.slice(0,t)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(e){for(let t=0;t<this._searchResults.length;t++){let r=this._searchResults[t];if(r.row===e.row&&r.col===e.col&&r.size===e.size)return t}return-1}fireResultsChanged(e){if(!e)return;let t=-1;this._selectedDecoration&&(t=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:t,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},eY=class extends is{constructor(e){super(),this._highlightTimeout=this._register(new $k),this._lineCache=this._register(new $k),this._state=new bye,this._resultTracker=this._register(new Iye),this._highlightLimit=e?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(e){this._terminal=e,this._lineCache.value=new xye(e),this._engine=new yye(e,this._lineCache.value),this._decorationManager=new _ye(e),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(lh(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=JQ(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(e){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),e||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(e,t,r){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let n=this._findNextAndSelect(e,t,r);return this._fireResults(t),this._state.cachedSearchTerm=e,n}_highlightAllMatches(e,t){if(!this._terminal||!this._engine||!this._decorationManager)throw new Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(e)){this.clearDecorations();return}this.clearDecorations(!0);let r=[],n,o=this._engine.find(e,0,0,t);for(;o&&(n?.row!==o.row||n?.col!==o.col)&&!(r.length>=this._highlightLimit);)n=o,r.push(n),o=this._engine.find(e,n.col+n.term.length>=this._terminal.cols?n.row+1:n.row,n.col+n.term.length>=this._terminal.cols?0:n.col+1,t);this._resultTracker.updateResults(r,this._highlightLimit),t.decorations&&this._decorationManager.createHighlightDecorations(r,t.decorations)}_findNextAndSelect(e,t,r){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findNextWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(n,t?.decorations,r?.noScroll)}findPrevious(e,t,r){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let n=this._findPreviousAndSelect(e,t,r);return this._fireResults(t),this._state.cachedSearchTerm=e,n}_fireResults(e){this._resultTracker.fireResultsChanged(!!e?.decorations)}_findPreviousAndSelect(e,t,r){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findPreviousWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(n,t?.decorations,r?.noScroll)}_selectResult(e,t,r){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!e)return this._terminal.clearSelection(),!1;if(this._terminal.select(e.col,e.row,e.size),t){let n=this._decorationManager.createActiveDecoration(e,t);n&&(this._resultTracker.selectedDecoration=n)}if(!r&&(e.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||e.row<this._terminal.buffer.active.viewportY)){let n=e.row-this._terminal.buffer.active.viewportY;n-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(n)}return!0}};var Hz=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],wye=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Lr;function Sye(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var kye=class{constructor(){if(this.version="6",!Lr){Lr=new Uint8Array(65536),Lr.fill(1),Lr[0]=0,Lr.fill(0,1,32),Lr.fill(0,127,160),Lr.fill(2,4352,4448),Lr[9001]=2,Lr[9002]=2,Lr.fill(2,11904,42192),Lr[12351]=1,Lr.fill(2,44032,55204),Lr.fill(2,63744,64256),Lr.fill(2,65040,65050),Lr.fill(2,65072,65136),Lr.fill(2,65280,65377),Lr.fill(2,65504,65511);for(let e=0;e<Hz.length;++e)Lr.fill(0,Hz[e][0],Hz[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Lr[e]:Sye(e,wye)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=Mk.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return Mk.createPropertyValue(0,r,n)}},Cye=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?tY.isErrorNoTelemetry(e)?new tY(e.message+`
156
+
157
+ `+e.stack):new Error(e.message+`
158
+
159
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Pye=new Cye;function Wz(e){Dye(e)||Pye.onUnexpectedError(e)}var qz="Canceled";function Dye(e){return e instanceof Rye?!0:e instanceof Error&&e.name===qz&&e.message===qz}var Rye=class extends Error{constructor(){super(qz),this.name=this.message}},tY=class Kz extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Kz)return t;let r=new Kz;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function Eye(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}function Tye(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var $ye=class dY{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(dY.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=Tye(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};$ye.assertInvariants=!1;var Xz;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Xz||(Xz={}));function Aye(e,t){return(r,n)=>t(e(r),e(n))}var Oye=(e,t)=>e-t,rY=class Qz{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new Qz(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new Qz(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||Xz.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};rY.empty=new rY(e=>{});function zye(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var oY,nY,cxt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[oY]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(nY=Symbol.iterator,oY=Symbol.toStringTag,nY)](){return this.values()}},Nye=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}},Yz;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*h(...I){for(let S of I)yield*S}e.concat=h;function b(I,S,w){let P=w;for(let E of I)P=S(P,E);return P}e.reduce=b;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let E=0;E<S;E++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(Yz||(Yz={}));var Fye=!1,ch=null,Lye=class uY{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:uY.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
160
+ `).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new Nye;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
161
+ `),l)}n.sort(Aye(l=>l.idx,Oye));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
162
+ `)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
163
+ `)),p=zye([...m].map(h=>o(h)[u]),h=>h);delete p[c[u]];for(let[h,b]of Object.entries(p))d.unshift(` - stacktraces of ${b.length} other leaks continue with ${h}`);d.unshift(f)}a+=`
164
+
165
+
166
+ ==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
167
+ ${d.join(`
168
+ `)}
169
+ ============================================================
170
+
171
+ `}return n.length>t&&(a+=`
172
+
173
+
174
+ ... and ${n.length-t} more leaking disposables
175
+
176
+ `),{leaks:n,details:a}}};Lye.idx=0;function Mye(e){ch=e}if(Fye){let e="__is_disposable_tracked__";Mye(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==dh.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==dh.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function n3(e){return ch?.trackDisposable(e),e}function i3(e){ch?.markAsDisposed(e)}function Jz(e,t){ch?.setParent(e,t)}function Bye(e,t){if(ch)for(let r of e)ch.setParent(r,t)}function fY(e){if(Yz.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function jye(...e){let t=mY(()=>fY(e));return Bye(e,t),t}function mY(e){let t=n3({dispose:Eye(()=>{i3(t),e()})});return t}var pY=class hY{constructor(){this._toDispose=new Set,this._isDisposed=!1,n3(this)}dispose(){this._isDisposed||(i3(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{fY(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Jz(t,this),this._isDisposed?hY.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Jz(t,null))}};pY.DISABLE_DISPOSED_WARNING=!1;var a3=pY,dh=class{constructor(){this._store=new a3,n3(this),Jz(this._store,this)}dispose(){i3(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};dh.None=Object.freeze({dispose(){}});var iY=class e3{constructor(t){this.element=t,this.next=e3.Undefined,this.prev=e3.Undefined}};iY.Undefined=new iY(void 0);var Uye=globalThis.performance&&typeof globalThis.performance.now=="function",Vye=class gY{static create(t){return new gY(t)}constructor(t){this._now=Uye&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Hye=!1,aY=!1,Wye=!1,sY;(e=>{e.None=()=>dh.None;function t(T){if(Wye){let{onDidAddListener:k}=T,$=o3.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),$.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,$=null,C)=>{let A=!1,D;return D=T(N=>{if(!A)return D?D.dispose():A=!0,k.call($,N)},null,C),A&&D.dispose(),D}}e.once=n;function o(T,k,$){return d((C,A=null,D)=>T(N=>C.call(A,k(N)),null,D),$)}e.map=o;function i(T,k,$){return d((C,A=null,D)=>T(N=>{k(N),C.call(A,N)},null,D),$)}e.forEach=i;function a(T,k,$){return d((C,A=null,D)=>T(N=>k(N)&&C.call(A,N),null,D),$)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,$=null,C)=>{let A=jye(...T.map(D=>D(N=>k.call($,N))));return u(A,C)}}e.any=l;function c(T,k,$,C){let A=$;return o(T,D=>(A=k(A,D),A),C)}e.reduce=c;function d(T,k){let $,C={onWillAddFirstListener(){$=T(A.fire,A)},onDidRemoveLastListener(){$?.dispose()}};k||t(C);let A=new Hc(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,$=100,C=!1,A=!1,D,N){let U,G,re,he=0,me,Q={leakWarningThreshold:D,onWillAddFirstListener(){U=T(Ie=>{he++,G=k(G,Ie),C&&!re&&(oe.fire(G),G=void 0),me=()=>{let se=G;G=void 0,re=void 0,(!C||he>1)&&oe.fire(se),he=0},typeof $=="number"?(clearTimeout(re),re=setTimeout(me,$)):re===void 0&&(re=0,queueMicrotask(me))})},onWillRemoveListener(){A&&he>0&&me?.()},onDidRemoveLastListener(){me=void 0,U.dispose()}};N||t(Q);let oe=new Hc(Q);return N?.add(oe),oe.event}e.debounce=f;function m(T,k=0,$){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,$)}e.accumulate=m;function p(T,k=(C,A)=>C===A,$){let C=!0,A;return a(T,D=>{let N=C||!k(D,A);return C=!1,A=D,N},$)}e.latch=p;function h(T,k,$){return[e.filter(T,k,$),e.filter(T,C=>!k(C),$)]}e.split=h;function b(T,k=!1,$=[],C){let A=$.slice(),D=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(D);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new Hc({onWillAddFirstListener(){D||(D=T(G=>U.fire(G)),C&&C.add(D))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){D&&D.dispose(),D=null}});return C&&C.add(U),U.event}e.buffer=b;function v(T,k){return($,C,A)=>{let D=k(new _);return T(function(N){let U=D.evaluate(N);U!==x&&$.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push($=>(k($),$)),this}filter(k){return this.steps.push($=>k($)?$:x),this}reduce(k,$){let C=$;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=($,C)=>$===C){let $=!0,C;return this.steps.push(A=>{let D=$||!k(A,C);return $=!1,C=A,D?A:x}),this}evaluate(k){for(let $ of this.steps)if(k=$(k),k===x)break;return k}}function I(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.on(k,C),D=()=>T.removeListener(k,C),N=new Hc({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromNodeEventEmitter=I;function S(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.addEventListener(k,C),D=()=>T.removeEventListener(k,C),N=new Hc({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new Hc;return T.then($=>{k.fire($)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function E(T,k){return T($=>k.fire($))}e.forward=E;function B(T,k,$){return k($),T(C=>k(C))}e.runAndSubscribe=B;class H{constructor(k,$){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};$||t(C),this.emitter=new Hc(C),$&&$.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,$){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Z(T,k){return new H(T,k).emitter.event}e.fromObservable=Z;function K(T){return(k,$,C)=>{let A=0,D=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),D&&(D=!1,k.call($)))},handlePossibleChange(){},handleChange(){D=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof a3?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(sY||(sY={}));var t3=class r3{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${r3._idPool++}`,r3.all.add(this)}start(t){this._stopWatch=new Vye,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};t3.all=new Set,t3._idPool=0;var Zye=t3,lY=-1,vY=class xY{constructor(t,r,n=(xY._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new qye(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};vY._idPool=1;var Gye=vY,o3=class bY{constructor(t){this.value=t}static create(){let t=new Error;return new bY(t.stack??"")}print(){console.warn(this.value.split(`
177
+ `).slice(2).join(`
178
+ `))}},qye=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Kye=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},Xye=0,Nk=class{constructor(e){this.value=e,this.id=Xye++}},Qye=2,Yye=(e,t)=>{if(e instanceof Nk)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},Fk;if(Hye){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
179
+ `)),e.length=0)},3e3),Fk=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var Hc=class{constructor(e){this._size=0,this._options=e,this._leakageMon=lY>0||this._options?.leakWarningThreshold?new Gye(e?.onListenerError??Wz,this._options?.leakWarningThreshold??lY):void 0,this._perfMon=this._options?._profName?new Zye(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(aY){let e=this._listeners;queueMicrotask(()=>{Yye(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Kye(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Wz)(c),dh.None}if(this._disposed)return dh.None;t&&(e=e.bind(t));let n=new Nk(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=o3.create(),o=this._leakageMon.check(n.stack,this._size+1)),aY&&(n.stack=i??o3.create()),this._listeners?this._listeners instanceof Nk?(this._deliveryQueue??(this._deliveryQueue=new Jye),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=mY(()=>{Fk?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof a3?r.add(a):Array.isArray(r)&&r.push(a),Fk){let s=new Error().stack.split(`
180
+ `).slice(2,3).join(`
181
+ `).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);Fk.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*Qye<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||Wz;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Nk)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},Jye=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Mk=class Lk{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Hc,this.onChange=this._onChange.event;let t=new kye;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,o=t.length;for(let i=0;i<o;++i){let a=t.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=o)return r+this.wcwidth(a);let c=t.charCodeAt(i);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let s=this.charProperties(a,n),l=Lk.extractWidth(s);Lk.extractShouldJoin(s)&&(l-=Lk.extractWidth(n)),r+=l,n=s}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},Zz=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],e_e=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],Gz=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],t_e=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]],ll;function cY(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var r_e=class{constructor(){if(this.version="11",!ll){ll=new Uint8Array(65536),ll.fill(1),ll[0]=0,ll.fill(0,1,32),ll.fill(0,127,160);for(let e=0;e<Zz.length;++e)ll.fill(0,Zz[e][0],Zz[e][1]+1);for(let e=0;e<Gz.length;++e)ll.fill(2,Gz[e][0],Gz[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?ll[e]:cY(e,e_e)?0:cY(e,t_e)?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=Mk.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return Mk.createPropertyValue(0,r,n)}},yY=class{activate(e){e.unicode.register(new r_e)}dispose(){}};var o_e=class{constructor(e,t,r,n={}){this._terminal=e,this._regex=t,this._handler=r,this._options=n}provideLinks(e,t){let r=i_e.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(r))}_addCallbacks(e){return e.map(t=>(t.leave=this._options.leave,t.hover=(r,n)=>{if(this._options.hover){let{range:o}=t;this._options.hover(r,n,o)}},t))}};function n_e(e){try{let t=new URL(e),r=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(r.toLocaleLowerCase())}catch{return!1}}var i_e=class Bk{static computeLink(t,r,n,o){let i=new RegExp(r.source,(r.flags||"")+"g"),[a,s]=Bk._getWindowedLineStrings(t-1,n),l=a.join(""),c,d=[];for(;c=i.exec(l);){let u=c[0];if(!n_e(u))continue;let[f,m]=Bk._mapStrIdx(n,s,0,c.index),[p,h]=Bk._mapStrIdx(n,f,m,u.length);if(f===-1||m===-1||p===-1||h===-1)continue;let b={start:{x:m+1,y:f+1},end:{x:h,y:p+1}};d.push({range:b,text:u,activate:o})}return d}static _getWindowedLineStrings(t,r){let n,o=t,i=t,a=0,s="",l=[];if(n=r.buffer.active.getLine(t)){let c=n.translateToString(!0);if(n.isWrapped&&c[0]!==" "){for(a=0;(n=r.buffer.active.getLine(--o))&&a<2048&&(s=n.translateToString(!0),a+=s.length,l.push(s),!(!n.isWrapped||s.indexOf(" ")!==-1)););l.reverse()}for(l.push(c),a=0;(n=r.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(s=n.translateToString(!0),a+=s.length,l.push(s),s.indexOf(" ")===-1););}return[l,o]}static _mapStrIdx(t,r,n,o){let i=t.buffer.active,a=i.getNullCell(),s=n;for(;o;){let l=i.getLine(r);if(!l)return[-1,-1];for(let c=s;c<l.length;++c){l.getCell(c,a);let d=a.getChars();if(a.getWidth()&&(o-=d.length||1,c===l.length-1&&d==="")){let u=i.getLine(r+1);u&&u.isWrapped&&(u.getCell(0,a),a.getWidth()===2&&(o+=1))}if(o<0)return[r,c]}r++,s=0}return[r,s]}},a_e=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function s_e(e,t){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}var _Y=class{constructor(e=s_e,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,r=t.urlRegex||a_e;this._linkProvider=this._terminal.registerLinkProvider(new o_e(this._terminal,r,this._handler,t))}dispose(){this._linkProvider?.dispose()}};var DJ=Object.defineProperty,l_e=Object.getOwnPropertyDescriptor,c_e=(e,t)=>{for(var r in t)DJ(e,r,{get:t[r],enumerable:!0})},vr=(e,t,r,n)=>{for(var o=n>1?void 0:n?l_e(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&DJ(t,r,o),o},be=(e,t)=>(r,n)=>t(r,n,e),IY="Terminal input",w3={get:()=>IY,set:e=>IY=e},wY="Too much output to announce, navigate to rows manually to read",S3={get:()=>wY,set:e=>wY=e};function d_e(e){return e.replace(/\r?\n/g,"\r")}function u_e(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function f_e(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function m_e(e,t,r,n){if(e.stopPropagation(),e.clipboardData){let o=e.clipboardData.getData("text/plain");RJ(o,t,r,n)}}function RJ(e,t,r,n){e=d_e(e),e=u_e(e,r.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(e,!0),t.value=""}function EJ(e,t,r){let n=r.getBoundingClientRect(),o=e.clientX-n.left-10,i=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${o}px`,t.style.top=`${i}px`,t.style.zIndex="1000",t.focus()}function SY(e,t,r,n,o){EJ(e,t,r),o&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function Kc(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function cC(e,t=0,r=e.length){let n="";for(let o=t;o<r;++o){let i=e[o];i>65535?(i-=65536,n+=String.fromCharCode((i>>10)+55296)+String.fromCharCode(i%1024+56320)):n+=String.fromCharCode(i)}return n}var p_e=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let r=e.length;if(!r)return 0;let n=0,o=0;if(this._interim){let i=e.charCodeAt(o++);56320<=i&&i<=57343?t[n++]=(this._interim-55296)*1024+i-56320+65536:(t[n++]=this._interim,t[n++]=i),this._interim=0}for(let i=o;i<r;++i){let a=e.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=r)return this._interim=a,n;let s=e.charCodeAt(i);56320<=s&&s<=57343?t[n++]=(a-55296)*1024+s-56320+65536:(t[n++]=a,t[n++]=s);continue}a!==65279&&(t[n++]=a)}return n}},h_e=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let r=e.length;if(!r)return 0;let n=0,o,i,a,s,l=0,c=0;if(this.interim[0]){let f=!1,m=this.interim[0];m&=(m&224)===192?31:(m&240)===224?15:7;let p=0,h;for(;(h=this.interim[++p]&63)&&p<4;)m<<=6,m|=h;let b=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,v=b-p;for(;c<v;){if(c>=r)return 0;if(h=e[c++],(h&192)!==128){c--,f=!0;break}else this.interim[p++]=h,m<<=6,m|=h&63}f||(b===2?m<128?c--:t[n++]=m:b===3?m<2048||m>=55296&&m<=57343||m===65279||(t[n++]=m):m<65536||m>1114111||(t[n++]=m)),this.interim.fill(0)}let d=r-4,u=c;for(;u<r;){for(;u<d&&!((o=e[u])&128)&&!((i=e[u+1])&128)&&!((a=e[u+2])&128)&&!((s=e[u+3])&128);)t[n++]=o,t[n++]=i,t[n++]=a,t[n++]=s,u+=4;if(o=e[u++],o<128)t[n++]=o;else if((o&224)===192){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(l=(o&31)<<6|i&63,l<128){u--;continue}t[n++]=l}else if((o&240)===224){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,n;if(a=e[u++],(a&192)!==128){u--;continue}if(l=(o&15)<<12|(i&63)<<6|a&63,l<2048||l>=55296&&l<=57343||l===65279)continue;t[n++]=l}else if((o&248)===240){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,n;if(a=e[u++],(a&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,this.interim[2]=a,n;if(s=e[u++],(s&192)!==128){u--;continue}if(l=(o&7)<<18|(i&63)<<12|(a&63)<<6|s&63,l<65536||l>1114111)continue;t[n++]=l}}return n}},TJ="",Xc=" ",Eb=class $J{constructor(){this.fg=0,this.bg=0,this.extended=new eC}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new $J;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},eC=class AJ{constructor(t=0,r=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new AJ(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Ei=class OJ extends Eb{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new eC,this.combinedData=""}static fromCharData(t){let r=new OJ;return r.setFromCharData(t),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Kc(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let r=!1;if(t[1].length>2)r=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let o=t[1].charCodeAt(1);56320<=o&&o<=57343?this.content=(n-55296)*1024+o-56320+65536|t[2]<<22:r=!0}else r=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;r&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},kY="di$target",k3="di$dependencies",s3=new Map;function g_e(e){return e[k3]||[]}function no(e){if(s3.has(e))return s3.get(e);let t=function(r,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");v_e(t,r,o)};return t._id=e,s3.set(e,t),t}function v_e(e,t,r){t[kY]===t?t[k3].push({id:e,index:r}):(t[k3]=[{id:e,index:r}],t[kY]=t)}var an=no("BufferService"),zJ=no("CoreMouseService"),Qu=no("CoreService"),x_e=no("CharsetService"),uN=no("InstantiationService"),NJ=no("LogService"),sn=no("OptionsService"),FJ=no("OscLinkService"),b_e=no("UnicodeService"),Tb=no("DecorationService"),C3=class{constructor(e,t,r){this._bufferService=e,this._optionsService=t,this._oscLinkService=r}provideLinks(e,t){let r=this._bufferService.buffer.lines.get(e-1);if(!r){t(void 0);return}let n=[],o=this._optionsService.rawOptions.linkHandler,i=new Ei,a=r.getTrimmedLength(),s=-1,l=-1,c=!1;for(let d=0;d<a;d++)if(!(l===-1&&!r.hasContent(d))){if(r.loadCell(d,i),i.hasExtendedAttrs()&&i.extended.urlId)if(l===-1){l=d,s=i.extended.urlId;continue}else c=i.extended.urlId!==s;else l!==-1&&(c=!0);if(c||l!==-1&&d===a-1){let u=this._oscLinkService.getLinkData(s)?.uri;if(u){let f={start:{x:l+1,y:e},end:{x:d+(!c&&d===a-1?1:0),y:e}},m=!1;if(!o?.allowNonHttpProtocols)try{let p=new URL(u);["http:","https:"].includes(p.protocol)||(m=!0)}catch{m=!0}m||n.push({text:u,range:f,activate:(p,h)=>o?o.activate(p,h,f):y_e(p,h),hover:(p,h)=>o?.hover?.(p,h,f),leave:(p,h)=>o?.leave?.(p,h,f)})}c=!1,i.hasExtendedAttrs()&&i.extended.urlId?(l=d,s=i.extended.urlId):(l=-1,s=-1)}}t(n)}};C3=vr([be(0,an),be(1,sn),be(2,FJ)],C3);function y_e(e,t){if(confirm(`Do you want to navigate to ${t}?
182
+
183
+ WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var dC=no("CharSizeService"),ml=no("CoreBrowserService"),fN=no("MouseService"),pl=no("RenderService"),__e=no("SelectionService"),LJ=no("CharacterJoinerService"),ph=no("ThemeService"),MJ=no("LinkProviderService"),I_e=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?CY.isErrorNoTelemetry(e)?new CY(e.message+`
184
+
185
+ `+e.stack):new Error(e.message+`
186
+
187
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},w_e=new I_e;function Zk(e){S_e(e)||w_e.onUnexpectedError(e)}var P3="Canceled";function S_e(e){return e instanceof k_e?!0:e instanceof Error&&e.name===P3&&e.message===P3}var k_e=class extends Error{constructor(){super(P3),this.name=this.message}};function C_e(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}var CY=class D3 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof D3)return t;let r=new D3;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},R3=class BJ extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,BJ.prototype)}};function P_e(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var D_e=class jJ{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(jJ.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=P_e(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};D_e.assertInvariants=!1;function qn(e,t=0){return e[e.length-(1+t)]}var E3;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(E3||(E3={}));function R_e(e,t){return(r,n)=>t(e(r),e(n))}var E_e=(e,t)=>e-t,PY=class T3{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new T3(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new T3(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||E3.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};PY.empty=new PY(e=>{});function T_e(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var DY,RY,Dxt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[DY]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(RY=Symbol.iterator,DY=Symbol.toStringTag,RY)](){return this.values()}},$_e=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function A_e(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}var $3;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*h(...I){for(let S of I)yield*S}e.concat=h;function b(I,S,w){let P=w;for(let E of I)P=S(P,E);return P}e.reduce=b;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let E=0;E<S;E++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})($3||($3={}));var O_e=!1,qu=null,z_e=class UJ{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:UJ.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
188
+ `).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new $_e;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
189
+ `),l)}n.sort(R_e(l=>l.idx,E_e));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
190
+ `)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
191
+ `)),p=T_e([...m].map(h=>o(h)[u]),h=>h);delete p[c[u]];for(let[h,b]of Object.entries(p))d.unshift(` - stacktraces of ${b.length} other leaks continue with ${h}`);d.unshift(f)}a+=`
192
+
193
+
194
+ ==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
195
+ ${d.join(`
196
+ `)}
197
+ ============================================================
198
+
199
+ `}return n.length>t&&(a+=`
200
+
201
+
202
+ ... and ${n.length-t} more leaking disposables
203
+
204
+ `),{leaks:n,details:a}}};z_e.idx=0;function N_e(e){qu=e}if(O_e){let e="__is_disposable_tracked__";N_e(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==qe.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==qe.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function uC(e){return qu?.trackDisposable(e),e}function fC(e){qu?.markAsDisposed(e)}function Cb(e,t){qu?.setParent(e,t)}function F_e(e,t){if(qu)for(let r of e)qu.setParent(r,t)}function EY(e){return qu?.markAsSingleton(e),e}function Ku(e){if($3.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function L_e(...e){let t=qt(()=>Ku(e));return F_e(e,t),t}function qt(e){let t=uC({dispose:A_e(()=>{fC(t),e()})});return t}var VJ=class HJ{constructor(){this._toDispose=new Set,this._isDisposed=!1,uC(this)}dispose(){this._isDisposed||(fC(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ku(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Cb(t,this),this._isDisposed?HJ.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Cb(t,null))}};VJ.DISABLE_DISPOSED_WARNING=!1;var Qc=VJ,qe=class{constructor(){this._store=new Qc,uC(this),Cb(this._store,this)}dispose(){fC(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};qe.None=Object.freeze({dispose(){}});var mh=class{constructor(){this._isDisposed=!1,uC(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Cb(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,fC(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Cb(e,null),e}},Qn=typeof window=="object"?window:globalThis,A3=class O3{constructor(t){this.element=t,this.next=O3.Undefined,this.prev=O3.Undefined}};A3.Undefined=new A3(void 0);var fr=A3,TY=class{constructor(){this._first=fr.Undefined,this._last=fr.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===fr.Undefined}clear(){let e=this._first;for(;e!==fr.Undefined;){let t=e.next;e.prev=fr.Undefined,e.next=fr.Undefined,e=t}this._first=fr.Undefined,this._last=fr.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new fr(e);if(this._first===fr.Undefined)this._first=r,this._last=r;else if(t){let o=this._last;this._last=r,r.prev=o,o.next=r}else{let o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==fr.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==fr.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==fr.Undefined&&e.next!==fr.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===fr.Undefined&&e.next===fr.Undefined?(this._first=fr.Undefined,this._last=fr.Undefined):e.next===fr.Undefined?(this._last=this._last.prev,this._last.next=fr.Undefined):e.prev===fr.Undefined&&(this._first=this._first.next,this._first.prev=fr.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==fr.Undefined;)yield e.element,e=e.next}},M_e=globalThis.performance&&typeof globalThis.performance.now=="function",B_e=class WJ{static create(t){return new WJ(t)}constructor(t){this._now=M_e&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},j_e=!1,$Y=!1,U_e=!1,oo;(e=>{e.None=()=>qe.None;function t(T){if(U_e){let{onDidAddListener:k}=T,$=F3.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),$.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,$=null,C)=>{let A=!1,D;return D=T(N=>{if(!A)return D?D.dispose():A=!0,k.call($,N)},null,C),A&&D.dispose(),D}}e.once=n;function o(T,k,$){return d((C,A=null,D)=>T(N=>C.call(A,k(N)),null,D),$)}e.map=o;function i(T,k,$){return d((C,A=null,D)=>T(N=>{k(N),C.call(A,N)},null,D),$)}e.forEach=i;function a(T,k,$){return d((C,A=null,D)=>T(N=>k(N)&&C.call(A,N),null,D),$)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,$=null,C)=>{let A=L_e(...T.map(D=>D(N=>k.call($,N))));return u(A,C)}}e.any=l;function c(T,k,$,C){let A=$;return o(T,D=>(A=k(A,D),A),C)}e.reduce=c;function d(T,k){let $,C={onWillAddFirstListener(){$=T(A.fire,A)},onDidRemoveLastListener(){$?.dispose()}};k||t(C);let A=new le(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,$=100,C=!1,A=!1,D,N){let U,G,re,he=0,me,Q={leakWarningThreshold:D,onWillAddFirstListener(){U=T(Ie=>{he++,G=k(G,Ie),C&&!re&&(oe.fire(G),G=void 0),me=()=>{let se=G;G=void 0,re=void 0,(!C||he>1)&&oe.fire(se),he=0},typeof $=="number"?(clearTimeout(re),re=setTimeout(me,$)):re===void 0&&(re=0,queueMicrotask(me))})},onWillRemoveListener(){A&&he>0&&me?.()},onDidRemoveLastListener(){me=void 0,U.dispose()}};N||t(Q);let oe=new le(Q);return N?.add(oe),oe.event}e.debounce=f;function m(T,k=0,$){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,$)}e.accumulate=m;function p(T,k=(C,A)=>C===A,$){let C=!0,A;return a(T,D=>{let N=C||!k(D,A);return C=!1,A=D,N},$)}e.latch=p;function h(T,k,$){return[e.filter(T,k,$),e.filter(T,C=>!k(C),$)]}e.split=h;function b(T,k=!1,$=[],C){let A=$.slice(),D=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(D);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new le({onWillAddFirstListener(){D||(D=T(G=>U.fire(G)),C&&C.add(D))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){D&&D.dispose(),D=null}});return C&&C.add(U),U.event}e.buffer=b;function v(T,k){return($,C,A)=>{let D=k(new _);return T(function(N){let U=D.evaluate(N);U!==x&&$.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push($=>(k($),$)),this}filter(k){return this.steps.push($=>k($)?$:x),this}reduce(k,$){let C=$;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=($,C)=>$===C){let $=!0,C;return this.steps.push(A=>{let D=$||!k(A,C);return $=!1,C=A,D?A:x}),this}evaluate(k){for(let $ of this.steps)if(k=$(k),k===x)break;return k}}function I(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.on(k,C),D=()=>T.removeListener(k,C),N=new le({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromNodeEventEmitter=I;function S(T,k,$=C=>C){let C=(...U)=>N.fire($(...U)),A=()=>T.addEventListener(k,C),D=()=>T.removeEventListener(k,C),N=new le({onWillAddFirstListener:A,onDidRemoveLastListener:D});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new le;return T.then($=>{k.fire($)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function E(T,k){return T($=>k.fire($))}e.forward=E;function B(T,k,$){return k($),T(C=>k(C))}e.runAndSubscribe=B;class H{constructor(k,$){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};$||t(C),this.emitter=new le(C),$&&$.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,$){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Z(T,k){return new H(T,k).emitter.event}e.fromObservable=Z;function K(T){return(k,$,C)=>{let A=0,D=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),D&&(D=!1,k.call($)))},handlePossibleChange(){},handleChange(){D=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof Qc?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(oo||(oo={}));var z3=class N3{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${N3._idPool++}`,N3.all.add(this)}start(t){this._stopWatch=new B_e,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};z3.all=new Set,z3._idPool=0;var V_e=z3,AY=-1,ZJ=class GJ{constructor(t,r,n=(GJ._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new W_e(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};ZJ._idPool=1;var H_e=ZJ,F3=class qJ{constructor(t){this.value=t}static create(){let t=new Error;return new qJ(t.stack??"")}print(){console.warn(this.value.split(`
205
+ `).slice(2).join(`
206
+ `))}},W_e=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Z_e=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},G_e=0,Gk=class{constructor(e){this.value=e,this.id=G_e++}},q_e=2,K_e=(e,t)=>{if(e instanceof Gk)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},qk;if(j_e){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
207
+ `)),e.length=0)},3e3),qk=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var le=class{constructor(e){this._size=0,this._options=e,this._leakageMon=AY>0||this._options?.leakWarningThreshold?new H_e(e?.onListenerError??Zk,this._options?.leakWarningThreshold??AY):void 0,this._perfMon=this._options?._profName?new V_e(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if($Y){let e=this._listeners;queueMicrotask(()=>{K_e(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Z_e(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Zk)(c),qe.None}if(this._disposed)return qe.None;t&&(e=e.bind(t));let n=new Gk(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=F3.create(),o=this._leakageMon.check(n.stack,this._size+1)),$Y&&(n.stack=i??F3.create()),this._listeners?this._listeners instanceof Gk?(this._deliveryQueue??(this._deliveryQueue=new X_e),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=qt(()=>{qk?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof Qc?r.add(a):Array.isArray(r)&&r.push(a),qk){let s=new Error().stack.split(`
208
+ `).slice(2,3).join(`
209
+ `).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);qk.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*q_e<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||Zk;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Gk)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},X_e=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},L3=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new le,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new le,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,r){if(this.getZoomLevel(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,r){this.mapWindowIdToZoomFactor.set(this.getWindowId(r),t)}setFullscreen(t,r){if(this.isFullscreen(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};L3.INSTANCE=new L3;var mN=L3;function Q_e(e,t,r){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",r)}var Ext=mN.INSTANCE.onDidChangeZoomLevel;function Y_e(e){return mN.INSTANCE.getZoomFactor(e)}var Txt=mN.INSTANCE.onDidChangeFullscreen,hh=typeof navigator=="object"?navigator.userAgent:"",M3=hh.indexOf("Firefox")>=0,Kk=hh.indexOf("AppleWebKit")>=0,pN=hh.indexOf("Chrome")>=0,KJ=!pN&&hh.indexOf("Safari")>=0,$xt=hh.indexOf("Electron/")>=0,Axt=hh.indexOf("Android")>=0,Xk=!1;if(typeof Qn.matchMedia=="function"){let e=Qn.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=Qn.matchMedia("(display-mode: fullscreen)");Xk=e.matches,Q_e(Qn,e,({matches:r})=>{Xk&&t.matches||(Xk=r)})}function J_e(){return Xk}var fh="en",tC=!1,rC=!1,Ib=!1,eIe=!1,XJ=!1,QJ=!1,tIe=!1,rIe=!1,oIe=!1,nIe=!1,jk,Qk=fh,OY=fh,iIe,dl,fl=globalThis,Xn;typeof fl.vscode<"u"&&typeof fl.vscode.process<"u"?Xn=fl.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Xn=process);var YJ=typeof Xn?.versions?.electron=="string",aIe=YJ&&Xn?.type==="renderer";if(typeof Xn=="object"){tC=Xn.platform==="win32",rC=Xn.platform==="darwin",Ib=Xn.platform==="linux",eIe=Ib&&!!Xn.env.SNAP&&!!Xn.env.SNAP_REVISION,tIe=YJ,oIe=!!Xn.env.CI||!!Xn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,jk=fh,Qk=fh;let e=Xn.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);jk=t.userLocale,OY=t.osLocale,Qk=t.resolvedLanguage||fh,iIe=t.languagePack?.translationsConfigFile}catch{}XJ=!0}else typeof navigator=="object"&&!aIe?(dl=navigator.userAgent,tC=dl.indexOf("Windows")>=0,rC=dl.indexOf("Macintosh")>=0,rIe=(dl.indexOf("Macintosh")>=0||dl.indexOf("iPad")>=0||dl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ib=dl.indexOf("Linux")>=0,nIe=dl?.indexOf("Mobi")>=0,QJ=!0,Qk=globalThis._VSCODE_NLS_LANGUAGE||fh,jk=navigator.language.toLowerCase(),OY=jk):console.error("Unable to resolve platform.");var l3=0;rC?l3=1:tC?l3=3:Ib&&(l3=2);var JJ=tC,cs=rC,sIe=Ib,c3=XJ,lIe=QJ&&typeof fl.importScripts=="function",Oxt=lIe?fl.origin:void 0,ds=dl,Wc=Qk,zY;(e=>{function t(){return Wc}e.value=t;function r(){return Wc.length===2?Wc==="en":Wc.length>=3?Wc[0]==="e"&&Wc[1]==="n"&&Wc[2]==="-":!1}e.isDefaultVariant=r;function n(){return Wc==="en"}e.isDefault=n})(zY||(zY={}));var cIe=typeof fl.postMessage=="function"&&!fl.importScripts,dIe=(()=>{if(cIe){let e=[];fl.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=e.length;n<o;n++){let i=e[n];if(i.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),i.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),fl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),uIe=!!(ds&&ds.indexOf("Chrome")>=0),zxt=!!(ds&&ds.indexOf("Firefox")>=0),Nxt=!!(!uIe&&ds&&ds.indexOf("Safari")>=0),Fxt=!!(ds&&ds.indexOf("Edg/")>=0),Lxt=!!(ds&&ds.indexOf("Android")>=0),Zc=typeof navigator=="object"?navigator:{},Mxt={clipboard:{writeText:c3||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(Zc&&Zc.clipboard&&Zc.clipboard.writeText),readText:c3||!!(Zc&&Zc.clipboard&&Zc.clipboard.readText)},keyboard:c3||J_e()?0:Zc.keyboard||KJ?1:2,touch:"ontouchstart"in Qn||Zc.maxTouchPoints>0,pointerEvents:Qn.PointerEvent&&("ontouchstart"in Qn||navigator.maxTouchPoints>0)},hN=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},d3=new hN,NY=new hN,FY=new hN,fIe=new Array(230),B3;(e=>{function t(s){return d3.keyCodeToStr(s)}e.toString=t;function r(s){return d3.strToKeyCode(s)}e.fromString=r;function n(s){return NY.keyCodeToStr(s)}e.toUserSettingsUS=n;function o(s){return FY.keyCodeToStr(s)}e.toUserSettingsGeneral=o;function i(s){return NY.strToKeyCode(s)||FY.strToKeyCode(s)}e.fromUserSettings=i;function a(s){if(s>=98&&s<=113)return null;switch(s){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return d3.keyCodeToStr(s)}e.toElectronAccelerator=a})(B3||(B3={}));var mIe=class eee{constructor(t,r,n,o,i){this.ctrlKey=t,this.shiftKey=r,this.altKey=n,this.metaKey=o,this.keyCode=i}equals(t){return t instanceof eee&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",n=this.altKey?"1":"0",o=this.metaKey?"1":"0";return`K${t}${r}${n}${o}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new pIe([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},pIe=class{constructor(e){if(e.length===0)throw C_e("chords");this.chords=e}getHashCode(){let e="";for(let t=0,r=this.chords.length;t<r;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function hIe(e){if(e.charCode){let r=String.fromCharCode(e.charCode).toUpperCase();return B3.fromString(r)}let t=e.keyCode;if(t===3)return 7;if(M3)switch(t){case 59:return 85;case 60:if(sIe)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(cs)return 57;break}else if(Kk&&(cs&&t===93||!cs&&t===92))return 57;return fIe[t]||0}var gIe=cs?256:2048,vIe=512,xIe=1024,bIe=cs?2048:256,j3=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=hIe(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=gIe),this.altKey&&(t|=vIe),this.shiftKey&&(t|=xIe),this.metaKey&&(t|=bIe),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new mIe(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},LY=new WeakMap;function yIe(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,r=e.parent.location;if(t.origin!=="null"&&r.origin!=="null"&&t.origin!==r.origin)return null}catch{return null}return e.parent}var _Ie=class{static getSameOriginWindowChain(e){let t=LY.get(e);if(!t){t=[],LY.set(e,t);let r=e,n;do n=yIe(r),n?t.push({window:new WeakRef(r),iframeElement:r.frameElement||null}):t.push({window:new WeakRef(r),iframeElement:null}),r=n;while(r)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let r=0,n=0,o=this.getSameOriginWindowChain(e);for(let i of o){let a=i.window.deref();if(r+=a?.scrollY??0,n+=a?.scrollX??0,a===t||!i.iframeElement)break;let s=i.iframeElement.getBoundingClientRect();r+=s.top,n+=s.left}return{top:r,left:n}}},gb=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let r=_Ie.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=r.left,this.posy-=r.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},MY=class{constructor(e,t=0,r=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=r,this.deltaX=t;let n=!1;if(pN){let o=navigator.userAgent.match(/Chrome\/(\d+)/);n=(o?parseInt(o[1]):123)<=122}if(e){let o=e,i=e,a=e.view?.devicePixelRatio||1;if(typeof o.wheelDeltaY<"u")n?this.deltaY=o.wheelDeltaY/(120*a):this.deltaY=o.wheelDeltaY/120;else if(typeof i.VERTICAL_AXIS<"u"&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if(e.type==="wheel"){let s=e;s.deltaMode===s.DOM_DELTA_LINE?M3&&!cs?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof o.wheelDeltaX<"u")KJ&&JJ?this.deltaX=-(o.wheelDeltaX/120):n?this.deltaX=o.wheelDeltaX/(120*a):this.deltaX=o.wheelDeltaX/120;else if(typeof i.HORIZONTAL_AXIS<"u"&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let s=e;s.deltaMode===s.DOM_DELTA_LINE?M3&&!cs?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*a):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},tee=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),BY;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof IIe?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:oo.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:tee})})(BY||(BY={}));var IIe=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?tee:(this._emitter||(this._emitter=new le),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var gN=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new R3("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new R3("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},wIe=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,r=globalThis){if(this.isDisposed)throw new R3("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=r.setInterval(()=>{e()},t);this.disposable=qt(()=>{r.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},SIe,u3;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?u3=(e,t)=>{dIe(()=>{if(r)return;let n=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:u3=(e,t,r)=>{let n=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},SIe=e=>u3(globalThis,e)})();var jY;(e=>{async function t(n){let o,i=await Promise.all(n.map(a=>a.then(s=>s,s=>{o||(o=s)})));if(typeof o<"u")throw o;return i}e.settled=t;function r(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(a){i(a)}})}e.withAsyncBody=r})(jY||(jY={}));var UY=class Di{static fromArray(t){return new Di(r=>{r.emitMany(t)})}static fromPromise(t){return new Di(async r=>{r.emitMany(await t)})}static fromPromises(t){return new Di(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new Di(async r=>{await Promise.all(t.map(async n=>{for await(let o of n)r.emitOne(o)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new le,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await oo.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new Di(async n=>{for await(let o of t)n.emitOne(r(o))})}map(t){return Di.map(this,t)}static filter(t,r){return new Di(async n=>{for await(let o of t)r(o)&&n.emitOne(o)})}filter(t){return Di.filter(this,t)}static coalesce(t){return Di.filter(t,r=>!!r)}coalesce(){return Di.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return Di.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};UY.EMPTY=UY.fromArray([]);function kIe(e){return 55296<=e&&e<=56319}function VY(e){return 56320<=e&&e<=57343}function CIe(e,t){return(e-55296<<10)+(t-56320)+65536}function PIe(e){return vN(e,0)}function vN(e,t){switch(typeof e){case"object":return e===null?ul(349,t):Array.isArray(e)?RIe(e,t):EIe(e,t);case"string":return ree(e,t);case"boolean":return DIe(e,t);case"number":return ul(e,t);case"undefined":return ul(937,t);default:return ul(617,t)}}function ul(e,t){return(t<<5)-t+e|0}function DIe(e,t){return ul(e?433:863,t)}function ree(e,t){t=ul(149417,t);for(let r=0,n=e.length;r<n;r++)t=ul(e.charCodeAt(r),t);return t}function RIe(e,t){return t=ul(104579,t),e.reduce((r,n)=>vN(n,r),t)}function EIe(e,t){return t=ul(181387,t),Object.keys(e).sort().reduce((r,n)=>(r=ree(n,r),vN(e[n],r)),t)}function f3(e,t,r=32){let n=r-t,o=~((1<<n)-1);return(e<<t|(o&e)>>>n)>>>0}function HY(e,t=0,r=e.byteLength,n=0){for(let o=0;o<r;o++)e[t+o]=n}function TIe(e,t,r="0"){for(;e.length<t;)e=r+e;return e}function cb(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join(""):TIe((e>>>0).toString(16),t/4)}var $Ie=class oee{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let r=t.length;if(r===0)return;let n=this._buff,o=this._buffLen,i=this._leftoverHighSurrogate,a,s;for(i!==0?(a=i,s=-1,i=0):(a=t.charCodeAt(0),s=0);;){let l=a;if(kIe(a))if(s+1<r){let c=t.charCodeAt(s+1);VY(c)?(s++,l=CIe(a,c)):l=65533}else{i=a;break}else VY(a)&&(l=65533);if(o=this._push(n,o,l),s++,s<r)a=t.charCodeAt(s);else break}this._buffLen=o,this._leftoverHighSurrogate=i}_push(t,r,n){return n<128?t[r++]=n:n<2048?(t[r++]=192|(n&1984)>>>6,t[r++]=128|(n&63)>>>0):n<65536?(t[r++]=224|(n&61440)>>>12,t[r++]=128|(n&4032)>>>6,t[r++]=128|(n&63)>>>0):(t[r++]=240|(n&1835008)>>>18,t[r++]=128|(n&258048)>>>12,t[r++]=128|(n&4032)>>>6,t[r++]=128|(n&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),cb(this._h0)+cb(this._h1)+cb(this._h2)+cb(this._h3)+cb(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,HY(this._buff,this._buffLen),this._buffLen>56&&(this._step(),HY(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=oee._bigBlock32,r=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,r.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,f3(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let n=this._h0,o=this._h1,i=this._h2,a=this._h3,s=this._h4,l,c,d;for(let u=0;u<80;u++)u<20?(l=o&i|~o&a,c=1518500249):u<40?(l=o^i^a,c=1859775393):u<60?(l=o&i|o&a|i&a,c=2400959708):(l=o^i^a,c=3395469782),d=f3(n,5)+l+s+c+t.getUint32(u*4,!1)&4294967295,s=a,a=i,i=f3(o,30),o=n,n=d;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+i&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+s&4294967295}};$Ie._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:Bxt,getWindow:da,getDocument:jxt,getWindows:Uxt,getWindowsCount:Vxt,getWindowId:WY,getWindowById:Hxt,hasWindow:Wxt,onDidRegisterWindow:AIe,onWillUnregisterWindow:Zxt,onDidUnregisterWindow:Gxt}=(function(){let e=new Map,t={window:Qn,disposables:new Qc};e.set(Qn.vscodeWindowId,t);let r=new le,n=new le,o=new le;function i(a,s){return(typeof a=="number"?e.get(a):void 0)??(s?t:void 0)}return{onDidRegisterWindow:r.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(a){if(e.has(a.vscodeWindowId))return qe.None;let s=new Qc,l={window:a,disposables:s.add(new Qc)};return e.set(a.vscodeWindowId,l),s.add(qt(()=>{e.delete(a.vscodeWindowId),n.fire(a)})),s.add(Le(a,Jr.BEFORE_UNLOAD,()=>{o.fire(a)})),r.fire(l),s},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:i,getWindow(a){let s=a;if(s?.ownerDocument?.defaultView)return s.ownerDocument.defaultView.window;let l=a;return l?.view?l.view.window:Qn},getDocument(a){return da(a).document}}})(),OIe=class{constructor(e,t,r,n){this._node=e,this._type=t,this._handler=r,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Le(e,t,r,n){return new OIe(e,t,r,n)}function zIe(e,t){return function(r){return t(new gb(e,r))}}function NIe(e){return function(t){return e(new j3(t))}}var ZY=function(e,t,r,n){let o=r;return t==="click"||t==="mousedown"||t==="contextmenu"?o=zIe(da(e),r):(t==="keydown"||t==="keypress"||t==="keyup")&&(o=NIe(r)),Le(e,t,o,n)},FIe,oC,LIe=class extends wIe{constructor(e){super(),this.defaultTarget=e&&da(e)}cancelAndSet(e,t,r){return super.cancelAndSet(e,t,r??this.defaultTarget)}},m3=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Zk(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,r=new Map,n=new Map,o=i=>{r.set(i,!1);let a=e.get(i)??[];for(t.set(i,a),e.set(i,[]),n.set(i,!0);a.length>0;)a.sort(m3.sort),a.shift().execute();n.set(i,!1)};oC=(i,a,s=0)=>{let l=WY(i),c=new m3(a,s),d=e.get(l);return d||(d=[],e.set(l,d)),d.push(c),r.get(l)||(r.set(l,!0),i.requestAnimationFrame(()=>o(l))),c},FIe=(i,a,s)=>{let l=WY(i);if(n.get(l)){let c=new m3(a,s),d=t.get(l);return d||(d=[],t.set(l,d)),d.push(c),c}else return oC(i,a,s)}})();var GY=class Yk{constructor(t,r){this.width=t,this.height=r}with(t=this.width,r=this.height){return t!==this.width||r!==this.height?new Yk(t,r):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof Yk?t:new Yk(t.width,t.height)}static equals(t,r){return t===r?!0:!t||!r?!1:t.width===r.width&&t.height===r.height}};GY.None=new GY(0,0);function MIe(e){let t=e.getBoundingClientRect(),r=da(e);return{left:t.left+r.scrollX,top:t.top+r.scrollY,width:t.width,height:t.height}}var qxt=new class{constructor(){this.mutationObservers=new Map}observe(e,t,r){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));let o=PIe(r),i=n.get(o);if(i)i.users+=1;else{let a=new le,s=new MutationObserver(c=>a.fire(c));s.observe(e,r);let l=i={users:1,observer:s,onDidMutate:a.event};t.add(qt(()=>{l.users-=1,l.users===0&&(a.dispose(),s.disconnect(),n?.delete(o),n?.size===0&&this.mutationObservers.delete(e))})),n.set(o,i)}return i.onDidMutate}},Jr={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:Kk?"webkitAnimationStart":"animationstart",ANIMATION_END:Kk?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Kk?"webkitAnimationIteration":"animationiteration"},BIe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function nee(e,t,r,...n){let o=BIe.exec(t);if(!o)throw new Error("Bad use of emmet");let i=o[1]||"div",a;return e!=="http://www.w3.org/1999/xhtml"?a=document.createElementNS(e,i):a=document.createElement(i),o[3]&&(a.id=o[3]),o[4]&&(a.className=o[4].replace(/\./g," ").trim()),r&&Object.entries(r).forEach(([s,l])=>{typeof l>"u"||(/^on\w+$/.test(s)?a[s]=l:s==="selected"?l&&a.setAttribute(s,"true"):a.setAttribute(s,l))}),a.append(...n),a}function jIe(e,t,...r){return nee("http://www.w3.org/1999/xhtml",e,t,...r)}jIe.SVG=function(e,t,...r){return nee("http://www.w3.org/2000/svg",e,t,...r)};var UIe=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=$n(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=$n(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=$n(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=$n(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=$n(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=$n(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=$n(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=$n(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=$n(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=$n(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=$n(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=$n(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=$n(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=$n(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function $n(e){return typeof e=="number"?`${e}px`:e}function wb(e){return new UIe(e)}var iee=class{constructor(){this._hooks=new Qc,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let r=this._onStopCallback;this._onStopCallback=null,e&&r&&r(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,r,n,o){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=o;let i=e;try{e.setPointerCapture(t),this._hooks.add(qt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{i=da(e)}this._hooks.add(Le(i,Jr.POINTER_MOVE,a=>{if(a.buttons!==r){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Le(i,Jr.POINTER_UP,a=>this.stopMonitoring(!0)))}};function VIe(e,t,r){let n=null,o=null;if(typeof r.value=="function"?(n="value",o=r.value,o.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof r.get=="function"&&(n="get",o=r.get),!o)throw new Error("not supported");let i=`$memoize$${t}`;r[n]=function(...a){return this.hasOwnProperty(i)||Object.defineProperty(this,i,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,a)}),this[i]}}var ca;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(ca||(ca={}));var vb=class $o extends qe{constructor(){super(),this.dispatched=!1,this.targets=new TY,this.ignoreTargets=new TY,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(oo.runAndSubscribe(AIe,({window:t,disposables:r})=>{r.add(Le(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),r.add(Le(t.document,"touchend",n=>this.onTouchEnd(t,n))),r.add(Le(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:Qn,disposables:this._store}))}static addTarget(t){if(!$o.isTouchDevice())return qe.None;$o.INSTANCE||($o.INSTANCE=EY(new $o));let r=$o.INSTANCE.targets.push(t);return qt(r)}static ignoreTarget(t){if(!$o.isTouchDevice())return qe.None;$o.INSTANCE||($o.INSTANCE=EY(new $o));let r=$o.INSTANCE.ignoreTargets.push(t);return qt(r)}static isTouchDevice(){return"ontouchstart"in Qn||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let r=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,o=t.targetTouches.length;n<o;n++){let i=t.targetTouches.item(n);this.activeTouches[i.identifier]={id:i.identifier,initialTarget:i.target,initialTimeStamp:r,initialPageX:i.pageX,initialPageY:i.pageY,rollingTimestamps:[r],rollingPageX:[i.pageX],rollingPageY:[i.pageY]};let a=this.newGestureEvent(ca.Start,i.target);a.pageX=i.pageX,a.pageY=i.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,r){let n=Date.now(),o=Object.keys(this.activeTouches).length;for(let i=0,a=r.changedTouches.length;i<a;i++){let s=r.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("move of an UNKNOWN touch",s);continue}let l=this.activeTouches[s.identifier],c=Date.now()-l.initialTimeStamp;if(c<$o.HOLD_DELAY&&Math.abs(l.initialPageX-qn(l.rollingPageX))<30&&Math.abs(l.initialPageY-qn(l.rollingPageY))<30){let d=this.newGestureEvent(ca.Tap,l.initialTarget);d.pageX=qn(l.rollingPageX),d.pageY=qn(l.rollingPageY),this.dispatchEvent(d)}else if(c>=$o.HOLD_DELAY&&Math.abs(l.initialPageX-qn(l.rollingPageX))<30&&Math.abs(l.initialPageY-qn(l.rollingPageY))<30){let d=this.newGestureEvent(ca.Contextmenu,l.initialTarget);d.pageX=qn(l.rollingPageX),d.pageY=qn(l.rollingPageY),this.dispatchEvent(d)}else if(o===1){let d=qn(l.rollingPageX),u=qn(l.rollingPageY),f=qn(l.rollingTimestamps)-l.rollingTimestamps[0],m=d-l.rollingPageX[0],p=u-l.rollingPageY[0],h=[...this.targets].filter(b=>l.initialTarget instanceof Node&&b.contains(l.initialTarget));this.inertia(t,h,n,Math.abs(m)/f,m>0?1:-1,d,Math.abs(p)/f,p>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(ca.End,l.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(r.preventDefault(),r.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,r){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=r,n.tapCount=0,n}dispatchEvent(t){if(t.type===ca.Tap){let r=new Date().getTime(),n=0;r-this._lastSetTapCountTime>$o.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=r,t.tapCount=n}else(t.type===ca.Change||t.type===ca.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let r=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let o=0,i=t.initialTarget;for(;i&&i!==n;)o++,i=i.parentElement;r.push([o,n])}r.sort((n,o)=>n[0]-o[0]);for(let[n,o]of r)o.dispatchEvent(t),this.dispatched=!0}}inertia(t,r,n,o,i,a,s,l,c){this.handle=oC(t,()=>{let d=Date.now(),u=d-n,f=0,m=0,p=!0;o+=$o.SCROLL_FRICTION*u,s+=$o.SCROLL_FRICTION*u,o>0&&(p=!1,f=i*o*u),s>0&&(p=!1,m=l*s*u);let h=this.newGestureEvent(ca.Change);h.translationX=f,h.translationY=m,r.forEach(b=>b.dispatchEvent(h)),p||this.inertia(t,r,d,o,i,a+f,s,l,c+m)})}onTouchMove(t){let r=Date.now();for(let n=0,o=t.changedTouches.length;n<o;n++){let i=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(i.identifier))){console.warn("end of an UNKNOWN touch",i);continue}let a=this.activeTouches[i.identifier],s=this.newGestureEvent(ca.Change,a.initialTarget);s.translationX=i.pageX-qn(a.rollingPageX),s.translationY=i.pageY-qn(a.rollingPageY),s.pageX=i.pageX,s.pageY=i.pageY,this.dispatchEvent(s),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(i.pageX),a.rollingPageY.push(i.pageY),a.rollingTimestamps.push(r)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};vb.SCROLL_FRICTION=-.005,vb.HOLD_DELAY=700,vb.CLEAR_TAP_COUNT_TIME=400,vr([VIe],vb,"isTouchDevice",1);var HIe=vb,xN=class extends qe{onclick(e,t){this._register(Le(e,Jr.CLICK,r=>t(new gb(da(e),r))))}onmousedown(e,t){this._register(Le(e,Jr.MOUSE_DOWN,r=>t(new gb(da(e),r))))}onmouseover(e,t){this._register(Le(e,Jr.MOUSE_OVER,r=>t(new gb(da(e),r))))}onmouseleave(e,t){this._register(Le(e,Jr.MOUSE_LEAVE,r=>t(new gb(da(e),r))))}onkeydown(e,t){this._register(Le(e,Jr.KEY_DOWN,r=>t(new j3(r))))}onkeyup(e,t){this._register(Le(e,Jr.KEY_UP,r=>t(new j3(r))))}oninput(e,t){this._register(Le(e,Jr.INPUT,t))}onblur(e,t){this._register(Le(e,Jr.BLUR,t))}onfocus(e,t){this._register(Le(e,Jr.FOCUS,t))}onchange(e,t){this._register(Le(e,Jr.CHANGE,t))}ignoreGesture(e){return HIe.ignoreTarget(e)}},qY=11,WIe=class extends xN{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=qY+"px",this.domNode.style.height=qY+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new iee),this._register(ZY(this.bgDomNode,Jr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(ZY(this.domNode,Jr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new LIe),this._pointerdownScheduleRepeatTimer=this._register(new gN)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,da(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},ZIe=class U3{constructor(t,r,n,o,i,a,s){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(r=r|0,n=n|0,o=o|0,i=i|0,a=a|0,s=s|0),this.rawScrollLeft=o,this.rawScrollTop=s,r<0&&(r=0),o+r>n&&(o=n-r),o<0&&(o=0),i<0&&(i=0),s+i>a&&(s=a-i),s<0&&(s=0),this.width=r,this.scrollWidth=n,this.scrollLeft=o,this.height=i,this.scrollHeight=a,this.scrollTop=s}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,r){return new U3(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,r?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,r?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new U3(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,r){let n=this.width!==t.width,o=this.scrollWidth!==t.scrollWidth,i=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,s=this.scrollHeight!==t.scrollHeight,l=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:r,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:o,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:s,scrollTopChanged:l}}},GIe=class extends qe{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new le),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new ZIe(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let r=this._state.withScrollDimensions(e,t);this._setState(r,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let r=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let n;t?n=new XY(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let r=this._state.withScrollPosition(e);this._smoothScrolling=XY.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let r=this._state;r.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(r,t)))}},KY=class{constructor(e,t,r){this.scrollLeft=e,this.scrollTop=t,this.isDone=r}};function p3(e,t){let r=t-e;return function(n){return e+r*XIe(n)}}function qIe(e,t,r){return function(n){return n<r?e(n/r):t((n-r)/(1-r))}}var XY=class V3{constructor(t,r,n,o){this.from=t,this.to=r,this.duration=o,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,r,n){if(Math.abs(t-r)>2.5*n){let o,i;return t<r?(o=t+.75*n,i=r-.75*n):(o=t-.75*n,i=r+.75*n),qIe(p3(t,o),p3(i,r),.33)}return p3(t,r)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let r=(t-this.startTime)/this.duration;if(r<1){let n=this.scrollLeft(r),o=this.scrollTop(r);return new KY(n,o,!1)}return new KY(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,r,n){return V3.start(t,r,n)}static start(t,r,n){n=n+10;let o=Date.now()-10;return new V3(t,r,o,n)}};function KIe(e){return Math.pow(e,3)}function XIe(e){return 1-KIe(1-e)}var QIe=class extends qe{constructor(e,t,r){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=r,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new gN)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},YIe=140,aee=class extends xN{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new QIe(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new iee),this._shouldRender=!0,this.domNode=wb(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Le(this.domNode.domNode,Jr.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new WIe(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,r,n){this.slider=wb(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof r=="number"&&this.slider.setWidth(r),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Le(this.slider.domNode,Jr.POINTER_DOWN,o=>{o.button===0&&(o.preventDefault(),this._sliderPointerDown(o))})),this.onclick(this.slider.domNode,o=>{o.leftButton&&o.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,r=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);r<=o&&o<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,r;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,r=e.offsetY;else{let o=MIe(this.domNode.domNode);t=e.pageX-o.left,r=e.pageY-o.top}let n=this._pointerDownRelativePosition(t,r);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),r=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,o=>{let i=this._sliderOrthogonalPointerPosition(o),a=Math.abs(i-r);if(JJ&&a>YIe){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let s=this._sliderPointerPosition(o)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(s))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},see=class H3{constructor(t,r,n,o,i,a){this._scrollbarSize=Math.round(r),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=o,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new H3(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let r=Math.round(t);return this._visibleSize!==r?(this._visibleSize=r,this._refreshComputedValues(),!0):!1}setScrollSize(t){let r=Math.round(t);return this._scrollSize!==r?(this._scrollSize=r,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let r=Math.round(t);return this._scrollPosition!==r?(this._scrollPosition=r,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,r,n,o,i){let a=Math.max(0,n-t),s=Math.max(0,a-2*r),l=o>0&&o>n;if(!l)return{computedAvailableSize:Math.round(a),computedIsNeeded:l,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*s/o))),d=(s-c)/(o-n),u=i*d;return{computedAvailableSize:Math.round(a),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=H3._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize-this._computedSliderSize/2;return Math.round(r/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize,n=this._scrollPosition;return r<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let r=this._computedSliderPosition+t;return Math.round(r/this._computedSliderRatio)}},JIe=class extends aee{constructor(e,t,r){let n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new see(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},e0e=class extends aee{constructor(e,t,r){let n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new see(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},t0e=500,QY=50,YY=!0,r0e=class{constructor(e,t,r){this.timestamp=e,this.deltaX=t,this.deltaY=r,this.score=0}},W3=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,r=0,n=1,o=this._rear;do{let i=o===this._front?t:Math.pow(2,-n);if(t-=i,r+=this._memory[o].score*i,o===this._front)break;o=(this._capacity+o-1)%this._capacity,n++}while(!0);return r<=.5}acceptStandardWheelEvent(t){if(pN){let r=da(t.browserEvent),n=Y_e(r);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,r,n){let o=null,i=new r0e(t,r,n);this._front===-1&&this._rear===-1?(this._memory[0]=i,this._front=0,this._rear=0):(o=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i),i.score=this._computeScore(i,o)}_computeScore(t,r){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),r){let o=Math.abs(t.deltaX),i=Math.abs(t.deltaY),a=Math.abs(r.deltaX),s=Math.abs(r.deltaY),l=Math.max(Math.min(o,a),1),c=Math.max(Math.min(i,s),1),d=Math.max(o,a),u=Math.max(i,s);d%l===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};W3.INSTANCE=new W3;var o0e=W3,n0e=class extends xN{constructor(e,t,r){super(),this._onScroll=this._register(new le),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new le),this.onWillScroll=this._onWillScroll.event,this._options=a0e(t),this._scrollable=r,this._register(this._scrollable.onScroll(o=>{this._onWillScroll.fire(o),this._onDidScroll(o),this._onScroll.fire(o)}));let n={onMouseWheel:o=>this._onMouseWheel(o),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new e0e(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new JIe(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=wb(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=wb(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=wb(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,o=>this._onMouseOver(o)),this.onmouseleave(this._listenOnDomNode,o=>this._onMouseLeave(o)),this._hideTimeout=this._register(new gN),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Ku(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,cs&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new MY(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Ku(this._mouseWheelToDispose),e)){let t=r=>{this._onMouseWheel(new MY(r))};this._mouseWheelToDispose.push(Le(this._listenOnDomNode,Jr.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=o0e.INSTANCE;YY&&t.acceptStandardWheelEvent(e);let r=!1;if(e.deltaY||e.deltaX){let o=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+o===0?i=o=0:Math.abs(o)>=Math.abs(i)?i=0:o=0),this._options.flipAxes&&([o,i]=[i,o]);let a=!cs&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=o,o=0),e.browserEvent&&e.browserEvent.altKey&&(i=i*this._options.fastScrollSensitivity,o=o*this._options.fastScrollSensitivity);let s=this._scrollable.getFutureScrollPosition(),l={};if(o){let c=QY*o,d=s.scrollTop-(c<0?Math.floor(c):Math.ceil(c));this._verticalScrollbar.writeScrollPosition(l,d)}if(i){let c=QY*i,d=s.scrollLeft-(c<0?Math.floor(c):Math.ceil(c));this._horizontalScrollbar.writeScrollPosition(l,d)}l=this._scrollable.validateScrollPosition(l),(s.scrollLeft!==l.scrollLeft||s.scrollTop!==l.scrollTop)&&(YY&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),r=!0)}let n=r;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,r=e.scrollLeft>0,n=r?" left":"",o=t?" top":"",i=r||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${i}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),t0e)}},i0e=class extends n0e{constructor(e,t,r){super(e,t,r)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function a0e(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,cs&&(t.className+=" mac"),t}var Z3=class extends qe{constructor(e,t,r,n,o,i,a,s){super(),this._bufferService=r,this._optionsService=a,this._renderService=s,this._onRequestScrollLines=this._register(new le),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let l=this._register(new GIe({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>oC(n.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new i0e(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},l)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(o.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(oo.runAndSubscribe(i.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=i.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(qt(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(qt(()=>this._styleElement.remove())),this._register(oo.runAndSubscribe(i.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${i.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${i.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${i.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
210
+ `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),r=t-this._bufferService.buffer.ydisp;r!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(r)),this._isHandlingScroll=!1}};Z3=vr([be(2,an),be(3,ml),be(4,zJ),be(5,ph),be(6,sn),be(7,pl)],Z3);var G3=class extends qe{constructor(e,t,r,n,o){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=r,this._decorationService=n,this._renderService=o,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(i=>this._removeDecoration(i))),this._register(qt(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let r=e.options.x??0;return r&&r>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let r=this._decorationElements.get(e);r||(r=this._createElement(e),e.element=r,this._decorationElements.set(e,r),this._container.appendChild(r),e.onDispose(()=>{this._decorationElements.delete(e),r.remove()})),r.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(r.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,r.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(r)}}_refreshXPosition(e,t=e.element){if(!t)return;let r=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=r?`${r*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=r?`${r*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};G3=vr([be(1,an),be(2,ml),be(3,Tb),be(4,pl)],G3);var s0e=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},ss={full:0,left:0,center:0,right:0},Gc={full:0,left:0,center:0,right:0},db={full:0,left:0,center:0,right:0},nC=class extends qe{constructor(e,t,r,n,o,i,a,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=r,this._decorationService=n,this._renderService=o,this._optionsService=i,this._themeService=a,this._coreBrowserService=s,this._colorZoneStore=new s0e,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(qt(()=>this._canvas?.remove()));let l=this._canvas.getContext("2d");if(l)this._ctx=l;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Gc.full=this._canvas.width,Gc.left=e,Gc.center=t,Gc.right=e,this._refreshDrawHeightConstants(),db.full=1,db.left=1,db.center=1+Gc.left,db.right=1+Gc.left+Gc.center}_refreshDrawHeightConstants(){ss.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);ss.left=t,ss.center=t,ss.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ss.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ss.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ss.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*ss.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(db[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-ss[e.position||"full"]/2),Gc[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+ss[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};nC=vr([be(2,an),be(3,Tb),be(4,pl),be(5,sn),be(6,ph),be(7,ml)],nC);var te;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
211
+ `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL="\x7F"))(te||(te={}));var Sb;(e=>(e.PAD="\x80",e.HOP="\x81",e.BPH="\x82",e.NBH="\x83",e.IND="\x84",e.NEL="\x85",e.SSA="\x86",e.ESA="\x87",e.HTS="\x88",e.HTJ="\x89",e.VTS="\x8A",e.PLD="\x8B",e.PLU="\x8C",e.RI="\x8D",e.SS2="\x8E",e.SS3="\x8F",e.DCS="\x90",e.PU1="\x91",e.PU2="\x92",e.STS="\x93",e.CCH="\x94",e.MW="\x95",e.SPA="\x96",e.EPA="\x97",e.SOS="\x98",e.SGCI="\x99",e.SCI="\x9A",e.CSI="\x9B",e.ST="\x9C",e.OSC="\x9D",e.PM="\x9E",e.APC="\x9F"))(Sb||(Sb={}));var q3;(e=>e.ST=`${te.ESC}\\`)(q3||(q3={}));var K3=class{constructor(e,t,r,n,o,i){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=n,this._coreService=o,this._renderService=i,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let r;t.start+=this._dataAlreadySent.length,this._isComposing?r=this._textarea.value.substring(t.start,this._compositionPosition.start):r=this._textarea.value.substring(t.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,r=t.replace(e,"");this._dataAlreadySent=r,t.length>e.length?this._coreService.triggerDataEvent(r,!0):t.length<e.length?this._coreService.triggerDataEvent(`${te.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(i.width,1)+"px",this._textarea.style.height=Math.max(i.height,1)+"px",this._textarea.style.lineHeight=i.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};K3=vr([be(2,an),be(3,sn),be(4,Qu),be(5,pl)],K3);var eo=0,to=0,ro=0,gr=0,JY={css:"#00000000",rgba:0},Sr;(e=>{function t(o,i,a,s){return s!==void 0?`#${Hu(o)}${Hu(i)}${Hu(a)}${Hu(s)}`:`#${Hu(o)}${Hu(i)}${Hu(a)}`}e.toCss=t;function r(o,i,a,s=255){return(o<<24|i<<16|a<<8|s)>>>0}e.toRgba=r;function n(o,i,a,s){return{css:e.toCss(o,i,a,s),rgba:e.toRgba(o,i,a,s)}}e.toColor=n})(Sr||(Sr={}));var Lt;(e=>{function t(l,c){if(gr=(c.rgba&255)/255,gr===1)return{css:c.css,rgba:c.rgba};let d=c.rgba>>24&255,u=c.rgba>>16&255,f=c.rgba>>8&255,m=l.rgba>>24&255,p=l.rgba>>16&255,h=l.rgba>>8&255;eo=m+Math.round((d-m)*gr),to=p+Math.round((u-p)*gr),ro=h+Math.round((f-h)*gr);let b=Sr.toCss(eo,to,ro),v=Sr.toRgba(eo,to,ro);return{css:b,rgba:v}}e.blend=t;function r(l){return(l.rgba&255)===255}e.isOpaque=r;function n(l,c,d){let u=kb.ensureContrastRatio(l.rgba,c.rgba,d);if(u)return Sr.toColor(u>>24&255,u>>16&255,u>>8&255)}e.ensureContrastRatio=n;function o(l){let c=(l.rgba|255)>>>0;return[eo,to,ro]=kb.toChannels(c),{css:Sr.toCss(eo,to,ro),rgba:c}}e.opaque=o;function i(l,c){return gr=Math.round(c*255),[eo,to,ro]=kb.toChannels(l.rgba),{css:Sr.toCss(eo,to,ro,gr),rgba:Sr.toRgba(eo,to,ro,gr)}}e.opacity=i;function a(l,c){return gr=l.rgba&255,i(l,gr*c/255)}e.multiplyOpacity=a;function s(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=s})(Lt||(Lt={}));var or;(e=>{let t,r;try{let o=document.createElement("canvas");o.width=1,o.height=1;let i=o.getContext("2d",{willReadFrequently:!0});i&&(t=i,t.globalCompositeOperation="copy",r=t.createLinearGradient(0,0,1,1))}catch{}function n(o){if(o.match(/#[\da-f]{3,8}/i))switch(o.length){case 4:return eo=parseInt(o.slice(1,2).repeat(2),16),to=parseInt(o.slice(2,3).repeat(2),16),ro=parseInt(o.slice(3,4).repeat(2),16),Sr.toColor(eo,to,ro);case 5:return eo=parseInt(o.slice(1,2).repeat(2),16),to=parseInt(o.slice(2,3).repeat(2),16),ro=parseInt(o.slice(3,4).repeat(2),16),gr=parseInt(o.slice(4,5).repeat(2),16),Sr.toColor(eo,to,ro,gr);case 7:return{css:o,rgba:(parseInt(o.slice(1),16)<<8|255)>>>0};case 9:return{css:o,rgba:parseInt(o.slice(1),16)>>>0}}let i=o.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(i)return eo=parseInt(i[1]),to=parseInt(i[2]),ro=parseInt(i[3]),gr=Math.round((i[5]===void 0?1:parseFloat(i[5]))*255),Sr.toColor(eo,to,ro,gr);if(!t||!r)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=r,t.fillStyle=o,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[eo,to,ro,gr]=t.getImageData(0,0,1,1).data,gr!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Sr.toRgba(eo,to,ro,gr),css:o}}e.toColor=n})(or||(or={}));var Ao;(e=>{function t(n){return r(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function r(n,o,i){let a=n/255,s=o/255,l=i/255,c=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),d=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+d*.7152+u*.0722}e.relativeLuminance2=r})(Ao||(Ao={}));var kb;(e=>{function t(a,s){if(gr=(s&255)/255,gr===1)return s;let l=s>>24&255,c=s>>16&255,d=s>>8&255,u=a>>24&255,f=a>>16&255,m=a>>8&255;return eo=u+Math.round((l-u)*gr),to=f+Math.round((c-f)*gr),ro=m+Math.round((d-m)*gr),Sr.toRgba(eo,to,ro)}e.blend=t;function r(a,s,l){let c=Ao.relativeLuminance(a>>8),d=Ao.relativeLuminance(s>>8);if(cl(c,d)<l){if(d<c){let m=n(a,s,l),p=cl(c,Ao.relativeLuminance(m>>8));if(p<l){let h=o(a,s,l),b=cl(c,Ao.relativeLuminance(h>>8));return p>b?m:h}return m}let u=o(a,s,l),f=cl(c,Ao.relativeLuminance(u>>8));if(f<l){let m=n(a,s,l),p=cl(c,Ao.relativeLuminance(m>>8));return f>p?u:m}return u}}e.ensureContrastRatio=r;function n(a,s,l){let c=a>>24&255,d=a>>16&255,u=a>>8&255,f=s>>24&255,m=s>>16&255,p=s>>8&255,h=cl(Ao.relativeLuminance2(f,m,p),Ao.relativeLuminance2(c,d,u));for(;h<l&&(f>0||m>0||p>0);)f-=Math.max(0,Math.ceil(f*.1)),m-=Math.max(0,Math.ceil(m*.1)),p-=Math.max(0,Math.ceil(p*.1)),h=cl(Ao.relativeLuminance2(f,m,p),Ao.relativeLuminance2(c,d,u));return(f<<24|m<<16|p<<8|255)>>>0}e.reduceLuminance=n;function o(a,s,l){let c=a>>24&255,d=a>>16&255,u=a>>8&255,f=s>>24&255,m=s>>16&255,p=s>>8&255,h=cl(Ao.relativeLuminance2(f,m,p),Ao.relativeLuminance2(c,d,u));for(;h<l&&(f<255||m<255||p<255);)f=Math.min(255,f+Math.ceil((255-f)*.1)),m=Math.min(255,m+Math.ceil((255-m)*.1)),p=Math.min(255,p+Math.ceil((255-p)*.1)),h=cl(Ao.relativeLuminance2(f,m,p),Ao.relativeLuminance2(c,d,u));return(f<<24|m<<16|p<<8|255)>>>0}e.increaseLuminance=o;function i(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=i})(kb||(kb={}));function Hu(e){let t=e.toString(16);return t.length<2?"0"+t:t}function cl(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var l0e=class extends Eb{constructor(e,t,r){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},iC=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Ei}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let r=[],n=t.translateToString(!0),o=0,i=0,a=0,s=t.getFg(0),l=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==s||this._workCell.bg!==l){if(c-o>1){let d=this._getJoinedRanges(n,a,i,t,o);for(let u=0;u<d.length;u++)r.push(d[u])}o=c,a=i,s=this._workCell.fg,l=this._workCell.bg}i+=this._workCell.getChars().length||Xc.length}if(this._bufferService.cols-o>1){let c=this._getJoinedRanges(n,a,i,t,o);for(let d=0;d<c.length;d++)r.push(c[d])}return r}_getJoinedRanges(e,t,r,n,o){let i=e.substring(t,r),a=[];try{a=this._characterJoiners[0].handler(i)}catch(s){console.error(s)}for(let s=1;s<this._characterJoiners.length;s++)try{let l=this._characterJoiners[s].handler(i);for(let c=0;c<l.length;c++)iC._mergeRanges(a,l[c])}catch(l){console.error(l)}return this._stringRangesToCellRanges(a,n,o),a}_stringRangesToCellRanges(e,t,r){let n=0,o=!1,i=0,a=e[n];if(a){for(let s=r;s<this._bufferService.cols;s++){let l=t.getWidth(s),c=t.getString(s).length||Xc.length;if(l!==0){if(!o&&a[0]<=i&&(a[0]=s,o=!0),a[1]<=i){if(a[1]=s,a=e[++n],!a)break;a[0]<=i?(a[0]=s,o=!0):o=!1}i+=c}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let r=!1;for(let n=0;n<e.length;n++){let o=e[n];if(r){if(t[1]<=o[0])return e[n-1][1]=t[1],e;if(t[1]<=o[1])return e[n-1][1]=Math.max(t[1],o[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=o[0])return e.splice(n,0,t),e;if(t[1]<=o[1])return o[0]=Math.min(t[0],o[0]),e;t[0]<o[1]&&(o[0]=Math.min(t[0],o[0]),r=!0);continue}}return r?e[e.length-1][1]=t[1]:e.push(t),e}};iC=vr([be(0,an)],iC);function c0e(e){return 57508<=e&&e<=57558}function d0e(e){return 9472<=e&&e<=9631}function u0e(e){return c0e(e)||d0e(e)}function f0e(){return{css:{canvas:Uk(),cell:Uk()},device:{canvas:Uk(),cell:Uk(),char:{width:0,height:0,left:0,top:0}}}}function Uk(){return{width:0,height:0}}var X3=class{constructor(e,t,r,n,o,i,a){this._document=e,this._characterJoinerService=t,this._optionsService=r,this._coreBrowserService=n,this._coreService=o,this._decorationService=i,this._themeService=a,this._workCell=new Ei,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r}createRow(e,t,r,n,o,i,a,s,l,c,d){let u=[],f=this._characterJoinerService.getJoinedCharacters(t),m=this._themeService.colors,p=e.getNoBgTrimmedLength();r&&p<i+1&&(p=i+1);let h,b=0,v="",x=0,_=0,I=0,S=0,w=!1,P=0,E=!1,B=0,H=0,Z=[],K=c!==-1&&d!==-1;for(let T=0;T<p;T++){e.loadCell(T,this._workCell);let k=this._workCell.getWidth();if(k===0)continue;let $=!1,C=T>=H,A=T,D=this._workCell;if(f.length>0&&T===f[0][0]&&C){let ze=f.shift(),Kt=this._isCellInSelection(ze[0],t);for(x=ze[0]+1;x<ze[1];x++)C&&(C=Kt===this._isCellInSelection(x,t));C&&(C=!r||i<ze[0]||i>=ze[1]),C?($=!0,D=new l0e(this._workCell,e.translateToString(!0,ze[0],ze[1]),ze[1]-ze[0]),A=ze[1]-1,k=D.getWidth()):H=ze[1]}let N=this._isCellInSelection(T,t),U=r&&T===i,G=K&&T>=c&&T<=d,re=!1;this._decorationService.forEachDecorationAtCell(T,t,void 0,ze=>{re=!0});let he=D.getChars()||Xc;if(he===" "&&(D.isUnderline()||D.isOverline())&&(he="\xA0"),B=k*s-l.get(he,D.isBold(),D.isItalic()),!h)h=this._document.createElement("span");else if(b&&(N&&E||!N&&!E&&D.bg===_)&&(N&&E&&m.selectionForeground||D.fg===I)&&D.extended.ext===S&&G===w&&B===P&&!U&&!$&&!re&&C){D.isInvisible()?v+=Xc:v+=he,b++;continue}else b&&(h.textContent=v),h=this._document.createElement("span"),b=0,v="";if(_=D.bg,I=D.fg,S=D.extended.ext,w=G,P=B,E=N,$&&i>=T&&i<=A&&(i=T),!this._coreService.isCursorHidden&&U&&this._coreService.isCursorInitialized){if(Z.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&Z.push("xterm-cursor-blink"),Z.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(o)switch(o){case"outline":Z.push("xterm-cursor-outline");break;case"block":Z.push("xterm-cursor-block");break;case"bar":Z.push("xterm-cursor-bar");break;case"underline":Z.push("xterm-cursor-underline");break;default:break}}if(D.isBold()&&Z.push("xterm-bold"),D.isItalic()&&Z.push("xterm-italic"),D.isDim()&&Z.push("xterm-dim"),D.isInvisible()?v=Xc:v=D.getChars()||Xc,D.isUnderline()&&(Z.push(`xterm-underline-${D.extended.underlineStyle}`),v===" "&&(v="\xA0"),!D.isUnderlineColorDefault()))if(D.isUnderlineColorRGB())h.style.textDecorationColor=`rgb(${Eb.toColorRGB(D.getUnderlineColor()).join(",")})`;else{let ze=D.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&D.isBold()&&ze<8&&(ze+=8),h.style.textDecorationColor=m.ansi[ze].css}D.isOverline()&&(Z.push("xterm-overline"),v===" "&&(v="\xA0")),D.isStrikethrough()&&Z.push("xterm-strikethrough"),G&&(h.style.textDecoration="underline");let me=D.getFgColor(),Q=D.getFgColorMode(),oe=D.getBgColor(),Ie=D.getBgColorMode(),se=!!D.isInverse();if(se){let ze=me;me=oe,oe=ze;let Kt=Q;Q=Ie,Ie=Kt}let $e,Ve,Je=!1;this._decorationService.forEachDecorationAtCell(T,t,void 0,ze=>{ze.options.layer!=="top"&&Je||(ze.backgroundColorRGB&&(Ie=50331648,oe=ze.backgroundColorRGB.rgba>>8&16777215,$e=ze.backgroundColorRGB),ze.foregroundColorRGB&&(Q=50331648,me=ze.foregroundColorRGB.rgba>>8&16777215,Ve=ze.foregroundColorRGB),Je=ze.options.layer==="top")}),!Je&&N&&($e=this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque,oe=$e.rgba>>8&16777215,Ie=50331648,Je=!0,m.selectionForeground&&(Q=50331648,me=m.selectionForeground.rgba>>8&16777215,Ve=m.selectionForeground)),Je&&Z.push("xterm-decoration-top");let at;switch(Ie){case 16777216:case 33554432:at=m.ansi[oe],Z.push(`xterm-bg-${oe}`);break;case 50331648:at=Sr.toColor(oe>>16,oe>>8&255,oe&255),this._addStyle(h,`background-color:#${eJ((oe>>>0).toString(16),"0",6)}`);break;default:se?(at=m.foreground,Z.push("xterm-bg-257")):at=m.background}switch($e||D.isDim()&&($e=Lt.multiplyOpacity(at,.5)),Q){case 16777216:case 33554432:D.isBold()&&me<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(me+=8),this._applyMinimumContrast(h,at,m.ansi[me],D,$e,void 0)||Z.push(`xterm-fg-${me}`);break;case 50331648:let ze=Sr.toColor(me>>16&255,me>>8&255,me&255);this._applyMinimumContrast(h,at,ze,D,$e,Ve)||this._addStyle(h,`color:#${eJ(me.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(h,at,m.foreground,D,$e,Ve)||se&&Z.push("xterm-fg-257")}Z.length&&(h.className=Z.join(" "),Z.length=0),!U&&!$&&!re&&C?b++:h.textContent=v,B!==this.defaultSpacing&&(h.style.letterSpacing=`${B}px`),u.push(h),T=A}return h&&b&&(h.textContent=v),u}_applyMinimumContrast(e,t,r,n,o,i){if(this._optionsService.rawOptions.minimumContrastRatio===1||u0e(n.getCode()))return!1;let a=this._getContrastCache(n),s;if(!o&&!i&&(s=a.getColor(t.rgba,r.rgba)),s===void 0){let l=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);s=Lt.ensureContrastRatio(o||t,i||r,l),a.setColor((o||t).rgba,(i||r).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let r=this._selectionStart,n=this._selectionEnd;return!r||!n?!1:this._columnSelectMode?r[0]<=n[0]?e>=r[0]&&t>=r[1]&&e<n[0]&&t<=n[1]:e<r[0]&&t>=r[1]&&e>=n[0]&&t<=n[1]:t>r[1]&&t<n[1]||r[1]===n[1]&&t===r[1]&&e>=r[0]&&e<n[0]||r[1]<n[1]&&t===n[1]&&e<n[0]||r[1]<n[1]&&t===r[1]&&e>=r[0]}};X3=vr([be(1,LJ),be(2,sn),be(3,ml),be(4,Qu),be(5,Tb),be(6,ph)],X3);function eJ(e,t,r){for(;e.length<r;)e=t+e;return e}var m0e=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let r=e.createElement("span");r.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontStyle="italic";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontWeight="bold",i.style.fontStyle="italic",this._measureElements=[r,n,o,i],this._container.appendChild(r),this._container.appendChild(n),this._container.appendChild(o),this._container.appendChild(i),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,r,n){e===this._font&&t===this._fontSize&&r===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=r,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${r}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${r}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,r){let n=0;if(!t&&!r&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let a=this._measure(e,0);return a>0&&(this._flat[n]=a),a}let o=e;t&&(o+="B"),r&&(o+="I");let i=this._holey.get(o);if(i===void 0){let a=0;t&&(a|=1),r&&(a|=2),i=this._measure(e,a),i>0&&this._holey.set(o,i)}return i}_measure(e,t){let r=this._measureElements[t];return r.textContent=e.repeat(32),r.offsetWidth/32}},p0e=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,r,n=!1){if(this.selectionStart=t,this.selectionEnd=r,!t||!r||t[0]===r[0]&&t[1]===r[1]){this.clear();return}let o=e.buffers.active.ydisp,i=t[1]-o,a=r[1]-o,s=Math.max(i,0),l=Math.min(a,e.rows-1);if(s>=e.rows||l<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=i,this.viewportEndRow=a,this.viewportCappedStartRow=s,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=r[0]}isCellSelected(e,t,r){return this.hasSelection?(r-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&r>=this.viewportCappedStartRow&&t<this.endCol&&r<=this.viewportCappedEndRow:t<this.startCol&&r>=this.viewportCappedStartRow&&t>=this.endCol&&r<=this.viewportCappedEndRow:r>this.viewportStartRow&&r<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol):!1}};function h0e(){return new p0e}var h3="xterm-dom-renderer-owner-",Pi="xterm-rows",Vk="xterm-fg-",tJ="xterm-bg-",ub="xterm-focus",Hk="xterm-selection",g0e=1,Q3=class extends qe{constructor(e,t,r,n,o,i,a,s,l,c,d,u,f,m){super(),this._terminal=e,this._document=t,this._element=r,this._screenElement=n,this._viewportElement=o,this._helperContainer=i,this._linkifier2=a,this._charSizeService=l,this._optionsService=c,this._bufferService=d,this._coreService=u,this._coreBrowserService=f,this._themeService=m,this._terminalClass=g0e++,this._rowElements=[],this._selectionRenderModel=h0e(),this.onRequestRedraw=this._register(new le).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Pi),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(Hk),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=f0e(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(p=>this._injectCss(p))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(X3,document),this._element.classList.add(h3+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(p=>this._handleLinkHover(p))),this._register(this._linkifier2.onHideLinkUnderline(p=>this._handleLinkLeave(p))),this._register(qt(()=>{this._element.classList.remove(h3+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new m0e(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let r of this._rowElements)r.style.width=`${this.dimensions.css.canvas.width}px`,r.style.height=`${this.dimensions.css.cell.height}px`,r.style.lineHeight=`${this.dimensions.css.cell.height}px`,r.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Pi} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Pi} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Pi} .xterm-dim { color: ${Lt.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let r=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,o=`blink_block_${this._terminalClass}`;t+=`@keyframes ${r} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% { box-shadow: none; }}`,t+=`@keyframes ${o} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Pi}.${ub} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Pi}.${ub} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${Pi}.${ub} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${o} 1s step-end infinite;}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Pi} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Hk} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Hk} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Hk} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[i,a]of e.ansi.entries())t+=`${this._terminalSelector} .${Vk}${i} { color: ${a.css}; }${this._terminalSelector} .${Vk}${i}.xterm-dim { color: ${Lt.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${tJ}${i} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${Vk}257 { color: ${Lt.opaque(e.background).css}; }${this._terminalSelector} .${Vk}257.xterm-dim { color: ${Lt.multiplyOpacity(Lt.opaque(e.background),.5).css}; }${this._terminalSelector} .${tJ}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let r=this._rowElements.length;r<=t;r++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(ub),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(ub),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,r){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,r),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,o=this._selectionRenderModel.viewportEndRow,i=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,s=this._document.createDocumentFragment();if(r){let l=e[0]>t[0];s.appendChild(this._createSelectionElement(i,l?t[0]:e[0],l?e[0]:t[0],a-i+1))}else{let l=n===i?e[0]:0,c=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(i,l,c));let d=a-i-1;if(s.appendChild(this._createSelectionElement(i+1,0,this._bufferService.cols,d)),i!==a){let u=o===a?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,0,u))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,r,n=1){let o=this._document.createElement("div"),i=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(r-t);return i+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-i),o.style.height=`${n*this.dimensions.css.cell.height}px`,o.style.top=`${e*this.dimensions.css.cell.height}px`,o.style.left=`${i}px`,o.style.width=`${a}px`,o}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let r=this._bufferService.buffer,n=r.ybase+r.y,o=Math.min(r.x,this._bufferService.cols-1),i=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){let c=l+r.ydisp,d=this._rowElements[l],u=r.lines.get(c);if(!d||!u)break;d.replaceChildren(...this._rowFactory.createRow(u,c,c===n,a,s,o,i,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${h3}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,r,n,o,i){r<0&&(e=0),n<0&&(t=0);let a=this._bufferService.rows-1;r=Math.max(Math.min(r,a),0),n=Math.max(Math.min(n,a),0),o=Math.min(o,this._bufferService.cols);let s=this._bufferService.buffer,l=s.ybase+s.y,c=Math.min(s.x,o-1),d=this._optionsService.rawOptions.cursorBlink,u=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let m=r;m<=n;++m){let p=m+s.ydisp,h=this._rowElements[m],b=s.lines.get(p);if(!h||!b)break;h.replaceChildren(...this._rowFactory.createRow(b,p,p===l,u,f,c,d,this.dimensions.css.cell.width,this._widthCache,i?m===r?e:0:-1,i?(m===n?t:o)-1:-1))}}};Q3=vr([be(7,uN),be(8,dC),be(9,sn),be(10,an),be(11,Qu),be(12,ml),be(13,ph)],Q3);var Y3=class extends qe{constructor(e,t,r){super(),this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=this._register(new le),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new x0e(this._optionsService))}catch{this._measureStrategy=this._register(new v0e(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};Y3=vr([be(2,sn)],Y3);var lee=class extends qe{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},v0e=class extends lee{constructor(e,t,r){super(),this._document=e,this._parentElement=t,this._optionsService=r,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},x0e=class extends lee{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},b0e=class extends qe{constructor(e,t,r){super(),this._textarea=e,this._window=t,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new y0e(this._window)),this._onDprChange=this._register(new le),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new le),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(oo.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Le(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Le(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},y0e=class extends qe{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new mh),this._onDprChange=this._register(new le),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(qt(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Le(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},_0e=class extends qe{constructor(){super(),this.linkProviders=[],this._register(qt(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function bN(e,t,r){let n=r.getBoundingClientRect(),o=e.getComputedStyle(r),i=parseInt(o.getPropertyValue("padding-left")),a=parseInt(o.getPropertyValue("padding-top"));return[t.clientX-n.left-i,t.clientY-n.top-a]}function I0e(e,t,r,n,o,i,a,s,l){if(!i)return;let c=bN(e,t,r);if(c)return c[0]=Math.ceil((c[0]+(l?a/2:0))/a),c[1]=Math.ceil(c[1]/s),c[0]=Math.min(Math.max(c[0],1),n+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),o),c}var J3=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,r,n,o){return I0e(window,e,t,r,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(e,t){let r=bN(window,e,t);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};J3=vr([be(0,pl),be(1,dC)],J3);var w0e=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},cee={};c_e(cee,{getSafariVersion:()=>k0e,isChromeOS:()=>mee,isFirefox:()=>dee,isIpad:()=>C0e,isIphone:()=>P0e,isLegacyEdge:()=>S0e,isLinux:()=>yN,isMac:()=>aC,isNode:()=>mC,isSafari:()=>uee,isWindows:()=>fee});var mC=typeof process<"u"&&"title"in process,$b=mC?"node":navigator.userAgent,Ab=mC?"node":navigator.platform,dee=$b.includes("Firefox"),S0e=$b.includes("Edge"),uee=/^((?!chrome|android).)*safari/i.test($b);function k0e(){if(!uee)return 0;let e=$b.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var aC=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Ab),C0e=Ab==="iPad",P0e=Ab==="iPhone",fee=["Windows","Win16","Win32","WinCE"].includes(Ab),yN=Ab.indexOf("Linux")>=0,mee=/\bCrOS\b/.test($b),pee=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,r=0,n=e.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),r=Math.max(t,r),o=e.timeRemaining(),r*1.5>o){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=o}this.clear()}},D0e=class extends pee{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},R0e=class extends pee{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},sC=!mC&&"requestIdleCallback"in window?R0e:D0e,E0e=class{constructor(){this._queue=new sC}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},eN=class extends qe{constructor(e,t,r,n,o,i,a,s,l){super(),this._rowCount=e,this._optionsService=r,this._charSizeService=n,this._coreService=o,this._coreBrowserService=s,this._renderer=this._register(new mh),this._pausedResizeTask=new E0e,this._observerDisposable=this._register(new mh),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new le),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new le),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new le),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new le),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new w0e((c,d)=>this._renderRows(c,d),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new T0e(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(qt(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(i.onDecorationRegistered(()=>this._fullRefresh())),this._register(i.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(l.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let r=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});r.observe(t),this._observerDisposable.value=qt(()=>r.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,r){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,this._renderer.value?.handleSelectionChanged(e,t,r)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};eN=vr([be(2,sn),be(3,dC),be(4,Qu),be(5,Tb),be(6,an),be(7,ml),be(8,ph)],eN);var T0e=class{constructor(e,t,r){this._coreBrowserService=e,this._coreService=t,this._onTimeout=r,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function $0e(e,t,r,n){let o=r.buffer.x,i=r.buffer.y;if(!r.buffer.hasScrollback)return z0e(o,i,e,t,r,n)+pC(i,t,r,n)+N0e(o,i,e,t,r,n);let a;if(i===t)return a=o>e?"D":"C",Db(Math.abs(o-e),Pb(a,n));a=i>t?"D":"C";let s=Math.abs(i-t),l=O0e(i>t?e:o,r)+(s-1)*r.cols+1+A0e(i>t?o:e,r);return Db(l,Pb(a,n))}function A0e(e,t){return e-1}function O0e(e,t){return t.cols-e}function z0e(e,t,r,n,o,i){return pC(t,n,o,i).length===0?"":Db(gee(e,t,e,t-Xu(t,o),!1,o).length,Pb("D",i))}function pC(e,t,r,n){let o=e-Xu(e,r),i=t-Xu(t,r),a=Math.abs(o-i)-F0e(e,t,r);return Db(a,Pb(hee(e,t),n))}function N0e(e,t,r,n,o,i){let a;pC(t,n,o,i).length>0?a=n-Xu(n,o):a=t;let s=n,l=L0e(e,t,r,n,o,i);return Db(gee(e,a,r,s,l==="C",o).length,Pb(l,i))}function F0e(e,t,r){let n=0,o=e-Xu(e,r),i=t-Xu(t,r);for(let a=0;a<Math.abs(o-i);a++){let s=hee(e,t)==="A"?-1:1;r.buffer.lines.get(o+s*a)?.isWrapped&&n++}return n}function Xu(e,t){let r=0,n=t.buffer.lines.get(e),o=n?.isWrapped;for(;o&&e>=0&&e<t.rows;)r++,n=t.buffer.lines.get(--e),o=n?.isWrapped;return r}function L0e(e,t,r,n,o,i){let a;return pC(r,n,o,i).length>0?a=n-Xu(n,o):a=t,e<r&&a<=n||e>=r&&a<n?"C":"D"}function hee(e,t){return e>t?"A":"B"}function gee(e,t,r,n,o,i){let a=e,s=t,l="";for(;(a!==r||s!==n)&&s>=0&&s<i.buffer.lines.length;)a+=o?1:-1,o&&a>i.cols-1?(l+=i.buffer.translateBufferLineToString(s,!1,e,a),a=0,e=0,s++):!o&&a<0&&(l+=i.buffer.translateBufferLineToString(s,!1,0,e+1),a=i.cols-1,e=a,s--);return l+i.buffer.translateBufferLineToString(s,!1,e,a)}function Pb(e,t){let r=t?"O":"[";return te.ESC+r+e}function Db(e,t){e=Math.floor(e);let r="";for(let n=0;n<e;n++)r+=t;return r}var M0e=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function rJ(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var g3=50,B0e=15,j0e=50,U0e=500,V0e="\xA0",H0e=new RegExp(V0e,"g"),tN=class extends qe{constructor(e,t,r,n,o,i,a,s,l){super(),this._element=e,this._screenElement=t,this._linkifier=r,this._bufferService=n,this._coreService=o,this._mouseService=i,this._optionsService=a,this._renderService=s,this._coreBrowserService=l,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new Ei,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new le),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new le),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new le),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new le),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new M0e(this._bufferService),this._activeSelectionMode=0,this._register(qt(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let r=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let o=e[0]<t[0]?e[0]:t[0],i=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let s=r.translateBufferLineToString(a,!0,o,i);n.push(s)}}else{let o=e[1]===t[1]?t[0]:void 0;n.push(r.translateBufferLineToString(e[1],!0,e[0],o));for(let i=e[1]+1;i<=t[1]-1;i++){let a=r.lines.get(i),s=r.translateBufferLineToString(i,!0);a?.isWrapped?n[n.length-1]+=s:n.push(s)}if(e[1]!==t[1]){let i=r.lines.get(t[1]),a=r.translateBufferLineToString(t[1],!0,0,t[0]);i&&i.isWrapped?n[n.length-1]+=a:n.push(a)}}return n.map(o=>o.replace(H0e," ")).join(fee?`\r
212
+ `:`
213
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),yN&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n||!t?!1:this._areCoordsInSelection(t,r,n)}isCellInSelection(e,t){let r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n?!1:this._areCoordsInSelection([e,t],r,n)}_areCoordsInSelection(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let r=this._linkifier.currentLink?.link?.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=rJ(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=bN(this._coreBrowserService.window,e,this._screenElement)[1],r=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-g3),g3),t/=g3,t/Math.abs(t)+Math.round(t*(B0e-1)))}shouldForceSelection(e){return aC?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),j0e)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(aC&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){let n=r.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<U0e&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&r[0]!==void 0&&r[1]!==void 0){let n=$0e(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!r){this._oldHasSelection&&this._fireOnSelectionChange(e,t,r);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,r)}_fireOnSelectionChange(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let r=t;for(let n=0;t>=n;n++){let o=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?r--:o>1&&t!==n&&(r+=o-1)}return r}setSelection(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,r=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let o=this._bufferService.buffer,i=o.lines.get(e[1]);if(!i)return;let a=o.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(i,e[0]),l=s,c=e[0]-s,d=0,u=0,f=0,m=0;if(a.charAt(s)===" "){for(;s>0&&a.charAt(s-1)===" ";)s--;for(;l<a.length&&a.charAt(l+1)===" ";)l++}else{let b=e[0],v=e[0];i.getWidth(b)===0&&(d++,b--),i.getWidth(v)===2&&(u++,v++);let x=i.getString(v).length;for(x>1&&(m+=x-1,l+=x-1);b>0&&s>0&&!this._isCharWordSeparator(i.loadCell(b-1,this._workCell));){i.loadCell(b-1,this._workCell);let _=this._workCell.getChars().length;this._workCell.getWidth()===0?(d++,b--):_>1&&(f+=_-1,s-=_-1),s--,b--}for(;v<i.length&&l+1<a.length&&!this._isCharWordSeparator(i.loadCell(v+1,this._workCell));){i.loadCell(v+1,this._workCell);let _=this._workCell.getChars().length;this._workCell.getWidth()===2?(u++,v++):_>1&&(m+=_-1,l+=_-1),l++,v++}}l++;let p=s+c-d+f,h=Math.min(this._bufferService.cols,l-s+d+u-f-m);if(!(!t&&a.slice(s,l).trim()==="")){if(r&&p===0&&i.getCodePoint(0)!==32){let b=o.lines.get(e[1]-1);if(b&&i.isWrapped&&b.getCodePoint(this._bufferService.cols-1)!==32){let v=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(v){let x=this._bufferService.cols-v.start;p-=x,h+=x}}}if(n&&p+h===this._bufferService.cols&&i.getCodePoint(this._bufferService.cols-1)!==32){let b=o.lines.get(e[1]+1);if(b?.isWrapped&&b.getCodePoint(0)!==32){let v=this._getWordAt([0,e[1]+1],!1,!1,!0);v&&(h+=v.length)}}return{start:p,length:h}}}_selectWordAt(e,t){let r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let r=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=rJ(r,this._bufferService.cols)}};tN=vr([be(3,an),be(4,Qu),be(5,fN),be(6,sn),be(7,pl),be(8,ml)],tN);var oJ=class{constructor(){this._data={}}set(e,t,r){this._data[e]||(this._data[e]={}),this._data[e][t]=r}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},nJ=class{constructor(){this._color=new oJ,this._css=new oJ}setCss(e,t,r){this._css.set(e,t,r)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,r){this._color.set(e,t,r)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Mr=Object.freeze((()=>{let e=[or.toColor("#2e3436"),or.toColor("#cc0000"),or.toColor("#4e9a06"),or.toColor("#c4a000"),or.toColor("#3465a4"),or.toColor("#75507b"),or.toColor("#06989a"),or.toColor("#d3d7cf"),or.toColor("#555753"),or.toColor("#ef2929"),or.toColor("#8ae234"),or.toColor("#fce94f"),or.toColor("#729fcf"),or.toColor("#ad7fa8"),or.toColor("#34e2e2"),or.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let r=0;r<216;r++){let n=t[r/36%6|0],o=t[r/6%6|0],i=t[r%6];e.push({css:Sr.toCss(n,o,i),rgba:Sr.toRgba(n,o,i)})}for(let r=0;r<24;r++){let n=8+r*10;e.push({css:Sr.toCss(n,n,n),rgba:Sr.toRgba(n,n,n)})}return e})()),Wu=or.toColor("#ffffff"),xb=or.toColor("#000000"),iJ=or.toColor("#ffffff"),aJ=xb,fb={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},W0e=Wu,rN=class extends qe{constructor(e){super(),this._optionsService=e,this._contrastCache=new nJ,this._halfContrastCache=new nJ,this._onChangeColors=this._register(new le),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Wu,background:xb,cursor:iJ,cursorAccent:aJ,selectionForeground:void 0,selectionBackgroundTransparent:fb,selectionBackgroundOpaque:Lt.blend(xb,fb),selectionInactiveBackgroundTransparent:fb,selectionInactiveBackgroundOpaque:Lt.blend(xb,fb),scrollbarSliderBackground:Lt.opacity(Wu,.2),scrollbarSliderHoverBackground:Lt.opacity(Wu,.4),scrollbarSliderActiveBackground:Lt.opacity(Wu,.5),overviewRulerBorder:Wu,ansi:Mr.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=Rt(e.foreground,Wu),t.background=Rt(e.background,xb),t.cursor=Lt.blend(t.background,Rt(e.cursor,iJ)),t.cursorAccent=Lt.blend(t.background,Rt(e.cursorAccent,aJ)),t.selectionBackgroundTransparent=Rt(e.selectionBackground,fb),t.selectionBackgroundOpaque=Lt.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=Rt(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Lt.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?Rt(e.selectionForeground,JY):void 0,t.selectionForeground===JY&&(t.selectionForeground=void 0),Lt.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Lt.opacity(t.selectionBackgroundTransparent,.3)),Lt.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Lt.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=Rt(e.scrollbarSliderBackground,Lt.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=Rt(e.scrollbarSliderHoverBackground,Lt.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=Rt(e.scrollbarSliderActiveBackground,Lt.opacity(t.foreground,.5)),t.overviewRulerBorder=Rt(e.overviewRulerBorder,W0e),t.ansi=Mr.slice(),t.ansi[0]=Rt(e.black,Mr[0]),t.ansi[1]=Rt(e.red,Mr[1]),t.ansi[2]=Rt(e.green,Mr[2]),t.ansi[3]=Rt(e.yellow,Mr[3]),t.ansi[4]=Rt(e.blue,Mr[4]),t.ansi[5]=Rt(e.magenta,Mr[5]),t.ansi[6]=Rt(e.cyan,Mr[6]),t.ansi[7]=Rt(e.white,Mr[7]),t.ansi[8]=Rt(e.brightBlack,Mr[8]),t.ansi[9]=Rt(e.brightRed,Mr[9]),t.ansi[10]=Rt(e.brightGreen,Mr[10]),t.ansi[11]=Rt(e.brightYellow,Mr[11]),t.ansi[12]=Rt(e.brightBlue,Mr[12]),t.ansi[13]=Rt(e.brightMagenta,Mr[13]),t.ansi[14]=Rt(e.brightCyan,Mr[14]),t.ansi[15]=Rt(e.brightWhite,Mr[15]),e.extendedAnsi){let r=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<r;n++)t.ansi[n+16]=Rt(e.extendedAnsi[n],Mr[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};rN=vr([be(0,sn)],rN);function Rt(e,t){if(e!==void 0)try{return or.toColor(e)}catch{}return t}var Z0e=class{constructor(...e){this._entries=new Map;for(let[t,r]of e)this.set(t,r)}set(e,t){let r=this._entries.get(e);return this._entries.set(e,t),r}forEach(e){for(let[t,r]of this._entries.entries())e(t,r)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},G0e=class{constructor(){this._services=new Z0e,this._services.set(uN,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let r=g_e(e).sort((i,a)=>i.index-a.index),n=[];for(let i of r){let a=this._services.get(i.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${i.id._id}.`);n.push(a)}let o=r.length>0?r[0].index:t.length;if(t.length!==o)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);return new e(...t,...n)}},q0e={trace:0,debug:1,info:2,warn:3,error:4,off:5},K0e="xterm.js: ",oN=class extends qe{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),X0e=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=q0e[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,r){this._evalLazyOptionalParams(r),e.call(console,(this._optionsService.options.logger?"":K0e)+t,...r)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};oN=vr([be(0,sn)],oN);var X0e,sJ=class extends qe{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new le),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new le),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new le),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...r){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+r.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<r.length;n++)this._array[this._getCyclicIndex(e+n)]=r[n];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){let n=this._length+r.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=r.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(let o=t-1;o>=0;o--)this.set(e+o+r,this.get(e+o));let n=e+t+r-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+r,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Ye=3,Er=Object.freeze(new Eb),Wk=0,v3=2,bb=class vee{constructor(t,r,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Ye);let o=r||Ei.fromCharData([0,TJ,1,0]);for(let i=0;i<t;++i)this.setCell(i,o);this.length=t}get(t){let r=this._data[t*Ye+0],n=r&2097151;return[this._data[t*Ye+1],r&2097152?this._combined[t]:n?Kc(n):"",r>>22,r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,r){this._data[t*Ye+1]=r[0],r[1].length>1?(this._combined[t]=r[1],this._data[t*Ye+0]=t|2097152|r[2]<<22):this._data[t*Ye+0]=r[1].charCodeAt(0)|r[2]<<22}getWidth(t){return this._data[t*Ye+0]>>22}hasWidth(t){return this._data[t*Ye+0]&12582912}getFg(t){return this._data[t*Ye+1]}getBg(t){return this._data[t*Ye+2]}hasContent(t){return this._data[t*Ye+0]&4194303}getCodePoint(t){let r=this._data[t*Ye+0];return r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r&2097151}isCombined(t){return this._data[t*Ye+0]&2097152}getString(t){let r=this._data[t*Ye+0];return r&2097152?this._combined[t]:r&2097151?Kc(r&2097151):""}isProtected(t){return this._data[t*Ye+2]&536870912}loadCell(t,r){return Wk=t*Ye,r.content=this._data[Wk+0],r.fg=this._data[Wk+1],r.bg=this._data[Wk+2],r.content&2097152&&(r.combinedData=this._combined[t]),r.bg&268435456&&(r.extended=this._extendedAttrs[t]),r}setCell(t,r){r.content&2097152&&(this._combined[t]=r.combinedData),r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*Ye+0]=r.content,this._data[t*Ye+1]=r.fg,this._data[t*Ye+2]=r.bg}setCellFromCodepoint(t,r,n,o){o.bg&268435456&&(this._extendedAttrs[t]=o.extended),this._data[t*Ye+0]=r|n<<22,this._data[t*Ye+1]=o.fg,this._data[t*Ye+2]=o.bg}addCodepointToCell(t,r,n){let o=this._data[t*Ye+0];o&2097152?this._combined[t]+=Kc(r):o&2097151?(this._combined[t]=Kc(o&2097151)+Kc(r),o&=-2097152,o|=2097152):o=r|1<<22,n&&(o&=-12582913,o|=n<<22),this._data[t*Ye+0]=o}insertCells(t,r,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length-t){let o=new Ei;for(let i=this.length-t-r-1;i>=0;--i)this.setCell(t+r+i,this.loadCell(t+i,o));for(let i=0;i<r;++i)this.setCell(t+i,n)}else for(let o=t;o<this.length;++o)this.setCell(o,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,r,n){if(t%=this.length,r<this.length-t){let o=new Ei;for(let i=0;i<this.length-t-r;++i)this.setCell(t+i,this.loadCell(t+r+i,o));for(let i=this.length-r;i<this.length;++i)this.setCell(i,n)}else for(let o=t;o<this.length;++o)this.setCell(o,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,r,n,o=!1){if(o){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.setCell(t++,n)}resize(t,r){if(t===this.length)return this._data.length*4*v3<this._data.buffer.byteLength;let n=t*Ye;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let o=new Uint32Array(n);o.set(this._data),this._data=o}for(let o=this.length;o<t;++o)this.setCell(o,r)}else{this._data=this._data.subarray(0,n);let o=Object.keys(this._combined);for(let a=0;a<o.length;a++){let s=parseInt(o[a],10);s>=t&&delete this._combined[s]}let i=Object.keys(this._extendedAttrs);for(let a=0;a<i.length;a++){let s=parseInt(i[a],10);s>=t&&delete this._extendedAttrs[s]}}return this.length=t,n*4*v3<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*v3<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,r=!1){if(r){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let r in t._combined)this._combined[r]=t._combined[r];this._extendedAttrs={};for(let r in t._extendedAttrs)this._extendedAttrs[r]=t._extendedAttrs[r];this.isWrapped=t.isWrapped}clone(){let t=new vee(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let r in this._combined)t._combined[r]=this._combined[r];for(let r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Ye+0]&4194303)return t+(this._data[t*Ye+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Ye+0]&4194303||this._data[t*Ye+2]&50331648)return t+(this._data[t*Ye+0]>>22);return 0}copyCellsFrom(t,r,n,o,i){let a=t._data;if(i)for(let l=o-1;l>=0;l--){for(let c=0;c<Ye;c++)this._data[(n+l)*Ye+c]=a[(r+l)*Ye+c];a[(r+l)*Ye+2]&268435456&&(this._extendedAttrs[n+l]=t._extendedAttrs[r+l])}else for(let l=0;l<o;l++){for(let c=0;c<Ye;c++)this._data[(n+l)*Ye+c]=a[(r+l)*Ye+c];a[(r+l)*Ye+2]&268435456&&(this._extendedAttrs[n+l]=t._extendedAttrs[r+l])}let s=Object.keys(t._combined);for(let l=0;l<s.length;l++){let c=parseInt(s[l],10);c>=r&&(this._combined[c-r+n]=t._combined[c])}}translateToString(t,r,n,o){r=r??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),o&&(o.length=0);let i="";for(;r<n;){let a=this._data[r*Ye+0],s=a&2097151,l=a&2097152?this._combined[r]:s?Kc(s):Xc;if(i+=l,o)for(let c=0;c<l.length;++c)o.push(r);r+=a>>22||1}return o&&o.push(r),i}};function Q0e(e,t,r,n,o,i){let a=[];for(let s=0;s<e.length-1;s++){let l=s,c=e.get(++l);if(!c.isWrapped)continue;let d=[e.get(s)];for(;l<e.length&&c.isWrapped;)d.push(c),c=e.get(++l);if(!i&&n>=s&&n<l){s+=d.length-1;continue}let u=0,f=Rb(d,u,t),m=1,p=0;for(;m<d.length;){let b=Rb(d,m,t),v=b-p,x=r-f,_=Math.min(v,x);d[u].copyCellsFrom(d[m],p,f,_,!1),f+=_,f===r&&(u++,f=0),p+=_,p===b&&(m++,p=0),f===0&&u!==0&&d[u-1].getWidth(r-1)===2&&(d[u].copyCellsFrom(d[u-1],r-1,f++,1,!1),d[u-1].setCell(r-1,o))}d[u].replaceCells(f,r,o);let h=0;for(let b=d.length-1;b>0&&(b>u||d[b].getTrimmedLength()===0);b--)h++;h>0&&(a.push(s+d.length-h),a.push(h)),s+=d.length-1}return a}function Y0e(e,t){let r=[],n=0,o=t[n],i=0;for(let a=0;a<e.length;a++)if(o===a){let s=t[++n];e.onDeleteEmitter.fire({index:a-i,amount:s}),a+=s-1,i+=s,o=t[++n]}else r.push(a);return{layout:r,countRemoved:i}}function J0e(e,t){let r=[];for(let n=0;n<t.length;n++)r.push(e.get(t[n]));for(let n=0;n<r.length;n++)e.set(n,r[n]);e.length=t.length}function ewe(e,t,r){let n=[],o=e.map((l,c)=>Rb(e,c,t)).reduce((l,c)=>l+c),i=0,a=0,s=0;for(;s<o;){if(o-s<r){n.push(o-s);break}i+=r;let l=Rb(e,a,t);i>l&&(i-=l,a++);let c=e[a].getWidth(i-1)===2;c&&i--;let d=c?r-1:r;n.push(d),s+=d}return n}function Rb(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(r-1)&&e[t].getWidth(r-1)===1,o=e[t+1].getWidth(0)===2;return n&&o?r-1:r}var xee=class bee{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=bee._nextId++,this._onDispose=this.register(new le),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Ku(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};xee._nextId=1;var twe=xee,jr={},Zu=jr.B;jr[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"};jr.A={"#":"\xA3"};jr.B=void 0;jr[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"};jr.C=jr[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};jr.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"};jr.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"};jr.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"};jr.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"};jr.E=jr[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"};jr.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"};jr.H=jr[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};jr["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"};var lJ=4294967295,cJ=class{constructor(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Er.clone(),this.savedCharset=Zu,this.markers=[],this._nullCell=Ei.fromCharData([0,TJ,1,0]),this._whitespaceCell=Ei.fromCharData([0,Xc,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new sC,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new sJ(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new eC),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new eC),this._whitespaceCell}getBlankLine(e,t){return new bb(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>lJ?lJ:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Er);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new sJ(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let r=this.getNullCell(Er),n=0,o=this._getCorrectBufferLength(t);if(o>this.lines.maxLength&&(this.lines.maxLength=o),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)n+=+this.lines.get(a).resize(e,r);let i=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new bb(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+i+1?(this.ybase--,i++,this.ydisp>0&&this.ydisp--):this.lines.push(new bb(e,r)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(o<this.lines.maxLength){let a=this.lines.length-o;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=o}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),i&&(this.y+=i),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let i=0;i<this.lines.length;i++)n+=+this.lines.get(i).resize(e,r);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=Q0e(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Er),r);if(n.length>0){let o=Y0e(this.lines,n);J0e(this.lines,o.layout),this._reflowLargerAdjustViewport(e,t,o.countRemoved)}}_reflowLargerAdjustViewport(e,t,r){let n=this.getNullCell(Er),o=r;for(;o-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new bb(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)}_reflowSmaller(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell(Er),o=[],i=0;for(let a=this.lines.length-1;a>=0;a--){let s=this.lines.get(a);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let l=[s];for(;s.isWrapped&&a>0;)s=this.lines.get(--a),l.unshift(s);if(!r){let _=this.ybase+this.y;if(_>=a&&_<a+l.length)continue}let c=l[l.length-1].getTrimmedLength(),d=ewe(l,this._cols,e),u=d.length-l.length,f;this.ybase===0&&this.y!==this.lines.length-1?f=Math.max(0,this.y-this.lines.maxLength+u):f=Math.max(0,this.lines.length-this.lines.maxLength+u);let m=[];for(let _=0;_<u;_++){let I=this.getBlankLine(Er,!0);m.push(I)}m.length>0&&(o.push({start:a+l.length+i,newLines:m}),i+=m.length),l.push(...m);let p=d.length-1,h=d[p];h===0&&(p--,h=d[p]);let b=l.length-u-1,v=c;for(;b>=0;){let _=Math.min(v,h);if(l[p]===void 0)break;if(l[p].copyCellsFrom(l[b],v-_,h-_,_,!0),h-=_,h===0&&(p--,h=d[p]),v-=_,v===0){b--;let I=Math.max(b,0);v=Rb(l,I,this._cols)}}for(let _=0;_<l.length;_++)d[_]<e&&l[_].setCell(d[_],n);let x=u-f;for(;x-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+i)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+u,this.ybase+t-1)}if(o.length>0){let a=[],s=[];for(let h=0;h<this.lines.length;h++)s.push(this.lines.get(h));let l=this.lines.length,c=l-1,d=0,u=o[d];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+i);let f=0;for(let h=Math.min(this.lines.maxLength-1,l+i-1);h>=0;h--)if(u&&u.start>c+f){for(let b=u.newLines.length-1;b>=0;b--)this.lines.set(h--,u.newLines[b]);h++,a.push({index:c+1,amount:u.newLines.length}),f+=u.newLines.length,u=o[++d]}else this.lines.set(h,s[c--]);let m=0;for(let h=a.length-1;h>=0;h--)a[h].index+=m,this.lines.onInsertEmitter.fire(a[h]),m+=a[h].amount;let p=Math.max(0,l+i-this.lines.maxLength);p>0&&this.lines.onTrimEmitter.fire(p)}}translateBufferLineToString(e,t,r=0,n){let o=this.lines.get(e);return o?o.translateToString(t,r,n):""}getWrappedRangeForLine(e){let t=e,r=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new twe(e);return this.markers.push(t),t.register(this.lines.onTrim(r=>{t.line-=r,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(r=>{t.line>=r.index&&(t.line+=r.amount)})),t.register(this.lines.onDelete(r=>{t.line>=r.index&&t.line<r.index+r.amount&&t.dispose(),t.line>r.index&&(t.line-=r.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},rwe=class extends qe{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new le),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new cJ(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new cJ(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},yee=2,_ee=1,nN=class extends qe{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new le),this.onResize=this._onResize.event,this._onScroll=this._register(new le),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,yee),this.rows=Math.max(e.rawOptions.rows||0,_ee),this.buffers=this._register(new rwe(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let r=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:r,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let r=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=r.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let o=r.ybase+r.scrollTop,i=r.ybase+r.scrollBottom;if(r.scrollTop===0){let a=r.lines.isFull;i===r.lines.length-1?a?r.lines.recycle().copyFrom(n):r.lines.push(n.clone()):r.lines.splice(i+1,0,n.clone()),a?this.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this.isUserScrolling||r.ydisp++)}else{let a=i-o+1;r.lines.shiftElements(o+1,a-1,-1),r.lines.set(i,n.clone())}this.isUserScrolling||(r.ydisp=r.ybase),this._onScroll.fire(r.ydisp)}scrollLines(e,t){let r=this.buffer;if(e<0){if(r.ydisp===0)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);let n=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),n!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};nN=vr([be(0,sn)],nN);var uh={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:aC,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},owe=["normal","bold","100","200","300","400","500","600","700","800","900"],nwe=class extends qe{constructor(e){super(),this._onOptionChange=this._register(new le),this.onOptionChange=this._onOptionChange.event;let t={...uh};for(let r in e)if(r in t)try{let n=e[r];t[r]=this._sanitizeAndValidateOption(r,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(qt(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(r=>{r===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(r=>{e.indexOf(r)!==-1&&t()})}_setupOptions(){let e=r=>{if(!(r in uh))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},t=(r,n)=>{if(!(r in uh))throw new Error(`No option with key "${r}"`);n=this._sanitizeAndValidateOption(r,n),this.rawOptions[r]!==n&&(this.rawOptions[r]=n,this._onOptionChange.fire(r))};for(let r in this.rawOptions){let n={get:e.bind(this,r),set:t.bind(this,r)};Object.defineProperty(this.options,r,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=uh[e]),!iwe(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=uh[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=owe.includes(t)?t:uh[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function iwe(e){return e==="block"||e==="underline"||e==="bar"}function yb(e,t=5){if(typeof e!="object")return e;let r=Array.isArray(e)?[]:{};for(let n in e)r[n]=t<=1?e[n]:e[n]&&yb(e[n],t-1);return r}var dJ=Object.freeze({insertMode:!1}),uJ=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),iN=class extends qe{constructor(e,t,r){super(),this._bufferService=e,this._logService=t,this._optionsService=r,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new le),this.onData=this._onData.event,this._onUserInput=this._register(new le),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new le),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new le),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=yb(dJ),this.decPrivateModes=yb(uJ)}reset(){this.modes=yb(dJ),this.decPrivateModes=yb(uJ)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let r=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&r.ybase!==r.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};iN=vr([be(0,an),be(1,NJ),be(2,sn)],iN);var fJ={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function x3(e,t){let r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(r|=64,r|=e.action):(r|=e.button&3,e.button&4&&(r|=64),e.button&8&&(r|=128),e.action===32?r|=32:e.action===0&&!t&&(r|=3)),r}var b3=String.fromCharCode,mJ={DEFAULT:e=>{let t=[x3(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${b3(t[0])}${b3(t[1])}${b3(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${x3(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${x3(e,!0)};${e.x};${e.y}${t}`}},aN=class extends qe{constructor(e,t,r){super(),this._bufferService=e,this._coreService=t,this._optionsService=r,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new le),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(fJ))this.addProtocol(n,fJ[n]);for(let n of Object.keys(mJ))this.addEncoding(n,mJ[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,r){if(e.deltaY===0||e.shiftKey||t===void 0||r===void 0)return 0;let n=t/r,o=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=n+0,Math.abs(e.deltaY)<50&&(o*=.3),this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,r){if(r){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};aN=vr([be(0,an),be(1,Qu),be(2,sn)],aN);var y3=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],awe=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Br;function swe(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var lwe=class{constructor(){if(this.version="6",!Br){Br=new Uint8Array(65536),Br.fill(1),Br[0]=0,Br.fill(0,1,32),Br.fill(0,127,160),Br.fill(2,4352,4448),Br[9001]=2,Br[9002]=2,Br.fill(2,11904,42192),Br[12351]=1,Br.fill(2,44032,55204),Br.fill(2,63744,64256),Br.fill(2,65040,65050),Br.fill(2,65072,65136),Br.fill(2,65280,65377),Br.fill(2,65504,65511);for(let e=0;e<y3.length;++e)Br.fill(0,y3[e][0],y3[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Br[e]:swe(e,awe)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=Gu.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return Gu.createPropertyValue(0,r,n)}},Gu=class Jk{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new le,this.onChange=this._onChange.event;let t=new lwe;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,o=t.length;for(let i=0;i<o;++i){let a=t.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=o)return r+this.wcwidth(a);let c=t.charCodeAt(i);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let s=this.charProperties(a,n),l=Jk.extractWidth(s);Jk.extractShouldJoin(s)&&(l-=Jk.extractWidth(n)),r+=l,n=s}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},cwe=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function pJ(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&t&&(r.isWrapped=t[3]!==0&&t[3]!==32)}var mb=2147483647,dwe=256,Iee=class sN{constructor(t=32,r=32){if(this.maxLength=t,this.maxSubParamsLength=r,r>dwe)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let r=new sN;if(!t.length)return r;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let o=t[n];if(Array.isArray(o))for(let i=0;i<o.length;++i)r.addSubParam(o[i]);else r.addParam(o)}return r}clone(){let t=new sN(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let r=0;r<this.length;++r){t.push(this.params[r]);let n=this._subParamsIdx[r]>>8,o=this._subParamsIdx[r]&255;o-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,o))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>mb?mb:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>mb?mb:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let r=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-r>0?this._subParams.subarray(r,n):null}getSubParamsAll(){let t={};for(let r=0;r<this.length;++r){let n=this._subParamsIdx[r]>>8,o=this._subParamsIdx[r]&255;o-n>0&&(t[r]=this._subParams.slice(n,o))}return t}addDigit(t){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,o=n[r-1];n[r-1]=~o?Math.min(o*10+t,mb):t}},pb=[],uwe=class{constructor(){this._state=0,this._active=pb,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=pb}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=pb,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||pb,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,r){if(!this._active.length)this._handlerFb(this._id,"PUT",cC(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}start(){this.reset(),this._state=1}put(e,t,r){if(this._state!==3){if(this._state===1)for(;t<r;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&r-t>0&&this._put(e,t,r)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let r=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;n>=0&&(r=this._active[n].end(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].end(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=pb,this._id=-1,this._state=0}}},Kn=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=cC(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(r=>(this._data="",this._hitLimit=!1,r));return this._data="",this._hitLimit=!1,t}},hb=[],fwe=class{constructor(){this._handlers=Object.create(null),this._active=hb,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=hb}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=hb,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||hb,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(t)}put(e,t,r){if(!this._active.length)this._handlerFb(this._ident,"PUT",cC(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let r=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;n>=0&&(r=this._active[n].unhook(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=hb,this._ident=0}},_b=new Iee;_b.addParam(0);var hJ=class{constructor(e){this._handler=e,this._data="",this._params=_b,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():_b,this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=cC(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(r=>(this._params=_b,this._data="",this._hitLimit=!1,r));return this._params=_b,this._data="",this._hitLimit=!1,t}},mwe=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,r,n){this.table[t<<8|e]=r<<4|n}addMany(e,t,r,n){for(let o=0;o<e.length;o++)this.table[t<<8|e[o]]=r<<4|n}},Ri=160,pwe=(function(){let e=new mwe(4095),t=Array.apply(null,Array(256)).map((s,l)=>l),r=(s,l)=>t.slice(s,l),n=r(32,127),o=r(0,24);o.push(25),o.push.apply(o,r(28,32));let i=r(0,14),a;e.setDefault(1,0),e.addMany(n,0,2,0);for(a in i)e.addMany([24,26,153,154],a,3,0),e.addMany(r(128,144),a,3,0),e.addMany(r(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(o,0,3,0),e.addMany(o,1,3,1),e.add(127,1,0,1),e.addMany(o,8,0,8),e.addMany(o,3,3,3),e.add(127,3,0,3),e.addMany(o,4,3,4),e.add(127,4,0,4),e.addMany(o,6,3,6),e.addMany(o,5,3,5),e.add(127,5,0,5),e.addMany(o,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(o,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(o,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(o,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(o,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(o,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(o,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Ri,0,2,0),e.add(Ri,8,5,8),e.add(Ri,6,0,6),e.add(Ri,11,0,11),e.add(Ri,13,13,13),e})(),hwe=class extends qe{constructor(e=pwe){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new Iee,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,r,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,r)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(qt(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new uwe),this._dcsParser=this._register(new fwe),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(r=e.prefix.charCodeAt(0),r&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let o=0;o<e.intermediates.length;++o){let i=e.intermediates.charCodeAt(o);if(32>i||i>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=i}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return r<<=8,r|=n,r}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let r=this._identifier(e,[48,126]);this._escHandlers[r]===void 0&&(this._escHandlers[r]=[]);let n=this._escHandlers[r];return n.push(t),{dispose:()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let r=this._identifier(e);this._csiHandlers[r]===void 0&&(this._csiHandlers[r]=[]);let n=this._csiHandlers[r];return n.push(t),{dispose:()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,r,n,o){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=n,this._parseStack.chunkPos=o}parse(e,t,r){let n=0,o=0,i=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,i=this._parseStack.chunkPos+1;else{if(r===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let s=this._parseStack.handlers,l=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(r===!1&&l>-1){for(;l>=0&&(a=s[l](this._params),a!==!0);l--)if(a instanceof Promise)return this._parseStack.handlerPos=l,a}this._parseStack.handlers=[];break;case 4:if(r===!1&&l>-1){for(;l>=0&&(a=s[l](),a!==!0);l--)if(a instanceof Promise)return this._parseStack.handlerPos=l,a}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],a=this._oscParser.end(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,i=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let s=i;s<t;++s){switch(n=e[s],o=this._transitions.table[this.currentState<<8|(n<160?n:Ri)],o>>4){case 2:for(let f=s+1;;++f){if(f>=t||(n=e[f])<32||n>126&&n<Ri){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ri){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ri){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Ri){this._printHandler(e,s,f),s=f-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:s,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let l=this._csiHandlers[this._collect<<8|n],c=l?l.length-1:-1;for(;c>=0&&(a=l[c](this._params),a!==!0);c--)if(a instanceof Promise)return this._preserveStack(3,l,c,o,s),a;c<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++s<t&&(n=e[s])>47&&n<60);s--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let d=this._escHandlers[this._collect<<8|n],u=d?d.length-1:-1;for(;u>=0&&(a=d[u](),a!==!0);u--)if(a instanceof Promise)return this._preserveStack(4,d,u,o,s),a;u<0&&this._escHandlerFb(this._collect<<8|n),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(let f=s+1;;++f)if(f>=t||(n=e[f])===24||n===26||n===27||n>127&&n<Ri){this._dcsParser.put(e,s,f),s=f-1;break}break;case 14:if(a=this._dcsParser.unhook(n!==24&&n!==26),a)return this._preserveStack(6,[],0,o,s),a;n===27&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let f=s+1;;f++)if(f>=t||(n=e[f])<32||n>127&&n<Ri){this._oscParser.put(e,s,f),s=f-1;break}break;case 6:if(a=this._oscParser.end(n!==24&&n!==26),a)return this._preserveStack(5,[],0,o,s),a;n===27&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=o&15}}},gwe=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,vwe=/^[\da-f]+$/;function gJ(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let r=gwe.exec(t);if(r){let n=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/n*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/n*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),vwe.exec(t)&&[3,6,9,12].includes(t.length))){let r=t.length/3,n=[0,0,0];for(let o=0;o<3;++o){let i=parseInt(t.slice(r*o,r*o+r),16);n[o]=r===1?i<<4:r===2?i:r===3?i>>4:i>>8}return n}}function _3(e,t){let r=e.toString(16),n=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function xwe(e,t=16){let[r,n,o]=e;return`rgb:${_3(r,t)}/${_3(n,t)}/${_3(o,t)}`}var bwe={"(":0,")":1,"*":2,"+":3,"-":1,".":2},qc=131072,vJ=10;function xJ(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var bJ=5e3,yJ=0,ywe=class extends qe{constructor(e,t,r,n,o,i,a,s,l=new hwe){super(),this._bufferService=e,this._charsetService=t,this._coreService=r,this._logService=n,this._optionsService=o,this._oscLinkService=i,this._coreMouseService=a,this._unicodeService=s,this._parser=l,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new p_e,this._utf8Decoder=new h_e,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Er.clone(),this._eraseAttrDataInternal=Er.clone(),this._onRequestBell=this._register(new le),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new le),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new le),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new le),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new le),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new le),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new le),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new le),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new le),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new le),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new le),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new le),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new le),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new lN(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(c=>this._activeBuffer=c.activeBuffer)),this._parser.setCsiHandlerFallback((c,d)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(c),params:d.toArray()})}),this._parser.setEscHandlerFallback(c=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(c)})}),this._parser.setExecuteHandlerFallback(c=>{this._logService.debug("Unknown EXECUTE code: ",{code:c})}),this._parser.setOscHandlerFallback((c,d,u)=>{this._logService.debug("Unknown OSC code: ",{identifier:c,action:d,data:u})}),this._parser.setDcsHandlerFallback((c,d,u)=>{d==="HOOK"&&(u=u.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(c),action:d,payload:u})}),this._parser.setPrintHandler((c,d,u)=>this.print(c,d,u)),this._parser.registerCsiHandler({final:"@"},c=>this.insertChars(c)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},c=>this.scrollLeft(c)),this._parser.registerCsiHandler({final:"A"},c=>this.cursorUp(c)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},c=>this.scrollRight(c)),this._parser.registerCsiHandler({final:"B"},c=>this.cursorDown(c)),this._parser.registerCsiHandler({final:"C"},c=>this.cursorForward(c)),this._parser.registerCsiHandler({final:"D"},c=>this.cursorBackward(c)),this._parser.registerCsiHandler({final:"E"},c=>this.cursorNextLine(c)),this._parser.registerCsiHandler({final:"F"},c=>this.cursorPrecedingLine(c)),this._parser.registerCsiHandler({final:"G"},c=>this.cursorCharAbsolute(c)),this._parser.registerCsiHandler({final:"H"},c=>this.cursorPosition(c)),this._parser.registerCsiHandler({final:"I"},c=>this.cursorForwardTab(c)),this._parser.registerCsiHandler({final:"J"},c=>this.eraseInDisplay(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},c=>this.eraseInDisplay(c,!0)),this._parser.registerCsiHandler({final:"K"},c=>this.eraseInLine(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},c=>this.eraseInLine(c,!0)),this._parser.registerCsiHandler({final:"L"},c=>this.insertLines(c)),this._parser.registerCsiHandler({final:"M"},c=>this.deleteLines(c)),this._parser.registerCsiHandler({final:"P"},c=>this.deleteChars(c)),this._parser.registerCsiHandler({final:"S"},c=>this.scrollUp(c)),this._parser.registerCsiHandler({final:"T"},c=>this.scrollDown(c)),this._parser.registerCsiHandler({final:"X"},c=>this.eraseChars(c)),this._parser.registerCsiHandler({final:"Z"},c=>this.cursorBackwardTab(c)),this._parser.registerCsiHandler({final:"`"},c=>this.charPosAbsolute(c)),this._parser.registerCsiHandler({final:"a"},c=>this.hPositionRelative(c)),this._parser.registerCsiHandler({final:"b"},c=>this.repeatPrecedingCharacter(c)),this._parser.registerCsiHandler({final:"c"},c=>this.sendDeviceAttributesPrimary(c)),this._parser.registerCsiHandler({prefix:">",final:"c"},c=>this.sendDeviceAttributesSecondary(c)),this._parser.registerCsiHandler({final:"d"},c=>this.linePosAbsolute(c)),this._parser.registerCsiHandler({final:"e"},c=>this.vPositionRelative(c)),this._parser.registerCsiHandler({final:"f"},c=>this.hVPosition(c)),this._parser.registerCsiHandler({final:"g"},c=>this.tabClear(c)),this._parser.registerCsiHandler({final:"h"},c=>this.setMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"h"},c=>this.setModePrivate(c)),this._parser.registerCsiHandler({final:"l"},c=>this.resetMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"l"},c=>this.resetModePrivate(c)),this._parser.registerCsiHandler({final:"m"},c=>this.charAttributes(c)),this._parser.registerCsiHandler({final:"n"},c=>this.deviceStatus(c)),this._parser.registerCsiHandler({prefix:"?",final:"n"},c=>this.deviceStatusPrivate(c)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},c=>this.softReset(c)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},c=>this.setCursorStyle(c)),this._parser.registerCsiHandler({final:"r"},c=>this.setScrollRegion(c)),this._parser.registerCsiHandler({final:"s"},c=>this.saveCursor(c)),this._parser.registerCsiHandler({final:"t"},c=>this.windowOptions(c)),this._parser.registerCsiHandler({final:"u"},c=>this.restoreCursor(c)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},c=>this.insertColumns(c)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},c=>this.deleteColumns(c)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},c=>this.selectProtected(c)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},c=>this.requestMode(c,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},c=>this.requestMode(c,!1)),this._parser.setExecuteHandler(te.BEL,()=>this.bell()),this._parser.setExecuteHandler(te.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(te.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(te.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(te.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(te.BS,()=>this.backspace()),this._parser.setExecuteHandler(te.HT,()=>this.tab()),this._parser.setExecuteHandler(te.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(te.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Sb.IND,()=>this.index()),this._parser.setExecuteHandler(Sb.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Sb.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Kn(c=>(this.setTitle(c),this.setIconName(c),!0))),this._parser.registerOscHandler(1,new Kn(c=>this.setIconName(c))),this._parser.registerOscHandler(2,new Kn(c=>this.setTitle(c))),this._parser.registerOscHandler(4,new Kn(c=>this.setOrReportIndexedColor(c))),this._parser.registerOscHandler(8,new Kn(c=>this.setHyperlink(c))),this._parser.registerOscHandler(10,new Kn(c=>this.setOrReportFgColor(c))),this._parser.registerOscHandler(11,new Kn(c=>this.setOrReportBgColor(c))),this._parser.registerOscHandler(12,new Kn(c=>this.setOrReportCursorColor(c))),this._parser.registerOscHandler(104,new Kn(c=>this.restoreIndexedColor(c))),this._parser.registerOscHandler(110,new Kn(c=>this.restoreFgColor(c))),this._parser.registerOscHandler(111,new Kn(c=>this.restoreBgColor(c))),this._parser.registerOscHandler(112,new Kn(c=>this.restoreCursorColor(c))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let c in jr)this._parser.registerEscHandler({intermediates:"(",final:c},()=>this.selectCharset("("+c)),this._parser.registerEscHandler({intermediates:")",final:c},()=>this.selectCharset(")"+c)),this._parser.registerEscHandler({intermediates:"*",final:c},()=>this.selectCharset("*"+c)),this._parser.registerEscHandler({intermediates:"+",final:c},()=>this.selectCharset("+"+c)),this._parser.registerEscHandler({intermediates:"-",final:c},()=>this.selectCharset("-"+c)),this._parser.registerEscHandler({intermediates:".",final:c},()=>this.selectCharset("."+c)),this._parser.registerEscHandler({intermediates:"/",final:c},()=>this.selectCharset("/"+c));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(c=>(this._logService.error("Parsing error: ",c),c)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new hJ((c,d)=>this.requestStatusString(c,d)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,r,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,r)=>setTimeout(()=>r("#SLOW_TIMEOUT"),bJ))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${bJ} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let r,n=this._activeBuffer.x,o=this._activeBuffer.y,i=0,a=this._parseStack.paused;if(a){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;n=this._parseStack.cursorStartX,o=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>qc&&(i=this._parseStack.position+qc)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,c=>String.fromCharCode(c)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(c=>c.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<qc&&(this._parseBuffer=new Uint32Array(Math.min(e.length,qc))),a||this._dirtyRowTracker.clearRange(),e.length>qc)for(let c=i;c<e.length;c+=qc){let d=c+qc<e.length?c+qc:e.length,u=typeof e=="string"?this._stringDecoder.decode(e.substring(c,d),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,d),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,u))return this._preserveStack(n,o,u,c),this._logSlowResolvingAsync(r),r}else if(!a){let c=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,c))return this._preserveStack(n,o,c,0),this._logSlowResolvingAsync(r),r}(this._activeBuffer.x!==n||this._activeBuffer.y!==o)&&this._onCursorMove.fire();let s=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),l=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);l<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(l,this._bufferService.rows-1),end:Math.min(s,this._bufferService.rows-1)})}print(e,t,r){let n,o,i=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,s=this._bufferService.cols,l=this._coreService.decPrivateModes.wraparound,c=this._coreService.modes.insertMode,d=this._curAttrData,u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&u.getWidth(this._activeBuffer.x-1)===2&&u.setCellFromCodepoint(this._activeBuffer.x-1,0,1,d);let f=this._parser.precedingJoinState;for(let m=t;m<r;++m){if(n=e[m],n<127&&i){let v=i[String.fromCharCode(n)];v&&(n=v.charCodeAt(0))}let p=this._unicodeService.charProperties(n,f);o=Gu.extractWidth(p);let h=Gu.extractShouldJoin(p),b=h?Gu.extractWidth(f):0;if(f=p,a&&this._onA11yChar.fire(Kc(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+o-b>s){if(l){let v=u,x=this._activeBuffer.x-b;for(this._activeBuffer.x=b,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),b>0&&u instanceof bb&&u.copyCellsFrom(v,x,0,b,!1);x<s;)v.setCellFromCodepoint(x++,0,1,d)}else if(this._activeBuffer.x=s-1,o===2)continue}if(h&&this._activeBuffer.x){let v=u.getWidth(this._activeBuffer.x-1)?1:2;u.addCodepointToCell(this._activeBuffer.x-v,n,o);for(let x=o-b;--x>=0;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,d);continue}if(c&&(u.insertCells(this._activeBuffer.x,o-b,this._activeBuffer.getNullCell(d)),u.getWidth(s-1)===2&&u.setCellFromCodepoint(s-1,0,1,d)),u.setCellFromCodepoint(this._activeBuffer.x++,n,o,d),o>0)for(;--o;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,d)}this._parser.precedingJoinState=f,this._activeBuffer.x<s&&r-t>0&&u.getWidth(this._activeBuffer.x)===0&&!u.hasContent(this._activeBuffer.x)&&u.setCellFromCodepoint(this._activeBuffer.x,0,1,d),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,r=>xJ(r.params[0],this._optionsService.rawOptions.windowOptions)?t(r):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new hJ(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Kn(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,r,n=!1,o=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),o),n&&(i.isWrapped=!1)}_resetBufferLine(e,t=!1){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);r&&(r.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),r.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let r;switch(e.params[0]){case 0:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);r<this._bufferService.rows;r++)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(r);break;case 1:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(r+1).isWrapped=!1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(r=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,r-1);r--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+r)?.getTrimmedLength(););for(;r>=0;r--)this._bufferService.scroll(this._eraseAttrData())}else{for(r=this._bufferService.rows,this._dirtyRowTracker.markDirty(r-1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let n=this._activeBuffer.lines.length-this._bufferService.rows;n>0&&(this._activeBuffer.lines.trimStart(n),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-n,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-n,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,o=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(o-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(r,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(Er));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let r=e.params[0]||1,n=Gu.extractWidth(t),o=this._activeBuffer.x-n,i=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(o),a=new Uint32Array(i.length*r),s=0;for(let c=0;c<i.length;){let d=i.codePointAt(c)||0;a[s++]=d,c+=d>65535?2:1}let l=s;for(let c=1;c<r;++c)a.copyWithin(l,0,s),l+=s;return this.print(a,0,l),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(te.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(te.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(te.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(te.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(te.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,Zu),this._charsetService.setgCharset(1,Zu),this._charsetService.setgCharset(2,Zu),this._charsetService.setgCharset(3,Zu);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){let r;(h=>(h[h.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",h[h.SET=1]="SET",h[h.RESET=2]="RESET",h[h.PERMANENTLY_SET=3]="PERMANENTLY_SET",h[h.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(r||(r={}));let n=this._coreService.decPrivateModes,{activeProtocol:o,activeEncoding:i}=this._coreMouseService,a=this._coreService,{buffers:s,cols:l}=this._bufferService,{active:c,alt:d}=s,u=this._optionsService.rawOptions,f=(h,b)=>(a.triggerDataEvent(`${te.ESC}[${t?"":"?"}${h};${b}$y`),!0),m=h=>h?1:2,p=e.params[0];return t?p===2?f(p,4):p===4?f(p,m(a.modes.insertMode)):p===12?f(p,3):p===20?f(p,m(u.convertEol)):f(p,0):p===1?f(p,m(n.applicationCursorKeys)):p===3?f(p,u.windowOptions.setWinLines?l===80?2:l===132?1:0:0):p===6?f(p,m(n.origin)):p===7?f(p,m(n.wraparound)):p===8?f(p,3):p===9?f(p,m(o==="X10")):p===12?f(p,m(u.cursorBlink)):p===25?f(p,m(!a.isCursorHidden)):p===45?f(p,m(n.reverseWraparound)):p===66?f(p,m(n.applicationKeypad)):p===67?f(p,4):p===1e3?f(p,m(o==="VT200")):p===1002?f(p,m(o==="DRAG")):p===1003?f(p,m(o==="ANY")):p===1004?f(p,m(n.sendFocus)):p===1005?f(p,4):p===1006?f(p,m(i==="SGR")):p===1015?f(p,4):p===1016?f(p,m(i==="SGR_PIXELS")):p===1048?f(p,1):p===47||p===1047||p===1049?f(p,m(c===d)):p===2004?f(p,m(n.bracketedPasteMode)):p===2026?f(p,m(n.synchronizedOutput)):f(p,0)}_updateAttrColor(e,t,r,n,o){return t===2?(e|=50331648,e&=-16777216,e|=Eb.fromColorRGB([r,n,o])):t===5&&(e&=-50331904,e|=33554432|r&255),e}_extractColor(e,t,r){let n=[0,0,-1,0,0,0],o=0,i=0;do{if(n[i+o]=e.params[t+i],e.hasSubParams(t+i)){let a=e.getSubParams(t+i),s=0;do n[1]===5&&(o=1),n[i+s+1+o]=a[s];while(++s<a.length&&s+i+1+o<n.length);break}if(n[1]===5&&i+o>=2||n[1]===2&&i+o>=5)break;n[1]&&(o=1)}while(++i+t<e.length&&i+o<n.length);for(let a=2;a<n.length;++a)n[a]===-1&&(n[a]=0);switch(n[0]){case 38:r.fg=this._updateAttrColor(r.fg,n[1],n[3],n[4],n[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,n[1],n[3],n[4],n[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,n[1],n[3],n[4],n[5])}return i}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=Er.fg,e.bg=Er.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,r,n=this._curAttrData;for(let o=0;o<t;o++)r=e.params[o],r>=30&&r<=37?(n.fg&=-50331904,n.fg|=16777216|r-30):r>=40&&r<=47?(n.bg&=-50331904,n.bg|=16777216|r-40):r>=90&&r<=97?(n.fg&=-50331904,n.fg|=16777216|r-90|8):r>=100&&r<=107?(n.bg&=-50331904,n.bg|=16777216|r-100|8):r===0?this._processSGR0(n):r===1?n.fg|=134217728:r===3?n.bg|=67108864:r===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(o)?e.getSubParams(o)[0]:1,n)):r===5?n.fg|=536870912:r===7?n.fg|=67108864:r===8?n.fg|=1073741824:r===9?n.fg|=2147483648:r===2?n.bg|=134217728:r===21?this._processUnderline(2,n):r===22?(n.fg&=-134217729,n.bg&=-134217729):r===23?n.bg&=-67108865:r===24?(n.fg&=-268435457,this._processUnderline(0,n)):r===25?n.fg&=-536870913:r===27?n.fg&=-67108865:r===28?n.fg&=-1073741825:r===29?n.fg&=2147483647:r===39?(n.fg&=-67108864,n.fg|=Er.fg&16777215):r===49?(n.bg&=-67108864,n.bg|=Er.bg&16777215):r===38||r===48||r===58?o+=this._extractColor(e,o,n):r===53?n.bg|=1073741824:r===55?n.bg&=-1073741825:r===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):r===100?(n.fg&=-67108864,n.fg|=Er.fg&16777215,n.bg&=-67108864,n.bg|=Er.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",r);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${te.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${te.ESC}[${t};${r}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${te.ESC}[?${t};${r}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Er.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let r=t%2===1;this._coreService.decPrivateModes.cursorBlink=r}return!0}setScrollRegion(e){let t=e.params[0]||1,r;return(e.length<2||(r=e.params[1])>this._bufferService.rows||r===0)&&(r=this._bufferService.rows),r>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=r-1,this._setCursor(0,0)),!0}windowOptions(e){if(!xJ(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${te.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>vJ&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>vJ&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],r=e.split(";");for(;r.length>1;){let n=r.shift(),o=r.shift();if(/^\d+$/.exec(n)){let i=parseInt(n);if(_J(i))if(o==="?")t.push({type:0,index:i});else{let a=gJ(o);a&&t.push({type:1,index:i,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let r=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(r,n):r.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let r=e.split(":"),n,o=r.findIndex(i=>i.startsWith("id="));return o!==-1&&(n=r[o].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let r=e.split(";");for(let n=0;n<r.length&&!(t>=this._specialColors.length);++n,++t)if(r[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let o=gJ(r[n]);o&&this._onColor.fire([{type:1,index:this._specialColors[t],color:o}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],r=e.split(";");for(let n=0;n<r.length;++n)if(/^\d+$/.exec(r[n])){let o=parseInt(r[n]);_J(o)&&t.push({type:2,index:o})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,Zu),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(bwe[e[0]],jr[e[1]]||Zu),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=Er.clone(),this._eraseAttrDataInternal=Er.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new Ei;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let r=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(r);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let r=a=>(this._coreService.triggerDataEvent(`${te.ESC}${a}${te.ESC}\\`),!0),n=this._bufferService.buffer,o=this._optionsService.rawOptions;return r(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[o.cursorStyle]-(o.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},lN=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(yJ=e,e=t,t=yJ),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};lN=vr([be(0,an)],lN);function _J(e){return 0<=e&&e<256}var _we=5e7,IJ=12,Iwe=50,wwe=class extends qe{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new le),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let r;for(;r=this._writeBuffer.shift();){this._action(r);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>_we)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let r=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],o=this._action(n,t);if(o){let a=s=>performance.now()-r>=IJ?setTimeout(()=>this._innerWrite(0,s)):this._innerWrite(r,s);o.catch(s=>(queueMicrotask(()=>{throw s}),Promise.resolve(!1))).then(a);return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-r>=IJ)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>Iwe&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},cN=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let s=t.addMarker(t.ybase+t.y),l={data:e,id:this._nextId++,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(l,s)),this._dataByLinkId.set(l.id,l),l.id}let r=e,n=this._getEntryIdKey(r),o=this._entriesWithId.get(n);if(o)return this.addLineToLink(o.id,t.ybase+t.y),o.id;let i=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(r),data:r,lines:[i]};return i.onDispose(()=>this._removeMarkerFromLink(a,i)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let r=this._dataByLinkId.get(e);if(r&&r.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);r.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(r,n))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let r=e.lines.indexOf(t);r!==-1&&(e.lines.splice(r,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};cN=vr([be(0,an)],cN);var wJ=!1,Swe=class extends qe{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new mh),this._onBinary=this._register(new le),this.onBinary=this._onBinary.event,this._onData=this._register(new le),this.onData=this._onData.event,this._onLineFeed=this._register(new le),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new le),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new le),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new le),this._instantiationService=new G0e,this.optionsService=this._register(new nwe(e)),this._instantiationService.setService(sn,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(nN)),this._instantiationService.setService(an,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(oN)),this._instantiationService.setService(NJ,this._logService),this.coreService=this._register(this._instantiationService.createInstance(iN)),this._instantiationService.setService(Qu,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(aN)),this._instantiationService.setService(zJ,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(Gu)),this._instantiationService.setService(b_e,this.unicodeService),this._charsetService=this._instantiationService.createInstance(cwe),this._instantiationService.setService(x_e,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(cN),this._instantiationService.setService(FJ,this._oscLinkService),this._inputHandler=this._register(new ywe(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(oo.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(oo.forward(this._bufferService.onResize,this._onResize)),this._register(oo.forward(this.coreService.onData,this._onData)),this._register(oo.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new wwe((t,r)=>this._inputHandler.parse(t,r))),this._register(oo.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new le),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!wJ&&(this._logService.warn("writeSync is unreliable and will be removed soon."),wJ=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,yee),t=Math.max(t,_ee),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(pJ.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(pJ(this._bufferService),!1))),this._windowsWrappingHeuristics.value=qt(()=>{for(let t of e)t.dispose()})}}},kwe={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function Cwe(e,t,r,n){let o={type:0,cancel:!1,key:void 0},i=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?o.key=te.ESC+"OA":o.key=te.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?o.key=te.ESC+"OD":o.key=te.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?o.key=te.ESC+"OC":o.key=te.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?o.key=te.ESC+"OB":o.key=te.ESC+"[B");break;case 8:o.key=e.ctrlKey?"\b":te.DEL,e.altKey&&(o.key=te.ESC+o.key);break;case 9:if(e.shiftKey){o.key=te.ESC+"[Z";break}o.key=te.HT,o.cancel=!0;break;case 13:o.key=e.altKey?te.ESC+te.CR:te.CR,o.cancel=!0;break;case 27:o.key=te.ESC,e.altKey&&(o.key=te.ESC+te.ESC),o.cancel=!0;break;case 37:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"D":t?o.key=te.ESC+"OD":o.key=te.ESC+"[D";break;case 39:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"C":t?o.key=te.ESC+"OC":o.key=te.ESC+"[C";break;case 38:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"A":t?o.key=te.ESC+"OA":o.key=te.ESC+"[A";break;case 40:if(e.metaKey)break;i?o.key=te.ESC+"[1;"+(i+1)+"B":t?o.key=te.ESC+"OB":o.key=te.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(o.key=te.ESC+"[2~");break;case 46:i?o.key=te.ESC+"[3;"+(i+1)+"~":o.key=te.ESC+"[3~";break;case 36:i?o.key=te.ESC+"[1;"+(i+1)+"H":t?o.key=te.ESC+"OH":o.key=te.ESC+"[H";break;case 35:i?o.key=te.ESC+"[1;"+(i+1)+"F":t?o.key=te.ESC+"OF":o.key=te.ESC+"[F";break;case 33:e.shiftKey?o.type=2:e.ctrlKey?o.key=te.ESC+"[5;"+(i+1)+"~":o.key=te.ESC+"[5~";break;case 34:e.shiftKey?o.type=3:e.ctrlKey?o.key=te.ESC+"[6;"+(i+1)+"~":o.key=te.ESC+"[6~";break;case 112:i?o.key=te.ESC+"[1;"+(i+1)+"P":o.key=te.ESC+"OP";break;case 113:i?o.key=te.ESC+"[1;"+(i+1)+"Q":o.key=te.ESC+"OQ";break;case 114:i?o.key=te.ESC+"[1;"+(i+1)+"R":o.key=te.ESC+"OR";break;case 115:i?o.key=te.ESC+"[1;"+(i+1)+"S":o.key=te.ESC+"OS";break;case 116:i?o.key=te.ESC+"[15;"+(i+1)+"~":o.key=te.ESC+"[15~";break;case 117:i?o.key=te.ESC+"[17;"+(i+1)+"~":o.key=te.ESC+"[17~";break;case 118:i?o.key=te.ESC+"[18;"+(i+1)+"~":o.key=te.ESC+"[18~";break;case 119:i?o.key=te.ESC+"[19;"+(i+1)+"~":o.key=te.ESC+"[19~";break;case 120:i?o.key=te.ESC+"[20;"+(i+1)+"~":o.key=te.ESC+"[20~";break;case 121:i?o.key=te.ESC+"[21;"+(i+1)+"~":o.key=te.ESC+"[21~";break;case 122:i?o.key=te.ESC+"[23;"+(i+1)+"~":o.key=te.ESC+"[23~";break;case 123:i?o.key=te.ESC+"[24;"+(i+1)+"~":o.key=te.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?o.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?o.key=te.NUL:e.keyCode>=51&&e.keyCode<=55?o.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?o.key=te.DEL:e.keyCode===219?o.key=te.ESC:e.keyCode===220?o.key=te.FS:e.keyCode===221&&(o.key=te.GS);else if((!r||n)&&e.altKey&&!e.metaKey){let a=kwe[e.keyCode]?.[e.shiftKey?1:0];if(a)o.key=te.ESC+a;else if(e.keyCode>=65&&e.keyCode<=90){let s=e.ctrlKey?e.keyCode-64:e.keyCode+32,l=String.fromCharCode(s);e.shiftKey&&(l=l.toUpperCase()),o.key=te.ESC+l}else if(e.keyCode===32)o.key=te.ESC+(e.ctrlKey?te.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let s=e.code.slice(3,4);e.shiftKey||(s=s.toLowerCase()),o.key=te.ESC+s,o.cancel=!0}}else r&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(o.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?o.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(o.key=te.US),e.key==="@"&&(o.key=te.NUL));break}return o}var wr=0,Pwe=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new sC,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new sC,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((o,i)=>this._getKey(o)-this._getKey(i)),t=0,r=0,n=new Array(this._array.length+this._insertedValues.length);for(let o=0;o<n.length;o++)r>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[r])?(n[o]=e[t],t++):n[o]=this._array[r++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(wr=this._search(t),wr===-1)||this._getKey(this._array[wr])!==t)return!1;do if(this._array[wr]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(wr),!0;while(++wr<this._array.length&&this._getKey(this._array[wr])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((o,i)=>o-i),t=0,r=new Array(this._array.length-e.length),n=0;for(let o=0;o<this._array.length;o++)e[t]===o?t++:r[n++]=this._array[o];this._array=r,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(wr=this._search(e),!(wr<0||wr>=this._array.length)&&this._getKey(this._array[wr])===e))do yield this._array[wr];while(++wr<this._array.length&&this._getKey(this._array[wr])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(wr=this._search(e),!(wr<0||wr>=this._array.length)&&this._getKey(this._array[wr])===e))do t(this._array[wr]);while(++wr<this._array.length&&this._getKey(this._array[wr])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,r=this._array.length-1;for(;r>=t;){let n=t+r>>1,o=this._getKey(this._array[n]);if(o>e)r=n-1;else if(o<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},I3=0,SJ=0,Dwe=class extends qe{constructor(){super(),this._decorations=new Pwe(e=>e?.marker.line),this._onDecorationRegistered=this._register(new le),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new le),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(qt(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new Rwe(e);if(t){let r=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),r.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,r){let n=0,o=0;for(let i of this._decorations.getKeyIterator(t))n=i.options.x??0,o=n+(i.options.width??1),e>=n&&e<o&&(!r||(i.options.layer??"bottom")===r)&&(yield i)}forEachDecorationAtCell(e,t,r,n){this._decorations.forEachByKey(t,o=>{I3=o.options.x??0,SJ=I3+(o.options.width??1),e>=I3&&e<SJ&&(!r||(o.options.layer??"bottom")===r)&&n(o)})}},Rwe=class extends Qc{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new le),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new le),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=or.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=or.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},Ewe=1e3,Twe=class{constructor(e,t=Ewe){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let o=n-this._lastRefreshMs,i=this._debounceThresholdMS-o;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},i)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},kJ=20,CJ=!1,lC=class extends qe{constructor(e,t,r,n){super(),this._terminal=e,this._coreBrowserService=r,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let o=this._coreBrowserService.mainDocument;this._accessibilityContainer=o.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=o.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let i=0;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);if(this._topBoundaryFocusListener=i=>this._handleBoundaryFocus(i,0),this._bottomBoundaryFocusListener=i=>this._handleBoundaryFocus(i,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=o.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new Twe(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");CJ?(this._accessibilityContainer.classList.add("debug"),this._rowContainer.classList.add("debug"),this._debugRootContainer=o.createElement("div"),this._debugRootContainer.classList.add("xterm"),this._debugRootContainer.appendChild(o.createTextNode("------start a11y------")),this._debugRootContainer.appendChild(this._accessibilityContainer),this._debugRootContainer.appendChild(o.createTextNode("------end a11y------")),this._terminal.element.insertAdjacentElement("afterend",this._debugRootContainer)):this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(i=>this._handleResize(i.rows))),this._register(this._terminal.onRender(i=>this._refreshRows(i.start,i.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(i=>this._handleChar(i))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
214
+ `))),this._register(this._terminal.onA11yTab(i=>this._handleTab(i))),this._register(this._terminal.onKey(i=>this._handleKey(i.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Le(o,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(qt(()=>{CJ?this._debugRootContainer.remove():this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<kJ+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
215
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===kJ+1&&(this._liveRegion.textContent+=S3.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let r=this._terminal.buffer,n=r.lines.length.toString();for(let o=e;o<=t;o++){let i=r.lines.get(r.ydisp+o),a=[],s=i?.translateToString(!0,void 0,void 0,a)||"",l=(r.ydisp+o+1).toString(),c=this._rowElements[o];c&&(s.length===0?(c.textContent="\xA0",this._rowColumns.set(c,[0,1])):(c.textContent=s,this._rowColumns.set(c,a)),c.setAttribute("aria-posinset",l),c.setAttribute("aria-setsize",n),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let r=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],o=r.getAttribute("aria-posinset"),i=t===0?"1":`${this._terminal.buffer.lines.length}`;if(o===i||e.relatedTarget!==n)return;let a,s;if(t===0?(a=r,s=this._rowElements.pop(),this._rowContainer.removeChild(s)):(a=this._rowElements.shift(),s=r,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),s.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{let l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},r={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(r.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===r.node&&t.offset>r.offset)&&([t,r]=[r,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(r.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(r={node:n,offset:n.textContent?.length??0}),!this._rowContainer.contains(r.node))return;let o=({node:s,offset:l})=>{let c=s instanceof Text?s.parentNode:s,d=parseInt(c?.getAttribute("aria-posinset"),10)-1;if(isNaN(d))return console.warn("row is invalid. Race condition?"),null;let u=this._rowColumns.get(c);if(!u)return console.warn("columns is null. Race condition?"),null;let f=l<u.length?u[l]:u.slice(-1)[0]+1;return f>=this._terminal.cols&&(++d,f=0),{row:d,column:f}},i=o(t),a=o(r);if(!(!i||!a)){if(i.row>a.row||i.row===a.row&&i.column>=a.column)throw new Error("invalid range");this._terminal.select(i.column,i.row,(a.row-i.row)*this._terminal.cols-i.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,r=this._rowColumns.get(e)?.slice(-1)?.[0];if(!r)return;let n=r*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};lC=vr([be(1,uN),be(2,ml),be(3,pl)],lC);var dN=class extends qe{constructor(e,t,r,n,o){super(),this._element=e,this._mouseService=t,this._renderService=r,this._bufferService=n,this._linkProviderService=o,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new le),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new le),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(qt(()=>{Ku(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Le(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Le(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Le(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Le(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let r=e.composedPath();for(let n=0;n<r.length;n++){let o=r[n];if(o.classList.contains("xterm"))break;if(o.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(n=>{n?.forEach(o=>{o.link.dispose&&o.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(let[n,o]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(n)&&(r=this._checkLinkProviderResult(n,e,r)):o.provideLinks(e.y,i=>{if(this._isMouseOut)return;let a=i?.map(s=>({link:s}));this._activeProviderReplies?.set(n,a),r=this._checkLinkProviderResult(n,e,r),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let r=new Set;for(let n=0;n<t.size;n++){let o=t.get(n);if(o)for(let i=0;i<o.length;i++){let a=o[i],s=a.link.range.start.y<e?0:a.link.range.start.x,l=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let c=s;c<=l;c++){if(r.has(c)){o.splice(i--,1);break}r.add(c)}}}}_checkLinkProviderResult(e,t,r){if(!this._activeProviderReplies)return r;let n=this._activeProviderReplies.get(e),o=!1;for(let i=0;i<e;i++)(!this._activeProviderReplies.has(i)||this._activeProviderReplies.get(i))&&(o=!0);if(!o&&n){let i=n.find(a=>this._linkAtPosition(a.link,t));i&&(r=!0,this._handleNewLink(i))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let i=0;i<this._activeProviderReplies.size;i++){let a=this._activeProviderReplies.get(i)?.find(s=>this._linkAtPosition(s.link,t));if(a){r=!0,this._handleNewLink(a);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&$we(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Ku(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:r=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:r=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;let n=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,o=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=o&&(this._clearCurrentLink(n,o),this._lastMouseEvent)){let i=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);i&&this._askForLink(i,!1)}})))}_linkHover(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)}_fireUnderlineEvent(e,t){let r=e.range,n=this._bufferService.buffer.ydisp,o=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-n-1,r.end.x,r.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(o)}_linkLeave(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)}_linkAtPosition(e,t){let r=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,o=t.y*this._bufferService.cols+t.x;return r<=o&&o<=n}_positionFromMouseEvent(e,t,r){let n=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,r,n,o){return{x1:e,y1:t,x2:r,y2:n,cols:this._bufferService.cols,fg:o}}};dN=vr([be(1,fN),be(2,pl),be(3,an),be(4,MJ)],dN);function $we(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var Awe=class extends Swe{constructor(e={}){super(e),this._linkifier=this._register(new mh),this.browser=cee,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new mh),this._onCursorMove=this._register(new le),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new le),this.onKey=this._onKey.event,this._onRender=this._register(new le),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new le),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new le),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new le),this.onBell=this._onBell.event,this._onFocus=this._register(new le),this._onBlur=this._register(new le),this._onA11yCharEmitter=this._register(new le),this._onA11yTabEmitter=this._register(new le),this._onWillOpen=this._register(new le),this._setup(),this._decorationService=this._instantiationService.createInstance(Dwe),this._instantiationService.setService(Tb,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(_0e),this._instantiationService.setService(MJ,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(C3)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(oo.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(oo.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(oo.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(oo.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(qt(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let r,n="";switch(t.index){case 256:r="foreground",n="10";break;case 257:r="background",n="11";break;case 258:r="cursor",n="12";break;default:r="ansi",n="4;"+t.index}switch(t.type){case 0:let o=Lt.toColorRGB(r==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[r]);this.coreService.triggerDataEvent(`${te.ESC}]${n};${xwe(o)}${q3.ST}`);break;case 1:if(r==="ansi")this._themeService.modifyColors(i=>i.ansi[t.index]=Sr.toColor(...t.color));else{let i=r;this._themeService.modifyColors(a=>a[i]=Sr.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(lC,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let r=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,o=t.getWidth(r),i=this._renderService.dimensions.css.cell.width*o,a=this.buffer.y*this._renderService.dimensions.css.cell.height,s=r*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+"px",this.textarea.style.top=a+"px",this.textarea.style.width=i+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Le(this.element,"copy",t=>{this.hasSelection()&&f_e(t,this._selectionService)}));let e=t=>m_e(t,this.textarea,this.coreService,this.optionsService);this._register(Le(this.textarea,"paste",e)),this._register(Le(this.element,"paste",e)),dee?this._register(Le(this.element,"mousedown",t=>{t.button===2&&SY(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Le(this.element,"contextmenu",t=>{SY(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),yN&&this._register(Le(this.element,"auxclick",t=>{t.button===1&&EJ(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Le(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Le(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Le(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Le(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Le(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Le(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Le(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Le(this.screenElement,"mousemove",o=>this.updateCursorStyle(o))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let r=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",w3.get()),mee||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>r.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(b0e,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(ml,this._coreBrowserService),this._register(Le(this.textarea,"focus",o=>this._handleTextAreaFocus(o))),this._register(Le(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Y3,this._document,this._helperContainer),this._instantiationService.setService(dC,this._charSizeService),this._themeService=this._instantiationService.createInstance(rN),this._instantiationService.setService(ph,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(iC),this._instantiationService.setService(LJ,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(eN,this.rows,this.screenElement)),this._instantiationService.setService(pl,this._renderService),this._register(this._renderService.onRenderedViewportChange(o=>this._onRender.fire(o))),this.onResize(o=>this._renderService.resize(o.cols,o.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(K3,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(J3),this._instantiationService.setService(fN,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(dN,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(Z3,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(o=>{super.scrollLines(o,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(tN,this.element,this.screenElement,n)),this._instantiationService.setService(__e,this._selectionService),this._register(this._selectionService.onRequestScrollLines(o=>this.scrollLines(o.amount,o.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(o=>this._renderService.handleSelectionChanged(o.start,o.end,o.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(o=>{this.textarea.value=o,this.textarea.focus(),this.textarea.select()})),this._register(oo.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(G3,this.screenElement)),this._register(Le(this.element,"mousedown",o=>this._selectionService.handleMouseDown(o))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(lC,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",o=>this._handleScreenReaderModeOptionChange(o))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(nC,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",o=>{!this._overviewRulerRenderer&&o&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(nC,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Q3,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function r(i){let a=e._mouseService.getMouseReportCoords(i,e.screenElement);if(!a)return!1;let s,l;switch(i.overrideType||i.type){case"mousemove":l=32,i.buttons===void 0?(s=3,i.button!==void 0&&(s=i.button<3?i.button:3)):s=i.buttons&1?0:i.buttons&4?1:i.buttons&2?2:3;break;case"mouseup":l=0,s=i.button<3?i.button:3;break;case"mousedown":l=1,s=i.button<3?i.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(i)===!1)return!1;let c=i.deltaY;if(c===0||e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;l=c<0?0:1,s=4;break;default:return!1}return l===void 0||s===void 0||s>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:s,action:l,ctrl:i.ctrlKey,alt:i.altKey,shift:i.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o={mouseup:i=>(r(i),i.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(i)),wheel:i=>(r(i),this.cancel(i,!0)),mousedrag:i=>{i.buttons&&r(i)},mousemove:i=>{i.buttons||r(i)}};this._register(this.coreMouseService.onProtocolChange(i=>{i?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(i)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),i&8?n.mousemove||(t.addEventListener("mousemove",o.mousemove),n.mousemove=o.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),i&16?n.wheel||(t.addEventListener("wheel",o.wheel,{passive:!1}),n.wheel=o.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),i&2?n.mouseup||(n.mouseup=o.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),i&4?n.mousedrag||(n.mousedrag=o.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Le(t,"mousedown",i=>{if(i.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(i)))return r(i),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(i)})),this._register(Le(t,"wheel",i=>{if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(i)===!1)return!1;if(!this.buffer.hasScrollback){if(i.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(i,!0);let a=te.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(i.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(a,!0),this.cancel(i,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){RJ(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,r){this._selectionService.setSelection(e,t,r)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let r=Cwe(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),r.type===3||r.type===2){let n=this.rows-1;return this.scrollLines(r.type===2?-n:n),this.cancel(e,!0)}if(r.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((r.key===te.ETX||r.key===te.CR)&&(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?r:r&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(Owe(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Er));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(te.ESC+"[I"):this.coreService.triggerDataEvent(te.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),r=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${te.ESC}[4;${r};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),o=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${te.ESC}[6;${o};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function Owe(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var zwe=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=()=>this._wrappedAddonDispose(r),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},Nwe=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new Ei)}translateToString(e,t,r){return this._line.translateToString(e,t,r)}},PJ=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new Nwe(t)}getNullCell(){return new Ei}},Fwe=class extends qe{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new le),this.onBufferChange=this._onBufferChange.event,this._normal=new PJ(this._core.buffers.normal,"normal"),this._alternate=new PJ(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},Lwe=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,r=>t(r.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(r,n)=>t(r,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},Mwe=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},Bwe=["cols","rows"],ls=0,wee=class extends qe{constructor(e){super(),this._core=this._register(new Awe(e)),this._addonManager=this._register(new zwe),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],r=(n,o)=>{this._checkReadonlyOptions(n),this._core.options[n]=o};for(let n in this._core.options){let o={get:t.bind(this,n),set:r.bind(this,n)};Object.defineProperty(this._publicOptions,n,o)}}_checkReadonlyOptions(e){if(Bwe.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new Lwe(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new Mwe(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new Fwe(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
216
+ `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return w3.get()},set promptLabel(e){w3.set(e)},get tooMuchOutput(){return S3.get()},set tooMuchOutput(e){S3.set(e)}}}_verifyIntegers(...e){for(ls of e)if(ls===1/0||isNaN(ls)||ls%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(ls of e)if(ls&&(ls===1/0||isNaN(ls)||ls%1!==0||ls<0))throw new Error("This API only accepts positive integers")}};var ln=y(R(),1);function See(e){try{let t=JSON.parse(e);switch(t.t){case"ready":case"restarting":return{t:t.t};case"exit":return typeof t.code=="number"?{t:"exit",code:t.code}:null;case"error":return typeof t.message=="string"?{t:"error",message:t.message.slice(0,500)}:null;default:return null}}catch{return null}}var kee=[500,1e3,2e3,4e3,8e3],hC=class{constructor(t,r){Et(this,"sessionId",t);Et(this,"events",r);Et(this,"socket",null);Et(this,"timer");Et(this,"attempt",0);Et(this,"closed",!1);Et(this,"finished",!1);Et(this,"suspended",!1);Et(this,"size",{cols:120,rows:30})}open(t,r){this.size={cols:t,rows:r},this.connect()}connect(){this.events.state(this.attempt===0?"connecting":"reconnecting");let r=(location.protocol==="https:"?"wss:":"ws:")+"//"+location.host+"/api/sessions/"+this.sessionId+"/terminal?cols="+this.size.cols+"&rows="+this.size.rows,n=new WebSocket(r);n.binaryType="arraybuffer",this.socket=n,n.onmessage=o=>{if(o.data instanceof ArrayBuffer){this.events.output(new Uint8Array(o.data));return}let i=typeof o.data=="string"?See(o.data):null;i&&(i.t==="ready"?(this.attempt=0,this.events.reset(),this.events.state("connected")):i.t==="exit"?(this.finished=!0,this.events.state("ended","The agent exited (code "+i.code+").")):i.t==="error"&&(this.finished=!0,this.events.state("failed",i.message)))},n.onclose=()=>{if(this.socket!==n||(this.socket=null,this.closed||this.finished||this.suspended))return;let o=kee[Math.min(this.attempt,kee.length-1)];this.attempt++,this.events.state("reconnecting"),this.timer=window.setTimeout(()=>this.connect(),o)}}send(t){this.socket?.readyState===WebSocket.OPEN&&this.socket.send(t)}resize(t,r){this.size={cols:t,rows:r},this.socket?.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({t:"resize",cols:t,rows:r}))}suspend(){if(this.closed||this.finished)return;this.suspended=!0,window.clearTimeout(this.timer);let t=this.socket;this.socket=null,t?.close(1e3)}resume(){!this.suspended||this.closed||this.finished||(this.suspended=!1,this.attempt=0,this.connect())}close(){this.closed=!0,window.clearTimeout(this.timer),this.socket?.close(1e3),this.socket=null}};var Eee=y(O(),1),Cee={background:"#0e1015",foreground:"#e6e8ee",cursor:"#e6e8ee",selectionBackground:"#3b4252",black:"#1a1d24",brightBlack:"#6c7383"},Pee={background:"#ffffff",foreground:"#1f2328",cursor:"#1f2328",selectionBackground:"#c7d2fe",black:"#1f2328",brightBlack:"#6e7781"},gC=[11,12,13,14,15,16,18,20],jwe=2*6e4;function Dee(e,t){/^https?:\/\//i.test(t)&&window.confirm(`Open this link in a new tab?
217
+
218
+ `+t.slice(0,300))&&window.open(t,"_blank","noopener,noreferrer")}var Ree=(0,ln.forwardRef)(function({sessionId:t,fontSize:r,onState:n,onReady:o},i){let a=(0,ln.useRef)(null),s=(0,ln.useRef)(null),l=(0,ln.useRef)(null),c=(0,ln.useRef)(null),d=(0,ln.useRef)(()=>{}),u=pd("dark")==="dark",f=(0,ln.useRef)(u),m=(0,ln.useRef)(r);return(0,ln.useImperativeHandle)(i,()=>({find:(p,h=!1)=>h?l.current?.findPrevious(p)??!1:l.current?.findNext(p)??!1,clearFind:()=>l.current?.clearDecorations(),type:p=>d.current(p),setFontSize:p=>{s.current&&(s.current.options.fontSize=p,c.current?.fit())},focus:()=>s.current?.focus()}),[]),(0,ln.useEffect)(()=>{let p=a.current;if(!p)return;let h=new DQ,b=new eY,v=new wee({fontFamily:'"Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, Menlo, monospace',fontSize:m.current,lineHeight:1.15,cursorBlink:!0,scrollback:1e4,allowProposedApi:!0,theme:f.current?Cee:Pee,linkHandler:{activate:Dee}});v.loadAddon(h),v.loadAddon(b),v.loadAddon(new _Y(Dee)),v.loadAddon(new yY),v.unicode.activeVersion="11",v.open(p),v.attachCustomKeyEventHandler(E=>E.type!=="keydown"||!E.ctrlKey||E.shiftKey||E.altKey||E.key.toLowerCase()!=="c"||!v.hasSelection()?!0:(navigator.clipboard?.writeText(v.getSelection()).catch(()=>{}),v.clearSelection(),!1)),s.current=v,l.current=b,c.current=h,h.fit();let x=new hC(t,{state:n,output:E=>v.write(E),reset:()=>v.reset()}),_=new TextEncoder;d.current=E=>x.send(_.encode(E)),v.onData(E=>x.send(_.encode(E))),v.onBinary(E=>x.send(Uint8Array.from(E,B=>B.charCodeAt(0)))),v.onResize(({cols:E,rows:B})=>x.resize(E,B));let I=new ResizeObserver(()=>h.fit());I.observe(p);let S,w=()=>{window.clearTimeout(S),document.hidden?S=window.setTimeout(()=>x.suspend(),jwe):x.resume()},P=()=>x.close();return document.addEventListener("visibilitychange",w),window.addEventListener("pagehide",P),o(()=>x.close()),x.open(v.cols,v.rows),v.focus(),()=>{window.clearTimeout(S),document.removeEventListener("visibilitychange",w),window.removeEventListener("pagehide",P),I.disconnect(),x.close(),v.dispose(),s.current=null,l.current=null,c.current=null,d.current=()=>{}}},[t,n,o]),(0,ln.useEffect)(()=>{s.current&&(s.current.options.theme=u?Cee:Pee)},[u]),(0,Eee.jsx)("div",{ref:a,className:"terminal-host"})});var Ke=y(O(),1),Uwe=ju("sessions.list"),Vwe={connecting:{text:"Connecting",color:"gray"},connected:{text:"Connected",color:"green"},reconnecting:{text:"Reconnecting",color:"orange"},ended:{text:"Ended",color:"gray"},failed:{text:"Cannot connect",color:"red"}},Hwe=[{label:"Esc",bytes:"\x1B"},{label:"Tab",bytes:" "},{label:"Ctrl+C",bytes:""},{label:"\u2191",bytes:"\x1B[A"},{label:"\u2193",bytes:"\x1B[B"},{label:"\u2190",bytes:"\x1B[D"},{label:"\u2192",bytes:"\x1B[C"},{label:"Enter",bytes:"\r"},{label:"Shift+Tab",bytes:"\x1B[Z"}];function Wwe({terminal:e,close:t}){let[r,n]=(0,Ti.useState)(""),[o,i]=(0,Ti.useState)(!1),a=l=>i(r!==""&&!e?.find(r,l)),s=()=>{e?.clearFind(),t(),e?.focus()};return(0,Ke.jsx)(Qi,{className:"terminal-search",shadow:"md",p:6,withBorder:!0,children:(0,Ke.jsxs)(De,{gap:4,wrap:"nowrap",children:[(0,Ke.jsx)(er,{size:"xs",w:220,autoFocus:!0,placeholder:"Find in the terminal",value:r,error:o,onChange:l=>n(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"&&a(l.shiftKey),l.key==="Escape"&&s()},"aria-label":"Find in the terminal"}),(0,Ke.jsx)(bt,{"aria-label":"Previous",onClick:()=>a(!0),children:(0,Ke.jsx)(iE,{size:16})}),(0,Ke.jsx)(bt,{"aria-label":"Next",onClick:()=>a(!1),children:(0,Ke.jsx)(Uv,{size:16})}),(0,Ke.jsx)(bt,{"aria-label":"Close search",onClick:s,children:(0,Ke.jsx)(Xv,{size:16})})]})})}function Tee({id:e}){let[t,r]=(0,Ti.useState)("connecting"),[n,o]=(0,Ti.useState)(),[i,a]=(0,Ti.useState)(!1),[s,l]=p2({key:"terminal-font-size",defaultValue:14}),c=(0,Ti.useRef)(null),d=(0,Ti.useRef)(()=>{}),{toggle:u,fullscreen:f}=g2(),m=ld("(pointer: coarse)"),h=il(Uwe,{}).data?.sessions.find(S=>S.id===e),b=(0,Ti.useCallback)((S,w)=>{r(S),o(w)},[]),v=(0,Ti.useCallback)(S=>{d.current=S},[]),x=S=>{let w=gC.indexOf(s),P=gC[Math.max(0,Math.min(gC.length-1,(w<0?3:w)+S))];l(P),c.current?.setFontSize(P)};Nh([["mod+shift+F",()=>a(!0)]],[],!0);let _=Vwe[t],I=()=>{d.current(),Yr(To("sessions"))};return(0,Ke.jsxs)("div",{className:"terminal-page",style:{position:"relative"},children:[(0,Ke.jsxs)(De,{gap:"sm",px:"sm",py:6,wrap:"nowrap",className:"terminal-toolbar",children:[(0,Ke.jsx)(kt,{label:"Back to sessions (the session keeps running)",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Back",onClick:I,children:(0,Ke.jsx)(tE,{size:18})})}),h&&(0,Ke.jsx)(Vu,{name:h.harness,size:28}),(0,Ke.jsxs)(F,{style:{minWidth:0},children:[(0,Ke.jsx)(ye,{fw:650,size:"sm",truncate:!0,lh:1.2,children:h?h.harness+" \xB7 "+(h.projectName??h.cwd):"Session "+e}),(0,Ke.jsx)(ye,{size:"xs",c:"dimmed",truncate:!0,lh:1.2,ff:"monospace",children:n??e})]}),(0,Ke.jsx)(In,{color:_.color,variant:"dot",style:{flex:"none"},children:_.text}),(0,Ke.jsxs)(De,{gap:2,ml:"auto",wrap:"nowrap",children:[(0,Ke.jsx)(kt,{label:"Find (Ctrl+Shift+F)",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Find",onClick:()=>a(S=>!S),children:(0,Ke.jsx)(kn,{size:18})})}),(0,Ke.jsx)(kt,{label:"Smaller text",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Smaller text",onClick:()=>x(-1),visibleFrom:"xs",children:(0,Ke.jsx)(CE,{size:18})})}),(0,Ke.jsx)(kt,{label:"Bigger text",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Bigger text",onClick:()=>x(1),visibleFrom:"xs",children:(0,Ke.jsx)(PE,{size:18})})}),(0,Ke.jsx)(kt,{label:f?"Leave full screen":"Full screen",children:(0,Ke.jsx)(bt,{size:"lg","aria-label":"Full screen",onClick:()=>{u()},children:f?(0,Ke.jsx)(xE,{size:18}):(0,Ke.jsx)(vE,{size:18})})}),(0,Ke.jsx)(kt,{label:"Close this view; the session keeps running",children:(0,Ke.jsx)(ht,{size:"xs",variant:"default",ml:6,onClick:I,children:"Detach"})})]})]}),i&&(0,Ke.jsx)(Wwe,{terminal:c.current,close:()=>a(!1)}),(0,Ke.jsx)(Ree,{ref:c,sessionId:e,fontSize:s,onState:b,onReady:v}),m&&(0,Ke.jsx)("div",{className:"key-bar",role:"toolbar","aria-label":"Keys",children:Hwe.map(S=>(0,Ke.jsx)(ht,{size:"compact-sm",variant:"default",onClick:()=>{c.current?.type(S.bytes),c.current?.focus()},children:S.label},S.label))})]})}var ute=y(R(),1);var ms=y(R(),1);var ete=y(R(),1);var cn=y(R(),1);var vC=y(R(),1);function Zwe(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}var Gwe=typeof window<"u"?vC.useLayoutEffect:vC.useEffect;function xo(e,t){Gwe(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function $ee(e,t){e&&Zwe(e),xo(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),xo(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),xo(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),xo(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),xo(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),xo(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),xo(`mantine-form:${e}:clear-errors`,t.clearErrors),xo(`mantine-form:${e}:reset`,t.reset),xo(`mantine-form:${e}:validate`,t.validate),xo(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),xo(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),xo(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),xo(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),xo(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),xo(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),xo(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),xo(`mantine-form:${e}:reset-touched`,t.resetTouched)}function Aee(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){let{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}var hl=y(R(),1);function Ob(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{let n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function Oee(e){let[t,r]=(0,hl.useState)(Ob(e)),n=(0,hl.useRef)(t),o=(0,hl.useCallback)(l=>{r(c=>{let d=Ob(typeof l=="function"?l(c):l);return n.current=d,d})},[]),i=(0,hl.useCallback)(()=>o({}),[]),a=(0,hl.useCallback)(l=>{n.current[l]!==void 0&&o(c=>{let d={...c};return delete d[l],d})},[t]),s=(0,hl.useCallback)((l,c)=>{c==null||c===!1?a(l):n.current[l]!==c&&o(d=>({...d,[l]:c}))},[t]);return{errorsState:t,setErrors:o,clearErrors:i,setFieldError:s,clearFieldError:a}}var Nb=y(R(),1);function zb(e,t){if(t===null||typeof t!="object")return{};let r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function zee(e,t){let r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function _N(e,t,r,n){if(t===void 0)return r;let o=`${String(e)}`,i=r;n===-1&&(i=zb(`${o}.${t}`,i));let a={...i},s=new Set;return Object.entries(i).filter(([l])=>{if(!l.startsWith(`${o}.`))return!1;let c=zee(l,o);return Number.isNaN(c)?!1:c>=t}).forEach(([l,c])=>{let d=zee(l,o),u=l.replace(`${o}.${d}`,`${o}.${d+n}`);a[u]=c,s.add(u),s.has(l)||delete a[l]}),a}function Nee(e,{from:t,to:r},n){let o=`${e}.${t}`,i=`${e}.${r}`,a={...n},s=new Set;return Object.keys(n).forEach(l=>{if(s.has(l))return;let c,d;if(l.startsWith(o)?(c=l,d=l.replace(o,i)):l.startsWith(i)&&(c=l.replace(i,o),d=l),c&&d){let u=a[c],f=a[d];f===void 0?delete a[c]:a[c]=f,u===void 0?delete a[d]:a[d]=u,s.add(c),s.add(d)}}),a}function Fee(e,t,r){typeof r.value=="object"&&(r.value=Yu(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function Yu(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(Yu(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(Yu(s),Yu(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Yu(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)Fee(o,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(o,r=n[t])&&o[r]===e[r]||Fee(o,r,Object.getOwnPropertyDescriptor(e,r))}return o||e}function xC(e){return typeof e!="string"?[]:e.split(".")}function Mt(e,t){let r=xC(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let o=1;o<r.length&&n!=null;o+=1)n=n[r[o]];return n}function us(e,t,r){let n=xC(e);if(n.length===0)return r;let o=Yu(r);if(n.length===1)return o[n[0]]=t,o;let i=o[n[0]];for(let a=1;a<n.length-1;a+=1){if(i===void 0)return o;i=i[n[a]]}return i[n[n.length-1]]=t,o}function Lee(e,{from:t,to:r},n){let o=Mt(e,n);if(!Array.isArray(o))return n;let i=[...o],a=o[t];return i.splice(t,1),i.splice(r,0,a),us(e,i,n)}function Mee(e,t,r,n){let o=Mt(e,n);if(!Array.isArray(o))return n;let i=[...o];return i.splice(typeof r=="number"?r:i.length,0,t),us(e,i,n)}function Bee(e,t,r){let n=Mt(e,r);return Array.isArray(n)?us(e,n.filter((o,i)=>i!==t),r):r}function jee(e,t,r,n){let o=Mt(e,n);if(!Array.isArray(o)||o.length<=r)return n;let i=[...o];return i[r]=t,us(e,i,n)}function Uee({$values:e,$errors:t,$status:r}){let n=(0,Nb.useCallback)((s,l)=>{r.clearFieldDirty(s),t.setErrors(c=>Nee(s,l,c)),e.setValues({values:Lee(s,l,e.refValues.current),updateState:!0})},[]),o=(0,Nb.useCallback)((s,l)=>{r.clearFieldDirty(s),t.setErrors(c=>_N(s,l,c,-1)),e.setValues({values:Bee(s,l,e.refValues.current),updateState:!0})},[]),i=(0,Nb.useCallback)((s,l,c)=>{r.clearFieldDirty(s),t.setErrors(d=>_N(s,c,d,1)),e.setValues({values:Mee(s,l,c,e.refValues.current),updateState:!0})},[]),a=(0,Nb.useCallback)((s,l,c)=>{r.clearFieldDirty(s),e.setValues({values:jee(s,c,l,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:o,insertListItem:i,replaceListItem:a}}var Ur=y(R(),1),Fb=y(Hee(),1);function gh(e,t){let r=Object.keys(e);if(typeof t=="string"){let n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function Wee({initialDirty:e,initialTouched:t,mode:r,$values:n}){let[o,i]=(0,Ur.useState)(t),[a,s]=(0,Ur.useState)(e),l=(0,Ur.useRef)(t),c=(0,Ur.useRef)(e),d=(0,Ur.useCallback)(w=>{let P=typeof w=="function"?w(l.current):w;l.current=P,r==="controlled"&&i(P)},[]),u=(0,Ur.useCallback)((w,P=!1)=>{let E=typeof w=="function"?w(c.current):w;c.current=E,(r==="controlled"||P)&&s(E)},[]),f=(0,Ur.useCallback)(()=>d({}),[]),m=(0,Ur.useCallback)(w=>{let P=w?{...n.refValues.current,...w}:n.refValues.current;n.setValuesSnapshot(P),u({})},[]),p=(0,Ur.useCallback)((w,P)=>{d(E=>gh(E,w)===P?E:{...E,[w]:P})},[]),h=(0,Ur.useCallback)((w,P,E)=>{u(B=>gh(B,w)===P?B:{...B,[w]:P},E)},[]),b=(0,Ur.useCallback)((w,P)=>{let E=gh(c.current,w),B=!(0,Fb.default)(Mt(w,n.getValuesSnapshot()),P),H=zb(w,c.current);H[w]=B,u(H,E!==B)},[]),v=(0,Ur.useCallback)(w=>gh(l.current,w),[]),x=(0,Ur.useCallback)(w=>u(P=>{if(typeof w!="string")return P;let E=zb(w,P);return delete E[w],(0,Fb.default)(E,P)?P:E}),[]),_=(0,Ur.useCallback)(w=>{if(w){let E=Mt(w,c.current);if(typeof E=="boolean")return E;let B=Mt(w,n.refValues.current),H=Mt(w,n.valuesSnapshot.current);return!(0,Fb.default)(B,H)}return Object.keys(c.current).length>0?gh(c.current):!(0,Fb.default)(n.refValues.current,n.valuesSnapshot.current)},[]),I=(0,Ur.useCallback)(()=>c.current,[]),S=(0,Ur.useCallback)(()=>l.current,[]);return{touchedState:o,dirtyState:a,touchedRef:l,dirtyRef:c,setTouched:d,setDirty:u,resetDirty:m,resetTouched:f,isTouched:v,setFieldTouched:p,setFieldDirty:h,setTouchedState:i,setDirtyState:s,clearFieldDirty:x,isDirty:_,getDirty:I,getTouched:S,setCalculatedFieldDirty:b}}var An=y(R(),1);function Zee({initialValues:e,onValuesChange:t,mode:r}){let n=(0,An.useRef)(!1),[o,i]=(0,An.useState)(e||{}),a=(0,An.useRef)(o),s=(0,An.useRef)(o),l=(0,An.useCallback)(({values:h,subscribers:b,updateState:v=!0,mergeWithPreviousValues:x=!0})=>{let _=a.current,I=h instanceof Function?h(a.current):h,S=x?{..._,...I}:I;a.current=S,v&&i(S),t?.(S,_),b?.filter(Boolean).forEach(w=>w({updatedValues:S,previousValues:_}))},[t]),c=(0,An.useCallback)(h=>{let b=Mt(h.path,a.current),v=h.value instanceof Function?h.value(b):h.value;if(b!==v){let x=a.current,_=us(h.path,v,a.current);l({values:_,updateState:h.updateState}),h.subscribers?.filter(Boolean).forEach(I=>I({path:h.path,updatedValues:_,previousValues:x}))}},[l]),d=(0,An.useCallback)(h=>{s.current=h},[]),u=(0,An.useCallback)((h,b)=>{n.current||(n.current=!0,l({values:h,updateState:r==="controlled"}),d(h),b())},[l]),f=(0,An.useCallback)(()=>{l({values:s.current,updateState:!0,mergeWithPreviousValues:!1})},[l]),m=(0,An.useCallback)(()=>a.current,[]),p=(0,An.useCallback)(()=>s.current,[]);return{initialized:n,stateValues:o,refValues:a,valuesSnapshot:s,setValues:l,setFieldValue:c,resetValues:f,setValuesSnapshot:d,initialize:u,getValues:m,getValuesSnapshot:p}}var Ju=y(R(),1);function Gee({$status:e}){let t=(0,Ju.useRef)({}),r=(0,Ju.useCallback)((o,i)=>{(0,Ju.useEffect)(()=>(t.current[o]=t.current[o]||[],t.current[o].push(i),()=>{t.current[o]=t.current[o].filter(a=>a!==i)}),[i])},[]),n=(0,Ju.useCallback)(o=>t.current[o]?t.current[o].map(i=>a=>i({previousValue:Mt(o,a.previousValues),value:Mt(o,a.updatedValues),touched:e.isTouched(o),dirty:e.isDirty(o)})):[],[]);return{subscribers:t,watch:r,getFieldSubscribers:n}}function IN(e,t){return e?`${e}-${t.toString()}`:t.toString()}var bC=Symbol("root-rule");function qee(e){let t=Ob(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function wN(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,i)=>{let a=e[i],s=`${r===""?"":`${r}.`}${i}`,l=Mt(s,t),c=!1;return typeof a=="function"&&(o[s]=a(l,t,s)),typeof a=="object"&&Array.isArray(l)&&(c=!0,l.forEach((d,u)=>wN(a,t,`${s}.${u}`,o)),bC in a&&(o[s]=a[bC](l,t,s))),typeof a=="object"&&typeof l=="object"&&l!==null&&(c||wN(a,t,s,o),bC in a&&(o[s]=a[bC](l,t,s))),o},n)}function Lb(e,t){return qee(typeof e=="function"?e(t):wN(e,t))}function Mb(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};let n=Lb(t,r),o=Object.keys(n.errors).find(i=>e.split(".").every((a,s)=>a===i.split(".")[s]));return{hasError:!!o,error:o?n.errors[o]:null}}var Kee="__MANTINE_FORM_INDEX__";function SN(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${Kee}`)):!1:!1}function kN({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:o={},initialTouched:i={},clearInputErrorOnChange:a=!0,validateInputOnChange:s=!1,validateInputOnBlur:l=!1,onValuesChange:c,transformValues:d=h=>h,enhanceGetInputProps:u,validate:f,onSubmitPreventDefault:m="always",touchTrigger:p="change"}={}){let h=Oee(n),b=Zee({initialValues:r,onValuesChange:c,mode:t}),v=Wee({initialDirty:o,initialTouched:i,$values:b,mode:t}),x=Uee({$values:b,$errors:h,$status:v}),_=Gee({$status:v}),[I,S]=(0,cn.useState)(0),[w,P]=(0,cn.useState)({}),[E,B]=(0,cn.useState)(!1),H=(0,cn.useCallback)(()=>{b.resetValues(),h.clearErrors(),v.resetDirty(),v.resetTouched(),t==="uncontrolled"&&S(Q=>Q+1)},[]),Z=(0,cn.useCallback)(Q=>{a&&h.clearErrors(),t==="uncontrolled"&&S(oe=>oe+1),Object.keys(_.subscribers.current).forEach(oe=>{let Ie=Mt(oe,b.refValues.current),se=Mt(oe,Q);Ie!==se&&_.getFieldSubscribers(oe).forEach($e=>$e({previousValues:Q,updatedValues:b.refValues.current}))})},[a]),K=(0,cn.useCallback)(Q=>{let oe=b.refValues.current;b.initialize(Q,()=>t==="uncontrolled"&&S(Ie=>Ie+1)),Z(oe)},[Z]),T=(0,cn.useCallback)((Q,oe,Ie)=>{let se=SN(Q,s),$e=oe instanceof Function?oe(Mt(Q,b.refValues.current)):oe;v.setCalculatedFieldDirty(Q,$e),p==="change"&&v.setFieldTouched(Q,!0),!se&&a&&h.clearFieldError(Q),b.setFieldValue({path:Q,value:oe,updateState:t==="controlled",subscribers:[..._.getFieldSubscribers(Q),se?Ve=>{let Je=Mb(Q,f,Ve.updatedValues);Je.hasError?h.setFieldError(Q,Je.error):h.clearFieldError(Q)}:null,Ie?.forceUpdate!==!1&&t!=="controlled"?()=>P(Ve=>({...Ve,[Q]:(Ve[Q]||0)+1})):null]})},[c,f]),k=(0,cn.useCallback)(Q=>{let oe=b.refValues.current;b.setValues({values:Q,updateState:t==="controlled"}),Z(oe)},[c,Z]),$=(0,cn.useCallback)(()=>{let Q=Lb(f,b.refValues.current);return h.setErrors(Q.errors),Q},[f]),C=(0,cn.useCallback)(Q=>{let oe=Mb(Q,f,b.refValues.current);return oe.hasError?h.setFieldError(Q,oe.error):h.clearFieldError(Q),oe},[f]),A=(Q,{type:oe="input",withError:Ie=!0,withFocus:se=!0,...$e}={})=>{let Je={onChange:Aee(at=>T(Q,at,{forceUpdate:!1})),"data-path":IN(e,Q)};return Ie&&(Je.error=h.errorsState[Q]),oe==="checkbox"?Je[t==="controlled"?"checked":"defaultChecked"]=Mt(Q,b.refValues.current):Je[t==="controlled"?"value":"defaultValue"]=Mt(Q,b.refValues.current),se&&(Je.onFocus=()=>v.setFieldTouched(Q,!0),Je.onBlur=()=>{if(SN(Q,l)){let at=Mb(Q,f,b.refValues.current);at.hasError?h.setFieldError(Q,at.error):h.clearFieldError(Q)}}),Object.assign(Je,u?.({inputProps:Je,field:Q,options:{type:oe,withError:Ie,withFocus:se,...$e},form:me}))},D=(Q,oe)=>Ie=>{m==="always"&&Ie?.preventDefault();let se=$();if(se.hasErrors)m==="validation-failed"&&Ie?.preventDefault(),oe?.(se.errors,b.refValues.current,Ie);else{let $e=Q?.(d(b.refValues.current),Ie);$e instanceof Promise&&(B(!0),$e.finally(()=>B(!1)))}},N=Q=>d(Q||b.refValues.current),U=(0,cn.useCallback)(Q=>{Q.preventDefault(),H()},[]),G=(0,cn.useCallback)(Q=>Q?!Mb(Q,f,b.refValues.current).hasError:!Lb(f,b.refValues.current).hasErrors,[f]),re=Q=>`${I}-${Q}-${w[Q]||0}`,he=(0,cn.useCallback)(Q=>document.querySelector(`[data-path="${IN(e,Q)}"]`),[]),me={watch:_.watch,initialized:b.initialized.current,values:b.stateValues,getValues:b.getValues,getInitialValues:b.getValuesSnapshot,setInitialValues:b.setValuesSnapshot,initialize:K,setValues:k,setFieldValue:T,submitting:E,setSubmitting:B,errors:h.errorsState,setErrors:h.setErrors,setFieldError:h.setFieldError,clearFieldError:h.clearFieldError,clearErrors:h.clearErrors,resetDirty:v.resetDirty,setTouched:v.setTouched,setDirty:v.setDirty,isTouched:v.isTouched,resetTouched:v.resetTouched,isDirty:v.isDirty,getTouched:v.getTouched,getDirty:v.getDirty,reorderListItem:x.reorderListItem,insertListItem:x.insertListItem,removeListItem:x.removeListItem,replaceListItem:x.replaceListItem,reset:H,validate:$,validateField:C,getInputProps:A,onSubmit:D,onReset:U,isValid:G,getTransformedValues:N,key:re,getInputNode:he};return $ee(e,me),me}function Xee(e,t){return r=>{try{return yp(e,r),{}}catch(n){if(n instanceof ax){let o={};return t?.errorPriority==="first"&&n.issues.reverse(),n.issues.forEach(i=>{o[i.path.join(".")]=i.message}),o}throw n}}}var _C=y(R(),1);var nr=y(O(),1),yC="@custom";function Yee(e){return(e.choices??[]).map(t=>({value:String(t.value),label:t.label}))}function Jee(e,t){return e.choices?.find(r=>String(r.value)===t)?.value}function qwe({field:e,value:t,onChange:r,error:n}){let o=e.choices?.some(l=>l.value===t)??!1,[i,a]=(0,_C.useState)(!o&&t!==void 0&&e.open!==void 0),s=[...Yee(e),...e.open?[{value:yC,label:"Custom\u2026"}]:[]];return(0,nr.jsxs)(Ue,{gap:"xs",children:[(0,nr.jsx)(Ws,{label:e.label,description:e.help,data:s,value:i?yC:o?String(t):null,error:i?void 0:n,allowDeselect:!1,onChange:l=>{a(l===yC),l!==yC&&r(Jee(e,l))}}),i&&e.open&&(0,nr.jsx)(CN,{field:{...e.open,label:"Your own value",help:void 0},value:t,onChange:r,error:n})]})}function Bb({field:e,value:t,onPick:r}){let n=e.pathKind??e.element?.pathKind??"dir";return(0,nr.jsx)(kt,{label:n==="file"?"Choose a file":"Choose a folder",children:(0,nr.jsx)(bt,{variant:"default",size:36,"aria-label":"Browse",onClick:()=>{wk(n,t,e.label).then(o=>o&&r(o))},children:(0,nr.jsx)(Wv,{size:18,stroke:1.6})})})}function Qee({field:e,value:t,onChange:r,error:n}){let[o,i]=(0,_C.useState)(t===void 0?"":JSON.stringify(t,null,2)),[a,s]=(0,_C.useState)();return(0,nr.jsx)(dv,{label:e.label,description:e.help,value:o,error:a??n,formatOnBlur:!0,autosize:!0,minRows:3,onChange:l=>{i(l);try{r(l.trim()===""?void 0:JSON.parse(l)),s(void 0)}catch{s("This is not valid JSON yet.")}}})}function CN(e){let{field:t,value:r,onChange:n,error:o}=e,i={label:t.label,description:t.help,error:o};switch(t.kind){case"boolean":return(0,nr.jsx)(ja,{label:t.label,description:t.help,checked:r===!0,error:o,onChange:a=>n(a.currentTarget.checked)});case"enum":return(0,nr.jsx)(qwe,{...e});case"number":return(0,nr.jsx)(Qd,{...i,value:typeof r=="number"?r:"",min:t.min,max:t.max,allowDecimal:!t.integer,placeholder:t.range,onChange:a=>n(typeof a=="number"?a:void 0)});case"secret":return(0,nr.jsx)(Yd,{...i,value:typeof r=="string"?r:"",placeholder:"Type a new value",autoComplete:"off",onChange:a=>n(a.currentTarget.value)});case"path":return(0,nr.jsxs)(De,{gap:"xs",align:"flex-end",wrap:"nowrap",children:[(0,nr.jsx)(er,{...i,style:{flex:1},ff:"monospace",placeholder:t.literals?.length?t.literals.join(" or ")+", or a path":"C:\\\u2026",value:typeof r=="string"?r:"",onChange:a=>n(a.currentTarget.value)}),(0,nr.jsx)(Bb,{field:t,value:typeof r=="string"?r:void 0,onPick:n})]});case"text":return(0,nr.jsx)(er,{...i,value:typeof r=="string"?r:"",onChange:a=>n(a.currentTarget.value)});case"list":{let a=Array.isArray(r)?r.map(s=>String(s)):[];return t.element?.kind==="enum"?(0,nr.jsx)(qd,{...i,data:Yee(t.element),value:a,onChange:s=>n(s.map(l=>Jee(t.element,l)??l))}):t.element?.kind==="path"?(0,nr.jsxs)(De,{gap:"xs",align:"flex-end",wrap:"nowrap",children:[(0,nr.jsx)(gc,{...i,style:{flex:1},value:a,onChange:n,clearable:!0}),(0,nr.jsx)(Bb,{field:t,value:void 0,onPick:s=>n(a.includes(s)?a:[...a,s])})]}):t.element?.kind==="text"?(0,nr.jsx)(gc,{...i,value:a,onChange:n,clearable:!0}):(0,nr.jsx)(Qee,{...e})}default:return(0,nr.jsx)(Qee,{...e})}}var gl=y(O(),1);function Kwe(e){let t=bk(e.op)?.input,r=(e.fields??[]).map(o=>o.name);if(!(t instanceof g.ZodObject)||!r.length)return;let n=t.shape;return g.object(Object.fromEntries(r.filter(o=>n[o]).map(o=>[o,n[o]])))}function Xwe({action:e,submit:t,cancel:r}){let n=e.fields??[],o=Kwe(e),i=o?Xee(o):void 0,a=kN({mode:"controlled",initialValues:{...e.initial},validate:s=>{let l={};for(let c of n){let d=T1(c,s[c.name]);d&&(l[c.name]=d)}return{...i?i(s):{},...l}}});return(0,gl.jsx)("form",{onSubmit:a.onSubmit(t),children:(0,gl.jsxs)(Ue,{gap:"md",children:[n.map(s=>(0,gl.jsx)(CN,{field:s,value:a.values[s.name],error:a.errors[s.name],onChange:l=>a.setFieldValue(s.name,l)},s.name)),(0,gl.jsxs)(De,{justify:"flex-end",children:[(0,gl.jsx)(ht,{variant:"default",onClick:r,children:"Cancel"}),(0,gl.jsx)(ht,{type:"submit",color:e.danger?"red":void 0,children:"Save"})]})]})})}function IC(e){return new Promise(t=>{let r=!1,n=a=>{r||(r=!0,Ua.close(i),t(a))},o=e.fields??[],i=Ua.open({title:o.length===1?o[0].label:e.label,centered:!0,onClose:()=>n(void 0),children:(0,gl.jsx)(Xwe,{action:e,submit:n,cancel:()=>n(void 0)})})})}var Oo=y(O(),1),Qwe={attach:Ys,open:Ys,start:bE,stop:yE,restart:Iw,reopen:Iw,reset:_E,make:SE,remove:ww,delete:ww,edit:Kv,change:Kv,show:uE,hide:dE,add:fp,new:fp,forget:Xv,include:sE,exclude:aE,rename:Kv,use:oE,save:Vv,choose:hE};function Ywe(e){let t=e?.session;return typeof t=="string"?t:void 0}function PN(e){let t=(e.verb??e.label).split(/\s+/)[0].toLowerCase();return Qwe[t]}function wC(e){return e.kind==="operation"&&e.danger===!0}function $i(e){return e!==void 0&&!(e.kind==="link"&&e.target.kind==="command")}function ef(){let e=Ck();return(0,ete.useCallback)(async t=>{if(t.kind==="operation"){let n=t.fields?.length?await IC(t):{};return n?e(t,n):void 0}let r=t.target;if(r.kind==="terminal")Yr("/s/"+r.session);else if(r.kind==="start-agent"){let n={kind:"operation",op:"agents.start",label:"Start "+r.agent,input:{agent:r.agent}},o=await e(n),i=o.ok?Ywe(o.output):void 0;return i&&Yr("/s/"+i),o}else r.kind==="view"&&Yr(To(r.view,r.params))},[e])}function tf({action:e,primary:t=!1,...r}){let n=ef();if(!$i(e))return null;let o=wC(e),i=PN(e),a=(0,Oo.jsx)(ht,{variant:t?"filled":o?"light":"default",color:o?"red":void 0,leftSection:i?(0,Oo.jsx)(i,{size:16,stroke:1.8}):void 0,onClick:s=>{s.stopPropagation(),n(e)},...r,children:e.label});return e.description?(0,Oo.jsx)(kt,{label:e.description,children:a}):a}function tte({action:e}){let t=ef();if(!$i(e))return null;let r=PN(e);return r?(0,Oo.jsx)(kt,{label:e.label,children:(0,Oo.jsx)(bt,{"aria-label":e.label,color:wC(e)?"red":"gray",onClick:n=>{n.stopPropagation(),t(e)},children:(0,Oo.jsx)(r,{size:16,stroke:1.7})})}):(0,Oo.jsx)(ht,{size:"compact-xs",variant:"subtle",color:wC(e)?"red":"gray",onClick:n=>{n.stopPropagation(),t(e)},children:e.label})}function rte({actions:e}){let t=ef(),r=e.filter($i);return r.length?(0,Oo.jsxs)(Xr,{position:"bottom-end",children:[(0,Oo.jsx)(Xr.Target,{children:(0,Oo.jsx)(bt,{"aria-label":"More actions",onClick:n=>n.stopPropagation(),children:(0,Oo.jsx)(cE,{size:16})})}),(0,Oo.jsx)(Xr.Dropdown,{children:r.map((n,o)=>{let i=PN(n);return(0,Oo.jsx)(Xr.Item,{color:wC(n)?"red":void 0,leftSection:i?(0,Oo.jsx)(i,{size:15}):void 0,onClick:()=>{t(n)},children:n.label},o)})})]}):null}var fs=y(R(),1);var vh=y(R(),1);var Bt=y(O(),1),DN="@custom";function Jwe(e){return["boolean","enum","number","text","path"].includes(e.kind)?!0:e.kind==="list"&&["enum","text","path"].includes(e.element?.kind??"")}function SC({action:e,summary:t}){let r=Ck(),n=e.fields?.[0],o=e.initial?.[n?.name??""],[i,a]=(0,vh.useState)(o),[s,l]=(0,vh.useState)(!1),[c,d]=(0,vh.useState)(null),u=JSON.stringify(o??null);if((0,vh.useEffect)(()=>a(JSON.parse(u)),[u]),!n)return null;let f=async b=>{if(JSON.stringify(b??null)===u)return;let v=T1(n,b);if(v){d(v);return}l(!0),d(null);let x=await r(e,{[n.name]:b},{inline:!0});l(!1),!x.ok&&!("cancelled"in x)&&(d(x.message+(x.fix?" "+x.fix:"")),a(JSON.parse(u)))},m=b=>{b.key==="Enter"&&f(i),b.key==="Escape"&&a(JSON.parse(u))},p=s?(0,Bt.jsx)(fo,{size:14}):void 0,h=c??void 0;if(!Jwe(n))return(0,Bt.jsxs)(De,{justify:"flex-end",gap:"sm",wrap:"nowrap",children:[t&&(0,Bt.jsx)(ye,{size:"sm",c:"dimmed",truncate:!0,children:t}),(0,Bt.jsx)(ht,{variant:"default",size:"xs",onClick:()=>{IC(e).then(async b=>{b&&await r(e,b,{inline:!0})})},children:n.kind==="secret"?"Set\u2026":"Edit\u2026"})]});switch(n.kind){case"boolean":return(0,Bt.jsxs)(Ue,{gap:4,align:"flex-end",children:[(0,Bt.jsxs)(De,{gap:"xs",children:[p,(0,Bt.jsx)(ja,{checked:i===!0,"aria-label":n.label,disabled:s,onChange:b=>{let v=b.currentTarget.checked;a(v),f(v)}})]}),h&&(0,Bt.jsx)(eSe,{text:h})]});case"enum":{let b=(n.choices??[]).map(_=>({value:String(_.value),label:_.label})),v=n.choices?.some(_=>_.value===i)??!1,x=!v&&i!==void 0&&n.open!==void 0;return(0,Bt.jsxs)(Ue,{gap:6,children:[(0,Bt.jsx)(Ws,{"aria-label":n.label,data:[...b,...n.open?[{value:DN,label:"Custom\u2026"}]:[]],value:x?DN:v?String(i):null,rightSection:p,error:x?void 0:h,disabled:s,onChange:_=>{if(_===DN){a(n.open?.kind==="number"?n.open.min??0:"");return}let I=n.choices?.find(S=>String(S.value)===_)?.value;a(I),f(I)}}),x&&n.open&&(0,Bt.jsx)(ote,{field:n.open,value:i,error:h,onChange:a,onSave:f})]})}case"number":return(0,Bt.jsx)(ote,{field:n,value:i,error:h,onChange:a,onSave:f,busy:s});case"path":return(0,Bt.jsxs)(De,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[(0,Bt.jsx)(er,{style:{flex:1},"aria-label":n.label,ff:"monospace",size:"sm",value:typeof i=="string"?i:"",placeholder:n.literals?.length?n.literals.join(" or ")+", or a path":"C:\\\u2026",rightSection:p,error:h,onChange:b=>a(b.currentTarget.value),onBlur:()=>{f(i)},onKeyDown:m}),(0,Bt.jsx)(Bb,{field:n,value:typeof i=="string"?i:void 0,onPick:b=>{a(b),f(b)}})]});case"list":{let b=Array.isArray(i)?i.map(_=>String(_)):[],v=n.element;if(v?.kind==="enum")return(0,Bt.jsx)(qd,{"aria-label":n.label,data:(v.choices??[]).map(_=>({value:String(_.value),label:_.label})),value:b,error:h,rightSection:p,onChange:_=>{let I=_.map(S=>v.choices?.find(w=>String(w.value)===S)?.value??S);a(I),f(I)}});let x=_=>{a(_),f(_)};return(0,Bt.jsxs)(De,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[(0,Bt.jsx)(gc,{style:{flex:1},"aria-label":n.label,value:b,placeholder:b.length?void 0:"Type and press Enter",error:h,rightSection:p,onChange:x,clearable:!0}),v?.kind==="path"&&(0,Bt.jsx)(Bb,{field:n,value:void 0,onPick:_=>x(b.includes(_)?b:[...b,_])})]})}default:return(0,Bt.jsx)(er,{"aria-label":n.label,value:typeof i=="string"?i:"",rightSection:p,error:h,onChange:b=>a(b.currentTarget.value),onBlur:()=>{f(i)},onKeyDown:m})}}function ote({field:e,value:t,error:r,busy:n,onChange:o,onSave:i}){let a=s=>{s.key==="Enter"&&i(t)};return e.kind==="number"?(0,Bt.jsx)(Qd,{"aria-label":e.label,value:typeof t=="number"?t:"",min:e.min,max:e.max,allowDecimal:!e.integer,thousandSeparator:",",placeholder:e.range,rightSection:n?(0,Bt.jsx)(fo,{size:14}):void 0,error:r,onChange:s=>o(typeof s=="number"?s:void 0),onBlur:()=>{i(t)},onKeyDown:a}):(0,Bt.jsx)(er,{"aria-label":e.label,value:typeof t=="string"?t:"",error:r,onChange:s=>o(s.currentTarget.value),onBlur:()=>{i(t)},onKeyDown:a})}function eSe({text:e}){return(0,Bt.jsx)(ye,{size:"xs",c:"red",ta:"right",children:e})}var mr=y(O(),1);function RN(){return(0,mr.jsxs)(Ue,{gap:"lg","aria-busy":"true","aria-label":"Loading",children:[(0,mr.jsxs)(De,{justify:"space-between",children:[(0,mr.jsxs)(Ue,{gap:8,children:[(0,mr.jsx)(Sn,{h:26,w:180,radius:"md"}),(0,mr.jsx)(Sn,{h:14,w:320,radius:"md"})]}),(0,mr.jsx)(Sn,{h:34,w:120,radius:"md"})]}),[0,1].map(e=>(0,mr.jsx)(Rr,{children:(0,mr.jsxs)(Ue,{gap:"sm",children:[(0,mr.jsx)(Sn,{h:16,w:140,radius:"md"}),(0,mr.jsx)(Sn,{h:12,radius:"md"}),(0,mr.jsx)(Sn,{h:12,w:"80%",radius:"md"}),(0,mr.jsx)(Sn,{h:12,w:"60%",radius:"md"})]})},e))]})}function jb({title:e,text:t,icon:r=pE,action:n,tone:o="neutral"}){return(0,mr.jsx)(Rr,{py:48,children:(0,mr.jsx)(sc,{children:(0,mr.jsxs)(Ue,{gap:"sm",align:"center",maw:440,ta:"center",children:[(0,mr.jsx)(nu,{size:52,radius:"xl",variant:"light",color:o==="danger"?"red":"indigo",children:(0,mr.jsx)(r,{size:26,stroke:1.6})}),e&&(0,mr.jsx)(xi,{order:3,children:e}),(0,mr.jsx)(ye,{c:"dimmed",size:"sm",children:t}),n]})})})}function EN({message:e,fix:t,retry:r}){return(0,mr.jsx)(jb,{tone:"danger",icon:jv,title:e,text:t??"Try again in a moment.",action:r&&(0,mr.jsx)(ht,{variant:"default",onClick:r,children:"Try again"})})}var Ce=y(O(),1);function Ub(e){return"item-"+e.replace(/[^A-Za-z0-9_-]/g,"_")}function tSe(e){return(e.items??[]).filter(t=>t.badges?.length).length}function rSe({item:e}){return!e.details?.length&&!e.code?null:(0,Ce.jsx)(kt,{label:(0,Ce.jsxs)(Ue,{gap:0,children:[e.code&&(0,Ce.jsx)(ye,{size:"xs",ff:"monospace",fw:700,children:e.code}),(e.details??[]).map((t,r)=>(0,Ce.jsx)(ye,{size:"xs",ff:"monospace",style:{whiteSpace:"pre"},children:t},r))]}),maw:480,position:"top-start",children:(0,Ce.jsx)(Gv,{size:14,color:"var(--app-muted)",style:{flex:"none",cursor:"help"}})})}var oSe=150;function nSe({text:e}){let[t,r]=(0,fs.useState)(!1),n=e.length>oSe;return(0,Ce.jsxs)(F,{mt:4,children:[(0,Ce.jsx)(ye,{size:"xs",c:"dimmed",lh:1.5,lineClamp:n&&!t?2:void 0,children:e}),n&&(0,Ce.jsx)(Jg,{component:"button",type:"button",size:"xs",onClick:()=>r(!t),children:t?"Less":"More"})]})}function iSe({item:e,flash:t}){let r=$i(e.primary)&&!e.disabled?e.primary:void 0,n=r?.kind==="operation"&&r.inline?r:void 0,o=!!e.badges?.length;return(0,Ce.jsxs)("div",{className:"setting-row"+(t?" flash":""),id:Ub(e.id),children:[(0,Ce.jsxs)(F,{style:{minWidth:0},children:[(0,Ce.jsxs)(De,{gap:6,wrap:"nowrap",children:[o&&(0,Ce.jsx)("span",{className:"modified-dot",title:"Changed from the default"}),(0,Ce.jsx)(ye,{fw:600,size:"sm",truncate:!0,children:e.label}),(0,Ce.jsx)(rSe,{item:e})]}),e.description&&(0,Ce.jsx)(nSe,{text:e.description}),e.disabled&&(0,Ce.jsx)(ye,{size:"xs",c:"dimmed",fs:"italic",mt:4,children:e.disabled})]}),(0,Ce.jsxs)(De,{gap:6,wrap:"nowrap",justify:"flex-end",align:"flex-start",children:[(0,Ce.jsx)(F,{style:{flex:1,minWidth:0},children:n?(0,Ce.jsx)(SC,{action:n,summary:e.hint}):(0,Ce.jsxs)(De,{justify:"flex-end",gap:"sm",wrap:"nowrap",children:[e.hint&&(0,Ce.jsx)(kt,{label:Yc(e.hint),openDelay:400,maw:480,multiline:!0,children:(0,Ce.jsx)(ye,{size:"sm",c:"dimmed",ff:"monospace",truncate:!0,style:{minWidth:0},children:Yc(e.hint)})}),r&&(0,Ce.jsx)(F,{style:{flex:"none"},children:(0,Ce.jsx)(tf,{action:r,size:"xs"})})]})}),(0,Ce.jsx)(F,{w:28,style:{flex:"none"},children:(0,Ce.jsx)(Vb,{actions:e.actions??[]})})]})]})}function aSe({text:e}){let t=/[A-Za-z]:\\[^\s]+|\/[^\s]+/.exec(e)?.[0],r=t?t.split(/[\\/]/).pop():void 0;return(0,Ce.jsx)(kt,{label:e,openDelay:300,maw:560,multiline:!0,children:(0,Ce.jsxs)(De,{gap:6,wrap:"nowrap",mt:-8,style:{width:"fit-content",cursor:"default"},children:[(0,Ce.jsx)(fE,{size:15,color:"var(--app-muted)",style:{flex:"none"}}),(0,Ce.jsx)(ye,{size:"xs",c:"dimmed",children:r?"Saved in "+r:e})]})})}function TN(e,t=[]){let r=decodeURIComponent(location.hash.slice(1));if(r.startsWith("item-"))for(let n of e){let o=n.items?.find(i=>Ub(i.id)===r);if(o)return{section:n.id,item:o.id}}return{section:e.find(n=>n.id===r)?.id??t.find(n=>n.id===r)?.id}}function nte({page:e,summary:t,toolbar:r,extras:n=[]}){let o=(0,fs.useMemo)(()=>e.sections.filter(b=>b.items?.length),[e]),[i,a]=(0,fs.useState)(()=>TN(o,n).section??o[0]?.id),[s,l]=(0,fs.useState)(()=>TN(o).item),[c,d]=(0,fs.useState)("");(0,fs.useEffect)(()=>{let b=()=>{let v=TN(o,n);v.section&&a(v.section),v.item&&(d(""),l(v.item))};return window.addEventListener("hashchange",b),()=>window.removeEventListener("hashchange",b)},[o,n]),(0,fs.useEffect)(()=>{if(!s)return;document.getElementById(Ub(s))?.scrollIntoView({block:"center",behavior:"smooth"});let b=window.setTimeout(()=>l(void 0),1800);return()=>window.clearTimeout(b)},[s,i]);let u=n.find(b=>b.id===i),f=u?void 0:o.find(b=>b.id===i)??o[0],m=c.trim()?AN({...e,sections:o},c).sections:null,p=b=>{d(""),a(b),history.replaceState(null,"",location.pathname+location.search+"#"+b),window.scrollTo({top:0})},h=b=>(0,Ce.jsx)(iSe,{item:b,flash:s===b.id},b.id);return(0,Ce.jsxs)(Ue,{gap:"lg",children:[(0,Ce.jsx)($N,{title:e.title,summary:t,toolbar:r,actions:e.actions}),e.notice&&(0,Ce.jsx)(aSe,{text:e.notice.text}),(0,Ce.jsxs)("div",{className:"category-layout",children:[(0,Ce.jsxs)(Ue,{gap:"sm",className:"category-nav",children:[(0,Ce.jsx)(er,{leftSection:(0,Ce.jsx)(kn,{size:16}),placeholder:"Search "+e.title.toLowerCase(),value:c,onChange:b=>d(b.currentTarget.value),"aria-label":"Search "+e.title.toLowerCase()}),(0,Ce.jsxs)(Ue,{gap:2,visibleFrom:"md",children:[o.map(b=>{let v=tSe(b);return(0,Ce.jsx)(ta,{label:b.title,active:!m&&b.id===f?.id,onClick:()=>p(b.id),style:{borderRadius:"var(--mantine-radius-md)"},rightSection:v?(0,Ce.jsx)(In,{size:"xs",circle:!0,variant:"light",children:v}):null},b.id)}),n.length>0&&(0,Ce.jsx)(sv,{my:6}),n.map(b=>(0,Ce.jsx)(ta,{label:b.label,active:!m&&b.id===u?.id,onClick:()=>p(b.id),style:{borderRadius:"var(--mantine-radius-md)"}},b.id))]}),(0,Ce.jsx)(F,{hiddenFrom:"md",children:(0,Ce.jsx)(De,{gap:6,children:[...o.map(b=>({id:b.id,label:b.title??b.id})),...n].map(b=>{let v=!m&&b.id===(u?.id??f?.id);return(0,Ce.jsx)(In,{size:"lg",variant:v?"filled":"light",color:v?"indigo":"gray",style:{cursor:"pointer"},onClick:()=>p(b.id),children:b.label},b.id)})})})]}),(0,Ce.jsx)(Ue,{gap:"lg",style:{minWidth:0},children:m?m.length?m.map(b=>(0,Ce.jsxs)(Ue,{gap:"xs",children:[(0,Ce.jsxs)(ye,{size:"xs",fw:650,tt:"uppercase",c:"dimmed",children:[b.title," \xB7 ",b.items?.length??0]}),(0,Ce.jsx)(Rr,{className:"list-card",children:(0,Ce.jsx)(kC,{items:b.items??[],render:h})})]},b.id)):(0,Ce.jsx)(jb,{icon:kn,title:"Nothing found",text:'No setting matches "'+c+'".'}):u?(0,Ce.jsx)(F,{children:u.node},u.id):f&&(0,Ce.jsxs)(Ue,{gap:"sm",children:[(0,Ce.jsxs)(F,{children:[(0,Ce.jsx)(xi,{order:2,children:f.title}),f.description&&(0,Ce.jsx)(ye,{size:"sm",c:"dimmed",mt:4,children:f.description})]}),(0,Ce.jsx)(Rr,{className:"list-card",children:(0,Ce.jsx)(kC,{items:f.items??[],render:h})})]})})]})]})}var sSe={ok:"green",warn:"orange",danger:"red",muted:"gray",accent:"blue"};function rf(e){return e?sSe[e]:void 0}var X=y(O(),1),lSe=12,ON=3;function Yc(e){return e.replace(/ +-> +/g," \u2192 ").replace(/\s{2,}/g," \xB7 ")}function ite(e){if(!e.hint)return!1;let t=new Set((e.badges??[]).map(r=>r.text.toLowerCase()));return t.size?!Yc(e.hint).split(" \xB7 ").every(r=>t.has(r.trim().toLowerCase())):!0}function ate(e){return e.kind==="link"&&e.target.kind==="start-agent"}function $N({title:e,summary:t,toolbar:r,actions:n=[]}){let o=n.filter($i);return(0,X.jsxs)(De,{justify:"space-between",align:"flex-start",gap:"md",wrap:"wrap",children:[(0,X.jsxs)(Ue,{gap:4,style:{minWidth:0},children:[(0,X.jsx)(xi,{order:1,children:e}),t&&(0,X.jsx)(ye,{c:"dimmed",size:"sm",children:t})]}),(0,X.jsxs)(De,{gap:"xs",children:[r,o.map((i,a)=>(0,X.jsx)(tf,{action:i,primary:ate(i)},a))]})]})}function cSe({note:e}){return(0,X.jsx)(za,{color:rf(e.tone)??"gray",variant:"light",p:"sm",radius:"md",icon:(0,X.jsx)(Gv,{size:18}),styles:{message:{fontSize:"var(--mantine-font-size-sm)"}},children:e.text})}function dSe({fact:e}){let t=rf(e.tone);return(0,X.jsxs)("div",{className:"fact-tile",title:e.description,children:[(0,X.jsx)(ye,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",lts:.3,children:e.label}),(0,X.jsxs)(De,{gap:6,wrap:"nowrap",mt:4,children:[t&&(0,X.jsx)("span",{className:"status-dot",style:{"--dot":`var(--mantine-color-${t}-6)`}}),(0,X.jsx)(ye,{size:"sm",fw:600,style:{wordBreak:"break-word"},children:e.value})]}),e.meter&&(0,X.jsx)(fc,{mt:8,size:"sm",radius:"xl",value:Math.min(100,e.meter.value/Math.max(1,e.meter.max)*100),color:t??"indigo"}),e.details?.map((r,n)=>(0,X.jsx)(ye,{size:"xs",c:"dimmed",mt:2,children:r},n))]})}function uSe({facts:e}){return(0,X.jsx)(Mm,{cols:{base:1,xs:2,md:3},spacing:"sm",verticalSpacing:"sm",children:e.map(t=>(0,X.jsx)(dSe,{fact:t},t.id))})}function zN(e,t){return!!e&&!!t&&e.trim().toLowerCase()===t.trim().toLowerCase()}function ste(e){return{description:e.description&&!zN(e.description,e.hint)?e.description:void 0,details:(e.details??[]).filter(t=>!zN(t,e.hint)&&!zN(t,e.description))}}var fSe=/^([A-Z][A-Za-z ]{1,24}):\s+(.+)$/,mSe=/^([A-Z][A-Za-z]*(?: [A-Za-z]+){0,3}) {2,}(.+)$/,pSe=/[\\/]|^(sandbox|npm) /;function hSe(e){let t=fSe.exec(e)??mSe.exec(e);if(t)return{label:t[1].trim(),value:t[2].trim()}}function gSe({line:e}){let t=hSe(e);return t?(0,X.jsxs)(De,{gap:8,wrap:"wrap",align:"flex-start",mt:2,children:[(0,X.jsx)(ye,{size:"xs",c:"dimmed",miw:110,style:{flex:"none"},children:t.label}),(0,X.jsx)(ye,{size:"xs",ff:pSe.test(t.value)?"monospace":void 0,style:{flex:"1 1 120px",minWidth:0,wordBreak:"break-word",whiteSpace:"pre-wrap"},children:t.value})]}):(0,X.jsx)(ye,{size:"xs",c:"dimmed",ff:"monospace",style:{wordBreak:"break-word",whiteSpace:"pre-wrap"},children:e})}function lte({lines:e}){let[t,r]=(0,ms.useState)(!1);if(!e.length)return null;let n=e.slice(0,ON),o=e.slice(ON),i=(a,s)=>(0,X.jsx)(gSe,{line:a},s);return(0,X.jsxs)(F,{mt:4,children:[n.map(i),o.length>0&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(tm,{in:t,children:o.map((a,s)=>i(a,s+ON))}),(0,X.jsx)(xt,{onClick:()=>r(!t),mt:2,children:(0,X.jsxs)(De,{gap:2,children:[t?(0,X.jsx)(Uv,{size:12}):(0,X.jsx)(nE,{size:12}),(0,X.jsx)(ye,{size:"xs",c:"indigo",children:t?"Less":o.length+" more"})]})})]})]})}function cte({item:e}){return(0,X.jsx)(X.Fragment,{children:e.badges?.map(t=>(0,X.jsx)(In,{size:"sm",color:rf(t.tone)??"gray",children:t.text},t.text))})}function vSe({tone:e}){let t=e&&e!=="muted"?rf(e):void 0;return t?(0,X.jsx)("span",{className:"status-dot","aria-hidden":"true",style:{"--dot":`var(--mantine-color-${t}-6)`}}):null}function CC(e){return $i(e.primary)&&!e.disabled?e.primary:void 0}function NN({action:e,hint:t,light:r}){return e.kind==="operation"&&e.inline?(0,X.jsx)(F,{miw:160,maw:300,onClick:n=>n.stopPropagation(),children:(0,X.jsx)(SC,{action:e,summary:t})}):(0,X.jsx)(tf,{action:e,size:"xs",variant:r?"light":"default"})}function xSe(e,t){return e.kind==="operation"&&t.kind==="operation"?e.op===t.op&&JSON.stringify(e.input)===JSON.stringify(t.input):e.kind==="link"&&t.kind==="link"?JSON.stringify(e.target)===JSON.stringify(t.target):!1}function FN(e,t){return(e??[]).filter(r=>!t||!xSe(r,t))}function Vb({actions:e}){let t=e.filter($i);return t.length>2?(0,X.jsx)(rte,{actions:t}):(0,X.jsx)(X.Fragment,{children:t.map((r,n)=>(0,X.jsx)(tte,{action:r},n))})}function bSe({item:e}){let t=ef(),r=CC(e),n=r?.kind==="link",{description:o,details:i}=ste(e);return(0,X.jsx)("div",{className:"item-row"+(n?" clickable":""),tabIndex:n?0:void 0,role:n?"button":void 0,onClick:n?()=>{t(r)}:void 0,onKeyDown:n?a=>a.key==="Enter"&&void t(r):void 0,style:e.disabled?{opacity:.65}:void 0,children:(0,X.jsxs)(De,{justify:"space-between",wrap:"wrap",align:"center",gap:"md",children:[(0,X.jsxs)(De,{gap:"sm",wrap:"nowrap",align:"flex-start",style:{minWidth:0,flex:"1 1 240px"},children:[e.icon&&(0,X.jsx)(Vu,{name:e.icon,size:34}),(0,X.jsxs)(F,{style:{minWidth:0},children:[(0,X.jsxs)(De,{gap:8,wrap:"wrap",children:[e.tone!=="muted"&&(0,X.jsx)(vSe,{tone:e.tone}),(0,X.jsx)(ye,{fw:600,size:"sm",c:e.tone==="muted"?rf(e.tone):void 0,children:Yc(e.label)}),e.marked&&(0,X.jsx)(In,{size:"xs",variant:"dot",color:"indigo",children:"this folder"}),(0,X.jsx)(cte,{item:e})]}),ite(e)&&(0,X.jsx)(ye,{size:"sm",c:"dimmed",style:{wordBreak:"break-word"},children:Yc(e.hint??"")}),o&&(0,X.jsx)(ye,{size:"xs",c:"dimmed",mt:2,children:o}),(0,X.jsx)(lte,{lines:i}),e.disabled&&(0,X.jsx)(ye,{size:"xs",c:"dimmed",fs:"italic",mt:2,children:e.disabled})]})]}),(0,X.jsxs)(De,{gap:6,wrap:"nowrap",className:"row-actions",style:{flex:"none"},children:[(0,X.jsx)(Vb,{actions:FN(e.actions,r)}),r&&(0,X.jsx)(NN,{action:r,hint:e.hint,light:n})]})]})})}function ySe(e){return!!CC(e)&&!e.hint&&!e.details?.length&&!e.badges?.length&&!e.marked&&!e.icon}function _Se({item:e}){let t=ef(),r=CC(e),n=r?.kind==="link";if(r&&ySe(e))return(0,X.jsx)(Rr,{padding:"md",title:e.description,style:{alignSelf:"start",borderStyle:"dashed",background:"transparent"},children:(0,X.jsxs)(De,{justify:"center",gap:6,children:[(0,X.jsx)(Vb,{actions:FN(e.actions,r)}),(0,X.jsx)(NN,{action:r,light:!0})]})});let{details:o}=ste(e);return(0,X.jsx)(Rr,{className:"item-card"+(n?" clickable":""),padding:"md",onClick:n?()=>{t(r)}:void 0,style:e.disabled?{opacity:.7}:void 0,children:(0,X.jsxs)(Ue,{gap:"sm",h:"100%",children:[(0,X.jsxs)(De,{gap:"sm",wrap:"nowrap",align:"flex-start",children:[e.icon&&(0,X.jsx)(Vu,{name:e.icon}),(0,X.jsxs)(F,{style:{minWidth:0,flex:1},children:[(0,X.jsx)(ye,{fw:650,size:"sm",style:{overflowWrap:"anywhere"},children:Yc(e.label)}),(e.marked||!!e.badges?.length)&&(0,X.jsxs)(De,{gap:4,mt:4,wrap:"wrap",children:[e.marked&&(0,X.jsx)(In,{size:"sm",variant:"dot",color:"indigo",children:"this folder"}),(0,X.jsx)(cte,{item:e})]}),ite(e)&&(0,X.jsx)(ye,{size:"xs",c:"dimmed",truncate:!0,mt:4,children:Yc(e.hint??"")})]})]}),(0,X.jsx)(lte,{lines:o}),e.disabled&&(0,X.jsx)(ye,{size:"xs",c:"dimmed",fs:"italic",children:e.disabled}),(r||e.actions?.length)&&(0,X.jsxs)(De,{justify:"flex-end",gap:6,mt:"auto",children:[(0,X.jsx)(Vb,{actions:FN(e.actions,r)}),r&&(0,X.jsx)(NN,{action:r,hint:e.hint,light:!0})]})]})})}function ISe({section:e}){let t=e.columns??[];return(0,X.jsx)(dr.ScrollContainer,{minWidth:560,children:(0,X.jsxs)(dr,{highlightOnHover:!0,verticalSpacing:8,horizontalSpacing:"md",fz:"sm",children:[(0,X.jsx)(dr.Thead,{children:(0,X.jsxs)(dr.Tr,{children:[t.map(r=>(0,X.jsx)(dr.Th,{fz:"xs",c:"dimmed",tt:"uppercase",children:r.label},r.key)),(0,X.jsx)(dr.Th,{})]})}),(0,X.jsx)(dr.Tbody,{children:(e.items??[]).map(r=>{let n=CC(r);return(0,X.jsxs)(dr.Tr,{style:r.disabled?{opacity:.6}:void 0,children:[t.map(o=>(0,X.jsx)(dr.Td,{children:r.cells?.[o.key]??""},o.key)),(0,X.jsx)(dr.Td,{ta:"right",children:n&&(0,X.jsx)(tf,{action:n,size:"compact-xs"})})]},r.id)})})]})})}function kC({items:e,render:t=r=>(0,X.jsx)(bSe,{item:r},r.id)}){let r=[],n;for(let o of e)o.group&&o.group!==n&&r.push((0,X.jsx)("div",{className:"group-heading",children:o.group},"g:"+o.group)),n=o.group,r.push(t(o));return(0,X.jsx)(X.Fragment,{children:r})}function wSe({section:e}){let t=(e.actions??[]).filter($i);return!e.title&&!e.summary&&!t.length?null:(0,X.jsxs)(De,{justify:"space-between",align:"flex-end",gap:"sm",children:[(0,X.jsxs)(F,{style:{minWidth:0},children:[e.title&&(0,X.jsx)(xi,{order:3,children:e.title}),e.summary&&(0,X.jsx)(ye,{size:"sm",c:"dimmed",children:e.summary})]}),t.length>0&&(0,X.jsx)(De,{gap:"xs",children:t.map((r,n)=>(0,X.jsx)(tf,{action:r,primary:ate(r),size:"xs"},n))})]})}function SSe({notes:e}){let t=e.filter(o=>(o.only===void 0||o.only==="web")&&!o.text.startsWith("* ="));if(!t.length)return null;let r=t.filter(o=>o.tone==="warn"||o.tone==="danger"),n=t.filter(o=>!r.includes(o));return(0,X.jsxs)(Ue,{gap:"xs",children:[r.length>0&&(0,X.jsx)(za,{color:r.some(o=>o.tone==="danger")?"red":"yellow",variant:"light",radius:"md",p:"sm",icon:(0,X.jsx)(jv,{size:18}),children:(0,X.jsx)(Ue,{gap:4,children:r.map((o,i)=>(0,X.jsx)(ye,{size:"sm",children:o.text},i))})}),n.length>0&&(0,X.jsx)(Ue,{gap:2,children:n.map((o,i)=>(0,X.jsx)(ye,{size:"xs",c:rf(o.tone)??"dimmed",children:o.text},i))})]})}function kSe({lines:e}){let t=(0,ms.useRef)(null),r=e.join(`
219
+ `);return(0,ms.useEffect)(()=>{let n=t.current;n&&(n.scrollTop=n.scrollHeight)},[r]),(0,X.jsx)(Rr,{children:(0,X.jsx)(Ar,{h:400,viewportRef:t,type:"auto",children:(0,X.jsx)(av,{block:!0,children:r})})})}function CSe({section:e}){let t=e.items??[],r=e.facts??[],n=(e.actions??[]).filter($i),o=e.text??[];if(!r.length&&!t.length&&!n.length&&!e.summary&&!o.length)return null;let i=e.columns&&e.columnsOn!=="cli";return(0,X.jsxs)(Ue,{gap:"sm",children:[(0,X.jsx)(wSe,{section:e}),e.description&&(0,X.jsx)(ye,{size:"sm",c:"dimmed",mt:-4,children:e.description}),r.length>0&&(0,X.jsx)(Rr,{children:(0,X.jsx)(uSe,{facts:r})}),o.length>0&&(0,X.jsx)(kSe,{lines:o}),t.length>0&&(e.cards?(0,X.jsx)(Mm,{cols:{base:1,sm:2,lg:3},spacing:"md",children:t.map(a=>(0,X.jsx)(_Se,{item:a},a.id))}):(0,X.jsx)(Rr,{className:"list-card",children:i?(0,X.jsx)(ISe,{section:e}):(0,X.jsx)(kC,{items:t})})),(0,X.jsx)(SSe,{notes:e.notes??[]})]})}function AN(e,t){let r=t.trim().toLowerCase();if(!r)return e;let n=o=>[o.label,o.hint,o.description,o.keywords,o.group,o.code].some(i=>i?.toLowerCase().includes(r));return{...e,sections:e.sections.map(o=>({...o,facts:[],actions:[],items:(o.items??[]).filter(n)})).filter(o=>o.items.length>0||(o.text?.length??0)>0)}}function dte({page:e,summary:t,toolbar:r,extras:n}){return e.categories?(0,X.jsx)(nte,{page:e,summary:t,toolbar:r,extras:n}):(0,X.jsx)(PSe,{page:e,summary:t,toolbar:r})}function PSe({page:e,summary:t,toolbar:r}){let n=ef(),[o,i]=(0,ms.useState)(""),a=(0,ms.useMemo)(()=>e.sections.reduce((d,u)=>d+(u.items?.length??0),0),[e]),s=(0,ms.useMemo)(()=>AN(e,o),[e,o]),l=e.empty,c=$i(l?.action)?l?.action:void 0;return(0,X.jsxs)(Ue,{gap:"xl",children:[(0,X.jsx)($N,{title:e.title,summary:t,toolbar:r,actions:e.actions}),e.notice&&(0,X.jsx)(cSe,{note:e.notice}),a>lSe&&(0,X.jsx)(er,{leftSection:(0,X.jsx)(kn,{size:16}),placeholder:"Search "+e.title.toLowerCase(),value:o,onChange:d=>i(d.currentTarget.value),"aria-label":"Search this page"}),!TX(e)&&l?(0,X.jsx)(jb,{title:l.title,text:l.text,action:c&&(0,X.jsx)(ht,{mt:"xs",onClick:()=>{n(c)},children:c.label})}):s.sections.map(d=>(0,X.jsx)(CSe,{section:d},d.id))]})}var ps=y(O(),1),DSe=200;function fte(e,t){let r={};for(let i of e.params??[]){let a=t[i];typeof a=="string"&&a.length<=DSe&&(r[i]=a)}let n=e.tabs;if(!n)return r;let o=t[n.param];return{...r,[n.param]:n.choices.some(i=>i.value===o)?o:n.choices[0].value}}function mte({view:e,params:t,extras:r}){let n=wX(e,t),i=Object.keys(e.queries).map(d=>[d,il(e.queries[d],n[d])]),a=i.find(([,d])=>d.error);if(a){let d=a[1].error;return(0,ps.jsx)(EN,{message:d.message,fix:d.fix,retry:()=>location.reload()})}if(i.some(([,d])=>d.pending))return(0,ps.jsx)(RN,{});let s=e.build(Object.fromEntries(i.map(([d,u])=>[d,u.data])),t),l=e.tabs,c=l?(0,ps.jsx)(eu,{size:"sm",data:l.choices.map(d=>({value:d.value,label:d.label})),value:t[l.param],onChange:d=>Yr(To(e.id,{[l.param]:d}))}):void 0;return(0,ps.jsx)(dte,{page:s,summary:e.summary,toolbar:c,extras:r})}function RSe({id:e}){let t=Dz(e);return t?(0,ps.jsx)(mte,{view:t,params:fte(t,{})}):null}function pte({view:e,params:t}){let r=yQ(nl,e);if((0,ute.useEffect)(()=>{r?.view&&Yr(To(r.view)+"#"+e)},[r,e]),r?.view)return(0,ps.jsx)(RN,{});let n=Dz(e);if(!n)return(0,ps.jsx)(EN,{message:"There is no page called "+e+".",fix:"Pick a page on the left."});let o=fte(n,t),a=(Uu(nl).find(s=>s.view===e)?.embeds??[]).map(s=>({id:s.view,label:s.label,node:(0,ps.jsx)(RSe,{id:s.view})}));return(0,ps.jsx)(mte,{view:n,params:o,extras:a.length?a:void 0},e+JSON.stringify(o))}var hte=()=>kv({opened:!1,empty:!1,selected:-1,listId:"",query:"",registeredActions:new Set}),LN=e=>Cv(e);function xh(e,t){let r=t.getState();t.setState({...r,...e(t.getState())})}function gte(e){xh(()=>({opened:!0,selected:-1}),e)}function vte(e){xh(()=>({opened:!1}),e)}function xte(e){xh(t=>({opened:!t.opened,selected:t.opened?t.selected:-1}),e)}function bte(e,t){t.updateState(r=>({...r,selected:e}))}function ESe(e,t){t.updateState(r=>({...r,listId:e}))}function PC(e,t=document){let r=t.querySelector(e);if(r)return r;let n=t instanceof ShadowRoot?t.host.children:t.children;for(let o=0;o<n.length;o+=1){let i=n[o];if(i.shadowRoot){let s=PC(e,i.shadowRoot);if(s)return s}let a=PC(e,i);if(a)return a}return null}function DC(e,t){let r=t.getState(),n=r.listId?PC(`#${r.listId}`):null,o=n?.querySelector("[data-selected]"),i=n?.querySelectorAll("[data-action]")??[],a=e===-1?i.length-1:e===i.length?0:e,s=Sl(a,0,i.length-1);return o?.removeAttribute("data-selected"),i[s]?.scrollIntoView({block:"nearest"}),i[s]?.setAttribute("data-selected","true"),bte(s,t),s}function TSe(e){return DC(e.getState().selected+1,e)}function $Se(e){return DC(e.getState().selected-1,e)}function ASe(e){let t=e.getState();PC(`#${t.listId} [data-selected]`)?.click()}function OSe(e,t){let r=t.getState();return r.registeredActions.add(e),()=>{r.registeredActions.delete(e)}}function zSe(e,t){xh(()=>({query:e}),t),Promise.resolve().then(()=>{DC(0,t),xh(r=>({empty:r.query.trim().length>0&&r.registeredActions.size===0||!1}),t)})}function NSe({clearQuery:e},t){t.updateState(r=>({...r,selected:-1,query:e?"":r.query,empty:e?!1:r.empty}))}var dn={open:gte,close:vte,toggle:xte,updateState:xh,setSelectedAction:bte,setListId:ESe,selectAction:DC,selectNextAction:TSe,selectPreviousAction:$Se,triggerSelectedAction:ASe,registerAction:OSe,setQuery:zSe,clearSpotlightState:NSe};function yte(){let e=hte();return[e,{open:()=>gte(e),close:()=>vte(e),toggle:()=>xte(e)}]}var[RC,vl]=yte(),{open:FSe,close:LSe,toggle:MSe}=vl;function EC(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}var xl=y(O(),1);function BSe(e){return Array.isArray(e)?e.map(t=>t.trim()).join(",").toLowerCase().trim():typeof e=="string"?e.toLowerCase().trim():""}function jSe(e){return e.reduce((t,r)=>"actions"in r?[...t,...r.actions.map(n=>({...n,group:r.group}))]:[...t,r],[])}function USe(e){let t={},r=[];return e.forEach(n=>{n.group?(t[n.group]||(t[n.group]={pushed:!1,data:{group:n.group,actions:[]}}),t[n.group].data.actions.push(n),t[n.group].pushed||(t[n.group].pushed=!0,r.push(t[n.group].data))):r.push(n)}),r}var _te=(e,t)=>{let r=e.trim().toLowerCase(),n=[[],[]];return jSe(t).forEach(i=>{i.label?.toLowerCase().includes(r)?n[0].push(i):(i.description?.toLowerCase().includes(r)||BSe(i.keywords).includes(r))&&n[1].push(i)}),USe(n.flat())};function MN(e,t){if(!Array.isArray(e))return[];let r=0;return e.reduce((n,o)=>{if(r>=t)return n;if(EC(o)){let i=MN(o.actions,t-r);n.push({group:o.group,actions:i}),r+=i.length}else n.push(o),r+=1;return n},[])}var Oi=y(O(),1);var[Ite,Ai]=Vt("Spotlight component was not found in tree");var io={root:"m_d2b315db",content:"m_3cd250e0",body:"m_d2abce9b",search:"m_f366a061",actionsList:"m_6e463822",action:"m_d49bb8ef",actionBody:"m_3d475731",actionSection:"m_832642f6",actionLabel:"m_6c2a1345",actionDescription:"m_a6d9d78d",empty:"m_82f78f74",footer:"m_ddcaf054",actionsGroup:"m_5a3e5f7b"};var VSe={dimmedSections:!0,highlightQuery:!1},bh=M((e,t)=>{let r=z("SpotlightAction",VSe,e),{className:n,style:o,classNames:i,styles:a,id:s,description:l,label:c,leftSection:d,rightSection:u,children:f,dimmedSections:m,highlightQuery:p,highlightColor:h,closeSpotlightOnTrigger:b,onClick:v,onMouseDown:x,keywords:_,vars:I,...S}=r,w=Ai(),P={classNames:i,styles:a},E=p&&typeof c=="string"?(0,Oi.jsx)(cv,{component:"span",highlight:w.query,color:h,...w.getStyles("actionLabel",P),children:c}):(0,Oi.jsx)("span",{...w.getStyles("actionLabel",P),children:c});return(0,Oi.jsx)(xt,{ref:t,"data-action":!0,...w.getStyles("action",{className:n,style:o,...P}),...S,onMouseDown:B=>{B.preventDefault(),x?.(B)},onClick:B=>{v?.(B),(b??w.closeOnActionTrigger)&&dn.close(w.store)},tabIndex:-1,children:f||(0,Oi.jsxs)(Oi.Fragment,{children:[d&&(0,Oi.jsx)(F,{component:"span",mod:{position:"left",dimmed:m},...w.getStyles("actionSection",P),children:d}),(0,Oi.jsxs)("span",{...w.getStyles("actionBody",P),children:[E,(0,Oi.jsx)("span",{...w.getStyles("actionDescription",P),children:l})]}),u&&(0,Oi.jsx)(F,{component:"span",mod:{position:"right",dimmed:m},...w.getStyles("actionSection",P),children:u})]})})});bh.classes=io;bh.displayName="@mantine/spotlight/SpotlightAction";var wte=y(O(),1);var HSe={},Hb=M((e,t)=>{let{className:r,style:n,styles:o,classNames:i,label:a,children:s,...l}=z("SpotlightActionsGroup",HSe,e),c=Ai();return(0,wte.jsx)(F,{...c.getStyles("actionsGroup",{className:r,style:n,classNames:i,styles:o}),ref:t,...l,__vars:{"--spotlight-label":`'${a?.replace(/'/g,"\\'")}'`},children:s})});Hb.classes=io;Hb.displayName="@mantine/core/SpotlightActionsGroup";var Ste=y(O(),1),TC=y(R(),1);var WSe={},Wb=M((e,t)=>{let{className:r,style:n,id:o,children:i,vars:a,classNames:s,styles:l,...c}=z("SpotlightActionsList",WSe,e),d=Ai(),u=`mantine-${(0,TC.useId)().replace(/:/g,"")}`,f=o||u;return(0,TC.useEffect)(()=>(dn.setListId(f,d.store),()=>dn.setListId("",d.store)),[]),(0,Ste.jsx)(Ar.Autosize,{...d.getStyles("actionsList",{className:r,style:n,classNames:s,styles:l}),ref:t,type:"scroll",scrollbarSize:"var(--spotlight-actions-list-padding)",offsetScrollbars:"y",id:f,...c,children:i})});Wb.classes=io;Wb.displayName="@mantine/spotlight/SpotlightActionsList";var kte=y(O(),1);var ZSe={},Zb=M((e,t)=>{let{className:r,style:n,classNames:o,styles:i,...a}=z("SpotlightEmpty",ZSe,e),s=Ai();return(0,kte.jsx)(F,{ref:t,...s.getStyles("empty",{classNames:o,styles:i,className:r,style:n}),...a})});Zb.classes=io;Zb.displayName="@mantine/spotlight/SpotlightEmpty";var Cte=y(O(),1);var GSe={},$C=M((e,t)=>{let{className:r,style:n,classNames:o,styles:i,...a}=z("SpotlightFooter",GSe,e),s=Ai();return(0,Cte.jsx)(F,{ref:t,...s.getStyles("footer",{className:r,classNames:o,style:n,styles:i}),...a})});$C.classes=io;$C.displayName="@mantine/spotlight/SpotlightFooter";var BN=y(O(),1);function Pte(e,t){if(!e)return[];let r=()=>dn.open(t);return Array.isArray(e)?e.map(n=>[n,r]):[[e,r]]}var qSe={size:600,yOffset:80,zIndex:Pt("max"),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:"pop"},store:RC,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:"mod + K",maxHeight:400,scrollable:!1},Gb=M((e,t)=>{let r=z("SpotlightRoot",qSe,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,store:c,children:d,query:u,onQueryChange:f,transitionProps:m,clearQueryOnClose:p,shortcut:h,tagsToIgnore:b,triggerOnContentEditable:v,disabled:x,onSpotlightOpen:_,onSpotlightClose:I,forceOpened:S,closeOnActionTrigger:w,maxHeight:P,scrollable:E,...B}=r,H=lt(),{opened:Z,query:K}=LN(c),T=u||K,k=C=>{f?.(C),dn.setQuery(C,c)},$=q({name:"Spotlight",classes:io,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s});return Nh(Pte(h,c),b,v),br(()=>{Z?_?.():I?.()},[Z]),x?null:(0,BN.jsx)(Ite,{value:{getStyles:$,query:T,setQuery:k,store:c,closeOnActionTrigger:w},children:(0,BN.jsx)(po,{ref:t,...B,withCloseButton:!1,opened:Z||!!S,padding:0,onClose:()=>dn.close(c),className:o,style:i,classNames:Mi({theme:H,classNames:[io,n],props:r,stylesCtx:void 0}),styles:pa({theme:H,styles:a,props:r,stylesCtx:void 0}),transitionProps:{...m,onExited:()=>{p&&k(""),dn.clearSpotlightState({clearQuery:p},c),m?.onExited?.()}},__vars:{"--spotlight-max-height":E?W(P):void 0},__staticSelector:"Spotlight","data-scrollable":E||void 0,children:d})})});Gb.classes=io;Gb.displayName="@mantine/spotlight/SpotlightRoot";var Dte=y(O(),1),Rte=y(R(),1);var KSe={size:"lg"},qb=M((e,t)=>{let{classNames:r,styles:n,onKeyDown:o,onChange:i,vars:a,value:s,...l}=z("SpotlightSearch",KSe,e),c=Ai(),d=c.getStyles("search"),[u,f]=(0,Rte.useState)(!1),m=p=>{o?.(p),!u&&(p.nativeEvent.code==="ArrowDown"&&(p.preventDefault(),dn.selectNextAction(c.store)),p.nativeEvent.code==="ArrowUp"&&(p.preventDefault(),dn.selectPreviousAction(c.store)),(p.nativeEvent.code==="Enter"||p.nativeEvent.code==="NumpadEnter")&&(p.preventDefault(),dn.triggerSelectedAction(c.store)))};return(0,Dte.jsx)(ct,{ref:t,classNames:[{input:d.className},r],styles:[{input:d.style},n],...l,value:s??c.query,onChange:p=>{c.setQuery(p.currentTarget.value),i?.(p)},onKeyDown:m,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});qb.classes=io;qb.displayName="@mantine/spotlight/SpotlightSearch";var XSe={size:600,yOffset:80,limit:1/0,zIndex:Pt("max"),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:"pop"},store:RC,filter:_te,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:"mod + K",highlightQuery:!1},un=M((e,t)=>{let r=z("Spotlight",XSe,e),{searchProps:n,filter:o,query:i,onQueryChange:a,actions:s,nothingFound:l,highlightQuery:c,limit:d,...u}=r,[f,m]=rt({value:i,defaultValue:"",finalValue:"",onChange:a}),p=MN(o(f,s),d).map(h=>{if(EC(h)){let b=h.actions.map(({id:v,...x})=>(0,xl.jsx)(bh,{highlightQuery:c,...x},v));return(0,xl.jsx)(Hb,{label:h.group,children:b},h.group)}return(0,xl.jsx)(bh,{highlightQuery:c,...h},h.id)});return(0,xl.jsxs)(Gb,{...u,query:f,onQueryChange:m,ref:t,children:[(0,xl.jsx)(qb,{...n}),(0,xl.jsxs)(Wb,{children:[p,p.length===0&&l&&(0,xl.jsx)(Zb,{children:l})]})]})});un.classes=io;un.displayName="@mantine/spotlight/Spotlight";un.Search=qb;un.ActionsList=Wb;un.Action=bh;un.Empty=Zb;un.ActionsGroup=Hb;un.Footer=$C;un.Root=Gb;un.open=vl.open;un.close=vl.close;un.toggle=vl.toggle;var Ete=y(R(),1);var bl=y(O(),1),QSe=ju("sessions.list"),YSe=ju("settings.list");function Tte(){let e=il(QSe,{}).data,t=il(YSe,{scope:"user"}).data,{setColorScheme:r}=md(),n=pd("light")==="dark",o=(0,Ete.useMemo)(()=>{let i=Uu(nl).filter(c=>c.view).map(c=>{let d=nl.find(m=>m.children?.includes(c))?.label,u=_k[d??c.label]??kn,f=d?d+" \xB7 "+c.label:c.label;return{id:"view:"+c.view,label:f,description:"Go to "+f,leftSection:(0,bl.jsx)(u,{size:18,stroke:1.6}),onClick:()=>Yr(To(c.view))}}),a=[{id:"new-session",label:"New session",description:"Start an agent in a project of the sandbox",leftSection:(0,bl.jsx)(fp,{size:18}),onClick:()=>Yr(To("agents"))},{id:"scheme",label:n?"Light mode":"Dark mode",description:"Switch the colours of this page",leftSection:(0,bl.jsx)(qv,{size:18}),onClick:()=>r(n?"light":"dark")}],s=(e?.sessions??[]).filter(c=>c.phase==="running"&&c.canOpen).map(c=>({id:"session:"+c.id,label:c.harness+" \xB7 "+(c.projectName??c.cwd),description:"Open the terminal of session "+c.id,keywords:[c.id,c.cwd],leftSection:(0,bl.jsx)(Vu,{name:c.harness,size:24}),rightSection:(0,bl.jsx)(Ys,{size:16}),onClick:()=>Yr("/s/"+c.id)})),l=(t?.rows??[]).map(c=>({id:"setting:"+c.id,label:c.label,description:c.id+(c.field.help?" \xB7 "+c.field.help:""),keywords:[c.id,c.category],leftSection:(0,bl.jsx)(JR,{size:18,stroke:1.6}),onClick:()=>Yr(To("settings")+"#"+Ub(c.id))}));return[{group:"Pages",actions:i},{group:"Commands",actions:a},...s.length?[{group:"Sessions",actions:s}]:[],...l.length?[{group:"Settings",actions:l}]:[]]},[e,t,n,r]);return(0,bl.jsx)(un,{actions:o,shortcut:["mod + K","/"],limit:12,highlightQuery:!0,scrollable:!0,maxHeight:480,nothingFound:"Nothing matches",searchProps:{leftSection:(0,bl.jsx)(kn,{size:18}),placeholder:"Search pages, sessions and settings\u2026"}})}var ua=y(O(),1),JSe=ju("sandbox.status");function e1e(e){let t=e.sandbox;if(e.shared?.limited)return{color:"gray",title:"Another user\u2019s sandbox",line:"Not shared",busy:!1};if(!t.running)return{color:"gray",title:"Stopped",line:"Start an agent to start it",busy:!1};let r=e.projects.reduce((i,a)=>i+a.sessions.length,0)+e.otherSessions.length,n=t.phase==="ready",o=t.startedAt?"up "+Tn(t.startedAt).replace(" ago",""):"running";return{color:n?"green":"yellow",title:n?"Running":t.phase.charAt(0).toUpperCase()+t.phase.slice(1),line:o+" \xB7 "+r+(r===1?" agent":" agents"),busy:!n}}function $te(){let{data:e,error:t}=il(JSe,{}),r=e?e1e(e):t?{color:"red",title:"Cannot reach the sandbox",line:"Is sandbox web still running?",busy:!1}:null;return(0,ua.jsx)(xt,{onClick:()=>Yr(To("sandbox")),p:"sm",w:"100%",style:{border:"1px solid var(--app-border)",borderRadius:"var(--mantine-radius-md)"},"aria-label":"Sandbox status",children:r?(0,ua.jsxs)(De,{gap:"sm",wrap:"nowrap",children:[(0,ua.jsx)("span",{className:"status-dot"+(r.busy?" pulse":""),style:{"--dot":`var(--mantine-color-${r.color}-6)`}}),(0,ua.jsxs)(Ue,{gap:0,style:{minWidth:0},children:[(0,ua.jsx)(ye,{size:"sm",fw:600,truncate:!0,children:r.title}),(0,ua.jsx)(ye,{size:"xs",c:"dimmed",truncate:!0,children:r.line})]})]}):(0,ua.jsxs)(Ue,{gap:6,children:[(0,ua.jsx)(Sn,{h:12,w:"60%"}),(0,ua.jsx)(Sn,{h:10,w:"80%"})]})})}var Oe=y(O(),1);function Ate(){return(0,Oe.jsxs)(De,{gap:10,wrap:"nowrap",children:[(0,Oe.jsx)("div",{className:"brand-mark",children:(0,Oe.jsx)(up,{size:17,stroke:2})}),(0,Oe.jsxs)(F,{children:[(0,Oe.jsx)(ye,{fw:700,size:"sm",lh:1.1,children:"Sandbox"}),(0,Oe.jsx)(ye,{size:"xs",c:"dimmed",lh:1.1,children:"Windows development sandbox"})]})]})}function t1e(){let{setColorScheme:e}=md(),t=pd("light")==="dark";return(0,Oe.jsx)(kt,{label:t?"Light mode":"Dark mode",children:(0,Oe.jsx)(bt,{size:"lg","aria-label":"Switch dark or light",onClick:()=>e(t?"light":"dark"),children:t?(0,Oe.jsx)(kE,{size:18,stroke:1.6}):(0,Oe.jsx)(qv,{size:18,stroke:1.6})})})}function r1e(){return(0,Oe.jsx)(xt,{onClick:()=>vl.open(),px:"sm",py:7,w:"100%",style:{border:"1px solid var(--app-border)",borderRadius:"var(--mantine-radius-md)",background:"var(--app-bg)"},"aria-label":"Search and commands",children:(0,Oe.jsxs)(De,{gap:8,wrap:"nowrap",children:[(0,Oe.jsx)(kn,{size:15,color:"var(--app-muted)"}),(0,Oe.jsx)(ye,{size:"sm",c:"dimmed",style:{flex:1},children:"Search\u2026"}),(0,Oe.jsx)("span",{className:"kbd-hint",children:"Ctrl K"})]})})}function o1e({active:e,onPick:t}){let r=nl.filter(i=>i.view||i.children?.length),n=nl.filter(i=>!i.view&&!i.children?.length),o=(i,a=!1)=>{let s=_k[i.label]??up,l=a?void 0:(0,Oe.jsx)(s,{size:18,stroke:1.6});if(i.children?.length)return(0,Oe.jsx)(ta,{label:i.label,leftSection:l,childrenOffset:28,defaultOpened:bQ(i.children).includes(e),style:{borderRadius:"var(--mantine-radius-md)"},children:i.children.map(d=>o(d,!0))},i.label);let c=i.view;return(0,Oe.jsx)(ta,{label:i.label,leftSection:l,active:c===e,href:To(c),style:{borderRadius:"var(--mantine-radius-md)"},onClick:d=>{d.preventDefault(),t(),Yr(To(c))}},i.label)};return(0,Oe.jsxs)(Ue,{gap:2,children:[(0,Oe.jsx)("div",{className:"nav-group-label",children:"Workspace"}),r.map(i=>o(i)),n.length>0&&(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)("div",{className:"nav-group-label",children:"In the terminal menu"}),(0,Oe.jsxs)(ye,{size:"xs",c:"dimmed",px:12,lh:1.5,children:[n.map(i=>i.label).join(", "),": open"," ",(0,Oe.jsx)(ye,{span:!0,ff:"monospace",size:"xs",children:"sandbox"})," ","in a terminal on this PC."]})]})]})}function jN({active:e,bare:t=!1,children:r}){let[n,{toggle:o,close:i}]=v2(!1);return(0,Oe.jsxs)(Or,{header:{height:{base:52,sm:0}},navbar:{width:256,breakpoint:"sm",collapsed:{mobile:!n}},padding:0,children:[(0,Oe.jsx)(Or.Header,{className:"app-header",hiddenFrom:"sm",children:(0,Oe.jsxs)(De,{h:"100%",px:"md",gap:"sm",justify:"space-between",children:[(0,Oe.jsxs)(De,{gap:"sm",children:[(0,Oe.jsx)(ov,{opened:n,onClick:o,size:"sm","aria-label":"Navigation"}),(0,Oe.jsx)(Ate,{})]}),(0,Oe.jsx)(bt,{size:"lg","aria-label":"Search",onClick:()=>vl.open(),children:(0,Oe.jsx)(kn,{size:18})})]})}),(0,Oe.jsx)(Or.Navbar,{className:"app-navbar","aria-label":"Main",children:(0,Oe.jsxs)(F,{className:"app-navbar-sticky",children:[(0,Oe.jsx)(Or.Section,{p:"md",pb:"xs",visibleFrom:"sm",children:(0,Oe.jsx)(Ate,{})}),(0,Oe.jsx)(Or.Section,{px:"md",py:"xs",children:(0,Oe.jsx)($te,{})}),(0,Oe.jsx)(Or.Section,{px:"md",pb:"xs",visibleFrom:"sm",children:(0,Oe.jsx)(r1e,{})}),(0,Oe.jsx)(Or.Section,{grow:!0,component:Ar,px:"xs",children:(0,Oe.jsx)(o1e,{active:e,onPick:i})}),(0,Oe.jsx)(Or.Section,{p:"sm",style:{borderTop:"1px solid var(--app-border)"},children:(0,Oe.jsxs)(De,{justify:"space-between",children:[(0,Oe.jsx)(ye,{size:"xs",c:"dimmed",pl:6,children:"Loopback only \xB7 signed in"}),(0,Oe.jsx)(t1e,{})]})})]})}),(0,Oe.jsx)(Or.Main,{className:"app-main",style:t?{display:"flex",height:"100dvh",paddingBottom:0}:void 0,children:t?r:(0,Oe.jsx)("div",{className:"app-content",children:r})}),(0,Oe.jsx)(Tte,{})]})}var zo=y(O(),1);function n1e(e){let t=/^#k=([0-9a-f]{64})$/.exec(e);return t?t[1]:null}async function i1e(){let e=n1e(location.hash);if(e){history.replaceState(null,"",location.pathname+location.search);try{await $E.login(e)}catch{return"out"}}try{return await $E.info(),"in"}catch{return"out"}}function Ote(){let[e,t]=(0,AC.useState)("checking"),r=_Q();return(0,AC.useEffect)(()=>{i1e().then(t)},[]),e==="checking"?(0,zo.jsx)(sc,{h:"100dvh",children:(0,zo.jsx)(fo,{})}):e==="out"?(0,zo.jsx)(sc,{h:"100dvh",p:"md",style:{background:"var(--app-bg)"},children:(0,zo.jsx)(Rr,{maw:440,p:"xl",children:(0,zo.jsxs)(Ue,{gap:"sm",align:"center",ta:"center",children:[(0,zo.jsx)(nu,{size:52,radius:"xl",variant:"light",children:(0,zo.jsx)(gE,{size:26,stroke:1.6})}),(0,zo.jsx)(xi,{order:2,children:"Not signed in"}),(0,zo.jsxs)(ye,{c:"dimmed",size:"sm",children:["This page only opens from this PC. In a terminal, run"," ",(0,zo.jsx)(ye,{span:!0,ff:"monospace",fw:600,children:"sandbox web open"})," ",": it opens the web UI already signed in."]})]})})}):r.page==="terminal"?(0,zo.jsx)(jN,{active:"sessions",bare:!0,children:(0,zo.jsx)(Tee,{id:r.id})}):(0,zo.jsx)(jN,{active:r.view,children:(0,zo.jsx)(pte,{view:r.view,params:r.params})})}var zte=[500,1e3,2e3,4e3,8e3],a1e=6e4,OC=class{constructor(){Et(this,"socket",null);Et(this,"attempt",0);Et(this,"next",1);Et(this,"queue",[]);Et(this,"calls",new Map);Et(this,"subscriptions",new Map);Et(this,"shared",new Map);Et(this,"listeners",new Set);Et(this,"hidden",!1);Et(this,"releaseTimer")}setHidden(t){if(t!==this.hidden){if(this.hidden=t,window.clearTimeout(this.releaseTimer),t){if(this.socket?.readyState===WebSocket.OPEN)for(let r of this.subscriptions.keys())this.send({t:"unsubscribe",id:r});this.releaseTimer=window.setTimeout(()=>{this.hidden&&this.calls.size===0&&this.release()},a1e);return}if(this.socket?.readyState===WebSocket.OPEN)for(let[r,n]of this.subscriptions)this.send({t:"subscribe",id:r,query:n.query,input:n.input});else this.subscriptions.size&&this.connect()}}release(){let t=this.socket;this.socket=null,t?.close(1e3),this.listeners.forEach(r=>r(!1))}onConnection(t){return this.listeners.add(t),()=>this.listeners.delete(t)}connect(){if(this.socket)return this.socket;let t=location.protocol==="https:"?"wss:":"ws:",r=new WebSocket(t+"//"+location.host+"/api/rpc");return this.socket=r,r.onopen=()=>{if(this.attempt=0,this.listeners.forEach(n=>n(!0)),!this.hidden)for(let[n,o]of this.subscriptions)this.send({t:"subscribe",id:n,query:o.query,input:o.input});for(let n of this.queue.splice(0))r.send(n)},r.onmessage=n=>{if(typeof n.data!="string")return;let o;try{o=JSON.parse(n.data)}catch{return}let i=EX.safeParse(o);i.success&&this.receive(i.data)},r.onclose=()=>{if(this.socket!==r)return;this.socket=null,this.listeners.forEach(o=>o(!1));for(let o of this.calls.values())o.reject(new Error("The connection to the sandbox web server dropped."));this.calls.clear();let n=zte[Math.min(this.attempt++,zte.length-1)];this.subscriptions.size&&!this.hidden&&window.setTimeout(()=>this.connect(),n)},r}send(t){let r=JSON.stringify(t),n=this.connect();n.readyState===WebSocket.OPEN?n.send(r):this.queue.push(r)}async receive(t){let r=this.subscriptions.get(t.id);if(r){t.t==="data"&&r.data(t.output),t.t==="error"&&r.error(rz(t.error));return}let n=this.calls.get(t.id);if(n)switch(t.t){case"progress":n.handlers.progress?.(t.text);return;case"log":n.handlers.log?.(t.text,t.tone);return;case"ask":{let o=await n.handlers.ask(t.question);this.send({t:"answer",id:t.id,value:o});return}case"result":this.calls.delete(t.id),n.resolve(t.output);return;case"error":this.calls.delete(t.id),n.reject(rz(t.error));return}}call(t,r,n){let o="c"+this.next++;return new Promise((i,a)=>{this.calls.set(o,{handlers:n,resolve:i,reject:a}),this.send({t:"call",id:o,op:t,input:r})})}subscribe(t,r,n,o){let i=t+"\0"+JSON.stringify(r??null),a=this.shared.get(i);if(a)a.last&&n(a.last.output);else{let c={id:"s"+this.next++,listeners:new Set,last:void 0};a=c,this.shared.set(i,c),this.subscriptions.set(c.id,{query:t,input:r,data:d=>{c.last={output:d};for(let u of[...c.listeners])u.data(d)},error:d=>{c.last=void 0;for(let u of[...c.listeners])u.error(d)}}),this.hidden||this.send({t:"subscribe",id:c.id,query:t,input:r})}let s={data:n,error:o},l=a;return l.listeners.add(s),()=>{l.listeners.delete(s),!l.listeners.size&&(this.shared.delete(i),this.subscriptions.delete(l.id),this.socket?.readyState===WebSocket.OPEN&&this.send({t:"unsubscribe",id:l.id}))}}};var s1e=["#e6e8ee","#c4c8d2","#9aa0ad","#6c7383","#4a5060","#30343f","#22252e","#1a1d24","#14161c","#0e1015"],Nte={primaryColor:"indigo",primaryShade:{light:6,dark:5},colors:{dark:s1e},fontFamily:'"Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif',fontFamilyMonospace:'"Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, monospace',headings:{fontFamily:'"Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif',fontWeight:"650",sizes:{h1:{fontSize:"1.625rem"},h2:{fontSize:"1.375rem"},h3:{fontSize:"1.0625rem"}}},defaultRadius:"md",cursorType:"pointer",focusRing:"auto",components:{Card:Rr.extend({defaultProps:{withBorder:!0,radius:"lg",padding:"lg",shadow:"none"}}),Paper:Qi.extend({defaultProps:{radius:"lg"}}),Button:ht.extend({defaultProps:{radius:"md",size:"sm"}}),ActionIcon:bt.extend({defaultProps:{variant:"subtle",color:"gray",radius:"md"}}),Badge:In.extend({defaultProps:{radius:"sm",variant:"light",tt:"none",fw:600}}),Tooltip:kt.extend({defaultProps:{withArrow:!0,openDelay:300,multiline:!0,maw:320}}),Modal:po.extend({defaultProps:{radius:"lg",centered:!0,overlayProps:{blur:2,backgroundOpacity:.45}}}),Menu:Xr.extend({defaultProps:{radius:"md",shadow:"md",withinPortal:!0}}),NavLink:ta.extend({defaultProps:{variant:"light"}}),Notification:Kd.extend({defaultProps:{radius:"md",withBorder:!0}}),SegmentedControl:eu.extend({defaultProps:{radius:"md"}}),Select:Ws.extend({defaultProps:{allowDeselect:!1,checkIconPosition:"right"}}),Switch:ja.extend({defaultProps:{size:"md"}}),TextInput:er.extend({defaultProps:{spellCheck:!1}})}};var Jc=y(O(),1),l1e=new XR({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}}),zC=new OC;document.addEventListener("visibilitychange",()=>zC.setHidden(document.hidden));window.addEventListener("pagehide",()=>zC.release());window.addEventListener("pageshow",e=>{e.persisted&&zC.setHidden(!1)});var Fte=document.getElementById("root");Fte&&(0,Lte.createRoot)(Fte).render((0,Jc.jsx)(ky,{theme:Nte,defaultColorScheme:"auto",children:(0,Jc.jsx)($R,{client:l1e,children:(0,Jc.jsx)(CQ,{client:zC,children:(0,Jc.jsxs)(IR,{children:[(0,Jc.jsx)(ra,{position:"bottom-right",limit:4}),(0,Jc.jsx)(Ote,{})]})})})}));